@exhaustive-ui/core 3.0.0-alpha.0 → 3.0.0-alpha.1

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 (265) hide show
  1. package/fesm2022/exhaustive-ui-core-accordion.mjs +51 -78
  2. package/fesm2022/exhaustive-ui-core-accordion.mjs.map +1 -1
  3. package/fesm2022/exhaustive-ui-core-animateonscroll.mjs +72 -73
  4. package/fesm2022/exhaustive-ui-core-animateonscroll.mjs.map +1 -1
  5. package/fesm2022/exhaustive-ui-core-api.mjs +6 -13
  6. package/fesm2022/exhaustive-ui-core-api.mjs.map +1 -1
  7. package/fesm2022/exhaustive-ui-core-autocomplete.mjs +485 -683
  8. package/fesm2022/exhaustive-ui-core-autocomplete.mjs.map +1 -1
  9. package/fesm2022/exhaustive-ui-core-autofocus.mjs +21 -31
  10. package/fesm2022/exhaustive-ui-core-autofocus.mjs.map +1 -1
  11. package/fesm2022/exhaustive-ui-core-avatar.mjs +47 -63
  12. package/fesm2022/exhaustive-ui-core-avatar.mjs.map +1 -1
  13. package/fesm2022/exhaustive-ui-core-badge.mjs +88 -115
  14. package/fesm2022/exhaustive-ui-core-badge.mjs.map +1 -1
  15. package/fesm2022/exhaustive-ui-core-blockui.mjs +58 -91
  16. package/fesm2022/exhaustive-ui-core-blockui.mjs.map +1 -1
  17. package/fesm2022/exhaustive-ui-core-breadcrumb.mjs +155 -169
  18. package/fesm2022/exhaustive-ui-core-breadcrumb.mjs.map +1 -1
  19. package/fesm2022/exhaustive-ui-core-button.mjs +280 -385
  20. package/fesm2022/exhaustive-ui-core-button.mjs.map +1 -1
  21. package/fesm2022/exhaustive-ui-core-carousel.mjs +379 -451
  22. package/fesm2022/exhaustive-ui-core-carousel.mjs.map +1 -1
  23. package/fesm2022/exhaustive-ui-core-cascadeselect.mjs +388 -507
  24. package/fesm2022/exhaustive-ui-core-cascadeselect.mjs.map +1 -1
  25. package/fesm2022/exhaustive-ui-core-chart.mjs +75 -91
  26. package/fesm2022/exhaustive-ui-core-chart.mjs.map +1 -1
  27. package/fesm2022/exhaustive-ui-core-checkbox.mjs +109 -160
  28. package/fesm2022/exhaustive-ui-core-checkbox.mjs.map +1 -1
  29. package/fesm2022/exhaustive-ui-core-chip.mjs +98 -137
  30. package/fesm2022/exhaustive-ui-core-chip.mjs.map +1 -1
  31. package/fesm2022/exhaustive-ui-core-colorpicker.mjs +123 -190
  32. package/fesm2022/exhaustive-ui-core-colorpicker.mjs.map +1 -1
  33. package/fesm2022/exhaustive-ui-core-confirmdialog.mjs +157 -332
  34. package/fesm2022/exhaustive-ui-core-confirmdialog.mjs.map +1 -1
  35. package/fesm2022/exhaustive-ui-core-confirmpopup.mjs +187 -210
  36. package/fesm2022/exhaustive-ui-core-confirmpopup.mjs.map +1 -1
  37. package/fesm2022/exhaustive-ui-core-contextmenu.mjs +315 -361
  38. package/fesm2022/exhaustive-ui-core-contextmenu.mjs.map +1 -1
  39. package/fesm2022/exhaustive-ui-core-dataview.mjs +225 -272
  40. package/fesm2022/exhaustive-ui-core-dataview.mjs.map +1 -1
  41. package/fesm2022/exhaustive-ui-core-datepicker.mjs +1012 -1157
  42. package/fesm2022/exhaustive-ui-core-datepicker.mjs.map +1 -1
  43. package/fesm2022/exhaustive-ui-core-dialog.mjs +370 -507
  44. package/fesm2022/exhaustive-ui-core-dialog.mjs.map +1 -1
  45. package/fesm2022/exhaustive-ui-core-dock.mjs +87 -115
  46. package/fesm2022/exhaustive-ui-core-dock.mjs.map +1 -1
  47. package/fesm2022/exhaustive-ui-core-dragdrop.mjs +98 -105
  48. package/fesm2022/exhaustive-ui-core-dragdrop.mjs.map +1 -1
  49. package/fesm2022/exhaustive-ui-core-drawer.mjs +174 -235
  50. package/fesm2022/exhaustive-ui-core-drawer.mjs.map +1 -1
  51. package/fesm2022/exhaustive-ui-core-dynamicdialog.mjs +42 -280
  52. package/fesm2022/exhaustive-ui-core-dynamicdialog.mjs.map +1 -1
  53. package/fesm2022/exhaustive-ui-core-editor.mjs +109 -121
  54. package/fesm2022/exhaustive-ui-core-editor.mjs.map +1 -1
  55. package/fesm2022/exhaustive-ui-core-fieldset.mjs +90 -132
  56. package/fesm2022/exhaustive-ui-core-fieldset.mjs.map +1 -1
  57. package/fesm2022/exhaustive-ui-core-fileupload.mjs +486 -541
  58. package/fesm2022/exhaustive-ui-core-fileupload.mjs.map +1 -1
  59. package/fesm2022/exhaustive-ui-core-floatlabel.mjs +13 -16
  60. package/fesm2022/exhaustive-ui-core-floatlabel.mjs.map +1 -1
  61. package/fesm2022/exhaustive-ui-core-focustrap.mjs +44 -40
  62. package/fesm2022/exhaustive-ui-core-focustrap.mjs.map +1 -1
  63. package/fesm2022/exhaustive-ui-core-galleria.mjs +642 -853
  64. package/fesm2022/exhaustive-ui-core-galleria.mjs.map +1 -1
  65. package/fesm2022/exhaustive-ui-core-iconfield.mjs +15 -27
  66. package/fesm2022/exhaustive-ui-core-iconfield.mjs.map +1 -1
  67. package/fesm2022/exhaustive-ui-core-icons-baseicon.mjs +8 -13
  68. package/fesm2022/exhaustive-ui-core-icons-baseicon.mjs.map +1 -1
  69. package/fesm2022/exhaustive-ui-core-image.mjs +209 -251
  70. package/fesm2022/exhaustive-ui-core-image.mjs.map +1 -1
  71. package/fesm2022/exhaustive-ui-core-imagecompare.mjs +39 -48
  72. package/fesm2022/exhaustive-ui-core-imagecompare.mjs.map +1 -1
  73. package/fesm2022/exhaustive-ui-core-inplace.mjs +64 -98
  74. package/fesm2022/exhaustive-ui-core-inplace.mjs.map +1 -1
  75. package/fesm2022/exhaustive-ui-core-inputgroup.mjs +10 -20
  76. package/fesm2022/exhaustive-ui-core-inputgroup.mjs.map +1 -1
  77. package/fesm2022/exhaustive-ui-core-inputgroupaddon.mjs +15 -24
  78. package/fesm2022/exhaustive-ui-core-inputgroupaddon.mjs.map +1 -1
  79. package/fesm2022/exhaustive-ui-core-inputicon.mjs +11 -22
  80. package/fesm2022/exhaustive-ui-core-inputicon.mjs.map +1 -1
  81. package/fesm2022/exhaustive-ui-core-inputmask.mjs +423 -392
  82. package/fesm2022/exhaustive-ui-core-inputmask.mjs.map +1 -1
  83. package/fesm2022/exhaustive-ui-core-inputnumber.mjs +397 -469
  84. package/fesm2022/exhaustive-ui-core-inputnumber.mjs.map +1 -1
  85. package/fesm2022/exhaustive-ui-core-inputotp.mjs +75 -95
  86. package/fesm2022/exhaustive-ui-core-inputotp.mjs.map +1 -1
  87. package/fesm2022/exhaustive-ui-core-inputtext.mjs +27 -36
  88. package/fesm2022/exhaustive-ui-core-inputtext.mjs.map +1 -1
  89. package/fesm2022/exhaustive-ui-core-keyfilter.mjs +29 -46
  90. package/fesm2022/exhaustive-ui-core-keyfilter.mjs.map +1 -1
  91. package/fesm2022/exhaustive-ui-core-knob.mjs +140 -187
  92. package/fesm2022/exhaustive-ui-core-knob.mjs.map +1 -1
  93. package/fesm2022/exhaustive-ui-core-listbox.mjs +365 -546
  94. package/fesm2022/exhaustive-ui-core-listbox.mjs.map +1 -1
  95. package/fesm2022/exhaustive-ui-core-megamenu.mjs +320 -371
  96. package/fesm2022/exhaustive-ui-core-megamenu.mjs.map +1 -1
  97. package/fesm2022/exhaustive-ui-core-menu.mjs +298 -348
  98. package/fesm2022/exhaustive-ui-core-menu.mjs.map +1 -1
  99. package/fesm2022/exhaustive-ui-core-menubar.mjs +277 -372
  100. package/fesm2022/exhaustive-ui-core-menubar.mjs.map +1 -1
  101. package/fesm2022/exhaustive-ui-core-metergroup.mjs +138 -166
  102. package/fesm2022/exhaustive-ui-core-metergroup.mjs.map +1 -1
  103. package/fesm2022/exhaustive-ui-core-multiselect.mjs +647 -835
  104. package/fesm2022/exhaustive-ui-core-multiselect.mjs.map +1 -1
  105. package/fesm2022/exhaustive-ui-core-orderlist.mjs +337 -409
  106. package/fesm2022/exhaustive-ui-core-orderlist.mjs.map +1 -1
  107. package/fesm2022/exhaustive-ui-core-organizationchart.mjs +114 -175
  108. package/fesm2022/exhaustive-ui-core-organizationchart.mjs.map +1 -1
  109. package/fesm2022/exhaustive-ui-core-overlaybadge.mjs +22 -47
  110. package/fesm2022/exhaustive-ui-core-overlaybadge.mjs.map +1 -1
  111. package/fesm2022/exhaustive-ui-core-paginator.mjs +232 -320
  112. package/fesm2022/exhaustive-ui-core-paginator.mjs.map +1 -1
  113. package/fesm2022/exhaustive-ui-core-panel.mjs +114 -174
  114. package/fesm2022/exhaustive-ui-core-panel.mjs.map +1 -1
  115. package/fesm2022/exhaustive-ui-core-panelmenu.mjs +171 -282
  116. package/fesm2022/exhaustive-ui-core-panelmenu.mjs.map +1 -1
  117. package/fesm2022/exhaustive-ui-core-password.mjs +317 -377
  118. package/fesm2022/exhaustive-ui-core-password.mjs.map +1 -1
  119. package/fesm2022/exhaustive-ui-core-picklist.mjs +557 -655
  120. package/fesm2022/exhaustive-ui-core-picklist.mjs.map +1 -1
  121. package/fesm2022/exhaustive-ui-core-popover.mjs +154 -181
  122. package/fesm2022/exhaustive-ui-core-popover.mjs.map +1 -1
  123. package/fesm2022/exhaustive-ui-core-rating.mjs +87 -119
  124. package/fesm2022/exhaustive-ui-core-rating.mjs.map +1 -1
  125. package/fesm2022/exhaustive-ui-core-scroller.mjs +465 -596
  126. package/fesm2022/exhaustive-ui-core-scroller.mjs.map +1 -1
  127. package/fesm2022/exhaustive-ui-core-scrollpanel.mjs +147 -155
  128. package/fesm2022/exhaustive-ui-core-scrollpanel.mjs.map +1 -1
  129. package/fesm2022/exhaustive-ui-core-scrolltop.mjs +81 -115
  130. package/fesm2022/exhaustive-ui-core-scrolltop.mjs.map +1 -1
  131. package/fesm2022/exhaustive-ui-core-select.mjs +581 -784
  132. package/fesm2022/exhaustive-ui-core-select.mjs.map +1 -1
  133. package/fesm2022/exhaustive-ui-core-selectbutton.mjs +84 -120
  134. package/fesm2022/exhaustive-ui-core-selectbutton.mjs.map +1 -1
  135. package/fesm2022/exhaustive-ui-core-slider.mjs +322 -352
  136. package/fesm2022/exhaustive-ui-core-slider.mjs.map +1 -1
  137. package/fesm2022/exhaustive-ui-core-speeddial.mjs +209 -268
  138. package/fesm2022/exhaustive-ui-core-speeddial.mjs.map +1 -1
  139. package/fesm2022/exhaustive-ui-core-splitbutton.mjs +153 -249
  140. package/fesm2022/exhaustive-ui-core-splitbutton.mjs.map +1 -1
  141. package/fesm2022/exhaustive-ui-core-splitter.mjs +221 -237
  142. package/fesm2022/exhaustive-ui-core-splitter.mjs.map +1 -1
  143. package/fesm2022/exhaustive-ui-core-steps.mjs +56 -72
  144. package/fesm2022/exhaustive-ui-core-steps.mjs.map +1 -1
  145. package/fesm2022/exhaustive-ui-core-styleclass.mjs +145 -146
  146. package/fesm2022/exhaustive-ui-core-styleclass.mjs.map +1 -1
  147. package/fesm2022/exhaustive-ui-core-table.mjs +2213 -2543
  148. package/fesm2022/exhaustive-ui-core-table.mjs.map +1 -1
  149. package/fesm2022/exhaustive-ui-core-terminal.mjs +50 -67
  150. package/fesm2022/exhaustive-ui-core-terminal.mjs.map +1 -1
  151. package/fesm2022/exhaustive-ui-core-textarea.mjs +23 -36
  152. package/fesm2022/exhaustive-ui-core-textarea.mjs.map +1 -1
  153. package/fesm2022/exhaustive-ui-core-tieredmenu.mjs +318 -394
  154. package/fesm2022/exhaustive-ui-core-tieredmenu.mjs.map +1 -1
  155. package/fesm2022/exhaustive-ui-core-timeline.mjs +56 -74
  156. package/fesm2022/exhaustive-ui-core-timeline.mjs.map +1 -1
  157. package/fesm2022/exhaustive-ui-core-togglebutton.mjs +86 -129
  158. package/fesm2022/exhaustive-ui-core-togglebutton.mjs.map +1 -1
  159. package/fesm2022/exhaustive-ui-core-toggleswitch.mjs +57 -94
  160. package/fesm2022/exhaustive-ui-core-toggleswitch.mjs.map +1 -1
  161. package/fesm2022/exhaustive-ui-core-toolbar.mjs +36 -55
  162. package/fesm2022/exhaustive-ui-core-toolbar.mjs.map +1 -1
  163. package/fesm2022/exhaustive-ui-core-tooltip.mjs +264 -343
  164. package/fesm2022/exhaustive-ui-core-tooltip.mjs.map +1 -1
  165. package/fesm2022/exhaustive-ui-core-tree.mjs +508 -639
  166. package/fesm2022/exhaustive-ui-core-tree.mjs.map +1 -1
  167. package/fesm2022/exhaustive-ui-core-treeselect.mjs +327 -421
  168. package/fesm2022/exhaustive-ui-core-treeselect.mjs.map +1 -1
  169. package/fesm2022/exhaustive-ui-core-treetable.mjs +1267 -1473
  170. package/fesm2022/exhaustive-ui-core-treetable.mjs.map +1 -1
  171. package/package.json +5 -5
  172. package/schematics/migrations/remove-dead-inputs/migration.js +213 -7
  173. package/schematics/migrations/renamed-inputs/migration.js +97 -0
  174. package/schematics/migrations/styleclass-to-class/migration.js +92 -1
  175. package/schematics/migrations.json +7 -2
  176. package/schematics/utils/removed-inputs.js +0 -0
  177. package/schematics/utils/renamed-inputs.js +175 -0
  178. package/schematics/utils/styleclass.js +24 -8
  179. package/schematics/utils/versions.json +8 -8
  180. package/types/exhaustive-ui-core-accordion.d.ts +8 -24
  181. package/types/exhaustive-ui-core-animateonscroll.d.ts +19 -21
  182. package/types/exhaustive-ui-core-api.d.ts +2 -3
  183. package/types/exhaustive-ui-core-autocomplete.d.ts +103 -176
  184. package/types/exhaustive-ui-core-autofocus.d.ts +4 -7
  185. package/types/exhaustive-ui-core-avatar.d.ts +18 -25
  186. package/types/exhaustive-ui-core-badge.d.ts +13 -27
  187. package/types/exhaustive-ui-core-blockui.d.ts +18 -30
  188. package/types/exhaustive-ui-core-breadcrumb.d.ts +21 -22
  189. package/types/exhaustive-ui-core-button.d.ts +57 -89
  190. package/types/exhaustive-ui-core-carousel.d.ts +56 -82
  191. package/types/exhaustive-ui-core-cascadeselect.d.ts +77 -111
  192. package/types/exhaustive-ui-core-chart.d.ts +21 -29
  193. package/types/exhaustive-ui-core-checkbox.d.ts +25 -39
  194. package/types/exhaustive-ui-core-chip.d.ts +31 -38
  195. package/types/exhaustive-ui-core-colorpicker.d.ts +23 -57
  196. package/types/exhaustive-ui-core-confirmdialog.d.ts +39 -109
  197. package/types/exhaustive-ui-core-confirmpopup.d.ts +24 -43
  198. package/types/exhaustive-ui-core-contextmenu.d.ts +54 -71
  199. package/types/exhaustive-ui-core-dataview.d.ts +42 -65
  200. package/types/exhaustive-ui-core-datepicker.d.ts +109 -191
  201. package/types/exhaustive-ui-core-dialog.d.ts +73 -123
  202. package/types/exhaustive-ui-core-dock.d.ts +16 -25
  203. package/types/exhaustive-ui-core-dragdrop.d.ts +32 -36
  204. package/types/exhaustive-ui-core-drawer.d.ts +32 -64
  205. package/types/exhaustive-ui-core-dynamicdialog.d.ts +9 -54
  206. package/types/exhaustive-ui-core-editor.d.ts +15 -25
  207. package/types/exhaustive-ui-core-fieldset.d.ts +15 -35
  208. package/types/exhaustive-ui-core-fileupload.d.ts +69 -95
  209. package/types/exhaustive-ui-core-floatlabel.d.ts +4 -6
  210. package/types/exhaustive-ui-core-focustrap.d.ts +5 -10
  211. package/types/exhaustive-ui-core-galleria.d.ts +124 -194
  212. package/types/exhaustive-ui-core-iconfield.d.ts +5 -13
  213. package/types/exhaustive-ui-core-icons-baseicon.d.ts +4 -5
  214. package/types/exhaustive-ui-core-image.d.ts +35 -68
  215. package/types/exhaustive-ui-core-imagecompare.d.ts +19 -20
  216. package/types/exhaustive-ui-core-inplace.d.ts +30 -42
  217. package/types/exhaustive-ui-core-inputgroup.d.ts +2 -9
  218. package/types/exhaustive-ui-core-inputgroupaddon.d.ts +6 -10
  219. package/types/exhaustive-ui-core-inputicon.d.ts +4 -11
  220. package/types/exhaustive-ui-core-inputmask.d.ts +53 -66
  221. package/types/exhaustive-ui-core-inputnumber.d.ts +62 -84
  222. package/types/exhaustive-ui-core-inputotp.d.ts +16 -20
  223. package/types/exhaustive-ui-core-inputtext.d.ts +5 -8
  224. package/types/exhaustive-ui-core-keyfilter.d.ts +11 -15
  225. package/types/exhaustive-ui-core-knob.d.ts +45 -60
  226. package/types/exhaustive-ui-core-listbox.d.ts +90 -126
  227. package/types/exhaustive-ui-core-megamenu.d.ts +45 -66
  228. package/types/exhaustive-ui-core-menu.d.ts +33 -53
  229. package/types/exhaustive-ui-core-menubar.d.ts +38 -85
  230. package/types/exhaustive-ui-core-metergroup.d.ts +39 -48
  231. package/types/exhaustive-ui-core-multiselect.d.ts +166 -219
  232. package/types/exhaustive-ui-core-orderlist.d.ts +58 -81
  233. package/types/exhaustive-ui-core-organizationchart.d.ts +32 -67
  234. package/types/exhaustive-ui-core-overlaybadge.d.ts +10 -20
  235. package/types/exhaustive-ui-core-paginator.d.ts +41 -69
  236. package/types/exhaustive-ui-core-panel.d.ts +18 -45
  237. package/types/exhaustive-ui-core-panelmenu.d.ts +31 -76
  238. package/types/exhaustive-ui-core-password.d.ts +56 -93
  239. package/types/exhaustive-ui-core-picklist.d.ts +107 -121
  240. package/types/exhaustive-ui-core-popover.d.ts +23 -47
  241. package/types/exhaustive-ui-core-rating.d.ts +18 -26
  242. package/types/exhaustive-ui-core-scroller.d.ts +90 -120
  243. package/types/exhaustive-ui-core-scrollpanel.d.ts +35 -46
  244. package/types/exhaustive-ui-core-scrolltop.d.ts +28 -45
  245. package/types/exhaustive-ui-core-select.d.ts +137 -188
  246. package/types/exhaustive-ui-core-selectbutton.d.ts +35 -44
  247. package/types/exhaustive-ui-core-slider.d.ts +52 -67
  248. package/types/exhaustive-ui-core-speeddial.d.ts +40 -56
  249. package/types/exhaustive-ui-core-splitbutton.d.ts +31 -71
  250. package/types/exhaustive-ui-core-splitter.d.ts +47 -59
  251. package/types/exhaustive-ui-core-steps.d.ts +24 -31
  252. package/types/exhaustive-ui-core-styleclass.d.ts +27 -33
  253. package/types/exhaustive-ui-core-table.d.ts +349 -453
  254. package/types/exhaustive-ui-core-terminal.d.ts +10 -22
  255. package/types/exhaustive-ui-core-textarea.d.ts +7 -10
  256. package/types/exhaustive-ui-core-tieredmenu.d.ts +49 -84
  257. package/types/exhaustive-ui-core-timeline.d.ts +20 -28
  258. package/types/exhaustive-ui-core-togglebutton.d.ts +32 -48
  259. package/types/exhaustive-ui-core-toggleswitch.d.ts +26 -37
  260. package/types/exhaustive-ui-core-toolbar.d.ts +17 -25
  261. package/types/exhaustive-ui-core-tooltip.d.ts +53 -88
  262. package/types/exhaustive-ui-core-tree.d.ts +82 -119
  263. package/types/exhaustive-ui-core-treeselect.d.ts +63 -92
  264. package/types/exhaustive-ui-core-treetable.d.ts +203 -280
  265. package/types/exhaustive-ui-core-types-chip.d.ts +1 -1
