shirkasoft-ui-components 1.3.6 → 1.3.7

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.
@@ -75,10 +75,14 @@ class DatePickerComponent {
75
75
  this.viewMeridiem = signal('AM', ...(ngDevMode ? [{ debugName: "viewMeridiem" }] : /* istanbul ignore next */ []));
76
76
  /** Date part selected but not yet committed until the time is confirmed. */
77
77
  this.pendingDate = signal(null, ...(ngDevMode ? [{ debugName: "pendingDate" }] : /* istanbul ignore next */ []));
78
+ /** Selected year during the selection flow (year -> month -> day). */
79
+ this.selectedYearValue = signal(null, ...(ngDevMode ? [{ debugName: "selectedYearValue" }] : /* istanbul ignore next */ []));
80
+ /** Selected month during the selection flow. */
81
+ this.selectedMonthValue = signal(null, ...(ngDevMode ? [{ debugName: "selectedMonthValue" }] : /* istanbul ignore next */ []));
78
82
  /** Analog clock mode: 'hours' or 'minutes'. */
79
83
  this.clockMode = signal('hours', ...(ngDevMode ? [{ debugName: "clockMode" }] : /* istanbul ignore next */ []));
80
84
  /** Internal view state for drill-down navigation (separates from input `view`). */
81
- this.currentView = signal('date', ...(ngDevMode ? [{ debugName: "currentView" }] : /* istanbul ignore next */ []));
85
+ this.currentView = signal('year', ...(ngDevMode ? [{ debugName: "currentView" }] : /* istanbul ignore next */ []));
82
86
  /** Whether the user is typing in the input field. */
83
87
  this.isTyping = signal(false, ...(ngDevMode ? [{ debugName: "isTyping" }] : /* istanbul ignore next */ []));
84
88
  /** The raw text being typed by the user. */
@@ -232,7 +236,7 @@ class DatePickerComponent {
232
236
  }, ...(ngDevMode ? [{ debugName: "calendarDays" }] : /* istanbul ignore next */ []));
233
237
  /** Whether the prev navigation button is allowed by `minValue`. */
