@cngx/ui 0.1.0-rc.8 → 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/README.md +118 -59
- package/action-button/README.md +170 -53
- package/breadcrumb/README.md +5 -6
- package/collection/README.md +1 -1
- package/command-palette/README.md +9 -5
- package/data-grid-accordion/README.md +1 -1
- package/empty-state/README.md +2 -3
- package/feedback/README.md +1 -1
- package/fesm2022/cngx-ui-a11y.mjs +13 -23
- package/fesm2022/cngx-ui-a11y.mjs.map +1 -1
- package/fesm2022/cngx-ui-accordion.mjs +55 -60
- package/fesm2022/cngx-ui-accordion.mjs.map +1 -1
- package/fesm2022/cngx-ui-action-button.mjs +220 -339
- package/fesm2022/cngx-ui-action-button.mjs.map +1 -1
- package/fesm2022/cngx-ui-breadcrumb.mjs +100 -80
- package/fesm2022/cngx-ui-breadcrumb.mjs.map +1 -1
- package/fesm2022/cngx-ui-chart-panel.mjs +18 -31
- package/fesm2022/cngx-ui-chart-panel.mjs.map +1 -1
- package/fesm2022/cngx-ui-collection.mjs +28 -34
- package/fesm2022/cngx-ui-collection.mjs.map +1 -1
- package/fesm2022/cngx-ui-command-palette.mjs +29 -51
- package/fesm2022/cngx-ui-command-palette.mjs.map +1 -1
- package/fesm2022/cngx-ui-context-menu.mjs +138 -89
- package/fesm2022/cngx-ui-context-menu.mjs.map +1 -1
- package/fesm2022/cngx-ui-data-grid-accordion.mjs +135 -77
- package/fesm2022/cngx-ui-data-grid-accordion.mjs.map +1 -1
- package/fesm2022/cngx-ui-empty-state.mjs +17 -44
- package/fesm2022/cngx-ui-empty-state.mjs.map +1 -1
- package/fesm2022/cngx-ui-feedback.mjs +648 -495
- package/fesm2022/cngx-ui-feedback.mjs.map +1 -1
- package/fesm2022/cngx-ui-layout.mjs +17 -13
- package/fesm2022/cngx-ui-layout.mjs.map +1 -1
- package/fesm2022/cngx-ui-mat-accordion.mjs +6 -7
- package/fesm2022/cngx-ui-mat-accordion.mjs.map +1 -1
- package/fesm2022/cngx-ui-mat-paginator.mjs +5 -9
- package/fesm2022/cngx-ui-mat-paginator.mjs.map +1 -1
- package/fesm2022/cngx-ui-mat-stepper.mjs +6 -9
- package/fesm2022/cngx-ui-mat-stepper.mjs.map +1 -1
- package/fesm2022/cngx-ui-mat-tabs.mjs +315 -134
- package/fesm2022/cngx-ui-mat-tabs.mjs.map +1 -1
- package/fesm2022/cngx-ui-nav-rail.mjs +440 -0
- package/fesm2022/cngx-ui-nav-rail.mjs.map +1 -0
- package/fesm2022/cngx-ui-overlay.mjs +9 -10
- package/fesm2022/cngx-ui-overlay.mjs.map +1 -1
- package/fesm2022/cngx-ui-paginator.mjs +212 -188
- package/fesm2022/cngx-ui-paginator.mjs.map +1 -1
- package/fesm2022/cngx-ui-sidenav.mjs +872 -721
- package/fesm2022/cngx-ui-sidenav.mjs.map +1 -1
- package/fesm2022/cngx-ui-skeleton.mjs +17 -19
- package/fesm2022/cngx-ui-skeleton.mjs.map +1 -1
- package/fesm2022/cngx-ui-speak.mjs +21 -74
- package/fesm2022/cngx-ui-speak.mjs.map +1 -1
- package/fesm2022/cngx-ui-stat-card.mjs +39 -62
- package/fesm2022/cngx-ui-stat-card.mjs.map +1 -1
- package/fesm2022/cngx-ui-stepper.mjs +259 -130
- package/fesm2022/cngx-ui-stepper.mjs.map +1 -1
- package/fesm2022/cngx-ui-tabs.mjs +148 -50
- package/fesm2022/cngx-ui-tabs.mjs.map +1 -1
- package/fesm2022/cngx-ui-timeline.mjs +48 -32
- package/fesm2022/cngx-ui-timeline.mjs.map +1 -1
- package/fesm2022/cngx-ui-toc.mjs +59 -48
- package/fesm2022/cngx-ui-toc.mjs.map +1 -1
- package/fesm2022/cngx-ui.mjs +5 -5
- package/fesm2022/cngx-ui.mjs.map +1 -1
- package/mat-tabs/README.md +57 -19
- package/mat-tabs/styles/mat-tabs.css +285 -163
- package/nav-rail/README.md +325 -0
- package/package.json +37 -8
- package/paginator/README.md +10 -0
- package/schematics/collection.json +9 -0
- package/schematics/ng-add/index.js +9 -0
- package/schematics/ng-add/schema.json +96 -0
- package/schematics/package.json +3 -0
- package/sidenav/README.md +150 -55
- package/skeleton/README.md +1 -1
- package/speak/README.md +1 -2
- package/stepper/README.md +20 -5
- package/tabs/README.md +13 -0
- package/timeline/README.md +1 -1
- package/toc/README.md +1 -1
- package/types/cngx-ui-a11y.d.ts +20 -38
- package/types/cngx-ui-accordion.d.ts +46 -71
- package/types/cngx-ui-action-button.d.ts +113 -151
- package/types/cngx-ui-breadcrumb.d.ts +60 -85
- package/types/cngx-ui-chart-panel.d.ts +22 -40
- package/types/cngx-ui-collection.d.ts +30 -43
- package/types/cngx-ui-command-palette.d.ts +40 -64
- package/types/cngx-ui-context-menu.d.ts +109 -48
- package/types/cngx-ui-data-grid-accordion.d.ts +50 -75
- package/types/cngx-ui-empty-state.d.ts +18 -8
- package/types/cngx-ui-feedback.d.ts +275 -292
- package/types/cngx-ui-layout.d.ts +4 -12
- package/types/cngx-ui-mat-accordion.d.ts +5 -5
- package/types/cngx-ui-mat-paginator.d.ts +4 -10
- package/types/cngx-ui-mat-stepper.d.ts +5 -10
- package/types/cngx-ui-mat-tabs.d.ts +86 -89
- package/types/cngx-ui-nav-rail.d.ts +416 -0
- package/types/cngx-ui-overlay.d.ts +4 -13
- package/types/cngx-ui-paginator.d.ts +186 -161
- package/types/cngx-ui-sidenav.d.ts +557 -437
- package/types/cngx-ui-skeleton.d.ts +7 -13
- package/types/cngx-ui-speak.d.ts +40 -24
- package/types/cngx-ui-stat-card.d.ts +45 -36
- package/types/cngx-ui-stepper.d.ts +205 -84
- package/types/cngx-ui-tabs.d.ts +104 -28
- package/types/cngx-ui-timeline.d.ts +31 -51
- package/types/cngx-ui-toc.d.ts +43 -54
- package/types/cngx-ui.d.ts +1 -1
|
@@ -65,7 +65,10 @@ for programmatic control.
|
|
|
65
65
|
## Commands and matching
|
|
66
66
|
|
|
67
67
|
The static registry is `provideCommands(...sources)` - each source an array or
|
|
68
|
-
a `Signal<readonly CngxCommand[]>`, merged reactively.
|
|
68
|
+
a `Signal<readonly CngxCommand[]>`, merged reactively. Scoped calls in a lazy
|
|
69
|
+
route or a component add to the root set, so a palette inside a feature lists
|
|
70
|
+
the global commands plus the feature's own; a scoped command that reuses a
|
|
71
|
+
global command's `id` replaces it there. A `CngxCommand` is pure
|
|
69
72
|
data plus `run()`: `id`, `label`, optional `keywords`, `group`, `icon`,
|
|
70
73
|
`disabled` (a `Signal<boolean>`), `disabledReason`, and an `unknown` `data`
|
|
71
74
|
payload the row slot narrows.
|
|
@@ -169,7 +172,8 @@ entry's `navigateKeysSpoken`, English `'Up and Down arrows'`) is what they hear.
|
|
|
169
172
|
- Groups render as `role="group"` with `aria-labelledby` pointing at minted,
|
|
170
173
|
panel-unique DOM ids - never raw consumer strings.
|
|
171
174
|
- Forced-colors mode re-signals the active row with the system Highlight pair
|
|
172
|
-
and
|
|
175
|
+
and keeps a visible 1px edge on the modal (its border self-heals; the dialog
|
|
176
|
+
skin draws it as `ButtonBorder`).
|
|
173
177
|
|
|
174
178
|
## CSS custom properties
|
|
175
179
|
|
|
@@ -191,7 +195,7 @@ so a root `[data-density]` swap re-scales the whole palette.
|
|
|
191
195
|
| `--cngx-command-listbox-max-h` / `--cngx-command-listbox-pad` | `22rem` / `xs` space | Results scroll area |
|
|
192
196
|
| `--cngx-command-header-color` / `--cngx-command-header-size` / `--cngx-command-header-weight` / `--cngx-command-header-pad-y` / `--cngx-command-header-pad-x` | muted / `0.75rem` / `600` / `xs` / `sm` space | Group headers |
|
|
193
197
|
| `--cngx-command-row-color` / `--cngx-command-row-radius` / `--cngx-command-row-gap` / `--cngx-command-row-pad` | inherit / `--cngx-radius-sm` / `sm` / `sm` space | Command rows |
|
|
194
|
-
| `--cngx-command-row-active-bg` / `--cngx-command-row-active-color` |
|
|
198
|
+
| `--cngx-command-row-active-bg` / `--cngx-command-row-active-color` | translucent tint / inherit | Highlighted row |
|
|
195
199
|
| `--cngx-command-mark-bg` | `--cngx-color-highlight` | Match `<mark>` |
|
|
196
200
|
| `--cngx-command-state-pad` / `--cngx-command-state-color` / `--cngx-command-error-color` / `--cngx-command-retry-bg` | `lg` space / muted / danger / transparent | Loading, empty and error chrome |
|
|
197
201
|
| `--cngx-command-footer-gap` / `--cngx-command-footer-pad-y` / `--cngx-command-footer-pad-x` / `--cngx-command-footer-size` / `--cngx-command-footer-color` | `md` / `sm` / `md` space / `0.75rem` / muted | Legend footer |
|
|
@@ -219,6 +223,6 @@ chrome. Spacing stays on `--cngx-space-*` so density tracking keeps working.
|
|
|
219
223
|
|
|
220
224
|
- `@cngx/common/command` - the framework-level command registry and matcher
|
|
221
225
|
- [CngxDialog](../../common/dialog/) - the modal surface the palette composes
|
|
222
|
-
- [CngxListbox](../../common/interactive/) - the navigation atom under the rows
|
|
223
|
-
- [API on compodocx](https://cngxjs.github.io/cngx/)
|
|
226
|
+
- [CngxListbox](../../common/interactive/listbox/) - the navigation atom under the rows
|
|
227
|
+
- [API on compodocx](https://cngxjs.github.io/cngx/main/ui/command-palette/)
|
|
224
228
|
- Tests: `projects/ui/command-palette/palette/command-palette.component.spec.ts`, `panel/command-panel.component.spec.ts`
|
|
@@ -169,7 +169,7 @@ with `injectDataGridAccordionConfig()`. `withDataGridAccordionLabels` takes a pa
|
|
|
169
169
|
bundle (or a `Signal` of one) for the count, sort, filter, row-error and note copy;
|
|
170
170
|
unset keys read the `dataGridAccordion` section of the language pack (English without
|
|
171
171
|
one). `CngxDataGridAccordionConfigFeature` is a union
|
|
172
|
-
since the labels feature landed - see [the migration note](
|
|
172
|
+
since the labels feature landed - see [the migration note](https://github.com/cngxjs/cngx/blob/main/projects/ui/data-grid-accordion/config-feature-migration.md)
|
|
173
173
|
if you extended or merged the old interface.
|
|
174
174
|
|
|
175
175
|
## Sort and filter
|
package/empty-state/README.md
CHANGED
|
@@ -76,13 +76,12 @@ html {
|
|
|
76
76
|
The theme mixin provides:
|
|
77
77
|
|
|
78
78
|
- Material 3 system color tokens (`--mat-sys-*`) with fallback defaults
|
|
79
|
-
-
|
|
80
|
-
- Automatic theme version detection (M3 vs M2)
|
|
79
|
+
- No declarations for an M2 theme (M3 only)
|
|
81
80
|
- Icon and text color alignment with Material palette
|
|
82
81
|
|
|
83
82
|
## See Also
|
|
84
83
|
|
|
85
84
|
- [CngxAsyncState](../../core/utils/) - Async state contract
|
|
86
|
-
- [API on compodocx](https://cngxjs.github.io/cngx/)
|
|
85
|
+
- [API on compodocx](https://cngxjs.github.io/cngx/main/ui/empty-state/)
|
|
87
86
|
- Demo: `examples/stories/ui/empty-state-demo/`
|
|
88
87
|
- Tests: `projects/ui/empty-state/empty-state.component.spec.ts`
|
package/feedback/README.md
CHANGED
|
@@ -27,7 +27,7 @@ Two patterns make the whole feedback layer feel cohesive:
|
|
|
27
27
|
|
|
28
28
|
Toast, banner, and alerter services are **not** `providedIn: 'root'`. Provide them via `provideFeedback(...)` in your application bootstrap, and render the outlets once at the application root. This is intentional - feedback presentation is application-level, not library-level, and forcing the consumer to opt in keeps a tree-shake-friendly footprint when only a subset of surfaces is in use.
|
|
29
29
|
|
|
30
|
-
Loading timing (the flash-suppression `showDelay` / `minDwell` shared by every loading surface)
|
|
30
|
+
Loading timing (the flash-suppression `showDelay` / `minDwell` shared by every loading surface) is not part of `provideFeedback`. Set it with `provideLoadingConfig(withShowDelay(...), withMinDwell(...), withSpinnerVsSkeletonCutoff(...))` from `@cngx/core/utils`.
|
|
31
31
|
|
|
32
32
|
The alert stack and the toast outlet name their `role="region"` host, and both
|
|
33
33
|
outlets announce state changes - all English by default and all overridable
|
|
@@ -13,8 +13,7 @@ import { recordEqual } from '@cngx/utils';
|
|
|
13
13
|
* English copy. The `CNGX_A11Y_PANEL_CONFIG` labels and option labels default
|
|
14
14
|
* to it.
|
|
15
15
|
*
|
|
16
|
-
* @
|
|
17
|
-
* @since 0.1.0
|
|
16
|
+
* @since 0.3.0
|
|
18
17
|
* @relatedTo CNGX_A11Y_PANEL_CONFIG
|
|
19
18
|
*/
|
|
20
19
|
const CNGX_A11Y_PANEL_LANGUAGE_EN = {
|
|
@@ -116,10 +115,9 @@ const NO_LABELS = {};
|
|
|
116
115
|
* `provideA11yPanelConfig(...)` at the application root, then the library
|
|
117
116
|
* defaults.
|
|
118
117
|
*
|
|
119
|
-
* @category ui/a11y
|
|
120
118
|
* @relatedTo provideA11yPanelConfig
|
|
121
119
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/a11y/a11y-panel.config.ts
|
|
122
|
-
* @since 0.
|
|
120
|
+
* @since 0.3.0
|
|
123
121
|
*/
|
|
124
122
|
const CNGX_A11Y_PANEL_CONFIG = new InjectionToken('CngxA11yPanelConfig', {
|
|
125
123
|
providedIn: 'root',
|
|
@@ -155,10 +153,9 @@ function applyFeatures(base, features) {
|
|
|
155
153
|
* );
|
|
156
154
|
* ```
|
|
157
155
|
*
|
|
158
|
-
* @category ui/a11y
|
|
159
156
|
* @relatedTo provideA11yPanelConfig
|
|
160
157
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/a11y/a11y-panel.config.ts
|
|
161
|
-
* @since 0.
|
|
158
|
+
* @since 0.3.0
|
|
162
159
|
*/
|
|
163
160
|
function withA11yPanelLabels(payload) {
|
|
164
161
|
return { kind: 'labels', payload };
|
|
@@ -181,10 +178,9 @@ function withA11yPanelLabels(payload) {
|
|
|
181
178
|
* );
|
|
182
179
|
* ```
|
|
183
180
|
*
|
|
184
|
-
* @category ui/a11y
|
|
185
181
|
* @relatedTo provideA11yPanelConfig
|
|
186
182
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/a11y/a11y-panel.config.ts
|
|
187
|
-
* @since 0.
|
|
183
|
+
* @since 0.3.0
|
|
188
184
|
*/
|
|
189
185
|
function withA11yPanelAxes(payload) {
|
|
190
186
|
return { kind: 'axes', payload };
|
|
@@ -195,12 +191,11 @@ function withA11yPanelAxes(payload) {
|
|
|
195
191
|
* supplied features merge with the library defaults, so consumers only declare
|
|
196
192
|
* what they override.
|
|
197
193
|
*
|
|
198
|
-
* @category ui/a11y
|
|
199
194
|
* @relatedTo withA11yPanelLabels
|
|
200
195
|
* @relatedTo withA11yPanelAxes
|
|
201
196
|
* @relatedTo injectA11yPanelConfig
|
|
202
197
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/a11y/a11y-panel.config.ts
|
|
203
|
-
* @since 0.
|
|
198
|
+
* @since 0.3.0
|
|
204
199
|
*/
|
|
205
200
|
function provideA11yPanelConfig(...features) {
|
|
206
201
|
// Empty-features: leave the root default reference untouched so downstream
|
|
@@ -237,10 +232,9 @@ function provideA11yPanelConfig(...features) {
|
|
|
237
232
|
* })
|
|
238
233
|
* ```
|
|
239
234
|
*
|
|
240
|
-
* @category ui/a11y
|
|
241
235
|
* @relatedTo provideA11yPanelConfig
|
|
242
236
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/a11y/a11y-panel.config.ts
|
|
243
|
-
* @since 0.
|
|
237
|
+
* @since 0.3.0
|
|
244
238
|
*/
|
|
245
239
|
function provideA11yPanelConfigAt(...features) {
|
|
246
240
|
return [
|
|
@@ -256,10 +250,9 @@ function provideA11yPanelConfigAt(...features) {
|
|
|
256
250
|
* injection context; resolves through the cascade. Equivalent to
|
|
257
251
|
* `inject(CNGX_A11Y_PANEL_CONFIG)`.
|
|
258
252
|
*
|
|
259
|
-
* @category ui/a11y
|
|
260
253
|
* @relatedTo provideA11yPanelConfig
|
|
261
254
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/a11y/a11y-panel.config.ts
|
|
262
|
-
* @since 0.
|
|
255
|
+
* @since 0.3.0
|
|
263
256
|
*/
|
|
264
257
|
function injectA11yPanelConfig() {
|
|
265
258
|
return inject(CNGX_A11Y_PANEL_CONFIG);
|
|
@@ -271,10 +264,9 @@ function injectA11yPanelConfig() {
|
|
|
271
264
|
* config leaves unset, `null` or `undefined` reads the section. Runs in an
|
|
272
265
|
* injection context; read it inside a `computed()`, a template or a handler.
|
|
273
266
|
*
|
|
274
|
-
* @category ui/a11y
|
|
275
267
|
* @relatedTo withA11yPanelLabels
|
|
276
268
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/a11y/a11y-panel.config.ts
|
|
277
|
-
* @since 0.
|
|
269
|
+
* @since 0.3.0
|
|
278
270
|
*/
|
|
279
271
|
function injectA11yPanelLabels() {
|
|
280
272
|
const section = injectA11yPanelSiteCopy().labels;
|
|
@@ -316,10 +308,9 @@ function resolveAxes(axes, optionLabels) {
|
|
|
316
308
|
* Every option without its own `label` carries the label for its value from
|
|
317
309
|
* the `a11yPanel` section of the active pack. Runs in an injection context.
|
|
318
310
|
*
|
|
319
|
-
* @category ui/a11y
|
|
320
311
|
* @relatedTo withA11yPanelAxes
|
|
321
312
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/a11y/a11y-panel.config.ts
|
|
322
|
-
* @since 0.
|
|
313
|
+
* @since 0.3.0
|
|
323
314
|
*/
|
|
324
315
|
function injectA11yPanelAxes() {
|
|
325
316
|
const config = injectA11yPanelConfig();
|
|
@@ -367,14 +358,13 @@ function sameAxisViews(a, b) {
|
|
|
367
358
|
* <cngx-a11y-panel />
|
|
368
359
|
* ```
|
|
369
360
|
*
|
|
370
|
-
* @category ui/a11y
|
|
371
|
-
* @docsKind primary
|
|
372
361
|
* @wcag AA
|
|
373
362
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/a11y/a11y-panel.component.ts
|
|
374
363
|
* @selector cngx-a11y-panel
|
|
375
|
-
* @since 0.
|
|
364
|
+
* @since 0.3.0
|
|
376
365
|
* @relatedTo CngxCard, CngxButtonToggleGroup, CngxLiveAnnouncer, provideA11yPreferences, provideA11yPanelConfig
|
|
377
|
-
* <example-url
|
|
366
|
+
* <example-url>/#/ui/a11y/panel/inline</example-url>
|
|
367
|
+
* @axis level organism
|
|
378
368
|
*/
|
|
379
369
|
class CngxA11yPanel {
|
|
380
370
|
announcer = inject(CngxLiveAnnouncer);
|
|
@@ -441,7 +431,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
441
431
|
}] });
|
|
442
432
|
|
|
443
433
|
/**
|
|
444
|
-
* @module
|
|
434
|
+
* @module `@cngx/ui/a11y`
|
|
445
435
|
*/
|
|
446
436
|
|
|
447
437
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cngx-ui-a11y.mjs","sources":["../../../projects/ui/a11y/i18n/a11y-panel-language-section.ts","../../../projects/ui/a11y/i18n/a11y-panel-i18n.ts","../../../projects/ui/a11y/a11y-panel.config.ts","../../../projects/ui/a11y/a11y-panel.component.ts","../../../projects/ui/a11y/a11y-panel.component.html","../../../projects/ui/a11y/public-api.ts","../../../projects/ui/a11y/cngx-ui-a11y.ts"],"sourcesContent":["import type {\n CngxContrastPreference,\n CngxDensityValue,\n CngxMotionPreference,\n CngxTextScaleValue,\n} from '@cngx/core';\n\n/**\n * The accessibility-panel section of a {@link CngxLanguagePack}: the copy of\n * `CngxA11yPanel`. The text keys feed the `labels` of `CNGX_A11Y_PANEL_CONFIG`\n * (a key set through `withA11yPanelLabels` still wins); the four option\n * records label the toggle options by value, so an axis list from\n * `withA11yPanelAxes` without option labels reads them from here.\n *\n * @category ui/a11y/i18n\n * @since 0.1.0\n * @relatedTo CNGX_A11Y_PANEL_CONFIG, withA11yPanelLabels, withA11yPanelAxes\n */\nexport interface CngxA11yPanelLanguageSection {\n /** Default heading, shown when no `[cngxA11yPanelHeader]` slot is projected. */\n readonly heading: string;\n /** Reset control label. */\n readonly reset: string;\n /** Announced when Reset restores every axis. */\n readonly resetMessage: string;\n /** Group label (the accessible name) per axis. */\n readonly axes: Readonly<Record<'density' | 'textScale' | 'motion' | 'contrast', string>>;\n /** Option labels of the spacing group, by value. */\n readonly density: Readonly<Record<CngxDensityValue, string>>;\n /** Option labels of the text-size group, by value. */\n readonly textScale: Readonly<Record<CngxTextScaleValue, string>>;\n /** Option labels of the motion group, by value. */\n readonly motion: Readonly<Record<CngxMotionPreference, string>>;\n /** Option labels of the contrast group, by value. */\n readonly contrast: Readonly<Record<CngxContrastPreference, string>>;\n}\n\n/**\n * The English accessibility-panel section: the single source of the panel's\n * English copy. The `CNGX_A11Y_PANEL_CONFIG` labels and option labels default\n * to it.\n *\n * @category ui/a11y/i18n\n * @since 0.1.0\n * @relatedTo CNGX_A11Y_PANEL_CONFIG\n */\nexport const CNGX_A11Y_PANEL_LANGUAGE_EN: CngxA11yPanelLanguageSection = {\n heading: 'Accessibility',\n reset: 'Reset to defaults',\n resetMessage: 'Preferences reset to defaults',\n axes: {\n density: 'Spacing',\n textScale: 'Text size',\n motion: 'Motion',\n contrast: 'Contrast',\n },\n density: { compact: 'Compact', comfortable: 'Comfortable', spacious: 'Spacious' },\n textScale: { sm: 'Small', md: 'Default', lg: 'Large' },\n motion: { full: 'Full', reduced: 'Reduced', auto: 'System' },\n contrast: { normal: 'Normal', more: 'More', auto: 'System' },\n};\n\ndeclare module '@cngx/core/i18n' {\n interface CngxLanguagePack {\n readonly a11yPanel: CngxA11yPanelLanguageSection;\n }\n}\n","import { computed, inject, InjectionToken, type Signal } from '@angular/core';\n\nimport { createLanguageSection, createSectionBundle } from '@cngx/core/i18n';\nimport { recordEqual } from '@cngx/utils';\n\nimport type { CngxA11yPanelAxis, CngxA11yPanelLabels } from '../a11y-panel.config';\nimport {\n CNGX_A11Y_PANEL_LANGUAGE_EN,\n type CngxA11yPanelLanguageSection,\n} from './a11y-panel-language-section';\n\n/** @internal Option labels by axis, then by value. */\nexport type CngxA11yPanelOptionLabels = Readonly<\n Record<CngxA11yPanelAxis, Readonly<Record<string, string>>>\n>;\n\n/** @internal The panel copy of one section, split into config labels and option labels. */\nexport interface CngxA11yPanelCopy {\n readonly labels: CngxA11yPanelLabels;\n readonly options: CngxA11yPanelOptionLabels;\n}\n\n/** @internal Turns an accessibility-panel section into the panel copy. Pure. */\nexport function a11yPanelCopyFrom(section: CngxA11yPanelLanguageSection): CngxA11yPanelCopy {\n return {\n labels: {\n axes: section.axes,\n reset: section.reset,\n heading: section.heading,\n resetMessage: section.resetMessage,\n },\n options: {\n density: section.density,\n textScale: section.textScale,\n motion: section.motion,\n contrast: section.contrast,\n },\n };\n}\n\n/** @internal The accessibility-panel section of the active pack over the English section. */\nconst injectA11yPanelLanguage = createLanguageSection('a11yPanel', CNGX_A11Y_PANEL_LANGUAGE_EN);\n\n/** @internal Builds and reads the section copy. */\nconst a11yPanelBundle = createSectionBundle<CngxA11yPanelLanguageSection, CngxA11yPanelCopy>({\n section: injectA11yPanelLanguage,\n toBundle: a11yPanelCopyFrom,\n});\n\n/**\n * @internal The panel copy of the active pack. Private: consumers override the\n * text through `withA11yPanelLabels`, option labels through `withA11yPanelAxes`.\n */\nconst A11Y_PANEL_SECTION_COPY = new InjectionToken<Signal<CngxA11yPanelCopy>>(\n 'CngxA11yPanelSectionCopy',\n { providedIn: 'root', factory: () => a11yPanelBundle.build() },\n);\n\ninterface SiteDefaults {\n readonly labels: Signal<CngxA11yPanelLabels>;\n readonly options: Signal<CngxA11yPanelOptionLabels>;\n}\n\nconst SITES = new WeakMap<Signal<CngxA11yPanelCopy>, SiteDefaults>();\n\n/**\n * @internal The panel copy at the reading site, each part its own signal.\n * Memoized per copy signal. Injection context required.\n */\nexport function injectA11yPanelSiteCopy(): SiteDefaults {\n const copy = a11yPanelBundle.resolve(inject(A11Y_PANEL_SECTION_COPY));\n let site = SITES.get(copy);\n if (!site) {\n site = {\n labels: computed(() => copy().labels, { equal: recordEqual }),\n options: computed(() => copy().options, { equal: recordEqual }),\n };\n SITES.set(copy, site);\n }\n return site;\n}\n","import {\n computed,\n inject,\n InjectionToken,\n makeEnvironmentProviders,\n Optional,\n SkipSelf,\n type EnvironmentProviders,\n type Provider,\n type Signal,\n} from '@angular/core';\nimport type {\n CngxContrastPreference,\n CngxDensityValue,\n CngxMotionPreference,\n CngxTextScaleValue,\n} from '@cngx/core';\nimport { coerceSignal, createDefaultsFill, createNestedOverrideMerge } from '@cngx/core/utils';\n\nimport { injectA11yPanelSiteCopy, type CngxA11yPanelOptionLabels } from './i18n/a11y-panel-i18n';\n\n/**\n * The four accessibility axes the panel can render a control group for.\n * Each maps 1:1 onto a writable signal returned by `injectA11yPreferences()`.\n *\n * @category ui/a11y\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/a11y/a11y-panel.config.ts\n * @since 0.1.0\n */\nexport type CngxA11yPanelAxis = 'density' | 'textScale' | 'motion' | 'contrast';\n\n/**\n * One selectable option in an axis control group: the value written to the\n * axis signal plus the visible/toggle label. `V` is the axis' own value union\n * (e.g. `CngxDensityValue`), so a misspelled value fails to compile rather\n * than reaching the global preference signal. An option without a `label`\n * reads it from the `a11yPanel` section of the language pack, by value.\n *\n * @category ui/a11y\n * @relatedTo withA11yPanelAxes\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/a11y/a11y-panel.config.ts\n * @since 0.1.0\n */\nexport interface CngxA11yPanelAxisOption<V extends string = string> {\n /** Value written to the axis signal - a valid member of that axis' union. */\n readonly value: V;\n /**\n * Toggle-button label. Leave it out to read the label for `value` from the\n * `a11yPanel` section of the language pack (English without one), so the\n * option follows a language switch. A label set here wins.\n */\n readonly label?: string;\n}\n\n/**\n * A rendered axis control group: which axis, its ordered options, and the\n * value Reset restores (the axis' own library default). This is a\n * discriminated union on `axis`, so `options` and `reset` are typed to that\n * axis' value union - a `{ axis: 'density', reset: 'x' }` is a compile error,\n * not a garbage value written to `<html data-density>`. Reorder or drop axes\n * by supplying a subset via `withA11yPanelAxes`.\n *\n * @category ui/a11y\n * @relatedTo withA11yPanelAxes\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/a11y/a11y-panel.config.ts\n * @since 0.1.0\n */\nexport type CngxA11yPanelAxisSpec =\n | {\n readonly axis: 'density';\n readonly options: readonly CngxA11yPanelAxisOption<CngxDensityValue>[];\n readonly reset: CngxDensityValue;\n }\n | {\n readonly axis: 'textScale';\n readonly options: readonly CngxA11yPanelAxisOption<CngxTextScaleValue>[];\n readonly reset: CngxTextScaleValue;\n }\n | {\n readonly axis: 'motion';\n readonly options: readonly CngxA11yPanelAxisOption<CngxMotionPreference>[];\n readonly reset: CngxMotionPreference;\n }\n | {\n readonly axis: 'contrast';\n readonly options: readonly CngxA11yPanelAxisOption<CngxContrastPreference>[];\n readonly reset: CngxContrastPreference;\n };\n\n/**\n * Panel text: per-axis group labels, the Reset control label, the default\n * heading (shown when no `[cngxA11yPanelHeader]` is projected), and the\n * live-region message announced on Reset. The defaults come from the\n * `a11yPanel` section of the language pack (English without one); override\n * single keys via {@link withA11yPanelLabels}.\n *\n * @category ui/a11y\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/a11y/a11y-panel.config.ts\n * @since 0.1.0\n */\nexport interface CngxA11yPanelLabels {\n /** Group label (the accessible name) per axis. */\n readonly axes: Readonly<Record<CngxA11yPanelAxis, string>>;\n /** Reset control label. */\n readonly reset: string;\n /** Default heading, shown when no `[cngxA11yPanelHeader]` slot is projected. */\n readonly heading: string;\n /** Live-announced when Reset restores every axis. */\n readonly resetMessage: string;\n}\n\n/**\n * Resolved panel configuration - the text overrides plus the ordered axis\n * list. Merged from the library defaults and any `with*` features by the\n * reducer in {@link provideA11yPanelConfig}.\n *\n * `labels` holds overrides only: unset by default, a value or a `Signal` once\n * {@link withA11yPanelLabels} ran; every key it leaves out reads the\n * `a11yPanel` section of the language pack. `axes` accepts a value or a\n * `Signal`; its option labels are optional and default to the section. Read\n * both through {@link injectA11yPanelLabels} and {@link injectA11yPanelAxes}.\n *\n * @category ui/a11y\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/a11y/a11y-panel.config.ts\n * @since 0.1.0\n */\nexport interface CngxA11yPanelConfig {\n readonly labels?: CngxA11yPanelLabelsOverride | Signal<CngxA11yPanelLabelsOverride>;\n readonly axes: readonly CngxA11yPanelAxisSpec[] | Signal<readonly CngxA11yPanelAxisSpec[]>;\n}\n\n/**\n * Partial text override accepted by `withA11yPanelLabels`. The `axes`\n * record merges key-by-key, so a consumer can relabel one axis group without\n * restating the rest.\n *\n * @category ui/a11y\n * @relatedTo withA11yPanelLabels\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/a11y/a11y-panel.config.ts\n * @since 0.1.0\n */\nexport interface CngxA11yPanelLabelsOverride {\n readonly axes?: Partial<Record<CngxA11yPanelAxis, string>>;\n readonly reset?: string;\n readonly heading?: string;\n readonly resetMessage?: string;\n}\n\n/**\n * Library defaults: the four axes in their default order, each with its reset\n * value. Carries no copy - the text and the option labels are the `a11yPanel`\n * section of the language pack. Override via {@link provideA11yPanelConfig}.\n */\nexport const CNGX_A11Y_PANEL_DEFAULTS: CngxA11yPanelConfig & {\n readonly axes: readonly CngxA11yPanelAxisSpec[];\n} = {\n axes: [\n {\n axis: 'density',\n reset: 'comfortable',\n options: [{ value: 'compact' }, { value: 'comfortable' }, { value: 'spacious' }],\n },\n {\n axis: 'textScale',\n reset: 'md',\n options: [{ value: 'sm' }, { value: 'md' }, { value: 'lg' }],\n },\n {\n axis: 'motion',\n reset: 'auto',\n options: [{ value: 'full' }, { value: 'reduced' }, { value: 'auto' }],\n },\n {\n axis: 'contrast',\n reset: 'auto',\n options: [{ value: 'normal' }, { value: 'more' }, { value: 'auto' }],\n },\n ],\n};\n\nconst NO_LABELS: CngxA11yPanelLabelsOverride = {};\n\n/**\n * Configuration cascade token. Resolution priority (high to low):\n * `provideA11yPanelConfigAt(...)` in a component's `viewProviders`, then\n * `provideA11yPanelConfig(...)` at the application root, then the library\n * defaults.\n *\n * @category ui/a11y\n * @relatedTo provideA11yPanelConfig\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/a11y/a11y-panel.config.ts\n * @since 0.1.0\n */\nexport const CNGX_A11Y_PANEL_CONFIG = new InjectionToken<CngxA11yPanelConfig>(\n 'CngxA11yPanelConfig',\n {\n providedIn: 'root',\n factory: () => CNGX_A11Y_PANEL_DEFAULTS,\n },\n);\n\n/**\n * A single configuration override produced by a `with*` feature factory. The\n * reducer in {@link provideA11yPanelConfig} matches on `kind`: `labels` deep-\n * merges the text bundle, `axes` replaces the axis list wholesale.\n *\n * @category ui/a11y\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/a11y/a11y-panel.config.ts\n * @since 0.1.0\n */\nexport type CngxA11yPanelConfigFeature =\n | {\n readonly kind: 'labels';\n readonly payload: CngxA11yPanelLabelsOverride | Signal<CngxA11yPanelLabelsOverride>;\n }\n | {\n readonly kind: 'axes';\n readonly payload: readonly CngxA11yPanelAxisSpec[] | Signal<readonly CngxA11yPanelAxisSpec[]>;\n };\n\n/** Reduce a feature list onto a base config, merging text and axes in isolation. */\nfunction applyFeatures(\n base: CngxA11yPanelConfig,\n features: readonly CngxA11yPanelConfigFeature[],\n): CngxA11yPanelConfig {\n let labels = base.labels;\n let axes = base.axes;\n for (const feature of features) {\n if (feature.kind === 'labels') {\n labels = createNestedOverrideMerge(labels ?? NO_LABELS, feature.payload, 'axes');\n } else {\n axes = feature.payload;\n }\n }\n return { labels, axes };\n}\n\n/**\n * Override any subset of the panel text - axis group labels, the Reset label,\n * the default heading, or the Reset announcement. The `axes` record merges\n * key-by-key, so a single axis can be relabelled in isolation. Pass a `Signal`\n * to switch the language at runtime.\n *\n * ```ts\n * provideA11yPanelConfig(\n * withA11yPanelLabels({\n * heading: 'Barrierefreiheit',\n * axes: { motion: 'Bewegung' },\n * resetMessage: 'Einstellungen zurueckgesetzt',\n * }),\n * );\n * ```\n *\n * @category ui/a11y\n * @relatedTo provideA11yPanelConfig\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/a11y/a11y-panel.config.ts\n * @since 0.1.0\n */\nexport function withA11yPanelLabels(\n payload: CngxA11yPanelLabelsOverride | Signal<CngxA11yPanelLabelsOverride>,\n): CngxA11yPanelConfigFeature {\n return { kind: 'labels', payload };\n}\n\n/**\n * Replace the rendered axis list - reorder groups, drop an axis, or restrict\n * the options a group offers. Supplying a subset renders only those groups.\n * Leave an option's `label` out and it reads the `a11yPanel` section of the\n * language pack, so the options translate without restating the list; pass a\n * `Signal` to relabel options you set yourself on a runtime language switch.\n *\n * ```ts\n * provideA11yPanelConfig(\n * withA11yPanelAxes([\n * { axis: 'textScale', reset: 'md', options: [\n * { value: 'md' },\n * { value: 'lg', label: 'Bigger' },\n * ] },\n * ]),\n * );\n * ```\n *\n * @category ui/a11y\n * @relatedTo provideA11yPanelConfig\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/a11y/a11y-panel.config.ts\n * @since 0.1.0\n */\nexport function withA11yPanelAxes(\n payload: readonly CngxA11yPanelAxisSpec[] | Signal<readonly CngxA11yPanelAxisSpec[]>,\n): CngxA11yPanelConfigFeature {\n return { kind: 'axes', payload };\n}\n\n/**\n * Application-root configuration cascade for the accessibility panel. Pass any\n * combination of `with*` features in `bootstrapApplication`'s providers;\n * supplied features merge with the library defaults, so consumers only declare\n * what they override.\n *\n * @category ui/a11y\n * @relatedTo withA11yPanelLabels\n * @relatedTo withA11yPanelAxes\n * @relatedTo injectA11yPanelConfig\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/a11y/a11y-panel.config.ts\n * @since 0.1.0\n */\nexport function provideA11yPanelConfig(\n ...features: CngxA11yPanelConfigFeature[]\n): EnvironmentProviders {\n // Empty-features: leave the root default reference untouched so downstream\n // identity comparisons stay stable.\n if (features.length === 0) {\n return makeEnvironmentProviders([]);\n }\n return makeEnvironmentProviders([\n {\n provide: CNGX_A11Y_PANEL_CONFIG,\n useValue: applyFeatures(CNGX_A11Y_PANEL_DEFAULTS, features),\n },\n ]);\n}\n\n/**\n * Component-scoped configuration override. Pass into a component's or\n * directive's `viewProviders`; features merge on top of the parent config (an\n * enclosing scope or the application root), so one panel can re-scope its axis\n * subset or labels without disturbing the rest of the app. This is the\n * component-scope tier of the resolution cascade: `provideA11yPanelConfigAt`\n * (nearest) wins over `provideA11yPanelConfig` (root), which wins over the\n * library defaults.\n *\n * ```ts\n * @Component({\n * viewProviders: [\n * provideA11yPanelConfigAt(withA11yPanelAxes([\n * { axis: 'textScale', reset: 'md', options: [\n * { value: 'md', label: 'Default' },\n * { value: 'lg', label: 'Large' },\n * ] },\n * ])),\n * ],\n * })\n * ```\n *\n * @category ui/a11y\n * @relatedTo provideA11yPanelConfig\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/a11y/a11y-panel.config.ts\n * @since 0.1.0\n */\nexport function provideA11yPanelConfigAt(...features: CngxA11yPanelConfigFeature[]): Provider[] {\n return [\n {\n provide: CNGX_A11Y_PANEL_CONFIG,\n useFactory: (parent: CngxA11yPanelConfig | null) =>\n applyFeatures(parent ?? CNGX_A11Y_PANEL_DEFAULTS, features),\n deps: [[new SkipSelf(), new Optional(), CNGX_A11Y_PANEL_CONFIG]],\n },\n ];\n}\n\n/**\n * Convenience accessor for the resolved panel configuration. Runs in an\n * injection context; resolves through the cascade. Equivalent to\n * `inject(CNGX_A11Y_PANEL_CONFIG)`.\n *\n * @category ui/a11y\n * @relatedTo provideA11yPanelConfig\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/a11y/a11y-panel.config.ts\n * @since 0.1.0\n */\nexport function injectA11yPanelConfig(): CngxA11yPanelConfig {\n return inject(CNGX_A11Y_PANEL_CONFIG);\n}\n\n/**\n * The resolved text bundle of the panel config in scope, as a Signal that\n * follows a runtime language switch: the config overrides over the `a11yPanel`\n * section of the active pack, the `axes` record merged key by key. A key the\n * config leaves unset, `null` or `undefined` reads the section. Runs in an\n * injection context; read it inside a `computed()`, a template or a handler.\n *\n * @category ui/a11y\n * @relatedTo withA11yPanelLabels\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/a11y/a11y-panel.config.ts\n * @since 0.1.0\n */\nexport function injectA11yPanelLabels(): Signal<CngxA11yPanelLabels> {\n const section = injectA11yPanelSiteCopy().labels;\n return createDefaultsFill<CngxA11yPanelLabels, 'axes'>(\n createNestedOverrideMerge<CngxA11yPanelLabels, 'axes'>(\n section,\n injectA11yPanelConfig().labels,\n 'axes',\n ),\n section,\n 'axes',\n );\n}\n\n/** Options keyed by their array, then by the option-label record they were resolved against. */\nconst RESOLVED_OPTIONS = new WeakMap<\n readonly CngxA11yPanelAxisOption[],\n WeakMap<object, readonly CngxA11yPanelAxisOption[]>\n>();\n\n/** `options` with every missing label read from `labels`, by value. Memoized per input pair. */\nfunction resolveOptions(\n options: readonly CngxA11yPanelAxisOption[],\n labels: Readonly<Record<string, string>>,\n): readonly CngxA11yPanelAxisOption[] {\n let byLabels = RESOLVED_OPTIONS.get(options);\n if (!byLabels) {\n byLabels = new WeakMap();\n RESOLVED_OPTIONS.set(options, byLabels);\n }\n let resolved = byLabels.get(labels);\n if (!resolved) {\n resolved = options.map((option) =>\n option.label === undefined ? { ...option, label: labels[option.value] } : option,\n );\n byLabels.set(labels, resolved);\n }\n return resolved;\n}\n\n/** Axis lists are equal when every spec keeps its axis, reset target and options array. */\nfunction sameAxes(\n a: readonly CngxA11yPanelAxisSpec[],\n b: readonly CngxA11yPanelAxisSpec[],\n): boolean {\n return (\n a.length === b.length &&\n a.every(\n (spec, i) =>\n spec.axis === b[i].axis && spec.reset === b[i].reset && spec.options === b[i].options,\n )\n );\n}\n\n/** Resolved axis lists, memoized per config object and option-label signal. */\nconst RESOLVED_AXES = new WeakMap<\n CngxA11yPanelConfig,\n WeakMap<Signal<CngxA11yPanelOptionLabels>, Signal<readonly CngxA11yPanelAxisSpec[]>>\n>();\n\n/** The axis list with every option label filled. Kept out of a field initializer for compodocx. */\nfunction resolveAxes(\n axes: readonly CngxA11yPanelAxisSpec[],\n optionLabels: CngxA11yPanelOptionLabels,\n): readonly CngxA11yPanelAxisSpec[] {\n return axes.map(\n (spec) =>\n ({\n ...spec,\n options: resolveOptions(spec.options, optionLabels[spec.axis]),\n }) as CngxA11yPanelAxisSpec,\n );\n}\n\n/**\n * The resolved axis list of the panel config in scope (values, option labels\n * and reset targets), as a Signal that follows a runtime language switch.\n * Every option without its own `label` carries the label for its value from\n * the `a11yPanel` section of the active pack. Runs in an injection context.\n *\n * @category ui/a11y\n * @relatedTo withA11yPanelAxes\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/a11y/a11y-panel.config.ts\n * @since 0.1.0\n */\nexport function injectA11yPanelAxes(): Signal<readonly CngxA11yPanelAxisSpec[]> {\n const config = injectA11yPanelConfig();\n const optionLabels = injectA11yPanelSiteCopy().options;\n let byLabels = RESOLVED_AXES.get(config);\n if (!byLabels) {\n byLabels = new WeakMap();\n RESOLVED_AXES.set(config, byLabels);\n }\n const cached = byLabels.get(optionLabels);\n if (cached) {\n return cached;\n }\n const axes = coerceSignal(config.axes);\n const resolved = computed(() => resolveAxes(axes(), optionLabels()), { equal: sameAxes });\n byLabels.set(optionLabels, resolved);\n return resolved;\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n ViewEncapsulation,\n type Signal,\n type WritableSignal,\n} from '@angular/core';\nimport { CngxLiveAnnouncer } from '@cngx/common/a11y';\nimport { CngxButtonToggle, CngxButtonToggleGroup } from '@cngx/common/interactive';\nimport { CngxCard, CngxCardBody, CngxCardFooter, CngxCardHeader } from '@cngx/common/card';\nimport { injectA11yPreferences } from '@cngx/core';\nimport { nextUid } from '@cngx/core/utils';\n\nimport {\n type CngxA11yPanelAxis,\n type CngxA11yPanelAxisOption,\n type CngxA11yPanelAxisSpec,\n type CngxA11yPanelLabels,\n injectA11yPanelAxes,\n injectA11yPanelLabels,\n} from './a11y-panel.config';\n\n/**\n * One rendered axis group, resolved once from the config against the\n * matching preference signal. `value` reads the current axis value as a\n * string; `commit` writes a picked option back through the same signal.\n * @internal\n */\ninterface CngxA11yPanelAxisView {\n readonly axis: CngxA11yPanelAxis;\n readonly label: string;\n readonly labelId: string;\n readonly options: readonly CngxA11yPanelAxisOption[];\n readonly value: Signal<string>;\n readonly commit: (next: string | undefined) => void;\n}\n\n/** Views are equal when every group keeps its axis, label and options. */\nfunction sameAxisViews(\n a: readonly CngxA11yPanelAxisView[],\n b: readonly CngxA11yPanelAxisView[],\n): boolean {\n return (\n a.length === b.length &&\n a.every(\n (view, i) =>\n view.axis === b[i].axis && view.label === b[i].label && view.options === b[i].options,\n )\n );\n}\n\n/**\n * Batteries-included accessibility preferences card. Renders one labelled\n * `cngx-button-toggle-group` per configured axis (spacing/density, text size,\n * motion, contrast), each split-bound to the app-wide preference signal from\n * `injectA11yPreferences()`, plus a Reset that restores every axis to its\n * library default and announces the change.\n *\n * It ships no trigger, no overlay, and no placement of its own - it is a plain\n * in-flow `CngxCard`. The consumer decides where it appears: inline, inside a\n * `CngxDrawer`, inside a `CngxDialog`, or behind their own popover trigger.\n * This mirrors `CngxListbox` under `CngxSelect` - the panel owns the axis\n * controls, the consumer owns the overlay.\n *\n * Composition over reinvention (Pillar 3): the shell is `CngxCard`, each\n * control is `CngxButtonToggleGroup` (roving tabindex + `model` value), and the\n * Reset announcement rides the shared root `CngxLiveAnnouncer` - no hand-rolled\n * card, control, or live region. The axis ARIA is the toggle group's own\n * reactive `computed()` output (Pillar 2).\n *\n * ```html\n * <cngx-a11y-panel />\n * ```\n *\n * @category ui/a11y\n * @docsKind primary\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/a11y/a11y-panel.component.ts\n * @selector cngx-a11y-panel\n * @since 0.1.0\n * @relatedTo CngxCard, CngxButtonToggleGroup, CngxLiveAnnouncer, provideA11yPreferences, provideA11yPanelConfig\n * <example-url>http://localhost:4200/#/ui/a11y/panel/inline</example-url>\n */\n@Component({\n selector: 'cngx-a11y-panel',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [\n CngxCard,\n CngxCardHeader,\n CngxCardBody,\n CngxCardFooter,\n CngxButtonToggleGroup,\n CngxButtonToggle,\n ],\n templateUrl: './a11y-panel.component.html',\n styleUrls: ['./a11y-panel.component.css'],\n host: { class: 'cngx-a11y-panel-host' },\n})\nexport class CngxA11yPanel {\n private readonly announcer = inject(CngxLiveAnnouncer);\n private readonly prefs = injectA11yPreferences();\n protected readonly labels = injectA11yPanelLabels();\n private readonly axes = injectA11yPanelAxes();\n private readonly uid = nextUid('cngx-a11y-panel');\n\n /**\n * The axis groups to render, rebuilt when the axis list or the labels change\n * so both follow a language switch. A rebuild that yields the same axes,\n * labels and options keeps the previous array. Each view's `value` is the\n * axis preference itself, so picking an option re-renders only that group.\n */\n protected readonly axisViews = computed(\n () => this.buildAxisViews(this.axes(), this.labels()),\n { equal: sameAxisViews },\n );\n\n // Kept as a method, not an inline `.map()` field initializer: compodocx's\n // property-default serializer catastrophically backtracks on a `.map` that\n // returns object literals with nested arrow functions, hanging docs:json.\n private buildAxisViews(\n axes: readonly CngxA11yPanelAxisSpec[],\n labels: CngxA11yPanelLabels,\n ): readonly CngxA11yPanelAxisView[] {\n return axes.map((spec) => {\n // `CngxA11yPanelAxisSpec` is a discriminated union whose options/reset are\n // typed to each axis' value union, so every value reaching this write is\n // compile-checked valid. Erasing the invariant signal type to `string`\n // here is then safe-by-construction - the union just can't be narrowed\n // through a runtime `spec.axis` index without duplicating the map per axis.\n const sig = this.prefs[spec.axis] as unknown as WritableSignal<string>;\n return {\n axis: spec.axis,\n label: labels.axes[spec.axis],\n labelId: `${this.uid}-${spec.axis}`,\n options: spec.options,\n value: sig.asReadonly(),\n commit: (next: string | undefined) => {\n // `CngxButtonToggleGroup.value` is `model<T | undefined>`; this group\n // never deselects, so `undefined` is never emitted, but the guard\n // keeps the non-undefined axis setter type-safe under strictTemplates.\n if (next !== undefined) {\n sig.set(next);\n }\n },\n };\n });\n }\n\n protected reset(): void {\n for (const spec of this.axes()) {\n (this.prefs[spec.axis] as unknown as WritableSignal<string>).set(spec.reset);\n }\n // Bulk multi-axis change with focus staying on Reset: announce it (Pillar 2)\n // through the shared root live region rather than a private one.\n this.announcer.announce(this.labels().resetMessage);\n }\n}\n","<cngx-card class=\"cngx-a11y-panel\">\n <header cngxCardHeader class=\"cngx-a11y-panel__header\">\n <ng-content select=\"[cngxA11yPanelHeader]\">\n <h2 class=\"cngx-a11y-panel__heading\">{{ labels().heading }}</h2>\n </ng-content>\n </header>\n\n <div cngxCardBody class=\"cngx-a11y-panel__body\">\n @for (axis of axisViews(); track axis.axis) {\n <div class=\"cngx-a11y-panel__axis\">\n <span class=\"cngx-a11y-panel__axis-label\" [id]=\"axis.labelId\">{{ axis.label }}</span>\n <cngx-button-toggle-group\n class=\"cngx-a11y-panel__group\"\n [labelledBy]=\"axis.labelId\"\n [value]=\"axis.value()\"\n (valueChange)=\"axis.commit($event)\"\n >\n @for (option of axis.options; track option.value) {\n <button cngxButtonToggle [value]=\"option.value\">{{ option.label }}</button>\n }\n </cngx-button-toggle-group>\n </div>\n }\n </div>\n\n <footer cngxCardFooter class=\"cngx-a11y-panel__footer\">\n <button type=\"button\" class=\"cngx-a11y-panel__reset\" (click)=\"reset()\">\n {{ labels().reset }}\n </button>\n </footer>\n</cngx-card>\n","/**\n * @module @cngx/ui/a11y\n */\n\nexport { CngxA11yPanel } from './a11y-panel.component';\n\nexport {\n CNGX_A11Y_PANEL_CONFIG,\n CNGX_A11Y_PANEL_DEFAULTS,\n provideA11yPanelConfig,\n provideA11yPanelConfigAt,\n withA11yPanelLabels,\n withA11yPanelAxes,\n injectA11yPanelConfig,\n injectA11yPanelLabels,\n injectA11yPanelAxes,\n} from './a11y-panel.config';\nexport type {\n CngxA11yPanelConfig,\n CngxA11yPanelAxis,\n CngxA11yPanelAxisSpec,\n CngxA11yPanelAxisOption,\n CngxA11yPanelLabels,\n CngxA11yPanelLabelsOverride,\n CngxA11yPanelConfigFeature,\n} from './a11y-panel.config';\nexport {\n CNGX_A11Y_PANEL_LANGUAGE_EN,\n type CngxA11yPanelLanguageSection,\n} from './i18n/a11y-panel-language-section';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;AAqCA;;;;;;;;AAQG;AACI,MAAM,2BAA2B,GAAiC;AACvE,IAAA,OAA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wBAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACd,YAAY,EAAA,QAAA,EAAA,gBAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACZ,cAAc,EAAA,QAAA,EAAA,wBAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACd,qBAAqB,yUACrB,gBAAgB,EAAA,QAAA,EAAA,0BAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,UAAA,EAAA,iBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAMP,aAAa,EAAA,UAAA,EAAA,CAAA;kBAjBzB,SAAS;+BACE,iBAAiB,EAAA,UAAA,EACf,IAAI,EAAA,eAAA,EACC,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,iBAAiB,CAAC,IAAI,EAAA,OAAA,EAC5B;wBACP,QAAQ;wBACR,cAAc;wBACd,YAAY;wBACZ,cAAc;wBACd,qBAAqB;wBACrB,gBAAgB;AACjB,qBAAA,EAAA,IAAA,EAGK,EAAE,KAAK,EAAE,sBAAsB,EAAE,EAAA,QAAA,EAAA,ypCAAA,EAAA,MAAA,EAAA,CAAA,w1CAAA,CAAA,EAAA;;;AEpGzC;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"cngx-ui-a11y.mjs","sources":["../../../projects/ui/a11y/i18n/a11y-panel-language-section.ts","../../../projects/ui/a11y/i18n/a11y-panel-i18n.ts","../../../projects/ui/a11y/a11y-panel.config.ts","../../../projects/ui/a11y/a11y-panel.component.ts","../../../projects/ui/a11y/a11y-panel.component.html","../../../projects/ui/a11y/public-api.ts","../../../projects/ui/a11y/cngx-ui-a11y.ts"],"sourcesContent":["import type {\n CngxContrastPreference,\n CngxDensityValue,\n CngxMotionPreference,\n CngxTextScaleValue,\n} from '@cngx/core';\n\n/**\n * The accessibility-panel section of a {@link CngxLanguagePack}: the copy of\n * `CngxA11yPanel`. The text keys feed the `labels` of `CNGX_A11Y_PANEL_CONFIG`\n * (a key set through `withA11yPanelLabels` still wins); the four option\n * records label the toggle options by value, so an axis list from\n * `withA11yPanelAxes` without option labels reads them from here.\n *\n * @since 0.3.0\n * @relatedTo CNGX_A11Y_PANEL_CONFIG, withA11yPanelLabels, withA11yPanelAxes\n */\nexport interface CngxA11yPanelLanguageSection {\n /** Default heading, shown when no `[cngxA11yPanelHeader]` slot is projected. */\n readonly heading: string;\n /** Reset control label. */\n readonly reset: string;\n /** Announced when Reset restores every axis. */\n readonly resetMessage: string;\n /** Group label (the accessible name) per axis. */\n readonly axes: Readonly<Record<'density' | 'textScale' | 'motion' | 'contrast', string>>;\n /** Option labels of the spacing group, by value. */\n readonly density: Readonly<Record<CngxDensityValue, string>>;\n /** Option labels of the text-size group, by value. */\n readonly textScale: Readonly<Record<CngxTextScaleValue, string>>;\n /** Option labels of the motion group, by value. */\n readonly motion: Readonly<Record<CngxMotionPreference, string>>;\n /** Option labels of the contrast group, by value. */\n readonly contrast: Readonly<Record<CngxContrastPreference, string>>;\n}\n\n/**\n * The English accessibility-panel section: the single source of the panel's\n * English copy. The `CNGX_A11Y_PANEL_CONFIG` labels and option labels default\n * to it.\n *\n * @since 0.3.0\n * @relatedTo CNGX_A11Y_PANEL_CONFIG\n */\nexport const CNGX_A11Y_PANEL_LANGUAGE_EN: CngxA11yPanelLanguageSection = {\n heading: 'Accessibility',\n reset: 'Reset to defaults',\n resetMessage: 'Preferences reset to defaults',\n axes: {\n density: 'Spacing',\n textScale: 'Text size',\n motion: 'Motion',\n contrast: 'Contrast',\n },\n density: { compact: 'Compact', comfortable: 'Comfortable', spacious: 'Spacious' },\n textScale: { sm: 'Small', md: 'Default', lg: 'Large' },\n motion: { full: 'Full', reduced: 'Reduced', auto: 'System' },\n contrast: { normal: 'Normal', more: 'More', auto: 'System' },\n};\n\ndeclare module '@cngx/core/i18n' {\n interface CngxLanguagePack {\n readonly a11yPanel: CngxA11yPanelLanguageSection;\n }\n}\n","import { computed, inject, InjectionToken, type Signal } from '@angular/core';\n\nimport { createLanguageSection, createSectionBundle } from '@cngx/core/i18n';\nimport { recordEqual } from '@cngx/utils';\n\nimport type { CngxA11yPanelAxis, CngxA11yPanelLabels } from '../a11y-panel.config';\nimport {\n CNGX_A11Y_PANEL_LANGUAGE_EN,\n type CngxA11yPanelLanguageSection,\n} from './a11y-panel-language-section';\n\n/** @internal Option labels by axis, then by value. */\nexport type CngxA11yPanelOptionLabels = Readonly<\n Record<CngxA11yPanelAxis, Readonly<Record<string, string>>>\n>;\n\n/** @internal The panel copy of one section, split into config labels and option labels. */\nexport interface CngxA11yPanelCopy {\n readonly labels: CngxA11yPanelLabels;\n readonly options: CngxA11yPanelOptionLabels;\n}\n\n/** @internal Turns an accessibility-panel section into the panel copy. Pure. */\nexport function a11yPanelCopyFrom(section: CngxA11yPanelLanguageSection): CngxA11yPanelCopy {\n return {\n labels: {\n axes: section.axes,\n reset: section.reset,\n heading: section.heading,\n resetMessage: section.resetMessage,\n },\n options: {\n density: section.density,\n textScale: section.textScale,\n motion: section.motion,\n contrast: section.contrast,\n },\n };\n}\n\n/** @internal The accessibility-panel section of the active pack over the English section. */\nconst injectA11yPanelLanguage = createLanguageSection('a11yPanel', CNGX_A11Y_PANEL_LANGUAGE_EN);\n\n/** @internal Builds and reads the section copy. */\nconst a11yPanelBundle = createSectionBundle<CngxA11yPanelLanguageSection, CngxA11yPanelCopy>({\n section: injectA11yPanelLanguage,\n toBundle: a11yPanelCopyFrom,\n});\n\n/**\n * @internal The panel copy of the active pack. Private: consumers override the\n * text through `withA11yPanelLabels`, option labels through `withA11yPanelAxes`.\n */\nconst A11Y_PANEL_SECTION_COPY = new InjectionToken<Signal<CngxA11yPanelCopy>>(\n 'CngxA11yPanelSectionCopy',\n { providedIn: 'root', factory: () => a11yPanelBundle.build() },\n);\n\ninterface SiteDefaults {\n readonly labels: Signal<CngxA11yPanelLabels>;\n readonly options: Signal<CngxA11yPanelOptionLabels>;\n}\n\nconst SITES = new WeakMap<Signal<CngxA11yPanelCopy>, SiteDefaults>();\n\n/**\n * @internal The panel copy at the reading site, each part its own signal.\n * Memoized per copy signal. Injection context required.\n */\nexport function injectA11yPanelSiteCopy(): SiteDefaults {\n const copy = a11yPanelBundle.resolve(inject(A11Y_PANEL_SECTION_COPY));\n let site = SITES.get(copy);\n if (!site) {\n site = {\n labels: computed(() => copy().labels, { equal: recordEqual }),\n options: computed(() => copy().options, { equal: recordEqual }),\n };\n SITES.set(copy, site);\n }\n return site;\n}\n","import {\n computed,\n inject,\n InjectionToken,\n makeEnvironmentProviders,\n Optional,\n SkipSelf,\n type EnvironmentProviders,\n type Provider,\n type Signal,\n} from '@angular/core';\nimport type {\n CngxContrastPreference,\n CngxDensityValue,\n CngxMotionPreference,\n CngxTextScaleValue,\n} from '@cngx/core';\nimport { coerceSignal, createDefaultsFill, createNestedOverrideMerge } from '@cngx/core/utils';\n\nimport { injectA11yPanelSiteCopy, type CngxA11yPanelOptionLabels } from './i18n/a11y-panel-i18n';\n\n/**\n * The four accessibility axes the panel can render a control group for.\n * Each maps 1:1 onto a writable signal returned by `injectA11yPreferences()`.\n *\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/a11y/a11y-panel.config.ts\n * @since 0.3.0\n */\nexport type CngxA11yPanelAxis = 'density' | 'textScale' | 'motion' | 'contrast';\n\n/**\n * One selectable option in an axis control group: the value written to the\n * axis signal plus the visible/toggle label. `V` is the axis' own value union\n * (e.g. `CngxDensityValue`), so a misspelled value fails to compile rather\n * than reaching the global preference signal. An option without a `label`\n * reads it from the `a11yPanel` section of the language pack, by value.\n *\n * @relatedTo withA11yPanelAxes\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/a11y/a11y-panel.config.ts\n * @since 0.3.0\n */\nexport interface CngxA11yPanelAxisOption<V extends string = string> {\n /** Value written to the axis signal - a valid member of that axis' union. */\n readonly value: V;\n /**\n * Toggle-button label. Leave it out to read the label for `value` from the\n * `a11yPanel` section of the language pack (English without one), so the\n * option follows a language switch. A label set here wins.\n */\n readonly label?: string;\n}\n\n/**\n * A rendered axis control group: which axis, its ordered options, and the\n * value Reset restores (the axis' own library default). This is a\n * discriminated union on `axis`, so `options` and `reset` are typed to that\n * axis' value union - a `{ axis: 'density', reset: 'x' }` is a compile error,\n * not a garbage value written to `<html data-density>`. Reorder or drop axes\n * by supplying a subset via `withA11yPanelAxes`.\n *\n * @relatedTo withA11yPanelAxes\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/a11y/a11y-panel.config.ts\n * @since 0.3.0\n */\nexport type CngxA11yPanelAxisSpec =\n | {\n readonly axis: 'density';\n readonly options: readonly CngxA11yPanelAxisOption<CngxDensityValue>[];\n readonly reset: CngxDensityValue;\n }\n | {\n readonly axis: 'textScale';\n readonly options: readonly CngxA11yPanelAxisOption<CngxTextScaleValue>[];\n readonly reset: CngxTextScaleValue;\n }\n | {\n readonly axis: 'motion';\n readonly options: readonly CngxA11yPanelAxisOption<CngxMotionPreference>[];\n readonly reset: CngxMotionPreference;\n }\n | {\n readonly axis: 'contrast';\n readonly options: readonly CngxA11yPanelAxisOption<CngxContrastPreference>[];\n readonly reset: CngxContrastPreference;\n };\n\n/**\n * Panel text: per-axis group labels, the Reset control label, the default\n * heading (shown when no `[cngxA11yPanelHeader]` is projected), and the\n * live-region message announced on Reset. The defaults come from the\n * `a11yPanel` section of the language pack (English without one); override\n * single keys via {@link withA11yPanelLabels}.\n *\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/a11y/a11y-panel.config.ts\n * @since 0.3.0\n */\nexport interface CngxA11yPanelLabels {\n /** Group label (the accessible name) per axis. */\n readonly axes: Readonly<Record<CngxA11yPanelAxis, string>>;\n /** Reset control label. */\n readonly reset: string;\n /** Default heading, shown when no `[cngxA11yPanelHeader]` slot is projected. */\n readonly heading: string;\n /** Live-announced when Reset restores every axis. */\n readonly resetMessage: string;\n}\n\n/**\n * Resolved panel configuration - the text overrides plus the ordered axis\n * list. Merged from the library defaults and any `with*` features by the\n * reducer in {@link provideA11yPanelConfig}.\n *\n * `labels` holds overrides only: unset by default, a value or a `Signal` once\n * {@link withA11yPanelLabels} ran; every key it leaves out reads the\n * `a11yPanel` section of the language pack. `axes` accepts a value or a\n * `Signal`; its option labels are optional and default to the section. Read\n * both through {@link injectA11yPanelLabels} and {@link injectA11yPanelAxes}.\n *\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/a11y/a11y-panel.config.ts\n * @since 0.3.0\n */\nexport interface CngxA11yPanelConfig {\n readonly labels?: CngxA11yPanelLabelsOverride | Signal<CngxA11yPanelLabelsOverride>;\n readonly axes: readonly CngxA11yPanelAxisSpec[] | Signal<readonly CngxA11yPanelAxisSpec[]>;\n}\n\n/**\n * Partial text override accepted by `withA11yPanelLabels`. The `axes`\n * record merges key-by-key, so a consumer can relabel one axis group without\n * restating the rest.\n *\n * @relatedTo withA11yPanelLabels\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/a11y/a11y-panel.config.ts\n * @since 0.3.0\n */\nexport interface CngxA11yPanelLabelsOverride {\n readonly axes?: Partial<Record<CngxA11yPanelAxis, string>>;\n readonly reset?: string;\n readonly heading?: string;\n readonly resetMessage?: string;\n}\n\n/**\n * Library defaults: the four axes in their default order, each with its reset\n * value. Carries no copy - the text and the option labels are the `a11yPanel`\n * section of the language pack. Override via {@link provideA11yPanelConfig}.\n */\nexport const CNGX_A11Y_PANEL_DEFAULTS: CngxA11yPanelConfig & {\n readonly axes: readonly CngxA11yPanelAxisSpec[];\n} = {\n axes: [\n {\n axis: 'density',\n reset: 'comfortable',\n options: [{ value: 'compact' }, { value: 'comfortable' }, { value: 'spacious' }],\n },\n {\n axis: 'textScale',\n reset: 'md',\n options: [{ value: 'sm' }, { value: 'md' }, { value: 'lg' }],\n },\n {\n axis: 'motion',\n reset: 'auto',\n options: [{ value: 'full' }, { value: 'reduced' }, { value: 'auto' }],\n },\n {\n axis: 'contrast',\n reset: 'auto',\n options: [{ value: 'normal' }, { value: 'more' }, { value: 'auto' }],\n },\n ],\n};\n\nconst NO_LABELS: CngxA11yPanelLabelsOverride = {};\n\n/**\n * Configuration cascade token. Resolution priority (high to low):\n * `provideA11yPanelConfigAt(...)` in a component's `viewProviders`, then\n * `provideA11yPanelConfig(...)` at the application root, then the library\n * defaults.\n *\n * @relatedTo provideA11yPanelConfig\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/a11y/a11y-panel.config.ts\n * @since 0.3.0\n */\nexport const CNGX_A11Y_PANEL_CONFIG = new InjectionToken<CngxA11yPanelConfig>(\n 'CngxA11yPanelConfig',\n {\n providedIn: 'root',\n factory: () => CNGX_A11Y_PANEL_DEFAULTS,\n },\n);\n\n/**\n * A single configuration override produced by a `with*` feature factory. The\n * reducer in {@link provideA11yPanelConfig} matches on `kind`: `labels` deep-\n * merges the text bundle, `axes` replaces the axis list wholesale.\n *\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/a11y/a11y-panel.config.ts\n * @since 0.3.0\n */\nexport type CngxA11yPanelConfigFeature =\n | {\n readonly kind: 'labels';\n readonly payload: CngxA11yPanelLabelsOverride | Signal<CngxA11yPanelLabelsOverride>;\n }\n | {\n readonly kind: 'axes';\n readonly payload: readonly CngxA11yPanelAxisSpec[] | Signal<readonly CngxA11yPanelAxisSpec[]>;\n };\n\n/** Reduce a feature list onto a base config, merging text and axes in isolation. */\nfunction applyFeatures(\n base: CngxA11yPanelConfig,\n features: readonly CngxA11yPanelConfigFeature[],\n): CngxA11yPanelConfig {\n let labels = base.labels;\n let axes = base.axes;\n for (const feature of features) {\n if (feature.kind === 'labels') {\n labels = createNestedOverrideMerge(labels ?? NO_LABELS, feature.payload, 'axes');\n } else {\n axes = feature.payload;\n }\n }\n return { labels, axes };\n}\n\n/**\n * Override any subset of the panel text - axis group labels, the Reset label,\n * the default heading, or the Reset announcement. The `axes` record merges\n * key-by-key, so a single axis can be relabelled in isolation. Pass a `Signal`\n * to switch the language at runtime.\n *\n * ```ts\n * provideA11yPanelConfig(\n * withA11yPanelLabels({\n * heading: 'Barrierefreiheit',\n * axes: { motion: 'Bewegung' },\n * resetMessage: 'Einstellungen zurueckgesetzt',\n * }),\n * );\n * ```\n *\n * @relatedTo provideA11yPanelConfig\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/a11y/a11y-panel.config.ts\n * @since 0.3.0\n */\nexport function withA11yPanelLabels(\n payload: CngxA11yPanelLabelsOverride | Signal<CngxA11yPanelLabelsOverride>,\n): CngxA11yPanelConfigFeature {\n return { kind: 'labels', payload };\n}\n\n/**\n * Replace the rendered axis list - reorder groups, drop an axis, or restrict\n * the options a group offers. Supplying a subset renders only those groups.\n * Leave an option's `label` out and it reads the `a11yPanel` section of the\n * language pack, so the options translate without restating the list; pass a\n * `Signal` to relabel options you set yourself on a runtime language switch.\n *\n * ```ts\n * provideA11yPanelConfig(\n * withA11yPanelAxes([\n * { axis: 'textScale', reset: 'md', options: [\n * { value: 'md' },\n * { value: 'lg', label: 'Bigger' },\n * ] },\n * ]),\n * );\n * ```\n *\n * @relatedTo provideA11yPanelConfig\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/a11y/a11y-panel.config.ts\n * @since 0.3.0\n */\nexport function withA11yPanelAxes(\n payload: readonly CngxA11yPanelAxisSpec[] | Signal<readonly CngxA11yPanelAxisSpec[]>,\n): CngxA11yPanelConfigFeature {\n return { kind: 'axes', payload };\n}\n\n/**\n * Application-root configuration cascade for the accessibility panel. Pass any\n * combination of `with*` features in `bootstrapApplication`'s providers;\n * supplied features merge with the library defaults, so consumers only declare\n * what they override.\n *\n * @relatedTo withA11yPanelLabels\n * @relatedTo withA11yPanelAxes\n * @relatedTo injectA11yPanelConfig\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/a11y/a11y-panel.config.ts\n * @since 0.3.0\n */\nexport function provideA11yPanelConfig(\n ...features: CngxA11yPanelConfigFeature[]\n): EnvironmentProviders {\n // Empty-features: leave the root default reference untouched so downstream\n // identity comparisons stay stable.\n if (features.length === 0) {\n return makeEnvironmentProviders([]);\n }\n return makeEnvironmentProviders([\n {\n provide: CNGX_A11Y_PANEL_CONFIG,\n useValue: applyFeatures(CNGX_A11Y_PANEL_DEFAULTS, features),\n },\n ]);\n}\n\n/**\n * Component-scoped configuration override. Pass into a component's or\n * directive's `viewProviders`; features merge on top of the parent config (an\n * enclosing scope or the application root), so one panel can re-scope its axis\n * subset or labels without disturbing the rest of the app. This is the\n * component-scope tier of the resolution cascade: `provideA11yPanelConfigAt`\n * (nearest) wins over `provideA11yPanelConfig` (root), which wins over the\n * library defaults.\n *\n * ```ts\n * @Component({\n * viewProviders: [\n * provideA11yPanelConfigAt(withA11yPanelAxes([\n * { axis: 'textScale', reset: 'md', options: [\n * { value: 'md', label: 'Default' },\n * { value: 'lg', label: 'Large' },\n * ] },\n * ])),\n * ],\n * })\n * ```\n *\n * @relatedTo provideA11yPanelConfig\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/a11y/a11y-panel.config.ts\n * @since 0.3.0\n */\nexport function provideA11yPanelConfigAt(...features: CngxA11yPanelConfigFeature[]): Provider[] {\n return [\n {\n provide: CNGX_A11Y_PANEL_CONFIG,\n useFactory: (parent: CngxA11yPanelConfig | null) =>\n applyFeatures(parent ?? CNGX_A11Y_PANEL_DEFAULTS, features),\n deps: [[new SkipSelf(), new Optional(), CNGX_A11Y_PANEL_CONFIG]],\n },\n ];\n}\n\n/**\n * Convenience accessor for the resolved panel configuration. Runs in an\n * injection context; resolves through the cascade. Equivalent to\n * `inject(CNGX_A11Y_PANEL_CONFIG)`.\n *\n * @relatedTo provideA11yPanelConfig\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/a11y/a11y-panel.config.ts\n * @since 0.3.0\n */\nexport function injectA11yPanelConfig(): CngxA11yPanelConfig {\n return inject(CNGX_A11Y_PANEL_CONFIG);\n}\n\n/**\n * The resolved text bundle of the panel config in scope, as a Signal that\n * follows a runtime language switch: the config overrides over the `a11yPanel`\n * section of the active pack, the `axes` record merged key by key. A key the\n * config leaves unset, `null` or `undefined` reads the section. Runs in an\n * injection context; read it inside a `computed()`, a template or a handler.\n *\n * @relatedTo withA11yPanelLabels\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/a11y/a11y-panel.config.ts\n * @since 0.3.0\n */\nexport function injectA11yPanelLabels(): Signal<CngxA11yPanelLabels> {\n const section = injectA11yPanelSiteCopy().labels;\n return createDefaultsFill<CngxA11yPanelLabels, 'axes'>(\n createNestedOverrideMerge<CngxA11yPanelLabels, 'axes'>(\n section,\n injectA11yPanelConfig().labels,\n 'axes',\n ),\n section,\n 'axes',\n );\n}\n\n/** Options keyed by their array, then by the option-label record they were resolved against. */\nconst RESOLVED_OPTIONS = new WeakMap<\n readonly CngxA11yPanelAxisOption[],\n WeakMap<object, readonly CngxA11yPanelAxisOption[]>\n>();\n\n/** `options` with every missing label read from `labels`, by value. Memoized per input pair. */\nfunction resolveOptions(\n options: readonly CngxA11yPanelAxisOption[],\n labels: Readonly<Record<string, string>>,\n): readonly CngxA11yPanelAxisOption[] {\n let byLabels = RESOLVED_OPTIONS.get(options);\n if (!byLabels) {\n byLabels = new WeakMap();\n RESOLVED_OPTIONS.set(options, byLabels);\n }\n let resolved = byLabels.get(labels);\n if (!resolved) {\n resolved = options.map((option) =>\n option.label === undefined ? { ...option, label: labels[option.value] } : option,\n );\n byLabels.set(labels, resolved);\n }\n return resolved;\n}\n\n/** Axis lists are equal when every spec keeps its axis, reset target and options array. */\nfunction sameAxes(\n a: readonly CngxA11yPanelAxisSpec[],\n b: readonly CngxA11yPanelAxisSpec[],\n): boolean {\n return (\n a.length === b.length &&\n a.every(\n (spec, i) =>\n spec.axis === b[i].axis && spec.reset === b[i].reset && spec.options === b[i].options,\n )\n );\n}\n\n/** Resolved axis lists, memoized per config object and option-label signal. */\nconst RESOLVED_AXES = new WeakMap<\n CngxA11yPanelConfig,\n WeakMap<Signal<CngxA11yPanelOptionLabels>, Signal<readonly CngxA11yPanelAxisSpec[]>>\n>();\n\n/** The axis list with every option label filled. Kept out of a field initializer for compodocx. */\nfunction resolveAxes(\n axes: readonly CngxA11yPanelAxisSpec[],\n optionLabels: CngxA11yPanelOptionLabels,\n): readonly CngxA11yPanelAxisSpec[] {\n return axes.map(\n (spec) =>\n ({\n ...spec,\n options: resolveOptions(spec.options, optionLabels[spec.axis]),\n }) as CngxA11yPanelAxisSpec,\n );\n}\n\n/**\n * The resolved axis list of the panel config in scope (values, option labels\n * and reset targets), as a Signal that follows a runtime language switch.\n * Every option without its own `label` carries the label for its value from\n * the `a11yPanel` section of the active pack. Runs in an injection context.\n *\n * @relatedTo withA11yPanelAxes\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/a11y/a11y-panel.config.ts\n * @since 0.3.0\n */\nexport function injectA11yPanelAxes(): Signal<readonly CngxA11yPanelAxisSpec[]> {\n const config = injectA11yPanelConfig();\n const optionLabels = injectA11yPanelSiteCopy().options;\n let byLabels = RESOLVED_AXES.get(config);\n if (!byLabels) {\n byLabels = new WeakMap();\n RESOLVED_AXES.set(config, byLabels);\n }\n const cached = byLabels.get(optionLabels);\n if (cached) {\n return cached;\n }\n const axes = coerceSignal(config.axes);\n const resolved = computed(() => resolveAxes(axes(), optionLabels()), { equal: sameAxes });\n byLabels.set(optionLabels, resolved);\n return resolved;\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n ViewEncapsulation,\n type Signal,\n type WritableSignal,\n} from '@angular/core';\nimport { CngxLiveAnnouncer } from '@cngx/common/a11y';\nimport { CngxButtonToggle, CngxButtonToggleGroup } from '@cngx/common/interactive';\nimport { CngxCard, CngxCardBody, CngxCardFooter, CngxCardHeader } from '@cngx/common/card';\nimport { injectA11yPreferences } from '@cngx/core';\nimport { nextUid } from '@cngx/core/utils';\n\nimport {\n type CngxA11yPanelAxis,\n type CngxA11yPanelAxisOption,\n type CngxA11yPanelAxisSpec,\n type CngxA11yPanelLabels,\n injectA11yPanelAxes,\n injectA11yPanelLabels,\n} from './a11y-panel.config';\n\n/**\n * One rendered axis group, resolved once from the config against the\n * matching preference signal. `value` reads the current axis value as a\n * string; `commit` writes a picked option back through the same signal.\n * @internal\n */\ninterface CngxA11yPanelAxisView {\n readonly axis: CngxA11yPanelAxis;\n readonly label: string;\n readonly labelId: string;\n readonly options: readonly CngxA11yPanelAxisOption[];\n readonly value: Signal<string>;\n readonly commit: (next: string | undefined) => void;\n}\n\n/** Views are equal when every group keeps its axis, label and options. */\nfunction sameAxisViews(\n a: readonly CngxA11yPanelAxisView[],\n b: readonly CngxA11yPanelAxisView[],\n): boolean {\n return (\n a.length === b.length &&\n a.every(\n (view, i) =>\n view.axis === b[i].axis && view.label === b[i].label && view.options === b[i].options,\n )\n );\n}\n\n/**\n * Batteries-included accessibility preferences card. Renders one labelled\n * `cngx-button-toggle-group` per configured axis (spacing/density, text size,\n * motion, contrast), each split-bound to the app-wide preference signal from\n * `injectA11yPreferences()`, plus a Reset that restores every axis to its\n * library default and announces the change.\n *\n * It ships no trigger, no overlay, and no placement of its own - it is a plain\n * in-flow `CngxCard`. The consumer decides where it appears: inline, inside a\n * `CngxDrawer`, inside a `CngxDialog`, or behind their own popover trigger.\n * This mirrors `CngxListbox` under `CngxSelect` - the panel owns the axis\n * controls, the consumer owns the overlay.\n *\n * Composition over reinvention (Pillar 3): the shell is `CngxCard`, each\n * control is `CngxButtonToggleGroup` (roving tabindex + `model` value), and the\n * Reset announcement rides the shared root `CngxLiveAnnouncer` - no hand-rolled\n * card, control, or live region. The axis ARIA is the toggle group's own\n * reactive `computed()` output (Pillar 2).\n *\n * ```html\n * <cngx-a11y-panel />\n * ```\n *\n * @wcag AA\n * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/a11y/a11y-panel.component.ts\n * @selector cngx-a11y-panel\n * @since 0.3.0\n * @relatedTo CngxCard, CngxButtonToggleGroup, CngxLiveAnnouncer, provideA11yPreferences, provideA11yPanelConfig\n * <example-url>/#/ui/a11y/panel/inline</example-url>\n * @axis level organism\n */\n@Component({\n selector: 'cngx-a11y-panel',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [\n CngxCard,\n CngxCardHeader,\n CngxCardBody,\n CngxCardFooter,\n CngxButtonToggleGroup,\n CngxButtonToggle,\n ],\n templateUrl: './a11y-panel.component.html',\n styleUrls: ['./a11y-panel.component.css'],\n host: { class: 'cngx-a11y-panel-host' },\n})\nexport class CngxA11yPanel {\n private readonly announcer = inject(CngxLiveAnnouncer);\n private readonly prefs = injectA11yPreferences();\n protected readonly labels = injectA11yPanelLabels();\n private readonly axes = injectA11yPanelAxes();\n private readonly uid = nextUid('cngx-a11y-panel');\n\n /**\n * The axis groups to render, rebuilt when the axis list or the labels change\n * so both follow a language switch. A rebuild that yields the same axes,\n * labels and options keeps the previous array. Each view's `value` is the\n * axis preference itself, so picking an option re-renders only that group.\n */\n protected readonly axisViews = computed(\n () => this.buildAxisViews(this.axes(), this.labels()),\n { equal: sameAxisViews },\n );\n\n // Kept as a method, not an inline `.map()` field initializer: compodocx's\n // property-default serializer catastrophically backtracks on a `.map` that\n // returns object literals with nested arrow functions, hanging docs:json.\n private buildAxisViews(\n axes: readonly CngxA11yPanelAxisSpec[],\n labels: CngxA11yPanelLabels,\n ): readonly CngxA11yPanelAxisView[] {\n return axes.map((spec) => {\n // `CngxA11yPanelAxisSpec` is a discriminated union whose options/reset are\n // typed to each axis' value union, so every value reaching this write is\n // compile-checked valid. Erasing the invariant signal type to `string`\n // here is then safe-by-construction - the union just can't be narrowed\n // through a runtime `spec.axis` index without duplicating the map per axis.\n const sig = this.prefs[spec.axis] as unknown as WritableSignal<string>;\n return {\n axis: spec.axis,\n label: labels.axes[spec.axis],\n labelId: `${this.uid}-${spec.axis}`,\n options: spec.options,\n value: sig.asReadonly(),\n commit: (next: string | undefined) => {\n // `CngxButtonToggleGroup.value` is `model<T | undefined>`; this group\n // never deselects, so `undefined` is never emitted, but the guard\n // keeps the non-undefined axis setter type-safe under strictTemplates.\n if (next !== undefined) {\n sig.set(next);\n }\n },\n };\n });\n }\n\n protected reset(): void {\n for (const spec of this.axes()) {\n (this.prefs[spec.axis] as unknown as WritableSignal<string>).set(spec.reset);\n }\n // Bulk multi-axis change with focus staying on Reset: announce it (Pillar 2)\n // through the shared root live region rather than a private one.\n this.announcer.announce(this.labels().resetMessage);\n }\n}\n","<cngx-card class=\"cngx-a11y-panel\">\n <header cngxCardHeader class=\"cngx-a11y-panel__header\">\n <ng-content select=\"[cngxA11yPanelHeader]\">\n <h2 class=\"cngx-a11y-panel__heading\">{{ labels().heading }}</h2>\n </ng-content>\n </header>\n\n <div cngxCardBody class=\"cngx-a11y-panel__body\">\n @for (axis of axisViews(); track axis.axis) {\n <div class=\"cngx-a11y-panel__axis\">\n <span class=\"cngx-a11y-panel__axis-label\" [id]=\"axis.labelId\">{{ axis.label }}</span>\n <cngx-button-toggle-group\n class=\"cngx-a11y-panel__group\"\n [labelledBy]=\"axis.labelId\"\n [value]=\"axis.value()\"\n (valueChange)=\"axis.commit($event)\"\n >\n @for (option of axis.options; track option.value) {\n <button cngxButtonToggle [value]=\"option.value\">{{ option.label }}</button>\n }\n </cngx-button-toggle-group>\n </div>\n }\n </div>\n\n <footer cngxCardFooter class=\"cngx-a11y-panel__footer\">\n <button type=\"button\" class=\"cngx-a11y-panel__reset\" (click)=\"reset()\">\n {{ labels().reset }}\n </button>\n </footer>\n</cngx-card>\n","/**\n * @module `@cngx/ui/a11y`\n */\n\nexport { CngxA11yPanel } from './a11y-panel.component';\n\nexport {\n CNGX_A11Y_PANEL_CONFIG,\n CNGX_A11Y_PANEL_DEFAULTS,\n provideA11yPanelConfig,\n provideA11yPanelConfigAt,\n withA11yPanelLabels,\n withA11yPanelAxes,\n injectA11yPanelConfig,\n injectA11yPanelLabels,\n injectA11yPanelAxes,\n} from './a11y-panel.config';\nexport type {\n CngxA11yPanelConfig,\n CngxA11yPanelAxis,\n CngxA11yPanelAxisSpec,\n CngxA11yPanelAxisOption,\n CngxA11yPanelLabels,\n CngxA11yPanelLabelsOverride,\n CngxA11yPanelConfigFeature,\n} from './a11y-panel.config';\nexport {\n CNGX_A11Y_PANEL_LANGUAGE_EN,\n type CngxA11yPanelLanguageSection,\n} from './i18n/a11y-panel-language-section';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;AAoCA;;;;;;;AAOG;AACI,MAAM,2BAA2B,GAAiC;AACvE,IAAA,OAAO,EAAE,eAAe;AACxB,IAAA,KAAK,EAAE,mBAAmB;AAC1B,IAAA,YAAY,EAAE,+BAA+B;AAC7C,IAAA,IAAI,EAAE;AACJ,QAAA,OAAO,EAAE,SAAS;AAClB,QAAA,SAAS,EAAE,WAAW;AACtB,QAAA,MAAM,EAAE,QAAQ;AAChB,QAAA,QAAQ,EAAE,UAAU;AACrB,KAAA;AACD,IAAA,OAAO,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,QAAQ,EAAE,UAAU,EAAE;AACjF,IAAA,SAAS,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,OAAO,EAAE;AACtD,IAAA,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE;AAC5D,IAAA,QAAQ,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE;;;ACnC9D;AACM,SAAU,iBAAiB,CAAC,OAAqC,EAAA;IACrE,OAAO;AACL,QAAA,MAAM,EAAE;YACN,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,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