@mintplayer/ng-bootstrap 22.31.0 → 22.32.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 (148) hide show
  1. package/README.md +12 -11
  2. package/_bootstrap.scss +2 -4
  3. package/a11y/forms/package.json +4 -0
  4. package/fesm2022/mintplayer-ng-bootstrap-a11y-forms.mjs +120 -0
  5. package/fesm2022/mintplayer-ng-bootstrap-a11y-forms.mjs.map +1 -0
  6. package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs +2 -109
  7. package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs.map +1 -1
  8. package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs +3 -1
  9. package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs.map +1 -1
  10. package/fesm2022/mintplayer-ng-bootstrap-alert.mjs +7 -3
  11. package/fesm2022/mintplayer-ng-bootstrap-alert.mjs.map +1 -1
  12. package/fesm2022/mintplayer-ng-bootstrap-badge.mjs +7 -3
  13. package/fesm2022/mintplayer-ng-bootstrap-badge.mjs.map +1 -1
  14. package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs +12 -5
  15. package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs.map +1 -1
  16. package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs +7 -3
  17. package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs.map +1 -1
  18. package/fesm2022/mintplayer-ng-bootstrap-card.mjs +74 -83
  19. package/fesm2022/mintplayer-ng-bootstrap-card.mjs.map +1 -1
  20. package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs +3 -0
  21. package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs.map +1 -1
  22. package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs +9 -5
  23. package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs.map +1 -1
  24. package/fesm2022/mintplayer-ng-bootstrap-close.mjs +7 -3
  25. package/fesm2022/mintplayer-ng-bootstrap-close.mjs.map +1 -1
  26. package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs +4 -0
  27. package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs.map +1 -1
  28. package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs +4 -2
  29. package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs.map +1 -1
  30. package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs +4 -2
  31. package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs.map +1 -1
  32. package/fesm2022/mintplayer-ng-bootstrap-dropdown-divider.mjs +9 -2
  33. package/fesm2022/mintplayer-ng-bootstrap-dropdown-divider.mjs.map +1 -1
  34. package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs +12 -4
  35. package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs.map +1 -1
  36. package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs +2 -0
  37. package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs.map +1 -1
  38. package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs +1 -1
  39. package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs.map +1 -1
  40. package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs +6 -2
  41. package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs.map +1 -1
  42. package/fesm2022/mintplayer-ng-bootstrap-for.mjs +8 -4
  43. package/fesm2022/mintplayer-ng-bootstrap-for.mjs.map +1 -1
  44. package/fesm2022/mintplayer-ng-bootstrap-form.mjs +7 -2
  45. package/fesm2022/mintplayer-ng-bootstrap-form.mjs.map +1 -1
  46. package/fesm2022/mintplayer-ng-bootstrap-grid.mjs +40 -12
  47. package/fesm2022/mintplayer-ng-bootstrap-grid.mjs.map +1 -1
  48. package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs +3 -1
  49. package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs.map +1 -1
  50. package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs +23 -6
  51. package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs.map +1 -1
  52. package/fesm2022/mintplayer-ng-bootstrap-machine.mjs +16 -4
  53. package/fesm2022/mintplayer-ng-bootstrap-machine.mjs.map +1 -1
  54. package/fesm2022/mintplayer-ng-bootstrap-modal.mjs +23 -7
  55. package/fesm2022/mintplayer-ng-bootstrap-modal.mjs.map +1 -1
  56. package/fesm2022/mintplayer-ng-bootstrap-nav.mjs +93 -0
  57. package/fesm2022/mintplayer-ng-bootstrap-nav.mjs.map +1 -0
  58. package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs +7 -3
  59. package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs.map +1 -1
  60. package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs +43 -1
  61. package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs.map +1 -1
  62. package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs +15 -6
  63. package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs.map +1 -1
  64. package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs +4 -2
  65. package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs.map +1 -1
  66. package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs +7 -4
  67. package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs.map +1 -1
  68. package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs +4 -2
  69. package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs.map +1 -1
  70. package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs +22 -16
  71. package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs.map +1 -1
  72. package/fesm2022/mintplayer-ng-bootstrap-popover.mjs +22 -7
  73. package/fesm2022/mintplayer-ng-bootstrap-popover.mjs.map +1 -1
  74. package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs +13 -6
  75. package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs.map +1 -1
  76. package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs +4 -0
  77. package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs.map +1 -1
  78. package/fesm2022/mintplayer-ng-bootstrap-radio.mjs +9 -5
  79. package/fesm2022/mintplayer-ng-bootstrap-radio.mjs.map +1 -1
  80. package/fesm2022/mintplayer-ng-bootstrap-range.mjs +7 -3
  81. package/fesm2022/mintplayer-ng-bootstrap-range.mjs.map +1 -1
  82. package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs +2 -0
  83. package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs.map +1 -1
  84. package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs +19 -9
  85. package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs.map +1 -1
  86. package/fesm2022/mintplayer-ng-bootstrap-select.mjs +4 -2
  87. package/fesm2022/mintplayer-ng-bootstrap-select.mjs.map +1 -1
  88. package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs +4 -2
  89. package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs.map +1 -1
  90. package/fesm2022/mintplayer-ng-bootstrap-spinner.mjs +25 -11
  91. package/fesm2022/mintplayer-ng-bootstrap-spinner.mjs.map +1 -1
  92. package/fesm2022/mintplayer-ng-bootstrap-sticky-footer.mjs +14 -4
  93. package/fesm2022/mintplayer-ng-bootstrap-sticky-footer.mjs.map +1 -1
  94. package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs +3 -1
  95. package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs.map +1 -1
  96. package/fesm2022/mintplayer-ng-bootstrap-table.mjs +9 -14
  97. package/fesm2022/mintplayer-ng-bootstrap-table.mjs.map +1 -1
  98. package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs +5 -2
  99. package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs.map +1 -1
  100. package/fesm2022/mintplayer-ng-bootstrap-toast.mjs +23 -8
  101. package/fesm2022/mintplayer-ng-bootstrap-toast.mjs.map +1 -1
  102. package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs +7 -3
  103. package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs.map +1 -1
  104. package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs +4 -1
  105. package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs.map +1 -1
  106. package/nav/package.json +4 -0
  107. package/package.json +11 -8
  108. package/types/mintplayer-ng-bootstrap-a11y-forms.d.ts +64 -0
  109. package/types/mintplayer-ng-bootstrap-a11y.d.ts +2 -62
  110. package/types/mintplayer-ng-bootstrap-alert.d.ts +1 -0
  111. package/types/mintplayer-ng-bootstrap-badge.d.ts +1 -0
  112. package/types/mintplayer-ng-bootstrap-breadcrumb.d.ts +2 -0
  113. package/types/mintplayer-ng-bootstrap-button-group.d.ts +1 -0
  114. package/types/mintplayer-ng-bootstrap-card.d.ts +14 -3
  115. package/types/mintplayer-ng-bootstrap-checkbox.d.ts +1 -1
  116. package/types/mintplayer-ng-bootstrap-close.d.ts +1 -0
  117. package/types/mintplayer-ng-bootstrap-datepicker.d.ts +1 -1
  118. package/types/mintplayer-ng-bootstrap-datetime-picker.d.ts +1 -1
  119. package/types/mintplayer-ng-bootstrap-dropdown-divider.d.ts +1 -0
  120. package/types/mintplayer-ng-bootstrap-for.d.ts +5 -5
  121. package/types/mintplayer-ng-bootstrap-form.d.ts +1 -0
  122. package/types/mintplayer-ng-bootstrap-grid.d.ts +14 -0
  123. package/types/mintplayer-ng-bootstrap-list-group.d.ts +15 -8
  124. package/types/mintplayer-ng-bootstrap-machine.d.ts +13 -2
  125. package/types/mintplayer-ng-bootstrap-modal.d.ts +2 -0
  126. package/types/mintplayer-ng-bootstrap-nav.d.ts +52 -0
  127. package/types/mintplayer-ng-bootstrap-navbar-toggler.d.ts +1 -0
  128. package/types/mintplayer-ng-bootstrap-navbar.d.ts +17 -1
  129. package/types/mintplayer-ng-bootstrap-otp-input.d.ts +1 -1
  130. package/types/mintplayer-ng-bootstrap-pagination.d.ts +1 -0
  131. package/types/mintplayer-ng-bootstrap-phone-input.d.ts +1 -1
  132. package/types/mintplayer-ng-bootstrap-placeholder.d.ts +10 -10
  133. package/types/mintplayer-ng-bootstrap-popover.d.ts +3 -0
  134. package/types/mintplayer-ng-bootstrap-progress-bar.d.ts +2 -0
  135. package/types/mintplayer-ng-bootstrap-radio.d.ts +1 -1
  136. package/types/mintplayer-ng-bootstrap-range.d.ts +1 -0
  137. package/types/mintplayer-ng-bootstrap-scrollspy.d.ts +1 -0
  138. package/types/mintplayer-ng-bootstrap-select.d.ts +1 -1
  139. package/types/mintplayer-ng-bootstrap-signature-pad.d.ts +1 -1
  140. package/types/mintplayer-ng-bootstrap-spinner.d.ts +14 -7
  141. package/types/mintplayer-ng-bootstrap-sticky-footer.d.ts +7 -1
  142. package/types/mintplayer-ng-bootstrap-table.d.ts +2 -6
  143. package/types/mintplayer-ng-bootstrap-timepicker.d.ts +1 -1
  144. package/types/mintplayer-ng-bootstrap-toast.d.ts +2 -0
  145. package/container/package.json +0 -4
  146. package/fesm2022/mintplayer-ng-bootstrap-container.mjs +0 -18
  147. package/fesm2022/mintplayer-ng-bootstrap-container.mjs.map +0 -1
  148. package/types/mintplayer-ng-bootstrap-container.d.ts +0 -8
