@klu_dev/ui-klu-green 1.2.13 → 1.2.15

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/README.md CHANGED
@@ -998,4 +998,61 @@ export default BadgeContainer;
998
998
  | Prop | Tipo | Por Defecto | Descripción |
999
999
  | :--- | :--- | :--- | :--- |
1000
1000
  | `icon` | `React.ReactElement<{ className?: string }>` | *Requerido* | El elemento del icono a renderizar en formato JSX (ej: `<Icons.SEAL />`). Recibe de forma transparente las utilidades de tamaño asignadas por el contenedor. |
1001
- | `size` | `'sm' \| 'md' \| 'lg'` | `'sm'` | Define las dimensiones fijas en píxeles tanto del contenedor circular como del icono interior (`sm`: 24px/14px, `md`: 30px/20px, `lg`: 36px/26px). |
1001
+ | `size` | `'sm' \| 'md' \| 'lg'` | `'sm'` | Define las dimensiones fijas en píxeles tanto del contenedor circular como del icono interior (`sm`: 24px/14px, `md`: 30px/20px, `lg`: 36px/26px). |
1002
+
1003
+
1004
+
1005
+ ## Uso de DetailCard
1006
+ El componente DetailCard es una tarjeta de estado versátil y responsiva diseñada para mostrar resúmenes detallados de transacciones financieras o flujos operativos, soportando de forma dinámica los estados de éxito (Success) y error. Modifica su estructura visual de manera inteligente: en caso de éxito, oculta la descripción secundaria e integra una sección de "Comprobante de la transacción" con una liga de seguimiento copiable y un botón de descarga; en caso de error, renderiza un mensaje descriptivo formateado y adapta las acciones primarias para reintentar el proceso.
1007
+
1008
+ ```tsx
1009
+ import React from 'react';
1010
+ import { DetailCard } from './components/DetailCard';
1011
+
1012
+ const MyTransactionScreen = () => {
1013
+ const handlePrimary = () => console.log('Acción primaria ejecutada');
1014
+ const handleSecondary = () => console.log('Regresando al inicio');
1015
+
1016
+ const summaryData = [
1017
+ { label: 'Categoría:', value: 'Telefonía' },
1018
+ { label: 'Servicio:', value: 'Telcel' },
1019
+ { label: 'Comisión:', value: '$0.00' },
1020
+ { label: 'Monto total:', value: '$100.00' },
1021
+ { label: 'Fecha y Hora:', value: '24/06/2026 - 19:15 hrs' },
1022
+ { label: 'Número:', value: '+52 55 0000 0000' },
1023
+ ];
1024
+
1025
+ return (
1026
+ <div className="uiklu-p-6">
1027
+ {/* Ejemplo en Estado de Error */}
1028
+ <DetailCard
1029
+ type="error"
1030
+ title="¡Error de pago de servicio!"
1031
+ amount="$100.00"
1032
+ message={`Por el momento no pudimos realizar el pago del servicio solicitado.\nPor favor, inténtalo de nuevo.`}
1033
+ summaryItems={summaryData}
1034
+ onPrimaryAction={handlePrimary}
1035
+ onSecondaryAction={handleSecondary}
1036
+ />
1037
+ </div>
1038
+ );
1039
+ };
1040
+
1041
+ export default MyTransactionScreen;
1042
+ ```
1043
+
1044
+ ### Props de DetailCard
1045
+
1046
+ | Prop | Tipo | Por Defecto | Descripción |
1047
+ | :--- | :--- | :--- | :--- |
1048
+ | `type` | `'success' \| 'error'` | *Requerido* | Define el estado operativo del componente. Cambia el color del avatar circular superior, los textos por defecto de las acciones y habilita de forma condicionada los bloques de mensaje o liga de seguimiento. |
1049
+ | `title` | `string` | *Requerido* | Encabezado principal del estado del servicio que se renderiza debajo del icono (ej: "¡Pago de servicio realizado!"). |
1050
+ | `amount` | `string` | *Requerido* | El monto numérico formateado con divisa que protagoniza la tarjeta, destacado visualmente en un tamaño tipográfico dominante (40px). |
1051
+ | `message` | `string` | `undefined` | *Opcional.* Descripción detallada del suceso. Se muestra únicamente cuando `type="error"`. Soporta saltos de línea físicos mediante la propiedad de renderizado `pre-line`. |
1052
+ | `summaryTitle` | `string` | `'Resumen'` | Título secundario para la sección que encabeza el recuadro contenedor de datos descriptivos. |
1053
+ | `summaryItems` | `DetailCardItem[]` | *Requerido* | Colección de objetos con estructura `{ label: string; value: string }` que se listan ordenadamente dentro del contenedor asimétrico central. |
1054
+ | `trackingUrl` | `string` | `undefined` | *Opcional.* URL de la pasarela o folio de seguimiento de la operación. Habilita de manera condicionada el bloque interactivo de "Comprobante de la transacción" y la acción de copiar al portapapeles solo si `type="success"`. |
1055
+ | `primaryButtonText` | `string` | *Dinámico* | Texto del botón de acción principal. Si no se provee, se autoajusta a "Descargar comprobante" para casos exitosos o "Intentarlo nuevamente" para flujos con error. |
1056
+ | `secondaryButtonText`| `string` | `'Ir al inicio'` | Texto del botón secundario de contorno que permite la navegación de retorno o salida del flujo. |
1057
+ | `onPrimaryAction` | `() => void` | *Requerido* | Función callback disparada al hacer clic en el botón de acción principal (Descarga / Reintento). |
1058
+ | `onSecondaryAction` | `() => void` | *Requerido* | Función callback disparada al hacer clic en el botón de salida secundario. |
package/dist/index.css CHANGED
@@ -161,6 +161,7 @@
161
161
  --uiklu-warningbg: 44 100% 96%;
