@ng-solid/design-system 22.2.2 → 22.4.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/README.md +4 -0
- package/fesm2022/ng-solid-design-system.mjs +3736 -482
- package/fesm2022/ng-solid-design-system.mjs.map +1 -1
- package/package.json +1 -1
- package/themes/README.md +72 -1
- package/themes/tailwind.css +15 -0
- package/types/ng-solid-design-system.d.ts +683 -89
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DateValue, DayOfWeek } from '@internationalized/date';
|
|
2
2
|
import * as _angular_core from '@angular/core';
|
|
3
|
-
import { ElementRef,
|
|
3
|
+
import { ElementRef, AfterViewInit, OnDestroy, TemplateRef, OnInit, Type, Signal, ComponentRef, OnChanges, SimpleChanges, InjectionToken, EnvironmentProviders } from '@angular/core';
|
|
4
4
|
import { FormGroup, ControlValueAccessor } from '@angular/forms';
|
|
5
5
|
import { NsFile } from '@ng-solid/core';
|
|
6
6
|
import { Subject } from 'rxjs';
|
|
@@ -74,6 +74,28 @@ declare class NsAvatarComponent {
|
|
|
74
74
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsAvatarComponent, "ns-avatar", never, { "src": { "alias": "src"; "required": false; "isSignal": true; }; "alt": { "alias": "alt"; "required": false; "isSignal": true; }; "initials": { "alias": "initials"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "shape": { "alias": "shape"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
+
/**
|
|
78
|
+
* Stacks projected `ns-avatar` instances with a configurable overlap and
|
|
79
|
+
* collapses the overflow into a "+N" counter. Overlap and visibility are
|
|
80
|
+
* applied imperatively to each projected avatar's native element (read via
|
|
81
|
+
* `contentChildren(..., { read: ElementRef })`) rather than through
|
|
82
|
+
* `::ng-deep`, since the overlap is a per-instance numeric input, not a
|
|
83
|
+
* design token.
|
|
84
|
+
*/
|
|
85
|
+
declare class NsAvatarGroupComponent {
|
|
86
|
+
readonly overlap: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
87
|
+
readonly max: _angular_core.InputSignal<number>;
|
|
88
|
+
readonly total: _angular_core.InputSignal<number>;
|
|
89
|
+
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
90
|
+
private readonly avatars;
|
|
91
|
+
readonly visibleCount: _angular_core.Signal<number>;
|
|
92
|
+
readonly overflowCount: _angular_core.Signal<number>;
|
|
93
|
+
constructor();
|
|
94
|
+
private syncAvatars;
|
|
95
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NsAvatarGroupComponent, never>;
|
|
96
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsAvatarGroupComponent, "ns-avatar-group", never, { "overlap": { "alias": "overlap"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "total": { "alias": "total"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, {}, ["avatars"], ["*"], true, never>;
|
|
97
|
+
}
|
|
98
|
+
|
|
77
99
|
type NsBadgeMode = 'count' | 'dot';
|
|
78
100
|
declare class NsBadgeComponent {
|
|
79
101
|
readonly count: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
@@ -100,7 +122,7 @@ declare class NsBreadcrumbsComponent {
|
|
|
100
122
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsBreadcrumbsComponent, "ns-breadcrumbs", never, { "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
101
123
|
}
|
|
102
124
|
|
|
103
|
-
type NsButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'success' | 'danger';
|
|
125
|
+
type NsButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'success' | 'danger' | 'dark';
|
|
104
126
|
declare class NsButtonComponent {
|
|
105
127
|
readonly type: _angular_core.InputSignal<"button" | "submit" | "reset">;
|
|
106
128
|
readonly variant: _angular_core.InputSignal<NsButtonVariant>;
|
|
@@ -112,15 +134,38 @@ declare class NsButtonComponent {
|
|
|
112
134
|
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
113
135
|
readonly loading: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
114
136
|
readonly selected: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
137
|
+
/**
|
|
138
|
+
* Roving-tabindex participation, managed by a hosting `ns-button-group`.
|
|
139
|
+
* `true` (the default) leaves the button's native tabbing behavior alone;
|
|
140
|
+
* a group sets it to `false` on every button except the current roving
|
|
141
|
+
* stop.
|
|
142
|
+
*/
|
|
143
|
+
readonly active: _angular_core.WritableSignal<boolean>;
|
|
144
|
+
/**
|
|
145
|
+
* Radio semantics, managed by a hosting `ns-button-group` in
|
|
146
|
+
* `selectionMode="single"`. Swaps `aria-pressed` for `role="radio"` +
|
|
147
|
+
* `aria-checked`.
|
|
148
|
+
*/
|
|
149
|
+
readonly checkable: _angular_core.WritableSignal<boolean>;
|
|
150
|
+
private readonly control;
|
|
151
|
+
focus(): void;
|
|
115
152
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NsButtonComponent, never>;
|
|
116
153
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsButtonComponent, "ns-button", never, { "type": { "alias": "type"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "iconOnly": { "alias": "iconOnly"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "block": { "alias": "block"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
117
154
|
}
|
|
118
155
|
|
|
156
|
+
type NsButtonGroupSelectionMode = 'single' | 'multiple';
|
|
119
157
|
declare class NsButtonGroupComponent {
|
|
120
158
|
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
121
159
|
readonly orientation: _angular_core.InputSignal<NsOrientation>;
|
|
160
|
+
readonly selectionMode: _angular_core.InputSignal<NsButtonGroupSelectionMode>;
|
|
161
|
+
readonly buttons: _angular_core.Signal<readonly NsButtonComponent[]>;
|
|
162
|
+
private activeIndex;
|
|
163
|
+
constructor();
|
|
164
|
+
onKeydown(event: KeyboardEvent): void;
|
|
165
|
+
private focus;
|
|
166
|
+
private syncState;
|
|
122
167
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NsButtonGroupComponent, never>;
|
|
123
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsButtonGroupComponent, "ns-button-group", never, { "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; }, {},
|
|
168
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsButtonGroupComponent, "ns-button-group", never, { "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; }, {}, ["buttons"], ["*"], true, never>;
|
|
124
169
|
}
|
|
125
170
|
|
|
126
171
|
declare class NsCardComponent {
|
|
@@ -142,15 +187,29 @@ declare class NsCardFooterComponent {
|
|
|
142
187
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsCardFooterComponent, "ns-card-footer", never, {}, {}, never, ["*"], true, never>;
|
|
143
188
|
}
|
|
144
189
|
|
|
190
|
+
/**
|
|
191
|
+
* Chip-local color union. `info` and `selected` are compact filter/status
|
|
192
|
+
* treatments specific to `ns-chip` and are intentionally not added to the
|
|
193
|
+
* shared `NsColor` union, which many other components reuse.
|
|
194
|
+
*/
|
|
195
|
+
type NsChipColor = NsColor | 'info' | 'selected';
|
|
196
|
+
/**
|
|
197
|
+
* Chip-local variant union. `tint` is a filter/selection treatment (filled
|
|
198
|
+
* background, 1px border and text in the same status color) specific to
|
|
199
|
+
* `ns-chip` and intentionally not added to the shared `NsVariant` union.
|
|
200
|
+
*/
|
|
201
|
+
type NsChipVariant = Exclude<NsVariant, 'ghost'> | 'tint';
|
|
202
|
+
type NsChipSize = 'md' | 'pill' | 'choice';
|
|
145
203
|
declare class NsChipComponent {
|
|
146
|
-
readonly color: _angular_core.InputSignal<
|
|
147
|
-
readonly variant: _angular_core.InputSignal<
|
|
204
|
+
readonly color: _angular_core.InputSignal<NsChipColor>;
|
|
205
|
+
readonly variant: _angular_core.InputSignal<NsChipVariant>;
|
|
206
|
+
readonly size: _angular_core.InputSignal<NsChipSize>;
|
|
148
207
|
readonly dismissible: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
149
208
|
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
150
209
|
readonly dismissLabel: _angular_core.InputSignal<string>;
|
|
151
210
|
readonly removed: _angular_core.OutputEmitterRef<void>;
|
|
152
211
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NsChipComponent, never>;
|
|
153
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsChipComponent, "ns-chip", never, { "color": { "alias": "color"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "dismissible": { "alias": "dismissible"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "dismissLabel": { "alias": "dismissLabel"; "required": false; "isSignal": true; }; }, { "removed": "removed"; }, never, ["*"], true, never>;
|
|
212
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsChipComponent, "ns-chip", never, { "color": { "alias": "color"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "dismissible": { "alias": "dismissible"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "dismissLabel": { "alias": "dismissLabel"; "required": false; "isSignal": true; }; }, { "removed": "removed"; }, never, ["*"], true, never>;
|
|
154
213
|
}
|
|
155
214
|
|
|
156
215
|
declare class NsCollectionController<T = unknown, TKey extends NsKey = NsKey> {
|
|
@@ -168,62 +227,6 @@ declare class NsCollectionController<T = unknown, TKey extends NsKey = NsKey> {
|
|
|
168
227
|
clear(): void;
|
|
169
228
|
}
|
|
170
229
|
|
|
171
|
-
interface NsComment {
|
|
172
|
-
id?: number;
|
|
173
|
-
cover: {
|
|
174
|
-
url: string;
|
|
175
|
-
alt?: string;
|
|
176
|
-
};
|
|
177
|
-
message: string;
|
|
178
|
-
created?: string;
|
|
179
|
-
author: {
|
|
180
|
-
name: string;
|
|
181
|
-
link?: string;
|
|
182
|
-
};
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
declare class NsCommentComponent implements OnInit {
|
|
186
|
-
readonly title: _angular_core.InputSignal<string>;
|
|
187
|
-
readonly description: _angular_core.InputSignal<string>;
|
|
188
|
-
readonly placeholder: _angular_core.InputSignal<string>;
|
|
189
|
-
readonly messages: _angular_core.InputSignal<NsComment[]>;
|
|
190
|
-
readonly cover: _angular_core.InputSignal<{
|
|
191
|
-
url: string;
|
|
192
|
-
alt?: string;
|
|
193
|
-
}>;
|
|
194
|
-
readonly submitText: _angular_core.InputSignal<string>;
|
|
195
|
-
readonly logged: _angular_core.InputSignal<boolean>;
|
|
196
|
-
readonly maxLength: _angular_core.InputSignal<number>;
|
|
197
|
-
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
198
|
-
readonly commit: _angular_core.OutputEmitterRef<string>;
|
|
199
|
-
invalid: boolean;
|
|
200
|
-
content: string;
|
|
201
|
-
private clearEmptyValues;
|
|
202
|
-
constructor();
|
|
203
|
-
ngOnInit(): void;
|
|
204
|
-
publish(): void;
|
|
205
|
-
get counter(): number;
|
|
206
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NsCommentComponent, never>;
|
|
207
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsCommentComponent, "ns-comment", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "messages": { "alias": "messages"; "required": false; "isSignal": true; }; "cover": { "alias": "cover"; "required": false; "isSignal": true; }; "submitText": { "alias": "submitText"; "required": false; "isSignal": true; }; "logged": { "alias": "logged"; "required": false; "isSignal": true; }; "maxLength": { "alias": "maxLength"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "commit": "commit"; }, never, ["*"], true, never>;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
declare class NsDescriptionComponent {
|
|
211
|
-
private readonly ariaIds;
|
|
212
|
-
private readonly field;
|
|
213
|
-
private readonly destroyRef;
|
|
214
|
-
readonly id: _angular_core.InputSignal<string>;
|
|
215
|
-
readonly live: _angular_core.InputSignal<"off" | "polite" | "assertive">;
|
|
216
|
-
constructor();
|
|
217
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NsDescriptionComponent, never>;
|
|
218
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsDescriptionComponent, "ns-description", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "live": { "alias": "live"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
declare class NsDividerComponent {
|
|
222
|
-
readonly orientation: _angular_core.InputSignal<NsOrientation>;
|
|
223
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NsDividerComponent, never>;
|
|
224
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsDividerComponent, "ns-divider", never, { "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
230
|
type NsOverlayCloseReason = 'dismiss' | 'escape' | 'programmatic';
|
|
228
231
|
interface NsOverlayConfig {
|
|
229
232
|
origin?: HTMLElement;
|
|
@@ -304,6 +307,145 @@ declare class NsOverlayService {
|
|
|
304
307
|
}
|
|
305
308
|
declare function getNsOverlayPosition(origin: DOMRect, overlay: DOMRect, placement: NsPlacement, offset: number, viewportWidth: number, viewportHeight: number): NsOverlayPosition;
|
|
306
309
|
|
|
310
|
+
interface NsCommandItem {
|
|
311
|
+
id: string;
|
|
312
|
+
label: string;
|
|
313
|
+
meta?: string;
|
|
314
|
+
/**
|
|
315
|
+
* Key the consumer's `itemIconTemplate` can switch on (e.g. an icon name) —
|
|
316
|
+
* `ns-command-palette` never renders this value as text.
|
|
317
|
+
*/
|
|
318
|
+
icon?: string;
|
|
319
|
+
avatarText?: string;
|
|
320
|
+
kind?: string;
|
|
321
|
+
disabled?: boolean;
|
|
322
|
+
}
|
|
323
|
+
interface NsCommandGroup {
|
|
324
|
+
id: string;
|
|
325
|
+
label: string;
|
|
326
|
+
items: readonly NsCommandItem[];
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* Centered command palette (⌘K-style) built on `NsOverlayService` for its
|
|
331
|
+
* focus trap, escape dismissal, scroll lock and inert background — the same
|
|
332
|
+
* mechanism `ns-menu` and `ns-popover` use, minus anchor-relative placement
|
|
333
|
+
* since this overlay is always centered in the viewport. It has no
|
|
334
|
+
* dedicated open/close service: like `ns-menu` and `ns-popover`, it exposes
|
|
335
|
+
* an `open` model that the host application binds to (for example from a
|
|
336
|
+
* global keyboard shortcut), so a single declared instance can be toggled
|
|
337
|
+
* from anywhere without an extra imperative API to keep in sync.
|
|
338
|
+
*
|
|
339
|
+
* `query` is a debounced model: the input reflects every keystroke
|
|
340
|
+
* immediately, but `query` (and therefore `queryChange`) only updates after
|
|
341
|
+
* `debounceMs` of inactivity, so consumers filtering `groups` server-side
|
|
342
|
+
* are not flooded on every keystroke.
|
|
343
|
+
*
|
|
344
|
+
* `NsCommandItem.icon` is a plain string key, not markup — pair it with
|
|
345
|
+
* `itemIconTemplate` (an `<ng-template let-item>`, rendered through
|
|
346
|
+
* `ngTemplateOutlet` with `$implicit` bound to the item) to project an icon
|
|
347
|
+
* component per item. Falls back to the `avatarText` initials badge, then to
|
|
348
|
+
* a reserved-width placeholder so labels stay aligned when neither is set.
|
|
349
|
+
*/
|
|
350
|
+
declare class NsCommandPaletteComponent implements AfterViewInit, OnDestroy {
|
|
351
|
+
readonly open: _angular_core.ModelSignal<boolean>;
|
|
352
|
+
readonly query: _angular_core.ModelSignal<string>;
|
|
353
|
+
readonly placeholder: _angular_core.InputSignal<string>;
|
|
354
|
+
readonly debounceMs: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
355
|
+
readonly groups: _angular_core.InputSignal<readonly NsCommandGroup[]>;
|
|
356
|
+
readonly itemIconTemplate: _angular_core.InputSignal<TemplateRef<{
|
|
357
|
+
$implicit: NsCommandItem;
|
|
358
|
+
}>>;
|
|
359
|
+
readonly loading: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
360
|
+
readonly emptyTitle: _angular_core.InputSignal<string>;
|
|
361
|
+
readonly emptyDescription: _angular_core.InputSignal<string>;
|
|
362
|
+
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
363
|
+
readonly activated: _angular_core.OutputEmitterRef<NsCommandItem>;
|
|
364
|
+
readonly closed: _angular_core.OutputEmitterRef<NsOverlayCloseReason>;
|
|
365
|
+
protected readonly draft: _angular_core.WritableSignal<string>;
|
|
366
|
+
protected readonly activeId: _angular_core.WritableSignal<string>;
|
|
367
|
+
protected readonly listboxId: string;
|
|
368
|
+
private readonly idPrefix;
|
|
369
|
+
private readonly element;
|
|
370
|
+
private readonly overlay;
|
|
371
|
+
private readonly destroyRef;
|
|
372
|
+
private overlayRef?;
|
|
373
|
+
private viewInitialized;
|
|
374
|
+
private debounceTimer?;
|
|
375
|
+
constructor();
|
|
376
|
+
ngAfterViewInit(): void;
|
|
377
|
+
ngOnDestroy(): void;
|
|
378
|
+
close(): void;
|
|
379
|
+
protected flatItems(): NsCommandItem[];
|
|
380
|
+
protected itemDomId(item: NsCommandItem): string;
|
|
381
|
+
protected activeDomId(): string | undefined;
|
|
382
|
+
protected setActive(item: NsCommandItem): void;
|
|
383
|
+
protected activateItem(item: NsCommandItem): void;
|
|
384
|
+
protected onQueryInput(event: Event): void;
|
|
385
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
386
|
+
private scrollActiveIntoView;
|
|
387
|
+
private syncActiveItem;
|
|
388
|
+
private openOverlay;
|
|
389
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NsCommandPaletteComponent, never>;
|
|
390
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsCommandPaletteComponent, "ns-command-palette", never, { "open": { "alias": "open"; "required": false; "isSignal": true; }; "query": { "alias": "query"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "debounceMs": { "alias": "debounceMs"; "required": false; "isSignal": true; }; "groups": { "alias": "groups"; "required": false; "isSignal": true; }; "itemIconTemplate": { "alias": "itemIconTemplate"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "emptyTitle": { "alias": "emptyTitle"; "required": false; "isSignal": true; }; "emptyDescription": { "alias": "emptyDescription"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "open": "openChange"; "query": "queryChange"; "activated": "activated"; "closed": "closed"; }, never, ["[command-palette-icon]", "[command-palette-footer]"], true, never>;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
interface NsComment {
|
|
394
|
+
id?: number;
|
|
395
|
+
cover: {
|
|
396
|
+
url: string;
|
|
397
|
+
alt?: string;
|
|
398
|
+
};
|
|
399
|
+
message: string;
|
|
400
|
+
created?: string;
|
|
401
|
+
author: {
|
|
402
|
+
name: string;
|
|
403
|
+
link?: string;
|
|
404
|
+
};
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
declare class NsCommentComponent implements OnInit {
|
|
408
|
+
readonly title: _angular_core.InputSignal<string>;
|
|
409
|
+
readonly description: _angular_core.InputSignal<string>;
|
|
410
|
+
readonly placeholder: _angular_core.InputSignal<string>;
|
|
411
|
+
readonly messages: _angular_core.InputSignal<NsComment[]>;
|
|
412
|
+
readonly cover: _angular_core.InputSignal<{
|
|
413
|
+
url: string;
|
|
414
|
+
alt?: string;
|
|
415
|
+
}>;
|
|
416
|
+
readonly submitText: _angular_core.InputSignal<string>;
|
|
417
|
+
readonly logged: _angular_core.InputSignal<boolean>;
|
|
418
|
+
readonly maxLength: _angular_core.InputSignal<number>;
|
|
419
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
420
|
+
readonly commit: _angular_core.OutputEmitterRef<string>;
|
|
421
|
+
invalid: boolean;
|
|
422
|
+
content: string;
|
|
423
|
+
private clearEmptyValues;
|
|
424
|
+
constructor();
|
|
425
|
+
ngOnInit(): void;
|
|
426
|
+
publish(): void;
|
|
427
|
+
get counter(): number;
|
|
428
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NsCommentComponent, never>;
|
|
429
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsCommentComponent, "ns-comment", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "messages": { "alias": "messages"; "required": false; "isSignal": true; }; "cover": { "alias": "cover"; "required": false; "isSignal": true; }; "submitText": { "alias": "submitText"; "required": false; "isSignal": true; }; "logged": { "alias": "logged"; "required": false; "isSignal": true; }; "maxLength": { "alias": "maxLength"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "commit": "commit"; }, never, ["*"], true, never>;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
declare class NsDescriptionComponent {
|
|
433
|
+
private readonly ariaIds;
|
|
434
|
+
private readonly field;
|
|
435
|
+
private readonly destroyRef;
|
|
436
|
+
readonly id: _angular_core.InputSignal<string>;
|
|
437
|
+
readonly live: _angular_core.InputSignal<"off" | "polite" | "assertive">;
|
|
438
|
+
constructor();
|
|
439
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NsDescriptionComponent, never>;
|
|
440
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsDescriptionComponent, "ns-description", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "live": { "alias": "live"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
declare class NsDividerComponent {
|
|
444
|
+
readonly orientation: _angular_core.InputSignal<NsOrientation>;
|
|
445
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NsDividerComponent, never>;
|
|
446
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsDividerComponent, "ns-divider", never, { "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
447
|
+
}
|
|
448
|
+
|
|
307
449
|
type NsDrawerPosition = 'start' | 'end';
|
|
308
450
|
interface NsDrawerOptions {
|
|
309
451
|
title?: string;
|
|
@@ -363,6 +505,7 @@ declare class NsEditorColorPickerComponent implements OnInit {
|
|
|
363
505
|
private editor;
|
|
364
506
|
readonly presets: _angular_core.InputSignal<string[][]>;
|
|
365
507
|
readonly type: _angular_core.InputSignal<"text_color" | "background_color">;
|
|
508
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
366
509
|
showPopup: boolean;
|
|
367
510
|
activeColor?: string;
|
|
368
511
|
isActive: boolean;
|
|
@@ -374,10 +517,23 @@ declare class NsEditorColorPickerComponent implements OnInit {
|
|
|
374
517
|
onColorSelect(color: string): void;
|
|
375
518
|
remove(): void;
|
|
376
519
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NsEditorColorPickerComponent, never>;
|
|
377
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsEditorColorPickerComponent, "ns-editor-color-picker", never, { "presets": { "alias": "presets"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
520
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsEditorColorPickerComponent, "ns-editor-color-picker", never, { "presets": { "alias": "presets"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
declare class NsEditorImageComponent implements OnInit {
|
|
524
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
525
|
+
formImage: FormGroup;
|
|
526
|
+
show: boolean;
|
|
527
|
+
private fb;
|
|
528
|
+
private editor;
|
|
529
|
+
ngOnInit(): void;
|
|
530
|
+
insert(): void;
|
|
531
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NsEditorImageComponent, never>;
|
|
532
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsEditorImageComponent, "ns-editor-image", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
378
533
|
}
|
|
379
534
|
|
|
380
535
|
declare class NsEditorLinkComponent implements OnInit {
|
|
536
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
381
537
|
formLink: FormGroup;
|
|
382
538
|
show: boolean;
|
|
383
539
|
private fb;
|
|
@@ -385,7 +541,7 @@ declare class NsEditorLinkComponent implements OnInit {
|
|
|
385
541
|
ngOnInit(): void;
|
|
386
542
|
insert(): void;
|
|
387
543
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NsEditorLinkComponent, never>;
|
|
388
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsEditorLinkComponent, "ns-editor-link", never, {}, {}, never, never, true, never>;
|
|
544
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsEditorLinkComponent, "ns-editor-link", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
389
545
|
}
|
|
390
546
|
|
|
391
547
|
declare enum Commands {
|
|
@@ -412,29 +568,32 @@ declare enum Commands {
|
|
|
412
568
|
|
|
413
569
|
declare class NsEditorListComponent implements OnInit {
|
|
414
570
|
private editor;
|
|
571
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
415
572
|
commands: typeof Commands;
|
|
416
573
|
ngOnInit(): void;
|
|
417
574
|
command(name: Commands): void;
|
|
418
575
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NsEditorListComponent, never>;
|
|
419
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsEditorListComponent, "ns-editor-list", never, {}, {}, never, never, true, never>;
|
|
576
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsEditorListComponent, "ns-editor-list", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
420
577
|
}
|
|
421
578
|
|
|
422
579
|
declare class NsEditorParagraphComponent {
|
|
423
580
|
private editor;
|
|
581
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
424
582
|
id: string;
|
|
425
583
|
private _value;
|
|
426
584
|
get value(): string;
|
|
427
585
|
set value(heading: string);
|
|
428
586
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NsEditorParagraphComponent, never>;
|
|
429
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsEditorParagraphComponent, "ns-editor-paragraph", never, {}, {}, never, never, true, never>;
|
|
587
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsEditorParagraphComponent, "ns-editor-paragraph", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
430
588
|
}
|
|
431
589
|
|
|
432
590
|
declare class NsEditorToggleCommandComponent {
|
|
433
591
|
private editor;
|
|
592
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
434
593
|
commands: typeof Commands;
|
|
435
594
|
command(name: Commands): void;
|
|
436
595
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NsEditorToggleCommandComponent, never>;
|
|
437
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsEditorToggleCommandComponent, "ns-editor-toggle", never, {}, {}, never, never, true, never>;
|
|
596
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsEditorToggleCommandComponent, "ns-editor-toggle", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
438
597
|
}
|
|
439
598
|
|
|
440
599
|
declare abstract class NsValueAccessor<T = string> implements ControlValueAccessor {
|
|
@@ -656,8 +815,10 @@ declare class NsDropdownComponent extends NsValueAccessor<NsDropdownValue> {
|
|
|
656
815
|
}
|
|
657
816
|
|
|
658
817
|
declare class NsInputComponent extends NsValueAccessor<string> {
|
|
818
|
+
/** Leading icon name (`@ng-solid/icons`). Omit for the default, icon-less field. */
|
|
819
|
+
readonly icon: _angular_core.InputSignal<string>;
|
|
659
820
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NsInputComponent, never>;
|
|
660
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsInputComponent, "ns-input", never, {}, {}, never, never, true, never>;
|
|
821
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsInputComponent, "ns-input", never, { "icon": { "alias": "icon"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
661
822
|
}
|
|
662
823
|
|
|
663
824
|
declare class NsInputCodeComponent extends NsValueAccessor<string> {
|
|
@@ -685,6 +846,7 @@ declare class NsInputNumberComponent extends NsValueAccessor<number | null> {
|
|
|
685
846
|
readonly currency: _angular_core.InputSignal<string>;
|
|
686
847
|
readonly format: _angular_core.InputSignal<Intl.NumberFormatOptions>;
|
|
687
848
|
readonly displayValue: _angular_core.WritableSignal<string>;
|
|
849
|
+
readonly currencyPrefix: _angular_core.Signal<string>;
|
|
688
850
|
writeValue(value: number | null): void;
|
|
689
851
|
onInput(text: string): void;
|
|
690
852
|
onInputEvent(event: Event): void;
|
|
@@ -692,6 +854,7 @@ declare class NsInputNumberComponent extends NsValueAccessor<number | null> {
|
|
|
692
854
|
onKeydown(event: KeyboardEvent): void;
|
|
693
855
|
stepBy(direction: 1 | -1): void;
|
|
694
856
|
private get formatter();
|
|
857
|
+
private formatDisplayValue;
|
|
695
858
|
private parse;
|
|
696
859
|
private constrain;
|
|
697
860
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NsInputNumberComponent, never>;
|
|
@@ -703,22 +866,44 @@ declare class NsInputSearchComponent extends NsValueAccessor<string> {
|
|
|
703
866
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsInputSearchComponent, "ns-input-search", never, {}, {}, never, never, true, never>;
|
|
704
867
|
}
|
|
705
868
|
|
|
869
|
+
declare class NsRadioGroupContext {
|
|
870
|
+
readonly value: _angular_core.WritableSignal<string>;
|
|
871
|
+
readonly disabled: _angular_core.WritableSignal<boolean>;
|
|
872
|
+
select: (value: string) => void;
|
|
873
|
+
onTouched: () => void;
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
/**
|
|
877
|
+
* Selectable card for rich radio options (icon, label and description)
|
|
878
|
+
* inside an `ns-radio-group`. It reuses `NsRadioGroupContext` and a native
|
|
879
|
+
* `<input type="radio">`, the same mechanism `ns-radio` relies on, so
|
|
880
|
+
* `role="radio"`, `aria-checked` and keyboard behavior (native radio-group
|
|
881
|
+
* navigation when a shared `name` is provided) come from the browser instead
|
|
882
|
+
* of a hand-rolled ARIA widget.
|
|
883
|
+
*/
|
|
884
|
+
declare class NsOptionCardComponent {
|
|
885
|
+
private readonly ids;
|
|
886
|
+
readonly group: NsRadioGroupContext;
|
|
887
|
+
readonly id: string;
|
|
888
|
+
readonly value: _angular_core.InputSignal<string>;
|
|
889
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
890
|
+
readonly description: _angular_core.InputSignal<string>;
|
|
891
|
+
readonly name: _angular_core.InputSignal<string>;
|
|
892
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
893
|
+
select(): void;
|
|
894
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NsOptionCardComponent, never>;
|
|
895
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsOptionCardComponent, "ns-option-card", never, { "value": { "alias": "value"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, ["[option-card-icon]"], true, never>;
|
|
896
|
+
}
|
|
897
|
+
|
|
706
898
|
declare class NsPasswordComponent extends NsValueAccessor implements OnInit {
|
|
707
899
|
readonly forgotLink: _angular_core.InputSignal<string>;
|
|
708
|
-
readonly
|
|
900
|
+
readonly forgotLinkLabel: _angular_core.InputSignal<string>;
|
|
709
901
|
show: boolean;
|
|
710
902
|
constructor();
|
|
711
903
|
ngOnInit(): void;
|
|
712
904
|
toggle(): void;
|
|
713
905
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NsPasswordComponent, never>;
|
|
714
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsPasswordComponent, "ns-password", never, { "forgotLink": { "alias": "forgotLink"; "required": false; "isSignal": true; }; "
|
|
715
|
-
}
|
|
716
|
-
|
|
717
|
-
declare class NsRadioGroupContext {
|
|
718
|
-
readonly value: _angular_core.WritableSignal<string>;
|
|
719
|
-
readonly disabled: _angular_core.WritableSignal<boolean>;
|
|
720
|
-
select: (value: string) => void;
|
|
721
|
-
onTouched: () => void;
|
|
906
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsPasswordComponent, "ns-password", never, { "forgotLink": { "alias": "forgotLink"; "required": false; "isSignal": true; }; "forgotLinkLabel": { "alias": "forgotLinkLabel"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
722
907
|
}
|
|
723
908
|
|
|
724
909
|
declare class NsRadioComponent {
|
|
@@ -769,9 +954,13 @@ declare class NsSliderComponent extends NsValueAccessor<NsSliderValue> {
|
|
|
769
954
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsSliderComponent, "ns-slider", never, { "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "range": { "alias": "range"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
770
955
|
}
|
|
771
956
|
|
|
957
|
+
type NsSwitchLayout = 'inline' | 'row';
|
|
958
|
+
type NsSwitchSize = 'sm' | 'md';
|
|
772
959
|
declare class NsSwitchComponent extends NsValueAccessor<boolean> {
|
|
960
|
+
readonly layout: _angular_core.InputSignal<NsSwitchLayout>;
|
|
961
|
+
readonly size: _angular_core.InputSignal<NsSwitchSize>;
|
|
773
962
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NsSwitchComponent, never>;
|
|
774
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsSwitchComponent, "ns-switch", never, {}, {}, never, never, true, never>;
|
|
963
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsSwitchComponent, "ns-switch", never, { "layout": { "alias": "layout"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
775
964
|
}
|
|
776
965
|
|
|
777
966
|
declare class NsTextAreaComponent extends NsValueAccessor<string> {
|
|
@@ -784,9 +973,16 @@ declare class NsContentEditableComponent extends NsValueAccessor<string> {
|
|
|
784
973
|
private elementRef;
|
|
785
974
|
private renderer;
|
|
786
975
|
readonly maxLength: _angular_core.InputSignal<number>;
|
|
976
|
+
/**
|
|
977
|
+
* Character count of the rendered content, measured the same way the
|
|
978
|
+
* `maxlength` guard below measures it (`innerText.length`) so a consumer's
|
|
979
|
+
* counter never drifts from what actually blocks typing.
|
|
980
|
+
*/
|
|
981
|
+
readonly length: _angular_core.WritableSignal<number>;
|
|
787
982
|
enabled: boolean;
|
|
788
983
|
writeValue(value: string): void;
|
|
789
984
|
onInput(): void;
|
|
985
|
+
private updateLength;
|
|
790
986
|
onBlur(): void;
|
|
791
987
|
onKeyUp(event: KeyboardEvent): void;
|
|
792
988
|
setDisabledState(isDisabled: boolean): void;
|
|
@@ -812,46 +1008,219 @@ declare class NsFieldDirective {
|
|
|
812
1008
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NsFieldDirective, "[nsField]", never, { "controlId": { "alias": "nsField"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
813
1009
|
}
|
|
814
1010
|
|
|
1011
|
+
type NsEditorTool = 'paragraph' | 'format' | 'color' | 'list' | 'link' | 'image' | 'separator';
|
|
1012
|
+
declare const NS_EDITOR_TOOLS_DEFAULT: readonly NsEditorTool[];
|
|
815
1013
|
declare class NsEditorComponent extends NsValueAccessor<string> implements OnInit, OnDestroy {
|
|
816
1014
|
private editor;
|
|
817
|
-
readonly rows: _angular_core.InputSignal<number>;
|
|
818
1015
|
readonly maxLength: _angular_core.InputSignal<number>;
|
|
819
1016
|
readonly colorPresets: _angular_core.InputSignal<string[]>;
|
|
1017
|
+
readonly tools: _angular_core.InputSignal<readonly NsEditorTool[]>;
|
|
820
1018
|
textArea: ElementRef<HTMLElement>;
|
|
1019
|
+
private contentEditable;
|
|
1020
|
+
/** Mirrors the content-editable's own counter, measured off `innerText`. */
|
|
1021
|
+
readonly length: _angular_core.Signal<number>;
|
|
1022
|
+
readonly hasFooter: _angular_core.Signal<boolean>;
|
|
821
1023
|
focused: () => void;
|
|
822
1024
|
ngOnInit(): void;
|
|
823
1025
|
get presets(): string[][];
|
|
824
1026
|
blur(): void;
|
|
825
1027
|
ngOnDestroy(): void;
|
|
826
1028
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NsEditorComponent, never>;
|
|
827
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsEditorComponent, "ns-editor", never, { "
|
|
1029
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsEditorComponent, "ns-editor", never, { "maxLength": { "alias": "maxLength"; "required": false; "isSignal": true; }; "colorPresets": { "alias": "colorPresets"; "required": false; "isSignal": true; }; "tools": { "alias": "tools"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
828
1030
|
}
|
|
829
1031
|
|
|
1032
|
+
type NsEmptyStateSize = 'sm' | 'md' | 'lg';
|
|
1033
|
+
declare class NsEmptyStateComponent {
|
|
1034
|
+
readonly title: _angular_core.InputSignal<string>;
|
|
1035
|
+
readonly description: _angular_core.InputSignal<string>;
|
|
1036
|
+
readonly size: _angular_core.InputSignal<NsEmptyStateSize>;
|
|
1037
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NsEmptyStateComponent, never>;
|
|
1038
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsEmptyStateComponent, "ns-empty-state", never, { "title": { "alias": "title"; "required": true; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, ["[empty-state-icon]", "[empty-state-actions]"], true, never>;
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
/**
|
|
1042
|
+
* No structural difference from `NsFile` — the guarantee this alias
|
|
1043
|
+
* documents ("already has an entry in `uidRegistry`") lives in the registry,
|
|
1044
|
+
* not on the object. Kept as a distinct name at call sites (`images()`,
|
|
1045
|
+
* `image()`, `retry()`, `remove()`) that specifically require an image which
|
|
1046
|
+
* has already been through `assignUid`.
|
|
1047
|
+
*/
|
|
1048
|
+
type TrackedFile = NsFile;
|
|
1049
|
+
/**
|
|
1050
|
+
* Per-file upload status, keyed by `uid` (AVF-16). Replaces the old
|
|
1051
|
+
* `loading: Set<string>` — a boolean set can't distinguish "still
|
|
1052
|
+
* uploading" from "upload failed", which was the actual gap this HU closes.
|
|
1053
|
+
* `'ok'` is set (not deleted) on success so a file that went through this
|
|
1054
|
+
* component's own upload pipeline stays traceable; a file that arrived via
|
|
1055
|
+
* `writeValue`/`[value]` and never uploaded here simply has no entry, which
|
|
1056
|
+
* every template check (`=== 'subiendo'` / `=== 'fallido'`) already treats
|
|
1057
|
+
* as the normal/idle state.
|
|
1058
|
+
*/
|
|
1059
|
+
type NsImageUploadFileStatus = 'subiendo' | 'ok' | 'fallido';
|
|
830
1060
|
declare class NsImageUploadComponent extends NsValueAccessor<NsFile | NsFile[] | null> {
|
|
831
1061
|
private client;
|
|
832
1062
|
private renderer;
|
|
1063
|
+
private readonly cdr;
|
|
833
1064
|
readonly accept: _angular_core.InputSignal<string>;
|
|
834
1065
|
readonly multi: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
835
1066
|
readonly limit: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
1067
|
+
readonly layout: _angular_core.InputSignal<"grid" | "cover">;
|
|
1068
|
+
/**
|
|
1069
|
+
* Rows the `__stack` column reserves before it starts scrolling
|
|
1070
|
+
* internally, in `layout="cover"`: at most 3, and never more than
|
|
1071
|
+
* `limit() - 1` (the cover itself takes one slot).
|
|
1072
|
+
*/
|
|
1073
|
+
readonly reservedRows: _angular_core.Signal<number>;
|
|
836
1074
|
imgRef: ElementRef<HTMLInputElement>;
|
|
837
|
-
|
|
1075
|
+
status: Map<string, NsImageUploadFileStatus>;
|
|
1076
|
+
/**
|
|
1077
|
+
* Bumped by `setStatus`/`deleteStatus` on every `status` mutation.
|
|
1078
|
+
* `status` itself stays a plain, publicly-mutable `Map` — kept for the
|
|
1079
|
+
* existing per-file bookkeeping and for tests that poll it to synchronise
|
|
1080
|
+
* with an async upload — but a plain `Map.set()`/`.delete()` is invisible
|
|
1081
|
+
* to Angular's change detection: no signal write and no `markForCheck()`,
|
|
1082
|
+
* so nothing tells Angular this control needs checking again. Worse, an
|
|
1083
|
+
* `OnPush` ancestor that wasn't otherwise dirtied (e.g. the "Fotografías"
|
|
1084
|
+
* `<card>` wrapping this control in the product form) can skip this
|
|
1085
|
+
* subtree entirely on the next tick. That is exactly why a failed upload
|
|
1086
|
+
* used to get stuck showing the spinner forever, silently (AVF-18
|
|
1087
|
+
* corrección de rechazo #2): `status.set(uid, 'fallido')` ran, but nothing
|
|
1088
|
+
* ever told Angular to look again — unlike a successful upload, which
|
|
1089
|
+
* reaches the template through `value.set()` (a real signal write) via
|
|
1090
|
+
* `assignValue`/`onChange`. `statusOf()` reads this counter before reading
|
|
1091
|
+
* `status`, giving every render that goes through it a real signal
|
|
1092
|
+
* dependency, and `touchStatus()` also calls `markForCheck()` directly —
|
|
1093
|
+
* belt and braces: the explicit call is the same, long-proven mechanism
|
|
1094
|
+
* Angular has always used to announce a change made from outside its own
|
|
1095
|
+
* detection cycle (an RxJS subscription callback, here), and is what
|
|
1096
|
+
* reliably walks the ancestor chain and clears an `OnPush` skip, the way
|
|
1097
|
+
* a signal read alone was not enough to guarantee in practice.
|
|
1098
|
+
*/
|
|
1099
|
+
private readonly statusVersion;
|
|
1100
|
+
private touchStatus;
|
|
1101
|
+
private setStatus;
|
|
1102
|
+
private deleteStatus;
|
|
1103
|
+
/**
|
|
1104
|
+
* The only path from `status` + `uid` to the template — and the one every
|
|
1105
|
+
* test should use too (AVF-18 corrección de rechazo #2): reading
|
|
1106
|
+
* `status.get(...)` directly, the way earlier tests did, cannot tell a
|
|
1107
|
+
* status change nobody announced to Angular from one that actually
|
|
1108
|
+
* rendered, which is exactly how the previous regression shipped green —
|
|
1109
|
+
* the map held `'fallido'`, the DOM still showed `'subiendo'`, and the
|
|
1110
|
+
* assertions that read the map straight agreed with the bug.
|
|
1111
|
+
*/
|
|
1112
|
+
statusOf(image: NsFile): NsImageUploadFileStatus | undefined;
|
|
1113
|
+
/**
|
|
1114
|
+
* Active while a file dragged from outside the browser (desktop, another
|
|
1115
|
+
* app) hovers a drop zone — drives the highlight ring/border (AVF-9,
|
|
1116
|
+
* criteria 3-5). Never set for the internal thumbnail-reorder drag,
|
|
1117
|
+
* distinguished via `isFileDrag`.
|
|
1118
|
+
*/
|
|
1119
|
+
readonly dragActive: _angular_core.WritableSignal<boolean>;
|
|
1120
|
+
/**
|
|
1121
|
+
* Inline, Spanish, component-owned notice for when a selection/drop
|
|
1122
|
+
* exceeds `limit()` (AVF-16). Deliberately not an `output()`: a consumer
|
|
1123
|
+
* that doesn't wire one up would silently drop files again, which is
|
|
1124
|
+
* exactly the defect this HU removes. Overwritten (never accumulated) on
|
|
1125
|
+
* every enqueue attempt, successful or not.
|
|
1126
|
+
*/
|
|
1127
|
+
readonly limitWarning: _angular_core.WritableSignal<string>;
|
|
838
1128
|
private _fromIndex;
|
|
839
1129
|
private _toIndex;
|
|
840
|
-
|
|
841
|
-
|
|
1130
|
+
/**
|
|
1131
|
+
* The only path from `value()` to the template, whatever fed it: a plain
|
|
1132
|
+
* `[value]="misImagenes"` binding — `value` is the public two-way `model()`
|
|
1133
|
+
* from `NsValueAccessor`, so nothing forces a consumer through
|
|
1134
|
+
* `writeValue`/`add` — lands here same as a file picked through the
|
|
1135
|
+
* control itself. `assignUid` is idempotent (never overwrites an existing
|
|
1136
|
+
* registry entry) and never mutates the `NsFile`, so re-running it every
|
|
1137
|
+
* getter call is safe: the `uid` a given instance gets on its first pass
|
|
1138
|
+
* through here is the one it keeps on every later change-detection cycle,
|
|
1139
|
+
* and no signal write happens as a side effect of reading the template
|
|
1140
|
+
* (AVF-15). Works the same whether the array/elements are frozen or not
|
|
1141
|
+
* (AVF-18 corrección de rechazo).
|
|
1142
|
+
*/
|
|
1143
|
+
get images(): TrackedFile[];
|
|
1144
|
+
get image(): TrackedFile | null;
|
|
1145
|
+
/**
|
|
1146
|
+
* Reads the `uid` assigned to `image` — the accessor the `.ts` and the
|
|
1147
|
+
* template both use instead of a `.uid` property on the `NsFile` itself,
|
|
1148
|
+
* which no longer exists (AVF-18 corrección de rechazo: that property
|
|
1149
|
+
* write is exactly what threw on a frozen image). Public so the
|
|
1150
|
+
* template's `track` expressions can call it directly, and so `statusOf`
|
|
1151
|
+
* can resolve the key it looks up. Every `NsFile` reachable from
|
|
1152
|
+
* `images()`/`image()` has already been through `assignUid`, so this only
|
|
1153
|
+
* ever reads — the `assignUid` call here is a safety net for a caller that
|
|
1154
|
+
* hands in an image from outside that path.
|
|
1155
|
+
*/
|
|
1156
|
+
uidOf(image: NsFile): string;
|
|
1157
|
+
/**
|
|
1158
|
+
* True while the single (`!multi()`) image's own upload attempt is
|
|
1159
|
+
* `'fallido'` — the one flag the drag-container button needs to swap
|
|
1160
|
+
* "open the file picker" for "retry this upload" (AVF-16, corrección de
|
|
1161
|
+
* rechazo: criterios 5-6 no estaban cubiertos en modo single, solo en
|
|
1162
|
+
* `multi`).
|
|
1163
|
+
*/
|
|
1164
|
+
get singleFailed(): boolean;
|
|
842
1165
|
writeValue(value: NsFile | NsFile[] | null): void;
|
|
843
1166
|
onClick(): void;
|
|
1167
|
+
/**
|
|
1168
|
+
* Click handler for the single-mode (`!multi()`) drag-container: it is
|
|
1169
|
+
* both the file picker trigger and, once the image has failed, the
|
|
1170
|
+
* retry control — same dual role the `multi` grid button and the cover
|
|
1171
|
+
* chip already had (AVF-16 corrección de rechazo).
|
|
1172
|
+
*/
|
|
1173
|
+
onDragContainerClick(): void;
|
|
844
1174
|
load(): void;
|
|
845
1175
|
add(image: NsFile): void;
|
|
1176
|
+
/**
|
|
1177
|
+
* Re-subscribes to the same upload the failed attempt used — no new
|
|
1178
|
+
* `NsUploadClient` contract needed (AVF-16 evidence: `upload(file):
|
|
1179
|
+
* Observable<file>` is already re-subscribable). Shared by the first
|
|
1180
|
+
* attempt (`add`) and every later retry. `uid` is passed in rather than
|
|
1181
|
+
* re-derived from `image`, since `retry()` needs the *original* uid even
|
|
1182
|
+
* though the `image` it holds may itself be a server response object by
|
|
1183
|
+
* then.
|
|
1184
|
+
*/
|
|
1185
|
+
private upload;
|
|
1186
|
+
/**
|
|
1187
|
+
* Retries a failed upload in place: same `uid`, same position in the
|
|
1188
|
+
* gallery, no re-read from disk (the preview already holds the file's
|
|
1189
|
+
* data).
|
|
1190
|
+
*/
|
|
1191
|
+
retry(image: TrackedFile): void;
|
|
846
1192
|
private assignValue;
|
|
847
|
-
|
|
848
|
-
remove(image: NsFile): void;
|
|
1193
|
+
remove(image: TrackedFile): void;
|
|
849
1194
|
dragstart(event: DragEvent, index: number): void;
|
|
1195
|
+
/**
|
|
1196
|
+
* Shared by every drop target (thumbnails, the `cover` node — index 0 —
|
|
1197
|
+
* and the plain drop zones). `event.dataTransfer.types` never carries
|
|
1198
|
+
* `'Files'` for the internal reorder drag (it writes nothing to the
|
|
1199
|
+
* clipboard today), so that check alone tells the external-file drop and
|
|
1200
|
+
* the reorder drag apart without a separate state flag.
|
|
1201
|
+
*/
|
|
850
1202
|
dragover(event: DragEvent, index: number): void;
|
|
1203
|
+
dragleave(event: DragEvent): void;
|
|
851
1204
|
dragend(event: DragEvent): void;
|
|
852
1205
|
drop(event: DragEvent): void;
|
|
1206
|
+
private isFileDrag;
|
|
1207
|
+
private isAcceptedFile;
|
|
1208
|
+
private addDroppedFile;
|
|
1209
|
+
/**
|
|
1210
|
+
* Accepts as many of `files` as fit under `limit()`, all at once, and
|
|
1211
|
+
* reports the rest inline. `limit()` is evaluated once here, against
|
|
1212
|
+
* `this.images.length` as it stands *before* any of this batch's
|
|
1213
|
+
* `add()` calls run — never inside a per-file callback, where it would
|
|
1214
|
+
* lag behind sibling files whose `FileReader`/upload hasn't resolved yet
|
|
1215
|
+
* and let more through than actually fit (AVF-16).
|
|
1216
|
+
*
|
|
1217
|
+
* Returns how many files were actually enqueued, so callers can decide
|
|
1218
|
+
* whether to mark the control touched.
|
|
1219
|
+
*/
|
|
1220
|
+
private enqueueFiles;
|
|
1221
|
+
private buildLimitWarning;
|
|
853
1222
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NsImageUploadComponent, never>;
|
|
854
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsImageUploadComponent, "ns-image-upload", never, { "accept": { "alias": "accept"; "required": false; "isSignal": true; }; "multi": { "alias": "multi"; "required": false; "isSignal": true; }; "limit": { "alias": "limit"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1223
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsImageUploadComponent, "ns-image-upload", never, { "accept": { "alias": "accept"; "required": false; "isSignal": true; }; "multi": { "alias": "multi"; "required": false; "isSignal": true; }; "limit": { "alias": "limit"; "required": false; "isSignal": true; }; "layout": { "alias": "layout"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
855
1224
|
}
|
|
856
1225
|
|
|
857
1226
|
declare class NsLinkComponent {
|
|
@@ -865,6 +1234,68 @@ declare class NsLinkComponent {
|
|
|
865
1234
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsLinkComponent, "ns-link", never, { "href": { "alias": "href"; "required": false; "isSignal": true; }; "target": { "alias": "target"; "required": false; "isSignal": true; }; "rel": { "alias": "rel"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
866
1235
|
}
|
|
867
1236
|
|
|
1237
|
+
declare class NsMenuItemComponent {
|
|
1238
|
+
private readonly element;
|
|
1239
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
1240
|
+
readonly color: _angular_core.InputSignal<NsColor>;
|
|
1241
|
+
readonly activated: _angular_core.OutputEmitterRef<void>;
|
|
1242
|
+
/** Roving-tabindex state, driven by the parent `ns-menu`. */
|
|
1243
|
+
readonly active: _angular_core.WritableSignal<boolean>;
|
|
1244
|
+
activate(): void;
|
|
1245
|
+
onSpace(event: Event): void;
|
|
1246
|
+
focus(): void;
|
|
1247
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NsMenuItemComponent, never>;
|
|
1248
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsMenuItemComponent, "ns-menu-item", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; }, { "activated": "activated"; }, never, ["[menu-item-icon]", "*"], true, never>;
|
|
1249
|
+
}
|
|
1250
|
+
|
|
1251
|
+
/**
|
|
1252
|
+
* Action menu anchored to an origin element, built on `NsOverlayService`
|
|
1253
|
+
* (the same placement/dismiss/focus-trap mechanism as `ns-popover`). Items
|
|
1254
|
+
* are plain projected content (`ns-menu-item`, optionally grouped inside
|
|
1255
|
+
* `ns-menu-section`), so the menu drives a roving tabindex across them and
|
|
1256
|
+
* closes itself once one is activated.
|
|
1257
|
+
*/
|
|
1258
|
+
declare class NsMenuComponent implements AfterViewInit, OnDestroy {
|
|
1259
|
+
readonly open: _angular_core.ModelSignal<boolean>;
|
|
1260
|
+
readonly origin: _angular_core.InputSignal<HTMLElement>;
|
|
1261
|
+
readonly placement: _angular_core.InputSignal<NsPlacement>;
|
|
1262
|
+
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
1263
|
+
readonly closed: _angular_core.OutputEmitterRef<NsOverlayCloseReason>;
|
|
1264
|
+
readonly items: _angular_core.Signal<readonly NsMenuItemComponent[]>;
|
|
1265
|
+
private readonly element;
|
|
1266
|
+
private readonly overlay;
|
|
1267
|
+
private overlayRef?;
|
|
1268
|
+
private viewInitialized;
|
|
1269
|
+
private activeIndex;
|
|
1270
|
+
constructor();
|
|
1271
|
+
ngAfterViewInit(): void;
|
|
1272
|
+
ngOnDestroy(): void;
|
|
1273
|
+
close(): void;
|
|
1274
|
+
onKeydown(event: KeyboardEvent): void;
|
|
1275
|
+
private handleItemSelect;
|
|
1276
|
+
private openOverlay;
|
|
1277
|
+
private syncActiveItem;
|
|
1278
|
+
private focusItem;
|
|
1279
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NsMenuComponent, never>;
|
|
1280
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsMenuComponent, "ns-menu", never, { "open": { "alias": "open"; "required": false; "isSignal": true; }; "origin": { "alias": "origin"; "required": true; "isSignal": true; }; "placement": { "alias": "placement"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "open": "openChange"; "closed": "closed"; }, ["items"], ["[menu-header]", "*"], true, never>;
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1283
|
+
/**
|
|
1284
|
+
* Visual separator between `ns-menu-item` groups. Consumers who prefer the
|
|
1285
|
+
* native element can also write `<hr ns-menu-divider>` directly; both forms
|
|
1286
|
+
* resolve to the same host styling.
|
|
1287
|
+
*/
|
|
1288
|
+
declare class NsMenuDividerComponent {
|
|
1289
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NsMenuDividerComponent, never>;
|
|
1290
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsMenuDividerComponent, "ns-menu-divider, hr[ns-menu-divider]", never, {}, {}, never, never, true, never>;
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
declare class NsMenuSectionComponent {
|
|
1294
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
1295
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NsMenuSectionComponent, never>;
|
|
1296
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsMenuSectionComponent, "ns-menu-section", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
1297
|
+
}
|
|
1298
|
+
|
|
868
1299
|
declare class NsMeterComponent {
|
|
869
1300
|
readonly value: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
870
1301
|
readonly min: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
@@ -932,6 +1363,25 @@ declare class NsModalService {
|
|
|
932
1363
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<NsModalService>;
|
|
933
1364
|
}
|
|
934
1365
|
|
|
1366
|
+
/**
|
|
1367
|
+
* Companion to `ns-pagination` for feeds that grow with a "load more" action
|
|
1368
|
+
* instead of numbered pages. Kept as a separate component because its
|
|
1369
|
+
* template (a status line plus a single button) has nothing in common with
|
|
1370
|
+
* `ns-pagination`'s page-number navigation.
|
|
1371
|
+
*/
|
|
1372
|
+
declare class NsLoadMoreComponent {
|
|
1373
|
+
readonly shown: _angular_core.InputSignal<number>;
|
|
1374
|
+
readonly total: _angular_core.InputSignal<number>;
|
|
1375
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
1376
|
+
readonly loadMoreLabel: _angular_core.InputSignal<string>;
|
|
1377
|
+
readonly loading: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
1378
|
+
readonly loadMore: _angular_core.OutputEmitterRef<void>;
|
|
1379
|
+
readonly hasMore: _angular_core.Signal<boolean>;
|
|
1380
|
+
readonly statusText: _angular_core.Signal<string>;
|
|
1381
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NsLoadMoreComponent, never>;
|
|
1382
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsLoadMoreComponent, "ns-load-more", never, { "shown": { "alias": "shown"; "required": true; "isSignal": true; }; "total": { "alias": "total"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "loadMoreLabel": { "alias": "loadMoreLabel"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; }, { "loadMore": "loadMore"; }, never, never, true, never>;
|
|
1383
|
+
}
|
|
1384
|
+
|
|
935
1385
|
declare class NsPaginationComponent {
|
|
936
1386
|
readonly total: _angular_core.InputSignal<number>;
|
|
937
1387
|
readonly pageSize: _angular_core.InputSignal<number>;
|
|
@@ -1109,6 +1559,45 @@ declare class NsSchemaMarkupComponent implements OnInit, OnChanges {
|
|
|
1109
1559
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsSchemaMarkupComponent, "ns-schema", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1110
1560
|
}
|
|
1111
1561
|
|
|
1562
|
+
type NsSideNavColor = 'nav' | 'success';
|
|
1563
|
+
/**
|
|
1564
|
+
* Vertical navigation rail. `color="nav"` renders the branded blue rail
|
|
1565
|
+
* (`semantic.color.nav`/`navActive`); `color="success"` renders a neutral
|
|
1566
|
+
* surface where only the active item gets a green highlight. Descendant
|
|
1567
|
+
* `ns-side-nav-item`/`ns-side-nav-section` read the variant through
|
|
1568
|
+
* `:host-context`.
|
|
1569
|
+
*/
|
|
1570
|
+
declare class NsSideNavComponent {
|
|
1571
|
+
readonly color: _angular_core.InputSignal<NsSideNavColor>;
|
|
1572
|
+
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
1573
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NsSideNavComponent, never>;
|
|
1574
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsSideNavComponent, "ns-side-nav", never, { "color": { "alias": "color"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
1575
|
+
}
|
|
1576
|
+
|
|
1577
|
+
/**
|
|
1578
|
+
* Renders an `<a>` when `link` (routed, via `RouterLink` composition) or
|
|
1579
|
+
* `href` (plain external navigation) is provided, and a `<button>`
|
|
1580
|
+
* otherwise — so a purely programmatic item (e.g. one that opens a panel)
|
|
1581
|
+
* still gets correct semantics and keyboard behavior for free.
|
|
1582
|
+
*/
|
|
1583
|
+
declare class NsSideNavItemComponent {
|
|
1584
|
+
readonly href: _angular_core.InputSignal<string>;
|
|
1585
|
+
readonly link: _angular_core.InputSignal<string | readonly unknown[]>;
|
|
1586
|
+
readonly active: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
1587
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
1588
|
+
readonly description: _angular_core.InputSignal<string>;
|
|
1589
|
+
readonly activated: _angular_core.OutputEmitterRef<void>;
|
|
1590
|
+
onActivate(event: Event): void;
|
|
1591
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NsSideNavItemComponent, never>;
|
|
1592
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsSideNavItemComponent, "ns-side-nav-item", never, { "href": { "alias": "href"; "required": false; "isSignal": true; }; "link": { "alias": "link"; "required": false; "isSignal": true; }; "active": { "alias": "active"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; }, { "activated": "activated"; }, never, ["[side-nav-item-icon]", "*", "[side-nav-item-badge]"], true, never>;
|
|
1593
|
+
}
|
|
1594
|
+
|
|
1595
|
+
declare class NsSideNavSectionComponent {
|
|
1596
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
1597
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NsSideNavSectionComponent, never>;
|
|
1598
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsSideNavSectionComponent, "ns-side-nav-section", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
1599
|
+
}
|
|
1600
|
+
|
|
1112
1601
|
declare class NsSkeletonComponent {
|
|
1113
1602
|
readonly width: _angular_core.InputSignal<string>;
|
|
1114
1603
|
readonly height: _angular_core.InputSignal<string>;
|
|
@@ -1117,6 +1606,55 @@ declare class NsSkeletonComponent {
|
|
|
1117
1606
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsSkeletonComponent, "ns-skeleton", never, { "width": { "alias": "width"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "animated": { "alias": "animated"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1118
1607
|
}
|
|
1119
1608
|
|
|
1609
|
+
type NsStatCardVariant = 'default' | 'dark' | 'compact' | 'tile';
|
|
1610
|
+
type NsStatCardDeltaTone = 'up' | 'down' | 'neutral';
|
|
1611
|
+
type NsStatCardValueTone = 'default' | 'success' | 'warning' | 'danger' | 'info';
|
|
1612
|
+
type NsStatCardHintTone = 'default' | 'success' | 'warning' | 'danger' | 'info';
|
|
1613
|
+
type NsStatCardIconTone = 'info' | 'success' | 'warning' | 'danger' | 'neutral';
|
|
1614
|
+
/**
|
|
1615
|
+
* Dashboard metric card: label, formatted value (with an optional muted
|
|
1616
|
+
* suffix), and an optional delta pill (`up` / `down` / `neutral`) with a
|
|
1617
|
+
* caption and a secondary hint. `variant="dark"` renders the emphasis
|
|
1618
|
+
* surface used for headline metrics; `variant="compact"` renders a smaller
|
|
1619
|
+
* card with a smaller value size; `variant="tile"` renders a compact KPI
|
|
1620
|
+
* tile (icon circle beside a label/value/delta column, delta as plain
|
|
1621
|
+
* colored text instead of a pill). Set `interactive` to render the card as
|
|
1622
|
+
* a `<button>` and receive `(activated)` instead of a static `<div>`.
|
|
1623
|
+
*
|
|
1624
|
+
* `valueTone` colors only the headline value with the matching semantic
|
|
1625
|
+
* status color (`success`/`warning`/`danger`/`info`); it is ignored on
|
|
1626
|
+
* `variant="dark"`, where the value stays white. `hintTone` colors only the
|
|
1627
|
+
* hint with the same semantic scale, independently of `valueTone`; like
|
|
1628
|
+
* `valueTone`, it is ignored on `variant="dark"`, where the hint keeps the
|
|
1629
|
+
* emphasis-surface foreground color instead of a status color. `iconTone`
|
|
1630
|
+
* colors the icon wrapper background/foreground and applies to every
|
|
1631
|
+
* variant.
|
|
1632
|
+
*
|
|
1633
|
+
* The hint's own `margin-inline-start: auto` (pushing it to the opposite
|
|
1634
|
+
* edge from the value) only applies when it shares the meta row with a
|
|
1635
|
+
* `delta` and/or `deltaLabel` — something to separate from. A lone hint
|
|
1636
|
+
* (no delta, no deltaLabel) aligns to the start, under the value.
|
|
1637
|
+
*/
|
|
1638
|
+
declare class NsStatCardComponent {
|
|
1639
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
1640
|
+
readonly value: _angular_core.InputSignal<string>;
|
|
1641
|
+
readonly suffix: _angular_core.InputSignal<string>;
|
|
1642
|
+
readonly delta: _angular_core.InputSignal<string>;
|
|
1643
|
+
readonly deltaTone: _angular_core.InputSignal<NsStatCardDeltaTone>;
|
|
1644
|
+
readonly deltaLabel: _angular_core.InputSignal<string>;
|
|
1645
|
+
readonly hint: _angular_core.InputSignal<string>;
|
|
1646
|
+
readonly valueTone: _angular_core.InputSignal<NsStatCardValueTone>;
|
|
1647
|
+
readonly hintTone: _angular_core.InputSignal<NsStatCardHintTone>;
|
|
1648
|
+
readonly iconTone: _angular_core.InputSignal<NsStatCardIconTone>;
|
|
1649
|
+
readonly variant: _angular_core.InputSignal<NsStatCardVariant>;
|
|
1650
|
+
readonly interactive: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
1651
|
+
readonly activated: _angular_core.OutputEmitterRef<void>;
|
|
1652
|
+
protected deltaGlyph(): string;
|
|
1653
|
+
protected onActivate(): void;
|
|
1654
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NsStatCardComponent, never>;
|
|
1655
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsStatCardComponent, "ns-stat-card", never, { "label": { "alias": "label"; "required": true; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; "suffix": { "alias": "suffix"; "required": false; "isSignal": true; }; "delta": { "alias": "delta"; "required": false; "isSignal": true; }; "deltaTone": { "alias": "deltaTone"; "required": false; "isSignal": true; }; "deltaLabel": { "alias": "deltaLabel"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "valueTone": { "alias": "valueTone"; "required": false; "isSignal": true; }; "hintTone": { "alias": "hintTone"; "required": false; "isSignal": true; }; "iconTone": { "alias": "iconTone"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "interactive": { "alias": "interactive"; "required": false; "isSignal": true; }; }, { "activated": "activated"; }, never, ["[stat-card-icon]", "[stat-card-footer]"], true, never>;
|
|
1656
|
+
}
|
|
1657
|
+
|
|
1120
1658
|
declare class TemplateDirective {
|
|
1121
1659
|
readonly name: _angular_core.InputSignal<string>;
|
|
1122
1660
|
readonly styleClass: _angular_core.InputSignal<string>;
|
|
@@ -1217,6 +1755,34 @@ declare const NS_THEME_OPTIONS: InjectionToken<NsResolvedThemeOptions>;
|
|
|
1217
1755
|
declare const NS_TOAST_OPTIONS: InjectionToken<NsResolvedToastThemeOptions>;
|
|
1218
1756
|
declare function provideNsTheme(options?: NsThemeOptions): EnvironmentProviders;
|
|
1219
1757
|
|
|
1758
|
+
/**
|
|
1759
|
+
* Registry of theme tokens that used to be part of the Arvisfy preset and no
|
|
1760
|
+
* longer have any effect on rendering. `NsTokenTree` has an open index
|
|
1761
|
+
* signature and `mergeObjects` (below) merges unknown keys in without
|
|
1762
|
+
* complaint, so a consumer overriding a retired token gets no type error and
|
|
1763
|
+
* no `validateNsPreset` error -- the override is silently inert.
|
|
1764
|
+
* `validateNsPreset` walks this map against the resolved preset and emits a
|
|
1765
|
+
* `console.warn` for every retired path still present, so the override at
|
|
1766
|
+
* least surfaces instead of doing nothing invisibly.
|
|
1767
|
+
*
|
|
1768
|
+
* Keys are full token paths, one of:
|
|
1769
|
+
* - `primitive.<path>`
|
|
1770
|
+
* - `semantic.common.<path>`
|
|
1771
|
+
* - `semantic.colorScheme.<light|dark>.<path>`
|
|
1772
|
+
* - `components.<path>`
|
|
1773
|
+
*
|
|
1774
|
+
* Values are the exact message logged for that path. Do not include a
|
|
1775
|
+
* version number in a message: the published package version and this
|
|
1776
|
+
* source's `package.json` version can diverge, so a hardcoded version would
|
|
1777
|
+
* go stale.
|
|
1778
|
+
*
|
|
1779
|
+
* This lives here rather than in its own file: `packages/mcp` transpiles
|
|
1780
|
+
* this module in isolation (`extract-tokens.mjs`'s `assertNoValueImports`)
|
|
1781
|
+
* and cannot resolve a relative value import from a sibling module at that
|
|
1782
|
+
* point, so a second file imported here for its data would break
|
|
1783
|
+
* `nx run mcp:build-data`.
|
|
1784
|
+
*/
|
|
1785
|
+
declare const NS_RETIRED_TOKENS: Readonly<Record<string, string>>;
|
|
1220
1786
|
declare function defineNsPreset(base: NsThemePreset, overrides: NsThemePresetOverrides): NsThemePreset;
|
|
1221
1787
|
declare function validateNsPreset(preset: NsThemePreset): void;
|
|
1222
1788
|
declare function flattenTokens<T>(tree: NsTokenTree<T>): Map<string, T>;
|
|
@@ -1224,6 +1790,32 @@ declare function tokenPathToCssVariable(tier: 'primitive' | 'semantic' | 'compon
|
|
|
1224
1790
|
declare function referenceToCssVariable(reference: NsPrimitiveReference | NsSemanticReference): string;
|
|
1225
1791
|
type NsFlattenedPrimitiveTokens = Map<string, NsPrimitiveTokenValue>;
|
|
1226
1792
|
|
|
1793
|
+
type NsTimelineSize = 'sm' | 'md';
|
|
1794
|
+
/**
|
|
1795
|
+
* Vertical list of dated events. Renders an actual `<ol>` so screen readers
|
|
1796
|
+
* announce it as a list; `ns-timeline-item` renders the individual `<li>`
|
|
1797
|
+
* rows and reads `size` from this host through `:host-context`.
|
|
1798
|
+
*/
|
|
1799
|
+
declare class NsTimelineComponent {
|
|
1800
|
+
readonly size: _angular_core.InputSignal<NsTimelineSize>;
|
|
1801
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NsTimelineComponent, never>;
|
|
1802
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsTimelineComponent, "ns-timeline", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
1803
|
+
}
|
|
1804
|
+
|
|
1805
|
+
/**
|
|
1806
|
+
* `accent` is a violet event marker specific to the timeline (not part of
|
|
1807
|
+
* the shared `NsColor` union), alongside the `info` tone already used by
|
|
1808
|
+
* other status-driven components such as `ns-chip`.
|
|
1809
|
+
*/
|
|
1810
|
+
type NsTimelineItemColor = NsColor | 'info' | 'accent';
|
|
1811
|
+
declare class NsTimelineItemComponent {
|
|
1812
|
+
readonly color: _angular_core.InputSignal<NsTimelineItemColor>;
|
|
1813
|
+
readonly title: _angular_core.InputSignal<string>;
|
|
1814
|
+
readonly meta: _angular_core.InputSignal<string>;
|
|
1815
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NsTimelineItemComponent, never>;
|
|
1816
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsTimelineItemComponent, "ns-timeline-item", never, { "color": { "alias": "color"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": true; "isSignal": true; }; "meta": { "alias": "meta"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
1817
|
+
}
|
|
1818
|
+
|
|
1227
1819
|
declare class NsToastHandle {
|
|
1228
1820
|
private readonly closeToast;
|
|
1229
1821
|
private readonly closeReason;
|
|
@@ -1301,8 +1893,10 @@ declare class NsTabComponent {
|
|
|
1301
1893
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NsTabComponent, never>;
|
|
1302
1894
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsTabComponent, "ns-tab", never, { "key": { "alias": "key"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": true; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
1303
1895
|
}
|
|
1896
|
+
type NsTabsVariant = 'underline' | 'pill';
|
|
1304
1897
|
declare class NsTabsComponent {
|
|
1305
1898
|
readonly orientation: _angular_core.InputSignal<NsOrientation>;
|
|
1899
|
+
readonly variant: _angular_core.InputSignal<NsTabsVariant>;
|
|
1306
1900
|
readonly selectedKey: _angular_core.ModelSignal<NsKey>;
|
|
1307
1901
|
readonly tabs: _angular_core.Signal<readonly NsTabComponent[]>;
|
|
1308
1902
|
private readonly element;
|
|
@@ -1311,7 +1905,7 @@ declare class NsTabsComponent {
|
|
|
1311
1905
|
onKeydown(event: KeyboardEvent, index: number): void;
|
|
1312
1906
|
private syncSelection;
|
|
1313
1907
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NsTabsComponent, never>;
|
|
1314
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsTabsComponent, "ns-tabs", never, { "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "selectedKey": { "alias": "selectedKey"; "required": false; "isSignal": true; }; }, { "selectedKey": "selectedKeyChange"; }, ["tabs"], ["*"], true, never>;
|
|
1908
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsTabsComponent, "ns-tabs", never, { "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "selectedKey": { "alias": "selectedKey"; "required": false; "isSignal": true; }; }, { "selectedKey": "selectedKeyChange"; }, ["tabs"], ["*"], true, never>;
|
|
1315
1909
|
}
|
|
1316
1910
|
|
|
1317
1911
|
declare class NsTagComponent {
|
|
@@ -1382,5 +1976,5 @@ declare class NsTooltipDirective implements OnDestroy {
|
|
|
1382
1976
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NsTooltipDirective, "[nsTooltip]", never, { "message": { "alias": "nsTooltip"; "required": true; "isSignal": true; }; "placement": { "alias": "nsTooltipPlacement"; "required": false; "isSignal": true; }; "delay": { "alias": "nsTooltipDelay"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1383
1977
|
}
|
|
1384
1978
|
|
|
1385
|
-
export { Arvisfy, NS_THEME_OPTIONS, NS_TOAST_OPTIONS, NsAccordionComponent, NsAccordionItemComponent, NsAlertComponent, NsAvatarComponent, NsBadgeComponent, NsBreadcrumbItemComponent, NsBreadcrumbsComponent, NsButtonComponent, NsButtonGroupComponent, NsCardBodyComponent, NsCardComponent, NsCardFooterComponent, NsCardHeaderComponent, NsCheckboxComponent, NsChipComponent, NsCollectionController, NsCommentComponent, NsContentEditableComponent, NsDatePickerComponent, NsDateRangePickerComponent, NsDescriptionComponent, NsDividerComponent, NsDrawerComponent, NsDrawerRef, NsDrawerService, NsDropdownComponent, NsDropdownItemDirective, NsEditorColorPickerComponent, NsEditorComponent, NsEditorLinkComponent, NsEditorListComponent, NsEditorParagraphComponent, NsEditorToggleCommandComponent, NsFieldContext, NsFieldDirective, NsImageUploadComponent, NsInputCodeComponent, NsInputComponent, NsInputGroupAddonComponent, NsInputGroupComponent, NsInputNumberComponent, NsInputSearchComponent, NsLinkComponent, NsMeterComponent, NsModalComponent, NsModalRef, NsModalService, NsOverlayRef, NsOverlayService, NsPaginationComponent, NsPasswordComponent, NsPopoverComponent, NsProgressBarComponent, NsRadioComponent, NsRadioGroupComponent, NsSchedule, NsScheduleComponent, NsScheduleService, NsSchemaMarkupComponent, NsSkeletonComponent, NsSliderComponent, NsSurfaceComponent, NsSwitchComponent, NsTabComponent, NsTabsComponent, NsTagComponent, NsTagGroupComponent, NsTextAreaComponent, NsThemeService, NsToastComponent, NsToastHandle, NsToastService, NsTooltipComponent, NsTooltipDirective, NsValueAccessor, TemplateDirective, defineNsPreset, flattenTokens, getNsOverlayPosition, provideNsTheme, referenceToCssVariable, tokenPathToCssVariable, validateNsPreset };
|
|
1386
|
-
export type { NsAlertVariant, NsBadgeMode, NsButtonVariant, NsCollectionItem, NsColor, NsColorScheme, NsComment, NsComponentInputs, NsDateRangeValue, NsDateView, NsDeepPartial, NsDrawerComponentInputs, NsDrawerConfig, NsDrawerOptions, NsDrawerPosition, NsDropdownItem, NsDropdownValue, NsFlattenedPrimitiveTokens, NsKey, NsModalConfig, NsModalOptions, NsModalSize, NsOrientation, NsOverlayCloseReason, NsOverlayConfig, NsOverlayPosition, NsPlacement, NsPrimitiveReference, NsPrimitiveTokenValue, NsResolvedColorScheme, NsResolvedThemeOptions, NsResolvedToastThemeOptions, NsSchemaMarkup, NsSchemaType, NsSelectionMode, NsSemanticReference, NsSemanticTokens, NsSize, NsSliderValue, NsThemeOptions, NsThemePreset, NsThemePresetOverrides, NsToastAction, NsToastCloseReason, NsToastOptions, NsToastPlacement, NsToastThemeOptions, NsToastVariant, NsTokenTree, NsVariant };
|
|
1979
|
+
export { Arvisfy, NS_EDITOR_TOOLS_DEFAULT, NS_RETIRED_TOKENS, NS_THEME_OPTIONS, NS_TOAST_OPTIONS, NsAccordionComponent, NsAccordionItemComponent, NsAlertComponent, NsAvatarComponent, NsAvatarGroupComponent, NsBadgeComponent, NsBreadcrumbItemComponent, NsBreadcrumbsComponent, NsButtonComponent, NsButtonGroupComponent, NsCardBodyComponent, NsCardComponent, NsCardFooterComponent, NsCardHeaderComponent, NsCheckboxComponent, NsChipComponent, NsCollectionController, NsCommandPaletteComponent, NsCommentComponent, NsContentEditableComponent, NsDatePickerComponent, NsDateRangePickerComponent, NsDescriptionComponent, NsDividerComponent, NsDrawerComponent, NsDrawerRef, NsDrawerService, NsDropdownComponent, NsDropdownItemDirective, NsEditorColorPickerComponent, NsEditorComponent, NsEditorImageComponent, NsEditorLinkComponent, NsEditorListComponent, NsEditorParagraphComponent, NsEditorToggleCommandComponent, NsEmptyStateComponent, NsFieldContext, NsFieldDirective, NsImageUploadComponent, NsInputCodeComponent, NsInputComponent, NsInputGroupAddonComponent, NsInputGroupComponent, NsInputNumberComponent, NsInputSearchComponent, NsLinkComponent, NsLoadMoreComponent, NsMenuComponent, NsMenuDividerComponent, NsMenuItemComponent, NsMenuSectionComponent, NsMeterComponent, NsModalComponent, NsModalRef, NsModalService, NsOptionCardComponent, NsOverlayRef, NsOverlayService, NsPaginationComponent, NsPasswordComponent, NsPopoverComponent, NsProgressBarComponent, NsRadioComponent, NsRadioGroupComponent, NsSchedule, NsScheduleComponent, NsScheduleService, NsSchemaMarkupComponent, NsSideNavComponent, NsSideNavItemComponent, NsSideNavSectionComponent, NsSkeletonComponent, NsSliderComponent, NsStatCardComponent, NsSurfaceComponent, NsSwitchComponent, NsTabComponent, NsTabsComponent, NsTagComponent, NsTagGroupComponent, NsTextAreaComponent, NsThemeService, NsTimelineComponent, NsTimelineItemComponent, NsToastComponent, NsToastHandle, NsToastService, NsTooltipComponent, NsTooltipDirective, NsValueAccessor, TemplateDirective, defineNsPreset, flattenTokens, getNsOverlayPosition, provideNsTheme, referenceToCssVariable, tokenPathToCssVariable, validateNsPreset };
|
|
1980
|
+
export type { NsAlertVariant, NsBadgeMode, NsButtonGroupSelectionMode, NsButtonVariant, NsChipColor, NsChipSize, NsChipVariant, NsCollectionItem, NsColor, NsColorScheme, NsCommandGroup, NsCommandItem, NsComment, NsComponentInputs, NsDateRangeValue, NsDateView, NsDeepPartial, NsDrawerComponentInputs, NsDrawerConfig, NsDrawerOptions, NsDrawerPosition, NsDropdownItem, NsDropdownValue, NsEditorTool, NsEmptyStateSize, NsFlattenedPrimitiveTokens, NsKey, NsModalConfig, NsModalOptions, NsModalSize, NsOrientation, NsOverlayCloseReason, NsOverlayConfig, NsOverlayPosition, NsPlacement, NsPrimitiveReference, NsPrimitiveTokenValue, NsResolvedColorScheme, NsResolvedThemeOptions, NsResolvedToastThemeOptions, NsSchemaMarkup, NsSchemaType, NsSelectionMode, NsSemanticReference, NsSemanticTokens, NsSideNavColor, NsSize, NsSliderValue, NsStatCardDeltaTone, NsStatCardHintTone, NsStatCardIconTone, NsStatCardValueTone, NsStatCardVariant, NsTabsVariant, NsThemeOptions, NsThemePreset, NsThemePresetOverrides, NsTimelineItemColor, NsTimelineSize, NsToastAction, NsToastCloseReason, NsToastOptions, NsToastPlacement, NsToastThemeOptions, NsToastVariant, NsTokenTree, NsVariant };
|