@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
@@ -0,0 +1,75 @@
1
+ # `@nanahoshi/mona-ui/multi-select-tree`
2
+
3
+ Everything `@nanahoshi/mona-ui/multi-select-tree` exports.
4
+
5
+ **Guides:** [Multi Select Tree](../multi-select-tree.md)
6
+
7
+ ## `MultiSelectTreeComponent`
8
+
9
+ Component.
10
+
11
+ **Selector:** `mona-multi-select-tree`
12
+ **Type parameters:** `TData = unknown`, `TValue = TData`
13
+ **Implements:** `FormValueControl<Iterable<TValue>>`
14
+
15
+ ### Inputs
16
+
17
+ | Name | Type | Default | Description |
18
+ | --- | --- | --- | --- |
19
+ | `adaptiveMode` | `AdaptiveMode` | `"none"` | Opens the popup as a sheet along the bottom of the screen on a small screen (narrower than 640 pixels) with `"auto"`, so it's easy to reach with a thumb. With `"none"`, it always opens under the field. |
20
+ | `adaptiveTitle` | `string` | `""` | Title of the bottom sheet the popup opens as with `adaptiveMode="auto"`. When empty, the sheet shows the field's name. |
21
+ | `aria-describedby` | `string` | `""` | ID of an element that describes the multi-select tree, such as help text or an error message. |
22
+ | `aria-label` | `string` | `""` | Accessible name of the multi-select tree. Describe what it represents. Falls back to `placeholder` when neither this nor `aria-labelledby` is set. |
23
+ | `aria-labelledby` | `string` | `""` | ID of an external element that provides the accessible name of the multi-select tree. |
24
+ | `checkChildren` | `boolean` | `true` | Whether checking an item checks its children too, and unchecking it unchecks them. |
25
+ | `checkParents` | `boolean` | `true` | Whether an item is checked when all its children are, and unchecked when one of them isn't. An item with only some of its children checked shows a mixed checkbox. |
26
+ | `children` | `ChildrenSelector<TData>` | `""` | Property name or accessor that gives a node's children, for `mode="hierarchical"`. An accessor may return an observable, which loads the children when the node is first opened; set `hasChildren` with it. |
27
+ | `class` | `string` | `""` | Additional CSS classes merged onto the host element via `tailwind-merge`. |
28
+ | `data` | `Iterable<TData>` | `[]` | The items of the tree: its root items for `mode="hierarchical"`, or every item for `mode="flat"`. |
29
+ | `disabled` | `boolean` | `false` | Disables the component, preventing the popup from opening and blocking tag removal. |
30
+ | `hasChildren` | `Predicate<TData> \| null` | `null` | Whether an item has children, before they load. Needed when `children` returns an observable. |
31
+ | `idField` | `string` | `""` | Property name that holds an item's unique id, for `mode="flat"`. |
32
+ | `invalid` | `boolean` | `false` | Marks the multi-select tree as invalid. When bound to a signal form field via `[formField]`, this is written by the `FormField` directive. |
33
+ | `itemDisabled` | `DropdownFieldPredicateType<TData>` | `undefined` | Predicate or field name that tells whether an item is disabled. A disabled item can't be checked or opened, and neither can its children; checking its parent leaves it as it is. |
34
+ | `loading` | `boolean` | `false` | Shows a loading indicator, in place of the clear button, and marks the field busy. It doesn't block interaction: the field stays usable while data loads. |
35
+ | `mode` | `DataStructure` | `"hierarchical"` | Shape of `data`: `"hierarchical"` for items that hold their children (see `children`), or `"flat"` for one list linked by `idField` and `parentIdField`. |
36
+ | `parentIdField` | `string` | `""` | Property name that holds an item's parent id, for `mode="flat"`. Items without one are roots. |
37
+ | `placeholder` | `string` | `""` | Text shown when nothing is checked. It also names the multi-select tree when neither `aria-label` nor `aria-labelledby` is set. |
38
+ | `popupClass` | `string` | `""` | Additional CSS classes applied to the popup element. |
39
+ | `popupHeight` | `ListSizeInputType` | `null` | Maximum height of the popup, in pixels or as a CSS length. Shorter trees shrink to fit. When unset, the popup is at most 200 pixels tall. |
40
+ | `popupWidth` | `ListSizeInputType` | `null` | Width of the popup element. When unset, the popup is as wide as the field. |
41
+ | `readonly` | `boolean` | `false` | Prevents value changes while preserving the component's visual state. |
42
+ | `required` | `boolean` | `false` | Marks the field as required: at least one item has to be checked. |
43
+ | `rounded` | `"full" \| "large" \| "medium" \| "none" \| "small"` | `"medium"` | Border-radius preset applied to the component. |
44
+ | `showClearButton` | `boolean` | `false` | Shows a button that unchecks every item when at least one is checked. |
45
+ | `size` | `"large" \| "medium" \| "small"` | `"medium"` | Size preset controlling the component's dimensions. |
46
+ | `textField` | `DropdownFieldSelectorType<TData, string>` | `undefined` | Property name or accessor that gives an item's text. When unset, the item itself is the text. |
47
+ | `touched` | `boolean` | `false` | Marks the control as touched. Set automatically by the `FormField` directive when bound via `[formField]`. |
48
+ | `value` (two-way) | `Iterable<TValue>` | `[]` | The checked items, two-way bindable and compatible with Signal Forms via `[formField]`: the data items, or with `valuePrimitive`, the values `valueField` gives for them. A user's change lists them in the tree's order. Nothing checked is an empty array. |
49
+ | `valueField` | `DropdownFieldSelectorType<TData, unknown>` | `undefined` | Property name or accessor that gives an item's value: what identifies the item, matches the values set from code to their nodes, and is the value with `valuePrimitive`. When unset, the item itself is the value. It should be a stable, unique scalar. |
50
+ | `valuePrimitive` | `boolean` | `false` | Whether the value holds what `valueField` gives for the checked items (`true`), or the items themselves (`false`). |
51
+
52
+ ### Outputs
53
+
54
+ | Name | Type | Description |
55
+ | --- | --- | --- |
56
+ | `close` | `PopupCloseEvent<unknown>` | Emitted when the popup is about to close. This event is preventable. |
57
+ | `closed` | `void` | Emitted after the popup closes. |
58
+ | `open` | `PreventableEvent<Event>` | Emitted when the popup is about to open. This event is preventable. |
59
+ | `opened` | `void` | Emitted after the popup opens. |
60
+ | `touch` | `void` | Emitted when focus leaves the multi-select tree. Moving between it, its tags, its clear button and its popup doesn't count. The `FormField` directive listens to this to mark the field as touched. |
61
+ | `valueChange` | `Iterable<TValue>` | Emitted when `value` changes. |
62
+
63
+ ### Methods
64
+
65
+ | Signature | Description |
66
+ | --- | --- |
67
+ | `focus(options?: FocusOptions): void` | Moves focus to the multi-select tree. |
68
+
69
+ ## `MULTI_SELECT_TREE_DEFAULT_MESSAGES`
70
+
71
+ Constant.
72
+
73
+ ```typescript
74
+ const MULTI_SELECT_TREE_DEFAULT_MESSAGES: MonaMultiSelectTreeMessages;
75
+ ```
@@ -16,6 +16,8 @@ Component.
16
16
 
