@khipu/design-system 0.2.0-alpha.24 → 0.2.0-alpha.26

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.
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@khipu/design-system/beercss",
3
- "version": "0.2.0-alpha.24",
3
+ "version": "0.2.0-alpha.26",
4
4
  "description": "Khipu BeerCSS bundle with Material Design 3 and Khipu customizations",
5
- "buildDate": "2026-05-27T17:53:27.253Z",
5
+ "buildDate": "2026-05-28T19:59:11.921Z",
6
6
  "includes": {
7
7
  "beercss": "4.0.1",
8
8
  "khipu-tokens": "latest",
@@ -16,7 +16,7 @@
16
16
  "jsUnminified": "khipu-beercss.js"
17
17
  },
18
18
  "cdn": {
19
- "css": "https://cdn.jsdelivr.net/npm/@khipu/design-system@0.2.0-alpha.24/dist/beercss/khipu-beercss.min.css",
20
- "js": "https://cdn.jsdelivr.net/npm/@khipu/design-system@0.2.0-alpha.24/dist/beercss/khipu-beercss.min.js"
19
+ "css": "https://cdn.jsdelivr.net/npm/@khipu/design-system@0.2.0-alpha.26/dist/beercss/khipu-beercss.min.css",
20
+ "js": "https://cdn.jsdelivr.net/npm/@khipu/design-system@0.2.0-alpha.26/dist/beercss/khipu-beercss.min.js"
21
21
  }
22
22
  }
package/dist/index.d.mts CHANGED
@@ -238,6 +238,7 @@ declare const colors: {
238
238
  main: string;
239
239
  light: string;
240
240
  dark: string;
241
+ warm: string;
241
242
  container: string;
242
243
  contrastText: string;
243
244
  };
@@ -254,6 +255,7 @@ declare const colors: {
254
255
  main: string;
255
256
  light: string;
256
257
  dark: string;
258
+ blue: string;
257
259
  container: string;
258
260
  contrastText: string;
259
261
  };
@@ -375,6 +377,7 @@ declare const fontSizes: {
375
377
  readonly '2xl': "1.5rem";
376
378
  readonly '3xl': "1.875rem";
377
379
  readonly '4xl': "2.25rem";
380
+ readonly decimalSup: "0.5em";
378
381
  };
