@khipu/design-system 0.2.0-alpha.6 → 0.2.0-alpha.7
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.
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*
|
|
12
12
|
* AUTO-GENERATED FILE - DO NOT EDIT MANUALLY
|
|
13
13
|
* Source: design-system/src/tokens/tokens.json
|
|
14
|
-
* Generated: 2026-05-
|
|
14
|
+
* Generated: 2026-05-15T14:22:48.149Z
|
|
15
15
|
*
|
|
16
16
|
* To regenerate:
|
|
17
17
|
* cd design-system && npm run tokens:generate
|
|
@@ -1050,6 +1050,7 @@ a.kds-btn.kds-btn-md {
|
|
|
1050
1050
|
padding: var(--kds-spacing-2);
|
|
1051
1051
|
box-shadow: var(--kds-shadow-card);
|
|
1052
1052
|
transition: box-shadow 0.3s ease;
|
|
1053
|
+
margin-block-start: 0 !important;
|
|
1053
1054
|
}
|
|
1054
1055
|
|
|
1055
1056
|
.kds-card-elevated:hover,
|
|
@@ -1726,7 +1727,7 @@ a.kds-btn.kds-btn-md {
|
|
|
1726
1727
|
}
|
|
1727
1728
|
|
|
1728
1729
|
/* ========================================
|
|
1729
|
-
Snackbar Positioning
|
|
1730
|
+
Snackbar Positioning & Styling
|
|
1730
1731
|
======================================== */
|
|
1731
1732
|
|
|
1732
1733
|
.snackbar {
|
|
@@ -1738,41 +1739,99 @@ a.kds-btn.kds-btn-md {
|
|
|
1738
1739
|
min-width: 344px;
|
|
1739
1740
|
max-width: var(--kds-snackbar-max-width);
|
|
1740
1741
|
box-shadow: var(--kds-shadow-8);
|
|
1742
|
+
border-radius: var(--kds-radius-md);
|
|
1743
|
+
padding: var(--kds-spacing-1-5) var(--kds-spacing-2);
|
|
1744
|
+
gap: var(--kds-spacing-1);
|
|
1745
|
+
font-family: var(--kds-font-family-primary);
|
|
1746
|
+
font-size: var(--kds-font-size-body2);
|
|
1747
|
+
font-weight: var(--kds-font-weight-medium);
|
|
1748
|
+
line-height: var(--kds-line-height-normal);
|
|
1749
|
+
letter-spacing: var(--kds-letter-spacing-normal);
|
|
1750
|
+
overflow: hidden;
|
|
1741
1751
|
}
|
|
1742
1752
|
|
|
1743
1753
|
/* Snackbar active state - ensure visibility when toggled via JS */
|
|
1744
1754
|
.snackbar.active {
|
|
1745
1755
|
visibility: visible !important;
|
|
1746
1756
|
opacity: 1 !important;
|
|
1747
|
-
transform: translateX(-50%) !important;
|
|
1748
1757
|
}
|
|
1749
1758
|
|
|
1750
|
-
/* Snackbar semantic variants
|
|
1759
|
+
/* Snackbar semantic variants
|
|
1760
|
+
All use white text (--kds-color-primary-contrast) on solid semantic backgrounds */
|
|
1751
1761
|
.snackbar.error {
|
|
1752
1762
|
background-color: var(--kds-color-error-main) !important;
|
|
1753
|
-
color: var(--
|
|
1763
|
+
color: var(--kds-color-primary-contrast) !important;
|
|
1754
1764
|
}
|
|
1755
1765
|
|
|
1756
1766
|
.snackbar.error i {
|
|
1757
|
-
color: var(--
|
|
1767
|
+
color: var(--kds-color-primary-contrast) !important;
|
|
1758
1768
|
}
|
|
1759
1769
|
|
|
1760
1770
|
.snackbar.info {
|
|
1761
1771
|
background-color: var(--kds-color-info-main) !important;
|
|
1762
|
-
color: var(--
|
|
1772
|
+
color: var(--kds-color-primary-contrast) !important;
|
|
1763
1773
|
}
|
|
1764
1774
|
|
|
1765
1775
|
.snackbar.info i {
|
|
1766
|
-
color: var(--
|
|
1776
|
+
color: var(--kds-color-primary-contrast) !important;
|
|
1767
1777
|
}
|
|
1768
1778
|
|
|
1769
1779
|
.snackbar.success {
|
|
1770
1780
|
background-color: var(--kds-color-success-main) !important;
|
|
1771
|
-
color: var(--
|
|
1781
|
+
color: var(--kds-color-primary-contrast) !important;
|
|
1772
1782
|
}
|
|
1773
1783
|
|
|
1774
1784
|
.snackbar.success i {
|
|
1775
|
-
color: var(--
|
|
1785
|
+
color: var(--kds-color-primary-contrast) !important;
|
|
1786
|
+
}
|
|
1787
|
+
|
|
1788
|
+
/* Snackbar progress bar — animated timer for auto-dismiss */
|
|
1789
|
+
.snackbar[data-auto-dismiss]::after {
|
|
1790
|
+
content: '';
|
|
1791
|
+
position: absolute;
|
|
1792
|
+
bottom: 0;
|
|
1793
|
+
left: 0;
|
|
1794
|
+
height: 3px;
|
|
1795
|
+
width: 100%;
|
|
1796
|
+
background: rgba(255, 255, 255, 0.35);
|
|
1797
|
+
border-radius: 0 0 var(--kds-radius-md) var(--kds-radius-md);
|
|
1798
|
+
animation: kds-snackbar-timer var(--kds-snackbar-duration, 5s) linear forwards;
|
|
1799
|
+
}
|
|
1800
|
+
|
|
1801
|
+
@keyframes kds-snackbar-timer {
|
|
1802
|
+
from { width: 100%; }
|
|
1803
|
+
to { width: 0; }
|
|
1804
|
+
}
|
|
1805
|
+
|
|
1806
|
+
/* Snackbar close button */
|
|
1807
|
+
.kds-snackbar-close {
|
|
1808
|
+
background: none !important;
|
|
1809
|
+
border: none !important;
|
|
1810
|
+
color: var(--kds-color-primary-contrast) !important;
|
|
1811
|
+
cursor: pointer;
|
|
1812
|
+
padding: var(--kds-spacing-0-5) !important;
|
|
1813
|
+
margin: calc(-1 * var(--kds-spacing-0-5)) !important;
|
|
1814
|
+
margin-left: 0 !important;
|
|
1815
|
+
border-radius: var(--kds-radius-full) !important;
|
|
1816
|
+
display: flex;
|
|
1817
|
+
align-items: center;
|
|
1818
|
+
justify-content: center;
|
|
1819
|
+
flex-shrink: 0;
|
|
1820
|
+
opacity: 0.7;
|
|
1821
|
+
transition: opacity 150ms;
|
|
1822
|
+
min-width: auto !important;
|
|
1823
|
+
width: auto !important;
|
|
1824
|
+
height: auto !important;
|
|
1825
|
+
}
|
|
1826
|
+
|
|
1827
|
+
.kds-snackbar-close:hover {
|
|
1828
|
+
opacity: 1;
|
|
1829
|
+
background: rgba(255, 255, 255, 0.15) !important;
|
|
1830
|
+
}
|
|
1831
|
+
|
|
1832
|
+
.kds-snackbar-close i {
|
|
1833
|
+
font-size: 18px !important;
|
|
1834
|
+
color: var(--kds-color-primary-contrast) !important;
|
|
1776
1835
|
}
|
|
1777
1836
|
|
|
1778
1837
|
/* ========================================
|
|
@@ -2192,12 +2251,16 @@ body.dark {
|
|
|
2192
2251
|
Asegurar que el dropdown arrow sea visible
|
|
2193
2252
|
========================================== */
|
|
2194
2253
|
|
|
2195
|
-
/* Select:
|
|
2254
|
+
/* Select: reset nativo + arrow custom via SVG (iOS Safari ignora estilos con appearance:auto) */
|
|
2196
2255
|
.field select {
|
|
2197
|
-
|
|
2198
|
-
appearance:
|
|
2199
|
-
|
|
2200
|
-
-
|
|
2256
|
+
-webkit-appearance: none;
|
|
2257
|
+
-moz-appearance: none;
|
|
2258
|
+
appearance: none;
|
|
2259
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%23333' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
|
|
2260
|
+
background-repeat: no-repeat;
|
|
2261
|
+
background-position: right var(--kds-spacing-1) center;
|
|
2262
|
+
background-size: 20px;
|
|
2263
|
+
padding-right: var(--kds-spacing-4) !important;
|
|
2201
2264
|
}
|
|
2202
2265
|
|
|
2203
2266
|
/* ==========================================
|
|
@@ -2745,7 +2808,8 @@ dialog.modal .field.border:focus-within {
|
|
|
2745
2808
|
padding: var(--kds-spacing-2);
|
|
2746
2809
|
}
|
|
2747
2810
|
|
|
2748
|
-
.snackbar
|
|
2811
|
+
.snackbar,
|
|
2812
|
+
.snackbar.active {
|
|
2749
2813
|
min-width: calc(100% - 32px);
|
|
2750
2814
|
left: 16px;
|
|
2751
2815
|
right: 16px;
|
|
@@ -4928,6 +4992,10 @@ dialog#surveyModal button.circle {
|
|
|
4928
4992
|
.kds-screen > .kds-secure-footer {
|
|
4929
4993
|
display: none;
|
|
4930
4994
|
}
|
|
4995
|
+
|
|
4996
|
+
.kds-screen > form {
|
|
4997
|
+
margin-block-start: 0 !important;
|
|
4998
|
+
}
|
|
4931
4999
|
}
|
|
4932
5000
|
|
|
4933
5001
|
.kds-secure-footer-lock {
|
|
@@ -6192,7 +6260,8 @@ button.kds-btn-success::after {
|
|
|
6192
6260
|
}
|
|
6193
6261
|
.kds-brand-inner svg,
|
|
6194
6262
|
.kds-brand-inner img {
|
|
6195
|
-
|
|
6263
|
+
width: calc(50px - 16px * var(--collapse-progress, 0));
|
|
6264
|
+
height: auto;
|
|
6196
6265
|
display: block;
|
|
6197
6266
|
}
|
|
6198
6267
|
|
|
@@ -923,16 +923,34 @@ const ui = _context.ui;
|
|
|
923
923
|
}
|
|
924
924
|
|
|
925
925
|
/**
|
|
926
|
-
*
|
|
926
|
+
* Dismiss and remove a snackbar with fade-out
|
|
927
|
+
*/
|
|
928
|
+
function dismissSnackbar(snackbar) {
|
|
929
|
+
snackbar.classList.remove('active');
|
|
930
|
+
setTimeout(function() { snackbar.remove(); }, 300);
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
/**
|
|
934
|
+
* Initialize flash messages with auto-dismiss and close button
|
|
927
935
|
*/
|
|
928
936
|
function initFlashMessages() {
|
|
929
|
-
|
|
937
|
+
var snackbars = document.querySelectorAll('.snackbar[data-auto-dismiss="true"]');
|
|
930
938
|
|
|
931
939
|
snackbars.forEach(function(snackbar) {
|
|
940
|
+
// Give text span flex-grow so close button stays right
|
|
941
|
+
var span = snackbar.querySelector('span');
|
|
942
|
+
if (span) span.classList.add('max');
|
|
943
|
+
|
|
944
|
+
// Inject close button
|
|
945
|
+
var closeBtn = document.createElement('button');
|
|
946
|
+
closeBtn.className = 'kds-snackbar-close';
|
|
947
|
+
closeBtn.setAttribute('aria-label', 'Cerrar');
|
|
948
|
+
closeBtn.innerHTML = '<i class="material-symbols-outlined">close</i>';
|
|
949
|
+
closeBtn.onclick = function() { dismissSnackbar(snackbar); };
|
|
950
|
+
snackbar.appendChild(closeBtn);
|
|
951
|
+
|
|
932
952
|
// Auto-dismiss after 5 seconds
|
|
933
|
-
setTimeout(function() {
|
|
934
|
-
snackbar.classList.remove('active');
|
|
935
|
-
}, 5000);
|
|
953
|
+
setTimeout(function() { dismissSnackbar(snackbar); }, 5000);
|
|
936
954
|
});
|
|
937
955
|
}
|
|
938
956
|
|
|
@@ -1511,25 +1529,24 @@ const ui = _context.ui;
|
|
|
1511
1529
|
type = type || 'info';
|
|
1512
1530
|
duration = duration || 5000;
|
|
1513
1531
|
|
|
1514
|
-
|
|
1532
|
+
var snackbar = document.createElement('div');
|
|
1515
1533
|
snackbar.className = 'snackbar active ' + type;
|
|
1534
|
+
snackbar.setAttribute('data-auto-dismiss', 'true');
|
|
1535
|
+
snackbar.style.setProperty('--kds-snackbar-duration', duration + 'ms');
|
|
1516
1536
|
|
|
1517
|
-
|
|
1537
|
+
var icon = document.createElement('i');
|
|
1518
1538
|
icon.className = 'material-symbols-outlined';
|
|
1519
1539
|
icon.textContent = type === 'success' ? 'check_circle' : (type === 'error' ? 'error' : 'info');
|
|
1520
1540
|
|
|
1521
|
-
|
|
1541
|
+
var span = document.createElement('span');
|
|
1542
|
+
span.className = 'max';
|
|
1522
1543
|
span.textContent = message;
|
|
1523
1544
|
|
|
1524
|
-
|
|
1525
|
-
closeBtn.className = '
|
|
1545
|
+
var closeBtn = document.createElement('button');
|
|
1546
|
+
closeBtn.className = 'kds-snackbar-close';
|
|
1547
|
+
closeBtn.setAttribute('aria-label', 'Cerrar');
|
|
1526
1548
|
closeBtn.innerHTML = '<i class="material-symbols-outlined">close</i>';
|
|
1527
|
-
closeBtn.onclick = function() {
|
|
1528
|
-
snackbar.classList.remove('active');
|
|
1529
|
-
setTimeout(function() {
|
|
1530
|
-
snackbar.remove();
|
|
1531
|
-
}, 300);
|
|
1532
|
-
};
|
|
1549
|
+
closeBtn.onclick = function() { dismissSnackbar(snackbar); };
|
|
1533
1550
|
|
|
1534
1551
|
snackbar.appendChild(icon);
|
|
1535
1552
|
snackbar.appendChild(span);
|
|
@@ -1537,12 +1554,7 @@ const ui = _context.ui;
|
|
|
1537
1554
|
|
|
1538
1555
|
document.body.appendChild(snackbar);
|
|
1539
1556
|
|
|
1540
|
-
setTimeout(function() {
|
|
1541
|
-
snackbar.classList.remove('active');
|
|
1542
|
-
setTimeout(function() {
|
|
1543
|
-
snackbar.remove();
|
|
1544
|
-
}, 300);
|
|
1545
|
-
}, duration);
|
|
1557
|
+
setTimeout(function() { dismissSnackbar(snackbar); }, duration);
|
|
1546
1558
|
}
|
|
1547
1559
|
|
|
1548
1560
|
// Export utilities to window for backward compatibility
|