@cngx/common 0.1.0-rc.7 → 0.1.0-rc.9
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/card/README.md +2 -1
- package/command/README.md +29 -0
- package/data/README.md +15 -3
- package/dialog/README.md +23 -1
- package/fesm2022/cngx-common-a11y.mjs +517 -184
- package/fesm2022/cngx-common-a11y.mjs.map +1 -1
- package/fesm2022/cngx-common-audio.mjs +62 -17
- package/fesm2022/cngx-common-audio.mjs.map +1 -1
- package/fesm2022/cngx-common-card.mjs +301 -46
- package/fesm2022/cngx-common-card.mjs.map +1 -1
- package/fesm2022/cngx-common-chart.mjs +1221 -479
- package/fesm2022/cngx-common-chart.mjs.map +1 -1
- package/fesm2022/cngx-common-command.mjs +97 -16
- package/fesm2022/cngx-common-command.mjs.map +1 -1
- package/fesm2022/cngx-common-data.mjs +1496 -499
- package/fesm2022/cngx-common-data.mjs.map +1 -1
- package/fesm2022/cngx-common-dialog.mjs +236 -61
- package/fesm2022/cngx-common-dialog.mjs.map +1 -1
- package/fesm2022/cngx-common-display.mjs +364 -93
- package/fesm2022/cngx-common-display.mjs.map +1 -1
- package/fesm2022/cngx-common-interactive.mjs +2040 -1046
- package/fesm2022/cngx-common-interactive.mjs.map +1 -1
- package/fesm2022/cngx-common-layout.mjs +955 -125
- package/fesm2022/cngx-common-layout.mjs.map +1 -1
- package/fesm2022/cngx-common-popover.mjs +1293 -89
- package/fesm2022/cngx-common-popover.mjs.map +1 -1
- package/fesm2022/cngx-common-stepper.mjs +997 -453
- package/fesm2022/cngx-common-stepper.mjs.map +1 -1
- package/fesm2022/cngx-common-tabs.mjs +1794 -1265
- package/fesm2022/cngx-common-tabs.mjs.map +1 -1
- package/fesm2022/cngx-common-timeline.mjs +151 -61
- package/fesm2022/cngx-common-timeline.mjs.map +1 -1
- package/fesm2022/cngx-common.mjs +1 -1
- package/interactive/README.md +15 -4
- package/layout/README.md +37 -1
- package/package.json +20 -7
- package/popover/README.md +58 -2
- package/schematics/collection.json +9 -0
- package/schematics/ng-add/index.js +9 -0
- package/schematics/ng-add/schema.json +91 -0
- package/schematics/package.json +3 -0
- package/stepper/README.md +11 -8
- package/theming/components/cngx-accordion.css +1 -1
- package/theming/components/cngx-backdrop.css +12 -0
- package/theming/components/cngx-button-toggle.css +29 -3
- package/theming/components/cngx-data-grid.css +168 -1
- package/theming/components/cngx-dialog.css +13 -0
- package/theming/components/cngx-listbox.css +21 -12
- package/theming/components/cngx-menu.css +56 -16
- package/theming/components/cngx-popover-sheet.css +402 -0
- package/theming/components/cngx-popover.css +28 -0
- package/theming/components/cngx-recycler-placeholder.css +196 -0
- package/theming/components/cngx-ripple.css +1 -1
- package/theming/components/cngx-slider.css +32 -1
- package/theming/components/cngx-tooltip.css +12 -0
- package/timeline/README.md +155 -0
- package/types/cngx-common-a11y.d.ts +205 -28
- package/types/cngx-common-card.d.ts +201 -17
- package/types/cngx-common-chart.d.ts +345 -48
- package/types/cngx-common-command.d.ts +50 -10
- package/types/cngx-common-data.d.ts +743 -92
- package/types/cngx-common-dialog.d.ts +161 -10
- package/types/cngx-common-display.d.ts +356 -142
- package/types/cngx-common-interactive.d.ts +910 -226
- package/types/cngx-common-layout.d.ts +603 -32
- package/types/cngx-common-popover.d.ts +612 -49
- package/types/cngx-common-stepper.d.ts +526 -237
- package/types/cngx-common-tabs.d.ts +358 -75
- package/types/cngx-common-timeline.d.ts +108 -22
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { Signal,
|
|
2
|
+
import { Signal, InjectionToken, Provider, TemplateRef, EnvironmentProviders } from '@angular/core';
|
|
3
3
|
import * as _cngx_common_display from '@cngx/common/display';
|
|
4
|
+
import { CngxMessage } from '@cngx/core/i18n';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Display atom for icons. Projects its content (font glyph, SVG, image, custom
|
|
@@ -75,6 +76,7 @@ type SegmentState = 'done' | 'active' | 'todo' | 'error';
|
|
|
75
76
|
* <example-url>http://localhost:4200/#/common/display/segmented-progress/error-segment</example-url>
|
|
76
77
|
*/
|
|
77
78
|
declare class CngxSegmentedProgress {
|
|
79
|
+
private readonly i18n;
|
|
78
80
|
/** Number of completed positions (0-based count). Drives derivation. */
|
|
79
81
|
readonly value: _angular_core.InputSignal<number>;
|
|
80
82
|
/** Total number of segments when deriving from `[value]`. */
|
|
@@ -87,9 +89,10 @@ declare class CngxSegmentedProgress {
|
|
|
87
89
|
/**
|
|
88
90
|
* Override the `aria-valuetext` string. Receives `(now, max)` - the
|
|
89
91
|
* completed-segment count and the total segment count. Mirrors
|
|
90
|
-
* `CngxStepperCount.format`;
|
|
91
|
-
*
|
|
92
|
-
*
|
|
92
|
+
* `CngxStepperCount.format`; wins over the app-wide
|
|
93
|
+
* `CNGX_DISPLAY_I18N.segmentedProgressValueText` (English default
|
|
94
|
+
* `(now, max) => \`${now} of ${max}\``). Supply a closure for per-instance
|
|
95
|
+
* position text (e.g. `(n, m) => \`Schritt ${n} von ${m}\``).
|
|
93
96
|
*/
|
|
94
97
|
readonly valueTextFormat: _angular_core.InputSignal<((now: number, max: number) => string) | undefined>;
|
|
95
98
|
/** Segments actually rendered: explicit when supplied, else derived. */
|
|
@@ -131,6 +134,110 @@ declare class CngxDivider {
|
|
|
131
134
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxDivider, "cngx-divider, [cngxDivider]", ["cngxDivider"], { "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "inset": { "alias": "inset"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
132
135
|
}
|
|
133
136
|
|
|
137
|
+
/**
|
|
138
|
+
* Presence states `CngxAvatar` renders a status dot for.
|
|
139
|
+
*
|
|
140
|
+
* @category common/display/i18n
|
|
141
|
+
* @since 0.1.0
|
|
142
|
+
*/
|
|
143
|
+
type CngxAvatarStatus = 'online' | 'offline' | 'busy' | 'away';
|
|
144
|
+
/**
|
|
145
|
+
* Display-atom i18n surface. Library defaults are English; consumers override
|
|
146
|
+
* via {@link provideDisplayI18n}. Reactive from birth: the token carries a
|
|
147
|
+
* `Signal`, and {@link withDisplayI18nLabels} accepts a `Signal` of a partial
|
|
148
|
+
* bundle, so a runtime language switch re-derives every read.
|
|
149
|
+
*
|
|
150
|
+
* Per-instance inputs (`statusLabel`, `labelFormat`, `valueTextFormat`, a bound
|
|
151
|
+
* `label` / `removeAriaLabel`) still win over the bundle. Every key is read
|
|
152
|
+
* reactively while its input is unbound, `avatarGroupNoun` and `chipRemove`
|
|
153
|
+
* included, so a language switch reaches each atom without re-creating it.
|
|
154
|
+
*
|
|
155
|
+
* @category common/display/i18n
|
|
156
|
+
* @since 0.1.0
|
|
157
|
+
*/
|
|
158
|
+
interface CngxDisplayI18n {
|
|
159
|
+
/** `CngxAvatar` status dot accessible name. English keeps the raw status word. */
|
|
160
|
+
readonly avatarStatus: (status: CngxAvatarStatus) => string;
|
|
161
|
+
/** Default of the `CngxAvatarGroup` `label` input: the entity noun. */
|
|
162
|
+
readonly avatarGroupNoun: string;
|
|
163
|
+
/** `CngxAvatarGroup` accessible summary; `hidden` is `0` when nothing is collapsed. */
|
|
164
|
+
readonly avatarGroupLabel: (total: number, hidden: number) => string;
|
|
165
|
+
/**
|
|
166
|
+
* The avatar-group summary for a given noun - the language's message with a
|
|
167
|
+
* consumer-bound `label` noun or an overridden `avatarGroupNoun`.
|
|
168
|
+
*/
|
|
169
|
+
readonly avatarGroupLabelFor: (total: number, hidden: number, noun: string) => string;
|
|
170
|
+
/** Visible `+N` pill of `CngxAvatarGroup`. */
|
|
171
|
+
readonly avatarGroupOverflow: (count: number) => string;
|
|
172
|
+
/** `CngxSegmentedProgress` `aria-valuetext`: completed and total segment count. */
|
|
173
|
+
readonly segmentedProgressValueText: (now: number, max: number) => string;
|
|
174
|
+
/** Default of the `CngxChip` `removeAriaLabel` input. */
|
|
175
|
+
readonly chipRemove: string;
|
|
176
|
+
/** `CngxBadge` text for a count above its `max`, e.g. `99+`. */
|
|
177
|
+
readonly badgeOverflow: (max: number) => string;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* DI token for the display i18n bundle. `providedIn: 'root'`: the display
|
|
181
|
+
* section of the active language pack over the English defaults, formatted
|
|
182
|
+
* for the app locale; the value is a `Signal`, shared by every reader under
|
|
183
|
+
* one injector.
|
|
184
|
+
*
|
|
185
|
+
* @category common/display/i18n
|
|
186
|
+
* @wcag AA
|
|
187
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/display/i18n/display-i18n.ts
|
|
188
|
+
* @since 0.1.0
|
|
189
|
+
* @relatedTo CngxAvatar, CngxAvatarGroup, CngxSegmentedProgress, CngxChip
|
|
190
|
+
*/
|
|
191
|
+
declare const CNGX_DISPLAY_I18N: InjectionToken<Signal<CngxDisplayI18n>>;
|
|
192
|
+
/**
|
|
193
|
+
* Branded feature-fn for {@link provideDisplayI18n}.
|
|
194
|
+
*
|
|
195
|
+
* @category common/display/i18n
|
|
196
|
+
* @since 0.1.0
|
|
197
|
+
*/
|
|
198
|
+
type CngxDisplayI18nFeature = ((bundle: Signal<CngxDisplayI18n>) => Signal<CngxDisplayI18n>) & {
|
|
199
|
+
readonly _target: 'i18n';
|
|
200
|
+
};
|
|
201
|
+
/**
|
|
202
|
+
* Override display labels via a partial bundle - unset keys keep the
|
|
203
|
+
* language pack's copy, or the English default. Pass a `Signal` of a partial
|
|
204
|
+
* bundle to switch languages at runtime.
|
|
205
|
+
*
|
|
206
|
+
* @category common/display/i18n
|
|
207
|
+
* @since 0.1.0
|
|
208
|
+
*/
|
|
209
|
+
declare function withDisplayI18nLabels(overrides: Partial<CngxDisplayI18n> | Signal<Partial<CngxDisplayI18n>>): CngxDisplayI18nFeature;
|
|
210
|
+
/**
|
|
211
|
+
* Provider for the display i18n bundle. Returns a plain `Provider`, so it also
|
|
212
|
+
* scopes a subtree through `viewProviders`. The features apply on top of the
|
|
213
|
+
* active language pack.
|
|
214
|
+
*
|
|
215
|
+
* ```ts
|
|
216
|
+
* bootstrapApplication(AppComponent, {
|
|
217
|
+
* providers: [
|
|
218
|
+
* provideDisplayI18n(
|
|
219
|
+
* withDisplayI18nLabels({
|
|
220
|
+
* avatarStatus: (status) => ({ online: 'online', offline: 'offline', busy: 'beschaeftigt', away: 'abwesend' })[status],
|
|
221
|
+
* chipRemove: 'Entfernen',
|
|
222
|
+
* }),
|
|
223
|
+
* ),
|
|
224
|
+
* ],
|
|
225
|
+
* });
|
|
226
|
+
* ```
|
|
227
|
+
*
|
|
228
|
+
* @category common/display/i18n
|
|
229
|
+
* @since 0.1.0
|
|
230
|
+
*/
|
|
231
|
+
declare function provideDisplayI18n(...features: readonly CngxDisplayI18nFeature[]): Provider;
|
|
232
|
+
/**
|
|
233
|
+
* Inject the resolved display i18n bundle signal. Read it inside a
|
|
234
|
+
* `computed()` or template so a runtime override flip re-derives.
|
|
235
|
+
*
|
|
236
|
+
* @category common/display/i18n
|
|
237
|
+
* @since 0.1.0
|
|
238
|
+
*/
|
|
239
|
+
declare function injectDisplayI18n(): Signal<CngxDisplayI18n>;
|
|
240
|
+
|
|
134
241
|
/**
|
|
135
242
|
* Display atom for user/person/entity avatars.
|
|
136
243
|
*
|
|
@@ -153,6 +260,7 @@ declare class CngxDivider {
|
|
|
153
260
|
* <example-url>http://localhost:4200/#/common/display/avatar/sizes</example-url>
|
|
154
261
|
*/
|
|
155
262
|
declare class CngxAvatar {
|
|
263
|
+
private readonly i18n;
|
|
156
264
|
/** Image URL. When set and loads successfully, the image is shown. */
|
|
157
265
|
readonly src: _angular_core.InputSignal<string | undefined>;
|
|
158
266
|
/** Alternate text for the image. Required when `src` is used. */
|
|
@@ -164,7 +272,15 @@ declare class CngxAvatar {
|
|
|
164
272
|
/** Visual shape. */
|
|
165
273
|
readonly shape: _angular_core.InputSignal<"circle" | "square">;
|
|
166
274
|
/** Optional user-presence status indicator. */
|
|
167
|
-
readonly status: _angular_core.InputSignal<
|
|
275
|
+
readonly status: _angular_core.InputSignal<CngxAvatarStatus | undefined>;
|
|
276
|
+
/**
|
|
277
|
+
* Format closure for the status dot's accessible label. When set, it wins
|
|
278
|
+
* over the app-wide `CNGX_DISPLAY_I18N.avatarStatus` (English default: the
|
|
279
|
+
* status word). Mirrors the `labelFormat` closure on `CngxAvatarGroup`.
|
|
280
|
+
*/
|
|
281
|
+
readonly statusLabel: _angular_core.InputSignal<((status: CngxAvatarStatus) => string) | undefined>;
|
|
282
|
+
/** Accessible label of the status dot - the closure's output when set, else `CNGX_DISPLAY_I18N.avatarStatus`. */
|
|
283
|
+
protected readonly statusAriaLabel: _angular_core.Signal<string | null>;
|
|
168
284
|
private readonly imageLoadedState;
|
|
169
285
|
private readonly imageErroredState;
|
|
170
286
|
/** Whether the image loaded successfully. */
|
|
@@ -176,7 +292,7 @@ declare class CngxAvatar {
|
|
|
176
292
|
protected handleLoad(): void;
|
|
177
293
|
protected handleError(): void;
|
|
178
294
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxAvatar, never>;
|
|
179
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxAvatar, "cngx-avatar", ["cngxAvatar"], { "src": { "alias": "src"; "required": false; "isSignal": true; }; "alt": { "alias": "alt"; "required": false; "isSignal": true; }; "initials": { "alias": "initials"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "shape": { "alias": "shape"; "required": false; "isSignal": true; }; "status": { "alias": "status"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
295
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxAvatar, "cngx-avatar", ["cngxAvatar"], { "src": { "alias": "src"; "required": false; "isSignal": true; }; "alt": { "alias": "alt"; "required": false; "isSignal": true; }; "initials": { "alias": "initials"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "shape": { "alias": "shape"; "required": false; "isSignal": true; }; "status": { "alias": "status"; "required": false; "isSignal": true; }; "statusLabel": { "alias": "statusLabel"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
180
296
|
}
|
|
181
297
|
|
|
182
298
|
/**
|
|
@@ -205,27 +321,40 @@ declare class CngxAvatar {
|
|
|
205
321
|
* @relatedTo CngxAvatar
|
|
206
322
|
*/
|
|
207
323
|
declare class CngxAvatarGroup {
|
|
324
|
+
private readonly i18n;
|
|
208
325
|
/** Maximum avatars to show before collapsing the rest into the pill. Unset = show all. */
|
|
209
326
|
readonly max: _angular_core.InputSignal<number | undefined>;
|
|
210
327
|
/** Size preset for the overflow pill and stacking overlap (mirrors `CngxAvatar`). */
|
|
211
328
|
readonly size: _angular_core.InputSignal<"xs" | "sm" | "md" | "lg" | "xl">;
|
|
212
329
|
/** Pill shape (mirrors `CngxAvatar`). */
|
|
213
330
|
readonly shape: _angular_core.InputSignal<"circle" | "square">;
|
|
214
|
-
/**
|
|
215
|
-
|
|
331
|
+
/**
|
|
332
|
+
* Entity noun used in the `aria-label` summary. Unbound, it follows
|
|
333
|
+
* `CNGX_DISPLAY_I18N.avatarGroupNoun` (or its `avatarGroupLabel`
|
|
334
|
+
* formatter); a bound noun goes into the language's summary message.
|
|
335
|
+
*/
|
|
336
|
+
readonly label: _angular_core.InputSignal<string | undefined>;
|
|
337
|
+
/**
|
|
338
|
+
* Format closure for the accessible summary. When set, it wins over
|
|
339
|
+
* `CNGX_DISPLAY_I18N.avatarGroupLabel` and the bound `label` noun.
|
|
340
|
+
* `hidden` is `0` when nothing is collapsed.
|
|
341
|
+
*/
|
|
342
|
+
readonly labelFormat: _angular_core.InputSignal<((total: number, hidden: number) => string) | undefined>;
|
|
216
343
|
private readonly el;
|
|
217
344
|
private readonly avatars;
|
|
218
345
|
/** Total number of projected avatars. */
|
|
219
346
|
protected readonly total: _angular_core.Signal<number>;
|
|
220
|
-
/** How many avatars are actually shown (capped by `max`). */
|
|
347
|
+
/** How many avatars are actually shown (capped by `max`). `max=0` collapses all; negatives clamp to `0`. */
|
|
221
348
|
protected readonly visibleCount: _angular_core.Signal<number>;
|
|
222
349
|
/** How many avatars are collapsed into the `+N` pill. */
|
|
223
350
|
protected readonly hiddenCount: _angular_core.Signal<number>;
|
|
351
|
+
/** Visible `+N` pill text, with the count in the app locale. */
|
|
352
|
+
protected readonly overflowText: _angular_core.Signal<string>;
|
|
224
353
|
/** Accessible summary of total and hidden counts. */
|
|
225
354
|
protected readonly ariaLabel: _angular_core.Signal<string>;
|
|
226
355
|
constructor();
|
|
227
356
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxAvatarGroup, never>;
|
|
228
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxAvatarGroup, "cngx-avatar-group", ["cngxAvatarGroup"], { "max": { "alias": "max"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "shape": { "alias": "shape"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; }, {}, ["avatars"], ["cngx-avatar"], true, never>;
|
|
357
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxAvatarGroup, "cngx-avatar-group", ["cngxAvatarGroup"], { "max": { "alias": "max"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "shape": { "alias": "shape"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "labelFormat": { "alias": "labelFormat"; "required": false; "isSignal": true; }; }, {}, ["avatars"], ["cngx-avatar"], true, never>;
|
|
229
358
|
}
|
|
230
359
|
|
|
231
360
|
/**
|
|
@@ -261,7 +390,11 @@ type CngxBadgePosition = 'inline' | 'above-start' | 'above-end' | 'below-start'
|
|
|
261
390
|
* <example-url>http://localhost:4200/#/common/display/badge/inline-and-hidden</example-url>
|
|
262
391
|
*/
|
|
263
392
|
declare class CngxBadge {
|
|
264
|
-
/**
|
|
393
|
+
/**
|
|
394
|
+
* Raw value. Numbers show as text (respecting `max`); booleans flip dot
|
|
395
|
+
* mode; strings render verbatim. Numbers at or below `0` count as empty -
|
|
396
|
+
* a negative count never renders, mirroring the `0` behaviour.
|
|
397
|
+
*/
|
|
265
398
|
readonly cngxBadge: _angular_core.InputSignal<string | number | boolean>;
|
|
266
399
|
/** Color variant. */
|
|
267
400
|
readonly color: _angular_core.InputSignal<CngxBadgeColor>;
|
|
@@ -269,8 +402,13 @@ declare class CngxBadge {
|
|
|
269
402
|
readonly position: _angular_core.InputSignal<CngxBadgePosition>;
|
|
270
403
|
/** Whether the indicator is hidden regardless of value. */
|
|
271
404
|
readonly hidden: _angular_core.InputSignal<boolean>;
|
|
272
|
-
/**
|
|
405
|
+
/**
|
|
406
|
+
* Cap for numeric values - anything over renders through
|
|
407
|
+
* `CNGX_DISPLAY_I18N.badgeOverflow` (English `"99+"`).
|
|
408
|
+
*/
|
|
273
409
|
readonly max: _angular_core.InputSignal<number>;
|
|
410
|
+
private readonly i18n;
|
|
411
|
+
private readonly locale;
|
|
274
412
|
private readonly hostEl;
|
|
275
413
|
private readonly renderer;
|
|
276
414
|
private badgeEl;
|
|
@@ -331,6 +469,7 @@ declare class CngxBadge {
|
|
|
331
469
|
* <example-url>http://localhost:4200/#/common/interactive/chip/multi-group/multi-select-chips-with-selection-count</example-url>
|
|
332
470
|
*/
|
|
333
471
|
declare class CngxChip {
|
|
472
|
+
private readonly i18n;
|
|
334
473
|
/**
|
|
335
474
|
* Whether the close button is rendered. Typed as `boolean` - bind a
|
|
336
475
|
* signal getter (`[removable]="!select.disabled()"`) if the flag
|
|
@@ -344,12 +483,14 @@ declare class CngxChip {
|
|
|
344
483
|
*/
|
|
345
484
|
readonly id: _angular_core.InputSignal<string | null>;
|
|
346
485
|
/**
|
|
347
|
-
* A11y label for the close button.
|
|
348
|
-
* consumers with option
|
|
486
|
+
* A11y label for the close button. Unbound, it follows
|
|
487
|
+
* `CNGX_DISPLAY_I18N.chipRemove` (English "Remove"); consumers with option
|
|
488
|
+
* labels on hand should supply something more
|
|
349
489
|
* specific (e.g. `"Remove Red"`) so screen readers know which chip
|
|
350
490
|
* the button removes.
|
|
351
491
|
*/
|
|
352
|
-
readonly removeAriaLabel: _angular_core.InputSignal<string>;
|
|
492
|
+
readonly removeAriaLabel: _angular_core.InputSignal<string | undefined>;
|
|
493
|
+
protected readonly resolvedRemoveAriaLabel: _angular_core.Signal<string>;
|
|
353
494
|
/** Fires when the user clicks the close button. */
|
|
354
495
|
readonly remove: _angular_core.OutputEmitterRef<MouseEvent>;
|
|
355
496
|
private readonly autoId;
|
|
@@ -634,8 +775,9 @@ declare class CngxRadioIndicator {
|
|
|
634
775
|
* `datetime` attribute (ISO 8601) plus a human string in one of two modes:
|
|
635
776
|
* `absolute` (via `Intl.DateTimeFormat`) or `relative` (via
|
|
636
777
|
* `Intl.RelativeTimeFormat`, e.g. "3 days ago"). Formatting resolves against
|
|
637
|
-
* the
|
|
638
|
-
* provides one
|
|
778
|
+
* the app locale (`CNGX_LOCALE`, falling back to the nearest `LOCALE_ID`) -
|
|
779
|
+
* English out of the box, locale-driven when the app provides one, re-formatted
|
|
780
|
+
* on a locale flip; no hardcoded strings.
|
|
639
781
|
*
|
|
640
782
|
* Relative mode is render-time, not live-ticking: it recomputes when `[date]`
|
|
641
783
|
* changes, not on a timer, so "2 minutes ago" does not self-update. A consumer
|
|
@@ -669,17 +811,26 @@ declare class CngxTime {
|
|
|
669
811
|
* Coerced instant. A `Date`; downstream reads its time value. The `equal` fn
|
|
670
812
|
* dedupes by time value so re-binding `[date]` to a fresh `Date` of the same
|
|
671
813
|
* instant (or the equivalent ISO string) does not cascade `iso`/`formatted` -
|
|
672
|
-
* the object-computed equality rule.
|
|
814
|
+
* the object-computed equality rule. NaN pairs compare equal - without the
|
|
815
|
+
* arm, two Invalid Dates would defeat the dedupe (NaN !== NaN) and cascade
|
|
816
|
+
* on every rebind.
|
|
673
817
|
*/
|
|
674
818
|
protected readonly instant: _angular_core.Signal<Date>;
|
|
675
|
-
/**
|
|
676
|
-
|
|
819
|
+
/**
|
|
820
|
+
* Invalid Date guard. `toISOString()` throws and `Intl.format` renders
|
|
821
|
+
* garbage on an invalid instant - a bad ISO string must degrade to an
|
|
822
|
+
* empty render, not crash change detection.
|
|
823
|
+
*/
|
|
824
|
+
protected readonly isValidDate: _angular_core.Signal<boolean>;
|
|
825
|
+
/** Machine-readable ISO 8601 for the `datetime` attribute. `null` (attribute removed) when the instant is invalid. */
|
|
826
|
+
protected readonly iso: _angular_core.Signal<string | null>;
|
|
677
827
|
/**
|
|
678
828
|
* Human string. Reads `Date.now()` in `relative` mode as a render-time
|
|
679
829
|
* snapshot - untracked by design, so the value recomputes only when `[date]`
|
|
680
830
|
* (or `mode`/`format`) changes, never on a timer.
|
|
681
831
|
*/
|
|
682
832
|
protected readonly formatted: _angular_core.Signal<string>;
|
|
833
|
+
constructor();
|
|
683
834
|
private formatRelative;
|
|
684
835
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxTime, never>;
|
|
685
836
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxTime, "cngx-time", ["cngxTime"], { "date": { "alias": "date"; "required": true; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "format": { "alias": "format"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
@@ -723,55 +874,6 @@ declare class CngxPasswordStrengthMeter {
|
|
|
723
874
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxPasswordStrengthMeter, "cngx-password-strength-meter", never, { "score": { "alias": "score"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
724
875
|
}
|
|
725
876
|
|
|
726
|
-
/**
|
|
727
|
-
* Context exposed by the `*cngxTagLabel` slot - the full reactive
|
|
728
|
-
* Tag state bundled so consumer templates can switch on variant /
|
|
729
|
-
* colour / size / truncate without injecting the directive.
|
|
730
|
-
*
|
|
731
|
-
* `$implicit` is `void` because the slot has no positional payload -
|
|
732
|
-
* consumers reach for the named fields below. Pattern mirrors
|
|
733
|
-
* `CngxSelectInputSlotContext` in `@cngx/forms/select/shared`.
|
|
734
|
-
*
|
|
735
|
-
* @category common/display
|
|
736
|
-
*/
|
|
737
|
-
interface CngxTagLabelContext {
|
|
738
|
-
readonly $implicit: void;
|
|
739
|
-
readonly variant: CngxTagVariant;
|
|
740
|
-
readonly color: CngxTagColor;
|
|
741
|
-
readonly size: CngxTagSize;
|
|
742
|
-
readonly truncate: boolean;
|
|
743
|
-
}
|
|
744
|
-
/**
|
|
745
|
-
* Context exposed by the `*cngxTagPrefix` slot. Structurally
|
|
746
|
-
* identical to {@link CngxTagLabelContext}; kept as a separate
|
|
747
|
-
* interface so future per-slot fields (e.g. spacing tokens) can
|
|
748
|
-
* land without breaking label-slot consumers.
|
|
749
|
-
*
|
|
750
|
-
* @category common/display
|
|
751
|
-
*/
|
|
752
|
-
interface CngxTagPrefixContext {
|
|
753
|
-
readonly $implicit: void;
|
|
754
|
-
readonly variant: CngxTagVariant;
|
|
755
|
-
readonly color: CngxTagColor;
|
|
756
|
-
readonly size: CngxTagSize;
|
|
757
|
-
readonly truncate: boolean;
|
|
758
|
-
}
|
|
759
|
-
/**
|
|
760
|
-
* Context exposed by the `*cngxTagSuffix` slot. Structurally
|
|
761
|
-
* identical to {@link CngxTagLabelContext}; kept as a separate
|
|
762
|
-
* interface so future per-slot fields can land without breaking
|
|
763
|
-
* label-slot consumers.
|
|
764
|
-
*
|
|
765
|
-
* @category common/display
|
|
766
|
-
*/
|
|
767
|
-
interface CngxTagSuffixContext {
|
|
768
|
-
readonly $implicit: void;
|
|
769
|
-
readonly variant: CngxTagVariant;
|
|
770
|
-
readonly color: CngxTagColor;
|
|
771
|
-
readonly size: CngxTagSize;
|
|
772
|
-
readonly truncate: boolean;
|
|
773
|
-
}
|
|
774
|
-
|
|
775
877
|
/**
|
|
776
878
|
* Override template for the label region of `<span cngxTag>`.
|
|
777
879
|
*
|
|
@@ -812,7 +914,7 @@ interface CngxTagSuffixContext {
|
|
|
812
914
|
* <example-url>http://localhost:4200/#/common/display/tag/variant-matrix</example-url>
|
|
813
915
|
*/
|
|
814
916
|
declare class CngxTagLabel {
|
|
815
|
-
readonly templateRef: TemplateRef<
|
|
917
|
+
readonly templateRef: TemplateRef<_cngx_common_display.CngxTagSlotContext>;
|
|
816
918
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxTagLabel, never>;
|
|
817
919
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxTagLabel, "ng-template[cngxTagLabel]", ["cngxTagLabel"], {}, {}, never, never, true, never>;
|
|
818
920
|
}
|
|
@@ -853,7 +955,7 @@ declare class CngxTagLabel {
|
|
|
853
955
|
* <example-url>http://localhost:4200/#/common/display/tag/variant-matrix</example-url>
|
|
854
956
|
*/
|
|
855
957
|
declare class CngxTagPrefix {
|
|
856
|
-
readonly templateRef: TemplateRef<
|
|
958
|
+
readonly templateRef: TemplateRef<_cngx_common_display.CngxTagSlotContext>;
|
|
857
959
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxTagPrefix, never>;
|
|
858
960
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxTagPrefix, "ng-template[cngxTagPrefix]", ["cngxTagPrefix"], {}, {}, never, never, true, never>;
|
|
859
961
|
}
|
|
@@ -896,11 +998,53 @@ declare class CngxTagPrefix {
|
|
|
896
998
|
* <example-url>http://localhost:4200/#/common/display/tag/variant-matrix</example-url>
|
|
897
999
|
*/
|
|
898
1000
|
declare class CngxTagSuffix {
|
|
899
|
-
readonly templateRef: TemplateRef<
|
|
1001
|
+
readonly templateRef: TemplateRef<_cngx_common_display.CngxTagSlotContext>;
|
|
900
1002
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxTagSuffix, never>;
|
|
901
1003
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxTagSuffix, "ng-template[cngxTagSuffix]", ["cngxTagSuffix"], {}, {}, never, never, true, never>;
|
|
902
1004
|
}
|
|
903
1005
|
|
|
1006
|
+
/**
|
|
1007
|
+
* Shared context exposed by the three `CngxTag` slots (`*cngxTagLabel`,
|
|
1008
|
+
* `*cngxTagPrefix`, `*cngxTagSuffix`) - the full reactive Tag state
|
|
1009
|
+
* bundled so consumer templates can switch on variant / colour / size /
|
|
1010
|
+
* truncate without injecting the directive.
|
|
1011
|
+
*
|
|
1012
|
+
* `$implicit` is `void` because the slots have no positional payload -
|
|
1013
|
+
* consumers reach for the named fields below. Pattern mirrors
|
|
1014
|
+
* `CngxSelectInputSlotContext` in `@cngx/forms/select/shared`.
|
|
1015
|
+
*
|
|
1016
|
+
* The per-slot names below alias this interface. A slot that grows its
|
|
1017
|
+
* own field forks its alias back into an interface extending this one -
|
|
1018
|
+
* sibling consumers stay source-compatible either way.
|
|
1019
|
+
*
|
|
1020
|
+
* @category common/display
|
|
1021
|
+
*/
|
|
1022
|
+
interface CngxTagSlotContext {
|
|
1023
|
+
readonly $implicit: void;
|
|
1024
|
+
readonly variant: CngxTagVariant;
|
|
1025
|
+
readonly color: CngxTagColor;
|
|
1026
|
+
readonly size: CngxTagSize;
|
|
1027
|
+
readonly truncate: boolean;
|
|
1028
|
+
}
|
|
1029
|
+
/**
|
|
1030
|
+
* Context of the `*cngxTagLabel` slot. Alias of {@link CngxTagSlotContext}.
|
|
1031
|
+
*
|
|
1032
|
+
* @category common/display
|
|
1033
|
+
*/
|
|
1034
|
+
type CngxTagLabelContext = CngxTagSlotContext;
|
|
1035
|
+
/**
|
|
1036
|
+
* Context of the `*cngxTagPrefix` slot. Alias of {@link CngxTagSlotContext}.
|
|
1037
|
+
*
|
|
1038
|
+
* @category common/display
|
|
1039
|
+
*/
|
|
1040
|
+
type CngxTagPrefixContext = CngxTagSlotContext;
|
|
1041
|
+
/**
|
|
1042
|
+
* Context of the `*cngxTagSuffix` slot. Alias of {@link CngxTagSlotContext}.
|
|
1043
|
+
*
|
|
1044
|
+
* @category common/display
|
|
1045
|
+
*/
|
|
1046
|
+
type CngxTagSuffixContext = CngxTagSlotContext;
|
|
1047
|
+
|
|
904
1048
|
/**
|
|
905
1049
|
* Visual variant. `filled` is the default solid pill; `outline` swaps fill for border; `subtle` softens both.
|
|
906
1050
|
*
|
|
@@ -915,9 +1059,9 @@ type CngxTagVariant = 'filled' | 'outline' | 'subtle';
|
|
|
915
1059
|
* Open-ended `(string & {})` accepts any consumer-defined palette
|
|
916
1060
|
* key (e.g. `'my-brand'`); the directive emits it as a `data-color`
|
|
917
1061
|
* attribute so consumers can author `[data-color="my-brand"]`
|
|
918
|
-
* styles against their own design tokens
|
|
919
|
-
*
|
|
920
|
-
*
|
|
1062
|
+
* styles against their own design tokens, or register the key via
|
|
1063
|
+
* `withTagColors()` and let the directive emit the entry's
|
|
1064
|
+
* `--cngx-tag-bg/-color/-border` values directly.
|
|
921
1065
|
*
|
|
922
1066
|
* @category common/display
|
|
923
1067
|
*/
|
|
@@ -1014,6 +1158,23 @@ declare class CngxTag {
|
|
|
1014
1158
|
readonly color: _angular_core.InputSignal<CngxTagColor>;
|
|
1015
1159
|
/** Density. `md` (default) | `sm` | `lg` | `xl`. */
|
|
1016
1160
|
readonly size: _angular_core.InputSignal<CngxTagSize>;
|
|
1161
|
+
/**
|
|
1162
|
+
* Registered `withTagColors` entry for the current colour key.
|
|
1163
|
+
* Consumer keys only - the five predefined keys resolve in
|
|
1164
|
+
* `tag.css`, so a config entry under a predefined key stays a
|
|
1165
|
+
* no-op per the `withTagColors` contract. The entry is emitted as
|
|
1166
|
+
* element-level `--cngx-tag-bg/-color/-border` values ONLY when
|
|
1167
|
+
* the config carries the key; an unregistered key emits nothing,
|
|
1168
|
+
* so the plain consumer CSS authoring path (`[data-color="..."]`
|
|
1169
|
+
* rules) is never shadowed by an element style.
|
|
1170
|
+
*/
|
|
1171
|
+
protected readonly configColor: _angular_core.Signal<Readonly<{
|
|
1172
|
+
readonly bg: string;
|
|
1173
|
+
readonly color: string;
|
|
1174
|
+
readonly border: string;
|
|
1175
|
+
}> | undefined>;
|
|
1176
|
+
/** Border shorthand for the registered entry (mirrors the `1px solid <color>` shape of the predefined cascade). */
|
|
1177
|
+
protected readonly configBorder: _angular_core.Signal<string | null>;
|
|
1017
1178
|
/**
|
|
1018
1179
|
* When `true`, applies `text-overflow: ellipsis` + `white-space: nowrap`
|
|
1019
1180
|
* to the inner `.cngx-tag__label` span. Pair with `[maxWidth]` for a
|
|
@@ -1059,17 +1220,16 @@ declare class CngxTag {
|
|
|
1059
1220
|
* Phase 4 commit 5 inserts `CNGX_TAG_CONFIG.templates.label` as a
|
|
1060
1221
|
* middle tier without touching this call site.
|
|
1061
1222
|
*/
|
|
1062
|
-
protected readonly labelTpl: _angular_core.Signal<_angular_core.TemplateRef<
|
|
1223
|
+
protected readonly labelTpl: _angular_core.Signal<_angular_core.TemplateRef<CngxTagSlotContext> | null>;
|
|
1063
1224
|
/** Resolved prefix template. Same 2-stage cascade as {@link labelTpl}. */
|
|
1064
|
-
protected readonly prefixTpl: _angular_core.Signal<_angular_core.TemplateRef<
|
|
1225
|
+
protected readonly prefixTpl: _angular_core.Signal<_angular_core.TemplateRef<CngxTagSlotContext> | null>;
|
|
1065
1226
|
/** Resolved suffix template. Same 2-stage cascade as {@link labelTpl}. */
|
|
1066
|
-
protected readonly suffixTpl: _angular_core.Signal<_angular_core.TemplateRef<
|
|
1227
|
+
protected readonly suffixTpl: _angular_core.Signal<_angular_core.TemplateRef<CngxTagSlotContext> | null>;
|
|
1067
1228
|
/**
|
|
1068
1229
|
* Reactive bundle exposed to every slot's `*ngTemplateOutletContext`.
|
|
1069
|
-
*
|
|
1070
|
-
*
|
|
1071
|
-
*
|
|
1072
|
-
* injecting the directive.
|
|
1230
|
+
* All three slots share `CngxTagSlotContext`, so the same computed
|
|
1231
|
+
* source serves them. Consumer templates `let-variant="variant"` etc.
|
|
1232
|
+
* read the live state without injecting the directive.
|
|
1073
1233
|
*
|
|
1074
1234
|
* Explicit structural `equal` fn - without it, a fresh literal each
|
|
1075
1235
|
* CD cycle would force `ngTemplateOutlet` to rebind embedded views
|
|
@@ -1077,7 +1237,7 @@ declare class CngxTag {
|
|
|
1077
1237
|
* Equality Rule: every `computed` returning an object MUST pass an
|
|
1078
1238
|
* `equal` fn.
|
|
1079
1239
|
*/
|
|
1080
|
-
protected readonly slotContext: _angular_core.Signal<
|
|
1240
|
+
protected readonly slotContext: _angular_core.Signal<CngxTagSlotContext>;
|
|
1081
1241
|
/**
|
|
1082
1242
|
* Reactive `role` attribute. Returns `'listitem'` when projected
|
|
1083
1243
|
* inside a `<cngx-tag-group [semanticList]="true">`; `null`
|
|
@@ -1093,42 +1253,6 @@ declare class CngxTag {
|
|
|
1093
1253
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxTag, "[cngxTag], cngx-tag", ["cngxTag"], { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "truncate": { "alias": "truncate"; "required": false; "isSignal": true; }; "maxWidth": { "alias": "maxWidth"; "required": false; "isSignal": true; }; }, {}, ["labelSlot", "prefixSlot", "suffixSlot"], ["*"], true, never>;
|
|
1094
1254
|
}
|
|
1095
1255
|
|
|
1096
|
-
/**
|
|
1097
|
-
* Context exposed by the `*cngxTagGroupHeader` slot - the full
|
|
1098
|
-
* reactive group state plus the live `count` of projected
|
|
1099
|
-
* `CngxTag` children. Lets consumer headers render
|
|
1100
|
-
* `"Filters ({{ count }})"` without injecting the group.
|
|
1101
|
-
*
|
|
1102
|
-
* `$implicit` is `void` because the slot has no positional payload -
|
|
1103
|
-
* consumers reach for the named fields below.
|
|
1104
|
-
*
|
|
1105
|
-
* @category common/display
|
|
1106
|
-
*/
|
|
1107
|
-
interface CngxTagGroupHeaderContext {
|
|
1108
|
-
readonly $implicit: void;
|
|
1109
|
-
readonly gap: CngxTagGroupGap;
|
|
1110
|
-
readonly align: CngxTagGroupAlign;
|
|
1111
|
-
readonly semanticList: boolean;
|
|
1112
|
-
readonly label: string | undefined;
|
|
1113
|
-
readonly count: number;
|
|
1114
|
-
}
|
|
1115
|
-
/**
|
|
1116
|
-
* Context exposed by the `*cngxTagGroupAccessory` slot. Structurally
|
|
1117
|
-
* identical to {@link CngxTagGroupHeaderContext}; kept separate so
|
|
1118
|
-
* future per-slot fields can land without breaking header-slot
|
|
1119
|
-
* consumers.
|
|
1120
|
-
*
|
|
1121
|
-
* @category common/display
|
|
1122
|
-
*/
|
|
1123
|
-
interface CngxTagGroupAccessoryContext {
|
|
1124
|
-
readonly $implicit: void;
|
|
1125
|
-
readonly gap: CngxTagGroupGap;
|
|
1126
|
-
readonly align: CngxTagGroupAlign;
|
|
1127
|
-
readonly semanticList: boolean;
|
|
1128
|
-
readonly label: string | undefined;
|
|
1129
|
-
readonly count: number;
|
|
1130
|
-
}
|
|
1131
|
-
|
|
1132
1256
|
/**
|
|
1133
1257
|
* Override template for the accessory zone of `<cngx-tag-group>` -
|
|
1134
1258
|
* projected BELOW the row of tags. Use for clear-all buttons,
|
|
@@ -1170,7 +1294,7 @@ interface CngxTagGroupAccessoryContext {
|
|
|
1170
1294
|
* <example-url>http://localhost:4200/#/common/display/tag/variant-matrix</example-url>
|
|
1171
1295
|
*/
|
|
1172
1296
|
declare class CngxTagGroupAccessory {
|
|
1173
|
-
readonly templateRef: TemplateRef<
|
|
1297
|
+
readonly templateRef: TemplateRef<_cngx_common_display.CngxTagGroupSlotContext>;
|
|
1174
1298
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxTagGroupAccessory, never>;
|
|
1175
1299
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxTagGroupAccessory, "ng-template[cngxTagGroupAccessory]", ["cngxTagGroupAccessory"], {}, {}, never, never, true, never>;
|
|
1176
1300
|
}
|
|
@@ -1216,11 +1340,51 @@ declare class CngxTagGroupAccessory {
|
|
|
1216
1340
|
* <example-url>http://localhost:4200/#/common/display/tag/variant-matrix</example-url>
|
|
1217
1341
|
*/
|
|
1218
1342
|
declare class CngxTagGroupHeader {
|
|
1219
|
-
readonly templateRef: TemplateRef<
|
|
1343
|
+
readonly templateRef: TemplateRef<_cngx_common_display.CngxTagGroupSlotContext>;
|
|
1220
1344
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxTagGroupHeader, never>;
|
|
1221
1345
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxTagGroupHeader, "ng-template[cngxTagGroupHeader]", ["cngxTagGroupHeader"], {}, {}, never, never, true, never>;
|
|
1222
1346
|
}
|
|
1223
1347
|
|
|
1348
|
+
/**
|
|
1349
|
+
* Shared context exposed by the two `CngxTagGroup` slots
|
|
1350
|
+
* (`*cngxTagGroupHeader`, `*cngxTagGroupAccessory`) - the full reactive
|
|
1351
|
+
* group state plus the live `count` of projected `CngxTag` children.
|
|
1352
|
+
* Lets consumer headers render `"Filters ({{ count }})"` without
|
|
1353
|
+
* injecting the group.
|
|
1354
|
+
*
|
|
1355
|
+
* `$implicit` is `void` because the slots have no positional payload -
|
|
1356
|
+
* consumers reach for the named fields below.
|
|
1357
|
+
*
|
|
1358
|
+
* The per-slot names below alias this interface. A slot that grows its
|
|
1359
|
+
* own field (e.g. `position` on accessory) forks its alias back into an
|
|
1360
|
+
* interface extending this one - sibling consumers stay
|
|
1361
|
+
* source-compatible either way.
|
|
1362
|
+
*
|
|
1363
|
+
* @category common/display
|
|
1364
|
+
*/
|
|
1365
|
+
interface CngxTagGroupSlotContext {
|
|
1366
|
+
readonly $implicit: void;
|
|
1367
|
+
readonly gap: CngxTagGroupGap;
|
|
1368
|
+
readonly align: CngxTagGroupAlign;
|
|
1369
|
+
readonly semanticList: boolean;
|
|
1370
|
+
readonly label: string | undefined;
|
|
1371
|
+
readonly count: number;
|
|
1372
|
+
}
|
|
1373
|
+
/**
|
|
1374
|
+
* Context of the `*cngxTagGroupHeader` slot. Alias of
|
|
1375
|
+
* {@link CngxTagGroupSlotContext}.
|
|
1376
|
+
*
|
|
1377
|
+
* @category common/display
|
|
1378
|
+
*/
|
|
1379
|
+
type CngxTagGroupHeaderContext = CngxTagGroupSlotContext;
|
|
1380
|
+
/**
|
|
1381
|
+
* Context of the `*cngxTagGroupAccessory` slot. Alias of
|
|
1382
|
+
* {@link CngxTagGroupSlotContext}.
|
|
1383
|
+
*
|
|
1384
|
+
* @category common/display
|
|
1385
|
+
*/
|
|
1386
|
+
type CngxTagGroupAccessoryContext = CngxTagGroupSlotContext;
|
|
1387
|
+
|
|
1224
1388
|
/**
|
|
1225
1389
|
* Public host contract that `CngxTagGroup` and any future
|
|
1226
1390
|
* non-component implementer must satisfy. Surfaced through
|
|
@@ -1419,9 +1583,9 @@ declare class CngxTagGroup implements CngxTagGroupHost {
|
|
|
1419
1583
|
* commit 5 inserts `CNGX_TAG_CONFIG.templates.header` as a middle
|
|
1420
1584
|
* tier without touching this call site.
|
|
1421
1585
|
*/
|
|
1422
|
-
protected readonly headerTpl: Signal<_angular_core.TemplateRef<
|
|
1586
|
+
protected readonly headerTpl: Signal<_angular_core.TemplateRef<CngxTagGroupSlotContext> | null>;
|
|
1423
1587
|
/** Resolved accessory template. Same 2-stage cascade as {@link headerTpl}. */
|
|
1424
|
-
protected readonly accessoryTpl: Signal<_angular_core.TemplateRef<
|
|
1588
|
+
protected readonly accessoryTpl: Signal<_angular_core.TemplateRef<CngxTagGroupSlotContext> | null>;
|
|
1425
1589
|
/**
|
|
1426
1590
|
* Projected `<span cngxTag>` siblings. Default-scoped
|
|
1427
1591
|
* (`descendants: false`) so tags inside consumer-projected header /
|
|
@@ -1432,10 +1596,10 @@ declare class CngxTagGroup implements CngxTagGroupHost {
|
|
|
1432
1596
|
private readonly projectedTags;
|
|
1433
1597
|
/**
|
|
1434
1598
|
* Reactive bundle exposed to header / accessory slots'
|
|
1435
|
-
* `*ngTemplateOutletContext`.
|
|
1436
|
-
*
|
|
1437
|
-
*
|
|
1438
|
-
*
|
|
1599
|
+
* `*ngTemplateOutletContext`. Both slots share
|
|
1600
|
+
* `CngxTagGroupSlotContext`, so the same computed source serves
|
|
1601
|
+
* them. Consumer templates `let-count="count"` etc. read the live
|
|
1602
|
+
* state without injecting the directive.
|
|
1439
1603
|
*
|
|
1440
1604
|
* Explicit structural `equal` fn - without it, a fresh literal
|
|
1441
1605
|
* each CD cycle would force `ngTemplateOutlet` to rebind embedded
|
|
@@ -1443,7 +1607,7 @@ declare class CngxTagGroup implements CngxTagGroupHost {
|
|
|
1443
1607
|
* `reference_signal_architecture` §1 Equality Rule: every
|
|
1444
1608
|
* `computed` returning an object MUST pass an `equal` fn.
|
|
1445
1609
|
*/
|
|
1446
|
-
protected readonly slotContext: Signal<
|
|
1610
|
+
protected readonly slotContext: Signal<CngxTagGroupSlotContext>;
|
|
1447
1611
|
constructor();
|
|
1448
1612
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxTagGroup, never>;
|
|
1449
1613
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxTagGroup, "cngx-tag-group", ["cngxTagGroup"], { "gap": { "alias": "gap"; "required": false; "isSignal": true; }; "align": { "alias": "align"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "semanticListInput": { "alias": "semanticList"; "required": false; "isSignal": true; }; }, {}, ["headerSlot", "accessorySlot", "projectedTags"], ["*"], true, never>;
|
|
@@ -1482,11 +1646,11 @@ interface CngxTagConfig {
|
|
|
1482
1646
|
readonly semanticList?: boolean;
|
|
1483
1647
|
};
|
|
1484
1648
|
/**
|
|
1485
|
-
* Consumer-defined colour map.
|
|
1486
|
-
*
|
|
1487
|
-
*
|
|
1488
|
-
* `error`/`info`) ship in `tag.css` and are not
|
|
1489
|
-
*
|
|
1649
|
+
* Consumer-defined colour map. A registered key is emitted by the
|
|
1650
|
+
* directive as element-level `--cngx-tag-bg/-color/-border` values
|
|
1651
|
+
* whenever `color` resolves to it. Predefined keys (`neutral`/
|
|
1652
|
+
* `success`/`warning`/`error`/`info`) ship in `tag.css` and are not
|
|
1653
|
+
* part of this map - entries under a predefined key are a no-op.
|
|
1490
1654
|
*/
|
|
1491
1655
|
readonly colors?: Readonly<Record<string, Readonly<{
|
|
1492
1656
|
readonly bg: string;
|
|
@@ -1672,16 +1836,19 @@ declare function withTagDefaults(payload: NonNullable<CngxTagConfig['defaults']>
|
|
|
1672
1836
|
*/
|
|
1673
1837
|
declare function withTagGroupDefaults(payload: NonNullable<CngxTagConfig['groupDefaults']>): CngxTagConfigFeature;
|
|
1674
1838
|
/**
|
|
1675
|
-
* Register consumer-defined colour entries.
|
|
1676
|
-
*
|
|
1677
|
-
* `--cngx-tag-bg
|
|
1678
|
-
*
|
|
1839
|
+
* Register consumer-defined colour entries. When a tag's `color`
|
|
1840
|
+
* resolves to a registered key, the directive emits the entry as
|
|
1841
|
+
* element-level `--cngx-tag-bg` / `--cngx-tag-color` /
|
|
1842
|
+
* `--cngx-tag-border` values (border wrapped as `1px solid <color>`
|
|
1843
|
+
* to mirror the predefined cascade). The entry applies uniformly
|
|
1844
|
+
* across variants - config colours carry no per-variant surfaces.
|
|
1679
1845
|
*
|
|
1680
1846
|
* The five predefined keys (`neutral`/`success`/`warning`/`error`/
|
|
1681
1847
|
* `info`) ship in `tag.css` and are NOT part of this map; passing
|
|
1682
|
-
* them here is a no-op against the predefined cascade.
|
|
1683
|
-
* keys
|
|
1684
|
-
*
|
|
1848
|
+
* them here is a no-op against the predefined cascade. Unregistered
|
|
1849
|
+
* consumer keys emit nothing, so authoring plain
|
|
1850
|
+
* `[data-color="my-brand"]` CSS remains a first-class alternative -
|
|
1851
|
+
* the emitter never shadows it with an element style.
|
|
1685
1852
|
*
|
|
1686
1853
|
* ```ts
|
|
1687
1854
|
* provideTagConfig(
|
|
@@ -1734,5 +1901,52 @@ declare function withTagColors(payload: NonNullable<CngxTagConfig['colors']>): C
|
|
|
1734
1901
|
*/
|
|
1735
1902
|
declare function withTagSlots(payload: NonNullable<CngxTagConfig['templates']>): CngxTagConfigFeature;
|
|
1736
1903
|
|
|
1737
|
-
|
|
1738
|
-
|
|
1904
|
+
/**
|
|
1905
|
+
* The display section of a {@link CngxLanguagePack}: the copy of the
|
|
1906
|
+
* `@cngx/common/display` atoms (avatar, avatar group, segmented progress,
|
|
1907
|
+
* chip, badge). It feeds `CNGX_DISPLAY_I18N`.
|
|
1908
|
+
*
|
|
1909
|
+
* @category common/display/i18n
|
|
1910
|
+
* @since 0.1.0
|
|
1911
|
+
* @relatedTo CNGX_DISPLAY_I18N
|
|
1912
|
+
*/
|
|
1913
|
+
interface CngxDisplayLanguageSection {
|
|
1914
|
+
/** Accessible name of the avatar status dot, per status. */
|
|
1915
|
+
readonly avatarStatus: {
|
|
1916
|
+
readonly online: string;
|
|
1917
|
+
readonly offline: string;
|
|
1918
|
+
readonly busy: string;
|
|
1919
|
+
readonly away: string;
|
|
1920
|
+
};
|
|
1921
|
+
/** The entity noun of an avatar group summary. */
|
|
1922
|
+
readonly avatarGroupNoun: string;
|
|
1923
|
+
/** `{noun}`, plural on `{count}`: an avatar group summary with nothing collapsed. */
|
|
1924
|
+
readonly avatarGroupLabel: CngxMessage;
|
|
1925
|
+
/** `{noun}`, `{hidden}`, plural on `{count}`: an avatar group summary with collapsed avatars. */
|
|
1926
|
+
readonly avatarGroupLabelHidden: CngxMessage;
|
|
1927
|
+
/** `{count}`: the visible overflow pill of an avatar group. */
|
|
1928
|
+
readonly avatarGroupOverflow: CngxMessage;
|
|
1929
|
+
/** `{now}`, `{max}`: the value text of a segmented progress. */
|
|
1930
|
+
readonly segmentedProgressValueText: CngxMessage;
|
|
1931
|
+
/** Accessible name of a chip's remove button. */
|
|
1932
|
+
readonly chipRemove: string;
|
|
1933
|
+
/** `{max}`: a badge count above its maximum. */
|
|
1934
|
+
readonly badgeOverflow: CngxMessage;
|
|
1935
|
+
}
|
|
1936
|
+
/**
|
|
1937
|
+
* The English display section: the single source of the display atoms'
|
|
1938
|
+
* English copy. `CNGX_DISPLAY_I18N` defaults to it.
|
|
1939
|
+
*
|
|
1940
|
+
* @category common/display/i18n
|
|
1941
|
+
* @since 0.1.0
|
|
1942
|
+
* @relatedTo CNGX_DISPLAY_I18N
|
|
1943
|
+
*/
|
|
1944
|
+
declare const CNGX_DISPLAY_LANGUAGE_EN: CngxDisplayLanguageSection;
|
|
1945
|
+
declare module '@cngx/core/i18n' {
|
|
1946
|
+
interface CngxLanguagePack {
|
|
1947
|
+
readonly display: CngxDisplayLanguageSection;
|
|
1948
|
+
}
|
|
1949
|
+
}
|
|
1950
|
+
|
|
1951
|
+
export { CNGX_DISPLAY_I18N, CNGX_DISPLAY_LANGUAGE_EN, CNGX_TAG_CONFIG, CNGX_TAG_GROUP, CngxAvatar, CngxAvatarGroup, CngxBadge, CngxCheckboxIndicator, CngxChip, CngxDivider, CngxIcon, CngxMeta, CngxMetaList, CngxPasswordStrengthMeter, CngxRadioIndicator, CngxSegmentedProgress, CngxStatus, CngxTag, CngxTagGroup, CngxTagGroupAccessory, CngxTagGroupHeader, CngxTagLabel, CngxTagPrefix, CngxTagSuffix, CngxTime, injectDisplayI18n, injectTagConfig, provideDisplayI18n, provideTagConfig, provideTagConfigAt, withDisplayI18nLabels, withTagColors, withTagDefaults, withTagGroupDefaults, withTagSlots };
|
|
1952
|
+
export type { CngxAvatarStatus, CngxBadgeColor, CngxBadgePosition, CngxDisplayI18n, CngxDisplayI18nFeature, CngxDisplayLanguageSection, CngxTagColor, CngxTagConfig, CngxTagConfigFeature, CngxTagGroupAccessoryContext, CngxTagGroupAlign, CngxTagGroupGap, CngxTagGroupHeaderContext, CngxTagGroupHost, CngxTagGroupSlotContext, CngxTagLabelContext, CngxTagPrefixContext, CngxTagSize, CngxTagSlotContext, CngxTagSuffixContext, CngxTagVariant, SegmentState, StatusTone };
|