@nanahoshi/mona-ui 0.34.0 → 0.36.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/alert/package.json +4 -0
- package/badge/package.json +4 -0
- package/docs/alert.md +219 -0
- package/docs/api/alert.md +78 -0
- package/docs/api/avatar.md +25 -0
- package/docs/api/badge.md +24 -0
- package/docs/api/common.md +3 -3
- package/docs/api/i18n.md +71 -5
- package/docs/api/locales.md +14 -14
- package/docs/api/masked-text-box.md +137 -0
- package/docs/api/multi-select.md +3 -0
- package/docs/api/separator.md +23 -0
- package/docs/api/toolbar.md +81 -0
- package/docs/avatar.md +108 -6
- package/docs/badge.md +181 -0
- package/docs/masked-textbox.md +334 -0
- package/docs/multi-select.md +120 -0
- package/docs/separator.md +147 -0
- package/docs/sidebar-menus.md +1 -1
- package/docs/toolbar.md +327 -0
- package/fesm2022/nanahoshi-mona-ui-alert.mjs +422 -0
- package/fesm2022/nanahoshi-mona-ui-avatar.mjs +182 -3
- package/fesm2022/nanahoshi-mona-ui-badge.mjs +273 -0
- package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +20 -1
- package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +54 -15
- package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +13 -1
- package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +13 -1
- package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +13 -1
- package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +13 -1
- package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +13 -1
- package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +13 -1
- package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +13 -1
- package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +13 -1
- package/fesm2022/nanahoshi-mona-ui-locales-pl-pl.mjs +13 -1
- package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +13 -1
- package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +13 -1
- package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +13 -1
- package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +13 -1
- package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +13 -1
- package/fesm2022/nanahoshi-mona-ui-masked-text-box.mjs +1302 -0
- package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +112 -3
- package/fesm2022/nanahoshi-mona-ui-separator.mjs +165 -0
- package/fesm2022/nanahoshi-mona-ui-sidebar.mjs +3 -3
- package/fesm2022/nanahoshi-mona-ui-toolbar.mjs +536 -0
- package/i18n/catalogs/en-US.messages.json +19 -1
- package/llms.txt +13 -3
- package/locales/ar-sa/ar-sa.messages.json +19 -1
- package/locales/de-de/de-de.messages.json +19 -1
- package/locales/es-es/es-es.messages.json +19 -1
- package/locales/fr-fr/fr-fr.messages.json +19 -1
- package/locales/id-id/id-id.messages.json +19 -1
- package/locales/it-it/it-it.messages.json +19 -1
- package/locales/ja-jp/ja-jp.messages.json +19 -1
- package/locales/ko-kr/ko-kr.messages.json +19 -1
- package/locales/pl-pl/pl-pl.messages.json +19 -1
- package/locales/pt-br/pt-br.messages.json +19 -1
- package/locales/ru-ru/ru-ru.messages.json +19 -1
- package/locales/tr-tr/tr-tr.messages.json +19 -1
- package/locales/zh-cn/zh-cn.messages.json +19 -1
- package/locales/zh-tw/zh-tw.messages.json +19 -1
- package/masked-text-box/package.json +4 -0
- package/package.json +21 -1
- package/separator/package.json +4 -0
- package/toolbar/package.json +4 -0
- package/types/nanahoshi-mona-ui-alert.d.ts +144 -0
- package/types/nanahoshi-mona-ui-avatar.d.ts +66 -0
- package/types/nanahoshi-mona-ui-badge.d.ts +82 -0
- package/types/nanahoshi-mona-ui-i18n.d.ts +44 -0
- package/types/nanahoshi-mona-ui-internal-list.d.ts +12 -0
- package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +18 -0
- package/types/nanahoshi-mona-ui-locales-de-de.d.ts +18 -0
- package/types/nanahoshi-mona-ui-locales-es-es.d.ts +18 -0
- package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +18 -0
- package/types/nanahoshi-mona-ui-locales-id-id.d.ts +18 -0
- package/types/nanahoshi-mona-ui-locales-it-it.d.ts +18 -0
- package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +18 -0
- package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +18 -0
- package/types/nanahoshi-mona-ui-locales-pl-pl.d.ts +18 -0
- package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +18 -0
- package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +18 -0
- package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +18 -0
- package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +18 -0
- package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +18 -0
- package/types/nanahoshi-mona-ui-masked-text-box.d.ts +391 -0
- package/types/nanahoshi-mona-ui-multi-select.d.ts +38 -0
- package/types/nanahoshi-mona-ui-separator.d.ts +66 -0
- package/types/nanahoshi-mona-ui-toolbar.d.ts +183 -0
package/docs/toolbar.md
ADDED
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
# Toolbar
|
|
2
|
+
|
|
3
|
+
> A row of controls that is one Tab stop, moving what doesn't fit into a More menu.
|
|
4
|
+
|
|
5
|
+
Entry point: `@nanahoshi/mona-ui/toolbar`
|
|
6
|
+
|
|
7
|
+
**Selectors:** `mona-toolbar`, `[monaToolbarItem]`
|
|
8
|
+
|
|
9
|
+
`ToolbarComponent` groups a row of controls, such as formatting buttons, into one Tab stop that the arrow keys move through. Items marked `monaToolbarItem` that don't fit move into a More menu at the end of the row, and come back as it widens.
|
|
10
|
+
|
|
11
|
+
## Overview
|
|
12
|
+
|
|
13
|
+
Use a toolbar for a set of controls that act on the same thing, such as the text in an editor or the rows of a table. Grouping them saves keyboard users a Tab press per control: Tab enters and leaves the toolbar, and the arrow keys move inside it.
|
|
14
|
+
|
|
15
|
+
**Use a toolbar when you need to:**
|
|
16
|
+
|
|
17
|
+
- Offer formatting or editing commands above a document or an editor
|
|
18
|
+
- Put actions for a table or a selection in one row
|
|
19
|
+
- Keep a row of commands usable at every width, by moving what doesn't fit into a menu
|
|
20
|
+
|
|
21
|
+
**Use something else when:**
|
|
22
|
+
|
|
23
|
+
- The controls choose one value: use a [Segmented](segmented.md) control or radio buttons
|
|
24
|
+
- The buttons are one control with a shared look: use a [Button Group](button-group.md), which can sit inside a toolbar
|
|
25
|
+
- The row navigates between pages: use links, or the [Menubar](menubar.md) for an application menu
|
|
26
|
+
|
|
27
|
+
## Import & Quick Start
|
|
28
|
+
|
|
29
|
+
```typescript
|
|
30
|
+
import { ToolbarComponent, ToolbarItemDirective } from "@nanahoshi/mona-ui/toolbar";
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
```html
|
|
34
|
+
<mona-toolbar aria-label="Formatting">
|
|
35
|
+
<button monaButton monaToolbarItem type="button" aria-label="Bold" [iconOnly]="true" [toggleable]="true">
|
|
36
|
+
<svg lucideBold [size]="16"></svg>
|
|
37
|
+
</button>
|
|
38
|
+
<button monaButton monaToolbarItem type="button">Insert table</button>
|
|
39
|
+
</mona-toolbar>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Anatomy
|
|
43
|
+
|
|
44
|
+
| Part | What it is |
|
|
45
|
+
|------|------------|
|
|
46
|
+
| `mona-toolbar` | The row, with `role="toolbar"` and one Tab stop over every control in it |
|
|
47
|
+
| `monaToolbarItem` | Marks a control directly inside the toolbar as one that can move into the More menu |
|
|
48
|
+
| More button | Appears at the end when items are hidden, and opens a menu of them |
|
|
49
|
+
| `mona-separator` | Divides groups of controls. Marked `monaToolbarItem`, it moves with them and becomes a divider in the menu |
|
|
50
|
+
|
|
51
|
+
A control without `monaToolbarItem` always stays in the row, and still joins the Tab stop and the arrow keys.
|
|
52
|
+
|
|
53
|
+
## Examples
|
|
54
|
+
|
|
55
|
+
### Formatting toolbar
|
|
56
|
+
|
|
57
|
+
Drag the box's corner to narrow it. Items move into the More menu from the end, and a divider that would be left at the end goes with them. In the menu, Bold and the other toggles are checkbox items that show whether they're on, and choosing one clicks its button, so the button's own handlers run.
|
|
58
|
+
|
|
59
|
+
`editor-example.component.ts`
|
|
60
|
+
|
|
61
|
+
```typescript
|
|
62
|
+
import { Component, signal } from "@angular/core";
|
|
63
|
+
import {
|
|
64
|
+
LucideBold,
|
|
65
|
+
LucideItalic,
|
|
66
|
+
LucideLink,
|
|
67
|
+
LucideRedo2,
|
|
68
|
+
LucideRemoveFormatting,
|
|
69
|
+
LucideStrikethrough,
|
|
70
|
+
LucideUnderline,
|
|
71
|
+
LucideUndo2
|
|
72
|
+
} from "@lucide/angular";
|
|
73
|
+
import { ButtonDirective } from "@nanahoshi/mona-ui/button";
|
|
74
|
+
import { SeparatorComponent } from "@nanahoshi/mona-ui/separator";
|
|
75
|
+
import { ToolbarComponent, ToolbarItemDirective } from "@nanahoshi/mona-ui/toolbar";
|
|
76
|
+
|
|
77
|
+
@Component({
|
|
78
|
+
selector: "app-toolbar-editor-example",
|
|
79
|
+
imports: [
|
|
80
|
+
ButtonDirective,
|
|
81
|
+
LucideBold,
|
|
82
|
+
LucideItalic,
|
|
83
|
+
LucideLink,
|
|
84
|
+
LucideRedo2,
|
|
85
|
+
LucideRemoveFormatting,
|
|
86
|
+
LucideStrikethrough,
|
|
87
|
+
LucideUnderline,
|
|
88
|
+
LucideUndo2,
|
|
89
|
+
SeparatorComponent,
|
|
90
|
+
ToolbarComponent,
|
|
91
|
+
ToolbarItemDirective
|
|
92
|
+
],
|
|
93
|
+
templateUrl: "./editor-example.component.html"
|
|
94
|
+
})
|
|
95
|
+
export class ToolbarEditorExampleComponent {
|
|
96
|
+
protected readonly bold = signal(false);
|
|
97
|
+
protected readonly italic = signal(false);
|
|
98
|
+
protected readonly lastAction = signal("");
|
|
99
|
+
protected readonly strikethrough = signal(false);
|
|
100
|
+
protected readonly underline = signal(false);
|
|
101
|
+
|
|
102
|
+
protected clearFormatting(): void {
|
|
103
|
+
this.bold.set(false);
|
|
104
|
+
this.italic.set(false);
|
|
105
|
+
this.strikethrough.set(false);
|
|
106
|
+
this.underline.set(false);
|
|
107
|
+
this.lastAction.set("Formatting cleared.");
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
`editor-example.component.html`
|
|
113
|
+
|
|
114
|
+
```html
|
|
115
|
+
<div class="flex flex-col gap-3">
|
|
116
|
+
<div class="w-[28rem] min-w-24 max-w-full resize-x overflow-hidden rounded-md border border-border p-1">
|
|
117
|
+
<mona-toolbar aria-label="Formatting" size="small">
|
|
118
|
+
<button
|
|
119
|
+
monaButton
|
|
120
|
+
monaToolbarItem
|
|
121
|
+
type="button"
|
|
122
|
+
size="small"
|
|
123
|
+
look="ghost"
|
|
124
|
+
aria-label="Undo"
|
|
125
|
+
[iconOnly]="true"
|
|
126
|
+
(click)="lastAction.set('Undone.')">
|
|
127
|
+
<svg lucideUndo2 [size]="16"></svg>
|
|
128
|
+
</button>
|
|
129
|
+
<button
|
|
130
|
+
monaButton
|
|
131
|
+
monaToolbarItem
|
|
132
|
+
type="button"
|
|
133
|
+
size="small"
|
|
134
|
+
look="ghost"
|
|
135
|
+
aria-label="Redo"
|
|
136
|
+
[iconOnly]="true"
|
|
137
|
+
(click)="lastAction.set('Redone.')">
|
|
138
|
+
<svg lucideRedo2 [size]="16"></svg>
|
|
139
|
+
</button>
|
|
140
|
+
<mona-separator monaToolbarItem orientation="vertical" class="h-5" />
|
|
141
|
+
<button
|
|
142
|
+
monaButton
|
|
143
|
+
monaToolbarItem
|
|
144
|
+
type="button"
|
|
145
|
+
size="small"
|
|
146
|
+
look="ghost"
|
|
147
|
+
aria-label="Bold"
|
|
148
|
+
[iconOnly]="true"
|
|
149
|
+
[toggleable]="true"
|
|
150
|
+
[(selected)]="bold">
|
|
151
|
+
<svg lucideBold [size]="16"></svg>
|
|
152
|
+
</button>
|
|
153
|
+
<button
|
|
154
|
+
monaButton
|
|
155
|
+
monaToolbarItem
|
|
156
|
+
type="button"
|
|
157
|
+
size="small"
|
|
158
|
+
look="ghost"
|
|
159
|
+
aria-label="Italic"
|
|
160
|
+
[iconOnly]="true"
|
|
161
|
+
[toggleable]="true"
|
|
162
|
+
[(selected)]="italic">
|
|
163
|
+
<svg lucideItalic [size]="16"></svg>
|
|
164
|
+
</button>
|
|
165
|
+
<button
|
|
166
|
+
monaButton
|
|
167
|
+
monaToolbarItem
|
|
168
|
+
type="button"
|
|
169
|
+
size="small"
|
|
170
|
+
look="ghost"
|
|
171
|
+
aria-label="Underline"
|
|
172
|
+
[iconOnly]="true"
|
|
173
|
+
[toggleable]="true"
|
|
174
|
+
[(selected)]="underline">
|
|
175
|
+
<svg lucideUnderline [size]="16"></svg>
|
|
176
|
+
</button>
|
|
177
|
+
<button
|
|
178
|
+
monaButton
|
|
179
|
+
monaToolbarItem
|
|
180
|
+
type="button"
|
|
181
|
+
size="small"
|
|
182
|
+
look="ghost"
|
|
183
|
+
aria-label="Strikethrough"
|
|
184
|
+
[iconOnly]="true"
|
|
185
|
+
[toggleable]="true"
|
|
186
|
+
[(selected)]="strikethrough">
|
|
187
|
+
<svg lucideStrikethrough [size]="16"></svg>
|
|
188
|
+
</button>
|
|
189
|
+
<mona-separator monaToolbarItem orientation="vertical" class="h-5" />
|
|
190
|
+
<button
|
|
191
|
+
monaButton
|
|
192
|
+
monaToolbarItem
|
|
193
|
+
type="button"
|
|
194
|
+
size="small"
|
|
195
|
+
look="ghost"
|
|
196
|
+
overflowText="Insert link…"
|
|
197
|
+
(click)="lastAction.set('Link dialog opened.')">
|
|
198
|
+
<svg lucideLink [size]="16"></svg>
|
|
199
|
+
Link
|
|
200
|
+
</button>
|
|
201
|
+
<button monaButton monaToolbarItem type="button" size="small" look="ghost" (click)="clearFormatting()">
|
|
202
|
+
<svg lucideRemoveFormatting [size]="16"></svg>
|
|
203
|
+
Clear formatting
|
|
204
|
+
</button>
|
|
205
|
+
</mona-toolbar>
|
|
206
|
+
</div>
|
|
207
|
+
<p class="text-sm">
|
|
208
|
+
Bold {{ bold() ? "on" : "off" }}, italic {{ italic() ? "on" : "off" }}, underline
|
|
209
|
+
{{ underline() ? "on" : "off" }}, strikethrough {{ strikethrough() ? "on" : "off" }}. {{ lastAction() }}
|
|
210
|
+
</p>
|
|
211
|
+
</div>
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
### Wrapping instead
|
|
215
|
+
|
|
216
|
+
With `overflow="wrap"`, the controls flow onto more rows and nothing is hidden, which suits a few filters that should all stay visible. The search box sits outside the toolbar, since a text field keeps its arrow keys.
|
|
217
|
+
|
|
218
|
+
`wrap-example.component.ts`
|
|
219
|
+
|
|
220
|
+
```typescript
|
|
221
|
+
import { Component, signal } from "@angular/core";
|
|
222
|
+
import { ButtonDirective } from "@nanahoshi/mona-ui/button";
|
|
223
|
+
import { TextBoxDirective } from "@nanahoshi/mona-ui/text-box";
|
|
224
|
+
import { ToolbarComponent } from "@nanahoshi/mona-ui/toolbar";
|
|
225
|
+
|
|
226
|
+
@Component({
|
|
227
|
+
selector: "app-toolbar-wrap-example",
|
|
228
|
+
imports: [ButtonDirective, TextBoxDirective, ToolbarComponent],
|
|
229
|
+
templateUrl: "./wrap-example.component.html"
|
|
230
|
+
})
|
|
231
|
+
export class ToolbarWrapExampleComponent {
|
|
232
|
+
protected readonly filters = ["Open", "Assigned to me", "Due this week", "High priority"] as const;
|
|
233
|
+
protected readonly selected = signal<ReadonlySet<string>>(new Set(["Open"]));
|
|
234
|
+
|
|
235
|
+
protected toggle(filter: string, on: boolean): void {
|
|
236
|
+
this.selected.update(selected => {
|
|
237
|
+
const next = new Set(selected);
|
|
238
|
+
if (on) {
|
|
239
|
+
next.add(filter);
|
|
240
|
+
} else {
|
|
241
|
+
next.delete(filter);
|
|
242
|
+
}
|
|
243
|
+
return next;
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
`wrap-example.component.html`
|
|
250
|
+
|
|
251
|
+
```html
|
|
252
|
+
<div class="flex max-w-md flex-col gap-3">
|
|
253
|
+
<input monaTextBox type="search" aria-label="Search tasks" placeholder="Search tasks" />
|
|
254
|
+
<mona-toolbar aria-label="Task filters" overflow="wrap" class="gap-2">
|
|
255
|
+
@for (filter of filters; track filter) {
|
|
256
|
+
<button
|
|
257
|
+
monaButton
|
|
258
|
+
type="button"
|
|
259
|
+
size="small"
|
|
260
|
+
look="outline"
|
|
261
|
+
[toggleable]="true"
|
|
262
|
+
[selected]="selected().has(filter)"
|
|
263
|
+
(selectedChange)="toggle(filter, $event)">
|
|
264
|
+
{{ filter }}
|
|
265
|
+
</button>
|
|
266
|
+
}
|
|
267
|
+
</mona-toolbar>
|
|
268
|
+
<p class="text-sm">{{ selected().size }} filters on.</p>
|
|
269
|
+
</div>
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
## Appearance & Styling
|
|
273
|
+
|
|
274
|
+
The toolbar is a flex row as wide as its container, with no border or background of its own. Add them with `class`, which is merged through `tailwind-merge`. `size` sets the gap between controls (`small` 2px, `medium` 4px, `large` 6px) and the More button's size; match it to the controls' size.
|
|
275
|
+
|
|
276
|
+
Controls keep their width rather than shrinking. Use `class="ms-auto"` on a control to push it, and those after it, to the end of the row.
|
|
277
|
+
|
|
278
|
+
## Behavior
|
|
279
|
+
|
|
280
|
+
### What moves into the menu
|
|
281
|
+
|
|
282
|
+
When the row is too narrow, the `monaToolbarItem`s move into the menu from the last one back, until the rest fit beside the More button. Items come back as the row widens. The toolbar measures again whenever it or one of its items changes size.
|
|
283
|
+
|
|
284
|
+
- `monaToolbarItem="never"` keeps a control in the row, such as a search box or a control a menu item can't stand in for.
|
|
285
|
+
- In the menu, an item takes its text from `overflowText`, then the control's `aria-label`, then its text. It's disabled while the control is disabled, and it's a checkbox item, checked while the control's `aria-pressed` is `true`.
|
|
286
|
+
- Choosing an item emits the item's `overflowActivate`, then clicks the control unless the event is prevented. A button needs nothing more. For a control a click doesn't operate, handle `overflowActivate`, or keep it in the row.
|
|
287
|
+
- The menu is read from the hidden controls each time it opens, so their text and states are current.
|
|
288
|
+
|
|
289
|
+
If focus is on a control as it moves into the menu, focus moves to the More button.
|
|
290
|
+
|
|
291
|
+
### Wrapping
|
|
292
|
+
|
|
293
|
+
`overflow="wrap"` lets the row wrap, shows no More button and hides nothing.
|
|
294
|
+
|
|
295
|
+
## Accessibility
|
|
296
|
+
|
|
297
|
+
The toolbar has `role="toolbar"` and needs a name, from `aria-label` or `aria-labelledby`, which assistive technology reads on the way in. It warns in development without one.
|
|
298
|
+
|
|
299
|
+
| Key | Action |
|
|
300
|
+
|-----|--------|
|
|
301
|
+
| `Tab` | Moves into the toolbar, to the control last focused in it, and out of it |
|
|
302
|
+
| `ArrowRight` / `ArrowLeft` | Moves to the next or previous control, wrapping at the ends (mirrored in right-to-left layouts) |
|
|
303
|
+
| `Home` / `End` | Moves to the first or last control |
|
|
304
|
+
| `Enter`, `Space` | Activates the focused control; on the More button, opens the menu |
|
|
305
|
+
|
|
306
|
+
Disabled and hidden controls are skipped. A text field, slider or other control that uses Left and Right itself keeps those keys, so put it last in the toolbar, or outside it, and keyboard users can still reach every control.
|
|
307
|
+
|
|
308
|
+
The More button is named "More" in the current locale (`moreLabel` replaces it), has `aria-haspopup="menu"`, and says whether its menu is open with `aria-expanded`. The menu is named by the button and returns focus to it when it closes.
|
|
309
|
+
|
|
310
|
+
## API
|
|
311
|
+
|
|
312
|
+
Everything below is imported from `@nanahoshi/mona-ui/toolbar`. Each name links to its reference page, with every input, output, property and method.
|
|
313
|
+
|
|
314
|
+
| Name | Kind | Description |
|
|
315
|
+
| --- | --- | --- |
|
|
316
|
+
| [`ToolbarComponent`](api/toolbar.md#toolbarcomponent) | Component | A row of controls, such as formatting buttons, that's one Tab stop: the arrow keys move between its controls. |
|
|
317
|
+
| [`ToolbarItemDirective`](api/toolbar.md#toolbaritemdirective) | Directive | Marks a control directly inside `<mona-toolbar>` as one that moves into the toolbar's More menu when there's no room for it, last ones first. |
|
|
318
|
+
|
|
319
|
+
### Types
|
|
320
|
+
|
|
321
|
+
| Type | Kind | Description |
|
|
322
|
+
| --- | --- | --- |
|
|
323
|
+
| [`TOOLBAR_DEFAULT_MESSAGES`](api/toolbar.md#toolbar-default-messages) | Constant | |
|
|
324
|
+
| [`ToolbarItemOverflow`](api/toolbar.md#toolbaritemoverflow) | Type alias | Whether a toolbar item moves into the More menu when there's no room for it (`auto`) or stays (`never`). |
|
|
325
|
+
| [`ToolbarOverflow`](api/toolbar.md#toolbaroverflow) | Type alias | What a toolbar does with items that don't fit: moves them into a More menu, or wraps them onto more rows. |
|
|
326
|
+
|
|
327
|
+
**Related types:** [`ClassInputType`](api/common.md#classinputtype), [`MonaToolbarMessages`](api/i18n.md#monatoolbarmessages), [`PreventableEvent`](api/common.md#preventableevent)
|