@ecl/gallery 5.0.0-alpha.1 → 5.0.0-alpha.10

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 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?
@@ -18,7 +18,7 @@
18
18
  - "sr_video_label" (string) (default: ''): additional label for the video items; for screen readers
19
19
  - "sr_video_player" (string) (default: ''): additional label for the video player; for screen readers
20
20
  - "picture_zoom" (bool) (default: false): Should the thumbnail pictures be animated?
21
- - "extra_classes" (optional) (string) (default: '')
21
+ - "extra_classes" (string) (default: '')
22
22
  - "extra_attributes" (optional) (array) (default: [])
23
23
  - "name" (string) Attribute name, eg. 'data-test'
24
24
  - "value" (string) Attribute value, eg: 'data-test-1'
@@ -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" (optional) (string) (default: '')
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'
@@ -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;
@@ -78,8 +79,8 @@ $gallery: null !default;
78
79
  .ecl-gallery__description {
79
80
  align-items: center;
80
81
  background-color: rgba(0, 0, 0, 0.7);
81
- color: map.get($theme, 'color', 'white');
82
- font: map.get($theme, 'font-print', 's');
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: map.get($theme, 'color', 'white');
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
@@ -41,7 +42,7 @@
41
42
  - "sr_video_label" (string) (default: ''): additional label for the video items; for screen readers
42
43
  - "sr_video_player" (string) (default: ''): additional label for the video player; for screen readers
43
44
  - "selected_item_id" (int) (default: 0)
44
- - "extra_classes" (optional) (string) (default: '')
45
+ - "extra_classes" (string) (default: '')
45
46
  - "extra_attributes" (optional) (array) (default: [])
46
47
  - "name" (string) Attribute name, eg. 'data-test'
47
48
  - "value" (string) Attribute value, eg: 'data-test-1'
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: map.get($theme, 'color', 'white');
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 color-mix(in srgb, var(--c-d-80) 55%, transparent);
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: var(--f-s);
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: var(--f-s);
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: map.get($theme, 'color', 'white');
323
+ color: #fff;
323
324
  margin: var(--s-xs);
324
325
 
325
326
  &:focus-visible {
326
- border-color: map.get($theme, 'color', 'white');
327
- color: map.get($theme, 'color', 'white');
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: map.get($theme, 'color', 'white');
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: map.get($theme, 'color', 'white');
402
- outline: 2px solid map.get($theme, 'color', 'white');
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 map.get($theme, 'color', 'white');
424
- border-right: 1px solid map.get($theme, 'color', 'white');
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($theme, 'font-weight', 'bold');
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: map.get($theme, 'color', 'white');
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.1",
5
+ "version": "5.0.0-alpha.10",
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.1",
15
- "@ecl/dom-utils": "5.0.0-alpha.1",
16
- "@ecl/icon": "5.0.0-alpha.1",
17
- "@ecl/link": "5.0.0-alpha.1",
18
- "@ecl/picture": "5.0.0-alpha.1",
19
- "@ecl/video": "5.0.0-alpha.1",
14
+ "@ecl/button": "5.0.0-alpha.10",
15
+ "@ecl/dom-utils": "5.0.0-alpha.10",
16
+ "@ecl/icon": "5.0.0-alpha.10",
17
+ "@ecl/link": "5.0.0-alpha.10",
18
+ "@ecl/picture": "5.0.0-alpha.10",
19
+ "@ecl/video": "5.0.0-alpha.10",
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": "f800b6d2de209fcfe182aadca5f7e45ad497b23a"
36
+ "gitHead": "8f085d9bbc9ebe568932bc297fdcf7f7a47da47b"
37
37
  }