@mintplayer/ng-bootstrap 22.32.0 → 22.33.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 (230) hide show
  1. package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs +3 -166
  2. package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs.map +1 -1
  3. package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs +71 -140
  4. package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs.map +1 -1
  5. package/fesm2022/mintplayer-ng-bootstrap-alert.mjs +33 -63
  6. package/fesm2022/mintplayer-ng-bootstrap-alert.mjs.map +1 -1
  7. package/fesm2022/mintplayer-ng-bootstrap-badge.mjs +23 -30
  8. package/fesm2022/mintplayer-ng-bootstrap-badge.mjs.map +1 -1
  9. package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs +37 -22
  10. package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs.map +1 -1
  11. package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs +25 -9
  12. package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs.map +1 -1
  13. package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs +4 -8
  14. package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs.map +1 -1
  15. package/fesm2022/mintplayer-ng-bootstrap-card.mjs +157 -219
  16. package/fesm2022/mintplayer-ng-bootstrap-card.mjs.map +1 -1
  17. package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs +6 -8
  18. package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs.map +1 -1
  19. package/fesm2022/mintplayer-ng-bootstrap-charts-hierarchy.mjs +6 -8
  20. package/fesm2022/mintplayer-ng-bootstrap-charts-hierarchy.mjs.map +1 -1
  21. package/fesm2022/mintplayer-ng-bootstrap-charts-sparkline.mjs +31 -40
  22. package/fesm2022/mintplayer-ng-bootstrap-charts-sparkline.mjs.map +1 -1
  23. package/fesm2022/mintplayer-ng-bootstrap-charts-trend.mjs +5 -5
  24. package/fesm2022/mintplayer-ng-bootstrap-charts-trend.mjs.map +1 -1
  25. package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs +313 -212
  26. package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs.map +1 -1
  27. package/fesm2022/mintplayer-ng-bootstrap-close.mjs +25 -15
  28. package/fesm2022/mintplayer-ng-bootstrap-close.mjs.map +1 -1
  29. package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs +5 -5
  30. package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs.map +1 -1
  31. package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs +87 -676
  32. package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs.map +1 -1
  33. package/fesm2022/mintplayer-ng-bootstrap-context-menu.mjs +52 -119
  34. package/fesm2022/mintplayer-ng-bootstrap-context-menu.mjs.map +1 -1
  35. package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs +12 -24
  36. package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs.map +1 -1
  37. package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs +5 -9
  38. package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs.map +1 -1
  39. package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs +5 -7
  40. package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs.map +1 -1
  41. package/fesm2022/mintplayer-ng-bootstrap-dock.mjs +5 -7
  42. package/fesm2022/mintplayer-ng-bootstrap-dock.mjs.map +1 -1
  43. package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs +201 -197
  44. package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs.map +1 -1
  45. package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs +9 -19
  46. package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs.map +1 -1
  47. package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs +64 -123
  48. package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs.map +1 -1
  49. package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs +18 -32
  50. package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs.map +1 -1
  51. package/fesm2022/mintplayer-ng-bootstrap-form.mjs +52 -38
  52. package/fesm2022/mintplayer-ng-bootstrap-form.mjs.map +1 -1
  53. package/fesm2022/mintplayer-ng-bootstrap-grid.mjs +64 -119
  54. package/fesm2022/mintplayer-ng-bootstrap-grid.mjs.map +1 -1
  55. package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs +23 -38
  56. package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs.map +1 -1
  57. package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs +44 -44
  58. package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs.map +1 -1
  59. package/fesm2022/mintplayer-ng-bootstrap-machine.mjs +199 -16
  60. package/fesm2022/mintplayer-ng-bootstrap-machine.mjs.map +1 -1
  61. package/fesm2022/mintplayer-ng-bootstrap-marquee.mjs +27 -12
  62. package/fesm2022/mintplayer-ng-bootstrap-marquee.mjs.map +1 -1
  63. package/fesm2022/mintplayer-ng-bootstrap-modal.mjs +61 -261
  64. package/fesm2022/mintplayer-ng-bootstrap-modal.mjs.map +1 -1
  65. package/fesm2022/mintplayer-ng-bootstrap-multi-range.mjs +9 -11
  66. package/fesm2022/mintplayer-ng-bootstrap-multi-range.mjs.map +1 -1
  67. package/fesm2022/mintplayer-ng-bootstrap-nav.mjs +3 -4
  68. package/fesm2022/mintplayer-ng-bootstrap-nav.mjs.map +1 -1
  69. package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs +30 -18
  70. package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs.map +1 -1
  71. package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs +20 -90
  72. package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs.map +1 -1
  73. package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs +52 -401
  74. package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs.map +1 -1
  75. package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs +7 -7
  76. package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs.map +1 -1
  77. package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs +27 -50
  78. package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs.map +1 -1
  79. package/fesm2022/mintplayer-ng-bootstrap-parallax.mjs +21 -12
  80. package/fesm2022/mintplayer-ng-bootstrap-parallax.mjs.map +1 -1
  81. package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs +8 -10
  82. package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs.map +1 -1
  83. package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs +26 -54
  84. package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs.map +1 -1
  85. package/fesm2022/mintplayer-ng-bootstrap-playlist-toggler.mjs +29 -15
  86. package/fesm2022/mintplayer-ng-bootstrap-playlist-toggler.mjs.map +1 -1
  87. package/fesm2022/mintplayer-ng-bootstrap-popover.mjs +56 -267
  88. package/fesm2022/mintplayer-ng-bootstrap-popover.mjs.map +1 -1
  89. package/fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs +60 -335
  90. package/fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs.map +1 -1
  91. package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs +47 -63
  92. package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs.map +1 -1
  93. package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs +7 -15
  94. package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs.map +1 -1
  95. package/fesm2022/mintplayer-ng-bootstrap-radio.mjs +232 -169
  96. package/fesm2022/mintplayer-ng-bootstrap-radio.mjs.map +1 -1
  97. package/fesm2022/mintplayer-ng-bootstrap-range.mjs +85 -47
  98. package/fesm2022/mintplayer-ng-bootstrap-range.mjs.map +1 -1
  99. package/fesm2022/mintplayer-ng-bootstrap-rating.mjs +80 -137
  100. package/fesm2022/mintplayer-ng-bootstrap-rating.mjs.map +1 -1
  101. package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs +29 -326
  102. package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs.map +1 -1
  103. package/fesm2022/mintplayer-ng-bootstrap-ribbon.mjs +47 -63
  104. package/fesm2022/mintplayer-ng-bootstrap-ribbon.mjs.map +1 -1
  105. package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs +14 -22
  106. package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs.map +1 -1
  107. package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs +48 -181
  108. package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs.map +1 -1
  109. package/fesm2022/mintplayer-ng-bootstrap-select.mjs +8 -8
  110. package/fesm2022/mintplayer-ng-bootstrap-select.mjs.map +1 -1
  111. package/fesm2022/mintplayer-ng-bootstrap-shell.mjs +52 -108
  112. package/fesm2022/mintplayer-ng-bootstrap-shell.mjs.map +1 -1
  113. package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs +5 -7
  114. package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs.map +1 -1
  115. package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs +6 -6
  116. package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs.map +1 -1
  117. package/fesm2022/mintplayer-ng-bootstrap-sticky-footer.mjs +35 -40
  118. package/fesm2022/mintplayer-ng-bootstrap-sticky-footer.mjs.map +1 -1
  119. package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs +61 -101
  120. package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs.map +1 -1
  121. package/fesm2022/mintplayer-ng-bootstrap-table.mjs +29 -23
  122. package/fesm2022/mintplayer-ng-bootstrap-table.mjs.map +1 -1
  123. package/fesm2022/mintplayer-ng-bootstrap-theming.mjs +1 -1
  124. package/fesm2022/mintplayer-ng-bootstrap-theming.mjs.map +1 -1
  125. package/fesm2022/mintplayer-ng-bootstrap-tile-manager.mjs +67 -306
  126. package/fesm2022/mintplayer-ng-bootstrap-tile-manager.mjs.map +1 -1
  127. package/fesm2022/mintplayer-ng-bootstrap-timeline.mjs +7 -9
  128. package/fesm2022/mintplayer-ng-bootstrap-timeline.mjs.map +1 -1
  129. package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs +9 -13
  130. package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs.map +1 -1
  131. package/fesm2022/mintplayer-ng-bootstrap-toast.mjs +103 -152
  132. package/fesm2022/mintplayer-ng-bootstrap-toast.mjs.map +1 -1
  133. package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs +50 -157
  134. package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs.map +1 -1
  135. package/fesm2022/mintplayer-ng-bootstrap-tree-select.mjs +9 -11
  136. package/fesm2022/mintplayer-ng-bootstrap-tree-select.mjs.map +1 -1
  137. package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs +11 -13
  138. package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs.map +1 -1
  139. package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs +159 -234
  140. package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs.map +1 -1
  141. package/package.json +2 -22
  142. package/types/mintplayer-ng-bootstrap-a11y.d.ts +2 -81
  143. package/types/mintplayer-ng-bootstrap-accordion.d.ts +51 -86
  144. package/types/mintplayer-ng-bootstrap-alert.d.ts +20 -28
  145. package/types/mintplayer-ng-bootstrap-badge.d.ts +12 -12
  146. package/types/mintplayer-ng-bootstrap-breadcrumb.d.ts +29 -8
  147. package/types/mintplayer-ng-bootstrap-button-group.d.ts +14 -4
  148. package/types/mintplayer-ng-bootstrap-calendar.d.ts +1 -5
  149. package/types/mintplayer-ng-bootstrap-card.d.ts +93 -78
  150. package/types/mintplayer-ng-bootstrap-carousel.d.ts +4 -6
  151. package/types/mintplayer-ng-bootstrap-charts-hierarchy.d.ts +4 -6
  152. package/types/mintplayer-ng-bootstrap-charts-sparkline.d.ts +24 -17
  153. package/types/mintplayer-ng-bootstrap-charts-trend.d.ts +3 -3
  154. package/types/mintplayer-ng-bootstrap-checkbox.d.ts +143 -91
  155. package/types/mintplayer-ng-bootstrap-close.d.ts +16 -5
  156. package/types/mintplayer-ng-bootstrap-code-snippet.d.ts +3 -3
  157. package/types/mintplayer-ng-bootstrap-color-picker.d.ts +42 -226
  158. package/types/mintplayer-ng-bootstrap-context-menu.d.ts +35 -17
  159. package/types/mintplayer-ng-bootstrap-datatable.d.ts +23 -35
  160. package/types/mintplayer-ng-bootstrap-datepicker.d.ts +2 -6
  161. package/types/mintplayer-ng-bootstrap-datetime-picker.d.ts +2 -4
  162. package/types/mintplayer-ng-bootstrap-dock.d.ts +6 -8
  163. package/types/mintplayer-ng-bootstrap-dropdown.d.ts +122 -54
  164. package/types/mintplayer-ng-bootstrap-file-manager.d.ts +10 -20
  165. package/types/mintplayer-ng-bootstrap-file-upload.d.ts +62 -44
  166. package/types/mintplayer-ng-bootstrap-floating-labels.d.ts +12 -15
  167. package/types/mintplayer-ng-bootstrap-form.d.ts +32 -11
  168. package/types/mintplayer-ng-bootstrap-grid.d.ts +38 -31
  169. package/types/mintplayer-ng-bootstrap-input-group.d.ts +11 -22
  170. package/types/mintplayer-ng-bootstrap-list-group.d.ts +28 -14
  171. package/types/mintplayer-ng-bootstrap-machine.d.ts +95 -4
  172. package/types/mintplayer-ng-bootstrap-marquee.d.ts +18 -5
  173. package/types/mintplayer-ng-bootstrap-modal.d.ts +43 -86
  174. package/types/mintplayer-ng-bootstrap-multi-range.d.ts +4 -6
  175. package/types/mintplayer-ng-bootstrap-nav.d.ts +3 -3
  176. package/types/mintplayer-ng-bootstrap-navbar-toggler.d.ts +21 -6
  177. package/types/mintplayer-ng-bootstrap-navbar.d.ts +15 -42
  178. package/types/mintplayer-ng-bootstrap-offcanvas.d.ts +35 -112
  179. package/types/mintplayer-ng-bootstrap-otp-input.d.ts +4 -3
  180. package/types/mintplayer-ng-bootstrap-pagination.d.ts +22 -35
  181. package/types/mintplayer-ng-bootstrap-parallax.d.ts +14 -4
  182. package/types/mintplayer-ng-bootstrap-phone-input.d.ts +5 -6
  183. package/types/mintplayer-ng-bootstrap-placeholder.d.ts +17 -16
  184. package/types/mintplayer-ng-bootstrap-playlist-toggler.d.ts +22 -6
  185. package/types/mintplayer-ng-bootstrap-popover.d.ts +35 -61
  186. package/types/mintplayer-ng-bootstrap-priority-nav.d.ts +80 -68
  187. package/types/mintplayer-ng-bootstrap-progress-bar.d.ts +34 -19
  188. package/types/mintplayer-ng-bootstrap-query-builder.d.ts +12 -20
  189. package/types/mintplayer-ng-bootstrap-radio.d.ts +112 -84
  190. package/types/mintplayer-ng-bootstrap-range.d.ts +35 -13
  191. package/types/mintplayer-ng-bootstrap-rating.d.ts +33 -42
  192. package/types/mintplayer-ng-bootstrap-resizable.d.ts +24 -114
  193. package/types/mintplayer-ng-bootstrap-ribbon.d.ts +21 -37
  194. package/types/mintplayer-ng-bootstrap-scheduler.d.ts +19 -27
  195. package/types/mintplayer-ng-bootstrap-scrollspy.d.ts +26 -51
  196. package/types/mintplayer-ng-bootstrap-select.d.ts +8 -7
  197. package/types/mintplayer-ng-bootstrap-shell.d.ts +40 -63
  198. package/types/mintplayer-ng-bootstrap-signature-pad.d.ts +4 -6
  199. package/types/mintplayer-ng-bootstrap-splitter.d.ts +3 -3
  200. package/types/mintplayer-ng-bootstrap-sticky-footer.d.ts +23 -19
  201. package/types/mintplayer-ng-bootstrap-tab-control.d.ts +61 -57
  202. package/types/mintplayer-ng-bootstrap-table.d.ts +21 -12
  203. package/types/mintplayer-ng-bootstrap-tile-manager.d.ts +94 -154
  204. package/types/mintplayer-ng-bootstrap-timeline.d.ts +23 -25
  205. package/types/mintplayer-ng-bootstrap-timepicker.d.ts +3 -7
  206. package/types/mintplayer-ng-bootstrap-toast.d.ts +92 -55
  207. package/types/mintplayer-ng-bootstrap-tooltip.d.ts +34 -33
  208. package/types/mintplayer-ng-bootstrap-tree-select.d.ts +14 -16
  209. package/types/mintplayer-ng-bootstrap-treeview.d.ts +12 -13
  210. package/types/mintplayer-ng-bootstrap-typeahead.d.ts +109 -133
  211. package/calendar-month/package.json +0 -4
  212. package/dropdown-divider/package.json +0 -4
  213. package/dropdown-menu/package.json +0 -4
  214. package/fesm2022/mintplayer-ng-bootstrap-calendar-month.mjs +0 -136
  215. package/fesm2022/mintplayer-ng-bootstrap-calendar-month.mjs.map +0 -1
  216. package/fesm2022/mintplayer-ng-bootstrap-dropdown-divider.mjs +0 -30
  217. package/fesm2022/mintplayer-ng-bootstrap-dropdown-divider.mjs.map +0 -1
  218. package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs +0 -169
  219. package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs.map +0 -1
  220. package/fesm2022/mintplayer-ng-bootstrap-has-overlay.mjs +0 -32
  221. package/fesm2022/mintplayer-ng-bootstrap-has-overlay.mjs.map +0 -1
  222. package/fesm2022/mintplayer-ng-bootstrap-no-noscript.mjs +0 -31
  223. package/fesm2022/mintplayer-ng-bootstrap-no-noscript.mjs.map +0 -1
  224. package/has-overlay/package.json +0 -4
  225. package/no-noscript/package.json +0 -4
  226. package/types/mintplayer-ng-bootstrap-calendar-month.d.ts +0 -54
  227. package/types/mintplayer-ng-bootstrap-dropdown-divider.d.ts +0 -9
  228. package/types/mintplayer-ng-bootstrap-dropdown-menu.d.ts +0 -94
  229. package/types/mintplayer-ng-bootstrap-has-overlay.d.ts +0 -22
  230. package/types/mintplayer-ng-bootstrap-no-noscript.d.ts +0 -11