package/README.md CHANGED
@@ -6,17 +6,18 @@ This library was generated with [Nx](https://nx.dev).
6
6
 
7
7
  Run `nx test mintplayer-ng-bootstrap` to execute the unit tests.
8
8
 
9
- ## Styling and encapsulation
9
+ ## Architecture and styling
10
10
 
11
- Most components keep a shadow root and take your content through native slots, so your stylesheets
12
- reach that content normally.
11
+ Each component here is the Angular front of a framework-neutral TypeScript core in
12
+ `@mintplayer/ui-core` (state, keyboard, ARIA, async lifecycles). It renders its own HTML from that
13
+ core. It does **not** wrap or render a web component, so server rendering emits real markup.
13
14
 
14
- ``bs-datatable`, `bs-treeview`, `bs-tree-select` and `bs-query-builder`` mount DOM you author (row / node templates, cell renderers,
15
- editor factories) and therefore render in the **light DOM**, with their own CSS scoped at build time
16
- onto a `data-mps` attribute — the same device Angular uses for `_ngcontent`. Your styles and
17
- Bootstrap's utilities reach anything you render into them; in exchange, page CSS also reaches their
18
- internals, exactly as emulated encapsulation behaves elsewhere. `::part()` and `::slotted()` no
19
- longer address them.
15
+ - **Styles ship per component.** A component installs its own scoped sheet and the Bootstrap partial
16
+ its markup uses, once per page, when it first renders (written into `<head>` during SSR). Your
17
+ global stylesheet loads only the page-level Bootstrap baseline, never component partials. A component
18
+ and its styles can ship in the lazy chunk of the page that uses it.
19
+ - **Light DOM, emulated encapsulation.** No shadow root. The component's CSS is scoped at build time onto
20
+ a `data-mps` attribute, like Angular's `_ngcontent`. Your CSS and Bootstrap's utilities reach anything
21
+ you render into a component, page CSS also reaches its internals, and its own rules cannot leak out.
20
22
 
21
- See **Styling and encapsulation** in the [workspace README](../../README.md) for the full contract
22
- and the migration table.
23
+ See **Styling and encapsulation** in the [workspace README](../../README.md).
package/_bootstrap.scss CHANGED
@@ -1,7 +1,5 @@
1
- // --mp-color-mode (PRD dark-mode D6): the token component sheets query with
2
- // `@container style(--mp-color-mode: dark)`. Must stay the first statement.
3
- @use '@mintplayer/web-components/theming/color-mode.css';
4
- // The Bootstrap baseline, in @layer mp.bootstrap (PRD #437 §6). Shared with the
1
+ // The Bootstrap baseline, in @layer mp.bootstrap (PRD #437 §6), including the
2
+ // --mp-color-mode dark-mode token (PRD dark-mode D6). Shared with the
5
3
  // React and Vue libraries; see libs/mintplayer-ui-core/styles/bootstrap.scss.
6
4
  @use '@mintplayer/ui-core/styles/bootstrap';
7
5
  // CDK a11y utility styles: BsLiveAnnouncerService wraps CDK's LiveAnnouncer,
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../../fesm2022/mintplayer-ng-bootstrap-a11y-forms.mjs",
3
+ "typings": "../../types/mintplayer-ng-bootstrap-a11y-forms.d.ts"
4
+ }
@@ -0,0 +1,120 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, Injector, ElementRef, input, signal, Directive } from '@angular/core';
3
+ import { NgControl, Validators } from '@angular/forms';
4
+
5
+ /**
6
+ * Reads the host form control's validity: `invalid` (only once touched —
7
+ * Bootstrap's own convention, and untouched pristine forms must not scream),
8
+ * `required` (from the control's validators) and, when `[errorMessages]`
9
+ * supplies one, the message for the first active error.
10
+ *
11
+ * A front that renders its own template injects this directive and reads the
12
+ * signals into its core's attribute bags, so `aria-invalid` /
13
+ * `aria-errormessage` / `aria-describedby` land on the role-bearing node it
14
+ * owns. A wrapper that still renders an `mp-*` element as its template root
15
+ * (#437, until that component converts) gets the same state mirrored as the
16
+ * WC's `invalid` / `required` / `error-text` attributes instead.
17
+ *
18
+ * NgControl is resolved lazily via the injector: injecting it in the
19
+ * constructor recurses (NgControl resolution needs the value accessor being
20
+ * constructed). ngDoCheck keeps the state live at every CD pass, which is
21
+ * exactly the cadence Angular updates control state at (PRD 11a); it runs
22
+ * before the host's own view is checked, so the signals are fresh for it.
23
+ */
24
+ class BsControlValidityDirective {
25
+ constructor() {
26
+ this.injector = inject(Injector);
27
+ this.host = inject(ElementRef);
28
+ /**
29
+ * Validation messages by `NgControl` error key, e.g.
30
+ * `{ required: 'Pick a fruit.', minlength: 'Too short.' }`.
31
+ *
32
+ * The message for the first active error becomes the control's error
33
+ * message node. A key with no message simply produces no message, so a
34
+ * consumer can spell out the errors worth announcing and leave the rest to
35
+ * the visible form summary.
36
+ */
37
+ this.errorMessages = input(null, /* @ts-ignore */
38
+ ...(ngDevMode ? [{ debugName: "errorMessages" }] : /* istanbul ignore next */ []));
39
+ this.invalidState = signal(false, /* @ts-ignore */
40
+ ...(ngDevMode ? [{ debugName: "invalidState" }] : /* istanbul ignore next */ []));
41
+ this.requiredState = signal(false, /* @ts-ignore */
42
+ ...(ngDevMode ? [{ debugName: "requiredState" }] : /* istanbul ignore next */ []));
43
+ this.errorTextState = signal(null, /* @ts-ignore */
44
+ ...(ngDevMode ? [{ debugName: "errorTextState" }] : /* istanbul ignore next */ []));
45
+ /** The control is invalid AND touched. */
46
+ this.invalid = this.invalidState.asReadonly();
47
+ this.required = this.requiredState.asReadonly();
48
+ /** Tied to `invalid`: `aria-errormessage` is only defined while the control is `aria-invalid`. */
49
+ this.errorText = this.errorTextState.asReadonly();
50
+ }
51
+ ngDoCheck() {
52
+ if (this.ngControl === undefined) {
53
+ this.ngControl = this.injector.get(NgControl, null);
54
+ }
55
+ const control = this.ngControl;
56
+ if (!control)
57
+ return;
58
+ const invalid = !!control.invalid && !!control.touched;
59
+ // requiredTrue is the checkbox-shaped required; hasValidator compares by
60
+ // reference, so both spellings must be probed.
61
+ const required = (control.control?.hasValidator(Validators.required) ?? false) ||
62
+ (control.control?.hasValidator(Validators.requiredTrue) ?? false);
63
+ const errorText = invalid ? this.activeMessage(control) : null;
64
+ this.invalidState.set(invalid);
65
+ this.requiredState.set(required);
66
+ this.errorTextState.set(errorText);
67
+ const target = this.host.nativeElement.firstElementChild;
68
+ if (target?.localName.includes('-')) {
69
+ this.mirror(target, 'invalid', invalid ? '' : null);
70
+ this.mirror(target, 'required', required ? '' : null);
71
+ this.mirror(target, 'error-text', errorText);
72
+ }
73
+ }
74
+ /**
75
+ * The message for the first of the control's active errors that has one.
76
+ * Validators report in the order they were composed, so a required-then-pattern
77
+ * field announces "required" until it has a value — the order the user meets
78
+ * them in.
79
+ */
80
+ activeMessage(control) {
81
+ const messages = this.errorMessages();
82
+ if (!messages)
83
+ return null;
84
+ const key = Object.keys(control.errors ?? {}).find((error) => error in messages);
85
+ return key ? messages[key] : null;
86
+ }
87
+ /**
88
+ * Writes only on a real change. `ngDoCheck` runs on every CD pass, and an
89
+ * unconditional `setAttribute` fires the WC's `attributeChangedCallback` even
90
+ * when the value is identical — which schedules a Lit render.
91
+ */
92
+ mirror(target, name, value) {
93
+ if (value === null) {
94
+ if (target.hasAttribute(name))
95
+ target.removeAttribute(name);
96
+ }
97
+ else if (target.getAttribute(name) !== value) {
98
+ target.setAttribute(name, value);
99
+ }
100
+ }
101
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsControlValidityDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
102
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.8", type: BsControlValidityDirective, isStandalone: true, selector: "[bsControlValidity]", inputs: { errorMessages: { classPropertyName: "errorMessages", publicName: "errorMessages", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
103
+ }
104
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsControlValidityDirective, decorators: [{
105
+ type: Directive,
106
+ args: [{
107
+ selector: '[bsControlValidity]',
108
+ }]
109
+ }], propDecorators: { errorMessages: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessages", required: false }] }] } });
110
+
111
+ // The a11y helpers that need @angular/forms (#452). A separate entry so that
112
+ // importing `@mintplayer/ng-bootstrap/a11y` (id service, roving focus, overlay
113
+ // focus, …) never pulls @angular/forms into an app's bundle.
114
+
115
+ /**
116
+ * Generated bundle index. Do not edit.
117
+ */
118
+
119
+ export { BsControlValidityDirective };
120
+ //# sourceMappingURL=mintplayer-ng-bootstrap-a11y-forms.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mintplayer-ng-bootstrap-a11y-forms.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/a11y/forms/src/control-validity/control-validity.directive.ts","../../../../libs/mintplayer-ng-bootstrap/a11y/forms/src/index.ts","../../../../libs/mintplayer-ng-bootstrap/a11y/forms/mintplayer-ng-bootstrap-a11y-forms.ts"],"sourcesContent":["import { Directive, DoCheck, ElementRef, Injector, inject, input, signal } from '@angular/core';\nimport { NgControl, Validators } from '@angular/forms';\n\n/**\n * Reads the host form control's validity: `invalid` (only once touched —\n * Bootstrap's own convention, and untouched pristine forms must not scream),\n * `required` (from the control's validators) and, when `[errorMessages]`\n * supplies one, the message for the first active error.\n *\n * A front that renders its own template injects this directive and reads the\n * signals into its core's attribute bags, so `aria-invalid` /\n * `aria-errormessage` / `aria-describedby` land on the role-bearing node it\n * owns. A wrapper that still renders an `mp-*` element as its template root\n * (#437, until that component converts) gets the same state mirrored as the\n * WC's `invalid` / `required` / `error-text` attributes instead.\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 state live at every CD pass, which is\n * exactly the cadence Angular updates control state at (PRD 11a); it runs\n * before the host's own view is checked, so the signals are fresh for it.\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 becomes the control's error\n * message node. A key with no message simply produces no message, so a\n * consumer can spell out the errors worth announcing and leave the rest to\n * the visible form summary.\n */\n readonly errorMessages = input<Record<string, string> | null>(null);\n\n private readonly invalidState = signal(false);\n private readonly requiredState = signal(false);\n private readonly errorTextState = signal<string | null>(null);\n\n /** The control is invalid AND touched. */\n readonly invalid = this.invalidState.asReadonly();\n readonly required = this.requiredState.asReadonly();\n /** Tied to `invalid`: `aria-errormessage` is only defined while the control is `aria-invalid`. */\n readonly errorText = this.errorTextState.asReadonly();\n\n ngDoCheck(): void {\n if (this.ngControl === undefined) {\n this.ngControl = this.injector.get(NgControl, null);\n }\n const control = this.ngControl;\n if (!control) return;\n\n const invalid = !!control.invalid && !!control.touched;\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 const errorText = invalid ? this.activeMessage(control) : null;\n\n this.invalidState.set(invalid);\n this.requiredState.set(required);\n this.errorTextState.set(errorText);\n\n const target = this.host.nativeElement.firstElementChild;\n if (target?.localName.includes('-')) {\n this.mirror(target, 'invalid', invalid ? '' : null);\n this.mirror(target, 'required', required ? '' : null);\n this.mirror(target, 'error-text', errorText);\n }\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 schedules a Lit render.\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","// The a11y helpers that need @angular/forms (#452). A separate entry so that\n// importing `@mintplayer/ng-bootstrap/a11y` (id service, roving focus, overlay\n// focus, …) never pulls @angular/forms into an app's bundle.\nexport * from './control-validity/control-validity.directive';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAGA;;;;;;;;;;;;;;;;;;AAkBG;MAIU,0BAA0B,CAAA;AAHvC,IAAA,WAAA,GAAA;AAImB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3B,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,UAAU,CAA4B;AAIrE;;;;;;;;AAQG;QACM,IAAA,CAAA,aAAa,GAAG,KAAK,CAAgC,IAAI;0FAAC;QAElD,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,KAAK;yFAAC;QAC5B,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,KAA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qBAAA,EAAA,MAAA,EAAA,EAAA,aAAA,EAAA,EAAA,iBAAA,EAAA,eAAA,EAAA,UAAA,EAAA,eAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAA1B,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAHtC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,qBAAqB;AAChC,iBAAA;;;ACxBD;AACA;AACA;;ACFA;;AAEG;;;;"}
@@ -1,10 +1,9 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, inject, ElementRef, PLATFORM_ID, DestroyRef, afterNextRender, Directive, forwardRef, input, signal, computed, contentChildren, effect, Injector } from '@angular/core';
2
+ import { Injectable, inject, ElementRef, PLATFORM_ID, DestroyRef, afterNextRender, Directive, forwardRef, input, signal, computed, contentChildren, effect } from '@angular/core';
3
3
  import { isPlatformServer } from '@angular/common';
