chesai-ui 0.16.8 → 0.16.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.
@@ -1,27 +1,28 @@
1
1
  import { jsxs as r, jsx as t, Fragment as R } from "react/jsx-runtime";
2
- import { useMediaQuery as me } from "@uidotdev/usehooks";
3
- import { clsx as H } from "clsx";
2
+ import { useMediaQuery as ue } from "@uidotdev/usehooks";
3
+ import { clsx as X } from "clsx";
4
4
  import { format as W } from "date-fns";
5
5
  import { useDragControls as fe, useMotionValue as L, AnimatePresence as Q, motion as S } from "framer-motion";
6
6
  import { Clock as he, Repeat as pe, X as U, Trash2 as J, GripHorizontal as ye } from "lucide-react";
7
- import { useRef as ve, useState as O, useEffect as K } from "react";
7
+ import { useRef as ve, useState as M, useEffect as K } from "react";
8
8
  import { createPortal as P } from "react-dom";
9
- import { Button as M } from "../button/index.mjs";
9
+ import { Button as x } from "../button/index.mjs";
10
+ import { ButtonGroup as ge } from "../button-group/index.mjs";
10
11
  import { DatePicker as z } from "../date-picker/date-picker.mjs";
11
- import { IconButton as x } from "../icon-button/index.mjs";
12
- import { Input as ge } from "../input/index.mjs";
13
- import { Sheet as xe, SheetContent as we, SheetHeader as be, SheetTitle as Ne } from "../sheet/index.mjs";
12
+ import { IconButton as w } from "../icon-button/index.mjs";
13
+ import { Input as xe } from "../input/index.mjs";
14
+ import { Sheet as we, SheetContent as be, SheetHeader as Ne, SheetTitle as ke } from "../sheet/index.mjs";
14
15
  import { TimePicker as Z } from "../time-picker/index.mjs";
15
- import { Typography as w } from "../typography/index.mjs";
16
- import { Switch as ke } from "../switch/index.mjs";
16
+ import { Typography as b } from "../typography/index.mjs";
17
+ import { Switch as De } from "../switch/index.mjs";
17
18
  import { Select as ee } from "../select/index.mjs";
18
19
  import { NumberInput as te } from "../number-input/index.mjs";
