@mintplayer/ng-bootstrap 22.24.0 → 22.26.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 (25) hide show
  1. package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs +27 -48
  2. package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs.map +1 -1
  3. package/fesm2022/mintplayer-ng-bootstrap-badge.mjs +11 -1
  4. package/fesm2022/mintplayer-ng-bootstrap-badge.mjs.map +1 -1
  5. package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs +0 -1
  6. package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs.map +1 -1
  7. package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs +7 -19
  8. package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs.map +1 -1
  9. package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs +6 -160
  10. package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs.map +1 -1
  11. package/fesm2022/mintplayer-ng-bootstrap-machine.mjs +102 -0
  12. package/fesm2022/mintplayer-ng-bootstrap-machine.mjs.map +1 -0
  13. package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs +1 -1
  14. package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs.map +1 -1
  15. package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs +250 -103
  16. package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs.map +1 -1
  17. package/machine/package.json +4 -0
  18. package/package.json +7 -2
  19. package/types/mintplayer-ng-bootstrap-a11y.d.ts +23 -34
  20. package/types/mintplayer-ng-bootstrap-code-snippet.d.ts +0 -1
  21. package/types/mintplayer-ng-bootstrap-datatable.d.ts +7 -0
  22. package/types/mintplayer-ng-bootstrap-dropdown-menu.d.ts +6 -18
  23. package/types/mintplayer-ng-bootstrap-dropdown.d.ts +2 -48
  24. package/types/mintplayer-ng-bootstrap-machine.d.ts +54 -0
  25. package/types/mintplayer-ng-bootstrap-typeahead.d.ts +141 -32
@@ -162,14 +162,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
162
162
  /**
163
163
  * One marker per focusable child of a `bsRovingFocus` container.
164
164
  *
165
- * - Mirrors the parent's mode into the host `tabindex` (0 if active in
166
- * `tabindex` mode, -1 otherwise).
167
- * - Toggles the `.bs-rovingfocus-active` class so SCSS can paint a focused-
168
- * look highlight on the active item — important in `activedescendant`
169
- * mode, where the item never receives `:focus` and the browser's focus
170
- * ring never paints.
171
- * - Auto-generates an `id` if the host doesn't already have one, so combobox
172
- * `aria-activedescendant` always has a stable target. Honours an
165
+ * - Sets the host `tabindex` (0 if active, -1 otherwise).
166
+ * - Toggles the `.bs-rovingfocus-active` class so SCSS can paint a highlight
167
+ * on the active item.
168
+ * - Auto-generates an `id` if the host doesn't already have one, so other
169
+ * ARIA references always have a stable target. Honours an
173
170
  * externally-supplied id when present.
174
171
  *
175
172
  * Consumers normally don't interact with this directive directly — they
@@ -188,13 +185,11 @@ class BsRovingFocusItemDirective {
188
185
  /**
189
186
  * The host element's id. Honoured if set externally (e.g. by a sibling
190
187
  * component's [attr.id] host binding); otherwise generated in afterNextRender
191
- * so combobox-style aria-activedescendant has a stable target.
188
+ * so an ARIA reference to the item has a stable target.
192
189
  *
193
- * Backed by a signal so parent computeds (like BsRovingFocusDirective's
194
- * activeDescendantId) re-run when the id is resolved post-mount. A plain
195
- * `nativeElement.id` getter would be silently cached during the first
196
- * computation and never re-read — leading to aria-activedescendant="" on
197
- * combobox inputs even after the items got real ids.
190
+ * Backed by a signal so a consumer computed that reads it re-runs when the id
191
+ * is resolved post-mount. A plain `nativeElement.id` getter would be silently
192
+ * cached during the first computation and never re-read.
198
193
  */
199
194
  this._itemId = signal('', /* @ts-ignore */
200
195
  ...(ngDevMode ? [{ debugName: "_itemId" }] : /* istanbul ignore next */ []));
@@ -202,16 +197,11 @@ class BsRovingFocusItemDirective {
202
197
  ...(ngDevMode ? [{ debugName: "index" }] : /* istanbul ignore next */ []));
203
198
  this.isActive = computed(() => this.index() === this.parent.activeIndex(), /* @ts-ignore */
204
199
  ...(ngDevMode ? [{ debugName: "isActive" }] : /* istanbul ignore next */ []));
