@mintplayer/ng-bootstrap 22.6.0 → 22.7.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 (125) hide show
  1. package/_bootstrap.scss +4 -0
  2. package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs +255 -44
  3. package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs.map +1 -1
  4. package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs +3 -2
  5. package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs.map +1 -1
  6. package/fesm2022/mintplayer-ng-bootstrap-alert.mjs +24 -4
  7. package/fesm2022/mintplayer-ng-bootstrap-alert.mjs.map +1 -1
  8. package/fesm2022/mintplayer-ng-bootstrap-badge.mjs +12 -3
  9. package/fesm2022/mintplayer-ng-bootstrap-badge.mjs.map +1 -1
  10. package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs +9 -4
  11. package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs.map +1 -1
  12. package/fesm2022/mintplayer-ng-bootstrap-card.mjs +21 -7
  13. package/fesm2022/mintplayer-ng-bootstrap-card.mjs.map +1 -1
  14. package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs +5 -6
  15. package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs.map +1 -1
  16. package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs +39 -35
  17. package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs.map +1 -1
  18. package/fesm2022/mintplayer-ng-bootstrap-close.mjs +7 -4
  19. package/fesm2022/mintplayer-ng-bootstrap-close.mjs.map +1 -1
  20. package/fesm2022/mintplayer-ng-bootstrap-context-menu.mjs +80 -31
  21. package/fesm2022/mintplayer-ng-bootstrap-context-menu.mjs.map +1 -1
  22. package/fesm2022/mintplayer-ng-bootstrap-copy.mjs +4 -0
  23. package/fesm2022/mintplayer-ng-bootstrap-copy.mjs.map +1 -1
  24. package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs +3 -2
  25. package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs.map +1 -1
  26. package/fesm2022/mintplayer-ng-bootstrap-dock.mjs +3 -2
  27. package/fesm2022/mintplayer-ng-bootstrap-dock.mjs.map +1 -1
  28. package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs +4 -7
  29. package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs.map +1 -1
  30. package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs +27 -2
  31. package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs.map +1 -1
  32. package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs +3 -2
  33. package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs.map +1 -1
  34. package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs +1 -1
  35. package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs.map +1 -1
  36. package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs +25 -3
  37. package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs.map +1 -1
  38. package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs +15 -3
  39. package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs.map +1 -1
  40. package/fesm2022/mintplayer-ng-bootstrap-marquee.mjs +9 -3
  41. package/fesm2022/mintplayer-ng-bootstrap-marquee.mjs.map +1 -1
  42. package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs +11 -12
  43. package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs.map +1 -1
  44. package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs +15 -2
  45. package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs.map +1 -1
  46. package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs +6 -6
  47. package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs.map +1 -1
  48. package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs +4 -7
  49. package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs.map +1 -1
  50. package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs +2 -3
  51. package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs.map +1 -1
  52. package/fesm2022/mintplayer-ng-bootstrap-popover.mjs +24 -5
  53. package/fesm2022/mintplayer-ng-bootstrap-popover.mjs.map +1 -1
  54. package/fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs +2 -2
  55. package/fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs.map +1 -1
  56. package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs +8 -3
  57. package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs.map +1 -1
  58. package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs +4 -3
  59. package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs.map +1 -1
  60. package/fesm2022/mintplayer-ng-bootstrap-radio.mjs +41 -46
  61. package/fesm2022/mintplayer-ng-bootstrap-radio.mjs.map +1 -1
  62. package/fesm2022/mintplayer-ng-bootstrap-range.mjs +5 -1
  63. package/fesm2022/mintplayer-ng-bootstrap-range.mjs.map +1 -1
  64. package/fesm2022/mintplayer-ng-bootstrap-rating.mjs +33 -4
  65. package/fesm2022/mintplayer-ng-bootstrap-rating.mjs.map +1 -1
  66. package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs +3 -2
  67. package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs.map +1 -1
  68. package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs +2 -2
  69. package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs.map +1 -1
  70. package/fesm2022/mintplayer-ng-bootstrap-select.mjs +9 -12
  71. package/fesm2022/mintplayer-ng-bootstrap-select.mjs.map +1 -1
  72. package/fesm2022/mintplayer-ng-bootstrap-shell.mjs +3 -2
  73. package/fesm2022/mintplayer-ng-bootstrap-shell.mjs.map +1 -1
  74. package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs +76 -58
  75. package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs.map +1 -1
  76. package/fesm2022/mintplayer-ng-bootstrap-spinner.mjs +2 -2
  77. package/fesm2022/mintplayer-ng-bootstrap-spinner.mjs.map +1 -1
  78. package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs +3 -2
  79. package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs.map +1 -1
  80. package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs +9 -10
  81. package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs.map +1 -1
  82. package/fesm2022/mintplayer-ng-bootstrap-timeline.mjs +3 -2
  83. package/fesm2022/mintplayer-ng-bootstrap-timeline.mjs.map +1 -1
  84. package/fesm2022/mintplayer-ng-bootstrap-toast.mjs +23 -8
  85. package/fesm2022/mintplayer-ng-bootstrap-toast.mjs.map +1 -1
  86. package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs +29 -6
  87. package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs.map +1 -1
  88. package/fesm2022/mintplayer-ng-bootstrap-tree-select.mjs +4 -3
  89. package/fesm2022/mintplayer-ng-bootstrap-tree-select.mjs.map +1 -1
  90. package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs +3 -2
  91. package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs.map +1 -1
  92. package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs +10 -3
  93. package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs.map +1 -1
  94. package/package.json +1 -5
  95. package/types/mintplayer-ng-bootstrap-a11y.d.ts +184 -32
  96. package/types/mintplayer-ng-bootstrap-alert.d.ts +18 -8
  97. package/types/mintplayer-ng-bootstrap-badge.d.ts +8 -1
  98. package/types/mintplayer-ng-bootstrap-breadcrumb.d.ts +3 -1
  99. package/types/mintplayer-ng-bootstrap-card.d.ts +4 -2
  100. package/types/mintplayer-ng-bootstrap-carousel.d.ts +2 -3
  101. package/types/mintplayer-ng-bootstrap-checkbox.d.ts +11 -16
  102. package/types/mintplayer-ng-bootstrap-close.d.ts +6 -4
  103. package/types/mintplayer-ng-bootstrap-context-menu.d.ts +3 -0
  104. package/types/mintplayer-ng-bootstrap-copy.d.ts +1 -0
  105. package/types/mintplayer-ng-bootstrap-dropdown-menu.d.ts +16 -18
  106. package/types/mintplayer-ng-bootstrap-dropdown.d.ts +7 -0
  107. package/types/mintplayer-ng-bootstrap-floating-labels.d.ts +15 -2
  108. package/types/mintplayer-ng-bootstrap-list-group.d.ts +3 -1
  109. package/types/mintplayer-ng-bootstrap-marquee.d.ts +7 -4
  110. package/types/mintplayer-ng-bootstrap-navbar.d.ts +1 -3
  111. package/types/mintplayer-ng-bootstrap-offcanvas.d.ts +6 -0
  112. package/types/mintplayer-ng-bootstrap-otp-input.d.ts +2 -2
  113. package/types/mintplayer-ng-bootstrap-pagination.d.ts +1 -3
  114. package/types/mintplayer-ng-bootstrap-progress-bar.d.ts +5 -2
  115. package/types/mintplayer-ng-bootstrap-radio.d.ts +20 -28
  116. package/types/mintplayer-ng-bootstrap-rating.d.ts +18 -1
  117. package/types/mintplayer-ng-bootstrap-select.d.ts +2 -3
  118. package/types/mintplayer-ng-bootstrap-signature-pad.d.ts +31 -30
  119. package/types/mintplayer-ng-bootstrap-toast.d.ts +3 -1
  120. package/types/mintplayer-ng-bootstrap-tooltip.d.ts +8 -0
  121. package/types/mintplayer-ng-bootstrap-typeahead.d.ts +7 -1
  122. package/fesm2022/mintplayer-ng-bootstrap-reduced-motion.mjs +0 -60
  123. package/fesm2022/mintplayer-ng-bootstrap-reduced-motion.mjs.map +0 -1
  124. package/reduced-motion/package.json +0 -4
  125. package/types/mintplayer-ng-bootstrap-reduced-motion.d.ts +0 -36
package/_bootstrap.scss CHANGED
@@ -1,5 +1,9 @@
1
1
  // Import our own utilities
2
2
  @import "bootstrap/scss/bootstrap-utilities.scss";
3
+ // CDK a11y utility styles: BsLiveAnnouncerService wraps CDK's LiveAnnouncer,
4
+ // whose injected live region carries .cdk-visually-hidden — without these
5
+ // rules every announcement renders as visible text at the page edge.
6
+ @import "@angular/cdk/a11y-prebuilt";
3
7
  @import './src/styles/utilities/cursor.scss';
4
8
  @import './src/styles/utilities/white-space.scss';
5
9
  @import './src/styles/utilities/overflow.scss';
@@ -1,6 +1,9 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, inject, forwardRef, ElementRef, input, signal, computed, afterNextRender, Directive, contentChildren, DestroyRef, effect } from '@angular/core';
2
+ import { Injectable, inject, ElementRef, PLATFORM_ID, DestroyRef, afterNextRender, Directive, forwardRef, input, signal, computed, contentChildren, effect, Injector } from '@angular/core';
3
+ import { isPlatformServer } from '@angular/common';
4
+ import { firstEnabledIndex, lastEnabledIndex, nextEnabledIndex, dismissStack } from '@mintplayer/web-components/a11y';
3
5
  import { ConfigurableFocusTrapFactory, InteractivityChecker, LiveAnnouncer } from '@angular/cdk/a11y';
