@innosolutions/inno-calendar 1.0.64 → 1.0.66

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.
Files changed (51) hide show
  1. package/dist/{agenda-widget-A-xsyqRf.cjs → agenda-widget-BNnhQds1.cjs} +2 -2
  2. package/dist/{agenda-widget-A-xsyqRf.cjs.map → agenda-widget-BNnhQds1.cjs.map} +1 -1
  3. package/dist/{agenda-widget-duVkXi_m.js → agenda-widget-qwbBw3IK.js} +7 -7
  4. package/dist/agenda-widget-qwbBw3IK.js.map +1 -0
  5. package/dist/components/index.cjs +1 -1
  6. package/dist/components/index.mjs +2 -2
  7. package/dist/core/context/inno-calendar-provider.d.ts.map +1 -1
  8. package/dist/core/index.cjs +1 -1
  9. package/dist/core/index.mjs +168 -155
  10. package/dist/core/utils/index.d.ts +1 -0
  11. package/dist/core/utils/index.d.ts.map +1 -1
  12. package/dist/core/utils/view-storage.d.ts +85 -0
  13. package/dist/core/utils/view-storage.d.ts.map +1 -0
  14. package/dist/index.cjs +1 -1
  15. package/dist/index.mjs +215 -202
  16. package/dist/{position-utils-DMVQFywD.js → position-utils-BzmOPdvQ.js} +447 -345
  17. package/dist/position-utils-BzmOPdvQ.js.map +1 -0
  18. package/dist/position-utils-EQTCC4tZ.cjs +2 -0
  19. package/dist/position-utils-EQTCC4tZ.cjs.map +1 -0
  20. package/dist/presets/index.cjs +1 -1
  21. package/dist/presets/index.mjs +1 -1
  22. package/dist/{slot-selection-context-CRstOosL.js → slot-selection-context-CjS_VIPj.js} +162 -163
  23. package/dist/slot-selection-context-CjS_VIPj.js.map +1 -0
  24. package/dist/slot-selection-context-CmE-aWgt.cjs +2 -0
  25. package/dist/slot-selection-context-CmE-aWgt.cjs.map +1 -0
  26. package/dist/{tailwind-calendar-CNhXkxzW.js → tailwind-calendar-B6qsueM3.js} +61 -61
  27. package/dist/{tailwind-calendar-CNhXkxzW.js.map → tailwind-calendar-B6qsueM3.js.map} +1 -1
  28. package/dist/{tailwind-calendar-VRvPJQwa.cjs → tailwind-calendar-KJ1XJ4gr.cjs} +2 -2
  29. package/dist/{tailwind-calendar-VRvPJQwa.cjs.map → tailwind-calendar-KJ1XJ4gr.cjs.map} +1 -1
  30. package/dist/{use-calendar-D8XaVe44.js → use-calendar--JnbGA3L.js} +57 -57
  31. package/dist/{use-calendar-D8XaVe44.js.map → use-calendar--JnbGA3L.js.map} +1 -1
  32. package/dist/{use-calendar-DkT1_V3j.cjs → use-calendar-BwqE_WNA.cjs} +2 -2
  33. package/dist/{use-calendar-DkT1_V3j.cjs.map → use-calendar-BwqE_WNA.cjs.map} +1 -1
  34. package/dist/{use-slot-selection-CWRk_17s.js → use-slot-selection-BLCDzQzo.js} +8 -8
  35. package/dist/{use-slot-selection-CWRk_17s.js.map → use-slot-selection-BLCDzQzo.js.map} +1 -1
  36. package/dist/{use-slot-selection-Dj_tWg1O.cjs → use-slot-selection-C1tk-o0j.cjs} +2 -2
  37. package/dist/{use-slot-selection-Dj_tWg1O.cjs.map → use-slot-selection-C1tk-o0j.cjs.map} +1 -1
  38. package/dist/utils.cjs +1 -1
  39. package/dist/utils.mjs +121 -108
  40. package/dist/{week-view-DY167Wok.js → week-view-B1KsZsC3.js} +3 -3
  41. package/dist/{week-view-DY167Wok.js.map → week-view-B1KsZsC3.js.map} +1 -1
  42. package/dist/{week-view-C1Vu2ErD.cjs → week-view-Dv-Uz0eT.cjs} +2 -2
  43. package/dist/{week-view-C1Vu2ErD.cjs.map → week-view-Dv-Uz0eT.cjs.map} +1 -1
  44. package/package.json +1 -1
  45. package/dist/agenda-widget-duVkXi_m.js.map +0 -1
  46. package/dist/position-utils-BQpbtF6N.cjs +0 -2
  47. package/dist/position-utils-BQpbtF6N.cjs.map +0 -1
  48. package/dist/position-utils-DMVQFywD.js.map +0 -1
  49. package/dist/slot-selection-context-CRstOosL.js.map +0 -1
  50. package/dist/slot-selection-context-DBCZI2Dn.cjs +0 -2
  51. package/dist/slot-selection-context-DBCZI2Dn.cjs.map +0 -1
@@ -1,7 +1,7 @@
1
1
  import { jsxs as T, jsx as n } from "react/jsx-runtime";
2
2
  import { useState as g, useMemo as x, useCallback as r } from "react";
3
- import { C as te, A as ae, M as re, W as se, c as ne } from "./week-view-DY167Wok.js";
4
- import { c as oe, aF as ie, aE as de, aG as ce } from "./position-utils-DMVQFywD.js";
3
+ import { C as te, A as ae, M as re, W as se, c as ne } from "./week-view-B1KsZsC3.js";
4
+ import { d as oe, aM as ie, aL as de, aN as le } from "./position-utils-BzmOPdvQ.js";
5
5
  import { c as De } from "./index-DtaLkIY8.js";
