energy-foundations 2.5.0-beta.1 → 2.5.0-beta.2

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.
@@ -13,28 +13,7 @@
13
13
  }
14
14
 
15
15
  .rds-grid {
16
- display: grid;
17
- margin-left: auto;
18
- margin-right: auto;
19
- width: 100%;
20
-
21
- @each $breakpoint, $config in $grid-config {
22
- :where(body:not([data-rds-layout='b'])) & {
23
- @include fixed-breakpoint($breakpoint) {
24
- gap: map.get($config, gap);
25
- grid-template-columns: repeat(map.get($config, max-columns), 1fr);
26
- }
27
- }
28
- }
29
-
30
- @each $breakpoint, $config in $grid-config-b {
31
- :where(body[data-rds-layout='b']) & {
32
- @include fixed-breakpoint($breakpoint) {
33
- gap: map.get($config, gap);
34
- grid-template-columns: repeat(map.get($config, max-columns), 1fr);
35
- }
36
- }
37
- }
16
+ @include grid;
38
17
  }
39
18
 
40
19
  // Map of breakpoint names to abbreviations
@@ -1,4 +1,4 @@
1
- /** Auto-generated by generateIconLayers.js on 2026-10-19T12:32:44.265Z */
1
+ /** Auto-generated by generateIconLayers.js on 2026-10-22T09:48:17.799Z */
2
2
  /* eslint-disable */
