@nanahoshi/mona-ui 0.41.0 → 0.43.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 (154) hide show
  1. package/README.md +2 -0
  2. package/docs/api/alert.json +1 -0
  3. package/docs/api/auto-complete.json +1 -0
  4. package/docs/api/auto-complete.md +2 -0
  5. package/docs/api/avatar.json +1 -0
  6. package/docs/api/badge.json +1 -0
  7. package/docs/api/breadcrumb.json +1 -0
  8. package/docs/api/button-group.json +1 -0
  9. package/docs/api/button.json +1 -0
  10. package/docs/api/calendar.json +1 -0
  11. package/docs/api/card.json +1 -0
  12. package/docs/api/chart.json +1 -0
  13. package/docs/api/check-box.json +1 -0
  14. package/docs/api/chip.json +1 -0
  15. package/docs/api/circular-progress-bar.json +1 -0
  16. package/docs/api/collapsible.json +1 -0
  17. package/docs/api/color-gradient.json +1 -0
  18. package/docs/api/color-palette.json +1 -0
  19. package/docs/api/color-picker.json +1 -0
  20. package/docs/api/combo-box.json +1 -0
  21. package/docs/api/combo-box.md +2 -0
  22. package/docs/api/command.json +1 -0
  23. package/docs/api/common.json +1 -0
  24. package/docs/api/contextmenu.json +1 -0
  25. package/docs/api/date-input.json +1 -0
  26. package/docs/api/date-picker.json +1 -0
  27. package/docs/api/date-range-picker.json +1 -0
  28. package/docs/api/datetime-picker.json +1 -0
  29. package/docs/api/dialog.json +1 -0
  30. package/docs/api/dropdown-button.json +1 -0
  31. package/docs/api/dropdown-list.json +1 -0
  32. package/docs/api/dropdown-tree.json +1 -0
  33. package/docs/api/dropdowns.json +1 -0
  34. package/docs/api/dropdowns.md +3 -1
  35. package/docs/api/editor.json +1 -0
  36. package/docs/api/expansion-panel.json +1 -0
  37. package/docs/api/fieldset.json +1 -0
  38. package/docs/api/file-upload.json +1 -0
  39. package/docs/api/filter.json +1 -0
  40. package/docs/api/form-field.json +1 -0
  41. package/docs/api/grid.json +1 -0
  42. package/docs/api/i18n.json +1 -0
  43. package/docs/api/i18n.md +20 -0
  44. package/docs/api/index.json +1 -0
  45. package/docs/api/kanban.json +1 -0
  46. package/docs/api/label.json +1 -0
  47. package/docs/api/list-box.json +1 -0
  48. package/docs/api/list-view.json +1 -0
  49. package/docs/api/list.json +1 -0
  50. package/docs/api/locales.json +1 -0
  51. package/docs/api/locales.md +14 -14
  52. package/docs/api/masked-text-box.json +1 -0
  53. package/docs/api/menubar.json +1 -0
  54. package/docs/api/multi-select-tree.json +1 -0
  55. package/docs/api/multi-select.json +1 -0
  56. package/docs/api/notification.json +1 -0
  57. package/docs/api/numeric-text-box.json +1 -0
  58. package/docs/api/otp-input.json +1 -0
  59. package/docs/api/pager.json +1 -0
  60. package/docs/api/placeholder.json +1 -0
  61. package/docs/api/popover.json +1 -0
  62. package/docs/api/popup-menu.json +1 -0
  63. package/docs/api/popup.json +1 -0
  64. package/docs/api/progress-bar.json +1 -0
  65. package/docs/api/qr-code.json +1 -0
  66. package/docs/api/query.json +1 -0
  67. package/docs/api/radio-button.json +1 -0
  68. package/docs/api/rating.json +1 -0
  69. package/docs/api/scroll-view.json +1 -0
  70. package/docs/api/segmented.json +1 -0
  71. package/docs/api/separator.json +1 -0
  72. package/docs/api/sheet.json +1 -0
  73. package/docs/api/sidebar.json +1 -0
  74. package/docs/api/skeleton.json +1 -0
  75. package/docs/api/slider.json +1 -0
  76. package/docs/api/sortable.json +1 -0
  77. package/docs/api/sparkline.json +1 -0
  78. package/docs/api/sparkline.md +85 -0
  79. package/docs/api/spinner.json +1 -0
  80. package/docs/api/split-button.json +1 -0
  81. package/docs/api/splitter.json +1 -0
  82. package/docs/api/stepper.json +1 -0
  83. package/docs/api/switch.json +1 -0
  84. package/docs/api/tabs.json +1 -0
  85. package/docs/api/text-area.json +1 -0
  86. package/docs/api/text-box.json +1 -0
  87. package/docs/api/theme.json +1 -0
  88. package/docs/api/time-picker.json +1 -0
  89. package/docs/api/time-selector.json +1 -0
  90. package/docs/api/toolbar.json +1 -0
  91. package/docs/api/tooltip.json +1 -0
  92. package/docs/api/tree-view.json +1 -0
  93. package/docs/api/window.json +1 -0
  94. package/docs/auto-complete.md +64 -0
  95. package/docs/combo-box.md +65 -0
  96. package/docs/installation.md +8 -0
  97. package/docs/manifest.json +1 -0
  98. package/docs/sparkline.md +303 -0
  99. package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +95 -30
  100. package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +58 -5
  101. package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +64 -29
  102. package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +39 -0
  103. package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +5 -0
  104. package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +5 -0
  105. package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +5 -0
  106. package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +5 -0
  107. package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +5 -0
  108. package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +5 -0
  109. package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +5 -0
  110. package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +5 -0
  111. package/fesm2022/nanahoshi-mona-ui-locales-pl-pl.mjs +25 -0
  112. package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +5 -0
  113. package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +25 -0
  114. package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +5 -0
  115. package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +5 -0
  116. package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +5 -0
  117. package/fesm2022/nanahoshi-mona-ui-sparkline.mjs +573 -0
  118. package/i18n/catalogs/en-US.messages.json +5 -0
  119. package/llms.txt +3 -1
  120. package/locales/ar-sa/ar-sa.messages.json +5 -0
  121. package/locales/de-de/de-de.messages.json +5 -0
  122. package/locales/es-es/es-es.messages.json +5 -0
  123. package/locales/fr-fr/fr-fr.messages.json +5 -0
  124. package/locales/id-id/id-id.messages.json +5 -0
  125. package/locales/it-it/it-it.messages.json +5 -0
  126. package/locales/ja-jp/ja-jp.messages.json +5 -0
  127. package/locales/ko-kr/ko-kr.messages.json +5 -0
  128. package/locales/pl-pl/pl-pl.messages.json +5 -0
  129. package/locales/pt-br/pt-br.messages.json +5 -0
  130. package/locales/ru-ru/ru-ru.messages.json +5 -0
  131. package/locales/tr-tr/tr-tr.messages.json +5 -0
  132. package/locales/zh-cn/zh-cn.messages.json +5 -0
  133. package/locales/zh-tw/zh-tw.messages.json +5 -0
  134. package/package.json +5 -1
  135. package/sparkline/package.json +4 -0
  136. package/types/nanahoshi-mona-ui-auto-complete.d.ts +42 -1
  137. package/types/nanahoshi-mona-ui-combo-box.d.ts +37 -1
  138. package/types/nanahoshi-mona-ui-dropdowns.d.ts +54 -4
  139. package/types/nanahoshi-mona-ui-i18n.d.ts +12 -0
  140. package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +5 -0
  141. package/types/nanahoshi-mona-ui-locales-de-de.d.ts +5 -0
  142. package/types/nanahoshi-mona-ui-locales-es-es.d.ts +5 -0
  143. package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +5 -0
  144. package/types/nanahoshi-mona-ui-locales-id-id.d.ts +5 -0
  145. package/types/nanahoshi-mona-ui-locales-it-it.d.ts +5 -0
  146. package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +5 -0
  147. package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +5 -0
  148. package/types/nanahoshi-mona-ui-locales-pl-pl.d.ts +5 -0
  149. package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +5 -0
  150. package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +5 -0
  151. package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +5 -0
  152. package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +5 -0
  153. package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +5 -0
  154. package/types/nanahoshi-mona-ui-sparkline.d.ts +228 -0