@@ -1,279 +1,380 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, forwardRef, Directive, ElementRef, input, contentChildren, signal, effect, viewChild, model, computed, afterRenderEffect, ChangeDetectionStrategy, Component } from '@angular/core';
3
- import { useBootstrap, MpPropsDirective } from '@mintplayer/ng-bootstrap/machine';
2
+ import { inject, ElementRef, signal, forwardRef, Directive, computed, input, model, booleanAttribute, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { useHostAttrs, useCore, useScopedStyles, MpPropsDirective, provideCoreContext, coreContextToken } from '@mintplayer/ng-bootstrap/machine';
4
+ import { checkboxCore, checkboxScopedStyles, toggleButtonCore, ownsCheckbox, groupSelection, checkboxGroupCore, CHECKBOX_GROUP } from '@mintplayer/ui-core/checkbox';
4
5
  import { bootstrapForms } from '@mintplayer/ui-core/bootstrap/forms';
5
- import { NgTemplateOutlet } from '@angular/common';
6
- import { effectiveIndeterminate, checkboxClasses, connectCheckbox } from '@mintplayer/ui-core/checkbox';
7
- import { takeHostAria, BsIdService } from '@mintplayer/ng-bootstrap/a11y';
8
6
  import * as i2 from '@mintplayer/ng-bootstrap/a11y/forms';
9
7
  import { BsControlValidityDirective } from '@mintplayer/ng-bootstrap/a11y/forms';
10
8
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
11
9
 
12
10
  /**
13
- * Single-mode (standalone) value accessor for `<bs-checkbox>`. Emits a
14
- * `boolean` reflecting the checked state. For multi-mode use, bind
15
- * `[formControl]` on `[bsCheckboxGroup]` instead — that directive owns
16
- * its own `string[]` accessor.
11
+ * The `ControlValueAccessor` of a single checkbox or toggle button (a host
12
+ * directive of the generated `bs-checkbox` and `bs-toggle-button`). The value is
13
+ * the checked state.
17
14
  */
18
15
  class BsCheckboxValueAccessor {
19
16
  constructor() {
20
- this.host = inject(BsCheckboxComponent);
21
- }
22
- onChangeEvent(ev) {
23
- const target = ev.target;
24
- if (!this.onValueChange || target?.type !== 'checkbox')
25
- return;
26
- this.onValueChange(target.checked);
17
+ this.host = inject(ElementRef).nativeElement;
18
+ /** A form control is bound: its value drives the checkbox, over its own `checked`. */
19
+ this.bound = signal(false, /* @ts-ignore */
20
+ ...(ngDevMode ? [{ debugName: "bound" }] : /* istanbul ignore next */ []));
21
+ /** The checked state as the form control or the user last set it. */
22
+ this.viewValue = signal(false, /* @ts-ignore */
23
+ ...(ngDevMode ? [{ debugName: "viewValue" }] : /* istanbul ignore next */ []));
24
+ this.disabled = signal(false, /* @ts-ignore */
25
+ ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
26
+ this.onChange = () => undefined;
27
+ this.onTouched = () => undefined;
27
28
  }
28
29
  registerOnChange(fn) {
29
- this.onValueChange = fn;
30
+ this.bound.set(true);
31
+ this.onChange = fn;
30
32
  }
31
33
  registerOnTouched(fn) {
32
34
  this.onTouched = fn;
33
35
  }
36
+ setDisabledState(isDisabled) {
37
+ this.disabled.set(isDisabled);
38
+ }
34
39
  writeValue(value) {
35
- this.host.isToggled.set(value);
40
+ this.viewValue.set(!!value);
36
41
  }
37
- setDisabledState(isDisabled) {
38
- this.host.formDisabled.set(isDisabled);
42
+ onNativeChange(event) {
43
+ const target = event.target;
44
+ // Only this checkbox's own input: not one projected into its label.
45
+ if (!(target instanceof HTMLInputElement) || target.type !== 'checkbox' || target.parentElement !== this.host)
46
+ return;
47
+ this.viewValue.set(target.checked);
48
+ this.onChange(target.checked);
39
49
  }
40
50
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsCheckboxValueAccessor, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
41
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BsCheckboxValueAccessor, isStandalone: true, selector: "bs-checkbox", host: { listeners: { "change": "onChangeEvent($event)", "focusout": "onTouched?.()" } }, providers: [{
42
- provide: NG_VALUE_ACCESSOR,
43
- useExisting: forwardRef(() => BsCheckboxValueAccessor),
44
- multi: true,
45
- }], ngImport: i0 }); }
51
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BsCheckboxValueAccessor, isStandalone: true, selector: "[bsCheckboxAccessor]", host: { listeners: { "change": "onNativeChange($event)", "focusout": "onTouched()" } }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsCheckboxValueAccessor), multi: true }], ngImport: i0 }); }
46
52
  }
