@cngx/ui 0.1.0-rc.2 → 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 (48) hide show
  1. package/README.md +15 -7
  2. package/accordion/README.md +86 -0
  3. package/collection/README.md +167 -0
  4. package/data-grid-accordion/README.md +137 -0
  5. package/fesm2022/cngx-ui-accordion.mjs +853 -0
  6. package/fesm2022/cngx-ui-accordion.mjs.map +1 -0
  7. package/fesm2022/cngx-ui-action-button.mjs +2 -2
  8. package/fesm2022/cngx-ui-action-button.mjs.map +1 -1
  9. package/fesm2022/cngx-ui-breadcrumb.mjs +1044 -0
  10. package/fesm2022/cngx-ui-breadcrumb.mjs.map +1 -0
  11. package/fesm2022/cngx-ui-collection.mjs +645 -0
  12. package/fesm2022/cngx-ui-collection.mjs.map +1 -0
  13. package/fesm2022/cngx-ui-data-grid-accordion.mjs +1135 -0
  14. package/fesm2022/cngx-ui-data-grid-accordion.mjs.map +1 -0
  15. package/fesm2022/cngx-ui-empty-state.mjs +2 -2
  16. package/fesm2022/cngx-ui-empty-state.mjs.map +1 -1
  17. package/fesm2022/cngx-ui-feedback.mjs +10 -10
  18. package/fesm2022/cngx-ui-feedback.mjs.map +1 -1
  19. package/fesm2022/cngx-ui-mat-accordion.mjs +229 -0
  20. package/fesm2022/cngx-ui-mat-accordion.mjs.map +1 -0
  21. package/fesm2022/cngx-ui-mat-paginator.mjs +215 -0
  22. package/fesm2022/cngx-ui-mat-paginator.mjs.map +1 -0
  23. package/fesm2022/cngx-ui-paginator.mjs +1937 -0
  24. package/fesm2022/cngx-ui-paginator.mjs.map +1 -0
  25. package/fesm2022/cngx-ui-sidenav.mjs +547 -65
  26. package/fesm2022/cngx-ui-sidenav.mjs.map +1 -1
  27. package/fesm2022/cngx-ui-tabs.mjs +8 -6
  28. package/fesm2022/cngx-ui-tabs.mjs.map +1 -1
  29. package/fesm2022/cngx-ui.mjs +2 -2
  30. package/fesm2022/cngx-ui.mjs.map +1 -1
  31. package/mat-accordion/README.md +48 -0
  32. package/mat-paginator/README.md +135 -0
  33. package/package.json +29 -5
  34. package/paginator/README.md +134 -0
  35. package/sidenav/README.md +89 -3
  36. package/types/cngx-ui-accordion.d.ts +801 -0
  37. package/types/cngx-ui-breadcrumb.d.ts +890 -0
  38. package/types/cngx-ui-collection.d.ts +396 -0
  39. package/types/cngx-ui-data-grid-accordion.d.ts +912 -0
  40. package/types/cngx-ui-mat-accordion.d.ts +63 -0
  41. package/types/cngx-ui-mat-paginator.d.ts +108 -0
  42. package/types/cngx-ui-paginator.d.ts +1147 -0
  43. package/types/cngx-ui-sidenav.d.ts +429 -21
  44. package/types/cngx-ui-tabs.d.ts +2 -0
  45. package/fesm2022/cngx-ui-material.mjs +0 -90
  46. package/fesm2022/cngx-ui-material.mjs.map +0 -1
  47. package/material/README.md +0 -90
  48. package/types/cngx-ui-material.d.ts +0 -47
