@exhaustive-ui/core 3.0.0-alpha.0 → 22.0.0-alpha.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 (375) 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 +10 -17
  6. package/fesm2022/exhaustive-ui-core-api.mjs.map +1 -1
  7. package/fesm2022/exhaustive-ui-core-autocomplete.mjs +786 -928
  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 +561 -599
  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 +227 -394
  34. package/fesm2022/exhaustive-ui-core-confirmdialog.mjs.map +1 -1
  35. package/fesm2022/exhaustive-ui-core-confirmpopup.mjs +255 -266
  36. package/fesm2022/exhaustive-ui-core-confirmpopup.mjs.map +1 -1
  37. package/fesm2022/exhaustive-ui-core-contextmenu.mjs +585 -653
  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 +1792 -1787
  42. package/fesm2022/exhaustive-ui-core-datepicker.mjs.map +1 -1
  43. package/fesm2022/exhaustive-ui-core-dialog.mjs +480 -577
  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 +774 -745
  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-angledoubledown.mjs +2 -2
  68. package/fesm2022/exhaustive-ui-core-icons-angledoubledown.mjs.map +1 -1
  69. package/fesm2022/exhaustive-ui-core-icons-angledoubleleft.mjs +2 -2
  70. package/fesm2022/exhaustive-ui-core-icons-angledoubleleft.mjs.map +1 -1
  71. package/fesm2022/exhaustive-ui-core-icons-angledoubleright.mjs +2 -2
  72. package/fesm2022/exhaustive-ui-core-icons-angledoubleright.mjs.map +1 -1
  73. package/fesm2022/exhaustive-ui-core-icons-angledoubleup.mjs +2 -2
  74. package/fesm2022/exhaustive-ui-core-icons-angledoubleup.mjs.map +1 -1
  75. package/fesm2022/exhaustive-ui-core-icons-angledown.mjs +2 -2
  76. package/fesm2022/exhaustive-ui-core-icons-angledown.mjs.map +1 -1
  77. package/fesm2022/exhaustive-ui-core-icons-angleleft.mjs +2 -2
  78. package/fesm2022/exhaustive-ui-core-icons-angleleft.mjs.map +1 -1
  79. package/fesm2022/exhaustive-ui-core-icons-angleright.mjs +2 -2
  80. package/fesm2022/exhaustive-ui-core-icons-angleright.mjs.map +1 -1
  81. package/fesm2022/exhaustive-ui-core-icons-angleup.mjs +2 -2
  82. package/fesm2022/exhaustive-ui-core-icons-angleup.mjs.map +1 -1
  83. package/fesm2022/exhaustive-ui-core-icons-arrowdown.mjs +2 -2
  84. package/fesm2022/exhaustive-ui-core-icons-arrowdown.mjs.map +1 -1
  85. package/fesm2022/exhaustive-ui-core-icons-arrowdownleft.mjs +2 -2
  86. package/fesm2022/exhaustive-ui-core-icons-arrowdownleft.mjs.map +1 -1
  87. package/fesm2022/exhaustive-ui-core-icons-arrowdownright.mjs +2 -2
  88. package/fesm2022/exhaustive-ui-core-icons-arrowdownright.mjs.map +1 -1
  89. package/fesm2022/exhaustive-ui-core-icons-arrowleft.mjs +2 -2
  90. package/fesm2022/exhaustive-ui-core-icons-arrowleft.mjs.map +1 -1
  91. package/fesm2022/exhaustive-ui-core-icons-arrowright.mjs +2 -2
  92. package/fesm2022/exhaustive-ui-core-icons-arrowright.mjs.map +1 -1
  93. package/fesm2022/exhaustive-ui-core-icons-arrowup.mjs +2 -2
  94. package/fesm2022/exhaustive-ui-core-icons-arrowup.mjs.map +1 -1
  95. package/fesm2022/exhaustive-ui-core-icons-ban.mjs +2 -2
  96. package/fesm2022/exhaustive-ui-core-icons-ban.mjs.map +1 -1
  97. package/fesm2022/exhaustive-ui-core-icons-bars.mjs +2 -2
  98. package/fesm2022/exhaustive-ui-core-icons-bars.mjs.map +1 -1
  99. package/fesm2022/exhaustive-ui-core-icons-baseicon.mjs +8 -13
  100. package/fesm2022/exhaustive-ui-core-icons-baseicon.mjs.map +1 -1
  101. package/fesm2022/exhaustive-ui-core-icons-blank.mjs +2 -2
  102. package/fesm2022/exhaustive-ui-core-icons-blank.mjs.map +1 -1
  103. package/fesm2022/exhaustive-ui-core-icons-calendar.mjs +2 -2
  104. package/fesm2022/exhaustive-ui-core-icons-calendar.mjs.map +1 -1
  105. package/fesm2022/exhaustive-ui-core-icons-caretleft.mjs +2 -2
  106. package/fesm2022/exhaustive-ui-core-icons-caretleft.mjs.map +1 -1
  107. package/fesm2022/exhaustive-ui-core-icons-caretright.mjs +2 -2
  108. package/fesm2022/exhaustive-ui-core-icons-caretright.mjs.map +1 -1
  109. package/fesm2022/exhaustive-ui-core-icons-check.mjs +2 -2
  110. package/fesm2022/exhaustive-ui-core-icons-check.mjs.map +1 -1
  111. package/fesm2022/exhaustive-ui-core-icons-chevrondown.mjs +2 -2
  112. package/fesm2022/exhaustive-ui-core-icons-chevrondown.mjs.map +1 -1
  113. package/fesm2022/exhaustive-ui-core-icons-chevronleft.mjs +2 -2
  114. package/fesm2022/exhaustive-ui-core-icons-chevronleft.mjs.map +1 -1
  115. package/fesm2022/exhaustive-ui-core-icons-chevronright.mjs +2 -2
  116. package/fesm2022/exhaustive-ui-core-icons-chevronright.mjs.map +1 -1
  117. package/fesm2022/exhaustive-ui-core-icons-chevronup.mjs +2 -2
  118. package/fesm2022/exhaustive-ui-core-icons-chevronup.mjs.map +1 -1
  119. package/fesm2022/exhaustive-ui-core-icons-exclamationtriangle.mjs +2 -2
  120. package/fesm2022/exhaustive-ui-core-icons-exclamationtriangle.mjs.map +1 -1
  121. package/fesm2022/exhaustive-ui-core-icons-eye.mjs +2 -2
  122. package/fesm2022/exhaustive-ui-core-icons-eye.mjs.map +1 -1
  123. package/fesm2022/exhaustive-ui-core-icons-eyeslash.mjs +2 -2
  124. package/fesm2022/exhaustive-ui-core-icons-eyeslash.mjs.map +1 -1
  125. package/fesm2022/exhaustive-ui-core-icons-filter.mjs +2 -2
  126. package/fesm2022/exhaustive-ui-core-icons-filter.mjs.map +1 -1
  127. package/fesm2022/exhaustive-ui-core-icons-filterfill.mjs +2 -2
  128. package/fesm2022/exhaustive-ui-core-icons-filterfill.mjs.map +1 -1
  129. package/fesm2022/exhaustive-ui-core-icons-filterslash.mjs +2 -2
  130. package/fesm2022/exhaustive-ui-core-icons-filterslash.mjs.map +1 -1
  131. package/fesm2022/exhaustive-ui-core-icons-home.mjs +2 -2
  132. package/fesm2022/exhaustive-ui-core-icons-home.mjs.map +1 -1
  133. package/fesm2022/exhaustive-ui-core-icons-infocircle.mjs +2 -2
  134. package/fesm2022/exhaustive-ui-core-icons-infocircle.mjs.map +1 -1
  135. package/fesm2022/exhaustive-ui-core-icons-minus.mjs +2 -2
  136. package/fesm2022/exhaustive-ui-core-icons-minus.mjs.map +1 -1
  137. package/fesm2022/exhaustive-ui-core-icons-pencil.mjs +2 -2
  138. package/fesm2022/exhaustive-ui-core-icons-pencil.mjs.map +1 -1
  139. package/fesm2022/exhaustive-ui-core-icons-plus.mjs +2 -2
  140. package/fesm2022/exhaustive-ui-core-icons-plus.mjs.map +1 -1
  141. package/fesm2022/exhaustive-ui-core-icons-refresh.mjs +2 -2
  142. package/fesm2022/exhaustive-ui-core-icons-refresh.mjs.map +1 -1
  143. package/fesm2022/exhaustive-ui-core-icons-search.mjs +2 -2
  144. package/fesm2022/exhaustive-ui-core-icons-search.mjs.map +1 -1
  145. package/fesm2022/exhaustive-ui-core-icons-searchminus.mjs +2 -2
  146. package/fesm2022/exhaustive-ui-core-icons-searchminus.mjs.map +1 -1
  147. package/fesm2022/exhaustive-ui-core-icons-searchplus.mjs +2 -2
  148. package/fesm2022/exhaustive-ui-core-icons-searchplus.mjs.map +1 -1
  149. package/fesm2022/exhaustive-ui-core-icons-sortalt.mjs +2 -2
  150. package/fesm2022/exhaustive-ui-core-icons-sortalt.mjs.map +1 -1
  151. package/fesm2022/exhaustive-ui-core-icons-sortamountdown.mjs +2 -2
  152. package/fesm2022/exhaustive-ui-core-icons-sortamountdown.mjs.map +1 -1
  153. package/fesm2022/exhaustive-ui-core-icons-sortamountupalt.mjs +2 -2
  154. package/fesm2022/exhaustive-ui-core-icons-sortamountupalt.mjs.map +1 -1
  155. package/fesm2022/exhaustive-ui-core-icons-spinner.mjs +2 -2
  156. package/fesm2022/exhaustive-ui-core-icons-spinner.mjs.map +1 -1
  157. package/fesm2022/exhaustive-ui-core-icons-star.mjs +2 -2
  158. package/fesm2022/exhaustive-ui-core-icons-star.mjs.map +1 -1
  159. package/fesm2022/exhaustive-ui-core-icons-starfill.mjs +2 -2
  160. package/fesm2022/exhaustive-ui-core-icons-starfill.mjs.map +1 -1
  161. package/fesm2022/exhaustive-ui-core-icons-thlarge.mjs +2 -2
  162. package/fesm2022/exhaustive-ui-core-icons-thlarge.mjs.map +1 -1
  163. package/fesm2022/exhaustive-ui-core-icons-times.mjs +2 -2
  164. package/fesm2022/exhaustive-ui-core-icons-times.mjs.map +1 -1
  165. package/fesm2022/exhaustive-ui-core-icons-timescircle.mjs +2 -2
  166. package/fesm2022/exhaustive-ui-core-icons-timescircle.mjs.map +1 -1
  167. package/fesm2022/exhaustive-ui-core-icons-trash.mjs +2 -2
  168. package/fesm2022/exhaustive-ui-core-icons-trash.mjs.map +1 -1
  169. package/fesm2022/exhaustive-ui-core-icons-undo.mjs +2 -2
  170. package/fesm2022/exhaustive-ui-core-icons-undo.mjs.map +1 -1
  171. package/fesm2022/exhaustive-ui-core-icons-upload.mjs +2 -2
  172. package/fesm2022/exhaustive-ui-core-icons-upload.mjs.map +1 -1
  173. package/fesm2022/exhaustive-ui-core-icons-windowmaximize.mjs +2 -2
  174. package/fesm2022/exhaustive-ui-core-icons-windowmaximize.mjs.map +1 -1
  175. package/fesm2022/exhaustive-ui-core-icons-windowminimize.mjs +2 -2
  176. package/fesm2022/exhaustive-ui-core-icons-windowminimize.mjs.map +1 -1
  177. package/fesm2022/exhaustive-ui-core-image.mjs +209 -251
  178. package/fesm2022/exhaustive-ui-core-image.mjs.map +1 -1
  179. package/fesm2022/exhaustive-ui-core-imagecompare.mjs +39 -48
  180. package/fesm2022/exhaustive-ui-core-imagecompare.mjs.map +1 -1
  181. package/fesm2022/exhaustive-ui-core-inplace.mjs +68 -102
  182. package/fesm2022/exhaustive-ui-core-inplace.mjs.map +1 -1
  183. package/fesm2022/exhaustive-ui-core-inputgroup.mjs +10 -20
  184. package/fesm2022/exhaustive-ui-core-inputgroup.mjs.map +1 -1
  185. package/fesm2022/exhaustive-ui-core-inputgroupaddon.mjs +15 -24
  186. package/fesm2022/exhaustive-ui-core-inputgroupaddon.mjs.map +1 -1
  187. package/fesm2022/exhaustive-ui-core-inputicon.mjs +11 -22
  188. package/fesm2022/exhaustive-ui-core-inputicon.mjs.map +1 -1
  189. package/fesm2022/exhaustive-ui-core-inputmask.mjs +423 -392
  190. package/fesm2022/exhaustive-ui-core-inputmask.mjs.map +1 -1
  191. package/fesm2022/exhaustive-ui-core-inputnumber.mjs +397 -469
  192. package/fesm2022/exhaustive-ui-core-inputnumber.mjs.map +1 -1
  193. package/fesm2022/exhaustive-ui-core-inputotp.mjs +75 -95
  194. package/fesm2022/exhaustive-ui-core-inputotp.mjs.map +1 -1
  195. package/fesm2022/exhaustive-ui-core-inputtext.mjs +27 -36
  196. package/fesm2022/exhaustive-ui-core-inputtext.mjs.map +1 -1
  197. package/fesm2022/exhaustive-ui-core-keyfilter.mjs +29 -46
  198. package/fesm2022/exhaustive-ui-core-keyfilter.mjs.map +1 -1
  199. package/fesm2022/exhaustive-ui-core-knob.mjs +140 -187
  200. package/fesm2022/exhaustive-ui-core-knob.mjs.map +1 -1
  201. package/fesm2022/exhaustive-ui-core-listbox.mjs +591 -728
  202. package/fesm2022/exhaustive-ui-core-listbox.mjs.map +1 -1
  203. package/fesm2022/exhaustive-ui-core-megamenu.mjs +324 -375
  204. package/fesm2022/exhaustive-ui-core-megamenu.mjs.map +1 -1
  205. package/fesm2022/exhaustive-ui-core-menu.mjs +298 -348
  206. package/fesm2022/exhaustive-ui-core-menu.mjs.map +1 -1
  207. package/fesm2022/exhaustive-ui-core-menubar.mjs +277 -372
  208. package/fesm2022/exhaustive-ui-core-menubar.mjs.map +1 -1
  209. package/fesm2022/exhaustive-ui-core-metergroup.mjs +138 -166
  210. package/fesm2022/exhaustive-ui-core-metergroup.mjs.map +1 -1
  211. package/fesm2022/exhaustive-ui-core-motion.mjs +2 -2
  212. package/fesm2022/exhaustive-ui-core-motion.mjs.map +1 -1
  213. package/fesm2022/exhaustive-ui-core-multiselect.mjs +945 -1045
  214. package/fesm2022/exhaustive-ui-core-multiselect.mjs.map +1 -1
  215. package/fesm2022/exhaustive-ui-core-orderlist.mjs +337 -409
  216. package/fesm2022/exhaustive-ui-core-orderlist.mjs.map +1 -1
  217. package/fesm2022/exhaustive-ui-core-organizationchart.mjs +114 -175
  218. package/fesm2022/exhaustive-ui-core-organizationchart.mjs.map +1 -1
  219. package/fesm2022/exhaustive-ui-core-overlaybadge.mjs +22 -47
  220. package/fesm2022/exhaustive-ui-core-overlaybadge.mjs.map +1 -1
  221. package/fesm2022/exhaustive-ui-core-paginator.mjs +232 -320
  222. package/fesm2022/exhaustive-ui-core-paginator.mjs.map +1 -1
  223. package/fesm2022/exhaustive-ui-core-panel.mjs +114 -174
  224. package/fesm2022/exhaustive-ui-core-panel.mjs.map +1 -1
  225. package/fesm2022/exhaustive-ui-core-panelmenu.mjs +171 -282
  226. package/fesm2022/exhaustive-ui-core-panelmenu.mjs.map +1 -1
  227. package/fesm2022/exhaustive-ui-core-password.mjs +317 -377
  228. package/fesm2022/exhaustive-ui-core-password.mjs.map +1 -1
  229. package/fesm2022/exhaustive-ui-core-picklist.mjs +861 -879
  230. package/fesm2022/exhaustive-ui-core-picklist.mjs.map +1 -1
  231. package/fesm2022/exhaustive-ui-core-popover.mjs +154 -181
  232. package/fesm2022/exhaustive-ui-core-popover.mjs.map +1 -1
  233. package/fesm2022/exhaustive-ui-core-rating.mjs +87 -119
  234. package/fesm2022/exhaustive-ui-core-rating.mjs.map +1 -1
  235. package/fesm2022/exhaustive-ui-core-scroller.mjs +465 -596
  236. package/fesm2022/exhaustive-ui-core-scroller.mjs.map +1 -1
  237. package/fesm2022/exhaustive-ui-core-scrollpanel.mjs +147 -155
  238. package/fesm2022/exhaustive-ui-core-scrollpanel.mjs.map +1 -1
  239. package/fesm2022/exhaustive-ui-core-scrolltop.mjs +81 -115
  240. package/fesm2022/exhaustive-ui-core-scrolltop.mjs.map +1 -1
  241. package/fesm2022/exhaustive-ui-core-select.mjs +837 -986
  242. package/fesm2022/exhaustive-ui-core-select.mjs.map +1 -1
  243. package/fesm2022/exhaustive-ui-core-selectbutton.mjs +84 -120
  244. package/fesm2022/exhaustive-ui-core-selectbutton.mjs.map +1 -1
  245. package/fesm2022/exhaustive-ui-core-slider.mjs +322 -352
  246. package/fesm2022/exhaustive-ui-core-slider.mjs.map +1 -1
  247. package/fesm2022/exhaustive-ui-core-speeddial.mjs +209 -268
  248. package/fesm2022/exhaustive-ui-core-speeddial.mjs.map +1 -1
  249. package/fesm2022/exhaustive-ui-core-splitbutton.mjs +153 -249
  250. package/fesm2022/exhaustive-ui-core-splitbutton.mjs.map +1 -1
  251. package/fesm2022/exhaustive-ui-core-splitter.mjs +221 -237
  252. package/fesm2022/exhaustive-ui-core-splitter.mjs.map +1 -1
  253. package/fesm2022/exhaustive-ui-core-steps.mjs +56 -72
  254. package/fesm2022/exhaustive-ui-core-steps.mjs.map +1 -1
  255. package/fesm2022/exhaustive-ui-core-styleclass.mjs +145 -146
  256. package/fesm2022/exhaustive-ui-core-styleclass.mjs.map +1 -1
  257. package/fesm2022/exhaustive-ui-core-table.mjs +2435 -2721
  258. package/fesm2022/exhaustive-ui-core-table.mjs.map +1 -1
  259. package/fesm2022/exhaustive-ui-core-terminal.mjs +50 -67
  260. package/fesm2022/exhaustive-ui-core-terminal.mjs.map +1 -1
  261. package/fesm2022/exhaustive-ui-core-textarea.mjs +23 -36
  262. package/fesm2022/exhaustive-ui-core-textarea.mjs.map +1 -1
  263. package/fesm2022/exhaustive-ui-core-tieredmenu.mjs +604 -690
  264. package/fesm2022/exhaustive-ui-core-tieredmenu.mjs.map +1 -1
  265. package/fesm2022/exhaustive-ui-core-timeline.mjs +56 -74
  266. package/fesm2022/exhaustive-ui-core-timeline.mjs.map +1 -1
  267. package/fesm2022/exhaustive-ui-core-togglebutton.mjs +86 -129
  268. package/fesm2022/exhaustive-ui-core-togglebutton.mjs.map +1 -1
  269. package/fesm2022/exhaustive-ui-core-toggleswitch.mjs +57 -94
  270. package/fesm2022/exhaustive-ui-core-toggleswitch.mjs.map +1 -1
  271. package/fesm2022/exhaustive-ui-core-toolbar.mjs +36 -55
  272. package/fesm2022/exhaustive-ui-core-toolbar.mjs.map +1 -1
  273. package/fesm2022/exhaustive-ui-core-tooltip.mjs +264 -343
  274. package/fesm2022/exhaustive-ui-core-tooltip.mjs.map +1 -1
  275. package/fesm2022/exhaustive-ui-core-tree.mjs +508 -639
  276. package/fesm2022/exhaustive-ui-core-tree.mjs.map +1 -1
  277. package/fesm2022/exhaustive-ui-core-treeselect.mjs +333 -423
  278. package/fesm2022/exhaustive-ui-core-treeselect.mjs.map +1 -1
  279. package/fesm2022/exhaustive-ui-core-treetable.mjs +1267 -1473
  280. package/fesm2022/exhaustive-ui-core-treetable.mjs.map +1 -1
  281. package/package.json +11 -11
  282. package/schematics/migrations/remove-dead-inputs/migration.js +213 -7
  283. package/schematics/migrations/renamed-inputs/migration.js +97 -0
  284. package/schematics/migrations/styleclass-to-class/migration.js +92 -1
  285. package/schematics/migrations.json +11 -6
  286. package/schematics/utils/removed-inputs.js +0 -0
  287. package/schematics/utils/renamed-inputs.js +175 -0
  288. package/schematics/utils/styleclass.js +24 -8
  289. package/schematics/utils/versions.json +8 -8
  290. package/types/exhaustive-ui-core-accordion.d.ts +8 -24
  291. package/types/exhaustive-ui-core-animateonscroll.d.ts +19 -21
  292. package/types/exhaustive-ui-core-api.d.ts +2 -3
  293. package/types/exhaustive-ui-core-autocomplete.d.ts +103 -176
  294. package/types/exhaustive-ui-core-autofocus.d.ts +4 -7
  295. package/types/exhaustive-ui-core-avatar.d.ts +18 -25
  296. package/types/exhaustive-ui-core-badge.d.ts +13 -27
  297. package/types/exhaustive-ui-core-blockui.d.ts +18 -30
  298. package/types/exhaustive-ui-core-breadcrumb.d.ts +21 -22
  299. package/types/exhaustive-ui-core-button.d.ts +57 -89
  300. package/types/exhaustive-ui-core-carousel.d.ts +56 -82
  301. package/types/exhaustive-ui-core-cascadeselect.d.ts +77 -111
  302. package/types/exhaustive-ui-core-chart.d.ts +21 -29
  303. package/types/exhaustive-ui-core-checkbox.d.ts +25 -39
  304. package/types/exhaustive-ui-core-chip.d.ts +31 -38
  305. package/types/exhaustive-ui-core-colorpicker.d.ts +23 -57
  306. package/types/exhaustive-ui-core-confirmdialog.d.ts +39 -109
  307. package/types/exhaustive-ui-core-confirmpopup.d.ts +24 -43
  308. package/types/exhaustive-ui-core-contextmenu.d.ts +54 -71
  309. package/types/exhaustive-ui-core-dataview.d.ts +42 -65
  310. package/types/exhaustive-ui-core-datepicker.d.ts +109 -191
  311. package/types/exhaustive-ui-core-dialog.d.ts +73 -123
  312. package/types/exhaustive-ui-core-dock.d.ts +16 -25
  313. package/types/exhaustive-ui-core-dragdrop.d.ts +32 -36
  314. package/types/exhaustive-ui-core-drawer.d.ts +32 -64
  315. package/types/exhaustive-ui-core-dynamicdialog.d.ts +9 -54
  316. package/types/exhaustive-ui-core-editor.d.ts +15 -25
  317. package/types/exhaustive-ui-core-fieldset.d.ts +15 -35
  318. package/types/exhaustive-ui-core-fileupload.d.ts +69 -95
  319. package/types/exhaustive-ui-core-floatlabel.d.ts +4 -6
  320. package/types/exhaustive-ui-core-focustrap.d.ts +5 -10
  321. package/types/exhaustive-ui-core-galleria.d.ts +124 -194
  322. package/types/exhaustive-ui-core-iconfield.d.ts +5 -13
  323. package/types/exhaustive-ui-core-icons-baseicon.d.ts +4 -5
  324. package/types/exhaustive-ui-core-image.d.ts +35 -68
  325. package/types/exhaustive-ui-core-imagecompare.d.ts +19 -20
  326. package/types/exhaustive-ui-core-inplace.d.ts +30 -42
  327. package/types/exhaustive-ui-core-inputgroup.d.ts +2 -9
  328. package/types/exhaustive-ui-core-inputgroupaddon.d.ts +6 -10
  329. package/types/exhaustive-ui-core-inputicon.d.ts +4 -11
  330. package/types/exhaustive-ui-core-inputmask.d.ts +53 -66
  331. package/types/exhaustive-ui-core-inputnumber.d.ts +62 -84
  332. package/types/exhaustive-ui-core-inputotp.d.ts +16 -20
  333. package/types/exhaustive-ui-core-inputtext.d.ts +5 -8
  334. package/types/exhaustive-ui-core-keyfilter.d.ts +11 -15
  335. package/types/exhaustive-ui-core-knob.d.ts +45 -60
  336. package/types/exhaustive-ui-core-listbox.d.ts +90 -126
  337. package/types/exhaustive-ui-core-megamenu.d.ts +45 -66
  338. package/types/exhaustive-ui-core-menu.d.ts +33 -53
  339. package/types/exhaustive-ui-core-menubar.d.ts +38 -85
  340. package/types/exhaustive-ui-core-metergroup.d.ts +39 -48
  341. package/types/exhaustive-ui-core-multiselect.d.ts +166 -219
  342. package/types/exhaustive-ui-core-orderlist.d.ts +58 -81
  343. package/types/exhaustive-ui-core-organizationchart.d.ts +32 -67
  344. package/types/exhaustive-ui-core-overlaybadge.d.ts +10 -20
  345. package/types/exhaustive-ui-core-paginator.d.ts +41 -69
  346. package/types/exhaustive-ui-core-panel.d.ts +18 -45
  347. package/types/exhaustive-ui-core-panelmenu.d.ts +31 -76
  348. package/types/exhaustive-ui-core-password.d.ts +56 -93
  349. package/types/exhaustive-ui-core-picklist.d.ts +107 -121
  350. package/types/exhaustive-ui-core-popover.d.ts +23 -47
  351. package/types/exhaustive-ui-core-rating.d.ts +18 -26
  352. package/types/exhaustive-ui-core-scroller.d.ts +90 -120
  353. package/types/exhaustive-ui-core-scrollpanel.d.ts +35 -46
  354. package/types/exhaustive-ui-core-scrolltop.d.ts +28 -45
  355. package/types/exhaustive-ui-core-select.d.ts +137 -188
  356. package/types/exhaustive-ui-core-selectbutton.d.ts +35 -44
  357. package/types/exhaustive-ui-core-slider.d.ts +52 -67
  358. package/types/exhaustive-ui-core-speeddial.d.ts +40 -56
  359. package/types/exhaustive-ui-core-splitbutton.d.ts +31 -71
  360. package/types/exhaustive-ui-core-splitter.d.ts +47 -59
  361. package/types/exhaustive-ui-core-steps.d.ts +24 -31
  362. package/types/exhaustive-ui-core-styleclass.d.ts +27 -33
  363. package/types/exhaustive-ui-core-table.d.ts +349 -453
  364. package/types/exhaustive-ui-core-terminal.d.ts +10 -22
  365. package/types/exhaustive-ui-core-textarea.d.ts +7 -10
  366. package/types/exhaustive-ui-core-tieredmenu.d.ts +49 -84
  367. package/types/exhaustive-ui-core-timeline.d.ts +20 -28
  368. package/types/exhaustive-ui-core-togglebutton.d.ts +32 -48
  369. package/types/exhaustive-ui-core-toggleswitch.d.ts +26 -37
  370. package/types/exhaustive-ui-core-toolbar.d.ts +17 -25
  371. package/types/exhaustive-ui-core-tooltip.d.ts +53 -88
  372. package/types/exhaustive-ui-core-tree.d.ts +82 -119
  373. package/types/exhaustive-ui-core-treeselect.d.ts +63 -92
  374. package/types/exhaustive-ui-core-treetable.d.ts +203 -280
  375. package/types/exhaustive-ui-core-types-chip.d.ts +1 -1
