@mintplayer/ng-bootstrap 22.31.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 (247) hide show
  1. package/README.md +12 -11
  2. package/_bootstrap.scss +2 -4
  3. package/a11y/forms/package.json +4 -0
  4. package/fesm2022/mintplayer-ng-bootstrap-a11y-forms.mjs +120 -0
  5. package/fesm2022/mintplayer-ng-bootstrap-a11y-forms.mjs.map +1 -0
  6. package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs +3 -273
  7. package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs.map +1 -1
  8. package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs +72 -139
  9. package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs.map +1 -1
  10. package/fesm2022/mintplayer-ng-bootstrap-alert.mjs +34 -60
  11. package/fesm2022/mintplayer-ng-bootstrap-alert.mjs.map +1 -1
  12. package/fesm2022/mintplayer-ng-bootstrap-badge.mjs +24 -27
  13. package/fesm2022/mintplayer-ng-bootstrap-badge.mjs.map +1 -1
  14. package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs +39 -17
  15. package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs.map +1 -1
  16. package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs +26 -6
  17. package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs.map +1 -1
  18. package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs +4 -8
  19. package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs.map +1 -1
  20. package/fesm2022/mintplayer-ng-bootstrap-card.mjs +169 -240
  21. package/fesm2022/mintplayer-ng-bootstrap-card.mjs.map +1 -1
  22. package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs +9 -8
  23. package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs.map +1 -1
  24. package/fesm2022/mintplayer-ng-bootstrap-charts-hierarchy.mjs +6 -8
  25. package/fesm2022/mintplayer-ng-bootstrap-charts-hierarchy.mjs.map +1 -1
  26. package/fesm2022/mintplayer-ng-bootstrap-charts-sparkline.mjs +31 -40
  27. package/fesm2022/mintplayer-ng-bootstrap-charts-sparkline.mjs.map +1 -1
  28. package/fesm2022/mintplayer-ng-bootstrap-charts-trend.mjs +5 -5
  29. package/fesm2022/mintplayer-ng-bootstrap-charts-trend.mjs.map +1 -1
  30. package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs +316 -211
  31. package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs.map +1 -1
  32. package/fesm2022/mintplayer-ng-bootstrap-close.mjs +26 -12
  33. package/fesm2022/mintplayer-ng-bootstrap-close.mjs.map +1 -1
  34. package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs +5 -5
  35. package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs.map +1 -1
  36. package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs +87 -676
  37. package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs.map +1 -1
  38. package/fesm2022/mintplayer-ng-bootstrap-context-menu.mjs +52 -119
  39. package/fesm2022/mintplayer-ng-bootstrap-context-menu.mjs.map +1 -1
  40. package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs +16 -24
  41. package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs.map +1 -1
  42. package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs +9 -11
  43. package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs.map +1 -1
  44. package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs +9 -9
  45. package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs.map +1 -1
  46. package/fesm2022/mintplayer-ng-bootstrap-dock.mjs +5 -7
  47. package/fesm2022/mintplayer-ng-bootstrap-dock.mjs.map +1 -1
  48. package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs +201 -197
  49. package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs.map +1 -1
  50. package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs +11 -19
  51. package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs.map +1 -1
  52. package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs +64 -123
  53. package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs.map +1 -1
  54. package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs +19 -29
  55. package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs.map +1 -1
  56. package/fesm2022/mintplayer-ng-bootstrap-for.mjs +8 -4
  57. package/fesm2022/mintplayer-ng-bootstrap-for.mjs.map +1 -1
  58. package/fesm2022/mintplayer-ng-bootstrap-form.mjs +54 -35
  59. package/fesm2022/mintplayer-ng-bootstrap-form.mjs.map +1 -1
  60. package/fesm2022/mintplayer-ng-bootstrap-grid.mjs +72 -99
  61. package/fesm2022/mintplayer-ng-bootstrap-grid.mjs.map +1 -1
  62. package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs +23 -36
  63. package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs.map +1 -1
  64. package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs +45 -28
  65. package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs.map +1 -1
  66. package/fesm2022/mintplayer-ng-bootstrap-machine.mjs +214 -19
  67. package/fesm2022/mintplayer-ng-bootstrap-machine.mjs.map +1 -1
  68. package/fesm2022/mintplayer-ng-bootstrap-marquee.mjs +27 -12
  69. package/fesm2022/mintplayer-ng-bootstrap-marquee.mjs.map +1 -1
  70. package/fesm2022/mintplayer-ng-bootstrap-modal.mjs +61 -245
  71. package/fesm2022/mintplayer-ng-bootstrap-modal.mjs.map +1 -1
  72. package/fesm2022/mintplayer-ng-bootstrap-multi-range.mjs +9 -11
  73. package/fesm2022/mintplayer-ng-bootstrap-multi-range.mjs.map +1 -1
  74. package/fesm2022/mintplayer-ng-bootstrap-nav.mjs +92 -0
  75. package/fesm2022/mintplayer-ng-bootstrap-nav.mjs.map +1 -0
  76. package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs +31 -15
  77. package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs.map +1 -1
  78. package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs +49 -77
  79. package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs.map +1 -1
  80. package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs +53 -393
  81. package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs.map +1 -1
  82. package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs +11 -9
  83. package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs.map +1 -1
  84. package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs +29 -49
  85. package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs.map +1 -1
  86. package/fesm2022/mintplayer-ng-bootstrap-parallax.mjs +21 -12
  87. package/fesm2022/mintplayer-ng-bootstrap-parallax.mjs.map +1 -1
  88. package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs +12 -12
  89. package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs.map +1 -1
  90. package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs +27 -49
  91. package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs.map +1 -1
  92. package/fesm2022/mintplayer-ng-bootstrap-playlist-toggler.mjs +29 -15
  93. package/fesm2022/mintplayer-ng-bootstrap-playlist-toggler.mjs.map +1 -1
  94. package/fesm2022/mintplayer-ng-bootstrap-popover.mjs +57 -253
  95. package/fesm2022/mintplayer-ng-bootstrap-popover.mjs.map +1 -1
  96. package/fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs +60 -335
  97. package/fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs.map +1 -1
  98. package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs +48 -57
  99. package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs.map +1 -1
  100. package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs +11 -15
  101. package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs.map +1 -1
  102. package/fesm2022/mintplayer-ng-bootstrap-radio.mjs +235 -168
  103. package/fesm2022/mintplayer-ng-bootstrap-radio.mjs.map +1 -1
  104. package/fesm2022/mintplayer-ng-bootstrap-range.mjs +86 -44
  105. package/fesm2022/mintplayer-ng-bootstrap-range.mjs.map +1 -1
  106. package/fesm2022/mintplayer-ng-bootstrap-rating.mjs +80 -137
  107. package/fesm2022/mintplayer-ng-bootstrap-rating.mjs.map +1 -1
  108. package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs +29 -326
  109. package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs.map +1 -1
  110. package/fesm2022/mintplayer-ng-bootstrap-ribbon.mjs +47 -63
  111. package/fesm2022/mintplayer-ng-bootstrap-ribbon.mjs.map +1 -1
  112. package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs +16 -22
  113. package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs.map +1 -1
  114. package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs +48 -171
  115. package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs.map +1 -1
  116. package/fesm2022/mintplayer-ng-bootstrap-select.mjs +12 -10
  117. package/fesm2022/mintplayer-ng-bootstrap-select.mjs.map +1 -1
  118. package/fesm2022/mintplayer-ng-bootstrap-shell.mjs +52 -108
  119. package/fesm2022/mintplayer-ng-bootstrap-shell.mjs.map +1 -1
  120. package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs +9 -9
  121. package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs.map +1 -1
  122. package/fesm2022/mintplayer-ng-bootstrap-spinner.mjs +25 -11
  123. package/fesm2022/mintplayer-ng-bootstrap-spinner.mjs.map +1 -1
  124. package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs +6 -6
  125. package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs.map +1 -1
  126. package/fesm2022/mintplayer-ng-bootstrap-sticky-footer.mjs +37 -32
  127. package/fesm2022/mintplayer-ng-bootstrap-sticky-footer.mjs.map +1 -1
  128. package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs +61 -99
  129. package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs.map +1 -1
  130. package/fesm2022/mintplayer-ng-bootstrap-table.mjs +31 -30
  131. package/fesm2022/mintplayer-ng-bootstrap-table.mjs.map +1 -1
  132. package/fesm2022/mintplayer-ng-bootstrap-theming.mjs +1 -1
  133. package/fesm2022/mintplayer-ng-bootstrap-theming.mjs.map +1 -1
  134. package/fesm2022/mintplayer-ng-bootstrap-tile-manager.mjs +67 -306
  135. package/fesm2022/mintplayer-ng-bootstrap-tile-manager.mjs.map +1 -1
  136. package/fesm2022/mintplayer-ng-bootstrap-timeline.mjs +7 -9
  137. package/fesm2022/mintplayer-ng-bootstrap-timeline.mjs.map +1 -1
  138. package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs +14 -15
  139. package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs.map +1 -1
  140. package/fesm2022/mintplayer-ng-bootstrap-toast.mjs +109 -143
  141. package/fesm2022/mintplayer-ng-bootstrap-toast.mjs.map +1 -1
  142. package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs +51 -154
  143. package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs.map +1 -1
  144. package/fesm2022/mintplayer-ng-bootstrap-tree-select.mjs +9 -11
  145. package/fesm2022/mintplayer-ng-bootstrap-tree-select.mjs.map +1 -1
  146. package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs +11 -13
  147. package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs.map +1 -1
  148. package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs +160 -232
  149. package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs.map +1 -1
  150. package/nav/package.json +4 -0
  151. package/package.json +11 -28
  152. package/types/mintplayer-ng-bootstrap-a11y-forms.d.ts +64 -0
  153. package/types/mintplayer-ng-bootstrap-a11y.d.ts +3 -142
  154. package/types/mintplayer-ng-bootstrap-accordion.d.ts +51 -86
  155. package/types/mintplayer-ng-bootstrap-alert.d.ts +21 -28
  156. package/types/mintplayer-ng-bootstrap-badge.d.ts +13 -12
  157. package/types/mintplayer-ng-bootstrap-breadcrumb.d.ts +31 -8
  158. package/types/mintplayer-ng-bootstrap-button-group.d.ts +15 -4
  159. package/types/mintplayer-ng-bootstrap-calendar.d.ts +1 -5
  160. package/types/mintplayer-ng-bootstrap-card.d.ts +102 -76
  161. package/types/mintplayer-ng-bootstrap-carousel.d.ts +4 -6
  162. package/types/mintplayer-ng-bootstrap-charts-hierarchy.d.ts +4 -6
  163. package/types/mintplayer-ng-bootstrap-charts-sparkline.d.ts +24 -17
  164. package/types/mintplayer-ng-bootstrap-charts-trend.d.ts +3 -3
  165. package/types/mintplayer-ng-bootstrap-checkbox.d.ts +144 -92
  166. package/types/mintplayer-ng-bootstrap-close.d.ts +17 -5
  167. package/types/mintplayer-ng-bootstrap-code-snippet.d.ts +3 -3
  168. package/types/mintplayer-ng-bootstrap-color-picker.d.ts +42 -226
  169. package/types/mintplayer-ng-bootstrap-context-menu.d.ts +35 -17
  170. package/types/mintplayer-ng-bootstrap-datatable.d.ts +23 -35
  171. package/types/mintplayer-ng-bootstrap-datepicker.d.ts +3 -7
  172. package/types/mintplayer-ng-bootstrap-datetime-picker.d.ts +3 -5
  173. package/types/mintplayer-ng-bootstrap-dock.d.ts +6 -8
  174. package/types/mintplayer-ng-bootstrap-dropdown.d.ts +122 -54
  175. package/types/mintplayer-ng-bootstrap-file-manager.d.ts +10 -20
  176. package/types/mintplayer-ng-bootstrap-file-upload.d.ts +62 -44
  177. package/types/mintplayer-ng-bootstrap-floating-labels.d.ts +12 -15
  178. package/types/mintplayer-ng-bootstrap-for.d.ts +5 -5
  179. package/types/mintplayer-ng-bootstrap-form.d.ts +33 -11
  180. package/types/mintplayer-ng-bootstrap-grid.d.ts +42 -21
  181. package/types/mintplayer-ng-bootstrap-input-group.d.ts +11 -22
  182. package/types/mintplayer-ng-bootstrap-list-group.d.ts +31 -10
  183. package/types/mintplayer-ng-bootstrap-machine.d.ts +107 -5
  184. package/types/mintplayer-ng-bootstrap-marquee.d.ts +18 -5
  185. package/types/mintplayer-ng-bootstrap-modal.d.ts +43 -84
  186. package/types/mintplayer-ng-bootstrap-multi-range.d.ts +4 -6
  187. package/types/mintplayer-ng-bootstrap-nav.d.ts +52 -0
  188. package/types/mintplayer-ng-bootstrap-navbar-toggler.d.ts +22 -6
  189. package/types/mintplayer-ng-bootstrap-navbar.d.ts +27 -38
  190. package/types/mintplayer-ng-bootstrap-offcanvas.d.ts +35 -112
  191. package/types/mintplayer-ng-bootstrap-otp-input.d.ts +5 -4
  192. package/types/mintplayer-ng-bootstrap-pagination.d.ts +22 -34
  193. package/types/mintplayer-ng-bootstrap-parallax.d.ts +14 -4
  194. package/types/mintplayer-ng-bootstrap-phone-input.d.ts +6 -7
  195. package/types/mintplayer-ng-bootstrap-placeholder.d.ts +19 -18
  196. package/types/mintplayer-ng-bootstrap-playlist-toggler.d.ts +22 -6
  197. package/types/mintplayer-ng-bootstrap-popover.d.ts +36 -59
  198. package/types/mintplayer-ng-bootstrap-priority-nav.d.ts +80 -68
  199. package/types/mintplayer-ng-bootstrap-progress-bar.d.ts +35 -18
  200. package/types/mintplayer-ng-bootstrap-query-builder.d.ts +12 -20
  201. package/types/mintplayer-ng-bootstrap-radio.d.ts +112 -84
  202. package/types/mintplayer-ng-bootstrap-range.d.ts +36 -13
  203. package/types/mintplayer-ng-bootstrap-rating.d.ts +33 -42
  204. package/types/mintplayer-ng-bootstrap-resizable.d.ts +24 -114
  205. package/types/mintplayer-ng-bootstrap-ribbon.d.ts +21 -37
  206. package/types/mintplayer-ng-bootstrap-scheduler.d.ts +19 -27
  207. package/types/mintplayer-ng-bootstrap-scrollspy.d.ts +26 -50
  208. package/types/mintplayer-ng-bootstrap-select.d.ts +9 -8
  209. package/types/mintplayer-ng-bootstrap-shell.d.ts +40 -63
  210. package/types/mintplayer-ng-bootstrap-signature-pad.d.ts +5 -7
  211. package/types/mintplayer-ng-bootstrap-spinner.d.ts +14 -7
  212. package/types/mintplayer-ng-bootstrap-splitter.d.ts +3 -3
  213. package/types/mintplayer-ng-bootstrap-sticky-footer.d.ts +23 -13
  214. package/types/mintplayer-ng-bootstrap-tab-control.d.ts +61 -57
  215. package/types/mintplayer-ng-bootstrap-table.d.ts +23 -18
  216. package/types/mintplayer-ng-bootstrap-tile-manager.d.ts +94 -154
  217. package/types/mintplayer-ng-bootstrap-timeline.d.ts +23 -25
  218. package/types/mintplayer-ng-bootstrap-timepicker.d.ts +4 -8
  219. package/types/mintplayer-ng-bootstrap-toast.d.ts +94 -55
  220. package/types/mintplayer-ng-bootstrap-tooltip.d.ts +34 -33
  221. package/types/mintplayer-ng-bootstrap-tree-select.d.ts +14 -16
  222. package/types/mintplayer-ng-bootstrap-treeview.d.ts +12 -13
  223. package/types/mintplayer-ng-bootstrap-typeahead.d.ts +109 -133
  224. package/calendar-month/package.json +0 -4
  225. package/container/package.json +0 -4
  226. package/dropdown-divider/package.json +0 -4
  227. package/dropdown-menu/package.json +0 -4
  228. package/fesm2022/mintplayer-ng-bootstrap-calendar-month.mjs +0 -136
  229. package/fesm2022/mintplayer-ng-bootstrap-calendar-month.mjs.map +0 -1
  230. package/fesm2022/mintplayer-ng-bootstrap-container.mjs +0 -18
  231. package/fesm2022/mintplayer-ng-bootstrap-container.mjs.map +0 -1
  232. package/fesm2022/mintplayer-ng-bootstrap-dropdown-divider.mjs +0 -23
  233. package/fesm2022/mintplayer-ng-bootstrap-dropdown-divider.mjs.map +0 -1
  234. package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs +0 -161
  235. package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs.map +0 -1
  236. package/fesm2022/mintplayer-ng-bootstrap-has-overlay.mjs +0 -32
  237. package/fesm2022/mintplayer-ng-bootstrap-has-overlay.mjs.map +0 -1
  238. package/fesm2022/mintplayer-ng-bootstrap-no-noscript.mjs +0 -31
  239. package/fesm2022/mintplayer-ng-bootstrap-no-noscript.mjs.map +0 -1
  240. package/has-overlay/package.json +0 -4
  241. package/no-noscript/package.json +0 -4
  242. package/types/mintplayer-ng-bootstrap-calendar-month.d.ts +0 -54
  243. package/types/mintplayer-ng-bootstrap-container.d.ts +0 -8
  244. package/types/mintplayer-ng-bootstrap-dropdown-divider.d.ts +0 -8
  245. package/types/mintplayer-ng-bootstrap-dropdown-menu.d.ts +0 -94
  246. package/types/mintplayer-ng-bootstrap-has-overlay.d.ts +0 -22
  247. package/types/mintplayer-ng-bootstrap-no-noscript.d.ts +0 -11
