@cngx/common 0.0.1-rc.0 → 0.1.0-rc.1
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/a11y/README.md +13 -16
- package/card/README.md +2 -21
- package/chart/README.md +5 -8
- package/data/README.md +45 -47
- package/dialog/README.md +12 -15
- package/display/README.md +5 -9
- package/fesm2022/cngx-common-a11y.mjs +164 -51
- package/fesm2022/cngx-common-a11y.mjs.map +1 -1
- package/fesm2022/cngx-common-card.mjs +157 -69
- package/fesm2022/cngx-common-card.mjs.map +1 -1
- package/fesm2022/cngx-common-chart.mjs +389 -92
- package/fesm2022/cngx-common-chart.mjs.map +1 -1
- package/fesm2022/cngx-common-data.mjs +311 -151
- package/fesm2022/cngx-common-data.mjs.map +1 -1
- package/fesm2022/cngx-common-dialog.mjs +167 -29
- package/fesm2022/cngx-common-dialog.mjs.map +1 -1
- package/fesm2022/cngx-common-display.mjs +445 -110
- package/fesm2022/cngx-common-display.mjs.map +1 -1
- package/fesm2022/cngx-common-interactive.mjs +2059 -435
- package/fesm2022/cngx-common-interactive.mjs.map +1 -1
- package/fesm2022/cngx-common-layout.mjs +188 -31
- package/fesm2022/cngx-common-layout.mjs.map +1 -1
- package/fesm2022/cngx-common-popover.mjs +711 -90
- package/fesm2022/cngx-common-popover.mjs.map +1 -1
- package/fesm2022/cngx-common-stepper.mjs +1479 -73
- package/fesm2022/cngx-common-stepper.mjs.map +1 -1
- package/fesm2022/cngx-common-tabs.mjs +1144 -85
- package/fesm2022/cngx-common-tabs.mjs.map +1 -1
- package/fesm2022/cngx-common.mjs +2 -2
- package/fesm2022/cngx-common.mjs.map +1 -1
- package/interactive/README.md +5 -5
- package/layout/README.md +2 -2
- package/package.json +7 -6
- package/popover/README.md +8 -34
- package/stepper/README.md +69 -8
- package/tabs/README.md +6 -6
- package/theming/components/cngx-async.css +74 -0
- package/theming/components/cngx-backdrop.css +73 -0
- package/theming/components/cngx-badge.css +340 -0
- package/theming/components/cngx-bottom-sheet.css +201 -0
- package/theming/components/cngx-button-toggle.css +99 -0
- package/theming/components/cngx-dialog.css +358 -0
- package/theming/components/cngx-divider.css +145 -0
- package/theming/components/cngx-listbox.css +220 -0
- package/theming/components/cngx-menu.css +371 -0
- package/theming/components/cngx-ripple.css +116 -0
- package/theming/components/cngx-tooltip.css +265 -0
- package/theming/system-tokens.css +24 -0
- package/types/cngx-common-a11y.d.ts +159 -38
- package/types/cngx-common-card.d.ts +137 -22
- package/types/cngx-common-chart.d.ts +337 -40
- package/types/cngx-common-data.d.ts +277 -45
- package/types/cngx-common-dialog.d.ts +162 -22
- package/types/cngx-common-display.d.ts +422 -78
- package/types/cngx-common-interactive.d.ts +1880 -305
- package/types/cngx-common-layout.d.ts +191 -28
- package/types/cngx-common-popover.d.ts +632 -87
- package/types/cngx-common-stepper.d.ts +1360 -45
- package/types/cngx-common-tabs.d.ts +1139 -56
- package/types/cngx-common.d.ts +1 -1
- package/README.md +0 -18
|
@@ -1,13 +1,36 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { TemplateRef, InjectionToken,
|
|
2
|
+
import { Signal, TemplateRef, InjectionToken, EnvironmentProviders, Provider } from '@angular/core';
|
|
3
3
|
import * as _cngx_common_display from '@cngx/common/display';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Display atom for icons. Projects its content (font glyph, SVG, image, custom
|
|
7
|
-
* element) and adds size,
|
|
7
|
+
* element) and adds size, color, and ARIA semantics.
|
|
8
8
|
*
|
|
9
9
|
* Decorative by default (`aria-hidden="true"`); set `label` to make it
|
|
10
10
|
* informative (`role="img"`, `aria-label`).
|
|
11
|
+
*
|
|
12
|
+
* @category common/display
|
|
13
|
+
* @docsKind primary
|
|
14
|
+
* @wcag AA
|
|
15
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/display/icon/icon.component.ts
|
|
16
|
+
* @selector cngx-icon
|
|
17
|
+
* @since 0.1.0
|
|
18
|
+
* @relatedTo CngxAvatar, CngxBadge, CngxChip
|
|
19
|
+
* <example-url>http://localhost:4200/#/common/display/icon/decorative-vs-informative</example-url>
|
|
20
|
+
* <example-url>http://localhost:4200/#/common/display/icon/sizes</example-url>
|
|
21
|
+
* <example-url>http://localhost:4200/#/common/display/tag/app-wide-defaults-via-providetagconfig</example-url>
|
|
22
|
+
* <example-url>http://localhost:4200/#/common/display/tag/color-palette</example-url>
|
|
23
|
+
* <example-url>http://localhost:4200/#/common/display/tag/composition-with-cngxicon</example-url>
|
|
24
|
+
* <example-url>http://localhost:4200/#/common/display/tag/density</example-url>
|
|
25
|
+
* <example-url>http://localhost:4200/#/common/display/tag/group-semantic-list</example-url>
|
|
26
|
+
* <example-url>http://localhost:4200/#/common/display/tag/group-with-header-accessory</example-url>
|
|
27
|
+
* <example-url>http://localhost:4200/#/common/display/tag/layout-only-alignment</example-url>
|
|
28
|
+
* <example-url>http://localhost:4200/#/common/display/tag/layout-only-gap-variants</example-url>
|
|
29
|
+
* <example-url>http://localhost:4200/#/common/display/tag/link-mode</example-url>
|
|
30
|
+
* <example-url>http://localhost:4200/#/common/display/tag/slot-overrides-custom-label</example-url>
|
|
31
|
+
* <example-url>http://localhost:4200/#/common/display/tag/slot-overrides-prefix-label-suffix</example-url>
|
|
32
|
+
* <example-url>http://localhost:4200/#/common/display/tag/truncate-maxwidth</example-url>
|
|
33
|
+
* <example-url>http://localhost:4200/#/common/display/tag/variant-matrix</example-url>
|
|
11
34
|
*/
|
|
12
35
|
declare class CngxIcon {
|
|
13
36
|
/** Accessible label. When set, the icon is treated as informative content. */
|
|
@@ -18,14 +41,86 @@ declare class CngxIcon {
|
|
|
18
41
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxIcon, "cngx-icon, [cngxIcon]", ["cngxIcon"], { "label": { "alias": "label"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
19
42
|
}
|
|
20
43
|
|
|
44
|
+
/**
|
|
45
|
+
* State of a single segment in a {@link CngxSegmentedProgress}.
|
|
46
|
+
*
|
|
47
|
+
* @category common/display
|
|
48
|
+
*/
|
|
49
|
+
type SegmentState = 'done' | 'active' | 'todo' | 'error';
|
|
50
|
+
/**
|
|
51
|
+
* Generic segmented position indicator - a discrete progress bar split
|
|
52
|
+
* into N segments. Reusable outside the stepper (lightboxes, carousels,
|
|
53
|
+
* onboarding), so it carries zero stepper dependency and no async
|
|
54
|
+
* semantics - distinct from the continuous `<cngx-progress>` loading bar.
|
|
55
|
+
*
|
|
56
|
+
* Drive it positionally with `[value]` / `[total]` (the segment states
|
|
57
|
+
* derive automatically), or hand it an explicit `[segments]` array when
|
|
58
|
+
* you need per-segment control (e.g. an `error` segment). ARIA
|
|
59
|
+
* (`role="progressbar"` + the `aria-value*` set + `aria-valuetext`) lives
|
|
60
|
+
* in the `computed()` graph (Pillar 2).
|
|
61
|
+
*
|
|
62
|
+
* ```html
|
|
63
|
+
* <cngx-segmented-progress [value]="3" [total]="8" />
|
|
64
|
+
* <cngx-segmented-progress [segments]="['done', 'error', 'active', 'todo']" />
|
|
65
|
+
* ```
|
|
66
|
+
*
|
|
67
|
+
* @category common/display
|
|
68
|
+
* @docsKind primary
|
|
69
|
+
* @wcag AA
|
|
70
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/display/segmented-progress/segmented-progress.component.ts
|
|
71
|
+
* @since 0.1.0
|
|
72
|
+
* @relatedTo CngxStepper, CngxBadge
|
|
73
|
+
* <example-url>http://localhost:4200/#/common/display/segmented-progress/value-total</example-url>
|
|
74
|
+
* <example-url>http://localhost:4200/#/common/display/segmented-progress/lightbox-position</example-url>
|
|
75
|
+
* <example-url>http://localhost:4200/#/common/display/segmented-progress/error-segment</example-url>
|
|
76
|
+
*/
|
|
77
|
+
declare class CngxSegmentedProgress {
|
|
78
|
+
/** Number of completed positions (0-based count). Drives derivation. */
|
|
79
|
+
readonly value: _angular_core.InputSignal<number>;
|
|
80
|
+
/** Total number of segments when deriving from `[value]`. */
|
|
81
|
+
readonly total: _angular_core.InputSignal<number>;
|
|
82
|
+
/**
|
|
83
|
+
* Explicit per-segment states. When set, wins over `[value]`/`[total]`
|
|
84
|
+
* derivation - use it for an `error` segment or any non-linear layout.
|
|
85
|
+
*/
|
|
86
|
+
readonly segments: _angular_core.InputSignal<readonly SegmentState[] | undefined>;
|
|
87
|
+
/**
|
|
88
|
+
* Override the `aria-valuetext` string. Receives `(now, max)` - the
|
|
89
|
+
* completed-segment count and the total segment count. Mirrors
|
|
90
|
+
* `CngxStepperCount.format`; the default is `(now, max) => \`${now} of
|
|
91
|
+
* ${max}\``. Supply a localised closure for non-English position text
|
|
92
|
+
* (e.g. `(n, m) => \`Schritt ${n} von ${m}\``).
|
|
93
|
+
*/
|
|
94
|
+
readonly valueTextFormat: _angular_core.InputSignal<((now: number, max: number) => string) | undefined>;
|
|
95
|
+
/** Segments actually rendered: explicit when supplied, else derived. */
|
|
96
|
+
readonly resolvedSegments: Signal<readonly SegmentState[]>;
|
|
97
|
+
/** `aria-valuemax` - segment count. */
|
|
98
|
+
protected readonly max: Signal<number>;
|
|
99
|
+
/** `aria-valuenow` - count of completed (`done`) segments; the active in-progress segment is not counted. */
|
|
100
|
+
protected readonly now: Signal<number>;
|
|
101
|
+
/** `aria-valuetext` - human-readable position via the resolved format closure. */
|
|
102
|
+
protected readonly valueText: Signal<string>;
|
|
103
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxSegmentedProgress, never>;
|
|
104
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxSegmentedProgress, "cngx-segmented-progress", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "total": { "alias": "total"; "required": false; "isSignal": true; }; "segments": { "alias": "segments"; "required": false; "isSignal": true; }; "valueTextFormat": { "alias": "valueTextFormat"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
105
|
+
}
|
|
106
|
+
|
|
21
107
|
/**
|
|
22
108
|
* Thin presentational separator with proper ARIA semantics.
|
|
23
109
|
*
|
|
24
|
-
* Renders `role="separator"` + `aria-orientation`
|
|
110
|
+
* Renders `role="separator"` + `aria-orientation` - required for assistive
|
|
25
111
|
* technologies to announce the divider correctly. Visual style is driven by
|
|
26
112
|
* CSS custom properties (`--cngx-divider-color`, `--cngx-divider-thickness`,
|
|
27
113
|
* `--cngx-divider-inset`). Consumers apply their own styles through
|
|
28
114
|
* `.cngx-divider` or override the variables.
|
|
115
|
+
*
|
|
116
|
+
* @category common/display
|
|
117
|
+
* @docsKind primary
|
|
118
|
+
* @wcag AA
|
|
119
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/display/divider/divider.directive.ts
|
|
120
|
+
* @selector cngx-divider
|
|
121
|
+
* @since 0.1.0
|
|
122
|
+
* <example-url>http://localhost:4200/#/common/display/divider/horizontal-vs-vertical</example-url>
|
|
123
|
+
* <example-url>http://localhost:4200/#/common/display/divider/inset</example-url>
|
|
29
124
|
*/
|
|
30
125
|
declare class CngxDivider {
|
|
31
126
|
/** Layout axis. Horizontal dividers sit between rows; vertical between columns. */
|
|
@@ -42,10 +137,20 @@ declare class CngxDivider {
|
|
|
42
137
|
* Rendering cascade:
|
|
43
138
|
* 1. Image (`src` set and not errored).
|
|
44
139
|
* 2. Initials (`initials` set).
|
|
45
|
-
* 3. Projected content (`<ng-content>`)
|
|
140
|
+
* 3. Projected content (`<ng-content>`) - typically a `<cngx-icon>`.
|
|
46
141
|
*
|
|
47
142
|
* Optional status indicator dot via `status`. Size and shape driven by
|
|
48
143
|
* CSS custom properties.
|
|
144
|
+
*
|
|
145
|
+
* @category common/display
|
|
146
|
+
* @docsKind primary
|
|
147
|
+
* @wcag AA
|
|
148
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/display/avatar/avatar.component.ts
|
|
149
|
+
* @since 0.1.0
|
|
150
|
+
* @relatedTo CngxIcon, CngxBadge, CngxChip
|
|
151
|
+
* <example-url>http://localhost:4200/#/common/display/avatar/cascade-image-initials-fallback</example-url>
|
|
152
|
+
* <example-url>http://localhost:4200/#/common/display/avatar/shapes-and-status</example-url>
|
|
153
|
+
* <example-url>http://localhost:4200/#/common/display/avatar/sizes</example-url>
|
|
49
154
|
*/
|
|
50
155
|
declare class CngxAvatar {
|
|
51
156
|
/** Image URL. When set and loads successfully, the image is shown. */
|
|
@@ -74,19 +179,37 @@ declare class CngxAvatar {
|
|
|
74
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>;
|
|
75
180
|
}
|
|
76
181
|
|
|
77
|
-
/**
|
|
182
|
+
/**
|
|
183
|
+
* Color palette options for the badge.
|
|
184
|
+
*
|
|
185
|
+
* @category common/display
|
|
186
|
+
*/
|
|
78
187
|
type CngxBadgeColor = 'primary' | 'error' | 'warning' | 'neutral';
|
|
79
|
-
/**
|
|
188
|
+
/**
|
|
189
|
+
* Positioning anchors relative to the host element.
|
|
190
|
+
*
|
|
191
|
+
* @category common/display
|
|
192
|
+
*/
|
|
80
193
|
type CngxBadgePosition = 'inline' | 'above-start' | 'above-end' | 'below-start' | 'below-end';
|
|
81
194
|
/**
|
|
82
195
|
* Generic counter / dot indicator that attaches a small floating element to
|
|
83
|
-
* any host. Purely presentational (`aria-hidden="true"`)
|
|
196
|
+
* any host. Purely presentational (`aria-hidden="true"`) - semantic meaning
|
|
84
197
|
* must live on the host (`aria-label`).
|
|
85
198
|
*
|
|
86
199
|
* Supports:
|
|
87
200
|
* - Numeric values (capped by `max` with "N+" fallback)
|
|
88
201
|
* - String values (rendered verbatim)
|
|
89
202
|
* - Boolean `true` (dot mode, no text)
|
|
203
|
+
*
|
|
204
|
+
* @category common/display
|
|
205
|
+
* @docsKind primary
|
|
206
|
+
* @wcag AA
|
|
207
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/display/badge/badge.directive.ts
|
|
208
|
+
* @since 0.1.0
|
|
209
|
+
* @relatedTo CngxAvatar, CngxIcon, CngxChip
|
|
210
|
+
* <example-url>http://localhost:4200/#/common/display/badge/colors-and-dot-mode</example-url>
|
|
211
|
+
* <example-url>http://localhost:4200/#/common/display/badge/counts-with-overflow</example-url>
|
|
212
|
+
* <example-url>http://localhost:4200/#/common/display/badge/inline-and-hidden</example-url>
|
|
90
213
|
*/
|
|
91
214
|
declare class CngxBadge {
|
|
92
215
|
/** Raw value. Numbers show as text (respecting `max`); booleans flip dot mode; strings render verbatim. */
|
|
@@ -97,7 +220,7 @@ declare class CngxBadge {
|
|
|
97
220
|
readonly position: _angular_core.InputSignal<CngxBadgePosition>;
|
|
98
221
|
/** Whether the indicator is hidden regardless of value. */
|
|
99
222
|
readonly hidden: _angular_core.InputSignal<boolean>;
|
|
100
|
-
/** Cap for numeric values
|
|
223
|
+
/** Cap for numeric values - anything over renders as `"{max}+"`. */
|
|
101
224
|
readonly max: _angular_core.InputSignal<number>;
|
|
102
225
|
private readonly hostEl;
|
|
103
226
|
private readonly renderer;
|
|
@@ -118,7 +241,7 @@ declare class CngxBadge {
|
|
|
118
241
|
}
|
|
119
242
|
|
|
120
243
|
/**
|
|
121
|
-
* Chip / tag molecule
|
|
244
|
+
* Chip / tag molecule - a small, self-contained pill rendering projected
|
|
122
245
|
* content plus an optional close affordance.
|
|
123
246
|
*
|
|
124
247
|
* **Why this exists.**
|
|
@@ -137,14 +260,30 @@ declare class CngxBadge {
|
|
|
137
260
|
* consumer-supplied).
|
|
138
261
|
*
|
|
139
262
|
* **Non-responsibilities.**
|
|
140
|
-
* - Selection state
|
|
141
|
-
* - Commit/async behaviour
|
|
263
|
+
* - Selection state - parent tracks which value(s) are picked.
|
|
264
|
+
* - Commit/async behaviour - remove simply fires an event; the parent
|
|
142
265
|
* decides whether to write state directly or route through a commit
|
|
143
266
|
* flow. This keeps the chip usable from any level of the stack.
|
|
267
|
+
*
|
|
268
|
+
* @category common/display
|
|
269
|
+
* @docsKind primary
|
|
270
|
+
* @wcag AA
|
|
271
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/display/chip/chip.component.ts
|
|
272
|
+
* @since 0.1.0
|
|
273
|
+
* @relatedTo CngxTag, CngxTagGroup, CngxBadge
|
|
274
|
+
* <example-url>http://localhost:4200/#/common/display/chip/basic</example-url>
|
|
275
|
+
* <example-url>http://localhost:4200/#/common/display/chip/removable</example-url>
|
|
276
|
+
* <example-url>http://localhost:4200/#/common/display/chip/color-palette</example-url>
|
|
277
|
+
* <example-url>http://localhost:4200/#/common/display/chip/custom-close-icon</example-url>
|
|
278
|
+
* <example-url>http://localhost:4200/#/common/interactive/chip/group/basic-pick-exactly-one-size</example-url>
|
|
279
|
+
* <example-url>http://localhost:4200/#/common/interactive/chip/interaction/basic-toggle-on-click-space-or-enter</example-url>
|
|
280
|
+
* <example-url>http://localhost:4200/#/common/interactive/chip/interaction/disabled-state</example-url>
|
|
281
|
+
* <example-url>http://localhost:4200/#/common/interactive/chip/interaction/removable-with-removerequest-on-backspace-delete</example-url>
|
|
282
|
+
* <example-url>http://localhost:4200/#/common/interactive/chip/multi-group/multi-select-chips-with-selection-count</example-url>
|
|
144
283
|
*/
|
|
145
284
|
declare class CngxChip {
|
|
146
285
|
/**
|
|
147
|
-
* Whether the close button is rendered. Typed as `boolean`
|
|
286
|
+
* Whether the close button is rendered. Typed as `boolean` - bind a
|
|
148
287
|
* signal getter (`[removable]="!select.disabled()"`) if the flag
|
|
149
288
|
* needs to react to upstream state.
|
|
150
289
|
*/
|
|
@@ -165,9 +304,9 @@ declare class CngxChip {
|
|
|
165
304
|
/** Fires when the user clicks the close button. */
|
|
166
305
|
readonly remove: _angular_core.OutputEmitterRef<MouseEvent>;
|
|
167
306
|
private readonly autoId;
|
|
168
|
-
/** @internal
|
|
307
|
+
/** @internal - resolved DOM id for host binding. */
|
|
169
308
|
protected readonly resolvedId: _angular_core.Signal<string>;
|
|
170
|
-
/** @internal
|
|
309
|
+
/** @internal - delegates to the output; kept as a method so the click handler stays in the template. */
|
|
171
310
|
protected handleRemoveClick(event: MouseEvent): void;
|
|
172
311
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxChip, never>;
|
|
173
312
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxChip, "cngx-chip", ["cngxChip"], { "removable": { "alias": "removable"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "removeAriaLabel": { "alias": "removeAriaLabel"; "required": false; "isSignal": true; }; }, { "remove": "remove"; }, never, ["*", "[cngxChipClose]"], true, never>;
|
|
@@ -182,7 +321,7 @@ declare class CngxChip {
|
|
|
182
321
|
* a future grid/tree cell will want a checkbox with indeterminate state, and
|
|
183
322
|
* `ng decompose cngx-*` schematics should emit a consistent indicator shape
|
|
184
323
|
* regardless of which list-like component they originated from. This atom
|
|
185
|
-
* unifies all three surfaces behind a single presentational molecule
|
|
324
|
+
* unifies all three surfaces behind a single presentational molecule -
|
|
186
325
|
* purely decorative (`aria-hidden="true"`), zero outputs, two variants,
|
|
187
326
|
* full `--cngx-checkbox-*` theming.
|
|
188
327
|
*
|
|
@@ -193,32 +332,43 @@ declare class CngxChip {
|
|
|
193
332
|
* - Apply size presets (`sm` / `md` / `lg`) as CSS-custom-property modifiers.
|
|
194
333
|
*
|
|
195
334
|
* **Non-responsibilities.**
|
|
196
|
-
* - Selection state
|
|
335
|
+
* - Selection state - controlled entirely by the parent via `checked` /
|
|
197
336
|
* `indeterminate` inputs.
|
|
198
|
-
* - Interaction
|
|
337
|
+
* - Interaction - no `click` output, no keyboard handling. The parent (option
|
|
199
338
|
* row, tree cell, grid row) owns the hit area and toggle semantics.
|
|
200
|
-
* - Accessibility announcements
|
|
339
|
+
* - Accessibility announcements - `aria-hidden="true"` unconditionally. The
|
|
201
340
|
* truth about "selected" is communicated by the row's own `aria-selected`
|
|
202
341
|
* / `role="option"` ARIA, not by this decoration.
|
|
342
|
+
*
|
|
343
|
+
* @category common/display
|
|
344
|
+
* @docsKind primary
|
|
345
|
+
* @wcag AA
|
|
346
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/display/checkbox-indicator/checkbox-indicator.component.ts
|
|
347
|
+
* @since 0.1.0
|
|
348
|
+
* @relatedTo CngxRadioIndicator, CngxIcon
|
|
349
|
+
* <example-url>http://localhost:4200/#/common/display/checkbox-indicator/states</example-url>
|
|
350
|
+
* <example-url>http://localhost:4200/#/common/display/checkbox-indicator/variant-matrix</example-url>
|
|
351
|
+
* <example-url>http://localhost:4200/#/common/display/checkbox-indicator/sizes</example-url>
|
|
352
|
+
* <example-url>http://localhost:4200/#/common/display/checkbox-indicator/custom-glyph</example-url>
|
|
203
353
|
*/
|
|
204
354
|
declare class CngxCheckboxIndicator {
|
|
205
355
|
/**
|
|
206
356
|
* Visual form. `'checkbox'` renders a bordered box containing the glyph;
|
|
207
357
|
* `'checkmark'` renders the bare glyph only (no box). Consumers pick the
|
|
208
|
-
* mode-appropriate form themselves
|
|
358
|
+
* mode-appropriate form themselves - `@cngx/forms/select` resolves it
|
|
209
359
|
* from its `selectionIndicatorVariant` config.
|
|
210
360
|
*/
|
|
211
361
|
readonly variant: _angular_core.InputSignal<"checkbox" | "checkmark">;
|
|
212
362
|
/** Whether the current value is selected. */
|
|
213
363
|
readonly checked: _angular_core.InputSignal<boolean>;
|
|
214
364
|
/**
|
|
215
|
-
* Partial-selection state. Takes precedence over `checked`
|
|
365
|
+
* Partial-selection state. Takes precedence over `checked` - when both
|
|
216
366
|
* are true, the dash glyph is rendered. Intended for tree / group rows
|
|
217
367
|
* where some-but-not-all descendants are selected.
|
|
218
368
|
*/
|
|
219
369
|
readonly indeterminate: _angular_core.InputSignal<boolean>;
|
|
220
370
|
/**
|
|
221
|
-
* Disabled visual state. Purely cosmetic (opacity dim)
|
|
371
|
+
* Disabled visual state. Purely cosmetic (opacity dim) - the indicator
|
|
222
372
|
* never intercepts events, so this is a hint, not a block.
|
|
223
373
|
*/
|
|
224
374
|
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
@@ -228,7 +378,7 @@ declare class CngxCheckboxIndicator {
|
|
|
228
378
|
* Consumer-supplied template for the check glyph. When `null` (default),
|
|
229
379
|
* the built-in `<span class="cngx-checkbox-indicator__check">✓</span>`
|
|
230
380
|
* is rendered. When set, the consumer template replaces the glyph span
|
|
231
|
-
* entirely
|
|
381
|
+
* entirely - the `__check` class is NOT applied to the custom content
|
|
232
382
|
* (consumers own the styling of their replacement).
|
|
233
383
|
*
|
|
234
384
|
* Convention-compatible with `*cngxSelectCheck` / `*cngxSelectOptionLabel`:
|
|
@@ -239,7 +389,7 @@ declare class CngxCheckboxIndicator {
|
|
|
239
389
|
readonly checkGlyph: _angular_core.InputSignal<TemplateRef<void> | null>;
|
|
240
390
|
/**
|
|
241
391
|
* Consumer-supplied template for the indeterminate dash glyph. Mirrors
|
|
242
|
-
* {@link checkGlyph}
|
|
392
|
+
* {@link checkGlyph} - defaults to the built-in
|
|
243
393
|
* `<span class="cngx-checkbox-indicator__dash">−</span>`.
|
|
244
394
|
*/
|
|
245
395
|
readonly dashGlyph: _angular_core.InputSignal<TemplateRef<void> | null>;
|
|
@@ -248,15 +398,15 @@ declare class CngxCheckboxIndicator {
|
|
|
248
398
|
}
|
|
249
399
|
|
|
250
400
|
/**
|
|
251
|
-
* Presentational radio indicator
|
|
401
|
+
* Presentational radio indicator - circle with a centred dot when checked.
|
|
252
402
|
*
|
|
253
403
|
* **Why this exists.**
|
|
254
404
|
* The library's `@cngx/forms/select` panel currently composes
|
|
255
405
|
* {@link import('../checkbox-indicator/checkbox-indicator.component').CngxCheckboxIndicator}
|
|
256
406
|
* for both single-select (`'checkmark'`) and multi-select (`'checkbox'`)
|
|
257
407
|
* indicators. The form-primitives spec (Brain vs. Skin) introduces a
|
|
258
|
-
* radio variant
|
|
259
|
-
* panels
|
|
408
|
+
* radio variant - `selectionIndicatorVariant: 'radio'` for single-select
|
|
409
|
+
* panels - that needs the dot-in-circle visual independently of the
|
|
260
410
|
* box/checkmark shapes. This atom is the radio counterpart: same
|
|
261
411
|
* decorative-only contract, same `--cngx-*` theming surface, same
|
|
262
412
|
* `aria-hidden="true"` discipline. Future single-value form atoms in
|
|
@@ -268,24 +418,36 @@ declare class CngxCheckboxIndicator {
|
|
|
268
418
|
* - Express checked / disabled visual state via host classes the
|
|
269
419
|
* consumer (or upstream CSS) can theme.
|
|
270
420
|
* - Apply size presets (`sm` / `md` / `lg`) as CSS-custom-property
|
|
271
|
-
* modifiers
|
|
421
|
+
* modifiers - same scale token as `CngxCheckboxIndicator` so the
|
|
272
422
|
* two atoms render at matching sizes inside a select panel.
|
|
273
423
|
*
|
|
274
424
|
* **Non-responsibilities.**
|
|
275
|
-
* - Selection state
|
|
276
|
-
* - No `indeterminate`
|
|
425
|
+
* - Selection state - controlled by the parent via `checked`.
|
|
426
|
+
* - No `indeterminate` - radios are exclusive by definition; the
|
|
277
427
|
* group enforces single-selection at the brain layer.
|
|
278
|
-
* - Interaction
|
|
428
|
+
* - Interaction - no `click` output, no keyboard handling. The radio
|
|
279
429
|
* row (or the consuming select panel) owns the hit area.
|
|
280
|
-
* - Accessibility announcements
|
|
430
|
+
* - Accessibility announcements - `aria-hidden="true"` unconditionally.
|
|
281
431
|
* Selection is announced via the row's `role="radio"` /
|
|
282
432
|
* `aria-checked` ARIA, never by this decoration.
|
|
433
|
+
*
|
|
434
|
+
* @category common/display
|
|
435
|
+
* @docsKind primary
|
|
436
|
+
* @wcag AA
|
|
437
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/display/radio-indicator/radio-indicator.component.ts
|
|
438
|
+
* @since 0.1.0
|
|
439
|
+
* @relatedTo CngxCheckboxIndicator, CngxIcon
|
|
440
|
+
* <example-url>http://localhost:4200/#/common/display/radio-indicator/custom-dotglyph</example-url>
|
|
441
|
+
* <example-url>http://localhost:4200/#/common/display/radio-indicator/default-unchecked-vs-checked</example-url>
|
|
442
|
+
* <example-url>http://localhost:4200/#/common/display/radio-indicator/disabled</example-url>
|
|
443
|
+
* <example-url>http://localhost:4200/#/common/display/radio-indicator/sizes</example-url>
|
|
444
|
+
* <example-url>http://localhost:4200/#/common/display/radio-indicator/theming-via-css-custom-properties</example-url>
|
|
283
445
|
*/
|
|
284
446
|
declare class CngxRadioIndicator {
|
|
285
447
|
/** Whether the current value is selected. */
|
|
286
448
|
readonly checked: _angular_core.InputSignal<boolean>;
|
|
287
449
|
/**
|
|
288
|
-
* Disabled visual state. Purely cosmetic (opacity dim)
|
|
450
|
+
* Disabled visual state. Purely cosmetic (opacity dim) - the indicator
|
|
289
451
|
* never intercepts events, so this is a hint, not a block.
|
|
290
452
|
*/
|
|
291
453
|
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
@@ -295,7 +457,7 @@ declare class CngxRadioIndicator {
|
|
|
295
457
|
* Consumer-supplied template for the centred dot. When `null` (default),
|
|
296
458
|
* the built-in `<span class="cngx-radio-indicator__dot"></span>` is
|
|
297
459
|
* rendered. When set, the consumer template replaces the dot span
|
|
298
|
-
* entirely
|
|
460
|
+
* entirely - the `__dot` class is NOT applied to the custom content
|
|
299
461
|
* (consumers own the styling of their replacement).
|
|
300
462
|
*
|
|
301
463
|
* Convention-compatible with `CngxCheckboxIndicator.checkGlyph`: pass a
|
|
@@ -316,6 +478,8 @@ declare class CngxRadioIndicator {
|
|
|
316
478
|
* `$implicit` is `void` because the slot has no positional payload —
|
|
317
479
|
* consumers reach for the named fields below. Pattern mirrors
|
|
318
480
|
* `CngxSelectInputSlotContext` in `@cngx/forms/select/shared`.
|
|
481
|
+
*
|
|
482
|
+
* @category common/display
|
|
319
483
|
*/
|
|
320
484
|
interface CngxTagLabelContext {
|
|
321
485
|
readonly $implicit: void;
|
|
@@ -329,6 +493,8 @@ interface CngxTagLabelContext {
|
|
|
329
493
|
* identical to {@link CngxTagLabelContext}; kept as a separate
|
|
330
494
|
* interface so future per-slot fields (e.g. spacing tokens) can
|
|
331
495
|
* land without breaking label-slot consumers.
|
|
496
|
+
*
|
|
497
|
+
* @category common/display
|
|
332
498
|
*/
|
|
333
499
|
interface CngxTagPrefixContext {
|
|
334
500
|
readonly $implicit: void;
|
|
@@ -342,6 +508,8 @@ interface CngxTagPrefixContext {
|
|
|
342
508
|
* identical to {@link CngxTagLabelContext}; kept as a separate
|
|
343
509
|
* interface so future per-slot fields can land without breaking
|
|
344
510
|
* label-slot consumers.
|
|
511
|
+
*
|
|
512
|
+
* @category common/display
|
|
345
513
|
*/
|
|
346
514
|
interface CngxTagSuffixContext {
|
|
347
515
|
readonly $implicit: void;
|
|
@@ -361,7 +529,7 @@ interface CngxTagSuffixContext {
|
|
|
361
529
|
* bidi-safe rendering, an inline link, or a richer label
|
|
362
530
|
* composition with icons + counts).
|
|
363
531
|
*
|
|
364
|
-
* Replacing the label drops the default ellipsis hook
|
|
532
|
+
* Replacing the label drops the default ellipsis hook - the
|
|
365
533
|
* consumer template owns the overflow strategy.
|
|
366
534
|
*
|
|
367
535
|
* ```html
|
|
@@ -371,6 +539,24 @@ interface CngxTagSuffixContext {
|
|
|
371
539
|
* </ng-template>
|
|
372
540
|
* </span>
|
|
373
541
|
* ```
|
|
542
|
+
*
|
|
543
|
+
* @category common/display
|
|
544
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/display/tag/slots/tag-label.directive.ts
|
|
545
|
+
* @since 0.1.0
|
|
546
|
+
* @relatedTo CngxTag, CngxTagPrefix, CngxTagSuffix
|
|
547
|
+
* <example-url>http://localhost:4200/#/common/display/tag/app-wide-defaults-via-providetagconfig</example-url>
|
|
548
|
+
* <example-url>http://localhost:4200/#/common/display/tag/color-palette</example-url>
|
|
549
|
+
* <example-url>http://localhost:4200/#/common/display/tag/composition-with-cngxicon</example-url>
|
|
550
|
+
* <example-url>http://localhost:4200/#/common/display/tag/density</example-url>
|
|
551
|
+
* <example-url>http://localhost:4200/#/common/display/tag/group-semantic-list</example-url>
|
|
552
|
+
* <example-url>http://localhost:4200/#/common/display/tag/group-with-header-accessory</example-url>
|
|
553
|
+
* <example-url>http://localhost:4200/#/common/display/tag/layout-only-alignment</example-url>
|
|
554
|
+
* <example-url>http://localhost:4200/#/common/display/tag/layout-only-gap-variants</example-url>
|
|
555
|
+
* <example-url>http://localhost:4200/#/common/display/tag/link-mode</example-url>
|
|
556
|
+
* <example-url>http://localhost:4200/#/common/display/tag/slot-overrides-custom-label</example-url>
|
|
557
|
+
* <example-url>http://localhost:4200/#/common/display/tag/slot-overrides-prefix-label-suffix</example-url>
|
|
558
|
+
* <example-url>http://localhost:4200/#/common/display/tag/truncate-maxwidth</example-url>
|
|
559
|
+
* <example-url>http://localhost:4200/#/common/display/tag/variant-matrix</example-url>
|
|
374
560
|
*/
|
|
375
561
|
declare class CngxTagLabel {
|
|
376
562
|
readonly templateRef: TemplateRef<CngxTagLabelContext>;
|
|
@@ -383,7 +569,7 @@ declare class CngxTagLabel {
|
|
|
383
569
|
* `<span cngxTag>`. Use for icon glyphs, status dots, count badges,
|
|
384
570
|
* or any per-tag prefix decoration.
|
|
385
571
|
*
|
|
386
|
-
* The slot has no default body
|
|
572
|
+
* The slot has no default body - when not projected, no DOM is
|
|
387
573
|
* rendered in the prefix position.
|
|
388
574
|
*
|
|
389
575
|
* ```html
|
|
@@ -394,6 +580,24 @@ declare class CngxTagLabel {
|
|
|
394
580
|
* Action required
|
|
395
581
|
* </span>
|
|
396
582
|
* ```
|
|
583
|
+
*
|
|
584
|
+
* @category common/display
|
|
585
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/display/tag/slots/tag-prefix.directive.ts
|
|
586
|
+
* @since 0.1.0
|
|
587
|
+
* @relatedTo CngxTag, CngxTagLabel, CngxTagSuffix
|
|
588
|
+
* <example-url>http://localhost:4200/#/common/display/tag/app-wide-defaults-via-providetagconfig</example-url>
|
|
589
|
+
* <example-url>http://localhost:4200/#/common/display/tag/color-palette</example-url>
|
|
590
|
+
* <example-url>http://localhost:4200/#/common/display/tag/composition-with-cngxicon</example-url>
|
|
591
|
+
* <example-url>http://localhost:4200/#/common/display/tag/density</example-url>
|
|
592
|
+
* <example-url>http://localhost:4200/#/common/display/tag/group-semantic-list</example-url>
|
|
593
|
+
* <example-url>http://localhost:4200/#/common/display/tag/group-with-header-accessory</example-url>
|
|
594
|
+
* <example-url>http://localhost:4200/#/common/display/tag/layout-only-alignment</example-url>
|
|
595
|
+
* <example-url>http://localhost:4200/#/common/display/tag/layout-only-gap-variants</example-url>
|
|
596
|
+
* <example-url>http://localhost:4200/#/common/display/tag/link-mode</example-url>
|
|
597
|
+
* <example-url>http://localhost:4200/#/common/display/tag/slot-overrides-custom-label</example-url>
|
|
598
|
+
* <example-url>http://localhost:4200/#/common/display/tag/slot-overrides-prefix-label-suffix</example-url>
|
|
599
|
+
* <example-url>http://localhost:4200/#/common/display/tag/truncate-maxwidth</example-url>
|
|
600
|
+
* <example-url>http://localhost:4200/#/common/display/tag/variant-matrix</example-url>
|
|
397
601
|
*/
|
|
398
602
|
declare class CngxTagPrefix {
|
|
399
603
|
readonly templateRef: TemplateRef<CngxTagPrefixContext>;
|
|
@@ -406,7 +610,7 @@ declare class CngxTagPrefix {
|
|
|
406
610
|
* `<span cngxTag>`. Use for trailing chevrons, sort indicators, or
|
|
407
611
|
* any per-tag suffix decoration.
|
|
408
612
|
*
|
|
409
|
-
* The slot has no default body
|
|
613
|
+
* The slot has no default body - when not projected, no DOM is
|
|
410
614
|
* rendered in the suffix position. Removable affordances belong on
|
|
411
615
|
* `CngxChip` (which ships its own remove button + announcer
|
|
412
616
|
* wiring), not as a Tag suffix slot.
|
|
@@ -419,6 +623,24 @@ declare class CngxTagPrefix {
|
|
|
419
623
|
* </ng-template>
|
|
420
624
|
* </span>
|
|
421
625
|
* ```
|
|
626
|
+
*
|
|
627
|
+
* @category common/display
|
|
628
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/display/tag/slots/tag-suffix.directive.ts
|
|
629
|
+
* @since 0.1.0
|
|
630
|
+
* @relatedTo CngxTag, CngxTagLabel, CngxTagPrefix
|
|
631
|
+
* <example-url>http://localhost:4200/#/common/display/tag/app-wide-defaults-via-providetagconfig</example-url>
|
|
632
|
+
* <example-url>http://localhost:4200/#/common/display/tag/color-palette</example-url>
|
|
633
|
+
* <example-url>http://localhost:4200/#/common/display/tag/composition-with-cngxicon</example-url>
|
|
634
|
+
* <example-url>http://localhost:4200/#/common/display/tag/density</example-url>
|
|
635
|
+
* <example-url>http://localhost:4200/#/common/display/tag/group-semantic-list</example-url>
|
|
636
|
+
* <example-url>http://localhost:4200/#/common/display/tag/group-with-header-accessory</example-url>
|
|
637
|
+
* <example-url>http://localhost:4200/#/common/display/tag/layout-only-alignment</example-url>
|
|
638
|
+
* <example-url>http://localhost:4200/#/common/display/tag/layout-only-gap-variants</example-url>
|
|
639
|
+
* <example-url>http://localhost:4200/#/common/display/tag/link-mode</example-url>
|
|
640
|
+
* <example-url>http://localhost:4200/#/common/display/tag/slot-overrides-custom-label</example-url>
|
|
641
|
+
* <example-url>http://localhost:4200/#/common/display/tag/slot-overrides-prefix-label-suffix</example-url>
|
|
642
|
+
* <example-url>http://localhost:4200/#/common/display/tag/truncate-maxwidth</example-url>
|
|
643
|
+
* <example-url>http://localhost:4200/#/common/display/tag/variant-matrix</example-url>
|
|
422
644
|
*/
|
|
423
645
|
declare class CngxTagSuffix {
|
|
424
646
|
readonly templateRef: TemplateRef<CngxTagSuffixContext>;
|
|
@@ -426,7 +648,11 @@ declare class CngxTagSuffix {
|
|
|
426
648
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxTagSuffix, "ng-template[cngxTagSuffix]", ["cngxTagSuffix"], {}, {}, never, never, true, never>;
|
|
427
649
|
}
|
|
428
650
|
|
|
429
|
-
/**
|
|
651
|
+
/**
|
|
652
|
+
* Visual variant. `filled` is the default solid pill; `outline` swaps fill for border; `subtle` softens both.
|
|
653
|
+
*
|
|
654
|
+
* @category common/display
|
|
655
|
+
*/
|
|
430
656
|
type CngxTagVariant = 'filled' | 'outline' | 'subtle';
|
|
431
657
|
/**
|
|
432
658
|
* Semantic colour key. The five named values cascade through the
|
|
@@ -439,14 +665,18 @@ type CngxTagVariant = 'filled' | 'outline' | 'subtle';
|
|
|
439
665
|
* styles against their own design tokens. Re-evaluation trigger
|
|
440
666
|
* toward a `withTagColors()` cascade is tracked in
|
|
441
667
|
* `display-accepted-debt.md §1`.
|
|
668
|
+
*
|
|
669
|
+
* @category common/display
|
|
442
670
|
*/
|
|
443
671
|
type CngxTagColor = 'neutral' | 'success' | 'warning' | 'error' | 'info' | (string & {});
|
|
444
672
|
/**
|
|
445
673
|
* Density. `md` is the default. Each step scales padding + font-size
|
|
446
674
|
* via the `--cngx-tag-{sm|lg|xl}-padding` and matching font-size
|
|
447
675
|
* custom properties (see `tag.css`). Sizing of nested atoms
|
|
448
|
-
* (`cngx-icon`, `cngx-avatar`) is the consumer's call
|
|
676
|
+
* (`cngx-icon`, `cngx-avatar`) is the consumer's call - Tag does not
|
|
449
677
|
* cascade a sub-token contract.
|
|
678
|
+
*
|
|
679
|
+
* @category common/display
|
|
450
680
|
*/
|
|
451
681
|
type CngxTagSize = 'sm' | 'md' | 'lg' | 'xl';
|
|
452
682
|
/**
|
|
@@ -459,7 +689,7 @@ type CngxTagSize = 'sm' | 'md' | 'lg' | 'xl';
|
|
|
459
689
|
* on a card, role markers in an admin table, pre-filter chips in a
|
|
460
690
|
* dashboard sidebar. Two narrow atoms with non-overlapping
|
|
461
691
|
* concerns beat one chip-tag hybrid with mode flags
|
|
462
|
-
* (Pillar 3
|
|
692
|
+
* (Pillar 3 - Komposition statt Konfiguration).
|
|
463
693
|
*
|
|
464
694
|
* **Responsibilities (intentionally narrow).**
|
|
465
695
|
* - Apply variant / color / size / truncate / maxWidth host
|
|
@@ -469,21 +699,42 @@ type CngxTagSize = 'sm' | 'md' | 'lg' | 'xl';
|
|
|
469
699
|
* reactively expose `role="listitem"` so the parent's
|
|
470
700
|
* `role="list"` semantics propagate without consumer wiring.
|
|
471
701
|
* The cascade reads `CNGX_TAG_GROUP.semanticList()` through a
|
|
472
|
-
* single `computed<'listitem' | null>()` (Pillar 1
|
|
473
|
-
* derivation; Pillar 2
|
|
702
|
+
* single `computed<'listitem' | null>()` (Pillar 1 -
|
|
703
|
+
* derivation; Pillar 2 - ARIA in the reactive graph).
|
|
474
704
|
*
|
|
475
705
|
* **Non-responsibilities.**
|
|
476
|
-
* - Removable affordance
|
|
477
|
-
* - Clickable / interactive semantics
|
|
706
|
+
* - Removable affordance - use `CngxChip` instead.
|
|
707
|
+
* - Clickable / interactive semantics - wrap with native
|
|
478
708
|
* `<button cngxTag>` or `<a cngxTag>` for keyboard +
|
|
479
709
|
* focus + Enter/Space.
|
|
480
|
-
* - Configuration cascade
|
|
710
|
+
* - Configuration cascade - deferred (see
|
|
481
711
|
* `display-accepted-debt.md §1`).
|
|
712
|
+
*
|
|
713
|
+
* @category common/display
|
|
714
|
+
* @docsKind primary
|
|
715
|
+
* @wcag AA
|
|
716
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/display/tag/tag.directive.ts
|
|
717
|
+
* @selector cngx-tag
|
|
718
|
+
* @since 0.1.0
|
|
719
|
+
* @relatedTo CngxTagGroup, CngxChip, CngxBadge, CngxTagLabel
|
|
720
|
+
* <example-url>http://localhost:4200/#/common/display/tag/app-wide-defaults-via-providetagconfig</example-url>
|
|
721
|
+
* <example-url>http://localhost:4200/#/common/display/tag/color-palette</example-url>
|
|
722
|
+
* <example-url>http://localhost:4200/#/common/display/tag/composition-with-cngxicon</example-url>
|
|
723
|
+
* <example-url>http://localhost:4200/#/common/display/tag/density</example-url>
|
|
724
|
+
* <example-url>http://localhost:4200/#/common/display/tag-group/semantic-list</example-url>
|
|
725
|
+
* <example-url>http://localhost:4200/#/common/display/tag-group/with-header-accessory</example-url>
|
|
726
|
+
* <example-url>http://localhost:4200/#/common/display/tag-group/alignment</example-url>
|
|
727
|
+
* <example-url>http://localhost:4200/#/common/display/tag-group/gap-variants</example-url>
|
|
728
|
+
* <example-url>http://localhost:4200/#/common/display/tag/link-mode</example-url>
|
|
729
|
+
* <example-url>http://localhost:4200/#/common/display/tag/slot-overrides-custom-label</example-url>
|
|
730
|
+
* <example-url>http://localhost:4200/#/common/display/tag/slot-overrides-prefix-label-suffix</example-url>
|
|
731
|
+
* <example-url>http://localhost:4200/#/common/display/tag/truncate-maxwidth</example-url>
|
|
732
|
+
* <example-url>http://localhost:4200/#/common/display/tag/variant-matrix</example-url>
|
|
482
733
|
*/
|
|
483
734
|
declare class CngxTag {
|
|
484
735
|
/**
|
|
485
736
|
* Snapshot of the resolved tag-family config at construction
|
|
486
|
-
* time. Drives the per-input fallback defaults below
|
|
737
|
+
* time. Drives the per-input fallback defaults below - Angular's
|
|
487
738
|
* input-default rule means per-instance `[variant]="..."`
|
|
488
739
|
* bindings still win.
|
|
489
740
|
*
|
|
@@ -494,7 +745,7 @@ declare class CngxTag {
|
|
|
494
745
|
* `undefined` at the input's init call site (runtime crash on
|
|
495
746
|
* first construction). Per the
|
|
496
747
|
* `tag-family-architectural-a-plus-pass` plan Architectural-
|
|
497
|
-
* Decisions table
|
|
748
|
+
* Decisions table - flagged in cngx-plan-review 2026-04-29.
|
|
498
749
|
*/
|
|
499
750
|
private readonly cfg;
|
|
500
751
|
/** Visual variant. `filled` (default) | `outline` | `subtle`. */
|
|
@@ -510,10 +761,10 @@ declare class CngxTag {
|
|
|
510
761
|
/**
|
|
511
762
|
* When `true`, applies `text-overflow: ellipsis` + `white-space: nowrap`
|
|
512
763
|
* to the inner `.cngx-tag__label` span. Pair with `[maxWidth]` for a
|
|
513
|
-
* hard upper bound. Visual-only
|
|
764
|
+
* hard upper bound. Visual-only - the full text remains in the DOM
|
|
514
765
|
* for AT.
|
|
515
766
|
*
|
|
516
|
-
* Deliberately CSS-only
|
|
767
|
+
* Deliberately CSS-only - `CngxTruncate` (`@cngx/common/layout`) is the
|
|
517
768
|
* right tool for multi-line clamp + expand/collapse state on long-form
|
|
518
769
|
* text, but its reactive machinery (effect + ResizeObserver + isClamped
|
|
519
770
|
* signal) is overkill for a chip-style single-line overflow.
|
|
@@ -530,21 +781,21 @@ declare class CngxTag {
|
|
|
530
781
|
* default implementer). When present and `semanticList()` is
|
|
531
782
|
* `true`, the host carries `role="listitem"` so the parent's
|
|
532
783
|
* `role="list"` propagates. When absent, no synthetic role is
|
|
533
|
-
* set
|
|
784
|
+
* set - `<a cngxTag>` keeps its native `role="link"`,
|
|
534
785
|
* `<button cngxTag>` keeps its `role="button"`, etc.
|
|
535
786
|
*/
|
|
536
787
|
private readonly group;
|
|
537
788
|
/**
|
|
538
|
-
* Per-instance label-slot directive
|
|
789
|
+
* Per-instance label-slot directive - projected as
|
|
539
790
|
* `<ng-template cngxTagLabel>...</ng-template>`. Resolved through
|
|
540
791
|
* {@link injectResolvedTagTemplate} so consumers can override the
|
|
541
792
|
* default `<span class="cngx-tag__label">` wrapper without forking
|
|
542
793
|
* the directive.
|
|
543
794
|
*/
|
|
544
795
|
protected readonly labelSlot: _angular_core.Signal<CngxTagLabel | undefined>;
|
|
545
|
-
/** Per-instance prefix-slot directive
|
|
796
|
+
/** Per-instance prefix-slot directive - projected before the label. */
|
|
546
797
|
protected readonly prefixSlot: _angular_core.Signal<CngxTagPrefix | undefined>;
|
|
547
|
-
/** Per-instance suffix-slot directive
|
|
798
|
+
/** Per-instance suffix-slot directive - projected after the label. */
|
|
548
799
|
protected readonly suffixSlot: _angular_core.Signal<CngxTagSuffix | undefined>;
|
|
549
800
|
/**
|
|
550
801
|
* Resolved label template. Phase 1 cascade: instance slot → host
|
|
@@ -564,7 +815,7 @@ declare class CngxTag {
|
|
|
564
815
|
* templates `let-variant="variant"` etc. read the live state without
|
|
565
816
|
* injecting the directive.
|
|
566
817
|
*
|
|
567
|
-
* Explicit structural `equal` fn
|
|
818
|
+
* Explicit structural `equal` fn - without it, a fresh literal each
|
|
568
819
|
* CD cycle would force `ngTemplateOutlet` to rebind embedded views
|
|
569
820
|
* even when no input changed. Per `reference_signal_architecture` §1
|
|
570
821
|
* Equality Rule: every `computed` returning an object MUST pass an
|
|
@@ -574,7 +825,7 @@ declare class CngxTag {
|
|
|
574
825
|
/**
|
|
575
826
|
* Reactive `role` attribute. Returns `'listitem'` when projected
|
|
576
827
|
* inside a `<cngx-tag-group [semanticList]="true">`; `null`
|
|
577
|
-
* otherwise. No explicit `equal` fn passed
|
|
828
|
+
* otherwise. No explicit `equal` fn passed - primitive string
|
|
578
829
|
* output, default `Object.is` is correct (per
|
|
579
830
|
* `reference_signal_architecture` §1: equality discipline applies
|
|
580
831
|
* to object/array results, not primitives).
|
|
@@ -594,6 +845,8 @@ declare class CngxTag {
|
|
|
594
845
|
*
|
|
595
846
|
* `$implicit` is `void` because the slot has no positional payload —
|
|
596
847
|
* consumers reach for the named fields below.
|
|
848
|
+
*
|
|
849
|
+
* @category common/display
|
|
597
850
|
*/
|
|
598
851
|
interface CngxTagGroupHeaderContext {
|
|
599
852
|
readonly $implicit: void;
|
|
@@ -608,6 +861,8 @@ interface CngxTagGroupHeaderContext {
|
|
|
608
861
|
* identical to {@link CngxTagGroupHeaderContext}; kept separate so
|
|
609
862
|
* future per-slot fields can land without breaking header-slot
|
|
610
863
|
* consumers.
|
|
864
|
+
*
|
|
865
|
+
* @category common/display
|
|
611
866
|
*/
|
|
612
867
|
interface CngxTagGroupAccessoryContext {
|
|
613
868
|
readonly $implicit: void;
|
|
@@ -619,13 +874,13 @@ interface CngxTagGroupAccessoryContext {
|
|
|
619
874
|
}
|
|
620
875
|
|
|
621
876
|
/**
|
|
622
|
-
* Override template for the accessory zone of `<cngx-tag-group>`
|
|
877
|
+
* Override template for the accessory zone of `<cngx-tag-group>` -
|
|
623
878
|
* projected BELOW the row of tags. Use for clear-all buttons,
|
|
624
879
|
* sort toggles that span the group, secondary actions, or any
|
|
625
880
|
* trailing decoration the consumer wants to bundle with the
|
|
626
881
|
* layout.
|
|
627
882
|
*
|
|
628
|
-
* The slot has no default body
|
|
883
|
+
* The slot has no default body - when not projected, no DOM is
|
|
629
884
|
* rendered below the tag row. The reactive count of projected
|
|
630
885
|
* `<span cngxTag>` siblings is exposed via the slot context so
|
|
631
886
|
* consumer "Clear all (5)" patterns work without injection.
|
|
@@ -639,6 +894,24 @@ interface CngxTagGroupAccessoryContext {
|
|
|
639
894
|
* </ng-template>
|
|
640
895
|
* </cngx-tag-group>
|
|
641
896
|
* ```
|
|
897
|
+
*
|
|
898
|
+
* @category common/display
|
|
899
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/display/tag-group/slots/tag-group-accessory.directive.ts
|
|
900
|
+
* @since 0.1.0
|
|
901
|
+
* @relatedTo CngxTagGroup, CngxTagGroupHeader
|
|
902
|
+
* <example-url>http://localhost:4200/#/common/display/tag/app-wide-defaults-via-providetagconfig</example-url>
|
|
903
|
+
* <example-url>http://localhost:4200/#/common/display/tag/color-palette</example-url>
|
|
904
|
+
* <example-url>http://localhost:4200/#/common/display/tag/composition-with-cngxicon</example-url>
|
|
905
|
+
* <example-url>http://localhost:4200/#/common/display/tag/density</example-url>
|
|
906
|
+
* <example-url>http://localhost:4200/#/common/display/tag/group-semantic-list</example-url>
|
|
907
|
+
* <example-url>http://localhost:4200/#/common/display/tag/group-with-header-accessory</example-url>
|
|
908
|
+
* <example-url>http://localhost:4200/#/common/display/tag/layout-only-alignment</example-url>
|
|
909
|
+
* <example-url>http://localhost:4200/#/common/display/tag/layout-only-gap-variants</example-url>
|
|
910
|
+
* <example-url>http://localhost:4200/#/common/display/tag/link-mode</example-url>
|
|
911
|
+
* <example-url>http://localhost:4200/#/common/display/tag/slot-overrides-custom-label</example-url>
|
|
912
|
+
* <example-url>http://localhost:4200/#/common/display/tag/slot-overrides-prefix-label-suffix</example-url>
|
|
913
|
+
* <example-url>http://localhost:4200/#/common/display/tag/truncate-maxwidth</example-url>
|
|
914
|
+
* <example-url>http://localhost:4200/#/common/display/tag/variant-matrix</example-url>
|
|
642
915
|
*/
|
|
643
916
|
declare class CngxTagGroupAccessory {
|
|
644
917
|
readonly templateRef: TemplateRef<CngxTagGroupAccessoryContext>;
|
|
@@ -647,13 +920,13 @@ declare class CngxTagGroupAccessory {
|
|
|
647
920
|
}
|
|
648
921
|
|
|
649
922
|
/**
|
|
650
|
-
* Override template for the header zone of `<cngx-tag-group>`
|
|
923
|
+
* Override template for the header zone of `<cngx-tag-group>` -
|
|
651
924
|
* projected ABOVE the row of tags. Use for label-prefix
|
|
652
925
|
* ("Filters"), count badges, sort toggles that span the group, or
|
|
653
926
|
* any header decoration the consumer wants to bundle with the
|
|
654
927
|
* layout.
|
|
655
928
|
*
|
|
656
|
-
* The slot has no default body
|
|
929
|
+
* The slot has no default body - when not projected, no DOM is
|
|
657
930
|
* rendered above the tag row. The reactive count of projected
|
|
658
931
|
* `<span cngxTag>` siblings is exposed via the slot context for
|
|
659
932
|
* consumer "Filters ({{ count }})" patterns without injection.
|
|
@@ -667,6 +940,24 @@ declare class CngxTagGroupAccessory {
|
|
|
667
940
|
* <span cngxTag>Backend</span>
|
|
668
941
|
* </cngx-tag-group>
|
|
669
942
|
* ```
|
|
943
|
+
*
|
|
944
|
+
* @category common/display
|
|
945
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/display/tag-group/slots/tag-group-header.directive.ts
|
|
946
|
+
* @since 0.1.0
|
|
947
|
+
* @relatedTo CngxTagGroup, CngxTagGroupAccessory
|
|
948
|
+
* <example-url>http://localhost:4200/#/common/display/tag/app-wide-defaults-via-providetagconfig</example-url>
|
|
949
|
+
* <example-url>http://localhost:4200/#/common/display/tag/color-palette</example-url>
|
|
950
|
+
* <example-url>http://localhost:4200/#/common/display/tag/composition-with-cngxicon</example-url>
|
|
951
|
+
* <example-url>http://localhost:4200/#/common/display/tag/density</example-url>
|
|
952
|
+
* <example-url>http://localhost:4200/#/common/display/tag/group-semantic-list</example-url>
|
|
953
|
+
* <example-url>http://localhost:4200/#/common/display/tag/group-with-header-accessory</example-url>
|
|
954
|
+
* <example-url>http://localhost:4200/#/common/display/tag/layout-only-alignment</example-url>
|
|
955
|
+
* <example-url>http://localhost:4200/#/common/display/tag/layout-only-gap-variants</example-url>
|
|
956
|
+
* <example-url>http://localhost:4200/#/common/display/tag/link-mode</example-url>
|
|
957
|
+
* <example-url>http://localhost:4200/#/common/display/tag/slot-overrides-custom-label</example-url>
|
|
958
|
+
* <example-url>http://localhost:4200/#/common/display/tag/slot-overrides-prefix-label-suffix</example-url>
|
|
959
|
+
* <example-url>http://localhost:4200/#/common/display/tag/truncate-maxwidth</example-url>
|
|
960
|
+
* <example-url>http://localhost:4200/#/common/display/tag/variant-matrix</example-url>
|
|
670
961
|
*/
|
|
671
962
|
declare class CngxTagGroupHeader {
|
|
672
963
|
readonly templateRef: TemplateRef<CngxTagGroupHeaderContext>;
|
|
@@ -681,22 +972,24 @@ declare class CngxTagGroupHeader {
|
|
|
681
972
|
* reactively without injecting a concrete parent class.
|
|
682
973
|
*
|
|
683
974
|
* The field is typed `Signal<boolean>` (the public parent type),
|
|
684
|
-
* NOT `InputSignal<boolean>`
|
|
975
|
+
* NOT `InputSignal<boolean>` - test doubles and programmatic groups
|
|
685
976
|
* must be able to satisfy the contract without owning an Angular
|
|
686
977
|
* `input()`. The `CngxTagGroup` implementer narrows its
|
|
687
978
|
* `InputSignal<boolean>` to this public type via direct assignment
|
|
688
979
|
* (`readonly semanticList: Signal<boolean> = this.semanticListInput`).
|
|
689
980
|
* `InputSignal` already structurally extends `Signal`, so no runtime
|
|
690
|
-
* conversion is needed
|
|
981
|
+
* conversion is needed - and `.asReadonly()` does NOT exist on
|
|
691
982
|
* `InputSignal` (it lives on `WritableSignal` only); the type-only
|
|
692
983
|
* narrowing is the canonical bridge.
|
|
984
|
+
*
|
|
985
|
+
* @category common/display
|
|
693
986
|
*/
|
|
694
987
|
interface CngxTagGroupHost {
|
|
695
988
|
readonly semanticList: Signal<boolean>;
|
|
696
989
|
}
|
|
697
990
|
/**
|
|
698
991
|
* DI token for parent `CngxTagGroup` <-> child `CngxTag` ARIA wiring.
|
|
699
|
-
* Atomic-decompose rule 4
|
|
992
|
+
* Atomic-decompose rule 4 - communication via `InjectionToken`,
|
|
700
993
|
* never via concrete parent class injection.
|
|
701
994
|
*
|
|
702
995
|
* `CngxTag` injects the token `{ optional: true }` and, when present,
|
|
@@ -704,8 +997,13 @@ interface CngxTagGroupHost {
|
|
|
704
997
|
* single `computed()`. When absent (Tag rendered outside any group),
|
|
705
998
|
* the role attribute stays unset.
|
|
706
999
|
*
|
|
707
|
-
* Defaults to no provider
|
|
1000
|
+
* Defaults to no provider - the token resolves to `null` for any
|
|
708
1001
|
* `CngxTag` that lives outside a `CngxTagGroup`.
|
|
1002
|
+
*
|
|
1003
|
+
* @category common/display
|
|
1004
|
+
* @wcag AA
|
|
1005
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/display/tag-group/tag-group.token.ts
|
|
1006
|
+
* @since 0.1.0
|
|
709
1007
|
*/
|
|
710
1008
|
declare const CNGX_TAG_GROUP: InjectionToken<CngxTagGroupHost>;
|
|
711
1009
|
|
|
@@ -713,11 +1011,13 @@ declare const CNGX_TAG_GROUP: InjectionToken<CngxTagGroupHost>;
|
|
|
713
1011
|
* Spacing between projected tags. Maps to the
|
|
714
1012
|
* `--cngx-tag-group-gap{,-xs,-md}` CSS custom property cascade with
|
|
715
1013
|
* fallback defaults (see `tag-group.component.css`). `sm` is the
|
|
716
|
-
* default
|
|
1014
|
+
* default - matches the tag's own padding rhythm.
|
|
717
1015
|
*
|
|
718
1016
|
* - `xs` → 0.25rem (tight chip strips)
|
|
719
1017
|
* - `sm` → 0.5rem (default)
|
|
720
1018
|
* - `md` → 0.75rem (roomy taxonomy clusters)
|
|
1019
|
+
*
|
|
1020
|
+
* @category common/display
|
|
721
1021
|
*/
|
|
722
1022
|
type CngxTagGroupGap = 'xs' | 'sm' | 'md';
|
|
723
1023
|
/**
|
|
@@ -731,6 +1031,8 @@ type CngxTagGroupGap = 'xs' | 'sm' | 'md';
|
|
|
731
1031
|
*
|
|
732
1032
|
* Only meaningful when the group has more horizontal room than its
|
|
733
1033
|
* intrinsic content; otherwise the row hugs its tags.
|
|
1034
|
+
*
|
|
1035
|
+
* @category common/display
|
|
734
1036
|
*/
|
|
735
1037
|
type CngxTagGroupAlign = 'start' | 'center' | 'end' | 'between';
|
|
736
1038
|
/**
|
|
@@ -744,8 +1046,8 @@ type CngxTagGroupAlign = 'start' | 'center' | 'end' | 'between';
|
|
|
744
1046
|
* accessory slot zones. The cascade that flips each child's
|
|
745
1047
|
* `role="listitem"` lives on the `CngxTag` side (`tag.directive.ts`
|
|
746
1048
|
* reads `CNGX_TAG_GROUP.semanticList()` through a `computed`); this
|
|
747
|
-
* component just provides the implementer of that token (Pillar 1
|
|
748
|
-
* derivation rather than imperative sync; Pillar 2
|
|
1049
|
+
* component just provides the implementer of that token (Pillar 1 -
|
|
1050
|
+
* derivation rather than imperative sync; Pillar 2 - ARIA in the
|
|
749
1051
|
* reactive graph).
|
|
750
1052
|
*
|
|
751
1053
|
* **Responsibilities (intentionally narrow).**
|
|
@@ -762,22 +1064,42 @@ type CngxTagGroupAlign = 'start' | 'center' | 'end' | 'between';
|
|
|
762
1064
|
* `CngxTag` children via the slot context.
|
|
763
1065
|
*
|
|
764
1066
|
* **Non-responsibilities.**
|
|
765
|
-
* - No `role="listitem"` cascade implementation here
|
|
1067
|
+
* - No `role="listitem"` cascade implementation here - that lives in
|
|
766
1068
|
* `CngxTag` so the cascade survives any future non-component
|
|
767
1069
|
* implementer of `CngxTagGroupHost` (test doubles, programmatic
|
|
768
1070
|
* groups).
|
|
769
|
-
* - No `hostDirectives`
|
|
1071
|
+
* - No `hostDirectives` - decorative atoms have no shared cross-cutting
|
|
770
1072
|
* behaviour to compose. Per atomic-decompose rule 1 the absence is
|
|
771
1073
|
* the right call until a future shared concern lands.
|
|
772
|
-
* - Configuration cascade (`provideTagConfig`)
|
|
1074
|
+
* - Configuration cascade (`provideTagConfig`) - deferred (see
|
|
773
1075
|
* `display-accepted-debt.md §1`).
|
|
1076
|
+
*
|
|
1077
|
+
* @category common/display
|
|
1078
|
+
* @docsKind primary
|
|
1079
|
+
* @wcag AA
|
|
1080
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/display/tag-group/tag-group.component.ts
|
|
1081
|
+
* @since 0.1.0
|
|
1082
|
+
* @relatedTo CngxTag, CngxTagGroupHeader, CngxTagGroupAccessory, CNGX_TAG_GROUP
|
|
1083
|
+
* <example-url>http://localhost:4200/#/common/display/tag/app-wide-defaults-via-providetagconfig</example-url>
|
|
1084
|
+
* <example-url>http://localhost:4200/#/common/display/tag/color-palette</example-url>
|
|
1085
|
+
* <example-url>http://localhost:4200/#/common/display/tag/composition-with-cngxicon</example-url>
|
|
1086
|
+
* <example-url>http://localhost:4200/#/common/display/tag/density</example-url>
|
|
1087
|
+
* <example-url>http://localhost:4200/#/common/display/tag-group/semantic-list</example-url>
|
|
1088
|
+
* <example-url>http://localhost:4200/#/common/display/tag-group/with-header-accessory</example-url>
|
|
1089
|
+
* <example-url>http://localhost:4200/#/common/display/tag-group/alignment</example-url>
|
|
1090
|
+
* <example-url>http://localhost:4200/#/common/display/tag-group/gap-variants</example-url>
|
|
1091
|
+
* <example-url>http://localhost:4200/#/common/display/tag/link-mode</example-url>
|
|
1092
|
+
* <example-url>http://localhost:4200/#/common/display/tag/slot-overrides-custom-label</example-url>
|
|
1093
|
+
* <example-url>http://localhost:4200/#/common/display/tag/slot-overrides-prefix-label-suffix</example-url>
|
|
1094
|
+
* <example-url>http://localhost:4200/#/common/display/tag/truncate-maxwidth</example-url>
|
|
1095
|
+
* <example-url>http://localhost:4200/#/common/display/tag/variant-matrix</example-url>
|
|
774
1096
|
*/
|
|
775
1097
|
declare class CngxTagGroup implements CngxTagGroupHost {
|
|
776
1098
|
/**
|
|
777
1099
|
* Snapshot of the resolved tag-family config at construction
|
|
778
1100
|
* time. Drives the per-input fallback defaults below.
|
|
779
1101
|
*
|
|
780
|
-
* **Field-init ordering is load-bearing**
|
|
1102
|
+
* **Field-init ordering is load-bearing** - must be declared
|
|
781
1103
|
* before any input field that reads `this.cfg.groupDefaults?.*`.
|
|
782
1104
|
* Per the `tag-family-architectural-a-plus-pass` plan
|
|
783
1105
|
* Architectural-Decisions table.
|
|
@@ -797,10 +1119,10 @@ declare class CngxTagGroup implements CngxTagGroupHost {
|
|
|
797
1119
|
/**
|
|
798
1120
|
* Input-binding hook for the public `[semanticList]` attribute.
|
|
799
1121
|
* Accessed by Angular's template type-checker on consumer
|
|
800
|
-
* markup
|
|
1122
|
+
* markup - therefore must be class-public (Angular rejects
|
|
801
1123
|
* `private` per NG1053; `protected` blocks external template
|
|
802
1124
|
* bindings). The hook is intentionally **not** the contract
|
|
803
|
-
* surface
|
|
1125
|
+
* surface - that role belongs to `semanticList` below, typed
|
|
804
1126
|
* `Signal<boolean>` so test doubles and programmatic
|
|
805
1127
|
* implementers of `CngxTagGroupHost` can satisfy the interface
|
|
806
1128
|
* without owning an Angular `input()`.
|
|
@@ -825,13 +1147,13 @@ declare class CngxTagGroup implements CngxTagGroupHost {
|
|
|
825
1147
|
*/
|
|
826
1148
|
readonly count: Signal<number>;
|
|
827
1149
|
/**
|
|
828
|
-
* Per-instance header-slot directive
|
|
1150
|
+
* Per-instance header-slot directive - projected as
|
|
829
1151
|
* `<ng-template cngxTagGroupHeader>...</ng-template>`. Resolved
|
|
830
1152
|
* through {@link injectResolvedTagTemplate} so consumers can
|
|
831
1153
|
* project a header without wrapping the group component.
|
|
832
1154
|
*/
|
|
833
1155
|
protected readonly headerSlot: Signal<CngxTagGroupHeader | undefined>;
|
|
834
|
-
/** Per-instance accessory-slot directive
|
|
1156
|
+
/** Per-instance accessory-slot directive - projected below the row. */
|
|
835
1157
|
protected readonly accessorySlot: Signal<CngxTagGroupAccessory | undefined>;
|
|
836
1158
|
/**
|
|
837
1159
|
* Resolved header template. Phase 2 cascade: instance slot → null
|
|
@@ -845,7 +1167,7 @@ declare class CngxTagGroup implements CngxTagGroupHost {
|
|
|
845
1167
|
/**
|
|
846
1168
|
* Projected `<span cngxTag>` siblings. Default-scoped
|
|
847
1169
|
* (`descendants: false`) so tags inside consumer-projected header /
|
|
848
|
-
* accessory templates do NOT inflate the count
|
|
1170
|
+
* accessory templates do NOT inflate the count - the count
|
|
849
1171
|
* represents the row's own taxonomy items, not arbitrary tag
|
|
850
1172
|
* usage inside the slot zones.
|
|
851
1173
|
*/
|
|
@@ -857,7 +1179,7 @@ declare class CngxTagGroup implements CngxTagGroupHost {
|
|
|
857
1179
|
* serves both. Consumer templates `let-count="count"` etc. read
|
|
858
1180
|
* the live state without injecting the directive.
|
|
859
1181
|
*
|
|
860
|
-
* Explicit structural `equal` fn
|
|
1182
|
+
* Explicit structural `equal` fn - without it, a fresh literal
|
|
861
1183
|
* each CD cycle would force `ngTemplateOutlet` to rebind embedded
|
|
862
1184
|
* views even when no input changed. Per
|
|
863
1185
|
* `reference_signal_architecture` §1 Equality Rule: every
|
|
@@ -883,6 +1205,8 @@ declare class CngxTagGroup implements CngxTagGroupHost {
|
|
|
883
1205
|
* Every key is optional — partial overrides are deep-merged with
|
|
884
1206
|
* the library defaults so consumers only declare the keys they want
|
|
885
1207
|
* to override.
|
|
1208
|
+
*
|
|
1209
|
+
* @category common/display
|
|
886
1210
|
*/
|
|
887
1211
|
interface CngxTagConfig {
|
|
888
1212
|
/** Default values for `CngxTag` inputs when no per-instance binding wins. */
|
|
@@ -936,11 +1260,15 @@ interface CngxTagConfig {
|
|
|
936
1260
|
* 4. Library defaults (this token's `factory`).
|
|
937
1261
|
*
|
|
938
1262
|
* `providedIn: 'root'` with a default factory means consumers never
|
|
939
|
-
* need to provide the token explicitly
|
|
1263
|
+
* need to provide the token explicitly - `inject(CNGX_TAG_CONFIG)`
|
|
940
1264
|
* always resolves. Consumers who want overrides call
|
|
941
1265
|
* `provideTagConfig(...features)` in `bootstrapApplication` providers
|
|
942
1266
|
* (root cascade) or `provideTagConfigAt(...features)` in a component's
|
|
943
1267
|
* `viewProviders` (sub-tree cascade).
|
|
1268
|
+
*
|
|
1269
|
+
* @category common/display
|
|
1270
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/display/tag/config/tag.config.defaults.ts
|
|
1271
|
+
* @since 0.1.0
|
|
944
1272
|
*/
|
|
945
1273
|
declare const CNGX_TAG_CONFIG: InjectionToken<CngxTagConfig>;
|
|
946
1274
|
|
|
@@ -953,6 +1281,8 @@ declare const CNGX_TAG_CONFIG: InjectionToken<CngxTagConfig>;
|
|
|
953
1281
|
* Mirrors the `CngxSelectConfigFeature` discriminated-union shape
|
|
954
1282
|
* from `@cngx/forms/select` so the consumer's mental model is one
|
|
955
1283
|
* across feature areas.
|
|
1284
|
+
*
|
|
1285
|
+
* @category common/display
|
|
956
1286
|
*/
|
|
957
1287
|
type CngxTagConfigFeature = {
|
|
958
1288
|
readonly kind: 'defaults';
|
|
@@ -999,6 +1329,8 @@ type CngxTagConfigFeature = {
|
|
|
999
1329
|
* ],
|
|
1000
1330
|
* });
|
|
1001
1331
|
* ```
|
|
1332
|
+
*
|
|
1333
|
+
* @category common/display
|
|
1002
1334
|
*/
|
|
1003
1335
|
declare function provideTagConfig(...features: CngxTagConfigFeature[]): EnvironmentProviders;
|
|
1004
1336
|
/**
|
|
@@ -1026,6 +1358,8 @@ declare function provideTagConfig(...features: CngxTagConfigFeature[]): Environm
|
|
|
1026
1358
|
* })
|
|
1027
1359
|
* class AdminSection {}
|
|
1028
1360
|
* ```
|
|
1361
|
+
*
|
|
1362
|
+
* @category common/display
|
|
1029
1363
|
*/
|
|
1030
1364
|
declare function provideTagConfigAt(...features: CngxTagConfigFeature[]): Provider[];
|
|
1031
1365
|
|
|
@@ -1047,6 +1381,8 @@ declare function provideTagConfigAt(...features: CngxTagConfigFeature[]): Provid
|
|
|
1047
1381
|
* );
|
|
1048
1382
|
* }
|
|
1049
1383
|
* ```
|
|
1384
|
+
*
|
|
1385
|
+
* @category common/display
|
|
1050
1386
|
*/
|
|
1051
1387
|
declare function injectTagConfig(): CngxTagConfig;
|
|
1052
1388
|
|
|
@@ -1060,6 +1396,8 @@ declare function injectTagConfig(): CngxTagConfig;
|
|
|
1060
1396
|
* withTagDefaults({ variant: 'subtle', size: 'sm' }),
|
|
1061
1397
|
* );
|
|
1062
1398
|
* ```
|
|
1399
|
+
*
|
|
1400
|
+
* @category common/display
|
|
1063
1401
|
*/
|
|
1064
1402
|
declare function withTagDefaults(payload: NonNullable<CngxTagConfig['defaults']>): CngxTagConfigFeature;
|
|
1065
1403
|
/**
|
|
@@ -1071,6 +1409,8 @@ declare function withTagDefaults(payload: NonNullable<CngxTagConfig['defaults']>
|
|
|
1071
1409
|
* withTagGroupDefaults({ gap: 'md', semanticList: true }),
|
|
1072
1410
|
* );
|
|
1073
1411
|
* ```
|
|
1412
|
+
*
|
|
1413
|
+
* @category common/display
|
|
1074
1414
|
*/
|
|
1075
1415
|
declare function withTagGroupDefaults(payload: NonNullable<CngxTagConfig['groupDefaults']>): CngxTagConfigFeature;
|
|
1076
1416
|
/**
|
|
@@ -1096,6 +1436,8 @@ declare function withTagGroupDefaults(payload: NonNullable<CngxTagConfig['groupD
|
|
|
1096
1436
|
* }),
|
|
1097
1437
|
* );
|
|
1098
1438
|
* ```
|
|
1439
|
+
*
|
|
1440
|
+
* @category common/display
|
|
1099
1441
|
*/
|
|
1100
1442
|
declare function withTagColors(payload: NonNullable<CngxTagConfig['colors']>): CngxTagConfigFeature;
|
|
1101
1443
|
/**
|
|
@@ -1129,8 +1471,10 @@ declare function withTagColors(payload: NonNullable<CngxTagConfig['colors']>): C
|
|
|
1129
1471
|
* // Then in providers:
|
|
1130
1472
|
* provideTagConfig(withTagSlots({ label: shell.brandLabel() }));
|
|
1131
1473
|
* ```
|
|
1474
|
+
*
|
|
1475
|
+
* @category common/display
|
|
1132
1476
|
*/
|
|
1133
1477
|
declare function withTagSlots(payload: NonNullable<CngxTagConfig['templates']>): CngxTagConfigFeature;
|
|
1134
1478
|
|
|
1135
|
-
export { CNGX_TAG_CONFIG, CNGX_TAG_GROUP, CngxAvatar, CngxBadge, CngxCheckboxIndicator, CngxChip, CngxDivider, CngxIcon, CngxRadioIndicator, CngxTag, CngxTagGroup, CngxTagGroupAccessory, CngxTagGroupHeader, CngxTagLabel, CngxTagPrefix, CngxTagSuffix, injectTagConfig, provideTagConfig, provideTagConfigAt, withTagColors, withTagDefaults, withTagGroupDefaults, withTagSlots };
|
|
1136
|
-
export type { CngxBadgeColor, CngxBadgePosition, CngxTagColor, CngxTagConfig, CngxTagConfigFeature, CngxTagGroupAccessoryContext, CngxTagGroupAlign, CngxTagGroupGap, CngxTagGroupHeaderContext, CngxTagGroupHost, CngxTagLabelContext, CngxTagPrefixContext, CngxTagSize, CngxTagSuffixContext, CngxTagVariant };
|
|
1479
|
+
export { CNGX_TAG_CONFIG, CNGX_TAG_GROUP, CngxAvatar, CngxBadge, CngxCheckboxIndicator, CngxChip, CngxDivider, CngxIcon, CngxRadioIndicator, CngxSegmentedProgress, CngxTag, CngxTagGroup, CngxTagGroupAccessory, CngxTagGroupHeader, CngxTagLabel, CngxTagPrefix, CngxTagSuffix, injectTagConfig, provideTagConfig, provideTagConfigAt, withTagColors, withTagDefaults, withTagGroupDefaults, withTagSlots };
|
|
1480
|
+
export type { CngxBadgeColor, CngxBadgePosition, CngxTagColor, CngxTagConfig, CngxTagConfigFeature, CngxTagGroupAccessoryContext, CngxTagGroupAlign, CngxTagGroupGap, CngxTagGroupHeaderContext, CngxTagGroupHost, CngxTagLabelContext, CngxTagPrefixContext, CngxTagSize, CngxTagSuffixContext, CngxTagVariant, SegmentState };
|