@@ -562,6 +562,11 @@
562
562
  "itemMoved": "{item} ora è in posizione {position} di {total}",
563
563
  "itemMovedToList": "{item} ora è in {list}, posizione {position} di {total}"
564
564
  },
565
+ "sparkline": {
566
+ "noData": "Nessun dato disponibile",
567
+ "summary": "{count, plural, =1 {# valore} other {# valori}}, primo {first}, ultimo {last}, minimo {min}, massimo {max}",
568
+ "winLossSummary": "{wins, plural, =1 {# vittoria} other {# vittorie}}, {losses, plural, =1 {# sconfitta} other {# sconfitte}}, {draws, plural, =1 {# pareggio} other {# pareggi}}"
569
+ },
565
570
  "spinner": {
566
571
  "cancel": "Annulla",
567
572
  "loading": "Caricamento in corso"
@@ -562,6 +562,11 @@
562
562
  "itemMoved": "{item}を{total}件中{position}番目に移動しました",
563
563
  "itemMovedToList": "{item}を{list}の{total}件中{position}番目に移動しました"
564
564
  },
565
+ "sparkline": {
566
+ "noData": "データがありません",
567
+ "summary": "{count}個の値、最初 {first}、最後 {last}、最小 {min}、最大 {max}",
568
+ "winLossSummary": "{wins}勝、{losses}敗、{draws}分"
569
+ },
565
570
  "spinner": {
566
571
  "cancel": "キャンセル",
567
572
  "loading": "読み込み中"
@@ -562,6 +562,11 @@
562
562
  "itemMoved": "{item}을(를) {total}개 중 {position}번째 위치로 이동했습니다",
563
563
  "itemMovedToList": "{item}을(를) {list}의 {total}개 중 {position}번째 위치로 이동했습니다"
564
564
  },
565
+ "sparkline": {
566
+ "noData": "데이터 없음",
567
+ "summary": "값 {count}개, 처음 {first}, 마지막 {last}, 최저 {min}, 최고 {max}",
568
+ "winLossSummary": "{wins}승 {losses}패 {draws}무"
569
+ },
565
570
  "spinner": {
566
571
  "cancel": "취소",
567
572
  "loading": "로딩 중"
@@ -562,6 +562,11 @@
562
562
  "itemMoved": "Przeniesiono „{item}” na pozycję {position} z {total}",
563
563
  "itemMovedToList": "Przeniesiono „{item}” do listy „{list}”, pozycja {position} z {total}"
564
564
  },
565
+ "sparkline": {
566
+ "noData": "Brak danych",
567
+ "summary": "{count, plural, one {# wartość} few {# wartości} many {# wartości} other {# wartości}}, pierwsza {first}, ostatnia {last}, najniższa {min}, najwyższa {max}",
568
+ "winLossSummary": "{wins, plural, one {# wygrana} few {# wygrane} many {# wygranych} other {# wygranej}}, {losses, plural, one {# przegrana} few {# przegrane} many {# przegranych} other {# przegranej}}, {draws, plural, one {# remis} few {# remisy} many {# remisów} other {# remisu}}"
569
+ },
565
570
  "spinner": {
566
571
  "cancel": "Anuluj",
567
572
  "loading": "Ładowanie"
@@ -562,6 +562,11 @@
562
562
  "itemMoved": "{item} agora está na posição {position} de {total}",
563
563
  "itemMovedToList": "{item} agora está em {list}, posição {position} de {total}"
564
564
  },
