@wtfalch/calendar 0.1.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.
Files changed (42) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +15 -0
  3. package/dist/calendar/calendar-client.d.ts +7 -0
  4. package/dist/calendar/calendar-client.js +242 -0
  5. package/dist/calendar/calendar.css +953 -0
  6. package/dist/calendar/client.d.ts +87 -0
  7. package/dist/calendar/client.js +233 -0
  8. package/dist/calendar/errors.d.ts +28 -0
  9. package/dist/calendar/errors.js +61 -0
  10. package/dist/calendar/fake/index.d.ts +36 -0
  11. package/dist/calendar/fake/index.js +79 -0
  12. package/dist/calendar/fake/sample.d.ts +66 -0
  13. package/dist/calendar/fake/sample.js +116 -0
  14. package/dist/calendar/fake/store.d.ts +79 -0
  15. package/dist/calendar/fake/store.js +906 -0
  16. package/dist/calendar/index.d.ts +12 -0
  17. package/dist/calendar/index.js +11 -0
  18. package/dist/calendar/push.d.ts +38 -0
  19. package/dist/calendar/push.js +129 -0
  20. package/dist/calendar/react/AvailabilityRibbon.d.ts +40 -0
  21. package/dist/calendar/react/AvailabilityRibbon.js +108 -0
  22. package/dist/calendar/react/Calendar.d.ts +28 -0
  23. package/dist/calendar/react/Calendar.js +431 -0
  24. package/dist/calendar/react/EventDetail.d.ts +22 -0
  25. package/dist/calendar/react/EventDetail.js +91 -0
  26. package/dist/calendar/react/EventEditor.d.ts +52 -0
  27. package/dist/calendar/react/EventEditor.js +188 -0
  28. package/dist/calendar/react/ShareDialog.d.ts +25 -0
  29. package/dist/calendar/react/ShareDialog.js +125 -0
  30. package/dist/calendar/react/Toolbar.d.ts +29 -0
  31. package/dist/calendar/react/Toolbar.js +58 -0
  32. package/dist/calendar/react/index.d.ts +9 -0
  33. package/dist/calendar/react/index.js +8 -0
  34. package/dist/calendar/react/participants.d.ts +34 -0
  35. package/dist/calendar/react/participants.js +40 -0
  36. package/dist/calendar/types.d.ts +384 -0
  37. package/dist/calendar/types.js +40 -0
  38. package/dist/calendar/uri.d.ts +13 -0
  39. package/dist/calendar/uri.js +22 -0
  40. package/dist/calendar/wire.d.ts +177 -0
  41. package/dist/calendar/wire.js +349 -0
  42. package/package.json +82 -0
