@klu_dev/ui-klu-green 1.2.14 → 1.2.16

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/index.js CHANGED
@@ -1370,6 +1370,96 @@ var CALIENTE = ({ className }) => /* @__PURE__ */ jsx7(
1370
1370
  )
1371
1371
  }
1372
1372
  );
1373
+ var WARNING = ({ className }) => /* @__PURE__ */ jsx7(
1374
+ "svg",
1375
+ {
1376
+ xmlns: "http://www.w3.org/2000/svg",
1377
+ width: "56",
1378
+ height: "56",
1379
+ viewBox: "0 0 56 56",
1380
+ fill: "none",
1381
+ className,
1382
+ style: {
1383
+ display: "flex",
1384
+ width: "56px",
1385
+ height: "56px",
1386
+ justifyContent: "center",
1387
+ alignItems: "center",
1388
+ aspectRatio: "1/1"
1389
+ },
1390
+ children: /* @__PURE__ */ jsx7(
1391
+ "path",
1392
+ {
1393
+ d: "M22.75 0C18.2505 0 13.852 1.33426 10.1108 3.83407C6.36957 6.33387 3.45364 9.88693 1.73175 14.044C0.00985722 18.201 -0.440669 22.7752 0.437145 27.1883C1.31496 31.6014 3.48169 35.655 6.66333 38.8367C9.84497 42.0183 13.8986 44.185 18.3117 45.0629C22.7248 45.9407 27.299 45.4901 31.4561 43.7683C35.6131 42.0464 39.1661 39.1304 41.6659 35.3892C44.1657 31.648 45.5 27.2495 45.5 22.75C45.4936 16.7183 43.0947 10.9354 38.8297 6.67035C34.5646 2.40528 28.7817 0.0063696 22.75 0ZM22.75 42C18.9427 42 15.2209 40.871 12.0553 38.7558C8.88964 36.6406 6.42232 33.6341 4.96533 30.1167C3.50834 26.5992 3.12713 22.7286 3.86989 18.9945C4.61266 15.2604 6.44604 11.8304 9.1382 9.13819C11.8304 6.44603 15.2604 4.61265 18.9945 3.86988C22.7287 3.12712 26.5992 3.50833 30.1167 4.96532C33.6341 6.42231 36.6406 8.88963 38.7558 12.0553C40.871 15.2209 42 18.9427 42 22.75C41.9942 27.8536 39.9642 32.7466 36.3554 36.3554C32.7466 39.9642 27.8536 41.9942 22.75 42ZM21 24.5V12.25C21 11.7859 21.1844 11.3408 21.5126 11.0126C21.8408 10.6844 22.2859 10.5 22.75 10.5C23.2141 10.5 23.6593 10.6844 23.9874 11.0126C24.3156 11.3408 24.5 11.7859 24.5 12.25V24.5C24.5 24.9641 24.3156 25.4092 23.9874 25.7374C23.6593 26.0656 23.2141 26.25 22.75 26.25C22.2859 26.25 21.8408 26.0656 21.5126 25.7374C21.1844 25.4092 21 24.9641 21 24.5ZM25.375 32.375C25.375 32.8942 25.2211 33.4017 24.9326 33.8334C24.6442 34.265 24.2342 34.6015 23.7546 34.8002C23.2749 34.9989 22.7471 35.0508 22.2379 34.9496C21.7287 34.8483 21.261 34.5983 20.8939 34.2312C20.5267 33.864 20.2767 33.3963 20.1754 32.8871C20.0742 32.3779 20.1261 31.8501 20.3248 31.3705C20.5235 30.8908 20.86 30.4808 21.2916 30.1924C21.7233 29.904 22.2308 29.75 22.75 29.75C23.4462 29.75 24.1139 30.0266 24.6062 30.5188C25.0984 31.0111 25.375 31.6788 25.375 32.375Z",
1394
+ fill: "currentColor"
1395
+ }
1396
+ )
1397
+ }
1398
+ );
1399
+ var CHECK = ({ className }) => /* @__PURE__ */ jsxs7(
1400
+ "svg",
1401
+ {
1402
+ xmlns: "http://www.w3.org/2000/svg",
1403
+ width: "56",
1404
+ height: "56",
1405
+ viewBox: "0 0 56 56",
1406
+ fill: "none",
1407
+ className,
1408
+ style: {
1409
+ display: "flex",
1410
+ width: "56px",
1411
+ height: "56px",
1412
+ justifyContent: "center",
1413
+ alignItems: "center",
1414
+ aspectRatio: "1/1"
1415
+ },
1416
+ children: [
1417
+ /* @__PURE__ */ jsxs7("g", { "clip-path": "url(#clip0_1958_1406)", children: [
1418
+ /* @__PURE__ */ jsx7(
1419
+ "path",
1420
+ {
1421
+ d: "M35.5126 21.5127C36.196 20.8293 37.3038 20.8293 37.9872 21.5127C38.6706 22.1961 38.6706 23.3039 37.9872 23.9873L25.7372 36.2373C25.0538 36.9207 23.946 36.9207 23.2626 36.2373L18.0126 30.9873C17.3291 30.3039 17.3291 29.1961 18.0126 28.5127C18.696 27.8293 19.8038 27.8293 20.4872 28.5127L24.4999 32.5254L35.5126 21.5127Z",
1422
+ fill: "currentColor"
1423
+ }
1424
+ ),
1425
+ /* @__PURE__ */ jsx7(
1426
+ "path",
1427
+ {
1428
+ d: "M47.25 28C47.25 17.3685 38.6315 8.75 28 8.75C17.3685 8.75 8.75 17.3685 8.75 28C8.75 38.6315 17.3685 47.25 28 47.25C38.6315 47.25 47.25 38.6315 47.25 28ZM50.75 28C50.75 40.5645 40.5645 50.75 28 50.75C15.4355 50.75 5.25 40.5645 5.25 28C5.25 15.4355 15.4355 5.25 28 5.25C40.5645 5.25 50.75 15.4355 50.75 28Z",
1429
+ fill: "currentColor"
1430
+ }
1431
+ )
1432
+ ] }),
1433
+ /* @__PURE__ */ jsx7("defs", { children: /* @__PURE__ */ jsx7("clipPath", { id: "clip0_1958_1406", children: /* @__PURE__ */ jsx7("rect", { width: "56", height: "56", fill: "currentColor" }) }) })
1434
+ ]
1435
+ }
1436
+ );
1437
+ var DOWNLOAD = ({ className }) => /* @__PURE__ */ jsx7(
1438
+ "svg",
1439
+ {
1440
+ xmlns: "http://www.w3.org/2000/svg",
1441
+ width: "20",
1442
+ height: "20",
1443
+ viewBox: "0 0 20 20",
1444
+ fill: "none",
1445
+ className,
1446
+ style: {
1447
+ display: "flex",
1448
+ width: "20px",
1449
+ height: "20px",
1450
+ justifyContent: "center",
1451
+ alignItems: "center",
1452
+ aspectRatio: "1/1"
1453
+ },
1454
+ children: /* @__PURE__ */ jsx7(
1455
+ "path",
1456
+ {
1457
+ d: "M3.93281 9.19219C3.81554 9.07491 3.74965 8.91585 3.74965 8.75C3.74965 8.58415 3.81554 8.42509 3.93281 8.30781C4.05009 8.19054 4.20915 8.12465 4.375 8.12465C4.54085 8.12465 4.69991 8.19054 4.81719 8.30781L9.375 12.8664V2.5C9.375 2.33424 9.44085 2.17527 9.55806 2.05806C9.67527 1.94085 9.83424 1.875 10 1.875C10.1658 1.875 10.3247 1.94085 10.4419 2.05806C10.5592 2.17527 10.625 2.33424 10.625 2.5V12.8664L15.1828 8.30781C15.2409 8.24974 15.3098 8.20368 15.3857 8.17225C15.4616 8.14083 15.5429 8.12465 15.625 8.12465C15.7071 8.12465 15.7884 8.14083 15.8643 8.17225C15.9402 8.20368 16.0091 8.24974 16.0672 8.30781C16.1253 8.36588 16.1713 8.43482 16.2027 8.51069C16.2342 8.58656 16.2503 8.66788 16.2503 8.75C16.2503 8.83212 16.2342 8.91344 16.2027 8.98931C16.1713 9.06518 16.1253 9.13412 16.0672 9.19219L10.4422 14.8172C10.3841 14.8753 10.3152 14.9214 10.2393 14.9529C10.1635 14.9843 10.0821 15.0005 10 15.0005C9.91787 15.0005 9.83654 14.9843 9.76066 14.9529C9.68479 14.9214 9.61586 14.8753 9.55781 14.8172L3.93281 9.19219ZM16.875 16.25H3.125C2.95924 16.25 2.80027 16.3158 2.68306 16.4331C2.56585 16.5503 2.5 16.7092 2.5 16.875C2.5 17.0408 2.56585 17.1997 2.68306 17.3169C2.80027 17.4342 2.95924 17.5 3.125 17.5H16.875C17.0408 17.5 17.1997 17.4342 17.3169 17.3169C17.4342 17.1997 17.5 17.0408 17.5 16.875C17.5 16.7092 17.4342 16.5503 17.3169 16.4331C17.1997 16.3158 17.0408 16.25 16.875 16.25Z",
1458
+ fill: "currentColor"
1459
+ }
1460
+ )
1461
+ }
1462
+ );
1373
1463
  var Icons = {
1374
1464
  CARD: /* @__PURE__ */ jsx7(CardIcon, {}),
1375
1465
  TICKET: /* @__PURE__ */ jsx7(TicketIcon, {}),
@@ -1422,7 +1512,10 @@ var Icons = {
1422
1512
  TOTALP: /* @__PURE__ */ jsx7(TOTALP, {}),
1423
1513
  IZZI: /* @__PURE__ */ jsx7(IZZI, {}),
1424
1514
  XBOX: /* @__PURE__ */ jsx7(XBOX, {}),
1425
- CALIENTE: /* @__PURE__ */ jsx7(CALIENTE, {})
1515
+ CALIENTE: /* @__PURE__ */ jsx7(CALIENTE, {}),
1516
+ WARNING: /* @__PURE__ */ jsx7(WARNING, {}),
1517
+ CHECK: /* @__PURE__ */ jsx7(CHECK, {}),
1518
+ DOWNLOAD: /* @__PURE__ */ jsx7(DOWNLOAD, {})
1426
1519
  };
1427
1520
 
1428
1521
  // src/components/ui/modal/modal.tsx
@@ -2712,11 +2805,119 @@ var IconBadge = ({
2712
2805
  className: `uiklu-block ${icon.props.className || ""} ${currentSize.icon}`.trim()
2713
2806
  }) });
