shirkasoft-ui-components 1.3.7 → 1.3.8
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
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<a href="https://github.com/Ansem13/shirkasoft-ui-components/releases"><img src="https://img.shields.io/npm/v/shirkasoft-ui-components?style=flat&logo=npm&label=version" alt="npm version" /></a>
|
|
5
5
|
<a href="https://github.com/Ansem13/shirkasoft-ui-components/issues"><img src="https://img.shields.io/github/issues/Ansem13/shirkasoft-ui-components?style=flat&logo=github" alt="GitHub issues" /></a>
|
|
6
6
|
<a href="https://github.com/Ansem13/shirkasoft-ui-components"><img src="https://img.shields.io/badge/source-github-181717?style=flat&logo=github" alt="GitHub source" /></a>
|
|
7
|
-
<a href="https://
|
|
7
|
+
<a href="https://ui-library.shirkasoft.com/"><img src="https://img.shields.io/badge/showcase-online-10b981?style=flat&logo=githubpages" alt="Showcase" /></a>
|
|
8
8
|
</p>
|
|
9
9
|
|
|
10
10
|
<p align="center">
|
|
@@ -18,6 +18,22 @@ import { TranslocoService } from '@jsverse/transloco';
|
|
|
18
18
|
* min/max constraints and locale-aware labels.
|
|
19
19
|
*/
|
|
20
20
|
class DatePickerComponent {
|
|
21
|
+
/** Localized range label for a week (e.g. '2 — 8 feb'). */
|
|
22
|
+
formatWeekRange(start, end) {
|
|
23
|
+
const loc = this.locale();
|
|
24
|
+
const dayFmt = new Intl.DateTimeFormat(loc, { day: 'numeric' });
|
|
25
|
+
const monthFmt = new Intl.DateTimeFormat(loc, { month: 'short' });
|
|
26
|
+
const startLabel = `${dayFmt.format(start)} ${monthFmt.format(start).replace('.', '')}`;
|
|
27
|
+
if (start.getMonth() !== end.getMonth() || start.getFullYear() !== end.getFullYear()) {
|
|
28
|
+
const year = start.getFullYear() !== end.getFullYear() ? ` ${end.getFullYear()}` : '';
|
|
29
|
+
return `${startLabel} — ${dayFmt.format(end)} ${monthFmt.format(end).replace('.', '')}${year}`;
|
|
30
|
+
}
|
|
31
|
+
return `${startLabel} — ${dayFmt.format(end)}`;
|
|
32
|
+
}
|
|
33
|
+
/** Localized label for a week row ('Semana N' / 'Week N'). */
|
|
34
|
+
weekLabel(index) {
|
|
35
|
+
return this.locale() === 'en' ? `Week ${index}` : `Semana ${index}`;
|
|
36
|
+
}
|
|
21
37
|
constructor() {
|
|
22
38
|
this.elementRef = inject(ElementRef);
|
|
23
39
|
this.cdr = inject(ChangeDetectorRef);
|
|
@@ -25,8 +41,10 @@ class DatePickerComponent {
|
|
|
25
41
|
this.transloco = inject(TranslocoService);
|
|
26
42
|
/** HTML id for the input (for label/for pairing). */
|
|
27
43
|
this.id = input('', ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
28
|
-
/** Granularity of the picker ('date' | 'month' | 'year'). */
|
|
44
|
+
/** Granularity of the picker ('date' | 'week' | 'month' | 'year'). */
|
|
29
45
|
this.view = input('date', ...(ngDevMode ? [{ debugName: "view" }] : /* istanbul ignore next */ []));
|
|
46
|
+
/** First day of the week (0=Sunday ... 6=Saturday), used by week view. */
|
|
47
|
+
this.weekStart = input(0, ...(ngDevMode ? [{ debugName: "weekStart" }] : /* istanbul ignore next */ []));
|
|
30
48
|
/** Label shown above the input. */
|
|
31
49
|
this.label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
32
50
|
/** Placeholder of the input. */
|
|
@@ -188,6 +206,10 @@ class DatePickerComponent {
|
|
|
188
206
|
label = fmt.format(new Date(y, m - 1, 1));
|
|
189
207
|
label = label.charAt(0).toUpperCase() + label.slice(1);
|
|
190
208
|
}
|
|
209
|
+
else if (v === 'week') {
|
|
210
|
+
const start = new Date(datePart + 'T12:00:00');
|
|
211
|
+
label = this.formatWeekRange(start, new Date(start.getFullYear(), start.getMonth(), start.getDate() + 6));
|
|
212
|
+
}
|
|
191
213
|
else {
|
|
192
214
|
const fmt = new Intl.DateTimeFormat(this.locale(), {
|
|
193
215
|
dateStyle: 'long',
|
|
@@ -234,11 +256,31 @@ class DatePickerComponent {
|
|
|
234
256
|
days.push(i);
|
|
235
257
|
return days;
|
|
236
258
|
}, ...(ngDevMode ? [{ debugName: "calendarDays" }] : /* istanbul ignore next */ []));
|
|
259
|
+
/** Weeks of the viewed month (rows aligned to `weekStart`), for week view. */
|
|
260
|
+
this.monthWeeks = computed(() => {
|
|
261
|
+
const year = this.viewYear();
|
|
262
|
+
const month = this.viewMonth();
|
|
263
|
+
const ws = this.weekStart();
|
|
264
|
+
const first = new Date(year, month, 1);
|
|
265
|
+
const last = new Date(year, month + 1, 0);
|
|
266
|
+
const anchor = new Date(first.getFullYear(), first.getMonth(), first.getDate() - ((first.getDay() - ws + 7) % 7));
|
|
267
|
+
const weeks = [];
|
|
268
|
+
let cursor = anchor;
|
|
269
|
+
let index = 0;
|
|
270
|
+
while (cursor.getTime() <= last.getTime()) {
|
|
271
|
+
index++;
|
|
272
|
+
const start = cursor;
|
|
273
|
+
const end = new Date(start.getFullYear(), start.getMonth(), start.getDate() + 6);
|
|
274
|
+
weeks.push({ index, start, end, range: this.formatWeekRange(start, end) });
|
|
275
|
+
cursor = new Date(start.getFullYear(), start.getMonth(), start.getDate() + 7);
|
|
276
|
+
}
|
|
277
|
+
return weeks;
|
|
278
|
+
}, ...(ngDevMode ? [{ debugName: "monthWeeks" }] : /* istanbul ignore next */ []));
|
|
237
279
|
/** Whether the prev navigation button is allowed by `minValue`. */
|
|
238
280
|
this.canGoPrev = computed(() => {
|
|
239
281
|
const v = this.currentView();
|
|
240
282
|
const min = this.minValue();
|
|
241
|
-
if (v === 'date') {
|
|
283
|
+
if (v === 'date' || v === 'week') {
|
|
242
284
|
if (!min)
|
|
243
285
|
return true;
|
|
244
286
|
const prev = new Date(this.viewYear(), this.viewMonth() - 1, 1);
|
|
@@ -256,7 +298,7 @@ class DatePickerComponent {
|
|
|
256
298
|
this.canGoNext = computed(() => {
|
|
257
299
|
const v = this.currentView();
|
|
258
300
|
const max = this.maxValue();
|
|
259
|
-
if (v === 'date') {
|
|
301
|
+
if (v === 'date' || v === 'week') {
|
|
260
302
|
if (!max)
|
|
261
303
|
return true;
|
|
262
304
|
const next = new Date(this.viewYear(), this.viewMonth() + 1, 1);
|
|
@@ -367,7 +409,7 @@ class DatePickerComponent {
|
|
|
367
409
|
}
|
|
368
410
|
else {
|
|
369
411
|
this.syncViewToValue();
|
|
370
|
-
this.currentView.set('year');
|
|
412
|
+
this.currentView.set(this.view() === 'week' ? 'week' : 'year');
|
|
371
413
|
this.selectedYearValue.set(null);
|
|
372
414
|
this.selectedMonthValue.set(null);
|
|
373
415
|
this.clockMode.set('hours');
|
|
@@ -399,6 +441,11 @@ class DatePickerComponent {
|
|
|
399
441
|
else if (v === 'month') {
|
|
400
442
|
this.viewYear.set(Number(datePart.split('-')[0]));
|
|
401
443
|
}
|
|
444
|
+
else if (v === 'week') {
|
|
445
|
+
const d = new Date(datePart + 'T12:00:00');
|
|
446
|
+
this.viewYear.set(d.getFullYear());
|
|
447
|
+
this.viewMonth.set(d.getMonth());
|
|
448
|
+
}
|
|
402
449
|
else {
|
|
403
450
|
const d = new Date(datePart + 'T12:00:00');
|
|
404
451
|
this.viewYear.set(d.getFullYear());
|
|
@@ -494,7 +541,17 @@ class DatePickerComponent {
|
|
|
494
541
|
}
|
|
495
542
|
this.setValue(value);
|
|
496
543
|
}
|
|
497
|
-
/**
|
|
544
|
+
/** Selects a week - emits its start date (YYYY-MM-DD). */
|
|
545
|
+
selectWeek(start) {
|
|
546
|
+
const value = `${start.getFullYear()}-` +
|
|
547
|
+
`${String(start.getMonth() + 1).padStart(2, '0')}-` +
|
|
548
|
+
`${String(start.getDate()).padStart(2, '0')}`;
|
|
549
|
+
if (this.showTime()) {
|
|
550
|
+
this.pendingDate.set(value);
|
|
551
|
+
return;
|
|
552
|
+
}
|
|
553
|
+
this.setValue(value);
|
|
554
|
+
}
|
|
498
555
|
setValue(value, close = true) {
|
|
499
556
|
this._value.set(value);
|
|
500
557
|
this.onChange(value);
|
|
@@ -761,6 +818,9 @@ class DatePickerComponent {
|
|
|
761
818
|
return 'YYYY';
|
|
762
819
|
if (this.view() === 'month')
|
|
763
820
|
return 'MM/YYYY';
|
|
821
|
+
if (this.view() === 'week') {
|
|
822
|
+
return this.locale() === 'en' ? 'Week · MM/YYYY' : 'Semana · MM/YYYY';
|
|
823
|
+
}
|
|
764
824
|
return this.inputFormat();
|
|
765
825
|
}
|
|
766
826
|
/** Handles text input in the date field. */
|
|
@@ -817,6 +877,8 @@ class DatePickerComponent {
|
|
|
817
877
|
if (this.timeOnly()) {
|
|
818
878
|
return this.parseTimeOnly(clean);
|
|
819
879
|
}
|
|
880
|
+
if (this.view() === 'week')
|
|
881
|
+
return null;
|
|
820
882
|
if (this.view() === 'year') {
|
|
821
883
|
const y = Number(parts[0]);
|
|
822
884
|
if (parts.length === 1 && y >= 1900 && y <= 2100)
|
|
@@ -899,6 +961,25 @@ class DatePickerComponent {
|
|
|
899
961
|
this.viewMonth() === now.getMonth() &&
|
|
900
962
|
day === now.getDate());
|
|
901
963
|
}
|
|
964
|
+
/** ISO date (YYYY-MM-DD) of the week start containing the given date. */
|
|
965
|
+
weekStartISO(date) {
|
|
966
|
+
const ws = this.weekStart();
|
|
967
|
+
const start = new Date(date.getFullYear(), date.getMonth(), date.getDate() - ((date.getDay() - ws + 7) % 7));
|
|
968
|
+
return (`${start.getFullYear()}-` +
|
|
969
|
+
`${String(start.getMonth() + 1).padStart(2, '0')}-` +
|
|
970
|
+
`${String(start.getDate()).padStart(2, '0')}`);
|
|
971
|
+
}
|
|
972
|
+
/** Whether the given week row contains the displayed/selected date. */
|
|
973
|
+
isSelectedWeek(start) {
|
|
974
|
+
const date = this.displayedDate();
|
|
975
|
+
if (!date)
|
|
976
|
+
return false;
|
|
977
|
+
return this.weekStartISO(new Date(date + 'T12:00:00')) === this.weekStartISO(start);
|
|
978
|
+
}
|
|
979
|
+
/** Whether the given week row contains today's date. */
|
|
980
|
+
isCurrentWeek(start) {
|
|
981
|
+
return this.weekStartISO(new Date()) === this.weekStartISO(start);
|
|
982
|
+
}
|
|
902
983
|
/** Whether the given month matches the selected month and year. */
|
|
903
984
|
isSelectedMonth(monthIndex) {
|
|
904
985
|
return this.selectedMonthValue() === monthIndex;
|
|
@@ -927,13 +1008,13 @@ class DatePickerComponent {
|
|
|
927
1008
|
this.cdr.markForCheck();
|
|
928
1009
|
}
|
|
929
1010
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: DatePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
930
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.23", type: DatePickerComponent, isStandalone: true, selector: "shk-date-picker", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, view: { classPropertyName: "view", publicName: "view", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: false, transformFunction: null }, control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, errorMessages: { classPropertyName: "errorMessages", publicName: "errorMessages", isSignal: true, isRequired: false, transformFunction: null }, minValue: { classPropertyName: "minValue", publicName: "minValue", isSignal: true, isRequired: false, transformFunction: null }, maxValue: { classPropertyName: "maxValue", publicName: "maxValue", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, timeOnly: { classPropertyName: "timeOnly", publicName: "timeOnly", isSignal: true, isRequired: false, transformFunction: null }, showTime: { classPropertyName: "showTime", publicName: "showTime", isSignal: true, isRequired: false, transformFunction: null }, hourFormat: { classPropertyName: "hourFormat", publicName: "hourFormat", isSignal: true, isRequired: false, transformFunction: null }, showSeconds: { classPropertyName: "showSeconds", publicName: "showSeconds", isSignal: true, isRequired: false, transformFunction: null }, minuteStep: { classPropertyName: "minuteStep", publicName: "minuteStep", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "document:click": "onDocumentClick($event)", "document:keydown.escape": "onEscape()" } }, providers: [
|
|
1011
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.23", type: DatePickerComponent, isStandalone: true, selector: "shk-date-picker", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, view: { classPropertyName: "view", publicName: "view", isSignal: true, isRequired: false, transformFunction: null }, weekStart: { classPropertyName: "weekStart", publicName: "weekStart", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: false, transformFunction: null }, control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, errorMessages: { classPropertyName: "errorMessages", publicName: "errorMessages", isSignal: true, isRequired: false, transformFunction: null }, minValue: { classPropertyName: "minValue", publicName: "minValue", isSignal: true, isRequired: false, transformFunction: null }, maxValue: { classPropertyName: "maxValue", publicName: "maxValue", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, timeOnly: { classPropertyName: "timeOnly", publicName: "timeOnly", isSignal: true, isRequired: false, transformFunction: null }, showTime: { classPropertyName: "showTime", publicName: "showTime", isSignal: true, isRequired: false, transformFunction: null }, hourFormat: { classPropertyName: "hourFormat", publicName: "hourFormat", isSignal: true, isRequired: false, transformFunction: null }, showSeconds: { classPropertyName: "showSeconds", publicName: "showSeconds", isSignal: true, isRequired: false, transformFunction: null }, minuteStep: { classPropertyName: "minuteStep", publicName: "minuteStep", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "document:click": "onDocumentClick($event)", "document:keydown.escape": "onEscape()" } }, providers: [
|
|
931
1012
|
{
|
|
932
1013
|
provide: NG_VALUE_ACCESSOR,
|
|
933
1014
|
useExisting: forwardRef(() => DatePickerComponent),
|
|
934
1015
|
multi: true,
|
|
935
1016
|
},
|
|
936
|
-
], ngImport: i0, template: "<div class=\"relative mb-4\">\n @if (label()) {\n <div class=\"text-sm font-medium _shk-text-surface-700 dark:[color:var(--shk-surface-600)] mb-1\">\n {{ label() }}\n </div>\n }\n\n <div class=\"relative\">\n <div class=\"relative\">\n <input\n [id]=\"id()\"\n type=\"text\"\n [disabled]=\"isDisabled()\"\n [placeholder]=\"inputPlaceholder()\"\n [value]=\"isTyping() ? typedValue() : displayLabel()\"\n (input)=\"onInputText($event)\"\n (focus)=\"onInputFocus()\"\n (blur)=\"onInputBlur()\"\n (keydown.enter)=\"$any($event.target).blur()\"\n (keydown.escape)=\"cancelTyping()\"\n (click)=\"toggle()\"\n class=\"date-input-field\"\n [ngClass]=\"{\n 'input-error': shouldShowError() || typingValid() === false,\n 'input-valid': wasFixedError() || typingValid() === true,\n }\"\n [attr.aria-invalid]=\"shouldShowError()\"\n [attr.aria-describedby]=\"shouldShowError() ? id() + '-error' : null\"\n />\n <button\n type=\"button\"\n [disabled]=\"isDisabled()\"\n (click)=\"toggle()\"\n class=\"absolute right-2 top-1/2 -translate-y-1/2 p-1 _shk-text-surface-400 dark:[color:var(--shk-surface-400)] hover:[color:var(--shk-surface-600)] dark:hover:[color:var(--shk-surface-300)] transition-colors\"\n >\n <svg\n class=\"w-4 h-4\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n >\n <rect x=\"3\" y=\"4\" width=\"18\" height=\"18\" rx=\"2\"></rect>\n <path d=\"M16 2v4M8 2v4M3 10h18\"></path>\n </svg>\n </button>\n </div>\n\n @if (isOpen()) {\n <div class=\"fixed inset-0 z-40 bg-black/30\" (click)=\"close()\"></div>\n <div\n class=\"fixed z-50 top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-72 p-4 bg-white dark:[background-color:var(--shk-surface-100)] _shk-border dark:[border-color:var(--shk-surface-200)] rounded-lg shadow-xl\"\n (click)=\"$event.stopPropagation()\"\n >\n <!-- DATE VIEW -->\n @if (!timeOnly() && currentView() === 'date') {\n <div class=\"flex items-center justify-between mb-3\">\n <button\n type=\"button\"\n (click)=\"drillUp()\"\n class=\"p-1 rounded hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]\"\n >\n <svg class=\"w-4 h-4\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M15 18l-6-6 6-6\"></path>\n </svg>\n </button>\n <span class=\"text-sm font-medium _shk-text-surface-700 dark:[color:var(--shk-surface-600)]\">\n {{ monthNames()[viewMonth()] }} {{ selectedYearValue() ?? viewYear() }}\n </span>\n <button\n type=\"button\"\n (click)=\"drillToInitial()\"\n class=\"p-1 rounded hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]\"\n >\n <svg class=\"w-4 h-4\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M9 18l6-6-6-6\"></path>\n </svg>\n </button>\n </div>\n\n <div class=\"grid grid-cols-7 gap-0 mb-1\">\n @for (name of dayNames(); track $index) {\n <div class=\"text-center text-xs font-medium _shk-text-surface-400 dark:[color:var(--shk-surface-400)] py-1\">\n {{ name }}\n </div>\n }\n </div>\n\n <div class=\"grid grid-cols-7 gap-0\">\n @for (day of calendarDays(); track $index) {\n @if (day !== null) {\n <button\n type=\"button\"\n (click)=\"selectDay(day)\"\n class=\"py-1.5 text-sm rounded transition-colors\"\n [ngClass]=\"{\n '_shk-bg-primary _shk-text-white hover:[background-color:var(--shk-primary-700)]': isSelectedDay(day),\n 'ring-1 [--tw-ring-color:var(--shk-primary-500)] _shk-text-surface-700 dark:[color:var(--shk-surface-700)]': isToday(day) && !isSelectedDay(day),\n '_shk-text-surface-700 dark:[color:var(--shk-surface-700)] hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]': !isSelectedDay(day) && !isToday(day),\n }\"\n >\n {{ day }}\n </button>\n } @else {\n <div></div>\n }\n }\n </div>\n }\n\n <!-- MONTH VIEW -->\n @if (!timeOnly() && currentView() === 'month') {\n <div class=\"flex items-center justify-between mb-3\">\n <button\n type=\"button\"\n (click)=\"drillUp()\"\n class=\"p-1 rounded hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]\"\n >\n <svg class=\"w-4 h-4\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M15 18l-6-6 6-6\"></path>\n </svg>\n </button>\n <span class=\"text-sm font-medium _shk-text-surface-700 dark:[color:var(--shk-surface-600)]\">\n {{ selectedYearValue() ?? viewYear() }}\n </span>\n <button\n type=\"button\"\n (click)=\"drillToInitial()\"\n class=\"p-1 rounded hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]\"\n >\n <svg class=\"w-4 h-4\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M9 18l6-6-6-6\"></path>\n </svg>\n </button>\n </div>\n\n <div class=\"grid grid-cols-3 gap-1\">\n @for (name of monthNames(); track $index) {\n <button\n type=\"button\"\n (click)=\"selectMonth($index)\"\n class=\"py-2 text-sm rounded transition-colors\"\n [ngClass]=\"{\n '_shk-bg-primary _shk-text-white hover:[background-color:var(--shk-primary-700)]': selectedMonthValue() === $index,\n 'ring-1 [--tw-ring-color:var(--shk-primary-500)] _shk-text-surface-700 dark:[color:var(--shk-surface-700)]': isCurrentMonth($index) && selectedMonthValue() !== $index,\n '_shk-text-surface-700 dark:[color:var(--shk-surface-700)] hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]': selectedMonthValue() !== $index && !isCurrentMonth($index),\n }\"\n >\n {{ name }}\n </button>\n }\n </div>\n }\n\n <!-- YEAR VIEW -->\n @if (!timeOnly() && currentView() === 'year') {\n <div class=\"flex items-center justify-between mb-3\">\n <button\n type=\"button\"\n (click)=\"prev()\"\n [disabled]=\"!canGoPrev()\"\n class=\"p-1 rounded hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)] disabled:opacity-30 disabled:cursor-not-allowed\"\n >\n <svg class=\"w-4 h-4\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M15 18l-6-6 6-6\"></path>\n </svg>\n </button>\n <span class=\"text-sm font-medium _shk-text-surface-700 dark:[color:var(--shk-surface-600)]\">\n {{ viewDecade() }} - {{ viewDecade() + 11 }}\n </span>\n <button\n type=\"button\"\n (click)=\"next()\"\n [disabled]=\"!canGoNext()\"\n class=\"p-1 rounded hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)] disabled:opacity-30 disabled:cursor-not-allowed\"\n >\n <svg class=\"w-4 h-4\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M9 18l6-6-6-6\"></path>\n </svg>\n </button>\n </div>\n\n <div class=\"grid grid-cols-3 gap-1\">\n @for (year of decadeYears(); track year) {\n <button\n type=\"button\"\n (click)=\"selectYear(year)\"\n class=\"py-2 text-sm rounded transition-colors\"\n [ngClass]=\"{\n '_shk-bg-primary _shk-text-white hover:[background-color:var(--shk-primary-700)]': selectedYearValue() === year,\n 'ring-1 [--tw-ring-color:var(--shk-primary-500)] _shk-text-surface-700 dark:[color:var(--shk-surface-700)]': isCurrentYear(year) && selectedYearValue() !== year,\n '_shk-text-surface-700 dark:[color:var(--shk-surface-700)] hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]': selectedYearValue() !== year && !isCurrentYear(year),\n }\"\n >\n {{ year }}\n </button>\n }\n </div>\n }\n\n <!-- ANALOG CLOCK TIME PICKER -->\n @if (timeOnly() || showTime()) {\n <div class=\"mt-3 pt-3 _shk-border dark:[border-color:var(--shk-surface-200)]\">\n <!-- Clock display time -->\n <div class=\"text-center mb-2\">\n <span class=\"text-lg font-semibold _shk-text-surface-700 dark:[color:var(--shk-surface-700)]\">\n {{ clockDisplayTime() }}\n </span>\n </div>\n\n <!-- Analog clock face -->\n <div class=\"clock-container\">\n <svg\n viewBox=\"0 0 200 200\"\n class=\"w-full h-full cursor-pointer\"\n (click)=\"onClockClick($event, clockMode())\"\n >\n <!-- Clock face background -->\n <circle cx=\"100\" cy=\"100\" r=\"96\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1\"\n class=\"_shk-text-surface-200 dark:[color:var(--shk-surface-200)]\" />\n\n <!-- Minute markers -->\n @if (clockMode() === 'minutes') {\n @for (i of [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59]; track i) {\n <line\n [attr.x1]=\"clockMinuteMarker(i).x1\"\n [attr.y1]=\"clockMinuteMarker(i).y1\"\n [attr.x2]=\"clockMinuteMarker(i).x2\"\n [attr.y2]=\"clockMinuteMarker(i).y2\"\n [attr.stroke-width]=\"i % 5 === 0 ? 2 : 1\"\n [class]=\"i % 5 === 0 ? '_shk-text-surface-500 dark:[color:var(--shk-surface-500)]' : '_shk-text-surface-300 dark:[color:var(--shk-surface-400)]'\"\n stroke=\"currentColor\"\n />\n }\n <!-- Minute numbers (00, 05, 10, ...) -->\n @for (m of [0,5,10,15,20,25,30,35,40,45,50,55]; track m) {\n <text\n [attr.x]=\"clockMinutePos(m).x\"\n [attr.y]=\"clockMinutePos(m).y\"\n text-anchor=\"middle\"\n dominant-baseline=\"central\"\n class=\"text-[9px] _shk-text-surface-500 dark:[color:var(--shk-surface-400)]\"\n [class._shk-text-primary]=\"viewMinute() === m\"\n >\n {{ m.toString().padStart(2, '0') }}\n </text>\n }\n }\n\n <!-- Hour numbers -->\n @if (clockMode() === 'hours') {\n @for (h of clockHours(); track h) {\n <text\n [attr.x]=\"clockNumberPos(h).x\"\n [attr.y]=\"clockNumberPos(h).y\"\n text-anchor=\"middle\"\n dominant-baseline=\"central\"\n class=\"text-sm font-medium\"\n [class._shk-text-primary]=\"isClockHourSelected(h)\"\n [class._shk-text-surface-700]=\"!isClockHourSelected(h)\"\n >\n {{ h }}\n </text>\n }\n }\n\n <!-- Clock hand -->\n <line\n x1=\"100\" y1=\"100\"\n [attr.x2]=\"clockHandLine(60).x2\"\n [attr.y2]=\"clockHandLine(60).y2\"\n class=\"_shk-text-primary\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n\n <!-- Center dot -->\n <circle cx=\"100\" cy=\"100\" r=\"4\" class=\"fill-current _shk-text-primary\" />\n </svg>\n </div>\n\n <!-- Mode toggle: Hours / Minutes -->\n <div class=\"clock-mode-toggle\">\n <button\n type=\"button\"\n (click)=\"clockMode.set('hours')\"\n class=\"clock-mode-btn\"\n [class.active]=\"clockMode() === 'hours'\"\n >\n {{ 'Horas' }}\n </button>\n <button\n type=\"button\"\n (click)=\"clockMode.set('minutes')\"\n class=\"clock-mode-btn\"\n [class.active]=\"clockMode() === 'minutes'\"\n >\n {{ 'Minutos' }}\n </button>\n </div>\n\n <!-- AM/PM toggle for 12h format -->\n @if (hourFormat() === '12') {\n <div class=\"flex items-center justify-center gap-2 mt-2\">\n <button\n type=\"button\"\n (click)=\"viewMeridiem.set('AM')\"\n class=\"px-3 py-1 text-xs font-medium rounded-full transition-colors\"\n [ngClass]=\"{\n '_shk-bg-primary _shk-text-white': viewMeridiem() === 'AM',\n '_shk-text-surface-500 hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]': viewMeridiem() !== 'AM'\n }\"\n >\n AM\n </button>\n <button\n type=\"button\"\n (click)=\"viewMeridiem.set('PM')\"\n class=\"px-3 py-1 text-xs font-medium rounded-full transition-colors\"\n [ngClass]=\"{\n '_shk-bg-primary _shk-text-white': viewMeridiem() === 'PM',\n '_shk-text-surface-500 hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]': viewMeridiem() !== 'PM'\n }\"\n >\n PM\n </button>\n </div>\n }\n\n <!-- Seconds selector (if enabled) -->\n @if (showSeconds()) {\n <div class=\"flex items-center justify-center gap-1 mt-2\">\n <span class=\"text-xs _shk-text-surface-400\">Seg:</span>\n <select\n class=\"px-2 py-1 text-xs _shk-bg-surface-50 dark:[background-color:var(--shk-surface-100)] _shk-border dark:[border-color:var(--shk-surface-200)] rounded-md\"\n [value]=\"viewSecond()\"\n (change)=\"onSecondChange($event)\"\n aria-label=\"Segundos\"\n >\n @for (seconds of secondsRange(); track seconds) {\n <option [value]=\"seconds\">{{ minutesLabel(seconds) }}</option>\n }\n </select>\n </div>\n }\n\n <!-- Confirm button -->\n <button\n type=\"button\"\n (click)=\"confirmTime()\"\n class=\"mt-3 w-full py-2 text-sm _shk-bg-primary _shk-text-white rounded-lg hover:[background-color:var(--shk-primary-700)] transition-colors\"\n >\n {{ timeOnly() ? 'Confirmar' : 'Introducir hora' }}\n </button>\n </div>\n }\n </div>\n }\n </div>\n\n @if (shouldShowError()) {\n <div [id]=\"id() + '-error'\" class=\"mt-1 text-xs text-red-500 max-h-20 overflow-y-auto _shk-scrollbar\">\n <ul class=\"list-disc pl-4 space-y-1\">\n @for (error of getErrorMessages(); track error) {\n <li>{{ error }}</li>\n }\n </ul>\n </div>\n }\n</div>\n", styles: [".clock-container{position:relative;width:200px;height:200px;margin:0 auto}.clock-face{width:100%;height:100%;border-radius:50%;border:2px solid var(--shk-surface-200);position:relative;background-color:var(--shk-surface-50)}.dark .clock-face{border-color:var(--shk-surface-200);background-color:var(--shk-surface-100)}.clock-number{position:absolute;width:32px;height:32px;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:500;border-radius:50%;transform:translate(-50%,-50%);cursor:pointer;transition:background-color .15s,color .15s;-webkit-user-select:none;user-select:none;color:var(--shk-surface-700)}.dark .clock-number{color:var(--shk-surface-700)}.clock-number:hover{background-color:var(--shk-surface-100)}.dark .clock-number:hover{background-color:var(--shk-surface-200)}.clock-number.selected{background-color:var(--shk-primary-500);color:#fff}.clock-number.current{font-weight:700}.clock-hand{position:absolute;bottom:50%;left:50%;width:2px;background-color:var(--shk-primary-500);transform-origin:bottom center;border-radius:1px;pointer-events:none;transition:transform .2s ease-out}.clock-center{position:absolute;top:50%;left:50%;width:8px;height:8px;border-radius:50%;background-color:var(--shk-primary-500);transform:translate(-50%,-50%);pointer-events:none;z-index:2}.clock-minute-marker{position:absolute;width:1px;height:8px;background-color:var(--shk-surface-300);top:6px;left:50%;transform-origin:center 94px}.dark .clock-minute-marker{background-color:var(--shk-surface-400)}.clock-minute-marker.major{width:2px;height:12px;background-color:var(--shk-surface-400)}.dark .clock-minute-marker.major{background-color:var(--shk-surface-500)}.clock-mode-toggle{display:flex;align-items:center;justify-content:center;gap:.5rem;margin-top:.75rem}.clock-mode-btn{padding:.25rem .75rem;font-size:.75rem;font-weight:500;border-radius:9999px;cursor:pointer;transition:background-color .15s,color .15s;border:none;background:transparent;color:var(--shk-surface-500)}.dark .clock-mode-btn{color:var(--shk-surface-400)}.clock-mode-btn.active{background-color:var(--shk-primary-500);color:#fff}.clock-mode-btn:hover:not(.active){background-color:var(--shk-surface-100)}.dark .clock-mode-btn:hover:not(.active){background-color:var(--shk-surface-200)}.date-input-field{width:100%;padding:.5rem 2.5rem .5rem .75rem;font-size:.875rem;border-radius:.5rem;outline:none;transition:border-color .15s,box-shadow .15s;background-color:var(--shk-surface-50);color:var(--shk-surface-700);border:1px solid var(--shk-surface-200)}.dark .date-input-field{background-color:var(--shk-surface-100);color:var(--shk-surface-700);border-color:var(--shk-surface-200)}.date-input-field::placeholder{color:var(--shk-surface-400)}.dark .date-input-field::placeholder{color:var(--shk-surface-400)}.date-input-field:focus{border-color:var(--shk-primary-500);box-shadow:0 0 0 1px var(--shk-primary-500)}.date-input-field:disabled{opacity:.5;cursor:not-allowed}.date-input-field.input-error{border-color:#ef4444}.date-input-field.input-error:focus{border-color:#ef4444;box-shadow:0 0 0 1px #ef4444}.date-input-field.input-valid{border-color:#22c55e}.date-input-field.input-valid:focus{border-color:#22c55e;box-shadow:0 0 0 1px #22c55e}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1017
|
+
], ngImport: i0, template: "<div class=\"relative mb-4\">\n @if (label()) {\n <div class=\"text-sm font-medium _shk-text-surface-700 dark:[color:var(--shk-surface-600)] mb-1\">\n {{ label() }}\n </div>\n }\n\n <div class=\"relative\">\n <div class=\"relative\">\n <input\n [id]=\"id()\"\n type=\"text\"\n [disabled]=\"isDisabled()\"\n [placeholder]=\"inputPlaceholder()\"\n [value]=\"isTyping() ? typedValue() : displayLabel()\"\n (input)=\"onInputText($event)\"\n (focus)=\"onInputFocus()\"\n (blur)=\"onInputBlur()\"\n (keydown.enter)=\"$any($event.target).blur()\"\n (keydown.escape)=\"cancelTyping()\"\n (click)=\"toggle()\"\n class=\"date-input-field\"\n [ngClass]=\"{\n 'input-error': shouldShowError() || typingValid() === false,\n 'input-valid': wasFixedError() || typingValid() === true,\n }\"\n [attr.aria-invalid]=\"shouldShowError()\"\n [attr.aria-describedby]=\"shouldShowError() ? id() + '-error' : null\"\n />\n <button\n type=\"button\"\n [disabled]=\"isDisabled()\"\n (click)=\"toggle()\"\n class=\"absolute right-2 top-1/2 -translate-y-1/2 p-1 _shk-text-surface-400 dark:[color:var(--shk-surface-400)] hover:[color:var(--shk-surface-600)] dark:hover:[color:var(--shk-surface-300)] transition-colors\"\n >\n <svg\n class=\"w-4 h-4\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n >\n <rect x=\"3\" y=\"4\" width=\"18\" height=\"18\" rx=\"2\"></rect>\n <path d=\"M16 2v4M8 2v4M3 10h18\"></path>\n </svg>\n </button>\n </div>\n\n @if (isOpen()) {\n <div class=\"fixed inset-0 z-40 bg-black/30\" (click)=\"close()\"></div>\n <div\n class=\"fixed z-50 top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-72 p-4 bg-white dark:[background-color:var(--shk-surface-100)] _shk-border dark:[border-color:var(--shk-surface-200)] rounded-lg shadow-xl\"\n (click)=\"$event.stopPropagation()\"\n >\n <!-- DATE VIEW -->\n @if (!timeOnly() && currentView() === 'date') {\n <div class=\"flex items-center justify-between mb-3\">\n <button\n type=\"button\"\n (click)=\"drillUp()\"\n class=\"p-1 rounded hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]\"\n >\n <svg class=\"w-4 h-4\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M15 18l-6-6 6-6\"></path>\n </svg>\n </button>\n <span class=\"text-sm font-medium _shk-text-surface-700 dark:[color:var(--shk-surface-600)]\">\n {{ monthNames()[viewMonth()] }} {{ selectedYearValue() ?? viewYear() }}\n </span>\n <button\n type=\"button\"\n (click)=\"drillToInitial()\"\n class=\"p-1 rounded hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]\"\n >\n <svg class=\"w-4 h-4\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M9 18l6-6-6-6\"></path>\n </svg>\n </button>\n </div>\n\n <div class=\"grid grid-cols-7 gap-0 mb-1\">\n @for (name of dayNames(); track $index) {\n <div class=\"text-center text-xs font-medium _shk-text-surface-400 dark:[color:var(--shk-surface-400)] py-1\">\n {{ name }}\n </div>\n }\n </div>\n\n <div class=\"grid grid-cols-7 gap-0\">\n @for (day of calendarDays(); track $index) {\n @if (day !== null) {\n <button\n type=\"button\"\n (click)=\"selectDay(day)\"\n class=\"py-1.5 text-sm rounded transition-colors\"\n [ngClass]=\"{\n '_shk-bg-primary _shk-text-white hover:[background-color:var(--shk-primary-700)]': isSelectedDay(day),\n 'ring-1 [--tw-ring-color:var(--shk-primary-500)] _shk-text-surface-700 dark:[color:var(--shk-surface-700)]': isToday(day) && !isSelectedDay(day),\n '_shk-text-surface-700 dark:[color:var(--shk-surface-700)] hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]': !isSelectedDay(day) && !isToday(day),\n }\"\n >\n {{ day }}\n </button>\n } @else {\n <div></div>\n }\n }\n </div>\n }\n\n <!-- WEEK VIEW -->\n @if (!timeOnly() && currentView() === 'week') {\n <div class=\"flex items-center justify-between mb-3\">\n <button\n type=\"button\"\n (click)=\"prev()\"\n [disabled]=\"!canGoPrev()\"\n class=\"p-1 rounded hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)] disabled:opacity-30 disabled:cursor-not-allowed\"\n >\n <svg class=\"w-4 h-4\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M15 18l-6-6 6-6\"></path>\n </svg>\n </button>\n <span class=\"text-sm font-medium _shk-text-surface-700 dark:[color:var(--shk-surface-600)]\">\n {{ monthNames()[viewMonth()] }} {{ viewYear() }}\n </span>\n <button\n type=\"button\"\n (click)=\"next()\"\n [disabled]=\"!canGoNext()\"\n class=\"p-1 rounded hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)] disabled:opacity-30 disabled:cursor-not-allowed\"\n >\n <svg class=\"w-4 h-4\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M9 18l6-6-6-6\"></path>\n </svg>\n </button>\n </div>\n\n <div class=\"space-y-1\">\n @for (week of monthWeeks(); track week.index) {\n <button\n type=\"button\"\n (click)=\"selectWeek(week.start)\"\n class=\"w-full flex items-center justify-between py-1.5 px-2 text-sm rounded transition-colors\"\n [ngClass]=\"{\n '_shk-bg-primary _shk-text-white hover:[background-color:var(--shk-primary-700)]': isSelectedWeek(week.start),\n 'ring-1 [--tw-ring-color:var(--shk-primary-500)] _shk-text-surface-700 dark:[color:var(--shk-surface-700)]': isCurrentWeek(week.start) && !isSelectedWeek(week.start),\n '_shk-text-surface-700 dark:[color:var(--shk-surface-700)] hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]': !isSelectedWeek(week.start) && !isCurrentWeek(week.start),\n }\"\n >\n <span class=\"font-medium\">{{ weekLabel(week.index) }}</span>\n <span class=\"text-xs opacity-80\">{{ week.range }}</span>\n </button>\n }\n </div>\n }\n\n <!-- MONTH VIEW -->\n @if (!timeOnly() && currentView() === 'month') {\n <div class=\"flex items-center justify-between mb-3\">\n <button\n type=\"button\"\n (click)=\"drillUp()\"\n class=\"p-1 rounded hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]\"\n >\n <svg class=\"w-4 h-4\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M15 18l-6-6 6-6\"></path>\n </svg>\n </button>\n <span class=\"text-sm font-medium _shk-text-surface-700 dark:[color:var(--shk-surface-600)]\">\n {{ selectedYearValue() ?? viewYear() }}\n </span>\n <button\n type=\"button\"\n (click)=\"drillToInitial()\"\n class=\"p-1 rounded hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]\"\n >\n <svg class=\"w-4 h-4\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M9 18l6-6-6-6\"></path>\n </svg>\n </button>\n </div>\n\n <div class=\"grid grid-cols-3 gap-1\">\n @for (name of monthNames(); track $index) {\n <button\n type=\"button\"\n (click)=\"selectMonth($index)\"\n class=\"py-2 text-sm rounded transition-colors\"\n [ngClass]=\"{\n '_shk-bg-primary _shk-text-white hover:[background-color:var(--shk-primary-700)]': selectedMonthValue() === $index,\n 'ring-1 [--tw-ring-color:var(--shk-primary-500)] _shk-text-surface-700 dark:[color:var(--shk-surface-700)]': isCurrentMonth($index) && selectedMonthValue() !== $index,\n '_shk-text-surface-700 dark:[color:var(--shk-surface-700)] hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]': selectedMonthValue() !== $index && !isCurrentMonth($index),\n }\"\n >\n {{ name }}\n </button>\n }\n </div>\n }\n\n <!-- YEAR VIEW -->\n @if (!timeOnly() && currentView() === 'year') {\n <div class=\"flex items-center justify-between mb-3\">\n <button\n type=\"button\"\n (click)=\"prev()\"\n [disabled]=\"!canGoPrev()\"\n class=\"p-1 rounded hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)] disabled:opacity-30 disabled:cursor-not-allowed\"\n >\n <svg class=\"w-4 h-4\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M15 18l-6-6 6-6\"></path>\n </svg>\n </button>\n <span class=\"text-sm font-medium _shk-text-surface-700 dark:[color:var(--shk-surface-600)]\">\n {{ viewDecade() }} - {{ viewDecade() + 11 }}\n </span>\n <button\n type=\"button\"\n (click)=\"next()\"\n [disabled]=\"!canGoNext()\"\n class=\"p-1 rounded hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)] disabled:opacity-30 disabled:cursor-not-allowed\"\n >\n <svg class=\"w-4 h-4\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M9 18l6-6-6-6\"></path>\n </svg>\n </button>\n </div>\n\n <div class=\"grid grid-cols-3 gap-1\">\n @for (year of decadeYears(); track year) {\n <button\n type=\"button\"\n (click)=\"selectYear(year)\"\n class=\"py-2 text-sm rounded transition-colors\"\n [ngClass]=\"{\n '_shk-bg-primary _shk-text-white hover:[background-color:var(--shk-primary-700)]': selectedYearValue() === year,\n 'ring-1 [--tw-ring-color:var(--shk-primary-500)] _shk-text-surface-700 dark:[color:var(--shk-surface-700)]': isCurrentYear(year) && selectedYearValue() !== year,\n '_shk-text-surface-700 dark:[color:var(--shk-surface-700)] hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]': selectedYearValue() !== year && !isCurrentYear(year),\n }\"\n >\n {{ year }}\n </button>\n }\n </div>\n }\n\n <!-- ANALOG CLOCK TIME PICKER -->\n @if (timeOnly() || showTime()) {\n <div class=\"mt-3 pt-3 _shk-border dark:[border-color:var(--shk-surface-200)]\">\n <!-- Clock display time -->\n <div class=\"text-center mb-2\">\n <span class=\"text-lg font-semibold _shk-text-surface-700 dark:[color:var(--shk-surface-700)]\">\n {{ clockDisplayTime() }}\n </span>\n </div>\n\n <!-- Analog clock face -->\n <div class=\"clock-container\">\n <svg\n viewBox=\"0 0 200 200\"\n class=\"w-full h-full cursor-pointer\"\n (click)=\"onClockClick($event, clockMode())\"\n >\n <!-- Clock face background -->\n <circle cx=\"100\" cy=\"100\" r=\"96\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1\"\n class=\"_shk-text-surface-200 dark:[color:var(--shk-surface-200)]\" />\n\n <!-- Minute markers -->\n @if (clockMode() === 'minutes') {\n @for (i of [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59]; track i) {\n <line\n [attr.x1]=\"clockMinuteMarker(i).x1\"\n [attr.y1]=\"clockMinuteMarker(i).y1\"\n [attr.x2]=\"clockMinuteMarker(i).x2\"\n [attr.y2]=\"clockMinuteMarker(i).y2\"\n [attr.stroke-width]=\"i % 5 === 0 ? 2 : 1\"\n [class]=\"i % 5 === 0 ? '_shk-text-surface-500 dark:[color:var(--shk-surface-500)]' : '_shk-text-surface-300 dark:[color:var(--shk-surface-400)]'\"\n stroke=\"currentColor\"\n />\n }\n <!-- Minute numbers (00, 05, 10, ...) -->\n @for (m of [0,5,10,15,20,25,30,35,40,45,50,55]; track m) {\n <text\n [attr.x]=\"clockMinutePos(m).x\"\n [attr.y]=\"clockMinutePos(m).y\"\n text-anchor=\"middle\"\n dominant-baseline=\"central\"\n class=\"text-[9px] _shk-text-surface-500 dark:[color:var(--shk-surface-400)]\"\n [class._shk-text-primary]=\"viewMinute() === m\"\n >\n {{ m.toString().padStart(2, '0') }}\n </text>\n }\n }\n\n <!-- Hour numbers -->\n @if (clockMode() === 'hours') {\n @for (h of clockHours(); track h) {\n <text\n [attr.x]=\"clockNumberPos(h).x\"\n [attr.y]=\"clockNumberPos(h).y\"\n text-anchor=\"middle\"\n dominant-baseline=\"central\"\n class=\"text-sm font-medium\"\n [class._shk-text-primary]=\"isClockHourSelected(h)\"\n [class._shk-text-surface-700]=\"!isClockHourSelected(h)\"\n >\n {{ h }}\n </text>\n }\n }\n\n <!-- Clock hand -->\n <line\n x1=\"100\" y1=\"100\"\n [attr.x2]=\"clockHandLine(60).x2\"\n [attr.y2]=\"clockHandLine(60).y2\"\n class=\"_shk-text-primary\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n\n <!-- Center dot -->\n <circle cx=\"100\" cy=\"100\" r=\"4\" class=\"fill-current _shk-text-primary\" />\n </svg>\n </div>\n\n <!-- Mode toggle: Hours / Minutes -->\n <div class=\"clock-mode-toggle\">\n <button\n type=\"button\"\n (click)=\"clockMode.set('hours')\"\n class=\"clock-mode-btn\"\n [class.active]=\"clockMode() === 'hours'\"\n >\n {{ 'Horas' }}\n </button>\n <button\n type=\"button\"\n (click)=\"clockMode.set('minutes')\"\n class=\"clock-mode-btn\"\n [class.active]=\"clockMode() === 'minutes'\"\n >\n {{ 'Minutos' }}\n </button>\n </div>\n\n <!-- AM/PM toggle for 12h format -->\n @if (hourFormat() === '12') {\n <div class=\"flex items-center justify-center gap-2 mt-2\">\n <button\n type=\"button\"\n (click)=\"viewMeridiem.set('AM')\"\n class=\"px-3 py-1 text-xs font-medium rounded-full transition-colors\"\n [ngClass]=\"{\n '_shk-bg-primary _shk-text-white': viewMeridiem() === 'AM',\n '_shk-text-surface-500 hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]': viewMeridiem() !== 'AM'\n }\"\n >\n AM\n </button>\n <button\n type=\"button\"\n (click)=\"viewMeridiem.set('PM')\"\n class=\"px-3 py-1 text-xs font-medium rounded-full transition-colors\"\n [ngClass]=\"{\n '_shk-bg-primary _shk-text-white': viewMeridiem() === 'PM',\n '_shk-text-surface-500 hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]': viewMeridiem() !== 'PM'\n }\"\n >\n PM\n </button>\n </div>\n }\n\n <!-- Seconds selector (if enabled) -->\n @if (showSeconds()) {\n <div class=\"flex items-center justify-center gap-1 mt-2\">\n <span class=\"text-xs _shk-text-surface-400\">Seg:</span>\n <select\n class=\"px-2 py-1 text-xs _shk-bg-surface-50 dark:[background-color:var(--shk-surface-100)] _shk-border dark:[border-color:var(--shk-surface-200)] rounded-md\"\n [value]=\"viewSecond()\"\n (change)=\"onSecondChange($event)\"\n aria-label=\"Segundos\"\n >\n @for (seconds of secondsRange(); track seconds) {\n <option [value]=\"seconds\">{{ minutesLabel(seconds) }}</option>\n }\n </select>\n </div>\n }\n\n <!-- Confirm button -->\n <button\n type=\"button\"\n (click)=\"confirmTime()\"\n class=\"mt-3 w-full py-2 text-sm _shk-bg-primary _shk-text-white rounded-lg hover:[background-color:var(--shk-primary-700)] transition-colors\"\n >\n {{ timeOnly() ? 'Confirmar' : 'Introducir hora' }}\n </button>\n </div>\n }\n </div>\n }\n </div>\n\n @if (shouldShowError()) {\n <div [id]=\"id() + '-error'\" class=\"mt-1 text-xs text-red-500 max-h-20 overflow-y-auto _shk-scrollbar\">\n <ul class=\"list-disc pl-4 space-y-1\">\n @for (error of getErrorMessages(); track error) {\n <li>{{ error }}</li>\n }\n </ul>\n </div>\n }\n</div>\n", styles: [".clock-container{position:relative;width:200px;height:200px;margin:0 auto}.clock-face{width:100%;height:100%;border-radius:50%;border:2px solid var(--shk-surface-200);position:relative;background-color:var(--shk-surface-50)}.dark .clock-face{border-color:var(--shk-surface-200);background-color:var(--shk-surface-100)}.clock-number{position:absolute;width:32px;height:32px;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:500;border-radius:50%;transform:translate(-50%,-50%);cursor:pointer;transition:background-color .15s,color .15s;-webkit-user-select:none;user-select:none;color:var(--shk-surface-700)}.dark .clock-number{color:var(--shk-surface-700)}.clock-number:hover{background-color:var(--shk-surface-100)}.dark .clock-number:hover{background-color:var(--shk-surface-200)}.clock-number.selected{background-color:var(--shk-primary-500);color:#fff}.clock-number.current{font-weight:700}.clock-hand{position:absolute;bottom:50%;left:50%;width:2px;background-color:var(--shk-primary-500);transform-origin:bottom center;border-radius:1px;pointer-events:none;transition:transform .2s ease-out}.clock-center{position:absolute;top:50%;left:50%;width:8px;height:8px;border-radius:50%;background-color:var(--shk-primary-500);transform:translate(-50%,-50%);pointer-events:none;z-index:2}.clock-minute-marker{position:absolute;width:1px;height:8px;background-color:var(--shk-surface-300);top:6px;left:50%;transform-origin:center 94px}.dark .clock-minute-marker{background-color:var(--shk-surface-400)}.clock-minute-marker.major{width:2px;height:12px;background-color:var(--shk-surface-400)}.dark .clock-minute-marker.major{background-color:var(--shk-surface-500)}.clock-mode-toggle{display:flex;align-items:center;justify-content:center;gap:.5rem;margin-top:.75rem}.clock-mode-btn{padding:.25rem .75rem;font-size:.75rem;font-weight:500;border-radius:9999px;cursor:pointer;transition:background-color .15s,color .15s;border:none;background:transparent;color:var(--shk-surface-500)}.dark .clock-mode-btn{color:var(--shk-surface-400)}.clock-mode-btn.active{background-color:var(--shk-primary-500);color:#fff}.clock-mode-btn:hover:not(.active){background-color:var(--shk-surface-100)}.dark .clock-mode-btn:hover:not(.active){background-color:var(--shk-surface-200)}.date-input-field{width:100%;padding:.5rem 2.5rem .5rem .75rem;font-size:.875rem;border-radius:.5rem;outline:none;transition:border-color .15s,box-shadow .15s;background-color:var(--shk-surface-50);color:var(--shk-surface-700);border:1px solid var(--shk-surface-200)}.dark .date-input-field{background-color:var(--shk-surface-100);color:var(--shk-surface-700);border-color:var(--shk-surface-200)}.date-input-field::placeholder{color:var(--shk-surface-400)}.dark .date-input-field::placeholder{color:var(--shk-surface-400)}.date-input-field:focus{border-color:var(--shk-primary-500);box-shadow:0 0 0 1px var(--shk-primary-500)}.date-input-field:disabled{opacity:.5;cursor:not-allowed}.date-input-field.input-error{border-color:#ef4444}.date-input-field.input-error:focus{border-color:#ef4444;box-shadow:0 0 0 1px #ef4444}.date-input-field.input-valid{border-color:#22c55e}.date-input-field.input-valid:focus{border-color:#22c55e;box-shadow:0 0 0 1px #22c55e}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
937
1018
|
}
|
|
938
1019
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: DatePickerComponent, decorators: [{
|
|
939
1020
|
type: Component,
|
|
@@ -943,8 +1024,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImpo
|
|
|
943
1024
|
useExisting: forwardRef(() => DatePickerComponent),
|
|
944
1025
|
multi: true,
|
|
945
1026
|
},
|
|
946
|
-
], template: "<div class=\"relative mb-4\">\n @if (label()) {\n <div class=\"text-sm font-medium _shk-text-surface-700 dark:[color:var(--shk-surface-600)] mb-1\">\n {{ label() }}\n </div>\n }\n\n <div class=\"relative\">\n <div class=\"relative\">\n <input\n [id]=\"id()\"\n type=\"text\"\n [disabled]=\"isDisabled()\"\n [placeholder]=\"inputPlaceholder()\"\n [value]=\"isTyping() ? typedValue() : displayLabel()\"\n (input)=\"onInputText($event)\"\n (focus)=\"onInputFocus()\"\n (blur)=\"onInputBlur()\"\n (keydown.enter)=\"$any($event.target).blur()\"\n (keydown.escape)=\"cancelTyping()\"\n (click)=\"toggle()\"\n class=\"date-input-field\"\n [ngClass]=\"{\n 'input-error': shouldShowError() || typingValid() === false,\n 'input-valid': wasFixedError() || typingValid() === true,\n }\"\n [attr.aria-invalid]=\"shouldShowError()\"\n [attr.aria-describedby]=\"shouldShowError() ? id() + '-error' : null\"\n />\n <button\n type=\"button\"\n [disabled]=\"isDisabled()\"\n (click)=\"toggle()\"\n class=\"absolute right-2 top-1/2 -translate-y-1/2 p-1 _shk-text-surface-400 dark:[color:var(--shk-surface-400)] hover:[color:var(--shk-surface-600)] dark:hover:[color:var(--shk-surface-300)] transition-colors\"\n >\n <svg\n class=\"w-4 h-4\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n >\n <rect x=\"3\" y=\"4\" width=\"18\" height=\"18\" rx=\"2\"></rect>\n <path d=\"M16 2v4M8 2v4M3 10h18\"></path>\n </svg>\n </button>\n </div>\n\n @if (isOpen()) {\n <div class=\"fixed inset-0 z-40 bg-black/30\" (click)=\"close()\"></div>\n <div\n class=\"fixed z-50 top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-72 p-4 bg-white dark:[background-color:var(--shk-surface-100)] _shk-border dark:[border-color:var(--shk-surface-200)] rounded-lg shadow-xl\"\n (click)=\"$event.stopPropagation()\"\n >\n <!-- DATE VIEW -->\n @if (!timeOnly() && currentView() === 'date') {\n <div class=\"flex items-center justify-between mb-3\">\n <button\n type=\"button\"\n (click)=\"drillUp()\"\n class=\"p-1 rounded hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]\"\n >\n <svg class=\"w-4 h-4\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M15 18l-6-6 6-6\"></path>\n </svg>\n </button>\n <span class=\"text-sm font-medium _shk-text-surface-700 dark:[color:var(--shk-surface-600)]\">\n {{ monthNames()[viewMonth()] }} {{ selectedYearValue() ?? viewYear() }}\n </span>\n <button\n type=\"button\"\n (click)=\"drillToInitial()\"\n class=\"p-1 rounded hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]\"\n >\n <svg class=\"w-4 h-4\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M9 18l6-6-6-6\"></path>\n </svg>\n </button>\n </div>\n\n <div class=\"grid grid-cols-7 gap-0 mb-1\">\n @for (name of dayNames(); track $index) {\n <div class=\"text-center text-xs font-medium _shk-text-surface-400 dark:[color:var(--shk-surface-400)] py-1\">\n {{ name }}\n </div>\n }\n </div>\n\n <div class=\"grid grid-cols-7 gap-0\">\n @for (day of calendarDays(); track $index) {\n @if (day !== null) {\n <button\n type=\"button\"\n (click)=\"selectDay(day)\"\n class=\"py-1.5 text-sm rounded transition-colors\"\n [ngClass]=\"{\n '_shk-bg-primary _shk-text-white hover:[background-color:var(--shk-primary-700)]': isSelectedDay(day),\n 'ring-1 [--tw-ring-color:var(--shk-primary-500)] _shk-text-surface-700 dark:[color:var(--shk-surface-700)]': isToday(day) && !isSelectedDay(day),\n '_shk-text-surface-700 dark:[color:var(--shk-surface-700)] hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]': !isSelectedDay(day) && !isToday(day),\n }\"\n >\n {{ day }}\n </button>\n } @else {\n <div></div>\n }\n }\n </div>\n }\n\n <!-- MONTH VIEW -->\n @if (!timeOnly() && currentView() === 'month') {\n <div class=\"flex items-center justify-between mb-3\">\n <button\n type=\"button\"\n (click)=\"drillUp()\"\n class=\"p-1 rounded hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]\"\n >\n <svg class=\"w-4 h-4\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M15 18l-6-6 6-6\"></path>\n </svg>\n </button>\n <span class=\"text-sm font-medium _shk-text-surface-700 dark:[color:var(--shk-surface-600)]\">\n {{ selectedYearValue() ?? viewYear() }}\n </span>\n <button\n type=\"button\"\n (click)=\"drillToInitial()\"\n class=\"p-1 rounded hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]\"\n >\n <svg class=\"w-4 h-4\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M9 18l6-6-6-6\"></path>\n </svg>\n </button>\n </div>\n\n <div class=\"grid grid-cols-3 gap-1\">\n @for (name of monthNames(); track $index) {\n <button\n type=\"button\"\n (click)=\"selectMonth($index)\"\n class=\"py-2 text-sm rounded transition-colors\"\n [ngClass]=\"{\n '_shk-bg-primary _shk-text-white hover:[background-color:var(--shk-primary-700)]': selectedMonthValue() === $index,\n 'ring-1 [--tw-ring-color:var(--shk-primary-500)] _shk-text-surface-700 dark:[color:var(--shk-surface-700)]': isCurrentMonth($index) && selectedMonthValue() !== $index,\n '_shk-text-surface-700 dark:[color:var(--shk-surface-700)] hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]': selectedMonthValue() !== $index && !isCurrentMonth($index),\n }\"\n >\n {{ name }}\n </button>\n }\n </div>\n }\n\n <!-- YEAR VIEW -->\n @if (!timeOnly() && currentView() === 'year') {\n <div class=\"flex items-center justify-between mb-3\">\n <button\n type=\"button\"\n (click)=\"prev()\"\n [disabled]=\"!canGoPrev()\"\n class=\"p-1 rounded hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)] disabled:opacity-30 disabled:cursor-not-allowed\"\n >\n <svg class=\"w-4 h-4\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M15 18l-6-6 6-6\"></path>\n </svg>\n </button>\n <span class=\"text-sm font-medium _shk-text-surface-700 dark:[color:var(--shk-surface-600)]\">\n {{ viewDecade() }} - {{ viewDecade() + 11 }}\n </span>\n <button\n type=\"button\"\n (click)=\"next()\"\n [disabled]=\"!canGoNext()\"\n class=\"p-1 rounded hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)] disabled:opacity-30 disabled:cursor-not-allowed\"\n >\n <svg class=\"w-4 h-4\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M9 18l6-6-6-6\"></path>\n </svg>\n </button>\n </div>\n\n <div class=\"grid grid-cols-3 gap-1\">\n @for (year of decadeYears(); track year) {\n <button\n type=\"button\"\n (click)=\"selectYear(year)\"\n class=\"py-2 text-sm rounded transition-colors\"\n [ngClass]=\"{\n '_shk-bg-primary _shk-text-white hover:[background-color:var(--shk-primary-700)]': selectedYearValue() === year,\n 'ring-1 [--tw-ring-color:var(--shk-primary-500)] _shk-text-surface-700 dark:[color:var(--shk-surface-700)]': isCurrentYear(year) && selectedYearValue() !== year,\n '_shk-text-surface-700 dark:[color:var(--shk-surface-700)] hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]': selectedYearValue() !== year && !isCurrentYear(year),\n }\"\n >\n {{ year }}\n </button>\n }\n </div>\n }\n\n <!-- ANALOG CLOCK TIME PICKER -->\n @if (timeOnly() || showTime()) {\n <div class=\"mt-3 pt-3 _shk-border dark:[border-color:var(--shk-surface-200)]\">\n <!-- Clock display time -->\n <div class=\"text-center mb-2\">\n <span class=\"text-lg font-semibold _shk-text-surface-700 dark:[color:var(--shk-surface-700)]\">\n {{ clockDisplayTime() }}\n </span>\n </div>\n\n <!-- Analog clock face -->\n <div class=\"clock-container\">\n <svg\n viewBox=\"0 0 200 200\"\n class=\"w-full h-full cursor-pointer\"\n (click)=\"onClockClick($event, clockMode())\"\n >\n <!-- Clock face background -->\n <circle cx=\"100\" cy=\"100\" r=\"96\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1\"\n class=\"_shk-text-surface-200 dark:[color:var(--shk-surface-200)]\" />\n\n <!-- Minute markers -->\n @if (clockMode() === 'minutes') {\n @for (i of [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59]; track i) {\n <line\n [attr.x1]=\"clockMinuteMarker(i).x1\"\n [attr.y1]=\"clockMinuteMarker(i).y1\"\n [attr.x2]=\"clockMinuteMarker(i).x2\"\n [attr.y2]=\"clockMinuteMarker(i).y2\"\n [attr.stroke-width]=\"i % 5 === 0 ? 2 : 1\"\n [class]=\"i % 5 === 0 ? '_shk-text-surface-500 dark:[color:var(--shk-surface-500)]' : '_shk-text-surface-300 dark:[color:var(--shk-surface-400)]'\"\n stroke=\"currentColor\"\n />\n }\n <!-- Minute numbers (00, 05, 10, ...) -->\n @for (m of [0,5,10,15,20,25,30,35,40,45,50,55]; track m) {\n <text\n [attr.x]=\"clockMinutePos(m).x\"\n [attr.y]=\"clockMinutePos(m).y\"\n text-anchor=\"middle\"\n dominant-baseline=\"central\"\n class=\"text-[9px] _shk-text-surface-500 dark:[color:var(--shk-surface-400)]\"\n [class._shk-text-primary]=\"viewMinute() === m\"\n >\n {{ m.toString().padStart(2, '0') }}\n </text>\n }\n }\n\n <!-- Hour numbers -->\n @if (clockMode() === 'hours') {\n @for (h of clockHours(); track h) {\n <text\n [attr.x]=\"clockNumberPos(h).x\"\n [attr.y]=\"clockNumberPos(h).y\"\n text-anchor=\"middle\"\n dominant-baseline=\"central\"\n class=\"text-sm font-medium\"\n [class._shk-text-primary]=\"isClockHourSelected(h)\"\n [class._shk-text-surface-700]=\"!isClockHourSelected(h)\"\n >\n {{ h }}\n </text>\n }\n }\n\n <!-- Clock hand -->\n <line\n x1=\"100\" y1=\"100\"\n [attr.x2]=\"clockHandLine(60).x2\"\n [attr.y2]=\"clockHandLine(60).y2\"\n class=\"_shk-text-primary\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n\n <!-- Center dot -->\n <circle cx=\"100\" cy=\"100\" r=\"4\" class=\"fill-current _shk-text-primary\" />\n </svg>\n </div>\n\n <!-- Mode toggle: Hours / Minutes -->\n <div class=\"clock-mode-toggle\">\n <button\n type=\"button\"\n (click)=\"clockMode.set('hours')\"\n class=\"clock-mode-btn\"\n [class.active]=\"clockMode() === 'hours'\"\n >\n {{ 'Horas' }}\n </button>\n <button\n type=\"button\"\n (click)=\"clockMode.set('minutes')\"\n class=\"clock-mode-btn\"\n [class.active]=\"clockMode() === 'minutes'\"\n >\n {{ 'Minutos' }}\n </button>\n </div>\n\n <!-- AM/PM toggle for 12h format -->\n @if (hourFormat() === '12') {\n <div class=\"flex items-center justify-center gap-2 mt-2\">\n <button\n type=\"button\"\n (click)=\"viewMeridiem.set('AM')\"\n class=\"px-3 py-1 text-xs font-medium rounded-full transition-colors\"\n [ngClass]=\"{\n '_shk-bg-primary _shk-text-white': viewMeridiem() === 'AM',\n '_shk-text-surface-500 hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]': viewMeridiem() !== 'AM'\n }\"\n >\n AM\n </button>\n <button\n type=\"button\"\n (click)=\"viewMeridiem.set('PM')\"\n class=\"px-3 py-1 text-xs font-medium rounded-full transition-colors\"\n [ngClass]=\"{\n '_shk-bg-primary _shk-text-white': viewMeridiem() === 'PM',\n '_shk-text-surface-500 hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]': viewMeridiem() !== 'PM'\n }\"\n >\n PM\n </button>\n </div>\n }\n\n <!-- Seconds selector (if enabled) -->\n @if (showSeconds()) {\n <div class=\"flex items-center justify-center gap-1 mt-2\">\n <span class=\"text-xs _shk-text-surface-400\">Seg:</span>\n <select\n class=\"px-2 py-1 text-xs _shk-bg-surface-50 dark:[background-color:var(--shk-surface-100)] _shk-border dark:[border-color:var(--shk-surface-200)] rounded-md\"\n [value]=\"viewSecond()\"\n (change)=\"onSecondChange($event)\"\n aria-label=\"Segundos\"\n >\n @for (seconds of secondsRange(); track seconds) {\n <option [value]=\"seconds\">{{ minutesLabel(seconds) }}</option>\n }\n </select>\n </div>\n }\n\n <!-- Confirm button -->\n <button\n type=\"button\"\n (click)=\"confirmTime()\"\n class=\"mt-3 w-full py-2 text-sm _shk-bg-primary _shk-text-white rounded-lg hover:[background-color:var(--shk-primary-700)] transition-colors\"\n >\n {{ timeOnly() ? 'Confirmar' : 'Introducir hora' }}\n </button>\n </div>\n }\n </div>\n }\n </div>\n\n @if (shouldShowError()) {\n <div [id]=\"id() + '-error'\" class=\"mt-1 text-xs text-red-500 max-h-20 overflow-y-auto _shk-scrollbar\">\n <ul class=\"list-disc pl-4 space-y-1\">\n @for (error of getErrorMessages(); track error) {\n <li>{{ error }}</li>\n }\n </ul>\n </div>\n }\n</div>\n", styles: [".clock-container{position:relative;width:200px;height:200px;margin:0 auto}.clock-face{width:100%;height:100%;border-radius:50%;border:2px solid var(--shk-surface-200);position:relative;background-color:var(--shk-surface-50)}.dark .clock-face{border-color:var(--shk-surface-200);background-color:var(--shk-surface-100)}.clock-number{position:absolute;width:32px;height:32px;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:500;border-radius:50%;transform:translate(-50%,-50%);cursor:pointer;transition:background-color .15s,color .15s;-webkit-user-select:none;user-select:none;color:var(--shk-surface-700)}.dark .clock-number{color:var(--shk-surface-700)}.clock-number:hover{background-color:var(--shk-surface-100)}.dark .clock-number:hover{background-color:var(--shk-surface-200)}.clock-number.selected{background-color:var(--shk-primary-500);color:#fff}.clock-number.current{font-weight:700}.clock-hand{position:absolute;bottom:50%;left:50%;width:2px;background-color:var(--shk-primary-500);transform-origin:bottom center;border-radius:1px;pointer-events:none;transition:transform .2s ease-out}.clock-center{position:absolute;top:50%;left:50%;width:8px;height:8px;border-radius:50%;background-color:var(--shk-primary-500);transform:translate(-50%,-50%);pointer-events:none;z-index:2}.clock-minute-marker{position:absolute;width:1px;height:8px;background-color:var(--shk-surface-300);top:6px;left:50%;transform-origin:center 94px}.dark .clock-minute-marker{background-color:var(--shk-surface-400)}.clock-minute-marker.major{width:2px;height:12px;background-color:var(--shk-surface-400)}.dark .clock-minute-marker.major{background-color:var(--shk-surface-500)}.clock-mode-toggle{display:flex;align-items:center;justify-content:center;gap:.5rem;margin-top:.75rem}.clock-mode-btn{padding:.25rem .75rem;font-size:.75rem;font-weight:500;border-radius:9999px;cursor:pointer;transition:background-color .15s,color .15s;border:none;background:transparent;color:var(--shk-surface-500)}.dark .clock-mode-btn{color:var(--shk-surface-400)}.clock-mode-btn.active{background-color:var(--shk-primary-500);color:#fff}.clock-mode-btn:hover:not(.active){background-color:var(--shk-surface-100)}.dark .clock-mode-btn:hover:not(.active){background-color:var(--shk-surface-200)}.date-input-field{width:100%;padding:.5rem 2.5rem .5rem .75rem;font-size:.875rem;border-radius:.5rem;outline:none;transition:border-color .15s,box-shadow .15s;background-color:var(--shk-surface-50);color:var(--shk-surface-700);border:1px solid var(--shk-surface-200)}.dark .date-input-field{background-color:var(--shk-surface-100);color:var(--shk-surface-700);border-color:var(--shk-surface-200)}.date-input-field::placeholder{color:var(--shk-surface-400)}.dark .date-input-field::placeholder{color:var(--shk-surface-400)}.date-input-field:focus{border-color:var(--shk-primary-500);box-shadow:0 0 0 1px var(--shk-primary-500)}.date-input-field:disabled{opacity:.5;cursor:not-allowed}.date-input-field.input-error{border-color:#ef4444}.date-input-field.input-error:focus{border-color:#ef4444;box-shadow:0 0 0 1px #ef4444}.date-input-field.input-valid{border-color:#22c55e}.date-input-field.input-valid:focus{border-color:#22c55e;box-shadow:0 0 0 1px #22c55e}\n"] }]
|
|
947
|
-
}], ctorParameters: () => [], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], view: [{ type: i0.Input, args: [{ isSignal: true, alias: "view", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], formGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "formGroup", required: false }] }], control: [{ type: i0.Input, args: [{ isSignal: true, alias: "control", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], errorMessages: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessages", required: false }] }], minValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "minValue", required: false }] }], maxValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxValue", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], timeOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "timeOnly", required: false }] }], showTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "showTime", required: false }] }], hourFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "hourFormat", required: false }] }], showSeconds: [{ type: i0.Input, args: [{ isSignal: true, alias: "showSeconds", required: false }] }], minuteStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "minuteStep", required: false }] }], onDocumentClick: [{
|
|
1027
|
+
], template: "<div class=\"relative mb-4\">\n @if (label()) {\n <div class=\"text-sm font-medium _shk-text-surface-700 dark:[color:var(--shk-surface-600)] mb-1\">\n {{ label() }}\n </div>\n }\n\n <div class=\"relative\">\n <div class=\"relative\">\n <input\n [id]=\"id()\"\n type=\"text\"\n [disabled]=\"isDisabled()\"\n [placeholder]=\"inputPlaceholder()\"\n [value]=\"isTyping() ? typedValue() : displayLabel()\"\n (input)=\"onInputText($event)\"\n (focus)=\"onInputFocus()\"\n (blur)=\"onInputBlur()\"\n (keydown.enter)=\"$any($event.target).blur()\"\n (keydown.escape)=\"cancelTyping()\"\n (click)=\"toggle()\"\n class=\"date-input-field\"\n [ngClass]=\"{\n 'input-error': shouldShowError() || typingValid() === false,\n 'input-valid': wasFixedError() || typingValid() === true,\n }\"\n [attr.aria-invalid]=\"shouldShowError()\"\n [attr.aria-describedby]=\"shouldShowError() ? id() + '-error' : null\"\n />\n <button\n type=\"button\"\n [disabled]=\"isDisabled()\"\n (click)=\"toggle()\"\n class=\"absolute right-2 top-1/2 -translate-y-1/2 p-1 _shk-text-surface-400 dark:[color:var(--shk-surface-400)] hover:[color:var(--shk-surface-600)] dark:hover:[color:var(--shk-surface-300)] transition-colors\"\n >\n <svg\n class=\"w-4 h-4\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n >\n <rect x=\"3\" y=\"4\" width=\"18\" height=\"18\" rx=\"2\"></rect>\n <path d=\"M16 2v4M8 2v4M3 10h18\"></path>\n </svg>\n </button>\n </div>\n\n @if (isOpen()) {\n <div class=\"fixed inset-0 z-40 bg-black/30\" (click)=\"close()\"></div>\n <div\n class=\"fixed z-50 top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-72 p-4 bg-white dark:[background-color:var(--shk-surface-100)] _shk-border dark:[border-color:var(--shk-surface-200)] rounded-lg shadow-xl\"\n (click)=\"$event.stopPropagation()\"\n >\n <!-- DATE VIEW -->\n @if (!timeOnly() && currentView() === 'date') {\n <div class=\"flex items-center justify-between mb-3\">\n <button\n type=\"button\"\n (click)=\"drillUp()\"\n class=\"p-1 rounded hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]\"\n >\n <svg class=\"w-4 h-4\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M15 18l-6-6 6-6\"></path>\n </svg>\n </button>\n <span class=\"text-sm font-medium _shk-text-surface-700 dark:[color:var(--shk-surface-600)]\">\n {{ monthNames()[viewMonth()] }} {{ selectedYearValue() ?? viewYear() }}\n </span>\n <button\n type=\"button\"\n (click)=\"drillToInitial()\"\n class=\"p-1 rounded hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]\"\n >\n <svg class=\"w-4 h-4\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M9 18l6-6-6-6\"></path>\n </svg>\n </button>\n </div>\n\n <div class=\"grid grid-cols-7 gap-0 mb-1\">\n @for (name of dayNames(); track $index) {\n <div class=\"text-center text-xs font-medium _shk-text-surface-400 dark:[color:var(--shk-surface-400)] py-1\">\n {{ name }}\n </div>\n }\n </div>\n\n <div class=\"grid grid-cols-7 gap-0\">\n @for (day of calendarDays(); track $index) {\n @if (day !== null) {\n <button\n type=\"button\"\n (click)=\"selectDay(day)\"\n class=\"py-1.5 text-sm rounded transition-colors\"\n [ngClass]=\"{\n '_shk-bg-primary _shk-text-white hover:[background-color:var(--shk-primary-700)]': isSelectedDay(day),\n 'ring-1 [--tw-ring-color:var(--shk-primary-500)] _shk-text-surface-700 dark:[color:var(--shk-surface-700)]': isToday(day) && !isSelectedDay(day),\n '_shk-text-surface-700 dark:[color:var(--shk-surface-700)] hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]': !isSelectedDay(day) && !isToday(day),\n }\"\n >\n {{ day }}\n </button>\n } @else {\n <div></div>\n }\n }\n </div>\n }\n\n <!-- WEEK VIEW -->\n @if (!timeOnly() && currentView() === 'week') {\n <div class=\"flex items-center justify-between mb-3\">\n <button\n type=\"button\"\n (click)=\"prev()\"\n [disabled]=\"!canGoPrev()\"\n class=\"p-1 rounded hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)] disabled:opacity-30 disabled:cursor-not-allowed\"\n >\n <svg class=\"w-4 h-4\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M15 18l-6-6 6-6\"></path>\n </svg>\n </button>\n <span class=\"text-sm font-medium _shk-text-surface-700 dark:[color:var(--shk-surface-600)]\">\n {{ monthNames()[viewMonth()] }} {{ viewYear() }}\n </span>\n <button\n type=\"button\"\n (click)=\"next()\"\n [disabled]=\"!canGoNext()\"\n class=\"p-1 rounded hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)] disabled:opacity-30 disabled:cursor-not-allowed\"\n >\n <svg class=\"w-4 h-4\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M9 18l6-6-6-6\"></path>\n </svg>\n </button>\n </div>\n\n <div class=\"space-y-1\">\n @for (week of monthWeeks(); track week.index) {\n <button\n type=\"button\"\n (click)=\"selectWeek(week.start)\"\n class=\"w-full flex items-center justify-between py-1.5 px-2 text-sm rounded transition-colors\"\n [ngClass]=\"{\n '_shk-bg-primary _shk-text-white hover:[background-color:var(--shk-primary-700)]': isSelectedWeek(week.start),\n 'ring-1 [--tw-ring-color:var(--shk-primary-500)] _shk-text-surface-700 dark:[color:var(--shk-surface-700)]': isCurrentWeek(week.start) && !isSelectedWeek(week.start),\n '_shk-text-surface-700 dark:[color:var(--shk-surface-700)] hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]': !isSelectedWeek(week.start) && !isCurrentWeek(week.start),\n }\"\n >\n <span class=\"font-medium\">{{ weekLabel(week.index) }}</span>\n <span class=\"text-xs opacity-80\">{{ week.range }}</span>\n </button>\n }\n </div>\n }\n\n <!-- MONTH VIEW -->\n @if (!timeOnly() && currentView() === 'month') {\n <div class=\"flex items-center justify-between mb-3\">\n <button\n type=\"button\"\n (click)=\"drillUp()\"\n class=\"p-1 rounded hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]\"\n >\n <svg class=\"w-4 h-4\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M15 18l-6-6 6-6\"></path>\n </svg>\n </button>\n <span class=\"text-sm font-medium _shk-text-surface-700 dark:[color:var(--shk-surface-600)]\">\n {{ selectedYearValue() ?? viewYear() }}\n </span>\n <button\n type=\"button\"\n (click)=\"drillToInitial()\"\n class=\"p-1 rounded hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]\"\n >\n <svg class=\"w-4 h-4\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M9 18l6-6-6-6\"></path>\n </svg>\n </button>\n </div>\n\n <div class=\"grid grid-cols-3 gap-1\">\n @for (name of monthNames(); track $index) {\n <button\n type=\"button\"\n (click)=\"selectMonth($index)\"\n class=\"py-2 text-sm rounded transition-colors\"\n [ngClass]=\"{\n '_shk-bg-primary _shk-text-white hover:[background-color:var(--shk-primary-700)]': selectedMonthValue() === $index,\n 'ring-1 [--tw-ring-color:var(--shk-primary-500)] _shk-text-surface-700 dark:[color:var(--shk-surface-700)]': isCurrentMonth($index) && selectedMonthValue() !== $index,\n '_shk-text-surface-700 dark:[color:var(--shk-surface-700)] hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]': selectedMonthValue() !== $index && !isCurrentMonth($index),\n }\"\n >\n {{ name }}\n </button>\n }\n </div>\n }\n\n <!-- YEAR VIEW -->\n @if (!timeOnly() && currentView() === 'year') {\n <div class=\"flex items-center justify-between mb-3\">\n <button\n type=\"button\"\n (click)=\"prev()\"\n [disabled]=\"!canGoPrev()\"\n class=\"p-1 rounded hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)] disabled:opacity-30 disabled:cursor-not-allowed\"\n >\n <svg class=\"w-4 h-4\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M15 18l-6-6 6-6\"></path>\n </svg>\n </button>\n <span class=\"text-sm font-medium _shk-text-surface-700 dark:[color:var(--shk-surface-600)]\">\n {{ viewDecade() }} - {{ viewDecade() + 11 }}\n </span>\n <button\n type=\"button\"\n (click)=\"next()\"\n [disabled]=\"!canGoNext()\"\n class=\"p-1 rounded hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)] disabled:opacity-30 disabled:cursor-not-allowed\"\n >\n <svg class=\"w-4 h-4\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M9 18l6-6-6-6\"></path>\n </svg>\n </button>\n </div>\n\n <div class=\"grid grid-cols-3 gap-1\">\n @for (year of decadeYears(); track year) {\n <button\n type=\"button\"\n (click)=\"selectYear(year)\"\n class=\"py-2 text-sm rounded transition-colors\"\n [ngClass]=\"{\n '_shk-bg-primary _shk-text-white hover:[background-color:var(--shk-primary-700)]': selectedYearValue() === year,\n 'ring-1 [--tw-ring-color:var(--shk-primary-500)] _shk-text-surface-700 dark:[color:var(--shk-surface-700)]': isCurrentYear(year) && selectedYearValue() !== year,\n '_shk-text-surface-700 dark:[color:var(--shk-surface-700)] hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]': selectedYearValue() !== year && !isCurrentYear(year),\n }\"\n >\n {{ year }}\n </button>\n }\n </div>\n }\n\n <!-- ANALOG CLOCK TIME PICKER -->\n @if (timeOnly() || showTime()) {\n <div class=\"mt-3 pt-3 _shk-border dark:[border-color:var(--shk-surface-200)]\">\n <!-- Clock display time -->\n <div class=\"text-center mb-2\">\n <span class=\"text-lg font-semibold _shk-text-surface-700 dark:[color:var(--shk-surface-700)]\">\n {{ clockDisplayTime() }}\n </span>\n </div>\n\n <!-- Analog clock face -->\n <div class=\"clock-container\">\n <svg\n viewBox=\"0 0 200 200\"\n class=\"w-full h-full cursor-pointer\"\n (click)=\"onClockClick($event, clockMode())\"\n >\n <!-- Clock face background -->\n <circle cx=\"100\" cy=\"100\" r=\"96\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1\"\n class=\"_shk-text-surface-200 dark:[color:var(--shk-surface-200)]\" />\n\n <!-- Minute markers -->\n @if (clockMode() === 'minutes') {\n @for (i of [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59]; track i) {\n <line\n [attr.x1]=\"clockMinuteMarker(i).x1\"\n [attr.y1]=\"clockMinuteMarker(i).y1\"\n [attr.x2]=\"clockMinuteMarker(i).x2\"\n [attr.y2]=\"clockMinuteMarker(i).y2\"\n [attr.stroke-width]=\"i % 5 === 0 ? 2 : 1\"\n [class]=\"i % 5 === 0 ? '_shk-text-surface-500 dark:[color:var(--shk-surface-500)]' : '_shk-text-surface-300 dark:[color:var(--shk-surface-400)]'\"\n stroke=\"currentColor\"\n />\n }\n <!-- Minute numbers (00, 05, 10, ...) -->\n @for (m of [0,5,10,15,20,25,30,35,40,45,50,55]; track m) {\n <text\n [attr.x]=\"clockMinutePos(m).x\"\n [attr.y]=\"clockMinutePos(m).y\"\n text-anchor=\"middle\"\n dominant-baseline=\"central\"\n class=\"text-[9px] _shk-text-surface-500 dark:[color:var(--shk-surface-400)]\"\n [class._shk-text-primary]=\"viewMinute() === m\"\n >\n {{ m.toString().padStart(2, '0') }}\n </text>\n }\n }\n\n <!-- Hour numbers -->\n @if (clockMode() === 'hours') {\n @for (h of clockHours(); track h) {\n <text\n [attr.x]=\"clockNumberPos(h).x\"\n [attr.y]=\"clockNumberPos(h).y\"\n text-anchor=\"middle\"\n dominant-baseline=\"central\"\n class=\"text-sm font-medium\"\n [class._shk-text-primary]=\"isClockHourSelected(h)\"\n [class._shk-text-surface-700]=\"!isClockHourSelected(h)\"\n >\n {{ h }}\n </text>\n }\n }\n\n <!-- Clock hand -->\n <line\n x1=\"100\" y1=\"100\"\n [attr.x2]=\"clockHandLine(60).x2\"\n [attr.y2]=\"clockHandLine(60).y2\"\n class=\"_shk-text-primary\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n\n <!-- Center dot -->\n <circle cx=\"100\" cy=\"100\" r=\"4\" class=\"fill-current _shk-text-primary\" />\n </svg>\n </div>\n\n <!-- Mode toggle: Hours / Minutes -->\n <div class=\"clock-mode-toggle\">\n <button\n type=\"button\"\n (click)=\"clockMode.set('hours')\"\n class=\"clock-mode-btn\"\n [class.active]=\"clockMode() === 'hours'\"\n >\n {{ 'Horas' }}\n </button>\n <button\n type=\"button\"\n (click)=\"clockMode.set('minutes')\"\n class=\"clock-mode-btn\"\n [class.active]=\"clockMode() === 'minutes'\"\n >\n {{ 'Minutos' }}\n </button>\n </div>\n\n <!-- AM/PM toggle for 12h format -->\n @if (hourFormat() === '12') {\n <div class=\"flex items-center justify-center gap-2 mt-2\">\n <button\n type=\"button\"\n (click)=\"viewMeridiem.set('AM')\"\n class=\"px-3 py-1 text-xs font-medium rounded-full transition-colors\"\n [ngClass]=\"{\n '_shk-bg-primary _shk-text-white': viewMeridiem() === 'AM',\n '_shk-text-surface-500 hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]': viewMeridiem() !== 'AM'\n }\"\n >\n AM\n </button>\n <button\n type=\"button\"\n (click)=\"viewMeridiem.set('PM')\"\n class=\"px-3 py-1 text-xs font-medium rounded-full transition-colors\"\n [ngClass]=\"{\n '_shk-bg-primary _shk-text-white': viewMeridiem() === 'PM',\n '_shk-text-surface-500 hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]': viewMeridiem() !== 'PM'\n }\"\n >\n PM\n </button>\n </div>\n }\n\n <!-- Seconds selector (if enabled) -->\n @if (showSeconds()) {\n <div class=\"flex items-center justify-center gap-1 mt-2\">\n <span class=\"text-xs _shk-text-surface-400\">Seg:</span>\n <select\n class=\"px-2 py-1 text-xs _shk-bg-surface-50 dark:[background-color:var(--shk-surface-100)] _shk-border dark:[border-color:var(--shk-surface-200)] rounded-md\"\n [value]=\"viewSecond()\"\n (change)=\"onSecondChange($event)\"\n aria-label=\"Segundos\"\n >\n @for (seconds of secondsRange(); track seconds) {\n <option [value]=\"seconds\">{{ minutesLabel(seconds) }}</option>\n }\n </select>\n </div>\n }\n\n <!-- Confirm button -->\n <button\n type=\"button\"\n (click)=\"confirmTime()\"\n class=\"mt-3 w-full py-2 text-sm _shk-bg-primary _shk-text-white rounded-lg hover:[background-color:var(--shk-primary-700)] transition-colors\"\n >\n {{ timeOnly() ? 'Confirmar' : 'Introducir hora' }}\n </button>\n </div>\n }\n </div>\n }\n </div>\n\n @if (shouldShowError()) {\n <div [id]=\"id() + '-error'\" class=\"mt-1 text-xs text-red-500 max-h-20 overflow-y-auto _shk-scrollbar\">\n <ul class=\"list-disc pl-4 space-y-1\">\n @for (error of getErrorMessages(); track error) {\n <li>{{ error }}</li>\n }\n </ul>\n </div>\n }\n</div>\n", styles: [".clock-container{position:relative;width:200px;height:200px;margin:0 auto}.clock-face{width:100%;height:100%;border-radius:50%;border:2px solid var(--shk-surface-200);position:relative;background-color:var(--shk-surface-50)}.dark .clock-face{border-color:var(--shk-surface-200);background-color:var(--shk-surface-100)}.clock-number{position:absolute;width:32px;height:32px;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:500;border-radius:50%;transform:translate(-50%,-50%);cursor:pointer;transition:background-color .15s,color .15s;-webkit-user-select:none;user-select:none;color:var(--shk-surface-700)}.dark .clock-number{color:var(--shk-surface-700)}.clock-number:hover{background-color:var(--shk-surface-100)}.dark .clock-number:hover{background-color:var(--shk-surface-200)}.clock-number.selected{background-color:var(--shk-primary-500);color:#fff}.clock-number.current{font-weight:700}.clock-hand{position:absolute;bottom:50%;left:50%;width:2px;background-color:var(--shk-primary-500);transform-origin:bottom center;border-radius:1px;pointer-events:none;transition:transform .2s ease-out}.clock-center{position:absolute;top:50%;left:50%;width:8px;height:8px;border-radius:50%;background-color:var(--shk-primary-500);transform:translate(-50%,-50%);pointer-events:none;z-index:2}.clock-minute-marker{position:absolute;width:1px;height:8px;background-color:var(--shk-surface-300);top:6px;left:50%;transform-origin:center 94px}.dark .clock-minute-marker{background-color:var(--shk-surface-400)}.clock-minute-marker.major{width:2px;height:12px;background-color:var(--shk-surface-400)}.dark .clock-minute-marker.major{background-color:var(--shk-surface-500)}.clock-mode-toggle{display:flex;align-items:center;justify-content:center;gap:.5rem;margin-top:.75rem}.clock-mode-btn{padding:.25rem .75rem;font-size:.75rem;font-weight:500;border-radius:9999px;cursor:pointer;transition:background-color .15s,color .15s;border:none;background:transparent;color:var(--shk-surface-500)}.dark .clock-mode-btn{color:var(--shk-surface-400)}.clock-mode-btn.active{background-color:var(--shk-primary-500);color:#fff}.clock-mode-btn:hover:not(.active){background-color:var(--shk-surface-100)}.dark .clock-mode-btn:hover:not(.active){background-color:var(--shk-surface-200)}.date-input-field{width:100%;padding:.5rem 2.5rem .5rem .75rem;font-size:.875rem;border-radius:.5rem;outline:none;transition:border-color .15s,box-shadow .15s;background-color:var(--shk-surface-50);color:var(--shk-surface-700);border:1px solid var(--shk-surface-200)}.dark .date-input-field{background-color:var(--shk-surface-100);color:var(--shk-surface-700);border-color:var(--shk-surface-200)}.date-input-field::placeholder{color:var(--shk-surface-400)}.dark .date-input-field::placeholder{color:var(--shk-surface-400)}.date-input-field:focus{border-color:var(--shk-primary-500);box-shadow:0 0 0 1px var(--shk-primary-500)}.date-input-field:disabled{opacity:.5;cursor:not-allowed}.date-input-field.input-error{border-color:#ef4444}.date-input-field.input-error:focus{border-color:#ef4444;box-shadow:0 0 0 1px #ef4444}.date-input-field.input-valid{border-color:#22c55e}.date-input-field.input-valid:focus{border-color:#22c55e;box-shadow:0 0 0 1px #22c55e}\n"] }]
|
|
1028
|
+
}], ctorParameters: () => [], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], view: [{ type: i0.Input, args: [{ isSignal: true, alias: "view", required: false }] }], weekStart: [{ type: i0.Input, args: [{ isSignal: true, alias: "weekStart", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], formGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "formGroup", required: false }] }], control: [{ type: i0.Input, args: [{ isSignal: true, alias: "control", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], errorMessages: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessages", required: false }] }], minValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "minValue", required: false }] }], maxValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxValue", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], timeOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "timeOnly", required: false }] }], showTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "showTime", required: false }] }], hourFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "hourFormat", required: false }] }], showSeconds: [{ type: i0.Input, args: [{ isSignal: true, alias: "showSeconds", required: false }] }], minuteStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "minuteStep", required: false }] }], onDocumentClick: [{
|
|
948
1029
|
type: HostListener,
|
|
949
1030
|
args: ['document:click', ['$event']]
|
|
950
1031
|
}], onEscape: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shirkasoft-ui-components-date-picker.mjs","sources":["../../../projects/ui-components/date-picker/date-picker.component.ts","../../../projects/ui-components/date-picker/date-picker.component.html","../../../projects/ui-components/date-picker/shirkasoft-ui-components-date-picker.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport {\n Component,\n ElementRef,\n DestroyRef,\n HostListener,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n computed,\n forwardRef,\n inject,\n input,\n signal,\n effect,\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n FormControl,\n FormGroup,\n NG_VALUE_ACCESSOR,\n ReactiveFormsModule,\n} from '@angular/forms';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { TranslocoService } from '@jsverse/transloco';\n\n/** Which granularity the picker edits: a day, a month or a year. */\nexport type DatePickerView = 'date' | 'month' | 'year';\n\n/** Which time selection mode the analog clock is in. */\nexport type ClockMode = 'hours' | 'minutes';\n\n/**\n * Shirkasoft UI Components.\n * Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).\n * Belongs to Shirkasoft.\n */\n\n/**\n * Date/time picker implemented as a ControlValueAccessor. Supports choosing a\n * day, month or year, optional time selection (with seconds/12-hour format),\n * min/max constraints and locale-aware labels.\n */\n@Component({\n selector: 'shk-date-picker',\n standalone: true,\n imports: [CommonModule, ReactiveFormsModule],\n templateUrl: './date-picker.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DatePickerComponent),\n multi: true,\n },\n ],\n styles: [\n `\n .clock-container {\n position: relative;\n width: 200px;\n height: 200px;\n margin: 0 auto;\n }\n .clock-face {\n width: 100%;\n height: 100%;\n border-radius: 50%;\n border: 2px solid var(--shk-surface-200);\n position: relative;\n background-color: var(--shk-surface-50);\n }\n .dark .clock-face {\n border-color: var(--shk-surface-200);\n background-color: var(--shk-surface-100);\n }\n .clock-number {\n position: absolute;\n width: 32px;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 12px;\n font-weight: 500;\n border-radius: 50%;\n transform: translate(-50%, -50%);\n cursor: pointer;\n transition: background-color 0.15s, color 0.15s;\n user-select: none;\n color: var(--shk-surface-700);\n }\n .dark .clock-number {\n color: var(--shk-surface-700);\n }\n .clock-number:hover {\n background-color: var(--shk-surface-100);\n }\n .dark .clock-number:hover {\n background-color: var(--shk-surface-200);\n }\n .clock-number.selected {\n background-color: var(--shk-primary-500);\n color: white;\n }\n .clock-number.current {\n font-weight: 700;\n }\n .clock-hand {\n position: absolute;\n bottom: 50%;\n left: 50%;\n width: 2px;\n background-color: var(--shk-primary-500);\n transform-origin: bottom center;\n border-radius: 1px;\n pointer-events: none;\n transition: transform 0.2s ease-out;\n }\n .clock-center {\n position: absolute;\n top: 50%;\n left: 50%;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background-color: var(--shk-primary-500);\n transform: translate(-50%, -50%);\n pointer-events: none;\n z-index: 2;\n }\n .clock-minute-marker {\n position: absolute;\n width: 1px;\n height: 8px;\n background-color: var(--shk-surface-300);\n top: 6px;\n left: 50%;\n transform-origin: center 94px;\n }\n .dark .clock-minute-marker {\n background-color: var(--shk-surface-400);\n }\n .clock-minute-marker.major {\n width: 2px;\n height: 12px;\n background-color: var(--shk-surface-400);\n }\n .dark .clock-minute-marker.major {\n background-color: var(--shk-surface-500);\n }\n .clock-mode-toggle {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n margin-top: 0.75rem;\n }\n .clock-mode-btn {\n padding: 0.25rem 0.75rem;\n font-size: 0.75rem;\n font-weight: 500;\n border-radius: 9999px;\n cursor: pointer;\n transition: background-color 0.15s, color 0.15s;\n border: none;\n background: transparent;\n color: var(--shk-surface-500);\n }\n .dark .clock-mode-btn {\n color: var(--shk-surface-400);\n }\n .clock-mode-btn.active {\n background-color: var(--shk-primary-500);\n color: white;\n }\n .clock-mode-btn:hover:not(.active) {\n background-color: var(--shk-surface-100);\n }\n .dark .clock-mode-btn:hover:not(.active) {\n background-color: var(--shk-surface-200);\n }\n .date-input-field {\n width: 100%;\n padding: 0.5rem 0.75rem;\n padding-right: 2.5rem;\n font-size: 0.875rem;\n border-radius: 0.5rem;\n outline: none;\n transition: border-color 0.15s, box-shadow 0.15s;\n background-color: var(--shk-surface-50);\n color: var(--shk-surface-700);\n border: 1px solid var(--shk-surface-200);\n }\n .dark .date-input-field {\n background-color: var(--shk-surface-100);\n color: var(--shk-surface-700);\n border-color: var(--shk-surface-200);\n }\n .date-input-field::placeholder {\n color: var(--shk-surface-400);\n }\n .dark .date-input-field::placeholder {\n color: var(--shk-surface-400);\n }\n .date-input-field:focus {\n border-color: var(--shk-primary-500);\n box-shadow: 0 0 0 1px var(--shk-primary-500);\n }\n .date-input-field:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n .date-input-field.input-error {\n border-color: #ef4444;\n }\n .date-input-field.input-error:focus {\n border-color: #ef4444;\n box-shadow: 0 0 0 1px #ef4444;\n }\n .date-input-field.input-valid {\n border-color: #22c55e;\n }\n .date-input-field.input-valid:focus {\n border-color: #22c55e;\n box-shadow: 0 0 0 1px #22c55e;\n }\n `,\n ],\n})\nexport class DatePickerComponent implements ControlValueAccessor {\n private elementRef = inject(ElementRef);\n private cdr = inject(ChangeDetectorRef);\n private destroyRef = inject(DestroyRef);\n private transloco = inject(TranslocoService);\n\n /** HTML id for the input (for label/for pairing). */\n id = input<string>('');\n /** Granularity of the picker ('date' | 'month' | 'year'). */\n view = input<DatePickerView>('date');\n /** Label shown above the input. */\n label = input<string>('');\n /** Placeholder of the input. */\n placeholder = input<string>('');\n /** FormGroup used to resolve the control from `label`. */\n formGroup = input<FormGroup | undefined>(undefined);\n /** Directly bound FormControl. */\n control = input<FormControl | undefined>(undefined);\n /** Disables the picker. */\n disabled = input<boolean>(false);\n /** Custom error message displayed (overrides translated ones). */\n errorMessage = input<string>('');\n /** Per-validation-key custom error messages. */\n errorMessages = input<{ [key: string]: string }>({});\n /** Minimum allowed date (YYYY-MM-DD) or year/month string. */\n minValue = input<string>('');\n /** Maximum allowed date (YYYY-MM-DD) or year/month string. */\n maxValue = input<string>('');\n /** Locale used for month/day names and formatted labels. */\n locale = input<string>('es');\n /** Edits only the time portion of the value. */\n timeOnly = input<boolean>(false);\n /** Shows the time selectors alongside the date. */\n showTime = input<boolean>(false);\n /** Hour format: '12' or '24'. */\n hourFormat = input<'12' | '24'>('24');\n /** Whether the seconds selector is shown. */\n showSeconds = input<boolean>(false);\n /** Step (in minutes) for the minute selector. */\n minuteStep = input<number>(1);\n\n /** Whether the dropdown calendar is open. */\n isOpen = signal(false);\n /** Year currently displayed in the calendar. */\n viewYear = signal(new Date().getFullYear());\n /** Month currently displayed in the calendar (0-based). */\n viewMonth = signal(new Date().getMonth());\n /** Starting year of the decade shown in year view. */\n viewDecade = signal(Math.floor(new Date().getFullYear() / 10) * 10);\n /** Hour selected in the time selectors. */\n viewHour = signal(0);\n /** Minute selected in the time selectors. */\n viewMinute = signal(0);\n /** Second selected in the time selectors. */\n viewSecond = signal(0);\n /** Meridiem selected in 12-hour format. */\n viewMeridiem = signal<'AM' | 'PM'>('AM');\n /** Date part selected but not yet committed until the time is confirmed. */\n private pendingDate = signal<string | null>(null);\n /** Selected year during the selection flow (year -> month -> day). */\n selectedYearValue = signal<number | null>(null);\n /** Selected month during the selection flow. */\n selectedMonthValue = signal<number | null>(null);\n\n /** Analog clock mode: 'hours' or 'minutes'. */\n clockMode = signal<ClockMode>('hours');\n /** Internal view state for drill-down navigation (separates from input `view`). */\n currentView = signal<DatePickerView>('year');\n /** Whether the user is typing in the input field. */\n isTyping = signal(false);\n /** The raw text being typed by the user. */\n typedValue = signal('');\n /** Whether the typed value is valid. */\n typingValid = signal<boolean | null>(null);\n\n /** Underlying value (mirrors the reactive control). */\n private _value = signal<string | null>(null);\n /** Disabled state coming from the reactive form infrastructure. */\n private _disabledState = signal<boolean>(false);\n /** Whether status subscriptions have been attached to the control. */\n private subscribed = signal(false);\n private valueSubscribed = signal(false);\n /** Counter used to recompute the error helpers reactively. */\n private errorTracker = signal(0);\n /** Whether an error was displayed at some point. */\n hadError = signal(false);\n\n /** ControlValueAccessor callbacks. */\n private onChange: (value: any) => void = () => {};\n private onTouched: () => void = () => {};\n\n /** Current value of the picker. */\n value = computed(() => this._value());\n\n /** Whether the picker is disabled (input or reactive form). */\n isDisabled = computed(() => this.disabled() || this._disabledState());\n\n /** Resolves the control from `control` input or `formGroup`+`label`. */\n actualControl = computed(() => {\n const ctrl = this.control();\n if (ctrl) return ctrl;\n const fg = this.formGroup();\n const lbl = this.label();\n if (fg && lbl) return fg.get(lbl) as FormControl;\n return undefined;\n });\n\n /** Whether the bound control should show its error message. */\n shouldShowError = computed(() => {\n this.errorTracker();\n const ctrl = this.actualControl();\n return ctrl?.invalid && (ctrl?.dirty || ctrl?.touched);\n });\n\n /** Whether an error was fixed (invalid before, now valid and touched). */\n wasFixedError = computed(() => {\n this.errorTracker();\n const ctrl = this.actualControl();\n return this.hadError() && ctrl?.valid && ctrl?.touched;\n });\n\n /** Validation error messages to display, custom or translated. */\n getErrorMessages = computed(() => {\n this.errorTracker();\n const customError = this.errorMessage();\n if (customError) return [customError];\n\n const ctrl = this.actualControl();\n if (!ctrl?.errors) return [];\n\n const customErrors = this.errorMessages();\n const t = this.transloco;\n\n return Object.keys(ctrl.errors).map((key) => {\n if (customErrors[key]) return customErrors[key];\n switch (key) {\n case 'required':\n return t.translate('validation.required');\n default:\n return t.translate('validation.invalid');\n }\n });\n });\n\n /** Date part displayed in the calendar (pending date or committed value). */\n displayedDate = computed(() => {\n if (this.timeOnly()) return null;\n const value = this.pendingDate();\n if (value) return value;\n const current = this._value();\n if (!current) return null;\n return this.datePartOf(current);\n });\n\n /** Human-readable label for the selected value in the input. */\n displayLabel = computed(() => {\n const value = this._value();\n if (!value) return '';\n\n if (this.timeOnly()) {\n return this.formatTimeFromValue(value);\n }\n\n const datePart = this.datePartOf(value);\n const timePart = value.includes('T') ? value.split('T')[1] : null;\n const v = this.view();\n\n let label: string;\n if (v === 'year') {\n label = datePart;\n } else if (v === 'month') {\n const [y, m] = datePart.split('-').map(Number);\n const fmt = new Intl.DateTimeFormat(this.locale(), {\n month: 'long',\n year: 'numeric',\n });\n label = fmt.format(new Date(y, m - 1, 1));\n label = label.charAt(0).toUpperCase() + label.slice(1);\n } else {\n const fmt = new Intl.DateTimeFormat(this.locale(), {\n dateStyle: 'long',\n });\n label = fmt.format(new Date(datePart + 'T12:00:00'));\n }\n\n if (this.showTime() && timePart) {\n label += ' ' + this.formatTimeFromValue(timePart);\n }\n return label;\n });\n\n /** Localized short month names for the year view. */\n monthNames = computed(() => {\n const fmt = new Intl.DateTimeFormat(this.locale(), { month: 'short' });\n return Array.from({ length: 12 }, (_, i) => {\n const name = fmt.format(new Date(2000, i, 1)).replace('.', '');\n return name.charAt(0).toUpperCase() + name.slice(1);\n });\n });\n\n /** Localized short weekday names for the calendar header. */\n dayNames = computed(() => {\n const fmt = new Intl.DateTimeFormat(this.locale(), { weekday: 'short' });\n return Array.from({ length: 7 }, (_, i) => {\n const name = fmt.format(new Date(2024, 0, i + 1));\n return name.charAt(0).toUpperCase() + name.slice(1, 3);\n });\n });\n\n /** Number of days in the currently viewed month. */\n daysInMonth = computed(() => {\n return new Date(this.viewYear(), this.viewMonth() + 1, 0).getDate();\n });\n\n /** Weekday index (0=Sunday) of the first day of the viewed month. */\n firstDayOfMonth = computed(() => {\n return new Date(this.viewYear(), this.viewMonth(), 1).getDay();\n });\n\n /** Calendar grid: nulls for leading blanks then the days of the month. */\n calendarDays = computed(() => {\n const totalDays = this.daysInMonth();\n const firstDay = this.firstDayOfMonth();\n const days: (number | null)[] = [];\n for (let i = 0; i < firstDay; i++) days.push(null);\n for (let i = 1; i <= totalDays; i++) days.push(i);\n return days;\n });\n\n /** Whether the prev navigation button is allowed by `minValue`. */\n canGoPrev = computed(() => {\n const v = this.currentView();\n const min = this.minValue();\n if (v === 'date') {\n if (!min) return true;\n const prev = new Date(this.viewYear(), this.viewMonth() - 1, 1);\n return prev >= new Date(min + 'T12:00:00');\n }\n if (v === 'month') {\n const minY = min ? Number(min.split('-')[0]) : undefined;\n return minY === undefined || this.viewYear() > minY;\n }\n // year view\n const minY = min ? Number(min.split('-')[0]) : undefined;\n return minY === undefined || this.viewYear() > minY;\n });\n\n /** Whether the next navigation button is allowed by `maxValue`. */\n canGoNext = computed(() => {\n const v = this.currentView();\n const max = this.maxValue();\n if (v === 'date') {\n if (!max) return true;\n const next = new Date(this.viewYear(), this.viewMonth() + 1, 1);\n return next <= new Date(max + 'T12:00:00');\n }\n if (v === 'month') {\n const maxY = max ? Number(max.split('-')[0]) : undefined;\n return maxY === undefined || this.viewYear() < maxY;\n }\n // year view\n const maxY = max ? Number(max.split('-')[0]) : undefined;\n return maxY === undefined || this.viewYear() < maxY;\n });\n\n /** Year of the displayed date, if any. */\n selectedYear = computed(() => {\n const value = this.displayedDate();\n return value ? Number(value.split('-')[0]) : null;\n });\n\n /** Month index (0-based) of the displayed date, if any. */\n selectedMonth = computed(() => {\n const value = this.displayedDate();\n return value ? Number(value.split('-')[1]) - 1 : null;\n });\n\n /** Day of the displayed date, if any (date view only). */\n selectedDay = computed(() => {\n const value = this.displayedDate();\n return value && this.view() === 'date' ? Number(value.split('-')[2]) : null;\n });\n\n /** 12 years of the viewed decade for the year view. */\n decadeYears = computed(() => {\n const start = this.viewDecade();\n return Array.from({ length: 12 }, (_, i) => start + i);\n });\n\n /** Angle (in degrees) of the analog clock hand based on current mode. */\n clockHandAngle = computed(() => {\n if (this.clockMode() === 'hours') {\n const h = this.viewHour();\n const display = this.hourFormat() === '12' ? h % 12 || 12 : h % 12 || 12;\n return (display % 12) * 30;\n }\n return this.viewMinute() * 6;\n });\n\n /** Hours to display on the analog clock face (1-12). */\n clockHours = computed(() => Array.from({ length: 12 }, (_, i) => i + 1));\n\n /** Minutes to display on the analog clock face (0-55, step 5). */\n clockMinutes = computed(() => Array.from({ length: 12 }, (_, i) => i * 5));\n\n /** The input format string based on locale. */\n inputFormat = computed(() => {\n const loc = this.locale();\n return loc === 'en' ? 'MM/DD/YYYY' : 'DD/MM/YYYY';\n });\n\n /** (Unused legacy placeholder) plain year list. */\n years: number[] = [];\n\n constructor() {\n // Attach error-state subscriptions to the validated control once found.\n effect(() => {\n const ctrl = this.actualControl();\n if (!ctrl) {\n this.subscribed.set(false);\n return;\n }\n if (this.subscribed()) return;\n\n if (ctrl.invalid && ctrl.touched) this.hadError.set(true);\n\n ctrl.statusChanges\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.errorTracker.update((v) => v + 1);\n if (ctrl.invalid && ctrl.touched) this.hadError.set(true);\n });\n\n this.subscribed.set(true);\n });\n\n // One-way sync from the reactive control to the internal value signal.\n effect(() => {\n const ctrl = this.actualControl();\n if (!ctrl) return;\n\n if (!this.valueSubscribed()) {\n this.writeValue(ctrl.value);\n\n ctrl.valueChanges\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((value) => {\n this.writeValue(value);\n });\n\n this.valueSubscribed.set(true);\n }\n });\n }\n\n /** Closes the dropdown when clicking outside the component. */\n @HostListener('document:click', ['$event'])\n onDocumentClick(event: MouseEvent): void {\n if (!this.isOpen()) return;\n if (!this.elementRef.nativeElement.contains(event.target)) {\n this.close();\n }\n }\n\n /** Closes the dropdown on Escape. */\n @HostListener('document:keydown.escape')\n onEscape(): void {\n this.close();\n }\n\n /** Opens/closes the dropdown, syncing the calendar to the current value. */\n toggle(): void {\n if (this.isDisabled()) return;\n if (this.isOpen()) {\n this.close();\n } else {\n this.syncViewToValue();\n this.currentView.set('year');\n this.selectedYearValue.set(null);\n this.selectedMonthValue.set(null);\n this.clockMode.set('hours');\n this.isTyping.set(false);\n this.isOpen.set(true);\n }\n }\n\n /** Aligns the calendar view signals with the current value (or today). */\n private syncViewToValue(): void {\n const val = this._value();\n const v = this.view();\n if (!val) {\n const now = new Date();\n this.viewYear.set(now.getFullYear());\n this.viewMonth.set(now.getMonth());\n this.viewDecade.set(Math.floor(now.getFullYear() / 10) * 10);\n this.viewHour.set(now.getHours());\n this.viewMinute.set(now.getMinutes());\n this.viewSecond.set(now.getSeconds());\n this.pendingDate.set(this.toISODate(now));\n return;\n }\n const datePart = this.datePartOf(val);\n const timePart = val.includes('T') ? val.split('T')[1] : undefined;\n if (v === 'year') {\n this.viewYear.set(Number(datePart));\n this.viewDecade.set(Math.floor(Number(datePart) / 10) * 10);\n } else if (v === 'month') {\n this.viewYear.set(Number(datePart.split('-')[0]));\n } else {\n const d = new Date(datePart + 'T12:00:00');\n this.viewYear.set(d.getFullYear());\n this.viewMonth.set(d.getMonth());\n }\n const time = timePart ?? (this.timeOnly() ? val : undefined);\n if (time) {\n const [h, m, ss] = time.split(':').map(Number);\n this.viewHour.set(h || 0);\n this.viewMinute.set(m || 0);\n this.viewSecond.set(ss || 0);\n if (this.hourFormat() === '12') {\n this.viewMeridiem.set(h >= 12 ? 'PM' : 'AM');\n }\n }\n this.pendingDate.set(datePart);\n }\n\n /** Closes the dropdown, marks the control as touched and refreshes errors. */\n close(): void {\n if (!this.isOpen()) return;\n this.isOpen.set(false);\n this.onTouched();\n const ctrl = this.actualControl();\n if (ctrl) ctrl.markAsTouched();\n this.errorTracker.update((v) => v + 1);\n if (ctrl?.invalid && ctrl?.touched) this.hadError.set(true);\n }\n\n /** Navigates the calendar to the previous year/month/decade. */\n prev(): void {\n const v = this.currentView();\n if (v === 'year') {\n this.viewDecade.update((d) => d - 12);\n this.viewYear.update((y) => y - 12);\n } else if (v === 'month') {\n this.viewYear.update((y) => y - 1);\n } else {\n this.viewMonth.update((m) => {\n if (m === 0) {\n this.viewYear.update((y) => y - 1);\n return 11;\n }\n return m - 1;\n });\n }\n }\n\n /** Navigates the calendar to the next year/month/decade. */\n next(): void {\n const v = this.currentView();\n if (v === 'year') {\n this.viewDecade.update((d) => d + 12);\n this.viewYear.update((y) => y + 12);\n } else if (v === 'month') {\n this.viewYear.update((y) => y + 1);\n } else {\n this.viewMonth.update((m) => {\n if (m === 11) {\n this.viewYear.update((y) => y + 1);\n return 0;\n }\n return m + 1;\n });\n }\n }\n\n /** Selects a year - stores it and navigates to month selection. */\n selectYear(year: number): void {\n this.selectedYearValue.set(year);\n this.viewYear.set(year);\n this.currentView.set('month');\n }\n\n /** Selects a month - stores it and navigates to day selection. */\n selectMonth(monthIndex: number): void {\n this.selectedMonthValue.set(monthIndex);\n this.viewMonth.set(monthIndex);\n this.currentView.set('date');\n }\n\n /** Selects a day - completes the date selection. */\n selectDay(day: number): void {\n const year = this.selectedYearValue() ?? this.viewYear();\n const month = this.selectedMonthValue() ?? this.viewMonth();\n const m = String(month + 1).padStart(2, '0');\n const d = String(day).padStart(2, '0');\n const value = `${year}-${m}-${d}`;\n if (this.showTime()) {\n this.pendingDate.set(value);\n return;\n }\n this.setValue(value);\n }\n\n /** Commits a value, updates the component, the control and the outputs. */\n private setValue(value: string, close = true): void {\n this._value.set(value);\n this.onChange(value);\n const ctrl = this.actualControl();\n if (ctrl) {\n ctrl.setValue(value);\n ctrl.markAsDirty();\n }\n if (close) this.close();\n }\n\n /** Confirms the selected time and commits the combined date+time value. */\n confirmTime(): void {\n const h = this.viewHour();\n const m = this.viewMinute();\n const s = this.viewSecond();\n let time = `${String(h).padStart(2, '0')}:${String(m).padStart(2, '0')}`;\n if (this.showSeconds()) time += `:${String(s).padStart(2, '0')}`;\n\n if (this.timeOnly()) {\n this.setValue(time);\n return;\n }\n\n const datePart =\n this.pendingDate() ??\n `${this.viewYear()}-${String(this.viewMonth() + 1).padStart(2, '0')}-01`;\n this.setValue(`${datePart}T${time}`);\n }\n\n /** Reads the hour selected in the time selector. */\n onHourChange(event: Event): void {\n this.viewHour.set(Number((event.target as HTMLSelectElement).value));\n }\n\n /** Reads the minute selected in the time selector. */\n onMinuteChange(event: Event): void {\n this.viewMinute.set(Number((event.target as HTMLSelectElement).value));\n }\n\n /** Reads the second selected in the time selector. */\n onSecondChange(event: Event): void {\n this.viewSecond.set(Number((event.target as HTMLSelectElement).value));\n }\n\n /** Current meridiem (\"AM\"/\"PM\") for the 12-hour format. */\n meridiem(): 'AM' | 'PM' {\n return this.viewMeridiem();\n }\n\n /** Reads the meridiem selected in the time selector. */\n onMeridiemChange(event: Event): void {\n this.viewMeridiem.set((event.target as HTMLSelectElement).value as 'AM' | 'PM');\n }\n\n /** Splits the date part from a full ISO \"date\" or \"dateTtime\" value. */\n private datePartOf(value: string): string {\n const i = value.indexOf('T');\n return i >= 0 ? value.slice(0, i) : value;\n }\n\n /** Formats a raw time string (\"HH:mm[:ss]\") using the configured format. */\n private formatTimeFromValue(time: string): string {\n const [h, m, ss] = time.split(':').map(Number);\n return this.formatTime(h || 0, m || 0, ss || 0);\n }\n\n /** Formats hour/minute/second according to hour format and seconds option. */\n private formatTime(h: number, m: number, s: number): string {\n if (this.hourFormat() === '12') {\n const h12 = h % 12 || 12;\n const suffix = h < 12 ? ' AM' : ' PM';\n return `${String(h12).padStart(2, '0')}:${String(m).padStart(2, '0')}${suffix}`;\n }\n let label = `${String(h).padStart(2, '0')}:${String(m).padStart(2, '0')}`;\n if (this.showSeconds()) label += `:${String(s).padStart(2, '0')}`;\n return label;\n }\n\n /** Formats a Date as a YYYY-MM-DD ISO string. */\n private toISODate(date: Date): string {\n return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(\n 2,\n '0',\n )}-${String(date.getDate()).padStart(2, '0')}`;\n }\n\n /** Whether the given day matches the currently selected date. */\n isSelectedDay(day: number): boolean {\n return (\n this.selectedYear() === this.viewYear() &&\n this.selectedMonth() === this.viewMonth() &&\n this.selectedDay() === day\n );\n }\n\n /** Hours available in the time selector ('12' maps to 0..11 or 12..23). */\n hoursRange(): number[] {\n if (this.hourFormat() === '12') {\n const oneToTwelve = Array.from({ length: 12 }, (_, i) => i + 1);\n return this.viewMeridiem() === 'PM'\n ? oneToTwelve.map((h) => (h === 12 ? 12 : h + 12))\n : oneToTwelve.map((h) => (h === 12 ? 0 : h));\n }\n return Array.from({ length: 24 }, (_, i) => i);\n }\n\n /** Minutes available in the time selector, stepped by `minuteStep`. */\n minutesRange(): number[] {\n const step = this.minuteStep();\n return Array.from({ length: Math.ceil(60 / step) }, (_, i) => i * step);\n }\n\n /** Seconds available in the time selector (0..59). */\n secondsRange(): number[] {\n return Array.from({ length: 60 }, (_, i) => i);\n }\n\n /** Formats an hour for display in the selector (12-hour aware). */\n hourDisplay(hour: number): string {\n if (this.hourFormat() === '12') {\n return String(hour % 12 || 12).padStart(2, '0');\n }\n return String(hour).padStart(2, '0');\n }\n\n /** Pads a minute value with a leading zero. */\n minutesLabel(value: number): string {\n return String(value).padStart(2, '0');\n }\n\n /** Returns the position (x, y) for a clock number at the given index (0-11). */\n getClockNumberPosition(index: number): { x: number; y: number } {\n const angle = (index * 30 - 90) * (Math.PI / 180);\n const radius = 76;\n const x = 100 + radius * Math.cos(angle);\n const y = 100 + radius * Math.sin(angle);\n return { x, y };\n }\n\n /** Returns the position (x, y) for a minute marker at the given index (0-59). */\n getMinuteMarkerPosition(index: number): { x: number; y: number; rotation: number } {\n const angle = (index * 6 - 90) * (Math.PI / 180);\n const radius = 88;\n const x = 100 + radius * Math.cos(angle);\n const y = 100 + radius * Math.sin(angle);\n return { x, y, rotation: index * 6 };\n }\n\n /** Handles click on the analog clock face. */\n onClockClick(event: MouseEvent, mode: 'hours' | 'minutes'): void {\n const target = event.currentTarget as HTMLElement;\n const rect = target.getBoundingClientRect();\n const centerX = rect.left + rect.width / 2;\n const centerY = rect.top + rect.height / 2;\n const dx = event.clientX - centerX;\n const dy = event.clientY - centerY;\n let angle = Math.atan2(dy, dx) * (180 / Math.PI) + 90;\n if (angle < 0) angle += 360;\n\n if (mode === 'hours') {\n let hour = Math.round(angle / 30) % 12;\n if (hour === 0) hour = 12;\n let actualHour = hour;\n if (this.hourFormat() === '12') {\n if (this.viewMeridiem() === 'PM' && hour !== 12) {\n actualHour = hour + 12;\n } else if (this.viewMeridiem() === 'AM' && hour === 12) {\n actualHour = 0;\n }\n } else {\n actualHour = hour === 12 ? 12 : hour;\n if (this.viewHour() >= 12 && hour !== 12) {\n actualHour = hour + 12;\n } else if (this.viewHour() < 12 && hour === 12) {\n actualHour = 12;\n }\n }\n this.viewHour.set(actualHour);\n this.clockMode.set('minutes');\n } else {\n const minute = Math.round(angle / 6) % 60;\n const stepped = Math.round(minute / this.minuteStep()) * this.minuteStep();\n this.viewMinute.set(stepped % 60);\n }\n }\n\n /** Switches the clock mode between hours and minutes. */\n toggleClockMode(): void {\n this.clockMode.update((m) => (m === 'hours' ? 'minutes' : 'hours'));\n }\n\n /** Whether the given hour number matches the current selection on the clock face. */\n isClockHourSelected(hour12: number): boolean {\n const h = this.viewHour();\n if (this.hourFormat() === '12') {\n const display = h % 12 || 12;\n return display === hour12;\n }\n const display = h % 12 || 12;\n return display === hour12;\n }\n\n /** Whether the given minute value matches the current selection. */\n isClockMinuteSelected(minute: number): boolean {\n return this.viewMinute() === minute;\n }\n\n /** Formats the clock display time for the header above the clock. */\n clockDisplayTime(): string {\n return this.formatTime(this.viewHour(), this.viewMinute(), this.viewSecond());\n }\n\n /** Returns SVG line coordinates for a clock hand from center to angle. */\n clockHandLine(length: number = 60): { x2: number; y2: number } {\n const angle = this.clockHandAngle();\n // clockHandAngle: 0=12h, 90=3h, 180=6h, 270=9h\n // SVG cos/sin: 0=3h, 90=6h, 180=9h, 270=12h → offset -90°\n const rad = ((angle - 90) * Math.PI) / 180;\n return {\n x2: 100 + length * Math.cos(rad),\n y2: 100 + length * Math.sin(rad),\n };\n }\n\n /** Returns SVG text position for a clock number at the given index (0-11). */\n clockNumberPos(index: number): { x: number; y: number } {\n const angle = ((index % 12) * 30 - 90) * (Math.PI / 180);\n return {\n x: 100 + 68 * Math.cos(angle),\n y: 100 + 68 * Math.sin(angle),\n };\n }\n\n /** Returns SVG text position for a minute label at the given minute (0-55). */\n clockMinutePos(minute: number): { x: number; y: number } {\n const angle = (minute * 6 - 90) * (Math.PI / 180);\n return {\n x: 100 + 68 * Math.cos(angle),\n y: 100 + 68 * Math.sin(angle),\n };\n }\n\n /** Returns SVG line coordinates for a minute marker. */\n clockMinuteMarker(i: number): { x1: number; y1: number; x2: number; y2: number } {\n const angle = (i * 6 - 90) * (Math.PI / 180);\n const outerR = 84;\n const innerR = i % 5 === 0 ? 78 : 82;\n return {\n x1: 100 + outerR * Math.cos(angle),\n y1: 100 + outerR * Math.sin(angle),\n x2: 100 + innerR * Math.cos(angle),\n y2: 100 + innerR * Math.sin(angle),\n };\n }\n\n /** Drills down from year view to month view for the selected year. */\n drillDownToMonth(year: number): void {\n this.selectedYearValue.set(year);\n this.viewYear.set(year);\n this.currentView.set('month');\n }\n\n /** Drills down from month view to date view for the selected month. */\n drillDownToDate(monthIndex: number): void {\n this.selectedMonthValue.set(monthIndex);\n this.viewMonth.set(monthIndex);\n this.currentView.set('date');\n }\n\n /** Goes back one level in drill-down navigation. */\n drillUp(): void {\n const v = this.currentView();\n if (v === 'date') {\n this.selectedMonthValue.set(null);\n this.currentView.set('month');\n } else if (v === 'month') {\n this.selectedYearValue.set(null);\n this.currentView.set('year');\n }\n }\n\n /** Returns to the initial view (year selection). */\n drillToInitial(): void {\n this.selectedYearValue.set(null);\n this.selectedMonthValue.set(null);\n this.currentView.set('year');\n }\n\n /** Formats input placeholder based on locale. */\n inputPlaceholder(): string {\n if (this.timeOnly()) return this.inputFormat();\n if (this.view() === 'year') return 'YYYY';\n if (this.view() === 'month') return 'MM/YYYY';\n return this.inputFormat();\n }\n\n /** Handles text input in the date field. */\n onInputText(event: Event): void {\n const value = (event.target as HTMLInputElement).value;\n this.typedValue.set(value);\n this.typingValid.set(null);\n }\n\n /** Handles focus on the input field. */\n onInputFocus(): void {\n this.isTyping.set(true);\n const val = this._value();\n if (val) {\n if (this.timeOnly()) {\n this.typedValue.set(val);\n } else {\n this.typedValue.set(val);\n }\n } else {\n this.typedValue.set('');\n }\n this.typingValid.set(null);\n }\n\n /** Validates and commits the typed value on blur or Enter. */\n onInputBlur(): void {\n const text = this.typedValue().trim();\n if (!text) {\n this.isTyping.set(false);\n return;\n }\n const parsed = this.parseTypedDate(text);\n if (parsed) {\n this.setValue(parsed);\n this.typingValid.set(true);\n } else {\n this.typingValid.set(false);\n setTimeout(() => this.typingValid.set(null), 1500);\n }\n this.isTyping.set(false);\n }\n\n /** Cancels typing and reverts to the previous value. */\n cancelTyping(): void {\n this.isTyping.set(false);\n this.typedValue.set('');\n this.typingValid.set(null);\n }\n\n /** Parses a typed date string according to the locale format. */\n private parseTypedDate(text: string): string | null {\n const clean = text.replace(/[\\/\\-\\.\\s]/g, '/').trim();\n const parts = clean.split('/').filter(Boolean);\n\n if (this.timeOnly()) {\n return this.parseTimeOnly(clean);\n }\n\n if (this.view() === 'year') {\n const y = Number(parts[0]);\n if (parts.length === 1 && y >= 1900 && y <= 2100) return String(y);\n return null;\n }\n\n if (this.view() === 'month') {\n if (parts.length === 2) {\n let m: number, y: number;\n if (this.locale() === 'en') {\n m = Number(parts[0]);\n y = Number(parts[1]);\n } else {\n m = Number(parts[0]);\n y = Number(parts[1]);\n }\n if (m >= 1 && m <= 12 && y >= 1900 && y <= 2100) {\n return `${y}-${String(m).padStart(2, '0')}`;\n }\n }\n return null;\n }\n\n // date view\n if (parts.length >= 3) {\n let d: number, m: number, y: number;\n if (this.locale() === 'en') {\n m = Number(parts[0]);\n d = Number(parts[1]);\n y = Number(parts[2]);\n } else {\n d = Number(parts[0]);\n m = Number(parts[1]);\n y = Number(parts[2]);\n }\n if (y >= 1900 && y <= 2100 && m >= 1 && m <= 12 && d >= 1 && d <= 31) {\n const date = new Date(y, m - 1, d);\n if (date.getMonth() === m - 1 && date.getDate() === d) {\n let result = `${y}-${String(m).padStart(2, '0')}-${String(d).padStart(2, '0')}`;\n if (this.showTime()) {\n const time = `${String(this.viewHour()).padStart(2, '0')}:${String(this.viewMinute()).padStart(2, '0')}`;\n result += `T${time}`;\n }\n return result;\n }\n }\n }\n return null;\n }\n\n /** Parses time-only input. */\n private parseTimeOnly(text: string): string | null {\n const clean = text.replace(/[\\.]/g, ':').trim();\n const parts = clean.split(':').filter(Boolean);\n if (parts.length >= 2) {\n let h = Number(parts[0]);\n const m = Number(parts[1]);\n const s = parts.length >= 3 ? Number(parts[2]) : 0;\n if (this.hourFormat() === '12') {\n const isPM = /pm/i.test(text);\n const isAM = /am/i.test(text);\n if (isPM && h < 12) h += 12;\n if (isAM && h === 12) h = 0;\n }\n if (h >= 0 && h <= 23 && m >= 0 && m <= 59 && s >= 0 && s <= 59) {\n let result = `${String(h).padStart(2, '0')}:${String(m).padStart(2, '0')}`;\n if (this.showSeconds()) result += `:${String(s).padStart(2, '0')}`;\n return result;\n }\n }\n return null;\n }\n\n /** Whether the given day is today's date. */\n isToday(day: number): boolean {\n const now = new Date();\n return (\n this.viewYear() === now.getFullYear() &&\n this.viewMonth() === now.getMonth() &&\n day === now.getDate()\n );\n }\n\n /** Whether the given month matches the selected month and year. */\n isSelectedMonth(monthIndex: number): boolean {\n return this.selectedMonthValue() === monthIndex;\n }\n\n isCurrentMonth(monthIndex: number): boolean {\n const now = new Date();\n return this.viewYear() === now.getFullYear() && monthIndex === now.getMonth();\n }\n\n isSelectedYear(year: number): boolean {\n return this.selectedYearValue() === year;\n }\n\n isCurrentYear(year: number): boolean {\n return new Date().getFullYear() === year;\n }\n\n writeValue(value: any): void {\n this._value.set(value || null);\n }\n\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this._disabledState.set(isDisabled);\n this.cdr.markForCheck();\n }\n}\n","<div class=\"relative mb-4\">\n @if (label()) {\n <div class=\"text-sm font-medium _shk-text-surface-700 dark:[color:var(--shk-surface-600)] mb-1\">\n {{ label() }}\n </div>\n }\n\n <div class=\"relative\">\n <div class=\"relative\">\n <input\n [id]=\"id()\"\n type=\"text\"\n [disabled]=\"isDisabled()\"\n [placeholder]=\"inputPlaceholder()\"\n [value]=\"isTyping() ? typedValue() : displayLabel()\"\n (input)=\"onInputText($event)\"\n (focus)=\"onInputFocus()\"\n (blur)=\"onInputBlur()\"\n (keydown.enter)=\"$any($event.target).blur()\"\n (keydown.escape)=\"cancelTyping()\"\n (click)=\"toggle()\"\n class=\"date-input-field\"\n [ngClass]=\"{\n 'input-error': shouldShowError() || typingValid() === false,\n 'input-valid': wasFixedError() || typingValid() === true,\n }\"\n [attr.aria-invalid]=\"shouldShowError()\"\n [attr.aria-describedby]=\"shouldShowError() ? id() + '-error' : null\"\n />\n <button\n type=\"button\"\n [disabled]=\"isDisabled()\"\n (click)=\"toggle()\"\n class=\"absolute right-2 top-1/2 -translate-y-1/2 p-1 _shk-text-surface-400 dark:[color:var(--shk-surface-400)] hover:[color:var(--shk-surface-600)] dark:hover:[color:var(--shk-surface-300)] transition-colors\"\n >\n <svg\n class=\"w-4 h-4\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n >\n <rect x=\"3\" y=\"4\" width=\"18\" height=\"18\" rx=\"2\"></rect>\n <path d=\"M16 2v4M8 2v4M3 10h18\"></path>\n </svg>\n </button>\n </div>\n\n @if (isOpen()) {\n <div class=\"fixed inset-0 z-40 bg-black/30\" (click)=\"close()\"></div>\n <div\n class=\"fixed z-50 top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-72 p-4 bg-white dark:[background-color:var(--shk-surface-100)] _shk-border dark:[border-color:var(--shk-surface-200)] rounded-lg shadow-xl\"\n (click)=\"$event.stopPropagation()\"\n >\n <!-- DATE VIEW -->\n @if (!timeOnly() && currentView() === 'date') {\n <div class=\"flex items-center justify-between mb-3\">\n <button\n type=\"button\"\n (click)=\"drillUp()\"\n class=\"p-1 rounded hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]\"\n >\n <svg class=\"w-4 h-4\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M15 18l-6-6 6-6\"></path>\n </svg>\n </button>\n <span class=\"text-sm font-medium _shk-text-surface-700 dark:[color:var(--shk-surface-600)]\">\n {{ monthNames()[viewMonth()] }} {{ selectedYearValue() ?? viewYear() }}\n </span>\n <button\n type=\"button\"\n (click)=\"drillToInitial()\"\n class=\"p-1 rounded hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]\"\n >\n <svg class=\"w-4 h-4\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M9 18l6-6-6-6\"></path>\n </svg>\n </button>\n </div>\n\n <div class=\"grid grid-cols-7 gap-0 mb-1\">\n @for (name of dayNames(); track $index) {\n <div class=\"text-center text-xs font-medium _shk-text-surface-400 dark:[color:var(--shk-surface-400)] py-1\">\n {{ name }}\n </div>\n }\n </div>\n\n <div class=\"grid grid-cols-7 gap-0\">\n @for (day of calendarDays(); track $index) {\n @if (day !== null) {\n <button\n type=\"button\"\n (click)=\"selectDay(day)\"\n class=\"py-1.5 text-sm rounded transition-colors\"\n [ngClass]=\"{\n '_shk-bg-primary _shk-text-white hover:[background-color:var(--shk-primary-700)]': isSelectedDay(day),\n 'ring-1 [--tw-ring-color:var(--shk-primary-500)] _shk-text-surface-700 dark:[color:var(--shk-surface-700)]': isToday(day) && !isSelectedDay(day),\n '_shk-text-surface-700 dark:[color:var(--shk-surface-700)] hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]': !isSelectedDay(day) && !isToday(day),\n }\"\n >\n {{ day }}\n </button>\n } @else {\n <div></div>\n }\n }\n </div>\n }\n\n <!-- MONTH VIEW -->\n @if (!timeOnly() && currentView() === 'month') {\n <div class=\"flex items-center justify-between mb-3\">\n <button\n type=\"button\"\n (click)=\"drillUp()\"\n class=\"p-1 rounded hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]\"\n >\n <svg class=\"w-4 h-4\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M15 18l-6-6 6-6\"></path>\n </svg>\n </button>\n <span class=\"text-sm font-medium _shk-text-surface-700 dark:[color:var(--shk-surface-600)]\">\n {{ selectedYearValue() ?? viewYear() }}\n </span>\n <button\n type=\"button\"\n (click)=\"drillToInitial()\"\n class=\"p-1 rounded hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]\"\n >\n <svg class=\"w-4 h-4\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M9 18l6-6-6-6\"></path>\n </svg>\n </button>\n </div>\n\n <div class=\"grid grid-cols-3 gap-1\">\n @for (name of monthNames(); track $index) {\n <button\n type=\"button\"\n (click)=\"selectMonth($index)\"\n class=\"py-2 text-sm rounded transition-colors\"\n [ngClass]=\"{\n '_shk-bg-primary _shk-text-white hover:[background-color:var(--shk-primary-700)]': selectedMonthValue() === $index,\n 'ring-1 [--tw-ring-color:var(--shk-primary-500)] _shk-text-surface-700 dark:[color:var(--shk-surface-700)]': isCurrentMonth($index) && selectedMonthValue() !== $index,\n '_shk-text-surface-700 dark:[color:var(--shk-surface-700)] hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]': selectedMonthValue() !== $index && !isCurrentMonth($index),\n }\"\n >\n {{ name }}\n </button>\n }\n </div>\n }\n\n <!-- YEAR VIEW -->\n @if (!timeOnly() && currentView() === 'year') {\n <div class=\"flex items-center justify-between mb-3\">\n <button\n type=\"button\"\n (click)=\"prev()\"\n [disabled]=\"!canGoPrev()\"\n class=\"p-1 rounded hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)] disabled:opacity-30 disabled:cursor-not-allowed\"\n >\n <svg class=\"w-4 h-4\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M15 18l-6-6 6-6\"></path>\n </svg>\n </button>\n <span class=\"text-sm font-medium _shk-text-surface-700 dark:[color:var(--shk-surface-600)]\">\n {{ viewDecade() }} - {{ viewDecade() + 11 }}\n </span>\n <button\n type=\"button\"\n (click)=\"next()\"\n [disabled]=\"!canGoNext()\"\n class=\"p-1 rounded hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)] disabled:opacity-30 disabled:cursor-not-allowed\"\n >\n <svg class=\"w-4 h-4\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M9 18l6-6-6-6\"></path>\n </svg>\n </button>\n </div>\n\n <div class=\"grid grid-cols-3 gap-1\">\n @for (year of decadeYears(); track year) {\n <button\n type=\"button\"\n (click)=\"selectYear(year)\"\n class=\"py-2 text-sm rounded transition-colors\"\n [ngClass]=\"{\n '_shk-bg-primary _shk-text-white hover:[background-color:var(--shk-primary-700)]': selectedYearValue() === year,\n 'ring-1 [--tw-ring-color:var(--shk-primary-500)] _shk-text-surface-700 dark:[color:var(--shk-surface-700)]': isCurrentYear(year) && selectedYearValue() !== year,\n '_shk-text-surface-700 dark:[color:var(--shk-surface-700)] hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]': selectedYearValue() !== year && !isCurrentYear(year),\n }\"\n >\n {{ year }}\n </button>\n }\n </div>\n }\n\n <!-- ANALOG CLOCK TIME PICKER -->\n @if (timeOnly() || showTime()) {\n <div class=\"mt-3 pt-3 _shk-border dark:[border-color:var(--shk-surface-200)]\">\n <!-- Clock display time -->\n <div class=\"text-center mb-2\">\n <span class=\"text-lg font-semibold _shk-text-surface-700 dark:[color:var(--shk-surface-700)]\">\n {{ clockDisplayTime() }}\n </span>\n </div>\n\n <!-- Analog clock face -->\n <div class=\"clock-container\">\n <svg\n viewBox=\"0 0 200 200\"\n class=\"w-full h-full cursor-pointer\"\n (click)=\"onClockClick($event, clockMode())\"\n >\n <!-- Clock face background -->\n <circle cx=\"100\" cy=\"100\" r=\"96\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1\"\n class=\"_shk-text-surface-200 dark:[color:var(--shk-surface-200)]\" />\n\n <!-- Minute markers -->\n @if (clockMode() === 'minutes') {\n @for (i of [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59]; track i) {\n <line\n [attr.x1]=\"clockMinuteMarker(i).x1\"\n [attr.y1]=\"clockMinuteMarker(i).y1\"\n [attr.x2]=\"clockMinuteMarker(i).x2\"\n [attr.y2]=\"clockMinuteMarker(i).y2\"\n [attr.stroke-width]=\"i % 5 === 0 ? 2 : 1\"\n [class]=\"i % 5 === 0 ? '_shk-text-surface-500 dark:[color:var(--shk-surface-500)]' : '_shk-text-surface-300 dark:[color:var(--shk-surface-400)]'\"\n stroke=\"currentColor\"\n />\n }\n <!-- Minute numbers (00, 05, 10, ...) -->\n @for (m of [0,5,10,15,20,25,30,35,40,45,50,55]; track m) {\n <text\n [attr.x]=\"clockMinutePos(m).x\"\n [attr.y]=\"clockMinutePos(m).y\"\n text-anchor=\"middle\"\n dominant-baseline=\"central\"\n class=\"text-[9px] _shk-text-surface-500 dark:[color:var(--shk-surface-400)]\"\n [class._shk-text-primary]=\"viewMinute() === m\"\n >\n {{ m.toString().padStart(2, '0') }}\n </text>\n }\n }\n\n <!-- Hour numbers -->\n @if (clockMode() === 'hours') {\n @for (h of clockHours(); track h) {\n <text\n [attr.x]=\"clockNumberPos(h).x\"\n [attr.y]=\"clockNumberPos(h).y\"\n text-anchor=\"middle\"\n dominant-baseline=\"central\"\n class=\"text-sm font-medium\"\n [class._shk-text-primary]=\"isClockHourSelected(h)\"\n [class._shk-text-surface-700]=\"!isClockHourSelected(h)\"\n >\n {{ h }}\n </text>\n }\n }\n\n <!-- Clock hand -->\n <line\n x1=\"100\" y1=\"100\"\n [attr.x2]=\"clockHandLine(60).x2\"\n [attr.y2]=\"clockHandLine(60).y2\"\n class=\"_shk-text-primary\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n\n <!-- Center dot -->\n <circle cx=\"100\" cy=\"100\" r=\"4\" class=\"fill-current _shk-text-primary\" />\n </svg>\n </div>\n\n <!-- Mode toggle: Hours / Minutes -->\n <div class=\"clock-mode-toggle\">\n <button\n type=\"button\"\n (click)=\"clockMode.set('hours')\"\n class=\"clock-mode-btn\"\n [class.active]=\"clockMode() === 'hours'\"\n >\n {{ 'Horas' }}\n </button>\n <button\n type=\"button\"\n (click)=\"clockMode.set('minutes')\"\n class=\"clock-mode-btn\"\n [class.active]=\"clockMode() === 'minutes'\"\n >\n {{ 'Minutos' }}\n </button>\n </div>\n\n <!-- AM/PM toggle for 12h format -->\n @if (hourFormat() === '12') {\n <div class=\"flex items-center justify-center gap-2 mt-2\">\n <button\n type=\"button\"\n (click)=\"viewMeridiem.set('AM')\"\n class=\"px-3 py-1 text-xs font-medium rounded-full transition-colors\"\n [ngClass]=\"{\n '_shk-bg-primary _shk-text-white': viewMeridiem() === 'AM',\n '_shk-text-surface-500 hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]': viewMeridiem() !== 'AM'\n }\"\n >\n AM\n </button>\n <button\n type=\"button\"\n (click)=\"viewMeridiem.set('PM')\"\n class=\"px-3 py-1 text-xs font-medium rounded-full transition-colors\"\n [ngClass]=\"{\n '_shk-bg-primary _shk-text-white': viewMeridiem() === 'PM',\n '_shk-text-surface-500 hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]': viewMeridiem() !== 'PM'\n }\"\n >\n PM\n </button>\n </div>\n }\n\n <!-- Seconds selector (if enabled) -->\n @if (showSeconds()) {\n <div class=\"flex items-center justify-center gap-1 mt-2\">\n <span class=\"text-xs _shk-text-surface-400\">Seg:</span>\n <select\n class=\"px-2 py-1 text-xs _shk-bg-surface-50 dark:[background-color:var(--shk-surface-100)] _shk-border dark:[border-color:var(--shk-surface-200)] rounded-md\"\n [value]=\"viewSecond()\"\n (change)=\"onSecondChange($event)\"\n aria-label=\"Segundos\"\n >\n @for (seconds of secondsRange(); track seconds) {\n <option [value]=\"seconds\">{{ minutesLabel(seconds) }}</option>\n }\n </select>\n </div>\n }\n\n <!-- Confirm button -->\n <button\n type=\"button\"\n (click)=\"confirmTime()\"\n class=\"mt-3 w-full py-2 text-sm _shk-bg-primary _shk-text-white rounded-lg hover:[background-color:var(--shk-primary-700)] transition-colors\"\n >\n {{ timeOnly() ? 'Confirmar' : 'Introducir hora' }}\n </button>\n </div>\n }\n </div>\n }\n </div>\n\n @if (shouldShowError()) {\n <div [id]=\"id() + '-error'\" class=\"mt-1 text-xs text-red-500 max-h-20 overflow-y-auto _shk-scrollbar\">\n <ul class=\"list-disc pl-4 space-y-1\">\n @for (error of getErrorMessages(); track error) {\n <li>{{ error }}</li>\n }\n </ul>\n </div>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AA+BA;;;;AAIG;AAEH;;;;AAIG;MA4LU,mBAAmB,CAAA;AA0T9B,IAAA,WAAA,GAAA;AAzTQ,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAC/B,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC/B,QAAA,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A,QAAA,EAAA,gxhBAAA,EAAA,MAAA,EAAA,CAAA,mrGAAA,CAAA,EAAA;;sBAmhBA,YAAY;uBAAC,gBAAgB,EAAE,CAAC,QAAQ,CAAC;;sBASzC,YAAY;uBAAC,yBAAyB;;;AEllBzC;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"shirkasoft-ui-components-date-picker.mjs","sources":["../../../projects/ui-components/date-picker/date-picker.component.ts","../../../projects/ui-components/date-picker/date-picker.component.html","../../../projects/ui-components/date-picker/shirkasoft-ui-components-date-picker.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport {\n Component,\n ElementRef,\n DestroyRef,\n HostListener,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n computed,\n forwardRef,\n inject,\n input,\n signal,\n effect,\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n FormControl,\n FormGroup,\n NG_VALUE_ACCESSOR,\n ReactiveFormsModule,\n} from '@angular/forms';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { TranslocoService } from '@jsverse/transloco';\n\n/** Which granularity the picker edits: a day, a month or a year. */\nexport type DatePickerView = 'date' | 'week' | 'month' | 'year';\n\n/** Which time selection mode the analog clock is in. */\nexport type ClockMode = 'hours' | 'minutes';\n\n/**\n * Shirkasoft UI Components.\n * Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).\n * Belongs to Shirkasoft.\n */\n\n/**\n * Date/time picker implemented as a ControlValueAccessor. Supports choosing a\n * day, month or year, optional time selection (with seconds/12-hour format),\n * min/max constraints and locale-aware labels.\n */\n@Component({\n selector: 'shk-date-picker',\n standalone: true,\n imports: [CommonModule, ReactiveFormsModule],\n templateUrl: './date-picker.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => DatePickerComponent),\n multi: true,\n },\n ],\n styles: [\n `\n .clock-container {\n position: relative;\n width: 200px;\n height: 200px;\n margin: 0 auto;\n }\n .clock-face {\n width: 100%;\n height: 100%;\n border-radius: 50%;\n border: 2px solid var(--shk-surface-200);\n position: relative;\n background-color: var(--shk-surface-50);\n }\n .dark .clock-face {\n border-color: var(--shk-surface-200);\n background-color: var(--shk-surface-100);\n }\n .clock-number {\n position: absolute;\n width: 32px;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 12px;\n font-weight: 500;\n border-radius: 50%;\n transform: translate(-50%, -50%);\n cursor: pointer;\n transition: background-color 0.15s, color 0.15s;\n user-select: none;\n color: var(--shk-surface-700);\n }\n .dark .clock-number {\n color: var(--shk-surface-700);\n }\n .clock-number:hover {\n background-color: var(--shk-surface-100);\n }\n .dark .clock-number:hover {\n background-color: var(--shk-surface-200);\n }\n .clock-number.selected {\n background-color: var(--shk-primary-500);\n color: white;\n }\n .clock-number.current {\n font-weight: 700;\n }\n .clock-hand {\n position: absolute;\n bottom: 50%;\n left: 50%;\n width: 2px;\n background-color: var(--shk-primary-500);\n transform-origin: bottom center;\n border-radius: 1px;\n pointer-events: none;\n transition: transform 0.2s ease-out;\n }\n .clock-center {\n position: absolute;\n top: 50%;\n left: 50%;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background-color: var(--shk-primary-500);\n transform: translate(-50%, -50%);\n pointer-events: none;\n z-index: 2;\n }\n .clock-minute-marker {\n position: absolute;\n width: 1px;\n height: 8px;\n background-color: var(--shk-surface-300);\n top: 6px;\n left: 50%;\n transform-origin: center 94px;\n }\n .dark .clock-minute-marker {\n background-color: var(--shk-surface-400);\n }\n .clock-minute-marker.major {\n width: 2px;\n height: 12px;\n background-color: var(--shk-surface-400);\n }\n .dark .clock-minute-marker.major {\n background-color: var(--shk-surface-500);\n }\n .clock-mode-toggle {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n margin-top: 0.75rem;\n }\n .clock-mode-btn {\n padding: 0.25rem 0.75rem;\n font-size: 0.75rem;\n font-weight: 500;\n border-radius: 9999px;\n cursor: pointer;\n transition: background-color 0.15s, color 0.15s;\n border: none;\n background: transparent;\n color: var(--shk-surface-500);\n }\n .dark .clock-mode-btn {\n color: var(--shk-surface-400);\n }\n .clock-mode-btn.active {\n background-color: var(--shk-primary-500);\n color: white;\n }\n .clock-mode-btn:hover:not(.active) {\n background-color: var(--shk-surface-100);\n }\n .dark .clock-mode-btn:hover:not(.active) {\n background-color: var(--shk-surface-200);\n }\n .date-input-field {\n width: 100%;\n padding: 0.5rem 0.75rem;\n padding-right: 2.5rem;\n font-size: 0.875rem;\n border-radius: 0.5rem;\n outline: none;\n transition: border-color 0.15s, box-shadow 0.15s;\n background-color: var(--shk-surface-50);\n color: var(--shk-surface-700);\n border: 1px solid var(--shk-surface-200);\n }\n .dark .date-input-field {\n background-color: var(--shk-surface-100);\n color: var(--shk-surface-700);\n border-color: var(--shk-surface-200);\n }\n .date-input-field::placeholder {\n color: var(--shk-surface-400);\n }\n .dark .date-input-field::placeholder {\n color: var(--shk-surface-400);\n }\n .date-input-field:focus {\n border-color: var(--shk-primary-500);\n box-shadow: 0 0 0 1px var(--shk-primary-500);\n }\n .date-input-field:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n .date-input-field.input-error {\n border-color: #ef4444;\n }\n .date-input-field.input-error:focus {\n border-color: #ef4444;\n box-shadow: 0 0 0 1px #ef4444;\n }\n .date-input-field.input-valid {\n border-color: #22c55e;\n }\n .date-input-field.input-valid:focus {\n border-color: #22c55e;\n box-shadow: 0 0 0 1px #22c55e;\n }\n `,\n ],\n})\nexport class DatePickerComponent implements ControlValueAccessor {\n private elementRef = inject(ElementRef);\n private cdr = inject(ChangeDetectorRef);\n private destroyRef = inject(DestroyRef);\n private transloco = inject(TranslocoService);\n\n /** HTML id for the input (for label/for pairing). */\n id = input<string>('');\n /** Granularity of the picker ('date' | 'week' | 'month' | 'year'). */\n view = input<DatePickerView>('date');\n /** First day of the week (0=Sunday ... 6=Saturday), used by week view. */\n weekStart = input<number>(0);\n /** Label shown above the input. */\n label = input<string>('');\n /** Placeholder of the input. */\n placeholder = input<string>('');\n /** FormGroup used to resolve the control from `label`. */\n formGroup = input<FormGroup | undefined>(undefined);\n /** Directly bound FormControl. */\n control = input<FormControl | undefined>(undefined);\n /** Disables the picker. */\n disabled = input<boolean>(false);\n /** Custom error message displayed (overrides translated ones). */\n errorMessage = input<string>('');\n /** Per-validation-key custom error messages. */\n errorMessages = input<{ [key: string]: string }>({});\n /** Minimum allowed date (YYYY-MM-DD) or year/month string. */\n minValue = input<string>('');\n /** Maximum allowed date (YYYY-MM-DD) or year/month string. */\n maxValue = input<string>('');\n /** Locale used for month/day names and formatted labels. */\n locale = input<string>('es');\n /** Edits only the time portion of the value. */\n timeOnly = input<boolean>(false);\n /** Shows the time selectors alongside the date. */\n showTime = input<boolean>(false);\n /** Hour format: '12' or '24'. */\n hourFormat = input<'12' | '24'>('24');\n /** Whether the seconds selector is shown. */\n showSeconds = input<boolean>(false);\n /** Step (in minutes) for the minute selector. */\n minuteStep = input<number>(1);\n\n /** Whether the dropdown calendar is open. */\n isOpen = signal(false);\n /** Year currently displayed in the calendar. */\n viewYear = signal(new Date().getFullYear());\n /** Month currently displayed in the calendar (0-based). */\n viewMonth = signal(new Date().getMonth());\n /** Starting year of the decade shown in year view. */\n viewDecade = signal(Math.floor(new Date().getFullYear() / 10) * 10);\n /** Hour selected in the time selectors. */\n viewHour = signal(0);\n /** Minute selected in the time selectors. */\n viewMinute = signal(0);\n /** Second selected in the time selectors. */\n viewSecond = signal(0);\n /** Meridiem selected in 12-hour format. */\n viewMeridiem = signal<'AM' | 'PM'>('AM');\n /** Date part selected but not yet committed until the time is confirmed. */\n private pendingDate = signal<string | null>(null);\n /** Selected year during the selection flow (year -> month -> day). */\n selectedYearValue = signal<number | null>(null);\n /** Selected month during the selection flow. */\n selectedMonthValue = signal<number | null>(null);\n\n /** Analog clock mode: 'hours' or 'minutes'. */\n clockMode = signal<ClockMode>('hours');\n /** Internal view state for drill-down navigation (separates from input `view`). */\n currentView = signal<DatePickerView>('year');\n /** Whether the user is typing in the input field. */\n isTyping = signal(false);\n /** The raw text being typed by the user. */\n typedValue = signal('');\n /** Whether the typed value is valid. */\n typingValid = signal<boolean | null>(null);\n\n /** Underlying value (mirrors the reactive control). */\n private _value = signal<string | null>(null);\n /** Disabled state coming from the reactive form infrastructure. */\n private _disabledState = signal<boolean>(false);\n /** Whether status subscriptions have been attached to the control. */\n private subscribed = signal(false);\n private valueSubscribed = signal(false);\n /** Counter used to recompute the error helpers reactively. */\n private errorTracker = signal(0);\n /** Whether an error was displayed at some point. */\n hadError = signal(false);\n\n /** ControlValueAccessor callbacks. */\n private onChange: (value: any) => void = () => {};\n private onTouched: () => void = () => {};\n\n /** Current value of the picker. */\n value = computed(() => this._value());\n\n /** Whether the picker is disabled (input or reactive form). */\n isDisabled = computed(() => this.disabled() || this._disabledState());\n\n /** Resolves the control from `control` input or `formGroup`+`label`. */\n actualControl = computed(() => {\n const ctrl = this.control();\n if (ctrl) return ctrl;\n const fg = this.formGroup();\n const lbl = this.label();\n if (fg && lbl) return fg.get(lbl) as FormControl;\n return undefined;\n });\n\n /** Whether the bound control should show its error message. */\n shouldShowError = computed(() => {\n this.errorTracker();\n const ctrl = this.actualControl();\n return ctrl?.invalid && (ctrl?.dirty || ctrl?.touched);\n });\n\n /** Whether an error was fixed (invalid before, now valid and touched). */\n wasFixedError = computed(() => {\n this.errorTracker();\n const ctrl = this.actualControl();\n return this.hadError() && ctrl?.valid && ctrl?.touched;\n });\n\n /** Validation error messages to display, custom or translated. */\n getErrorMessages = computed(() => {\n this.errorTracker();\n const customError = this.errorMessage();\n if (customError) return [customError];\n\n const ctrl = this.actualControl();\n if (!ctrl?.errors) return [];\n\n const customErrors = this.errorMessages();\n const t = this.transloco;\n\n return Object.keys(ctrl.errors).map((key) => {\n if (customErrors[key]) return customErrors[key];\n switch (key) {\n case 'required':\n return t.translate('validation.required');\n default:\n return t.translate('validation.invalid');\n }\n });\n });\n\n /** Date part displayed in the calendar (pending date or committed value). */\n displayedDate = computed(() => {\n if (this.timeOnly()) return null;\n const value = this.pendingDate();\n if (value) return value;\n const current = this._value();\n if (!current) return null;\n return this.datePartOf(current);\n });\n\n /** Human-readable label for the selected value in the input. */\n displayLabel = computed(() => {\n const value = this._value();\n if (!value) return '';\n\n if (this.timeOnly()) {\n return this.formatTimeFromValue(value);\n }\n\n const datePart = this.datePartOf(value);\n const timePart = value.includes('T') ? value.split('T')[1] : null;\n const v = this.view();\n\n let label: string;\n if (v === 'year') {\n label = datePart;\n } else if (v === 'month') {\n const [y, m] = datePart.split('-').map(Number);\n const fmt = new Intl.DateTimeFormat(this.locale(), {\n month: 'long',\n year: 'numeric',\n });\n label = fmt.format(new Date(y, m - 1, 1));\n label = label.charAt(0).toUpperCase() + label.slice(1);\n } else if (v === 'week') {\n const start = new Date(datePart + 'T12:00:00');\n label = this.formatWeekRange(\n start,\n new Date(start.getFullYear(), start.getMonth(), start.getDate() + 6),\n );\n } else {\n const fmt = new Intl.DateTimeFormat(this.locale(), {\n dateStyle: 'long',\n });\n label = fmt.format(new Date(datePart + 'T12:00:00'));\n }\n\n if (this.showTime() && timePart) {\n label += ' ' + this.formatTimeFromValue(timePart);\n }\n return label;\n });\n\n /** Localized short month names for the year view. */\n monthNames = computed(() => {\n const fmt = new Intl.DateTimeFormat(this.locale(), { month: 'short' });\n return Array.from({ length: 12 }, (_, i) => {\n const name = fmt.format(new Date(2000, i, 1)).replace('.', '');\n return name.charAt(0).toUpperCase() + name.slice(1);\n });\n });\n\n /** Localized short weekday names for the calendar header. */\n dayNames = computed(() => {\n const fmt = new Intl.DateTimeFormat(this.locale(), { weekday: 'short' });\n return Array.from({ length: 7 }, (_, i) => {\n const name = fmt.format(new Date(2024, 0, i + 1));\n return name.charAt(0).toUpperCase() + name.slice(1, 3);\n });\n });\n\n /** Number of days in the currently viewed month. */\n daysInMonth = computed(() => {\n return new Date(this.viewYear(), this.viewMonth() + 1, 0).getDate();\n });\n\n /** Weekday index (0=Sunday) of the first day of the viewed month. */\n firstDayOfMonth = computed(() => {\n return new Date(this.viewYear(), this.viewMonth(), 1).getDay();\n });\n\n /** Calendar grid: nulls for leading blanks then the days of the month. */\n calendarDays = computed(() => {\n const totalDays = this.daysInMonth();\n const firstDay = this.firstDayOfMonth();\n const days: (number | null)[] = [];\n for (let i = 0; i < firstDay; i++) days.push(null);\n for (let i = 1; i <= totalDays; i++) days.push(i);\n return days;\n });\n\n /** Weeks of the viewed month (rows aligned to `weekStart`), for week view. */\n monthWeeks = computed(() => {\n const year = this.viewYear();\n const month = this.viewMonth();\n const ws = this.weekStart();\n const first = new Date(year, month, 1);\n const last = new Date(year, month + 1, 0);\n const anchor = new Date(\n first.getFullYear(),\n first.getMonth(),\n first.getDate() - ((first.getDay() - ws + 7) % 7),\n );\n const weeks: { index: number; start: Date; end: Date; range: string }[] = [];\n let cursor = anchor;\n let index = 0;\n while (cursor.getTime() <= last.getTime()) {\n index++;\n const start = cursor;\n const end = new Date(start.getFullYear(), start.getMonth(), start.getDate() + 6);\n weeks.push({ index, start, end, range: this.formatWeekRange(start, end) });\n cursor = new Date(start.getFullYear(), start.getMonth(), start.getDate() + 7);\n }\n return weeks;\n });\n\n /** Localized range label for a week (e.g. '2 — 8 feb'). */\n formatWeekRange(start: Date, end: Date): string {\n const loc = this.locale();\n const dayFmt = new Intl.DateTimeFormat(loc, { day: 'numeric' });\n const monthFmt = new Intl.DateTimeFormat(loc, { month: 'short' });\n const startLabel = `${dayFmt.format(start)} ${monthFmt.format(start).replace('.', '')}`;\n if (start.getMonth() !== end.getMonth() || start.getFullYear() !== end.getFullYear()) {\n const year = start.getFullYear() !== end.getFullYear() ? ` ${end.getFullYear()}` : '';\n return `${startLabel} — ${dayFmt.format(end)} ${monthFmt.format(end).replace('.', '')}${year}`;\n }\n return `${startLabel} — ${dayFmt.format(end)}`;\n }\n\n /** Localized label for a week row ('Semana N' / 'Week N'). */\n weekLabel(index: number): string {\n return this.locale() === 'en' ? `Week ${index}` : `Semana ${index}`;\n }\n\n /** Whether the prev navigation button is allowed by `minValue`. */\n canGoPrev = computed(() => {\n const v = this.currentView();\n const min = this.minValue();\n if (v === 'date' || v === 'week') {\n if (!min) return true;\n const prev = new Date(this.viewYear(), this.viewMonth() - 1, 1);\n return prev >= new Date(min + 'T12:00:00');\n }\n if (v === 'month') {\n const minY = min ? Number(min.split('-')[0]) : undefined;\n return minY === undefined || this.viewYear() > minY;\n }\n // year view\n const minY = min ? Number(min.split('-')[0]) : undefined;\n return minY === undefined || this.viewYear() > minY;\n });\n\n /** Whether the next navigation button is allowed by `maxValue`. */\n canGoNext = computed(() => {\n const v = this.currentView();\n const max = this.maxValue();\n if (v === 'date' || v === 'week') {\n if (!max) return true;\n const next = new Date(this.viewYear(), this.viewMonth() + 1, 1);\n return next <= new Date(max + 'T12:00:00');\n }\n if (v === 'month') {\n const maxY = max ? Number(max.split('-')[0]) : undefined;\n return maxY === undefined || this.viewYear() < maxY;\n }\n // year view\n const maxY = max ? Number(max.split('-')[0]) : undefined;\n return maxY === undefined || this.viewYear() < maxY;\n });\n\n /** Year of the displayed date, if any. */\n selectedYear = computed(() => {\n const value = this.displayedDate();\n return value ? Number(value.split('-')[0]) : null;\n });\n\n /** Month index (0-based) of the displayed date, if any. */\n selectedMonth = computed(() => {\n const value = this.displayedDate();\n return value ? Number(value.split('-')[1]) - 1 : null;\n });\n\n /** Day of the displayed date, if any (date view only). */\n selectedDay = computed(() => {\n const value = this.displayedDate();\n return value && this.view() === 'date' ? Number(value.split('-')[2]) : null;\n });\n\n /** 12 years of the viewed decade for the year view. */\n decadeYears = computed(() => {\n const start = this.viewDecade();\n return Array.from({ length: 12 }, (_, i) => start + i);\n });\n\n /** Angle (in degrees) of the analog clock hand based on current mode. */\n clockHandAngle = computed(() => {\n if (this.clockMode() === 'hours') {\n const h = this.viewHour();\n const display = this.hourFormat() === '12' ? h % 12 || 12 : h % 12 || 12;\n return (display % 12) * 30;\n }\n return this.viewMinute() * 6;\n });\n\n /** Hours to display on the analog clock face (1-12). */\n clockHours = computed(() => Array.from({ length: 12 }, (_, i) => i + 1));\n\n /** Minutes to display on the analog clock face (0-55, step 5). */\n clockMinutes = computed(() => Array.from({ length: 12 }, (_, i) => i * 5));\n\n /** The input format string based on locale. */\n inputFormat = computed(() => {\n const loc = this.locale();\n return loc === 'en' ? 'MM/DD/YYYY' : 'DD/MM/YYYY';\n });\n\n /** (Unused legacy placeholder) plain year list. */\n years: number[] = [];\n\n constructor() {\n // Attach error-state subscriptions to the validated control once found.\n effect(() => {\n const ctrl = this.actualControl();\n if (!ctrl) {\n this.subscribed.set(false);\n return;\n }\n if (this.subscribed()) return;\n\n if (ctrl.invalid && ctrl.touched) this.hadError.set(true);\n\n ctrl.statusChanges\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.errorTracker.update((v) => v + 1);\n if (ctrl.invalid && ctrl.touched) this.hadError.set(true);\n });\n\n this.subscribed.set(true);\n });\n\n // One-way sync from the reactive control to the internal value signal.\n effect(() => {\n const ctrl = this.actualControl();\n if (!ctrl) return;\n\n if (!this.valueSubscribed()) {\n this.writeValue(ctrl.value);\n\n ctrl.valueChanges\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((value) => {\n this.writeValue(value);\n });\n\n this.valueSubscribed.set(true);\n }\n });\n }\n\n /** Closes the dropdown when clicking outside the component. */\n @HostListener('document:click', ['$event'])\n onDocumentClick(event: MouseEvent): void {\n if (!this.isOpen()) return;\n if (!this.elementRef.nativeElement.contains(event.target)) {\n this.close();\n }\n }\n\n /** Closes the dropdown on Escape. */\n @HostListener('document:keydown.escape')\n onEscape(): void {\n this.close();\n }\n\n /** Opens/closes the dropdown, syncing the calendar to the current value. */\n toggle(): void {\n if (this.isDisabled()) return;\n if (this.isOpen()) {\n this.close();\n } else {\n this.syncViewToValue();\n this.currentView.set(this.view() === 'week' ? 'week' : 'year');\n this.selectedYearValue.set(null);\n this.selectedMonthValue.set(null);\n this.clockMode.set('hours');\n this.isTyping.set(false);\n this.isOpen.set(true);\n }\n }\n\n /** Aligns the calendar view signals with the current value (or today). */\n private syncViewToValue(): void {\n const val = this._value();\n const v = this.view();\n if (!val) {\n const now = new Date();\n this.viewYear.set(now.getFullYear());\n this.viewMonth.set(now.getMonth());\n this.viewDecade.set(Math.floor(now.getFullYear() / 10) * 10);\n this.viewHour.set(now.getHours());\n this.viewMinute.set(now.getMinutes());\n this.viewSecond.set(now.getSeconds());\n this.pendingDate.set(this.toISODate(now));\n return;\n }\n const datePart = this.datePartOf(val);\n const timePart = val.includes('T') ? val.split('T')[1] : undefined;\n if (v === 'year') {\n this.viewYear.set(Number(datePart));\n this.viewDecade.set(Math.floor(Number(datePart) / 10) * 10);\n } else if (v === 'month') {\n this.viewYear.set(Number(datePart.split('-')[0]));\n } else if (v === 'week') {\n const d = new Date(datePart + 'T12:00:00');\n this.viewYear.set(d.getFullYear());\n this.viewMonth.set(d.getMonth());\n } else {\n const d = new Date(datePart + 'T12:00:00');\n this.viewYear.set(d.getFullYear());\n this.viewMonth.set(d.getMonth());\n }\n const time = timePart ?? (this.timeOnly() ? val : undefined);\n if (time) {\n const [h, m, ss] = time.split(':').map(Number);\n this.viewHour.set(h || 0);\n this.viewMinute.set(m || 0);\n this.viewSecond.set(ss || 0);\n if (this.hourFormat() === '12') {\n this.viewMeridiem.set(h >= 12 ? 'PM' : 'AM');\n }\n }\n this.pendingDate.set(datePart);\n }\n\n /** Closes the dropdown, marks the control as touched and refreshes errors. */\n close(): void {\n if (!this.isOpen()) return;\n this.isOpen.set(false);\n this.onTouched();\n const ctrl = this.actualControl();\n if (ctrl) ctrl.markAsTouched();\n this.errorTracker.update((v) => v + 1);\n if (ctrl?.invalid && ctrl?.touched) this.hadError.set(true);\n }\n\n /** Navigates the calendar to the previous year/month/decade. */\n prev(): void {\n const v = this.currentView();\n if (v === 'year') {\n this.viewDecade.update((d) => d - 12);\n this.viewYear.update((y) => y - 12);\n } else if (v === 'month') {\n this.viewYear.update((y) => y - 1);\n } else {\n this.viewMonth.update((m) => {\n if (m === 0) {\n this.viewYear.update((y) => y - 1);\n return 11;\n }\n return m - 1;\n });\n }\n }\n\n /** Navigates the calendar to the next year/month/decade. */\n next(): void {\n const v = this.currentView();\n if (v === 'year') {\n this.viewDecade.update((d) => d + 12);\n this.viewYear.update((y) => y + 12);\n } else if (v === 'month') {\n this.viewYear.update((y) => y + 1);\n } else {\n this.viewMonth.update((m) => {\n if (m === 11) {\n this.viewYear.update((y) => y + 1);\n return 0;\n }\n return m + 1;\n });\n }\n }\n\n /** Selects a year - stores it and navigates to month selection. */\n selectYear(year: number): void {\n this.selectedYearValue.set(year);\n this.viewYear.set(year);\n this.currentView.set('month');\n }\n\n /** Selects a month - stores it and navigates to day selection. */\n selectMonth(monthIndex: number): void {\n this.selectedMonthValue.set(monthIndex);\n this.viewMonth.set(monthIndex);\n this.currentView.set('date');\n }\n\n /** Selects a day - completes the date selection. */\n selectDay(day: number): void {\n const year = this.selectedYearValue() ?? this.viewYear();\n const month = this.selectedMonthValue() ?? this.viewMonth();\n const m = String(month + 1).padStart(2, '0');\n const d = String(day).padStart(2, '0');\n const value = `${year}-${m}-${d}`;\n if (this.showTime()) {\n this.pendingDate.set(value);\n return;\n }\n this.setValue(value);\n }\n\n /** Selects a week - emits its start date (YYYY-MM-DD). */\n selectWeek(start: Date): void {\n const value =\n `${start.getFullYear()}-` +\n `${String(start.getMonth() + 1).padStart(2, '0')}-` +\n `${String(start.getDate()).padStart(2, '0')}`;\n if (this.showTime()) {\n this.pendingDate.set(value);\n return;\n }\n this.setValue(value);\n }\n private setValue(value: string, close = true): void {\n this._value.set(value);\n this.onChange(value);\n const ctrl = this.actualControl();\n if (ctrl) {\n ctrl.setValue(value);\n ctrl.markAsDirty();\n }\n if (close) this.close();\n }\n\n /** Confirms the selected time and commits the combined date+time value. */\n confirmTime(): void {\n const h = this.viewHour();\n const m = this.viewMinute();\n const s = this.viewSecond();\n let time = `${String(h).padStart(2, '0')}:${String(m).padStart(2, '0')}`;\n if (this.showSeconds()) time += `:${String(s).padStart(2, '0')}`;\n\n if (this.timeOnly()) {\n this.setValue(time);\n return;\n }\n\n const datePart =\n this.pendingDate() ??\n `${this.viewYear()}-${String(this.viewMonth() + 1).padStart(2, '0')}-01`;\n this.setValue(`${datePart}T${time}`);\n }\n\n /** Reads the hour selected in the time selector. */\n onHourChange(event: Event): void {\n this.viewHour.set(Number((event.target as HTMLSelectElement).value));\n }\n\n /** Reads the minute selected in the time selector. */\n onMinuteChange(event: Event): void {\n this.viewMinute.set(Number((event.target as HTMLSelectElement).value));\n }\n\n /** Reads the second selected in the time selector. */\n onSecondChange(event: Event): void {\n this.viewSecond.set(Number((event.target as HTMLSelectElement).value));\n }\n\n /** Current meridiem (\"AM\"/\"PM\") for the 12-hour format. */\n meridiem(): 'AM' | 'PM' {\n return this.viewMeridiem();\n }\n\n /** Reads the meridiem selected in the time selector. */\n onMeridiemChange(event: Event): void {\n this.viewMeridiem.set((event.target as HTMLSelectElement).value as 'AM' | 'PM');\n }\n\n /** Splits the date part from a full ISO \"date\" or \"dateTtime\" value. */\n private datePartOf(value: string): string {\n const i = value.indexOf('T');\n return i >= 0 ? value.slice(0, i) : value;\n }\n\n /** Formats a raw time string (\"HH:mm[:ss]\") using the configured format. */\n private formatTimeFromValue(time: string): string {\n const [h, m, ss] = time.split(':').map(Number);\n return this.formatTime(h || 0, m || 0, ss || 0);\n }\n\n /** Formats hour/minute/second according to hour format and seconds option. */\n private formatTime(h: number, m: number, s: number): string {\n if (this.hourFormat() === '12') {\n const h12 = h % 12 || 12;\n const suffix = h < 12 ? ' AM' : ' PM';\n return `${String(h12).padStart(2, '0')}:${String(m).padStart(2, '0')}${suffix}`;\n }\n let label = `${String(h).padStart(2, '0')}:${String(m).padStart(2, '0')}`;\n if (this.showSeconds()) label += `:${String(s).padStart(2, '0')}`;\n return label;\n }\n\n /** Formats a Date as a YYYY-MM-DD ISO string. */\n private toISODate(date: Date): string {\n return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(\n 2,\n '0',\n )}-${String(date.getDate()).padStart(2, '0')}`;\n }\n\n /** Whether the given day matches the currently selected date. */\n isSelectedDay(day: number): boolean {\n return (\n this.selectedYear() === this.viewYear() &&\n this.selectedMonth() === this.viewMonth() &&\n this.selectedDay() === day\n );\n }\n\n /** Hours available in the time selector ('12' maps to 0..11 or 12..23). */\n hoursRange(): number[] {\n if (this.hourFormat() === '12') {\n const oneToTwelve = Array.from({ length: 12 }, (_, i) => i + 1);\n return this.viewMeridiem() === 'PM'\n ? oneToTwelve.map((h) => (h === 12 ? 12 : h + 12))\n : oneToTwelve.map((h) => (h === 12 ? 0 : h));\n }\n return Array.from({ length: 24 }, (_, i) => i);\n }\n\n /** Minutes available in the time selector, stepped by `minuteStep`. */\n minutesRange(): number[] {\n const step = this.minuteStep();\n return Array.from({ length: Math.ceil(60 / step) }, (_, i) => i * step);\n }\n\n /** Seconds available in the time selector (0..59). */\n secondsRange(): number[] {\n return Array.from({ length: 60 }, (_, i) => i);\n }\n\n /** Formats an hour for display in the selector (12-hour aware). */\n hourDisplay(hour: number): string {\n if (this.hourFormat() === '12') {\n return String(hour % 12 || 12).padStart(2, '0');\n }\n return String(hour).padStart(2, '0');\n }\n\n /** Pads a minute value with a leading zero. */\n minutesLabel(value: number): string {\n return String(value).padStart(2, '0');\n }\n\n /** Returns the position (x, y) for a clock number at the given index (0-11). */\n getClockNumberPosition(index: number): { x: number; y: number } {\n const angle = (index * 30 - 90) * (Math.PI / 180);\n const radius = 76;\n const x = 100 + radius * Math.cos(angle);\n const y = 100 + radius * Math.sin(angle);\n return { x, y };\n }\n\n /** Returns the position (x, y) for a minute marker at the given index (0-59). */\n getMinuteMarkerPosition(index: number): { x: number; y: number; rotation: number } {\n const angle = (index * 6 - 90) * (Math.PI / 180);\n const radius = 88;\n const x = 100 + radius * Math.cos(angle);\n const y = 100 + radius * Math.sin(angle);\n return { x, y, rotation: index * 6 };\n }\n\n /** Handles click on the analog clock face. */\n onClockClick(event: MouseEvent, mode: 'hours' | 'minutes'): void {\n const target = event.currentTarget as HTMLElement;\n const rect = target.getBoundingClientRect();\n const centerX = rect.left + rect.width / 2;\n const centerY = rect.top + rect.height / 2;\n const dx = event.clientX - centerX;\n const dy = event.clientY - centerY;\n let angle = Math.atan2(dy, dx) * (180 / Math.PI) + 90;\n if (angle < 0) angle += 360;\n\n if (mode === 'hours') {\n let hour = Math.round(angle / 30) % 12;\n if (hour === 0) hour = 12;\n let actualHour = hour;\n if (this.hourFormat() === '12') {\n if (this.viewMeridiem() === 'PM' && hour !== 12) {\n actualHour = hour + 12;\n } else if (this.viewMeridiem() === 'AM' && hour === 12) {\n actualHour = 0;\n }\n } else {\n actualHour = hour === 12 ? 12 : hour;\n if (this.viewHour() >= 12 && hour !== 12) {\n actualHour = hour + 12;\n } else if (this.viewHour() < 12 && hour === 12) {\n actualHour = 12;\n }\n }\n this.viewHour.set(actualHour);\n this.clockMode.set('minutes');\n } else {\n const minute = Math.round(angle / 6) % 60;\n const stepped = Math.round(minute / this.minuteStep()) * this.minuteStep();\n this.viewMinute.set(stepped % 60);\n }\n }\n\n /** Switches the clock mode between hours and minutes. */\n toggleClockMode(): void {\n this.clockMode.update((m) => (m === 'hours' ? 'minutes' : 'hours'));\n }\n\n /** Whether the given hour number matches the current selection on the clock face. */\n isClockHourSelected(hour12: number): boolean {\n const h = this.viewHour();\n if (this.hourFormat() === '12') {\n const display = h % 12 || 12;\n return display === hour12;\n }\n const display = h % 12 || 12;\n return display === hour12;\n }\n\n /** Whether the given minute value matches the current selection. */\n isClockMinuteSelected(minute: number): boolean {\n return this.viewMinute() === minute;\n }\n\n /** Formats the clock display time for the header above the clock. */\n clockDisplayTime(): string {\n return this.formatTime(this.viewHour(), this.viewMinute(), this.viewSecond());\n }\n\n /** Returns SVG line coordinates for a clock hand from center to angle. */\n clockHandLine(length: number = 60): { x2: number; y2: number } {\n const angle = this.clockHandAngle();\n // clockHandAngle: 0=12h, 90=3h, 180=6h, 270=9h\n // SVG cos/sin: 0=3h, 90=6h, 180=9h, 270=12h → offset -90°\n const rad = ((angle - 90) * Math.PI) / 180;\n return {\n x2: 100 + length * Math.cos(rad),\n y2: 100 + length * Math.sin(rad),\n };\n }\n\n /** Returns SVG text position for a clock number at the given index (0-11). */\n clockNumberPos(index: number): { x: number; y: number } {\n const angle = ((index % 12) * 30 - 90) * (Math.PI / 180);\n return {\n x: 100 + 68 * Math.cos(angle),\n y: 100 + 68 * Math.sin(angle),\n };\n }\n\n /** Returns SVG text position for a minute label at the given minute (0-55). */\n clockMinutePos(minute: number): { x: number; y: number } {\n const angle = (minute * 6 - 90) * (Math.PI / 180);\n return {\n x: 100 + 68 * Math.cos(angle),\n y: 100 + 68 * Math.sin(angle),\n };\n }\n\n /** Returns SVG line coordinates for a minute marker. */\n clockMinuteMarker(i: number): { x1: number; y1: number; x2: number; y2: number } {\n const angle = (i * 6 - 90) * (Math.PI / 180);\n const outerR = 84;\n const innerR = i % 5 === 0 ? 78 : 82;\n return {\n x1: 100 + outerR * Math.cos(angle),\n y1: 100 + outerR * Math.sin(angle),\n x2: 100 + innerR * Math.cos(angle),\n y2: 100 + innerR * Math.sin(angle),\n };\n }\n\n /** Drills down from year view to month view for the selected year. */\n drillDownToMonth(year: number): void {\n this.selectedYearValue.set(year);\n this.viewYear.set(year);\n this.currentView.set('month');\n }\n\n /** Drills down from month view to date view for the selected month. */\n drillDownToDate(monthIndex: number): void {\n this.selectedMonthValue.set(monthIndex);\n this.viewMonth.set(monthIndex);\n this.currentView.set('date');\n }\n\n /** Goes back one level in drill-down navigation. */\n drillUp(): void {\n const v = this.currentView();\n if (v === 'date') {\n this.selectedMonthValue.set(null);\n this.currentView.set('month');\n } else if (v === 'month') {\n this.selectedYearValue.set(null);\n this.currentView.set('year');\n }\n }\n\n /** Returns to the initial view (year selection). */\n drillToInitial(): void {\n this.selectedYearValue.set(null);\n this.selectedMonthValue.set(null);\n this.currentView.set('year');\n }\n\n /** Formats input placeholder based on locale. */\n inputPlaceholder(): string {\n if (this.timeOnly()) return this.inputFormat();\n if (this.view() === 'year') return 'YYYY';\n if (this.view() === 'month') return 'MM/YYYY';\n if (this.view() === 'week') {\n return this.locale() === 'en' ? 'Week · MM/YYYY' : 'Semana · MM/YYYY';\n }\n return this.inputFormat();\n }\n\n /** Handles text input in the date field. */\n onInputText(event: Event): void {\n const value = (event.target as HTMLInputElement).value;\n this.typedValue.set(value);\n this.typingValid.set(null);\n }\n\n /** Handles focus on the input field. */\n onInputFocus(): void {\n this.isTyping.set(true);\n const val = this._value();\n if (val) {\n if (this.timeOnly()) {\n this.typedValue.set(val);\n } else {\n this.typedValue.set(val);\n }\n } else {\n this.typedValue.set('');\n }\n this.typingValid.set(null);\n }\n\n /** Validates and commits the typed value on blur or Enter. */\n onInputBlur(): void {\n const text = this.typedValue().trim();\n if (!text) {\n this.isTyping.set(false);\n return;\n }\n const parsed = this.parseTypedDate(text);\n if (parsed) {\n this.setValue(parsed);\n this.typingValid.set(true);\n } else {\n this.typingValid.set(false);\n setTimeout(() => this.typingValid.set(null), 1500);\n }\n this.isTyping.set(false);\n }\n\n /** Cancels typing and reverts to the previous value. */\n cancelTyping(): void {\n this.isTyping.set(false);\n this.typedValue.set('');\n this.typingValid.set(null);\n }\n\n /** Parses a typed date string according to the locale format. */\n private parseTypedDate(text: string): string | null {\n const clean = text.replace(/[\\/\\-\\.\\s]/g, '/').trim();\n const parts = clean.split('/').filter(Boolean);\n\n if (this.timeOnly()) {\n return this.parseTimeOnly(clean);\n }\n\n if (this.view() === 'week') return null;\n\n if (this.view() === 'year') {\n const y = Number(parts[0]);\n if (parts.length === 1 && y >= 1900 && y <= 2100) return String(y);\n return null;\n }\n\n if (this.view() === 'month') {\n if (parts.length === 2) {\n let m: number, y: number;\n if (this.locale() === 'en') {\n m = Number(parts[0]);\n y = Number(parts[1]);\n } else {\n m = Number(parts[0]);\n y = Number(parts[1]);\n }\n if (m >= 1 && m <= 12 && y >= 1900 && y <= 2100) {\n return `${y}-${String(m).padStart(2, '0')}`;\n }\n }\n return null;\n }\n\n // date view\n if (parts.length >= 3) {\n let d: number, m: number, y: number;\n if (this.locale() === 'en') {\n m = Number(parts[0]);\n d = Number(parts[1]);\n y = Number(parts[2]);\n } else {\n d = Number(parts[0]);\n m = Number(parts[1]);\n y = Number(parts[2]);\n }\n if (y >= 1900 && y <= 2100 && m >= 1 && m <= 12 && d >= 1 && d <= 31) {\n const date = new Date(y, m - 1, d);\n if (date.getMonth() === m - 1 && date.getDate() === d) {\n let result = `${y}-${String(m).padStart(2, '0')}-${String(d).padStart(2, '0')}`;\n if (this.showTime()) {\n const time = `${String(this.viewHour()).padStart(2, '0')}:${String(this.viewMinute()).padStart(2, '0')}`;\n result += `T${time}`;\n }\n return result;\n }\n }\n }\n return null;\n }\n\n /** Parses time-only input. */\n private parseTimeOnly(text: string): string | null {\n const clean = text.replace(/[\\.]/g, ':').trim();\n const parts = clean.split(':').filter(Boolean);\n if (parts.length >= 2) {\n let h = Number(parts[0]);\n const m = Number(parts[1]);\n const s = parts.length >= 3 ? Number(parts[2]) : 0;\n if (this.hourFormat() === '12') {\n const isPM = /pm/i.test(text);\n const isAM = /am/i.test(text);\n if (isPM && h < 12) h += 12;\n if (isAM && h === 12) h = 0;\n }\n if (h >= 0 && h <= 23 && m >= 0 && m <= 59 && s >= 0 && s <= 59) {\n let result = `${String(h).padStart(2, '0')}:${String(m).padStart(2, '0')}`;\n if (this.showSeconds()) result += `:${String(s).padStart(2, '0')}`;\n return result;\n }\n }\n return null;\n }\n\n /** Whether the given day is today's date. */\n isToday(day: number): boolean {\n const now = new Date();\n return (\n this.viewYear() === now.getFullYear() &&\n this.viewMonth() === now.getMonth() &&\n day === now.getDate()\n );\n }\n\n /** ISO date (YYYY-MM-DD) of the week start containing the given date. */\n private weekStartISO(date: Date): string {\n const ws = this.weekStart();\n const start = new Date(\n date.getFullYear(),\n date.getMonth(),\n date.getDate() - ((date.getDay() - ws + 7) % 7),\n );\n return (\n `${start.getFullYear()}-` +\n `${String(start.getMonth() + 1).padStart(2, '0')}-` +\n `${String(start.getDate()).padStart(2, '0')}`\n );\n }\n\n /** Whether the given week row contains the displayed/selected date. */\n isSelectedWeek(start: Date): boolean {\n const date = this.displayedDate();\n if (!date) return false;\n return this.weekStartISO(new Date(date + 'T12:00:00')) === this.weekStartISO(start);\n }\n\n /** Whether the given week row contains today's date. */\n isCurrentWeek(start: Date): boolean {\n return this.weekStartISO(new Date()) === this.weekStartISO(start);\n }\n\n /** Whether the given month matches the selected month and year. */\n isSelectedMonth(monthIndex: number): boolean {\n return this.selectedMonthValue() === monthIndex;\n }\n\n isCurrentMonth(monthIndex: number): boolean {\n const now = new Date();\n return this.viewYear() === now.getFullYear() && monthIndex === now.getMonth();\n }\n\n isSelectedYear(year: number): boolean {\n return this.selectedYearValue() === year;\n }\n\n isCurrentYear(year: number): boolean {\n return new Date().getFullYear() === year;\n }\n\n writeValue(value: any): void {\n this._value.set(value || null);\n }\n\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this._disabledState.set(isDisabled);\n this.cdr.markForCheck();\n }\n}\n","<div class=\"relative mb-4\">\n @if (label()) {\n <div class=\"text-sm font-medium _shk-text-surface-700 dark:[color:var(--shk-surface-600)] mb-1\">\n {{ label() }}\n </div>\n }\n\n <div class=\"relative\">\n <div class=\"relative\">\n <input\n [id]=\"id()\"\n type=\"text\"\n [disabled]=\"isDisabled()\"\n [placeholder]=\"inputPlaceholder()\"\n [value]=\"isTyping() ? typedValue() : displayLabel()\"\n (input)=\"onInputText($event)\"\n (focus)=\"onInputFocus()\"\n (blur)=\"onInputBlur()\"\n (keydown.enter)=\"$any($event.target).blur()\"\n (keydown.escape)=\"cancelTyping()\"\n (click)=\"toggle()\"\n class=\"date-input-field\"\n [ngClass]=\"{\n 'input-error': shouldShowError() || typingValid() === false,\n 'input-valid': wasFixedError() || typingValid() === true,\n }\"\n [attr.aria-invalid]=\"shouldShowError()\"\n [attr.aria-describedby]=\"shouldShowError() ? id() + '-error' : null\"\n />\n <button\n type=\"button\"\n [disabled]=\"isDisabled()\"\n (click)=\"toggle()\"\n class=\"absolute right-2 top-1/2 -translate-y-1/2 p-1 _shk-text-surface-400 dark:[color:var(--shk-surface-400)] hover:[color:var(--shk-surface-600)] dark:hover:[color:var(--shk-surface-300)] transition-colors\"\n >\n <svg\n class=\"w-4 h-4\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n >\n <rect x=\"3\" y=\"4\" width=\"18\" height=\"18\" rx=\"2\"></rect>\n <path d=\"M16 2v4M8 2v4M3 10h18\"></path>\n </svg>\n </button>\n </div>\n\n @if (isOpen()) {\n <div class=\"fixed inset-0 z-40 bg-black/30\" (click)=\"close()\"></div>\n <div\n class=\"fixed z-50 top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-72 p-4 bg-white dark:[background-color:var(--shk-surface-100)] _shk-border dark:[border-color:var(--shk-surface-200)] rounded-lg shadow-xl\"\n (click)=\"$event.stopPropagation()\"\n >\n <!-- DATE VIEW -->\n @if (!timeOnly() && currentView() === 'date') {\n <div class=\"flex items-center justify-between mb-3\">\n <button\n type=\"button\"\n (click)=\"drillUp()\"\n class=\"p-1 rounded hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]\"\n >\n <svg class=\"w-4 h-4\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M15 18l-6-6 6-6\"></path>\n </svg>\n </button>\n <span class=\"text-sm font-medium _shk-text-surface-700 dark:[color:var(--shk-surface-600)]\">\n {{ monthNames()[viewMonth()] }} {{ selectedYearValue() ?? viewYear() }}\n </span>\n <button\n type=\"button\"\n (click)=\"drillToInitial()\"\n class=\"p-1 rounded hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]\"\n >\n <svg class=\"w-4 h-4\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M9 18l6-6-6-6\"></path>\n </svg>\n </button>\n </div>\n\n <div class=\"grid grid-cols-7 gap-0 mb-1\">\n @for (name of dayNames(); track $index) {\n <div class=\"text-center text-xs font-medium _shk-text-surface-400 dark:[color:var(--shk-surface-400)] py-1\">\n {{ name }}\n </div>\n }\n </div>\n\n <div class=\"grid grid-cols-7 gap-0\">\n @for (day of calendarDays(); track $index) {\n @if (day !== null) {\n <button\n type=\"button\"\n (click)=\"selectDay(day)\"\n class=\"py-1.5 text-sm rounded transition-colors\"\n [ngClass]=\"{\n '_shk-bg-primary _shk-text-white hover:[background-color:var(--shk-primary-700)]': isSelectedDay(day),\n 'ring-1 [--tw-ring-color:var(--shk-primary-500)] _shk-text-surface-700 dark:[color:var(--shk-surface-700)]': isToday(day) && !isSelectedDay(day),\n '_shk-text-surface-700 dark:[color:var(--shk-surface-700)] hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]': !isSelectedDay(day) && !isToday(day),\n }\"\n >\n {{ day }}\n </button>\n } @else {\n <div></div>\n }\n }\n </div>\n }\n\n <!-- WEEK VIEW -->\n @if (!timeOnly() && currentView() === 'week') {\n <div class=\"flex items-center justify-between mb-3\">\n <button\n type=\"button\"\n (click)=\"prev()\"\n [disabled]=\"!canGoPrev()\"\n class=\"p-1 rounded hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)] disabled:opacity-30 disabled:cursor-not-allowed\"\n >\n <svg class=\"w-4 h-4\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M15 18l-6-6 6-6\"></path>\n </svg>\n </button>\n <span class=\"text-sm font-medium _shk-text-surface-700 dark:[color:var(--shk-surface-600)]\">\n {{ monthNames()[viewMonth()] }} {{ viewYear() }}\n </span>\n <button\n type=\"button\"\n (click)=\"next()\"\n [disabled]=\"!canGoNext()\"\n class=\"p-1 rounded hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)] disabled:opacity-30 disabled:cursor-not-allowed\"\n >\n <svg class=\"w-4 h-4\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M9 18l6-6-6-6\"></path>\n </svg>\n </button>\n </div>\n\n <div class=\"space-y-1\">\n @for (week of monthWeeks(); track week.index) {\n <button\n type=\"button\"\n (click)=\"selectWeek(week.start)\"\n class=\"w-full flex items-center justify-between py-1.5 px-2 text-sm rounded transition-colors\"\n [ngClass]=\"{\n '_shk-bg-primary _shk-text-white hover:[background-color:var(--shk-primary-700)]': isSelectedWeek(week.start),\n 'ring-1 [--tw-ring-color:var(--shk-primary-500)] _shk-text-surface-700 dark:[color:var(--shk-surface-700)]': isCurrentWeek(week.start) && !isSelectedWeek(week.start),\n '_shk-text-surface-700 dark:[color:var(--shk-surface-700)] hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]': !isSelectedWeek(week.start) && !isCurrentWeek(week.start),\n }\"\n >\n <span class=\"font-medium\">{{ weekLabel(week.index) }}</span>\n <span class=\"text-xs opacity-80\">{{ week.range }}</span>\n </button>\n }\n </div>\n }\n\n <!-- MONTH VIEW -->\n @if (!timeOnly() && currentView() === 'month') {\n <div class=\"flex items-center justify-between mb-3\">\n <button\n type=\"button\"\n (click)=\"drillUp()\"\n class=\"p-1 rounded hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]\"\n >\n <svg class=\"w-4 h-4\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M15 18l-6-6 6-6\"></path>\n </svg>\n </button>\n <span class=\"text-sm font-medium _shk-text-surface-700 dark:[color:var(--shk-surface-600)]\">\n {{ selectedYearValue() ?? viewYear() }}\n </span>\n <button\n type=\"button\"\n (click)=\"drillToInitial()\"\n class=\"p-1 rounded hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]\"\n >\n <svg class=\"w-4 h-4\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M9 18l6-6-6-6\"></path>\n </svg>\n </button>\n </div>\n\n <div class=\"grid grid-cols-3 gap-1\">\n @for (name of monthNames(); track $index) {\n <button\n type=\"button\"\n (click)=\"selectMonth($index)\"\n class=\"py-2 text-sm rounded transition-colors\"\n [ngClass]=\"{\n '_shk-bg-primary _shk-text-white hover:[background-color:var(--shk-primary-700)]': selectedMonthValue() === $index,\n 'ring-1 [--tw-ring-color:var(--shk-primary-500)] _shk-text-surface-700 dark:[color:var(--shk-surface-700)]': isCurrentMonth($index) && selectedMonthValue() !== $index,\n '_shk-text-surface-700 dark:[color:var(--shk-surface-700)] hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]': selectedMonthValue() !== $index && !isCurrentMonth($index),\n }\"\n >\n {{ name }}\n </button>\n }\n </div>\n }\n\n <!-- YEAR VIEW -->\n @if (!timeOnly() && currentView() === 'year') {\n <div class=\"flex items-center justify-between mb-3\">\n <button\n type=\"button\"\n (click)=\"prev()\"\n [disabled]=\"!canGoPrev()\"\n class=\"p-1 rounded hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)] disabled:opacity-30 disabled:cursor-not-allowed\"\n >\n <svg class=\"w-4 h-4\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M15 18l-6-6 6-6\"></path>\n </svg>\n </button>\n <span class=\"text-sm font-medium _shk-text-surface-700 dark:[color:var(--shk-surface-600)]\">\n {{ viewDecade() }} - {{ viewDecade() + 11 }}\n </span>\n <button\n type=\"button\"\n (click)=\"next()\"\n [disabled]=\"!canGoNext()\"\n class=\"p-1 rounded hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)] disabled:opacity-30 disabled:cursor-not-allowed\"\n >\n <svg class=\"w-4 h-4\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M9 18l6-6-6-6\"></path>\n </svg>\n </button>\n </div>\n\n <div class=\"grid grid-cols-3 gap-1\">\n @for (year of decadeYears(); track year) {\n <button\n type=\"button\"\n (click)=\"selectYear(year)\"\n class=\"py-2 text-sm rounded transition-colors\"\n [ngClass]=\"{\n '_shk-bg-primary _shk-text-white hover:[background-color:var(--shk-primary-700)]': selectedYearValue() === year,\n 'ring-1 [--tw-ring-color:var(--shk-primary-500)] _shk-text-surface-700 dark:[color:var(--shk-surface-700)]': isCurrentYear(year) && selectedYearValue() !== year,\n '_shk-text-surface-700 dark:[color:var(--shk-surface-700)] hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]': selectedYearValue() !== year && !isCurrentYear(year),\n }\"\n >\n {{ year }}\n </button>\n }\n </div>\n }\n\n <!-- ANALOG CLOCK TIME PICKER -->\n @if (timeOnly() || showTime()) {\n <div class=\"mt-3 pt-3 _shk-border dark:[border-color:var(--shk-surface-200)]\">\n <!-- Clock display time -->\n <div class=\"text-center mb-2\">\n <span class=\"text-lg font-semibold _shk-text-surface-700 dark:[color:var(--shk-surface-700)]\">\n {{ clockDisplayTime() }}\n </span>\n </div>\n\n <!-- Analog clock face -->\n <div class=\"clock-container\">\n <svg\n viewBox=\"0 0 200 200\"\n class=\"w-full h-full cursor-pointer\"\n (click)=\"onClockClick($event, clockMode())\"\n >\n <!-- Clock face background -->\n <circle cx=\"100\" cy=\"100\" r=\"96\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1\"\n class=\"_shk-text-surface-200 dark:[color:var(--shk-surface-200)]\" />\n\n <!-- Minute markers -->\n @if (clockMode() === 'minutes') {\n @for (i of [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59]; track i) {\n <line\n [attr.x1]=\"clockMinuteMarker(i).x1\"\n [attr.y1]=\"clockMinuteMarker(i).y1\"\n [attr.x2]=\"clockMinuteMarker(i).x2\"\n [attr.y2]=\"clockMinuteMarker(i).y2\"\n [attr.stroke-width]=\"i % 5 === 0 ? 2 : 1\"\n [class]=\"i % 5 === 0 ? '_shk-text-surface-500 dark:[color:var(--shk-surface-500)]' : '_shk-text-surface-300 dark:[color:var(--shk-surface-400)]'\"\n stroke=\"currentColor\"\n />\n }\n <!-- Minute numbers (00, 05, 10, ...) -->\n @for (m of [0,5,10,15,20,25,30,35,40,45,50,55]; track m) {\n <text\n [attr.x]=\"clockMinutePos(m).x\"\n [attr.y]=\"clockMinutePos(m).y\"\n text-anchor=\"middle\"\n dominant-baseline=\"central\"\n class=\"text-[9px] _shk-text-surface-500 dark:[color:var(--shk-surface-400)]\"\n [class._shk-text-primary]=\"viewMinute() === m\"\n >\n {{ m.toString().padStart(2, '0') }}\n </text>\n }\n }\n\n <!-- Hour numbers -->\n @if (clockMode() === 'hours') {\n @for (h of clockHours(); track h) {\n <text\n [attr.x]=\"clockNumberPos(h).x\"\n [attr.y]=\"clockNumberPos(h).y\"\n text-anchor=\"middle\"\n dominant-baseline=\"central\"\n class=\"text-sm font-medium\"\n [class._shk-text-primary]=\"isClockHourSelected(h)\"\n [class._shk-text-surface-700]=\"!isClockHourSelected(h)\"\n >\n {{ h }}\n </text>\n }\n }\n\n <!-- Clock hand -->\n <line\n x1=\"100\" y1=\"100\"\n [attr.x2]=\"clockHandLine(60).x2\"\n [attr.y2]=\"clockHandLine(60).y2\"\n class=\"_shk-text-primary\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n\n <!-- Center dot -->\n <circle cx=\"100\" cy=\"100\" r=\"4\" class=\"fill-current _shk-text-primary\" />\n </svg>\n </div>\n\n <!-- Mode toggle: Hours / Minutes -->\n <div class=\"clock-mode-toggle\">\n <button\n type=\"button\"\n (click)=\"clockMode.set('hours')\"\n class=\"clock-mode-btn\"\n [class.active]=\"clockMode() === 'hours'\"\n >\n {{ 'Horas' }}\n </button>\n <button\n type=\"button\"\n (click)=\"clockMode.set('minutes')\"\n class=\"clock-mode-btn\"\n [class.active]=\"clockMode() === 'minutes'\"\n >\n {{ 'Minutos' }}\n </button>\n </div>\n\n <!-- AM/PM toggle for 12h format -->\n @if (hourFormat() === '12') {\n <div class=\"flex items-center justify-center gap-2 mt-2\">\n <button\n type=\"button\"\n (click)=\"viewMeridiem.set('AM')\"\n class=\"px-3 py-1 text-xs font-medium rounded-full transition-colors\"\n [ngClass]=\"{\n '_shk-bg-primary _shk-text-white': viewMeridiem() === 'AM',\n '_shk-text-surface-500 hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]': viewMeridiem() !== 'AM'\n }\"\n >\n AM\n </button>\n <button\n type=\"button\"\n (click)=\"viewMeridiem.set('PM')\"\n class=\"px-3 py-1 text-xs font-medium rounded-full transition-colors\"\n [ngClass]=\"{\n '_shk-bg-primary _shk-text-white': viewMeridiem() === 'PM',\n '_shk-text-surface-500 hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]': viewMeridiem() !== 'PM'\n }\"\n >\n PM\n </button>\n </div>\n }\n\n <!-- Seconds selector (if enabled) -->\n @if (showSeconds()) {\n <div class=\"flex items-center justify-center gap-1 mt-2\">\n <span class=\"text-xs _shk-text-surface-400\">Seg:</span>\n <select\n class=\"px-2 py-1 text-xs _shk-bg-surface-50 dark:[background-color:var(--shk-surface-100)] _shk-border dark:[border-color:var(--shk-surface-200)] rounded-md\"\n [value]=\"viewSecond()\"\n (change)=\"onSecondChange($event)\"\n aria-label=\"Segundos\"\n >\n @for (seconds of secondsRange(); track seconds) {\n <option [value]=\"seconds\">{{ minutesLabel(seconds) }}</option>\n }\n </select>\n </div>\n }\n\n <!-- Confirm button -->\n <button\n type=\"button\"\n (click)=\"confirmTime()\"\n class=\"mt-3 w-full py-2 text-sm _shk-bg-primary _shk-text-white rounded-lg hover:[background-color:var(--shk-primary-700)] transition-colors\"\n >\n {{ timeOnly() ? 'Confirmar' : 'Introducir hora' }}\n </button>\n </div>\n }\n </div>\n }\n </div>\n\n @if (shouldShowError()) {\n <div [id]=\"id() + '-error'\" class=\"mt-1 text-xs text-red-500 max-h-20 overflow-y-auto _shk-scrollbar\">\n <ul class=\"list-disc pl-4 space-y-1\">\n @for (error of getErrorMessages(); track error) {\n <li>{{ error }}</li>\n }\n </ul>\n </div>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AA+BA;;;;AAIG;AAEH;;;;AAIG;MA4LU,mBAAmB,CAAA;;IAuQ9B,eAAe,CAAC,KAAW,EAAE,GAAS,EAAA;AACpC,QAAA,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,EAAE;AACzB,QAAA,MAAM,MAAM,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,GAAG,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC;AAC/D,QAAA,MAAM,QAAQ,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;QACjE,MAAM,UAAU,GAAG,CAAA,EAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA,CAAA,EAAI,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA,CAAE;QACvF,IAAI,KAAK,CAAC,QAAQ,EAAE,KAAK,GAAG,CAAC,QAAQ,EAAE,IAAI,KAAK,CAAC,WAAW,EAAE,KAAK,GAAG,CAAC,WAAW,EAAE,EAAE;YACpF,MAAM,IAAI,GAAG,KAAK,CAAC,WAAW,E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,CAAC;;sBASzC,YAAY;uBAAC,yBAAyB;;;AEroBzC;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shirkasoft-ui-components",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.8",
|
|
4
4
|
"description": "Angular UI Components Library — themeable via CSS custom properties",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"bugs": {
|
|
20
20
|
"url": "https://github.com/Ansem13/shirkasoft-ui-components/issues"
|
|
21
21
|
},
|
|
22
|
-
"homepage": "https://
|
|
22
|
+
"homepage": "https://ui-library.shirkasoft.com/",
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"@angular/common": "^21.2.0",
|
|
25
25
|
"@angular/core": "^21.2.0",
|
|
@@ -2,7 +2,7 @@ import * as _angular_core from '@angular/core';
|
|
|
2
2
|
import { ControlValueAccessor, FormGroup, FormControl } from '@angular/forms';
|
|
3
3
|
|
|
4
4
|
/** Which granularity the picker edits: a day, a month or a year. */
|
|
5
|
-
type DatePickerView = 'date' | 'month' | 'year';
|
|
5
|
+
type DatePickerView = 'date' | 'week' | 'month' | 'year';
|
|
6
6
|
/** Which time selection mode the analog clock is in. */
|
|
7
7
|
type ClockMode = 'hours' | 'minutes';
|
|
8
8
|
/**
|
|
@@ -22,8 +22,10 @@ declare class DatePickerComponent implements ControlValueAccessor {
|
|
|
22
22
|
private transloco;
|
|
23
23
|
/** HTML id for the input (for label/for pairing). */
|
|
24
24
|
id: _angular_core.InputSignal<string>;
|
|
25
|
-
/** Granularity of the picker ('date' | 'month' | 'year'). */
|
|
25
|
+
/** Granularity of the picker ('date' | 'week' | 'month' | 'year'). */
|
|
26
26
|
view: _angular_core.InputSignal<DatePickerView>;
|
|
27
|
+
/** First day of the week (0=Sunday ... 6=Saturday), used by week view. */
|
|
28
|
+
weekStart: _angular_core.InputSignal<number>;
|
|
27
29
|
/** Label shown above the input. */
|
|
28
30
|
label: _angular_core.InputSignal<string>;
|
|
29
31
|
/** Placeholder of the input. */
|
|
@@ -128,6 +130,17 @@ declare class DatePickerComponent implements ControlValueAccessor {
|
|
|
128
130
|
firstDayOfMonth: _angular_core.Signal<number>;
|
|
129
131
|
/** Calendar grid: nulls for leading blanks then the days of the month. */
|
|
130
132
|
calendarDays: _angular_core.Signal<(number | null)[]>;
|
|
133
|
+
/** Weeks of the viewed month (rows aligned to `weekStart`), for week view. */
|
|
134
|
+
monthWeeks: _angular_core.Signal<{
|
|
135
|
+
index: number;
|
|
136
|
+
start: Date;
|
|
137
|
+
end: Date;
|
|
138
|
+
range: string;
|
|
139
|
+
}[]>;
|
|
140
|
+
/** Localized range label for a week (e.g. '2 — 8 feb'). */
|
|
141
|
+
formatWeekRange(start: Date, end: Date): string;
|
|
142
|
+
/** Localized label for a week row ('Semana N' / 'Week N'). */
|
|
143
|
+
weekLabel(index: number): string;
|
|
131
144
|
/** Whether the prev navigation button is allowed by `minValue`. */
|
|
132
145
|
canGoPrev: _angular_core.Signal<boolean>;
|
|
133
146
|
/** Whether the next navigation button is allowed by `maxValue`. */
|
|
@@ -171,7 +184,8 @@ declare class DatePickerComponent implements ControlValueAccessor {
|
|
|
171
184
|
selectMonth(monthIndex: number): void;
|
|
172
185
|
/** Selects a day - completes the date selection. */
|
|
173
186
|
selectDay(day: number): void;
|
|
174
|
-
/**
|
|
187
|
+
/** Selects a week - emits its start date (YYYY-MM-DD). */
|
|
188
|
+
selectWeek(start: Date): void;
|
|
175
189
|
private setValue;
|
|
176
190
|
/** Confirms the selected time and commits the combined date+time value. */
|
|
177
191
|
confirmTime(): void;
|
|
@@ -272,6 +286,12 @@ declare class DatePickerComponent implements ControlValueAccessor {
|
|
|
272
286
|
private parseTimeOnly;
|
|
273
287
|
/** Whether the given day is today's date. */
|
|
274
288
|
isToday(day: number): boolean;
|
|
289
|
+
/** ISO date (YYYY-MM-DD) of the week start containing the given date. */
|
|
290
|
+
private weekStartISO;
|
|
291
|
+
/** Whether the given week row contains the displayed/selected date. */
|
|
292
|
+
isSelectedWeek(start: Date): boolean;
|
|
293
|
+
/** Whether the given week row contains today's date. */
|
|
294
|
+
isCurrentWeek(start: Date): boolean;
|
|
275
295
|
/** Whether the given month matches the selected month and year. */
|
|
276
296
|
isSelectedMonth(monthIndex: number): boolean;
|
|
277
297
|
isCurrentMonth(monthIndex: number): boolean;
|
|
@@ -282,7 +302,7 @@ declare class DatePickerComponent implements ControlValueAccessor {
|
|
|
282
302
|
registerOnTouched(fn: any): void;
|
|
283
303
|
setDisabledState(isDisabled: boolean): void;
|
|
284
304
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DatePickerComponent, never>;
|
|
285
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DatePickerComponent, "shk-date-picker", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "view": { "alias": "view"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "formGroup": { "alias": "formGroup"; "required": false; "isSignal": true; }; "control": { "alias": "control"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; "errorMessages": { "alias": "errorMessages"; "required": false; "isSignal": true; }; "minValue": { "alias": "minValue"; "required": false; "isSignal": true; }; "maxValue": { "alias": "maxValue"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "timeOnly": { "alias": "timeOnly"; "required": false; "isSignal": true; }; "showTime": { "alias": "showTime"; "required": false; "isSignal": true; }; "hourFormat": { "alias": "hourFormat"; "required": false; "isSignal": true; }; "showSeconds": { "alias": "showSeconds"; "required": false; "isSignal": true; }; "minuteStep": { "alias": "minuteStep"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
305
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DatePickerComponent, "shk-date-picker", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "view": { "alias": "view"; "required": false; "isSignal": true; }; "weekStart": { "alias": "weekStart"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "formGroup": { "alias": "formGroup"; "required": false; "isSignal": true; }; "control": { "alias": "control"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; "errorMessages": { "alias": "errorMessages"; "required": false; "isSignal": true; }; "minValue": { "alias": "minValue"; "required": false; "isSignal": true; }; "maxValue": { "alias": "maxValue"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "timeOnly": { "alias": "timeOnly"; "required": false; "isSignal": true; }; "showTime": { "alias": "showTime"; "required": false; "isSignal": true; }; "hourFormat": { "alias": "hourFormat"; "required": false; "isSignal": true; }; "showSeconds": { "alias": "showSeconds"; "required": false; "isSignal": true; }; "minuteStep": { "alias": "minuteStep"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
286
306
|
}
|
|
287
307
|
|
|
288
308
|
export { DatePickerComponent };
|