47
53
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsCheckboxValueAccessor, decorators: [{
48
54
  type: Directive,
49
55
  args: [{
50
- selector: 'bs-checkbox',
51
- providers: [{
52
- provide: NG_VALUE_ACCESSOR,
53
- useExisting: forwardRef(() => BsCheckboxValueAccessor),
54
- multi: true,
55
- }],
56
+ // Applied as a host directive only.
57
+ selector: '[bsCheckboxAccessor]',
58
+ providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsCheckboxValueAccessor), multi: true }],
56
59
  host: {
57
- // The inner native input's change and blur bubble to the host.
58
- '(change)': 'onChangeEvent($event)',
59
- '(focusout)': 'onTouched?.()',
60
+ // The native input's change and blur bubble to the host.
61
+ '(change)': 'onNativeChange($event)',
62
+ '(focusout)': 'onTouched()',
60
63
  },
61
64
  }]
62
65
  }] });
63
66
 
67
+ /*
68
+ * The Angular extension of the generated `bs-checkbox` (#458 D10 escape hatch):
69
+ * Angular forms. A bound form control drives the checked state, a disabled
70
+ * control disables the input, and the control's validity reaches its ARIA and
71
+ * its message.
72
+ */
73
+ const hostDirectives$2 = [
74
+ BsCheckboxValueAccessor,
75
+ { directive: BsControlValidityDirective, inputs: ['errorMessages'] },
76
+ ];
77
+ function extendInputs$2(inputs) {
78
+ const accessor = inject(BsCheckboxValueAccessor, { self: true });
79
+ const validity = inject(BsControlValidityDirective, { self: true });
80
+ return computed(() => {
81
+ const value = inputs();
82
+ return {
83
+ ...value,
84
+ checked: accessor.bound() ? accessor.viewValue() : value.checked,
85
+ disabled: value.disabled || accessor.disabled(),
86
+ invalid: value.invalid || validity.invalid(),
87
+ required: value.required || validity.required(),
88
+ errorText: value.errorText ?? validity.errorText(),
89
+ };
90
+ });
91
+ }
92
+
93
+ // GENERATED from the checkbox manifest (checkbox) by @mintplayer/nx-component-compiler. Do not edit.
64
94
  /**
65
- * Groups N `<bs-checkbox>` children into a multi-select FormControl whose
66
- * value is a `string[]` of every checked child's `value()`. The group's
67
- * `[name]` is the form-array name; the accessor appends the `[]` suffix
68
- * automatically on each child's inner `<input>` for traditional-form
69
- * submission. Per-instance `[name]` on each child is ignored when the
70
- * child resolves into a group.
71
- *
72
- * Acts as its own `ControlValueAccessor` — bind `[formControl]` / `[(ngModel)]`
73
- * directly on the element carrying `[bsCheckboxGroup]`. Listens to bubbled
74
- * `change` events from the children to recompute the array on every toggle.
95
+ * A native `<input type=checkbox>` in Bootstrap's `.form-check`, `.form-switch` or `.btn-check`
96
+ * markup (#458). It submits, toggles and announces with JavaScript off. `checked` and
97
+ * `indeterminate` are two-way; a user toggle clears the mixed state. Inside a checkbox group it
98
+ * takes the group's name (`<name>[]`) and is checked when its `value` is selected. An
99
+ * `aria-label` on the component, or `inputLabel`, names the input.
75
100
  */