205
- this.tabindex = computed(() => {
206
- if (this.parent.mode() === 'activedescendant')
207
- return -1;
208
- return this.isActive() ? 0 : -1;
209
- }, /* @ts-ignore */
200
+ this.tabindex = computed(() => (this.isActive() ? 0 : -1), /* @ts-ignore */
210
201
  ...(ngDevMode ? [{ debugName: "tabindex" }] : /* istanbul ignore next */ []));
211
202
  // After the first render, all sibling host bindings on this element have applied.
212
- // If no other directive (e.g. BsDropdownItemComponent) supplied an id, generate one
213
- // so the parent's activeDescendantId() has a stable target. Then publish the
214
- // resolved id to the signal so reactive consumers see it.
203
+ // If no other directive (e.g. BsDropdownItemComponent) supplied an id, generate one.
204
+ // Then publish the resolved id to the signal so reactive consumers see it.
215
205
  afterNextRender(() => {
216
206
  if (!this.elementRef.nativeElement.id) {
217
207
  this.elementRef.nativeElement.id = this.ids.next('bs-rovingitem');
@@ -239,42 +229,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
239
229
  }], ctorParameters: () => [], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
240
230
 
241
231
  /**
242
- * APG roving-tabindex / active-descendant container.
232
+ * APG roving-tabindex container.
243
233
  *
244
- * Place on a list/menu/listbox; mark each focusable child with
234
+ * Place on a list/menu/tablist; mark each focusable child with
245
235
  * `bsRovingFocusItem`. Arrow keys, Home, and End move the active item; the
246
- * directive auto-handles disabled items, wrap-around, and orientation.
236
+ * directive auto-handles disabled items, wrap-around, and orientation. Only
237
+ * the active item has `tabindex="0"`; real DOM focus moves.
247
238
  *
248
- * Two modes:
249
- * - **`tabindex`** (default) — only the active item has `tabindex="0"`; real
250
- * DOM focus moves. Right for menus, treeviews, tablists.
251
- * - **`activedescendant`** — items keep `tabindex="-1"`; DOM focus stays on
252
- * an external owner (e.g. a combobox `<input>`) which mirrors the active
253
- * item's id via `aria-activedescendant`. Right for comboboxes/listboxes
254
- * where the user is also typing.
239
+ * The former `activedescendant` mode (focus parked on a combobox input) was
240
+ * removed with the typeahead's move to its headless core (#436 D10): the
241
+ * typeahead core owns that keyboard model, and nothing else used the mode.
255
242
  *
256
243
  * Consumers that need to react to the active item externally read
257
- * `activeIndex()` (signal) or `activeDescendantId()` (computed).
244
+ * `activeIndex()` (signal).
258
245
  */
259
246
  class BsRovingFocusDirective {
260
247
  constructor() {
261
248
  this.elementRef = inject(ElementRef);
262
249
  this.orientation = input('vertical', /* @ts-ignore */
263
250
  ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
264
- this.mode = input('tabindex', /* @ts-ignore */
265
- ...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
266
251
  this.wrap = input(true, /* @ts-ignore */
267
252
  ...(ngDevMode ? [{ debugName: "wrap" }] : /* istanbul ignore next */ []));
268
253
  this.items = contentChildren(BsRovingFocusItemDirective, /* @ts-ignore */
269
254
  ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
270
255
  this.activeIndex = signal(0, /* @ts-ignore */
271
256
  ...(ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []));
272
- this.activeDescendantId = computed(() => {
273
- if (this.mode() !== 'activedescendant')
274
- return null;
275
- return this.items()[this.activeIndex()]?.itemId ?? null;
276
- }, /* @ts-ignore */
277
- ...(ngDevMode ? [{ debugName: "activeDescendantId" }] : /* istanbul ignore next */ []));
278
257
  }
279
258
  focusFirst() {
280
259
  this.moveTo(this.firstEnabledIndex());
@@ -348,11 +327,11 @@ class BsRovingFocusDirective {
348
327
  * @mintplayer/web-components/a11y — this directive and the WC RovingFocus
349
328
  * controller had independently identical copies that had ALREADY drifted
350
329
  * (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.
330
+ * keeps its own signals and discovery: those are Angular/light-DOM concerns
331
+ * the WC controller rightly lacks.
353
332
  *
354
- * Public so consumers (e.g. BsComboboxDirective's TAB handling) can detect
355
- * edges without re-implementing the disabled-aware scan.
333
+ * Public so consumers can detect edges without re-implementing the
334
+ * disabled-aware scan.
356
335
  */
357
336
  firstEnabledIndex() {
358
337
  const items = this.items();
@@ -372,12 +351,12 @@ class BsRovingFocusDirective {
372
351
  if (index < 0)
373
352
  return;
374
353
  this.activeIndex.set(index);
375
- if (this.mode() === 'tabindex' && this.elementRef.nativeElement.contains(document.activeElement)) {
354
+ if (this.elementRef.nativeElement.contains(document.activeElement)) {
376
355
  this.items()[index]?.elementRef.nativeElement.focus();
377
356
  }
378
357
  }
379
358
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsRovingFocusDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
380
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "22.0.8", type: BsRovingFocusDirective, isStandalone: true, selector: "[bsRovingFocus]", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, wrap: { classPropertyName: "wrap", publicName: "wrap", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "keydown": "onKeydown($event)" } }, queries: [{ propertyName: "items", predicate: BsRovingFocusItemDirective, isSignal: true }], exportAs: ["bsRovingFocus"], ngImport: i0 }); }
359
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "22.0.8", type: BsRovingFocusDirective, isStandalone: true, selector: "[bsRovingFocus]", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, wrap: { classPropertyName: "wrap", publicName: "wrap", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "keydown": "onKeydown($event)" } }, queries: [{ propertyName: "items", predicate: BsRovingFocusItemDirective, isSignal: true }], exportAs: ["bsRovingFocus"], ngImport: i0 }); }
381
360
  }
382
361
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsRovingFocusDirective, decorators: [{
383
362
  type: Directive,
@@ -388,7 +367,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
388
367
  '(keydown)': 'onKeydown($event)',
389
368
  },
390
369
  }]
391
- }], propDecorators: { orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], wrap: [{ type: i0.Input, args: [{ isSignal: true, alias: "wrap", required: false }] }], items: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => BsRovingFocusItemDirective), { isSignal: true }] }] } });
370
+ }], propDecorators: { orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], wrap: [{ type: i0.Input, args: [{ isSignal: true, alias: "wrap", required: false }] }], items: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => BsRovingFocusItemDirective), { isSignal: true }] }] } });
392
371
 