@@ -1,6 +1,6 @@
1
1
  export * from '@exhaustive-ui/core/types/togglebutton';
2
2
  import * as i0 from '@angular/core';
3
- import { Injectable, InjectionToken, forwardRef, inject, input, booleanAttribute, output, contentChild, contentChildren, numberAttribute, Input, HostListener, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
3
+ import { Injectable, forwardRef, inject, afterEveryRender, afterNextRender, input, numberAttribute, booleanAttribute, output, contentChild, contentChildren, signal, computed, HostListener, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
4
4
  import { style as style$1 } from '@exhaustive-ui/styles/togglebutton';
5
5
  import { BaseStyle } from '@exhaustive-ui/core/base';
6
6
  import * as i3 from '@angular/common';
@@ -30,11 +30,11 @@ const classes = {
30
30
  root: ({ instance }) => [
31
31
  'p-togglebutton p-component',
32
32
  {
33
- 'p-togglebutton-checked': instance.checked,
33
+ 'p-togglebutton-checked': instance.checked(),
34
34
  'p-invalid': instance.invalid(),
35
35
  'p-disabled': instance.$disabled(),
36
- 'p-togglebutton-sm p-inputfield-sm': instance.size === 'small',
37
- 'p-togglebutton-lg p-inputfield-lg': instance.size === 'large',
36
+ 'p-togglebutton-sm p-inputfield-sm': instance.size() === 'small',
37
+ 'p-togglebutton-lg p-inputfield-lg': instance.size() === 'large',
38
38
  'p-togglebutton-fluid': instance.fluid()
39
39
  }
40
40
  ],
@@ -87,7 +87,6 @@ var ToggleButtonClasses;
87
87
  ToggleButtonClasses["label"] = "p-togglebutton-label";
88
88
  })(ToggleButtonClasses || (ToggleButtonClasses = {}));
89
89
 
90
- const TOGGLEBUTTON_INSTANCE = new InjectionToken('TOGGLEBUTTON_INSTANCE');
91
90
  const TOGGLEBUTTON_VALUE_ACCESSOR = {
92
91
  provide: NG_VALUE_ACCESSOR,
93
92
  useExisting: forwardRef(() => ToggleButton),
@@ -99,10 +98,17 @@ const TOGGLEBUTTON_VALUE_ACCESSOR = {
99
98
  */
100
99
  class ToggleButton extends BaseEditableHolder {
101
100
  componentName = 'ToggleButton';
102
- $pcToggleButton = inject(TOGGLEBUTTON_INSTANCE, { optional: true, skipSelf: true }) ?? undefined;
103
101
  bindDirectiveInstance = inject(Bind, { self: true });
104
- onAfterViewChecked() {
105
- this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root']));
102
+ constructor() {
103
+ super();
104
+ afterEveryRender(() => this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root'])));
105
+ // The host element is the focusable button itself, so `autofocus` is applied to it directly
106
+ // (the pAutoFocus directive cannot be used here: its input has no boolean attribute transform).
107
+ afterNextRender(() => {
108
+ if (this.autofocus() && !this.$disabled()) {
109
+ this.el.nativeElement.focus();
110
+ }
111
+ });
106
112
  }
107
113
  onKeyDown(event) {
108
114
  switch (event.code) {
@@ -117,84 +123,81 @@ class ToggleButton extends BaseEditableHolder {
117
123
  }
118
124
  }
119
125
  toggle(event) {
120
- if (!this.$disabled() && !(this.allowEmpty === false && this.checked)) {
121
- this.checked = !this.checked;
122
- this.writeModelValue(this.checked);
123
- this.onModelChange(this.checked);
126
+ if (!this.$disabled() && !(this.allowEmpty() === false && this.checked())) {
127
+ this.checked.update((checked) => !checked);
128
+ this.writeModelValue(this.checked());
129
+ this.onModelChange(this.checked());
124
130
  this.onModelTouched();
125
131
  this.onChange.emit({
126
132
  originalEvent: event,
127
- checked: this.checked
133
+ checked: this.checked()
128
134
  });
129
- this.cd.markForCheck();
130
135
  }
131
136
  }
132
137
  /**
133
138
  * Label for the on state.
134
139
  * @group Props
135
140
  */
136
- onLabel = 'Yes';
141
+ onLabel = input('Yes', /* @ts-ignore */
142
+ ...(ngDevMode ? [{ debugName: "onLabel" }] : /* istanbul ignore next */ []));
137
143
  /**
138
144
  * Label for the off state.
139
145
  * @group Props
140
146
  */
141
- offLabel = 'No';
147
+ offLabel = input('No', /* @ts-ignore */
148
+ ...(ngDevMode ? [{ debugName: "offLabel" }] : /* istanbul ignore next */ []));
142
149
  /**
143
150
  * Icon for the on state.
144
151
  * @group Props
145
152
  */
146
- onIcon;
153
+ onIcon = input(/* @ts-ignore */
154
+ ...(ngDevMode ? [undefined, { debugName: "onIcon" }] : /* istanbul ignore next */ []));
147
155
  /**
148
156
  * Icon for the off state.
149
157
  * @group Props
150
158
  */
151
- offIcon;
159
+ offIcon = input(/* @ts-ignore */
160
+ ...(ngDevMode ? [undefined, { debugName: "offIcon" }] : /* istanbul ignore next */ []));
152
161
  /**
153
162
  * Defines a string that labels the input for accessibility.
154
163
  * @group Props
155
164
  */
156
- ariaLabel;
165
+ ariaLabel = input(/* @ts-ignore */
166
+ ...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
157
167
  /**
158
168
  * Establishes relationships between the component and label(s) where its value should be one or more element IDs.
159
169
  * @group Props
160
170
  */
161
- ariaLabelledBy;
162
- /**
163
- * Style class of the element.
164
- * @deprecated since v20.0.0, use `class` instead.
165
- * @group Props
166
- */
167
- styleClass;
168
- /**
169
- * Identifier of the focus input to match a label defined for the component.
170
- * @group Props
171
- */
172
- inputId;
171
+ ariaLabelledBy = input(/* @ts-ignore */
172
+ ...(ngDevMode ? [undefined, { debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []));
173
173
  /**
174
174
  * Index of the element in tabbing order.
175
175
  * @group Props
176
176
  */
177
- tabindex = 0;
177
+ tabindex = input(0, { ...(ngDevMode ? { debugName: "tabindex" } : /* istanbul ignore next */ {}), transform: numberAttribute });
178
178
  /**
179
179
  * Position of the icon.
180
180
  * @group Props
181
181
  */
182
- iconPos = 'left';
182
+ iconPos = input('left', /* @ts-ignore */
183
+ ...(ngDevMode ? [{ debugName: "iconPos" }] : /* istanbul ignore next */ []));
183
184
  /**
184
185
  * When present, it specifies that the component should automatically get focus on load.
185
186
  * @group Props
186
187
  */
187
- autofocus;
188
+ autofocus = input(undefined, { ...(ngDevMode ? { debugName: "autofocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
188
189
  /**
189
190
  * Defines the size of the component.
190
191
  * @group Props
191
192
  */
192
- size;
193
+ size = input(/* @ts-ignore */
194
+ ...(ngDevMode ? [undefined, { debugName: "size" }] : /* istanbul ignore next */ []));
193
195
  /**
194
196
  * Whether selection can not be cleared.
195
197
  * @group Props
196
198
  */
197
- allowEmpty;
199
+ allowEmpty = input(/* @ts-ignore */
200
+ ...(ngDevMode ? [undefined, { debugName: "allowEmpty" }] : /* istanbul ignore next */ []));
198
201
  /**
199
202
  * Spans 100% width of the container when enabled.
200
203
  * @defaultValue undefined
@@ -223,42 +226,26 @@ class ToggleButton extends BaseEditableHolder {
223
226
  contentTemplate = contentChild('content', { ...(ngDevMode ? { debugName: "contentTemplate" } : /* istanbul ignore next */ {}), descendants: false });
224
227
  templates = contentChildren(PrimeTemplate, /* @ts-ignore */
225
228
  ...(ngDevMode ? [{ debugName: "templates" }] : /* istanbul ignore next */ []));
226
- checked = false;
227
- onInit() {
228
- if (this.checked === null || this.checked === undefined) {
229
- this.checked = false;
230
- }
231
- }
229
+ checked = signal(false, /* @ts-ignore */
230
+ ...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
232
231
  _componentStyle = inject(ToggleButtonStyle);
233
232
  onBlur() {
234
233
  this.onModelTouched();
235
234
  }
236
- get hasOnLabel() {
237
- return (this.onLabel && this.onLabel.length > 0);
238
- }
239
- get hasOffLabel() {
240
- return (this.offLabel && this.offLabel.length > 0);
241
- }
242
- get active() {
243
- return this.checked === true;
244
- }
245
- _iconTemplate;
246
- _contentTemplate;
247
- onAfterContentInit() {
248
- this.templates().forEach((item) => {
249
- switch (item.getType()) {
250
- case 'icon':
251
- this._iconTemplate = item.template;
252
- break;
253
- case 'content':
254
- this._contentTemplate = item.template;
255
- break;
256
- default:
257
- this._contentTemplate = item.template;
258
- break;
259
- }
260
- });
261
- }
235
+ hasOnLabel = computed(() => (this.onLabel() && this.onLabel().length > 0), /* @ts-ignore */
236
+ ...(ngDevMode ? [{ debugName: "hasOnLabel" }] : /* istanbul ignore next */ []));
237
+ hasOffLabel = computed(() => (this.offLabel() && this.offLabel().length > 0), /* @ts-ignore */
238
+ ...(ngDevMode ? [{ debugName: "hasOffLabel" }] : /* istanbul ignore next */ []));
239
+ active = computed(() => this.checked() === true, /* @ts-ignore */
240
+ ...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
241
+ _iconTemplate = computed(() => this.templates()
242
+ .filter((item) => item.getType() === 'icon')
243
+ .at(-1)?.template, /* @ts-ignore */
244
+ ...(ngDevMode ? [{ debugName: "_iconTemplate" }] : /* istanbul ignore next */ []));
245
+ _contentTemplate = computed(() => this.templates()
246
+ .filter((item) => item.getType() !== 'icon')
247
+ .at(-1)?.template, /* @ts-ignore */
248
+ ...(ngDevMode ? [{ debugName: "_contentTemplate" }] : /* istanbul ignore next */ []));
262
249
  /**
263
250
  * @override
264
251
  *
@@ -266,29 +253,27 @@ class ToggleButton extends BaseEditableHolder {
266
253
  * Writes the value to the control.
267
254
  */
268
255
  writeControlValue(value, setModelValue) {
269
- this.checked = value;
256
+ this.checked.set(value);
270
257
  setModelValue(value);
271
- this.cd.markForCheck();
272
- }
273
- get dataP() {
274
- return this.cn({
275
- checked: this.active,
276
- invalid: this.invalid(),
277
- [this.size]: this.size
278
- });
279
258
  }
280
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: ToggleButton, deps: null, target: i0.ɵɵFactoryTarget.Component });
281
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: ToggleButton, isStandalone: true, selector: "p-toggleButton, p-togglebutton, p-toggle-button", inputs: { onLabel: { classPropertyName: "onLabel", publicName: "onLabel", isSignal: false, isRequired: false, transformFunction: null }, offLabel: { classPropertyName: "offLabel", publicName: "offLabel", isSignal: false, isRequired: false, transformFunction: null }, onIcon: { classPropertyName: "onIcon", publicName: "onIcon", isSignal: false, isRequired: false, transformFunction: null }, offIcon: { classPropertyName: "offIcon", publicName: "offIcon", isSignal: false, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: false, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: false, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: false, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: false, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: false, isRequired: false, transformFunction: numberAttribute }, iconPos: { classPropertyName: "iconPos", publicName: "iconPos", isSignal: false, isRequired: false, transformFunction: null }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, size: { classPropertyName: "size", publicName: "size", isSignal: false, isRequired: false, transformFunction: null }, allowEmpty: { classPropertyName: "allowEmpty", publicName: "allowEmpty", isSignal: false, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onChange: "onChange" }, host: { listeners: { "keydown": "onKeyDown($event)", "click": "toggle($event)" }, properties: { "class": "cn(cx('root'), styleClass)", "attr.aria-labelledby": "ariaLabelledBy", "attr.aria-label": "ariaLabel", "attr.aria-pressed": "checked ? \"true\" : \"false\"", "attr.role": "\"button\"", "attr.tabindex": "$disabled() ? -1 : (tabindex ?? 0)", "attr.data-pc-name": "'togglebutton'", "attr.data-p-checked": "active", "attr.data-p-disabled": "$disabled()", "attr.data-p": "dataP" } }, providers: [TOGGLEBUTTON_VALUE_ACCESSOR, ToggleButtonStyle, { provide: TOGGLEBUTTON_INSTANCE, useExisting: ToggleButton }, { provide: PARENT_INSTANCE, useExisting: ToggleButton }], queries: [{ propertyName: "iconTemplate", first: true, predicate: ["icon"], isSignal: true }, { propertyName: "contentTemplate", first: true, predicate: ["content"], isSignal: true }, { propertyName: "templates", predicate: PrimeTemplate, isSignal: true }], usesInheritance: true, hostDirectives: [{ directive: i1.Ripple }, { directive: i2.Bind }], ngImport: i0, template: `<span [class]="cx('content')" [pBind]="ptm('content')" [attr.data-p]="dataP">
282
- <ng-container *ngTemplateOutlet="contentTemplate() || _contentTemplate; context: { $implicit: checked }"></ng-container>
259
+ dataP = computed(() => this.cn({
260
+ checked: this.active(),
261
+ invalid: this.invalid(),
262
+ [this.size()]: this.size()
263
+ }), /* @ts-ignore */
264
+ ...(ngDevMode ? [{ debugName: "dataP" }] : /* istanbul ignore next */ []));
265
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: ToggleButton, deps: [], target: i0.ɵɵFactoryTarget.Component });
266
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: ToggleButton, isStandalone: true, selector: "p-toggleButton, p-togglebutton, p-toggle-button", inputs: { onLabel: { classPropertyName: "onLabel", publicName: "onLabel", isSignal: true, isRequired: false, transformFunction: null }, offLabel: { classPropertyName: "offLabel", publicName: "offLabel", isSignal: true, isRequired: false, transformFunction: null }, onIcon: { classPropertyName: "onIcon", publicName: "onIcon", isSignal: true, isRequired: false, transformFunction: null }, offIcon: { classPropertyName: "offIcon", publicName: "offIcon", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null }, iconPos: { classPropertyName: "iconPos", publicName: "iconPos", isSignal: true, isRequired: false, transformFunction: null }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, allowEmpty: { classPropertyName: "allowEmpty", publicName: "allowEmpty", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onChange: "onChange" }, host: { listeners: { "blur": "onBlur()", "keydown": "onKeyDown($event)", "click": "toggle($event)" }, properties: { "class": "cx('root')", "attr.aria-labelledby": "ariaLabelledBy()", "attr.aria-label": "ariaLabel()", "attr.aria-pressed": "checked() ? \"true\" : \"false\"", "attr.role": "\"button\"", "attr.tabindex": "$disabled() ? -1 : (tabindex() ?? 0)", "attr.data-pc-name": "'togglebutton'", "attr.data-p-checked": "active()", "attr.data-p-disabled": "$disabled()", "attr.data-p": "dataP()" } }, providers: [TOGGLEBUTTON_VALUE_ACCESSOR, ToggleButtonStyle, { provide: PARENT_INSTANCE, useExisting: ToggleButton }], queries: [{ propertyName: "iconTemplate", first: true, predicate: ["icon"], isSignal: true }, { propertyName: "contentTemplate", first: true, predicate: ["content"], isSignal: true }, { propertyName: "templates", predicate: PrimeTemplate, isSignal: true }], usesInheritance: true, hostDirectives: [{ directive: i1.Ripple }, { directive: i2.Bind }], ngImport: i0, template: `<span [class]="cx('content')" [pBind]="ptm('content')" [attr.data-p]="dataP()">
267
+ <ng-container *ngTemplateOutlet="contentTemplate() || _contentTemplate(); context: { $implicit: checked() }"></ng-container>
283
268
  @if (!contentTemplate()) {
284
269
  @if (!iconTemplate()) {
285
- @if (onIcon || offIcon) {
286
- <span [class]="cn(cx('icon'), checked ? this.onIcon : this.offIcon, iconPos === 'left' ? cx('iconLeft') : cx('iconRight'))" [pBind]="ptm('icon')"></span>
270
+ @if (onIcon() || offIcon()) {
271
+ <span [class]="cn(cx('icon'), checked() ? onIcon() : offIcon(), iconPos() === 'left' ? cx('iconLeft') : cx('iconRight'))" [pBind]="ptm('icon')"></span>
287
272
  }
288
273
  } @else {
289
- <ng-container *ngTemplateOutlet="iconTemplate() || _iconTemplate; context: { $implicit: checked }"></ng-container>
274
+ <ng-container *ngTemplateOutlet="iconTemplate() || _iconTemplate(); context: { $implicit: checked() }"></ng-container>
290
275
  }
291
- <span [class]="cx('label')" [pBind]="ptm('label')">{{ checked ? (hasOnLabel ? onLabel : ' ') : hasOffLabel ? offLabel : ' ' }}</span>
276
+ <span [class]="cx('label')" [pBind]="ptm('label')">{{ checked() ? (hasOnLabel() ? onLabel() : ' ') : hasOffLabel() ? offLabel() : ' ' }}</span>
292
277
  }
293
278
  </span>`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: SharedModule }, { kind: "ngmodule", type: BindModule }, { kind: "directive", type: i2.Bind, selector: "[pBind]", inputs: ["pBind"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
294
279
  }
@@ -296,72 +281,44 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
296
281
  type: Component,
297
282
  args: [{
298
283
  selector: 'p-toggleButton, p-togglebutton, p-toggle-button',
299
- standalone: true,
300
284
  imports: [CommonModule, SharedModule, BindModule],
301
285
  hostDirectives: [{ directive: Ripple }, Bind],
302
286
  host: {
303
- '[class]': "cn(cx('root'), styleClass)",
304
- '[attr.aria-labelledby]': 'ariaLabelledBy',
305
- '[attr.aria-label]': 'ariaLabel',
306
- '[attr.aria-pressed]': 'checked ? "true" : "false"',
287
+ '[class]': "cx('root')",
288
+ '[attr.aria-labelledby]': 'ariaLabelledBy()',
289
+ '[attr.aria-label]': 'ariaLabel()',
290
+ '[attr.aria-pressed]': 'checked() ? "true" : "false"',
307
291
  '[attr.role]': '"button"',
308
- '[attr.tabindex]': '$disabled() ? -1 : (tabindex ?? 0)',
292
+ '[attr.tabindex]': '$disabled() ? -1 : (tabindex() ?? 0)',
309
293
  '[attr.data-pc-name]': "'togglebutton'",
310
- '[attr.data-p-checked]': 'active',
294
+ '[attr.data-p-checked]': 'active()',
311
295
  '[attr.data-p-disabled]': '$disabled()',
312
- '[attr.data-p]': 'dataP'
296
+ '[attr.data-p]': 'dataP()',
297
+ '(blur)': 'onBlur()'
313
298
  },
314
- template: `<span [class]="cx('content')" [pBind]="ptm('content')" [attr.data-p]="dataP">
315
- <ng-container *ngTemplateOutlet="contentTemplate() || _contentTemplate; context: { $implicit: checked }"></ng-container>
299
+ template: `<span [class]="cx('content')" [pBind]="ptm('content')" [attr.data-p]="dataP()">
300
+ <ng-container *ngTemplateOutlet="contentTemplate() || _contentTemplate(); context: { $implicit: checked() }"></ng-container>
316
301
  @if (!contentTemplate()) {
317
302
  @if (!iconTemplate()) {
318
- @if (onIcon || offIcon) {
319
- <span [class]="cn(cx('icon'), checked ? this.onIcon : this.offIcon, iconPos === 'left' ? cx('iconLeft') : cx('iconRight'))" [pBind]="ptm('icon')"></span>
303
+ @if (onIcon() || offIcon()) {
304
+ <span [class]="cn(cx('icon'), checked() ? onIcon() : offIcon(), iconPos() === 'left' ? cx('iconLeft') : cx('iconRight'))" [pBind]="ptm('icon')"></span>
320
305
  }
321
306
  } @else {
322
- <ng-container *ngTemplateOutlet="iconTemplate() || _iconTemplate; context: { $implicit: checked }"></ng-container>
307
+ <ng-container *ngTemplateOutlet="iconTemplate() || _iconTemplate(); context: { $implicit: checked() }"></ng-container>
323
308
  }
324
- <span [class]="cx('label')" [pBind]="ptm('label')">{{ checked ? (hasOnLabel ? onLabel : ' ') : hasOffLabel ? offLabel : ' ' }}</span>
309
+ <span [class]="cx('label')" [pBind]="ptm('label')">{{ checked() ? (hasOnLabel() ? onLabel() : ' ') : hasOffLabel() ? offLabel() : ' ' }}</span>
325
310
  }
326
311
  </span>`,
327
- providers: [TOGGLEBUTTON_VALUE_ACCESSOR, ToggleButtonStyle, { provide: TOGGLEBUTTON_INSTANCE, useExisting: ToggleButton }, { provide: PARENT_INSTANCE, useExisting: ToggleButton }],
312
+ providers: [TOGGLEBUTTON_VALUE_ACCESSOR, ToggleButtonStyle, { provide: PARENT_INSTANCE, useExisting: ToggleButton }],
328
313
  changeDetection: ChangeDetectionStrategy.OnPush
329
314
  }]
330
- }], propDecorators: { onKeyDown: [{
315
+ }], ctorParameters: () => [], propDecorators: { onKeyDown: [{
331
316
  type: HostListener,
332
317
  args: ['keydown', ['$event']]
333
318
  }], toggle: [{
334
319
  type: HostListener,
335
320
  args: ['click', ['$event']]
336
- }], onLabel: [{
337
- type: Input
338
- }], offLabel: [{
339
- type: Input
340
- }], onIcon: [{
341
- type: Input
342
- }], offIcon: [{
343
- type: Input
344
- }], ariaLabel: [{
345
- type: Input
346
- }], ariaLabelledBy: [{
347
- type: Input
348
- }], styleClass: [{
349
- type: Input
350
- }], inputId: [{
351
- type: Input
352
- }], tabindex: [{
353
- type: Input,
354
- args: [{ transform: numberAttribute }]
355
- }], iconPos: [{
356
- type: Input
357
- }], autofocus: [{
358
- type: Input,
359
- args: [{ transform: booleanAttribute }]
360
- }], size: [{
361
- type: Input
362
- }], allowEmpty: [{
363
- type: Input
364
- }], fluid: [{ type: i0.Input, args: [{ isSignal: true, alias: "fluid", required: false }] }], onChange: [{ type: i0.Output, args: ["onChange"] }], iconTemplate: [{ type: i0.ContentChild, args: ['icon', { ...{ descendants: false }, isSignal: true }] }], contentTemplate: [{ type: i0.ContentChild, args: ['content', { ...{ descendants: false }, isSignal: true }] }], templates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => PrimeTemplate), { isSignal: true }] }] } });
321
+ }], onLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "onLabel", required: false }] }], offLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "offLabel", required: false }] }], onIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "onIcon", required: false }] }], offIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "offIcon", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledBy", required: false }] }], tabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }], iconPos: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconPos", required: false }] }], autofocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autofocus", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], allowEmpty: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowEmpty", required: false }] }], fluid: [{ type: i0.Input, args: [{ isSignal: true, alias: "fluid", required: false }] }], onChange: [{ type: i0.Output, args: ["onChange"] }], iconTemplate: [{ type: i0.ContentChild, args: ['icon', { ...{ descendants: false }, isSignal: true }] }], contentTemplate: [{ type: i0.ContentChild, args: ['content', { ...{ descendants: false }, isSignal: true }] }], templates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => PrimeTemplate), { isSignal: true }] }] } });
365
322
  class ToggleButtonModule {
366
323
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: ToggleButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
367
324
  static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.2.1", ngImport: i0, type: ToggleButtonModule, imports: [ToggleButton, SharedModule], exports: [ToggleButton, SharedModule] });
@@ -1 +1 @@
1
- {"version":3,"file":"exhaustive-ui-core-togglebutton.mjs","sources":["../../src/togglebutton/style/togglebuttonstyle.ts","../../src/togglebutton/togglebutton.ts","../../src/togglebutton/exhaustive-ui-core-togglebutton.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { style as togglebutton_style } from '@exhaustive-ui/styles/togglebutton';\nimport { BaseStyle } from '@exhaustive-ui/core/base';\n\nconst style = /*css*/ `\n ${togglebutton_style}\n\n /* For Exhaustive (iconPos) */\n .p-togglebutton-icon-right {\n order: 1;\n }\n\n .p-togglebutton.ng-invalid.ng-dirty {\n border-color: dt('togglebutton.invalid.border.color');\n }\n`;\n\nconst classes = {\n root: ({ instance }) => [\n 'p-togglebutton p-component',\n {\n 'p-togglebutton-checked': instance.checked,\n 'p-invalid': instance.invalid(),\n 'p-disabled': instance.$disabled(),\n 'p-togglebutton-sm p-inputfield-sm': instance.size === 'small',\n 'p-togglebutton-lg p-inputfield-lg': instance.size === 'large',\n 'p-togglebutton-fluid': instance.fluid()\n }\n ],\n content: 'p-togglebutton-content',\n icon: 'p-togglebutton-icon',\n iconLeft: 'p-togglebutton-icon-left',\n iconRight: 'p-togglebutton-icon-right',\n label: 'p-togglebutton-label'\n};\n\n@Injectable()\nexport class ToggleButtonStyle extends BaseStyle {\n name = 'togglebutton';\n\n style = style;\n\n classes = classes;\n}\n\n/**\n *\n * ToggleButton is used to select a boolean value using a button.\n *\n * [Live Demo](https://exhaustive-ui.e-xiste.com/togglebutton/)\n *\n * @module togglebuttonstyle\n *\n */\nexport enum ToggleButtonClasses {\n /**\n * Class name of the root element\n */\n root = 'p-togglebutton',\n /**\n * Class name of the icon element\n */\n icon = 'p-togglebutton-icon',\n /**\n * Class name of the left icon\n */\n iconLeft = 'p-togglebutton-icon-left',\n /**\n * Class name of the right icon\n */\n iconRight = 'p-togglebutton-icon-right',\n /**\n * Class name of the label element\n */\n label = 'p-togglebutton-label'\n}\n\nexport interface ToggleButtonStyle extends BaseStyle {}\n","import { CommonModule } from '@angular/common';\nimport { booleanAttribute, ChangeDetectionStrategy, Component, forwardRef, HostListener, inject, InjectionToken, input, Input, NgModule, numberAttribute, TemplateRef, contentChild, contentChildren, output } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { PrimeTemplate, SharedModule } from '@exhaustive-ui/core/api';\nimport { PARENT_INSTANCE } from '@exhaustive-ui/core/basecomponent';\nimport { BaseEditableHolder } from '@exhaustive-ui/core/baseeditableholder';\nimport { Bind } from '@exhaustive-ui/core/bind';\nimport { BindModule } from '@exhaustive-ui/core/bind';\nimport { Ripple } from '@exhaustive-ui/core/ripple';\nimport { Nullable } from '@exhaustive-ui/core/ts-helpers';\nimport { ToggleButtonChangeEvent, ToggleButtonContentTemplateContext, ToggleButtonIconTemplateContext, ToggleButtonPassThrough } from '@exhaustive-ui/core/types/togglebutton';\nimport { ToggleButtonStyle } from './style/togglebuttonstyle';\n\nconst TOGGLEBUTTON_INSTANCE = new InjectionToken<ToggleButton>('TOGGLEBUTTON_INSTANCE');\n\nexport const TOGGLEBUTTON_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ToggleButton),\n multi: true\n};\n/**\n * ToggleButton is used to select a boolean value using a button.\n * @group Components\n */\n@Component({\n selector: 'p-toggleButton, p-togglebutton, p-toggle-button',\n standalone: true,\n imports: [CommonModule, SharedModule, BindModule],\n hostDirectives: [{ directive: Ripple }, Bind],\n host: {\n '[class]': \"cn(cx('root'), styleClass)\",\n '[attr.aria-labelledby]': 'ariaLabelledBy',\n '[attr.aria-label]': 'ariaLabel',\n '[attr.aria-pressed]': 'checked ? \"true\" : \"false\"',\n '[attr.role]': '\"button\"',\n '[attr.tabindex]': '$disabled() ? -1 : (tabindex ?? 0)',\n '[attr.data-pc-name]': \"'togglebutton'\",\n '[attr.data-p-checked]': 'active',\n '[attr.data-p-disabled]': '$disabled()',\n '[attr.data-p]': 'dataP'\n },\n template: `<span [class]=\"cx('content')\" [pBind]=\"ptm('content')\" [attr.data-p]=\"dataP\">\n <ng-container *ngTemplateOutlet=\"contentTemplate() || _contentTemplate; context: { $implicit: checked }\"></ng-container>\n @if (!contentTemplate()) {\n @if (!iconTemplate()) {\n @if (onIcon || offIcon) {\n <span [class]=\"cn(cx('icon'), checked ? this.onIcon : this.offIcon, iconPos === 'left' ? cx('iconLeft') : cx('iconRight'))\" [pBind]=\"ptm('icon')\"></span>\n }\n } @else {\n <ng-container *ngTemplateOutlet=\"iconTemplate() || _iconTemplate; context: { $implicit: checked }\"></ng-container>\n }\n <span [class]=\"cx('label')\" [pBind]=\"ptm('label')\">{{ checked ? (hasOnLabel ? onLabel : ' ') : hasOffLabel ? offLabel : ' ' }}</span>\n }\n </span>`,\n providers: [TOGGLEBUTTON_VALUE_ACCESSOR, ToggleButtonStyle, { provide: TOGGLEBUTTON_INSTANCE, useExisting: ToggleButton }, { provide: PARENT_INSTANCE, useExisting: ToggleButton }],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ToggleButton extends BaseEditableHolder<ToggleButtonPassThrough> {\n componentName = 'ToggleButton';\n\n $pcToggleButton: ToggleButton | undefined = inject(TOGGLEBUTTON_INSTANCE, { optional: true, skipSelf: true }) ?? undefined;\n\n bindDirectiveInstance = inject(Bind, { self: true });\n\n onAfterViewChecked(): void {\n this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root']));\n }\n\n @HostListener('keydown', ['$event'])\n onKeyDown(event: KeyboardEvent) {\n switch (event.code) {\n case 'Enter':\n this.toggle(event);\n event.preventDefault();\n break;\n case 'Space':\n this.toggle(event);\n event.preventDefault();\n break;\n }\n }\n\n @HostListener('click', ['$event'])\n toggle(event: Event) {\n if (!this.$disabled() && !(this.allowEmpty === false && this.checked)) {\n this.checked = !this.checked;\n this.writeModelValue(this.checked);\n this.onModelChange(this.checked);\n this.onModelTouched();\n this.onChange.emit({\n originalEvent: event,\n checked: this.checked\n });\n\n this.cd.markForCheck();\n }\n }\n /**\n * Label for the on state.\n * @group Props\n */\n @Input() onLabel: string = 'Yes';\n /**\n * Label for the off state.\n * @group Props\n */\n @Input() offLabel: string = 'No';\n /**\n * Icon for the on state.\n * @group Props\n */\n @Input() onIcon: string | undefined;\n /**\n * Icon for the off state.\n * @group Props\n */\n @Input() offIcon: string | undefined;\n /**\n * Defines a string that labels the input for accessibility.\n * @group Props\n */\n @Input() ariaLabel: string | undefined;\n /**\n * Establishes relationships between the component and label(s) where its value should be one or more element IDs.\n * @group Props\n */\n @Input() ariaLabelledBy: string | undefined;\n /**\n * Style class of the element.\n * @deprecated since v20.0.0, use `class` instead.\n * @group Props\n */\n @Input() styleClass: string | undefined;\n /**\n * Identifier of the focus input to match a label defined for the component.\n * @group Props\n */\n @Input() inputId: string | undefined;\n /**\n * Index of the element in tabbing order.\n * @group Props\n */\n @Input({ transform: numberAttribute }) tabindex: number | undefined = 0;\n /**\n * Position of the icon.\n * @group Props\n */\n @Input() iconPos: 'left' | 'right' = 'left';\n /**\n * When present, it specifies that the component should automatically get focus on load.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) autofocus: boolean | undefined;\n /**\n * Defines the size of the component.\n * @group Props\n */\n @Input() size: 'large' | 'small';\n /**\n * Whether selection can not be cleared.\n * @group Props\n */\n @Input() allowEmpty: boolean | undefined;\n /**\n * Spans 100% width of the container when enabled.\n * @defaultValue undefined\n * @group Props\n */\n fluid = input(undefined, { transform: booleanAttribute });\n /**\n * Callback to invoke on value change.\n * @param {ToggleButtonChangeEvent} event - Custom change event.\n * @group Emits\n */\n readonly onChange = output<ToggleButtonChangeEvent>();\n /**\n * Custom icon template.\n * @param {ToggleButtonIconTemplateContext} context - icon context.\n * @see {@link ToggleButtonIconTemplateContext}\n * @group Templates\n */\n readonly iconTemplate = contentChild<Nullable<TemplateRef<ToggleButtonIconTemplateContext>>>('icon', { descendants: false });\n /**\n * Custom content template.\n * @param {ToggleButtonContentTemplateContext} context - content context.\n * @see {@link ToggleButtonContentTemplateContext}\n * @group Templates\n */\n readonly contentTemplate = contentChild<Nullable<TemplateRef<ToggleButtonContentTemplateContext>>>('content', { descendants: false });\n\n readonly templates = contentChildren(PrimeTemplate);\n\n checked: boolean = false;\n\n onInit() {\n if (this.checked === null || this.checked === undefined) {\n this.checked = false;\n }\n }\n\n _componentStyle = inject(ToggleButtonStyle);\n\n onBlur() {\n this.onModelTouched();\n }\n\n get hasOnLabel(): boolean {\n return (this.onLabel && this.onLabel.length > 0) as boolean;\n }\n\n get hasOffLabel(): boolean {\n return (this.offLabel && this.offLabel.length > 0) as boolean;\n }\n\n get active() {\n return this.checked === true;\n }\n\n _iconTemplate: TemplateRef<ToggleButtonIconTemplateContext> | undefined;\n\n _contentTemplate: TemplateRef<ToggleButtonContentTemplateContext> | undefined;\n\n onAfterContentInit() {\n this.templates().forEach((item) => {\n switch (item.getType()) {\n case 'icon':\n this._iconTemplate = item.template;\n break;\n case 'content':\n this._contentTemplate = item.template;\n break;\n default:\n this._contentTemplate = item.template;\n break;\n }\n });\n }\n\n /**\n * @override\n *\n * @see {@link BaseEditableHolder.writeControlValue}\n * Writes the value to the control.\n */\n writeControlValue(value: any, setModelValue: (value: any) => void): void {\n this.checked = value;\n setModelValue(value);\n this.cd.markForCheck();\n }\n\n get dataP() {\n return this.cn({\n checked: this.active,\n invalid: this.invalid(),\n [this.size as string]: this.size\n });\n }\n}\n\n@NgModule({\n imports: [ToggleButton, SharedModule],\n exports: [ToggleButton, SharedModule]\n})\nexport class ToggleButtonModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["togglebutton_style"],"mappings":";;;;;;;;;;;;;;;;AAIA,MAAM,KAAK,WAAW;MAChBA,OAAkB;;;;;;;;;;CAUvB;AAED,MAAM,OAAO,GAAG;AACZ,IAAA,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK;QACpB,4BAA4B;AAC5B,QAAA;YACI,wBAAwB,EAAE,QAAQ,CAAC,OAAO;AAC1C,YAAA,WAAW,EAAE,QAAQ,CAAC,OAAO,EAAE;AAC/B,YAAA,YAAY,EAAE,QAAQ,CAAC,SAAS,EAAE;AAClC,YAAA,mCAAmC,EAAE,QAAQ,CAAC,IAAI,KAAK,OAAO;AAC9D,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,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAOxB,SAAS,EAAA,EAAA,GAAE,EAAE,WAAW,EAAE,KAAK,EAAE,2FAE/F,aAAa,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;MAyEzC,kBAAkB,CAAA;uGAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAlB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YA9MlB,YAAY,EA2MG,YAAY,CAAA,EAAA,OAAA,EAAA,CA3M3B,YAAY,EA4MG,YAAY,CAAA,EAAA,CAAA;AAE3B,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,EAAA,OAAA,EAAA,CAHjB,YAAY,EAAE,YAAY,EACZ,YAAY,CAAA,EAAA,CAAA;;2FAE3B,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC;AACrC,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY;AACvC,iBAAA;;;ACtQD;;AAEG;;;;"}
1
+ {"version":3,"file":"exhaustive-ui-core-togglebutton.mjs","sources":["../../src/togglebutton/style/togglebuttonstyle.ts","../../src/togglebutton/togglebutton.ts","../../src/togglebutton/exhaustive-ui-core-togglebutton.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { style as togglebutton_style } from '@exhaustive-ui/styles/togglebutton';\nimport { BaseStyle } from '@exhaustive-ui/core/base';\n\nconst style = /*css*/ `\n ${togglebutton_style}\n\n /* For Exhaustive (iconPos) */\n .p-togglebutton-icon-right {\n order: 1;\n }\n\n .p-togglebutton.ng-invalid.ng-dirty {\n border-color: dt('togglebutton.invalid.border.color');\n }\n`;\n\nconst classes = {\n root: ({ instance }) => [\n 'p-togglebutton p-component',\n {\n 'p-togglebutton-checked': instance.checked(),\n 'p-invalid': instance.invalid(),\n 'p-disabled': instance.$disabled(),\n 'p-togglebutton-sm p-inputfield-sm': instance.size() === 'small',\n 'p-togglebutton-lg p-inputfield-lg': instance.size() === 'large',\n 'p-togglebutton-fluid': instance.fluid()\n }\n ],\n content: 'p-togglebutton-content',\n icon: 'p-togglebutton-icon',\n iconLeft: 'p-togglebutton-icon-left',\n iconRight: 'p-togglebutton-icon-right',\n label: 'p-togglebutton-label'\n};\n\n@Injectable()\nexport class ToggleButtonStyle extends BaseStyle {\n name = 'togglebutton';\n\n style = style;\n\n classes = classes;\n}\n\n/**\n *\n * ToggleButton is used to select a boolean value using a button.\n *\n * [Live Demo](https://exhaustive-ui.e-xiste.com/togglebutton/)\n *\n * @module togglebuttonstyle\n *\n */\nexport enum ToggleButtonClasses {\n /**\n * Class name of the root element\n */\n root = 'p-togglebutton',\n /**\n * Class name of the icon element\n */\n icon = 'p-togglebutton-icon',\n /**\n * Class name of the left icon\n */\n iconLeft = 'p-togglebutton-icon-left',\n /**\n * Class name of the right icon\n */\n iconRight = 'p-togglebutton-icon-right',\n /**\n * Class name of the label element\n */\n label = 'p-togglebutton-label'\n}\n\nexport interface ToggleButtonStyle extends BaseStyle {}\n","import { CommonModule } from '@angular/common';\nimport {\n afterEveryRender,\n afterNextRender,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n forwardRef,\n HostListener,\n inject,\n input,\n NgModule,\n numberAttribute,\n signal,\n TemplateRef,\n contentChild,\n contentChildren,\n output\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { PrimeTemplate, SharedModule } from '@exhaustive-ui/core/api';\nimport { PARENT_INSTANCE } from '@exhaustive-ui/core/basecomponent';\nimport { BaseEditableHolder } from '@exhaustive-ui/core/baseeditableholder';\nimport { Bind } from '@exhaustive-ui/core/bind';\nimport { BindModule } from '@exhaustive-ui/core/bind';\nimport { Ripple } from '@exhaustive-ui/core/ripple';\nimport { Nullable } from '@exhaustive-ui/core/ts-helpers';\nimport { ToggleButtonChangeEvent, ToggleButtonContentTemplateContext, ToggleButtonIconTemplateContext, ToggleButtonPassThrough } from '@exhaustive-ui/core/types/togglebutton';\nimport { ToggleButtonStyle } from './style/togglebuttonstyle';\n\nexport const TOGGLEBUTTON_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ToggleButton),\n multi: true\n};\n/**\n * ToggleButton is used to select a boolean value using a button.\n * @group Components\n */\n@Component({\n selector: 'p-toggleButton, p-togglebutton, p-toggle-button',\n imports: [CommonModule, SharedModule, BindModule],\n hostDirectives: [{ directive: Ripple }, Bind],\n host: {\n '[class]': \"cx('root')\",\n '[attr.aria-labelledby]': 'ariaLabelledBy()',\n '[attr.aria-label]': 'ariaLabel()',\n '[attr.aria-pressed]': 'checked() ? \"true\" : \"false\"',\n '[attr.role]': '\"button\"',\n '[attr.tabindex]': '$disabled() ? -1 : (tabindex() ?? 0)',\n '[attr.data-pc-name]': \"'togglebutton'\",\n '[attr.data-p-checked]': 'active()',\n '[attr.data-p-disabled]': '$disabled()',\n '[attr.data-p]': 'dataP()',\n '(blur)': 'onBlur()'\n },\n template: `<span [class]=\"cx('content')\" [pBind]=\"ptm('content')\" [attr.data-p]=\"dataP()\">\n <ng-container *ngTemplateOutlet=\"contentTemplate() || _contentTemplate(); context: { $implicit: checked() }\"></ng-container>\n @if (!contentTemplate()) {\n @if (!iconTemplate()) {\n @if (onIcon() || offIcon()) {\n <span [class]=\"cn(cx('icon'), checked() ? onIcon() : offIcon(), iconPos() === 'left' ? cx('iconLeft') : cx('iconRight'))\" [pBind]=\"ptm('icon')\"></span>\n }\n } @else {\n <ng-container *ngTemplateOutlet=\"iconTemplate() || _iconTemplate(); context: { $implicit: checked() }\"></ng-container>\n }\n <span [class]=\"cx('label')\" [pBind]=\"ptm('label')\">{{ checked() ? (hasOnLabel() ? onLabel() : ' ') : hasOffLabel() ? offLabel() : ' ' }}</span>\n }\n </span>`,\n providers: [TOGGLEBUTTON_VALUE_ACCESSOR, ToggleButtonStyle, { provide: PARENT_INSTANCE, useExisting: ToggleButton }],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ToggleButton extends BaseEditableHolder<ToggleButtonPassThrough> {\n componentName = 'ToggleButton';\n\n bindDirectiveInstance = inject(Bind, { self: true });\n\n constructor() {\n super();\n afterEveryRender(() => this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root'])));\n // The host element is the focusable button itself, so `autofocus` is applied to it directly\n // (the pAutoFocus directive cannot be used here: its input has no boolean attribute transform).\n afterNextRender(() => {\n if (this.autofocus() && !this.$disabled()) {\n this.el.nativeElement.focus();\n }\n });\n }\n\n @HostListener('keydown', ['$event'])\n onKeyDown(event: KeyboardEvent) {\n switch (event.code) {\n case 'Enter':\n this.toggle(event);\n event.preventDefault();\n break;\n case 'Space':\n this.toggle(event);\n event.preventDefault();\n break;\n }\n }\n\n @HostListener('click', ['$event'])\n toggle(event: Event) {\n if (!this.$disabled() && !(this.allowEmpty() === false && this.checked())) {\n this.checked.update((checked) => !checked);\n this.writeModelValue(this.checked());\n this.onModelChange(this.checked());\n this.onModelTouched();\n this.onChange.emit({\n originalEvent: event,\n checked: this.checked()\n });\n }\n }\n /**\n * Label for the on state.\n * @group Props\n */\n readonly onLabel = input<string>('Yes');\n /**\n * Label for the off state.\n * @group Props\n */\n readonly offLabel = input<string>('No');\n /**\n * Icon for the on state.\n * @group Props\n */\n readonly onIcon = input<string | undefined>();\n /**\n * Icon for the off state.\n * @group Props\n */\n readonly offIcon = input<string | undefined>();\n /**\n * Defines a string that labels the input for accessibility.\n * @group Props\n */\n readonly ariaLabel = input<string | undefined>();\n /**\n * Establishes relationships between the component and label(s) where its value should be one or more element IDs.\n * @group Props\n */\n readonly ariaLabelledBy = input<string | undefined>();\n /**\n * Index of the element in tabbing order.\n * @group Props\n */\n readonly tabindex = input<number | undefined, unknown>(0, { transform: numberAttribute });\n /**\n * Position of the icon.\n * @group Props\n */\n readonly iconPos = input<'left' | 'right'>('left');\n /**\n * When present, it specifies that the component should automatically get focus on load.\n * @group Props\n */\n readonly autofocus = input<boolean | undefined, unknown>(undefined, { transform: booleanAttribute });\n /**\n * Defines the size of the component.\n * @group Props\n */\n readonly size = input<'large' | 'small' | undefined>();\n /**\n * Whether selection can not be cleared.\n * @group Props\n */\n readonly allowEmpty = input<boolean | undefined>();\n /**\n * Spans 100% width of the container when enabled.\n * @defaultValue undefined\n * @group Props\n */\n fluid = input(undefined, { transform: booleanAttribute });\n /**\n * Callback to invoke on value change.\n * @param {ToggleButtonChangeEvent} event - Custom change event.\n * @group Emits\n */\n readonly onChange = output<ToggleButtonChangeEvent>();\n /**\n * Custom icon template.\n * @param {ToggleButtonIconTemplateContext} context - icon context.\n * @see {@link ToggleButtonIconTemplateContext}\n * @group Templates\n */\n readonly iconTemplate = contentChild<Nullable<TemplateRef<ToggleButtonIconTemplateContext>>>('icon', { descendants: false });\n /**\n * Custom content template.\n * @param {ToggleButtonContentTemplateContext} context - content context.\n * @see {@link ToggleButtonContentTemplateContext}\n * @group Templates\n */\n readonly contentTemplate = contentChild<Nullable<TemplateRef<ToggleButtonContentTemplateContext>>>('content', { descendants: false });\n\n readonly templates = contentChildren(PrimeTemplate);\n\n checked = signal<boolean>(false);\n\n _componentStyle = inject(ToggleButtonStyle);\n\n onBlur() {\n this.onModelTouched();\n }\n\n readonly hasOnLabel = computed<boolean>(() => (this.onLabel() && this.onLabel().length > 0) as boolean);\n\n readonly hasOffLabel = computed<boolean>(() => (this.offLabel() && this.offLabel().length > 0) as boolean);\n\n readonly active = computed(() => this.checked() === true);\n\n readonly _iconTemplate = computed<TemplateRef<ToggleButtonIconTemplateContext> | undefined>(\n () =>\n this.templates()\n .filter((item) => item.getType() === 'icon')\n .at(-1)?.template\n );\n\n readonly _contentTemplate = computed<TemplateRef<ToggleButtonContentTemplateContext> | undefined>(\n () =>\n this.templates()\n .filter((item) => item.getType() !== 'icon')\n .at(-1)?.template\n );\n\n /**\n * @override\n *\n * @see {@link BaseEditableHolder.writeControlValue}\n * Writes the value to the control.\n */\n writeControlValue(value: any, setModelValue: (value: any) => void): void {\n this.checked.set(value);\n setModelValue(value);\n }\n\n readonly dataP = computed(() =>\n this.cn({\n checked: this.active(),\n invalid: this.invalid(),\n [this.size() as string]: this.size()\n })\n );\n}\n\n@NgModule({\n imports: [ToggleButton, SharedModule],\n exports: [ToggleButton, SharedModule]\n})\nexport class ToggleButtonModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["togglebutton_style"],"mappings":";;;;;;;;;;;;;;;;AAIA,MAAM,KAAK,WAAW;MAChBA,OAAkB;;;;;;;;;;CAUvB;AAED,MAAM,OAAO,GAAG;AACZ,IAAA,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK;QACpB,4BAA4B;AAC5B,QAAA;AACI,YAAA,wBAAwB,EAAE,QAAQ,CAAC,OAAO,EAAE;AAC5C,YAAA,WAAW,EAAE,QAAQ,CAAC,OAAO,EAAE;AAC/B,YAAA,YAAY,EAAE,QAAQ,CAAC,SAAS,EAAE;AAClC,YAAA,mCAAmC,EAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,OAAO;AAChE,YAAA,mCAAmC,EAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,OAAO;AAChE,YAAA,sBAAsB,EAAE,QAAQ,CAAC,KAAK;AACzC;AACJ,KAAA;AACD,IAAA,OAAO,EAAE,wBAAwB;AACjC,IAAA,IAAI,EAAE,qBAAqB;AAC3B,I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