@exhaustive-ui/mcp 22.4.0 → 22.6.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 (205) hide show
  1. package/README.md +13 -1
  2. package/data/cards/accordion.md +91 -0
  3. package/data/cards/animateonscroll.md +155 -0
  4. package/data/cards/autocomplete.md +109 -0
  5. package/data/cards/autofocus.md +36 -0
  6. package/data/cards/avatar.md +45 -0
  7. package/data/cards/badge.md +44 -0
  8. package/data/cards/blockui.md +51 -0
  9. package/data/cards/breadcrumb.md +56 -0
  10. package/data/cards/button.md +83 -0
  11. package/data/cards/card.md +49 -0
  12. package/data/cards/carousel.md +101 -0
  13. package/data/cards/cascadeselect.md +77 -0
  14. package/data/cards/chart.md +105 -0
  15. package/data/cards/checkbox.md +59 -0
  16. package/data/cards/chip.md +50 -0
  17. package/data/cards/classnames.md +91 -0
  18. package/data/cards/colorpicker.md +52 -0
  19. package/data/cards/confirmdialog.md +119 -0
  20. package/data/cards/confirmpopup.md +96 -0
  21. package/data/cards/contextmenu.md +60 -0
  22. package/data/cards/dataview.md +134 -0
  23. package/data/cards/datepicker.md +103 -0
  24. package/data/cards/dialog.md +89 -0
  25. package/data/cards/divider.md +55 -0
  26. package/data/cards/dock.md +106 -0
  27. package/data/cards/dragdrop.md +106 -0
  28. package/data/cards/drawer.md +62 -0
  29. package/data/cards/dynamicdialog.md +103 -0
  30. package/data/cards/editor.md +55 -0
  31. package/data/cards/fieldset.md +54 -0
  32. package/data/cards/fileinput.md +72 -0
  33. package/data/cards/fileupload.md +88 -0
  34. package/data/cards/floatlabel.md +41 -0
  35. package/data/cards/fluid.md +49 -0
  36. package/data/cards/focustrap.md +64 -0
  37. package/data/cards/galleria.md +94 -0
  38. package/data/cards/iconfield.md +45 -0
  39. package/data/cards/iftalabel.md +38 -0
  40. package/data/cards/image.md +58 -0
  41. package/data/cards/imagecompare.md +45 -0
  42. package/data/cards/inplace.md +56 -0
  43. package/data/cards/inputgroup.md +77 -0
  44. package/data/cards/inputmask.md +71 -0
  45. package/data/cards/inputnumber.md +78 -0
  46. package/data/cards/inputotp.md +60 -0
  47. package/data/cards/inputtext.md +41 -0
  48. package/data/cards/keyfilter.md +49 -0
  49. package/data/cards/knob.md +55 -0
  50. package/data/cards/listbox.md +105 -0
  51. package/data/cards/megamenu.md +96 -0
  52. package/data/cards/menu.md +64 -0
  53. package/data/cards/menubar.md +102 -0
  54. package/data/cards/message.md +51 -0
  55. package/data/cards/metergroup.md +53 -0
  56. package/data/cards/multiselect.md +115 -0
  57. package/data/cards/orderlist.md +96 -0
  58. package/data/cards/organizationchart.md +84 -0
  59. package/data/cards/overlay.md +63 -0
  60. package/data/cards/paginator.md +62 -0
  61. package/data/cards/panel.md +57 -0
  62. package/data/cards/panelmenu.md +94 -0
  63. package/data/cards/password.md +81 -0
  64. package/data/cards/picklist.md +106 -0
  65. package/data/cards/popover.md +53 -0
  66. package/data/cards/progressbar.md +42 -0
  67. package/data/cards/progressspinner.md +38 -0
  68. package/data/cards/radiobutton.md +52 -0
  69. package/data/cards/rating.md +56 -0
  70. package/data/cards/ripple.md +37 -0
  71. package/data/cards/scroller.md +32 -0
  72. package/data/cards/scrollpanel.md +50 -0
  73. package/data/cards/scrolltop.md +48 -0
  74. package/data/cards/select.md +108 -0
  75. package/data/cards/selectbutton.md +64 -0
  76. package/data/cards/skeleton.md +54 -0
  77. package/data/cards/slider.md +52 -0
  78. package/data/cards/speeddial.md +102 -0
  79. package/data/cards/splitbutton.md +96 -0
  80. package/data/cards/splitter.md +52 -0
  81. package/data/cards/stepper.md +125 -0
  82. package/data/cards/styleclass.md +46 -0
  83. package/data/cards/table.md +305 -0
  84. package/data/cards/tabs.md +97 -0
  85. package/data/cards/tag.md +41 -0
  86. package/data/cards/terminal.md +76 -0
  87. package/data/cards/textarea.md +45 -0
  88. package/data/cards/tieredmenu.md +121 -0
  89. package/data/cards/timeline.md +58 -0
  90. package/data/cards/toast.md +58 -0
  91. package/data/cards/togglebutton.md +59 -0
  92. package/data/cards/toggleswitch.md +52 -0
  93. package/data/cards/toolbar.md +74 -0
  94. package/data/cards/tooltip.md +43 -0
  95. package/data/cards/tree.md +93 -0
  96. package/data/cards/treeselect.md +98 -0
  97. package/data/cards/treetable.md +231 -0
  98. package/data/components/accordion.md +31 -23
  99. package/data/components/animateonscroll.md +18 -15
  100. package/data/components/autocomplete.md +162 -93
  101. package/data/components/autofocus.md +9 -7
  102. package/data/components/avatar.md +56 -43
  103. package/data/components/badge.md +27 -18
  104. package/data/components/blockui.md +15 -8
  105. package/data/components/breadcrumb.md +20 -14
  106. package/data/components/button.md +121 -94
  107. package/data/components/card.md +12 -10
  108. package/data/components/carousel.md +75 -53
  109. package/data/components/cascadeselect.md +271 -238
  110. package/data/components/chart.md +88 -74
  111. package/data/components/checkbox.md +107 -97
  112. package/data/components/chip.md +20 -16
  113. package/data/components/classnames.md +22 -4
  114. package/data/components/colorpicker.md +54 -36
  115. package/data/components/confirmdialog.md +146 -43
  116. package/data/components/confirmpopup.md +95 -22
  117. package/data/components/contextmenu.md +110 -39
  118. package/data/components/dataview.md +176 -83
  119. package/data/components/datepicker.md +171 -141
  120. package/data/components/dialog.md +80 -68
  121. package/data/components/divider.md +17 -12
  122. package/data/components/dock.md +65 -29
  123. package/data/components/dragdrop.md +26 -12
  124. package/data/components/drawer.md +67 -48
  125. package/data/components/dynamicdialog.md +22 -13
  126. package/data/components/editor.md +42 -33
  127. package/data/components/fieldset.md +20 -17
  128. package/data/components/fileinput.md +92 -35
  129. package/data/components/fileupload.md +101 -61
  130. package/data/components/floatlabel.md +20 -11
  131. package/data/components/fluid.md +11 -9
  132. package/data/components/focustrap.md +11 -7
  133. package/data/components/galleria.md +231 -90
  134. package/data/components/iconfield.md +23 -15
  135. package/data/components/iftalabel.md +15 -9
  136. package/data/components/image.md +31 -26
  137. package/data/components/imagecompare.md +8 -6
  138. package/data/components/inplace.md +27 -22
  139. package/data/components/inputgroup.md +53 -29
  140. package/data/components/inputmask.md +107 -85
  141. package/data/components/inputnumber.md +128 -90
  142. package/data/components/inputotp.md +55 -42
  143. package/data/components/inputtext.md +72 -50
  144. package/data/components/keyfilter.md +6 -3
  145. package/data/components/knob.md +70 -58
  146. package/data/components/listbox.md +171 -141
  147. package/data/components/llms.md +4 -0
  148. package/data/components/megamenu.md +24 -23
  149. package/data/components/menu.md +37 -34
  150. package/data/components/menubar.md +27 -22
  151. package/data/components/message.md +44 -32
  152. package/data/components/metergroup.md +48 -17
  153. package/data/components/multiselect.md +232 -168
  154. package/data/components/orderlist.md +55 -48
  155. package/data/components/organizationchart.md +182 -13
  156. package/data/components/overlay.md +31 -26
  157. package/data/components/paginator.md +49 -34
  158. package/data/components/panel.md +23 -19
  159. package/data/components/panelmenu.md +51 -25
  160. package/data/components/password.md +104 -91
  161. package/data/components/picklist.md +93 -71
  162. package/data/components/popover.md +68 -46
  163. package/data/components/progressbar.md +28 -22
  164. package/data/components/progressspinner.md +13 -11
  165. package/data/components/radiobutton.md +69 -35
  166. package/data/components/rating.md +48 -40
  167. package/data/components/ripple.md +8 -6
  168. package/data/components/scroller.md +29 -29
  169. package/data/components/scrollpanel.md +9 -7
  170. package/data/components/scrolltop.md +20 -18
  171. package/data/components/select.md +248 -169
  172. package/data/components/selectbutton.md +118 -56
  173. package/data/components/skeleton.md +22 -18
  174. package/data/components/slider.md +73 -49
  175. package/data/components/speeddial.md +77 -59
  176. package/data/components/splitbutton.md +354 -329
  177. package/data/components/splitter.md +22 -18
  178. package/data/components/stepper.md +38 -21
  179. package/data/components/styleclass.md +12 -6
  180. package/data/components/table.md +524 -315
  181. package/data/components/tabs.md +44 -26
  182. package/data/components/tag.md +18 -14
  183. package/data/components/terminal.md +38 -27
  184. package/data/components/textarea.md +82 -47
  185. package/data/components/tieredmenu.md +34 -29
  186. package/data/components/timeline.md +29 -28
  187. package/data/components/toast.md +115 -57
  188. package/data/components/togglebutton.md +53 -39
  189. package/data/components/toggleswitch.md +41 -28
  190. package/data/components/toolbar.md +19 -18
  191. package/data/components/tooltip.md +43 -32
  192. package/data/components/tree.md +114 -81
  193. package/data/components/treeselect.md +176 -174
  194. package/data/components/treetable.md +1250 -1045
  195. package/data/components.json +4134 -4088
  196. package/data/llms-full.txt +8979 -6437
  197. package/data/llms.txt +100 -96
  198. package/data/manifest.json +183 -15
  199. package/data/pages/llms.md +29 -0
  200. package/data/pages/tailwind.md +20 -10
  201. package/data/snapshot.json +2 -2
  202. package/dist/index.d.mts +37 -2
  203. package/dist/index.mjs +1395 -1079
  204. package/dist/index.mjs.map +1 -1
  205. package/package.json +1 -1
