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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (265) hide show
  1. package/fesm2022/exhaustive-ui-core-accordion.mjs +51 -78
  2. package/fesm2022/exhaustive-ui-core-accordion.mjs.map +1 -1
  3. package/fesm2022/exhaustive-ui-core-animateonscroll.mjs +72 -73
  4. package/fesm2022/exhaustive-ui-core-animateonscroll.mjs.map +1 -1
  5. package/fesm2022/exhaustive-ui-core-api.mjs +6 -13
  6. package/fesm2022/exhaustive-ui-core-api.mjs.map +1 -1
  7. package/fesm2022/exhaustive-ui-core-autocomplete.mjs +485 -683
  8. package/fesm2022/exhaustive-ui-core-autocomplete.mjs.map +1 -1
  9. package/fesm2022/exhaustive-ui-core-autofocus.mjs +21 -31
  10. package/fesm2022/exhaustive-ui-core-autofocus.mjs.map +1 -1
  11. package/fesm2022/exhaustive-ui-core-avatar.mjs +47 -63
  12. package/fesm2022/exhaustive-ui-core-avatar.mjs.map +1 -1
  13. package/fesm2022/exhaustive-ui-core-badge.mjs +88 -115
  14. package/fesm2022/exhaustive-ui-core-badge.mjs.map +1 -1
  15. package/fesm2022/exhaustive-ui-core-blockui.mjs +58 -91
  16. package/fesm2022/exhaustive-ui-core-blockui.mjs.map +1 -1
  17. package/fesm2022/exhaustive-ui-core-breadcrumb.mjs +155 -169
  18. package/fesm2022/exhaustive-ui-core-breadcrumb.mjs.map +1 -1
  19. package/fesm2022/exhaustive-ui-core-button.mjs +280 -385
  20. package/fesm2022/exhaustive-ui-core-button.mjs.map +1 -1
  21. package/fesm2022/exhaustive-ui-core-carousel.mjs +379 -451
  22. package/fesm2022/exhaustive-ui-core-carousel.mjs.map +1 -1
  23. package/fesm2022/exhaustive-ui-core-cascadeselect.mjs +388 -507
  24. package/fesm2022/exhaustive-ui-core-cascadeselect.mjs.map +1 -1
  25. package/fesm2022/exhaustive-ui-core-chart.mjs +75 -91
  26. package/fesm2022/exhaustive-ui-core-chart.mjs.map +1 -1
  27. package/fesm2022/exhaustive-ui-core-checkbox.mjs +109 -160
  28. package/fesm2022/exhaustive-ui-core-checkbox.mjs.map +1 -1
  29. package/fesm2022/exhaustive-ui-core-chip.mjs +98 -137
  30. package/fesm2022/exhaustive-ui-core-chip.mjs.map +1 -1
  31. package/fesm2022/exhaustive-ui-core-colorpicker.mjs +123 -190
  32. package/fesm2022/exhaustive-ui-core-colorpicker.mjs.map +1 -1
  33. package/fesm2022/exhaustive-ui-core-confirmdialog.mjs +157 -332
  34. package/fesm2022/exhaustive-ui-core-confirmdialog.mjs.map +1 -1
  35. package/fesm2022/exhaustive-ui-core-confirmpopup.mjs +187 -210
  36. package/fesm2022/exhaustive-ui-core-confirmpopup.mjs.map +1 -1
  37. package/fesm2022/exhaustive-ui-core-contextmenu.mjs +315 -361
  38. package/fesm2022/exhaustive-ui-core-contextmenu.mjs.map +1 -1
  39. package/fesm2022/exhaustive-ui-core-dataview.mjs +225 -272
  40. package/fesm2022/exhaustive-ui-core-dataview.mjs.map +1 -1
  41. package/fesm2022/exhaustive-ui-core-datepicker.mjs +1012 -1157
  42. package/fesm2022/exhaustive-ui-core-datepicker.mjs.map +1 -1
  43. package/fesm2022/exhaustive-ui-core-dialog.mjs +370 -507
  44. package/fesm2022/exhaustive-ui-core-dialog.mjs.map +1 -1
  45. package/fesm2022/exhaustive-ui-core-dock.mjs +87 -115
  46. package/fesm2022/exhaustive-ui-core-dock.mjs.map +1 -1
  47. package/fesm2022/exhaustive-ui-core-dragdrop.mjs +98 -105
  48. package/fesm2022/exhaustive-ui-core-dragdrop.mjs.map +1 -1
  49. package/fesm2022/exhaustive-ui-core-drawer.mjs +174 -235
  50. package/fesm2022/exhaustive-ui-core-drawer.mjs.map +1 -1
  51. package/fesm2022/exhaustive-ui-core-dynamicdialog.mjs +42 -280
  52. package/fesm2022/exhaustive-ui-core-dynamicdialog.mjs.map +1 -1
  53. package/fesm2022/exhaustive-ui-core-editor.mjs +109 -121
  54. package/fesm2022/exhaustive-ui-core-editor.mjs.map +1 -1
  55. package/fesm2022/exhaustive-ui-core-fieldset.mjs +90 -132
  56. package/fesm2022/exhaustive-ui-core-fieldset.mjs.map +1 -1
  57. package/fesm2022/exhaustive-ui-core-fileupload.mjs +486 -541
  58. package/fesm2022/exhaustive-ui-core-fileupload.mjs.map +1 -1
  59. package/fesm2022/exhaustive-ui-core-floatlabel.mjs +13 -16
  60. package/fesm2022/exhaustive-ui-core-floatlabel.mjs.map +1 -1
  61. package/fesm2022/exhaustive-ui-core-focustrap.mjs +44 -40
  62. package/fesm2022/exhaustive-ui-core-focustrap.mjs.map +1 -1
  63. package/fesm2022/exhaustive-ui-core-galleria.mjs +642 -853
  64. package/fesm2022/exhaustive-ui-core-galleria.mjs.map +1 -1
  65. package/fesm2022/exhaustive-ui-core-iconfield.mjs +15 -27
  66. package/fesm2022/exhaustive-ui-core-iconfield.mjs.map +1 -1
  67. package/fesm2022/exhaustive-ui-core-icons-baseicon.mjs +8 -13
  68. package/fesm2022/exhaustive-ui-core-icons-baseicon.mjs.map +1 -1
  69. package/fesm2022/exhaustive-ui-core-image.mjs +209 -251
  70. package/fesm2022/exhaustive-ui-core-image.mjs.map +1 -1
  71. package/fesm2022/exhaustive-ui-core-imagecompare.mjs +39 -48
  72. package/fesm2022/exhaustive-ui-core-imagecompare.mjs.map +1 -1
  73. package/fesm2022/exhaustive-ui-core-inplace.mjs +64 -98
  74. package/fesm2022/exhaustive-ui-core-inplace.mjs.map +1 -1
  75. package/fesm2022/exhaustive-ui-core-inputgroup.mjs +10 -20
  76. package/fesm2022/exhaustive-ui-core-inputgroup.mjs.map +1 -1
  77. package/fesm2022/exhaustive-ui-core-inputgroupaddon.mjs +15 -24
  78. package/fesm2022/exhaustive-ui-core-inputgroupaddon.mjs.map +1 -1
  79. package/fesm2022/exhaustive-ui-core-inputicon.mjs +11 -22
  80. package/fesm2022/exhaustive-ui-core-inputicon.mjs.map +1 -1
  81. package/fesm2022/exhaustive-ui-core-inputmask.mjs +423 -392
  82. package/fesm2022/exhaustive-ui-core-inputmask.mjs.map +1 -1
  83. package/fesm2022/exhaustive-ui-core-inputnumber.mjs +397 -469
  84. package/fesm2022/exhaustive-ui-core-inputnumber.mjs.map +1 -1
  85. package/fesm2022/exhaustive-ui-core-inputotp.mjs +75 -95
  86. package/fesm2022/exhaustive-ui-core-inputotp.mjs.map +1 -1
  87. package/fesm2022/exhaustive-ui-core-inputtext.mjs +27 -36
  88. package/fesm2022/exhaustive-ui-core-inputtext.mjs.map +1 -1
  89. package/fesm2022/exhaustive-ui-core-keyfilter.mjs +29 -46
  90. package/fesm2022/exhaustive-ui-core-keyfilter.mjs.map +1 -1
  91. package/fesm2022/exhaustive-ui-core-knob.mjs +140 -187
  92. package/fesm2022/exhaustive-ui-core-knob.mjs.map +1 -1
  93. package/fesm2022/exhaustive-ui-core-listbox.mjs +365 -546
  94. package/fesm2022/exhaustive-ui-core-listbox.mjs.map +1 -1
  95. package/fesm2022/exhaustive-ui-core-megamenu.mjs +320 -371
  96. package/fesm2022/exhaustive-ui-core-megamenu.mjs.map +1 -1
  97. package/fesm2022/exhaustive-ui-core-menu.mjs +298 -348
  98. package/fesm2022/exhaustive-ui-core-menu.mjs.map +1 -1
  99. package/fesm2022/exhaustive-ui-core-menubar.mjs +277 -372
  100. package/fesm2022/exhaustive-ui-core-menubar.mjs.map +1 -1
  101. package/fesm2022/exhaustive-ui-core-metergroup.mjs +138 -166
  102. package/fesm2022/exhaustive-ui-core-metergroup.mjs.map +1 -1
  103. package/fesm2022/exhaustive-ui-core-multiselect.mjs +647 -835
  104. package/fesm2022/exhaustive-ui-core-multiselect.mjs.map +1 -1
  105. package/fesm2022/exhaustive-ui-core-orderlist.mjs +337 -409
  106. package/fesm2022/exhaustive-ui-core-orderlist.mjs.map +1 -1
  107. package/fesm2022/exhaustive-ui-core-organizationchart.mjs +114 -175
  108. package/fesm2022/exhaustive-ui-core-organizationchart.mjs.map +1 -1
  109. package/fesm2022/exhaustive-ui-core-overlaybadge.mjs +22 -47
  110. package/fesm2022/exhaustive-ui-core-overlaybadge.mjs.map +1 -1
  111. package/fesm2022/exhaustive-ui-core-paginator.mjs +232 -320
  112. package/fesm2022/exhaustive-ui-core-paginator.mjs.map +1 -1
  113. package/fesm2022/exhaustive-ui-core-panel.mjs +114 -174
  114. package/fesm2022/exhaustive-ui-core-panel.mjs.map +1 -1
  115. package/fesm2022/exhaustive-ui-core-panelmenu.mjs +171 -282
  116. package/fesm2022/exhaustive-ui-core-panelmenu.mjs.map +1 -1
  117. package/fesm2022/exhaustive-ui-core-password.mjs +317 -377
  118. package/fesm2022/exhaustive-ui-core-password.mjs.map +1 -1
  119. package/fesm2022/exhaustive-ui-core-picklist.mjs +557 -655
  120. package/fesm2022/exhaustive-ui-core-picklist.mjs.map +1 -1
  121. package/fesm2022/exhaustive-ui-core-popover.mjs +154 -181
  122. package/fesm2022/exhaustive-ui-core-popover.mjs.map +1 -1
  123. package/fesm2022/exhaustive-ui-core-rating.mjs +87 -119
  124. package/fesm2022/exhaustive-ui-core-rating.mjs.map +1 -1
  125. package/fesm2022/exhaustive-ui-core-scroller.mjs +465 -596
  126. package/fesm2022/exhaustive-ui-core-scroller.mjs.map +1 -1
  127. package/fesm2022/exhaustive-ui-core-scrollpanel.mjs +147 -155
  128. package/fesm2022/exhaustive-ui-core-scrollpanel.mjs.map +1 -1
  129. package/fesm2022/exhaustive-ui-core-scrolltop.mjs +81 -115
  130. package/fesm2022/exhaustive-ui-core-scrolltop.mjs.map +1 -1
  131. package/fesm2022/exhaustive-ui-core-select.mjs +581 -784
  132. package/fesm2022/exhaustive-ui-core-select.mjs.map +1 -1
  133. package/fesm2022/exhaustive-ui-core-selectbutton.mjs +84 -120
  134. package/fesm2022/exhaustive-ui-core-selectbutton.mjs.map +1 -1
  135. package/fesm2022/exhaustive-ui-core-slider.mjs +322 -352
  136. package/fesm2022/exhaustive-ui-core-slider.mjs.map +1 -1
  137. package/fesm2022/exhaustive-ui-core-speeddial.mjs +209 -268
  138. package/fesm2022/exhaustive-ui-core-speeddial.mjs.map +1 -1
  139. package/fesm2022/exhaustive-ui-core-splitbutton.mjs +153 -249
  140. package/fesm2022/exhaustive-ui-core-splitbutton.mjs.map +1 -1
  141. package/fesm2022/exhaustive-ui-core-splitter.mjs +221 -237
  142. package/fesm2022/exhaustive-ui-core-splitter.mjs.map +1 -1
  143. package/fesm2022/exhaustive-ui-core-steps.mjs +56 -72
  144. package/fesm2022/exhaustive-ui-core-steps.mjs.map +1 -1
  145. package/fesm2022/exhaustive-ui-core-styleclass.mjs +145 -146
  146. package/fesm2022/exhaustive-ui-core-styleclass.mjs.map +1 -1
  147. package/fesm2022/exhaustive-ui-core-table.mjs +2213 -2543
  148. package/fesm2022/exhaustive-ui-core-table.mjs.map +1 -1
  149. package/fesm2022/exhaustive-ui-core-terminal.mjs +50 -67
  150. package/fesm2022/exhaustive-ui-core-terminal.mjs.map +1 -1
  151. package/fesm2022/exhaustive-ui-core-textarea.mjs +23 -36
  152. package/fesm2022/exhaustive-ui-core-textarea.mjs.map +1 -1
  153. package/fesm2022/exhaustive-ui-core-tieredmenu.mjs +318 -394
  154. package/fesm2022/exhaustive-ui-core-tieredmenu.mjs.map +1 -1
  155. package/fesm2022/exhaustive-ui-core-timeline.mjs +56 -74
  156. package/fesm2022/exhaustive-ui-core-timeline.mjs.map +1 -1
  157. package/fesm2022/exhaustive-ui-core-togglebutton.mjs +86 -129
  158. package/fesm2022/exhaustive-ui-core-togglebutton.mjs.map +1 -1
  159. package/fesm2022/exhaustive-ui-core-toggleswitch.mjs +57 -94
  160. package/fesm2022/exhaustive-ui-core-toggleswitch.mjs.map +1 -1
  161. package/fesm2022/exhaustive-ui-core-toolbar.mjs +36 -55
  162. package/fesm2022/exhaustive-ui-core-toolbar.mjs.map +1 -1
  163. package/fesm2022/exhaustive-ui-core-tooltip.mjs +264 -343
  164. package/fesm2022/exhaustive-ui-core-tooltip.mjs.map +1 -1
  165. package/fesm2022/exhaustive-ui-core-tree.mjs +508 -639
  166. package/fesm2022/exhaustive-ui-core-tree.mjs.map +1 -1
  167. package/fesm2022/exhaustive-ui-core-treeselect.mjs +327 -421
  168. package/fesm2022/exhaustive-ui-core-treeselect.mjs.map +1 -1
  169. package/fesm2022/exhaustive-ui-core-treetable.mjs +1267 -1473
  170. package/fesm2022/exhaustive-ui-core-treetable.mjs.map +1 -1
  171. package/package.json +5 -5
  172. package/schematics/migrations/remove-dead-inputs/migration.js +213 -7
  173. package/schematics/migrations/renamed-inputs/migration.js +97 -0
  174. package/schematics/migrations/styleclass-to-class/migration.js +92 -1
  175. package/schematics/migrations.json +7 -2
  176. package/schematics/utils/removed-inputs.js +0 -0
  177. package/schematics/utils/renamed-inputs.js +175 -0
  178. package/schematics/utils/styleclass.js +24 -8
  179. package/schematics/utils/versions.json +8 -8
  180. package/types/exhaustive-ui-core-accordion.d.ts +8 -24
  181. package/types/exhaustive-ui-core-animateonscroll.d.ts +19 -21
  182. package/types/exhaustive-ui-core-api.d.ts +2 -3
  183. package/types/exhaustive-ui-core-autocomplete.d.ts +103 -176
  184. package/types/exhaustive-ui-core-autofocus.d.ts +4 -7
  185. package/types/exhaustive-ui-core-avatar.d.ts +18 -25
  186. package/types/exhaustive-ui-core-badge.d.ts +13 -27
  187. package/types/exhaustive-ui-core-blockui.d.ts +18 -30
  188. package/types/exhaustive-ui-core-breadcrumb.d.ts +21 -22
  189. package/types/exhaustive-ui-core-button.d.ts +57 -89
  190. package/types/exhaustive-ui-core-carousel.d.ts +56 -82
  191. package/types/exhaustive-ui-core-cascadeselect.d.ts +77 -111
  192. package/types/exhaustive-ui-core-chart.d.ts +21 -29
  193. package/types/exhaustive-ui-core-checkbox.d.ts +25 -39
  194. package/types/exhaustive-ui-core-chip.d.ts +31 -38
  195. package/types/exhaustive-ui-core-colorpicker.d.ts +23 -57
  196. package/types/exhaustive-ui-core-confirmdialog.d.ts +39 -109
  197. package/types/exhaustive-ui-core-confirmpopup.d.ts +24 -43
  198. package/types/exhaustive-ui-core-contextmenu.d.ts +54 -71
  199. package/types/exhaustive-ui-core-dataview.d.ts +42 -65
  200. package/types/exhaustive-ui-core-datepicker.d.ts +109 -191
  201. package/types/exhaustive-ui-core-dialog.d.ts +73 -123
  202. package/types/exhaustive-ui-core-dock.d.ts +16 -25
  203. package/types/exhaustive-ui-core-dragdrop.d.ts +32 -36
  204. package/types/exhaustive-ui-core-drawer.d.ts +32 -64
  205. package/types/exhaustive-ui-core-dynamicdialog.d.ts +9 -54
  206. package/types/exhaustive-ui-core-editor.d.ts +15 -25
  207. package/types/exhaustive-ui-core-fieldset.d.ts +15 -35
  208. package/types/exhaustive-ui-core-fileupload.d.ts +69 -95
  209. package/types/exhaustive-ui-core-floatlabel.d.ts +4 -6
  210. package/types/exhaustive-ui-core-focustrap.d.ts +5 -10
  211. package/types/exhaustive-ui-core-galleria.d.ts +124 -194
  212. package/types/exhaustive-ui-core-iconfield.d.ts +5 -13
  213. package/types/exhaustive-ui-core-icons-baseicon.d.ts +4 -5
  214. package/types/exhaustive-ui-core-image.d.ts +35 -68
  215. package/types/exhaustive-ui-core-imagecompare.d.ts +19 -20
  216. package/types/exhaustive-ui-core-inplace.d.ts +30 -42
  217. package/types/exhaustive-ui-core-inputgroup.d.ts +2 -9
  218. package/types/exhaustive-ui-core-inputgroupaddon.d.ts +6 -10
  219. package/types/exhaustive-ui-core-inputicon.d.ts +4 -11
  220. package/types/exhaustive-ui-core-inputmask.d.ts +53 -66
  221. package/types/exhaustive-ui-core-inputnumber.d.ts +62 -84
  222. package/types/exhaustive-ui-core-inputotp.d.ts +16 -20
  223. package/types/exhaustive-ui-core-inputtext.d.ts +5 -8
  224. package/types/exhaustive-ui-core-keyfilter.d.ts +11 -15
  225. package/types/exhaustive-ui-core-knob.d.ts +45 -60
  226. package/types/exhaustive-ui-core-listbox.d.ts +90 -126
  227. package/types/exhaustive-ui-core-megamenu.d.ts +45 -66
  228. package/types/exhaustive-ui-core-menu.d.ts +33 -53
  229. package/types/exhaustive-ui-core-menubar.d.ts +38 -85
  230. package/types/exhaustive-ui-core-metergroup.d.ts +39 -48
  231. package/types/exhaustive-ui-core-multiselect.d.ts +166 -219
  232. package/types/exhaustive-ui-core-orderlist.d.ts +58 -81
  233. package/types/exhaustive-ui-core-organizationchart.d.ts +32 -67
  234. package/types/exhaustive-ui-core-overlaybadge.d.ts +10 -20
  235. package/types/exhaustive-ui-core-paginator.d.ts +41 -69
  236. package/types/exhaustive-ui-core-panel.d.ts +18 -45
  237. package/types/exhaustive-ui-core-panelmenu.d.ts +31 -76
  238. package/types/exhaustive-ui-core-password.d.ts +56 -93
  239. package/types/exhaustive-ui-core-picklist.d.ts +107 -121
  240. package/types/exhaustive-ui-core-popover.d.ts +23 -47
  241. package/types/exhaustive-ui-core-rating.d.ts +18 -26
  242. package/types/exhaustive-ui-core-scroller.d.ts +90 -120
  243. package/types/exhaustive-ui-core-scrollpanel.d.ts +35 -46
  244. package/types/exhaustive-ui-core-scrolltop.d.ts +28 -45
  245. package/types/exhaustive-ui-core-select.d.ts +137 -188
  246. package/types/exhaustive-ui-core-selectbutton.d.ts +35 -44
  247. package/types/exhaustive-ui-core-slider.d.ts +52 -67
  248. package/types/exhaustive-ui-core-speeddial.d.ts +40 -56
  249. package/types/exhaustive-ui-core-splitbutton.d.ts +31 -71
  250. package/types/exhaustive-ui-core-splitter.d.ts +47 -59
  251. package/types/exhaustive-ui-core-steps.d.ts +24 -31
  252. package/types/exhaustive-ui-core-styleclass.d.ts +27 -33
  253. package/types/exhaustive-ui-core-table.d.ts +349 -453
  254. package/types/exhaustive-ui-core-terminal.d.ts +10 -22
  255. package/types/exhaustive-ui-core-textarea.d.ts +7 -10
  256. package/types/exhaustive-ui-core-tieredmenu.d.ts +49 -84
  257. package/types/exhaustive-ui-core-timeline.d.ts +20 -28
  258. package/types/exhaustive-ui-core-togglebutton.d.ts +32 -48
  259. package/types/exhaustive-ui-core-toggleswitch.d.ts +26 -37
  260. package/types/exhaustive-ui-core-toolbar.d.ts +17 -25
  261. package/types/exhaustive-ui-core-tooltip.d.ts +53 -88
  262. package/types/exhaustive-ui-core-tree.d.ts +82 -119
  263. package/types/exhaustive-ui-core-treeselect.d.ts +63 -92
  264. package/types/exhaustive-ui-core-treetable.d.ts +203 -280
  265. package/types/exhaustive-ui-core-types-chip.d.ts +1 -1
@@ -1,6 +1,6 @@
1
- import { DOCUMENT, isPlatformBrowser } from '@angular/common';
1
+ import { isPlatformBrowser } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { inject, PLATFORM_ID, ElementRef, Input, Directive, NgModule } from '@angular/core';
3
+ import { input, signal, inject, ElementRef, afterEveryRender, Directive, NgModule } from '@angular/core';
4
4
  import { BaseComponent } from '@exhaustive-ui/core/basecomponent';
5
5
  import { DomHandler } from '@exhaustive-ui/core/dom';
6
6
 
@@ -13,30 +13,20 @@ class AutoFocus extends BaseComponent {
13
13
  * When present, it specifies that the component should automatically get focus on load.
14
14
  * @group Props
15
15
  */
16
- autofocus = false;
17
- focused = false;
18
- platformId = inject(PLATFORM_ID);
19
- document = inject(DOCUMENT);
16
+ autofocus = input(false, { ...(ngDevMode ? { debugName: "autofocus" } : /* istanbul ignore next */ {}), alias: 'pAutoFocus' });
17
+ focused = signal(false, /* @ts-ignore */
18
+ ...(ngDevMode ? [{ debugName: "focused" }] : /* istanbul ignore next */ []));
20
19
  host = inject(ElementRef);
21
- onAfterContentChecked() {
22
- // This sets the `attr.autofocus` which is different than the Input `autofocus` attribute.
23
- if (this.autofocus === false) {
24
- this.host.nativeElement.removeAttribute('autofocus');
25
- }
26
- else {
27
- this.host.nativeElement.setAttribute('autofocus', true);
28
- }
29
- if (!this.focused) {
30
- this.autoFocus();
31
- }
32
- }
33
- onAfterViewChecked() {
34
- if (!this.focused) {
35
- this.autoFocus();
36
- }
20
+ constructor() {
21
+ super();
22
+ afterEveryRender(() => {
23
+ if (!this.focused()) {
24
+ this.autoFocus();
25
+ }
26
+ });
37
27
  }
38
28
  autoFocus() {
39
- if (isPlatformBrowser(this.platformId) && this.autofocus) {
29
+ if (isPlatformBrowser(this.platformId) && this.autofocus()) {
40
30
  setTimeout(() => {
41
31
  const focusableElements = DomHandler.getFocusableElements(this.host?.nativeElement);
42
32
  if (focusableElements.length === 0) {
@@ -45,23 +35,23 @@ class AutoFocus extends BaseComponent {
45
35
  if (focusableElements.length > 0) {
46
36
  focusableElements[0].focus();
47
37
  }
48
- this.focused = true;
38
+ this.focused.set(true);
49
39
  });
50
40
  }
51
41
  }
52
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: AutoFocus, deps: null, target: i0.ɵɵFactoryTarget.Directive });
53
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.2.1", type: AutoFocus, isStandalone: true, selector: "[pAutoFocus]", inputs: { autofocus: ["pAutoFocus", "autofocus"] }, usesInheritance: true, ngImport: i0 });
42
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: AutoFocus, deps: [], target: i0.ɵɵFactoryTarget.Directive });
43
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.2.1", type: AutoFocus, isStandalone: true, selector: "[pAutoFocus]", inputs: { autofocus: { classPropertyName: "autofocus", publicName: "pAutoFocus", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.autofocus": "autofocus() === false ? null : true" } }, usesInheritance: true, ngImport: i0 });
54
44
  }
