@nanahoshi/mona-ui 0.27.1 → 0.27.2
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 +67 -0
- package/docs/api/avatar.md +31 -0
- package/docs/api/breadcrumb.md +74 -0
- package/docs/api/button-group.md +71 -0
- package/docs/api/button.md +84 -0
- package/docs/api/calendar.md +123 -0
- package/docs/api/card.md +97 -0
- package/docs/api/chart.md +4380 -0
- package/docs/api/check-box.md +70 -0
- package/docs/api/chip.md +55 -0
- package/docs/api/circular-progress-bar.md +71 -0
- package/docs/api/collapsible.md +71 -0
- package/docs/api/color-gradient.md +54 -0
- package/docs/api/color-palette.md +52 -0
- package/docs/api/color-picker.md +89 -0
- package/docs/api/combo-box.md +69 -0
- package/docs/api/command.md +282 -0
- package/docs/api/common.md +599 -0
- package/docs/api/contextmenu.md +239 -0
- package/docs/api/date-input.md +119 -0
- package/docs/api/date-picker.md +67 -0
- package/docs/api/datetime-picker.md +72 -0
- package/docs/api/dialog.md +291 -0
- package/docs/api/dropdown-button.md +248 -0
- package/docs/api/dropdown-list.md +72 -0
- package/docs/api/dropdowns.md +172 -0
- package/docs/api/editor.md +117 -0
- package/docs/api/expansion-panel.md +85 -0
- package/docs/api/fieldset.md +33 -0
- package/docs/api/filter.md +116 -0
- package/docs/api/grid.md +1445 -0
- package/docs/api/i18n.md +1699 -0
- package/docs/api/label.md +58 -0
- package/docs/api/list-box.md +301 -0
- package/docs/api/list-view.md +294 -0
- package/docs/api/list.md +119 -0
- package/docs/api/locales.md +134 -0
- package/docs/api/menubar.md +275 -0
- package/docs/api/multi-select.md +92 -0
- package/docs/api/notification.md +164 -0
- package/docs/api/numeric-text-box.md +130 -0
- package/docs/api/otp-input.md +100 -0
- package/docs/api/pager.md +371 -0
- package/docs/api/placeholder.md +18 -0
- package/docs/api/popover.md +170 -0
- package/docs/api/popup-menu.md +328 -0
- package/docs/api/popup.md +299 -0
- package/docs/api/progress-bar.md +79 -0
- package/docs/api/query.md +367 -0
- package/docs/api/radio-button.md +113 -0
- package/docs/api/rating.md +187 -0
- package/docs/api/scroll-view.md +93 -0
- package/docs/api/segmented.md +114 -0
- package/docs/api/sheet.md +65 -0
- package/docs/api/sidebar.md +583 -0
- package/docs/api/skeleton.md +26 -0
- package/docs/api/slider.md +173 -0
- package/docs/api/spinner.md +132 -0
- package/docs/api/split-button.md +261 -0
- package/docs/api/splitter.md +57 -0
- package/docs/api/stepper.md +148 -0
- package/docs/api/switch.md +78 -0
- package/docs/api/tabs.md +139 -0
- package/docs/api/text-area.md +20 -0
- package/docs/api/text-box.md +106 -0
- package/docs/api/theme.md +627 -0
- package/docs/api/time-picker.md +69 -0
- package/docs/api/time-selector.md +54 -0
- package/docs/api/tooltip.md +112 -0
- package/docs/api/tree-view.md +631 -0
- package/docs/api/window.md +245 -0
- package/docs/auto-complete.md +28 -329
- package/docs/avatar.md +4 -24
- package/docs/breadcrumb.md +10 -65
- package/docs/button-group.md +7 -60
- package/docs/button.md +8 -67
- package/docs/calendar.md +16 -121
- package/docs/card.md +16 -79
- package/docs/chart-bar.md +16 -234
- package/docs/chart-financial.md +10 -121
- package/docs/chart-funnel.md +13 -176
- package/docs/chart-heatmap.md +15 -131
- package/docs/chart-line-area.md +12 -137
- package/docs/chart-pie.md +17 -221
- package/docs/chart-radar.md +13 -129
- package/docs/chart-radial.md +13 -211
- package/docs/chart-scatter.md +6 -74
- package/docs/chart-treemap.md +14 -196
- package/docs/chart.md +154 -1892
- package/docs/checkbox.md +5 -61
- package/docs/chip.md +7 -42
- package/docs/circular-progress-bar.md +9 -61
- package/docs/collapsible.md +5 -87
- package/docs/color-gradient.md +8 -81
- package/docs/color-palette.md +7 -69
- package/docs/color-picker.md +9 -105
- package/docs/combo-box.md +28 -331
- package/docs/command.md +25 -236
- package/docs/contextmenu.md +15 -140
- package/docs/date-picker.md +7 -110
- package/docs/datetime-picker.md +7 -129
- package/docs/decimal-textbox.md +6 -69
- package/docs/dialog.md +23 -263
- package/docs/dropdown-button.md +15 -146
- package/docs/dropdown-list.md +29 -332
- package/docs/editor.md +8 -164
- package/docs/expansion-panel.md +7 -69
- package/docs/fieldset.md +5 -24
- package/docs/grid-columns.md +12 -92
- package/docs/grid-editing.md +29 -291
- package/docs/grid-grouping.md +11 -50
- package/docs/grid-rows.md +10 -74
- package/docs/grid-selection.md +7 -36
- package/docs/grid-server.md +8 -293
- package/docs/grid-sorting-filtering.md +10 -333
- package/docs/grid-state-export.md +17 -228
- package/docs/grid.md +23 -216
- package/docs/input.md +7 -19
- package/docs/label.md +8 -39
- package/docs/list-box.md +21 -253
- package/docs/list-view.md +25 -232
- package/docs/menubar.md +21 -167
- package/docs/multi-select.md +31 -350
- package/docs/notification.md +17 -116
- package/docs/numeric-textbox.md +9 -78
- package/docs/otp-input.md +9 -95
- package/docs/pager.md +19 -239
- package/docs/placeholder.md +5 -18
- package/docs/popover.md +13 -123
- package/docs/popup-menu.md +22 -243
- package/docs/popup.md +24 -248
- package/docs/progress-bar.md +10 -75
- package/docs/radio-button.md +8 -96
- package/docs/range-slider.md +9 -82
- package/docs/rating.md +15 -163
- package/docs/scroll-view.md +9 -86
- package/docs/segmented.md +8 -90
- package/docs/sheet.md +10 -74
- package/docs/sidebar-menus.md +20 -155
- package/docs/sidebar-state.md +16 -134
- package/docs/sidebar.md +18 -218
- package/docs/skeleton.md +5 -26
- package/docs/slider.md +9 -97
- package/docs/spinner.md +15 -95
- package/docs/split-button.md +21 -166
- package/docs/splitter.md +9 -56
- package/docs/stepper.md +13 -127
- package/docs/switch.md +8 -58
- package/docs/tabs.md +13 -111
- package/docs/textarea.md +4 -13
- package/docs/textbox.md +10 -77
- package/docs/time-picker.md +7 -112
- package/docs/tooltip-directive.md +12 -96
- package/docs/tooltip.md +12 -96
- package/docs/tree-view.md +42 -495
- package/docs/window.md +19 -230
- package/fesm2022/nanahoshi-mona-ui-collapsible.mjs +1 -0
- package/fesm2022/nanahoshi-mona-ui-common.mjs +3 -0
- package/fesm2022/nanahoshi-mona-ui-date-input.mjs +13 -1
- package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +5 -0
- package/fesm2022/nanahoshi-mona-ui-i18n.mjs +9 -0
- package/llms.txt +74 -0
- package/package.json +1 -1
- package/types/nanahoshi-mona-ui-collapsible.d.ts +2 -0
- package/types/nanahoshi-mona-ui-common.d.ts +6 -0
- package/types/nanahoshi-mona-ui-date-input.d.ts +18 -1
- package/types/nanahoshi-mona-ui-dropdowns.d.ts +6 -0
- package/types/nanahoshi-mona-ui-i18n.d.ts +12 -0
package/docs/multi-select.md
CHANGED
|
@@ -400,366 +400,47 @@ The control also renders a visually hidden live region that announces the highli
|
|
|
400
400
|
|
|
401
401
|
## API
|
|
402
402
|
|
|
403
|
-
Everything below is imported from `@nanahoshi/mona-ui/multi-select`,
|
|
404
|
-
|
|
405
|
-
### `MultiSelectComponent`
|
|
406
|
-
|
|
407
|
-
**Selector:** `mona-multi-select`
|
|
408
|
-
**Type parameters:** `TData = unknown`, `TValue = TData`
|
|
409
|
-
**Implements:** `FormValueControl<Iterable<TValue>>`
|
|
410
|
-
|
|
411
|
-
#### Inputs
|
|
412
|
-
|
|
413
|
-
| Name | Type | Default | Description |
|
|
414
|
-
| --- | --- | --- | --- |
|
|
415
|
-
| `aria-describedby` | `string` | `""` | ID of an element that describes the multi select, such as help text or an error message. |
|
|
416
|
-
| `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. |
|
|
417
|
-
| `aria-labelledby` | `string` | `""` | Sets the aria-labelledby attribute of the multi select component. |
|
|
418
|
-
| `autoClose` | `boolean` | `false` | Closes the popup automatically after an item is selected or deselected. |
|
|
419
|
-
| `checkboxes` | `boolean` | `false` | Renders a checkbox next to each item in the popup list to indicate its selected state. |
|
|
420
|
-
| `class` | `string` | `""` | Additional CSS classes merged onto the host element via `tailwind-merge`. |
|
|
421
|
-
| `data` | `Iterable<TData>` | `[]` | Collection of items rendered in the popup list. |
|
|
422
|
-
| `disabled` | `boolean` | `false` | Disables the component, preventing the popup from opening and blocking tag removal. |
|
|
423
|
-
| `invalid` | `boolean` | `false` | Marks the multi select as invalid. When bound to a signal form field via `[formField]`, this is written by the `FormField` directive. |
|
|
424
|
-
| `itemDisabled` | `DropdownFieldPredicateType<TData>` | — | A predicate function or the name of the field that determines whether an item is disabled. |
|
|
425
|
-
| `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. |
|
|
426
|
-
| `placeholder` | `string` | `""` | Text shown when nothing is selected. It also names the multi select when neither `aria-label` nor `aria-labelledby` is set. |
|
|
427
|
-
| `popupClass` | `string` | `""` | Sets the class of the popup element. |
|
|
428
|
-
| `popupHeight` | `ListSizeInputType` | `null` | Maximum height of the popup, in pixels or as a CSS length. Shorter lists shrink to fit. When unset, the popup is at most 200 pixels tall. |
|
|
429
|
-
| `popupWidth` | `ListSizeInputType` | `null` | Sets the width of the popup element. |
|
|
430
|
-
| `readonly` | `boolean` | `false` | Sets the readonly state of the multi select component. |
|
|
431
|
-
| `required` | `boolean` | `false` | Sets the required state of the multi select component. |
|
|
432
|
-
| `rounded` | `"full" \| "large" \| "medium" \| "none" \| "small"` | `"medium"` | Sets the border radius of the multi select component. |
|
|
433
|
-
| `showClearButton` | `boolean` | `false` | Renders a button that clears all selected items when at least one item is selected. |
|
|
434
|
-
| `size` | `"large" \| "medium" \| "small"` | `"medium"` | The size of the multi select component. |
|
|
435
|
-
| `textField` | `DropdownFieldSelectorType<TData, string>` | `null` | Sets the text field of the multi select component. It can be null, string, or a function that takes an item and returns a string. If null, the item itself will be used as the text representation. |
|
|
436
|
-
| `touched` | `boolean` | `false` | Sets the touched state of the multi select. When bound to a signal form field via `[formField]`, this is written by the `FormField` directive. |
|
|
437
|
-
| `value` (two-way) | `Iterable<TValue>` | `[]` | Two-way bindable current selected values. Implements `FormValueControl<Iterable<TValue>>`, enabling signal forms `[formField]` binding. Object mode contains selected data items; primitive mode (see `valuePrimitive`) contains values resolved through `valueField`. An empty selection is represented by an empty iterable/array. |
|
|
438
|
-
| `valueField` | `DropdownFieldSelectorType<TData, unknown>` | `null` | Sets the value field of the multi select component. It is used for stable item identity, matching externally supplied values, and primitive value projection when `valuePrimitive` is enabled. It can be null, string, or a function that takes an item and returns a value. If null, the item itself will be used as the value representation. Should resolve to a stable, unique scalar. |
|
|
439
|
-
| `valuePrimitive` | `boolean` | `false` | Determines whether the bound value contains complete data items or values extracted through `valueField`. When `false`, selecting an item writes the complete data item. When `true`, selecting an item writes the value resolved through `valueField`. |
|
|
440
|
-
|
|
441
|
-
#### Outputs
|
|
442
|
-
|
|
443
|
-
| Name | Type | Description |
|
|
444
|
-
| --- | --- | --- |
|
|
445
|
-
| `close` | `PopupCloseEvent<unknown>` | Emits when the popup is about to close. This event is preventable. |
|
|
446
|
-
| `closed` | `void` | Emits after the popup is closed. |
|
|
447
|
-
| `open` | `PreventableEvent<Event>` | Emits when the popup is about to open. This event is preventable. |
|
|
448
|
-
| `opened` | `void` | Emits after the popup is opened. |
|
|
449
|
-
| `touch` | `void` | Emitted when focus leaves the multi select. Moving between it, its chips, its clear button and its popup doesn't count. The `FormField` directive listens to this to mark the field as touched. |
|
|
450
|
-
| `valueChange` | `Iterable<TValue>` | Emitted when `value` changes. |
|
|
451
|
-
|
|
452
|
-
#### Methods
|
|
403
|
+
Everything below is imported from `@nanahoshi/mona-ui/multi-select`, unless a table names another entry point. Each name links to its reference page, with every input, output, property and method.
|
|
453
404
|
|
|
454
|
-
|
|
|
405
|
+
| Name | Kind |
|
|
455
406
|
| --- | --- |
|
|
456
|
-
| `
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
From `@nanahoshi/mona-ui/dropdowns`.
|
|
461
|
-
|
|
462
|
-
**Selector:** `mona-auto-complete[monaDropDownFilterable], mona-dropdown-list[monaDropDownFilterable], mona-combo-box[monaDropDownFilterable], mona-multi-select[monaDropDownFilterable]`
|
|
463
|
-
|
|
464
|
-
#### Inputs
|
|
465
|
-
|
|
466
|
-
| Name | Type | Default | Description |
|
|
467
|
-
| --- | --- | --- | --- |
|
|
468
|
-
| `filter` | `string` | `""` | Current filter text used to narrow the visible options. |
|
|
469
|
-
| `filterPlaceholder` | `string` | `""` | Placeholder text in the popup's filter row. Auto Complete has no filter row, since its own input is the filter, so it ignores this. |
|
|
470
|
-
| `monaDropDownFilterable` | `Partial<FilterableOptions> \| ""` | `""` | Filter operator, case sensitivity, and debounce delay. An empty string enables filtering with default settings (`operator: "contains"`, `caseSensitive: false`, `debounce: 0`); pass an object to override any field. |
|
|
471
|
-
|
|
472
|
-
#### Outputs
|
|
473
|
-
|
|
474
|
-
| Name | Type | Description |
|
|
475
|
-
| --- | --- | --- |
|
|
476
|
-
| `filterChange` | `FilterChangeEvent` | Emitted when the filter value changes. Cancelable. |
|
|
477
|
-
|
|
478
|
-
### `DropdownGroupableDirective`
|
|
479
|
-
|
|
480
|
-
From `@nanahoshi/mona-ui/dropdowns`.
|
|
481
|
-
|
|
482
|
-
**Selector:** `mona-auto-complete[monaDropDownGroupable], mona-combo-box[monaDropDownGroupable], mona-dropdown-list[monaDropDownGroupable], mona-multi-select[monaDropDownGroupable]`
|
|
483
|
-
**Type parameters:** `TData`
|
|
484
|
-
|
|
485
|
-
#### Inputs
|
|
486
|
-
|
|
487
|
-
| Name | Type | Default | Description |
|
|
488
|
-
| --- | --- | --- | --- |
|
|
489
|
-
| `groupBy` | `string \| Selector<TData, unknown> \| null \| undefined` | `""` | Property name, or accessor, used to derive an option's group. |
|
|
490
|
-
| `monaDropDownGroupable` | `GroupableOptions<TData, unknown> \| ""` | `""` | Group header order, and optional per-group item ordering. An empty string enables grouping with default settings (`headerOrder: "asc"`); pass an object to override any field. |
|
|
491
|
-
|
|
492
|
-
### `DropdownVirtualScrollDirective`
|
|
493
|
-
|
|
494
|
-
From `@nanahoshi/mona-ui/dropdowns`.
|
|
495
|
-
|
|
496
|
-
**Selector:** `mona-auto-complete[monaDropDownVirtualScroll], mona-dropdown-list[monaDropDownVirtualScroll], mona-combo-box[monaDropDownVirtualScroll], mona-multi-select[monaDropDownVirtualScroll]`
|
|
497
|
-
|
|
498
|
-
#### Inputs
|
|
499
|
-
|
|
500
|
-
| Name | Type | Default | Description |
|
|
501
|
-
| --- | --- | --- | --- |
|
|
502
|
-
| `monaDropDownVirtualScroll` | `Partial<VirtualScrollOptions> \| ""` | `""` | Whether virtual scrolling is enabled and the pixel height of a single option row. An empty string enables virtual scrolling with default settings (`height: 28`); pass an object to override either field. |
|
|
503
|
-
|
|
504
|
-
### `MultiSelectSummaryTagDirective`
|
|
505
|
-
|
|
506
|
-
**Selector:** `mona-multi-select[monaMultiSelectSummaryTag]`
|
|
507
|
-
|
|
508
|
-
#### Inputs
|
|
509
|
-
|
|
510
|
-
| Name | Type | Default | Description |
|
|
511
|
-
| --- | --- | --- | --- |
|
|
512
|
-
| `monaMultiSelectSummaryTag` | `number` | `-1` | Number of selected item tags to display before collapsing the rest into a summary tag. A negative value shows every selected item as its own tag and never renders the summary tag. |
|
|
513
|
-
|
|
514
|
-
### `DropdownDataHandlerDirective`
|
|
515
|
-
|
|
516
|
-
From `@nanahoshi/mona-ui/dropdowns`.
|
|
517
|
-
|
|
518
|
-
**Selector:** `[monaDropdownDataHandler]`
|
|
519
|
-
|
|
520
|
-
### `DropdownFooterTemplateDirective`
|
|
521
|
-
|
|
522
|
-
From `@nanahoshi/mona-ui/dropdowns`.
|
|
523
|
-
|
|
524
|
-
**Selector:** `ng-template[monaDropDownFooterTemplate], ng-template[monaAutoCompleteFooterTemplate], ng-template[monaDropDownListFooterTemplate], ng-template[monaDropDownTreeFooterTemplate], ng-template[monaComboBoxFooterTemplate], ng-template[monaMultiSelectFooterTemplate]`
|
|
525
|
-
|
|
526
|
-
### `DropdownGroupHeaderTemplateDirective`
|
|
527
|
-
|
|
528
|
-
From `@nanahoshi/mona-ui/dropdowns`.
|
|
529
|
-
|
|
530
|
-
**Selector:** `ng-template[monaDropDownGroupHeaderTemplate], ng-template[monaAutoCompleteGroupHeaderTemplate], ng-template[monaDropDownListGroupHeaderTemplate], ng-template[monaComboBoxGroupHeaderTemplate], ng-template[monaMultiSelectGroupHeaderTemplate]`
|
|
531
|
-
|
|
532
|
-
### `DropdownHeaderTemplateDirective`
|
|
533
|
-
|
|
534
|
-
From `@nanahoshi/mona-ui/dropdowns`.
|
|
407
|
+
| [`MultiSelectComponent`](api/multi-select.md#multiselectcomponent) | Component |
|
|
408
|
+
| [`MultiSelectSummaryTagDirective`](api/multi-select.md#multiselectsummarytagdirective) | Directive |
|
|
409
|
+
| [`MultiSelectSummaryTagTemplateDirective`](api/multi-select.md#multiselectsummarytagtemplatedirective) | Directive |
|
|
410
|
+
| [`MultiSelectTagTemplateDirective`](api/multi-select.md#multiselecttagtemplatedirective) | Directive |
|
|
535
411
|
|
|
536
|
-
|
|
412
|
+
From `@nanahoshi/mona-ui/dropdowns`:
|
|
537
413
|
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
From `@nanahoshi/mona-ui/dropdowns`.
|
|
541
|
-
|
|
542
|
-
**Selector:** `ng-template[monaDropDownItemTemplate], ng-template[monaAutoCompleteItemTemplate], ng-template[monaDropDownListItemTemplate], ng-template[monaComboBoxItemTemplate], ng-template[monaMultiSelectItemTemplate]`
|
|
543
|
-
|
|
544
|
-
### `DropdownListPopupHandlerDirective`
|
|
545
|
-
|
|
546
|
-
From `@nanahoshi/mona-ui/dropdowns`.
|
|
547
|
-
|
|
548
|
-
**Selector:** `[monaDropdownListPopupHandler]`
|
|
549
|
-
|
|
550
|
-
### `DropdownLiveRegionDirective`
|
|
551
|
-
|
|
552
|
-
From `@nanahoshi/mona-ui/dropdowns`.
|
|
553
|
-
|
|
554
|
-
Announces how many results a dropdown shows after its list is filtered, or after its items change, while the
|
|
555
|
-
popup is open ("3 results available", "No results found").
|
|
556
|
-
|
|
557
|
-
The announcement goes through the CDK `LiveAnnouncer`, whose live region lives at the end of the document, so it
|
|
558
|
-
never becomes part of the combobox's content. The highlighted option isn't announced here:
|
|
559
|
-
`aria-activedescendant` already does that.
|
|
560
|
-
|
|
561
|
-
**Selector:** `[monaDropdownLiveRegion]`
|
|
562
|
-
|
|
563
|
-
### `DropdownNoDataTemplateDirective`
|
|
564
|
-
|
|
565
|
-
From `@nanahoshi/mona-ui/dropdowns`.
|
|
566
|
-
|
|
567
|
-
**Selector:** `ng-template[monaDropDownNoDataTemplate], ng-template[monaAutoCompleteNoDataTemplate], ng-template[monaDropDownListNoDataTemplate], ng-template[monaDropDownTreeNoDataTemplate], ng-template[monaComboBoxNoDataTemplate], ng-template[monaMultiSelectNoDataTemplate]`
|
|
568
|
-
|
|
569
|
-
### `DropdownPopupHandlerDirective`
|
|
570
|
-
|
|
571
|
-
From `@nanahoshi/mona-ui/dropdowns`.
|
|
572
|
-
|
|
573
|
-
**Selector:** `[monaDropdownPopupHandler]`
|
|
574
|
-
|
|
575
|
-
### `DropdownPrefixTemplateDirective`
|
|
576
|
-
|
|
577
|
-
From `@nanahoshi/mona-ui/dropdowns`.
|
|
578
|
-
|
|
579
|
-
**Selector:** `ng-template[monaDropdownPrefixTemplate]`
|
|
580
|
-
|
|
581
|
-
### `DropdownSuffixTemplateDirective`
|
|
582
|
-
|
|
583
|
-
From `@nanahoshi/mona-ui/dropdowns`.
|
|
584
|
-
|
|
585
|
-
**Selector:** `ng-template[monaDropdownSuffixTemplate]`
|
|
586
|
-
|
|
587
|
-
### `MultiSelectSummaryTagTemplateDirective`
|
|
588
|
-
|
|
589
|
-
**Selector:** `ng-template[monaMultiSelectSummaryTagTemplate]`
|
|
590
|
-
|
|
591
|
-
### `MultiSelectTagTemplateDirective`
|
|
592
|
-
|
|
593
|
-
**Selector:** `ng-template[monaMultiSelectTagTemplate]`
|
|
594
|
-
|
|
595
|
-
### `DropdownListService`
|
|
596
|
-
|
|
597
|
-
From `@nanahoshi/mona-ui/dropdowns`.
|
|
598
|
-
|
|
599
|
-
**Type parameters:** `TData = unknown`
|
|
600
|
-
|
|
601
|
-
#### Properties
|
|
602
|
-
|
|
603
|
-
| Name | Type |
|
|
414
|
+
| Name | Kind |
|
|
604
415
|
| --- | --- |
|
|
605
|
-
| `
|
|
416
|
+
| [`DropdownFilterableDirective`](api/dropdowns.md#dropdownfilterabledirective) | Directive |
|
|
417
|
+
| [`DropdownGroupableDirective`](api/dropdowns.md#dropdowngroupabledirective) | Directive |
|
|
418
|
+
| [`DropdownVirtualScrollDirective`](api/dropdowns.md#dropdownvirtualscrolldirective) | Directive |
|
|
419
|
+
| [`DropdownDataHandlerDirective`](api/dropdowns.md#dropdowndatahandlerdirective) | Directive |
|
|
420
|
+
| [`DropdownFooterTemplateDirective`](api/dropdowns.md#dropdownfootertemplatedirective) | Directive |
|
|
421
|
+
| [`DropdownGroupHeaderTemplateDirective`](api/dropdowns.md#dropdowngroupheadertemplatedirective) | Directive |
|
|
422
|
+
| [`DropdownHeaderTemplateDirective`](api/dropdowns.md#dropdownheadertemplatedirective) | Directive |
|
|
423
|
+
| [`DropdownItemTemplateDirective`](api/dropdowns.md#dropdownitemtemplatedirective) | Directive |
|
|
424
|
+
| [`DropdownListPopupHandlerDirective`](api/dropdowns.md#dropdownlistpopuphandlerdirective) | Directive |
|
|
425
|
+
| [`DropdownNoDataTemplateDirective`](api/dropdowns.md#dropdownnodatatemplatedirective) | Directive |
|
|
426
|
+
| [`DropdownPrefixTemplateDirective`](api/dropdowns.md#dropdownprefixtemplatedirective) | Directive |
|
|
427
|
+
| [`DropdownSuffixTemplateDirective`](api/dropdowns.md#dropdownsuffixtemplatedirective) | Directive |
|
|
428
|
+
| [`DropdownListService`](api/dropdowns.md#dropdownlistservice) | Service |
|
|
606
429
|
|
|
607
430
|
### Types
|
|
608
431
|
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
```typescript
|
|
612
|
-
const DROPDOWN_DATA_INPUT_TOKEN: InjectionToken<DropdownDataInput<unknown>>;
|
|
613
|
-
```
|
|
614
|
-
|
|
615
|
-
#### `DROPDOWN_POPUP_INPUT_TOKEN`
|
|
616
|
-
|
|
617
|
-
```typescript
|
|
618
|
-
const DROPDOWN_POPUP_INPUT_TOKEN: InjectionToken<DropdownPopupInput>;
|
|
619
|
-
```
|
|
620
|
-
|
|
621
|
-
#### `DropdownDataInputToken`
|
|
622
|
-
|
|
623
|
-
**Deprecated.** Use `DROPDOWN_DATA_INPUT_TOKEN`.
|
|
624
|
-
|
|
625
|
-
```typescript
|
|
626
|
-
const DropdownDataInputToken: InjectionToken<DropdownDataInput<unknown>>;
|
|
627
|
-
```
|
|
628
|
-
|
|
629
|
-
#### `dropdownPopupThemeVariants`
|
|
630
|
-
|
|
631
|
-
```typescript
|
|
632
|
-
const dropdownPopupThemeVariants: (props?: ({ rounded?: "none" | "small" | "medium" | "large" | "full" | null | undefined; size?: "small" | "medium" | "large" | null | undefined; } & ClassProp) | undefined) => string;
|
|
633
|
-
```
|
|
634
|
-
|
|
635
|
-
#### `DROPDOWNS_DEFAULT_MESSAGES`
|
|
636
|
-
|
|
637
|
-
```typescript
|
|
638
|
-
const DROPDOWNS_DEFAULT_MESSAGES: MonaDropdownsMessages;
|
|
639
|
-
```
|
|
640
|
-
|
|
641
|
-
#### `MULTI_SELECT_DEFAULT_MESSAGES`
|
|
642
|
-
|
|
643
|
-
```typescript
|
|
644
|
-
const MULTI_SELECT_DEFAULT_MESSAGES: MonaMultiSelectMessages;
|
|
645
|
-
```
|
|
646
|
-
|
|
647
|
-
#### `DropdownDataInput`
|
|
648
|
-
|
|
649
|
-
**Type parameters:** `TData`
|
|
650
|
-
|
|
651
|
-
| Name | Type |
|
|
652
|
-
| --- | --- |
|
|
653
|
-
| `data` (read-only) | `InputSignal<Iterable<TData>>` |
|
|
654
|
-
| `itemDisabled` (read-only) | `InputSignal<DropdownFieldPredicateType<TData>>` |
|
|
655
|
-
| `textField` (read-only) | `InputSignal<DropdownFieldSelectorType<TData, string>>` |
|
|
656
|
-
| `valueField` (read-only) | `InputSignal<DropdownFieldSelectorType<TData, unknown>>` |
|
|
657
|
-
|
|
658
|
-
#### `DropdownPopupInput`
|
|
659
|
-
|
|
660
|
-
| Name | Type |
|
|
432
|
+
| Type | Kind |
|
|
661
433
|
| --- | --- |
|
|
662
|
-
| `
|
|
663
|
-
| `closed` (read-only) | `OutputEmitterRef<void>` |
|
|
664
|
-
| `disabled` (read-only) | `Signal<boolean>` |
|
|
665
|
-
| `open` (read-only) | `OutputEmitterRef<PreventableEvent>` |
|
|
666
|
-
| `opened` (read-only) | `OutputEmitterRef<void>` |
|
|
667
|
-
| `popupHeight` (read-only) | `InputSignal<ListSizeInputType>` |
|
|
668
|
-
| `popupWidth` (read-only) | `InputSignal<ListSizeInputType>` |
|
|
669
|
-
| `readonly` (read-only) | `Signal<boolean>` |
|
|
670
|
-
| `touch` (read-only) | `OutputEmitterRef<void>` |
|
|
671
|
-
|
|
672
|
-
#### `DropdownFieldPredicateType`
|
|
673
|
-
|
|
674
|
-
```typescript
|
|
675
|
-
type DropdownFieldPredicateType<TData> = string | Predicate<TData> | null | undefined;
|
|
676
|
-
```
|
|
677
|
-
|
|
678
|
-
#### `DropdownFieldSelectorType`
|
|
679
|
-
|
|
680
|
-
```typescript
|
|
681
|
-
type DropdownFieldSelectorType<TData, TResult = unknown> = string | Selector<TData, TResult> | null | undefined;
|
|
682
|
-
```
|
|
683
|
-
|
|
684
|
-
#### `FilterChangeEvent`
|
|
434
|
+
| [`MULTI_SELECT_DEFAULT_MESSAGES`](api/multi-select.md#multi-select-default-messages) | Constant |
|
|
685
435
|
|
|
686
|
-
From `@nanahoshi/mona-ui/
|
|
436
|
+
From `@nanahoshi/mona-ui/dropdowns`:
|
|
687
437
|
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
| Name | Type |
|
|
691
|
-
| --- | --- |
|
|
692
|
-
| `filter` (read-only) | `string` |
|
|
693
|
-
|
|
694
|
-
#### `ListItem`
|
|
695
|
-
|
|
696
|
-
From `@nanahoshi/mona-ui/list`.
|
|
697
|
-
|
|
698
|
-
An item of a list, wrapping its data item.
|
|
699
|
-
|
|
700
|
-
**Type parameters:** `TData`
|
|
701
|
-
|
|
702
|
-
| Name | Type |
|
|
703
|
-
| --- | --- |
|
|
704
|
-
| `data` (read-only) | `TData` |
|
|
705
|
-
| `header` (read-only) | `string` |
|
|
706
|
-
| `isHeader` (read-only) | `boolean` |
|
|
707
|
-
| `uid` (read-only) | `string` |
|
|
708
|
-
|
|
709
|
-
#### `ListSizeInputType`
|
|
710
|
-
|
|
711
|
-
From `@nanahoshi/mona-ui/list`.
|
|
712
|
-
|
|
713
|
-
```typescript
|
|
714
|
-
type ListSizeInputType = ListSizeType | number;
|
|
715
|
-
```
|
|
716
|
-
|
|
717
|
-
#### `ListSizeType`
|
|
718
|
-
|
|
719
|
-
From `@nanahoshi/mona-ui/list`.
|
|
720
|
-
|
|
721
|
-
A CSS length, or nothing to leave it to the stylesheet.
|
|
722
|
-
|
|
723
|
-
```typescript
|
|
724
|
-
type ListSizeType = string | null | undefined;
|
|
725
|
-
```
|
|
726
|
-
|
|
727
|
-
#### `MonaDropdownsMessages`
|
|
728
|
-
|
|
729
|
-
From `@nanahoshi/mona-ui/i18n`.
|
|
730
|
-
|
|
731
|
-
| Name | Type |
|
|
732
|
-
| --- | --- |
|
|
733
|
-
| `itemPosition` (read-only) | `(text: string, position: number, total: number) => string` |
|
|
734
|
-
| `noResultsFound` (read-only) | `string` |
|
|
735
|
-
| `resultsAvailable` (read-only) | `(count: number) => string` |
|
|
736
|
-
|
|
737
|
-
#### `MonaMultiSelectMessages`
|
|
738
|
-
|
|
739
|
-
From `@nanahoshi/mona-ui/i18n`.
|
|
740
|
-
|
|
741
|
-
| Name | Type |
|
|
742
|
-
| --- | --- |
|
|
743
|
-
| `clear` (read-only) | `string` |
|
|
744
|
-
| `itemsCount` (read-only) | `(count: number) => string` |
|
|
745
|
-
| `removeMoreItems` (read-only) | `(count: number) => string` |
|
|
746
|
-
|
|
747
|
-
#### `PreventableEvent`
|
|
748
|
-
|
|
749
|
-
From `@nanahoshi/mona-ui/common`.
|
|
750
|
-
|
|
751
|
-
**Type parameters:** `E extends Event = Event`
|
|
752
|
-
|
|
753
|
-
| Name | Type | Description |
|
|
438
|
+
| Type | Kind | Description |
|
|
754
439
|
| --- | --- | --- |
|
|
755
|
-
| `
|
|
756
|
-
| `
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
| Signature | Description |
|
|
761
|
-
| --- | --- |
|
|
762
|
-
| `isDefaultPrevented(): boolean` | Whether `preventDefault()` was called. |
|
|
763
|
-
| `preventDefault(): void` | Cancels what the event announces, such as opening or closing a popup, or closing a dialog. |
|
|
440
|
+
| [`DropdownDataInputToken`](api/dropdowns.md#dropdowndatainputtoken) | Constant | **Deprecated.** Use `DROPDOWN_DATA_INPUT_TOKEN`. |
|
|
441
|
+
| [`DROPDOWNS_DEFAULT_MESSAGES`](api/dropdowns.md#dropdowns-default-messages) | Constant | |
|
|
442
|
+
| [`DropdownDataInput`](api/dropdowns.md#dropdowndatainput) | Interface | |
|
|
443
|
+
| [`DropdownFieldPredicateType`](api/dropdowns.md#dropdownfieldpredicatetype) | Type alias | |
|
|
444
|
+
| [`DropdownFieldSelectorType`](api/dropdowns.md#dropdownfieldselectortype) | Type alias | |
|
|
764
445
|
|
|
765
|
-
**
|
|
446
|
+
**Related types:** [`FilterableOptions`](api/common.md#filterableoptions), [`FilterChangeEvent`](api/common.md#filterchangeevent), [`GroupableOptions`](api/grid.md#groupableoptions), [`ListItem`](api/list.md#listitem), [`ListSizeInputType`](api/list.md#listsizeinputtype), [`ListSizeType`](api/list.md#listsizetype), [`MonaDropdownsMessages`](api/i18n.md#monadropdownsmessages), [`MonaMultiSelectMessages`](api/i18n.md#monamultiselectmessages), [`PopupCloseEvent`](api/popup.md#popupcloseevent), [`PreventableEvent`](api/common.md#preventableevent), [`VirtualScrollOptions`](api/common.md#virtualscrolloptions)
|
package/docs/notification.md
CHANGED
|
@@ -56,7 +56,7 @@ export class MyComponent {
|
|
|
56
56
|
| `hideAll(): void` | Closes every currently visible notification, across all positions. |
|
|
57
57
|
| `show(options: NotificationOptions): NotificationRef` | Creates a notification and returns a `NotificationRef`. If a notification with the same `id` already exists at the resolved `position`, returns a ref to that existing notification instead of creating a duplicate. |
|
|
58
58
|
|
|
59
|
-
See [Anatomy & Options Resolution](#anatomy) for how `show()` fills in defaults, and
|
|
59
|
+
See [Anatomy & Options Resolution](#anatomy) for how `show()` fills in defaults, and the API reference for the full [`NotificationOptions`](api/notification.md#notificationoptions) and [`NotificationRef`](api/notification.md#notificationref) shapes.
|
|
60
60
|
|
|
61
61
|
## Anatomy
|
|
62
62
|
|
|
@@ -338,123 +338,24 @@ Each notification is announced through the CDK `LiveAnnouncer` once it has rende
|
|
|
338
338
|
|
|
339
339
|
## API
|
|
340
340
|
|
|
341
|
-
Everything below is imported from `@nanahoshi/mona-ui/notification`.
|
|
341
|
+
Everything below is imported from `@nanahoshi/mona-ui/notification`. Each name links to its reference page, with every input, output, property and method.
|
|
342
342
|
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
#### Methods
|
|
346
|
-
|
|
347
|
-
| Signature | Description |
|
|
348
|
-
| --- | --- |
|
|
349
|
-
| `hide(id: string): void` | Closes the notification with the given `id`, wherever its container is positioned. No-op if no notification with that `id` is currently shown. |
|
|
350
|
-
| `hideAll(): void` | Closes every currently visible notification, across all positions. |
|
|
351
|
-
| `show(options: NotificationOptions): NotificationRef` | Creates a notification and returns a `NotificationRef`. If a notification with the same `id` already exists at the resolved `position`, returns a ref to that existing notification instead of creating a duplicate. |
|
|
352
|
-
|
|
353
|
-
### `provideNotificationDefaults`
|
|
354
|
-
|
|
355
|
-
Sets application-wide notification behavior: whether timed notifications close on their own, how much longer they
|
|
356
|
-
stay, how many show at once, and whether the countdown pauses while the window is in the background.
|
|
357
|
-
|
|
358
|
-
```typescript
|
|
359
|
-
function provideNotificationDefaults(defaults: Partial<NotificationDefaults>): EnvironmentProviders;
|
|
360
|
-
```
|
|
361
|
-
|
|
362
|
-
### Types
|
|
363
|
-
|
|
364
|
-
#### `NOTIFICATION_DATA`
|
|
365
|
-
|
|
366
|
-
The `data` given in the notification's options, for a content component or template to inject.
|
|
367
|
-
|
|
368
|
-
```typescript
|
|
369
|
-
const NOTIFICATION_DATA: InjectionToken<unknown>;
|
|
370
|
-
```
|
|
371
|
-
|
|
372
|
-
#### `NOTIFICATION_DEFAULT_MESSAGES`
|
|
373
|
-
|
|
374
|
-
```typescript
|
|
375
|
-
const NOTIFICATION_DEFAULT_MESSAGES: { close: string; error: string; info: string; region: string; success: string; warning: string; };
|
|
376
|
-
```
|
|
377
|
-
|
|
378
|
-
#### `NOTIFICATION_DEFAULTS`
|
|
379
|
-
|
|
380
|
-
Application-wide notification settings. Provide them with `provideNotificationDefaults()`.
|
|
381
|
-
|
|
382
|
-
```typescript
|
|
383
|
-
const NOTIFICATION_DEFAULTS: InjectionToken<NotificationDefaults>;
|
|
384
|
-
```
|
|
385
|
-
|
|
386
|
-
#### `NOTIFICATION_REF`
|
|
387
|
-
|
|
388
|
-
The reference of the notification a content component or template is shown in.
|
|
389
|
-
|
|
390
|
-
```typescript
|
|
391
|
-
const NOTIFICATION_REF: InjectionToken<NotificationRef>;
|
|
392
|
-
```
|
|
393
|
-
|
|
394
|
-
#### `NotificationRef`
|
|
395
|
-
|
|
396
|
-
| Name | Type | Description |
|
|
343
|
+
| Name | Kind | Description |
|
|
397
344
|
| --- | --- | --- |
|
|
398
|
-
| `
|
|
399
|
-
| `
|
|
400
|
-
| `id` (read-only) | `string` | The notification's id: the one given in its options, or a generated one. |
|
|
401
|
-
|
|
402
|
-
**Methods**
|
|
403
|
-
|
|
404
|
-
| Signature | Description |
|
|
405
|
-
| --- | --- |
|
|
406
|
-
| `hide(): void` | Closes the notification. |
|
|
407
|
-
| `update(changes: NotificationUpdate): void` | Changes the content, title, type or close button of the notification. The new message is announced to assistive technology. |
|
|
345
|
+
| [`NotificationService`](api/notification.md#notificationservice) | Service | |
|
|
346
|
+
| [`provideNotificationDefaults`](api/notification.md#providenotificationdefaults) | Function | Sets application-wide notification behavior: whether timed notifications close on their own, how much longer they stay, how many show at once, and whether the countdown pauses while the window is in the background. |
|
|
408
347
|
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
Application-wide settings for notifications, given with `provideNotificationDefaults()`.
|
|
412
|
-
|
|
413
|
-
| Name | Type | Description |
|
|
414
|
-
| --- | --- | --- |
|
|
415
|
-
| `autoHide` (read-only) | `boolean` | Whether notifications with a `duration` close on their own. Turn it off to leave every notification open until the user closes it (WCAG 2.2.1). |
|
|
416
|
-
| `durationScale` (read-only) | `number` | A factor applied to every `duration`, for example `2` to keep notifications twice as long. |
|
|
417
|
-
| `maxVisible?` (read-only) | `number` | The most notifications shown at once at each position. The oldest closes to make room for a new one. Without it, there is no limit. |
|
|
418
|
-
| `pauseOnWindowBlur` (read-only) | `boolean` | Whether the countdown pauses while the browser window doesn't have focus. |
|
|
419
|
-
|
|
420
|
-
#### `NotificationOptions`
|
|
348
|
+
### Types
|
|
421
349
|
|
|
422
|
-
|
|
|
350
|
+
| Type | Kind | Description |
|
|
423
351
|
| --- | --- | --- |
|
|
424
|
-
| `
|
|
425
|
-
| `
|
|
426
|
-
| `
|
|
427
|
-
| `
|
|
428
|
-
| `
|
|
429
|
-
| `
|
|
430
|
-
| `
|
|
431
|
-
| `
|
|
432
|
-
| `
|
|
433
|
-
| `
|
|
434
|
-
| `title?` | `string` | The notification's title. Defaults to localized title derived from `type` (e.g. "Info", "Success", "Warning", "Error"). |
|
|
435
|
-
| `type?` | `NotificationType` | The notification's semantic type, controlling its icon, color, and accessibility announcement urgency. |
|
|
436
|
-
| `width?` | `number \| string` | The notification's width. A number is treated as pixels. |
|
|
437
|
-
|
|
438
|
-
#### `NotificationPosition`
|
|
439
|
-
|
|
440
|
-
The screen position a notification container is anchored to.
|
|
441
|
-
|
|
442
|
-
```typescript
|
|
443
|
-
type NotificationPosition = "bottom" | "bottomleft" | "bottomright" | "top" | "topleft" | "topright";
|
|
444
|
-
```
|
|
445
|
-
|
|
446
|
-
#### `NotificationType`
|
|
447
|
-
|
|
448
|
-
The semantic type of a notification, controlling its icon, color, and accessibility announcement urgency.
|
|
449
|
-
|
|
450
|
-
```typescript
|
|
451
|
-
type NotificationType = "error" | "info" | "success" | "warning";
|
|
452
|
-
```
|
|
453
|
-
|
|
454
|
-
#### `NotificationUpdate`
|
|
455
|
-
|
|
456
|
-
The options `NotificationRef.update()` can change on a notification that is already shown.
|
|
457
|
-
|
|
458
|
-
```typescript
|
|
459
|
-
type NotificationUpdate = Partial<Pick<NotificationOptions, "closable" | "content" | "title" | "type">>;
|
|
460
|
-
```
|
|
352
|
+
| [`NOTIFICATION_DATA`](api/notification.md#notification-data) | Constant | The `data` given in the notification's options, for a content component or template to inject. |
|
|
353
|
+
| [`NOTIFICATION_DEFAULT_MESSAGES`](api/notification.md#notification-default-messages) | Constant | |
|
|
354
|
+
| [`NOTIFICATION_DEFAULTS`](api/notification.md#notification-defaults) | Constant | Application-wide notification settings. |
|
|
355
|
+
| [`NOTIFICATION_REF`](api/notification.md#notification-ref) | Constant | The reference of the notification a content component or template is shown in. |
|
|
356
|
+
| [`NotificationRef`](api/notification.md#notificationref) | Interface | |
|
|
357
|
+
| [`NotificationDefaults`](api/notification.md#notificationdefaults) | Interface | Application-wide settings for notifications, given with `provideNotificationDefaults()`. |
|
|
358
|
+
| [`NotificationOptions`](api/notification.md#notificationoptions) | Interface | |
|
|
359
|
+
| [`NotificationPosition`](api/notification.md#notificationposition) | Type alias | The screen position a notification container is anchored to. |
|
|
360
|
+
| [`NotificationType`](api/notification.md#notificationtype) | Type alias | The semantic type of a notification, controlling its icon, color, and accessibility announcement urgency. |
|
|
361
|
+
| [`NotificationUpdate`](api/notification.md#notificationupdate) | Type alias | The options `NotificationRef.update()` can change on a notification that is already shown. |
|
package/docs/numeric-textbox.md
CHANGED
|
@@ -216,86 +216,17 @@ The `invalid` and `touched` inputs are written by `FormField` when the control i
|
|
|
216
216
|
|
|
217
217
|
## API
|
|
218
218
|
|
|
219
|
-
Everything below is imported from `@nanahoshi/mona-ui/numeric-text-box`.
|
|
220
|
-
|
|
221
|
-
### `NumericTextBoxComponent`
|
|
222
|
-
|
|
223
|
-
**Selector:** `mona-numeric-text-box`
|
|
224
|
-
**Implements:** `FormValueControl<number \| null>`
|
|
225
|
-
|
|
226
|
-
#### Inputs
|
|
227
|
-
|
|
228
|
-
| Name | Type | Default | Description |
|
|
229
|
-
| --- | --- | --- | --- |
|
|
230
|
-
| `aria-describedby` | `string` | `""` | ID of an element that provides an extended description for the input, such as a hint or an error message. |
|
|
231
|
-
| `aria-label` | `string \| null` | `null` | Accessible name for the input. Prefer a visible label, linked through `inputId` or `aria-labelledby`. |
|
|
232
|
-
| `aria-labelledby` | `string` | `""` | ID of an external element that provides the accessible name for the input. |
|
|
233
|
-
| `class` | `string` | `""` | Additional CSS classes merged onto the host element via `tailwind-merge`. |
|
|
234
|
-
| `decimals` | `number` | `0` | Number of fractional decimal places to display and accept. Values are truncated to an integer and clamped to the range 0–20. Non-finite and negative values normalize to 0. |
|
|
235
|
-
| `disabled` | `boolean` | `false` | Sets whether the input is disabled. |
|
|
236
|
-
| `formatter` | `Action<number \| null, string> \| null` | `null` | Formats the value to be displayed in the input when the input is not focused. |
|
|
237
|
-
| `inputId` | `string` | `a generated ID` | ID of the inner input, so a `<label for>` or `<mona-label for>` can point at it. |
|
|
238
|
-
| `invalid` | `boolean` | `false` | Marks the text box as invalid. When bound to a signal form field via `[formField]`, this is written by the `FormField` directive. |
|
|
239
|
-
| `maxValue` | `number \| null` | `null` | Maximum value that can be entered. |
|
|
240
|
-
| `minValue` | `number \| null` | `null` | Minimum value that can be entered. |
|
|
241
|
-
| `nullable` | `boolean` | `true` | Sets whether the input can be empty. When `false`, leaving an empty field sets it to the minimum, or to zero when there is no minimum (clamped to the maximum). |
|
|
242
|
-
| `placeholder` | `string` | `""` | Text shown in the input while it is empty. It isn't a label: it disappears once there is a value. |
|
|
243
|
-
| `readonly` | `boolean` | `false` | Sets whether the input is readonly. The spin buttons are hidden while it is. |
|
|
244
|
-
| `required` | `boolean` | `false` | Sets whether the input is required. |
|
|
245
|
-
| `rounded` | `"full" \| "large" \| "medium" \| "none" \| "small"` | ```medium``` | Sets the border radius of the input. |
|
|
246
|
-
| `size` | `"large" \| "medium" \| "small"` | ```medium``` | Sets the size of the input. |
|
|
247
|
-
| `spinners` | `boolean` | `true` | Sets whether the spin buttons are visible. |
|
|
248
|
-
| `step` | `number` | `1` | Step value to increment or decrement the value. |
|
|
249
|
-
| `tabindex` | `number` | `0` | Tab index of the input. |
|
|
250
|
-
| `touched` | `boolean` | `false` | Sets the touched state of the text box. When bound to a signal form field via `[formField]`, this is written by the `FormField` directive. |
|
|
251
|
-
| `value` (two-way) | `number \| null` | `null` | Two-way bindable current value of the numeric text box. |
|
|
252
|
-
|
|
253
|
-
#### Outputs
|
|
254
|
-
|
|
255
|
-
| Name | Type | Description |
|
|
256
|
-
| --- | --- | --- |
|
|
257
|
-
| `inputBlur` | `FocusEvent` | Emits when focus leaves the component, after the value has been clamped to the bounds. Moving focus between the input and elements inside the component (such as a prefix template) doesn't count. |
|
|
258
|
-
| `inputFocus` | `FocusEvent` | Emits when the inner input element is focused. |
|
|
259
|
-
| `inputFocusOut` | `FocusEvent` | Emits when the inner input element loses focus. |
|
|
260
|
-
| `touch` | `void` | Emitted when focus leaves the component, as a native input is touched on blur. Typing and spinning don't count. The `FormField` directive listens to this to mark the field as touched. |
|
|
261
|
-
| `valueChange` | `number \| null` | Emitted when `value` changes. |
|
|
262
|
-
|
|
263
|
-
#### Methods
|
|
264
|
-
|
|
265
|
-
| Signature | Description |
|
|
266
|
-
| --- | --- |
|
|
267
|
-
| `decrease(): void` | Steps the value down by `step` and moves focus to the input. |
|
|
268
|
-
| `focus(options?: FocusOptions): void` | Moves focus to the input, with the caret at the end. |
|
|
269
|
-
| `increase(): void` | Steps the value up by `step` and moves focus to the input. |
|
|
270
|
-
| `onBlur(event: FocusEvent): void` | Runs when focus leaves an element inside the component: clamps the value and marks the field touched. |
|
|
271
|
-
|
|
272
|
-
### `NumericTextBoxPrefixTemplateDirective`
|
|
219
|
+
Everything below is imported from `@nanahoshi/mona-ui/numeric-text-box`. Each name links to its reference page, with every input, output, property and method.
|
|
273
220
|
|
|
274
|
-
|
|
221
|
+
| Name | Kind |
|
|
222
|
+
| --- | --- |
|
|
223
|
+
| [`NumericTextBoxComponent`](api/numeric-text-box.md#numerictextboxcomponent) | Component |
|
|
224
|
+
| [`NumericTextBoxPrefixTemplateDirective`](api/numeric-text-box.md#numerictextboxprefixtemplatedirective) | Directive |
|
|
275
225
|
|
|
276
226
|
### Types
|
|
277
227
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
```typescript
|
|
281
|
-
const NUMERIC_TEXT_BOX_DEFAULT_MESSAGES: MonaNumericTextBoxMessages;
|
|
282
|
-
```
|
|
283
|
-
|
|
284
|
-
#### `Action`
|
|
285
|
-
|
|
286
|
-
From `@nanahoshi/mona-ui/common`.
|
|
287
|
-
|
|
288
|
-
A function taking a `P` and returning an `R`.
|
|
289
|
-
|
|
290
|
-
```typescript
|
|
291
|
-
type Action<P = void, R = void> = (arg: P) => R;
|
|
292
|
-
```
|
|
293
|
-
|
|
294
|
-
#### `MonaNumericTextBoxMessages`
|
|
295
|
-
|
|
296
|
-
From `@nanahoshi/mona-ui/i18n`.
|
|
297
|
-
|
|
298
|
-
| Name | Type |
|
|
228
|
+
| Type | Kind |
|
|
299
229
|
| --- | --- |
|
|
300
|
-
| `
|
|
301
|
-
|
|
230
|
+
| [`NUMERIC_TEXT_BOX_DEFAULT_MESSAGES`](api/numeric-text-box.md#numeric-text-box-default-messages) | Constant |
|
|
231
|
+
|
|
232
|
+
**Related types:** [`Action`](api/common.md#action), [`MonaNumericTextBoxMessages`](api/i18n.md#monanumerictextboxmessages)
|