@cngx/common 0.1.0-rc.9 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/a11y/README.md +15 -2
- package/button/README.md +258 -0
- package/command/README.md +19 -8
- package/data/README.md +10 -10
- package/fesm2022/cngx-common-a11y.mjs +701 -263
- package/fesm2022/cngx-common-a11y.mjs.map +1 -1
- package/fesm2022/cngx-common-audio.mjs +83 -64
- package/fesm2022/cngx-common-audio.mjs.map +1 -1
- package/fesm2022/cngx-common-button.mjs +1084 -0
- package/fesm2022/cngx-common-button.mjs.map +1 -0
- package/fesm2022/cngx-common-card.mjs +135 -76
- package/fesm2022/cngx-common-card.mjs.map +1 -1
- package/fesm2022/cngx-common-chart.mjs +749 -296
- package/fesm2022/cngx-common-chart.mjs.map +1 -1
- package/fesm2022/cngx-common-command.mjs +51 -29
- package/fesm2022/cngx-common-command.mjs.map +1 -1
- package/fesm2022/cngx-common-data.mjs +695 -405
- package/fesm2022/cngx-common-data.mjs.map +1 -1
- package/fesm2022/cngx-common-dialog.mjs +112 -112
- package/fesm2022/cngx-common-dialog.mjs.map +1 -1
- package/fesm2022/cngx-common-display.mjs +668 -308
- package/fesm2022/cngx-common-display.mjs.map +1 -1
- package/fesm2022/cngx-common-interactive.mjs +7066 -2739
- package/fesm2022/cngx-common-interactive.mjs.map +1 -1
- package/fesm2022/cngx-common-layout.mjs +2121 -492
- package/fesm2022/cngx-common-layout.mjs.map +1 -1
- package/fesm2022/cngx-common-menu-button.mjs +557 -0
- package/fesm2022/cngx-common-menu-button.mjs.map +1 -0
- package/fesm2022/cngx-common-popover.mjs +1207 -569
- package/fesm2022/cngx-common-popover.mjs.map +1 -1
- package/fesm2022/cngx-common-stepper.mjs +256 -261
- package/fesm2022/cngx-common-stepper.mjs.map +1 -1
- package/fesm2022/cngx-common-tabs.mjs +202 -262
- package/fesm2022/cngx-common-tabs.mjs.map +1 -1
- package/fesm2022/cngx-common-timeline.mjs +28 -61
- package/fesm2022/cngx-common-timeline.mjs.map +1 -1
- package/fesm2022/cngx-common.mjs +10 -10
- package/fesm2022/cngx-common.mjs.map +1 -1
- package/interactive/README.md +30 -19
- package/layout/README.md +1 -1
- package/menu-button/README.md +234 -0
- package/package.json +14 -4
- package/popover/README.md +42 -5
- package/popover/tooltip-indicator.scss +52 -0
- package/schematics/ng-add/index.js +7 -7
- package/schematics/ng-add/schema.json +5 -0
- package/stepper/README.md +0 -1
- package/theming/components/cngx-accordion.css +36 -7
- package/theming/components/cngx-async.css +185 -37
- package/theming/components/cngx-backdrop.css +3 -1
- package/theming/components/cngx-badge.css +20 -5
- package/theming/components/cngx-bottom-sheet.css +2 -0
- package/theming/components/cngx-breadcrumb.css +3 -1
- package/theming/components/cngx-button-group.css +325 -0
- package/theming/components/cngx-button-toggle.css +55 -23
- package/theming/components/cngx-button.css +975 -0
- package/theming/components/cngx-data-grid.css +2 -0
- package/theming/components/cngx-dialog.css +3 -1
- package/theming/components/cngx-divider.css +24 -9
- package/theming/components/cngx-drawer.css +153 -0
- package/theming/components/cngx-icon-glyph.css +76 -0
- package/theming/components/cngx-listbox.css +79 -25
- package/theming/components/cngx-menu.css +112 -52
- package/theming/components/cngx-nav.css +1220 -0
- package/theming/components/cngx-popover-sheet.css +43 -11
- package/theming/components/cngx-popover.css +37 -13
- package/theming/components/cngx-recycler-placeholder.css +2 -0
- package/theming/components/cngx-ripple.css +74 -16
- package/theming/components/cngx-sidebar.css +71 -0
- package/theming/components/cngx-slider.css +3 -1
- package/theming/components/cngx-tooltip.css +2 -0
- package/timeline/README.md +2 -2
- package/types/cngx-common-a11y.d.ts +343 -120
- package/types/cngx-common-audio.d.ts +60 -88
- package/types/cngx-common-button.d.ts +698 -0
- package/types/cngx-common-card.d.ts +104 -78
- package/types/cngx-common-chart.d.ts +671 -384
- package/types/cngx-common-command.d.ts +44 -47
- package/types/cngx-common-data.d.ts +350 -342
- package/types/cngx-common-dialog.d.ts +91 -120
- package/types/cngx-common-display.d.ts +475 -300
- package/types/cngx-common-interactive.d.ts +4350 -1723
- package/types/cngx-common-layout.d.ts +1365 -286
- package/types/cngx-common-menu-button.d.ts +382 -0
- package/types/cngx-common-popover.d.ts +671 -289
- package/types/cngx-common-stepper.d.ts +217 -347
- package/types/cngx-common-tabs.d.ts +173 -386
- package/types/cngx-common-timeline.d.ts +25 -104
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { Signal, InjectionToken, Provider, TemplateRef, EnvironmentProviders } from '@angular/core';
|
|
2
|
+
import { Renderer2, Signal, InjectionToken, Provider, TemplateRef, EnvironmentProviders } from '@angular/core';
|
|
3
|
+
import { CngxIconData } from '@cngx/utils';
|
|
3
4
|
import * as _cngx_common_display from '@cngx/common/display';
|
|
4
5
|
import { CngxMessage } from '@cngx/core/i18n';
|
|
5
6
|
|
|
@@ -10,28 +11,27 @@ import { CngxMessage } from '@cngx/core/i18n';
|
|
|
10
11
|
* Decorative by default (`aria-hidden="true"`); set `label` to make it
|
|
11
12
|
* informative (`role="img"`, `aria-label`).
|
|
12
13
|
*
|
|
13
|
-
* @category common/display
|
|
14
|
-
* @docsKind primary
|
|
15
14
|
* @wcag AA
|
|
16
15
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/display/icon/icon.component.ts
|
|
17
16
|
* @selector cngx-icon
|
|
18
|
-
* @since 0.
|
|
17
|
+
* @since 0.3.0
|
|
19
18
|
* @relatedTo CngxAvatar, CngxBadge, CngxChip
|
|
20
|
-
* <example-url
|
|
21
|
-
* <example-url
|
|
22
|
-
* <example-url
|
|
23
|
-
* <example-url
|
|
24
|
-
* <example-url
|
|
25
|
-
* <example-url
|
|
26
|
-
* <example-url
|
|
27
|
-
* <example-url
|
|
28
|
-
* <example-url
|
|
29
|
-
* <example-url
|
|
30
|
-
* <example-url
|
|
31
|
-
* <example-url
|
|
32
|
-
* <example-url
|
|
33
|
-
* <example-url
|
|
34
|
-
* <example-url
|
|
19
|
+
* <example-url>/#/common/display/icon/decorative-vs-informative</example-url>
|
|
20
|
+
* <example-url>/#/common/display/icon/sizes</example-url>
|
|
21
|
+
* <example-url>/#/common/display/tag/app-wide-defaults-via-providetagconfig</example-url>
|
|
22
|
+
* <example-url>/#/common/display/tag/color-palette</example-url>
|
|
23
|
+
* <example-url>/#/common/display/tag/composition-with-cngxicon</example-url>
|
|
24
|
+
* <example-url>/#/common/display/tag/density</example-url>
|
|
25
|
+
* <example-url>/#/common/display/tag/group-semantic-list</example-url>
|
|
26
|
+
* <example-url>/#/common/display/tag/group-with-header-accessory</example-url>
|
|
27
|
+
* <example-url>/#/common/display/tag/layout-only-alignment</example-url>
|
|
28
|
+
* <example-url>/#/common/display/tag/layout-only-gap-variants</example-url>
|
|
29
|
+
* <example-url>/#/common/display/tag/link-mode</example-url>
|
|
30
|
+
* <example-url>/#/common/display/tag/slot-overrides-custom-label</example-url>
|
|
31
|
+
* <example-url>/#/common/display/tag/slot-overrides-prefix-label-suffix</example-url>
|
|
32
|
+
* <example-url>/#/common/display/tag/truncate-maxwidth</example-url>
|
|
33
|
+
* <example-url>/#/common/display/tag/variant-matrix</example-url>
|
|
34
|
+
* @axis level atom
|
|
35
35
|
*/
|
|
36
36
|
declare class CngxIcon {
|
|
37
37
|
/** Accessible label. When set, the icon is treated as informative content. */
|
|
@@ -43,9 +43,75 @@ declare class CngxIcon {
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
|
-
*
|
|
46
|
+
* Draws one default cngx glyph from its `CngxIconData` onto the host
|
|
47
|
+
* `<svg>`. Decorative only (`aria-hidden`, `focusable="false"`): the
|
|
48
|
+
* meaning lives in the owning component's ARIA, never in the glyph.
|
|
49
|
+
*
|
|
50
|
+
* Sizes to `1em` and paints in `currentColor`, so it follows the text it
|
|
51
|
+
* sits in. Works standalone in a glyph span or projected into
|
|
52
|
+
* `<cngx-icon>`, which then owns the box. A stroke icon binds
|
|
53
|
+
* `fill="none"` because `<cngx-icon>` fills every svg without a `fill`
|
|
54
|
+
* attribute.
|
|
55
|
+
*
|
|
56
|
+
* An icon with a 12-grid `micro` drawing gets a second path,
|
|
57
|
+
* `.cngx-icon-svg__micro`, scaled onto the shared 24 viewBox, and a 16-grid
|
|
58
|
+
* `small` drawing a third, `.cngx-icon-svg__small`. Both carry
|
|
59
|
+
* `display="none"`, `fill="currentColor"` and `stroke="none"` as
|
|
60
|
+
* presentation attributes, so without `cngx.css` the 24-grid path shows
|
|
61
|
+
* alone. With `cngx.css` loaded, the `.cngx-icon-glyph` container rules show
|
|
62
|
+
* the micro path in a 10 to 14px box and the small path in a 15 to 19px box,
|
|
63
|
+
* each instead of the 24-grid path. DOM order is always 24 path, micro, small.
|
|
64
|
+
*
|
|
65
|
+
* @internal
|
|
66
|
+
*/
|
|
67
|
+
declare class CngxIconSvg {
|
|
68
|
+
/** Path data of the glyph to draw. */
|
|
69
|
+
readonly icon: _angular_core.InputSignal<CngxIconData>;
|
|
70
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxIconSvg, never>;
|
|
71
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxIconSvg, "svg[cngxIconSvg]", never, { "icon": { "alias": "cngxIconSvg"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Handle on an `<svg>` built by {@link createIconSvgElement}.
|
|
47
76
|
*
|
|
48
|
-
* @
|
|
77
|
+
* @internal
|
|
78
|
+
*/
|
|
79
|
+
interface CngxIconSvgElement {
|
|
80
|
+
/** The built `<svg>`, ready to insert. */
|
|
81
|
+
readonly element: SVGSVGElement;
|
|
82
|
+
/** Redraw the glyph from new icon data, switching the paint if it differs. */
|
|
83
|
+
setIcon(icon: CngxIconData): void;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Imperative twin of `CngxIconSvg` for DOM a directive inserts into
|
|
87
|
+
* consumer-projected content, where no component instance can render.
|
|
88
|
+
*
|
|
89
|
+
* The glyph is legible without any stylesheet: paint travels as SVG
|
|
90
|
+
* presentation attributes (`fill` / `stroke`, round caps and joins), so
|
|
91
|
+
* any class rule of the owning surface still wins over them, and the box
|
|
92
|
+
* and stroke width read `--cngx-icon-svg-size` (rounded to whole
|
|
93
|
+
* pixels) and `--cngx-icon-svg-stroke-width` through inline styles, so a
|
|
94
|
+
* surface sizes it by setting those tokens. `className` is the surface's own
|
|
95
|
+
* hook; a stroke icon adds `<className>--stroke`. The svg also carries the
|
|
96
|
+
* shared `cngx-icon-glyph` class and its 24-grid path `cngx-icon-svg__path`.
|
|
97
|
+
*
|
|
98
|
+
* An icon with a 12-grid `micro` drawing gets a second path,
|
|
99
|
+
* `cngx-icon-svg__micro`, scaled onto the 24 viewBox and hidden, and a
|
|
100
|
+
* 16-grid `small` drawing a third, `cngx-icon-svg__small`; both are filled and
|
|
101
|
+
* unstroked by presentation attributes. DOM order is always 24 path, micro,
|
|
102
|
+
* small - a micro added to an svg that already has a small path is inserted
|
|
103
|
+
* before it. Bare, the 24-grid path shows alone; with `cngx.css` loaded, the
|
|
104
|
+
* `.cngx-icon-glyph` container rules show the micro path in a 10 to 14px box
|
|
105
|
+
* and the small path in a 15 to 19px box.
|
|
106
|
+
*
|
|
107
|
+
* Decorative only (`aria-hidden`, `focusable="false"`).
|
|
108
|
+
*
|
|
109
|
+
* @internal
|
|
110
|
+
*/
|
|
111
|
+
declare function createIconSvgElement(renderer: Renderer2, icon: CngxIconData, className: string): CngxIconSvgElement;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* State of a single segment in a {@link CngxSegmentedProgress}.
|
|
49
115
|
*/
|
|
50
116
|
type SegmentState = 'done' | 'active' | 'todo' | 'error';
|
|
51
117
|
/**
|
|
@@ -65,15 +131,14 @@ type SegmentState = 'done' | 'active' | 'todo' | 'error';
|
|
|
65
131
|
* <cngx-segmented-progress [segments]="['done', 'error', 'active', 'todo']" />
|
|
66
132
|
* ```
|
|
67
133
|
*
|
|
68
|
-
* @category common/display
|
|
69
|
-
* @docsKind primary
|
|
70
134
|
* @wcag AA
|
|
71
135
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/display/segmented-progress/segmented-progress.component.ts
|
|
72
|
-
* @since 0.
|
|
136
|
+
* @since 0.3.0
|
|
73
137
|
* @relatedTo CngxStepper, CngxBadge
|
|
74
|
-
* <example-url
|
|
75
|
-
* <example-url
|
|
76
|
-
* <example-url
|
|
138
|
+
* <example-url>/#/common/display/segmented-progress/value-total</example-url>
|
|
139
|
+
* <example-url>/#/common/display/segmented-progress/lightbox-position</example-url>
|
|
140
|
+
* <example-url>/#/common/display/segmented-progress/error-segment</example-url>
|
|
141
|
+
* @axis level atom
|
|
77
142
|
*/
|
|
78
143
|
declare class CngxSegmentedProgress {
|
|
79
144
|
private readonly i18n;
|
|
@@ -116,14 +181,13 @@ declare class CngxSegmentedProgress {
|
|
|
116
181
|
* `--cngx-divider-inset`). Consumers apply their own styles through
|
|
117
182
|
* `.cngx-divider` or override the variables.
|
|
118
183
|
*
|
|
119
|
-
* @category common/display
|
|
120
|
-
* @docsKind primary
|
|
121
184
|
* @wcag AA
|
|
122
185
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/display/divider/divider.directive.ts
|
|
123
186
|
* @selector cngx-divider
|
|
124
|
-
* @since 0.
|
|
125
|
-
* <example-url
|
|
126
|
-
* <example-url
|
|
187
|
+
* @since 0.3.0
|
|
188
|
+
* <example-url>/#/common/display/divider/horizontal-vs-vertical</example-url>
|
|
189
|
+
* <example-url>/#/common/display/divider/inset</example-url>
|
|
190
|
+
* @axis level atom
|
|
127
191
|
*/
|
|
128
192
|
declare class CngxDivider {
|
|
129
193
|
/** Layout axis. Horizontal dividers sit between rows; vertical between columns. */
|
|
@@ -137,8 +201,7 @@ declare class CngxDivider {
|
|
|
137
201
|
/**
|
|
138
202
|
* Presence states `CngxAvatar` renders a status dot for.
|
|
139
203
|
*
|
|
140
|
-
* @
|
|
141
|
-
* @since 0.1.0
|
|
204
|
+
* @since 0.3.0
|
|
142
205
|
*/
|
|
143
206
|
type CngxAvatarStatus = 'online' | 'offline' | 'busy' | 'away';
|
|
144
207
|
/**
|
|
@@ -152,8 +215,7 @@ type CngxAvatarStatus = 'online' | 'offline' | 'busy' | 'away';
|
|
|
152
215
|
* reactively while its input is unbound, `avatarGroupNoun` and `chipRemove`
|
|
153
216
|
* included, so a language switch reaches each atom without re-creating it.
|
|
154
217
|
*
|
|
155
|
-
* @
|
|
156
|
-
* @since 0.1.0
|
|
218
|
+
* @since 0.3.0
|
|
157
219
|
*/
|
|
158
220
|
interface CngxDisplayI18n {
|
|
159
221
|
/** `CngxAvatar` status dot accessible name. English keeps the raw status word. */
|
|
@@ -182,29 +244,25 @@ interface CngxDisplayI18n {
|
|
|
182
244
|
* for the app locale; the value is a `Signal`, shared by every reader under
|
|
183
245
|
* one injector.
|
|
184
246
|
*
|
|
185
|
-
* @category common/display/i18n
|
|
186
247
|
* @wcag AA
|
|
187
248
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/display/i18n/display-i18n.ts
|
|
188
|
-
* @since 0.
|
|
249
|
+
* @since 0.3.0
|
|
189
250
|
* @relatedTo CngxAvatar, CngxAvatarGroup, CngxSegmentedProgress, CngxChip
|
|
190
251
|
*/
|
|
191
252
|
declare const CNGX_DISPLAY_I18N: InjectionToken<Signal<CngxDisplayI18n>>;
|
|
192
253
|
/**
|
|
193
|
-
*
|
|
254
|
+
* A label override feature of `provideDisplayI18n`.
|
|
194
255
|
*
|
|
195
|
-
* @
|
|
196
|
-
* @
|
|
256
|
+
* @since 0.3.0
|
|
257
|
+
* @relatedTo CNGX_DISPLAY_I18N, withDisplayI18nLabels
|
|
197
258
|
*/
|
|
198
|
-
type CngxDisplayI18nFeature = (
|
|
199
|
-
readonly _target: 'i18n';
|
|
200
|
-
};
|
|
259
|
+
type CngxDisplayI18nFeature = (bundle: Signal<CngxDisplayI18n>) => Signal<CngxDisplayI18n>;
|
|
201
260
|
/**
|
|
202
261
|
* Override display labels via a partial bundle - unset keys keep the
|
|
203
262
|
* language pack's copy, or the English default. Pass a `Signal` of a partial
|
|
204
263
|
* bundle to switch languages at runtime.
|
|
205
264
|
*
|
|
206
|
-
* @
|
|
207
|
-
* @since 0.1.0
|
|
265
|
+
* @since 0.3.0
|
|
208
266
|
*/
|
|
209
267
|
declare function withDisplayI18nLabels(overrides: Partial<CngxDisplayI18n> | Signal<Partial<CngxDisplayI18n>>): CngxDisplayI18nFeature;
|
|
210
268
|
/**
|
|
@@ -225,16 +283,14 @@ declare function withDisplayI18nLabels(overrides: Partial<CngxDisplayI18n> | Sig
|
|
|
225
283
|
* });
|
|
226
284
|
* ```
|
|
227
285
|
*
|
|
228
|
-
* @
|
|
229
|
-
* @since 0.1.0
|
|
286
|
+
* @since 0.3.0
|
|
230
287
|
*/
|
|
231
288
|
declare function provideDisplayI18n(...features: readonly CngxDisplayI18nFeature[]): Provider;
|
|
232
289
|
/**
|
|
233
290
|
* Inject the resolved display i18n bundle signal. Read it inside a
|
|
234
291
|
* `computed()` or template so a runtime override flip re-derives.
|
|
235
292
|
*
|
|
236
|
-
* @
|
|
237
|
-
* @since 0.1.0
|
|
293
|
+
* @since 0.3.0
|
|
238
294
|
*/
|
|
239
295
|
declare function injectDisplayI18n(): Signal<CngxDisplayI18n>;
|
|
240
296
|
|
|
@@ -249,15 +305,14 @@ declare function injectDisplayI18n(): Signal<CngxDisplayI18n>;
|
|
|
249
305
|
* Optional status indicator dot via `status`. Size and shape driven by
|
|
250
306
|
* CSS custom properties.
|
|
251
307
|
*
|
|
252
|
-
* @category common/display
|
|
253
|
-
* @docsKind primary
|
|
254
308
|
* @wcag AA
|
|
255
309
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/display/avatar/avatar.component.ts
|
|
256
|
-
* @since 0.
|
|
310
|
+
* @since 0.3.0
|
|
257
311
|
* @relatedTo CngxIcon, CngxBadge, CngxChip
|
|
258
|
-
* <example-url
|
|
259
|
-
* <example-url
|
|
260
|
-
* <example-url
|
|
312
|
+
* <example-url>/#/common/display/avatar/cascade-image-initials-fallback</example-url>
|
|
313
|
+
* <example-url>/#/common/display/avatar/shapes-and-status</example-url>
|
|
314
|
+
* <example-url>/#/common/display/avatar/sizes</example-url>
|
|
315
|
+
* @axis level atom
|
|
261
316
|
*/
|
|
262
317
|
declare class CngxAvatar {
|
|
263
318
|
private readonly i18n;
|
|
@@ -313,12 +368,11 @@ declare class CngxAvatar {
|
|
|
313
368
|
* </cngx-avatar-group>
|
|
314
369
|
* ```
|
|
315
370
|
*
|
|
316
|
-
* @category common/display
|
|
317
|
-
* @docsKind primary
|
|
318
371
|
* @wcag AA
|
|
319
372
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/display/avatar-group/avatar-group.component.ts
|
|
320
|
-
* @since 0.
|
|
373
|
+
* @since 0.3.0
|
|
321
374
|
* @relatedTo CngxAvatar
|
|
375
|
+
* @axis level molecule
|
|
322
376
|
*/
|
|
323
377
|
declare class CngxAvatarGroup {
|
|
324
378
|
private readonly i18n;
|
|
@@ -359,14 +413,10 @@ declare class CngxAvatarGroup {
|
|
|
359
413
|
|
|
360
414
|
/**
|
|
361
415
|
* Color palette options for the badge.
|
|
362
|
-
*
|
|
363
|
-
* @category common/display
|
|
364
416
|
*/
|
|
365
417
|
type CngxBadgeColor = 'primary' | 'error' | 'warning' | 'neutral';
|
|
366
418
|
/**
|
|
367
419
|
* Positioning anchors relative to the host element.
|
|
368
|
-
*
|
|
369
|
-
* @category common/display
|
|
370
420
|
*/
|
|
371
421
|
type CngxBadgePosition = 'inline' | 'above-start' | 'above-end' | 'below-start' | 'below-end';
|
|
372
422
|
/**
|
|
@@ -379,15 +429,14 @@ type CngxBadgePosition = 'inline' | 'above-start' | 'above-end' | 'below-start'
|
|
|
379
429
|
* - String values (rendered verbatim)
|
|
380
430
|
* - Boolean `true` (dot mode, no text)
|
|
381
431
|
*
|
|
382
|
-
* @category common/display
|
|
383
|
-
* @docsKind primary
|
|
384
432
|
* @wcag AA
|
|
385
433
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/display/badge/badge.directive.ts
|
|
386
|
-
* @since 0.
|
|
434
|
+
* @since 0.3.0
|
|
387
435
|
* @relatedTo CngxAvatar, CngxIcon, CngxChip
|
|
388
|
-
* <example-url
|
|
389
|
-
* <example-url
|
|
390
|
-
* <example-url
|
|
436
|
+
* <example-url>/#/common/display/badge/colors-and-dot-mode</example-url>
|
|
437
|
+
* <example-url>/#/common/display/badge/counts-with-overflow</example-url>
|
|
438
|
+
* <example-url>/#/common/display/badge/inline-and-hidden</example-url>
|
|
439
|
+
* @axis level atom
|
|
391
440
|
*/
|
|
392
441
|
declare class CngxBadge {
|
|
393
442
|
/**
|
|
@@ -452,21 +501,20 @@ declare class CngxBadge {
|
|
|
452
501
|
* decides whether to write state directly or route through a commit
|
|
453
502
|
* flow. This keeps the chip usable from any level of the stack.
|
|
454
503
|
*
|
|
455
|
-
* @category common/display
|
|
456
|
-
* @docsKind primary
|
|
457
504
|
* @wcag AA
|
|
458
505
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/display/chip/chip.component.ts
|
|
459
|
-
* @since 0.
|
|
506
|
+
* @since 0.3.0
|
|
460
507
|
* @relatedTo CngxTag, CngxTagGroup, CngxBadge
|
|
461
|
-
* <example-url
|
|
462
|
-
* <example-url
|
|
463
|
-
* <example-url
|
|
464
|
-
* <example-url
|
|
465
|
-
* <example-url
|
|
466
|
-
* <example-url
|
|
467
|
-
* <example-url
|
|
468
|
-
* <example-url
|
|
469
|
-
* <example-url
|
|
508
|
+
* <example-url>/#/common/display/chip/basic</example-url>
|
|
509
|
+
* <example-url>/#/common/display/chip/removable</example-url>
|
|
510
|
+
* <example-url>/#/common/display/chip/color-palette</example-url>
|
|
511
|
+
* <example-url>/#/common/display/chip/custom-close-icon</example-url>
|
|
512
|
+
* <example-url>/#/common/interactive/chip/group/basic-pick-exactly-one-size</example-url>
|
|
513
|
+
* <example-url>/#/common/interactive/chip/interaction/basic-toggle-on-click-space-or-enter</example-url>
|
|
514
|
+
* <example-url>/#/common/interactive/chip/interaction/disabled-state</example-url>
|
|
515
|
+
* <example-url>/#/common/interactive/chip/interaction/removable-with-removerequest-on-backspace-delete</example-url>
|
|
516
|
+
* <example-url>/#/common/interactive/chip/multi-group/multi-select-chips-with-selection-count</example-url>
|
|
517
|
+
* @axis level atom
|
|
470
518
|
*/
|
|
471
519
|
declare class CngxChip {
|
|
472
520
|
private readonly i18n;
|
|
@@ -491,6 +539,20 @@ declare class CngxChip {
|
|
|
491
539
|
*/
|
|
492
540
|
readonly removeAriaLabel: _angular_core.InputSignal<string | undefined>;
|
|
493
541
|
protected readonly resolvedRemoveAriaLabel: _angular_core.Signal<string>;
|
|
542
|
+
/** @internal - default X glyph of the close button, from the shared icon set. */
|
|
543
|
+
protected readonly removeIcon: {
|
|
544
|
+
readonly viewBox: "0 0 24 24";
|
|
545
|
+
readonly d: "M6 6l12 12M18 6L6 18";
|
|
546
|
+
readonly paint: "stroke";
|
|
547
|
+
readonly micro: {
|
|
548
|
+
readonly viewBox: "0 0 12 12";
|
|
549
|
+
readonly d: "M2 3L3 2L10 9L9 10ZM9 2L10 3L3 10L2 9Z";
|
|
550
|
+
};
|
|
551
|
+
readonly small: {
|
|
552
|
+
readonly viewBox: "0 0 16 16";
|
|
553
|
+
readonly d: "M3 4L4 3L13 12L12 13ZM12 3L13 4L4 13L3 12Z";
|
|
554
|
+
};
|
|
555
|
+
};
|
|
494
556
|
/** Fires when the user clicks the close button. */
|
|
495
557
|
readonly remove: _angular_core.OutputEmitterRef<MouseEvent>;
|
|
496
558
|
private readonly autoId;
|
|
@@ -533,15 +595,14 @@ type StatusTone = 'success' | 'warning' | 'danger' | 'info' | 'neutral';
|
|
|
533
595
|
* visible `label`: without the glyph, colour is the dot's only signal, which a
|
|
534
596
|
* sighted colour-blind reader cannot resolve (a dev-mode warning enforces this).
|
|
535
597
|
*
|
|
536
|
-
* @category common/display
|
|
537
|
-
* @docsKind primary
|
|
538
598
|
* @wcag AA
|
|
539
599
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/display/status/status.component.ts
|
|
540
|
-
* @since 0.
|
|
600
|
+
* @since 0.3.0
|
|
541
601
|
* @relatedTo CngxBadge, CngxTag, CngxChip
|
|
542
602
|
*
|
|
543
|
-
* <example-url
|
|
544
|
-
* <example-url
|
|
603
|
+
* <example-url>/#/common/display/status/tone-matrix</example-url>
|
|
604
|
+
* <example-url>/#/common/display/status/dot-only</example-url>
|
|
605
|
+
* @axis level atom
|
|
545
606
|
*/
|
|
546
607
|
declare class CngxStatus {
|
|
547
608
|
private readonly elRef;
|
|
@@ -560,8 +621,8 @@ declare class CngxStatus {
|
|
|
560
621
|
* since colour alone fails a sighted colour-blind reader (Pillar 2).
|
|
561
622
|
*/
|
|
562
623
|
readonly glyph: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
563
|
-
/** @internal Tone glyph
|
|
564
|
-
protected readonly
|
|
624
|
+
/** @internal Tone glyph drawn into the decorative dot. */
|
|
625
|
+
protected readonly toneIcon: _angular_core.Signal<CngxIconData>;
|
|
565
626
|
constructor();
|
|
566
627
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxStatus, never>;
|
|
567
628
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxStatus, "cngx-status", never, { "tone": { "alias": "tone"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "live": { "alias": "live"; "required": false; "isSignal": true; }; "glyph": { "alias": "glyph"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
@@ -576,12 +637,12 @@ declare class CngxStatus {
|
|
|
576
637
|
* Presentational by design (see {@link CngxMeta}): it is not a semantic list.
|
|
577
638
|
* Tune the spacing / colour through the `--cngx-meta-list-*` custom properties.
|
|
578
639
|
*
|
|
579
|
-
* @category common/display
|
|
580
640
|
* @wcag AA
|
|
581
641
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/display/meta/meta-list.component.ts
|
|
582
|
-
* @since 0.
|
|
642
|
+
* @since 0.3.0
|
|
583
643
|
* @relatedTo CngxMeta
|
|
584
|
-
* <example-url
|
|
644
|
+
* <example-url>/#/common/display/meta/metadata-line</example-url>
|
|
645
|
+
* @axis level atom
|
|
585
646
|
*/
|
|
586
647
|
declare class CngxMetaList {
|
|
587
648
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxMetaList, never>;
|
|
@@ -598,12 +659,11 @@ declare class CngxMetaList {
|
|
|
598
659
|
* need real term/description semantics for a longer or more structured block,
|
|
599
660
|
* reach for a definition list instead - `CngxMeta` deliberately stays flat.
|
|
600
661
|
*
|
|
601
|
-
* @category common/display
|
|
602
662
|
* @wcag AA
|
|
603
663
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/display/meta/meta.component.ts
|
|
604
|
-
* @since 0.
|
|
664
|
+
* @since 0.3.0
|
|
605
665
|
* @relatedTo CngxMetaList
|
|
606
|
-
* <example-url
|
|
666
|
+
* <example-url>/#/common/display/meta/metadata-line</example-url>
|
|
607
667
|
*/
|
|
608
668
|
declare class CngxMeta {
|
|
609
669
|
/** The metadata key. Rendered bold before the value; omit for a value-only item. */
|
|
@@ -616,9 +676,8 @@ declare class CngxMeta {
|
|
|
616
676
|
* Presentational checkbox / checkmark indicator.
|
|
617
677
|
*
|
|
618
678
|
* **Why this exists.**
|
|
619
|
-
* Across the library, "is this row selected?" shows up as a
|
|
620
|
-
*
|
|
621
|
-
* a future grid/tree cell will want a checkbox with indeterminate state, and
|
|
679
|
+
* Across the library, "is this row selected?" shows up as a check mark
|
|
680
|
+
* in the forms/select panel, a future grid/tree cell will want a checkbox with indeterminate state, and
|
|
622
681
|
* `ng decompose cngx-*` schematics should emit a consistent indicator shape
|
|
623
682
|
* regardless of which list-like component they originated from. This atom
|
|
624
683
|
* unifies all three surfaces behind a single presentational molecule -
|
|
@@ -640,16 +699,15 @@ declare class CngxMeta {
|
|
|
640
699
|
* truth about "selected" is communicated by the row's own `aria-selected`
|
|
641
700
|
* / `role="option"` ARIA, not by this decoration.
|
|
642
701
|
*
|
|
643
|
-
* @category common/display
|
|
644
|
-
* @docsKind primary
|
|
645
702
|
* @wcag AA
|
|
646
703
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/display/checkbox-indicator/checkbox-indicator.component.ts
|
|
647
|
-
* @since 0.
|
|
704
|
+
* @since 0.3.0
|
|
648
705
|
* @relatedTo CngxRadioIndicator, CngxIcon
|
|
649
|
-
* <example-url
|
|
650
|
-
* <example-url
|
|
651
|
-
* <example-url
|
|
652
|
-
* <example-url
|
|
706
|
+
* <example-url>/#/common/display/checkbox-indicator/states</example-url>
|
|
707
|
+
* <example-url>/#/common/display/checkbox-indicator/variant-matrix</example-url>
|
|
708
|
+
* <example-url>/#/common/display/checkbox-indicator/sizes</example-url>
|
|
709
|
+
* <example-url>/#/common/display/checkbox-indicator/custom-glyph</example-url>
|
|
710
|
+
* @axis level atom
|
|
653
711
|
*/
|
|
654
712
|
declare class CngxCheckboxIndicator {
|
|
655
713
|
/**
|
|
@@ -676,8 +734,8 @@ declare class CngxCheckboxIndicator {
|
|
|
676
734
|
readonly size: _angular_core.InputSignal<"sm" | "md" | "lg">;
|
|
677
735
|
/**
|
|
678
736
|
* Consumer-supplied template for the check glyph. When `null` (default),
|
|
679
|
-
* the built-in `<span class="cngx-checkbox-indicator__check"
|
|
680
|
-
* is rendered. When set, the consumer template replaces the glyph span
|
|
737
|
+
* the built-in `<span class="cngx-checkbox-indicator__check">` with the
|
|
738
|
+
* default check svg is rendered. When set, the consumer template replaces the glyph span
|
|
681
739
|
* entirely - the `__check` class is NOT applied to the custom content
|
|
682
740
|
* (consumers own the styling of their replacement).
|
|
683
741
|
*
|
|
@@ -690,15 +748,68 @@ declare class CngxCheckboxIndicator {
|
|
|
690
748
|
/**
|
|
691
749
|
* Consumer-supplied template for the indeterminate dash glyph. Mirrors
|
|
692
750
|
* {@link checkGlyph} - defaults to the built-in
|
|
693
|
-
* `<span class="cngx-checkbox-indicator__dash"
|
|
751
|
+
* `<span class="cngx-checkbox-indicator__dash">` with the default minus svg.
|
|
694
752
|
*/
|
|
695
753
|
readonly dashGlyph: _angular_core.InputSignal<TemplateRef<void> | null>;
|
|
754
|
+
protected readonly checkIcon: {
|
|
755
|
+
readonly viewBox: "0 0 24 24";
|
|
756
|
+
readonly d: "M5 12.5l4.5 4.5L19 7";
|
|
757
|
+
readonly paint: "stroke";
|
|
758
|
+
readonly micro: {
|
|
759
|
+
readonly viewBox: "0 0 12 12";
|
|
760
|
+
readonly d: "M1 6L2 5L5 8L10 3L11 4L5 10Z";
|
|
761
|
+
};
|
|
762
|
+
readonly small: null;
|
|
763
|
+
};
|
|
764
|
+
protected readonly dashIcon: {
|
|
765
|
+
readonly viewBox: "0 0 24 24";
|
|
766
|
+
readonly d: "M5 12h14";
|
|
767
|
+
readonly paint: "stroke";
|
|
768
|
+
readonly micro: {
|
|
769
|
+
readonly viewBox: "0 0 12 12";
|
|
770
|
+
readonly d: "M3 5H9V7H3Z";
|
|
771
|
+
};
|
|
772
|
+
readonly small: {
|
|
773
|
+
readonly viewBox: "0 0 16 16";
|
|
774
|
+
readonly d: "M3 7H13V8H3Z";
|
|
775
|
+
};
|
|
776
|
+
};
|
|
696
777
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxCheckboxIndicator, never>;
|
|
697
778
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxCheckboxIndicator, "cngx-checkbox-indicator", ["cngxCheckboxIndicator"], { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "checked": { "alias": "checked"; "required": false; "isSignal": true; }; "indeterminate": { "alias": "indeterminate"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "checkGlyph": { "alias": "checkGlyph"; "required": false; "isSignal": true; }; "dashGlyph": { "alias": "dashGlyph"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
698
779
|
}
|
|
699
780
|
|
|
781
|
+
/**
|
|
782
|
+
* Visual skin of `CngxRadioIndicator`. `'default'` is the hairline ring
|
|
783
|
+
* with a primary dot; `'check'` fills the checked disc with the primary
|
|
784
|
+
* colour and strokes the shared check glyph on it (the card / tile
|
|
785
|
+
* skin); `'tinted'` fills the checked disc with a soft primary tint
|
|
786
|
+
* behind a primary ring and a smaller primary dot.
|
|
787
|
+
*
|
|
788
|
+
* All three draw the same ring geometry, so swapping skins never moves
|
|
789
|
+
* the indicator's box or its centre.
|
|
790
|
+
*/
|
|
791
|
+
type CngxRadioSkin = 'default' | 'check' | 'tinted';
|
|
792
|
+
/**
|
|
793
|
+
* App-wide cascade for the radio indicator skin.
|
|
794
|
+
*
|
|
795
|
+
* Resolution priority (high → low):
|
|
796
|
+
* 1. `[skin]` on `cngx-radio-indicator` (or on `cngx-radio`, which
|
|
797
|
+
* falls back to its `cngx-radio-group`'s `[skin]`).
|
|
798
|
+
* 2. `provideRadioConfigAt(...)` in a parent component's
|
|
799
|
+
* `viewProviders` (component-scoped override).
|
|
800
|
+
* 3. `provideRadioConfig(...)` at the application root.
|
|
801
|
+
* 4. Library defaults (`skin: 'default'`).
|
|
802
|
+
*/
|
|
803
|
+
interface CngxRadioConfig {
|
|
804
|
+
/** Skin applied when no instance or group `[skin]` binding wins. */
|
|
805
|
+
readonly skin?: CngxRadioSkin;
|
|
806
|
+
}
|
|
807
|
+
|
|
700
808
|
/**
|
|
701
809
|
* Presentational radio indicator - circle with a centred dot when checked.
|
|
810
|
+
* Ring and dot are two circles in one 24x24 SVG, so the dot shares the
|
|
811
|
+
* ring's coordinate system and stays centred at every size and device
|
|
812
|
+
* pixel ratio.
|
|
702
813
|
*
|
|
703
814
|
* **Why this exists.**
|
|
704
815
|
* The library's `@cngx/forms/select` panel currently composes
|
|
@@ -714,7 +825,8 @@ declare class CngxCheckboxIndicator {
|
|
|
714
825
|
* land in their own phase.
|
|
715
826
|
*
|
|
716
827
|
* **Responsibilities (intentionally narrow).**
|
|
717
|
-
* - Render a circle frame and
|
|
828
|
+
* - Render a circle frame and a centred dot that scales in when `checked`
|
|
829
|
+
* is true (always in the DOM, so the change transitions both ways).
|
|
718
830
|
* - Express checked / disabled visual state via host classes the
|
|
719
831
|
* consumer (or upstream CSS) can theme.
|
|
720
832
|
* - Apply size presets (`sm` / `md` / `lg`) as CSS-custom-property
|
|
@@ -731,34 +843,60 @@ declare class CngxCheckboxIndicator {
|
|
|
731
843
|
* Selection is announced via the row's `role="radio"` /
|
|
732
844
|
* `aria-checked` ARIA, never by this decoration.
|
|
733
845
|
*
|
|
734
|
-
* @category common/display
|
|
735
|
-
* @docsKind primary
|
|
736
846
|
* @wcag AA
|
|
737
847
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/display/radio-indicator/radio-indicator.component.ts
|
|
738
|
-
* @since 0.
|
|
848
|
+
* @since 0.3.0
|
|
739
849
|
* @relatedTo CngxCheckboxIndicator, CngxIcon
|
|
740
|
-
* <example-url
|
|
741
|
-
* <example-url
|
|
742
|
-
* <example-url
|
|
743
|
-
* <example-url
|
|
744
|
-
* <example-url
|
|
850
|
+
* <example-url>/#/common/display/radio-indicator/custom-dotglyph</example-url>
|
|
851
|
+
* <example-url>/#/common/display/radio-indicator/default-unchecked-vs-checked</example-url>
|
|
852
|
+
* <example-url>/#/common/display/radio-indicator/disabled</example-url>
|
|
853
|
+
* <example-url>/#/common/display/radio-indicator/sizes</example-url>
|
|
854
|
+
* <example-url>/#/common/display/radio-indicator/skins</example-url>
|
|
855
|
+
* <example-url>/#/common/display/radio-indicator/theming-via-css-custom-properties</example-url>
|
|
856
|
+
* <example-url>/#/common/interactive/radio/group-skin</example-url>
|
|
857
|
+
* <example-url>/#/forms/select/single-select/selection-indicator-variant-radio-check-skin</example-url>
|
|
858
|
+
* @axis level atom
|
|
745
859
|
*/
|
|
746
860
|
declare class CngxRadioIndicator {
|
|
747
861
|
/** Whether the current value is selected. */
|
|
748
862
|
readonly checked: _angular_core.InputSignal<boolean>;
|
|
749
863
|
/**
|
|
750
|
-
* Disabled visual state. Purely cosmetic (
|
|
864
|
+
* Disabled visual state. Purely cosmetic (disabled text colour) - the indicator
|
|
751
865
|
* never intercepts events, so this is a hint, not a block.
|
|
752
866
|
*/
|
|
753
867
|
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
754
868
|
/** Size preset. Maps to a `--cngx-radio-indicator-size` custom property. */
|
|
755
869
|
readonly size: _angular_core.InputSignal<"sm" | "md" | "lg">;
|
|
870
|
+
/**
|
|
871
|
+
* Visual skin. `undefined` (default) falls back to the `CNGX_RADIO_CONFIG`
|
|
872
|
+
* cascade (`provideRadioConfigAt` / `provideRadioConfig`), then to
|
|
873
|
+
* `'default'`. `cngx-radio` binds this from its own or its group's
|
|
874
|
+
* `[skin]`. Reflected as `[data-skin]` on the host.
|
|
875
|
+
*/
|
|
876
|
+
readonly skin: _angular_core.InputSignal<CngxRadioSkin | undefined>;
|
|
877
|
+
private readonly config;
|
|
878
|
+
protected readonly resolvedSkin: _angular_core.Signal<CngxRadioSkin>;
|
|
879
|
+
protected readonly checkIcon: {
|
|
880
|
+
readonly viewBox: "0 0 24 24";
|
|
881
|
+
readonly d: "M5 12.5l4.5 4.5L19 7";
|
|
882
|
+
readonly paint: "stroke";
|
|
883
|
+
readonly micro: {
|
|
884
|
+
readonly viewBox: "0 0 12 12";
|
|
885
|
+
readonly d: "M1 6L2 5L5 8L10 3L11 4L5 10Z";
|
|
886
|
+
};
|
|
887
|
+
readonly small: null;
|
|
888
|
+
};
|
|
756
889
|
/**
|
|
757
890
|
* Consumer-supplied template for the centred dot. When `null` (default),
|
|
758
|
-
* the built-in `<
|
|
759
|
-
* rendered
|
|
760
|
-
*
|
|
761
|
-
*
|
|
891
|
+
* the built-in SVG `<circle class="cngx-radio-indicator__dot">` is
|
|
892
|
+
* rendered (the `__mark` check path under the `check` skin). When set,
|
|
893
|
+
* neither is rendered; the consumer
|
|
894
|
+
* template renders only while `checked` is true, inside a
|
|
895
|
+
* `<span class="cngx-radio-indicator__glyph">` stacked over the SVG ring
|
|
896
|
+
* and centred in the same box. The `__dot` class is NOT applied to the
|
|
897
|
+
* custom content (consumers own the styling of their replacement). The
|
|
898
|
+
* wrapper's `color` is the checked colour (the mark colour under the
|
|
899
|
+
* `check` skin), so a `currentColor` glyph paints like the built-in dot.
|
|
762
900
|
*
|
|
763
901
|
* Convention-compatible with `CngxCheckboxIndicator.checkGlyph`: pass a
|
|
764
902
|
* `TemplateRef<void>` obtained via `#myDotTpl`. Useful for
|
|
@@ -767,9 +905,106 @@ declare class CngxRadioIndicator {
|
|
|
767
905
|
*/
|
|
768
906
|
readonly dotGlyph: _angular_core.InputSignal<TemplateRef<void> | null>;
|
|
769
907
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxRadioIndicator, never>;
|
|
770
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxRadioIndicator, "cngx-radio-indicator", ["cngxRadioIndicator"], { "checked": { "alias": "checked"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "dotGlyph": { "alias": "dotGlyph"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
908
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxRadioIndicator, "cngx-radio-indicator", ["cngxRadioIndicator"], { "checked": { "alias": "checked"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "skin": { "alias": "skin"; "required": false; "isSignal": true; }; "dotGlyph": { "alias": "dotGlyph"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
771
909
|
}
|
|
772
910
|
|
|
911
|
+
/**
|
|
912
|
+
* App-wide configuration cascade for the radio indicator. Resolves in
|
|
913
|
+
* priority order:
|
|
914
|
+
*
|
|
915
|
+
* 1. Per-instance `[skin]` binding (indicator, radio or group).
|
|
916
|
+
* 2. `provideRadioConfigAt(...)` in a parent component's `viewProviders`.
|
|
917
|
+
* 3. `provideRadioConfig(...)` at the application root.
|
|
918
|
+
* 4. Library defaults (this token's `factory`).
|
|
919
|
+
*
|
|
920
|
+
* `providedIn: 'root'` with a default factory means consumers never
|
|
921
|
+
* need to provide the token explicitly - `inject(CNGX_RADIO_CONFIG)`
|
|
922
|
+
* always resolves. Lives in `@cngx/common/display` next to the
|
|
923
|
+
* indicator, so it reaches every `cngx-radio-indicator`, including the
|
|
924
|
+
* ones a select panel renders for its radio variant.
|
|
925
|
+
*
|
|
926
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/display/radio-indicator/config/radio.config.defaults.ts
|
|
927
|
+
* @since 0.3.0
|
|
928
|
+
*/
|
|
929
|
+
declare const CNGX_RADIO_CONFIG: InjectionToken<CngxRadioConfig>;
|
|
930
|
+
|
|
931
|
+
/**
|
|
932
|
+
* Discriminated-union shape returned by `withRadioSkin`. The reducer in
|
|
933
|
+
* `provideRadioConfig` / `provideRadioConfigAt` matches on `kind` and
|
|
934
|
+
* writes `payload` into the corresponding config key. Same `kind` /
|
|
935
|
+
* `payload` shape as `CngxTagConfigFeature`; a second feature turns it
|
|
936
|
+
* into a union.
|
|
937
|
+
*/
|
|
938
|
+
interface CngxRadioConfigFeature {
|
|
939
|
+
readonly kind: 'skin';
|
|
940
|
+
readonly payload: CngxRadioSkin;
|
|
941
|
+
}
|
|
942
|
+
/**
|
|
943
|
+
* Application-root configuration cascade for the radio indicator. Pass
|
|
944
|
+
* `withRadioSkin(...)` in `bootstrapApplication`'s providers array.
|
|
945
|
+
*
|
|
946
|
+
* Resolution priority (high → low):
|
|
947
|
+
* 1. Per-instance `[skin]` binding (indicator, radio or group).
|
|
948
|
+
* 2. `provideRadioConfigAt(...)` in a parent component's
|
|
949
|
+
* `viewProviders`.
|
|
950
|
+
* 3. `provideRadioConfig(...)` at the application root.
|
|
951
|
+
* 4. Library defaults (`CNGX_RADIO_DEFAULTS`).
|
|
952
|
+
*
|
|
953
|
+
* ```ts
|
|
954
|
+
* bootstrapApplication(AppComponent, {
|
|
955
|
+
* providers: [provideRadioConfig(withRadioSkin('tinted'))],
|
|
956
|
+
* });
|
|
957
|
+
* ```
|
|
958
|
+
*/
|
|
959
|
+
declare function provideRadioConfig(...features: CngxRadioConfigFeature[]): EnvironmentProviders;
|
|
960
|
+
/**
|
|
961
|
+
* Component-scoped configuration cascade for the radio indicator. Pass
|
|
962
|
+
* `withRadioSkin(...)` in a parent component's `viewProviders` array.
|
|
963
|
+
*
|
|
964
|
+
* Injects the parent injector's `CNGX_RADIO_CONFIG` value (root
|
|
965
|
+
* provider, library defaults, or another `provideRadioConfigAt` further
|
|
966
|
+
* up) and merges the supplied features on top, so descendant indicators
|
|
967
|
+
* see the merged config and sibling sub-trees keep the inherited value.
|
|
968
|
+
*
|
|
969
|
+
* ```ts
|
|
970
|
+
* @Component({
|
|
971
|
+
* selector: 'plan-picker',
|
|
972
|
+
* viewProviders: [provideRadioConfigAt(withRadioSkin('check'))],
|
|
973
|
+
* template: '<cngx-radio-group [(value)]="plan">...</cngx-radio-group>',
|
|
974
|
+
* })
|
|
975
|
+
* class PlanPicker {}
|
|
976
|
+
* ```
|
|
977
|
+
*/
|
|
978
|
+
declare function provideRadioConfigAt(...features: CngxRadioConfigFeature[]): Provider[];
|
|
979
|
+
|
|
980
|
+
/**
|
|
981
|
+
* Convenience accessor for the radio indicator configuration cascade.
|
|
982
|
+
* Runs in injection context; resolves through the priority chain
|
|
983
|
+
* (`provideRadioConfigAt` → `provideRadioConfig` → library defaults).
|
|
984
|
+
*
|
|
985
|
+
* Equivalent to `inject(CNGX_RADIO_CONFIG)` - the helper exists so
|
|
986
|
+
* consumers don't need to import the token directly. Mirrors
|
|
987
|
+
* `injectTagConfig`.
|
|
988
|
+
*
|
|
989
|
+
* ```ts
|
|
990
|
+
* export class MyChoiceCard {
|
|
991
|
+
* private readonly radioConfig = injectRadioConfig();
|
|
992
|
+
* protected readonly skin = computed(() => this.radioConfig.skin ?? 'default');
|
|
993
|
+
* }
|
|
994
|
+
* ```
|
|
995
|
+
*/
|
|
996
|
+
declare function injectRadioConfig(): CngxRadioConfig;
|
|
997
|
+
|
|
998
|
+
/**
|
|
999
|
+
* Set the skin every `cngx-radio-indicator` in scope falls back to.
|
|
1000
|
+
* An instance or group `[skin]` binding still wins.
|
|
1001
|
+
*
|
|
1002
|
+
* ```ts
|
|
1003
|
+
* provideRadioConfig(withRadioSkin('check'));
|
|
1004
|
+
* ```
|
|
1005
|
+
*/
|
|
1006
|
+
declare function withRadioSkin(skin: CngxRadioSkin): CngxRadioConfigFeature;
|
|
1007
|
+
|
|
773
1008
|
/**
|
|
774
1009
|
* Locale-aware `<time>` display atom. Renders a machine-readable
|
|
775
1010
|
* `datetime` attribute (ISO 8601) plus a human string in one of two modes:
|
|
@@ -789,12 +1024,11 @@ declare class CngxRadioIndicator {
|
|
|
789
1024
|
* <cngx-time [date]="invoice.due" [format]="{ dateStyle: 'long' }" />
|
|
790
1025
|
* ```
|
|
791
1026
|
*
|
|
792
|
-
* @category common/display
|
|
793
|
-
* @docsKind primary
|
|
794
1027
|
* @wcag AA
|
|
795
1028
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/display/time/time.component.ts
|
|
796
|
-
* @since 0.
|
|
1029
|
+
* @since 0.3.0
|
|
797
1030
|
* @relatedTo CngxCardTimestamp
|
|
1031
|
+
* @axis level atom
|
|
798
1032
|
*/
|
|
799
1033
|
declare class CngxTime {
|
|
800
1034
|
private readonly locale;
|
|
@@ -853,13 +1087,12 @@ declare class CngxTime {
|
|
|
853
1087
|
* <cngx-password-strength-meter [score]="pw.score()" />
|
|
854
1088
|
* ```
|
|
855
1089
|
*
|
|
856
|
-
* @category common/display
|
|
857
|
-
* @docsKind primary
|
|
858
1090
|
* @wcag AA
|
|
859
1091
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/display/password-strength-meter/password-strength-meter.component.ts
|
|
860
|
-
* @since 0.
|
|
1092
|
+
* @since 0.3.0
|
|
861
1093
|
* @relatedTo CngxSegmentedProgress, CngxBadge
|
|
862
|
-
* <example-url
|
|
1094
|
+
* <example-url>/#/common/display/password-strength-meter/strength-levels</example-url>
|
|
1095
|
+
* @axis level atom
|
|
863
1096
|
*/
|
|
864
1097
|
declare class CngxPasswordStrengthMeter {
|
|
865
1098
|
/** Strength score, 0 (empty/trivial) to 4 (strong). */
|
|
@@ -895,23 +1128,22 @@ declare class CngxPasswordStrengthMeter {
|
|
|
895
1128
|
* </span>
|
|
896
1129
|
* ```
|
|
897
1130
|
*
|
|
898
|
-
* @category common/display
|
|
899
1131
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/display/tag/slots/tag-label.directive.ts
|
|
900
|
-
* @since 0.
|
|
1132
|
+
* @since 0.3.0
|
|
901
1133
|
* @relatedTo CngxTag, CngxTagPrefix, CngxTagSuffix
|
|
902
|
-
* <example-url
|
|
903
|
-
* <example-url
|
|
904
|
-
* <example-url
|
|
905
|
-
* <example-url
|
|
906
|
-
* <example-url
|
|
907
|
-
* <example-url
|
|
908
|
-
* <example-url
|
|
909
|
-
* <example-url
|
|
910
|
-
* <example-url
|
|
911
|
-
* <example-url
|
|
912
|
-
* <example-url
|
|
913
|
-
* <example-url
|
|
914
|
-
* <example-url
|
|
1134
|
+
* <example-url>/#/common/display/tag/app-wide-defaults-via-providetagconfig</example-url>
|
|
1135
|
+
* <example-url>/#/common/display/tag/color-palette</example-url>
|
|
1136
|
+
* <example-url>/#/common/display/tag/composition-with-cngxicon</example-url>
|
|
1137
|
+
* <example-url>/#/common/display/tag/density</example-url>
|
|
1138
|
+
* <example-url>/#/common/display/tag/group-semantic-list</example-url>
|
|
1139
|
+
* <example-url>/#/common/display/tag/group-with-header-accessory</example-url>
|
|
1140
|
+
* <example-url>/#/common/display/tag/layout-only-alignment</example-url>
|
|
1141
|
+
* <example-url>/#/common/display/tag/layout-only-gap-variants</example-url>
|
|
1142
|
+
* <example-url>/#/common/display/tag/link-mode</example-url>
|
|
1143
|
+
* <example-url>/#/common/display/tag/slot-overrides-custom-label</example-url>
|
|
1144
|
+
* <example-url>/#/common/display/tag/slot-overrides-prefix-label-suffix</example-url>
|
|
1145
|
+
* <example-url>/#/common/display/tag/truncate-maxwidth</example-url>
|
|
1146
|
+
* <example-url>/#/common/display/tag/variant-matrix</example-url>
|
|
915
1147
|
*/
|
|
916
1148
|
declare class CngxTagLabel {
|
|
917
1149
|
readonly templateRef: TemplateRef<_cngx_common_display.CngxTagSlotContext>;
|
|
@@ -936,23 +1168,22 @@ declare class CngxTagLabel {
|
|
|
936
1168
|
* </span>
|
|
937
1169
|
* ```
|
|
938
1170
|
*
|
|
939
|
-
* @category common/display
|
|
940
1171
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/display/tag/slots/tag-prefix.directive.ts
|
|
941
|
-
* @since 0.
|
|
1172
|
+
* @since 0.3.0
|
|
942
1173
|
* @relatedTo CngxTag, CngxTagLabel, CngxTagSuffix
|
|
943
|
-
* <example-url
|
|
944
|
-
* <example-url
|
|
945
|
-
* <example-url
|
|
946
|
-
* <example-url
|
|
947
|
-
* <example-url
|
|
948
|
-
* <example-url
|
|
949
|
-
* <example-url
|
|
950
|
-
* <example-url
|
|
951
|
-
* <example-url
|
|
952
|
-
* <example-url
|
|
953
|
-
* <example-url
|
|
954
|
-
* <example-url
|
|
955
|
-
* <example-url
|
|
1174
|
+
* <example-url>/#/common/display/tag/app-wide-defaults-via-providetagconfig</example-url>
|
|
1175
|
+
* <example-url>/#/common/display/tag/color-palette</example-url>
|
|
1176
|
+
* <example-url>/#/common/display/tag/composition-with-cngxicon</example-url>
|
|
1177
|
+
* <example-url>/#/common/display/tag/density</example-url>
|
|
1178
|
+
* <example-url>/#/common/display/tag/group-semantic-list</example-url>
|
|
1179
|
+
* <example-url>/#/common/display/tag/group-with-header-accessory</example-url>
|
|
1180
|
+
* <example-url>/#/common/display/tag/layout-only-alignment</example-url>
|
|
1181
|
+
* <example-url>/#/common/display/tag/layout-only-gap-variants</example-url>
|
|
1182
|
+
* <example-url>/#/common/display/tag/link-mode</example-url>
|
|
1183
|
+
* <example-url>/#/common/display/tag/slot-overrides-custom-label</example-url>
|
|
1184
|
+
* <example-url>/#/common/display/tag/slot-overrides-prefix-label-suffix</example-url>
|
|
1185
|
+
* <example-url>/#/common/display/tag/truncate-maxwidth</example-url>
|
|
1186
|
+
* <example-url>/#/common/display/tag/variant-matrix</example-url>
|
|
956
1187
|
*/
|
|
957
1188
|
declare class CngxTagPrefix {
|
|
958
1189
|
readonly templateRef: TemplateRef<_cngx_common_display.CngxTagSlotContext>;
|
|
@@ -979,23 +1210,22 @@ declare class CngxTagPrefix {
|
|
|
979
1210
|
* </span>
|
|
980
1211
|
* ```
|
|
981
1212
|
*
|
|
982
|
-
* @category common/display
|
|
983
1213
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/display/tag/slots/tag-suffix.directive.ts
|
|
984
|
-
* @since 0.
|
|
1214
|
+
* @since 0.3.0
|
|
985
1215
|
* @relatedTo CngxTag, CngxTagLabel, CngxTagPrefix
|
|
986
|
-
* <example-url
|
|
987
|
-
* <example-url
|
|
988
|
-
* <example-url
|
|
989
|
-
* <example-url
|
|
990
|
-
* <example-url
|
|
991
|
-
* <example-url
|
|
992
|
-
* <example-url
|
|
993
|
-
* <example-url
|
|
994
|
-
* <example-url
|
|
995
|
-
* <example-url
|
|
996
|
-
* <example-url
|
|
997
|
-
* <example-url
|
|
998
|
-
* <example-url
|
|
1216
|
+
* <example-url>/#/common/display/tag/app-wide-defaults-via-providetagconfig</example-url>
|
|
1217
|
+
* <example-url>/#/common/display/tag/color-palette</example-url>
|
|
1218
|
+
* <example-url>/#/common/display/tag/composition-with-cngxicon</example-url>
|
|
1219
|
+
* <example-url>/#/common/display/tag/density</example-url>
|
|
1220
|
+
* <example-url>/#/common/display/tag/group-semantic-list</example-url>
|
|
1221
|
+
* <example-url>/#/common/display/tag/group-with-header-accessory</example-url>
|
|
1222
|
+
* <example-url>/#/common/display/tag/layout-only-alignment</example-url>
|
|
1223
|
+
* <example-url>/#/common/display/tag/layout-only-gap-variants</example-url>
|
|
1224
|
+
* <example-url>/#/common/display/tag/link-mode</example-url>
|
|
1225
|
+
* <example-url>/#/common/display/tag/slot-overrides-custom-label</example-url>
|
|
1226
|
+
* <example-url>/#/common/display/tag/slot-overrides-prefix-label-suffix</example-url>
|
|
1227
|
+
* <example-url>/#/common/display/tag/truncate-maxwidth</example-url>
|
|
1228
|
+
* <example-url>/#/common/display/tag/variant-matrix</example-url>
|
|
999
1229
|
*/
|
|
1000
1230
|
declare class CngxTagSuffix {
|
|
1001
1231
|
readonly templateRef: TemplateRef<_cngx_common_display.CngxTagSlotContext>;
|
|
@@ -1016,8 +1246,6 @@ declare class CngxTagSuffix {
|
|
|
1016
1246
|
* The per-slot names below alias this interface. A slot that grows its
|
|
1017
1247
|
* own field forks its alias back into an interface extending this one -
|
|
1018
1248
|
* sibling consumers stay source-compatible either way.
|
|
1019
|
-
*
|
|
1020
|
-
* @category common/display
|
|
1021
1249
|
*/
|
|
1022
1250
|
interface CngxTagSlotContext {
|
|
1023
1251
|
readonly $implicit: void;
|
|
@@ -1028,27 +1256,19 @@ interface CngxTagSlotContext {
|
|
|
1028
1256
|
}
|
|
1029
1257
|
/**
|
|
1030
1258
|
* Context of the `*cngxTagLabel` slot. Alias of {@link CngxTagSlotContext}.
|
|
1031
|
-
*
|
|
1032
|
-
* @category common/display
|
|
1033
1259
|
*/
|
|
1034
1260
|
type CngxTagLabelContext = CngxTagSlotContext;
|
|
1035
1261
|
/**
|
|
1036
1262
|
* Context of the `*cngxTagPrefix` slot. Alias of {@link CngxTagSlotContext}.
|
|
1037
|
-
*
|
|
1038
|
-
* @category common/display
|
|
1039
1263
|
*/
|
|
1040
1264
|
type CngxTagPrefixContext = CngxTagSlotContext;
|
|
1041
1265
|
/**
|
|
1042
1266
|
* Context of the `*cngxTagSuffix` slot. Alias of {@link CngxTagSlotContext}.
|
|
1043
|
-
*
|
|
1044
|
-
* @category common/display
|
|
1045
1267
|
*/
|
|
1046
1268
|
type CngxTagSuffixContext = CngxTagSlotContext;
|
|
1047
1269
|
|
|
1048
1270
|
/**
|
|
1049
1271
|
* Visual variant. `filled` is the default solid pill; `outline` swaps fill for border; `subtle` softens both.
|
|
1050
|
-
*
|
|
1051
|
-
* @category common/display
|
|
1052
1272
|
*/
|
|
1053
1273
|
type CngxTagVariant = 'filled' | 'outline' | 'subtle';
|
|
1054
1274
|
/**
|
|
@@ -1062,8 +1282,6 @@ type CngxTagVariant = 'filled' | 'outline' | 'subtle';
|
|
|
1062
1282
|
* styles against their own design tokens, or register the key via
|
|
1063
1283
|
* `withTagColors()` and let the directive emit the entry's
|
|
1064
1284
|
* `--cngx-tag-bg/-color/-border` values directly.
|
|
1065
|
-
*
|
|
1066
|
-
* @category common/display
|
|
1067
1285
|
*/
|
|
1068
1286
|
type CngxTagColor = 'neutral' | 'success' | 'warning' | 'error' | 'info' | (string & {});
|
|
1069
1287
|
/**
|
|
@@ -1072,8 +1290,6 @@ type CngxTagColor = 'neutral' | 'success' | 'warning' | 'error' | 'info' | (stri
|
|
|
1072
1290
|
* custom properties (see `tag.css`). Sizing of nested atoms
|
|
1073
1291
|
* (`cngx-icon`, `cngx-avatar`) is the consumer's call - Tag does not
|
|
1074
1292
|
* cascade a sub-token contract.
|
|
1075
|
-
*
|
|
1076
|
-
* @category common/display
|
|
1077
1293
|
*/
|
|
1078
1294
|
type CngxTagSize = 'sm' | 'md' | 'lg' | 'xl';
|
|
1079
1295
|
/**
|
|
@@ -1107,29 +1323,28 @@ type CngxTagSize = 'sm' | 'md' | 'lg' | 'xl';
|
|
|
1107
1323
|
* - Configuration cascade - deferred (see
|
|
1108
1324
|
* `display-accepted-debt.md §1`).
|
|
1109
1325
|
*
|
|
1110
|
-
* @category common/display
|
|
1111
|
-
* @docsKind primary
|
|
1112
1326
|
* @wcag AA
|
|
1113
1327
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/display/tag/tag.directive.ts
|
|
1114
1328
|
* @selector cngx-tag
|
|
1115
|
-
* @since 0.
|
|
1329
|
+
* @since 0.3.0
|
|
1116
1330
|
* @relatedTo CngxTagGroup, CngxChip, CngxBadge, CngxTagLabel
|
|
1117
1331
|
* @slot cngxTagLabel Replaces the tag's text body.
|
|
1118
1332
|
* @slot cngxTagPrefix Content before the label, typically an icon or swatch.
|
|
1119
1333
|
* @slot cngxTagSuffix Content after the label, typically a remove affordance.
|
|
1120
|
-
* <example-url
|
|
1121
|
-
* <example-url
|
|
1122
|
-
* <example-url
|
|
1123
|
-
* <example-url
|
|
1124
|
-
* <example-url
|
|
1125
|
-
* <example-url
|
|
1126
|
-
* <example-url
|
|
1127
|
-
* <example-url
|
|
1128
|
-
* <example-url
|
|
1129
|
-
* <example-url
|
|
1130
|
-
* <example-url
|
|
1131
|
-
* <example-url
|
|
1132
|
-
* <example-url
|
|
1334
|
+
* <example-url>/#/common/display/tag/app-wide-defaults-via-providetagconfig</example-url>
|
|
1335
|
+
* <example-url>/#/common/display/tag/color-palette</example-url>
|
|
1336
|
+
* <example-url>/#/common/display/tag/composition-with-cngxicon</example-url>
|
|
1337
|
+
* <example-url>/#/common/display/tag/density</example-url>
|
|
1338
|
+
* <example-url>/#/common/display/tag-group/semantic-list</example-url>
|
|
1339
|
+
* <example-url>/#/common/display/tag-group/with-header-accessory</example-url>
|
|
1340
|
+
* <example-url>/#/common/display/tag-group/alignment</example-url>
|
|
1341
|
+
* <example-url>/#/common/display/tag-group/gap-variants</example-url>
|
|
1342
|
+
* <example-url>/#/common/display/tag/link-mode</example-url>
|
|
1343
|
+
* <example-url>/#/common/display/tag/slot-overrides-custom-label</example-url>
|
|
1344
|
+
* <example-url>/#/common/display/tag/slot-overrides-prefix-label-suffix</example-url>
|
|
1345
|
+
* <example-url>/#/common/display/tag/truncate-maxwidth</example-url>
|
|
1346
|
+
* <example-url>/#/common/display/tag/variant-matrix</example-url>
|
|
1347
|
+
* @axis level molecule
|
|
1133
1348
|
*/
|
|
1134
1349
|
declare class CngxTag {
|
|
1135
1350
|
/**
|
|
@@ -1275,23 +1490,22 @@ declare class CngxTag {
|
|
|
1275
1490
|
* </cngx-tag-group>
|
|
1276
1491
|
* ```
|
|
1277
1492
|
*
|
|
1278
|
-
* @category common/display
|
|
1279
1493
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/display/tag-group/slots/tag-group-accessory.directive.ts
|
|
1280
|
-
* @since 0.
|
|
1494
|
+
* @since 0.3.0
|
|
1281
1495
|
* @relatedTo CngxTagGroup, CngxTagGroupHeader
|
|
1282
|
-
* <example-url
|
|
1283
|
-
* <example-url
|
|
1284
|
-
* <example-url
|
|
1285
|
-
* <example-url
|
|
1286
|
-
* <example-url
|
|
1287
|
-
* <example-url
|
|
1288
|
-
* <example-url
|
|
1289
|
-
* <example-url
|
|
1290
|
-
* <example-url
|
|
1291
|
-
* <example-url
|
|
1292
|
-
* <example-url
|
|
1293
|
-
* <example-url
|
|
1294
|
-
* <example-url
|
|
1496
|
+
* <example-url>/#/common/display/tag/app-wide-defaults-via-providetagconfig</example-url>
|
|
1497
|
+
* <example-url>/#/common/display/tag/color-palette</example-url>
|
|
1498
|
+
* <example-url>/#/common/display/tag/composition-with-cngxicon</example-url>
|
|
1499
|
+
* <example-url>/#/common/display/tag/density</example-url>
|
|
1500
|
+
* <example-url>/#/common/display/tag/group-semantic-list</example-url>
|
|
1501
|
+
* <example-url>/#/common/display/tag/group-with-header-accessory</example-url>
|
|
1502
|
+
* <example-url>/#/common/display/tag/layout-only-alignment</example-url>
|
|
1503
|
+
* <example-url>/#/common/display/tag/layout-only-gap-variants</example-url>
|
|
1504
|
+
* <example-url>/#/common/display/tag/link-mode</example-url>
|
|
1505
|
+
* <example-url>/#/common/display/tag/slot-overrides-custom-label</example-url>
|
|
1506
|
+
* <example-url>/#/common/display/tag/slot-overrides-prefix-label-suffix</example-url>
|
|
1507
|
+
* <example-url>/#/common/display/tag/truncate-maxwidth</example-url>
|
|
1508
|
+
* <example-url>/#/common/display/tag/variant-matrix</example-url>
|
|
1295
1509
|
*/
|
|
1296
1510
|
declare class CngxTagGroupAccessory {
|
|
1297
1511
|
readonly templateRef: TemplateRef<_cngx_common_display.CngxTagGroupSlotContext>;
|
|
@@ -1321,23 +1535,22 @@ declare class CngxTagGroupAccessory {
|
|
|
1321
1535
|
* </cngx-tag-group>
|
|
1322
1536
|
* ```
|
|
1323
1537
|
*
|
|
1324
|
-
* @category common/display
|
|
1325
1538
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/display/tag-group/slots/tag-group-header.directive.ts
|
|
1326
|
-
* @since 0.
|
|
1539
|
+
* @since 0.3.0
|
|
1327
1540
|
* @relatedTo CngxTagGroup, CngxTagGroupAccessory
|
|
1328
|
-
* <example-url
|
|
1329
|
-
* <example-url
|
|
1330
|
-
* <example-url
|
|
1331
|
-
* <example-url
|
|
1332
|
-
* <example-url
|
|
1333
|
-
* <example-url
|
|
1334
|
-
* <example-url
|
|
1335
|
-
* <example-url
|
|
1336
|
-
* <example-url
|
|
1337
|
-
* <example-url
|
|
1338
|
-
* <example-url
|
|
1339
|
-
* <example-url
|
|
1340
|
-
* <example-url
|
|
1541
|
+
* <example-url>/#/common/display/tag/app-wide-defaults-via-providetagconfig</example-url>
|
|
1542
|
+
* <example-url>/#/common/display/tag/color-palette</example-url>
|
|
1543
|
+
* <example-url>/#/common/display/tag/composition-with-cngxicon</example-url>
|
|
1544
|
+
* <example-url>/#/common/display/tag/density</example-url>
|
|
1545
|
+
* <example-url>/#/common/display/tag/group-semantic-list</example-url>
|
|
1546
|
+
* <example-url>/#/common/display/tag/group-with-header-accessory</example-url>
|
|
1547
|
+
* <example-url>/#/common/display/tag/layout-only-alignment</example-url>
|
|
1548
|
+
* <example-url>/#/common/display/tag/layout-only-gap-variants</example-url>
|
|
1549
|
+
* <example-url>/#/common/display/tag/link-mode</example-url>
|
|
1550
|
+
* <example-url>/#/common/display/tag/slot-overrides-custom-label</example-url>
|
|
1551
|
+
* <example-url>/#/common/display/tag/slot-overrides-prefix-label-suffix</example-url>
|
|
1552
|
+
* <example-url>/#/common/display/tag/truncate-maxwidth</example-url>
|
|
1553
|
+
* <example-url>/#/common/display/tag/variant-matrix</example-url>
|
|
1341
1554
|
*/
|
|
1342
1555
|
declare class CngxTagGroupHeader {
|
|
1343
1556
|
readonly templateRef: TemplateRef<_cngx_common_display.CngxTagGroupSlotContext>;
|
|
@@ -1359,8 +1572,6 @@ declare class CngxTagGroupHeader {
|
|
|
1359
1572
|
* own field (e.g. `position` on accessory) forks its alias back into an
|
|
1360
1573
|
* interface extending this one - sibling consumers stay
|
|
1361
1574
|
* source-compatible either way.
|
|
1362
|
-
*
|
|
1363
|
-
* @category common/display
|
|
1364
1575
|
*/
|
|
1365
1576
|
interface CngxTagGroupSlotContext {
|
|
1366
1577
|
readonly $implicit: void;
|
|
@@ -1373,15 +1584,11 @@ interface CngxTagGroupSlotContext {
|
|
|
1373
1584
|
/**
|
|
1374
1585
|
* Context of the `*cngxTagGroupHeader` slot. Alias of
|
|
1375
1586
|
* {@link CngxTagGroupSlotContext}.
|
|
1376
|
-
*
|
|
1377
|
-
* @category common/display
|
|
1378
1587
|
*/
|
|
1379
1588
|
type CngxTagGroupHeaderContext = CngxTagGroupSlotContext;
|
|
1380
1589
|
/**
|
|
1381
1590
|
* Context of the `*cngxTagGroupAccessory` slot. Alias of
|
|
1382
1591
|
* {@link CngxTagGroupSlotContext}.
|
|
1383
|
-
*
|
|
1384
|
-
* @category common/display
|
|
1385
1592
|
*/
|
|
1386
1593
|
type CngxTagGroupAccessoryContext = CngxTagGroupSlotContext;
|
|
1387
1594
|
|
|
@@ -1401,8 +1608,6 @@ type CngxTagGroupAccessoryContext = CngxTagGroupSlotContext;
|
|
|
1401
1608
|
* conversion is needed - and `.asReadonly()` does NOT exist on
|
|
1402
1609
|
* `InputSignal` (it lives on `WritableSignal` only); the type-only
|
|
1403
1610
|
* narrowing is the canonical bridge.
|
|
1404
|
-
*
|
|
1405
|
-
* @category common/display
|
|
1406
1611
|
*/
|
|
1407
1612
|
interface CngxTagGroupHost {
|
|
1408
1613
|
readonly semanticList: Signal<boolean>;
|
|
@@ -1420,10 +1625,9 @@ interface CngxTagGroupHost {
|
|
|
1420
1625
|
* Defaults to no provider - the token resolves to `null` for any
|
|
1421
1626
|
* `CngxTag` that lives outside a `CngxTagGroup`.
|
|
1422
1627
|
*
|
|
1423
|
-
* @category common/display
|
|
1424
1628
|
* @wcag AA
|
|
1425
1629
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/display/tag-group/tag-group.token.ts
|
|
1426
|
-
* @since 0.
|
|
1630
|
+
* @since 0.3.0
|
|
1427
1631
|
*/
|
|
1428
1632
|
declare const CNGX_TAG_GROUP: InjectionToken<CngxTagGroupHost>;
|
|
1429
1633
|
|
|
@@ -1436,8 +1640,6 @@ declare const CNGX_TAG_GROUP: InjectionToken<CngxTagGroupHost>;
|
|
|
1436
1640
|
* - `xs` → 0.25rem (tight chip strips)
|
|
1437
1641
|
* - `sm` → 0.5rem (default)
|
|
1438
1642
|
* - `md` → 0.75rem (roomy taxonomy clusters)
|
|
1439
|
-
*
|
|
1440
|
-
* @category common/display
|
|
1441
1643
|
*/
|
|
1442
1644
|
type CngxTagGroupGap = 'xs' | 'sm' | 'md';
|
|
1443
1645
|
/**
|
|
@@ -1451,8 +1653,6 @@ type CngxTagGroupGap = 'xs' | 'sm' | 'md';
|
|
|
1451
1653
|
*
|
|
1452
1654
|
* Only meaningful when the group has more horizontal room than its
|
|
1453
1655
|
* intrinsic content; otherwise the row hugs its tags.
|
|
1454
|
-
*
|
|
1455
|
-
* @category common/display
|
|
1456
1656
|
*/
|
|
1457
1657
|
type CngxTagGroupAlign = 'start' | 'center' | 'end' | 'between';
|
|
1458
1658
|
/**
|
|
@@ -1494,27 +1694,26 @@ type CngxTagGroupAlign = 'start' | 'center' | 'end' | 'between';
|
|
|
1494
1694
|
* - Configuration cascade (`provideTagConfig`) - deferred (see
|
|
1495
1695
|
* `display-accepted-debt.md §1`).
|
|
1496
1696
|
*
|
|
1497
|
-
* @category common/display
|
|
1498
|
-
* @docsKind primary
|
|
1499
1697
|
* @wcag AA
|
|
1500
1698
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/display/tag-group/tag-group.component.ts
|
|
1501
|
-
* @since 0.
|
|
1699
|
+
* @since 0.3.0
|
|
1502
1700
|
* @relatedTo CngxTag, CngxTagGroupHeader, CngxTagGroupAccessory, CNGX_TAG_GROUP
|
|
1503
1701
|
* @slot cngxTagGroupHeader Replaces the group's heading row.
|
|
1504
1702
|
* @slot cngxTagGroupAccessory Trailing control beside the header, e.g. a clear-all button.
|
|
1505
|
-
* <example-url
|
|
1506
|
-
* <example-url
|
|
1507
|
-
* <example-url
|
|
1508
|
-
* <example-url
|
|
1509
|
-
* <example-url
|
|
1510
|
-
* <example-url
|
|
1511
|
-
* <example-url
|
|
1512
|
-
* <example-url
|
|
1513
|
-
* <example-url
|
|
1514
|
-
* <example-url
|
|
1515
|
-
* <example-url
|
|
1516
|
-
* <example-url
|
|
1517
|
-
* <example-url
|
|
1703
|
+
* <example-url>/#/common/display/tag/app-wide-defaults-via-providetagconfig</example-url>
|
|
1704
|
+
* <example-url>/#/common/display/tag/color-palette</example-url>
|
|
1705
|
+
* <example-url>/#/common/display/tag/composition-with-cngxicon</example-url>
|
|
1706
|
+
* <example-url>/#/common/display/tag/density</example-url>
|
|
1707
|
+
* <example-url>/#/common/display/tag-group/semantic-list</example-url>
|
|
1708
|
+
* <example-url>/#/common/display/tag-group/with-header-accessory</example-url>
|
|
1709
|
+
* <example-url>/#/common/display/tag-group/alignment</example-url>
|
|
1710
|
+
* <example-url>/#/common/display/tag-group/gap-variants</example-url>
|
|
1711
|
+
* <example-url>/#/common/display/tag/link-mode</example-url>
|
|
1712
|
+
* <example-url>/#/common/display/tag/slot-overrides-custom-label</example-url>
|
|
1713
|
+
* <example-url>/#/common/display/tag/slot-overrides-prefix-label-suffix</example-url>
|
|
1714
|
+
* <example-url>/#/common/display/tag/truncate-maxwidth</example-url>
|
|
1715
|
+
* <example-url>/#/common/display/tag/variant-matrix</example-url>
|
|
1716
|
+
* @axis level molecule
|
|
1518
1717
|
*/
|
|
1519
1718
|
declare class CngxTagGroup implements CngxTagGroupHost {
|
|
1520
1719
|
/**
|
|
@@ -1539,17 +1738,14 @@ declare class CngxTagGroup implements CngxTagGroupHost {
|
|
|
1539
1738
|
*/
|
|
1540
1739
|
readonly label: _angular_core.InputSignal<string | undefined>;
|
|
1541
1740
|
/**
|
|
1542
|
-
*
|
|
1543
|
-
*
|
|
1544
|
-
*
|
|
1545
|
-
* `private` per NG1053; `protected` blocks external template
|
|
1546
|
-
* bindings). The hook is intentionally **not** the contract
|
|
1547
|
-
* surface - that role belongs to `semanticList` below, typed
|
|
1548
|
-
* `Signal<boolean>` so test doubles and programmatic
|
|
1549
|
-
* implementers of `CngxTagGroupHost` can satisfy the interface
|
|
1550
|
-
* without owning an Angular `input()`.
|
|
1741
|
+
* Whether the group exposes itself as a list (`role="list"`, with `role="listitem"` on each
|
|
1742
|
+
* projected tag), bound as `[semanticList]`. The default is the tag config's
|
|
1743
|
+
* `groupDefaults.semanticList`, or `false`, read once when the group is constructed.
|
|
1551
1744
|
*
|
|
1552
|
-
*
|
|
1745
|
+
* The field is class-public because Angular rejects `private` on an input (NG1053) and `protected`
|
|
1746
|
+
* blocks external template bindings. The host contract is the `semanticList` field below, typed
|
|
1747
|
+
* `Signal<boolean>` so test doubles and programmatic implementers of `CngxTagGroupHost` can satisfy
|
|
1748
|
+
* the interface without owning an Angular `input()`.
|
|
1553
1749
|
*/
|
|
1554
1750
|
readonly semanticListInput: _angular_core.InputSignal<boolean>;
|
|
1555
1751
|
/**
|
|
@@ -1627,8 +1823,6 @@ declare class CngxTagGroup implements CngxTagGroupHost {
|
|
|
1627
1823
|
* Every key is optional - partial overrides are deep-merged with
|
|
1628
1824
|
* the library defaults so consumers only declare the keys they want
|
|
1629
1825
|
* to override.
|
|
1630
|
-
*
|
|
1631
|
-
* @category common/display
|
|
1632
1826
|
*/
|
|
1633
1827
|
interface CngxTagConfig {
|
|
1634
1828
|
/** Default values for `CngxTag` inputs when no per-instance binding wins. */
|
|
@@ -1688,9 +1882,8 @@ interface CngxTagConfig {
|
|
|
1688
1882
|
* (root cascade) or `provideTagConfigAt(...features)` in a component's
|
|
1689
1883
|
* `viewProviders` (sub-tree cascade).
|
|
1690
1884
|
*
|
|
1691
|
-
* @category common/display
|
|
1692
1885
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/display/tag/config/tag.config.defaults.ts
|
|
1693
|
-
* @since 0.
|
|
1886
|
+
* @since 0.3.0
|
|
1694
1887
|
*/
|
|
1695
1888
|
declare const CNGX_TAG_CONFIG: InjectionToken<CngxTagConfig>;
|
|
1696
1889
|
|
|
@@ -1703,8 +1896,6 @@ declare const CNGX_TAG_CONFIG: InjectionToken<CngxTagConfig>;
|
|
|
1703
1896
|
* Mirrors the `CngxSelectConfigFeature` discriminated-union shape
|
|
1704
1897
|
* from `@cngx/forms/select` so the consumer's mental model is one
|
|
1705
1898
|
* across feature areas.
|
|
1706
|
-
*
|
|
1707
|
-
* @category common/display
|
|
1708
1899
|
*/
|
|
1709
1900
|
type CngxTagConfigFeature = {
|
|
1710
1901
|
readonly kind: 'defaults';
|
|
@@ -1751,8 +1942,6 @@ type CngxTagConfigFeature = {
|
|
|
1751
1942
|
* ],
|
|
1752
1943
|
* });
|
|
1753
1944
|
* ```
|
|
1754
|
-
*
|
|
1755
|
-
* @category common/display
|
|
1756
1945
|
*/
|
|
1757
1946
|
declare function provideTagConfig(...features: CngxTagConfigFeature[]): EnvironmentProviders;
|
|
1758
1947
|
/**
|
|
@@ -1780,8 +1969,6 @@ declare function provideTagConfig(...features: CngxTagConfigFeature[]): Environm
|
|
|
1780
1969
|
* })
|
|
1781
1970
|
* class AdminSection {}
|
|
1782
1971
|
* ```
|
|
1783
|
-
*
|
|
1784
|
-
* @category common/display
|
|
1785
1972
|
*/
|
|
1786
1973
|
declare function provideTagConfigAt(...features: CngxTagConfigFeature[]): Provider[];
|
|
1787
1974
|
|
|
@@ -1803,8 +1990,6 @@ declare function provideTagConfigAt(...features: CngxTagConfigFeature[]): Provid
|
|
|
1803
1990
|
* );
|
|
1804
1991
|
* }
|
|
1805
1992
|
* ```
|
|
1806
|
-
*
|
|
1807
|
-
* @category common/display
|
|
1808
1993
|
*/
|
|
1809
1994
|
declare function injectTagConfig(): CngxTagConfig;
|
|
1810
1995
|
|
|
@@ -1818,8 +2003,6 @@ declare function injectTagConfig(): CngxTagConfig;
|
|
|
1818
2003
|
* withTagDefaults({ variant: 'subtle', size: 'sm' }),
|
|
1819
2004
|
* );
|
|
1820
2005
|
* ```
|
|
1821
|
-
*
|
|
1822
|
-
* @category common/display
|
|
1823
2006
|
*/
|
|
1824
2007
|
declare function withTagDefaults(payload: NonNullable<CngxTagConfig['defaults']>): CngxTagConfigFeature;
|
|
1825
2008
|
/**
|
|
@@ -1831,8 +2014,6 @@ declare function withTagDefaults(payload: NonNullable<CngxTagConfig['defaults']>
|
|
|
1831
2014
|
* withTagGroupDefaults({ gap: 'md', semanticList: true }),
|
|
1832
2015
|
* );
|
|
1833
2016
|
* ```
|
|
1834
|
-
*
|
|
1835
|
-
* @category common/display
|
|
1836
2017
|
*/
|
|
1837
2018
|
declare function withTagGroupDefaults(payload: NonNullable<CngxTagConfig['groupDefaults']>): CngxTagConfigFeature;
|
|
1838
2019
|
/**
|
|
@@ -1861,8 +2042,6 @@ declare function withTagGroupDefaults(payload: NonNullable<CngxTagConfig['groupD
|
|
|
1861
2042
|
* }),
|
|
1862
2043
|
* );
|
|
1863
2044
|
* ```
|
|
1864
|
-
*
|
|
1865
|
-
* @category common/display
|
|
1866
2045
|
*/
|
|
1867
2046
|
declare function withTagColors(payload: NonNullable<CngxTagConfig['colors']>): CngxTagConfigFeature;
|
|
1868
2047
|
/**
|
|
@@ -1896,8 +2075,6 @@ declare function withTagColors(payload: NonNullable<CngxTagConfig['colors']>): C
|
|
|
1896
2075
|
* // Then in providers:
|
|
1897
2076
|
* provideTagConfig(withTagSlots({ label: shell.brandLabel() }));
|
|
1898
2077
|
* ```
|
|
1899
|
-
*
|
|
1900
|
-
* @category common/display
|
|
1901
2078
|
*/
|
|
1902
2079
|
declare function withTagSlots(payload: NonNullable<CngxTagConfig['templates']>): CngxTagConfigFeature;
|
|
1903
2080
|
|
|
@@ -1906,8 +2083,7 @@ declare function withTagSlots(payload: NonNullable<CngxTagConfig['templates']>):
|
|
|
1906
2083
|
* `@cngx/common/display` atoms (avatar, avatar group, segmented progress,
|
|
1907
2084
|
* chip, badge). It feeds `CNGX_DISPLAY_I18N`.
|
|
1908
2085
|
*
|
|
1909
|
-
* @
|
|
1910
|
-
* @since 0.1.0
|
|
2086
|
+
* @since 0.3.0
|
|
1911
2087
|
* @relatedTo CNGX_DISPLAY_I18N
|
|
1912
2088
|
*/
|
|
1913
2089
|
interface CngxDisplayLanguageSection {
|
|
@@ -1937,8 +2113,7 @@ interface CngxDisplayLanguageSection {
|
|
|
1937
2113
|
* The English display section: the single source of the display atoms'
|
|
1938
2114
|
* English copy. `CNGX_DISPLAY_I18N` defaults to it.
|
|
1939
2115
|
*
|
|
1940
|
-
* @
|
|
1941
|
-
* @since 0.1.0
|
|
2116
|
+
* @since 0.3.0
|
|
1942
2117
|
* @relatedTo CNGX_DISPLAY_I18N
|
|
1943
2118
|
*/
|
|
1944
2119
|
declare const CNGX_DISPLAY_LANGUAGE_EN: CngxDisplayLanguageSection;
|
|
@@ -1948,5 +2123,5 @@ declare module '@cngx/core/i18n' {
|
|
|
1948
2123
|
}
|
|
1949
2124
|
}
|
|
1950
2125
|
|
|
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 };
|
|
2126
|
+
export { CNGX_DISPLAY_I18N, CNGX_DISPLAY_LANGUAGE_EN, CNGX_RADIO_CONFIG, CNGX_TAG_CONFIG, CNGX_TAG_GROUP, CngxAvatar, CngxAvatarGroup, CngxBadge, CngxCheckboxIndicator, CngxChip, CngxDivider, CngxIcon, CngxIconSvg, CngxMeta, CngxMetaList, CngxPasswordStrengthMeter, CngxRadioIndicator, CngxSegmentedProgress, CngxStatus, CngxTag, CngxTagGroup, CngxTagGroupAccessory, CngxTagGroupHeader, CngxTagLabel, CngxTagPrefix, CngxTagSuffix, CngxTime, createIconSvgElement, injectDisplayI18n, injectRadioConfig, injectTagConfig, provideDisplayI18n, provideRadioConfig, provideRadioConfigAt, provideTagConfig, provideTagConfigAt, withDisplayI18nLabels, withRadioSkin, withTagColors, withTagDefaults, withTagGroupDefaults, withTagSlots };
|
|
2127
|
+
export type { CngxAvatarStatus, CngxBadgeColor, CngxBadgePosition, CngxDisplayI18n, CngxDisplayI18nFeature, CngxDisplayLanguageSection, CngxIconSvgElement, CngxRadioConfig, CngxRadioConfigFeature, CngxRadioSkin, CngxTagColor, CngxTagConfig, CngxTagConfigFeature, CngxTagGroupAccessoryContext, CngxTagGroupAlign, CngxTagGroupGap, CngxTagGroupHeaderContext, CngxTagGroupHost, CngxTagGroupSlotContext, CngxTagLabelContext, CngxTagPrefixContext, CngxTagSize, CngxTagSlotContext, CngxTagSuffixContext, CngxTagVariant, SegmentState, StatusTone };
|