55
45
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: AutoFocus, decorators: [{
56
46
  type: Directive,
57
47
  args: [{
58
48
  selector: '[pAutoFocus]',
59
- standalone: true
49
+ host: {
50
+ // This sets the `attr.autofocus` which is different than the Input `autofocus` attribute.
51
+ '[attr.autofocus]': 'autofocus() === false ? null : true'
52
+ }
60
53
  }]
61
- }], propDecorators: { autofocus: [{
62
- type: Input,
63
- args: ['pAutoFocus']
64
- }] } });
54
+ }], ctorParameters: () => [], propDecorators: { autofocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "pAutoFocus", required: false }] }] } });
65
55
  class AutoFocusModule {
66
56
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: AutoFocusModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
67
57
  static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.2.1", ngImport: i0, type: AutoFocusModule, imports: [AutoFocus], exports: [AutoFocus] });
@@ -1 +1 @@
1
- {"version":3,"file":"exhaustive-ui-core-autofocus.mjs","sources":["../../src/autofocus/autofocus.ts","../../src/autofocus/exhaustive-ui-core-autofocus.ts"],"sourcesContent":["import { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport { Directive, ElementRef, inject, Input, NgModule, PLATFORM_ID } from '@angular/core';\nimport { BaseComponent } from '@exhaustive-ui/core/basecomponent';\nimport { DomHandler } from '@exhaustive-ui/core/dom';\n\n/**\n * AutoFocus manages focus on focusable element on load.\n * @group Components\n */\n@Directive({\n selector: '[pAutoFocus]',\n standalone: true\n})\nexport class AutoFocus extends BaseComponent {\n /**\n * When present, it specifies that the component should automatically get focus on load.\n * @group Props\n */\n @Input('pAutoFocus') autofocus: boolean = false;\n\n focused: boolean = false;\n\n platformId = inject(PLATFORM_ID);\n\n document: Document = inject(DOCUMENT);\n\n host: ElementRef = inject(ElementRef);\n\n onAfterContentChecked() {\n // This sets the `attr.autofocus` which is different than the Input `autofocus` attribute.\n if (this.autofocus === false) {\n this.host.nativeElement.removeAttribute('autofocus');\n } else {\n this.host.nativeElement.setAttribute('autofocus', true);\n }\n\n if (!this.focused) {\n this.autoFocus();\n }\n }\n\n onAfterViewChecked() {\n if (!this.focused) {\n this.autoFocus();\n }\n }\n\n autoFocus() {\n if (isPlatformBrowser(this.platformId) && this.autofocus) {\n setTimeout(() => {\n const focusableElements = DomHandler.getFocusableElements(this.host?.nativeElement);\n\n if (focusableElements.length === 0) {\n this.host.nativeElement.focus();\n }\n if (focusableElements.length > 0) {\n focusableElements[0].focus();\n }\n\n this.focused = true;\n });\n }\n }\n}\n\n@NgModule({\n imports: [AutoFocus],\n exports: [AutoFocus]\n})\nexport class AutoFocusModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;AAKA;;;AAGG;AAKG,MAAO,SAAU,SAAQ,aAAa,CAAA;AACxC;;;AAGG;IACkB,SAAS,GAAY,KAAK;IAE/C,OAAO,GAAY,KAAK;AAExB,IAAA,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC;AAEhC,IAAA,QAAQ,GAAa,MAAM,CAAC,QAAQ,CAAC;AAErC,IAAA,IAAI,GAAe,MAAM,CAAC,UAAU,CAAC;IAErC,qBAAqB,GAAA;;AAEjB,QAAA,IAAI,IAAI,CAAC,SAAS,KAAK,KAAK,EAAE;YAC1B,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,WAAW,CAAC;QACxD;aAAO;YACH,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC,WAAW,EAAE,IAAI,CAAC;QAC3D;AAEA,QAAA,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YACf,IAAI,CAAC,SAAS,EAAE;QACpB;IACJ;IAEA,kBAAkB,GAAA;AACd,QAAA,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YACf,IAAI,CAAC,SAAS,EAAE;QACpB;IACJ;IAEA,SAAS,GAAA;QACL,IAAI,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,IAAI,CAAC,SAAS,EAAE;YACtD,UAAU,CAAC,MAAK;AACZ,gBAAA,MAAM,iBAAiB,GAAG,UAAU,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,EAAE,aAAa,CAAC;AAEnF,gB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3,"file":"exhaustive-ui-core-autofocus.mjs","sources":["../../src/autofocus/autofocus.ts","../../src/autofocus/exhaustive-ui-core-autofocus.ts"],"sourcesContent":["import { isPlatformBrowser } from '@angular/common';\nimport { afterEveryRender, Directive, ElementRef, inject, input, NgModule, signal } from '@angular/core';\nimport { BaseComponent } from '@exhaustive-ui/core/basecomponent';\nimport { DomHandler } from '@exhaustive-ui/core/dom';\n\n/**\n * AutoFocus manages focus on focusable element on load.\n * @group Components\n */\n@Directive({\n selector: '[pAutoFocus]',\n host: {\n // This sets the `attr.autofocus` which is different than the Input `autofocus` attribute.\n '[attr.autofocus]': 'autofocus() === false ? null : true'\n }\n})\nexport class AutoFocus extends BaseComponent {\n /**\n * When present, it specifies that the component should automatically get focus on load.\n * @group Props\n */\n autofocus = input<boolean>(false, { alias: 'pAutoFocus' });\n\n focused = signal(false);\n\n host: ElementRef = inject(ElementRef);\n\n constructor() {\n super();\n afterEveryRender(() => {\n if (!this.focused()) {\n this.autoFocus();\n }\n });\n }\n\n autoFocus() {\n if (isPlatformBrowser(this.platformId) && this.autofocus()) {\n setTimeout(() => {\n const focusableElements = DomHandler.getFocusableElements(this.host?.nativeElement);\n\n if (focusableElements.length === 0) {\n this.host.nativeElement.focus();\n }\n if (focusableElements.length > 0) {\n focusableElements[0].focus();\n }\n\n this.focused.set(true);\n });\n }\n }\n}\n\n@NgModule({\n imports: [AutoFocus],\n exports: [AutoFocus]\n})\nexport class AutoFocusModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;AAKA;;;AAGG;AAQG,MAAO,SAAU,SAAQ,aAAa,CAAA;AACxC;;;AAGG;IACH,SAAS,GAAG,KAAK,CAAU,KAAK,iFAAI,KAAK,EAAE,YAAY,EAAA,CAAG;IAE1D,OAAO,GAAG,MAAM,CAAC,KAAK;gFAAC;AAEvB,IAAA,IAAI,GAAe,MAAM,CAAC,UAAU,CAAC;AAErC,IAAA,WAAA,GAAA;A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AAA,EAAA,CAAA;kBAPrB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,cAAc;AACxB,oBAAA,IAAI,EAAE;;AAEF,wBAAA,kBAAkB,EAAE;AACvB;AACJ,iBAAA;;MA2CY,eAAe,CAAA;uGAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAAf,eAAe,EAAA,OAAA,EAAA,CA1Cf,SAAS,CAAA,EAAA,OAAA,EAAA,CAAT,SAAS,CAAA,EAAA,CAAA;wGA0CT,eAAe,EAAA,CAAA;;2FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,SAAS,CAAC;oBACpB,OAAO,EAAE,CAAC,SAAS;AACtB,iBAAA;;;ACzDD;;AAEG;;;;"}
@@ -2,7 +2,7 @@ export * from '@exhaustive-ui/core/types/avatar';
2
2
  import * as i2 from '@angular/common';
3
3
  import { CommonModule } from '@angular/common';
4
4
  import * as i0 from '@angular/core';
5
- import { Injectable, InjectionToken, inject, output, Input, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
5
+ import { Injectable, inject, afterEveryRender, input, output, computed, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
6
6
  import { SharedModule } from '@exhaustive-ui/core/api';
7
7
  import { BaseComponent, PARENT_INSTANCE } from '@exhaustive-ui/core/basecomponent';
8
8
  import * as i1 from '@exhaustive-ui/core/bind';
@@ -14,10 +14,10 @@ const classes = {
14
14
  root: ({ instance }) => [
15
15
  'p-avatar p-component',
16
16
  {
17
- 'p-avatar-image': instance.image != null,
18
- 'p-avatar-circle': instance.shape === 'circle',
19
- 'p-avatar-lg': instance.size === 'large',
20
- 'p-avatar-xl': instance.size === 'xlarge'
17
+ 'p-avatar-image': instance.image() != null,
18
+ 'p-avatar-circle': instance.shape() === 'circle',
19
+ 'p-avatar-lg': instance.size() === 'large',
20
+ 'p-avatar-xl': instance.size() === 'xlarge'
21
21
  }
22
22
  ],
23
23
  label: 'p-avatar-label',
@@ -74,59 +74,59 @@ var AvatarClasses;
74
74
  AvatarClasses["xlarge"] = "p-avatar-xl";
75
75
  })(AvatarClasses || (AvatarClasses = {}));
76
76
 
77
- const AVATAR_INSTANCE = new InjectionToken('AVATAR_INSTANCE');
78
77
  /**
79
78
  * Avatar represents people using icons, labels and images.
80
79
  * @group Components
81
80
  */
82
81
  class Avatar extends BaseComponent {
83
82
  componentName = 'Avatar';
84
- $pcAvatar = inject(AVATAR_INSTANCE, { optional: true, skipSelf: true }) ?? undefined;
85
83
  bindDirectiveInstance = inject(Bind, { self: true });
86
- onAfterViewChecked() {
87
- this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root']));
84
+ constructor() {
85
+ super();
86
+ afterEveryRender(() => this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root'])));
88
87
  }
89
88
  /**
90
89
  * Defines the text to display.
91
90
  * @group Props
92
91
  */
93
- label;
92
+ label = input(/* @ts-ignore */
93
+ ...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
94
94
  /**
95
95
  * Defines the icon to display.
96
96
  * @group Props
97
97
  */
98
- icon;
98
+ icon = input(/* @ts-ignore */
99
+ ...(ngDevMode ? [undefined, { debugName: "icon" }] : /* istanbul ignore next */ []));
99
100
  /**
100
101
  * Defines the image to display.
101
102
  * @group Props
102
103
  */
103
- image;
104
+ image = input(/* @ts-ignore */
105
+ ...(ngDevMode ? [undefined, { debugName: "image" }] : /* istanbul ignore next */ []));
104
106
  /**
105
107
  * Size of the element.
106
108
  * @group Props
107
109
  */
108
- size = 'normal';
110
+ size = input('normal', /* @ts-ignore */
111
+ ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
109
112
  /**
110
113
  * Shape of the element.
111
114
  * @group Props
112
115
  */
113
- shape = 'square';
114
- /**
115
- * Class of the element.
116
- * @deprecated since v20.0.0, use `class` instead.
117
- * @group Props
118
- */
119
- styleClass;
116
+ shape = input('square', /* @ts-ignore */
117
+ ...(ngDevMode ? [{ debugName: "shape" }] : /* istanbul ignore next */ []));
120
118
  /**
121
119
  * Establishes a string value that labels the component.
122
120
  * @group Props
123
121
  */
124
- ariaLabel;
122
+ ariaLabel = input(/* @ts-ignore */
123
+ ...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
125
124
  /**
126
125
  * Establishes relationships between the component and label(s) where its value should be one or more element IDs.
127
126
  * @group Props
128
127
  */
129
- ariaLabelledBy;
128
+ ariaLabelledBy = input(/* @ts-ignore */
129
+ ...(ngDevMode ? [undefined, { debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []));
130
130
  /**
131
131
  * This event is triggered if an error occurs while loading an image file.
132
132
  * @param {Event} event - Browser event.
@@ -137,23 +137,24 @@ class Avatar extends BaseComponent {
137
137
  imageError(event) {
138
138
  this.onImageError.emit(event);
139
139
  }
140
- get dataP() {
140
+ dataP = computed(() => {
141
141
  return this.cn({
142
- [this.shape]: this.shape,
143
- [this.size]: this.size
142
+ [this.shape()]: this.shape(),
143
+ [this.size()]: this.size()
144
144
  });
145
- }
146
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: Avatar, deps: null, target: i0.ɵɵFactoryTarget.Component });
147
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: Avatar, isStandalone: true, selector: "p-avatar", inputs: { label: "label", icon: "icon", image: "image", size: "size", shape: "shape", styleClass: "styleClass", ariaLabel: "ariaLabel", ariaLabelledBy: "ariaLabelledBy" }, outputs: { onImageError: "onImageError" }, host: { properties: { "class": "cn(cx('root'), styleClass)", "attr.aria-label": "ariaLabel", "attr.aria-labelledby": "ariaLabelledBy", "attr.data-p": "dataP" } }, providers: [AvatarStyle, { provide: AVATAR_INSTANCE, useExisting: Avatar }, { provide: PARENT_INSTANCE, useExisting: Avatar }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `
145
+ }, /* @ts-ignore */
146
+ ...(ngDevMode ? [{ debugName: "dataP" }] : /* istanbul ignore next */ []));
147
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: Avatar, deps: [], target: i0.ɵɵFactoryTarget.Component });
148
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: Avatar, isStandalone: true, selector: "p-avatar", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, image: { classPropertyName: "image", publicName: "image", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, shape: { classPropertyName: "shape", publicName: "shape", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "ariaLabelledBy", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onImageError: "onImageError" }, host: { properties: { "class": "cx('root')", "attr.aria-label": "ariaLabel()", "attr.aria-labelledby": "ariaLabelledBy()", "attr.data-p": "dataP()" } }, providers: [AvatarStyle, { provide: PARENT_INSTANCE, useExisting: Avatar }], usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `
148
149
  <ng-content></ng-content>
149
- @if (label) {
150
- <span [pBind]="ptm('label')" [class]="cx('label')" [attr.data-p]="dataP">{{ label }}</span>
150
+ @if (label()) {
151
+ <span [pBind]="ptm('label')" [class]="cx('label')" [attr.data-p]="dataP()">{{ label() }}</span>
151
152
  } @else {
152
- @if (icon) {
153
- <span [pBind]="ptm('icon')" [class]="icon" [ngClass]="cx('icon')" [attr.data-p]="dataP"></span>
153
+ @if (icon()) {
154
+ <span [pBind]="ptm('icon')" [class]="icon()" [ngClass]="cx('icon')" [attr.data-p]="dataP()"></span>
154
155
  } @else {
155
- @if (image) {
156
- <img [pBind]="ptm('image')" [src]="image" (error)="imageError($event)" [attr.aria-label]="ariaLabel" [attr.data-p]="dataP" />
156
+ @if (image()) {
157
+ <img [pBind]="ptm('image')" [src]="image()" (error)="imageError($event)" [attr.aria-label]="ariaLabel()" [attr.data-p]="dataP()" />
157
158
  }
158
159
  }
159
160
  }
@@ -163,18 +164,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
163
164
  type: Component,
164
165
  args: [{
165
166
  selector: 'p-avatar',
166
- standalone: true,
167
167
  imports: [CommonModule, SharedModule, Bind],
168
168
  template: `
169
169
  <ng-content></ng-content>
170
- @if (label) {
171
- <span [pBind]="ptm('label')" [class]="cx('label')" [attr.data-p]="dataP">{{ label }}</span>
170
+ @if (label()) {
171
+ <span [pBind]="ptm('label')" [class]="cx('label')" [attr.data-p]="dataP()">{{ label() }}</span>
172
172
  } @else {
173
- @if (icon) {
174
- <span [pBind]="ptm('icon')" [class]="icon" [ngClass]="cx('icon')" [attr.data-p]="dataP"></span>
173
+ @if (icon()) {
174
+ <span [pBind]="ptm('icon')" [class]="icon()" [ngClass]="cx('icon')" [attr.data-p]="dataP()"></span>
175
175
  } @else {
176
- @if (image) {
177
- <img [pBind]="ptm('image')" [src]="image" (error)="imageError($event)" [attr.aria-label]="ariaLabel" [attr.data-p]="dataP" />
176
+ @if (image()) {
177
+ <img [pBind]="ptm('image')" [src]="image()" (error)="imageError($event)" [attr.aria-label]="ariaLabel()" [attr.data-p]="dataP()" />
178
178
  }
179
179
  }
180
180
  }
@@ -182,31 +182,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImpor
182
182
  changeDetection: ChangeDetectionStrategy.OnPush,
183
183
  encapsulation: ViewEncapsulation.None,
184
184
  host: {
185
- '[class]': "cn(cx('root'), styleClass)",
186
- '[attr.aria-label]': 'ariaLabel',
187
- '[attr.aria-labelledby]': 'ariaLabelledBy',
188
- '[attr.data-p]': 'dataP'
185
+ '[class]': "cx('root')",
186
+ '[attr.aria-label]': 'ariaLabel()',
187
+ '[attr.aria-labelledby]': 'ariaLabelledBy()',
188
+ '[attr.data-p]': 'dataP()'
189
189
  },
190
- providers: [AvatarStyle, { provide: AVATAR_INSTANCE, useExisting: Avatar }, { provide: PARENT_INSTANCE, useExisting: Avatar }],
190
+ providers: [AvatarStyle, { provide: PARENT_INSTANCE, useExisting: Avatar }],
191
191
  hostDirectives: [Bind]
192
192
  }]
193
- }], propDecorators: { label: [{
194
- type: Input
195
- }], icon: [{
196
- type: Input
197
- }], image: [{
198
- type: Input
199
- }], size: [{
200
- type: Input
201
- }], shape: [{
202
- type: Input
203
- }], styleClass: [{
204
- type: Input
205
- }], ariaLabel: [{
206
- type: Input
207
- }], ariaLabelledBy: [{
208
- type: Input
209
- }], onImageError: [{ type: i0.Output, args: ["onImageError"] }] } });
193
+ }], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], image: [{ type: i0.Input, args: [{ isSignal: true, alias: "image", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], shape: [{ type: i0.Input, args: [{ isSignal: true, alias: "shape", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledBy", required: false }] }], onImageError: [{ type: i0.Output, args: ["onImageError"] }] } });
210
194
  class AvatarModule {
211
195
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: AvatarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
212
196
  static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.2.1", ngImport: i0, type: AvatarModule, imports: [Avatar, SharedModule], exports: [Avatar, SharedModule] });
@@ -1 +1 @@
1
- {"version":3,"file":"exhaustive-ui-core-avatar.mjs","sources":["../../src/avatar/style/avatarstyle.ts","../../src/avatar/avatar.ts","../../src/avatar/exhaustive-ui-core-avatar.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { style } from '@exhaustive-ui/styles/avatar';\nimport { BaseStyle } from '@exhaustive-ui/core/base';\n\nconst classes = {\n root: ({ instance }) => [\n 'p-avatar p-component',\n {\n 'p-avatar-image': instance.image != null,\n 'p-avatar-circle': instance.shape === 'circle',\n 'p-avatar-lg': instance.size === 'large',\n 'p-avatar-xl': instance.size === 'xlarge'\n }\n ],\n label: 'p-avatar-label',\n icon: 'p-avatar-icon'\n};\n\n@Injectable()\nexport class AvatarStyle extends BaseStyle {\n name = 'avatar';\n\n style = style;\n\n classes = classes;\n}\n\n/**\n *\n * Avatar represents people using icons, labels and images.\n *\n * - [Live Demo](https://exhaustive-ui.e-xiste.com/avatar)\n *\n * @module avatarstyle\n *\n */\nexport enum AvatarClasses {\n /**\n * Class name of the root element\n */\n root = 'p-avatar',\n /**\n * Class name of the label element\n */\n label = 'p-avatar-label',\n /**\n * Class name of the icon element\n */\n icon = 'p-avatar-icon',\n /**\n * Container element in image mode\n */\n image = 'p-avatar-image',\n /**\n * Container element with a circle shape\n */\n circle = 'p-avatar-circle',\n /**\n * Container element with a large size\n */\n large = 'p-avatar-lg',\n /**\n * Container element with an xlarge size\n */\n xlarge = 'p-avatar-xl'\n}\n\nexport interface AvatarStyle extends BaseStyle {}\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, HostBinding, inject, InjectionToken, Input, NgModule, ViewEncapsulation, output } from '@angular/core';\nimport { SharedModule } from '@exhaustive-ui/core/api';\nimport { BaseComponent, PARENT_INSTANCE } from '@exhaustive-ui/core/basecomponent';\nimport { Bind } from '@exhaustive-ui/core/bind';\nimport { AvatarPassThrough } from '@exhaustive-ui/core/types/avatar';\nimport { AvatarStyle } from './style/avatarstyle';\n\nconst AVATAR_INSTANCE = new InjectionToken<Avatar>('AVATAR_INSTANCE');\n\n/**\n * Avatar represents people using icons, labels and images.\n * @group Components\n */\n@Component({\n selector: 'p-avatar',\n standalone: true,\n imports: [CommonModule, SharedModule, Bind],\n template: `\n <ng-content></ng-content>\n @if (label) {\n <span [pBind]=\"ptm('label')\" [class]=\"cx('label')\" [attr.data-p]=\"dataP\">{{ label }}</span>\n } @else {\n @if (icon) {\n <span [pBind]=\"ptm('icon')\" [class]=\"icon\" [ngClass]=\"cx('icon')\" [attr.data-p]=\"dataP\"></span>\n } @else {\n @if (image) {\n <img [pBind]=\"ptm('image')\" [src]=\"image\" (error)=\"imageError($event)\" [attr.aria-label]=\"ariaLabel\" [attr.data-p]=\"dataP\" />\n }\n }\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class]': \"cn(cx('root'), styleClass)\",\n '[attr.aria-label]': 'ariaLabel',\n '[attr.aria-labelledby]': 'ariaLabelledBy',\n '[attr.data-p]': 'dataP'\n },\n providers: [AvatarStyle, { provide: AVATAR_INSTANCE, useExisting: Avatar }, { provide: PARENT_INSTANCE, useExisting: Avatar }],\n hostDirectives: [Bind]\n})\nexport class Avatar extends BaseComponent<AvatarPassThrough> {\n componentName = 'Avatar';\n\n $pcAvatar: Avatar | undefined = inject(AVATAR_INSTANCE, { optional: true, skipSelf: true }) ?? undefined;\n\n bindDirectiveInstance = inject(Bind, { self: true });\n\n onAfterViewChecked(): void {\n this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root']));\n }\n /**\n * Defines the text to display.\n * @group Props\n */\n @Input() label: string | undefined;\n /**\n * Defines the icon to display.\n * @group Props\n */\n @Input() icon: string | undefined;\n /**\n * Defines the image to display.\n * @group Props\n */\n @Input() image: string | undefined;\n /**\n * Size of the element.\n * @group Props\n */\n @Input() size: 'normal' | 'large' | 'xlarge' | undefined = 'normal';\n /**\n * Shape of the element.\n * @group Props\n */\n @Input() shape: 'square' | 'circle' | undefined = 'square';\n /**\n * Class of the element.\n * @deprecated since v20.0.0, use `class` instead.\n * @group Props\n */\n @Input() styleClass: string | undefined;\n /**\n * Establishes a string value that labels the component.\n * @group Props\n */\n @Input() ariaLabel: string | undefined;\n /**\n * Establishes relationships between the component and label(s) where its value should be one or more element IDs.\n * @group Props\n */\n @Input() ariaLabelledBy: string | undefined;\n /**\n * This event is triggered if an error occurs while loading an image file.\n * @param {Event} event - Browser event.\n * @group Emits\n */\n readonly onImageError = output<Event>();\n\n _componentStyle = inject(AvatarStyle);\n\n imageError(event: Event) {\n this.onImageError.emit(event);\n }\n\n get dataP() {\n return this.cn({\n [this.shape as string]: this.shape,\n [this.size as string]: this.size\n });\n }\n}\n\n@NgModule({\n imports: [Avatar, SharedModule],\n exports: [Avatar, SharedModule]\n})\nexport class AvatarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;AAIA,MAAM,OAAO,GAAG;AACZ,IAAA,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK;QACpB,sBAAsB;AACtB,QAAA;AACI,YAAA,gBAAgB,EAAE,QAAQ,CAAC,KAAK,IAAI,IAAI;AACxC,YAAA,iBAAiB,EAAE,QAAQ,CAAC,KAAK,KAAK,QAAQ;AAC9C,YAAA,aAAa,EAAE,QAAQ,CAAC,IAAI,KAAK,OAAO;AACxC,YAAA,aAAa,EAAE,QAAQ,CAAC,IAAI,KAAK;AACpC;AACJ,KAAA;AACD,IAAA,KAAK,EAAE,gBAAgB;AACvB,IAAA,IAAI,EAAE;CACT;AAGK,MAAO,WAAY,SAAQ,SAAS,CAAA;IACtC,IAAI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,CAAC,MAAM,EAAE,YAAY;AACjC,iBAAA;;;ACtHD;;AAEG;;;;"}
1
+ {"version":3,"file":"exhaustive-ui-core-avatar.mjs","sources":["../../src/avatar/style/avatarstyle.ts","../../src/avatar/avatar.ts","../../src/avatar/exhaustive-ui-core-avatar.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { style } from '@exhaustive-ui/styles/avatar';\nimport { BaseStyle } from '@exhaustive-ui/core/base';\n\nconst classes = {\n root: ({ instance }) => [\n 'p-avatar p-component',\n {\n 'p-avatar-image': instance.image() != null,\n 'p-avatar-circle': instance.shape() === 'circle',\n 'p-avatar-lg': instance.size() === 'large',\n 'p-avatar-xl': instance.size() === 'xlarge'\n }\n ],\n label: 'p-avatar-label',\n icon: 'p-avatar-icon'\n};\n\n@Injectable()\nexport class AvatarStyle extends BaseStyle {\n name = 'avatar';\n\n style = style;\n\n classes = classes;\n}\n\n/**\n *\n * Avatar represents people using icons, labels and images.\n *\n * - [Live Demo](https://exhaustive-ui.e-xiste.com/avatar)\n *\n * @module avatarstyle\n *\n */\nexport enum AvatarClasses {\n /**\n * Class name of the root element\n */\n root = 'p-avatar',\n /**\n * Class name of the label element\n */\n label = 'p-avatar-label',\n /**\n * Class name of the icon element\n */\n icon = 'p-avatar-icon',\n /**\n * Container element in image mode\n */\n image = 'p-avatar-image',\n /**\n * Container element with a circle shape\n */\n circle = 'p-avatar-circle',\n /**\n * Container element with a large size\n */\n large = 'p-avatar-lg',\n /**\n * Container element with an xlarge size\n */\n xlarge = 'p-avatar-xl'\n}\n\nexport interface AvatarStyle extends BaseStyle {}\n","import { CommonModule } from '@angular/common';\nimport { afterEveryRender, ChangeDetectionStrategy, Component, computed, inject, input, NgModule, ViewEncapsulation, output } from '@angular/core';\nimport { SharedModule } from '@exhaustive-ui/core/api';\nimport { BaseComponent, PARENT_INSTANCE } from '@exhaustive-ui/core/basecomponent';\nimport { Bind } from '@exhaustive-ui/core/bind';\nimport { AvatarPassThrough } from '@exhaustive-ui/core/types/avatar';\nimport { AvatarStyle } from './style/avatarstyle';\n\n/**\n * Avatar represents people using icons, labels and images.\n * @group Components\n */\n@Component({\n selector: 'p-avatar',\n imports: [CommonModule, SharedModule, Bind],\n template: `\n <ng-content></ng-content>\n @if (label()) {\n <span [pBind]=\"ptm('label')\" [class]=\"cx('label')\" [attr.data-p]=\"dataP()\">{{ label() }}</span>\n } @else {\n @if (icon()) {\n <span [pBind]=\"ptm('icon')\" [class]=\"icon()\" [ngClass]=\"cx('icon')\" [attr.data-p]=\"dataP()\"></span>\n } @else {\n @if (image()) {\n <img [pBind]=\"ptm('image')\" [src]=\"image()\" (error)=\"imageError($event)\" [attr.aria-label]=\"ariaLabel()\" [attr.data-p]=\"dataP()\" />\n }\n }\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class]': \"cx('root')\",\n '[attr.aria-label]': 'ariaLabel()',\n '[attr.aria-labelledby]': 'ariaLabelledBy()',\n '[attr.data-p]': 'dataP()'\n },\n providers: [AvatarStyle, { provide: PARENT_INSTANCE, useExisting: Avatar }],\n hostDirectives: [Bind]\n})\nexport class Avatar extends BaseComponent<AvatarPassThrough> {\n componentName = 'Avatar';\n\n bindDirectiveInstance = inject(Bind, { self: true });\n\n constructor() {\n super();\n afterEveryRender(() => this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root'])));\n }\n\n /**\n * Defines the text to display.\n * @group Props\n */\n readonly label = input<string | undefined>();\n /**\n * Defines the icon to display.\n * @group Props\n */\n readonly icon = input<string | undefined>();\n /**\n * Defines the image to display.\n * @group Props\n */\n readonly image = input<string | undefined>();\n /**\n * Size of the element.\n * @group Props\n */\n readonly size = input<'normal' | 'large' | 'xlarge' | undefined>('normal');\n /**\n * Shape of the element.\n * @group Props\n */\n readonly shape = input<'square' | 'circle' | undefined>('square');\n /**\n * Establishes a string value that labels the component.\n * @group Props\n */\n readonly ariaLabel = input<string | undefined>();\n /**\n * Establishes relationships between the component and label(s) where its value should be one or more element IDs.\n * @group Props\n */\n readonly ariaLabelledBy = input<string | undefined>();\n /**\n * This event is triggered if an error occurs while loading an image file.\n * @param {Event} event - Browser event.\n * @group Emits\n */\n readonly onImageError = output<Event>();\n\n _componentStyle = inject(AvatarStyle);\n\n imageError(event: Event) {\n this.onImageError.emit(event);\n }\n\n readonly dataP = computed(() => {\n return this.cn({\n [this.shape() as string]: this.shape(),\n [this.size() as string]: this.size()\n });\n });\n}\n\n@NgModule({\n imports: [Avatar, SharedModule],\n exports: [Avatar, SharedModule]\n})\nexport class AvatarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;AAIA,MAAM,OAAO,GAAG;AACZ,IAAA,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK;QACpB,sBAAsB;AACtB,QAAA;AACI,YAAA,gBAAgB,EAAE,QAAQ,CAAC,KAAK,EAAE,IAAI,IAAI;AAC1C,YAAA,iBAAiB,EAAE,QAAQ,CAAC,KAAK,EAAE,KAAK,QAAQ;AAChD,YAAA,aAAa,EAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,OAAO;AAC1C,YAAA,aAAa,EAAE,QAAQ,CAAC,IAAI,EAAE,KAAK;AACtC;AACJ,KAAA;AACD,IAAA,KAAK,EAAE,gBAAgB;AACvB,IAAA,IAAI,EAAE;CACT;AAGK,MAAO,WAAY,SAAQ,SAAS,CAAA;IACtC,IAAI,GAAG,QAAQ;IAEf,KAAK,GAAG,KAAK;IAEb,OAAO,GAAG,OAAO;uGALR,WAAW,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;2GAAX,WAAW,EAAA,CAAA;;2FAAX,WAAW,EAAA,UAAA,EAAA,CAAA;kBADvB;;AASD;;;;;;;;AAQG;IACS;AAAZ,CAAA,UAAY,aAAa,EAAA;AACrB;;AAEG;AACH,IAAA,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