energy-foundations 0.0.1-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.
Files changed (94) hide show
  1. package/README.md +20 -0
  2. package/dist/energy-foundations.js +1 -0
  3. package/dist/energy-foundations.umd.cjs +1 -0
  4. package/dist/fonts/SoleRepsolText_W_Bd.woff +0 -0
  5. package/dist/fonts/SoleRepsolText_W_Lt.woff +0 -0
  6. package/dist/fonts/SoleRepsolText_W_Rg.woff +0 -0
  7. package/dist/fonts/SoleRepsolText_W_SBd.woff +0 -0
  8. package/dist/fonts/icomoon.eot +0 -0
  9. package/dist/fonts/icomoon.ttf +0 -0
  10. package/dist/fonts/icomoon.woff +0 -0
  11. package/dist/fonts/selection.json +1 -0
  12. package/dist/foundations/_border.scss +15 -0
  13. package/dist/foundations/_color.scss +43 -0
  14. package/dist/foundations/_elevation.scss +9 -0
  15. package/dist/foundations/_fonts.scss +759 -0
  16. package/dist/foundations/_grid.scss +68 -0
  17. package/dist/foundations/_reset.scss +70 -0
  18. package/dist/foundations/_shadow.scss +10 -0
  19. package/dist/foundations/_spacing.scss +56 -0
  20. package/dist/foundations/_state.scss +5 -0
  21. package/dist/foundations/_typography.scss +33 -0
  22. package/dist/global.scss +6 -0
  23. package/dist/logo-repsol.png +0 -0
  24. package/dist/main.ts +1 -0
  25. package/dist/mixins/_elevation.scss +15 -0
  26. package/dist/mixins/_layout.scss +30 -0
  27. package/dist/mixins/_shadow.scss +9 -0
  28. package/dist/mixins/_state.scss +5 -0
  29. package/dist/mixins/_typography.scss +59 -0
  30. package/dist/mixins/_utils.scss +8 -0
  31. package/dist/rds-foundations.scss +20 -0
  32. package/dist/rds-reset.scss +1 -0
  33. package/dist/rds-variables.scss +24 -0
  34. package/dist/stories/assets/accessibility.png +0 -0
  35. package/dist/stories/assets/accessibility.svg +5 -0
  36. package/dist/stories/assets/addon-library.png +0 -0
  37. package/dist/stories/assets/assets.png +0 -0
  38. package/dist/stories/assets/avif-test-image.avif +0 -0
  39. package/dist/stories/assets/context.png +0 -0
  40. package/dist/stories/assets/discord.svg +15 -0
  41. package/dist/stories/assets/docs.png +0 -0
  42. package/dist/stories/assets/figma-plugin.png +0 -0
  43. package/dist/stories/assets/figma.png +0 -0
  44. package/dist/stories/assets/github.svg +3 -0
  45. package/dist/stories/assets/grid-desktop.png +0 -0
  46. package/dist/stories/assets/grid-mobile.png +0 -0
  47. package/dist/stories/assets/grid-tablet.png +0 -0
  48. package/dist/stories/assets/grid-xd.png +0 -0
  49. package/dist/stories/assets/logo-repsol.png +0 -0
  50. package/dist/stories/assets/npm.png +0 -0
  51. package/dist/stories/assets/portal.png +0 -0
  52. package/dist/stories/assets/share.png +0 -0
  53. package/dist/stories/assets/styling.png +0 -0
  54. package/dist/stories/assets/testing.png +0 -0
  55. package/dist/stories/assets/theming.png +0 -0
  56. package/dist/stories/assets/tutorials.svg +12 -0
  57. package/dist/stories/assets/variables.png +0 -0
  58. package/dist/stories/assets/youtube.svg +4 -0
  59. package/dist/stories/border/border.mdx +71 -0
  60. package/dist/stories/colors/componentColor.mdx +96 -0
  61. package/dist/stories/colors/componentColors.scss +2 -0
  62. package/dist/stories/colors/semanticColor.mdx +458 -0
  63. package/dist/stories/docs/init.mdx +129 -0
  64. package/dist/stories/docs/quickStartVue.mdx +98 -0
  65. package/dist/stories/elevation/elevation.mdx +113 -0
  66. package/dist/stories/fonts/fonts.mdx +165 -0
  67. package/dist/stories/functional/Layaout.mdx +42 -0
  68. package/dist/stories/functional/Utils.mdx +22 -0
  69. package/dist/stories/grid/Breakpoint.stories.js +16 -0
  70. package/dist/stories/grid/Gridsystem.mdx +172 -0
  71. package/dist/stories/grid/ResponsiveGrid.stories.js +47 -0
  72. package/dist/stories/grid/SimpleGridsystem.stories.js +39 -0
  73. package/dist/stories/grid/gridsystem.scss +86 -0
  74. package/dist/stories/icons/icon-list.ts +5 -0
  75. package/dist/stories/icons/icons.mdx +84 -0
  76. package/dist/stories/spacing/Spacing.mdx +296 -0
  77. package/dist/stories/spacing/Spacing.stories.js +132 -0
  78. package/dist/stories/spacing/spacing-story.scss +94 -0
  79. package/dist/stories/styles/index.scss +373 -0
  80. package/dist/stories/styles/overwrite.scss +197 -0
  81. package/dist/style.css +1 -0
  82. package/dist/variables/_border.scss +16 -0
  83. package/dist/variables/_color-system.scss +227 -0
  84. package/dist/variables/_color.scss +207 -0
  85. package/dist/variables/_elevation.scss +16 -0
  86. package/dist/variables/_grid.scss +21 -0
  87. package/dist/variables/_layout.scss +27 -0
  88. package/dist/variables/_shadow.scss +3 -0
  89. package/dist/variables/_spacing.scss +47 -0
  90. package/dist/variables/_state.scss +10 -0
  91. package/dist/variables/_typography.scss +380 -0
  92. package/dist/vite-env.d.ts +1 -0
  93. package/dist/vite.svg +1 -0
  94. package/package.json +97 -0