2714
2807
  };
2808
+
2809
+ // src/components/ui/detailCard/detailCard.tsx
2810
+ import { useState as useState9 } from "react";
2811
+ import { jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
2812
+ var DetailCard = ({
2813
+ type,
2814
+ title,
2815
+ amount,
2816
+ message,
2817
+ summaryTitle = "Resumen",
2818
+ summaryItems,
2819
+ trackingUrl,
2820
+ primaryButtonText = type === "success" ? "Descargar comprobante" : "Intentarlo nuevamente",
2821
+ secondaryButtonText = "Ir al inicio",
2822
+ onPrimaryAction,
2823
+ onSecondaryAction
2824
+ }) => {
2825
+ const isSuccess = type === "success";
2826
+ const [copied, setCopied] = useState9(false);
2827
+ const handleCopyLink = () => {
2828
+ if (trackingUrl) {
2829
+ navigator.clipboard.writeText(trackingUrl);
2830
+ setCopied(true);
2831
+ setTimeout(() => setCopied(false), 2e3);
2832
+ }
2833
+ };
2834
+ return /* @__PURE__ */ jsxs21("div", { className: "uiklu-w-[516px] uiklu-max-w-full uiklu-mx-auto uiklu-bg-basewhite \n uiklu-border uiklu-border-gray300 uiklu-rounded-[24px] uiklu-p-[16px] uiklu-font-sans uiklu-shadow-sm", children: [
2835
+ /* @__PURE__ */ jsx25("div", { className: "uiklu-flex uiklu-justify-center uiklu-mb-[20px]", children: isSuccess ? /* @__PURE__ */ jsx25("div", { className: "uiklu-w-[80px] uiklu-h-[80px] uiklu-rounded-full uiklu-bg-primary300 \n uiklu-text-basewhite uiklu-flex uiklu-items-center uiklu-justify-center", children: /* @__PURE__ */ jsx25("div", { className: "uiklu-brightness-0 uiklu-invert", children: Icons.CHECK }) }) : /* @__PURE__ */ jsx25("div", { className: "uiklu-w-[80px] uiklu-h-[80px] uiklu-rounded-full uiklu-bg-errorbg \n uiklu-text-basewhite uiklu-flex uiklu-items-center uiklu-justify-center uiklu-overflow-hidden", children: /* @__PURE__ */ jsx25("div", { className: "uiklu-brightness-0 uiklu-invert uiklu-w-[45.5px] uiklu-h-[45.5px] \n uiklu-flex uiklu-items-center uiklu-justify-center uiklu-relative", children: /* @__PURE__ */ jsx25("div", { className: "uiklu-absolute uiklu-top-0 uiklu-left-0 uiklu-w-[56px] uiklu-h-[56px]", children: Icons.WARNING }) }) }) }),
2836
+ /* @__PURE__ */ jsxs21("div", { className: "uiklu-text-center uiklu-mb-[20px]", children: [
2837
+ /* @__PURE__ */ jsx25("h2", { className: "uiklu-text-[18px] uiklu-font-bold uiklu-text-primary900 uiklu-mb-[10px]", children: title }),
2838
+ /* @__PURE__ */ jsx25("span", { className: "uiklu-text-[40px] uiklu-font-bold uiklu-text-gray900", children: amount })
2839
+ ] }),
2840
+ !isSuccess && message && /* @__PURE__ */ jsx25("p", { className: "uiklu-self-stretch uiklu-text-[14px] uiklu-font-medium \n uiklu-text-gray700 uiklu-text-center uiklu-mb-[20px] uiklu-leading-normal", children: message }),
2841
+ /* @__PURE__ */ jsx25("hr", { className: "uiklu-border-t uiklu-border-gray300 uiklu-w-full uiklu-my-[20px]" }),
2842
+ /* @__PURE__ */ jsxs21("div", { className: "uiklu-mb-[20px]", children: [
2843
+ /* @__PURE__ */ jsx25("h3", { className: "uiklu-text-[14px] uiklu-font-semibold uiklu-text-primary800 uiklu-mb-[10px]", children: summaryTitle }),
2844
+ /* @__PURE__ */ jsx25("div", { className: "uiklu-bg-primarylight uiklu-border uiklu-border-primary50 \n uiklu-rounded-xl uiklu-p-[10px] uiklu-space-y-3", children: summaryItems.map((item, index) => /* @__PURE__ */ jsxs21("div", { className: "uiklu-flex uiklu-justify-between", children: [
2845
+ /* @__PURE__ */ jsx25("span", { className: "uiklu-text-gray600 uiklu-text-[14px] uiklu-font-regular", children: item.label }),
2846
+ /* @__PURE__ */ jsx25("span", { className: "uiklu-text-gray800 uiklu-text-[14px] uiklu-font-semibold", children: item.value })
2847
+ ] }, index)) })
2848
+ ] }),
2849
+ isSuccess && trackingUrl && /* @__PURE__ */ jsxs21("div", { className: "uiklu-mb-[20px]", children: [
2850
+ /* @__PURE__ */ jsx25("h4", { className: "uiklu-text-[14px] uiklu-font-semibold uiklu-text-primary800 \n uiklu-mb-[10px] uiklu-mb-1", children: "Comprobante de la transacci\xF3n" }),
2851
+ /* @__PURE__ */ jsx25("span", { className: "uiklu-text-[14px] uiklu-text-gray600 uiklu-block uiklu-mb-[10px]", children: "Liga de seguimiento" }),
2852
+ /* @__PURE__ */ jsxs21("div", { className: "uiklu-flex uiklu-w-full uiklu-items-center uiklu-gap-[10px]", children: [
2853
+ /* @__PURE__ */ jsx25("div", { className: "uiklu-flex uiklu-h-[28px] uiklu-flex-1 uiklu-items-center \n uiklu-gap-[8px] uiklu-rounded-lg uiklu-border uiklu-border-inputlight uiklu-bg-basewhite \n uiklu-px-[10px] uiklu-py-[4px]", children: /* @__PURE__ */ jsx25(
2854
+ "input",
2855
+ {
2856
+ type: "text",
2857
+ readOnly: true,
2858
+ value: trackingUrl,
2859
+ className: "uiklu-w-full uiklu-bg-transparent uiklu-text-[14px] uiklu-text-primary800 \n uiklu-truncate focus:uiklu-outline-none"
2860
+ }
2861
+ ) }),
2862
+ /* @__PURE__ */ jsxs21(
2863
+ "button",
2864
+ {
2865
+ type: "button",
2866
+ onClick: handleCopyLink,
2867
+ className: "uiklu-flex uiklu-w-[140px] uiklu-items-center uiklu-gap-[10px] uiklu-px-4 uiklu-py-2.5\n uiklu-border uiklu-border-primary500 uiklu-text-primary500 uiklu-bg-basewhite\n uiklu-rounded-full uiklu-text-[14px] uiklu-font-medium hover:uiklu-bg-basewhite\n uiklu-transition-colors",
2868
+ children: [
2869
+ /* @__PURE__ */ jsx25("span", { children: copied ? "Copiado" : "Copiar liga" }),
2870
+ Icons.COPY
2871
+ ]
2872
+ }
2873
+ )
2874
+ ] })
2875
+ ] }),
2876
+ /* @__PURE__ */ jsxs21("div", { className: "uiklu-flex uiklu-w-full uiklu-gap-[20px] contenedor-botones-flow", children: [
2877
+ /* @__PURE__ */ jsx25("style", { children: `
2878
+ @media (max-width: 550px) {
2879
+ .contenedor-botones-flow {
2880
+ flex-direction: column-reverse !important;
2881
+ gap: 12px !important; /* Espacio vertical entre los dos botones */
2882
+ }
2883
+ .contenedor-botones-flow > button,
2884
+ .contenedor-botones-flow > div {
2885
+ width: 100% !important; /* Fuerza a que midan todo el ancho del celular */
2886
+ flex: none !important; /* Evita que se aplasten verticalmente */
2887
+ }
2888
+ }
2889
+ ` }),
2890
+ /* @__PURE__ */ jsx25(
2891
+ Button,
2892
+ {
2893
+ variant: "outlinePrimary",
2894
+ size: "fullh",
2895
+ onClick: onSecondaryAction,
2896
+ className: "uiklu-flex-1",
2897
+ children: secondaryButtonText
2898
+ }
2899
+ ),
2900
+ /* @__PURE__ */ jsx25(
2901
+ Button,
2902
+ {
2903
+ variant: "primary",
2904
+ size: "fullh",
2905
+ onClick: onPrimaryAction,
2906
+ className: "uiklu-flex-1 uiklu-whitespace-nowrap uiklu-px-[12px] uiklu-w-auto",
2907
+ icon: isSuccess ? Icons.DOWNLOAD : "",
2908
+ iconAlign: "right",
2909
+ children: primaryButtonText
2910
+ }
2911
+ )
2912
+ ] })
2913
+ ] });
2914
+ };
2715
2915
  export {
2716
2916
  BackButton,
2717
2917
  BalanceInfo,
2718
2918
  Button,
2719
2919
  Checkbox,
2920
+ DetailCard,
2720
2921
  GridCard,
2721
2922
  IconBadge,
2722
2923
  Icons,