@@ -1,275 +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 { NgTemplateOutlet } from '@angular/common';
4
- import { effectiveIndeterminate, checkboxClasses, connectCheckbox } from '@mintplayer/ui-core/checkbox';
5
- import * as i2 from '@mintplayer/ng-bootstrap/a11y';
6
- import { BsControlValidityDirective, takeHostAria, BsIdService } from '@mintplayer/ng-bootstrap/a11y';
7
- import { 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';
5
+ import { bootstrapForms } from '@mintplayer/ui-core/bootstrap/forms';
6
+ import * as i2 from '@mintplayer/ng-bootstrap/a11y/forms';
7
+ import { BsControlValidityDirective } from '@mintplayer/ng-bootstrap/a11y/forms';
8
8
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
9
9
 
10
10
  /**
11
- * Single-mode (standalone) value accessor for `<bs-checkbox>`. Emits a
12
- * `boolean` reflecting the checked state. For multi-mode use, bind
13
- * `[formControl]` on `[bsCheckboxGroup]` instead — that directive owns
14
- * 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.
15
14
  */
16
15
  class BsCheckboxValueAccessor {
17
16
  constructor() {
18
- this.host = inject(BsCheckboxComponent);
19
- }
20
- onChangeEvent(ev) {
21
- const target = ev.target;
22
- if (!this.onValueChange || target?.type !== 'checkbox')
23
- return;
24
- 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;
25
28
  }
26
29
  registerOnChange(fn) {
27
- this.onValueChange = fn;
30
+ this.bound.set(true);
31
+ this.onChange = fn;
28
32
  }
29
33
  registerOnTouched(fn) {
30
34
  this.onTouched = fn;
31
35
  }
36
+ setDisabledState(isDisabled) {
37
+ this.disabled.set(isDisabled);
38
+ }
32
39
  writeValue(value) {
33
- this.host.isToggled.set(value);
40
+ this.viewValue.set(!!value);
34
41
  }
35
- setDisabledState(isDisabled) {
36
- 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);
37
49
  }
38
50
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsCheckboxValueAccessor, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
39
- 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: [{
40
- provide: NG_VALUE_ACCESSOR,
41
- useExisting: forwardRef(() => BsCheckboxValueAccessor),
42
- multi: true,
43
- }], 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 }); }
44
52
  }
45
53
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsCheckboxValueAccessor, decorators: [{
46
54
  type: Directive,
47
55
  args: [{
48
- selector: 'bs-checkbox',
49
- providers: [{
50
- provide: NG_VALUE_ACCESSOR,
51
- useExisting: forwardRef(() => BsCheckboxValueAccessor),
52
- multi: true,
53
- }],
56
+ // Applied as a host directive only.
57
+ selector: '[bsCheckboxAccessor]',
58
+ providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsCheckboxValueAccessor), multi: true }],
54
59
  host: {
55
- // The inner native input's change and blur bubble to the host.
56
- '(change)': 'onChangeEvent($event)',
57
- '(focusout)': 'onTouched?.()',
60
+ // The native input's change and blur bubble to the host.
61
+ '(change)': 'onNativeChange($event)',
62
+ '(focusout)': 'onTouched()',
58
63
  },
59
64
  }]
60
65
  }] });
61
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.
62
94
  /**
63
- * Groups N `<bs-checkbox>` children into a multi-select FormControl whose
64
- * value is a `string[]` of every checked child's `value()`. The group's
65
- * `[name]` is the form-array name; the accessor appends the `[]` suffix
66
- * automatically on each child's inner `<input>` for traditional-form
67
- * submission. Per-instance `[name]` on each child is ignored when the
68
- * child resolves into a group.
69
- *
70
- * Acts as its own `ControlValueAccessor` — bind `[formControl]` / `[(ngModel)]`
71
- * directly on the element carrying `[bsCheckboxGroup]`. Listens to bubbled
72
- * `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.
73
100
  */
74
- class BsCheckboxGroupDirective {
101
+ class BsCheckboxComponent {
102
+ #core;
75
103
  constructor() {
76
- 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 */ []));
77
114
  this.name = input(null, /* @ts-ignore */
78
115
  ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
79
- /** Accessible name for the group (written as `aria-label`). A bare
80
- * `role="group"` is announced as nothing at all; the label is what makes
81
- * the grouping audible ("Toppings, group"). */
82
- this.label = input(null, /* @ts-ignore */
83
- ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
84
- // Wrap in forwardRef: BsCheckboxComponent imports this directive (for
85
- // `inject(BsCheckboxGroupDirective, {...})`), so the two modules form a
86
- // cycle. Whichever side webpack/vite evaluates first sees `undefined` for
87
- // the other's exports at field-initialiser time, which makes the recorded
88
- // query predicate null — ng-mocks' MockDirective then fails with "the
89
- // query selector wasn't defined" on consumers that mock the group.
90
- this.checkboxes = contentChildren(forwardRef(() => BsCheckboxComponent), { ...(ngDevMode ? { debugName: "checkboxes" } : /* istanbul ignore next */ {}), descendants: true });
91
- /** Most-recently-written form value. An effect syncs each child's
92
- * `isToggled` whenever this OR the
93
- * `checkboxes()` set changes, so an initial `writeValue` that lands
94
- * before children register still applies once the `contentChildren`
95
- * query populates. */
96
- this.currentValue = signal([], /* @ts-ignore */
97
- ...(ngDevMode ? [{ debugName: "currentValue" }] : /* istanbul ignore next */ []));
98
- // role="group" so the checkboxes announce as one named cluster — but only
99
- // on hosts whose implicit role is generic. Structural hosts (the tbody
100
- // row-selection shape) have load-bearing native semantics that a group
101
- // role would destroy, and a consumer-set role always wins.
102
- const structural = ['TABLE', 'THEAD', 'TBODY', 'TFOOT', 'TR', 'UL', 'OL', 'LI'];
103
- if (!this.host.hasAttribute('role') && !structural.includes(this.host.tagName)) {
104
- this.host.setAttribute('role', 'group');
105
- }
106
- effect(() => {
107
- const label = this.label();
108
- if (label !== null)
109
- this.host.setAttribute('aria-label', label);
110
- });
111
- effect(() => {
112
- const arr = this.currentValue();
113
- this.checkboxes().map((cb) => {
114
- const v = cb.value();
115
- const isSelected = v != null && arr.includes(v);
116
- cb.isToggled.set(isSelected);
117
- });
118
- });
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);
119
132
  }
120
- onChildChange() {
121
- if (!this.onValueChange)
122
- return;
123
- const result = this.checkboxes()
124
- .filter(cb => !!cb.isToggled() && cb.value() != null)
125
- .map(cb => cb.value());
126
- 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;
127
227
  }
128
228
  registerOnChange(fn) {
129
- this.onValueChange = fn;
229
+ this.bound.set(true);
230
+ this.onChange = fn;
130
231
  }
131
232
  registerOnTouched(fn) {
132
233
  this.onTouched = fn;
133
234
  }
235
+ setDisabledState(isDisabled) {
236
+ this.disabled.set(isDisabled);
237
+ }
134
238
  writeValue(value) {
135
- this.currentValue.set(Array.isArray(value) ? value : []);
239
+ this.viewValue.set(Array.isArray(value) ? value : []);
136
240
  }
137
- setDisabledState(isDisabled) {
138
- 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);
139
248
  }
