@mintplayer/ng-bootstrap 22.28.0 → 22.30.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 (134) hide show
  1. package/_bootstrap.scss +4 -101
  2. package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs +62 -30
  3. package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs.map +1 -1
  4. package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs +71 -64
  5. package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs.map +1 -1
  6. package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs +50 -46
  7. package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs.map +1 -1
  8. package/fesm2022/mintplayer-ng-bootstrap-card.mjs +65 -94
  9. package/fesm2022/mintplayer-ng-bootstrap-card.mjs.map +1 -1
  10. package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs +122 -97
  11. package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs.map +1 -1
  12. package/fesm2022/mintplayer-ng-bootstrap-charts-hierarchy.mjs +80 -133
  13. package/fesm2022/mintplayer-ng-bootstrap-charts-hierarchy.mjs.map +1 -1
  14. package/fesm2022/mintplayer-ng-bootstrap-charts-sparkline.mjs +31 -19
  15. package/fesm2022/mintplayer-ng-bootstrap-charts-sparkline.mjs.map +1 -1
  16. package/fesm2022/mintplayer-ng-bootstrap-charts-trend.mjs +41 -46
  17. package/fesm2022/mintplayer-ng-bootstrap-charts-trend.mjs.map +1 -1
  18. package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs +76 -37
  19. package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs.map +1 -1
  20. package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs +37 -82
  21. package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs.map +1 -1
  22. package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs +1 -1
  23. package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs.map +1 -1
  24. package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs +157 -824
  25. package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs.map +1 -1
  26. package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs +172 -118
  27. package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs.map +1 -1
  28. package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs +180 -142
  29. package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs.map +1 -1
  30. package/fesm2022/mintplayer-ng-bootstrap-dock.mjs +66 -116
  31. package/fesm2022/mintplayer-ng-bootstrap-dock.mjs.map +1 -1
  32. package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs +41 -46
  33. package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs.map +1 -1
  34. package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs +80 -204
  35. package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs.map +1 -1
  36. package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs +2 -2
  37. package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs.map +1 -1
  38. package/fesm2022/mintplayer-ng-bootstrap-form.mjs +2 -2
  39. package/fesm2022/mintplayer-ng-bootstrap-form.mjs.map +1 -1
  40. package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs +32 -17
  41. package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs.map +1 -1
  42. package/fesm2022/mintplayer-ng-bootstrap-machine.mjs +283 -20
  43. package/fesm2022/mintplayer-ng-bootstrap-machine.mjs.map +1 -1
  44. package/fesm2022/mintplayer-ng-bootstrap-multi-range.mjs +98 -129
  45. package/fesm2022/mintplayer-ng-bootstrap-multi-range.mjs.map +1 -1
  46. package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs +144 -265
  47. package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs.map +1 -1
  48. package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs +133 -217
  49. package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs.map +1 -1
  50. package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs +46 -25
  51. package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs.map +1 -1
  52. package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs +166 -93
  53. package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs.map +1 -1
  54. package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs +148 -231
  55. package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs.map +1 -1
  56. package/fesm2022/mintplayer-ng-bootstrap-radio.mjs +133 -94
  57. package/fesm2022/mintplayer-ng-bootstrap-radio.mjs.map +1 -1
  58. package/fesm2022/mintplayer-ng-bootstrap-range.mjs +2 -2
  59. package/fesm2022/mintplayer-ng-bootstrap-range.mjs.map +1 -1
  60. package/fesm2022/mintplayer-ng-bootstrap-rating.mjs +76 -7
  61. package/fesm2022/mintplayer-ng-bootstrap-rating.mjs.map +1 -1
  62. package/fesm2022/mintplayer-ng-bootstrap-ribbon.mjs +766 -812
  63. package/fesm2022/mintplayer-ng-bootstrap-ribbon.mjs.map +1 -1
  64. package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs +206 -180
  65. package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs.map +1 -1
  66. package/fesm2022/mintplayer-ng-bootstrap-select.mjs +202 -141
  67. package/fesm2022/mintplayer-ng-bootstrap-select.mjs.map +1 -1
  68. package/fesm2022/mintplayer-ng-bootstrap-shell.mjs +113 -59
  69. package/fesm2022/mintplayer-ng-bootstrap-shell.mjs.map +1 -1
  70. package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs +133 -76
  71. package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs.map +1 -1
  72. package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs +60 -87
  73. package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs.map +1 -1
  74. package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs +86 -83
  75. package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs.map +1 -1
  76. package/fesm2022/mintplayer-ng-bootstrap-table.mjs +1 -2
  77. package/fesm2022/mintplayer-ng-bootstrap-table.mjs.map +1 -1
  78. package/fesm2022/mintplayer-ng-bootstrap-theming.mjs +38 -34
  79. package/fesm2022/mintplayer-ng-bootstrap-theming.mjs.map +1 -1
  80. package/fesm2022/mintplayer-ng-bootstrap-timeline.mjs +177 -147
  81. package/fesm2022/mintplayer-ng-bootstrap-timeline.mjs.map +1 -1
  82. package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs +200 -94
  83. package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs.map +1 -1
  84. package/fesm2022/mintplayer-ng-bootstrap-tree-select.mjs +186 -233
  85. package/fesm2022/mintplayer-ng-bootstrap-tree-select.mjs.map +1 -1
  86. package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs +58 -136
  87. package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs.map +1 -1
  88. package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs +22 -16
  89. package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs.map +1 -1
  90. package/package.json +11 -9
  91. package/types/mintplayer-ng-bootstrap-a11y.d.ts +40 -21
  92. package/types/mintplayer-ng-bootstrap-accordion.d.ts +36 -33
  93. package/types/mintplayer-ng-bootstrap-calendar.d.ts +39 -16
  94. package/types/mintplayer-ng-bootstrap-card.d.ts +25 -33
  95. package/types/mintplayer-ng-bootstrap-carousel.d.ts +70 -55
  96. package/types/mintplayer-ng-bootstrap-charts-hierarchy.d.ts +65 -45
  97. package/types/mintplayer-ng-bootstrap-charts-sparkline.d.ts +12 -3
  98. package/types/mintplayer-ng-bootstrap-charts-trend.d.ts +34 -19
  99. package/types/mintplayer-ng-bootstrap-checkbox.d.ts +34 -8
  100. package/types/mintplayer-ng-bootstrap-code-snippet.d.ts +32 -59
  101. package/types/mintplayer-ng-bootstrap-datatable.d.ts +222 -422
  102. package/types/mintplayer-ng-bootstrap-datepicker.d.ts +77 -29
  103. package/types/mintplayer-ng-bootstrap-datetime-picker.d.ts +83 -51
  104. package/types/mintplayer-ng-bootstrap-dock.d.ts +57 -38
  105. package/types/mintplayer-ng-bootstrap-dropdown-menu.d.ts +25 -30
  106. package/types/mintplayer-ng-bootstrap-file-manager.d.ts +61 -81
  107. package/types/mintplayer-ng-bootstrap-input-group.d.ts +17 -12
  108. package/types/mintplayer-ng-bootstrap-machine.d.ts +124 -4
  109. package/types/mintplayer-ng-bootstrap-multi-range.d.ts +53 -27
  110. package/types/mintplayer-ng-bootstrap-navbar.d.ts +88 -164
  111. package/types/mintplayer-ng-bootstrap-otp-input.d.ts +63 -30
  112. package/types/mintplayer-ng-bootstrap-pagination.d.ts +23 -7
  113. package/types/mintplayer-ng-bootstrap-phone-input.d.ts +77 -47
  114. package/types/mintplayer-ng-bootstrap-query-builder.d.ts +95 -98
  115. package/types/mintplayer-ng-bootstrap-radio.d.ts +68 -35
  116. package/types/mintplayer-ng-bootstrap-rating.d.ts +27 -2
  117. package/types/mintplayer-ng-bootstrap-ribbon.d.ts +546 -220
  118. package/types/mintplayer-ng-bootstrap-scheduler.d.ts +82 -197
  119. package/types/mintplayer-ng-bootstrap-select.d.ts +113 -53
  120. package/types/mintplayer-ng-bootstrap-shell.d.ts +59 -33
  121. package/types/mintplayer-ng-bootstrap-signature-pad.d.ts +63 -27
  122. package/types/mintplayer-ng-bootstrap-splitter.d.ts +45 -56
  123. package/types/mintplayer-ng-bootstrap-tab-control.d.ts +47 -26
  124. package/types/mintplayer-ng-bootstrap-table.d.ts +1 -2
  125. package/types/mintplayer-ng-bootstrap-theming.d.ts +19 -18
  126. package/types/mintplayer-ng-bootstrap-timeline.d.ts +287 -117
  127. package/types/mintplayer-ng-bootstrap-timepicker.d.ts +100 -27
  128. package/types/mintplayer-ng-bootstrap-tree-select.d.ts +188 -94
  129. package/types/mintplayer-ng-bootstrap-treeview.d.ts +74 -59
  130. package/types/mintplayer-ng-bootstrap-typeahead.d.ts +3 -0
  131. package/src/styles/utilities/cursor.scss +0 -12
  132. package/src/styles/utilities/overflow.scss +0 -12
  133. package/src/styles/utilities/white-space.scss +0 -12
  134. package/src/styles/utilities/width.scss +0 -14
@@ -1,8 +1,9 @@
1
- import { NgTemplateOutlet, isPlatformServer } from '@angular/common';
1
+ import { NgTemplateOutlet } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { inject, TemplateRef, Directive, ElementRef, signal, computed, input, contentChild, ChangeDetectionStrategy, Component, PLATFORM_ID, contentChildren, effect, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
4
- import { BsNoNoscriptDirective } from '@mintplayer/ng-bootstrap/no-noscript';
5
- import '@mintplayer/web-components/tab-control';
3
+ import { inject, TemplateRef, Directive, input, contentChild, viewChild, ChangeDetectionStrategy, Component, contentChildren, forwardRef, signal, ElementRef, computed, afterNextRender } from '@angular/core';
4
+ import { BsIdService } from '@mintplayer/ng-bootstrap/a11y';
5
+ import { useScopedStyles, MpPropsDirective } from '@mintplayer/ng-bootstrap/machine';
6
+ import { resolveActiveTab, connectTabControl, TAB_CONTROL_SCOPE, tabControlScopedStyles, tabControlTabClick, tabControlKeydown, tabControlChanged } from '@mintplayer/ui-core/tab-control';
6
7
 
7
8
  class BsTabPageHeaderDirective {
8
9
  constructor() {
@@ -18,120 +19,122 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
18
19
  }]
19
20
  }] });
20
21
 
