holygrail5 1.0.16 → 1.0.17

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/config.json CHANGED
@@ -59,6 +59,7 @@
59
59
  },
60
60
  "fontFamilyMap": {
61
61
  "primary": "arial, sans-serif",
62
+ "primary-bold": "\"Arial Bold\", Arial, sans-serif",
62
63
  "secondary": "\"ms-serif\", serif"
63
64
  },
64
65
  "spacingMap": {
package/dist/index.html CHANGED
@@ -15,8 +15,8 @@
15
15
 
16
16
  <!-- Lenis Smooth Scroll - Solo para la guía -->
17
17
  <script src="https://cdn.jsdelivr.net/gh/studio-freight/lenis@1.0.29/bundled/lenis.min.js"></script>
18
- <link rel="stylesheet" href="output.css?v=1770198674645">
19
- <link rel="stylesheet" href="guide-styles.css?v=1770198674633">
18
+ <link rel="stylesheet" href="output.css?v=1771406408021">
19
+ <link rel="stylesheet" href="guide-styles.css?v=1771406408009">
20
20
  <style>
21
21
 
22
22
  body {
@@ -76,7 +76,7 @@
76
76
  </a>
77
77
  </div>
78
78
  <p class="text-m guide-sidebar-meta">
79
- last update: 4/2/2026, 10:51:14
79
+ last update: 18/2/2026, 10:20:08
80
80
  </p>
81
81
 
82
82
 
@@ -309,13 +309,13 @@
309
309
  </div>
310
310
  </div>
311
311
  <div class="guide-color-card" data-copy-value="--hg-color-success" title="Click para copiar --hg-color-success">
312
- <div class="guide-color-preview" style="--color-value: #76ae4a;">
312
+ <div class="guide-color-preview" style="--color-value: #12882c;">
313
313
 
314
314
  </div>
315
315
  <div class="guide-color-card-content">
316
316
  <div class="guide-color-name">success</div>
317
317
  <div class="guide-color-var-name" data-copy-value="--hg-color-success" title="Click para copiar --hg-color-success">--hg-color-success</div>
318
- <div class="guide-color-value " data-copy-value="#76ae4a" title="Click para copiar #76ae4a">#76ae4a</div>
318
+ <div class="guide-color-value " data-copy-value="#12882C" title="Click para copiar #12882C">#12882C</div>
319
319
  </div>
320
320
  </div>
321
321
  <div class="guide-color-card" data-copy-value="--hg-color-warning" title="Click para copiar --hg-color-warning">
@@ -479,6 +479,12 @@
479
479
  <td class="guide-table-value ">arial, sans-serif</td>
480
480
  <td class="guide-table-value">--hg-typo-font-family-primary</td>
481
481
  </tr>
482
+ <tr>
483
+ <td class="guide-table-name">primary-bold</td>
484
+ <td class="guide-font-family-preview" style='font-family: "Arial Bold", Arial, sans-serif;'>Aa</td>
485
+ <td class="guide-table-value ">"Arial Bold", Arial, sans-serif</td>
486
+ <td class="guide-table-value">--hg-typo-font-family-primary-bold</td>
487
+ </tr>
482
488
  <tr>
483
489
  <td class="guide-table-name">secondary</td>
484
490
  <td class="guide-font-family-preview" style='font-family: "ms-serif", serif;'>Aa</td>
@@ -1041,7 +1047,7 @@
1041
1047
  </tr>
1042
1048
  <tr>
1043
1049
  <td class="guide-table-name guide-copyable " data-copy-value="--hg-color-success" title="Click para copiar --hg-color-success">--hg-color-success</td>
1044
- <td class="guide-table-value guide-copyable " data-copy-value="#76ae4a" title="Click para copiar #76ae4a">#76ae4a</td>
1050
+ <td class="guide-table-value guide-copyable " data-copy-value="#12882C" title="Click para copiar #12882C">#12882C</td>
1045
1051
  <td class="guide-value-center-blue guide-copyable " data-copy-value="-" title="Click para copiar -">-</td>
1046
1052
  <td class="guide-value-center-orange guide-copyable " data-copy-value="-" title="Click para copiar -">-</td>
1047
1053
  </tr>
@@ -1129,8 +1135,8 @@
1129
1135
  </div>
1130
1136
  <div class="guide-info-box guide-info-box-warning mb-32">
1131
1137
  <strong class="mb-16" style="display: block;">¿Cómo se generan los helpers de espaciado?</strong>
1132
- <div class="guide-spacing-explanation-cols">
1133
- <div class="guide-spacing-explanation-col">
1138
+ <div class="row">
1139
+ <div class="col-xs-12 col-md-6 guide-spacing-explanation-col">
1134
1140
  <p class="text-m guide-info-box-text">
1135
1141
  <strong>Primera letra:</strong> Tipo de spacing → <code class="guide-info-box-code-info">p</code> (padding) o <code class="guide-info-box-code-info">m</code> (margin).
1136
1142
  </p>
@@ -1150,7 +1156,7 @@
1150
1156
  <strong>Nota:</strong> Los helpers con prefijo <code class="guide-info-box-code-info">md:</code> funcionan como en Tailwind CSS y solo se aplican en el breakpoint desktop (≥992px). Puedes combinar clases base y con prefijo <code class="guide-info-box-code-info">md:</code> para crear diseños responsive. Las clases con <code class="guide-info-box-code-info">!</code> aplican !important y tienen prioridad sobre otras reglas CSS.
1151
1157
  </p>
1152
1158
  </div>
1153
- <div class="guide-spacing-explanation-col">
1159
+ <div class="col-xs-12 col-md-6 guide-spacing-explanation-col">
1154
1160
  <p class="text-m guide-info-box-text"><strong>Ejemplos de uso:</strong></p>
1155
1161
  <ul class="guide-info-box-list">
1156
1162
  <li class="text-m guide-info-box-list-item"><code class="guide-info-box-code-info">.p-4</code> — Aplica padding de 4px en todos los tamaños de pantalla</li>
package/dist/output.css CHANGED
@@ -57,9 +57,8 @@ p, h1, h2, h3, h4, h5, h6 {
57
57
  /* Variables CSS Compartidas */
58
58
  :root {
59
59
  --hg-typo-font-family-primary: arial, sans-serif;
60
+ --hg-typo-font-family-primary-bold: "Arial Bold", Arial, sans-serif;
60
61
  --hg-typo-font-family-secondary: "ms-serif", serif;
61
- --hg-typo-font-family-luxury-serif: 'Playfair Display', 'Georgia', serif;
62
- --hg-typo-font-family-elegant-sans: 'IBM Plex Sans', 'Helvetica Neue', sans-serif;
63
62
  --hg-typo-line-height-1: 1;
64
63
  --hg-typo-line-height-1-976: 1.976;
65
64
  --hg-typo-line-height-1-2: 1.2;
@@ -140,7 +139,7 @@ p, h1, h2, h3, h4, h5, h6 {
140
139
  --hg-color-primary: #000000;
141
140
  --hg-color-error: #b40016;
142
141
  --hg-color-info: #1a32a4;
143
- --hg-color-success: #76ae4a;
142
+ --hg-color-success: #12882C;
144
143
  --hg-color-warning: #ffc700;
145
144
  --hg-color-feel: #fb9962;
146
145
  --hg-color-feel-dark: #c94c07;
@@ -1959,7 +1958,7 @@ p, h1, h2, h3, h4, h5, h6 {
1959
1958
  }
1960
1959
  }
1961
1960
 
1962
- [class*=col-] {
1961
+ [class*=" col-"], [class^="col-"] {
1963
1962
  box-sizing: border-box;
1964
1963
  min-height: 1px;
1965
1964
  padding-left: 8px;
@@ -2001,7 +2000,8 @@ p, h1, h2, h3, h4, h5, h6 {
2001
2000
  flex-wrap: wrap;
2002
2001
  }
2003
2002
 
2004
- .bleed-0 > [class*=col-],
2003
+ .bleed-0 > [class*=" col-"],
2004
+ .bleed-0 > [class^="col-"],
2005
2005
  .bleed-0 > .col {
2006
2006
  padding: 0px;
2007
2007
  box-sizing: border-box;
@@ -126,6 +126,10 @@
126
126
  <button class="btn btn-tertiary">Tertiary</button>
127
127
  <div class="demo-code">.btn .btn-tertiary</div>
128
128
  </div>
129
+ <div class="demo-item">
130
+ <button class="btn btn-label-m">Label M</button>
131
+ <div class="demo-code">.btn .btn-label-m</div>
132
+ </div>
129
133
  <div class="demo-item">
130
134
  <button class="btn btn-link">Link</button>
131
135
  <div class="demo-code">.btn .btn-link</div>
@@ -83,7 +83,7 @@
83
83
  /* === _buttons.css === */
84
84
  /**
85
85
  * Botones
86
- * Variantes: primary, secondary, tertiary
86
+ * Variantes: primary, secondary, tertiary, label-m
87
87
  * Tamaños: sm, md, lg
88
88
  */
89
89
 
@@ -304,6 +304,72 @@
304
304
  border: 0 solid transparent !important;
305
305
  }
306
306
 
307
+ /* LABEL M BUTTON (similar a tertiary) */
308
+ .btn-label-m {
309
+ background-color: transparent;
310
+ border: 0 solid transparent;
311
+ height: auto;
312
+ min-height: auto;
313
+ padding-top: 6px;
314
+ padding-bottom: 6px;
315
+ line-height: 1;
316
+ min-width: 24px;
317
+ padding-inline: 0;
318
+ color: var(--hg-color-black);
319
+ letter-spacing: 0.16em;
320
+ }
321
+
322
+ .btn-label-m svg g {
323
+ fill: var(--hg-color-black);
324
+ stroke: var(--hg-color-black);
325
+ }
326
+
327
+ .btn-label-m svg circle {
328
+ stroke: var(--hg-color-black);
329
+ }
330
+
331
+ .btn-label-m:focus,
332
+ .btn-label-m.focus,
333
+ .btn-label-m:hover,
334
+ .btn-label-m.hover,
335
+ .btn-label-m:active,
336
+ .btn-label-m.active {
337
+ border: 0 solid transparent;
338
+ background-color: transparent;
339
+ cursor: pointer;
340
+ font-family: var(--hg-typo-font-family-primary-bold);
341
+ font-weight: var(--hg-typo-font-weight-500);
342
+ }
343
+
344
+ .btn-label-m.active {
345
+ border-bottom: 0.5px solid var(--hg-color-black);
346
+ }
347
+
348
+ .btn-label-m:disabled,
349
+ .btn-label-m[disabled],
350
+ .btn-label-m.disabled {
351
+ pointer-events: none;
352
+ cursor: default;
353
+ background-color: var(--hg-color-bg-light);
354
+ border: var(--border-width) var(--border-style) var(--hg-color-bg-light);
355
+ color: var(--hg-color-dark-grey);
356
+ filter: none;
357
+ opacity: 1;
358
+ }
359
+
360
+ .btn-label-m:disabled svg-icon,
361
+ .btn-label-m:disabled svg-icon2,
362
+ .btn-label-m:disabled md-icon,
363
+ .btn-label-m[disabled] svg-icon,
364
+ .btn-label-m[disabled] svg-icon2,
365
+ .btn-label-m[disabled] md-icon,
366
+ .btn-label-m.disabled svg-icon,
367
+ .btn-label-m.disabled svg-icon2,
368
+ .btn-label-m.disabled md-icon {
369
+ background-color: transparent !important;
370
+ border: 0 solid transparent !important;
371
+ }
372
+
307
373
  /* LINK BUTTON */
308
374
  .btn-link {
309
375
  background-color: transparent;
@@ -318,7 +384,6 @@
318
384
  .btn-link:focus {
319
385
  color: var(--hg-color-dark-grey);
320
386
  background-color: transparent;
321
-
322
387
  }
323
388
 
324
389
  .btn-link:disabled,
@@ -337,7 +402,6 @@
337
402
  }
338
403
 
339
404
 
340
-
341
405
  /* === _inputs.css === */
342
406
  /**
343
407
  * Inputs
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "holygrail5",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "description": "Framework CSS generator con Node.js - Genera CSS optimizado con variables CSS desde un archivo JSON de configuración",
5
5
  "main": "generate-css.js",
6
6
  "style": "dist/output.css",
@@ -5,6 +5,7 @@
5
5
  },
6
6
  "fontFamilyMap": {
7
7
  "primary": "arial, sans-serif",
8
+ "primary-bold": "\"Arial Bold\", Arial, sans-serif",
8
9
  "secondary": "\"ms-serif\", serif"
9
10
  },
10
11
  "spacingMap": {
@@ -55,7 +56,7 @@
55
56
  "primary": "#000000",
56
57
  "error": "#b40016",
57
58
  "info": "#1a32a4",
58
- "success": "#76ae4a",
59
+ "success": "#12882C",
59
60
  "warning": "#ffc700",
60
61
  "feel": "#fb9962",
61
62
  "feel-dark": "#c94c07",
@@ -325,7 +326,7 @@
325
326
  "--hg-color-primary": "#000000",
326
327
  "--hg-color-error": "#b40016",
327
328
  "--hg-color-info": "#1a32a4",
328
- "--hg-color-success": "#76ae4a",
329
+ "--hg-color-success": "#12882C",
329
330
  "--hg-color-warning": "#ffc700",
330
331
  "--hg-color-feel": "#fb9962",
331
332
  "--hg-color-feel-dark": "#c94c07",
@@ -53,7 +53,10 @@ function generateCSS(configData) {
53
53
  textTransformVars,
54
54
  fontSizeVars,
55
55
  spacingVars,
56
- colorVars
56
+ colorVars,
57
+ configData.fontFamilyMap || null,
58
+ prefix,
59
+ category
57
60
  );
58
61
 
59
62
  // 4. Genera helpers de spacing (padding/margin)
@@ -117,12 +117,22 @@ function generateColorVariables(colorsMap, prefix) {
117
117
 
118
118
  /**
119
119
  * Genera todas las variables CSS en el bloque :root
120
- * Recorre todos los mapas de variables y las convierte en declaraciones CSS
120
+ * Recorre todos los mapas de variables y las convierte en declaraciones CSS.
121
+ * Si se pasa fontFamilyMap, las variables font-family se generan desde el map (una por entrada).
121
122
  */
122
- function generateRootVariables(fontFamilyVars, lineHeightVars, fontWeightVars, letterSpacingVars, textTransformVars, fontSizeVars, spacingVars = [], colorVars = []) {
123
+ function generateRootVariables(fontFamilyVars, lineHeightVars, fontWeightVars, letterSpacingVars, textTransformVars, fontSizeVars, spacingVars = [], colorVars = [], fontFamilyMap = null, prefix = 'hg', category = 'typo') {
123
124
  const variables = [];
124
- const allMaps = [
125
- { map: fontFamilyVars, name: 'font-family' },
125
+ // Font-family: usar fontFamilyMap si existe (todas las entradas en :root), si no usar fontFamilyVars
126
+ if (fontFamilyMap && typeof fontFamilyMap === 'object') {
127
+ Object.entries(fontFamilyMap).forEach(([name, value]) => {
128
+ variables.push(` --${prefix}-${category}-font-family-${name}: ${value};`);
129
+ });
130
+ } else {
131
+ Array.from(fontFamilyVars.values()).forEach(item => {
132
+ variables.push(` ${item.varName}: ${item.value};`);
133
+ });
134
+ }
135
+ const restMaps = [
126
136
  { map: lineHeightVars, name: 'line-height' },
127
137
  { map: fontWeightVars, name: 'font-weight' },
128
138
  { map: letterSpacingVars, name: 'letter-spacing' },
@@ -130,7 +140,7 @@ function generateRootVariables(fontFamilyVars, lineHeightVars, fontWeightVars, l
130
140
  { map: fontSizeVars, name: 'font-size' }
131
141
  ];
132
142
 
133
- allMaps.forEach(({ map }) => {
143
+ restMaps.forEach(({ map }) => {
134
144
  Array.from(map.values()).forEach(item => {
135
145
  variables.push(` ${item.varName}: ${item.value};`);
136
146
  });
@@ -44,6 +44,10 @@ El sistema está dividido en módulos para facilitar el mantenimiento:
44
44
 
45
45
  - **Primary**: `.btn .btn-primary`
46
46
  - **Secondary**: `.btn .btn-secondary`
47
+ - **Tertiary**: `.btn .btn-tertiary`
48
+ - **Label M**: `.btn .btn-label-m` (similar a tertiary)
49
+ - **Link**: `.btn .btn-link`
50
+ - **Badge**: `.btn .btn-badge` (pill, compacto; en contexto `.has-light` usa texto blanco sobre fondo oscuro)
47
51
  - **Outline**: `.btn .btn-outline`
48
52
  - **Ghost**: `.btn .btn-ghost`
49
53
  - **Feel**: `.btn .btn-feel`
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Botones
3
- * Variantes: primary, secondary, tertiary
3
+ * Variantes: primary, secondary, tertiary, label-m, link, badge
4
4
  * Tamaños: sm, md, lg
5
5
  */
6
6
 
@@ -221,6 +221,72 @@
221
221
  border: 0 solid transparent !important;
222
222
  }
223
223
 
224
+ /* LABEL M BUTTON (similar a tertiary) */
225
+ .btn-label-m {
226
+ background-color: transparent;
227
+ border: 0 solid transparent;
228
+ height: auto;
229
+ min-height: auto;
230
+ padding-top: 6px;
231
+ padding-bottom: 6px;
232
+ line-height: 1;
233
+ min-width: 24px;
234
+ padding-inline: 0;
235
+ color: var(--hg-color-black);
236
+ letter-spacing: 0.16em;
237
+ }
238
+
239
+ .btn-label-m svg g {
240
+ fill: var(--hg-color-black);
241
+ stroke: var(--hg-color-black);
242
+ }
243
+
244
+ .btn-label-m svg circle {
245
+ stroke: var(--hg-color-black);
246
+ }
247
+
248
+ .btn-label-m:focus,
249
+ .btn-label-m.focus,
250
+ .btn-label-m:hover,
251
+ .btn-label-m.hover,
252
+ .btn-label-m:active,
253
+ .btn-label-m.active {
254
+ border: 0 solid transparent;
255
+ background-color: transparent;
256
+ cursor: pointer;
257
+ font-family: var(--hg-typo-font-family-primary-bold);
258
+ font-weight: var(--hg-typo-font-weight-500);
259
+ }
260
+
261
+ .btn-label-m.active {
262
+ border-bottom: 0.5px solid var(--hg-color-black);
263
+ }
264
+
265
+ .btn-label-m:disabled,
266
+ .btn-label-m[disabled],
267
+ .btn-label-m.disabled {
268
+ pointer-events: none;
269
+ cursor: default;
270
+ background-color: var(--hg-color-bg-light);
271
+ border: var(--border-width) var(--border-style) var(--hg-color-bg-light);
272
+ color: var(--hg-color-dark-grey);
273
+ filter: none;
274
+ opacity: 1;
275
+ }
276
+
277
+ .btn-label-m:disabled svg-icon,
278
+ .btn-label-m:disabled svg-icon2,
279
+ .btn-label-m:disabled md-icon,
280
+ .btn-label-m[disabled] svg-icon,
281
+ .btn-label-m[disabled] svg-icon2,
282
+ .btn-label-m[disabled] md-icon,
283
+ .btn-label-m.disabled svg-icon,
284
+ .btn-label-m.disabled svg-icon2,
285
+ .btn-label-m.disabled md-icon {
286
+ background-color: transparent !important;
287
+ border: 0 solid transparent !important;
288
+ }
289
+
224
290
  /* LINK BUTTON */
225
291
  .btn-link {
226
292
  background-color: transparent;
@@ -235,7 +301,6 @@
235
301
  .btn-link:focus {
236
302
  color: var(--hg-color-dark-grey);
237
303
  background-color: transparent;
238
-
239
304
  }
240
305
 
241
306
  .btn-link:disabled,
@@ -248,8 +313,71 @@
248
313
  opacity: 0.5;
249
314
  }
250
315
 
316
+ /* BADGE BUTTON (pill, compacto) */
317
+ .btn-badge {
318
+ min-height: auto;
319
+ height: auto;
320
+ padding: var(--hg-spacing-4) var(--hg-spacing-12);
321
+ border-radius: 9999px;
322
+ border: var(--border-width) var(--border-style) transparent;
323
+ background-color: var(--hg-color-white);
324
+ color: var(--hg-color-dark-grey);
325
+ font-size: var(--hg-typo-font-size-12);
326
+ white-space: nowrap;
327
+ }
328
+
329
+ .btn-badge:focus,
330
+ .btn-badge.focus,
331
+ .btn-badge:hover,
332
+ .btn-badge.hover,
333
+ .btn-badge:active,
334
+ .btn-badge.active {
335
+ background-color: var(--hg-color-white);
336
+ color: var(--hg-color-primary);
337
+ border-color: transparent;
338
+ cursor: pointer;
339
+ }
340
+
341
+ .btn-badge:disabled,
342
+ .btn-badge[disabled],
343
+ .btn-badge.disabled {
344
+ pointer-events: none;
345
+ cursor: default;
346
+ background-color: var(--hg-color-white);
347
+ border-color: transparent;
348
+ color: var(--hg-color-middle-grey);
349
+ opacity: 1;
350
+ }
351
+
352
+ /* Badge en contexto claro (fondo oscuro) */
353
+ .has-light .btn-badge {
354
+ background-color: transparent;
355
+ color: var(--hg-color-white);
356
+ border-color: transparent;
357
+ }
358
+
359
+ .has-light .btn-badge:focus,
360
+ .has-light .btn-badge.focus,
361
+ .has-light .btn-badge:hover,
362
+ .has-light .btn-badge.hover,
363
+ .has-light .btn-badge:active,
364
+ .has-light .btn-badge.active {
365
+ background-color: transparent;
366
+ color: var(--hg-color-white);
367
+ border-color: transparent;
368
+ cursor: pointer;
369
+ }
370
+
371
+ .has-light .btn-badge:disabled,
372
+ .has-light .btn-badge[disabled],
373
+ .has-light .btn-badge.disabled {
374
+ background-color: transparent;
375
+ border-color: transparent;
376
+ color: var(--hg-color-light-grey);
377
+ opacity: 1;
378
+ }
379
+
251
380
  /* Ancho completo */
252
381
  .btn-full {
253
382
  width: 100%;
254
383
  }
255
-
@@ -54,10 +54,18 @@
54
54
  <button class="btn btn-tertiary">Tertiary</button>
55
55
  <div class="demo-code">.btn .btn-tertiary</div>
56
56
  </div>
57
+ <div class="demo-item">
58
+ <button class="btn btn-label-m">Label M</button>
59
+ <div class="demo-code">.btn .btn-label-m</div>
60
+ </div>
57
61
  <div class="demo-item">
58
62
  <button class="btn btn-link">Link</button>
59
63
  <div class="demo-code">.btn .btn-link</div>
60
64
  </div>
65
+ <div class="demo-item">
66
+ <button class="btn btn-badge">Badge</button>
67
+ <div class="demo-code">.btn .btn-badge</div>
68
+ </div>
61
69
 
62
70
  <div class="demo-item">
63
71
  <button class="btn btn-primary" disabled>Disabled</button>