6
+ import { NgControl, Validators } from '@angular/forms';
4
7
 
5
8
  /**
6
9
  * App-wide unique ID generator for ARIA wiring (`aria-controls`,
@@ -28,6 +31,134 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImpor
28
31
  args: [{ providedIn: 'root' }]
29
32
  }] });
30
33
 
34
+ /**
35
+ * Makes a nested-host wrapper **transparent to ARIA**: a consumer's `aria-*`,
36
+ * `role`, `id` and `tabindex` written on the `bs-*` element reach the `mp-*`
37
+ * custom element inside it.
38
+ *
39
+ * Apply to the wrapper's inner custom element, which is its template root:
40
+ *
41
+ * ```html
42
+ * <mp-checkbox #checkbox bsForwardAria (change)="onChange($event)">
43
+ * ```
44
+ *
45
+ * **The problem it solves.** Every `bs-*` wrapper renders the real control as a
46
+ * *child*, so a consumer's `aria-label` lands on an element with no role, where
47
+ * ARIA prohibits naming — nothing reaches the control and it stays nameless.
48
+ * `tabindex` is worse than useless: it makes the wrapper focusable, putting a
49
+ * dead tab stop in front of the real control. This replaces three ad-hoc idioms
50
+ * that had grown up around the problem (`bs-checkbox`/`bs-radio`'s
51
+ * `MutationObserver`, `bs-carousel`/`bs-navbar`'s bespoke `[ariaLabel]` input,
52
+ * `bs-select`'s `Renderer2` call) with one directive, so the next wrapper does
53
+ * not invent a fourth.
54
+ *
55
+ * **Copy versus move, and why they differ.** `aria-*` attributes are *copied* and
56
+ * kept live — they carry state (`aria-expanded`, `aria-invalid`) that must be
57
+ * correct at every moment, and duplicating them on an unexposed host is harmless.
58
+ * `role`, `id` and `tabindex` are **moved**, because leaving them would be
59
+ * actively wrong: two elements with one `id` is invalid and breaks every IDREF
60
+ * pointing at it, and a duplicated `tabindex` is the dead-tab-stop defect itself.
61
+ * The host then takes `role="presentation"` so it contributes no extra generic
62
+ * node of its own.
63
+ *
64
+ * **Known limit, stated because it is a real gap and not a rounding error.**
65
+ * Adding any of the three moved attributes later *is* tracked — an addition is an
66
+ * observable mutation. **Removing one after it has been moved is not**, because
67
+ * the attribute is no longer on the host for its removal to be observed. In
68
+ * practice `role`/`id`/`tabindex` are structural and set once, while the
69
+ * attributes that genuinely change at runtime are `aria-*`, which are copied and
70
+ * fully live. If a component ever needs a removable forwarded `tabindex`, give it
71
+ * an explicit input rather than widening this directive.
72
+ */
73
+ class BsForwardAriaDirective {
74
+ /** Moved rather than copied — see the class comment. */
75
+ static { this.MOVED = ['role', 'id', 'tabindex']; }
76
+ /**
77
+ * The role this directive writes on the host itself, which must therefore never
78
+ * be treated as a *consumer's* role and moved inward.
79
+ *
80
+ * Checked by **value** rather than tracked in an instance flag, and that
81
+ * distinction is the whole fix for an SSR defect: the server pass runs this
82
+ * directive and serialises `role="presentation"` into the HTML, so the client
83
+ * gets a **fresh instance** whose flag is `false` staring at a host that already
84
+ * carries the marker. It moved the marker onto the custom element — making the
85
+ * real component presentational and discarding the name just forwarded to it.
86
+ * A flag cannot survive rehydration; a value check needs nothing to survive.
87
+ *
88
+ * Only `presentation` is claimed, not `none`. They are synonyms to ARIA, but a
89
+ * consumer writing `role="none"` is making a deliberate statement about the
90
+ * *inner* element and it is still forwarded; `presentation` on a wrapper asks for
91
+ * exactly what this directive already does, so there is nothing to forward.
92
+ */
93
+ static { this.HOST_ROLE = 'presentation'; }
94
+ constructor() {
95
+ this.target = inject(ElementRef).nativeElement;
96
+ /**
97
+ * The wrapper host. `skipSelf` walks from this element's node injector to its
98
+ * parent's, which for a component's template root is the component host — no
99
+ * DOM walking and no assumption about nesting depth.
100
+ */
101
+ this.host = inject(ElementRef, { skipSelf: true }).nativeElement;
102
+ this.platformId = inject(PLATFORM_ID);
103
+ this.destroyRef = inject(DestroyRef);
104
+ // Attribute *bindings* from the consumer's template are written during the
105
+ // consumer's change detection, which is not guaranteed to have run by
106
+ // ngOnInit. A second pass after render catches those. Both passes are
107
+ // idempotent, so running both costs nothing.
108
+ afterNextRender(() => {
109
+ this.forward();
110
+ this.observe();
111
+ });
112
+ }
113
+ /**
114
+ * Runs on the server too, unlike the `MutationObserver`. That matters: the
115
+ * no-JS and SSR tiers are part of this library's contract, and an
116
+ * accessible name that only appears after hydration is absent exactly when a
117
+ * screen reader first reads the page.
118
+ */
119
+ ngOnInit() {
120
+ this.forward();
121
+ }
122
+ forward() {
123
+ for (const { name, value } of Array.from(this.host.attributes)) {
124
+ if (name.startsWith('aria-')) {
125
+ this.target.setAttribute(name, value);
126
+ }
127
+ }
128
+ for (const name of BsForwardAriaDirective.MOVED) {
129
+ const value = this.host.getAttribute(name);
130
+ if (value === null)
131
+ continue;
132
+ // Our own marker, whether this instance wrote it or a server pass did.
133
+ if (name === 'role' && value === BsForwardAriaDirective.HOST_ROLE)
134
+ continue;
135
+ this.target.setAttribute(name, value);
136
+ this.host.removeAttribute(name);
137
+ }
138
+ // Only after any consumer role has been moved off it, so this never wins
139
+ // over what the consumer asked for. Idempotent: a second pass — including the
140
+ // first client pass after SSR — finds the marker already present.
141
+ if (!this.host.hasAttribute('role')) {
142
+ this.host.setAttribute('role', BsForwardAriaDirective.HOST_ROLE);
143
+ }
144
+ }
145
+ observe() {
146
+ if (isPlatformServer(this.platformId))
147
+ return;
148
+ const observer = new MutationObserver(() => this.forward());
149
+ observer.observe(this.host, { attributes: true });
150
+ this.destroyRef.onDestroy(() => observer.disconnect());
151
+ }
152
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsForwardAriaDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
153
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.0", type: BsForwardAriaDirective, isStandalone: true, selector: "[bsForwardAria]", ngImport: i0 }); }
154
+ }
155
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsForwardAriaDirective, decorators: [{
156
+ type: Directive,
157
+ args: [{
158
+ selector: '[bsForwardAria]',
159
+ }]
160
+ }], ctorParameters: () => [] });
161
+
31
162
  /**
32
163
  * One marker per focusable child of a `bsRovingFocus` container.
33
164
  *
@@ -212,43 +343,30 @@ class BsRovingFocusDirective {
212
343
  if (consumed)
213
344
  event.preventDefault();
214
345
  }
215
- /** Public so consumers (e.g. BsComboboxDirective's TAB handling) can detect edges without re-implementing the disabled-aware scan. */
346
+ /**
347
+ * Index math delegates to the shared pure functions in
348
+ * @mintplayer/web-components/a11y — this directive and the WC RovingFocus
349
+ * controller had independently identical copies that had ALREADY drifted
350
+ * (wrap-vs-clamp default). One implementation, two adapters. The directive
351
+ * keeps its own signals, discovery and activedescendant mode: those are
352
+ * Angular/light-DOM concerns the WC controller rightly lacks.
353
+ *
354
+ * Public so consumers (e.g. BsComboboxDirective's TAB handling) can detect
355
+ * edges without re-implementing the disabled-aware scan.
356
+ */
216
357
  firstEnabledIndex() {
217
358
  const items = this.items();
218
- return items.findIndex(it => !it.disabled());
359
+ return firstEnabledIndex(items.length, (i) => items[i].disabled());
219
360
  }
220
361
  lastEnabledIndex() {
221
362
  const items = this.items();
222
- for (let i = items.length - 1; i >= 0; i--) {
223
- if (!items[i].disabled())
224
- return i;
225
- }
226
- return -1;
363
+ return lastEnabledIndex(items.length, (i) => items[i].disabled());
227
364
  }
228
365
  step(delta) {
229
366
  const items = this.items();
230
- const total = items.length;
231
- if (total === 0)
232
- return;
233
- const wrap = this.wrap();
234
- let cursor = this.activeIndex();
235
- for (let i = 0; i < total; i++) {
236
- cursor = cursor + delta;
237
- if (cursor < 0) {
238
- if (!wrap)
239
- return;
240
- cursor = total - 1;
241
- }
242
- else if (cursor >= total) {
243
- if (!wrap)
244
- return;
245
- cursor = 0;
246
- }
247
- if (!items[cursor].disabled()) {
248
- this.moveTo(cursor);
249
- return;
250
- }
251
- }
367
+ const next = nextEnabledIndex(items.length, this.activeIndex(), delta, this.wrap(), (i) => items[i].disabled());
368
+ if (next >= 0)
369
+ this.moveTo(next);
252
370
  }
253
371
  moveTo(index) {
254
372
  if (index < 0)
@@ -402,8 +520,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImpor
402
520
  }] });
