@open-webapp/calendar 0.13.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  Multi-account Google Calendar read-only sync (controller) plus React UI (`CalendarPane`, `CalendarSelector`). Storage and encryption are host-supplied adapters.
4
4
 
5
+ > **0.14.0 is additive and non-breaking.** The event details overlay is redesigned, and the optional `onRsvpChange` prop lets the host write RSVP changes. See [0.14.0](#0140-minor-additive-non-breaking).
6
+ >
5
7
  > **0.13.0 is BREAKING.** Clicking an event title now opens an in-pane event details overlay instead of a popup window. See [0.13.0](#0130-breaking-pre-10-minor).
6
8
  >
7
9
  > **0.12.0 is BREAKING.** See [0.12.0](#0120-breaking-pre-10-minor) for exclusive Unaccepted filtering and new RSVP defaults.
@@ -163,15 +165,93 @@ Call at top level of a vitest file; it registers a `describe('StorageAdapter con
163
165
  | `sourceNotice?` | `(source) => ReactNode` | per-source slot, rendered for `needs-scope` sources (e.g. re-consent button); without it the built-in reauth block is shown |
164
166
  | `onClose?` | `() => void` | |
165
167
  | `popupName?` | `string` | `window.open` name for the event popup window (default `notesdiary-cal-event`). The popup now opens only from the overlay's "Open in Google Calendar" link |
168
+ | `onRsvpChange?` | `(event: CalendarEvent, status: RsvpStatus) => Promise<void>` | 0.14.0. Host-owned RSVP writer. When absent, the overlay has no "Change RSVP" row. The package never writes to Google itself. See [Change RSVP](#change-rsvp-onrsvpchange) |
166
169
 
167
170
  #### Event details overlay
168
171
 
169
- A plain left click on an event title opens a bottom-sheet overlay inside the pane (`role="dialog"`, `aria-modal="true"`). It shows the time, calendar, organizer, Join and RSVP controls, location, a plain-text description, and attendees (the first 10, then "+N more"). It also has an "Open in Google Calendar" link.
172
+ A plain left click on an event title opens a bottom-sheet overlay inside the pane (`role="dialog"`, `aria-modal="true"`). The sheet is laid out like the event card, but larger, top to bottom:
173
+
174
+ 1. Top row, same information as the card: time range (or `All day`), Join (only when `joinUrl` is set), a read-only RSVP status, and the close (×) button.
175
+ 2. Title (the dialog's accessible name, an `h2`).
176
+ 3. Organizer row: the label "Organizer", the organizer label, and "(you)" when `organizer.self` is true. Hidden when there is no organizer label.
177
+ 4. Calendar line: calendar color dot, calendar name, source (account) label, and location when set.
178
+ 5. Description: plain text (HTML is stripped), with links kept clickable.
179
+ 6. Invitees (see [Invitee rules](#invitee-rules)).
180
+ 7. Change RSVP (see [Change RSVP](#change-rsvp-onrsvpchange)).
181
+ 8. "Open in Google Calendar" link (only when `htmlLink` is set).
170
182
 
171
- - Close with Escape, the close (X) button, or a click on the backdrop. Focus is trapped inside the sheet while it is open and returns to the title that opened it when it closes.
183
+ - Close with Escape, the close (X) button, or a click on the backdrop. Focus is trapped inside the sheet while it is open, starts on the sheet, and returns to the title that opened it when it closes.
172
184
  - Modified clicks (ctrl, cmd, shift, alt, or middle click) keep the native new-tab behavior of the title link.
173
185
  - Events without an `htmlLink` still open the overlay. The "Open in Google Calendar" link is hidden for them.
174
186
  - There is no prop to opt out. Hosts that relied on the title click opening a popup window must use the overlay's link or handle the click themselves.
187
+ - The time-range formatting is the same as the event card's.
188
+
189
+ ##### Invitee rules
190
+
191
+ - The heading reads `Invitees (N)`, where N is the total number of attendees.
192
+ - The summary line counts each status: `yes` (accepted), `maybe` (tentative), `awaiting` (needs action, and any unknown status), `no` (declined), joined with ` · `. Zero buckets are omitted, so the summary reads, for example, `2 yes · 1 maybe · 1 awaiting`. An empty attendee list gives an empty summary.
193
+ - Order: the organizer first, then you (self), then accepted, tentative, needs action, declined. Within each status, rows sort by name (display name, else email), case-insensitively. An organizer who is also you appears once, first.
194
+ - Tags: `Organizer` on the organizer's row and `(you)` on your row. Every row shows its status glyph and label (Accepted, Maybe, Declined, Unaccepted). An attendee without a display name shows the email.
195
+ - At most 10 rows show at first. A `Show all N` button expands the list in place and changes to `Show fewer`. It sets `aria-expanded`.
196
+
197
+ ##### Hidden-row matrix
198
+
199
+ | Case | Invitees | Change RSVP | Organizer row |
200
+ | --- | --- | --- | --- |
201
+ | No attendees | hidden | hidden | shown when there is an organizer label |
202
+ | Only you are listed | hidden | hidden | shown when there is an organizer label |
203
+ | You are not invited (no attendee is `self`) | shown | hidden | shown when there is an organizer label |
204
+ | Invited, no `onRsvpChange` | shown | hidden | shown when there is an organizer label |
205
+ | Invited, `onRsvpChange` provided | shown | shown | shown when there is an organizer label |
206
+
207
+ ##### Change RSVP (`onRsvpChange`)
208
+
209
+ `onRsvpChange` is an optional prop on `CalendarPane`. The host does the write; the package makes no Google request for it and asks for no new OAuth scopes. Recurring events are handled per instance: the `event` passed to the host is the instance the user opened.
210
+
211
+ - The row is a radiogroup labeled "Change RSVP" with three options: Yes (accepted), Maybe (tentative), and No (declined). Unaccepted is not offered. Each option is a radio with `aria-checked`. Arrow keys move between options. The row shows only when the prop is set, you are an attendee, and the event has attendees.
212
+ - Choosing an option calls `onRsvpChange(event, status)` once. Choosing the already selected option still calls it, so a host can rely on one call per click.
213
+ - Optimistic update: the overlay and the event card show the new status at once. The options are disabled while the write is pending, and a live region reads "Updating RSVP...".
214
+ - Success: the override stays until a controller refresh delivers that event, so the server's status takes over then. If the new status is hidden by the RSVP filter chips, the overlay stays open, and the card leaves the list only after the overlay closes. Changing filter chips still closes the overlay, as before.
215
+ - Failure: if the promise rejects or throws, or does not settle within **60 seconds** (`RSVP_PENDING_TIMEOUT_MS = 60000`), the previous status comes back and the live region shows "Couldn't update RSVP. Retry". Retry sends the last chosen status again. A result that arrives after the timeout is ignored. The timer is not cleared by closing the overlay, so a timed-out write still rolls back. In that case no error message shows, because the overlay is closed.
216
+ - The overlay's status and the card's status come from the same override, so both change together.
217
+
218
+ Host example. The host owns the token and the Google request. Fetch the event, change only your own attendee entry, then patch the attendee list:
219
+
220
+ ```tsx
221
+ <CalendarPane
222
+ // ...other props
223
+ onRsvpChange={async (event, status) => {
224
+ const token = await getAccessToken(event.sourceId); // host-owned token
225
+ const calendarId = encodeURIComponent(event.calendarId ?? 'primary');
226
+ const eventUrl = `https://www.googleapis.com/calendar/v3/calendars/${calendarId}/events/${encodeURIComponent(event.id)}`;
227
+ const headers = { Authorization: `Bearer ${token}`, 'Content-Type': 'application/json' };
228
+
229
+ const current = await fetch(eventUrl, { headers }).then((r) => {
230
+ if (!r.ok) throw new Error(`GET event failed: ${r.status}`);
231
+ return r.json();
232
+ });
233
+ const attendees = (current.attendees ?? []).map((a: { self?: boolean; responseStatus?: string }) =>
234
+ a.self ? { ...a, responseStatus: status } : a,
235
+ );
236
+
237
+ const res = await fetch(`${eventUrl}?sendUpdates=all`, {
238
+ method: 'PATCH',
239
+ headers,
240
+ body: JSON.stringify({ attendees }),
241
+ });
242
+ if (!res.ok) throw new Error(`PATCH event failed: ${res.status}`); // rejects, so the overlay rolls back
243
+ }}
244
+ />
245
+ ```
246
+
247
+ Google's `responseStatus` values match `RsvpStatus` for the three options (`accepted`, `tentative`, `declined`). Choose `sendUpdates` to match your notification policy.
248
+
249
+ ##### Footer-safe overlay
250
+
251
+ - When the pane renders its footer (`.calendar-pane--has-footer`, which needs calendars), the backdrop and sheet stop at the footer's top edge. The footer stays visible, undimmed, and clickable. Without a footer, the overlay covers the whole pane.
252
+ - The footer height comes from `--calendar-footer-height` (default `64px`). If the host changes the footer height, set this variable on `.calendar-pane` to match.
253
+ - The sheet's maximum height is 80% of the area above the footer, and it scrolls internally.
254
+ - A click on the footer while the overlay is open closes the overlay, and the footer action still runs (for example, the calendar dropdown opens). Focus does not return to the title in that case, because the footer action takes focus.
175
255
 
176
256
  `CalendarEvent` gains optional fields used by the overlay: `location?: string`, `description?: string` (HTML is converted to plain text for display), and `attendees?: CalendarEventAttendee[]`, where `CalendarEventAttendee` is `{ email: string; displayName?: string; responseStatus: RsvpStatus; self?: boolean; organizer?: boolean }`. Missing fields are simply not shown.
177
257
 
@@ -244,16 +324,30 @@ Day ribbon styling: each day's ribbon alternates between two tones by day parity
244
324
 
245
325
  The Unaccepted count badge uses `.calendar-rsvp-chip-badge`, with light and dark styling included in `styles.css`.
246
326
 
247
- Event details overlay (0.13.0): `.calendar-event-details` is the full-pane backdrop (absolutely positioned inside the pane root, dimmed, bottom-aligned) and `.calendar-event-details-sheet` is the bottom sheet (max 80% of the pane height, scrolls internally). Both use the pane's palette tokens, so they follow the pane's `theme`. Inner hooks: `-grabber`, `-header`, `-dot`, `-title`, `-close`, `-body`, `-when`, `-calendar`, and related `calendar-event-details-*` section classes. The overlay is positioned against the nearest positioned ancestor, so the pane root must stay positioned.
327
+ Event details overlay (0.13.0, footer-safe and redesigned in 0.14.0): `.calendar-event-details` is the backdrop (absolutely positioned inside the pane root, dimmed, bottom-aligned). In a pane with a footer, `.calendar-pane--has-footer > .calendar-event-details` sets `bottom: var(--calendar-footer-height)` so the footer is not covered. `.calendar-event-details-sheet` is the bottom sheet (max 80% of the area above the footer, scrolls internally). Both use the pane's palette tokens, so they follow the pane's `theme`. The overlay is positioned against the nearest positioned ancestor, so the pane root must stay positioned.
328
+
329
+ Overlay hooks (0.14.0). Layout: `-grabber`, `-toprow`, `-time`, `-close`, `-header`, `-title`, `-dot`, `-body`. Sections: `-organizer`, `-calendar`, `-location` (span inside `-calendar`), `-description`, `-invitees` (contains `h3`, `-invitee-summary`, `ul`/`li`), `-tag` (Organizer and (you) tags), `-rsvp` (contains `[role='radiogroup']`, `[role='radio']` with `aria-checked`, and `-rsvp-status` for the live region), `-open`. The per-row status pill uses the shared `.calendar-event-rsvp` and `.calendar-event-rsvp--{status}` classes. The 0.13.0 `-when`, `-actions` and `-attendees` section classes are no longer rendered. Disabled RSVP options carry the native `disabled` attribute and the `:disabled` style.
330
+
331
+ The `--calendar-footer-height` variable is the one host value the overlay reads. Keep it equal to the host's footer height when the footer is changed.
248
332
 
249
333
  The shared `.calendar-selector-trigger` uses border-box inline-flex, centered alignment, an 8px gap, 36px minimum height, 8px 12px padding, 6px radius, a 1px solid control border, inherited font and pointer cursor. `.calendar-selector-trigger-label` bounds long labels with ellipsis; `.calendar-selector-chevron` stays 12px and does not shrink or add a tab stop. Existing scoped surface/text/control-border tokens style the resting trigger, the hover token supplies its hover background, and the focus token supplies a 2px `:focus-visible` outline with 2px offset. The default 64px footer and 6px upward clearance remain unchanged. Only pane dropdowns use the approved trigger-left, pane-inset and available-height exception; standalone selectors retain their existing right-aligned 220px-to-320px geometry and 240px options cap. Import the shipped stylesheet for both footer and standalone use.
250
334
 
251
335
  Done, Select all and Clear use the approved action-only flat styling via `.calendar-selector-actions > button` in standalone and grouped footer dropdowns: transparent resting background, zero border, no shadow, inherited font, `--calendar-selector-text` color and pointer cursor. Hover uses `--calendar-hover`; pointer focus has no decorative outline, while keyboard `:focus-visible` uses a 2px solid `--calendar-focus` outline with 2px offset. Action padding, row flex layout and 8px gap/top/bottom margins, footer/dropdown geometry, trigger/search/option styling, other native controls and all selection, callback and focus-return contracts are preserved.
252
336
 
337
+ ## 0.14.0 (minor, additive, non-breaking)
338
+
339
+ - Additive only. No existing prop, return value, thrown error, storage field or contract test changed. No migration is required. The version bump is 0.13.0 to 0.14.0.
340
+ - Event details overlay redesigned: a top row matching the card (time or `All day`, Join, read-only RSVP status, close), then title, Organizer, calendar and location, description, Invitees, Change RSVP, and "Open in Google Calendar".
341
+ - Invitees section: `Invitees (N)`, a summary line (`yes`, `maybe`, `awaiting`, `no`), and a sorted list with Organizer and (you) tags. Ten rows show first, with a `Show all N` button that expands in place.
342
+ - New optional `onRsvpChange?: (event, status) => Promise<void>` prop on `CalendarPane`. The host performs the Google write with its own token. The package makes no Google write and requests no new scopes. Without the prop, the overlay has no Change RSVP row.
343
+ - RSVP changes are optimistic: the overlay and card update at once. A rejected or timed-out (60 seconds) write rolls back and shows "Couldn't update RSVP. Retry", with Retry resending the last status.
344
+ - The overlay is footer-safe. With a footer rendered, the footer stays visible and clickable above the overlay, and the overlay height is limited by `--calendar-footer-height`.
345
+ - New and renamed overlay CSS hooks are listed under [Host CSS](#host-css). `-when`, `-actions` and `-attendees` are no longer rendered.
346
+
253
347
  ## 0.13.0 (BREAKING pre-1.0 minor)
254
348
 
255
349
  - Plain left click on an event title opens an in-pane event details overlay (bottom sheet, `role="dialog"`, `aria-modal`) instead of the event popup window. It closes with Escape, the X button or the backdrop, traps focus while open and returns focus to the title on close.
256
- - The overlay shows time, calendar, organizer, Join and RSVP, location, plain-text description, and attendees (max 10, then "+N more"), with an "Open in Google Calendar" link.
350
+ - The overlay shows time, calendar, organizer, Join and RSVP, location, plain-text description, and the first 10 attendees, with an "Open in Google Calendar" link.
257
351
  - The `popupName` popup window now opens only from that link. Modified clicks (ctrl/cmd/shift/alt/middle) keep the native new-tab behavior. Events without `htmlLink` open the overlay too.
258
352
  - `CalendarEvent` gains optional `location`, `description` and `attendees` (`CalendarEventAttendee[]`). Existing rows without them still read.
259
353
  - New host CSS hooks: `.calendar-event-details` and `.calendar-event-details-sheet`.
@@ -20,7 +20,13 @@ export interface CalendarPaneProps {
20
20
  onReconnect?: () => void;
21
21
  /** Window name used for the event popup. */
22
22
  popupName?: string;
23
+ /**
24
+ * Optional host-provided RSVP writer. When present, the event details overlay shows a
25
+ * "Change RSVP" row. The package never writes to Google itself; the host performs the write.
26
+ */
27
+ onRsvpChange?: (event: CalendarEvent, status: RsvpStatus) => Promise<void>;
23
28
  }
29
+ export declare const RSVP_PENDING_TIMEOUT_MS = 60000;
24
30
  export declare const RSVP_CHIPS: {
25
31
  status: RsvpStatus;
26
32
  label: string;
@@ -31,4 +37,5 @@ export declare function RsvpGlyph({ path, size, strokeWidth }: {
31
37
  size?: number;
32
38
  strokeWidth?: number;
33
39
  }): import("react").JSX.Element;
40
+ export declare function formatTimeRange(event: CalendarEvent): string;
34
41
  export declare function CalendarPane(props: CalendarPaneProps): import("react").JSX.Element;
@@ -26,6 +26,7 @@ function nextRsvpSelection(selection, status, saved) {
26
26
  return { next: next.size === 0 ? new Set(DEFAULT_RSVP_STATUSES) : next, saved: null };
27
27
  }
28
28
  const SOURCE_COLORS = ['#4285f4', '#ea4335', '#34a853', '#fbbc04', '#a142f4', '#00acc1', '#ff7043', '#8d6e63'];
29
+ export const RSVP_PENDING_TIMEOUT_MS = 60000;
29
30
  export const RSVP_CHIPS = [
30
31
  {
31
32
  status: 'accepted',
@@ -98,7 +99,7 @@ function formatTimeOfDay(dateTime) {
98
99
  const d = new Date(dateTime);
99
100
  return d.toLocaleTimeString(undefined, { hour: 'numeric', minute: '2-digit' });
100
101
  }
101
- function formatTimeRange(event) {
102
+ export function formatTimeRange(event) {
102
103
  const startDateTime = event.start.dateTime;
103
104
  const endDateTime = event.end.dateTime;
104
105
  if (!startDateTime)
@@ -128,7 +129,44 @@ export function CalendarPane(props) {
128
129
  void Promise.resolve(controller.hydrate()).catch(() => { });
129
130
  }, [controller]);
130
131
  // eslint-disable-next-line react-hooks/exhaustive-deps
131
- const events = useMemo(() => controller.getEvents(), [controller, version]);
132
+ const serverEvents = useMemo(() => controller.getEvents(), [controller, version]);
133
+ const [overrides, setOverrides] = useState(() => new Map());
134
+ const events = useMemo(() => overrides.size === 0
135
+ ? serverEvents
136
+ : serverEvents.map((e) => {
137
+ const o = overrides.get(getCalendarEventKey(e));
138
+ return o ? { ...e, selfResponseStatus: o } : e;
139
+ }), [serverEvents, overrides]);
140
+ const [rsvpPending, setRsvpPending] = useState(false);
141
+ const [rsvpError, setRsvpError] = useState(false);
142
+ const rsvpPendingRef = useRef(false);
143
+ const rsvpTimerRef = useRef(null);
144
+ const mountedRef = useRef(true);
145
+ const detailKeyRef = useRef(null);
146
+ useEffect(() => {
147
+ mountedRef.current = true;
148
+ return () => {
149
+ mountedRef.current = false;
150
+ if (rsvpTimerRef.current)
151
+ clearTimeout(rsvpTimerRef.current);
152
+ };
153
+ }, []);
154
+ // Server truth wins: a refresh delivering a key clears its override.
155
+ useEffect(() => {
156
+ setOverrides((prev) => {
157
+ if (prev.size === 0)
158
+ return prev;
159
+ const keys = new Set(serverEvents.map(getCalendarEventKey));
160
+ const next = new Map(prev);
161
+ let changed = false;
162
+ for (const k of prev.keys())
163
+ if (keys.has(k)) {
164
+ next.delete(k);
165
+ changed = true;
166
+ }
167
+ return changed ? next : prev;
168
+ });
169
+ }, [serverEvents]);
132
170
  const statuses = controller.getSourceStatus();
133
171
  const connected = props.connected ?? sources.length > 0;
134
172
  const ctrlState = typeof controller.getState === 'function'
@@ -153,6 +191,56 @@ export function CalendarPane(props) {
153
191
  const [now, setNow] = useState(() => new Date());
154
192
  const [detail, setDetail] = useState(null);
155
193
  const detailKey = detail ? getCalendarEventKey(detail.snapshot) : null;
194
+ detailKeyRef.current = detailKey;
195
+ useEffect(() => {
196
+ setRsvpPending(false);
197
+ setRsvpError(false);
198
+ }, [detailKey]);
199
+ function handleRsvpChange(_event, status) {
200
+ const onRsvpChange = props.onRsvpChange;
201
+ const raw = detail?.snapshot;
202
+ if (!onRsvpChange || !raw || rsvpPendingRef.current)
203
+ return;
204
+ const key = getCalendarEventKey(raw);
205
+ const rollback = () => setOverrides((m) => {
206
+ if (!m.has(key))
207
+ return m;
208
+ const n = new Map(m);
209
+ n.delete(key);
210
+ return n;
211
+ });
212
+ let done = false;
213
+ const finish = (ok) => {
214
+ if (done)
215
+ return;
216
+ done = true;
217
+ if (rsvpTimerRef.current)
218
+ clearTimeout(rsvpTimerRef.current);
219
+ rsvpTimerRef.current = null;
220
+ rsvpPendingRef.current = false;
221
+ if (!mountedRef.current)
222
+ return;
223
+ if (!ok)
224
+ rollback();
225
+ if (detailKeyRef.current === key) {
226
+ setRsvpPending(false);
227
+ setRsvpError(!ok);
228
+ }
229
+ };
230
+ rsvpPendingRef.current = true;
231
+ setRsvpPending(true);
232
+ setRsvpError(false);
233
+ setOverrides((m) => new Map(m).set(key, status));
234
+ rsvpTimerRef.current = setTimeout(() => finish(false), RSVP_PENDING_TIMEOUT_MS);
235
+ let p;
236
+ try {
237
+ p = Promise.resolve(onRsvpChange(raw, status));
238
+ }
239
+ catch {
240
+ p = Promise.reject(new Error('rsvp failed'));
241
+ }
242
+ p.then(() => finish(true), () => finish(false));
243
+ }
156
244
  function closeDetail(returnFocus) {
157
245
  const trigger = detail?.trigger;
158
246
  setDetail(null);
@@ -163,10 +251,10 @@ export function CalendarPane(props) {
163
251
  useEffect(() => {
164
252
  if (detailKey === null)
165
253
  return;
166
- const fresh = events.find((e) => getCalendarEventKey(e) === detailKey);
254
+ const fresh = serverEvents.find((e) => getCalendarEventKey(e) === detailKey);
167
255
  if (fresh)
168
256
  setDetail((d) => (d && d.snapshot !== fresh ? { ...d, snapshot: fresh } : d));
169
- }, [events, detailKey]);
257
+ }, [serverEvents, detailKey]);
170
258
  const selectionSignature = sources
171
259
  .map((s) => `${s.id}:${[...controller.getSelectedIds(s.id)].sort().join(',')}`)
172
260
  .join('|');
@@ -200,7 +288,10 @@ export function CalendarPane(props) {
200
288
  }
201
289
  }, [selectedRsvpStatuses]);
202
290
  const unacceptedCount = useMemo(() => events.filter((event) => event.selfResponseStatus === 'needsAction').length, [events]);
203
- const filteredEvents = useMemo(() => filterByRsvp(events, selectedRsvpStatuses), [events, selectedRsvpStatuses]);
291
+ const filteredEvents = useMemo(() => {
292
+ const visible = new Set(filterByRsvp(events, selectedRsvpStatuses));
293
+ return events.filter((e) => visible.has(e) || getCalendarEventKey(e) === detailKey);
294
+ }, [events, selectedRsvpStatuses, detailKey]);
204
295
  const calendarsByKey = useMemo(() => {
205
296
  const map = new Map();
206
297
  for (const s of sources)
@@ -426,7 +517,7 @@ export function CalendarPane(props) {
426
517
  const loading = ctrlState.loading && filteredEvents.length === 0;
427
518
  const emptyStateText = 'No matching events in the next 30 days';
428
519
  const showCalendarSelector = calendarSources.length > 0;
429
- return (_jsxs("div", { className: "calendar-pane", "data-calendar-theme": theme, ref: paneRef, children: [_jsxs("div", { className: "calendar-pane-scroll", ref: scrollRef, children: [_jsxs("div", { className: "calendar-rsvp-chips", ref: chipsRef, children: [_jsx("div", { className: "calendar-rsvp-chip-group", role: "group", "aria-label": "RSVP Status Filters", children: RSVP_CHIPS.map((chip) => (_jsxs("button", { type: "button", className: `calendar-rsvp-chip${selectedRsvpStatuses.has(chip.status) ? ' selected' : ''}`, "aria-pressed": selectedRsvpStatuses.has(chip.status), "aria-label": chip.status === 'needsAction' ? `${chip.label} (${unacceptedCount})` : chip.label, title: chip.status === 'needsAction' ? `${chip.label} (${unacceptedCount})` : chip.label, onClick: () => handleToggle(chip.status), children: [_jsx(RsvpGlyph, { path: chip.path }), chip.status === 'needsAction' && unacceptedCount > 0 && (_jsx("span", { className: "calendar-rsvp-chip-badge", "aria-hidden": "true", children: unacceptedCount > 99 ? '99+' : unacceptedCount }))] }, chip.status))) }), _jsx("button", { type: "button", className: "calendar-today-btn", "aria-label": "Scroll to today", title: "Scroll to today", onClick: () => recenter('smooth'), children: "Today" })] }), needsScopeSources.map((s) => (_jsx("div", { children: props.sourceNotice?.(s) }, s.id))), error && (_jsx("div", { className: "empty-state calendar-empty-state", role: "alert", children: _jsx("p", { children: "Couldn't load calendar events. Try again shortly." }) })), !(error && filteredEvents.length === 0) && (_jsxs("div", { className: "calendar-day-groups", children: [dayGroups.map((group) => (_jsxs("div", { className: "calendar-day-group", children: [_jsx("div", { className: "calendar-day-header", ref: (el) => {
520
+ return (_jsxs("div", { className: `calendar-pane${showCalendarSelector ? ' calendar-pane--has-footer' : ''}`, "data-calendar-theme": theme, ref: paneRef, children: [_jsxs("div", { className: "calendar-pane-scroll", ref: scrollRef, children: [_jsxs("div", { className: "calendar-rsvp-chips", ref: chipsRef, children: [_jsx("div", { className: "calendar-rsvp-chip-group", role: "group", "aria-label": "RSVP Status Filters", children: RSVP_CHIPS.map((chip) => (_jsxs("button", { type: "button", className: `calendar-rsvp-chip${selectedRsvpStatuses.has(chip.status) ? ' selected' : ''}`, "aria-pressed": selectedRsvpStatuses.has(chip.status), "aria-label": chip.status === 'needsAction' ? `${chip.label} (${unacceptedCount})` : chip.label, title: chip.status === 'needsAction' ? `${chip.label} (${unacceptedCount})` : chip.label, onClick: () => handleToggle(chip.status), children: [_jsx(RsvpGlyph, { path: chip.path }), chip.status === 'needsAction' && unacceptedCount > 0 && (_jsx("span", { className: "calendar-rsvp-chip-badge", "aria-hidden": "true", children: unacceptedCount > 99 ? '99+' : unacceptedCount }))] }, chip.status))) }), _jsx("button", { type: "button", className: "calendar-today-btn", "aria-label": "Scroll to today", title: "Scroll to today", onClick: () => recenter('smooth'), children: "Today" })] }), needsScopeSources.map((s) => (_jsx("div", { children: props.sourceNotice?.(s) }, s.id))), error && (_jsx("div", { className: "empty-state calendar-empty-state", role: "alert", children: _jsx("p", { children: "Couldn't load calendar events. Try again shortly." }) })), !(error && filteredEvents.length === 0) && (_jsxs("div", { className: "calendar-day-groups", children: [dayGroups.map((group) => (_jsxs("div", { className: "calendar-day-group", children: [_jsx("div", { className: "calendar-day-header", ref: (el) => {
430
521
  if (el) {
431
522
  dayHeaderRefs.current.set(group.dateKey, el);
432
523
  }
@@ -460,7 +551,11 @@ export function CalendarPane(props) {
460
551
  timedEventRefs.current.delete(eventKey);
461
552
  }
462
553
  }, children: [_jsxs("div", { className: "calendar-event-header", children: [_jsx("span", { className: "calendar-event-time", children: formatTimeRange(event) }), _jsxs("div", { className: "calendar-event-actions", children: [event.joinUrl && (_jsx("a", { className: "calendar-event-join", href: event.joinUrl, target: "_blank", rel: "noopener noreferrer", onClick: (e) => e.stopPropagation(), children: "Join" })), _jsx(RsvpStatusIcon, { status: event.selfResponseStatus })] })] }), _jsxs("div", { className: "calendar-event-title-wrap", children: [renderTitle(event), props.renderEventAction?.(event)] }), showCalendarLabel && (_jsxs("span", { className: "calendar-event-calendar", children: [_jsx("span", { className: "calendar-event-calendar-dot", style: { backgroundColor: calendar.backgroundColor } }), calendar.summary] })), showOrganizerLabel && (_jsxs("span", { className: "calendar-event-organizer", children: [multi && (_jsx("span", { className: "calendar-event-source-dot", style: { backgroundColor: sourceColor(event.sourceId) } })), organizerText] }))] }, eventKey));
463
- }) })] }))] }, group.dateKey))), loading && _jsx("p", { className: "calendar-empty-state-text", children: "Loading calendar\u2026" }), filteredEvents.length === 0 && !loading && !error && needsScopeSources.length === 0 && _jsx("p", { className: "calendar-empty-state-text", children: emptyStateText })] }))] }), showCalendarSelector && (_jsx("footer", { className: "calendar-pane-footer", children: _jsx(GroupedCalendarSelector, { theme: theme, groups: calendarSources.map((s) => ({
554
+ }) })] }))] }, group.dateKey))), loading && _jsx("p", { className: "calendar-empty-state-text", children: "Loading calendar\u2026" }), filteredEvents.length === 0 && !loading && !error && needsScopeSources.length === 0 && _jsx("p", { className: "calendar-empty-state-text", children: emptyStateText })] }))] }), showCalendarSelector && (_jsx("footer", { className: "calendar-pane-footer", onPointerDownCapture: () => {
555
+ // Close without preventDefault/stopPropagation so the footer action proceeds.
556
+ if (detail)
557
+ setDetail(null);
558
+ }, children: _jsx(GroupedCalendarSelector, { theme: theme, groups: calendarSources.map((s) => ({
464
559
  id: s.id,
465
560
  calendars: controller.getCalendars(s.id),
466
561
  selectedIds: controller.getSelectedIds(s.id),
@@ -468,5 +563,8 @@ export function CalendarPane(props) {
468
563
  void controller.setSelectedIds(s.id, ids);
469
564
  },
470
565
  heading: multi ? s.email : undefined,
471
- })) }) })), detail && (_jsx(EventDetails, { event: detail.snapshot, calendar: calendarsByKey.get(`${detail.snapshot.sourceId}\u0000${detail.snapshot.calendarId}`), sourceLabel: multi ? sourceEmail(detail.snapshot.sourceId) : '', onClose: () => closeDetail(true), onOpenLink: (url) => openEventPopup(url, popupRef, popupName) }))] }));
566
+ })) }) })), detail && (_jsx(EventDetails, { event: (() => {
567
+ const o = overrides.get(detailKey);
568
+ return o ? { ...detail.snapshot, selfResponseStatus: o } : detail.snapshot;
569
+ })(), onRsvpChange: props.onRsvpChange ? handleRsvpChange : undefined, pending: rsvpPending, error: rsvpError, calendar: calendarsByKey.get(`${detail.snapshot.sourceId}\u0000${detail.snapshot.calendarId}`), sourceLabel: multi ? sourceEmail(detail.snapshot.sourceId) : '', onClose: () => closeDetail(true), onOpenLink: (url) => openEventPopup(url, popupRef, popupName) }))] }));
472
570
  }
@@ -1,9 +1,13 @@
1
- import type { CalendarEvent, CalendarInfo } from '../core/types.js';
1
+ import type { CalendarEvent, CalendarInfo, RsvpStatus } from '../core/types.js';
2
2
  export interface EventDetailsProps {
3
3
  event: CalendarEvent;
4
4
  calendar?: CalendarInfo;
5
5
  sourceLabel: string;
6
6
  onClose: () => void;
7
7
  onOpenLink: (url: string) => void;
8
+ onRsvpChange?: (event: CalendarEvent, status: RsvpStatus) => void | Promise<void>;
9
+ pending?: boolean;
10
+ error?: boolean | string;
11
+ onRetry?: () => void;
8
12
  }
9
- export declare function EventDetails({ event, calendar, sourceLabel, onClose, onOpenLink }: EventDetailsProps): import("react").JSX.Element;
13
+ export declare function EventDetails({ event, calendar, sourceLabel, onClose, onOpenLink, onRsvpChange, pending, error, onRetry }: EventDetailsProps): import("react").JSX.Element;
@@ -1,9 +1,15 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useEffect, useRef } from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useEffect, useRef, useState } from 'react';
3
3
  import { getOrganizerLabel } from '../core/events.js';
4
- import { RSVP_CHIPS, RsvpGlyph } from './CalendarPane.js';
5
- import { formatEventWhen, htmlToPlainText, linkifyText } from './detailsText.js';
6
- const MAX_ATTENDEES = 10;
4
+ import { RSVP_CHIPS, RsvpGlyph, formatTimeRange } from './CalendarPane.js';
5
+ import { htmlToPlainText, linkifyText } from './detailsText.js';
6
+ import { sortInvitees, summarizeInvitees } from './inviteeUtils.js';
7
+ const RSVP_OPTIONS = [
8
+ { status: 'accepted', label: 'Yes' },
9
+ { status: 'tentative', label: 'Maybe' },
10
+ { status: 'declined', label: 'No' },
11
+ ];
12
+ const MAX_INVITEES = 10;
7
13
  const FOCUSABLE = 'a[href],button:not([disabled]),[tabindex]:not([tabindex="-1"])';
8
14
  function rsvpOf(status) {
9
15
  return RSVP_CHIPS.find((c) => c.status === status) ?? RSVP_CHIPS[3];
@@ -12,15 +18,44 @@ function Status({ status }) {
12
18
  const g = rsvpOf(status);
13
19
  return (_jsxs("span", { className: `calendar-event-rsvp calendar-event-rsvp--${g.status}`, children: [_jsx(RsvpGlyph, { path: g.path, size: 14, strokeWidth: 2.4 }), " ", g.label] }));
14
20
  }
15
- export function EventDetails({ event, calendar, sourceLabel, onClose, onOpenLink }) {
21
+ export function EventDetails({ event, calendar, sourceLabel, onClose, onOpenLink, onRsvpChange, pending, error, onRetry }) {
16
22
  const sheetRef = useRef(null);
23
+ const lastStatus = useRef(null);
24
+ const [expanded, setExpanded] = useState(false);
17
25
  useEffect(() => {
18
26
  sheetRef.current?.focus();
19
27
  }, []);
20
- const when = formatEventWhen(event.start.dateTime ?? event.start.date, event.end.dateTime ?? event.end.date, event.isAllDay);
28
+ const time = event.isAllDay ? 'All day' : formatTimeRange(event);
21
29
  const organizer = getOrganizerLabel(event);
22
30
  const description = htmlToPlainText(event.description);
23
31
  const attendees = event.attendees ?? [];
32
+ const onlySelf = attendees.length === 1 && !!attendees[0].self;
33
+ const showInvitees = attendees.length > 0 && !onlySelf;
34
+ const invited = attendees.some((a) => a.self);
35
+ const showRsvp = !!onRsvpChange && showInvitees && invited;
36
+ const sorted = showInvitees ? sortInvitees(attendees) : [];
37
+ const visible = expanded ? sorted : sorted.slice(0, MAX_INVITEES);
38
+ function choose(status) {
39
+ if (pending || !onRsvpChange)
40
+ return;
41
+ lastStatus.current = status;
42
+ void onRsvpChange(event, status);
43
+ }
44
+ function retry() {
45
+ if (onRetry)
46
+ onRetry();
47
+ else if (lastStatus.current)
48
+ choose(lastStatus.current);
49
+ }
50
+ function onRadioKeyDown(e) {
51
+ const dir = e.key === 'ArrowRight' || e.key === 'ArrowDown' ? 1 : e.key === 'ArrowLeft' || e.key === 'ArrowUp' ? -1 : 0;
52
+ if (!dir)
53
+ return;
54
+ e.preventDefault();
55
+ const radios = Array.from(e.currentTarget.parentElement?.querySelectorAll('[role="radio"]') ?? []);
56
+ const i = radios.indexOf(e.currentTarget);
57
+ radios[(i + dir + radios.length) % radios.length]?.focus();
58
+ }
24
59
  function onKeyDown(e) {
25
60
  if (e.key === 'Escape') {
26
61
  e.stopPropagation();
@@ -44,7 +79,10 @@ export function EventDetails({ event, calendar, sourceLabel, onClose, onOpenLink
44
79
  first.focus();
45
80
  }
46
81
  }
47
- return (_jsx("div", { className: "calendar-event-details", onClick: onClose, onKeyDown: onKeyDown, children: _jsxs("div", { ref: sheetRef, className: "calendar-event-details-sheet", role: "dialog", "aria-modal": "true", "aria-label": event.summary, tabIndex: -1, onClick: (e) => e.stopPropagation(), children: [_jsx("div", { className: "calendar-event-details-grabber", "aria-hidden": "true" }), _jsxs("div", { className: "calendar-event-details-header", children: [_jsx("span", { className: "calendar-event-details-dot", "aria-hidden": "true", style: { background: calendar?.backgroundColor } }), _jsx("h2", { className: "calendar-event-details-title", children: event.summary }), _jsx("button", { type: "button", className: "calendar-event-details-close", "aria-label": "Close", onClick: onClose, children: "\u00D7" })] }), _jsxs("div", { className: "calendar-event-details-body", children: [when.date && (_jsxs("section", { className: "calendar-event-details-when", children: [_jsx("span", { children: when.date }), when.time && _jsxs("span", { children: [" ", when.time] })] })), (calendar || sourceLabel) && (_jsxs("section", { className: "calendar-event-details-calendar", children: [calendar?.summary && _jsx("span", { children: calendar.summary }), sourceLabel && _jsxs("span", { children: [" ", sourceLabel] })] })), organizer && _jsx("section", { className: "calendar-event-details-organizer", children: organizer }), _jsxs("section", { className: "calendar-event-details-actions", children: [event.joinUrl && (_jsx("a", { href: event.joinUrl, target: "_blank", rel: "noopener noreferrer", children: "Join" })), _jsx(Status, { status: event.selfResponseStatus })] }), event.location && _jsx("section", { className: "calendar-event-details-location", children: event.location }), description && (_jsx("section", { className: "calendar-event-details-description", style: { whiteSpace: 'pre-wrap' }, children: linkifyText(description).map((t, i) => t.type === 'link' ? (_jsx("a", { href: t.href, target: "_blank", rel: "noopener noreferrer", children: t.text }, i)) : (_jsx("span", { children: t.text }, i))) })), attendees.length > 0 && (_jsxs("section", { className: "calendar-event-details-attendees", children: [_jsx("ul", { children: attendees.slice(0, MAX_ATTENDEES).map((a, i) => (_jsxs("li", { children: [_jsx("span", { children: a.displayName || a.email }), " ", _jsx(Status, { status: a.responseStatus })] }, `${a.email}-${i}`))) }), attendees.length > MAX_ATTENDEES && _jsxs("div", { children: ["+", attendees.length - MAX_ATTENDEES, " more"] })] })), event.htmlLink && (_jsx("section", { className: "calendar-event-details-open", children: _jsx("a", { href: event.htmlLink, target: "_blank", rel: "noopener noreferrer", onClick: (e) => {
82
+ const checkedStatus = RSVP_OPTIONS.some((o) => o.status === event.selfResponseStatus)
83
+ ? event.selfResponseStatus
84
+ : RSVP_OPTIONS[0].status;
85
+ return (_jsx("div", { className: "calendar-event-details", onClick: onClose, onKeyDown: onKeyDown, children: _jsxs("div", { ref: sheetRef, className: "calendar-event-details-sheet", role: "dialog", "aria-modal": "true", "aria-label": event.summary, tabIndex: -1, onClick: (e) => e.stopPropagation(), children: [_jsx("div", { className: "calendar-event-details-grabber", "aria-hidden": "true" }), _jsxs("div", { className: "calendar-event-details-toprow", children: [_jsx("span", { className: "calendar-event-details-time", children: time }), event.joinUrl && (_jsx("a", { href: event.joinUrl, target: "_blank", rel: "noopener noreferrer", children: "Join" })), _jsx(Status, { status: event.selfResponseStatus }), _jsx("button", { type: "button", className: "calendar-event-details-close", "aria-label": "Close", onClick: onClose, children: "\u00D7" })] }), _jsx("div", { className: "calendar-event-details-header", children: _jsx("h2", { className: "calendar-event-details-title", children: event.summary }) }), _jsxs("div", { className: "calendar-event-details-body", children: [organizer && (_jsxs("section", { className: "calendar-event-details-organizer", children: [_jsx("span", { children: "Organizer" }), " ", _jsx("span", { children: organizer }), event.organizer.self && _jsx("span", { children: " (you)" })] })), (calendar || sourceLabel || event.location) && (_jsxs("section", { className: "calendar-event-details-calendar", children: [_jsx("span", { className: "calendar-event-details-dot", "aria-hidden": "true", style: { background: calendar?.backgroundColor } }), calendar?.summary && _jsx("span", { children: calendar.summary }), sourceLabel && _jsxs("span", { children: [" ", sourceLabel] }), event.location && _jsxs("span", { className: "calendar-event-details-location", children: [" ", event.location] })] })), description && (_jsx("section", { className: "calendar-event-details-description", style: { whiteSpace: 'pre-wrap' }, children: linkifyText(description).map((t, i) => t.type === 'link' ? (_jsx("a", { href: t.href, target: "_blank", rel: "noopener noreferrer", children: t.text }, i)) : (_jsx("span", { children: t.text }, i))) })), showInvitees && (_jsxs("section", { className: "calendar-event-details-invitees", children: [_jsxs("h3", { children: ["Invitees (", attendees.length, ")"] }), _jsx("div", { className: "calendar-event-details-invitee-summary", children: summarizeInvitees(attendees) }), _jsx("ul", { children: visible.map((a, i) => (_jsxs("li", { children: [_jsx("span", { children: a.displayName || a.email }), a.organizer && _jsx("span", { className: "calendar-event-details-tag", children: " Organizer" }), a.self && _jsx("span", { className: "calendar-event-details-tag", children: " (you)" }), ' ', _jsx(Status, { status: a.responseStatus })] }, `${a.email}-${i}`))) }), sorted.length > MAX_INVITEES && (_jsx("button", { type: "button", "aria-expanded": expanded, onClick: () => setExpanded((v) => !v), children: expanded ? 'Show fewer' : `Show all ${sorted.length}` }))] })), showRsvp && (_jsxs("section", { className: "calendar-event-details-rsvp", children: [_jsx("div", { role: "radiogroup", "aria-label": "Change RSVP", children: RSVP_OPTIONS.map((o) => (_jsx("button", { type: "button", role: "radio", "aria-checked": event.selfResponseStatus === o.status, tabIndex: o.status === checkedStatus ? 0 : -1, disabled: !!pending, onClick: () => choose(o.status), onKeyDown: onRadioKeyDown, children: o.label }, o.status))) }), _jsx("div", { "aria-live": "polite", className: "calendar-event-details-rsvp-status", children: pending ? ('Updating RSVP...') : error ? (_jsxs(_Fragment, { children: [_jsx("span", { children: "Couldn't update RSVP." }), ' ', _jsx("button", { type: "button", onClick: retry, children: "Retry" })] })) : null })] })), event.htmlLink && (_jsx("section", { className: "calendar-event-details-open", children: _jsx("a", { href: event.htmlLink, target: "_blank", rel: "noopener noreferrer", onClick: (e) => {
48
86
  e.preventDefault();
49
87
  onOpenLink(event.htmlLink);
50
88
  }, children: "Open in Google Calendar" }) }))] })] }) }));
@@ -0,0 +1,3 @@
1
+ import type { CalendarEventAttendee } from '../core/types.js';
2
+ export declare function sortInvitees(attendees: CalendarEventAttendee[]): CalendarEventAttendee[];
3
+ export declare function summarizeInvitees(attendees: CalendarEventAttendee[]): string;
@@ -0,0 +1,30 @@
1
+ const ORDER = ['accepted', 'tentative', 'needsAction', 'declined'];
2
+ const LABELS = { accepted: 'yes', tentative: 'maybe', needsAction: 'awaiting', declined: 'no' };
3
+ function bucketOf(status) {
4
+ return ORDER.includes(status) ? status : 'needsAction';
5
+ }
6
+ function nameOf(a) {
7
+ return (a.displayName || a.email || '').toLowerCase();
8
+ }
9
+ function rank(a) {
10
+ if (a.organizer)
11
+ return 0;
12
+ if (a.self)
13
+ return 1;
14
+ return 2 + ORDER.indexOf(bucketOf(a.responseStatus));
15
+ }
16
+ export function sortInvitees(attendees) {
17
+ return [...attendees].sort((a, b) => {
18
+ const r = rank(a) - rank(b);
19
+ if (r !== 0)
20
+ return r;
21
+ const n = nameOf(a).localeCompare(nameOf(b));
22
+ return n !== 0 ? n : (a.email || '').toLowerCase().localeCompare((b.email || '').toLowerCase());
23
+ });
24
+ }
25
+ export function summarizeInvitees(attendees) {
26
+ const counts = { accepted: 0, tentative: 0, needsAction: 0, declined: 0 };
27
+ for (const a of attendees)
28
+ counts[bucketOf(a.responseStatus)]++;
29
+ return ORDER.filter((b) => counts[b] > 0).map((b) => `${counts[b]} ${LABELS[b]}`).join(' · ');
30
+ }
package/dist/styles.css CHANGED
@@ -856,6 +856,10 @@
856
856
  background: rgb(0 0 0 / 45%);
857
857
  }
858
858
 
859
+ .calendar-pane--has-footer > .calendar-event-details {
860
+ bottom: var(--calendar-footer-height);
861
+ }
862
+
859
863
  .calendar-event-details-sheet {
860
864
  box-sizing: border-box;
861
865
  max-height: 80%;
@@ -906,6 +910,104 @@
906
910
  cursor: pointer;
907
911
  }
908
912
 
913
+ .calendar-event-details-toprow {
914
+ display: flex;
915
+ flex-wrap: wrap;
916
+ align-items: center;
917
+ gap: 8px;
918
+ }
919
+
920
+ .calendar-event-details-time {
921
+ flex: 1;
922
+ min-width: 0;
923
+ font-variant-numeric: tabular-nums;
924
+ }
925
+
926
+ .calendar-event-details-organizer,
927
+ .calendar-event-details-calendar {
928
+ display: flex;
929
+ flex-wrap: wrap;
930
+ align-items: center;
931
+ gap: 4px 6px;
932
+ font-size: 0.9em;
933
+ }
934
+
935
+ .calendar-event-details-invitees h3 {
936
+ margin: 0 0 4px;
937
+ font-size: 0.95em;
938
+ }
939
+
940
+ .calendar-event-details-invitee-summary {
941
+ margin-bottom: 6px;
942
+ font-size: 0.85em;
943
+ opacity: 0.75;
944
+ }
945
+
946
+ .calendar-event-details-invitees ul {
947
+ margin: 0;
948
+ padding: 0;
949
+ list-style: none;
950
+ }
951
+
952
+ .calendar-event-details-invitees li {
953
+ display: flex;
954
+ flex-wrap: wrap;
955
+ align-items: center;
956
+ gap: 2px 6px;
957
+ padding: 2px 0;
958
+ font-size: 0.9em;
959
+ }
960
+
961
+ .calendar-event-details-tag {
962
+ padding: 0 6px;
963
+ border-radius: 8px;
964
+ background: var(--calendar-badge);
965
+ color: var(--calendar-badge-text);
966
+ font-size: 0.75em;
967
+ }
968
+
969
+ .calendar-event-details-rsvp [role='radiogroup'] {
970
+ display: flex;
971
+ flex-wrap: wrap;
972
+ gap: 6px;
973
+ }
974
+
975
+ .calendar-event-details-rsvp [role='radio'] {
976
+ padding: 4px 12px;
977
+ border: 1px solid var(--calendar-chip-border);
978
+ border-radius: 14px;
979
+ background: transparent;
980
+ color: var(--calendar-chip-text);
981
+ font: inherit;
982
+ cursor: pointer;
983
+ }
984
+
985
+ .calendar-event-details-rsvp [role='radio'][aria-checked='true'] {
986
+ border-color: var(--calendar-chip-selected);
987
+ background: var(--calendar-chip-selected);
988
+ color: var(--calendar-chip-selected-text);
989
+ }
990
+
991
+ .calendar-event-details-rsvp [role='radio']:focus-visible {
992
+ outline: 2px solid var(--calendar-focus);
993
+ outline-offset: 2px;
994
+ }
995
+
996
+ .calendar-event-details-rsvp [role='radio']:disabled {
997
+ opacity: 0.6;
998
+ cursor: default;
999
+ }
1000
+
1001
+ .calendar-event-details-rsvp-status {
1002
+ margin-top: 6px;
1003
+ font-size: 0.85em;
1004
+ color: var(--calendar-rsvp-declined);
1005
+ }
1006
+
1007
+ .calendar-event-details-body {
1008
+ min-height: 0;
1009
+ }
1010
+
909
1011
  .calendar-event-details-body > section {
910
1012
  margin-top: 10px;
911
1013
  overflow-wrap: anywhere;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-webapp/calendar",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",