@@ -4,16 +4,17 @@ Galleria is an advanced content gallery component.
4
4
 
5
5
  ## Accessibility
6
6
 
7
- Screen Reader Galleria uses region role and since any attribute is passed to the main container element, attributes such as aria-label and aria-roledescription can be used as well. The slides container has aria-live attribute set as "polite" if galleria is not in autoplay mode, otherwise "off" would be the value in autoplay. A slide has a group role with an aria-label that refers to the aria.slideNumber property of the locale API. Similarly aria.slide is used as the aria-roledescription of the item. Inactive slides are hidden from the readers with aria-hidden . Next and Previous navigators are button elements with aria-label attributes referring to the aria.nextPageLabel and aria.firstPageLabel properties of the locale API by default respectively, you may still use your own aria roles and attributes as any valid attribute is passed to the button elements implicitly by using nextButtonProps and prevButtonProps . Quick navigation elements and thumnbails follow the tab pattern. They are placed inside an element with a tablist role whereas each item has a tab role with aria-selected and aria-controls attributes. The aria-label attribute of a quick navigation item refers to the aria.pageLabel of the locale API. Current page is marked with aria-current . In full screen mode, modal element uses dialog role with aria-modal enabled. The close button retrieves aria-label from the aria.close property of the locale API. Next/Prev Keyboard Support Key Function tab Moves focus through interactive elements in the carousel. enter Activates navigation. space Activates navigation. Quick Navigation Keyboard Support Key Function tab Moves focus through the active slide link. enter Activates the focused slide link. space Activates the focused slide link. right arrow Moves focus to the next slide link. left arrow Moves focus to the previous slide link. home Moves focus to the first slide link. end Moves focus to the last slide link.
7
+ Screen Reader Galleria uses region role and since any attribute is passed to the main container element, attributes such as aria-label and aria-roledescription can be used as well. The slides container has aria-live attribute set as "polite" if galleria is not in autoplay mode, otherwise "off" would be the value in autoplay. A slide has a group role with an aria-label that refers to the aria.slideNumber property of the locale API. Similarly aria.slide is used as the aria-roledescription of the item. Inactive slides are hidden from the readers with aria-hidden . Next and Previous navigators of the thumbnails are button elements with aria-label attributes referring to the aria.nextPageLabel and aria.prevPageLabel properties of the locale API respectively. Quick navigation elements and thumnbails follow the tab pattern. They are placed inside an element with a tablist role whereas each item has a tab role with aria-selected and aria-controls attributes. The aria-label attribute of a quick navigation item refers to the aria.pageLabel of the locale API. Current page is marked with aria-current . In full screen mode, modal element uses dialog role with aria-modal enabled. The close button retrieves aria-label from the aria.close property of the locale API. Next/Prev Keyboard Support Key Function tab Moves focus through interactive elements in the carousel. enter Activates navigation. space Activates navigation. Quick Navigation Keyboard Support Key Function tab Moves focus through the active slide link. enter Activates the focused slide link. space Activates the focused slide link. right arrow Moves focus to the next slide link. left arrow Moves focus to the previous slide link. home Moves focus to the first slide link. end Moves focus to the last slide link.
8
8
 