140
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsCheckboxGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
141
- 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: [{
142
- provide: NG_VALUE_ACCESSOR,
143
- useExisting: forwardRef(() => BsCheckboxGroupDirective),
144
- multi: true,
145
- }], 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 }); }
146
251
  }
147
- 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: [{
148
253
  type: Directive,
149
254
  args: [{
150
- selector: '[bsCheckboxGroup]',
151
- exportAs: 'bsCheckboxGroup',
152
- providers: [{
153
- provide: NG_VALUE_ACCESSOR,
154
- useExisting: forwardRef(() => BsCheckboxGroupDirective),
155
- multi: true,
156
- }],
255
+ // Applied as a host directive only.
256
+ selector: '[bsCheckboxGroupAccessor]',
257
+ providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsCheckboxGroupValueAccessor), multi: true }],
157
258
  host: {
158
- '(change)': 'onChildChange()',
159
- // The inner inputs' focusout bubbles to the group host. The
160
- // stored onTouched was never CALLED before, which kept every
161
- // invalid-after-touched mirror dead (audit 4.9 prerequisite).
162
- '(focusout)': 'onTouched?.()',
259
+ // A native checkbox's change bubbles to the group's element.
260
+ '(change)': 'onNativeChange($event)',
261
+ '(focusout)': 'onTouched()',
163
262
  },
164
263
  }]