22
+ /**
23
+ * One page of a `<bs-tab-control>`. Renders nothing itself: the control
24
+ * renders every radio, tab and pane as siblings (the CSS pairs the n-th radio
25
+ * with the n-th pane), so the page hands over its header and body templates.
26
+ */
21
27
  class BsTabPageComponent {
22
28
  constructor() {
23
- this.element = inject(ElementRef);
24
- this.tabControl = inject(BsTabControlComponent);
25
- this.tabId = signal(0, /* @ts-ignore */
26
- ...(ngDevMode ? [{ debugName: "tabId" }] : /* istanbul ignore next */ []));
27
- this.tabName = computed(() => `${this.tabControl.tabControlName()}-${this.tabId()}`, /* @ts-ignore */
28
- ...(ngDevMode ? [{ debugName: "tabName" }] : /* istanbul ignore next */ []));
29
- this.contentSlotName = computed(() => this.tabControl.isServerSide ? null : `${this.tabName()}-content`, /* @ts-ignore */
30
- ...(ngDevMode ? [{ debugName: "contentSlotName" }] : /* istanbul ignore next */ []));
31
29
  this.disabled = input(false, /* @ts-ignore */
32
30
  ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
33
31
  this.headerTemplate = contentChild(BsTabPageHeaderDirective, /* @ts-ignore */
34
32
  ...(ngDevMode ? [{ debugName: "headerTemplate" }] : /* istanbul ignore next */ []));
35
- this.tabId = signal(++this.tabControl.tabCounter, /* @ts-ignore */
36
- ...(ngDevMode ? [{ debugName: "tabId" }] : /* istanbul ignore next */ []));
33
+ this.body = viewChild('body', /* @ts-ignore */
34
+ ...(ngDevMode ? [{ debugName: "body" }] : /* istanbul ignore next */ []));
37
35
  }
38
36
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsTabPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
39
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: BsTabPageComponent, isStandalone: true, selector: "bs-tab-page", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.slot": "contentSlotName()", "attr.data-disabled": "disabled() ? \"\" : null" } }, queries: [{ propertyName: "headerTemplate", first: true, predicate: BsTabPageHeaderDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<!-- One ng-content for both branches (see bs-tab-control): Angular projects into the last. -->\n<ng-template #content><ng-content></ng-content></ng-template>\n\n@if (tabControl.isServerSide) {\n\t<!-- region, not tabpanel: the no-JS tier ships no role=\"tab\" (a static\n\t aria-selected would go stale), and a tabpanel without a tab is an\n\t orphan. The label id still names the region. -->\n\t<div [id]=\"tabName() + '-panel'\"\n\t\tclass=\"tab-page-content\"\n\t\trole=\"region\"\n\t\t[attr.aria-labelledby]=\"tabName() + '-header'\"\n\t\t[class.d-block]=\"tabControl.activeTab() === this\">\n\t\t<ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n\t</div>\n} @else {\n\t<ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n}\n", styles: [".tab-page-content{display:none}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
37
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.8", type: BsTabPageComponent, isStandalone: true, selector: "bs-tab-page", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "hidden": "" } }, queries: [{ propertyName: "headerTemplate", first: true, predicate: BsTabPageHeaderDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "body", first: true, predicate: ["body"], descendants: true, isSignal: true }], ngImport: i0, template: '<ng-template #body><ng-content /></ng-template>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
40
38
  }
41
39
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsTabPageComponent, decorators: [{
42
40
  type: Component,
43
- args: [{ selector: 'bs-tab-page', imports: [NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, host: {
44
- // Used by <mp-tab-control> to project the active page into its content slot.
45
- '[attr.slot]': 'contentSlotName()',
46
- // Tells <mp-tab-control> the tab is disabled without inspecting child types.
47
- '[attr.data-disabled]': 'disabled() ? "" : null',
48
- // NO client-side ARIA here: <mp-tab-control> already renders the
49
- // role=tabpanel wrapper (with aria-labelledby) in its shadow root, so a
50
- // second tabpanel on this host announced every page twice and its id
51
- // duplicated an IDREF target. The SSR branch renders its own region
52
- // inside the template instead.
53
- }, template: "<!-- One ng-content for both branches (see bs-tab-control): Angular projects into the last. -->\n<ng-template #content><ng-content></ng-content></ng-template>\n\n@if (tabControl.isServerSide) {\n\t<!-- region, not tabpanel: the no-JS tier ships no role=\"tab\" (a static\n\t aria-selected would go stale), and a tabpanel without a tab is an\n\t orphan. The label id still names the region. -->\n\t<div [id]=\"tabName() + '-panel'\"\n\t\tclass=\"tab-page-content\"\n\t\trole=\"region\"\n\t\t[attr.aria-labelledby]=\"tabName() + '-header'\"\n\t\t[class.d-block]=\"tabControl.activeTab() === this\">\n\t\t<ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n\t</div>\n} @else {\n\t<ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n}\n", styles: [".tab-page-content{display:none}\n"] }]
54
- }], ctorParameters: () => [], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], headerTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => BsTabPageHeaderDirective), { isSignal: true }] }] } });
41
+ args: [{
42
+ selector: 'bs-tab-page',
43
+ template: '<ng-template #body><ng-content /></ng-template>',
44
+ changeDetection: ChangeDetectionStrategy.OnPush,
45
+ host: { hidden: '' },
46
+ }]
47
+ }], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], headerTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => BsTabPageHeaderDirective), { isSignal: true }] }], body: [{ type: i0.ViewChild, args: ['body', { isSignal: true }] }] } });
55
48
 