9
9
  ## Advanced
10
10
 
11
11
  Galleria can be extended further to implement complex requirements.
12
12
 
13
13
  ```typescript
14
- import { Component, OnInit, inject, signal } from '@angular/core';
15
- import { GalleriaModule } from '@exhaustive-ui/core/galleria';
14
+ import { CommonModule, isPlatformBrowser } from '@angular/common';
15
+ import { Component, inject, OnDestroy, OnInit, PLATFORM_ID, signal, ViewChild } from '@angular/core';
16
16
  import { ButtonModule } from '@exhaustive-ui/core/button';
17
+ import { Galleria, GalleriaModule } from '@exhaustive-ui/core/galleria';
17
18
  import { PhotoService } from '@/service/photoservice';
18
19
 
19
20
  @Component({
@@ -21,7 +22,7 @@ import { PhotoService } from '@/service/photoservice';
21
22
  <div class="card">
22
23
  <p-galleria
23
24
  #galleria
24
- [(value)]="images"
25
+ [value]="images"
25
26
  [(activeIndex)]="activeIndex"
26
27
  [numVisible]="5"
27
28
  [showThumbnails]="showThumbnails"
@@ -34,11 +35,11 @@ import { PhotoService } from '@/service/photoservice';
34
35
  [pt]="galleriaPT"
35
36
  >
36
37
  <ng-template #item let-item>
37
- <img [src]="item.itemImageSrc" [ngStyle]="{ width: !fullscreen ? '100%' : '', display: !fullscreen ? 'block' : '' }" />
38
+ <img [src]="item.itemImageSrc" [alt]="item.alt" [ngStyle]="{ width: !fullscreen ? '100%' : '', display: !fullscreen ? 'block' : '' }" />
38
39
  </ng-template>
39
40
  <ng-template #thumbnail let-item>
40
41
  <div class="grid gap-4 justify-center">
41
- <img [src]="item.thumbnailImageSrc" style="display: block" />
42
+ <img [src]="item.thumbnailImageSrc" [alt]="item.alt" style="display: block" />
42
43
  </div>
43
44
  </ng-template>
44
45
  <ng-template #footer let-item>
@@ -46,17 +47,21 @@ import { PhotoService } from '@/service/photoservice';
46
47
  <button
47
48
  type="button"
48
49
  pButton
49
- icon="pi pi-th-large"
50
50
  (click)="onThumbnailButtonClick()"
51
+ aria-label="Toggle thumbnails"
51
52
  class="bg-transparent border-none rounded-none hover:bg-white/10 text-white inline-flex justify-center items-center cursor-pointer px-3"
52
- ></button>
53
+ >
54
+ <i class="pi pi-th-large" pButtonIcon></i>
55
+ </button>
53
56
  <button
54
57
  type="button"
55
58
  pButton
56
- [icon]="slideButtonIcon()"
57
59
  (click)="toggleAutoSlide()"
60
+ [attr.aria-label]="isAutoPlay ? 'Pause slideshow' : 'Play slideshow'"
58
61
  class="bg-transparent border-none rounded-none hover:bg-white/10 text-white inline-flex justify-center items-center cursor-pointer px-3"
59
- ></button>
62
+ >
63
+ <i [class]="slideButtonIcon()" pButtonIcon></i>
64
+ </button>
60
65
  <span *ngIf="images()" class="flex items-center gap-4 ml-3">
61
66
  <span class="text-sm">{{ activeIndex + 1 }}/{{ images().length }}</span>
62
67
  <span class="font-bold text-sm">{{ images()[activeIndex].title }}</span>
@@ -65,28 +70,61 @@ import { PhotoService } from '@/service/photoservice';
65
70
  <button
66
71
  type="button"
67
72
  pButton
68
- [icon]="fullScreenIcon()"
69
73
  (click)="toggleFullScreen()"
74
+ [attr.aria-label]="fullscreen ? 'Exit full screen' : 'Enter full screen'"
70
75
  class="bg-transparent border-none rounded-none hover:bg-white/10 text-white inline-flex justify-center items-center cursor-pointer px-3 ml-auto"
71
- ></button>
76
+ >
77
+ <i [class]="fullScreenIcon()" pButtonIcon></i>
78
+ </button>
72
79
  </div>
73
80
  </ng-template>
74
81
  </p-galleria>
75
82
  </div>
76
83
  `,