76
- class BsCheckboxGroupDirective {
101
+ class BsCheckboxComponent {
102
+ #core;
77
103
  constructor() {
78
- this.host = inject(ElementRef).nativeElement;
104
+ /** The host element. */
105
+ this.elementRef = inject(ElementRef);
106
+ /** The consumer's aria-*, id and tabindex on the host, for the role-bearing node. */
107
+ this.hostAttrs = useHostAttrs();
108
+ this.type = input('checkbox', /* @ts-ignore */
109
+ ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
110
+ this.color = input('primary', /* @ts-ignore */
111
+ ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
112
+ this.checked = model(false, /* @ts-ignore */
113
+ ...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
79
114
  this.name = input(null, /* @ts-ignore */
80
115
  ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
81
- /** Accessible name for the group (written as `aria-label`). A bare
82
- * `role="group"` is announced as nothing at all; the label is what makes
83
- * the grouping audible ("Toppings, group"). */
84
- this.label = input(null, /* @ts-ignore */
85
- ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
86
- // Wrap in forwardRef: BsCheckboxComponent imports this directive (for
87
- // `inject(BsCheckboxGroupDirective, {...})`), so the two modules form a
88
- // cycle. Whichever side webpack/vite evaluates first sees `undefined` for
89
- // the other's exports at field-initialiser time, which makes the recorded
90
- // query predicate null — ng-mocks' MockDirective then fails with "the
91
- // query selector wasn't defined" on consumers that mock the group.
92
- this.checkboxes = contentChildren(forwardRef(() => BsCheckboxComponent), { ...(ngDevMode ? { debugName: "checkboxes" } : /* istanbul ignore next */ {}), descendants: true });
93
- /** Most-recently-written form value. An effect syncs each child's
94
- * `isToggled` whenever this OR the
95
- * `checkboxes()` set changes, so an initial `writeValue` that lands
96
- * before children register still applies once the `contentChildren`
97
- * query populates. */
98
- this.currentValue = signal([], /* @ts-ignore */
99
- ...(ngDevMode ? [{ debugName: "currentValue" }] : /* istanbul ignore next */ []));
100
- // role="group" so the checkboxes announce as one named cluster — but only
101
- // on hosts whose implicit role is generic. Structural hosts (the tbody
102
- // row-selection shape) have load-bearing native semantics that a group
103
- // role would destroy, and a consumer-set role always wins.
104
- const structural = ['TABLE', 'THEAD', 'TBODY', 'TFOOT', 'TR', 'UL', 'OL', 'LI'];
105
- if (!this.host.hasAttribute('role') && !structural.includes(this.host.tagName)) {
106
- this.host.setAttribute('role', 'group');
107
- }
108
- effect(() => {
109
- const label = this.label();
110
- if (label !== null)
111
- this.host.setAttribute('aria-label', label);
112
- });
113
- effect(() => {
114
- const arr = this.currentValue();
115
- this.checkboxes().map((cb) => {
116
- const v = cb.value();
117
- const isSelected = v != null && arr.includes(v);
118
- cb.isToggled.set(isSelected);
119
- });
120
- });
116
+ this.value = input(null, /* @ts-ignore */
117
+ ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
118
+ this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
119
+ this.required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
120
+ this.invalid = input(false, { ...(ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
121
+ this.errorText = input(null, /* @ts-ignore */
122
+ ...(ngDevMode ? [{ debugName: "errorText" }] : /* istanbul ignore next */ []));
123
+ this.inputLabel = input(null, /* @ts-ignore */
124
+ ...(ngDevMode ? [{ debugName: "inputLabel" }] : /* istanbul ignore next */ []));
125
+ this.indeterminate = model(false, /* @ts-ignore */
126
+ ...(ngDevMode ? [{ debugName: "indeterminate" }] : /* istanbul ignore next */ []));
127
+ this.#core = useCore(checkboxCore, { inputs: extendInputs$2(() => ({ type: this.type(), color: this.color(), checked: this.checked(), name: this.name(), value: this.value(), disabled: this.disabled(), required: this.required(), invalid: this.invalid(), errorText: this.errorText(), inputLabel: this.inputLabel(), indeterminate: this.indeterminate() })), idPrefix: 'bs-checkbox', hostBag: (props) => ({ ...props.view.root, 'data-mps': 'checkbox' }), models: { checked: this.checked, indeterminate: this.indeterminate } });
128
+ /** The template's props. */
129
+ this.props = this.#core.props;
130
+ useScopedStyles(bootstrapForms.key, bootstrapForms.css, { order: bootstrapForms.order });
131
+ useScopedStyles('checkbox', checkboxScopedStyles);
121
132
  }
122
- onChildChange() {
123
- if (!this.onValueChange)
124
- return;
125
- const result = this.checkboxes()
126
- .filter(cb => !!cb.isToggled() && cb.value() != null)
127
- .map(cb => cb.value());
128
- this.onValueChange(result);
133
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsCheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
134
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: BsCheckboxComponent, isStandalone: true, selector: "bs-checkbox", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, errorText: { classPropertyName: "errorText", publicName: "errorText", isSignal: true, isRequired: false, transformFunction: null }, inputLabel: { classPropertyName: "inputLabel", publicName: "inputLabel", isSignal: true, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", indeterminate: "indeterminateChange" }, hostDirectives: [{ directive: BsCheckboxValueAccessor }, { directive: i2.BsControlValidityDirective, inputs: ["errorMessages", "errorMessages"] }], ngImport: i0, template: "<!-- GENERATED from libs/mintplayer-ui-core/checkbox/src/templates/checkbox.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<input data-mps=\"checkbox\" [mpProps]=\"p_view.input\" [checked]=\"p_view.checked\" [indeterminate]=\"p_view.indeterminate\" [mpHostAttrs]=\"hostAttrs\">\n<label data-mps=\"checkbox\" [mpProps]=\"p_view.label\">\n <ng-content />\n</label>\n@if (p_view.feedback) {\n <div data-mps=\"checkbox\" [mpProps]=\"p_view.feedback.attrs\">\n {{ p_view.feedback.text }}\n </div>\n}\n", dependencies: [{ kind: "directive", type: MpPropsDirective, selector: "[mpProps],[mpHostAttrs]", inputs: ["mpProps", "mpHostAttrs"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
135
+ }
136
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsCheckboxComponent, decorators: [{
137
+ type: Component,
138
+ args: [{ selector: 'bs-checkbox', imports: [MpPropsDirective], changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: hostDirectives$2, template: "<!-- GENERATED from libs/mintplayer-ui-core/checkbox/src/templates/checkbox.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<input data-mps=\"checkbox\" [mpProps]=\"p_view.input\" [checked]=\"p_view.checked\" [indeterminate]=\"p_view.indeterminate\" [mpHostAttrs]=\"hostAttrs\">\n<label data-mps=\"checkbox\" [mpProps]=\"p_view.label\">\n <ng-content />\n</label>\n@if (p_view.feedback) {\n <div data-mps=\"checkbox\" [mpProps]=\"p_view.feedback.attrs\">\n {{ p_view.feedback.text }}\n </div>\n}\n" }]
139
+ }], ctorParameters: () => [], propDecorators: { type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], errorText: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorText", required: false }] }], inputLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputLabel", required: false }] }], indeterminate: [{ type: i0.Input, args: [{ isSignal: true, alias: "indeterminate", required: false }] }, { type: i0.Output, args: ["indeterminateChange"] }] } });
140
+
141
+ /*
142
+ * The Angular extension of the generated `bs-toggle-button` (#458 D10 escape
143
+ * hatch): the checkbox's, since a toggle button is a checkbox.
144
+ */
145
+ const hostDirectives$1 = [
146
+ BsCheckboxValueAccessor,
147
+ { directive: BsControlValidityDirective, inputs: ['errorMessages'] },
148
+ ];
149
+ function extendInputs$1(inputs) {
150
+ const accessor = inject(BsCheckboxValueAccessor, { self: true });
151
+ const validity = inject(BsControlValidityDirective, { self: true });
152
+ return computed(() => {
153
+ const value = inputs();
154
+ return {
155
+ ...value,
156
+ checked: accessor.bound() ? accessor.viewValue() : value.checked,
157
+ disabled: value.disabled || accessor.disabled(),
158
+ invalid: value.invalid || validity.invalid(),
159
+ required: value.required || validity.required(),
160
+ errorText: value.errorText ?? validity.errorText(),
161
+ };
162
+ });
163
+ }
164
+
165
+ // GENERATED from the checkbox manifest (toggle-button) by @mintplayer/nx-component-compiler. Do not edit.
166
+ /**
167
+ * A single Bootstrap on/off button (#458): a checkbox whose type is fixed to `toggle_button`, an
168
+ * `input.btn-check` + `label.btn` that keeps the native checkbox role. `checked` is two-way.
169
+ */
170
+ class BsToggleButtonComponent {
171
+ #core;
172
+ constructor() {
173
+ /** The host element. */
174
+ this.elementRef = inject(ElementRef);
175
+ /** The consumer's aria-*, id and tabindex on the host, for the role-bearing node. */
176
+ this.hostAttrs = useHostAttrs();
177
+ this.color = input('primary', /* @ts-ignore */
178
+ ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
179
+ this.checked = model(false, /* @ts-ignore */
180
+ ...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
181
+ this.name = input(null, /* @ts-ignore */
182
+ ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
183
+ this.value = input(null, /* @ts-ignore */
184
+ ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
185
+ this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
186
+ this.required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
187
+ this.invalid = input(false, { ...(ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
188
+ this.errorText = input(null, /* @ts-ignore */
189
+ ...(ngDevMode ? [{ debugName: "errorText" }] : /* istanbul ignore next */ []));
190
+ this.inputLabel = input(null, /* @ts-ignore */
191
+ ...(ngDevMode ? [{ debugName: "inputLabel" }] : /* istanbul ignore next */ []));
192
+ this.#core = useCore(toggleButtonCore, { inputs: extendInputs$1(() => ({ color: this.color(), checked: this.checked(), name: this.name(), value: this.value(), disabled: this.disabled(), required: this.required(), invalid: this.invalid(), errorText: this.errorText(), inputLabel: this.inputLabel() })), idPrefix: 'bs-toggle-button', hostBag: (props) => ({ ...props.view.root, 'data-mps': 'checkbox' }), models: { checked: this.checked } });
193
+ /** The template's props. */
194
+ this.props = this.#core.props;
195
+ useScopedStyles(bootstrapForms.key, bootstrapForms.css, { order: bootstrapForms.order });
196
+ useScopedStyles('checkbox', checkboxScopedStyles);
197
+ }
198
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsToggleButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
199
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: BsToggleButtonComponent, isStandalone: true, selector: "bs-toggle-button", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, errorText: { classPropertyName: "errorText", publicName: "errorText", isSignal: true, isRequired: false, transformFunction: null }, inputLabel: { classPropertyName: "inputLabel", publicName: "inputLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange" }, hostDirectives: [{ directive: BsCheckboxValueAccessor }, { directive: i2.BsControlValidityDirective, inputs: ["errorMessages", "errorMessages"] }], ngImport: i0, template: "<!-- GENERATED from libs/mintplayer-ui-core/checkbox/src/templates/checkbox.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<input data-mps=\"checkbox\" [mpProps]=\"p_view.input\" [checked]=\"p_view.checked\" [indeterminate]=\"p_view.indeterminate\" [mpHostAttrs]=\"hostAttrs\">\n<label data-mps=\"checkbox\" [mpProps]=\"p_view.label\">\n <ng-content />\n</label>\n@if (p_view.feedback) {\n <div data-mps=\"checkbox\" [mpProps]=\"p_view.feedback.attrs\">\n {{ p_view.feedback.text }}\n </div>\n}\n", dependencies: [{ kind: "directive", type: MpPropsDirective, selector: "[mpProps],[mpHostAttrs]", inputs: ["mpProps", "mpHostAttrs"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
200
+ }
201
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsToggleButtonComponent, decorators: [{
202
+ type: Component,
203
+ args: [{ selector: 'bs-toggle-button', imports: [MpPropsDirective], changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: hostDirectives$1, template: "<!-- GENERATED from libs/mintplayer-ui-core/checkbox/src/templates/checkbox.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<input data-mps=\"checkbox\" [mpProps]=\"p_view.input\" [checked]=\"p_view.checked\" [indeterminate]=\"p_view.indeterminate\" [mpHostAttrs]=\"hostAttrs\">\n<label data-mps=\"checkbox\" [mpProps]=\"p_view.label\">\n <ng-content />\n</label>\n@if (p_view.feedback) {\n <div data-mps=\"checkbox\" [mpProps]=\"p_view.feedback.attrs\">\n {{ p_view.feedback.text }}\n </div>\n}\n" }]
204
+ }], ctorParameters: () => [], propDecorators: { color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], errorText: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorText", required: false }] }], inputLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputLabel", required: false }] }] } });
205
+
206
+ /**
207
+ * The `ControlValueAccessor` of a checkbox group, shared by the generated
208
+ * `bs-checkbox-group` and the attribute form `[bsCheckboxGroup]` (a host
209
+ * directive of both). The value is the list of the checked checkboxes' values.
210
+ * It reacts only to the checkboxes of its own group (`ownsCheckbox`).
211
+ */
212
+ class BsCheckboxGroupValueAccessor {
213
+ constructor() {
214
+ this.host = inject(ElementRef).nativeElement;
215
+ /** A form control is bound: its value drives the group, over the group's own `value`. */
216
+ this.bound = signal(false, /* @ts-ignore */
217
+ ...(ngDevMode ? [{ debugName: "bound" }] : /* istanbul ignore next */ []));
218
+ /** The selection as the form control or the user last set it. */
219
+ this.viewValue = signal([], /* @ts-ignore */
220
+ ...(ngDevMode ? [{ debugName: "viewValue" }] : /* istanbul ignore next */ []));
221
+ this.disabled = signal(false, /* @ts-ignore */
222
+ ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
223
+ this.onChange = () => undefined;
224
+ this.onTouched = () => undefined;
225
+ /** The owner's own write-back of a toggle (`[(value)]` on the attribute form). */
226
+ this.onPick = () => undefined;
129
227
  }
130
228
  registerOnChange(fn) {
131
- this.onValueChange = fn;
229
+ this.bound.set(true);
230
+ this.onChange = fn;
132
231
  }
133
232
  registerOnTouched(fn) {
134
233
  this.onTouched = fn;
135
234
  }
235
+ setDisabledState(isDisabled) {
236
+ this.disabled.set(isDisabled);
237
+ }
136
238
  writeValue(value) {
137
- this.currentValue.set(Array.isArray(value) ? value : []);
239
+ this.viewValue.set(Array.isArray(value) ? value : []);
138
240
  }
139
- setDisabledState(isDisabled) {
140
- this.checkboxes().map((cb) => cb.formDisabled.set(isDisabled));
241
+ onNativeChange(event) {
242
+ if (!ownsCheckbox(this.host, event.target))
243
+ return;
244
+ const next = groupSelection(this.host);
245
+ this.viewValue.set(next);
246
+ this.onChange(next);
247
+ this.onPick(next);
141
248
  }
142
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsCheckboxGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
143
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "22.0.8", type: BsCheckboxGroupDirective, isStandalone: true, selector: "[bsCheckboxGroup]", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "change": "onChildChange()", "focusout": "onTouched?.()" } }, providers: [{
144
- provide: NG_VALUE_ACCESSOR,
145
- useExisting: forwardRef(() => BsCheckboxGroupDirective),
146
- multi: true,
147
- }], queries: [{ propertyName: "checkboxes", predicate: i0.forwardRef(() => BsCheckboxComponent), descendants: true, isSignal: true }], exportAs: ["bsCheckboxGroup"], ngImport: i0 }); }
249
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsCheckboxGroupValueAccessor, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
250
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BsCheckboxGroupValueAccessor, isStandalone: true, selector: "[bsCheckboxGroupAccessor]", host: { listeners: { "change": "onNativeChange($event)", "focusout": "onTouched()" } }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsCheckboxGroupValueAccessor), multi: true }], ngImport: i0 }); }
148
251
  }
149
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsCheckboxGroupDirective, decorators: [{
252
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsCheckboxGroupValueAccessor, decorators: [{
150
253
  type: Directive,
151
254
  args: [{
152
- selector: '[bsCheckboxGroup]',
153
- exportAs: 'bsCheckboxGroup',
154
- providers: [{
155
- provide: NG_VALUE_ACCESSOR,
156
- useExisting: forwardRef(() => BsCheckboxGroupDirective),
157
- multi: true,
158
- }],
255
+ // Applied as a host directive only.
256
+ selector: '[bsCheckboxGroupAccessor]',
257
+ providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsCheckboxGroupValueAccessor), multi: true }],
159
258
  host: {
160
- '(change)': 'onChildChange()',
161
- // The inner inputs' focusout bubbles to the group host. The
162
- // stored onTouched was never CALLED before, which kept every
163
- // invalid-after-touched mirror dead (audit 4.9 prerequisite).
164
- '(focusout)': 'onTouched?.()',
259
+ // A native checkbox's change bubbles to the group's element.
260
+ '(change)': 'onNativeChange($event)',
261
+ '(focusout)': 'onTouched()',
165
262
  },
166
263
  }]
167
- }], ctorParameters: () => [], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], checkboxes: [{ type: i0.ContentChildren, args: [forwardRef(() => BsCheckboxComponent), { ...{ descendants: true }, isSignal: true }] }] } });
264
+ }] });
265
+
266
+ /*
267
+ * The Angular extension of the generated `bs-checkbox-group` (#458 D10 escape
268
+ * hatch): Angular forms. A bound form control drives the selection, and a
269
+ * disabled control disables the group.
270
+ */
271
+ const hostDirectives = [BsCheckboxGroupValueAccessor];
272
+ function extendInputs(inputs) {
273
+ const accessor = inject(BsCheckboxGroupValueAccessor, { self: true });
274
+ return computed(() => {
275
+ const value = inputs();
276
+ return {
277
+ ...value,
278
+ value: accessor.bound() ? accessor.viewValue() : value.value,
279
+ disabled: value.disabled || accessor.disabled(),
280
+ };
281
+ });
282
+ }
168
283
 