49
+ /**
50
+ * `<bs-tab-control>` — Bootstrap nav-tabs over one native radio per tab (#437).
51
+ *
52
+ * <bs-tab-control [border]="true" tabsPosition="top">
53
+ * <bs-tab-page [disabled]="false">
54
+ * <ng-container *bsTabPageHeader>Profile</ng-container>
55
+ * Page content
56
+ * </bs-tab-page>
57
+ * </bs-tab-control>
58
+ *
59
+ * Renders the markup of `@mintplayer/ui-core/tab-control` in its own
60
+ * template, so the server-rendered page is a working tab control: the
61
+ * checked radio shows its pane through CSS with JavaScript off. Once the
62
+ * client has rendered, the labels become APG tabs (roving tabindex,
63
+ * automatic activation) and the radios leave the tab order. The host is the
64
+ * `.tab-control` root; each page hands over its header and body as templates.
65
+ */
56
66
  class BsTabControlComponent {
57
67
  constructor() {
58
- this.element = inject(ElementRef);
59
- this.platformId = inject(PLATFORM_ID);
60
- this.isServerSide = isPlatformServer(this.platformId);
68
+ /** Draw the outline around the active pane. */
61
69
  this.border = input(true, /* @ts-ignore */
62
70
  ...(ngDevMode ? [{ debugName: "border" }] : /* istanbul ignore next */ []));
71
+ /** Show the first enabled page while none is active. */
63
72
  this.selectFirstTab = input(true, /* @ts-ignore */
64
73
  ...(ngDevMode ? [{ debugName: "selectFirstTab" }] : /* istanbul ignore next */ []));
65
74
  this.tabsPosition = input('top', /* @ts-ignore */
66
75
  ...(ngDevMode ? [{ debugName: "tabsPosition" }] : /* istanbul ignore next */ []));
67
- this.tabPages = contentChildren(BsTabPageComponent, /* @ts-ignore */
76
+ this.tabPages = contentChildren(forwardRef(() => BsTabPageComponent), /* @ts-ignore */
68
77
  ...(ngDevMode ? [{ debugName: "tabPages" }] : /* istanbul ignore next */ []));
78
+ /** The page the user picked; `checkedTab` is the one that is shown. */
69
79
  this.activeTab = signal(null, /* @ts-ignore */
70
80
  ...(ngDevMode ? [{ debugName: "activeTab" }] : /* istanbul ignore next */ []));
71
- this.tabControlId = signal(0, /* @ts-ignore */
72
- ...(ngDevMode ? [{ debugName: "tabControlId" }] : /* istanbul ignore next */ []));
73
- this.tabControlName = computed(() => `bs-tab-control-${this.tabControlId()}`, /* @ts-ignore */
74
- ...(ngDevMode ? [{ debugName: "tabControlName" }] : /* istanbul ignore next */ []));
75
- this.topTabs = computed(() => this.tabsPosition() === 'top', /* @ts-ignore */
76
- ...(ngDevMode ? [{ debugName: "topTabs" }] : /* istanbul ignore next */ []));
77
- this.bottomTabs = computed(() => this.tabsPosition() === 'bottom', /* @ts-ignore */
78
- ...(ngDevMode ? [{ debugName: "bottomTabs" }] : /* istanbul ignore next */ []));
79
- this.checkedTab = computed(() => {
81
+ this.host = inject(ElementRef).nativeElement;
82
+ this.id = inject(BsIdService).next('bs-tab-control');
83
+ /** The client has rendered: switch from the radio tier to the tab tier. */
84
+ this.enhanced = signal(false, /* @ts-ignore */
85
+ ...(ngDevMode ? [{ debugName: "enhanced" }] : /* istanbul ignore next */ []));
86
+ this.states = computed(() => this.tabPages().map((tab) => ({ disabled: tab.disabled() })), /* @ts-ignore */
87
+ ...(ngDevMode ? [{ debugName: "states" }] : /* istanbul ignore next */ []));
88
+ this.activeIndex = computed(() => {
80
89
  const active = this.activeTab();
81
- if (active)
82
- return active;
83
- if (!this.selectFirstTab())
84
- return null;
85
- return this.tabPages().find(t => !t.disabled()) ?? null;
90
+ return resolveActiveTab(this.states(), active ? this.tabPages().indexOf(active) : null, this.selectFirstTab());
91
+ }, /* @ts-ignore */
92
+ ...(ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []));
93
+ this.checkedTab = computed(() => {
94
+ const index = this.activeIndex();
95
+ return index === null ? null : this.tabPages()[index];
86
96
  }, /* @ts-ignore */
87
97
  ...(ngDevMode ? [{ debugName: "checkedTab" }] : /* istanbul ignore next */ []));
88
- // Stable string ID of the active tab, fed to <mp-tab-control [active-tab]>.
89
- this.activeTabName = computed(() => this.checkedTab()?.tabName() ?? null, /* @ts-ignore */
90
- ...(ngDevMode ? [{ debugName: "activeTabName" }] : /* istanbul ignore next */ []));
91
- this.tabCounter = 0;
92
- this.tabControlId = signal(++BsTabControlComponent.tabControlCounter, /* @ts-ignore */
93
- ...(ngDevMode ? [{ debugName: "tabControlId" }] : /* istanbul ignore next */ []));
94
- effect(() => {
95
- const tabPages = this.tabPages();
96
- const activeTab = this.activeTab();
97
- const selectFirstTab = this.selectFirstTab();
98
- if (tabPages.length > 0 && (!activeTab || !tabPages.some(tp => tp === activeTab)) && selectFirstTab) {
99
- const notDisabled = tabPages.filter((tp) => !tp.disabled());
100
- if (notDisabled.length > 0) {
101
- setTimeout(() => this.activeTab.set(notDisabled[0]));
102
- }
103
- }
104
- });
98
+ this.bottomTabs = computed(() => this.tabsPosition() === 'bottom', /* @ts-ignore */
99
+ ...(ngDevMode ? [{ debugName: "bottomTabs" }] : /* istanbul ignore next */ []));
100
+ this.view = computed(() => connectTabControl({ id: this.id, tabsPosition: this.tabsPosition(), border: this.border(), enhanced: this.enhanced() }, this.states(), this.activeIndex()), /* @ts-ignore */
101
+ ...(ngDevMode ? [{ debugName: "view" }] : /* istanbul ignore next */ []));
102
+ useScopedStyles(TAB_CONTROL_SCOPE, tabControlScopedStyles);
103
+ afterNextRender(() => this.enhanced.set(true));
105
104
  }
106
- static { this.tabControlCounter = 0; }
107
- setActiveTab(tab, event) {
108
- event?.preventDefault();
109
- if (!tab.disabled()) {
105
+ setActiveTab(tab) {
106
+ if (!tab.disabled())
110
107
  this.activeTab.set(tab);
111
- }
112
- return false;
113
108
  }
114
- onTabActivate(event) {
115
- const ce = event;
116
- const tabName = ce.detail.tabId;
117
- const tab = this.tabPages().find(tp => tp.tabName() === tabName);
118
- if (tab && !tab.disabled()) {
109
+ onTabClick(event, tab) {
110
+ // Before enhancement the label forwards to its radio and `change` selects.
111
+ if (!this.enhanced())
112
+ return;
113
+ if (tabControlTabClick(event, tab.disabled()))
119
114
  this.activeTab.set(tab);
120
- }
115
+ }
116
+ onTabKeydown(event, index) {
117
+ const target = tabControlKeydown(this.host, event, index, this.states());
118
+ if (target !== null)
119
+ this.activeTab.set(this.tabPages()[target]);
120
+ }
121
+ onChange(event) {
122
+ const index = tabControlChanged(this.host, event);
123
+ if (index !== null)
124
+ this.activeTab.set(this.tabPages()[index]);
121
125
  }
122
126
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsTabControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
123
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: BsTabControlComponent, isStandalone: true, selector: "bs-tab-control", inputs: { border: { classPropertyName: "border", publicName: "border", isSignal: true, isRequired: false, transformFunction: null }, selectFirstTab: { classPropertyName: "selectFirstTab", publicName: "selectFirstTab", isSignal: true, isRequired: false, transformFunction: null }, tabsPosition: { classPropertyName: "tabsPosition", publicName: "tabsPosition", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "d-block position-relative" }, providers: [
124
- { provide: 'TAB_CONTROL', useExisting: BsTabControlComponent }
125
- ], queries: [{ propertyName: "tabPages", predicate: BsTabPageComponent, isSignal: true }], ngImport: i0, template: "<!-- One ng-content, shared by both branches: with an ng-content in each, Angular projects\n into the LAST one only, so the server branch rendered no pages at all. -->\n<ng-template #pages><ng-content></ng-content></ng-template>\n\n@if (isServerSide) {\n\t@for (tab of tabPages(); track tab) {\n\t\t<!-- The radio IS the control: clipped (not display:none) so Tab reaches\n\t\t it, and the native radio group gives arrow-key switching, a live\n\t\t checked state and the label's text as its name \u2014 all with no script\n\t\t and nothing that can go stale (PRD 11a). -->\n\t\t<input type=\"radio\" class=\"tab-radio\" bsNoNoscript\n\t\t\t[name]=\"tabControlName()\"\n\t\t\t[id]=\"tab.tabName()\"\n\t\t\t[checked]=\"checkedTab() === tab\"\n\t\t\t[disabled]=\"tab.disabled()\"\n\t\t\t[attr.aria-controls]=\"tab.tabName() + '-panel'\">\n\t}\n\t@let activeTabValue = activeTab();\n\t<ng-template #tabStrip>\n\t\t<!-- No role=\"tab\"/aria-selected here: with no script to update them a\n\t\t static aria-selected would lie after the first switch. The labels\n\t\t are the radios' visual skin and accessible name; the radios carry\n\t\t the live selection state natively. -->\n\t\t<ul class=\"nav nav-tabs flex-nowrap overflow-x-auto overflow-y-hidden\">\n\t\t\t@for (tab of tabPages(); track tab) {\n\t\t\t\t@if (tab.headerTemplate()) {\n\t\t\t\t\t<li class=\"nav-item\">\n\t\t\t\t\t\t<label\n\t\t\t\t\t\t\t[for]=\"tab.tabName()\"\n\t\t\t\t\t\t\t[id]=\"tab.tabName() + '-header'\"\n\t\t\t\t\t\t\tclass=\"nav-link text-nowrap\"\n\t\t\t\t\t\t\t[class.active]=\"activeTabValue === tab\"\n\t\t\t\t\t\t\t[class.disabled]=\"tab.disabled()\">\n\t\t\t\t\t\t\t<ng-container [ngTemplateOutlet]=\"tab.headerTemplate()!.template\"></ng-container>\n\t\t\t\t\t\t</label>\n\t\t\t\t\t</li>\n\t\t\t\t}\n\t\t\t}\n\t\t</ul>\n\t</ng-template>\n\t@if (topTabs()) {\n\t\t<div class=\"overflow-hidden mw-100 tsc\">\n\t\t\t<ng-container [ngTemplateOutlet]=\"tabStrip\"></ng-container>\n\t\t</div>\n\t}\n\t<div class=\"tab-content flex-grow-1 overflow-auto\" bsNoNoscript [class.border]=\"border() && activeTabValue\" [class.border-top]=\"border() && !activeTabValue\">\n\t\t<ng-container [ngTemplateOutlet]=\"pages\"></ng-container>\n\t</div>\n\t@if (bottomTabs()) {\n\t\t<div class=\"overflow-hidden mw-100 tsc bottom-tabs\">\n\t\t\t<ng-container [ngTemplateOutlet]=\"tabStrip\"></ng-container>\n\t\t</div>\n\t}\n} @else {\n\t<mp-tab-control #wc\n\t\t[attr.tabs-position]=\"tabsPosition()\"\n\t\t[attr.border]=\"border() ? null : 'false'\"\n\t\t[attr.active-tab]=\"activeTabName()\"\n\t\t[attr.select-first-tab]=\"selectFirstTab() ? null : 'false'\"\n\t\t(tab-activate)=\"onTabActivate($event)\">\n\t\t@for (tab of tabPages(); track tab) {\n\t\t\t@if (tab.headerTemplate()) {\n\t\t\t\t<span [attr.slot]=\"tab.tabName() + '-header'\">\n\t\t\t\t\t<ng-container [ngTemplateOutlet]=\"tab.headerTemplate()!.template\"></ng-container>\n\t\t\t\t</span>\n\t\t\t}\n\t\t}\n\t\t<ng-container [ngTemplateOutlet]=\"pages\"></ng-container>\n\t</mp-tab-control>\n}\n", styles: [":host ::ng-deep .nav{--bs-nav-link-padding-x: 1rem;--bs-nav-link-padding-y: .5rem;--bs-nav-link-font-weight: ;--bs-nav-link-color: var(--bs-link-color);--bs-nav-link-hover-color: var(--bs-link-hover-color);--bs-nav-link-disabled-color: var(--bs-secondary-color);display:flex;flex-wrap:wrap;padding-left:0;margin-bottom:0;list-style:none}:host ::ng-deep .nav-link{display:block;padding:var(--bs-nav-link-padding-y) var(--bs-nav-link-padding-x);font-size:var(--bs-nav-link-font-size);font-weight:var(--bs-nav-link-font-weight);color:var(--bs-nav-link-color);text-decoration:none;background:none;border:0;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out}@media(prefers-reduced-motion:reduce){:host ::ng-deep .nav-link{transition:none}}:host ::ng-deep .nav-link:hover,:host ::ng-deep .nav-link:focus{color:var(--bs-nav-link-hover-color)}:host ::ng-deep .nav-link:focus-visible{outline:0;box-shadow:0 0 0 .25rem #0d6efd40}:host ::ng-deep .nav-link.disabled,:host ::ng-deep .nav-link:disabled{color:var(--bs-nav-link-disabled-color);pointer-events:none;cursor:default}:host ::ng-deep .nav-tabs{--bs-nav-tabs-border-width: var(--bs-border-width);--bs-nav-tabs-border-color: var(--bs-border-color);--bs-nav-tabs-border-radius: var(--bs-border-radius);--bs-nav-tabs-link-hover-border-color: var(--bs-secondary-bg) var(--bs-secondary-bg) var(--bs-border-color);--bs-nav-tabs-link-active-color: var(--bs-emphasis-color);--bs-nav-tabs-link-active-bg: var(--bs-body-bg);--bs-nav-tabs-link-active-border-color: var(--bs-border-color) var(--bs-border-color) var(--bs-body-bg);border-bottom:var(--bs-nav-tabs-border-width) solid var(--bs-nav-tabs-border-color)}:host ::ng-deep .nav-tabs .nav-link{margin-bottom:calc(-1 * var(--bs-nav-tabs-border-width));border:var(--bs-nav-tabs-border-width) solid transparent;border-top-left-radius:var(--bs-nav-tabs-border-radius);border-top-right-radius:var(--bs-nav-tabs-border-radius)}:host ::ng-deep .nav-tabs .nav-link:hover,:host ::ng-deep .nav-tabs .nav-link:focus{isolation:isolate;border-color:var(--bs-nav-tabs-link-hover-border-color)}:host ::ng-deep .nav-tabs .nav-link.active,:host ::ng-deep .nav-tabs .nav-item.show .nav-link{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}:host ::ng-deep .nav-tabs .dropdown-menu{margin-top:calc(-1 * var(--bs-nav-tabs-border-width));border-top-left-radius:0;border-top-right-radius:0}:host ::ng-deep .nav-pills{--bs-nav-pills-border-radius: var(--bs-border-radius);--bs-nav-pills-link-active-color: #fff;--bs-nav-pills-link-active-bg: #0d6efd}:host ::ng-deep .nav-pills .nav-link{border-radius:var(--bs-nav-pills-border-radius)}:host ::ng-deep .nav-pills .nav-link.active,:host ::ng-deep .nav-pills .show>.nav-link{color:var(--bs-nav-pills-link-active-color);background-color:var(--bs-nav-pills-link-active-bg)}:host ::ng-deep .nav-underline{--bs-nav-underline-gap: 1rem;--bs-nav-underline-border-width: .125rem;--bs-nav-underline-link-active-color: var(--bs-emphasis-color);gap:var(--bs-nav-underline-gap)}:host ::ng-deep .nav-underline .nav-link{padding-right:0;padding-left:0;border-bottom:var(--bs-nav-underline-border-width) solid transparent}:host ::ng-deep .nav-underline .nav-link:hover,:host ::ng-deep .nav-underline .nav-link:focus{border-bottom-color:currentcolor}:host ::ng-deep .nav-underline .nav-link.active,:host ::ng-deep .nav-underline .show>.nav-link{font-weight:700;color:var(--bs-nav-underline-link-active-color);border-bottom-color:currentcolor}:host ::ng-deep .nav-fill>.nav-link,:host ::ng-deep .nav-fill .nav-item{flex:1 1 auto;text-align:center}:host ::ng-deep .nav-justified>.nav-link,:host ::ng-deep .nav-justified .nav-item{flex-grow:1;flex-basis:0;text-align:center}:host ::ng-deep .nav-fill .nav-item .nav-link,:host ::ng-deep .nav-justified .nav-item .nav-link{width:100%}:host ::ng-deep .tab-content>.tab-pane{display:none}:host ::ng-deep .tab-content>.active{display:block}:host ::ng-deep .tab-content{margin-top:-1px}.tsc{max-height:41px;top:2px;z-index:10;flex-shrink:0}.tsc .nav.nav-tabs{border-bottom:0}.tsc.bottom-tabs{margin-top:-1px}.tsc.bottom-tabs .nav.nav-tabs{border-bottom-width:0px}.tsc.bottom-tabs .nav.nav-tabs .nav-link{border:1px solid transparent;border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:.25rem;border-bottom-right-radius:.25rem}.tsc.bottom-tabs .nav.nav-tabs .nav-item{margin-bottom:2px;margin-top:-1px}.tsc.bottom-tabs .nav.nav-tabs .nav-item.show .nav-link,.tsc.bottom-tabs .nav.nav-tabs .nav-link.active{border-color:var(--bs-body-bg) var(--bs-border-color) var(--bs-border-color) var(--bs-border-color)}.tab-content.noscript::ng-deep>bs-tab-page>.tab-page-content{border:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important;margin-top:-1px}.overflow-y-hidden{overflow-y:hidden}.tsc .nav-link{cursor:pointer}input.tab-radio{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}:host input.noscript:nth-of-type(1):checked~.tsc .nav-item:nth-child(1)>.nav-link{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}:host input.noscript:nth-of-type(1):focus-visible~.tsc .nav-item:nth-child(1)>.nav-link{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:-2px}:host input.noscript:nth-of-type(2):checked~.tsc .nav-item:nth-child(2)>.nav-link{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}:host input.noscript:nth-of-type(2):focus-visible~.tsc .nav-item:nth-child(2)>.nav-link{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:-2px}:host input.noscript:nth-of-type(3):checked~.tsc .nav-item:nth-child(3)>.nav-link{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}:host input.noscript:nth-of-type(3):focus-visible~.tsc .nav-item:nth-child(3)>.nav-link{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:-2px}:host input.noscript:nth-of-type(4):checked~.tsc .nav-item:nth-child(4)>.nav-link{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}:host input.noscript:nth-of-type(4):focus-visible~.tsc .nav-item:nth-child(4)>.nav-link{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:-2px}:host input.noscript:nth-of-type(5):checked~.tsc .nav-item:nth-child(5)>.nav-link{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}:host input.noscript:nth-of-type(5):focus-visible~.tsc .nav-item:nth-child(5)>.nav-link{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:-2px}:host input.noscript:nth-of-type(6):checked~.tsc .nav-item:nth-child(6)>.nav-link{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}:host input.noscript:nth-of-type(6):focus-visible~.tsc .nav-item:nth-child(6)>.nav-link{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:-2px}:host input.noscript:nth-of-type(7):checked~.tsc .nav-item:nth-child(7)>.nav-link{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}:host input.noscript:nth-of-type(7):focus-visible~.tsc .nav-item:nth-child(7)>.nav-link{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:-2px}:host input.noscript:nth-of-type(8):checked~.tsc .nav-item:nth-child(8)>.nav-link{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}:host input.noscript:nth-of-type(8):focus-visible~.tsc .nav-item:nth-child(8)>.nav-link{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:-2px}:host input.noscript:nth-of-type(9):checked~.tsc .nav-item:nth-child(9)>.nav-link{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}:host input.noscript:nth-of-type(9):focus-visible~.tsc .nav-item:nth-child(9)>.nav-link{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:-2px}:host input.noscript:nth-of-type(10):checked~.tsc .nav-item:nth-child(10)>.nav-link{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}:host input.noscript:nth-of-type(10):focus-visible~.tsc .nav-item:nth-child(10)>.nav-link{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:-2px}:host input.noscript:nth-of-type(11):checked~.tsc .nav-item:nth-child(11)>.nav-link{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}:host input.noscript:nth-of-type(11):focus-visible~.tsc .nav-item:nth-child(11)>.nav-link{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:-2px}:host input.noscript:nth-of-type(12):checked~.tsc .nav-item:nth-child(12)>.nav-link{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}:host input.noscript:nth-of-type(12):focus-visible~.tsc .nav-item:nth-child(12)>.nav-link{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:-2px}:host input.noscript:nth-of-type(13):checked~.tsc .nav-item:nth-child(13)>.nav-link{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}:host input.noscript:nth-of-type(13):focus-visible~.tsc .nav-item:nth-child(13)>.nav-link{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:-2px}:host input.noscript:nth-of-type(14):checked~.tsc .nav-item:nth-child(14)>.nav-link{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}:host input.noscript:nth-of-type(14):focus-visible~.tsc .nav-item:nth-child(14)>.nav-link{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:-2px}:host input.noscript:nth-of-type(15):checked~.tsc .nav-item:nth-child(15)>.nav-link{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}:host input.noscript:nth-of-type(15):focus-visible~.tsc .nav-item:nth-child(15)>.nav-link{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:-2px}:host input.noscript:nth-of-type(16):checked~.tsc .nav-item:nth-child(16)>.nav-link{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}:host input.noscript:nth-of-type(16):focus-visible~.tsc .nav-item:nth-child(16)>.nav-link{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:-2px}:host input.noscript:nth-of-type(17):checked~.tsc .nav-item:nth-child(17)>.nav-link{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}:host input.noscript:nth-of-type(17):focus-visible~.tsc .nav-item:nth-child(17)>.nav-link{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:-2px}:host input.noscript:nth-of-type(18):checked~.tsc .nav-item:nth-child(18)>.nav-link{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}:host input.noscript:nth-of-type(18):focus-visible~.tsc .nav-item:nth-child(18)>.nav-link{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:-2px}:host input.noscript:nth-of-type(19):checked~.tsc .nav-item:nth-child(19)>.nav-link{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}:host input.noscript:nth-of-type(19):focus-visible~.tsc .nav-item:nth-child(19)>.nav-link{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:-2px}:host input.noscript:nth-of-type(20):checked~.tsc .nav-item:nth-child(20)>.nav-link{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}:host input.noscript:nth-of-type(20):focus-visible~.tsc .nav-item:nth-child(20)>.nav-link{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:-2px}:host ::ng-deep input.noscript:nth-of-type(1):checked~.tab-content>bs-tab-page:nth-child(1)>.tab-page-content{display:block}:host ::ng-deep input.noscript:nth-of-type(2):checked~.tab-content>bs-tab-page:nth-child(2)>.tab-page-content{display:block}:host ::ng-deep input.noscript:nth-of-type(3):checked~.tab-content>bs-tab-page:nth-child(3)>.tab-page-content{display:block}:host ::ng-deep input.noscript:nth-of-type(4):checked~.tab-content>bs-tab-page:nth-child(4)>.tab-page-content{display:block}:host ::ng-deep input.noscript:nth-of-type(5):checked~.tab-content>bs-tab-page:nth-child(5)>.tab-page-content{display:block}:host ::ng-deep input.noscript:nth-of-type(6):checked~.tab-content>bs-tab-page:nth-child(6)>.tab-page-content{display:block}:host ::ng-deep input.noscript:nth-of-type(7):checked~.tab-content>bs-tab-page:nth-child(7)>.tab-page-content{display:block}:host ::ng-deep input.noscript:nth-of-type(8):checked~.tab-content>bs-tab-page:nth-child(8)>.tab-page-content{display:block}:host ::ng-deep input.noscript:nth-of-type(9):checked~.tab-content>bs-tab-page:nth-child(9)>.tab-page-content{display:block}:host ::ng-deep input.noscript:nth-of-type(10):checked~.tab-content>bs-tab-page:nth-child(10)>.tab-page-content{display:block}:host ::ng-deep input.noscript:nth-of-type(11):checked~.tab-content>bs-tab-page:nth-child(11)>.tab-page-content{display:block}:host ::ng-deep input.noscript:nth-of-type(12):checked~.tab-content>bs-tab-page:nth-child(12)>.tab-page-content{display:block}:host ::ng-deep input.noscript:nth-of-type(13):checked~.tab-content>bs-tab-page:nth-child(13)>.tab-page-content{display:block}:host ::ng-deep input.noscript:nth-of-type(14):checked~.tab-content>bs-tab-page:nth-child(14)>.tab-page-content{display:block}:host ::ng-deep input.noscript:nth-of-type(15):checked~.tab-content>bs-tab-page:nth-child(15)>.tab-page-content{display:block}:host ::ng-deep input.noscript:nth-of-type(16):checked~.tab-content>bs-tab-page:nth-child(16)>.tab-page-content{display:block}:host ::ng-deep input.noscript:nth-of-type(17):checked~.tab-content>bs-tab-page:nth-child(17)>.tab-page-content{display:block}:host ::ng-deep input.noscript:nth-of-type(18):checked~.tab-content>bs-tab-page:nth-child(18)>.tab-page-content{display:block}:host ::ng-deep input.noscript:nth-of-type(19):checked~.tab-content>bs-tab-page:nth-child(19)>.tab-page-content{display:block}:host ::ng-deep input.noscript:nth-of-type(20):checked~.tab-content>bs-tab-page:nth-child(20)>.tab-page-content{display:block}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: BsNoNoscriptDirective, selector: "[bsNoNoscript]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
127
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: BsTabControlComponent, isStandalone: true, selector: "bs-tab-control", inputs: { border: { classPropertyName: "border", publicName: "border", isSignal: true, isRequired: false, transformFunction: null }, selectFirstTab: { classPropertyName: "selectFirstTab", publicName: "selectFirstTab", isSignal: true, isRequired: false, transformFunction: null }, tabsPosition: { classPropertyName: "tabsPosition", publicName: "tabsPosition", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "change": "onChange($event)" }, properties: { "attr.data-mps": "view().root[\"data-mps\"]", "class.tab-control": "true", "attr.data-tabs-position": "view().root[\"data-tabs-position\"]" } }, queries: [{ propertyName: "tabPages", predicate: i0.forwardRef(() => BsTabPageComponent), isSignal: true }], ngImport: i0, template: "@let v = view();\n@for (tab of tabPages(); track tab; let i = $index) {\n <input [mpProps]=\"v.tabs[i].radio\" [checked]=\"i === activeIndex()\" [attr.checked]=\"i === activeIndex() ? '' : null\">\n}\n@if (!bottomTabs()) {\n <ng-container [ngTemplateOutlet]=\"strip\" />\n}\n<div [mpProps]=\"v.content\">\n @for (tab of tabPages(); track tab; let i = $index) {\n <div [mpProps]=\"v.tabs[i].pane\"><ng-container [ngTemplateOutlet]=\"tab.body() ?? null\" /></div>\n }\n</div>\n@if (bottomTabs()) {\n <ng-container [ngTemplateOutlet]=\"strip\" />\n}\n<ng-content />\n\n<ng-template #strip>\n <div [mpProps]=\"v.strip\">\n <ul [mpProps]=\"v.list\">\n @for (tab of tabPages(); track tab; let i = $index) {\n <li [mpProps]=\"v.item\">\n <label [mpProps]=\"v.tabs[i].tab\" (click)=\"onTabClick($event, tab)\" (keydown)=\"onTabKeydown($event, i)\">\n <ng-container [ngTemplateOutlet]=\"tab.headerTemplate()?.template ?? null\" />\n </label>\n </li>\n }\n </ul>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: MpPropsDirective, selector: "[mpProps]", inputs: ["mpProps"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
126
128
  }
127
129
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsTabControlComponent, decorators: [{
128
130
  type: Component,
129
- args: [{ selector: 'bs-tab-control', imports: [NgTemplateOutlet, BsNoNoscriptDirective], providers: [
130
- { provide: 'TAB_CONTROL', useExisting: BsTabControlComponent }
131
- ], changeDetection: ChangeDetectionStrategy.OnPush, schemas: [CUSTOM_ELEMENTS_SCHEMA], host: {
132
- 'class': 'd-block position-relative',
133
- }, template: "<!-- One ng-content, shared by both branches: with an ng-content in each, Angular projects\n into the LAST one only, so the server branch rendered no pages at all. -->\n<ng-template #pages><ng-content></ng-content></ng-template>\n\n@if (isServerSide) {\n\t@for (tab of tabPages(); track tab) {\n\t\t<!-- The radio IS the control: clipped (not display:none) so Tab reaches\n\t\t it, and the native radio group gives arrow-key switching, a live\n\t\t checked state and the label's text as its name \u2014 all with no script\n\t\t and nothing that can go stale (PRD 11a). -->\n\t\t<input type=\"radio\" class=\"tab-radio\" bsNoNoscript\n\t\t\t[name]=\"tabControlName()\"\n\t\t\t[id]=\"tab.tabName()\"\n\t\t\t[checked]=\"checkedTab() === tab\"\n\t\t\t[disabled]=\"tab.disabled()\"\n\t\t\t[attr.aria-controls]=\"tab.tabName() + '-panel'\">\n\t}\n\t@let activeTabValue = activeTab();\n\t<ng-template #tabStrip>\n\t\t<!-- No role=\"tab\"/aria-selected here: with no script to update them a\n\t\t static aria-selected would lie after the first switch. The labels\n\t\t are the radios' visual skin and accessible name; the radios carry\n\t\t the live selection state natively. -->\n\t\t<ul class=\"nav nav-tabs flex-nowrap overflow-x-auto overflow-y-hidden\">\n\t\t\t@for (tab of tabPages(); track tab) {\n\t\t\t\t@if (tab.headerTemplate()) {\n\t\t\t\t\t<li class=\"nav-item\">\n\t\t\t\t\t\t<label\n\t\t\t\t\t\t\t[for]=\"tab.tabName()\"\n\t\t\t\t\t\t\t[id]=\"tab.tabName() + '-header'\"\n\t\t\t\t\t\t\tclass=\"nav-link text-nowrap\"\n\t\t\t\t\t\t\t[class.active]=\"activeTabValue === tab\"\n\t\t\t\t\t\t\t[class.disabled]=\"tab.disabled()\">\n\t\t\t\t\t\t\t<ng-container [ngTemplateOutlet]=\"tab.headerTemplate()!.template\"></ng-container>\n\t\t\t\t\t\t</label>\n\t\t\t\t\t</li>\n\t\t\t\t}\n\t\t\t}\n\t\t</ul>\n\t</ng-template>\n\t@if (topTabs()) {\n\t\t<div class=\"overflow-hidden mw-100 tsc\">\n\t\t\t<ng-container [ngTemplateOutlet]=\"tabStrip\"></ng-container>\n\t\t</div>\n\t}\n\t<div class=\"tab-content flex-grow-1 overflow-auto\" bsNoNoscript [class.border]=\"border() && activeTabValue\" [class.border-top]=\"border() && !activeTabValue\">\n\t\t<ng-container [ngTemplateOutlet]=\"pages\"></ng-container>\n\t</div>\n\t@if (bottomTabs()) {\n\t\t<div class=\"overflow-hidden mw-100 tsc bottom-tabs\">\n\t\t\t<ng-container [ngTemplateOutlet]=\"tabStrip\"></ng-container>\n\t\t</div>\n\t}\n} @else {\n\t<mp-tab-control #wc\n\t\t[attr.tabs-position]=\"tabsPosition()\"\n\t\t[attr.border]=\"border() ? null : 'false'\"\n\t\t[attr.active-tab]=\"activeTabName()\"\n\t\t[attr.select-first-tab]=\"selectFirstTab() ? null : 'false'\"\n\t\t(tab-activate)=\"onTabActivate($event)\">\n\t\t@for (tab of tabPages(); track tab) {\n\t\t\t@if (tab.headerTemplate()) {\n\t\t\t\t<span [attr.slot]=\"tab.tabName() + '-header'\">\n\t\t\t\t\t<ng-container [ngTemplateOutlet]=\"tab.headerTemplate()!.template\"></ng-container>\n\t\t\t\t</span>\n\t\t\t}\n\t\t}\n\t\t<ng-container [ngTemplateOutlet]=\"pages\"></ng-container>\n\t</mp-tab-control>\n}\n", styles: [":host ::ng-deep .nav{--bs-nav-link-padding-x: 1rem;--bs-nav-link-padding-y: .5rem;--bs-nav-link-font-weight: ;--bs-nav-link-color: var(--bs-link-color);--bs-nav-link-hover-color: var(--bs-link-hover-color);--bs-nav-link-disabled-color: var(--bs-secondary-color);display:flex;flex-wrap:wrap;padding-left:0;margin-bottom:0;list-style:none}:host ::ng-deep .nav-link{display:block;padding:var(--bs-nav-link-padding-y) var(--bs-nav-link-padding-x);font-size:var(--bs-nav-link-font-size);font-weight:var(--bs-nav-link-font-weight);color:var(--bs-nav-link-color);text-decoration:none;background:none;border:0;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out}@media(prefers-reduced-motion:reduce){:host ::ng-deep .nav-link{transition:none}}:host ::ng-deep .nav-link:hover,:host ::ng-deep .nav-link:focus{color:var(--bs-nav-link-hover-color)}:host ::ng-deep .nav-link:focus-visible{outline:0;box-shadow:0 0 0 .25rem #0d6efd40}:host ::ng-deep .nav-link.disabled,:host ::ng-deep .nav-link:disabled{color:var(--bs-nav-link-disabled-color);pointer-events:none;cursor:default}:host ::ng-deep .nav-tabs{--bs-nav-tabs-border-width: var(--bs-border-width);--bs-nav-tabs-border-color: var(--bs-border-color);--bs-nav-tabs-border-radius: var(--bs-border-radius);--bs-nav-tabs-link-hover-border-color: var(--bs-secondary-bg) var(--bs-secondary-bg) var(--bs-border-color);--bs-nav-tabs-link-active-color: var(--bs-emphasis-color);--bs-nav-tabs-link-active-bg: var(--bs-body-bg);--bs-nav-tabs-link-active-border-color: var(--bs-border-color) var(--bs-border-color) var(--bs-body-bg);border-bottom:var(--bs-nav-tabs-border-width) solid var(--bs-nav-tabs-border-color)}:host ::ng-deep .nav-tabs .nav-link{margin-bottom:calc(-1 * var(--bs-nav-tabs-border-width));border:var(--bs-nav-tabs-border-width) solid transparent;border-top-left-radius:var(--bs-nav-tabs-border-radius);border-top-right-radius:var(--bs-nav-tabs-border-radius)}:host ::ng-deep .nav-tabs .nav-link:hover,:host ::ng-deep .nav-tabs .nav-link:focus{isolation:isolate;border-color:var(--bs-nav-tabs-link-hover-border-color)}:host ::ng-deep .nav-tabs .nav-link.active,:host ::ng-deep .nav-tabs .nav-item.show .nav-link{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}:host ::ng-deep .nav-tabs .dropdown-menu{margin-top:calc(-1 * var(--bs-nav-tabs-border-width));border-top-left-radius:0;border-top-right-radius:0}:host ::ng-deep .nav-pills{--bs-nav-pills-border-radius: var(--bs-border-radius);--bs-nav-pills-link-active-color: #fff;--bs-nav-pills-link-active-bg: #0d6efd}:host ::ng-deep .nav-pills .nav-link{border-radius:var(--bs-nav-pills-border-radius)}:host ::ng-deep .nav-pills .nav-link.active,:host ::ng-deep .nav-pills .show>.nav-link{color:var(--bs-nav-pills-link-active-color);background-color:var(--bs-nav-pills-link-active-bg)}:host ::ng-deep .nav-underline{--bs-nav-underline-gap: 1rem;--bs-nav-underline-border-width: .125rem;--bs-nav-underline-link-active-color: var(--bs-emphasis-color);gap:var(--bs-nav-underline-gap)}:host ::ng-deep .nav-underline .nav-link{padding-right:0;padding-left:0;border-bottom:var(--bs-nav-underline-border-width) solid transparent}:host ::ng-deep .nav-underline .nav-link:hover,:host ::ng-deep .nav-underline .nav-link:focus{border-bottom-color:currentcolor}:host ::ng-deep .nav-underline .nav-link.active,:host ::ng-deep .nav-underline .show>.nav-link{font-weight:700;color:var(--bs-nav-underline-link-active-color);border-bottom-color:currentcolor}:host ::ng-deep .nav-fill>.nav-link,:host ::ng-deep .nav-fill .nav-item{flex:1 1 auto;text-align:center}:host ::ng-deep .nav-justified>.nav-link,:host ::ng-deep .nav-justified .nav-item{flex-grow:1;flex-basis:0;text-align:center}:host ::ng-deep .nav-fill .nav-item .nav-link,:host ::ng-deep .nav-justified .nav-item .nav-link{width:100%}:host ::ng-deep .tab-content>.tab-pane{display:none}:host ::ng-deep .tab-content>.active{display:block}:host ::ng-deep .tab-content{margin-top:-1px}.tsc{max-height:41px;top:2px;z-index:10;flex-shrink:0}.tsc .nav.nav-tabs{border-bottom:0}.tsc.bottom-tabs{margin-top:-1px}.tsc.bottom-tabs .nav.nav-tabs{border-bottom-width:0px}.tsc.bottom-tabs .nav.nav-tabs .nav-link{border:1px solid transparent;border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:.25rem;border-bottom-right-radius:.25rem}.tsc.bottom-tabs .nav.nav-tabs .nav-item{margin-bottom:2px;margin-top:-1px}.tsc.bottom-tabs .nav.nav-tabs .nav-item.show .nav-link,.tsc.bottom-tabs .nav.nav-tabs .nav-link.active{border-color:var(--bs-body-bg) var(--bs-border-color) var(--bs-border-color) var(--bs-border-color)}.tab-content.noscript::ng-deep>bs-tab-page>.tab-page-content{border:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important;margin-top:-1px}.overflow-y-hidden{overflow-y:hidden}.tsc .nav-link{cursor:pointer}input.tab-radio{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}:host input.noscript:nth-of-type(1):checked~.tsc .nav-item:nth-child(1)>.nav-link{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}:host input.noscript:nth-of-type(1):focus-visible~.tsc .nav-item:nth-child(1)>.nav-link{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:-2px}:host input.noscript:nth-of-type(2):checked~.tsc .nav-item:nth-child(2)>.nav-link{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}:host input.noscript:nth-of-type(2):focus-visible~.tsc .nav-item:nth-child(2)>.nav-link{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:-2px}:host input.noscript:nth-of-type(3):checked~.tsc .nav-item:nth-child(3)>.nav-link{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}:host input.noscript:nth-of-type(3):focus-visible~.tsc .nav-item:nth-child(3)>.nav-link{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:-2px}:host input.noscript:nth-of-type(4):checked~.tsc .nav-item:nth-child(4)>.nav-link{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}:host input.noscript:nth-of-type(4):focus-visible~.tsc .nav-item:nth-child(4)>.nav-link{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:-2px}:host input.noscript:nth-of-type(5):checked~.tsc .nav-item:nth-child(5)>.nav-link{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}:host input.noscript:nth-of-type(5):focus-visible~.tsc .nav-item:nth-child(5)>.nav-link{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:-2px}:host input.noscript:nth-of-type(6):checked~.tsc .nav-item:nth-child(6)>.nav-link{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}:host input.noscript:nth-of-type(6):focus-visible~.tsc .nav-item:nth-child(6)>.nav-link{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:-2px}:host input.noscript:nth-of-type(7):checked~.tsc .nav-item:nth-child(7)>.nav-link{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}:host input.noscript:nth-of-type(7):focus-visible~.tsc .nav-item:nth-child(7)>.nav-link{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:-2px}:host input.noscript:nth-of-type(8):checked~.tsc .nav-item:nth-child(8)>.nav-link{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}:host input.noscript:nth-of-type(8):focus-visible~.tsc .nav-item:nth-child(8)>.nav-link{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:-2px}:host input.noscript:nth-of-type(9):checked~.tsc .nav-item:nth-child(9)>.nav-link{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}:host input.noscript:nth-of-type(9):focus-visible~.tsc .nav-item:nth-child(9)>.nav-link{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:-2px}:host input.noscript:nth-of-type(10):checked~.tsc .nav-item:nth-child(10)>.nav-link{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}:host input.noscript:nth-of-type(10):focus-visible~.tsc .nav-item:nth-child(10)>.nav-link{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:-2px}:host input.noscript:nth-of-type(11):checked~.tsc .nav-item:nth-child(11)>.nav-link{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}:host input.noscript:nth-of-type(11):focus-visible~.tsc .nav-item:nth-child(11)>.nav-link{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:-2px}:host input.noscript:nth-of-type(12):checked~.tsc .nav-item:nth-child(12)>.nav-link{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}:host input.noscript:nth-of-type(12):focus-visible~.tsc .nav-item:nth-child(12)>.nav-link{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:-2px}:host input.noscript:nth-of-type(13):checked~.tsc .nav-item:nth-child(13)>.nav-link{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}:host input.noscript:nth-of-type(13):focus-visible~.tsc .nav-item:nth-child(13)>.nav-link{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:-2px}:host input.noscript:nth-of-type(14):checked~.tsc .nav-item:nth-child(14)>.nav-link{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}:host input.noscript:nth-of-type(14):focus-visible~.tsc .nav-item:nth-child(14)>.nav-link{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:-2px}:host input.noscript:nth-of-type(15):checked~.tsc .nav-item:nth-child(15)>.nav-link{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}:host input.noscript:nth-of-type(15):focus-visible~.tsc .nav-item:nth-child(15)>.nav-link{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:-2px}:host input.noscript:nth-of-type(16):checked~.tsc .nav-item:nth-child(16)>.nav-link{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}:host input.noscript:nth-of-type(16):focus-visible~.tsc .nav-item:nth-child(16)>.nav-link{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:-2px}:host input.noscript:nth-of-type(17):checked~.tsc .nav-item:nth-child(17)>.nav-link{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}:host input.noscript:nth-of-type(17):focus-visible~.tsc .nav-item:nth-child(17)>.nav-link{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:-2px}:host input.noscript:nth-of-type(18):checked~.tsc .nav-item:nth-child(18)>.nav-link{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}:host input.noscript:nth-of-type(18):focus-visible~.tsc .nav-item:nth-child(18)>.nav-link{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:-2px}:host input.noscript:nth-of-type(19):checked~.tsc .nav-item:nth-child(19)>.nav-link{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}:host input.noscript:nth-of-type(19):focus-visible~.tsc .nav-item:nth-child(19)>.nav-link{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:-2px}:host input.noscript:nth-of-type(20):checked~.tsc .nav-item:nth-child(20)>.nav-link{color:var(--bs-nav-tabs-link-active-color);background-color:var(--bs-nav-tabs-link-active-bg);border-color:var(--bs-nav-tabs-link-active-border-color)}:host input.noscript:nth-of-type(20):focus-visible~.tsc .nav-item:nth-child(20)>.nav-link{outline:2px solid var(--bs-primary, #0d6efd);outline-offset:-2px}:host ::ng-deep input.noscript:nth-of-type(1):checked~.tab-content>bs-tab-page:nth-child(1)>.tab-page-content{display:block}:host ::ng-deep input.noscript:nth-of-type(2):checked~.tab-content>bs-tab-page:nth-child(2)>.tab-page-content{display:block}:host ::ng-deep input.noscript:nth-of-type(3):checked~.tab-content>bs-tab-page:nth-child(3)>.tab-page-content{display:block}:host ::ng-deep input.noscript:nth-of-type(4):checked~.tab-content>bs-tab-page:nth-child(4)>.tab-page-content{display:block}:host ::ng-deep input.noscript:nth-of-type(5):checked~.tab-content>bs-tab-page:nth-child(5)>.tab-page-content{display:block}:host ::ng-deep input.noscript:nth-of-type(6):checked~.tab-content>bs-tab-page:nth-child(6)>.tab-page-content{display:block}:host ::ng-deep input.noscript:nth-of-type(7):checked~.tab-content>bs-tab-page:nth-child(7)>.tab-page-content{display:block}:host ::ng-deep input.noscript:nth-of-type(8):checked~.tab-content>bs-tab-page:nth-child(8)>.tab-page-content{display:block}:host ::ng-deep input.noscript:nth-of-type(9):checked~.tab-content>bs-tab-page:nth-child(9)>.tab-page-content{display:block}:host ::ng-deep input.noscript:nth-of-type(10):checked~.tab-content>bs-tab-page:nth-child(10)>.tab-page-content{display:block}:host ::ng-deep input.noscript:nth-of-type(11):checked~.tab-content>bs-tab-page:nth-child(11)>.tab-page-content{display:block}:host ::ng-deep input.noscript:nth-of-type(12):checked~.tab-content>bs-tab-page:nth-child(12)>.tab-page-content{display:block}:host ::ng-deep input.noscript:nth-of-type(13):checked~.tab-content>bs-tab-page:nth-child(13)>.tab-page-content{display:block}:host ::ng-deep input.noscript:nth-of-type(14):checked~.tab-content>bs-tab-page:nth-child(14)>.tab-page-content{display:block}:host ::ng-deep input.noscript:nth-of-type(15):checked~.tab-content>bs-tab-page:nth-child(15)>.tab-page-content{display:block}:host ::ng-deep input.noscript:nth-of-type(16):checked~.tab-content>bs-tab-page:nth-child(16)>.tab-page-content{display:block}:host ::ng-deep input.noscript:nth-of-type(17):checked~.tab-content>bs-tab-page:nth-child(17)>.tab-page-content{display:block}:host ::ng-deep input.noscript:nth-of-type(18):checked~.tab-content>bs-tab-page:nth-child(18)>.tab-page-content{display:block}:host ::ng-deep input.noscript:nth-of-type(19):checked~.tab-content>bs-tab-page:nth-child(19)>.tab-page-content{display:block}:host ::ng-deep input.noscript:nth-of-type(20):checked~.tab-content>bs-tab-page:nth-child(20)>.tab-page-content{display:block}\n"] }]
134
- }], ctorParameters: () => [], propDecorators: { border: [{ type: i0.Input, args: [{ isSignal: true, alias: "border", required: false }] }], selectFirstTab: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectFirstTab", required: false }] }], tabsPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabsPosition", required: false }] }], tabPages: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => BsTabPageComponent), { isSignal: true }] }] } });
131
+ args: [{ selector: 'bs-tab-control', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MpPropsDirective, NgTemplateOutlet], host: {
132
+ '[attr.data-mps]': 'view().root["data-mps"]',
133
+ '[class.tab-control]': 'true',
134
+ '[attr.data-tabs-position]': 'view().root["data-tabs-position"]',
135
+ '(change)': 'onChange($event)',
136
+ }, template: "@let v = view();\n@for (tab of tabPages(); track tab; let i = $index) {\n <input [mpProps]=\"v.tabs[i].radio\" [checked]=\"i === activeIndex()\" [attr.checked]=\"i === activeIndex() ? '' : null\">\n}\n@if (!bottomTabs()) {\n <ng-container [ngTemplateOutlet]=\"strip\" />\n}\n<div [mpProps]=\"v.content\">\n @for (tab of tabPages(); track tab; let i = $index) {\n <div [mpProps]=\"v.tabs[i].pane\"><ng-container [ngTemplateOutlet]=\"tab.body() ?? null\" /></div>\n }\n</div>\n@if (bottomTabs()) {\n <ng-container [ngTemplateOutlet]=\"strip\" />\n}\n<ng-content />\n\n<ng-template #strip>\n <div [mpProps]=\"v.strip\">\n <ul [mpProps]=\"v.list\">\n @for (tab of tabPages(); track tab; let i = $index) {\n <li [mpProps]=\"v.item\">\n <label [mpProps]=\"v.tabs[i].tab\" (click)=\"onTabClick($event, tab)\" (keydown)=\"onTabKeydown($event, i)\">\n <ng-container [ngTemplateOutlet]=\"tab.headerTemplate()?.template ?? null\" />\n </label>\n </li>\n }\n </ul>\n </div>\n</ng-template>\n" }]
137
+ }], ctorParameters: () => [], propDecorators: { border: [{ type: i0.Input, args: [{ isSignal: true, alias: "border", required: false }] }], selectFirstTab: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectFirstTab", required: false }] }], tabsPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabsPosition", required: false }] }], tabPages: [{ type: i0.ContentChildren, args: [forwardRef(() => BsTabPageComponent), { isSignal: true }] }] } });
135
138
 