403
521
 
404
522
  /**
405
- * LIFO registry that tracks open overlays so each overlay can decide whether
406
- * its global Escape listener should fire.
523
+ * Angular facade over the document's single dismiss stack, so each overlay can
524
+ * decide whether its global Escape listener should fire.
407
525
  *
408
526
  * The problem: popover, tooltip, dropdown-menu, priority-nav, and modal each
409
527
  * bind a `(document:keydown.escape)` (or equivalent host listener) that closes
@@ -415,6 +533,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImpor
415
533
  * when it closes; its Escape handler runs only when `isTop(token)` returns
416
534
  * true. The top-most overlay consumes Escape; lower frames stay open.
417
535
  *
536
+ * **This is now a facade, and that matters.** The state lives in
537
+ * `@mintplayer/web-components/a11y`'s `dismissStack`, shared with
538
+ * `OverlayController`. It used to be a private array here, and the web
539
+ * components had their own — so an Angular overlay wrapping a web-component
540
+ * overlay (`bs-tree-select` inside `bs-modal`, the ordinary case) had one frame
541
+ * on each stack, both believed they were top-most, and one Escape closed both.
542
+ * Angular keeps the DI ergonomics; there is exactly one array.
543
+ *
418
544
  * Identity is a per-call `symbol` token rather than a string, so two opens of
419
545
  * the same directive don't collide and a stale token can't accidentally match
420
546
  * a future frame.
@@ -427,14 +553,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImpor
427
553
  * `keydown.escape` listener that doesn't ask the stack will still fire.
428
554
  */
429
555
  class BsOverlayStackService {
430
- constructor() {
431
- this.stack = [];
432
- }
433
556
  /** Allocate a new frame on top of the stack and return its token. */
434
557
  push() {
435
- const token = Symbol('bs-overlay-frame');
436
- this.stack.push(token);
437
- return token;
558
+ return dismissStack.push('bs-overlay-frame');
438
559
  }
439
560
  /**
440
561
  * Remove `token` from the stack. Releasing a non-top token is allowed —
@@ -442,17 +563,15 @@ class BsOverlayStackService {
442
563
  * Escape press (e.g. a popover closed by clicking its trigger again).
443
564
  */
444
565
  release(token) {
445
- const idx = this.stack.lastIndexOf(token);
446
- if (idx >= 0)
447
- this.stack.splice(idx, 1);
566
+ dismissStack.release(token);
448
567
  }
449
568
  /** True if `token` is the top of the stack. */
450
569
  isTop(token) {
451
- return this.stack.length > 0 && this.stack[this.stack.length - 1] === token;
570
+ return dismissStack.isTop(token);
452
571
  }
453
572
  /** Token at the top of the stack, or null if empty. */
454
573
  peek() {
455
- return this.stack.length > 0 ? this.stack[this.stack.length - 1] : null;
574
+ return dismissStack.peek();
456
575
  }
457
576
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsOverlayStackService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
458
577
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsOverlayStackService, providedIn: 'root' }); }
@@ -462,9 +581,101 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImpor
462
581
  args: [{ providedIn: 'root' }]
463
582
  }] });
464
583
 