234
238
  this.canGoPrev = computed(() => {
235
- const v = this.view();
239
+ const v = this.currentView();
236
240
  const min = this.minValue();
237
241
  if (v === 'date') {
238
242
  if (!min)
@@ -244,12 +248,13 @@ class DatePickerComponent {
244
248
  const minY = min ? Number(min.split('-')[0]) : undefined;
245
249
  return minY === undefined || this.viewYear() > minY;
246
250
  }
247
- const minY = min ? Number(min) : undefined;
251
+ // year view
252
+ const minY = min ? Number(min.split('-')[0]) : undefined;
248
253
  return minY === undefined || this.viewYear() > minY;
249
254
  }, ...(ngDevMode ? [{ debugName: "canGoPrev" }] : /* istanbul ignore next */ []));
250
255
  /** Whether the next navigation button is allowed by `maxValue`. */
251
256
  this.canGoNext = computed(() => {
252
- const v = this.view();
257
+ const v = this.currentView();
253
258
  const max = this.maxValue();
254
259
  if (v === 'date') {
255
260
  if (!max)
@@ -261,7 +266,8 @@ class DatePickerComponent {
261
266
  const maxY = max ? Number(max.split('-')[0]) : undefined;
262
267
  return maxY === undefined || this.viewYear() < maxY;
263
268
  }
264
- const maxY = max ? Number(max) : undefined;
269
+ // year view
270
+ const maxY = max ? Number(max.split('-')[0]) : undefined;
265
271
  return maxY === undefined || this.viewYear() < maxY;
266
272
  }, ...(ngDevMode ? [{ debugName: "canGoNext" }] : /* istanbul ignore next */ []));
267
273
  /** Year of the displayed date, if any. */
@@ -302,8 +308,6 @@ class DatePickerComponent {
302
308
  const loc = this.locale();
303
309
  return loc === 'en' ? 'MM/DD/YYYY' : 'DD/MM/YYYY';
304
310
  }, ...(ngDevMode ? [{ debugName: "inputFormat" }] : /* istanbul ignore next */ []));
305
- /** Whether the drill-down navigation is active (view differs from input). */
306
- this.isDrilledDown = computed(() => this.currentView() !== this.view(), ...(ngDevMode ? [{ debugName: "isDrilledDown" }] : /* istanbul ignore next */ []));
307
311
  /** (Unused legacy placeholder) plain year list. */
308
312
  this.years = [];
309
313
  // Attach error-state subscriptions to the validated control once found.
@@ -363,7 +367,9 @@ class DatePickerComponent {
363
367
  }
364
368
  else {
365
369
  this.syncViewToValue();
366
- this.currentView.set(this.view());
370
+ this.currentView.set('year');
371
+ this.selectedYearValue.set(null);
372
+ this.selectedMonthValue.set(null);
367
373
  this.clockMode.set('hours');
368
374
  this.isTyping.set(false);
369
375
  this.isOpen.set(true);
@@ -388,6 +394,7 @@ class DatePickerComponent {
388
394
  const timePart = val.includes('T') ? val.split('T')[1] : undefined;
389
395
  if (v === 'year') {
390
396
  this.viewYear.set(Number(datePart));
397
+ this.viewDecade.set(Math.floor(Number(datePart) / 10) * 10);
391
398
  }
392
399
  else if (v === 'month') {
393
400
  this.viewYear.set(Number(datePart.split('-')[0]));
@@ -424,7 +431,7 @@ class DatePickerComponent {
424
431
  }
425
432
  /** Navigates the calendar to the previous year/month/decade. */
426
433
  prev() {
427
- const v = this.view();
434
+ const v = this.currentView();
428
435
  if (v === 'year') {
429
436
  this.viewDecade.update((d) => d - 12);
430
437
  this.viewYear.update((y) => y - 12);
@@ -444,7 +451,7 @@ class DatePickerComponent {
444
451
  }
445
452
  /** Navigates the calendar to the next year/month/decade. */
446
453
  next() {
447
- const v = this.view();
454
+ const v = this.currentView();
448
455
  if (v === 'year') {
449
456
  this.viewDecade.update((d) => d + 12);
450
457
  this.viewYear.update((y) => y + 12);
@@ -462,30 +469,25 @@ class DatePickerComponent {
462
469
  });
463
470
  }
464
471
  }
465
- /** Selects a day of the month (pending if time is shown). */
466
- selectDay(day) {
467
- const y = this.viewYear();
468
- const m = String(this.viewMonth() + 1).padStart(2, '0');
469
- const d = String(day).padStart(2, '0');
470
- const value = `${y}-${m}-${d}`;
471
- if (this.showTime()) {
472
- this.pendingDate.set(value);
473
- return;
474
- }
475
- this.setValue(value);
472
+ /** Selects a year - stores it and navigates to month selection. */
473
+ selectYear(year) {
474
+ this.selectedYearValue.set(year);
475
+ this.viewYear.set(year);
476
+ this.currentView.set('month');
476
477
  }
477
- /** Selects a month of the year (pending if time is shown). */
478
+ /** Selects a month - stores it and navigates to day selection. */
478
479
  selectMonth(monthIndex) {
479
- const value = `${this.viewYear()}-${String(monthIndex + 1).padStart(2, '0')}`;
480
- if (this.showTime()) {
481
- this.pendingDate.set(value);
482
- return;
483
- }
484
- this.setValue(value);
480
+ this.selectedMonthValue.set(monthIndex);
481
+ this.viewMonth.set(monthIndex);
482
+ this.currentView.set('date');
485
483
  }
486
- /** Selects a year (pending if time is shown). */
487
- selectYear(year) {
488
- const value = String(year);
484
+ /** Selects a day - completes the date selection. */
485
+ selectDay(day) {
486
+ const year = this.selectedYearValue() ?? this.viewYear();
487
+ const month = this.selectedMonthValue() ?? this.viewMonth();
488
+ const m = String(month + 1).padStart(2, '0');
489
+ const d = String(day).padStart(2, '0');
490
+ const value = `${year}-${m}-${d}`;
489
491
  if (this.showTime()) {
490
492
  this.pendingDate.set(value);
491
493
  return;
@@ -721,21 +723,15 @@ class DatePickerComponent {
721
723
  y2: 100 + innerR * Math.sin(angle),
722
724
  };
723
725
  }
724
- /** Switches the drill-down view to months (from date view). */
725
- drillToMonths() {
726
- this.currentView.set('month');
727
- }
728
- /** Switches the drill-down view to years (from month view). */
729
- drillToYears() {
730
- this.currentView.set('year');
731
- }
732
726
  /** Drills down from year view to month view for the selected year. */
733
727
  drillDownToMonth(year) {
728
+ this.selectedYearValue.set(year);
734
729
  this.viewYear.set(year);
735
730
  this.currentView.set('month');
736
731
  }
737
732
  /** Drills down from month view to date view for the selected month. */
738
733
  drillDownToDate(monthIndex) {
734
+ this.selectedMonthValue.set(monthIndex);
739
735
  this.viewMonth.set(monthIndex);
740
736
  this.currentView.set('date');
741
737
  }
@@ -743,15 +739,19 @@ class DatePickerComponent {
743
739
  drillUp() {
744
740
  const v = this.currentView();
745
741
  if (v === 'date') {
742
+ this.selectedMonthValue.set(null);
746
743
  this.currentView.set('month');
747
744
  }
748
745
  else if (v === 'month') {
746
+ this.selectedYearValue.set(null);
749
747
  this.currentView.set('year');
750
748
  }
751
749
  }
752
- /** Returns to the initial view from any drill-down level. */
750
+ /** Returns to the initial view (year selection). */
753
751
  drillToInitial() {
754
- this.currentView.set(this.view());
752
+ this.selectedYearValue.set(null);
753
+ this.selectedMonthValue.set(null);
754
+ this.currentView.set('year');
755
755
  }
756
756
  /** Formats input placeholder based on locale. */
757
757
  inputPlaceholder() {
@@ -901,15 +901,14 @@ class DatePickerComponent {
901
901
  }
902
902
  /** Whether the given month matches the selected month and year. */
903
903
  isSelectedMonth(monthIndex) {
904
- return (this.selectedYear() === this.viewYear() &&
905
- this.selectedMonth() === monthIndex);
904
+ return this.selectedMonthValue() === monthIndex;
906
905
  }
907
906
  isCurrentMonth(monthIndex) {
908
907
  const now = new Date();
909
- return (this.viewYear() === now.getFullYear() && monthIndex === now.getMonth());
908
+ return this.viewYear() === now.getFullYear() && monthIndex === now.getMonth();
910
909
  }
911
910
  isSelectedYear(year) {
912
- return this.selectedYear() === year;
911
+ return this.selectedYearValue() === year;
913
912
  }
914
913
  isCurrentYear(year) {
915
914
  return new Date().getFullYear() === year;
@@ -934,7 +933,7 @@ class DatePickerComponent {
934
933
  useExisting: forwardRef(() => DatePickerComponent),
935
934
  multi: true,
936
935
  },
937
- ], 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)=\"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 <button\n type=\"button\"\n (click)=\"drillToMonths()\"\n class=\"text-sm font-medium _shk-text-surface-700 dark:[color:var(--shk-surface-600)] hover:_shk-text-primary cursor-pointer hover:underline transition-colors\"\n >\n {{ monthNames()[viewMonth()] }} {{ viewYear() }}\n </button>\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-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)=\"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 <button\n type=\"button\"\n (click)=\"drillToYears()\"\n class=\"text-sm font-medium _shk-text-surface-700 dark:[color:var(--shk-surface-600)] hover:_shk-text-primary cursor-pointer hover:underline transition-colors\"\n >\n {{ viewYear() }}\n </button>\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 (name of monthNames(); track $index) {\n <button\n type=\"button\"\n (click)=\"drillDownToDate($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)]': isSelectedMonth($index),\n 'ring-1 [--tw-ring-color:var(--shk-primary-500)] _shk-text-surface-700 dark:[color:var(--shk-surface-700)]': isCurrentMonth($index) && !isSelectedMonth($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)]': !isSelectedMonth($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)=\"drillDownToMonth(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)]': isSelectedYear(year),\n 'ring-1 [--tw-ring-color:var(--shk-primary-500)] _shk-text-surface-700 dark:[color:var(--shk-surface-700)]': isCurrentYear(year) && !isSelectedYear(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)]': !isSelectedYear(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 }); }
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 }); }
938
937
  }
939
938
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: DatePickerComponent, decorators: [{
940
939
  type: Component,
@@ -944,7 +943,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImpo
944
943
  useExisting: forwardRef(() => DatePickerComponent),
945
944
  multi: true,
946
945
  },
947
- ], 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)=\"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 <button\n type=\"button\"\n (click)=\"drillToMonths()\"\n class=\"text-sm font-medium _shk-text-surface-700 dark:[color:var(--shk-surface-600)] hover:_shk-text-primary cursor-pointer hover:underline transition-colors\"\n >\n {{ monthNames()[viewMonth()] }} {{ viewYear() }}\n </button>\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-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)=\"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 <button\n type=\"button\"\n (click)=\"drillToYears()\"\n class=\"text-sm font-medium _shk-text-surface-700 dark:[color:var(--shk-surface-600)] hover:_shk-text-primary cursor-pointer hover:underline transition-colors\"\n >\n {{ viewYear() }}\n </button>\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 (name of monthNames(); track $index) {\n <button\n type=\"button\"\n (click)=\"drillDownToDate($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)]': isSelectedMonth($index),\n 'ring-1 [--tw-ring-color:var(--shk-primary-500)] _shk-text-surface-700 dark:[color:var(--shk-surface-700)]': isCurrentMonth($index) && !isSelectedMonth($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)]': !isSelectedMonth($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)=\"drillDownToMonth(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)]': isSelectedYear(year),\n 'ring-1 [--tw-ring-color:var(--shk-primary-500)] _shk-text-surface-700 dark:[color:var(--shk-surface-700)]': isCurrentYear(year) && !isSelectedYear(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)]': !isSelectedYear(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"] }]
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"] }]
948
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: [{
949
948
  type: HostListener,
950
949
  args: ['document:click', ['$event']]
@@ -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\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>('date');\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.view();\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 const minY = min ? Number(min) : 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.view();\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 const maxY = max ? Number(max) : 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 /** Whether the drill-down navigation is active (view differs from input). */\n isDrilledDown = computed(() => this.currentView() !== this.view());\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());\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 } 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.view();\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.view();\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 day of the month (pending if time is shown). */\n selectDay(day: number): void {\n const y = this.viewYear();\n const m = String(this.viewMonth() + 1).padStart(2, '0');\n const d = String(day).padStart(2, '0');\n const value = `${y}-${m}-${d}`;\n if (this.showTime()) {\n this.pendingDate.set(value);\n return;\n }\n this.setValue(value);\n }\n\n /** Selects a month of the year (pending if time is shown). */\n selectMonth(monthIndex: number): void {\n const value = `${this.viewYear()}-${String(monthIndex + 1).padStart(2, '0')}`;\n if (this.showTime()) {\n this.pendingDate.set(value);\n return;\n }\n this.setValue(value);\n }\n\n /** Selects a year (pending if time is shown). */\n selectYear(year: number): void {\n const value = String(year);\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 /** Switches the drill-down view to months (from date view). */\n drillToMonths(): void {\n this.currentView.set('month');\n }\n\n /** Switches the drill-down view to years (from month view). */\n drillToYears(): void {\n this.currentView.set('year');\n }\n\n /** Drills down from year view to month view for the selected year. */\n drillDownToMonth(year: number): void {\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.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.currentView.set('month');\n } else if (v === 'month') {\n this.currentView.set('year');\n }\n }\n\n /** Returns to the initial view from any drill-down level. */\n drillToInitial(): void {\n this.currentView.set(this.view());\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 (\n this.selectedYear() === this.viewYear() &&\n this.selectedMonth() === monthIndex\n );\n }\n\n isCurrentMonth(monthIndex: number): boolean {\n const now = new Date();\n return (\n this.viewYear() === now.getFullYear() && monthIndex === now.getMonth()\n );\n }\n\n isSelectedYear(year: number): boolean {\n return this.selectedYear() === 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)=\"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 <button\n type=\"button\"\n (click)=\"drillToMonths()\"\n class=\"text-sm font-medium _shk-text-surface-700 dark:[color:var(--shk-surface-600)] hover:_shk-text-primary cursor-pointer hover:underline transition-colors\"\n >\n {{ monthNames()[viewMonth()] }} {{ viewYear() }}\n </button>\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-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)=\"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 <button\n type=\"button\"\n (click)=\"drillToYears()\"\n class=\"text-sm font-medium _shk-text-surface-700 dark:[color:var(--shk-surface-600)] hover:_shk-text-primary cursor-pointer hover:underline transition-colors\"\n >\n {{ viewYear() }}\n </button>\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 (name of monthNames(); track $index) {\n <button\n type=\"button\"\n (click)=\"drillDownToDate($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)]': isSelectedMonth($index),\n 'ring-1 [--tw-ring-color:var(--shk-primary-500)] _shk-text-surface-700 dark:[color:var(--shk-surface-700)]': isCurrentMonth($index) && !isSelectedMonth($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)]': !isSelectedMonth($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)=\"drillDownToMonth(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)]': isSelectedYear(year),\n 'ring-1 [--tw-ring-color:var(--shk-primary-500)] _shk-text-surface-700 dark:[color:var(--shk-surface-700)]': isCurrentYear(year) && !isSelectedYear(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)]': !isSelectedYear(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;AAuT9B,IAAA,WAAA,GAAA;AAtTQ,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAC/B,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC/B,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAC/B,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,gBAAgB,CAAC;;AAG5C,QAAA,IAAA,CAAA,EAAE,GAAG,KAAK,CAAS,EAAE,yEAAC;;AAEtB,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAiB,MAAM,2EAAC;;AAEpC,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAS,EAAE,4EAAC;;AAEzB,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAS,EAAE,kFAAC;;AAE/B,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAwB,SAAS,gFAAC;;AAEnD,QAAA,IA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C,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBA3L/B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,EAAA,UAAA,EACf,IAAI,EAAA,OAAA,EACP,CAAC,YAAY,EAAE,mBAAmB,CAAC,EAAA,eAAA,EAE3B,uBAAuB,CAAC,MAAM,EAAA,SAAA,EACpC;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,yBAAyB,CAAC;AAClD,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACF,qBAAA,EAAA,QAAA,EAAA,y3iBAAA,EAAA,MAAA,EAAA,CAAA,mrGAAA,CAAA,EAAA;;sBAghBA,YAAY;uBAAC,gBAAgB,EAAE,CAAC,QAAQ,CAAC;;sBASzC,YAAY;uBAAC,yBAAyB;;;AE/kBzC;;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' | '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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ACf,IAAI,EAAA,OAAA,EACP,CAAC,YAAY,EAAE,mBAAmB,CAAC,EAAA,eAAA,EAE3B,uBAAuB,CAAC,MAAM,EAAA,SAAA,EACpC;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,yBAAyB,CAAC;AAClD,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACF,qBAAA,EAAA,QAAA,EAAA,gxhBAAA,EAAA,MAAA,EAAA,CAAA,mrGAAA,CAAA,EAAA;;sBAmhBA,YAAY;uBAAC,gBAAgB,EAAE,CAAC,QAAQ,CAAC;;sBASzC,YAAY;uBAAC,yBAAyB;;;AEllBzC;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shirkasoft-ui-components",
3
- "version": "1.3.6",
3
+ "version": "1.3.7",
4
4
  "description": "Angular UI Components Library — themeable via CSS custom properties",
5
5
  "keywords": [
6
6
  "angular",
@@ -74,6 +74,10 @@ declare class DatePickerComponent implements ControlValueAccessor {
74
74
  viewMeridiem: _angular_core.WritableSignal<"AM" | "PM">;
75
75
  /** Date part selected but not yet committed until the time is confirmed. */
76
76
  private pendingDate;
77
+ /** Selected year during the selection flow (year -> month -> day). */
78
+ selectedYearValue: _angular_core.WritableSignal<number | null>;
79
+ /** Selected month during the selection flow. */
80
+ selectedMonthValue: _angular_core.WritableSignal<number | null>;
77
81
  /** Analog clock mode: 'hours' or 'minutes'. */
78
82
  clockMode: _angular_core.WritableSignal<ClockMode>;
79
83
  /** Internal view state for drill-down navigation (separates from input `view`). */
@@ -144,8 +148,6 @@ declare class DatePickerComponent implements ControlValueAccessor {
144
148
  clockMinutes: _angular_core.Signal<number[]>;
145
149
  /** The input format string based on locale. */
146
150
  inputFormat: _angular_core.Signal<"MM/DD/YYYY" | "DD/MM/YYYY">;
147
- /** Whether the drill-down navigation is active (view differs from input). */
148
- isDrilledDown: _angular_core.Signal<boolean>;
149
151
  /** (Unused legacy placeholder) plain year list. */
150
152
  years: number[];
151
153
  constructor();
@@ -163,12 +165,12 @@ declare class DatePickerComponent implements ControlValueAccessor {
163
165
  prev(): void;
164
166
  /** Navigates the calendar to the next year/month/decade. */
165
167
  next(): void;
166
- /** Selects a day of the month (pending if time is shown). */
167
- selectDay(day: number): void;
168
- /** Selects a month of the year (pending if time is shown). */
169
- selectMonth(monthIndex: number): void;
170
- /** Selects a year (pending if time is shown). */
168
+ /** Selects a year - stores it and navigates to month selection. */
171
169
  selectYear(year: number): void;
170
+ /** Selects a month - stores it and navigates to day selection. */
171
+ selectMonth(monthIndex: number): void;
172
+ /** Selects a day - completes the date selection. */
173
+ selectDay(day: number): void;
172
174
  /** Commits a value, updates the component, the control and the outputs. */
173
175
  private setValue;
174
176
  /** Confirms the selected time and commits the combined date+time value. */
@@ -246,17 +248,13 @@ declare class DatePickerComponent implements ControlValueAccessor {
246
248
  x2: number;
247
249
  y2: number;
248
250
  };
249
- /** Switches the drill-down view to months (from date view). */
250
- drillToMonths(): void;
251
- /** Switches the drill-down view to years (from month view). */
252
- drillToYears(): void;
253
251
  /** Drills down from year view to month view for the selected year. */
254
252
  drillDownToMonth(year: number): void;
255
253
  /** Drills down from month view to date view for the selected month. */
256
254
  drillDownToDate(monthIndex: number): void;
257
255
  /** Goes back one level in drill-down navigation. */
258
256
  drillUp(): void;
259
- /** Returns to the initial view from any drill-down level. */
257
+ /** Returns to the initial view (year selection). */
260
258
  drillToInitial(): void;
261
259
  /** Formats input placeholder based on locale. */
262
260
  inputPlaceholder(): string;