6
6
  const xe = {
7
7
  display: "flex",
@@ -28,15 +28,15 @@ const xe = {
28
28
  color: "var(--ic-text-muted, #6b7280)"
29
29
  };
30
30
  function _e({
31
- events: l,
32
- resources: le,
31
+ events: c,
32
+ resources: ce,
33
33
  scheduleTypes: Q,
34
- initialView: j = "week",
35
- initialDate: A,
34
+ initialView: M = "week",
35
+ initialDate: j,
36
36
  initialFilters: ue,
37
37
  preferences: N,
38
38
  badgeVariant: s = "colored",
39
- hideHeader: M = !1,
39
+ hideHeader: A = !1,
40
40
  availableViews: O = ["day", "week", "month", "agenda"],
41
41
  onEventClick: u,
42
42
  onSlotSelect: t,
@@ -48,7 +48,7 @@ function _e({
48
48
  emptyState: o,
49
49
  children: fe
50
50
  }) {
51
- const [f, k] = g(j), [c, z] = g(A ?? /* @__PURE__ */ new Date()), m = x(
51
+ const [f, k] = g(M), [l, z] = g(j ?? /* @__PURE__ */ new Date()), m = x(
52
52
  () => ({
53
53
  ...oe,
54
54
  ...N
@@ -65,20 +65,20 @@ function _e({
65
65
  },
66
66
  [H]
67
67
  ), W = r(() => {
68
- const a = ie(c, f);
68
+ const a = ie(l, f);
69
69
  h(a);
70
- }, [c, f, h]), _ = r(() => {
71
- const a = de(c, f);
70
+ }, [l, f, h]), _ = r(() => {
71
+ const a = de(l, f);
72
72
  h(a);
73
- }, [c, f, h]), X = r(() => {
74
- const a = ce();
73
+ }, [l, f, h]), X = r(() => {
74
+ const a = le();
75
75
  h(a);
76
76
  }, [h]), i = r(
77
77
  (a) => {
78
78
  h(a), b("day");
79
79
  },
80
80
  [h, b]
81
- ), F = x(
81
+ ), R = x(
82
82
  () => ({
83
83
  startHour: m.startHour,
84
84
  endHour: m.endHour
@@ -90,10 +90,10 @@ function _e({
90
90
  return /* @__PURE__ */ n(
91
91
  ne,
92
92
  {
93
- events: l,
94
- date: c,
93
+ events: c,
94
+ date: l,
95
95
  badgeVariant: s,
96
- visibleHours: F,
96
+ visibleHours: R,
97
97
  slotDuration: m.slotDuration,
98
98
  ...u && { onEventClick: u },
99
99
  ...t && { onSlotSelect: t }
@@ -103,11 +103,11 @@ function _e({
103
103
  return /* @__PURE__ */ n(
104
104
  se,
105
105
  {
106
- events: l,
107
- date: c,
106
+ events: c,
107
+ date: l,
108
108
  badgeVariant: s,
109
109
  weekStartsOn: d,
110
- visibleHours: F,
110
+ visibleHours: R,
111
111
  slotDuration: m.slotDuration,
112
112
  onDayClick: i,
113
113
  ...u && { onEventClick: u },
@@ -118,8 +118,8 @@ function _e({
118
118
  return /* @__PURE__ */ n(
119
119
  re,
120
120
  {
121
- events: l,
122
- date: c,
121
+ events: c,
122
+ date: l,
123
123
  badgeVariant: s,
124
124
  weekStartsOn: d,
125
125
  onDayClick: i,
@@ -131,8 +131,8 @@ function _e({
131
131
  return /* @__PURE__ */ n(
132
132
  ae,
133
133
  {
134
- events: l,
135
- date: c,
134
+ events: c,
135
+ date: l,
136
136
  badgeVariant: s,
137
137
  ...u && { onEventClick: u },
138
138
  ...o && { emptyState: o }
@@ -147,11 +147,11 @@ function _e({
147
147
  }
148
148
  };
149
149
  return /* @__PURE__ */ T("div", { className: I, style: { ...xe, ...P }, children: [
150
- !M && /* @__PURE__ */ n("div", { style: ge, children: /* @__PURE__ */ n(
150
+ !A && /* @__PURE__ */ n("div", { style: ge, children: /* @__PURE__ */ n(
151
151
  te,
152
152
  {
153
153
  view: f,
154
- currentDate: c,
154
+ currentDate: l,
155
155
  availableViews: O,
156
156
  onViewChange: b,
157
157
  onNavigate: (a) => {
@@ -164,16 +164,16 @@ function _e({
164
164
  /* @__PURE__ */ n("div", { style: Ne, children: B() })
165
165
  ] });
166
166
  }
167
- function Fe({
168
- events: l,
169
- resources: le,
167
+ function Re({
168
+ events: c,
169
+ resources: ce,
170
170
  scheduleTypes: Q = [],
171
- initialView: j = "week",
172
- initialDate: A,
171
+ initialView: M = "week",
172
+ initialDate: j,
173
173
  initialFilters: ue,
174
174
  preferences: N,
175
175
  badgeVariant: s = "colored",
176
- hideHeader: M = !1,
176
+ hideHeader: A = !1,
177
177
  showFilterSidebar: O = !1,
178
178
  availableViews: u = ["day", "week", "month", "agenda"],
179
179
  onEventClick: t,
@@ -186,7 +186,7 @@ function Fe({
186
186
  renderEventPopover: fe,
187
187
  renderFilterSidebar: f,
188
188
  renderHeader: k,
189
- settingsContent: c,
189
+ settingsContent: l,
190
190
  filterContent: z,
191
191
  showSettings: m = !0,
192
192
  showTimelineViews: b = !1,
@@ -195,15 +195,15 @@ function Fe({
195
195
  emptyState: _,
196
196
  children: X
197
197
  }) {
198
- const [i, F] = g(j), [d, B] = g(A ?? /* @__PURE__ */ new Date()), [a, Y] = g([]), [U, Z] = g([]), w = x(
198
+ const [i, R] = g(M), [d, B] = g(j ?? /* @__PURE__ */ new Date()), [a, Y] = g([]), [L, Z] = g([]), w = x(
199
199
  () => ({
200
200
  ...oe,
201
201
  ...N
202
202
  }),
203
203
  [N]
204
- ), G = r(
204
+ ), U = r(
205
205
  (e) => {
206
- F(e), H?.(e);
206
+ R(e), H?.(e);
207
207
  },
208
208
  [H]
209
209
  ), D = r(
@@ -211,20 +211,20 @@ function Fe({
211
211
  B(e), I?.(e);
212
212
  },
213
213
  [I]
214
- ), L = r(() => {
214
+ ), q = r(() => {
215
215
  const e = ie(d, i);
216
216
  D(e);
217
- }, [d, i, D]), q = r(() => {
217
+ }, [d, i, D]), G = r(() => {
218
218
  const e = de(d, i);
219
219
  D(e);
220
220
  }, [d, i, D]), J = r(() => {
221
- const e = ce();
221
+ const e = le();
222
222
  D(e);
223
223
  }, [D]), $ = r(
224
224
  (e) => {
225
- D(e), G("day");
225
+ D(e), U("day");
226
226
  },
227
- [D, G]
227
+ [D, U]
228
228
  ), V = x(
229
229
  () => ({
230
230
  startHour: 0,
@@ -240,10 +240,10 @@ function Fe({
240
240
  (e) => {
241
241
  Y(e), v?.({
242
242
  scheduleTypeIds: e,
243
- participantIds: U
243
+ participantIds: L
244
244
  });
245
245
  },
246
- [v, U]
246
+ [v, L]
247
247
  ), ye = r(
248
248
  (e) => {
249
249
  Z(e), v?.({
@@ -252,7 +252,7 @@ function Fe({
252
252
  });
253
253
  },
254
254
  [v, a]
255
- ), R = x(() => {
255
+ ), F = x(() => {
256
256
  if (o)
257
257
  return (e) => o({
258
258
  event: e.event,
@@ -286,7 +286,7 @@ function Fe({
286
286
  return /* @__PURE__ */ n(
287
287
  ne,
288
288
  {
289
- events: l,
289
+ events: c,
290
290
  date: d,
291
291
  badgeVariant: s,
292
292
  visibleHours: V,
@@ -294,14 +294,14 @@ function Fe({
294
294
  slotDuration: w.slotDuration,
295
295
  ...t && { onEventClick: t },
296
296
  ...y && { onSlotSelect: y },
297
- ...R && { renderEvent: R }
297
+ ...F && { renderEvent: F }
298
298
  }
299
299
  );
300
300
  case "week":
301
301
  return /* @__PURE__ */ n(
302
302
  se,
303
303
  {
304
- events: l,
304
+ events: c,
305
305
  date: d,
306
306
  badgeVariant: s,
307
307
  weekStartsOn: K,
@@ -311,14 +311,14 @@ function Fe({
311
311
  onDayClick: $,
312
312
  ...t && { onEventClick: t },
313
313
  ...y && { onSlotSelect: y },
314
- ...R && { renderEvent: R }
314
+ ...F && { renderEvent: F }
315
315
  }
316
316
  );
317
317
  case "month":
318
318
  return /* @__PURE__ */ n(
319
319
  re,
320
320
  {
321
- events: l,
321
+ events: c,
322
322
  date: d,
323
323
  badgeVariant: s,
324
324
  weekStartsOn: K,
@@ -332,7 +332,7 @@ function Fe({
332
332
  return /* @__PURE__ */ n(
333
333
  ae,
334
334
  {
335
- events: l,
335
+ events: c,
336
336
  date: d,
337
337
  badgeVariant: s,
338
338
  ...t && { onEventClick: t },
@@ -349,26 +349,26 @@ function Fe({
349
349
  }
350
350
  }, we = r(
351
351
  (e) => {
352
- e === "prev" ? L() : e === "next" ? q() : J();
352
+ e === "prev" ? q() : e === "next" ? G() : J();
353
353
  },
354
- [L, q, J]
354
+ [q, G, J]
355
355
  ), ee = {
356
356
  view: i,
357
357
  currentDate: d,
358
358
  availableViews: u,
359
- onViewChange: G,
359
+ onViewChange: U,
360
360
  onNavigate: we,
361
- onNavigatePrev: L,
362
- onNavigateNext: q,
361
+ onNavigatePrev: q,
362
+ onNavigateNext: G,
363
363
  onNavigateToday: J,
364
364
  ...P && { onAddEvent: P },
365
365
  ...W && { actions: W },
366
366
  className: "border-b border-gray-200 p-3"
367
367
  }, pe = {
368
368
  ...ee,
369
- events: l,
369
+ events: c,
370
370
  weekStartsOn: K,
371
- settingsContent: c,
371
+ settingsContent: l,
372
372
  filterContent: z,
373
373
  showSettings: m,
374
374
  showTimelineViews: b
@@ -382,19 +382,19 @@ function Fe({
382
382
  O && /* @__PURE__ */ n("div", { className: "w-64 border-r border-gray-200 flex-shrink-0", children: f ? f({
383
383
  scheduleTypes: Q,
384
384
  selectedScheduleTypeIds: a,
385
- selectedParticipantIds: U,
385
+ selectedParticipantIds: L,
386
386
  onScheduleTypeChange: he,
387
387
  onParticipantChange: ye,
388
388
  onClearAll: ve
389
389
  }) : /* @__PURE__ */ n("div", { className: "p-4 text-sm text-gray-500", children: "Filter sidebar not configured" }) }),
390
390
  /* @__PURE__ */ T("div", { className: "flex flex-col flex-1 min-w-0", children: [
391
- !M && (k ? k(ee) : /* @__PURE__ */ n(te, { ...pe })),
391
+ !A && (k ? k(ee) : /* @__PURE__ */ n(te, { ...pe })),
392
392
  /* @__PURE__ */ n("div", { className: "flex-1 overflow-auto", children: me() })
393
393
  ] })
394
394
  ] });
395
395
  }
396
396
  export {
397
397
  _e as D,
398
- Fe as T
398
+ Re as T
399
399
  };
400
- //# sourceMappingURL=tailwind-calendar-CNhXkxzW.js.map
400
+ //# sourceMappingURL=tailwind-calendar-B6qsueM3.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tailwind-calendar-CNhXkxzW.js","sources":["../src/presets/default/default-calendar.tsx","../src/presets/tailwind/tailwind-calendar.tsx"],"sourcesContent":["/**\n * DefaultCalendar - Pre-styled Calendar Preset\n *\n * A fully styled calendar using CSS custom properties for theming.\n * Designed for projects that don't use TailwindCSS but want a complete solution.\n *\n * CSS Custom Properties (override these for theming):\n * - --ic-bg: Background color\n * - --ic-bg-muted: Muted background\n * - --ic-text: Primary text color\n * - --ic-text-muted: Secondary text color\n * - --ic-border: Border color\n * - --ic-primary: Primary/accent color\n * - --ic-primary-foreground: Text on primary background\n * - --ic-radius: Border radius\n *\n * @example\n * ```tsx\n * import { DefaultCalendar } from '@inno/calendar/presets';\n *\n * function MyAgenda() {\n * return (\n * <div style={{ '--ic-primary': '#6366f1' }}>\n * <DefaultCalendar\n * events={myEvents}\n * onEventClick={(event) => console.log('Clicked:', event)}\n * />\n * </div>\n * );\n * }\n * ```\n */\n\nimport { type CSSProperties, type ReactNode, useCallback, useMemo, useState } from 'react';\nimport { CalendarHeader } from '../../components/header/calendar-header';\nimport { AgendaView } from '../../components/views/agenda-view';\nimport { DayView } from '../../components/views/day-view';\nimport { MonthView } from '../../components/views/month-view';\nimport { WeekView } from '../../components/views/week-view';\nimport { DEFAULT_PREFERENCES } from '../../core/constants';\nimport type {\n\tCalendarEvent,\n\tICalendarFilters,\n\tICalendarPreferences,\n\tIResource,\n\tIScheduleType,\n\tISelectionResult,\n\tTBadgeVariant,\n\tTCalendarView,\n} from '../../core/types';\nimport { navigateNext, navigatePrev, navigateToday } from '../../core/utils/grid-utils';\n\n// ============================================================================\n// STYLES (CSS-in-JS for zero-config usage)\n// ============================================================================\n\nconst baseStyles: CSSProperties = {\n\tdisplay: 'flex',\n\tflexDirection: 'column',\n\theight: '100%',\n\tminHeight: '400px',\n\tbackgroundColor: 'var(--ic-bg, #ffffff)',\n\tborder: '1px solid var(--ic-border, #e5e7eb)',\n\tborderRadius: 'var(--ic-radius, 0.5rem)',\n\toverflow: 'hidden',\n\tfontFamily:\n\t\t'var(--ic-font-family, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif)',\n\tfontSize: 'var(--ic-font-size, 0.875rem)',\n\tcolor: 'var(--ic-text, #111827)',\n};\n\nconst headerStyles: CSSProperties = {\n\tborderBottom: '1px solid var(--ic-border, #e5e7eb)',\n};\n\nconst contentStyles: CSSProperties = {\n\tflex: 1,\n\toverflow: 'auto',\n};\n\nconst fallbackViewStyles: CSSProperties = {\n\tdisplay: 'flex',\n\talignItems: 'center',\n\tjustifyContent: 'center',\n\theight: '16rem',\n\tcolor: 'var(--ic-text-muted, #6b7280)',\n};\n\n// ============================================================================\n// TYPES\n// ============================================================================\n\nexport interface DefaultCalendarProps<\n\tTEventData = Record<string, unknown>,\n\tTScheduleTypeData = Record<string, unknown>,\n\tTResourceData = Record<string, unknown>,\n> {\n\t/** Events to display */\n\tevents: CalendarEvent<TEventData>[];\n\t/** Available resources */\n\tresources?: IResource<TResourceData>[];\n\t/** Available schedule types */\n\tscheduleTypes?: IScheduleType<TScheduleTypeData>[];\n\t/** Initial view */\n\tinitialView?: TCalendarView;\n\t/** Initial date */\n\tinitialDate?: Date;\n\t/** Initial filters */\n\tinitialFilters?: ICalendarFilters;\n\t/** Preferences */\n\tpreferences?: Partial<ICalendarPreferences>;\n\t/** Badge variant for events (dot, colored, mixed) */\n\tbadgeVariant?: TBadgeVariant;\n\t/** Hide the header */\n\thideHeader?: boolean;\n\t/** Available views to show in view switcher */\n\tavailableViews?: TCalendarView[];\n\t/** Event click handler */\n\tonEventClick?: (event: CalendarEvent<TEventData>) => void;\n\t/** Slot selection handler */\n\tonSlotSelect?: (selection: ISelectionResult) => void;\n\t/** View change handler */\n\tonViewChange?: (view: TCalendarView) => void;\n\t/** Date change handler */\n\tonDateChange?: (date: Date) => void;\n\t/** Additional CSS class */\n\tclassName?: string;\n\t/** Custom style overrides */\n\tstyle?: CSSProperties;\n\t/** Custom header actions */\n\theaderActions?: ReactNode;\n\t/** Empty state for agenda view */\n\temptyState?: ReactNode;\n\t/** Children (for header slot) */\n\tchildren?: ReactNode;\n}\n\n// ============================================================================\n// COMPONENT\n// ============================================================================\n\nexport function DefaultCalendar<\n\tTEventData = Record<string, unknown>,\n\tTScheduleTypeData = Record<string, unknown>,\n\tTResourceData = Record<string, unknown>,\n>({\n\tevents,\n\tresources: _resources,\n\tscheduleTypes: _scheduleTypes,\n\tinitialView = 'week',\n\tinitialDate,\n\tinitialFilters: _initialFilters,\n\tpreferences: userPreferences,\n\tbadgeVariant = 'colored',\n\thideHeader = false,\n\tavailableViews = ['day', 'week', 'month', 'agenda'],\n\tonEventClick,\n\tonSlotSelect,\n\tonViewChange,\n\tonDateChange,\n\tclassName = '',\n\tstyle,\n\theaderActions,\n\temptyState,\n\tchildren: _children,\n}: DefaultCalendarProps<TEventData, TScheduleTypeData, TResourceData>) {\n\t// ========================================================================\n\t// STATE\n\t// ========================================================================\n\n\tconst [view, setView] = useState<TCalendarView>(initialView);\n\tconst [date, setDate] = useState<Date>(initialDate ?? new Date());\n\n\t// Merge user preferences with defaults\n\tconst preferences: ICalendarPreferences = useMemo(\n\t\t() => ({\n\t\t\t...DEFAULT_PREFERENCES,\n\t\t\t...userPreferences,\n\t\t}),\n\t\t[userPreferences]\n\t);\n\n\t// ========================================================================\n\t// HANDLERS\n\t// ========================================================================\n\n\tconst handleViewChange = useCallback(\n\t\t(newView: TCalendarView) => {\n\t\t\tsetView(newView);\n\t\t\tonViewChange?.(newView);\n\t\t},\n\t\t[onViewChange]\n\t);\n\n\tconst handleDateChange = useCallback(\n\t\t(newDate: Date) => {\n\t\t\tsetDate(newDate);\n\t\t\tonDateChange?.(newDate);\n\t\t},\n\t\t[onDateChange]\n\t);\n\n\tconst handleNavigatePrev = useCallback(() => {\n\t\tconst newDate = navigatePrev(date, view);\n\t\thandleDateChange(newDate);\n\t}, [date, view, handleDateChange]);\n\n\tconst handleNavigateNext = useCallback(() => {\n\t\tconst newDate = navigateNext(date, view);\n\t\thandleDateChange(newDate);\n\t}, [date, view, handleDateChange]);\n\n\tconst handleNavigateToday = useCallback(() => {\n\t\tconst newDate = navigateToday();\n\t\thandleDateChange(newDate);\n\t}, [handleDateChange]);\n\n\tconst handleDayClick = useCallback(\n\t\t(clickedDate: Date) => {\n\t\t\t// Navigate to day view when clicking a day in month view\n\t\t\thandleDateChange(clickedDate);\n\t\t\thandleViewChange('day');\n\t\t},\n\t\t[handleDateChange, handleViewChange]\n\t);\n\n\t// ========================================================================\n\t// VIEW RENDERING\n\t// ========================================================================\n\n\t// Build visible hours from preferences\n\tconst visibleHours = useMemo(\n\t\t() => ({\n\t\t\tstartHour: preferences.startHour,\n\t\t\tendHour: preferences.endHour,\n\t\t}),\n\t\t[preferences.startHour, preferences.endHour]\n\t);\n\n\t// Week starts on (convert from 0-6 to 0 | 1)\n\tconst weekStartsOn: 0 | 1 = preferences.firstDayOfWeek === 0 ? 0 : 1;\n\n\tconst renderView = () => {\n\t\tswitch (view) {\n\t\t\tcase 'day':\n\t\t\t\treturn (\n\t\t\t\t\t<DayView<TEventData>\n\t\t\t\t\t\tevents={events}\n\t\t\t\t\t\tdate={date}\n\t\t\t\t\t\tbadgeVariant={badgeVariant}\n\t\t\t\t\t\tvisibleHours={visibleHours}\n\t\t\t\t\t\tslotDuration={preferences.slotDuration}\n\t\t\t\t\t\t{...(onEventClick && { onEventClick })}\n\t\t\t\t\t\t{...(onSlotSelect && { onSlotSelect })}\n\t\t\t\t\t/>\n\t\t\t\t);\n\n\t\t\tcase 'week':\n\t\t\t\treturn (\n\t\t\t\t\t<WeekView<TEventData>\n\t\t\t\t\t\tevents={events}\n\t\t\t\t\t\tdate={date}\n\t\t\t\t\t\tbadgeVariant={badgeVariant}\n\t\t\t\t\t\tweekStartsOn={weekStartsOn}\n\t\t\t\t\t\tvisibleHours={visibleHours}\n\t\t\t\t\t\tslotDuration={preferences.slotDuration}\n\t\t\t\t\t\tonDayClick={handleDayClick}\n\t\t\t\t\t\t{...(onEventClick && { onEventClick })}\n\t\t\t\t\t\t{...(onSlotSelect && { onSlotSelect })}\n\t\t\t\t\t/>\n\t\t\t\t);\n\n\t\t\tcase 'month':\n\t\t\t\treturn (\n\t\t\t\t\t<MonthView<TEventData>\n\t\t\t\t\t\tevents={events}\n\t\t\t\t\t\tdate={date}\n\t\t\t\t\t\tbadgeVariant={badgeVariant}\n\t\t\t\t\t\tweekStartsOn={weekStartsOn}\n\t\t\t\t\t\tonDayClick={handleDayClick}\n\t\t\t\t\t\t{...(onEventClick && { onEventClick })}\n\t\t\t\t\t\t{...(onSlotSelect && { onSlotSelect })}\n\t\t\t\t\t/>\n\t\t\t\t);\n\n\t\t\tcase 'agenda':\n\t\t\t\treturn (\n\t\t\t\t\t<AgendaView<TEventData>\n\t\t\t\t\t\tevents={events}\n\t\t\t\t\t\tdate={date}\n\t\t\t\t\t\tbadgeVariant={badgeVariant}\n\t\t\t\t\t\t{...(onEventClick && { onEventClick })}\n\t\t\t\t\t\t{...(emptyState && { emptyState })}\n\t\t\t\t\t/>\n\t\t\t\t);\n\n\t\t\tdefault:\n\t\t\t\treturn <div style={fallbackViewStyles}>View &quot;{view}&quot; is not yet implemented</div>;\n\t\t}\n\t};\n\n\t// ========================================================================\n\t// RENDER\n\t// ========================================================================\n\n\treturn (\n\t\t<div className={className} style={{ ...baseStyles, ...style }}>\n\t\t\t{/* Header */}\n\t\t\t{!hideHeader && (\n\t\t\t\t<div style={headerStyles}>\n\t\t\t\t\t<CalendarHeader\n\t\t\t\t\t\tview={view}\n\t\t\t\t\t\tcurrentDate={date}\n\t\t\t\t\t\tavailableViews={availableViews}\n\t\t\t\t\t\tonViewChange={handleViewChange}\n\t\t\t\t\t\tonNavigate={(direction) => {\n\t\t\t\t\t\t\tif (direction === 'prev') handleNavigatePrev();\n\t\t\t\t\t\t\telse if (direction === 'next') handleNavigateNext();\n\t\t\t\t\t\t\telse handleNavigateToday();\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tactions={headerActions}\n\t\t\t\t\t\tclassName=\"p-3\"\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t)}\n\n\t\t\t{/* Calendar View */}\n\t\t\t<div style={contentStyles}>{renderView()}</div>\n\t\t</div>\n\t);\n}\n","/**\n * TailwindCalendar - Tailwind-Optimized Calendar Preset\n *\n * A fully featured, ready-to-use calendar component designed for TailwindCSS projects.\n * Composes all calendar components into a cohesive experience.\n *\n * Features:\n * - Full customization via render props (renderEvent, renderEventPopover, renderFilterSidebar)\n * - All visual components can be replaced while keeping state management\n * - Matches production quality when used with custom components\n *\n * @example\n * ```tsx\n * import { TailwindCalendar } from '@inno/calendar/presets';\n *\n * function MyAgenda() {\n * return (\n * <TailwindCalendar\n * events={myEvents}\n * onEventClick={(event) => console.log('Clicked:', event)}\n * onSlotSelect={(selection) => console.log('Selected:', selection)}\n * // Custom components for production quality\n * renderEvent={(event) => <MyEventCard event={event} />}\n * renderEventPopover={(event, onClose) => <MyEventPopover event={event} onClose={onClose} />}\n * renderFilterSidebar={(props) => <MyFilterSidebar {...props} />}\n * />\n * );\n * }\n * ```\n */\n\nimport { type ReactNode, useCallback, useMemo, useState } from 'react';\nimport { CalendarHeader } from '../../components/header/calendar-header';\nimport { AgendaView } from '../../components/views/agenda-view';\nimport { DayView } from '../../components/views/day-view';\nimport { MonthView } from '../../components/views/month-view';\nimport { WeekView } from '../../components/views/week-view';\nimport { DEFAULT_PREFERENCES } from '../../core/constants';\nimport type {\n\tCalendarEvent,\n\tICalendarFilters,\n\tICalendarPreferences,\n\tIEventPosition,\n\tIResource,\n\tIScheduleType,\n\tISelectionResult,\n\tTBadgeVariant,\n\tTCalendarView,\n} from '../../core/types';\nimport { navigateNext, navigatePrev, navigateToday } from '../../core/utils/grid-utils';\nimport { cn } from '../../lib/utils';\n\n// ============================================================================\n// RENDER PROP TYPES\n// ============================================================================\n\n/**\n * Props for custom event rendering\n */\nexport interface RenderEventProps<TEventData = Record<string, unknown>> {\n\tevent: CalendarEvent<TEventData>;\n\tview: TCalendarView;\n\tvariant: 'full' | 'compact' | 'dot' | 'block';\n\tposition?: IEventPosition;\n\tbadgeVariant: TBadgeVariant;\n\tonClick?: () => void;\n}\n\n/**\n * Props for custom event popover rendering\n */\nexport interface RenderEventPopoverProps<TEventData = Record<string, unknown>> {\n\tevent: CalendarEvent<TEventData>;\n\tonClose: () => void;\n}\n\n/**\n * Props for custom filter sidebar rendering\n */\nexport interface RenderFilterSidebarProps<TScheduleTypeData = Record<string, unknown>> {\n\tscheduleTypes: IScheduleType<TScheduleTypeData>[];\n\tselectedScheduleTypeIds: number[];\n\tonScheduleTypeChange: (ids: number[]) => void;\n\tselectedParticipantIds: string[];\n\tonParticipantChange: (ids: string[]) => void;\n\tonClearAll?: () => void;\n}\n\n/**\n * Props for custom header rendering\n */\nexport interface RenderHeaderProps {\n\tview: TCalendarView;\n\tcurrentDate: Date;\n\tavailableViews: TCalendarView[];\n\tonViewChange: (view: TCalendarView) => void;\n\tonNavigate: (direction: 'prev' | 'next' | 'today') => void;\n\tonNavigatePrev?: () => void;\n\tonNavigateNext?: () => void;\n\tonNavigateToday?: () => void;\n\tonAddEvent?: () => void;\n\tactions?: ReactNode;\n\tclassName?: string;\n}\n\n// ============================================================================\n// COMPONENT PROPS\n// ============================================================================\n\nexport interface TailwindCalendarProps<\n\tTEventData = Record<string, unknown>,\n\tTScheduleTypeData = Record<string, unknown>,\n\tTResourceData = Record<string, unknown>,\n> {\n\t/** Events to display */\n\tevents: CalendarEvent<TEventData>[];\n\t/** Available resources */\n\tresources?: IResource<TResourceData>[];\n\t/** Available schedule types */\n\tscheduleTypes?: IScheduleType<TScheduleTypeData>[];\n\t/** Initial view */\n\tinitialView?: TCalendarView;\n\t/** Initial date */\n\tinitialDate?: Date;\n\t/** Initial filters */\n\tinitialFilters?: ICalendarFilters;\n\t/** Preferences */\n\tpreferences?: Partial<ICalendarPreferences>;\n\t/** Badge variant for events (dot, colored, mixed) */\n\tbadgeVariant?: TBadgeVariant;\n\t/** Hide the header */\n\thideHeader?: boolean;\n\t/** Show filter sidebar */\n\tshowFilterSidebar?: boolean;\n\t/** Available views to show in view switcher */\n\tavailableViews?: TCalendarView[];\n\n\t// ========================================================================\n\t// CALLBACKS\n\t// ========================================================================\n\n\t/** Event click handler */\n\tonEventClick?: (event: CalendarEvent<TEventData>) => void;\n\t/** Slot selection handler */\n\tonSlotSelect?: (selection: ISelectionResult) => void;\n\t/** View change handler */\n\tonViewChange?: (view: TCalendarView) => void;\n\t/** Date change handler */\n\tonDateChange?: (date: Date) => void;\n\t/** Add event handler (for header button) */\n\tonAddEvent?: () => void;\n\t/** Filter change handler */\n\tonFiltersChange?: (filters: ICalendarFilters) => void;\n\n\t// ========================================================================\n\t// RENDER PROPS (for custom components)\n\t// ========================================================================\n\n\t/**\n\t * Custom event renderer\n\t * Use this to inject your own EventCard component\n\t */\n\trenderEvent?: (props: RenderEventProps<TEventData>) => ReactNode;\n\n\t/**\n\t * Custom event popover renderer\n\t * Use this to inject your own EventPopover component\n\t * If not provided, a basic popover is shown\n\t */\n\trenderEventPopover?: (props: RenderEventPopoverProps<TEventData>) => ReactNode;\n\n\t/**\n\t * Custom filter sidebar renderer\n\t * Use this to inject your own CalendarFilterSidebar component\n\t */\n\trenderFilterSidebar?: (props: RenderFilterSidebarProps<TScheduleTypeData>) => ReactNode;\n\n\t/**\n\t * Custom header renderer\n\t * Use this to inject your own CalendarHeader component\n\t */\n\trenderHeader?: (props: RenderHeaderProps) => ReactNode;\n\n\t// ========================================================================\n\t// HEADER SLOTS\n\t// ========================================================================\n\n\t/** Settings popover content (for default header) */\n\tsettingsContent?: ReactNode;\n\t/** Filter row content (for default header) */\n\tfilterContent?: ReactNode;\n\t/** Whether to show the settings button (default: true) */\n\tshowSettings?: boolean;\n\t/** Whether to show timeline view options (default: false) */\n\tshowTimelineViews?: boolean;\n\n\t// ========================================================================\n\t// STYLING\n\t// ========================================================================\n\n\t/** Additional CSS class */\n\tclassName?: string;\n\t/** Custom header actions (shown in default header) */\n\theaderActions?: ReactNode;\n\t/** Empty state for agenda view */\n\temptyState?: ReactNode;\n\t/** Children (for header slot) */\n\tchildren?: ReactNode;\n}\n\n// ============================================================================\n// COMPONENT\n// ============================================================================\n\nexport function TailwindCalendar<\n\tTEventData = Record<string, unknown>,\n\tTScheduleTypeData = Record<string, unknown>,\n\tTResourceData = Record<string, unknown>,\n>({\n\tevents,\n\tresources: _resources,\n\tscheduleTypes = [],\n\tinitialView = 'week',\n\tinitialDate,\n\tinitialFilters: _initialFilters,\n\tpreferences: userPreferences,\n\tbadgeVariant = 'colored',\n\thideHeader = false,\n\tshowFilterSidebar = false,\n\tavailableViews = ['day', 'week', 'month', 'agenda'],\n\tonEventClick,\n\tonSlotSelect,\n\tonViewChange,\n\tonDateChange,\n\tonAddEvent,\n\tonFiltersChange,\n\trenderEvent,\n\trenderEventPopover: _renderEventPopover,\n\trenderFilterSidebar,\n\trenderHeader,\n\tsettingsContent,\n\tfilterContent,\n\tshowSettings = true,\n\tshowTimelineViews = false,\n\tclassName,\n\theaderActions,\n\temptyState,\n\tchildren: _children,\n}: TailwindCalendarProps<TEventData, TScheduleTypeData, TResourceData>) {\n\t// ========================================================================\n\t// STATE\n\t// ========================================================================\n\n\tconst [view, setView] = useState<TCalendarView>(initialView);\n\tconst [date, setDate] = useState<Date>(initialDate ?? new Date());\n\n\t// Filter state (for filter sidebar)\n\tconst [selectedScheduleTypeIds, setSelectedScheduleTypeIds] = useState<number[]>([]);\n\tconst [selectedParticipantIds, setSelectedParticipantIds] = useState<string[]>([]);\n\n\t// Merge user preferences with defaults\n\tconst preferences: ICalendarPreferences = useMemo(\n\t\t() => ({\n\t\t\t...DEFAULT_PREFERENCES,\n\t\t\t...userPreferences,\n\t\t}),\n\t\t[userPreferences]\n\t);\n\n\t// ========================================================================\n\t// HANDLERS\n\t// ========================================================================\n\n\tconst handleViewChange = useCallback(\n\t\t(newView: TCalendarView) => {\n\t\t\tsetView(newView);\n\t\t\tonViewChange?.(newView);\n\t\t},\n\t\t[onViewChange]\n\t);\n\n\tconst handleDateChange = useCallback(\n\t\t(newDate: Date) => {\n\t\t\tsetDate(newDate);\n\t\t\tonDateChange?.(newDate);\n\t\t},\n\t\t[onDateChange]\n\t);\n\n\tconst handleNavigatePrev = useCallback(() => {\n\t\tconst newDate = navigatePrev(date, view);\n\t\thandleDateChange(newDate);\n\t}, [date, view, handleDateChange]);\n\n\tconst handleNavigateNext = useCallback(() => {\n\t\tconst newDate = navigateNext(date, view);\n\t\thandleDateChange(newDate);\n\t}, [date, view, handleDateChange]);\n\n\tconst handleNavigateToday = useCallback(() => {\n\t\tconst newDate = navigateToday();\n\t\thandleDateChange(newDate);\n\t}, [handleDateChange]);\n\n\tconst handleDayClick = useCallback(\n\t\t(clickedDate: Date) => {\n\t\t\t// Navigate to day view when clicking a day in month view\n\t\t\thandleDateChange(clickedDate);\n\t\t\thandleViewChange('day');\n\t\t},\n\t\t[handleDateChange, handleViewChange]\n\t);\n\n\t// ========================================================================\n\t// VIEW RENDERING\n\t// ========================================================================\n\n\t// Visible hours - show all hours (0-24) so users can see the full day\n\t// The working hours determine which slots have striped (disabled) appearance\n\tconst visibleHours = useMemo(\n\t\t() => ({\n\t\t\tstartHour: 0,\n\t\t\tendHour: 24,\n\t\t}),\n\t\t[]\n\t);\n\n\t// Week starts on (convert from 0-6 to 0 | 1)\n\tconst weekStartsOn: 0 | 1 = preferences.firstDayOfWeek === 0 ? 0 : 1;\n\n\t// Build working hours from preferences (for time grid views)\n\t// Working hours determine which slots are clickable and don't have striped pattern\n\t// Non-working hours get diagonal stripes and are disabled\n\tconst workingHours = useMemo(() => {\n\t\tconst hours: Record<number, { enabled: boolean; from: number; to: number }> = {};\n\t\tfor (let i = 0; i <= 6; i++) {\n\t\t\tconst isWeekend = i === 0 || i === 6;\n\t\t\t// Weekdays: use preferences, Weekends: use preferences if showWeekends, otherwise disabled\n\t\t\tif (!isWeekend) {\n\t\t\t\t// Weekdays (Mon-Fri): always have working hours from preferences\n\t\t\t\thours[i] = { enabled: true, from: preferences.startHour, to: preferences.endHour };\n\t\t\t} else if (preferences.showWeekends) {\n\t\t\t\t// Weekends with showWeekends: Saturday half-day (8-12), Sunday disabled\n\t\t\t\tif (i === 6) {\n\t\t\t\t\t// Saturday - half day (matching agenda-v2)\n\t\t\t\t\thours[i] = { enabled: true, from: 8, to: 12 };\n\t\t\t\t} else {\n\t\t\t\t\t// Sunday - disabled\n\t\t\t\t\thours[i] = { enabled: false, from: 0, to: 0 };\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Weekends without showWeekends: both disabled\n\t\t\t\thours[i] = { enabled: false, from: 0, to: 0 };\n\t\t\t}\n\t\t}\n\t\treturn hours;\n\t}, [preferences.startHour, preferences.endHour, preferences.showWeekends]);\n\n\t// Handle filter changes\n\tconst handleScheduleTypeFilterChange = useCallback(\n\t\t(ids: number[]) => {\n\t\t\tsetSelectedScheduleTypeIds(ids);\n\t\t\tonFiltersChange?.({\n\t\t\t\tscheduleTypeIds: ids,\n\t\t\t\tparticipantIds: selectedParticipantIds,\n\t\t\t});\n\t\t},\n\t\t[onFiltersChange, selectedParticipantIds]\n\t);\n\n\tconst handleParticipantFilterChange = useCallback(\n\t\t(ids: string[]) => {\n\t\t\tsetSelectedParticipantIds(ids);\n\t\t\tonFiltersChange?.({\n\t\t\t\tscheduleTypeIds: selectedScheduleTypeIds,\n\t\t\t\tparticipantIds: ids,\n\t\t\t});\n\t\t},\n\t\t[onFiltersChange, selectedScheduleTypeIds]\n\t);\n\n\t// Create render event adapters for different view types\n\t// Each view has a slightly different renderEvent signature\n\n\tconst dayWeekRenderEvent = useMemo(() => {\n\t\tif (!renderEvent) return undefined;\n\t\treturn (props: {\n\t\t\tevent: CalendarEvent<TEventData>;\n\t\t\tposition: { top: number; height: number; left: number; width: number };\n\t\t}) => {\n\t\t\treturn renderEvent({\n\t\t\t\tevent: props.event,\n\t\t\t\tview,\n\t\t\t\tvariant: 'full',\n\t\t\t\tposition: { ...props.position, zIndex: 1 },\n\t\t\t\tbadgeVariant,\n\t\t\t\t...(onEventClick && { onClick: () => onEventClick(props.event) }),\n\t\t\t});\n\t\t};\n\t}, [renderEvent, view, badgeVariant, onEventClick]);\n\n\tconst monthRenderEvent = useMemo(() => {\n\t\tif (!renderEvent) return undefined;\n\t\treturn (props: { event: CalendarEvent<TEventData>; variant: 'compact' }) => {\n\t\t\treturn renderEvent({\n\t\t\t\tevent: props.event,\n\t\t\t\tview: 'month',\n\t\t\t\tvariant: props.variant,\n\t\t\t\tbadgeVariant,\n\t\t\t\t...(onEventClick && { onClick: () => onEventClick(props.event) }),\n\t\t\t});\n\t\t};\n\t}, [renderEvent, badgeVariant, onEventClick]);\n\n\tconst agendaRenderEvent = useMemo(() => {\n\t\tif (!renderEvent) return undefined;\n\t\treturn (props: { event: CalendarEvent<TEventData> }) => {\n\t\t\treturn renderEvent({\n\t\t\t\tevent: props.event,\n\t\t\t\tview: 'agenda',\n\t\t\t\tvariant: 'block',\n\t\t\t\tbadgeVariant,\n\t\t\t\t...(onEventClick && { onClick: () => onEventClick(props.event) }),\n\t\t\t});\n\t\t};\n\t}, [renderEvent, badgeVariant, onEventClick]);\n\n\tconst renderView = () => {\n\t\tswitch (view) {\n\t\t\tcase 'day':\n\t\t\t\treturn (\n\t\t\t\t\t<DayView<TEventData>\n\t\t\t\t\t\tevents={events}\n\t\t\t\t\t\tdate={date}\n\t\t\t\t\t\tbadgeVariant={badgeVariant}\n\t\t\t\t\t\tvisibleHours={visibleHours}\n\t\t\t\t\t\tworkingHours={workingHours}\n\t\t\t\t\t\tslotDuration={preferences.slotDuration}\n\t\t\t\t\t\t{...(onEventClick && { onEventClick })}\n\t\t\t\t\t\t{...(onSlotSelect && { onSlotSelect })}\n\t\t\t\t\t\t{...(dayWeekRenderEvent && { renderEvent: dayWeekRenderEvent })}\n\t\t\t\t\t/>\n\t\t\t\t);\n\n\t\t\tcase 'week':\n\t\t\t\treturn (\n\t\t\t\t\t<WeekView<TEventData>\n\t\t\t\t\t\tevents={events}\n\t\t\t\t\t\tdate={date}\n\t\t\t\t\t\tbadgeVariant={badgeVariant}\n\t\t\t\t\t\tweekStartsOn={weekStartsOn}\n\t\t\t\t\t\tvisibleHours={visibleHours}\n\t\t\t\t\t\tworkingHours={workingHours}\n\t\t\t\t\t\tslotDuration={preferences.slotDuration}\n\t\t\t\t\t\tonDayClick={handleDayClick}\n\t\t\t\t\t\t{...(onEventClick && { onEventClick })}\n\t\t\t\t\t\t{...(onSlotSelect && { onSlotSelect })}\n\t\t\t\t\t\t{...(dayWeekRenderEvent && { renderEvent: dayWeekRenderEvent })}\n\t\t\t\t\t/>\n\t\t\t\t);\n\n\t\t\tcase 'month':\n\t\t\t\treturn (\n\t\t\t\t\t<MonthView<TEventData>\n\t\t\t\t\t\tevents={events}\n\t\t\t\t\t\tdate={date}\n\t\t\t\t\t\tbadgeVariant={badgeVariant}\n\t\t\t\t\t\tweekStartsOn={weekStartsOn}\n\t\t\t\t\t\tonDayClick={handleDayClick}\n\t\t\t\t\t\t{...(onEventClick && { onEventClick })}\n\t\t\t\t\t\t{...(onSlotSelect && { onSlotSelect })}\n\t\t\t\t\t\t{...(monthRenderEvent && { renderEvent: monthRenderEvent })}\n\t\t\t\t\t/>\n\t\t\t\t);\n\n\t\t\tcase 'agenda':\n\t\t\t\treturn (\n\t\t\t\t\t<AgendaView<TEventData>\n\t\t\t\t\t\tevents={events}\n\t\t\t\t\t\tdate={date}\n\t\t\t\t\t\tbadgeVariant={badgeVariant}\n\t\t\t\t\t\t{...(onEventClick && { onEventClick })}\n\t\t\t\t\t\t{...(emptyState && { emptyState })}\n\t\t\t\t\t\t{...(agendaRenderEvent && { renderEvent: agendaRenderEvent })}\n\t\t\t\t\t/>\n\t\t\t\t);\n\n\t\t\tdefault:\n\t\t\t\treturn (\n\t\t\t\t\t<div className=\"flex items-center justify-center h-64 text-gray-500\">\n\t\t\t\t\t\tView &quot;{view}&quot; is not yet implemented\n\t\t\t\t\t</div>\n\t\t\t\t);\n\t\t}\n\t};\n\n\t// ========================================================================\n\t// RENDER\n\t// ========================================================================\n\n\t// Header navigation handler\n\tconst handleNavigate = useCallback(\n\t\t(direction: 'prev' | 'next' | 'today') => {\n\t\t\tif (direction === 'prev') handleNavigatePrev();\n\t\t\telse if (direction === 'next') handleNavigateNext();\n\t\t\telse handleNavigateToday();\n\t\t},\n\t\t[handleNavigatePrev, handleNavigateNext, handleNavigateToday]\n\t);\n\n\t// Default header props (conditionally add optional props)\n\tconst headerProps: RenderHeaderProps = {\n\t\tview,\n\t\tcurrentDate: date,\n\t\tavailableViews,\n\t\tonViewChange: handleViewChange,\n\t\tonNavigate: handleNavigate,\n\t\tonNavigatePrev: handleNavigatePrev,\n\t\tonNavigateNext: handleNavigateNext,\n\t\tonNavigateToday: handleNavigateToday,\n\t\t...(onAddEvent && { onAddEvent }),\n\t\t...(headerActions && { actions: headerActions }),\n\t\tclassName: 'border-b border-gray-200 p-3',\n\t};\n\n\t// Calendar header props (includes events for count display + slots)\n\tconst calendarHeaderProps = {\n\t\t...headerProps,\n\t\tevents,\n\t\tweekStartsOn,\n\t\tsettingsContent,\n\t\tfilterContent,\n\t\tshowSettings,\n\t\tshowTimelineViews,\n\t};\n\n\t// Clear all filters handler\n\tconst handleClearAllFilters = useCallback(() => {\n\t\tsetSelectedScheduleTypeIds([]);\n\t\tsetSelectedParticipantIds([]);\n\t\tonFiltersChange?.({\n\t\t\tscheduleTypeIds: [],\n\t\t\tparticipantIds: [],\n\t\t});\n\t}, [onFiltersChange]);\n\n\treturn (\n\t\t<div className={cn('flex h-full bg-white border border-gray-200 rounded-lg', className)}>\n\t\t\t{/* Filter Sidebar */}\n\t\t\t{showFilterSidebar && (\n\t\t\t\t<div className=\"w-64 border-r border-gray-200 flex-shrink-0\">\n\t\t\t\t\t{renderFilterSidebar ? (\n\t\t\t\t\t\trenderFilterSidebar({\n\t\t\t\t\t\t\tscheduleTypes,\n\t\t\t\t\t\t\tselectedScheduleTypeIds,\n\t\t\t\t\t\t\tselectedParticipantIds,\n\t\t\t\t\t\t\tonScheduleTypeChange: handleScheduleTypeFilterChange,\n\t\t\t\t\t\t\tonParticipantChange: handleParticipantFilterChange,\n\t\t\t\t\t\t\tonClearAll: handleClearAllFilters,\n\t\t\t\t\t\t})\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<div className=\"p-4 text-sm text-gray-500\">Filter sidebar not configured</div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t)}\n\n\t\t\t{/* Main Calendar Area */}\n\t\t\t<div className=\"flex flex-col flex-1 min-w-0\">\n\t\t\t\t{/* Header */}\n\t\t\t\t{!hideHeader &&\n\t\t\t\t\t(renderHeader ? renderHeader(headerProps) : <CalendarHeader {...calendarHeaderProps} />)}\n\n\t\t\t\t{/* Calendar View */}\n\t\t\t\t<div className=\"flex-1 overflow-auto\">{renderView()}</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"],"names":["baseStyles","headerStyles","contentStyles","fallbackViewStyles","DefaultCalendar","events","_resources","_scheduleTypes","initialView","initialDate","_initialFilters","userPreferences","badgeVariant","hideHeader","availableViews","onEventClick","onSlotSelect","onViewChange","onDateChange","className","style","headerActions","emptyState","_children","view","setView","useState","date","setDate","preferences","useMemo","DEFAULT_PREFERENCES","handleViewChange","useCallback","newView","handleDateChange","newDate","handleNavigatePrev","navigatePrev","handleNavigateNext","navigateNext","handleNavigateToday","navigateToday","handleDayClick","clickedDate","visibleHours","weekStartsOn","renderView","jsx","DayView","WeekView","MonthView","AgendaView","jsxs","CalendarHeader","direction","TailwindCalendar","scheduleTypes","showFilterSidebar","onAddEvent","onFiltersChange","renderEvent","_renderEventPopover","renderFilterSidebar","renderHeader","settingsContent","filterContent","showSettings","showTimelineViews","selectedScheduleTypeIds","setSelectedScheduleTypeIds","selectedParticipantIds","setSelectedParticipantIds","workingHours","hours","i","handleScheduleTypeFilterChange","ids","handleParticipantFilterChange","dayWeekRenderEvent","props","monthRenderEvent","agendaRenderEvent","handleNavigate","headerProps","calendarHeaderProps","handleClearAllFilters","cn"],"mappings":";;;;;AAwDA,MAAMA,KAA4B;AAAA,EACjC,SAAS;AAAA,EACT,eAAe;AAAA,EACf,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,iBAAiB;AAAA,EACjB,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,UAAU;AAAA,EACV,YACC;AAAA,EACD,UAAU;AAAA,EACV,OAAO;AACR,GAEMC,KAA8B;AAAA,EACnC,cAAc;AACf,GAEMC,KAA+B;AAAA,EACpC,MAAM;AAAA,EACN,UAAU;AACX,GAEMC,KAAoC;AAAA,EACzC,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,gBAAgB;AAAA,EAChB,QAAQ;AAAA,EACR,OAAO;AACR;AAuDO,SAASC,GAId;AAAA,EACD,QAAAC;AAAA,EACA,WAAWC;AAAA,EACX,eAAeC;AAAA,EACf,aAAAC,IAAc;AAAA,EACd,aAAAC;AAAA,EACA,gBAAgBC;AAAA,EAChB,aAAaC;AAAA,EACb,cAAAC,IAAe;AAAA,EACf,YAAAC,IAAa;AAAA,EACb,gBAAAC,IAAiB,CAAC,OAAO,QAAQ,SAAS,QAAQ;AAAA,EAClD,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,OAAAC;AAAA,EACA,eAAAC;AAAA,EACA,YAAAC;AAAA,EACA,UAAUC;AACX,GAAuE;AAKtE,QAAM,CAACC,GAAMC,CAAO,IAAIC,EAAwBlB,CAA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AeA,EAAaoB,EAAW,IAAI,gBAAApC,EAACM,IAAA,EAAgB,GAAG+B,GAAA,CAAqB;AAAA,MAGtF,gBAAArC,EAAC,OAAA,EAAI,WAAU,wBAAwB,eAAW,CAAE;AAAA,IAAA,EAAA,CACrD;AAAA,EAAA,GACD;AAEF;"}
1
+ {"version":3,"file":"tailwind-calendar-B6qsueM3.js","sources":["../src/presets/default/default-calendar.tsx","../src/presets/tailwind/tailwind-calendar.tsx"],"sourcesContent":["/**\n * DefaultCalendar - Pre-styled Calendar Preset\n *\n * A fully styled calendar using CSS custom properties for theming.\n * Designed for projects that don't use TailwindCSS but want a complete solution.\n *\n * CSS Custom Properties (override these for theming):\n * - --ic-bg: Background color\n * - --ic-bg-muted: Muted background\n * - --ic-text: Primary text color\n * - --ic-text-muted: Secondary text color\n * - --ic-border: Border color\n * - --ic-primary: Primary/accent color\n * - --ic-primary-foreground: Text on primary background\n * - --ic-radius: Border radius\n *\n * @example\n * ```tsx\n * import { DefaultCalendar } from '@inno/calendar/presets';\n *\n * function MyAgenda() {\n * return (\n * <div style={{ '--ic-primary': '#6366f1' }}>\n * <DefaultCalendar\n * events={myEvents}\n * onEventClick={(event) => console.log('Clicked:', event)}\n * />\n * </div>\n * );\n * }\n * ```\n */\n\nimport { type CSSProperties, type ReactNode, useCallback, useMemo, useState } from 'react';\nimport { CalendarHeader } from '../../components/header/calendar-header';\nimport { AgendaView } from '../../components/views/agenda-view';\nimport { DayView } from '../../components/views/day-view';\nimport { MonthView } from '../../components/views/month-view';\nimport { WeekView } from '../../components/views/week-view';\nimport { DEFAULT_PREFERENCES } from '../../core/constants';\nimport type {\n\tCalendarEvent,\n\tICalendarFilters,\n\tICalendarPreferences,\n\tIResource,\n\tIScheduleType,\n\tISelectionResult,\n\tTBadgeVariant,\n\tTCalendarView,\n} from '../../core/types';\nimport { navigateNext, navigatePrev, navigateToday } from '../../core/utils/grid-utils';\n\n// ============================================================================\n// STYLES (CSS-in-JS for zero-config usage)\n// ============================================================================\n\nconst baseStyles: CSSProperties = {\n\tdisplay: 'flex',\n\tflexDirection: 'column',\n\theight: '100%',\n\tminHeight: '400px',\n\tbackgroundColor: 'var(--ic-bg, #ffffff)',\n\tborder: '1px solid var(--ic-border, #e5e7eb)',\n\tborderRadius: 'var(--ic-radius, 0.5rem)',\n\toverflow: 'hidden',\n\tfontFamily:\n\t\t'var(--ic-font-family, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif)',\n\tfontSize: 'var(--ic-font-size, 0.875rem)',\n\tcolor: 'var(--ic-text, #111827)',\n};\n\nconst headerStyles: CSSProperties = {\n\tborderBottom: '1px solid var(--ic-border, #e5e7eb)',\n};\n\nconst contentStyles: CSSProperties = {\n\tflex: 1,\n\toverflow: 'auto',\n};\n\nconst fallbackViewStyles: CSSProperties = {\n\tdisplay: 'flex',\n\talignItems: 'center',\n\tjustifyContent: 'center',\n\theight: '16rem',\n\tcolor: 'var(--ic-text-muted, #6b7280)',\n};\n\n// ============================================================================\n// TYPES\n// ============================================================================\n\nexport interface DefaultCalendarProps<\n\tTEventData = Record<string, unknown>,\n\tTScheduleTypeData = Record<string, unknown>,\n\tTResourceData = Record<string, unknown>,\n> {\n\t/** Events to display */\n\tevents: CalendarEvent<TEventData>[];\n\t/** Available resources */\n\tresources?: IResource<TResourceData>[];\n\t/** Available schedule types */\n\tscheduleTypes?: IScheduleType<TScheduleTypeData>[];\n\t/** Initial view */\n\tinitialView?: TCalendarView;\n\t/** Initial date */\n\tinitialDate?: Date;\n\t/** Initial filters */\n\tinitialFilters?: ICalendarFilters;\n\t/** Preferences */\n\tpreferences?: Partial<ICalendarPreferences>;\n\t/** Badge variant for events (dot, colored, mixed) */\n\tbadgeVariant?: TBadgeVariant;\n\t/** Hide the header */\n\thideHeader?: boolean;\n\t/** Available views to show in view switcher */\n\tavailableViews?: TCalendarView[];\n\t/** Event click handler */\n\tonEventClick?: (event: CalendarEvent<TEventData>) => void;\n\t/** Slot selection handler */\n\tonSlotSelect?: (selection: ISelectionResult) => void;\n\t/** View change handler */\n\tonViewChange?: (view: TCalendarView) => void;\n\t/** Date change handler */\n\tonDateChange?: (date: Date) => void;\n\t/** Additional CSS class */\n\tclassName?: string;\n\t/** Custom style overrides */\n\tstyle?: CSSProperties;\n\t/** Custom header actions */\n\theaderActions?: ReactNode;\n\t/** Empty state for agenda view */\n\temptyState?: ReactNode;\n\t/** Children (for header slot) */\n\tchildren?: ReactNode;\n}\n\n// ============================================================================\n// COMPONENT\n// ============================================================================\n\nexport function DefaultCalendar<\n\tTEventData = Record<string, unknown>,\n\tTScheduleTypeData = Record<string, unknown>,\n\tTResourceData = Record<string, unknown>,\n>({\n\tevents,\n\tresources: _resources,\n\tscheduleTypes: _scheduleTypes,\n\tinitialView = 'week',\n\tinitialDate,\n\tinitialFilters: _initialFilters,\n\tpreferences: userPreferences,\n\tbadgeVariant = 'colored',\n\thideHeader = false,\n\tavailableViews = ['day', 'week', 'month', 'agenda'],\n\tonEventClick,\n\tonSlotSelect,\n\tonViewChange,\n\tonDateChange,\n\tclassName = '',\n\tstyle,\n\theaderActions,\n\temptyState,\n\tchildren: _children,\n}: DefaultCalendarProps<TEventData, TScheduleTypeData, TResourceData>) {\n\t// ========================================================================\n\t// STATE\n\t// ========================================================================\n\n\tconst [view, setView] = useState<TCalendarView>(initialView);\n\tconst [date, setDate] = useState<Date>(initialDate ?? new Date());\n\n\t// Merge user preferences with defaults\n\tconst preferences: ICalendarPreferences = useMemo(\n\t\t() => ({\n\t\t\t...DEFAULT_PREFERENCES,\n\t\t\t...userPreferences,\n\t\t}),\n\t\t[userPreferences]\n\t);\n\n\t// ========================================================================\n\t// HANDLERS\n\t// ========================================================================\n\n\tconst handleViewChange = useCallback(\n\t\t(newView: TCalendarView) => {\n\t\t\tsetView(newView);\n\t\t\tonViewChange?.(newView);\n\t\t},\n\t\t[onViewChange]\n\t);\n\n\tconst handleDateChange = useCallback(\n\t\t(newDate: Date) => {\n\t\t\tsetDate(newDate);\n\t\t\tonDateChange?.(newDate);\n\t\t},\n\t\t[onDateChange]\n\t);\n\n\tconst handleNavigatePrev = useCallback(() => {\n\t\tconst newDate = navigatePrev(date, view);\n\t\thandleDateChange(newDate);\n\t}, [date, view, handleDateChange]);\n\n\tconst handleNavigateNext = useCallback(() => {\n\t\tconst newDate = navigateNext(date, view);\n\t\thandleDateChange(newDate);\n\t}, [date, view, handleDateChange]);\n\n\tconst handleNavigateToday = useCallback(() => {\n\t\tconst newDate = navigateToday();\n\t\thandleDateChange(newDate);\n\t}, [handleDateChange]);\n\n\tconst handleDayClick = useCallback(\n\t\t(clickedDate: Date) => {\n\t\t\t// Navigate to day view when clicking a day in month view\n\t\t\thandleDateChange(clickedDate);\n\t\t\thandleViewChange('day');\n\t\t},\n\t\t[handleDateChange, handleViewChange]\n\t);\n\n\t// ========================================================================\n\t// VIEW RENDERING\n\t// ========================================================================\n\n\t// Build visible hours from preferences\n\tconst visibleHours = useMemo(\n\t\t() => ({\n\t\t\tstartHour: preferences.startHour,\n\t\t\tendHour: preferences.endHour,\n\t\t}),\n\t\t[preferences.startHour, preferences.endHour]\n\t);\n\n\t// Week starts on (convert from 0-6 to 0 | 1)\n\tconst weekStartsOn: 0 | 1 = preferences.firstDayOfWeek === 0 ? 0 : 1;\n\n\tconst renderView = () => {\n\t\tswitch (view) {\n\t\t\tcase 'day':\n\t\t\t\treturn (\n\t\t\t\t\t<DayView<TEventData>\n\t\t\t\t\t\tevents={events}\n\t\t\t\t\t\tdate={date}\n\t\t\t\t\t\tbadgeVariant={badgeVariant}\n\t\t\t\t\t\tvisibleHours={visibleHours}\n\t\t\t\t\t\tslotDuration={preferences.slotDuration}\n\t\t\t\t\t\t{...(onEventClick && { onEventClick })}\n\t\t\t\t\t\t{...(onSlotSelect && { onSlotSelect })}\n\t\t\t\t\t/>\n\t\t\t\t);\n\n\t\t\tcase 'week':\n\t\t\t\treturn (\n\t\t\t\t\t<WeekView<TEventData>\n\t\t\t\t\t\tevents={events}\n\t\t\t\t\t\tdate={date}\n\t\t\t\t\t\tbadgeVariant={badgeVariant}\n\t\t\t\t\t\tweekStartsOn={weekStartsOn}\n\t\t\t\t\t\tvisibleHours={visibleHours}\n\t\t\t\t\t\tslotDuration={preferences.slotDuration}\n\t\t\t\t\t\tonDayClick={handleDayClick}\n\t\t\t\t\t\t{...(onEventClick && { onEventClick })}\n\t\t\t\t\t\t{...(onSlotSelect && { onSlotSelect })}\n\t\t\t\t\t/>\n\t\t\t\t);\n\n\t\t\tcase 'month':\n\t\t\t\treturn (\n\t\t\t\t\t<MonthView<TEventData>\n\t\t\t\t\t\tevents={events}\n\t\t\t\t\t\tdate={date}\n\t\t\t\t\t\tbadgeVariant={badgeVariant}\n\t\t\t\t\t\tweekStartsOn={weekStartsOn}\n\t\t\t\t\t\tonDayClick={handleDayClick}\n\t\t\t\t\t\t{...(onEventClick && { onEventClick })}\n\t\t\t\t\t\t{...(onSlotSelect && { onSlotSelect })}\n\t\t\t\t\t/>\n\t\t\t\t);\n\n\t\t\tcase 'agenda':\n\t\t\t\treturn (\n\t\t\t\t\t<AgendaView<TEventData>\n\t\t\t\t\t\tevents={events}\n\t\t\t\t\t\tdate={date}\n\t\t\t\t\t\tbadgeVariant={badgeVariant}\n\t\t\t\t\t\t{...(onEventClick && { onEventClick })}\n\t\t\t\t\t\t{...(emptyState && { emptyState })}\n\t\t\t\t\t/>\n\t\t\t\t);\n\n\t\t\tdefault:\n\t\t\t\treturn <div style={fallbackViewStyles}>View &quot;{view}&quot; is not yet implemented</div>;\n\t\t}\n\t};\n\n\t// ========================================================================\n\t// RENDER\n\t// ========================================================================\n\n\treturn (\n\t\t<div className={className} style={{ ...baseStyles, ...style }}>\n\t\t\t{/* Header */}\n\t\t\t{!hideHeader && (\n\t\t\t\t<div style={headerStyles}>\n\t\t\t\t\t<CalendarHeader\n\t\t\t\t\t\tview={view}\n\t\t\t\t\t\tcurrentDate={date}\n\t\t\t\t\t\tavailableViews={availableViews}\n\t\t\t\t\t\tonViewChange={handleViewChange}\n\t\t\t\t\t\tonNavigate={(direction) => {\n\t\t\t\t\t\t\tif (direction === 'prev') handleNavigatePrev();\n\t\t\t\t\t\t\telse if (direction === 'next') handleNavigateNext();\n\t\t\t\t\t\t\telse handleNavigateToday();\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tactions={headerActions}\n\t\t\t\t\t\tclassName=\"p-3\"\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t)}\n\n\t\t\t{/* Calendar View */}\n\t\t\t<div style={contentStyles}>{renderView()}</div>\n\t\t</div>\n\t);\n}\n","/**\n * TailwindCalendar - Tailwind-Optimized Calendar Preset\n *\n * A fully featured, ready-to-use calendar component designed for TailwindCSS projects.\n * Composes all calendar components into a cohesive experience.\n *\n * Features:\n * - Full customization via render props (renderEvent, renderEventPopover, renderFilterSidebar)\n * - All visual components can be replaced while keeping state management\n * - Matches production quality when used with custom components\n *\n * @example\n * ```tsx\n * import { TailwindCalendar } from '@inno/calendar/presets';\n *\n * function MyAgenda() {\n * return (\n * <TailwindCalendar\n * events={myEvents}\n * onEventClick={(event) => console.log('Clicked:', event)}\n * onSlotSelect={(selection) => console.log('Selected:', selection)}\n * // Custom components for production quality\n * renderEvent={(event) => <MyEventCard event={event} />}\n * renderEventPopover={(event, onClose) => <MyEventPopover event={event} onClose={onClose} />}\n * renderFilterSidebar={(props) => <MyFilterSidebar {...props} />}\n * />\n * );\n * }\n * ```\n */\n\nimport { type ReactNode, useCallback, useMemo, useState } from 'react';\nimport { CalendarHeader } from '../../components/header/calendar-header';\nimport { AgendaView } from '../../components/views/agenda-view';\nimport { DayView } from '../../components/views/day-view';\nimport { MonthView } from '../../components/views/month-view';\nimport { WeekView } from '../../components/views/week-view';\nimport { DEFAULT_PREFERENCES } from '../../core/constants';\nimport type {\n\tCalendarEvent,\n\tICalendarFilters,\n\tICalendarPreferences,\n\tIEventPosition,\n\tIResource,\n\tIScheduleType,\n\tISelectionResult,\n\tTBadgeVariant,\n\tTCalendarView,\n} from '../../core/types';\nimport { navigateNext, navigatePrev, navigateToday } from '../../core/utils/grid-utils';\nimport { cn } from '../../lib/utils';\n\n// ============================================================================\n// RENDER PROP TYPES\n// ============================================================================\n\n/**\n * Props for custom event rendering\n */\nexport interface RenderEventProps<TEventData = Record<string, unknown>> {\n\tevent: CalendarEvent<TEventData>;\n\tview: TCalendarView;\n\tvariant: 'full' | 'compact' | 'dot' | 'block';\n\tposition?: IEventPosition;\n\tbadgeVariant: TBadgeVariant;\n\tonClick?: () => void;\n}\n\n/**\n * Props for custom event popover rendering\n */\nexport interface RenderEventPopoverProps<TEventData = Record<string, unknown>> {\n\tevent: CalendarEvent<TEventData>;\n\tonClose: () => void;\n}\n\n/**\n * Props for custom filter sidebar rendering\n */\nexport interface RenderFilterSidebarProps<TScheduleTypeData = Record<string, unknown>> {\n\tscheduleTypes: IScheduleType<TScheduleTypeData>[];\n\tselectedScheduleTypeIds: number[];\n\tonScheduleTypeChange: (ids: number[]) => void;\n\tselectedParticipantIds: string[];\n\tonParticipantChange: (ids: string[]) => void;\n\tonClearAll?: () => void;\n}\n\n/**\n * Props for custom header rendering\n */\nexport interface RenderHeaderProps {\n\tview: TCalendarView;\n\tcurrentDate: Date;\n\tavailableViews: TCalendarView[];\n\tonViewChange: (view: TCalendarView) => void;\n\tonNavigate: (direction: 'prev' | 'next' | 'today') => void;\n\tonNavigatePrev?: () => void;\n\tonNavigateNext?: () => void;\n\tonNavigateToday?: () => void;\n\tonAddEvent?: () => void;\n\tactions?: ReactNode;\n\tclassName?: string;\n}\n\n// ============================================================================\n// COMPONENT PROPS\n// ============================================================================\n\nexport interface TailwindCalendarProps<\n\tTEventData = Record<string, unknown>,\n\tTScheduleTypeData = Record<string, unknown>,\n\tTResourceData = Record<string, unknown>,\n> {\n\t/** Events to display */\n\tevents: CalendarEvent<TEventData>[];\n\t/** Available resources */\n\tresources?: IResource<TResourceData>[];\n\t/** Available schedule types */\n\tscheduleTypes?: IScheduleType<TScheduleTypeData>[];\n\t/** Initial view */\n\tinitialView?: TCalendarView;\n\t/** Initial date */\n\tinitialDate?: Date;\n\t/** Initial filters */\n\tinitialFilters?: ICalendarFilters;\n\t/** Preferences */\n\tpreferences?: Partial<ICalendarPreferences>;\n\t/** Badge variant for events (dot, colored, mixed) */\n\tbadgeVariant?: TBadgeVariant;\n\t/** Hide the header */\n\thideHeader?: boolean;\n\t/** Show filter sidebar */\n\tshowFilterSidebar?: boolean;\n\t/** Available views to show in view switcher */\n\tavailableViews?: TCalendarView[];\n\n\t// ========================================================================\n\t// CALLBACKS\n\t// ========================================================================\n\n\t/** Event click handler */\n\tonEventClick?: (event: CalendarEvent<TEventData>) => void;\n\t/** Slot selection handler */\n\tonSlotSelect?: (selection: ISelectionResult) => void;\n\t/** View change handler */\n\tonViewChange?: (view: TCalendarView) => void;\n\t/** Date change handler */\n\tonDateChange?: (date: Date) => void;\n\t/** Add event handler (for header button) */\n\tonAddEvent?: () => void;\n\t/** Filter change handler */\n\tonFiltersChange?: (filters: ICalendarFilters) => void;\n\n\t// ========================================================================\n\t// RENDER PROPS (for custom components)\n\t// ========================================================================\n\n\t/**\n\t * Custom event renderer\n\t * Use this to inject your own EventCard component\n\t */\n\trenderEvent?: (props: RenderEventProps<TEventData>) => ReactNode;\n\n\t/**\n\t * Custom event popover renderer\n\t * Use this to inject your own EventPopover component\n\t * If not provided, a basic popover is shown\n\t */\n\trenderEventPopover?: (props: RenderEventPopoverProps<TEventData>) => ReactNode;\n\n\t/**\n\t * Custom filter sidebar renderer\n\t * Use this to inject your own CalendarFilterSidebar component\n\t */\n\trenderFilterSidebar?: (props: RenderFilterSidebarProps<TScheduleTypeData>) => ReactNode;\n\n\t/**\n\t * Custom header renderer\n\t * Use this to inject your own CalendarHeader component\n\t */\n\trenderHeader?: (props: RenderHeaderProps) => ReactNode;\n\n\t// ========================================================================\n\t// HEADER SLOTS\n\t// ========================================================================\n\n\t/** Settings popover content (for default header) */\n\tsettingsContent?: ReactNode;\n\t/** Filter row content (for default header) */\n\tfilterContent?: ReactNode;\n\t/** Whether to show the settings button (default: true) */\n\tshowSettings?: boolean;\n\t/** Whether to show timeline view options (default: false) */\n\tshowTimelineViews?: boolean;\n\n\t// ========================================================================\n\t// STYLING\n\t// ========================================================================\n\n\t/** Additional CSS class */\n\tclassName?: string;\n\t/** Custom header actions (shown in default header) */\n\theaderActions?: ReactNode;\n\t/** Empty state for agenda view */\n\temptyState?: ReactNode;\n\t/** Children (for header slot) */\n\tchildren?: ReactNode;\n}\n\n// ============================================================================\n// COMPONENT\n// ============================================================================\n\nexport function TailwindCalendar<\n\tTEventData = Record<string, unknown>,\n\tTScheduleTypeData = Record<string, unknown>,\n\tTResourceData = Record<string, unknown>,\n>({\n\tevents,\n\tresources: _resources,\n\tscheduleTypes = [],\n\tinitialView = 'week',\n\tinitialDate,\n\tinitialFilters: _initialFilters,\n\tpreferences: userPreferences,\n\tbadgeVariant = 'colored',\n\thideHeader = false,\n\tshowFilterSidebar = false,\n\tavailableViews = ['day', 'week', 'month', 'agenda'],\n\tonEventClick,\n\tonSlotSelect,\n\tonViewChange,\n\tonDateChange,\n\tonAddEvent,\n\tonFiltersChange,\n\trenderEvent,\n\trenderEventPopover: _renderEventPopover,\n\trenderFilterSidebar,\n\trenderHeader,\n\tsettingsContent,\n\tfilterContent,\n\tshowSettings = true,\n\tshowTimelineViews = false,\n\tclassName,\n\theaderActions,\n\temptyState,\n\tchildren: _children,\n}: TailwindCalendarProps<TEventData, TScheduleTypeData, TResourceData>) {\n\t// ========================================================================\n\t// STATE\n\t// ========================================================================\n\n\tconst [view, setView] = useState<TCalendarView>(initialView);\n\tconst [date, setDate] = useState<Date>(initialDate ?? new Date());\n\n\t// Filter state (for filter sidebar)\n\tconst [selectedScheduleTypeIds, setSelectedScheduleTypeIds] = useState<number[]>([]);\n\tconst [selectedParticipantIds, setSelectedParticipantIds] = useState<string[]>([]);\n\n\t// Merge user preferences with defaults\n\tconst preferences: ICalendarPreferences = useMemo(\n\t\t() => ({\n\t\t\t...DEFAULT_PREFERENCES,\n\t\t\t...userPreferences,\n\t\t}),\n\t\t[userPreferences]\n\t);\n\n\t// ========================================================================\n\t// HANDLERS\n\t// ========================================================================\n\n\tconst handleViewChange = useCallback(\n\t\t(newView: TCalendarView) => {\n\t\t\tsetView(newView);\n\t\t\tonViewChange?.(newView);\n\t\t},\n\t\t[onViewChange]\n\t);\n\n\tconst handleDateChange = useCallback(\n\t\t(newDate: Date) => {\n\t\t\tsetDate(newDate);\n\t\t\tonDateChange?.(newDate);\n\t\t},\n\t\t[onDateChange]\n\t);\n\n\tconst handleNavigatePrev = useCallback(() => {\n\t\tconst newDate = navigatePrev(date, view);\n\t\thandleDateChange(newDate);\n\t}, [date, view, handleDateChange]);\n\n\tconst handleNavigateNext = useCallback(() => {\n\t\tconst newDate = navigateNext(date, view);\n\t\thandleDateChange(newDate);\n\t}, [date, view, handleDateChange]);\n\n\tconst handleNavigateToday = useCallback(() => {\n\t\tconst newDate = navigateToday();\n\t\thandleDateChange(newDate);\n\t}, [handleDateChange]);\n\n\tconst handleDayClick = useCallback(\n\t\t(clickedDate: Date) => {\n\t\t\t// Navigate to day view when clicking a day in month view\n\t\t\thandleDateChange(clickedDate);\n\t\t\thandleViewChange('day');\n\t\t},\n\t\t[handleDateChange, handleViewChange]\n\t);\n\n\t// ========================================================================\n\t// VIEW RENDERING\n\t// ========================================================================\n\n\t// Visible hours - show all hours (0-24) so users can see the full day\n\t// The working hours determine which slots have striped (disabled) appearance\n\tconst visibleHours = useMemo(\n\t\t() => ({\n\t\t\tstartHour: 0,\n\t\t\tendHour: 24,\n\t\t}),\n\t\t[]\n\t);\n\n\t// Week starts on (convert from 0-6 to 0 | 1)\n\tconst weekStartsOn: 0 | 1 = preferences.firstDayOfWeek === 0 ? 0 : 1;\n\n\t// Build working hours from preferences (for time grid views)\n\t// Working hours determine which slots are clickable and don't have striped pattern\n\t// Non-working hours get diagonal stripes and are disabled\n\tconst workingHours = useMemo(() => {\n\t\tconst hours: Record<number, { enabled: boolean; from: number; to: number }> = {};\n\t\tfor (let i = 0; i <= 6; i++) {\n\t\t\tconst isWeekend = i === 0 || i === 6;\n\t\t\t// Weekdays: use preferences, Weekends: use preferences if showWeekends, otherwise disabled\n\t\t\tif (!isWeekend) {\n\t\t\t\t// Weekdays (Mon-Fri): always have working hours from preferences\n\t\t\t\thours[i] = { enabled: true, from: preferences.startHour, to: preferences.endHour };\n\t\t\t} else if (preferences.showWeekends) {\n\t\t\t\t// Weekends with showWeekends: Saturday half-day (8-12), Sunday disabled\n\t\t\t\tif (i === 6) {\n\t\t\t\t\t// Saturday - half day (matching agenda-v2)\n\t\t\t\t\thours[i] = { enabled: true, from: 8, to: 12 };\n\t\t\t\t} else {\n\t\t\t\t\t// Sunday - disabled\n\t\t\t\t\thours[i] = { enabled: false, from: 0, to: 0 };\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Weekends without showWeekends: both disabled\n\t\t\t\thours[i] = { enabled: false, from: 0, to: 0 };\n\t\t\t}\n\t\t}\n\t\treturn hours;\n\t}, [preferences.startHour, preferences.endHour, preferences.showWeekends]);\n\n\t// Handle filter changes\n\tconst handleScheduleTypeFilterChange = useCallback(\n\t\t(ids: number[]) => {\n\t\t\tsetSelectedScheduleTypeIds(ids);\n\t\t\tonFiltersChange?.({\n\t\t\t\tscheduleTypeIds: ids,\n\t\t\t\tparticipantIds: selectedParticipantIds,\n\t\t\t});\n\t\t},\n\t\t[onFiltersChange, selectedParticipantIds]\n\t);\n\n\tconst handleParticipantFilterChange = useCallback(\n\t\t(ids: string[]) => {\n\t\t\tsetSelectedParticipantIds(ids);\n\t\t\tonFiltersChange?.({\n\t\t\t\tscheduleTypeIds: selectedScheduleTypeIds,\n\t\t\t\tparticipantIds: ids,\n\t\t\t});\n\t\t},\n\t\t[onFiltersChange, selectedScheduleTypeIds]\n\t);\n\n\t// Create render event adapters for different view types\n\t// Each view has a slightly different renderEvent signature\n\n\tconst dayWeekRenderEvent = useMemo(() => {\n\t\tif (!renderEvent) return undefined;\n\t\treturn (props: {\n\t\t\tevent: CalendarEvent<TEventData>;\n\t\t\tposition: { top: number; height: number; left: number; width: number };\n\t\t}) => {\n\t\t\treturn renderEvent({\n\t\t\t\tevent: props.event,\n\t\t\t\tview,\n\t\t\t\tvariant: 'full',\n\t\t\t\tposition: { ...props.position, zIndex: 1 },\n\t\t\t\tbadgeVariant,\n\t\t\t\t...(onEventClick && { onClick: () => onEventClick(props.event) }),\n\t\t\t});\n\t\t};\n\t}, [renderEvent, view, badgeVariant, onEventClick]);\n\n\tconst monthRenderEvent = useMemo(() => {\n\t\tif (!renderEvent) return undefined;\n\t\treturn (props: { event: CalendarEvent<TEventData>; variant: 'compact' }) => {\n\t\t\treturn renderEvent({\n\t\t\t\tevent: props.event,\n\t\t\t\tview: 'month',\n\t\t\t\tvariant: props.variant,\n\t\t\t\tbadgeVariant,\n\t\t\t\t...(onEventClick && { onClick: () => onEventClick(props.event) }),\n\t\t\t});\n\t\t};\n\t}, [renderEvent, badgeVariant, onEventClick]);\n\n\tconst agendaRenderEvent = useMemo(() => {\n\t\tif (!renderEvent) return undefined;\n\t\treturn (props: { event: CalendarEvent<TEventData> }) => {\n\t\t\treturn renderEvent({\n\t\t\t\tevent: props.event,\n\t\t\t\tview: 'agenda',\n\t\t\t\tvariant: 'block',\n\t\t\t\tbadgeVariant,\n\t\t\t\t...(onEventClick && { onClick: () => onEventClick(props.event) }),\n\t\t\t});\n\t\t};\n\t}, [renderEvent, badgeVariant, onEventClick]);\n\n\tconst renderView = () => {\n\t\tswitch (view) {\n\t\t\tcase 'day':\n\t\t\t\treturn (\n\t\t\t\t\t<DayView<TEventData>\n\t\t\t\t\t\tevents={events}\n\t\t\t\t\t\tdate={date}\n\t\t\t\t\t\tbadgeVariant={badgeVariant}\n\t\t\t\t\t\tvisibleHours={visibleHours}\n\t\t\t\t\t\tworkingHours={workingHours}\n\t\t\t\t\t\tslotDuration={preferences.slotDuration}\n\t\t\t\t\t\t{...(onEventClick && { onEventClick })}\n\t\t\t\t\t\t{...(onSlotSelect && { onSlotSelect })}\n\t\t\t\t\t\t{...(dayWeekRenderEvent && { renderEvent: dayWeekRenderEvent })}\n\t\t\t\t\t/>\n\t\t\t\t);\n\n\t\t\tcase 'week':\n\t\t\t\treturn (\n\t\t\t\t\t<WeekView<TEventData>\n\t\t\t\t\t\tevents={events}\n\t\t\t\t\t\tdate={date}\n\t\t\t\t\t\tbadgeVariant={badgeVariant}\n\t\t\t\t\t\tweekStartsOn={weekStartsOn}\n\t\t\t\t\t\tvisibleHours={visibleHours}\n\t\t\t\t\t\tworkingHours={workingHours}\n\t\t\t\t\t\tslotDuration={preferences.slotDuration}\n\t\t\t\t\t\tonDayClick={handleDayClick}\n\t\t\t\t\t\t{...(onEventClick && { onEventClick })}\n\t\t\t\t\t\t{...(onSlotSelect && { onSlotSelect })}\n\t\t\t\t\t\t{...(dayWeekRenderEvent && { renderEvent: dayWeekRenderEvent })}\n\t\t\t\t\t/>\n\t\t\t\t);\n\n\t\t\tcase 'month':\n\t\t\t\treturn (\n\t\t\t\t\t<MonthView<TEventData>\n\t\t\t\t\t\tevents={events}\n\t\t\t\t\t\tdate={date}\n\t\t\t\t\t\tbadgeVariant={badgeVariant}\n\t\t\t\t\t\tweekStartsOn={weekStartsOn}\n\t\t\t\t\t\tonDayClick={handleDayClick}\n\t\t\t\t\t\t{...(onEventClick && { onEventClick })}\n\t\t\t\t\t\t{...(onSlotSelect && { onSlotSelect })}\n\t\t\t\t\t\t{...(monthRenderEvent && { renderEvent: monthRenderEvent })}\n\t\t\t\t\t/>\n\t\t\t\t);\n\n\t\t\tcase 'agenda':\n\t\t\t\treturn (\n\t\t\t\t\t<AgendaView<TEventData>\n\t\t\t\t\t\tevents={events}\n\t\t\t\t\t\tdate={date}\n\t\t\t\t\t\tbadgeVariant={badgeVariant}\n\t\t\t\t\t\t{...(onEventClick && { onEventClick })}\n\t\t\t\t\t\t{...(emptyState && { emptyState })}\n\t\t\t\t\t\t{...(agendaRenderEvent && { renderEvent: agendaRenderEvent })}\n\t\t\t\t\t/>\n\t\t\t\t);\n\n\t\t\tdefault:\n\t\t\t\treturn (\n\t\t\t\t\t<div className=\"flex items-center justify-center h-64 text-gray-500\">\n\t\t\t\t\t\tView &quot;{view}&quot; is not yet implemented\n\t\t\t\t\t</div>\n\t\t\t\t);\n\t\t}\n\t};\n\n\t// ========================================================================\n\t// RENDER\n\t// ========================================================================\n\n\t// Header navigation handler\n\tconst handleNavigate = useCallback(\n\t\t(direction: 'prev' | 'next' | 'today') => {\n\t\t\tif (direction === 'prev') handleNavigatePrev();\n\t\t\telse if (direction === 'next') handleNavigateNext();\n\t\t\telse handleNavigateToday();\n\t\t},\n\t\t[handleNavigatePrev, handleNavigateNext, handleNavigateToday]\n\t);\n\n\t// Default header props (conditionally add optional props)\n\tconst headerProps: RenderHeaderProps = {\n\t\tview,\n\t\tcurrentDate: date,\n\t\tavailableViews,\n\t\tonViewChange: handleViewChange,\n\t\tonNavigate: handleNavigate,\n\t\tonNavigatePrev: handleNavigatePrev,\n\t\tonNavigateNext: handleNavigateNext,\n\t\tonNavigateToday: handleNavigateToday,\n\t\t...(onAddEvent && { onAddEvent }),\n\t\t...(headerActions && { actions: headerActions }),\n\t\tclassName: 'border-b border-gray-200 p-3',\n\t};\n\n\t// Calendar header props (includes events for count display + slots)\n\tconst calendarHeaderProps = {\n\t\t...headerProps,\n\t\tevents,\n\t\tweekStartsOn,\n\t\tsettingsContent,\n\t\tfilterContent,\n\t\tshowSettings,\n\t\tshowTimelineViews,\n\t};\n\n\t// Clear all filters handler\n\tconst handleClearAllFilters = useCallback(() => {\n\t\tsetSelectedScheduleTypeIds([]);\n\t\tsetSelectedParticipantIds([]);\n\t\tonFiltersChange?.({\n\t\t\tscheduleTypeIds: [],\n\t\t\tparticipantIds: [],\n\t\t});\n\t}, [onFiltersChange]);\n\n\treturn (\n\t\t<div className={cn('flex h-full bg-white border border-gray-200 rounded-lg', className)}>\n\t\t\t{/* Filter Sidebar */}\n\t\t\t{showFilterSidebar && (\n\t\t\t\t<div className=\"w-64 border-r border-gray-200 flex-shrink-0\">\n\t\t\t\t\t{renderFilterSidebar ? (\n\t\t\t\t\t\trenderFilterSidebar({\n\t\t\t\t\t\t\tscheduleTypes,\n\t\t\t\t\t\t\tselectedScheduleTypeIds,\n\t\t\t\t\t\t\tselectedParticipantIds,\n\t\t\t\t\t\t\tonScheduleTypeChange: handleScheduleTypeFilterChange,\n\t\t\t\t\t\t\tonParticipantChange: handleParticipantFilterChange,\n\t\t\t\t\t\t\tonClearAll: handleClearAllFilters,\n\t\t\t\t\t\t})\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<div className=\"p-4 text-sm text-gray-500\">Filter sidebar not configured</div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t)}\n\n\t\t\t{/* Main Calendar Area */}\n\t\t\t<div className=\"flex flex-col flex-1 min-w-0\">\n\t\t\t\t{/* Header */}\n\t\t\t\t{!hideHeader &&\n\t\t\t\t\t(renderHeader ? renderHeader(headerProps) : <CalendarHeader {...calendarHeaderProps} />)}\n\n\t\t\t\t{/* Calendar View */}\n\t\t\t\t<div className=\"flex-1 overflow-auto\">{renderView()}</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n"],"names":["baseStyles","headerStyles","contentStyles","fallbackViewStyles","DefaultCalendar","events","_resources","_scheduleTypes","initialView","initialDate","_initialFilters","userPreferences","badgeVariant","hideHeader","availableViews","onEventClick","onSlotSelect","onViewChange","onDateChange","className","style","headerActions","emptyState","_children","view","setView","useState","date","setDate","preferences","useMemo","DEFAULT_PREFERENCES","handleViewChange","useCallback","newView","handleDateChange","newDate","handleNavigatePrev","navigatePrev","handleNavigateNext","navigateNext","handleNavigateToday","navigateToday","handleDayClick","clickedDate","visibleHours","weekStartsOn","renderView","jsx","DayView","WeekView","MonthView","AgendaView","jsxs","CalendarHeader","direction","TailwindCalendar","scheduleTypes","showFilterSidebar","onAddEvent","onFiltersChange","renderEvent","_renderEventPopover","renderFilterSidebar","renderHeader","settingsContent","filterContent","showSettings","showTimelineViews","selectedScheduleTypeIds","setSelectedScheduleTypeIds","selectedParticipantIds","setSelectedParticipantIds","workingHours","hours","i","handleScheduleTypeFilterChange","ids","handleParticipantFilterChange","dayWeekRenderEvent","props","monthRenderEvent","agendaRenderEvent","handleNavigate","headerProps","calendarHeaderProps","handleClearAllFilters","cn"],"mappings":";;;;;AAwDA,MAAMA,KAA4B;AAAA,EACjC,SAAS;AAAA,EACT,eAAe;AAAA,EACf,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,iBAAiB;AAAA,EACjB,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,UAAU;AAAA,EACV,YACC;AAAA,EACD,UAAU;AAAA,EACV,OAAO;AACR,GAEMC,KAA8B;AAAA,EACnC,cAAc;AACf,GAEMC,KAA+B;AAAA,EACpC,MAAM;AAAA,EACN,UAAU;AACX,GAEMC,KAAoC;AAAA,EACzC,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,gBAAgB;AAAA,EAChB,QAAQ;AAAA,EACR,OAAO;AACR;AAuDO,SAASC,GAId;AAAA,EACD,QAAAC;AAAA,EACA,WAAWC;AAAA,EACX,eAAeC;AAAA,EACf,aAAAC,IAAc;AAAA,EACd,aAAAC;AAAA,EACA,gBAAgBC;AAAA,EAChB,aAAaC;AAAA,EACb,cAAAC,IAAe;AAAA,EACf,YAAAC,IAAa;AAAA,EACb,gBAAAC,IAAiB,CAAC,OAAO,QAAQ,SAAS,QAAQ;AAAA,EAClD,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,OAAAC;AAAA,EACA,eAAAC;AAAA,EACA,YAAAC;AAAA,EACA,UAAUC;AACX,GAAuE;AAKtE,QAAM,CAACC,GAAMC,CAAO,IAAIC,EAAwBlB,CAAW,GACrD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AaoB,EAAW,IAAI,gBAAApC,EAACM,IAAA,EAAgB,GAAG+B,GAAA,CAAqB;AAAA,MAGtF,gBAAArC,EAAC,OAAA,EAAI,WAAU,wBAAwB,eAAW,CAAE;AAAA,IAAA,EAAA,CACrD;AAAA,EAAA,GACD;AAEF;"}
@@ -1,2 +1,2 @@
1
- "use strict";const r=require("react/jsx-runtime"),s=require("react"),y=require("./week-view-C1Vu2ErD.cjs"),p=require("./position-utils-BQpbtF6N.cjs"),ce=require("./index-D2U2F80P.cjs"),de={display:"flex",flexDirection:"column",height:"100%",minHeight:"400px",backgroundColor:"var(--ic-bg, #ffffff)",border:"1px solid var(--ic-border, #e5e7eb)",borderRadius:"var(--ic-radius, 0.5rem)",overflow:"hidden",fontFamily:'var(--ic-font-family, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif)',fontSize:"var(--ic-font-size, 0.875rem)",color:"var(--ic-text, #111827)"},ue={borderBottom:"1px solid var(--ic-border, #e5e7eb)"},fe={flex:1,overflow:"auto"},he={display:"flex",alignItems:"center",justifyContent:"center",height:"16rem",color:"var(--ic-text-muted, #6b7280)"};function ye({events:d,resources:ee,scheduleTypes:G,initialView:R="week",initialDate:_,initialFilters:se,preferences:g,badgeVariant:n="colored",hideHeader:W=!1,availableViews:F=["day","week","month","agenda"],onEventClick:u,onSlotSelect:a,onViewChange:x,onDateChange:N,className:j="",style:H,headerActions:b,emptyState:i,children:ae}){const[f,T]=s.useState(R),[c,q]=s.useState(_??new Date),w=s.useMemo(()=>({...p.DEFAULT_PREFERENCES,...g}),[g]),k=s.useCallback(t=>{T(t),x?.(t)},[x]),h=s.useCallback(t=>{q(t),N?.(t)},[N]),C=s.useCallback(()=>{const t=p.navigatePrev(c,f);h(t)},[c,f,h]),I=s.useCallback(()=>{const t=p.navigateNext(c,f);h(t)},[c,f,h]),J=s.useCallback(()=>{const t=p.navigateToday();h(t)},[h]),l=s.useCallback(t=>{h(t),k("day")},[h,k]),P=s.useMemo(()=>({startHour:w.startHour,endHour:w.endHour}),[w.startHour,w.endHour]),o=w.firstDayOfWeek===0?0:1,A=()=>{switch(f){case"day":return r.jsx(y.DayView,{events:d,date:c,badgeVariant:n,visibleHours:P,slotDuration:w.slotDuration,...u&&{onEventClick:u},...a&&{onSlotSelect:a}});case"week":return r.jsx(y.WeekView,{events:d,date:c,badgeVariant:n,weekStartsOn:o,visibleHours:P,slotDuration:w.slotDuration,onDayClick:l,...u&&{onEventClick:u},...a&&{onSlotSelect:a}});case"month":return r.jsx(y.MonthView,{events:d,date:c,badgeVariant:n,weekStartsOn:o,onDayClick:l,...u&&{onEventClick:u},...a&&{onSlotSelect:a}});case"agenda":return r.jsx(y.AgendaView,{events:d,date:c,badgeVariant:n,...u&&{onEventClick:u},...i&&{emptyState:i}});default:return r.jsxs("div",{style:he,children:['View "',f,'" is not yet implemented']})}};return r.jsxs("div",{className:j,style:{...de,...H},children:[!W&&r.jsx("div",{style:ue,children:r.jsx(y.CalendarHeader,{view:f,currentDate:c,availableViews:F,onViewChange:k,onNavigate:t=>{t==="prev"?C():t==="next"?I():J()},actions:b,className:"p-3"})}),r.jsx("div",{style:fe,children:A()})]})}function xe({events:d,resources:ee,scheduleTypes:G=[],initialView:R="week",initialDate:_,initialFilters:se,preferences:g,badgeVariant:n="colored",hideHeader:W=!1,showFilterSidebar:F=!1,availableViews:u=["day","week","month","agenda"],onEventClick:a,onSlotSelect:x,onViewChange:N,onDateChange:j,onAddEvent:H,onFiltersChange:b,renderEvent:i,renderEventPopover:ae,renderFilterSidebar:f,renderHeader:T,settingsContent:c,filterContent:q,showSettings:w=!0,showTimelineViews:k=!1,className:h,headerActions:C,emptyState:I,children:J}){const[l,P]=s.useState(R),[o,A]=s.useState(_??new Date),[t,K]=s.useState([]),[O,Q]=s.useState([]),m=s.useMemo(()=>({...p.DEFAULT_PREFERENCES,...g}),[g]),U=s.useCallback(e=>{P(e),N?.(e)},[N]),D=s.useCallback(e=>{A(e),j?.(e)},[j]),V=s.useCallback(()=>{const e=p.navigatePrev(o,l);D(e)},[o,l,D]),z=s.useCallback(()=>{const e=p.navigateNext(o,l);D(e)},[o,l,D]),B=s.useCallback(()=>{const e=p.navigateToday();D(e)},[D]),S=s.useCallback(e=>{D(e),U("day")},[D,U]),X=s.useMemo(()=>({startHour:0,endHour:24}),[]),L=m.firstDayOfWeek===0?0:1,Y=s.useMemo(()=>{const e={};for(let v=0;v<=6;v++)v===0||v===6?m.showWeekends?v===6?e[v]={enabled:!0,from:8,to:12}:e[v]={enabled:!1,from:0,to:0}:e[v]={enabled:!1,from:0,to:0}:e[v]={enabled:!0,from:m.startHour,to:m.endHour};return e},[m.startHour,m.endHour,m.showWeekends]),te=s.useCallback(e=>{K(e),b?.({scheduleTypeIds:e,participantIds:O})},[b,O]),re=s.useCallback(e=>{Q(e),b?.({scheduleTypeIds:t,participantIds:e})},[b,t]),M=s.useMemo(()=>{if(i)return e=>i({event:e.event,view:l,variant:"full",position:{...e.position,zIndex:1},badgeVariant:n,...a&&{onClick:()=>a(e.event)}})},[i,l,n,a]),Z=s.useMemo(()=>{if(i)return e=>i({event:e.event,view:"month",variant:e.variant,badgeVariant:n,...a&&{onClick:()=>a(e.event)}})},[i,n,a]),$=s.useMemo(()=>{if(i)return e=>i({event:e.event,view:"agenda",variant:"block",badgeVariant:n,...a&&{onClick:()=>a(e.event)}})},[i,n,a]),ne=()=>{switch(l){case"day":return r.jsx(y.DayView,{events:d,date:o,badgeVariant:n,visibleHours:X,workingHours:Y,slotDuration:m.slotDuration,...a&&{onEventClick:a},...x&&{onSlotSelect:x},...M&&{renderEvent:M}});case"week":return r.jsx(y.WeekView,{events:d,date:o,badgeVariant:n,weekStartsOn:L,visibleHours:X,workingHours:Y,slotDuration:m.slotDuration,onDayClick:S,...a&&{onEventClick:a},...x&&{onSlotSelect:x},...M&&{renderEvent:M}});case"month":return r.jsx(y.MonthView,{events:d,date:o,badgeVariant:n,weekStartsOn:L,onDayClick:S,...a&&{onEventClick:a},...x&&{onSlotSelect:x},...Z&&{renderEvent:Z}});case"agenda":return r.jsx(y.AgendaView,{events:d,date:o,badgeVariant:n,...a&&{onEventClick:a},...I&&{emptyState:I},...$&&{renderEvent:$}});default:return r.jsxs("div",{className:"flex items-center justify-center h-64 text-gray-500",children:['View "',l,'" is not yet implemented']})}},ie=s.useCallback(e=>{e==="prev"?V():e==="next"?z():B()},[V,z,B]),E={view:l,currentDate:o,availableViews:u,onViewChange:U,onNavigate:ie,onNavigatePrev:V,onNavigateNext:z,onNavigateToday:B,...H&&{onAddEvent:H},...C&&{actions:C},className:"border-b border-gray-200 p-3"},le={...E,events:d,weekStartsOn:L,settingsContent:c,filterContent:q,showSettings:w,showTimelineViews:k},oe=s.useCallback(()=>{K([]),Q([]),b?.({scheduleTypeIds:[],participantIds:[]})},[b]);return r.jsxs("div",{className:ce.cn("flex h-full bg-white border border-gray-200 rounded-lg",h),children:[F&&r.jsx("div",{className:"w-64 border-r border-gray-200 flex-shrink-0",children:f?f({scheduleTypes:G,selectedScheduleTypeIds:t,selectedParticipantIds:O,onScheduleTypeChange:te,onParticipantChange:re,onClearAll:oe}):r.jsx("div",{className:"p-4 text-sm text-gray-500",children:"Filter sidebar not configured"})}),r.jsxs("div",{className:"flex flex-col flex-1 min-w-0",children:[!W&&(T?T(E):r.jsx(y.CalendarHeader,{...le})),r.jsx("div",{className:"flex-1 overflow-auto",children:ne()})]})]})}exports.DefaultCalendar=ye;exports.TailwindCalendar=xe;
2
- //# sourceMappingURL=tailwind-calendar-VRvPJQwa.cjs.map
1
+ "use strict";const r=require("react/jsx-runtime"),s=require("react"),y=require("./week-view-Dv-Uz0eT.cjs"),p=require("./position-utils-EQTCC4tZ.cjs"),ce=require("./index-D2U2F80P.cjs"),de={display:"flex",flexDirection:"column",height:"100%",minHeight:"400px",backgroundColor:"var(--ic-bg, #ffffff)",border:"1px solid var(--ic-border, #e5e7eb)",borderRadius:"var(--ic-radius, 0.5rem)",overflow:"hidden",fontFamily:'var(--ic-font-family, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif)',fontSize:"var(--ic-font-size, 0.875rem)",color:"var(--ic-text, #111827)"},ue={borderBottom:"1px solid var(--ic-border, #e5e7eb)"},fe={flex:1,overflow:"auto"},he={display:"flex",alignItems:"center",justifyContent:"center",height:"16rem",color:"var(--ic-text-muted, #6b7280)"};function ye({events:d,resources:ee,scheduleTypes:G,initialView:R="week",initialDate:_,initialFilters:se,preferences:g,badgeVariant:n="colored",hideHeader:W=!1,availableViews:F=["day","week","month","agenda"],onEventClick:u,onSlotSelect:a,onViewChange:x,onDateChange:N,className:j="",style:H,headerActions:b,emptyState:i,children:ae}){const[f,T]=s.useState(R),[c,q]=s.useState(_??new Date),w=s.useMemo(()=>({...p.DEFAULT_PREFERENCES,...g}),[g]),k=s.useCallback(t=>{T(t),x?.(t)},[x]),h=s.useCallback(t=>{q(t),N?.(t)},[N]),C=s.useCallback(()=>{const t=p.navigatePrev(c,f);h(t)},[c,f,h]),I=s.useCallback(()=>{const t=p.navigateNext(c,f);h(t)},[c,f,h]),J=s.useCallback(()=>{const t=p.navigateToday();h(t)},[h]),l=s.useCallback(t=>{h(t),k("day")},[h,k]),P=s.useMemo(()=>({startHour:w.startHour,endHour:w.endHour}),[w.startHour,w.endHour]),o=w.firstDayOfWeek===0?0:1,A=()=>{switch(f){case"day":return r.jsx(y.DayView,{events:d,date:c,badgeVariant:n,visibleHours:P,slotDuration:w.slotDuration,...u&&{onEventClick:u},...a&&{onSlotSelect:a}});case"week":return r.jsx(y.WeekView,{events:d,date:c,badgeVariant:n,weekStartsOn:o,visibleHours:P,slotDuration:w.slotDuration,onDayClick:l,...u&&{onEventClick:u},...a&&{onSlotSelect:a}});case"month":return r.jsx(y.MonthView,{events:d,date:c,badgeVariant:n,weekStartsOn:o,onDayClick:l,...u&&{onEventClick:u},...a&&{onSlotSelect:a}});case"agenda":return r.jsx(y.AgendaView,{events:d,date:c,badgeVariant:n,...u&&{onEventClick:u},...i&&{emptyState:i}});default:return r.jsxs("div",{style:he,children:['View "',f,'" is not yet implemented']})}};return r.jsxs("div",{className:j,style:{...de,...H},children:[!W&&r.jsx("div",{style:ue,children:r.jsx(y.CalendarHeader,{view:f,currentDate:c,availableViews:F,onViewChange:k,onNavigate:t=>{t==="prev"?C():t==="next"?I():J()},actions:b,className:"p-3"})}),r.jsx("div",{style:fe,children:A()})]})}function xe({events:d,resources:ee,scheduleTypes:G=[],initialView:R="week",initialDate:_,initialFilters:se,preferences:g,badgeVariant:n="colored",hideHeader:W=!1,showFilterSidebar:F=!1,availableViews:u=["day","week","month","agenda"],onEventClick:a,onSlotSelect:x,onViewChange:N,onDateChange:j,onAddEvent:H,onFiltersChange:b,renderEvent:i,renderEventPopover:ae,renderFilterSidebar:f,renderHeader:T,settingsContent:c,filterContent:q,showSettings:w=!0,showTimelineViews:k=!1,className:h,headerActions:C,emptyState:I,children:J}){const[l,P]=s.useState(R),[o,A]=s.useState(_??new Date),[t,K]=s.useState([]),[O,Q]=s.useState([]),m=s.useMemo(()=>({...p.DEFAULT_PREFERENCES,...g}),[g]),U=s.useCallback(e=>{P(e),N?.(e)},[N]),D=s.useCallback(e=>{A(e),j?.(e)},[j]),V=s.useCallback(()=>{const e=p.navigatePrev(o,l);D(e)},[o,l,D]),z=s.useCallback(()=>{const e=p.navigateNext(o,l);D(e)},[o,l,D]),B=s.useCallback(()=>{const e=p.navigateToday();D(e)},[D]),S=s.useCallback(e=>{D(e),U("day")},[D,U]),X=s.useMemo(()=>({startHour:0,endHour:24}),[]),L=m.firstDayOfWeek===0?0:1,Y=s.useMemo(()=>{const e={};for(let v=0;v<=6;v++)v===0||v===6?m.showWeekends?v===6?e[v]={enabled:!0,from:8,to:12}:e[v]={enabled:!1,from:0,to:0}:e[v]={enabled:!1,from:0,to:0}:e[v]={enabled:!0,from:m.startHour,to:m.endHour};return e},[m.startHour,m.endHour,m.showWeekends]),te=s.useCallback(e=>{K(e),b?.({scheduleTypeIds:e,participantIds:O})},[b,O]),re=s.useCallback(e=>{Q(e),b?.({scheduleTypeIds:t,participantIds:e})},[b,t]),M=s.useMemo(()=>{if(i)return e=>i({event:e.event,view:l,variant:"full",position:{...e.position,zIndex:1},badgeVariant:n,...a&&{onClick:()=>a(e.event)}})},[i,l,n,a]),Z=s.useMemo(()=>{if(i)return e=>i({event:e.event,view:"month",variant:e.variant,badgeVariant:n,...a&&{onClick:()=>a(e.event)}})},[i,n,a]),$=s.useMemo(()=>{if(i)return e=>i({event:e.event,view:"agenda",variant:"block",badgeVariant:n,...a&&{onClick:()=>a(e.event)}})},[i,n,a]),ne=()=>{switch(l){case"day":return r.jsx(y.DayView,{events:d,date:o,badgeVariant:n,visibleHours:X,workingHours:Y,slotDuration:m.slotDuration,...a&&{onEventClick:a},...x&&{onSlotSelect:x},...M&&{renderEvent:M}});case"week":return r.jsx(y.WeekView,{events:d,date:o,badgeVariant:n,weekStartsOn:L,visibleHours:X,workingHours:Y,slotDuration:m.slotDuration,onDayClick:S,...a&&{onEventClick:a},...x&&{onSlotSelect:x},...M&&{renderEvent:M}});case"month":return r.jsx(y.MonthView,{events:d,date:o,badgeVariant:n,weekStartsOn:L,onDayClick:S,...a&&{onEventClick:a},...x&&{onSlotSelect:x},...Z&&{renderEvent:Z}});case"agenda":return r.jsx(y.AgendaView,{events:d,date:o,badgeVariant:n,...a&&{onEventClick:a},...I&&{emptyState:I},...$&&{renderEvent:$}});default:return r.jsxs("div",{className:"flex items-center justify-center h-64 text-gray-500",children:['View "',l,'" is not yet implemented']})}},ie=s.useCallback(e=>{e==="prev"?V():e==="next"?z():B()},[V,z,B]),E={view:l,currentDate:o,availableViews:u,onViewChange:U,onNavigate:ie,onNavigatePrev:V,onNavigateNext:z,onNavigateToday:B,...H&&{onAddEvent:H},...C&&{actions:C},className:"border-b border-gray-200 p-3"},le={...E,events:d,weekStartsOn:L,settingsContent:c,filterContent:q,showSettings:w,showTimelineViews:k},oe=s.useCallback(()=>{K([]),Q([]),b?.({scheduleTypeIds:[],participantIds:[]})},[b]);return r.jsxs("div",{className:ce.cn("flex h-full bg-white border border-gray-200 rounded-lg",h),children:[F&&r.jsx("div",{className:"w-64 border-r border-gray-200 flex-shrink-0",children:f?f({scheduleTypes:G,selectedScheduleTypeIds:t,selectedParticipantIds:O,onScheduleTypeChange:te,onParticipantChange:re,onClearAll:oe}):r.jsx("div",{className:"p-4 text-sm text-gray-500",children:"Filter sidebar not configured"})}),r.jsxs("div",{className:"flex flex-col flex-1 min-w-0",children:[!W&&(T?T(E):r.jsx(y.CalendarHeader,{...le})),r.jsx("div",{className:"flex-1 overflow-auto",children:ne()})]})]})}exports.DefaultCalendar=ye;exports.TailwindCalendar=xe;
2
+ //# sourceMappingURL=tailwind-calendar-KJ1XJ4gr.cjs.map