393
372
  /**
394
373
  * Activates a CDK focus trap on the host element while `bsOverlayFocus` is true,
@@ -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/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,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,WAA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AAG,QAAQ,CAAC,GAAG,CAAC,GAAG,IAAI;IACnC;AAEA;;;;;AAKG;AACK,IAAA,MAAM,CAAC,MAAe,EAAE,IAAY,EAAE,KAAoB,EAAA;AAChE,QAAA,IAAI,KAAK,KAAK,IAAI,EAAE;AAClB,YAAA,IAAI,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC;AAAE,gBAAA,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC;QAC7D;aAAO,IAAI,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,KAAK,EAAE;AAC9C,YAAA,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,KAAK,CAAC;QAClC;IACF;8GAlEW,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAA1B,0BAA0B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,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;;;ACvBD;;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 * - 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/web-components/a11y';\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/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 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/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,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCG;MAIU,sBAAsB,CAAA;;aAYT,IAAA,CAAA,KAAK,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,UAAU,CAA5B,CAAuC;AAEpE;;;;;;;;;;;;;;;;AAgBG;aACqB,IAAA,CAAA,SAAS,GAAG,cAAH,CAAkB;AAEnD,IAAA,WAAA,GAAA;AAhCiB,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,aAA4B;AACzE;;;;AA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2,6 +2,16 @@ import * as i0 from '@angular/core';
2
2
  import { input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { Color } from '@mintplayer/ng-bootstrap';
4
4
 
5
+ // `.badge` paints white text, and `bg-{color}` sets only the background: white
6
+ // on warning was 1.63:1. Bootstrap's `text-bg-{color}` pairs each theme colour
7
+ // with the text colour color-contrast() picks (black on warning, info and light).
8
+ // It exists for the eight theme colours only; the other three pair a background
9
+ // with a text utility, the way `<bs-card [color]>` colours them.
10
+ const pairedColorClasses = {
11
+ [Color.body]: 'bg-body text-body',
12
+ [Color.white]: 'bg-white text-black',
13
+ [Color.transparent]: 'bg-transparent text-reset',
14
+ };
5
15
  class BsBadgeComponent {
6
16
  constructor() {
7
17
  this.colors = Color;
@@ -16,7 +26,7 @@ class BsBadgeComponent {
16
26
  /** Purely decorative badges leave the accessibility tree entirely. */
17
27
  this.decorative = input(false, /* @ts-ignore */
18
28
  ...(ngDevMode ? [{ debugName: "decorative" }] : /* istanbul ignore next */ []));
19
- this.colorClass = computed(() => `bg-${this.colors[this.type()]}`, /* @ts-ignore */
29
+ this.colorClass = computed(() => pairedColorClasses[this.type()] ?? `text-bg-${this.colors[this.type()]}`, /* @ts-ignore */
20
30
  ...(ngDevMode ? [{ debugName: "colorClass" }] : /* istanbul ignore next */ []));
21
31
  }