379
382
  declare const lineHeights: {
380
383
  readonly tight: 1.2;
@@ -693,6 +696,7 @@ declare const tokensByMode: {
693
696
  main: string;
694
697
  light: string;
695
698
  dark: string;
699
+ warm: string;
696
700
  container: string;
697
701
  contrastText: string;
698
702
  };
@@ -709,6 +713,7 @@ declare const tokensByMode: {
709
713
  main: string;
710
714
  light: string;
711
715
  dark: string;
716
+ blue: string;
712
717
  container: string;
713
718
  contrastText: string;
714
719
  };
@@ -830,6 +835,7 @@ declare const tokensByMode: {
830
835
  readonly '2xl': "1.5rem";
831
836
  readonly '3xl': "1.875rem";
832
837
  readonly '4xl': "2.25rem";
838
+ readonly decimalSup: "0.5em";
833
839
  };
834
840
  readonly lineHeights: {
835
841
  readonly tight: 1.2;
@@ -1284,6 +1290,7 @@ declare const tokensByMode: {
1284
1290
  main: string;
1285
1291
  light: string;
1286
1292
  dark: string;
1293
+ warm: string;
1287
1294
  container: string;
1288
1295
  contrastText: string;
1289
1296
  };
@@ -1300,6 +1307,7 @@ declare const tokensByMode: {
1300
1307
  main: string;
1301
1308
  light: string;
1302
1309
  dark: string;
1310
+ blue: string;
1303
1311
  container: string;
1304
1312
  contrastText: string;
1305
1313
  };
@@ -1419,6 +1427,7 @@ declare const tokensByMode: {
1419
1427
  readonly '2xl': "1.5rem";
1420
1428
  readonly '3xl': "1.875rem";
1421
1429
  readonly '4xl': "2.25rem";
1430
+ readonly decimalSup: "0.5em";
1422
1431
  };
1423
1432
  readonly lineHeights: {
1424
1433
  readonly tight: 1.2;
@@ -1880,6 +1889,7 @@ declare const tokens: {
1880
1889
  main: string;
1881
1890
  light: string;
1882
1891
  dark: string;
1892
+ warm: string;
1883
1893
  container: string;
1884
1894
  contrastText: string;
1885
1895
  };
@@ -1896,6 +1906,7 @@ declare const tokens: {
1896
1906
  main: string;
1897
1907
  light: string;
1898
1908
  dark: string;
1909
+ blue: string;
1899
1910
  container: string;
1900
1911
  contrastText: string;
1901
1912
  };
@@ -2017,6 +2028,7 @@ declare const tokens: {
2017
2028
  readonly '2xl': "1.5rem";
2018
2029
  readonly '3xl': "1.875rem";
2019
2030
  readonly '4xl': "2.25rem";
2031
+ readonly decimalSup: "0.5em";
2020
2032
  };
2021
2033
  readonly lineHeights: {
2022
2034
  readonly tight: 1.2;
@@ -3346,6 +3358,105 @@ interface KdsMerchantTileProps extends Omit<React__default.HTMLAttributes<HTMLDi
3346
3358
  */
3347
3359
  declare const KdsMerchantTile: React__default.ForwardRefExoticComponent<KdsMerchantTileProps & React__default.RefAttributes<HTMLDivElement>>;
3348
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
+
3349
3460
  interface KdsBillAttachmentProps extends Omit<React__default.AnchorHTMLAttributes<HTMLAnchorElement>, 'children'> {
3350
3461
  /** Nombre del archivo a descargar. */
3351
3462
  filename: string;
@@ -3424,4 +3535,4 @@ declare function getContrastColor(hex: string): string;
3424
3535
  */
3425
3536
  declare function lighten(hex: string, amount: number): string;
3426
3537
 
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 };
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 };
package/dist/index.d.ts CHANGED
@@ -238,6 +238,7 @@ declare const colors: {
238
238
  main: string;
239
239
  light: string;
240
240
  dark: string;
241
+ warm: string;
241
242
  container: string;
242
243
  contrastText: string;
243
244
  };
@@ -254,6 +255,7 @@ declare const colors: {
254
255
  main: string;
255
256
  light: string;
256
257
  dark: string;
258
+ blue: string;
257
259
  container: string;
258
260
  contrastText: string;
259
261
  };
@@ -375,6 +377,7 @@ declare const fontSizes: {
375
377
  readonly '2xl': "1.5rem";
376
378
  readonly '3xl': "1.875rem";
377
379
  readonly '4xl': "2.25rem";
380
+ readonly decimalSup: "0.5em";
378
381
  };
379
382
  declare const lineHeights: {
380
383
  readonly tight: 1.2;
@@ -693,6 +696,7 @@ declare const tokensByMode: {
693
696
  main: string;
694
697
  light: string;
695
698
  dark: string;
699
+ warm: string;
696
700
  container: string;
697
701
  contrastText: string;
698
702
  };
@@ -709,6 +713,7 @@ declare const tokensByMode: {
709
713
  main: string;
710
714
  light: string;
711
715
  dark: string;
716
+ blue: string;
712
717
  container: string;
713
718
  contrastText: string;
714
719
  };
@@ -830,6 +835,7 @@ declare const tokensByMode: {
830
835
  readonly '2xl': "1.5rem";
831
836
  readonly '3xl': "1.875rem";
832
837
  readonly '4xl': "2.25rem";
838
+ readonly decimalSup: "0.5em";
833
839
  };
834
840
  readonly lineHeights: {
835
841
  readonly tight: 1.2;
@@ -1284,6 +1290,7 @@ declare const tokensByMode: {
1284
1290
  main: string;
1285
1291
  light: string;
1286
1292
  dark: string;
1293
+ warm: string;
1287
1294
  container: string;
1288
1295
  contrastText: string;
1289
1296
  };
@@ -1300,6 +1307,7 @@ declare const tokensByMode: {
1300
1307
  main: string;
1301
1308
  light: string;
1302
1309
  dark: string;
1310
+ blue: string;
1303
1311
  container: string;
1304
1312
  contrastText: string;
1305
1313
  };
@@ -1419,6 +1427,7 @@ declare const tokensByMode: {
1419
1427
  readonly '2xl': "1.5rem";
1420
1428
  readonly '3xl': "1.875rem";
1421
1429
  readonly '4xl': "2.25rem";
1430
+ readonly decimalSup: "0.5em";
1422
1431
  };
1423
1432
  readonly lineHeights: {
1424
1433
  readonly tight: 1.2;
@@ -1880,6 +1889,7 @@ declare const tokens: {
1880
1889
  main: string;
1881
1890
  light: string;
1882
1891
  dark: string;
1892
+ warm: string;
1883
1893
  container: string;
1884
1894
  contrastText: string;
1885
1895
  };
@@ -1896,6 +1906,7 @@ declare const tokens: {
1896
1906
  main: string;
1897
1907
  light: string;
1898
1908
  dark: string;
1909
+ blue: string;
1899
1910
  container: string;
1900
1911
  contrastText: string;
1901
1912
  };
@@ -2017,6 +2028,7 @@ declare const tokens: {
2017
2028
  readonly '2xl': "1.5rem";
2018
2029
  readonly '3xl': "1.875rem";
2019
2030
  readonly '4xl': "2.25rem";
2031
+ readonly decimalSup: "0.5em";
2020
2032
  };
2021
2033
  readonly lineHeights: {
2022
2034
  readonly tight: 1.2;
@@ -3346,6 +3358,105 @@ interface KdsMerchantTileProps extends Omit<React__default.HTMLAttributes<HTMLDi
3346
3358
  */
3347
3359
  declare const KdsMerchantTile: React__default.ForwardRefExoticComponent<KdsMerchantTileProps & React__default.RefAttributes<HTMLDivElement>>;
3348
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
+
3349
3460
  interface KdsBillAttachmentProps extends Omit<React__default.AnchorHTMLAttributes<HTMLAnchorElement>, 'children'> {
3350
3461
  /** Nombre del archivo a descargar. */
3351
3462
  filename: string;
@@ -3424,4 +3535,4 @@ declare function getContrastColor(hex: string): string;
3424
3535
  */
3425
3536
  declare function lighten(hex: string, amount: number): string;
3426
3537
 
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 };
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 };
package/dist/index.js CHANGED
@@ -58,6 +58,7 @@ __export(index_exports, {
58
58
  KdsLinearProgress: () => KdsLinearProgress,
59
59
  KdsMerchantTile: () => KdsMerchantTile,
60
60
  KdsMontoRow: () => KdsMontoRow,
61
+ KdsPaymentTotal: () => KdsPaymentTotal,
61
62
  KdsQrRow: () => KdsQrRow,
62
63
  KdsRadioGroup: () => KdsRadioGroup,
63
64
  KdsRecapList: () => KdsRecapList,
@@ -452,6 +453,8 @@ var semanticColors = {
452
453
  // From Figma: warning/light
453
454
  dark: "#E65100",
454
455
  // From Figma: warning/dark
456
+ warm: "#8A6D1A",
457
+ // Warm/olive variant for header icons (LigoPay handoff v2)
455
458
  container: "#FFFBEB",
456
459
  // Light amber background for chips/badges
457
460
  contrastText: "#FFFFFF"
@@ -470,6 +473,8 @@ var semanticColors = {
470
473
  main: "#0288D1",
471
474
  light: "#03A9F4",
472
475
  dark: "#01579B",
476
+ blue: "#5A5FE0",
477
+ // Khipu-blue / LigoPay informational blue (distinct from cyan main)
473
478
  container: "#EFF6FF",
474
479
  // Light blue background for chips/badges
475
480
  contrastText: "#FFFFFF"
@@ -512,8 +517,10 @@ var fontSizes = {
512
517
  // 24px
513
518
  "3xl": "1.875rem",
514
519
  // 30px
515
- "4xl": "2.25rem"
520
+ "4xl": "2.25rem",
516
521
  // 36px
522
+ decimalSup: "0.5em"
523
+ // Relative size for decimal superscript in amount displays
517
524
  };
518
525
  var lineHeights = {
519
526
  tight: 1.2,
@@ -2286,11 +2293,87 @@ var KdsMerchantTile = (0, import_react39.forwardRef)(
2286
2293
  );
2287
2294
  KdsMerchantTile.displayName = "KdsMerchantTile";
2288
2295
 
2289
- // src/components/domain/KdsBillAttachment/KdsBillAttachment.tsx
2296
+ // src/components/domain/KdsPaymentTotal/KdsPaymentTotal.tsx
2290
2297
  var import_react40 = require("react");
2291
2298
  var import_jsx_runtime38 = require("react/jsx-runtime");
2292
- var KdsBillAttachment = (0, import_react40.forwardRef)(
2293
- ({ filename, href, icon = "attach_file", className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
2299
+ var KdsPaymentTotal = (0, import_react40.forwardRef)(
2300
+ ({
2301
+ variant = "default",
2302
+ tone = "brand",
2303
+ centered = false,
2304
+ amount,
2305
+ currency = "S/",
2306
+ decimals = 2,
2307
+ locale = "es-PE",
2308
+ label = "Monto a pagar",
2309
+ title = "Escanea el QR",
2310
+ titleMobile = "Descarga el QR",
2311
+ className,
2312
+ ...props
2313
+ }, ref) => {
2314
+ const { integer, fraction } = formatAmount(amount, decimals, locale);
2315
+ const isEmail = variant === "email";
2316
+ const isInfoTone = tone === "info";
2317
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
2318
+ "div",
2319
+ {
2320
+ ref,
2321
+ className: (0, import_clsx.clsx)(
2322
+ "kds-payment-total",
2323
+ isEmail && "kds-payment-total--email",
2324
+ isInfoTone && "kds-payment-total--tone-info",
2325
+ centered && "kds-payment-total--centered",
2326
+ className
2327
+ ),
2328
+ ...props,
2329
+ children: [
2330
+ !isEmail && title != null && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("h5", { className: "kds-payment-total-title", children: title }),
2331
+ !isEmail && titleMobile != null && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("h5", { className: "kds-payment-total-title-mobile", children: titleMobile }),
2332
+ label != null && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("h6", { className: "kds-payment-label", children: label }),
2333
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("h5", { className: "kds-payment-amount", children: [
2334
+ currency,
2335
+ " ",
2336
+ integer,
2337
+ fraction !== null && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("sup", { className: "kds-payment-total-decimal-sup", children: fraction })
2338
+ ] })
2339
+ ]
2340
+ }
2341
+ );
2342
+ }
2343
+ );
2344
+ KdsPaymentTotal.displayName = "KdsPaymentTotal";
2345
+ function formatAmount(amount, decimals, locale) {
2346
+ const showDecimals = typeof decimals === "number" && decimals > 0;
2347
+ if (typeof amount === "number") {
2348
+ if (showDecimals) {
2349
+ const fixed = amount.toFixed(decimals);
2350
+ const [int, frac] = fixed.split(".");
2351
+ const formattedInt2 = new Intl.NumberFormat(locale, { maximumFractionDigits: 0 }).format(
2352
+ Number(int)
2353
+ );
2354
+ return { integer: formattedInt2, fraction: frac ?? null };
2355
+ }
2356
+ const formattedInt = new Intl.NumberFormat(locale, { maximumFractionDigits: 0 }).format(
2357
+ Math.trunc(amount)
2358
+ );
2359
+ return { integer: formattedInt, fraction: null };
2360
+ }
2361
+ const str = amount.trim();
2362
+ const dotIdx = str.indexOf(".");
2363
+ if (dotIdx === -1 || !showDecimals) {
2364
+ return { integer: str, fraction: null };
2365
+ }
2366
+ return {
2367
+ integer: str.slice(0, dotIdx),
2368
+ fraction: str.slice(dotIdx + 1)
2369
+ };
2370
+ }
2371
+
2372
+ // src/components/domain/KdsBillAttachment/KdsBillAttachment.tsx
2373
+ var import_react41 = require("react");
2374
+ var import_jsx_runtime39 = require("react/jsx-runtime");
2375
+ var KdsBillAttachment = (0, import_react41.forwardRef)(
2376
+ ({ filename, href, icon = "attach_file", className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
2294
2377
  "a",
2295
2378
  {
2296
2379
  ref,
@@ -2300,15 +2383,15 @@ var KdsBillAttachment = (0, import_react40.forwardRef)(
2300
2383
  className: (0, import_clsx.clsx)("kds-bill-attachment", className),
2301
2384
  ...props,
2302
2385
  children: [
2303
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("i", { className: "material-symbols-outlined", children: icon }),
2304
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { children: filename })
2386
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("i", { className: "material-symbols-outlined", children: icon }),
2387
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { children: filename })
2305
2388
  ]
2306
2389
  }
2307
2390
  )
2308
2391
  );
2309
2392
  KdsBillAttachment.displayName = "KdsBillAttachment";
2310
- var KdsBillAttachments = (0, import_react40.forwardRef)(
2311
- ({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { ref, className: (0, import_clsx.clsx)("kds-bill-attachments", className), ...props, children })
2393
+ var KdsBillAttachments = (0, import_react41.forwardRef)(
2394
+ ({ children, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { ref, className: (0, import_clsx.clsx)("kds-bill-attachments", className), ...props, children })
2312
2395
  );
2313
2396
  KdsBillAttachments.displayName = "KdsBillAttachments";
2314
2397
  // Annotate the CommonJS export names for ESM import in node:
@@ -2341,6 +2424,7 @@ KdsBillAttachments.displayName = "KdsBillAttachments";
2341
2424
  KdsLinearProgress,
2342
2425
  KdsMerchantTile,
2343
2426
  KdsMontoRow,
2427
+ KdsPaymentTotal,
2344
2428
  KdsQrRow,
2345
2429
  KdsRadioGroup,
2346
2430
  KdsRecapList,