565
+ "sparkline": {
566
+ "noData": "Nenhum dado disponível",
567
+ "summary": "{count, plural, =1 {# valor} other {# valores}}, primeiro {first}, último {last}, mínimo {min}, máximo {max}",
568
+ "winLossSummary": "{wins, plural, =1 {# vitória} other {# vitórias}}, {losses, plural, =1 {# derrota} other {# derrotas}}, {draws, plural, =1 {# empate} other {# empates}}"
569
+ },
565
570
  "spinner": {
566
571
  "cancel": "Cancelar",
567
572
  "loading": "Carregando"
@@ -562,6 +562,11 @@
562
562
  "itemMoved": "«{item}» теперь на позиции {position} из {total}",
563
563
  "itemMovedToList": "«{item}» теперь в списке «{list}», позиция {position} из {total}"
564
564
  },
565
+ "sparkline": {
566
+ "noData": "Нет данных",
567
+ "summary": "{count, plural, one {# значение} few {# значения} many {# значений} other {# значения}}, первое {first}, последнее {last}, минимальное {min}, максимальное {max}",
568
+ "winLossSummary": "{wins, plural, one {# победа} few {# победы} many {# побед} other {# победы}}, {losses, plural, one {# поражение} few {# поражения} many {# поражений} other {# поражения}}, {draws, plural, one {# ничья} few {# ничьи} many {# ничьих} other {# ничьи}}"
569
+ },
565
570
  "spinner": {
566
571
  "cancel": "Отмена",
567
572
  "loading": "Загрузка"
@@ -562,6 +562,11 @@
562
562
  "itemMoved": "{item}, {total} içinde {position}. konuma taşındı",
563
563
  "itemMovedToList": "{item}, {list} listesine taşındı; {total} içinde {position}. konum"
564
564
  },
565
+ "sparkline": {
566
+ "noData": "Veri yok",
567
+ "summary": "{count} değer, ilk {first}, son {last}, en düşük {min}, en yüksek {max}",
568
+ "winLossSummary": "{wins} galibiyet, {losses} mağlubiyet, {draws} beraberlik"
569
+ },
565
570
  "spinner": {
566
571
  "cancel": "İptal",
567
572
  "loading": "Yükleniyor"
@@ -562,6 +562,11 @@
562
562
  "itemMoved": "{item} 已移至第 {position} 位,共 {total} 位",
563
563
  "itemMovedToList": "{item} 已移至{list},第 {position} 位,共 {total} 位"
564
564
  },
565
+ "sparkline": {
566
+ "noData": "没有数据",
567
+ "summary": "{count} 个值,第一个 {first},最后一个 {last},最低 {min},最高 {max}",
568
+ "winLossSummary": "{wins} 胜,{losses} 负,{draws} 平"
569
+ },
565
570
  "spinner": {
566
571
  "cancel": "取消",
567
572
  "loading": "加载中"
@@ -562,6 +562,11 @@
562
562
  "itemMoved": "{item} 已移至第 {position} 位,共 {total} 位",
563
563
  "itemMovedToList": "{item} 已移至{list},第 {position} 位,共 {total} 位"
564
564
  },