22
32
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsBadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
@@ -1 +1 @@
1
- {"version":3,"file":"mintplayer-ng-bootstrap-badge.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/badge/src/badge.component.ts","../../../../libs/mintplayer-ng-bootstrap/badge/src/badge.component.html","../../../../libs/mintplayer-ng-bootstrap/badge/mintplayer-ng-bootstrap-badge.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { Color } from '@mintplayer/ng-bootstrap';\n\n@Component({\n selector: 'bs-badge',\n templateUrl: './badge.component.html',\n styleUrls: ['./badge.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsBadgeComponent {\n colors = Color;\n\n type = input<Color>(Color.primary);\n /**\n * What the number counts ('unread messages'): a bare '3' badge is\n * meaningless out of visual context. Appended visually hidden.\n */\n unit = input<string | null>(null);\n /** Purely decorative badges leave the accessibility tree entirely. */\n decorative = input(false);\n\n colorClass = computed(() => `bg-${this.colors[this.type()]}`);\n}\n","<span class=\"badge\" [class]=\"colorClass()\" [attr.aria-hidden]=\"decorative() ? 'true' : null\">\n <ng-content></ng-content>\n @if (unit(); as u) {\n <span class=\"visually-hidden-unit\">&ngsp;{{ u }}</span>\n }\n</span>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MASa,gBAAgB,CAAA;AAN7B,IAAA,WAAA,GAAA;QAOE,IAAA,CAAA,MAAM,GAAG,KAAK;AAEd,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAQ,KAAK,CAAC,OAAO;iFAAC;AAClC;;;AAGG;QACH,IAAA,CAAA,IAAI,GAAG,KAAK,CAAgB,IAAI;iFAAC;;QAEjC,IAAA,CAAA,UAAU,GAAG,KAAK,CAAC,KAAK;uFAAC;AAEzB,QAAA,IAAA,CAAA,UAAU,GAAG,QAAQ,CAAC,MAAM,CAAA,GAAA,EAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAA,CAAE;uFAAC;AAC9D,IAAA;8GAbY,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAhB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,gBAAgB,icCT7B,mPAMA,EAAA,MAAA,EAAA,CAAA,uvBAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FDGa,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAN5B,SAAS;+BACE,UAAU,EAAA,eAAA,EAGH,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,mPAAA,EAAA,MAAA,EAAA,CAAA,uvBAAA,CAAA,EAAA;;;AEPjD;;AAEG;;;;"}
1
+ {"version":3,"file":"mintplayer-ng-bootstrap-badge.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/badge/src/badge.component.ts","../../../../libs/mintplayer-ng-bootstrap/badge/src/badge.component.html","../../../../libs/mintplayer-ng-bootstrap/badge/mintplayer-ng-bootstrap-badge.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { Color } from '@mintplayer/ng-bootstrap';\n\n// `.badge` paints white text, and `bg-{color}` sets only the background: white\n// on warning was 1.63:1. Bootstrap's `text-bg-{color}` pairs each theme colour\n// with the text colour color-contrast() picks (black on warning, info and light).\n// It exists for the eight theme colours only; the other three pair a background\n// with a text utility, the way `<bs-card [color]>` colours them.\nconst pairedColorClasses: Partial<Record<Color, string>> = {\n [Color.body]: 'bg-body text-body',\n [Color.white]: 'bg-white text-black',\n [Color.transparent]: 'bg-transparent text-reset',\n};\n\n@Component({\n selector: 'bs-badge',\n templateUrl: './badge.component.html',\n styleUrls: ['./badge.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsBadgeComponent {\n colors = Color;\n\n type = input<Color>(Color.primary);\n /**\n * What the number counts ('unread messages'): a bare '3' badge is\n * meaningless out of visual context. Appended visually hidden.\n */\n unit = input<string | null>(null);\n /** Purely decorative badges leave the accessibility tree entirely. */\n decorative = input(false);\n\n colorClass = computed(() => pairedColorClasses[this.type()] ?? `text-bg-${this.colors[this.type()]}`);\n}\n","<span class=\"badge\" [class]=\"colorClass()\" [attr.aria-hidden]=\"decorative() ? 'true' : null\">\n <ng-content></ng-content>\n @if (unit(); as u) {\n <span class=\"visually-hidden-unit\">&ngsp;{{ u }}</span>\n }\n</span>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAGA;AACA;AACA;AACA;AACA;AACA,MAAM,kBAAkB,GAAmC;AACzD,IAAA,CAAC,KAAK,CAAC,IAAI,GAAG,mBAAmB;AACjC,IAAA,CAAC,KAAK,CAAC,KAAK,GAAG,qBAAqB;AACpC,IAAA,CAAC,KAAK,CAAC,WAAW,GAAG,2BAA2B;CACjD;MAQY,gBAAgB,CAAA;AAN7B,IAAA,WAAA,GAAA;QAOE,IAAA,CAAA,MAAM,GAAG,KAAK;AAEd,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAQ,KAAK,CAAC,OAAO;iFAAC;AAClC;;;AAGG;QACH,IAAA,CAAA,IAAI,GAAG,KAAK,CAAgB,IAAI;iFAAC;;QAEjC,IAAA,CAAA,UAAU,GAAG,KAAK,CAAC,KAAK;uFAAC;QAEzB,IAAA,CAAA,UAAU,GAAG,QAAQ,CAAC,MAAM,kBAAkB,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,IAAI,CAAA,QAAA,EAAW,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAA,CAAE;uFAAC;AACtG,IAAA;8GAbY,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAhB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,gBAAgB,icCpB7B,mPAMA,EAAA,MAAA,EAAA,CAAA,uvBAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FDca,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAN5B,SAAS;+BACE,UAAU,EAAA,eAAA,EAGH,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,mPAAA,EAAA,MAAA,EAAA,CAAA,uvBAAA,CAAA,EAAA;;;AElBjD;;AAEG;;;;"}
@@ -58,7 +58,6 @@ class BsCodeSnippetComponent {
58
58
  *
59
59
  * Angular's `output()` emits synchronously inside the DOM listener, so a
60
60
  * `preventDefault()` in the handler lands before `dispatchEvent` returns.
61
- * Same shape as `BsComboboxDirective`'s `activate`/`cancel`.
62
61
  */
63
62
  this.lineActivate = output();
64
63
  this.element = viewChild.required('element', /* @ts-ignore */
@@ -1 +1 @@
1
- {"version":3,"file":"mintplayer-ng-bootstrap-code-snippet.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/code-snippet/src/code-snippet.component.ts","../../../../libs/mintplayer-ng-bootstrap/code-snippet/src/code-snippet.component.html","../../../../libs/mintplayer-ng-bootstrap/code-snippet/mintplayer-ng-bootstrap-code-snippet.ts"],"sourcesContent":["import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n CUSTOM_ELEMENTS_SCHEMA,\n ElementRef,\n inject,\n input,\n output,\n viewChild,\n} from '@angular/core';\nimport '@mintplayer/web-components/code-snippet';\nimport type { CodeLineAnnotation, MpCodeSnippet } from '@mintplayer/web-components/code-snippet';\n\n/** Host attributes that describe the CONTROL and must reach it, not sit on a\n * wrapper the accessibility tree does not care about. */\nconst FORWARDED_ATTRIBUTES = ['role', 'tabindex', 'id'];\n\n/**\n * Angular wrapper around `<mp-code-snippet>`. The WC owns highlighting,\n * copy-to-clipboard, line rendering and the roving-focus keyboard layer; this\n * component translates Angular input/output ergonomics onto it.\n *\n * Breaking changes:\n * - `codeToCopy` is now `code`, matching the property it forwards to.\n * - The code block follows `data-bs-theme` instead of being permanently dark.\n * Pass `theme=\"dark\"` to keep the old appearance.\n * - `offcanvasVisible` (model) and `copiedTemplate` (viewChild) are long gone;\n * the WC manages its own toast.\n *\n * CSS overrides go through parts: `::part(copy-button)`, `::part(pre)`,\n * `::part(code)`, `::part(line)`, `::part(line-number)`, `::part(toast)`, and\n * `::part(annotation-<kind>)` for whatever kinds you feed `annotations`.\n */\n@Component({\n selector: 'bs-code-snippet',\n templateUrl: './code-snippet.component.html',\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n changeDetection: ChangeDetectionStrategy.OnPush,\n /**\n * A flex column that the `<mp-code-snippet>` fills, so a `height` or\n * `max-height` set on `<bs-code-snippet>` reaches the element that actually\n * scrolls. As a plain block the constraint stopped at this host and the\n * element kept its content height, overflowing it.\n *\n * React and Vue need no equivalent: both put the consumer's class straight\n * onto the custom element.\n */\n styles: `\n :host { display: flex; flex-direction: column; }\n mp-code-snippet { flex: 1 1 auto; min-height: 0; }\n `,\n})\nexport class BsCodeSnippetComponent implements AfterViewInit {\n readonly code = input<string>('');\n readonly language = input<string>('');\n\n readonly lineNumbers = input<boolean>(false);\n readonly startLine = input<number>(1);\n readonly wrap = input<boolean>(false);\n readonly theme = input<'auto' | 'light' | 'dark'>('auto');\n\n /** Sparse per-line markers; see `CodeLineAnnotation`. */\n readonly annotations = input<CodeLineAnnotation[]>([]);\n readonly activeLine = input<number | null>(null);\n /** Turns each line number into a real link, so middle-click still works. */\n readonly lineHref = input<((line: number) => string) | null>(null);\n\n readonly label = input<string>('');\n readonly copyLabel = input<string>('');\n readonly lineLabel = input<string>('');\n\n readonly detectedLanguage = output<string>();\n\n /**\n * Emits the DOM event, not just the line number, so a consumer can call\n * `preventDefault()` on it and navigate itself. Emitting the bare number\n * dropped the only channel the element offers for that, and the anchor's\n * default navigation always won.\n *\n * Angular's `output()` emits synchronously inside the DOM listener, so a\n * `preventDefault()` in the handler lands before `dispatchEvent` returns.\n * Same shape as `BsComboboxDirective`'s `activate`/`cancel`.\n */\n readonly lineActivate = output<CustomEvent<{ line: number }>>();\n\n private readonly element = viewChild.required<ElementRef<MpCodeSnippet>>('element');\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n ngAfterViewInit(): void {\n this.forwardHostAttributes();\n }\n\n /**\n * Scroll a line into view. Delegated to the element rather than reimplemented\n * so that re-requesting the line the user is already on still scrolls — a\n * plain `activeLine` binding would no-op.\n */\n scrollToLine(line: number): void {\n this.element().nativeElement.scrollToLine(line);\n }\n\n /**\n * A consumer writing `aria-label` or `role` on `<bs-code-snippet>` means it\n * for the code block. Left on the Angular host it reaches nothing: the host\n * is a roleless div as far as AT is concerned. So the attributes are moved\n * onto the `mp-*` element and removed from the host, where a duplicate would\n * otherwise produce two named nodes.\n */\n private forwardHostAttributes(): void {\n const host = this.host.nativeElement;\n const target = this.element().nativeElement as unknown as HTMLElement;\n\n host.getAttributeNames()\n .filter((name) => name.startsWith('aria-') || FORWARDED_ATTRIBUTES.includes(name))\n .map((name) => {\n target.setAttribute(name, host.getAttribute(name)!);\n host.removeAttribute(name);\n });\n }\n\n protected onLanguageDetected(event: Event): void {\n this.detectedLanguage.emit((event as CustomEvent<{ language: string }>).detail.language);\n }\n\n protected onLineActivate(event: Event): void {\n this.lineActivate.emit(event as CustomEvent<{ line: number }>);\n }\n}\n","<!--\n Strings and booleans go in as ATTRIBUTES, not properties, so that an unset\n input removes the attribute (`null`) and the element keeps its own default.\n A property binding would write `''` over defaults like\n \"Copy ${language} code to clipboard\" and blank them.\n\n `code`, `annotations` and `lineHref` stay property bindings: multi-line text,\n an object and a function have no sensible attribute form.\n-->\n<mp-code-snippet\n #element\n [code]=\"code()\"\n [attr.language]=\"language() || null\"\n [attr.line-numbers]=\"lineNumbers() ? '' : null\"\n [attr.start-line]=\"startLine()\"\n [attr.wrap]=\"wrap() ? '' : null\"\n [attr.theme]=\"theme()\"\n [attr.active-line]=\"activeLine()\"\n [attr.label]=\"label() || null\"\n [attr.copy-label]=\"copyLabel() || null\"\n [attr.line-label]=\"lineLabel() || null\"\n [annotations]=\"annotations()\"\n [lineHref]=\"lineHref()\"\n (language-detected)=\"onLanguageDetected($event)\"\n (line-activate)=\"onLineActivate($event)\"\n></mp-code-snippet>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAcA;AAC0D;AAC1D,MAAM,oBAAoB,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,CAAC;AAEvD;;;;;;;;;;;;;;;AAeG;MAoBU,sBAAsB,CAAA;AAnBnC,IAAA,WAAA,GAAA;QAoBW,IAAA,CAAA,IAAI,GAAG,KAAK,CAAS,EAAE;iFAAC;QACxB,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAS,EAAE;qFAAC;QAE5B,IAAA,CAAA,WAAW,GAAG,KAAK,CAAU,KAAK;wFAAC;QACnC,IAAA,CAAA,SAAS,GAAG,KAAK,CAAS,CAAC;sFAAC;QAC5B,IAAA,CAAA,IAAI,GAAG,KAAK,CAAU,KAAK;iFAAC;QAC5B,IAAA,CAAA,KAAK,GAAG,KAAK,CAA4B,MAAM;kFAAC;;QAGhD,IAAA,CAAA,WAAW,GAAG,KAAK,CAAuB,EAAE;wFAAC;QAC7C,IAAA,CAAA,UAAU,GAAG,KAAK,CAAgB,IAAI;uFAAC;;QAEvC,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAoC,IAAI;qFAAC;QAEzD,IAAA,CAAA,KAAK,GAAG,KAAK,CAAS,EAAE;kFAAC;QACzB,IAAA,CAAA,SAAS,GAAG,KAAK,CAAS,EAAE;sFAAC;QAC7B,IAAA,CAAA,SAAS,GAAG,KAAK,CAAS,EAAE;sFAAC;QAE7B,IAAA,CAAA,gBAAgB,GAAG,MAAM,EAAU;AAE5C;;;;;;;;;AASG;QACM,IAAA,CAAA,YAAY,GAAG,MAAM,EAAiC;AAE9C,QAAA,IAAA,CAAA,OAAO,GAAG,SAAS,CAAC,QAAQ,CAA4B,SAAS;oFAAC;AAClE,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAA0B,UAAU,CA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A,MAAA,EAAA,CAAA,wFAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FD2Ba,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAnBlC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,WAElB,CAAC,sBAAsB,CAAC,EAAA,eAAA,EAChB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,qgCAAA,EAAA,MAAA,EAAA,CAAA,wFAAA,CAAA,EAAA;i0CAgD0B,SAAS,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEtFpF;;AAEG;;;;"}
1
+ {"version":3,"file":"mintplayer-ng-bootstrap-code-snippet.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/code-snippet/src/code-snippet.component.ts","../../../../libs/mintplayer-ng-bootstrap/code-snippet/src/code-snippet.component.html","../../../../libs/mintplayer-ng-bootstrap/code-snippet/mintplayer-ng-bootstrap-code-snippet.ts"],"sourcesContent":["import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n CUSTOM_ELEMENTS_SCHEMA,\n ElementRef,\n inject,\n input,\n output,\n viewChild,\n} from '@angular/core';\nimport '@mintplayer/web-components/code-snippet';\nimport type { CodeLineAnnotation, MpCodeSnippet } from '@mintplayer/web-components/code-snippet';\n\n/** Host attributes that describe the CONTROL and must reach it, not sit on a\n * wrapper the accessibility tree does not care about. */\nconst FORWARDED_ATTRIBUTES = ['role', 'tabindex', 'id'];\n\n/**\n * Angular wrapper around `<mp-code-snippet>`. The WC owns highlighting,\n * copy-to-clipboard, line rendering and the roving-focus keyboard layer; this\n * component translates Angular input/output ergonomics onto it.\n *\n * Breaking changes:\n * - `codeToCopy` is now `code`, matching the property it forwards to.\n * - The code block follows `data-bs-theme` instead of being permanently dark.\n * Pass `theme=\"dark\"` to keep the old appearance.\n * - `offcanvasVisible` (model) and `copiedTemplate` (viewChild) are long gone;\n * the WC manages its own toast.\n *\n * CSS overrides go through parts: `::part(copy-button)`, `::part(pre)`,\n * `::part(code)`, `::part(line)`, `::part(line-number)`, `::part(toast)`, and\n * `::part(annotation-<kind>)` for whatever kinds you feed `annotations`.\n */\n@Component({\n selector: 'bs-code-snippet',\n templateUrl: './code-snippet.component.html',\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n changeDetection: ChangeDetectionStrategy.OnPush,\n /**\n * A flex column that the `<mp-code-snippet>` fills, so a `height` or\n * `max-height` set on `<bs-code-snippet>` reaches the element that actually\n * scrolls. As a plain block the constraint stopped at this host and the\n * element kept its content height, overflowing it.\n *\n * React and Vue need no equivalent: both put the consumer's class straight\n * onto the custom element.\n */\n styles: `\n :host { display: flex; flex-direction: column; }\n mp-code-snippet { flex: 1 1 auto; min-height: 0; }\n `,\n})\nexport class BsCodeSnippetComponent implements AfterViewInit {\n readonly code = input<string>('');\n readonly language = input<string>('');\n\n readonly lineNumbers = input<boolean>(false);\n readonly startLine = input<number>(1);\n readonly wrap = input<boolean>(false);\n readonly theme = input<'auto' | 'light' | 'dark'>('auto');\n\n /** Sparse per-line markers; see `CodeLineAnnotation`. */\n readonly annotations = input<CodeLineAnnotation[]>([]);\n readonly activeLine = input<number | null>(null);\n /** Turns each line number into a real link, so middle-click still works. */\n readonly lineHref = input<((line: number) => string) | null>(null);\n\n readonly label = input<string>('');\n readonly copyLabel = input<string>('');\n readonly lineLabel = input<string>('');\n\n readonly detectedLanguage = output<string>();\n\n /**\n * Emits the DOM event, not just the line number, so a consumer can call\n * `preventDefault()` on it and navigate itself. Emitting the bare number\n * dropped the only channel the element offers for that, and the anchor's\n * default navigation always won.\n *\n * Angular's `output()` emits synchronously inside the DOM listener, so a\n * `preventDefault()` in the handler lands before `dispatchEvent` returns.\n */\n readonly lineActivate = output<CustomEvent<{ line: number }>>();\n\n private readonly element = viewChild.required<ElementRef<MpCodeSnippet>>('element');\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n ngAfterViewInit(): void {\n this.forwardHostAttributes();\n }\n\n /**\n * Scroll a line into view. Delegated to the element rather than reimplemented\n * so that re-requesting the line the user is already on still scrolls — a\n * plain `activeLine` binding would no-op.\n */\n scrollToLine(line: number): void {\n this.element().nativeElement.scrollToLine(line);\n }\n\n /**\n * A consumer writing `aria-label` or `role` on `<bs-code-snippet>` means it\n * for the code block. Left on the Angular host it reaches nothing: the host\n * is a roleless div as far as AT is concerned. So the attributes are moved\n * onto the `mp-*` element and removed from the host, where a duplicate would\n * otherwise produce two named nodes.\n */\n private forwardHostAttributes(): void {\n const host = this.host.nativeElement;\n const target = this.element().nativeElement as unknown as HTMLElement;\n\n host.getAttributeNames()\n .filter((name) => name.startsWith('aria-') || FORWARDED_ATTRIBUTES.includes(name))\n .map((name) => {\n target.setAttribute(name, host.getAttribute(name)!);\n host.removeAttribute(name);\n });\n }\n\n protected onLanguageDetected(event: Event): void {\n this.detectedLanguage.emit((event as CustomEvent<{ language: string }>).detail.language);\n }\n\n protected onLineActivate(event: Event): void {\n this.lineActivate.emit(event as CustomEvent<{ line: number }>);\n }\n}\n","<!--\n Strings and booleans go in as ATTRIBUTES, not properties, so that an unset\n input removes the attribute (`null`) and the element keeps its own default.\n A property binding would write `''` over defaults like\n \"Copy ${language} code to clipboard\" and blank them.\n\n `code`, `annotations` and `lineHref` stay property bindings: multi-line text,\n an object and a function have no sensible attribute form.\n-->\n<mp-code-snippet\n #element\n [code]=\"code()\"\n [attr.language]=\"language() || null\"\n [attr.line-numbers]=\"lineNumbers() ? '' : null\"\n [attr.start-line]=\"startLine()\"\n [attr.wrap]=\"wrap() ? '' : null\"\n [attr.theme]=\"theme()\"\n [attr.active-line]=\"activeLine()\"\n [attr.label]=\"label() || null\"\n [attr.copy-label]=\"copyLabel() || null\"\n [attr.line-label]=\"lineLabel() || null\"\n [annotations]=\"annotations()\"\n [lineHref]=\"lineHref()\"\n (language-detected)=\"onLanguageDetected($event)\"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AA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FD2Ba,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAnBlC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,WAElB,CAAC,sBAAsB,CAAC,EAAA,eAAA,EAChB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,qgCAAA,EAAA,MAAA,EAAA,CAAA,wFAAA,CAAA,EAAA;i0CA+C0B,SAAS,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AErFpF;;AAEG;;;;"}
@@ -20,8 +20,8 @@ const BS_DROPDOWN_MENU_CONTEXT = new InjectionToken('BS_DROPDOWN_MENU_CONTEXT');
20
20
  * `<bs-dropdown-menu>` — Angular wrapper around the `<mp-dropdown-menu>` web
21
21
  * component. This is the single dropdown-menu implementation: it is used
22
22
  * standalone (projected through `*bsDropdownMenu` by the `[bsDropdown]` trigger
23
- * stack), inside `<bs-navbar>`, and as the listbox panel for the combobox /
24
- * typeahead (`mode="listbox"`).
23
+ * stack) and inside `<bs-navbar>`. Menu only: the typeahead renders its own
24
+ * listbox from its headless core (#436).
25
25
  *
26
26
  * Keyboard navigation, roving tabindex, the ARIA roles and the theme-aware
27
27
  * styling all live in the WC (single source of UI truth). This wrapper bridges
@@ -33,10 +33,7 @@ const BS_DROPDOWN_MENU_CONTEXT = new InjectionToken('BS_DROPDOWN_MENU_CONTEXT');
33
33
  * Declarative Shadow DOM (see `injectMpDropdownDsd`), so it renders with JS off.
34
34
  *
35
35
  * This wrapper stays framework-agnostic of the `[bsDropdown]` trigger stack (it
36
- * lives in a sibling entry point). When projected as a combobox/listbox panel,
37
- * the consumer sets `mode="listbox"` and mirrors the trigger's `menuId`/
38
- * `popupRole` onto this host (`[attr.id]`/`[attr.role]`) via the exported
39
- * `bsDropdown` reference — the same directive the toggle and combobox read.
36
+ * lives in a sibling entry point).
40
37
  */
41
38
  class BsDropdownMenuComponent {
42
39
  onSelect(event) {
@@ -49,14 +46,6 @@ class BsDropdownMenuComponent {
49
46
  this.select.emit(event.detail);
50
47
  }
51
48
  constructor() {
52
- /**
53
- * `menu` (default, roving-tabindex nav) | `listbox` (consumer manages focus).
54
- *
55
- * Aliased to `menuMode` so it never collides with the `mode` input of the
56
- * a11y `bsRovingFocus` directive when a combobox/listbox stacks both on this
57
- * one element (same reason `bsCombobox` aliases its `autocomplete`).
58
- */
59
- this.mode = input('menu', { ...(ngDevMode ? { debugName: "mode" } : /* istanbul ignore next */ {}), alias: 'menuMode' });
60
49
  /** Pixel cap on the menu height; scrolls beyond. */
61
50
  this.maxHeight = input(/* @ts-ignore */
62
51
  ...(ngDevMode ? [undefined, { debugName: "maxHeight" }] : /* istanbul ignore next */ []));
@@ -76,12 +65,12 @@ class BsDropdownMenuComponent {
76
65
  });
77
66
  }
78
67
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsDropdownMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
79
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.8", type: BsDropdownMenuComponent, isStandalone: true, selector: "bs-dropdown-menu", inputs: { mode: { classPropertyName: "mode", publicName: "menuMode", isSignal: true, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { select: "select" }, providers: [{ provide: BS_DROPDOWN_MENU_CONTEXT, useValue: true }], ngImport: i0, template: "<mp-dropdown-menu bsForwardAria [attr.mode]=\"mode()\" [attr.max-height]=\"maxHeightAttr()\" (select)=\"onSelect($event)\">\n <ng-content></ng-content>\n</mp-dropdown-menu>\n", styles: [".dropdown-item>a,.dropdown-item>button{display:block;width:auto;margin:calc(-1 * var(--bs-dropdown-item-padding-y, .25rem)) calc(-1 * var(--bs-dropdown-item-padding-x, 1rem));padding:var(--bs-dropdown-item-padding-y, .25rem) var(--bs-dropdown-item-padding-x, 1rem);color:inherit;text-decoration:none;text-align:inherit;background:none;border:0;font:inherit}.dropdown-item>a.active,.dropdown-item>button.active{color:var(--bs-dropdown-link-active-color, #fff);background-color:var(--bs-dropdown-link-active-bg, var(--bs-primary))}\n"], dependencies: [{ kind: "directive", type: BsForwardAriaDirective, selector: "[bsForwardAria]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
68
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.8", type: BsDropdownMenuComponent, isStandalone: true, selector: "bs-dropdown-menu", inputs: { maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { select: "select" }, providers: [{ provide: BS_DROPDOWN_MENU_CONTEXT, useValue: true }], ngImport: i0, template: "<mp-dropdown-menu bsForwardAria [attr.max-height]=\"maxHeightAttr()\" (select)=\"onSelect($event)\">\n <ng-content></ng-content>\n</mp-dropdown-menu>\n", styles: [".dropdown-item>a,.dropdown-item>button{display:block;width:auto;margin:calc(-1 * var(--bs-dropdown-item-padding-y, .25rem)) calc(-1 * var(--bs-dropdown-item-padding-x, 1rem));padding:var(--bs-dropdown-item-padding-y, .25rem) var(--bs-dropdown-item-padding-x, 1rem);color:inherit;text-decoration:none;text-align:inherit;background:none;border:0;font:inherit}.dropdown-item>a.active,.dropdown-item>button.active{color:var(--bs-dropdown-link-active-color, #fff);background-color:var(--bs-dropdown-link-active-bg, var(--bs-primary))}\n"], dependencies: [{ kind: "directive", type: BsForwardAriaDirective, selector: "[bsForwardAria]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
80
69
  }
81
70
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsDropdownMenuComponent, decorators: [{
82
71
  type: Component,
83
- args: [{ selector: 'bs-dropdown-menu', imports: [BsForwardAriaDirective], changeDetection: ChangeDetectionStrategy.OnPush, schemas: [CUSTOM_ELEMENTS_SCHEMA], providers: [{ provide: BS_DROPDOWN_MENU_CONTEXT, useValue: true }], encapsulation: ViewEncapsulation.None, template: "<mp-dropdown-menu bsForwardAria [attr.mode]=\"mode()\" [attr.max-height]=\"maxHeightAttr()\" (select)=\"onSelect($event)\">\n <ng-content></ng-content>\n</mp-dropdown-menu>\n", styles: [".dropdown-item>a,.dropdown-item>button{display:block;width:auto;margin:calc(-1 * var(--bs-dropdown-item-padding-y, .25rem)) calc(-1 * var(--bs-dropdown-item-padding-x, 1rem));padding:var(--bs-dropdown-item-padding-y, .25rem) var(--bs-dropdown-item-padding-x, 1rem);color:inherit;text-decoration:none;text-align:inherit;background:none;border:0;font:inherit}.dropdown-item>a.active,.dropdown-item>button.active{color:var(--bs-dropdown-link-active-color, #fff);background-color:var(--bs-dropdown-link-active-bg, var(--bs-primary))}\n"] }]
84
- }], ctorParameters: () => [], propDecorators: { mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "menuMode", required: false }] }], maxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxHeight", required: false }] }], select: [{ type: i0.Output, args: ["select"] }] } });
72
+ args: [{ selector: 'bs-dropdown-menu', imports: [BsForwardAriaDirective], changeDetection: ChangeDetectionStrategy.OnPush, schemas: [CUSTOM_ELEMENTS_SCHEMA], providers: [{ provide: BS_DROPDOWN_MENU_CONTEXT, useValue: true }], encapsulation: ViewEncapsulation.None, template: "<mp-dropdown-menu bsForwardAria [attr.max-height]=\"maxHeightAttr()\" (select)=\"onSelect($event)\">\n <ng-content></ng-content>\n</mp-dropdown-menu>\n", styles: [".dropdown-item>a,.dropdown-item>button{display:block;width:auto;margin:calc(-1 * var(--bs-dropdown-item-padding-y, .25rem)) calc(-1 * var(--bs-dropdown-item-padding-x, 1rem));padding:var(--bs-dropdown-item-padding-y, .25rem) var(--bs-dropdown-item-padding-x, 1rem);color:inherit;text-decoration:none;text-align:inherit;background:none;border:0;font:inherit}.dropdown-item>a.active,.dropdown-item>button.active{color:var(--bs-dropdown-link-active-color, #fff);background-color:var(--bs-dropdown-link-active-bg, var(--bs-primary))}\n"] }]
73
+ }], ctorParameters: () => [], propDecorators: { maxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxHeight", required: false }] }], select: [{ type: i0.Output, args: ["select"] }] } });
85
74
 
86
75
  /**
87
76
  * `[bsDropdownItem]` — marks a plain `<li>` as a Bootstrap `.dropdown-item`
@@ -93,8 +82,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
93
82
  * Usage: `<li bsDropdownItem><a routerLink="/x">Action</a></li>`.
94
83
  *
95
84
  * Inputs:
96
- * - `active` — Bootstrap `.active` appearance (also drives `aria-selected` in
97
- * a `listbox` menu).
85
+ * - `active` — Bootstrap `.active` appearance.
98
86
  * - `disabled` — non-interactive; removed from the menu's roving order.
99
87
  * - `value` — opaque value carried in the menu's `select` event detail;
100
88
  * written to the host `<li>` as its `dropdownValue` property, which the WC