@nanahoshi/mona-ui 0.37.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 (103) hide show
  1. package/docs/api/common.md +1 -1
  2. package/docs/api/date-picker.md +2 -0
  3. package/docs/api/date-range-picker.md +2 -0
  4. package/docs/api/datetime-picker.md +2 -0
  5. package/docs/api/dropdown-list.md +2 -0
  6. package/docs/api/dropdown-tree.md +81 -0
  7. package/docs/api/dropdowns.md +34 -8
  8. package/docs/api/i18n.md +33 -4
  9. package/docs/api/list.md +1 -1
  10. package/docs/api/locales.md +14 -14
  11. package/docs/api/multi-select-tree.md +75 -0
  12. package/docs/api/multi-select.md +3 -1
  13. package/docs/api/popup.md +1 -1
  14. package/docs/api/time-picker.md +2 -0
  15. package/docs/api/tree-view.md +2 -2
  16. package/docs/auto-complete.md +2 -0
  17. package/docs/combo-box.md +2 -0
  18. package/docs/date-picker.md +5 -1
  19. package/docs/date-range-picker.md +5 -1
  20. package/docs/datetime-picker.md +5 -1
  21. package/docs/dropdown-list.md +52 -0
  22. package/docs/dropdown-tree.md +427 -0
  23. package/docs/multi-select-tree.md +353 -0
  24. package/docs/multi-select.md +6 -0
  25. package/docs/time-picker.md +5 -1
  26. package/dropdown-tree/package.json +4 -0
  27. package/fesm2022/nanahoshi-mona-ui-calendar.mjs +2 -2
  28. package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +36 -2
  29. package/fesm2022/nanahoshi-mona-ui-date-range-picker.mjs +37 -3
  30. package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +52 -5
  31. package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +40 -5
  32. package/fesm2022/nanahoshi-mona-ui-dropdown-tree.mjs +1061 -0
  33. package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +730 -60
  34. package/fesm2022/nanahoshi-mona-ui-editor.mjs +8 -2
  35. package/fesm2022/nanahoshi-mona-ui-filter.mjs +4 -0
  36. package/fesm2022/{nanahoshi-mona-ui-grid-grid-list.component-S2iCn8TV.mjs → nanahoshi-mona-ui-grid-grid-list.component-BoSXXLKQ.mjs} +2 -2
  37. package/fesm2022/{nanahoshi-mona-ui-grid-grid-row.component-BUJvgihp.mjs → nanahoshi-mona-ui-grid-grid-row.component-Df2gfS0X.mjs} +3 -1
  38. 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
  39. package/fesm2022/nanahoshi-mona-ui-grid.mjs +8 -4
  40. package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +13 -0
  41. package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +80 -37
  42. package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +7 -0
  43. package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +7 -0
  44. package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +7 -0
  45. package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +7 -0
  46. package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +7 -0
  47. package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +7 -0
  48. package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +7 -0
  49. package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +7 -0
  50. package/fesm2022/nanahoshi-mona-ui-locales-pl-pl.mjs +17 -0
  51. package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +7 -0
  52. package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +17 -0
  53. package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +7 -0
  54. package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +7 -0
  55. package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +7 -0
  56. package/fesm2022/nanahoshi-mona-ui-multi-select-tree.mjs +1179 -0
  57. package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +42 -7
  58. package/fesm2022/nanahoshi-mona-ui-pager.mjs +3 -1
  59. package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +39 -4
  60. package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +2 -1
  61. package/i18n/catalogs/en-US.messages.json +9 -0
  62. package/llms.txt +6 -2
  63. package/locales/ar-sa/ar-sa.messages.json +9 -0
  64. package/locales/de-de/de-de.messages.json +9 -0
  65. package/locales/es-es/es-es.messages.json +9 -0
  66. package/locales/fr-fr/fr-fr.messages.json +9 -0
  67. package/locales/id-id/id-id.messages.json +9 -0
  68. package/locales/it-it/it-it.messages.json +9 -0
  69. package/locales/ja-jp/ja-jp.messages.json +9 -0
  70. package/locales/ko-kr/ko-kr.messages.json +9 -0
  71. package/locales/pl-pl/pl-pl.messages.json +9 -0
  72. package/locales/pt-br/pt-br.messages.json +9 -0
  73. package/locales/ru-ru/ru-ru.messages.json +9 -0
  74. package/locales/tr-tr/tr-tr.messages.json +9 -0
  75. package/locales/zh-cn/zh-cn.messages.json +9 -0
  76. package/locales/zh-tw/zh-tw.messages.json +9 -0
  77. package/multi-select-tree/package.json +4 -0
  78. package/package.json +9 -1
  79. package/types/nanahoshi-mona-ui-date-picker.d.ts +25 -1
  80. package/types/nanahoshi-mona-ui-date-range-picker.d.ts +26 -1
  81. package/types/nanahoshi-mona-ui-datetime-picker.d.ts +34 -1
  82. package/types/nanahoshi-mona-ui-dropdown-list.d.ts +33 -5
  83. package/types/nanahoshi-mona-ui-dropdown-tree.d.ts +414 -0
  84. package/types/nanahoshi-mona-ui-dropdowns.d.ts +218 -9
  85. package/types/nanahoshi-mona-ui-i18n.d.ts +12 -0
  86. package/types/nanahoshi-mona-ui-internal-tree.d.ts +36 -0
  87. package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +9 -0
  88. package/types/nanahoshi-mona-ui-locales-de-de.d.ts +9 -0
  89. package/types/nanahoshi-mona-ui-locales-es-es.d.ts +9 -0
  90. package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +9 -0
  91. package/types/nanahoshi-mona-ui-locales-id-id.d.ts +9 -0
  92. package/types/nanahoshi-mona-ui-locales-it-it.d.ts +9 -0
  93. package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +9 -0
  94. package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +9 -0
  95. package/types/nanahoshi-mona-ui-locales-pl-pl.d.ts +9 -0
  96. package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +9 -0
  97. package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +9 -0
  98. package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +9 -0
  99. package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +9 -0
  100. package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +9 -0
  101. package/types/nanahoshi-mona-ui-multi-select-tree.d.ts +456 -0
  102. package/types/nanahoshi-mona-ui-multi-select.d.ts +43 -7
  103. package/types/nanahoshi-mona-ui-time-picker.d.ts +29 -2