284
+ // GENERATED from the checkbox manifest (checkbox-group) by @mintplayer/nx-component-compiler. Do not edit.
169
285
  /**
170
- * A native `<input type=checkbox>` in Bootstrap's `.form-check` /
171
- * `.form-switch` / `.btn-check` markup, rendered by this component's own
172
- * template (#437): it submits, toggles and announces with JavaScript off,
173
- * and SSR emits the real control. The ARIA contract comes from
174
- * `@mintplayer/ui-core/checkbox`; the consumer's `aria-*` / `id` /
175
- * `tabindex` on `<bs-checkbox>` land on the input.
286
+ * A `role=group` element around checkboxes (#458). They submit as `<name>[]`, and `value` (two-way)
287
+ * is the list of the checked ones' values. Name it with `aria-label` / `aria-labelledby`. A group
288
+ * nested inside is its own: each group reacts only to its own checkboxes.
176
289
  */
177
- class BsCheckboxComponent {
290
+ class BsCheckboxGroupComponent {
291
+ #core;
178
292
  constructor() {
179
- this.parentGroup = inject(BsCheckboxGroupDirective, { optional: true, skipSelf: true });
180
- this.validity = inject(BsControlValidityDirective, { self: true });
181
- this.host = inject(ElementRef).nativeElement;
182
- this.hostAria = takeHostAria(this.host);
183
- this.id = inject(BsIdService).next('bs-checkbox');
184
- this.inputRef = viewChild('input', /* @ts-ignore */
185
- ...(ngDevMode ? [{ debugName: "inputRef" }] : /* istanbul ignore next */ []));
186
- this.type = input('checkbox', /* @ts-ignore */
187
- ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
188
- /** Button colour of a `toggle_button`; ignored by the other types. */
189
- this.color = input('primary', /* @ts-ignore */
190
- ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
191
- this.isToggled = model(false, /* @ts-ignore */
192
- ...(ngDevMode ? [{ debugName: "isToggled" }] : /* istanbul ignore next */ []));
193
- this.indeterminate = model(false, /* @ts-ignore */
194
- ...(ngDevMode ? [{ debugName: "indeterminate" }] : /* istanbul ignore next */ []));
293
+ /** The host element. */
294
+ this.elementRef = inject(ElementRef);
195
295
  this.name = input(null, /* @ts-ignore */
196
296
  ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
197
- this.value = input(null, /* @ts-ignore */
297
+ this.value = model([], /* @ts-ignore */
298
+ ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
299
+ this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
300
+ this.#core = useCore(checkboxGroupCore, { inputs: extendInputs(() => ({ name: this.name(), value: this.value(), disabled: this.disabled() })), idPrefix: 'bs-checkbox-group', hostBag: (props) => ({ ...props.root, 'data-mps': 'checkbox' }), models: { value: this.value } });
301
+ /** What this component hands its content. */
302
+ this.provided = this.#core.provided;
303
+ /** The template's props. */
304
+ this.props = this.#core.props;
305
+ useScopedStyles(bootstrapForms.key, bootstrapForms.css, { order: bootstrapForms.order });
306
+ useScopedStyles('checkbox', checkboxScopedStyles);
307
+ }
308
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsCheckboxGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
309
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.8", type: BsCheckboxGroupComponent, isStandalone: true, selector: "bs-checkbox-group", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, providers: [provideCoreContext(CHECKBOX_GROUP, BsCheckboxGroupComponent)], hostDirectives: [{ directive: BsCheckboxGroupValueAccessor }], ngImport: i0, template: "<!-- GENERATED from libs/mintplayer-ui-core/checkbox/src/templates/checkbox-group.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n<ng-content />\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
310
+ }
311
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsCheckboxGroupComponent, decorators: [{
312
+ type: Component,
313
+ args: [{ selector: 'bs-checkbox-group', imports: [], changeDetection: ChangeDetectionStrategy.OnPush, providers: [provideCoreContext(CHECKBOX_GROUP, BsCheckboxGroupComponent)], hostDirectives: hostDirectives, template: "<!-- GENERATED from libs/mintplayer-ui-core/checkbox/src/templates/checkbox-group.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n<ng-content />\n" }]
314
+ }], ctorParameters: () => [], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
315
+
316
+ // GENERATED from the checkbox manifest by @mintplayer/nx-component-compiler. Do not edit.
317
+
318
+ /** Hosts whose own role is load-bearing: a group role would destroy it. */
319
+ const STRUCTURAL = new Set(['TABLE', 'THEAD', 'TBODY', 'TFOOT', 'TR', 'UL', 'OL', 'LI']);
320
+ /**
321
+ * The attribute form of a checkbox group (Angular only, #458 M4): put it on a
322
+ * host you already have (a `<tbody>` whose rows each hold a checkbox, a `<div>`
323
+ * in a table cell). The `<bs-checkbox>` descendants take its name (`<name>[]`)
324
+ * and selection through DI, so the nearest group wins. Bind `[formControl]` /
325
+ * `[(ngModel)]` / `[(value)]` on the same element.
326
+ *
327
+ * It adds `role="group"` only on a host whose implicit role is generic and that
328
+ * has no role of its own. Use `<bs-checkbox-group>` for a standalone set.
329
+ */
330
+ class BsCheckboxGroupDirective {
331
+ constructor() {
332
+ this.accessor = inject(BsCheckboxGroupValueAccessor, { self: true });
333
+ /** The group's name: its checkboxes submit as `<name>[]`. */
334
+ this.name = input(null, /* @ts-ignore */
335
+ ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
336
+ /** The selected checkboxes' values, when no form control is bound. */
337
+ this.value = model([], /* @ts-ignore */
198
338
  ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
199
- this.disabled = input(false, /* @ts-ignore */
339
+ this.disabled = computed(() => this.accessor.disabled(), /* @ts-ignore */
200
340
  ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
201
- this.group = input(null, /* @ts-ignore */
202
- ...(ngDevMode ? [{ debugName: "group" }] : /* istanbul ignore next */ []));
203
- /** Written by the value accessor and by `[bsCheckboxGroup]` (`setDisabledState`). */
204
- this.formDisabled = signal(false, /* @ts-ignore */
205
- ...(ngDevMode ? [{ debugName: "formDisabled" }] : /* istanbul ignore next */ []));
206
- /** Explicit `[group]` input wins over the DI-injected ancestor. */
207
- this.resolvedGroup = computed(() => this.group() ?? this.parentGroup ?? null, /* @ts-ignore */
208
- ...(ngDevMode ? [{ debugName: "resolvedGroup" }] : /* istanbul ignore next */ []));
209
- /** Single-mode → component's own `[name]`. Multi-mode → group's `[name]` + `[]`. */
210
- this.nameResult = computed(() => {
211
- const group = this.resolvedGroup();
212
- if (group) {
213
- const groupName = group.name();
214
- return groupName == null ? null : `${groupName}[]`;
215
- }
216
- return this.name();
217
- }, /* @ts-ignore */
218
- ...(ngDevMode ? [{ debugName: "nameResult" }] : /* istanbul ignore next */ []));
219
- this.checked = computed(() => !!this.isToggled(), /* @ts-ignore */
220
- ...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
221
- /** `<bs-toggle-button>` is a toggle button whatever `[type]` says. */
222
- this.isToggleButtonHost = this.host.localName === 'bs-toggle-button';
223
- this.resolvedType = computed(() => this.isToggleButtonHost ? 'toggle_button' : this.type(), /* @ts-ignore */
224
- ...(ngDevMode ? [{ debugName: "resolvedType" }] : /* istanbul ignore next */ []));
225
- this.state = computed(() => ({
226
- type: this.resolvedType(),
227
- checked: this.checked(),
228
- indeterminate: effectiveIndeterminate({ type: this.resolvedType(), indeterminate: this.indeterminate() }),
229
- disabled: this.disabled() || this.formDisabled(),
230
- required: this.validity.required(),
231
- invalid: this.validity.invalid(),
232
- name: this.nameResult(),
233
- value: this.value(),
234
- errorText: this.validity.errorText(),
341
+ /** What the checkboxes read. */
342
+ this.provided = computed(() => ({
343
+ grouped: true,
344
+ name: this.name(),
345
+ value: this.accessor.bound() ? this.accessor.viewValue() : this.value(),
346
+ disabled: this.disabled(),
235
347
  }), /* @ts-ignore */
236
- ...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
237
- this.classes = computed(() => checkboxClasses(this.resolvedType(), this.color(), this.state().invalid), /* @ts-ignore */
238
- ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
239
- this.bags = computed(() => {
240
- const { 'aria-describedby': describedBy, ...aria } = this.hostAria;
241
- const bags = connectCheckbox(this.state(), this.id, describedBy);
242
- const inputBag = { ...bags.input, ...aria, 'aria-describedby': bags.input['aria-describedby'] };
243
- return { ...bags, input: inputBag, labelFor: bags.labelFor === null ? null : String(inputBag['id']) };
244
- }, /* @ts-ignore */
245
- ...(ngDevMode ? [{ debugName: "bags" }] : /* istanbul ignore next */ []));
246
- // #452: the forms partial ships with this component, scoped to the elements it stamps (data-mps="checkbox").
247
- useBootstrap(bootstrapForms);
248
- // `indeterminate` has no attribute, so it is a browser-only property write;
249
- // aria-checked="mixed" in the bag already carries it in the SSR output.
250
- afterRenderEffect(() => {
251
- const el = this.inputRef()?.nativeElement;
252
- if (el)
253
- el.indeterminate = this.state().indeterminate;
254
- });
255
- }
256
- onChange(ev) {
257
- // A user toggle always clears the mixed state, natively and here.
258
- this.isToggled.set(ev.target.checked);
259
- this.indeterminate.set(false);
348
+ ...(ngDevMode ? [{ debugName: "provided" }] : /* istanbul ignore next */ []));
349
+ const host = inject(ElementRef).nativeElement;
350
+ if (!host.hasAttribute('role') && !STRUCTURAL.has(host.tagName))
351
+ host.setAttribute('role', 'group');
352
+ // Keep [(value)] honest: a toggle writes back.
353
+ this.accessor.onPick = (value) => this.value.set(value);
260
354
  }
261
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsCheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
262
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: BsCheckboxComponent, isStandalone: true, selector: "bs-checkbox, bs-toggle-button", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, isToggled: { classPropertyName: "isToggled", publicName: "isToggled", isSignal: true, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, group: { classPropertyName: "group", publicName: "group", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isToggled: "isToggledChange", indeterminate: "indeterminateChange" }, host: { classAttribute: "d-inline-block" }, viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["input"], descendants: true, isSignal: true }], hostDirectives: [{ directive: BsCheckboxValueAccessor }, { directive: i2.BsControlValidityDirective, inputs: ["errorMessages", "errorMessages"] }], ngImport: i0, template: "@if (classes().root; as rootClass) {\n <label data-mps=\"checkbox\" [class]=\"rootClass\">\n <input data-mps=\"checkbox\" #input type=\"checkbox\" [class]=\"classes().input\" [mpProps]=\"bags().input\" [checked]=\"checked()\" [attr.checked]=\"checked() ? '' : null\" (change)=\"onChange($event)\">\n <span data-mps=\"checkbox\" [class]=\"classes().label\"><ng-container [ngTemplateOutlet]=\"content\"></ng-container></span>\n </label>\n} @else {\n <input data-mps=\"checkbox\" #input type=\"checkbox\" [class]=\"classes().input\" [mpProps]=\"bags().input\" [checked]=\"checked()\" [attr.checked]=\"checked() ? '' : null\" (change)=\"onChange($event)\">\n <label data-mps=\"checkbox\" [class]=\"classes().label\" [attr.for]=\"bags().labelFor\"><ng-container [ngTemplateOutlet]=\"content\"></ng-container></label>\n}\n@if (bags().feedback; as feedback) {\n <div data-mps=\"checkbox\" [mpProps]=\"feedback.attrs\">{{ feedback.text }}</div>\n}\n<ng-template #content><ng-content></ng-content></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 }); }
355
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsCheckboxGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
356
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.8", type: BsCheckboxGroupDirective, isStandalone: true, selector: "[bsCheckboxGroup]", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { properties: { "attr.data-checkbox-group": "''", "attr.aria-disabled": "disabled() ? 'true' : null" } }, providers: [{ provide: coreContextToken(CHECKBOX_GROUP), useFactory: () => inject(BsCheckboxGroupDirective).provided }], exportAs: ["bsCheckboxGroup"], hostDirectives: [{ directive: BsCheckboxGroupValueAccessor }], ngImport: i0 }); }
263
357
  }
264
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsCheckboxComponent, decorators: [{
265
- type: Component,
266
- args: [{ selector: 'bs-checkbox, bs-toggle-button', imports: [MpPropsDirective, NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [BsCheckboxValueAccessor, {
267
- directive: BsControlValidityDirective,
268
- inputs: ['errorMessages'],
269
- }], host: {
270
- 'class': 'd-inline-block',
271
- }, template: "@if (classes().root; as rootClass) {\n <label data-mps=\"checkbox\" [class]=\"rootClass\">\n <input data-mps=\"checkbox\" #input type=\"checkbox\" [class]=\"classes().input\" [mpProps]=\"bags().input\" [checked]=\"checked()\" [attr.checked]=\"checked() ? '' : null\" (change)=\"onChange($event)\">\n <span data-mps=\"checkbox\" [class]=\"classes().label\"><ng-container [ngTemplateOutlet]=\"content\"></ng-container></span>\n </label>\n} @else {\n <input data-mps=\"checkbox\" #input type=\"checkbox\" [class]=\"classes().input\" [mpProps]=\"bags().input\" [checked]=\"checked()\" [attr.checked]=\"checked() ? '' : null\" (change)=\"onChange($event)\">\n <label data-mps=\"checkbox\" [class]=\"classes().label\" [attr.for]=\"bags().labelFor\"><ng-container [ngTemplateOutlet]=\"content\"></ng-container></label>\n}\n@if (bags().feedback; as feedback) {\n <div data-mps=\"checkbox\" [mpProps]=\"feedback.attrs\">{{ feedback.text }}</div>\n}\n<ng-template #content><ng-content></ng-content></ng-template>\n" }]
272
- }], ctorParameters: () => [], propDecorators: { inputRef: [{ type: i0.ViewChild, args: ['input', { isSignal: true }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], isToggled: [{ type: i0.Input, args: [{ isSignal: true, alias: "isToggled", required: false }] }, { type: i0.Output, args: ["isToggledChange"] }], indeterminate: [{ type: i0.Input, args: [{ isSignal: true, alias: "indeterminate", required: false }] }, { type: i0.Output, args: ["indeterminateChange"] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], group: [{ type: i0.Input, args: [{ isSignal: true, alias: "group", required: false }] }] } });
358
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsCheckboxGroupDirective, decorators: [{
359
+ type: Directive,
360
+ args: [{
361
+ selector: '[bsCheckboxGroup]',
362
+ exportAs: 'bsCheckboxGroup',
363
+ hostDirectives: [BsCheckboxGroupValueAccessor],
364
+ providers: [{ provide: coreContextToken(CHECKBOX_GROUP), useFactory: () => inject(BsCheckboxGroupDirective).provided }],
365
+ host: {
366
+ // CHECKBOX_GROUP_ATTR, literal for the AOT compiler: the checkboxes find their group by it.
367
+ '[attr.data-checkbox-group]': "''",
368
+ '[attr.aria-disabled]': "disabled() ? 'true' : null",
369
+ },
370
+ }]
371
+ }], ctorParameters: () => [], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }] } });
372
+
373
+ // Generated from @mintplayer/ui-core/checkbox (#458 M4, D10): bs-checkbox, bs-toggle-button, bs-checkbox-group.
273
374
 
274
375
  /**
275
376
  * Generated bundle index. Do not edit.
276
377
  */
277
378
 
278
- export { BsCheckboxComponent, BsCheckboxGroupDirective, BsCheckboxValueAccessor };
379
+ export { BsCheckboxComponent, BsCheckboxGroupComponent, BsCheckboxGroupDirective, BsCheckboxGroupValueAccessor, BsCheckboxValueAccessor, BsToggleButtonComponent };
279
380
  //# sourceMappingURL=mintplayer-ng-bootstrap-checkbox.mjs.map