@ecl/button 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 CHANGED
@@ -30,7 +30,6 @@ npm install --save @ecl/button
30
30
  label: 'Example button',
31
31
  disabled: false,
32
32
  icon: {
33
- path: '/path-to-the-icon-file',
34
33
  type: 'ui',
35
34
  name: 'corner-arrow',
36
35
  size: 'xs,'
package/button.html.twig CHANGED
@@ -4,7 +4,7 @@
4
4
  {#
5
5
  Parameters:
6
6
  - "label" (string) (default: '')
7
- - "variant" (string) (default: 'primary'): can be 'primary', 'secondary', 'cta', 'ghost', 'ghost-inverted', 'tertiaty'
7
+ - "variant" (string) (default: 'primary'): can be 'primary', 'secondary', 'cta', 'ghost', 'ghost-inverted', 'tertiary'
8
8
  - "type" (string) (default: 'submit'): can be the same type as HTML button - 'submit', 'reset', 'button'
9
9
  - "icon" (associative array) OR (array) of associative arrays : format
10
10
  {
@@ -48,12 +48,11 @@
48
48
  {% set _icon_position = icon_position|default('after') %}
49
49
  {% set _disabled = disabled|default(false) %}
50
50
  {% set _hide_label = hide_label|default(false) %}
51
- {% set _icon = {
51
+ {% set _icon = icon|default({
52
52
  name: '',
53
- path: '',
54
53
  size: '',
55
54
  title: ''
56
- } %}
55
+ }) %}
57
56
  {% set _indicator = indicator|default({}) %}
58
57
 
59
58
  {# Internal logic - Process properties #}
@@ -74,10 +73,10 @@
74
73
  {% endfor %}
75
74
  {% endif %}
76
75
 
77
- {% if icon.name is defined and icon.name is not empty %}
78
- {% set _icons = [icon] %}
79
- {% elseif icon[1] is defined and icon[1] is not empty %}
80
- {% set _icons = icon %}
76
+ {% if _icon.name is defined and _icon.name is not empty %}
77
+ {% set _icons = [_icon] %}
78
+ {% elseif _icon[1] is defined and _icon[1] is not empty %}
79
+ {% set _icons = _icon %}
81
80
  {% endif %}
82
81
 
83
82
  {% if _hide_label and _icon is not empty %}
package/button.scss CHANGED
@@ -10,9 +10,6 @@
10
10
  $theme: null !default;
11
11
  $button: null !default;
12
12
 
13
- // Internal variables
14
- $min-width: 44px; // According to COMM every interactive element should be at least 44px large
15
-
16
13
  .ecl-button,
17
14
  %ecl-button {
18
15
  appearance: none;
@@ -25,7 +22,7 @@ $min-width: 44px; // According to COMM every interactive element should be at le
25
22
  font: map.get($button, 'font');
26
23
  margin: 0;
27
24
  min-height: map.get($button, 'min-height');
28
- min-width: $min-width;
25
+ min-width: map.get($button, 'min-width');
29
26
  text-decoration: none;
30
27
 
31
28
  &:hover {
package/package.json CHANGED
@@ -2,15 +2,18 @@
2
2
  "name": "@ecl/button",
3
3
  "author": "European Commission",
4
4
  "license": "EUPL-1.2",
5
- "version": "5.0.0-alpha.1",
5
+ "version": "5.0.0-alpha.11",
6
6
  "description": "ECL Button",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
10
10
  "style": "button.scss",
11
11
  "dependencies": {
12
- "@ecl/icon": "5.0.0-alpha.1",
13
- "@ecl/indicator": "5.0.0-alpha.1"
12
+ "@ecl/icon": "5.0.0-alpha.11",
13
+ "@ecl/indicator": "5.0.0-alpha.11"
14
+ },
15
+ "devDependencies": {
16
+ "@ecl/resources-icons": "5.0.0-alpha.11"
14
17
  },
15
18
  "repository": {
16
19
  "type": "git",
@@ -26,5 +29,5 @@
26
29
  "design-system",
27
30
  "twig"
28
31
  ],
29
- "gitHead": "f800b6d2de209fcfe182aadca5f7e45ad497b23a"
32
+ "gitHead": "e2c8581dfaabe6f67ff063fed5839034f0148db3"
30
33
  }