17
17
  | Name | Type | Default | Description |
18
18
  | --- | --- | --- | --- |
19
+ | `adaptiveMode` | `AdaptiveMode` | `"none"` | Opens the popup as a sheet along the bottom of the screen on a small screen (narrower than 640 pixels) with `"auto"`, so it's easy to reach with a thumb. With `"none"`, it always opens under the field. |
20
+ | `adaptiveTitle` | `string` | `""` | Title of the bottom sheet the popup opens as with `adaptiveMode="auto"`. When empty, the sheet shows the field's name. |
19
21
  | `allowCustomValue` | `boolean` | `false` | Lets people add values that aren't in `data`: Enter in the popup's filter box, on text that matches no item, emits `valueAdd` with the text, and an item whose text it matches is selected instead. Needs `monaDropDownFilterable`, whose filter box is where the text is typed. |
20
22
  | `aria-describedby` | `string` | `""` | ID of an element that describes the multi select, such as help text or an error message. |
21
23
  | `aria-label` | `string` | `""` | Accessible name for the multi select. Describe what it represents. Falls back to `placeholder` when neither this nor `aria-labelledby` is set. |
@@ -66,7 +68,7 @@ Component.
66
68
 
67
69
  Directive.
68
70
 
69
- **Selector:** `mona-multi-select[monaMultiSelectSummaryTag]`
71
+ **Selector:** `mona-multi-select[monaMultiSelectSummaryTag], mona-multi-select-tree[monaMultiSelectSummaryTag]`
70
72
 