565
+ "sparkline": {
566
+ "noData": "沒有資料",
567
+ "summary": "{count} 個值,第一個 {first},最後一個 {last},最低 {min},最高 {max}",
568
+ "winLossSummary": "{wins} 勝,{losses} 負,{draws} 和"
569
+ },
565
570
  "spinner": {
566
571
  "cancel": "取消",
567
572
  "loading": "載入中"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nanahoshi/mona-ui",
3
- "version": "0.41.0",
3
+ "version": "0.43.0",
4
4
  "description": "A very light Angular UI framework",
5
5
  "author": "Nanahoshi",
6
6
  "repository": {
@@ -382,6 +382,10 @@
382
382
  "types": "./types/nanahoshi-mona-ui-sortable.d.ts",
383
383
  "default": "./fesm2022/nanahoshi-mona-ui-sortable.mjs"
384
384
  },
385
+ "./sparkline": {
386
+ "types": "./types/nanahoshi-mona-ui-sparkline.d.ts",
387
+ "default": "./fesm2022/nanahoshi-mona-ui-sparkline.mjs"
388
+ },
385
389
  "./spinner": {
386
390
  "types": "./types/nanahoshi-mona-ui-spinner.d.ts",
387
391
  "default": "./fesm2022/nanahoshi-mona-ui-spinner.mjs"
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-sparkline.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-sparkline.d.ts"
4
+ }
@@ -4,7 +4,7 @@ import { FormValueControl } from "@angular/forms/signals";
4
4
  import { PreventableEvent } from "@nanahoshi/mona-ui/common";
5
5
  import { ListSizeInputType, SelectableOptions, SelectionChangeEvent } from "@nanahoshi/mona-ui/internal/list";
6
6
  import * as i1 from "@nanahoshi/mona-ui/dropdowns";
7
- import { DropdownDataInput, DropdownFieldPredicateType, DropdownFieldSelectorType, DropdownPopupInput, DropdownPopupVariantInput } from "@nanahoshi/mona-ui/dropdowns";
7
+ import { AdaptiveMode, DropdownDataInput, DropdownFieldPredicateType, DropdownFieldSelectorType, DropdownPopupInput, DropdownPopupVariantInput } from "@nanahoshi/mona-ui/dropdowns";
8
8
  import { PopupCloseEvent } from "@nanahoshi/mona-ui/popup";
9
9
  import { Subject } from "rxjs";
10
10
  import { VariantProps } from "class-variance-authority";
@@ -44,18 +44,42 @@ export declare class AutoCompleteComponent<TData = unknown> implements FormValue
44
44
  protected readonly groupHeaderTemplate: import("@angular/core").Signal<TemplateRef<any> | undefined>;
45
45
  protected readonly headerTemplate: import("@angular/core").Signal<TemplateRef<any> | undefined>;
46
46
  protected readonly inputClass: import("@angular/core").Signal<string>;
47
+ /**
48
+ * Where the popup opens as a bottom sheet, the field's input raises no on-screen keyboard: a press opens the sheet,
49
+ * whose own text box takes the typing.
50
+ */
51
+ protected readonly inputMode: import("@angular/core").Signal<"none" | null>;
47
52
  protected readonly invalidState: import("@angular/core").Signal<boolean>;
48
53
  protected readonly isEmpty: import("@angular/core").Signal<boolean>;
49
54
  protected readonly itemTemplate: import("@angular/core").Signal<TemplateRef<any> | undefined>;
50
55
  protected readonly labelledBy: import("@angular/core").Signal<string | null>;
51
56
  protected readonly listId: string;
52
57
  protected readonly listPopupClass: import("@angular/core").Signal<string>;
58
+ /** The list's size: large in a bottom sheet, for touch. */
59
+ protected readonly listSize: import("@angular/core").Signal<"small" | "medium" | "large" | null | undefined>;
53
60
  protected readonly messages: import("@angular/core").Signal<import("@nanahoshi/mona-ui/i18n").MonaAutoCompleteMessages>;
54
61
  protected readonly noDataTemplate: import("@angular/core").Signal<TemplateRef<any> | undefined>;
55
62
  protected readonly popupTemplate: import("@angular/core").Signal<TemplateRef<unknown>>;
56
63
  protected readonly prefixTemplate: import("@angular/core").Signal<TemplateRef<any> | undefined>;
57
64
  protected readonly selectableOptions: SelectableOptions;
65
+ protected readonly sheet: import("@angular/core").Signal<boolean>;
66
+ protected readonly sheetInputClass = "h-11 w-full text-base";
67
+ protected readonly sheetInputContainerClass = "shrink-0 px-2 pt-1 pb-2";
68
+ protected readonly sheetTitleId: import("@angular/core").Signal<string | null>;
58
69
  protected readonly suffixTemplate: import("@angular/core").Signal<TemplateRef<any> | undefined>;
70
+ /**
71
+ * @description Opens the popup as a sheet along the bottom of the screen on a small screen (narrower than 640
72
+ * pixels), with a text box of its own at the top, where the typing happens. A press on the field opens the sheet,
73
+ * and the field raises no on-screen keyboard. `"none"` always opens the popup under the field.
74
+ * @default "none"
75
+ */
76
+ readonly adaptiveMode: import("@angular/core").InputSignal<AdaptiveMode>;
77
+ /**
78
+ * @description Title of the bottom sheet the popup opens as with `adaptiveMode="auto"`, which also names the
79
+ * sheet's text box. When empty, the sheet shows the autocomplete's name, from its label or `aria-label`.
80
+ * @default ""
81
+ */
82
+ readonly adaptiveTitle: import("@angular/core").InputSignal<string>;
59
83
  /**
60
84
  * @description ID of an element that provides an extended description for the input.
61
85
  * Use this to associate error messages or help text with the input.
@@ -217,9 +241,16 @@ export declare class AutoCompleteComponent<TData = unknown> implements FormValue
217
241
  focus(options?: FocusOptions): void;
218
242
  protected onFocusOut(event: FocusEvent): void;
219
243
  protected onInput(text: string): void;
244
+ protected onInputClick(): void;
220
245
  protected onItemSelect(event: SelectionChangeEvent<TData>): void;
221
246
  protected onPopupPointerDown(event: PointerEvent): void;
247
+ protected onSheetKeydown(event: KeyboardEvent): void;
222
248
  protected onValueClear(event: MouseEvent | KeyboardEvent): void;
249
+ /**
250
+ * Filters the list by the text and opens the popup, highlighting the first match. Without text, the popup closes,
251
+ * unless it's a bottom sheet, whose text box is where the next text comes from: the sheet shows the whole list.
252
+ */
253
+ private applyText;
223
254
  private clear;
224
255
  private closePopup;
225
256
  private initialize;
@@ -234,6 +265,16 @@ export declare class AutoCompleteComponent<TData = unknown> implements FormValue
234
265
  private updateValue;
235
266
  static ɵfac: i0.ɵɵFactoryDeclaration<AutoCompleteComponent<any>, never>;
236
267
  static ɵcmp: i0.ɵɵComponentDeclaration<AutoCompleteComponent<any>, "mona-auto-complete", never, {
268
+ "adaptiveMode": {
269
+ "alias": "adaptiveMode";
270
+ "required": false;
271
+ "isSignal": true;
272
+ };
273
+ "adaptiveTitle": {
274
+ "alias": "adaptiveTitle";
275
+ "required": false;
276
+ "isSignal": true;
277
+ };
237
278
  "ariaDescribedBy": {
238
279
  "alias": "aria-describedby";
239
280
  "required": false;
@@ -3,7 +3,7 @@ import { TemplateRef } from "@angular/core";
3
3
  import { FormValueControl } from "@angular/forms/signals";
4
4
  import { PreventableEvent } from "@nanahoshi/mona-ui/common";
5
5
  import * as i1 from "@nanahoshi/mona-ui/dropdowns";
6
- import { DropdownDataInput, DropdownFieldPredicateType, DropdownFieldSelectorType, DropdownPopupInput, DropdownPopupVariantInput } from "@nanahoshi/mona-ui/dropdowns";
6
+ import { AdaptiveMode, DropdownDataInput, DropdownFieldPredicateType, DropdownFieldSelectorType, DropdownPopupInput, DropdownPopupVariantInput } from "@nanahoshi/mona-ui/dropdowns";
7
7
  import { ListItem, ListSizeInputType, SelectableOptions, SelectionChangeEvent } from "@nanahoshi/mona-ui/internal/list";
8
8
  import { PopupCloseEvent } from "@nanahoshi/mona-ui/popup";
9
9
  import { Subject } from "rxjs";
@@ -44,18 +44,42 @@ export declare class ComboBoxComponent<TData = unknown, TValue = TData> implemen
44
44
  protected readonly groupHeaderTemplate: import("@angular/core").Signal<TemplateRef<any> | undefined>;
45
45
  protected readonly headerTemplate: import("@angular/core").Signal<TemplateRef<any> | undefined>;
46
46
  protected readonly inputClass: import("@angular/core").Signal<string>;
47
+ /**
48
+ * Where the popup opens as a bottom sheet, the field's input raises no on-screen keyboard: a press opens the sheet,
49
+ * whose own text box takes the typing.
50
+ */
51
+ protected readonly inputMode: import("@angular/core").Signal<"none" | null>;
47
52
  protected readonly invalidState: import("@angular/core").Signal<boolean>;
48
53
  protected readonly itemTemplate: import("@angular/core").Signal<TemplateRef<any> | undefined>;
49
54
  protected readonly labelledBy: import("@angular/core").Signal<string | null>;
50
55
  protected readonly listId: string;
51
56
  protected readonly listPopupClass: import("@angular/core").Signal<string>;
57
+ /** The list's size: large in a bottom sheet, for touch. */
58
+ protected readonly listSize: import("@angular/core").Signal<"small" | "medium" | "large" | null | undefined>;
52
59
  protected readonly messages: import("@angular/core").Signal<import("@nanahoshi/mona-ui/i18n").MonaComboBoxMessages>;
53
60
  protected readonly noDataTemplate: import("@angular/core").Signal<TemplateRef<any> | undefined>;
54
61
  protected readonly popupTemplate: import("@angular/core").Signal<TemplateRef<unknown>>;
55
62
  protected readonly prefixTemplate: import("@angular/core").Signal<TemplateRef<any> | undefined>;
56
63
  protected readonly selectableOptions: SelectableOptions;
57
64
  protected readonly selectedListItem: import("@angular/core").Signal<ListItem<any> | null>;
65
+ protected readonly sheet: import("@angular/core").Signal<boolean>;
66
+ protected readonly sheetInputClass = "h-11 w-full text-base";
67
+ protected readonly sheetInputContainerClass = "shrink-0 px-2 pt-1 pb-2";
68
+ protected readonly sheetTitleId: import("@angular/core").Signal<string | null>;
58
69
  protected readonly valueText: import("@angular/core").Signal<string>;
70
+ /**
71
+ * @description Opens the popup as a sheet along the bottom of the screen on a small screen (narrower than 640
72
+ * pixels), with a text box of its own at the top, where the typing happens. A press on the field opens the sheet,
73
+ * and the field raises no on-screen keyboard. `"none"` always opens the popup under the field.
74
+ * @default "none"
75
+ */
76
+ readonly adaptiveMode: import("@angular/core").InputSignal<AdaptiveMode>;
77
+ /**
78
+ * @description Title of the bottom sheet the popup opens as with `adaptiveMode="auto"`, which also names the
79
+ * sheet's text box. When empty, the sheet shows the combo box's name, from its label or `aria-label`.
80
+ * @default ""
81
+ */
82
+ readonly adaptiveTitle: import("@angular/core").InputSignal<string>;
59
83
  /**
60
84
  * @description Allows a custom value to be committed when it doesn't match any item in {@link data}.
61
85
  * @default false
@@ -236,8 +260,10 @@ export declare class ComboBoxComponent<TData = unknown, TValue = TData> implemen
236
260
  protected onFocusOut(event: FocusEvent): void;
237
261
  protected onHostPointerDown(event: PointerEvent): void;
238
262
  protected onInput(text: string): void;
263
+ protected onInputClick(): void;
239
264
  protected onItemSelect(event: SelectionChangeEvent<TData>): void;
240
265
  protected onPopupPointerDown(event: PointerEvent): void;
266
+ protected onSheetKeydown(event: KeyboardEvent): void;
241
267
  protected onValueClear(event: Event): void;
242
268
  private clear;
243
269
  private closePopup;
@@ -263,6 +289,16 @@ export declare class ComboBoxComponent<TData = unknown, TValue = TData> implemen
263
289
  private updateValue;
264
290
  static ɵfac: i0.ɵɵFactoryDeclaration<ComboBoxComponent<any, any>, never>;
265
291
  static ɵcmp: i0.ɵɵComponentDeclaration<ComboBoxComponent<any, any>, "mona-combo-box", never, {
292
+ "adaptiveMode": {
293
+ "alias": "adaptiveMode";
294
+ "required": false;
295
+ "isSignal": true;
296
+ };
297
+ "adaptiveTitle": {
298
+ "alias": "adaptiveTitle";
299
+ "required": false;
300
+ "isSignal": true;
301
+ };
266
302
  "allowCustomValue": {
267
303
  "alias": "allowCustomValue";
268
304
  "required": false;
@@ -51,16 +51,21 @@ export declare const DROPDOWN_POPUP_INPUT_TOKEN: InjectionToken<DropdownPopupInp
51
51
  export interface DropdownSheetData {
52
52
  /** The dropdown's popup template, shown below the sheet's header. */
53
53
  readonly content: TemplateRef<unknown>;
54
+ /** Whether the sheet takes its full height however short its content is. */
55
+ readonly fillHeight: boolean;
54
56
  /** The sheet's title: the dropdown's `adaptiveTitle`, or else its name. */
55
57
  readonly title: Signal<string>;
58
+ /** The id of the title's element, which names a text box in the sheet. */
59
+ readonly titleId: string;
56
60
  }
57
61
  /**
58
62
  * The bottom sheet a dropdown's popup opens as on a small screen (`adaptiveMode="auto"`): a header with the field's
59
63
  * name and a close button, over the dropdown's own popup.
60
64
  *
61
65
  * Focus is where the popup under the field keeps it: on the field or in the filter box for a list or a tree, and in
62
- * the popup, a dialog, for a date or time picker. So the sheet's close button is for pointers; the keyboard closes the
63
- * sheet with Escape, or Tab for a list or a tree.
66
+ * the popup, a dialog, for a date or time picker. A combo box or an auto-complete puts a text box in the sheet, which
67
+ * takes focus. So the sheet's close button is for pointers; the keyboard closes the sheet with Escape, or Tab for a
68
+ * list or a tree.
64
69
  * @hidden Exported for Mona UI's other entry points; applications don't need it.
65
70
  */
66
71
  export declare class DropdownSheetComponent {
@@ -278,6 +283,12 @@ export declare class DropdownPopupHandlerDirective {
278
283
  * dropdown's popup content. Focus stays where it is, as with the popup under the field.
279
284
  */
280
285
  private createSheet;
286
+ /**
287
+ * Moves focus to the text box a combo box or an auto-complete shows in its sheet, with the caret after its text.
288
+ * It runs in the press or key that opened the sheet, as the sheet renders while it's created: iOS only raises the
289
+ * on-screen keyboard for a field focused then.
290
+ */
291
+ private focusSheetTextBox;
281
292
  /**
282
293
  * Keeps the sheet on the bottom edge of what is visible. An on-screen keyboard (opened by the filter box) shrinks
283
294
  * the visual viewport but not the layout viewport the overlay is placed in, so the sheet is lifted above it.
@@ -303,9 +314,14 @@ export declare class DropdownPopupHandlerDirective {
303
314
  export declare class DropdownListPopupHandlerDirective {
304
315
  #private;
305
316
  constructor();
317
+ /**
318
+ * Handles a key pressed in the dropdown, as when its host receives it. A text box in the popup that stands in for
319
+ * the host's input, as a combo box's in a bottom sheet, passes its keys here.
320
+ * @hidden
321
+ */
322
+ handleKeyDown(e: KeyboardEvent): void;
306
323
  private closePopup;
307
324
  private handleArrowKeys;
308
- private handleKeyDown;
309
325
  private handleScrollOnPopupOpen;
310
326
  private scrollToHighlightedItem;
311
327
  private scrollToSelectedItem;
@@ -421,6 +437,15 @@ export declare class DropdownService {
421
437
  * popup content for it. `false` while the popup is closed.
422
438
  */
423
439
  readonly sheet: import("@angular/core").WritableSignal<boolean>;
440
+ /**
441
+ * Whether the bottom sheet takes its full height however short its content is. A dropdown whose sheet has a text
442
+ * box sets it, so the box stays put while the list under it filters.
443
+ */
444
+ readonly sheetFillsHeight: import("@angular/core").WritableSignal<boolean>;
445
+ /**
446
+ * The id of the open bottom sheet's title, which names a text box in the sheet. `null` while no sheet is open.
447
+ */
448
+ readonly sheetTitleId: import("@angular/core").WritableSignal<string | null>;
424
449
  /**
425
450
  * Opens the popup with the given settings when it is closed. Does nothing while the host is disabled or read-only,
426
451
  * or when the `open` event is prevented.
@@ -450,9 +475,23 @@ export type DropdownPopupVariantInput = VariantInputs<DropdownPopupVariantProps>
450
475
  * The bottom sheet a dropdown's popup opens as on a small screen. Its rounded top edge faces the page; the bottom
451
476
  * padding keeps the content above the home indicator. `overflow-clip`, not `hidden`, so content that takes focus
452
477
  * during the slide-in can't scroll the sheet and cancel the animation.
478
+ *
479
+ * A sheet that fills its height asks for the whole screen, and the popup's maximum height, which follows the space
480
+ * above an on-screen keyboard, cuts it down.
481
+ * @hidden Exported for Mona UI's other entry points; applications don't need it.
482
+ */
483
+ export declare const dropdownSheetThemeVariants: (props?: ({
484
+ fillHeight?: boolean | null | undefined;
485
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
486
+ /**
487
+ * The text box a combo box or an auto-complete shows at the top of its bottom sheet, which stands in for its own while
488
+ * the sheet is open, inset as a list's filter box is. It's 44 pixels tall, to be easy to tap, and its text is 16 pixels,
489
+ * so that iOS doesn't zoom in when it takes focus.
453
490
  * @hidden Exported for Mona UI's other entry points; applications don't need it.
454
491
  */
455
- export declare const dropdownSheetThemeVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
492
+ export declare const dropdownSheetInputContainerClasses = "shrink-0 px-2 pt-1 pb-2";
493
+ /** @hidden Exported for Mona UI's other entry points; applications don't need it. */
494
+ export declare const dropdownSheetInputClasses = "h-11 w-full text-base";
456
495
  /**
457
496
  * A dropdown's popup surface inside the bottom sheet: the sheet draws the border, corners and shadow, and sets the
458
497
  * height, so the surface only fills it. Options and nodes are 44 pixels tall there, to be easy to tap.
@@ -476,5 +515,16 @@ export declare const dropdownSheetPickerClasses = "\n h-full max-h-none min-h
476
515
  * @hidden Exported for Mona UI's other entry points; applications don't need it.
477
516
  */
478
517
  export declare function readDropdownField<TData>(item: TData, field: DropdownFieldPredicateType<TData> | DropdownFieldSelectorType<TData>): unknown;
518
+ /**
519
+ * Whether the screen is narrow enough for a dropdown with `adaptiveMode="auto"` to open as a bottom sheet, now.
520
+ * @hidden Exported for Mona UI's other entry points; applications don't need it.
521
+ */
522
+ export declare function matchesSmallScreen(document: Document): boolean;
523
+ /**
524
+ * Whether the screen is narrow enough for a dropdown with `adaptiveMode="auto"` to open as a bottom sheet, kept up to
525
+ * date as the window is resized. `false` on the server. Call it in an injection context.
526
+ * @hidden Exported for Mona UI's other entry points; applications don't need it.
527
+ */
528
+ export declare function injectSmallScreen(): Signal<boolean>;
479
529
  export declare const DROPDOWNS_DEFAULT_MESSAGES: MonaDropdownsMessages;
480
530
  export type { AdaptiveMode };
@@ -875,6 +875,17 @@ export interface MonaSortableMessages {
875
875
  */
876
876
  itemMovedToList(item: string, list: string, position: number, total: number): string;
877
877
  }
878
+ export interface MonaSparklineMessages {
879
+ /** Read in place of a summary when a sparkline has no values. */
880
+ readonly noData: string;
881
+ /**
882
+ * Summarizes a sparkline's values, formatted already: how many there are, the first, the last, the lowest and the
883
+ * highest ("12 values, first 6, last 15, lowest 4, highest 18").
884
+ */
885
+ summary(count: number, first: string, last: string, min: string, max: string): string;
886
+ /** Summarizes a win-loss sparkline: how many wins, losses and draws it shows ("7 wins, 3 losses, 1 draw"). */
887
+ winLossSummary(wins: number, losses: number, draws: number): string;
888
+ }
878
889
  export interface MonaSpinnerMessages {
879
890
  readonly cancel: string;
880
891
  readonly loading: string;
@@ -1047,6 +1058,7 @@ export interface MonaLocaleMessages {
1047
1058
  sidebar: MonaSidebarMessages;
1048
1059
  slider: MonaSliderMessages;
1049
1060
  sortable: MonaSortableMessages;
1061
+ sparkline: MonaSparklineMessages;
1050
1062
  spinner: MonaSpinnerMessages;
1051
1063
  splitButton: MonaSplitButtonMessages;
1052
1064
  splitter: MonaSplitterMessages;
@@ -565,6 +565,11 @@ export declare const MONA_AR_SA_LOCALE: {
565
565
  itemMoved: (item: string, position: number, total: number) => string;
566
566
  itemMovedToList: (item: string, list: string, position: number, total: number) => string;
567
567
  };
568
+ sparkline: {
569
+ noData: string;
570
+ summary: (count: number, first: string, last: string, min: string, max: string) => string;
571
+ winLossSummary: (wins: number, losses: number, draws: number) => string;
572
+ };
568
573
  spinner: {
569
574
  cancel: string;
570
575
  loading: string;
@@ -565,6 +565,11 @@ export declare const MONA_DE_DE_LOCALE: {
565
565
  itemMoved: (item: string, position: number, total: number) => string;
566
566
  itemMovedToList: (item: string, list: string, position: number, total: number) => string;
567
567
  };
568
+ sparkline: {
569
+ noData: string;
570
+ summary: (count: number, first: string, last: string, min: string, max: string) => string;
571
+ winLossSummary: (wins: number, losses: number, draws: number) => string;
572
+ };
568
573
  spinner: {
569
574
  cancel: string;
570
575
  loading: string;
@@ -565,6 +565,11 @@ export declare const MONA_ES_ES_LOCALE: {
565
565
  itemMoved: (item: string, position: number, total: number) => string;
566
566
  itemMovedToList: (item: string, list: string, position: number, total: number) => string;
567
567
  };
568
+ sparkline: {
569
+ noData: string;
570
+ summary: (count: number, first: string, last: string, min: string, max: string) => string;
571
+ winLossSummary: (wins: number, losses: number, draws: number) => string;
572
+ };
568
573
  spinner: {
569
574
  cancel: string;
570
575
  loading: string;
@@ -565,6 +565,11 @@ export declare const MONA_FR_FR_LOCALE: {
565
565
  itemMoved: (item: string, position: number, total: number) => string;
566
566
  itemMovedToList: (item: string, list: string, position: number, total: number) => string;
567
567
  };
568
+ sparkline: {
569
+ noData: string;
570
+ summary: (count: number, first: string, last: string, min: string, max: string) => string;
571
+ winLossSummary: (wins: number, losses: number, draws: number) => string;
572
+ };
568
573
  spinner: {
569
574
  cancel: string;
570
575
  loading: string;
@@ -565,6 +565,11 @@ export declare const MONA_ID_ID_LOCALE: {
565
565
  itemMoved: (item: string, position: number, total: number) => string;
566
566
  itemMovedToList: (item: string, list: string, position: number, total: number) => string;
567
567
  };
568
+ sparkline: {
569
+ noData: string;
570
+ summary: (count: number, first: string, last: string, min: string, max: string) => string;
571
+ winLossSummary: (wins: number, losses: number, draws: number) => string;
572
+ };
568
573
  spinner: {
569
574
  cancel: string;
570
575
  loading: string;
@@ -565,6 +565,11 @@ export declare const MONA_IT_IT_LOCALE: {
565
565
  itemMoved: (item: string, position: number, total: number) => string;
566
566
  itemMovedToList: (item: string, list: string, position: number, total: number) => string;
567
567
  };
568
+ sparkline: {
569
+ noData: string;
570
+ summary: (count: number, first: string, last: string, min: string, max: string) => string;
571
+ winLossSummary: (wins: number, losses: number, draws: number) => string;
572
+ };
568
573
  spinner: {
569
574
  cancel: string;
570
575
  loading: string;
@@ -565,6 +565,11 @@ export declare const MONA_JA_JP_LOCALE: {
565
565
  itemMoved: (item: string, position: number, total: number) => string;
566
566
  itemMovedToList: (item: string, list: string, position: number, total: number) => string;
567
567
  };
568
+ sparkline: {
569
+ noData: string;
570
+ summary: (count: number, first: string, last: string, min: string, max: string) => string;
571
+ winLossSummary: (wins: number, losses: number, draws: number) => string;
572
+ };
568
573
  spinner: {
569
574
  cancel: string;
570
575
  loading: string;
@@ -565,6 +565,11 @@ export declare const MONA_KO_KR_LOCALE: {
565
565
  itemMoved: (item: string, position: number, total: number) => string;
566
566
  itemMovedToList: (item: string, list: string, position: number, total: number) => string;
567
567
  };
568
+ sparkline: {
569
+ noData: string;
570
+ summary: (count: number, first: string, last: string, min: string, max: string) => string;
571
+ winLossSummary: (wins: number, losses: number, draws: number) => string;
572
+ };
568
573
  spinner: {
569
574
  cancel: string;
570
575
  loading: string;
@@ -565,6 +565,11 @@ export declare const MONA_PL_PL_LOCALE: {
565
565
  itemMoved: (item: string, position: number, total: number) => string;
566
566
  itemMovedToList: (item: string, list: string, position: number, total: number) => string;
567
567
  };
568
+ sparkline: {
569
+ noData: string;
570
+ summary: (count: number, first: string, last: string, min: string, max: string) => string;
571
+ winLossSummary: (wins: number, losses: number, draws: number) => string;
572
+ };
568
573
  spinner: {
569
574
  cancel: string;
570
575
  loading: string;
@@ -565,6 +565,11 @@ export declare const MONA_PT_BR_LOCALE: {
565
565
  itemMoved: (item: string, position: number, total: number) => string;
566
566
  itemMovedToList: (item: string, list: string, position: number, total: number) => string;
567
567
  };
568
+ sparkline: {
569
+ noData: string;
570
+ summary: (count: number, first: string, last: string, min: string, max: string) => string;
571
+ winLossSummary: (wins: number, losses: number, draws: number) => string;
572
+ };
568
573
  spinner: {
569
574
  cancel: string;
570
575
  loading: string;
@@ -565,6 +565,11 @@ export declare const MONA_RU_RU_LOCALE: {
565
565
  itemMoved: (item: string, position: number, total: number) => string;
566
566
  itemMovedToList: (item: string, list: string, position: number, total: number) => string;
567
567
  };
568
+ sparkline: {
569
+ noData: string;
570
+ summary: (count: number, first: string, last: string, min: string, max: string) => string;
571
+ winLossSummary: (wins: number, losses: number, draws: number) => string;
572
+ };
568
573
  spinner: {
569
574
  cancel: string;
570
575
  loading: string;
@@ -565,6 +565,11 @@ export declare const MONA_TR_TR_LOCALE: {
565
565
  itemMoved: (item: string, position: number, total: number) => string;
566
566
  itemMovedToList: (item: string, list: string, position: number, total: number) => string;
567
567
  };
568
+ sparkline: {
569
+ noData: string;
570
+ summary: (count: number, first: string, last: string, min: string, max: string) => string;
571
+ winLossSummary: (wins: number, losses: number, draws: number) => string;
572
+ };
568
573
  spinner: {
569
574
  cancel: string;
570
575
  loading: string;
@@ -565,6 +565,11 @@ export declare const MONA_ZH_CN_LOCALE: {
565
565
  itemMoved: (item: string, position: number, total: number) => string;
566
566
  itemMovedToList: (item: string, list: string, position: number, total: number) => string;
567
567
  };
568
+ sparkline: {
569
+ noData: string;
570
+ summary: (count: number, first: string, last: string, min: string, max: string) => string;
571
+ winLossSummary: (wins: number, losses: number, draws: number) => string;
572
+ };
568
573
  spinner: {
569
574
  cancel: string;
570
575
  loading: string;
@@ -565,6 +565,11 @@ export declare const MONA_ZH_TW_LOCALE: {
565
565
  itemMoved: (item: string, position: number, total: number) => string;
566
566
  itemMovedToList: (item: string, list: string, position: number, total: number) => string;
567
567
  };
568
+ sparkline: {
569
+ noData: string;
570
+ summary: (count: number, first: string, last: string, min: string, max: string) => string;
571
+ winLossSummary: (wins: number, losses: number, draws: number) => string;
572
+ };
568
573
  spinner: {
569
574
  cancel: string;
570
575
  loading: string;