diff --git a/oe_theme.theme b/oe_theme.theme index a7801abf9..36dbaf8cf 100644 --- a/oe_theme.theme +++ b/oe_theme.theme @@ -2577,7 +2577,7 @@ function oe_theme_preprocess_pattern_highlighted_list(array &$variables): void { $item['#fields']['image'] = NULL; $item['#fields']['detail'] = NULL; } - if ($key !== 2) { + if ($key < count($variables['items']) - 1) { $item['#fields']['extra_classes'] = 'ecl-u-flex-grow-1 ecl-u-mb-m'; } else { diff --git a/package.json b/package.json index 32f0e539a..74a13a566 100644 --- a/package.json +++ b/package.json @@ -14,56 +14,56 @@ "prepare": "patch-package" }, "dependencies": { - "@ecl/builder": "4.0.1", - "@ecl/preset-ec": "4.0.1", - "@ecl/preset-eu": "4.0.1", - "@ecl/preset-reset": "4.0.1", + "@ecl/builder": "4.0.2", + "@ecl/preset-ec": "4.0.2", + "@ecl/preset-eu": "4.0.2", + "@ecl/preset-reset": "4.0.2", "@ecl/stylelint-config": "0.2.1", - "@ecl/theme-ec": "4.0.1", - "@ecl/theme-eu": "4.0.1", - "@ecl/twig-component-accordion": "4.0.1", - "@ecl/twig-component-banner": "4.0.1", - "@ecl/twig-component-blockquote": "4.0.1", - "@ecl/twig-component-breadcrumb": "4.0.1", - "@ecl/twig-component-button": "4.0.1", - "@ecl/twig-component-card": "4.0.1", - "@ecl/twig-component-carousel": "4.0.1", - "@ecl/twig-component-content-item": "4.0.1", - "@ecl/twig-component-datepicker": "4.0.1", - "@ecl/twig-component-description-list": "4.0.1", - "@ecl/twig-component-expandable": "4.0.1", - "@ecl/twig-component-fact-figures": "4.0.1", - "@ecl/twig-component-featured-item": "4.0.1", - "@ecl/twig-component-file": "4.0.1", - "@ecl/twig-component-gallery": "4.0.1", - "@ecl/twig-component-icon": "4.0.1", - "@ecl/twig-component-inpage-navigation": "4.0.1", - "@ecl/twig-component-label": "4.0.1", - "@ecl/twig-component-link": "4.0.1", - "@ecl/twig-component-list-illustration": "4.0.1", - "@ecl/twig-component-media-container": "4.0.1", - "@ecl/twig-component-menu": "4.0.1", - "@ecl/twig-component-navigation-list": "4.0.1", - "@ecl/twig-component-news-ticker": "4.0.1", - "@ecl/twig-component-notification": "4.0.1", - "@ecl/twig-component-page-header": "4.0.1", - "@ecl/twig-component-pagination": "4.0.1", - "@ecl/twig-component-radio": "4.0.1", - "@ecl/twig-component-search-form": "4.0.1", - "@ecl/twig-component-select": "4.0.1", - "@ecl/twig-component-site-footer": "4.0.1", - "@ecl/twig-component-site-header": "4.0.1", - "@ecl/twig-component-skip-link": "4.0.1", - "@ecl/twig-component-social-media-follow": "4.0.1", - "@ecl/twig-component-social-media-share": "4.0.1", - "@ecl/twig-component-splash-page": "4.0.1", - "@ecl/twig-component-table": "4.0.1", - "@ecl/twig-component-tabs": "4.0.1", - "@ecl/twig-component-tag": "4.0.1", - "@ecl/twig-component-text-input": "4.0.1", - "@ecl/twig-component-timeline": "4.0.1", - "@ecl/vanilla-utility-background": "4.0.1", - "@ecl/vanilla-utility-border": "4.0.1", + "@ecl/theme-ec": "4.0.2", + "@ecl/theme-eu": "4.0.2", + "@ecl/twig-component-accordion": "4.0.2", + "@ecl/twig-component-banner": "4.0.2", + "@ecl/twig-component-blockquote": "4.0.2", + "@ecl/twig-component-breadcrumb": "4.0.2", + "@ecl/twig-component-button": "4.0.2", + "@ecl/twig-component-card": "4.0.2", + "@ecl/twig-component-carousel": "4.0.2", + "@ecl/twig-component-content-item": "4.0.2", + "@ecl/twig-component-datepicker": "4.0.2", + "@ecl/twig-component-description-list": "4.0.2", + "@ecl/twig-component-expandable": "4.0.2", + "@ecl/twig-component-fact-figures": "4.0.2", + "@ecl/twig-component-featured-item": "4.0.2", + "@ecl/twig-component-file": "4.0.2", + "@ecl/twig-component-gallery": "4.0.2", + "@ecl/twig-component-icon": "4.0.2", + "@ecl/twig-component-inpage-navigation": "4.0.2", + "@ecl/twig-component-label": "4.0.2", + "@ecl/twig-component-link": "4.0.2", + "@ecl/twig-component-list-illustration": "4.0.2", + "@ecl/twig-component-media-container": "4.0.2", + "@ecl/twig-component-menu": "4.0.2", + "@ecl/twig-component-navigation-list": "4.0.2", + "@ecl/twig-component-news-ticker": "4.0.2", + "@ecl/twig-component-notification": "4.0.2", + "@ecl/twig-component-page-header": "4.0.2", + "@ecl/twig-component-pagination": "4.0.2", + "@ecl/twig-component-radio": "4.0.2", + "@ecl/twig-component-search-form": "4.0.2", + "@ecl/twig-component-select": "4.0.2", + "@ecl/twig-component-site-footer": "4.0.2", + "@ecl/twig-component-site-header": "4.0.2", + "@ecl/twig-component-skip-link": "4.0.2", + "@ecl/twig-component-social-media-follow": "4.0.2", + "@ecl/twig-component-social-media-share": "4.0.2", + "@ecl/twig-component-splash-page": "4.0.2", + "@ecl/twig-component-table": "4.0.2", + "@ecl/twig-component-tabs": "4.0.2", + "@ecl/twig-component-tag": "4.0.2", + "@ecl/twig-component-text-input": "4.0.2", + "@ecl/twig-component-timeline": "4.0.2", + "@ecl/vanilla-utility-background": "4.0.2", + "@ecl/vanilla-utility-border": "4.0.2", "chokidar-cli": "3.0.0", "grunt": "1.6.1", "grunt-contrib-copy": "1.0.0", diff --git a/patches/@ecl+twig-component-content-block+4.0.1.patch b/patches/@ecl+twig-component-content-block+4.0.2.patch similarity index 100% rename from patches/@ecl+twig-component-content-block+4.0.1.patch rename to patches/@ecl+twig-component-content-block+4.0.2.patch diff --git a/patches/@ecl+twig-component-file+4.0.1.patch b/patches/@ecl+twig-component-file+4.0.2.patch similarity index 100% rename from patches/@ecl+twig-component-file+4.0.1.patch rename to patches/@ecl+twig-component-file+4.0.2.patch diff --git a/patches/@ecl+twig-component-menu+4.0.1.patch b/patches/@ecl+twig-component-menu+4.0.2.patch similarity index 100% rename from patches/@ecl+twig-component-menu+4.0.1.patch rename to patches/@ecl+twig-component-menu+4.0.2.patch diff --git a/patches/@ecl+twig-component-site-footer+4.0.1.patch b/patches/@ecl+twig-component-site-footer+4.0.2.patch similarity index 100% rename from patches/@ecl+twig-component-site-footer+4.0.1.patch rename to patches/@ecl+twig-component-site-footer+4.0.2.patch diff --git a/patches/@ecl+twig-component-tabs+4.0.1.patch b/patches/@ecl+twig-component-tabs+4.0.2.patch similarity index 100% rename from patches/@ecl+twig-component-tabs+4.0.1.patch rename to patches/@ecl+twig-component-tabs+4.0.2.patch diff --git a/templates/patterns/social_icon/pattern-social-icon.html.twig b/templates/patterns/social_icon/pattern-social-icon.html.twig index a87a88f39..dd7fd344d 100644 --- a/templates/patterns/social_icon/pattern-social-icon.html.twig +++ b/templates/patterns/social_icon/pattern-social-icon.html.twig @@ -14,6 +14,7 @@ 'icon': { 'path': ecl_icon_social_media_path, 'name': service, + 'size': size|default('xs'), 'extra_classes': 'ecl-social-media-follow__icon' }, 'extra_classes': 'ecl-social-media-follow__link' diff --git a/templates/patterns/social_icon/social_icon.ui_patterns.yml b/templates/patterns/social_icon/social_icon.ui_patterns.yml index 68b3e31a5..8c83b2904 100644 --- a/templates/patterns/social_icon/social_icon.ui_patterns.yml +++ b/templates/patterns/social_icon/social_icon.ui_patterns.yml @@ -17,3 +17,8 @@ social_icon: label: "URL" description: "URL to link the social icon to. Optional. (A Drupal Url object)" preview: "http://example.com" + size: + type: "text" + label: "Size" + description: "The icon size. Defaults to 'xs'." + preview: "l" diff --git a/tests/src/Kernel/fixtures/rendering.yml b/tests/src/Kernel/fixtures/rendering.yml index 41829d390..c0f478dea 100644 --- a/tests/src/Kernel/fixtures/rendering.yml +++ b/tests/src/Kernel/fixtures/rendering.yml @@ -2250,7 +2250,21 @@ assertions: count: 'a.ecl-link.ecl-link--standalone.ecl-link--icon[href="http://facebook.com"]': 1 - 'svg.ecl-link__icon': 1 + 'svg.ecl-icon--xs.ecl-link__icon.ecl-social-media-follow__icon': 1 + equals: + 'a.ecl-link.ecl-link--standalone.ecl-link--icon span.ecl-link__label': "Facebook" +- array: + '#type': pattern + '#id': social_icon + '#fields': + service: "facebook" + label: "Facebook" + url: "http://facebook.com" + size: "l" + assertions: + count: + 'a.ecl-link.ecl-link--standalone.ecl-link--icon[href="http://facebook.com"]': 1 + 'svg.ecl-icon--l.ecl-link__icon.ecl-social-media-follow__icon': 1 equals: 'a.ecl-link.ecl-link--standalone.ecl-link--icon span.ecl-link__label': "Facebook" - array: @@ -3859,7 +3873,7 @@ 'div.ecl-row div.ecl-col-l-8.ecl-u-d-flex.ecl-u-flex-column': 1 'div.ecl-row div.ecl-col-l-4.ecl-u-d-flex.ecl-u-flex-column': 1 'div.ecl-row article.ecl-content-item--divider.ecl-u-flex-grow-1': 3 - 'div.ecl-row article.ecl-content-item--divider.ecl-u-flex-grow-1.ecl-u-mb-m': 2 + 'div.ecl-row article.ecl-content-item--divider.ecl-u-flex-grow-1.ecl-u-mb-m': 1 'div.ecl-content-block__title': 3 'div.ecl-content-block__title a': 1 'picture.ecl-content-item__picture': 2