@khipu/design-system 0.2.0-alpha.3 → 0.2.0-alpha.30
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/dist/beercss/khipu-beercss.css +785 -157
- package/dist/beercss/khipu-beercss.js +60 -27
- package/dist/beercss/khipu-beercss.min.css +1 -1
- package/dist/beercss/khipu-beercss.min.js +1 -1
- package/dist/beercss/metadata.json +4 -4
- package/dist/index.d.mts +584 -285
- package/dist/index.d.ts +584 -285
- package/dist/index.js +780 -487
- package/dist/index.mjs +763 -469
- package/package.json +12 -9
- package/dist/khipu-logo-color-TV75AKOV.svg +0 -19
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
3
|
import React__default from 'react';
|
|
4
|
-
import * as Select from '@radix-ui/react-select';
|
|
5
4
|
export { clsx } from 'clsx';
|
|
6
5
|
|
|
7
6
|
interface KdsThemeProviderProps {
|
|
@@ -239,6 +238,7 @@ declare const colors: {
|
|
|
239
238
|
main: string;
|
|
240
239
|
light: string;
|
|
241
240
|
dark: string;
|
|
241
|
+
warm: string;
|
|
242
242
|
container: string;
|
|
243
243
|
contrastText: string;
|
|
244
244
|
};
|
|
@@ -255,6 +255,7 @@ declare const colors: {
|
|
|
255
255
|
main: string;
|
|
256
256
|
light: string;
|
|
257
257
|
dark: string;
|
|
258
|
+
blue: string;
|
|
258
259
|
container: string;
|
|
259
260
|
contrastText: string;
|
|
260
261
|
};
|
|
@@ -376,6 +377,7 @@ declare const fontSizes: {
|
|
|
376
377
|
readonly '2xl': "1.5rem";
|
|
377
378
|
readonly '3xl': "1.875rem";
|
|
378
379
|
readonly '4xl': "2.25rem";
|
|
380
|
+
readonly decimalSup: "0.5em";
|
|
379
381
|
};
|
|
380
382
|
declare const lineHeights: {
|
|
381
383
|
readonly tight: 1.2;
|
|
@@ -478,8 +480,8 @@ declare const typography: {
|
|
|
478
480
|
readonly button: {
|
|
479
481
|
readonly fontFamily: "\"Public Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
|
|
480
482
|
readonly fontWeight: 500;
|
|
481
|
-
readonly fontSize: "0.
|
|
482
|
-
readonly lineHeight: "
|
|
483
|
+
readonly fontSize: "0.875rem";
|
|
484
|
+
readonly lineHeight: "1.5";
|
|
483
485
|
readonly letterSpacing: "0.46px";
|
|
484
486
|
readonly textTransform: "uppercase";
|
|
485
487
|
};
|
|
@@ -558,10 +560,10 @@ declare const semanticSpacing: {
|
|
|
558
560
|
readonly padding: "16px 12px";
|
|
559
561
|
};
|
|
560
562
|
readonly button: {
|
|
561
|
-
readonly paddingY: "
|
|
562
|
-
readonly paddingX: "
|
|
563
|
-
readonly padding: "
|
|
564
|
-
readonly minHeight: "
|
|
563
|
+
readonly paddingY: "0";
|
|
564
|
+
readonly paddingX: "16px";
|
|
565
|
+
readonly padding: "0 16px";
|
|
566
|
+
readonly minHeight: "44px";
|
|
565
567
|
readonly iconSize: "20px";
|
|
566
568
|
};
|
|
567
569
|
readonly sectionGap: "32px";
|
|
@@ -608,7 +610,7 @@ declare const borderRadius: {
|
|
|
608
610
|
readonly '2xl': "20px";
|
|
609
611
|
readonly '3xl': "24px";
|
|
610
612
|
readonly full: "9999px";
|
|
611
|
-
readonly button: "
|
|
613
|
+
readonly button: "10px";
|
|
612
614
|
readonly input: "4px";
|
|
613
615
|
readonly card: "14px";
|
|
614
616
|
readonly modal: "20px";
|
|
@@ -694,6 +696,7 @@ declare const tokensByMode: {
|
|
|
694
696
|
main: string;
|
|
695
697
|
light: string;
|
|
696
698
|
dark: string;
|
|
699
|
+
warm: string;
|
|
697
700
|
container: string;
|
|
698
701
|
contrastText: string;
|
|
699
702
|
};
|
|
@@ -710,6 +713,7 @@ declare const tokensByMode: {
|
|
|
710
713
|
main: string;
|
|
711
714
|
light: string;
|
|
712
715
|
dark: string;
|
|
716
|
+
blue: string;
|
|
713
717
|
container: string;
|
|
714
718
|
contrastText: string;
|
|
715
719
|
};
|
|
@@ -831,6 +835,7 @@ declare const tokensByMode: {
|
|
|
831
835
|
readonly '2xl': "1.5rem";
|
|
832
836
|
readonly '3xl': "1.875rem";
|
|
833
837
|
readonly '4xl': "2.25rem";
|
|
838
|
+
readonly decimalSup: "0.5em";
|
|
834
839
|
};
|
|
835
840
|
readonly lineHeights: {
|
|
836
841
|
readonly tight: 1.2;
|
|
@@ -933,8 +938,8 @@ declare const tokensByMode: {
|
|
|
933
938
|
readonly button: {
|
|
934
939
|
readonly fontFamily: "\"Public Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
|
|
935
940
|
readonly fontWeight: 500;
|
|
936
|
-
readonly fontSize: "0.
|
|
937
|
-
readonly lineHeight: "
|
|
941
|
+
readonly fontSize: "0.875rem";
|
|
942
|
+
readonly lineHeight: "1.5";
|
|
938
943
|
readonly letterSpacing: "0.46px";
|
|
939
944
|
readonly textTransform: "uppercase";
|
|
940
945
|
};
|
|
@@ -1013,10 +1018,10 @@ declare const tokensByMode: {
|
|
|
1013
1018
|
readonly padding: "16px 12px";
|
|
1014
1019
|
};
|
|
1015
1020
|
readonly button: {
|
|
1016
|
-
readonly paddingY: "
|
|
1017
|
-
readonly paddingX: "
|
|
1018
|
-
readonly padding: "
|
|
1019
|
-
readonly minHeight: "
|
|
1021
|
+
readonly paddingY: "0";
|
|
1022
|
+
readonly paddingX: "16px";
|
|
1023
|
+
readonly padding: "0 16px";
|
|
1024
|
+
readonly minHeight: "44px";
|
|
1020
1025
|
readonly iconSize: "20px";
|
|
1021
1026
|
};
|
|
1022
1027
|
readonly sectionGap: "32px";
|
|
@@ -1177,7 +1182,7 @@ declare const tokensByMode: {
|
|
|
1177
1182
|
readonly '2xl': "20px";
|
|
1178
1183
|
readonly '3xl': "24px";
|
|
1179
1184
|
readonly full: "9999px";
|
|
1180
|
-
readonly button: "
|
|
1185
|
+
readonly button: "10px";
|
|
1181
1186
|
readonly input: "4px";
|
|
1182
1187
|
readonly card: "14px";
|
|
1183
1188
|
readonly modal: "20px";
|
|
@@ -1285,6 +1290,7 @@ declare const tokensByMode: {
|
|
|
1285
1290
|
main: string;
|
|
1286
1291
|
light: string;
|
|
1287
1292
|
dark: string;
|
|
1293
|
+
warm: string;
|
|
1288
1294
|
container: string;
|
|
1289
1295
|
contrastText: string;
|
|
1290
1296
|
};
|
|
@@ -1301,6 +1307,7 @@ declare const tokensByMode: {
|
|
|
1301
1307
|
main: string;
|
|
1302
1308
|
light: string;
|
|
1303
1309
|
dark: string;
|
|
1310
|
+
blue: string;
|
|
1304
1311
|
container: string;
|
|
1305
1312
|
contrastText: string;
|
|
1306
1313
|
};
|
|
@@ -1420,6 +1427,7 @@ declare const tokensByMode: {
|
|
|
1420
1427
|
readonly '2xl': "1.5rem";
|
|
1421
1428
|
readonly '3xl': "1.875rem";
|
|
1422
1429
|
readonly '4xl': "2.25rem";
|
|
1430
|
+
readonly decimalSup: "0.5em";
|
|
1423
1431
|
};
|
|
1424
1432
|
readonly lineHeights: {
|
|
1425
1433
|
readonly tight: 1.2;
|
|
@@ -1522,8 +1530,8 @@ declare const tokensByMode: {
|
|
|
1522
1530
|
readonly button: {
|
|
1523
1531
|
readonly fontFamily: "\"Public Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
|
|
1524
1532
|
readonly fontWeight: 500;
|
|
1525
|
-
readonly fontSize: "0.
|
|
1526
|
-
readonly lineHeight: "
|
|
1533
|
+
readonly fontSize: "0.875rem";
|
|
1534
|
+
readonly lineHeight: "1.5";
|
|
1527
1535
|
readonly letterSpacing: "0.46px";
|
|
1528
1536
|
readonly textTransform: "uppercase";
|
|
1529
1537
|
};
|
|
@@ -1602,10 +1610,10 @@ declare const tokensByMode: {
|
|
|
1602
1610
|
readonly padding: "16px 12px";
|
|
1603
1611
|
};
|
|
1604
1612
|
readonly button: {
|
|
1605
|
-
readonly paddingY: "
|
|
1606
|
-
readonly paddingX: "
|
|
1607
|
-
readonly padding: "
|
|
1608
|
-
readonly minHeight: "
|
|
1613
|
+
readonly paddingY: "0";
|
|
1614
|
+
readonly paddingX: "16px";
|
|
1615
|
+
readonly padding: "0 16px";
|
|
1616
|
+
readonly minHeight: "44px";
|
|
1609
1617
|
readonly iconSize: "20px";
|
|
1610
1618
|
};
|
|
1611
1619
|
readonly sectionGap: "32px";
|
|
@@ -1766,7 +1774,7 @@ declare const tokensByMode: {
|
|
|
1766
1774
|
readonly '2xl': "20px";
|
|
1767
1775
|
readonly '3xl': "24px";
|
|
1768
1776
|
readonly full: "9999px";
|
|
1769
|
-
readonly button: "
|
|
1777
|
+
readonly button: "10px";
|
|
1770
1778
|
readonly input: "4px";
|
|
1771
1779
|
readonly card: "14px";
|
|
1772
1780
|
readonly modal: "20px";
|
|
@@ -1881,6 +1889,7 @@ declare const tokens: {
|
|
|
1881
1889
|
main: string;
|
|
1882
1890
|
light: string;
|
|
1883
1891
|
dark: string;
|
|
1892
|
+
warm: string;
|
|
1884
1893
|
container: string;
|
|
1885
1894
|
contrastText: string;
|
|
1886
1895
|
};
|
|
@@ -1897,6 +1906,7 @@ declare const tokens: {
|
|
|
1897
1906
|
main: string;
|
|
1898
1907
|
light: string;
|
|
1899
1908
|
dark: string;
|
|
1909
|
+
blue: string;
|
|
1900
1910
|
container: string;
|
|
1901
1911
|
contrastText: string;
|
|
1902
1912
|
};
|
|
@@ -2018,6 +2028,7 @@ declare const tokens: {
|
|
|
2018
2028
|
readonly '2xl': "1.5rem";
|
|
2019
2029
|
readonly '3xl': "1.875rem";
|
|
2020
2030
|
readonly '4xl': "2.25rem";
|
|
2031
|
+
readonly decimalSup: "0.5em";
|
|
2021
2032
|
};
|
|
2022
2033
|
readonly lineHeights: {
|
|
2023
2034
|
readonly tight: 1.2;
|
|
@@ -2120,8 +2131,8 @@ declare const tokens: {
|
|
|
2120
2131
|
readonly button: {
|
|
2121
2132
|
readonly fontFamily: "\"Public Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
|
|
2122
2133
|
readonly fontWeight: 500;
|
|
2123
|
-
readonly fontSize: "0.
|
|
2124
|
-
readonly lineHeight: "
|
|
2134
|
+
readonly fontSize: "0.875rem";
|
|
2135
|
+
readonly lineHeight: "1.5";
|
|
2125
2136
|
readonly letterSpacing: "0.46px";
|
|
2126
2137
|
readonly textTransform: "uppercase";
|
|
2127
2138
|
};
|
|
@@ -2200,10 +2211,10 @@ declare const tokens: {
|
|
|
2200
2211
|
readonly padding: "16px 12px";
|
|
2201
2212
|
};
|
|
2202
2213
|
readonly button: {
|
|
2203
|
-
readonly paddingY: "
|
|
2204
|
-
readonly paddingX: "
|
|
2205
|
-
readonly padding: "
|
|
2206
|
-
readonly minHeight: "
|
|
2214
|
+
readonly paddingY: "0";
|
|
2215
|
+
readonly paddingX: "16px";
|
|
2216
|
+
readonly padding: "0 16px";
|
|
2217
|
+
readonly minHeight: "44px";
|
|
2207
2218
|
readonly iconSize: "20px";
|
|
2208
2219
|
};
|
|
2209
2220
|
readonly sectionGap: "32px";
|
|
@@ -2364,7 +2375,7 @@ declare const tokens: {
|
|
|
2364
2375
|
readonly '2xl': "20px";
|
|
2365
2376
|
readonly '3xl': "24px";
|
|
2366
2377
|
readonly full: "9999px";
|
|
2367
|
-
readonly button: "
|
|
2378
|
+
readonly button: "10px";
|
|
2368
2379
|
readonly input: "4px";
|
|
2369
2380
|
readonly card: "14px";
|
|
2370
2381
|
readonly modal: "20px";
|
|
@@ -2496,6 +2507,10 @@ interface KdsButtonProps extends React__default.ButtonHTMLAttributes<HTMLButtonE
|
|
|
2496
2507
|
*
|
|
2497
2508
|
* Built with native HTML and kds-* CSS classes from the BeerCSS bundle.
|
|
2498
2509
|
*
|
|
2510
|
+
* Compose with: para apilar CTAs al pie de una card, envolver en
|
|
2511
|
+
* `.kds-btn-stack` (NO usar gap/margin inline) — primario arriba, outlined
|
|
2512
|
+
* debajo, todos `fullWidth`. Ver `Patterns/CSS-only → ButtonStack`.
|
|
2513
|
+
*
|
|
2499
2514
|
* @example
|
|
2500
2515
|
* ```tsx
|
|
2501
2516
|
* <KdsButton variant="primary">
|
|
@@ -2524,121 +2539,65 @@ declare const KdsButton: React__default.ForwardRefExoticComponent<KdsButtonProps
|
|
|
2524
2539
|
/**
|
|
2525
2540
|
* Khipu Design System - TextField Component
|
|
2526
2541
|
*
|
|
2527
|
-
*
|
|
2528
|
-
*
|
|
2542
|
+
* Matchea exactamente el markup que genera `matFieldImpl()` del taglib `mat:textField` de payment:
|
|
2543
|
+
*
|
|
2544
|
+
* <div class="field label border [prefix] [suffix] [invalid|valid|info|warning]">
|
|
2545
|
+
* <i class="material-symbols-outlined">prefixIcon</i> // si startIcon
|
|
2546
|
+
* <input type="..." id="..." name="..." value="..." placeholder=" " [required] [disabled]>
|
|
2547
|
+
* <label for="...">Label [*]</label>
|
|
2548
|
+
* <i class="material-symbols-outlined">suffixIcon</i> // si endIcon
|
|
2549
|
+
* <span class="helper">errorMessage o help</span> // si helperText
|
|
2550
|
+
* </div>
|
|
2551
|
+
*
|
|
2552
|
+
* Reglas críticas del truco floating-label de BeerCSS:
|
|
2553
|
+
* - `placeholder=" "` (un espacio) — NUNCA aceptar placeholder real del consumidor.
|
|
2554
|
+
* BeerCSS usa `input:placeholder-shown ~ label` para mantener la label abajo cuando el input
|
|
2555
|
+
* está vacío. Si pasas un placeholder real, el label se queda siempre arriba y se superpone.
|
|
2556
|
+
* - El wrapper DEBE tener `.prefix` cuando hay icono al inicio (alinea la label al lado del icono).
|
|
2557
|
+
* - El wrapper DEBE tener `.suffix` cuando hay icono al final.
|
|
2558
|
+
*
|
|
2559
|
+
* @gsp `mat:textField`, `mat:emailField`, `mat:passwordField`, `mat:numberField` (taglib `matFieldImpl`)
|
|
2529
2560
|
*/
|
|
2530
2561
|
|
|
2531
|
-
interface KdsTextFieldProps extends Omit<React__default.InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
2532
|
-
/**
|
|
2562
|
+
interface KdsTextFieldProps extends Omit<React__default.InputHTMLAttributes<HTMLInputElement>, 'size' | 'placeholder'> {
|
|
2563
|
+
/** Floating label. */
|
|
2533
2564
|
label: string;
|
|
2534
|
-
/** Helper text
|
|
2565
|
+
/** Helper text bajo el field (error o info). */
|
|
2535
2566
|
helperText?: string;
|
|
2536
|
-
/**
|
|
2567
|
+
/** Estado inválido — aplica `.invalid` al wrapper. */
|
|
2537
2568
|
error?: boolean;
|
|
2538
|
-
/** Full width
|
|
2569
|
+
/** Full width (default: true). */
|
|
2539
2570
|
fullWidth?: boolean;
|
|
2540
|
-
/** Material
|
|
2571
|
+
/** Material Symbol al inicio del input (aplica clase `.prefix`). */
|
|
2541
2572
|
startIcon?: string;
|
|
2542
|
-
/** Material
|
|
2573
|
+
/** Material Symbol al final del input (aplica clase `.suffix`). */
|
|
2543
2574
|
endIcon?: string;
|
|
2544
2575
|
}
|
|
2545
|
-
/**
|
|
2546
|
-
* Text input field with label, validation, and icons.
|
|
2547
|
-
*
|
|
2548
|
-
* Built with native HTML and BeerCSS floating labels.
|
|
2549
|
-
* The label animates up when the input has focus or value.
|
|
2550
|
-
*
|
|
2551
|
-
* @example
|
|
2552
|
-
* ```tsx
|
|
2553
|
-
* <KdsTextField
|
|
2554
|
-
* label="RUT Suscriptor"
|
|
2555
|
-
* placeholder="12.345.678-9"
|
|
2556
|
-
* />
|
|
2557
|
-
*
|
|
2558
|
-
* <KdsTextField
|
|
2559
|
-
* label="Buscar por nombre"
|
|
2560
|
-
* startIcon="search"
|
|
2561
|
-
* />
|
|
2562
|
-
*
|
|
2563
|
-
* <KdsTextField
|
|
2564
|
-
* label="Contraseña"
|
|
2565
|
-
* type="password"
|
|
2566
|
-
* error
|
|
2567
|
-
* helperText="Contraseña incorrecta"
|
|
2568
|
-
* />
|
|
2569
|
-
*
|
|
2570
|
-
* <KdsTextField
|
|
2571
|
-
* label="Monto"
|
|
2572
|
-
* value="$1.000"
|
|
2573
|
-
* readOnly
|
|
2574
|
-
* />
|
|
2575
|
-
* ```
|
|
2576
|
-
*/
|
|
2577
2576
|
declare const KdsTextField: React__default.ForwardRefExoticComponent<KdsTextFieldProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
2578
2577
|
|
|
2579
2578
|
/**
|
|
2580
2579
|
* Khipu Design System - Checkbox Component
|
|
2581
2580
|
*
|
|
2582
|
-
*
|
|
2581
|
+
* Wrapper React que matchea exactamente el markup del taglib `mat:checkBox` de payment:
|
|
2582
|
+
*
|
|
2583
|
+
* <label class="checkbox">
|
|
2584
|
+
* <input type="checkbox" id="..." name="..." value="..." [checked] [disabled]>
|
|
2585
|
+
* <span>Label</span>
|
|
2586
|
+
* </label>
|
|
2587
|
+
*
|
|
2588
|
+
* BeerCSS oculta el input via `opacity: 0` y renderiza un sprite vía `::before` con
|
|
2589
|
+
* `content: "check_box_outline_blank"` usando la fuente Material Symbols Outlined.
|
|
2590
|
+
*
|
|
2591
|
+
* NO agregamos `htmlFor` al label porque el `<input>` está anidado dentro: la
|
|
2592
|
+
* asociación es implícita y `for` puede causar doble-disparo del click event.
|
|
2583
2593
|
*/
|
|
2584
2594
|
|
|
2585
2595
|
interface KdsCheckboxProps extends Omit<React__default.InputHTMLAttributes<HTMLInputElement>, 'type'> {
|
|
2596
|
+
/** Texto del label mostrado al lado del sprite. Opcional (puede usar aria-label). */
|
|
2586
2597
|
label?: string;
|
|
2587
2598
|
}
|
|
2588
2599
|
declare const KdsCheckbox: React__default.ForwardRefExoticComponent<KdsCheckboxProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
2589
2600
|
|
|
2590
|
-
/**
|
|
2591
|
-
* Khipu Design System - Modal Component
|
|
2592
|
-
*
|
|
2593
|
-
* A modal dialog component built on Radix Dialog with Khipu design system styling.
|
|
2594
|
-
* Uses kds-bottom-sheet BeerCSS classes for visual presentation.
|
|
2595
|
-
*/
|
|
2596
|
-
|
|
2597
|
-
type KdsModalSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
2598
|
-
interface KdsModalProps {
|
|
2599
|
-
/** Controls modal visibility */
|
|
2600
|
-
open: boolean;
|
|
2601
|
-
/** Callback when modal should close */
|
|
2602
|
-
onClose: () => void;
|
|
2603
|
-
/** Modal title */
|
|
2604
|
-
title?: string;
|
|
2605
|
-
/** Modal description text */
|
|
2606
|
-
description?: string;
|
|
2607
|
-
/** Footer content (usually action buttons) */
|
|
2608
|
-
footer?: React__default.ReactNode;
|
|
2609
|
-
/** Modal content */
|
|
2610
|
-
children: React__default.ReactNode;
|
|
2611
|
-
/** Modal max width */
|
|
2612
|
-
size?: KdsModalSize;
|
|
2613
|
-
/** Show close button */
|
|
2614
|
-
showCloseButton?: boolean;
|
|
2615
|
-
/** Additional CSS class */
|
|
2616
|
-
className?: string;
|
|
2617
|
-
}
|
|
2618
|
-
/**
|
|
2619
|
-
* Modal dialog component for displaying content that requires attention.
|
|
2620
|
-
*
|
|
2621
|
-
* Built on Radix Dialog with kds-bottom-sheet BeerCSS classes.
|
|
2622
|
-
*
|
|
2623
|
-
* @example
|
|
2624
|
-
* ```tsx
|
|
2625
|
-
* <KdsModal
|
|
2626
|
-
* open={isOpen}
|
|
2627
|
-
* onClose={() => setIsOpen(false)}
|
|
2628
|
-
* title="Confirmar pago"
|
|
2629
|
-
* footer={
|
|
2630
|
-
* <>
|
|
2631
|
-
* <button onClick={handleCancel}>Cancelar</button>
|
|
2632
|
-
* <button onClick={handleConfirm}>Confirmar</button>
|
|
2633
|
-
* </>
|
|
2634
|
-
* }
|
|
2635
|
-
* >
|
|
2636
|
-
* <p>¿Estás seguro de que deseas realizar este pago?</p>
|
|
2637
|
-
* </KdsModal>
|
|
2638
|
-
* ```
|
|
2639
|
-
*/
|
|
2640
|
-
declare const KdsModal: React__default.ForwardRefExoticComponent<KdsModalProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
2641
|
-
|
|
2642
2601
|
/**
|
|
2643
2602
|
* Khipu Design System - Card Component
|
|
2644
2603
|
*
|
|
@@ -2692,12 +2651,23 @@ declare const KdsCardFooter: React__default.ForwardRefExoticComponent<KdsCardSec
|
|
|
2692
2651
|
/**
|
|
2693
2652
|
* Khipu Design System - Spinner Component
|
|
2694
2653
|
*
|
|
2695
|
-
*
|
|
2654
|
+
* Spinner circular animado usando el patrón nativo de BeerCSS:
|
|
2655
|
+
* <progress class="circle [small|large] indeterminate"></progress>
|
|
2656
|
+
*
|
|
2657
|
+
* Tamaños (BeerCSS):
|
|
2658
|
+
* - `small` → 1.5rem (24px)
|
|
2659
|
+
* - default → 2.5rem (40px)
|
|
2660
|
+
* - `large` → 3.5rem (56px)
|
|
2661
|
+
*
|
|
2662
|
+
* El `<progress>` indeterminate aplica animación `to-rotate 1s linear infinite` con
|
|
2663
|
+
* gradient cónico (currentColor / `--active`).
|
|
2696
2664
|
*/
|
|
2697
2665
|
|
|
2698
2666
|
type KdsSpinnerSize = 'small' | 'medium' | 'large';
|
|
2699
2667
|
interface KdsSpinnerProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
2668
|
+
/** Tamaño del spinner. Default `medium` (sin modifier = 2.5rem). */
|
|
2700
2669
|
size?: KdsSpinnerSize;
|
|
2670
|
+
/** Texto bajo el spinner (visible). Si se omite, se usa "Cargando" como sr-only para a11y. */
|
|
2701
2671
|
label?: string;
|
|
2702
2672
|
}
|
|
2703
2673
|
declare const KdsSpinner: React__default.ForwardRefExoticComponent<KdsSpinnerProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
@@ -2717,53 +2687,34 @@ declare const KdsLinearProgress: React__default.ForwardRefExoticComponent<KdsLin
|
|
|
2717
2687
|
/**
|
|
2718
2688
|
* Khipu Design System - Alert Component
|
|
2719
2689
|
*
|
|
2720
|
-
*
|
|
2721
|
-
*
|
|
2690
|
+
* Alert con icon opcional, content y close button.
|
|
2691
|
+
*
|
|
2692
|
+
* Specs (CSS-derived):
|
|
2693
|
+
* - `.kds-alert`: flex, align-items center, gap 8px, padding 16px, border-radius md, border 1px
|
|
2694
|
+
* - `.kds-alert-icon`: 24px, flex-shrink 0
|
|
2695
|
+
* - `.kds-alert-content`: flex 1, min-width 0 (permite ellipsis del texto)
|
|
2696
|
+
* - Variantes: kds-info / kds-success / kds-warning / kds-error
|
|
2697
|
+
* - `.kds-alert-inline` reduce padding y bottom-margin
|
|
2722
2698
|
*/
|
|
2723
2699
|
|
|
2724
2700
|
type KdsAlertSeverity = 'success' | 'info' | 'warning' | 'error';
|
|
2725
2701
|
interface KdsAlertProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
2726
|
-
/** Alert severity/type */
|
|
2702
|
+
/** Alert severity/type. */
|
|
2727
2703
|
severity: KdsAlertSeverity;
|
|
2728
|
-
/** Alert title */
|
|
2704
|
+
/** Alert title (negrita arriba). */
|
|
2729
2705
|
title?: string;
|
|
2730
|
-
/**
|
|
2731
|
-
|
|
2732
|
-
|
|
2706
|
+
/**
|
|
2707
|
+
* Material Symbols icon name. Si es `true` (o se omite y hay otra prop), se usa el default por severity.
|
|
2708
|
+
* Pasar `false` para ocultar el icon. Pasar un string custom para override.
|
|
2709
|
+
*/
|
|
2710
|
+
icon?: string | boolean;
|
|
2711
|
+
/** Inline variant (compact display, sin border-radius grande). */
|
|
2733
2712
|
inline?: boolean;
|
|
2734
|
-
/** Alert
|
|
2713
|
+
/** Alert body. */
|
|
2735
2714
|
children: React__default.ReactNode;
|
|
2736
|
-
/**
|
|
2715
|
+
/** Callback para cerrar — renderiza icon-button discreto a la derecha. */
|
|
2737
2716
|
onClose?: () => void;
|
|
2738
2717
|
}
|
|
2739
|
-
/**
|
|
2740
|
-
* Alert component for displaying important messages.
|
|
2741
|
-
*
|
|
2742
|
-
* Built with native HTML and kds-* CSS classes from the BeerCSS bundle.
|
|
2743
|
-
*
|
|
2744
|
-
* @example
|
|
2745
|
-
* ```tsx
|
|
2746
|
-
* // Info alert (like in subscription details)
|
|
2747
|
-
* <KdsAlert severity="info">
|
|
2748
|
-
* El tope mensual corresponde al monto máximo posible a cobrar mensualmente.
|
|
2749
|
-
* </KdsAlert>
|
|
2750
|
-
*
|
|
2751
|
-
* // Success alert
|
|
2752
|
-
* <KdsAlert severity="success" title="¡Todo listo!">
|
|
2753
|
-
* Espera la confirmación por parte de tu banco
|
|
2754
|
-
* </KdsAlert>
|
|
2755
|
-
*
|
|
2756
|
-
* // Warning alert
|
|
2757
|
-
* <KdsAlert severity="warning" onClose={() => setOpen(false)}>
|
|
2758
|
-
* Tu sesión expirará pronto
|
|
2759
|
-
* </KdsAlert>
|
|
2760
|
-
*
|
|
2761
|
-
* // Error alert
|
|
2762
|
-
* <KdsAlert severity="error">
|
|
2763
|
-
* Ha ocurrido un error al procesar tu pago
|
|
2764
|
-
* </KdsAlert>
|
|
2765
|
-
* ```
|
|
2766
|
-
*/
|
|
2767
2718
|
declare const KdsAlert: React__default.ForwardRefExoticComponent<KdsAlertProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
2768
2719
|
|
|
2769
2720
|
/**
|
|
@@ -2817,10 +2768,27 @@ interface KdsTypographyProps extends React__default.HTMLAttributes<HTMLElement>
|
|
|
2817
2768
|
*/
|
|
2818
2769
|
declare const KdsTypography: React__default.ForwardRefExoticComponent<KdsTypographyProps & React__default.RefAttributes<HTMLElement>>;
|
|
2819
2770
|
|
|
2771
|
+
/**
|
|
2772
|
+
* Khipu Design System - Tabs Component
|
|
2773
|
+
*
|
|
2774
|
+
* Matchea exactamente el markup que usa producción payment:
|
|
2775
|
+
*
|
|
2776
|
+
* <div class="kds-segmented-tabs" role="tablist">
|
|
2777
|
+
* <button type="button" class="active" role="tab" aria-selected="true">Personas</button>
|
|
2778
|
+
* <button type="button" role="tab" aria-selected="false">Empresas</button>
|
|
2779
|
+
* </div>
|
|
2780
|
+
*
|
|
2781
|
+
* Solo existe la variante segmented — producción payment no usa otra cosa, y el
|
|
2782
|
+
* "standard" Material Design 3 underline tab no está en el Khipu DS.
|
|
2783
|
+
*
|
|
2784
|
+
* @gsp `_choosePaymentMethodFormMaterial.gsp` (líneas 18-25)
|
|
2785
|
+
*/
|
|
2786
|
+
|
|
2820
2787
|
interface KdsTabsProps extends Omit<React__default.HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
2788
|
+
/** Índice 0-based del tab activo. */
|
|
2821
2789
|
activeIndex: number;
|
|
2790
|
+
/** Callback cuando cambia el tab activo. */
|
|
2822
2791
|
onChange: (index: number) => void;
|
|
2823
|
-
variant?: 'standard' | 'segmented';
|
|
2824
2792
|
}
|
|
2825
2793
|
declare const KdsTabs: React__default.ForwardRefExoticComponent<KdsTabsProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
2826
2794
|
interface KdsTabInternalProps {
|
|
@@ -2836,106 +2804,23 @@ interface KdsTabPanelProps extends React__default.HTMLAttributes<HTMLDivElement>
|
|
|
2836
2804
|
declare const KdsTabPanel: React__default.ForwardRefExoticComponent<KdsTabPanelProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
2837
2805
|
|
|
2838
2806
|
/**
|
|
2839
|
-
* Khipu Design System -
|
|
2840
|
-
*
|
|
2841
|
-
* A header bar component that displays the Khipu logo, a transaction code,
|
|
2842
|
-
* and a close button. Used at the top of payment flow screens.
|
|
2843
|
-
*
|
|
2844
|
-
* Built with composable sub-components for maximum flexibility.
|
|
2845
|
-
*/
|
|
2846
|
-
|
|
2847
|
-
interface KdsLogoHeaderProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
2848
|
-
/** Content - typically LogoHeader sub-components */
|
|
2849
|
-
children?: React__default.ReactNode;
|
|
2850
|
-
}
|
|
2851
|
-
interface KdsLogoHeaderLogoProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
2852
|
-
/** Custom logo content. Defaults to Khipu text logo */
|
|
2853
|
-
children?: React__default.ReactNode;
|
|
2854
|
-
}
|
|
2855
|
-
interface KdsLogoHeaderSeparatorProps extends React__default.HTMLAttributes<HTMLSpanElement> {
|
|
2856
|
-
/** Separator character. Defaults to "|" */
|
|
2857
|
-
children?: React__default.ReactNode;
|
|
2858
|
-
}
|
|
2859
|
-
interface KdsLogoHeaderCodeProps extends React__default.HTMLAttributes<HTMLSpanElement> {
|
|
2860
|
-
/** Transaction or reference code to display */
|
|
2861
|
-
children: React__default.ReactNode;
|
|
2862
|
-
}
|
|
2863
|
-
interface KdsLogoHeaderCloseButtonProps extends React__default.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
2864
|
-
/** Callback fired when the close button is clicked */
|
|
2865
|
-
onClose?: () => void;
|
|
2866
|
-
}
|
|
2867
|
-
/**
|
|
2868
|
-
* Logo section of the LogoHeader.
|
|
2869
|
-
*
|
|
2870
|
-
* @example
|
|
2871
|
-
* ```tsx
|
|
2872
|
-
* <KdsLogoHeaderLogo />
|
|
2873
|
-
*
|
|
2874
|
-
* <KdsLogoHeaderLogo>
|
|
2875
|
-
* <img src="/custom-logo.svg" alt="Custom Logo" />
|
|
2876
|
-
* </KdsLogoHeaderLogo>
|
|
2877
|
-
* ```
|
|
2878
|
-
*/
|
|
2879
|
-
declare const KdsLogoHeaderLogo: React__default.ForwardRefExoticComponent<KdsLogoHeaderLogoProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
2880
|
-
/**
|
|
2881
|
-
* Separator element between logo and code.
|
|
2882
|
-
*
|
|
2883
|
-
* @example
|
|
2884
|
-
* ```tsx
|
|
2885
|
-
* <KdsLogoHeaderSeparator />
|
|
2886
|
-
*
|
|
2887
|
-
* <KdsLogoHeaderSeparator>•</KdsLogoHeaderSeparator>
|
|
2888
|
-
* ```
|
|
2889
|
-
*/
|
|
2890
|
-
declare const KdsLogoHeaderSeparator: React__default.ForwardRefExoticComponent<KdsLogoHeaderSeparatorProps & React__default.RefAttributes<HTMLSpanElement>>;
|
|
2891
|
-
/**
|
|
2892
|
-
* Transaction code section.
|
|
2893
|
-
*
|
|
2894
|
-
* @example
|
|
2895
|
-
* ```tsx
|
|
2896
|
-
* <KdsLogoHeaderCode>HUSK-P7ZZ-XGYG</KdsLogoHeaderCode>
|
|
2897
|
-
* ```
|
|
2898
|
-
*/
|
|
2899
|
-
declare const KdsLogoHeaderCode: React__default.ForwardRefExoticComponent<KdsLogoHeaderCodeProps & React__default.RefAttributes<HTMLSpanElement>>;
|
|
2900
|
-
/**
|
|
2901
|
-
* Close button for the header.
|
|
2807
|
+
* Khipu Design System - RadioGroup Component
|
|
2902
2808
|
*
|
|
2903
|
-
*
|
|
2904
|
-
* ```tsx
|
|
2905
|
-
* <KdsLogoHeaderCloseButton onClose={() => handleClose()} />
|
|
2906
|
-
* ```
|
|
2907
|
-
*/
|
|
2908
|
-
declare const KdsLogoHeaderCloseButton: React__default.ForwardRefExoticComponent<KdsLogoHeaderCloseButtonProps & React__default.RefAttributes<HTMLButtonElement>>;
|
|
2909
|
-
/**
|
|
2910
|
-
* LogoHeader bar component.
|
|
2809
|
+
* Native HTML radio group with BeerCSS `.radio` class.
|
|
2911
2810
|
*
|
|
2912
|
-
*
|
|
2913
|
-
*
|
|
2811
|
+
* Contrato BeerCSS:
|
|
2812
|
+
* <fieldset class="kds-radio-group">
|
|
2813
|
+
* <legend>Label</legend>
|
|
2814
|
+
* <label class="radio">
|
|
2815
|
+
* <input type="radio" name="x" value="a" />
|
|
2816
|
+
* <span>Opción A</span>
|
|
2817
|
+
* </label>
|
|
2818
|
+
* ...
|
|
2819
|
+
* </fieldset>
|
|
2914
2820
|
*
|
|
2915
|
-
*
|
|
2916
|
-
*
|
|
2917
|
-
*
|
|
2918
|
-
* <KdsLogoHeader>
|
|
2919
|
-
* <KdsLogoHeaderLogo />
|
|
2920
|
-
* <KdsLogoHeaderSeparator />
|
|
2921
|
-
* <KdsLogoHeaderCode>HUSK-P7ZZ-XGYG</KdsLogoHeaderCode>
|
|
2922
|
-
* <KdsLogoHeaderCloseButton onClose={() => handleClose()} />
|
|
2923
|
-
* </KdsLogoHeader>
|
|
2924
|
-
*
|
|
2925
|
-
* // Simple usage with defaults
|
|
2926
|
-
* <KdsLogoHeader>
|
|
2927
|
-
* <KdsLogoHeaderLogo />
|
|
2928
|
-
* <KdsLogoHeaderSeparator />
|
|
2929
|
-
* <KdsLogoHeaderCode>ABC-1234-XYZ</KdsLogoHeaderCode>
|
|
2930
|
-
* </KdsLogoHeader>
|
|
2931
|
-
* ```
|
|
2932
|
-
*/
|
|
2933
|
-
declare const KdsLogoHeader: React__default.ForwardRefExoticComponent<KdsLogoHeaderProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
2934
|
-
|
|
2935
|
-
/**
|
|
2936
|
-
* Khipu Design System - RadioGroup Component
|
|
2937
|
-
*
|
|
2938
|
-
* Native HTML radio group with BeerCSS styling.
|
|
2821
|
+
* Specs:
|
|
2822
|
+
* - Input oculto, sprite circular generado por `:is(.checkbox, .radio) > span::before`
|
|
2823
|
+
* - Tamaño default 18x18; modifiers `.small` (14px) / `.large` (22px)
|
|
2939
2824
|
*/
|
|
2940
2825
|
|
|
2941
2826
|
interface KdsRadioOption {
|
|
@@ -2949,55 +2834,137 @@ interface KdsRadioGroupProps extends Omit<React__default.FieldsetHTMLAttributes<
|
|
|
2949
2834
|
options: KdsRadioOption[];
|
|
2950
2835
|
value?: string;
|
|
2951
2836
|
onChange?: (value: string) => void;
|
|
2837
|
+
/** Tamaño del sprite del radio (aplicado a cada opción). */
|
|
2838
|
+
size?: 'small' | 'large';
|
|
2952
2839
|
}
|
|
2953
2840
|
declare const KdsRadioGroup: React__default.ForwardRefExoticComponent<KdsRadioGroupProps & React__default.RefAttributes<HTMLFieldSetElement>>;
|
|
2954
2841
|
|
|
2955
2842
|
/**
|
|
2956
2843
|
* Khipu Design System - Select Component
|
|
2957
2844
|
*
|
|
2958
|
-
*
|
|
2845
|
+
* Native HTML `<select>` wrapped en el patrón BeerCSS `field label border`.
|
|
2846
|
+
* Matchea exactamente el markup que genera la taglib `mat:select` de payment.
|
|
2847
|
+
*
|
|
2848
|
+
* Markup canónico:
|
|
2849
|
+
*
|
|
2850
|
+
* <div class="field label border [prefix] [invalid|valid|info|warning]">
|
|
2851
|
+
* <i class="material-symbols-outlined">prefixIcon</i> // opcional
|
|
2852
|
+
* <select id="..." name="..." [required] [disabled]>
|
|
2853
|
+
* <option value="">Placeholder...</option> // opcional (noSelection)
|
|
2854
|
+
* <option value="bci">BCI</option>
|
|
2855
|
+
* ...
|
|
2856
|
+
* </select>
|
|
2857
|
+
* <label for="...">Banco *</label>
|
|
2858
|
+
* <span class="helper">errorMessage o help</span> // opcional
|
|
2859
|
+
* </div>
|
|
2860
|
+
*
|
|
2861
|
+
* BeerCSS dibuja el chevron automáticamente, el floating label, focus ring, etc.
|
|
2862
|
+
*
|
|
2863
|
+
* @gsp `mat:select` taglib (MaterialTagLib.groovy:260)
|
|
2959
2864
|
*/
|
|
2960
2865
|
|
|
2961
|
-
interface
|
|
2866
|
+
interface KdsSelectOption {
|
|
2867
|
+
/** Valor del `<option>` (string serializable). */
|
|
2962
2868
|
value: string;
|
|
2963
|
-
|
|
2869
|
+
/** Texto visible del `<option>`. */
|
|
2870
|
+
label: string;
|
|
2871
|
+
/** Si está disabled. */
|
|
2872
|
+
disabled?: boolean;
|
|
2873
|
+
}
|
|
2874
|
+
interface KdsSelectProps extends Omit<React__default.SelectHTMLAttributes<HTMLSelectElement>, 'children'> {
|
|
2875
|
+
/** Floating label. */
|
|
2876
|
+
label: string;
|
|
2877
|
+
/** Lista de opciones del select. */
|
|
2878
|
+
options: KdsSelectOption[];
|
|
2879
|
+
/**
|
|
2880
|
+
* Texto del primer `<option>` con value="" (placeholder). Si está vacío, no se renderiza.
|
|
2881
|
+
* Equivalente a `noSelection` del taglib.
|
|
2882
|
+
*/
|
|
2964
2883
|
placeholder?: string;
|
|
2965
|
-
|
|
2884
|
+
/** Helper text bajo el field (error o info). */
|
|
2885
|
+
helperText?: string;
|
|
2886
|
+
/** Estado inválido — aplica clase `.invalid` al wrapper. */
|
|
2966
2887
|
error?: boolean;
|
|
2967
|
-
|
|
2968
|
-
|
|
2888
|
+
/** Material Symbols icon al inicio del field (aplica clase `.prefix`). */
|
|
2889
|
+
prefixIcon?: string;
|
|
2890
|
+
/** Full width (default: true). */
|
|
2969
2891
|
fullWidth?: boolean;
|
|
2970
|
-
children: React__default.ReactNode;
|
|
2971
|
-
className?: string;
|
|
2972
|
-
}
|
|
2973
|
-
interface KdsSelectItemProps extends Select.SelectItemProps {
|
|
2974
|
-
children: React__default.ReactNode;
|
|
2975
2892
|
}
|
|
2976
|
-
declare const KdsSelect: React__default.ForwardRefExoticComponent<KdsSelectProps & React__default.RefAttributes<
|
|
2977
|
-
Item: React__default.ForwardRefExoticComponent<KdsSelectItemProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
2978
|
-
};
|
|
2893
|
+
declare const KdsSelect: React__default.ForwardRefExoticComponent<KdsSelectProps & React__default.RefAttributes<HTMLSelectElement>>;
|
|
2979
2894
|
|
|
2980
2895
|
/**
|
|
2981
2896
|
* Khipu Design System - Chip Component
|
|
2982
2897
|
*
|
|
2983
|
-
*
|
|
2898
|
+
* Chip/badge inline con color, icon opcional y close opcional (deletable).
|
|
2899
|
+
*
|
|
2900
|
+
* Specs (CSS-derived):
|
|
2901
|
+
* - `.kds-badge`: inline-flex, align-items center, gap 4px, padding 2px 8px, radius sm
|
|
2902
|
+
* - `font-size: xs`, `font-weight: medium`, `line-height: 1.5`
|
|
2903
|
+
* - Icon prefix `<i>`: 14px, inline
|
|
2904
|
+
* - Close button (`.kds-badge-close`): 16×16 circular discreto, NO usa kds-btn
|
|
2905
|
+
*
|
|
2906
|
+
* Variantes de color: primary | success | error | warning | info
|
|
2984
2907
|
*/
|
|
2985
2908
|
|
|
2986
2909
|
type KdsChipColor = 'primary' | 'success' | 'error' | 'warning' | 'info';
|
|
2987
2910
|
interface KdsChipProps extends React__default.HTMLAttributes<HTMLSpanElement> {
|
|
2911
|
+
/** Color variant. */
|
|
2988
2912
|
color?: KdsChipColor;
|
|
2913
|
+
/** Material Symbol opcional al inicio del chip. */
|
|
2989
2914
|
icon?: string;
|
|
2915
|
+
/**
|
|
2916
|
+
* Callback cuando se hace click en el icon de cerrar.
|
|
2917
|
+
* Si está definido, renderiza un icon-button discreto (NO usa kds-btn).
|
|
2918
|
+
*/
|
|
2990
2919
|
onDelete?: () => void;
|
|
2991
2920
|
}
|
|
2992
2921
|
declare const KdsChip: React__default.ForwardRefExoticComponent<KdsChipProps & React__default.RefAttributes<HTMLSpanElement>>;
|
|
2993
2922
|
|
|
2923
|
+
/**
|
|
2924
|
+
* Khipu Design System - Snackbar Component
|
|
2925
|
+
*
|
|
2926
|
+
* Matchea exactamente el markup que genera `Khipu.showSnackbar()` y
|
|
2927
|
+
* `initFlashMessages()` (`src/beercss/customizations/khipu-init.js`):
|
|
2928
|
+
*
|
|
2929
|
+
* <div class="snackbar active [info|success|error]"
|
|
2930
|
+
* data-auto-dismiss="true"
|
|
2931
|
+
* style="--kds-snackbar-duration: 5000ms">
|
|
2932
|
+
* <i class="material-symbols-outlined">[icon]</i>
|
|
2933
|
+
* <span class="max">message</span>
|
|
2934
|
+
* <button class="kds-snackbar-close" aria-label="Cerrar">
|
|
2935
|
+
* <i class="material-symbols-outlined">close</i>
|
|
2936
|
+
* </button>
|
|
2937
|
+
* </div>
|
|
2938
|
+
*
|
|
2939
|
+
* Features:
|
|
2940
|
+
* - Icon prefix automático según `type` (info / check_circle / error).
|
|
2941
|
+
* - Progress bar lineal en la parte inferior animado durante `duration` ms (CSS `::after`).
|
|
2942
|
+
* - Close button con estilo `.kds-snackbar-close` (icon-only, blanco semi-transparente).
|
|
2943
|
+
*
|
|
2944
|
+
* @gsp `_paymentFlashSnackbars.gsp` (markup base) + `khipu-init.js → initFlashMessages()` (close + dismiss timer)
|
|
2945
|
+
*/
|
|
2946
|
+
|
|
2994
2947
|
type KdsSnackbarType = 'success' | 'error' | 'info';
|
|
2995
|
-
interface KdsSnackbarProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
2948
|
+
interface KdsSnackbarProps extends Omit<React__default.HTMLAttributes<HTMLDivElement>, 'role'> {
|
|
2949
|
+
/** Mensaje del snackbar. */
|
|
2996
2950
|
message: string;
|
|
2951
|
+
/** Variante semántica. Default `info`. */
|
|
2997
2952
|
type?: KdsSnackbarType;
|
|
2953
|
+
/**
|
|
2954
|
+
* Duración en ms antes de auto-dismiss. Default `5000`.
|
|
2955
|
+
* También controla la duración del progress bar (CSS var `--kds-snackbar-duration`).
|
|
2956
|
+
* Pasa `0` para deshabilitar auto-dismiss (no progress bar).
|
|
2957
|
+
*/
|
|
2998
2958
|
duration?: number;
|
|
2959
|
+
/** Callback al cerrar (click en X o tras auto-dismiss). */
|
|
2999
2960
|
onClose?: () => void;
|
|
2961
|
+
/** Controla visibilidad. Default `true`. */
|
|
3000
2962
|
open?: boolean;
|
|
2963
|
+
/**
|
|
2964
|
+
* Material Symbol icon name. Si se omite, usa el default por `type`.
|
|
2965
|
+
* Pasa `false` para ocultar el icon prefix.
|
|
2966
|
+
*/
|
|
2967
|
+
icon?: string | false;
|
|
3001
2968
|
}
|
|
3002
2969
|
declare const KdsSnackbar: React__default.ForwardRefExoticComponent<KdsSnackbarProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
3003
2970
|
|
|
@@ -3052,7 +3019,7 @@ declare const KdsSectionNote: React__default.ForwardRefExoticComponent<KdsSectio
|
|
|
3052
3019
|
* Native HTML status block with BeerCSS styling.
|
|
3053
3020
|
*/
|
|
3054
3021
|
|
|
3055
|
-
type KdsStatusType = 'success' | 'pending' | 'warn' | 'error';
|
|
3022
|
+
type KdsStatusType = 'success' | 'pending' | 'warn' | 'error' | 'info';
|
|
3056
3023
|
interface KdsStatusBlockProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
3057
3024
|
status: KdsStatusType;
|
|
3058
3025
|
icon?: string;
|
|
@@ -3065,27 +3032,114 @@ declare const KdsStatusBlock: React__default.ForwardRefExoticComponent<KdsStatus
|
|
|
3065
3032
|
/**
|
|
3066
3033
|
* Khipu Design System - Stepper Component
|
|
3067
3034
|
*
|
|
3068
|
-
*
|
|
3035
|
+
* Matchea exactamente el markup del taglib `mat:stepper` de payment:
|
|
3036
|
+
*
|
|
3037
|
+
* <div class="kds-stepper">
|
|
3038
|
+
* <div class="kds-step [completed|current]">
|
|
3039
|
+
* <div class="kds-step-indicator"></div> <!-- vacío: número/check via CSS -->
|
|
3040
|
+
* <div class="kds-step-label">Label</div>
|
|
3041
|
+
* </div>
|
|
3042
|
+
* ...
|
|
3043
|
+
* </div>
|
|
3044
|
+
*
|
|
3045
|
+
* Specs CSS-driven:
|
|
3046
|
+
* - La línea conectora horizontal es `.kds-stepper::before` (NO un `<div>`).
|
|
3047
|
+
* - El check de completed viene de `.kds-step-indicator::after { content: "check" }`.
|
|
3048
|
+
* - El número del step está oculto (`font-size: 0`) — el design no usa números.
|
|
3049
|
+
*
|
|
3050
|
+
* @gsp `mat:stepper` taglib (MaterialTagLib.groovy:817)
|
|
3069
3051
|
*/
|
|
3070
3052
|
|
|
3071
3053
|
interface KdsStepperProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
3072
|
-
|
|
3054
|
+
/** Labels de cada step. La longitud del array determina el número de pasos. */
|
|
3055
|
+
steps: string[];
|
|
3056
|
+
/**
|
|
3057
|
+
* Índice 0-based del step actual.
|
|
3058
|
+
* - Steps `< current` → `.completed` (verde con check)
|
|
3059
|
+
* - Step `== current` → `.current` (azul info)
|
|
3060
|
+
* - Steps `> current` → pending (gris)
|
|
3061
|
+
*/
|
|
3073
3062
|
current: number;
|
|
3074
3063
|
}
|
|
3075
3064
|
declare const KdsStepper: React__default.ForwardRefExoticComponent<KdsStepperProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
3076
3065
|
|
|
3077
|
-
|
|
3066
|
+
/**
|
|
3067
|
+
* Khipu Design System - CopyRow Component
|
|
3068
|
+
*
|
|
3069
|
+
* Fila clickeable que copia su `value` al portapapeles. El ROW completo es el botón.
|
|
3070
|
+
*
|
|
3071
|
+
* Markup canónico (mirrors `src/beercss/demo/payment-components.html`):
|
|
3072
|
+
*
|
|
3073
|
+
* <button class="kds-copy-row" data-copy="value">
|
|
3074
|
+
* <i class="material-symbols-outlined">content_copy</i> ← icon a la IZQUIERDA
|
|
3075
|
+
* <div>
|
|
3076
|
+
* <span class="kds-copy-row-label">Banco</span>
|
|
3077
|
+
* <span class="kds-copy-row-value">Banco Security</span>
|
|
3078
|
+
* </div>
|
|
3079
|
+
* <span class="kds-copy-toast">
|
|
3080
|
+
* <i class="material-symbols-outlined">check_circle</i> Copiado
|
|
3081
|
+
* </span>
|
|
3082
|
+
* </button>
|
|
3083
|
+
*
|
|
3084
|
+
* Cuando `.copied`:
|
|
3085
|
+
* - bg → success-soft, border → success-main
|
|
3086
|
+
* - `.kds-copy-toast` aparece (position absolute right, opacity 0 → 1)
|
|
3087
|
+
*/
|
|
3088
|
+
|
|
3089
|
+
interface KdsCopyRowProps extends Omit<React__default.ButtonHTMLAttributes<HTMLButtonElement>, 'value' | 'children' | 'onClick'> {
|
|
3090
|
+
/** Label arriba (uppercase caption). */
|
|
3078
3091
|
label: string;
|
|
3092
|
+
/** Valor mostrado y copiado al portapapeles. */
|
|
3079
3093
|
value: string;
|
|
3094
|
+
/** Texto del toast cuando se copia. Default: "Copiado". */
|
|
3095
|
+
copiedText?: string;
|
|
3080
3096
|
}
|
|
3081
|
-
declare const KdsCopyRow: React__default.ForwardRefExoticComponent<KdsCopyRowProps & React__default.RefAttributes<
|
|
3097
|
+
declare const KdsCopyRow: React__default.ForwardRefExoticComponent<KdsCopyRowProps & React__default.RefAttributes<HTMLButtonElement>>;
|
|
3098
|
+
|
|
3099
|
+
/**
|
|
3100
|
+
* Khipu Design System - CopyableTable Component
|
|
3101
|
+
*
|
|
3102
|
+
* Tabla compacta con filas que se copian individualmente al click, y un
|
|
3103
|
+
* botón "Copiar todos los datos" que cambia el color de todas las filas al copy.
|
|
3104
|
+
*
|
|
3105
|
+
* Contrato HTML (matchea el CSS .kds-copyable-table del DS):
|
|
3106
|
+
* ```html
|
|
3107
|
+
* <div class="kds-copyable-table" id="destination-copy-list">
|
|
3108
|
+
* <div class="kds-copyable-table-row" data-copy="value-to-copy">
|
|
3109
|
+
* <span class="kds-key">Banco</span>
|
|
3110
|
+
* <span class="kds-value">Banco Security</span>
|
|
3111
|
+
* </div>
|
|
3112
|
+
* ...
|
|
3113
|
+
* </div>
|
|
3114
|
+
* <button class="kds-btn kds-btn-outlined kds-btn-block kds-copy-all-btn"
|
|
3115
|
+
* data-copy-all="#destination-copy-list">
|
|
3116
|
+
* <span class="kds-icon"><i class="material-symbols-outlined">content_copy</i></span>
|
|
3117
|
+
* <span>Copiar todos los datos</span>
|
|
3118
|
+
* </button>
|
|
3119
|
+
* ```
|
|
3120
|
+
*
|
|
3121
|
+
* Specs:
|
|
3122
|
+
* - Row: flex space-between, padding 10px 8px, border-top divider, font sm, cursor pointer
|
|
3123
|
+
* - Row hover: bg primary-faint + icon copy aparece en `.kds-value::after`
|
|
3124
|
+
* - Row `.copied`: bg success-soft, `.kds-value` color success-dark, icon → check
|
|
3125
|
+
* - Copy-all-btn: kds-btn-outlined-block + bg primary-faint
|
|
3126
|
+
* - Copy-all-btn `.copied`: bg success-soft
|
|
3127
|
+
*/
|
|
3082
3128
|
|
|
3083
3129
|
interface KdsCopyableTableRow {
|
|
3084
3130
|
label: string;
|
|
3085
3131
|
value: string;
|
|
3132
|
+
/** Override del valor a copiar (default: `value`). */
|
|
3133
|
+
copy?: string;
|
|
3086
3134
|
}
|
|
3087
3135
|
interface KdsCopyableTableProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
3088
3136
|
rows: KdsCopyableTableRow[];
|
|
3137
|
+
/** Texto del botón "Copiar todo". Default: "Copiar todos los datos". */
|
|
3138
|
+
copyAllLabel?: string;
|
|
3139
|
+
/** Texto cuando se copió todo. Default: "Datos copiados". */
|
|
3140
|
+
copiedAllLabel?: string;
|
|
3141
|
+
/** Si `false`, no muestra el botón "Copiar todo". */
|
|
3142
|
+
showCopyAll?: boolean;
|
|
3089
3143
|
}
|
|
3090
3144
|
declare const KdsCopyableTable: React__default.ForwardRefExoticComponent<KdsCopyableTableProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
3091
3145
|
|
|
@@ -3102,8 +3156,14 @@ interface KdsCountdownProps extends React__default.HTMLAttributes<HTMLDivElement
|
|
|
3102
3156
|
}
|
|
3103
3157
|
declare const KdsCountdown: React__default.ForwardRefExoticComponent<KdsCountdownProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
3104
3158
|
|
|
3105
|
-
|
|
3106
|
-
|
|
3159
|
+
/**
|
|
3160
|
+
* KdsSegmentedTabs — alias semántico de `KdsTabs`.
|
|
3161
|
+
*
|
|
3162
|
+
* Mantenido por backwards-compat con código que importa `KdsSegmentedTabs`.
|
|
3163
|
+
* `KdsTabs` ahora ya renderiza directamente segmented (la única variante del DS).
|
|
3164
|
+
*/
|
|
3165
|
+
type KdsSegmentedTabsProps = KdsTabsProps;
|
|
3166
|
+
declare const KdsSegmentedTabs: React$1.ForwardRefExoticComponent<KdsTabsProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
3107
3167
|
|
|
3108
3168
|
interface KdsBankRowProps extends Omit<React__default.ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {
|
|
3109
3169
|
name: string;
|
|
@@ -3164,15 +3224,50 @@ interface KdsInvoiceStickyProps extends React__default.HTMLAttributes<HTMLDivEle
|
|
|
3164
3224
|
}
|
|
3165
3225
|
declare const KdsInvoiceSticky: React__default.ForwardRefExoticComponent<KdsInvoiceStickyProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
3166
3226
|
|
|
3227
|
+
/**
|
|
3228
|
+
* Khipu Design System - BottomSheet Component
|
|
3229
|
+
*
|
|
3230
|
+
* Bottom-sheet (modal que sube desde abajo en mobile, centrado en desktop) basado
|
|
3231
|
+
* en Radix Dialog. Único componente de modales del DS — `KdsModal` fue unificado aquí.
|
|
3232
|
+
*
|
|
3233
|
+
* Contrato HTML (matchea CSS `.kds-bottom-sheet*` de khipu-components.css):
|
|
3234
|
+
*
|
|
3235
|
+
* <div class="kds-bottom-sheet-scrim open">
|
|
3236
|
+
* <div class="kds-bottom-sheet">
|
|
3237
|
+
* <div class="kds-bottom-sheet-grabber" /> <!-- opcional -->
|
|
3238
|
+
* <button class="kds-bottom-sheet-close">X</button> <!-- opcional -->
|
|
3239
|
+
* <h2 class="kds-bottom-sheet-title">...</h2> <!-- opcional -->
|
|
3240
|
+
* <p class="kds-bottom-sheet-description">...</p> <!-- opcional -->
|
|
3241
|
+
* <div class="kds-bottom-sheet-body">children</div>
|
|
3242
|
+
* <div class="kds-bottom-sheet-actions">actions</div> <!-- opcional -->
|
|
3243
|
+
* </div>
|
|
3244
|
+
* </div>
|
|
3245
|
+
*
|
|
3246
|
+
* IMPORTANTE: el scrim DEBE llevar la clase `.open` SIEMPRE (Radix maneja mount/unmount).
|
|
3247
|
+
* Sin `.open`, el scrim queda `display: none` y no se ve.
|
|
3248
|
+
*/
|
|
3249
|
+
|
|
3167
3250
|
interface KdsBottomSheetProps {
|
|
3251
|
+
/** Controla la visibilidad. */
|
|
3168
3252
|
open: boolean;
|
|
3253
|
+
/** Callback cuando se debe cerrar (close button / ESC / click fuera). */
|
|
3169
3254
|
onClose: () => void;
|
|
3255
|
+
/** Título — renderiza `<h2 class="kds-bottom-sheet-title">`. */
|
|
3170
3256
|
title?: string;
|
|
3257
|
+
/** Descripción opcional bajo el título (`<p class="kds-bottom-sheet-description">`). */
|
|
3258
|
+
description?: string;
|
|
3259
|
+
/** Contenido del body. */
|
|
3171
3260
|
children: React__default.ReactNode;
|
|
3261
|
+
/** Botones de acción (footer). Renderiza dentro de `.kds-bottom-sheet-actions`. */
|
|
3172
3262
|
actions?: React__default.ReactNode;
|
|
3173
|
-
|
|
3174
|
-
|
|
3263
|
+
/** Mostrar grabber (handle) visual en el top. Default: true. */
|
|
3264
|
+
showGrabber?: boolean;
|
|
3265
|
+
/** Mostrar X de cierre en el top-right. Default: false. */
|
|
3266
|
+
showCloseButton?: boolean;
|
|
3267
|
+
/** Portal container — útil para Storybook o anchors específicos. */
|
|
3175
3268
|
container?: HTMLElement | null;
|
|
3269
|
+
/** Clase adicional al sheet. */
|
|
3270
|
+
className?: string;
|
|
3176
3271
|
}
|
|
3177
3272
|
declare const KdsBottomSheet: React__default.ForwardRefExoticComponent<KdsBottomSheetProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
3178
3273
|
|
|
@@ -3191,6 +3286,210 @@ interface KdsRecapListProps extends React__default.HTMLAttributes<HTMLUListEleme
|
|
|
3191
3286
|
}
|
|
3192
3287
|
declare const KdsRecapList: React__default.ForwardRefExoticComponent<KdsRecapListProps & React__default.RefAttributes<HTMLUListElement>>;
|
|
3193
3288
|
|
|
3289
|
+
interface KdsMontoRowProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
3290
|
+
/** Título principal (e.g. "Monto a transferir"). */
|
|
3291
|
+
title: string;
|
|
3292
|
+
/** Valor destacado (e.g. "$3.300"). */
|
|
3293
|
+
value: string;
|
|
3294
|
+
/**
|
|
3295
|
+
* Texto secundario opcional bajo el título (deadline/subtitle).
|
|
3296
|
+
* Acepta un nodo React para incluir line-breaks o formato.
|
|
3297
|
+
*/
|
|
3298
|
+
deadline?: React__default.ReactNode;
|
|
3299
|
+
}
|
|
3300
|
+
/**
|
|
3301
|
+
* KdsMontoRow — bloque destacado de monto con título + deadline opcional + valor.
|
|
3302
|
+
*
|
|
3303
|
+
* Layout (spec):
|
|
3304
|
+
* - `display: flex; justify-content: space-between`
|
|
3305
|
+
* - `padding: 14px 0 8px`
|
|
3306
|
+
* - `border-top: 1px dashed var(--kds-border-medium)`
|
|
3307
|
+
*
|
|
3308
|
+
* Tipografía:
|
|
3309
|
+
* - `.kds-monto-row-title`: `font-size: sm`, `font-weight: 500`
|
|
3310
|
+
* - `.kds-monto-row-deadline`: `font-size: xs`, `color: text-secondary`
|
|
3311
|
+
* - `.kds-monto-row-value`: `font-size: 24px`, `font-weight: 700`, `letter-spacing: tight`
|
|
3312
|
+
*
|
|
3313
|
+
* @gsp `_manualVerifyChileMaterial.gsp` y demás manualVerify
|
|
3314
|
+
* @css .kds-monto-row, .kds-monto-row-title, .kds-monto-row-deadline, .kds-monto-row-value
|
|
3315
|
+
*/
|
|
3316
|
+
declare const KdsMontoRow: React__default.ForwardRefExoticComponent<KdsMontoRowProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
3317
|
+
|
|
3318
|
+
interface KdsMerchantTileProps extends Omit<React__default.HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
3319
|
+
/** Nombre del merchant (usado para alt del logo o initials fallback). */
|
|
3320
|
+
name: string;
|
|
3321
|
+
/** URL del logo del merchant. Si está presente, renderiza `<img>` dentro del tile. */
|
|
3322
|
+
logoUrl?: string;
|
|
3323
|
+
/** Initials custom (2-3 letras). Si no se provee, usa las primeras 2 letras de `name`. */
|
|
3324
|
+
initials?: string;
|
|
3325
|
+
/** Variante compacta: 40×40 en vez de 56×56. */
|
|
3326
|
+
compact?: boolean;
|
|
3327
|
+
}
|
|
3328
|
+
/**
|
|
3329
|
+
* KdsMerchantTile — tile cuadrado con logo del comercio o initials.
|
|
3330
|
+
*
|
|
3331
|
+
* Layout (spec):
|
|
3332
|
+
* - `56 x 56` (default) / `40 x 40` (compact)
|
|
3333
|
+
* - `border-radius: var(--kds-radius-card)`
|
|
3334
|
+
* - `background: var(--kds-color-primary-deep)` (#5B3DB5)
|
|
3335
|
+
* - `color: white`, `display: grid; place-items: center`
|
|
3336
|
+
* - Initials: `font-size: xl` (20px), `font-weight: 700`, `letter-spacing: 0.02em`
|
|
3337
|
+
*
|
|
3338
|
+
* Variante logo:
|
|
3339
|
+
* - Agrega clase `.logo`, padding `var(--kds-spacing-0-5)` (4px)
|
|
3340
|
+
* - `<img>` interna: `object-fit: cover`, `border-radius: var(--kds-radius-md)`
|
|
3341
|
+
*
|
|
3342
|
+
* Compose with: este componente SOLO renderiza el tile cuadrado. Para el header
|
|
3343
|
+
* de comercio completo ("estás pagando a" + nombre), envolver en el patrón
|
|
3344
|
+
* `.kds-merchant`:
|
|
3345
|
+
* ```html
|
|
3346
|
+
* <div class="kds-merchant">
|
|
3347
|
+
* <!-- KdsMerchantTile → .kds-merchant-tile -->
|
|
3348
|
+
* <div class="kds-merchant-meta">
|
|
3349
|
+
* <span class="kds-merchant-label">Estás pagando a</span>
|
|
3350
|
+
* <strong>Comercial Santiago SpA</strong>
|
|
3351
|
+
* </div>
|
|
3352
|
+
* </div>
|
|
3353
|
+
* ```
|
|
3354
|
+
* Spacing canónico: `.kds-merchant` gap `var(--kds-spacing-1-75)`; label
|
|
3355
|
+
* `margin-bottom: var(--kds-spacing-0-25)`. Ver `Patterns/CSS-only → MerchantHeader`.
|
|
3356
|
+
*
|
|
3357
|
+
* @css .kds-merchant-tile, .kds-merchant-tile.logo, .kds-merchant.compact .kds-merchant-tile
|
|
3358
|
+
*/
|
|
3359
|
+
declare const KdsMerchantTile: React__default.ForwardRefExoticComponent<KdsMerchantTileProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
3360
|
+
|
|
3361
|
+
type KdsPaymentTotalVariant = 'default' | 'email';
|
|
3362
|
+
/**
|
|
3363
|
+
* Color tone for the amount value.
|
|
3364
|
+
* - `brand`: default Khipu purple (current behaviour).
|
|
3365
|
+
* - `info`: khipu-blue (#5A5FE0) — LigoPay QR / transfer flows.
|
|
3366
|
+
*/
|
|
3367
|
+
type KdsPaymentTotalTone = 'brand' | 'info';
|
|
3368
|
+
interface KdsPaymentTotalProps extends Omit<React__default.HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
3369
|
+
/**
|
|
3370
|
+
* Variante visual.
|
|
3371
|
+
* - `default`: monto destacado en color primario (QR / payment view).
|
|
3372
|
+
* - `email`: monto compacto en color de texto primario (email templates).
|
|
3373
|
+
* @default 'default'
|
|
3374
|
+
*/
|
|
3375
|
+
variant?: KdsPaymentTotalVariant;
|
|
3376
|
+
/**
|
|
3377
|
+
* Tono de color del monto. Combinable con cualquier `variant`.
|
|
3378
|
+
* - `brand` (default): purple Khipu / texto primario según variante.
|
|
3379
|
+
* - `info`: khipu-blue (#5A5FE0) — pantallas QR/transfer de LigoPay.
|
|
3380
|
+
* @default 'brand'
|
|
3381
|
+
*/
|
|
3382
|
+
tone?: KdsPaymentTotalTone;
|
|
3383
|
+
/**
|
|
3384
|
+
* Si `true`, aplica el modificador `kds-payment-total--centered`: remueve el
|
|
3385
|
+
* `padding-left` asimétrico (que existe por defecto para la vista QR de
|
|
3386
|
+
* LigoPay) y centra todo el texto interno. Combinable con `variant` y `tone`.
|
|
3387
|
+
* @default false
|
|
3388
|
+
*/
|
|
3389
|
+
centered?: boolean;
|
|
3390
|
+
/**
|
|
3391
|
+
* Monto a mostrar.
|
|
3392
|
+
* - `number`: el componente formatea (entera + decimal) con `Intl.NumberFormat`.
|
|
3393
|
+
* - `string`: ya formateado (e.g. `"1,500.50"` o `"1500.50"`). Si contiene `.`,
|
|
3394
|
+
* la parte tras el punto se renderiza como superíndice decimal.
|
|
3395
|
+
*/
|
|
3396
|
+
amount: number | string;
|
|
3397
|
+
/**
|
|
3398
|
+
* Símbolo de moneda. Default `'S/'` (sol peruano) para mantener paridad con el origen
|
|
3399
|
+
* en paylink-ligopay. Pásalo explícito para otras monedas (`'$'`, `'CLP$'`, etc.).
|
|
3400
|
+
* @default 'S/'
|
|
3401
|
+
*/
|
|
3402
|
+
currency?: string;
|
|
3403
|
+
/**
|
|
3404
|
+
* Cantidad de decimales. `0` o `null` ocultan el superíndice decimal.
|
|
3405
|
+
* Aplica sólo cuando `amount` es `number` o cuando contiene un `.`.
|
|
3406
|
+
* @default 2
|
|
3407
|
+
*/
|
|
3408
|
+
decimals?: number | null;
|
|
3409
|
+
/**
|
|
3410
|
+
* Locale BCP-47 para `Intl.NumberFormat` (separadores miles/decimal).
|
|
3411
|
+
* Aplica sólo cuando `amount` es `number`.
|
|
3412
|
+
* @default 'es-PE'
|
|
3413
|
+
*/
|
|
3414
|
+
locale?: string;
|
|
3415
|
+
/**
|
|
3416
|
+
* Etiqueta sobre el monto (e.g. `"Monto a pagar"`).
|
|
3417
|
+
* @default 'Monto a pagar'
|
|
3418
|
+
*/
|
|
3419
|
+
label?: React__default.ReactNode;
|
|
3420
|
+
/**
|
|
3421
|
+
* Título principal (desktop). En la variante `default` aparece arriba; en `email`
|
|
3422
|
+
* se omite. Pasa `null` para ocultarlo en `default` también.
|
|
3423
|
+
* @default 'Escanea el QR'
|
|
3424
|
+
*/
|
|
3425
|
+
title?: React__default.ReactNode;
|
|
3426
|
+
/**
|
|
3427
|
+
* Título alternativo para mobile en variante `default`. En desktop se oculta vía CSS.
|
|
3428
|
+
* Pasa `null` para omitirlo.
|
|
3429
|
+
* @default 'Descarga el QR'
|
|
3430
|
+
*/
|
|
3431
|
+
titleMobile?: React__default.ReactNode;
|
|
3432
|
+
}
|
|
3433
|
+
/**
|
|
3434
|
+
* KdsPaymentTotal — bloque de "monto a pagar" usado en pantallas de pago QR y emails de cobro.
|
|
3435
|
+
*
|
|
3436
|
+
* Portado desde el taglib `<kh:paymentTotal>` de paylink-ligopay
|
|
3437
|
+
* (`KhipuTagLib.groovy:131-177` + `materialize-config.css → .payment-total`).
|
|
3438
|
+
*
|
|
3439
|
+
* **Variantes:**
|
|
3440
|
+
* - `default`: amount grande (`3rem`) en color primario Khipu — vista QR de pago.
|
|
3441
|
+
* - `email`: amount compacto (`1.5rem`) en color texto primario — plantillas email.
|
|
3442
|
+
*
|
|
3443
|
+
* **Layout responsive (default):**
|
|
3444
|
+
* - Desktop: padding-left 80px, title visible (titleMobile oculto).
|
|
3445
|
+
* - Mobile (≤ 1024px): centrado, sólo titleMobile visible.
|
|
3446
|
+
* - La variante `email` mantiene alineación izquierda en todos los breakpoints.
|
|
3447
|
+
*
|
|
3448
|
+
* **Decimal handling:**
|
|
3449
|
+
* - Si `amount` es `number`, se formatea con `Intl.NumberFormat(locale)`.
|
|
3450
|
+
* - Si `amount` es `string` con `.`, la parte tras el punto va al `<sup>`.
|
|
3451
|
+
* - `decimals={0}` o `null` desactivan el superíndice.
|
|
3452
|
+
*
|
|
3453
|
+
* @gsp Origen: paylink-ligopay/grails-app/taglib/com/khipu/payment/paylink/ligopay/KhipuTagLib.groovy
|
|
3454
|
+
* @css .kds-payment-total, .kds-payment-total--email, .kds-payment-total-title,
|
|
3455
|
+
* .kds-payment-total-title-mobile, .kds-payment-label, .kds-payment-amount,
|
|
3456
|
+
* .kds-payment-total-decimal-sup
|
|
3457
|
+
*/
|
|
3458
|
+
declare const KdsPaymentTotal: React__default.ForwardRefExoticComponent<KdsPaymentTotalProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
3459
|
+
|
|
3460
|
+
interface KdsBillAttachmentProps extends Omit<React__default.AnchorHTMLAttributes<HTMLAnchorElement>, 'children'> {
|
|
3461
|
+
/** Nombre del archivo a descargar. */
|
|
3462
|
+
filename: string;
|
|
3463
|
+
/** URL absoluta o relativa del archivo. */
|
|
3464
|
+
href: string;
|
|
3465
|
+
/** Icon Material Symbols. Default: `attach_file`. */
|
|
3466
|
+
icon?: string;
|
|
3467
|
+
}
|
|
3468
|
+
/**
|
|
3469
|
+
* KdsBillAttachment — link de descarga para adjuntos de la factura/bill.
|
|
3470
|
+
*
|
|
3471
|
+
* Layout (spec):
|
|
3472
|
+
* - `display: inline-flex; align-items: center; justify-content: flex-start`
|
|
3473
|
+
* - `width: fit-content`
|
|
3474
|
+
* - `color: var(--kds-color-info-main)`, `font-size: sm` (14px), `font-weight: 500`
|
|
3475
|
+
* - `text-decoration: none` → hover `underline` solo en el span
|
|
3476
|
+
* - Icon: `font-size: lg` (16px)
|
|
3477
|
+
*
|
|
3478
|
+
* @gsp `mat:billAttachments` taglib (introducida en commit 1a8e228c9)
|
|
3479
|
+
* @css .kds-bill-attachment, .kds-bill-attachments
|
|
3480
|
+
*/
|
|
3481
|
+
declare const KdsBillAttachment: React__default.ForwardRefExoticComponent<KdsBillAttachmentProps & React__default.RefAttributes<HTMLAnchorElement>>;
|
|
3482
|
+
interface KdsBillAttachmentsProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
3483
|
+
}
|
|
3484
|
+
/**
|
|
3485
|
+
* KdsBillAttachments — contenedor vertical de varios `KdsBillAttachment`.
|
|
3486
|
+
*
|
|
3487
|
+
* Layout (spec):
|
|
3488
|
+
* - `display: flex; flex-direction: column`
|
|
3489
|
+
* - `gap: var(--kds-spacing-0-75)` (6px)
|
|
3490
|
+
*/
|
|
3491
|
+
declare const KdsBillAttachments: React__default.ForwardRefExoticComponent<KdsBillAttachmentsProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
3492
|
+
|
|
3194
3493
|
declare function useCopyToClipboard(resetMs?: number): {
|
|
3195
3494
|
copied: boolean;
|
|
3196
3495
|
copy: (text: string) => Promise<void>;
|
|
@@ -3236,4 +3535,4 @@ declare function getContrastColor(hex: string): string;
|
|
|
3236
3535
|
*/
|
|
3237
3536
|
declare function lighten(hex: string, amount: number): string;
|
|
3238
3537
|
|
|
3239
|
-
export { type Colors, KdsAccordion, KdsAccordionDetails, type KdsAccordionDetailsProps, type KdsAccordionProps, KdsAccordionSummary, type KdsAccordionSummaryProps, KdsAlert, type KdsAlertProps, type KdsAlertSeverity, KdsBankList, type KdsBankListProps, KdsBankModal, type KdsBankModalProps, KdsBankRow, type KdsBankRowProps, KdsBottomSheet, type KdsBottomSheetProps, KdsButton, type KdsButtonProps, type KdsButtonSize, type KdsButtonVariant, KdsCard, KdsCardBody, KdsCardFooter, KdsCardHeader, KdsCardPlan, type KdsCardPlanProps, type KdsCardProps, type KdsCardSectionProps, KdsCardSelector, type KdsCardSelectorProps, type KdsCardVariant, KdsCheckbox, type KdsCheckboxProps, KdsChip, type KdsChipColor, type KdsChipProps, KdsCopyRow, type KdsCopyRowProps, KdsCopyableTable, type KdsCopyableTableProps, type KdsCopyableTableRow, KdsCountdown, type KdsCountdownProps, KdsDivider, type KdsDividerProps, KdsExpandPanel, type KdsExpandPanelProps, KdsInvoiceSticky, type KdsInvoiceStickyProps, KdsLinearProgress, type KdsLinearProgressProps,
|
|
3538
|
+
export { type Colors, KdsAccordion, KdsAccordionDetails, type KdsAccordionDetailsProps, type KdsAccordionProps, KdsAccordionSummary, type KdsAccordionSummaryProps, KdsAlert, type KdsAlertProps, type KdsAlertSeverity, KdsBankList, type KdsBankListProps, KdsBankModal, type KdsBankModalProps, KdsBankRow, type KdsBankRowProps, KdsBillAttachment, type KdsBillAttachmentProps, KdsBillAttachments, type KdsBillAttachmentsProps, KdsBottomSheet, type KdsBottomSheetProps, KdsButton, type KdsButtonProps, type KdsButtonSize, type KdsButtonVariant, KdsCard, KdsCardBody, KdsCardFooter, KdsCardHeader, KdsCardPlan, type KdsCardPlanProps, type KdsCardProps, type KdsCardSectionProps, KdsCardSelector, type KdsCardSelectorProps, type KdsCardVariant, KdsCheckbox, type KdsCheckboxProps, KdsChip, type KdsChipColor, type KdsChipProps, KdsCopyRow, type KdsCopyRowProps, KdsCopyableTable, type KdsCopyableTableProps, type KdsCopyableTableRow, KdsCountdown, type KdsCountdownProps, KdsDivider, type KdsDividerProps, KdsExpandPanel, type KdsExpandPanelProps, KdsInvoiceSticky, type KdsInvoiceStickyProps, KdsLinearProgress, type KdsLinearProgressProps, KdsMerchantTile, type KdsMerchantTileProps, KdsMontoRow, type KdsMontoRowProps, KdsPaymentTotal, type KdsPaymentTotalProps, type KdsPaymentTotalVariant, KdsQrRow, type KdsQrRowProps, KdsRadioGroup, type KdsRadioGroupProps, type KdsRadioOption, type KdsRecapItem, KdsRecapList, type KdsRecapListProps, KdsSectionNote, type KdsSectionNoteProps, KdsSecureFooter, type KdsSecureFooterProps, KdsSegmentedTabs, type KdsSegmentedTabsProps, KdsSelect, type KdsSelectOption, type KdsSelectProps, KdsSnackbar, type KdsSnackbarProps, type KdsSnackbarType, KdsSpinner, type KdsSpinnerProps, type KdsSpinnerSize, KdsStatusBlock, type KdsStatusBlockProps, type KdsStatusType, KdsStepper, type KdsStepperProps, KdsTab, KdsTabPanel, type KdsTabPanelProps, type KdsTabProps, KdsTabs, type KdsTabsProps, KdsTextField, type KdsTextFieldProps, KdsThemeProvider, type KdsThemeProviderProps, KdsTooltip, type KdsTooltipPlacement, type KdsTooltipProps, KdsTypography, type KdsTypographyProps, type KdsTypographyVariant, type ThemeMode, type Tokens, type TokensByMode, type Typography as TypographyTokens, borderRadius, breakpoints, colors, colorsByMode, fontFamilies, fontSizes, fontWeights, getContrastColor, letterSpacings, lighten, lineHeights, semanticSpacing, shadows, spacing, tokens, tokensByMode, transitions, typography, useAutoHide, useCopyToClipboard, useCountdown, useTabsKeyboard, zIndex };
|