@nanahoshi/mona-ui 0.40.0 → 0.42.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.
- package/docs/api/auto-complete.md +2 -0
- package/docs/api/combo-box.md +2 -0
- package/docs/api/common.md +1 -1
- package/docs/api/dropdowns.md +3 -1
- package/docs/api/i18n.md +54 -0
- package/docs/api/kanban.md +222 -0
- package/docs/api/locales.md +14 -14
- package/docs/api/sortable.md +189 -0
- package/docs/api/sparkline.md +85 -0
- package/docs/api/tabs.md +20 -0
- package/docs/auto-complete.md +64 -0
- package/docs/combo-box.md +65 -0
- package/docs/kanban.md +293 -0
- package/docs/sortable.md +320 -0
- package/docs/sparkline.md +303 -0
- package/docs/tabs.md +59 -10
- package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +95 -30
- package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +58 -5
- package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +64 -29
- package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +87 -0
- package/fesm2022/nanahoshi-mona-ui-kanban.mjs +660 -0
- package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +14 -0
- package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +14 -0
- package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +14 -0
- package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +14 -0
- package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +14 -0
- package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +14 -0
- package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +14 -0
- package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +14 -0
- package/fesm2022/nanahoshi-mona-ui-locales-pl-pl.mjs +44 -0
- package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +14 -0
- package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +44 -0
- package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +14 -0
- package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +14 -0
- package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +14 -0
- package/fesm2022/nanahoshi-mona-ui-sortable.mjs +733 -0
- package/fesm2022/nanahoshi-mona-ui-sparkline.mjs +573 -0
- package/fesm2022/nanahoshi-mona-ui-tabs.mjs +112 -5
- package/i18n/catalogs/en-US.messages.json +14 -0
- package/kanban/package.json +4 -0
- package/llms.txt +8 -2
- package/locales/ar-sa/ar-sa.messages.json +14 -0
- package/locales/de-de/de-de.messages.json +14 -0
- package/locales/es-es/es-es.messages.json +14 -0
- package/locales/fr-fr/fr-fr.messages.json +14 -0
- package/locales/id-id/id-id.messages.json +14 -0
- package/locales/it-it/it-it.messages.json +14 -0
- package/locales/ja-jp/ja-jp.messages.json +14 -0
- package/locales/ko-kr/ko-kr.messages.json +14 -0
- package/locales/pl-pl/pl-pl.messages.json +14 -0
- package/locales/pt-br/pt-br.messages.json +14 -0
- package/locales/ru-ru/ru-ru.messages.json +14 -0
- package/locales/tr-tr/tr-tr.messages.json +14 -0
- package/locales/zh-cn/zh-cn.messages.json +14 -0
- package/locales/zh-tw/zh-tw.messages.json +14 -0
- package/package.json +13 -1
- package/sortable/package.json +4 -0
- package/sparkline/package.json +4 -0
- package/types/nanahoshi-mona-ui-auto-complete.d.ts +42 -1
- package/types/nanahoshi-mona-ui-combo-box.d.ts +37 -1
- package/types/nanahoshi-mona-ui-dropdowns.d.ts +54 -4
- package/types/nanahoshi-mona-ui-i18n.d.ts +31 -0
- package/types/nanahoshi-mona-ui-kanban.d.ts +270 -0
- package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +14 -0
- package/types/nanahoshi-mona-ui-locales-de-de.d.ts +14 -0
- package/types/nanahoshi-mona-ui-locales-es-es.d.ts +14 -0
- package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +14 -0
- package/types/nanahoshi-mona-ui-locales-id-id.d.ts +14 -0
- package/types/nanahoshi-mona-ui-locales-it-it.d.ts +14 -0
- package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +14 -0
- package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +14 -0
- package/types/nanahoshi-mona-ui-locales-pl-pl.d.ts +14 -0
- package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +14 -0
- package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +14 -0
- package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +14 -0
- package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +14 -0
- package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +14 -0
- package/types/nanahoshi-mona-ui-sortable.d.ts +245 -0
- package/types/nanahoshi-mona-ui-sparkline.d.ts +228 -0
- package/types/nanahoshi-mona-ui-tabs.d.ts +46 -0
|
@@ -438,6 +438,11 @@
|
|
|
438
438
|
"sortOrder": "Kolejność sortowania {position}",
|
|
439
439
|
"toolbar": "Pasek narzędzi tabeli"
|
|
440
440
|
},
|
|
441
|
+
"kanban": {
|
|
442
|
+
"cardCount": "{count, plural, one {# karta} few {# karty} many {# kart} other {# karty}}",
|
|
443
|
+
"cardCountWithLimit": "{count} z {limit, plural, one {# karty} few {# kart} many {# kart} other {# karty}}",
|
|
444
|
+
"emptyColumn": "Brak kart"
|
|
445
|
+
},
|
|
441
446
|
"label": {
|
|
442
447
|
"optional": "Opcjonalnie"
|
|
443
448
|
},
|
|
@@ -553,6 +558,15 @@
|
|
|
553
558
|
"minimumValue": "Wartość minimalna",
|
|
554
559
|
"sliderValue": "Wartość suwaka"
|
|
555
560
|
},
|
|
561
|
+
"sortable": {
|
|
562
|
+
"itemMoved": "Przeniesiono „{item}” na pozycję {position} z {total}",
|
|
563
|
+
"itemMovedToList": "Przeniesiono „{item}” do listy „{list}”, pozycja {position} z {total}"
|
|
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
|
+
},
|
|
556
570
|
"spinner": {
|
|
557
571
|
"cancel": "Anuluj",
|
|
558
572
|
"loading": "Ładowanie"
|
|
@@ -438,6 +438,11 @@
|
|
|
438
438
|
"sortOrder": "Ordem de classificação {position}",
|
|
439
439
|
"toolbar": "Barra de ferramentas da tabela"
|
|
440
440
|
},
|
|
441
|
+
"kanban": {
|
|
442
|
+
"cardCount": "{count, plural, =1 {# cartão} other {# cartões}}",
|
|
443
|
+
"cardCountWithLimit": "{count} de {limit, plural, =1 {# cartão} other {# cartões}}",
|
|
444
|
+
"emptyColumn": "Nenhum cartão"
|
|
445
|
+
},
|
|
441
446
|
"label": {
|
|
442
447
|
"optional": "Opcional"
|
|
443
448
|
},
|
|
@@ -553,6 +558,15 @@
|
|
|
553
558
|
"minimumValue": "Valor mínimo",
|
|
554
559
|
"sliderValue": "Valor do controle deslizante"
|
|
555
560
|
},
|
|
561
|
+
"sortable": {
|
|
562
|
+
"itemMoved": "{item} agora está na posição {position} de {total}",
|
|
563
|
+
"itemMovedToList": "{item} agora está em {list}, posição {position} de {total}"
|
|
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
|
+
},
|
|
556
570
|
"spinner": {
|
|
557
571
|
"cancel": "Cancelar",
|
|
558
572
|
"loading": "Carregando"
|
|
@@ -438,6 +438,11 @@
|
|
|
438
438
|
"sortOrder": "Порядок сортировки {position}",
|
|
439
439
|
"toolbar": "Панель инструментов таблицы"
|
|
440
440
|
},
|
|
441
|
+
"kanban": {
|
|
442
|
+
"cardCount": "{count, plural, one {# карточка} few {# карточки} many {# карточек} other {# карточки}}",
|
|
443
|
+
"cardCountWithLimit": "{count} из {limit, plural, one {# карточки} few {# карточек} many {# карточек} other {# карточки}}",
|
|
444
|
+
"emptyColumn": "Нет карточек"
|
|
445
|
+
},
|
|
441
446
|
"label": {
|
|
442
447
|
"optional": "Необязательно"
|
|
443
448
|
},
|
|
@@ -553,6 +558,15 @@
|
|
|
553
558
|
"minimumValue": "Минимальное значение",
|
|
554
559
|
"sliderValue": "Значение ползунка"
|
|
555
560
|
},
|
|
561
|
+
"sortable": {
|
|
562
|
+
"itemMoved": "«{item}» теперь на позиции {position} из {total}",
|
|
563
|
+
"itemMovedToList": "«{item}» теперь в списке «{list}», позиция {position} из {total}"
|
|
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
|
+
},
|
|
556
570
|
"spinner": {
|
|
557
571
|
"cancel": "Отмена",
|
|
558
572
|
"loading": "Загрузка"
|
|
@@ -438,6 +438,11 @@
|
|
|
438
438
|
"sortOrder": "Sıralama düzeni {position}",
|
|
439
439
|
"toolbar": "Tablo araç çubuğu"
|
|
440
440
|
},
|
|
441
|
+
"kanban": {
|
|
442
|
+
"cardCount": "{count} kart",
|
|
443
|
+
"cardCountWithLimit": "{count}/{limit} kart",
|
|
444
|
+
"emptyColumn": "Kart yok"
|
|
445
|
+
},
|
|
441
446
|
"label": {
|
|
442
447
|
"optional": "İsteğe bağlı"
|
|
443
448
|
},
|
|
@@ -553,6 +558,15 @@
|
|
|
553
558
|
"minimumValue": "Minimum değer",
|
|
554
559
|
"sliderValue": "Kaydırıcı değeri"
|
|
555
560
|
},
|
|
561
|
+
"sortable": {
|
|
562
|
+
"itemMoved": "{item}, {total} içinde {position}. konuma taşındı",
|
|
563
|
+
"itemMovedToList": "{item}, {list} listesine taşındı; {total} içinde {position}. konum"
|
|
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
|
+
},
|
|
556
570
|
"spinner": {
|
|
557
571
|
"cancel": "İptal",
|
|
558
572
|
"loading": "Yükleniyor"
|
|
@@ -438,6 +438,11 @@
|
|
|
438
438
|
"sortOrder": "排序顺序 {position}",
|
|
439
439
|
"toolbar": "表格工具栏"
|
|
440
440
|
},
|
|
441
|
+
"kanban": {
|
|
442
|
+
"cardCount": "{count} 张卡片",
|
|
443
|
+
"cardCountWithLimit": "{count}/{limit} 张卡片",
|
|
444
|
+
"emptyColumn": "暂无卡片"
|
|
445
|
+
},
|
|
441
446
|
"label": {
|
|
442
447
|
"optional": "可选"
|
|
443
448
|
},
|
|
@@ -553,6 +558,15 @@
|
|
|
553
558
|
"minimumValue": "最小值",
|
|
554
559
|
"sliderValue": "滑块数值"
|
|
555
560
|
},
|
|
561
|
+
"sortable": {
|
|
562
|
+
"itemMoved": "{item} 已移至第 {position} 位,共 {total} 位",
|
|
563
|
+
"itemMovedToList": "{item} 已移至{list},第 {position} 位,共 {total} 位"
|
|
564
|
+
},
|
|
565
|
+
"sparkline": {
|
|
566
|
+
"noData": "没有数据",
|
|
567
|
+
"summary": "{count} 个值,第一个 {first},最后一个 {last},最低 {min},最高 {max}",
|
|
568
|
+
"winLossSummary": "{wins} 胜,{losses} 负,{draws} 平"
|
|
569
|
+
},
|
|
556
570
|
"spinner": {
|
|
557
571
|
"cancel": "取消",
|
|
558
572
|
"loading": "加载中"
|
|
@@ -438,6 +438,11 @@
|
|
|
438
438
|
"sortOrder": "排序順序 {position}",
|
|
439
439
|
"toolbar": "表格工具列"
|
|
440
440
|
},
|
|
441
|
+
"kanban": {
|
|
442
|
+
"cardCount": "{count} 張卡片",
|
|
443
|
+
"cardCountWithLimit": "{count}/{limit} 張卡片",
|
|
444
|
+
"emptyColumn": "沒有卡片"
|
|
445
|
+
},
|
|
441
446
|
"label": {
|
|
442
447
|
"optional": "選填"
|
|
443
448
|
},
|
|
@@ -553,6 +558,15 @@
|
|
|
553
558
|
"minimumValue": "最小值",
|
|
554
559
|
"sliderValue": "滑桿數值"
|
|
555
560
|
},
|
|
561
|
+
"sortable": {
|
|
562
|
+
"itemMoved": "{item} 已移至第 {position} 位,共 {total} 位",
|
|
563
|
+
"itemMovedToList": "{item} 已移至{list},第 {position} 位,共 {total} 位"
|
|
564
|
+
},
|
|
565
|
+
"sparkline": {
|
|
566
|
+
"noData": "沒有資料",
|
|
567
|
+
"summary": "{count} 個值,第一個 {first},最後一個 {last},最低 {min},最高 {max}",
|
|
568
|
+
"winLossSummary": "{wins} 勝,{losses} 負,{draws} 和"
|
|
569
|
+
},
|
|
556
570
|
"spinner": {
|
|
557
571
|
"cancel": "取消",
|
|
558
572
|
"loading": "載入中"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nanahoshi/mona-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.42.0",
|
|
4
4
|
"description": "A very light Angular UI framework",
|
|
5
5
|
"author": "Nanahoshi",
|
|
6
6
|
"repository": {
|
|
@@ -202,6 +202,10 @@
|
|
|
202
202
|
"types": "./types/nanahoshi-mona-ui-internal-tree.d.ts",
|
|
203
203
|
"default": "./fesm2022/nanahoshi-mona-ui-internal-tree.mjs"
|
|
204
204
|
},
|
|
205
|
+
"./kanban": {
|
|
206
|
+
"types": "./types/nanahoshi-mona-ui-kanban.d.ts",
|
|
207
|
+
"default": "./fesm2022/nanahoshi-mona-ui-kanban.mjs"
|
|
208
|
+
},
|
|
205
209
|
"./label": {
|
|
206
210
|
"types": "./types/nanahoshi-mona-ui-label.d.ts",
|
|
207
211
|
"default": "./fesm2022/nanahoshi-mona-ui-label.mjs"
|
|
@@ -374,6 +378,14 @@
|
|
|
374
378
|
"types": "./types/nanahoshi-mona-ui-slider.d.ts",
|
|
375
379
|
"default": "./fesm2022/nanahoshi-mona-ui-slider.mjs"
|
|
376
380
|
},
|
|
381
|
+
"./sortable": {
|
|
382
|
+
"types": "./types/nanahoshi-mona-ui-sortable.d.ts",
|
|
383
|
+
"default": "./fesm2022/nanahoshi-mona-ui-sortable.mjs"
|
|
384
|
+
},
|
|
385
|
+
"./sparkline": {
|
|
386
|
+
"types": "./types/nanahoshi-mona-ui-sparkline.d.ts",
|
|
387
|
+
"default": "./fesm2022/nanahoshi-mona-ui-sparkline.mjs"
|
|
388
|
+
},
|
|
377
389
|
"./spinner": {
|
|
378
390
|
"types": "./types/nanahoshi-mona-ui-spinner.d.ts",
|
|
379
391
|
"default": "./fesm2022/nanahoshi-mona-ui-spinner.mjs"
|
|
@@ -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.
|
|
63
|
-
* sheet with Escape, or Tab for a
|
|
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
|
|
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 };
|
|
@@ -694,6 +694,14 @@ export interface MonaGridMessages {
|
|
|
694
694
|
/** The accessible name of the toolbar above the grid. */
|
|
695
695
|
readonly toolbar: string;
|
|
696
696
|
}
|
|
697
|
+
export interface MonaKanbanMessages {
|
|
698
|
+
/** How many cards a column holds, read after its title ("3 cards"). */
|
|
699
|
+
cardCount(count: number): string;
|
|
700
|
+
/** How many cards a column with a limit holds, read after its title ("3 of 5 cards"). */
|
|
701
|
+
cardCountWithLimit(count: number, limit: number): string;
|
|
702
|
+
/** Shown in a column with no cards. */
|
|
703
|
+
readonly emptyColumn: string;
|
|
704
|
+
}
|
|
697
705
|
export interface MonaLabelMessages {
|
|
698
706
|
readonly optional: string;
|
|
699
707
|
}
|
|
@@ -858,6 +866,26 @@ export interface MonaSliderMessages {
|
|
|
858
866
|
readonly minimumValue: string;
|
|
859
867
|
readonly sliderValue: string;
|
|
860
868
|
}
|
|
869
|
+
export interface MonaSortableMessages {
|
|
870
|
+
/** Announced after an item moves within its list, with its name and new position ("Draft moved to position 2 of 5"). */
|
|
871
|
+
itemMoved(item: string, position: number, total: number): string;
|
|
872
|
+
/**
|
|
873
|
+
* Announced after an item moves to another list, with its name, the list's name and its position there ("Draft moved
|
|
874
|
+
* to Done, position 1 of 3").
|
|
875
|
+
*/
|
|
876
|
+
itemMovedToList(item: string, list: string, position: number, total: number): string;
|
|
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
|
+
}
|
|
861
889
|
export interface MonaSpinnerMessages {
|
|
862
890
|
readonly cancel: string;
|
|
863
891
|
readonly loading: string;
|
|
@@ -1011,6 +1039,7 @@ export interface MonaLocaleMessages {
|
|
|
1011
1039
|
filter: MonaFilterMessages;
|
|
1012
1040
|
formField: MonaFormFieldMessages;
|
|
1013
1041
|
grid: MonaGridMessages;
|
|
1042
|
+
kanban: MonaKanbanMessages;
|
|
1014
1043
|
label: MonaLabelMessages;
|
|
1015
1044
|
list: MonaListMessages;
|
|
1016
1045
|
listBox: MonaListBoxMessages;
|
|
@@ -1028,6 +1057,8 @@ export interface MonaLocaleMessages {
|
|
|
1028
1057
|
sheet: MonaSheetMessages;
|
|
1029
1058
|
sidebar: MonaSidebarMessages;
|
|
1030
1059
|
slider: MonaSliderMessages;
|
|
1060
|
+
sortable: MonaSortableMessages;
|
|
1061
|
+
sparkline: MonaSparklineMessages;
|
|
1031
1062
|
spinner: MonaSpinnerMessages;
|
|
1032
1063
|
splitButton: MonaSplitButtonMessages;
|
|
1033
1064
|
splitter: MonaSplitterMessages;
|