@heroelc/fsociety 0.0.8 → 0.0.10
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/{src/styles/_mixins.scss → _mixins.scss} +24 -23
- package/{src/styles/_tokens.scss → _tokens.scss} +11 -26
- package/fesm2022/heroelc-fsociety.mjs +38 -16
- package/fesm2022/heroelc-fsociety.mjs.map +1 -1
- package/global.scss +2 -0
- package/lib/badge/badge.component.d.ts +19 -5
- package/lib/button/button.component.d.ts +1 -1
- package/package.json +1 -1
- /package/{src/styles/_index.scss → _index.scss} +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@use 'tokens' as t;
|
|
2
|
+
@use 'sass:map';
|
|
2
3
|
|
|
3
4
|
// =============================================================================
|
|
4
5
|
// fsociety · _mixins.scss
|
|
@@ -129,12 +130,12 @@ $spacing-scale: (
|
|
|
129
130
|
// ---------- Mixins de padding ----------
|
|
130
131
|
|
|
131
132
|
@mixin p($val) { padding: $val; }
|
|
132
|
-
@mixin px($key) { padding-left: map
|
|
133
|
-
@mixin py($key) { padding-top: map
|
|
134
|
-
@mixin pl($key) { padding-left: map
|
|
135
|
-
@mixin pr($key) { padding-right: map
|
|
136
|
-
@mixin pt($key) { padding-top: map
|
|
137
|
-
@mixin pb($key) { padding-bottom: map
|
|
133
|
+
@mixin px($key) { padding-left: map.get($spacing-scale, $key); padding-right: map.get($spacing-scale, $key); }
|
|
134
|
+
@mixin py($key) { padding-top: map.get($spacing-scale, $key); padding-bottom: map.get($spacing-scale, $key); }
|
|
135
|
+
@mixin pl($key) { padding-left: map.get($spacing-scale, $key); }
|
|
136
|
+
@mixin pr($key) { padding-right: map.get($spacing-scale, $key); }
|
|
137
|
+
@mixin pt($key) { padding-top: map.get($spacing-scale, $key); }
|
|
138
|
+
@mixin pb($key) { padding-bottom: map.get($spacing-scale, $key); }
|
|
138
139
|
|
|
139
140
|
// ---------- Mixins de margin ----------
|
|
140
141
|
|
|
@@ -143,14 +144,14 @@ $spacing-scale: (
|
|
|
143
144
|
@if $key == 'auto' {
|
|
144
145
|
margin-left: auto; margin-right: auto;
|
|
145
146
|
} @else {
|
|
146
|
-
margin-left: map
|
|
147
|
+
margin-left: map.get($spacing-scale, $key); margin-right: map.get($spacing-scale, $key);
|
|
147
148
|
}
|
|
148
149
|
}
|
|
149
|
-
@mixin my($key) { margin-top: map
|
|
150
|
-
@mixin ml($key) { margin-left: map
|
|
151
|
-
@mixin mr($key) { margin-right: map
|
|
152
|
-
@mixin mt($key) { margin-top: map
|
|
153
|
-
@mixin mb($key) { margin-bottom: map
|
|
150
|
+
@mixin my($key) { margin-top: map.get($spacing-scale, $key); margin-bottom: map.get($spacing-scale, $key); }
|
|
151
|
+
@mixin ml($key) { margin-left: map.get($spacing-scale, $key); }
|
|
152
|
+
@mixin mr($key) { margin-right: map.get($spacing-scale, $key); }
|
|
153
|
+
@mixin mt($key) { margin-top: map.get($spacing-scale, $key); }
|
|
154
|
+
@mixin mb($key) { margin-bottom: map.get($spacing-scale, $key); }
|
|
154
155
|
|
|
155
156
|
// ---------- Clases utilitarias de padding ----------
|
|
156
157
|
|
|
@@ -265,28 +266,28 @@ $breakpoints: (
|
|
|
265
266
|
'md': 768px,
|
|
266
267
|
'lg': 1024px,
|
|
267
268
|
'xl': 1280px,
|
|
268
|
-
'
|
|
269
|
+
'xxl': 1536px,
|
|
269
270
|
);
|
|
270
271
|
|
|
271
272
|
// respond-to — media query min-width
|
|
272
|
-
// @param $bp — nombre del breakpoint: 'sm' | 'md' | 'lg' | 'xl' | '
|
|
273
|
+
// @param $bp — nombre del breakpoint: 'sm' | 'md' | 'lg' | 'xl' | 'xxl'
|
|
273
274
|
// Ejemplo:
|
|
274
275
|
// .mi-componente {
|
|
275
276
|
// font-size: t.$fs-text-sm;
|
|
276
277
|
// @include respond-to('md') { font-size: t.$fs-text-base; }
|
|
277
278
|
// }
|
|
278
279
|
@mixin respond-to($bp) {
|
|
279
|
-
$val: map
|
|
280
|
+
$val: map.get($breakpoints, $bp);
|
|
280
281
|
@if $val {
|
|
281
282
|
@media (min-width: $val) { @content; }
|
|
282
283
|
} @else {
|
|
283
|
-
@warn "respond-to(): breakpoint '#{$bp}' no existe. Usá: sm, md, lg, xl,
|
|
284
|
+
@warn "respond-to(): breakpoint '#{$bp}' no existe. Usá: sm, md, lg, xl, xxl";
|
|
284
285
|
}
|
|
285
286
|
}
|
|
286
287
|
|
|
287
288
|
// mobile-only — se aplica solo en pantallas menores a sm
|
|
288
289
|
@mixin mobile-only {
|
|
289
|
-
@media (max-width: #{map
|
|
290
|
+
@media (max-width: #{map.get($breakpoints, 'sm') - 1px}) { @content; }
|
|
290
291
|
}
|
|
291
292
|
|
|
292
293
|
// container — ancho máximo centrado con padding lateral
|
|
@@ -307,14 +308,14 @@ $breakpoints: (
|
|
|
307
308
|
// Clases utilitarias responsive
|
|
308
309
|
.container { @include container; }
|
|
309
310
|
|
|
310
|
-
// display responsive
|
|
311
|
+
// display responsive — usa guión como separador (ej: sm-flex, md-hidden)
|
|
311
312
|
@each $bp, $val in $breakpoints {
|
|
312
313
|
@media (min-width: $val) {
|
|
313
|
-
.#{$bp}
|
|
314
|
-
.#{$bp}
|
|
315
|
-
.#{$bp}
|
|
316
|
-
.#{$bp}
|
|
317
|
-
.#{$bp}
|
|
314
|
+
.#{$bp}-flex { display: flex; }
|
|
315
|
+
.#{$bp}-flex-col { display: flex; flex-direction: column; }
|
|
316
|
+
.#{$bp}-hidden { display: none; }
|
|
317
|
+
.#{$bp}-block { display: block; }
|
|
318
|
+
.#{$bp}-flex-center { @include flex-center; }
|
|
318
319
|
}
|
|
319
320
|
}
|
|
320
321
|
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@use 'sass:color';
|
|
2
|
+
|
|
1
3
|
// =============================================================================
|
|
2
4
|
// fsociety · _tokens.scss
|
|
3
5
|
// Color scale engine + alias tokens de estado
|
|
@@ -53,16 +55,16 @@ $fs-light-mix: #ffffff !default;
|
|
|
53
55
|
// @return color
|
|
54
56
|
|
|
55
57
|
@function generate-scale($base, $stop) {
|
|
56
|
-
@if $stop == 50 { @return mix($fs-light-mix, $base, 92%); }
|
|
57
|
-
@if $stop == 100 { @return mix($fs-light-mix, $base, 80%); }
|
|
58
|
-
@if $stop == 200 { @return mix($fs-light-mix, $base, 64%); }
|
|
59
|
-
@if $stop == 300 { @return mix($fs-light-mix, $base, 44%); }
|
|
60
|
-
@if $stop == 400 { @return mix($fs-light-mix, $base, 22%); }
|
|
58
|
+
@if $stop == 50 { @return color.mix($fs-light-mix, $base, 92%); }
|
|
59
|
+
@if $stop == 100 { @return color.mix($fs-light-mix, $base, 80%); }
|
|
60
|
+
@if $stop == 200 { @return color.mix($fs-light-mix, $base, 64%); }
|
|
61
|
+
@if $stop == 300 { @return color.mix($fs-light-mix, $base, 44%); }
|
|
62
|
+
@if $stop == 400 { @return color.mix($fs-light-mix, $base, 22%); }
|
|
61
63
|
@if $stop == 500 { @return $base; }
|
|
62
|
-
@if $stop == 600 { @return mix($fs-dark-mix, $base, 16%); }
|
|
63
|
-
@if $stop == 700 { @return mix($fs-dark-mix, $base, 34%); }
|
|
64
|
-
@if $stop == 800 { @return mix($fs-dark-mix, $base, 54%); }
|
|
65
|
-
@if $stop == 900 { @return mix($fs-dark-mix, $base, 72%); }
|
|
64
|
+
@if $stop == 600 { @return color.mix($fs-dark-mix, $base, 16%); }
|
|
65
|
+
@if $stop == 700 { @return color.mix($fs-dark-mix, $base, 34%); }
|
|
66
|
+
@if $stop == 800 { @return color.mix($fs-dark-mix, $base, 54%); }
|
|
67
|
+
@if $stop == 900 { @return color.mix($fs-dark-mix, $base, 72%); }
|
|
66
68
|
|
|
67
69
|
@warn "generate-scale(): stop #{$stop} no válido. Usá: 50 100 200 300 400 500 600 700 800 900";
|
|
68
70
|
@return $base;
|
|
@@ -453,20 +455,3 @@ $fs-z-tooltip: 600;
|
|
|
453
455
|
[data-theme='dark'] {
|
|
454
456
|
@extend :root; // hereda todo el bloque de dark mode arriba si se necesita
|
|
455
457
|
}
|
|
456
|
-
|
|
457
|
-
// ---------------------------------------------------------------------------
|
|
458
|
-
// 15. TOKENS DE COMPONENTE
|
|
459
|
-
// ---------------------------------------------------------------------------
|
|
460
|
-
|
|
461
|
-
:root {
|
|
462
|
-
// fs-tabs
|
|
463
|
-
--fs-tab-bg: #0d1117;
|
|
464
|
-
--fs-tab-color: rgba(255, 255, 255, 0.40);
|
|
465
|
-
--fs-tab-color-hover: rgba(255, 255, 255, 0.70);
|
|
466
|
-
--fs-tab-color-active: #ffffff;
|
|
467
|
-
--fs-tab-border: rgba(255, 255, 255, 0.08);
|
|
468
|
-
--fs-tab-hover-bg: rgba(255, 255, 255, 0.03);
|
|
469
|
-
--fs-tab-indicator-from: var(--fs-primary-base);
|
|
470
|
-
--fs-tab-indicator-to: var(--fs-tertiary-base);
|
|
471
|
-
--fs-tab-indicator-glow: rgba(34, 211, 238, 0.45);
|
|
472
|
-
}
|