@lekoala/date-picker 0.1.1 → 0.3.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 +33 -8
- package/custom-elements.json +54 -0
- package/dist/date-picker.css +223 -76
- package/dist/date-picker.js +327 -90
- package/dist/date-picker.min.css +1 -1
- package/dist/date-picker.min.js +13 -13
- package/dist/date-picker.standalone.min.js +237 -90
- package/dist/types/date-calendar.d.ts +3 -0
- package/dist/types/date-calendar.d.ts.map +1 -1
- package/dist/types/date-field.d.ts +3 -1
- package/dist/types/date-field.d.ts.map +1 -1
- package/dist/types/date-picker.d.ts +86 -5
- package/dist/types/date-picker.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/intl.d.ts +9 -0
- package/dist/types/intl.d.ts.map +1 -1
- package/dist/types/time.d.ts +8 -0
- package/dist/types/time.d.ts.map +1 -0
- package/docs/ACCESSIBILITY.md +17 -9
- package/docs/API.md +68 -2
- package/docs/ARCHITECTURE.md +16 -2
- package/docs/AT-CHECKLIST.md +1 -1
- package/docs/DECISIONS.md +10 -1
- package/docs/MIGRATION-FLATPICKR.md +1 -1
- package/docs/ROADMAP.md +3 -2
- package/docs/USE_CASES.md +14 -1
- package/package.json +5 -5
- package/src/date-calendar.js +45 -13
- package/src/date-field.js +12 -4
- package/src/date-picker.css +223 -76
- package/src/date-picker.js +314 -80
- package/src/index.js +1 -0
- package/src/intl.js +35 -0
- package/src/time.js +39 -0
|
@@ -103,6 +103,9 @@ export declare class DateCalendarElement extends HTMLElement {
|
|
|
103
103
|
/** @public */
|
|
104
104
|
get selection(): "none" | "single";
|
|
105
105
|
set selection(value: string);
|
|
106
|
+
/** @public Visible month-name style in the month select (`long` | `short`); anything else falls back to `long`. The accessible grid heading always keeps the long month/year form. */
|
|
107
|
+
get monthFormat(): "long" | "short";
|
|
108
|
+
set monthFormat(value: string);
|
|
106
109
|
/** @public */
|
|
107
110
|
get highlightedRange(): {
|
|
108
111
|
start: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-calendar.d.ts","sourceRoot":"","sources":["../../src/date-calendar.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"date-calendar.d.ts","sourceRoot":"","sources":["../../src/date-calendar.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAmFhD,YAAqC,SAAS,GAApC;IAAC,KAAK,EAAC,MAAM,CAAC;IAAA,GAAG,EAAC,MAAM,CAAA;CAAC,CAAW;AAC9C,YAA8E,SAAS,GAA7E,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IAAC,QAAQ,CAAC,EAAC,OAAO,CAAC;IAAC,WAAW,CAAC,EAAC,MAAM,CAAA;CAAC,CAAW;AACvF,YAAyF,UAAU,GAAzF,CAAC,KAAK,EAAC,SAAS,EAAE,OAAO,EAAC;IAAC,MAAM,EAAC,WAAW,CAAA;CAAC,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAY;AACnG,YAA0C,UAAU,GAA1C,UAAU,GAAG;IAAC,IAAI,EAAC,UAAU,CAAA;CAAC,CAAY;AACpD,YAAgF,iBAAiB,GAAvF,CAAC,IAAI,EAAC,MAAM,EAAE,WAAW,EAAC,SAAS,KAAK,SAAS,GAAG,IAAI,GAAG,SAAS,CAAmB;AACjG,YAA8E,WAAW,GAA/E,CAAC,IAAI,EAAC,MAAM,EAAE,KAAK,EAAC,SAAS,KAAK,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAa;AACzF,YAAoC,qBAAqB,GAA/C,CAAC,IAAI,EAAC,MAAM,KAAK,OAAO,CAAuB;AAhB7D;;;;;;;;;GASG;AACH,qDAAqD;AACrD,8FAA8F;AAC9F,0GAA0G;AAC1G,2DAA2D;AAC3D,wGAAw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QAKf;IAED,mCAAmC;IACnC,UAAU,CAAC,KAAK,EADJ,aACI,QAgCf;IAED,sCAAsC;IACtC,MAAM,CAAC,IAAI,AADC,CAAuB,EAAf,OACF,QAoIjB;CACF"}
|
|
@@ -66,7 +66,9 @@ export declare class DateFieldController {
|
|
|
66
66
|
/** Whether the user edited the visible text since the last application. */
|
|
67
67
|
get isDirty(): boolean;
|
|
68
68
|
/** Live text input: the raw text no longer matches the canonical value, so
|
|
69
|
-
* the hidden ISO must not submit it.
|
|
69
|
+
* the hidden ISO must not submit it. A text that formats back to the current
|
|
70
|
+
* canonical value (e.g. re-applied by a calendar pick) keeps the ISO value
|
|
71
|
+
* valid; invalidating in-flight commits first still drops stale async work. */
|
|
70
72
|
handleInput(): void;
|
|
71
73
|
/**
|
|
72
74
|
* Commit the visible text. Returns the parsed canonical date on success, the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-field.d.ts","sourceRoot":"","sources":["../../src/date-field.js"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH,qBAAa,mBAAmB;IAMvB,KAAK;IACL,QAAQ;IACR,OAAO;;;;;;IACZ,sCAAsC;IACjC,MAAM,EADA,gBAAgB,GAAG,IAAI;IAElC,kDAAkD;IAC7C,SAAS;IACT,MAAM;IACN,SAAS;IACT,aAAa;IAClB,sCAAsC;IACjC,kBAAkB,EADZ,gBAAgB,GAAG,IAAI;IAElC,kCAAkC;IAC7B,mBAAmB,EADb,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI;IAE9B;;;;OAIG;IACE,OAAO,EAFF,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;QAAC,EAAE,EAAE,OAAO,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAC,CAAC,CAAC,GAAG,IAAI;IAtB/E;;;OAGG;IACH,YAAY,KAAK,EAHN,gBAGM,EAAE,OAAO,AAFvB,CAAuE,EAA/D;QAAC,QAAQ,CAAC,EAAE,MAA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AM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAE/B,EAqB9B;IAED,6BAA6B;IAC7B,SAAS,CAAC,MAAM,EADJ,MACI,QAEf;IAED,+CAA+C;IAC/C,WAAW,CAAC,QAAQ,EADR,MAAM,CAAC,MAAM,EAAE,MAAM,CACb,QAEnB;IAED,4BAA4B;IAC5B,MAAM,CAAC,KAAK,EADA,MACA,UAEX;IAED,2BAA2B;IAC3B,KAAK,CAAC,IAAI,EADE,MACF,UAET;IAED,IAAI,WAAW,WAEd;IAED,IAAI,UAAU,YAEb;IAED,IAAI,UAAU,YAEb;IAED;uDACmD;IACnD,cAAc,SASb;IAED,iEAAiE;IACjE,cAAc,SAmBb;IAED,0DAA0D;IAC1D,KAAK,SAEJ;IAED,2EAA2E;IAC3E,IAAI,OAAO,YAEV;IAED;;;mFAG+E;IAC/E,WAAW,SAkBV;IAED;;;;;OAKG;IACG,MAAM,IAFC,OAAO,CAAC;QAAC,MAAM,EAAE,IAAI,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAC,CAAC,CA4BnF;IAED;;;OAGG;IACH,YAAY,CAAC,KAAK,EAHP,MAGO,EAAE,OAAO,AAFxB,CAAqC,EAA7B;QAAC,MAAM,CAAC,EAAE,OAAO,CAAA;KAEI,QAW/B;IAED,mEAAmE;IACnE,cAAc,WAIb;IAED;+CAC2C;IAC3C,QAAQ,SAOP;CACF"}
|
|
@@ -14,13 +14,24 @@ export declare class DatePickerElement extends HTMLElement {
|
|
|
14
14
|
/** @type {DateRangeController | null} */
|
|
15
15
|
_range: DateRangeController | null;
|
|
16
16
|
_orderTags: Set<any>;
|
|
17
|
+
/** Native time companions, [start, end]. @type {[HTMLInputElement | null, HTMLInputElement | null]} */
|
|
18
|
+
_timeFields: [HTMLInputElement | null, HTMLInputElement | null];
|
|
19
|
+
/** Time inputs currently holding our order error. @type {Set<HTMLInputElement>} */
|
|
20
|
+
_timeOrderOwned: Set<HTMLInputElement>;
|
|
17
21
|
/** @type {"" | "start" | "end"} */
|
|
18
22
|
_lastFocusEndpoint: "" | "start" | "end";
|
|
19
23
|
_rangeCommitId: number;
|
|
20
24
|
/** Map of clicked/keyboard-activated grid dates to the generation at click
|
|
21
25
|
* time (range mode supersession/stale protection). @type {Map<string, number>} */
|
|
22
26
|
_pendingIntents: Map<string, number>;
|
|
23
|
-
|
|
27
|
+
/** Overlaid calendar triggers, one per field (single) or per bound (range). @type {{button: HTMLButtonElement, endpoint: "" | "start" | "end"}[]} */
|
|
28
|
+
_buttons: {
|
|
29
|
+
button: HTMLButtonElement;
|
|
30
|
+
endpoint: "" | "start" | "end";
|
|
31
|
+
}[];
|
|
32
|
+
/** Control that opened the popover, so single mode can restore focus to it.
|
|
33
|
+
* @type {HTMLElement | null} */
|
|
34
|
+
_returnFocus: HTMLElement | null;
|
|
24
35
|
_panel: HTMLDivElement | null;
|
|
25
36
|
_calendar: DateCalendarElement | null;
|
|
26
37
|
_originalDescribedBy: string;
|
|
@@ -59,11 +70,19 @@ export declare class DatePickerElement extends HTMLElement {
|
|
|
59
70
|
_renderDay: any;
|
|
60
71
|
/** @type {any} */
|
|
61
72
|
_isDateDisabled: any;
|
|
73
|
+
/** Public picker coordinate-space request. @type {"viewport" | "document"} */
|
|
74
|
+
_coordinateSpace: "viewport" | "document";
|
|
62
75
|
static observedAttributes: string[];
|
|
63
76
|
constructor();
|
|
64
77
|
_rangeMode(): boolean;
|
|
65
78
|
connectedCallback(): void;
|
|
66
79
|
_connectSingle(): void;
|
|
80
|
+
/**
|
|
81
|
+
* Find optional native time companions. They stay fully native (no hidden
|
|
82
|
+
* input, no field controller); the picker only coordinates from/to order.
|
|
83
|
+
* A bad composition never breaks the date picker: warn and leave times alone.
|
|
84
|
+
*/
|
|
85
|
+
_discoverTimeFields(): void;
|
|
67
86
|
_connectRange(): void;
|
|
68
87
|
disconnectedCallback(): void;
|
|
69
88
|
/** @param {DateFieldController | null} field */
|
|
@@ -89,6 +108,9 @@ export declare class DatePickerElement extends HTMLElement {
|
|
|
89
108
|
/** @public */
|
|
90
109
|
get locale(): string;
|
|
91
110
|
set locale(value: string);
|
|
111
|
+
/** @public Visible month-name style forwarded to the popup calendar (`long` | `short`); anything else falls back to `long`. */
|
|
112
|
+
get monthFormat(): "long" | "short";
|
|
113
|
+
set monthFormat(value: string);
|
|
92
114
|
/** @public */
|
|
93
115
|
get min(): string;
|
|
94
116
|
set min(value: string);
|
|
@@ -153,6 +175,9 @@ export declare class DatePickerElement extends HTMLElement {
|
|
|
153
175
|
/** @public @returns {any} */
|
|
154
176
|
get isDateDisabled(): any;
|
|
155
177
|
set isDateDisabled(value: any);
|
|
178
|
+
/** @public JS-only coordinate-space policy: "viewport" by default, "document" as an explicit opt-in; a change made while open applies to the next opening only. @returns {"viewport" | "document"} */
|
|
179
|
+
get coordinateSpace(): "viewport" | "document";
|
|
180
|
+
set coordinateSpace(value: "viewport" | "document");
|
|
156
181
|
_adapter(): {
|
|
157
182
|
locale: string;
|
|
158
183
|
placeholder: string;
|
|
@@ -163,10 +188,45 @@ export declare class DatePickerElement extends HTMLElement {
|
|
|
163
188
|
_syncInputState(): void;
|
|
164
189
|
_syncRangeFields(): void;
|
|
165
190
|
_setRangeAria(): void;
|
|
166
|
-
/**
|
|
167
|
-
|
|
191
|
+
/**
|
|
192
|
+
* Create one calendar trigger. It is a real button overlaid inside the
|
|
193
|
+
* field's own box (see the CSS): the field reserves the room, the trigger
|
|
194
|
+
* stays transparent, and the field's focus ring wraps both.
|
|
195
|
+
* @param {"" | "start" | "end"} endpoint
|
|
196
|
+
* @returns {HTMLButtonElement}
|
|
197
|
+
*/
|
|
198
|
+
_createTrigger(endpoint: "" | "start" | "end"): HTMLButtonElement;
|
|
199
|
+
/**
|
|
200
|
+
* Build the popup once and one trigger per field. Each trigger is inserted
|
|
201
|
+
* immediately after its own field so DOM order follows visual/tab order
|
|
202
|
+
* (`date -> its trigger -> next control`). The hidden ISO field may sit
|
|
203
|
+
* between the two; it is not focusable.
|
|
204
|
+
*/
|
|
205
|
+
_build(): void;
|
|
168
206
|
_bind(): void;
|
|
169
207
|
_bindRange(): void;
|
|
208
|
+
/**
|
|
209
|
+
* Point the shared calendar at one range bound and invalidate any pending
|
|
210
|
+
* activation, so a late response can never commit on the wrong bound.
|
|
211
|
+
* @param {"start" | "end"} endpoint
|
|
212
|
+
*/
|
|
213
|
+
_activateRangeEndpoint(endpoint: "start" | "end"): void;
|
|
214
|
+
/**
|
|
215
|
+
* Range has one trigger per bound. A press on the other bound's trigger is a
|
|
216
|
+
* local switch, not a toggle: it repoints the single open popup instead of
|
|
217
|
+
* closing it. Only a press on the already-active bound toggles shut.
|
|
218
|
+
* @param {"start" | "end"} endpoint
|
|
219
|
+
* @param {MouseEvent} event
|
|
220
|
+
*/
|
|
221
|
+
_onRangeTriggerClick(endpoint: "start" | "end", event: MouseEvent): void;
|
|
222
|
+
/**
|
|
223
|
+
* ArrowDown on a trigger opens the popup and drops into the grid, like the
|
|
224
|
+
* field itself (Enter/Space go through the click path). Needed because focus
|
|
225
|
+
* now returns to the trigger that opened the popover.
|
|
226
|
+
* @param {"" | "start" | "end"} endpoint
|
|
227
|
+
* @param {KeyboardEvent} event
|
|
228
|
+
*/
|
|
229
|
+
_onTriggerKeyDown(endpoint: "" | "start" | "end", event: KeyboardEvent): void;
|
|
170
230
|
/** @param {"" | "start" | "end"} endpoint @param {KeyboardEvent} event */
|
|
171
231
|
_onFieldKeyDown(endpoint: "" | "start" | "end", event: KeyboardEvent): void;
|
|
172
232
|
/** @param {"" | "start" | "end"} endpoint @param {FocusEvent} event */
|
|
@@ -181,6 +241,8 @@ export declare class DatePickerElement extends HTMLElement {
|
|
|
181
241
|
_syncCalendarOptions(): void;
|
|
182
242
|
_refreshLocale(): void;
|
|
183
243
|
_refreshButtonLabel(): void;
|
|
244
|
+
/** Each bound has its own trigger, so each needs its own accessible name: the
|
|
245
|
+
* bound label is what tells two otherwise identical triggers apart. */
|
|
184
246
|
_refreshRangeButtonLabel(): void;
|
|
185
247
|
/** @param {string} value */
|
|
186
248
|
_reflectValue(value: string): void;
|
|
@@ -232,18 +294,37 @@ export declare class DatePickerElement extends HTMLElement {
|
|
|
232
294
|
* @param {"start" | "end"} which
|
|
233
295
|
*/
|
|
234
296
|
_revalidateRange(which: "start" | "end"): void;
|
|
297
|
+
/**
|
|
298
|
+
* Single-mode from/to order on the shared date: `start <= end`.
|
|
299
|
+
* The order error is attributed to the bound that was just modified; the
|
|
300
|
+
* other bound only loses a stale order error, never its native validity.
|
|
301
|
+
* Missing, empty or disabled times fall back to no order constraint: times
|
|
302
|
+
* are never implicitly required. Equality stays valid (duration rules are
|
|
303
|
+
* application-owned).
|
|
304
|
+
* @param {"start" | "end"} which
|
|
305
|
+
*/
|
|
306
|
+
_revalidateTimeOrder(which: "start" | "end"): void;
|
|
307
|
+
_clearTimeOrderValidity(): void;
|
|
235
308
|
_restoreDefault(): void;
|
|
236
309
|
_restoreRangeDefault(): void;
|
|
237
310
|
/** @param {"start" | "end"} which */
|
|
238
311
|
_focusField(which: "start" | "end"): void;
|
|
239
|
-
|
|
312
|
+
/**
|
|
313
|
+
* Restore focus to the control that opened the popover (single mode). focus()
|
|
314
|
+
* must not run synchronously from a keydown handler (Chromium drops focus
|
|
315
|
+
* changes there) and must not re-open the popover under the default
|
|
316
|
+
* open-on-focus. Deferring keeps _suppressFocusOpen active for the call.
|
|
317
|
+
*/
|
|
318
|
+
_restoreFocus(): void;
|
|
240
319
|
/** @returns {"" | "start" | "end"} */
|
|
241
320
|
_resolveRangeEndpoint(): "" | "start" | "end";
|
|
242
321
|
/** @public */
|
|
243
322
|
validate(): Promise<boolean>;
|
|
244
|
-
/** @public @param {{moveFocus?:boolean}} [options] */
|
|
323
|
+
/** @public @param {{moveFocus?:boolean, endpoint?:"start"|"end", returnFocus?:HTMLElement}} [options] */
|
|
245
324
|
show(options?: {
|
|
246
325
|
moveFocus?: boolean;
|
|
326
|
+
endpoint?: "start" | "end";
|
|
327
|
+
returnFocus?: HTMLElement;
|
|
247
328
|
}): void;
|
|
248
329
|
/** @param {boolean} expanded */
|
|
249
330
|
_setExpanded(expanded: boolean): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["../../src/date-picker.js"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAkB,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["../../src/date-picker.js"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAkB,MAAM,iBAAiB,CAAC;AAOtE,qBAAa,iBAAkB,SAAQ,WAAW;IAKzC,GAAG;IACH,UAAU;IACV,WAAW;IACX,MAAM;IACN,MAAM;IACX,yCAAyC;IACpC,MAAM,EADA,mBAAmB,GAAG,IAAI;IAErC,2CAA2C;IACtC,OAAO,EADD,mBAAmB,EAAE,GAAG,IAAI;IAEvC,yCAAyC;IACpC,MAAM,EADA,mBAAmB,GAAG,IAAI;IAEhC,UAAU;IACf,uGAAuG;IAClG,WAAW,EADiC,CAAC,gBAAgB,GAAG,IAAI,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAEnG,mFAAmF;IAC9E,eAAe,EADsC,GAAG,CAAC,gBAAgB,CAAC;IAE/E,mCAAmC;IAC9B,kBAAkB,EADZ,EAAE,GAAG,OAAO,GAAG,KAAK;IAE1B,cAAc;IACnB;sFACkF;IAC7E,eAAe,EADuC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC;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A;KACzE,QAoChB;IAED,gCAAgC;IAChC,YAAY,CAAC,QAAQ,EADT,OACS,QAKpB;IAED,8CAA8C;IAC9C,IAAI,CAAC,YAAY,AADL,CAA+B,EAAvB,OACK,QAwBxB;IAED;;;yCAGqC;IACrC,qBAAqB,IADR,EAAE,GAAG,OAAO,GAAG,KAAK,CAShC;CACF"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export * as dates from "./date.js";
|
|
|
3
3
|
export { DateCalendarElement } from "./date-calendar.js";
|
|
4
4
|
export { DatePickerElement } from "./date-picker.js";
|
|
5
5
|
export { linkDateRange, normalizeRange, rangePosition } from "./date-range.js";
|
|
6
|
-
export { createDateAdapter, formatLongDate, formatMonthYear, monthNames, resolveLocale, weekdayNames, } from "./intl.js";
|
|
6
|
+
export { createDateAdapter, formatLongDate, formatMonthYear, monthNames, monthYearOrder, resolveLocale, weekdayNames, } from "./intl.js";
|
|
7
7
|
export { DEFAULT_MESSAGES, getDefaultMessages, setDefaultMessages } from "./messages.js";
|
|
8
8
|
export { createFetchSource, normalizeDateStates } from "./source.js";
|
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,KAAK,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC/E,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,UAAU,EACV,aAAa,EACb,YAAY,GACb,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACzF,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,KAAK,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC/E,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,UAAU,EACV,cAAc,EACd,aAAa,EACb,YAAY,GACb,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACzF,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/types/intl.d.ts
CHANGED
|
@@ -4,6 +4,15 @@ export declare function resolveLocale(locale?: string): string;
|
|
|
4
4
|
export declare function formatLongDate(value: string, locale?: string): string;
|
|
5
5
|
/** @param {string} value @param {string} [locale] */
|
|
6
6
|
export declare function formatMonthYear(value: string, locale?: string): string;
|
|
7
|
+
/**
|
|
8
|
+
* Locale order of the visible month/year controls, derived from `Intl` so no
|
|
9
|
+
* `showMonthAfterYear`-style option is needed. Year-like parts cover the
|
|
10
|
+
* `relatedYear` / `yearName` variants some calendars expose; anything
|
|
11
|
+
* unrecognized falls back to month-then-year. This is independent of `dir`:
|
|
12
|
+
* the locale decides the linguistic order, direction only mirrors the layout.
|
|
13
|
+
* @param {string} [locale] @returns {["month", "year"] | ["year", "month"]}
|
|
14
|
+
*/
|
|
15
|
+
export declare function monthYearOrder(locale?: string): ["month", "year"] | ["year", "month"];
|
|
7
16
|
/** @param {string} [locale] @param {"long"|"short"} [style] */
|
|
8
17
|
export declare function monthNames(locale?: string, style?: "long" | "short"): string[];
|
|
9
18
|
/**
|
package/dist/types/intl.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intl.d.ts","sourceRoot":"","sources":["../../src/intl.js"],"names":[],"mappings":"AAIA,+BAA+B;AAC/B,wBAAgB,aAAa,CAAC,MAAM,AADhC,CAAwB,EAAhB,MAC6B,UAKxC;AAmBD,qDAAqD;AACrD,wBAAgB,cAAc,CAAC,KAAK,EADxB,MACwB,EAAE,MAAM,AADlB,CAAwB,EAAhB,MACe,UAUhD;AAED,qDAAqD;AACrD,wBAAgB,eAAe,CAAC,KAAK,EADzB,MACyB,EAAE,MAAM,AADnB,CAAwB,EAAhB,MACgB,UAQjD;AAED,+DAA+D;AAC/D,wBAAgB,UAAU,CAAC,MAAM,AAD7B,CAAyB,EAAjB,MAC0B,EAAE,KAAK,AADhB,CAA+B,EAAvB,MAAM,GAAC,OACU,YAMrD;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,MAAM,AAJhC,CACA,EADQ,MAI6B,EAAE,QAAQ,AAH/C,CACA,EADQ,MAG2C,EAAE,KAAK,AAF1D,CAAwC,EAAhC,MAAM,GAAC,OAAO,GAAC,QAE6C,YAetE;AAOD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,AAFrC,CAAwB,EAAhB,MAEkC;;;IAiCzC,4BAA4B;kBAAhB,MAAM;IAKlB,6CAA6C;gBAAjC,MAAM,GAAiB,MAAM;EAmB5C;AAED,4BAA4B;AAC5B,wBAAgB,SAAS,CAAC,KAAK,EADnB,MACmB;;;;SAE9B"}
|
|
1
|
+
{"version":3,"file":"intl.d.ts","sourceRoot":"","sources":["../../src/intl.js"],"names":[],"mappings":"AAIA,+BAA+B;AAC/B,wBAAgB,aAAa,CAAC,MAAM,AADhC,CAAwB,EAAhB,MAC6B,UAKxC;AAmBD,qDAAqD;AACrD,wBAAgB,cAAc,CAAC,KAAK,EADxB,MACwB,EAAE,MAAM,AADlB,CAAwB,EAAhB,MACe,UAUhD;AAED,qDAAqD;AACrD,wBAAgB,eAAe,CAAC,KAAK,EADzB,MACyB,EAAE,MAAM,AADnB,CAAwB,EAAhB,MACgB,UAQjD;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,MAAM,AAFlC,CAAyB,EAAjB,MAE+B,GAFJ,CAAC,OAAO,EAAE,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CA2B1E;AAED,+DAA+D;AAC/D,wBAAgB,UAAU,CAAC,MAAM,AAD7B,CAAyB,EAAjB,MAC0B,EAAE,KAAK,AADhB,CAA+B,EAAvB,MAAM,GAAC,OACU,YAMrD;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,MAAM,AAJhC,CACA,EADQ,MAI6B,EAAE,QAAQ,AAH/C,CACA,EADQ,MAG2C,EAAE,KAAK,AAF1D,CAAwC,EAAhC,MAAM,GAAC,OAAO,GAAC,QAE6C,YAetE;AAOD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,AAFrC,CAAwB,EAAhB,MAEkC;;;IAiCzC,4BAA4B;kBAAhB,MAAM;IAKlB,6CAA6C;gBAAjC,MAAM,GAAiB,MAAM;EAmB5C;AAED,4BAA4B;AAC5B,wBAAgB,SAAS,CAAC,KAAK,EADnB,MACmB;;;;SAE9B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Civil time check for canonical `input[type=time]` values. @param {string} value */
|
|
2
|
+
export declare function isTime(value: string): boolean;
|
|
3
|
+
/**
|
|
4
|
+
* Compare two canonical time values. `09:30` equals `09:30:00`.
|
|
5
|
+
* @param {string} a @param {string} b
|
|
6
|
+
*/
|
|
7
|
+
export declare function compareTimes(a: string, b: string): -1 | 0 | 1;
|
|
8
|
+
//# sourceMappingURL=time.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time.d.ts","sourceRoot":"","sources":["../../src/time.js"],"names":[],"mappings":"AAkBA,sFAAsF;AACtF,wBAAgB,MAAM,CAAC,KAAK,EAD0C,MAC1C,WAE3B;AAOD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAFnB,MAEmB,EAAE,CAAC,EAFJ,MAEI,cAMhC"}
|
package/docs/ACCESSIBILITY.md
CHANGED
|
@@ -42,9 +42,7 @@ Moving focus never changes selection.
|
|
|
42
42
|
|
|
43
43
|
## Month/year controls
|
|
44
44
|
|
|
45
|
-
The
|
|
46
|
-
|
|
47
|
-
The year select is a moving window around the displayed year when no hard min/max exists. Navigating past the current window causes a normal re-render centered on the new year.
|
|
45
|
+
The month control is a native select and the year control is a native number input. They are easy to discover, keyboard-operable, and do not require nested custom popovers.
|
|
48
46
|
|
|
49
47
|
## Date picker input
|
|
50
48
|
|
|
@@ -99,19 +97,29 @@ The same resolved date state used by the grid is used for manual-entry validatio
|
|
|
99
97
|
|
|
100
98
|
Forced colors should not rely on the normal selected-day fill tokens.
|
|
101
99
|
|
|
102
|
-
When `forced-colors: active`, the selected day
|
|
100
|
+
When `forced-colors: active`, the selected day and range endpoints switch to a border-based treatment:
|
|
103
101
|
|
|
104
102
|
- `Canvas` background;
|
|
105
103
|
- `CanvasText` foreground;
|
|
106
|
-
- `Highlight` outer border;
|
|
107
|
-
-
|
|
108
|
-
|
|
109
|
-
Today keeps the base 1px outline — `border-color: var(--dp-accent)` force-adjusts to `CanvasText` here, so it stays a thin `CanvasText` border. Selected and today therefore remain distinct through border color, width, the inner ring and weight (selected is `700`), not through a shared system key.
|
|
104
|
+
- `2px Highlight` outer border;
|
|
105
|
+
- in-range days keep a `1px Highlight` underline (the range fill is lost and the browser does not know the semantics).
|
|
110
106
|
|
|
111
|
-
|
|
107
|
+
Today keeps a thin `1px Highlight` border while selected carries the wider border, so the two stay distinct through border width. The disabled state relies on the native dimming, verified by capture. The month select hands its caret back to the browser (`appearance: auto`), since the author-drawn gradient is a non-system color.
|
|
112
108
|
|
|
113
109
|
Guard: re-run the `color-contrast` review and the forced-colors screenshot bundle whenever `--dp-*` styling or day-cell rendering changes.
|
|
114
110
|
|
|
111
|
+
## Visible focus
|
|
112
|
+
|
|
113
|
+
The default focus language uses `--dp-accent`, so the picker holds together without a consumer stylesheet (`outline: none` plus an accent border and a light halo). Only the focus state is normalized: the resting input appearance stays consumer-owned.
|
|
114
|
+
|
|
115
|
+
Focus is only ever drawn on a real box. The calendar trigger is a real button painted inside the date field's own box, so the field's focus ring naturally wraps the affordance too — no host-level ring, no pseudo-element. When the trigger itself is focused it shows a small inner ring, like the native `input[type=time]` indicator, instead of pretending the whole field is focused.
|
|
116
|
+
|
|
117
|
+
Day cells use an **inner** ring too: keyboard focus stays inside the 44px cell instead of reading as a second selected state, and it never bleeds onto a neighbouring range band. The ring is an `outline` with `outline-offset: -2px`, not an inset `box-shadow`, because forced colors computes `box-shadow` to `none` — an inset shadow would erase the keyboard indicator (including on disabled days, which must stay discoverable). `outline-color` is force-adjusted to a system color there, so the ring survives high contrast. On a cell already filled with the accent (selected, range endpoints) the ring inverts to `--dp-accent-fg` so it stays readable.
|
|
118
|
+
|
|
119
|
+
Each native time companion is an independent control and keeps its own ring; they are not joined, so rings never merge and no neighbour swallows another's focus. In `[range]`, each bound owns its trigger and its own ring, and focus follows the active bound rather than the original trigger.
|
|
120
|
+
|
|
121
|
+
Closing returns focus to the control that opened the popover (field or trigger) in single mode.
|
|
122
|
+
|
|
115
123
|
## Recommended manual test matrix
|
|
116
124
|
|
|
117
125
|
Beyond what the automated suite covers, the following pairings should be exercised before a broad adoption of 0.1. Results are recorded in [AT-CHECKLIST.md](AT-CHECKLIST.md); the human rows there are still open:
|
package/docs/API.md
CHANGED
|
@@ -14,6 +14,7 @@ The public surface — flat event names, `selection` values, `--dp-*` styling to
|
|
|
14
14
|
| `max` | `YYYY-MM-DD` | `""` | Latest activatable date. |
|
|
15
15
|
| `first-day` | `0..6` (`7` alias) | `1` | First weekday; Sunday=0, Monday=1. `7` is accepted as an ISO-style alias of Sunday (`@lekoala/calendar` uses 1..7) and never shifts the grid. Other values fall back to Monday. |
|
|
16
16
|
| `locale` | BCP 47 string | document/navigator | `Intl` locale. |
|
|
17
|
+
| `month-format` | `long \| short` | `long` | Visible month-name style in the month select; anything else falls back to `long`. The accessible grid heading always keeps the long month/year form. |
|
|
17
18
|
| `selection` | `single \| none` | `single` | Whether accepted activation updates `value`. |
|
|
18
19
|
| `fixed-weeks` | boolean | false | Render six rows; date math itself stays 4–6. |
|
|
19
20
|
| `show-week-numbers` | boolean | false | Show ISO week numbers. The column renders only when `first-day === 1` (Monday-first): the ISO week and the displayed week only coincide then. With Sunday-first (`0`/`7`) the column is silently withheld. |
|
|
@@ -30,7 +31,7 @@ Presentation-only range band. It never changes `value`, `selection` or `focusedD
|
|
|
30
31
|
calendar.isDateDisabled = (date) => boolean;
|
|
31
32
|
calendar.dateState = (date, sourceState) => ({
|
|
32
33
|
disabled,
|
|
33
|
-
enabled, // true =
|
|
34
|
+
enabled, // true = lifts isDateDisabled() only; never min/max or resolved disabled
|
|
34
35
|
description,
|
|
35
36
|
...applicationMetadata
|
|
36
37
|
});
|
|
@@ -132,6 +133,7 @@ The direct child text input is required. On enhancement its original `name` move
|
|
|
132
133
|
- `min`;
|
|
133
134
|
- `max`;
|
|
134
135
|
- `open-on-focus` — boolean (default `true`): open the popover when the input receives focus without moving focus; `open-on-focus="false"` keeps focus alone passive;
|
|
136
|
+
- `month-format` — `long | short` (default `long`): visible month-name style forwarded to the popup calendar;
|
|
135
137
|
- `open` — read-only: whether the popover is shown;
|
|
136
138
|
- `openOnFocus` — property form of `open-on-focus`.
|
|
137
139
|
|
|
@@ -150,6 +152,23 @@ The direct child text input is required. On enhancement its original `name` move
|
|
|
150
152
|
- `isDateDisabled`;
|
|
151
153
|
- `messages`.
|
|
152
154
|
|
|
155
|
+
### Popup positioning
|
|
156
|
+
|
|
157
|
+
- `coordinateSpace` — JS-only, `"viewport"` by default.
|
|
158
|
+
|
|
159
|
+
```text
|
|
160
|
+
"viewport"
|
|
161
|
+
panel uses position: fixed
|
|
162
|
+
general/default integration
|
|
163
|
+
|
|
164
|
+
"document"
|
|
165
|
+
panel uses position: absolute
|
|
166
|
+
explicit optimization when the application knows the picker
|
|
167
|
+
reference moves with root-page scrolling
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
`document` follows the `@lekoala/floating` consumer contract: the picker panel is a top-layer popover, so its absolute positioning resolves against the initial containing block; the application remains responsible for knowing that the `<date-picker>` reference itself moves with the root document. Changing `coordinateSpace` while open configures the next opening, never the current one. See the `@lekoala/floating` documentation for the coordinate-space doctrine.
|
|
171
|
+
|
|
153
172
|
### Read-only properties
|
|
154
173
|
|
|
155
174
|
```js
|
|
@@ -173,6 +192,51 @@ await picker.validate();
|
|
|
173
192
|
|
|
174
193
|
Calendar selection also dispatches normal bubbling `input` and `change` events on the visible input.
|
|
175
194
|
|
|
195
|
+
### Time companions
|
|
196
|
+
|
|
197
|
+
Date with one time:
|
|
198
|
+
|
|
199
|
+
```html
|
|
200
|
+
<date-picker>
|
|
201
|
+
<input name="appointment[date]">
|
|
202
|
+
<input type="time" data-time-start name="appointment[time]">
|
|
203
|
+
</date-picker>
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
```text
|
|
207
|
+
appointment[date] = 2026-09-10
|
|
208
|
+
appointment[time] = 09:30
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
Date with from/to times on the same day:
|
|
212
|
+
|
|
213
|
+
```html
|
|
214
|
+
<date-picker>
|
|
215
|
+
<input name="appointment[date]">
|
|
216
|
+
<input type="time" data-time-start name="appointment[from]">
|
|
217
|
+
<input type="time" data-time-end name="appointment[to]">
|
|
218
|
+
</date-picker>
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
```text
|
|
222
|
+
appointment[date] = 2026-09-10
|
|
223
|
+
appointment[from] = 09:30
|
|
224
|
+
appointment[to] = 11:00
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
The submit contract is: `date-picker` owns the civil date selection, the time inputs own their civil time values, the authored HTML `name`s own the submitted structure, and the server/application owns datetime composition plus timezone. The picker never constructs a combined datetime, timestamp or timezone-bearing value.
|
|
228
|
+
|
|
229
|
+
Future range + time projection (not supported yet — range mode leaves marked times native with a console warning):
|
|
230
|
+
|
|
231
|
+
```text
|
|
232
|
+
period[start][date]
|
|
233
|
+
period[start][time]
|
|
234
|
+
period[end][date]
|
|
235
|
+
period[end][time]
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
Optional native time companions (one or both). They are direct children, fixed at connect time, and stay fully native: no hidden input, no `picker.time` property, no `timechange` event — their `input`/`change` events bubble like the date field's. `value` stays a `YYYY-MM-DD` date. The picker only enforces from/to order (`start <= end`, equality allowed, see [D5](DECISIONS.md)); a missing, empty or `disabled` time lifts the constraint, and `validate()` aggregates date validity, native time validity and that order. Range mode does not support time companions yet: marked times there are left native with a console warning.
|
|
239
|
+
|
|
176
240
|
## `<date-picker range>` — shared range surface
|
|
177
241
|
|
|
178
242
|
```html
|
|
@@ -184,6 +248,8 @@ Calendar selection also dispatches normal bubbling `input` and `change` events o
|
|
|
184
248
|
|
|
185
249
|
Two editable fields share one calendar popup. The mode is fixed at connect time (`range` attribute + both marked direct child inputs); switching single/range at runtime is not supported in V1.
|
|
186
250
|
|
|
251
|
+
Each field gets its own calendar trigger, inserted right after it (`start`, then its trigger, `end`, then its trigger), so DOM order matches visual/tab order. Both triggers point at the same popup; activating the other bound's trigger while it is open switches the active bound and keeps it open.
|
|
252
|
+
|
|
187
253
|
### Strict API
|
|
188
254
|
|
|
189
255
|
- `range` — atomic get/set of `{ start, end }` (canonical `YYYY-MM-DD`). The setter validates through `normalizeRange` (ISO-only, ordered; inverted throws) and applies both bounds, the visible fields and both hidden fields **before** one `rangechange` event — no intermediate new-start/old-end state is observable.
|
|
@@ -207,7 +273,7 @@ The business range may be temporarily incomplete or inverted; `calendar.highligh
|
|
|
207
273
|
|
|
208
274
|
- When an ordered range is complete, picking before its start updates only the start; picking after its end updates only the end, regardless of the opening field. The popup closes after this update. An uneditable target bound refuses the activation.
|
|
209
275
|
- Otherwise, opening through a field targets that bound (`activeEndpoint`). Picking from `start` commits it, moves the endpoint to `end` without closing, and a second pick commits and closes. Opening from `end` refuses a date before `start` (`dateinvalid`, nothing changes).
|
|
210
|
-
-
|
|
276
|
+
- Each bound owns its trigger (`input[data-range-start]` then its trigger, `input[data-range-end]` then its trigger); the two triggers share **one** popup, calendar, source and state. Pressing the other bound's trigger while the popup is open switches the active bound and keeps it open instead of toggling it shut. A trigger never opens a `readonly`/`disabled` bound.
|
|
211
277
|
- Typing stays independent per field. Moving `start` past `end` keeps both values and flags the *modified* bound with `rangeOrderStart`; fixing either side revalidates both. Parse/source errors are never cleared by cross-bound revalidation.
|
|
212
278
|
- A stale availability response resolving after the active endpoint changed (or after a newer selection) never commits; a field focus that switches the endpoint invalidates in-flight activations.
|
|
213
279
|
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -93,7 +93,10 @@ This prevents rich decorations from breaking grid semantics or keyboard behavior
|
|
|
93
93
|
3. `min` / `max`;
|
|
94
94
|
4. `isDateDisabled()`.
|
|
95
95
|
|
|
96
|
-
`enabled: true` is the explicit exception seam:
|
|
96
|
+
`enabled: true` is the explicit exception seam: when the resolved state carries
|
|
97
|
+
`enabled === true`, it lifts `isDateDisabled()` only. It never bypasses
|
|
98
|
+
`min`/`max` or the resolved `state.disabled` (source state merged with
|
|
99
|
+
`dateState()` output, so `dateState()` can already replace a source `disabled`).
|
|
97
100
|
|
|
98
101
|
Both click activation and typed picker validation use this resolved state.
|
|
99
102
|
|
|
@@ -144,6 +147,17 @@ The picker creates a `<date-calendar selection="none">` in a native manual popov
|
|
|
144
147
|
|
|
145
148
|
Native Popover owns the top layer. `@lekoala/floating` owns coordinates and geometry updates.
|
|
146
149
|
|
|
150
|
+
### Coordinate space
|
|
151
|
+
|
|
152
|
+
`picker.coordinateSpace` (`"viewport"` default, `"document"` explicit opt-in, JS-only, no attribute) is frozen once per opening in `show()`; `panel.style.position` is coupled:
|
|
153
|
+
|
|
154
|
+
```text
|
|
155
|
+
viewport (default) → fixed
|
|
156
|
+
document → absolute
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
No layout inference is performed. Coordinate-space choice is consumer policy; `@lekoala/floating` owns only coordinate math and update tracking.
|
|
160
|
+
|
|
147
161
|
The picker does not implement:
|
|
148
162
|
|
|
149
163
|
- custom portals;
|
|
@@ -157,7 +171,7 @@ The popup remains in authored DOM, preserving inherited locale/theme/density con
|
|
|
157
171
|
|
|
158
172
|
Two product shapes cover the range cases, and both keep range rules outside the classes:
|
|
159
173
|
|
|
160
|
-
`<date-picker range>` shares **one** calendar surface between two editable fields. Each input is owned by a `DateFieldController` (parsing, hidden ISO, commit/stale protection); the pair is driven by `DateRangeController` in `date-range.js`, which owns the active-endpoint transitions and the start/end state. `DatePickerElement` remains a shell: it coordinates DOM/popup/focus only. `value` is unavailable in range mode and `range` is the atomic pair API; inverted or incomplete business ranges are never forwarded to `highlightedRange`, which stays presentation-only.
|
|
174
|
+
`<date-picker range>` shares **one** calendar surface between two editable fields. Each input is owned by a `DateFieldController` (parsing, hidden ISO, commit/stale protection); the pair is driven by `DateRangeController` in `date-range.js`, which owns the active-endpoint transitions and the start/end state. The shell owns one calendar trigger per bound (each inserted after its own field, both pointing at the same popup) and switches the active endpoint without closing it. `DatePickerElement` remains a shell: it coordinates DOM/popup/focus only. `value` is unavailable in range mode and `range` is the atomic pair API; inverted or incomplete business ranges are never forwarded to `highlightedRange`, which stays presentation-only.
|
|
161
175
|
|
|
162
176
|
`linkDateRange(start, end)` keeps the external relationship for two visually separate pickers:
|
|
163
177
|
|
package/docs/AT-CHECKLIST.md
CHANGED
|
@@ -44,7 +44,7 @@ Release decision (0.1.0): the human reader/OS pairings below are **deferred past
|
|
|
44
44
|
|
|
45
45
|
- [x] [auto] Typing a valid localized date updates the field validation state (no stale invalid message).
|
|
46
46
|
- [x] [split] Typing an impossible date produces an announced invalid message (native invalid state/message covered automatically; announcement still manual).
|
|
47
|
-
- [
|
|
47
|
+
- [ ] [manual] Forced-colors mode keeps selected/today/disabled distinguishable with the simplified border-based treatment (re-check after the neutral-palette + rhythm pass; spot-check with the forced-colors screenshot bundle).
|
|
48
48
|
|
|
49
49
|
## Automated pass
|
|
50
50
|
|
package/docs/DECISIONS.md
CHANGED
|
@@ -35,6 +35,15 @@ Context: DOM-backed styling hooks become API the moment they are documented —
|
|
|
35
35
|
|
|
36
36
|
- The picker opens its popover when the input receives focus (`open-on-focus`, default `true`; set `open-on-focus="false"` to opt out).
|
|
37
37
|
- Opening on focus **never steals keyboard focus**: the user can start typing immediately. The grid takes focus only on ArrowDown, on the calendar trigger, or after the user moves the pointer into the popup.
|
|
38
|
+
- Closing returns focus to the control that opened the popover (field or trigger) — the usual popover convention. Range mode is the exception: focus follows the active bound, because a first pick moves the workflow to the other bound.
|
|
39
|
+
- The calendar trigger is overlaid inside the field's own box, like the native `input[type=time]` indicator. The field reserves its place (`padding-inline-end`), keeps its border/background, and owns the focus ring for the pair; the trigger is a real button with an inner ring of its own. A range bound owns its own trigger; the two share one popup, calendar, source and state.
|
|
38
40
|
- `show()` / `hide()` are the control surface. `open` is a **read-only getter** reflecting the popover. There is no `open` attribute: the popover element is the single machine of truth and a second state machine would only drift.
|
|
39
41
|
- `readonly` mirrors native semantics: the field is non-editable, the value is still submitted, and the picker cannot change it — the calendar trigger is disabled. `disabled` additionally unsubmits the field. `readonly` is never used to mean "no typing, but calendar selection allowed".
|
|
40
|
-
- Clearing the editable input clears the canonical value (the component renders no internal clear button). Form resets follow the native `defaultValue` contract. This matches the Open UI datepicker `clear` concept: clearing is a text-editing action, not a component-owned affordance.
|
|
42
|
+
- Clearing the editable input clears the canonical value (the component renders no internal clear button). Form resets follow the native `defaultValue` contract. This matches the Open UI datepicker `clear` concept: clearing is a text-editing action, not a component-owned affordance.
|
|
43
|
+
|
|
44
|
+
## D5 — Time is a native companion, not picker state
|
|
45
|
+
|
|
46
|
+
- Time fields are authored native `input[type=time]` marked `[data-time-start]` / `[data-time-end]`; `name`, `value`, `required`, `min`, `max`, `step` and submission stay native. There is no hidden time input and no time field controller.
|
|
47
|
+
- `picker.value` / `picker.range` remain date-only (`YYYY-MM-DD`); the picker never constructs a datetime, a timestamp or a timezone-bearing value.
|
|
48
|
+
- The picker only coordinates from/to order (`start <= end`, equality allowed); duration rules stay application-owned.
|
|
49
|
+
- Custom time UI and slot picking stay outside the package.
|
|
@@ -78,7 +78,7 @@ calendar.isDateDisabled = (date) => isWeekend(date);
|
|
|
78
78
|
// weekend rule. Hard min/max bounds still win.
|
|
79
79
|
```
|
|
80
80
|
|
|
81
|
-
The prototype promotes this legacy behavior into a documented generic field: `enabled: true` reopens a date disabled by `isDateDisabled()
|
|
81
|
+
The prototype promotes this legacy behavior into a documented generic field: `enabled: true` reopens a date disabled by `isDateDisabled()`, but never bypasses hard `min`/`max` bounds or a resolved `state.disabled`.
|
|
82
82
|
|
|
83
83
|
## Not migrated into this component
|
|
84
84
|
|
package/docs/ROADMAP.md
CHANGED
|
@@ -50,7 +50,8 @@ Use Formidable/Flatpickr cases as migration fixtures:
|
|
|
50
50
|
|
|
51
51
|
These should require a separate proposal, not opportunistic growth:
|
|
52
52
|
|
|
53
|
-
- time
|
|
53
|
+
- custom time-picker UI;
|
|
54
|
+
- combined datetime values;
|
|
54
55
|
- single-grid visual **selection** interaction (the band itself is core presentation via `calendar.highlightedRange`);
|
|
55
56
|
- month-as-value picker;
|
|
56
57
|
- multi-date;
|
|
@@ -86,7 +87,7 @@ Cross-check our coverage against the Open UI datepicker research: <https://open-
|
|
|
86
87
|
| `range` | core | `<date-picker range>` two-field shared surface (U9); `linkDateRange()` stays external (U5). |
|
|
87
88
|
| `range selected` | deferred | selection interaction needs its own proposal; `highlightedRange` covers band presentation only. |
|
|
88
89
|
| `range presets` | deferred | application-owned. |
|
|
89
|
-
| `date-time picker` |
|
|
90
|
+
| `date-time picker` | contract boundary | native `input[type=time]` companions only (D5); custom time-picker UI, combined datetime values and timezone-aware values stay deferred. |
|
|
90
91
|
| `side by side` | deferred | maps to "multiple visible months". |
|
|
91
92
|
| `footer` | deferred | not part of the grid contract. |
|
|
92
93
|
| `shape`, `size`, `compact`, `subtle`, `light`, `borderless`, `no icon` | app-owned | styling via public `--dp-*` tokens (D3), not a component API. |
|
package/docs/USE_CASES.md
CHANGED
|
@@ -35,7 +35,8 @@ Acceptance:
|
|
|
35
35
|
- activating a date dispatches `dateactivate` and the application calls `calendarView.gotoDate(date)`;
|
|
36
36
|
- outside-month days remain activatable;
|
|
37
37
|
- six-row height is available as presentation, not baked into month math;
|
|
38
|
-
- ISO week numbers are available
|
|
38
|
+
- ISO week numbers are available;
|
|
39
|
+
- a narrow/compact presentation can use short month names (`month-format="short"`).
|
|
39
40
|
|
|
40
41
|
## U4 — Constrained dates
|
|
41
42
|
|
|
@@ -112,6 +113,18 @@ Acceptance:
|
|
|
112
113
|
- a stale async availability response arriving after the active endpoint changed never commits a value or closes the popup;
|
|
113
114
|
- only the bounds are validated; per-night availability stays application-owned.
|
|
114
115
|
|
|
116
|
+
## U10 — Date with native time companions
|
|
117
|
+
|
|
118
|
+
A form pairs a date with one or two native times (appointment at `09:30`, from/to on the same day).
|
|
119
|
+
|
|
120
|
+
Acceptance:
|
|
121
|
+
|
|
122
|
+
- times stay native `input[type=time]` fields with their own names and submission;
|
|
123
|
+
- `value` stays a `YYYY-MM-DD` date;
|
|
124
|
+
- an inverted from/to surfaces an order error on the modified bound;
|
|
125
|
+
- a missing or disabled time lifts the order constraint;
|
|
126
|
+
- calendar selection and form reset keep the entered times.
|
|
127
|
+
|
|
115
128
|
## Not a use case for this package
|
|
116
129
|
|
|
117
130
|
Do not grow the API to cover these without a separate design:
|