@@ -1,8 +1,8 @@
1
1
  export * from '@exhaustive-ui/core/types/button';
2
2
  import * as i2 from '@angular/common';
3
- import { isPlatformBrowser, CommonModule } from '@angular/common';
3
+ import { CommonModule } from '@angular/common';
4
4
  import * as i0 from '@angular/core';
5
- import { Injectable, InjectionToken, input, inject, effect, Directive, booleanAttribute, contentChild, computed, Input, output, contentChildren, numberAttribute, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
5
+ import { Injectable, InjectionToken, input, inject, effect, afterEveryRender, Directive, untracked, afterNextRender, booleanAttribute, contentChild, computed, signal, numberAttribute, output, contentChildren, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
6
6
  import { addClass, isEmpty, findSingle, createElement } from '@exhaustive-ui/utils';
7
7
  import { PrimeTemplate, SharedModule } from '@exhaustive-ui/core/api';
8
8
  import { AutoFocus } from '@exhaustive-ui/core/autofocus';
@@ -21,33 +21,33 @@ const classes = {
21
21
  root: ({ instance }) => [
22
22
  'p-button p-component',
23
23
  {
24
- 'p-button-icon-only': instance.hasIcon && !instance.label && !instance.buttonProps?.label && !instance.badge,
25
- 'p-button-vertical': (instance.iconPos === 'top' || instance.iconPos === 'bottom') && instance.label,
26
- 'p-button-loading': instance.loading || instance.buttonProps?.loading,
27
- 'p-button-link': instance.link || instance.buttonProps?.link,
28
- [`p-button-${instance.severity || instance.buttonProps?.severity}`]: instance.severity || instance.buttonProps?.severity,
29
- 'p-button-raised': instance.raised || instance.buttonProps?.raised,
30
- 'p-button-rounded': instance.rounded || instance.buttonProps?.rounded,
31
- 'p-button-text': instance.text || instance.variant === 'text' || instance.buttonProps?.text || instance.buttonProps?.variant === 'text',
32
- 'p-button-outlined': instance.outlined || instance.variant === 'outlined' || instance.buttonProps?.outlined || instance.buttonProps?.variant === 'outlined',
33
- 'p-button-sm': instance.size === 'small' || instance.buttonProps?.size === 'small',
34
- 'p-button-lg': instance.size === 'large' || instance.buttonProps?.size === 'large',
35
- 'p-button-plain': instance.plain || instance.buttonProps?.plain,
36
- 'p-button-fluid': instance.hasFluid
24
+ 'p-button-icon-only': instance.hasIcon() && !instance.label() && !instance.buttonProps()?.label && !instance.badge(),
25
+ 'p-button-vertical': (instance.iconPos() === 'top' || instance.iconPos() === 'bottom') && instance.label(),
26
+ 'p-button-loading': instance.loading() || instance.buttonProps()?.loading,
27
+ 'p-button-link': instance.link() || instance.buttonProps()?.link,
28
+ [`p-button-${instance.severity() || instance.buttonProps()?.severity}`]: instance.severity() || instance.buttonProps()?.severity,
29
+ 'p-button-raised': instance.raised() || instance.buttonProps()?.raised,
30
+ 'p-button-rounded': instance.rounded() || instance.buttonProps()?.rounded,
31
+ 'p-button-text': instance.text() || instance.variant() === 'text' || instance.buttonProps()?.text || instance.buttonProps()?.variant === 'text',
32
+ 'p-button-outlined': instance.outlined() || instance.variant() === 'outlined' || instance.buttonProps()?.outlined || instance.buttonProps()?.variant === 'outlined',
33
+ 'p-button-sm': instance.size() === 'small' || instance.buttonProps()?.size === 'small',
34
+ 'p-button-lg': instance.size() === 'large' || instance.buttonProps()?.size === 'large',
35
+ 'p-button-plain': instance.plain() || instance.buttonProps()?.plain,
36
+ 'p-button-fluid': instance.hasFluid()
37
37
  }
38
38
  ],
39
39
  loadingIcon: 'p-button-loading-icon',
40
40
  icon: ({ instance }) => [
41
41
  'p-button-icon',
42
42
  {
43
- [`p-button-icon-${instance.iconPos || instance.buttonProps?.iconPos}`]: instance.label || instance.buttonProps?.label,
44
- 'p-button-icon-left': ((instance.iconPos === 'left' || instance.buttonProps?.iconPos === 'left') && instance.label) || instance.buttonProps?.label,
45
- 'p-button-icon-right': ((instance.iconPos === 'right' || instance.buttonProps?.iconPos === 'right') && instance.label) || instance.buttonProps?.label,
46
- 'p-button-icon-top': ((instance.iconPos === 'top' || instance.buttonProps?.iconPos === 'top') && instance.label) || instance.buttonProps?.label,
47
- 'p-button-icon-bottom': ((instance.iconPos === 'bottom' || instance.buttonProps?.iconPos === 'bottom') && instance.label) || instance.buttonProps?.label
43
+ [`p-button-icon-${instance.iconPos() || instance.buttonProps()?.iconPos}`]: instance.label() || instance.buttonProps()?.label,
44
+ 'p-button-icon-left': ((instance.iconPos() === 'left' || instance.buttonProps()?.iconPos === 'left') && instance.label()) || instance.buttonProps()?.label,
45
+ 'p-button-icon-right': ((instance.iconPos() === 'right' || instance.buttonProps()?.iconPos === 'right') && instance.label()) || instance.buttonProps()?.label,
46
+ 'p-button-icon-top': ((instance.iconPos() === 'top' || instance.buttonProps()?.iconPos === 'top') && instance.label()) || instance.buttonProps()?.label,
47
+ 'p-button-icon-bottom': ((instance.iconPos() === 'bottom' || instance.buttonProps()?.iconPos === 'bottom') && instance.label()) || instance.buttonProps()?.label
48
48
  },
49
- instance.icon,
50
- instance.buttonProps?.icon
49
+ instance.icon(),
50
+ instance.buttonProps()?.icon
51
51
  ],
52
52
  spinnerIcon: ({ instance }) => {
53
53
  return Object.entries(instance.cx('icon'))
@@ -142,9 +142,7 @@ class ButtonLabel extends BaseComponent {
142
142
  effect(() => {
143
143
  this.pButtonLabelUnstyled() && this.directiveUnstyled.set(this.pButtonLabelUnstyled());
144
144
  });
145
- }
146
- onAfterViewChecked() {
147
- this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root']));
145
+ afterEveryRender(() => this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root'])));
148
146
  }
149
147
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: ButtonLabel, deps: [], target: i0.ɵɵFactoryTarget.Directive });
150
148
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.2.1", type: ButtonLabel, isStandalone: true, selector: "[pButtonLabel]", inputs: { ptButtonLabel: { classPropertyName: "ptButtonLabel", publicName: "ptButtonLabel", isSignal: true, isRequired: false, transformFunction: null }, pButtonLabelPT: { classPropertyName: "pButtonLabelPT", publicName: "pButtonLabelPT", isSignal: true, isRequired: false, transformFunction: null }, pButtonLabelUnstyled: { classPropertyName: "pButtonLabelUnstyled", publicName: "pButtonLabelUnstyled", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.p-button-label": "!$unstyled() && true" } }, providers: [ButtonStyle, { provide: BUTTON_LABEL_INSTANCE, useExisting: ButtonLabel }, { provide: PARENT_INSTANCE, useExisting: ButtonLabel }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0 });
@@ -154,7 +152,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
154
152
  args: [{
155
153
  selector: '[pButtonLabel]',
156
154
  providers: [ButtonStyle, { provide: BUTTON_LABEL_INSTANCE, useExisting: ButtonLabel }, { provide: PARENT_INSTANCE, useExisting: ButtonLabel }],
157
- standalone: true,
158
155
  host: {
159
156
  '[class.p-button-label]': '!$unstyled() && true'
160
157
  },
@@ -196,9 +193,7 @@ class ButtonIcon extends BaseComponent {
196
193
  effect(() => {
197
194
  this.pButtonUnstyled() && this.directiveUnstyled.set(this.pButtonUnstyled());
198
195
  });
199
- }
200
- onAfterViewChecked() {
201
- this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root']));
196
+ afterEveryRender(() => this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root'])));
202
197
  }
203
198
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: ButtonIcon, deps: [], target: i0.ɵɵFactoryTarget.Directive });
204
199
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.2.1", type: ButtonIcon, isStandalone: true, selector: "[pButtonIcon]", inputs: { ptButtonIcon: { classPropertyName: "ptButtonIcon", publicName: "ptButtonIcon", isSignal: true, isRequired: false, transformFunction: null }, pButtonIconPT: { classPropertyName: "pButtonIconPT", publicName: "pButtonIconPT", isSignal: true, isRequired: false, transformFunction: null }, pButtonUnstyled: { classPropertyName: "pButtonUnstyled", publicName: "pButtonUnstyled", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.p-button-icon": "!$unstyled() && true" } }, providers: [ButtonStyle, { provide: BUTTON_ICON_INSTANCE, useExisting: ButtonIcon }, { provide: PARENT_INSTANCE, useExisting: ButtonIcon }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0 });
@@ -208,7 +203,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
208
203
  args: [{
209
204
  selector: '[pButtonIcon]',
210
205
  providers: [ButtonStyle, { provide: BUTTON_ICON_INSTANCE, useExisting: ButtonIcon }, { provide: PARENT_INSTANCE, useExisting: ButtonIcon }],
211
- standalone: true,
212
206
  host: {
213
207
  '[class.p-button-icon]': '!$unstyled() && true'
214
208
  },
@@ -246,10 +240,8 @@ class ButtonDirective extends BaseComponent {
246
240
  */
247
241
  pButtonUnstyled = input(/* @ts-ignore */
248
242
  ...(ngDevMode ? [undefined, { debugName: "pButtonUnstyled" }] : /* istanbul ignore next */ []));
249
- hostName = '';
250
- onAfterViewChecked() {
251
- this.bindDirectiveInstance.setAttrs(this.ptm('root'));
252
- }
243
+ hostName = input('', /* @ts-ignore */
244
+ ...(ngDevMode ? [{ debugName: "hostName" }] : /* istanbul ignore next */ []));
253
245
  constructor() {
254
246
  super();
255
247
  effect(() => {
@@ -261,51 +253,100 @@ class ButtonDirective extends BaseComponent {
261
253
  });
262
254
  effect(() => {
263
255
  const unstyled = this.$unstyled();
264
- if (this.initialized && unstyled) {
265
- this.setStyleClass();
266
- }
256
+ untracked(() => {
257
+ if (this.initialized() && unstyled) {
258
+ this.setStyleClass();
259
+ }
260
+ });
261
+ });
262
+ effect(() => {
263
+ this._label();
264
+ untracked(() => {
265
+ if (this.initialized()) {
266
+ this.updateLabel();
267
+ this.updateIcon();
268
+ this.setStyleClass();
269
+ }
270
+ });
271
+ });
272
+ effect(() => {
273
+ this._icon();
274
+ this._loading();
275
+ this.iconPos();
276
+ this.loadingIcon();
277
+ untracked(() => {
278
+ if (this.initialized()) {
279
+ this.updateIcon();
280
+ this.setStyleClass();
281
+ }
282
+ });
283
+ });
284
+ effect(() => {
285
+ this._severity();
286
+ this.text();
287
+ this.plain();
288
+ this.raised();
289
+ this.size();
290
+ this.outlined();
291
+ this.rounded();
292
+ this.hasFluid();
293
+ untracked(() => {
294
+ if (this.initialized()) {
295
+ this.setStyleClass();
296
+ }
297
+ });
267
298
  });
299
+ afterNextRender(() => {
300
+ !this.$unstyled() && addClass(this.htmlElement, this.getStyleClass().join(' '));
301
+ this.createIcon();
302
+ this.createLabel();
303
+ this.initialized.set(true);
304
+ });
305
+ afterEveryRender(() => this.bindDirectiveInstance.setAttrs(this.ptm('root')));
268
306
  }
269
307
  /**
270
308
  * Add a textual class to the button without a background initially.
271
309
  * @group Props
272
310
  */
273
- text = false;
311
+ text = input(false, { ...(ngDevMode ? { debugName: "text" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
274
312
  /**
275
313
  * Add a plain textual class to the button without a background initially.
276
314
  * @group Props
277
315
  */
278
- plain = false;
316
+ plain = input(false, { ...(ngDevMode ? { debugName: "plain" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
279
317
  /**
280
318
  * Add a shadow to indicate elevation.
281
319
  * @group Props
282
320
  */
283
- raised = false;
321
+ raised = input(false, { ...(ngDevMode ? { debugName: "raised" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
284
322
  /**
285
323
  * Defines the size of the button.
286
324
  * @group Props
287
325
  */
288
- size;
326
+ size = input(/* @ts-ignore */
327
+ ...(ngDevMode ? [undefined, { debugName: "size" }] : /* istanbul ignore next */ []));
289
328
  /**
290
329
  * Add a border class without a background initially.
291
330
  * @group Props
292
331
  */
293
- outlined = false;
332
+ outlined = input(false, { ...(ngDevMode ? { debugName: "outlined" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
294
333
  /**
295
334
  * Add a circular border radius to the button.
296
335
  * @group Props
297
336
  */
298
- rounded = false;
337
+ rounded = input(false, { ...(ngDevMode ? { debugName: "rounded" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
299
338
  /**
300
339
  * Position of the icon.
301
340
  * @group Props
302
341
  */
303
- iconPos = 'left';
342
+ iconPos = input('left', /* @ts-ignore */
343
+ ...(ngDevMode ? [{ debugName: "iconPos" }] : /* istanbul ignore next */ []));
304
344
  /**
305
345
  * Icon to display in loading state.
306
346
  * @group Props
307
347
  */
308
- loadingIcon;
348
+ loadingIcon = input(/* @ts-ignore */
349
+ ...(ngDevMode ? [undefined, { debugName: "loadingIcon" }] : /* istanbul ignore next */ []));
309
350
  /**
310
351
  * Spans 100% width of the container when enabled.
311
352
  * @defaultValue undefined
@@ -318,92 +359,56 @@ class ButtonDirective extends BaseComponent {
318
359
  ...(ngDevMode ? [{ debugName: "labelSignal" }] : /* istanbul ignore next */ []));
319
360
  isIconOnly = computed(() => !!(!this.labelSignal() && this.iconSignal()), /* @ts-ignore */
320
361
  ...(ngDevMode ? [{ debugName: "isIconOnly" }] : /* istanbul ignore next */ []));
321
- _label;
322
- _icon;
323
- _loading = false;
324
- _severity;
325
- _buttonProps;
326
- initialized;
362
+ _label = computed(() => this.label() || this.buttonProps()?.label, /* @ts-ignore */
363
+ ...(ngDevMode ? [{ debugName: "_label" }] : /* istanbul ignore next */ []));
364
+ _icon = computed(() => this.icon() || this.buttonProps()?.icon, /* @ts-ignore */
365
+ ...(ngDevMode ? [{ debugName: "_icon" }] : /* istanbul ignore next */ []));
366
+ _loading = computed(() => this.loading() || this.buttonProps()?.loading, /* @ts-ignore */
367
+ ...(ngDevMode ? [{ debugName: "_loading" }] : /* istanbul ignore next */ []));
368
+ _severity = computed(() => this.severity() || this.buttonProps()?.severity, /* @ts-ignore */
369
+ ...(ngDevMode ? [{ debugName: "_severity" }] : /* istanbul ignore next */ []));
370
+ initialized = signal(undefined, /* @ts-ignore */
371
+ ...(ngDevMode ? [{ debugName: "initialized" }] : /* istanbul ignore next */ []));
327
372
  get htmlElement() {
328
373
  return this.el.nativeElement;
329
374
  }
330
375
  _internalClasses = Object.values(INTERNAL_BUTTON_CLASSES);
331
376
  pcFluid = inject(Fluid, { optional: true, host: true, skipSelf: true });
332
- isTextButton = computed(() => !!(!this.iconSignal() && this.labelSignal() && this.text), /* @ts-ignore */
377
+ isTextButton = computed(() => !!(!this.iconSignal() && this.labelSignal() && this.text()), /* @ts-ignore */
333
378
  ...(ngDevMode ? [{ debugName: "isTextButton" }] : /* istanbul ignore next */ []));
334
379
  /**
335
380
  * Text of the button.
336
381
  * @deprecated use pButtonLabel directive instead.
337
382
  * @group Props
338
383
  */
339
- get label() {
340
- return this._label;
341
- }
342
- set label(val) {
343
- this._label = val;
344
- if (this.initialized) {
345
- this.updateLabel();
346
- this.updateIcon();
347
- this.setStyleClass();
348
- }
349
- }
384
+ label = input(/* @ts-ignore */
385
+ ...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
350
386
  /**
351
387
  * Name of the icon.
352
388
  * @deprecated use pButtonIcon directive instead
353
389
  * @group Props
354
390
  */
355
- get icon() {
356
- return this._icon;
357
- }
358
- set icon(val) {
359
- this._icon = val;
360
- if (this.initialized) {
361
- this.updateIcon();
362
- this.setStyleClass();
363
- }
364
- }
391
+ icon = input(/* @ts-ignore */
392
+ ...(ngDevMode ? [undefined, { debugName: "icon" }] : /* istanbul ignore next */ []));
365
393
  /**
366
394
  * Whether the button is in loading state.
367
395
  * @group Props
368
396
  */
369
- get loading() {
370
- return this._loading;
371
- }
372
- set loading(val) {
373
- this._loading = val;
374
- if (this.initialized) {
375
- this.updateIcon();
376
- this.setStyleClass();
377
- }
378
- }
397
+ loading = input(false, /* @ts-ignore */
398
+ ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
379
399
  /**
380
400
  * Used to pass all properties of the ButtonProps to the Button component.
381
401
  * @deprecated assign props directly to the button element.
382
402
  * @group Props
383
403
  */
384
- get buttonProps() {
385
- return this._buttonProps;
386
- }
387
- set buttonProps(val) {
388
- this._buttonProps = val;
389
- if (val && typeof val === 'object') {
390
- //@ts-ignore
391
- Object.entries(val).forEach(([k, v]) => this[`_${k}`] !== v && (this[`_${k}`] = v));
392
- }
393
- }
404
+ buttonProps = input(/* @ts-ignore */
405
+ ...(ngDevMode ? [undefined, { debugName: "buttonProps" }] : /* istanbul ignore next */ []));
394
406
  /**
395
407
  * Defines the style of the button.
396
408
  * @group Props
397
409
  */
398
- get severity() {
399
- return this._severity;
400
- }
401
- set severity(value) {
402
- this._severity = value;
403
- if (this.initialized) {
404
- this.setStyleClass();
405
- }
406
- }
410
+ severity = input(/* @ts-ignore */
411
+ ...(ngDevMode ? [undefined, { debugName: "severity" }] : /* istanbul ignore next */ []));
407
412
  spinnerIcon = `<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg" class="p-icon-spin">
408
413
  <g clip-path="url(#clip0_417_21408)">
409
414
  <path
@@ -417,63 +422,54 @@ class ButtonDirective extends BaseComponent {
417
422
  </clipPath>
418
423
  </defs>
419
424
  </svg>`;
420
- onAfterViewInit() {
421
- !this.$unstyled() && addClass(this.htmlElement, this.getStyleClass().join(' '));
422
- if (isPlatformBrowser(this.platformId)) {
423
- this.createIcon();
424
- this.createLabel();
425
- this.initialized = true;
426
- }
427
- }
428
425
  getStyleClass() {
429
426
  const styleClass = [INTERNAL_BUTTON_CLASSES.button, INTERNAL_BUTTON_CLASSES.component];
430
- if (this.icon && !this.label && isEmpty(this.htmlElement.textContent)) {
427
+ if (this._icon() && !this._label() && isEmpty(this.htmlElement.textContent)) {
431
428
  styleClass.push(INTERNAL_BUTTON_CLASSES.iconOnly);
432
429
  }
433
- if (this.loading) {
430
+ if (this._loading()) {
434
431
  styleClass.push(INTERNAL_BUTTON_CLASSES.disabled, INTERNAL_BUTTON_CLASSES.loading);
435
- if (!this.icon && this.label) {
432
+ if (!this._icon() && this._label()) {
436
433
  styleClass.push(INTERNAL_BUTTON_CLASSES.labelOnly);
437
434
  }
438
- if (this.icon && !this.label && !isEmpty(this.htmlElement.textContent)) {
435
+ if (this._icon() && !this._label() && !isEmpty(this.htmlElement.textContent)) {
439
436
  styleClass.push(INTERNAL_BUTTON_CLASSES.iconOnly);
440
437
  }
441
438
  }
442
- if (this.text) {
439
+ if (this.text()) {
443
440
  styleClass.push('p-button-text');
444
441
  }
445
- if (this.severity) {
446
- styleClass.push(`p-button-${this.severity}`);
442
+ if (this._severity()) {
443
+ styleClass.push(`p-button-${this._severity()}`);
447
444
  }
448
- if (this.plain) {
445
+ if (this.plain()) {
449
446
  styleClass.push('p-button-plain');
450
447
  }
451
- if (this.raised) {
448
+ if (this.raised()) {
452
449
  styleClass.push('p-button-raised');
453
450
  }
454
- if (this.size) {
455
- styleClass.push(`p-button-${this.size}`);
451
+ if (this.size()) {
452
+ styleClass.push(`p-button-${this.size()}`);
456
453
  }
457
- if (this.outlined) {
454
+ if (this.outlined()) {
458
455
  styleClass.push('p-button-outlined');
459
456
  }
460
- if (this.rounded) {
457
+ if (this.rounded()) {
461
458
  styleClass.push('p-button-rounded');
462
459
  }
463
- if (this.size === 'small') {
460
+ if (this.size() === 'small') {
464
461
  styleClass.push('p-button-sm');
465
462
  }
466
- if (this.size === 'large') {
463
+ if (this.size() === 'large') {
467
464
  styleClass.push('p-button-lg');
468
465
  }
469
- if (this.hasFluid) {
466
+ if (this.hasFluid()) {
470
467
  styleClass.push('p-button-fluid');
471
468
  }
472
469
  return this.$unstyled() ? [] : styleClass;
473
470
  }
474
- get hasFluid() {
475
- return this.fluid() ?? !!this.pcFluid;
476
- }
471
+ hasFluid = computed(() => this.fluid() ?? !!this.pcFluid, /* @ts-ignore */
472
+ ...(ngDevMode ? [{ debugName: "hasFluid" }] : /* istanbul ignore next */ []));
477
473
  setStyleClass() {
478
474
  const styleClass = this.getStyleClass();
479
475
  this.removeExistingSeverityClass();
@@ -489,19 +485,19 @@ class ButtonDirective extends BaseComponent {
489
485
  }
490
486
  createLabel() {
491
487
  const created = findSingle(this.htmlElement, '[data-pc-section="buttonlabel"]');
492
- if (!created && this.label) {
493
- let labelElement = createElement('span', { class: this.cx('label'), 'p-bind': this.ptm('buttonlabel'), 'aria-hidden': this.icon && !this.label ? 'true' : null });
494
- labelElement.appendChild(this.document.createTextNode(this.label));
488
+ if (!created && this._label()) {
489
+ let labelElement = createElement('span', { class: this.cx('label'), 'p-bind': this.ptm('buttonlabel'), 'aria-hidden': this._icon() && !this._label() ? 'true' : null });
490
+ labelElement.appendChild(this.document.createTextNode(this._label()));
495
491
  this.htmlElement.appendChild(labelElement);
496
492
  }
497
493
  }
498
494
  createIcon() {
499
495
  const created = findSingle(this.htmlElement, '[data-pc-section="buttonicon"]');
500
- if (!created && (this.icon || this.loading)) {
501
- let iconPosClass = this.label && !this.$unstyled() ? 'p-button-icon-' + this.iconPos : null;
496
+ if (!created && (this._icon() || this._loading())) {
497
+ let iconPosClass = this._label() && !this.$unstyled() ? 'p-button-icon-' + this.iconPos() : null;
502
498
  let iconClass = !this.$unstyled() && this.getIconClass();
503
499
  let iconElement = createElement('span', { class: this.cn(this.cx('icon'), iconPosClass, iconClass), 'aria-hidden': 'true', 'p-bind': this.ptm('buttonicon') });
504
- if (!this.loadingIcon && this.loading) {
500
+ if (!this.loadingIcon() && this._loading()) {
505
501
  iconElement.innerHTML = this.spinnerIcon;
506
502
  }
507
503
  this.htmlElement.insertBefore(iconElement, this.htmlElement.firstChild);
@@ -509,24 +505,24 @@ class ButtonDirective extends BaseComponent {
509
505
  }
510
506
  updateLabel() {
511
507
  let labelElement = findSingle(this.htmlElement, '[data-pc-section="buttonlabel"]');
512
- if (!this.label) {
508
+ if (!this._label()) {
513
509
  labelElement && this.htmlElement.removeChild(labelElement);
514
510
  return;
515
511
  }
516
- labelElement ? (labelElement.textContent = this.label) : this.createLabel();
512
+ labelElement ? (labelElement.textContent = this._label()) : this.createLabel();
517
513
  }
518
514
  updateIcon() {
519
515
  let iconElement = findSingle(this.htmlElement, '[data-pc-section="buttonicon"]');
520
516
  let labelElement = findSingle(this.htmlElement, '[data-pc-section="buttonlabel"]');
521
- if (this.loading && !this.loadingIcon && iconElement) {
517
+ if (this._loading() && !this.loadingIcon() && iconElement) {
522
518
  iconElement.innerHTML = this.spinnerIcon;
523
519
  }
524
520
  else if (iconElement?.innerHTML) {
525
521
  iconElement.innerHTML = '';
526
522
  }
527
523
  if (iconElement && !this.$unstyled()) {
528
- if (this.iconPos) {
529
- iconElement.className = 'p-button-icon ' + (labelElement ? 'p-button-icon-' + this.iconPos : '') + ' ' + this.getIconClass();
524
+ if (this.iconPos()) {
525
+ iconElement.className = 'p-button-icon ' + (labelElement ? 'p-button-icon-' + this.iconPos() : '') + ' ' + this.getIconClass();
530
526
  }
531
527
  else {
532
528
  iconElement.className = 'p-button-icon ' + this.getIconClass();
@@ -537,19 +533,18 @@ class ButtonDirective extends BaseComponent {
537
533
  }
538
534
  }
539
535
  getIconClass() {
540
- return this.loading ? 'p-button-loading-icon ' + (this.loadingIcon ? this.loadingIcon : 'p-icon') : this.icon || 'p-hidden';
536
+ return this._loading() ? 'p-button-loading-icon ' + (this.loadingIcon() ? this.loadingIcon() : 'p-icon') : this._icon() || 'p-hidden';
541
537
  }
542
538
  onDestroy() {
543
- this.initialized = false;
539
+ this.initialized.set(false);
544
540
  }
545
541
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: ButtonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
546
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "22.2.1", type: ButtonDirective, isStandalone: true, selector: "[pButton]", inputs: { ptButtonDirective: { classPropertyName: "ptButtonDirective", publicName: "ptButtonDirective", isSignal: true, isRequired: false, transformFunction: null }, pButtonPT: { classPropertyName: "pButtonPT", publicName: "pButtonPT", isSignal: true, isRequired: false, transformFunction: null }, pButtonUnstyled: { classPropertyName: "pButtonUnstyled", publicName: "pButtonUnstyled", isSignal: true, isRequired: false, transformFunction: null }, hostName: { classPropertyName: "hostName", publicName: "hostName", isSignal: false, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, plain: { classPropertyName: "plain", publicName: "plain", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, raised: { classPropertyName: "raised", publicName: "raised", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, size: { classPropertyName: "size", publicName: "size", isSignal: false, isRequired: false, transformFunction: null }, outlined: { classPropertyName: "outlined", publicName: "outlined", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, iconPos: { classPropertyName: "iconPos", publicName: "iconPos", isSignal: false, isRequired: false, transformFunction: null }, loadingIcon: { classPropertyName: "loadingIcon", publicName: "loadingIcon", isSignal: false, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: false, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: false, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: false, isRequired: false, transformFunction: null }, buttonProps: { classPropertyName: "buttonProps", publicName: "buttonProps", isSignal: false, isRequired: false, transformFunction: null }, severity: { classPropertyName: "severity", publicName: "severity", isSignal: false, isRequired: false, transformFunction: null } }, host: { properties: { "class.p-button-icon-only": "!$unstyled() && isIconOnly()", "class.p-button-text": " !$unstyled() && isTextButton()" } }, providers: [ButtonStyle, { provide: BUTTON_DIRECTIVE_INSTANCE, useExisting: ButtonDirective }, { provide: PARENT_INSTANCE, useExisting: ButtonDirective }], queries: [{ propertyName: "iconSignal", first: true, predicate: ButtonIcon, descendants: true, isSignal: true }, { propertyName: "labelSignal", first: true, predicate: ButtonLabel, descendants: true, isSignal: true }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0 });
542
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "22.2.1", type: ButtonDirective, isStandalone: true, selector: "[pButton]", inputs: { ptButtonDirective: { classPropertyName: "ptButtonDirective", publicName: "ptButtonDirective", isSignal: true, isRequired: false, transformFunction: null }, pButtonPT: { classPropertyName: "pButtonPT", publicName: "pButtonPT", isSignal: true, isRequired: false, transformFunction: null }, pButtonUnstyled: { classPropertyName: "pButtonUnstyled", publicName: "pButtonUnstyled", isSignal: true, isRequired: false, transformFunction: null }, hostName: { classPropertyName: "hostName", publicName: "hostName", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, plain: { classPropertyName: "plain", publicName: "plain", isSignal: true, isRequired: false, transformFunction: null }, raised: { classPropertyName: "raised", publicName: "raised", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, outlined: { classPropertyName: "outlined", publicName: "outlined", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, iconPos: { classPropertyName: "iconPos", publicName: "iconPos", isSignal: true, isRequired: false, transformFunction: null }, loadingIcon: { classPropertyName: "loadingIcon", publicName: "loadingIcon", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, buttonProps: { classPropertyName: "buttonProps", publicName: "buttonProps", isSignal: true, isRequired: false, transformFunction: null }, severity: { classPropertyName: "severity", publicName: "severity", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.p-button-icon-only": "!$unstyled() && isIconOnly()", "class.p-button-text": " !$unstyled() && isTextButton()" } }, providers: [ButtonStyle, { provide: BUTTON_DIRECTIVE_INSTANCE, useExisting: ButtonDirective }, { provide: PARENT_INSTANCE, useExisting: ButtonDirective }], queries: [{ propertyName: "iconSignal", first: true, predicate: ButtonIcon, descendants: true, isSignal: true }, { propertyName: "labelSignal", first: true, predicate: ButtonLabel, descendants: true, isSignal: true }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0 });
547
543
  }
548
544
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: ButtonDirective, decorators: [{
549
545
  type: Directive,
550
546
  args: [{
551
547
  selector: '[pButton]',
552
- standalone: true,
553
548
  providers: [ButtonStyle, { provide: BUTTON_DIRECTIVE_INSTANCE, useExisting: ButtonDirective }, { provide: PARENT_INSTANCE, useExisting: ButtonDirective }],
554
549
  host: {
555
550
  '[class.p-button-icon-only]': '!$unstyled() && isIconOnly()',
@@ -557,180 +552,157 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
557
552
  },
558
553
  hostDirectives: [Bind]
559
554
  }]
560
- }], ctorParameters: () => [], propDecorators: { ptButtonDirective: [{ type: i0.Input, args: [{ isSignal: true, alias: "ptButtonDirective", required: false }] }], pButtonPT: [{ type: i0.Input, args: [{ isSignal: true, alias: "pButtonPT", required: false }] }], pButtonUnstyled: [{ type: i0.Input, args: [{ isSignal: true, alias: "pButtonUnstyled", required: false }] }], hostName: [{
561
- type: Input
562
- }], text: [{
563
- type: Input,
564
- args: [{ transform: booleanAttribute }]
565
- }], plain: [{
566
- type: Input,
567
- args: [{ transform: booleanAttribute }]
568
- }], raised: [{
569
- type: Input,
570
- args: [{ transform: booleanAttribute }]
571
- }], size: [{
572
- type: Input
573
- }], outlined: [{
574
- type: Input,
575
- args: [{ transform: booleanAttribute }]
576
- }], rounded: [{
577
- type: Input,
578
- args: [{ transform: booleanAttribute }]
579
- }], iconPos: [{
580
- type: Input
581
- }], loadingIcon: [{
582
- type: Input
583
- }], fluid: [{ type: i0.Input, args: [{ isSignal: true, alias: "fluid", required: false }] }], iconSignal: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ButtonIcon), { isSignal: true }] }], labelSignal: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ButtonLabel), { isSignal: true }] }], label: [{
584
- type: Input
585
- }], icon: [{
586
- type: Input
587
- }], loading: [{
588
- type: Input
589
- }], buttonProps: [{
590
- type: Input
591
- }], severity: [{
592
- type: Input
593
- }] } });
555
+ }], ctorParameters: () => [], propDecorators: { ptButtonDirective: [{ type: i0.Input, args: [{ isSignal: true, alias: "ptButtonDirective", required: false }] }], pButtonPT: [{ type: i0.Input, args: [{ isSignal: true, alias: "pButtonPT", required: false }] }], pButtonUnstyled: [{ type: i0.Input, args: [{ isSignal: true, alias: "pButtonUnstyled", required: false }] }], hostName: [{ type: i0.Input, args: [{ isSignal: true, alias: "hostName", required: false }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], plain: [{ type: i0.Input, args: [{ isSignal: true, alias: "plain", required: false }] }], raised: [{ type: i0.Input, args: [{ isSignal: true, alias: "raised", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], outlined: [{ type: i0.Input, args: [{ isSignal: true, alias: "outlined", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], iconPos: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconPos", required: false }] }], loadingIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingIcon", required: false }] }], fluid: [{ type: i0.Input, args: [{ isSignal: true, alias: "fluid", required: false }] }], iconSignal: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ButtonIcon), { isSignal: true }] }], labelSignal: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ButtonLabel), { isSignal: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], buttonProps: [{ type: i0.Input, args: [{ isSignal: true, alias: "buttonProps", required: false }] }], severity: [{ type: i0.Input, args: [{ isSignal: true, alias: "severity", required: false }] }] } });
594
556
  /**
595
557
  * Button is an extension to standard button element with icons and theming.
596
558
  * @group Components
597
559
  */
598
560
  class Button extends BaseComponent {
599
561
  componentName = 'Button';
600
- hostName = '';
562
+ hostName = input('', /* @ts-ignore */
563
+ ...(ngDevMode ? [{ debugName: "hostName" }] : /* istanbul ignore next */ []));
601
564
  $pcButton = inject(BUTTON_INSTANCE, { optional: true, skipSelf: true }) ?? undefined;
602
565
  bindDirectiveInstance = inject(Bind, { self: true });
603
566
  _componentStyle = inject(ButtonStyle);
604
- onAfterViewChecked() {
605
- this.bindDirectiveInstance.setAttrs(this.ptm('host'));
567
+ constructor() {
568
+ super();
569
+ afterEveryRender(() => this.bindDirectiveInstance.setAttrs(this.ptm('host')));
606
570
  }
607
571
  /**
608
572
  * Type of the button.
609
573
  * @group Props
610
574
  */
611
- type = 'button';
575
+ type = input('button', /* @ts-ignore */
576
+ ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
612
577
  /**
613
578
  * Value of the badge.
614
579
  * @group Props
615
580
  */
616
- badge;
581
+ badge = input(/* @ts-ignore */
582
+ ...(ngDevMode ? [undefined, { debugName: "badge" }] : /* istanbul ignore next */ []));
617
583
  /**
618
584
  * When present, it specifies that the component should be disabled.
619
585
  * @group Props
620
586
  */
621
- disabled;
587
+ disabled = input(undefined, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
622
588
  /**
623
589
  * Add a shadow to indicate elevation.
624
590
  * @group Props
625
591
  */
626
- raised = false;
592
+ raised = input(false, { ...(ngDevMode ? { debugName: "raised" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
627
593
  /**
628
594
  * Add a circular border radius to the button.
629
595
  * @group Props
630
596
  */
631
- rounded = false;
597
+ rounded = input(false, { ...(ngDevMode ? { debugName: "rounded" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
632
598
  /**
633
599
  * Add a textual class to the button without a background initially.
634
600
  * @group Props
635
601
  */
636
- text = false;
602
+ text = input(false, { ...(ngDevMode ? { debugName: "text" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
637
603
  /**
638
604
  * Add a plain textual class to the button without a background initially.
639
605
  * @group Props
640
606
  */
641
- plain = false;
607
+ plain = input(false, { ...(ngDevMode ? { debugName: "plain" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
642
608
  /**
643
609
  * Add a border class without a background initially.
644
610
  * @group Props
645
611
  */
646
- outlined = false;
612
+ outlined = input(false, { ...(ngDevMode ? { debugName: "outlined" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
647
613
  /**
648
614
  * Add a link style to the button.
649
615
  * @group Props
650
616
  */
651
- link = false;
617
+ link = input(false, { ...(ngDevMode ? { debugName: "link" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
652
618
  /**
653
619
  * Add a tabindex to the button.
654
620
  * @group Props
655
621
  */
656
- tabindex;
622
+ tabindex = input(undefined, { ...(ngDevMode ? { debugName: "tabindex" } : /* istanbul ignore next */ {}), transform: numberAttribute });
657
623
  /**
658
624
  * Defines the size of the button.
659
625
  * @group Props
660
626
  */
661
- size;
627
+ size = input(/* @ts-ignore */
628
+ ...(ngDevMode ? [undefined, { debugName: "size" }] : /* istanbul ignore next */ []));
662
629
  /**
663
630
  * Specifies the variant of the component.
664
631
  * @group Props
665
632
  */
666
- variant;
633
+ variant = input(/* @ts-ignore */
634
+ ...(ngDevMode ? [undefined, { debugName: "variant" }] : /* istanbul ignore next */ []));
667
635
  /**
668
636
  * Inline style of the element.
669
637
  * @group Props
670
638
  */
671
- style;
639
+ style = input(/* @ts-ignore */
640
+ ...(ngDevMode ? [undefined, { debugName: "style" }] : /* istanbul ignore next */ []));
672
641
  /**
673
642
  * Class of the element.
674
643
  * @group Props
675
644
  */
676
- styleClass;
677
- /**
678
- * Style class of the badge.
679
- * @group Props
680
- * @deprecated use badgeSeverity instead.
681
- */
682
- badgeClass;
645
+ styleClass = input(/* @ts-ignore */
646
+ ...(ngDevMode ? [undefined, { debugName: "styleClass" }] : /* istanbul ignore next */ []));
683
647
  /**
684
648
  * Severity type of the badge.
685
649
  * @group Props
686
650
  * @defaultValue secondary
687
651
  */
688
- badgeSeverity = 'secondary';
652
+ badgeSeverity = input('secondary', /* @ts-ignore */
653
+ ...(ngDevMode ? [{ debugName: "badgeSeverity" }] : /* istanbul ignore next */ []));
689
654
  /**
690
655
  * Used to define a string that autocomplete attribute the current element.
691
656
  * @group Props
692
657
  */
693
- ariaLabel;
658
+ ariaLabel = input(/* @ts-ignore */
659
+ ...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
694
660
  /**
695
661
  * When present, it specifies that the component should automatically get focus on load.
696
662
  * @group Props
697
663
  */
698
- autofocus;
664
+ autofocus = input(undefined, { ...(ngDevMode ? { debugName: "autofocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
699
665
  /**
700
666
  * Position of the icon.
701
667
  * @group Props
702
668
  */
703
- iconPos = 'left';
669
+ iconPos = input('left', /* @ts-ignore */
670
+ ...(ngDevMode ? [{ debugName: "iconPos" }] : /* istanbul ignore next */ []));
704
671
  /**
705
672
  * Name of the icon.
706
673
  * @group Props
707
674
  */
708
- icon;
675
+ icon = input(/* @ts-ignore */
676
+ ...(ngDevMode ? [undefined, { debugName: "icon" }] : /* istanbul ignore next */ []));
709
677
  /**
710
678
  * Text of the button.
711
679
  * @group Props
712
680
  */
713
- label;
681
+ label = input(/* @ts-ignore */
682
+ ...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
714
683
  /**
715
684
  * Whether the button is in loading state.
716
685
  * @group Props
717
686
  */
718
- loading = false;
687
+ loading = input(false, { ...(ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
719
688
  /**
720
689
  * Icon to display in loading state.
721
690
  * @group Props
722
691
  */
723
- loadingIcon;
692
+ loadingIcon = input(/* @ts-ignore */
693
+ ...(ngDevMode ? [undefined, { debugName: "loadingIcon" }] : /* istanbul ignore next */ []));
724
694
  /**
725
695
  * Defines the style of the button.
726
696
  * @group Props
727
697
  */
728
- severity;
698
+ severity = input(/* @ts-ignore */
699
+ ...(ngDevMode ? [undefined, { debugName: "severity" }] : /* istanbul ignore next */ []));
729
700
  /**
730
701
  * Used to pass all properties of the ButtonProps to the Button component.
731
702
  * @group Props
732
703
  */
733
- buttonProps;
704
+ buttonProps = input(/* @ts-ignore */
705
+ ...(ngDevMode ? [undefined, { debugName: "buttonProps" }] : /* istanbul ignore next */ []));
734
706
  /**
735
707
  * Spans 100% width of the container when enabled.
736
708
  * @defaultValue undefined
@@ -779,162 +751,147 @@ class Button extends BaseComponent {
779
751
  templates = contentChildren(PrimeTemplate, /* @ts-ignore */
780
752
  ...(ngDevMode ? [{ debugName: "templates" }] : /* istanbul ignore next */ []));
781
753
  pcFluid = inject(Fluid, { optional: true, host: true, skipSelf: true });
782
- get hasFluid() {
783
- return this.fluid() ?? !!this.pcFluid;
784
- }
785
- get hasIcon() {
786
- return this.icon || this.buttonProps?.icon || this.iconTemplate() || this._iconTemplate || this.loadingIcon || this.loadingIconTemplate() || this._loadingIconTemplate;
787
- }
788
- _contentTemplate;
789
- _iconTemplate;
790
- _loadingIconTemplate;
791
- onAfterContentInit() {
792
- this.templates()?.forEach((item) => {
793
- switch (item.getType()) {
794
- case 'content':
795
- this._contentTemplate = item.template;
796
- break;
797
- case 'icon':
798
- this._iconTemplate = item.template;
799
- break;
800
- case 'loadingicon':
801
- this._loadingIconTemplate = item.template;
802
- break;
803
- default:
804
- this._contentTemplate = item.template;
805
- break;
806
- }
807
- });
808
- }
809
- get dataP() {
810
- return this.cn({
811
- [this.size]: this.size,
812
- 'icon-only': this.hasIcon && !this.label && !this.badge,
813
- loading: this.loading,
814
- fluid: this.hasFluid,
815
- rounded: this.rounded,
816
- raised: this.raised,
817
- outlined: this.outlined || this.variant === 'outlined',
818
- text: this.text || this.variant === 'text',
819
- link: this.link,
820
- vertical: (this.iconPos === 'top' || this.iconPos === 'bottom') && this.label
821
- });
822
- }
823
- get dataIconP() {
824
- return this.cn({
825
- [this.iconPos]: this.iconPos,
826
- [this.size]: this.size
827
- });
828
- }
829
- get dataLabelP() {
830
- return this.cn({
831
- [this.size]: this.size,
832
- 'icon-only': this.hasIcon && !this.label && !this.badge
833
- });
834
- }
835
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: Button, deps: null, target: i0.ɵɵFactoryTarget.Component });
836
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: Button, isStandalone: true, selector: "p-button", inputs: { hostName: { classPropertyName: "hostName", publicName: "hostName", isSignal: false, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: false, isRequired: false, transformFunction: null }, badge: { classPropertyName: "badge", publicName: "badge", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, raised: { classPropertyName: "raised", publicName: "raised", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, text: { classPropertyName: "text", publicName: "text", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, plain: { classPropertyName: "plain", publicName: "plain", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, outlined: { classPropertyName: "outlined", publicName: "outlined", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, link: { classPropertyName: "link", publicName: "link", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: false, isRequired: false, transformFunction: numberAttribute }, size: { classPropertyName: "size", publicName: "size", isSignal: false, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: false, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: false, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: false, isRequired: false, transformFunction: null }, badgeClass: { classPropertyName: "badgeClass", publicName: "badgeClass", isSignal: false, isRequired: false, transformFunction: null }, badgeSeverity: { classPropertyName: "badgeSeverity", publicName: "badgeSeverity", isSignal: false, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: false, isRequired: false, transformFunction: null }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, iconPos: { classPropertyName: "iconPos", publicName: "iconPos", isSignal: false, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: false, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: false, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, loadingIcon: { classPropertyName: "loadingIcon", publicName: "loadingIcon", isSignal: false, isRequired: false, transformFunction: null }, severity: { classPropertyName: "severity", publicName: "severity", isSignal: false, isRequired: false, transformFunction: null }, buttonProps: { classPropertyName: "buttonProps", publicName: "buttonProps", isSignal: false, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onClick: "onClick", onFocus: "onFocus", onBlur: "onBlur" }, providers: [ButtonStyle, { provide: BUTTON_INSTANCE, useExisting: Button }, { provide: PARENT_INSTANCE, useExisting: Button }], queries: [{ propertyName: "contentTemplate", first: true, predicate: ["content"], descendants: true, isSignal: true }, { propertyName: "loadingIconTemplate", first: true, predicate: ["loadingicon"], descendants: true, isSignal: true }, { propertyName: "iconTemplate", first: true, predicate: ["icon"], descendants: true, isSignal: true }, { propertyName: "templates", predicate: PrimeTemplate, isSignal: true }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `
754
+ hasFluid = computed(() => this.fluid() ?? !!this.pcFluid, /* @ts-ignore */
755
+ ...(ngDevMode ? [{ debugName: "hasFluid" }] : /* istanbul ignore next */ []));
756
+ hasIcon = computed(() => this.icon() || this.buttonProps()?.icon || this.iconTemplate() || this._iconTemplate() || this.loadingIcon() || this.loadingIconTemplate() || this._loadingIconTemplate(), /* @ts-ignore */
757
+ ...(ngDevMode ? [{ debugName: "hasIcon" }] : /* istanbul ignore next */ []));
758
+ _contentTemplate = computed(() => this.templates()
759
+ .filter((item) => item.getType() !== 'icon' && item.getType() !== 'loadingicon')
760
+ .at(-1)?.template, /* @ts-ignore */
761
+ ...(ngDevMode ? [{ debugName: "_contentTemplate" }] : /* istanbul ignore next */ []));
762
+ _iconTemplate = computed(() => this.templates()
763
+ .filter((item) => item.getType() === 'icon')
764
+ .at(-1)?.template, /* @ts-ignore */
765
+ ...(ngDevMode ? [{ debugName: "_iconTemplate" }] : /* istanbul ignore next */ []));
766
+ _loadingIconTemplate = computed(() => this.templates()
767
+ .filter((item) => item.getType() === 'loadingicon')
768
+ .at(-1)?.template, /* @ts-ignore */
769
+ ...(ngDevMode ? [{ debugName: "_loadingIconTemplate" }] : /* istanbul ignore next */ []));
770
+ dataP = computed(() => this.cn({
771
+ [this.size()]: this.size(),
772
+ 'icon-only': this.hasIcon() && !this.label() && !this.badge(),
773
+ loading: this.loading(),
774
+ fluid: this.hasFluid(),
775
+ rounded: this.rounded(),
776
+ raised: this.raised(),
777
+ outlined: this.outlined() || this.variant() === 'outlined',
778
+ text: this.text() || this.variant() === 'text',
779
+ link: this.link(),
780
+ vertical: (this.iconPos() === 'top' || this.iconPos() === 'bottom') && this.label()
781
+ }), /* @ts-ignore */
782
+ ...(ngDevMode ? [{ debugName: "dataP" }] : /* istanbul ignore next */ []));
783
+ dataIconP = computed(() => this.cn({
784
+ [this.iconPos()]: this.iconPos(),
785
+ [this.size()]: this.size()
786
+ }), /* @ts-ignore */
787
+ ...(ngDevMode ? [{ debugName: "dataIconP" }] : /* istanbul ignore next */ []));
788
+ dataLabelP = computed(() => this.cn({
789
+ [this.size()]: this.size(),
790
+ 'icon-only': this.hasIcon() && !this.label() && !this.badge()
791
+ }), /* @ts-ignore */
792
+ ...(ngDevMode ? [{ debugName: "dataLabelP" }] : /* istanbul ignore next */ []));
793
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: Button, deps: [], target: i0.ɵɵFactoryTarget.Component });
794
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: Button, isStandalone: true, selector: "p-button", inputs: { hostName: { classPropertyName: "hostName", publicName: "hostName", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, badge: { classPropertyName: "badge", publicName: "badge", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, raised: { classPropertyName: "raised", publicName: "raised", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, plain: { classPropertyName: "plain", publicName: "plain", isSignal: true, isRequired: false, transformFunction: null }, outlined: { classPropertyName: "outlined", publicName: "outlined", isSignal: true, isRequired: false, transformFunction: null }, link: { classPropertyName: "link", publicName: "link", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, badgeSeverity: { classPropertyName: "badgeSeverity", publicName: "badgeSeverity", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: true, isRequired: false, transformFunction: null }, iconPos: { classPropertyName: "iconPos", publicName: "iconPos", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, loadingIcon: { classPropertyName: "loadingIcon", publicName: "loadingIcon", isSignal: true, isRequired: false, transformFunction: null }, severity: { classPropertyName: "severity", publicName: "severity", isSignal: true, isRequired: false, transformFunction: null }, buttonProps: { classPropertyName: "buttonProps", publicName: "buttonProps", isSignal: true, isRequired: false, transformFunction: null }, fluid: { classPropertyName: "fluid", publicName: "fluid", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onClick: "onClick", onFocus: "onFocus", onBlur: "onBlur" }, providers: [ButtonStyle, { provide: BUTTON_INSTANCE, useExisting: Button }, { provide: PARENT_INSTANCE, useExisting: Button }], queries: [{ propertyName: "contentTemplate", first: true, predicate: ["content"], descendants: true, isSignal: true }, { propertyName: "loadingIconTemplate", first: true, predicate: ["loadingicon"], descendants: true, isSignal: true }, { propertyName: "iconTemplate", first: true, predicate: ["icon"], descendants: true, isSignal: true }, { propertyName: "templates", predicate: PrimeTemplate, isSignal: true }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `
837
795
  <button
838
- [attr.type]="type || buttonProps?.type"
839
- [attr.aria-label]="ariaLabel || buttonProps?.ariaLabel"
840
- [ngStyle]="style || buttonProps?.style"
841
- [disabled]="disabled || loading || buttonProps?.disabled"
842
- [class]="cn(cx('root'), styleClass, buttonProps?.styleClass)"
796
+ [attr.type]="type() || buttonProps()?.type"
797
+ [attr.aria-label]="ariaLabel() || buttonProps()?.ariaLabel"
798
+ [ngStyle]="style() || buttonProps()?.style"
799
+ [disabled]="disabled() || loading() || buttonProps()?.disabled"
800
+ [class]="cn(cx('root'), styleClass(), buttonProps()?.styleClass)"
843
801
  (click)="onClick.emit($event)"
844
802
  (focus)="onFocus.emit($event)"
845
803
  (blur)="onBlur.emit($event)"
846
804
  pRipple
847
- [attr.tabindex]="tabindex || buttonProps?.tabindex"
848
- [pAutoFocus]="autofocus || buttonProps?.autofocus"
805
+ [attr.tabindex]="tabindex() || buttonProps()?.tabindex"
806
+ [pAutoFocus]="autofocus() || buttonProps()?.autofocus"
849
807
  [pBind]="ptm('root')"
850
- [attr.data-p]="dataP"
851
- [attr.data-p-disabled]="disabled || loading || buttonProps?.disabled"
852
- [attr.data-p-severity]="severity || buttonProps?.severity"
808
+ [attr.data-p]="dataP()"
809
+ [attr.data-p-disabled]="disabled() || loading() || buttonProps()?.disabled"
810
+ [attr.data-p-severity]="severity() || buttonProps()?.severity"
853
811
  >
854
812
  <ng-content></ng-content>
855
- <ng-container *ngTemplateOutlet="contentTemplate() || _contentTemplate"></ng-container>
856
- @if (loading || buttonProps?.loading) {
857
- @if (!loadingIconTemplate() && !_loadingIconTemplate) {
858
- @if (loadingIcon || buttonProps?.loadingIcon) {
859
- <span [class]="cn(cx('loadingIcon'), 'pi-spin', loadingIcon || buttonProps?.loadingIcon)" [pBind]="ptm('loadingIcon')" [attr.aria-hidden]="true"></span>
813
+ <ng-container *ngTemplateOutlet="contentTemplate() || _contentTemplate()"></ng-container>
814
+ @if (loading() || buttonProps()?.loading) {
815
+ @if (!loadingIconTemplate() && !_loadingIconTemplate()) {
816
+ @if (loadingIcon() || buttonProps()?.loadingIcon) {
817
+ <span [class]="cn(cx('loadingIcon'), 'pi-spin', loadingIcon() || buttonProps()?.loadingIcon)" [pBind]="ptm('loadingIcon')" [attr.aria-hidden]="true"></span>
860
818
  }
861
- @if (!(loadingIcon || buttonProps?.loadingIcon)) {
819
+ @if (!(loadingIcon() || buttonProps()?.loadingIcon)) {
862
820
  <svg data-p-icon="spinner" [class]="cn(cx('loadingIcon'), cx('spinnerIcon'))" [pBind]="ptm('loadingIcon')" [spin]="true" [attr.aria-hidden]="true" />
863
821
  }
864
822
  }
865
- @if (loadingIconTemplate() || _loadingIconTemplate) {
866
- <ng-template *ngTemplateOutlet="loadingIconTemplate() || _loadingIconTemplate; context: { class: cx('loadingIcon'), pt: ptm('loadingIcon') }"></ng-template>
823
+ @if (loadingIconTemplate() || _loadingIconTemplate()) {
824
+ <ng-template *ngTemplateOutlet="loadingIconTemplate() || _loadingIconTemplate(); context: { class: cx('loadingIcon'), pt: ptm('loadingIcon') }"></ng-template>
867
825
  }
868
826
  }
869
- @if (!(loading || buttonProps?.loading)) {
870
- @if ((icon || buttonProps?.icon) && !iconTemplate() && !_iconTemplate) {
871
- <span [class]="cn(cx('icon'), icon || buttonProps?.icon)" [pBind]="ptm('icon')" [attr.data-p]="dataIconP"></span>
827
+ @if (!(loading() || buttonProps()?.loading)) {
828
+ @if ((icon() || buttonProps()?.icon) && !iconTemplate() && !_iconTemplate()) {
829
+ <span [class]="cn(cx('icon'), icon() || buttonProps()?.icon)" [pBind]="ptm('icon')" [attr.data-p]="dataIconP()"></span>
872
830
  }
873
- @if (!icon && (iconTemplate() || _iconTemplate)) {
874
- <ng-template *ngTemplateOutlet="iconTemplate() || _iconTemplate; context: { class: cx('icon'), pt: ptm('icon') }"></ng-template>
831
+ @if (!icon() && (iconTemplate() || _iconTemplate())) {
832
+ <ng-template *ngTemplateOutlet="iconTemplate() || _iconTemplate(); context: { class: cx('icon'), pt: ptm('icon') }"></ng-template>
875
833
  }
876
834
  }
877
- @if (!contentTemplate() && !_contentTemplate && (label || buttonProps?.label)) {
878
- <span [class]="cx('label')" [attr.aria-hidden]="(icon || buttonProps?.icon) && !(label || buttonProps?.label)" [pBind]="ptm('label')" [attr.data-p]="dataLabelP">{{ label || buttonProps?.label }}</span>
835
+ @if (!contentTemplate() && !_contentTemplate() && (label() || buttonProps()?.label)) {
836
+ <span [class]="cx('label')" [attr.aria-hidden]="(icon() || buttonProps()?.icon) && !(label() || buttonProps()?.label)" [pBind]="ptm('label')" [attr.data-p]="dataLabelP()">{{ label() || buttonProps()?.label }}</span>
879
837
  }
880
- @if (!contentTemplate() && !_contentTemplate && (badge || buttonProps?.badge)) {
881
- <p-badge [value]="badge || buttonProps?.badge" [severity]="badgeSeverity || buttonProps?.badgeSeverity" [pt]="ptm('pcBadge')" [unstyled]="unstyled()"></p-badge>
838
+ @if (!contentTemplate() && !_contentTemplate() && (badge() || buttonProps()?.badge)) {
839
+ <p-badge [value]="badge() || buttonProps()?.badge" [severity]="badgeSeverity() || buttonProps()?.badgeSeverity" [pt]="ptm('pcBadge')" [unstyled]="unstyled()"></p-badge>
882
840
  }
883
841
  </button>
884
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: Ripple, selector: "[pRipple]" }, { kind: "directive", type: AutoFocus, selector: "[pAutoFocus]", inputs: ["pAutoFocus"] }, { kind: "component", type: SpinnerIcon, selector: "[data-p-icon=\"spinner\"]" }, { kind: "ngmodule", type: BadgeModule }, { kind: "component", type: i3.Badge, selector: "p-badge", inputs: ["styleClass", "badgeSize", "size", "severity", "value", "badgeDisabled"] }, { kind: "ngmodule", type: SharedModule }, { kind: "directive", type: Bind, selector: "[pBind]", inputs: ["pBind"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
842
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: Ripple, selector: "[pRipple]" }, { kind: "directive", type: AutoFocus, selector: "[pAutoFocus]", inputs: ["pAutoFocus"] }, { kind: "component", type: SpinnerIcon, selector: "[data-p-icon=\"spinner\"]" }, { kind: "ngmodule", type: BadgeModule }, { kind: "component", type: i3.Badge, selector: "p-badge", inputs: ["badgeSize", "size", "severity", "value", "badgeDisabled"] }, { kind: "ngmodule", type: SharedModule }, { kind: "directive", type: Bind, selector: "[pBind]", inputs: ["pBind"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
885
843
  }
886
844
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: Button, decorators: [{
887
845
  type: Component,
888
846
  args: [{
889
847
  selector: 'p-button',
890
- standalone: true,
891
848
  imports: [CommonModule, Ripple, AutoFocus, SpinnerIcon, BadgeModule, SharedModule, Bind],
892
849
  template: `
893
850
  <button
894
- [attr.type]="type || buttonProps?.type"
895
- [attr.aria-label]="ariaLabel || buttonProps?.ariaLabel"
896
- [ngStyle]="style || buttonProps?.style"
897
- [disabled]="disabled || loading || buttonProps?.disabled"
898
- [class]="cn(cx('root'), styleClass, buttonProps?.styleClass)"
851
+ [attr.type]="type() || buttonProps()?.type"
852
+ [attr.aria-label]="ariaLabel() || buttonProps()?.ariaLabel"
853
+ [ngStyle]="style() || buttonProps()?.style"
854
+ [disabled]="disabled() || loading() || buttonProps()?.disabled"
855
+ [class]="cn(cx('root'), styleClass(), buttonProps()?.styleClass)"
899
856
  (click)="onClick.emit($event)"
900
857
  (focus)="onFocus.emit($event)"
901
858
  (blur)="onBlur.emit($event)"
902
859
  pRipple
903
- [attr.tabindex]="tabindex || buttonProps?.tabindex"
904
- [pAutoFocus]="autofocus || buttonProps?.autofocus"
860
+ [attr.tabindex]="tabindex() || buttonProps()?.tabindex"
861
+ [pAutoFocus]="autofocus() || buttonProps()?.autofocus"
905
862
  [pBind]="ptm('root')"
906
- [attr.data-p]="dataP"
907
- [attr.data-p-disabled]="disabled || loading || buttonProps?.disabled"
908
- [attr.data-p-severity]="severity || buttonProps?.severity"
863
+ [attr.data-p]="dataP()"
864
+ [attr.data-p-disabled]="disabled() || loading() || buttonProps()?.disabled"
865
+ [attr.data-p-severity]="severity() || buttonProps()?.severity"
909
866
  >
910
867
  <ng-content></ng-content>
911
- <ng-container *ngTemplateOutlet="contentTemplate() || _contentTemplate"></ng-container>
912
- @if (loading || buttonProps?.loading) {
913
- @if (!loadingIconTemplate() && !_loadingIconTemplate) {
914
- @if (loadingIcon || buttonProps?.loadingIcon) {
915
- <span [class]="cn(cx('loadingIcon'), 'pi-spin', loadingIcon || buttonProps?.loadingIcon)" [pBind]="ptm('loadingIcon')" [attr.aria-hidden]="true"></span>
868
+ <ng-container *ngTemplateOutlet="contentTemplate() || _contentTemplate()"></ng-container>
869
+ @if (loading() || buttonProps()?.loading) {
870
+ @if (!loadingIconTemplate() && !_loadingIconTemplate()) {
871
+ @if (loadingIcon() || buttonProps()?.loadingIcon) {
872
+ <span [class]="cn(cx('loadingIcon'), 'pi-spin', loadingIcon() || buttonProps()?.loadingIcon)" [pBind]="ptm('loadingIcon')" [attr.aria-hidden]="true"></span>
916
873
  }
917
- @if (!(loadingIcon || buttonProps?.loadingIcon)) {
874
+ @if (!(loadingIcon() || buttonProps()?.loadingIcon)) {
918
875
  <svg data-p-icon="spinner" [class]="cn(cx('loadingIcon'), cx('spinnerIcon'))" [pBind]="ptm('loadingIcon')" [spin]="true" [attr.aria-hidden]="true" />
919
876
  }
920
877
  }
921
- @if (loadingIconTemplate() || _loadingIconTemplate) {
922
- <ng-template *ngTemplateOutlet="loadingIconTemplate() || _loadingIconTemplate; context: { class: cx('loadingIcon'), pt: ptm('loadingIcon') }"></ng-template>
878
+ @if (loadingIconTemplate() || _loadingIconTemplate()) {
879
+ <ng-template *ngTemplateOutlet="loadingIconTemplate() || _loadingIconTemplate(); context: { class: cx('loadingIcon'), pt: ptm('loadingIcon') }"></ng-template>
923
880
  }
924
881
  }
925
- @if (!(loading || buttonProps?.loading)) {
926
- @if ((icon || buttonProps?.icon) && !iconTemplate() && !_iconTemplate) {
927
- <span [class]="cn(cx('icon'), icon || buttonProps?.icon)" [pBind]="ptm('icon')" [attr.data-p]="dataIconP"></span>
882
+ @if (!(loading() || buttonProps()?.loading)) {
883
+ @if ((icon() || buttonProps()?.icon) && !iconTemplate() && !_iconTemplate()) {
884
+ <span [class]="cn(cx('icon'), icon() || buttonProps()?.icon)" [pBind]="ptm('icon')" [attr.data-p]="dataIconP()"></span>
928
885
  }
929
- @if (!icon && (iconTemplate() || _iconTemplate)) {
930
- <ng-template *ngTemplateOutlet="iconTemplate() || _iconTemplate; context: { class: cx('icon'), pt: ptm('icon') }"></ng-template>
886
+ @if (!icon() && (iconTemplate() || _iconTemplate())) {
887
+ <ng-template *ngTemplateOutlet="iconTemplate() || _iconTemplate(); context: { class: cx('icon'), pt: ptm('icon') }"></ng-template>
931
888
  }
932
889
  }
933
- @if (!contentTemplate() && !_contentTemplate && (label || buttonProps?.label)) {
934
- <span [class]="cx('label')" [attr.aria-hidden]="(icon || buttonProps?.icon) && !(label || buttonProps?.label)" [pBind]="ptm('label')" [attr.data-p]="dataLabelP">{{ label || buttonProps?.label }}</span>
890
+ @if (!contentTemplate() && !_contentTemplate() && (label() || buttonProps()?.label)) {
891
+ <span [class]="cx('label')" [attr.aria-hidden]="(icon() || buttonProps()?.icon) && !(label() || buttonProps()?.label)" [pBind]="ptm('label')" [attr.data-p]="dataLabelP()">{{ label() || buttonProps()?.label }}</span>
935
892
  }
936
- @if (!contentTemplate() && !_contentTemplate && (badge || buttonProps?.badge)) {
937
- <p-badge [value]="badge || buttonProps?.badge" [severity]="badgeSeverity || buttonProps?.badgeSeverity" [pt]="ptm('pcBadge')" [unstyled]="unstyled()"></p-badge>
893
+ @if (!contentTemplate() && !_contentTemplate() && (badge() || buttonProps()?.badge)) {
894
+ <p-badge [value]="badge() || buttonProps()?.badge" [severity]="badgeSeverity() || buttonProps()?.badgeSeverity" [pt]="ptm('pcBadge')" [unstyled]="unstyled()"></p-badge>
938
895
  }
939
896
  </button>
940
897
  `,
@@ -943,69 +900,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
943
900
  providers: [ButtonStyle, { provide: BUTTON_INSTANCE, useExisting: Button }, { provide: PARENT_INSTANCE, useExisting: Button }],
944
901
  hostDirectives: [Bind]
945
902
  }]
946
- }], propDecorators: { hostName: [{
947
- type: Input
948
- }], type: [{
949
- type: Input
950
- }], badge: [{
951
- type: Input
952
- }], disabled: [{
953
- type: Input,
954
- args: [{ transform: booleanAttribute }]
955
- }], raised: [{
956
- type: Input,
957
- args: [{ transform: booleanAttribute }]
958
- }], rounded: [{
959
- type: Input,
960
- args: [{ transform: booleanAttribute }]
961
- }], text: [{
962
- type: Input,
963
- args: [{ transform: booleanAttribute }]
964
- }], plain: [{
965
- type: Input,
966
- args: [{ transform: booleanAttribute }]
967
- }], outlined: [{
968
- type: Input,
969
- args: [{ transform: booleanAttribute }]
970
- }], link: [{
971
- type: Input,
972
- args: [{ transform: booleanAttribute }]
973
- }], tabindex: [{
974
- type: Input,
975
- args: [{ transform: numberAttribute }]
976
- }], size: [{
977
- type: Input
978
- }], variant: [{
979
- type: Input
980
- }], style: [{
981
- type: Input
982
- }], styleClass: [{
983
- type: Input
984
- }], badgeClass: [{
985
- type: Input
986
- }], badgeSeverity: [{
987
- type: Input
988
- }], ariaLabel: [{
989
- type: Input
990
- }], autofocus: [{
991
- type: Input,
992
- args: [{ transform: booleanAttribute }]
993
- }], iconPos: [{
994
- type: Input
995
- }], icon: [{
996
- type: Input
997
- }], label: [{
998
- type: Input
999
- }], loading: [{
1000
- type: Input,
1001
- args: [{ transform: booleanAttribute }]
1002
- }], loadingIcon: [{
1003
- type: Input
1004
- }], severity: [{
1005
- type: Input
1006
- }], buttonProps: [{
1007
- type: Input
1008
- }], fluid: [{ type: i0.Input, args: [{ isSignal: true, alias: "fluid", required: false }] }], onClick: [{ type: i0.Output, args: ["onClick"] }], onFocus: [{ type: i0.Output, args: ["onFocus"] }], onBlur: [{ type: i0.Output, args: ["onBlur"] }], contentTemplate: [{ type: i0.ContentChild, args: ['content', { isSignal: true }] }], loadingIconTemplate: [{ type: i0.ContentChild, args: ['loadingicon', { isSignal: true }] }], iconTemplate: [{ type: i0.ContentChild, args: ['icon', { isSignal: true }] }], templates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => PrimeTemplate), { isSignal: true }] }] } });
903
+ }], ctorParameters: () => [], propDecorators: { hostName: [{ type: i0.Input, args: [{ isSignal: true, alias: "hostName", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], badge: [{ type: i0.Input, args: [{ isSignal: true, alias: "badge", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], raised: [{ type: i0.Input, args: [{ isSignal: true, alias: "raised", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], plain: [{ type: i0.Input, args: [{ isSignal: true, alias: "plain", required: false }] }], outlined: [{ type: i0.Input, args: [{ isSignal: true, alias: "outlined", required: false }] }], link: [{ type: i0.Input, args: [{ isSignal: true, alias: "link", required: false }] }], tabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }], styleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "styleClass", required: false }] }], badgeSeverity: [{ type: i0.Input, args: [{ isSignal: true, alias: "badgeSeverity", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], autofocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autofocus", required: false }] }], iconPos: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconPos", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], loadingIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingIcon", required: false }] }], severity: [{ type: i0.Input, args: [{ isSignal: true, alias: "severity", required: false }] }], buttonProps: [{ type: i0.Input, args: [{ isSignal: true, alias: "buttonProps", required: false }] }], fluid: [{ type: i0.Input, args: [{ isSignal: true, alias: "fluid", required: false }] }], onClick: [{ type: i0.Output, args: ["onClick"] }], onFocus: [{ type: i0.Output, args: ["onFocus"] }], onBlur: [{ type: i0.Output, args: ["onBlur"] }], contentTemplate: [{ type: i0.ContentChild, args: ['content', { isSignal: true }] }], loadingIconTemplate: [{ type: i0.ContentChild, args: ['loadingicon', { isSignal: true }] }], iconTemplate: [{ type: i0.ContentChild, args: ['icon', { isSignal: true }] }], templates: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => PrimeTemplate), { isSignal: true }] }] } });
1009
904
  class ButtonModule {
1010
905
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: ButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1011
906
  static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.2.1", ngImport: i0, type: ButtonModule, imports: [CommonModule, ButtonDirective, Button, SharedModule, ButtonLabel, ButtonIcon], exports: [ButtonDirective, Button, ButtonLabel, ButtonIcon, SharedModule] });