19
- import { useFullCalendar as De } from "./calendar-context.mjs";
20
- const b = 380, Ce = (s, i) => {
20
+ import { useFullCalendar as Ce } from "./calendar-context.mjs";
21
+ const N = 380, Oe = (s, i) => {
21
22
  const o = s.frequency, a = s.interval;
22
23
  let d = "";
23
24
  if (a > 1 ? d = `Every ${a} ${o === "daily" ? "days" : o === "weekly" ? "weeks" : o === "monthly" ? "months" : "years"}` : d = o === "daily" ? "Daily" : o === "weekly" ? "Weekly" : o === "monthly" ? "Monthly" : "Annually", o === "weekly" && s.daysOfWeek && s.daysOfWeek.length > 0) {
24
- const N = [
25
+ const k = [
25
26
  "Sunday",
26
27
  "Monday",
27
28
  "Tuesday",
@@ -30,7 +31,7 @@ const b = 380, Ce = (s, i) => {
30
31
  "Friday",
31
32
  "Saturday"
32
33
  ];
33
- s.daysOfWeek.length === 7 ? d = a > 1 ? `Every ${a} weeks on all days` : "Every day" : s.daysOfWeek.length === 5 && [1, 2, 3, 4, 5].every((y) => s.daysOfWeek.includes(y)) ? d = a > 1 ? `Every ${a} weeks on weekdays` : "Every weekday (Monday to Friday)" : d += ` on ${s.daysOfWeek.map((y) => N[y]).join(", ")}`;
34
+ s.daysOfWeek.length === 7 ? d = a > 1 ? `Every ${a} weeks on all days` : "Every day" : s.daysOfWeek.length === 5 && [1, 2, 3, 4, 5].every((y) => s.daysOfWeek.includes(y)) ? d = a > 1 ? `Every ${a} weeks on weekdays` : "Every weekday (Monday to Friday)" : d += ` on ${s.daysOfWeek.map((y) => k[y]).join(", ")}`;
34
35
  } else o === "monthly" ? d += ` on day ${i.getDate()}` : o === "yearly" && (d += ` on ${W(i, "MMM d")}`);
35
36
  return s.endType === "on_date" && s.until ? d += `, until ${W(s.until, "MMM d, yyyy")}` : s.endType === "after_occurrences" && s.count && (d += `, for ${s.count} occurrences`), d;
36
37
  }, A = ({
@@ -53,7 +54,7 @@ const b = 380, Ce = (s, i) => {
53
54
  /* @__PURE__ */ t(
54
55
  "div",
55
56
  {
56
- className: H(
57
+ className: X(
57
58
  "w-5 h-5 rounded-full border-2 transition-colors",
58
59
  s ? "border-primary" : "border-outline-variant hover:border-on-surface-variant"
59
60
  )
@@ -62,7 +63,7 @@ const b = 380, Ce = (s, i) => {
62
63
  /* @__PURE__ */ t(
63
64
  "div",
64
65
  {
65
- className: H(
66
+ className: X(
66
67
  "absolute w-2.5 h-2.5 rounded-full bg-primary transition-transform duration-200",
67
68
  s ? "scale-100" : "scale-0"
68
69
  )
@@ -72,22 +73,22 @@ const b = 380, Ce = (s, i) => {
72
73
  /* @__PURE__ */ t("span", { className: "text-sm font-medium text-on-surface select-none", children: o })
73
74
  ] }),
74
75
  a && /* @__PURE__ */ t("div", { className: "flex-1 flex items-center", children: a })
75
- ] }), Be = () => {
76
- const s = De(), {
76
+ ] }), Xe = () => {
77
+ const s = Ce(), {
77
78
  popover: i,
78
79
  closePopover: o,
79
80
  draftEvent: a,
80
81
  setDraftEvent: d,
81
- onEventCreate: N,
82
+ onEventCreate: k,
82
83
  onEventUpdate: y,
83
- onEventDelete: q,
84
+ onEventDelete: H,
84
85
  hidePopoverTitle: ae,
85
86
  hidePopoverTime: ne,
86
87
  hidePopoverRecurrence: re,
87
- renderPopoverHeader: Y,
88
- renderPopoverFooter: j,
88
+ renderPopoverHeader: q,
89
+ renderPopoverFooter: Y,
89
90
  renderPopoverCustomFields: V
90
- } = s, v = me("(max-width: 768px)"), E = ve(null), _ = fe(), k = L(0), D = L(0), [ie, C] = O(!1), [g, le] = O(450), [c, m] = O({
91
+ } = s, v = ue("(max-width: 768px)"), E = ve(null), _ = fe(), D = L(0), C = L(0), [ie, O] = M(!1), [g, le] = M(450), [c, u] = M({
91
92
  frequency: "weekly",
92
93
  interval: 1,
93
94
  daysOfWeek: [],
@@ -108,18 +109,18 @@ const b = 380, Ce = (s, i) => {
108
109
  const n = window.innerWidth, l = window.innerHeight;
109
110
  if (i.anchorRect) {
110
111
  let p = i.anchorRect.right + 16, f = i.anchorRect.top;
111
- p + b > n && (p = i.anchorRect.left - b - 16), f + g > l && (f = l - g - 16), p = Math.max(
112
+ p + N > n && (p = i.anchorRect.left - N - 16), f + g > l && (f = l - g - 16), p = Math.max(
112
113
  16,
113
- Math.min(p, n - b - 16)
114
+ Math.min(p, n - N - 16)
114
115
  ), f = Math.max(
115
116
  16,
116
117
  Math.min(f, l - g - 16)
117
- ), k.set(p), D.set(f);
118
+ ), D.set(p), C.set(f);
118
119
  } else
119
- k.set(n / 2 - b / 2), D.set(l / 2 - g / 2);
120
+ D.set(n / 2 - N / 2), C.set(l / 2 - g / 2);
120
121
  }
121
- }, [i.isOpen, i.anchorRect, v, g, k, D]);
122
- const [se, oe] = O(1), $ = async () => {
122
+ }, [i.isOpen, i.anchorRect, v, g, D, C]);
123
+ const [se, oe] = M(1), $ = async () => {
123
124
  if (!a) return;
124
125
  const e = new Date(a.start);
125
126
  a.isAllDay ? e.setHours(0, 0, 0, 0) : e.setHours(
@@ -141,10 +142,10 @@ const b = 380, Ce = (s, i) => {
141
142
  end: n,
142
143
  title: a.title || "(No title)"
143
144
  };
144
- delete l.isDraft, i.mode === "create" && N ? await N(l) : i.mode === "edit" && y && await y(l), o();
145
- }, I = async () => {
146
- a?.id && q && await q(a.id), o();
147
- }, u = (e) => {
145
+ delete l.isDraft, i.mode === "create" && k ? await k(l) : i.mode === "edit" && y && await y(l), o();
146
+ }, j = async () => {
147
+ a?.id && H && await H(a.id), o();
148
+ }, m = (e) => {
148
149
  d((n) => n ? { ...n, ...e } : null);
149
150
  }, T = (e) => {
150
151
  d((n) => {
@@ -174,12 +175,12 @@ const b = 380, Ce = (s, i) => {
174
175
  const e = a.recurrence;
175
176
  e.interval === 1 && e.endType === "never" && (e.frequency === "daily" ? h = "daily" : e.frequency === "weekly" && e.daysOfWeek?.length === 1 && e.daysOfWeek[0] === a.start.getDay() ? h = "weekly" : e.frequency === "weekly" && e.daysOfWeek?.length === 5 && [1, 2, 3, 4, 5].every((n) => e.daysOfWeek.includes(n)) ? h = "weekdays" : e.frequency === "monthly" ? h = "monthly" : e.frequency === "yearly" && (h = "yearly")), h === "none" && (h = "custom_active", F.push({
176
177
  value: "custom_active",
177
- label: Ce(e, a.start)
178
+ label: Oe(e, a.start)
178
179
  }));
179
180
  }
180
181
  F.push({ value: "custom", label: "Custom..." });
181
182
  const ce = (e) => {
182
- e === "none" ? u({ recurrence: void 0 }) : e === "custom" ? (m(
183
+ e === "none" ? m({ recurrence: void 0 }) : e === "custom" ? (u(
183
184
  a?.recurrence || {
184
185
  frequency: "weekly",
185
186
  interval: 1,
@@ -188,14 +189,14 @@ const b = 380, Ce = (s, i) => {
188
189
  count: 13,
189
190
  until: new Date(Date.now() + 720 * 60 * 60 * 1e3)
190
191
  }
191
- ), C(!0)) : e === "weekdays" ? u({
192
+ ), O(!0)) : e === "weekdays" ? m({
192
193
  recurrence: {
193
194
  frequency: "weekly",
194
195
  interval: 1,
195
196
  endType: "never",
196
197
  daysOfWeek: [1, 2, 3, 4, 5]
197
198
  }
198
- }) : e !== "custom_active" && u({
199
+ }) : e !== "custom_active" && m({
199
200
  recurrence: {
200
201
  frequency: e,
201
202
  interval: 1,
@@ -206,14 +207,14 @@ const b = 380, Ce = (s, i) => {
206
207
  };
207
208
  if (!a) return null;
208
209
  const B = /* @__PURE__ */ r("div", { className: "flex flex-col gap-6 p-6 font-manrope text-on-surface min-w-[340px]", children: [
209
- Y && /* @__PURE__ */ t("div", { className: "flex flex-col gap-4", children: Y(a, T) }),
210
+ q && /* @__PURE__ */ t("div", { className: "flex flex-col gap-4", children: q(a, T) }),
210
211
  !ae && /* @__PURE__ */ t("div", { className: "pl-10 pr-2", children: /* @__PURE__ */ t(
211
- ge,
212
+ xe,
212
213
  {
213
214
  variant: "underlined",
214
215
  placeholder: "Add title",
215
216
  value: a.title,
216
- onChange: (e) => u({ title: e.target.value }),
217
+ onChange: (e) => m({ title: e.target.value }),
217
218
  autoFocus: !0,
218
219
  className: "shadow-none px-0",
219
220
  classNames: {
@@ -251,7 +252,7 @@ const b = 380, Ce = (s, i) => {
251
252
  e.getFullYear(),
252
253
  e.getMonth(),
253
254
  e.getDate()
254
- ), u({ start: n, end: l });
255
+ ), m({ start: n, end: l });
255
256
  }
256
257
  }
257
258
  ),
@@ -272,13 +273,13 @@ const b = 380, Ce = (s, i) => {
272
273
  e.getFullYear(),
273
274
  e.getMonth(),
274
275
  e.getDate()
275
- ), u({ end: n }), a.start > n) {
276
+ ), m({ end: n }), a.start > n) {
276
277
  const l = new Date(a.start);
277
278
  l.setFullYear(
278
279
  e.getFullYear(),
279
280
  e.getMonth(),
280
281
  e.getDate()
281
- ), u({ start: l });
282
+ ), m({ start: l });
282
283
  }
283
284
  }
284
285
  }
@@ -287,21 +288,21 @@ const b = 380, Ce = (s, i) => {
287
288
  ] }),
288
289
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2 mt-1 w-fit", children: [
289
290
  /* @__PURE__ */ t(
290
- ke,
291
+ De,
291
292
  {
292
293
  id: "all-day-switch",
293
294
  size: "sm",
294
295
  checked: !!a.isAllDay,
295
296
  onCheckedChange: (e) => {
296
297
  if (e)
297
- u({ isAllDay: e });
298
+ m({ isAllDay: e });
298
299
  else {
299
300
  const n = new Date(a.end);
300
301
  n.setFullYear(
301
302
  a.start.getFullYear(),
302
303
  a.start.getMonth(),
303
304
  a.start.getDate()
304
- ), u({ isAllDay: e, end: n });
305
+ ), m({ isAllDay: e, end: n });
305
306
  }
306
307
  }
307
308
  }
@@ -324,7 +325,7 @@ const b = 380, Ce = (s, i) => {
324
325
  size: "sm",
325
326
  shape: "full",
326
327
  value: a.start,
327
- onChange: (e) => u({ start: e })
328
+ onChange: (e) => m({ start: e })
328
329
  }
329
330
  ),
330
331
  /* @__PURE__ */ t("span", { className: "text-on-surface-variant shrink-0", children: "-" }),
@@ -336,7 +337,7 @@ const b = 380, Ce = (s, i) => {
336
337
  size: "sm",
337
338
  shape: "full",
338
339
  value: a.end,
339
- onChange: (e) => u({ end: e })
340
+ onChange: (e) => m({ end: e })
340
341
  }
341
342
  )
342
343
  ] })
@@ -357,8 +358,8 @@ const b = 380, Ce = (s, i) => {
357
358
  ) })
358
359
  ] }),
359
360
  V && /* @__PURE__ */ t("div", { className: "mt-2 border-t border-outline-variant/30 pt-4 flex flex-col gap-4", children: V(a, T) }),
360
- j && /* @__PURE__ */ t("div", { className: "mt-2 border-t border-outline-variant/30 pt-4 flex flex-col gap-4", children: j(a, T) })
361
- ] }), X = /* @__PURE__ */ t(Q, { children: ie && /* @__PURE__ */ r("div", { className: "fixed inset-0 z-[100] flex items-center justify-center px-4 pointer-events-auto", children: [
361
+ Y && /* @__PURE__ */ t("div", { className: "mt-2 border-t border-outline-variant/30 pt-4 flex flex-col gap-4", children: Y(a, T) })
362
+ ] }), I = /* @__PURE__ */ t(Q, { children: ie && /* @__PURE__ */ r("div", { className: "fixed inset-0 z-[100] flex items-center justify-center px-4 pointer-events-auto", children: [
362
363
  /* @__PURE__ */ t(
363
364
  S.div,
364
365
  {
@@ -367,7 +368,7 @@ const b = 380, Ce = (s, i) => {
367
368
  exit: { opacity: 0 },
368
369
  transition: { duration: 0.2 },
369
370
  className: "absolute inset-0 bg-black/50",
370
- onClick: () => C(!1)
371
+ onClick: () => O(!1)
371
372
  }
372
373
  ),
373
374
  /* @__PURE__ */ r(
@@ -379,10 +380,10 @@ const b = 380, Ce = (s, i) => {
379
380
  transition: { duration: 0.2 },
380
381
  className: "relative bg-surface-container-high rounded-3xl shadow-2xl p-6 w-full max-w-[420px] flex flex-col gap-6",
381
382
  children: [
382
- /* @__PURE__ */ t(w, { variant: "title-medium", className: "font-bold", children: "Custom recurrence" }),
383
+ /* @__PURE__ */ t(b, { variant: "title-medium", className: "font-bold", children: "Custom recurrence" }),
383
384
  /* @__PURE__ */ r("div", { className: "flex items-center gap-3", children: [
384
385
  /* @__PURE__ */ t(
385
- w,
386
+ b,
386
387
  {
387
388
  variant: "body-medium",
388
389
  className: "shrink-0 w-24 font-medium",
@@ -395,7 +396,7 @@ const b = 380, Ce = (s, i) => {
395
396
  size: "sm",
396
397
  variant: "filled",
397
398
  value: c.interval,
398
- onValueChange: (e) => m((n) => ({ ...n, interval: Number(e) })),
399
+ onValueChange: (e) => u((n) => ({ ...n, interval: Number(e) })),
399
400
  min: 1,
400
401
  classNames: {
401
402
  inputWrapper: "h-10 min-h-[40px] px-2",
@@ -409,7 +410,7 @@ const b = 380, Ce = (s, i) => {
409
410
  size: "sm",
410
411
  variant: "filled",
411
412
  value: c.frequency,
412
- onValueChange: (e) => m((n) => ({ ...n, frequency: e })),
413
+ onValueChange: (e) => u((n) => ({ ...n, frequency: e })),
413
414
  items: [
414
415
  {
415
416
  value: "daily",
@@ -433,39 +434,38 @@ const b = 380, Ce = (s, i) => {
433
434
  ) })
434
435
  ] }),
435
436
  c.frequency === "weekly" && /* @__PURE__ */ r("div", { className: "flex flex-col gap-2 mt-2", children: [
436
- /* @__PURE__ */ t(w, { variant: "body-medium", className: "font-medium", children: "Repeat on" }),
437
- /* @__PURE__ */ t("div", { className: "flex justify-between gap-1 mt-1", children: ["S", "M", "T", "W", "T", "F", "S"].map((e, n) => {
437
+ /* @__PURE__ */ t(b, { variant: "body-medium", className: "font-medium", children: "Repeat on" }),
438
+ /* @__PURE__ */ t("div", { className: "flex justify-between mt-1 w-full", children: /* @__PURE__ */ t(ge, { shape: "full", gap: "xs", className: "w-full flex", children: ["S", "M", "T", "W", "T", "F", "S"].map((e, n) => {
438
439
  const l = c.daysOfWeek?.includes(n);
439
440
  return /* @__PURE__ */ t(
440
- "button",
441
+ x,
441
442
  {
443
+ variant: l ? "primary" : "secondary",
444
+ isActive: l,
442
445
  onClick: () => {
443
- m((p) => {
444
- const f = p.daysOfWeek || [], G = f.includes(n) ? f.filter((ue) => ue !== n) : [...f, n];
446
+ u((p) => {
447
+ const f = p.daysOfWeek || [], G = f.includes(n) ? f.filter((me) => me !== n) : [...f, n];
445
448
  return {
446
449
  ...p,
447
450
  daysOfWeek: G.length ? G : [n]
448
451
  };
449
452
  });
450
453
  },
451
- className: H(
452
- "w-9 h-9 rounded-full flex items-center justify-center text-sm font-semibold transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary",
453
- l ? "bg-primary text-on-primary" : "bg-surface-container-highest text-on-surface hover:bg-surface-container-highest/80"
454
- ),
454
+ className: "flex-1 !px-0 min-w-0",
455
455
  children: e
456
456
  },
457
457
  n
458
458
  );
459
- }) })
459
+ }) }) })
460
460
  ] }),
461
461
  /* @__PURE__ */ r("div", { className: "flex flex-col gap-3 mt-2", children: [
462
- /* @__PURE__ */ t(w, { variant: "body-medium", className: "font-medium mb-1", children: "Ends" }),
462
+ /* @__PURE__ */ t(b, { variant: "body-medium", className: "font-medium mb-1", children: "Ends" }),
463
463
  /* @__PURE__ */ r("div", { className: "flex flex-col gap-4", children: [
464
464
  /* @__PURE__ */ t(
465
465
  A,
466
466
  {
467
467
  checked: c.endType === "never",
468
- onChange: () => m((e) => ({ ...e, endType: "never" })),
468
+ onChange: () => u((e) => ({ ...e, endType: "never" })),
469
469
  label: "Never"
470
470
  }
471
471
  ),
@@ -473,7 +473,7 @@ const b = 380, Ce = (s, i) => {
473
473
  A,
474
474
  {
475
475
  checked: c.endType === "on_date",
476
- onChange: () => m((e) => ({ ...e, endType: "on_date" })),
476
+ onChange: () => u((e) => ({ ...e, endType: "on_date" })),
477
477
  label: "On",
478
478
  children: /* @__PURE__ */ t("div", { className: "w-[180px]", children: /* @__PURE__ */ t(
479
479
  z,
@@ -483,7 +483,7 @@ const b = 380, Ce = (s, i) => {
483
483
  size: "sm",
484
484
  disabled: c.endType !== "on_date",
485
485
  value: c.until,
486
- onChange: (e) => e && m((n) => ({ ...n, until: e })),
486
+ onChange: (e) => e && u((n) => ({ ...n, until: e })),
487
487
  classNames: { inputWrapper: "h-10 min-h-[40px]" }
488
488
  }
489
489
  ) })
@@ -493,7 +493,7 @@ const b = 380, Ce = (s, i) => {
493
493
  A,
494
494
  {
495
495
  checked: c.endType === "after_occurrences",
496
- onChange: () => m((e) => ({
496
+ onChange: () => u((e) => ({
497
497
  ...e,
498
498
  endType: "after_occurrences"
499
499
  })),
@@ -506,7 +506,7 @@ const b = 380, Ce = (s, i) => {
506
506
  size: "sm",
507
507
  disabled: c.endType !== "after_occurrences",
508
508
  value: c.count,
509
- onValueChange: (e) => m((n) => ({ ...n, count: Number(e) })),
509
+ onValueChange: (e) => u((n) => ({ ...n, count: Number(e) })),
510
510
  min: 1,
511
511
  classNames: {
512
512
  inputWrapper: "h-10 min-h-[40px] px-2",
@@ -515,7 +515,7 @@ const b = 380, Ce = (s, i) => {
515
515
  }
516
516
  ),
517
517
  /* @__PURE__ */ t(
518
- w,
518
+ b,
519
519
  {
520
520
  variant: "body-medium",
521
521
  className: "whitespace-nowrap opacity-80 font-normal",
@@ -529,19 +529,19 @@ const b = 380, Ce = (s, i) => {
529
529
  ] }),
530
530
  /* @__PURE__ */ r("div", { className: "flex justify-end gap-2 pt-4", children: [
531
531
  /* @__PURE__ */ t(
532
- M,
532
+ x,
533
533
  {
534
534
  variant: "ghost",
535
- onClick: () => C(!1),
535
+ onClick: () => O(!1),
536
536
  children: "Cancel"
537
537
  }
538
538
  ),
539
539
  /* @__PURE__ */ t(
540
- M,
540
+ x,
541
541
  {
542
542
  variant: "primary",
543
543
  onClick: () => {
544
- u({ recurrence: c }), C(!1);
544
+ m({ recurrence: c }), O(!1);
545
545
  },
546
546
  children: "Done"
547
547
  }
@@ -555,7 +555,7 @@ const b = 380, Ce = (s, i) => {
555
555
  if (v)
556
556
  return /* @__PURE__ */ r(R, { children: [
557
557
  /* @__PURE__ */ t(
558
- xe,
558
+ we,
559
559
  {
560
560
  open: i.isOpen,
561
561
  onOpenChange: (e) => !e && o(),
@@ -563,18 +563,18 @@ const b = 380, Ce = (s, i) => {
563
563
  snapPoints: [0.6, 1],
564
564
  activeSnapPoint: se,
565
565
  setActiveSnapPoint: oe,
566
- children: /* @__PURE__ */ r(we, { className: "p-0 flex flex-col overflow-hidden h-full", children: [
567
- /* @__PURE__ */ r(be, { className: "px-4 py-2 border-b border-outline-variant/20 shrink-0 flex-row justify-between items-center !space-y-0", children: [
566
+ children: /* @__PURE__ */ r(be, { className: "p-0 flex flex-col overflow-hidden h-full", children: [
567
+ /* @__PURE__ */ r(Ne, { className: "px-4 py-2 border-b border-outline-variant/20 shrink-0 flex-row justify-between items-center !space-y-0", children: [
568
568
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
569
- /* @__PURE__ */ t(x, { variant: "ghost", onClick: o, children: /* @__PURE__ */ t(U, { className: "w-5 h-5" }) }),
570
- /* @__PURE__ */ t(Ne, { className: "text-base font-semibold m-0", children: i.mode === "create" ? "New Event" : "Edit Event" })
569
+ /* @__PURE__ */ t(w, { variant: "ghost", onClick: o, children: /* @__PURE__ */ t(U, { className: "w-5 h-5" }) }),
570
+ /* @__PURE__ */ t(ke, { className: "text-base font-semibold m-0", children: i.mode === "create" ? "New Event" : "Edit Event" })
571
571
  ] }),
572
572
  i.mode === "edit" && /* @__PURE__ */ t(
573
- x,
573
+ w,
574
574
  {
575
575
  variant: "ghost",
576
576
  size: "sm",
577
- onClick: I,
577
+ onClick: j,
578
578
  className: "text-error hover:bg-error/10 hover:text-error",
579
579
  children: /* @__PURE__ */ t(J, { className: "w-5 h-5" })
580
580
  }
@@ -582,7 +582,7 @@ const b = 380, Ce = (s, i) => {
582
582
  ] }),
583
583
  /* @__PURE__ */ t("div", { className: "flex-1 overflow-y-auto no-scrollbar", children: B }),
584
584
  /* @__PURE__ */ t("div", { className: "p-3 border-t border-outline-variant/20 bg-surface-container shrink-0 flex justify-end items-center pb-safe", children: /* @__PURE__ */ t(
585
- M,
585
+ x,
586
586
  {
587
587
  variant: "primary",
588
588
  onClick: $,
@@ -593,7 +593,7 @@ const b = 380, Ce = (s, i) => {
593
593
  ] })
594
594
  }
595
595
  ),
596
- typeof document < "u" && P(X, document.body)
596
+ typeof document < "u" && P(I, document.body)
597
597
  ] });
598
598
  const de = /* @__PURE__ */ t("div", { className: "fixed inset-0 pointer-events-none z-[50]", children: /* @__PURE__ */ t(Q, { children: i.isOpen && /* @__PURE__ */ r(
599
599
  S.div,
@@ -604,10 +604,10 @@ const b = 380, Ce = (s, i) => {
604
604
  dragControls: _,
605
605
  dragListener: !1,
606
606
  style: {
607
- x: k,
608
- y: D,
607
+ x: D,
608
+ y: C,
609
609
  width: "auto",
610
- minWidth: b,
610
+ minWidth: N,
611
611
  maxWidth: "calc(100vw - 32px)"
612
612
  },
613
613
  initial: { opacity: 0, scale: 0.95 },
@@ -625,7 +625,7 @@ const b = 380, Ce = (s, i) => {
625
625
  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",
626
626
  children: [
627
627
  /* @__PURE__ */ t(
628
- x,
628
+ w,
629
629
  {
630
630
  variant: "ghost",
631
631
  size: "sm",
@@ -635,17 +635,17 @@ const b = 380, Ce = (s, i) => {
635
635
  ),
636
636
  /* @__PURE__ */ r("div", { className: "flex items-center gap-1", children: [
637
637
  i.mode === "edit" && a && /* @__PURE__ */ t(
638
- x,
638
+ w,
639
639
  {
640
640
  variant: "ghost",
641
641
  size: "sm",
642
- onClick: I,
642
+ onClick: j,
643
643
  className: "text-error hover:bg-error/10 hover:text-error cursor-pointer pointer-events-auto",
644
644
  children: /* @__PURE__ */ t(J, { className: "w-4 h-4" })
645
645
  }
646
646
  ),
647
647
  /* @__PURE__ */ t(
648
- x,
648
+ w,
649
649
  {
650
650
  variant: "ghost",
651
651
  size: "sm",
@@ -660,7 +660,7 @@ const b = 380, Ce = (s, i) => {
660
660
  ),
661
661
  /* @__PURE__ */ t("div", { className: "flex-1 max-h-[80vh] overflow-y-auto scrollbar-thin overflow-x-hidden min-h-0", children: B }),
662
662
  /* @__PURE__ */ t("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__ */ t(
663
- M,
663
+ x,
664
664
  {
665
665
  variant: "primary",
666
666
  onClick: $,
@@ -673,9 +673,9 @@ const b = 380, Ce = (s, i) => {
673
673
  ) }) });
674
674
  return /* @__PURE__ */ r(R, { children: [
675
675
  typeof document < "u" && P(de, document.body),
676
- typeof document < "u" && P(X, document.body)
676
+ typeof document < "u" && P(I, document.body)
677
677
  ] });
678
678
  };
679
679
  export {
680
- Be as EventPopover
680
+ Xe as EventPopover
681
681
  };