@aquera/nile-elements 2.0.18 → 2.0.20
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 +10 -0
- package/demo/index.js +0 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1275 -490
- package/dist/nile-badge/index.cjs.js +1 -1
- package/dist/nile-badge/index.esm.js +1 -1
- package/dist/nile-badge/nile-badge.cjs.js +1 -1
- package/dist/nile-badge/nile-badge.cjs.js.map +1 -1
- package/dist/nile-badge/nile-badge.css.cjs.js +1 -1
- package/dist/nile-badge/nile-badge.css.cjs.js.map +1 -1
- package/dist/nile-badge/nile-badge.css.esm.js +24 -3
- package/dist/nile-badge/nile-badge.esm.js +5 -3
- package/dist/nile-breadcrumb/nile-breadcrumb.cjs.js +1 -1
- package/dist/nile-breadcrumb/nile-breadcrumb.cjs.js.map +1 -1
- package/dist/nile-breadcrumb/nile-breadcrumb.esm.js +2 -2
- package/dist/nile-breadcrumb-item/nile-breadcrumb-item.cjs.js +1 -1
- package/dist/nile-breadcrumb-item/nile-breadcrumb-item.cjs.js.map +1 -1
- package/dist/nile-breadcrumb-item/nile-breadcrumb-item.css.cjs.js +1 -1
- package/dist/nile-breadcrumb-item/nile-breadcrumb-item.css.cjs.js.map +1 -1
- package/dist/nile-breadcrumb-item/nile-breadcrumb-item.css.esm.js +14 -2
- package/dist/nile-breadcrumb-item/nile-breadcrumb-item.esm.js +4 -4
- package/dist/nile-calendar/index.cjs.js +1 -1
- package/dist/nile-calendar/index.esm.js +1 -1
- package/dist/nile-calendar/nile-calendar.cjs.js +2 -1
- package/dist/nile-calendar/nile-calendar.cjs.js.map +1 -1
- package/dist/nile-calendar/nile-calendar.css.cjs.js +1 -1
- package/dist/nile-calendar/nile-calendar.css.cjs.js.map +1 -1
- package/dist/nile-calendar/nile-calendar.css.esm.js +357 -2
- package/dist/nile-calendar/nile-calendar.esm.js +365 -41
- package/dist/nile-calendar/timezones.cjs.js +1 -1
- package/dist/nile-calendar/timezones.cjs.js.map +1 -1
- package/dist/nile-calendar/timezones.esm.js +1 -1
- package/dist/nile-date-time-picker/index.cjs.js +2 -0
- package/dist/nile-date-time-picker/index.cjs.js.map +1 -0
- package/dist/nile-date-time-picker/index.esm.js +1 -0
- package/dist/nile-date-time-picker/nile-date-time-picker.cjs.js +2 -0
- package/dist/nile-date-time-picker/nile-date-time-picker.cjs.js.map +1 -0
- package/dist/nile-date-time-picker/nile-date-time-picker.css.cjs.js +2 -0
- package/dist/nile-date-time-picker/nile-date-time-picker.css.cjs.js.map +1 -0
- package/dist/nile-date-time-picker/nile-date-time-picker.css.esm.js +13 -0
- package/dist/nile-date-time-picker/nile-date-time-picker.esm.js +53 -0
- package/dist/nile-select/index.cjs.js +1 -1
- package/dist/nile-select/index.esm.js +1 -1
- package/dist/nile-select/nile-select.cjs.js +2 -2
- package/dist/nile-select/nile-select.cjs.js.map +1 -1
- package/dist/nile-select/nile-select.esm.js +1 -1
- package/dist/nile-select/virtual-scroll-helper.cjs.js +1 -1
- package/dist/nile-select/virtual-scroll-helper.cjs.js.map +1 -1
- package/dist/nile-select/virtual-scroll-helper.esm.js +48 -47
- package/dist/nile-virtual-select/nile-virtual-select.cjs.js +4 -4
- package/dist/nile-virtual-select/nile-virtual-select.cjs.js.map +1 -1
- package/dist/nile-virtual-select/nile-virtual-select.esm.js +2 -2
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/nile-badge/nile-badge.css.js +24 -3
- package/dist/src/nile-badge/nile-badge.css.js.map +1 -1
- package/dist/src/nile-badge/nile-badge.d.ts +7 -4
- package/dist/src/nile-badge/nile-badge.js +22 -5
- package/dist/src/nile-badge/nile-badge.js.map +1 -1
- package/dist/src/nile-badge/nile-badge.test.js +88 -0
- package/dist/src/nile-badge/nile-badge.test.js.map +1 -1
- package/dist/src/nile-breadcrumb/nile-breadcrumb.d.ts +7 -0
- package/dist/src/nile-breadcrumb/nile-breadcrumb.js +24 -1
- package/dist/src/nile-breadcrumb/nile-breadcrumb.js.map +1 -1
- package/dist/src/nile-breadcrumb/nile-breadcrumb.test.js +51 -0
- package/dist/src/nile-breadcrumb/nile-breadcrumb.test.js.map +1 -1
- package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.css.js +12 -0
- package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.css.js.map +1 -1
- package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.d.ts +5 -0
- package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.js +9 -0
- package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.js.map +1 -1
- package/dist/src/nile-calendar/nile-calendar.css.js +355 -0
- package/dist/src/nile-calendar/nile-calendar.css.js.map +1 -1
- package/dist/src/nile-calendar/nile-calendar.d.ts +175 -0
- package/dist/src/nile-calendar/nile-calendar.js +1726 -26
- package/dist/src/nile-calendar/nile-calendar.js.map +1 -1
- package/dist/src/nile-calendar/nile-calendar.test.d.ts +1 -0
- package/dist/src/nile-calendar/nile-calendar.test.js +3580 -0
- package/dist/src/nile-calendar/nile-calendar.test.js.map +1 -1
- package/dist/src/nile-calendar/timezones.d.ts +21 -0
- package/dist/src/nile-calendar/timezones.js +49 -0
- package/dist/src/nile-calendar/timezones.js.map +1 -1
- package/dist/src/nile-date-time-picker/index.d.ts +1 -0
- package/dist/src/nile-date-time-picker/index.js +2 -0
- package/dist/src/nile-date-time-picker/index.js.map +1 -0
- package/dist/src/nile-date-time-picker/nile-date-time-picker.css.d.ts +11 -0
- package/dist/src/nile-date-time-picker/nile-date-time-picker.css.js +49 -0
- package/dist/src/nile-date-time-picker/nile-date-time-picker.css.js.map +1 -0
- package/dist/src/nile-date-time-picker/nile-date-time-picker.d.ts +173 -0
- package/dist/src/nile-date-time-picker/nile-date-time-picker.js +1270 -0
- package/dist/src/nile-date-time-picker/nile-date-time-picker.js.map +1 -0
- package/dist/src/nile-date-time-picker/nile-date-time-picker.test.d.ts +143 -0
- package/dist/src/nile-date-time-picker/nile-date-time-picker.test.js +7277 -0
- package/dist/src/nile-date-time-picker/nile-date-time-picker.test.js.map +1 -0
- package/dist/src/nile-select/nile-select.d.ts +1 -0
- package/dist/src/nile-select/nile-select.js +16 -1
- package/dist/src/nile-select/nile-select.js.map +1 -1
- package/dist/src/nile-select/nile-select.test.js +430 -5
- package/dist/src/nile-select/nile-select.test.js.map +1 -1
- package/dist/src/nile-select/virtual-scroll-helper.js +7 -4
- package/dist/src/nile-select/virtual-scroll-helper.js.map +1 -1
- package/dist/src/nile-virtual-select/nile-virtual-select.d.ts +3 -1
- package/dist/src/nile-virtual-select/nile-virtual-select.js +14 -6
- package/dist/src/nile-virtual-select/nile-virtual-select.js.map +1 -1
- package/dist/src/nile-virtual-select/nile-virtual-select.test.js +115 -1
- package/dist/src/nile-virtual-select/nile-virtual-select.test.js.map +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/version.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utilities/animation-registry.cjs.js +1 -1
- package/dist/utilities/animation-registry.cjs.js.map +1 -1
- package/dist/utilities/animation-registry.esm.js +1 -1
- package/package.json +3 -1
- package/scripts/coverage-report.mjs +96 -0
- package/src/index.ts +1 -0
- package/src/nile-badge/nile-badge.css.ts +24 -3
- package/src/nile-badge/nile-badge.test.ts +102 -0
- package/src/nile-badge/nile-badge.ts +28 -5
- package/src/nile-breadcrumb/nile-breadcrumb.test.ts +57 -0
- package/src/nile-breadcrumb/nile-breadcrumb.ts +19 -0
- package/src/nile-breadcrumb-item/nile-breadcrumb-item.css.ts +12 -0
- package/src/nile-breadcrumb-item/nile-breadcrumb-item.ts +7 -0
- package/src/nile-calendar/nile-calendar.css.ts +355 -0
- package/src/nile-calendar/nile-calendar.test.ts +3793 -0
- package/src/nile-calendar/nile-calendar.ts +1760 -28
- package/src/nile-calendar/timezones.ts +57 -0
- package/src/nile-date-time-picker/index.ts +1 -0
- package/src/nile-date-time-picker/nile-date-time-picker.css.ts +54 -0
- package/src/nile-date-time-picker/nile-date-time-picker.test.ts +7886 -0
- package/src/nile-date-time-picker/nile-date-time-picker.ts +1153 -0
- package/src/nile-select/nile-select.test.ts +560 -5
- package/src/nile-select/nile-select.ts +21 -1
- package/src/nile-select/virtual-scroll-helper.ts +7 -4
- package/src/nile-virtual-select/nile-virtual-select.test.ts +139 -1
- package/src/nile-virtual-select/nile-virtual-select.ts +17 -6
- package/vscode-html-custom-data.json +200 -20
|
@@ -1 +1,22 @@
|
|
|
1
1
|
export declare const TIMEZONES: string[];
|
|
2
|
+
/** Validates timezones with `Intl` to avoid alias mismatches like `Asia/Calcutta` vs `Asia/Kolkata`. */
|
|
3
|
+
export declare function isValidTimezone(zone: string | null | undefined): boolean;
|
|
4
|
+
/**
|
|
5
|
+
* `Date.UTC` with the year taken literally. `Date.UTC(y, ...)` (and `new Date(y, ...)`) remap years 0-99 to 1900-1999,
|
|
6
|
+
* so year 0001 silently becomes 1901. This anchors the same fields in UTC without that remap; for years >= 100
|
|
7
|
+
* it returns exactly what `Date.UTC` returns, overflowing month/day/time fields included.
|
|
8
|
+
*/
|
|
9
|
+
export declare function utcFromFields(year: number, month0: number, day?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number;
|
|
10
|
+
/**
|
|
11
|
+
* Whether a clock face reads as a real time of day. Hours 0-23, minutes and seconds 0-59; `24:00:00(.000)` is ISO 8601
|
|
12
|
+
* end-of-day and is kept (it resolves to the next midnight). Anything else, e.g. 25:61:00, is not a time: date math would
|
|
13
|
+
* silently roll it into the next day, so callers treat the value as unparseable instead.
|
|
14
|
+
*/
|
|
15
|
+
export declare function isClockTime(hours: number, minutes: number, seconds?: number, ms?: number): boolean;
|
|
16
|
+
/** Host-local counterpart of {@link utcFromFields}: `new Date(y, m, d, …)` remaps years 0-99 to 1900-1999, this does not. */
|
|
17
|
+
export declare function localDateFromFields(year: number, month0: number, day?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date;
|
|
18
|
+
/** Fallback year range when `startYear` / `endYear` are not set: the year dropdown, and in the date-time-picker variant also month navigation and typed-year clamping. An explicit bound always wins. */
|
|
19
|
+
export declare const DEFAULT_START_YEAR = 2000;
|
|
20
|
+
export declare const DEFAULT_END_YEAR = 2050;
|
|
21
|
+
/** Four-digit year for `YYYY` tokens: years 0-99 are zero-padded (`0050`); every other year renders exactly as `String(year)`. */
|
|
22
|
+
export declare function formatYear4(year: number): string;
|
|
@@ -347,4 +347,53 @@ export const TIMEZONES = [
|
|
|
347
347
|
'Pacific/Apia',
|
|
348
348
|
'Africa/Johannesburg'
|
|
349
349
|
];
|
|
350
|
+
/** Validates timezones with `Intl` to avoid alias mismatches like `Asia/Calcutta` vs `Asia/Kolkata`. */
|
|
351
|
+
export function isValidTimezone(zone) {
|
|
352
|
+
if (typeof zone !== 'string' || !zone.trim())
|
|
353
|
+
return false;
|
|
354
|
+
try {
|
|
355
|
+
new Intl.DateTimeFormat(undefined, { timeZone: zone });
|
|
356
|
+
return true;
|
|
357
|
+
}
|
|
358
|
+
catch {
|
|
359
|
+
return false;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* `Date.UTC` with the year taken literally. `Date.UTC(y, ...)` (and `new Date(y, ...)`) remap years 0-99 to 1900-1999,
|
|
364
|
+
* so year 0001 silently becomes 1901. This anchors the same fields in UTC without that remap; for years >= 100
|
|
365
|
+
* it returns exactly what `Date.UTC` returns, overflowing month/day/time fields included.
|
|
366
|
+
*/
|
|
367
|
+
export function utcFromFields(year, month0, day = 1, hours = 0, minutes = 0, seconds = 0, ms = 0) {
|
|
368
|
+
const d = new Date(0);
|
|
369
|
+
d.setUTCFullYear(year, month0, day);
|
|
370
|
+
d.setUTCHours(hours, minutes, seconds, ms);
|
|
371
|
+
return d.getTime();
|
|
372
|
+
}
|
|
373
|
+
/**
|
|
374
|
+
* Whether a clock face reads as a real time of day. Hours 0-23, minutes and seconds 0-59; `24:00:00(.000)` is ISO 8601
|
|
375
|
+
* end-of-day and is kept (it resolves to the next midnight). Anything else, e.g. 25:61:00, is not a time: date math would
|
|
376
|
+
* silently roll it into the next day, so callers treat the value as unparseable instead.
|
|
377
|
+
*/
|
|
378
|
+
export function isClockTime(hours, minutes, seconds = 0, ms = 0) {
|
|
379
|
+
if (![hours, minutes, seconds, ms].every(Number.isFinite))
|
|
380
|
+
return false;
|
|
381
|
+
if (minutes < 0 || minutes > 59 || seconds < 0 || seconds > 59 || ms < 0 || ms > 999 || hours < 0)
|
|
382
|
+
return false;
|
|
383
|
+
return hours <= 23 || (hours === 24 && minutes === 0 && seconds === 0 && ms === 0);
|
|
384
|
+
}
|
|
385
|
+
/** Host-local counterpart of {@link utcFromFields}: `new Date(y, m, d, …)` remaps years 0-99 to 1900-1999, this does not. */
|
|
386
|
+
export function localDateFromFields(year, month0, day = 1, hours = 0, minutes = 0, seconds = 0, ms = 0) {
|
|
387
|
+
const d = new Date(2000, 0, 1, 0, 0, 0, 0);
|
|
388
|
+
d.setFullYear(year, month0, day);
|
|
389
|
+
d.setHours(hours, minutes, seconds, ms);
|
|
390
|
+
return d;
|
|
391
|
+
}
|
|
392
|
+
/** Fallback year range when `startYear` / `endYear` are not set: the year dropdown, and in the date-time-picker variant also month navigation and typed-year clamping. An explicit bound always wins. */
|
|
393
|
+
export const DEFAULT_START_YEAR = 2000;
|
|
394
|
+
export const DEFAULT_END_YEAR = 2050;
|
|
395
|
+
/** Four-digit year for `YYYY` tokens: years 0-99 are zero-padded (`0050`); every other year renders exactly as `String(year)`. */
|
|
396
|
+
export function formatYear4(year) {
|
|
397
|
+
return year >= 0 && year < 100 ? String(year).padStart(4, '0') : String(year);
|
|
398
|
+
}
|
|
350
399
|
//# sourceMappingURL=timezones.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timezones.js","sourceRoot":"","sources":["../../../src/nile-calendar/timezones.ts"],"names":[],"mappings":"AAAA,MAAM,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AkB;IAClB,eAAe;IACf,cAAc;IACd,eAAe;IACf,oBAAoB;IACpB,gBAAgB;IAChB,aAAa;IACb,aAAa;IACb,qBAAqB;IACrB,aAAa;IACb,iBAAiB;IACjB,kBAAkB;IAClB,gBAAgB;IAChB,oBAAoB;IACpB,aAAa;IACb,iBAAiB;IACjB,qBAAqB;IACrB,eAAe;IACf,oBAAoB;IACpB,iBAAiB;IACjB,kBAAkB;IAClB,cAAc;IACd,eAAe;IACf,iBAAiB;IACjB,WAAW;IACX,eAAe;IACf,cAAc;IACd,mBAAmB;IACnB,iBAAiB;IACjB,uBAAuB;IACvB,kBAAkB;IAClB,aAAa;IACb,aAAa;IACb,iBAAiB;IACjB,mBAAmB;IACnB,cAAc;IACd,kBAAkB;IAClB,iBAAiB;IACjB,6BAA6B;IAC7B,6BAA6B;IAC7B,8BAA8B;IAC9B,2BAA2B;IAC3B,yBAAyB;IACzB,yBAAyB;IACzB,4BAA4B;IAC5B,uBAAuB;IACvB,iBAAiB;IACjB,2BAA2B;IAC3B,sBAAsB;IACtB,mBAAmB;IACnB,6BAA6B;IAC7B,gCAAgC;IAChC,6BAA6B;IAC7B,gBAAgB;IAChB,eAAe;IACf,iBAAiB;IACjB,qBAAqB;IACrB,mBAAmB;IACnB,gBAAgB;IAChB,eAAe;IACf,oBAAoB;IACpB,iBAAiB;IACjB,cAAc;IACd,cAAc;IACd,kBAAkB;IAClB,oBAAoB;IACpB,gBAAgB;IAChB,eAAe;IACf,iBAAiB;IACjB,kBAAkB;IAClB,eAAe;IACf,gBAAgB;IAChB,cAAc;IACd,qBAAqB;CAAC,CAAC","sourcesContent":["export const TIMEZONES = [\n 'Europe/Andorra',\n 'Asia/Dubai',\n 'Asia/Kabul',\n 'Europe/Tirane',\n 'Asia/Yerevan',\n 'Antarctica/Casey',\n 'Antarctica/Davis',\n 'Antarctica/DumontDUrville',\n 'Antarctica/Mawson',\n 'Antarctica/Palmer',\n 'Antarctica/Rothera',\n 'Antarctica/Syowa',\n 'Antarctica/Troll',\n 'Antarctica/Vostok',\n 'America/Argentina/Buenos_Aires',\n 'America/Argentina/Cordoba',\n 'America/Argentina/Salta',\n 'America/Argentina/Jujuy',\n 'America/Argentina/Tucuman',\n 'America/Argentina/Catamarca',\n 'America/Argentina/La_Rioja',\n 'America/Argentina/San_Juan',\n 'America/Argentina/Mendoza',\n 'America/Argentina/San_Luis',\n 'America/Argentina/Rio_Gallegos',\n 'America/Argentina/Ushuaia',\n 'Pacific/Pago_Pago',\n 'Europe/Vienna',\n 'Australia/Lord_Howe',\n 'Antarctica/Macquarie',\n 'Australia/Hobart',\n 'Australia/Currie',\n 'Australia/Melbourne',\n 'Australia/Sydney',\n 'Australia/Broken_Hill',\n 'Australia/Brisbane',\n 'Australia/Lindeman',\n 'Australia/Adelaide',\n 'Australia/Darwin',\n 'Australia/Perth',\n 'Australia/Eucla',\n 'Asia/Baku',\n 'America/Barbados',\n 'Asia/Dhaka',\n 'Europe/Brussels',\n 'Europe/Sofia',\n 'Atlantic/Bermuda',\n 'Asia/Brunei',\n 'America/La_Paz',\n 'America/Noronha',\n 'America/Belem',\n 'America/Fortaleza',\n 'America/Recife',\n 'America/Araguaina',\n 'America/Maceio',\n 'America/Bahia',\n 'America/Sao_Paulo',\n 'America/Campo_Grande',\n 'America/Cuiaba',\n 'America/Santarem',\n 'America/Porto_Velho',\n 'America/Boa_Vista',\n 'America/Manaus',\n 'America/Eirunepe',\n 'America/Rio_Branco',\n 'America/Nassau',\n 'Asia/Thimphu',\n 'Europe/Minsk',\n 'America/Belize',\n 'America/St_Johns',\n 'America/Halifax',\n 'America/Glace_Bay',\n 'America/Moncton',\n 'America/Goose_Bay',\n 'America/Blanc-Sablon',\n 'America/Toronto',\n 'America/Nipigon',\n 'America/Thunder_Bay',\n 'America/Iqaluit',\n 'America/Pangnirtung',\n 'America/Atikokan',\n 'America/Winnipeg',\n 'America/Rainy_River',\n 'America/Resolute',\n 'America/Rankin_Inlet',\n 'America/Regina',\n 'America/Swift_Current',\n 'America/Edmonton',\n 'America/Cambridge_Bay',\n 'America/Yellowknife',\n 'America/Inuvik',\n 'America/Creston',\n 'America/Dawson_Creek',\n 'America/Fort_Nelson',\n 'America/Vancouver',\n 'America/Whitehorse',\n 'America/Dawson',\n 'Indian/Cocos',\n 'Europe/Zurich',\n 'Africa/Abidjan',\n 'Pacific/Rarotonga',\n 'America/Santiago',\n 'America/Punta_Arenas',\n 'Pacific/Easter',\n 'Asia/Shanghai',\n 'Asia/Urumqi',\n 'America/Bogota',\n 'America/Costa_Rica',\n 'America/Havana',\n 'Atlantic/Cape_Verde',\n 'America/Curacao',\n 'Indian/Christmas',\n 'Asia/Nicosia',\n 'Asia/Famagusta',\n 'Europe/Prague',\n 'Europe/Berlin',\n 'Europe/Copenhagen',\n 'America/Santo_Domingo',\n 'Africa/Algiers',\n 'America/Guayaquil',\n 'Pacific/Galapagos',\n 'Europe/Tallinn',\n 'Africa/Cairo',\n 'Africa/El_Aaiun',\n 'Europe/Madrid',\n 'Africa/Ceuta',\n 'Atlantic/Canary',\n 'Europe/Helsinki',\n 'Pacific/Fiji',\n 'Atlantic/Stanley',\n 'Pacific/Chuuk',\n 'Pacific/Pohnpei',\n 'Pacific/Kosrae',\n 'Atlantic/Faroe',\n 'Europe/Paris',\n 'Europe/London',\n 'Asia/Tbilisi',\n 'America/Cayenne',\n 'Africa/Accra',\n 'Europe/Gibraltar',\n 'America/Godthab',\n 'America/Danmarkshavn',\n 'America/Scoresbysund',\n 'America/Thule',\n 'Europe/Athens',\n 'Atlantic/South_Georgia',\n 'America/Guatemala',\n 'Pacific/Guam',\n 'Africa/Bissau',\n 'America/Guyana',\n 'Asia/Hong_Kong',\n 'America/Tegucigalpa',\n 'America/Port-au-Prince',\n 'Europe/Budapest',\n 'Asia/Jakarta',\n 'Asia/Pontianak',\n 'Asia/Makassar',\n 'Asia/Jayapura',\n 'Europe/Dublin',\n 'Asia/Jerusalem',\n 'Asia/Kolkata',\n 'Indian/Chagos',\n 'Asia/Baghdad',\n 'Asia/Tehran',\n 'Atlantic/Reykjavik',\n 'Europe/Rome',\n 'America/Jamaica',\n 'Asia/Amman',\n 'Asia/Tokyo',\n 'Africa/Nairobi',\n 'Asia/Bishkek',\n 'Pacific/Tarawa',\n 'Pacific/Enderbury',\n 'Pacific/Kiritimati',\n 'Asia/Pyongyang',\n 'Asia/Seoul',\n 'Asia/Almaty',\n 'Asia/Qyzylorda',\n 'Asia/Qostanay',\n 'Asia/Aqtau',\n 'Asia/Atyrau',\n 'Asia/Oral',\n 'Asia/Beirut',\n 'Asia/Colombo',\n 'Africa/Monrovia',\n 'Europe/Vilnius',\n 'Europe/Luxembourg',\n 'Europe/Riga',\n 'Africa/Tripoli',\n 'Africa/Casablanca',\n 'Europe/Monaco',\n 'Europe/Chisinau',\n 'Pacific/Majuro',\n 'Pacific/Kwajalein',\n 'Asia/Yangon',\n 'Asia/Ulaanbaatar',\n 'Asia/Hovd',\n 'Asia/Choibalsan',\n 'Asia/Macau',\n 'America/Martinique',\n 'Europe/Malta',\n 'Indian/Mauritius',\n 'Indian/Maldives',\n 'America/Mexico_City',\n 'America/Cancun',\n 'America/Merida',\n 'America/Monterrey',\n 'America/Matamoros',\n 'America/Mazatlan',\n 'America/Chihuahua',\n 'America/Ojinaga',\n 'America/Hermosillo',\n 'America/Tijuana',\n 'America/Bahia_Banderas',\n 'Asia/Kuala_Lumpur',\n 'Asia/Kuching',\n 'Africa/Maputo',\n 'Africa/Windhoek',\n 'Pacific/Noumea',\n 'Pacific/Norfolk',\n 'Africa/Lagos',\n 'America/Managua',\n 'Europe/Amsterdam',\n 'Europe/Oslo',\n 'Asia/Kathmandu',\n 'Pacific/Nauru',\n 'Pacific/Niue',\n 'Pacific/Auckland',\n 'Pacific/Chatham',\n 'America/Panama',\n 'America/Lima',\n 'Pacific/Tahiti',\n 'Pacific/Marquesas',\n 'Pacific/Gambier',\n 'Pacific/Port_Moresby',\n 'Pacific/Bougainville',\n 'Asia/Manila',\n 'Asia/Karachi',\n 'Europe/Warsaw',\n 'America/Miquelon',\n 'Pacific/Pitcairn',\n 'America/Puerto_Rico',\n 'Asia/Gaza',\n 'Asia/Hebron',\n 'Europe/Lisbon',\n 'Atlantic/Madeira',\n 'Atlantic/Azores',\n 'Pacific/Palau',\n 'America/Asuncion',\n 'Asia/Qatar',\n 'Indian/Reunion',\n 'Europe/Bucharest',\n 'Europe/Belgrade',\n 'Europe/Kaliningrad',\n 'Europe/Moscow',\n 'Europe/Simferopol',\n 'Europe/Kirov',\n 'Europe/Astrakhan',\n 'Europe/Volgograd',\n 'Europe/Saratov',\n 'Europe/Ulyanovsk',\n 'Europe/Samara',\n 'Asia/Yekaterinburg',\n 'Asia/Omsk',\n 'Asia/Novosibirsk',\n 'Asia/Barnaul',\n 'Asia/Tomsk',\n 'Asia/Novokuznetsk',\n 'Asia/Krasnoyarsk',\n 'Asia/Irkutsk',\n 'Asia/Chita',\n 'Asia/Yakutsk',\n 'Asia/Khandyga',\n 'Asia/Vladivostok',\n 'Asia/Ust-Nera',\n 'Asia/Magadan',\n 'Asia/Sakhalin',\n 'Asia/Srednekolymsk',\n 'Asia/Kamchatka',\n 'Asia/Anadyr',\n 'Asia/Riyadh',\n 'Pacific/Guadalcanal',\n 'Indian/Mahe',\n 'Africa/Khartoum',\n 'Europe/Stockholm',\n 'Asia/Singapore',\n 'America/Paramaribo',\n 'Africa/Juba',\n 'Africa/Sao_Tome',\n 'America/El_Salvador',\n 'Asia/Damascus',\n 'America/Grand_Turk',\n 'Africa/Ndjamena',\n 'Indian/Kerguelen',\n 'Asia/Bangkok',\n 'Asia/Dushanbe',\n 'Pacific/Fakaofo',\n 'Asia/Dili',\n 'Asia/Ashgabat',\n 'Africa/Tunis',\n 'Pacific/Tongatapu',\n 'Europe/Istanbul',\n 'America/Port_of_Spain',\n 'Pacific/Funafuti',\n 'Asia/Taipei',\n 'Europe/Kiev',\n 'Europe/Uzhgorod',\n 'Europe/Zaporozhye',\n 'Pacific/Wake',\n 'America/New_York',\n 'America/Detroit',\n 'America/Kentucky/Louisville',\n 'America/Kentucky/Monticello',\n 'America/Indiana/Indianapolis',\n 'America/Indiana/Vincennes',\n 'America/Indiana/Winamac',\n 'America/Indiana/Marengo',\n 'America/Indiana/Petersburg',\n 'America/Indiana/Vevay',\n 'America/Chicago',\n 'America/Indiana/Tell_City',\n 'America/Indiana/Knox',\n 'America/Menominee',\n 'America/North_Dakota/Center',\n 'America/North_Dakota/New_Salem',\n 'America/North_Dakota/Beulah',\n 'America/Denver',\n 'America/Boise',\n 'America/Phoenix',\n 'America/Los_Angeles',\n 'America/Anchorage',\n 'America/Juneau',\n 'America/Sitka',\n 'America/Metlakatla',\n 'America/Yakutat',\n 'America/Nome',\n 'America/Adak',\n 'Pacific/Honolulu',\n 'America/Montevideo',\n 'Asia/Samarkand',\n 'Asia/Tashkent',\n 'America/Caracas',\n 'Asia/Ho_Chi_Minh',\n 'Pacific/Efate',\n 'Pacific/Wallis',\n 'Pacific/Apia',\n 'Africa/Johannesburg'];\n"]}
|
|
1
|
+
{"version":3,"file":"timezones.js","sourceRoot":"","sources":["../../../src/nile-calendar/timezones.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,gBAAgB;IAChB,YAAY;IACZ,YAAY;IACZ,eAAe;IACf,cAAc;IACd,kBAAkB;IAClB,kBAAkB;IAClB,2BAA2B;IAC3B,mBAAmB;IACnB,mBAAmB;IACnB,oBAAoB;IACpB,kBAAkB;IAClB,kBAAkB;IAClB,mBAAmB;IACnB,gCAAgC;IAChC,2BAA2B;IAC3B,yBAAyB;IACzB,yBAAyB;IACzB,2BAA2B;IAC3B,6BAA6B;IAC7B,4BAA4B;IAC5B,4BAA4B;IAC5B,2BAA2B;IAC3B,4BAA4B;IAC5B,gCAAgC;IAChC,2BAA2B;IAC3B,mBAAmB;IACnB,eAAe;IACf,qBAAqB;IACrB,sBAAsB;IACtB,kBAAkB;IAClB,kBAAkB;IAClB,qBAAqB;IACrB,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,kBAAkB,GAAG,IAAI,CAAC;AACvC,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAErC,kIAAkI;AAClI,MAAM,UAAU,WAAW,CAAC,IAAY;IACtC,OAAO,IAAI,IAAI,CAAC,IAAI,IAAI,GAAG,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAChF,CAAC","sourcesContent":["export const TIMEZONES = [\n 'Europe/Andorra',\n 'Asia/Dubai',\n 'Asia/Kabul',\n 'Europe/Tirane',\n 'Asia/Yerevan',\n 'Antarctica/Casey',\n 'Antarctica/Davis',\n 'Antarctica/DumontDUrville',\n 'Antarctica/Mawson',\n 'Antarctica/Palmer',\n 'Antarctica/Rothera',\n 'Antarctica/Syowa',\n 'Antarctica/Troll',\n 'Antarctica/Vostok',\n 'America/Argentina/Buenos_Aires',\n 'America/Argentina/Cordoba',\n 'America/Argentina/Salta',\n 'America/Argentina/Jujuy',\n 'America/Argentina/Tucuman',\n 'America/Argentina/Catamarca',\n 'America/Argentina/La_Rioja',\n 'America/Argentina/San_Juan',\n 'America/Argentina/Mendoza',\n 'America/Argentina/San_Luis',\n 'America/Argentina/Rio_Gallegos',\n 'America/Argentina/Ushuaia',\n 'Pacific/Pago_Pago',\n 'Europe/Vienna',\n 'Australia/Lord_Howe',\n 'Antarctica/Macquarie',\n 'Australia/Hobart',\n 'Australia/Currie',\n 'Australia/Melbourne',\n 'Australia/Sydney',\n 'Australia/Broken_Hill',\n 'Australia/Brisbane',\n 'Australia/Lindeman',\n 'Australia/Adelaide',\n 'Australia/Darwin',\n 'Australia/Perth',\n 'Australia/Eucla',\n 'Asia/Baku',\n 'America/Barbados',\n 'Asia/Dhaka',\n 'Europe/Brussels',\n 'Europe/Sofia',\n 'Atlantic/Bermuda',\n 'Asia/Brunei',\n 'America/La_Paz',\n 'America/Noronha',\n 'America/Belem',\n 'America/Fortaleza',\n 'America/Recife',\n 'America/Araguaina',\n 'America/Maceio',\n 'America/Bahia',\n 'America/Sao_Paulo',\n 'America/Campo_Grande',\n 'America/Cuiaba',\n 'America/Santarem',\n 'America/Porto_Velho',\n 'America/Boa_Vista',\n 'America/Manaus',\n 'America/Eirunepe',\n 'America/Rio_Branco',\n 'America/Nassau',\n 'Asia/Thimphu',\n 'Europe/Minsk',\n 'America/Belize',\n 'America/St_Johns',\n 'America/Halifax',\n 'America/Glace_Bay',\n 'America/Moncton',\n 'America/Goose_Bay',\n 'America/Blanc-Sablon',\n 'America/Toronto',\n 'America/Nipigon',\n 'America/Thunder_Bay',\n 'America/Iqaluit',\n 'America/Pangnirtung',\n 'America/Atikokan',\n 'America/Winnipeg',\n 'America/Rainy_River',\n 'America/Resolute',\n 'America/Rankin_Inlet',\n 'America/Regina',\n 'America/Swift_Current',\n 'America/Edmonton',\n 'America/Cambridge_Bay',\n 'America/Yellowknife',\n 'America/Inuvik',\n 'America/Creston',\n 'America/Dawson_Creek',\n 'America/Fort_Nelson',\n 'America/Vancouver',\n 'America/Whitehorse',\n 'America/Dawson',\n 'Indian/Cocos',\n 'Europe/Zurich',\n 'Africa/Abidjan',\n 'Pacific/Rarotonga',\n 'America/Santiago',\n 'America/Punta_Arenas',\n 'Pacific/Easter',\n 'Asia/Shanghai',\n 'Asia/Urumqi',\n 'America/Bogota',\n 'America/Costa_Rica',\n 'America/Havana',\n 'Atlantic/Cape_Verde',\n 'America/Curacao',\n 'Indian/Christmas',\n 'Asia/Nicosia',\n 'Asia/Famagusta',\n 'Europe/Prague',\n 'Europe/Berlin',\n 'Europe/Copenhagen',\n 'America/Santo_Domingo',\n 'Africa/Algiers',\n 'America/Guayaquil',\n 'Pacific/Galapagos',\n 'Europe/Tallinn',\n 'Africa/Cairo',\n 'Africa/El_Aaiun',\n 'Europe/Madrid',\n 'Africa/Ceuta',\n 'Atlantic/Canary',\n 'Europe/Helsinki',\n 'Pacific/Fiji',\n 'Atlantic/Stanley',\n 'Pacific/Chuuk',\n 'Pacific/Pohnpei',\n 'Pacific/Kosrae',\n 'Atlantic/Faroe',\n 'Europe/Paris',\n 'Europe/London',\n 'Asia/Tbilisi',\n 'America/Cayenne',\n 'Africa/Accra',\n 'Europe/Gibraltar',\n 'America/Godthab',\n 'America/Danmarkshavn',\n 'America/Scoresbysund',\n 'America/Thule',\n 'Europe/Athens',\n 'Atlantic/South_Georgia',\n 'America/Guatemala',\n 'Pacific/Guam',\n 'Africa/Bissau',\n 'America/Guyana',\n 'Asia/Hong_Kong',\n 'America/Tegucigalpa',\n 'America/Port-au-Prince',\n 'Europe/Budapest',\n 'Asia/Jakarta',\n 'Asia/Pontianak',\n 'Asia/Makassar',\n 'Asia/Jayapura',\n 'Europe/Dublin',\n 'Asia/Jerusalem',\n 'Asia/Kolkata',\n 'Indian/Chagos',\n 'Asia/Baghdad',\n 'Asia/Tehran',\n 'Atlantic/Reykjavik',\n 'Europe/Rome',\n 'America/Jamaica',\n 'Asia/Amman',\n 'Asia/Tokyo',\n 'Africa/Nairobi',\n 'Asia/Bishkek',\n 'Pacific/Tarawa',\n 'Pacific/Enderbury',\n 'Pacific/Kiritimati',\n 'Asia/Pyongyang',\n 'Asia/Seoul',\n 'Asia/Almaty',\n 'Asia/Qyzylorda',\n 'Asia/Qostanay',\n 'Asia/Aqtau',\n 'Asia/Atyrau',\n 'Asia/Oral',\n 'Asia/Beirut',\n 'Asia/Colombo',\n 'Africa/Monrovia',\n 'Europe/Vilnius',\n 'Europe/Luxembourg',\n 'Europe/Riga',\n 'Africa/Tripoli',\n 'Africa/Casablanca',\n 'Europe/Monaco',\n 'Europe/Chisinau',\n 'Pacific/Majuro',\n 'Pacific/Kwajalein',\n 'Asia/Yangon',\n 'Asia/Ulaanbaatar',\n 'Asia/Hovd',\n 'Asia/Choibalsan',\n 'Asia/Macau',\n 'America/Martinique',\n 'Europe/Malta',\n 'Indian/Mauritius',\n 'Indian/Maldives',\n 'America/Mexico_City',\n 'America/Cancun',\n 'America/Merida',\n 'America/Monterrey',\n 'America/Matamoros',\n 'America/Mazatlan',\n 'America/Chihuahua',\n 'America/Ojinaga',\n 'America/Hermosillo',\n 'America/Tijuana',\n 'America/Bahia_Banderas',\n 'Asia/Kuala_Lumpur',\n 'Asia/Kuching',\n 'Africa/Maputo',\n 'Africa/Windhoek',\n 'Pacific/Noumea',\n 'Pacific/Norfolk',\n 'Africa/Lagos',\n 'America/Managua',\n 'Europe/Amsterdam',\n 'Europe/Oslo',\n 'Asia/Kathmandu',\n 'Pacific/Nauru',\n 'Pacific/Niue',\n 'Pacific/Auckland',\n 'Pacific/Chatham',\n 'America/Panama',\n 'America/Lima',\n 'Pacific/Tahiti',\n 'Pacific/Marquesas',\n 'Pacific/Gambier',\n 'Pacific/Port_Moresby',\n 'Pacific/Bougainville',\n 'Asia/Manila',\n 'Asia/Karachi',\n 'Europe/Warsaw',\n 'America/Miquelon',\n 'Pacific/Pitcairn',\n 'America/Puerto_Rico',\n 'Asia/Gaza',\n 'Asia/Hebron',\n 'Europe/Lisbon',\n 'Atlantic/Madeira',\n 'Atlantic/Azores',\n 'Pacific/Palau',\n 'America/Asuncion',\n 'Asia/Qatar',\n 'Indian/Reunion',\n 'Europe/Bucharest',\n 'Europe/Belgrade',\n 'Europe/Kaliningrad',\n 'Europe/Moscow',\n 'Europe/Simferopol',\n 'Europe/Kirov',\n 'Europe/Astrakhan',\n 'Europe/Volgograd',\n 'Europe/Saratov',\n 'Europe/Ulyanovsk',\n 'Europe/Samara',\n 'Asia/Yekaterinburg',\n 'Asia/Omsk',\n 'Asia/Novosibirsk',\n 'Asia/Barnaul',\n 'Asia/Tomsk',\n 'Asia/Novokuznetsk',\n 'Asia/Krasnoyarsk',\n 'Asia/Irkutsk',\n 'Asia/Chita',\n 'Asia/Yakutsk',\n 'Asia/Khandyga',\n 'Asia/Vladivostok',\n 'Asia/Ust-Nera',\n 'Asia/Magadan',\n 'Asia/Sakhalin',\n 'Asia/Srednekolymsk',\n 'Asia/Kamchatka',\n 'Asia/Anadyr',\n 'Asia/Riyadh',\n 'Pacific/Guadalcanal',\n 'Indian/Mahe',\n 'Africa/Khartoum',\n 'Europe/Stockholm',\n 'Asia/Singapore',\n 'America/Paramaribo',\n 'Africa/Juba',\n 'Africa/Sao_Tome',\n 'America/El_Salvador',\n 'Asia/Damascus',\n 'America/Grand_Turk',\n 'Africa/Ndjamena',\n 'Indian/Kerguelen',\n 'Asia/Bangkok',\n 'Asia/Dushanbe',\n 'Pacific/Fakaofo',\n 'Asia/Dili',\n 'Asia/Ashgabat',\n 'Africa/Tunis',\n 'Pacific/Tongatapu',\n 'Europe/Istanbul',\n 'America/Port_of_Spain',\n 'Pacific/Funafuti',\n 'Asia/Taipei',\n 'Europe/Kiev',\n 'Europe/Uzhgorod',\n 'Europe/Zaporozhye',\n 'Pacific/Wake',\n 'America/New_York',\n 'America/Detroit',\n 'America/Kentucky/Louisville',\n 'America/Kentucky/Monticello',\n 'America/Indiana/Indianapolis',\n 'America/Indiana/Vincennes',\n 'America/Indiana/Winamac',\n 'America/Indiana/Marengo',\n 'America/Indiana/Petersburg',\n 'America/Indiana/Vevay',\n 'America/Chicago',\n 'America/Indiana/Tell_City',\n 'America/Indiana/Knox',\n 'America/Menominee',\n 'America/North_Dakota/Center',\n 'America/North_Dakota/New_Salem',\n 'America/North_Dakota/Beulah',\n 'America/Denver',\n 'America/Boise',\n 'America/Phoenix',\n 'America/Los_Angeles',\n 'America/Anchorage',\n 'America/Juneau',\n 'America/Sitka',\n 'America/Metlakatla',\n 'America/Yakutat',\n 'America/Nome',\n 'America/Adak',\n 'Pacific/Honolulu',\n 'America/Montevideo',\n 'Asia/Samarkand',\n 'Asia/Tashkent',\n 'America/Caracas',\n 'Asia/Ho_Chi_Minh',\n 'Pacific/Efate',\n 'Pacific/Wallis',\n 'Pacific/Apia',\n 'Africa/Johannesburg'];\n\n/** Validates timezones with `Intl` to avoid alias mismatches like `Asia/Calcutta` vs `Asia/Kolkata`. */\nexport function isValidTimezone(zone: string | null | undefined): boolean {\n if (typeof zone !== 'string' || !zone.trim()) return false;\n try {\n new Intl.DateTimeFormat(undefined, { timeZone: zone });\n return true;\n } catch {\n return false;\n }\n}\n\n/**\n * `Date.UTC` with the year taken literally. `Date.UTC(y, ...)` (and `new Date(y, ...)`) remap years 0-99 to 1900-1999,\n * so year 0001 silently becomes 1901. This anchors the same fields in UTC without that remap; for years >= 100\n * it returns exactly what `Date.UTC` returns, overflowing month/day/time fields included.\n */\nexport function utcFromFields(\n year: number, month0: number, day = 1,\n hours = 0, minutes = 0, seconds = 0, ms = 0\n): number {\n const d = new Date(0);\n d.setUTCFullYear(year, month0, day);\n d.setUTCHours(hours, minutes, seconds, ms);\n return d.getTime();\n}\n\n/**\n * Whether a clock face reads as a real time of day. Hours 0-23, minutes and seconds 0-59; `24:00:00(.000)` is ISO 8601\n * end-of-day and is kept (it resolves to the next midnight). Anything else, e.g. 25:61:00, is not a time: date math would\n * silently roll it into the next day, so callers treat the value as unparseable instead.\n */\nexport function isClockTime(hours: number, minutes: number, seconds = 0, ms = 0): boolean {\n if (![hours, minutes, seconds, ms].every(Number.isFinite)) return false;\n if (minutes < 0 || minutes > 59 || seconds < 0 || seconds > 59 || ms < 0 || ms > 999 || hours < 0) return false;\n return hours <= 23 || (hours === 24 && minutes === 0 && seconds === 0 && ms === 0);\n}\n\n/** Host-local counterpart of {@link utcFromFields}: `new Date(y, m, d, …)` remaps years 0-99 to 1900-1999, this does not. */\nexport function localDateFromFields(\n year: number, month0: number, day = 1,\n hours = 0, minutes = 0, seconds = 0, ms = 0\n): Date {\n const d = new Date(2000, 0, 1, 0, 0, 0, 0);\n d.setFullYear(year, month0, day);\n d.setHours(hours, minutes, seconds, ms);\n return d;\n}\n\n/** Fallback year range when `startYear` / `endYear` are not set: the year dropdown, and in the date-time-picker variant also month navigation and typed-year clamping. An explicit bound always wins. */\nexport const DEFAULT_START_YEAR = 2000;\nexport const DEFAULT_END_YEAR = 2050;\n\n/** Four-digit year for `YYYY` tokens: years 0-99 are zero-padded (`0050`); every other year renders exactly as `String(year)`. */\nexport function formatYear4(year: number): string {\n return year >= 0 && year < 100 ? String(year).padStart(4, '0') : String(year);\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NileDateTimePicker } from './nile-date-time-picker';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/nile-date-time-picker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC","sourcesContent":["export { NileDateTimePicker } from './nile-date-time-picker';"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Aquera Inc 2026
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
export declare const styles: import("lit").CSSResult;
|
|
8
|
+
export declare const globalPanelStyles = "\n .nile-dtp-panel .tippy-box[data-theme~='floating-panel'],\n .tippy-box[data-theme~='floating-panel'].nile-dtp-panel {\n background: transparent;\n border: none;\n border-radius: 0;\n box-shadow: none;\n }\n\n .nile-dtp-panel .nile-floating-panel__body {\n min-width: 0;\n gap: 0;\n padding: 0;\n }\n";
|
|
9
|
+
export declare function injectGlobalDateTimePickerStyles(): void;
|
|
10
|
+
declare const _default: import("lit").CSSResult[];
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Aquera Inc 2026
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import { css } from 'lit';
|
|
8
|
+
export const styles = css `
|
|
9
|
+
:host {
|
|
10
|
+
-webkit-font-smoothing: var(--nile-webkit-font-smoothing, var(--ng-webkit-font-smoothing));
|
|
11
|
+
-moz-osx-font-smoothing: var(--nile-moz-osx-font-smoothing, var(--ng-moz-osx-font-smoothing));
|
|
12
|
+
text-rendering: var(--nile-text-rendering, var(--ng-text-rendering));
|
|
13
|
+
display: inline-block;
|
|
14
|
+
min-width: 296px;
|
|
15
|
+
}
|
|
16
|
+
nile-dropdown {
|
|
17
|
+
display: block;
|
|
18
|
+
width: 100%;
|
|
19
|
+
}
|
|
20
|
+
`;
|
|
21
|
+
export const globalPanelStyles = `
|
|
22
|
+
.nile-dtp-panel .tippy-box[data-theme~='floating-panel'],
|
|
23
|
+
.tippy-box[data-theme~='floating-panel'].nile-dtp-panel {
|
|
24
|
+
background: transparent;
|
|
25
|
+
border: none;
|
|
26
|
+
border-radius: 0;
|
|
27
|
+
box-shadow: none;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.nile-dtp-panel .nile-floating-panel__body {
|
|
31
|
+
min-width: 0;
|
|
32
|
+
gap: 0;
|
|
33
|
+
padding: 0;
|
|
34
|
+
}
|
|
35
|
+
`;
|
|
36
|
+
export function injectGlobalDateTimePickerStyles() {
|
|
37
|
+
if (typeof document === 'undefined')
|
|
38
|
+
return;
|
|
39
|
+
const STYLE_ID = 'nile-date-time-picker-panel-styles';
|
|
40
|
+
if (document.getElementById(STYLE_ID))
|
|
41
|
+
return;
|
|
42
|
+
const style = document.createElement('style');
|
|
43
|
+
style.id = STYLE_ID;
|
|
44
|
+
style.textContent = globalPanelStyles;
|
|
45
|
+
document.head?.appendChild(style);
|
|
46
|
+
}
|
|
47
|
+
injectGlobalDateTimePickerStyles();
|
|
48
|
+
export default [styles];
|
|
49
|
+
//# sourceMappingURL=nile-date-time-picker.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nile-date-time-picker.css.js","sourceRoot":"","sources":["../../../src/nile-date-time-picker/nile-date-time-picker.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;CAYxB,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG;;;;;;;;;;;;;;CAchC,CAAC;AAEF,MAAM,UAAU,gCAAgC;IAC9C,IAAI,OAAO,QAAQ,KAAK,WAAW;QAAE,OAAO;IAE5C,MAAM,QAAQ,GAAG,oCAAoC,CAAC;IACtD,IAAI,QAAQ,CAAC,cAAc,CAAC,QAAQ,CAAC;QAAE,OAAO;IAE9C,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IAC9C,KAAK,CAAC,EAAE,GAAG,QAAQ,CAAC;IACpB,KAAK,CAAC,WAAW,GAAG,iBAAiB,CAAC;IACtC,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AACpC,CAAC;AAED,gCAAgC,EAAE,CAAC;AAEnC,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2026\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit';\n\nexport const styles = css`\n :host {\n -webkit-font-smoothing: var(--nile-webkit-font-smoothing, var(--ng-webkit-font-smoothing));\n -moz-osx-font-smoothing: var(--nile-moz-osx-font-smoothing, var(--ng-moz-osx-font-smoothing));\n text-rendering: var(--nile-text-rendering, var(--ng-text-rendering));\n display: inline-block;\n min-width: 296px;\n }\n nile-dropdown {\n display: block;\n width: 100%;\n }\n`;\n\nexport const globalPanelStyles = `\n .nile-dtp-panel .tippy-box[data-theme~='floating-panel'],\n .tippy-box[data-theme~='floating-panel'].nile-dtp-panel {\n background: transparent;\n border: none;\n border-radius: 0;\n box-shadow: none;\n }\n\n .nile-dtp-panel .nile-floating-panel__body {\n min-width: 0;\n gap: 0;\n padding: 0;\n }\n`;\n\nexport function injectGlobalDateTimePickerStyles(): void {\n if (typeof document === 'undefined') return;\n\n const STYLE_ID = 'nile-date-time-picker-panel-styles';\n if (document.getElementById(STYLE_ID)) return;\n\n const style = document.createElement('style');\n style.id = STYLE_ID;\n style.textContent = globalPanelStyles;\n document.head?.appendChild(style);\n}\n\ninjectGlobalDateTimePickerStyles();\n\nexport default [styles];\n"]}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Aquera Inc 2026
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import { CSSResultArray, TemplateResult, PropertyValues } from 'lit';
|
|
8
|
+
import NileElement from '../internal/nile-element';
|
|
9
|
+
import type { NileFloatingPanel } from '../nile-floating-panel';
|
|
10
|
+
import '../nile-floating-panel';
|
|
11
|
+
import '../nile-calendar';
|
|
12
|
+
import '../nile-input';
|
|
13
|
+
type TimeUnits = 'minutes' | 'hours' | 'days' | 'weeks' | 'months';
|
|
14
|
+
/**
|
|
15
|
+
* @tag nile-date-time-picker
|
|
16
|
+
* @event nile-change - Absolute `{ value, localTimezoneValue, unixEpoch, timezone }` (`unixEpoch` = ms since 1970, null when empty); relative `{ startDate, endDate, timezone }`.
|
|
17
|
+
* @event nile-clear
|
|
18
|
+
*/
|
|
19
|
+
export declare class NileDateTimePicker extends NileElement {
|
|
20
|
+
static get styles(): CSSResultArray;
|
|
21
|
+
showMonthDropdown: boolean;
|
|
22
|
+
showYearDropdown: boolean;
|
|
23
|
+
type: 'absolute' | 'relative';
|
|
24
|
+
/** Show the Absolute / Relative type switcher. Hidden by default; set to reveal it. */
|
|
25
|
+
showTypes: boolean;
|
|
26
|
+
hideDurationFields: string[];
|
|
27
|
+
hideTimeFields: string[];
|
|
28
|
+
/** Selected date/time for the inner `nile-calendar`: an instant, an offset-less wall clock read in `timezone`, the bracketed form, or date-only — all different. `unixEpoch` is the authoritative instant. */
|
|
29
|
+
value: string | null;
|
|
30
|
+
timezone: string;
|
|
31
|
+
selectedUnit?: TimeUnits;
|
|
32
|
+
selectedValue?: number;
|
|
33
|
+
startYear?: number;
|
|
34
|
+
endYear?: number;
|
|
35
|
+
allowedDates: string;
|
|
36
|
+
dateFormat: string;
|
|
37
|
+
placeholder: string;
|
|
38
|
+
label: string;
|
|
39
|
+
accessibleLabel: string;
|
|
40
|
+
private get structuredInput();
|
|
41
|
+
doubleClickUnselect: boolean;
|
|
42
|
+
disabled: boolean;
|
|
43
|
+
open: boolean;
|
|
44
|
+
panel: NileFloatingPanel;
|
|
45
|
+
private calendarRef;
|
|
46
|
+
private _openSyncFromPanel;
|
|
47
|
+
private _skipNextSeed;
|
|
48
|
+
/** true once the user has typed/pasted/deleted in the mask since the last seed, so only user edits are clamped to allowedDates */
|
|
49
|
+
private _maskEdited;
|
|
50
|
+
/** the zone the consumer configured (first render, or any later external change), restored on Clear instead of forcing UTC */
|
|
51
|
+
private _defaultTimezone;
|
|
52
|
+
/** the last zone this component assigned itself, so `updated` can tell it apart from a consumer change */
|
|
53
|
+
private _internalTimezone;
|
|
54
|
+
private setTimezoneInternally;
|
|
55
|
+
private static readonly TIME_SPEC;
|
|
56
|
+
private get resolvedTimeFields();
|
|
57
|
+
private get shownTimeFields();
|
|
58
|
+
private timeSep;
|
|
59
|
+
private get showTimezone();
|
|
60
|
+
private get defaultPlaceholder();
|
|
61
|
+
private get triggerInput();
|
|
62
|
+
get calendarElement(): any;
|
|
63
|
+
connectedCallback(): void;
|
|
64
|
+
disconnectedCallback(): void;
|
|
65
|
+
private syncOpenFromPanel;
|
|
66
|
+
/** keep `open` in sync with the panel's own show/hide (click, outside-click, Escape) */
|
|
67
|
+
/** `performance.now()` of an Escape pressed while focus was inside the panel; 0 when there is none to honour */
|
|
68
|
+
private _escapeFromPanelAt;
|
|
69
|
+
/**
|
|
70
|
+
* The panel hides on a document-level Escape and drops focus to <body> when the focused control disappears with it.
|
|
71
|
+
* Runs in the capture phase, before the panel's own handler, to note whether focus was inside the panel; onPanelHide
|
|
72
|
+
* then hands focus back to the trigger. Escape with focus anywhere else leaves focus where it is.
|
|
73
|
+
*/
|
|
74
|
+
private onEscapeKeydown;
|
|
75
|
+
/** the element that really holds focus, however deep in shadow roots */
|
|
76
|
+
private deepActiveElement;
|
|
77
|
+
/** tab stops inside the panel in DOM order, looking through shadow roots (the panel is portaled to <body>) */
|
|
78
|
+
private panelTabbables;
|
|
79
|
+
/** the panel's way in: the day that owns the grid's tab stop, else the first control */
|
|
80
|
+
private focusIntoPanel;
|
|
81
|
+
/**
|
|
82
|
+
* The panel is portaled to the end of <body>, so the browser's own Tab order skips it (Chrome, Edge, Firefox) or
|
|
83
|
+
* lands in it from the wrong side. While it is open Tab from the field enters it at its first control, Shift+Tab from its first control
|
|
84
|
+
* returns to the field, and Tab from its last control hands focus back to the field so the browser's default move
|
|
85
|
+
* continues to the next page element (the panel then closes: it has been left). No trap: Shift+Tab from the field and
|
|
86
|
+
* every Tab outside the panel behave as usual.
|
|
87
|
+
*/
|
|
88
|
+
private onPanelTab;
|
|
89
|
+
/** ArrowDown / Alt+ArrowDown on the field opens the panel and moves focus into it. Enter, Space and typing are untouched. */
|
|
90
|
+
private onTriggerKeydown;
|
|
91
|
+
private focusIsInPanel;
|
|
92
|
+
/**
|
|
93
|
+
* nile-floating-panel creates the `role="dialog"` container itself, portals it out of this shadow root and gives it no
|
|
94
|
+
* name. Name it here after the field it belongs to, so the shared panel (and nile-context-menu) stays untouched.
|
|
95
|
+
*/
|
|
96
|
+
private applyDialogName;
|
|
97
|
+
private onPanelShow;
|
|
98
|
+
/** set by Apply: the next open lands on the committed date, not on whatever year/month was browsed before it */
|
|
99
|
+
private _showCommittedOnOpen;
|
|
100
|
+
/**
|
|
101
|
+
* The month/year dropdowns only navigate, so after Apply the view can be left on a browsed month. Reopening then shows the
|
|
102
|
+
* committed date's month/year. Dismissing without Apply (Escape, outside click) never takes this path: the view and any
|
|
103
|
+
* pending selection stay as the user left them. With no selection the view is left alone.
|
|
104
|
+
*/
|
|
105
|
+
private showSelectedMonth;
|
|
106
|
+
private onPanelHide;
|
|
107
|
+
willUpdate(changedProperties: PropertyValues): void;
|
|
108
|
+
firstUpdated(changedProperties: PropertyValues): void;
|
|
109
|
+
updated(changedProperties: Map<string, unknown>): void;
|
|
110
|
+
private applyTriggerAriaLabel;
|
|
111
|
+
private seedTriggerFromValue;
|
|
112
|
+
/** `silent` is for display-only refreshes (a dateFormat/hideTimeFields change): no `nile-input`, since the user did not type or clear */
|
|
113
|
+
private clearTriggerText;
|
|
114
|
+
private wallClockFromRaw;
|
|
115
|
+
private bindStructuredInput;
|
|
116
|
+
private maskValues;
|
|
117
|
+
private maskSuffix;
|
|
118
|
+
/** the slot values as last seeded/committed from `value`; blur clamps only segments that differ from it (the user's edits) */
|
|
119
|
+
private seedMask;
|
|
120
|
+
/** the seeded value's full year, set wherever `seedMask` is: a `YY` mask holds only its last two digits */
|
|
121
|
+
private seedYear;
|
|
122
|
+
/** set when a YY year with no valid two-digit form was blanked; until a year is typed (or the mask is reseeded) the calendar keeps no selection built from day and month alone */
|
|
123
|
+
private _yearRejected;
|
|
124
|
+
/**
|
|
125
|
+
* The full year for a completed year segment. A `YY` year whose two digits equal the seeded value's keeps its century
|
|
126
|
+
* (editing the day of 1999-06-15, or retyping or restoring `99`, stays 1999); any other two digits read as 2000-2099.
|
|
127
|
+
*/
|
|
128
|
+
private fullYearOf;
|
|
129
|
+
private maskLayout;
|
|
130
|
+
private computeDisplay;
|
|
131
|
+
private initMaskState;
|
|
132
|
+
private clampSegment;
|
|
133
|
+
/** An abandoned year edit (digits typed over the old year, then the caret moved on) is normalised before another segment's edit builds on it. An untouched year, however far out of range, is left alone. */
|
|
134
|
+
private settleYear;
|
|
135
|
+
private clampDay;
|
|
136
|
+
private writeMask;
|
|
137
|
+
private onMaskBlur;
|
|
138
|
+
private completedSegment;
|
|
139
|
+
/**
|
|
140
|
+
* A typed date outside the calendar's allowedDates range snaps to the nearest boundary (the calendar disables
|
|
141
|
+
* those day cells but typing bypasses it). Only the date slots change; time and timezone are untouched.
|
|
142
|
+
*/
|
|
143
|
+
private clampMaskToAllowedDates;
|
|
144
|
+
private syncCalendarFromMask;
|
|
145
|
+
/** Re-derive slot state from whatever the native input now holds, then redisplay it masked. */
|
|
146
|
+
private reflowMaskFromNative;
|
|
147
|
+
private onMaskPaste;
|
|
148
|
+
/** Covers cut, undo/redo, drag-drop, IME and soft-keyboard input, none of which arrive as a usable keydown. */
|
|
149
|
+
private onMaskBeforeInput;
|
|
150
|
+
private onMaskKeydown;
|
|
151
|
+
private maskSegments;
|
|
152
|
+
private maxDayForMonth;
|
|
153
|
+
render(): TemplateResult;
|
|
154
|
+
private handleTypeChange;
|
|
155
|
+
handleChanged(event: CustomEvent): void;
|
|
156
|
+
handleClear(): void;
|
|
157
|
+
private pad;
|
|
158
|
+
/** Read an instant's fields in the host zone. Lossless in this direction. */
|
|
159
|
+
private wallClockFromDate;
|
|
160
|
+
private formatDatePartFields;
|
|
161
|
+
private formatWallClock;
|
|
162
|
+
private formatDateTime;
|
|
163
|
+
/** A value's digits as written: bracketed `…[GMT+05:30 Zone]` or offset-less `YYYY-MM-DDTHH:mm[:ss[.SSS]]`; anything else is null. */
|
|
164
|
+
private parseWallClock;
|
|
165
|
+
private parseZonedValue;
|
|
166
|
+
private formatValue;
|
|
167
|
+
}
|
|
168
|
+
export default NileDateTimePicker;
|
|
169
|
+
declare global {
|
|
170
|
+
interface HTMLElementTagNameMap {
|
|
171
|
+
'nile-date-time-picker': NileDateTimePicker;
|
|
172
|
+
}
|
|
173
|
+
}
|