@khipu/design-system 0.2.0-alpha.22 → 0.2.0-alpha.24
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 +280 -76
- package/dist/beercss/khipu-beercss.min.css +1 -1
- package/dist/beercss/metadata.json +4 -4
- package/dist/index.d.mts +445 -257
- package/dist/index.d.ts +445 -257
- package/dist/index.js +687 -478
- package/dist/index.mjs +671 -460
- package/package.json +10 -7
- 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 {
|
|
@@ -2496,6 +2495,10 @@ interface KdsButtonProps extends React__default.ButtonHTMLAttributes<HTMLButtonE
|
|
|
2496
2495
|
*
|
|
2497
2496
|
* Built with native HTML and kds-* CSS classes from the BeerCSS bundle.
|
|
2498
2497
|
*
|
|
2498
|
+
* Compose with: para apilar CTAs al pie de una card, envolver en
|
|
2499
|
+
* `.kds-btn-stack` (NO usar gap/margin inline) — primario arriba, outlined
|
|
2500
|
+
* debajo, todos `fullWidth`. Ver `Patterns/CSS-only → ButtonStack`.
|
|
2501
|
+
*
|
|
2499
2502
|
* @example
|
|
2500
2503
|
* ```tsx
|
|
2501
2504
|
* <KdsButton variant="primary">
|
|
@@ -2524,121 +2527,65 @@ declare const KdsButton: React__default.ForwardRefExoticComponent<KdsButtonProps
|
|
|
2524
2527
|
/**
|
|
2525
2528
|
* Khipu Design System - TextField Component
|
|
2526
2529
|
*
|
|
2527
|
-
*
|
|
2528
|
-
*
|
|
2530
|
+
* Matchea exactamente el markup que genera `matFieldImpl()` del taglib `mat:textField` de payment:
|
|
2531
|
+
*
|
|
2532
|
+
* <div class="field label border [prefix] [suffix] [invalid|valid|info|warning]">
|
|
2533
|
+
* <i class="material-symbols-outlined">prefixIcon</i> // si startIcon
|
|
2534
|
+
* <input type="..." id="..." name="..." value="..." placeholder=" " [required] [disabled]>
|
|
2535
|
+
* <label for="...">Label [*]</label>
|
|
2536
|
+
* <i class="material-symbols-outlined">suffixIcon</i> // si endIcon
|
|
2537
|
+
* <span class="helper">errorMessage o help</span> // si helperText
|
|
2538
|
+
* </div>
|
|
2539
|
+
*
|
|
2540
|
+
* Reglas críticas del truco floating-label de BeerCSS:
|
|
2541
|
+
* - `placeholder=" "` (un espacio) — NUNCA aceptar placeholder real del consumidor.
|
|
2542
|
+
* BeerCSS usa `input:placeholder-shown ~ label` para mantener la label abajo cuando el input
|
|
2543
|
+
* está vacío. Si pasas un placeholder real, el label se queda siempre arriba y se superpone.
|
|
2544
|
+
* - El wrapper DEBE tener `.prefix` cuando hay icono al inicio (alinea la label al lado del icono).
|
|
2545
|
+
* - El wrapper DEBE tener `.suffix` cuando hay icono al final.
|
|
2546
|
+
*
|
|
2547
|
+
* @gsp `mat:textField`, `mat:emailField`, `mat:passwordField`, `mat:numberField` (taglib `matFieldImpl`)
|
|
2529
2548
|
*/
|
|
2530
2549
|
|
|
2531
|
-
interface KdsTextFieldProps extends Omit<React__default.InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
2532
|
-
/**
|
|
2550
|
+
interface KdsTextFieldProps extends Omit<React__default.InputHTMLAttributes<HTMLInputElement>, 'size' | 'placeholder'> {
|
|
2551
|
+
/** Floating label. */
|
|
2533
2552
|
label: string;
|
|
2534
|
-
/** Helper text
|
|
2553
|
+
/** Helper text bajo el field (error o info). */
|
|
2535
2554
|
helperText?: string;
|
|
2536
|
-
/**
|
|
2555
|
+
/** Estado inválido — aplica `.invalid` al wrapper. */
|
|
2537
2556
|
error?: boolean;
|
|
2538
|
-
/** Full width
|
|
2557
|
+
/** Full width (default: true). */
|
|
2539
2558
|
fullWidth?: boolean;
|
|
2540
|
-
/** Material
|
|
2559
|
+
/** Material Symbol al inicio del input (aplica clase `.prefix`). */
|
|
2541
2560
|
startIcon?: string;
|
|
2542
|
-
/** Material
|
|
2561
|
+
/** Material Symbol al final del input (aplica clase `.suffix`). */
|
|
2543
2562
|
endIcon?: string;
|
|
2544
2563
|
}
|
|
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
2564
|
declare const KdsTextField: React__default.ForwardRefExoticComponent<KdsTextFieldProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
2578
2565
|
|
|
2579
2566
|
/**
|
|
2580
2567
|
* Khipu Design System - Checkbox Component
|
|
2581
2568
|
*
|
|
2582
|
-
*
|
|
2569
|
+
* Wrapper React que matchea exactamente el markup del taglib `mat:checkBox` de payment:
|
|
2570
|
+
*
|
|
2571
|
+
* <label class="checkbox">
|
|
2572
|
+
* <input type="checkbox" id="..." name="..." value="..." [checked] [disabled]>
|
|
2573
|
+
* <span>Label</span>
|
|
2574
|
+
* </label>
|
|
2575
|
+
*
|
|
2576
|
+
* BeerCSS oculta el input via `opacity: 0` y renderiza un sprite vía `::before` con
|
|
2577
|
+
* `content: "check_box_outline_blank"` usando la fuente Material Symbols Outlined.
|
|
2578
|
+
*
|
|
2579
|
+
* NO agregamos `htmlFor` al label porque el `<input>` está anidado dentro: la
|
|
2580
|
+
* asociación es implícita y `for` puede causar doble-disparo del click event.
|
|
2583
2581
|
*/
|
|
2584
2582
|
|
|
2585
2583
|
interface KdsCheckboxProps extends Omit<React__default.InputHTMLAttributes<HTMLInputElement>, 'type'> {
|
|
2584
|
+
/** Texto del label mostrado al lado del sprite. Opcional (puede usar aria-label). */
|
|
2586
2585
|
label?: string;
|
|
2587
2586
|
}
|
|
2588
2587
|
declare const KdsCheckbox: React__default.ForwardRefExoticComponent<KdsCheckboxProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
2589
2588
|
|
|
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
2589
|
/**
|
|
2643
2590
|
* Khipu Design System - Card Component
|
|
2644
2591
|
*
|
|
@@ -2692,12 +2639,23 @@ declare const KdsCardFooter: React__default.ForwardRefExoticComponent<KdsCardSec
|
|
|
2692
2639
|
/**
|
|
2693
2640
|
* Khipu Design System - Spinner Component
|
|
2694
2641
|
*
|
|
2695
|
-
*
|
|
2642
|
+
* Spinner circular animado usando el patrón nativo de BeerCSS:
|
|
2643
|
+
* <progress class="circle [small|large] indeterminate"></progress>
|
|
2644
|
+
*
|
|
2645
|
+
* Tamaños (BeerCSS):
|
|
2646
|
+
* - `small` → 1.5rem (24px)
|
|
2647
|
+
* - default → 2.5rem (40px)
|
|
2648
|
+
* - `large` → 3.5rem (56px)
|
|
2649
|
+
*
|
|
2650
|
+
* El `<progress>` indeterminate aplica animación `to-rotate 1s linear infinite` con
|
|
2651
|
+
* gradient cónico (currentColor / `--active`).
|
|
2696
2652
|
*/
|
|
2697
2653
|
|
|
2698
2654
|
type KdsSpinnerSize = 'small' | 'medium' | 'large';
|
|
2699
2655
|
interface KdsSpinnerProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
2656
|
+
/** Tamaño del spinner. Default `medium` (sin modifier = 2.5rem). */
|
|
2700
2657
|
size?: KdsSpinnerSize;
|
|
2658
|
+
/** Texto bajo el spinner (visible). Si se omite, se usa "Cargando" como sr-only para a11y. */
|
|
2701
2659
|
label?: string;
|
|
2702
2660
|
}
|
|
2703
2661
|
declare const KdsSpinner: React__default.ForwardRefExoticComponent<KdsSpinnerProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
@@ -2717,53 +2675,34 @@ declare const KdsLinearProgress: React__default.ForwardRefExoticComponent<KdsLin
|
|
|
2717
2675
|
/**
|
|
2718
2676
|
* Khipu Design System - Alert Component
|
|
2719
2677
|
*
|
|
2720
|
-
*
|
|
2721
|
-
*
|
|
2678
|
+
* Alert con icon opcional, content y close button.
|
|
2679
|
+
*
|
|
2680
|
+
* Specs (CSS-derived):
|
|
2681
|
+
* - `.kds-alert`: flex, align-items center, gap 8px, padding 16px, border-radius md, border 1px
|
|
2682
|
+
* - `.kds-alert-icon`: 24px, flex-shrink 0
|
|
2683
|
+
* - `.kds-alert-content`: flex 1, min-width 0 (permite ellipsis del texto)
|
|
2684
|
+
* - Variantes: kds-info / kds-success / kds-warning / kds-error
|
|
2685
|
+
* - `.kds-alert-inline` reduce padding y bottom-margin
|
|
2722
2686
|
*/
|
|
2723
2687
|
|
|
2724
2688
|
type KdsAlertSeverity = 'success' | 'info' | 'warning' | 'error';
|
|
2725
2689
|
interface KdsAlertProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
2726
|
-
/** Alert severity/type */
|
|
2690
|
+
/** Alert severity/type. */
|
|
2727
2691
|
severity: KdsAlertSeverity;
|
|
2728
|
-
/** Alert title */
|
|
2692
|
+
/** Alert title (negrita arriba). */
|
|
2729
2693
|
title?: string;
|
|
2730
|
-
/**
|
|
2731
|
-
|
|
2732
|
-
|
|
2694
|
+
/**
|
|
2695
|
+
* Material Symbols icon name. Si es `true` (o se omite y hay otra prop), se usa el default por severity.
|
|
2696
|
+
* Pasar `false` para ocultar el icon. Pasar un string custom para override.
|
|
2697
|
+
*/
|
|
2698
|
+
icon?: string | boolean;
|
|
2699
|
+
/** Inline variant (compact display, sin border-radius grande). */
|
|
2733
2700
|
inline?: boolean;
|
|
2734
|
-
/** Alert
|
|
2701
|
+
/** Alert body. */
|
|
2735
2702
|
children: React__default.ReactNode;
|
|
2736
|
-
/**
|
|
2703
|
+
/** Callback para cerrar — renderiza icon-button discreto a la derecha. */
|
|
2737
2704
|
onClose?: () => void;
|
|
2738
2705
|
}
|
|
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
2706
|
declare const KdsAlert: React__default.ForwardRefExoticComponent<KdsAlertProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
2768
2707
|
|
|
2769
2708
|
/**
|
|
@@ -2817,10 +2756,27 @@ interface KdsTypographyProps extends React__default.HTMLAttributes<HTMLElement>
|
|
|
2817
2756
|
*/
|
|
2818
2757
|
declare const KdsTypography: React__default.ForwardRefExoticComponent<KdsTypographyProps & React__default.RefAttributes<HTMLElement>>;
|
|
2819
2758
|
|
|
2759
|
+
/**
|
|
2760
|
+
* Khipu Design System - Tabs Component
|
|
2761
|
+
*
|
|
2762
|
+
* Matchea exactamente el markup que usa producción payment:
|
|
2763
|
+
*
|
|
2764
|
+
* <div class="kds-segmented-tabs" role="tablist">
|
|
2765
|
+
* <button type="button" class="active" role="tab" aria-selected="true">Personas</button>
|
|
2766
|
+
* <button type="button" role="tab" aria-selected="false">Empresas</button>
|
|
2767
|
+
* </div>
|
|
2768
|
+
*
|
|
2769
|
+
* Solo existe la variante segmented — producción payment no usa otra cosa, y el
|
|
2770
|
+
* "standard" Material Design 3 underline tab no está en el Khipu DS.
|
|
2771
|
+
*
|
|
2772
|
+
* @gsp `_choosePaymentMethodFormMaterial.gsp` (líneas 18-25)
|
|
2773
|
+
*/
|
|
2774
|
+
|
|
2820
2775
|
interface KdsTabsProps extends Omit<React__default.HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
2776
|
+
/** Índice 0-based del tab activo. */
|
|
2821
2777
|
activeIndex: number;
|
|
2778
|
+
/** Callback cuando cambia el tab activo. */
|
|
2822
2779
|
onChange: (index: number) => void;
|
|
2823
|
-
variant?: 'standard' | 'segmented';
|
|
2824
2780
|
}
|
|
2825
2781
|
declare const KdsTabs: React__default.ForwardRefExoticComponent<KdsTabsProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
2826
2782
|
interface KdsTabInternalProps {
|
|
@@ -2836,106 +2792,23 @@ interface KdsTabPanelProps extends React__default.HTMLAttributes<HTMLDivElement>
|
|
|
2836
2792
|
declare const KdsTabPanel: React__default.ForwardRefExoticComponent<KdsTabPanelProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
2837
2793
|
|
|
2838
2794
|
/**
|
|
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 />
|
|
2795
|
+
* Khipu Design System - RadioGroup Component
|
|
2886
2796
|
*
|
|
2887
|
-
*
|
|
2888
|
-
* ```
|
|
2889
|
-
*/
|
|
2890
|
-
declare const KdsLogoHeaderSeparator: React__default.ForwardRefExoticComponent<KdsLogoHeaderSeparatorProps & React__default.RefAttributes<HTMLSpanElement>>;
|
|
2891
|
-
/**
|
|
2892
|
-
* Transaction code section.
|
|
2797
|
+
* Native HTML radio group with BeerCSS `.radio` class.
|
|
2893
2798
|
*
|
|
2894
|
-
*
|
|
2895
|
-
*
|
|
2896
|
-
*
|
|
2897
|
-
*
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
*
|
|
2799
|
+
* Contrato BeerCSS:
|
|
2800
|
+
* <fieldset class="kds-radio-group">
|
|
2801
|
+
* <legend>Label</legend>
|
|
2802
|
+
* <label class="radio">
|
|
2803
|
+
* <input type="radio" name="x" value="a" />
|
|
2804
|
+
* <span>Opción A</span>
|
|
2805
|
+
* </label>
|
|
2806
|
+
* ...
|
|
2807
|
+
* </fieldset>
|
|
2902
2808
|
*
|
|
2903
|
-
*
|
|
2904
|
-
*
|
|
2905
|
-
*
|
|
2906
|
-
* ```
|
|
2907
|
-
*/
|
|
2908
|
-
declare const KdsLogoHeaderCloseButton: React__default.ForwardRefExoticComponent<KdsLogoHeaderCloseButtonProps & React__default.RefAttributes<HTMLButtonElement>>;
|
|
2909
|
-
/**
|
|
2910
|
-
* LogoHeader bar component.
|
|
2911
|
-
*
|
|
2912
|
-
* A composable header component that can be used with sub-components
|
|
2913
|
-
* for maximum flexibility, or with default children for quick usage.
|
|
2914
|
-
*
|
|
2915
|
-
* @example
|
|
2916
|
-
* ```tsx
|
|
2917
|
-
* // Composable usage
|
|
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.
|
|
2809
|
+
* Specs:
|
|
2810
|
+
* - Input oculto, sprite circular generado por `:is(.checkbox, .radio) > span::before`
|
|
2811
|
+
* - Tamaño default 18x18; modifiers `.small` (14px) / `.large` (22px)
|
|
2939
2812
|
*/
|
|
2940
2813
|
|
|
2941
2814
|
interface KdsRadioOption {
|
|
@@ -2949,55 +2822,137 @@ interface KdsRadioGroupProps extends Omit<React__default.FieldsetHTMLAttributes<
|
|
|
2949
2822
|
options: KdsRadioOption[];
|
|
2950
2823
|
value?: string;
|
|
2951
2824
|
onChange?: (value: string) => void;
|
|
2825
|
+
/** Tamaño del sprite del radio (aplicado a cada opción). */
|
|
2826
|
+
size?: 'small' | 'large';
|
|
2952
2827
|
}
|
|
2953
2828
|
declare const KdsRadioGroup: React__default.ForwardRefExoticComponent<KdsRadioGroupProps & React__default.RefAttributes<HTMLFieldSetElement>>;
|
|
2954
2829
|
|
|
2955
2830
|
/**
|
|
2956
2831
|
* Khipu Design System - Select Component
|
|
2957
2832
|
*
|
|
2958
|
-
*
|
|
2833
|
+
* Native HTML `<select>` wrapped en el patrón BeerCSS `field label border`.
|
|
2834
|
+
* Matchea exactamente el markup que genera la taglib `mat:select` de payment.
|
|
2835
|
+
*
|
|
2836
|
+
* Markup canónico:
|
|
2837
|
+
*
|
|
2838
|
+
* <div class="field label border [prefix] [invalid|valid|info|warning]">
|
|
2839
|
+
* <i class="material-symbols-outlined">prefixIcon</i> // opcional
|
|
2840
|
+
* <select id="..." name="..." [required] [disabled]>
|
|
2841
|
+
* <option value="">Placeholder...</option> // opcional (noSelection)
|
|
2842
|
+
* <option value="bci">BCI</option>
|
|
2843
|
+
* ...
|
|
2844
|
+
* </select>
|
|
2845
|
+
* <label for="...">Banco *</label>
|
|
2846
|
+
* <span class="helper">errorMessage o help</span> // opcional
|
|
2847
|
+
* </div>
|
|
2848
|
+
*
|
|
2849
|
+
* BeerCSS dibuja el chevron automáticamente, el floating label, focus ring, etc.
|
|
2850
|
+
*
|
|
2851
|
+
* @gsp `mat:select` taglib (MaterialTagLib.groovy:260)
|
|
2959
2852
|
*/
|
|
2960
2853
|
|
|
2961
|
-
interface
|
|
2854
|
+
interface KdsSelectOption {
|
|
2855
|
+
/** Valor del `<option>` (string serializable). */
|
|
2962
2856
|
value: string;
|
|
2963
|
-
|
|
2857
|
+
/** Texto visible del `<option>`. */
|
|
2858
|
+
label: string;
|
|
2859
|
+
/** Si está disabled. */
|
|
2860
|
+
disabled?: boolean;
|
|
2861
|
+
}
|
|
2862
|
+
interface KdsSelectProps extends Omit<React__default.SelectHTMLAttributes<HTMLSelectElement>, 'children'> {
|
|
2863
|
+
/** Floating label. */
|
|
2864
|
+
label: string;
|
|
2865
|
+
/** Lista de opciones del select. */
|
|
2866
|
+
options: KdsSelectOption[];
|
|
2867
|
+
/**
|
|
2868
|
+
* Texto del primer `<option>` con value="" (placeholder). Si está vacío, no se renderiza.
|
|
2869
|
+
* Equivalente a `noSelection` del taglib.
|
|
2870
|
+
*/
|
|
2964
2871
|
placeholder?: string;
|
|
2965
|
-
|
|
2872
|
+
/** Helper text bajo el field (error o info). */
|
|
2873
|
+
helperText?: string;
|
|
2874
|
+
/** Estado inválido — aplica clase `.invalid` al wrapper. */
|
|
2966
2875
|
error?: boolean;
|
|
2967
|
-
|
|
2968
|
-
|
|
2876
|
+
/** Material Symbols icon al inicio del field (aplica clase `.prefix`). */
|
|
2877
|
+
prefixIcon?: string;
|
|
2878
|
+
/** Full width (default: true). */
|
|
2969
2879
|
fullWidth?: boolean;
|
|
2970
|
-
children: React__default.ReactNode;
|
|
2971
|
-
className?: string;
|
|
2972
2880
|
}
|
|
2973
|
-
|
|
2974
|
-
children: React__default.ReactNode;
|
|
2975
|
-
}
|
|
2976
|
-
declare const KdsSelect: React__default.ForwardRefExoticComponent<KdsSelectProps & React__default.RefAttributes<HTMLDivElement>> & {
|
|
2977
|
-
Item: React__default.ForwardRefExoticComponent<KdsSelectItemProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
2978
|
-
};
|
|
2881
|
+
declare const KdsSelect: React__default.ForwardRefExoticComponent<KdsSelectProps & React__default.RefAttributes<HTMLSelectElement>>;
|
|
2979
2882
|
|
|
2980
2883
|
/**
|
|
2981
2884
|
* Khipu Design System - Chip Component
|
|
2982
2885
|
*
|
|
2983
|
-
*
|
|
2886
|
+
* Chip/badge inline con color, icon opcional y close opcional (deletable).
|
|
2887
|
+
*
|
|
2888
|
+
* Specs (CSS-derived):
|
|
2889
|
+
* - `.kds-badge`: inline-flex, align-items center, gap 4px, padding 2px 8px, radius sm
|
|
2890
|
+
* - `font-size: xs`, `font-weight: medium`, `line-height: 1.5`
|
|
2891
|
+
* - Icon prefix `<i>`: 14px, inline
|
|
2892
|
+
* - Close button (`.kds-badge-close`): 16×16 circular discreto, NO usa kds-btn
|
|
2893
|
+
*
|
|
2894
|
+
* Variantes de color: primary | success | error | warning | info
|
|
2984
2895
|
*/
|
|
2985
2896
|
|
|
2986
2897
|
type KdsChipColor = 'primary' | 'success' | 'error' | 'warning' | 'info';
|
|
2987
2898
|
interface KdsChipProps extends React__default.HTMLAttributes<HTMLSpanElement> {
|
|
2899
|
+
/** Color variant. */
|
|
2988
2900
|
color?: KdsChipColor;
|
|
2901
|
+
/** Material Symbol opcional al inicio del chip. */
|
|
2989
2902
|
icon?: string;
|
|
2903
|
+
/**
|
|
2904
|
+
* Callback cuando se hace click en el icon de cerrar.
|
|
2905
|
+
* Si está definido, renderiza un icon-button discreto (NO usa kds-btn).
|
|
2906
|
+
*/
|
|
2990
2907
|
onDelete?: () => void;
|
|
2991
2908
|
}
|
|
2992
2909
|
declare const KdsChip: React__default.ForwardRefExoticComponent<KdsChipProps & React__default.RefAttributes<HTMLSpanElement>>;
|
|
2993
2910
|
|
|
2911
|
+
/**
|
|
2912
|
+
* Khipu Design System - Snackbar Component
|
|
2913
|
+
*
|
|
2914
|
+
* Matchea exactamente el markup que genera `Khipu.showSnackbar()` y
|
|
2915
|
+
* `initFlashMessages()` (`src/beercss/customizations/khipu-init.js`):
|
|
2916
|
+
*
|
|
2917
|
+
* <div class="snackbar active [info|success|error]"
|
|
2918
|
+
* data-auto-dismiss="true"
|
|
2919
|
+
* style="--kds-snackbar-duration: 5000ms">
|
|
2920
|
+
* <i class="material-symbols-outlined">[icon]</i>
|
|
2921
|
+
* <span class="max">message</span>
|
|
2922
|
+
* <button class="kds-snackbar-close" aria-label="Cerrar">
|
|
2923
|
+
* <i class="material-symbols-outlined">close</i>
|
|
2924
|
+
* </button>
|
|
2925
|
+
* </div>
|
|
2926
|
+
*
|
|
2927
|
+
* Features:
|
|
2928
|
+
* - Icon prefix automático según `type` (info / check_circle / error).
|
|
2929
|
+
* - Progress bar lineal en la parte inferior animado durante `duration` ms (CSS `::after`).
|
|
2930
|
+
* - Close button con estilo `.kds-snackbar-close` (icon-only, blanco semi-transparente).
|
|
2931
|
+
*
|
|
2932
|
+
* @gsp `_paymentFlashSnackbars.gsp` (markup base) + `khipu-init.js → initFlashMessages()` (close + dismiss timer)
|
|
2933
|
+
*/
|
|
2934
|
+
|
|
2994
2935
|
type KdsSnackbarType = 'success' | 'error' | 'info';
|
|
2995
|
-
interface KdsSnackbarProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
2936
|
+
interface KdsSnackbarProps extends Omit<React__default.HTMLAttributes<HTMLDivElement>, 'role'> {
|
|
2937
|
+
/** Mensaje del snackbar. */
|
|
2996
2938
|
message: string;
|
|
2939
|
+
/** Variante semántica. Default `info`. */
|
|
2997
2940
|
type?: KdsSnackbarType;
|
|
2941
|
+
/**
|
|
2942
|
+
* Duración en ms antes de auto-dismiss. Default `5000`.
|
|
2943
|
+
* También controla la duración del progress bar (CSS var `--kds-snackbar-duration`).
|
|
2944
|
+
* Pasa `0` para deshabilitar auto-dismiss (no progress bar).
|
|
2945
|
+
*/
|
|
2998
2946
|
duration?: number;
|
|
2947
|
+
/** Callback al cerrar (click en X o tras auto-dismiss). */
|
|
2999
2948
|
onClose?: () => void;
|
|
2949
|
+
/** Controla visibilidad. Default `true`. */
|
|
3000
2950
|
open?: boolean;
|
|
2951
|
+
/**
|
|
2952
|
+
* Material Symbol icon name. Si se omite, usa el default por `type`.
|
|
2953
|
+
* Pasa `false` para ocultar el icon prefix.
|
|
2954
|
+
*/
|
|
2955
|
+
icon?: string | false;
|
|
3001
2956
|
}
|
|
3002
2957
|
declare const KdsSnackbar: React__default.ForwardRefExoticComponent<KdsSnackbarProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
3003
2958
|
|
|
@@ -3052,7 +3007,7 @@ declare const KdsSectionNote: React__default.ForwardRefExoticComponent<KdsSectio
|
|
|
3052
3007
|
* Native HTML status block with BeerCSS styling.
|
|
3053
3008
|
*/
|
|
3054
3009
|
|
|
3055
|
-
type KdsStatusType = 'success' | 'pending' | 'warn' | 'error';
|
|
3010
|
+
type KdsStatusType = 'success' | 'pending' | 'warn' | 'error' | 'info';
|
|
3056
3011
|
interface KdsStatusBlockProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
3057
3012
|
status: KdsStatusType;
|
|
3058
3013
|
icon?: string;
|
|
@@ -3065,27 +3020,114 @@ declare const KdsStatusBlock: React__default.ForwardRefExoticComponent<KdsStatus
|
|
|
3065
3020
|
/**
|
|
3066
3021
|
* Khipu Design System - Stepper Component
|
|
3067
3022
|
*
|
|
3068
|
-
*
|
|
3023
|
+
* Matchea exactamente el markup del taglib `mat:stepper` de payment:
|
|
3024
|
+
*
|
|
3025
|
+
* <div class="kds-stepper">
|
|
3026
|
+
* <div class="kds-step [completed|current]">
|
|
3027
|
+
* <div class="kds-step-indicator"></div> <!-- vacío: número/check via CSS -->
|
|
3028
|
+
* <div class="kds-step-label">Label</div>
|
|
3029
|
+
* </div>
|
|
3030
|
+
* ...
|
|
3031
|
+
* </div>
|
|
3032
|
+
*
|
|
3033
|
+
* Specs CSS-driven:
|
|
3034
|
+
* - La línea conectora horizontal es `.kds-stepper::before` (NO un `<div>`).
|
|
3035
|
+
* - El check de completed viene de `.kds-step-indicator::after { content: "check" }`.
|
|
3036
|
+
* - El número del step está oculto (`font-size: 0`) — el design no usa números.
|
|
3037
|
+
*
|
|
3038
|
+
* @gsp `mat:stepper` taglib (MaterialTagLib.groovy:817)
|
|
3069
3039
|
*/
|
|
3070
3040
|
|
|
3071
3041
|
interface KdsStepperProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
3072
|
-
|
|
3042
|
+
/** Labels de cada step. La longitud del array determina el número de pasos. */
|
|
3043
|
+
steps: string[];
|
|
3044
|
+
/**
|
|
3045
|
+
* Índice 0-based del step actual.
|
|
3046
|
+
* - Steps `< current` → `.completed` (verde con check)
|
|
3047
|
+
* - Step `== current` → `.current` (azul info)
|
|
3048
|
+
* - Steps `> current` → pending (gris)
|
|
3049
|
+
*/
|
|
3073
3050
|
current: number;
|
|
3074
3051
|
}
|
|
3075
3052
|
declare const KdsStepper: React__default.ForwardRefExoticComponent<KdsStepperProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
3076
3053
|
|
|
3077
|
-
|
|
3054
|
+
/**
|
|
3055
|
+
* Khipu Design System - CopyRow Component
|
|
3056
|
+
*
|
|
3057
|
+
* Fila clickeable que copia su `value` al portapapeles. El ROW completo es el botón.
|
|
3058
|
+
*
|
|
3059
|
+
* Markup canónico (mirrors `src/beercss/demo/payment-components.html`):
|
|
3060
|
+
*
|
|
3061
|
+
* <button class="kds-copy-row" data-copy="value">
|
|
3062
|
+
* <i class="material-symbols-outlined">content_copy</i> ← icon a la IZQUIERDA
|
|
3063
|
+
* <div>
|
|
3064
|
+
* <span class="kds-copy-row-label">Banco</span>
|
|
3065
|
+
* <span class="kds-copy-row-value">Banco Security</span>
|
|
3066
|
+
* </div>
|
|
3067
|
+
* <span class="kds-copy-toast">
|
|
3068
|
+
* <i class="material-symbols-outlined">check_circle</i> Copiado
|
|
3069
|
+
* </span>
|
|
3070
|
+
* </button>
|
|
3071
|
+
*
|
|
3072
|
+
* Cuando `.copied`:
|
|
3073
|
+
* - bg → success-soft, border → success-main
|
|
3074
|
+
* - `.kds-copy-toast` aparece (position absolute right, opacity 0 → 1)
|
|
3075
|
+
*/
|
|
3076
|
+
|
|
3077
|
+
interface KdsCopyRowProps extends Omit<React__default.ButtonHTMLAttributes<HTMLButtonElement>, 'value' | 'children' | 'onClick'> {
|
|
3078
|
+
/** Label arriba (uppercase caption). */
|
|
3078
3079
|
label: string;
|
|
3080
|
+
/** Valor mostrado y copiado al portapapeles. */
|
|
3079
3081
|
value: string;
|
|
3082
|
+
/** Texto del toast cuando se copia. Default: "Copiado". */
|
|
3083
|
+
copiedText?: string;
|
|
3080
3084
|
}
|
|
3081
|
-
declare const KdsCopyRow: React__default.ForwardRefExoticComponent<KdsCopyRowProps & React__default.RefAttributes<
|
|
3085
|
+
declare const KdsCopyRow: React__default.ForwardRefExoticComponent<KdsCopyRowProps & React__default.RefAttributes<HTMLButtonElement>>;
|
|
3086
|
+
|
|
3087
|
+
/**
|
|
3088
|
+
* Khipu Design System - CopyableTable Component
|
|
3089
|
+
*
|
|
3090
|
+
* Tabla compacta con filas que se copian individualmente al click, y un
|
|
3091
|
+
* botón "Copiar todos los datos" que cambia el color de todas las filas al copy.
|
|
3092
|
+
*
|
|
3093
|
+
* Contrato HTML (matchea el CSS .kds-copyable-table del DS):
|
|
3094
|
+
* ```html
|
|
3095
|
+
* <div class="kds-copyable-table" id="destination-copy-list">
|
|
3096
|
+
* <div class="kds-copyable-table-row" data-copy="value-to-copy">
|
|
3097
|
+
* <span class="k">Banco</span>
|
|
3098
|
+
* <span class="v">Banco Security</span>
|
|
3099
|
+
* </div>
|
|
3100
|
+
* ...
|
|
3101
|
+
* </div>
|
|
3102
|
+
* <button class="kds-btn kds-btn-outlined kds-btn-block kds-copy-all-btn"
|
|
3103
|
+
* data-copy-all="#destination-copy-list">
|
|
3104
|
+
* <span class="kds-icon"><i class="material-symbols-outlined">content_copy</i></span>
|
|
3105
|
+
* <span>Copiar todos los datos</span>
|
|
3106
|
+
* </button>
|
|
3107
|
+
* ```
|
|
3108
|
+
*
|
|
3109
|
+
* Specs:
|
|
3110
|
+
* - Row: flex space-between, padding 10px 8px, border-top divider, font sm, cursor pointer
|
|
3111
|
+
* - Row hover: bg primary-faint + icon copy aparece en `.v::after`
|
|
3112
|
+
* - Row `.copied`: bg success-soft, `.v` color success-dark, icon → check
|
|
3113
|
+
* - Copy-all-btn: kds-btn-outlined-block + bg primary-faint
|
|
3114
|
+
* - Copy-all-btn `.copied`: bg success-soft
|
|
3115
|
+
*/
|
|
3082
3116
|
|
|
3083
3117
|
interface KdsCopyableTableRow {
|
|
3084
3118
|
label: string;
|
|
3085
3119
|
value: string;
|
|
3120
|
+
/** Override del valor a copiar (default: `value`). */
|
|
3121
|
+
copy?: string;
|
|
3086
3122
|
}
|
|
3087
3123
|
interface KdsCopyableTableProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
3088
3124
|
rows: KdsCopyableTableRow[];
|
|
3125
|
+
/** Texto del botón "Copiar todo". Default: "Copiar todos los datos". */
|
|
3126
|
+
copyAllLabel?: string;
|
|
3127
|
+
/** Texto cuando se copió todo. Default: "Datos copiados". */
|
|
3128
|
+
copiedAllLabel?: string;
|
|
3129
|
+
/** Si `false`, no muestra el botón "Copiar todo". */
|
|
3130
|
+
showCopyAll?: boolean;
|
|
3089
3131
|
}
|
|
3090
3132
|
declare const KdsCopyableTable: React__default.ForwardRefExoticComponent<KdsCopyableTableProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
3091
3133
|
|
|
@@ -3102,8 +3144,14 @@ interface KdsCountdownProps extends React__default.HTMLAttributes<HTMLDivElement
|
|
|
3102
3144
|
}
|
|
3103
3145
|
declare const KdsCountdown: React__default.ForwardRefExoticComponent<KdsCountdownProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
3104
3146
|
|
|
3105
|
-
|
|
3106
|
-
|
|
3147
|
+
/**
|
|
3148
|
+
* KdsSegmentedTabs — alias semántico de `KdsTabs`.
|
|
3149
|
+
*
|
|
3150
|
+
* Mantenido por backwards-compat con código que importa `KdsSegmentedTabs`.
|
|
3151
|
+
* `KdsTabs` ahora ya renderiza directamente segmented (la única variante del DS).
|
|
3152
|
+
*/
|
|
3153
|
+
type KdsSegmentedTabsProps = KdsTabsProps;
|
|
3154
|
+
declare const KdsSegmentedTabs: React$1.ForwardRefExoticComponent<KdsTabsProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
3107
3155
|
|
|
3108
3156
|
interface KdsBankRowProps extends Omit<React__default.ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {
|
|
3109
3157
|
name: string;
|
|
@@ -3164,15 +3212,50 @@ interface KdsInvoiceStickyProps extends React__default.HTMLAttributes<HTMLDivEle
|
|
|
3164
3212
|
}
|
|
3165
3213
|
declare const KdsInvoiceSticky: React__default.ForwardRefExoticComponent<KdsInvoiceStickyProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
3166
3214
|
|
|
3215
|
+
/**
|
|
3216
|
+
* Khipu Design System - BottomSheet Component
|
|
3217
|
+
*
|
|
3218
|
+
* Bottom-sheet (modal que sube desde abajo en mobile, centrado en desktop) basado
|
|
3219
|
+
* en Radix Dialog. Único componente de modales del DS — `KdsModal` fue unificado aquí.
|
|
3220
|
+
*
|
|
3221
|
+
* Contrato HTML (matchea CSS `.kds-bottom-sheet*` de khipu-components.css):
|
|
3222
|
+
*
|
|
3223
|
+
* <div class="kds-bottom-sheet-scrim open">
|
|
3224
|
+
* <div class="kds-bottom-sheet">
|
|
3225
|
+
* <div class="kds-bottom-sheet-grabber" /> <!-- opcional -->
|
|
3226
|
+
* <button class="kds-bottom-sheet-close">X</button> <!-- opcional -->
|
|
3227
|
+
* <h2 class="kds-bottom-sheet-title">...</h2> <!-- opcional -->
|
|
3228
|
+
* <p class="kds-bottom-sheet-description">...</p> <!-- opcional -->
|
|
3229
|
+
* <div class="kds-bottom-sheet-body">children</div>
|
|
3230
|
+
* <div class="kds-bottom-sheet-actions">actions</div> <!-- opcional -->
|
|
3231
|
+
* </div>
|
|
3232
|
+
* </div>
|
|
3233
|
+
*
|
|
3234
|
+
* IMPORTANTE: el scrim DEBE llevar la clase `.open` SIEMPRE (Radix maneja mount/unmount).
|
|
3235
|
+
* Sin `.open`, el scrim queda `display: none` y no se ve.
|
|
3236
|
+
*/
|
|
3237
|
+
|
|
3167
3238
|
interface KdsBottomSheetProps {
|
|
3239
|
+
/** Controla la visibilidad. */
|
|
3168
3240
|
open: boolean;
|
|
3241
|
+
/** Callback cuando se debe cerrar (close button / ESC / click fuera). */
|
|
3169
3242
|
onClose: () => void;
|
|
3243
|
+
/** Título — renderiza `<h2 class="kds-bottom-sheet-title">`. */
|
|
3170
3244
|
title?: string;
|
|
3245
|
+
/** Descripción opcional bajo el título (`<p class="kds-bottom-sheet-description">`). */
|
|
3246
|
+
description?: string;
|
|
3247
|
+
/** Contenido del body. */
|
|
3171
3248
|
children: React__default.ReactNode;
|
|
3249
|
+
/** Botones de acción (footer). Renderiza dentro de `.kds-bottom-sheet-actions`. */
|
|
3172
3250
|
actions?: React__default.ReactNode;
|
|
3173
|
-
|
|
3174
|
-
|
|
3251
|
+
/** Mostrar grabber (handle) visual en el top. Default: true. */
|
|
3252
|
+
showGrabber?: boolean;
|
|
3253
|
+
/** Mostrar X de cierre en el top-right. Default: false. */
|
|
3254
|
+
showCloseButton?: boolean;
|
|
3255
|
+
/** Portal container — útil para Storybook o anchors específicos. */
|
|
3175
3256
|
container?: HTMLElement | null;
|
|
3257
|
+
/** Clase adicional al sheet. */
|
|
3258
|
+
className?: string;
|
|
3176
3259
|
}
|
|
3177
3260
|
declare const KdsBottomSheet: React__default.ForwardRefExoticComponent<KdsBottomSheetProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
3178
3261
|
|
|
@@ -3191,6 +3274,111 @@ interface KdsRecapListProps extends React__default.HTMLAttributes<HTMLUListEleme
|
|
|
3191
3274
|
}
|
|
3192
3275
|
declare const KdsRecapList: React__default.ForwardRefExoticComponent<KdsRecapListProps & React__default.RefAttributes<HTMLUListElement>>;
|
|
3193
3276
|
|
|
3277
|
+
interface KdsMontoRowProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
3278
|
+
/** Título principal (e.g. "Monto a transferir"). */
|
|
3279
|
+
title: string;
|
|
3280
|
+
/** Valor destacado (e.g. "$3.300"). */
|
|
3281
|
+
value: string;
|
|
3282
|
+
/**
|
|
3283
|
+
* Texto secundario opcional bajo el título (deadline/subtitle).
|
|
3284
|
+
* Acepta un nodo React para incluir line-breaks o formato.
|
|
3285
|
+
*/
|
|
3286
|
+
deadline?: React__default.ReactNode;
|
|
3287
|
+
}
|
|
3288
|
+
/**
|
|
3289
|
+
* KdsMontoRow — bloque destacado de monto con título + deadline opcional + valor.
|
|
3290
|
+
*
|
|
3291
|
+
* Layout (spec):
|
|
3292
|
+
* - `display: flex; justify-content: space-between`
|
|
3293
|
+
* - `padding: 14px 0 8px`
|
|
3294
|
+
* - `border-top: 1px dashed var(--kds-border-medium)`
|
|
3295
|
+
*
|
|
3296
|
+
* Tipografía:
|
|
3297
|
+
* - `.kds-monto-row-title`: `font-size: sm`, `font-weight: 500`
|
|
3298
|
+
* - `.kds-monto-row-deadline`: `font-size: xs`, `color: text-secondary`
|
|
3299
|
+
* - `.kds-monto-row-value`: `font-size: 24px`, `font-weight: 700`, `letter-spacing: tight`
|
|
3300
|
+
*
|
|
3301
|
+
* @gsp `_manualVerifyChileMaterial.gsp` y demás manualVerify
|
|
3302
|
+
* @css .kds-monto-row, .kds-monto-row-title, .kds-monto-row-deadline, .kds-monto-row-value
|
|
3303
|
+
*/
|
|
3304
|
+
declare const KdsMontoRow: React__default.ForwardRefExoticComponent<KdsMontoRowProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
3305
|
+
|
|
3306
|
+
interface KdsMerchantTileProps extends Omit<React__default.HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
3307
|
+
/** Nombre del merchant (usado para alt del logo o initials fallback). */
|
|
3308
|
+
name: string;
|
|
3309
|
+
/** URL del logo del merchant. Si está presente, renderiza `<img>` dentro del tile. */
|
|
3310
|
+
logoUrl?: string;
|
|
3311
|
+
/** Initials custom (2-3 letras). Si no se provee, usa las primeras 2 letras de `name`. */
|
|
3312
|
+
initials?: string;
|
|
3313
|
+
/** Variante compacta: 40×40 en vez de 56×56. */
|
|
3314
|
+
compact?: boolean;
|
|
3315
|
+
}
|
|
3316
|
+
/**
|
|
3317
|
+
* KdsMerchantTile — tile cuadrado con logo del comercio o initials.
|
|
3318
|
+
*
|
|
3319
|
+
* Layout (spec):
|
|
3320
|
+
* - `56 x 56` (default) / `40 x 40` (compact)
|
|
3321
|
+
* - `border-radius: var(--kds-radius-card)`
|
|
3322
|
+
* - `background: var(--kds-color-primary-deep)` (#5B3DB5)
|
|
3323
|
+
* - `color: white`, `display: grid; place-items: center`
|
|
3324
|
+
* - Initials: `font-size: xl` (20px), `font-weight: 700`, `letter-spacing: 0.02em`
|
|
3325
|
+
*
|
|
3326
|
+
* Variante logo:
|
|
3327
|
+
* - Agrega clase `.logo`, padding `var(--kds-spacing-0-5)` (4px)
|
|
3328
|
+
* - `<img>` interna: `object-fit: cover`, `border-radius: var(--kds-radius-md)`
|
|
3329
|
+
*
|
|
3330
|
+
* Compose with: este componente SOLO renderiza el tile cuadrado. Para el header
|
|
3331
|
+
* de comercio completo ("estás pagando a" + nombre), envolver en el patrón
|
|
3332
|
+
* `.kds-merchant`:
|
|
3333
|
+
* ```html
|
|
3334
|
+
* <div class="kds-merchant">
|
|
3335
|
+
* <!-- KdsMerchantTile → .kds-merchant-tile -->
|
|
3336
|
+
* <div class="kds-merchant-meta">
|
|
3337
|
+
* <span class="kds-merchant-label">Estás pagando a</span>
|
|
3338
|
+
* <strong>Comercial Santiago SpA</strong>
|
|
3339
|
+
* </div>
|
|
3340
|
+
* </div>
|
|
3341
|
+
* ```
|
|
3342
|
+
* Spacing canónico: `.kds-merchant` gap `var(--kds-spacing-1-75)`; label
|
|
3343
|
+
* `margin-bottom: var(--kds-spacing-0-25)`. Ver `Patterns/CSS-only → MerchantHeader`.
|
|
3344
|
+
*
|
|
3345
|
+
* @css .kds-merchant-tile, .kds-merchant-tile.logo, .kds-merchant.compact .kds-merchant-tile
|
|
3346
|
+
*/
|
|
3347
|
+
declare const KdsMerchantTile: React__default.ForwardRefExoticComponent<KdsMerchantTileProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
3348
|
+
|
|
3349
|
+
interface KdsBillAttachmentProps extends Omit<React__default.AnchorHTMLAttributes<HTMLAnchorElement>, 'children'> {
|
|
3350
|
+
/** Nombre del archivo a descargar. */
|
|
3351
|
+
filename: string;
|
|
3352
|
+
/** URL absoluta o relativa del archivo. */
|
|
3353
|
+
href: string;
|
|
3354
|
+
/** Icon Material Symbols. Default: `attach_file`. */
|
|
3355
|
+
icon?: string;
|
|
3356
|
+
}
|
|
3357
|
+
/**
|
|
3358
|
+
* KdsBillAttachment — link de descarga para adjuntos de la factura/bill.
|
|
3359
|
+
*
|
|
3360
|
+
* Layout (spec):
|
|
3361
|
+
* - `display: inline-flex; align-items: center; justify-content: flex-start`
|
|
3362
|
+
* - `width: fit-content`
|
|
3363
|
+
* - `color: var(--kds-color-info-main)`, `font-size: sm` (14px), `font-weight: 500`
|
|
3364
|
+
* - `text-decoration: none` → hover `underline` solo en el span
|
|
3365
|
+
* - Icon: `font-size: lg` (16px)
|
|
3366
|
+
*
|
|
3367
|
+
* @gsp `mat:billAttachments` taglib (introducida en commit 1a8e228c9)
|
|
3368
|
+
* @css .kds-bill-attachment, .kds-bill-attachments
|
|
3369
|
+
*/
|
|
3370
|
+
declare const KdsBillAttachment: React__default.ForwardRefExoticComponent<KdsBillAttachmentProps & React__default.RefAttributes<HTMLAnchorElement>>;
|
|
3371
|
+
interface KdsBillAttachmentsProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
3372
|
+
}
|
|
3373
|
+
/**
|
|
3374
|
+
* KdsBillAttachments — contenedor vertical de varios `KdsBillAttachment`.
|
|
3375
|
+
*
|
|
3376
|
+
* Layout (spec):
|
|
3377
|
+
* - `display: flex; flex-direction: column`
|
|
3378
|
+
* - `gap: var(--kds-spacing-0-75)` (6px)
|
|
3379
|
+
*/
|
|
3380
|
+
declare const KdsBillAttachments: React__default.ForwardRefExoticComponent<KdsBillAttachmentsProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
3381
|
+
|
|
3194
3382
|
declare function useCopyToClipboard(resetMs?: number): {
|
|
3195
3383
|
copied: boolean;
|
|
3196
3384
|
copy: (text: string) => Promise<void>;
|
|
@@ -3236,4 +3424,4 @@ declare function getContrastColor(hex: string): string;
|
|
|
3236
3424
|
*/
|
|
3237
3425
|
declare function lighten(hex: string, amount: number): string;
|
|
3238
3426
|
|
|
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,
|
|
3427
|
+
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, 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 };
|