@@ -3,24 +3,28 @@ 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 } from "@nanahoshi/mona-ui/internal/list";
8
8
  import { PopupCloseEvent } from "@nanahoshi/mona-ui/popup";
9
9
  import { VariantInputs } from "@nanahoshi/mona-ui/internal";
10
10
  import { VariantProps } from "class-variance-authority";
11
11
  import { MonaMultiSelectMessages } from "@nanahoshi/mona-ui/i18n";
12
- declare const multiSelectBaseThemeVariants: (props?: ({
12
+ /** @hidden Shared with the multi-select tree, which looks the same. */
13
+ export declare const multiSelectBaseThemeVariants: (props?: ({
13
14
  disabled?: boolean | null | undefined;
14
15
  focused?: boolean | null | undefined;
15
16
  invalid?: boolean | null | undefined;
16
17
  rounded?: "none" | "small" | "medium" | "large" | "full" | null | undefined;
17
18
  size?: "small" | "medium" | "large" | null | undefined;
18
19
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
19
- declare const multiSelectItemContainerThemeVariants: (props?: ({
20
+ /** @hidden Shared with the multi-select tree, which looks the same. */
21
+ export declare const multiSelectItemContainerThemeVariants: (props?: ({
20
22
  rounded?: "none" | "small" | "medium" | "large" | "full" | null | undefined;
21
23
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
22
- declare const multiSelectAffixContainerThemeVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
23
- declare const multiSelectIndicatorContainerThemeVariants: (props?: ({
24
+ /** @hidden Shared with the multi-select tree, which looks the same. */
25
+ export declare const multiSelectAffixContainerThemeVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
26
+ /** @hidden Shared with the multi-select tree, which looks the same. */
27
+ export declare const multiSelectIndicatorContainerThemeVariants: (props?: ({
24
28
  size?: "small" | "medium" | "large" | null | undefined;
25
29
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
26
30
  type MultiSelectBaseVariantProps = VariantProps<typeof multiSelectBaseThemeVariants>;
@@ -54,17 +58,32 @@ export declare class MultiSelectComponent<TData = unknown, TValue = TData> imple
54
58
  protected readonly labelledBy: import("@angular/core").Signal<string | null>;
55
59
  protected readonly listId: string;
56
60
  protected readonly listPopupClass: import("@angular/core").Signal<string>;
61
+ /** The list's size: large in a bottom sheet, for touch. */
62
+ protected readonly listSize: import("@angular/core").Signal<"small" | "medium" | "large" | null | undefined>;
57
63
  protected readonly messages: import("@angular/core").Signal<import("@nanahoshi/mona-ui/i18n").MonaMultiSelectMessages>;
58
64
  protected readonly noDataTemplate: import("@angular/core").Signal<TemplateRef<any> | undefined>;
59
65
  protected readonly popupTemplate: import("@angular/core").Signal<TemplateRef<unknown>>;
60
66
  protected readonly prefixTemplate: import("@angular/core").Signal<TemplateRef<any> | undefined>;
61
67
  protected readonly selectedDataItems: import("@angular/core").Signal<import("@mirei/ts-collections").ImmutableSet<TData>>;
62
68
  protected readonly selectedListItems: import("@angular/core").Signal<import("@mirei/ts-collections").ImmutableSet<ListItem<TData>>>;
69
+ protected readonly sheet: import("@angular/core").Signal<boolean>;
63
70
  protected readonly summaryTagTemplate: import("@angular/core").Signal<TemplateRef<unknown> | null>;
64
71
  protected readonly tagCount: import("@angular/core").Signal<number>;
65
72
  protected readonly tagTemplate: import("@angular/core").Signal<TemplateRef<any> | undefined>;
66
73
  protected readonly valueTextMap: import("@angular/core").Signal<import("@mirei/ts-collections").ImmutableDictionary<ListItem<TData>, string>>;
67
74
  protected readonly visibleTagCount: import("@angular/core").Signal<number>;
75
+ /**
76
+ * @description Opens the popup as a sheet along the bottom of the screen on a small screen (narrower than 640
77
+ * pixels) with `"auto"`, so it's easy to reach with a thumb. With `"none"`, it always opens under the field.
78
+ * @default "none"
79
+ */
80
+ readonly adaptiveMode: import("@angular/core").InputSignal<AdaptiveMode>;
81
+ /**
82
+ * @description Title of the bottom sheet the popup opens as with `adaptiveMode="auto"`. When empty, the sheet
83
+ * shows the field's name.
84
+ * @default ""
85
+ */
86
+ readonly adaptiveTitle: import("@angular/core").InputSignal<string>;
68
87
  /**
69
88
  * @description Lets people add values that aren't in {@link data}: Enter in the popup's filter box, on text that
70
89
  * matches no item, emits {@link valueAdd} with the text, and an item whose text it matches is selected instead.
@@ -285,6 +304,16 @@ export declare class MultiSelectComponent<TData = unknown, TValue = TData> imple
285
304
  private warnIfCustomValueHasNoFilter;
286
305
  static ɵfac: i0.ɵɵFactoryDeclaration<MultiSelectComponent<any, any>, never>;
287
306
  static ɵcmp: i0.ɵɵComponentDeclaration<MultiSelectComponent<any, any>, "mona-multi-select", never, {
307
+ "adaptiveMode": {
308
+ "alias": "adaptiveMode";
309
+ "required": false;
310
+ "isSignal": true;
311
+ };
312
+ "adaptiveTitle": {
313
+ "alias": "adaptiveTitle";
314
+ "required": false;
315
+ "isSignal": true;
316
+ };
288
317
  "allowCustomValue": {
289
318
  "alias": "allowCustomValue";
290
319
  "required": false;
@@ -453,7 +482,7 @@ export declare class MultiSelectSummaryTagDirective {
453
482
  readonly tagCount: import("@angular/core").InputSignal<number>;
454
483
  constructor();
455
484
  static ɵfac: i0.ɵɵFactoryDeclaration<MultiSelectSummaryTagDirective, never>;
456
- static ɵdir: i0.ɵɵDirectiveDeclaration<MultiSelectSummaryTagDirective, "mona-multi-select[monaMultiSelectSummaryTag]", never, {
485
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MultiSelectSummaryTagDirective, "mona-multi-select[monaMultiSelectSummaryTag], mona-multi-select-tree[monaMultiSelectSummaryTag]", never, {
457
486
  "tagCount": {
458
487
  "alias": "monaMultiSelectSummaryTag";
459
488
  "required": false;
@@ -470,4 +499,11 @@ export declare class MultiSelectTagTemplateDirective {
470
499
  static ɵdir: i0.ɵɵDirectiveDeclaration<MultiSelectTagTemplateDirective, "ng-template[monaMultiSelectTagTemplate]", never, {}, {}, never, never, true, never>;
471
500
  }
472
501
  export declare const MULTI_SELECT_DEFAULT_MESSAGES: MonaMultiSelectMessages;
473
- export type { MultiSelectVariantProps };
502
+ /** @hidden The summary tag settings a multi-select or multi-select tree shares with its directives. */
503
+ export declare class MultiSelectService {
504
+ readonly summaryTagTemplate: import("@angular/core").WritableSignal<TemplateRef<unknown> | null>;
505
+ readonly tagCount: import("@angular/core").WritableSignal<number>;
506
+ static ɵfac: i0.ɵɵFactoryDeclaration<MultiSelectService, never>;
507
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
508
+ }
509
+ export type { MultiSelectVariantInput, MultiSelectVariantProps };
@@ -3,11 +3,12 @@ import { Signal, TemplateRef } from "@angular/core";
3
3
  import { FormValueControl } from "@angular/forms/signals";
4
4
  import { PreventableEvent } from "@nanahoshi/mona-ui/common";
5
5
  import { HourFormat, TypedDateInput } from "@nanahoshi/mona-ui/date-input";
6
+ import * as i1 from "@nanahoshi/mona-ui/dropdowns";
7
+ import { AdaptiveMode, DropdownPopupInput } from "@nanahoshi/mona-ui/dropdowns";
6
8
  import { AttributeConfig, VariantInputs } from "@nanahoshi/mona-ui/internal";
7
9
  import { ListSizeInputType } from "@nanahoshi/mona-ui/internal/list";
8
10
  import { PopupCloseEvent } from "@nanahoshi/mona-ui/popup";
9
11
  import { VariantProps } from "class-variance-authority";
10
- import * as i1 from "@nanahoshi/mona-ui/dropdowns";
11
12
  import { MonaTimePickerMessages } from "@nanahoshi/mona-ui/i18n";
12
13
  declare const timePickerBaseThemeVariants: (props?: ({
13
14
  focused?: boolean | null | undefined;
@@ -18,7 +19,7 @@ type TimePickerBaseVariantProps = VariantProps<typeof timePickerBaseThemeVariant
18
19
  type TimePickerBaseVariantInput = VariantInputs<TimePickerBaseVariantProps>;
19
20
  export type TimePickerVariantProps = TimePickerBaseVariantProps;
20
21
  type TimePickerVariantInput = Omit<TimePickerBaseVariantInput, "focused">;
21
- export declare class TimePickerComponent implements FormValueControl<Date | null>, TimePickerVariantInput {
22
+ export declare class TimePickerComponent implements FormValueControl<Date | null>, DropdownPopupInput, TimePickerVariantInput {
22
23
  #private;
23
24
  protected readonly baseClass: Signal<string>;
24
25
  protected readonly describedBy: Signal<string | null>;
@@ -32,9 +33,25 @@ export declare class TimePickerComponent implements FormValueControl<Date | null
32
33
  protected readonly messages: Signal<import("@nanahoshi/mona-ui/i18n").MonaTimePickerMessages>;
33
34
  protected readonly pickerPopupClass: Signal<string>;
34
35
  protected readonly popupId: string;
36
+ /** Whether the popup is open as a bottom sheet, which the popup fills. */
37
+ protected readonly sheet: Signal<boolean>;
35
38
  protected readonly timePopupTemplateRef: Signal<TemplateRef<unknown>>;
39
+ /** The time selector's size: large in a bottom sheet, for touch. */
40
+ protected readonly timeSelectorSize: Signal<"large" | "medium" | "small" | null | undefined>;
36
41
  /** Set in the constructor, which runs after the `value` model it writes to exists. */
37
42
  protected readonly typedInput: TypedDateInput;
43
+ /**
44
+ * @description Opens the popup as a sheet along the bottom of the screen on a small screen (narrower than 640
45
+ * pixels) with `"auto"`, so it's easy to reach with a thumb. With `"none"`, it always opens under the field.
46
+ * @default "none"
47
+ */
48
+ readonly adaptiveMode: import("@angular/core").InputSignal<AdaptiveMode>;
49
+ /**
50
+ * @description Title of the bottom sheet the popup opens as with `adaptiveMode="auto"`. When empty, the sheet
51
+ * shows the field's name.
52
+ * @default ""
53
+ */
54
+ readonly adaptiveTitle: import("@angular/core").InputSignal<string>;
38
55
  /**
39
56
  * @description Id of an element that describes the input, such as a hint or an error message.
40
57
  * @default ""
@@ -212,6 +229,16 @@ export declare class TimePickerComponent implements FormValueControl<Date | null
212
229
  private setPopupCloseSubscription;
213
230
  static ɵfac: i0.ɵɵFactoryDeclaration<TimePickerComponent, never>;
214
231
  static ɵcmp: i0.ɵɵComponentDeclaration<TimePickerComponent, "mona-time-picker", never, {
232
+ "adaptiveMode": {
233
+ "alias": "adaptiveMode";
234
+ "required": false;
235
+ "isSignal": true;
236
+ };
237
+ "adaptiveTitle": {
238
+ "alias": "adaptiveTitle";
239
+ "required": false;
240
+ "isSignal": true;
241
+ };
215
242
  "ariaDescribedBy": {
216
243
  "alias": "aria-describedby";
217
244
  "required": false;