4
4
  import { firstEnabledIndex, lastEnabledIndex, nextEnabledIndex } from '@mintplayer/ui-core/roving';
5
5
  import { ConfigurableFocusTrapFactory, InteractivityChecker, LiveAnnouncer } from '@angular/cdk/a11y';
6
6
  import { dismissStack } from '@mintplayer/ui-core/overlay';
7
- import { NgControl, Validators } from '@angular/forms';
8
7
 
9
8
  /**
10
9
  * App-wide unique ID generator for ARIA wiring (`aria-controls`,
@@ -561,112 +560,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
561
560
  args: [{ providedIn: 'root' }]
562
561
  }] });
563
562
 
564
- /**
565
- * Reads the host form control's validity: `invalid` (only once touched —
566
- * Bootstrap's own convention, and untouched pristine forms must not scream),
567
- * `required` (from the control's validators) and, when `[errorMessages]`
568
- * supplies one, the message for the first active error.
569
- *
570
- * A front that renders its own template injects this directive and reads the
571
- * signals into its core's attribute bags, so `aria-invalid` /
572
- * `aria-errormessage` / `aria-describedby` land on the role-bearing node it
573
- * owns. A wrapper that still renders an `mp-*` element as its template root
574
- * (#437, until that component converts) gets the same state mirrored as the
575
- * WC's `invalid` / `required` / `error-text` attributes instead.
576
- *
577
- * NgControl is resolved lazily via the injector: injecting it in the
578
- * constructor recurses (NgControl resolution needs the value accessor being
579
- * constructed). ngDoCheck keeps the state live at every CD pass, which is
580
- * exactly the cadence Angular updates control state at (PRD 11a); it runs
581
- * before the host's own view is checked, so the signals are fresh for it.
582
- */
583
- class BsControlValidityDirective {
584
- constructor() {
585
- this.injector = inject(Injector);
586
- this.host = inject(ElementRef);
587
- /**
588
- * Validation messages by `NgControl` error key, e.g.
589
- * `{ required: 'Pick a fruit.', minlength: 'Too short.' }`.
590
- *
591
- * The message for the first active error becomes the control's error
592
- * message node. A key with no message simply produces no message, so a
593
- * consumer can spell out the errors worth announcing and leave the rest to
594
- * the visible form summary.
595
- */
596
- this.errorMessages = input(null, /* @ts-ignore */
597
- ...(ngDevMode ? [{ debugName: "errorMessages" }] : /* istanbul ignore next */ []));
598
- this.invalidState = signal(false, /* @ts-ignore */
599
- ...(ngDevMode ? [{ debugName: "invalidState" }] : /* istanbul ignore next */ []));
600
- this.requiredState = signal(false, /* @ts-ignore */
601
- ...(ngDevMode ? [{ debugName: "requiredState" }] : /* istanbul ignore next */ []));
602
- this.errorTextState = signal(null, /* @ts-ignore */
603
- ...(ngDevMode ? [{ debugName: "errorTextState" }] : /* istanbul ignore next */ []));
604
- /** The control is invalid AND touched. */
605
- this.invalid = this.invalidState.asReadonly();
606
- this.required = this.requiredState.asReadonly();
607
- /** Tied to `invalid`: `aria-errormessage` is only defined while the control is `aria-invalid`. */
608
- this.errorText = this.errorTextState.asReadonly();
609
- }
610
- ngDoCheck() {
611
- if (this.ngControl === undefined) {
612
- this.ngControl = this.injector.get(NgControl, null);
613
- }
614
- const control = this.ngControl;
615
- if (!control)
616
- return;
617
- const invalid = !!control.invalid && !!control.touched;
618
- // requiredTrue is the checkbox-shaped required; hasValidator compares by
619
- // reference, so both spellings must be probed.
620
- const required = (control.control?.hasValidator(Validators.required) ?? false) ||
621
- (control.control?.hasValidator(Validators.requiredTrue) ?? false);
622
- const errorText = invalid ? this.activeMessage(control) : null;
623
- this.invalidState.set(invalid);
624
- this.requiredState.set(required);
625
- this.errorTextState.set(errorText);
626
- const target = this.host.nativeElement.firstElementChild;
627
- if (target?.localName.includes('-')) {
628
- this.mirror(target, 'invalid', invalid ? '' : null);
629
- this.mirror(target, 'required', required ? '' : null);
630
- this.mirror(target, 'error-text', errorText);
631
- }
632
- }
633
- /**
634
- * The message for the first of the control's active errors that has one.
635
- * Validators report in the order they were composed, so a required-then-pattern
636
- * field announces "required" until it has a value — the order the user meets
637
- * them in.
638
- */
639
- activeMessage(control) {
640
- const messages = this.errorMessages();
641
- if (!messages)
642
- return null;
643
- const key = Object.keys(control.errors ?? {}).find((error) => error in messages);
644
- return key ? messages[key] : null;
645
- }
646
- /**
647
- * Writes only on a real change. `ngDoCheck` runs on every CD pass, and an
648
- * unconditional `setAttribute` fires the WC's `attributeChangedCallback` even
649
- * when the value is identical — which schedules a Lit render.
650
- */
651
- mirror(target, name, value) {
652
- if (value === null) {
653
- if (target.hasAttribute(name))
654
- target.removeAttribute(name);
655
- }
656
- else if (target.getAttribute(name) !== value) {
657
- target.setAttribute(name, value);
658
- }
659
- }
660
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsControlValidityDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
661
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.8", type: BsControlValidityDirective, isStandalone: true, selector: "[bsControlValidity]", inputs: { errorMessages: { classPropertyName: "errorMessages", publicName: "errorMessages", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
662
- }
663
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsControlValidityDirective, decorators: [{
664
- type: Directive,
665
- args: [{
666
- selector: '[bsControlValidity]',
667
- }]
668
- }], propDecorators: { errorMessages: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessages", required: false }] }] } });
669
-
670
563
  /**
671
564
  * Collects a front's host attributes that belong on its role-bearing inner
672
565
  * node: `aria-*` are copied (harmless on a roleless host), `id` and `tabindex`
@@ -688,5 +581,5 @@ function takeHostAria(host) {
688
581
  * Generated bundle index. Do not edit.
689
582
  */
690
583
 
691
- export { BsControlValidityDirective, BsForwardAriaDirective, BsIdService, BsLiveAnnouncerService, BsOverlayFocusDirective, BsOverlayStackService, BsRovingFocusDirective, BsRovingFocusItemDirective, takeHostAria };
584
+ export { BsForwardAriaDirective, BsIdService, BsLiveAnnouncerService, BsOverlayFocusDirective, BsOverlayStackService, BsRovingFocusDirective, BsRovingFocusItemDirective, takeHostAria };
692
585
  //# 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/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/src/host-aria/take-host-aria.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 * - Sets the host `tabindex` (0 if active, -1 otherwise).\n * - Toggles the `.bs-rovingfocus-active` class so SCSS can paint a highlight\n * on the active item.\n * - Auto-generates an `id` if the host doesn't already have one, so other\n * ARIA references always have 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 an ARIA reference to the item has a stable target.\n *\n * Backed by a signal so a consumer computed that reads it re-runs when the id\n * is resolved post-mount. A plain `nativeElement.id` getter would be silently\n * cached during the first computation and never re-read.\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(() => (this.isActive() ? 0 : -1));\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 // Then publish the 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/ui-core/roving';\nimport { BsRovingFocusItemDirective } from './roving-focus-item.directive';\n\nexport type BsRovingFocusOrientation = 'vertical' | 'horizontal' | 'both';\n\n/**\n * APG roving-tabindex container.\n *\n * Place on a list/menu/tablist; 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. Only\n * the active item has `tabindex=\"0\"`; real DOM focus moves.\n *\n * The former `activedescendant` mode (focus parked on a combobox input) was\n * removed with the typeahead's move to its headless core (#436 D10): the\n * typeahead core owns that keyboard model, and nothing else used the mode.\n *\n * Consumers that need to react to the active item externally read\n * `activeIndex()` (signal).\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 wrap = input(true);\n\n readonly items = contentChildren(BsRovingFocusItemDirective);\n readonly activeIndex = signal(0);\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/ui-core/roving — 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 and discovery: those are Angular/light-DOM concerns\n * the WC controller rightly lacks.\n *\n * Public so consumers can detect edges without re-implementing the\n * 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.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/ui-core/overlay';\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/ui-core/overlay`'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, signal } from '@angular/core';\nimport { NgControl, Validators } from '@angular/forms';\n\n/**\n * Reads the host form control's validity: `invalid` (only once touched —\n * Bootstrap's own convention, and untouched pristine forms must not scream),\n * `required` (from the control's validators) and, when `[errorMessages]`\n * supplies one, the message for the first active error.\n *\n * A front that renders its own template injects this directive and reads the\n * signals into its core's attribute bags, so `aria-invalid` /\n * `aria-errormessage` / `aria-describedby` land on the role-bearing node it\n * owns. A wrapper that still renders an `mp-*` element as its template root\n * (#437, until that component converts) gets the same state mirrored as the\n * WC's `invalid` / `required` / `error-text` attributes instead.\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 state live at every CD pass, which is\n * exactly the cadence Angular updates control state at (PRD 11a); it runs\n * before the host's own view is checked, so the signals are fresh for it.\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 becomes the control's error\n * message node. A key with no message simply produces no message, so a\n * consumer can spell out the errors worth announcing and leave the rest to\n * the visible form summary.\n */\n readonly errorMessages = input<Record<string, string> | null>(null);\n\n private readonly invalidState = signal(false);\n private readonly requiredState = signal(false);\n private readonly errorTextState = signal<string | null>(null);\n\n /** The control is invalid AND touched. */\n readonly invalid = this.invalidState.asReadonly();\n readonly required = this.requiredState.asReadonly();\n /** Tied to `invalid`: `aria-errormessage` is only defined while the control is `aria-invalid`. */\n readonly errorText = this.errorTextState.asReadonly();\n\n ngDoCheck(): void {\n if (this.ngControl === undefined) {\n this.ngControl = this.injector.get(NgControl, null);\n }\n const control = this.ngControl;\n if (!control) return;\n\n const invalid = !!control.invalid && !!control.touched;\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 const errorText = invalid ? this.activeMessage(control) : null;\n\n this.invalidState.set(invalid);\n this.requiredState.set(required);\n this.errorTextState.set(errorText);\n\n const target = this.host.nativeElement.firstElementChild;\n if (target?.localName.includes('-')) {\n this.mirror(target, 'invalid', invalid ? '' : null);\n this.mirror(target, 'required', required ? '' : null);\n this.mirror(target, 'error-text', errorText);\n }\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 schedules a Lit render.\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 * Collects a front's host attributes that belong on its role-bearing inner\n * node: `aria-*` are copied (harmless on a roleless host), `id` and `tabindex`\n * are moved, so the id is not duplicated and the host is not a second tab stop.\n *\n * Call it in the constructor: host attributes are present by then on both the\n * server and the client, so the SSR output already carries them where AT reads\n * them, and hydration sees identical DOM.\n */\nexport function takeHostAria(host: HTMLElement): Record<string, string> {\n const bag: Record<string, string> = Object.fromEntries(\n Array.from(host.attributes)\n .filter(({ name }) => name.startsWith('aria-') || name === 'id' || name === 'tabindex')\n .map(({ name, value }) => [name, value]),\n );\n ['id', 'tabindex'].filter((name) => name in bag).map((name) => host.removeAttribute(name));\n return bag;\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,OAAO,GAAG,CAAC;AAMpB,IAAA;;AAHC,IAAA,IAAI,CAAC,MAAc,EAAA;QACjB,OAAO,CAAA,EAAG,MAAM,CAAA,CAAA,EAAI,EAAE,IAAI,CAAC,OAAO,EAAE;IACtC;8GANW,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAX,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,cADE,MAAM,EAAA,CAAA,CAAA;;2FACnB,WAAW,EAAA,UAAA,EAAA,CAAA;kBADvB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACDlC;;;;;;;;;;;;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AI,IAAI,KAAK,UAAU;AACrF,SAAA,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAC3C;AACD,IAAA,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,IAAI,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;AAC1F,IAAA,OAAO,GAAG;AACZ;;ACjBA;;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/host-aria/take-host-aria.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 * - Sets the host `tabindex` (0 if active, -1 otherwise).\n * - Toggles the `.bs-rovingfocus-active` class so SCSS can paint a highlight\n * on the active item.\n * - Auto-generates an `id` if the host doesn't already have one, so other\n * ARIA references always have 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 an ARIA reference to the item has a stable target.\n *\n * Backed by a signal so a consumer computed that reads it re-runs when the id\n * is resolved post-mount. A plain `nativeElement.id` getter would be silently\n * cached during the first computation and never re-read.\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(() => (this.isActive() ? 0 : -1));\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 // Then publish the 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/ui-core/roving';\nimport { BsRovingFocusItemDirective } from './roving-focus-item.directive';\n\nexport type BsRovingFocusOrientation = 'vertical' | 'horizontal' | 'both';\n\n/**\n * APG roving-tabindex container.\n *\n * Place on a list/menu/tablist; 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. Only\n * the active item has `tabindex=\"0\"`; real DOM focus moves.\n *\n * The former `activedescendant` mode (focus parked on a combobox input) was\n * removed with the typeahead's move to its headless core (#436 D10): the\n * typeahead core owns that keyboard model, and nothing else used the mode.\n *\n * Consumers that need to react to the active item externally read\n * `activeIndex()` (signal).\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 wrap = input(true);\n\n readonly items = contentChildren(BsRovingFocusItemDirective);\n readonly activeIndex = signal(0);\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/ui-core/roving — 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 and discovery: those are Angular/light-DOM concerns\n * the WC controller rightly lacks.\n *\n * Public so consumers can detect edges without re-implementing the\n * 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.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/ui-core/overlay';\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/ui-core/overlay`'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","/**\n * Collects a front's host attributes that belong on its role-bearing inner\n * node: `aria-*` are copied (harmless on a roleless host), `id` and `tabindex`\n * are moved, so the id is not duplicated and the host is not a second tab stop.\n *\n * Call it in the constructor: host attributes are present by then on both the\n * server and the client, so the SSR output already carries them where AT reads\n * them, and hydration sees identical DOM.\n */\nexport function takeHostAria(host: HTMLElement): Record<string, string> {\n const bag: Record<string, string> = Object.fromEntries(\n Array.from(host.attributes)\n .filter(({ name }) => name.startsWith('aria-') || name === 'id' || name === 'tabindex')\n .map(({ name, value }) => [name, value]),\n );\n ['id', 'tabindex'].filter((name) => name in bag).map((name) => host.removeAttribute(name));\n return bag;\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,OAAO,GAAG,CAAC;AAMpB,IAAA;;AAHC,IAAA,IAAI,CAAC,MAAc,EAAA;QACjB,OAAO,CAAA,EAAG,MAAM,CAAA,CAAA,EAAI,EAAE,IAAI,CAAC,OAAO,EAAE;IACtC;8GANW,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAX,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,cADE,MAAM,EAAA,CAAA,CAAA;;2FACnB,WAAW,EAAA,UAAA,EAAA,CA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CAAA,CAAA;AAArB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,cADR,MAAM,EAAA,CAAA,CAAA;;2FACnB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBADjC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACpClC;;;;;;;;AAQG;AACG,SAAU,YAAY,CAAC,IAAiB,EAAA;AAC5C,IAAA,MAAM,GAAG,GAA2B,MAAM,CAAC,WAAW,CACpD,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU;SACvB,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,UAAU;AACrF,SAAA,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAC3C;AACD,IAAA,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,IAAI,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;AAC1F,IAAA,OAAO,GAAG;AACZ;;ACjBA;;AAEG;;;;"}
@@ -1,8 +1,9 @@
1
+ import { bootstrapAccordion } from '@mintplayer/ui-core/bootstrap/accordion';
1
2
  import { NgTemplateOutlet } from '@angular/common';
2
3
  import * as i0 from '@angular/core';
3
4
  import { inject, TemplateRef, Directive, model, input, contentChild, viewChild, computed, ChangeDetectionStrategy, Component, contentChildren, forwardRef, ElementRef, DestroyRef } from '@angular/core';
4
5
  import { BsIdService } from '@mintplayer/ng-bootstrap/a11y';
5
- import { useScopedStyles, MpPropsDirective } from '@mintplayer/ng-bootstrap/machine';
6
+ import { useBootstrap, useScopedStyles, MpPropsDirective } from '@mintplayer/ng-bootstrap/machine';
6
7
  import { connectAccordion, connectAccordionTab, ACCORDION_SCOPE, accordionScopedStyles, accordionToggled, closeAccordion, accordionRows, accordionSummaryClick, accordionKeydown } from '@mintplayer/ui-core/accordion';
7
8
 
8
9
  /**
@@ -120,6 +121,7 @@ class BsAccordionComponent {
120
121
  ...(ngDevMode ? [{ debugName: "root" }] : /* istanbul ignore next */ []));
121
122
  this.views = computed(() => this.tabPages().map((tab, index) => connectAccordionTab(this.options(), index, { disabled: tab.disabled() })), /* @ts-ignore */
122
123
  ...(ngDevMode ? [{ debugName: "views" }] : /* istanbul ignore next */ []));
124
+ useBootstrap(bootstrapAccordion);
123
125
  useScopedStyles(ACCORDION_SCOPE, accordionScopedStyles);
124
126
  // `toggle` does not bubble, so a host listener never hears it: one
125
127
  // capture-phase listener on the root hears every row.