@nanahoshi/mona-ui 0.18.6 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/README.md +71 -13
  2. package/THIRD_PARTY_NOTICES.md +60 -0
  3. package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +11 -3
  4. package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +17 -9
  5. package/fesm2022/nanahoshi-mona-ui-button-group.mjs +16 -7
  6. package/fesm2022/nanahoshi-mona-ui-calendar.mjs +196 -101
  7. package/fesm2022/nanahoshi-mona-ui-card.mjs +22 -14
  8. package/fesm2022/nanahoshi-mona-ui-chart.mjs +78 -18
  9. package/fesm2022/nanahoshi-mona-ui-check-box.mjs +1 -1
  10. package/fesm2022/nanahoshi-mona-ui-chip.mjs +11 -3
  11. package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +1 -2
  12. package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +23 -5
  13. package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +49 -28
  14. package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +42 -26
  15. package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +11 -3
  16. package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +39 -21
  17. package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +88 -55
  18. package/fesm2022/nanahoshi-mona-ui-dialog.mjs +57 -25
  19. package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +13 -5
  20. package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +17 -6
  21. package/fesm2022/nanahoshi-mona-ui-editor.mjs +178 -59
  22. package/fesm2022/nanahoshi-mona-ui-filter.mjs +137 -54
  23. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-cell.component-WEDbZ5vy.mjs → nanahoshi-mona-ui-grid-grid-footer-cell.component-BuybF7tX.mjs} +2 -2
  24. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-ibH5osCg.mjs → nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-Dj-SaNzk.mjs} +2 -2
  25. package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-CYAm4l84.mjs +145 -0
  26. package/fesm2022/{nanahoshi-mona-ui-grid-grid-toggle.component-hc-LeIb0.mjs → nanahoshi-mona-ui-grid-grid-toggle.component-B_Gm--X6.mjs} +46 -31
  27. package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-DYajpOb9.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-X0X487Rm.mjs} +5 -5
  28. package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-Pm8Fbp6M.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-CyzJFQIy.mjs} +99 -42
  29. package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
  30. package/fesm2022/nanahoshi-mona-ui-i18n.mjs +4874 -0
  31. package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +12 -4
  32. package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +48 -21
  33. package/fesm2022/nanahoshi-mona-ui-list-box.mjs +33 -18
  34. package/fesm2022/nanahoshi-mona-ui-list-view.mjs +10 -10
  35. package/fesm2022/nanahoshi-mona-ui-list.mjs +2 -0
  36. package/fesm2022/nanahoshi-mona-ui-locales.mjs +4973 -0
  37. package/fesm2022/nanahoshi-mona-ui-menubar.mjs +29 -16
  38. package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +12 -3
  39. package/fesm2022/nanahoshi-mona-ui-notification.mjs +23 -18
  40. package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +211 -106
  41. package/fesm2022/nanahoshi-mona-ui-otp-input.mjs +14 -6
  42. package/fesm2022/nanahoshi-mona-ui-pager.mjs +66 -29
  43. package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +57 -46
  44. package/fesm2022/nanahoshi-mona-ui-popup.mjs +35 -15
  45. package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +38 -17
  46. package/fesm2022/nanahoshi-mona-ui-rating.mjs +25 -7
  47. package/fesm2022/nanahoshi-mona-ui-scroll-view.mjs +431 -101
  48. package/fesm2022/nanahoshi-mona-ui-segmented.mjs +1 -1
  49. package/fesm2022/nanahoshi-mona-ui-sheet.mjs +26 -8
  50. package/fesm2022/nanahoshi-mona-ui-sidebar.mjs +222 -28
  51. package/fesm2022/nanahoshi-mona-ui-slider.mjs +91 -36
  52. package/fesm2022/nanahoshi-mona-ui-spinner.mjs +34 -15
  53. package/fesm2022/nanahoshi-mona-ui-split-button.mjs +39 -23
  54. package/fesm2022/nanahoshi-mona-ui-splitter.mjs +50 -25
  55. package/fesm2022/nanahoshi-mona-ui-stepper.mjs +41 -14
  56. package/fesm2022/nanahoshi-mona-ui-switch.mjs +9 -9
  57. package/fesm2022/nanahoshi-mona-ui-tabs.mjs +74 -56
  58. package/fesm2022/nanahoshi-mona-ui-text-box.mjs +16 -8
  59. package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +47 -24
  60. package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +66 -27
  61. package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +23 -15
  62. package/fesm2022/nanahoshi-mona-ui-window.mjs +71 -40
  63. package/i18n/package.json +4 -0
  64. package/locales/package.json +4 -0
  65. package/package.json +9 -1
  66. package/types/nanahoshi-mona-ui-auto-complete.d.ts +6 -1
  67. package/types/nanahoshi-mona-ui-breadcrumb.d.ts +9 -3
  68. package/types/nanahoshi-mona-ui-button-group.d.ts +9 -3
  69. package/types/nanahoshi-mona-ui-calendar.d.ts +29 -15
  70. package/types/nanahoshi-mona-ui-card.d.ts +8 -2
  71. package/types/nanahoshi-mona-ui-chart.d.ts +10 -1
  72. package/types/nanahoshi-mona-ui-chip.d.ts +7 -1
  73. package/types/nanahoshi-mona-ui-color-gradient.d.ts +6 -1
  74. package/types/nanahoshi-mona-ui-color-palette.d.ts +21 -10
  75. package/types/nanahoshi-mona-ui-color-picker.d.ts +30 -20
  76. package/types/nanahoshi-mona-ui-combo-box.d.ts +6 -1
  77. package/types/nanahoshi-mona-ui-date-picker.d.ts +14 -6
  78. package/types/nanahoshi-mona-ui-datetime-picker.d.ts +40 -12
  79. package/types/nanahoshi-mona-ui-dialog.d.ts +16 -7
  80. package/types/nanahoshi-mona-ui-dropdown-list.d.ts +6 -1
  81. package/types/nanahoshi-mona-ui-dropdowns.d.ts +4 -1
  82. package/types/nanahoshi-mona-ui-editor.d.ts +6 -1
  83. package/types/nanahoshi-mona-ui-filter.d.ts +16 -10
  84. package/types/nanahoshi-mona-ui-grid.d.ts +50 -2
  85. package/types/nanahoshi-mona-ui-i18n.d.ts +680 -0
  86. package/types/nanahoshi-mona-ui-internal-list.d.ts +7 -2
  87. package/types/nanahoshi-mona-ui-internal-tree.d.ts +7 -3
  88. package/types/nanahoshi-mona-ui-list-box.d.ts +9 -4
  89. package/types/nanahoshi-mona-ui-list-view.d.ts +6 -6
  90. package/types/nanahoshi-mona-ui-list.d.ts +1 -1
  91. package/types/nanahoshi-mona-ui-locales.d.ts +4889 -0
  92. package/types/nanahoshi-mona-ui-menubar.d.ts +59 -58
  93. package/types/nanahoshi-mona-ui-multi-select.d.ts +6 -1
  94. package/types/nanahoshi-mona-ui-notification.d.ts +11 -5
  95. package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +24 -15
  96. package/types/nanahoshi-mona-ui-otp-input.d.ts +9 -3
  97. package/types/nanahoshi-mona-ui-pager.d.ts +20 -6
  98. package/types/nanahoshi-mona-ui-popup.d.ts +2 -1
  99. package/types/nanahoshi-mona-ui-progress-bar.d.ts +9 -7
  100. package/types/nanahoshi-mona-ui-rating.d.ts +19 -12
  101. package/types/nanahoshi-mona-ui-scroll-view.d.ts +34 -28
  102. package/types/nanahoshi-mona-ui-sheet.d.ts +8 -2
  103. package/types/nanahoshi-mona-ui-sidebar.d.ts +3 -0
  104. package/types/nanahoshi-mona-ui-slider.d.ts +44 -26
  105. package/types/nanahoshi-mona-ui-spinner.d.ts +13 -4
  106. package/types/nanahoshi-mona-ui-split-button.d.ts +62 -56
  107. package/types/nanahoshi-mona-ui-splitter.d.ts +9 -6
  108. package/types/nanahoshi-mona-ui-stepper.d.ts +10 -3
  109. package/types/nanahoshi-mona-ui-switch.d.ts +1 -1
  110. package/types/nanahoshi-mona-ui-tabs.d.ts +96 -35
  111. package/types/nanahoshi-mona-ui-text-box.d.ts +11 -5
  112. package/types/nanahoshi-mona-ui-time-picker.d.ts +11 -4
  113. package/types/nanahoshi-mona-ui-time-selector.d.ts +16 -5
  114. package/types/nanahoshi-mona-ui-tree-view.d.ts +15 -10
  115. package/types/nanahoshi-mona-ui-window.d.ts +26 -20
  116. package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-ZM3CneJ0.mjs +0 -145