165
- }], 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
+ }
166
283
 
284
+ // GENERATED from the checkbox manifest (checkbox-group) by @mintplayer/nx-component-compiler. Do not edit.
167
285
  /**
168
- * A native `<input type=checkbox>` in Bootstrap's `.form-check` /
169
- * `.form-switch` / `.btn-check` markup, rendered by this component's own
170
- * template (#437): it submits, toggles and announces with JavaScript off,
171
- * and SSR emits the real control. The ARIA contract comes from
172
- * `@mintplayer/ui-core/checkbox`; the consumer's `aria-*` / `id` /
173
- * `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.
174
289
  */
175
- class BsCheckboxComponent {
290
+ class BsCheckboxGroupComponent {
291
+ #core;
176
292
  constructor() {
177
- this.parentGroup = inject(BsCheckboxGroupDirective, { optional: true, skipSelf: true });
178
- this.validity = inject(BsControlValidityDirective, { self: true });
179
- this.host = inject(ElementRef).nativeElement;
180
- this.hostAria = takeHostAria(this.host);
181
- this.id = inject(BsIdService).next('bs-checkbox');
182
- this.inputRef = viewChild('input', /* @ts-ignore */
183
- ...(ngDevMode ? [{ debugName: "inputRef" }] : /* istanbul ignore next */ []));
184
- this.type = input('checkbox', /* @ts-ignore */
185
- ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
186
- /** Button colour of a `toggle_button`; ignored by the other types. */
187
- this.color = input('primary', /* @ts-ignore */
188
- ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
189
- this.isToggled = model(false, /* @ts-ignore */
190
- ...(ngDevMode ? [{ debugName: "isToggled" }] : /* istanbul ignore next */ []));
191
- this.indeterminate = model(false, /* @ts-ignore */
192
- ...(ngDevMode ? [{ debugName: "indeterminate" }] : /* istanbul ignore next */ []));
293
+ /** The host element. */
294
+ this.elementRef = inject(ElementRef);
193
295
  this.name = input(null, /* @ts-ignore */
194
296
  ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
195
- 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 */
196
338
  ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
197
- this.disabled = input(false, /* @ts-ignore */
339
+ this.disabled = computed(() => this.accessor.disabled(), /* @ts-ignore */
198
340
  ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
199
- this.group = input(null, /* @ts-ignore */
200
- ...(ngDevMode ? [{ debugName: "group" }] : /* istanbul ignore next */ []));
201
- /** Written by the value accessor and by `[bsCheckboxGroup]` (`setDisabledState`). */
202
- this.formDisabled = signal(false, /* @ts-ignore */
203
- ...(ngDevMode ? [{ debugName: "formDisabled" }] : /* istanbul ignore next */ []));
204
- /** Explicit `[group]` input wins over the DI-injected ancestor. */
205
- this.resolvedGroup = computed(() => this.group() ?? this.parentGroup ?? null, /* @ts-ignore */
206
- ...(ngDevMode ? [{ debugName: "resolvedGroup" }] : /* istanbul ignore next */ []));
207
- /** Single-mode → component's own `[name]`. Multi-mode → group's `[name]` + `[]`. */
208
- this.nameResult = computed(() => {
209
- const group = this.resolvedGroup();
210
- if (group) {
211
- const groupName = group.name();
212
- return groupName == null ? null : `${groupName}[]`;
213
- }
214
- return this.name();
215
- }, /* @ts-ignore */
216
- ...(ngDevMode ? [{ debugName: "nameResult" }] : /* istanbul ignore next */ []));
217
- this.checked = computed(() => !!this.isToggled(), /* @ts-ignore */
218
- ...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
219
- /** `<bs-toggle-button>` is a toggle button whatever `[type]` says. */
220
- this.isToggleButtonHost = this.host.localName === 'bs-toggle-button';
221
- this.resolvedType = computed(() => this.isToggleButtonHost ? 'toggle_button' : this.type(), /* @ts-ignore */
222
- ...(ngDevMode ? [{ debugName: "resolvedType" }] : /* istanbul ignore next */ []));
223
- this.state = computed(() => ({
224
- type: this.resolvedType(),
225
- checked: this.checked(),
226
- indeterminate: effectiveIndeterminate({ type: this.resolvedType(), indeterminate: this.indeterminate() }),
227
- disabled: this.disabled() || this.formDisabled(),
228
- required: this.validity.required(),
229
- invalid: this.validity.invalid(),
230
- name: this.nameResult(),
231
- value: this.value(),
232
- 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(),
233
347
  }), /* @ts-ignore */
234
- ...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
235
- this.classes = computed(() => checkboxClasses(this.resolvedType(), this.color(), this.state().invalid), /* @ts-ignore */
236
- ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
237
- this.bags = computed(() => {
238
- const { 'aria-describedby': describedBy, ...aria } = this.hostAria;
239
- const bags = connectCheckbox(this.state(), this.id, describedBy);
240
- const inputBag = { ...bags.input, ...aria, 'aria-describedby': bags.input['aria-describedby'] };
241
- return { ...bags, input: inputBag, labelFor: bags.labelFor === null ? null : String(inputBag['id']) };
242
- }, /* @ts-ignore */
243
- ...(ngDevMode ? [{ debugName: "bags" }] : /* istanbul ignore next */ []));
244
- // `indeterminate` has no attribute, so it is a browser-only property write;
245
- // aria-checked="mixed" in the bag already carries it in the SSR output.
246
- afterRenderEffect(() => {
247
- const el = this.inputRef()?.nativeElement;
248
- if (el)
249
- el.indeterminate = this.state().indeterminate;
250
- });
251
- }
252
- onChange(ev) {
253
- // A user toggle always clears the mixed state, natively and here.
254
- this.isToggled.set(ev.target.checked);
255
- 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);
256
354
  }
257
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsCheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
258
- 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 [class]=\"rootClass\">\n <input #input type=\"checkbox\" [class]=\"classes().input\" [mpProps]=\"bags().input\" [checked]=\"checked()\" [attr.checked]=\"checked() ? '' : null\" (change)=\"onChange($event)\">\n <span [class]=\"classes().label\"><ng-container [ngTemplateOutlet]=\"content\"></ng-container></span>\n </label>\n} @else {\n <input #input type=\"checkbox\" [class]=\"classes().input\" [mpProps]=\"bags().input\" [checked]=\"checked()\" [attr.checked]=\"checked() ? '' : null\" (change)=\"onChange($event)\">\n <label [class]=\"classes().label\" [attr.for]=\"bags().labelFor\"><ng-container [ngTemplateOutlet]=\"content\"></ng-container></label>\n}\n@if (bags().feedback; as feedback) {\n <div [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 }); }
259
357
  }
260
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsCheckboxComponent, decorators: [{
261
- type: Component,
262
- args: [{ selector: 'bs-checkbox, bs-toggle-button', imports: [MpPropsDirective, NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [BsCheckboxValueAccessor, {
263
- directive: BsControlValidityDirective,
264
- inputs: ['errorMessages'],
265
- }], host: {
266
- 'class': 'd-inline-block',
267
- }, template: "@if (classes().root; as rootClass) {\n <label [class]=\"rootClass\">\n <input #input type=\"checkbox\" [class]=\"classes().input\" [mpProps]=\"bags().input\" [checked]=\"checked()\" [attr.checked]=\"checked() ? '' : null\" (change)=\"onChange($event)\">\n <span [class]=\"classes().label\"><ng-container [ngTemplateOutlet]=\"content\"></ng-container></span>\n </label>\n} @else {\n <input #input type=\"checkbox\" [class]=\"classes().input\" [mpProps]=\"bags().input\" [checked]=\"checked()\" [attr.checked]=\"checked() ? '' : null\" (change)=\"onChange($event)\">\n <label [class]=\"classes().label\" [attr.for]=\"bags().labelFor\"><ng-container [ngTemplateOutlet]=\"content\"></ng-container></label>\n}\n@if (bags().feedback; as feedback) {\n <div [mpProps]=\"feedback.attrs\">{{ feedback.text }}</div>\n}\n<ng-template #content><ng-content></ng-content></ng-template>\n" }]
268
- }], 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.
269
374
 
270
375
  /**
271
376
  * Generated bundle index. Do not edit.
272
377
  */
273
378
 
274
- export { BsCheckboxComponent, BsCheckboxGroupDirective, BsCheckboxValueAccessor };
379
+ export { BsCheckboxComponent, BsCheckboxGroupComponent, BsCheckboxGroupDirective, BsCheckboxGroupValueAccessor, BsCheckboxValueAccessor, BsToggleButtonComponent };
275
380
  //# sourceMappingURL=mintplayer-ng-bootstrap-checkbox.mjs.map