162
162
  --uiklu-warningborder: 4 98% 89%;
163
163
  --uiklu-warningtext: 32 92% 53%;
164
+ --uiklu-errorbg: 4 100% 68%;
164
165
 
165
166
  }
166
167
  .uiklu-mask-content {
@@ -219,6 +220,10 @@ button,
219
220
  .uiklu-bottom-full{
220
221
  bottom: 100%;
221
222
 
223
+ }
224
+ .uiklu-left-0{
225
+ left: 0px;
226
+
222
227
  }
223
228
  .uiklu-left-3{
224
229
  left: 0.75rem;
@@ -302,6 +307,11 @@ button,
302
307
  margin-top: 0.5rem;
303
308
  margin-bottom: 0.5rem;
304
309
 
310
+ }
311
+ .uiklu-my-\[20px\]{
312
+ margin-top: 20px;
313
+ margin-bottom: 20px;
314
+
305
315
  }
306
316
  .uiklu-mb-1{
307
317
  margin-bottom: 0.25rem;
@@ -338,6 +348,10 @@ button,
338
348
  .uiklu-mb-\[18px\]{
339
349
  margin-bottom: 18px;
340
350
 
351
+ }
352
+ .uiklu-mb-\[20px\]{
353
+ margin-bottom: 20px;
354
+
341
355
  }
342
356
  .uiklu-mb-\[8px\]{
343
357
  margin-bottom: 8px;
@@ -482,6 +496,10 @@ button,
482
496
  .uiklu-h-\[26px\]{
483
497
  height: 26px;
484
498
 
499
+ }
500
+ .uiklu-h-\[28px\]{
501
+ height: 28px;
502
+
485
503
  }
486
504
  .uiklu-h-\[30px\]{
487
505
  height: 30px;
@@ -506,6 +524,10 @@ button,
506
524
  .uiklu-h-\[44px\]{
507
525
  height: 44px;
508
526
 
527
+ }
528
+ .uiklu-h-\[45\.5px\]{
529
+ height: 45.5px;
530
+
509
531
  }
510
532
  .uiklu-h-\[4px\]{
511
533
  height: 4px;
@@ -514,6 +536,10 @@ button,
514
536
  .uiklu-h-\[50px\]{
515
537
  height: 50px;
516
538
 
539
+ }
540
+ .uiklu-h-\[56px\]{
541
+ height: 56px;
542
+
517
543
  }
518
544
  .uiklu-h-\[60px\]{
519
545
  height: 60px;
@@ -526,6 +552,10 @@ button,
526
552
  .uiklu-h-\[70px\]{
527
553
  height: 70px;
528
554
 
555
+ }
556
+ .uiklu-h-\[80px\]{
557
+ height: 80px;
558
+
529
559
  }
530
560
  .uiklu-h-auto{
531
561
  height: auto;
@@ -602,6 +632,10 @@ button,
602
632
  .uiklu-w-8{
603
633
  width: 2rem;
604
634
 
635
+ }
636
+ .uiklu-w-\[140px\]{
637
+ width: 140px;
638
+
605
639
  }
606
640
  .uiklu-w-\[141px\]{
607
641
  width: 141px;
@@ -674,14 +708,26 @@ button,
674
708
  .uiklu-w-\[40px\]{
675
709
  width: 40px;
676
710
 
711
+ }
712
+ .uiklu-w-\[45\.5px\]{
713
+ width: 45.5px;
714
+
677
715
  }
678
716
  .uiklu-w-\[450px\]{
679
717
  width: 450px;
680
718
 
719
+ }
720
+ .uiklu-w-\[516px\]{
721
+ width: 516px;
722
+
681
723
  }
682
724
  .uiklu-w-\[550px\]{
683
725
  width: 550px;
684
726
 
727
+ }
728
+ .uiklu-w-\[56px\]{
729
+ width: 56px;
730
+
685
731
  }
686
732
  .uiklu-w-\[600px\]{
687
733
  width: 600px;
@@ -694,10 +740,18 @@ button,
694
740
  .uiklu-w-\[75px\]{
695
741
  width: 75px;
696
742
 
743
+ }
744
+ .uiklu-w-\[80px\]{
745
+ width: 80px;
746
+
697
747
  }
698
748
  .uiklu-w-\[var\(--radix-select-trigger-width\)\]{
699
749
  width: var(--radix-select-trigger-width);
700
750
 
751
+ }
752
+ .uiklu-w-auto{
753
+ width: auto;
754
+
701
755
  }
702
756
  .uiklu-w-fit{
703
757
  width: -moz-fit-content;
@@ -967,6 +1021,10 @@ button,
967
1021
  .uiklu-gap-8{
968
1022
  gap: 2rem;
969
1023
 
1024
+ }
1025
+ .uiklu-gap-\[10px\]{
1026
+ gap: 10px;
1027
+
970
1028
  }
971
1029
  .uiklu-gap-\[14px\]{
972
1030
  gap: 14px;
@@ -979,6 +1037,10 @@ button,
979
1037
  .uiklu-gap-\[2px\]{
980
1038
  gap: 2px;
981
1039
 
1040
+ }
1041
+ .uiklu-gap-\[8px\]{
1042
+ gap: 8px;
1043
+
982
1044
  }
983
1045
  .uiklu-gap-x-1\.5{
984
1046
  -moz-column-gap: 0.375rem;
@@ -1033,6 +1095,10 @@ button,
1033
1095
  .uiklu-self-center{
1034
1096
  align-self: center;
1035
1097
 
1098
+ }
1099
+ .uiklu-self-stretch{
1100
+ align-self: stretch;
1101
+
1036
1102
  }
1037
1103
  .uiklu-overflow-hidden{
1038
1104
  overflow: hidden;
@@ -1240,6 +1306,11 @@ button,
1240
1306
  --tw-border-opacity: 1;
1241
1307
  border-color: hsl(var(--uiklu-primary-50) / var(--tw-border-opacity, 1));
1242
1308
 
1309
+ }
1310
+ .uiklu-border-primary500{
1311
+ --tw-border-opacity: 1;
1312
+ border-color: hsl(var(--uiklu-primary-500) / var(--tw-border-opacity, 1));
1313
+
1243
1314
  }
1244
1315
  .uiklu-border-primary900{
1245
1316
  --tw-border-opacity: 1;
@@ -1326,6 +1397,11 @@ button,
1326
1397
  --tw-bg-opacity: 1;
1327
1398
  background-color: hsl(var(--uiklu-destructive) / var(--tw-bg-opacity, 1));
1328
1399
 
1400
+ }
1401
+ .uiklu-bg-errorbg{
1402
+ --tw-bg-opacity: 1;
1403
+ background-color: hsl(var(--uiklu-errorbg) / var(--tw-bg-opacity, 1));
1404
+
1329
1405
  }
1330
1406
  .uiklu-bg-gray-200{
1331
1407
  --tw-bg-opacity: 1;
@@ -1549,6 +1625,10 @@ button,
1549
1625
  .uiklu-p-\[14px\]{
1550
1626
  padding: 14px;
1551
1627
 
1628
+ }
1629
+ .uiklu-p-\[16px\]{
1630
+ padding: 16px;
1631
+
1552
1632
  }
1553
1633
  .uiklu-p-\[6px\]{
1554
1634
  padding: 6px;
@@ -1598,6 +1678,11 @@ button,
1598
1678
  padding-left: 10px;
1599
1679
  padding-right: 10px;
1600
1680
 
1681
+ }
1682
+ .uiklu-px-\[12px\]{
1683
+ padding-left: 12px;
1684
+ padding-right: 12px;
1685
+
1601
1686
  }
1602
1687
  .uiklu-px-\[16px\]{
1603
1688
  padding-left: 16px;
@@ -1643,6 +1728,11 @@ button,
1643
1728
  padding-top: 0.75rem;
1644
1729
  padding-bottom: 0.75rem;
1645
1730
 
1731
+ }
1732
+ .uiklu-py-\[4px\]{
1733
+ padding-top: 4px;
1734
+ padding-bottom: 4px;
1735
+
1646
1736
  }
1647
1737
  .uiklu-pb-4{
1648
1738
  padding-bottom: 1rem;
@@ -1778,6 +1868,10 @@ button,
1778
1868
  .uiklu-text-\[32px\]{
1779
1869
  font-size: 32px;
1780
1870
 
1871
+ }
1872
+ .uiklu-text-\[40px\]{
1873
+ font-size: 40px;
1874
+
1781
1875
  }
1782
1876
  .uiklu-text-\[8px\]{
1783
1877
  font-size: 8px;
@@ -2006,6 +2100,11 @@ button,
2006
2100
  --tw-text-opacity: 1;
2007
2101
  color: hsl(var(--uiklu-primary-400) / var(--tw-text-opacity, 1));
2008
2102
 
2103
+ }
2104
+ .uiklu-text-primary500{
2105
+ --tw-text-opacity: 1;
2106
+ color: hsl(var(--uiklu-primary-500) / var(--tw-text-opacity, 1));
2107
+
2009
2108
  }
2010
2109
  .uiklu-text-primary600{
2011
2110
  --tw-text-opacity: 1;
@@ -2135,6 +2234,16 @@ button,
2135
2234
  .uiklu-ring-foreground\/10{
2136
2235
  --tw-ring-color: hsl(var(--uiklu-foreground) / 0.1);
2137
2236
 
2237
+ }
2238
+ .uiklu-brightness-0{
2239
+ --tw-brightness: brightness(0);
2240
+ filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
2241
+
2242
+ }
2243
+ .uiklu-invert{
2244
+ --tw-invert: invert(100%);
2245
+ filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
2246
+
2138
2247
  }
2139
2248
  .uiklu-backdrop-blur-md{
2140
2249
  --tw-backdrop-blur: blur(12px);
@@ -2276,6 +2385,12 @@ input.uiklu-flex:not(:placeholder-shown) {
2276
2385
 
2277
2386
  }
2278
2387
 
2388
+ .hover\:uiklu-bg-basewhite:hover{
2389
+ --tw-bg-opacity: 1;
2390
+ background-color: hsl(var(--uiklu-basewhite) / var(--tw-bg-opacity, 1));
2391
+
2392
+ }
2393
+
2279
2394
  .hover\:uiklu-bg-gray-100:hover{
2280
2395
  --tw-bg-opacity: 1;
2281
2396
  background-color: rgb(243 244 246 / var(--tw-bg-opacity, 1));
package/dist/index.d.ts CHANGED
@@ -179,6 +179,25 @@ declare const Icons: {
179
179
  BOOKMARK: react_jsx_runtime.JSX.Element;
180
180
  EDIT: react_jsx_runtime.JSX.Element;
181
181
  DELETE: react_jsx_runtime.JSX.Element;
182
+ TELCEL: react_jsx_runtime.JSX.Element;
183
+ ATT: react_jsx_runtime.JSX.Element;
184
+ MOVISTAR: react_jsx_runtime.JSX.Element;
185
+ IAVE: react_jsx_runtime.JSX.Element;
186
+ PASE: react_jsx_runtime.JSX.Element;
187
+ MCIUDAD: react_jsx_runtime.JSX.Element;
188
+ CFE: react_jsx_runtime.JSX.Element;
189
+ GASN: react_jsx_runtime.JSX.Element;
190
+ TELMEX: react_jsx_runtime.JSX.Element;
191
+ DISH: react_jsx_runtime.JSX.Element;
192
+ SKY: react_jsx_runtime.JSX.Element;
193
+ MEGA: react_jsx_runtime.JSX.Element;
194
+ TOTALP: react_jsx_runtime.JSX.Element;
195
+ IZZI: react_jsx_runtime.JSX.Element;
196
+ XBOX: react_jsx_runtime.JSX.Element;
197
+ CALIENTE: react_jsx_runtime.JSX.Element;
198
+ WARNING: react_jsx_runtime.JSX.Element;
199
+ CHECK: react_jsx_runtime.JSX.Element;
200
+ DOWNLOAD: react_jsx_runtime.JSX.Element;
182
201
  };
183
202
 
184
203
  declare const searchSelectTriggerVariants: (props?: ({
@@ -252,4 +271,23 @@ interface IconBadgeProps {
252
271
  }
253
272
  declare const IconBadge: React.FC<IconBadgeProps>;
254
273
 
255
- export { BackButton, BalanceInfo, Button, Checkbox, type CheckboxProps, GridCard, IconBadge, type IconBadgeProps, Icons, Input, InputCode, InputPhone, type InputPhoneProps, type LadaOption, LoadingScreen, MobileMenuDrawer, Modal, PromoBanner, SearchSelect, Select, SidebarTabs, ToastAction, Toaster, Typography, useToast };
274
+ interface DetailCardItem {
275
+ label: string;
276
+ value: string;
277
+ }
278
+ interface DetailCardProps {
279
+ type: 'success' | 'error';
280
+ title: string;
281
+ amount: string;
282
+ message?: string;
283
+ summaryTitle?: string;
284
+ summaryItems: DetailCardItem[];
285
+ trackingUrl?: string;
286
+ primaryButtonText?: string;
287
+ secondaryButtonText?: string;
288
+ onPrimaryAction: () => void;
289
+ onSecondaryAction: () => void;
290
+ }
291
+ declare const DetailCard: React__default.FC<DetailCardProps>;
292
+
293
+ export { BackButton, BalanceInfo, Button, Checkbox, type CheckboxProps, DetailCard, type DetailCardItem, type DetailCardProps, GridCard, IconBadge, type IconBadgeProps, Icons, Input, InputCode, InputPhone, type InputPhoneProps, type LadaOption, LoadingScreen, MobileMenuDrawer, Modal, PromoBanner, SearchSelect, Select, SidebarTabs, ToastAction, Toaster, Typography, useToast };