@nanahoshi/mona-ui 0.38.0 → 0.39.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 (26) hide show
  1. package/docs/api/date-picker.md +2 -0
  2. package/docs/api/date-range-picker.md +2 -0
  3. package/docs/api/datetime-picker.md +2 -0
  4. package/docs/api/dropdowns.md +1 -1
  5. package/docs/api/time-picker.md +2 -0
  6. package/docs/date-picker.md +5 -1
  7. package/docs/date-range-picker.md +5 -1
  8. package/docs/datetime-picker.md +5 -1
  9. package/docs/time-picker.md +5 -1
  10. package/fesm2022/nanahoshi-mona-ui-calendar.mjs +2 -2
  11. package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +36 -2
  12. package/fesm2022/nanahoshi-mona-ui-date-range-picker.mjs +37 -3
  13. package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +52 -5
  14. package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +39 -10
  15. package/fesm2022/nanahoshi-mona-ui-filter.mjs +2 -0
  16. package/fesm2022/{nanahoshi-mona-ui-grid-grid-list.component-S2iCn8TV.mjs → nanahoshi-mona-ui-grid-grid-list.component-BoSXXLKQ.mjs} +2 -2
  17. package/fesm2022/{nanahoshi-mona-ui-grid-grid-row.component-BUJvgihp.mjs → nanahoshi-mona-ui-grid-grid-row.component-Df2gfS0X.mjs} +3 -1
  18. package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-Wndy-_Bt.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-xjrcCXXF.mjs} +2 -2
  19. package/fesm2022/nanahoshi-mona-ui-grid.mjs +6 -4
  20. package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +39 -4
  21. package/package.json +1 -1
  22. package/types/nanahoshi-mona-ui-date-picker.d.ts +25 -1
  23. package/types/nanahoshi-mona-ui-date-range-picker.d.ts +26 -1
  24. package/types/nanahoshi-mona-ui-datetime-picker.d.ts +34 -1
  25. package/types/nanahoshi-mona-ui-dropdowns.d.ts +25 -6
  26. package/types/nanahoshi-mona-ui-time-picker.d.ts +29 -2
@@ -1,14 +1,14 @@
1
1
  import { CdkTrapFocus } from "@angular/cdk/a11y";
2
2
  import { NgTemplateOutlet } from "@angular/common";
3
3
  import * as i0 from "@angular/core";
4
- import { Component, DestroyRef, ElementRef, TemplateRef, afterNextRender, booleanAttribute, computed, contentChild, effect, forwardRef, inject, input, linkedSignal, model, output, signal, untracked, viewChild } from "@angular/core";
4
+ import { Component, DOCUMENT, DestroyRef, ElementRef, TemplateRef, afterNextRender, booleanAttribute, computed, contentChild, effect, forwardRef, inject, input, linkedSignal, model, output, signal, untracked, viewChild } from "@angular/core";
5
5
  import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
6
6
  import { LucideCalendar } from "@lucide/angular";
7
7
  import { ButtonDirective } from "@nanahoshi/mona-ui/button";
8
8
  import { CalendarComponent, CalendarDecadeCellTemplateDirective, CalendarMonthCellTemplateDirective, CalendarYearCellTemplateDirective } from "@nanahoshi/mona-ui/calendar";
9
9
  import { CalendarService, DateInputPrefixTemplateDirective, TimeSelectorService, createTypedDateInput, datePopupThemeVariants, getLocaleHourFormat } from "@nanahoshi/mona-ui/date-input";
10
10
  import * as i1 from "@nanahoshi/mona-ui/dropdowns";
11
- import { DROPDOWN_POPUP_INPUT_TOKEN, DropdownPopupHandlerDirective, DropdownService } from "@nanahoshi/mona-ui/dropdowns";
11
+ import { DROPDOWN_POPUP_INPUT_TOKEN, DropdownPopupHandlerDirective, DropdownService, dropdownSheetPickerClasses } from "@nanahoshi/mona-ui/dropdowns";
12
12
  import { MonaI18nService, getLocaleDateTimeInputFormat, injectComponentDirection } from "@nanahoshi/mona-ui/i18n";
13
13
  import { FIELD_ASSOCIATION_BOUNDARY, createElementControlId, injectEffectiveDisabled, injectLabelAssociation, themeControlSurfaceClasses } from "@nanahoshi/mona-ui/internal";
14
14
  import { TextBoxComponent, TextBoxPrefixTemplateDirective, TextBoxSuffixTemplateDirective } from "@nanahoshi/mona-ui/text-box";
@@ -95,6 +95,7 @@ var DateTimePickerComponent = class DateTimePickerComponent {
95
95
  #calendarService;
96
96
  #destroyRef;
97
97
  #direction;
98
+ #document;
98
99
  #dropdownService;
99
100
  #hostElementRef;
100
101
  #i18n;
@@ -104,6 +105,7 @@ var DateTimePickerComponent = class DateTimePickerComponent {
104
105
  this.#calendarService = inject(CalendarService);
105
106
  this.#destroyRef = inject(DestroyRef);
106
107
  this.#direction = injectComponentDirection();
108
+ this.#document = inject(DOCUMENT);
107
109
  this.#dropdownService = inject(DropdownService);
108
110
  this.#hostElementRef = inject(ElementRef);
109
111
  this.#i18n = inject(MonaI18nService);
@@ -162,6 +164,7 @@ var DateTimePickerComponent = class DateTimePickerComponent {
162
164
  this.messages = this.#i18n.componentMessages("dateTimePicker", DATETIME_PICKER_DEFAULT_MESSAGES);
163
165
  this.monthCellTemplate = contentChild(CalendarMonthCellTemplateDirective, ...ngDevMode ? [{ debugName: "monthCellTemplate" }] : /* istanbul ignore next */ []);
164
166
  this.navigatedDate = linkedSignal(() => this.value() ?? this.startDate(), ...ngDevMode ? [{ debugName: "navigatedDate" }] : /* istanbul ignore next */ []);
167
+ this.panelHeight = signal(null, ...ngDevMode ? [{ debugName: "panelHeight" }] : /* istanbul ignore next */ []);
165
168
  this.panelId = createElementControlId();
166
169
  this.pickerPopupClass = computed(() => {
167
170
  const rounded = this.rounded();
@@ -171,7 +174,9 @@ var DateTimePickerComponent = class DateTimePickerComponent {
171
174
  rounded,
172
175
  size
173
176
  });
174
- return twMerge(variantClass, userClass);
177
+ const layoutClass = "flex h-68 flex-col";
178
+ const sheetClass = this.sheet() ? dropdownSheetPickerClasses : "";
179
+ return twMerge(variantClass, layoutClass, sheetClass, userClass);
175
180
  }, ...ngDevMode ? [{ debugName: "pickerPopupClass" }] : /* istanbul ignore next */ []);
176
181
  this.popupId = createElementControlId();
177
182
  this.popupTemplate = viewChild.required("datePopupTemplate", ...ngDevMode ? [{ debugName: "popupTemplate" }] : /* istanbul ignore next */ []);
@@ -179,6 +184,7 @@ var DateTimePickerComponent = class DateTimePickerComponent {
179
184
  ...ngDevMode ? { debugName: "prefixTemplate" } : /* istanbul ignore next */ {},
180
185
  read: TemplateRef
181
186
  });
187
+ this.sheet = this.#dropdownService.sheet.asReadonly();
182
188
  this.timePickerMax = computed(() => {
183
189
  const maxDate = this.max();
184
190
  const navigatedDate = this.navigatedDate();
@@ -197,8 +203,11 @@ var DateTimePickerComponent = class DateTimePickerComponent {
197
203
  if (min.year === date.year && min.month === date.month && min.day === date.day) return minDate;
198
204
  return null;
199
205
  }, ...ngDevMode ? [{ debugName: "timePickerMin" }] : /* istanbul ignore next */ []);
206
+ this.timeSelectorSize = computed(() => this.sheet() ? "large" : this.size(), ...ngDevMode ? [{ debugName: "timeSelectorSize" }] : /* istanbul ignore next */ []);
200
207
  this.timeTabId = createElementControlId();
201
208
  this.yearCellTemplate = contentChild(CalendarYearCellTemplateDirective, ...ngDevMode ? [{ debugName: "yearCellTemplate" }] : /* istanbul ignore next */ []);
209
+ this.adaptiveMode = input("none", ...ngDevMode ? [{ debugName: "adaptiveMode" }] : /* istanbul ignore next */ []);
210
+ this.adaptiveTitle = input("", ...ngDevMode ? [{ debugName: "adaptiveTitle" }] : /* istanbul ignore next */ []);
202
211
  this.ariaDescribedBy = input("", {
203
212
  ...ngDevMode ? { debugName: "ariaDescribedBy" } : /* istanbul ignore next */ {},
204
213
  alias: "aria-describedby"
@@ -297,6 +306,7 @@ var DateTimePickerComponent = class DateTimePickerComponent {
297
306
  afterNextRender({ read: () => {
298
307
  this.setPopupKeyboardSubscription();
299
308
  this.setPopupCloseSubscription();
309
+ this.setPopupOpenSubscription();
300
310
  } });
301
311
  }
302
312
  focus(options) {
@@ -413,6 +423,7 @@ var DateTimePickerComponent = class DateTimePickerComponent {
413
423
  this.activeView.set("date");
414
424
  this.focusViewOnMount.set(true);
415
425
  this.navigatedDate.set(this.value() ?? this.startDate());
426
+ this.panelHeight.set(null);
416
427
  });
417
428
  }
418
429
  setPopupKeyboardSubscription() {
@@ -439,6 +450,12 @@ var DateTimePickerComponent = class DateTimePickerComponent {
439
450
  }
440
451
  });
441
452
  }
453
+ setPopupOpenSubscription() {
454
+ this.#dropdownService.popupOpenComplete$.pipe(takeUntilDestroyed(this.#destroyRef)).subscribe(() => {
455
+ const panel = this.#dropdownService.sheet() ? this.#document.getElementById(this.panelId) : null;
456
+ this.panelHeight.set(panel?.offsetHeight || null);
457
+ });
458
+ }
442
459
  startDate() {
443
460
  return this.updateDateIfNotInRange(/* @__PURE__ */ new Date());
444
461
  }
@@ -467,6 +484,20 @@ var DateTimePickerComponent = class DateTimePickerComponent {
467
484
  isStandalone: true,
468
485
  selector: "mona-datetime-picker",
469
486
  inputs: {
487
+ adaptiveMode: {
488
+ classPropertyName: "adaptiveMode",
489
+ publicName: "adaptiveMode",
490
+ isSignal: true,
491
+ isRequired: false,
492
+ transformFunction: null
493
+ },
494
+ adaptiveTitle: {
495
+ classPropertyName: "adaptiveTitle",
496
+ publicName: "adaptiveTitle",
497
+ isSignal: true,
498
+ isRequired: false,
499
+ transformFunction: null
500
+ },
470
501
  ariaDescribedBy: {
471
502
  classPropertyName: "ariaDescribedBy",
472
503
  publicName: "aria-describedby",
@@ -755,7 +786,7 @@ var DateTimePickerComponent = class DateTimePickerComponent {
755
786
  }],
756
787
  hostDirectives: [{ directive: i1.DropdownPopupHandlerDirective }],
757
788
  ngImport: i0,
758
- template: "<mona-text-box\n (inputBlur)=\"onInputBlur()\"\n (valueChange)=\"typedInput.edit($event)\"\n [aria-describedby]=\"describedBy() ?? ''\"\n [aria-label]=\"ariaLabel()\"\n [aria-labelledby]=\"labelledBy() ?? ''\"\n [clearButton]=\"showClearButton()\"\n [disabled]=\"effectiveDisabled()\"\n [inputAttributes]=\"inputAttributes()\"\n [inputId]=\"inputId()\"\n [invalid]=\"invalidState()\"\n [placeholder]=\"placeholder()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [touched]=\"invalidState() || touched()\"\n [value]=\"typedInput.text()\">\n @if (prefixTemplate()) {\n <ng-template monaTextBoxPrefixTemplate>\n <ng-container [ngTemplateOutlet]=\"prefixTemplate()\"></ng-container>\n </ng-template>\n }\n <ng-template monaTextBoxSuffixTemplate>\n <button\n monaButton\n look=\"ghost\"\n [iconOnly]=\"true\"\n [size]=\"size()\"\n [rounded]=\"'none'\"\n class=\"aspect-square h-full w-auto\"\n [attr.aria-label]=\"messages().openDateTimePicker\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-controls]=\"popupId\"\n (click)=\"onDateInputButtonClick()\"\n [disabled]=\"effectiveDisabled() || readonly()\"\n [tabindex]=\"-1\">\n <svg lucideCalendar [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n </ng-template>\n</mona-text-box>\n\n<ng-template #datePopupTemplate>\n <div\n [class]=\"pickerPopupClass()\"\n [id]=\"popupId\"\n class=\"flex h-68 flex-col\"\n aria-modal=\"true\"\n role=\"dialog\"\n [attr.aria-label]=\"messages().dateTimePicker\"\n cdkTrapFocus>\n <div [class]=\"headerClass()\">\n <div class=\"flex w-full gap-1\" role=\"tablist\" (keydown)=\"onTabKeydown($event)\">\n <button\n monaButton\n type=\"button\"\n role=\"tab\"\n class=\"flex-1\"\n [id]=\"dateTabId\"\n [attr.aria-controls]=\"panelId\"\n [attr.aria-selected]=\"activeView() === 'date'\"\n [disabled]=\"effectiveDisabled()\"\n [rounded]=\"rounded()\"\n [selected]=\"activeView() === 'date'\"\n [size]=\"size()\"\n [tabindex]=\"activeView() === 'date' ? 0 : -1\"\n (click)=\"selectTab('date')\">\n {{ messages().date }}\n </button>\n <button\n monaButton\n type=\"button\"\n role=\"tab\"\n class=\"flex-1\"\n [id]=\"timeTabId\"\n [attr.aria-controls]=\"panelId\"\n [attr.aria-selected]=\"activeView() === 'time'\"\n [disabled]=\"effectiveDisabled()\"\n [rounded]=\"rounded()\"\n [selected]=\"activeView() === 'time'\"\n [size]=\"size()\"\n [tabindex]=\"activeView() === 'time' ? 0 : -1\"\n (click)=\"selectTab('time')\">\n {{ messages().time }}\n </button>\n </div>\n </div>\n <div\n class=\"overflow-hidden\"\n role=\"tabpanel\"\n [id]=\"panelId\"\n [attr.aria-labelledby]=\"activeView() === 'date' ? dateTabId : timeTabId\">\n @if (activeView() === \"date\") {\n <div class=\"flex h-full items-center justify-center\">\n <mona-calendar\n [focusOnMount]=\"focusViewOnMount()\"\n [disabledDates]=\"disabledDates()\"\n [minDate]=\"min()\"\n [maxDate]=\"max()\"\n [firstDay]=\"firstDay()\"\n [weekNumber]=\"weekNumber()\"\n [value]=\"navigatedDate()\"\n [disabled]=\"effectiveDisabled()\"\n [readonly]=\"readonly()\"\n [rounded]=\"rounded()\"\n (valueChange)=\"onCalendarValueChange($event)\"\n class=\"flex-1 border-none shadow-none\">\n @if (decadeCellTemplate()) {\n <ng-template monaCalendarDecadeCellTemplate let-year>\n <ng-container\n [ngTemplateOutlet]=\"decadeCellTemplate()?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: year }\"></ng-container>\n </ng-template>\n }\n @if (monthCellTemplate()) {\n <ng-template monaCalendarMonthCellTemplate let-day let-date=\"date\">\n <ng-container\n [ngTemplateOutlet]=\"monthCellTemplate()?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: day, date }\"></ng-container>\n </ng-template>\n }\n @if (yearCellTemplate()) {\n <ng-template monaCalendarYearCellTemplate let-year let-text=\"text\">\n <ng-container\n [ngTemplateOutlet]=\"yearCellTemplate()?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: year, text }\"></ng-container>\n </ng-template>\n }\n </mona-calendar>\n </div>\n }\n @if (activeView() === \"time\") {\n <div class=\"flex h-full max-h-64 items-center justify-center\">\n <mona-time-selector\n [focusOnMount]=\"focusViewOnMount()\"\n [value]=\"navigatedDate()\"\n (valueChange)=\"onTimeSelectorValueChange($event)\"\n [disabled]=\"effectiveDisabled()\"\n [readonly]=\"readonly()\"\n [max]=\"timePickerMax()\"\n [min]=\"timePickerMin()\"\n [footer]=\"false\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [hourStep]=\"hourStep()\"\n [minuteStep]=\"minuteStep()\"\n [secondStep]=\"secondStep()\"\n [hourFormat]=\"effectiveHourFormat()\"\n [showSeconds]=\"showSeconds()\"></mona-time-selector>\n </div>\n }\n </div>\n <div [class]=\"footerClass()\">\n <button\n monaButton\n look=\"primary\"\n [disabled]=\"effectiveDisabled()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n (click)=\"onSetDateClick()\">\n {{ messages().set }}\n </button>\n <button\n monaButton\n look=\"default\"\n [disabled]=\"effectiveDisabled()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n (click)=\"onCancelClick()\">\n {{ messages().cancel }}\n </button>\n </div>\n </div>\n</ng-template>\n",
789
+ template: "<mona-text-box\n (inputBlur)=\"onInputBlur()\"\n (valueChange)=\"typedInput.edit($event)\"\n [aria-describedby]=\"describedBy() ?? ''\"\n [aria-label]=\"ariaLabel()\"\n [aria-labelledby]=\"labelledBy() ?? ''\"\n [clearButton]=\"showClearButton()\"\n [disabled]=\"effectiveDisabled()\"\n [inputAttributes]=\"inputAttributes()\"\n [inputId]=\"inputId()\"\n [invalid]=\"invalidState()\"\n [placeholder]=\"placeholder()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [touched]=\"invalidState() || touched()\"\n [value]=\"typedInput.text()\">\n @if (prefixTemplate()) {\n <ng-template monaTextBoxPrefixTemplate>\n <ng-container [ngTemplateOutlet]=\"prefixTemplate()\"></ng-container>\n </ng-template>\n }\n <ng-template monaTextBoxSuffixTemplate>\n <button\n monaButton\n look=\"ghost\"\n [iconOnly]=\"true\"\n [size]=\"size()\"\n [rounded]=\"'none'\"\n class=\"aspect-square h-full w-auto\"\n [attr.aria-label]=\"messages().openDateTimePicker\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-controls]=\"popupId\"\n (click)=\"onDateInputButtonClick()\"\n [disabled]=\"effectiveDisabled() || readonly()\"\n [tabindex]=\"-1\">\n <svg lucideCalendar [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n </ng-template>\n</mona-text-box>\n\n<ng-template #datePopupTemplate>\n <div\n [class]=\"pickerPopupClass()\"\n [id]=\"popupId\"\n aria-modal=\"true\"\n role=\"dialog\"\n [attr.aria-label]=\"messages().dateTimePicker\"\n cdkTrapFocus>\n <div [class]=\"headerClass()\">\n <div class=\"flex w-full gap-1\" role=\"tablist\" (keydown)=\"onTabKeydown($event)\">\n <button\n monaButton\n type=\"button\"\n role=\"tab\"\n class=\"flex-1\"\n [id]=\"dateTabId\"\n [attr.aria-controls]=\"panelId\"\n [attr.aria-selected]=\"activeView() === 'date'\"\n [disabled]=\"effectiveDisabled()\"\n [rounded]=\"rounded()\"\n [selected]=\"activeView() === 'date'\"\n [size]=\"size()\"\n [tabindex]=\"activeView() === 'date' ? 0 : -1\"\n (click)=\"selectTab('date')\">\n {{ messages().date }}\n </button>\n <button\n monaButton\n type=\"button\"\n role=\"tab\"\n class=\"flex-1\"\n [id]=\"timeTabId\"\n [attr.aria-controls]=\"panelId\"\n [attr.aria-selected]=\"activeView() === 'time'\"\n [disabled]=\"effectiveDisabled()\"\n [rounded]=\"rounded()\"\n [selected]=\"activeView() === 'time'\"\n [size]=\"size()\"\n [tabindex]=\"activeView() === 'time' ? 0 : -1\"\n (click)=\"selectTab('time')\">\n {{ messages().time }}\n </button>\n </div>\n </div>\n <div\n class=\"overflow-hidden\"\n role=\"tabpanel\"\n [id]=\"panelId\"\n [style.height.px]=\"panelHeight()\"\n [attr.aria-labelledby]=\"activeView() === 'date' ? dateTabId : timeTabId\">\n @if (activeView() === \"date\") {\n <div class=\"flex h-full items-center justify-center\">\n <mona-calendar\n [focusOnMount]=\"focusViewOnMount()\"\n [disabledDates]=\"disabledDates()\"\n [minDate]=\"min()\"\n [maxDate]=\"max()\"\n [firstDay]=\"firstDay()\"\n [weekNumber]=\"weekNumber()\"\n [value]=\"navigatedDate()\"\n [disabled]=\"effectiveDisabled()\"\n [readonly]=\"readonly()\"\n [rounded]=\"rounded()\"\n (valueChange)=\"onCalendarValueChange($event)\"\n class=\"flex-1 border-none shadow-none\">\n @if (decadeCellTemplate()) {\n <ng-template monaCalendarDecadeCellTemplate let-year>\n <ng-container\n [ngTemplateOutlet]=\"decadeCellTemplate()?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: year }\"></ng-container>\n </ng-template>\n }\n @if (monthCellTemplate()) {\n <ng-template monaCalendarMonthCellTemplate let-day let-date=\"date\">\n <ng-container\n [ngTemplateOutlet]=\"monthCellTemplate()?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: day, date }\"></ng-container>\n </ng-template>\n }\n @if (yearCellTemplate()) {\n <ng-template monaCalendarYearCellTemplate let-year let-text=\"text\">\n <ng-container\n [ngTemplateOutlet]=\"yearCellTemplate()?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: year, text }\"></ng-container>\n </ng-template>\n }\n </mona-calendar>\n </div>\n }\n @if (activeView() === \"time\") {\n <div class=\"flex h-full items-center justify-center\" [class.max-h-64]=\"!sheet()\">\n <mona-time-selector\n [focusOnMount]=\"focusViewOnMount()\"\n [value]=\"navigatedDate()\"\n (valueChange)=\"onTimeSelectorValueChange($event)\"\n [disabled]=\"effectiveDisabled()\"\n [readonly]=\"readonly()\"\n [max]=\"timePickerMax()\"\n [min]=\"timePickerMin()\"\n [footer]=\"false\"\n [size]=\"timeSelectorSize()\"\n [rounded]=\"rounded()\"\n [hourStep]=\"hourStep()\"\n [minuteStep]=\"minuteStep()\"\n [secondStep]=\"secondStep()\"\n [hourFormat]=\"effectiveHourFormat()\"\n [showSeconds]=\"showSeconds()\"></mona-time-selector>\n </div>\n }\n </div>\n <div [class]=\"footerClass()\">\n <button\n monaButton\n look=\"primary\"\n [disabled]=\"effectiveDisabled()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n (click)=\"onSetDateClick()\">\n {{ messages().set }}\n </button>\n <button\n monaButton\n look=\"default\"\n [disabled]=\"effectiveDisabled()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n (click)=\"onCancelClick()\">\n {{ messages().cancel }}\n </button>\n </div>\n </div>\n</ng-template>\n",
759
790
  dependencies: [
760
791
  {
761
792
  kind: "component",
@@ -965,7 +996,7 @@ i0.ɵɵngDeclareClassMetadata({
965
996
  "(focusout)": "onFocusOut($event)",
966
997
  "(keydown)": "onKeydown($event)"
967
998
  },
968
- template: "<mona-text-box\n (inputBlur)=\"onInputBlur()\"\n (valueChange)=\"typedInput.edit($event)\"\n [aria-describedby]=\"describedBy() ?? ''\"\n [aria-label]=\"ariaLabel()\"\n [aria-labelledby]=\"labelledBy() ?? ''\"\n [clearButton]=\"showClearButton()\"\n [disabled]=\"effectiveDisabled()\"\n [inputAttributes]=\"inputAttributes()\"\n [inputId]=\"inputId()\"\n [invalid]=\"invalidState()\"\n [placeholder]=\"placeholder()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [touched]=\"invalidState() || touched()\"\n [value]=\"typedInput.text()\">\n @if (prefixTemplate()) {\n <ng-template monaTextBoxPrefixTemplate>\n <ng-container [ngTemplateOutlet]=\"prefixTemplate()\"></ng-container>\n </ng-template>\n }\n <ng-template monaTextBoxSuffixTemplate>\n <button\n monaButton\n look=\"ghost\"\n [iconOnly]=\"true\"\n [size]=\"size()\"\n [rounded]=\"'none'\"\n class=\"aspect-square h-full w-auto\"\n [attr.aria-label]=\"messages().openDateTimePicker\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-controls]=\"popupId\"\n (click)=\"onDateInputButtonClick()\"\n [disabled]=\"effectiveDisabled() || readonly()\"\n [tabindex]=\"-1\">\n <svg lucideCalendar [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n </ng-template>\n</mona-text-box>\n\n<ng-template #datePopupTemplate>\n <div\n [class]=\"pickerPopupClass()\"\n [id]=\"popupId\"\n class=\"flex h-68 flex-col\"\n aria-modal=\"true\"\n role=\"dialog\"\n [attr.aria-label]=\"messages().dateTimePicker\"\n cdkTrapFocus>\n <div [class]=\"headerClass()\">\n <div class=\"flex w-full gap-1\" role=\"tablist\" (keydown)=\"onTabKeydown($event)\">\n <button\n monaButton\n type=\"button\"\n role=\"tab\"\n class=\"flex-1\"\n [id]=\"dateTabId\"\n [attr.aria-controls]=\"panelId\"\n [attr.aria-selected]=\"activeView() === 'date'\"\n [disabled]=\"effectiveDisabled()\"\n [rounded]=\"rounded()\"\n [selected]=\"activeView() === 'date'\"\n [size]=\"size()\"\n [tabindex]=\"activeView() === 'date' ? 0 : -1\"\n (click)=\"selectTab('date')\">\n {{ messages().date }}\n </button>\n <button\n monaButton\n type=\"button\"\n role=\"tab\"\n class=\"flex-1\"\n [id]=\"timeTabId\"\n [attr.aria-controls]=\"panelId\"\n [attr.aria-selected]=\"activeView() === 'time'\"\n [disabled]=\"effectiveDisabled()\"\n [rounded]=\"rounded()\"\n [selected]=\"activeView() === 'time'\"\n [size]=\"size()\"\n [tabindex]=\"activeView() === 'time' ? 0 : -1\"\n (click)=\"selectTab('time')\">\n {{ messages().time }}\n </button>\n </div>\n </div>\n <div\n class=\"overflow-hidden\"\n role=\"tabpanel\"\n [id]=\"panelId\"\n [attr.aria-labelledby]=\"activeView() === 'date' ? dateTabId : timeTabId\">\n @if (activeView() === \"date\") {\n <div class=\"flex h-full items-center justify-center\">\n <mona-calendar\n [focusOnMount]=\"focusViewOnMount()\"\n [disabledDates]=\"disabledDates()\"\n [minDate]=\"min()\"\n [maxDate]=\"max()\"\n [firstDay]=\"firstDay()\"\n [weekNumber]=\"weekNumber()\"\n [value]=\"navigatedDate()\"\n [disabled]=\"effectiveDisabled()\"\n [readonly]=\"readonly()\"\n [rounded]=\"rounded()\"\n (valueChange)=\"onCalendarValueChange($event)\"\n class=\"flex-1 border-none shadow-none\">\n @if (decadeCellTemplate()) {\n <ng-template monaCalendarDecadeCellTemplate let-year>\n <ng-container\n [ngTemplateOutlet]=\"decadeCellTemplate()?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: year }\"></ng-container>\n </ng-template>\n }\n @if (monthCellTemplate()) {\n <ng-template monaCalendarMonthCellTemplate let-day let-date=\"date\">\n <ng-container\n [ngTemplateOutlet]=\"monthCellTemplate()?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: day, date }\"></ng-container>\n </ng-template>\n }\n @if (yearCellTemplate()) {\n <ng-template monaCalendarYearCellTemplate let-year let-text=\"text\">\n <ng-container\n [ngTemplateOutlet]=\"yearCellTemplate()?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: year, text }\"></ng-container>\n </ng-template>\n }\n </mona-calendar>\n </div>\n }\n @if (activeView() === \"time\") {\n <div class=\"flex h-full max-h-64 items-center justify-center\">\n <mona-time-selector\n [focusOnMount]=\"focusViewOnMount()\"\n [value]=\"navigatedDate()\"\n (valueChange)=\"onTimeSelectorValueChange($event)\"\n [disabled]=\"effectiveDisabled()\"\n [readonly]=\"readonly()\"\n [max]=\"timePickerMax()\"\n [min]=\"timePickerMin()\"\n [footer]=\"false\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [hourStep]=\"hourStep()\"\n [minuteStep]=\"minuteStep()\"\n [secondStep]=\"secondStep()\"\n [hourFormat]=\"effectiveHourFormat()\"\n [showSeconds]=\"showSeconds()\"></mona-time-selector>\n </div>\n }\n </div>\n <div [class]=\"footerClass()\">\n <button\n monaButton\n look=\"primary\"\n [disabled]=\"effectiveDisabled()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n (click)=\"onSetDateClick()\">\n {{ messages().set }}\n </button>\n <button\n monaButton\n look=\"default\"\n [disabled]=\"effectiveDisabled()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n (click)=\"onCancelClick()\">\n {{ messages().cancel }}\n </button>\n </div>\n </div>\n</ng-template>\n"
999
+ template: "<mona-text-box\n (inputBlur)=\"onInputBlur()\"\n (valueChange)=\"typedInput.edit($event)\"\n [aria-describedby]=\"describedBy() ?? ''\"\n [aria-label]=\"ariaLabel()\"\n [aria-labelledby]=\"labelledBy() ?? ''\"\n [clearButton]=\"showClearButton()\"\n [disabled]=\"effectiveDisabled()\"\n [inputAttributes]=\"inputAttributes()\"\n [inputId]=\"inputId()\"\n [invalid]=\"invalidState()\"\n [placeholder]=\"placeholder()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [touched]=\"invalidState() || touched()\"\n [value]=\"typedInput.text()\">\n @if (prefixTemplate()) {\n <ng-template monaTextBoxPrefixTemplate>\n <ng-container [ngTemplateOutlet]=\"prefixTemplate()\"></ng-container>\n </ng-template>\n }\n <ng-template monaTextBoxSuffixTemplate>\n <button\n monaButton\n look=\"ghost\"\n [iconOnly]=\"true\"\n [size]=\"size()\"\n [rounded]=\"'none'\"\n class=\"aspect-square h-full w-auto\"\n [attr.aria-label]=\"messages().openDateTimePicker\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-controls]=\"popupId\"\n (click)=\"onDateInputButtonClick()\"\n [disabled]=\"effectiveDisabled() || readonly()\"\n [tabindex]=\"-1\">\n <svg lucideCalendar [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n </ng-template>\n</mona-text-box>\n\n<ng-template #datePopupTemplate>\n <div\n [class]=\"pickerPopupClass()\"\n [id]=\"popupId\"\n aria-modal=\"true\"\n role=\"dialog\"\n [attr.aria-label]=\"messages().dateTimePicker\"\n cdkTrapFocus>\n <div [class]=\"headerClass()\">\n <div class=\"flex w-full gap-1\" role=\"tablist\" (keydown)=\"onTabKeydown($event)\">\n <button\n monaButton\n type=\"button\"\n role=\"tab\"\n class=\"flex-1\"\n [id]=\"dateTabId\"\n [attr.aria-controls]=\"panelId\"\n [attr.aria-selected]=\"activeView() === 'date'\"\n [disabled]=\"effectiveDisabled()\"\n [rounded]=\"rounded()\"\n [selected]=\"activeView() === 'date'\"\n [size]=\"size()\"\n [tabindex]=\"activeView() === 'date' ? 0 : -1\"\n (click)=\"selectTab('date')\">\n {{ messages().date }}\n </button>\n <button\n monaButton\n type=\"button\"\n role=\"tab\"\n class=\"flex-1\"\n [id]=\"timeTabId\"\n [attr.aria-controls]=\"panelId\"\n [attr.aria-selected]=\"activeView() === 'time'\"\n [disabled]=\"effectiveDisabled()\"\n [rounded]=\"rounded()\"\n [selected]=\"activeView() === 'time'\"\n [size]=\"size()\"\n [tabindex]=\"activeView() === 'time' ? 0 : -1\"\n (click)=\"selectTab('time')\">\n {{ messages().time }}\n </button>\n </div>\n </div>\n <div\n class=\"overflow-hidden\"\n role=\"tabpanel\"\n [id]=\"panelId\"\n [style.height.px]=\"panelHeight()\"\n [attr.aria-labelledby]=\"activeView() === 'date' ? dateTabId : timeTabId\">\n @if (activeView() === \"date\") {\n <div class=\"flex h-full items-center justify-center\">\n <mona-calendar\n [focusOnMount]=\"focusViewOnMount()\"\n [disabledDates]=\"disabledDates()\"\n [minDate]=\"min()\"\n [maxDate]=\"max()\"\n [firstDay]=\"firstDay()\"\n [weekNumber]=\"weekNumber()\"\n [value]=\"navigatedDate()\"\n [disabled]=\"effectiveDisabled()\"\n [readonly]=\"readonly()\"\n [rounded]=\"rounded()\"\n (valueChange)=\"onCalendarValueChange($event)\"\n class=\"flex-1 border-none shadow-none\">\n @if (decadeCellTemplate()) {\n <ng-template monaCalendarDecadeCellTemplate let-year>\n <ng-container\n [ngTemplateOutlet]=\"decadeCellTemplate()?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: year }\"></ng-container>\n </ng-template>\n }\n @if (monthCellTemplate()) {\n <ng-template monaCalendarMonthCellTemplate let-day let-date=\"date\">\n <ng-container\n [ngTemplateOutlet]=\"monthCellTemplate()?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: day, date }\"></ng-container>\n </ng-template>\n }\n @if (yearCellTemplate()) {\n <ng-template monaCalendarYearCellTemplate let-year let-text=\"text\">\n <ng-container\n [ngTemplateOutlet]=\"yearCellTemplate()?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: year, text }\"></ng-container>\n </ng-template>\n }\n </mona-calendar>\n </div>\n }\n @if (activeView() === \"time\") {\n <div class=\"flex h-full items-center justify-center\" [class.max-h-64]=\"!sheet()\">\n <mona-time-selector\n [focusOnMount]=\"focusViewOnMount()\"\n [value]=\"navigatedDate()\"\n (valueChange)=\"onTimeSelectorValueChange($event)\"\n [disabled]=\"effectiveDisabled()\"\n [readonly]=\"readonly()\"\n [max]=\"timePickerMax()\"\n [min]=\"timePickerMin()\"\n [footer]=\"false\"\n [size]=\"timeSelectorSize()\"\n [rounded]=\"rounded()\"\n [hourStep]=\"hourStep()\"\n [minuteStep]=\"minuteStep()\"\n [secondStep]=\"secondStep()\"\n [hourFormat]=\"effectiveHourFormat()\"\n [showSeconds]=\"showSeconds()\"></mona-time-selector>\n </div>\n }\n </div>\n <div [class]=\"footerClass()\">\n <button\n monaButton\n look=\"primary\"\n [disabled]=\"effectiveDisabled()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n (click)=\"onSetDateClick()\">\n {{ messages().set }}\n </button>\n <button\n monaButton\n look=\"default\"\n [disabled]=\"effectiveDisabled()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n (click)=\"onCancelClick()\">\n {{ messages().cancel }}\n </button>\n </div>\n </div>\n</ng-template>\n"
969
1000
  }]
970
1001
  }],
971
1002
  ctorParameters: () => [],
@@ -993,6 +1024,22 @@ i0.ɵɵngDeclareClassMetadata({
993
1024
  type: i0.ContentChild,
994
1025
  args: [i0.forwardRef(() => CalendarYearCellTemplateDirective), { isSignal: true }]
995
1026
  }],
1027
+ adaptiveMode: [{
1028
+ type: i0.Input,
1029
+ args: [{
1030
+ isSignal: true,
1031
+ alias: "adaptiveMode",
1032
+ required: false
1033
+ }]
1034
+ }],
1035
+ adaptiveTitle: [{
1036
+ type: i0.Input,
1037
+ args: [{
1038
+ isSignal: true,
1039
+ alias: "adaptiveTitle",
1040
+ required: false
1041
+ }]
1042
+ }],
996
1043
  ariaDescribedBy: [{
997
1044
  type: i0.Input,
998
1045
  args: [{
@@ -1,5 +1,5 @@
1
1
  import * as i0 from "@angular/core";
2
- import { Component, DOCUMENT, DestroyRef, Directive, ElementRef, Injectable, InjectionToken, afterNextRender, computed, effect, inject, input, output, signal, untracked } from "@angular/core";
2
+ import { Component, DOCUMENT, DestroyRef, Directive, ElementRef, Injectable, InjectionToken, afterNextRender, computed, effect, inject, input, output, signal, untracked, viewChild } from "@angular/core";
3
3
  import { NgTemplateOutlet } from "@angular/common";
4
4
  import { LucideX } from "@lucide/angular";
5
5
  import { ButtonDirective } from "@nanahoshi/mona-ui/button";
@@ -39,9 +39,16 @@ const dropdownSheetSurfaceClasses = `
39
39
  h-full max-h-none flex-1 rounded-none border-0 shadow-none text-base
40
40
  [&_[role=option]]:min-h-11 [&_mona-tree-node>div]:py-2.5
41
41
  `;
42
+ const dropdownSheetPickerClasses = `
43
+ h-full max-h-none min-h-0 w-full max-w-none flex-1 rounded-none border-0 shadow-none
44
+ [--mona-calendar-cell-size:min(2.75rem,calc((100dvw_-_3rem)/8))]
45
+ [&_mona-calendar]:w-full [&_mona-calendar]:shrink-0
46
+ [&_mona-calendar]:min-h-[calc(4.5rem_+_7_*_var(--mona-calendar-cell-size))]
47
+ `;
42
48
  var DropdownSheetComponent = class DropdownSheetComponent {
43
49
  constructor() {
44
50
  this.#popupRef = inject(PopupRef);
51
+ this.content = viewChild.required("content", ...ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []);
45
52
  this.data = inject(PopupDataInjectionToken);
46
53
  this.messages = inject(MonaI18nService).componentMessages("dropdowns", DROPDOWNS_DEFAULT_MESSAGES);
47
54
  this.sheetClass = dropdownSheetThemeVariants();
@@ -51,7 +58,10 @@ var DropdownSheetComponent = class DropdownSheetComponent {
51
58
  this.#popupRef.close(new PopupCloseEvent({ via: PopupCloseSource.CloseButton }));
52
59
  }
53
60
  onPointerDown(event) {
54
- if (event.target?.tagName !== "INPUT") event.preventDefault();
61
+ const content = this.content().nativeElement;
62
+ const target = event.target;
63
+ if (target instanceof Node && target !== content && content.contains(target)) return;
64
+ event.preventDefault();
55
65
  }
56
66
  static {
57
67
  this.ɵfac = i0.ɵɵngDeclareFactory({
@@ -65,14 +75,21 @@ var DropdownSheetComponent = class DropdownSheetComponent {
65
75
  }
66
76
  static {
67
77
  this.ɵcmp = i0.ɵɵngDeclareComponent({
68
- minVersion: "14.0.0",
78
+ minVersion: "17.2.0",
69
79
  version: "22.2.6",
70
80
  type: DropdownSheetComponent,
71
81
  isStandalone: true,
72
82
  selector: "mona-dropdown-sheet",
73
- host: { classAttribute: "contents" },
83
+ host: { classAttribute: "contents max-h-[inherit]" },
84
+ viewQueries: [{
85
+ propertyName: "content",
86
+ first: true,
87
+ predicate: ["content"],
88
+ descendants: true,
89
+ isSignal: true
90
+ }],
74
91
  ngImport: i0,
75
- template: "<section [class]=\"sheetClass\" (pointerdown)=\"onPointerDown($event)\">\n <span aria-hidden=\"true\" class=\"mx-auto mt-2 h-1 w-10 shrink-0 rounded-full bg-border\"></span>\n <header class=\"flex shrink-0 items-center gap-3 ps-4 pe-2\">\n <span class=\"min-w-0 flex-1 truncate text-base font-semibold\">{{ data.title() }}</span>\n <button\n monaButton\n type=\"button\"\n look=\"ghost\"\n size=\"small\"\n tabindex=\"-1\"\n class=\"min-h-11 min-w-11 shrink-0\"\n [iconOnly]=\"true\"\n [attr.aria-label]=\"messages().close\"\n (click)=\"closeSheet()\">\n <svg lucideX [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n </header>\n <div class=\"flex min-h-0 flex-1 flex-col\">\n <ng-container [ngTemplateOutlet]=\"data.content\"></ng-container>\n </div>\n</section>\n",
92
+ template: "<section [class]=\"sheetClass\" (pointerdown)=\"onPointerDown($event)\">\n <span aria-hidden=\"true\" class=\"mx-auto mt-2 h-1 w-10 shrink-0 rounded-full bg-border\"></span>\n <header class=\"flex shrink-0 items-center gap-3 ps-4 pe-2\">\n <span class=\"min-w-0 flex-1 truncate text-base font-semibold\">{{ data.title() }}</span>\n <button\n monaButton\n type=\"button\"\n look=\"ghost\"\n size=\"small\"\n tabindex=\"-1\"\n class=\"min-h-11 min-w-11 shrink-0\"\n [iconOnly]=\"true\"\n [attr.aria-label]=\"messages().close\"\n (click)=\"closeSheet()\">\n <svg lucideX [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n </header>\n <div #content class=\"flex min-h-0 flex-1 flex-col\">\n <ng-container [ngTemplateOutlet]=\"data.content\"></ng-container>\n </div>\n</section>\n",
76
93
  dependencies: [
77
94
  {
78
95
  kind: "directive",
@@ -128,10 +145,14 @@ i0.ɵɵngDeclareClassMetadata({
128
145
  LucideX,
129
146
  NgTemplateOutlet
130
147
  ],
131
- host: { class: "contents" },
132
- template: "<section [class]=\"sheetClass\" (pointerdown)=\"onPointerDown($event)\">\n <span aria-hidden=\"true\" class=\"mx-auto mt-2 h-1 w-10 shrink-0 rounded-full bg-border\"></span>\n <header class=\"flex shrink-0 items-center gap-3 ps-4 pe-2\">\n <span class=\"min-w-0 flex-1 truncate text-base font-semibold\">{{ data.title() }}</span>\n <button\n monaButton\n type=\"button\"\n look=\"ghost\"\n size=\"small\"\n tabindex=\"-1\"\n class=\"min-h-11 min-w-11 shrink-0\"\n [iconOnly]=\"true\"\n [attr.aria-label]=\"messages().close\"\n (click)=\"closeSheet()\">\n <svg lucideX [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n </header>\n <div class=\"flex min-h-0 flex-1 flex-col\">\n <ng-container [ngTemplateOutlet]=\"data.content\"></ng-container>\n </div>\n</section>\n"
148
+ host: { class: "contents max-h-[inherit]" },
149
+ template: "<section [class]=\"sheetClass\" (pointerdown)=\"onPointerDown($event)\">\n <span aria-hidden=\"true\" class=\"mx-auto mt-2 h-1 w-10 shrink-0 rounded-full bg-border\"></span>\n <header class=\"flex shrink-0 items-center gap-3 ps-4 pe-2\">\n <span class=\"min-w-0 flex-1 truncate text-base font-semibold\">{{ data.title() }}</span>\n <button\n monaButton\n type=\"button\"\n look=\"ghost\"\n size=\"small\"\n tabindex=\"-1\"\n class=\"min-h-11 min-w-11 shrink-0\"\n [iconOnly]=\"true\"\n [attr.aria-label]=\"messages().close\"\n (click)=\"closeSheet()\">\n <svg lucideX [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n </header>\n <div #content class=\"flex min-h-0 flex-1 flex-col\">\n <ng-container [ngTemplateOutlet]=\"data.content\"></ng-container>\n </div>\n</section>\n"
133
150
  }]
134
- }]
151
+ }],
152
+ propDecorators: { content: [{
153
+ type: i0.ViewChild,
154
+ args: ["content", { isSignal: true }]
155
+ }] }
135
156
  });
136
157
  var DropdownTreePopupComponent = class DropdownTreePopupComponent {
137
158
  #announcer;
@@ -1210,6 +1231,14 @@ var DropdownPopupHandlerDirective = class DropdownPopupHandlerDirective {
1210
1231
  }
1211
1232
  return minWidth ?? this.#hostElementRef.nativeElement.getBoundingClientRect().width;
1212
1233
  }
1234
+ nameOf(element) {
1235
+ if (!element) return "";
1236
+ const textOf = (node) => node?.textContent?.replace(/\s+/g, " ").trim() ?? "";
1237
+ const join = (texts) => Array.from(texts).filter((text) => text.length > 0).join(" ");
1238
+ const labelledBy = join((element.getAttribute("aria-labelledby") ?? "").split(/\s+/).map((id) => id ? textOf(this.#document.getElementById(id)) : ""));
1239
+ const labels = element instanceof HTMLInputElement ? join(Array.from(element.labels ?? [], textOf)) : "";
1240
+ return labelledBy || element.getAttribute("aria-label")?.trim() || labels;
1241
+ }
1213
1242
  openPopup(settings) {
1214
1243
  let popupRef = this.#dropdownService.popupRef();
1215
1244
  if (popupRef || this.#host.disabled() || this.#host.readonly()) return;
@@ -1253,7 +1282,7 @@ var DropdownPopupHandlerDirective = class DropdownPopupHandlerDirective {
1253
1282
  const title = this.#host.adaptiveTitle?.().trim();
1254
1283
  if (title) return title;
1255
1284
  const host = this.#hostElementRef.nativeElement;
1256
- return (host.getAttribute("aria-labelledby") ?? "").split(/\s+/).filter((id) => id.length > 0).map((id) => this.#document.getElementById(id)?.textContent?.replace(/\s+/g, " ").trim() ?? "").filter((text) => text.length > 0).join(" ") || host.getAttribute("aria-label")?.trim() || "";
1285
+ return this.nameOf(host) || this.nameOf(host.querySelector("input"));
1257
1286
  }
1258
1287
  togglePopup(settings) {
1259
1288
  if (this.#dropdownService.popupRef()) {
@@ -1716,6 +1745,6 @@ function readDropdownField(item, field) {
1716
1745
  if (typeof field === "string") return item?.[field];
1717
1746
  return field(item);
1718
1747
  }
1719
- export { DROPDOWNS_DEFAULT_MESSAGES, DROPDOWN_DATA_INPUT_TOKEN, DROPDOWN_POPUP_INPUT_TOKEN, DropdownDataHandlerDirective, DropdownDataInputToken, DropdownFilterableDirective, DropdownFooterTemplateDirective, DropdownGroupHeaderTemplateDirective, DropdownGroupableDirective, DropdownHeaderTemplateDirective, DropdownItemTemplateDirective, DropdownListPopupHandlerDirective, DropdownListService, DropdownLiveRegionDirective, DropdownNoDataTemplateDirective, DropdownPopupHandlerDirective, DropdownPrefixTemplateDirective, DropdownService, DropdownSheetComponent, DropdownSuffixTemplateDirective, DropdownTreePopupComponent, DropdownTreePopupHandlerDirective, DropdownVirtualScrollDirective, dropdownPopupThemeVariants, dropdownSheetSurfaceClasses, dropdownSheetThemeVariants, readDropdownField };
1748
+ export { DROPDOWNS_DEFAULT_MESSAGES, DROPDOWN_DATA_INPUT_TOKEN, DROPDOWN_POPUP_INPUT_TOKEN, DropdownDataHandlerDirective, DropdownDataInputToken, DropdownFilterableDirective, DropdownFooterTemplateDirective, DropdownGroupHeaderTemplateDirective, DropdownGroupableDirective, DropdownHeaderTemplateDirective, DropdownItemTemplateDirective, DropdownListPopupHandlerDirective, DropdownListService, DropdownLiveRegionDirective, DropdownNoDataTemplateDirective, DropdownPopupHandlerDirective, DropdownPrefixTemplateDirective, DropdownService, DropdownSheetComponent, DropdownSuffixTemplateDirective, DropdownTreePopupComponent, DropdownTreePopupHandlerDirective, DropdownVirtualScrollDirective, dropdownPopupThemeVariants, dropdownSheetPickerClasses, dropdownSheetSurfaceClasses, dropdownSheetThemeVariants, readDropdownField };
1720
1749
 
1721
1750
  //# sourceMappingURL=nanahoshi-mona-ui-dropdowns.mjs.map
@@ -921,6 +921,8 @@ var FilterMenuComponent = class FilterMenuComponent {
921
921
  type: DatePickerComponent,
922
922
  selector: "mona-date-picker",
923
923
  inputs: [
924
+ "adaptiveMode",
925
+ "adaptiveTitle",
924
926
  "aria-describedby",
925
927
  "aria-label",
926
928
  "aria-labelledby",
@@ -1,5 +1,5 @@
1
1
  import { G as GridService, I as gridRowDragPreviewThemeVariants, P as gridListTableThemeVariants, W as GridLockedCellDirective, j as gridListBaseThemeVariants } from "./nanahoshi-mona-ui-grid-grid.styles-aPD3c2A6.mjs";
2
- import { i as GridCellDirective, n as GridGroupRowComponent, r as GridAddRowComponent, t as GridRowComponent } from "./nanahoshi-mona-ui-grid-grid-row.component-BUJvgihp.mjs";
2
+ import { i as GridCellDirective, n as GridGroupRowComponent, r as GridAddRowComponent, t as GridRowComponent } from "./nanahoshi-mona-ui-grid-grid-row.component-Df2gfS0X.mjs";
3
3
  import { t as GridColgroupComponent } from "./nanahoshi-mona-ui-grid-grid-colgroup.component-Lv3GunpV.mjs";
4
4
  import { GridFooterRowComponent } from "./nanahoshi-mona-ui-grid-grid-footer-row.component-BYH9XbCV.mjs";
5
5
  import * as i0 from "@angular/core";
@@ -471,4 +471,4 @@ i0.ɵɵngDeclareClassMetadata({
471
471
  });
472
472
  export { GridListComponent };
473
473
 
474
- //# sourceMappingURL=nanahoshi-mona-ui-grid-grid-list.component-S2iCn8TV.mjs.map
474
+ //# sourceMappingURL=nanahoshi-mona-ui-grid-grid-list.component-BoSXXLKQ.mjs.map
@@ -692,6 +692,8 @@ var GridEditorComponent = class GridEditorComponent {
692
692
  type: DatePickerComponent,
693
693
  selector: "mona-date-picker",
694
694
  inputs: [
695
+ "adaptiveMode",
696
+ "adaptiveTitle",
695
697
  "aria-describedby",
696
698
  "aria-label",
697
699
  "aria-labelledby",
@@ -2127,4 +2129,4 @@ i0.ɵɵngDeclareClassMetadata({
2127
2129
  });
2128
2130
  export { GridCellDirective as i, GridGroupRowComponent as n, GridAddRowComponent as r, GridRowComponent as t };
2129
2131
 
2130
- //# sourceMappingURL=nanahoshi-mona-ui-grid-grid-row.component-BUJvgihp.mjs.map
2132
+ //# sourceMappingURL=nanahoshi-mona-ui-grid-grid-row.component-Df2gfS0X.mjs.map
@@ -1,5 +1,5 @@
1
1
  import { G as GridService, P as gridListTableThemeVariants, Z as GridNavigationService, _ as gridFooterThemeVariants, g as gridFooterTableThemeVariants, j as gridListBaseThemeVariants } from "./nanahoshi-mona-ui-grid-grid.styles-aPD3c2A6.mjs";
2
- import { n as GridGroupRowComponent, r as GridAddRowComponent, t as GridRowComponent } from "./nanahoshi-mona-ui-grid-grid-row.component-BUJvgihp.mjs";
2
+ import { n as GridGroupRowComponent, r as GridAddRowComponent, t as GridRowComponent } from "./nanahoshi-mona-ui-grid-grid-row.component-Df2gfS0X.mjs";
3
3
  import { t as GridColgroupComponent } from "./nanahoshi-mona-ui-grid-grid-colgroup.component-Lv3GunpV.mjs";
4
4
  import { GridFooterRowComponent } from "./nanahoshi-mona-ui-grid-grid-footer-row.component-BYH9XbCV.mjs";
5
5
  import * as i0 from "@angular/core";
@@ -327,4 +327,4 @@ i0.ɵɵngDeclareClassMetadata({
327
327
  });
328
328
  export { GridVirtualListComponent };
329
329
 
330
- //# sourceMappingURL=nanahoshi-mona-ui-grid-grid-virtual-list.component-Wndy-_Bt.mjs.map
330
+ //# sourceMappingURL=nanahoshi-mona-ui-grid-grid-virtual-list.component-xjrcCXXF.mjs.map
@@ -4027,6 +4027,8 @@ var GridFilterRowCellComponent = class GridFilterRowCellComponent {
4027
4027
  type: DatePickerComponent,
4028
4028
  selector: "mona-date-picker",
4029
4029
  inputs: [
4030
+ "adaptiveMode",
4031
+ "adaptiveTitle",
4030
4032
  "aria-describedby",
4031
4033
  "aria-label",
4032
4034
  "aria-labelledby",
@@ -5565,8 +5567,8 @@ var GridComponent = class GridComponent {
5565
5567
  NgTemplateOutlet,
5566
5568
  GridColgroupComponent,
5567
5569
  import("./nanahoshi-mona-ui-grid-grid-footer-row.component-BYH9XbCV.mjs").then((m) => m.GridFooterRowComponent),
5568
- import("./nanahoshi-mona-ui-grid-grid-list.component-S2iCn8TV.mjs").then((m) => m.GridListComponent),
5569
- import("./nanahoshi-mona-ui-grid-grid-virtual-list.component-Wndy-_Bt.mjs").then((m) => m.GridVirtualListComponent),
5570
+ import("./nanahoshi-mona-ui-grid-grid-list.component-BoSXXLKQ.mjs").then((m) => m.GridListComponent),
5571
+ import("./nanahoshi-mona-ui-grid-grid-virtual-list.component-xjrcCXXF.mjs").then((m) => m.GridVirtualListComponent),
5570
5572
  import("@nanahoshi/mona-ui/spinner").then((m) => m.SpinnerComponent)
5571
5573
  ]]
5572
5574
  });
@@ -5579,8 +5581,8 @@ i0.ɵɵngDeclareClassMetadataAsync({
5579
5581
  type: GridComponent,
5580
5582
  resolveDeferredDeps: () => [
5581
5583
  import("./nanahoshi-mona-ui-grid-grid-footer-row.component-BYH9XbCV.mjs").then((m) => m.GridFooterRowComponent),
5582
- import("./nanahoshi-mona-ui-grid-grid-list.component-S2iCn8TV.mjs").then((m) => m.GridListComponent),
5583
- import("./nanahoshi-mona-ui-grid-grid-virtual-list.component-Wndy-_Bt.mjs").then((m) => m.GridVirtualListComponent),
5584
+ import("./nanahoshi-mona-ui-grid-grid-list.component-BoSXXLKQ.mjs").then((m) => m.GridListComponent),
5585
+ import("./nanahoshi-mona-ui-grid-grid-virtual-list.component-xjrcCXXF.mjs").then((m) => m.GridVirtualListComponent),
5584
5586
  import("@nanahoshi/mona-ui/spinner").then((m) => m.SpinnerComponent)
5585
5587
  ],
5586
5588
  resolveMetadata: (GridFooterRowComponent, GridListComponent, GridVirtualListComponent, SpinnerComponent) => ({
@@ -6,7 +6,7 @@ import { LucideClock } from "@lucide/angular";
6
6
  import { ButtonDirective } from "@nanahoshi/mona-ui/button";
7
7
  import { createTypedDateInput, getLocaleHourFormat } from "@nanahoshi/mona-ui/date-input";
8
8
  import * as i1 from "@nanahoshi/mona-ui/dropdowns";
9
- import { DROPDOWN_POPUP_INPUT_TOKEN, DropdownPopupHandlerDirective, DropdownService, dropdownPopupThemeVariants } from "@nanahoshi/mona-ui/dropdowns";
9
+ import { DROPDOWN_POPUP_INPUT_TOKEN, DropdownPopupHandlerDirective, DropdownService, dropdownPopupThemeVariants, dropdownSheetPickerClasses } from "@nanahoshi/mona-ui/dropdowns";
10
10
  import { MonaI18nService, getLocaleTimeInputFormat } from "@nanahoshi/mona-ui/i18n";
11
11
  import { FIELD_ASSOCIATION_BOUNDARY, createElementControlId, injectEffectiveDisabled, injectLabelAssociation, themeControlSurfaceClasses } from "@nanahoshi/mona-ui/internal";
12
12
  import { TextBoxComponent, TextBoxSuffixTemplateDirective } from "@nanahoshi/mona-ui/text-box";
@@ -128,10 +128,15 @@ var TimePickerComponent = class TimePickerComponent {
128
128
  rounded,
129
129
  size
130
130
  });
131
- return twMerge(variantClass, userClass);
131
+ const sheetClass = this.sheet() ? `${dropdownSheetPickerClasses} [&_mona-time-selector]:h-72` : "";
132
+ return twMerge(variantClass, sheetClass, userClass);
132
133
  }, ...ngDevMode ? [{ debugName: "pickerPopupClass" }] : /* istanbul ignore next */ []);
133
134
  this.popupId = createElementControlId();
135
+ this.sheet = this.#dropdownService.sheet.asReadonly();
134
136
  this.timePopupTemplateRef = viewChild.required("timePopupTemplate", ...ngDevMode ? [{ debugName: "timePopupTemplateRef" }] : /* istanbul ignore next */ []);
137
+ this.timeSelectorSize = computed(() => this.sheet() ? "large" : this.size(), ...ngDevMode ? [{ debugName: "timeSelectorSize" }] : /* istanbul ignore next */ []);
138
+ this.adaptiveMode = input("none", ...ngDevMode ? [{ debugName: "adaptiveMode" }] : /* istanbul ignore next */ []);
139
+ this.adaptiveTitle = input("", ...ngDevMode ? [{ debugName: "adaptiveTitle" }] : /* istanbul ignore next */ []);
135
140
  this.ariaDescribedBy = input("", {
136
141
  ...ngDevMode ? { debugName: "ariaDescribedBy" } : /* istanbul ignore next */ {},
137
142
  alias: "aria-describedby"
@@ -309,6 +314,20 @@ var TimePickerComponent = class TimePickerComponent {
309
314
  isStandalone: true,
310
315
  selector: "mona-time-picker",
311
316
  inputs: {
317
+ adaptiveMode: {
318
+ classPropertyName: "adaptiveMode",
319
+ publicName: "adaptiveMode",
320
+ isSignal: true,
321
+ isRequired: false,
322
+ transformFunction: null
323
+ },
324
+ adaptiveTitle: {
325
+ classPropertyName: "adaptiveTitle",
326
+ publicName: "adaptiveTitle",
327
+ isSignal: true,
328
+ isRequired: false,
329
+ transformFunction: null
330
+ },
312
331
  ariaDescribedBy: {
313
332
  classPropertyName: "ariaDescribedBy",
314
333
  publicName: "aria-describedby",
@@ -540,7 +559,7 @@ var TimePickerComponent = class TimePickerComponent {
540
559
  }],
541
560
  hostDirectives: [{ directive: i1.DropdownPopupHandlerDirective }],
542
561
  ngImport: i0,
543
- template: "<mona-text-box\n [aria-describedby]=\"describedBy() ?? ''\"\n [aria-label]=\"ariaLabel()\"\n [aria-labelledby]=\"labelledBy() ?? ''\"\n [disabled]=\"effectiveDisabled()\"\n [inputId]=\"inputId()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [value]=\"typedInput.text()\"\n [inputAttributes]=\"inputAttributes()\"\n [invalid]=\"invalidState()\"\n [placeholder]=\"placeholder()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [touched]=\"invalidState() || touched()\"\n [clearButton]=\"showClearButton()\"\n (valueChange)=\"typedInput.edit($event)\"\n (inputBlur)=\"onInputBlur()\">\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]=\"effectiveDisabled() || readonly()\"\n [tabindex]=\"-1\">\n <svg lucideClock [size]=\"16\" aria-hidden=\"true\"></svg>\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 focusOnMount\n [value]=\"value()\"\n (valueChange)=\"onTimeSelectorValueChange($event)\"\n [max]=\"max()\"\n [min]=\"min()\"\n [disabled]=\"effectiveDisabled()\"\n [readonly]=\"readonly()\"\n [hourFormat]=\"effectiveHourFormat()\"\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",
562
+ template: "<mona-text-box\n [aria-describedby]=\"describedBy() ?? ''\"\n [aria-label]=\"ariaLabel()\"\n [aria-labelledby]=\"labelledBy() ?? ''\"\n [disabled]=\"effectiveDisabled()\"\n [inputId]=\"inputId()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [value]=\"typedInput.text()\"\n [inputAttributes]=\"inputAttributes()\"\n [invalid]=\"invalidState()\"\n [placeholder]=\"placeholder()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [touched]=\"invalidState() || touched()\"\n [clearButton]=\"showClearButton()\"\n (valueChange)=\"typedInput.edit($event)\"\n (inputBlur)=\"onInputBlur()\">\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]=\"effectiveDisabled() || readonly()\"\n [tabindex]=\"-1\">\n <svg lucideClock [size]=\"16\" aria-hidden=\"true\"></svg>\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 focusOnMount\n [value]=\"value()\"\n (valueChange)=\"onTimeSelectorValueChange($event)\"\n [max]=\"max()\"\n [min]=\"min()\"\n [disabled]=\"effectiveDisabled()\"\n [readonly]=\"readonly()\"\n [hourFormat]=\"effectiveHourFormat()\"\n [hourStep]=\"hourStep()\"\n [minuteStep]=\"minuteStep()\"\n [secondStep]=\"secondStep()\"\n [size]=\"timeSelectorSize()\"\n [rounded]=\"rounded()\"\n [showSeconds]=\"showSeconds()\"></mona-time-selector>\n </div>\n</ng-template>\n",
544
563
  dependencies: [
545
564
  {
546
565
  kind: "component",
@@ -685,7 +704,7 @@ i0.ɵɵngDeclareClassMetadata({
685
704
  "(focusout)": "onFocusOut($event)",
686
705
  "(keydown)": "onKeydown($event)"
687
706
  },
688
- template: "<mona-text-box\n [aria-describedby]=\"describedBy() ?? ''\"\n [aria-label]=\"ariaLabel()\"\n [aria-labelledby]=\"labelledBy() ?? ''\"\n [disabled]=\"effectiveDisabled()\"\n [inputId]=\"inputId()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [value]=\"typedInput.text()\"\n [inputAttributes]=\"inputAttributes()\"\n [invalid]=\"invalidState()\"\n [placeholder]=\"placeholder()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [touched]=\"invalidState() || touched()\"\n [clearButton]=\"showClearButton()\"\n (valueChange)=\"typedInput.edit($event)\"\n (inputBlur)=\"onInputBlur()\">\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]=\"effectiveDisabled() || readonly()\"\n [tabindex]=\"-1\">\n <svg lucideClock [size]=\"16\" aria-hidden=\"true\"></svg>\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 focusOnMount\n [value]=\"value()\"\n (valueChange)=\"onTimeSelectorValueChange($event)\"\n [max]=\"max()\"\n [min]=\"min()\"\n [disabled]=\"effectiveDisabled()\"\n [readonly]=\"readonly()\"\n [hourFormat]=\"effectiveHourFormat()\"\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"
707
+ template: "<mona-text-box\n [aria-describedby]=\"describedBy() ?? ''\"\n [aria-label]=\"ariaLabel()\"\n [aria-labelledby]=\"labelledBy() ?? ''\"\n [disabled]=\"effectiveDisabled()\"\n [inputId]=\"inputId()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [value]=\"typedInput.text()\"\n [inputAttributes]=\"inputAttributes()\"\n [invalid]=\"invalidState()\"\n [placeholder]=\"placeholder()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [touched]=\"invalidState() || touched()\"\n [clearButton]=\"showClearButton()\"\n (valueChange)=\"typedInput.edit($event)\"\n (inputBlur)=\"onInputBlur()\">\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]=\"effectiveDisabled() || readonly()\"\n [tabindex]=\"-1\">\n <svg lucideClock [size]=\"16\" aria-hidden=\"true\"></svg>\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 focusOnMount\n [value]=\"value()\"\n (valueChange)=\"onTimeSelectorValueChange($event)\"\n [max]=\"max()\"\n [min]=\"min()\"\n [disabled]=\"effectiveDisabled()\"\n [readonly]=\"readonly()\"\n [hourFormat]=\"effectiveHourFormat()\"\n [hourStep]=\"hourStep()\"\n [minuteStep]=\"minuteStep()\"\n [secondStep]=\"secondStep()\"\n [size]=\"timeSelectorSize()\"\n [rounded]=\"rounded()\"\n [showSeconds]=\"showSeconds()\"></mona-time-selector>\n </div>\n</ng-template>\n"
689
708
  }]
690
709
  }],
691
710
  ctorParameters: () => [],
@@ -694,6 +713,22 @@ i0.ɵɵngDeclareClassMetadata({
694
713
  type: i0.ViewChild,
695
714
  args: ["timePopupTemplate", { isSignal: true }]
696
715
  }],
716
+ adaptiveMode: [{
717
+ type: i0.Input,
718
+ args: [{
719
+ isSignal: true,
720
+ alias: "adaptiveMode",
721
+ required: false
722
+ }]
723
+ }],
724
+ adaptiveTitle: [{
725
+ type: i0.Input,
726
+ args: [{
727
+ isSignal: true,
728
+ alias: "adaptiveTitle",
729
+ required: false
730
+ }]
731
+ }],
697
732
  ariaDescribedBy: [{
698
733
  type: i0.Input,
699
734
  args: [{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nanahoshi/mona-ui",
3
- "version": "0.38.0",
3
+ "version": "0.39.0",
4
4
  "description": "A very light Angular UI framework",
5
5
  "author": "Nanahoshi",
6
6
  "repository": {
@@ -5,7 +5,7 @@ import { CalendarDecadeCellTemplateDirective, CalendarMonthCellTemplateDirective
5
5
  import { PreventableEvent } from "@nanahoshi/mona-ui/common";
6
6
  import { DateDisabledType, DatePopupVariantInput, TypedDateInput } from "@nanahoshi/mona-ui/date-input";
7
7
  import * as i1 from "@nanahoshi/mona-ui/dropdowns";
8
- import { DropdownPopupInput } from "@nanahoshi/mona-ui/dropdowns";
8
+ import { AdaptiveMode, DropdownPopupInput } from "@nanahoshi/mona-ui/dropdowns";
9
9
  import { AttributeConfig, VariantInputs } from "@nanahoshi/mona-ui/internal";
10
10
  import { ListSizeInputType } from "@nanahoshi/mona-ui/internal/list";
11
11
  import { PopupCloseEvent } from "@nanahoshi/mona-ui/popup";
@@ -37,9 +37,23 @@ export declare class DatePickerComponent implements FormValueControl<Date | null
37
37
  protected readonly popupId: string;
38
38
  protected readonly popupTemplate: import("@angular/core").Signal<TemplateRef<unknown>>;
39
39
  protected readonly prefixTemplate: import("@angular/core").Signal<TemplateRef<any> | undefined>;
40
+ /** Whether the popup is open as a bottom sheet, which the popup fills. */
41
+ protected readonly sheet: import("@angular/core").Signal<boolean>;
40
42
  /** Set in the constructor, which runs after the `value` model it writes to exists. */
41
43
  protected readonly typedInput: TypedDateInput;
42
44
  protected readonly yearCellTemplate: import("@angular/core").Signal<CalendarYearCellTemplateDirective | undefined>;
45
+ /**
46
+ * @description Opens the popup as a sheet along the bottom of the screen on a small screen (narrower than 640
47
+ * pixels) with `"auto"`, so it's easy to reach with a thumb. With `"none"`, it always opens under the field.
48
+ * @default "none"
49
+ */
50
+ readonly adaptiveMode: import("@angular/core").InputSignal<AdaptiveMode>;
51
+ /**
52
+ * @description Title of the bottom sheet the popup opens as with `adaptiveMode="auto"`. When empty, the sheet
53
+ * shows the field's name.
54
+ * @default ""
55
+ */
56
+ readonly adaptiveTitle: import("@angular/core").InputSignal<string>;
43
57
  /**
44
58
  * @description Id of an element that describes the input, such as a hint or an error message.
45
59
  * @default ""
@@ -204,6 +218,16 @@ export declare class DatePickerComponent implements FormValueControl<Date | null
204
218
  private setPopupCloseSubscription;
205
219
  static ɵfac: i0.ɵɵFactoryDeclaration<DatePickerComponent, never>;
206
220
  static ɵcmp: i0.ɵɵComponentDeclaration<DatePickerComponent, "mona-date-picker", never, {
221
+ "adaptiveMode": {
222
+ "alias": "adaptiveMode";
223
+ "required": false;
224
+ "isSignal": true;
225
+ };
226
+ "adaptiveTitle": {
227
+ "alias": "adaptiveTitle";
228
+ "required": false;
229
+ "isSignal": true;
230
+ };
207
231
  "ariaDescribedBy": {
208
232
  "alias": "aria-describedby";
209
233
  "required": false;