@ecl/spotlight 5.0.0-alpha.22.4 → 5.0.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 CHANGED
@@ -9,18 +9,18 @@ npm install --save @ecl/spotlight
9
9
  ### Parameters
10
10
 
11
11
  - **"color_mode"** (string) (default: '') Name of the color mode
12
- - **"font_size"** (string) (default: 'l') Size of the title (can be 'm', 'l')
12
+ - **"font_size"** (string) (default: 'm') Size of the title; can be 'm', 'l'
13
13
  - **"title"** (string) (default: '') Title of the spotlight
14
- - **"path"** (string) (default: '') Link url
15
- - **"header"** (string) (default: '') Header over the spotlight
16
- - **"picture"** (object) (default: {}): Image for the spotlight, following ECL Picture structure
17
- - **"has_anchor"** (boolean) (default: true): Should the visual anchor be displayed?
18
- - **"credit"** (string) (default: '') Credit for the image
19
- - **"full_width"** (boolean) (default: false) Full width spotlight (extend outside the grid)
20
- - **"extra_classes"** (string) (default: '')
21
- - **"extra_attributes"** (optional) (array) (default: [])
14
+ - **"path"** (string) (default: '') Link URL for the title
15
+ - **"header"** (string) (default: '') Header text above the spotlight title
16
+ - **"picture"** (object) (default: {}) Image following ECL Picture structure
17
+ - **"has_anchor"** (boolean) (default: true) Show the visual anchor indicator
18
+ - **"credit"** (string) (default: '') Credit text for the image
19
+ - **"full_width"** (boolean) (default: false) Full width spotlight (extends outside the grid)
20
+ - **"extra_classes"** (string) (default: '') Extra classes (space separated)
21
+ - **"extra_attributes"** (array) (default: []) Extra attributes
22
22
  - "name" (string) Attribute name, eg. 'data-test'
23
- - "value" (optional) (string) Attribute value, eg: 'data-test-1'
23
+ - "value" (string) Attribute value, eg: 'data-test-1'
24
24
 
25
25
  ### Example:
26
26
 
package/package.json CHANGED
@@ -2,16 +2,18 @@
2
2
  "name": "@ecl/spotlight",
3
3
  "author": "European Commission",
4
4
  "license": "EUPL-1.2",
5
- "version": "5.0.0-alpha.22.4",
5
+ "version": "5.0.0",
6
6
  "description": "ECL Spotlight",
7
+ "publishConfig": {
8
+ "access": "public"
9
+ },
7
10
  "style": "spotlight.scss",
8
11
  "dependencies": {
9
- "@ecl/grid": "5.0.0-alpha.22.4",
10
- "@ecl/mixins-typography": "5.0.0-alpha.22.4",
11
- "@ecl/picture": "5.0.0-alpha.22.4"
12
+ "@ecl/picture": "5.0.0"
12
13
  },
13
- "publishConfig": {
14
- "access": "public"
14
+ "devDependencies": {
15
+ "@ecl/grid": "5.0.0",
16
+ "@ecl/mixins-typography": "5.0.0"
15
17
  },
16
18
  "repository": {
17
19
  "type": "git",
@@ -26,5 +28,5 @@
26
28
  "europa-component-library",
27
29
  "design-system"
28
30
  ],
29
- "gitHead": "dca1381b81aee960100865a1abd0a38e5cec3453"
31
+ "gitHead": "70ad1f5d6ae8b6e11c7d2422c3d5e7a1a74adf57"
30
32
  }
@@ -129,12 +129,10 @@ $anchor-width-l: 232px;
129
129
  padding-block-end: map.get($spotlight, 'anchor', 'padding-block');
130
130
  padding-inline-end: inherit;
131
131
  position: absolute;
132
- right: 0;
132
+ inset-inline-end: 0;
133
133
  width: $anchor-width-l;
134
134
 
135
135
  &:dir(rtl) {
136
- left: 0;
137
- right: auto;
138
136
  transform: scale(-1, 1);
139
137
  }
140
138
  }
@@ -142,12 +140,6 @@ $anchor-width-l: 232px;
142
140
  // Full width
143
141
  .ecl-spotlight--full-width {
144
142
  border-radius: 0;
145
- left: 50%;
146
- margin-inline-start: -50vw;
143
+ margin-inline: calc(50% - 50vw);
147
144
  width: 100vw;
148
-
149
- &:dir(rtl) {
150
- left: auto;
151
- right: 50%;
152
- }
153
145
  }
@@ -3,18 +3,18 @@
3
3
  {#
4
4
  Parameters:
5
5
  - "color_mode" (string) (default: '') Name of the color mode
6
- - "font_size" (string) (default: 'l') Size of the title (can be 'm', 'l')
6
+ - "font_size" (string) (default: 'm') Size of the title; can be 'm', 'l'
7
7
  - "title" (string) (default: '') Title of the spotlight
8
- - "path" (string) (default: '') Link url
9
- - "header" (string) (default: '') Header over the spotlight
10
- - "picture" (object) (default: {}): Image for the spotlight, following ECL Picture structure
11
- - "has_anchor" (boolean) (default: true): Should the visual anchor be displayed?
12
- - "credit" (string) (default: '') Credit for the image
13
- - "full_width" (boolean) (default: false) Full width spotlight (extend outside the grid)
14
- - "extra_classes" (string) (default: '')
15
- - "extra_attributes" (optional) (array) (default: [])
8
+ - "path" (string) (default: '') Link URL for the title
9
+ - "header" (string) (default: '') Header text above the spotlight title
10
+ - "picture" (object) (default: {}) Image following ECL Picture structure
11
+ - "has_anchor" (boolean) (default: true) Show the visual anchor indicator
12
+ - "credit" (string) (default: '') Credit text for the image
13
+ - "full_width" (boolean) (default: false) Full width spotlight (extends outside the grid)
14
+ - "extra_classes" (string) (default: '') Extra classes (space separated)
15
+ - "extra_attributes" (array) (default: []) Extra attributes
16
16
  - "name" (string) Attribute name, eg. 'data-test'
17
- - "value" (optional) (string) Attribute value, eg: 'data-test-1'
17
+ - "value" (string) Attribute value, eg: 'data-test-1'
18
18
  #}
19
19
 
20
20
  {# Internal properties #}
package/spotlight.scss CHANGED
@@ -138,14 +138,8 @@ $anchor-width-l: 232px;
138
138
  // Full width
139
139
  .ecl-spotlight--full-width {
140
140
  border-radius: 0;
141
- left: 50%;
142
- margin-inline-start: -50vw;
141
+ margin-inline: calc(50% - 50vw);
143
142
  width: 100vw;
144
-
145
- &:dir(rtl) {
146
- left: auto;
147
- right: 50%;
148
- }
149
143
  }
150
144
 
151
145
  @include breakpoints.up('m') {
@@ -179,13 +173,8 @@ $anchor-width-l: 232px;
179
173
  padding-block-end: map.get($spotlight, 'anchor', 'padding-block');
180
174
  padding-inline-end: inherit;
181
175
  position: absolute;
182
- right: 0;
176
+ inset-inline-end: 0;
183
177
  width: $anchor-width-m;
184
-
185
- &:dir(rtl) {
186
- left: 0;
187
- right: auto;
188
- }
189
178
  }
190
179
  }
191
180