@@ -5,6 +5,7 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
5
5
  import { ButtonDirective } from '@nanahoshi/mona-ui/button';
6
6
  import * as i1 from '@nanahoshi/mona-ui/dropdowns';
7
7
  import { DropdownService, dropdownPopupThemeVariants, DropdownPopupInputToken, DropdownPopupHandlerDirective } from '@nanahoshi/mona-ui/dropdowns';
8
+ import { MonaI18nService, gregorianDateTime, getLocaleTimeInputFormat, parseGregorianDate } from '@nanahoshi/mona-ui/i18n';
8
9
  import { themeControlSurfaceClasses, createElementControlId } from '@nanahoshi/mona-ui/internal';
9
10
  import { TextBoxComponent, TextBoxSuffixTemplateDirective } from '@nanahoshi/mona-ui/text-box';
10
11
  import { TimeSelectorComponent } from '@nanahoshi/mona-ui/time-selector';
@@ -13,6 +14,11 @@ import { fromEvent } from 'rxjs';
13
14
  import { twMerge } from 'tailwind-merge';
14
15
  import { cva } from 'class-variance-authority';
15
16
 
17
+ const TIME_PICKER_DEFAULT_MESSAGES = {
18
+ openTimePicker: "Open time picker",
19
+ timePicker: "Time picker"
20
+ };
21
+
16
22
  const timePickerBaseThemeVariants = cva(`
17
23
  flex w-full items-center
18
24
  ${themeControlSurfaceClasses} text-foreground
@@ -71,11 +77,13 @@ class TimePickerComponent {
71
77
  #destroyRef;
72
78
  #dropdownService;
73
79
  #hostElementRef;
80
+ #i18n;
74
81
  #id;
75
82
  constructor() {
76
83
  this.#destroyRef = inject(DestroyRef);
77
84
  this.#dropdownService = inject(DropdownService);
78
85
  this.#hostElementRef = inject(ElementRef);
86
+ this.#i18n = inject(MonaI18nService);
79
87
  this.#id = createElementControlId();
80
88
  this.baseClass = computed(() => {
81
89
  const focused = this.#dropdownService.popupRef() != null;
@@ -88,13 +96,22 @@ class TimePickerComponent {
88
96
  ...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
89
97
  this.currentDateString = linkedSignal(() => {
90
98
  const value = this.value();
91
- const format = this.format();
99
+ const format = this.effectiveFormat();
100
+ const locale = this.#i18n.localeId();
92
101
  if (!value) {
93
102
  return "";
94
103
  }
95
- return DateTime.fromJSDate(value).toFormat(format);
104
+ return gregorianDateTime(value, locale).toFormat(format);
96
105
  }, /* @ts-ignore */
97
106
  ...(ngDevMode ? [{ debugName: "currentDateString" }] : /* istanbul ignore next */ []));
107
+ this.effectiveFormat = computed(() => {
108
+ return (this.format() ??
109
+ getLocaleTimeInputFormat(this.#i18n.localeId(), {
110
+ hourFormat: this.hourFormat(),
111
+ showSeconds: this.showSeconds()
112
+ }));
113
+ }, /* @ts-ignore */
114
+ ...(ngDevMode ? [{ debugName: "effectiveFormat" }] : /* istanbul ignore next */ []));
98
115
  this.expanded = computed(() => this.#dropdownService.popupRef() != null, /* @ts-ignore */
99
116
  ...(ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []));
100
117
  this.inputAttributes = computed(() => {
@@ -115,6 +132,7 @@ class TimePickerComponent {
115
132
  ...(ngDevMode ? [{ debugName: "inputAttributes" }] : /* istanbul ignore next */ []));
116
133
  this.invalidState = computed(() => this.touched() && (this.invalid() || (this.required() && !this.value())), /* @ts-ignore */
117
134
  ...(ngDevMode ? [{ debugName: "invalidState" }] : /* istanbul ignore next */ []));
135
+ this.messages = this.#i18n.componentMessages("timePicker", TIME_PICKER_DEFAULT_MESSAGES);
118
136
  this.navigatedDate = signal(new Date(), /* @ts-ignore */
119
137
  ...(ngDevMode ? [{ debugName: "navigatedDate" }] : /* istanbul ignore next */ []));
120
138
  this.pickerPopupClass = computed(() => {
@@ -131,6 +149,7 @@ class TimePickerComponent {
131
149
  /**
132
150
  * @description Emits when the popup is about to close. This event is preventable.
133
151
  */
152
+ // eslint-disable-next-line @angular-eslint/no-output-native
134
153
  this.close = output();
135
154
  /**
136
155
  * @description Emits after the popup is closed.
@@ -142,9 +161,10 @@ class TimePickerComponent {
142
161
  this.disabled = input(false, /* @ts-ignore */
143
162
  ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
144
163
  /**
145
- * @description Sets the format of the time picker.
164
+ * @description Sets the format of the time picker. If not specified, derives from the active locale, hourFormat, and showSeconds.
165
+ * @default null
146
166
  */
147
- this.format = input("HH:mm", /* @ts-ignore */
167
+ this.format = input(null, /* @ts-ignore */
148
168
  ...(ngDevMode ? [{ debugName: "format" }] : /* istanbul ignore next */ []));
149
169
  /**
150
170
  * @description Sets the hour format of the time picker.
@@ -286,6 +306,13 @@ class TimePickerComponent {
286
306
  untracked(() => this.#dropdownService.popupTemplate.set(popupTemplate));
287
307
  });
288
308
  }
309
+ focus() {
310
+ const input = this.#hostElementRef.nativeElement.querySelector("input");
311
+ if (input && !this.readonly()) {
312
+ input.focus();
313
+ input.setSelectionRange(input.value.length, input.value.length);
314
+ }
315
+ }
289
316
  onDateStringEdit(dateString) {
290
317
  this.currentDateString.set(dateString);
291
318
  }
@@ -310,22 +337,17 @@ class TimePickerComponent {
310
337
  }
311
338
  dateStringEquals(date1, date2) {
312
339
  if (date1 && date2) {
313
- return (DateTime.fromJSDate(date1).toFormat(this.format()) ===
314
- DateTime.fromJSDate(date2).toFormat(this.format()));
340
+ const locale = this.#i18n.localeId();
341
+ return (gregorianDateTime(date1, locale).toFormat(this.effectiveFormat()) ===
342
+ gregorianDateTime(date2, locale).toFormat(this.effectiveFormat()));
315
343
  }
316
344
  return date1 === date2;
317
345
  }
318
- focus() {
319
- const input = this.#hostElementRef.nativeElement.querySelector("input");
320
- if (input && !this.readonly()) {
321
- input.focus();
322
- input.setSelectionRange(input.value.length, input.value.length);
323
- }
324
- }
325
346
  generateValidDateTime(dateString) {
326
347
  const value = this.value();
327
- const valueDate = value ? DateTime.fromJSDate(value) : DateTime.now();
328
- let dateTime = DateTime.fromFormat(dateString, this.format());
348
+ const locale = this.#i18n.localeId();
349
+ const valueDate = value ? gregorianDateTime(value, locale) : gregorianDateTime(new Date(), locale);
350
+ let dateTime = parseGregorianDate(dateString, this.effectiveFormat(), locale);
329
351
  if (dateTime.isValid) {
330
352
  return dateTime.set({ year: valueDate.year, month: valueDate.month, day: valueDate.day });
331
353
  }
@@ -333,7 +355,7 @@ class TimePickerComponent {
333
355
  const minDate = this.min();
334
356
  const date = minDate ?? maxDate;
335
357
  if (date) {
336
- const newDate = DateTime.fromJSDate(date);
358
+ const newDate = gregorianDateTime(date, locale);
337
359
  dateTime = newDate.set({ year: valueDate.year, month: valueDate.month, day: valueDate.day });
338
360
  return dateTime;
339
361
  }
@@ -359,7 +381,7 @@ class TimePickerComponent {
359
381
  });
360
382
  }
361
383
  processTimeInput(inputText) {
362
- let dateTime = this.generateValidDateTime(inputText);
384
+ const dateTime = this.generateValidDateTime(inputText);
363
385
  if (!dateTime) {
364
386
  this.setCurrentDate(null);
365
387
  return;
@@ -382,13 +404,14 @@ class TimePickerComponent {
382
404
  this.touch.emit();
383
405
  }
384
406
  setCurrentDateString(date) {
385
- this.updateCurrentDateString(date, this.format());
407
+ this.updateCurrentDateString(date, this.effectiveFormat());
386
408
  }
387
409
  setDateValues() {
388
410
  const value = this.value();
389
- this.navigatedDate.set(value ?? DateTime.now().toJSDate());
411
+ const locale = this.#i18n.localeId();
412
+ this.navigatedDate.set(value ?? DateTime.now().setLocale(locale).toJSDate());
390
413
  if (value) {
391
- this.updateCurrentDateString(value, this.format());
414
+ this.updateCurrentDateString(value, this.effectiveFormat());
392
415
  }
393
416
  }
394
417
  setKeyboardNavigation() {
@@ -410,7 +433,7 @@ class TimePickerComponent {
410
433
  this.currentDateString.set("");
411
434
  return;
412
435
  }
413
- const dateString = DateTime.fromJSDate(date).toFormat(format);
436
+ const dateString = gregorianDateTime(date, this.#i18n.localeId()).toFormat(format);
414
437
  this.currentDateString.set(dateString);
415
438
  }
416
439
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TimePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
@@ -421,7 +444,7 @@ class TimePickerComponent {
421
444
  useExisting: forwardRef(() => TimePickerComponent),
422
445
  multi: false
423
446
  }
424
- ], viewQueries: [{ propertyName: "timePopupTemplateRef", first: true, predicate: ["timePopupTemplate"], descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.DropdownPopupHandlerDirective }], ngImport: i0, template: "<mona-text-box\n [disabled]=\"disabled()\"\n [readonly]=\"readonly() || readonlyInput()\"\n [required]=\"required()\"\n [value]=\"currentDateString()\"\n [inputAttributes]=\"inputAttributes()\"\n [invalid]=\"invalid()\"\n [placeholder]=\"placeholder()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [touched]=\"touched()\"\n [clearButton]=\"showClearButton()\"\n (valueChange)=\"onDateStringEdit($event)\"\n (inputBlur)=\"onTimeInputBlur()\">\n <ng-template monaTextBoxSuffixTemplate>\n <button\n monaButton\n look=\"ghost\"\n [iconOnly]=\"true\"\n [size]=\"size()\"\n [rounded]=\"'none'\"\n (click)=\"onTimeInputButtonClick()\"\n class=\"aspect-square h-full w-auto\"\n [attr.aria-label]=\"'Open time picker'\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-controls]=\"popupId\"\n [disabled]=\"disabled() || readonly()\"\n [tabindex]=\"-1\">\n <i class=\"ri-time-line\"></i>\n </button>\n </ng-template>\n</mona-text-box>\n\n<ng-template #timePopupTemplate>\n <div\n [class]=\"pickerPopupClass()\"\n [id]=\"popupId\"\n aria-modal=\"true\"\n role=\"dialog\"\n aria-label=\"Time picker\"\n cdkTrapFocus>\n <mona-time-selector\n [value]=\"value()\"\n (valueChange)=\"onTimeSelectorValueChange($event)\"\n [max]=\"max()\"\n [min]=\"min()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [hourFormat]=\"hourFormat()\"\n [hourStep]=\"hourStep()\"\n [minuteStep]=\"minuteStep()\"\n [secondStep]=\"secondStep()\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [showSeconds]=\"showSeconds()\"></mona-time-selector>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "type", "toggleable", "class"], outputs: ["disabledChange", "loadingChange", "lookChange", "selectedChange"] }, { kind: "component", type: TimeSelectorComponent, selector: "mona-time-selector", inputs: ["ariaLabel", "disabled", "focusOnMount", "footer", "hourFormat", "hourStep", "invalid", "max", "min", "minuteStep", "readonly", "required", "rounded", "secondStep", "showSeconds", "size", "touched", "value"], outputs: ["touch", "valueChange"] }, { kind: "component", type: TextBoxComponent, selector: "mona-text-box", inputs: ["clearButton", "disabled", "inputAttributes", "inputClass", "inputStyle", "invalid", "placeholder", "readonly", "required", "rounded", "size", "touched", "type", "class", "value"], outputs: ["inputBlur", "inputFocus", "touch", "valueChange"] }, { kind: "directive", type: TextBoxSuffixTemplateDirective, selector: "ng-template[monaTextBoxSuffixTemplate]" }, { kind: "directive", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }] }); }
447
+ ], viewQueries: [{ propertyName: "timePopupTemplateRef", first: true, predicate: ["timePopupTemplate"], descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.DropdownPopupHandlerDirective }], ngImport: i0, template: "<mona-text-box\n [disabled]=\"disabled()\"\n [readonly]=\"readonly() || readonlyInput()\"\n [required]=\"required()\"\n [value]=\"currentDateString()\"\n [inputAttributes]=\"inputAttributes()\"\n [invalid]=\"invalid()\"\n [placeholder]=\"placeholder()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [touched]=\"touched()\"\n [clearButton]=\"showClearButton()\"\n (valueChange)=\"onDateStringEdit($event)\"\n (inputBlur)=\"onTimeInputBlur()\">\n <ng-template monaTextBoxSuffixTemplate>\n <button\n monaButton\n look=\"ghost\"\n [iconOnly]=\"true\"\n [size]=\"size()\"\n [rounded]=\"'none'\"\n (click)=\"onTimeInputButtonClick()\"\n class=\"aspect-square h-full w-auto\"\n [attr.aria-label]=\"messages().openTimePicker\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-controls]=\"popupId\"\n [disabled]=\"disabled() || readonly()\"\n [tabindex]=\"-1\">\n <i class=\"ri-time-line\"></i>\n </button>\n </ng-template>\n</mona-text-box>\n\n<ng-template #timePopupTemplate>\n <div\n [class]=\"pickerPopupClass()\"\n [id]=\"popupId\"\n aria-modal=\"true\"\n role=\"dialog\"\n [attr.aria-label]=\"messages().timePicker\"\n cdkTrapFocus>\n <mona-time-selector\n [value]=\"value()\"\n (valueChange)=\"onTimeSelectorValueChange($event)\"\n [max]=\"max()\"\n [min]=\"min()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [hourFormat]=\"hourFormat()\"\n [hourStep]=\"hourStep()\"\n [minuteStep]=\"minuteStep()\"\n [secondStep]=\"secondStep()\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [showSeconds]=\"showSeconds()\"></mona-time-selector>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "type", "toggleable", "class"], outputs: ["disabledChange", "loadingChange", "lookChange", "selectedChange"] }, { kind: "component", type: TimeSelectorComponent, selector: "mona-time-selector", inputs: ["aria-label", "disabled", "focusOnMount", "footer", "hourFormat", "hourStep", "invalid", "max", "min", "minuteStep", "readonly", "required", "rounded", "secondStep", "showSeconds", "size", "touched", "value"], outputs: ["touch", "valueChange"] }, { kind: "component", type: TextBoxComponent, selector: "mona-text-box", inputs: ["clearButton", "disabled", "inputAttributes", "inputClass", "inputStyle", "invalid", "placeholder", "readonly", "required", "rounded", "size", "touched", "type", "class", "value"], outputs: ["inputBlur", "inputFocus", "touch", "valueChange"] }, { kind: "directive", type: TextBoxSuffixTemplateDirective, selector: "ng-template[monaTextBoxSuffixTemplate]" }, { kind: "directive", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }] }); }
425
448
  }
426
449
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TimePickerComponent, decorators: [{
427
450
  type: Component,
@@ -441,7 +464,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
441
464
  "[attr.data-readonly]": "readonly() || null",
442
465
  "[class]": "baseClass()",
443
466
  "(blur)": "onTimeInputBlur()"
444
- }, template: "<mona-text-box\n [disabled]=\"disabled()\"\n [readonly]=\"readonly() || readonlyInput()\"\n [required]=\"required()\"\n [value]=\"currentDateString()\"\n [inputAttributes]=\"inputAttributes()\"\n [invalid]=\"invalid()\"\n [placeholder]=\"placeholder()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [touched]=\"touched()\"\n [clearButton]=\"showClearButton()\"\n (valueChange)=\"onDateStringEdit($event)\"\n (inputBlur)=\"onTimeInputBlur()\">\n <ng-template monaTextBoxSuffixTemplate>\n <button\n monaButton\n look=\"ghost\"\n [iconOnly]=\"true\"\n [size]=\"size()\"\n [rounded]=\"'none'\"\n (click)=\"onTimeInputButtonClick()\"\n class=\"aspect-square h-full w-auto\"\n [attr.aria-label]=\"'Open time picker'\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-controls]=\"popupId\"\n [disabled]=\"disabled() || readonly()\"\n [tabindex]=\"-1\">\n <i class=\"ri-time-line\"></i>\n </button>\n </ng-template>\n</mona-text-box>\n\n<ng-template #timePopupTemplate>\n <div\n [class]=\"pickerPopupClass()\"\n [id]=\"popupId\"\n aria-modal=\"true\"\n role=\"dialog\"\n aria-label=\"Time picker\"\n cdkTrapFocus>\n <mona-time-selector\n [value]=\"value()\"\n (valueChange)=\"onTimeSelectorValueChange($event)\"\n [max]=\"max()\"\n [min]=\"min()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [hourFormat]=\"hourFormat()\"\n [hourStep]=\"hourStep()\"\n [minuteStep]=\"minuteStep()\"\n [secondStep]=\"secondStep()\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [showSeconds]=\"showSeconds()\"></mona-time-selector>\n </div>\n</ng-template>\n" }]
467
+ }, template: "<mona-text-box\n [disabled]=\"disabled()\"\n [readonly]=\"readonly() || readonlyInput()\"\n [required]=\"required()\"\n [value]=\"currentDateString()\"\n [inputAttributes]=\"inputAttributes()\"\n [invalid]=\"invalid()\"\n [placeholder]=\"placeholder()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [touched]=\"touched()\"\n [clearButton]=\"showClearButton()\"\n (valueChange)=\"onDateStringEdit($event)\"\n (inputBlur)=\"onTimeInputBlur()\">\n <ng-template monaTextBoxSuffixTemplate>\n <button\n monaButton\n look=\"ghost\"\n [iconOnly]=\"true\"\n [size]=\"size()\"\n [rounded]=\"'none'\"\n (click)=\"onTimeInputButtonClick()\"\n class=\"aspect-square h-full w-auto\"\n [attr.aria-label]=\"messages().openTimePicker\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-controls]=\"popupId\"\n [disabled]=\"disabled() || readonly()\"\n [tabindex]=\"-1\">\n <i class=\"ri-time-line\"></i>\n </button>\n </ng-template>\n</mona-text-box>\n\n<ng-template #timePopupTemplate>\n <div\n [class]=\"pickerPopupClass()\"\n [id]=\"popupId\"\n aria-modal=\"true\"\n role=\"dialog\"\n [attr.aria-label]=\"messages().timePicker\"\n cdkTrapFocus>\n <mona-time-selector\n [value]=\"value()\"\n (valueChange)=\"onTimeSelectorValueChange($event)\"\n [max]=\"max()\"\n [min]=\"min()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n [hourFormat]=\"hourFormat()\"\n [hourStep]=\"hourStep()\"\n [minuteStep]=\"minuteStep()\"\n [secondStep]=\"secondStep()\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [showSeconds]=\"showSeconds()\"></mona-time-selector>\n </div>\n</ng-template>\n" }]
445
468
  }], ctorParameters: () => [], propDecorators: { timePopupTemplateRef: [{ type: i0.ViewChild, args: ["timePopupTemplate", { isSignal: true }] }], close: [{ type: i0.Output, args: ["close"] }], closed: [{ type: i0.Output, args: ["closed"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], format: [{ type: i0.Input, args: [{ isSignal: true, alias: "format", required: false }] }], hourFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "hourFormat", required: false }] }], hourStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "hourStep", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], minuteStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "minuteStep", required: false }] }], open: [{ type: i0.Output, args: ["open"] }], opened: [{ type: i0.Output, args: ["opened"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], popupClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "popupClass", required: false }] }], popupHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "popupHeight", required: false }] }], popupWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "popupWidth", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], readonlyInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonlyInput", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], secondStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondStep", required: false }] }], showClearButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClearButton", required: false }] }], showSeconds: [{ type: i0.Input, args: [{ isSignal: true, alias: "showSeconds", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }] } });
446
469
 
447
470
  /*
@@ -452,5 +475,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
452
475
  * Generated bundle index. Do not edit.
453
476
  */
454
477
 
455
- export { TimePickerComponent };
478
+ export { TIME_PICKER_DEFAULT_MESSAGES, TimePickerComponent };
456
479
  //# sourceMappingURL=nanahoshi-mona-ui-time-picker.mjs.map
@@ -1,10 +1,10 @@
1
- import { DecimalPipe } from '@angular/common';
2
1
  import * as i0 from '@angular/core';
3
2
  import { inject, DestroyRef, ElementRef, signal, computed, input, effect, Directive, viewChild, output, model, afterNextRender, untracked, Component } from '@angular/core';
4
3
  import { toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
5
4
  import { ButtonDirective } from '@nanahoshi/mona-ui/button';
6
5
  import { PreventableEvent } from '@nanahoshi/mona-ui/common';
7
6
  import { TimeSelectorService, generateMinuteSet, generateSecondSet, generateHourSet, TimeLimiterPipe } from '@nanahoshi/mona-ui/date-input';
7
+ import { injectComponentDirection, MonaI18nService, formatNumber } from '@nanahoshi/mona-ui/i18n';
8
8
  import { rxTimeout, createElementControlId } from '@nanahoshi/mona-ui/internal';
9
9
  import { DateTime } from 'luxon';
10
10
  import { tap, fromEvent } from 'rxjs';
@@ -181,17 +181,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
181
181
  }]
182
182
  }], propDecorators: { active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: true }] }], popupHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "popupHeight", required: true }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: true }] }] } });
183
183
 
184
+ const TIME_SELECTOR_DEFAULT_MESSAGES = {
185
+ am: "AM",
186
+ amPm: "AM/PM",
187
+ headerHours: "Hr",
188
+ headerMinutes: "Min",
189
+ headerSeconds: "Sec",
190
+ hours: "Hours",
191
+ minutes: "Minutes",
192
+ now: "Now",
193
+ pm: "PM",
194
+ seconds: "Seconds",
195
+ set: "Set",
196
+ timeSelector: "Time selector"
197
+ };
198
+
184
199
  class TimeSelectorComponent {
185
200
  #destroyRef;
201
+ #direction;
186
202
  #height;
187
203
  #hostElementRef;
204
+ #i18n;
188
205
  #timeSelectorService;
189
206
  constructor() {
190
207
  this.#destroyRef = inject(DestroyRef);
208
+ this.#direction = injectComponentDirection();
191
209
  this.#height = signal(0, /* @ts-ignore */
192
210
  ...(ngDevMode ? [{ debugName: "#height" }] : /* istanbul ignore next */ []));
193
211
  this.#hostElementRef = inject((ElementRef));
212
+ this.#i18n = inject(MonaI18nService);
194
213
  this.#timeSelectorService = inject(TimeSelectorService, { optional: true });
214
+ this.isRtl = computed(() => this.#direction() === "rtl", /* @ts-ignore */
215
+ ...(ngDevMode ? [{ debugName: "isRtl" }] : /* istanbul ignore next */ []));
195
216
  this.amMeridiemVisible = computed(() => {
196
217
  const min = this.min();
197
218
  return !(min && min.getHours() >= 12);
@@ -237,7 +258,8 @@ class TimeSelectorComponent {
237
258
  ...(ngDevMode ? [{ debugName: "listContainerClass" }] : /* istanbul ignore next */ []));
238
259
  this.maxDate = computed(() => {
239
260
  const max = this.max();
240
- return max ? DateTime.fromJSDate(max) : null;
261
+ const locale = this.#i18n.localeId();
262
+ return max ? DateTime.fromJSDate(max).setLocale(locale) : null;
241
263
  }, /* @ts-ignore */
242
264
  ...(ngDevMode ? [{ debugName: "maxDate" }] : /* istanbul ignore next */ []));
243
265
  this.meridiem = signal("AM", /* @ts-ignore */
@@ -245,9 +267,11 @@ class TimeSelectorComponent {
245
267
  this.meridiemListId = createElementControlId();
246
268
  this.meridiemListRef = viewChild("meridiemList", /* @ts-ignore */
247
269
  ...(ngDevMode ? [{ debugName: "meridiemListRef" }] : /* istanbul ignore next */ []));
270
+ this.messages = this.#i18n.componentMessages("timeSelector", TIME_SELECTOR_DEFAULT_MESSAGES);
248
271
  this.minDate = computed(() => {
249
272
  const min = this.min();
250
- return min ? DateTime.fromJSDate(min) : null;
273
+ const locale = this.#i18n.localeId();
274
+ return min ? DateTime.fromJSDate(min).setLocale(locale) : null;
251
275
  }, /* @ts-ignore */
252
276
  ...(ngDevMode ? [{ debugName: "minDate" }] : /* istanbul ignore next */ []));
253
277
  this.minute = computed(() => this.navigatedDate().minute, /* @ts-ignore */
@@ -261,7 +285,10 @@ class TimeSelectorComponent {
261
285
  ...(ngDevMode ? [{ debugName: "navigatedDate" }] : /* istanbul ignore next */ []));
262
286
  this.navigatedDateText = computed(() => {
263
287
  const hourFormat = this.hourFormat();
264
- return this.navigatedDate().toLocaleString({ hour: "numeric", minute: "numeric", hour12: hourFormat === "12" });
288
+ const locale = this.#i18n.localeId();
289
+ return this.navigatedDate()
290
+ .setLocale(locale)
291
+ .toLocaleString({ hour: "numeric", minute: "numeric", hour12: hourFormat === "12" });
265
292
  }, /* @ts-ignore */
266
293
  ...(ngDevMode ? [{ debugName: "navigatedDateText" }] : /* istanbul ignore next */ []));
267
294
  this.pmMeridiemVisible = computed(() => {
@@ -283,8 +310,11 @@ class TimeSelectorComponent {
283
310
  return generateHourSet(hourFormat, meridiem, hourStep);
284
311
  }, /* @ts-ignore */
285
312
  ...(ngDevMode ? [{ debugName: "viewHours" }] : /* istanbul ignore next */ []));
286
- this.ariaLabel = input("Time selector", /* @ts-ignore */
287
- ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
313
+ /**
314
+ * @description Accessible label for the time selector group.
315
+ * @default ""
316
+ */
317
+ this.ariaLabel = input("", { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: "aria-label" });
288
318
  this.disabled = input(false, /* @ts-ignore */
289
319
  ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
290
320
  this.focusOnMount = input(true, /* @ts-ignore */
@@ -351,7 +381,7 @@ class TimeSelectorComponent {
351
381
  this.setDateValues();
352
382
  const value = this.value();
353
383
  if (value) {
354
- const dt = DateTime.fromJSDate(value);
384
+ const dt = DateTime.fromJSDate(value).setLocale(this.#i18n.localeId());
355
385
  if (dt.isValid) {
356
386
  this.navigatedDate.set(dt);
357
387
  }
@@ -376,6 +406,12 @@ class TimeSelectorComponent {
376
406
  focus() {
377
407
  this.focusList(this.focusedList());
378
408
  }
409
+ formatTwoDigit(value) {
410
+ return formatNumber(value, this.#i18n.localeId(), {
411
+ minimumIntegerDigits: 2,
412
+ useGrouping: false
413
+ });
414
+ }
379
415
  onBlur() {
380
416
  this.touch.emit();
381
417
  }
@@ -407,11 +443,11 @@ class TimeSelectorComponent {
407
443
  }
408
444
  this.navigatedDate.update(date => date.set({ minute }));
409
445
  }
410
- onNowClick(event) {
446
+ onNowClick(_event) {
411
447
  if (this.disabled() || this.readonly()) {
412
448
  return;
413
449
  }
414
- let now = DateTime.now();
450
+ let now = DateTime.now().setLocale(this.#i18n.localeId());
415
451
  const min = this.minDate();
416
452
  const max = this.maxDate();
417
453
  if (min && now < min) {
@@ -439,6 +475,13 @@ class TimeSelectorComponent {
439
475
  }
440
476
  this.updateValue(this.navigatedDate().toJSDate(), true);
441
477
  }
478
+ dateValuesEqual(date1, date2) {
479
+ return date1?.getTime() === date2?.getTime();
480
+ }
481
+ focusList(listType) {
482
+ const listRef = this.getListRef(listType);
483
+ listRef?.nativeElement.focus();
484
+ }
442
485
  getListRef(listType) {
443
486
  switch (listType) {
444
487
  case "hours":
@@ -460,7 +503,9 @@ class TimeSelectorComponent {
460
503
  lists.push("meridiem");
461
504
  }
462
505
  const currentIndex = lists.indexOf(current);
463
- if (direction === "right") {
506
+ const isRtl = this.isRtl();
507
+ const effectiveDirection = isRtl ? (direction === "left" ? "right" : "left") : direction;
508
+ if (effectiveDirection === "right") {
464
509
  return lists[(currentIndex + 1) % lists.length];
465
510
  }
466
511
  else {
@@ -516,33 +561,27 @@ class TimeSelectorComponent {
516
561
  break;
517
562
  }
518
563
  }
519
- focusList(listType) {
520
- const listRef = this.getListRef(listType);
521
- listRef?.nativeElement.focus();
522
- }
523
- dateValuesEqual(date1, date2) {
524
- return date1?.getTime() === date2?.getTime();
525
- }
526
564
  initializeNavigatedDate(date) {
527
565
  const min = this.min();
528
566
  const max = this.max();
567
+ const locale = this.#i18n.localeId();
529
568
  if (!date) {
530
- this.navigatedDate.set(DateTime.now());
569
+ this.navigatedDate.set(DateTime.now().setLocale(locale));
531
570
  }
532
571
  else if (min && date < min) {
533
- const minDate = DateTime.fromJSDate(min);
572
+ const minDate = DateTime.fromJSDate(min).setLocale(locale);
534
573
  if (minDate.isValid) {
535
574
  this.navigatedDate.set(minDate);
536
575
  }
537
576
  }
538
577
  else if (max && date > max) {
539
- const maxDate = DateTime.fromJSDate(max);
578
+ const maxDate = DateTime.fromJSDate(max).setLocale(locale);
540
579
  if (maxDate.isValid) {
541
580
  this.navigatedDate.set(maxDate);
542
581
  }
543
582
  }
544
583
  else {
545
- const dateToSet = DateTime.fromJSDate(date);
584
+ const dateToSet = DateTime.fromJSDate(date).setLocale(locale);
546
585
  if (dateToSet.isValid) {
547
586
  this.navigatedDate.set(dateToSet);
548
587
  }
@@ -630,13 +669,13 @@ class TimeSelectorComponent {
630
669
  }
631
670
  }
632
671
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TimeSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
633
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: TimeSelectorComponent, isStandalone: true, selector: "mona-time-selector", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, focusOnMount: { classPropertyName: "focusOnMount", publicName: "focusOnMount", isSignal: true, isRequired: false, transformFunction: null }, footer: { classPropertyName: "footer", publicName: "footer", isSignal: true, isRequired: false, transformFunction: null }, hourFormat: { classPropertyName: "hourFormat", publicName: "hourFormat", isSignal: true, isRequired: false, transformFunction: null }, hourStep: { classPropertyName: "hourStep", publicName: "hourStep", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, minuteStep: { classPropertyName: "minuteStep", publicName: "minuteStep", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, secondStep: { classPropertyName: "secondStep", publicName: "secondStep", isSignal: true, isRequired: false, transformFunction: null }, showSeconds: { classPropertyName: "showSeconds", publicName: "showSeconds", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { touch: "touch", value: "valueChange" }, host: { attributes: { "role": "group" }, listeners: { "blur": "onBlur()" }, properties: { "attr.aria-label": "ariaLabel()", "attr.aria-disabled": "disabled()", "attr.aria-invalid": "invalidState() ? 'true' : null", "attr.aria-readonly": "readonly()", "attr.aria-required": "required()", "attr.data-invalid": "invalidState() || null", "attr.data-readonly": "readonly() || null", "attr.data-required": "required() || null", "class": "baseClass()" } }, viewQueries: [{ propertyName: "hourListRef", first: true, predicate: ["hourList"], descendants: true, isSignal: true }, { propertyName: "meridiemListRef", first: true, predicate: ["meridiemList"], descendants: true, isSignal: true }, { propertyName: "minuteListRef", first: true, predicate: ["minuteList"], descendants: true, isSignal: true }, { propertyName: "secondListRef", first: true, predicate: ["secondList"], descendants: true, isSignal: true }], ngImport: i0, template: "<div [class]=\"headerClass()\">\n <div>Hr</div>\n <div>Min</div>\n @if (showSeconds()) {\n <div>Sec</div>\n }\n</div>\n\n<div [class]=\"infoContainerClass()\">\n <span>{{ navigatedDateText() }}</span>\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"'small'\"\n (click)=\"onNowClick($event)\"\n (keydown.enter)=\"onNowClick($event)\"\n (keydown.space)=\"onNowClick($event)\">\n Now\n </button>\n</div>\n\n<div [class]=\"listContainerClass()\">\n <ol\n #hourList\n monaTimeSelectorList\n aria-label=\"Hours\"\n [attr.aria-activedescendant]=\"`${hourListId}${navigatedDate().hour}`\"\n [active]=\"focusedList() === 'hours'\"\n [id]=\"hourListId\"\n [popupHeight]=\"computedPopupHeight()\"\n [size]=\"size()\">\n @for (h of viewHours() | timeLimiter: \"h\" : navigatedDate() : minDate() : maxDate(); track h) {\n <li\n monaTimeSelectorItem\n [size]=\"size()\"\n [selected]=\"h.viewValue === hour()\"\n [value]=\"h.value\"\n [id]=\"`${hourListId}${h.value}`\"\n (click)=\"onHourChange(h.value)\">\n {{ h.viewValue | number: \"2.0\" }}\n </li>\n }\n </ol>\n <ol\n #minuteList\n monaTimeSelectorList\n aria-label=\"Minutes\"\n [attr.aria-activedescendant]=\"`${minuteListId}${navigatedDate().minute}`\"\n [active]=\"focusedList() === 'minutes'\"\n [id]=\"minuteListId\"\n [popupHeight]=\"computedPopupHeight()\"\n [size]=\"size()\">\n @for (m of minutes() | timeLimiter: \"m\" : navigatedDate() : minDate() : maxDate(); track m) {\n <li\n monaTimeSelectorItem\n [size]=\"size()\"\n [selected]=\"m.value === minute()\"\n [value]=\"m.value\"\n [id]=\"`${minuteListId}${m.value}`\"\n (click)=\"onMinuteChange(m.value)\">\n {{ m.viewValue | number: \"2.0\" }}\n </li>\n }\n </ol>\n @if (showSeconds()) {\n <ol\n #secondList\n monaTimeSelectorList\n aria-label=\"Seconds\"\n [attr.aria-activedescendant]=\"`${secondListId}${navigatedDate().second}`\"\n [active]=\"focusedList() === 'seconds'\"\n [id]=\"secondListId\"\n [popupHeight]=\"computedPopupHeight()\"\n [size]=\"size()\">\n @for (s of seconds() | timeLimiter: \"s\" : navigatedDate() : minDate() : maxDate(); track s) {\n <li\n monaTimeSelectorItem\n [size]=\"size()\"\n [selected]=\"s.value === second()\"\n [value]=\"s.value\"\n [id]=\"`${secondListId}${s.value}`\"\n (click)=\"onSecondChange(s.value)\">\n {{ s.value | number: \"2.0\" }}\n </li>\n }\n </ol>\n }\n @if (hourFormat() === \"12\") {\n <ol\n #meridiemList\n monaTimeSelectorList\n aria-label=\"AM/PM\"\n [attr.aria-activedescendant]=\"`${meridiemListId}${meridiem()}`\"\n [active]=\"focusedList() === 'meridiem'\"\n [id]=\"meridiemListId\"\n [popupHeight]=\"computedPopupHeight()\"\n [size]=\"size()\">\n @if (amMeridiemVisible()) {\n <li\n monaTimeSelectorItem\n [size]=\"size()\"\n [selected]=\"meridiem() === 'AM'\"\n [value]=\"'AM'\"\n (click)=\"onMeridiemClick('AM')\"\n [id]=\"`${meridiemListId}AM`\">\n AM\n </li>\n }\n @if (pmMeridiemVisible()) {\n <li\n monaTimeSelectorItem\n [size]=\"size()\"\n [selected]=\"meridiem() === 'PM'\"\n [value]=\"'PM'\"\n (click)=\"onMeridiemClick('PM')\"\n [id]=\"`${meridiemListId}PM`\">\n PM\n </li>\n }\n </ol>\n }\n</div>\n\n@if (footer()) {\n <div [class]=\"footerClass()\">\n <button monaButton look=\"primary\" [rounded]=\"rounded()\" [size]=\"size()\" (click)=\"onSetTimeClick()\">Set</button>\n </div>\n}\n", dependencies: [{ kind: "directive", type: TimeSelectorItemDirective, selector: "li[monaTimeSelectorItem]", inputs: ["selected", "size", "value"] }, { kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "type", "toggleable", "class"], outputs: ["disabledChange", "loadingChange", "lookChange", "selectedChange"] }, { kind: "directive", type: TimeSelectorListDirective, selector: "ol[monaTimeSelectorList]", inputs: ["active", "popupHeight", "size"] }, { kind: "pipe", type: DecimalPipe, name: "number" }, { kind: "pipe", type: TimeLimiterPipe, name: "timeLimiter" }] }); }
672
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: TimeSelectorComponent, isStandalone: true, selector: "mona-time-selector", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, focusOnMount: { classPropertyName: "focusOnMount", publicName: "focusOnMount", isSignal: true, isRequired: false, transformFunction: null }, footer: { classPropertyName: "footer", publicName: "footer", isSignal: true, isRequired: false, transformFunction: null }, hourFormat: { classPropertyName: "hourFormat", publicName: "hourFormat", isSignal: true, isRequired: false, transformFunction: null }, hourStep: { classPropertyName: "hourStep", publicName: "hourStep", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, minuteStep: { classPropertyName: "minuteStep", publicName: "minuteStep", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, secondStep: { classPropertyName: "secondStep", publicName: "secondStep", isSignal: true, isRequired: false, transformFunction: null }, showSeconds: { classPropertyName: "showSeconds", publicName: "showSeconds", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { touch: "touch", value: "valueChange" }, host: { attributes: { "role": "group" }, listeners: { "blur": "onBlur()" }, properties: { "attr.aria-label": "ariaLabel() || messages().timeSelector", "attr.aria-disabled": "disabled()", "attr.aria-invalid": "invalidState() ? 'true' : null", "attr.aria-readonly": "readonly()", "attr.aria-required": "required()", "attr.data-invalid": "invalidState() || null", "attr.data-readonly": "readonly() || null", "attr.data-required": "required() || null", "class": "baseClass()" } }, viewQueries: [{ propertyName: "hourListRef", first: true, predicate: ["hourList"], descendants: true, isSignal: true }, { propertyName: "meridiemListRef", first: true, predicate: ["meridiemList"], descendants: true, isSignal: true }, { propertyName: "minuteListRef", first: true, predicate: ["minuteList"], descendants: true, isSignal: true }, { propertyName: "secondListRef", first: true, predicate: ["secondList"], descendants: true, isSignal: true }], ngImport: i0, template: "<div [class]=\"headerClass()\">\n <div>{{ messages().headerHours }}</div>\n <div>{{ messages().headerMinutes }}</div>\n @if (showSeconds()) {\n <div>{{ messages().headerSeconds }}</div>\n }\n</div>\n\n<div [class]=\"infoContainerClass()\">\n <span>{{ navigatedDateText() }}</span>\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"'small'\"\n (click)=\"onNowClick($event)\"\n (keydown.enter)=\"onNowClick($event)\"\n (keydown.space)=\"onNowClick($event)\">\n {{ messages().now }}\n </button>\n</div>\n\n<div [class]=\"listContainerClass()\">\n <ol\n #hourList\n monaTimeSelectorList\n [attr.aria-label]=\"messages().hours\"\n [attr.aria-activedescendant]=\"`${hourListId}${navigatedDate().hour}`\"\n [active]=\"focusedList() === 'hours'\"\n [id]=\"hourListId\"\n [popupHeight]=\"computedPopupHeight()\"\n [size]=\"size()\">\n @for (h of viewHours() | timeLimiter: \"h\" : navigatedDate() : minDate() : maxDate(); track h) {\n <li\n monaTimeSelectorItem\n [size]=\"size()\"\n [selected]=\"h.viewValue === hour()\"\n [value]=\"h.value\"\n [id]=\"`${hourListId}${h.value}`\"\n (click)=\"onHourChange(h.value)\">\n {{ formatTwoDigit(h.viewValue) }}\n </li>\n }\n </ol>\n <ol\n #minuteList\n monaTimeSelectorList\n [attr.aria-label]=\"messages().minutes\"\n [attr.aria-activedescendant]=\"`${minuteListId}${navigatedDate().minute}`\"\n [active]=\"focusedList() === 'minutes'\"\n [id]=\"minuteListId\"\n [popupHeight]=\"computedPopupHeight()\"\n [size]=\"size()\">\n @for (m of minutes() | timeLimiter: \"m\" : navigatedDate() : minDate() : maxDate(); track m) {\n <li\n monaTimeSelectorItem\n [size]=\"size()\"\n [selected]=\"m.value === minute()\"\n [value]=\"m.value\"\n [id]=\"`${minuteListId}${m.value}`\"\n (click)=\"onMinuteChange(m.value)\">\n {{ formatTwoDigit(m.viewValue) }}\n </li>\n }\n </ol>\n @if (showSeconds()) {\n <ol\n #secondList\n monaTimeSelectorList\n [attr.aria-label]=\"messages().seconds\"\n [attr.aria-activedescendant]=\"`${secondListId}${navigatedDate().second}`\"\n [active]=\"focusedList() === 'seconds'\"\n [id]=\"secondListId\"\n [popupHeight]=\"computedPopupHeight()\"\n [size]=\"size()\">\n @for (s of seconds() | timeLimiter: \"s\" : navigatedDate() : minDate() : maxDate(); track s) {\n <li\n monaTimeSelectorItem\n [size]=\"size()\"\n [selected]=\"s.value === second()\"\n [value]=\"s.value\"\n [id]=\"`${secondListId}${s.value}`\"\n (click)=\"onSecondChange(s.value)\">\n {{ formatTwoDigit(s.value) }}\n </li>\n }\n </ol>\n }\n @if (hourFormat() === \"12\") {\n <ol\n #meridiemList\n monaTimeSelectorList\n [attr.aria-label]=\"messages().amPm\"\n [attr.aria-activedescendant]=\"`${meridiemListId}${meridiem()}`\"\n [active]=\"focusedList() === 'meridiem'\"\n [id]=\"meridiemListId\"\n [popupHeight]=\"computedPopupHeight()\"\n [size]=\"size()\">\n @if (amMeridiemVisible()) {\n <li\n monaTimeSelectorItem\n [size]=\"size()\"\n [selected]=\"meridiem() === 'AM'\"\n [value]=\"'AM'\"\n (click)=\"onMeridiemClick('AM')\"\n [id]=\"`${meridiemListId}AM`\">\n {{ messages().am }}\n </li>\n }\n @if (pmMeridiemVisible()) {\n <li\n monaTimeSelectorItem\n [size]=\"size()\"\n [selected]=\"meridiem() === 'PM'\"\n [value]=\"'PM'\"\n (click)=\"onMeridiemClick('PM')\"\n [id]=\"`${meridiemListId}PM`\">\n {{ messages().pm }}\n </li>\n }\n </ol>\n }\n</div>\n\n@if (footer()) {\n <div [class]=\"footerClass()\">\n <button monaButton look=\"primary\" [rounded]=\"rounded()\" [size]=\"size()\" (click)=\"onSetTimeClick()\">\n {{ messages().set }}\n </button>\n </div>\n}\n", dependencies: [{ kind: "directive", type: TimeSelectorItemDirective, selector: "li[monaTimeSelectorItem]", inputs: ["selected", "size", "value"] }, { kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "type", "toggleable", "class"], outputs: ["disabledChange", "loadingChange", "lookChange", "selectedChange"] }, { kind: "directive", type: TimeSelectorListDirective, selector: "ol[monaTimeSelectorList]", inputs: ["active", "popupHeight", "size"] }, { kind: "pipe", type: TimeLimiterPipe, name: "timeLimiter" }] }); }
634
673
  }
635
674
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TimeSelectorComponent, decorators: [{
636
675
  type: Component,
637
- args: [{ selector: "mona-time-selector", imports: [DecimalPipe, TimeLimiterPipe, TimeSelectorItemDirective, ButtonDirective, TimeSelectorListDirective], host: {
676
+ args: [{ selector: "mona-time-selector", imports: [TimeLimiterPipe, TimeSelectorItemDirective, ButtonDirective, TimeSelectorListDirective], host: {
638
677
  role: "group",
639
- "[attr.aria-label]": "ariaLabel()",
678
+ "[attr.aria-label]": "ariaLabel() || messages().timeSelector",
640
679
  "[attr.aria-disabled]": "disabled()",
641
680
  "[attr.aria-invalid]": "invalidState() ? 'true' : null",
642
681
  "[attr.aria-readonly]": "readonly()",
@@ -646,8 +685,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
646
685
  "[attr.data-required]": "required() || null",
647
686
  "[class]": "baseClass()",
648
687
  "(blur)": "onBlur()"
649
- }, template: "<div [class]=\"headerClass()\">\n <div>Hr</div>\n <div>Min</div>\n @if (showSeconds()) {\n <div>Sec</div>\n }\n</div>\n\n<div [class]=\"infoContainerClass()\">\n <span>{{ navigatedDateText() }}</span>\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"'small'\"\n (click)=\"onNowClick($event)\"\n (keydown.enter)=\"onNowClick($event)\"\n (keydown.space)=\"onNowClick($event)\">\n Now\n </button>\n</div>\n\n<div [class]=\"listContainerClass()\">\n <ol\n #hourList\n monaTimeSelectorList\n aria-label=\"Hours\"\n [attr.aria-activedescendant]=\"`${hourListId}${navigatedDate().hour}`\"\n [active]=\"focusedList() === 'hours'\"\n [id]=\"hourListId\"\n [popupHeight]=\"computedPopupHeight()\"\n [size]=\"size()\">\n @for (h of viewHours() | timeLimiter: \"h\" : navigatedDate() : minDate() : maxDate(); track h) {\n <li\n monaTimeSelectorItem\n [size]=\"size()\"\n [selected]=\"h.viewValue === hour()\"\n [value]=\"h.value\"\n [id]=\"`${hourListId}${h.value}`\"\n (click)=\"onHourChange(h.value)\">\n {{ h.viewValue | number: \"2.0\" }}\n </li>\n }\n </ol>\n <ol\n #minuteList\n monaTimeSelectorList\n aria-label=\"Minutes\"\n [attr.aria-activedescendant]=\"`${minuteListId}${navigatedDate().minute}`\"\n [active]=\"focusedList() === 'minutes'\"\n [id]=\"minuteListId\"\n [popupHeight]=\"computedPopupHeight()\"\n [size]=\"size()\">\n @for (m of minutes() | timeLimiter: \"m\" : navigatedDate() : minDate() : maxDate(); track m) {\n <li\n monaTimeSelectorItem\n [size]=\"size()\"\n [selected]=\"m.value === minute()\"\n [value]=\"m.value\"\n [id]=\"`${minuteListId}${m.value}`\"\n (click)=\"onMinuteChange(m.value)\">\n {{ m.viewValue | number: \"2.0\" }}\n </li>\n }\n </ol>\n @if (showSeconds()) {\n <ol\n #secondList\n monaTimeSelectorList\n aria-label=\"Seconds\"\n [attr.aria-activedescendant]=\"`${secondListId}${navigatedDate().second}`\"\n [active]=\"focusedList() === 'seconds'\"\n [id]=\"secondListId\"\n [popupHeight]=\"computedPopupHeight()\"\n [size]=\"size()\">\n @for (s of seconds() | timeLimiter: \"s\" : navigatedDate() : minDate() : maxDate(); track s) {\n <li\n monaTimeSelectorItem\n [size]=\"size()\"\n [selected]=\"s.value === second()\"\n [value]=\"s.value\"\n [id]=\"`${secondListId}${s.value}`\"\n (click)=\"onSecondChange(s.value)\">\n {{ s.value | number: \"2.0\" }}\n </li>\n }\n </ol>\n }\n @if (hourFormat() === \"12\") {\n <ol\n #meridiemList\n monaTimeSelectorList\n aria-label=\"AM/PM\"\n [attr.aria-activedescendant]=\"`${meridiemListId}${meridiem()}`\"\n [active]=\"focusedList() === 'meridiem'\"\n [id]=\"meridiemListId\"\n [popupHeight]=\"computedPopupHeight()\"\n [size]=\"size()\">\n @if (amMeridiemVisible()) {\n <li\n monaTimeSelectorItem\n [size]=\"size()\"\n [selected]=\"meridiem() === 'AM'\"\n [value]=\"'AM'\"\n (click)=\"onMeridiemClick('AM')\"\n [id]=\"`${meridiemListId}AM`\">\n AM\n </li>\n }\n @if (pmMeridiemVisible()) {\n <li\n monaTimeSelectorItem\n [size]=\"size()\"\n [selected]=\"meridiem() === 'PM'\"\n [value]=\"'PM'\"\n (click)=\"onMeridiemClick('PM')\"\n [id]=\"`${meridiemListId}PM`\">\n PM\n </li>\n }\n </ol>\n }\n</div>\n\n@if (footer()) {\n <div [class]=\"footerClass()\">\n <button monaButton look=\"primary\" [rounded]=\"rounded()\" [size]=\"size()\" (click)=\"onSetTimeClick()\">Set</button>\n </div>\n}\n" }]
650
- }], ctorParameters: () => [], propDecorators: { hourListRef: [{ type: i0.ViewChild, args: ["hourList", { isSignal: true }] }], meridiemListRef: [{ type: i0.ViewChild, args: ["meridiemList", { isSignal: true }] }], minuteListRef: [{ type: i0.ViewChild, args: ["minuteList", { isSignal: true }] }], secondListRef: [{ type: i0.ViewChild, args: ["secondList", { isSignal: true }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], focusOnMount: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusOnMount", required: false }] }], footer: [{ type: i0.Input, args: [{ isSignal: true, alias: "footer", required: false }] }], hourFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "hourFormat", required: false }] }], hourStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "hourStep", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], minuteStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "minuteStep", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], secondStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondStep", required: false }] }], showSeconds: [{ type: i0.Input, args: [{ isSignal: true, alias: "showSeconds", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }] } });
688
+ }, template: "<div [class]=\"headerClass()\">\n <div>{{ messages().headerHours }}</div>\n <div>{{ messages().headerMinutes }}</div>\n @if (showSeconds()) {\n <div>{{ messages().headerSeconds }}</div>\n }\n</div>\n\n<div [class]=\"infoContainerClass()\">\n <span>{{ navigatedDateText() }}</span>\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"'small'\"\n (click)=\"onNowClick($event)\"\n (keydown.enter)=\"onNowClick($event)\"\n (keydown.space)=\"onNowClick($event)\">\n {{ messages().now }}\n </button>\n</div>\n\n<div [class]=\"listContainerClass()\">\n <ol\n #hourList\n monaTimeSelectorList\n [attr.aria-label]=\"messages().hours\"\n [attr.aria-activedescendant]=\"`${hourListId}${navigatedDate().hour}`\"\n [active]=\"focusedList() === 'hours'\"\n [id]=\"hourListId\"\n [popupHeight]=\"computedPopupHeight()\"\n [size]=\"size()\">\n @for (h of viewHours() | timeLimiter: \"h\" : navigatedDate() : minDate() : maxDate(); track h) {\n <li\n monaTimeSelectorItem\n [size]=\"size()\"\n [selected]=\"h.viewValue === hour()\"\n [value]=\"h.value\"\n [id]=\"`${hourListId}${h.value}`\"\n (click)=\"onHourChange(h.value)\">\n {{ formatTwoDigit(h.viewValue) }}\n </li>\n }\n </ol>\n <ol\n #minuteList\n monaTimeSelectorList\n [attr.aria-label]=\"messages().minutes\"\n [attr.aria-activedescendant]=\"`${minuteListId}${navigatedDate().minute}`\"\n [active]=\"focusedList() === 'minutes'\"\n [id]=\"minuteListId\"\n [popupHeight]=\"computedPopupHeight()\"\n [size]=\"size()\">\n @for (m of minutes() | timeLimiter: \"m\" : navigatedDate() : minDate() : maxDate(); track m) {\n <li\n monaTimeSelectorItem\n [size]=\"size()\"\n [selected]=\"m.value === minute()\"\n [value]=\"m.value\"\n [id]=\"`${minuteListId}${m.value}`\"\n (click)=\"onMinuteChange(m.value)\">\n {{ formatTwoDigit(m.viewValue) }}\n </li>\n }\n </ol>\n @if (showSeconds()) {\n <ol\n #secondList\n monaTimeSelectorList\n [attr.aria-label]=\"messages().seconds\"\n [attr.aria-activedescendant]=\"`${secondListId}${navigatedDate().second}`\"\n [active]=\"focusedList() === 'seconds'\"\n [id]=\"secondListId\"\n [popupHeight]=\"computedPopupHeight()\"\n [size]=\"size()\">\n @for (s of seconds() | timeLimiter: \"s\" : navigatedDate() : minDate() : maxDate(); track s) {\n <li\n monaTimeSelectorItem\n [size]=\"size()\"\n [selected]=\"s.value === second()\"\n [value]=\"s.value\"\n [id]=\"`${secondListId}${s.value}`\"\n (click)=\"onSecondChange(s.value)\">\n {{ formatTwoDigit(s.value) }}\n </li>\n }\n </ol>\n }\n @if (hourFormat() === \"12\") {\n <ol\n #meridiemList\n monaTimeSelectorList\n [attr.aria-label]=\"messages().amPm\"\n [attr.aria-activedescendant]=\"`${meridiemListId}${meridiem()}`\"\n [active]=\"focusedList() === 'meridiem'\"\n [id]=\"meridiemListId\"\n [popupHeight]=\"computedPopupHeight()\"\n [size]=\"size()\">\n @if (amMeridiemVisible()) {\n <li\n monaTimeSelectorItem\n [size]=\"size()\"\n [selected]=\"meridiem() === 'AM'\"\n [value]=\"'AM'\"\n (click)=\"onMeridiemClick('AM')\"\n [id]=\"`${meridiemListId}AM`\">\n {{ messages().am }}\n </li>\n }\n @if (pmMeridiemVisible()) {\n <li\n monaTimeSelectorItem\n [size]=\"size()\"\n [selected]=\"meridiem() === 'PM'\"\n [value]=\"'PM'\"\n (click)=\"onMeridiemClick('PM')\"\n [id]=\"`${meridiemListId}PM`\">\n {{ messages().pm }}\n </li>\n }\n </ol>\n }\n</div>\n\n@if (footer()) {\n <div [class]=\"footerClass()\">\n <button monaButton look=\"primary\" [rounded]=\"rounded()\" [size]=\"size()\" (click)=\"onSetTimeClick()\">\n {{ messages().set }}\n </button>\n </div>\n}\n" }]
689
+ }], ctorParameters: () => [], propDecorators: { hourListRef: [{ type: i0.ViewChild, args: ["hourList", { isSignal: true }] }], meridiemListRef: [{ type: i0.ViewChild, args: ["meridiemList", { isSignal: true }] }], minuteListRef: [{ type: i0.ViewChild, args: ["minuteList", { isSignal: true }] }], secondListRef: [{ type: i0.ViewChild, args: ["secondList", { isSignal: true }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], focusOnMount: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusOnMount", required: false }] }], footer: [{ type: i0.Input, args: [{ isSignal: true, alias: "footer", required: false }] }], hourFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "hourFormat", required: false }] }], hourStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "hourStep", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], minuteStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "minuteStep", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], secondStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "secondStep", required: false }] }], showSeconds: [{ type: i0.Input, args: [{ isSignal: true, alias: "showSeconds", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }] } });
651
690
 
652
691
  /*
653
692
  * Public API Surface of @nanahoshi/mona-ui/time-selector
@@ -657,5 +696,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
657
696
  * Generated bundle index. Do not edit.
658
697
  */
659
698
 
660
- export { TimeSelectorComponent };
699
+ export { TIME_SELECTOR_DEFAULT_MESSAGES, TimeSelectorComponent };
661
700
  //# sourceMappingURL=nanahoshi-mona-ui-time-selector.mjs.map