@cngx/ui 0.1.0-rc.8 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/README.md +118 -59
  2. package/action-button/README.md +170 -53
  3. package/breadcrumb/README.md +5 -6
  4. package/collection/README.md +1 -1
  5. package/command-palette/README.md +9 -5
  6. package/data-grid-accordion/README.md +1 -1
  7. package/empty-state/README.md +2 -3
  8. package/feedback/README.md +1 -1
  9. package/fesm2022/cngx-ui-a11y.mjs +13 -23
  10. package/fesm2022/cngx-ui-a11y.mjs.map +1 -1
  11. package/fesm2022/cngx-ui-accordion.mjs +55 -60
  12. package/fesm2022/cngx-ui-accordion.mjs.map +1 -1
  13. package/fesm2022/cngx-ui-action-button.mjs +220 -339
  14. package/fesm2022/cngx-ui-action-button.mjs.map +1 -1
  15. package/fesm2022/cngx-ui-breadcrumb.mjs +100 -80
  16. package/fesm2022/cngx-ui-breadcrumb.mjs.map +1 -1
  17. package/fesm2022/cngx-ui-chart-panel.mjs +18 -31
  18. package/fesm2022/cngx-ui-chart-panel.mjs.map +1 -1
  19. package/fesm2022/cngx-ui-collection.mjs +28 -34
  20. package/fesm2022/cngx-ui-collection.mjs.map +1 -1
  21. package/fesm2022/cngx-ui-command-palette.mjs +29 -51
  22. package/fesm2022/cngx-ui-command-palette.mjs.map +1 -1
  23. package/fesm2022/cngx-ui-context-menu.mjs +138 -89
  24. package/fesm2022/cngx-ui-context-menu.mjs.map +1 -1
  25. package/fesm2022/cngx-ui-data-grid-accordion.mjs +135 -77
  26. package/fesm2022/cngx-ui-data-grid-accordion.mjs.map +1 -1
  27. package/fesm2022/cngx-ui-empty-state.mjs +17 -44
  28. package/fesm2022/cngx-ui-empty-state.mjs.map +1 -1
  29. package/fesm2022/cngx-ui-feedback.mjs +648 -495
  30. package/fesm2022/cngx-ui-feedback.mjs.map +1 -1
  31. package/fesm2022/cngx-ui-layout.mjs +17 -13
  32. package/fesm2022/cngx-ui-layout.mjs.map +1 -1
  33. package/fesm2022/cngx-ui-mat-accordion.mjs +6 -7
  34. package/fesm2022/cngx-ui-mat-accordion.mjs.map +1 -1
  35. package/fesm2022/cngx-ui-mat-paginator.mjs +5 -9
  36. package/fesm2022/cngx-ui-mat-paginator.mjs.map +1 -1
  37. package/fesm2022/cngx-ui-mat-stepper.mjs +6 -9
  38. package/fesm2022/cngx-ui-mat-stepper.mjs.map +1 -1
  39. package/fesm2022/cngx-ui-mat-tabs.mjs +315 -134
  40. package/fesm2022/cngx-ui-mat-tabs.mjs.map +1 -1
  41. package/fesm2022/cngx-ui-nav-rail.mjs +440 -0
  42. package/fesm2022/cngx-ui-nav-rail.mjs.map +1 -0
  43. package/fesm2022/cngx-ui-overlay.mjs +9 -10
  44. package/fesm2022/cngx-ui-overlay.mjs.map +1 -1
  45. package/fesm2022/cngx-ui-paginator.mjs +212 -188
  46. package/fesm2022/cngx-ui-paginator.mjs.map +1 -1
  47. package/fesm2022/cngx-ui-sidenav.mjs +872 -721
  48. package/fesm2022/cngx-ui-sidenav.mjs.map +1 -1
  49. package/fesm2022/cngx-ui-skeleton.mjs +17 -19
  50. package/fesm2022/cngx-ui-skeleton.mjs.map +1 -1
  51. package/fesm2022/cngx-ui-speak.mjs +21 -74
  52. package/fesm2022/cngx-ui-speak.mjs.map +1 -1
  53. package/fesm2022/cngx-ui-stat-card.mjs +39 -62
  54. package/fesm2022/cngx-ui-stat-card.mjs.map +1 -1
  55. package/fesm2022/cngx-ui-stepper.mjs +259 -130
  56. package/fesm2022/cngx-ui-stepper.mjs.map +1 -1
  57. package/fesm2022/cngx-ui-tabs.mjs +148 -50
  58. package/fesm2022/cngx-ui-tabs.mjs.map +1 -1
  59. package/fesm2022/cngx-ui-timeline.mjs +48 -32
  60. package/fesm2022/cngx-ui-timeline.mjs.map +1 -1
  61. package/fesm2022/cngx-ui-toc.mjs +59 -48
  62. package/fesm2022/cngx-ui-toc.mjs.map +1 -1
  63. package/fesm2022/cngx-ui.mjs +5 -5
  64. package/fesm2022/cngx-ui.mjs.map +1 -1
  65. package/mat-tabs/README.md +57 -19
  66. package/mat-tabs/styles/mat-tabs.css +285 -163
  67. package/nav-rail/README.md +325 -0
  68. package/package.json +37 -8
  69. package/paginator/README.md +10 -0
  70. package/schematics/collection.json +9 -0
  71. package/schematics/ng-add/index.js +9 -0
  72. package/schematics/ng-add/schema.json +96 -0
  73. package/schematics/package.json +3 -0
  74. package/sidenav/README.md +150 -55
  75. package/skeleton/README.md +1 -1
  76. package/speak/README.md +1 -2
  77. package/stepper/README.md +20 -5
  78. package/tabs/README.md +13 -0
  79. package/timeline/README.md +1 -1
  80. package/toc/README.md +1 -1
  81. package/types/cngx-ui-a11y.d.ts +20 -38
  82. package/types/cngx-ui-accordion.d.ts +46 -71
  83. package/types/cngx-ui-action-button.d.ts +113 -151
  84. package/types/cngx-ui-breadcrumb.d.ts +60 -85
  85. package/types/cngx-ui-chart-panel.d.ts +22 -40
  86. package/types/cngx-ui-collection.d.ts +30 -43
  87. package/types/cngx-ui-command-palette.d.ts +40 -64
  88. package/types/cngx-ui-context-menu.d.ts +109 -48
  89. package/types/cngx-ui-data-grid-accordion.d.ts +50 -75
  90. package/types/cngx-ui-empty-state.d.ts +18 -8
  91. package/types/cngx-ui-feedback.d.ts +275 -292
  92. package/types/cngx-ui-layout.d.ts +4 -12
  93. package/types/cngx-ui-mat-accordion.d.ts +5 -5
  94. package/types/cngx-ui-mat-paginator.d.ts +4 -10
  95. package/types/cngx-ui-mat-stepper.d.ts +5 -10
  96. package/types/cngx-ui-mat-tabs.d.ts +86 -89
  97. package/types/cngx-ui-nav-rail.d.ts +416 -0
  98. package/types/cngx-ui-overlay.d.ts +4 -13
  99. package/types/cngx-ui-paginator.d.ts +186 -161
  100. package/types/cngx-ui-sidenav.d.ts +557 -437
  101. package/types/cngx-ui-skeleton.d.ts +7 -13
  102. package/types/cngx-ui-speak.d.ts +40 -24
  103. package/types/cngx-ui-stat-card.d.ts +45 -36
  104. package/types/cngx-ui-stepper.d.ts +205 -84
  105. package/types/cngx-ui-tabs.d.ts +104 -28
  106. package/types/cngx-ui-timeline.d.ts +31 -51
  107. package/types/cngx-ui-toc.d.ts +43 -54
  108. package/types/cngx-ui.d.ts +1 -1