@@ -0,0 +1,890 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { TemplateRef, InjectionToken, Signal, EnvironmentProviders, Provider } from '@angular/core';
3
+ import * as _cngx_common_interactive from '@cngx/common/interactive';
4
+ import { CngxBreadcrumbWidthTier, CngxBreadcrumbItem } from '@cngx/common/interactive';
5
+ import * as i1 from '@cngx/common/layout';
6
+
7
+ /**
8
+ * Selectable visual skin for `CngxBreadcrumbBar`. Every skin keeps the same
9
+ * `nav` / list / crumb / separator structure with identical ARIA and collapse
10
+ * behaviour, and the `[data-skin]` host attribute redirects which `@scope`
11
+ * paint block applies. Pure paint skins (`plain`, `contained`, `pill`,
12
+ * `ribbon`, `editorial`, `header`, `metro`, `toolbar`, `chips`) render
13
+ * identical DOM. The content skins (`iconlabel`, `path`, and the content-
14
+ * structural `icononly` / `shell` / `record`) additionally consume the
15
+ * projected `*cngxBreadcrumbIcon` slot - and `record` the trailing accessory
16
+ * slot - for per-crumb icon/content markup the consumer supplies; the bar still
17
+ * carries no skin-conditional template branch, so the slot is inert until
18
+ * projected (Pillar 3). `'classic'` is the bare default (plain link + slash
19
+ * separator). Mirrors `CngxTabsSkin`.
20
+ *
21
+ * @category ui/breadcrumb
22
+ * @since 0.1.0
23
+ */
24
+ type CngxBreadcrumbSkin = 'classic' | 'plain' | 'contained' | 'pill' | 'ribbon' | 'editorial' | 'header' | 'metro' | 'toolbar' | 'chips' | 'path' | 'iconlabel' | 'icononly' | 'shell' | 'record';
25
+ /**
26
+ * App-wide cascade for the breadcrumb family's ARIA labels, the router
27
+ * `dataKey`, and the default visual `skin`.
28
+ *
29
+ * Resolution priority (high -> low):
30
+ * 1. Per-instance Input binding (e.g. `[label]="'Trail'"`, `skin="pill"`).
31
+ * 2. `provideBreadcrumbConfigAt(...)` in a parent component's
32
+ * `viewProviders` (component-scoped override).
33
+ * 3. `provideBreadcrumbConfig(...)` at the application root.
34
+ * 4. Library defaults (English; merged in via `CNGX_BREADCRUMB_DEFAULTS`).
35
+ *
36
+ * Every key is optional - partial overrides deep-merge with the library
37
+ * defaults, so consumers declare only the keys they want to override.
38
+ *
39
+ * @category ui/breadcrumb
40
+ * @since 0.1.0
41
+ */
42
+ interface CngxBreadcrumbConfig {
43
+ /**
44
+ * ARIA-string fallbacks for the bar landmark and the overflow/siblings
45
+ * dropdown triggers and lists. Per-instance `[label]`/`[triggerLabel]`/
46
+ * `[menuLabel]` bindings still win over these.
47
+ */
48
+ readonly ariaLabels?: {
49
+ /** Accessible name of the `nav` landmark on `CngxBreadcrumbBar`. */
50
+ readonly bar?: string;
51
+ /** Accessible name of the overflow ellipsis trigger. */
52
+ readonly overflowTrigger?: string;
53
+ /** Accessible name of the collapsed-crumb menu. */
54
+ readonly overflowMenu?: string;
55
+ /** Accessible name of the siblings chevron trigger. */
56
+ readonly siblingsTrigger?: string;
57
+ /** Accessible name of the sibling list. */
58
+ readonly siblingsMenu?: string;
59
+ };
60
+ /**
61
+ * Router-sync defaults shared by the trail (`CngxBreadcrumbRouterSync`)
62
+ * and siblings (`CngxBreadcrumbSiblingsRouterSync`) route directives.
63
+ */
64
+ readonly router?: {
65
+ /** Route-data key the router-sync directives read crumbs/siblings from. */
66
+ readonly dataKey?: string;
67
+ /**
68
+ * Route-data key `CngxBreadcrumbRouterSync` reads the per-crumb opaque
69
+ * icon token from (default `'icon'`). Mirrors `dataKey` for cascade parity.
70
+ */
71
+ readonly iconKey?: string;
72
+ };
73
+ /**
74
+ * App-wide default visual skin. Per-instance `[skin]` still wins; this only
75
+ * moves the cascade default. Unset resolves to `'classic'` at the bar. A
76
+ * flat top-level scalar (like `config.skin` in tabs), not a nested sub-tree.
77
+ */
78
+ readonly skin?: CngxBreadcrumbSkin;
79
+ }
80
+
81
+ /**
82
+ * One crumb in a {@link CngxBreadcrumbBar} trail. `href` renders a plain-link
83
+ * crumb. The terminal crumb needs no target - it is derived from position and
84
+ * rendered as the current page.
85
+ *
86
+ * @category ui/breadcrumb
87
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/breadcrumb/breadcrumb.types.ts
88
+ * @since 0.1.0
89
+ * @relatedTo CngxBreadcrumbBar
90
+ */
91
+ interface CngxBreadcrumbCrumb {
92
+ /** Visible, and accessible, crumb text. */
93
+ readonly label: string;
94
+ /**
95
+ * Target for a plain-link crumb. Omit on the terminal crumb. Keep it unique
96
+ * across the trail: the bar tracks crumbs by `href ?? label`, so two crumbs
97
+ * that share an `href` collide on the track key and throw NG0955. The router
98
+ * source dedups a repeated URL automatically; a hand-built `[items]` array
99
+ * must not repeat one.
100
+ */
101
+ readonly href?: string;
102
+ /**
103
+ * Opaque per-crumb icon token. cngx never interprets this string - it is
104
+ * handed verbatim to the projected `*cngxBreadcrumbIcon` slot as the
105
+ * `{ crumb }` context, and the consumer's slot renders it with whatever icon
106
+ * system they use (`<mat-icon>{{ crumb.icon }}</mat-icon>`, an icon font,
107
+ * inline SVG, `<app-icon>`). cngx ships no icon set and resolves no names.
108
+ * Omit it and the leading icon slot simply renders nothing for that crumb.
109
+ */
110
+ readonly icon?: string;
111
+ /**
112
+ * Static lateral-navigation alternatives for this crumb. When present and
113
+ * non-empty, {@link CngxBreadcrumbBar} auto-renders a
114
+ * {@link CngxBreadcrumbSiblings} dropdown for the crumb - no consumer wiring.
115
+ * Static data only; router-driven siblings compose through the
116
+ * `*cngxBreadcrumbItemAccessory` slot instead (the bar stays free of
117
+ * `@angular/router`). An empty array renders nothing (the dropdown self-hides).
118
+ */
119
+ readonly siblings?: readonly CngxBreadcrumbSibling[];
120
+ }
121
+ /**
122
+ * One sibling in a {@link CngxBreadcrumbSiblings} dropdown - an alternative
123
+ * page at the same trail level. `href` renders a navigable row; the active
124
+ * level is marked `current`, which renders as `aria-current="page"` and drops
125
+ * the link.
126
+ *
127
+ * @category ui/breadcrumb
128
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/breadcrumb/breadcrumb.types.ts
129
+ * @since 0.1.0
130
+ * @relatedTo CngxBreadcrumbSiblings
131
+ */
132
+ interface CngxBreadcrumbSibling {
133
+ /** Visible, and accessible, sibling text. */
134
+ readonly label: string;
135
+ /** Target for a navigable sibling. Omit (or set `current`) on the active level. */
136
+ readonly href?: string;
137
+ /** Marks the sibling representing the current level - rendered as `aria-current="page"`, no link. */
138
+ readonly current?: boolean;
139
+ }
140
+
141
+ /**
142
+ * Breadcrumb bar organism. A thin `<cngx-breadcrumb [items]="...">` shell that
143
+ * renders a trail through the headless `@cngx/common/interactive` trio
144
+ * (`CngxBreadcrumb` / `CngxBreadcrumbItem` / `CngxBreadcrumbSeparator`) - the
145
+ * bar forwards inputs and owns the skin, the trio owns the collapse, terminal
146
+ * marking, and landmark a11y. Everything derives (Pillar 1); nothing here syncs.
147
+ *
148
+ * Two data modes without baking `@angular/router` into the base component:
149
+ * the uncontrolled `[items]` input, and an opt-in controlled source provided
150
+ * through {@link CNGX_BREADCRUMB_ITEMS_SOURCE} (the router-sync directive). The
151
+ * source wins over the input via `computed`, so an external producer augments
152
+ * the trail through a token, never by writing this component's `input()`.
153
+ *
154
+ * ```html
155
+ * <cngx-breadcrumb [items]="crumbs" [maxVisible]="4" skin="pill" />
156
+ * ```
157
+ *
158
+ * @category ui/breadcrumb
159
+ * @docsKind primary
160
+ * @wcag AA
161
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/breadcrumb/breadcrumb-bar.component.ts
162
+ * @since 0.1.0
163
+ * @relatedTo CngxBreadcrumb, CngxBreadcrumbItem, CngxBreadcrumbSeparator, CngxBreadcrumbOverflow, CngxBreadcrumbSiblings, CngxBreadcrumbItemAccessory, CngxBreadcrumbOverflowItem, CngxBreadcrumbRouterSync
164
+ * <example-url>http://localhost:4200/#/ui/breadcrumb/basic/explicit-items</example-url>
165
+ */
166
+ declare class CngxBreadcrumbBar {
167
+ /** Uncontrolled trail. Ignored when a {@link CNGX_BREADCRUMB_ITEMS_SOURCE} is provided. */
168
+ readonly itemsInput: _angular_core.InputSignal<readonly CngxBreadcrumbCrumb[]>;
169
+ /**
170
+ * Maximum crumbs to show before the middle collapses. Unset = never collapse,
171
+ * unless {@link responsive} is on. An explicit value always wins over the
172
+ * width-derived one (controlled/uncontrolled), resolved by {@link effectiveMaxVisible}.
173
+ */
174
+ readonly maxVisible: _angular_core.InputSignal<number | undefined>;
175
+ /**
176
+ * Opt in to width-responsive collapse: the bar derives `maxVisible` from its own
177
+ * width via the {@link CngxResizeObserver} hostDirective and the pure
178
+ * `resolveBreadcrumbTier`. No hand-wired observer or `computed` needed - one
179
+ * attribute makes every skin responsive. Ignored when {@link maxVisible} is set.
180
+ */
181
+ readonly responsive: _angular_core.InputSignalWithTransform<boolean, unknown>;
182
+ /** Width tiers driving the responsive collapse. Defaults to {@link DEFAULT_BREADCRUMB_WIDTH_TIERS}. */
183
+ readonly responsiveTiers: _angular_core.InputSignal<readonly CngxBreadcrumbWidthTier[]>;
184
+ private readonly resize;
185
+ private readonly cfg;
186
+ /** Accessible name of the `nav` landmark. Falls back through the config cascade to the EN default. */
187
+ readonly label: _angular_core.InputSignal<string>;
188
+ /**
189
+ * Visual skin, reflected onto `[data-skin]`. Cascade `input ?? config.skin ??
190
+ * 'classic'`, resolved by {@link resolvedSkin}. Pure thematic concern -
191
+ * structure, slots, and ARIA are identical across values.
192
+ */
193
+ readonly skin: _angular_core.InputSignal<CngxBreadcrumbSkin | undefined>;
194
+ private readonly itemsSource;
195
+ /**
196
+ * Projected per-crumb accessory template. When present it wins over the
197
+ * declarative `crumb.siblings` auto-render for every crumb (one predictable
198
+ * owner of the accessory area). The `contentChild` is already a
199
+ * `Signal<TemplateRef | undefined>` - bound directly, no pass-through `computed`.
200
+ */
201
+ protected readonly accessory: _angular_core.Signal<TemplateRef<any> | undefined>;
202
+ /**
203
+ * Projected leading per-crumb icon template. Rendered inside every crumb link
204
+ * (`<a>`) before the label span, fed the `{ crumb, index }` context so the
205
+ * consumer renders the opaque `crumb.icon` with any icon system. Direct
206
+ * `Signal<TemplateRef | undefined>` - bound in the template, no pass-through.
207
+ */
208
+ protected readonly icon: _angular_core.Signal<TemplateRef<any> | undefined>;
209
+ /**
210
+ * Projected overflow-row template, forwarded to the composed
211
+ * {@link CngxBreadcrumbOverflow} (which the consumer cannot reach as
212
+ * `contentChild` through the bar). Lets a consumer customize the collapsed-crumb
213
+ * rows without hand-composing the headless trail.
214
+ */
215
+ protected readonly overflowRow: _angular_core.Signal<TemplateRef<any> | undefined>;
216
+ /** The rendered trail: a provided source wins over the `[items]` input (controlled/uncontrolled). */
217
+ protected readonly items: _angular_core.Signal<readonly CngxBreadcrumbCrumb[]>;
218
+ /** Resolved skin (`input ?? config.skin ?? 'classic'`), reflected onto `[data-skin]`. */
219
+ protected readonly resolvedSkin: _angular_core.Signal<CngxBreadcrumbSkin>;
220
+ /**
221
+ * Width-derived crumb cap. `undefined` until the observer's first measurement
222
+ * ({@link CngxResizeObserver.isReady}), so a narrow mount never mis-collapses on
223
+ * a `width() == 0` first read - the sub-frame full-trail transient settles once
224
+ * the ResizeObserver fires.
225
+ */
226
+ protected readonly autoMaxVisible: _angular_core.Signal<number | undefined>;
227
+ /**
228
+ * The `maxVisible` forwarded to the inner collapse: explicit `[maxVisible]` wins,
229
+ * else the width-derived value when {@link responsive} is on, else `undefined`
230
+ * (no collapse - the current default behaviour).
231
+ */
232
+ protected readonly effectiveMaxVisible: _angular_core.Signal<number | undefined>;
233
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxBreadcrumbBar, never>;
234
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxBreadcrumbBar, "cngx-breadcrumb", ["cngxBreadcrumbBar"], { "itemsInput": { "alias": "items"; "required": false; "isSignal": true; }; "maxVisible": { "alias": "maxVisible"; "required": false; "isSignal": true; }; "responsive": { "alias": "responsive"; "required": false; "isSignal": true; }; "responsiveTiers": { "alias": "responsiveTiers"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "skin": { "alias": "skin"; "required": false; "isSignal": true; }; }, {}, ["accessory", "icon", "overflowRow"], never, true, [{ directive: typeof i1.CngxResizeObserver; inputs: {}; outputs: {}; }]>;
235
+ }
236
+
237
+ /**
238
+ * Context for the `*cngxBreadcrumbOverflowItem` template. Replaces the default
239
+ * `crumb.resolvedLabel()` text inside the overflow menu; the surrounding
240
+ * `<li cngxMenuItem>` shell (role, highlight, activation) stays library-owned.
241
+ *
242
+ * @category ui/breadcrumb
243
+ */
244
+ interface CngxBreadcrumbOverflowItemContext {
245
+ /** Convenience alias for `crumb` - usable as the `let-crumb` shorthand. */
246
+ readonly $implicit: CngxBreadcrumbItem;
247
+ /** The collapsed crumb the row represents. */
248
+ readonly crumb: CngxBreadcrumbItem;
249
+ /** Row index inside `collapsedItems()`, starting at 0. */
250
+ readonly index: number;
251
+ }
252
+ /**
253
+ * Structural slot for the per-row body inside the {@link CngxBreadcrumbOverflow}
254
+ * menu. Replaces the default label row so a consumer can render a navigable
255
+ * crumb (an `<a href>` or `[routerLink]`); the `<li cngxMenuItem>` shell stays
256
+ * library-owned.
257
+ *
258
+ * ```html
259
+ * <cngx-breadcrumb-overflow>
260
+ * <ng-template cngxBreadcrumbOverflowItem let-crumb>
261
+ * <a [href]="hrefFor(crumb)">{{ crumb.resolvedLabel() }}</a>
262
+ * </ng-template>
263
+ * </cngx-breadcrumb-overflow>
264
+ * ```
265
+ *
266
+ * @category ui/breadcrumb
267
+ * @wcag AA
268
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/breadcrumb/breadcrumb-overflow-item.directive.ts
269
+ * @since 0.1.0
270
+ * @relatedTo CngxBreadcrumbOverflow, CngxBreadcrumbBar
271
+ * <example-url>http://localhost:4200/#/ui/breadcrumb/overflow/custom-overflow-row</example-url>
272
+ */
273
+ declare class CngxBreadcrumbOverflowItem {
274
+ readonly templateRef: TemplateRef<CngxBreadcrumbOverflowItemContext>;
275
+ /** Narrows `let-` bindings to {@link CngxBreadcrumbOverflowItemContext} under strict templates. */
276
+ static ngTemplateContextGuard(_dir: CngxBreadcrumbOverflowItem, _ctx: unknown): _ctx is CngxBreadcrumbOverflowItemContext;
277
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxBreadcrumbOverflowItem, never>;
278
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxBreadcrumbOverflowItem, "ng-template[cngxBreadcrumbOverflowItem]", ["cngxBreadcrumbOverflowItem"], {}, {}, never, never, true, never>;
279
+ }
280
+
281
+ /**
282
+ * Drop-in overflow menu for {@link CngxBreadcrumbBar}. Presents the crumbs the
283
+ * headless trail collapsed as a real dropdown: an ellipsis trigger plus a
284
+ * {@link CngxPopoverPanel} surface hosting a {@link CngxMenu} of the collapsed
285
+ * crumbs. It reads the collapse set through the {@link CNGX_BREADCRUMB} DI
286
+ * contract - never the concrete coordinator - so it stays decompose-clean, and
287
+ * self-hides when nothing is collapsed, which makes it an unconditional drop-in.
288
+ *
289
+ * The default row lists `resolvedLabel()` and does not navigate. Project
290
+ * `*cngxBreadcrumbOverflowItem` to render a navigable row (an `<a href>` or
291
+ * `[routerLink]`) when the collapsed crumbs must link.
292
+ *
293
+ * ```html
294
+ * <nav cngxBreadcrumb [maxVisible]="4">
295
+ * <a cngxBreadcrumbItem href="/">Home</a>
296
+ * <cngx-breadcrumb-overflow />
297
+ * ...
298
+ * </nav>
299
+ * ```
300
+ *
301
+ * @category ui/breadcrumb
302
+ * @wcag AA
303
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/breadcrumb/breadcrumb-overflow.component.ts
304
+ * @since 0.1.0
305
+ * @relatedTo CngxBreadcrumbBar, CngxBreadcrumbOverflowItem, CngxPopoverPanel, CngxPopoverTrigger, CngxMenu, CngxMenuTrigger
306
+ * <example-url>http://localhost:4200/#/ui/breadcrumb/overflow/collapsed-menu</example-url>
307
+ */
308
+ declare class CngxBreadcrumbOverflow {
309
+ /** Collapse-set contract, provided by the surrounding `cngxBreadcrumb`. */
310
+ protected readonly breadcrumb: _cngx_common_interactive.CngxBreadcrumbHost;
311
+ private readonly cfg;
312
+ /** Accessible name of the ellipsis trigger. Falls back through the config cascade to the EN default. */
313
+ readonly triggerLabel: _angular_core.InputSignal<string>;
314
+ /** Accessible name of the collapsed-crumb menu. Falls back through the config cascade to the EN default. */
315
+ readonly menuLabel: _angular_core.InputSignal<string>;
316
+ /**
317
+ * Per-row template forwarded by {@link CngxBreadcrumbBar}. Lets the bar pass a
318
+ * consumer-projected `*cngxBreadcrumbOverflowItem` into this composed overflow,
319
+ * which it cannot reach as `contentChild`. Wins over the directly-projected
320
+ * slot (controlled/uncontrolled: input first, query fallback).
321
+ */
322
+ readonly itemTemplateInput: _angular_core.InputSignal<TemplateRef<CngxBreadcrumbOverflowItemContext> | undefined>;
323
+ /** Per-row template projected directly into this component (headless drop-in use). */
324
+ private readonly itemTemplateQuery;
325
+ /** Resolved row template: a bar-forwarded input wins, else the directly-projected slot. */
326
+ protected readonly itemTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
327
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxBreadcrumbOverflow, never>;
328
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxBreadcrumbOverflow, "cngx-breadcrumb-overflow", ["cngxBreadcrumbOverflow"], { "triggerLabel": { "alias": "triggerLabel"; "required": false; "isSignal": true; }; "menuLabel": { "alias": "menuLabel"; "required": false; "isSignal": true; }; "itemTemplateInput": { "alias": "itemTemplate"; "required": false; "isSignal": true; }; }, {}, ["itemTemplateQuery"], [":not([cngxBreadcrumbOverflowItem])"], true, never>;
329
+ }
330
+
331
+ /**
332
+ * Per-crumb lateral-navigation dropdown for a hand-composed breadcrumb trail.
333
+ * Where {@link CngxBreadcrumbOverflow} lists the *collapsed ancestors* of the
334
+ * current trail, this lists the *siblings at one level* - the alternatives a
335
+ * user can jump sideways to (`Home > Region EU > Berlin` offering `Munich`,
336
+ * `Hamburg`). It is a disclosure over lateral navigation: a
337
+ * {@link CngxPopoverTrigger}-owned chevron reveals a {@link CngxPopoverPanel}
338
+ * surface holding a `role="list"` of native `<a href>` anchors, and it
339
+ * self-hides when there are no siblings. Native link semantics give keyboard
340
+ * activation, screen-reader link roles, and middle-click for free - a command
341
+ * menu would intercept activation and never navigate.
342
+ *
343
+ * It owns its own sibling data and never injects the collapse coordinator, so it
344
+ * drops in anywhere a crumb needs a sideways picker. Rows come from the static
345
+ * `[siblings]` input, or - opt-in - from a `CNGX_BREADCRUMB_SIBLINGS_SOURCE`
346
+ * provider (the router-sync directive); the controlled source wins over the
347
+ * input via a `computed` (Pillar 1: no effect writes). The active level carries
348
+ * `aria-current="page"` and renders no link.
349
+ *
350
+ * ```html
351
+ * <nav cngxBreadcrumb>
352
+ * <a cngxBreadcrumbItem href="/">Home</a>
353
+ * <a cngxBreadcrumbItem href="/eu">Region EU</a>
354
+ * <cngx-breadcrumb-siblings [siblings]="cities" />
355
+ * </nav>
356
+ * ```
357
+ *
358
+ * @category ui/breadcrumb
359
+ * @docsKind primary
360
+ * @wcag AA
361
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/breadcrumb/breadcrumb-siblings.component.ts
362
+ * @since 0.1.0
363
+ * @relatedTo CngxBreadcrumbSiblingItem, CngxBreadcrumbSiblingsRouterSync, CngxBreadcrumbSiblingsSource, CngxBreadcrumbBar, CngxPopoverPanel, CngxPopoverTrigger
364
+ * <example-url>http://localhost:4200/#/ui/breadcrumb/siblings/static-siblings</example-url>
365
+ */
366
+ declare class CngxBreadcrumbSiblings {
367
+ /** Static sibling rows. Superseded by a provided `CNGX_BREADCRUMB_SIBLINGS_SOURCE`. */
368
+ readonly siblingsInput: _angular_core.InputSignal<readonly CngxBreadcrumbSibling[]>;
369
+ private readonly cfg;
370
+ /** Accessible name of the chevron trigger. Falls back through the config cascade to the EN default. */
371
+ readonly triggerLabel: _angular_core.InputSignal<string>;
372
+ /** Accessible name of the sibling list (kept as `menuLabel` for overflow symmetry). Falls back through the config cascade to the EN default. */
373
+ readonly menuLabel: _angular_core.InputSignal<string>;
374
+ /** Opt-in controlled source (router-sync directive) - wins over `[siblings]`. */
375
+ private readonly source;
376
+ /** Rows the dropdown renders: controlled source wins, else the static input. */
377
+ protected readonly items: _angular_core.Signal<readonly CngxBreadcrumbSibling[]>;
378
+ /** Drives the self-hide: no trigger, no panel when there are no siblings. */
379
+ protected readonly hasSiblings: _angular_core.Signal<boolean>;
380
+ /** Per-row template overriding the default sibling row, when projected. */
381
+ protected readonly itemTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
382
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxBreadcrumbSiblings, never>;
383
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxBreadcrumbSiblings, "cngx-breadcrumb-siblings", ["cngxBreadcrumbSiblings"], { "siblingsInput": { "alias": "siblings"; "required": false; "isSignal": true; }; "triggerLabel": { "alias": "triggerLabel"; "required": false; "isSignal": true; }; "menuLabel": { "alias": "menuLabel"; "required": false; "isSignal": true; }; }, {}, ["itemTemplate"], [":not([cngxBreadcrumbSiblingItem])"], true, never>;
384
+ }
385
+
386
+ /**
387
+ * Context for the `*cngxBreadcrumbSiblingItem` template. Replaces the default
388
+ * sibling row inside the {@link CngxBreadcrumbSiblings} menu; the surrounding
389
+ * `<li cngxMenuItem>` shell (role, highlight, activation, `aria-current`) stays
390
+ * library-owned.
391
+ *
392
+ * @category ui/breadcrumb
393
+ */
394
+ interface CngxBreadcrumbSiblingItemContext {
395
+ /** Convenience alias for `sibling` - usable as the `let-sibling` shorthand. */
396
+ readonly $implicit: CngxBreadcrumbSibling;
397
+ /** The sibling the row represents. */
398
+ readonly sibling: CngxBreadcrumbSibling;
399
+ /** Row index inside the siblings list, starting at 0. */
400
+ readonly index: number;
401
+ }
402
+ /**
403
+ * Structural slot for the per-row body inside the {@link CngxBreadcrumbSiblings}
404
+ * menu. Replaces the default sibling row so a consumer can render a richer row
405
+ * (an icon + label, a navigable `<a href>`); the `<li cngxMenuItem>` shell stays
406
+ * library-owned.
407
+ *
408
+ * ```html
409
+ * <cngx-breadcrumb-siblings [siblings]="siblings">
410
+ * <ng-template cngxBreadcrumbSiblingItem let-sibling>
411
+ * <a [href]="sibling.href">{{ sibling.label }}</a>
412
+ * </ng-template>
413
+ * </cngx-breadcrumb-siblings>
414
+ * ```
415
+ *
416
+ * @category ui/breadcrumb
417
+ * @wcag AA
418
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/breadcrumb/breadcrumb-sibling-item.directive.ts
419
+ * @since 0.1.0
420
+ * @relatedTo CngxBreadcrumbSiblings
421
+ * <example-url>http://localhost:4200/#/ui/breadcrumb/siblings/custom-row</example-url>
422
+ */
423
+ declare class CngxBreadcrumbSiblingItem {
424
+ readonly templateRef: TemplateRef<CngxBreadcrumbSiblingItemContext>;
425
+ /** Narrows `let-` bindings to {@link CngxBreadcrumbSiblingItemContext} under strict templates. */
426
+ static ngTemplateContextGuard(_dir: CngxBreadcrumbSiblingItem, _ctx: unknown): _ctx is CngxBreadcrumbSiblingItemContext;
427
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxBreadcrumbSiblingItem, never>;
428
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxBreadcrumbSiblingItem, "ng-template[cngxBreadcrumbSiblingItem]", ["cngxBreadcrumbSiblingItem"], {}, {}, never, never, true, never>;
429
+ }
430
+
431
+ /**
432
+ * Context for the `*cngxBreadcrumbItemAccessory` template. Renders a per-crumb
433
+ * accessory inside the {@link CngxBreadcrumbBar} crumb `<li>` (typically a
434
+ * {@link CngxBreadcrumbSiblings} dropdown, static or router-driven). When the
435
+ * slot is projected it owns the accessory area for every crumb - the crumb's
436
+ * declarative `siblings` auto-render is suppressed.
437
+ *
438
+ * @category ui/breadcrumb
439
+ */
440
+ interface CngxBreadcrumbItemAccessoryContext {
441
+ /** Convenience alias for `crumb` - usable as the `let-crumb` shorthand. */
442
+ readonly $implicit: CngxBreadcrumbCrumb;
443
+ /** The crumb the accessory belongs to. */
444
+ readonly crumb: CngxBreadcrumbCrumb;
445
+ /** Crumb index inside the trail, starting at 0. */
446
+ readonly index: number;
447
+ }
448
+ /**
449
+ * Structural slot for a per-crumb accessory inside the {@link CngxBreadcrumbBar}
450
+ * trail. Projected once, it renders inside every crumb's `<li>` (after the link),
451
+ * so a consumer can attach custom chrome or the router-driven siblings source
452
+ * that the declarative `crumb.siblings` field cannot reach (the bar stays free of
453
+ * `@angular/router`). When present, the slot wins globally over the declarative
454
+ * auto-render - one predictable owner of the accessory area.
455
+ *
456
+ * ```html
457
+ * <cngx-breadcrumb [items]="crumbs">
458
+ * <ng-template cngxBreadcrumbItemAccessory let-crumb>
459
+ * @if (crumb.siblings; as sibs) {
460
+ * <cngx-breadcrumb-siblings [siblings]="sibs" />
461
+ * }
462
+ * </ng-template>
463
+ * </cngx-breadcrumb>
464
+ * ```
465
+ *
466
+ * @category ui/breadcrumb
467
+ * @wcag AA
468
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/breadcrumb/breadcrumb-item-accessory.directive.ts
469
+ * @since 0.1.0
470
+ * @relatedTo CngxBreadcrumbBar, CngxBreadcrumbSiblings
471
+ * <example-url>http://localhost:4200/#/ui/breadcrumb/siblings/accessory-slot</example-url>
472
+ */
473
+ declare class CngxBreadcrumbItemAccessory {
474
+ readonly templateRef: TemplateRef<CngxBreadcrumbItemAccessoryContext>;
475
+ /** Narrows `let-` bindings to {@link CngxBreadcrumbItemAccessoryContext} under strict templates. */
476
+ static ngTemplateContextGuard(_dir: CngxBreadcrumbItemAccessory, _ctx: unknown): _ctx is CngxBreadcrumbItemAccessoryContext;
477
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxBreadcrumbItemAccessory, never>;
478
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxBreadcrumbItemAccessory, "ng-template[cngxBreadcrumbItemAccessory]", ["cngxBreadcrumbItemAccessory"], {}, {}, never, never, true, never>;
479
+ }
480
+
481
+ /**
482
+ * Context for the `*cngxBreadcrumbIcon` template. Renders a per-crumb icon
483
+ * inside the {@link CngxBreadcrumbBar} crumb link (`<a>`), leading its label.
484
+ * The `crumb` carries the opaque {@link CngxBreadcrumbCrumb.icon} token so the
485
+ * slot can render it with any icon system.
486
+ *
487
+ * @category ui/breadcrumb
488
+ */
489
+ interface CngxBreadcrumbIconContext {
490
+ /** Convenience alias for `crumb` - usable as the `let-crumb` shorthand. */
491
+ readonly $implicit: CngxBreadcrumbCrumb;
492
+ /** The crumb the icon belongs to. Read `crumb.icon` for the opaque token. */
493
+ readonly crumb: CngxBreadcrumbCrumb;
494
+ /** Crumb index inside the trail, starting at 0. */
495
+ readonly index: number;
496
+ }
497
+ /**
498
+ * Structural slot for a leading per-crumb icon inside the {@link CngxBreadcrumbBar}
499
+ * trail. Projected once, it renders inside every crumb's link (`<a>`), *before*
500
+ * the label span - the counterpart to the trailing
501
+ * {@link CngxBreadcrumbItemAccessory} slot, which cannot lead because it renders
502
+ * after the link and is siblings-owned. cngx never interprets the icon: it hands
503
+ * the crumb's opaque {@link CngxBreadcrumbCrumb.icon} token to this template and
504
+ * the consumer renders it with whatever system they use - `<mat-icon>`, an icon
505
+ * font, inline SVG, or an `<app-icon>` component. cngx ships no icon set.
506
+ *
507
+ * ```html
508
+ * <cngx-breadcrumb [items]="crumbs" skin="iconlabel">
509
+ * <ng-template cngxBreadcrumbIcon let-crumb>
510
+ * <mat-icon aria-hidden="true">{{ crumb.icon }}</mat-icon>
511
+ * </ng-template>
512
+ * </cngx-breadcrumb>
513
+ * ```
514
+ *
515
+ * The content skins style consumer markup projected here by class:
516
+ * `shell` paints a leading root `.product-mark`, `record` a mono `.rec-id`;
517
+ * `record` additionally styles a `.status-dot` / `.status-label` projected
518
+ * through the trailing accessory slot. Those classes are the public markup
519
+ * contract those skins paint against.
520
+ *
521
+ * @category ui/breadcrumb
522
+ * @wcag AA
523
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/breadcrumb/breadcrumb-icon.directive.ts
524
+ * @since 0.1.0
525
+ * @relatedTo CngxBreadcrumbBar, CngxBreadcrumbItemAccessory
526
+ * <example-url>http://localhost:4200/#/ui/breadcrumb/skins/iconlabel</example-url>
527
+ */
528
+ declare class CngxBreadcrumbIcon {
529
+ readonly templateRef: TemplateRef<CngxBreadcrumbIconContext>;
530
+ /** Narrows `let-` bindings to {@link CngxBreadcrumbIconContext} under strict templates. */
531
+ static ngTemplateContextGuard(_dir: CngxBreadcrumbIcon, _ctx: unknown): _ctx is CngxBreadcrumbIconContext;
532
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxBreadcrumbIcon, never>;
533
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxBreadcrumbIcon, "ng-template[cngxBreadcrumbIcon]", ["cngxBreadcrumbIcon"], {}, {}, never, never, true, never>;
534
+ }
535
+
536
+ /**
537
+ * Contract an external crumb producer provides so {@link CngxBreadcrumbBar}
538
+ * reads its trail from a signal instead of the `[items]` input. The bar picks
539
+ * the source up through {@link CNGX_BREADCRUMB_ITEMS_SOURCE} and a `computed`
540
+ * that lets the source win over the input - the controlled path of the
541
+ * controlled/uncontrolled pattern (Pillar 1: no effect writes, no directive
542
+ * writing another component's `input()`).
543
+ *
544
+ * The router-sync directive is the reference consumer; any producer that can
545
+ * expose a `Signal<readonly CngxBreadcrumbCrumb[]>` may provide it.
546
+ */
547
+ interface CngxBreadcrumbItemsSource {
548
+ /** The trail the bar renders when this source is provided. */
549
+ readonly crumbs: Signal<readonly CngxBreadcrumbCrumb[]>;
550
+ }
551
+ /**
552
+ * DI seam a crumb producer (e.g. the router-sync directive) provides via
553
+ * `useExisting` to feed {@link CngxBreadcrumbBar} without writing its
554
+ * `[items]` input.
555
+ *
556
+ * @category ui/breadcrumb
557
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/breadcrumb/breadcrumb-items-source.token.ts
558
+ * @since 0.1.0
559
+ * @relatedTo CngxBreadcrumbBar, CngxBreadcrumbItemsSource
560
+ */
561
+ declare const CNGX_BREADCRUMB_ITEMS_SOURCE: InjectionToken<CngxBreadcrumbItemsSource>;
562
+
563
+ /**
564
+ * Contract an external sibling producer provides so {@link CngxBreadcrumbSiblings}
565
+ * reads its rows from a signal instead of the `[siblings]` input. The dropdown
566
+ * picks the source up through {@link CNGX_BREADCRUMB_SIBLINGS_SOURCE} and a
567
+ * `computed` that lets the source win over the input - the controlled path of
568
+ * the controlled/uncontrolled pattern (Pillar 1: no effect writes, no directive
569
+ * writing another component's `input()`).
570
+ *
571
+ * A producer such as the planned router-sync directive will provide this via
572
+ * `useExisting`; any producer exposing a `Signal<readonly CngxBreadcrumbSibling[]>`
573
+ * may provide it.
574
+ */
575
+ interface CngxBreadcrumbSiblingsSource {
576
+ /** The siblings the dropdown renders when this source is provided. */
577
+ readonly siblings: Signal<readonly CngxBreadcrumbSibling[]>;
578
+ }
579
+ /**
580
+ * DI seam a sibling producer (e.g. the router-sync directive) provides via
581
+ * `useExisting` to feed {@link CngxBreadcrumbSiblings} without writing its
582
+ * `[siblings]` input.
583
+ *
584
+ * @category ui/breadcrumb
585
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/breadcrumb/breadcrumb-siblings-source.token.ts
586
+ * @since 0.1.0
587
+ * @relatedTo CngxBreadcrumbSiblings, CngxBreadcrumbSiblingsSource
588
+ */
589
+ declare const CNGX_BREADCRUMB_SIBLINGS_SOURCE: InjectionToken<CngxBreadcrumbSiblingsSource>;
590
+
591
+ /**
592
+ * Opt-in router mode for {@link CngxBreadcrumbBar}. Add `routerSync` to a
593
+ * `<cngx-breadcrumb>` and the trail is derived from the activated route tree -
594
+ * every route whose `data[dataKey]` (default `data.breadcrumb`) is a non-empty
595
+ * string contributes a crumb, terminal marking follows from position. The bar
596
+ * reads the trail through the {@link CNGX_BREADCRUMB_ITEMS_SOURCE} seam
597
+ * (provided here via `useExisting`), so the directive never writes the bar's
598
+ * `[items]` input and never injects the concrete bar class - decompose-clean
599
+ * (Pillar 1; reference_atomic_decompose rule 4).
600
+ *
601
+ * The navigation stream converts to a signal at the boundary via `toSignal`
602
+ * (Pillar 1, no raw subscription); the trail is a `computed` over that trigger
603
+ * and `dataKey`, carrying a shape-based `equal` so a same-shape navigation does
604
+ * not cascade the trail. `Router` is optional - without it the directive logs a
605
+ * dev warning and stays an empty source.
606
+ *
607
+ * ```html
608
+ * <cngx-breadcrumb cngxRouterSync />
609
+ * ```
610
+ *
611
+ * ```typescript
612
+ * // Route config supplies the crumb labels:
613
+ * { path: 'catalog', data: { breadcrumb: 'Catalog' }, children: [
614
+ * { path: 'books', data: { breadcrumb: 'Books' } },
615
+ * ] }
616
+ * ```
617
+ *
618
+ * @category ui/breadcrumb
619
+ * @docsKind primary
620
+ * @wcag AA
621
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/breadcrumb/breadcrumb-router-sync.directive.ts
622
+ * @since 0.1.0
623
+ * @relatedTo CngxBreadcrumbBar, CngxBreadcrumbItemsSource
624
+ * <example-url>http://localhost:4200/#/ui/breadcrumb/router/router-driven</example-url>
625
+ */
626
+ declare class CngxBreadcrumbRouterSync implements CngxBreadcrumbItemsSource {
627
+ private readonly router;
628
+ private readonly cfg;
629
+ /**
630
+ * Route `data` key the trail is read from. Falls back through the config
631
+ * cascade to `'breadcrumb'`; override per-instance to read a different key
632
+ * (mirrors the sibling's `paramName`).
633
+ */
634
+ readonly dataKey: _angular_core.InputSignal<string>;
635
+ /**
636
+ * Route `data` key each crumb's opaque icon token is read from. Falls back
637
+ * through the config cascade to `'icon'`; override per-instance to read a
638
+ * different key (mirrors `dataKey`).
639
+ */
640
+ readonly iconKey: _angular_core.InputSignal<string>;
641
+ /** The router-derived trail. Wins over the bar's `[items]` input. */
642
+ readonly crumbs: Signal<readonly CngxBreadcrumbCrumb[]>;
643
+ constructor();
644
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxBreadcrumbRouterSync, never>;
645
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxBreadcrumbRouterSync, "cngx-breadcrumb[cngxRouterSync]", ["cngxBreadcrumbRouterSync"], { "dataKey": { "alias": "dataKey"; "required": false; "isSignal": true; }; "iconKey": { "alias": "iconKey"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
646
+ }
647
+
648
+ /**
649
+ * Opt-in router mode for {@link CngxBreadcrumbSiblings}. Add `cngxRouterSync`
650
+ * to a `<cngx-breadcrumb-siblings>` and its rows are derived from the activated
651
+ * route tree: the sibling routes at `[depth]` (the other children of that
652
+ * level's parent) whose `data[dataKey]` is a non-empty string each become a
653
+ * row, and the active child is marked `current`. The dropdown reads the set
654
+ * through the {@link CNGX_BREADCRUMB_SIBLINGS_SOURCE} seam (provided here via
655
+ * `useExisting`), so the directive never writes the component's `[siblings]`
656
+ * input and never injects the concrete component class - decompose-clean
657
+ * (Pillar 1; reference_atomic_decompose rule 4).
658
+ *
659
+ * The navigation stream converts to a signal at the boundary via `toSignal`
660
+ * (Pillar 1, no raw subscription); the set is a `computed` over that trigger,
661
+ * `depth`, and `dataKey`, carrying a shape-based `equal` so a same-shape
662
+ * navigation does not cascade. `Router` is optional - without it the directive
663
+ * logs a dev warning and stays an empty source.
664
+ *
665
+ * ```html
666
+ * <cngx-breadcrumb-siblings cngxRouterSync [depth]="1" />
667
+ * ```
668
+ *
669
+ * ```typescript
670
+ * // Route config supplies the sibling labels:
671
+ * { path: 'eu', data: { breadcrumb: 'Region EU' }, children: [
672
+ * { path: 'munich', data: { breadcrumb: 'Munich' } },
673
+ * { path: 'berlin', data: { breadcrumb: 'Berlin' } },
674
+ * ] }
675
+ * ```
676
+ *
677
+ * @playground Router-driven siblings over a nested route tree ./examples/router-driven/router-driven.component.ts
678
+ * @category ui/breadcrumb
679
+ * @docsKind primary
680
+ * @wcag AA
681
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/breadcrumb/breadcrumb-siblings-router-sync.directive.ts
682
+ * @since 0.1.0
683
+ * @relatedTo CngxBreadcrumbSiblings, CngxBreadcrumbSiblingsSource
684
+ */
685
+ declare class CngxBreadcrumbSiblingsRouterSync implements CngxBreadcrumbSiblingsSource {
686
+ private readonly router;
687
+ private readonly cfg;
688
+ /**
689
+ * Index into the activated route chain (root's first real child is `0`)
690
+ * whose siblings are listed. `0` lists the top-level routes; `1` lists the
691
+ * children of the first-level active route, and so on. The directive owns
692
+ * this keying as its own input (mirrors the trail sync owning `dataKey`).
693
+ */
694
+ readonly depth: _angular_core.InputSignal<number>;
695
+ /**
696
+ * Route `data` key the sibling labels are read from. Falls back through the
697
+ * config cascade to `'breadcrumb'`; override per-instance to read a different
698
+ * key.
699
+ */
700
+ readonly dataKey: _angular_core.InputSignal<string>;
701
+ /** The router-derived siblings. Wins over the component's `[siblings]` input. */
702
+ readonly siblings: Signal<readonly CngxBreadcrumbSibling[]>;
703
+ constructor();
704
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxBreadcrumbSiblingsRouterSync, never>;
705
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxBreadcrumbSiblingsRouterSync, "cngx-breadcrumb-siblings[cngxRouterSync]", ["cngxBreadcrumbSiblingsRouterSync"], { "depth": { "alias": "depth"; "required": false; "isSignal": true; }; "dataKey": { "alias": "dataKey"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
706
+ }
707
+
708
+ /**
709
+ * App-wide configuration cascade for the breadcrumb family. Resolves in
710
+ * priority order:
711
+ *
712
+ * 1. Per-instance Input binding.
713
+ * 2. `provideBreadcrumbConfigAt(...)` in a parent component's `viewProviders`.
714
+ * 3. `provideBreadcrumbConfig(...)` at the application root.
715
+ * 4. Library defaults (this token's `factory`).
716
+ *
717
+ * `providedIn: 'root'` with a default factory means consumers never need to
718
+ * provide the token explicitly - `inject(CNGX_BREADCRUMB_CONFIG)` always
719
+ * resolves. Consumers who want overrides call `provideBreadcrumbConfig(...)`
720
+ * in `bootstrapApplication` providers (root cascade) or
721
+ * `provideBreadcrumbConfigAt(...)` in a component's `viewProviders`
722
+ * (sub-tree cascade).
723
+ *
724
+ * @category ui/breadcrumb
725
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/breadcrumb/config/breadcrumb.config.defaults.ts
726
+ * @since 0.1.0
727
+ */
728
+ declare const CNGX_BREADCRUMB_CONFIG: InjectionToken<CngxBreadcrumbConfig>;
729
+
730
+ /**
731
+ * Discriminated-union shape returned by the breadcrumb config features -
732
+ * `withBreadcrumbAriaLabels`, `withBreadcrumbDataKey`, `withBreadcrumbIconKey`,
733
+ * and `withBreadcrumbSkin`. The reducer in `provideBreadcrumbConfig` /
734
+ * `provideBreadcrumbConfigAt` matches on `kind` and merges `payload` into the
735
+ * corresponding config sub-tree (`dataKey` and `iconKey` both land under the
736
+ * `router` sub-tree). Mirrors `CngxTagConfigFeature` from
737
+ * `@cngx/common/display` so the consumer's mental model is one across feature
738
+ * areas.
739
+ *
740
+ * @category ui/breadcrumb
741
+ * @since 0.1.0
742
+ */
743
+ type CngxBreadcrumbConfigFeature = {
744
+ readonly kind: 'ariaLabels';
745
+ readonly payload: NonNullable<CngxBreadcrumbConfig['ariaLabels']>;
746
+ } | {
747
+ readonly kind: 'router';
748
+ readonly payload: NonNullable<CngxBreadcrumbConfig['router']>;
749
+ } | {
750
+ readonly kind: 'skin';
751
+ readonly payload: {
752
+ readonly skin: NonNullable<CngxBreadcrumbConfig['skin']>;
753
+ };
754
+ };
755
+ /**
756
+ * Application-root configuration cascade for the breadcrumb family. Pass any
757
+ * combination of `withBreadcrumbAriaLabels`, `withBreadcrumbDataKey`,
758
+ * `withBreadcrumbIconKey`, and `withBreadcrumbSkin` features in
759
+ * `bootstrapApplication`'s providers array.
760
+ *
761
+ * Resolution priority (high -> low):
762
+ * 1. Per-instance Input binding.
763
+ * 2. `provideBreadcrumbConfigAt(...)` in a parent component's `viewProviders`.
764
+ * 3. `provideBreadcrumbConfig(...)` at the application root.
765
+ * 4. Library defaults (`CNGX_BREADCRUMB_DEFAULTS`).
766
+ *
767
+ * The provider deep-merges supplied features with the library defaults so
768
+ * consumers only declare keys they want to override.
769
+ *
770
+ * ```ts
771
+ * bootstrapApplication(AppComponent, {
772
+ * providers: [
773
+ * provideBreadcrumbConfig(
774
+ * withBreadcrumbAriaLabels({ bar: 'Navigation trail' }),
775
+ * withBreadcrumbDataKey('crumb'),
776
+ * ),
777
+ * ],
778
+ * });
779
+ * ```
780
+ *
781
+ * @category ui/breadcrumb
782
+ * @since 0.1.0
783
+ */
784
+ declare function provideBreadcrumbConfig(...features: CngxBreadcrumbConfigFeature[]): EnvironmentProviders;
785
+ /**
786
+ * Component-scoped configuration cascade for the breadcrumb family. Pass any
787
+ * combination of feature factories in a parent component's `viewProviders`
788
+ * array.
789
+ *
790
+ * Unlike `provideBreadcrumbConfig` (root-only), `provideBreadcrumbConfigAt`
791
+ * injects the parent injector's `CNGX_BREADCRUMB_CONFIG` value (resolves
792
+ * through the priority chain - root provider, library defaults, or another
793
+ * `provideBreadcrumbConfigAt` further up) and deep-merges the supplied
794
+ * features on top. Descendant breadcrumb instances see the merged config;
795
+ * sibling sub-trees keep the inherited value untouched.
796
+ *
797
+ * ```ts
798
+ * @Component({
799
+ * viewProviders: [
800
+ * provideBreadcrumbConfigAt(withBreadcrumbAriaLabels({ bar: 'Trail' })),
801
+ * ],
802
+ * template: '<cngx-breadcrumb [items]="crumbs" />',
803
+ * })
804
+ * class Section {}
805
+ * ```
806
+ *
807
+ * @category ui/breadcrumb
808
+ * @since 0.1.0
809
+ */
810
+ declare function provideBreadcrumbConfigAt(...features: CngxBreadcrumbConfigFeature[]): Provider[];
811
+
812
+ /**
813
+ * Override the breadcrumb family's ARIA-string fallbacks - the bar landmark
814
+ * name and the overflow/siblings trigger + list labels. Per-instance
815
+ * `[label]` / `[triggerLabel]` / `[menuLabel]` bindings still win over the
816
+ * cascade; this only sets the fallback.
817
+ *
818
+ * ```ts
819
+ * provideBreadcrumbConfig(
820
+ * withBreadcrumbAriaLabels({ bar: 'Navigation trail' }),
821
+ * );
822
+ * ```
823
+ *
824
+ * @category ui/breadcrumb
825
+ * @since 0.1.0
826
+ */
827
+ declare function withBreadcrumbAriaLabels(payload: NonNullable<CngxBreadcrumbConfig['ariaLabels']>): CngxBreadcrumbConfigFeature;
828
+ /**
829
+ * Override the route-data key the breadcrumb router-sync directives
830
+ * (`CngxBreadcrumbRouterSync`, `CngxBreadcrumbSiblingsRouterSync`) read
831
+ * crumbs and siblings from. Per-instance `[dataKey]` still wins.
832
+ *
833
+ * ```ts
834
+ * provideBreadcrumbConfig(withBreadcrumbDataKey('crumb'));
835
+ * ```
836
+ *
837
+ * @category ui/breadcrumb
838
+ * @since 0.1.0
839
+ */
840
+ declare function withBreadcrumbDataKey(dataKey: string): CngxBreadcrumbConfigFeature;
841
+ /**
842
+ * Override the route-data key `CngxBreadcrumbRouterSync` reads the per-crumb
843
+ * opaque icon token from (default `'icon'`). Per-instance `[iconKey]` still
844
+ * wins. Mirrors `withBreadcrumbDataKey` for cascade parity.
845
+ *
846
+ * ```ts
847
+ * provideBreadcrumbConfig(withBreadcrumbIconKey('glyph'));
848
+ * ```
849
+ *
850
+ * @category ui/breadcrumb
851
+ * @since 0.1.0
852
+ */
853
+ declare function withBreadcrumbIconKey(iconKey: string): CngxBreadcrumbConfigFeature;
854
+ /**
855
+ * Select the app-wide default visual skin for `CngxBreadcrumbBar`. Per-instance
856
+ * `[skin]` still wins; this only moves the cascade default. Structure, slots,
857
+ * and ARIA are identical across skins - only the `[data-skin]` host attribute
858
+ * changes which `@scope` paint applies.
859
+ *
860
+ * ```ts
861
+ * provideBreadcrumbConfig(withBreadcrumbSkin('pill'));
862
+ * ```
863
+ *
864
+ * @category ui/breadcrumb
865
+ * @since 0.1.0
866
+ */
867
+ declare function withBreadcrumbSkin(skin: CngxBreadcrumbSkin): CngxBreadcrumbConfigFeature;
868
+
869
+ /**
870
+ * Convenience accessor for the breadcrumb configuration cascade. Runs in
871
+ * injection context; resolves through the priority chain (per-instance Input
872
+ * -> `provideBreadcrumbConfigAt` -> `provideBreadcrumbConfig` -> library
873
+ * defaults). Equivalent to `inject(CNGX_BREADCRUMB_CONFIG)` - the helper
874
+ * exists so consumers don't import the token directly. Mirrors
875
+ * `injectTagConfig` in `@cngx/common/display`.
876
+ *
877
+ * ```ts
878
+ * export class CngxBreadcrumbBar {
879
+ * private readonly cfg = injectBreadcrumbConfig();
880
+ * readonly label = input<string>(this.cfg.ariaLabels?.bar ?? 'Breadcrumb');
881
+ * }
882
+ * ```
883
+ *
884
+ * @category ui/breadcrumb
885
+ * @since 0.1.0
886
+ */
887
+ declare function injectBreadcrumbConfig(): CngxBreadcrumbConfig;
888
+
889
+ export { CNGX_BREADCRUMB_CONFIG, CNGX_BREADCRUMB_ITEMS_SOURCE, CNGX_BREADCRUMB_SIBLINGS_SOURCE, CngxBreadcrumbBar, CngxBreadcrumbIcon, CngxBreadcrumbItemAccessory, CngxBreadcrumbOverflow, CngxBreadcrumbOverflowItem, CngxBreadcrumbRouterSync, CngxBreadcrumbSiblingItem, CngxBreadcrumbSiblings, CngxBreadcrumbSiblingsRouterSync, injectBreadcrumbConfig, provideBreadcrumbConfig, provideBreadcrumbConfigAt, withBreadcrumbAriaLabels, withBreadcrumbDataKey, withBreadcrumbIconKey, withBreadcrumbSkin };
890
+ export type { CngxBreadcrumbConfig, CngxBreadcrumbConfigFeature, CngxBreadcrumbCrumb, CngxBreadcrumbIconContext, CngxBreadcrumbItemAccessoryContext, CngxBreadcrumbItemsSource, CngxBreadcrumbOverflowItemContext, CngxBreadcrumbSibling, CngxBreadcrumbSiblingItemContext, CngxBreadcrumbSiblingsSource, CngxBreadcrumbSkin };