@@ -0,0 +1,39 @@
1
+ import './gridsystem.scss'
2
+
3
+ export default {
4
+ title: 'Foundations/grid',
5
+ argTypes: {
6
+ columns: {
7
+ control: { type: 'range', min: 1, max: 12, step: 1 },
8
+ },
9
+ },
10
+ }
11
+
12
+ function createGridItem(content) {
13
+ const div = document.createElement('div')
14
+ div.className = 'grid-item'
15
+ div.textContent = content
16
+ return div
17
+ }
18
+
19
+ export function SimpleGridSystem({ columns }) {
20
+ const container = document.createElement('div')
21
+ container.className = `rds-layout-max playground-grid`
22
+
23
+ const container_grid = document.createElement('div')
24
+ container_grid.className = `rds-grid`
25
+ container.appendChild(container_grid)
26
+
27
+ for (let i = 0; i < 12; i++) {
28
+ const columnDiv = document.createElement('div')
29
+ columnDiv.className = `rds-col-${columns}`
30
+ columnDiv.appendChild(createGridItem(i + 1))
31
+ container_grid.appendChild(columnDiv)
32
+ }
33
+
34
+ return container
35
+ }
36
+
37
+ SimpleGridSystem.args = {
38
+ columns: 1,
39
+ }
@@ -0,0 +1,86 @@
1
+ @use 'sass:map';
2
+
3
+ @import './../styles/index';
4
+ @import './../styles/overwrite';
5
+ @import '../../foundations/grid';
6
+
7
+ .playground-grid {
8
+ background: repeating-linear-gradient(
9
+ 45deg,
10
+ #e04343a5,
11
+ #e04343ba 1px,
12
+ #ffffff 1px,
13
+ #ffffff 10px
14
+ );
15
+ padding: 20px !important;
16
+ }
17
+
18
+ .grid-item {
19
+ background-color: #FBF3EF;
20
+ border: 1px solid rgba(0, 0, 0, 0.18);
21
+ border-radius: 4px;
22
+ padding: 14px;
23
+
24
+ &--no-padding {
25
+ padding: 0;
26
+ }
27
+
28
+ }
29
+
30
+ .rds-docs-breakpoint {
31
+ align-items: center;
32
+ display: flex;
33
+ justify-content: center;
34
+
35
+ &:after {
36
+ content: 'Mobile';
37
+ margin: auto;
38
+ padding: 20px 0;
39
+ }
40
+
41
+ @include breakpoint(tablet) {
42
+ &:after {
43
+ content: 'Tablet';
44
+ margin: auto;
45
+ padding: 20px 0;
46
+ }
47
+ }
48
+
49
+ @include breakpoint(desktop) {
50
+ &:after {
51
+ content: 'Desktop';
52
+ margin: auto;
53
+ padding: 20px 0;
54
+ }
55
+ }
56
+
57
+ @include breakpoint(ultrawide) {
58
+ &:after {
59
+ content: 'Ultrawide desktop';
60
+ margin: auto;
61
+ padding: 20px 0;
62
+ }
63
+ }
64
+
65
+ &__layout-inner {
66
+ background-color: $rds-color-yellow-50;
67
+ color: white;
68
+ margin: 0 auto;
69
+ padding: 20px;
70
+ text-align: center;
71
+ width: 80%;
72
+ }
73
+
74
+
75
+ &__grid-example-container {
76
+ div {
77
+ margin-bottom: 30px;
78
+ }
79
+
80
+ img {
81
+ max-height: 300px;
82
+ }
83
+ }
84
+
85
+
86
+ }
@@ -0,0 +1,5 @@
1
+ import selectionJson from '../../../public/fonts/selection.json'
2
+
3
+ export default selectionJson.icons.map(
4
+ (icon: any) => icon.properties.name,
5
+ )
@@ -0,0 +1,84 @@
1
+ import { Meta, Unstyled } from '@storybook/blocks';
2
+ import './../styles/index.scss';
3
+ import { useState } from 'react';
4
+ import iconList from './icon-list.ts';
5
+
6
+ <Meta title="Foundations/Icons" name="Definition" />
7
+
8
+ # Icons
9
+
10
+ Para cargar cualquiera de los siguientes iconos añade a un span la clase icon + la clase del icono que desees.
11
+
12
+ ```html
13
+ <span class="rds-icon rds-icon-check">
14
+ ```
15
+
16
+ Hay dos tamaños disponibles. Regular, que está por defecto, y el small que se utiliza aplicando el modificador `icon--small`
17
+
18
+ <div class="rds-doc-icon__container">
19
+ <div class="rds-doc-icon__item">
20
+ <span className="rds-icon rds-icon-waylet"></span>
21
+ <span className="caption rds-body-02">regular 20x20px</span>
22
+ </div>
23
+
24
+ <div class="rds-doc-icon__item">
25
+ <span className="rds-icon rds-icon--small rds-icon-waylet"></span>
26
+ <span className="caption rds-body-02">small 16x16px</span>
27
+ </div>
28
+ </div>
29
+
30
+ ```html
31
+ <span class="rds-icon rds-icon--small rds-icon-check">
32
+ ```
33
+
34
+ Haz click en cualquiera de los iconos de abajo para copiar su nombre en el portapapeles.
35
+
36
+ <Unstyled>
37
+ <div className="rds-doc-icon__container">
38
+ {iconList.map((key, index) => {
39
+ const IconItem = () => {
40
+ const [copied, setCopied] = useState(false);
41
+
42
+ const copyToClipboard = () => {
43
+ navigator.clipboard.writeText('rds-icon-' + key).then(() => {
44
+ setCopied(true);
45
+ setTimeout(() => setCopied(false), 3000);
46
+ });
47
+ };
48
+
49
+ return (
50
+ <div key={index} className={`rds-doc-icon__item ${copied ? 'rds-doc-icon__item--copied' : ''}`} onClick={copyToClipboard}>
51
+ <span className={'rds-icon rds-icon-' + key}></span>
52
+ <span className="caption rds-body-02">{copied ? 'copiado' : 'rds-icon-' + key}</span>
53
+ </div>
54
+ );
55
+ };
56
+
57
+ return <IconItem />;
58
+ })}
59
+ </div>
60
+ </Unstyled>
61
+
62
+ <div class="rds-mt-l">
63
+ ## Guía de migración
64
+
65
+ Se ha añadido el prefijo rds- a las clases de los iconos.
66
+ </div>
67
+
68
+ <Unstyled>
69
+
70
+ <table>
71
+ <tr>
72
+ <th>Oxygen</th>
73
+ <th>Energy</th>
74
+ </tr>
75
+ <tr>
76
+ <td><p><del>icon</del></p></td>
77
+ <td>rds-icon</td>
78
+ </tr>
79
+ <tr>
80
+ <td><p><del>icon-waylet</del></p></td>
81
+ <td>rds-icon-waylet</td>
82
+ </tr>
83
+ </table>
84
+ </Unstyled>
@@ -0,0 +1,296 @@
1
+
2
+ import { Meta, Unstyled, Source } from '@storybook/blocks';
3
+ import './../styles/index.scss';
4
+ import './spacing-story.scss';
5
+
6
+ <Meta title="Foundations/Spacing/Spacing" name="Spacing"/>
7
+
8
+ # Spacing
9
+
10
+ El spacing es el área negativa entre elementos y componentes.
11
+
12
+ <Unstyled>
13
+ <table class="spacing-table">
14
+
15
+ <tr class="table-element">
16
+ <td>
17
+ <p class="rds-headline rds-doc__color-headline">
18
+ Entre Bloques de texto / iconos
19
+ </p>
20
+ </td>
21
+ <td>
22
+ 4px
23
+ </td>
24
+ <td>
25
+ <div class="spacing-example spacing-example--xxs rds-doc__color--radius-s"></div>
26
+ </td>
27
+ <td class="right">
28
+ ```$rds-spacing-layout-xxs```
29
+ </td>
30
+ </tr>
31
+
32
+ <tr class="table-element">
33
+ <td>
34
+ <p class="rds-headline rds-doc__color-headline">
35
+ Entre Bloques de texto / iconos
36
+ </p>
37
+ </td>
38
+ <td>
39
+ 8px
40
+ </td>
41
+ <td>
42
+ <div class="spacing-example spacing-example--xs rds-doc__color--radius-s"></div>
43
+ </td>
44
+ <td class="right">
45
+ ```$rds-spacing-layout-xs```
46
+ </td>
47
+ </tr>
48
+
49
+ <tr class="table-element">
50
+ <td>
51
+ <p class="rds-headline rds-doc__color-headline">
52
+ Entre contenidos y botones
53
+ </p>
54
+ </td>
55
+ <td>
56
+ 16px
57
+ </td>
58
+ <td>
59
+ <div class="spacing-example spacing-example--s rds-doc__color--radius-s"></div>
60
+ </td>
61
+ <td class="right">
62
+ ```$rds-spacing-layout-s```
63
+ </td>
64
+ </tr>
65
+
66
+ <tr class="table-element">
67
+ <td>
68
+ <p class="rds-headline rds-doc__color-headline">
69
+ Dentro de secciones
70
+ </p>
71
+ </td>
72
+ <td>
73
+ 24px
74
+ </td>
75
+ <td>
76
+ <div class="spacing-example spacing-example--m rds-doc__color--radius-s"></div>
77
+ </td>
78
+ <td class="right">
79
+ ```$rds-spacing-layout-m```
80
+ </td>
81
+ </tr>
82
+
83
+ <tr class="table-element">
84
+ <td>
85
+ <p class="rds-headline rds-doc__color-headline">
86
+ Entre secciones diferentes
87
+ </p>
88
+ </td>
89
+ <td>
90
+ 32px
91
+ </td>
92
+ <td>
93
+ <div class="spacing-example spacing-example--l rds-doc__color--radius-s"></div>
94
+ </td>
95
+ <td class="right">
96
+ ```$rds-spacing-layout-l```
97
+ </td>
98
+ </tr>
99
+
100
+ <tr class="table-element">
101
+ <td>
102
+ <p class="rds-headline rds-doc__color-headline">
103
+ Entre bloques relacionados
104
+ </p>
105
+ </td>
106
+ <td>
107
+ 48px
108
+ </td>
109
+ <td>
110
+ <div class="spacing-example spacing-example--xl rds-doc__color--radius-s"></div>
111
+ </td>
112
+ <td class="right">
113
+ ```$rds-spacing-layout-xl```
114
+ </td>
115
+ </tr>
116
+
117
+ <tr class="table-element">
118
+ <td>
119
+ <p class="rds-headline rds-doc__color-headline">
120
+ Entre bloques
121
+ </p>
122
+ </td>
123
+ <td>
124
+ 64px
125
+ </td>
126
+ <td>
127
+ <div class="spacing-example spacing-example--2xl rds-doc__color--radius-s"></div>
128
+ </td>
129
+ <td class="right">
130
+ ```$rds-spacing-layout-2xl```
131
+ </td>
132
+ </tr>
133
+
134
+ <tr class="table-element">
135
+ <td>
136
+ <p class="rds-headline rds-doc__color-headline">
137
+ Separación de módulos
138
+ </p>
139
+ </td>
140
+ <td>
141
+ 72px
142
+ </td>
143
+ <td>
144
+ <div class="spacing-example spacing-example--3xl rds-doc__color--radius-s"></div>
145
+ </td>
146
+ <td class="right">
147
+ ```$rds-spacing-layout-3xl```
148
+ </td>
149
+ </tr>
150
+
151
+ <tr class="table-element">
152
+ <td>
153
+ <p class="rds-headline rds-doc__color-headline">
154
+ Separación de módulos
155
+ </p>
156
+ </td>
157
+ <td>
158
+ 80px
159
+ </td>
160
+ <td>
161
+ <div class="spacing-example spacing-example--4xl rds-doc__color--radius-s"></div>
162
+ </td>
163
+ <td class="right">
164
+ ```$rds-spacing-layout-4xl```
165
+ </td>
166
+ </tr>
167
+
168
+ <tr class="table-element">
169
+ <td>
170
+ <p class="rds-headline rds-doc__color-headline">
171
+ Separación de módulos
172
+ </p>
173
+ </td>
174
+ <td>
175
+ 96px
176
+ </td>
177
+ <td>
178
+ <div class="spacing-example spacing-example--5xl rds-doc__color--radius-s"></div>
179
+ </td>
180
+ <td class="right">
181
+ ```$rds-spacing-layout-5xl```
182
+ </td>
183
+ </tr>
184
+
185
+ <tr class="table-element">
186
+ <td>
187
+ <p class="rds-headline rds-doc__color-headline">
188
+ Separación de módulos
189
+ </p>
190
+ </td>
191
+ <td>
192
+ 112px
193
+ </td>
194
+ <td>
195
+ <div class="spacing-example spacing-example--6xl rds-doc__color--radius-s"></div>
196
+ </td>
197
+ <td class="right">
198
+ ```$rds-spacing-layout-6xl```
199
+ </td>
200
+ </tr>
201
+
202
+ <tr class="table-element">
203
+ <td>
204
+ <p class="rds-headline rds-doc__color-headline">
205
+ Separación de módulos
206
+ </p>
207
+ </td>
208
+ <td>
209
+ 120px
210
+ </td>
211
+ <td>
212
+ <div class="spacing-example spacing-example--7xl rds-doc__color--radius-s"></div>
213
+ </td>
214
+ <td class="right">
215
+ ```$rds-spacing-layout-7xl```
216
+ </td>
217
+ </tr>
218
+
219
+ </table>
220
+ </Unstyled>
221
+
222
+ # Como funciona
223
+
224
+ Las clase de espaciado aplican *margin* y *padding* a los elementos que las contienen.
225
+
226
+ Estas calses se forman de la siguiente manera:
227
+
228
+ 1. prefijo: `rds-`
229
+ 2. tipo de espaciado y dirección:
230
+ - Espaciado:
231
+ - `m` - Margin
232
+ - `p` .- Padding
233
+ - Dirección:
234
+ - `a` - All
235
+ - `t` - Top
236
+ - `r` - Right
237
+ - `b` - Bottom
238
+ - `l` - Left
239
+ - `x` - Horizontal
240
+ - `y` - Vertical
241
+ 3. tamaño del espaciado:
242
+ - `xxs` - 2 Extra Small
243
+ - `xs` - Extra Small
244
+ - `s` - Small
245
+ - `m` - Medium
246
+ - `l` - Large
247
+ - `xl` - Extra Large
248
+ - `2xl` - 2 Extra Large
249
+ - `3xl` - 3 Extra Large
250
+ - `4xl` - 4 Extra Large
251
+ - `5xl` - 5 Extra Large
252
+ - `6xl` - 6 Extra Large
253
+ - `7xl` - 7 Extra Large
254
+
255
+ ```css
256
+ .rds-mt-xs | .rds-py-xl | .rds-mb-3xl
257
+ ```
258
+
259
+ ## Guía de migración
260
+
261
+ <Unstyled>
262
+ <table>
263
+ <tr>
264
+ <th>Oxygen</th>
265
+ <th>Energy</th>
266
+ </tr>
267
+
268
+ <tr>
269
+ <td><p><del> rds-m-(n) </del></p></td>
270
+ <td>Ahora para indicar el tamaño del margen se utilizan tallas `rds-ma-[xs | s | ... | 7xl]`</td>
271
+ </tr>
272
+ <tr>
273
+ <td><p><del> rds-p-(n) </del></p></td>
274
+ <td>Ahora para indicar el tamaño del padding se utilizan tallas `rds-pa-[xs | s | ... | 7xl]`</td>
275
+ </tr>
276
+
277
+ <tr>
278
+ <td><p><del> rds-m-1 </del></p></td>
279
+ <td>Ahora para indicar margen en todo se utiliza `rds-ma-xs`</td>
280
+ </tr>
281
+ <tr>
282
+ <td><p><del> rds-p-1 </del></p></td>
283
+ <td>Ahora para indicar padding en todo se utiliza `rds-pa-xs`</td>
284
+ </tr>
285
+
286
+ <tr>
287
+ <td><p>N/A</p></td>
288
+ <td>Nueva clase para espacio horizontal `rds-[p | m]x-xs`</td>
289
+ </tr>
290
+ <tr>
291
+ <td><p>N/A</p></td>
292
+ <td>Nueva clase para espacio vertical `rds-[p | m]y-xs`</td>
293
+ </tr>
294
+
295
+ </table>
296
+ </Unstyled>
@@ -0,0 +1,132 @@
1
+ import './../styles/index.scss'
2
+ import './spacing-story.scss'
3
+
4
+ export default {
5
+ title: 'Foundations/Spacing',
6
+ }
7
+
8
+ export const Playground = {
9
+ render: (args) => {
10
+ const getClassName = () => {
11
+ const prefix = 'rds'
12
+
13
+ const type = args.type
14
+ const position = args.position
15
+ const size = args.size
16
+
17
+ if (!type || (!position && position !== '') || !size) return ''
18
+ return `${prefix}-${type}${position}-${size}`
19
+ }
20
+
21
+ function makeTitle(className) {
22
+ const values = {
23
+ 'xxs': 4,
24
+ 'xs': 8,
25
+ 's': 16,
26
+ 'm': 24,
27
+ 'l': 32,
28
+ 'xl': 48,
29
+ '2xl': 64,
30
+ '3xl': 72,
31
+ '4xl': 80,
32
+ '5xl': 96,
33
+ '6xl': 112,
34
+ '7xl': 120,
35
+ }
36
+
37
+ // Generate title to show the class name
38
+ const $title = document.createElement('h3')
39
+ $title.className = 'docblock-source rds-headline-02 rds-my-m'
40
+ const size = args.size
41
+
42
+ let px = ''
43
+ if (size in values) px = `(${values[size]}px)`
44
+
45
+ const title = [px, className].filter(Boolean).join(' | ')
46
+ $title.textContent = title
47
+
48
+ return $title
49
+ }
50
+
51
+ function makeGrid() {
52
+ const className = getClassName()
53
+ let marginClass = 'rds-ma-m'
54
+ let paddingClass = ''
55
+ const $container = document.createElement('div')
56
+ $container.className = 'spacing-playground container'
57
+
58
+ $container.appendChild(
59
+ makeTitle(className),
60
+ )
61
+
62
+ // Generate grid
63
+ const $grid = document.createElement('div')
64
+ $grid.className = 'grid-container stripped-background'
65
+
66
+ const $gridItems = Array.from({ length: 4 }, (_, i) => {
67
+ const $item = document.createElement('div')
68
+ if (args.type === 'm') marginClass = className
69
+ $item.className = `grid-item ${marginClass}`
70
+
71
+ const $padding = document.createElement('div')
72
+ $padding.style = 'background-color: #transparent;'
73
+ if (args.type === 'p') {
74
+ paddingClass = className
75
+ $padding.style = 'background-color: #f0f0f0;'
76
+ }
77
+ $padding.className = paddingClass
78
+
79
+ $padding.textContent = `${i + 1}`
80
+
81
+ $item.appendChild($padding)
82
+
83
+ return $item
84
+ })
85
+
86
+ $gridItems.forEach($item => $grid.appendChild($item))
87
+ $container.appendChild($grid)
88
+
89
+ return $container
90
+ }
91
+
92
+ return makeGrid()
93
+ },
94
+ argTypes: {
95
+ type: {
96
+ options: ['m', 'p'],
97
+ control: {
98
+ type: 'select',
99
+ labels: {
100
+ m: 'margin',
101
+ p: 'padding',
102
+ },
103
+ },
104
+ },
105
+ position: {
106
+ options: ['a', 't', 'b', 'l', 'r', 'y', 'x'],
107
+ control: {
108
+ type: 'select',
109
+ labels: {
110
+ a: 'Todos',
111
+ t: 'Superior',
112
+ b: 'Inferior',
113
+ l: 'Izquierda',
114
+ r: 'Derecha',
115
+ y: 'Vertical',
116
+ x: 'Horizontal',
117
+ },
118
+ },
119
+ },
120
+ size: {
121
+ options: ['xxs', 'xs', 's', 'm', 'l', 'xl', '2xl', '3xl', '4xl', '5xl', '6xl', '7xl'],
122
+ control: {
123
+ type: 'select',
124
+ },
125
+ },
126
+ },
127
+ args: {
128
+ type: 'm',
129
+ position: 'a',
130
+ size: 'm',
131
+ },
132
+ }