@cngx/common 0.1.0-rc.3 → 0.1.0-rc.4

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.
Files changed (37) hide show
  1. package/display/README.md +1 -0
  2. package/fesm2022/cngx-common-a11y.mjs +123 -3
  3. package/fesm2022/cngx-common-a11y.mjs.map +1 -1
  4. package/fesm2022/cngx-common-card.mjs +8 -8
  5. package/fesm2022/cngx-common-card.mjs.map +1 -1
  6. package/fesm2022/cngx-common-data.mjs +691 -52
  7. package/fesm2022/cngx-common-data.mjs.map +1 -1
  8. package/fesm2022/cngx-common-display.mjs +320 -8
  9. package/fesm2022/cngx-common-display.mjs.map +1 -1
  10. package/fesm2022/cngx-common-interactive.mjs +1603 -75
  11. package/fesm2022/cngx-common-interactive.mjs.map +1 -1
  12. package/fesm2022/cngx-common-layout.mjs +187 -3
  13. package/fesm2022/cngx-common-layout.mjs.map +1 -1
  14. package/fesm2022/cngx-common-popover.mjs +63 -8
  15. package/fesm2022/cngx-common-popover.mjs.map +1 -1
  16. package/fesm2022/cngx-common.mjs +1 -1
  17. package/interactive/README.md +101 -0
  18. package/layout/README.md +39 -1
  19. package/package.json +1 -1
  20. package/theming/components/cngx-accordion.css +147 -0
  21. package/theming/components/cngx-badge.css +6 -0
  22. package/theming/components/cngx-bottom-sheet.css +8 -1
  23. package/theming/components/cngx-breadcrumb.css +108 -0
  24. package/theming/components/cngx-button-toggle.css +6 -0
  25. package/theming/components/cngx-data-grid.css +154 -0
  26. package/theming/components/cngx-dialog.css +4 -0
  27. package/theming/components/cngx-divider.css +4 -0
  28. package/theming/components/cngx-listbox.css +6 -0
  29. package/theming/components/cngx-menu.css +7 -0
  30. package/theming/components/cngx-slider.css +237 -0
  31. package/theming/components/cngx-tooltip.css +6 -0
  32. package/types/cngx-common-a11y.d.ts +67 -2
  33. package/types/cngx-common-data.d.ts +444 -22
  34. package/types/cngx-common-display.d.ts +189 -1
  35. package/types/cngx-common-interactive.d.ts +1014 -31
  36. package/types/cngx-common-layout.d.ts +88 -3
  37. package/types/cngx-common-popover.d.ts +25 -4
@@ -1,13 +1,13 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { Signal, TemplateRef, InjectionToken, Provider, ModelSignal, WritableSignal, Type, ElementRef, EnvironmentProviders } from '@angular/core';
2
+ import { Signal, TemplateRef, InjectionToken, Provider, ModelSignal, WritableSignal, OnInit, Type, ElementRef, EnvironmentProviders } from '@angular/core';
3
3
  import { AsyncStatus, CngxAsyncState, CngxStateful } from '@cngx/core/utils';
4
4
  export { AsyncStatus, CngxAsyncState } from '@cngx/core/utils';
5
5
  import { Observable } from 'rxjs';
6
+ import * as _cngx_common_interactive from '@cngx/common/interactive';
6
7
  import { CngxFormFieldControl } from '@cngx/core/tokens';
7
8
  import * as i1 from '@cngx/common/a11y';
8
9
  import { ActiveDescendantItem, CngxActiveDescendant, CngxAdItemHandle } from '@cngx/common/a11y';
9
10
  import { FlatTreeNode, CngxTreeNode } from '@cngx/utils';
10
- import * as _cngx_common_interactive from '@cngx/common/interactive';
11
11
 
12
12
  /**
13
13
  * Action function that returns a Promise or Observable.
@@ -981,6 +981,98 @@ declare class CngxExpandable {
981
981
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxExpandable, "[cngxExpandable]", ["cngxExpandable"], { "expandedInput": { "alias": "cngxExpandableOpen"; "required": false; "isSignal": true; }; "controls": { "alias": "controls"; "required": false; "isSignal": true; }; }, { "expandedChange": "expandedChange"; }, never, never, true, never>;
982
982
  }
983
983
 
984
+ /**
985
+ * Optional app-wide defaults for `CngxHoverIntent`'s dwell timings. Provide it
986
+ * to move the `enterDelay` / `leaveDelay` fallbacks an organism composes the
987
+ * atom with, without touching the per-instance input surface. Every key is
988
+ * optional - an unset key keeps the atom's literal (120 / 0).
989
+ *
990
+ * @category common/interactive
991
+ * @since 0.1.0
992
+ */
993
+ interface CngxHoverIntentDefaults {
994
+ /** Fallback for `enterDelay` (ms) when the input is not bound. */
995
+ readonly enterDelay?: number;
996
+ /** Fallback for `leaveDelay` (ms) when the input is not bound. */
997
+ readonly leaveDelay?: number;
998
+ }
999
+ /**
1000
+ * Optional DI fallback for `CngxHoverIntent`'s `enterDelay` / `leaveDelay`
1001
+ * input defaults. Resolution is `bound input -> injected default -> literal`
1002
+ * (120 / 0). A hostDirective input default cannot be overridden by the host
1003
+ * that composes it, so this token is the layered extension point any
1004
+ * hover-to-reveal organism uses to set app-wide dwell defaults. `optional`, so
1005
+ * standalone `[cngxHoverIntent]` stays byte-identical when the token is absent.
1006
+ *
1007
+ * @category common/interactive
1008
+ * @relatedTo CngxHoverIntent
1009
+ * @since 0.1.0
1010
+ */
1011
+ declare const CNGX_HOVER_INTENT_DEFAULTS: InjectionToken<CngxHoverIntentDefaults>;
1012
+ /**
1013
+ * Debounced hover-intent primitive. Turns raw pointer enter/leave into a
1014
+ * boolean signal that flips `true` only after the pointer has rested on the
1015
+ * host for `enterDelay` ms of continuous hover, and back to `false` after
1016
+ * `leaveDelay` ms of continuous un-hover.
1017
+ *
1018
+ * A pointer that merely passes over the host never fires: the pending timer
1019
+ * is cancelled by the opposite event before it elapses. Use it for
1020
+ * hover-to-reveal panels, hover-to-prefetch triggers, or any affordance that
1021
+ * reads as nervous when it reacts to an instant `mouseenter`.
1022
+ *
1023
+ * The `active` signal is read-only - it is derived from pointer events and is
1024
+ * never consumer-writable, so it is exposed via `asReadonly()` plus an
1025
+ * `intentChange` output rather than a two-way `model()`. Pointer-only, no
1026
+ * keyboard surface: hover intent is a mouse concept and carries no ARIA.
1027
+ *
1028
+ * ### Hover to reveal
1029
+ * ```html
1030
+ * <div cngxHoverIntent #hi="cngxHoverIntent" [enterDelay]="150">
1031
+ * <span>Card</span>
1032
+ * @if (hi.active()) { <div class="detail">…</div> }
1033
+ * </div>
1034
+ * ```
1035
+ *
1036
+ * ### Bind the edge
1037
+ * ```html
1038
+ * <a cngxHoverIntent (intentChange)="$event && prefetch()">Link</a>
1039
+ * ```
1040
+ *
1041
+ * @category common/interactive
1042
+ * @docsKind primary
1043
+ * @wcag AA
1044
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/common/interactive/hover-intent/hover-intent.directive.ts
1045
+ * @since 0.1.0
1046
+ * @relatedTo CngxHoverable, CngxLongPress, CngxExpandable
1047
+ * <example-url>http://localhost:4200/#/common/interactive/hover-intent/hover-to-reveal</example-url>
1048
+ * <example-url>http://localhost:4200/#/common/interactive/hover-intent/hover-to-prefetch</example-url>
1049
+ */
1050
+ declare class CngxHoverIntent {
1051
+ /**
1052
+ * Optional app-wide dwell defaults. Declared first so the input initialisers
1053
+ * below can source their fallback from it. Absent by default - standalone
1054
+ * `[cngxHoverIntent]` then keeps the 120 / 0 literals.
1055
+ */
1056
+ private readonly defaults;
1057
+ /** ms of continuous hover before `active` settles to `true`. */
1058
+ readonly enterDelay: _angular_core.InputSignal<number>;
1059
+ /** ms of continuous un-hover before `active` settles back to `false`. */
1060
+ readonly leaveDelay: _angular_core.InputSignal<number>;
1061
+ private readonly intentState;
1062
+ /** Debounced hover-intent state. `true` only after `enterDelay` ms of continuous hover. */
1063
+ readonly active: _angular_core.Signal<boolean>;
1064
+ /** Emitted on every debounced edge: `true` on settle-in, `false` on settle-out. */
1065
+ readonly intentChange: _angular_core.OutputEmitterRef<boolean>;
1066
+ private pendingTimer;
1067
+ constructor();
1068
+ protected handleEnter(): void;
1069
+ protected handleLeave(): void;
1070
+ private schedule;
1071
+ private clearPending;
1072
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxHoverIntent, never>;
1073
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxHoverIntent, "[cngxHoverIntent]", ["cngxHoverIntent"], { "enterDelay": { "alias": "enterDelay"; "required": false; "isSignal": true; }; "leaveDelay": { "alias": "leaveDelay"; "required": false; "isSignal": true; }; }, { "intentChange": "intentChange"; }, never, never, true, never>;
1074
+ }
1075
+
984
1076
  /**
985
1077
  * Structural contract every cngx interactive value-bearing atom exposes
986
1078
  * to its surrounding form-bridge. Consumers (`CngxFormBridge`, custom
@@ -1025,6 +1117,902 @@ interface CngxControlValue<T = unknown> {
1025
1117
  */
1026
1118
  declare const CNGX_CONTROL_VALUE: InjectionToken<CngxControlValue<unknown>>;
1027
1119
 
