@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.
- package/README.md +13 -1
- package/data/cards/accordion.md +91 -0
- package/data/cards/animateonscroll.md +155 -0
- package/data/cards/autocomplete.md +109 -0
- package/data/cards/autofocus.md +36 -0
- package/data/cards/avatar.md +45 -0
- package/data/cards/badge.md +44 -0
- package/data/cards/blockui.md +51 -0
- package/data/cards/breadcrumb.md +56 -0
- package/data/cards/button.md +83 -0
- package/data/cards/card.md +49 -0
- package/data/cards/carousel.md +101 -0
- package/data/cards/cascadeselect.md +77 -0
- package/data/cards/chart.md +105 -0
- package/data/cards/checkbox.md +59 -0
- package/data/cards/chip.md +50 -0
- package/data/cards/classnames.md +91 -0
- package/data/cards/colorpicker.md +52 -0
- package/data/cards/confirmdialog.md +119 -0
- package/data/cards/confirmpopup.md +96 -0
- package/data/cards/contextmenu.md +60 -0
- package/data/cards/dataview.md +134 -0
- package/data/cards/datepicker.md +103 -0
- package/data/cards/dialog.md +89 -0
- package/data/cards/divider.md +55 -0
- package/data/cards/dock.md +106 -0
- package/data/cards/dragdrop.md +106 -0
- package/data/cards/drawer.md +62 -0
- package/data/cards/dynamicdialog.md +103 -0
- package/data/cards/editor.md +55 -0
- package/data/cards/fieldset.md +54 -0
- package/data/cards/fileinput.md +72 -0
- package/data/cards/fileupload.md +88 -0
- package/data/cards/floatlabel.md +41 -0
- package/data/cards/fluid.md +49 -0
- package/data/cards/focustrap.md +64 -0
- package/data/cards/galleria.md +94 -0
- package/data/cards/iconfield.md +45 -0
- package/data/cards/iftalabel.md +38 -0
- package/data/cards/image.md +58 -0
- package/data/cards/imagecompare.md +45 -0
- package/data/cards/inplace.md +56 -0
- package/data/cards/inputgroup.md +77 -0
- package/data/cards/inputmask.md +71 -0
- package/data/cards/inputnumber.md +78 -0
- package/data/cards/inputotp.md +60 -0
- package/data/cards/inputtext.md +41 -0
- package/data/cards/keyfilter.md +49 -0
- package/data/cards/knob.md +55 -0
- package/data/cards/listbox.md +105 -0
- package/data/cards/megamenu.md +96 -0
- package/data/cards/menu.md +64 -0
- package/data/cards/menubar.md +102 -0
- package/data/cards/message.md +51 -0
- package/data/cards/metergroup.md +53 -0
- package/data/cards/multiselect.md +115 -0
- package/data/cards/orderlist.md +96 -0
- package/data/cards/organizationchart.md +84 -0
- package/data/cards/overlay.md +63 -0
- package/data/cards/paginator.md +62 -0
- package/data/cards/panel.md +57 -0
- package/data/cards/panelmenu.md +94 -0
- package/data/cards/password.md +81 -0
- package/data/cards/picklist.md +106 -0
- package/data/cards/popover.md +53 -0
- package/data/cards/progressbar.md +42 -0
- package/data/cards/progressspinner.md +38 -0
- package/data/cards/radiobutton.md +52 -0
- package/data/cards/rating.md +56 -0
- package/data/cards/ripple.md +37 -0
- package/data/cards/scroller.md +32 -0
- package/data/cards/scrollpanel.md +50 -0
- package/data/cards/scrolltop.md +48 -0
- package/data/cards/select.md +108 -0
- package/data/cards/selectbutton.md +64 -0
- package/data/cards/skeleton.md +54 -0
- package/data/cards/slider.md +52 -0
- package/data/cards/speeddial.md +102 -0
- package/data/cards/splitbutton.md +96 -0
- package/data/cards/splitter.md +52 -0
- package/data/cards/stepper.md +125 -0
- package/data/cards/styleclass.md +46 -0
- package/data/cards/table.md +305 -0
- package/data/cards/tabs.md +97 -0
- package/data/cards/tag.md +41 -0
- package/data/cards/terminal.md +76 -0
- package/data/cards/textarea.md +45 -0
- package/data/cards/tieredmenu.md +121 -0
- package/data/cards/timeline.md +58 -0
- package/data/cards/toast.md +58 -0
- package/data/cards/togglebutton.md +59 -0
- package/data/cards/toggleswitch.md +52 -0
- package/data/cards/toolbar.md +74 -0
- package/data/cards/tooltip.md +43 -0
- package/data/cards/tree.md +93 -0
- package/data/cards/treeselect.md +98 -0
- package/data/cards/treetable.md +231 -0
- package/data/components/accordion.md +31 -23
- package/data/components/animateonscroll.md +18 -15
- package/data/components/autocomplete.md +162 -93
- package/data/components/autofocus.md +9 -7
- package/data/components/avatar.md +56 -43
- package/data/components/badge.md +27 -18
- package/data/components/blockui.md +15 -8
- package/data/components/breadcrumb.md +20 -14
- package/data/components/button.md +121 -94
- package/data/components/card.md +12 -10
- package/data/components/carousel.md +75 -53
- package/data/components/cascadeselect.md +271 -238
- package/data/components/chart.md +88 -74
- package/data/components/checkbox.md +107 -97
- package/data/components/chip.md +20 -16
- package/data/components/classnames.md +22 -4
- package/data/components/colorpicker.md +54 -36
- package/data/components/confirmdialog.md +146 -43
- package/data/components/confirmpopup.md +95 -22
- package/data/components/contextmenu.md +110 -39
- package/data/components/dataview.md +176 -83
- package/data/components/datepicker.md +171 -141
- package/data/components/dialog.md +80 -68
- package/data/components/divider.md +17 -12
- package/data/components/dock.md +65 -29
- package/data/components/dragdrop.md +26 -12
- package/data/components/drawer.md +67 -48
- package/data/components/dynamicdialog.md +22 -13
- package/data/components/editor.md +42 -33
- package/data/components/fieldset.md +20 -17
- package/data/components/fileinput.md +92 -35
- package/data/components/fileupload.md +101 -61
- package/data/components/floatlabel.md +20 -11
- package/data/components/fluid.md +11 -9
- package/data/components/focustrap.md +11 -7
- package/data/components/galleria.md +231 -90
- package/data/components/iconfield.md +23 -15
- package/data/components/iftalabel.md +15 -9
- package/data/components/image.md +31 -26
- package/data/components/imagecompare.md +8 -6
- package/data/components/inplace.md +27 -22
- package/data/components/inputgroup.md +53 -29
- package/data/components/inputmask.md +107 -85
- package/data/components/inputnumber.md +128 -90
- package/data/components/inputotp.md +55 -42
- package/data/components/inputtext.md +72 -50
- package/data/components/keyfilter.md +6 -3
- package/data/components/knob.md +70 -58
- package/data/components/listbox.md +171 -141
- package/data/components/llms.md +4 -0
- package/data/components/megamenu.md +24 -23
- package/data/components/menu.md +37 -34
- package/data/components/menubar.md +27 -22
- package/data/components/message.md +44 -32
- package/data/components/metergroup.md +48 -17
- package/data/components/multiselect.md +232 -168
- package/data/components/orderlist.md +55 -48
- package/data/components/organizationchart.md +182 -13
- package/data/components/overlay.md +31 -26
- package/data/components/paginator.md +49 -34
- package/data/components/panel.md +23 -19
- package/data/components/panelmenu.md +51 -25
- package/data/components/password.md +104 -91
- package/data/components/picklist.md +93 -71
- package/data/components/popover.md +68 -46
- package/data/components/progressbar.md +28 -22
- package/data/components/progressspinner.md +13 -11
- package/data/components/radiobutton.md +69 -35
- package/data/components/rating.md +48 -40
- package/data/components/ripple.md +8 -6
- package/data/components/scroller.md +29 -29
- package/data/components/scrollpanel.md +9 -7
- package/data/components/scrolltop.md +20 -18
- package/data/components/select.md +248 -169
- package/data/components/selectbutton.md +118 -56
- package/data/components/skeleton.md +22 -18
- package/data/components/slider.md +73 -49
- package/data/components/speeddial.md +77 -59
- package/data/components/splitbutton.md +354 -329
- package/data/components/splitter.md +22 -18
- package/data/components/stepper.md +38 -21
- package/data/components/styleclass.md +12 -6
- package/data/components/table.md +524 -315
- package/data/components/tabs.md +44 -26
- package/data/components/tag.md +18 -14
- package/data/components/terminal.md +38 -27
- package/data/components/textarea.md +82 -47
- package/data/components/tieredmenu.md +34 -29
- package/data/components/timeline.md +29 -28
- package/data/components/toast.md +115 -57
- package/data/components/togglebutton.md +53 -39
- package/data/components/toggleswitch.md +41 -28
- package/data/components/toolbar.md +19 -18
- package/data/components/tooltip.md +43 -32
- package/data/components/tree.md +114 -81
- package/data/components/treeselect.md +176 -174
- package/data/components/treetable.md +1250 -1045
- package/data/components.json +4134 -4088
- package/data/llms-full.txt +8979 -6437
- package/data/llms.txt +100 -96
- package/data/manifest.json +183 -15
- package/data/pages/llms.md +29 -0
- package/data/pages/tailwind.md +20 -10
- package/data/snapshot.json +2 -2
- package/dist/index.d.mts +37 -2
- package/dist/index.mjs +1395 -1079
- package/dist/index.mjs.map +1 -1
- 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.
|
|
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 {
|
|
15
|
-
import {
|
|
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
|
-
[
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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,
|
|
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 [
|
|
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
|
-
|
|
211
|
-
|
|
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,
|
|
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 [
|
|
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
|
-
|
|
248
|
-
|
|
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,
|
|
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 [
|
|
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
|
-
|
|
289
|
-
|
|
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,
|
|
303
|
-
import {
|
|
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 [
|
|
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: [
|
|
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
|
-
|
|
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
|
-
|
|
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,
|
|
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 [
|
|
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
|
-
|
|
377
|
-
|
|
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,
|
|
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" [
|
|
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
|
|
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
|
-
|
|
425
|
-
|
|
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 |
|
|
442
|
-
| unstyled |
|
|
443
|
-
| pt |
|
|
444
|
-
| ptOptions |
|
|
445
|
-
| activeIndex |
|
|
446
|
-
| fullScreen |
|
|
447
|
-
| id |
|
|
448
|
-
| value |
|
|
449
|
-
| numVisible |
|
|
450
|
-
| responsiveOptions |
|
|
451
|
-
| showItemNavigators |
|
|
452
|
-
| showThumbnailNavigators |
|
|
453
|
-
| showItemNavigatorsOnHover |
|
|
454
|
-
| changeItemOnIndicatorHover |
|
|
455
|
-
| circular |
|
|
456
|
-
| autoPlay |
|
|
457
|
-
| shouldStopAutoplayByClick |
|
|
458
|
-
| transitionInterval |
|
|
459
|
-
| showThumbnails |
|
|
460
|
-
| thumbnailsPosition |
|
|
461
|
-
| verticalThumbnailViewPortHeight |
|
|
462
|
-
| showIndicators |
|
|
463
|
-
| showIndicatorsOnItem |
|
|
464
|
-
| indicatorsPosition |
|
|
465
|
-
| baseZIndex |
|
|
466
|
-
| maskClass |
|
|
467
|
-
| containerStyle |
|
|
468
|
-
| motionOptions |
|
|
469
|
-
| maskMotionOptions |
|
|
470
|
-
| visible |
|
|
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
|
|