@nanahoshi/mona-ui 0.19.0 → 0.20.1

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 (41) hide show
  1. package/THIRD_PARTY_NOTICES.md +60 -0
  2. package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +46 -36
  3. package/fesm2022/nanahoshi-mona-ui-calendar.mjs +120 -99
  4. package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +109 -99
  5. package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +19 -13
  6. package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +27 -17
  7. package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +37 -27
  8. package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +5 -4
  9. package/fesm2022/nanahoshi-mona-ui-editor.mjs +3 -3
  10. package/fesm2022/nanahoshi-mona-ui-filter.mjs +1 -1
  11. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-cell.component-Bg7rckst.mjs → nanahoshi-mona-ui-grid-grid-footer-cell.component-DLqCAee3.mjs} +2 -2
  12. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-BSSpaCLL.mjs → nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-Bd2twji1.mjs} +2 -2
  13. package/fesm2022/{nanahoshi-mona-ui-grid-grid-list.component-D9AwQFDV.mjs → nanahoshi-mona-ui-grid-grid-list.component-hakVMhqu.mjs} +5 -5
  14. package/fesm2022/{nanahoshi-mona-ui-grid-grid-toggle.component-Byb9iTes.mjs → nanahoshi-mona-ui-grid-grid-toggle.component-CtEs5t9x.mjs} +28 -17
  15. package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-CBmdtrXm.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-DoAGYLzr.mjs} +5 -5
  16. package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-DPmJmCap.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-BIK61ieq.mjs} +19 -10
  17. package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
  18. package/fesm2022/nanahoshi-mona-ui-i18n.mjs +3722 -16
  19. package/fesm2022/nanahoshi-mona-ui-list-view.mjs +2 -2
  20. package/fesm2022/nanahoshi-mona-ui-locales.mjs +4973 -0
  21. package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +46 -38
  22. package/fesm2022/nanahoshi-mona-ui-pager.mjs +23 -13
  23. package/fesm2022/nanahoshi-mona-ui-sheet.mjs +1 -1
  24. package/fesm2022/nanahoshi-mona-ui-stepper.mjs +14 -5
  25. package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +25 -16
  26. package/locales/package.json +4 -0
  27. package/package.json +5 -1
  28. package/types/nanahoshi-mona-ui-auto-complete.d.ts +19 -18
  29. package/types/nanahoshi-mona-ui-calendar.d.ts +25 -21
  30. package/types/nanahoshi-mona-ui-combo-box.d.ts +23 -22
  31. package/types/nanahoshi-mona-ui-date-picker.d.ts +7 -4
  32. package/types/nanahoshi-mona-ui-datetime-picker.d.ts +8 -5
  33. package/types/nanahoshi-mona-ui-dropdown-list.d.ts +18 -17
  34. package/types/nanahoshi-mona-ui-dropdowns.d.ts +6 -4
  35. package/types/nanahoshi-mona-ui-grid.d.ts +12 -1
  36. package/types/nanahoshi-mona-ui-i18n.d.ts +49 -2
  37. package/types/nanahoshi-mona-ui-locales.d.ts +4889 -0
  38. package/types/nanahoshi-mona-ui-multi-select.d.ts +20 -19
  39. package/types/nanahoshi-mona-ui-pager.d.ts +1 -0
  40. package/types/nanahoshi-mona-ui-stepper.d.ts +2 -1
  41. package/types/nanahoshi-mona-ui-time-picker.d.ts +4 -2
@@ -4,7 +4,7 @@ import { NgTemplateOutlet } from '@angular/common';
4
4
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
5
5
  import { select } from '@mirei/ts-collections';
6
6
  import { fromEvent } from 'rxjs';
7
- import { injectComponentDirection, MonaI18nService } from '@nanahoshi/mona-ui/i18n';
7
+ import { injectComponentDirection, MonaI18nService, formatNumber } from '@nanahoshi/mona-ui/i18n';
8
8
  import { cva } from 'class-variance-authority';
9
9
 
10
10
  /**
@@ -210,8 +210,6 @@ class StepperComponent {
210
210
  this.#direction = injectComponentDirection();
211
211
  this.#hostElementRef = inject(ElementRef);
212
212
  this.#i18n = inject(MonaI18nService);
213
- this.isRtl = computed(() => this.#direction() === "rtl", /* @ts-ignore */
214
- ...(ngDevMode ? [{ debugName: "isRtl" }] : /* istanbul ignore next */ []));
215
213
  this.#trackItemSize = computed(() => {
216
214
  const stepCount = this.viewSteps().length;
217
215
  return stepCount !== 0 ? 100 / stepCount : 0;
@@ -252,6 +250,8 @@ class StepperComponent {
252
250
  this.indicatorTemplate = contentChild(StepperIndicatorTemplateDirective, {
253
251
  read: TemplateRef
254
252
  });
253
+ this.isRtl = computed(() => this.#direction() === "rtl", /* @ts-ignore */
254
+ ...(ngDevMode ? [{ debugName: "isRtl" }] : /* istanbul ignore next */ []));
255
255
  this.labelTemplate = contentChild(StepperLabelTemplateDirective, { read: TemplateRef });
256
256
  this.listClass = computed(() => {
257
257
  const orientation = this.orientation();
@@ -363,6 +363,15 @@ class StepperComponent {
363
363
  read: () => this.setKeyboardEvents()
364
364
  });
365
365
  }
366
+ formatStepNumber(value) {
367
+ if (value == null) {
368
+ return "";
369
+ }
370
+ return formatNumber(value, this.#i18n.localeId(), {
371
+ maximumFractionDigits: 0,
372
+ useGrouping: false
373
+ });
374
+ }
366
375
  isStepActive(step) {
367
376
  const active = this.activeStep();
368
377
  return active != null && step.index <= active.index;
@@ -464,7 +473,7 @@ class StepperComponent {
464
473
  });
