next-recomponents 2.0.3 → 2.0.5

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.mjs CHANGED
@@ -3485,9 +3485,6 @@ var require_link2 = __commonJS({
3485
3485
  }
3486
3486
  });
3487
3487
 
3488
- // src/button/index.tsx
3489
- import { useState } from "react";
3490
-
3491
3488
  // src/button/colors.tsx
3492
3489
  var catColor = {
3493
3490
  white: "bg-white text-black",
@@ -3499,7 +3496,25 @@ var catColor = {
3499
3496
  success: "bg-green-500 text-white"
3500
3497
  };
3501
3498
 
3499
+ // src/alert/index.tsx
3500
+ import { jsx } from "react/jsx-runtime";
3501
+ function Alert({
3502
+ color = "primary",
3503
+ children,
3504
+ ...props
3505
+ }) {
3506
+ return /* @__PURE__ */ jsx(
3507
+ "div",
3508
+ {
3509
+ className: [catColor[color], "p-2 rounded shadow border"].join(" "),
3510
+ ...props,
3511
+ children
3512
+ }
3513
+ );
3514
+ }
3515
+
3502
3516
  // src/button/index.tsx
3517
+ import { useState } from "react";
3503
3518
  import { jsxs } from "react/jsx-runtime";
3504
3519
  function Button({
3505
3520
  className,
@@ -3549,9 +3564,9 @@ function Button({
3549
3564
  import { useEffect, useState as useState2 } from "react";
3550
3565
 
3551
3566
  // src/container/icons.tsx
3552
- import { jsx } from "react/jsx-runtime";
3567
+ import { jsx as jsx2 } from "react/jsx-runtime";
3553
3568
  function MenuIcon() {
3554
- return /* @__PURE__ */ jsx(
3569
+ return /* @__PURE__ */ jsx2(
3555
3570
  "svg",
3556
3571
  {
3557
3572
  stroke: "currentColor",
@@ -3561,12 +3576,12 @@ function MenuIcon() {
3561
3576
  height: "20px",
3562
3577
  width: "20px",
3563
3578
  xmlns: "http://www.w3.org/2000/svg",
3564
- children: /* @__PURE__ */ jsx("path", { d: "M32 96v64h448V96H32zm0 128v64h448v-64H32zm0 128v64h448v-64H32z" })
3579
+ children: /* @__PURE__ */ jsx2("path", { d: "M32 96v64h448V96H32zm0 128v64h448v-64H32zm0 128v64h448v-64H32z" })
3565
3580
  }
3566
3581
  );
3567
3582
  }
3568
3583
  function HomeIcon() {
3569
- return /* @__PURE__ */ jsx(
3584
+ return /* @__PURE__ */ jsx2(
3570
3585
  "svg",
3571
3586
  {
3572
3587
  stroke: "currentColor",
@@ -3576,12 +3591,12 @@ function HomeIcon() {
3576
3591
  height: "20px",
3577
3592
  width: "20px",
3578
3593
  xmlns: "http://www.w3.org/2000/svg",
3579
- children: /* @__PURE__ */ jsx("path", { d: "M280.37 148.26L96 300.11V464a16 16 0 0 0 16 16l112.06-.29a16 16 0 0 0 15.92-16V368a16 16 0 0 1 16-16h64a16 16 0 0 1 16 16v95.64a16 16 0 0 0 16 16.05L464 480a16 16 0 0 0 16-16V300L295.67 148.26a12.19 12.19 0 0 0-15.3 0zM571.6 251.47L488 182.56V44.05a12 12 0 0 0-12-12h-56a12 12 0 0 0-12 12v72.61L318.47 43a48 48 0 0 0-61 0L4.34 251.47a12 12 0 0 0-1.6 16.9l25.5 31A12 12 0 0 0 45.15 301l235.22-193.74a12.19 12.19 0 0 1 15.3 0L530.9 301a12 12 0 0 0 16.9-1.6l25.5-31a12 12 0 0 0-1.7-16.93z" })
3594
+ children: /* @__PURE__ */ jsx2("path", { d: "M280.37 148.26L96 300.11V464a16 16 0 0 0 16 16l112.06-.29a16 16 0 0 0 15.92-16V368a16 16 0 0 1 16-16h64a16 16 0 0 1 16 16v95.64a16 16 0 0 0 16 16.05L464 480a16 16 0 0 0 16-16V300L295.67 148.26a12.19 12.19 0 0 0-15.3 0zM571.6 251.47L488 182.56V44.05a12 12 0 0 0-12-12h-56a12 12 0 0 0-12 12v72.61L318.47 43a48 48 0 0 0-61 0L4.34 251.47a12 12 0 0 0-1.6 16.9l25.5 31A12 12 0 0 0 45.15 301l235.22-193.74a12.19 12.19 0 0 1 15.3 0L530.9 301a12 12 0 0 0 16.9-1.6l25.5-31a12 12 0 0 0-1.7-16.93z" })
3580
3595
  }
3581
3596
  );
3582
3597
  }
3583
3598
  function ArrowUpIcon() {
3584
- return /* @__PURE__ */ jsx(
3599
+ return /* @__PURE__ */ jsx2(
3585
3600
  "svg",
3586
3601
  {
3587
3602
  stroke: "currentColor",
@@ -3593,12 +3608,12 @@ function ArrowUpIcon() {
3593
3608
  height: "20px",
3594
3609
  width: "20px",
3595
3610
  xmlns: "http://www.w3.org/2000/svg",
3596
- children: /* @__PURE__ */ jsx("path", { d: "M18.2 13.3l-6.2-6.3-6.2 6.3c-.2.2-.3.5-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7z" })
3611
+ children: /* @__PURE__ */ jsx2("path", { d: "M18.2 13.3l-6.2-6.3-6.2 6.3c-.2.2-.3.5-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7z" })
3597
3612
  }
3598
3613
  );
3599
3614
  }
3600
3615
  function ArrowDownIcon() {
3601
- return /* @__PURE__ */ jsx(
3616
+ return /* @__PURE__ */ jsx2(
3602
3617
  "svg",
3603
3618
  {
3604
3619
  stroke: "currentColor",
@@ -3610,14 +3625,14 @@ function ArrowDownIcon() {
3610
3625
  height: "20px",
3611
3626
  width: "20px",
3612
3627
  xmlns: "http://www.w3.org/2000/svg",
3613
- children: /* @__PURE__ */ jsx("path", { d: "M5.8 9.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.4-.3.7s.1.5.3.7z" })
3628
+ children: /* @__PURE__ */ jsx2("path", { d: "M5.8 9.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.4-.3.7s.1.5.3.7z" })
3614
3629
  }
3615
3630
  );
3616
3631
  }
3617
3632
 
3618
3633
  // src/container/index.tsx
3619
3634
  var import_link = __toESM(require_link2());
3620
- import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
3635
+ import { Fragment, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
3621
3636
  function Container({
3622
3637
  children,
3623
3638
  appName,
@@ -3644,7 +3659,7 @@ function Container({
3644
3659
  return /* @__PURE__ */ jsxs2("div", { className: "flex flex-col h-screen", children: [
3645
3660
  /* @__PURE__ */ jsxs2("header", { className: "z-40", children: [
3646
3661
  /* @__PURE__ */ jsxs2("div", { className: "bg-blue-600 text-white p-4 flex justify-between items-center shadow-md", children: [
3647
- /* @__PURE__ */ jsx2(
3662
+ /* @__PURE__ */ jsx3(
3648
3663
  "button",
3649
3664
  {
3650
3665
  onClick: () => {
@@ -3652,17 +3667,17 @@ function Container({
3652
3667
  handleClick(!isSidebarOpen);
3653
3668
  },
3654
3669
  className: "bg-blue-600 text-white px-2 py-1 rounded-r",
3655
- children: /* @__PURE__ */ jsx2(MenuIcon, {})
3670
+ children: /* @__PURE__ */ jsx3(MenuIcon, {})
3656
3671
  }
3657
3672
  ),
3658
- /* @__PURE__ */ jsx2("h1", { className: "text-xl font-bold", children: appName })
3673
+ /* @__PURE__ */ jsx3("h1", { className: "text-xl font-bold", children: appName })
3659
3674
  ] }),
3660
- /* @__PURE__ */ jsx2(
3675
+ /* @__PURE__ */ jsx3(
3661
3676
  "div",
3662
3677
  {
3663
3678
  className: ` gap-2 bg-blue-400 text-white ${isSidebarOpen ? "px-[270px]" : "px-[60px]"} hidden sm:flex`,
3664
- children: navItems && /* @__PURE__ */ jsx2(Fragment, { children: [
3665
- { location: "/", name: "Home", icon: /* @__PURE__ */ jsx2(HomeIcon, {}) },
3679
+ children: navItems && /* @__PURE__ */ jsx3(Fragment, { children: [
3680
+ { location: "/", name: "Home", icon: /* @__PURE__ */ jsx3(HomeIcon, {}) },
3666
3681
  ...navItems
3667
3682
  ].map((li, k) => {
3668
3683
  return li && /* @__PURE__ */ jsxs2(
@@ -3682,14 +3697,14 @@ function Container({
3682
3697
  )
3683
3698
  ] }),
3684
3699
  /* @__PURE__ */ jsxs2("div", { className: "flex flex-1 overflow-hidden relative", children: [
3685
- /* @__PURE__ */ jsx2(
3700
+ /* @__PURE__ */ jsx3(
3686
3701
  "div",
3687
3702
  {
3688
3703
  style: {
3689
3704
  width: typeof window !== "undefined" && (window == null ? void 0 : window.innerWidth) < 768 ? isSidebarOpen ? "100%" : 0 : isSidebarOpen ? 250 : 60
3690
3705
  },
3691
3706
  className: "bg-blue-500 text-white overflow-y-auto fixed md:static top-0 left-0 h-full z-50 md:z-auto transition-all duration-300 ease-in-out",
3692
- children: /* @__PURE__ */ jsx2("div", { className: "p-4 ", children: /* @__PURE__ */ jsxs2("ul", { className: "space-y-3", children: [
3707
+ children: /* @__PURE__ */ jsx3("div", { className: "p-4 ", children: /* @__PURE__ */ jsxs2("ul", { className: "space-y-3", children: [
3693
3708
  /* @__PURE__ */ jsxs2(
3694
3709
  "li",
3695
3710
  {
@@ -3699,7 +3714,7 @@ function Container({
3699
3714
  handleClick(false);
3700
3715
  },
3701
3716
  children: [
3702
- /* @__PURE__ */ jsx2(MenuIcon, {}),
3717
+ /* @__PURE__ */ jsx3(MenuIcon, {}),
3703
3718
  " ",
3704
3719
  appName
3705
3720
  ]
@@ -3708,17 +3723,17 @@ function Container({
3708
3723
  ),
3709
3724
  menuList && menuList.map((itemMenu, k) => {
3710
3725
  const letra = `${itemMenu == null ? void 0 : itemMenu.name}`.split("")[0];
3711
- const icon = /* @__PURE__ */ jsx2(Fragment, { children: (itemMenu == null ? void 0 : itemMenu.icon) || /* @__PURE__ */ jsx2("span", { className: "px-1 border shadow rounded", children: letra }) });
3712
- return /* @__PURE__ */ jsx2("li", { children: /* @__PURE__ */ jsxs2(
3726
+ const icon = /* @__PURE__ */ jsx3(Fragment, { children: (itemMenu == null ? void 0 : itemMenu.icon) || /* @__PURE__ */ jsx3("span", { className: "px-1 border shadow rounded", children: letra }) });
3727
+ return /* @__PURE__ */ jsx3("li", { children: /* @__PURE__ */ jsxs2(
3713
3728
  import_link.default,
3714
3729
  {
3715
3730
  href: (itemMenu == null ? void 0 : itemMenu.location) || "#",
3716
3731
  children: [
3717
3732
  isSidebarOpen && /* @__PURE__ */ jsxs2("div", { className: "text-sm flex p-1 gap-1 items-center hover:bg-gray-200 hover:text-black rounded", children: [
3718
3733
  icon,
3719
- /* @__PURE__ */ jsx2("div", { className: " truncate", children: itemMenu == null ? void 0 : itemMenu.name })
3734
+ /* @__PURE__ */ jsx3("div", { className: " truncate", children: itemMenu == null ? void 0 : itemMenu.name })
3720
3735
  ] }),
3721
- !isSidebarOpen && /* @__PURE__ */ jsx2("div", { className: "text-sm hover:bg-gray-200 hover:text-black rounded p-1", children: icon })
3736
+ !isSidebarOpen && /* @__PURE__ */ jsx3("div", { className: "text-sm hover:bg-gray-200 hover:text-black rounded p-1", children: icon })
3722
3737
  ]
3723
3738
  }
3724
3739
  ) }, k);
@@ -3726,7 +3741,7 @@ function Container({
3726
3741
  ] }) })
3727
3742
  }
3728
3743
  ),
3729
- isSidebarOpen && typeof window !== "undefined" && window.innerWidth < 768 && /* @__PURE__ */ jsx2(
3744
+ isSidebarOpen && typeof window !== "undefined" && window.innerWidth < 768 && /* @__PURE__ */ jsx3(
3730
3745
  "div",
3731
3746
  {
3732
3747
  className: "fixed inset-0 bg-black bg-opacity-40 z-40",
@@ -3736,21 +3751,21 @@ function Container({
3736
3751
  }
3737
3752
  }
3738
3753
  ),
3739
- /* @__PURE__ */ jsx2("main", { className: "flex-1 overflow-auto p-4 bg-gray-100 z-10 md:ml-0 ", children: /* @__PURE__ */ jsxs2("div", { className: "flex md:flex-row flex-col h-full gap-4 ", children: [
3740
- leftPanel && /* @__PURE__ */ jsx2("aside", { className: "w-full md:w-64 flex-shrink-0 text-xs text-blue-600 bg-gray-200 p-5 border rounded", children: leftPanel }),
3741
- /* @__PURE__ */ jsx2("section", { className: "flex-1", children })
3754
+ /* @__PURE__ */ jsx3("main", { className: "flex-1 overflow-auto p-4 bg-gray-100 z-10 md:ml-0 ", children: /* @__PURE__ */ jsxs2("div", { className: "flex md:flex-row flex-col h-full gap-4 ", children: [
3755
+ leftPanel && /* @__PURE__ */ jsx3("aside", { className: "w-full md:w-64 flex-shrink-0 text-xs text-blue-600 bg-gray-200 p-5 border rounded", children: leftPanel }),
3756
+ /* @__PURE__ */ jsx3("section", { className: "flex-1", children })
3742
3757
  ] }) })
3743
3758
  ] }),
3744
3759
  footPanel && /* @__PURE__ */ jsxs2("div", { className: "bg-blue-100 overflow-hidden ", children: [
3745
- /* @__PURE__ */ jsx2("div", { className: "flex justify-center items-center p-2", children: /* @__PURE__ */ jsx2(
3760
+ /* @__PURE__ */ jsx3("div", { className: "flex justify-center items-center p-2", children: /* @__PURE__ */ jsx3(
3746
3761
  "button",
3747
3762
  {
3748
3763
  onClick: () => setIsFooterOpen(!isFooterOpen),
3749
3764
  className: "text-blue-700",
3750
- children: isFooterOpen ? /* @__PURE__ */ jsx2(ArrowDownIcon, {}) : /* @__PURE__ */ jsx2(ArrowUpIcon, {})
3765
+ children: isFooterOpen ? /* @__PURE__ */ jsx3(ArrowDownIcon, {}) : /* @__PURE__ */ jsx3(ArrowUpIcon, {})
3751
3766
  }
3752
3767
  ) }),
3753
- /* @__PURE__ */ jsx2(
3768
+ /* @__PURE__ */ jsx3(
3754
3769
  "div",
3755
3770
  {
3756
3771
  style: isFooterOpen ? { maxHeight: "500px" } : { maxHeight: "0px" },
@@ -3769,7 +3784,7 @@ import React2, {
3769
3784
  useRef,
3770
3785
  useState as useState3
3771
3786
  } from "react";
3772
- import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
3787
+ import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
3773
3788
  function useFormValues(initial) {
3774
3789
  const reducer = (state, action) => {
3775
3790
  return { ...state, ...action };
@@ -3844,14 +3859,14 @@ function Form({
3844
3859
  }
3845
3860
  return child;
3846
3861
  }),
3847
- isLoading && /* @__PURE__ */ jsx3("div", { className: "fixed top-0 left-0 w-full h-screen flex items-center justify-center bg-white bg-opacity-50", children: /* @__PURE__ */ jsx3("div", { children: loader }) })
3862
+ isLoading && /* @__PURE__ */ jsx4("div", { className: "fixed top-0 left-0 w-full h-screen flex items-center justify-center bg-white bg-opacity-50", children: /* @__PURE__ */ jsx4("div", { children: loader }) })
3848
3863
  ]
3849
3864
  }
3850
3865
  );
3851
3866
  }
3852
3867
 
3853
3868
  // src/input/index.tsx
3854
- import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
3869
+ import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
3855
3870
  function Input({
3856
3871
  label,
3857
3872
  className,
@@ -3866,9 +3881,9 @@ function Input({
3866
3881
  /* @__PURE__ */ jsxs4("div", { className: "font-bold ", children: [
3867
3882
  label,
3868
3883
  " ",
3869
- (props == null ? void 0 : props.required) && /* @__PURE__ */ jsx4("span", { className: "text-red-500", children: "*" })
3884
+ (props == null ? void 0 : props.required) && /* @__PURE__ */ jsx5("span", { className: "text-red-500", children: "*" })
3870
3885
  ] }),
3871
- /* @__PURE__ */ jsx4("div", { children: /* @__PURE__ */ jsx4(
3886
+ /* @__PURE__ */ jsx5("div", { children: /* @__PURE__ */ jsx5(
3872
3887
  "input",
3873
3888
  {
3874
3889
  ...props,
@@ -3881,7 +3896,7 @@ function Input({
3881
3896
  }
3882
3897
  ) })
3883
3898
  ] }),
3884
- !isValid && value != "" && /* @__PURE__ */ jsx4("div", { className: "text-red-800 invalid", children: invalidMessage })
3899
+ !isValid && value != "" && /* @__PURE__ */ jsx5("div", { className: "text-red-800 invalid", children: invalidMessage })
3885
3900
  ] });
3886
3901
  }
3887
3902
 
@@ -3895,8 +3910,8 @@ var regular_expresions_default = regularExpresions;
3895
3910
 
3896
3911
  // src/table/index.tsx
3897
3912
  import { DataGrid } from "@mui/x-data-grid";
3898
- import { Box } from "@mui/material";
3899
- import React3, { useEffect as useEffect3, useMemo, useRef as useRef2, useState as useState4 } from "react";
3913
+ import { Box, Dialog } from "@mui/material";
3914
+ import React3, { useEffect as useEffect3, useMemo, useState as useState4 } from "react";
3900
3915
 
3901
3916
  // ../../node_modules/xlsx/xlsx.mjs
3902
3917
  var XLSX = {};
@@ -35659,26 +35674,19 @@ function useExcel() {
35659
35674
  }
35660
35675
 
35661
35676
  // src/table/index.tsx
35662
- import { Dialog } from "@mui/material";
35663
- import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
35664
- function Table(props) {
35665
- if (Array.isArray(props.data)) {
35666
- return /* @__PURE__ */ jsx5(IHTable, { ...props });
35667
- } else {
35668
- return /* @__PURE__ */ jsx5("div", { className: " bg-white border shadow rounded p-1", children: /* @__PURE__ */ jsx5("table", { className: "rounded", children: /* @__PURE__ */ jsx5("tbody", { children: Object.keys(props.data).map((k) => /* @__PURE__ */ jsxs5("tr", { className: "border-b ", children: [
35669
- /* @__PURE__ */ jsx5("th", { className: "font-bold p-3 text-right", children: k }),
35670
- /* @__PURE__ */ jsx5(
35671
- "td",
35672
- {
35673
- className: typeof props.data[k] === "number" ? "text-right" : "text-center",
35674
- children: props.data[k]
35675
- }
35676
- )
35677
- ] }, k)) }) }) });
35678
- }
35679
- }
35677
+ import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
35678
+ var HEIGHT_MAP = {
35679
+ 1: 150,
35680
+ 2: 200,
35681
+ 3: 250,
35682
+ 4: 310,
35683
+ 5: 360,
35684
+ 6: 410,
35685
+ 7: 460,
35686
+ 8: 510
35687
+ };
35680
35688
  function EditIcon() {
35681
- return /* @__PURE__ */ jsx5(
35689
+ return /* @__PURE__ */ jsx6(
35682
35690
  "svg",
35683
35691
  {
35684
35692
  stroke: "currentColor",
@@ -35688,69 +35696,146 @@ function EditIcon() {
35688
35696
  height: "20px",
35689
35697
  width: "20px",
35690
35698
  xmlns: "http://www.w3.org/2000/svg",
35691
- children: /* @__PURE__ */ jsx5("path", { d: "M402.6 83.2l90.2 90.2c3.8 3.8 3.8 10 0 13.8L274.4 405.6l-92.8 10.3c-12.4 1.4-22.9-9.1-21.5-21.5l10.3-92.8L388.8 83.2c3.8-3.8 10-3.8 13.8 0zm162-22.9l-48.8-48.8c-15.2-15.2-39.9-15.2-55.2 0l-35.4 35.4c-3.8 3.8-3.8 10 0 13.8l90.2 90.2c3.8 3.8 10 3.8 13.8 0l35.4-35.4c15.2-15.3 15.2-40 0-55.2zM384 346.2V448H64V128h229.8c3.2 0 6.2-1.3 8.5-3.5l40-40c7.6-7.6 2.2-20.5-8.5-20.5H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V306.2c0-10.7-12.9-16-20.5-8.5l-40 40c-2.2 2.3-3.5 5.3-3.5 8.5z" })
35699
+ children: /* @__PURE__ */ jsx6("path", { d: "M402.6 83.2l90.2 90.2c3.8 3.8 3.8 10 0 13.8L274.4 405.6l-92.8 10.3c-12.4 1.4-22.9-9.1-21.5-21.5l10.3-92.8L388.8 83.2c3.8-3.8 10-3.8 13.8 0zm162-22.9l-48.8-48.8c-15.2-15.2-39.9-15.2-55.2 0l-35.4 35.4c-3.8 3.8-3.8 10 0 13.8l90.2 90.2c3.8 3.8 10 3.8 13.8 0l35.4-35.4c15.2-15.3 15.2-40 0-55.2zM384 346.2V448H64V128h229.8c3.2 0 6.2-1.3 8.5-3.5l40-40c7.6-7.6 2.2-20.5-8.5-20.5H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V306.2c0-10.7-12.9-16-20.5-8.5l-40 40c-2.2 2.3-3.5 5.3-3.5 8.5z" })
35692
35700
  }
35693
35701
  );
35694
35702
  }
35695
- function IHTable({
35696
- data,
35697
- flex = 1,
35698
- editableFields,
35703
+ function KeyValueTable({ data }) {
35704
+ return /* @__PURE__ */ jsx6("div", { className: "bg-white border shadow rounded p-1", children: /* @__PURE__ */ jsx6("table", { className: "rounded", children: /* @__PURE__ */ jsx6("tbody", { children: Object.keys(data).map((key) => /* @__PURE__ */ jsxs5("tr", { className: "border-b", children: [
35705
+ /* @__PURE__ */ jsx6("th", { className: "font-bold p-3 text-right", children: key }),
35706
+ /* @__PURE__ */ jsx6(
35707
+ "td",
35708
+ {
35709
+ className: typeof data[key] === "number" ? "text-right" : "text-center",
35710
+ children: data[key]
35711
+ }
35712
+ )
35713
+ ] }, key)) }) }) });
35714
+ }
35715
+ var FOOTER_LABELS = {
35716
+ sum: "Suma",
35717
+ avg: "Promedio",
35718
+ count: "Conteo"
35719
+ };
35720
+ function computeAggregation(rows, key, type) {
35721
+ const values = rows.map((r) => {
35722
+ var _a;
35723
+ return Number((_a = r[key]) != null ? _a : 0);
35724
+ }).filter((v) => !isNaN(v));
35725
+ if (type === "sum") return values.reduce((acc, v) => acc + v, 0);
35726
+ if (type === "count") return values.length;
35727
+ if (type === "avg")
35728
+ return values.length ? values.reduce((acc, v) => acc + v, 0) / values.length : 0;
35729
+ return 0;
35730
+ }
35731
+ function CustomFooter({
35732
+ rows,
35733
+ footer
35734
+ }) {
35735
+ const entries = Object.entries(footer);
35736
+ if (!entries.length) return null;
35737
+ return /* @__PURE__ */ jsx6("div", { className: "flex justify-end gap-6 px-4 py-2 bg-gray-100 border-t border-gray-300 text-sm font-semibold text-gray-700", children: entries.map(([key, type]) => {
35738
+ const value = computeAggregation(rows, key, type);
35739
+ const formatted = type === "avg" ? value.toLocaleString(void 0, { maximumFractionDigits: 2 }) : value.toLocaleString();
35740
+ return /* @__PURE__ */ jsxs5("span", { children: [
35741
+ FOOTER_LABELS[type],
35742
+ " de",
35743
+ " ",
35744
+ /* @__PURE__ */ jsx6("span", { className: "text-gray-900", children: key }),
35745
+ ":",
35746
+ " ",
35747
+ /* @__PURE__ */ jsx6("span", { className: "text-blue-700", children: formatted })
35748
+ ] }, key);
35749
+ }) });
35750
+ }
35751
+ function ModalDialog({ open, onClose, modal, selectedRow }) {
35752
+ return /* @__PURE__ */ jsxs5(Dialog, { open, onClose, maxWidth: "xl", fullWidth: true, children: [
35753
+ /* @__PURE__ */ jsx6("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx6(
35754
+ "button",
35755
+ {
35756
+ onClick: onClose,
35757
+ className: "text-gray-500 hover:text-gray-800 text-xl font-bold p-5",
35758
+ children: "\xD7"
35759
+ }
35760
+ ) }),
35761
+ /* @__PURE__ */ jsx6("div", { className: "mt-4 m-auto p-5", children: selectedRow && React3.cloneElement(
35762
+ modal,
35763
+ { row: selectedRow }
35764
+ ) })
35765
+ ] });
35766
+ }
35767
+ function Toolbar({
35768
+ exportName,
35699
35769
  onSave,
35700
35770
  onSelect,
35701
- buttons,
35702
- exportName,
35703
- modal,
35704
- height = 600,
35705
- width = "100%",
35706
- header,
35707
- hideColumns = [],
35708
- footer
35771
+ rows,
35772
+ filteredRows
35709
35773
  }) {
35710
- const [open, setOpen] = useState4(false);
35711
- if (modal) {
35712
- buttons = { ...buttons, Modal: "" };
35713
- }
35714
- const handleOpen = () => setOpen(true);
35715
- const handleClose = () => {
35716
- setOpen(false);
35717
- setSelectedRows({
35718
- type: "include",
35719
- ids: /* @__PURE__ */ new Set()
35720
- });
35721
- };
35722
35774
  const excel = useExcel();
35723
- const [rows, setRows] = useState4(data);
35724
- const [selectedRows, setSelectedRows] = useState4();
35725
- useEffect3(() => {
35726
- setRows(data);
35727
- }, [data]);
35728
- const columns = useMemo(() => {
35775
+ const stripMeta = (r) => {
35776
+ const { _edited, ...rest } = r;
35777
+ return rest;
35778
+ };
35779
+ if (!exportName && !onSave && !onSelect) return null;
35780
+ return /* @__PURE__ */ jsxs5("div", { className: "flex gap-2 bg-gray-200 border shadow rounded p-2", children: [
35781
+ exportName && /* @__PURE__ */ jsx6(
35782
+ Button,
35783
+ {
35784
+ className: "bg-green-800 text-white",
35785
+ onClick: () => excel.export(rows.map(stripMeta), `${exportName}.xlsx`),
35786
+ children: "Exportar"
35787
+ }
35788
+ ),
35789
+ onSelect ? /* @__PURE__ */ jsx6(
35790
+ Button,
35791
+ {
35792
+ disabled: filteredRows.length === 0,
35793
+ color: filteredRows.length === 0 ? "white" : "primary",
35794
+ onClick: () => onSelect(filteredRows.map(stripMeta)),
35795
+ children: "Guardar Selecci\xF3n"
35796
+ }
35797
+ ) : onSave && /* @__PURE__ */ jsx6(Button, { onClick: () => onSave(rows.map(stripMeta)), children: "Guardar" })
35798
+ ] });
35799
+ }
35800
+ function useColumns(rows, options) {
35801
+ const {
35802
+ flex,
35803
+ editableFields,
35804
+ buttons,
35805
+ hideColumns,
35806
+ modal,
35807
+ handleRowUpdate,
35808
+ onModalOpen
35809
+ } = options;
35810
+ return useMemo(() => {
35729
35811
  if (!rows.length) return [];
35730
- const arr = Object.keys(rows[0]).filter((key) => !key.startsWith("_") && !hideColumns.includes(key)).map((key, i) => ({
35731
- field: key,
35732
- headerName: key,
35733
- flex,
35734
- editable: editableFields == null ? void 0 : editableFields.includes(key),
35735
- type: typeof rows[0][key] === "number" ? "number" : "string",
35736
- renderCell: (buttons == null ? void 0 : buttons[key]) ? (params) => {
35737
- var _a, _b;
35738
- return React3.cloneElement(buttons[key], {
35739
- className: ((_a = params == null ? void 0 : params.className) != null ? _a : "") + " m-auto text-xs ",
35740
- children: (_b = params == null ? void 0 : params.row) == null ? void 0 : _b[key],
35741
- onClick: (e) => {
35742
- var _a2, _b2;
35743
- e.row = params == null ? void 0 : params.row;
35744
- if ((_b2 = (_a2 = buttons[key]) == null ? void 0 : _a2.props) == null ? void 0 : _b2.onClick) {
35745
- const newVal = buttons[key].props.onClick(e);
35746
- newVal && handleRowUpdate(newVal);
35812
+ const cols = Object.keys(rows[0]).filter((key) => !key.startsWith("_") && !hideColumns.includes(key)).map((key) => {
35813
+ var _a;
35814
+ return {
35815
+ field: key,
35816
+ headerName: key,
35817
+ flex,
35818
+ editable: (_a = editableFields == null ? void 0 : editableFields.includes(key)) != null ? _a : false,
35819
+ type: typeof rows[0][key] === "number" ? "number" : "string",
35820
+ renderCell: (buttons == null ? void 0 : buttons[key]) ? (params) => {
35821
+ var _a2, _b;
35822
+ return React3.cloneElement(buttons[key], {
35823
+ className: `${(_a2 = params == null ? void 0 : params.className) != null ? _a2 : ""} m-auto text-xs`,
35824
+ children: (_b = params == null ? void 0 : params.row) == null ? void 0 : _b[key],
35825
+ onClick: (e) => {
35826
+ var _a3, _b2;
35827
+ e.row = params == null ? void 0 : params.row;
35828
+ if ((_b2 = (_a3 = buttons[key]) == null ? void 0 : _a3.props) == null ? void 0 : _b2.onClick) {
35829
+ const newVal = buttons[key].props.onClick(e);
35830
+ if (newVal) handleRowUpdate(newVal);
35831
+ }
35747
35832
  }
35748
- }
35749
- });
35750
- } : null
35751
- }));
35833
+ });
35834
+ } : null
35835
+ };
35836
+ });
35752
35837
  if (modal) {
35753
- arr.unshift({
35838
+ cols.unshift({
35754
35839
  field: "Modal",
35755
35840
  headerName: "Modal",
35756
35841
  flex,
@@ -35758,179 +35843,158 @@ function IHTable({
35758
35843
  type: "string",
35759
35844
  renderCell: (params) => {
35760
35845
  var _a;
35761
- return /* @__PURE__ */ jsx5(
35846
+ return /* @__PURE__ */ jsx6(
35762
35847
  Button,
35763
35848
  {
35764
35849
  className: "text-xs",
35765
- onClick: () => {
35766
- handleOpen();
35767
- },
35768
- icon: /* @__PURE__ */ jsx5(EditIcon, {}),
35850
+ onClick: () => onModalOpen(params.row),
35851
+ icon: /* @__PURE__ */ jsx6(EditIcon, {}),
35769
35852
  children: (_a = params == null ? void 0 : params.row) == null ? void 0 : _a["Modal"]
35770
35853
  }
35771
35854
  );
35772
35855
  }
35773
35856
  });
35774
35857
  }
35775
- return arr;
35858
+ return cols;
35776
35859
  }, [rows]);
35860
+ }
35861
+ function IHTable({
35862
+ data,
35863
+ flex = 1,
35864
+ editableFields,
35865
+ onSave,
35866
+ onSelect,
35867
+ buttons,
35868
+ exportName,
35869
+ modal,
35870
+ height = 510,
35871
+ width = "100%",
35872
+ header,
35873
+ hideColumns = [],
35874
+ footer = {}
35875
+ }) {
35876
+ var _a;
35877
+ if (modal && onSelect)
35878
+ throw new Error("Solo se puede usar modal o onSelect por separado");
35879
+ const [open, setOpen] = useState4(false);
35880
+ const [rows, setRows] = useState4(data);
35881
+ const [selectedRows, setSelectedRows] = useState4({
35882
+ type: "include",
35883
+ ids: /* @__PURE__ */ new Set()
35884
+ });
35885
+ const [modalRow, setModalRow] = useState4();
35886
+ const resolvedButtons = modal ? { ...buttons, Modal: "" } : buttons;
35887
+ useEffect3(() => {
35888
+ setRows(data);
35889
+ }, [data]);
35890
+ const handleModalOpen = (row) => {
35891
+ setModalRow(row);
35892
+ setOpen(true);
35893
+ };
35894
+ const handleClose = () => {
35895
+ setOpen(false);
35896
+ setModalRow(void 0);
35897
+ };
35777
35898
  const handleRowUpdate = (newRow) => {
35778
35899
  if (!newRow.id) throw new Error("Fila sin id");
35779
- newRow._edited = true;
35780
- setRows((prev) => prev.map((row) => row.id === newRow.id ? newRow : row));
35781
- return newRow;
35782
- };
35783
- const ref = useRef2(null);
35784
- const cat1 = {
35785
- 1: 110,
35786
- 2: 160,
35787
- 3: 215,
35788
- 4: 266,
35789
- 5: 316
35900
+ const updated = { ...newRow, _edited: true };
35901
+ setRows(
35902
+ (prev) => prev.map((row) => row.id === updated.id ? updated : row)
35903
+ );
35904
+ return updated;
35790
35905
  };
35791
- const filtered = useMemo(() => {
35792
- let filtered2 = [];
35793
- if ((selectedRows == null ? void 0 : selectedRows.type) == "exclude") {
35794
- filtered2 = rows.filter(
35795
- (r) => !Array.from(selectedRows.ids).includes(r.id)
35796
- );
35797
- } else if ((selectedRows == null ? void 0 : selectedRows.type) == "include") {
35798
- filtered2 = rows.filter(
35799
- (r) => Array.from(selectedRows.ids).includes(r.id)
35800
- );
35801
- }
35802
- return filtered2;
35803
- }, [selectedRows]);
35804
- return rows.length > 0 && /* @__PURE__ */ jsxs5(
35906
+ const filteredRows = useMemo(() => {
35907
+ if ((selectedRows == null ? void 0 : selectedRows.type) === "exclude") {
35908
+ return rows.filter((r) => !Array.from(selectedRows.ids).includes(r.id));
35909
+ }
35910
+ if ((selectedRows == null ? void 0 : selectedRows.type) === "include") {
35911
+ return rows.filter((r) => Array.from(selectedRows.ids).includes(r.id));
35912
+ }
35913
+ return [];
35914
+ }, [selectedRows, rows]);
35915
+ const columns = useColumns(rows, {
35916
+ flex,
35917
+ editableFields,
35918
+ buttons: resolvedButtons,
35919
+ hideColumns,
35920
+ modal,
35921
+ handleRowUpdate,
35922
+ onModalOpen: handleModalOpen
35923
+ });
35924
+ if (!rows.length) return null;
35925
+ return /* @__PURE__ */ jsxs5(
35805
35926
  Box,
35806
35927
  {
35807
35928
  sx: {
35808
35929
  display: "flex",
35809
35930
  flexDirection: "column",
35810
- height: (cat1 == null ? void 0 : cat1[height]) || height,
35931
+ height: (_a = HEIGHT_MAP[rows.length]) != null ? _a : height,
35811
35932
  width,
35812
35933
  zIndex: 999999999
35813
35934
  },
35814
35935
  children: [
35815
- modal && /* @__PURE__ */ jsxs5(Dialog, { open, onClose: handleClose, maxWidth: "xl", fullWidth: true, children: [
35816
- /* @__PURE__ */ jsx5("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx5(
35817
- "button",
35818
- {
35819
- onClick: () => {
35820
- handleClose();
35821
- },
35822
- className: "text-gray-500 hover:text-gray-800 text-xl font-bold p-5",
35823
- children: "\xD7"
35824
- }
35825
- ) }),
35826
- /* @__PURE__ */ jsx5("div", { className: "mt-4 m-auto p-5", children: selectedRows && Array.from(selectedRows == null ? void 0 : selectedRows.ids).length > 0 && React3.cloneElement(modal, {
35827
- row: rows.find(
35828
- (r) => Array.from(selectedRows == null ? void 0 : selectedRows.ids).includes(r.id)
35829
- )
35830
- }) })
35831
- ] }),
35832
- header && /* @__PURE__ */ jsx5("div", { className: "font-bold text-xl p-2 bg-blue-500 text-white border shadow rounded", children: header }),
35833
- (exportName || onSave || onSelect) && /* @__PURE__ */ jsxs5("div", { className: "flex gap-2 bg-gray-200 border shadow rounded p-2", children: [
35834
- exportName && /* @__PURE__ */ jsx5(
35835
- Button,
35836
- {
35837
- className: "bg-green-800 text-white",
35838
- onClick: (e) => {
35839
- excel.export(
35840
- rows.map(({ _edited, ...r }) => r),
35841
- `${exportName}.xlsx`
35842
- );
35843
- },
35844
- children: "Exportar"
35845
- }
35846
- ),
35847
- onSelect ? /* @__PURE__ */ jsx5(
35848
- Button,
35849
- {
35850
- disabled: filtered.length == 0,
35851
- color: filtered.length == 0 ? "white" : "primary",
35852
- onClick: (e) => {
35853
- onSelect == null ? void 0 : onSelect(filtered.map(({ _edited, ...r }) => r));
35854
- },
35855
- children: "Guardar Selecci\xF3n"
35856
- }
35857
- ) : onSave && /* @__PURE__ */ jsx5(
35858
- Button,
35859
- {
35860
- onClick: (e) => {
35861
- onSave == null ? void 0 : onSave(rows.map(({ _edited, ...r }) => r));
35862
- },
35863
- children: "Guardar"
35864
- }
35865
- )
35866
- ] }),
35867
- /* @__PURE__ */ jsx5(
35936
+ modal && /* @__PURE__ */ jsx6(
35937
+ ModalDialog,
35938
+ {
35939
+ open,
35940
+ onClose: handleClose,
35941
+ modal,
35942
+ selectedRow: modalRow
35943
+ }
35944
+ ),
35945
+ header && /* @__PURE__ */ jsx6("div", { className: "font-bold text-xl p-2 bg-blue-500 text-white border shadow rounded", children: header }),
35946
+ /* @__PURE__ */ jsx6(
35947
+ Toolbar,
35948
+ {
35949
+ exportName,
35950
+ onSave,
35951
+ onSelect,
35952
+ rows,
35953
+ filteredRows
35954
+ }
35955
+ ),
35956
+ /* @__PURE__ */ jsx6(
35868
35957
  DataGrid,
35869
35958
  {
35870
35959
  rows,
35871
35960
  columns,
35872
35961
  checkboxSelection: Boolean(onSelect),
35873
35962
  rowSelectionModel: selectedRows,
35874
- onRowSelectionModelChange: (newSelection) => {
35875
- setSelectedRows(newSelection);
35876
- },
35963
+ onRowSelectionModelChange: !modal ? setSelectedRows : void 0,
35877
35964
  sx: {
35878
35965
  "& .MuiDataGrid-cell--editable": {
35879
35966
  backgroundColor: "#c6d8f0",
35880
35967
  fontWeight: 500
35968
+ },
35969
+ ...rows.length <= Object.keys(HEIGHT_MAP).length && {
35970
+ "& .MuiDataGrid-filler": {
35971
+ display: "none"
35972
+ }
35881
35973
  }
35882
35974
  },
35883
35975
  editMode: "row",
35884
35976
  processRowUpdate: handleRowUpdate,
35885
- pageSizeOptions: [5, 10]
35977
+ pageSizeOptions: [5, 10],
35978
+ hideFooter: rows.length <= Object.keys(HEIGHT_MAP).length
35886
35979
  }
35887
35980
  ),
35888
- /* @__PURE__ */ jsx5(CustomFooter, { footer: footer || {}, rows })
35981
+ /* @__PURE__ */ jsx6(CustomFooter, { footer, rows })
35889
35982
  ]
35890
35983
  }
35891
35984
  );
35892
35985
  }
35893
- function CustomFooter({
35894
- rows,
35895
- footer
35896
- }) {
35897
- const entries = Object.entries(footer);
35898
- if (!entries.length) return null;
35899
- const compute = (key, type) => {
35900
- const values = rows.map((r) => {
35901
- var _a;
35902
- return Number((_a = r[key]) != null ? _a : 0);
35903
- }).filter((v) => !isNaN(v));
35904
- if (type === "sum") return values.reduce((acc, v) => acc + v, 0);
35905
- if (type === "avg")
35906
- return values.length ? values.reduce((acc, v) => acc + v, 0) / values.length : 0;
35907
- if (type === "count") return values.length;
35908
- return 0;
35909
- };
35910
- const label = {
35911
- sum: "Suma",
35912
- avg: "Promedio",
35913
- count: "Conteo"
35914
- };
35915
- return /* @__PURE__ */ jsx5("div", { className: "flex justify-end gap-6 px-4 py-2 bg-gray-100 border-t border-gray-300 text-sm font-semibold text-gray-700", children: entries.map(([key, type]) => {
35916
- const value = compute(key, type);
35917
- const formatted = type === "avg" ? value.toLocaleString(void 0, { maximumFractionDigits: 2 }) : value.toLocaleString();
35918
- return /* @__PURE__ */ jsxs5("span", { children: [
35919
- label[type],
35920
- " de ",
35921
- /* @__PURE__ */ jsx5("span", { className: "text-gray-900", children: key }),
35922
- ":",
35923
- " ",
35924
- /* @__PURE__ */ jsx5("span", { className: "text-blue-700", children: formatted })
35925
- ] }, key);
35926
- }) });
35986
+ function Table(props) {
35987
+ if (Array.isArray(props.data)) {
35988
+ return /* @__PURE__ */ jsx6(IHTable, { ...props });
35989
+ }
35990
+ return /* @__PURE__ */ jsx6(KeyValueTable, { data: props.data });
35927
35991
  }
35928
35992
 
35929
35993
  // src/text-area/index.tsx
35930
35994
  import {
35931
35995
  useState as useState5
35932
35996
  } from "react";
35933
- import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
35997
+ import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
35934
35998
  function TextArea({
35935
35999
  label,
35936
36000
  className,
@@ -35940,14 +36004,14 @@ function TextArea({
35940
36004
  ...props
35941
36005
  }) {
35942
36006
  const [value, setValue] = useState5((props == null ? void 0 : props.value) || "");
35943
- return /* @__PURE__ */ jsx6("div", { className: "w-full", children: /* @__PURE__ */ jsxs6("label", { className: "flex flex-col gap-1", children: [
36007
+ return /* @__PURE__ */ jsx7("div", { className: "w-full", children: /* @__PURE__ */ jsxs6("label", { className: "flex flex-col gap-1", children: [
35944
36008
  /* @__PURE__ */ jsxs6("div", { className: "font-bold ", children: [
35945
36009
  label,
35946
36010
  " ",
35947
- (props == null ? void 0 : props.required) && /* @__PURE__ */ jsx6("span", { className: "text-red-500", children: "*" })
36011
+ (props == null ? void 0 : props.required) && /* @__PURE__ */ jsx7("span", { className: "text-red-500", children: "*" })
35948
36012
  ] }),
35949
36013
  /* @__PURE__ */ jsxs6("div", { children: [
35950
- /* @__PURE__ */ jsx6(
36014
+ /* @__PURE__ */ jsx7(
35951
36015
  "textarea",
35952
36016
  {
35953
36017
  ...props,
@@ -36468,9 +36532,9 @@ import React5, {
36468
36532
  } from "react";
36469
36533
 
36470
36534
  // src/select/icon.tsx
36471
- import { jsx as jsx7 } from "react/jsx-runtime";
36535
+ import { jsx as jsx8 } from "react/jsx-runtime";
36472
36536
  function SelectIcon() {
36473
- return /* @__PURE__ */ jsx7(
36537
+ return /* @__PURE__ */ jsx8(
36474
36538
  "svg",
36475
36539
  {
36476
36540
  stroke: "currentColor",
@@ -36480,15 +36544,15 @@ function SelectIcon() {
36480
36544
  height: "20px",
36481
36545
  width: "20px",
36482
36546
  xmlns: "http://www.w3.org/2000/svg",
36483
- children: /* @__PURE__ */ jsx7("path", { d: "M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z" })
36547
+ children: /* @__PURE__ */ jsx8("path", { d: "M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z" })
36484
36548
  }
36485
36549
  );
36486
36550
  }
36487
36551
 
36488
36552
  // src/select/close.tsx
36489
- import { jsx as jsx8 } from "react/jsx-runtime";
36553
+ import { jsx as jsx9 } from "react/jsx-runtime";
36490
36554
  function CloseIcon() {
36491
- return /* @__PURE__ */ jsx8(
36555
+ return /* @__PURE__ */ jsx9(
36492
36556
  "svg",
36493
36557
  {
36494
36558
  stroke: "currentColor",
@@ -36498,13 +36562,13 @@ function CloseIcon() {
36498
36562
  height: "20px",
36499
36563
  width: "20px",
36500
36564
  xmlns: "http://www.w3.org/2000/svg",
36501
- children: /* @__PURE__ */ jsx8("path", { d: "M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208 208-93.31 208-208S370.69 48 256 48zm86.63 272L320 342.63l-64-64-64 64L169.37 320l64-64-64-64L192 169.37l64 64 64-64L342.63 192l-64 64z" })
36565
+ children: /* @__PURE__ */ jsx9("path", { d: "M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208 208-93.31 208-208S370.69 48 256 48zm86.63 272L320 342.63l-64-64-64 64L169.37 320l64-64-64-64L192 169.37l64 64 64-64L342.63 192l-64 64z" })
36502
36566
  }
36503
36567
  );
36504
36568
  }
36505
36569
 
36506
36570
  // src/select/index.tsx
36507
- import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
36571
+ import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
36508
36572
  function Select({
36509
36573
  label,
36510
36574
  placeholder = "Selecciona...",
@@ -36588,10 +36652,10 @@ function Select({
36588
36652
  label && /* @__PURE__ */ jsxs7("label", { className: "font-bold mb-1 block", children: [
36589
36653
  label,
36590
36654
  " ",
36591
- (props == null ? void 0 : props.required) && /* @__PURE__ */ jsx9("span", { className: "text-red-500", children: "*" })
36655
+ (props == null ? void 0 : props.required) && /* @__PURE__ */ jsx10("span", { className: "text-red-500", children: "*" })
36592
36656
  ] }),
36593
36657
  /* @__PURE__ */ jsxs7("div", { className: "relative", children: [
36594
- /* @__PURE__ */ jsx9(
36658
+ /* @__PURE__ */ jsx10(
36595
36659
  "input",
36596
36660
  {
36597
36661
  autoComplete: "off",
@@ -36630,8 +36694,8 @@ function Select({
36630
36694
  onKeyDown: handleKeyDown
36631
36695
  }
36632
36696
  ),
36633
- !isOpen && /* @__PURE__ */ jsx9("div", { className: "absolute top-0 right-0 flex flex-col justify-center items-center px-2 py-2 font-bold", children: /* @__PURE__ */ jsx9(SelectIcon, {}) }),
36634
- isOpen && inputValue != "" && /* @__PURE__ */ jsx9(
36697
+ !isOpen && /* @__PURE__ */ jsx10("div", { className: "absolute top-0 right-0 flex flex-col justify-center items-center px-2 py-2 font-bold", children: /* @__PURE__ */ jsx10(SelectIcon, {}) }),
36698
+ isOpen && inputValue != "" && /* @__PURE__ */ jsx10(
36635
36699
  "button",
36636
36700
  {
36637
36701
  onClick: (e) => {
@@ -36646,15 +36710,15 @@ function Select({
36646
36710
  },
36647
36711
  className: "absolute top-0 right-0 flex flex-col justify-center items-center px-2 py-2 font-bold text-red-500",
36648
36712
  style: { zIndex: 999999999 },
36649
- children: /* @__PURE__ */ jsx9(CloseIcon, {})
36713
+ children: /* @__PURE__ */ jsx10(CloseIcon, {})
36650
36714
  }
36651
36715
  ),
36652
- isOpen && filtered.length > 0 && /* @__PURE__ */ jsx9(
36716
+ isOpen && filtered.length > 0 && /* @__PURE__ */ jsx10(
36653
36717
  "div",
36654
36718
  {
36655
36719
  style: { zIndex: 9999999999 },
36656
36720
  className: `absolute w-full border rounded shadow bg-white z-10 max-h-100 overflow-y-auto ${openUpwards ? "bottom-full mb-1" : "mt-1"}`,
36657
- children: filtered.map((opt, index) => /* @__PURE__ */ jsx9(
36721
+ children: filtered.map((opt, index) => /* @__PURE__ */ jsx10(
36658
36722
  "div",
36659
36723
  {
36660
36724
  className: `p-2 cursor-pointer ${index === highlightedIndex ? "bg-blue-100" : "hover:bg-gray-100"}`,
@@ -36690,7 +36754,7 @@ function Select({
36690
36754
  }
36691
36755
  )
36692
36756
  ] }),
36693
- isOpen && /* @__PURE__ */ jsx9(
36757
+ isOpen && /* @__PURE__ */ jsx10(
36694
36758
  "div",
36695
36759
  {
36696
36760
  style: { zIndex: 1 },
@@ -36708,9 +36772,9 @@ function Select({
36708
36772
  import React6, { useState as useState8 } from "react";
36709
36773
 
36710
36774
  // src/modal/close.tsx
36711
- import { jsx as jsx10 } from "react/jsx-runtime";
36775
+ import { jsx as jsx11 } from "react/jsx-runtime";
36712
36776
  function CloseIcon2() {
36713
- return /* @__PURE__ */ jsx10(
36777
+ return /* @__PURE__ */ jsx11(
36714
36778
  "svg",
36715
36779
  {
36716
36780
  stroke: "currentColor",
@@ -36720,14 +36784,14 @@ function CloseIcon2() {
36720
36784
  height: "20px",
36721
36785
  width: "20px",
36722
36786
  xmlns: "http://www.w3.org/2000/svg",
36723
- children: /* @__PURE__ */ jsx10("path", { d: "M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208 208-93.31 208-208S370.69 48 256 48zm86.63 272L320 342.63l-64-64-64 64L169.37 320l64-64-64-64L192 169.37l64 64 64-64L342.63 192l-64 64z" })
36787
+ children: /* @__PURE__ */ jsx11("path", { d: "M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208 208-93.31 208-208S370.69 48 256 48zm86.63 272L320 342.63l-64-64-64 64L169.37 320l64-64-64-64L192 169.37l64 64 64-64L342.63 192l-64 64z" })
36724
36788
  }
36725
36789
  );
36726
36790
  }
36727
36791
 
36728
36792
  // src/modal/index.tsx
36729
36793
  import { Dialog as Dialog2 } from "@mui/material";
36730
- import { Fragment as Fragment2, jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
36794
+ import { Fragment as Fragment2, jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
36731
36795
  function Modal({ button, children, ref, title = "" }) {
36732
36796
  const [open, setOpen] = useState8(false);
36733
36797
  function show() {
@@ -36751,17 +36815,17 @@ function Modal({ button, children, ref, title = "" }) {
36751
36815
  }
36752
36816
  return child;
36753
36817
  }),
36754
- /* @__PURE__ */ jsx11(Dialog2, { open, onClose: hide, fullWidth: true, maxWidth: "xl", children: /* @__PURE__ */ jsxs8("div", { className: "m-auto p-5", children: [
36755
- /* @__PURE__ */ jsx11(
36818
+ /* @__PURE__ */ jsx12(Dialog2, { open, onClose: hide, fullWidth: true, maxWidth: "xl", children: /* @__PURE__ */ jsxs8("div", { className: "m-auto p-5", children: [
36819
+ /* @__PURE__ */ jsx12(
36756
36820
  "button",
36757
36821
  {
36758
36822
  onClick: hide,
36759
36823
  className: "absolute top-0 right-0 text-red-500 ",
36760
- children: /* @__PURE__ */ jsx11(CloseIcon2, {})
36824
+ children: /* @__PURE__ */ jsx12(CloseIcon2, {})
36761
36825
  }
36762
36826
  ),
36763
- /* @__PURE__ */ jsx11("div", { className: "font-bold text-xl", children: title }),
36764
- /* @__PURE__ */ jsx11("div", { className: "flex flex-col gap-3 pt-6", children: React6.Children.map(children, (child) => {
36827
+ /* @__PURE__ */ jsx12("div", { className: "font-bold text-xl", children: title }),
36828
+ /* @__PURE__ */ jsx12("div", { className: "flex flex-col gap-3 pt-6", children: React6.Children.map(children, (child) => {
36765
36829
  if (React6.isValidElement(child)) {
36766
36830
  const { type, props } = child;
36767
36831
  return React6.createElement(type, { ...props, hide });
@@ -36773,10 +36837,10 @@ function Modal({ button, children, ref, title = "" }) {
36773
36837
  }
36774
36838
 
36775
36839
  // src/pre/index.tsx
36776
- import { jsx as jsx12 } from "react/jsx-runtime";
36840
+ import { jsx as jsx13 } from "react/jsx-runtime";
36777
36841
  var Pre = ({ data }) => {
36778
36842
  const formatted = JSON.stringify(data, null, 2);
36779
- return /* @__PURE__ */ jsx12(
36843
+ return /* @__PURE__ */ jsx13(
36780
36844
  "pre",
36781
36845
  {
36782
36846
  style: {
@@ -36827,9 +36891,9 @@ import {
36827
36891
  import DatePicker from "react-datepicker";
36828
36892
 
36829
36893
  // src/calendar/calendar.icon.tsx
36830
- import { jsx as jsx13 } from "react/jsx-runtime";
36894
+ import { jsx as jsx14 } from "react/jsx-runtime";
36831
36895
  function CalendarIcon() {
36832
- return /* @__PURE__ */ jsx13(
36896
+ return /* @__PURE__ */ jsx14(
36833
36897
  "svg",
36834
36898
  {
36835
36899
  stroke: "currentColor",
@@ -36839,14 +36903,14 @@ function CalendarIcon() {
36839
36903
  height: "20px",
36840
36904
  width: "20px",
36841
36905
  xmlns: "http://www.w3.org/2000/svg",
36842
- children: /* @__PURE__ */ jsx13("path", { d: "M12 192h424c6.6 0 12 5.4 12 12v260c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V204c0-6.6 5.4-12 12-12zm436-44v-36c0-26.5-21.5-48-48-48h-48V12c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v52H160V12c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v52H48C21.5 64 0 85.5 0 112v36c0 6.6 5.4 12 12 12h424c6.6 0 12-5.4 12-12z" })
36906
+ children: /* @__PURE__ */ jsx14("path", { d: "M12 192h424c6.6 0 12 5.4 12 12v260c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V204c0-6.6 5.4-12 12-12zm436-44v-36c0-26.5-21.5-48-48-48h-48V12c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v52H160V12c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v52H48C21.5 64 0 85.5 0 112v36c0 6.6 5.4 12 12 12h424c6.6 0 12-5.4 12-12z" })
36843
36907
  }
36844
36908
  );
36845
36909
  }
36846
36910
 
36847
36911
  // src/calendar/index.tsx
36848
36912
  import { Dialog as Dialog3 } from "@mui/material";
36849
- import { jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
36913
+ import { jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
36850
36914
  function MyCalendar({
36851
36915
  enabledDates,
36852
36916
  onChange,
@@ -36882,15 +36946,15 @@ function MyCalendar({
36882
36946
  /* @__PURE__ */ jsxs9("div", { className: "font-bold", children: [
36883
36947
  label,
36884
36948
  " ",
36885
- (otherProps == null ? void 0 : otherProps.required) && /* @__PURE__ */ jsx14("span", { className: "text-red-500", children: "*" })
36949
+ (otherProps == null ? void 0 : otherProps.required) && /* @__PURE__ */ jsx15("span", { className: "text-red-500", children: "*" })
36886
36950
  ] }),
36887
- /* @__PURE__ */ jsx14("div", { children: /* @__PURE__ */ jsxs9(
36951
+ /* @__PURE__ */ jsx15("div", { children: /* @__PURE__ */ jsxs9(
36888
36952
  "div",
36889
36953
  {
36890
36954
  className: "cursor-pointer flex items-center justify-center",
36891
36955
  onClick: (e) => setOpen(true),
36892
36956
  children: [
36893
- /* @__PURE__ */ jsx14(
36957
+ /* @__PURE__ */ jsx15(
36894
36958
  "input",
36895
36959
  {
36896
36960
  ...otherProps,
@@ -36905,13 +36969,13 @@ function MyCalendar({
36905
36969
  readOnly: true
36906
36970
  }
36907
36971
  ),
36908
- /* @__PURE__ */ jsx14("div", { className: "absolute", style: { right: "10px" }, children: /* @__PURE__ */ jsx14(CalendarIcon, {}) })
36972
+ /* @__PURE__ */ jsx15("div", { className: "absolute", style: { right: "10px" }, children: /* @__PURE__ */ jsx15(CalendarIcon, {}) })
36909
36973
  ]
36910
36974
  }
36911
36975
  ) })
36912
36976
  ] }),
36913
36977
  /* @__PURE__ */ jsxs9(Dialog3, { open, children: [
36914
- /* @__PURE__ */ jsx14("div", { className: "flex justify-end p-5 font-bold", children: /* @__PURE__ */ jsx14(
36978
+ /* @__PURE__ */ jsx15("div", { className: "flex justify-end p-5 font-bold", children: /* @__PURE__ */ jsx15(
36915
36979
  "button",
36916
36980
  {
36917
36981
  className: " border-lg w-[20px] bg-red-500 text-white shadow rounded",
@@ -36919,7 +36983,7 @@ function MyCalendar({
36919
36983
  children: "x"
36920
36984
  }
36921
36985
  ) }),
36922
- /* @__PURE__ */ jsx14("div", { className: " w-[300px] flex items-start justify-center h-[300px] p-5", children: /* @__PURE__ */ jsx14(
36986
+ /* @__PURE__ */ jsx15("div", { className: " w-[300px] flex items-start justify-center h-[300px] p-5", children: /* @__PURE__ */ jsx15(
36923
36987
  DatePicker,
36924
36988
  {
36925
36989
  inline: true,
@@ -36933,9 +36997,9 @@ function MyCalendar({
36933
36997
  }
36934
36998
 
36935
36999
  // src/doc-viewer/icon.tsx
36936
- import { jsx as jsx15 } from "react/jsx-runtime";
37000
+ import { jsx as jsx16 } from "react/jsx-runtime";
36937
37001
  function Icon() {
36938
- return /* @__PURE__ */ jsx15(
37002
+ return /* @__PURE__ */ jsx16(
36939
37003
  "svg",
36940
37004
  {
36941
37005
  stroke: "currentColor",
@@ -36945,13 +37009,13 @@ function Icon() {
36945
37009
  height: "200px",
36946
37010
  width: "200px",
36947
37011
  xmlns: "http://www.w3.org/2000/svg",
36948
- children: /* @__PURE__ */ jsx15("path", { d: "M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v88a6,6,0,0,0,12,0V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216a2,2,0,0,1-2,2H176a6,6,0,0,0,0,12h24a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM108,130a50,50,0,0,0-46.66,32H60a34,34,0,0,0,0,68h48a50,50,0,0,0,0-100Zm0,88H60a22,22,0,0,1-1.65-43.94c-.06.47-.1.93-.15,1.4a6,6,0,1,0,12,1.08A38.57,38.57,0,0,1,71.3,170a5.71,5.71,0,0,0,.24-.86A38,38,0,1,1,108,218Z" })
37012
+ children: /* @__PURE__ */ jsx16("path", { d: "M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v88a6,6,0,0,0,12,0V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216a2,2,0,0,1-2,2H176a6,6,0,0,0,0,12h24a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM108,130a50,50,0,0,0-46.66,32H60a34,34,0,0,0,0,68h48a50,50,0,0,0,0-100Zm0,88H60a22,22,0,0,1-1.65-43.94c-.06.47-.1.93-.15,1.4a6,6,0,1,0,12,1.08A38.57,38.57,0,0,1,71.3,170a5.71,5.71,0,0,0,.24-.86A38,38,0,1,1,108,218Z" })
36949
37013
  }
36950
37014
  );
36951
37015
  }
36952
37016
 
36953
37017
  // src/doc-viewer/index.tsx
36954
- import { jsx as jsx16, jsxs as jsxs10 } from "react/jsx-runtime";
37018
+ import { jsx as jsx17, jsxs as jsxs10 } from "react/jsx-runtime";
36955
37019
  function DocumentViewer({ item }) {
36956
37020
  const { url, name, contentType, width = "100%", height = "100%" } = item;
36957
37021
  const isImage = contentType.startsWith("image/");
@@ -36962,8 +37026,8 @@ function DocumentViewer({ item }) {
36962
37026
  )}&embedded=true` : url;
36963
37027
  return /* @__PURE__ */ jsxs10("div", { className: "border shadow rounded p-2 h-[100%]", children: [
36964
37028
  /* @__PURE__ */ jsxs10("div", { className: "mb-1 flex justify-between ", children: [
36965
- /* @__PURE__ */ jsx16("h3", { className: "font-bold", children: name }),
36966
- /* @__PURE__ */ jsx16(
37029
+ /* @__PURE__ */ jsx17("h3", { className: "font-bold", children: name }),
37030
+ /* @__PURE__ */ jsx17(
36967
37031
  "a",
36968
37032
  {
36969
37033
  href: url,
@@ -36975,7 +37039,7 @@ function DocumentViewer({ item }) {
36975
37039
  }
36976
37040
  )
36977
37041
  ] }),
36978
- isImage ? /* @__PURE__ */ jsx16(
37042
+ isImage ? /* @__PURE__ */ jsx17(
36979
37043
  "img",
36980
37044
  {
36981
37045
  src: url,
@@ -36988,7 +37052,7 @@ function DocumentViewer({ item }) {
36988
37052
  display: "block"
36989
37053
  }
36990
37054
  }
36991
- ) : isGoogleDocCompatible ? /* @__PURE__ */ jsx16(
37055
+ ) : isGoogleDocCompatible ? /* @__PURE__ */ jsx17(
36992
37056
  "iframe",
36993
37057
  {
36994
37058
  title: name,
@@ -36996,7 +37060,7 @@ function DocumentViewer({ item }) {
36996
37060
  style: { width, height, border: "none" },
36997
37061
  allowFullScreen: true
36998
37062
  }
36999
- ) : /* @__PURE__ */ jsx16(
37063
+ ) : /* @__PURE__ */ jsx17(
37000
37064
  "div",
37001
37065
  {
37002
37066
  style: {
@@ -37006,7 +37070,7 @@ function DocumentViewer({ item }) {
37006
37070
  objectFit: "cover",
37007
37071
  display: "block"
37008
37072
  },
37009
- children: /* @__PURE__ */ jsx16(Icon, {})
37073
+ children: /* @__PURE__ */ jsx17(Icon, {})
37010
37074
  }
37011
37075
  )
37012
37076
  ] });
@@ -37025,9 +37089,9 @@ import React9, {
37025
37089
  import { useEffect as useEffect7, useMemo as useMemo4, useState as useState10 } from "react";
37026
37090
 
37027
37091
  // src/table3/filters.tsx
37028
- import { jsx as jsx17, jsxs as jsxs11 } from "react/jsx-runtime";
37092
+ import { jsx as jsx18, jsxs as jsxs11 } from "react/jsx-runtime";
37029
37093
  function FilterOffIcon() {
37030
- return /* @__PURE__ */ jsx17(
37094
+ return /* @__PURE__ */ jsx18(
37031
37095
  "svg",
37032
37096
  {
37033
37097
  stroke: "currentColor",
@@ -37037,12 +37101,12 @@ function FilterOffIcon() {
37037
37101
  height: "20px",
37038
37102
  width: "20px",
37039
37103
  xmlns: "http://www.w3.org/2000/svg",
37040
- children: /* @__PURE__ */ jsx17("path", { d: "M6.92893 0.514648L21.0711 14.6568L19.6569 16.071L15.834 12.2486L14 14.9999V21.9999H10V14.9999L4 5.99993H3V3.99993L7.585 3.99965L5.51472 1.92886L6.92893 0.514648ZM21 3.99993V5.99993H20L18.085 8.87193L13.213 3.99993H21Z" })
37104
+ children: /* @__PURE__ */ jsx18("path", { d: "M6.92893 0.514648L21.0711 14.6568L19.6569 16.071L15.834 12.2486L14 14.9999V21.9999H10V14.9999L4 5.99993H3V3.99993L7.585 3.99965L5.51472 1.92886L6.92893 0.514648ZM21 3.99993V5.99993H20L18.085 8.87193L13.213 3.99993H21Z" })
37041
37105
  }
37042
37106
  );
37043
37107
  }
37044
37108
  function OrderDesc() {
37045
- return /* @__PURE__ */ jsx17(
37109
+ return /* @__PURE__ */ jsx18(
37046
37110
  "svg",
37047
37111
  {
37048
37112
  stroke: "currentColor",
@@ -37052,12 +37116,12 @@ function OrderDesc() {
37052
37116
  height: "20px",
37053
37117
  width: "20px",
37054
37118
  xmlns: "http://www.w3.org/2000/svg",
37055
- children: /* @__PURE__ */ jsx17("path", { d: "M176 352h-48V48a16 16 0 0 0-16-16H80a16 16 0 0 0-16 16v304H16c-14.19 0-21.36 17.24-11.29 27.31l80 96a16 16 0 0 0 22.62 0l80-96C197.35 369.26 190.22 352 176 352zm112-128h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16h-56l61.26-70.45A32 32 0 0 0 432 65.63V48a16 16 0 0 0-16-16H288a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h56l-61.26 70.45A32 32 0 0 0 272 190.37V208a16 16 0 0 0 16 16zm159.06 234.62l-59.27-160A16 16 0 0 0 372.72 288h-41.44a16 16 0 0 0-15.07 10.62l-59.27 160A16 16 0 0 0 272 480h24.83a16 16 0 0 0 15.23-11.08l4.42-12.92h71l4.41 12.92A16 16 0 0 0 407.16 480H432a16 16 0 0 0 15.06-21.38zM335.61 400L352 352l16.39 48z" })
37119
+ children: /* @__PURE__ */ jsx18("path", { d: "M176 352h-48V48a16 16 0 0 0-16-16H80a16 16 0 0 0-16 16v304H16c-14.19 0-21.36 17.24-11.29 27.31l80 96a16 16 0 0 0 22.62 0l80-96C197.35 369.26 190.22 352 176 352zm112-128h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16h-56l61.26-70.45A32 32 0 0 0 432 65.63V48a16 16 0 0 0-16-16H288a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h56l-61.26 70.45A32 32 0 0 0 272 190.37V208a16 16 0 0 0 16 16zm159.06 234.62l-59.27-160A16 16 0 0 0 372.72 288h-41.44a16 16 0 0 0-15.07 10.62l-59.27 160A16 16 0 0 0 272 480h24.83a16 16 0 0 0 15.23-11.08l4.42-12.92h71l4.41 12.92A16 16 0 0 0 407.16 480H432a16 16 0 0 0 15.06-21.38zM335.61 400L352 352l16.39 48z" })
37056
37120
  }
37057
37121
  );
37058
37122
  }
37059
37123
  function OrderAsc() {
37060
- return /* @__PURE__ */ jsx17(
37124
+ return /* @__PURE__ */ jsx18(
37061
37125
  "svg",
37062
37126
  {
37063
37127
  stroke: "currentColor",
@@ -37067,12 +37131,12 @@ function OrderAsc() {
37067
37131
  height: "20px",
37068
37132
  width: "20px",
37069
37133
  xmlns: "http://www.w3.org/2000/svg",
37070
- children: /* @__PURE__ */ jsx17("path", { d: "M176 352h-48V48a16 16 0 0 0-16-16H80a16 16 0 0 0-16 16v304H16c-14.19 0-21.36 17.24-11.29 27.31l80 96a16 16 0 0 0 22.62 0l80-96C197.35 369.26 190.22 352 176 352zm240-64H288a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h56l-61.26 70.45A32 32 0 0 0 272 446.37V464a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16h-56l61.26-70.45A32 32 0 0 0 432 321.63V304a16 16 0 0 0-16-16zm31.06-85.38l-59.27-160A16 16 0 0 0 372.72 32h-41.44a16 16 0 0 0-15.07 10.62l-59.27 160A16 16 0 0 0 272 224h24.83a16 16 0 0 0 15.23-11.08l4.42-12.92h71l4.41 12.92A16 16 0 0 0 407.16 224H432a16 16 0 0 0 15.06-21.38zM335.61 144L352 96l16.39 48z" })
37134
+ children: /* @__PURE__ */ jsx18("path", { d: "M176 352h-48V48a16 16 0 0 0-16-16H80a16 16 0 0 0-16 16v304H16c-14.19 0-21.36 17.24-11.29 27.31l80 96a16 16 0 0 0 22.62 0l80-96C197.35 369.26 190.22 352 176 352zm240-64H288a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h56l-61.26 70.45A32 32 0 0 0 272 446.37V464a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16h-56l61.26-70.45A32 32 0 0 0 432 321.63V304a16 16 0 0 0-16-16zm31.06-85.38l-59.27-160A16 16 0 0 0 372.72 32h-41.44a16 16 0 0 0-15.07 10.62l-59.27 160A16 16 0 0 0 272 224h24.83a16 16 0 0 0 15.23-11.08l4.42-12.92h71l4.41 12.92A16 16 0 0 0 407.16 224H432a16 16 0 0 0 15.06-21.38zM335.61 144L352 96l16.39 48z" })
37071
37135
  }
37072
37136
  );
37073
37137
  }
37074
37138
  function EditIcon2() {
37075
- return /* @__PURE__ */ jsx17(
37139
+ return /* @__PURE__ */ jsx18(
37076
37140
  "svg",
37077
37141
  {
37078
37142
  stroke: "currentColor",
@@ -37082,7 +37146,7 @@ function EditIcon2() {
37082
37146
  height: "20px",
37083
37147
  width: "20px",
37084
37148
  xmlns: "http://www.w3.org/2000/svg",
37085
- children: /* @__PURE__ */ jsx17("path", { d: "M402.6 83.2l90.2 90.2c3.8 3.8 3.8 10 0 13.8L274.4 405.6l-92.8 10.3c-12.4 1.4-22.9-9.1-21.5-21.5l10.3-92.8L388.8 83.2c3.8-3.8 10-3.8 13.8 0zm162-22.9l-48.8-48.8c-15.2-15.2-39.9-15.2-55.2 0l-35.4 35.4c-3.8 3.8-3.8 10 0 13.8l90.2 90.2c3.8 3.8 10 3.8 13.8 0l35.4-35.4c15.2-15.3 15.2-40 0-55.2zM384 346.2V448H64V128h229.8c3.2 0 6.2-1.3 8.5-3.5l40-40c7.6-7.6 2.2-20.5-8.5-20.5H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V306.2c0-10.7-12.9-16-20.5-8.5l-40 40c-2.2 2.3-3.5 5.3-3.5 8.5z" })
37149
+ children: /* @__PURE__ */ jsx18("path", { d: "M402.6 83.2l90.2 90.2c3.8 3.8 3.8 10 0 13.8L274.4 405.6l-92.8 10.3c-12.4 1.4-22.9-9.1-21.5-21.5l10.3-92.8L388.8 83.2c3.8-3.8 10-3.8 13.8 0zm162-22.9l-48.8-48.8c-15.2-15.2-39.9-15.2-55.2 0l-35.4 35.4c-3.8 3.8-3.8 10 0 13.8l90.2 90.2c3.8 3.8 10 3.8 13.8 0l35.4-35.4c15.2-15.3 15.2-40 0-55.2zM384 346.2V448H64V128h229.8c3.2 0 6.2-1.3 8.5-3.5l40-40c7.6-7.6 2.2-20.5-8.5-20.5H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V306.2c0-10.7-12.9-16-20.5-8.5l-40 40c-2.2 2.3-3.5 5.3-3.5 8.5z" })
37086
37150
  }
37087
37151
  );
37088
37152
  }
@@ -37098,14 +37162,14 @@ function SaveIcon() {
37098
37162
  width: "20px",
37099
37163
  xmlns: "http://www.w3.org/2000/svg",
37100
37164
  children: [
37101
- /* @__PURE__ */ jsx17("path", { d: "M272 64h-16c-4.4 0-8 3.6-8 8v72c0 4.4 7.6 8 12 8h12c4.4 0 8-3.6 8-8V72c0-4.4-3.6-8-8-8z" }),
37102
- /* @__PURE__ */ jsx17("path", { d: "M433.9 130.1L382 78.2c-9-9-21.3-14.2-34.1-14.2h-28c-8.8 0-16 7.3-16 16.2v80c0 8.8-7.2 16-16 16H160c-8.8 0-16-7.2-16-16v-80c0-8.8-7.2-16.2-16-16.2H96c-17.6 0-32 14.4-32 32v320c0 17.6 14.4 32 32 32h320c17.6 0 32-14.4 32-32V164c0-12.7-5.1-24.9-14.1-33.9zM322 400.1c0 8.8-8 16-17.8 16H143.8c-9.8 0-17.8-7.2-17.8-16v-96c0-8.8 8-16 17.8-16h160.4c9.8 0 17.8 7.2 17.8 16v96z" })
37165
+ /* @__PURE__ */ jsx18("path", { d: "M272 64h-16c-4.4 0-8 3.6-8 8v72c0 4.4 7.6 8 12 8h12c4.4 0 8-3.6 8-8V72c0-4.4-3.6-8-8-8z" }),
37166
+ /* @__PURE__ */ jsx18("path", { d: "M433.9 130.1L382 78.2c-9-9-21.3-14.2-34.1-14.2h-28c-8.8 0-16 7.3-16 16.2v80c0 8.8-7.2 16-16 16H160c-8.8 0-16-7.2-16-16v-80c0-8.8-7.2-16.2-16-16.2H96c-17.6 0-32 14.4-32 32v320c0 17.6 14.4 32 32 32h320c17.6 0 32-14.4 32-32V164c0-12.7-5.1-24.9-14.1-33.9zM322 400.1c0 8.8-8 16-17.8 16H143.8c-9.8 0-17.8-7.2-17.8-16v-96c0-8.8 8-16 17.8-16h160.4c9.8 0 17.8 7.2 17.8 16v96z" })
37103
37167
  ]
37104
37168
  }
37105
37169
  );
37106
37170
  }
37107
37171
  function ExcelIcon() {
37108
- return /* @__PURE__ */ jsx17(
37172
+ return /* @__PURE__ */ jsx18(
37109
37173
  "svg",
37110
37174
  {
37111
37175
  stroke: "currentColor",
@@ -37115,13 +37179,13 @@ function ExcelIcon() {
37115
37179
  height: "20px",
37116
37180
  width: "20px",
37117
37181
  xmlns: "http://www.w3.org/2000/svg",
37118
- children: /* @__PURE__ */ jsx17("path", { d: "M2.85858 2.87732L15.4293 1.0815C15.7027 1.04245 15.9559 1.2324 15.995 1.50577C15.9983 1.52919 16 1.55282 16 1.57648V22.4235C16 22.6996 15.7761 22.9235 15.5 22.9235C15.4763 22.9235 15.4527 22.9218 15.4293 22.9184L2.85858 21.1226C2.36593 21.0522 2 20.6303 2 20.1327V3.86727C2 3.36962 2.36593 2.9477 2.85858 2.87732ZM17 2.99997H21C21.5523 2.99997 22 3.44769 22 3.99997V20C22 20.5523 21.5523 21 21 21H17V2.99997ZM10.2 12L13 7.99997H10.6L9 10.2857L7.39999 7.99997H5L7.8 12L5 16H7.39999L9 13.7143L10.6 16H13L10.2 12Z" })
37182
+ children: /* @__PURE__ */ jsx18("path", { d: "M2.85858 2.87732L15.4293 1.0815C15.7027 1.04245 15.9559 1.2324 15.995 1.50577C15.9983 1.52919 16 1.55282 16 1.57648V22.4235C16 22.6996 15.7761 22.9235 15.5 22.9235C15.4763 22.9235 15.4527 22.9218 15.4293 22.9184L2.85858 21.1226C2.36593 21.0522 2 20.6303 2 20.1327V3.86727C2 3.36962 2.36593 2.9477 2.85858 2.87732ZM17 2.99997H21C21.5523 2.99997 22 3.44769 22 3.99997V20C22 20.5523 21.5523 21 21 21H17V2.99997ZM10.2 12L13 7.99997H10.6L9 10.2857L7.39999 7.99997H5L7.8 12L5 16H7.39999L9 13.7143L10.6 16H13L10.2 12Z" })
37119
37183
  }
37120
37184
  );
37121
37185
  }
37122
37186
 
37123
37187
  // src/table3/filter.tsx
37124
- import { jsx as jsx18, jsxs as jsxs12 } from "react/jsx-runtime";
37188
+ import { jsx as jsx19, jsxs as jsxs12 } from "react/jsx-runtime";
37125
37189
  function Filter({
37126
37190
  h,
37127
37191
  objectData,
@@ -37183,7 +37247,7 @@ function Filter({
37183
37247
  }
37184
37248
  }, [data]);
37185
37249
  return /* @__PURE__ */ jsxs12("th", { className: "cursor-pointer", children: [
37186
- /* @__PURE__ */ jsx18("div", { className: "relative", children: visible && /* @__PURE__ */ jsx18(
37250
+ /* @__PURE__ */ jsx19("div", { className: "relative", children: visible && /* @__PURE__ */ jsx19(
37187
37251
  "div",
37188
37252
  {
37189
37253
  className: " w-full h-screen top-0 left-0 fixed ",
@@ -37204,13 +37268,13 @@ function Filter({
37204
37268
  onClick: (e) => setVisible(!visible),
37205
37269
  children: [
37206
37270
  sort && //
37207
- Object.keys(sort)[0] == h && ((sort == null ? void 0 : sort[h]) == "asc" ? /* @__PURE__ */ jsx18("div", { className: "text-green-300", children: /* @__PURE__ */ jsx18(OrderAsc, {}) }) : (sort == null ? void 0 : sort[h]) == "desc" && /* @__PURE__ */ jsx18("div", { className: "text-green-300", children: /* @__PURE__ */ jsx18(OrderDesc, {}) })),
37208
- /* @__PURE__ */ jsx18("div", { children: h }),
37209
- selected.length < items.length && /* @__PURE__ */ jsx18("div", { className: "text-red-500 ", children: /* @__PURE__ */ jsx18(FilterOffIcon, {}) })
37271
+ Object.keys(sort)[0] == h && ((sort == null ? void 0 : sort[h]) == "asc" ? /* @__PURE__ */ jsx19("div", { className: "text-green-300", children: /* @__PURE__ */ jsx19(OrderAsc, {}) }) : (sort == null ? void 0 : sort[h]) == "desc" && /* @__PURE__ */ jsx19("div", { className: "text-green-300", children: /* @__PURE__ */ jsx19(OrderDesc, {}) })),
37272
+ /* @__PURE__ */ jsx19("div", { children: h }),
37273
+ selected.length < items.length && /* @__PURE__ */ jsx19("div", { className: "text-red-500 ", children: /* @__PURE__ */ jsx19(FilterOffIcon, {}) })
37210
37274
  ]
37211
37275
  }
37212
37276
  ),
37213
- visible && /* @__PURE__ */ jsx18(
37277
+ visible && /* @__PURE__ */ jsx19(
37214
37278
  "div",
37215
37279
  {
37216
37280
  className: "border shadow rounded bg-white p-1 absolute left-0 text-black",
@@ -37233,7 +37297,7 @@ function Filter({
37233
37297
  },
37234
37298
  className: "flex items-center gap-2 border p-1 hover:bg-blue-100",
37235
37299
  children: [
37236
- /* @__PURE__ */ jsx18(OrderAsc, {}),
37300
+ /* @__PURE__ */ jsx19(OrderAsc, {}),
37237
37301
  " Ordenar de la A a la Z"
37238
37302
  ]
37239
37303
  }
@@ -37255,7 +37319,7 @@ function Filter({
37255
37319
  },
37256
37320
  className: "flex items-center gap-2 border p-1 hover:bg-blue-100",
37257
37321
  children: [
37258
- /* @__PURE__ */ jsx18(OrderDesc, {}),
37322
+ /* @__PURE__ */ jsx19(OrderDesc, {}),
37259
37323
  "Ordenar de la Z a la A"
37260
37324
  ]
37261
37325
  }
@@ -37269,11 +37333,11 @@ function Filter({
37269
37333
  },
37270
37334
  children: [
37271
37335
  "Borrar Filtro",
37272
- /* @__PURE__ */ jsx18("div", { className: "text-white ", children: /* @__PURE__ */ jsx18(FilterOffIcon, {}) })
37336
+ /* @__PURE__ */ jsx19("div", { className: "text-white ", children: /* @__PURE__ */ jsx19(FilterOffIcon, {}) })
37273
37337
  ]
37274
37338
  }
37275
37339
  ),
37276
- /* @__PURE__ */ jsx18("div", { className: "", children: /* @__PURE__ */ jsx18(
37340
+ /* @__PURE__ */ jsx19("div", { className: "", children: /* @__PURE__ */ jsx19(
37277
37341
  "input",
37278
37342
  {
37279
37343
  className: "border shadow rounded p-2 w-full",
@@ -37292,8 +37356,8 @@ function Filter({
37292
37356
  }
37293
37357
  }
37294
37358
  ) }),
37295
- /* @__PURE__ */ jsx18("div", { children: /* @__PURE__ */ jsxs12("label", { className: "flex gap-1 cursor-pointer px-1", children: [
37296
- /* @__PURE__ */ jsx18(
37359
+ /* @__PURE__ */ jsx19("div", { children: /* @__PURE__ */ jsxs12("label", { className: "flex gap-1 cursor-pointer px-1", children: [
37360
+ /* @__PURE__ */ jsx19(
37297
37361
  "input",
37298
37362
  {
37299
37363
  type: "checkbox",
@@ -37309,9 +37373,9 @@ function Filter({
37309
37373
  ),
37310
37374
  "(Seleccionar Todo)"
37311
37375
  ] }) }),
37312
- /* @__PURE__ */ jsx18("div", { className: "overflow-auto flex gap-1 flex-col p-1 border shadow rounded h-[300px]", children: itemsFiltered.map((item) => {
37313
- return /* @__PURE__ */ jsx18("div", { className: "hover:bg-gray-100 ", children: /* @__PURE__ */ jsxs12("label", { className: "flex gap-1 cursor-pointer truncate", children: [
37314
- /* @__PURE__ */ jsx18(
37376
+ /* @__PURE__ */ jsx19("div", { className: "overflow-auto flex gap-1 flex-col p-1 border shadow rounded h-[300px]", children: itemsFiltered.map((item) => {
37377
+ return /* @__PURE__ */ jsx19("div", { className: "hover:bg-gray-100 ", children: /* @__PURE__ */ jsxs12("label", { className: "flex gap-1 cursor-pointer truncate", children: [
37378
+ /* @__PURE__ */ jsx19(
37315
37379
  "input",
37316
37380
  {
37317
37381
  type: "checkbox",
@@ -37333,7 +37397,7 @@ function Filter({
37333
37397
  ] }) }, item);
37334
37398
  }) }),
37335
37399
  /* @__PURE__ */ jsxs12("div", { className: "flex justify-between px-1", children: [
37336
- /* @__PURE__ */ jsx18(
37400
+ /* @__PURE__ */ jsx19(
37337
37401
  "button",
37338
37402
  {
37339
37403
  className: "p-1 shadow rounded border bg-red-500 text-white",
@@ -37344,7 +37408,7 @@ function Filter({
37344
37408
  children: "Cancelar"
37345
37409
  }
37346
37410
  ),
37347
- /* @__PURE__ */ jsx18(
37411
+ /* @__PURE__ */ jsx19(
37348
37412
  "button",
37349
37413
  {
37350
37414
  className: "p-1 shadow rounded border bg-blue-500 text-white",
@@ -37363,7 +37427,7 @@ function Filter({
37363
37427
  }
37364
37428
 
37365
37429
  // src/table3/head.tsx
37366
- import { jsx as jsx19, jsxs as jsxs13 } from "react/jsx-runtime";
37430
+ import { jsx as jsx20, jsxs as jsxs13 } from "react/jsx-runtime";
37367
37431
  function TableHead({
37368
37432
  headers,
37369
37433
  selectItems,
@@ -37378,9 +37442,9 @@ function TableHead({
37378
37442
  sort,
37379
37443
  setSort
37380
37444
  }) {
37381
- return /* @__PURE__ */ jsx19("thead", { children: /* @__PURE__ */ jsxs13("tr", { className: "bg-blue-500 text-white font-bold", children: [
37382
- modal && /* @__PURE__ */ jsx19("th", { children: "-" }),
37383
- selectItems && /* @__PURE__ */ jsx19("th", { children: /* @__PURE__ */ jsx19(
37445
+ return /* @__PURE__ */ jsx20("thead", { children: /* @__PURE__ */ jsxs13("tr", { className: "bg-blue-500 text-white font-bold", children: [
37446
+ modal && /* @__PURE__ */ jsx20("th", { children: "-" }),
37447
+ selectItems && /* @__PURE__ */ jsx20("th", { children: /* @__PURE__ */ jsx20(
37384
37448
  "input",
37385
37449
  {
37386
37450
  className: "m-2",
@@ -37408,7 +37472,7 @@ function TableHead({
37408
37472
  ) }),
37409
37473
  Object.values(headers).map((h) => {
37410
37474
  if (h.startsWith("_")) return null;
37411
- return /* @__PURE__ */ jsx19(
37475
+ return /* @__PURE__ */ jsx20(
37412
37476
  Filter,
37413
37477
  {
37414
37478
  objectData,
@@ -37431,7 +37495,7 @@ import { useState as useState11 } from "react";
37431
37495
 
37432
37496
  // src/table3/tr.tsx
37433
37497
  import React7 from "react";
37434
- import { jsx as jsx20, jsxs as jsxs14 } from "react/jsx-runtime";
37498
+ import { jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
37435
37499
  function TR({
37436
37500
  handlers,
37437
37501
  setObjectData,
@@ -37459,7 +37523,7 @@ function TR({
37459
37523
  setSelected(selected == index ? -1 : index);
37460
37524
  },
37461
37525
  children: [
37462
- modal && /* @__PURE__ */ jsx20("th", { className: "border", children: /* @__PURE__ */ jsx20(
37526
+ modal && /* @__PURE__ */ jsx21("th", { className: "border", children: /* @__PURE__ */ jsx21(
37463
37527
  "button",
37464
37528
  {
37465
37529
  className: "p-1 border shadow-rounded bg-blue-500 rounded text-white",
@@ -37468,10 +37532,10 @@ function TR({
37468
37532
  (_a = modalRef.current) == null ? void 0 : _a.showModal();
37469
37533
  setDialogRow(row);
37470
37534
  },
37471
- children: /* @__PURE__ */ jsx20(EditIcon2, {})
37535
+ children: /* @__PURE__ */ jsx21(EditIcon2, {})
37472
37536
  }
37473
37537
  ) }),
37474
- selectItems && /* @__PURE__ */ jsx20("th", { className: "border", children: /* @__PURE__ */ jsx20(
37538
+ selectItems && /* @__PURE__ */ jsx21("th", { className: "border", children: /* @__PURE__ */ jsx21(
37475
37539
  "input",
37476
37540
  {
37477
37541
  type: "checkbox",
@@ -37539,13 +37603,13 @@ function TR({
37539
37603
  return acc;
37540
37604
  }, {})
37541
37605
  });
37542
- return /* @__PURE__ */ jsx20("td", { className: `text-black `, children: cloned }, h);
37606
+ return /* @__PURE__ */ jsx21("td", { className: `text-black `, children: cloned }, h);
37543
37607
  }
37544
- return symbols && (symbols == null ? void 0 : symbols[h]) ? /* @__PURE__ */ jsx20("td", { className: `text-center border max-w-[${colSize}px] `, children: /* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-1 w-full", children: [
37608
+ return symbols && (symbols == null ? void 0 : symbols[h]) ? /* @__PURE__ */ jsx21("td", { className: `text-center border max-w-[${colSize}px] `, children: /* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-1 w-full", children: [
37545
37609
  symbols[h],
37546
37610
  " ",
37547
37611
  row[h]
37548
- ] }) }, h) : /* @__PURE__ */ jsx20("td", { className: `text-center border max-w-[${colSize}px]`, children: row[h] }, h);
37612
+ ] }) }, h) : /* @__PURE__ */ jsx21("td", { className: `text-center border max-w-[${colSize}px]`, children: row[h] }, h);
37549
37613
  })
37550
37614
  ]
37551
37615
  },
@@ -37554,7 +37618,7 @@ function TR({
37554
37618
  }
37555
37619
 
37556
37620
  // src/table3/body.tsx
37557
- import { jsx as jsx21 } from "react/jsx-runtime";
37621
+ import { jsx as jsx22 } from "react/jsx-runtime";
37558
37622
  function TableBody({
37559
37623
  objectData,
37560
37624
  setObjectData,
@@ -37598,7 +37662,7 @@ function TableBody({
37598
37662
  return key >= start && key < end;
37599
37663
  }).map(([id, k], index) => {
37600
37664
  const row = objectData[id];
37601
- return /* @__PURE__ */ jsx21(
37665
+ return /* @__PURE__ */ jsx22(
37602
37666
  TR,
37603
37667
  {
37604
37668
  ...{
@@ -37623,11 +37687,11 @@ function TableBody({
37623
37687
  id
37624
37688
  );
37625
37689
  });
37626
- return /* @__PURE__ */ jsx21("tbody", { children: sorted });
37690
+ return /* @__PURE__ */ jsx22("tbody", { children: sorted });
37627
37691
  }
37628
37692
 
37629
37693
  // src/table3/panel.tsx
37630
- import { jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
37694
+ import { jsx as jsx23, jsxs as jsxs15 } from "react/jsx-runtime";
37631
37695
  function Panel({
37632
37696
  page,
37633
37697
  setPage,
@@ -37649,7 +37713,7 @@ function Panel({
37649
37713
  },
37650
37714
  children: [
37651
37715
  " ",
37652
- /* @__PURE__ */ jsx22(SaveIcon, {}),
37716
+ /* @__PURE__ */ jsx23(SaveIcon, {}),
37653
37717
  "Guardar"
37654
37718
  ]
37655
37719
  }
@@ -37668,22 +37732,22 @@ function Panel({
37668
37732
  );
37669
37733
  },
37670
37734
  children: [
37671
- /* @__PURE__ */ jsx22(ExcelIcon, {}),
37735
+ /* @__PURE__ */ jsx23(ExcelIcon, {}),
37672
37736
  "Exportar"
37673
37737
  ]
37674
37738
  }
37675
37739
  )
37676
37740
  ] }),
37677
37741
  maxItems !== Infinity && /* @__PURE__ */ jsxs15("div", { className: "flex gap-2 items-center text-2xl", children: [
37678
- /* @__PURE__ */ jsx22("button", { onClick: () => setPage(1), disabled: page === 1, children: "\u23EE" }),
37679
- /* @__PURE__ */ jsx22("button", { onClick: () => setPage(page - 1), disabled: page === 1, children: "\u25C0" }),
37742
+ /* @__PURE__ */ jsx23("button", { onClick: () => setPage(1), disabled: page === 1, children: "\u23EE" }),
37743
+ /* @__PURE__ */ jsx23("button", { onClick: () => setPage(page - 1), disabled: page === 1, children: "\u25C0" }),
37680
37744
  /* @__PURE__ */ jsxs15("span", { className: "text-sm", children: [
37681
37745
  "P\xE1gina ",
37682
37746
  page,
37683
37747
  " / ",
37684
37748
  totalPages
37685
37749
  ] }),
37686
- /* @__PURE__ */ jsx22(
37750
+ /* @__PURE__ */ jsx23(
37687
37751
  "button",
37688
37752
  {
37689
37753
  onClick: () => setPage(page + 1),
@@ -37691,7 +37755,7 @@ function Panel({
37691
37755
  children: "\u25B6"
37692
37756
  }
37693
37757
  ),
37694
- /* @__PURE__ */ jsx22(
37758
+ /* @__PURE__ */ jsx23(
37695
37759
  "button",
37696
37760
  {
37697
37761
  onClick: () => setPage(totalPages),
@@ -37704,7 +37768,7 @@ function Panel({
37704
37768
  }
37705
37769
 
37706
37770
  // src/table3/footer.tsx
37707
- import { jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
37771
+ import { jsx as jsx24, jsxs as jsxs16 } from "react/jsx-runtime";
37708
37772
  function TableFooter({
37709
37773
  objectData,
37710
37774
  headers,
@@ -37729,9 +37793,9 @@ function TableFooter({
37729
37793
  return null;
37730
37794
  }
37731
37795
  }
37732
- return footer && /* @__PURE__ */ jsx23("tfoot", { children: /* @__PURE__ */ jsxs16("tr", { className: "bg-blue-500 text-white", children: [
37733
- selectItems && /* @__PURE__ */ jsx23("th", {}),
37734
- modal && /* @__PURE__ */ jsx23("th", {}),
37796
+ return footer && /* @__PURE__ */ jsx24("tfoot", { children: /* @__PURE__ */ jsxs16("tr", { className: "bg-blue-500 text-white", children: [
37797
+ selectItems && /* @__PURE__ */ jsx24("th", {}),
37798
+ modal && /* @__PURE__ */ jsx24("th", {}),
37735
37799
  headers.map((header) => {
37736
37800
  if (header.startsWith("_")) {
37737
37801
  return null;
@@ -37740,16 +37804,16 @@ function TableFooter({
37740
37804
  symbols[header],
37741
37805
  " ",
37742
37806
  operacion(footer[header], header)
37743
- ] }, header) : /* @__PURE__ */ jsx23("th", { children: operacion(footer[header], header) }, header);
37807
+ ] }, header) : /* @__PURE__ */ jsx24("th", { children: operacion(footer[header], header) }, header);
37744
37808
  }
37745
- return /* @__PURE__ */ jsx23("th", {}, header);
37809
+ return /* @__PURE__ */ jsx24("th", {}, header);
37746
37810
  })
37747
37811
  ] }) });
37748
37812
  }
37749
37813
 
37750
37814
  // src/table3/dialog.tsx
37751
37815
  import React8, { useMemo as useMemo5 } from "react";
37752
- import { jsx as jsx24, jsxs as jsxs17 } from "react/jsx-runtime";
37816
+ import { jsx as jsx25, jsxs as jsxs17 } from "react/jsx-runtime";
37753
37817
  function Dialog4({
37754
37818
  modalRef,
37755
37819
  children,
@@ -37784,8 +37848,8 @@ function Dialog4({
37784
37848
  className: "p-6 rounded-xl shadow-2xl backdrop:bg-black/50 w-[100%] h-screen",
37785
37849
  children: [
37786
37850
  /* @__PURE__ */ jsxs17("div", { className: "flex justify-between items-center mb-4", children: [
37787
- /* @__PURE__ */ jsx24("div", {}),
37788
- /* @__PURE__ */ jsx24(
37851
+ /* @__PURE__ */ jsx25("div", {}),
37852
+ /* @__PURE__ */ jsx25(
37789
37853
  "button",
37790
37854
  {
37791
37855
  onClick: () => {
@@ -37797,7 +37861,7 @@ function Dialog4({
37797
37861
  }
37798
37862
  )
37799
37863
  ] }),
37800
- /* @__PURE__ */ jsx24("div", { className: "text-gray-700", children: clonedModal })
37864
+ /* @__PURE__ */ jsx25("div", { className: "text-gray-700", children: clonedModal })
37801
37865
  ]
37802
37866
  }
37803
37867
  );
@@ -37805,7 +37869,7 @@ function Dialog4({
37805
37869
  var dialog_default = Dialog4;
37806
37870
 
37807
37871
  // src/table3/index.tsx
37808
- import { jsx as jsx25, jsxs as jsxs18 } from "react/jsx-runtime";
37872
+ import { jsx as jsx26, jsxs as jsxs18 } from "react/jsx-runtime";
37809
37873
  function Table3({
37810
37874
  data,
37811
37875
  selectItems,
@@ -37918,7 +37982,7 @@ function Table3({
37918
37982
  const style = (props == null ? void 0 : props.style) ? { ...props.style, tableLayout: "fixed" } : { tableLayout: "fixed" };
37919
37983
  if (!objectData) return null;
37920
37984
  return /* @__PURE__ */ jsxs18("div", { className: "border shadow rounded m-1 p-1 bg-white", children: [
37921
- modal && /* @__PURE__ */ jsx25(
37985
+ modal && /* @__PURE__ */ jsx26(
37922
37986
  dialog_default,
37923
37987
  {
37924
37988
  modalRef,
@@ -37928,33 +37992,98 @@ function Table3({
37928
37992
  children: modal
37929
37993
  }
37930
37994
  ),
37931
- header && /* @__PURE__ */ jsx25("div", { className: "font-bold text-2xl py-5 px-2 bg-blue-50", children: header }),
37932
- /* @__PURE__ */ jsx25(Panel, { ...context }),
37995
+ header && /* @__PURE__ */ jsx26("div", { className: "font-bold text-2xl py-5 px-2 bg-blue-50", children: header }),
37996
+ /* @__PURE__ */ jsx26(Panel, { ...context }),
37933
37997
  /* @__PURE__ */ jsxs18("table", { ...props, style, children: [
37934
- /* @__PURE__ */ jsx25(TableHead, { ...context }),
37935
- /* @__PURE__ */ jsx25(TableBody, { ...context }),
37936
- /* @__PURE__ */ jsx25(TableFooter, { ...context })
37998
+ /* @__PURE__ */ jsx26(TableHead, { ...context }),
37999
+ /* @__PURE__ */ jsx26(TableBody, { ...context }),
38000
+ /* @__PURE__ */ jsx26(TableFooter, { ...context })
37937
38001
  ] })
37938
38002
  ] });
37939
38003
  }
37940
38004
 
37941
- // src/alert/index.tsx
38005
+ // src/pop/index.tsx
37942
38006
  import { useState as useState13 } from "react";
37943
- import { jsx as jsx26, jsxs as jsxs19 } from "react/jsx-runtime";
38007
+ import { jsx as jsx27, jsxs as jsxs19 } from "react/jsx-runtime";
38008
+ var COLOR_CONFIG = {
38009
+ primary: {
38010
+ bg: "from-blue-50 to-indigo-50",
38011
+ iconBg: "bg-blue-100",
38012
+ iconText: "text-blue-600",
38013
+ border: "border-blue-200",
38014
+ confirm: "bg-blue-600 hover:bg-blue-700 focus:ring-blue-300",
38015
+ label: "\u2139"
38016
+ },
38017
+ info: {
38018
+ bg: "from-sky-50 to-cyan-50",
38019
+ iconBg: "bg-sky-100",
38020
+ iconText: "text-sky-600",
38021
+ border: "border-sky-200",
38022
+ confirm: "bg-sky-600 hover:bg-sky-700 focus:ring-sky-300",
38023
+ label: "\u2139"
38024
+ },
38025
+ success: {
38026
+ bg: "from-emerald-50 to-green-50",
38027
+ iconBg: "bg-emerald-100",
38028
+ iconText: "text-emerald-600",
38029
+ border: "border-emerald-200",
38030
+ confirm: "bg-emerald-600 hover:bg-emerald-700 focus:ring-emerald-300",
38031
+ label: "\u2713"
38032
+ },
38033
+ warning: {
38034
+ bg: "from-amber-50 to-yellow-50",
38035
+ iconBg: "bg-amber-100",
38036
+ iconText: "text-amber-600",
38037
+ border: "border-amber-200",
38038
+ confirm: "bg-amber-500 hover:bg-amber-600 focus:ring-amber-300",
38039
+ label: "\u26A0"
38040
+ },
38041
+ danger: {
38042
+ bg: "from-red-50 to-rose-50",
38043
+ iconBg: "bg-red-100",
38044
+ iconText: "text-red-600",
38045
+ border: "border-red-200",
38046
+ confirm: "bg-red-600 hover:bg-red-700 focus:ring-red-300",
38047
+ label: "\u2715"
38048
+ },
38049
+ secondary: {
38050
+ bg: "from-slate-50 to-gray-50",
38051
+ iconBg: "bg-slate-100",
38052
+ iconText: "text-slate-600",
38053
+ border: "border-slate-200",
38054
+ confirm: "bg-slate-700 hover:bg-slate-800 focus:ring-slate-300",
38055
+ label: "\u25CE"
38056
+ },
38057
+ white: {
38058
+ bg: "from-gray-50 to-white",
38059
+ iconBg: "bg-gray-100",
38060
+ iconText: "text-gray-500",
38061
+ border: "border-gray-200",
38062
+ confirm: "bg-gray-700 hover:bg-gray-800 focus:ring-gray-300",
38063
+ label: "\u25CE"
38064
+ }
38065
+ };
37944
38066
  function usePopup() {
37945
- const [popup, setPopup] = useState13({ type: "alert", message: "", visible: false, inputValue: "" });
37946
- function alert2(message) {
38067
+ const [popup, setPopup] = useState13({
38068
+ type: "alert",
38069
+ message: "",
38070
+ visible: false,
38071
+ inputValue: "",
38072
+ color: "primary"
38073
+ });
38074
+ function alert2(message, color = "primary") {
37947
38075
  return new Promise((resolve) => {
37948
38076
  setPopup({
37949
38077
  type: "alert",
37950
38078
  message,
37951
38079
  visible: true,
37952
38080
  inputValue: "",
37953
- onConfirm: () => resolve()
38081
+ onConfirm: () => resolve(),
38082
+ color
37954
38083
  });
37955
38084
  });
37956
38085
  }
37957
- function confirm(message) {
38086
+ function confirm(message, color = "primary") {
37958
38087
  return new Promise((resolve) => {
37959
38088
  setPopup({
37960
38089
  type: "confirm",
@@ -37962,11 +38091,12 @@ function usePopup() {
37962
38091
  visible: true,
37963
38092
  inputValue: "",
37964
38093
  onConfirm: () => resolve(true),
37965
- onCancel: () => resolve(false)
38094
+ onCancel: () => resolve(false),
38095
+ color
37966
38096
  });
37967
38097
  });
37968
38098
  }
37969
- function prompt(message) {
38099
+ function prompt(message, color = "primary") {
37970
38100
  return new Promise((resolve) => {
37971
38101
  setPopup({
37972
38102
  type: "prompt",
@@ -37974,7 +38104,8 @@ function usePopup() {
37974
38104
  visible: true,
37975
38105
  inputValue: "",
37976
38106
  onConfirm: (value) => resolve(value != null ? value : ""),
37977
- onCancel: () => resolve(null)
38107
+ onCancel: () => resolve(null),
38108
+ color
37978
38109
  });
37979
38110
  });
37980
38111
  }
@@ -37986,35 +38117,40 @@ function usePopup() {
37986
38117
  return { ...prev, visible: false, inputValue: "" };
37987
38118
  });
37988
38119
  }
37989
- const PopupComponent = popup.visible ? /* @__PURE__ */ jsx26(
38120
+ const c = COLOR_CONFIG[popup.color];
38121
+ const PopupComponent = popup.visible ? /* @__PURE__ */ jsx27(
37990
38122
  "div",
37991
38123
  {
37992
- style: {
37993
- position: "fixed",
37994
- top: 0,
37995
- left: 0,
37996
- width: "100%",
37997
- height: "100%",
37998
- background: "rgba(0,0,0,0.5)",
37999
- display: "flex",
38000
- alignItems: "center",
38001
- justifyContent: "center",
38002
- zIndex: 1e3
38003
- },
38124
+ className: "fixed inset-0 flex items-center justify-center z-[1000]",
38125
+ style: { background: "rgba(15,23,42,0.45)", backdropFilter: "blur(2px)" },
38126
+ onClick: (e) => e.target === e.currentTarget && close(false),
38004
38127
  children: /* @__PURE__ */ jsxs19(
38005
38128
  "div",
38006
38129
  {
38007
- style: {
38008
- background: "#fff",
38009
- padding: "24px 32px",
38010
- borderRadius: "8px",
38011
- minWidth: "300px",
38012
- textAlign: "center",
38013
- boxShadow: "0 4px 20px rgba(0,0,0,0.2)"
38014
- },
38130
+ className: `
38131
+ bg-gradient-to-br ${c.bg} border ${c.border}
38132
+ rounded-2xl shadow-2xl w-full max-w-sm mx-4
38133
+ animate-[fadeInScale_0.18s_ease-out]
38134
+ `,
38135
+ style: { animation: "fadeInScale 0.18s ease-out" },
38015
38136
  children: [
38016
- /* @__PURE__ */ jsx26("p", { style: { margin: "0 0 16px", fontSize: "16px" }, children: popup.message }),
38017
- popup.type === "prompt" && /* @__PURE__ */ jsx26(
38137
+ /* @__PURE__ */ jsx27("style", { children: `
38138
+ @keyframes fadeInScale {
38139
+ from { opacity: 0; transform: scale(0.93) translateY(8px); }
38140
+ to { opacity: 1; transform: scale(1) translateY(0); }
38141
+ }
38142
+ ` }),
38143
+ /* @__PURE__ */ jsxs19("div", { className: "flex flex-col items-center gap-3 px-8 pt-8 pb-5 text-center", children: [
38144
+ /* @__PURE__ */ jsx27(
38145
+ "div",
38146
+ {
38147
+ className: `w-12 h-12 rounded-full ${c.iconBg} flex items-center justify-center`,
38148
+ children: /* @__PURE__ */ jsx27("span", { className: `text-xl font-bold ${c.iconText}`, children: c.label })
38149
+ }
38150
+ ),
38151
+ /* @__PURE__ */ jsx27("p", { className: "text-gray-800 text-[15px] font-medium leading-snug", children: popup.message })
38152
+ ] }),
38153
+ popup.type === "prompt" && /* @__PURE__ */ jsx27("div", { className: "px-8 pb-2", children: /* @__PURE__ */ jsx27(
38018
38154
  "input",
38019
38155
  {
38020
38156
  autoFocus: true,
@@ -38022,48 +38158,34 @@ function usePopup() {
38022
38158
  value: popup.inputValue,
38023
38159
  onChange: (e) => setPopup((prev) => ({ ...prev, inputValue: e.target.value })),
38024
38160
  onKeyDown: (e) => e.key === "Enter" && close(true, popup.inputValue),
38025
- style: {
38026
- width: "100%",
38027
- padding: "8px 12px",
38028
- marginBottom: "16px",
38029
- border: "1px solid #d1d5db",
38030
- borderRadius: "6px",
38031
- fontSize: "14px",
38032
- boxSizing: "border-box"
38033
- }
38161
+ className: `
38162
+ w-full px-3 py-2 rounded-lg border ${c.border} bg-white
38163
+ text-sm text-gray-800 outline-none
38164
+ focus:ring-2 ${c.confirm.includes("blue") ? "focus:ring-blue-200" : "focus:ring-gray-200"}
38165
+ transition
38166
+ `,
38167
+ placeholder: "Escribe aqu\xED..."
38034
38168
  }
38035
- ),
38036
- /* @__PURE__ */ jsxs19("div", { style: { display: "flex", gap: "8px", justifyContent: "center" }, children: [
38037
- (popup.type === "confirm" || popup.type === "prompt") && /* @__PURE__ */ jsx26(
38169
+ ) }),
38170
+ /* @__PURE__ */ jsx27("div", { className: `border-t ${c.border} mx-0 mt-4` }),
38171
+ /* @__PURE__ */ jsxs19("div", { className: "flex gap-2 px-6 py-4 justify-end", children: [
38172
+ (popup.type === "confirm" || popup.type === "prompt") && /* @__PURE__ */ jsx27(
38038
38173
  "button",
38039
38174
  {
38040
38175
  onClick: () => close(false),
38041
- style: {
38042
- padding: "8px 24px",
38043
- background: "#e5e7eb",
38044
- color: "#374151",
38045
- border: "none",
38046
- borderRadius: "6px",
38047
- cursor: "pointer",
38048
- fontSize: "14px"
38049
- },
38176
+ className: "\r\n px-4 py-2 rounded-lg text-sm font-medium\r\n bg-white border border-gray-200 text-gray-600\r\n hover:bg-gray-50 transition\r\n ",
38050
38177
  children: "Cancelar"
38051
38178
  }
38052
38179
  ),
38053
- /* @__PURE__ */ jsx26(
38180
+ /* @__PURE__ */ jsx27(
38054
38181
  "button",
38055
38182
  {
38056
38183
  onClick: () => close(true, popup.inputValue),
38057
- style: {
38058
- padding: "8px 24px",
38059
- background: "#3b82f6",
38060
- color: "#fff",
38061
- border: "none",
38062
- borderRadius: "6px",
38063
- cursor: "pointer",
38064
- fontSize: "14px"
38065
- },
38066
- children: "OK"
38184
+ className: `
38185
+ px-5 py-2 rounded-lg text-sm font-semibold text-white
38186
+ ${c.confirm} transition focus:outline-none focus:ring-2
38187
+ `,
38188
+ children: "Aceptar"
38067
38189
  }
38068
38190
  )
38069
38191
  ] })
@@ -38074,8 +38196,8 @@ function usePopup() {
38074
38196
  ) : null;
38075
38197
  return { alert: alert2, confirm, prompt, PopupComponent };
38076
38198
  }
38077
- var alert_default = usePopup;
38078
38199
  export {
38200
+ Alert,
38079
38201
  Button,
38080
38202
  Container,
38081
38203
  DocumentViewer,
@@ -38092,7 +38214,7 @@ export {
38092
38214
  useDates,
38093
38215
  useExcel,
38094
38216
  useFormValues,
38095
- alert_default as usePopup,
38217
+ usePopup,
38096
38218
  useResources
38097
38219
  };
38098
38220
  /*! Bundled license information: