@ecl/gallery 5.0.0-alpha.1 → 5.0.0-alpha.11
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 +1 -7
- package/gallery-item.html.twig +11 -16
- package/gallery-overlay.html.twig +2 -2
- package/gallery-print.scss +5 -4
- package/gallery.html.twig +2 -5
- package/gallery.js +1 -1
- package/gallery.scss +21 -20
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -9,6 +9,7 @@ npm install --save @ecl/gallery
|
|
|
9
9
|
### Parameters
|
|
10
10
|
|
|
11
11
|
- **"grid"** (boolean) (default: false) Display gallery as a grid
|
|
12
|
+
- **"grid_template"** (int) (default: 0) Id of the template to be used. Grid display only
|
|
12
13
|
- **"column"** (int) (default: 3) Number of columns. Grid display only
|
|
13
14
|
- **"ratio"** (string) (default: '3-2') Image aspect ratio. Grid dipslay only
|
|
14
15
|
- **"picture_zoom"** (bool) (default: false): Should the thumbnail pictures be animated?
|
|
@@ -35,7 +36,6 @@ npm install --save @ecl/gallery
|
|
|
35
36
|
- "share_path" (optional) (string) (default: '')
|
|
36
37
|
- **"visible_items"** (integer) (default: 8) Number of visible items in an expandable gallery
|
|
37
38
|
- **"expandable"** (boolean) (default: true) collapsible/expandable gallery
|
|
38
|
-
- **"icon_path"** (string) (default: '') Path to the icon sprite
|
|
39
39
|
- **"sr_gallery_label"** (string) (default: ''): additional label for the gallery, providing instruction; for screen readers
|
|
40
40
|
- **"sr_video_label"** (string) (default: ''): additional label for the video items; for screen readers
|
|
41
41
|
- **"sr_video_player"** (string) (default: ''): additional label for the video player; for screen readers
|
|
@@ -95,7 +95,6 @@ npm install --save @ecl/gallery
|
|
|
95
95
|
description: 'Living, working, travelling in the EU',
|
|
96
96
|
meta: 'Copyright, Author, Licence for image 2',
|
|
97
97
|
icon: {
|
|
98
|
-
path: 'path/to/icons.svg',
|
|
99
98
|
name: 'audio',
|
|
100
99
|
},
|
|
101
100
|
share_href: '/share#example-image2.jpg',
|
|
@@ -109,7 +108,6 @@ npm install --save @ecl/gallery
|
|
|
109
108
|
aria_label: "View all link aria-label value"
|
|
110
109
|
},
|
|
111
110
|
icon: {
|
|
112
|
-
path: "/icons.svg",
|
|
113
111
|
name: "external",
|
|
114
112
|
size: "s"
|
|
115
113
|
}
|
|
@@ -119,7 +117,6 @@ npm install --save @ecl/gallery
|
|
|
119
117
|
variant: 'ghost',
|
|
120
118
|
label: 'Close',
|
|
121
119
|
icon: {
|
|
122
|
-
path: 'path/to/icons.svg',
|
|
123
120
|
name: 'close',
|
|
124
121
|
size: 's',
|
|
125
122
|
},
|
|
@@ -128,7 +125,6 @@ npm install --save @ecl/gallery
|
|
|
128
125
|
variant: 'ghost',
|
|
129
126
|
label: 'Previous',
|
|
130
127
|
icon: {
|
|
131
|
-
path: 'path/to/icons.svg',
|
|
132
128
|
name: 'corner-arrow',
|
|
133
129
|
transform: 'rotate-270',
|
|
134
130
|
size: 'l',
|
|
@@ -139,7 +135,6 @@ npm install --save @ecl/gallery
|
|
|
139
135
|
variant: 'ghost',
|
|
140
136
|
label: 'Next',
|
|
141
137
|
icon: {
|
|
142
|
-
path: 'path/to/icons.svg',
|
|
143
138
|
name: 'corner-arrow',
|
|
144
139
|
transform: 'rotate-90',
|
|
145
140
|
size: 'l',
|
|
@@ -150,7 +145,6 @@ npm install --save @ecl/gallery
|
|
|
150
145
|
share: {
|
|
151
146
|
label: 'Share',
|
|
152
147
|
icon: {
|
|
153
|
-
path: 'path/to/icons.svg',
|
|
154
148
|
name: 'share',
|
|
155
149
|
size: 'fluid',
|
|
156
150
|
},
|
package/gallery-item.html.twig
CHANGED
|
@@ -14,11 +14,10 @@
|
|
|
14
14
|
- "embedded_video" (optional) (object) (default: {})
|
|
15
15
|
- "sr_video_audio" (string) (default: ''): additional text to indicate if there is an audio description; for screen readers
|
|
16
16
|
- "share_path" (optional) (string) (default: '')
|
|
17
|
-
- "icon_path": (string) (default '')
|
|
18
17
|
- "sr_video_label" (string) (default: ''): additional label for the video items; for screen readers
|
|
19
18
|
- "sr_video_player" (string) (default: ''): additional label for the video player; for screen readers
|
|
20
19
|
- "picture_zoom" (bool) (default: false): Should the thumbnail pictures be animated?
|
|
21
|
-
- "extra_classes" (
|
|
20
|
+
- "extra_classes" (string) (default: '')
|
|
22
21
|
- "extra_attributes" (optional) (array) (default: [])
|
|
23
22
|
- "name" (string) Attribute name, eg. 'data-test'
|
|
24
23
|
- "value" (string) Attribute value, eg: 'data-test-1'
|
|
@@ -36,7 +35,6 @@
|
|
|
36
35
|
{% set _item = item|default({}) %}
|
|
37
36
|
{% set _picture = item.picture|default({}) %}
|
|
38
37
|
{% set _thumbnail = item.thumbnail|default({}) %}
|
|
39
|
-
{% set _icon_path = icon_path|default('') %}
|
|
40
38
|
{% set _sr_video_label = sr_video_label|default('') %}
|
|
41
39
|
{% set _sr_video_player = sr_video_player|default('') %}
|
|
42
40
|
{% set _picture_zoom = picture_zoom|default(false) %}
|
|
@@ -118,19 +116,16 @@
|
|
|
118
116
|
{% set _image_alt = _image_alt ~ ' - ' ~ _sr_video_label %}
|
|
119
117
|
{% endif %}
|
|
120
118
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
} only %}
|
|
132
|
-
</div>
|
|
133
|
-
{% endif %}
|
|
119
|
+
<div class="ecl-gallery__item-icon-wrapper">
|
|
120
|
+
{%- include '@ecl/icon/icon.html.twig' with {
|
|
121
|
+
icon: {
|
|
122
|
+
name: 'play-filled',
|
|
123
|
+
size: 'l',
|
|
124
|
+
color: 'inverted',
|
|
125
|
+
},
|
|
126
|
+
extra_classes: 'ecl-gallery__item-icon',
|
|
127
|
+
} only %}
|
|
128
|
+
</div>
|
|
134
129
|
{% endif %}
|
|
135
130
|
|
|
136
131
|
{% set _thumbnail_markup %}
|
|
@@ -8,10 +8,11 @@
|
|
|
8
8
|
- "next" (object) (default: {}): object of type button
|
|
9
9
|
- "counter_separator" (string) (default: '')
|
|
10
10
|
- "full_screen_label" (string) (default: '')
|
|
11
|
+
- "download" (object) (default: {}): object of type link
|
|
11
12
|
- "share" (object) (default: {}): object of type link
|
|
12
13
|
- "sr_overlay_label" (string) (default: '') aria-label for the overlay
|
|
13
14
|
- "item" (object) (default: {}): object of type gallery-item
|
|
14
|
-
- "extra_classes" (
|
|
15
|
+
- "extra_classes" (string) (default: '')
|
|
15
16
|
- "extra_attributes" (optional) (array) (default: [])
|
|
16
17
|
- "name" (string) Attribute name, eg. 'data-test'
|
|
17
18
|
- "value" (string) Attribute value, eg: 'data-test-1'
|
|
@@ -130,7 +131,6 @@
|
|
|
130
131
|
icon: {
|
|
131
132
|
name: 'fullscreen',
|
|
132
133
|
size: 'fluid',
|
|
133
|
-
path: icon_path|default('')
|
|
134
134
|
},
|
|
135
135
|
extra_classes: 'ecl-gallery__download',
|
|
136
136
|
extra_attributes: [
|
package/gallery-print.scss
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
// Exposed variables
|
|
9
9
|
$theme: null !default;
|
|
10
10
|
$gallery: null !default;
|
|
11
|
+
$gallery-print: null !default;
|
|
11
12
|
|
|
12
13
|
.ecl-gallery {
|
|
13
14
|
margin: 0;
|
|
@@ -77,9 +78,9 @@ $gallery: null !default;
|
|
|
77
78
|
|
|
78
79
|
.ecl-gallery__description {
|
|
79
80
|
align-items: center;
|
|
80
|
-
background-color:
|
|
81
|
-
color:
|
|
82
|
-
font: map.get($
|
|
81
|
+
background-color: rgb(0, 0, 0, 0.7);
|
|
82
|
+
color: #fff;
|
|
83
|
+
font: map.get($gallery-print, 'description-font');
|
|
83
84
|
padding: map.get($theme, 'spacing-print', '2xs')
|
|
84
85
|
map.get($theme, 'spacing-print', 'xs');
|
|
85
86
|
text-decoration: none;
|
|
@@ -163,7 +164,7 @@ $gallery: null !default;
|
|
|
163
164
|
padding: map.get($theme, 'spacing-print', 'm');
|
|
164
165
|
|
|
165
166
|
* {
|
|
166
|
-
color:
|
|
167
|
+
color: #fff;
|
|
167
168
|
}
|
|
168
169
|
}
|
|
169
170
|
|
package/gallery.html.twig
CHANGED
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
- "next" (object) (default: {}): object of type button
|
|
23
23
|
- "counter_separator" (string) (default: '')
|
|
24
24
|
- "full_screen_label" (string) (default: '')
|
|
25
|
+
- "download" (object) (default: {}): object of type link
|
|
25
26
|
- "share" (object) (default: {}): object of type link
|
|
26
27
|
- "sr_overlay_label" (string) (default: '') aria-label for the overlay
|
|
27
28
|
- "footer" (object) (default: {}): object of type link
|
|
@@ -36,12 +37,11 @@
|
|
|
36
37
|
- "embedded_video" (optional) (object) (default: {})
|
|
37
38
|
- "sr_video_audio" (string) (default: ''): additional text to indicate if there is an audio description; for screen readers
|
|
38
39
|
- "share_path" (optional) (string) (default: '')
|
|
39
|
-
- "icon_path": (string) (default: '')
|
|
40
40
|
- "sr_gallery_label" (string) (default: ''): additional label for the gallery, providing instruction; for screen readers
|
|
41
41
|
- "sr_video_label" (string) (default: ''): additional label for the video items; for screen readers
|
|
42
42
|
- "sr_video_player" (string) (default: ''): additional label for the video player; for screen readers
|
|
43
43
|
- "selected_item_id" (int) (default: 0)
|
|
44
|
-
- "extra_classes" (
|
|
44
|
+
- "extra_classes" (string) (default: '')
|
|
45
45
|
- "extra_attributes" (optional) (array) (default: [])
|
|
46
46
|
- "name" (string) Attribute name, eg. 'data-test'
|
|
47
47
|
- "value" (string) Attribute value, eg: 'data-test-1'
|
|
@@ -66,7 +66,6 @@
|
|
|
66
66
|
{% set _visible_items = visible_items|default(8) %}
|
|
67
67
|
{% set _disable_hover = disable_hover|default(false) %}
|
|
68
68
|
{% set _disable_overlay = disable_overlay|default(false) %}
|
|
69
|
-
{% set _icon_path = icon_path|default('') %}
|
|
70
69
|
{% set _sr_gallery_label = sr_gallery_label|default('') %}
|
|
71
70
|
{% set _sr_video_label = sr_video_label|default('') %}
|
|
72
71
|
{% set _expandable = expandable ?? true %}
|
|
@@ -151,7 +150,6 @@
|
|
|
151
150
|
{% include '@ecl/gallery/gallery-item.html.twig' with {
|
|
152
151
|
id: "ecl-gallery-item-" ~ _id ~ '-' ~ _key,
|
|
153
152
|
item: _item,
|
|
154
|
-
icon_path: _icon_path,
|
|
155
153
|
sr_video_label: _sr_video_label,
|
|
156
154
|
sr_video_player: _sr_video_player,
|
|
157
155
|
disable_overlay: _disable_overlay,
|
|
@@ -209,7 +207,6 @@
|
|
|
209
207
|
extra_attributes: _overlay_attrs,
|
|
210
208
|
extra_classes: _overlay_class,
|
|
211
209
|
item: _selected_item,
|
|
212
|
-
icon_path: _icon_path,
|
|
213
210
|
} only %}
|
|
214
211
|
</section>
|
|
215
212
|
|
package/gallery.js
CHANGED
package/gallery.scss
CHANGED
|
@@ -12,7 +12,7 @@ $theme: null !default;
|
|
|
12
12
|
$gallery: null !default;
|
|
13
13
|
|
|
14
14
|
// Internal variables
|
|
15
|
-
$_description-color:
|
|
15
|
+
$_description-color: #fff;
|
|
16
16
|
$_image-height: 192px;
|
|
17
17
|
$_image-height-mobile: 260px;
|
|
18
18
|
$_description-height-mobile: 132px;
|
|
@@ -51,8 +51,9 @@ $_description-height-desktop: 108px;
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
.ecl-gallery__item-icon-wrapper {
|
|
54
|
-
background: var(--c-d);
|
|
55
|
-
box-shadow: 0 0 15px 6px
|
|
54
|
+
background: var(--cm-on-surface-dark, var(--c-d));
|
|
55
|
+
box-shadow: 0 0 15px 6px
|
|
56
|
+
color-mix(in srgb, var(--cm-surface-dark, var(--c-d-80)) 55%, transparent);
|
|
56
57
|
display: inline-block;
|
|
57
58
|
position: absolute;
|
|
58
59
|
left: 50%;
|
|
@@ -82,7 +83,7 @@ $_description-height-desktop: 108px;
|
|
|
82
83
|
outline: none;
|
|
83
84
|
|
|
84
85
|
.ecl-gallery__image-container {
|
|
85
|
-
outline: 2px solid var(--c-p);
|
|
86
|
+
outline: 2px solid var(--cm-border-primary, var(--c-p));
|
|
86
87
|
outline-offset: 2px;
|
|
87
88
|
}
|
|
88
89
|
}
|
|
@@ -130,7 +131,7 @@ $_description-height-desktop: 108px;
|
|
|
130
131
|
background-color: map.get($gallery, 'description-background');
|
|
131
132
|
color: $_description-color;
|
|
132
133
|
display: none;
|
|
133
|
-
font:
|
|
134
|
+
font: map.get($gallery, 'description-font');
|
|
134
135
|
left: 0;
|
|
135
136
|
overflow: hidden;
|
|
136
137
|
padding: var(--s-2xs) var(--s-xs);
|
|
@@ -161,7 +162,7 @@ $_description-height-desktop: 108px;
|
|
|
161
162
|
color: map.get($gallery, 'gallery-info-color');
|
|
162
163
|
display: flex;
|
|
163
164
|
flex-direction: row;
|
|
164
|
-
font:
|
|
165
|
+
font: map.get($gallery, 'gallery-info-font');
|
|
165
166
|
}
|
|
166
167
|
|
|
167
168
|
.ecl-gallery__info-total {
|
|
@@ -193,7 +194,7 @@ $_description-height-desktop: 108px;
|
|
|
193
194
|
}
|
|
194
195
|
|
|
195
196
|
.ecl-gallery__footer-divider {
|
|
196
|
-
background: var(--c-n-100);
|
|
197
|
+
background: var(--cm-border-neutral, (--c-n-100));
|
|
197
198
|
border: none;
|
|
198
199
|
height: 1px;
|
|
199
200
|
width: 100%;
|
|
@@ -319,12 +320,12 @@ $_description-height-desktop: 108px;
|
|
|
319
320
|
}
|
|
320
321
|
|
|
321
322
|
.ecl-gallery__close-button {
|
|
322
|
-
color:
|
|
323
|
+
color: #fff;
|
|
323
324
|
margin: var(--s-xs);
|
|
324
325
|
|
|
325
326
|
&:focus-visible {
|
|
326
|
-
border-color:
|
|
327
|
-
color:
|
|
327
|
+
border-color: #fff;
|
|
328
|
+
color: #fff;
|
|
328
329
|
}
|
|
329
330
|
}
|
|
330
331
|
|
|
@@ -390,16 +391,16 @@ $_description-height-desktop: 108px;
|
|
|
390
391
|
|
|
391
392
|
.ecl-gallery__slider-previous,
|
|
392
393
|
.ecl-gallery__slider-next {
|
|
393
|
-
background:
|
|
394
|
+
background-color: #fff;
|
|
394
395
|
flex-shrink: 0;
|
|
395
396
|
|
|
396
397
|
&:hover {
|
|
397
|
-
background-color: var(--c-p-20);
|
|
398
|
+
background-color: var(--cm-surface-neutral-lowest, var(--c-p-20));
|
|
398
399
|
}
|
|
399
400
|
|
|
400
401
|
&:focus-visible {
|
|
401
|
-
background-color:
|
|
402
|
-
outline: 2px solid
|
|
402
|
+
background-color: #fff;
|
|
403
|
+
outline: 2px solid #fff;
|
|
403
404
|
outline-offset: 0;
|
|
404
405
|
}
|
|
405
406
|
}
|
|
@@ -410,6 +411,7 @@ $_description-height-desktop: 108px;
|
|
|
410
411
|
display: flex;
|
|
411
412
|
flex-direction: column;
|
|
412
413
|
flex-shrink: 0;
|
|
414
|
+
font: var(--f-m);
|
|
413
415
|
padding: var(--s-xl) var(--s-xs);
|
|
414
416
|
|
|
415
417
|
.ecl-container {
|
|
@@ -420,10 +422,9 @@ $_description-height-desktop: 108px;
|
|
|
420
422
|
|
|
421
423
|
.ecl-gallery__detail-counter {
|
|
422
424
|
align-self: center;
|
|
423
|
-
border-left: 1px solid
|
|
424
|
-
border-right: 1px solid
|
|
425
|
+
border-left: 1px solid #fff;
|
|
426
|
+
border-right: 1px solid #fff;
|
|
425
427
|
display: inline-flex;
|
|
426
|
-
font: var(--f-m);
|
|
427
428
|
margin: 0;
|
|
428
429
|
padding: 0 var(--s-xs);
|
|
429
430
|
white-space: pre-wrap;
|
|
@@ -455,18 +456,18 @@ $_description-height-desktop: 108px;
|
|
|
455
456
|
}
|
|
456
457
|
|
|
457
458
|
.ecl-gallery__detail-description {
|
|
458
|
-
font: var(--f-m);
|
|
459
459
|
height: $_description-height-mobile;
|
|
460
460
|
margin-top: var(--s-s);
|
|
461
461
|
overflow: auto;
|
|
462
462
|
|
|
463
463
|
.ecl-gallery__title {
|
|
464
464
|
display: block;
|
|
465
|
-
font-weight: map.get($
|
|
465
|
+
font-weight: map.get($gallery, 'overlay-title-font-weight');
|
|
466
466
|
}
|
|
467
467
|
|
|
468
468
|
.ecl-gallery__meta {
|
|
469
469
|
display: block;
|
|
470
|
+
font: map.get($gallery, 'overlay-meta-font');
|
|
470
471
|
margin-top: var(--s-s);
|
|
471
472
|
}
|
|
472
473
|
}
|
|
@@ -684,5 +685,5 @@ $_description-height-desktop: 108px;
|
|
|
684
685
|
.ecl-gallery__video-title {
|
|
685
686
|
@include screen-reader.sr-only;
|
|
686
687
|
|
|
687
|
-
background-color:
|
|
688
|
+
background-color: #fff;
|
|
688
689
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@ecl/gallery",
|
|
3
3
|
"author": "European Commission",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
|
-
"version": "5.0.0-alpha.
|
|
5
|
+
"version": "5.0.0-alpha.11",
|
|
6
6
|
"description": "ECL Gallery",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
"module": "gallery.js",
|
|
12
12
|
"style": "gallery.scss",
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@ecl/button": "5.0.0-alpha.
|
|
15
|
-
"@ecl/dom-utils": "5.0.0-alpha.
|
|
16
|
-
"@ecl/icon": "5.0.0-alpha.
|
|
17
|
-
"@ecl/link": "5.0.0-alpha.
|
|
18
|
-
"@ecl/picture": "5.0.0-alpha.
|
|
19
|
-
"@ecl/video": "5.0.0-alpha.
|
|
14
|
+
"@ecl/button": "5.0.0-alpha.11",
|
|
15
|
+
"@ecl/dom-utils": "5.0.0-alpha.11",
|
|
16
|
+
"@ecl/icon": "5.0.0-alpha.11",
|
|
17
|
+
"@ecl/link": "5.0.0-alpha.11",
|
|
18
|
+
"@ecl/picture": "5.0.0-alpha.11",
|
|
19
|
+
"@ecl/video": "5.0.0-alpha.11",
|
|
20
20
|
"focus-trap": "7.6.4"
|
|
21
21
|
},
|
|
22
22
|
"repository": {
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"design-system",
|
|
34
34
|
"twig"
|
|
35
35
|
],
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "e2c8581dfaabe6f67ff063fed5839034f0148db3"
|
|
37
37
|
}
|