@@ -0,0 +1,416 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { InjectionToken, EnvironmentProviders, Provider, Signal } from '@angular/core';
3
+ import { CngxSidebarSide } from '@cngx/common/layout';
4
+
5
+ /** How a `cngx-nav-rail` lays out a row's label. */
6
+ type CngxNavRailLabelPlacement = 'end' | 'below';
7
+ /**
8
+ * The page edge a `cngx-nav-rail` sits on, logical: `'start'` is the right
9
+ * edge under RTL. The same union as `CngxSidebarSide`, so a sidebar's side
10
+ * passes to the rail helpers unchanged.
11
+ */
12
+ type CngxNavRailSide = CngxSidebarSide;
13
+ /**
14
+ * A navigation rail: a narrow, always-collapsed column of nav rows for apps
15
+ * whose primary navigation never expands. Use `cngx-sidenav` when the same
16
+ * navigation also opens to full width; the rail is the organism that only
17
+ * ever is a rail.
18
+ *
19
+ * The rows are the nav atoms of `@cngx/common/interactive` (`cngxNavLink`,
20
+ * `cngxNavGroup` with `cngxNavGroupContent`, `cngxNavLabel`,
21
+ * `cngxNavBadge`, `cngxNavIcon`), skinned by `cngx-nav.css`; the rail only
22
+ * SETs their tokens and its own width. `cngx-nav-header` / `[cngxNavHeader]`
23
+ * projects above the rows and `cngx-nav-footer` / `[cngxNavFooter]` below
24
+ * them, with `[cngxNavMark]` at the row icon x.
25
+ *
26
+ * Two looks through `labelPlacement` (app-wide default through
27
+ * `provideNavRailConfig(withNavRailLabelPlacement(...))`):
28
+ * - `'end'` (default): icon only. Each row keeps its full label, clipped at
29
+ * the row edge, so it stays the accessible name; a tooltip shows it on
30
+ * hover after a short delay and at once on keyboard focus (`[tooltip]` or
31
+ * `withNavRailTooltip(false)` switches it off). The width
32
+ * derives from the row tokens
33
+ * (`--cngx-nav-rail-size`), so the icon box sits centred.
34
+ * - `'below'`: the icon stacked over a short label, no tooltip
35
+ * (`--cngx-nav-rail-below-size`).
36
+ *
37
+ * `side` names the edge the rail sits on (`'start'` default, app-wide through
38
+ * `withNavRailSide`): the border goes on the rail's inner edge and the flyout
39
+ * and the tooltip open away from the rail, into the page. Placing the rail is
40
+ * still the consumer's DOM order; `side` only turns the side-dependent parts.
41
+ * An unbound `[ariaLabel]` names a `side="end"` rail by its own copy key, so a
42
+ * start rail and an end rail on one page never share a landmark name.
43
+ *
44
+ * A nav group opens as a flyout beside its head in both looks; its
45
+ * `aria-expanded` stays the one state. Tooltip and flyout are swappable
46
+ * through `CNGX_NAV_RAIL_TOOLTIP_FACTORY` and `CNGX_NAV_RAIL_FLYOUT_FACTORY`. The host is a `navigation` landmark
47
+ * named by `[ariaLabel]` or the `navRail` section of the language pack.
48
+ *
49
+ * ```html
50
+ * <cngx-nav-rail>
51
+ * <cngx-nav-header><img cngxNavMark src="/logo.svg" alt="" /></cngx-nav-header>
52
+ * <a cngxNavLink routerLink="/inbox" routerLinkActive #inbox="routerLinkActive"
53
+ * [active]="inbox.isActive">
54
+ * <cngx-icon cngxNavIcon><mat-icon>inbox</mat-icon></cngx-icon>
55
+ * Inbox
56
+ * </a>
57
+ * <button cngxNavGroup #reports="cngxNavGroup">Reports</button>
58
+ * <div [cngxNavGroupContent]="reports">
59
+ * <div><a cngxNavLink [depth]="1" routerLink="/reports/weekly">Weekly</a></div>
60
+ * </div>
61
+ * </cngx-nav-rail>
62
+ * ```
63
+ *
64
+ * @wcag AA
65
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/nav-rail/nav-rail.ts
66
+ * @selector cngx-nav-rail
67
+ * @since 0.3.0
68
+ * @relatedTo CngxNavLink, CngxNavGroup, CngxNavHeader, CngxNavFooter, CngxSidenav, injectNavRailTooltip, injectNavRailFlyout, CNGX_NAV_RAIL_TOOLTIP_FACTORY, CNGX_NAV_RAIL_FLYOUT_FACTORY, provideNavRailConfig, withNavRailTooltip, withNavRailSide
69
+ * <example-url>/#/ui/nav-rail/labels-beside</example-url>
70
+ * <example-url>/#/ui/nav-rail/labels-below</example-url>
71
+ * <example-url>/#/ui/sidenav/rail-with-secondary-sidebar</example-url>
72
+ * <example-url>/#/ui/nav-rail/end-side</example-url>
73
+ * @axis level organism
74
+ */
75
+ declare class CngxNavRail {
76
+ /**
77
+ * Accessible name of the landmark. Unbound, the `navRail` language-pack copy
78
+ * applies: `ariaLabel` for a `side="start"` rail, `endAriaLabel` for a
79
+ * `side="end"` rail.
80
+ */
81
+ readonly ariaLabel: _angular_core.InputSignal<string | undefined>;
82
+ /**
83
+ * `'end'`: icon only with a tooltip (unless `tooltip` is off). `'below'`:
84
+ * icon over a short label, never a tooltip.
85
+ * Unbound, `withNavRailLabelPlacement` of the config in scope applies, else
86
+ * `'end'`.
87
+ */
88
+ readonly labelPlacement: _angular_core.InputSignal<CngxNavRailLabelPlacement | undefined>;
89
+ /**
90
+ * Whether a row shows its label in a tooltip in the `'end'` look; the
91
+ * `'below'` look never shows one. Unbound, `withNavRailTooltip` of the
92
+ * config in scope applies, else `true`. Switching it off removes the
93
+ * tooltip element and its listeners.
94
+ */
95
+ readonly tooltip: _angular_core.InputSignal<boolean | undefined>;
96
+ /**
97
+ * The edge the rail sits on: the border goes on its inner edge and the
98
+ * flyout and the tooltip open away from it. Logical, so `'start'` is the
99
+ * right edge under RTL. Unbound, `withNavRailSide` of the config in scope
100
+ * applies, else `'start'`.
101
+ */
102
+ readonly side: _angular_core.InputSignal<CngxSidebarSide | undefined>;
103
+ private readonly i18n;
104
+ private readonly config;
105
+ /** The look in effect: `[labelPlacement]`, then the config, then `'end'`. */
106
+ protected readonly resolvedLabelPlacement: _angular_core.Signal<CngxNavRailLabelPlacement>;
107
+ /** Whether the tooltip is on: `[tooltip]`, then the config, then `true`. */
108
+ protected readonly resolvedTooltip: _angular_core.Signal<boolean>;
109
+ /** The side in effect: `[side]`, then the config, then `'start'`. */
110
+ protected readonly resolvedSide: _angular_core.Signal<CngxSidebarSide>;
111
+ protected readonly resolvedAriaLabel: _angular_core.Signal<string>;
112
+ private readonly groups;
113
+ private readonly groupElements;
114
+ private readonly contents;
115
+ private readonly contentElements;
116
+ constructor();
117
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxNavRail, never>;
118
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxNavRail, "cngx-nav-rail", ["cngxNavRail"], { "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "labelPlacement": { "alias": "labelPlacement"; "required": false; "isSignal": true; }; "tooltip": { "alias": "tooltip"; "required": false; "isSignal": true; }; "side": { "alias": "side"; "required": false; "isSignal": true; }; }, {}, ["groups", "groupElements", "contents", "contentElements"], ["cngx-nav-header, [cngxNavHeader]", "*", "cngx-nav-footer, [cngxNavFooter]"], true, never>;
119
+ }
120
+
121
+ /**
122
+ * App-wide cascade for the nav rail's look, its side and its label tooltip. Settings
123
+ * only; the rail's copy lives on `CNGX_NAV_RAIL_I18N`. The tooltip keys also
124
+ * reach the rail of `cngx-sidenav`.
125
+ *
126
+ * Resolution priority (high -> low):
127
+ * 1. Per-instance Input binding (`[labelPlacement]`, `[side]`, `[tooltip]`).
128
+ * 2. `provideNavRailConfigAt(...)` in a parent component's `viewProviders`.
129
+ * 3. `provideNavRailConfig(...)` at the application root.
130
+ * 4. Library defaults (`labelPlacement: 'end'`, `side: 'start'`,
131
+ * `tooltip: true`, `tooltipDelay: 300`).
132
+ *
133
+ * Every key is a flat top-level scalar, so a later feature replaces the
134
+ * earlier value of the same key.
135
+ *
136
+ * @since 0.3.0
137
+ */
138
+ interface CngxNavRailConfig {
139
+ /**
140
+ * Default look of every `cngx-nav-rail`: `'end'` (icon only, label in a
141
+ * tooltip) or `'below'` (icon over a short label). A bound
142
+ * `[labelPlacement]` still wins.
143
+ */
144
+ readonly labelPlacement?: CngxNavRailLabelPlacement;
145
+ /**
146
+ * Default side of every `cngx-nav-rail`: `'start'` or `'end'`, logical. The
147
+ * border goes on the rail's inner edge and the flyout and the tooltip open
148
+ * away from it. A bound `[side]` still wins.
149
+ */
150
+ readonly side?: CngxNavRailSide;
151
+ /**
152
+ * Whether a railed row shows its label in a tooltip (default `true`), on
153
+ * `cngx-nav-rail` and on a `cngx-sidenav` resting as a rail. Only the
154
+ * `'end'` look of the nav rail has a tooltip; `'below'` never shows one. A
155
+ * bound `[tooltip]` on either organism still wins.
156
+ */
157
+ readonly tooltip?: boolean;
158
+ /**
159
+ * Pointer dwell in ms before the label tooltip of a railed row shows.
160
+ * Keyboard focus shows it at once, whatever the delay. `cngx-nav-rail` and
161
+ * `cngx-sidenav` pass it to `injectNavRailTooltip` as `hoverDelay`, so it
162
+ * applies to both organisms.
163
+ */
164
+ readonly tooltipDelay?: number;
165
+ }
166
+
167
+ /**
168
+ * App-wide configuration cascade for `cngx-nav-rail` and the rail of
169
+ * `cngx-sidenav`. Resolves in priority order:
170
+ *
171
+ * 1. Per-instance Input binding.
172
+ * 2. `provideNavRailConfigAt(...)` in a parent component's `viewProviders`.
173
+ * 3. `provideNavRailConfig(...)` at the application root.
174
+ * 4. Library defaults (this token's `factory`).
175
+ *
176
+ * `providedIn: 'root'` with a default factory, so `inject(CNGX_NAV_RAIL_CONFIG)`
177
+ * always resolves.
178
+ *
179
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/nav-rail/config/nav-rail.config.defaults.ts
180
+ * @since 0.3.0
181
+ * @relatedTo CngxNavRail, provideNavRailConfig, provideNavRailConfigAt, injectNavRailConfig
182
+ */
183
+ declare const CNGX_NAV_RAIL_CONFIG: InjectionToken<CngxNavRailConfig>;
184
+
185
+ /**
186
+ * Discriminated-union shape returned by the nav rail config features
187
+ * (`withNavRailLabelPlacement`, `withNavRailSide`, `withNavRailTooltip`,
188
+ * `withNavRailTooltipDelay`). The reducer in
189
+ * `provideNavRailConfig` / `provideNavRailConfigAt` matches on `kind`; every
190
+ * key is a flat scalar, so the last write wins.
191
+ *
192
+ * @since 0.3.0
193
+ */
194
+ type CngxNavRailConfigFeature = {
195
+ readonly kind: 'labelPlacement';
196
+ readonly payload: {
197
+ readonly labelPlacement: CngxNavRailLabelPlacement;
198
+ };
199
+ } | {
200
+ readonly kind: 'side';
201
+ readonly payload: {
202
+ readonly side: CngxNavRailSide;
203
+ };
204
+ } | {
205
+ readonly kind: 'tooltip';
206
+ readonly payload: {
207
+ readonly tooltip: boolean;
208
+ };
209
+ } | {
210
+ readonly kind: 'tooltipDelay';
211
+ readonly payload: {
212
+ readonly tooltipDelay: number;
213
+ };
214
+ };
215
+ /**
216
+ * Application-root configuration cascade for the nav rail. Pass
217
+ * `withNavRailLabelPlacement`, `withNavRailSide`, `withNavRailTooltip` and
218
+ * `withNavRailTooltipDelay` in
219
+ * `bootstrapApplication`'s providers; unset keys keep the library defaults.
220
+ *
221
+ * ```ts
222
+ * bootstrapApplication(AppComponent, {
223
+ * providers: [provideNavRailConfig(withNavRailLabelPlacement('below'))],
224
+ * });
225
+ * ```
226
+ *
227
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/nav-rail/config/provide-nav-rail-config.ts
228
+ * @since 0.3.0
229
+ * @relatedTo CNGX_NAV_RAIL_CONFIG, provideNavRailConfigAt, withNavRailLabelPlacement, withNavRailSide, withNavRailTooltip, withNavRailTooltipDelay
230
+ */
231
+ declare function provideNavRailConfig(...features: CngxNavRailConfigFeature[]): EnvironmentProviders;
232
+ /**
233
+ * Component-scoped configuration cascade for the nav rail. Use it in a parent
234
+ * component's `viewProviders`: it reads the parent injector's
235
+ * `CNGX_NAV_RAIL_CONFIG` (root provider, library defaults or another
236
+ * `provideNavRailConfigAt` further up) and merges the features on top.
237
+ *
238
+ * ```ts
239
+ * @Component({
240
+ * viewProviders: [provideNavRailConfigAt(withNavRailTooltipDelay(600))],
241
+ * template: '<cngx-nav-rail>...</cngx-nav-rail>',
242
+ * })
243
+ * class Section {}
244
+ * ```
245
+ *
246
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/nav-rail/config/provide-nav-rail-config.ts
247
+ * @since 0.3.0
248
+ * @relatedTo CNGX_NAV_RAIL_CONFIG, provideNavRailConfig
249
+ */
250
+ declare function provideNavRailConfigAt(...features: CngxNavRailConfigFeature[]): Provider[];
251
+
252
+ /**
253
+ * Set the default look of every `cngx-nav-rail` in scope. A bound
254
+ * `[labelPlacement]` still wins.
255
+ *
256
+ * ```ts
257
+ * provideNavRailConfig(withNavRailLabelPlacement('below'));
258
+ * ```
259
+ *
260
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/nav-rail/config/features.ts
261
+ * @since 0.3.0
262
+ * @relatedTo provideNavRailConfig, provideNavRailConfigAt, CngxNavRail
263
+ */
264
+ declare function withNavRailLabelPlacement(labelPlacement: CngxNavRailLabelPlacement): CngxNavRailConfigFeature;
265
+ /**
266
+ * Switch the label tooltip of railed rows on or off (default on). It only
267
+ * applies to the `'end'` look; `'below'` never shows a tooltip. A bound
268
+ * `[tooltip]` on `cngx-nav-rail` still wins. Off, `injectNavRailTooltip`
269
+ * creates no tooltip element and attaches no listener.
270
+ *
271
+ * ```ts
272
+ * provideNavRailConfig(withNavRailTooltip(false));
273
+ * ```
274
+ *
275
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/nav-rail/config/features.ts
276
+ * @since 0.3.0
277
+ * @relatedTo provideNavRailConfig, provideNavRailConfigAt, CngxNavRail, injectNavRailTooltip
278
+ */
279
+ declare function withNavRailTooltip(enabled: boolean): CngxNavRailConfigFeature;
280
+ /**
281
+ * Set the pointer dwell in ms before the label tooltip of a railed row shows
282
+ * (default `300`). Keyboard focus shows it at once regardless.
283
+ *
284
+ * ```ts
285
+ * provideNavRailConfig(withNavRailTooltipDelay(500));
286
+ * ```
287
+ *
288
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/nav-rail/config/features.ts
289
+ * @since 0.3.0
290
+ * @relatedTo provideNavRailConfig, provideNavRailConfigAt, injectNavRailTooltip
291
+ */
292
+ declare function withNavRailTooltipDelay(ms: number): CngxNavRailConfigFeature;
293
+ /**
294
+ * Set the default side of every `cngx-nav-rail` in scope (default `'start'`).
295
+ * Logical, so `'end'` is the left edge under RTL. The border goes on the
296
+ * rail's inner edge and the flyout and the tooltip open away from it; the
297
+ * rail's place on the page stays its DOM order. A bound `[side]` still wins.
298
+ *
299
+ * ```ts
300
+ * provideNavRailConfig(withNavRailSide('end'));
301
+ * ```
302
+ *
303
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/nav-rail/config/features.ts
304
+ * @since 0.3.0
305
+ * @relatedTo provideNavRailConfig, provideNavRailConfigAt, CngxNavRail
306
+ */
307
+ declare function withNavRailSide(side: CngxNavRailSide): CngxNavRailConfigFeature;
308
+
309
+ /**
310
+ * The nav rail configuration in scope (`provideNavRailConfigAt` ->
311
+ * `provideNavRailConfig` -> library defaults), with every key resolved: a key
312
+ * the value in scope leaves out (a hand-written `CNGX_NAV_RAIL_CONFIG`
313
+ * provider) falls back to the library default, so a caller in another entry
314
+ * never repeats a default. Runs in injection context.
315
+ *
316
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/nav-rail/config/inject-nav-rail-config.ts
317
+ * @since 0.3.0
318
+ * @relatedTo CNGX_NAV_RAIL_CONFIG, provideNavRailConfig
319
+ */
320
+ declare function injectNavRailConfig(): Required<CngxNavRailConfig>;
321
+
322
+ /**
323
+ * The navigation rail section of a {@link CngxLanguagePack}: the copy of
324
+ * `CngxNavRail`. It feeds `CNGX_NAV_RAIL_I18N`; a bound `[ariaLabel]` still
325
+ * wins.
326
+ *
327
+ * @since 0.3.0
328
+ * @relatedTo CNGX_NAV_RAIL_I18N, CngxNavRail
329
+ */
330
+ interface CngxNavRailLanguageSection {
331
+ /**
332
+ * Accessible name of the `navigation` landmark of a `side="start"` rail
333
+ * while `[ariaLabel]` is unbound.
334
+ */
335
+ readonly ariaLabel: string;
336
+ /**
337
+ * Accessible name of the `navigation` landmark of a `side="end"` rail while
338
+ * `[ariaLabel]` is unbound, so a start rail and an end rail on one page never
339
+ * share a name.
340
+ */
341
+ readonly endAriaLabel: string;
342
+ }
343
+ /**
344
+ * The English navigation rail section: the single source of the rail's
345
+ * English copy.
346
+ *
347
+ * @since 0.3.0
348
+ * @relatedTo CNGX_NAV_RAIL_I18N
349
+ */
350
+ declare const CNGX_NAV_RAIL_LANGUAGE_EN: CngxNavRailLanguageSection;
351
+ declare module '@cngx/core/i18n' {
352
+ interface CngxLanguagePack {
353
+ readonly navRail: CngxNavRailLanguageSection;
354
+ }
355
+ }
356
+
357
+ /**
358
+ * Nav rail i18n surface: the `navRail` section of the language pack (English
359
+ * without one); override single keys via {@link provideNavRailI18n}. Reactive
360
+ * from birth: the token carries a `Signal`, and {@link withNavRailI18nLabels}
361
+ * accepts a `Signal` of a partial bundle.
362
+ *
363
+ * `CngxNavRail` reads `ariaLabel` (a `side="start"` rail) or `endAriaLabel` (a
364
+ * `side="end"` rail) inside a `computed()` while its `ariaLabel` input is
365
+ * unbound, so the landmark name follows a language switch and a side flip.
366
+ */
367
+ type CngxNavRailI18n = CngxNavRailLanguageSection;
368
+ /**
369
+ * DI token for the nav rail i18n bundle. `providedIn: 'root'`: the `navRail`
370
+ * section of the active language pack over the English defaults. The value is
371
+ * a `Signal`, shared by every reader under one injector.
372
+ *
373
+ * @wcag AA
374
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/nav-rail/nav-rail-i18n.ts
375
+ * @since 0.3.0
376
+ * @relatedTo CngxNavRail
377
+ */
378
+ declare const CNGX_NAV_RAIL_I18N: InjectionToken<Signal<CngxNavRailLanguageSection>>;
379
+ /**
380
+ * A label override feature of `provideNavRailI18n`.
381
+ *
382
+ * @since 0.3.0
383
+ * @relatedTo CNGX_NAV_RAIL_I18N, withNavRailI18nLabels
384
+ */
385
+ type CngxNavRailI18nFeature = (bundle: Signal<CngxNavRailI18n>) => Signal<CngxNavRailI18n>;
386
+ /**
387
+ * Override i18n labels via a partial bundle - unset keys, and keys set to
388
+ * `null` or `undefined`, keep the language pack's copy, or the English
389
+ * default, so the landmark never loses its name. Pass a `Signal` of a partial
390
+ * bundle to switch languages at runtime.
391
+ *
392
+ * @since 0.3.0
393
+ */
394
+ declare function withNavRailI18nLabels(overrides: Partial<CngxNavRailI18n> | Signal<Partial<CngxNavRailI18n>>): CngxNavRailI18nFeature;
395
+ /**
396
+ * Provider for the nav rail i18n bundle. Returns a plain `Provider`, so it
397
+ * also scopes a subtree through `viewProviders`.
398
+ *
399
+ * ```ts
400
+ * bootstrapApplication(AppComponent, {
401
+ * providers: [provideNavRailI18n(withNavRailI18nLabels({ ariaLabel: 'Hauptnavigation' }))],
402
+ * });
403
+ * ```
404
+ *
405
+ * @since 0.3.0
406
+ */
407
+ declare function provideNavRailI18n(...features: readonly CngxNavRailI18nFeature[]): Provider;
408
+ /**
409
+ * Inject the resolved nav rail i18n bundle signal.
410
+ *
411
+ * @since 0.3.0
412
+ */
413
+ declare function injectNavRailI18n(): Signal<CngxNavRailI18n>;
414
+
415
+ export { CNGX_NAV_RAIL_CONFIG, CNGX_NAV_RAIL_I18N, CNGX_NAV_RAIL_LANGUAGE_EN, CngxNavRail, injectNavRailConfig, injectNavRailI18n, provideNavRailConfig, provideNavRailConfigAt, provideNavRailI18n, withNavRailI18nLabels, withNavRailLabelPlacement, withNavRailSide, withNavRailTooltip, withNavRailTooltipDelay };
416
+ export type { CngxNavRailConfig, CngxNavRailConfigFeature, CngxNavRailI18n, CngxNavRailI18nFeature, CngxNavRailLabelPlacement, CngxNavRailLanguageSection, CngxNavRailSide };
@@ -6,8 +6,6 @@ import * as rxjs from 'rxjs';
6
6
  /**
7
7
  * Construction-time options for a {@link CngxOverlayRef}. Set by
8
8
  * {@link CngxOverlay.open}, not by consumers.
9
- *
10
- * @category ui/overlay
11
9
  */
12
10
  interface CngxOverlayRefConfig {
13
11
  /**
@@ -28,11 +26,9 @@ interface CngxOverlayRefConfig {
28
26
  * focus to the element that opened it, and surfaces its open state as a signal
29
27
  * beside the RxJS `afterClosed$`.
30
28
  *
31
- * @category ui/overlay
32
- * @docsKind primary
33
29
  * @wcag AA
34
30
  * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/overlay/overlay-ref.ts
35
- * @since 0.1.0
31
+ * @since 0.3.0
36
32
  * @relatedTo CngxOverlay, provideOverlay
37
33
  */
38
34
  declare class CngxOverlayRef<R = unknown> {
@@ -62,8 +58,6 @@ declare class CngxOverlayRef<R = unknown> {
62
58
  * {@link OverlayConfig} - every field is optional and falls back to the CDK
63
59
  * overlay default - plus `disableClose`, a cngx addition that turns off the
64
60
  * Escape / backdrop dismiss affordances.
65
- *
66
- * @category ui/overlay
67
61
  */
68
62
  type CngxOverlayConfig = Partial<OverlayConfig> & {
69
63
  /**
@@ -85,17 +79,16 @@ type CngxOverlayConfig = Partial<OverlayConfig> & {
85
79
  * ref.afterClosed$.subscribe(result => console.log(result));
86
80
  * ```
87
81
  *
88
- * @category ui/overlay
89
- * @docsKind primary
90
82
  * @wcag AA
91
83
  * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/overlay/overlay.service.ts
92
- * @since 0.1.0
84
+ * @since 0.3.0
93
85
  * @relatedTo CngxOverlayRef, provideOverlay
94
86
  */
95
87
  declare class CngxOverlay {
96
88
  private readonly overlay;
97
89
  private readonly injector;
98
90
  private readonly document;
91
+ private readonly direction;
99
92
  private readonly openRefs;
100
93
  constructor();
101
94
  /**
@@ -115,10 +108,8 @@ declare class CngxOverlay {
115
108
  }
116
109
  /**
117
110
  * Provides `CngxOverlay` as an environment-scoped service.
118
- *
119
- * @category ui/overlay
120
111
  */
121
112
  declare function provideOverlay(): EnvironmentProviders;
122
113
 
123
114
  export { CngxOverlay, CngxOverlayRef, provideOverlay };
124
- export type { CngxOverlayConfig };
115
+ export type { CngxOverlayConfig, CngxOverlayRefConfig };