@@ -0,0 +1,953 @@
1
+ /* @wtfalch/calendar/calendar/calendar.css — styles, on @wtfalch/design tokens.
2
+ *
3
+ * This file draws the whole component: the toolbar, the grid, the detail pane,
4
+ * the editor's own layout, and react-big-calendar's `.rbc-*` internals themed
5
+ * onto the tokens (MSG-055, https://github.com/wtfalch/messaging/issues/158).
6
+ *
7
+ * react-big-calendar's own base stylesheet is **not** needed. Everything its
8
+ * grid relies on structurally — the flex rows, the absolute positioning of a
9
+ * time-grid event — is set below, so importing `react-big-calendar.css` on top
10
+ * of this would only reintroduce its own colours and borders to override.
11
+ *
12
+ * Same two rules as `@wtfalch/email/mailbox/react/mail.css` (design's
13
+ * CLAUDE.md, learned there): a token, never a value; nothing drawn over a
14
+ * surface names the colour it sits on. */
15
+
16
+ .wtcal {
17
+ display: flex;
18
+ flex-direction: column;
19
+ height: 100%;
20
+ min-height: 0;
21
+ background: var(--bg);
22
+ color: var(--text);
23
+ font-size: var(--text-sm);
24
+ }
25
+
26
+ /* ---- Toolbar -------------------------------------------------------- */
27
+
28
+ .wtcal-toolbar {
29
+ display: flex;
30
+ align-items: center;
31
+ justify-content: space-between;
32
+ gap: var(--space-3);
33
+ padding: var(--space-3) var(--space-4);
34
+ border-bottom: var(--border-width) solid var(--border);
35
+ background: var(--panel);
36
+ flex: none;
37
+ }
38
+
39
+ .wtcal-toolbar-where,
40
+ .wtcal-toolbar-actions {
41
+ display: flex;
42
+ align-items: center;
43
+ gap: var(--space-2);
44
+ min-width: 0;
45
+ }
46
+
47
+ .wtcal-toolbar-move {
48
+ display: flex;
49
+ gap: var(--space-1);
50
+ }
51
+
52
+ /* The set has one directional arrow (`back`), not a pair: `forward` is a
53
+ diagonal send glyph, not its mirror. Flipping is the whole difference
54
+ between "previous" and "next". */
55
+ .wtcal-icon-flip {
56
+ transform: scaleX(-1);
57
+ }
58
+
59
+ /* The largest type on the screen. You are looking at a month; say which one
60
+ loudly enough that nobody has to read the grid to find out. */
61
+ .wtcal-toolbar-heading {
62
+ margin: 0;
63
+ font-size: var(--text-lg);
64
+ font-weight: var(--weight-strong);
65
+ letter-spacing: var(--tracking);
66
+ white-space: nowrap;
67
+ overflow: hidden;
68
+ text-overflow: ellipsis;
69
+ }
70
+
71
+ .wtcal-toolbar-views {
72
+ display: flex;
73
+ gap: var(--space-1);
74
+ padding: 2px;
75
+ border: var(--border-width) solid var(--border);
76
+ border-radius: var(--radius-pill);
77
+ }
78
+
79
+ .wtcal-toolbar-account {
80
+ display: flex;
81
+ align-items: center;
82
+ min-width: 0;
83
+ margin-left: var(--space-2);
84
+ }
85
+
86
+ /* ---- Body and split ------------------------------------------------- */
87
+
88
+ .wtcal-body {
89
+ position: relative;
90
+ display: flex;
91
+ flex-direction: column;
92
+ flex: 1 1 auto;
93
+ min-height: 0;
94
+ }
95
+
96
+ /* `SplitPane` supplies its own `display: flex`, sizing and `min-width: 0`
97
+ (`splitpane.css`, the reason that file exists); this only fills the body's
98
+ remaining height, the one thing a className is for here. */
99
+ .wtcal-split {
100
+ flex: 1 1 auto;
101
+ min-height: 0;
102
+ }
103
+
104
+ .wtcal-grid {
105
+ position: relative;
106
+ flex: 1 1 auto;
107
+ min-height: 0;
108
+ min-width: 0;
109
+ padding: var(--space-3);
110
+ }
111
+
112
+ /* `ScrollArea` supplies its own scrolling and the wrapper `SplitPane` puts
113
+ around it supplies `min-width: 0` and `overflow: hidden`; this is the
114
+ visual border and ground a plain scroller does not carry an opinion about. */
115
+ .wtcal-pane {
116
+ flex: 1 1 auto;
117
+ min-height: 0;
118
+ border-left: var(--border-width) solid var(--border);
119
+ background: var(--panel);
120
+ }
121
+
122
+ /* ---- Status --------------------------------------------------------- */
123
+
124
+ .wtcal-status {
125
+ margin: 0;
126
+ padding: var(--space-6);
127
+ color: var(--muted);
128
+ font-size: var(--text-xs);
129
+ text-align: center;
130
+ }
131
+
132
+ .wtcal-status.is-error {
133
+ color: var(--bad);
134
+ }
135
+
136
+ /* ---- Loading ---------------------------------------------------------- */
137
+
138
+ /* The shape of the month grid the person is about to see, not a spinner --
139
+ `Skeleton`'s own case for why. */
140
+ .wtcal-loading {
141
+ flex: 1 1 auto;
142
+ min-height: 0;
143
+ padding: var(--space-3);
144
+ }
145
+
146
+ .wtcal-loading-grid {
147
+ display: grid;
148
+ grid-template-columns: repeat(7, 1fr);
149
+ grid-auto-rows: 1fr;
150
+ gap: var(--space-1);
151
+ height: 100%;
152
+ }
153
+
154
+ /* The empty note sits over the grid rather than replacing it, so a reader
155
+ can still navigate to a date that does have something on it. `Empty`
156
+ already carries its own border, radius and padding; this only lifts it off
157
+ the grid and gives it a ground to sit on. */
158
+ .wtcal-body > .wtcal-empty {
159
+ position: absolute;
160
+ top: var(--space-5);
161
+ left: 50%;
162
+ z-index: 1;
163
+ transform: translateX(-50%);
164
+ background: var(--panel);
165
+ box-shadow: var(--shadow-1);
166
+ }
167
+
168
+ /* On a phone the week strip is the first thing in the body, and an absolutely
169
+ positioned overlay lands squarely on top of it -- hiding the one control
170
+ that finds a day with something on it. In flow instead: a banner between the
171
+ strip and the day column, which is where a reader looks anyway. */
172
+ .wtcal.is-compact .wtcal-body > .wtcal-empty {
173
+ position: static;
174
+ transform: none;
175
+ margin: var(--space-3) var(--space-3) 0;
176
+ }
177
+
178
+ .wtcal-failure {
179
+ margin: var(--space-3) 0 0;
180
+ color: var(--bad);
181
+ font-size: var(--text-xs);
182
+ }
183
+
184
+ /* ---- The detail pane ------------------------------------------------ */
185
+
186
+ .wtcal-detail {
187
+ display: flex;
188
+ flex-direction: column;
189
+ gap: var(--space-2);
190
+ padding: var(--space-4);
191
+ }
192
+
193
+ .wtcal-detail-head {
194
+ display: flex;
195
+ align-items: flex-start;
196
+ justify-content: space-between;
197
+ gap: var(--space-2);
198
+ }
199
+
200
+ .wtcal-detail-title {
201
+ margin: 0;
202
+ font-size: var(--text-md);
203
+ font-weight: var(--weight-strong);
204
+ line-height: var(--line-height);
205
+ }
206
+
207
+ .wtcal-detail-when {
208
+ margin: 0;
209
+ font-size: var(--text-sm);
210
+ }
211
+
212
+ .wtcal-detail-repeat {
213
+ margin: 0;
214
+ color: var(--muted);
215
+ font-size: var(--text-xs);
216
+ }
217
+
218
+ .wtcal-detail-section {
219
+ margin-top: var(--space-3);
220
+ }
221
+
222
+ .wtcal-detail-label {
223
+ margin: 0 0 var(--space-1);
224
+ color: var(--muted);
225
+ font-size: var(--text-2xs);
226
+ font-weight: var(--weight-strong);
227
+ letter-spacing: 0.04em;
228
+ text-transform: uppercase;
229
+ }
230
+
231
+ .wtcal-detail-text {
232
+ margin: 0;
233
+ font-size: var(--text-sm);
234
+ overflow-wrap: anywhere;
235
+ }
236
+
237
+ .wtcal-detail-people {
238
+ display: flex;
239
+ flex-direction: column;
240
+ gap: var(--space-2);
241
+ margin: 0;
242
+ padding: 0;
243
+ list-style: none;
244
+ }
245
+
246
+ .wtcal-detail-actions {
247
+ display: flex;
248
+ gap: var(--space-2);
249
+ margin-top: var(--space-4);
250
+ }
251
+
252
+ /* ---- RSVP ------------------------------------------------------------ */
253
+
254
+ /* Boxed off from the rest of the pane, because it is the one thing here the
255
+ person is being asked to *do* rather than read. */
256
+ .wtcal-rsvp {
257
+ margin: var(--space-4) 0;
258
+ padding: var(--space-3);
259
+ border: var(--border-width) solid var(--border);
260
+ border-radius: var(--radius-md);
261
+ background: var(--panel-2, var(--panel));
262
+ }
263
+
264
+ .wtcal-rsvp-answers {
265
+ display: flex;
266
+ gap: var(--space-2);
267
+ margin-top: var(--space-2);
268
+ }
269
+
270
+ .wtcal-rsvp-answers > * {
271
+ flex: 1 1 0;
272
+ }
273
+
274
+ .wtcal-rsvp-note {
275
+ margin: var(--space-2) 0 0;
276
+ color: var(--muted);
277
+ font-size: var(--text-xs);
278
+ }
279
+
280
+ /* ---- The editor ----------------------------------------------------- */
281
+
282
+ /* The address field and its Add button share a row; the field takes whatever
283
+ the button does not. */
284
+ .wtcal-invitee-add {
285
+ display: flex;
286
+ gap: var(--space-2);
287
+ align-items: start;
288
+ }
289
+
290
+ .wtcal-invitee-add > *:first-child {
291
+ flex: 1 1 0;
292
+ min-width: 0;
293
+ }
294
+
295
+ .wtcal-invitees {
296
+ display: flex;
297
+ flex-direction: column;
298
+ gap: var(--space-1);
299
+ margin: 0;
300
+ padding: 0;
301
+ list-style: none;
302
+ }
303
+
304
+ .wtcal-invitee {
305
+ display: flex;
306
+ gap: var(--space-2);
307
+ align-items: center;
308
+ padding: var(--space-1) var(--space-2);
309
+ border-radius: var(--radius-sm);
310
+ background: var(--panel-2, var(--panel));
311
+ }
312
+
313
+ /* The name leads and the address follows it quietly, so a list of people
314
+ reads as people rather than as a column of addresses. */
315
+ .wtcal-invitee-who {
316
+ display: flex;
317
+ flex-direction: column;
318
+ flex: 1 1 auto;
319
+ min-width: 0;
320
+ overflow-wrap: anywhere;
321
+ }
322
+
323
+ .wtcal-invitee-address {
324
+ color: var(--muted);
325
+ font-size: var(--text-xs);
326
+ }
327
+
328
+ .wtcal-editor {
329
+ display: flex;
330
+ flex-direction: column;
331
+ gap: var(--space-3);
332
+ }
333
+
334
+ .wtcal-editor-row {
335
+ display: flex;
336
+ gap: var(--space-3);
337
+ }
338
+
339
+ .wtcal-editor-row > * {
340
+ flex: 1 1 0;
341
+ min-width: 0;
342
+ }
343
+
344
+ .wtcal-editor-actions {
345
+ display: flex;
346
+ align-items: center;
347
+ gap: var(--space-2);
348
+ width: 100%;
349
+ }
350
+
351
+ /* At phone width Delete, the send control, Cancel and Save do not fit on one
352
+ line: the checkbox loses to the buttons and its own mark lands on its own
353
+ label. The send control takes the row above instead, where it is also the
354
+ first thing read on the way to Save. */
355
+ .wtcal-editor-actions.is-compact {
356
+ flex-wrap: wrap;
357
+ }
358
+
359
+ .wtcal-editor-actions.is-compact > label {
360
+ order: -1;
361
+ width: 100%;
362
+ }
363
+
364
+ /* Delete sits at the far left, away from Save. A destructive action beside
365
+ the one people press without looking is a misclick waiting to happen. */
366
+ .wtcal-editor-spacer {
367
+ flex: 1 1 auto;
368
+ }
369
+
370
+ .wtcal-editor-note {
371
+ margin: 0;
372
+ color: var(--muted);
373
+ font-size: var(--text-xs);
374
+ }
375
+
376
+ /* The recurring-scope question. Both answers are full-width buttons of equal
377
+ width: this screen exists because there is no safe default, and burying one
378
+ answer would invent one. */
379
+ .wtcal-scope {
380
+ display: flex;
381
+ flex-direction: column;
382
+ gap: var(--space-2);
383
+ }
384
+
385
+ /* ---- react-big-calendar, themed ------------------------------------- */
386
+
387
+ .wtcal .rbc-calendar {
388
+ display: flex;
389
+ flex-direction: column;
390
+ height: 100%;
391
+ font-family: var(--font);
392
+ }
393
+
394
+ .wtcal .rbc-month-view,
395
+ .wtcal .rbc-time-view {
396
+ display: flex;
397
+ flex: 1 1 0;
398
+ flex-direction: column;
399
+ min-height: 0;
400
+ border: var(--border-width) solid var(--border);
401
+ border-radius: var(--radius-md);
402
+ overflow: hidden;
403
+ background: var(--panel);
404
+ }
405
+
406
+ .wtcal .rbc-month-header,
407
+ .wtcal .rbc-time-header {
408
+ display: flex;
409
+ flex: none;
410
+ }
411
+
412
+ .wtcal .rbc-header {
413
+ flex: 1 0 0;
414
+ padding: var(--space-2);
415
+ border-bottom: var(--border-width) solid var(--border);
416
+ color: var(--muted);
417
+ font-size: var(--text-2xs);
418
+ font-weight: var(--weight-strong);
419
+ letter-spacing: 0.04em;
420
+ text-align: center;
421
+ text-transform: uppercase;
422
+ overflow: hidden;
423
+ }
424
+
425
+ .wtcal .rbc-header + .rbc-header {
426
+ border-left: var(--border-width) solid var(--border);
427
+ }
428
+
429
+ .wtcal .rbc-month-row {
430
+ position: relative;
431
+ display: flex;
432
+ flex: 1 0 0;
433
+ flex-direction: column;
434
+ min-height: 0;
435
+ overflow: hidden;
436
+ }
437
+
438
+ .wtcal .rbc-month-row + .rbc-month-row {
439
+ border-top: var(--border-width) solid var(--border);
440
+ }
441
+
442
+ .wtcal .rbc-row-bg {
443
+ position: absolute;
444
+ inset: 0;
445
+ display: flex;
446
+ flex: 1 0 0;
447
+ }
448
+
449
+ .wtcal .rbc-day-bg {
450
+ flex: 1 0 0;
451
+ }
452
+
453
+ .wtcal .rbc-day-bg + .rbc-day-bg {
454
+ border-left: var(--border-width) solid var(--border);
455
+ }
456
+
457
+ /* Days outside the month are still days; quieting the ground says so without
458
+ hiding what is on them. */
459
+ .wtcal .rbc-off-range-bg {
460
+ background: var(--panel-2);
461
+ }
462
+
463
+ /* Today is marked on its date, not by flooding its cell.
464
+ `--accent-dim` across a whole cell reads louder than the event chips it
465
+ sits beside, which puts the eye on an empty Thursday instead of on the
466
+ meetings — backwards, in a palette where accent is reserved for the
467
+ person's own events. The ground keeps a trace and the number carries the
468
+ mark. `color-mix` on a token is still the token; no second colour is
469
+ introduced. */
470
+ .wtcal .rbc-today {
471
+ background: color-mix(in srgb, var(--accent) 8%, transparent);
472
+ }
473
+
474
+ .wtcal .rbc-now .rbc-button-link {
475
+ display: inline-block;
476
+ min-width: 1.5em;
477
+ padding: 1px var(--space-1);
478
+ border-radius: var(--radius-pill);
479
+ background: var(--accent);
480
+ color: var(--on-accent);
481
+ font-weight: var(--weight-strong);
482
+ text-align: center;
483
+ }
484
+
485
+ .wtcal .rbc-row {
486
+ display: flex;
487
+ flex-direction: row;
488
+ }
489
+
490
+ .wtcal .rbc-row-content {
491
+ position: relative;
492
+ z-index: 1;
493
+ display: flex;
494
+ flex-direction: column;
495
+ gap: 2px;
496
+ }
497
+
498
+ .wtcal .rbc-date-cell {
499
+ flex: 1 0 0;
500
+ min-width: 0;
501
+ padding: var(--space-1);
502
+ font-size: var(--text-xs);
503
+ text-align: right;
504
+ }
505
+
506
+ .wtcal .rbc-off-range .rbc-button-link {
507
+ color: var(--muted);
508
+ }
509
+
510
+ .wtcal .rbc-button-link {
511
+ padding: 0;
512
+ border: 0;
513
+ background: none;
514
+ color: inherit;
515
+ cursor: pointer;
516
+ font: inherit;
517
+ }
518
+
519
+ .wtcal .rbc-row-segment {
520
+ min-width: 0;
521
+ padding: 0 var(--space-1);
522
+ }
523
+
524
+ /* The event chip. Accent is reserved for the person's own events, which in
525
+ the first ship is everything on the grid. */
526
+ .wtcal .rbc-event {
527
+ display: block;
528
+ width: 100%;
529
+ padding: 2px var(--space-2);
530
+ border: 0;
531
+ border-radius: var(--radius-sm);
532
+ background: var(--accent);
533
+ color: var(--on-accent);
534
+ cursor: pointer;
535
+ font-size: var(--text-xs);
536
+ line-height: var(--line-height);
537
+ text-align: left;
538
+ overflow: hidden;
539
+ text-overflow: ellipsis;
540
+ white-space: nowrap;
541
+ }
542
+
543
+ .wtcal .rbc-event:focus-visible {
544
+ outline: var(--focus-ring);
545
+ outline-offset: 2px;
546
+ }
547
+
548
+ .wtcal .rbc-event.rbc-selected {
549
+ box-shadow: var(--shadow-2);
550
+ }
551
+
552
+ .wtcal .rbc-show-more {
553
+ padding: 0 var(--space-1);
554
+ border: 0;
555
+ background: none;
556
+ color: var(--muted);
557
+ cursor: pointer;
558
+ font-size: var(--text-2xs);
559
+ }
560
+
561
+ /* Time views: week and day. */
562
+
563
+ /* `align-items: start` is load-bearing, not tidying. The gutter and the day
564
+ column are flex items in this row, and stretching them to the scroll box's
565
+ height squashes their hour rows below the 40px `min-height` below. The
566
+ labels still draw on the natural 40px grid while react-big-calendar places
567
+ events as a fraction of the squashed column, so a heights disagreement of
568
+ 780 against 960 puts an 11am meeting on the 9am line. Letting both columns
569
+ take their natural height keeps one scale for both. */
570
+ .wtcal .rbc-time-content {
571
+ display: flex;
572
+ align-items: start;
573
+ flex: 1 1 0;
574
+ min-height: 0;
575
+ overflow-y: auto;
576
+ border-top: var(--border-width) solid var(--border);
577
+ }
578
+
579
+ .wtcal .rbc-time-gutter {
580
+ flex: none;
581
+ color: var(--muted);
582
+ font-size: var(--text-2xs);
583
+ }
584
+
585
+ .wtcal .rbc-timeslot-group {
586
+ min-height: 40px;
587
+ border-bottom: var(--border-width) solid var(--border);
588
+ }
589
+
590
+ .wtcal .rbc-day-slot {
591
+ position: relative;
592
+ flex: 1 0 0;
593
+ min-width: 0;
594
+ }
595
+
596
+ .wtcal .rbc-day-slot + .rbc-day-slot,
597
+ .wtcal .rbc-time-content > * + * {
598
+ border-left: var(--border-width) solid var(--border);
599
+ }
600
+
601
+ .wtcal .rbc-time-slot {
602
+ flex: 1 0 0;
603
+ }
604
+
605
+ .wtcal .rbc-day-slot .rbc-event {
606
+ position: absolute;
607
+ white-space: normal;
608
+ }
609
+
610
+ .wtcal .rbc-current-time-indicator {
611
+ position: absolute;
612
+ z-index: 2;
613
+ width: 100%;
614
+ height: 2px;
615
+ background: var(--bad);
616
+ }
617
+
618
+ /* Agenda. A table, and it should look like one. */
619
+ .wtcal .rbc-agenda-view {
620
+ flex: 1 1 0;
621
+ min-height: 0;
622
+ overflow-y: auto;
623
+ }
624
+
625
+ .wtcal .rbc-agenda-view table {
626
+ width: 100%;
627
+ border-collapse: collapse;
628
+ font-size: var(--text-sm);
629
+ }
630
+
631
+ .wtcal .rbc-agenda-view td,
632
+ .wtcal .rbc-agenda-view th {
633
+ padding: var(--space-2) var(--space-3);
634
+ border-bottom: var(--border-width) solid var(--border);
635
+ text-align: left;
636
+ vertical-align: top;
637
+ }
638
+
639
+ .wtcal .rbc-agenda-view th {
640
+ color: var(--muted);
641
+ font-size: var(--text-2xs);
642
+ font-weight: var(--weight-strong);
643
+ letter-spacing: 0.04em;
644
+ text-transform: uppercase;
645
+ }
646
+
647
+ /* The agenda's event cell is a table cell, not a chip; the accent block that
648
+ reads well in a grid reads as a highlighter pen across a row. */
649
+ .wtcal .rbc-agenda-view .rbc-event {
650
+ padding: 0;
651
+ background: none;
652
+ color: var(--text);
653
+ white-space: normal;
654
+ }
655
+
656
+ /* ---- Phone ---------------------------------------------------------- */
657
+
658
+ /* Below `md`, the same breakpoint the mailbox shell collapses at. The
659
+ pane and the editor become sheets in `Calendar.tsx`; what is left here is
660
+ the toolbar, which folds rather than scrolling sideways. */
661
+ .wtcal.is-compact .wtcal-toolbar {
662
+ flex-wrap: wrap;
663
+ gap: var(--space-2);
664
+ padding: var(--space-2) var(--space-3);
665
+ }
666
+
667
+ .wtcal.is-compact .wtcal-toolbar-where {
668
+ order: 1;
669
+ flex: 1 1 100%;
670
+ }
671
+
672
+ .wtcal.is-compact .wtcal-toolbar-actions {
673
+ order: 2;
674
+ flex: 1 1 100%;
675
+ justify-content: space-between;
676
+ }
677
+
678
+ .wtcal.is-compact .wtcal-toolbar-heading {
679
+ font-size: var(--text-md);
680
+ }
681
+
682
+ .wtcal.is-compact .wtcal-grid {
683
+ padding: var(--space-2);
684
+ }
685
+
686
+ /* Below `sm`, narrower than `md` and the day view's own picker: the week
687
+ around the day shown, tapped to move the single day column under it. */
688
+ .wtcal-week-strip {
689
+ flex: none;
690
+ border-bottom: var(--border-width) solid var(--border);
691
+ background: var(--panel);
692
+ }
693
+
694
+ .wtcal-week-strip-row {
695
+ display: flex;
696
+ gap: var(--space-2);
697
+ padding: var(--space-2) var(--space-3);
698
+ }
699
+
700
+ .wtcal-week-strip-day {
701
+ display: flex;
702
+ flex: none;
703
+ flex-direction: column;
704
+ align-items: center;
705
+ gap: 2px;
706
+ padding: var(--space-1) var(--space-2);
707
+ border: 0;
708
+ border-radius: var(--radius-md);
709
+ background: none;
710
+ color: inherit;
711
+ cursor: pointer;
712
+ font: inherit;
713
+ }
714
+
715
+ .wtcal-week-strip-dow {
716
+ color: var(--muted);
717
+ font-size: var(--text-2xs);
718
+ font-weight: var(--weight-strong);
719
+ letter-spacing: 0.04em;
720
+ text-transform: uppercase;
721
+ }
722
+
723
+ .wtcal-week-strip-num {
724
+ font-size: var(--text-sm);
725
+ font-weight: var(--weight-strong);
726
+ }
727
+
728
+ .wtcal-week-strip-day.is-selected {
729
+ background: var(--accent);
730
+ color: var(--on-accent);
731
+ }
732
+
733
+ .wtcal-week-strip-day.is-selected .wtcal-week-strip-dow {
734
+ color: var(--on-accent);
735
+ }
736
+
737
+ /* The editor renders through `Modal`'s portal, outside `.wtcal`, so its own
738
+ element carries the flag. A `.wtcal.is-compact` prefix here would match
739
+ nothing and fail silently. */
740
+ .wtcal-editor.is-compact .wtcal-editor-row {
741
+ flex-direction: column;
742
+ gap: var(--space-3);
743
+ }
744
+
745
+ /* A month grid at 390px cannot hold seven columns of readable titles. The
746
+ chips keep their place and lose their text, leaving a density readout that
747
+ the week and day views are there to open up. */
748
+ .wtcal.is-compact .rbc-month-view .rbc-event {
749
+ height: 6px;
750
+ padding: 0;
751
+ border-radius: var(--radius-pill);
752
+ font-size: 0;
753
+ }
754
+
755
+ /* ---- Sharing -------------------------------------------------------- */
756
+
757
+ /* The dialog's body. Two sections doing two jobs -- who already has access,
758
+ and the way to give it to somebody else -- separated by ground rather than
759
+ by a rule, the same device the detail pane uses. */
760
+ .wtcal-share {
761
+ display: flex;
762
+ flex-direction: column;
763
+ gap: var(--space-5);
764
+ }
765
+
766
+ .wtcal-share-section {
767
+ display: flex;
768
+ flex-direction: column;
769
+ gap: var(--space-2);
770
+ }
771
+
772
+ .wtcal-share-people {
773
+ display: flex;
774
+ flex-direction: column;
775
+ gap: var(--space-2);
776
+ margin: 0;
777
+ padding: 0;
778
+ list-style: none;
779
+ }
780
+
781
+ /* Each grant is one row: the person on the left, the way to take it back on
782
+ the right. `--panel-2` boxes it off the dialog's own ground, the same way
783
+ an invitee row is boxed off the editor's. */
784
+ .wtcal-share-person {
785
+ display: flex;
786
+ gap: var(--space-2);
787
+ align-items: center;
788
+ padding: var(--space-1) var(--space-2);
789
+ border-radius: var(--radius-sm);
790
+ background: var(--panel-2, var(--panel));
791
+ }
792
+
793
+ /* `Identity` takes the row and the remove button takes what is left, rather
794
+ than the two splitting it evenly and a long address wrapping early. */
795
+ .wtcal-share-person > *:first-child {
796
+ flex: 1 1 auto;
797
+ min-width: 0;
798
+ }
799
+
800
+ .wtcal-share-empty {
801
+ padding: var(--space-4) 0;
802
+ }
803
+
804
+ .wtcal-share-actions {
805
+ display: flex;
806
+ gap: var(--space-2);
807
+ align-items: center;
808
+ width: 100%;
809
+ }
810
+
811
+ .wtcal-share-spacer {
812
+ flex: 1 1 auto;
813
+ }
814
+
815
+ /* At phone width the two buttons take the row on their own; there is no
816
+ third control to make room for, so they simply sit at its end. */
817
+ .wtcal-share-actions.is-compact {
818
+ flex-wrap: wrap;
819
+ }
820
+
821
+ /* ---- The availability ribbon ---------------------------------------- */
822
+
823
+ /* The signature interaction: each participant's day under the time row, the
824
+ event's own slot lying across all of them at once. */
825
+ .wtcal-ribbons {
826
+ display: flex;
827
+ flex-direction: column;
828
+ gap: var(--space-1);
829
+ margin-top: var(--space-2);
830
+ }
831
+
832
+ /* Hour marks, positioned rather than spaced, so they land on the same scale
833
+ the bands use rather than near it. */
834
+ .wtcal-ribbon-hours {
835
+ position: relative;
836
+ height: var(--space-4);
837
+ margin-left: 6.5rem;
838
+ color: var(--muted);
839
+ font-size: var(--text-2xs);
840
+ }
841
+
842
+ .wtcal-ribbon-hour {
843
+ position: absolute;
844
+ transform: translateX(-50%);
845
+ }
846
+
847
+ .wtcal-ribbon-row {
848
+ display: flex;
849
+ gap: var(--space-2);
850
+ align-items: center;
851
+ }
852
+
853
+ /* A fixed column, so every band starts at the same x and the cursor reads as
854
+ one line down the stack rather than a staircase. */
855
+ .wtcal-ribbon-who {
856
+ flex: 0 0 6rem;
857
+ overflow: hidden;
858
+ color: var(--muted);
859
+ font-size: var(--text-xs);
860
+ text-overflow: ellipsis;
861
+ white-space: nowrap;
862
+ }
863
+
864
+ .wtcal-ribbon {
865
+ position: relative;
866
+ flex: 1 1 auto;
867
+ height: var(--space-5);
868
+ border: var(--border-width) solid var(--border);
869
+ border-radius: var(--radius-sm);
870
+ background: var(--panel-2, var(--panel));
871
+ overflow: hidden;
872
+ }
873
+
874
+ /* Busy is solid. Nothing else on the band is filled, so "solid" is the whole
875
+ signal and it survives being printed in grey. */
876
+ .wtcal-ribbon-busy {
877
+ position: absolute;
878
+ top: 0;
879
+ bottom: 0;
880
+ background: var(--accent-dim);
881
+ }
882
+
883
+ /* Unknown is hatched, and the hatch is drawn from tokens rather than an
884
+ image. Distinguishable from both solid and open without colour: neither of
885
+ the other two readings carries a texture.
886
+
887
+ Striped against `--border-strong`, not `--border`. The first build used
888
+ `--border` and the finish review was right that it did not read: against
889
+ `--panel-2` that is about four values per channel, so the band looked flat
890
+ everywhere the word was not, and the whole third reading lived in one 8px
891
+ line of type. `--border-strong` is a real step, and still quieter than the
892
+ solid `--accent-dim` of a busy block, which is the order these three
893
+ readings have to sit in. */
894
+ .wtcal-ribbon.is-unknown {
895
+ background: repeating-linear-gradient(
896
+ 135deg,
897
+ var(--panel-2, var(--panel)),
898
+ var(--panel-2, var(--panel)) 5px,
899
+ var(--border-strong) 5px,
900
+ var(--border-strong) 6px
901
+ );
902
+ }
903
+
904
+ /* The word rides on the hatch, because a texture alone is something a person
905
+ interprets and this one has a specific meaning.
906
+
907
+ Sentence case, deliberately. The One Uppercase Register Rule reserves
908
+ uppercase and tracking for structural labels, and this is not one -- it is a
909
+ state read off a band. The first build set it in that register and the
910
+ finish review called it correctly. It sits on a chip of the band's own
911
+ ground so it stays legible where a hatch stripe runs under it. */
912
+ .wtcal-ribbon-word {
913
+ position: absolute;
914
+ top: 50%;
915
+ left: var(--space-1);
916
+ transform: translateY(-50%);
917
+ padding: 0 var(--space-1);
918
+ border-radius: var(--radius-sm);
919
+ background: var(--panel-2, var(--panel));
920
+ color: var(--muted);
921
+ font-size: var(--text-2xs);
922
+ }
923
+
924
+ /* The cursor is the event's own slot: an accent outline over a faint accent
925
+ wash. The wash is there because the outline alone did not read against a
926
+ busy block at one hour's width, and it is kept low enough to tint the
927
+ readings underneath rather than replace them -- the cursor says where you
928
+ are, never what anyone's time is. */
929
+ .wtcal-ribbon-cursor {
930
+ position: absolute;
931
+ top: -1px;
932
+ bottom: -1px;
933
+ border: var(--border-width) solid var(--accent);
934
+ border-radius: var(--radius-sm);
935
+ background: color-mix(in srgb, var(--accent) 22%, transparent);
936
+ pointer-events: none;
937
+ }
938
+
939
+ /* At phone width the name column would eat the band it labels, so the name
940
+ takes the line above its own ribbon instead. */
941
+ .wtcal-editor.is-compact .wtcal-ribbon-row {
942
+ flex-direction: column;
943
+ align-items: stretch;
944
+ gap: 2px;
945
+ }
946
+
947
+ .wtcal-editor.is-compact .wtcal-ribbon-who {
948
+ flex: 0 0 auto;
949
+ }
950
+
951
+ .wtcal-editor.is-compact .wtcal-ribbon-hours {
952
+ margin-left: 0;
953
+ }