@ngneers/controls 0.0.1-next.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/fesm2022/ngneers-controls-accordion.mjs +234 -0
- package/fesm2022/ngneers-controls-accordion.mjs.map +1 -0
- package/fesm2022/ngneers-controls-api-ng.mjs +959 -0
- package/fesm2022/ngneers-controls-api-ng.mjs.map +1 -0
- package/fesm2022/ngneers-controls-api-resize.mjs +712 -0
- package/fesm2022/ngneers-controls-api-resize.mjs.map +1 -0
- package/fesm2022/ngneers-controls-api.mjs +347 -0
- package/fesm2022/ngneers-controls-api.mjs.map +1 -0
- package/fesm2022/ngneers-controls-avatar.mjs +77 -0
- package/fesm2022/ngneers-controls-avatar.mjs.map +1 -0
- package/fesm2022/ngneers-controls-base.mjs +620 -0
- package/fesm2022/ngneers-controls-base.mjs.map +1 -0
- package/fesm2022/ngneers-controls-breadcrumb.mjs +100 -0
- package/fesm2022/ngneers-controls-breadcrumb.mjs.map +1 -0
- package/fesm2022/ngneers-controls-button-group.mjs +110 -0
- package/fesm2022/ngneers-controls-button-group.mjs.map +1 -0
- package/fesm2022/ngneers-controls-button.mjs +83 -0
- package/fesm2022/ngneers-controls-button.mjs.map +1 -0
- package/fesm2022/ngneers-controls-calendar-time-CJT5AFlA.mjs +74 -0
- package/fesm2022/ngneers-controls-calendar-time-CJT5AFlA.mjs.map +1 -0
- package/fesm2022/ngneers-controls-calendar.mjs +801 -0
- package/fesm2022/ngneers-controls-calendar.mjs.map +1 -0
- package/fesm2022/ngneers-controls-checkbox.mjs +63 -0
- package/fesm2022/ngneers-controls-checkbox.mjs.map +1 -0
- package/fesm2022/ngneers-controls-chip.mjs +55 -0
- package/fesm2022/ngneers-controls-chip.mjs.map +1 -0
- package/fesm2022/ngneers-controls-default-icons.mjs +82 -0
- package/fesm2022/ngneers-controls-default-icons.mjs.map +1 -0
- package/fesm2022/ngneers-controls-defer.mjs +72 -0
- package/fesm2022/ngneers-controls-defer.mjs.map +1 -0
- package/fesm2022/ngneers-controls-dialog.mjs +407 -0
- package/fesm2022/ngneers-controls-dialog.mjs.map +1 -0
- package/fesm2022/ngneers-controls-directives.mjs +498 -0
- package/fesm2022/ngneers-controls-directives.mjs.map +1 -0
- package/fesm2022/ngneers-controls-drawer.mjs +271 -0
- package/fesm2022/ngneers-controls-drawer.mjs.map +1 -0
- package/fesm2022/ngneers-controls-edit-inplace.mjs +127 -0
- package/fesm2022/ngneers-controls-edit-inplace.mjs.map +1 -0
- package/fesm2022/ngneers-controls-errors.mjs +329 -0
- package/fesm2022/ngneers-controls-errors.mjs.map +1 -0
- package/fesm2022/ngneers-controls-filter.mjs +708 -0
- package/fesm2022/ngneers-controls-filter.mjs.map +1 -0
- package/fesm2022/ngneers-controls-hint.mjs +153 -0
- package/fesm2022/ngneers-controls-hint.mjs.map +1 -0
- package/fesm2022/ngneers-controls-i18n-translations-de.mjs +170 -0
- package/fesm2022/ngneers-controls-i18n-translations-de.mjs.map +1 -0
- package/fesm2022/ngneers-controls-i18n-translations-en.mjs +170 -0
- package/fesm2022/ngneers-controls-i18n-translations-en.mjs.map +1 -0
- package/fesm2022/ngneers-controls-i18n.mjs +57 -0
- package/fesm2022/ngneers-controls-i18n.mjs.map +1 -0
- package/fesm2022/ngneers-controls-icon.mjs +195 -0
- package/fesm2022/ngneers-controls-icon.mjs.map +1 -0
- package/fesm2022/ngneers-controls-inplace.mjs +150 -0
- package/fesm2022/ngneers-controls-inplace.mjs.map +1 -0
- package/fesm2022/ngneers-controls-input-field.mjs +165 -0
- package/fesm2022/ngneers-controls-input-field.mjs.map +1 -0
- package/fesm2022/ngneers-controls-input.mjs +72 -0
- package/fesm2022/ngneers-controls-input.mjs.map +1 -0
- package/fesm2022/ngneers-controls-item-view.mjs +473 -0
- package/fesm2022/ngneers-controls-item-view.mjs.map +1 -0
- package/fesm2022/ngneers-controls-list-box.mjs +281 -0
- package/fesm2022/ngneers-controls-list-box.mjs.map +1 -0
- package/fesm2022/ngneers-controls-mask-input.mjs +888 -0
- package/fesm2022/ngneers-controls-mask-input.mjs.map +1 -0
- package/fesm2022/ngneers-controls-menu.mjs +371 -0
- package/fesm2022/ngneers-controls-menu.mjs.map +1 -0
- package/fesm2022/ngneers-controls-message.mjs +30 -0
- package/fesm2022/ngneers-controls-message.mjs.map +1 -0
- package/fesm2022/ngneers-controls-number-input.mjs +366 -0
- package/fesm2022/ngneers-controls-number-input.mjs.map +1 -0
- package/fesm2022/ngneers-controls-paginator.mjs +129 -0
- package/fesm2022/ngneers-controls-paginator.mjs.map +1 -0
- package/fesm2022/ngneers-controls-popover.mjs +215 -0
- package/fesm2022/ngneers-controls-popover.mjs.map +1 -0
- package/fesm2022/ngneers-controls-progress.mjs +98 -0
- package/fesm2022/ngneers-controls-progress.mjs.map +1 -0
- package/fesm2022/ngneers-controls-radio.mjs +152 -0
- package/fesm2022/ngneers-controls-radio.mjs.map +1 -0
- package/fesm2022/ngneers-controls-roving-focus.mjs +323 -0
- package/fesm2022/ngneers-controls-roving-focus.mjs.map +1 -0
- package/fesm2022/ngneers-controls-scroll-shadow.mjs +65 -0
- package/fesm2022/ngneers-controls-scroll-shadow.mjs.map +1 -0
- package/fesm2022/ngneers-controls-scroller.mjs +308 -0
- package/fesm2022/ngneers-controls-scroller.mjs.map +1 -0
- package/fesm2022/ngneers-controls-select-button.mjs +58 -0
- package/fesm2022/ngneers-controls-select-button.mjs.map +1 -0
- package/fesm2022/ngneers-controls-select.mjs +417 -0
- package/fesm2022/ngneers-controls-select.mjs.map +1 -0
- package/fesm2022/ngneers-controls-slider.mjs +167 -0
- package/fesm2022/ngneers-controls-slider.mjs.map +1 -0
- package/fesm2022/ngneers-controls-snackbar.mjs +414 -0
- package/fesm2022/ngneers-controls-snackbar.mjs.map +1 -0
- package/fesm2022/ngneers-controls-spin-buttons.mjs +126 -0
- package/fesm2022/ngneers-controls-spin-buttons.mjs.map +1 -0
- package/fesm2022/ngneers-controls-spinner.mjs +184 -0
- package/fesm2022/ngneers-controls-spinner.mjs.map +1 -0
- package/fesm2022/ngneers-controls-splitter.mjs +604 -0
- package/fesm2022/ngneers-controls-splitter.mjs.map +1 -0
- package/fesm2022/ngneers-controls-state.mjs +185 -0
- package/fesm2022/ngneers-controls-state.mjs.map +1 -0
- package/fesm2022/ngneers-controls-switch.mjs +39 -0
- package/fesm2022/ngneers-controls-switch.mjs.map +1 -0
- package/fesm2022/ngneers-controls-table.mjs +2634 -0
- package/fesm2022/ngneers-controls-table.mjs.map +1 -0
- package/fesm2022/ngneers-controls-tabs.mjs +336 -0
- package/fesm2022/ngneers-controls-tabs.mjs.map +1 -0
- package/fesm2022/ngneers-controls-tag.mjs +30 -0
- package/fesm2022/ngneers-controls-tag.mjs.map +1 -0
- package/fesm2022/ngneers-controls-toast.mjs +350 -0
- package/fesm2022/ngneers-controls-toast.mjs.map +1 -0
- package/fesm2022/ngneers-controls-toggle-button.mjs +70 -0
- package/fesm2022/ngneers-controls-toggle-button.mjs.map +1 -0
- package/fesm2022/ngneers-controls-tooltip.mjs +506 -0
- package/fesm2022/ngneers-controls-tooltip.mjs.map +1 -0
- package/fesm2022/ngneers-controls-tree.mjs +599 -0
- package/fesm2022/ngneers-controls-tree.mjs.map +1 -0
- package/fesm2022/ngneers-controls-upload.mjs +377 -0
- package/fesm2022/ngneers-controls-upload.mjs.map +1 -0
- package/fesm2022/ngneers-controls-utils-ng.mjs +411 -0
- package/fesm2022/ngneers-controls-utils-ng.mjs.map +1 -0
- package/fesm2022/ngneers-controls-utils.mjs +261 -0
- package/fesm2022/ngneers-controls-utils.mjs.map +1 -0
- package/fesm2022/ngneers-controls.mjs +6 -0
- package/fesm2022/ngneers-controls.mjs.map +1 -0
- package/package.json +302 -0
- package/types/ngneers-controls-accordion.d.ts +139 -0
- package/types/ngneers-controls-api-ng.d.ts +364 -0
- package/types/ngneers-controls-api-resize.d.ts +318 -0
- package/types/ngneers-controls-api.d.ts +145 -0
- package/types/ngneers-controls-avatar.d.ts +54 -0
- package/types/ngneers-controls-base.d.ts +277 -0
- package/types/ngneers-controls-breadcrumb.d.ts +272 -0
- package/types/ngneers-controls-button-group.d.ts +46 -0
- package/types/ngneers-controls-button.d.ts +48 -0
- package/types/ngneers-controls-calendar.d.ts +466 -0
- package/types/ngneers-controls-checkbox.d.ts +40 -0
- package/types/ngneers-controls-chip.d.ts +202 -0
- package/types/ngneers-controls-default-icons.d.ts +5 -0
- package/types/ngneers-controls-defer.d.ts +48 -0
- package/types/ngneers-controls-dialog.d.ts +399 -0
- package/types/ngneers-controls-directives.d.ts +171 -0
- package/types/ngneers-controls-drawer.d.ts +308 -0
- package/types/ngneers-controls-edit-inplace.d.ts +263 -0
- package/types/ngneers-controls-errors.d.ts +155 -0
- package/types/ngneers-controls-filter.d.ts +609 -0
- package/types/ngneers-controls-hint.d.ts +88 -0
- package/types/ngneers-controls-i18n-translations-de.d.ts +164 -0
- package/types/ngneers-controls-i18n-translations-en.d.ts +164 -0
- package/types/ngneers-controls-i18n.d.ts +186 -0
- package/types/ngneers-controls-icon.d.ts +68 -0
- package/types/ngneers-controls-inplace.d.ts +98 -0
- package/types/ngneers-controls-input-field.d.ts +248 -0
- package/types/ngneers-controls-input.d.ts +30 -0
- package/types/ngneers-controls-item-view.d.ts +215 -0
- package/types/ngneers-controls-list-box.d.ts +334 -0
- package/types/ngneers-controls-mask-input.d.ts +434 -0
- package/types/ngneers-controls-menu.d.ts +192 -0
- package/types/ngneers-controls-message.d.ts +21 -0
- package/types/ngneers-controls-number-input.d.ts +146 -0
- package/types/ngneers-controls-paginator.d.ts +255 -0
- package/types/ngneers-controls-popover.d.ts +116 -0
- package/types/ngneers-controls-progress.d.ts +49 -0
- package/types/ngneers-controls-radio.d.ts +91 -0
- package/types/ngneers-controls-roving-focus.d.ts +107 -0
- package/types/ngneers-controls-scroll-shadow.d.ts +25 -0
- package/types/ngneers-controls-scroller.d.ts +151 -0
- package/types/ngneers-controls-select-button.d.ts +51 -0
- package/types/ngneers-controls-select.d.ts +409 -0
- package/types/ngneers-controls-slider.d.ts +57 -0
- package/types/ngneers-controls-snackbar.d.ts +330 -0
- package/types/ngneers-controls-spin-buttons.d.ts +69 -0
- package/types/ngneers-controls-spinner.d.ts +117 -0
- package/types/ngneers-controls-splitter.d.ts +465 -0
- package/types/ngneers-controls-state.d.ts +102 -0
- package/types/ngneers-controls-switch.d.ts +18 -0
- package/types/ngneers-controls-table.d.ts +3127 -0
- package/types/ngneers-controls-tabs.d.ts +118 -0
- package/types/ngneers-controls-tag.d.ts +21 -0
- package/types/ngneers-controls-toast.d.ts +298 -0
- package/types/ngneers-controls-toggle-button.d.ts +48 -0
- package/types/ngneers-controls-tooltip.d.ts +189 -0
- package/types/ngneers-controls-tree.d.ts +409 -0
- package/types/ngneers-controls-upload.d.ts +347 -0
- package/types/ngneers-controls-utils-ng.d.ts +129 -0
- package/types/ngneers-controls-utils.d.ts +130 -0
- package/types/ngneers-controls.d.ts +2 -0
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { TemplateRef, InjectionToken, Provider, Injector, OnInit } from '@angular/core';
|
|
3
|
+
import { NgnActionButtonConfig } from '@ngneers/controls/api';
|
|
4
|
+
import * as _ngneers_controls_custom_types from '@ngneers/controls-custom-types';
|
|
5
|
+
import { CustomColor, IconType } from '@ngneers/controls-custom-types';
|
|
6
|
+
import * as _iconify_types from '@iconify/types';
|
|
7
|
+
import * as _ngneers_signal_translate from '@ngneers/signal-translate';
|
|
8
|
+
import * as _ngneers_controls_api_ng from '@ngneers/controls/api/ng';
|
|
9
|
+
import * as _ngneers_controls_themes from '@ngneers/controls-themes';
|
|
10
|
+
import { NgnBase } from '@ngneers/controls/base';
|
|
11
|
+
|
|
12
|
+
type HeaderTemplateType = {
|
|
13
|
+
header?: string;
|
|
14
|
+
closable: boolean;
|
|
15
|
+
closeSnackbar: () => void;
|
|
16
|
+
};
|
|
17
|
+
type ContentTemplateType = {
|
|
18
|
+
content?: string;
|
|
19
|
+
};
|
|
20
|
+
type NgnSnackbarOptionsMeta = {
|
|
21
|
+
closable?: boolean;
|
|
22
|
+
color?: CustomColor;
|
|
23
|
+
icon?: IconType;
|
|
24
|
+
autoHide?: number | false;
|
|
25
|
+
actions?: NgnActionButtonConfig[];
|
|
26
|
+
showProgress?: boolean;
|
|
27
|
+
pauseOnHover?: boolean;
|
|
28
|
+
ariaLive?: 'polite' | 'assertive' | 'off';
|
|
29
|
+
};
|
|
30
|
+
type NgnSnackbarOptions = NgnSnackbarOptionsMeta & {
|
|
31
|
+
header?: string;
|
|
32
|
+
content?: string;
|
|
33
|
+
headerTemplate?: TemplateRef<HeaderTemplateType>;
|
|
34
|
+
contentTemplate?: TemplateRef<ContentTemplateType>;
|
|
35
|
+
};
|
|
36
|
+
type NgnSnackbarRef = {
|
|
37
|
+
hide: () => void;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
type NgnSnackbarFeature = {
|
|
41
|
+
providers: Provider[];
|
|
42
|
+
};
|
|
43
|
+
declare const NGN_SNACKBAR_USER_DEFAULTS: InjectionToken<NgnSnackbarOptionsMeta>;
|
|
44
|
+
declare function withSnackbars(defaultOptions?: NgnSnackbarOptionsMeta): NgnSnackbarFeature;
|
|
45
|
+
|
|
46
|
+
declare class SnackbarCreator {
|
|
47
|
+
private readonly _manager;
|
|
48
|
+
constructor();
|
|
49
|
+
show(options: NgnSnackbarOptions): NgnSnackbarRef;
|
|
50
|
+
}
|
|
51
|
+
declare function injectSnackbarCreator(injector?: Injector): SnackbarCreator;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Template inputs for {@link NgnSnackbar}, extracted into a dedicated base class so the
|
|
55
|
+
* component itself stays focused on behavior.
|
|
56
|
+
*/
|
|
57
|
+
declare abstract class SnackbarTemplates extends NgnBase<'snackbar'> {
|
|
58
|
+
/** Custom template for the snackbar body, rendered in place of the plain `content` string. */
|
|
59
|
+
readonly templateContent: _angular_core.InputSignal<TemplateRef<ContentTemplateType> | null | undefined>;
|
|
60
|
+
/** Custom template for the snackbar header, rendered in place of the plain `header` string. */
|
|
61
|
+
readonly templateHeader: _angular_core.InputSignal<TemplateRef<HeaderTemplateType> | null | undefined>;
|
|
62
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SnackbarTemplates, never>;
|
|
63
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SnackbarTemplates, never, never, { "templateContent": { "alias": "templateContent"; "required": false; "isSignal": true; }; "templateHeader": { "alias": "templateHeader"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* @category control
|
|
68
|
+
*/
|
|
69
|
+
declare class NgnSnackbar extends SnackbarTemplates implements OnInit {
|
|
70
|
+
protected readonly theme: _ngneers_controls_api_ng.ControlTemplateInfo<_ngneers_controls_themes.ControlTemplate<"snackbar", ["root", "host", "body", "anim-enter", "anim-leave", "defaultHeader", "defaultHeaderText", "defaultContent", "actions", "progressBar", "closeButton", "sr-only", `color-${string}`], readonly []>>;
|
|
71
|
+
protected readonly i18n: _ngneers_signal_translate.TranslationsSignal<{
|
|
72
|
+
calendar: {
|
|
73
|
+
today: string;
|
|
74
|
+
input: string;
|
|
75
|
+
selectYear: string;
|
|
76
|
+
selectMonth: string;
|
|
77
|
+
previousMonth: string;
|
|
78
|
+
nextMonth: string;
|
|
79
|
+
weekdays: {
|
|
80
|
+
monday: string;
|
|
81
|
+
tuesday: string;
|
|
82
|
+
wednesday: string;
|
|
83
|
+
thursday: string;
|
|
84
|
+
friday: string;
|
|
85
|
+
saturday: string;
|
|
86
|
+
sunday: string;
|
|
87
|
+
};
|
|
88
|
+
weekdaysShort: {
|
|
89
|
+
monday: string;
|
|
90
|
+
tuesday: string;
|
|
91
|
+
wednesday: string;
|
|
92
|
+
thursday: string;
|
|
93
|
+
friday: string;
|
|
94
|
+
saturday: string;
|
|
95
|
+
sunday: string;
|
|
96
|
+
};
|
|
97
|
+
months: {
|
|
98
|
+
january: string;
|
|
99
|
+
february: string;
|
|
100
|
+
march: string;
|
|
101
|
+
april: string;
|
|
102
|
+
may: string;
|
|
103
|
+
june: string;
|
|
104
|
+
july: string;
|
|
105
|
+
august: string;
|
|
106
|
+
september: string;
|
|
107
|
+
october: string;
|
|
108
|
+
november: string;
|
|
109
|
+
december: string;
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
editInplace: {
|
|
113
|
+
placeholder: string;
|
|
114
|
+
confirm: string;
|
|
115
|
+
};
|
|
116
|
+
filter: {
|
|
117
|
+
noFilter: string;
|
|
118
|
+
addCondition: string;
|
|
119
|
+
removeCondition: string;
|
|
120
|
+
operator: string;
|
|
121
|
+
value: string;
|
|
122
|
+
clear: string;
|
|
123
|
+
apply: string;
|
|
124
|
+
cancel: string;
|
|
125
|
+
matchModeLabel: string;
|
|
126
|
+
match: {
|
|
127
|
+
all: string;
|
|
128
|
+
any: string;
|
|
129
|
+
and: string;
|
|
130
|
+
or: string;
|
|
131
|
+
};
|
|
132
|
+
selected: string;
|
|
133
|
+
conditions: string;
|
|
134
|
+
operators: {
|
|
135
|
+
isEqual: string;
|
|
136
|
+
isNotEqual: string;
|
|
137
|
+
contains: string;
|
|
138
|
+
startsWith: string;
|
|
139
|
+
endsWith: string;
|
|
140
|
+
in: string;
|
|
141
|
+
isEmpty: string;
|
|
142
|
+
isNotEmpty: string;
|
|
143
|
+
greaterThan: string;
|
|
144
|
+
greaterThanOrEqual: string;
|
|
145
|
+
lessThan: string;
|
|
146
|
+
lessThanOrEqual: string;
|
|
147
|
+
after: string;
|
|
148
|
+
onOrAfter: string;
|
|
149
|
+
before: string;
|
|
150
|
+
onOrBefore: string;
|
|
151
|
+
isTrue: string;
|
|
152
|
+
isFalse: string;
|
|
153
|
+
custom: string;
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
splitter: {
|
|
157
|
+
handleLabel: string;
|
|
158
|
+
};
|
|
159
|
+
inputField: {
|
|
160
|
+
clearInput: string;
|
|
161
|
+
};
|
|
162
|
+
maskInput: {
|
|
163
|
+
roleDescription: string;
|
|
164
|
+
segmentRange: string;
|
|
165
|
+
optionSeparator: string;
|
|
166
|
+
};
|
|
167
|
+
drawer: {
|
|
168
|
+
close: string;
|
|
169
|
+
};
|
|
170
|
+
dialog: {
|
|
171
|
+
close: string;
|
|
172
|
+
};
|
|
173
|
+
chip: {
|
|
174
|
+
close: string;
|
|
175
|
+
};
|
|
176
|
+
breadcrumb: {
|
|
177
|
+
overflow: string;
|
|
178
|
+
};
|
|
179
|
+
toast: {
|
|
180
|
+
close: string;
|
|
181
|
+
region: string;
|
|
182
|
+
};
|
|
183
|
+
snackbar: {
|
|
184
|
+
close: string;
|
|
185
|
+
region: string;
|
|
186
|
+
severity: {
|
|
187
|
+
error: string;
|
|
188
|
+
warning: string;
|
|
189
|
+
success: string;
|
|
190
|
+
info: string;
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
upload: {
|
|
194
|
+
upload: string;
|
|
195
|
+
uploadNamed: string;
|
|
196
|
+
retryNamed: string;
|
|
197
|
+
cancelNamed: string;
|
|
198
|
+
removeNamed: string;
|
|
199
|
+
progressNamed: string;
|
|
200
|
+
};
|
|
201
|
+
select: {
|
|
202
|
+
filterOptions: string;
|
|
203
|
+
};
|
|
204
|
+
paginator: {
|
|
205
|
+
previousPage: string;
|
|
206
|
+
nextPage: string;
|
|
207
|
+
};
|
|
208
|
+
listBox: {
|
|
209
|
+
noItemsFound: string;
|
|
210
|
+
};
|
|
211
|
+
tree: {
|
|
212
|
+
noItemsFound: string;
|
|
213
|
+
};
|
|
214
|
+
table: {
|
|
215
|
+
selectAllRows: string;
|
|
216
|
+
selectRow: string;
|
|
217
|
+
sortedBy: string;
|
|
218
|
+
sortAscending: string;
|
|
219
|
+
sortDescending: string;
|
|
220
|
+
sortCleared: string;
|
|
221
|
+
selectedCount: string;
|
|
222
|
+
page: string;
|
|
223
|
+
resultCount: string;
|
|
224
|
+
};
|
|
225
|
+
state: {
|
|
226
|
+
loading: string;
|
|
227
|
+
success: string;
|
|
228
|
+
warning: string;
|
|
229
|
+
error: string;
|
|
230
|
+
cancelled: string;
|
|
231
|
+
};
|
|
232
|
+
}, "_">;
|
|
233
|
+
private readonly _host;
|
|
234
|
+
/** Heading text shown at the top of the snackbar. Overridden by {@link templateHeader}. */
|
|
235
|
+
readonly header: _angular_core.InputSignal<string | undefined>;
|
|
236
|
+
/** Body text of the snackbar. Overridden by {@link templateContent}. */
|
|
237
|
+
readonly content: _angular_core.InputSignal<string | undefined>;
|
|
238
|
+
/** Icon shown at the start of the snackbar. */
|
|
239
|
+
readonly icon: _angular_core.InputSignal<_iconify_types.IconifyIcon | _ngneers_controls_custom_types.NgnIconEntry | undefined>;
|
|
240
|
+
/** Icon used for the close button when {@link closable} is enabled. */
|
|
241
|
+
readonly iconClose: _angular_core.InputSignal<_iconify_types.IconifyIcon | _ngneers_controls_custom_types.NgnIconEntry | undefined>;
|
|
242
|
+
/**
|
|
243
|
+
* Whether to render a close button that lets the user dismiss the snackbar.
|
|
244
|
+
* @default false
|
|
245
|
+
*/
|
|
246
|
+
readonly closable: _angular_core.InputSignal<boolean | undefined>;
|
|
247
|
+
/**
|
|
248
|
+
* Time in ms before the snackbar auto-dismisses, or `false` to keep it open
|
|
249
|
+
* until dismissed manually.
|
|
250
|
+
* @default 5000
|
|
251
|
+
*/
|
|
252
|
+
readonly autoHide: _angular_core.InputSignal<number | false | undefined>;
|
|
253
|
+
/** Emitted when the snackbar is dismissed (by the timer, close button, or an action). */
|
|
254
|
+
readonly closeSnackbar: _angular_core.OutputEmitterRef<void>;
|
|
255
|
+
/**
|
|
256
|
+
* Action buttons rendered at the end of the snackbar. Clicking any action always
|
|
257
|
+
* dismisses the snackbar; its `action` callback fires first. Import the config
|
|
258
|
+
* type from `@ngneers/controls/api`.
|
|
259
|
+
*/
|
|
260
|
+
readonly actions: _angular_core.InputSignal<NgnActionButtonConfig[] | undefined>;
|
|
261
|
+
/**
|
|
262
|
+
* Shows a thin progress bar at the bottom of the snackbar that depletes over the
|
|
263
|
+
* {@link autoHide} duration.
|
|
264
|
+
* @default true
|
|
265
|
+
*/
|
|
266
|
+
readonly showProgress: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
267
|
+
/**
|
|
268
|
+
* Pauses the auto-hide timer and progress bar while the snackbar is hovered,
|
|
269
|
+
* resuming from the current position on mouse leave.
|
|
270
|
+
* @default true
|
|
271
|
+
*/
|
|
272
|
+
readonly pauseOnHover: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
273
|
+
/**
|
|
274
|
+
* Politeness of the live region used to announce the snackbar to assistive tech.
|
|
275
|
+
* When omitted, it is derived from {@link color}: `error`/`warning` announce as
|
|
276
|
+
* `assertive` (mapped to `role="alert"`), everything else as `polite`
|
|
277
|
+
* (`role="status"`).
|
|
278
|
+
*/
|
|
279
|
+
readonly ariaLive: _angular_core.InputSignal<"polite" | "assertive" | "off" | undefined>;
|
|
280
|
+
/** Resolved live-region politeness — explicit input, else derived from color. */
|
|
281
|
+
protected readonly liveMode: _angular_core.Signal<"polite" | "assertive" | "off">;
|
|
282
|
+
/** Landmark role paired with {@link liveMode} — `alert` when assertive, else `status`. */
|
|
283
|
+
protected readonly role: _angular_core.Signal<"status" | "alert">;
|
|
284
|
+
/**
|
|
285
|
+
* A visually-hidden severity prefix (e.g. "Error:") announced before the header
|
|
286
|
+
* so screen-reader users get the semantic that sighted users read from color.
|
|
287
|
+
* Only emitted for the known semantic colors.
|
|
288
|
+
*/
|
|
289
|
+
protected readonly severityLabel: _angular_core.Signal<string | undefined>;
|
|
290
|
+
protected readonly paused: _angular_core.WritableSignal<boolean>;
|
|
291
|
+
/** Auto-hide duration in ms, or 0 when auto-hide is disabled. Drives the progress bar. */
|
|
292
|
+
protected readonly autoHideMs: _angular_core.Signal<number>;
|
|
293
|
+
private _closeTimeout?;
|
|
294
|
+
private _remaining;
|
|
295
|
+
private _startedAt;
|
|
296
|
+
private _hovered;
|
|
297
|
+
private _focused;
|
|
298
|
+
private _regionPaused;
|
|
299
|
+
/** Element that had focus before the user moved into the snackbar; focus returns here on close. */
|
|
300
|
+
private _returnFocus;
|
|
301
|
+
ngOnInit(): void;
|
|
302
|
+
private startHideTimer;
|
|
303
|
+
private pauseHideTimer;
|
|
304
|
+
/**
|
|
305
|
+
* Pause the auto-hide timer while the snackbar is hovered (opt-in via
|
|
306
|
+
* {@link pauseOnHover}), focused (always — a WCAG 2.2.1 requirement so keyboard
|
|
307
|
+
* and screen-reader users can read it), or while the whole region holds focus,
|
|
308
|
+
* resuming once none holds.
|
|
309
|
+
*/
|
|
310
|
+
private updatePause;
|
|
311
|
+
/** Move DOM focus to the snackbar root (used by the region's roving/hotkey navigation). */
|
|
312
|
+
focus(): void;
|
|
313
|
+
/** Freeze the timer because the notification region as a whole holds focus. */
|
|
314
|
+
regionPause(): void;
|
|
315
|
+
/** Release the region-level freeze; resumes unless still hovered/focused. */
|
|
316
|
+
regionResume(): void;
|
|
317
|
+
protected close(): void;
|
|
318
|
+
/** Return focus to the pre-snackbar element when it is dismissed while focused within. */
|
|
319
|
+
private restoreFocus;
|
|
320
|
+
protected onEscape(): void;
|
|
321
|
+
protected mouseEnter(): void;
|
|
322
|
+
protected mouseLeave(): void;
|
|
323
|
+
protected focusEnter(event: FocusEvent): void;
|
|
324
|
+
protected focusLeave(event: FocusEvent): void;
|
|
325
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgnSnackbar, never>;
|
|
326
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgnSnackbar, "ngn-snackbar", never, { "header": { "alias": "header"; "required": false; "isSignal": true; }; "content": { "alias": "content"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "iconClose": { "alias": "iconClose"; "required": false; "isSignal": true; }; "closable": { "alias": "closable"; "required": false; "isSignal": true; }; "autoHide": { "alias": "autoHide"; "required": false; "isSignal": true; }; "actions": { "alias": "actions"; "required": false; "isSignal": true; }; "showProgress": { "alias": "showProgress"; "required": false; "isSignal": true; }; "pauseOnHover": { "alias": "pauseOnHover"; "required": false; "isSignal": true; }; "ariaLive": { "alias": "ariaLive"; "required": false; "isSignal": true; }; }, { "closeSnackbar": "closeSnackbar"; }, never, never, true, never>;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
export { NGN_SNACKBAR_USER_DEFAULTS, NgnSnackbar, SnackbarCreator, injectSnackbarCreator, withSnackbars };
|
|
330
|
+
export type { ContentTemplateType, HeaderTemplateType, NgnSnackbarFeature, NgnSnackbarOptions, NgnSnackbarOptionsMeta, NgnSnackbarRef };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import * as _ngneers_controls_custom_types from '@ngneers/controls-custom-types';
|
|
2
|
+
import * as _iconify_types from '@iconify/types';
|
|
3
|
+
import * as _angular_core from '@angular/core';
|
|
4
|
+
import * as _ngneers_controls_api_ng from '@ngneers/controls/api/ng';
|
|
5
|
+
import * as _ngneers_controls_themes from '@ngneers/controls-themes';
|
|
6
|
+
import { NgnBase, AnyNgnBase } from '@ngneers/controls/base';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Increment/decrement buttons for a steppable control (e.g. `ngnNumberInput`).
|
|
10
|
+
*
|
|
11
|
+
* Inside an `ngn-input-field` the buttons find the field's primary control
|
|
12
|
+
* automatically; outside (or to target a specific control) bind `[for]` to a
|
|
13
|
+
* control instance (e.g. a `#num="ngnNumberInput"` template reference).
|
|
14
|
+
*
|
|
15
|
+
* The buttons are a pointer affordance only (`tabindex="-1"`, `aria-hidden`):
|
|
16
|
+
* keyboard users step via `ArrowUp`/`ArrowDown` on the control itself, which
|
|
17
|
+
* carries the `spinbutton` role. Press-and-hold auto-repeats; the buttons
|
|
18
|
+
* disable at the control's min/max bounds.
|
|
19
|
+
*
|
|
20
|
+
* Use `buttons="increment"`/`buttons="decrement"` on two instances to flank
|
|
21
|
+
* an input on both sides; the stacked/inline arrangement of the `both` pair
|
|
22
|
+
* is a theme kind (`kind="stacked" | "inline"`).
|
|
23
|
+
*
|
|
24
|
+
* @category control
|
|
25
|
+
*/
|
|
26
|
+
declare class NgnSpinButtons extends NgnBase<'spinButtons'> {
|
|
27
|
+
protected readonly theme: _ngneers_controls_api_ng.ControlTemplateInfo<_ngneers_controls_themes.ControlTemplate<"spinButtons", ["root", "leading", "trailing", "pair", `kind-${string}`], readonly [{
|
|
28
|
+
readonly class: "decrement";
|
|
29
|
+
readonly template: _ngneers_controls_themes.ControlTemplate<"button", ["root", "inline", "loading", `kind-${string}`, `color-${string}`], readonly []>;
|
|
30
|
+
}, {
|
|
31
|
+
readonly class: "increment";
|
|
32
|
+
readonly template: _ngneers_controls_themes.ControlTemplate<"button", ["root", "inline", "loading", `kind-${string}`, `color-${string}`], readonly []>;
|
|
33
|
+
}]>>;
|
|
34
|
+
/**
|
|
35
|
+
* Which buttons to render. Use two instances (`decrement` + `increment`)
|
|
36
|
+
* to place one button on each side of the input.
|
|
37
|
+
* @default 'both'
|
|
38
|
+
*/
|
|
39
|
+
readonly buttons: _angular_core.InputSignal<"decrement" | "increment" | "both">;
|
|
40
|
+
/**
|
|
41
|
+
* The control to step. Falls back to the primary control of a surrounding
|
|
42
|
+
* `ngn-input-field`.
|
|
43
|
+
*/
|
|
44
|
+
readonly for: _angular_core.InputSignal<AnyNgnBase | undefined>;
|
|
45
|
+
/** Custom icon for the increment button. */
|
|
46
|
+
readonly iconIncrement: _angular_core.InputSignal<_iconify_types.IconifyIcon | _ngneers_controls_custom_types.NgnIconEntry | undefined>;
|
|
47
|
+
/** Custom icon for the decrement button. */
|
|
48
|
+
readonly iconDecrement: _angular_core.InputSignal<_iconify_types.IconifyIcon | _ngneers_controls_custom_types.NgnIconEntry | undefined>;
|
|
49
|
+
private readonly _field;
|
|
50
|
+
/** The resolved step target: explicit `for` wins over the surrounding field. */
|
|
51
|
+
protected readonly target: _angular_core.Signal<AnyNgnBase | undefined>;
|
|
52
|
+
private _holdTimeout;
|
|
53
|
+
private _holdInterval;
|
|
54
|
+
constructor();
|
|
55
|
+
protected canStep(direction: 1 | -1): boolean;
|
|
56
|
+
/**
|
|
57
|
+
* First step on pointer down (like native spinners), then auto-repeat while
|
|
58
|
+
* held. `preventDefault` keeps focus (and caret) where it is.
|
|
59
|
+
*/
|
|
60
|
+
protected pressStart(event: PointerEvent, direction: 1 | -1): void;
|
|
61
|
+
protected pressEnd(): void;
|
|
62
|
+
/** Stepping already happened on pointer down — just keep the click local. */
|
|
63
|
+
protected clicked(event: MouseEvent): void;
|
|
64
|
+
private _stopRepeat;
|
|
65
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgnSpinButtons, never>;
|
|
66
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgnSpinButtons, "ngn-spin-buttons", never, { "buttons": { "alias": "buttons"; "required": false; "isSignal": true; }; "for": { "alias": "for"; "required": false; "isSignal": true; }; "iconIncrement": { "alias": "iconIncrement"; "required": false; "isSignal": true; }; "iconDecrement": { "alias": "iconDecrement"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export { NgnSpinButtons };
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { ElementRef, Signal, Injector } from '@angular/core';
|
|
3
|
+
import { CustomColor } from '@ngneers/controls-custom-types';
|
|
4
|
+
import * as _ngneers_controls_api_ng from '@ngneers/controls/api/ng';
|
|
5
|
+
import * as _ngneers_controls_themes from '@ngneers/controls-themes';
|
|
6
|
+
import { NgnBase } from '@ngneers/controls/base';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Creates an instance of the spinner creator.
|
|
10
|
+
*
|
|
11
|
+
* @param injector The injector to use. Defaults to the current injector.
|
|
12
|
+
* @returns The spinner creator.
|
|
13
|
+
*/
|
|
14
|
+
declare function injectSpinnerCreator(injector?: Injector): NgnSpinnerCreator;
|
|
15
|
+
/**
|
|
16
|
+
* Creates and manages a conditional spinner based on a visibility signal.
|
|
17
|
+
* @param isVisible Signal that determines whether the spinner is visible.
|
|
18
|
+
* @param options Optional configuration for the spinner.
|
|
19
|
+
*/
|
|
20
|
+
declare function createConditionalSpinner(isVisible: Signal<boolean>, options?: {
|
|
21
|
+
/**
|
|
22
|
+
* Options for the spinner instance.
|
|
23
|
+
*/
|
|
24
|
+
spinnerOptions?: SpinnerOptions;
|
|
25
|
+
/**
|
|
26
|
+
* Debounce time in milliseconds or a boolean indicating whether to debounce (default is 200ms).
|
|
27
|
+
*/
|
|
28
|
+
debounce?: number | boolean;
|
|
29
|
+
/**
|
|
30
|
+
* The target element where the spinner will be attached.
|
|
31
|
+
* If a string is provided, it will be used as a selector to find the element.
|
|
32
|
+
* If omitted, the spinner will be attached to the host element of the current injector.
|
|
33
|
+
*/
|
|
34
|
+
element?: SpinnerTarget;
|
|
35
|
+
/**
|
|
36
|
+
* The injector to use. If omitted, the current injector will be used.
|
|
37
|
+
*/
|
|
38
|
+
injector?: Injector;
|
|
39
|
+
}): void;
|
|
40
|
+
type SpinnerRef = {
|
|
41
|
+
/**
|
|
42
|
+
* Hides the spinner.
|
|
43
|
+
*/
|
|
44
|
+
hide: () => void;
|
|
45
|
+
};
|
|
46
|
+
type SpinnerTarget = HTMLElement | ElementRef<HTMLElement> | string;
|
|
47
|
+
type SpinnerOptions = {
|
|
48
|
+
/**
|
|
49
|
+
* The color of the spinner.
|
|
50
|
+
*/
|
|
51
|
+
color?: CustomColor;
|
|
52
|
+
/**
|
|
53
|
+
* The diameter of the spinner in pixels.
|
|
54
|
+
* @default 64
|
|
55
|
+
*/
|
|
56
|
+
size?: number;
|
|
57
|
+
/**
|
|
58
|
+
* The thickness of the spinner's stroke. If not provided,
|
|
59
|
+
* a default thickness derived from the size will be used.
|
|
60
|
+
* @default undefined
|
|
61
|
+
*/
|
|
62
|
+
thickness?: string;
|
|
63
|
+
/**
|
|
64
|
+
* Whether the spinner should be centered within its container.
|
|
65
|
+
* @default true
|
|
66
|
+
*/
|
|
67
|
+
centered?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Set aria busy attribute on the reference element while the spinner is visible.
|
|
70
|
+
* @default true
|
|
71
|
+
*/
|
|
72
|
+
ariaBusy?: boolean;
|
|
73
|
+
};
|
|
74
|
+
declare class NgnSpinnerCreator {
|
|
75
|
+
private readonly _vcr;
|
|
76
|
+
private readonly _destroyRef;
|
|
77
|
+
private _destroyed;
|
|
78
|
+
constructor();
|
|
79
|
+
/**
|
|
80
|
+
* Shows a spinner on the specified target element.
|
|
81
|
+
* @param target The target element or selector where the spinner will be attached.
|
|
82
|
+
* If a string is provided, it will be used as a selector to find the element.
|
|
83
|
+
* If the element is not found, the spinner will be retried until it is found.
|
|
84
|
+
* @param options Optional configuration for the spinner.
|
|
85
|
+
* @returns A reference to the spinner instance.
|
|
86
|
+
*/
|
|
87
|
+
show(target: SpinnerTarget, options?: SpinnerOptions): SpinnerRef;
|
|
88
|
+
private _tryAttach;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* @category control
|
|
93
|
+
*/
|
|
94
|
+
declare class NgnSpinner extends NgnBase<'spinner'> {
|
|
95
|
+
protected readonly theme: _ngneers_controls_api_ng.ControlTemplateInfo<_ngneers_controls_themes.ControlTemplate<"spinner", ["root", "circle", "svg", `color-${string}`, "centered"], readonly []>>;
|
|
96
|
+
/**
|
|
97
|
+
* Diameter of the spinner in pixels.
|
|
98
|
+
* @default 64
|
|
99
|
+
*/
|
|
100
|
+
readonly size: _angular_core.InputSignal<number>;
|
|
101
|
+
/**
|
|
102
|
+
* Stroke width of the spinner ring as a CSS length (e.g. `'4px'`).
|
|
103
|
+
* Falls back to the theme's default thickness when unset.
|
|
104
|
+
*/
|
|
105
|
+
readonly thickness: _angular_core.InputSignal<string | undefined>;
|
|
106
|
+
/**
|
|
107
|
+
* Whether to center the spinner within its containing block.
|
|
108
|
+
* @default false
|
|
109
|
+
*/
|
|
110
|
+
readonly centered: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
111
|
+
protected readonly viewBox: _angular_core.Signal<string>;
|
|
112
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgnSpinner, never>;
|
|
113
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgnSpinner, "ngn-spinner", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; "thickness": { "alias": "thickness"; "required": false; "isSignal": true; }; "centered": { "alias": "centered"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export { NgnSpinner, createConditionalSpinner, injectSpinnerCreator };
|
|
117
|
+
export type { SpinnerOptions, SpinnerRef, SpinnerTarget };
|