465
474
  }
466
475
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: StepperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
467
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: StepperComponent, isStandalone: true, selector: "mona-stepper", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, linear: { classPropertyName: "linear", publicName: "linear", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, progressAriaLabel: { classPropertyName: "progressAriaLabel", publicName: "progressAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, steps: { classPropertyName: "steps", publicName: "steps", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { step: "stepChange" }, host: { attributes: { "role": "group" }, properties: { "attr.aria-label": "ariaLabel() || messages().stepper", "class": "baseClass()", "style": "hostStyles()" } }, queries: [{ propertyName: "indicatorTemplate", first: true, predicate: StepperIndicatorTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "labelTemplate", first: true, predicate: StepperLabelTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "stepTemplate", first: true, predicate: StepperStepTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }], ngImport: i0, template: "<ol [class]=\"listClass()\">\n @for (step of viewSteps(); track step.index) {\n @let active = isStepActive(step);\n @let locked = isStepLocked(step);\n @let focused = step.index === highlightedStep();\n @let options = step.options;\n @let index = step.index;\n @let currentIndex = activeStep()?.index ?? -1;\n @let disabled = !!options.disabled;\n <li\n [class]=\"listItemClass()\"\n [class.cursor-pointer]=\"!locked\"\n [class.cursor-not-allowed]=\"locked\"\n [style]=\"trackItemStyles()\"\n role=\"presentation\"\n (click)=\"onStepClick(step)\">\n @if (stepTemplate()) {\n <span\n role=\"button\"\n [attr.aria-current]=\"step.index === activeStep()?.index ? 'step' : undefined\"\n [attr.aria-disabled]=\"locked ? true : undefined\"\n [attr.aria-label]=\"options.label\"\n [attr.tabindex]=\"focused ? 0 : -1\"\n (focus)=\"onIndicatorFocus(step)\">\n <ng-container\n [ngTemplateOutlet]=\"stepTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: options,\n index,\n active,\n currentIndex,\n disabled\n }\"></ng-container>\n </span>\n } @else {\n <span\n monaStepperIndicator\n [rounded]=\"rounded()\"\n [active]=\"active\"\n [focused]=\"focused\"\n role=\"button\"\n [attr.aria-current]=\"step.index === activeStep()?.index ? 'step' : undefined\"\n [attr.aria-disabled]=\"locked ? true : undefined\"\n [attr.aria-label]=\"options.label\"\n [attr.tabindex]=\"focused ? 0 : -1\"\n (focus)=\"onIndicatorFocus(step)\">\n @if (indicatorTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"indicatorTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: options,\n index,\n active,\n currentIndex,\n disabled\n }\"></ng-container>\n } @else {\n {{ step.index + 1 }}\n }\n </span>\n }\n @if (labelTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"labelTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: options,\n index,\n active,\n currentIndex,\n disabled\n }\"></ng-container>\n } @else {\n <span aria-hidden=\"true\">{{ options.label }}</span>\n }\n </li>\n }\n</ol>\n<div\n [class]=\"trackClass()\"\n [style]=\"trackStyles()\"\n role=\"progressbar\"\n [attr.aria-valuenow]=\"step()\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"progressMax()\"\n [attr.aria-label]=\"progressAriaLabel() || messages().stepProgress\">\n <div [class]=\"trackLineClass()\" [style]=\"trackInnerStyles()\"></div>\n</div>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: StepperIndicatorDirective, selector: "span[monaStepperIndicator]", inputs: ["active", "focused", "rounded"] }] }); }
476
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: StepperComponent, isStandalone: true, selector: "mona-stepper", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, linear: { classPropertyName: "linear", publicName: "linear", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, progressAriaLabel: { classPropertyName: "progressAriaLabel", publicName: "progressAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, steps: { classPropertyName: "steps", publicName: "steps", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { step: "stepChange" }, host: { attributes: { "role": "group" }, properties: { "attr.aria-label": "ariaLabel() || messages().stepper", "class": "baseClass()", "style": "hostStyles()" } }, queries: [{ propertyName: "indicatorTemplate", first: true, predicate: StepperIndicatorTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "labelTemplate", first: true, predicate: StepperLabelTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "stepTemplate", first: true, predicate: StepperStepTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }], ngImport: i0, template: "<ol [class]=\"listClass()\">\n @for (step of viewSteps(); track step.index) {\n @let active = isStepActive(step);\n @let locked = isStepLocked(step);\n @let focused = step.index === highlightedStep();\n @let options = step.options;\n @let index = step.index;\n @let currentIndex = activeStep()?.index ?? -1;\n @let disabled = !!options.disabled;\n <li\n [class]=\"listItemClass()\"\n [class.cursor-pointer]=\"!locked\"\n [class.cursor-not-allowed]=\"locked\"\n [style]=\"trackItemStyles()\"\n role=\"presentation\"\n (click)=\"onStepClick(step)\">\n @if (stepTemplate()) {\n <span\n role=\"button\"\n [attr.aria-current]=\"step.index === activeStep()?.index ? 'step' : undefined\"\n [attr.aria-disabled]=\"locked ? true : undefined\"\n [attr.aria-label]=\"options.label\"\n [attr.tabindex]=\"focused ? 0 : -1\"\n (focus)=\"onIndicatorFocus(step)\">\n <ng-container\n [ngTemplateOutlet]=\"stepTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: options,\n index,\n active,\n currentIndex,\n disabled\n }\"></ng-container>\n </span>\n } @else {\n <span\n monaStepperIndicator\n [rounded]=\"rounded()\"\n [active]=\"active\"\n [focused]=\"focused\"\n role=\"button\"\n [attr.aria-current]=\"step.index === activeStep()?.index ? 'step' : undefined\"\n [attr.aria-disabled]=\"locked ? true : undefined\"\n [attr.aria-label]=\"options.label\"\n [attr.tabindex]=\"focused ? 0 : -1\"\n (focus)=\"onIndicatorFocus(step)\">\n @if (indicatorTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"indicatorTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: options,\n index,\n active,\n currentIndex,\n disabled\n }\"></ng-container>\n } @else {\n {{ formatStepNumber(step.index + 1) }}\n }\n </span>\n }\n @if (labelTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"labelTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: options,\n index,\n active,\n currentIndex,\n disabled\n }\"></ng-container>\n } @else {\n <span aria-hidden=\"true\">{{ options.label }}</span>\n }\n </li>\n }\n</ol>\n<div\n [class]=\"trackClass()\"\n [style]=\"trackStyles()\"\n role=\"progressbar\"\n [attr.aria-valuenow]=\"step()\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"progressMax()\"\n [attr.aria-label]=\"progressAriaLabel() || messages().stepProgress\">\n <div [class]=\"trackLineClass()\" [style]=\"trackInnerStyles()\"></div>\n</div>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: StepperIndicatorDirective, selector: "span[monaStepperIndicator]", inputs: ["active", "focused", "rounded"] }] }); }
468
477
  }