71
73
  ### Inputs
72
74
 
package/docs/api/popup.md CHANGED
@@ -123,7 +123,7 @@ Class.
123
123
  | `isDefaultPrevented(): boolean` | Whether `preventDefault()` was called. |
124
124
  | `preventDefault(): void` | Cancels what the event announces, such as opening or closing a popup, or closing a dialog. |
125
125
 
126
- **Used by:** [`AutoCompleteComponent`](auto-complete.md#autocompletecomponent), [`ComboBoxComponent`](combo-box.md#comboboxcomponent), [`DatePickerComponent`](date-picker.md#datepickercomponent), [`DateRangePickerComponent`](date-range-picker.md#daterangepickercomponent), [`DateTimePickerComponent`](datetime-picker.md#datetimepickercomponent), [`DialogComponent`](dialog.md#dialogcomponent), [`DialogRef`](dialog.md#dialogref), [`DropdownListComponent`](dropdown-list.md#dropdownlistcomponent), [`MultiSelectComponent`](multi-select.md#multiselectcomponent), [`PopupComponent`](popup.md#popupcomponent), [`PopupRef`](popup.md#popupref), [`PopupSettings`](popup.md#popupsettings), [`SheetComponent`](sheet.md#sheetcomponent), [`TimePickerComponent`](time-picker.md#timepickercomponent), [`WindowComponent`](window.md#windowcomponent), [`WindowRef`](window.md#windowref), [`WindowSettings`](window.md#windowsettings)
126
+ **Used by:** [`AutoCompleteComponent`](auto-complete.md#autocompletecomponent), [`ComboBoxComponent`](combo-box.md#comboboxcomponent), [`DatePickerComponent`](date-picker.md#datepickercomponent), [`DateRangePickerComponent`](date-range-picker.md#daterangepickercomponent), [`DateTimePickerComponent`](datetime-picker.md#datetimepickercomponent), [`DialogComponent`](dialog.md#dialogcomponent), [`DialogRef`](dialog.md#dialogref), [`DropdownListComponent`](dropdown-list.md#dropdownlistcomponent), [`DropdownTreeComponent`](dropdown-tree.md#dropdowntreecomponent), [`MultiSelectComponent`](multi-select.md#multiselectcomponent), [`MultiSelectTreeComponent`](multi-select-tree.md#multiselecttreecomponent), [`PopupComponent`](popup.md#popupcomponent), [`PopupRef`](popup.md#popupref), [`PopupSettings`](popup.md#popupsettings), [`SheetComponent`](sheet.md#sheetcomponent), [`TimePickerComponent`](time-picker.md#timepickercomponent), [`WindowComponent`](window.md#windowcomponent), [`WindowRef`](window.md#windowref), [`WindowSettings`](window.md#windowsettings)
127
127
 
128
128
  ## `defaultPopupAnimation`
129
129
 
@@ -15,6 +15,8 @@ Component.
15
15
 
16
16
  | Name | Type | Default | Description |
17
17
  | --- | --- | --- | --- |
18
+ | `adaptiveMode` | `AdaptiveMode` | `"none"` | Opens the popup as a sheet along the bottom of the screen on a small screen (narrower than 640 pixels) with `"auto"`, so it's easy to reach with a thumb. With `"none"`, it always opens under the field. |
19
+ | `adaptiveTitle` | `string` | `""` | Title of the bottom sheet the popup opens as with `adaptiveMode="auto"`. When empty, the sheet shows the field's name. |
18
20
  | `aria-describedby` | `string` | `""` | Id of an element that describes the input, such as a hint or an error message. |
19
21
  | `aria-label` | `string` | `""` | Accessible name of the input. Prefer a visible label, linked through `inputId` or `aria-labelledby`; the placeholder is not a label. |
20
22
  | `aria-labelledby` | `string` | `""` | Id of the element that labels the input. |
@@ -578,7 +578,7 @@ Type alias.
578
578
  type ChildrenSelector<T> = string | Selector<T, Iterable<T> | Observable<Iterable<T>>>;
579
579
  ```
580
580
 
581
- **Used by:** [`TreeViewComponent`](tree-view.md#treeviewcomponent)
581
+ **Used by:** [`DropdownTreeComponent`](dropdown-tree.md#dropdowntreecomponent), [`MultiSelectTreeComponent`](multi-select-tree.md#multiselecttreecomponent), [`TreeViewComponent`](tree-view.md#treeviewcomponent)
582
582
 
583
583
  ## `DataStructure`
584
584
 
@@ -588,7 +588,7 @@ Type alias.
588
588
  type DataStructure = "flat" | "hierarchical";
589
589
  ```
590
590
 
591
- **Used by:** [`TreeViewComponent`](tree-view.md#treeviewcomponent)
591
+ **Used by:** [`DropdownTreeComponent`](dropdown-tree.md#dropdowntreecomponent), [`MultiSelectTreeComponent`](multi-select-tree.md#multiselecttreecomponent), [`TreeViewComponent`](tree-view.md#treeviewcomponent)
592
592
 
593
593
  ## `DropPosition`
594
594
 
@@ -426,6 +426,8 @@ From `@nanahoshi/mona-ui/dropdowns`:
426
426
  | [`DropdownDataInputToken`](api/dropdowns.md#dropdowndatainputtoken) | Constant | **Deprecated.** Use `DROPDOWN_DATA_INPUT_TOKEN`. |
427
427
  | [`DROPDOWNS_DEFAULT_MESSAGES`](api/dropdowns.md#dropdowns-default-messages) | Constant | |
428
428
  | [`DropdownDataInput`](api/dropdowns.md#dropdowndatainput) | Interface | |
429
+ | [`DropdownSheetData`](api/dropdowns.md#dropdownsheetdata) | Interface | What a dropdown passes to the bottom sheet its popup opens as. |
430
+ | [`AdaptiveMode`](api/dropdowns.md#adaptivemode) | Type alias | How a dropdown's popup adapts to a small screen: `"auto"` opens it as a sheet along the bottom of the screen when the screen is narrower than 640 pixels, and `"none"` always opens it under the field. |
429
431
  | [`DropdownFieldPredicateType`](api/dropdowns.md#dropdownfieldpredicatetype) | Type alias | |
430
432
  | [`DropdownFieldSelectorType`](api/dropdowns.md#dropdownfieldselectortype) | Type alias | |
431
433
 
package/docs/combo-box.md CHANGED
@@ -455,6 +455,8 @@ From `@nanahoshi/mona-ui/dropdowns`:
455
455
  | [`DropdownDataInputToken`](api/dropdowns.md#dropdowndatainputtoken) | Constant | **Deprecated.** Use `DROPDOWN_DATA_INPUT_TOKEN`. |
456
456
  | [`DROPDOWNS_DEFAULT_MESSAGES`](api/dropdowns.md#dropdowns-default-messages) | Constant | |
457
457
  | [`DropdownDataInput`](api/dropdowns.md#dropdowndatainput) | Interface | |
458
+ | [`DropdownSheetData`](api/dropdowns.md#dropdownsheetdata) | Interface | What a dropdown passes to the bottom sheet its popup opens as. |
459
+ | [`AdaptiveMode`](api/dropdowns.md#adaptivemode) | Type alias | How a dropdown's popup adapts to a small screen: `"auto"` opens it as a sheet along the bottom of the screen when the screen is narrower than 640 pixels, and `"none"` always opens it under the field. |
458
460
  | [`DropdownFieldPredicateType`](api/dropdowns.md#dropdownfieldpredicatetype) | Type alias | |
459
461
  | [`DropdownFieldSelectorType`](api/dropdowns.md#dropdownfieldselectortype) | Type alias | |
460
462
 
@@ -70,6 +70,10 @@ Typed text is written to `value` on `Enter` and when the input loses focus. Text
70
70
 
71
71
  Choosing a day in the calendar sets `value` and closes the popup. Days before `min`, after `max`, or in `disabledDates` can't be chosen. `disabledDates` takes an iterable of dates or a predicate.
72
72
 
73
+ ### On a phone
74
+
75
+ With `adaptiveMode="auto"`, on a screen narrower than 640 pixels, the calendar opens as a sheet along the bottom of the screen, over a dimmed page, as described for the [dropdown list](dropdown-list.md#the-bottom-sheet). The sheet has the field's name, or `adaptiveTitle`, and a close button. The calendar spans the sheet, and its days grow to as much as 44 pixels, to be easy to tap. It keeps the height of a six-week month, so its arrows stay put from month to month. Focus moves into the calendar, as it does in the popup under the field, and goes back to the input when the sheet closes. To see it, set `adaptiveMode` to `auto` in the playground and narrow the window.
76
+
73
77
  ### Disabled and read-only
74
78
 
75
79
  `disabled` and `readonly` keep the popup from opening. `readonlyInput` blocks typing but keeps the calendar button working, so the date can only be picked.
@@ -145,4 +149,4 @@ Everything below is imported from `@nanahoshi/mona-ui/date-picker`. Each name li
145
149
  | --- | --- |
146
150
  | [`DATE_PICKER_DEFAULT_MESSAGES`](api/date-picker.md#date-picker-default-messages) | Constant |
147
151
 
148
- **Related types:** [`DateDisabledType`](api/date-input.md#datedisabledtype), [`FirstDayOfWeek`](api/calendar.md#firstdayofweek), [`ListSizeInputType`](api/list.md#listsizeinputtype), [`ListSizeType`](api/list.md#listsizetype), [`MonaDatePickerMessages`](api/i18n.md#monadatepickermessages), [`PopupCloseEvent`](api/popup.md#popupcloseevent), [`PreventableEvent`](api/common.md#preventableevent)
152
+ **Related types:** [`AdaptiveMode`](api/dropdowns.md#adaptivemode), [`DateDisabledType`](api/date-input.md#datedisabledtype), [`FirstDayOfWeek`](api/calendar.md#firstdayofweek), [`ListSizeInputType`](api/list.md#listsizeinputtype), [`ListSizeType`](api/list.md#listsizetype), [`MonaDatePickerMessages`](api/i18n.md#monadatepickermessages), [`PopupCloseEvent`](api/popup.md#popupcloseevent), [`PreventableEvent`](api/common.md#preventableevent)
@@ -327,6 +327,10 @@ Picking a quick range writes it and closes the popup. A range is kept within `mi
327
327
 
328
328
  On a phone the quick ranges sit above the calendar, in rows.
329
329
 
330
+ ### On a phone
331
+
332
+ With `adaptiveMode="auto"`, on a screen narrower than 640 pixels, the popup opens as a sheet along the bottom of the screen, over a dimmed page, as described for the [dropdown list](dropdown-list.md#the-bottom-sheet). The sheet has the field's name, or `adaptiveTitle`, and a close button. The quick ranges sit above the calendar and are 44 pixels tall, the months are below each other, and their days grow to as much as 44 pixels, to be easy to tap. The sheet scrolls when the months are taller than it. Focus moves into the calendar, as it does in the popup under the field.
333
+
330
334
  ### Disabled and read-only
331
335
 
332
336
  `disabled` and `readonly` keep the popup from opening. `readonlyInput` blocks typing in both inputs but keeps the calendar button working, so the range can only be picked.
@@ -413,4 +417,4 @@ Everything below is imported from `@nanahoshi/mona-ui/date-range-picker`. Each n
413
417
  | [`DateRangePresetRange`](api/date-range-picker.md#daterangepresetrange) | Interface | The range a preset picks. |
414
418
  | [`DateRangePresetKey`](api/date-range-picker.md#daterangepresetkey) | Type alias | A built-in quick range, named by the locale's messages. |
415
419
 
416
- **Related types:** [`DateDisabledType`](api/date-input.md#datedisabledtype), [`FirstDayOfWeek`](api/calendar.md#firstdayofweek), [`ListSizeInputType`](api/list.md#listsizeinputtype), [`ListSizeType`](api/list.md#listsizetype), [`MonaDateRangePickerMessages`](api/i18n.md#monadaterangepickermessages), [`PopupCloseEvent`](api/popup.md#popupcloseevent), [`PreventableEvent`](api/common.md#preventableevent)
420
+ **Related types:** [`AdaptiveMode`](api/dropdowns.md#adaptivemode), [`DateDisabledType`](api/date-input.md#datedisabledtype), [`FirstDayOfWeek`](api/calendar.md#firstdayofweek), [`ListSizeInputType`](api/list.md#listsizeinputtype), [`ListSizeType`](api/list.md#listsizetype), [`MonaDateRangePickerMessages`](api/i18n.md#monadaterangepickermessages), [`PopupCloseEvent`](api/popup.md#popupcloseevent), [`PreventableEvent`](api/common.md#preventableevent)
@@ -75,6 +75,10 @@ The popup opens on the Date tab. Choosing a day keeps the time already chosen an
75
75
 
76
76
  A chosen date and time before `min` or after `max` is moved to that limit. On the day of `min` or `max`, the time lists are limited too. Each time the popup closes, it goes back to the Date tab and to the current value.
77
77
 
78
+ ### On a phone
79
+
80
+ With `adaptiveMode="auto"`, on a screen narrower than 640 pixels, the popup opens as a sheet along the bottom of the screen, over a dimmed page, as described for the [dropdown list](dropdown-list.md#the-bottom-sheet). The sheet has the field's name, or `adaptiveTitle`, and a close button. The calendar's days grow to as much as 44 pixels, and the time lists use the large size, to be easy to tap. The sheet keeps the height the Date tab opened with, so the tabs stay put when the Time tab shows. Focus moves into the popup, as it does under the field.
81
+
78
82
  ### Disabled and read-only
79
83
 
80
84
  `disabled` and `readonly` keep the popup from opening. `readonlyInput` blocks typing but keeps the popup button working, so the value can only be picked.
@@ -159,4 +163,4 @@ Everything below is imported from `@nanahoshi/mona-ui/datetime-picker`. Each nam
159
163
  | --- | --- |
160
164
  | [`DATETIME_PICKER_DEFAULT_MESSAGES`](api/datetime-picker.md#datetime-picker-default-messages) | Constant |
161
165
 
162
- **Related types:** [`DateDisabledType`](api/date-input.md#datedisabledtype), [`FirstDayOfWeek`](api/calendar.md#firstdayofweek), [`HourFormat`](api/date-input.md#hourformat), [`ListSizeInputType`](api/list.md#listsizeinputtype), [`ListSizeType`](api/list.md#listsizetype), [`MonaDateTimePickerMessages`](api/i18n.md#monadatetimepickermessages), [`PopupCloseEvent`](api/popup.md#popupcloseevent), [`PreventableEvent`](api/common.md#preventableevent)
166
+ **Related types:** [`AdaptiveMode`](api/dropdowns.md#adaptivemode), [`DateDisabledType`](api/date-input.md#datedisabledtype), [`FirstDayOfWeek`](api/calendar.md#firstdayofweek), [`HourFormat`](api/date-input.md#hourformat), [`ListSizeInputType`](api/list.md#listsizeinputtype), [`ListSizeType`](api/list.md#listsizetype), [`MonaDateTimePickerMessages`](api/i18n.md#monadatetimepickermessages), [`PopupCloseEvent`](api/popup.md#popupcloseevent), [`PreventableEvent`](api/common.md#preventableevent)
@@ -323,6 +323,52 @@ export class DropdownListFormsExampleComponent {
323
323
  </div>
324
324
  ```
325
325
 
326
+ ### A bottom sheet on a phone
327
+
328
+ With `adaptiveMode="auto"`, on a screen narrower than 640 pixels, the popup opens as a sheet along the bottom of the screen, where it's easy to reach with a thumb. Narrow the window to see it.
329
+
330
+ `adaptive-example.component.ts`
331
+
332
+ ```typescript
333
+ import { Component, signal } from "@angular/core";
334
+ import { DropdownListComponent } from "@nanahoshi/mona-ui/dropdown-list";
335
+ import { DropdownFilterableDirective } from "@nanahoshi/mona-ui/dropdowns";
336
+ import { FormFieldComponent } from "@nanahoshi/mona-ui/form-field";
337
+
338
+ @Component({
339
+ selector: "app-dropdown-list-adaptive-example",
340
+ imports: [DropdownFilterableDirective, DropdownListComponent, FormFieldComponent],
341
+ templateUrl: "./adaptive-example.component.html"
342
+ })
343
+ export class DropdownListAdaptiveExampleComponent {
344
+ protected readonly timeZone = signal<string | null>("Europe/Istanbul");
345
+ protected readonly timeZones = [
346
+ "America/New_York",
347
+ "America/Sao_Paulo",
348
+ "Asia/Seoul",
349
+ "Asia/Tokyo",
350
+ "Australia/Sydney",
351
+ "Europe/Berlin",
352
+ "Europe/Istanbul",
353
+ "Europe/London",
354
+ "Europe/Warsaw"
355
+ ];
356
+ }
357
+ ```
358
+
359
+ `adaptive-example.component.html`
360
+
361
+ ```html
362
+ <mona-form-field class="max-w-sm" label="Time zone" hint="On a phone, the list opens along the bottom of the screen.">
363
+ <mona-dropdown-list
364
+ adaptiveMode="auto"
365
+ class="w-full"
366
+ monaDropDownFilterable
367
+ [data]="timeZones"
368
+ [(value)]="timeZone" />
369
+ </mona-form-field>
370
+ ```
371
+
326
372
  ### Disabled, readonly, loading, and required states
327
373
 
328
374
  `disabled` renders the control with reduced visual emphasis and removes pointer interaction. `readonly` prevents value changes while preserving the visual state. `loading` shows a loading indicator in place of the clear button and marks the field busy. It doesn't block interaction: the field stays usable while data loads. `required` marks the field for form validation and affects the invalid state once the control is touched.
@@ -366,6 +412,10 @@ While the popup is open, arrow-key and typeahead navigation only stage a highlig
366
412
 
367
413
  `open` and `close` emit event objects with `preventDefault()` and `isDefaultPrevented()`. Calling `preventDefault()` in an `open` handler stops the popup from opening; calling it in a `close` handler stops the popup from closing. `close`'s event object also exposes `via`, describing what triggered the close attempt (for example `"escape"` or `"outsideClick"`).
368
414
 
415
+ ### The bottom sheet
416
+
417
+ With `adaptiveMode="auto"`, the popup opens as a bottom sheet when the screen is narrower than 640 pixels as it opens; it doesn't switch while open. The sheet covers the page with a dimmed backdrop, which closes it when pressed, and has a header with the field's name (or `adaptiveTitle`) and a close button. Its options are 44 pixels tall, to be easy to tap. Focus stays where it is, as with the popup under the field: on the field, or in the filter box. While an on-screen keyboard is open, the sheet sits above it. Without `adaptiveMode`, or with `"none"`, the popup always opens under the field.
418
+
369
419
  ### Click-to-toggle
370
420
 
371
421
  Clicking anywhere on the host element, outside the clear button, toggles the popup — in addition to the keyboard interactions documented under [Keyboard](#keyboard).
@@ -470,6 +520,8 @@ From `@nanahoshi/mona-ui/dropdowns`:
470
520
  | [`DropdownDataInputToken`](api/dropdowns.md#dropdowndatainputtoken) | Constant | **Deprecated.** Use `DROPDOWN_DATA_INPUT_TOKEN`. |
471
521
  | [`DROPDOWNS_DEFAULT_MESSAGES`](api/dropdowns.md#dropdowns-default-messages) | Constant | |
472
522
  | [`DropdownDataInput`](api/dropdowns.md#dropdowndatainput) | Interface | |
523
+ | [`DropdownSheetData`](api/dropdowns.md#dropdownsheetdata) | Interface | What a dropdown passes to the bottom sheet its popup opens as. |
524
+ | [`AdaptiveMode`](api/dropdowns.md#adaptivemode) | Type alias | How a dropdown's popup adapts to a small screen: `"auto"` opens it as a sheet along the bottom of the screen when the screen is narrower than 640 pixels, and `"none"` always opens it under the field. |
473
525
  | [`DropdownFieldPredicateType`](api/dropdowns.md#dropdownfieldpredicatetype) | Type alias | |
474
526
  | [`DropdownFieldSelectorType`](api/dropdowns.md#dropdownfieldselectortype) | Type alias | |
475
527