@open-webapp/calendar 0.8.1 → 0.9.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 +9 -1
- package/dist/react/CalendarPane.js +1 -1
- package/dist/styles.css +48 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -201,9 +201,11 @@ import '@open-webapp/calendar/styles.css';
|
|
|
201
201
|
|
|
202
202
|
### Theme behavior
|
|
203
203
|
|
|
204
|
+
Timed meeting headers keep the time left and `[Join] [RSVP glyph]` right, with a 4px gap; title and organizer follow below. Join retains its text and fits it at an intrinsic width, matching the RSVP glyph's 24px outer height, 1px border, 4px radius and exact status foreground/background/border for accepted, tentative, needsAction and declined in every theme. Hover underlines Join; keyboard focus has a visible theme-colored outline. Without a meeting URL only the right-aligned RSVP glyph appears. The pair stays together when a narrow header wraps. Join keeps its original URL, new-tab attributes and click propagation behavior.
|
|
205
|
+
|
|
204
206
|
Both components follow the OS/browser `prefers-color-scheme` preference live in `'system'` mode; omitting `theme` preserves this default. Explicit `'light'` and `'dark'` ignore OS changes. Hosts can change the prop on a mounted component (including back to `'system'` or `undefined`) without remounting, closing an open dropdown, losing its search query, focus or keyboard-active option, changing selected calendars, or resetting the pane's current RSVP selection. Theme changes do not trigger selection callbacks or controller refreshes.
|
|
205
207
|
|
|
206
|
-
Each pane forwards its requested mode to its unified grouped footer selector, including both account groups, account-local actions and the shared search. The single-trigger structure and cross-account keyboard navigation are preserved; the approved trigger geometry
|
|
208
|
+
Each pane forwards its requested mode to its unified grouped footer selector, including both account groups, account-local actions and the shared search. The single-trigger structure and cross-account keyboard navigation are preserved; the approved trigger geometry and action-only styling exceptions are described here. Standalone selectors choose their own mode: an omitted/system selector follows the OS even inside an explicitly dark or light pane. Adjacent and nested instances can use opposite modes independently; no document/body theme switch is applied.
|
|
207
209
|
|
|
208
210
|
The host owns theme-picker UI and preference persistence (for example, saving a choice and passing it back as `theme`). The package neither stores the choice nor adds it to the controller. Hosts also own styling of `emptyState`, `sourceNotice` and `renderEventAction` slot content; give custom content explicit styles where needed rather than relying on the built-in palette.
|
|
209
211
|
|
|
@@ -223,6 +225,12 @@ The Unaccepted count badge uses `.calendar-rsvp-chip-badge`, with light and dark
|
|
|
223
225
|
|
|
224
226
|
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. This approved visual-only exception changes trigger geometry and its derived dropdown position, preserving surrounding layout and theme isolation. Import the shipped stylesheet for both footer and standalone use.
|
|
225
227
|
|
|
228
|
+
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.
|
|
229
|
+
|
|
230
|
+
## 0.9.0 (BREAKING pre-1.0 minor)
|
|
231
|
+
|
|
232
|
+
- User-approved replacement of the frozen native dropdown-action appearance: Done, Select all and Clear are flat and themed with hover and keyboard-focus treatment as described above. Hosts relying on the former native action appearance must adapt. Other visual, interaction, public API and storage contracts are preserved; no data migration is required.
|
|
233
|
+
|
|
226
234
|
## 0.8.0 (BREAKING pre-1.0 minor)
|
|
227
235
|
|
|
228
236
|
- Unaccepted independently toggles `needsAction`, replacing the exclusive shortcut and local restoration introduced in 0.3.0. Hosts relying on pending-only callbacks or restoration must adapt to callbacks reflecting current membership.
|
|
@@ -357,7 +357,7 @@ export function CalendarPane(props) {
|
|
|
357
357
|
else {
|
|
358
358
|
timedEventRefs.current.delete(eventKey);
|
|
359
359
|
}
|
|
360
|
-
}, children: [_jsxs("div", { className: "calendar-event-header", children: [_jsx("span", { className: "calendar-event-time", children: formatTimeRange(event) }), 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: [hasLink ? (_jsx("a", { className: "calendar-event-title-link", href: event.htmlLink, target: "_blank", rel: "noopener noreferrer", onClick: (e) => {
|
|
360
|
+
}, 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: [hasLink ? (_jsx("a", { className: "calendar-event-title-link", href: event.htmlLink, target: "_blank", rel: "noopener noreferrer", onClick: (e) => {
|
|
361
361
|
if (isDesktop &&
|
|
362
362
|
e.button === 0 &&
|
|
363
363
|
!e.ctrlKey &&
|
package/dist/styles.css
CHANGED
|
@@ -343,10 +343,10 @@
|
|
|
343
343
|
background: var(--calendar-card-background);
|
|
344
344
|
}
|
|
345
345
|
|
|
346
|
+
.calendar-event-join,
|
|
346
347
|
.calendar-event-rsvp {
|
|
347
348
|
display: inline-flex;
|
|
348
349
|
flex: none;
|
|
349
|
-
margin-left: auto;
|
|
350
350
|
padding: 4px;
|
|
351
351
|
border: 1px solid var(--status-border);
|
|
352
352
|
border-radius: 4px;
|
|
@@ -354,24 +354,32 @@
|
|
|
354
354
|
color: var(--status-text);
|
|
355
355
|
}
|
|
356
356
|
|
|
357
|
+
.calendar-event-rsvp {
|
|
358
|
+
margin-left: auto;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
.calendar-event-row--rsvp-accepted,
|
|
357
362
|
.calendar-event-rsvp--accepted {
|
|
358
363
|
--status-text: var(--calendar-status-accepted-text);
|
|
359
364
|
--status-background: var(--calendar-status-accepted-background);
|
|
360
365
|
--status-border: var(--calendar-status-accepted-border);
|
|
361
366
|
}
|
|
362
367
|
|
|
368
|
+
.calendar-event-row--rsvp-tentative,
|
|
363
369
|
.calendar-event-rsvp--tentative {
|
|
364
370
|
--status-text: var(--calendar-status-tentative-text);
|
|
365
371
|
--status-background: var(--calendar-status-tentative-background);
|
|
366
372
|
--status-border: var(--calendar-status-tentative-border);
|
|
367
373
|
}
|
|
368
374
|
|
|
375
|
+
.calendar-event-row--rsvp-needsAction,
|
|
369
376
|
.calendar-event-rsvp--needsAction {
|
|
370
377
|
--status-text: var(--calendar-status-needsAction-text);
|
|
371
378
|
--status-background: var(--calendar-status-needsAction-background);
|
|
372
379
|
--status-border: var(--calendar-status-needsAction-border);
|
|
373
380
|
}
|
|
374
381
|
|
|
382
|
+
.calendar-event-row--rsvp-declined,
|
|
375
383
|
.calendar-event-rsvp--declined {
|
|
376
384
|
--status-text: var(--calendar-status-declined-text);
|
|
377
385
|
--status-background: var(--calendar-status-declined-background);
|
|
@@ -380,11 +388,20 @@
|
|
|
380
388
|
|
|
381
389
|
.calendar-event-header {
|
|
382
390
|
display: flex;
|
|
391
|
+
flex-wrap: wrap;
|
|
383
392
|
justify-content: space-between;
|
|
384
393
|
align-items: center;
|
|
385
394
|
gap: 8px;
|
|
386
395
|
}
|
|
387
396
|
|
|
397
|
+
.calendar-event-actions {
|
|
398
|
+
display: flex;
|
|
399
|
+
flex: none;
|
|
400
|
+
align-items: center;
|
|
401
|
+
gap: 4px;
|
|
402
|
+
margin-left: auto;
|
|
403
|
+
}
|
|
404
|
+
|
|
388
405
|
.calendar-event-title-link {
|
|
389
406
|
align-self: flex-start;
|
|
390
407
|
text-decoration: none;
|
|
@@ -468,16 +485,20 @@
|
|
|
468
485
|
.calendar-event-join {
|
|
469
486
|
font-size: 12px;
|
|
470
487
|
font-weight: 500;
|
|
471
|
-
|
|
488
|
+
line-height: 14px;
|
|
472
489
|
cursor: pointer;
|
|
473
490
|
text-decoration: none;
|
|
474
491
|
padding: 4px 8px;
|
|
475
|
-
|
|
476
|
-
border-radius: 4px;
|
|
492
|
+
white-space: nowrap;
|
|
477
493
|
}
|
|
478
494
|
|
|
479
495
|
.calendar-event-join:hover {
|
|
480
|
-
|
|
496
|
+
text-decoration: underline;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
.calendar-event-join:focus-visible {
|
|
500
|
+
outline: 2px solid var(--calendar-focus);
|
|
501
|
+
outline-offset: 2px;
|
|
481
502
|
}
|
|
482
503
|
|
|
483
504
|
.calendar-event-row--current,
|
|
@@ -708,6 +729,28 @@
|
|
|
708
729
|
color: var(--calendar-control-text);
|
|
709
730
|
}
|
|
710
731
|
|
|
732
|
+
.calendar-selector-actions > button {
|
|
733
|
+
border: 0;
|
|
734
|
+
background: transparent;
|
|
735
|
+
box-shadow: none;
|
|
736
|
+
color: var(--calendar-selector-text);
|
|
737
|
+
font: inherit;
|
|
738
|
+
cursor: pointer;
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
.calendar-selector-actions > button:hover {
|
|
742
|
+
background: var(--calendar-hover);
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
.calendar-selector-actions > button:focus {
|
|
746
|
+
outline: none;
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
.calendar-selector-actions > button:focus-visible {
|
|
750
|
+
outline: 2px solid var(--calendar-focus);
|
|
751
|
+
outline-offset: 2px;
|
|
752
|
+
}
|
|
753
|
+
|
|
711
754
|
.calendar-selector-checkbox {
|
|
712
755
|
flex: none;
|
|
713
756
|
margin: 0;
|