469
478
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: StepperComponent, decorators: [{
470
479
  type: Component,
@@ -473,7 +482,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
473
482
  "[attr.aria-label]": "ariaLabel() || messages().stepper",
474
483
  "[class]": "baseClass()",
475
484
  "[style]": "hostStyles()"
476
- }, template: "<ol [class]=\"listClass()\">\n @for (step of viewSteps(); track step.index) {\n @let active = isStepActive(step);\n @let locked = isStepLocked(step);\n @let focused = step.index === highlightedStep();\n @let options = step.options;\n @let index = step.index;\n @let currentIndex = activeStep()?.index ?? -1;\n @let disabled = !!options.disabled;\n <li\n [class]=\"listItemClass()\"\n [class.cursor-pointer]=\"!locked\"\n [class.cursor-not-allowed]=\"locked\"\n [style]=\"trackItemStyles()\"\n role=\"presentation\"\n (click)=\"onStepClick(step)\">\n @if (stepTemplate()) {\n <span\n role=\"button\"\n [attr.aria-current]=\"step.index === activeStep()?.index ? 'step' : undefined\"\n [attr.aria-disabled]=\"locked ? true : undefined\"\n [attr.aria-label]=\"options.label\"\n [attr.tabindex]=\"focused ? 0 : -1\"\n (focus)=\"onIndicatorFocus(step)\">\n <ng-container\n [ngTemplateOutlet]=\"stepTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: options,\n index,\n active,\n currentIndex,\n disabled\n }\"></ng-container>\n </span>\n } @else {\n <span\n monaStepperIndicator\n [rounded]=\"rounded()\"\n [active]=\"active\"\n [focused]=\"focused\"\n role=\"button\"\n [attr.aria-current]=\"step.index === activeStep()?.index ? 'step' : undefined\"\n [attr.aria-disabled]=\"locked ? true : undefined\"\n [attr.aria-label]=\"options.label\"\n [attr.tabindex]=\"focused ? 0 : -1\"\n (focus)=\"onIndicatorFocus(step)\">\n @if (indicatorTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"indicatorTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: options,\n index,\n active,\n currentIndex,\n disabled\n }\"></ng-container>\n } @else {\n {{ step.index + 1 }}\n }\n </span>\n }\n @if (labelTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"labelTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: options,\n index,\n active,\n currentIndex,\n disabled\n }\"></ng-container>\n } @else {\n <span aria-hidden=\"true\">{{ options.label }}</span>\n }\n </li>\n }\n</ol>\n<div\n [class]=\"trackClass()\"\n [style]=\"trackStyles()\"\n role=\"progressbar\"\n [attr.aria-valuenow]=\"step()\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"progressMax()\"\n [attr.aria-label]=\"progressAriaLabel() || messages().stepProgress\">\n <div [class]=\"trackLineClass()\" [style]=\"trackInnerStyles()\"></div>\n</div>\n" }]
485
+ }, template: "<ol [class]=\"listClass()\">\n @for (step of viewSteps(); track step.index) {\n @let active = isStepActive(step);\n @let locked = isStepLocked(step);\n @let focused = step.index === highlightedStep();\n @let options = step.options;\n @let index = step.index;\n @let currentIndex = activeStep()?.index ?? -1;\n @let disabled = !!options.disabled;\n <li\n [class]=\"listItemClass()\"\n [class.cursor-pointer]=\"!locked\"\n [class.cursor-not-allowed]=\"locked\"\n [style]=\"trackItemStyles()\"\n role=\"presentation\"\n (click)=\"onStepClick(step)\">\n @if (stepTemplate()) {\n <span\n role=\"button\"\n [attr.aria-current]=\"step.index === activeStep()?.index ? 'step' : undefined\"\n [attr.aria-disabled]=\"locked ? true : undefined\"\n [attr.aria-label]=\"options.label\"\n [attr.tabindex]=\"focused ? 0 : -1\"\n (focus)=\"onIndicatorFocus(step)\">\n <ng-container\n [ngTemplateOutlet]=\"stepTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: options,\n index,\n active,\n currentIndex,\n disabled\n }\"></ng-container>\n </span>\n } @else {\n <span\n monaStepperIndicator\n [rounded]=\"rounded()\"\n [active]=\"active\"\n [focused]=\"focused\"\n role=\"button\"\n [attr.aria-current]=\"step.index === activeStep()?.index ? 'step' : undefined\"\n [attr.aria-disabled]=\"locked ? true : undefined\"\n [attr.aria-label]=\"options.label\"\n [attr.tabindex]=\"focused ? 0 : -1\"\n (focus)=\"onIndicatorFocus(step)\">\n @if (indicatorTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"indicatorTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: options,\n index,\n active,\n currentIndex,\n disabled\n }\"></ng-container>\n } @else {\n {{ formatStepNumber(step.index + 1) }}\n }\n </span>\n }\n @if (labelTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"labelTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: options,\n index,\n active,\n currentIndex,\n disabled\n }\"></ng-container>\n } @else {\n <span aria-hidden=\"true\">{{ options.label }}</span>\n }\n </li>\n }\n</ol>\n<div\n [class]=\"trackClass()\"\n [style]=\"trackStyles()\"\n role=\"progressbar\"\n [attr.aria-valuenow]=\"step()\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"progressMax()\"\n [attr.aria-label]=\"progressAriaLabel() || messages().stepProgress\">\n <div [class]=\"trackLineClass()\" [style]=\"trackInnerStyles()\"></div>\n</div>\n" }]
477
486
  }], ctorParameters: () => [], propDecorators: { indicatorTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => StepperIndicatorTemplateDirective), { ...{
478
487
  read: TemplateRef
479
488
  }, isSignal: true }] }], labelTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => StepperLabelTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], stepTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => StepperStepTemplateDirective), { ...{
@@ -4,8 +4,8 @@ import { inject, DestroyRef, ElementRef, computed, linkedSignal, signal, viewChi
4
4
  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
- import { DropdownService, dropdownPopupThemeVariants, DropdownPopupInputToken, DropdownPopupHandlerDirective } from '@nanahoshi/mona-ui/dropdowns';
8
- import { MonaI18nService } from '@nanahoshi/mona-ui/i18n';
7
+ import { DropdownService, dropdownPopupThemeVariants, DROPDOWN_POPUP_INPUT_TOKEN, DropdownPopupHandlerDirective } from '@nanahoshi/mona-ui/dropdowns';
8
+ import { MonaI18nService, gregorianDateTime, getLocaleTimeInputFormat, parseGregorianDate } from '@nanahoshi/mona-ui/i18n';
9
9
  import { themeControlSurfaceClasses, createElementControlId } from '@nanahoshi/mona-ui/internal';
10
10
  import { TextBoxComponent, TextBoxSuffixTemplateDirective } from '@nanahoshi/mona-ui/text-box';
11
11
  import { TimeSelectorComponent } from '@nanahoshi/mona-ui/time-selector';
@@ -96,14 +96,22 @@ class TimePickerComponent {
96
96
  ...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
97
97
  this.currentDateString = linkedSignal(() => {
98
98
  const value = this.value();
99
- const format = this.format();
99
+ const format = this.effectiveFormat();
100
100
  const locale = this.#i18n.localeId();
101
101
  if (!value) {
102
102
  return "";
103
103
  }
104
- return DateTime.fromJSDate(value).setLocale(locale).toFormat(format);
104
+ return gregorianDateTime(value, locale).toFormat(format);
105
105
  }, /* @ts-ignore */
106
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 */ []));
107
115
  this.expanded = computed(() => this.#dropdownService.popupRef() != null, /* @ts-ignore */
108
116
  ...(ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []));
109
117
  this.inputAttributes = computed(() => {
@@ -153,9 +161,10 @@ class TimePickerComponent {
153
161
  this.disabled = input(false, /* @ts-ignore */
154
162
  ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
155
163
  /**
156
- * @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
157
166
  */
158
- this.format = input("HH:mm", /* @ts-ignore */
167
+ this.format = input(null, /* @ts-ignore */
159
168
  ...(ngDevMode ? [{ debugName: "format" }] : /* istanbul ignore next */ []));
160
169
  /**
161
170
  * @description Sets the hour format of the time picker.
@@ -329,16 +338,16 @@ class TimePickerComponent {
329
338
  dateStringEquals(date1, date2) {
330
339
  if (date1 && date2) {
331
340
  const locale = this.#i18n.localeId();
332
- return (DateTime.fromJSDate(date1).setLocale(locale).toFormat(this.format()) ===
333
- DateTime.fromJSDate(date2).setLocale(locale).toFormat(this.format()));
341
+ return (gregorianDateTime(date1, locale).toFormat(this.effectiveFormat()) ===
342
+ gregorianDateTime(date2, locale).toFormat(this.effectiveFormat()));
334
343
  }
335
344
  return date1 === date2;
336
345
  }
337
346
  generateValidDateTime(dateString) {
338
347
  const value = this.value();
339
348
  const locale = this.#i18n.localeId();
340
- const valueDate = value ? DateTime.fromJSDate(value).setLocale(locale) : DateTime.now().setLocale(locale);
341
- let dateTime = DateTime.fromFormat(dateString, this.format(), { locale });
349
+ const valueDate = value ? gregorianDateTime(value, locale) : gregorianDateTime(new Date(), locale);
350
+ let dateTime = parseGregorianDate(dateString, this.effectiveFormat(), locale);
342
351
  if (dateTime.isValid) {
343
352
  return dateTime.set({ year: valueDate.year, month: valueDate.month, day: valueDate.day });
344
353
  }
@@ -346,7 +355,7 @@ class TimePickerComponent {
346
355
  const minDate = this.min();
347
356
  const date = minDate ?? maxDate;
348
357
  if (date) {
349
- const newDate = DateTime.fromJSDate(date).setLocale(locale);
358
+ const newDate = gregorianDateTime(date, locale);
350
359
  dateTime = newDate.set({ year: valueDate.year, month: valueDate.month, day: valueDate.day });
351
360
  return dateTime;
352
361
  }
@@ -395,14 +404,14 @@ class TimePickerComponent {
395
404
  this.touch.emit();
396
405
  }
397
406
  setCurrentDateString(date) {
398
- this.updateCurrentDateString(date, this.format());
407
+ this.updateCurrentDateString(date, this.effectiveFormat());
399
408
  }
400
409
  setDateValues() {
401
410
  const value = this.value();
402
411
  const locale = this.#i18n.localeId();
403
412
  this.navigatedDate.set(value ?? DateTime.now().setLocale(locale).toJSDate());
404
413
  if (value) {
405
- this.updateCurrentDateString(value, this.format());
414
+ this.updateCurrentDateString(value, this.effectiveFormat());
406
415
  }
407
416
  }
408
417
  setKeyboardNavigation() {
@@ -424,14 +433,14 @@ class TimePickerComponent {
424
433
  this.currentDateString.set("");
425
434
  return;
426
435
  }
427
- const dateString = DateTime.fromJSDate(date).setLocale(this.#i18n.localeId()).toFormat(format);
436
+ const dateString = gregorianDateTime(date, this.#i18n.localeId()).toFormat(format);
428
437
  this.currentDateString.set(dateString);
429
438
  }
430
439
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TimePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
431
440
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.6", type: TimePickerComponent, isStandalone: true, selector: "mona-time-picker", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, format: { classPropertyName: "format", publicName: "format", 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 }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, popupClass: { classPropertyName: "popupClass", publicName: "popupClass", isSignal: true, isRequired: false, transformFunction: null }, popupHeight: { classPropertyName: "popupHeight", publicName: "popupHeight", isSignal: true, isRequired: false, transformFunction: null }, popupWidth: { classPropertyName: "popupWidth", publicName: "popupWidth", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, readonlyInput: { classPropertyName: "readonlyInput", publicName: "readonlyInput", 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 }, showClearButton: { classPropertyName: "showClearButton", publicName: "showClearButton", 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 }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { close: "close", closed: "closed", open: "open", opened: "opened", touch: "touch", value: "valueChange" }, host: { listeners: { "blur": "onTimeInputBlur()" }, properties: { "attr.tabindex": "disabled() ? null : -1", "attr.aria-invalid": "invalidState() ? 'true' : null", "attr.data-disabled": "disabled() || null", "attr.data-expanded": "expanded()", "attr.data-invalid": "invalidState() || null", "attr.data-readonly": "readonly() || null", "class": "baseClass()" } }, providers: [
432
441
  DropdownService,
433
442
  {
434
- provide: DropdownPopupInputToken,
443
+ provide: DROPDOWN_POPUP_INPUT_TOKEN,
435
444
  useExisting: forwardRef(() => TimePickerComponent),
436
445
  multi: false
437
446
  }
@@ -442,7 +451,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
442
451
  args: [{ selector: "mona-time-picker", providers: [
443
452
  DropdownService,
444
453
  {
445
- provide: DropdownPopupInputToken,
454
+ provide: DROPDOWN_POPUP_INPUT_TOKEN,
446
455
  useExisting: forwardRef(() => TimePickerComponent),
447
456
  multi: false
448
457
  }
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-locales.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-locales.d.ts"
4
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nanahoshi/mona-ui",
3
- "version": "0.19.0",
3
+ "version": "0.20.1",
4
4
  "description": "A very light Angular UI framework",
5
5
  "author": "Nanahoshi",
6
6
  "repository": {
@@ -227,6 +227,10 @@
227
227
  "types": "./types/nanahoshi-mona-ui-list-view.d.ts",
228
228
  "default": "./fesm2022/nanahoshi-mona-ui-list-view.mjs"
229
229
  },
230
+ "./locales": {
231
+ "types": "./types/nanahoshi-mona-ui-locales.d.ts",
232
+ "default": "./fesm2022/nanahoshi-mona-ui-locales.mjs"
233
+ },
230
234
  "./menubar": {
231
235
  "types": "./types/nanahoshi-mona-ui-menubar.d.ts",
232
236
  "default": "./fesm2022/nanahoshi-mona-ui-menubar.mjs"
@@ -47,14 +47,14 @@ declare class AutoCompleteComponent<TData = unknown> implements FormValueControl
47
47
  protected readonly headerTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
48
48
  protected readonly id: string;
49
49
  protected readonly inputClass: _angular_core.Signal<string>;
50
- protected readonly itemTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
51
50
  protected readonly invalidState: _angular_core.Signal<boolean>;
52
51
  protected readonly isEmpty: _angular_core.Signal<boolean>;
52
+ protected readonly itemTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
53
53
  protected readonly listId: string;
54
54
  protected readonly listPopupClass: _angular_core.Signal<string>;
55
55
  protected readonly messages: _angular_core.Signal<_nanahoshi_mona_ui_i18n.MonaAutoCompleteMessages>;
56
56
  protected readonly noDataTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
57
- protected readonly popupTemplate: _angular_core.Signal<TemplateRef<any>>;
57
+ protected readonly popupTemplate: _angular_core.Signal<TemplateRef<unknown>>;
58
58
  protected readonly prefixTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
59
59
  protected readonly selectableOptions: SelectableOptions;
60
60
  protected readonly suffixTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
@@ -94,10 +94,10 @@ declare class AutoCompleteComponent<TData = unknown> implements FormValueControl
94
94
  */
95
95
  readonly disabled: _angular_core.ModelSignal<boolean>;
96
96
  /**
97
- * @description Predicate or field name used to determine whether an individual item is disabled.
98
- * @default undefined
97
+ * @description Defines whether the first matching item should be highlighted while typing.
98
+ * @default true
99
99
  */
100
- readonly itemDisabled: _angular_core.InputSignal<DropdownFieldPredicateType<TData>>;
100
+ readonly highlightFirst: _angular_core.InputSignal<boolean>;
101
101
  /**
102
102
  * @description Marks the autocomplete as invalid. When bound to a signal form field via `[formField]`,
103
103
  * this is written by the `FormField` directive.
@@ -105,10 +105,10 @@ declare class AutoCompleteComponent<TData = unknown> implements FormValueControl
105
105
  */
106
106
  readonly invalid: _angular_core.InputSignal<boolean>;
107
107
  /**
108
- * @description Defines whether the first matching item should be highlighted while typing.
109
- * @default true
108
+ * @description Predicate or field name used to determine whether an individual item is disabled.
109
+ * @default undefined
110
110
  */
111
- readonly highlightFirst: _angular_core.InputSignal<boolean>;
111
+ readonly itemDisabled: _angular_core.InputSignal<DropdownFieldPredicateType<TData>>;
112
112
  /**
113
113
  * @description Displays a loading indicator and prevents interaction while an operation is in progress.
114
114
  * @default false
@@ -189,37 +189,38 @@ declare class AutoCompleteComponent<TData = unknown> implements FormValueControl
189
189
  * @default ""
190
190
  */
191
191
  readonly userClass: _angular_core.InputSignal<string>;
192
- /**
193
- * @description Property name or accessor used to derive the value from a data item.
194
- * If null, the item itself is used as the value.
195
- * @default null
196
- */
197
- readonly valueField: _angular_core.InputSignal<DropdownFieldSelectorType<TData, unknown>>;
198
192
  /**
199
193
  * @description Two-way bindable current autocomplete value. Implements `FormValueControl<string | null>`,
200
194
  * enabling signal forms `[formField]` binding.
201
195
  * @default null
202
196
  */
203
197
  readonly value: _angular_core.ModelSignal<string | null>;
198
+ /**
199
+ * @description Property name or accessor used to derive the value from a data item.
200
+ * If null, the item itself is used as the value.
201
+ * @default null
202
+ */
203
+ readonly valueField: _angular_core.InputSignal<DropdownFieldSelectorType<TData, unknown>>;
204
204
  constructor();
205
- protected onInputBlur(): void;
205
+ focus(): void;
206
+ protected onInputBlur(event: FocusEvent): void;
206
207
  protected onItemSelect(event: SelectionChangeEvent<TData>): void;
208
+ protected onPopupPointerDown(event: PointerEvent): void;
207
209
  protected onValueClear(event: MouseEvent | KeyboardEvent): void;
208
210
  private clear;
209
211
  private closePopup;
210
- focus(): void;
211
212
  private initialize;
212
213
  private notifyFilterChange;
213
214
  private setArrowKeyNavigationSubscription;
214
215
  private setAutoCompleteValueChangeSubscription;
215
216
  private setEnterKeySubscription;
216
217
  private setEscapeKeySubscription;
217
- private setSpaceKeySubscription;
218
218
  private setPopupCloseSubscriptions;
219
+ private setSpaceKeySubscription;
219
220
  private setSubscriptions;
220
221
  private updateValue;
221
222
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AutoCompleteComponent<any>, never>;
222
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<AutoCompleteComponent<any>, "mona-auto-complete", never, { "ariaDescribedBy": { "alias": "aria-describedby"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "itemDisabled": { "alias": "itemDisabled"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "highlightFirst": { "alias": "highlightFirst"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "popupClass": { "alias": "popupClass"; "required": false; "isSignal": true; }; "popupHeight": { "alias": "popupHeight"; "required": false; "isSignal": true; }; "popupWidth": { "alias": "popupWidth"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "showClearButton": { "alias": "showClearButton"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "textField": { "alias": "textField"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "valueField": { "alias": "valueField"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "close": "close"; "closed": "closed"; "disabled": "disabledChange"; "open": "open"; "opened": "opened"; "touch": "touch"; "value": "valueChange"; }, ["footerTemplate", "groupHeaderTemplate", "headerTemplate", "itemTemplate", "noDataTemplate", "prefixTemplate", "suffixTemplate"], never, true, [{ directive: typeof i1.DropdownDataHandlerDirective; inputs: {}; outputs: {}; }, { directive: typeof i1.DropdownListPopupHandlerDirective; inputs: {}; outputs: {}; }]>;
223
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AutoCompleteComponent<any>, "mona-auto-complete", never, { "ariaDescribedBy": { "alias": "aria-describedby"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "highlightFirst": { "alias": "highlightFirst"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "itemDisabled": { "alias": "itemDisabled"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "popupClass": { "alias": "popupClass"; "required": false; "isSignal": true; }; "popupHeight": { "alias": "popupHeight"; "required": false; "isSignal": true; }; "popupWidth": { "alias": "popupWidth"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "showClearButton": { "alias": "showClearButton"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "textField": { "alias": "textField"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "valueField": { "alias": "valueField"; "required": false; "isSignal": true; }; }, { "close": "close"; "closed": "closed"; "disabled": "disabledChange"; "open": "open"; "opened": "opened"; "touch": "touch"; "value": "valueChange"; }, ["footerTemplate", "groupHeaderTemplate", "headerTemplate", "itemTemplate", "noDataTemplate", "prefixTemplate", "suffixTemplate"], never, true, [{ directive: typeof i1.DropdownDataHandlerDirective; inputs: {}; outputs: {}; }, { directive: typeof i1.DropdownListPopupHandlerDirective; inputs: {}; outputs: {}; }]>;
223
224
  }
224
225
 
225
226
  declare const AUTO_COMPLETE_DEFAULT_MESSAGES: MonaAutoCompleteMessages;
@@ -1,8 +1,8 @@
1
1
  import * as _mirei_ts_collections from '@mirei/ts-collections';
2
- import * as _angular_core from '@angular/core';
3
- import { TemplateRef } from '@angular/core';
4
2
  import * as _nanahoshi_mona_ui_i18n from '@nanahoshi/mona-ui/i18n';
5
3
  import { MonaCalendarMessages } from '@nanahoshi/mona-ui/i18n';
4
+ import * as _angular_core from '@angular/core';
5
+ import { TemplateRef } from '@angular/core';
6
6
  import { FormValueControl } from '@angular/forms/signals';
7
7
  import { CalendarView, DateDisabledType } from '@nanahoshi/mona-ui/date-input';
8
8
  import * as class_variance_authority_types from 'class-variance-authority/types';
@@ -56,7 +56,7 @@ declare class CalendarYearCellTemplateDirective {
56
56
 
57
57
  type CalendarSelection = "multiple" | "range" | "single";
58
58
 
59
- type FirstDayOfWeek = "monday" | "sunday";
59
+ type FirstDayOfWeek = "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday";
60
60
 
61
61
  declare const calendarBaseThemeVariants: (props?: ({
62
62
  disabled?: boolean | null | undefined;
@@ -108,7 +108,6 @@ type CalendarVariantInput = CalendarBaseVariantInput & CalendarHeaderVariantInpu
108
108
 
109
109
  declare class CalendarComponent implements CalendarVariantInput, FormValueControl<Date | Date[] | null> {
110
110
  #private;
111
- protected readonly messages: _angular_core.Signal<_nanahoshi_mona_ui_i18n.MonaCalendarMessages>;
112
111
  protected readonly ariaLabel: _angular_core.Signal<string>;
113
112
  protected readonly baseClass: _angular_core.Signal<string>;
114
113
  protected readonly calendarView: _angular_core.WritableSignal<CalendarView>;
@@ -117,9 +116,13 @@ declare class CalendarComponent implements CalendarVariantInput, FormValueContro
117
116
  protected readonly decadeGridClass: _angular_core.Signal<string>;
118
117
  protected readonly decadeStart: _angular_core.Signal<number>;
119
118
  protected readonly decadeYears: _angular_core.Signal<number[][]>;
119
+ protected readonly effectiveFirstDay: _angular_core.Signal<FirstDayOfWeek>;
120
120
  protected readonly gridId: string;
121
121
  protected readonly headerClass: _angular_core.Signal<string>;
122
+ protected readonly headerMonthYear: _angular_core.Signal<string>;
123
+ protected readonly headerYear: _angular_core.Signal<string>;
122
124
  protected readonly invalidState: _angular_core.Signal<boolean>;
125
+ protected readonly messages: _angular_core.Signal<_nanahoshi_mona_ui_i18n.MonaCalendarMessages>;
123
126
  protected readonly monthBounds: _angular_core.Signal<{
124
127
  start: Date;
125
128
  end: Date;
@@ -128,13 +131,11 @@ declare class CalendarComponent implements CalendarVariantInput, FormValueContro
128
131
  protected readonly monthDictChunked: _angular_core.Signal<_mirei_ts_collections.ImmutableSet<_mirei_ts_collections.ImmutableDictionary<Date, number>>>;
129
132
  protected readonly monthGridClass: _angular_core.Signal<string>;
130
133
  protected readonly monthGridHeaderClass: _angular_core.Signal<string>;
131
- protected readonly headerMonthYear: _angular_core.Signal<string>;
132
- protected readonly headerYear: _angular_core.Signal<string>;
133
134
  protected readonly months: _angular_core.Signal<_mirei_ts_collections.ImmutableSet<_mirei_ts_collections.ImmutableSet<readonly [number, string]>>>;
134
135
  protected readonly navigatedDate: _angular_core.WritableSignal<Date>;
135
136
  protected readonly nextButtonLabel: _angular_core.Signal<string>;
136
- protected readonly prevButtonLabel: _angular_core.Signal<string>;
137
137
  protected readonly pendingRangeStart: _angular_core.WritableSignal<Date | null>;
138
+ protected readonly prevButtonLabel: _angular_core.Signal<string>;
138
139
  protected readonly rangePreviewDate: _angular_core.WritableSignal<Date | null>;
139
140
  protected readonly rangePreviewDates: _angular_core.Signal<Date[]>;
140
141
  protected readonly selectedDates: _angular_core.WritableSignal<Date[]>;
@@ -142,7 +143,9 @@ declare class CalendarComponent implements CalendarVariantInput, FormValueContro
142
143
  protected readonly todayButtonLabel: _angular_core.Signal<string>;
143
144
  protected readonly viewSwitchButtonLabel: _angular_core.Signal<string>;
144
145
  protected readonly weekdays: _angular_core.Signal<{
146
+ display: string;
145
147
  short: string;
148
+ narrow: string;
146
149
  full: string;
147
150
  }[]>;
148
151
  protected readonly yearCellTemplate: _angular_core.Signal<CalendarYearCellTemplateDirective | undefined>;
@@ -157,10 +160,10 @@ declare class CalendarComponent implements CalendarVariantInput, FormValueContro
157
160
  */
158
161
  readonly disabledDates: _angular_core.InputSignal<DateDisabledType>;
159
162
  /**
160
- * @description Sets the first day of the week.
161
- * @default "monday"
163
+ * @description Sets the first day of the week. If not specified, derives from the active locale.
164
+ * @default null
162
165
  */
163
- readonly firstDay: _angular_core.InputSignal<FirstDayOfWeek>;
166
+ readonly firstDay: _angular_core.InputSignal<FirstDayOfWeek | null>;
164
167
  /**
165
168
  * @description Marks the calendar as invalid. When bound to a signal form field via `[formField]`,
166
169
  * this is written by the `FormField` directive.
@@ -180,6 +183,12 @@ declare class CalendarComponent implements CalendarVariantInput, FormValueContro
180
183
  * @default false
181
184
  */
182
185
  readonly readonly: _angular_core.InputSignal<boolean>;
186
+ /**
187
+ * @description Sets whether the calendar is required. When bound to a signal form field via `[formField]`,
188
+ * this is written by the `FormField` directive.
189
+ * @default false
190
+ */
191
+ readonly required: _angular_core.InputSignal<boolean>;
183
192
  /**
184
193
  * @description Sets the border radius of the calendar.
185
194
  * @default "medium"
@@ -195,12 +204,6 @@ declare class CalendarComponent implements CalendarVariantInput, FormValueContro
195
204
  * The `FormField` directive listens to this to mark the field as touched.
196
205
  */
197
206
  readonly touch: _angular_core.OutputEmitterRef<void>;
198
- /**
199
- * @description Sets whether the calendar is required. When bound to a signal form field via `[formField]`,
200
- * this is written by the `FormField` directive.
201
- * @default false
202
- */
203
- readonly required: _angular_core.InputSignal<boolean>;
204
207
  /**
205
208
  * @description Sets the touched state of the calendar. When bound to a signal form field via `[formField]`,
206
209
  * this is written by the `FormField` directive.
@@ -222,18 +225,19 @@ declare class CalendarComponent implements CalendarVariantInput, FormValueContro
222
225
  */
223
226
  readonly weekNumber: _angular_core.InputSignal<boolean>;
224
227
  constructor();
228
+ protected formatInteger(value: number): string;
229
+ protected getWeekNumber(date: Date): number;
225
230
  protected onDayClick(date: Date, event: MouseEvent): void;
226
231
  protected onDayPointerEnter(date: Date): void;
227
232
  protected onMonthClick(month: number): void;
228
233
  protected onMonthGridPointerLeave(): void;
229
234
  protected onNavigationClick(direction: "prev" | "next"): void;
230
- protected getWeekNumber(date: Date): number;
231
235
  protected onTodayButtonClick(): void;
232
236
  protected onViewChangeClick(view: CalendarView): void;
233
237
  protected onYearClick(year: number): void;
234
- private extendSelection;
235
238
  private clearPendingRange;
236
239
  private commitUserSelection;
240
+ private extendSelection;
237
241
  private focusActiveCell;
238
242
  private getDateArray;
239
243
  private getDatesForMultipleSelection;
@@ -243,10 +247,10 @@ declare class CalendarComponent implements CalendarVariantInput, FormValueContro
243
247
  private handleMultipleSelectionKeyboard;
244
248
  private handleRangeSelection;
245
249
  private handleSingleSelection;
246
- private isDateDisabled;
247
- private isEmptyValue;
248
250
  private horizontalCellDelta;
249
251
  private horizontalPeriodDirection;
252
+ private isDateDisabled;
253
+ private isEmptyValue;
250
254
  private navigateByDaysOrCells;
251
255
  private navigateByPeriod;
252
256
  private navigateByWeeksOrRows;
@@ -262,7 +266,7 @@ declare class CalendarComponent implements CalendarVariantInput, FormValueContro
262
266
  private switchToUpperView;
263
267
  private toggleFocusedDateInSelection;
264
268
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<CalendarComponent, never>;
265
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<CalendarComponent, "mona-calendar", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "disabledDates": { "alias": "disabledDates"; "required": false; "isSignal": true; }; "firstDay": { "alias": "firstDay"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "selection": { "alias": "selection"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "weekNumber": { "alias": "weekNumber"; "required": false; "isSignal": true; }; }, { "disabled": "disabledChange"; "touch": "touch"; "value": "valueChange"; }, ["decadeCellTemplate", "monthCellTemplate", "yearCellTemplate"], never, true, never>;
269
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<CalendarComponent, "mona-calendar", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "disabledDates": { "alias": "disabledDates"; "required": false; "isSignal": true; }; "firstDay": { "alias": "firstDay"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "selection": { "alias": "selection"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "weekNumber": { "alias": "weekNumber"; "required": false; "isSignal": true; }; }, { "disabled": "disabledChange"; "touch": "touch"; "value": "valueChange"; }, ["decadeCellTemplate", "monthCellTemplate", "yearCellTemplate"], never, true, never>;
266
270
  }
267
271
 
268
272
  declare const CALENDAR_DEFAULT_MESSAGES: MonaCalendarMessages;