@savvycal/calendar 0.7.0 → 0.8.1

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,147 +1,148 @@
1
- import { jsxs as F, jsx as n } from "react/jsx-runtime";
2
- import { useCallback as H, useRef as K, useState as Tt, useEffect as P, useMemo as p } from "react";
3
- import { cn as x } from "../../lib/utils.js";
4
- import { generateTimeSlots as wt, formatDateLabel as Rt, formatTimeRange as q } from "../../lib/time.js";
5
- import { groupByResource as vt, computePositionedEvents as Ht } from "../../lib/overlap.js";
6
- import { computeUnavailableBlocks as bt } from "../../lib/availability.js";
7
- import { resourceGridViewDefaults as Ct } from "./defaults.js";
8
- import { GridHeader as St } from "./GridHeader.js";
9
- import { ResourceColumn as Dt } from "./ResourceColumn.js";
10
- import { TimeGutter as $t } from "../shared/TimeGutter.js";
11
- import { SlotInteractionLayer as kt } from "../shared/SlotInteractionLayer.js";
12
- import { SelectionOverlay as xt } from "../shared/SelectionOverlay.js";
13
- import { UnavailabilityOverlay as It } from "../shared/UnavailabilityOverlay.js";
14
- import { NowIndicator as Nt } from "../shared/NowIndicator.js";
15
- import { AllDayRow as Et } from "../shared/AllDayRow.js";
16
- import { useEffectiveHourHeight as jt } from "../shared/useEffectiveHourHeight.js";
17
- import { useAnnouncer as Bt } from "../shared/useAnnouncer.js";
18
- function Ut({
1
+ import { jsxs as F, jsx as l } from "react/jsx-runtime";
2
+ import { useCallback as H, useRef as K, useState as bt, useEffect as P, useMemo as p } from "react";
3
+ import { cn as I } from "../../lib/utils.js";
4
+ import { generateTimeSlots as vt, formatDateLabel as Rt, formatTimeRange as q } from "../../lib/time.js";
5
+ import { groupByResource as Ht, computePositionedEvents as Ct } from "../../lib/overlap.js";
6
+ import { computeUnavailableBlocks as St } from "../../lib/availability.js";
7
+ import { resourceGridViewDefaults as Dt } from "./defaults.js";
8
+ import { GridHeader as $t } from "./GridHeader.js";
9
+ import { ResourceColumn as kt } from "./ResourceColumn.js";
10
+ import { TimeGutter as xt } from "../shared/TimeGutter.js";
11
+ import { SlotInteractionLayer as It } from "../shared/SlotInteractionLayer.js";
12
+ import { SelectionOverlay as Et } from "../shared/SelectionOverlay.js";
13
+ import { UnavailabilityOverlay as jt } from "../shared/UnavailabilityOverlay.js";
14
+ import { NowIndicator as Lt } from "../shared/NowIndicator.js";
15
+ import { AllDayRow as Nt } from "../shared/AllDayRow.js";
16
+ import { useEffectiveHourHeight as Bt } from "../shared/useEffectiveHourHeight.js";
17
+ import { useAnnouncer as Mt } from "../shared/useAnnouncer.js";
18
+ import { getEventLabel as J, getClientNameLabel as Q } from "../../lib/accessibility.js";
19
+ function ee({
19
20
  date: a,
20
- timeZone: l,
21
- resources: o,
22
- events: I,
21
+ timeZone: n,
22
+ resources: r,
23
+ events: E,
23
24
  availability: y,
24
25
  unavailability: T,
25
26
  defaultUnavailable: w,
26
- timeAxis: b,
27
- onEventClick: N,
28
- snapDuration: E,
29
- placeholderDuration: J,
27
+ timeAxis: C,
28
+ onEventClick: j,
29
+ snapDuration: L,
30
+ placeholderDuration: X,
30
31
  selectedRange: f,
31
32
  onSelect: c,
32
- onSlotClick: C,
33
- className: Q,
34
- classNames: j,
35
- hourHeight: X = 60,
36
- columnMinWidth: Y = 120,
37
- renderHeader: _,
38
- renderEvent: S,
39
- selectionAppearance: U,
40
- dragPreviewAppearance: Z,
41
- selectionRef: tt,
42
- selectionLingerMs: D = 0,
33
+ onSlotClick: S,
34
+ className: Y,
35
+ classNames: N,
36
+ hourHeight: _ = 60,
37
+ columnMinWidth: U = 120,
38
+ renderHeader: Z,
39
+ renderEvent: D,
40
+ selectionAppearance: tt,
41
+ dragPreviewAppearance: et,
42
+ selectionRef: ot,
43
+ selectionLingerMs: $ = 0,
43
44
  selectedEventId: B,
44
45
  selectedEventRef: M,
45
- renderCorner: et,
46
+ renderCorner: rt,
46
47
  eventGap: it,
47
- eventLayout: ot = "columns",
48
- stackOffset: rt = 8
48
+ eventLayout: nt = "columns",
49
+ stackOffset: lt = 8
49
50
  }) {
50
- const d = b?.startHour ?? 0, m = b?.endHour ?? 24, $ = b?.intervalMinutes ?? 60, {
51
+ const d = C?.startHour ?? 0, m = C?.endHour ?? 24, k = C?.intervalMinutes ?? 60, {
51
52
  effectiveHourHeight: s,
52
- rootRef: lt,
53
- headerRef: nt,
54
- allDayRef: at,
55
- gridRef: dt,
53
+ rootRef: at,
54
+ headerRef: dt,
55
+ allDayRef: ct,
56
+ gridRef: mt,
56
57
  headerHeight: G
57
- } = jt(X, m - d), r = H(
58
- (t) => x(Ct[t], j?.[t]),
59
- [j]
60
- ), R = K(null), h = K(null), [ct, O] = Tt(
58
+ } = Bt(_, m - d), i = H(
59
+ (t) => I(Dt[t], N?.[t]),
60
+ [N]
61
+ ), b = K(null), h = K(null), [st, O] = bt(
61
62
  null
62
63
  );
63
64
  P(() => {
64
65
  if (f)
65
- h.current !== null && (clearTimeout(h.current), h.current = null), R.current = f;
66
- else if (R.current && D > 0) {
67
- const t = R.current;
68
- R.current = null, O(t), h.current = setTimeout(() => {
66
+ h.current !== null && (clearTimeout(h.current), h.current = null), b.current = f;
67
+ else if (b.current && $ > 0) {
68
+ const t = b.current;
69
+ b.current = null, O(t), h.current = setTimeout(() => {
69
70
  h.current = null, O(null);
70
- }, D);
71
+ }, $);
71
72
  }
72
- }, [f, D]);
73
- const v = f ?? ct, k = p(
74
- () => wt({ startHour: d, endHour: m, intervalMinutes: $ }),
75
- [d, m, $]
73
+ }, [f, $]);
74
+ const v = f ?? st, x = p(
75
+ () => vt({ startHour: d, endHour: m, intervalMinutes: k }),
76
+ [d, m, k]
76
77
  ), { allDayEvents: W, timedEvents: A } = p(() => {
77
78
  const t = [], e = [];
78
- for (const i of I)
79
- i.allDay ? t.push(i) : e.push(i);
79
+ for (const o of E)
80
+ o.allDay ? t.push(o) : e.push(o);
80
81
  return { allDayEvents: t, timedEvents: e };
81
- }, [I]), mt = p(
82
- () => vt(W),
82
+ }, [E]), ut = p(
83
+ () => Ht(W),
83
84
  [W]
84
- ), st = p(
85
- () => Ht(
85
+ ), ft = p(
86
+ () => Ct(
86
87
  A,
87
- l,
88
+ n,
88
89
  a,
89
90
  d,
90
91
  m,
91
92
  s
92
93
  ),
93
- [A, l, a, d, m, s]
94
- ), ut = p(() => {
94
+ [A, n, a, d, m, s]
95
+ ), pt = p(() => {
95
96
  if (!w && !y && !T)
96
97
  return /* @__PURE__ */ new Map();
97
98
  const t = /* @__PURE__ */ new Set([
98
99
  ...Object.keys(y ?? {}),
99
100
  ...Object.keys(T ?? {}),
100
- ...w ? o.map((i) => i.id) : []
101
+ ...w ? r.map((o) => o.id) : []
101
102
  ]), e = /* @__PURE__ */ new Map();
102
- for (const i of t) {
103
- const u = y?.[i], z = bt(
103
+ for (const o of t) {
104
+ const u = y?.[o], z = St(
104
105
  w && u === void 0 ? [] : u,
105
- T?.[i],
106
- l,
106
+ T?.[o],
107
+ n,
107
108
  a,
108
109
  d,
109
110
  m,
110
111
  s
111
112
  );
112
- z.length > 0 && e.set(i, z);
113
+ z.length > 0 && e.set(o, z);
113
114
  }
114
115
  return e;
115
116
  }, [
116
117
  w,
117
- o,
118
+ r,
118
119
  y,
119
120
  T,
120
- l,
121
+ n,
121
122
  a,
122
123
  d,
123
124
  m,
124
125
  s
125
- ]), { message: ft, announce: g } = Bt(), pt = p(
126
+ ]), { message: ht, announce: g } = Mt(), gt = p(
126
127
  () => `Schedule for ${Rt(a)}`,
127
128
  [a]
128
- ), L = H(
129
+ ), V = H(
129
130
  (t) => {
130
- if (c?.(null), N?.(t), t.allDay) {
131
- const e = [t.title, "all day"];
132
- t.clientName && e.push(t.clientName), g(`Selected: ${e.join(", ")}`);
131
+ if (c?.(null), j?.(t), t.allDay) {
132
+ const e = [J(t), "all day"], o = Q(t);
133
+ o && e.push(o), g(`Selected: ${e.join(", ")}`);
133
134
  } else {
134
135
  const e = [
135
- t.title,
136
- q(t.startTime, t.endTime, l)
137
- ];
138
- t.clientName && e.push(t.clientName);
139
- const i = o.find((u) => u.id === t.resourceId);
140
- i && e.push(i.name), g(`Selected: ${e.join(", ")}`);
136
+ J(t),
137
+ q(t.startTime, t.endTime, n)
138
+ ], o = Q(t);
139
+ o && e.push(o);
140
+ const u = r.find((R) => R.id === t.resourceId);
141
+ u && e.push(u.name), g(`Selected: ${e.join(", ")}`);
141
142
  }
142
143
  },
143
- [c, N, l, o, g]
144
- ), ht = H(
144
+ [c, j, n, r, g]
145
+ ), yt = H(
145
146
  (t) => {
146
147
  if (!t) {
147
148
  c?.(null);
@@ -153,20 +154,20 @@ function Ut({
153
154
  endTime: t.endTime
154
155
  };
155
156
  c?.(e);
156
- const i = [q(t.startTime, t.endTime, l)], u = o.find((V) => V.id === t.columnId);
157
- u && i.push(u.name), g(`Selected time: ${i.join(", ")}`);
157
+ const o = [q(t.startTime, t.endTime, n)], u = r.find((R) => R.id === t.columnId);
158
+ u && o.push(u.name), g(`Selected time: ${o.join(", ")}`);
158
159
  },
159
- [c, l, o, g]
160
- ), gt = H(
160
+ [c, n, r, g]
161
+ ), Tt = H(
161
162
  (t) => {
162
- const e = o.find((i) => i.id === t.columnId);
163
- e && C?.({
163
+ const e = r.find((o) => o.id === t.columnId);
164
+ e && S?.({
164
165
  resource: e,
165
166
  startTime: t.startTime,
166
167
  endTime: t.endTime
167
168
  });
168
169
  },
169
- [C, o]
170
+ [S, r]
170
171
  );
171
172
  P(() => {
172
173
  if (!f || !c) return;
@@ -175,46 +176,46 @@ function Ut({
175
176
  };
176
177
  return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
177
178
  }, [f, c]);
178
- const yt = s * $ / 60;
179
- return /* @__PURE__ */ F("div", { ref: lt, className: x(r("root"), Q), children: [
179
+ const wt = s * k / 60;
180
+ return /* @__PURE__ */ F("div", { ref: at, className: I(i("root"), Y), children: [
180
181
  /* @__PURE__ */ F(
181
182
  "div",
182
183
  {
183
- ref: dt,
184
- className: r("grid"),
184
+ ref: mt,
185
+ className: i("grid"),
185
186
  role: "region",
186
187
  "aria-roledescription": "calendar",
187
- "aria-label": pt,
188
+ "aria-label": gt,
188
189
  style: {
189
190
  display: "grid",
190
- gridTemplateColumns: `max-content repeat(${o.length}, minmax(${Y}px, 1fr))`,
191
- gridTemplateRows: `auto auto repeat(${k.length}, ${yt}px)`
191
+ gridTemplateColumns: `max-content repeat(${r.length}, minmax(${U}px, 1fr))`,
192
+ gridTemplateRows: `auto auto repeat(${x.length}, ${wt}px)`
192
193
  },
193
194
  children: [
194
- /* @__PURE__ */ n(
195
+ /* @__PURE__ */ l(
195
196
  "div",
196
197
  {
197
- ref: nt,
198
- className: r("cornerCell"),
198
+ ref: dt,
199
+ className: i("cornerCell"),
199
200
  style: { gridRow: 1, gridColumn: 1 },
200
- children: et?.({ timeZone: l, date: a })
201
+ children: rt?.({ timeZone: n, date: a })
201
202
  }
202
203
  ),
203
- o.map((t, e) => /* @__PURE__ */ n(
204
- St,
204
+ r.map((t, e) => /* @__PURE__ */ l(
205
+ $t,
205
206
  {
206
207
  resource: t,
207
208
  column: e + 2,
208
- cls: r,
209
- renderHeader: _
209
+ cls: i,
210
+ renderHeader: Z
210
211
  },
211
212
  t.id
212
213
  )),
213
- /* @__PURE__ */ n(
214
+ /* @__PURE__ */ l(
214
215
  "div",
215
216
  {
216
- ref: at,
217
- className: x(r("allDayCell"), "left-0 z-30"),
217
+ ref: ct,
218
+ className: I(i("allDayCell"), "left-0 z-30"),
218
219
  style: {
219
220
  gridRow: 2,
220
221
  gridColumn: 1,
@@ -222,22 +223,22 @@ function Ut({
222
223
  }
223
224
  }
224
225
  ),
225
- o.map((t, e) => /* @__PURE__ */ n(
226
+ r.map((t, e) => /* @__PURE__ */ l(
226
227
  "div",
227
228
  {
228
- className: r("allDayCell"),
229
+ className: i("allDayCell"),
229
230
  style: {
230
231
  gridRow: 2,
231
232
  gridColumn: e + 2,
232
233
  top: G,
233
- ...e === o.length - 1 ? { borderRightWidth: 0 } : {}
234
+ ...e === r.length - 1 ? { borderRightWidth: 0 } : {}
234
235
  },
235
- children: /* @__PURE__ */ n(
236
- Et,
236
+ children: /* @__PURE__ */ l(
237
+ Nt,
237
238
  {
238
- events: mt.get(t.id) ?? [],
239
- cls: r,
240
- onEventClick: L,
239
+ events: ut.get(t.id) ?? [],
240
+ cls: i,
241
+ onEventClick: V,
241
242
  selectedEventId: B,
242
243
  selectedEventRef: M
243
244
  }
@@ -245,121 +246,121 @@ function Ut({
245
246
  },
246
247
  `allday-${t.id}`
247
248
  )),
248
- k.map((t) => /* @__PURE__ */ n(
249
- $t,
249
+ x.map((t) => /* @__PURE__ */ l(
250
+ xt,
250
251
  {
251
252
  label: t.label,
252
253
  row: t.index + 3,
253
254
  isHourStart: t.isHourStart,
254
255
  isFirst: t.index === 0,
255
- cls: r
256
+ cls: i
256
257
  },
257
258
  t.index
258
259
  )),
259
- k.map(
260
- (t) => o.map((e, i) => /* @__PURE__ */ n(
260
+ x.map(
261
+ (t) => r.map((e, o) => /* @__PURE__ */ l(
261
262
  "div",
262
263
  {
263
- className: r(t.isHourStart ? "bodyCell" : "bodyCellMinor"),
264
+ className: i(t.isHourStart ? "bodyCell" : "bodyCellMinor"),
264
265
  style: {
265
266
  gridRow: t.index + 3,
266
- gridColumn: i + 2,
267
+ gridColumn: o + 2,
267
268
  ...t.isHourStart ? {} : { borderTopStyle: "dotted" },
268
269
  ...t.index === 0 ? { borderTopWidth: 0 } : {},
269
- ...i === o.length - 1 ? { borderRightWidth: 0 } : {}
270
+ ...o === r.length - 1 ? { borderRightWidth: 0 } : {}
270
271
  }
271
272
  },
272
273
  `${t.index}-${e.id}`
273
274
  ))
274
275
  ),
275
- o.map((t, e) => {
276
- const i = ut.get(t.id);
277
- return i ? /* @__PURE__ */ n(
278
- It,
276
+ r.map((t, e) => {
277
+ const o = pt.get(t.id);
278
+ return o ? /* @__PURE__ */ l(
279
+ jt,
279
280
  {
280
- blocks: i,
281
+ blocks: o,
281
282
  column: e + 2,
282
- cls: r
283
+ cls: i
283
284
  },
284
285
  `unavail-${t.id}`
285
286
  ) : null;
286
287
  }),
287
- E != null && o.map((t, e) => /* @__PURE__ */ n(
288
- kt,
288
+ L != null && r.map((t, e) => /* @__PURE__ */ l(
289
+ It,
289
290
  {
290
291
  columnId: t.id,
291
292
  fallbackColor: t.color,
292
293
  column: e + 2,
293
294
  date: a,
294
- timeZone: l,
295
+ timeZone: n,
295
296
  startHour: d,
296
297
  endHour: m,
297
298
  hourHeight: s,
298
- snapDuration: E,
299
- placeholderDuration: J ?? 15,
300
- cls: r,
301
- onSlotClick: C ? gt : void 0,
302
- onSelect: c ? ht : void 0,
303
- dragPreviewAppearance: Z,
304
- renderEvent: S
299
+ snapDuration: L,
300
+ placeholderDuration: X ?? 15,
301
+ cls: i,
302
+ onSlotClick: S ? Tt : void 0,
303
+ onSelect: c ? yt : void 0,
304
+ dragPreviewAppearance: et,
305
+ renderEvent: D
305
306
  },
306
307
  `slot-${t.id}`
307
308
  )),
308
- o.map((t, e) => /* @__PURE__ */ n(
309
- Dt,
309
+ r.map((t, e) => /* @__PURE__ */ l(
310
+ kt,
310
311
  {
311
312
  resource: t,
312
- positionedEvents: st.get(t.id) ?? [],
313
+ positionedEvents: ft.get(t.id) ?? [],
313
314
  column: e + 2,
314
- timeZone: l,
315
- cls: r,
316
- onEventClick: L,
317
- renderEvent: S,
315
+ timeZone: n,
316
+ cls: i,
317
+ onEventClick: V,
318
+ renderEvent: D,
318
319
  eventGap: it,
319
- eventLayout: ot,
320
- stackOffset: rt,
320
+ eventLayout: nt,
321
+ stackOffset: lt,
321
322
  selectedEventId: B,
322
323
  selectedEventRef: M
323
324
  },
324
325
  t.id
325
326
  )),
326
327
  v != null && (() => {
327
- const t = o.findIndex(
328
+ const t = r.findIndex(
328
329
  (e) => e.id === v.resourceId
329
330
  );
330
- return t === -1 ? null : /* @__PURE__ */ n(
331
- xt,
331
+ return t === -1 ? null : /* @__PURE__ */ l(
332
+ Et,
332
333
  {
333
334
  startTime: v.startTime,
334
335
  endTime: v.endTime,
335
- fallbackColor: o[t].color,
336
+ fallbackColor: r[t].color,
336
337
  column: t + 2,
337
338
  viewDate: a,
338
- timeZone: l,
339
+ timeZone: n,
339
340
  startHour: d,
340
341
  hourHeight: s,
341
- cls: r,
342
- appearance: U,
343
- selectionRef: tt,
344
- renderEvent: S
342
+ cls: i,
343
+ appearance: tt,
344
+ selectionRef: ot,
345
+ renderEvent: D
345
346
  }
346
347
  );
347
348
  })(),
348
- /* @__PURE__ */ n(
349
- Nt,
349
+ /* @__PURE__ */ l(
350
+ Lt,
350
351
  {
351
352
  date: a,
352
- timeZone: l,
353
+ timeZone: n,
353
354
  startHour: d,
354
355
  endHour: m,
355
356
  hourHeight: s,
356
- cls: r
357
+ cls: i
357
358
  }
358
359
  )
359
360
  ]
360
361
  }
361
362
  ),
362
- /* @__PURE__ */ n(
363
+ /* @__PURE__ */ l(
363
364
  "div",
364
365
  {
365
366
  "aria-live": "polite",
@@ -376,11 +377,11 @@ function Ut({
376
377
  whiteSpace: "nowrap",
377
378
  borderWidth: 0
378
379
  },
379
- children: ft
380
+ children: ht
380
381
  }
381
382
  )
382
383
  ] });
383
384
  }
384
385
  export {
385
- Ut as ResourceGridView
386
+ ee as ResourceGridView
386
387
  };
@@ -1 +1 @@
1
- {"version":3,"file":"AllDayRow.d.ts","sourceRoot":"","sources":["../../../src/components/shared/AllDayRow.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EACV,mBAAmB,EACnB,aAAa,EACb,kBAAkB,EACnB,MAAM,kBAAkB,CAAC;AAE1B,UAAU,cAAc;IACtB,MAAM,EAAE,mBAAmB,EAAE,CAAC;IAC9B,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,kBAAkB,KAAK,MAAM,CAAC;IAC/C,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC9C,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,gBAAgB,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CACxC;AAED,eAAO,MAAM,SAAS,sDAwDpB,CAAC"}
1
+ {"version":3,"file":"AllDayRow.d.ts","sourceRoot":"","sources":["../../../src/components/shared/AllDayRow.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EACV,mBAAmB,EACnB,aAAa,EACb,kBAAkB,EACnB,MAAM,kBAAkB,CAAC;AAE1B,UAAU,cAAc;IACtB,MAAM,EAAE,mBAAmB,EAAE,CAAC;IAC9B,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,kBAAkB,KAAK,MAAM,CAAC;IAC/C,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC9C,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,gBAAgB,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CACxC;AAED,eAAO,MAAM,SAAS,sDAyDpB,CAAC"}
@@ -1,22 +1,23 @@
1
- import { jsx as l, Fragment as m, jsxs as d } from "react/jsx-runtime";
2
- import { memo as u } from "react";
3
- import { cn as f } from "../../lib/utils.js";
4
- const x = u(function({
1
+ import { jsx as e, Fragment as d, jsxs as u } from "react/jsx-runtime";
2
+ import { memo as f } from "react";
3
+ import { cn as p } from "../../lib/utils.js";
4
+ import { getEventLabel as b, getClientNameLabel as h } from "../../lib/accessibility.js";
5
+ const j = f(function({
5
6
  events: o,
6
- cls: i,
7
- onEventClick: a,
7
+ cls: l,
8
+ onEventClick: s,
8
9
  selectedEventId: c,
9
- selectedEventRef: s
10
+ selectedEventRef: m
10
11
  }) {
11
- return o.length === 0 ? null : /* @__PURE__ */ l(m, { children: o.map((t) => {
12
- const r = t.id === c, e = [t.title, "all day"];
13
- t.clientName && e.push(t.clientName);
14
- const n = /* @__PURE__ */ d(
12
+ return o.length === 0 ? null : /* @__PURE__ */ e(d, { children: o.map((t) => {
13
+ const i = t.id === c, r = [b(t), "all day"], n = h(t);
14
+ n && r.push(n);
15
+ const a = /* @__PURE__ */ u(
15
16
  "button",
16
17
  {
17
18
  type: "button",
18
- "aria-label": e.join(", "),
19
- className: f(i("event"), r && i("eventSelected")),
19
+ "aria-label": r.join(", "),
20
+ className: p(l("event"), i && l("eventSelected")),
20
21
  style: {
21
22
  position: "relative",
22
23
  inset: "unset",
@@ -24,31 +25,31 @@ const x = u(function({
24
25
  flex: "1 1 0",
25
26
  minWidth: 0
26
27
  },
27
- onClick: () => a?.(t),
28
+ onClick: () => s?.(t),
28
29
  children: [
29
- t.color && /* @__PURE__ */ l(
30
+ t.color && /* @__PURE__ */ e(
30
31
  "div",
31
32
  {
32
- className: i("eventColorBar"),
33
+ className: l("eventColorBar"),
33
34
  style: { backgroundColor: t.color }
34
35
  }
35
36
  ),
36
- /* @__PURE__ */ l("div", { className: i("eventTitle"), children: t.title })
37
+ /* @__PURE__ */ e("div", { className: l("eventTitle"), children: t.title })
37
38
  ]
38
39
  },
39
40
  t.id
40
41
  );
41
- return r ? /* @__PURE__ */ l(
42
+ return i ? /* @__PURE__ */ e(
42
43
  "div",
43
44
  {
44
- ref: s,
45
+ ref: m,
45
46
  style: { flex: "1 1 0", minWidth: 0 },
46
- children: n
47
+ children: a
47
48
  },
48
49
  t.id
49
- ) : n;
50
+ ) : a;
50
51
  }) });
51
52
  });
52
53
  export {
53
- x as AllDayRow
54
+ j as AllDayRow
54
55
  };
@@ -1 +1 @@
1
- {"version":3,"file":"EventChip.d.ts","sourceRoot":"","sources":["../../../src/components/shared/EventChip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EACV,aAAa,EACb,WAAW,EACX,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EACnB,MAAM,kBAAkB,CAAC;AAG1B,UAA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