77
84
  standalone: true,
78
- imports: [GalleriaModule, ButtonModule],
85
+ imports: [CommonModule, GalleriaModule, ButtonModule],
79
86
  providers: [PhotoService]
80
87
  })
81
- export class GalleriaAdvancedDemo implements OnInit {
88
+ export class GalleriaAdvancedDemo implements OnInit, OnDestroy {
89
+ private platformId = inject(PLATFORM_ID);
82
90
  private photoService = inject(PhotoService);
91
+
83
92
  images = signal<any[]>([]);
93
+
84
94
  showThumbnails: boolean = false;
95
+
85
96
  fullscreen: boolean = false;
97
+
86
98
  activeIndex: number = 0;
99
+
87
100
  isAutoPlay: boolean = true;
101
+
88
102
  onFullScreenListener: any;
89
- responsiveOptions: any[];
103
+
104
+ get galleriaPT() {
105
+ return {
106
+ root: {
107
+ class: [{ 'flex flex-col': this.fullscreen }]
108
+ },
109
+ content: {
110
+ class: ['relative', { 'flex-1 justify-center': this.fullscreen }]
111
+ },
112
+ thumbnails: 'absolute w-full left-0 bottom-0'
113
+ };
114
+ }
115
+
116
+ @ViewChild('galleria') galleria: Galleria | undefined;
117
+
118
+ responsiveOptions: any[] = [
119
+ {
120
+ breakpoint: '1300px',
121
+ numVisible: 4
122
+ },
123
+ {
124
+ breakpoint: '575px',
125
+ numVisible: 1
126
+ }
127
+ ];
90
128
 
91
129
  ngOnInit() {
92
130
  this.photoService.getImages().then((images) => {
@@ -184,31 +222,43 @@ export class GalleriaAdvancedDemo implements OnInit {
184
222
  A slideshow implementation is defined by adding circular and autoPlay properties.
185
223
 
186
224
  ```typescript
187
- import { Component, OnInit, inject } from '@angular/core';
225
+ import { Component, inject, model, OnInit } from '@angular/core';
226
+ import { CommonModule } from '@angular/common';
188
227
  import { GalleriaModule } from '@exhaustive-ui/core/galleria';
189
228
  import { PhotoService } from '@/service/photoservice';
190
229
 
191
230
  @Component({
192
231
  template: `
193
232
  <div class="card">
194
- <p-galleria [(value)]="images" [autoPlay]="true" [circular]="true" [responsiveOptions]="responsiveOptions" [numVisible]="5" [containerStyle]="{ 'max-width': '640px' }">
233
+ <p-galleria [value]="images" [autoPlay]="true" [circular]="true" [responsiveOptions]="responsiveOptions" [numVisible]="5" [containerStyle]="{ 'max-width': '640px' }">
195
234
  <ng-template #item let-item>
196
- <img [src]="item.itemImageSrc" style="width: 100%; display: block" />
235
+ <img [src]="item.itemImageSrc" [alt]="item.alt" style="width: 100%; display: block" />
197
236
  </ng-template>
198
237
  <ng-template #thumbnail let-item>
199
- <img [src]="item.thumbnailImageSrc" style="display: block" />
238
+ <img [src]="item.thumbnailImageSrc" [alt]="item.alt" style="display: block" />
200
239
  </ng-template>
201
240
  </p-galleria>
202
241
  </div>
203
242
  `,
204
243
  standalone: true,
205
- imports: [GalleriaModule],
244
+ imports: [CommonModule, GalleriaModule],
206
245
  providers: [PhotoService]
207
246
  })
208
247
  export class GalleriaAutoplayDemo implements OnInit {
209
248
  private photoService = inject(PhotoService);
210
- images: any = model([]);
211
- responsiveOptions: any[];
249
+
250
+ images = model([]);
251
+
252
+ responsiveOptions: any[] = [
253
+ {
254
+ breakpoint: '1300px',
255
+ numVisible: 4
256
+ },
257
+ {
258
+ breakpoint: '575px',
259
+ numVisible: 1
260
+ }
261
+ ];
212
262
 
213
263
  ngOnInit() {
214
264
  this.photoService.getImages().then((images) => this.images.set(images));
@@ -221,31 +271,43 @@ export class GalleriaAutoplayDemo implements OnInit {
221
271
  Galleria requires a value as a collection of images, item template for the higher resolution image and thumbnail template to display as a thumbnail.
222
272
 
223
273
  ```typescript
224
- import { Component, OnInit, inject } from '@angular/core';
274
+ import { Component, inject, model, OnInit } from '@angular/core';
275
+ import { CommonModule } from '@angular/common';
225
276
  import { GalleriaModule } from '@exhaustive-ui/core/galleria';
226
277
  import { PhotoService } from '@/service/photoservice';
227
278
 
228
279
  @Component({
229
280
  template: `
230
281
  <div class="card">
231
- <p-galleria [(value)]="images" [responsiveOptions]="responsiveOptions" [containerStyle]="{ 'max-width': '640px' }" [numVisible]="5">
282
+ <p-galleria [value]="images" [responsiveOptions]="responsiveOptions" [containerStyle]="{ 'max-width': '640px' }" [numVisible]="5">
232
283
  <ng-template #item let-item>
233
- <img [src]="item.itemImageSrc" style="width:100%" />
284
+ <img [src]="item.itemImageSrc" [alt]="item.alt" style="width:100%" />
234
285
  </ng-template>
235
286
  <ng-template #thumbnail let-item>
236
- <img [src]="item.thumbnailImageSrc" />
287
+ <img [src]="item.thumbnailImageSrc" [alt]="item.alt" />
237
288
  </ng-template>
238
289
  </p-galleria>
239
290
  </div>
240
291
  `,
241
292
  standalone: true,
242
- imports: [GalleriaModule],
293
+ imports: [CommonModule, GalleriaModule],
243
294
  providers: [PhotoService]
244
295
  })
245
296
  export class GalleriaBasicDemo implements OnInit {
246
297
  private photoService = inject(PhotoService);
247
- images: any = model([]);
248
- responsiveOptions: any[];
298
+
299
+ images = model([]);
300
+
301
+ responsiveOptions: any[] = [
302
+ {
303
+ breakpoint: '1300px',
304
+ numVisible: 4
305
+ },
306
+ {
307
+ breakpoint: '575px',
308
+ numVisible: 1
309
+ }
310
+ ];
249
311
 
250
312
  ngOnInit() {
251
313
  this.photoService.getImages().then((images) => this.images.set(images));
@@ -258,19 +320,20 @@ export class GalleriaBasicDemo implements OnInit {
258
320
  Description of an image is specified with the caption template.
259
321
 
260
322
  ```typescript
261
- import { Component, OnInit, inject } from '@angular/core';
323
+ import { Component, inject, model, OnInit } from '@angular/core';
324
+ import { CommonModule } from '@angular/common';
262
325
  import { GalleriaModule } from '@exhaustive-ui/core/galleria';
263
326
  import { PhotoService } from '@/service/photoservice';
264
327
 
265
328
  @Component({
266
329
  template: `
267
330
  <div class="card">
268
- <p-galleria [(value)]="images" [responsiveOptions]="responsiveOptions" [containerStyle]="{ 'max-width': '640px' }" [numVisible]="5">
331
+ <p-galleria [value]="images" [responsiveOptions]="responsiveOptions" [containerStyle]="{ 'max-width': '640px' }" [numVisible]="5">
269
332
  <ng-template #item let-item>
270
- <img [src]="item.itemImageSrc" style="width: 100%; display: block;" />
333
+ <img [src]="item.itemImageSrc" [alt]="item.alt" style="width: 100%; display: block;" />
271
334
  </ng-template>
272
335
  <ng-template #thumbnail let-item>
273
- <img [src]="item.thumbnailImageSrc" style="display: block;" />
336
+ <img [src]="item.thumbnailImageSrc" [alt]="item.alt" style="display: block;" />
274
337
  </ng-template>
275
338
  <ng-template #caption let-item>
276
339
  <div class="text-xl mb-2 font-bold">{{ item.title }}</div>
@@ -280,13 +343,24 @@ import { PhotoService } from '@/service/photoservice';
280
343
  </div>
281
344
  `,
282
345
  standalone: true,
283
- imports: [GalleriaModule],
346
+ imports: [CommonModule, GalleriaModule],
284
347
  providers: [PhotoService]
285
348
  })
286
349
  export class GalleriaCaptionDemo implements OnInit {
287
350
  private photoService = inject(PhotoService);
288
- images: any = model([]);
289
- responsiveOptions: any[];
351
+
352
+ images = model([]);
353
+
354
+ responsiveOptions: any[] = [
355
+ {
356
+ breakpoint: '1300px',
357
+ numVisible: 4
358
+ },
359
+ {
360
+ breakpoint: '575px',
361
+ numVisible: 1
362
+ }
363
+ ];
290
364
 
291
365
  ngOnInit() {
292
366
  this.photoService.getImages().then((images) => this.images.set(images));
@@ -299,37 +373,60 @@ export class GalleriaCaptionDemo implements OnInit {
299
373
  Galleria can be controlled programmatically using the activeIndex property.
300
374
 
301
375
  ```typescript
302
- import { Component, OnInit, inject } from '@angular/core';
303
- import { ButtonModule } from '@exhaustive-ui/core/button';
376
+ import { Component, inject, model, OnInit } from '@angular/core';
377
+ import { CommonModule } from '@angular/common';
304
378
  import { GalleriaModule } from '@exhaustive-ui/core/galleria';
379
+ import { ButtonModule } from '@exhaustive-ui/core/button';
305
380
  import { PhotoService } from '@/service/photoservice';
306
381
 
307
382
  @Component({
308
383
  template: `
309
384
  <div class="card">
310
385
  <div class="mb-4">
311
- <p-button type="button" icon="pi pi-minus" (click)="prev()" />
312
- <p-button type="button" icon="pi pi-plus" (click)="next()" severity="secondary" styleClass="ml-2" />
386
+ <p-button type="button" icon="pi pi-minus" ariaLabel="Previous image" (click)="prev()" />
387
+ <p-button type="button" icon="pi pi-plus" ariaLabel="Next image" (click)="next()" severity="secondary" styleClass="ml-2" />
313
388
  </div>
314
- <p-galleria [(value)]="images" [responsiveOptions]="responsiveOptions" [containerStyle]="{ 'max-width': '640px' }" [numVisible]="5" [(activeIndex)]="activeIndex">
389
+ <p-galleria [value]="images" [responsiveOptions]="responsiveOptions" [containerStyle]="{ 'max-width': '640px' }" [numVisible]="5" [(activeIndex)]="activeIndex">
315
390
  <ng-template #item let-item>
316
- <img [src]="item.itemImageSrc" style="width: 100%;" />
391
+ <img [src]="item.itemImageSrc" [alt]="item.alt" style="width: 100%;" />
317
392
  </ng-template>
318
393
  <ng-template #thumbnail let-item>
319
- <img [src]="item.thumbnailImageSrc" />
394
+ <img [src]="item.thumbnailImageSrc" [alt]="item.alt" />
320
395
  </ng-template>
321
396
  </p-galleria>
322
397
  </div>
323
398
  `,
324
399
  standalone: true,
325
- imports: [ButtonModule, GalleriaModule],
400
+ imports: [CommonModule, GalleriaModule, ButtonModule],
326
401
  providers: [PhotoService]
327
402
  })
328
403
  export class GalleriaControlledDemo implements OnInit {
329
404
  private photoService = inject(PhotoService);
330
- images: any = model([]);
405
+
406
+ images = model([]);
407
+
408
+ get activeIndex(): number {
409
+ return this._activeIndex;
410
+ }
411
+
412
+ set activeIndex(newValue) {
413
+ if (this.images() && 0 <= newValue && newValue <= this.images().length - 1) {
414
+ this._activeIndex = newValue;
415
+ }
416
+ }
417
+
331
418
  _activeIndex: number = 2;
332
- responsiveOptions: any[];
419
+
420
+ responsiveOptions: any[] = [
421
+ {
422
+ breakpoint: '1300px',
423
+ numVisible: 4
424
+ },
425
+ {
426
+ breakpoint: '575px',
427
+ numVisible: 1
428
+ }
429
+ ];
333
430
 
334
431
  ngOnInit() {
335
432
  this.photoService.getImages().then((images) => this.images.set(images));
@@ -350,31 +447,43 @@ export class GalleriaControlledDemo implements OnInit {
350
447
  Galleria responsiveness is defined with the responsiveOptions property.
351
448
 
352
449
  ```typescript
353
- import { Component, OnInit, inject } from '@angular/core';
450
+ import { Component, inject, model, OnInit } from '@angular/core';
451
+ import { CommonModule } from '@angular/common';
354
452
  import { GalleriaModule } from '@exhaustive-ui/core/galleria';
355
453
  import { PhotoService } from '@/service/photoservice';
356
454
 
357
455
  @Component({
358
456
  template: `
359
457
  <div class="card">
360
- <p-galleria [(value)]="images" [responsiveOptions]="responsiveOptions" [containerStyle]="{ 'max-width': '640px' }" [numVisible]="7" [circular]="true">
458
+ <p-galleria [value]="images" [responsiveOptions]="responsiveOptions" [containerStyle]="{ 'max-width': '640px' }" [numVisible]="7" [circular]="true">
361
459
  <ng-template #item let-item>
362
- <img [src]="item.itemImageSrc" style="width: 100%; display: block;" />
460
+ <img [src]="item.itemImageSrc" [alt]="item.alt" style="width: 100%; display: block;" />
363
461
  </ng-template>
364
462
  <ng-template #thumbnail let-item>
365
- <img [src]="item.thumbnailImageSrc" style="width: 100%; display: block;" />
463
+ <img [src]="item.thumbnailImageSrc" [alt]="item.alt" style="width: 100%; display: block;" />
366
464
  </ng-template>
367
465
  </p-galleria>
368
466
  </div>
369
467
  `,
370
468
  standalone: true,
371
- imports: [GalleriaModule],
469
+ imports: [CommonModule, GalleriaModule],
372
470
  providers: [PhotoService]
373
471
  })
374
472
  export class GalleriaResponsiveDemo implements OnInit {
375
473
  private photoService = inject(PhotoService);
376
- images: any = model([]);
377
- responsiveOptions: any[];
474
+
475
+ images = model([]);
476
+
477
+ responsiveOptions: any[] = [
478
+ {
479
+ breakpoint: '1300px',
480
+ numVisible: 4
481
+ },
482
+ {
483
+ breakpoint: '575px',
484
+ numVisible: 1
485
+ }
486
+ ];
378
487
 
379
488
  ngOnInit() {
380
489
  this.photoService.getImages().then((images) => this.images.set(images));
@@ -387,7 +496,8 @@ export class GalleriaResponsiveDemo implements OnInit {
387
496
  Galleria can be controlled programmatically using the activeIndex property.
388
497
 
389
498
  ```typescript
390
- import { Component, OnInit, inject, signal } from '@angular/core';
499
+ import { Component, inject, OnInit, signal } from '@angular/core';
500
+ import { CommonModule } from '@angular/common';
391
501
  import { FormsModule } from '@angular/forms';
392
502
  import { GalleriaModule } from '@exhaustive-ui/core/galleria';
393
503
  import { RadioButtonModule } from '@exhaustive-ui/core/radiobutton';
@@ -398,31 +508,62 @@ import { PhotoService } from '@/service/photoservice';
398
508
  <div class="card">
399
509
  <div class="flex flex-wrap gap-4 mb-8">
400
510
  <div *ngFor="let option of positionOptions" class="flex items-center">
401
- <p-radio-button [name]="option.label" [value]="option.value" [label]="option.label" [(ngModel)]="position" [inputId]="option.label" />
511
+ <p-radio-button [name]="option.label" [value]="option.value" [(ngModel)]="position" [inputId]="option.label" />
402
512
  <label [for]="option.label" class="ml-2"> {{ option.label }} </label>
403
513
  </div>
404
514
  </div>
405
515
  <p-galleria [value]="images()" [thumbnailsPosition]="position" [responsiveOptions]="responsiveOptions" [containerStyle]="{ 'max-width': '640px' }" [numVisible]="5">
406
516
  <ng-template #item let-item>
407
- <img [src]="item.itemImageSrc" style="width: 100%; display: block" />
517
+ <img [src]="item.itemImageSrc" [alt]="item.alt" style="width: 100%; display: block" />
408
518
  </ng-template>
409
519
  <ng-template #thumbnail let-item>
410
520
  <div class="grid gap-4 justify-center">
411
- <img [src]="item.thumbnailImageSrc" style="width: 100%; display: block" />
521
+ <img [src]="item.thumbnailImageSrc" [alt]="item.alt" style="width: 100%; display: block" />
412
522
  </div>
413
523
  </ng-template>
414
524
  </p-galleria>
415
525
  </div>
416
526
  `,
417
527
  standalone: true,
418
- imports: [GalleriaModule, RadioButtonModule, FormsModule],
528
+ imports: [CommonModule, FormsModule, GalleriaModule, RadioButtonModule],
419
529
  providers: [PhotoService]
420
530
  })
421
531
  export class GalleriaThumbnailDemo implements OnInit {
422
532
  private photoService = inject(PhotoService);
533
+
423
534
  images = signal<any[]>([]);
424
- positionOptions: any[];
425
- responsiveOptions: any[];
535
+
536
+ position: 'left' | 'right' | 'top' | 'bottom' = 'bottom';
537
+
538
+ positionOptions = [
539
+ {
540
+ label: 'Bottom',
541
+ value: 'bottom'
542
+ },
543
+ {
544
+ label: 'Top',
545
+ value: 'top'
546
+ },
547
+ {
548
+ label: 'Left',
549
+ value: 'left'
550
+ },
551
+ {
552
+ label: 'Right',
553
+ value: 'right'
554
+ }
555
+ ];
556
+
557
+ responsiveOptions: any[] = [
558
+ {
559
+ breakpoint: '1300px',
560
+ numVisible: 4
561
+ },
562
+ {
563
+ breakpoint: '575px',
564
+ numVisible: 1
565
+ }
566
+ ];
426
567
 
427
568
  ngOnInit() {
428
569
  this.photoService.getImages().then((images) => this.images.set(images));
@@ -438,36 +579,36 @@ Galleria is an advanced content gallery component.
438
579
 
439
580
  | Name | Type | Default | Description |
440
581
  |------|------|---------|-------------|
441
- | dt | InputSignal<Object> | undefined | Defines scoped design tokens of the component. |
442
- | unstyled | InputSignal<boolean> | undefined | Indicates whether the component should be rendered without styles. |
443
- | pt | InputSignal<GalleriaPassThrough> | undefined | Used to pass attributes to DOM elements inside the component. |
444
- | ptOptions | InputSignal<PassThroughOptions> | undefined | Used to configure passthrough(pt) options of the component. |
445
- | activeIndex | ModelSignal<number> | ... | Index of the first item, supports one or two-way binding as well. Emits `activeIndexChange` with the new index when the active item changes. |
446
- | fullScreen | InputSignalWithTransform<boolean, unknown> | ... | Whether to display the component on fullscreen. |
447
- | id | InputSignal<string> | ... | Unique identifier of the element. |
448
- | value | InputSignal<any[]> | ... | An array of objects to display. |
449
- | numVisible | InputSignalWithTransform<number, unknown> | ... | Number of items per page. |
450
- | responsiveOptions | InputSignal<GalleriaResponsiveOptions[]> | ... | An array of options for responsive design. |
451
- | showItemNavigators | InputSignalWithTransform<boolean, unknown> | ... | Whether to display navigation buttons in item section. |
452
- | showThumbnailNavigators | InputSignalWithTransform<boolean, unknown> | ... | Whether to display navigation buttons in thumbnail container. |
453
- | showItemNavigatorsOnHover | InputSignalWithTransform<boolean, unknown> | ... | Whether to display navigation buttons on item hover. |
454
- | changeItemOnIndicatorHover | InputSignalWithTransform<boolean, unknown> | ... | When enabled, item is changed on indicator hover. |
455
- | circular | InputSignalWithTransform<boolean, unknown> | ... | Defines if scrolling would be infinite. |
456
- | autoPlay | InputSignalWithTransform<boolean, unknown> | ... | Items are displayed with a slideshow in autoPlay mode. |
457
- | shouldStopAutoplayByClick | InputSignalWithTransform<boolean, unknown> | ... | When enabled, autorun should stop by click. |
458
- | transitionInterval | InputSignalWithTransform<number, unknown> | ... | Time in milliseconds to scroll items. |
459
- | showThumbnails | InputSignalWithTransform<boolean, unknown> | ... | Whether to display thumbnail container. |
460
- | thumbnailsPosition | InputSignal<"top" \| "bottom" \| "left" \| "right"> | ... | Position of thumbnails. |
461
- | verticalThumbnailViewPortHeight | InputSignal<string> | ... | Height of the viewport in vertical thumbnail. |
462
- | showIndicators | InputSignalWithTransform<boolean, unknown> | ... | Whether to display indicator container. |
463
- | showIndicatorsOnItem | InputSignalWithTransform<boolean, unknown> | ... | When enabled, indicator container is displayed on item container. |
464
- | indicatorsPosition | InputSignal<"top" \| "bottom" \| "left" \| "right"> | ... | Position of indicators. |
465
- | baseZIndex | InputSignalWithTransform<number, unknown> | ... | Base zIndex value to use in layering. |
466
- | maskClass | InputSignal<string> | ... | Style class of the mask on fullscreen mode. |
467
- | containerStyle | InputSignal<{ [klass: string]: any }> | ... | Inline style of the component on fullscreen mode. Otherwise, the 'style' property can be used. |
468
- | motionOptions | InputSignal<MotionOptions> | ... | The motion options. |
469
- | maskMotionOptions | InputSignal<MotionOptions> | ... | The mask motion options. |
470
- | visible | ModelSignal<boolean> | ... | Specifies the visibility of the mask on fullscreen mode, supports one or two-way binding as well. Emits `visibleChange` with the new value when the visibility changes. |
582
+ | dt | Object | undefined | Defines scoped design tokens of the component. |
583
+ | unstyled | boolean | undefined | Indicates whether the component should be rendered without styles. |
584
+ | pt | GalleriaPassThrough | undefined | Used to pass attributes to DOM elements inside the component. |
585
+ | ptOptions | PassThroughOptions | undefined | Used to configure passthrough(pt) options of the component. |
586
+ | activeIndex | number | 0 | Index of the first item, supports one or two-way binding as well. Emits `activeIndexChange` with the new index when the active item changes. |
587
+ | fullScreen | boolean | false | Whether to display the component on fullscreen. |
588
+ | id | string | - | Unique identifier of the element. |
589
+ | value | any[] | - | An array of objects to display. |
590
+ | numVisible | number | 3 | Number of items per page. |
591
+ | responsiveOptions | GalleriaResponsiveOptions[] | - | An array of options for responsive design. |
592
+ | showItemNavigators | boolean | false | Whether to display navigation buttons in item section. |
593
+ | showThumbnailNavigators | boolean | true | Whether to display navigation buttons in thumbnail container. |
594
+ | showItemNavigatorsOnHover | boolean | false | Whether to display navigation buttons on item hover. |
595
+ | changeItemOnIndicatorHover | boolean | false | When enabled, item is changed on indicator hover. |
596
+ | circular | boolean | false | Defines if scrolling would be infinite. |
597
+ | autoPlay | boolean | false | Items are displayed with a slideshow in autoPlay mode. |
598
+ | shouldStopAutoplayByClick | boolean | true | When enabled, autorun should stop by click. |
599
+ | transitionInterval | number | 4000 | Time in milliseconds to scroll items. |
600
+ | showThumbnails | boolean | true | Whether to display thumbnail container. |
601
+ | thumbnailsPosition | "top" \| "bottom" \| "left" \| "right" | 'bottom' | Position of thumbnails. |
602
+ | verticalThumbnailViewPortHeight | string | '300px' | Height of the viewport in vertical thumbnail. |
603
+ | showIndicators | boolean | false | Whether to display indicator container. |
604
+ | showIndicatorsOnItem | boolean | false | When enabled, indicator container is displayed on item container. |
605
+ | indicatorsPosition | "top" \| "bottom" \| "left" \| "right" | 'bottom' | Position of indicators. |
606
+ | baseZIndex | number | 0 | Base zIndex value to use in layering. |
607
+ | maskClass | string | - | Style class of the mask on fullscreen mode. |
608
+ | containerStyle | { [klass: string]: any } | - | Inline style of the component on fullscreen mode. Otherwise, the 'style' property can be used. |
609
+ | motionOptions | MotionOptions | - | The motion options. |
610
+ | maskMotionOptions | MotionOptions | - | The mask motion options. |
611
+ | visible | boolean | false | Specifies the visibility of the mask on fullscreen mode, supports one or two-way binding as well. Emits `visibleChange` with the new value when the visibility changes. |
471
612
 
472
613
  ### Templates
473
614