@f-ewald/components 1.25.0 → 1.27.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 +7 -3
- package/custom-elements.json +1390 -181
- package/dist/calendar-day.d.ts +33 -0
- package/dist/calendar-day.d.ts.map +1 -0
- package/dist/calendar-day.js +280 -0
- package/dist/calendar-day.js.map +1 -0
- package/dist/calendar-timeline-base.d.ts +43 -0
- package/dist/calendar-timeline-base.d.ts.map +1 -0
- package/dist/calendar-timeline-base.js +113 -0
- package/dist/calendar-timeline-base.js.map +1 -0
- package/dist/calendar-week.d.ts +37 -0
- package/dist/calendar-week.d.ts.map +1 -0
- package/dist/calendar-week.js +315 -0
- package/dist/calendar-week.js.map +1 -0
- package/dist/comment-composer.d.ts +15 -1
- package/dist/comment-composer.d.ts.map +1 -1
- package/dist/comment-composer.js +25 -3
- package/dist/comment-composer.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/modal-dialog.d.ts +49 -0
- package/dist/modal-dialog.d.ts.map +1 -0
- package/dist/modal-dialog.js +287 -0
- package/dist/modal-dialog.js.map +1 -0
- package/dist/toast-notification.d.ts +14 -0
- package/dist/toast-notification.d.ts.map +1 -1
- package/dist/toast-notification.js +23 -8
- package/dist/toast-notification.js.map +1 -1
- package/dist/tokens.css +15 -3
- package/dist/tokens.d.ts +9 -8
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +43 -15
- package/dist/tokens.js.map +1 -1
- package/dist/ui-button.d.ts +2 -0
- package/dist/ui-button.d.ts.map +1 -1
- package/dist/ui-button.js +9 -1
- package/dist/ui-button.js.map +1 -1
- package/dist/utils/calendar.d.ts +41 -0
- package/dist/utils/calendar.d.ts.map +1 -1
- package/dist/utils/calendar.js +74 -0
- package/dist/utils/calendar.js.map +1 -1
- package/docs/calendar-day.md +70 -0
- package/docs/calendar-week.md +69 -0
- package/docs/comment-composer.md +5 -1
- package/docs/modal-dialog.md +66 -0
- package/docs/toast-notification.md +23 -0
- package/docs/ui-button.md +1 -0
- package/llms.txt +108 -3
- package/package.json +1 -1
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { CalendarTimelineBase } from "./calendar-timeline-base.js";
|
|
2
|
+
/**
|
|
3
|
+
* A single day rendered as an hourly time grid — a Google-Calendar-style
|
|
4
|
+
* view distinct from `calendar-month`'s whole-day table. Declarative
|
|
5
|
+
* `calendar-entry` children with a time-of-day in `start`/`end` (e.g.
|
|
6
|
+
* `start="2026-03-05T09:00"`) render as positioned/sized blocks; entries
|
|
7
|
+
* with only a date (no time) render in an all-day band above the grid.
|
|
8
|
+
* Overlapping timed entries stack into side-by-side columns; overlapping
|
|
9
|
+
* all-day/multi-day entries stack into lanes, same as `calendar-month`.
|
|
10
|
+
* Read-only.
|
|
11
|
+
*
|
|
12
|
+
* Shares its slotted-entry observation, resolution, and hover/focus
|
|
13
|
+
* interaction sync with `calendar-week` via `CalendarTimelineBase`.
|
|
14
|
+
*
|
|
15
|
+
* @element calendar-day
|
|
16
|
+
* @slot - Declarative `calendar-entry` elements to render for this day.
|
|
17
|
+
*/
|
|
18
|
+
export declare class CalendarDay extends CalendarTimelineBase {
|
|
19
|
+
/** The day shown, `"YYYY-MM-DD"`. */
|
|
20
|
+
date: string;
|
|
21
|
+
static styles: import("lit").CSSResult[];
|
|
22
|
+
/** Renders one lane's stacked all-day bars, given the entries assigned to it. */
|
|
23
|
+
private _renderAllDayLane;
|
|
24
|
+
/** Renders a positioned/sized block for one timed entry, clamped to this day's bounds. */
|
|
25
|
+
private _renderTimedEntry;
|
|
26
|
+
protected render(): import("lit-html").TemplateResult<1>;
|
|
27
|
+
}
|
|
28
|
+
declare global {
|
|
29
|
+
interface HTMLElementTagNameMap {
|
|
30
|
+
"calendar-day": CalendarDay;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=calendar-day.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar-day.d.ts","sourceRoot":"","sources":["../src/calendar-day.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAoBnE;;;;;;;;;;;;;;;GAeG;AACH,qBACa,WAAY,SAAQ,oBAAoB;IACnD,qCAAqC;IACR,IAAI,EAAE,MAAM,CAAyB;IAElE,OAAgB,MAAM,4BA0JpB;IAEF,iFAAiF;IACjF,OAAO,CAAC,iBAAiB;IAoBzB,0FAA0F;IAC1F,OAAO,CAAC,iBAAiB;IAqBzB,UAAmB,MAAM,yCA6CxB;CACF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,WAAW,CAAC;KAC7B;CACF"}
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { css, html, nothing } from "lit";
|
|
8
|
+
import { customElement, property } from "lit/decorators.js";
|
|
9
|
+
import { repeat } from "lit/directives/repeat.js";
|
|
10
|
+
import { CalendarTimelineBase } from "./calendar-timeline-base.js";
|
|
11
|
+
import { tokens } from "./tokens.js";
|
|
12
|
+
import { assignLanes, minutesSinceMidnight, monthName, parseIsoDate, toIsoDate, } from "./utils/calendar.js";
|
|
13
|
+
const HOUR_HEIGHT_REM = 3;
|
|
14
|
+
const HOURS = Array.from({ length: 24 }, (_, i) => i);
|
|
15
|
+
const hourLabelFormatter = new Intl.DateTimeFormat(undefined, { hour: "numeric" });
|
|
16
|
+
/** Formats hour `h` (0-23) as a locale-aware hour label, e.g. "9 AM". */
|
|
17
|
+
function hourLabel(h) {
|
|
18
|
+
return hourLabelFormatter.format(new Date(2000, 0, 1, h));
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* A single day rendered as an hourly time grid — a Google-Calendar-style
|
|
22
|
+
* view distinct from `calendar-month`'s whole-day table. Declarative
|
|
23
|
+
* `calendar-entry` children with a time-of-day in `start`/`end` (e.g.
|
|
24
|
+
* `start="2026-03-05T09:00"`) render as positioned/sized blocks; entries
|
|
25
|
+
* with only a date (no time) render in an all-day band above the grid.
|
|
26
|
+
* Overlapping timed entries stack into side-by-side columns; overlapping
|
|
27
|
+
* all-day/multi-day entries stack into lanes, same as `calendar-month`.
|
|
28
|
+
* Read-only.
|
|
29
|
+
*
|
|
30
|
+
* Shares its slotted-entry observation, resolution, and hover/focus
|
|
31
|
+
* interaction sync with `calendar-week` via `CalendarTimelineBase`.
|
|
32
|
+
*
|
|
33
|
+
* @element calendar-day
|
|
34
|
+
* @slot - Declarative `calendar-entry` elements to render for this day.
|
|
35
|
+
*/
|
|
36
|
+
let CalendarDay = class CalendarDay extends CalendarTimelineBase {
|
|
37
|
+
constructor() {
|
|
38
|
+
super(...arguments);
|
|
39
|
+
/** The day shown, `"YYYY-MM-DD"`. */
|
|
40
|
+
this.date = toIsoDate(new Date());
|
|
41
|
+
}
|
|
42
|
+
static { this.styles = [
|
|
43
|
+
tokens,
|
|
44
|
+
css `
|
|
45
|
+
:host {
|
|
46
|
+
display: block;
|
|
47
|
+
font-family: var(
|
|
48
|
+
--ui-font,
|
|
49
|
+
ui-sans-serif,
|
|
50
|
+
system-ui,
|
|
51
|
+
sans-serif,
|
|
52
|
+
"Apple Color Emoji",
|
|
53
|
+
"Segoe UI Emoji",
|
|
54
|
+
"Segoe UI Symbol",
|
|
55
|
+
"Noto Color Emoji"
|
|
56
|
+
);
|
|
57
|
+
font-size: var(--ui-font-size-sm, 0.75rem);
|
|
58
|
+
}
|
|
59
|
+
.day-name {
|
|
60
|
+
margin: 0 0 0.5rem;
|
|
61
|
+
color: var(--ui-text, #0f172a);
|
|
62
|
+
font-size: var(--ui-font-size-lg, 1rem);
|
|
63
|
+
font-weight: var(--ui-font-weight-semibold, 600);
|
|
64
|
+
line-height: var(--ui-line-height-tight, 1.25);
|
|
65
|
+
}
|
|
66
|
+
.day-name.today {
|
|
67
|
+
color: var(--ui-primary, #4f46e5);
|
|
68
|
+
}
|
|
69
|
+
.all-day-band {
|
|
70
|
+
display: flex;
|
|
71
|
+
margin-bottom: 0.5rem;
|
|
72
|
+
}
|
|
73
|
+
.all-day-band.empty {
|
|
74
|
+
display: none;
|
|
75
|
+
}
|
|
76
|
+
.hour-gutter-spacer {
|
|
77
|
+
flex: 0 0 3rem;
|
|
78
|
+
}
|
|
79
|
+
.all-day-lanes {
|
|
80
|
+
display: flex;
|
|
81
|
+
flex: 1 1 auto;
|
|
82
|
+
flex-direction: column;
|
|
83
|
+
gap: 0.25rem;
|
|
84
|
+
}
|
|
85
|
+
.all-day-lane {
|
|
86
|
+
display: flex;
|
|
87
|
+
gap: 0.25rem;
|
|
88
|
+
}
|
|
89
|
+
.grid {
|
|
90
|
+
display: flex;
|
|
91
|
+
border-top: 1px solid var(--ui-border, #e2e8f0);
|
|
92
|
+
}
|
|
93
|
+
.hour-gutter {
|
|
94
|
+
flex: 0 0 3rem;
|
|
95
|
+
}
|
|
96
|
+
.hour-label-cell {
|
|
97
|
+
box-sizing: border-box;
|
|
98
|
+
height: ${HOUR_HEIGHT_REM}rem;
|
|
99
|
+
padding-right: 0.5rem;
|
|
100
|
+
border-bottom: 1px solid var(--ui-border, #e2e8f0);
|
|
101
|
+
color: var(--ui-text-muted, #64748b);
|
|
102
|
+
font-variant-numeric: tabular-nums;
|
|
103
|
+
text-align: right;
|
|
104
|
+
white-space: nowrap;
|
|
105
|
+
}
|
|
106
|
+
.day-column {
|
|
107
|
+
position: relative;
|
|
108
|
+
flex: 1 1 auto;
|
|
109
|
+
height: ${HOUR_HEIGHT_REM * 24}rem;
|
|
110
|
+
}
|
|
111
|
+
.day-column.today {
|
|
112
|
+
background: color-mix(in srgb, var(--ui-primary, #4f46e5) 6%, transparent);
|
|
113
|
+
}
|
|
114
|
+
.hour-line {
|
|
115
|
+
box-sizing: border-box;
|
|
116
|
+
height: ${HOUR_HEIGHT_REM}rem;
|
|
117
|
+
border-bottom: 1px solid var(--ui-border, #e2e8f0);
|
|
118
|
+
}
|
|
119
|
+
.entry-bar {
|
|
120
|
+
position: relative;
|
|
121
|
+
box-sizing: border-box;
|
|
122
|
+
flex: 1 1 auto;
|
|
123
|
+
overflow: hidden;
|
|
124
|
+
border-radius: var(--ui-radius-sm, 0.25rem);
|
|
125
|
+
padding: 0.25rem 0.5rem;
|
|
126
|
+
transition: box-shadow 120ms ease;
|
|
127
|
+
}
|
|
128
|
+
.entry-bar.entry-block {
|
|
129
|
+
position: absolute;
|
|
130
|
+
}
|
|
131
|
+
.entry-bar.entry-hovered,
|
|
132
|
+
.entry-bar.entry-focused {
|
|
133
|
+
box-shadow: inset 0 0 0 100vmax var(--ui-hover-overlay, rgb(255 255 255 / 0.32));
|
|
134
|
+
}
|
|
135
|
+
.entry-title {
|
|
136
|
+
display: block;
|
|
137
|
+
overflow: hidden;
|
|
138
|
+
font-weight: var(--ui-font-weight-medium, 500);
|
|
139
|
+
white-space: nowrap;
|
|
140
|
+
text-overflow: ellipsis;
|
|
141
|
+
pointer-events: none;
|
|
142
|
+
}
|
|
143
|
+
.entry-link {
|
|
144
|
+
position: absolute;
|
|
145
|
+
z-index: 1;
|
|
146
|
+
inset: 0;
|
|
147
|
+
border-radius: inherit;
|
|
148
|
+
color: inherit;
|
|
149
|
+
cursor: pointer;
|
|
150
|
+
text-decoration: none;
|
|
151
|
+
}
|
|
152
|
+
.entry-link:focus-visible {
|
|
153
|
+
outline: 2px solid var(--ui-primary, #4f46e5);
|
|
154
|
+
outline-offset: -2px;
|
|
155
|
+
box-shadow: var(--ui-focus-ring, 0 0 0 3px rgb(79 70 229 / 0.35)) inset;
|
|
156
|
+
}
|
|
157
|
+
.entry-bar.neutral {
|
|
158
|
+
background: color-mix(in srgb, var(--ui-text-muted, #64748b) 15%, var(--ui-surface, #ffffff));
|
|
159
|
+
color: var(--ui-text-muted, #64748b);
|
|
160
|
+
}
|
|
161
|
+
.entry-bar.info {
|
|
162
|
+
background: color-mix(in srgb, var(--ui-info, #0ea5e9) 15%, var(--ui-surface, #ffffff));
|
|
163
|
+
color: var(--ui-info, #0ea5e9);
|
|
164
|
+
}
|
|
165
|
+
.entry-bar.primary {
|
|
166
|
+
background: color-mix(in srgb, var(--ui-primary, #4f46e5) 15%, var(--ui-surface, #ffffff));
|
|
167
|
+
color: var(--ui-primary, #4f46e5);
|
|
168
|
+
}
|
|
169
|
+
.entry-bar.success {
|
|
170
|
+
background: color-mix(in srgb, var(--ui-success, #16a34a) 15%, var(--ui-surface, #ffffff));
|
|
171
|
+
color: var(--ui-success, #16a34a);
|
|
172
|
+
}
|
|
173
|
+
.entry-bar.warning {
|
|
174
|
+
background: color-mix(in srgb, var(--ui-warning, #d97706) 15%, var(--ui-surface, #ffffff));
|
|
175
|
+
color: var(--ui-warning, #d97706);
|
|
176
|
+
}
|
|
177
|
+
.entry-bar.danger {
|
|
178
|
+
background: color-mix(in srgb, var(--ui-danger, #dc2626) 15%, var(--ui-surface, #ffffff));
|
|
179
|
+
color: var(--ui-danger, #dc2626);
|
|
180
|
+
}
|
|
181
|
+
@media (forced-colors: active) {
|
|
182
|
+
.entry-link:focus-visible {
|
|
183
|
+
outline-color: Highlight;
|
|
184
|
+
box-shadow: none;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
@media (prefers-reduced-motion: reduce) {
|
|
188
|
+
.entry-bar {
|
|
189
|
+
transition: none;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
slot {
|
|
193
|
+
display: none;
|
|
194
|
+
}
|
|
195
|
+
`,
|
|
196
|
+
]; }
|
|
197
|
+
/** Renders one lane's stacked all-day bars, given the entries assigned to it. */
|
|
198
|
+
_renderAllDayLane(laned, lane) {
|
|
199
|
+
const entries = laned.filter((entry) => entry.lane === lane);
|
|
200
|
+
return html `
|
|
201
|
+
<div class="all-day-lane">
|
|
202
|
+
${entries.map((entry) => html `
|
|
203
|
+
<div
|
|
204
|
+
class="entry-bar ${entry.color}"
|
|
205
|
+
data-entry-key=${this.entryKey(entry)}
|
|
206
|
+
title=${entry.href ? nothing : entry.label}
|
|
207
|
+
>
|
|
208
|
+
${this.renderEntryLink(entry, entry.label)}
|
|
209
|
+
<span class="entry-title" aria-hidden=${entry.href ? "true" : nothing}>${entry.label}</span>
|
|
210
|
+
</div>
|
|
211
|
+
`)}
|
|
212
|
+
</div>
|
|
213
|
+
`;
|
|
214
|
+
}
|
|
215
|
+
/** Renders a positioned/sized block for one timed entry, clamped to this day's bounds. */
|
|
216
|
+
_renderTimedEntry(entry, laneCount, dayStart, dayEnd) {
|
|
217
|
+
const visibleStart = entry.startDate < dayStart ? dayStart : entry.startDate;
|
|
218
|
+
const visibleEnd = entry.endDate > dayEnd ? dayEnd : entry.endDate;
|
|
219
|
+
const topRem = (minutesSinceMidnight(visibleStart) / 60) * HOUR_HEIGHT_REM;
|
|
220
|
+
const bottomRem = (minutesSinceMidnight(visibleEnd) / 60) * HOUR_HEIGHT_REM;
|
|
221
|
+
const heightRem = Math.max(bottomRem - topRem, HOUR_HEIGHT_REM / 4);
|
|
222
|
+
const widthPercent = 100 / laneCount;
|
|
223
|
+
const bodyText = [entry.label, ...(entry.details ?? [])].filter(Boolean).join("\n");
|
|
224
|
+
return html `
|
|
225
|
+
<div
|
|
226
|
+
class="entry-bar entry-block ${entry.color}"
|
|
227
|
+
data-entry-key=${this.entryKey(entry)}
|
|
228
|
+
title=${entry.href ? nothing : bodyText}
|
|
229
|
+
style="top: ${topRem}rem; height: ${heightRem}rem; left: ${entry.lane * widthPercent}%; width: ${widthPercent}%;"
|
|
230
|
+
>
|
|
231
|
+
${this.renderEntryLink(entry, bodyText)}
|
|
232
|
+
<span class="entry-title" aria-hidden=${entry.href ? "true" : nothing}>${entry.label}</span>
|
|
233
|
+
</div>
|
|
234
|
+
`;
|
|
235
|
+
}
|
|
236
|
+
render() {
|
|
237
|
+
const day = parseIsoDate(this.date) ?? new Date();
|
|
238
|
+
const dayStart = new Date(day);
|
|
239
|
+
dayStart.setHours(0, 0, 0, 0);
|
|
240
|
+
const dayEnd = new Date(day);
|
|
241
|
+
dayEnd.setHours(23, 59, 59, 999);
|
|
242
|
+
const isToday = toIsoDate(day) === toIsoDate(new Date());
|
|
243
|
+
const resolved = this.resolveTimedEntriesFor(dayStart, dayEnd);
|
|
244
|
+
const allDay = resolved.filter((entry) => entry.allDay);
|
|
245
|
+
const timed = resolved.filter((entry) => !entry.allDay);
|
|
246
|
+
const { entries: lanedAllDay, laneCount: allDayLaneCount } = assignLanes(allDay);
|
|
247
|
+
const { entries: lanedTimed, laneCount: timedLaneCount } = assignLanes(timed);
|
|
248
|
+
return html `
|
|
249
|
+
<div class="day">
|
|
250
|
+
<h4 class="day-name ${isToday ? "today" : ""}">
|
|
251
|
+
${monthName(day.getMonth() + 1)} ${day.getDate()}, ${day.getFullYear()}
|
|
252
|
+
</h4>
|
|
253
|
+
<div class="all-day-band ${allDay.length === 0 ? "empty" : ""}">
|
|
254
|
+
<div class="hour-gutter-spacer"></div>
|
|
255
|
+
<div class="all-day-lanes">
|
|
256
|
+
${repeat(Array.from({ length: Math.max(allDayLaneCount, 1) }, (_, i) => i), (lane) => lane, (lane) => this._renderAllDayLane(lanedAllDay, lane))}
|
|
257
|
+
</div>
|
|
258
|
+
</div>
|
|
259
|
+
<div class="grid">
|
|
260
|
+
<div class="hour-gutter">
|
|
261
|
+
${HOURS.map((h) => html `<div class="hour-label-cell">${hourLabel(h)}</div>`)}
|
|
262
|
+
</div>
|
|
263
|
+
<div class="day-column ${isToday ? "today" : ""}">
|
|
264
|
+
${HOURS.map(() => html `<div class="hour-line"></div>`)}
|
|
265
|
+
${repeat(lanedTimed, (entry) => this.entryKey(entry), (entry) => this._renderTimedEntry(entry, Math.max(timedLaneCount, 1), dayStart, dayEnd))}
|
|
266
|
+
</div>
|
|
267
|
+
</div>
|
|
268
|
+
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
269
|
+
</div>
|
|
270
|
+
`;
|
|
271
|
+
}
|
|
272
|
+
};
|
|
273
|
+
__decorate([
|
|
274
|
+
property({ reflect: true })
|
|
275
|
+
], CalendarDay.prototype, "date", void 0);
|
|
276
|
+
CalendarDay = __decorate([
|
|
277
|
+
customElement("calendar-day")
|
|
278
|
+
], CalendarDay);
|
|
279
|
+
export { CalendarDay };
|
|
280
|
+
//# sourceMappingURL=calendar-day.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar-day.js","sourceRoot":"","sources":["../src/calendar-day.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EACL,WAAW,EACX,oBAAoB,EACpB,SAAS,EACT,YAAY,EACZ,SAAS,GAEV,MAAM,qBAAqB,CAAC;AAE7B,MAAM,eAAe,GAAG,CAAC,CAAC;AAC1B,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CA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AAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCAAsC;AAFvD,WAAW;IADvB,aAAa,CAAC,cAAc,CAAC;GACjB,WAAW,CAyPvB","sourcesContent":["import { css, html, nothing } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\nimport { repeat } from \"lit/directives/repeat.js\";\nimport { CalendarTimelineBase } from \"./calendar-timeline-base.js\";\nimport { tokens } from \"./tokens.js\";\nimport {\n assignLanes,\n minutesSinceMidnight,\n monthName,\n parseIsoDate,\n toIsoDate,\n type LanedEntry,\n} from \"./utils/calendar.js\";\n\nconst HOUR_HEIGHT_REM = 3;\nconst HOURS = Array.from({ length: 24 }, (_, i) => i);\nconst hourLabelFormatter = new Intl.DateTimeFormat(undefined, { hour: \"numeric\" });\n\n/** Formats hour `h` (0-23) as a locale-aware hour label, e.g. \"9 AM\". */\nfunction hourLabel(h: number): string {\n return hourLabelFormatter.format(new Date(2000, 0, 1, h));\n}\n\n/**\n * A single day rendered as an hourly time grid — a Google-Calendar-style\n * view distinct from `calendar-month`'s whole-day table. Declarative\n * `calendar-entry` children with a time-of-day in `start`/`end` (e.g.\n * `start=\"2026-03-05T09:00\"`) render as positioned/sized blocks; entries\n * with only a date (no time) render in an all-day band above the grid.\n * Overlapping timed entries stack into side-by-side columns; overlapping\n * all-day/multi-day entries stack into lanes, same as `calendar-month`.\n * Read-only.\n *\n * Shares its slotted-entry observation, resolution, and hover/focus\n * interaction sync with `calendar-week` via `CalendarTimelineBase`.\n *\n * @element calendar-day\n * @slot - Declarative `calendar-entry` elements to render for this day.\n */\n@customElement(\"calendar-day\")\nexport class CalendarDay extends CalendarTimelineBase {\n /** The day shown, `\"YYYY-MM-DD\"`. */\n @property({ reflect: true }) date: string = toIsoDate(new Date());\n\n static override styles = [\n tokens,\n css`\n :host {\n display: block;\n font-family: var(\n --ui-font,\n ui-sans-serif,\n system-ui,\n sans-serif,\n \"Apple Color Emoji\",\n \"Segoe UI Emoji\",\n \"Segoe UI Symbol\",\n \"Noto Color Emoji\"\n );\n font-size: var(--ui-font-size-sm, 0.75rem);\n }\n .day-name {\n margin: 0 0 0.5rem;\n color: var(--ui-text, #0f172a);\n font-size: var(--ui-font-size-lg, 1rem);\n font-weight: var(--ui-font-weight-semibold, 600);\n line-height: var(--ui-line-height-tight, 1.25);\n }\n .day-name.today {\n color: var(--ui-primary, #4f46e5);\n }\n .all-day-band {\n display: flex;\n margin-bottom: 0.5rem;\n }\n .all-day-band.empty {\n display: none;\n }\n .hour-gutter-spacer {\n flex: 0 0 3rem;\n }\n .all-day-lanes {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n gap: 0.25rem;\n }\n .all-day-lane {\n display: flex;\n gap: 0.25rem;\n }\n .grid {\n display: flex;\n border-top: 1px solid var(--ui-border, #e2e8f0);\n }\n .hour-gutter {\n flex: 0 0 3rem;\n }\n .hour-label-cell {\n box-sizing: border-box;\n height: ${HOUR_HEIGHT_REM}rem;\n padding-right: 0.5rem;\n border-bottom: 1px solid var(--ui-border, #e2e8f0);\n color: var(--ui-text-muted, #64748b);\n font-variant-numeric: tabular-nums;\n text-align: right;\n white-space: nowrap;\n }\n .day-column {\n position: relative;\n flex: 1 1 auto;\n height: ${HOUR_HEIGHT_REM * 24}rem;\n }\n .day-column.today {\n background: color-mix(in srgb, var(--ui-primary, #4f46e5) 6%, transparent);\n }\n .hour-line {\n box-sizing: border-box;\n height: ${HOUR_HEIGHT_REM}rem;\n border-bottom: 1px solid var(--ui-border, #e2e8f0);\n }\n .entry-bar {\n position: relative;\n box-sizing: border-box;\n flex: 1 1 auto;\n overflow: hidden;\n border-radius: var(--ui-radius-sm, 0.25rem);\n padding: 0.25rem 0.5rem;\n transition: box-shadow 120ms ease;\n }\n .entry-bar.entry-block {\n position: absolute;\n }\n .entry-bar.entry-hovered,\n .entry-bar.entry-focused {\n box-shadow: inset 0 0 0 100vmax var(--ui-hover-overlay, rgb(255 255 255 / 0.32));\n }\n .entry-title {\n display: block;\n overflow: hidden;\n font-weight: var(--ui-font-weight-medium, 500);\n white-space: nowrap;\n text-overflow: ellipsis;\n pointer-events: none;\n }\n .entry-link {\n position: absolute;\n z-index: 1;\n inset: 0;\n border-radius: inherit;\n color: inherit;\n cursor: pointer;\n text-decoration: none;\n }\n .entry-link:focus-visible {\n outline: 2px solid var(--ui-primary, #4f46e5);\n outline-offset: -2px;\n box-shadow: var(--ui-focus-ring, 0 0 0 3px rgb(79 70 229 / 0.35)) inset;\n }\n .entry-bar.neutral {\n background: color-mix(in srgb, var(--ui-text-muted, #64748b) 15%, var(--ui-surface, #ffffff));\n color: var(--ui-text-muted, #64748b);\n }\n .entry-bar.info {\n background: color-mix(in srgb, var(--ui-info, #0ea5e9) 15%, var(--ui-surface, #ffffff));\n color: var(--ui-info, #0ea5e9);\n }\n .entry-bar.primary {\n background: color-mix(in srgb, var(--ui-primary, #4f46e5) 15%, var(--ui-surface, #ffffff));\n color: var(--ui-primary, #4f46e5);\n }\n .entry-bar.success {\n background: color-mix(in srgb, var(--ui-success, #16a34a) 15%, var(--ui-surface, #ffffff));\n color: var(--ui-success, #16a34a);\n }\n .entry-bar.warning {\n background: color-mix(in srgb, var(--ui-warning, #d97706) 15%, var(--ui-surface, #ffffff));\n color: var(--ui-warning, #d97706);\n }\n .entry-bar.danger {\n background: color-mix(in srgb, var(--ui-danger, #dc2626) 15%, var(--ui-surface, #ffffff));\n color: var(--ui-danger, #dc2626);\n }\n @media (forced-colors: active) {\n .entry-link:focus-visible {\n outline-color: Highlight;\n box-shadow: none;\n }\n }\n @media (prefers-reduced-motion: reduce) {\n .entry-bar {\n transition: none;\n }\n }\n slot {\n display: none;\n }\n `,\n ];\n\n /** Renders one lane's stacked all-day bars, given the entries assigned to it. */\n private _renderAllDayLane(laned: LanedEntry[], lane: number) {\n const entries = laned.filter((entry) => entry.lane === lane);\n return html`\n <div class=\"all-day-lane\">\n ${entries.map(\n (entry) => html`\n <div\n class=\"entry-bar ${entry.color}\"\n data-entry-key=${this.entryKey(entry)}\n title=${entry.href ? nothing : entry.label}\n >\n ${this.renderEntryLink(entry, entry.label)}\n <span class=\"entry-title\" aria-hidden=${entry.href ? \"true\" : nothing}>${entry.label}</span>\n </div>\n `,\n )}\n </div>\n `;\n }\n\n /** Renders a positioned/sized block for one timed entry, clamped to this day's bounds. */\n private _renderTimedEntry(entry: LanedEntry, laneCount: number, dayStart: Date, dayEnd: Date) {\n const visibleStart = entry.startDate < dayStart ? dayStart : entry.startDate;\n const visibleEnd = entry.endDate > dayEnd ? dayEnd : entry.endDate;\n const topRem = (minutesSinceMidnight(visibleStart) / 60) * HOUR_HEIGHT_REM;\n const bottomRem = (minutesSinceMidnight(visibleEnd) / 60) * HOUR_HEIGHT_REM;\n const heightRem = Math.max(bottomRem - topRem, HOUR_HEIGHT_REM / 4);\n const widthPercent = 100 / laneCount;\n const bodyText = [entry.label, ...(entry.details ?? [])].filter(Boolean).join(\"\\n\");\n return html`\n <div\n class=\"entry-bar entry-block ${entry.color}\"\n data-entry-key=${this.entryKey(entry)}\n title=${entry.href ? nothing : bodyText}\n style=\"top: ${topRem}rem; height: ${heightRem}rem; left: ${entry.lane * widthPercent}%; width: ${widthPercent}%;\"\n >\n ${this.renderEntryLink(entry, bodyText)}\n <span class=\"entry-title\" aria-hidden=${entry.href ? \"true\" : nothing}>${entry.label}</span>\n </div>\n `;\n }\n\n protected override render() {\n const day = parseIsoDate(this.date) ?? new Date();\n const dayStart = new Date(day);\n dayStart.setHours(0, 0, 0, 0);\n const dayEnd = new Date(day);\n dayEnd.setHours(23, 59, 59, 999);\n const isToday = toIsoDate(day) === toIsoDate(new Date());\n\n const resolved = this.resolveTimedEntriesFor(dayStart, dayEnd);\n const allDay = resolved.filter((entry) => entry.allDay);\n const timed = resolved.filter((entry) => !entry.allDay);\n const { entries: lanedAllDay, laneCount: allDayLaneCount } = assignLanes(allDay);\n const { entries: lanedTimed, laneCount: timedLaneCount } = assignLanes(timed);\n\n return html`\n <div class=\"day\">\n <h4 class=\"day-name ${isToday ? \"today\" : \"\"}\">\n ${monthName(day.getMonth() + 1)} ${day.getDate()}, ${day.getFullYear()}\n </h4>\n <div class=\"all-day-band ${allDay.length === 0 ? \"empty\" : \"\"}\">\n <div class=\"hour-gutter-spacer\"></div>\n <div class=\"all-day-lanes\">\n ${repeat(\n Array.from({ length: Math.max(allDayLaneCount, 1) }, (_, i) => i),\n (lane) => lane,\n (lane) => this._renderAllDayLane(lanedAllDay, lane),\n )}\n </div>\n </div>\n <div class=\"grid\">\n <div class=\"hour-gutter\">\n ${HOURS.map((h) => html`<div class=\"hour-label-cell\">${hourLabel(h)}</div>`)}\n </div>\n <div class=\"day-column ${isToday ? \"today\" : \"\"}\">\n ${HOURS.map(() => html`<div class=\"hour-line\"></div>`)}\n ${repeat(\n lanedTimed,\n (entry) => this.entryKey(entry),\n (entry) => this._renderTimedEntry(entry, Math.max(timedLaneCount, 1), dayStart, dayEnd),\n )}\n </div>\n </div>\n <slot @slotchange=${this.handleSlotChange}></slot>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"calendar-day\": CalendarDay;\n }\n}\n"]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { LitElement, nothing } from "lit";
|
|
2
|
+
import type { CalendarEntry } from "./calendar-entry.js";
|
|
3
|
+
import { type LanedEntry, type ResolvedTimedEntry } from "./utils/calendar.js";
|
|
4
|
+
/**
|
|
5
|
+
* Shared base for the hour-grid calendar views, `calendar-day` and
|
|
6
|
+
* `calendar-week` — not a registered custom element itself. Holds what both
|
|
7
|
+
* need identically: observing declarative `calendar-entry` children for live
|
|
8
|
+
* updates, resolving them into time-aware entries, and syncing hover/focus
|
|
9
|
+
* interaction classes on rendered entry bars/links. Pure date/geometry math
|
|
10
|
+
* (parsing, lane assignment) stays in `utils/calendar.ts` per this
|
|
11
|
+
* codebase's existing convention; this class holds only the parts that need
|
|
12
|
+
* to be instance state on a `LitElement` (observers, cached query results).
|
|
13
|
+
*
|
|
14
|
+
* Subclasses must render a default `<slot @slotchange=${this.handleSlotChange}>`
|
|
15
|
+
* for `calendar-entry` children, and use the `.entry-bar`/`.entry-link`
|
|
16
|
+
* class-naming convention for `syncEntryInteractions`/`renderEntryLink` to
|
|
17
|
+
* find rendered entry elements.
|
|
18
|
+
*/
|
|
19
|
+
export declare abstract class CalendarTimelineBase extends LitElement {
|
|
20
|
+
protected readonly entryElements: CalendarEntry[];
|
|
21
|
+
/** Bumped when entry elements, attributes, or slotted text change to force a re-render. */
|
|
22
|
+
protected entriesVersion: number;
|
|
23
|
+
private entriesObserver?;
|
|
24
|
+
/** Observes declarative entry attributes and slotted text for live updates. */
|
|
25
|
+
connectedCallback(): void;
|
|
26
|
+
/** Releases the entry observer when this element disconnects. */
|
|
27
|
+
disconnectedCallback(): void;
|
|
28
|
+
/** Restores hover/focus classes from the live DOM after Lit updates or reuses cells. */
|
|
29
|
+
protected updated(): void;
|
|
30
|
+
/** Re-renders when declarative `calendar-entry` children are added or removed. */
|
|
31
|
+
protected handleSlotChange(): void;
|
|
32
|
+
/** Reads, resolves, and filters slotted entries to those overlapping `[rangeStart, rangeEnd]`. */
|
|
33
|
+
protected resolveTimedEntriesFor(rangeStart: Date, rangeEnd: Date): ResolvedTimedEntry[];
|
|
34
|
+
/** Current render key shared by an entry's rendered cells/blocks. */
|
|
35
|
+
protected entryKey(entry: LanedEntry): string;
|
|
36
|
+
/** Toggles one interaction class on every rendered element belonging to an entry. */
|
|
37
|
+
protected setEntryInteraction(entryKey: string, className: string, active: boolean): void;
|
|
38
|
+
/** Reconciles classes against the links actually hovered or focused after a render. */
|
|
39
|
+
protected syncEntryInteractions(): void;
|
|
40
|
+
/** Renders a transparent full-cell link without wrapping the visible text. */
|
|
41
|
+
protected renderEntryLink(entry: LanedEntry, accessibleText: string): typeof nothing | import("lit-html").TemplateResult<1>;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=calendar-timeline-base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar-timeline-base.d.ts","sourceRoot":"","sources":["../src/calendar-timeline-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,OAAO,EAAE,MAAM,KAAK,CAAC;AAEhD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAKL,KAAK,UAAU,EACf,KAAK,kBAAkB,EACxB,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;;;;;;;;GAcG;AACH,8BAAsB,oBAAqB,SAAQ,UAAU;IAE3D,SAAS,CAAC,QAAQ,CAAC,aAAa,EAAG,aAAa,EAAE,CAAC;IAEnD,2FAA2F;IAClF,SAAS,CAAC,cAAc,SAAK;IAEtC,OAAO,CAAC,eAAe,CAAC,CAAmB;IAE3C,+EAA+E;IACtE,iBAAiB,IAAI,IAAI,CAWjC;IAED,iEAAiE;IACxD,oBAAoB,IAAI,IAAI,CAGpC;IAED,wFAAwF;IACxF,UAAmB,OAAO,IAAI,IAAI,CAEjC;IAED,kFAAkF;IAClF,SAAS,CAAC,gBAAgB,IAAI,IAAI,CAEjC;IAED,kGAAkG;IAClG,SAAS,CAAC,sBAAsB,CAAC,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,GAAG,kBAAkB,EAAE,CAMvF;IAED,qEAAqE;IACrE,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAE5C;IAED,qFAAqF;IACrF,SAAS,CAAC,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI,CAMxF;IAED,uFAAuF;IACvF,SAAS,CAAC,qBAAqB,IAAI,IAAI,CAWtC;IAED,8EAA8E;IAC9E,SAAS,CAAC,eAAe,CAAC,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,yDAclE;CACF"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { LitElement, html, nothing } from "lit";
|
|
8
|
+
import { queryAssignedElements, state } from "lit/decorators.js";
|
|
9
|
+
import { CALENDAR_ENTRY_ATTRIBUTES, overlapsRange, readCalendarEntryElement, resolveTimedEntry, } from "./utils/calendar.js";
|
|
10
|
+
/**
|
|
11
|
+
* Shared base for the hour-grid calendar views, `calendar-day` and
|
|
12
|
+
* `calendar-week` — not a registered custom element itself. Holds what both
|
|
13
|
+
* need identically: observing declarative `calendar-entry` children for live
|
|
14
|
+
* updates, resolving them into time-aware entries, and syncing hover/focus
|
|
15
|
+
* interaction classes on rendered entry bars/links. Pure date/geometry math
|
|
16
|
+
* (parsing, lane assignment) stays in `utils/calendar.ts` per this
|
|
17
|
+
* codebase's existing convention; this class holds only the parts that need
|
|
18
|
+
* to be instance state on a `LitElement` (observers, cached query results).
|
|
19
|
+
*
|
|
20
|
+
* Subclasses must render a default `<slot @slotchange=${this.handleSlotChange}>`
|
|
21
|
+
* for `calendar-entry` children, and use the `.entry-bar`/`.entry-link`
|
|
22
|
+
* class-naming convention for `syncEntryInteractions`/`renderEntryLink` to
|
|
23
|
+
* find rendered entry elements.
|
|
24
|
+
*/
|
|
25
|
+
export class CalendarTimelineBase extends LitElement {
|
|
26
|
+
constructor() {
|
|
27
|
+
super(...arguments);
|
|
28
|
+
/** Bumped when entry elements, attributes, or slotted text change to force a re-render. */
|
|
29
|
+
this.entriesVersion = 0;
|
|
30
|
+
}
|
|
31
|
+
/** Observes declarative entry attributes and slotted text for live updates. */
|
|
32
|
+
connectedCallback() {
|
|
33
|
+
super.connectedCallback();
|
|
34
|
+
this.entriesVersion++;
|
|
35
|
+
this.entriesObserver ??= new MutationObserver(() => this.entriesVersion++);
|
|
36
|
+
this.entriesObserver.observe(this, {
|
|
37
|
+
attributes: true,
|
|
38
|
+
attributeFilter: CALENDAR_ENTRY_ATTRIBUTES,
|
|
39
|
+
characterData: true,
|
|
40
|
+
childList: true,
|
|
41
|
+
subtree: true,
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
/** Releases the entry observer when this element disconnects. */
|
|
45
|
+
disconnectedCallback() {
|
|
46
|
+
this.entriesObserver?.disconnect();
|
|
47
|
+
super.disconnectedCallback();
|
|
48
|
+
}
|
|
49
|
+
/** Restores hover/focus classes from the live DOM after Lit updates or reuses cells. */
|
|
50
|
+
updated() {
|
|
51
|
+
this.syncEntryInteractions();
|
|
52
|
+
}
|
|
53
|
+
/** Re-renders when declarative `calendar-entry` children are added or removed. */
|
|
54
|
+
handleSlotChange() {
|
|
55
|
+
this.entriesVersion++;
|
|
56
|
+
}
|
|
57
|
+
/** Reads, resolves, and filters slotted entries to those overlapping `[rangeStart, rangeEnd]`. */
|
|
58
|
+
resolveTimedEntriesFor(rangeStart, rangeEnd) {
|
|
59
|
+
return this.entryElements
|
|
60
|
+
.map(readCalendarEntryElement)
|
|
61
|
+
.map(resolveTimedEntry)
|
|
62
|
+
.filter((entry) => entry !== null)
|
|
63
|
+
.filter((entry) => overlapsRange(entry, rangeStart, rangeEnd));
|
|
64
|
+
}
|
|
65
|
+
/** Current render key shared by an entry's rendered cells/blocks. */
|
|
66
|
+
entryKey(entry) {
|
|
67
|
+
return `${entry.lane}|${entry.start}|${entry.end}|${entry.label}|${entry.href ?? ""}`;
|
|
68
|
+
}
|
|
69
|
+
/** Toggles one interaction class on every rendered element belonging to an entry. */
|
|
70
|
+
setEntryInteraction(entryKey, className, active) {
|
|
71
|
+
for (const cell of this.renderRoot.querySelectorAll(".entry-bar")) {
|
|
72
|
+
if (cell.dataset.entryKey === entryKey) {
|
|
73
|
+
cell.classList.toggle(className, active);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
/** Reconciles classes against the links actually hovered or focused after a render. */
|
|
78
|
+
syncEntryInteractions() {
|
|
79
|
+
for (const cell of this.renderRoot.querySelectorAll(".entry-bar")) {
|
|
80
|
+
cell.classList.remove("entry-hovered", "entry-focused");
|
|
81
|
+
}
|
|
82
|
+
for (const link of this.renderRoot.querySelectorAll(".entry-link:hover")) {
|
|
83
|
+
this.setEntryInteraction(link.dataset.entryKey ?? "", "entry-hovered", true);
|
|
84
|
+
}
|
|
85
|
+
const activeElement = this.shadowRoot?.activeElement;
|
|
86
|
+
if (activeElement instanceof HTMLElement && activeElement.matches(".entry-link")) {
|
|
87
|
+
this.setEntryInteraction(activeElement.dataset.entryKey ?? "", "entry-focused", true);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
/** Renders a transparent full-cell link without wrapping the visible text. */
|
|
91
|
+
renderEntryLink(entry, accessibleText) {
|
|
92
|
+
const entryKey = this.entryKey(entry);
|
|
93
|
+
return entry.href
|
|
94
|
+
? html `<a
|
|
95
|
+
class="entry-link"
|
|
96
|
+
href=${entry.href}
|
|
97
|
+
aria-label=${accessibleText}
|
|
98
|
+
data-entry-key=${entryKey}
|
|
99
|
+
@pointerenter=${() => this.setEntryInteraction(entryKey, "entry-hovered", true)}
|
|
100
|
+
@pointerleave=${() => this.setEntryInteraction(entryKey, "entry-hovered", false)}
|
|
101
|
+
@focus=${() => this.setEntryInteraction(entryKey, "entry-focused", true)}
|
|
102
|
+
@blur=${() => this.setEntryInteraction(entryKey, "entry-focused", false)}
|
|
103
|
+
></a>`
|
|
104
|
+
: nothing;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
__decorate([
|
|
108
|
+
queryAssignedElements({ selector: "calendar-entry" })
|
|
109
|
+
], CalendarTimelineBase.prototype, "entryElements", void 0);
|
|
110
|
+
__decorate([
|
|
111
|
+
state()
|
|
112
|
+
], CalendarTimelineBase.prototype, "entriesVersion", void 0);
|
|
113
|
+
//# sourceMappingURL=calendar-timeline-base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar-timeline-base.js","sourceRoot":"","sources":["../src/calendar-timeline-base.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAEjE,OAAO,EACL,yBAAyB,EACzB,aAAa,EACb,wBAAwB,EACxB,iBAAiB,GAGlB,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;;;;;;;;GAcG;AACH,MAAM,OAAgB,oBAAqB,SAAQ,UAAU;IAA7D;;QAIE,2FAA2F;QACxE,mBAAc,GAAG,CAAC,CAAC;IAuFxC,CAAC;IAnFC,+EAA+E;IACtE,iBAAiB;QACxB,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,IAAI,CAAC,cAAc,EAAE,CAAC;QACtB,IAAI,CAAC,eAAe,KAAK,IAAI,gBAAgB,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC;QAC3E,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,IAAI,EAAE;YACjC,UAAU,EAAE,IAAI;YAChB,eAAe,EAAE,yBAAyB;YAC1C,aAAa,EAAE,IAAI;YACnB,SAAS,EAAE,IAAI;YACf,OAAO,EAAE,IAAI;SACd,CAAC,CAAC;IACL,CAAC;IAED,iEAAiE;IACxD,oBAAoB;QAC3B,IAAI,CAAC,eAAe,EAAE,UAAU,EAAE,CAAC;QACnC,KAAK,CAAC,oBAAoB,EAAE,CAAC;IAC/B,CAAC;IAED,wFAAwF;IACrE,OAAO;QAC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;4DAA8B","sourcesContent":["import { LitElement, html, nothing } from \"lit\";\nimport { queryAssignedElements, state } from \"lit/decorators.js\";\nimport type { CalendarEntry } from \"./calendar-entry.js\";\nimport {\n CALENDAR_ENTRY_ATTRIBUTES,\n overlapsRange,\n readCalendarEntryElement,\n resolveTimedEntry,\n type LanedEntry,\n type ResolvedTimedEntry,\n} from \"./utils/calendar.js\";\n\n/**\n * Shared base for the hour-grid calendar views, `calendar-day` and\n * `calendar-week` — not a registered custom element itself. Holds what both\n * need identically: observing declarative `calendar-entry` children for live\n * updates, resolving them into time-aware entries, and syncing hover/focus\n * interaction classes on rendered entry bars/links. Pure date/geometry math\n * (parsing, lane assignment) stays in `utils/calendar.ts` per this\n * codebase's existing convention; this class holds only the parts that need\n * to be instance state on a `LitElement` (observers, cached query results).\n *\n * Subclasses must render a default `<slot @slotchange=${this.handleSlotChange}>`\n * for `calendar-entry` children, and use the `.entry-bar`/`.entry-link`\n * class-naming convention for `syncEntryInteractions`/`renderEntryLink` to\n * find rendered entry elements.\n */\nexport abstract class CalendarTimelineBase extends LitElement {\n @queryAssignedElements({ selector: \"calendar-entry\" })\n protected readonly entryElements!: CalendarEntry[];\n\n /** Bumped when entry elements, attributes, or slotted text change to force a re-render. */\n @state() protected entriesVersion = 0;\n\n private entriesObserver?: MutationObserver;\n\n /** Observes declarative entry attributes and slotted text for live updates. */\n override connectedCallback(): void {\n super.connectedCallback();\n this.entriesVersion++;\n this.entriesObserver ??= new MutationObserver(() => this.entriesVersion++);\n this.entriesObserver.observe(this, {\n attributes: true,\n attributeFilter: CALENDAR_ENTRY_ATTRIBUTES,\n characterData: true,\n childList: true,\n subtree: true,\n });\n }\n\n /** Releases the entry observer when this element disconnects. */\n override disconnectedCallback(): void {\n this.entriesObserver?.disconnect();\n super.disconnectedCallback();\n }\n\n /** Restores hover/focus classes from the live DOM after Lit updates or reuses cells. */\n protected override updated(): void {\n this.syncEntryInteractions();\n }\n\n /** Re-renders when declarative `calendar-entry` children are added or removed. */\n protected handleSlotChange(): void {\n this.entriesVersion++;\n }\n\n /** Reads, resolves, and filters slotted entries to those overlapping `[rangeStart, rangeEnd]`. */\n protected resolveTimedEntriesFor(rangeStart: Date, rangeEnd: Date): ResolvedTimedEntry[] {\n return this.entryElements\n .map(readCalendarEntryElement)\n .map(resolveTimedEntry)\n .filter((entry): entry is ResolvedTimedEntry => entry !== null)\n .filter((entry) => overlapsRange(entry, rangeStart, rangeEnd));\n }\n\n /** Current render key shared by an entry's rendered cells/blocks. */\n protected entryKey(entry: LanedEntry): string {\n return `${entry.lane}|${entry.start}|${entry.end}|${entry.label}|${entry.href ?? \"\"}`;\n }\n\n /** Toggles one interaction class on every rendered element belonging to an entry. */\n protected setEntryInteraction(entryKey: string, className: string, active: boolean): void {\n for (const cell of this.renderRoot.querySelectorAll<HTMLElement>(\".entry-bar\")) {\n if (cell.dataset.entryKey === entryKey) {\n cell.classList.toggle(className, active);\n }\n }\n }\n\n /** Reconciles classes against the links actually hovered or focused after a render. */\n protected syncEntryInteractions(): void {\n for (const cell of this.renderRoot.querySelectorAll<HTMLElement>(\".entry-bar\")) {\n cell.classList.remove(\"entry-hovered\", \"entry-focused\");\n }\n for (const link of this.renderRoot.querySelectorAll<HTMLElement>(\".entry-link:hover\")) {\n this.setEntryInteraction(link.dataset.entryKey ?? \"\", \"entry-hovered\", true);\n }\n const activeElement = this.shadowRoot?.activeElement;\n if (activeElement instanceof HTMLElement && activeElement.matches(\".entry-link\")) {\n this.setEntryInteraction(activeElement.dataset.entryKey ?? \"\", \"entry-focused\", true);\n }\n }\n\n /** Renders a transparent full-cell link without wrapping the visible text. */\n protected renderEntryLink(entry: LanedEntry, accessibleText: string) {\n const entryKey = this.entryKey(entry);\n return entry.href\n ? html`<a\n class=\"entry-link\"\n href=${entry.href}\n aria-label=${accessibleText}\n data-entry-key=${entryKey}\n @pointerenter=${() => this.setEntryInteraction(entryKey, \"entry-hovered\", true)}\n @pointerleave=${() => this.setEntryInteraction(entryKey, \"entry-hovered\", false)}\n @focus=${() => this.setEntryInteraction(entryKey, \"entry-focused\", true)}\n @blur=${() => this.setEntryInteraction(entryKey, \"entry-focused\", false)}\n ></a>`\n : nothing;\n }\n}\n"]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { CalendarTimelineBase } from "./calendar-timeline-base.js";
|
|
2
|
+
/**
|
|
3
|
+
* Sunday-through-Saturday week rendered as one shared hourly time grid — the
|
|
4
|
+
* seven-day sibling of `calendar-day`. Unlike `calendar-year` composing 12
|
|
5
|
+
* `calendar-month` children, this is its own independent 7-column layout
|
|
6
|
+
* (not 7 nested `<calendar-day>` elements): a single hour gutter is drawn
|
|
7
|
+
* once, and multi-day/all-day entries span the days they cover as one
|
|
8
|
+
* continuous bar in a shared all-day band, since lanes for that band are
|
|
9
|
+
* assigned once across the whole visible week (unlike `calendar-month`'s
|
|
10
|
+
* documented per-instance lane limitation). Timed entries stack into
|
|
11
|
+
* side-by-side columns independently per day, same as `calendar-day`.
|
|
12
|
+
* Read-only.
|
|
13
|
+
*
|
|
14
|
+
* Shares its slotted-entry observation, resolution, and hover/focus
|
|
15
|
+
* interaction sync with `calendar-day` via `CalendarTimelineBase`.
|
|
16
|
+
*
|
|
17
|
+
* @element calendar-week
|
|
18
|
+
* @slot - Declarative `calendar-entry` elements to render for this week.
|
|
19
|
+
*/
|
|
20
|
+
export declare class CalendarWeek extends CalendarTimelineBase {
|
|
21
|
+
/** Any date within the displayed week (`"YYYY-MM-DD"`) — the week runs Sunday through Saturday. */
|
|
22
|
+
date: string;
|
|
23
|
+
static styles: import("lit").CSSResult[];
|
|
24
|
+
/** Renders one all-day/multi-day bar, spanning the visible-week columns it covers. */
|
|
25
|
+
private _renderAllDayEntry;
|
|
26
|
+
/** Renders a positioned/sized block for one timed entry, clamped to `day`'s bounds. */
|
|
27
|
+
private _renderTimedEntry;
|
|
28
|
+
/** Renders one day's hour column: grid lines plus its own independently laned timed entries. */
|
|
29
|
+
private _renderDayColumn;
|
|
30
|
+
protected render(): import("lit-html").TemplateResult<1>;
|
|
31
|
+
}
|
|
32
|
+
declare global {
|
|
33
|
+
interface HTMLElementTagNameMap {
|
|
34
|
+
"calendar-week": CalendarWeek;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=calendar-week.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar-week.d.ts","sourceRoot":"","sources":["../src/calendar-week.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AA6BnE;;;;;;;;;;;;;;;;;GAiBG;AACH,qBACa,YAAa,SAAQ,oBAAoB;IACpD,mGAAmG;IACtE,IAAI,EAAE,MAAM,CAAyB;IAElE,OAAgB,MAAM,4BAmKpB;IAEF,sFAAsF;IACtF,OAAO,CAAC,kBAAkB;IAkB1B,uFAAuF;IACvF,OAAO,CAAC,iBAAiB;IAqBzB,gGAAgG;IAChG,OAAO,CAAC,gBAAgB;IAoBxB,UAAmB,MAAM,yCA+CxB;CACF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,eAAe,EAAE,YAAY,CAAC;KAC/B;CACF"}
|