584
+ /**
585
+ * Mirrors the host form control's validity onto the wrapped web component:
586
+ * `invalid` (only once touched — Bootstrap's own convention, and untouched
587
+ * pristine forms must not scream), `required` (from the control's
588
+ * validators) and, when `[errorMessages]` supplies one, `error-text`. The WC
589
+ * maps them to `aria-invalid`/`aria-required`/`aria-errormessage` +
590
+ * `aria-describedby` on its inner role-bearing input, which is the node screen
591
+ * readers actually read.
592
+ *
593
+ * The attribute lands on the wrapper's first element child — every nested
594
+ * host wrapper renders its `mp-*` element as the template root — NOT on the
595
+ * `bs-*` host, which has no role for AT to read it from.
596
+ *
597
+ * NgControl is resolved lazily via the injector: injecting it in the
598
+ * constructor recurses (NgControl resolution needs the value accessor being
599
+ * constructed). ngDoCheck keeps the mirror live at every CD pass, which is
600
+ * exactly the cadence Angular updates control state at (PRD 11a).
601
+ */
602
+ class BsControlValidityDirective {
603
+ constructor() {
604
+ this.injector = inject(Injector);
605
+ this.host = inject(ElementRef);
606
+ /**
607
+ * Validation messages by `NgControl` error key, e.g.
608
+ * `{ required: 'Pick a fruit.', minlength: 'Too short.' }`.
609
+ *
610
+ * The message for the first active error is written to the WC's `error-text`,
611
+ * which renders it inside the shadow root and points the real control at it.
612
+ * A key with no message simply produces no message, so a consumer can spell out
613
+ * the errors worth announcing and leave the rest to the visible form summary.
614
+ */
615
+ this.errorMessages = input(null, /* @ts-ignore */
616
+ ...(ngDevMode ? [{ debugName: "errorMessages" }] : /* istanbul ignore next */ []));
617
+ }
618
+ ngDoCheck() {
619
+ if (this.ngControl === undefined) {
620
+ this.ngControl = this.injector.get(NgControl, null);
621
+ }
622
+ const control = this.ngControl;
623
+ const target = this.host.nativeElement.firstElementChild;
624
+ if (!control || !target)
625
+ return;
626
+ const invalid = !!control.invalid && !!control.touched;
627
+ this.mirror(target, 'invalid', invalid ? '' : null);
628
+ // requiredTrue is the checkbox-shaped required; hasValidator compares by
629
+ // reference, so both spellings must be probed.
630
+ const required = (control.control?.hasValidator(Validators.required) ?? false) ||
631
+ (control.control?.hasValidator(Validators.requiredTrue) ?? false);
632
+ this.mirror(target, 'required', required ? '' : null);
633
+ // Tied to the same predicate as `invalid`, not just to `control.invalid`:
634
+ // `aria-errormessage` is only defined while the control is `aria-invalid`, so
635
+ // a message on an untouched control would be a reference to nothing.
636
+ this.mirror(target, 'error-text', invalid ? this.activeMessage(control) : null);
637
+ }
638
+ /**
639
+ * The message for the first of the control's active errors that has one.
640
+ * Validators report in the order they were composed, so a required-then-pattern
641
+ * field announces "required" until it has a value — the order the user meets
642
+ * them in.
643
+ */
644
+ activeMessage(control) {
645
+ const messages = this.errorMessages();
646
+ if (!messages)
647
+ return null;
648
+ const key = Object.keys(control.errors ?? {}).find((error) => error in messages);
649
+ return key ? messages[key] : null;
650
+ }
651
+ /**
652
+ * Writes only on a real change. `ngDoCheck` runs on every CD pass, and an
653
+ * unconditional `setAttribute` fires the WC's `attributeChangedCallback` even
654
+ * when the value is identical — which now schedules a Lit render, because these
655
+ * attributes have to be live to be correct.
656
+ */
657
+ mirror(target, name, value) {
658
+ if (value === null) {
659
+ if (target.hasAttribute(name))
660
+ target.removeAttribute(name);
661
+ }
662
+ else if (target.getAttribute(name) !== value) {
663
+ target.setAttribute(name, value);
664
+ }
665
+ }
666
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsControlValidityDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
667
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.0", type: BsControlValidityDirective, isStandalone: true, selector: "[bsControlValidity]", inputs: { errorMessages: { classPropertyName: "errorMessages", publicName: "errorMessages", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
668
+ }
669
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsControlValidityDirective, decorators: [{
670
+ type: Directive,
671
+ args: [{
672
+ selector: '[bsControlValidity]',
673
+ }]
674
+ }], propDecorators: { errorMessages: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessages", required: false }] }] } });
675
+
465
676
  /**
466
677
  * Generated bundle index. Do not edit.
467
678
  */
468
679
 
469
- export { BsIdService, BsLiveAnnouncerService, BsOverlayFocusDirective, BsOverlayStackService, BsRovingFocusDirective, BsRovingFocusItemDirective };
680
+ export { BsControlValidityDirective, BsForwardAriaDirective, BsIdService, BsLiveAnnouncerService, BsOverlayFocusDirective, BsOverlayStackService, BsRovingFocusDirective, BsRovingFocusItemDirective };
470
681
  //# sourceMappingURL=mintplayer-ng-bootstrap-a11y.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"mintplayer-ng-bootstrap-a11y.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/a11y/src/service/id.service.ts","../../../../libs/mintplayer-ng-bootstrap/a11y/src/roving-focus/roving-focus-item.directive.ts","../../../../libs/mintplayer-ng-bootstrap/a11y/src/roving-focus/roving-focus.directive.ts","../../../../libs/mintplayer-ng-bootstrap/a11y/src/overlay-focus/overlay-focus.directive.ts","../../../../libs/mintplayer-ng-bootstrap/a11y/src/live-announcer/live-announcer.service.ts","../../../../libs/mintplayer-ng-bootstrap/a11y/src/overlay-stack/overlay-stack.service.ts","../../../../libs/mintplayer-ng-bootstrap/a11y/mintplayer-ng-bootstrap-a11y.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n/**\n * App-wide unique ID generator for ARIA wiring (`aria-controls`,\n * `aria-labelledby`, `aria-activedescendant`, etc.).\n *\n * Why a service instead of `crypto.randomUUID()` or per-component counters:\n * IDs need to stay short and human-readable in DevTools, and per-component\n * counters collide when the same component is instantiated more than once on\n * a page (two `bs-dropdown`s would each assign `bs-dropdown-1`). The shared\n * counter guarantees uniqueness across the whole app without UUID noise.\n */\n@Injectable({ providedIn: 'root' })\nexport class BsIdService {\n private counter = 0;\n\n /** Returns `${prefix}-N` where N monotonically increases for the lifetime of the app. */\n next(prefix: string): string {\n return `${prefix}-${++this.counter}`;\n }\n}\n","import { afterNextRender, computed, Directive, ElementRef, forwardRef, inject, input, signal } from '@angular/core';\nimport { BsIdService } from '../service/id.service';\nimport { BsRovingFocusDirective } from './roving-focus.directive';\n\n/**\n * One marker per focusable child of a `bsRovingFocus` container.\n *\n * - Mirrors the parent's mode into the host `tabindex` (0 if active in\n * `tabindex` mode, -1 otherwise).\n * - Toggles the `.bs-rovingfocus-active` class so SCSS can paint a focused-\n * look highlight on the active item — important in `activedescendant`\n * mode, where the item never receives `:focus` and the browser's focus\n * ring never paints.\n * - Auto-generates an `id` if the host doesn't already have one, so combobox\n * `aria-activedescendant` always has a stable target. Honours an\n * externally-supplied id when present.\n *\n * Consumers normally don't interact with this directive directly — they\n * just stamp it on each list/menu/option element inside `bsRovingFocus`.\n */\n@Directive({\n selector: '[bsRovingFocusItem]',\n exportAs: 'bsRovingFocusItem',\n host: {\n '[attr.tabindex]': 'tabindex()',\n '[class.bs-rovingfocus-active]': 'isActive()',\n '(focus)': 'onFocus()',\n },\n})\nexport class BsRovingFocusItemDirective {\n private parent = inject(forwardRef(() => BsRovingFocusDirective));\n elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private ids = inject(BsIdService);\n\n readonly disabled = input(false);\n\n /**\n * The host element's id. Honoured if set externally (e.g. by a sibling\n * component's [attr.id] host binding); otherwise generated in afterNextRender\n * so combobox-style aria-activedescendant has a stable target.\n *\n * Backed by a signal so parent computeds (like BsRovingFocusDirective's\n * activeDescendantId) re-run when the id is resolved post-mount. A plain\n * `nativeElement.id` getter would be silently cached during the first\n * computation and never re-read — leading to aria-activedescendant=\"\" on\n * combobox inputs even after the items got real ids.\n */\n private readonly _itemId = signal<string>('');\n get itemId(): string {\n return this._itemId();\n }\n\n readonly index = computed(() => this.parent.items().indexOf(this));\n readonly isActive = computed(() => this.index() === this.parent.activeIndex());\n\n readonly tabindex = computed(() => {\n if (this.parent.mode() === 'activedescendant') return -1;\n return this.isActive() ? 0 : -1;\n });\n\n constructor() {\n // After the first render, all sibling host bindings on this element have applied.\n // If no other directive (e.g. BsDropdownItemComponent) supplied an id, generate one\n // so the parent's activeDescendantId() has a stable target. Then publish the\n // resolved id to the signal so reactive consumers see it.\n afterNextRender(() => {\n if (!this.elementRef.nativeElement.id) {\n this.elementRef.nativeElement.id = this.ids.next('bs-rovingitem');\n }\n this._itemId.set(this.elementRef.nativeElement.id);\n });\n }\n\n onFocus(): void {\n this.parent.setActiveItem(this);\n }\n}\n","import { computed, contentChildren, Directive, ElementRef, inject, input, signal } from '@angular/core';\nimport { BsRovingFocusItemDirective } from './roving-focus-item.directive';\n\nexport type BsRovingFocusOrientation = 'vertical' | 'horizontal' | 'both';\nexport type BsRovingFocusMode = 'tabindex' | 'activedescendant';\n\n/**\n * APG roving-tabindex / active-descendant container.\n *\n * Place on a list/menu/listbox; mark each focusable child with\n * `bsRovingFocusItem`. Arrow keys, Home, and End move the active item; the\n * directive auto-handles disabled items, wrap-around, and orientation.\n *\n * Two modes:\n * - **`tabindex`** (default) — only the active item has `tabindex=\"0\"`; real\n * DOM focus moves. Right for menus, treeviews, tablists.\n * - **`activedescendant`** — items keep `tabindex=\"-1\"`; DOM focus stays on\n * an external owner (e.g. a combobox `<input>`) which mirrors the active\n * item's id via `aria-activedescendant`. Right for comboboxes/listboxes\n * where the user is also typing.\n *\n * Consumers that need to react to the active item externally read\n * `activeIndex()` (signal) or `activeDescendantId()` (computed).\n */\n@Directive({\n selector: '[bsRovingFocus]',\n exportAs: 'bsRovingFocus',\n host: {\n '(keydown)': 'onKeydown($event)',\n },\n})\nexport class BsRovingFocusDirective {\n private elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly orientation = input<BsRovingFocusOrientation>('vertical');\n readonly mode = input<BsRovingFocusMode>('tabindex');\n readonly wrap = input(true);\n\n readonly items = contentChildren(BsRovingFocusItemDirective);\n readonly activeIndex = signal(0);\n\n readonly activeDescendantId = computed(() => {\n if (this.mode() !== 'activedescendant') return null;\n return this.items()[this.activeIndex()]?.itemId ?? null;\n });\n\n focusFirst(): void {\n this.moveTo(this.firstEnabledIndex());\n }\n\n focusLast(): void {\n this.moveTo(this.lastEnabledIndex());\n }\n\n next(): void {\n this.step(+1);\n }\n\n prev(): void {\n this.step(-1);\n }\n\n setActiveItem(item: BsRovingFocusItemDirective): void {\n const idx = this.items().indexOf(item);\n if (idx < 0) return;\n if (item.disabled()) return;\n this.activeIndex.set(idx);\n }\n\n onKeydown(event: KeyboardEvent): void {\n // Don't intercept browser/OS chords (Alt+Arrow=back, Ctrl+Home=top of doc, Cmd+Arrow=word jump on macOS).\n if (event.altKey || event.ctrlKey || event.metaKey) return;\n const orient = this.orientation();\n let consumed = true;\n switch (event.key) {\n case 'ArrowDown':\n if (orient === 'horizontal') { consumed = false; break; }\n this.next();\n break;\n case 'ArrowUp':\n if (orient === 'horizontal') { consumed = false; break; }\n this.prev();\n break;\n case 'ArrowRight':\n if (orient === 'vertical') { consumed = false; break; }\n this.next();\n break;\n case 'ArrowLeft':\n if (orient === 'vertical') { consumed = false; break; }\n this.prev();\n break;\n case 'Home':\n this.focusFirst();\n break;\n case 'End':\n this.focusLast();\n break;\n default:\n consumed = false;\n }\n if (consumed) event.preventDefault();\n }\n\n /** Public so consumers (e.g. BsComboboxDirective's TAB handling) can detect edges without re-implementing the disabled-aware scan. */\n firstEnabledIndex(): number {\n const items = this.items();\n return items.findIndex(it => !it.disabled());\n }\n\n lastEnabledIndex(): number {\n const items = this.items();\n for (let i = items.length - 1; i >= 0; i--) {\n if (!items[i].disabled()) return i;\n }\n return -1;\n }\n\n private step(delta: 1 | -1): void {\n const items = this.items();\n const total = items.length;\n if (total === 0) return;\n\n const wrap = this.wrap();\n let cursor = this.activeIndex();\n for (let i = 0; i < total; i++) {\n cursor = cursor + delta;\n if (cursor < 0) {\n if (!wrap) return;\n cursor = total - 1;\n } else if (cursor >= total) {\n if (!wrap) return;\n cursor = 0;\n }\n if (!items[cursor].disabled()) {\n this.moveTo(cursor);\n return;\n }\n }\n }\n\n private moveTo(index: number): void {\n if (index < 0) return;\n this.activeIndex.set(index);\n if (this.mode() === 'tabindex' && this.elementRef.nativeElement.contains(document.activeElement)) {\n this.items()[index]?.elementRef.nativeElement.focus();\n }\n }\n}\n","import { ConfigurableFocusTrap, ConfigurableFocusTrapFactory, InteractivityChecker } from '@angular/cdk/a11y';\nimport { DestroyRef, Directive, effect, ElementRef, inject, input } from '@angular/core';\n\nexport type BsOverlayInitialFocus = HTMLElement | 'first' | 'self' | 'none';\n\n/**\n * Activates a CDK focus trap on the host element while `bsOverlayFocus` is true,\n * captures the trigger before activation, and returns focus to it on deactivation.\n *\n * Initial focus inside the trap defaults to the first tabbable descendant; pass\n * an explicit HTMLElement, 'self' (focus the host), or 'none' to opt out.\n *\n * Background `inert` / `aria-hidden` is intentionally not handled here — it is\n * the consuming component's job (a modal hides app-root, a popover does not).\n */\n@Directive({\n selector: '[bsOverlayFocus]',\n exportAs: 'bsOverlayFocus',\n})\nexport class BsOverlayFocusDirective {\n private elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private trapFactory = inject(ConfigurableFocusTrapFactory);\n private interactivityChecker = inject(InteractivityChecker);\n private destroyRef = inject(DestroyRef);\n\n readonly active = input(true, { alias: 'bsOverlayFocus' });\n readonly initialFocus = input<BsOverlayInitialFocus>('first');\n readonly returnFocus = input(true);\n\n private trap: ConfigurableFocusTrap | null = null;\n private restoreTo: HTMLElement | null = null;\n\n constructor() {\n effect(() => {\n if (this.active()) this.engage();\n else this.disengage();\n });\n\n this.destroyRef.onDestroy(() => this.disengage());\n }\n\n private engage(): void {\n if (this.trap) return;\n\n this.restoreTo = (typeof document !== 'undefined' && document.activeElement instanceof HTMLElement)\n ? document.activeElement\n : null;\n\n this.trap = this.trapFactory.create(this.elementRef.nativeElement);\n\n const target = this.initialFocus();\n if (target instanceof HTMLElement) {\n target.focus({ preventScroll: true });\n } else if (target === 'self') {\n this.elementRef.nativeElement.focus({ preventScroll: true });\n } else if (target === 'first') {\n this.focusFirstTabbable();\n }\n // 'none' — caller manages focus\n }\n\n private focusFirstTabbable(): void {\n // Walk the host's subtree and let CDK decide what's focusable — handles\n // disabled fieldsets, inert ancestors, and the long tail of edge cases\n // the inline selector would have to re-implement.\n //\n // `isFocusable({ ignoreVisibility: true })` because jsdom doesn't lay\n // elements out, so CDK's default visibility check (`getClientRects()`)\n // would reject everything in tests; in real browsers visible elements\n // pass either way. Tabindex < 0 is filtered manually so the host (which\n // we set `tabindex=\"-1\"` on for the focus trap) doesn't get selected.\n const root = this.elementRef.nativeElement;\n const walker = (root.ownerDocument ?? document).createTreeWalker(root, NodeFilter.SHOW_ELEMENT);\n let node: Node | null = walker.currentNode;\n while (node) {\n if (\n node instanceof HTMLElement\n && node.tabIndex >= 0\n // `:disabled` catches both own `disabled` and the inherited form of\n // it from an ancestor `<fieldset disabled>` — CDK's isFocusable only\n // looks at own attributes.\n && !node.matches(':disabled')\n && this.interactivityChecker.isFocusable(node, { ignoreVisibility: true })\n ) {\n node.focus({ preventScroll: true });\n return;\n }\n node = walker.nextNode();\n }\n }\n\n private disengage(): void {\n if (!this.trap) return;\n\n this.trap.destroy();\n this.trap = null;\n\n if (this.returnFocus() && this.restoreTo && typeof document !== 'undefined' && document.contains(this.restoreTo)) {\n // preventScroll so closing an overlay never yanks the page back to the\n // trigger's position — the user's scroll position is their choice.\n this.restoreTo.focus({ preventScroll: true });\n }\n this.restoreTo = null;\n }\n}\n","import { LiveAnnouncer, AriaLivePoliteness } from '@angular/cdk/a11y';\nimport { inject, Injectable } from '@angular/core';\n\n/**\n * Thin wrapper over CDK's LiveAnnouncer that dedupes consecutive identical\n * messages — typeahead-style \"5 results\" announcements often re-fire with the\n * same content and screen readers re-read them, which is noise.\n */\n@Injectable({ providedIn: 'root' })\nexport class BsLiveAnnouncerService {\n private cdk = inject(LiveAnnouncer);\n private last: { message: string; politeness: AriaLivePoliteness } | null = null;\n\n announce(message: string, politeness: AriaLivePoliteness = 'polite', durationMs?: number): Promise<void> {\n if (this.last && this.last.message === message && this.last.politeness === politeness) {\n return Promise.resolve();\n }\n this.last = { message, politeness };\n return this.cdk.announce(message, politeness, durationMs);\n }\n\n clear(): void {\n this.last = null;\n this.cdk.clear();\n }\n}\n","import { Injectable } from '@angular/core';\n\n/**\n * LIFO registry that tracks open overlays so each overlay can decide whether\n * its global Escape listener should fire.\n *\n * The problem: popover, tooltip, dropdown-menu, priority-nav, and modal each\n * bind a `(document:keydown.escape)` (or equivalent host listener) that closes\n * the overlay unconditionally. With nesting (popover-under-modal,\n * tooltip-under-popover), a single Escape closes both because both handlers\n * fire on the same event.\n *\n * The fix: every overlay calls `push()` when it opens and `release(token)`\n * when it closes; its Escape handler runs only when `isTop(token)` returns\n * true. The top-most overlay consumes Escape; lower frames stay open.\n *\n * Identity is a per-call `symbol` token rather than a string, so two opens of\n * the same directive don't collide and a stale token can't accidentally match\n * a future frame.\n *\n * **What this does NOT promise:**\n * - **Visual z-order.** The stack tracks logical open-order (the sequence of\n * `push()` calls). A consumer that manually reorders overlays in the DOM\n * could see Escape close a logically-deeper overlay. We don't support that.\n * - **Coordination with non-overlay listeners.** A consumer's own\n * `keydown.escape` listener that doesn't ask the stack will still fire.\n */\n@Injectable({ providedIn: 'root' })\nexport class BsOverlayStackService {\n private stack: symbol[] = [];\n\n /** Allocate a new frame on top of the stack and return its token. */\n push(): symbol {\n const token = Symbol('bs-overlay-frame');\n this.stack.push(token);\n return token;\n }\n\n /**\n * Remove `token` from the stack. Releasing a non-top token is allowed —\n * it's how an inner overlay closes itself programmatically without an\n * Escape press (e.g. a popover closed by clicking its trigger again).\n */\n release(token: symbol): void {\n const idx = this.stack.lastIndexOf(token);\n if (idx >= 0) this.stack.splice(idx, 1);\n }\n\n /** True if `token` is the top of the stack. */\n isTop(token: symbol): boolean {\n return this.stack.length > 0 && this.stack[this.stack.length - 1] === token;\n }\n\n /** Token at the top of the stack, or null if empty. */\n peek(): symbol | null {\n return this.stack.length > 0 ? this.stack[this.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A;kBADjC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;AC3BlC;;AAEG;;;;"}
1
+ {"version":3,"file":"mintplayer-ng-bootstrap-a11y.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/a11y/src/service/id.service.ts","../../../../libs/mintplayer-ng-bootstrap/a11y/src/forward-aria/forward-aria.directive.ts","../../../../libs/mintplayer-ng-bootstrap/a11y/src/roving-focus/roving-focus-item.directive.ts","../../../../libs/mintplayer-ng-bootstrap/a11y/src/roving-focus/roving-focus.directive.ts","../../../../libs/mintplayer-ng-bootstrap/a11y/src/overlay-focus/overlay-focus.directive.ts","../../../../libs/mintplayer-ng-bootstrap/a11y/src/live-announcer/live-announcer.service.ts","../../../../libs/mintplayer-ng-bootstrap/a11y/src/overlay-stack/overlay-stack.service.ts","../../../../libs/mintplayer-ng-bootstrap/a11y/src/control-validity/control-validity.directive.ts","../../../../libs/mintplayer-ng-bootstrap/a11y/mintplayer-ng-bootstrap-a11y.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n/**\n * App-wide unique ID generator for ARIA wiring (`aria-controls`,\n * `aria-labelledby`, `aria-activedescendant`, etc.).\n *\n * Why a service instead of `crypto.randomUUID()` or per-component counters:\n * IDs need to stay short and human-readable in DevTools, and per-component\n * counters collide when the same component is instantiated more than once on\n * a page (two `bs-dropdown`s would each assign `bs-dropdown-1`). The shared\n * counter guarantees uniqueness across the whole app without UUID noise.\n */\n@Injectable({ providedIn: 'root' })\nexport class BsIdService {\n private counter = 0;\n\n /** Returns `${prefix}-N` where N monotonically increases for the lifetime of the app. */\n next(prefix: string): string {\n return `${prefix}-${++this.counter}`;\n }\n}\n","import {\n afterNextRender,\n DestroyRef,\n Directive,\n ElementRef,\n inject,\n OnInit,\n PLATFORM_ID,\n} from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\n\n/**\n * Makes a nested-host wrapper **transparent to ARIA**: a consumer's `aria-*`,\n * `role`, `id` and `tabindex` written on the `bs-*` element reach the `mp-*`\n * custom element inside it.\n *\n * Apply to the wrapper's inner custom element, which is its template root:\n *\n * ```html\n * <mp-checkbox #checkbox bsForwardAria (change)=\"onChange($event)\">\n * ```\n *\n * **The problem it solves.** Every `bs-*` wrapper renders the real control as a\n * *child*, so a consumer's `aria-label` lands on an element with no role, where\n * ARIA prohibits naming — nothing reaches the control and it stays nameless.\n * `tabindex` is worse than useless: it makes the wrapper focusable, putting a\n * dead tab stop in front of the real control. This replaces three ad-hoc idioms\n * that had grown up around the problem (`bs-checkbox`/`bs-radio`'s\n * `MutationObserver`, `bs-carousel`/`bs-navbar`'s bespoke `[ariaLabel]` input,\n * `bs-select`'s `Renderer2` call) with one directive, so the next wrapper does\n * not invent a fourth.\n *\n * **Copy versus move, and why they differ.** `aria-*` attributes are *copied* and\n * kept live — they carry state (`aria-expanded`, `aria-invalid`) that must be\n * correct at every moment, and duplicating them on an unexposed host is harmless.\n * `role`, `id` and `tabindex` are **moved**, because leaving them would be\n * actively wrong: two elements with one `id` is invalid and breaks every IDREF\n * pointing at it, and a duplicated `tabindex` is the dead-tab-stop defect itself.\n * The host then takes `role=\"presentation\"` so it contributes no extra generic\n * node of its own.\n *\n * **Known limit, stated because it is a real gap and not a rounding error.**\n * Adding any of the three moved attributes later *is* tracked — an addition is an\n * observable mutation. **Removing one after it has been moved is not**, because\n * the attribute is no longer on the host for its removal to be observed. In\n * practice `role`/`id`/`tabindex` are structural and set once, while the\n * attributes that genuinely change at runtime are `aria-*`, which are copied and\n * fully live. If a component ever needs a removable forwarded `tabindex`, give it\n * an explicit input rather than widening this directive.\n */\n@Directive({\n selector: '[bsForwardAria]',\n})\nexport class BsForwardAriaDirective implements OnInit {\n private readonly target = inject(ElementRef).nativeElement as HTMLElement;\n /**\n * The wrapper host. `skipSelf` walks from this element's node injector to its\n * parent's, which for a component's template root is the component host — no\n * DOM walking and no assumption about nesting depth.\n */\n private readonly host = inject(ElementRef, { skipSelf: true }).nativeElement as HTMLElement;\n private readonly platformId = inject(PLATFORM_ID);\n private readonly destroyRef = inject(DestroyRef);\n\n /** Moved rather than copied — see the class comment. */\n private static readonly MOVED = ['role', 'id', 'tabindex'] as const;\n\n /**\n * The role this directive writes on the host itself, which must therefore never\n * be treated as a *consumer's* role and moved inward.\n *\n * Checked by **value** rather than tracked in an instance flag, and that\n * distinction is the whole fix for an SSR defect: the server pass runs this\n * directive and serialises `role=\"presentation\"` into the HTML, so the client\n * gets a **fresh instance** whose flag is `false` staring at a host that already\n * carries the marker. It moved the marker onto the custom element — making the\n * real component presentational and discarding the name just forwarded to it.\n * A flag cannot survive rehydration; a value check needs nothing to survive.\n *\n * Only `presentation` is claimed, not `none`. They are synonyms to ARIA, but a\n * consumer writing `role=\"none\"` is making a deliberate statement about the\n * *inner* element and it is still forwarded; `presentation` on a wrapper asks for\n * exactly what this directive already does, so there is nothing to forward.\n */\n private static readonly HOST_ROLE = 'presentation';\n\n constructor() {\n // Attribute *bindings* from the consumer's template are written during the\n // consumer's change detection, which is not guaranteed to have run by\n // ngOnInit. A second pass after render catches those. Both passes are\n // idempotent, so running both costs nothing.\n afterNextRender(() => {\n this.forward();\n this.observe();\n });\n }\n\n /**\n * Runs on the server too, unlike the `MutationObserver`. That matters: the\n * no-JS and SSR tiers are part of this library's contract, and an\n * accessible name that only appears after hydration is absent exactly when a\n * screen reader first reads the page.\n */\n ngOnInit(): void {\n this.forward();\n }\n\n private forward(): void {\n for (const { name, value } of Array.from(this.host.attributes)) {\n if (name.startsWith('aria-')) {\n this.target.setAttribute(name, value);\n }\n }\n\n for (const name of BsForwardAriaDirective.MOVED) {\n const value = this.host.getAttribute(name);\n if (value === null) continue;\n // Our own marker, whether this instance wrote it or a server pass did.\n if (name === 'role' && value === BsForwardAriaDirective.HOST_ROLE) continue;\n this.target.setAttribute(name, value);\n this.host.removeAttribute(name);\n }\n\n // Only after any consumer role has been moved off it, so this never wins\n // over what the consumer asked for. Idempotent: a second pass — including the\n // first client pass after SSR — finds the marker already present.\n if (!this.host.hasAttribute('role')) {\n this.host.setAttribute('role', BsForwardAriaDirective.HOST_ROLE);\n }\n }\n\n private observe(): void {\n if (isPlatformServer(this.platformId)) return;\n\n const observer = new MutationObserver(() => this.forward());\n observer.observe(this.host, { attributes: true });\n this.destroyRef.onDestroy(() => observer.disconnect());\n }\n}\n","import { afterNextRender, computed, Directive, ElementRef, forwardRef, inject, input, signal } from '@angular/core';\nimport { BsIdService } from '../service/id.service';\nimport { BsRovingFocusDirective } from './roving-focus.directive';\n\n/**\n * One marker per focusable child of a `bsRovingFocus` container.\n *\n * - Mirrors the parent's mode into the host `tabindex` (0 if active in\n * `tabindex` mode, -1 otherwise).\n * - Toggles the `.bs-rovingfocus-active` class so SCSS can paint a focused-\n * look highlight on the active item — important in `activedescendant`\n * mode, where the item never receives `:focus` and the browser's focus\n * ring never paints.\n * - Auto-generates an `id` if the host doesn't already have one, so combobox\n * `aria-activedescendant` always has a stable target. Honours an\n * externally-supplied id when present.\n *\n * Consumers normally don't interact with this directive directly — they\n * just stamp it on each list/menu/option element inside `bsRovingFocus`.\n */\n@Directive({\n selector: '[bsRovingFocusItem]',\n exportAs: 'bsRovingFocusItem',\n host: {\n '[attr.tabindex]': 'tabindex()',\n '[class.bs-rovingfocus-active]': 'isActive()',\n '(focus)': 'onFocus()',\n },\n})\nexport class BsRovingFocusItemDirective {\n private parent = inject(forwardRef(() => BsRovingFocusDirective));\n elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private ids = inject(BsIdService);\n\n readonly disabled = input(false);\n\n /**\n * The host element's id. Honoured if set externally (e.g. by a sibling\n * component's [attr.id] host binding); otherwise generated in afterNextRender\n * so combobox-style aria-activedescendant has a stable target.\n *\n * Backed by a signal so parent computeds (like BsRovingFocusDirective's\n * activeDescendantId) re-run when the id is resolved post-mount. A plain\n * `nativeElement.id` getter would be silently cached during the first\n * computation and never re-read — leading to aria-activedescendant=\"\" on\n * combobox inputs even after the items got real ids.\n */\n private readonly _itemId = signal<string>('');\n get itemId(): string {\n return this._itemId();\n }\n\n readonly index = computed(() => this.parent.items().indexOf(this));\n readonly isActive = computed(() => this.index() === this.parent.activeIndex());\n\n readonly tabindex = computed(() => {\n if (this.parent.mode() === 'activedescendant') return -1;\n return this.isActive() ? 0 : -1;\n });\n\n constructor() {\n // After the first render, all sibling host bindings on this element have applied.\n // If no other directive (e.g. BsDropdownItemComponent) supplied an id, generate one\n // so the parent's activeDescendantId() has a stable target. Then publish the\n // resolved id to the signal so reactive consumers see it.\n afterNextRender(() => {\n if (!this.elementRef.nativeElement.id) {\n this.elementRef.nativeElement.id = this.ids.next('bs-rovingitem');\n }\n this._itemId.set(this.elementRef.nativeElement.id);\n });\n }\n\n onFocus(): void {\n this.parent.setActiveItem(this);\n }\n}\n","import { computed, contentChildren, Directive, ElementRef, inject, input, signal } from '@angular/core';\nimport { firstEnabledIndex, lastEnabledIndex, nextEnabledIndex } from '@mintplayer/web-components/a11y';\nimport { BsRovingFocusItemDirective } from './roving-focus-item.directive';\n\nexport type BsRovingFocusOrientation = 'vertical' | 'horizontal' | 'both';\nexport type BsRovingFocusMode = 'tabindex' | 'activedescendant';\n\n/**\n * APG roving-tabindex / active-descendant container.\n *\n * Place on a list/menu/listbox; mark each focusable child with\n * `bsRovingFocusItem`. Arrow keys, Home, and End move the active item; the\n * directive auto-handles disabled items, wrap-around, and orientation.\n *\n * Two modes:\n * - **`tabindex`** (default) — only the active item has `tabindex=\"0\"`; real\n * DOM focus moves. Right for menus, treeviews, tablists.\n * - **`activedescendant`** — items keep `tabindex=\"-1\"`; DOM focus stays on\n * an external owner (e.g. a combobox `<input>`) which mirrors the active\n * item's id via `aria-activedescendant`. Right for comboboxes/listboxes\n * where the user is also typing.\n *\n * Consumers that need to react to the active item externally read\n * `activeIndex()` (signal) or `activeDescendantId()` (computed).\n */\n@Directive({\n selector: '[bsRovingFocus]',\n exportAs: 'bsRovingFocus',\n host: {\n '(keydown)': 'onKeydown($event)',\n },\n})\nexport class BsRovingFocusDirective {\n private elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly orientation = input<BsRovingFocusOrientation>('vertical');\n readonly mode = input<BsRovingFocusMode>('tabindex');\n readonly wrap = input(true);\n\n readonly items = contentChildren(BsRovingFocusItemDirective);\n readonly activeIndex = signal(0);\n\n readonly activeDescendantId = computed(() => {\n if (this.mode() !== 'activedescendant') return null;\n return this.items()[this.activeIndex()]?.itemId ?? null;\n });\n\n focusFirst(): void {\n this.moveTo(this.firstEnabledIndex());\n }\n\n focusLast(): void {\n this.moveTo(this.lastEnabledIndex());\n }\n\n next(): void {\n this.step(+1);\n }\n\n prev(): void {\n this.step(-1);\n }\n\n setActiveItem(item: BsRovingFocusItemDirective): void {\n const idx = this.items().indexOf(item);\n if (idx < 0) return;\n if (item.disabled()) return;\n this.activeIndex.set(idx);\n }\n\n onKeydown(event: KeyboardEvent): void {\n // Don't intercept browser/OS chords (Alt+Arrow=back, Ctrl+Home=top of doc, Cmd+Arrow=word jump on macOS).\n if (event.altKey || event.ctrlKey || event.metaKey) return;\n const orient = this.orientation();\n let consumed = true;\n switch (event.key) {\n case 'ArrowDown':\n if (orient === 'horizontal') { consumed = false; break; }\n this.next();\n break;\n case 'ArrowUp':\n if (orient === 'horizontal') { consumed = false; break; }\n this.prev();\n break;\n case 'ArrowRight':\n if (orient === 'vertical') { consumed = false; break; }\n this.next();\n break;\n case 'ArrowLeft':\n if (orient === 'vertical') { consumed = false; break; }\n this.prev();\n break;\n case 'Home':\n this.focusFirst();\n break;\n case 'End':\n this.focusLast();\n break;\n default:\n consumed = false;\n }\n if (consumed) event.preventDefault();\n }\n\n /**\n * Index math delegates to the shared pure functions in\n * @mintplayer/web-components/a11y — this directive and the WC RovingFocus\n * controller had independently identical copies that had ALREADY drifted\n * (wrap-vs-clamp default). One implementation, two adapters. The directive\n * keeps its own signals, discovery and activedescendant mode: those are\n * Angular/light-DOM concerns the WC controller rightly lacks.\n *\n * Public so consumers (e.g. BsComboboxDirective's TAB handling) can detect\n * edges without re-implementing the disabled-aware scan.\n */\n firstEnabledIndex(): number {\n const items = this.items();\n return firstEnabledIndex(items.length, (i) => items[i].disabled());\n }\n\n lastEnabledIndex(): number {\n const items = this.items();\n return lastEnabledIndex(items.length, (i) => items[i].disabled());\n }\n\n private step(delta: 1 | -1): void {\n const items = this.items();\n const next = nextEnabledIndex(\n items.length,\n this.activeIndex(),\n delta,\n this.wrap(),\n (i) => items[i].disabled(),\n );\n if (next >= 0) this.moveTo(next);\n }\n\n private moveTo(index: number): void {\n if (index < 0) return;\n this.activeIndex.set(index);\n if (this.mode() === 'tabindex' && this.elementRef.nativeElement.contains(document.activeElement)) {\n this.items()[index]?.elementRef.nativeElement.focus();\n }\n }\n}\n","import { ConfigurableFocusTrap, ConfigurableFocusTrapFactory, InteractivityChecker } from '@angular/cdk/a11y';\nimport { DestroyRef, Directive, effect, ElementRef, inject, input } from '@angular/core';\n\nexport type BsOverlayInitialFocus = HTMLElement | 'first' | 'self' | 'none';\n\n/**\n * Activates a CDK focus trap on the host element while `bsOverlayFocus` is true,\n * captures the trigger before activation, and returns focus to it on deactivation.\n *\n * Initial focus inside the trap defaults to the first tabbable descendant; pass\n * an explicit HTMLElement, 'self' (focus the host), or 'none' to opt out.\n *\n * Background `inert` / `aria-hidden` is intentionally not handled here — it is\n * the consuming component's job (a modal hides app-root, a popover does not).\n */\n@Directive({\n selector: '[bsOverlayFocus]',\n exportAs: 'bsOverlayFocus',\n})\nexport class BsOverlayFocusDirective {\n private elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private trapFactory = inject(ConfigurableFocusTrapFactory);\n private interactivityChecker = inject(InteractivityChecker);\n private destroyRef = inject(DestroyRef);\n\n readonly active = input(true, { alias: 'bsOverlayFocus' });\n readonly initialFocus = input<BsOverlayInitialFocus>('first');\n readonly returnFocus = input(true);\n\n private trap: ConfigurableFocusTrap | null = null;\n private restoreTo: HTMLElement | null = null;\n\n constructor() {\n effect(() => {\n if (this.active()) this.engage();\n else this.disengage();\n });\n\n this.destroyRef.onDestroy(() => this.disengage());\n }\n\n private engage(): void {\n if (this.trap) return;\n\n this.restoreTo = (typeof document !== 'undefined' && document.activeElement instanceof HTMLElement)\n ? document.activeElement\n : null;\n\n this.trap = this.trapFactory.create(this.elementRef.nativeElement);\n\n const target = this.initialFocus();\n if (target instanceof HTMLElement) {\n target.focus({ preventScroll: true });\n } else if (target === 'self') {\n this.elementRef.nativeElement.focus({ preventScroll: true });\n } else if (target === 'first') {\n this.focusFirstTabbable();\n }\n // 'none' — caller manages focus\n }\n\n private focusFirstTabbable(): void {\n // Walk the host's subtree and let CDK decide what's focusable — handles\n // disabled fieldsets, inert ancestors, and the long tail of edge cases\n // the inline selector would have to re-implement.\n //\n // `isFocusable({ ignoreVisibility: true })` because jsdom doesn't lay\n // elements out, so CDK's default visibility check (`getClientRects()`)\n // would reject everything in tests; in real browsers visible elements\n // pass either way. Tabindex < 0 is filtered manually so the host (which\n // we set `tabindex=\"-1\"` on for the focus trap) doesn't get selected.\n const root = this.elementRef.nativeElement;\n const walker = (root.ownerDocument ?? document).createTreeWalker(root, NodeFilter.SHOW_ELEMENT);\n let node: Node | null = walker.currentNode;\n while (node) {\n if (\n node instanceof HTMLElement\n && node.tabIndex >= 0\n // `:disabled` catches both own `disabled` and the inherited form of\n // it from an ancestor `<fieldset disabled>` — CDK's isFocusable only\n // looks at own attributes.\n && !node.matches(':disabled')\n && this.interactivityChecker.isFocusable(node, { ignoreVisibility: true })\n ) {\n node.focus({ preventScroll: true });\n return;\n }\n node = walker.nextNode();\n }\n }\n\n private disengage(): void {\n if (!this.trap) return;\n\n this.trap.destroy();\n this.trap = null;\n\n if (this.returnFocus() && this.restoreTo && typeof document !== 'undefined' && document.contains(this.restoreTo)) {\n // preventScroll so closing an overlay never yanks the page back to the\n // trigger's position — the user's scroll position is their choice.\n this.restoreTo.focus({ preventScroll: true });\n }\n this.restoreTo = null;\n }\n}\n","import { LiveAnnouncer, AriaLivePoliteness } from '@angular/cdk/a11y';\nimport { inject, Injectable } from '@angular/core';\n\n/**\n * Thin wrapper over CDK's LiveAnnouncer that dedupes consecutive identical\n * messages — typeahead-style \"5 results\" announcements often re-fire with the\n * same content and screen readers re-read them, which is noise.\n */\n@Injectable({ providedIn: 'root' })\nexport class BsLiveAnnouncerService {\n private cdk = inject(LiveAnnouncer);\n private last: { message: string; politeness: AriaLivePoliteness } | null = null;\n\n announce(message: string, politeness: AriaLivePoliteness = 'polite', durationMs?: number): Promise<void> {\n if (this.last && this.last.message === message && this.last.politeness === politeness) {\n return Promise.resolve();\n }\n this.last = { message, politeness };\n return this.cdk.announce(message, politeness, durationMs);\n }\n\n clear(): void {\n this.last = null;\n this.cdk.clear();\n }\n}\n","import { Injectable } from '@angular/core';\nimport { dismissStack } from '@mintplayer/web-components/a11y';\n\n/**\n * Angular facade over the document's single dismiss stack, so each overlay can\n * decide whether its global Escape listener should fire.\n *\n * The problem: popover, tooltip, dropdown-menu, priority-nav, and modal each\n * bind a `(document:keydown.escape)` (or equivalent host listener) that closes\n * the overlay unconditionally. With nesting (popover-under-modal,\n * tooltip-under-popover), a single Escape closes both because both handlers\n * fire on the same event.\n *\n * The fix: every overlay calls `push()` when it opens and `release(token)`\n * when it closes; its Escape handler runs only when `isTop(token)` returns\n * true. The top-most overlay consumes Escape; lower frames stay open.\n *\n * **This is now a facade, and that matters.** The state lives in\n * `@mintplayer/web-components/a11y`'s `dismissStack`, shared with\n * `OverlayController`. It used to be a private array here, and the web\n * components had their own — so an Angular overlay wrapping a web-component\n * overlay (`bs-tree-select` inside `bs-modal`, the ordinary case) had one frame\n * on each stack, both believed they were top-most, and one Escape closed both.\n * Angular keeps the DI ergonomics; there is exactly one array.\n *\n * Identity is a per-call `symbol` token rather than a string, so two opens of\n * the same directive don't collide and a stale token can't accidentally match\n * a future frame.\n *\n * **What this does NOT promise:**\n * - **Visual z-order.** The stack tracks logical open-order (the sequence of\n * `push()` calls). A consumer that manually reorders overlays in the DOM\n * could see Escape close a logically-deeper overlay. We don't support that.\n * - **Coordination with non-overlay listeners.** A consumer's own\n * `keydown.escape` listener that doesn't ask the stack will still fire.\n */\n@Injectable({ providedIn: 'root' })\nexport class BsOverlayStackService {\n /** Allocate a new frame on top of the stack and return its token. */\n push(): symbol {\n return dismissStack.push('bs-overlay-frame');\n }\n\n /**\n * Remove `token` from the stack. Releasing a non-top token is allowed —\n * it's how an inner overlay closes itself programmatically without an\n * Escape press (e.g. a popover closed by clicking its trigger again).\n */\n release(token: symbol): void {\n dismissStack.release(token);\n }\n\n /** True if `token` is the top of the stack. */\n isTop(token: symbol): boolean {\n return dismissStack.isTop(token);\n }\n\n /** Token at the top of the stack, or null if empty. */\n peek(): symbol | null {\n return dismissStack.peek();\n }\n}\n","import { Directive, DoCheck, ElementRef, Injector, inject, input } from '@angular/core';\nimport { NgControl, Validators } from '@angular/forms';\n\n/**\n * Mirrors the host form control's validity onto the wrapped web component:\n * `invalid` (only once touched — Bootstrap's own convention, and untouched\n * pristine forms must not scream), `required` (from the control's\n * validators) and, when `[errorMessages]` supplies one, `error-text`. The WC\n * maps them to `aria-invalid`/`aria-required`/`aria-errormessage` +\n * `aria-describedby` on its inner role-bearing input, which is the node screen\n * readers actually read.\n *\n * The attribute lands on the wrapper's first element child — every nested\n * host wrapper renders its `mp-*` element as the template root — NOT on the\n * `bs-*` host, which has no role for AT to read it from.\n *\n * NgControl is resolved lazily via the injector: injecting it in the\n * constructor recurses (NgControl resolution needs the value accessor being\n * constructed). ngDoCheck keeps the mirror live at every CD pass, which is\n * exactly the cadence Angular updates control state at (PRD 11a).\n */\n@Directive({\n selector: '[bsControlValidity]',\n})\nexport class BsControlValidityDirective implements DoCheck {\n private readonly injector = inject(Injector);\n private readonly host = inject(ElementRef) as ElementRef<HTMLElement>;\n /** undefined = not resolved yet; null = no form control on this host. */\n private ngControl: NgControl | null | undefined;\n\n /**\n * Validation messages by `NgControl` error key, e.g.\n * `{ required: 'Pick a fruit.', minlength: 'Too short.' }`.\n *\n * The message for the first active error is written to the WC's `error-text`,\n * which renders it inside the shadow root and points the real control at it.\n * A key with no message simply produces no message, so a consumer can spell out\n * the errors worth announcing and leave the rest to the visible form summary.\n */\n readonly errorMessages = input<Record<string, string> | null>(null);\n\n ngDoCheck(): void {\n if (this.ngControl === undefined) {\n this.ngControl = this.injector.get(NgControl, null);\n }\n const control = this.ngControl;\n const target = this.host.nativeElement.firstElementChild;\n if (!control || !target) return;\n\n const invalid = !!control.invalid && !!control.touched;\n this.mirror(target, 'invalid', invalid ? '' : null);\n\n // requiredTrue is the checkbox-shaped required; hasValidator compares by\n // reference, so both spellings must be probed.\n const required =\n (control.control?.hasValidator(Validators.required) ?? false) ||\n (control.control?.hasValidator(Validators.requiredTrue) ?? false);\n this.mirror(target, 'required', required ? '' : null);\n\n // Tied to the same predicate as `invalid`, not just to `control.invalid`:\n // `aria-errormessage` is only defined while the control is `aria-invalid`, so\n // a message on an untouched control would be a reference to nothing.\n this.mirror(target, 'error-text', invalid ? this.activeMessage(control) : null);\n }\n\n /**\n * The message for the first of the control's active errors that has one.\n * Validators report in the order they were composed, so a required-then-pattern\n * field announces \"required\" until it has a value — the order the user meets\n * them in.\n */\n private activeMessage(control: NgControl): string | null {\n const messages = this.errorMessages();\n if (!messages) return null;\n const key = Object.keys(control.errors ?? {}).find((error) => error in messages);\n return key ? messages[key] : null;\n }\n\n /**\n * Writes only on a real change. `ngDoCheck` runs on every CD pass, and an\n * unconditional `setAttribute` fires the WC's `attributeChangedCallback` even\n * when the value is identical — which now schedules a Lit render, because these\n * attributes have to be live to be correct.\n */\n private mirror(target: Element, name: string, value: string | null): void {\n if (value === null) {\n if (target.hasAttribute(name)) target.removeAttribute(name);\n } else if (target.getAttribute(name) !== value) {\n target.setAttribute(name, value);\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAEA;;;;;;;;;AASG;MAEU,WAAW,CAAA;AADxB,IAAA,WAAA,GAAA;QAEU,IAAA,CAAA,O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0B,EAAA,UAAA,EAAA,CAAA;kBAHtC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,qBAAqB;AAChC,iBAAA;;;ACvBD;;AAEG;;;;"}
@@ -2,6 +2,7 @@ import { NgTemplateOutlet } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
3
  import { inject, TemplateRef, Directive, model, input, contentChild, computed, ChangeDetectionStrategy, Component, contentChildren, forwardRef, viewChild, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
4
4
  export * from '@mintplayer/web-components/accordion';
5
+ import { BsForwardAriaDirective } from '@mintplayer/ng-bootstrap/a11y';
5
6
 
6
7
  /**
7
8
  * `*bsAccordionTabHeader` — declares the header content of the enclosing
@@ -144,11 +145,11 @@ class BsAccordionComponent {
144
145
  this.tabPages()[detail.index]?.isActive.set(detail.active);
145
146
  }
146
147
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
147
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.0", type: BsAccordionComponent, isStandalone: true, selector: "bs-accordion", inputs: { multi: { classPropertyName: "multi", publicName: "multi", isSignal: true, isRequired: false, transformFunction: null }, highlightActiveTab: { classPropertyName: "highlightActiveTab", publicName: "highlightActiveTab", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "tabPages", predicate: i0.forwardRef(() => BsAccordionTabComponent), isSignal: true }], viewQueries: [{ propertyName: "element", first: true, predicate: ["element"], descendants: true, isSignal: true }], ngImport: i0, template: "<mp-accordion\n #element\n [attr.multi]=\"multiAttr()\"\n [attr.highlight-active-tab]=\"highlightActiveTabAttr()\"\n (mp-accordion-tab-toggle)=\"onTabToggle($event)\">\n @for (tab of tabPages(); track tab; let i = $index) {\n <span accordion-header [attr.slot]=\"'h' + i\">\n @if (tab.headerTemplate(); as header) {\n <ng-container [ngTemplateOutlet]=\"header.template\"></ng-container>\n }\n </span>\n }\n <ng-content></ng-content>\n</mp-accordion>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
148
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.0", type: BsAccordionComponent, isStandalone: true, selector: "bs-accordion", inputs: { multi: { classPropertyName: "multi", publicName: "multi", isSignal: true, isRequired: false, transformFunction: null }, highlightActiveTab: { classPropertyName: "highlightActiveTab", publicName: "highlightActiveTab", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "tabPages", predicate: i0.forwardRef(() => BsAccordionTabComponent), isSignal: true }], viewQueries: [{ propertyName: "element", first: true, predicate: ["element"], descendants: true, isSignal: true }], ngImport: i0, template: "<mp-accordion bsForwardAria\n #element\n [attr.multi]=\"multiAttr()\"\n [attr.highlight-active-tab]=\"highlightActiveTabAttr()\"\n (mp-accordion-tab-toggle)=\"onTabToggle($event)\">\n @for (tab of tabPages(); track tab; let i = $index) {\n <span accordion-header [attr.slot]=\"'h' + i\">\n @if (tab.headerTemplate(); as header) {\n <ng-container [ngTemplateOutlet]=\"header.template\"></ng-container>\n }\n </span>\n }\n <ng-content></ng-content>\n</mp-accordion>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: BsForwardAriaDirective, selector: "[bsForwardAria]" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
148
149
  }
149
150
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: BsAccordionComponent, decorators: [{
150
151
  type: Component,
151
- args: [{ selector: 'bs-accordion', changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgTemplateOutlet], schemas: [CUSTOM_ELEMENTS_SCHEMA], template: "<mp-accordion\n #element\n [attr.multi]=\"multiAttr()\"\n [attr.highlight-active-tab]=\"highlightActiveTabAttr()\"\n (mp-accordion-tab-toggle)=\"onTabToggle($event)\">\n @for (tab of tabPages(); track tab; let i = $index) {\n <span accordion-header [attr.slot]=\"'h' + i\">\n @if (tab.headerTemplate(); as header) {\n <ng-container [ngTemplateOutlet]=\"header.template\"></ng-container>\n }\n </span>\n }\n <ng-content></ng-content>\n</mp-accordion>\n", styles: [":host{display:block}\n"] }]
152
+ args: [{ selector: 'bs-accordion', changeDetection: ChangeDetectionStrategy.OnPush, imports: [BsForwardAriaDirective, NgTemplateOutlet], schemas: [CUSTOM_ELEMENTS_SCHEMA], template: "<mp-accordion bsForwardAria\n #element\n [attr.multi]=\"multiAttr()\"\n [attr.highlight-active-tab]=\"highlightActiveTabAttr()\"\n (mp-accordion-tab-toggle)=\"onTabToggle($event)\">\n @for (tab of tabPages(); track tab; let i = $index) {\n <span accordion-header [attr.slot]=\"'h' + i\">\n @if (tab.headerTemplate(); as header) {\n <ng-container [ngTemplateOutlet]=\"header.template\"></ng-container>\n }\n </span>\n }\n <ng-content></ng-content>\n</mp-accordion>\n", styles: [":host{display:block}\n"] }]
152
153
  }], propDecorators: { multi: [{ type: i0.Input, args: [{ isSignal: true, alias: "multi", required: false }] }], highlightActiveTab: [{ type: i0.Input, args: [{ isSignal: true, alias: "highlightActiveTab", required: false }] }], tabPages: [{ type: i0.ContentChildren, args: [forwardRef(() => BsAccordionTabComponent), { isSignal: true }] }], element: [{ type: i0.ViewChild, args: ['element', { isSignal: true }] }] } });
153
154
 
154
155
  /**