136
139
  /**
137
140
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"mintplayer-ng-bootstrap-tab-control.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/tab-control/src/tab-page-header/tab-page-header.directive.ts","../../../../libs/mintplayer-ng-bootstrap/tab-control/src/tab-page/tab-page.component.ts","../../../../libs/mintplayer-ng-bootstrap/tab-control/src/tab-page/tab-page.component.html","../../../../libs/mintplayer-ng-bootstrap/tab-control/src/tab-control/tab-control.component.ts","../../../../libs/mintplayer-ng-bootstrap/tab-control/src/tab-control/tab-control.component.html","../../../../libs/mintplayer-ng-bootstrap/tab-control/mintplayer-ng-bootstrap-tab-control.ts"],"sourcesContent":["import { Directive, inject, TemplateRef } from '@angular/core';\n\n@Directive({\n selector: '[bsTabPageHeader]',\n})\nexport class BsTabPageHeaderDirective {\n template = inject(TemplateRef);\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, contentChild, computed, inject, input, ElementRef, signal } from '@angular/core';\nimport { BsTabControlComponent } from '../tab-control/tab-control.component';\nimport { BsTabPageHeaderDirective } from '../tab-page-header/tab-page-header.directive';\n\n@Component({\n selector: 'bs-tab-page',\n templateUrl: './tab-page.component.html',\n styleUrls: ['./tab-page.component.scss'],\n imports: [NgTemplateOutlet],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n // Used by <mp-tab-control> to project the active page into its content slot.\n '[attr.slot]': 'contentSlotName()',\n // Tells <mp-tab-control> the tab is disabled without inspecting child types.\n '[attr.data-disabled]': 'disabled() ? \"\" : null',\n // NO client-side ARIA here: <mp-tab-control> already renders the\n // role=tabpanel wrapper (with aria-labelledby) in its shadow root, so a\n // second tabpanel on this host announced every page twice and its id\n // duplicated an IDREF target. The SSR branch renders its own region\n // inside the template instead.\n },\n})\nexport class BsTabPageComponent {\n element = inject(ElementRef);\n tabControl = inject(BsTabControlComponent);\n\n constructor() {\n this.tabId = signal(++this.tabControl.tabCounter);\n }\n tabId = signal<number>(0);\n tabName = computed(() => `${this.tabControl.tabControlName()}-${this.tabId()}`);\n contentSlotName = computed(() =>\n this.tabControl.isServerSide ? null : `${this.tabName()}-content`,\n );\n\n disabled = input(false);\n readonly headerTemplate = contentChild(BsTabPageHeaderDirective);\n}\n","<!-- One ng-content for both branches (see bs-tab-control): Angular projects into the last. -->\n<ng-template #content><ng-content></ng-content></ng-template>\n\n@if (tabControl.isServerSide) {\n\t<!-- region, not tabpanel: the no-JS tier ships no role=\"tab\" (a static\n\t aria-selected would go stale), and a tabpanel without a tab is an\n\t orphan. The label id still names the region. -->\n\t<div [id]=\"tabName() + '-panel'\"\n\t\tclass=\"tab-page-content\"\n\t\trole=\"region\"\n\t\t[attr.aria-labelledby]=\"tabName() + '-header'\"\n\t\t[class.d-block]=\"tabControl.activeTab() === this\">\n\t\t<ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n\t</div>\n} @else {\n\t<ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n}\n","import { isPlatformServer, NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, contentChildren, CUSTOM_ELEMENTS_SCHEMA, effect, ElementRef, inject, input, PLATFORM_ID, signal } from '@angular/core';\nimport { BsNoNoscriptDirective } from '@mintplayer/ng-bootstrap/no-noscript';\nimport '@mintplayer/web-components/tab-control';\nimport type { TabActivateEventDetail } from '@mintplayer/web-components/tab-control';\nimport { BsTabPageComponent } from '../tab-page/tab-page.component';\nimport { BsTabsPosition } from '../tabs-position';\n\n@Component({\n selector: 'bs-tab-control',\n templateUrl: './tab-control.component.html',\n styleUrls: ['./tab-control.component.scss'],\n imports: [NgTemplateOutlet, BsNoNoscriptDirective],\n providers: [\n { provide: 'TAB_CONTROL', useExisting: BsTabControlComponent }\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n host: {\n 'class': 'd-block position-relative',\n },\n})\nexport class BsTabControlComponent {\n element = inject(ElementRef);\n private platformId = inject(PLATFORM_ID);\n\n readonly isServerSide = isPlatformServer(this.platformId);\n\n constructor() {\n this.tabControlId = signal(++BsTabControlComponent.tabControlCounter);\n\n effect(() => {\n const tabPages = this.tabPages();\n const activeTab = this.activeTab();\n const selectFirstTab = this.selectFirstTab();\n if (tabPages.length > 0 && (!activeTab || !tabPages.some(tp => tp === activeTab)) && selectFirstTab) {\n const notDisabled = tabPages.filter((tp) => !tp.disabled());\n if (notDisabled.length > 0) {\n setTimeout(() => this.activeTab.set(notDisabled[0]));\n }\n }\n });\n }\n\n border = input(true);\n selectFirstTab = input(true);\n tabsPosition = input<BsTabsPosition>('top');\n\n readonly tabPages = contentChildren(BsTabPageComponent);\n activeTab = signal<BsTabPageComponent | null>(null);\n tabControlId = signal<number>(0);\n tabControlName = computed(() => `bs-tab-control-${this.tabControlId()}`);\n topTabs = computed(() => this.tabsPosition() === 'top');\n bottomTabs = computed(() => this.tabsPosition() === 'bottom');\n checkedTab = computed(() => {\n const active = this.activeTab();\n if (active) return active;\n if (!this.selectFirstTab()) return null;\n return this.tabPages().find(t => !t.disabled()) ?? null;\n });\n // Stable string ID of the active tab, fed to <mp-tab-control [active-tab]>.\n activeTabName = computed(() => this.checkedTab()?.tabName() ?? null);\n static tabControlCounter = 0;\n tabCounter = 0;\n\n setActiveTab(tab: BsTabPageComponent, event?: Event) {\n event?.preventDefault();\n if (!tab.disabled()) {\n this.activeTab.set(tab);\n }\n return false;\n }\n\n onTabActivate(event: Event) {\n const ce = event as CustomEvent<TabActivateEventDetail>;\n const tabName = ce.detail.tabId;\n const tab = this.tabPages().find(tp => tp.tabName() === tabName);\n if (tab && !tab.disabled()) {\n this.activeTab.set(tab);\n }\n }\n}\n","<!-- One ng-content, shared by both branches: with an ng-content in each, Angular projects\n into the LAST one only, so the server branch rendered no pages at all. -->\n<ng-template #pages><ng-content></ng-content></ng-template>\n\n@if (isServerSide) {\n\t@for (tab of tabPages(); track tab) {\n\t\t<!-- The radio IS the control: clipped (not display:none) so Tab reaches\n\t\t it, and the native radio group gives arrow-key switching, a live\n\t\t checked state and the label's text as its name — all with no script\n\t\t and nothing that can go stale (PRD 11a). -->\n\t\t<input type=\"radio\" class=\"tab-radio\" bsNoNoscript\n\t\t\t[name]=\"tabControlName()\"\n\t\t\t[id]=\"tab.tabName()\"\n\t\t\t[checked]=\"checkedTab() === tab\"\n\t\t\t[disabled]=\"tab.disabled()\"\n\t\t\t[attr.aria-controls]=\"tab.tabName() + '-panel'\">\n\t}\n\t@let activeTabValue = activeTab();\n\t<ng-template #tabStrip>\n\t\t<!-- No role=\"tab\"/aria-selected here: with no script to update them a\n\t\t static aria-selected would lie after the first switch. The labels\n\t\t are the radios' visual skin and accessible name; the radios carry\n\t\t the live selection state natively. -->\n\t\t<ul class=\"nav nav-tabs flex-nowrap overflow-x-auto overflow-y-hidden\">\n\t\t\t@for (tab of tabPages(); track tab) {\n\t\t\t\t@if (tab.headerTemplate()) {\n\t\t\t\t\t<li class=\"nav-item\">\n\t\t\t\t\t\t<label\n\t\t\t\t\t\t\t[for]=\"tab.tabName()\"\n\t\t\t\t\t\t\t[id]=\"tab.tabName() + '-header'\"\n\t\t\t\t\t\t\tclass=\"nav-link text-nowrap\"\n\t\t\t\t\t\t\t[class.active]=\"activeTabValue === tab\"\n\t\t\t\t\t\t\t[class.disabled]=\"tab.disabled()\">\n\t\t\t\t\t\t\t<ng-container [ngTemplateOutlet]=\"tab.headerTemplate()!.template\"></ng-container>\n\t\t\t\t\t\t</label>\n\t\t\t\t\t</li>\n\t\t\t\t}\n\t\t\t}\n\t\t</ul>\n\t</ng-template>\n\t@if (topTabs()) {\n\t\t<div class=\"overflow-hidden mw-100 tsc\">\n\t\t\t<ng-container [ngTemplateOutlet]=\"tabStrip\"></ng-container>\n\t\t</div>\n\t}\n\t<div class=\"tab-content flex-grow-1 overflow-auto\" bsNoNoscript [class.border]=\"border() && activeTabValue\" [class.border-top]=\"border() && !activeTabValue\">\n\t\t<ng-container [ngTemplateOutlet]=\"pages\"></ng-container>\n\t</div>\n\t@if (bottomTabs()) {\n\t\t<div class=\"overflow-hidden mw-100 tsc bottom-tabs\">\n\t\t\t<ng-container [ngTemplateOutlet]=\"tabStrip\"></ng-container>\n\t\t</div>\n\t}\n} @else {\n\t<mp-tab-control #wc\n\t\t[attr.tabs-position]=\"tabsPosition()\"\n\t\t[attr.border]=\"border() ? null : 'false'\"\n\t\t[attr.active-tab]=\"activeTabName()\"\n\t\t[attr.select-first-tab]=\"selectFirstTab() ? null : 'false'\"\n\t\t(tab-activate)=\"onTabActivate($event)\">\n\t\t@for (tab of tabPages(); track tab) {\n\t\t\t@if (tab.headerTemplate()) {\n\t\t\t\t<span [attr.slot]=\"tab.tabName() + '-header'\">\n\t\t\t\t\t<ng-container [ngTemplateOutlet]=\"tab.headerTemplate()!.template\"></ng-container>\n\t\t\t\t</span>\n\t\t\t}\n\t\t}\n\t\t<ng-container [ngTemplateOutlet]=\"pages\"></ng-container>\n\t</mp-tab-control>\n}\n","/**\n * Gener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ayer-ng-bootstrap/tab-control/src/tab-page-header/tab-page-header.directive.ts","../../../../libs/mintplayer-ng-bootstrap/tab-control/src/tab-page/tab-page.component.ts","../../../../libs/mintplayer-ng-bootstrap/tab-control/src/tab-control/tab-control.component.ts","../../../../libs/mintplayer-ng-bootstrap/tab-control/src/tab-control/tab-control.component.html","../../../../libs/mintplayer-ng-bootstrap/tab-control/mintplayer-ng-bootstrap-tab-control.ts"],"sourcesContent":["import { Directive, inject, TemplateRef } from '@angular/core';\n\n@Directive({\n selector: '[bsTabPageHeader]',\n})\nexport class BsTabPageHeaderDirective {\n template = inject(TemplateRef);\n}\n","import { ChangeDetectionStrategy, Component, contentChild, input, TemplateRef, viewChild } from '@angular/core';\nimport { BsTabPageHeaderDirective } from '../tab-page-header/tab-page-header.directive';\n\n/**\n * One page of a `<bs-tab-control>`. Renders nothing itself: the control\n * renders every radio, tab and pane as siblings (the CSS pairs the n-th radio\n * with the n-th pane), so the page hands over its header and body templates.\n */\n@Component({\n selector: 'bs-tab-page',\n template: '<ng-template #body><ng-content /></ng-template>',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { hidden: '' },\n})\nexport class BsTabPageComponent {\n readonly disabled = input(false);\n readonly headerTemplate = contentChild(BsTabPageHeaderDirective);\n readonly body = viewChild<TemplateRef<unknown>>('body');\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChildren,\n ElementRef,\n forwardRef,\n inject,\n input,\n signal,\n} from '@angular/core';\nimport { BsIdService } from '@mintplayer/ng-bootstrap/a11y';\nimport { MpPropsDirective, useScopedStyles } from '@mintplayer/ng-bootstrap/machine';\nimport {\n connectTabControl,\n resolveActiveTab,\n TAB_CONTROL_SCOPE,\n tabControlChanged,\n tabControlKeydown,\n tabControlScopedStyles,\n tabControlTabClick,\n} from '@mintplayer/ui-core/tab-control';\nimport { BsTabPageComponent } from '../tab-page/tab-page.component';\nimport { BsTabsPosition } from '../tabs-position';\n\n/**\n * `<bs-tab-control>` — Bootstrap nav-tabs over one native radio per tab (#437).\n *\n * <bs-tab-control [border]=\"true\" tabsPosition=\"top\">\n * <bs-tab-page [disabled]=\"false\">\n * <ng-container *bsTabPageHeader>Profile</ng-container>\n * Page content\n * </bs-tab-page>\n * </bs-tab-control>\n *\n * Renders the markup of `@mintplayer/ui-core/tab-control` in its own\n * template, so the server-rendered page is a working tab control: the\n * checked radio shows its pane through CSS with JavaScript off. Once the\n * client has rendered, the labels become APG tabs (roving tabindex,\n * automatic activation) and the radios leave the tab order. The host is the\n * `.tab-control` root; each page hands over its header and body as templates.\n */\n@Component({\n selector: 'bs-tab-control',\n templateUrl: './tab-control.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [MpPropsDirective, NgTemplateOutlet],\n host: {\n '[attr.data-mps]': 'view().root[\"data-mps\"]',\n '[class.tab-control]': 'true',\n '[attr.data-tabs-position]': 'view().root[\"data-tabs-position\"]',\n '(change)': 'onChange($event)',\n },\n})\nexport class BsTabControlComponent {\n /** Draw the outline around the active pane. */\n readonly border = input(true);\n /** Show the first enabled page while none is active. */\n readonly selectFirstTab = input(true);\n readonly tabsPosition = input<BsTabsPosition>('top');\n\n readonly tabPages = contentChildren<BsTabPageComponent>(forwardRef(() => BsTabPageComponent));\n /** The page the user picked; `checkedTab` is the one that is shown. */\n readonly activeTab = signal<BsTabPageComponent | null>(null);\n\n private readonly host = inject(ElementRef).nativeElement as HTMLElement;\n private readonly id = inject(BsIdService).next('bs-tab-control');\n /** The client has rendered: switch from the radio tier to the tab tier. */\n private readonly enhanced = signal(false);\n\n private readonly states = computed(() => this.tabPages().map((tab) => ({ disabled: tab.disabled() })));\n protected readonly activeIndex = computed(() => {\n const active = this.activeTab();\n return resolveActiveTab(this.states(), active ? this.tabPages().indexOf(active) : null, this.selectFirstTab());\n });\n readonly checkedTab = computed(() => {\n const index = this.activeIndex();\n return index === null ? null : this.tabPages()[index];\n });\n protected readonly bottomTabs = computed(() => this.tabsPosition() === 'bottom');\n protected readonly view = computed(() =>\n connectTabControl(\n { id: this.id, tabsPosition: this.tabsPosition(), border: this.border(), enhanced: this.enhanced() },\n this.states(),\n this.activeIndex(),\n ),\n );\n\n constructor() {\n useScopedStyles(TAB_CONTROL_SCOPE, tabControlScopedStyles);\n afterNextRender(() => this.enhanced.set(true));\n }\n\n setActiveTab(tab: BsTabPageComponent): void {\n if (!tab.disabled()) this.activeTab.set(tab);\n }\n\n protected onTabClick(event: Event, tab: BsTabPageComponent): void {\n // Before enhancement the label forwards to its radio and `change` selects.\n if (!this.enhanced()) return;\n if (tabControlTabClick(event, tab.disabled())) this.activeTab.set(tab);\n }\n\n protected onTabKeydown(event: KeyboardEvent, index: number): void {\n const target = tabControlKeydown(this.host, event, index, this.states());\n if (target !== null) this.activeTab.set(this.tabPages()[target]);\n }\n\n protected onChange(event: Event): void {\n const index = tabControlChanged(this.host, event);\n if (index !== null) this.activeTab.set(this.tabPages()[index]);\n }\n}\n","@let v = view();\n@for (tab of tabPages(); track tab; let i = $index) {\n <input [mpProps]=\"v.tabs[i].radio\" [checked]=\"i === activeIndex()\" [attr.checked]=\"i === activeIndex() ? '' : null\">\n}\n@if (!bottomTabs()) {\n <ng-container [ngTemplateOutlet]=\"strip\" />\n}\n<div [mpProps]=\"v.content\">\n @for (tab of tabPages(); track tab; let i = $index) {\n <div [mpProps]=\"v.tabs[i].pane\"><ng-container [ngTemplateOutlet]=\"tab.body() ?? null\" /></div>\n }\n</div>\n@if (bottomTabs()) {\n <ng-container [ngTemplateOutlet]=\"strip\" />\n}\n<ng-content />\n\n<ng-template #strip>\n <div [mpProps]=\"v.strip\">\n <ul [mpProps]=\"v.list\">\n @for (tab of tabPages(); track tab; let i = $index) {\n <li [mpProps]=\"v.item\">\n <label [mpProps]=\"v.tabs[i].tab\" (click)=\"onTabClick($event, tab)\" (keydown)=\"onTabKeydown($event, i)\">\n <ng-container [ngTemplateOutlet]=\"tab.headerTemplate()?.template ?? null\"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AAC/B,qBAAA,EAAA,QAAA,EAAA,0hCAAA,EAAA;AASuD,SAAA,CAAA,EAAA,cAAA,EAAA,MAAA,EAAA,EAAA,cAAA,EAAA,EAAA,MAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,QAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,cAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,gBAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,cAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,IAAA,EAAA,CAAA,UAAU,CAAC,MAAM,kBAAkB,CAAC,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE/D9F;;AAEG;;;;"}
@@ -22,8 +22,7 @@ class BsTableComponent {
22
22
  ...(ngDevMode ? [{ debugName: "border" }] : /* istanbul ignore next */ []));
23
23
  /**
24
24
  * Forwards `aria-rowcount` onto the wrapped `<table>` element. Used by
25
- * virtualised consumers (the virtual-mode branch of `<bs-datatable>`)
26
- * that need SR users to hear "row N of Y" with Y matching the full
25
+ * virtualised consumers that need SR users to hear "row N of Y" with Y matching the full
27
26
  * record set, not the DOM slice. `null` (default) leaves the attribute
28
27
  * off entirely.
29
28
  */
@@ -1 +1 @@
1
- {"version":3,"file":"mintplayer-ng-bootstrap-table.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/table/src/table-styles/table-styles.component.ts","../../../../libs/mintplayer-ng-bootstrap/table/src/component/table.component.ts","../../../../libs/mintplayer-ng-bootstrap/table/src/component/table.component.html","../../../../libs/mintplayer-ng-bootstrap/table/mintplayer-ng-bootstrap-table.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'bs-table-styles',\n template: '<ng-content></ng-content>',\n styleUrls: ['./table-styles.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsTableStylesComponent {}\n","import { ChangeDetectionStrategy, Component, input } from '@angular/core';\nimport { BsTableStylesComponent } from '../table-styles/table-styles.component';\n\n@Component({\n selector: 'bs-table',\n templateUrl: './table.component.html',\n styleUrls: ['./table.component.scss'],\n imports: [BsTableStylesComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsTableComponent {\n isResponsive = input(false);\n striped = input(false);\n hover = input(false);\n border = input(false);\n /**\n * Forwards `aria-rowcount` onto the wrapped `<table>` element. Used by\n * virtualised consumers (the virtual-mode branch of `<bs-datatable>`)\n * that need SR users to hear \"row N of Y\" with Y matching the full\n * record set, not the DOM slice. `null` (default) leaves the attribute\n * off entirely.\n */\n ariaRowCount = input<number | null>(null);\n}\n","<bs-table-styles>\n <div class=\"d-block\" [class.table-responsive]=\"isResponsive()\" [class.nowrap]=\"isResponsive()\">\n <table class=\"table\" cellspacing=\"0\"\n [class.mb-0]=\"isResponsive()\"\n [class.table-striped]=\"striped()\"\n [class.table-hover]=\"hover()\"\n [class.border]=\"border()\"\n [attr.aria-rowcount]=\"ariaRowCount()\">\n\n <ng-content></ng-content>\n\n </table>\n </div>\n</bs-table-styles>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAQa,sBAAsB,CAAA;8GAAtB,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CA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","../../../../libs/mintplayer-ng-bootstrap/table/src/component/table.component.ts","../../../../libs/mintplayer-ng-bootstrap/table/src/component/table.component.html","../../../../libs/mintplayer-ng-bootstrap/table/mintplayer-ng-bootstrap-table.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'bs-table-styles',\n template: '<ng-content></ng-content>',\n styleUrls: ['./table-styles.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsTableStylesComponent {}\n","import { ChangeDetectionStrategy, Component, input } from '@angular/core';\nimport { BsTableStylesComponent } from '../table-styles/table-styles.component';\n\n@Component({\n selector: 'bs-table',\n templateUrl: './table.component.html',\n styleUrls: ['./table.component.scss'],\n imports: [BsTableStylesComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsTableComponent {\n isResponsive = input(false);\n striped = input(false);\n hover = input(false);\n border = input(false);\n /**\n * Forwards `aria-rowcount` onto the wrapped `<table>` element. Used by\n * virtualised consumers that need SR users to hear \"row N of Y\" with Y matching the full\n * record set, not the DOM slice. `null` (default) leaves the attribute\n * off entirely.\n */\n ariaRowCount = input<number | null>(null);\n}\n","<bs-table-styles>\n <div class=\"d-block\" [class.table-responsive]=\"isResponsive()\" [class.nowrap]=\"isResponsive()\">\n <table class=\"table\" cellspacing=\"0\"\n [class.mb-0]=\"isResponsive()\"\n [class.table-striped]=\"striped()\"\n [class.table-hover]=\"hover()\"\n [class.border]=\"border()\"\n [attr.aria-rowcount]=\"ariaRowCount()\">\n\n <ng-content></ng-content>\n\n </table>\n </div>\n</bs-table-styles>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAQa,sBAAsB,CAAA;8GAAtB,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAtB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,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EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,KAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,MAAA,EAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,UAAA,EAAA,QAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,YAAA,EAAA,EAAA,iBAAA,EAAA,cAAA,EAAA,UAAA,EAAA,cAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECV7B,yfAcA,EAAA,MAAA,EAAA,CAAA,qEAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDPY,sBAAsB,EAAA,QAAA,EAAA,iBAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAGrB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAP5B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,UAAU,WAGX,CAAC,sBAAsB,CAAC,EAAA,eAAA,EAChB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,yfAAA,EAAA,MAAA,EAAA,CAAA,qEAAA,CAAA,EAAA;;;AERjD;;AAEG;;;;"}
@@ -1,9 +1,9 @@
1
- import { resolveServerTheme, readDefaultModeMeta, getBsThemeStore, configureBsTheme, MpThemeToggle, BS_THEME_DEFAULT_MODES } from '@mintplayer/web-components/theming';
2
- export { BS_THEME_COOKIE_NAME, BS_THEME_DEFAULT_MODES, BS_THEME_DEFAULT_MODE_META, injectThemeAttribute, isValidThemeMode, readDefaultModeMeta, readThemeCookie, resolveMode, resolveServerTheme } from '@mintplayer/web-components/theming';
1
+ import { resolveServerTheme, readDefaultModeMeta, getBsThemeStore, configureBsTheme, themeToggleCore, themeToggleScopedStyles } from '@mintplayer/ui-core/theming';
2
+ export { BS_THEME_COOKIE_NAME, BS_THEME_DEFAULT_MODES, BS_THEME_DEFAULT_MODE_META, injectThemeAttribute, isValidThemeMode, readDefaultModeMeta, readThemeCookie, resolveMode, resolveServerTheme } from '@mintplayer/ui-core/theming';
3
3
  import { isPlatformServer, DOCUMENT, isPlatformBrowser } from '@angular/common';
4
4
  import * as i0 from '@angular/core';
5
- import { inject, PLATFORM_ID, signal, REQUEST, DestroyRef, Injectable, makeEnvironmentProviders, provideEnvironmentInitializer, input, viewChild, effect, ChangeDetectionStrategy, CUSTOM_ELEMENTS_SCHEMA, Component } from '@angular/core';
6
- import { BsForwardAriaDirective } from '@mintplayer/ng-bootstrap/a11y';
5
+ import { inject, PLATFORM_ID, signal, REQUEST, DestroyRef, Injectable, makeEnvironmentProviders, provideEnvironmentInitializer, ElementRef, input, ChangeDetectionStrategy, Component } from '@angular/core';
6
+ import { useCore, useScopedStyles, MpPropsDirective } from '@mintplayer/ng-bootstrap/machine';
7
7
 
8
8
  /**
9
9
  * Angular's view of the document's Bootstrap colour mode (PRD dark-mode D4).
@@ -16,10 +16,10 @@ import { BsForwardAriaDirective } from '@mintplayer/ng-bootstrap/a11y';
16
16
  * **This service is a pure mirror of the framework-neutral store.** In the
17
17
  * browser it holds no state of its own: `mode`/`effectiveMode` are refreshed
18
18
  * from `getBsThemeStore().subscribe()`, and `setMode()` forwards to the store's
19
- * `setMode()` (libs/mintplayer-web-components/theming/src/store.ts), which owns
19
+ * `setMode()` (libs/mintplayer-ui-core/theming/src/store.ts), which owns
20
20
  * validation, the `bs-theme-mode` cookie, the `data-bs-theme` write, the
21
21
  * `prefers-color-scheme` listener and cross-tab sync. So a change made anywhere
22
- * else (`<mp-theme-toggle>`, another tab, the OS) reaches these signals, and a
22
+ * else (`<bs-theme-toggle>`, another tab, the OS) reaches these signals, and a
23
23
  * copy here could never drift. Any behaviour added to the store's `setMode()`
24
24
  * must be reflected here, and vice versa; the mirror tests in
25
25
  * bs-theme.service.spec.ts pin it.
@@ -88,7 +88,7 @@ class BsThemeService {
88
88
  }
89
89
  /**
90
90
  * Set the user's mode. Forwards to the store's `setMode()`
91
- * (libs/mintplayer-web-components/theming/src/store.ts): an invalid mode is a
91
+ * (libs/mintplayer-ui-core/theming/src/store.ts): an invalid mode is a
92
92
  * no-op with a warning, a valid one is persisted to the cookie and applied to
93
93
  * `<html>`, and the signals update through the store subscription. Custom
94
94
  * variants need a matching `[data-bs-theme="<value>"] { ... }` rule.
@@ -139,49 +139,53 @@ function provideBsTheme(config = {}) {
139
139
  ]);
140
140
  }
141
141
 
142
- // Load-bearing: referencing the class keeps the module (and its
143
- // customElements.define) from being tree-shaken out of the bundle.
144
- void MpThemeToggle;
142
+ /*
143
+ * The Angular extension of the generated `bs-theme-toggle` (PRD #437 D10
144
+ * escape hatch). It changes no input: it constructs `BsThemeService`, which the
145
+ * toggle never calls. On the server that constructor is what renders
146
+ * `<html data-bs-theme>` from the request cookie, so an app that renders only a
147
+ * toggle still gets the theme in its SSR output.
148
+ */
149
+ function extendInputs(inputs) {
150
+ inject(BsThemeService);
151
+ return inputs;
152
+ }
153
+
154
+ // GENERATED from the theming manifest (theme-toggle) by @mintplayer/nx-component-compiler. Do not edit.
145
155
  /**
146
- * Angular wrapper around `<mp-theme-toggle>` (PRD dark-mode D7): a button that
147
- * cycles the document's colour mode. The element talks to the theme store
148
- * directly, so `BsThemeService` signals follow every click with no wiring here.
156
+ * A button that cycles the document colour mode through `modes` (dark-mode D7, #437).
149
157
  *
150
- * `modes` is the cycle, in order (default `BS_THEME_DEFAULT_MODES`). Localize it
151
- * by mapping over the default and overriding `label` / `announcement`.
152
- *
153
- * A consumer's `aria-*`, `role`, `id` and `tabindex` on `<bs-theme-toggle>`
154
- * reach the `<mp-theme-toggle>` element through `bsForwardAria`.
155
- *
156
- * no-JS: none (control requires script).
158
+ * Its name is the next mode (the action), its description the current one. The mode lives in the
159
+ * theme store, so a framework service or another tab re-renders it. A toggle cannot work without
160
+ * JavaScript, so the button is disabled until it hydrates.
157
161
  */
158
162
  class BsThemeToggleComponent {
163
+ #core;
159
164
  constructor() {
160
- this.modes = input(BS_THEME_DEFAULT_MODES, /* @ts-ignore */
165
+ /** The host element. */
166
+ this.elementRef = inject(ElementRef);
167
+ this.modes = input(null, /* @ts-ignore */
161
168
  ...(ngDevMode ? [{ debugName: "modes" }] : /* istanbul ignore next */ []));
162
- this.toggleRef = viewChild.required('toggle', /* @ts-ignore */
163
- ...(ngDevMode ? [{ debugName: "toggleRef" }] : /* istanbul ignore next */ []));
164
- // Construct the service even though the element never calls it: on the
165
- // server its constructor is what renders <html data-bs-theme> from the
166
- // request cookie, so an app that only renders a toggle still gets SSR.
167
- inject(BsThemeService);
168
- effect(() => {
169
- this.toggleRef().nativeElement.modes = this.modes();
170
- });
169
+ this.#core = useCore(themeToggleCore, { inputs: extendInputs(() => ({ modes: this.modes() })), idPrefix: 'bs-theme-toggle', hostBag: (props) => ({ ...props.view.root, 'data-mps': 'theme-toggle' }) });
170
+ /** The template's props. */
171
+ this.props = this.#core.props;
172
+ useScopedStyles('theme-toggle', themeToggleScopedStyles);
171
173
  }
172
174
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsThemeToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
173
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.8", type: BsThemeToggleComponent, isStandalone: true, selector: "bs-theme-toggle", inputs: { modes: { classPropertyName: "modes", publicName: "modes", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "toggleRef", first: true, predicate: ["toggle"], descendants: true, isSignal: true }], ngImport: i0, template: "<mp-theme-toggle bsForwardAria #toggle></mp-theme-toggle>\n", styles: [":host{display:inline-block}\n"], dependencies: [{ kind: "directive", type: BsForwardAriaDirective, selector: "[bsForwardAria]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
175
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.8", type: BsThemeToggleComponent, isStandalone: true, selector: "bs-theme-toggle", inputs: { modes: { classPropertyName: "modes", publicName: "modes", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<!-- GENERATED from libs/mintplayer-ui-core/theming/src/templates/theme-toggle.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<button data-mps=\"theme-toggle\" [mpProps]=\"p_view.button\">\n <svg data-mps=\"theme-toggle\" [mpProps]=\"p_view.icon\">\n <path data-mps=\"theme-toggle\" [mpProps]=\"p_view.path\"></path>\n </svg>\n</button>\n<span data-mps=\"theme-toggle\" [mpProps]=\"p_view.description\">\n {{ p_view.descriptionText }}\n</span>\n<span data-mps=\"theme-toggle\" [mpProps]=\"p_view.live\">\n {{ p_view.liveText }}\n</span>\n", dependencies: [{ kind: "directive", type: MpPropsDirective, selector: "[mpProps]", inputs: ["mpProps"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
174
176
  }
175
177
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsThemeToggleComponent, decorators: [{
176
178
  type: Component,
177
- args: [{ selector: 'bs-theme-toggle', imports: [BsForwardAriaDirective], schemas: [CUSTOM_ELEMENTS_SCHEMA], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mp-theme-toggle bsForwardAria #toggle></mp-theme-toggle>\n", styles: [":host{display:inline-block}\n"] }]
178
- }], ctorParameters: () => [], propDecorators: { modes: [{ type: i0.Input, args: [{ isSignal: true, alias: "modes", required: false }] }], toggleRef: [{ type: i0.ViewChild, args: ['toggle', { isSignal: true }] }] } });
179
+ args: [{ selector: 'bs-theme-toggle', imports: [MpPropsDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- GENERATED from libs/mintplayer-ui-core/theming/src/templates/theme-toggle.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<button data-mps=\"theme-toggle\" [mpProps]=\"p_view.button\">\n <svg data-mps=\"theme-toggle\" [mpProps]=\"p_view.icon\">\n <path data-mps=\"theme-toggle\" [mpProps]=\"p_view.path\"></path>\n </svg>\n</button>\n<span data-mps=\"theme-toggle\" [mpProps]=\"p_view.description\">\n {{ p_view.descriptionText }}\n</span>\n<span data-mps=\"theme-toggle\" [mpProps]=\"p_view.live\">\n {{ p_view.liveText }}\n</span>\n" }]
180
+ }], ctorParameters: () => [], propDecorators: { modes: [{ type: i0.Input, args: [{ isSignal: true, alias: "modes", required: false }] }] } });
181
+
182
+ // GENERATED from the theming manifest by @mintplayer/nx-component-compiler. Do not edit.
179
183
 
180
184
  // The framework-neutral core, re-exported BY NAME so Angular consumers need one
181
185
  // import without inheriting store internals. Deliberately not re-exported:
182
186
  // getBsThemeStore / configureBsTheme (browser-only; use BsThemeService and
183
187
  // provideBsTheme, which are SSR-safe), writeThemeCookie (the store owns writes),
184
- // MpThemeToggle (use <bs-theme-toggle>) and __resetBsThemeStoreForTests.
188
+ // and __resetBsThemeStoreForTests.
185
189
 
186
190
  /**
187
191
  * Generated bundle index. Do not edit.