1120
+ /**
1121
+ * Inputs for {@link createSliderCore}. Every field is a `Signal`, so the
1122
+ * derived values track their sources without any manual sync. `value` is
1123
+ * the single writable source of truth - the only thing the keyboard and
1124
+ * pointer handlers ever mutate. `boundedMin` / `boundedMax` default to
1125
+ * `min` / `max`; a dual-thumb host narrows them to the sibling-thumb bound
1126
+ * so the cross-clamp math lives here rather than in an effect.
1127
+ *
1128
+ * @category common/interactive/slider
1129
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/common/interactive/slider/slider-core.ts
1130
+ * @since 0.1.0
1131
+ */
1132
+ interface CngxSliderCoreOptions {
1133
+ /** Writable source of truth. The only signal the core ever writes. */
1134
+ readonly value: WritableSignal<number>;
1135
+ /** Track lower bound. Also the snap-to-step origin. */
1136
+ readonly min: Signal<number>;
1137
+ /** Track upper bound. */
1138
+ readonly max: Signal<number>;
1139
+ /** Step granularity. `<= 0` disables snapping (continuous slider). */
1140
+ readonly step: Signal<number>;
1141
+ /** Effective lower bound (sibling clamp for a range thumb). Defaults to `min`. */
1142
+ readonly boundedMin?: Signal<number>;
1143
+ /** Effective upper bound (sibling clamp for a range thumb). Defaults to `max`. */
1144
+ readonly boundedMax?: Signal<number>;
1145
+ /**
1146
+ * Maps the current value to an `aria-valuetext` string (currency, dates,
1147
+ * t-shirt sizes). When omitted, `aria-valuetext` mirrors the numeric value.
1148
+ */
1149
+ readonly valueText?: (value: number) => string;
1150
+ }
1151
+ /**
1152
+ * Derived view and write surface produced by {@link createSliderCore}. All
1153
+ * read members are `computed()` from the option signals; all mutation goes
1154
+ * through the four imperative helpers, which snap-to-step and clamp before
1155
+ * writing. The directive binds `clampedValue` to `aria-valuenow`, `fraction`
1156
+ * to its thumb-position CSS var, and `ariaValueText` to `aria-valuetext`.
1157
+ *
1158
+ * @category common/interactive/slider
1159
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/common/interactive/slider/slider-core.ts
1160
+ * @since 0.1.0
1161
+ */
1162
+ interface CngxSliderCore {
1163
+ /** Raw model value (may sit outside the effective bounds until first write). */
1164
+ readonly value: Signal<number>;
1165
+ /** `value` snapped to step and clamped to the effective bounds - bind to `aria-valuenow`. */
1166
+ readonly clampedValue: Signal<number>;
1167
+ /** Position along the track in `[0, 1]` - bind to the thumb-position CSS var. */
1168
+ readonly fraction: Signal<number>;
1169
+ /** `fraction` as a `0..100` percentage. */
1170
+ readonly percent: Signal<number>;
1171
+ /** `aria-valuetext` string (formatter output or the numeric value). */
1172
+ readonly ariaValueText: Signal<string>;
1173
+ /** True when the clamped value sits on the effective lower bound. */
1174
+ readonly atMin: Signal<boolean>;
1175
+ /** True when the clamped value sits on the effective upper bound. */
1176
+ readonly atMax: Signal<boolean>;
1177
+ /** Snap and clamp `next`, then write it (no-op when unchanged). */
1178
+ setValue(next: number): void;
1179
+ /** Map a `[0, 1]` track fraction to a value, then {@link setValue} it. */
1180
+ setFromFraction(fraction: number): void;
1181
+ /** Move by `stepCount` steps from the current value (negative to decrease). */
1182
+ stepBy(stepCount: number): void;
1183
+ /** Jump to the effective lower bound. */
1184
+ stepToMin(): void;
1185
+ /** Jump to the effective upper bound. */
1186
+ stepToMax(): void;
1187
+ }
1188
+ /**
1189
+ * Pure factory for a slider's value derivation - the brain shared by
1190
+ * {@link CngxSlider} and each {@link CngxSliderThumb} of a range slider. It
1191
+ * owns no DI and no DOM: hand it the source signals, get back the clamped
1192
+ * value, the track fraction, the `aria-valuetext` string, and the four
1193
+ * mutation helpers the keyboard / pointer handlers call. Snapping and
1194
+ * bound-clamping live in {@link CngxSliderCore.setValue}, so every write
1195
+ * path stays valid without an effect syncing state (Pillar 1).
1196
+ *
1197
+ * @category common/interactive/slider
1198
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/common/interactive/slider/slider-core.ts
1199
+ * @since 0.1.0
1200
+ * @relatedTo CngxSlider, CngxRangeSlider, CngxSliderThumb
1201
+ */
1202
+ declare function createSliderCore(options: CngxSliderCoreOptions): CngxSliderCore;
1203
+
1204
+ /**
1205
+ * Tick stops from `min` to `max` stepping by `step`, for rendering tick marks +
1206
+ * labels. Returns `[]` when the step grid is invalid or denser than `maxCount`
1207
+ * (a guard against pathological DOM, e.g. step 1 over a 0..10000 range).
1208
+ *
1209
+ * @category common/interactive/slider
1210
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/common/interactive/slider/slider-ticks.ts
1211
+ * @since 0.1.0
1212
+ */
1213
+
1214
+ /** Tick view produced by {@link createSliderTicks}. */
1215
+ interface CngxSliderTicksView {
1216
+ /** Tick spacing as a track percentage string (e.g. `"5%"`), or `null` when marks are off. */
1217
+ readonly interval: Signal<string | null>;
1218
+ /** Numeric tick stops for labels (empty when labels are off or the grid is too dense). */
1219
+ readonly values: Signal<number[]>;
1220
+ /** Track fraction `[0, 1]` of a tick value, for positioning its label. */
1221
+ fractionOf(value: number): number;
1222
+ }
1223
+
1224
+ /** APG keyboard + pointer-drag handlers produced by {@link createSliderInteraction}. */
1225
+ interface CngxSliderInteraction {
1226
+ handleKeydown(event: KeyboardEvent): void;
1227
+ handlePointerDown(event: PointerEvent): void;
1228
+ handlePointerMove(event: PointerEvent): void;
1229
+ handlePointerUp(event: PointerEvent): void;
1230
+ }
1231
+
1232
+ /**
1233
+ * Headless single-thumb slider brain. Put `cngxSliderTrack` on your own track
1234
+ * element and the directive turns it into an APG-conformant `role="slider"`:
1235
+ * full keyboard (Arrow / Page / Home / End), pointer-drag with capture, and the
1236
+ * whole ARIA value surface (`aria-valuemin/max/now/valuetext/orientation`)
1237
+ * computed from `value`/`min`/`max`/`step`. The value is a `model<number>()`,
1238
+ * so Angular Signal Forms binds it two-way via `[control]` with no forms import.
1239
+ *
1240
+ * Most consumers want the finished {@link CngxSlider} component (`<cngx-slider>`)
1241
+ * which renders the track / fill / thumb for you and uses this directive as its
1242
+ * brain. Reach for `cngxSliderTrack` only when you want to own the skin markup.
1243
+ *
1244
+ * Positioning is left to the skin: the directive publishes the thumb position
1245
+ * as the inherited custom property `--cngx-slider-fraction` (0..1), which the
1246
+ * track / fill / thumb read. The default look ships as Track-B CSS in
1247
+ * `@cngx/themes/cngx.css`.
1248
+ *
1249
+ * ```html
1250
+ * <label id="vol-label">Volume</label>
1251
+ * <div cngxSliderTrack aria-labelledby="vol-label" [(value)]="volume" [min]="0" [max]="11">
1252
+ * <span class="cngx-slider__track"><span class="cngx-slider__fill"></span></span>
1253
+ * <span class="cngx-slider__thumb"></span>
1254
+ * </div>
1255
+ * ```
1256
+ *
1257
+ * Reach for {@link CngxRangeSliderTrack} when you need two thumbs (a min/max range).
1258
+ *
1259
+ * @category common/interactive/slider
1260
+ * @wcag AA
1261
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/common/interactive/slider/slider.directive.ts
1262
+ * @since 0.1.0
1263
+ * @relatedTo CngxSlider, CngxRangeSliderTrack, CngxSliderThumb, createSliderCore
1264
+ */
1265
+ declare class CngxSliderTrack {
1266
+ /** Two-way value. The only state the keyboard / pointer handlers write. */
1267
+ readonly value: _angular_core.ModelSignal<number>;
1268
+ /** Track lower bound (`aria-valuemin`). */
1269
+ readonly min: _angular_core.InputSignal<number>;
1270
+ /** Track upper bound (`aria-valuemax`). */
1271
+ readonly max: _angular_core.InputSignal<number>;
1272
+ /** Step granularity. `<= 0` makes the slider continuous. */
1273
+ readonly step: _angular_core.InputSignal<number>;
1274
+ /**
1275
+ * Page-key jump size (absolute, not a step multiple). Defaults to the
1276
+ * larger of one step and a tenth of the range.
1277
+ */
1278
+ readonly largeStep: _angular_core.InputSignal<number | undefined>;
1279
+ /** Whether the slider is disabled (blocks keyboard and pointer, `tabindex=-1`). */
1280
+ readonly disabled: _angular_core.InputSignal<boolean>;
1281
+ /** Track axis. Drives `aria-orientation` and the pointer-to-fraction math. */
1282
+ readonly orientation: _angular_core.InputSignal<"horizontal" | "vertical">;
1283
+ /** Optional `aria-valuetext` formatter (currency, dates, named stops). */
1284
+ readonly valueText: _angular_core.InputSignal<((value: number) => string) | undefined>;
1285
+ private readonly el;
1286
+ /** Shared value/step/aria derivation. */
1287
+ protected readonly core: _cngx_common_interactive.CngxSliderCore;
1288
+ /** Thumb position along the track in `[0, 1]`. For a skin to read. */
1289
+ readonly fraction: _angular_core.Signal<number>;
1290
+ /** Snapped + clamped value (`aria-valuenow`). For a skin to read. */
1291
+ readonly currentValue: _angular_core.Signal<number>;
1292
+ /** Formatted display string (`aria-valuetext`). For a visible value label. */
1293
+ readonly displayValue: _angular_core.Signal<string>;
1294
+ private readonly pageStep;
1295
+ /** Shared keyboard + pointer-drag handlers (same factory the range thumb uses). */
1296
+ protected readonly interaction: CngxSliderInteraction;
1297
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxSliderTrack, never>;
1298
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxSliderTrack, "[cngxSliderTrack]", ["cngxSliderTrack"], { "value": { "alias": "value"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "largeStep": { "alias": "largeStep"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "valueText": { "alias": "valueText"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
1299
+ }
1300
+
1301
+ /**
1302
+ * Finished single-thumb slider. The 90% API: drop it in, bind `[(value)]`, done -
1303
+ * it renders the track, fill, and thumb for you and wires the full APG keyboard
1304
+ * and pointer-drag through its {@link CngxSliderTrack} brain (applied as a host
1305
+ * directive). The value is a `model<number>()`, so it binds two-way in Angular
1306
+ * Signal Forms via `[control]`; the `cngx-form-field` integration lives in
1307
+ * `@cngx/forms` ({@link CngxSliderFieldBridge}).
1308
+ *
1309
+ * Value display: `showValue` floats the formatted value permanently above the
1310
+ * thumb; `showValueBubble` shows it as a bubble only while the slider is focused
1311
+ * or dragged (Material-style). `showTicks` paints a step mark; `showTickLabels`
1312
+ * adds numeric labels (formatted through `valueText`); `thumbGlyph` projects your
1313
+ * own handle content; `orientation="vertical"` rotates the skin. Reach for the
1314
+ * headless {@link CngxSliderTrack} directive only when you need to own the skin;
1315
+ * use {@link CngxRangeSlider} for a two-thumb range.
1316
+ *
1317
+ * ```html
1318
+ * <label id="vol">Volume</label>
1319
+ * <cngx-slider aria-labelledby="vol" [(value)]="volume" [min]="0" [max]="100" [step]="5" showValueBubble />
1320
+ * ```
1321
+ *
1322
+ * @category common/interactive/slider
1323
+ * @docsKind primary
1324
+ * @wcag AA
1325
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/common/interactive/slider/slider.component.ts
1326
+ * @since 0.1.0
1327
+ * @relatedTo CngxSliderTrack, CngxRangeSlider, CngxSliderFieldBridge
1328
+ */
1329
+ declare class CngxSlider {
1330
+ /** Float the formatted current value permanently above the thumb (visual only). */
1331
+ readonly showValue: _angular_core.InputSignalWithTransform<boolean, unknown>;
1332
+ /** Show the formatted value as a bubble only while focused / dragged (visual only). */
1333
+ readonly showValueBubble: _angular_core.InputSignalWithTransform<boolean, unknown>;
1334
+ /** Paint a tick mark every `step` along the track. */
1335
+ readonly showTicks: _angular_core.InputSignalWithTransform<boolean, unknown>;
1336
+ /** Render a numeric label at every step stop (independent of `showTicks`). */
1337
+ readonly showTickLabels: _angular_core.InputSignalWithTransform<boolean, unknown>;
1338
+ /** Optional content projected into the thumb (an icon, a dot, a custom handle). */
1339
+ readonly thumbGlyph: _angular_core.InputSignal<TemplateRef<void> | null>;
1340
+ /** The brain host directive - exposes the derived value/fraction the skin reads. */
1341
+ protected readonly brain: CngxSliderTrack;
1342
+ /** Tick marks + labels derivation (shared factory). */
1343
+ protected readonly ticks: CngxSliderTicksView;
1344
+ /** Format a value through the bound `valueText` (so tick labels match the thumb). */
1345
+ protected format(value: number): string;
1346
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxSlider, never>;
1347
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxSlider, "cngx-slider", ["cngxSlider"], { "showValue": { "alias": "showValue"; "required": false; "isSignal": true; }; "showValueBubble": { "alias": "showValueBubble"; "required": false; "isSignal": true; }; "showTicks": { "alias": "showTicks"; "required": false; "isSignal": true; }; "showTickLabels": { "alias": "showTickLabels"; "required": false; "isSignal": true; }; "thumbGlyph": { "alias": "thumbGlyph"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof CngxSliderTrack; inputs: { "value": "value"; "min": "min"; "max": "max"; "step": "step"; "largeStep": "largeStep"; "disabled": "disabled"; "orientation": "orientation"; "valueText": "valueText"; }; outputs: { "valueChange": "valueChange"; }; }]>;
1348
+ }
1349
+
1350
+ /** Which end of a range slider a {@link CngxSliderThumb} drives. */
1351
+ type CngxSliderThumbPosition = 'start' | 'end';
1352
+ /** Effective, sibling-clamped bounds a single thumb may move within. */
1353
+ interface CngxSliderThumbBounds {
1354
+ /** Lower bound: the track min for the start thumb, the start value for the end thumb. */
1355
+ readonly min: Signal<number>;
1356
+ /** Upper bound: the end value for the start thumb, the track max for the end thumb. */
1357
+ readonly max: Signal<number>;
1358
+ }
1359
+ /**
1360
+ * Contract a {@link CngxRangeSlider} provides so each {@link CngxSliderThumb}
1361
+ * can read the shared track config, learn its sibling-clamped bounds, and
1362
+ * write its end of the tuple - all without injecting the concrete parent
1363
+ * class (which would create a cyclic type and block Atomic Decompose). The
1364
+ * cross-clamp lives in {@link boundsFor}, so two thumbs can never pass each
1365
+ * other and no effect is needed to keep them ordered.
1366
+ *
1367
+ * @category common/interactive/slider
1368
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/common/interactive/slider/range-slider.token.ts
1369
+ * @since 0.1.0
1370
+ * @relatedTo CngxRangeSlider, CngxSliderThumb
1371
+ */
1372
+ interface CngxSliderRangeHost {
1373
+ /** Track lower bound. */
1374
+ readonly min: Signal<number>;
1375
+ /** Track upper bound. */
1376
+ readonly max: Signal<number>;
1377
+ /** Step granularity shared by both thumbs. */
1378
+ readonly step: Signal<number>;
1379
+ /** Page-key jump size shared by both thumbs (absolute). Undefined = derive from range. */
1380
+ readonly largeStep: Signal<number | undefined>;
1381
+ /** Whether the whole range slider is disabled. */
1382
+ readonly disabled: Signal<boolean>;
1383
+ /** Track axis shared by both thumbs. */
1384
+ readonly orientation: Signal<'horizontal' | 'vertical'>;
1385
+ /** Current `[start, end]` tuple - the single source of truth. */
1386
+ readonly value: Signal<readonly [number, number]>;
1387
+ /** Optional `aria-valuetext` formatter shared across both thumbs. */
1388
+ readonly valueText: Signal<((value: number) => string) | undefined>;
1389
+ /** Sibling-clamped bounds for one thumb, preventing thumb-cross. */
1390
+ boundsFor(position: CngxSliderThumbPosition): CngxSliderThumbBounds;
1391
+ /** Write one end of the tuple (the thumb's core has already snapped + clamped). */
1392
+ commit(position: CngxSliderThumbPosition, value: number): void;
1393
+ /**
1394
+ * Map a pointer position to a `0..1` fraction along the shared track, using
1395
+ * the range host's own geometry. A thumb cannot measure this itself - its
1396
+ * element is the tiny handle, not the full track - so the host owns the math.
1397
+ */
1398
+ fractionFromPointer(clientX: number, clientY: number): number;
1399
+ }
1400
+ /**
1401
+ * DI token for the {@link CngxSliderRangeHost} contract. {@link CngxRangeSlider}
1402
+ * provides it via `useExisting`; each {@link CngxSliderThumb} injects it up the
1403
+ * element-injector hierarchy.
1404
+ *
1405
+ * @category common/interactive/slider
1406
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/common/interactive/slider/range-slider.token.ts
1407
+ * @since 0.1.0
1408
+ * @relatedTo CngxRangeSlider, CngxSliderThumb
1409
+ */
1410
+ declare const CNGX_SLIDER_RANGE: InjectionToken<CngxSliderRangeHost>;
1411
+
1412
+ /**
1413
+ * Headless dual-thumb (range) slider brain. Put `cngxRangeSliderTrack` on your
1414
+ * own track container and host two {@link CngxSliderThumb} children
1415
+ * (`start` / `end`); the value is a `model<[number, number]>()` tuple this
1416
+ * directive owns. It provides {@link CNGX_SLIDER_RANGE} so each thumb reads the
1417
+ * shared config, learns its sibling-clamped bounds, and commits its end. The
1418
+ * thumbs cannot cross because {@link boundsFor} narrows each thumb's range to
1419
+ * the other thumb's current value - clamp math, not an effect (Pillar 1).
1420
+ *
1421
+ * Most consumers want the finished {@link CngxRangeSlider} component
1422
+ * (`<cngx-range-slider>`) which renders the track, fill band, and both thumbs
1423
+ * and uses this directive as its brain. Reach for `cngxRangeSliderTrack` only
1424
+ * when you want to own the skin markup.
1425
+ *
1426
+ * ```html
1427
+ * <div cngxRangeSliderTrack role="group" aria-label="Price range" [(value)]="price" [min]="0" [max]="1000">
1428
+ * <span class="cngx-slider__track"></span>
1429
+ * <span cngxSliderThumb="start" aria-label="Minimum"></span>
1430
+ * <span cngxSliderThumb="end" aria-label="Maximum"></span>
1431
+ * </div>
1432
+ * ```
1433
+ *
1434
+ * @category common/interactive/slider
1435
+ * @wcag AA
1436
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/common/interactive/slider/range-slider.directive.ts
1437
+ * @since 0.1.0
1438
+ * @relatedTo CngxRangeSlider, CngxSliderThumb, createSliderCore
1439
+ */
1440
+ declare class CngxRangeSliderTrack implements CngxSliderRangeHost {
1441
+ /** Two-way `[start, end]` tuple - the single source of truth for both thumbs. */
1442
+ readonly value: _angular_core.ModelSignal<[number, number]>;
1443
+ /** Track lower bound. */
1444
+ readonly min: _angular_core.InputSignal<number>;
1445
+ /** Track upper bound. */
1446
+ readonly max: _angular_core.InputSignal<number>;
1447
+ /** Step granularity shared by both thumbs. */
1448
+ readonly step: _angular_core.InputSignal<number>;
1449
+ /**
1450
+ * Page-key jump size for both thumbs (absolute, not a step multiple).
1451
+ * Defaults to the larger of one step and a tenth of the range.
1452
+ */
1453
+ readonly largeStep: _angular_core.InputSignal<number | undefined>;
1454
+ /** Whether the range slider is disabled. */
1455
+ readonly disabled: _angular_core.InputSignal<boolean>;
1456
+ /** Track axis shared by both thumbs. */
1457
+ readonly orientation: _angular_core.InputSignal<"horizontal" | "vertical">;
1458
+ /** Optional `aria-valuetext` formatter shared across both thumbs. */
1459
+ readonly valueText: _angular_core.InputSignal<((value: number) => string) | undefined>;
1460
+ private readonly startBounds;
1461
+ private readonly endBounds;
1462
+ private readonly el;
1463
+ readonly startFraction: _angular_core.Signal<number>;
1464
+ readonly endFraction: _angular_core.Signal<number>;
1465
+ private fractionOf;
1466
+ boundsFor(position: CngxSliderThumbPosition): CngxSliderThumbBounds;
1467
+ commit(position: CngxSliderThumbPosition, value: number): void;
1468
+ fractionFromPointer(clientX: number, clientY: number): number;
1469
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxRangeSliderTrack, never>;
1470
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxRangeSliderTrack, "[cngxRangeSliderTrack]", ["cngxRangeSliderTrack"], { "value": { "alias": "value"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "largeStep": { "alias": "largeStep"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "valueText": { "alias": "valueText"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
1471
+ }
1472
+
1473
+ /**
1474
+ * Finished two-thumb (range) slider. Drop it in, bind `[(value)]` to a
1475
+ * `[number, number]` tuple - it renders the track, the fill band between the
1476
+ * thumbs, and both draggable handles, and wires the full APG keyboard +
1477
+ * pointer-drag through its {@link CngxRangeSliderTrack} brain. The thumbs cannot
1478
+ * cross because the brain clamps each to the other.
1479
+ *
1480
+ * `showValue` floats a single `start - end` label between the thumbs (so the two
1481
+ * never overlap); `showTicks` paints a step tick along the track; `thumbGlyph`
1482
+ * projects content into both handles; `orientation="vertical"` rotates the skin.
1483
+ * Reach for the headless {@link CngxRangeSliderTrack} directive only when you
1484
+ * need to own the skin markup; use {@link CngxSlider} for a single thumb.
1485
+ *
1486
+ * ```html
1487
+ * <cngx-range-slider aria-label="Price" [(value)]="price" [min]="0" [max]="1000" [step]="10" />
1488
+ * ```
1489
+ *
1490
+ * @category common/interactive/slider
1491
+ * @docsKind primary
1492
+ * @wcag AA
1493
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/common/interactive/slider/range-slider.component.ts
1494
+ * @since 0.1.0
1495
+ * @relatedTo CngxRangeSliderTrack, CngxSlider, CngxSliderThumb
1496
+ */
1497
+ declare class CngxRangeSlider {
1498
+ /** Accessible name of the start (minimum) thumb. EN default. */
1499
+ readonly startLabel: _angular_core.InputSignal<string>;
1500
+ /** Accessible name of the end (maximum) thumb. EN default. */
1501
+ readonly endLabel: _angular_core.InputSignal<string>;
1502
+ /** Render the formatted `start - end` values centred between the thumbs (visual only). */
1503
+ readonly showValue: _angular_core.InputSignalWithTransform<boolean, unknown>;
1504
+ /** Show the combined `start - end` value as a bubble only while focused / dragged. */
1505
+ readonly showValueBubble: _angular_core.InputSignalWithTransform<boolean, unknown>;
1506
+ /** Paint a tick mark every `step` along the track. */
1507
+ readonly showTicks: _angular_core.InputSignalWithTransform<boolean, unknown>;
1508
+ /** Render a numeric label at every step stop (independent of `showTicks`). */
1509
+ readonly showTickLabels: _angular_core.InputSignalWithTransform<boolean, unknown>;
1510
+ /** Optional content projected into both thumbs. */
1511
+ readonly thumbGlyph: _angular_core.InputSignal<TemplateRef<void> | null>;
1512
+ /** The brain host directive - owns the tuple and the track geometry. */
1513
+ protected readonly brain: CngxRangeSliderTrack;
1514
+ /** Midpoint of the two thumbs (0..1) - anchors the single combined value label. */
1515
+ protected readonly midFraction: _angular_core.Signal<number>;
1516
+ /** Tick marks + labels derivation (shared factory). */
1517
+ protected readonly ticks: CngxSliderTicksView;
1518
+ protected format(value: number): string;
1519
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxRangeSlider, never>;
1520
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxRangeSlider, "cngx-range-slider", ["cngxRangeSlider"], { "startLabel": { "alias": "startLabel"; "required": false; "isSignal": true; }; "endLabel": { "alias": "endLabel"; "required": false; "isSignal": true; }; "showValue": { "alias": "showValue"; "required": false; "isSignal": true; }; "showValueBubble": { "alias": "showValueBubble"; "required": false; "isSignal": true; }; "showTicks": { "alias": "showTicks"; "required": false; "isSignal": true; }; "showTickLabels": { "alias": "showTickLabels"; "required": false; "isSignal": true; }; "thumbGlyph": { "alias": "thumbGlyph"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof CngxRangeSliderTrack; inputs: { "value": "value"; "min": "min"; "max": "max"; "step": "step"; "largeStep": "largeStep"; "disabled": "disabled"; "orientation": "orientation"; "valueText": "valueText"; }; outputs: { "valueChange": "valueChange"; }; }]>;
1521
+ }
1522
+
1523
+ /**
1524
+ * One focusable thumb of a {@link CngxRangeSlider}. Place `cngxSliderThumb` on
1525
+ * each thumb element with `"start"` or `"end"`; the directive turns it into an
1526
+ * independent `role="slider"` with its own `aria-valuenow`/`valuetext` and APG
1527
+ * keyboard, bounded by the sibling thumb so the two can never cross. It reads
1528
+ * the shared track config from {@link CNGX_SLIDER_RANGE} (injected up the
1529
+ * element-injector hierarchy) and commits its end through the host.
1530
+ *
1531
+ * Two focusable thumbs cannot be derived from a single host element, so each
1532
+ * thumb is its own directive - the headless contract the skin marks up.
1533
+ *
1534
+ * @category common/interactive/slider
1535
+ * @wcag AA
1536
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/common/interactive/slider/slider-thumb.directive.ts
1537
+ * @since 0.1.0
1538
+ * @relatedTo CngxRangeSlider, CngxRangeSliderTrack, createSliderCore
1539
+ */
1540
+ declare class CngxSliderThumb {
1541
+ /** Which end of the range this thumb drives. Bound from the selector. */
1542
+ readonly position: _angular_core.InputSignal<CngxSliderThumbPosition>;
1543
+ protected readonly range: CngxSliderRangeHost;
1544
+ private readonly el;
1545
+ /** Sibling-clamped bounds for this thumb, selected reactively by position. */
1546
+ protected readonly bounds: Signal<_cngx_common_interactive.CngxSliderThumbBounds>;
1547
+ private readonly value;
1548
+ /** Shared value/step/aria derivation, bounded by the sibling thumb. */
1549
+ protected readonly core: _cngx_common_interactive.CngxSliderCore;
1550
+ private readonly pageStep;
1551
+ protected readonly interaction: CngxSliderInteraction;
1552
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxSliderThumb, never>;
1553
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxSliderThumb, "[cngxSliderThumb]", ["cngxSliderThumb"], { "position": { "alias": "cngxSliderThumb"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
1554
+ }
1555
+
1556
+ /**
1557
+ * Registration handle a {@link CngxAccordionPanel} header passes to its
1558
+ * coordinator so the keyboard-nav factory can rove between headers without
1559
+ * discovering them through `contentChildren`. `contentChildren` never crosses
1560
+ * a child component's view boundary, so an accordion skin that renders each
1561
+ * header inside its own item view would rove over zero items; a registered
1562
+ * handle carries the header's live `element` and `disabled` state by reference
1563
+ * and is immune to that boundary.
1564
+ *
1565
+ * @category common/interactive/accordion
1566
+ */
1567
+ interface CngxAccordionHeaderHandle {
1568
+ /** Stable id of the panel this header controls. */
1569
+ readonly id: string;
1570
+ /** The header button element, used for DOM-order sorting and focus movement. */
1571
+ readonly element: HTMLElement;
1572
+ /** Whether this header is disabled (skipped by roving, not a tab stop). */
1573
+ readonly disabled: Signal<boolean>;
1574
+ }
1575
+ /**
1576
+ * Resolved keyboard surface for an accordion's headers. The panel binds
1577
+ * `tabindex` from {@link headerTabindex} and routes its `(keydown)` through
1578
+ * {@link handleKeydown}; a single header - the coordinator's `rovingActiveId` -
1579
+ * is the group's lone tab stop, so `Tab` always lands on it.
1580
+ *
1581
+ * @category common/interactive/accordion
1582
+ */
1583
+ interface CngxAccordionKeyboardNav {
1584
+ /**
1585
+ * Roving `tabindex` for a header: `0` for the header whose id matches the
1586
+ * coordinator's `rovingActiveId`, `-1` for every other. Derived from a
1587
+ * single source (Pillar 1 - never a second index to keep in sync).
1588
+ */
1589
+ headerTabindex(handle: CngxAccordionHeaderHandle): 0 | -1;
1590
+ /**
1591
+ * WAI-ARIA accordion navigation: ArrowUp/ArrowDown move between headers in
1592
+ * DOM order (Home/End jump to the first/last), skipping disabled headers,
1593
+ * looping at the edges. Moves DOM focus to the target and records it via
1594
+ * `host.setRovingActive(id)`. Returns silently for any other key so the
1595
+ * caller can chain further handlers.
1596
+ */
1597
+ handleKeydown(event: KeyboardEvent): void;
1598
+ }
1599
+ /**
1600
+ * Coordinator surface {@link createAccordionKeyboardNav} reads. The
1601
+ * `CngxAccordion` directive implements it; the factory stays a pure
1602
+ * `create*` (no `inject()`) so it works in any injection context and is
1603
+ * trivially unit-testable.
1604
+ *
1605
+ * @category common/interactive/accordion
1606
+ */
1607
+ interface CngxAccordionKeyboardNavHost {
1608
+ /** Every registered header, in registration order (the factory re-sorts by DOM position). */
1609
+ readonly headers: Signal<readonly CngxAccordionHeaderHandle[]>;
1610
+ /** Id of the header that is currently the group's single tab stop, or `null`. */
1611
+ readonly rovingActiveId: Signal<string | null>;
1612
+ /** Record the header the roving stop should move to. */
1613
+ setRovingActive(id: string): void;
1614
+ }
1615
+ /**
1616
+ * Inputs to {@link createAccordionKeyboardNav}. The coordinator owns the
1617
+ * registry and the roving source; focus scoping needs no container reference
1618
+ * because each handle carries its own `element`.
1619
+ *
1620
+ * @category common/interactive/accordion
1621
+ */
1622
+ interface CngxAccordionKeyboardNavOptions {
1623
+ readonly host: CngxAccordionKeyboardNavHost;
1624
+ }
1625
+ /**
1626
+ * Level-2 factory implementing the WAI-ARIA APG accordion keyboard model over
1627
+ * a registration model rather than `contentChildren` roving. Registration is
1628
+ * immune to component-view boundaries, so any accordion skin - the
1629
+ * `@cngx/ui/accordion` organism, or a future one that renders each header in
1630
+ * its own view - gets working Arrow/Home/End nav.
1631
+ *
1632
+ * Pillar 1 (Ableitung statt Verwaltung): the tab stop is derived from the
1633
+ * coordinator's `rovingActiveId`, not managed as a second index. Focus
1634
+ * movement is a DOM concern the factory owns - the coordinator only records
1635
+ * which header should be the stop; it never touches the DOM.
1636
+ *
1637
+ * @category common/interactive/accordion
1638
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/common/interactive/accordion/accordion-keyboard-nav.ts
1639
+ * @since 0.1.0
1640
+ * @relatedTo CngxAccordion, CngxAccordionPanel, createTabKeyboardNav
1641
+ */
1642
+ declare function createAccordionKeyboardNav(opts: CngxAccordionKeyboardNavOptions): CngxAccordionKeyboardNav;
1643
+
1644
+ /**
1645
+ * Contract a {@link CngxAccordion} provides so each {@link CngxAccordionPanel}
1646
+ * can read the open/closed arbitration and self-wire keyboard navigation
1647
+ * without injecting the concrete parent class (which would create a cyclic
1648
+ * type and block Atomic Decompose). The coordinator owns the single open-set
1649
+ * signal plus the header registry; panels call {@link toggle}, register their
1650
+ * header handle, and bind `tabindex`/`keydown` through {@link nav}.
1651
+ *
1652
+ * @category common/interactive/accordion
1653
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/common/interactive/accordion/accordion.token.ts
1654
+ * @since 0.1.0
1655
+ * @relatedTo CngxAccordion, CngxAccordionPanel, createAccordionKeyboardNav
1656
+ */
1657
+ interface CngxAccordionHost {
1658
+ /** Whether more than one panel may stay open at once. */
1659
+ readonly multi: Signal<boolean>;
1660
+ /** Whether the panel with this id is currently open (reads the open-set signal). */
1661
+ isOpen(panelId: string): boolean;
1662
+ /** Toggle the panel; in single mode this closes every sibling first. */
1663
+ toggle(panelId: string): void;
1664
+ /** Every registered header handle (the coordinator's roving registry). */
1665
+ readonly headers: Signal<readonly CngxAccordionHeaderHandle[]>;
1666
+ /** Id of the header that is the group's single tab stop, or `null`. */
1667
+ readonly rovingActiveId: Signal<string | null>;
1668
+ /** Resolved keyboard surface panels bind `tabindex` / `keydown` through. */
1669
+ readonly nav: CngxAccordionKeyboardNav;
1670
+ /** Register a header handle on init (view-boundary-immune, unlike `contentChildren`). */
1671
+ registerHeader(handle: CngxAccordionHeaderHandle): void;
1672
+ /** Deregister a header handle on destroy. */
1673
+ unregisterHeader(handle: CngxAccordionHeaderHandle): void;
1674
+ /** Record the header the roving tab stop should move to. */
1675
+ setRovingActive(id: string): void;
1676
+ }
1677
+ /**
1678
+ * DI token for the {@link CngxAccordionHost} contract. {@link CngxAccordion}
1679
+ * provides it via `useExisting`; each {@link CngxAccordionPanel} injects it up
1680
+ * the element-injector hierarchy.
1681
+ *
1682
+ * @category common/interactive/accordion
1683
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/common/interactive/accordion/accordion.token.ts
1684
+ * @since 0.1.0
1685
+ * @relatedTo CngxAccordion, CngxAccordionPanel
1686
+ */
1687
+ declare const CNGX_ACCORDION: InjectionToken<CngxAccordionHost>;
1688
+
1689
+ /**
1690
+ * Coordinating directive for an accordion. Put `cngxAccordion` on the
1691
+ * container; each header carries {@link CngxAccordionPanel}. The container owns
1692
+ * two single sources of truth - one `openIds` set signal (expansion) and one
1693
+ * header registry (`rovingActiveId`) - and arbitrates single- vs multi-open. No
1694
+ * panel owns mutable expansion state and no effect syncs siblings: every
1695
+ * panel's `aria-expanded` derives from the open-set signal (Pillar 1).
1696
+ *
1697
+ * Header arrow-key navigation runs through {@link createAccordionKeyboardNav}
1698
+ * over a header registry rather than `contentChildren` roving. Panels register
1699
+ * their header handle on init, so navigation survives a skin that renders each
1700
+ * header inside its own component view - the reason {@link CngxAccordionPanel}
1701
+ * self-wires `tabindex`/`keydown` instead of relying on a container-level
1702
+ * roving directive.
1703
+ *
1704
+ * ```html
1705
+ * <div cngxAccordion #acc="cngxAccordion" [multi]="false">
1706
+ * <button cngxAccordionPanel id="head-a" panelId="a" controls="region-a">Section A</button>
1707
+ * <div role="region" id="region-a" aria-labelledby="head-a" [hidden]="!acc.isOpen('a')">…</div>
1708
+ * <button cngxAccordionPanel id="head-b" panelId="b" controls="region-b">Section B</button>
1709
+ * <div role="region" id="region-b" aria-labelledby="head-b" [hidden]="!acc.isOpen('b')">…</div>
1710
+ * </div>
1711
+ * ```
1712
+ *
1713
+ * @category common/interactive/accordion
1714
+ * @docsKind primary
1715
+ * @wcag AA
1716
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/common/interactive/accordion/accordion.directive.ts
1717
+ * @since 0.1.0
1718
+ * @relatedTo CngxAccordionPanel, createAccordionKeyboardNav
1719
+ */
1720
+ declare class CngxAccordion implements CngxAccordionHost {
1721
+ /** Whether more than one panel may stay open at once. */
1722
+ readonly multi: _angular_core.InputSignal<boolean>;
1723
+ /**
1724
+ * Controlled set of open panel ids - the accordion's primary value, exposed
1725
+ * as a `model` so a consumer can seed initially-open panels or drive
1726
+ * expansion declaratively (router / SSR). `model()` takes no `equal`, so the
1727
+ * equality discipline lives on {@link effectiveOpenIds} below - the derived
1728
+ * set every panel reads. `toggle()` is the only writer on interaction; the
1729
+ * consumer may also write it. No effect syncs it (Pillar 1).
1730
+ */
1731
+ readonly openIds: _angular_core.ModelSignal<ReadonlySet<string>>;
1732
+ private readonly effectiveOpenIds;
1733
+ private readonly headersState;
1734
+ readonly headers: _angular_core.Signal<readonly CngxAccordionHeaderHandle[]>;
1735
+ /**
1736
+ * The group's single tab stop, derived-not-managed from the registry. When
1737
+ * the registry changes, keep the previous stop while it is still registered
1738
+ * and enabled, else fall back to the first enabled header. Never reset by an
1739
+ * unrelated header registering or unregistering (Pillar 1 preserve-then-
1740
+ * default); `setRovingActive` writes it directly for keyboard movement.
1741
+ */
1742
+ readonly rovingActiveId: _angular_core.WritableSignal<string | null>;
1743
+ readonly nav: CngxAccordionKeyboardNav;
1744
+ registerHeader(handle: CngxAccordionHeaderHandle): void;
1745
+ unregisterHeader(handle: CngxAccordionHeaderHandle): void;
1746
+ setRovingActive(id: string): void;
1747
+ isOpen(panelId: string): boolean;
1748
+ toggle(panelId: string): void;
1749
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxAccordion, never>;
1750
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxAccordion, "[cngxAccordion]", ["cngxAccordion"], { "multi": { "alias": "multi"; "required": false; "isSignal": true; }; "openIds": { "alias": "openIds"; "required": false; "isSignal": true; }; }, { "openIds": "openIdsChange"; }, never, never, true, never>;
1751
+ }
1752
+
1753
+ /**
1754
+ * Accordion header. Put `cngxAccordionPanel` on the header `<button>`; the
1755
+ * directive mirrors `aria-expanded` from the coordinator, points
1756
+ * `aria-controls` at the region, and toggles the panel on click. It registers
1757
+ * a header handle with the coordinator on init (and deregisters on destroy),
1758
+ * binds its own roving `tabindex`, and routes `keydown` through the
1759
+ * coordinator's keyboard-nav factory - so arrow/Home/End navigation works even
1760
+ * when a skin renders the header inside its own component view (registration is
1761
+ * immune to the `contentChildren` view boundary).
1762
+ *
1763
+ * Expansion state is never owned here: `aria-expanded` is a `computed()` over
1764
+ * the coordinator's open-set, so single-open arbitration is pure derivation,
1765
+ * not sibling syncing (Pillar 1). Use a native `<button>` so Enter / Space
1766
+ * activate it through the browser's own click synthesis.
1767
+ *
1768
+ * @category common/interactive/accordion
1769
+ * @wcag AA
1770
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/common/interactive/accordion/accordion-panel.directive.ts
1771
+ * @since 0.1.0
1772
+ * @relatedTo CngxAccordion, createAccordionKeyboardNav
1773
+ */
1774
+ declare class CngxAccordionPanel implements OnInit {
1775
+ /** Stable id identifying this panel within its accordion. */
1776
+ readonly panelId: _angular_core.InputSignal<string>;
1777
+ /** `id` of the region this header controls, bound to `aria-controls`. */
1778
+ readonly controls: _angular_core.InputSignal<string | undefined>;
1779
+ /**
1780
+ * Disabled header: skipped by roving, reports `tabindex="-1"` +
1781
+ * `aria-disabled="true"`, and its click never flips the panel open. The
1782
+ * visually-hidden `aria-describedby` reason element is a skin concern owned
1783
+ * by the organism, not this brain directive.
1784
+ */
1785
+ readonly disabled: _angular_core.InputSignal<boolean>;
1786
+ private readonly accordion;
1787
+ private readonly element;
1788
+ private readonly destroyRef;
1789
+ private readonly handle;
1790
+ /** `aria-expanded`, derived from the coordinator's open-set. */
1791
+ protected readonly expanded: _angular_core.Signal<boolean>;
1792
+ /**
1793
+ * Roving `tabindex` for this header, derived from the coordinator's single
1794
+ * `rovingActiveId` source (Pillar 1). `-1` until the handle registers.
1795
+ */
1796
+ protected readonly tabindex: _angular_core.Signal<0 | -1>;
1797
+ ngOnInit(): void;
1798
+ protected handleKeydown(event: KeyboardEvent): void;
1799
+ protected toggle(): void;
1800
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxAccordionPanel, never>;
1801
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxAccordionPanel, "[cngxAccordionPanel]", ["cngxAccordionPanel"], { "panelId": { "alias": "panelId"; "required": true; "isSignal": true; }; "controls": { "alias": "controls"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1802
+ }
1803
+
1804
+ /**
1805
+ * A single crumb. Put `cngxBreadcrumbItem` on the crumb element. Intermediate
1806
+ * crumbs are links (`<a href>`); the terminal crumb may be either a `<span>` or
1807
+ * an `<a [attr.href]="null">` - both derive `aria-current="page"` purely from
1808
+ * position in the trail (no manual flag). The item hides itself with `[hidden]`
1809
+ * when the coordinator collapses it into the overflow menu.
1810
+ *
1811
+ * @category common/interactive/breadcrumb
1812
+ * @wcag AA
1813
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/common/interactive/breadcrumb/breadcrumb-item.directive.ts
1814
+ * @since 0.1.0
1815
+ * @relatedTo CngxBreadcrumb, CngxBreadcrumbSeparator
1816
+ * <example-url>http://localhost:4200/#/common/interactive/breadcrumb/basic-trail</example-url>
1817
+ */
1818
+ declare class CngxBreadcrumbItem {
1819
+ private readonly breadcrumb;
1820
+ private readonly host;
1821
+ /**
1822
+ * Explicit accessible label for the overflow menu, when the crumb's rendered
1823
+ * text is not the right string to list (e.g. an icon-only crumb). Reactive:
1824
+ * bind it when the crumb text is dynamic.
1825
+ */
1826
+ readonly label: _angular_core.InputSignal<string>;
1827
+ /** Whether this is the terminal crumb (the current page). */
1828
+ protected readonly terminal: _angular_core.Signal<boolean>;
1829
+ /** Whether this crumb is collapsed into the overflow menu. */
1830
+ protected readonly collapsed: _angular_core.Signal<boolean>;
1831
+ /**
1832
+ * Readable label for the collapsed-crumb list. Prefers the explicit
1833
+ * {@link label} input; otherwise falls back to the projected text.
1834
+ *
1835
+ * The fallback is a **one-shot DOM read at call time**, not reactive - it
1836
+ * reflects the text present when called. For crumbs whose text changes at
1837
+ * runtime, bind `[cngxBreadcrumbItemLabel]` so the reactive path is used.
1838
+ */
1839
+ resolvedLabel(): string;
1840
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxBreadcrumbItem, never>;
1841
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxBreadcrumbItem, "[cngxBreadcrumbItem]", ["cngxBreadcrumbItem"], { "label": { "alias": "cngxBreadcrumbItemLabel"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1842
+ }
1843
+
1844
+ /**
1845
+ * Contract a {@link CngxBreadcrumb} provides to its items and to a drop-in
1846
+ * overflow via DI. Item-keyed queries stay methods; the collapse set is
1847
+ * exposed as signals so a decoupled overflow can derive off them without
1848
+ * injecting the concrete coordinator class.
1849
+ */
1850
+ interface CngxBreadcrumbHost {
1851
+ /** Whether this item is the terminal crumb (gets `aria-current="page"`). */
1852
+ isTerminal(item: CngxBreadcrumbItem): boolean;
1853
+ /** Whether this item is collapsed into the overflow menu (hidden in the trail). */
1854
+ isCollapsed(item: CngxBreadcrumbItem): boolean;
1855
+ /** The crumbs currently collapsed into the overflow, in DOM order. */
1856
+ readonly collapsedItems: Signal<readonly CngxBreadcrumbItem[]>;
1857
+ /** Whether any crumb is collapsed (drives the overflow trigger's visibility). */
1858
+ readonly hasCollapsed: Signal<boolean>;
1859
+ }
1860
+ /**
1861
+ * DI token for the {@link CngxBreadcrumbHost} contract. {@link CngxBreadcrumb}
1862
+ * provides it via `useExisting`; each {@link CngxBreadcrumbItem} injects it.
1863
+ *
1864
+ * @category common/interactive/breadcrumb
1865
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/common/interactive/breadcrumb/breadcrumb.token.ts
1866
+ * @since 0.1.0
1867
+ * @relatedTo CngxBreadcrumb, CngxBreadcrumbItem
1868
+ */
1869
+ declare const CNGX_BREADCRUMB: InjectionToken<CngxBreadcrumbHost>;
1870
+
1871
+ /**
1872
+ * Linear breadcrumb navigation. Put `cngxBreadcrumb` on the `<nav>`; it names
1873
+ * the landmark (`aria-label`, EN default "Breadcrumb") and, when the trail
1874
+ * exceeds `[maxVisible]`, derives which middle crumbs collapse - keeping the
1875
+ * first crumb and the last `maxVisible - 1`. The collapse set is a `computed()`
1876
+ * over the projected items, so terminal-crumb marking and overflow are pure
1877
+ * derivation, never synced (Pillar 1). Consumers render the collapsed crumbs in
1878
+ * an ellipsis `CngxMenu` and may truncate long labels with `CngxTruncate`.
1879
+ *
1880
+ * ```html
1881
+ * <nav cngxBreadcrumb [maxVisible]="4" #bc="cngxBreadcrumb">
1882
+ * <ol>
1883
+ * <li><a cngxBreadcrumbItem href="/">Home</a></li>
1884
+ * <li cngxBreadcrumbSeparator>/</li>
1885
+ * <li><a cngxBreadcrumbItem href="/library">Library</a></li>
1886
+ * <li cngxBreadcrumbSeparator>/</li>
1887
+ * <li><span cngxBreadcrumbItem>Current page</span></li>
1888
+ * </ol>
1889
+ * </nav>
1890
+ * ```
1891
+ *
1892
+ * @category common/interactive/breadcrumb
1893
+ * @docsKind primary
1894
+ * @wcag AA
1895
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/common/interactive/breadcrumb/breadcrumb.directive.ts
1896
+ * @since 0.1.0
1897
+ * @relatedTo CngxBreadcrumbItem, CngxBreadcrumbSeparator, CngxBreadcrumbBar
1898
+ * <example-url>http://localhost:4200/#/common/interactive/breadcrumb/basic-trail</example-url>
1899
+ */
1900
+ declare class CngxBreadcrumb implements CngxBreadcrumbHost {
1901
+ /** Accessible name of the navigation landmark. EN default. */
1902
+ readonly label: _angular_core.InputSignal<string>;
1903
+ /** Maximum crumbs to show before the middle collapses. Unset = never collapse. */
1904
+ readonly maxVisible: _angular_core.InputSignal<number | undefined>;
1905
+ /** Swappable collapse rule; defaults to keep-first + last (max - 1). */
1906
+ private readonly collapse;
1907
+ /** Projected crumbs in DOM order (items may be nested in `<ol>`/`<li>`). */
1908
+ private readonly items;
1909
+ private readonly indexByItem;
1910
+ private readonly collapsedIndices;
1911
+ /** The crumbs currently collapsed into the overflow menu, in order. */
1912
+ readonly collapsedItems: _angular_core.Signal<CngxBreadcrumbItem[]>;
1913
+ /** Whether any crumb is collapsed (drives the ellipsis trigger's visibility). */
1914
+ readonly hasCollapsed: _angular_core.Signal<boolean>;
1915
+ isTerminal(item: CngxBreadcrumbItem): boolean;
1916
+ isCollapsed(item: CngxBreadcrumbItem): boolean;
1917
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxBreadcrumb, never>;
1918
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxBreadcrumb, "[cngxBreadcrumb]", ["cngxBreadcrumb"], { "label": { "alias": "label"; "required": false; "isSignal": true; }; "maxVisible": { "alias": "maxVisible"; "required": false; "isSignal": true; }; }, {}, ["items"], never, true, never>;
1919
+ }
1920
+
1921
+ /**
1922
+ * Visual separator between crumbs (slash, chevron, projected icon). Put
1923
+ * `cngxBreadcrumbSeparator` on the separator element; it is marked
1924
+ * `aria-hidden="true"` so assistive tech reads the trail as a clean list of
1925
+ * links without the decorative glyphs.
1926
+ *
1927
+ * @category common/interactive/breadcrumb
1928
+ * @wcag AA
1929
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/common/interactive/breadcrumb/breadcrumb-separator.directive.ts
1930
+ * @since 0.1.0
1931
+ * @relatedTo CngxBreadcrumb, CngxBreadcrumbItem
1932
+ * <example-url>http://localhost:4200/#/common/interactive/breadcrumb/custom-separator</example-url>
1933
+ */
1934
+ declare class CngxBreadcrumbSeparator {
1935
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxBreadcrumbSeparator, never>;
1936
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxBreadcrumbSeparator, "[cngxBreadcrumbSeparator]", ["cngxBreadcrumbSeparator"], {}, {}, never, never, true, never>;
1937
+ }
1938
+
1939
+ /**
1940
+ * A collapse strategy decides which crumb indices fold into the overflow menu.
1941
+ * Pure and synchronous: given the total crumb count and the `maxVisible` cap it
1942
+ * returns the set of indices to hide. Swap it via
1943
+ * {@link CNGX_BREADCRUMB_COLLAPSE_STRATEGY} to change the rule (width-aware,
1944
+ * keep-first-N, mobile parent-only, ...) without forking {@link CngxBreadcrumb}.
1945
+ */
1946
+ type CngxBreadcrumbCollapseStrategy = (total: number, maxVisible: number) => ReadonlySet<number>;
1947
+ /**
1948
+ * The default collapse rule: keep the first crumb and the last
1949
+ * `maxVisible - 1`, folding the middle into the overflow menu. Returns an empty
1950
+ * set when `maxVisible` is unset/invalid (`< 1`) or the trail already fits
1951
+ * (`total <= maxVisible`), so a short trail never collapses.
1952
+ *
1953
+ * @category common/interactive/breadcrumb
1954
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/common/interactive/breadcrumb/breadcrumb-collapse.ts
1955
+ * @since 0.1.0
1956
+ * @relatedTo CngxBreadcrumb, CNGX_BREADCRUMB_COLLAPSE_STRATEGY
1957
+ */
1958
+ declare function createBreadcrumbCollapse(): CngxBreadcrumbCollapseStrategy;
1959
+
1960
+ /**
1961
+ * DI token for the breadcrumb collapse rule. Defaults to
1962
+ * {@link createBreadcrumbCollapse} (keep the first crumb + the last
1963
+ * `maxVisible - 1`). Override it in `providers` (app-wide) or `viewProviders`
1964
+ * (per {@link CngxBreadcrumb} instance) to swap the rule - width-aware,
1965
+ * keep-first-N, mobile parent-only - without forking the coordinator.
1966
+ *
1967
+ * ```ts
1968
+ * viewProviders: [{
1969
+ * provide: CNGX_BREADCRUMB_COLLAPSE_STRATEGY,
1970
+ * useValue: (total, max) => new Set(range(2, total - 2)),
1971
+ * }]
1972
+ * ```
1973
+ *
1974
+ * @category common/interactive/breadcrumb
1975
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/common/interactive/breadcrumb/breadcrumb-collapse.token.ts
1976
+ * @since 0.1.0
1977
+ * @relatedTo CngxBreadcrumb, createBreadcrumbCollapse
1978
+ */
1979
+ declare const CNGX_BREADCRUMB_COLLAPSE_STRATEGY: InjectionToken<CngxBreadcrumbCollapseStrategy>;
1980
+
1981
+ /**
1982
+ * One width breakpoint for the responsive breadcrumb collapse: at `minWidth`
1983
+ * pixels and above, show at most `maxVisible` crumbs before the middle folds
1984
+ * into the overflow menu. A tier list is resolved by {@link resolveBreadcrumbTier}.
1985
+ */
1986
+ interface CngxBreadcrumbWidthTier {
1987
+ /** Lower bound (inclusive, px) at which this tier's `maxVisible` applies. */
1988
+ readonly minWidth: number;
1989
+ /** Crumb cap once this tier is the active one. Fed to the count-based collapse. */
1990
+ readonly maxVisible: number;
1991
+ }
1992
+ /**
1993
+ * Default width tiers, matching the headless `responsive-collapse` recipe: 640px
1994
+ * and up shows 6, 440px and up shows 4, anything narrower shows 2. The `0` floor
1995
+ * guarantees a match for every non-negative width.
1996
+ */
1997
+ declare const DEFAULT_BREADCRUMB_WIDTH_TIERS: readonly CngxBreadcrumbWidthTier[];
1998
+ /**
1999
+ * Pure width->count resolver: returns the `maxVisible` of the tier with the
2000
+ * highest `minWidth` that is still `<= width`. Order-independent - the tier list
2001
+ * is normalised (sorted by descending `minWidth`) before matching, so a consumer
2002
+ * may pass tiers in any order. When `width` sits below every tier's `minWidth`
2003
+ * the narrowest tier's `maxVisible` is the floor; an empty tier list yields
2004
+ * `Number.POSITIVE_INFINITY` (never collapse), leaving the trail intact.
2005
+ *
2006
+ * No DOM, no Angular - the width source (a `CngxResizeObserver`) lives in the
2007
+ * bar; this stays jsdom-testable and shared by the bar and the headless recipe.
2008
+ *
2009
+ * @category common/interactive/breadcrumb
2010
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/common/interactive/breadcrumb/breadcrumb-responsive.ts
2011
+ * @since 0.1.0
2012
+ * @relatedTo CngxBreadcrumb, CngxBreadcrumbWidthTier, DEFAULT_BREADCRUMB_WIDTH_TIERS
2013
+ */
2014
+ declare function resolveBreadcrumbTier(width: number, tiers: readonly CngxBreadcrumbWidthTier[]): number;
2015
+
1028
2016
  /**
1029
2017
  * Single-value boolean switch with W3C `role="switch"` semantics. Click,
1030
2018
  * Space, and Enter all flip `value`; the directive form (`[cngxToggle]`)
@@ -1432,13 +2420,14 @@ declare const CNGX_BUTTON_TOGGLE_GROUP: InjectionToken<CngxButtonToggleGroupCont
1432
2420
  * `CNGX_BUTTON_MULTI_TOGGLE_GROUP` (`{ optional: true }` on both)
1433
2421
  * and chooses its ARIA pattern at injection time, not at runtime.
1434
2422
  *
1435
- * Auto-select wiring follows the same Pillar-§6 contract as
1436
- * `CngxRadioGroup`: a transient `pendingArrowSelect` plain-field flag
1437
- * is raised on host `(keydown)` for any roving-relevant key
1438
- * (Arrow*, Home, End); each focused leaf consumes the flag in its
1439
- * `(focus)` handler via `consumePendingArrowSelect()`. The signal
1440
- * write happens inside a DOM event handler - never inside an
1441
- * `effect()`.
2423
+ * Auto-select wiring follows the same contract as `CngxRadioGroup`:
2424
+ * the host `CngxRovingTabindex` raises its navigation-key intent before
2425
+ * it moves focus; each focused leaf consumes that intent in its
2426
+ * `(focus)` handler via `consumePendingArrowSelect()`, which reads
2427
+ * `roving.consumeNavigationKey()`. Reading an already-set fact (instead
2428
+ * of a group-owned `(keydown)` flag) closes the one-press-behind race
2429
+ * (#135). The value write happens inside a DOM event handler - never
2430
+ * inside an `effect()`.
1442
2431
  *
1443
2432
  * ```html
1444
2433
  * <cngx-button-toggle-group label="Layout" [(value)]="view">
@@ -1458,9 +2447,6 @@ declare const CNGX_BUTTON_TOGGLE_GROUP: InjectionToken<CngxButtonToggleGroupCont
1458
2447
  * <example-url>http://localhost:4200/#/common/interactive/button-toggle/group/basic-view-switcher</example-url>
1459
2448
  * <example-url>http://localhost:4200/#/common/interactive/button-toggle/group/disabled-group-cascade-vs-per-toggle</example-url>
1460
2449
  * <example-url>http://localhost:4200/#/common/interactive/button-toggle/group/vertical-orientation</example-url>
1461
- * <example-url>http://localhost:4200/#/forms/field/form-primitives/coming-in-a-follow-up</example-url>
1462
- * <example-url>http://localhost:4200/#/forms/field/form-primitives/reactive-forms-same-atom-just-bind-formcontrol</example-url>
1463
- * <example-url>http://localhost:4200/#/forms/field/form-primitives/signal-forms-drop-the-atom-into-cngx-form-field</example-url>
1464
2450
  */
1465
2451
  declare class CngxButtonToggleGroup<T = unknown> implements CngxButtonToggleGroupContract<T>, CngxControlValue<T | undefined>, CngxFormFieldControl {
1466
2452
  readonly value: _angular_core.ModelSignal<T | undefined>;
@@ -1486,9 +2472,8 @@ declare class CngxButtonToggleGroup<T = unknown> implements CngxButtonToggleGrou
1486
2472
  readonly label: _angular_core.InputSignal<string | undefined>;
1487
2473
  readonly state: _angular_core.InputSignal<CngxAsyncState<unknown> | undefined>;
1488
2474
  protected readonly ariaBusy: _angular_core.Signal<boolean>;
1489
- private pendingArrowSelect;
2475
+ private readonly roving;
1490
2476
  consumePendingArrowSelect(value: T): boolean;
1491
- protected handleKeydown(event: Event): void;
1492
2477
  readonly id: _angular_core.Signal<string>;
1493
2478
  private readonly focusedState;
1494
2479
  readonly focused: _angular_core.Signal<boolean>;
@@ -1819,16 +2804,17 @@ declare const CNGX_RADIO_GROUP: InjectionToken<CngxRadioGroupContract<unknown>>;
1819
2804
  * **Auto-select wiring (no signal-write-in-effect).** Per the
1820
2805
  * pillar §6 hard rule, the group does NOT subscribe to
1821
2806
  * `CngxRovingTabindex.activeIndex` via an effect that writes
1822
- * `value`. Instead, the group listens to its own host `keydown` and
1823
- * raises a transient `pendingArrowSelect` flag when an arrow / Home
1824
- * / End is pressed. The roving directive moves focus on the same
1825
- * keydown; the newly-focused leaf's `(focus)` handler calls
1826
- * `group.consumePendingArrowSelect(this.value())`. The flag-set
1827
- * (plain field write) and value-set (signal write inside a DOM
1828
- * event handler, not an effect) are both legal under the pillar
1829
- * rules. Tab-into-group fires focus without a preceding arrow
1830
- * keydown, so the flag stays false and no auto-select happens -
1831
- * Tab leaves the consumer's `value` untouched.
2807
+ * `value`. Instead, the host `CngxRovingTabindex` raises its
2808
+ * navigation-key intent before it moves focus; the newly-focused
2809
+ * leaf's `(focus)` handler calls
2810
+ * `group.consumePendingArrowSelect(this.value())`, which reads
2811
+ * `roving.consumeNavigationKey()` and writes `value` (a signal write
2812
+ * inside a DOM event handler, not an effect - legal under the pillar
2813
+ * rules). Reading an already-set fact instead of a group-owned
2814
+ * `(keydown)` flag closes the one-press-behind race (#135).
2815
+ * Tab-into-group fires focus without a preceding navigation key, so
2816
+ * the hook reads false and no auto-select happens - Tab leaves the
2817
+ * consumer's `value` untouched.
1832
2818
  *
1833
2819
  * ```html
1834
2820
  * <cngx-radio-group [(value)]="payment" name="payment-method">
@@ -1849,9 +2835,6 @@ declare const CNGX_RADIO_GROUP: InjectionToken<CngxRadioGroupContract<unknown>>;
1849
2835
  * <example-url>http://localhost:4200/#/common/interactive/radio/custom-dot-glyph</example-url>
1850
2836
  * <example-url>http://localhost:4200/#/common/interactive/radio/disabled-group-cascades-per-radio-overrides</example-url>
1851
2837
  * <example-url>http://localhost:4200/#/common/interactive/radio/orientation-horizontal</example-url>
1852
- * <example-url>http://localhost:4200/#/forms/field/form-primitives/coming-in-a-follow-up</example-url>
1853
- * <example-url>http://localhost:4200/#/forms/field/form-primitives/reactive-forms-same-atom-just-bind-formcontrol</example-url>
1854
- * <example-url>http://localhost:4200/#/forms/field/form-primitives/signal-forms-drop-the-atom-into-cngx-form-field</example-url>
1855
2838
  */
1856
2839
  declare class CngxRadioGroup<T = unknown> implements CngxRadioGroupContract<T>, CngxControlValue<T | undefined>, CngxFormFieldControl {
1857
2840
  readonly value: _angular_core.ModelSignal<T | undefined>;
@@ -1881,7 +2864,7 @@ declare class CngxRadioGroup<T = unknown> implements CngxRadioGroupContract<T>,
1881
2864
  private readonly fallbackName;
1882
2865
  readonly name: _angular_core.Signal<string>;
1883
2866
  private readonly registry;
1884
- private pendingArrowSelect;
2867
+ private readonly roving;
1885
2868
  readonly id: _angular_core.Signal<string>;
1886
2869
  private readonly focusedState;
1887
2870
  readonly focused: _angular_core.Signal<boolean>;
@@ -1894,7 +2877,6 @@ declare class CngxRadioGroup<T = unknown> implements CngxRadioGroupContract<T>,
1894
2877
  register(radio: CngxRadioRegistration<T>): void;
1895
2878
  unregister(id: string): void;
1896
2879
  consumePendingArrowSelect(value: T): boolean;
1897
- protected handleKeydown(event: Event): void;
1898
2880
  protected handleFocusIn(): void;
1899
2881
  protected handleFocusOut(): void;
1900
2882
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxRadioGroup<any>, never>;
@@ -4547,6 +5529,7 @@ declare class CngxListboxSearch {
4547
5529
  * @github https://github.com/cngxjs/cngx/blob/main/projects/common/interactive/listbox/listbox.directive.ts
4548
5530
  * @since 0.1.0
4549
5531
  * @relatedTo CngxListboxSearch, CngxListboxTrigger, CngxOption, CngxOptionGroup, CngxActiveDescendant
5532
+ * @playground Two synced listboxes ./examples/synced-listboxes/synced-listboxes.component.ts
4550
5533
  * <example-url>http://localhost:4200/#/common/interactive/listbox/search/command-palette</example-url>
4551
5534
  * <example-url>http://localhost:4200/#/common/interactive/listbox/trigger/select-dropdown</example-url>
4552
5535
  * <example-url>http://localhost:4200/#/common/interactive/listbox/base/multi-select</example-url>
@@ -6584,5 +7567,5 @@ declare function withGlobalRevealOnSubmit(): ErrorRegistryFeature;
6584
7567
  */
6585
7568
  declare function withRevealOnNavigate(): ErrorRegistryFeature;
6586
7569
 
6587
- export { CNGX_BUTTON_MULTI_TOGGLE_GROUP, CNGX_BUTTON_TOGGLE_GROUP, CNGX_CHIP_GROUP_HOST, CNGX_CHIP_STRIP_ROVING_FACTORY, CNGX_CLOSE_ICON, CNGX_CONTROL_VALUE, CNGX_ERROR_AGGREGATOR, CNGX_ERROR_SCOPE, CNGX_HIERARCHICAL_NAV_STRATEGY, CNGX_MENU_ANNOUNCER_FACTORY, CNGX_MENU_CONFIG, CNGX_MENU_DISMISS_HANDLER_FACTORY, CNGX_MENU_HOST, CNGX_MENU_NAV_STRATEGY, CNGX_MENU_RADIO_GROUP, CNGX_MENU_SUBMENU_ITEM, CNGX_NAV_CONFIG, CNGX_OPTION_CONTAINER, CNGX_OPTION_FILTER_HOST, CNGX_OPTION_INTERACTION_HOST, CNGX_OPTION_STATUS_HOST, CNGX_RADIO_GROUP, CNGX_SUBMENU_TRY_FALLBACKS, CNGX_TREE_CONFIG, CNGX_TREE_CONTROLLER_FACTORY, CngxAsyncClick, CngxAsyncStatus, CngxBeforeUnload, CngxButtonMultiToggleGroup, CngxButtonToggle, CngxButtonToggleGroup, CngxCheckbox, CngxCheckboxGroup, CngxChipGroup, CngxChipInGroup, CngxChipInput, CngxChipInteraction, CngxClickOutside, CngxCloseButton, CngxContextMenuTrigger, CngxCopyBlock, CngxCopyText, CngxDisclosure, CngxErrorAggregator, CngxErrorRegistry, CngxErrorScope, CngxErrorSource, CngxErrorState, CngxExpandable, CngxFailed, CngxHierarchicalNav, CngxHoverable, CngxKeyboardShortcut, CngxListbox, CngxListboxSearch, CngxListboxTrigger, CngxLongPress, CngxMenu, CngxMenuAnnouncer, CngxMenuGroup, CngxMenuItem, CngxMenuItemCheckbox, CngxMenuItemIcon, CngxMenuItemKbd, CngxMenuItemLabel, CngxMenuItemRadio, CngxMenuItemSubmenu, CngxMenuItemSuffix, CngxMenuSeparator, CngxMenuTrigger, CngxMultiChipGroup, CngxNavBadge, CngxNavGroup, CngxNavGroupRegistry, CngxNavLabel, CngxNavLink, CngxOption, CngxOptionGroup, CngxPending, CngxPressRipple, CngxPressable, CngxRadio, CngxRadioGroup, CngxReorder, CngxRipple, CngxSearch, CngxSpeak, CngxSucceeded, CngxSwipe, CngxSwipeDismiss, CngxToggle, DEFAULT_MENU_CONFIG, canDeactivateWhenClean, createChipStripRoving, createMenuAnnouncer, createMenuDismissHandler, createMenuRadioController, createMenuTriggerDismissBinding, createTreeAdItems, createTreeController, createW3CMenuStrategy, createW3CTreeStrategy, injectErrorAggregator, injectErrorScope, injectMenuAnnouncer, injectMenuConfig, injectNavConfig, injectTreeConfig, optimistic, provideCngxMenu, provideErrorRegistry, provideMenuConfig, provideMenuConfigAt, provideNavConfig, provideTreeConfig, provideTreeConfigAt, reflectAsyncDisplayStatus, withAriaLabels, withCloseOnSelect, withDefaultInitiallyExpanded, withDefaultKeyFn, withDefaultLabelFn, withDefaultNodeIdFn, withDismissOnBlur, withDismissOnOutsideClick, withDismissOnScroll, withGlobalRevealOnSubmit, withNavAnimation, withNavIndent, withRetry, withRevealOnNavigate, withSingleAccordion, withSubmenuCloseDelay, withSubmenuOpenDelay, withTreeCacheLimit, withTypeaheadDebounce };
6588
- export type { AsyncAction, CngxAsyncDisplayStatus, CngxButtonMultiToggleGroupContract, CngxButtonToggleGroupContract, CngxChipGroupHost, CngxChipStripRovingController, CngxChipStripRovingFactory, CngxChipStripRovingOptions, CngxControlValue, CngxErrorAggregatorContract, CngxErrorAggregatorSourceEntry, CngxErrorScopeContract, CngxHierarchicalNavAction, CngxHierarchicalNavContext, CngxHierarchicalNavStrategy, CngxMenuAnnouncerFactory, CngxMenuAnnouncerLike, CngxMenuAriaLabels, CngxMenuConfig, CngxMenuConfigFeature, CngxMenuDismissHandler, CngxMenuDismissHandlerFactory, CngxMenuDismissHandlerOptions, CngxMenuDismissPopoverRef, CngxMenuDismissSource, CngxMenuFeature, CngxMenuHost, CngxMenuNavAction, CngxMenuNavContext, CngxMenuNavStrategy, CngxMenuRadioGroup, CngxMenuRadioGroupFactory, CngxMenuSubmenuLike, CngxMenuTriggerDismissBinding, CngxMenuTriggerDismissBindingOptions, CngxNavConfig, CngxOptionContainer, CngxOptionContainerGroup, CngxOptionContainerOption, CngxOptionFilterHost, CngxOptionInteractionHost, CngxOptionStatus, CngxOptionStatusHost, CngxRadioGroupContract, CngxRadioRegistration, CngxReorderEvent, CngxReorderModifier, CngxTreeConfig, CngxTreeConfigFeature, CngxTreeController, CngxTreeControllerFactory, CngxTreeControllerOptions, ErrorRegistryFeature, ListboxMatchFn, NavBadgeVariant, NavConfigFeature, OptimisticState, RetryConfig, RetryState, SwipeAxis, SwipeDirection };
7570
+ export { CNGX_ACCORDION, CNGX_BREADCRUMB, CNGX_BREADCRUMB_COLLAPSE_STRATEGY, CNGX_BUTTON_MULTI_TOGGLE_GROUP, CNGX_BUTTON_TOGGLE_GROUP, CNGX_CHIP_GROUP_HOST, CNGX_CHIP_STRIP_ROVING_FACTORY, CNGX_CLOSE_ICON, CNGX_CONTROL_VALUE, CNGX_ERROR_AGGREGATOR, CNGX_ERROR_SCOPE, CNGX_HIERARCHICAL_NAV_STRATEGY, CNGX_HOVER_INTENT_DEFAULTS, CNGX_MENU_ANNOUNCER_FACTORY, CNGX_MENU_CONFIG, CNGX_MENU_DISMISS_HANDLER_FACTORY, CNGX_MENU_HOST, CNGX_MENU_NAV_STRATEGY, CNGX_MENU_RADIO_GROUP, CNGX_MENU_SUBMENU_ITEM, CNGX_NAV_CONFIG, CNGX_OPTION_CONTAINER, CNGX_OPTION_FILTER_HOST, CNGX_OPTION_INTERACTION_HOST, CNGX_OPTION_STATUS_HOST, CNGX_RADIO_GROUP, CNGX_SLIDER_RANGE, CNGX_SUBMENU_TRY_FALLBACKS, CNGX_TREE_CONFIG, CNGX_TREE_CONTROLLER_FACTORY, CngxAccordion, CngxAccordionPanel, CngxAsyncClick, CngxAsyncStatus, CngxBeforeUnload, CngxBreadcrumb, CngxBreadcrumbItem, CngxBreadcrumbSeparator, CngxButtonMultiToggleGroup, CngxButtonToggle, CngxButtonToggleGroup, CngxCheckbox, CngxCheckboxGroup, CngxChipGroup, CngxChipInGroup, CngxChipInput, CngxChipInteraction, CngxClickOutside, CngxCloseButton, CngxContextMenuTrigger, CngxCopyBlock, CngxCopyText, CngxDisclosure, CngxErrorAggregator, CngxErrorRegistry, CngxErrorScope, CngxErrorSource, CngxErrorState, CngxExpandable, CngxFailed, CngxHierarchicalNav, CngxHoverIntent, CngxHoverable, CngxKeyboardShortcut, CngxListbox, CngxListboxSearch, CngxListboxTrigger, CngxLongPress, CngxMenu, CngxMenuAnnouncer, CngxMenuGroup, CngxMenuItem, CngxMenuItemCheckbox, CngxMenuItemIcon, CngxMenuItemKbd, CngxMenuItemLabel, CngxMenuItemRadio, CngxMenuItemSubmenu, CngxMenuItemSuffix, CngxMenuSeparator, CngxMenuTrigger, CngxMultiChipGroup, CngxNavBadge, CngxNavGroup, CngxNavGroupRegistry, CngxNavLabel, CngxNavLink, CngxOption, CngxOptionGroup, CngxPending, CngxPressRipple, CngxPressable, CngxRadio, CngxRadioGroup, CngxRangeSlider, CngxRangeSliderTrack, CngxReorder, CngxRipple, CngxSearch, CngxSlider, CngxSliderThumb, CngxSliderTrack, CngxSpeak, CngxSucceeded, CngxSwipe, CngxSwipeDismiss, CngxToggle, DEFAULT_BREADCRUMB_WIDTH_TIERS, DEFAULT_MENU_CONFIG, canDeactivateWhenClean, createAccordionKeyboardNav, createBreadcrumbCollapse, createChipStripRoving, createMenuAnnouncer, createMenuDismissHandler, createMenuRadioController, createMenuTriggerDismissBinding, createSliderCore, createTreeAdItems, createTreeController, createW3CMenuStrategy, createW3CTreeStrategy, injectErrorAggregator, injectErrorScope, injectMenuAnnouncer, injectMenuConfig, injectNavConfig, injectTreeConfig, optimistic, provideCngxMenu, provideErrorRegistry, provideMenuConfig, provideMenuConfigAt, provideNavConfig, provideTreeConfig, provideTreeConfigAt, reflectAsyncDisplayStatus, resolveBreadcrumbTier, withAriaLabels, withCloseOnSelect, withDefaultInitiallyExpanded, withDefaultKeyFn, withDefaultLabelFn, withDefaultNodeIdFn, withDismissOnBlur, withDismissOnOutsideClick, withDismissOnScroll, withGlobalRevealOnSubmit, withNavAnimation, withNavIndent, withRetry, withRevealOnNavigate, withSingleAccordion, withSubmenuCloseDelay, withSubmenuOpenDelay, withTreeCacheLimit, withTypeaheadDebounce };
7571
+ export type { AsyncAction, CngxAccordionHeaderHandle, CngxAccordionHost, CngxAccordionKeyboardNav, CngxAccordionKeyboardNavHost, CngxAccordionKeyboardNavOptions, CngxAsyncDisplayStatus, CngxBreadcrumbCollapseStrategy, CngxBreadcrumbHost, CngxBreadcrumbWidthTier, CngxButtonMultiToggleGroupContract, CngxButtonToggleGroupContract, CngxChipGroupHost, CngxChipStripRovingController, CngxChipStripRovingFactory, CngxChipStripRovingOptions, CngxControlValue, CngxErrorAggregatorContract, CngxErrorAggregatorSourceEntry, CngxErrorScopeContract, CngxHierarchicalNavAction, CngxHierarchicalNavContext, CngxHierarchicalNavStrategy, CngxHoverIntentDefaults, CngxMenuAnnouncerFactory, CngxMenuAnnouncerLike, CngxMenuAriaLabels, CngxMenuConfig, CngxMenuConfigFeature, CngxMenuDismissHandler, CngxMenuDismissHandlerFactory, CngxMenuDismissHandlerOptions, CngxMenuDismissPopoverRef, CngxMenuDismissSource, CngxMenuFeature, CngxMenuHost, CngxMenuNavAction, CngxMenuNavContext, CngxMenuNavStrategy, CngxMenuRadioGroup, CngxMenuRadioGroupFactory, CngxMenuSubmenuLike, CngxMenuTriggerDismissBinding, CngxMenuTriggerDismissBindingOptions, CngxNavConfig, CngxOptionContainer, CngxOptionContainerGroup, CngxOptionContainerOption, CngxOptionFilterHost, CngxOptionInteractionHost, CngxOptionStatus, CngxOptionStatusHost, CngxRadioGroupContract, CngxRadioRegistration, CngxReorderEvent, CngxReorderModifier, CngxSliderCore, CngxSliderCoreOptions, CngxSliderRangeHost, CngxSliderThumbBounds, CngxSliderThumbPosition, CngxTreeConfig, CngxTreeConfigFeature, CngxTreeController, CngxTreeControllerFactory, CngxTreeControllerOptions, ErrorRegistryFeature, ListboxMatchFn, NavBadgeVariant, NavConfigFeature, OptimisticState, RetryConfig, RetryState, SwipeAxis, SwipeDirection };