3
3
  export const iconLayers = {
4
4
  "calendar_active": 8,
@@ -1,4 +1,4 @@
1
- /** Auto-generated by generateIconLayers.js on 2026-10-19T12:32:44.265Z */
1
+ /** Auto-generated by generateIconLayers.js on 2026-10-22T09:48:17.799Z */
2
2
  /* eslint-disable */
3
3
  export const iconLayers: Record<string, number> = {
4
4
  "calendar_active": 8,
@@ -1,4 +1,4 @@
1
- /** Auto-generated by generateIconLayers.js on 2026-10-19T12:32:44.265Z */
1
+ /** Auto-generated by generateIconLayers.js on 2026-10-22T09:48:17.799Z */
2
2
  /* eslint-disable */
3
3
  export const iconNames = [
4
4
  "ac-aire-acondicionado",
@@ -1,4 +1,4 @@
1
- /** Auto-generated by generateIconLayers.js on 2026-10-19T12:32:44.265Z */
1
+ /** Auto-generated by generateIconLayers.js on 2026-10-22T09:48:17.799Z */
2
2
  /* eslint-disable */
3
3
  export const iconNames: string[] = [
4
4
  "ac-aire-acondicionado",
@@ -142,6 +142,35 @@ $_active-layout: null;
142
142
  }
143
143
  }
144
144
 
145
+ @mixin grid {
146
+ @if not & {
147
+ @error 'grid must be included inside a selector, e.g. `.portal-grid { @include grid; }`.';
148
+ }
149
+
150
+ display: grid;
151
+ margin-left: auto;
152
+ margin-right: auto;
153
+ width: 100%;
154
+
155
+ @each $breakpoint, $config in $grid-config {
156
+ :where(body:not([data-rds-layout='b'])) & {
157
+ @include fixed-breakpoint($breakpoint) {
158
+ gap: map.get($config, gap);
159
+ grid-template-columns: repeat(map.get($config, max-columns), 1fr);
160
+ }
161
+ }
162
+ }
163
+
164
+ @each $breakpoint, $config in $grid-config-b {
165
+ :where(body[data-rds-layout='b']) & {
166
+ @include fixed-breakpoint($breakpoint) {
167
+ gap: map.get($config, gap);
168
+ grid-template-columns: repeat(map.get($config, max-columns), 1fr);
169
+ }
170
+ }
171
+ }
172
+ }
173
+
145
174
  // The condition is checked on the selected element itself, so other conditions such as `.dark` or `[dir='rtl']`
146
175
  // keep working when they live on body or html. It is inserted at the start of the last compound (after a type
147
176
  // selector), so `&--modifier`, `&__element` and pseudo-elements can still be appended by the content.
@@ -399,6 +399,7 @@
399
399
  |---|---|
400
400
  | breakpoint | $breakpoint |
401
401
  | layout-max | — |
402
+ | grid | — |
402
403
 
403
404
  ### _shadow.scss
404
405
 
@@ -216,6 +216,24 @@ No existe una escala tipográfica específica para tablet. El breakpoint `deskto
216
216
 
217
217
  ## Grid: columnas, offsets y perfil editorial
218
218
 
219
+ ### Mixin Sass de grid
220
+
221
+ El mixin público `grid` aplica el mismo comportamiento que `.rds-grid` a un selector propio, sin añadir esa clase al HTML:
222
+
223
+ ```scss
224
+ @use 'energy-foundations/src/rds-variables' as rds;
225
+
226
+ .mi-grid {
227
+ @include rds.grid;
228
+ }
229
+ ```
230
+
231
+ También está disponible desde `energy-foundations/src/mixins/layout`. Con `@use 'energy-foundations/src/rds-variables' as *`, se incluye mediante `@include grid`.
232
+
233
+ La clase `.rds-grid` consume ese mismo mixin. Ambos conservan display, ancho completo, centrado, columnas y gaps según los mapas `$grid-config` y `$grid-config-b` y el layout global del `body`. Inclúyelo dentro de un selector de un elemento descendiente del `body`; invocarlo en la raíz de la hoja Sass produce un error explícito.
234
+
235
+ El mixin solo configura el contenedor: no incorpora `layout-max`, no genera utilidades de columnas y no cambia `rds-col-*` ni sus offsets.
236
+
219
237
  ### Columnas y offsets · Layout A
220
238
 
221
239
  El perfil A usa 4 columnas con gap de 16px hasta 719px, 8 columnas con gap de 16px desde 720px y 12 columnas con gap de 24px desde 1280px.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "energy-foundations",
3
- "version": "2.5.0-beta.1",
3
+ "version": "2.5.0-beta.2",
4
4
  "config": {
5
5
  "commitizen": {
6
6
  "path": "node_modules/cz-customizable"
@@ -13,28 +13,7 @@
13
13
  }
14
14
 
15
15
  .rds-grid {
16
- display: grid;
17
- margin-left: auto;
18
- margin-right: auto;
19
- width: 100%;
20
-
21
- @each $breakpoint, $config in $grid-config {
22
- :where(body:not([data-rds-layout='b'])) & {
23
- @include fixed-breakpoint($breakpoint) {
24
- gap: map.get($config, gap);
25
- grid-template-columns: repeat(map.get($config, max-columns), 1fr);
26
- }
27
- }
28
- }
29
-
30
- @each $breakpoint, $config in $grid-config-b {
31
- :where(body[data-rds-layout='b']) & {
32
- @include fixed-breakpoint($breakpoint) {
33
- gap: map.get($config, gap);
34
- grid-template-columns: repeat(map.get($config, max-columns), 1fr);
35
- }
36
- }
37
- }
16
+ @include grid;
38
17
  }
39
18
 
40
19
  // Map of breakpoint names to abbreviations
@@ -1,4 +1,4 @@
1
- /** Auto-generated by generateIconLayers.js on 2026-10-19T12:32:44.265Z */
1
+ /** Auto-generated by generateIconLayers.js on 2026-10-22T09:48:17.799Z */
2
2
  /* eslint-disable */
3
3
  export const iconLayers = {
4
4
  "calendar_active": 8,
@@ -1,4 +1,4 @@
1
- /** Auto-generated by generateIconLayers.js on 2026-10-19T12:32:44.265Z */
1
+ /** Auto-generated by generateIconLayers.js on 2026-10-22T09:48:17.799Z */
2
2
  /* eslint-disable */
3
3
  export const iconLayers: Record<string, number> = {
4
4
  "calendar_active": 8,
@@ -1,4 +1,4 @@
1
- /** Auto-generated by generateIconLayers.js on 2026-10-19T12:32:44.265Z */
1
+ /** Auto-generated by generateIconLayers.js on 2026-10-22T09:48:17.799Z */
2
2
  /* eslint-disable */
3
3
  export const iconNames = [
4
4
  "ac-aire-acondicionado",
@@ -1,4 +1,4 @@
1
- /** Auto-generated by generateIconLayers.js on 2026-10-19T12:32:44.265Z */
1
+ /** Auto-generated by generateIconLayers.js on 2026-10-22T09:48:17.799Z */
2
2
  /* eslint-disable */
3
3
  export const iconNames: string[] = [
4
4
  "ac-aire-acondicionado",
@@ -142,6 +142,35 @@ $_active-layout: null;
142
142
  }
143
143
  }
144
144
 
145
+ @mixin grid {
146
+ @if not & {
147
+ @error 'grid must be included inside a selector, e.g. `.portal-grid { @include grid; }`.';
148
+ }
149
+
150
+ display: grid;
151
+ margin-left: auto;
152
+ margin-right: auto;
153
+ width: 100%;
154
+
155
+ @each $breakpoint, $config in $grid-config {
156
+ :where(body:not([data-rds-layout='b'])) & {
157
+ @include fixed-breakpoint($breakpoint) {
158
+ gap: map.get($config, gap);
159
+ grid-template-columns: repeat(map.get($config, max-columns), 1fr);
160
+ }
161
+ }
162
+ }
163
+
164
+ @each $breakpoint, $config in $grid-config-b {
165
+ :where(body[data-rds-layout='b']) & {
166
+ @include fixed-breakpoint($breakpoint) {
167
+ gap: map.get($config, gap);
168
+ grid-template-columns: repeat(map.get($config, max-columns), 1fr);
169
+ }
170
+ }
171
+ }
172
+ }
173
+
145
174
  // The condition is checked on the selected element itself, so other conditions such as `.dark` or `[dir='rtl']`
146
175
  // keep working when they live on body or html. It is inserted at the start of the last compound (after a type
147
176
  // selector), so `&--modifier`, `&__element` and pseudo-elements can still be appended by the content.