@klu_dev/ui-klu-green 1.2.21 → 1.2.23

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.d.ts CHANGED
@@ -348,6 +348,21 @@ interface PhoneFieldProps extends Omit<React.InputHTMLAttributes<HTMLInputElemen
348
348
  }
349
349
  declare const PhoneField: React.ForwardRefExoticComponent<PhoneFieldProps & React.RefAttributes<HTMLInputElement>>;
350
350
 
351
+ interface CardData {
352
+ title: string;
353
+ balance: string;
354
+ cardNumber: string;
355
+ clabe: string;
356
+ accountNumber: string;
357
+ last4: string;
358
+ }
359
+ interface CorporateCardProps {
360
+ isBlocked?: boolean;
361
+ onToggleBlock: (checked: boolean) => void;
362
+ cardData?: CardData;
363
+ }
364
+ declare function CorporateCard({ isBlocked, onToggleBlock, cardData }: CorporateCardProps): react_jsx_runtime.JSX.Element;
365
+
351
366
  interface StatusCardSummaryItem {
352
367
  label: string;
353
368
  value: string;
@@ -369,4 +384,4 @@ interface StatusCardProps {
369
384
  }
370
385
  declare const StatusCard: React__default.FC<StatusCardProps>;
371
386
 
372
- export { BackButton, BalanceInfo, Button, Checkbox, type CheckboxProps, DetailCard, type DetailCardItem, type DetailCardProps, GridCard, IconBadge, type IconBadgeProps, Icons, Input, InputCode, type LadaOption, LoadingScreen, MobileMenuDrawer, Modal, PhoneField, type PhoneFieldProps, PromoBanner, SearchSelect, SearchSelectField, type SearchSelectFieldProps, Select, SelectContent, SelectField, type SelectFieldProps, SelectGroup, SelectItem, SelectValue, SidebarTabs, StatusCard, type StatusCardProps, type StatusCardSummaryItem, TextField, type TextFieldProps, ToastAction, Toaster, Typography, useToast };
387
+ export { BackButton, BalanceInfo, Button, Checkbox, type CheckboxProps, CorporateCard, DetailCard, type DetailCardItem, type DetailCardProps, GridCard, IconBadge, type IconBadgeProps, Icons, Input, InputCode, type LadaOption, LoadingScreen, MobileMenuDrawer, Modal, PhoneField, type PhoneFieldProps, PromoBanner, SearchSelect, SearchSelectField, type SearchSelectFieldProps, Select, SelectContent, SelectField, type SelectFieldProps, SelectGroup, SelectItem, SelectValue, SidebarTabs, StatusCard, type StatusCardProps, type StatusCardSummaryItem, TextField, type TextFieldProps, ToastAction, Toaster, Typography, useToast };
package/dist/index.js CHANGED
@@ -3553,9 +3553,229 @@ Switch.displayName = SwitchPrimitives.Root.displayName;
3553
3553
 
3554
3554
  // src/components/ui/card/card.tsx
3555
3555
  import { jsx as jsx30, jsxs as jsxs25 } from "react/jsx-runtime";
3556
+ var PlasticCard = ({
3557
+ isBlocked = false,
3558
+ last4 = "0000"
3559
+ }) => {
3560
+ return /* @__PURE__ */ jsxs25("div", { className: "uiklu-relative uiklu-w-full uiklu-h-full uiklu-min-w-[186px] uiklu-min-h-[114px] \n uiklu-rounded-xl uiklu-overflow-hidden uiklu-shrink-0\n uiklu-shadow-[0_2.467px_2.467px_0_rgba(0,0,0,0.25)]\n uiklu-transition-opacity uiklu-duration-300", children: [
3561
+ /* @__PURE__ */ jsx30("div", { className: "uiklu-absolute uiklu-inset-0 uiklu-z-0", children: /* @__PURE__ */ jsxs25(
3562
+ "svg",
3563
+ {
3564
+ xmlns: "http://www.w3.org/2000/svg",
3565
+ width: "100%",
3566
+ height: "100%",
3567
+ viewBox: "0 0 185 111",
3568
+ preserveAspectRatio: "none",
3569
+ fill: "none",
3570
+ children: [
3571
+ /* @__PURE__ */ jsx30("path", { d: "M185 0H0V111H185V0Z", fill: "url(#paint0_linear_card)" }),
3572
+ /* @__PURE__ */ jsx30("defs", { children: /* @__PURE__ */ jsxs25(
3573
+ "linearGradient",
3574
+ {
3575
+ id: "paint0_linear_card",
3576
+ x1: "-0.00289658",
3577
+ y1: "113.999",
3578
+ x2: "101.58",
3579
+ y2: "-51.7413",
3580
+ gradientUnits: "userSpaceOnUse",
3581
+ children: [
3582
+ /* @__PURE__ */ jsx30("stop", { "stop-color": "#0A2D27" }),
3583
+ /* @__PURE__ */ jsx30("stop", { offset: "1", "stop-color": "#096761" })
3584
+ ]
3585
+ }
3586
+ ) })
3587
+ ]
3588
+ }
3589
+ ) }),
3590
+ /* @__PURE__ */ jsx30("div", { className: `uiklu-absolute uiklu-inset-0 uiklu-z-1 uiklu-bg-basewhite/40
3591
+ uiklu-transition-opacity uiklu-duration-300
3592
+ ${isBlocked ? "uiklu-opacity-100" : "uiklu-opacity-0"}` }),
3593
+ /* @__PURE__ */ jsxs25("div", { className: "uiklu-absolute uiklu-inset-0 uiklu-z-10 uiklu-h-full uiklu-w-full \n uiklu-p-3 uiklu-flex uiklu-flex-col uiklu-justify-between uiklu-box-border", children: [
3594
+ /* @__PURE__ */ jsxs25("div", { className: "uiklu-flex uiklu-justify-between uiklu-items-start uiklu-w-full", children: [
3595
+ /* @__PURE__ */ jsxs25("div", { className: "uiklu-flex uiklu-flex-col", children: [
3596
+ /* @__PURE__ */ jsx30("div", { className: "uiklu-flex uiklu-items-center uiklu-w-[29px] \n uiklu-h-[14px] uiklu-text-basewhite uiklu-mb-[16px]", children: Icons.KLUWHITE }),
3597
+ /* @__PURE__ */ jsxs25("span", { className: "uiklu-text-basewhite uiklu-text-[13px] uiklu-font-sans \n uiklu-font-semibold uiklu-tracking-wider uiklu-leading-normal", children: [
3598
+ "**** ",
3599
+ last4
3600
+ ] })
3601
+ ] }),
3602
+ /* @__PURE__ */ jsx30("div", { className: "uiklu-text-basewhite uiklu-pt-0.5", children: isBlocked ? Icons.LOCK : Icons.LOCKOPEN })
3603
+ ] }),
3604
+ /* @__PURE__ */ jsx30("div", { className: `uiklu-flex uiklu-justify-end uiklu-w-full uiklu-mt-auto
3605
+ ${isBlocked ? "uiklu-opacity-70" : "uiklu-opacity-100"}`, children: /* @__PURE__ */ jsx30("div", { className: "uiklu-flex uiklu-items-center uiklu-shrink-0", children: Icons.MASTERCARD }) })
3606
+ ] })
3607
+ ] });
3608
+ };
3556
3609
 
3557
3610
  // src/components/ui/corporateCard/corporateCard.tsx
3558
3611
  import { jsx as jsx31, jsxs as jsxs26 } from "react/jsx-runtime";
3612
+ function CorporateCard({
3613
+ isBlocked = false,
3614
+ onToggleBlock,
3615
+ cardData = {
3616
+ title: "Mi Tarjeta",
3617
+ balance: "000,000.00",
3618
+ cardNumber: "0000 0000 0000 0000",
3619
+ clabe: "000 000 000 000 000 000",
3620
+ accountNumber: "0000 0000",
3621
+ last4: "0000"
3622
+ }
3623
+ }) {
3624
+ const [showBalance, setShowBalance] = useState12(true);
3625
+ const [copiedField, setCopiedField] = useState12(null);
3626
+ const [showTooltip, setShowTooltip] = useState12(false);
3627
+ const handleCopy = (text, field) => {
3628
+ navigator.clipboard.writeText(text).then(() => {
3629
+ setCopiedField(field);
3630
+ setShowTooltip(true);
3631
+ setTimeout(() => {
3632
+ setCopiedField(null);
3633
+ setShowTooltip(false);
3634
+ }, 1500);
3635
+ }).catch((err) => {
3636
+ console.error("Error al copiar al portapapeles: ", err);
3637
+ });
3638
+ };
3639
+ const CopyButton = ({
3640
+ text,
3641
+ field,
3642
+ className = ""
3643
+ }) => /* @__PURE__ */ jsxs26(
3644
+ "button",
3645
+ {
3646
+ onClick: () => handleCopy(text, field),
3647
+ className: `uiklu-relative uiklu-text-outlinesecondary
3648
+ uiklu-hover:text-primary
3649
+ uiklu-transition-colors
3650
+ uiklu-flex
3651
+ uiklu-justify-center
3652
+ uiklu-items-center
3653
+ uiklu-bg-transparent
3654
+ uiklu-shrink-0 ${className}`,
3655
+ children: [
3656
+ Icons.COPY,
3657
+ showTooltip && copiedField === field && /* @__PURE__ */ jsx31(
3658
+ "div",
3659
+ {
3660
+ className: "uiklu-absolute\n uiklu-bottom-full\n uiklu-left-1/2\n uiklu--translate-x-1/2\n uiklu-mb-2\n uiklu-z-[9999]\n uiklu-pointer-events-none",
3661
+ children: /* @__PURE__ */ jsxs26(
3662
+ "div",
3663
+ {
3664
+ className: "uiklu-relative\n uiklu-bg-gray900\n uiklu-text-white\n uiklu-text-[11px]\n uiklu-px-2\n uiklu-py-1\n uiklu-rounded-md\n uiklu-whitespace-nowrap\n uiklu-shadow-xl",
3665
+ children: [
3666
+ "Copiado",
3667
+ /* @__PURE__ */ jsx31(
3668
+ "div",
3669
+ {
3670
+ className: "uiklu-absolute\n uiklu-top-full\n uiklu-left-1/2\n uiklu--translate-x-1/2\n uiklu-border-4\n uiklu-border-transparent\n uiklu-border-t-gray900"
3671
+ }
3672
+ )
3673
+ ]
3674
+ }
3675
+ )
3676
+ }
3677
+ )
3678
+ ]
3679
+ }
3680
+ );
3681
+ return /* @__PURE__ */ jsxs26("div", { className: "uiklu-font-sans uiklu-max-w-[569px] lg:uiklu-max-w-full uiklu-bg-basewhite\n uiklu-border uiklu-border-gray200 uiklu-rounded-2xl uiklu-p-[16px] uiklu-shadow-sm uiklu-w-full", children: [
3682
+ /* @__PURE__ */ jsxs26("div", { className: "uiklu-hidden lg:uiklu-flex lg:uiklu-justify-between lg:uiklu-items-center uiklu-mb-4", children: [
3683
+ /* @__PURE__ */ jsxs26("div", { className: "uiklu-flex uiklu-items-center ", children: [
3684
+ /* @__PURE__ */ jsx31("div", { className: "uiklu-w-[24px] uiklu-h-[24px] uiklu-flex \n uiklu-items-center uiklu-justify-center uiklu-text-primary700 uiklu-mr-[10px]", children: Icons.CARDCIRCLE }),
3685
+ /* @__PURE__ */ jsx31("span", { className: "uiklu-font-medium uiklu-text-primary900 uiklu-text-[16px]", children: cardData.title })
3686
+ ] }),
3687
+ /* @__PURE__ */ jsxs26("div", { className: "uiklu-flex uiklu-items-center uiklu-justify-between", children: [
3688
+ /* @__PURE__ */ jsx31("span", { className: "uiklu-font-sans uiklu-text-[24px] uiklu-font-bold uiklu-text-gray900 ", children: showBalance ? `$${cardData.balance}` : "$ ******" }),
3689
+ /* @__PURE__ */ jsx31(
3690
+ "button",
3691
+ {
3692
+ onClick: () => setShowBalance(!showBalance),
3693
+ className: "uiklu-text-primary500 uiklu-hover:opacity-80 uiklu-transition-opacity\n uiklu-bg-transparent uiklu-ml-[10px] uiklu-p-0",
3694
+ children: showBalance ? Icons.EYE_OPEN : Icons.EYE_MASKED
3695
+ }
3696
+ )
3697
+ ] })
3698
+ ] }),
3699
+ /* @__PURE__ */ jsx31("hr", { className: "uiklu-hidden lg:uiklu-block uiklu-border-[1px] uiklu-border-gray300 uiklu-mb-5" }),
3700
+ /* @__PURE__ */ jsxs26("div", { className: "lg:uiklu-hidden uiklu-flex uiklu-flex-col", children: [
3701
+ /* @__PURE__ */ jsxs26("div", { className: "uiklu-flex uiklu-items-center", children: [
3702
+ /* @__PURE__ */ jsx31("div", { className: "uiklu-w-[24px] uiklu-h-[24px] uiklu-flex \n uiklu-items-center uiklu-justify-center uiklu-text-primary700 uiklu-mr-[10px]", children: Icons.CARDCIRCLE }),
3703
+ /* @__PURE__ */ jsx31("span", { className: " uiklu-font-medium uiklu-text-primary900 uiklu-text-[16px]", children: cardData.title })
3704
+ ] }),
3705
+ /* @__PURE__ */ jsx31("div", { className: "uiklu-w-full uiklu-h-[1px] uiklu-bg-gray300 uiklu-mt-[20px] uiklu-mb-[20px]" }),
3706
+ /* @__PURE__ */ jsxs26("div", { className: "uiklu-flex uiklu-items-center uiklu-justify-center uiklu-mb-[20px]", children: [
3707
+ /* @__PURE__ */ jsx31("span", { className: "uiklu-font-sans uiklu-text-[24px] uiklu-font-bold uiklu-text-gray900 ", children: showBalance ? `$${cardData.balance}` : "$ ******" }),
3708
+ /* @__PURE__ */ jsx31(
3709
+ "button",
3710
+ {
3711
+ onClick: () => setShowBalance(!showBalance),
3712
+ className: "uiklu-text-primary500 uiklu-hover:opacity-80 uiklu-transition-opacity\n uiklu-bg-transparent uiklu-ml-[10px] uiklu-p-0",
3713
+ children: showBalance ? Icons.EYE_OPEN : Icons.EYE_MASKED
3714
+ }
3715
+ )
3716
+ ] })
3717
+ ] }),
3718
+ /* @__PURE__ */ jsxs26("div", { className: "uiklu-flex uiklu-flex-col lg:uiklu-flex-row uiklu-items-center \n lg:uiklu-items-stretch uiklu-justify-between lg:uiklu-h-[114px] uiklu-w-full", children: [
3719
+ /* @__PURE__ */ jsx31("div", { className: "uiklu-w-[186px] uiklu-shrink-0 lg:uiklu-mr-[20px] uiklu-flex \n uiklu-justify-center uiklu-mb-[20px] lg:uiklu-mb-0", children: /* @__PURE__ */ jsx31(
3720
+ PlasticCard,
3721
+ {
3722
+ isBlocked,
3723
+ last4: cardData.last4
3724
+ }
3725
+ ) }),
3726
+ /* @__PURE__ */ jsxs26("div", { className: "uiklu-flex uiklu-flex-col uiklu-flex-grow uiklu-justify-between uiklu-w-full \n uiklu-items-center lg:uiklu-items-stretch", children: [
3727
+ /* @__PURE__ */ jsxs26("div", { className: "uiklu-flex uiklu-items-center uiklu-justify-center lg:uiklu-justify-start \n uiklu-mb-[20px] lg:uiklu-mb-0 lg:uiklu-mt-[10px] uiklu-relative", children: [
3728
+ /* @__PURE__ */ jsx31("span", { className: "uiklu-font-sans uiklu-text-[20px] uiklu-font-bold uiklu-text-gray900 \n uiklu-tracking-wide uiklu-text-center lg:uiklu-text-left", children: cardData.cardNumber }),
3729
+ /* @__PURE__ */ jsx31(
3730
+ CopyButton,
3731
+ {
3732
+ text: cardData.cardNumber,
3733
+ field: "card"
3734
+ }
3735
+ )
3736
+ ] }),
3737
+ /* @__PURE__ */ jsxs26("div", { className: "uiklu-w-full lg:uiklu-min-w-[331px] uiklu-box-border uiklu-bg-primarylight\n uiklu-border uiklu-border-primary50 uiklu-rounded-[10px] uiklu-p-[10px] uiklu-flex \n uiklu-flex-col ", children: [
3738
+ /* @__PURE__ */ jsxs26("div", { className: "uiklu-flex uiklu-items-center \n uiklu-flex-wrap lg:uiklu-flex-nowrap lg:uiklu-justify-start", children: [
3739
+ /* @__PURE__ */ jsxs26("span", { className: "uiklu-text-[14px] uiklu-text-gray700 uiklu-font-light \n uiklu-break-all sm:uiklu-break-normal", children: [
3740
+ "Cuenta Clabe: ",
3741
+ /* @__PURE__ */ jsx31("strong", { className: "uiklu-text-gray800 uiklu-font-sans\n uiklu-font-medium uiklu-text-[14px]", children: cardData.clabe })
3742
+ ] }),
3743
+ /* @__PURE__ */ jsx31(
3744
+ CopyButton,
3745
+ {
3746
+ text: cardData.clabe,
3747
+ field: "clabe"
3748
+ }
3749
+ )
3750
+ ] }),
3751
+ /* @__PURE__ */ jsxs26("div", { className: "uiklu-flex uiklu-items-center uiklu-flex-wrap lg:uiklu-flex-nowrap \n lg:uiklu-justify-start", children: [
3752
+ /* @__PURE__ */ jsxs26("span", { className: "uiklu-text-[14px] uiklu-text-gray700 uiklu-font-light", children: [
3753
+ "No. de cuenta: ",
3754
+ /* @__PURE__ */ jsx31("strong", { className: "uiklu-text-gray800 uiklu-font-sans\n uiklu-font-medium uiklu-text-[14px]", children: cardData.accountNumber })
3755
+ ] }),
3756
+ /* @__PURE__ */ jsx31(
3757
+ CopyButton,
3758
+ {
3759
+ text: cardData.accountNumber,
3760
+ field: "account"
3761
+ }
3762
+ )
3763
+ ] })
3764
+ ] })
3765
+ ] })
3766
+ ] }),
3767
+ /* @__PURE__ */ jsxs26("div", { className: "uiklu-flex uiklu-justify-center lg:uiklu-justify-end uiklu-items-center \n uiklu-gap-3 uiklu-mt-[20px] lg:uiklu-mt-4", children: [
3768
+ /* @__PURE__ */ jsx31(
3769
+ Switch,
3770
+ {
3771
+ checked: isBlocked,
3772
+ onCheckedChange: onToggleBlock
3773
+ }
3774
+ ),
3775
+ /* @__PURE__ */ jsx31("span", { className: "uiklu-text-[14px] uiklu-font-medium uiklu-text-gray900", children: "Bloquear tarjeta" })
3776
+ ] })
3777
+ ] });
3778
+ }
3559
3779
 
3560
3780
  // src/components/ui/statusCard/statusCard.tsx
3561
3781
  import { jsx as jsx32, jsxs as jsxs27 } from "react/jsx-runtime";
@@ -3647,6 +3867,7 @@ export {
3647
3867
  BalanceInfo,
3648
3868
  Button,
3649
3869
  Checkbox,
3870
+ CorporateCard,
3650
3871
  DetailCard,
3651
3872
  GridCard,
3652
3873
  IconBadge,