next-recomponents 2.0.67 → 2.0.69

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
@@ -37492,6 +37492,9 @@ function MyCalendar({
37492
37492
  ] });
37493
37493
  }
37494
37494
 
37495
+ // src/doc-viewer/index.tsx
37496
+ import { useState as useState10 } from "react";
37497
+
37495
37498
  // src/doc-viewer/icon.tsx
37496
37499
  import { jsx as jsx19, jsxs as jsxs12 } from "react/jsx-runtime";
37497
37500
  function Icon() {
@@ -37527,98 +37530,190 @@ function DownloadIcon() {
37527
37530
  }
37528
37531
  );
37529
37532
  }
37533
+ function OpenIcon() {
37534
+ return /* @__PURE__ */ jsxs12(
37535
+ "svg",
37536
+ {
37537
+ stroke: "currentColor",
37538
+ fill: "none",
37539
+ strokeWidth: "2",
37540
+ viewBox: "0 0 24 24",
37541
+ strokeLinecap: "round",
37542
+ strokeLinejoin: "round",
37543
+ height: "1em",
37544
+ width: "1em",
37545
+ xmlns: "http://www.w3.org/2000/svg",
37546
+ children: [
37547
+ /* @__PURE__ */ jsx19("polyline", { points: "15 3 21 3 21 9" }),
37548
+ /* @__PURE__ */ jsx19("polyline", { points: "9 21 3 21 3 15" }),
37549
+ /* @__PURE__ */ jsx19("line", { x1: "21", y1: "3", x2: "14", y2: "10" }),
37550
+ /* @__PURE__ */ jsx19("line", { x1: "3", y1: "21", x2: "10", y2: "14" })
37551
+ ]
37552
+ }
37553
+ );
37554
+ }
37555
+ function DeleteIcon() {
37556
+ return /* @__PURE__ */ jsxs12(
37557
+ "svg",
37558
+ {
37559
+ stroke: "currentColor",
37560
+ fill: "currentColor",
37561
+ strokeWidth: "0",
37562
+ viewBox: "0 0 24 24",
37563
+ height: "1em",
37564
+ width: "1em",
37565
+ xmlns: "http://www.w3.org/2000/svg",
37566
+ children: [
37567
+ /* @__PURE__ */ jsx19("path", { fill: "none", d: "M0 0h24v24H0z" }),
37568
+ /* @__PURE__ */ jsx19("path", { d: "M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z" })
37569
+ ]
37570
+ }
37571
+ );
37572
+ }
37530
37573
 
37531
37574
  // src/doc-viewer/index.tsx
37532
37575
  import { jsx as jsx20, jsxs as jsxs13 } from "react/jsx-runtime";
37533
37576
  function DocumentViewer({
37534
37577
  item,
37535
37578
  width = "100%",
37536
- height = "100%"
37579
+ height = "100%",
37580
+ onDelete
37537
37581
  }) {
37538
37582
  const { url, name, contentType } = item;
37539
37583
  const isImage = contentType.startsWith("image/");
37540
37584
  const isPdf = contentType === "application/pdf";
37541
- const isGoogleDocCompatible = isPdf || contentType.includes("msword") || contentType.includes("officedocument") || contentType.includes("presentation");
37585
+ const isGoogleDocCompatible = contentType.includes("msword") || contentType.includes("officedocument") || contentType.includes("presentation");
37542
37586
  const viewerUrl = isGoogleDocCompatible ? `https://docs.google.com/gview?url=${encodeURIComponent(
37543
37587
  url
37544
37588
  )}&embedded=true` : url;
37545
- return /* @__PURE__ */ jsxs13("div", { className: "border shadow rounded relative pt-6 pb-1 px-1", children: [
37546
- /* @__PURE__ */ jsxs13("div", { className: "grid grid-cols-[3fr_1fr] left-0 rounded-t shadow top-0 absolute p-1 bg-blue-500 px-1 text-white w-full ", children: [
37547
- /* @__PURE__ */ jsx20(
37548
- "h3",
37549
- {
37550
- className: "font-bold truncate text-xs px-1 cursor-pointer max-w-[90%] ",
37551
- title: name,
37552
- children: name
37553
- }
37554
- ),
37555
- /* @__PURE__ */ jsx20(
37556
- "a",
37557
- {
37558
- href: url,
37559
- download: name,
37560
- target: "_blank",
37561
- rel: "noopener noreferrer",
37562
- className: "border shadow hover:bg-blue-100 hover:text-black rounded bg-blue-900 text-white text-xs items-center truncate px-1 flex gap-1 justify-center",
37563
- children: /* @__PURE__ */ jsx20(DownloadIcon, {})
37564
- }
37565
- )
37566
- ] }),
37567
- isImage ? /* @__PURE__ */ jsx20(
37568
- "img",
37569
- {
37570
- src: url,
37571
- alt: name,
37572
- className: "rounded",
37573
- style: {
37574
- width,
37575
- height,
37576
- maxWidth: "100%",
37577
- objectFit: "cover",
37578
- display: "block"
37579
- }
37580
- }
37581
- ) : isGoogleDocCompatible ? /* @__PURE__ */ jsx20(
37582
- "iframe",
37583
- {
37584
- className: "rounded",
37585
- style: {
37586
- width,
37587
- height,
37588
- maxWidth: "100%"
37589
- },
37590
- title: name,
37591
- src: viewerUrl,
37592
- allowFullScreen: true
37593
- }
37594
- ) : /* @__PURE__ */ jsx20(
37595
- "div",
37596
- {
37597
- className: "rounded",
37598
- style: {
37599
- width,
37600
- height,
37601
- maxWidth: "100%",
37602
- objectFit: "cover",
37603
- display: "block"
37604
- },
37605
- children: /* @__PURE__ */ jsx20(Icon, {})
37606
- }
37607
- )
37608
- ] });
37589
+ const [isOpen, setIsOpen] = useState10(false);
37590
+ return /* @__PURE__ */ jsxs13(
37591
+ "div",
37592
+ {
37593
+ className: "group relative rounded-lg bg-white shadow-md overflow-hidden",
37594
+ style: {
37595
+ width,
37596
+ height
37597
+ },
37598
+ children: [
37599
+ isImage ? /* @__PURE__ */ jsx20(
37600
+ "img",
37601
+ {
37602
+ src: url,
37603
+ alt: name,
37604
+ className: "w-full h-full rounded object-cover"
37605
+ }
37606
+ ) : isPdf ? /* @__PURE__ */ jsx20("iframe", { src: url, title: name, className: "w-full h-full rounded" }) : isGoogleDocCompatible ? /* @__PURE__ */ jsx20(
37607
+ "iframe",
37608
+ {
37609
+ src: viewerUrl,
37610
+ title: name,
37611
+ className: "w-full h-full rounded",
37612
+ allowFullScreen: true
37613
+ }
37614
+ ) : /* @__PURE__ */ jsx20("div", { className: "w-full h-full rounded flex items-center justify-center", children: /* @__PURE__ */ jsx20(Icon, {}) }),
37615
+ isOpen && /* @__PURE__ */ jsx20(
37616
+ "div",
37617
+ {
37618
+ className: "\r\n fixed inset-0 z-[9999]\r\n bg-black/50\r\n flex items-center justify-center\r\n p-6\r\n ",
37619
+ onClick: () => setIsOpen(false),
37620
+ children: /* @__PURE__ */ jsxs13(
37621
+ "div",
37622
+ {
37623
+ className: "\r\n relative\r\n w-full h-full\r\n flex items-center justify-center\r\n ",
37624
+ onClick: (e) => e.stopPropagation(),
37625
+ children: [
37626
+ /* @__PURE__ */ jsx20(
37627
+ "button",
37628
+ {
37629
+ type: "button",
37630
+ onClick: () => setIsOpen(false),
37631
+ className: "\r\n absolute top-4 right-4 z-10\r\n w-10 h-10\r\n rounded-full\r\n bg-black/70 text-white\r\n hover:bg-black\r\n flex items-center justify-center\r\n text-xl\r\n ",
37632
+ children: "\u2715"
37633
+ }
37634
+ ),
37635
+ isImage ? /* @__PURE__ */ jsx20(
37636
+ "img",
37637
+ {
37638
+ src: url,
37639
+ alt: name,
37640
+ className: "w-full h-full rounded object-cover"
37641
+ }
37642
+ ) : isPdf ? /* @__PURE__ */ jsx20(
37643
+ "iframe",
37644
+ {
37645
+ src: url,
37646
+ title: name,
37647
+ className: "w-full h-full rounded"
37648
+ }
37649
+ ) : isGoogleDocCompatible ? /* @__PURE__ */ jsx20(
37650
+ "iframe",
37651
+ {
37652
+ src: viewerUrl,
37653
+ title: name,
37654
+ className: "w-full h-full rounded",
37655
+ allowFullScreen: true
37656
+ }
37657
+ ) : /* @__PURE__ */ jsx20("div", { className: "w-full h-full rounded flex items-center justify-center", children: /* @__PURE__ */ jsx20(Icon, {}) })
37658
+ ]
37659
+ }
37660
+ )
37661
+ }
37662
+ ),
37663
+ /* @__PURE__ */ jsx20(
37664
+ "div",
37665
+ {
37666
+ className: "\r\n absolute inset-0\r\n bg-white/70\r\n opacity-0\r\n invisible\r\n group-hover:opacity-100\r\n group-hover:visible\r\n transition-all duration-200\r\n flex items-center justify-center\r\n ",
37667
+ children: /* @__PURE__ */ jsxs13("div", { className: "flex flex-col justify-between h-full p-2 w-full", children: [
37668
+ /* @__PURE__ */ jsx20("div", { className: "w-full bg-transparent h-full flex items-center justify-center", children: item.name }),
37669
+ /* @__PURE__ */ jsxs13("div", { className: "flex justify-end gap-2 mr-10", children: [
37670
+ /* @__PURE__ */ jsx20("div", { className: "border bg-black/50 shadow rounded p-2 hover:bg-black/70 transition-all duration-200 text-white", children: /* @__PURE__ */ jsx20(
37671
+ "a",
37672
+ {
37673
+ href: item.url,
37674
+ download: item.name,
37675
+ target: "_blank",
37676
+ title: "Download",
37677
+ children: /* @__PURE__ */ jsx20(DownloadIcon, {})
37678
+ }
37679
+ ) }),
37680
+ /* @__PURE__ */ jsx20(
37681
+ "div",
37682
+ {
37683
+ className: "border bg-black/50 shadow rounded p-2 hover:bg-black/70 transition-all duration-200 text-white cursor-pointer",
37684
+ onClick: (e) => {
37685
+ setIsOpen(true);
37686
+ },
37687
+ children: /* @__PURE__ */ jsx20("a", { title: "Open", children: /* @__PURE__ */ jsx20(OpenIcon, {}) })
37688
+ }
37689
+ ),
37690
+ onDelete && /* @__PURE__ */ jsx20("div", { className: "border bg-red-500/50 shadow rounded p-2 hover:bg-red-500/70 transition-all duration-200 text-white cursor-pointer", children: /* @__PURE__ */ jsx20("a", { title: "Delete", onClick: () => onDelete == null ? void 0 : onDelete(item), children: /* @__PURE__ */ jsx20(DeleteIcon, {}) }) })
37691
+ ] })
37692
+ ] })
37693
+ }
37694
+ ),
37695
+ /* @__PURE__ */ jsx20(
37696
+ "div",
37697
+ {
37698
+ className: "\r\n absolute bottom-0 right-0\r\n w-10 h-10\r\n bg-gray-200\r\n transition-all duration-200\r\n group-hover:w-14\r\n group-hover:h-14\r\n [clip-path:polygon(0_100%,100%_0,100%_100%)]\r\n "
37699
+ }
37700
+ )
37701
+ ]
37702
+ }
37703
+ );
37609
37704
  }
37610
37705
 
37611
37706
  // src/table3/index.tsx
37612
- import React8, {
37707
+ import React9, {
37613
37708
  useEffect as useEffect9,
37614
37709
  useMemo as useMemo7,
37615
37710
  useReducer as useReducer2,
37616
37711
  useRef as useRef5,
37617
- useState as useState12
37712
+ useState as useState13
37618
37713
  } from "react";
37619
37714
 
37620
37715
  // src/table3/filter.tsx
37621
- import { useEffect as useEffect8, useMemo as useMemo5, useState as useState10 } from "react";
37716
+ import { useEffect as useEffect8, useMemo as useMemo5, useState as useState11 } from "react";
37622
37717
 
37623
37718
  // src/table3/filters.tsx
37624
37719
  import { jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
@@ -37728,13 +37823,13 @@ function Filter({
37728
37823
  sort,
37729
37824
  setSort
37730
37825
  }) {
37731
- const [visible, setVisible] = useState10(false);
37732
- const [text, setText] = useState10("");
37826
+ const [visible, setVisible] = useState11(false);
37827
+ const [text, setText] = useState11("");
37733
37828
  const items = useMemo5(
37734
37829
  () => [...new Set(Object.values(objectData).map((o) => o[h]))],
37735
37830
  [objectData]
37736
37831
  );
37737
- const [selected, setSelected] = useState10(items);
37832
+ const [selected, setSelected] = useState11(items);
37738
37833
  const itemsFiltered = useMemo5(
37739
37834
  () => items.sort((a, b) => `${a}`.localeCompare(b)).filter((item) => {
37740
37835
  if (!text) return true;
@@ -38023,10 +38118,10 @@ function TableHead({
38023
38118
  }
38024
38119
 
38025
38120
  // src/table3/body.tsx
38026
- import { useState as useState11 } from "react";
38121
+ import { useState as useState12 } from "react";
38027
38122
 
38028
38123
  // src/table3/tr.tsx
38029
- import React6 from "react";
38124
+ import React7 from "react";
38030
38125
  import { jsx as jsx24, jsxs as jsxs17 } from "react/jsx-runtime";
38031
38126
  function TR({
38032
38127
  handlers,
@@ -38088,7 +38183,7 @@ function TR({
38088
38183
  return null;
38089
38184
  } else if (handlers == null ? void 0 : handlers[h]) {
38090
38185
  const original = handlers[h];
38091
- const cloned = React6.cloneElement(original, {
38186
+ const cloned = React7.cloneElement(original, {
38092
38187
  // si es controlado por value → actualiza con row[h]
38093
38188
  value: ((_a = original.props) == null ? void 0 : _a.value) !== void 0 ? row[h] : void 0,
38094
38189
  // si usa children → actualiza con row[h] también
@@ -38168,7 +38263,7 @@ function TableBody({
38168
38263
  symbols,
38169
38264
  sort
38170
38265
  }) {
38171
- const [selected, setSelected] = useState11(-1);
38266
+ const [selected, setSelected] = useState12(-1);
38172
38267
  const sorted = Object.entries(objectData).sort(([, a], [, b]) => {
38173
38268
  for (const [key, order] of Object.entries(
38174
38269
  sort || { id: "desc", _id: "desc" }
@@ -38344,7 +38439,7 @@ function TableFooter({
38344
38439
  }
38345
38440
 
38346
38441
  // src/table3/dialog.tsx
38347
- import React7, { useMemo as useMemo6 } from "react";
38442
+ import React8, { useMemo as useMemo6 } from "react";
38348
38443
  import { jsx as jsx28, jsxs as jsxs20 } from "react/jsx-runtime";
38349
38444
  function Dialog3({
38350
38445
  modalRef,
@@ -38362,8 +38457,8 @@ function Dialog3({
38362
38457
  return (_a = modalRef.current) == null ? void 0 : _a.close();
38363
38458
  };
38364
38459
  const clonedModal = useMemo6(() => {
38365
- if (dialogRow && React7.isValidElement(children)) {
38366
- return React7.cloneElement(children, {
38460
+ if (dialogRow && React8.isValidElement(children)) {
38461
+ return React8.cloneElement(children, {
38367
38462
  key: JSON.stringify(dialogRow),
38368
38463
  row: dialogRow,
38369
38464
  show,
@@ -38417,8 +38512,8 @@ function Table3({
38417
38512
  sortBy,
38418
38513
  ...props
38419
38514
  }) {
38420
- const [handlers, setHandlers] = useState12({});
38421
- const [page, setPage] = useState12(1);
38515
+ const [handlers, setHandlers] = useState13({});
38516
+ const [page, setPage] = useState13(1);
38422
38517
  function dataReducer(a, b) {
38423
38518
  if (b == null) return {};
38424
38519
  if (Array.isArray(b)) {
@@ -38439,7 +38534,7 @@ function Table3({
38439
38534
  };
38440
38535
  const newHandlers = { ...handlers };
38441
38536
  for (let item in cc) {
38442
- const isReactComponent = React8.isValidElement(cc[item]);
38537
+ const isReactComponent = React9.isValidElement(cc[item]);
38443
38538
  if (isReactComponent) {
38444
38539
  newHandlers[item] = cc[item];
38445
38540
  const value = ((_c = (_b = cc[item]) == null ? void 0 : _b.props) == null ? void 0 : _c.value) || (typeof ((_e = (_d = cc[item]) == null ? void 0 : _d.props) == null ? void 0 : _e.children) !== "object" ? (_g = (_f = cc[item]) == null ? void 0 : _f.props) == null ? void 0 : _g.children : "");
@@ -38476,9 +38571,9 @@ function Table3({
38476
38571
  if (!objectData) return 0;
38477
38572
  return maxItems ? Math.ceil(Object.keys(objectData).length / maxItems) : 1;
38478
38573
  }, [objectData, maxItems]);
38479
- const [sort, setSort] = useState12(sortBy);
38574
+ const [sort, setSort] = useState13(sortBy);
38480
38575
  const modalRef = useRef5(null);
38481
- const [dialogRow, setDialogRow] = useState12({});
38576
+ const [dialogRow, setDialogRow] = useState13({});
38482
38577
  const context = {
38483
38578
  objectData,
38484
38579
  headers,
@@ -38538,16 +38633,16 @@ function Table3({
38538
38633
  import { useEffect as useEffect14 } from "react";
38539
38634
 
38540
38635
  // src/table-advanced/h.table.tsx
38541
- import React9, {
38636
+ import React10, {
38542
38637
  useCallback as useCallback3,
38543
38638
  useEffect as useEffect12,
38544
38639
  useMemo as useMemo10,
38545
38640
  useRef as useRef7,
38546
- useState as useState15
38641
+ useState as useState16
38547
38642
  } from "react";
38548
38643
 
38549
38644
  // src/table-advanced/header.tsx
38550
- import { useEffect as useEffect10, useMemo as useMemo8, useRef as useRef6, useState as useState13 } from "react";
38645
+ import { useEffect as useEffect10, useMemo as useMemo8, useRef as useRef6, useState as useState14 } from "react";
38551
38646
  import { createPortal } from "react-dom";
38552
38647
 
38553
38648
  // src/table-advanced/icons.tsx
@@ -38606,7 +38701,7 @@ function NextIcon() {
38606
38701
  height: "1em",
38607
38702
  width: "1em",
38608
38703
  xmlns: "http://www.w3.org/2000/svg",
38609
- children: /* @__PURE__ */ jsx30("polyline", { fill: "none", "stroke-width": "2", points: "7 2 17 12 7 22" })
38704
+ children: /* @__PURE__ */ jsx30("polyline", { fill: "none", strokeWidth: "2", points: "7 2 17 12 7 22" })
38610
38705
  }
38611
38706
  );
38612
38707
  }
@@ -38801,12 +38896,12 @@ function Header({
38801
38896
  index,
38802
38897
  length
38803
38898
  }) {
38804
- const [visible, setVisible] = useState13(false);
38805
- const [hovered, setHovered] = useState13(false);
38899
+ const [visible, setVisible] = useState14(false);
38900
+ const [hovered, setHovered] = useState14(false);
38806
38901
  const sortIndex = context.sort.findIndex((b) => b.field == header);
38807
- const [text, setText] = useState13("");
38902
+ const [text, setText] = useState14("");
38808
38903
  const cellRef = useRef6(null);
38809
- const [coords, setCoords] = useState13(
38904
+ const [coords, setCoords] = useState14(
38810
38905
  null
38811
38906
  );
38812
38907
  const filteredValues = useMemo8(() => {
@@ -38815,7 +38910,7 @@ function Header({
38815
38910
  return `${d}`.toLowerCase().includes(text.toLowerCase());
38816
38911
  });
38817
38912
  }, [context.data, header, text]);
38818
- const [selected, setSelected] = useState13([]);
38913
+ const [selected, setSelected] = useState14([]);
38819
38914
  const hasFilter = context.filters.find((b) => b.field == header);
38820
38915
  useEffect10(() => {
38821
38916
  setSelected(filteredValues);
@@ -39165,16 +39260,16 @@ function valueFormatter({
39165
39260
  }
39166
39261
 
39167
39262
  // src/table-advanced/use.pagination.tsx
39168
- import { useState as useState14, useMemo as useMemo9, useCallback as useCallback2, useEffect as useEffect11 } from "react";
39263
+ import { useState as useState15, useMemo as useMemo9, useCallback as useCallback2, useEffect as useEffect11 } from "react";
39169
39264
  function usePaginacion({
39170
39265
  total,
39171
39266
  tamanioPagina = 100,
39172
39267
  paginaInicial = 1
39173
39268
  }) {
39174
- const [totalPaginas, setTotalPaginas] = useState14(
39269
+ const [totalPaginas, setTotalPaginas] = useState15(
39175
39270
  Math.max(1, Math.ceil(total / tamanioPagina))
39176
39271
  );
39177
- const [pagina, setPagina] = useState14(
39272
+ const [pagina, setPagina] = useState15(
39178
39273
  Math.min(Math.max(paginaInicial, 1), totalPaginas)
39179
39274
  );
39180
39275
  const inicio = total === 0 ? 0 : (pagina - 1) * tamanioPagina + 1;
@@ -39222,9 +39317,9 @@ import { jsx as jsx33, jsxs as jsxs26 } from "react/jsx-runtime";
39222
39317
  function HTable({
39223
39318
  context
39224
39319
  }) {
39225
- const [isLoading, setIsloading] = useState15(false);
39320
+ const [isLoading, setIsloading] = useState16(false);
39226
39321
  const { cols, headers } = context;
39227
- const [currentIndex, setCurrentIndex] = useState15(-1);
39322
+ const [currentIndex, setCurrentIndex] = useState16(-1);
39228
39323
  const tableRef = useRef7(null);
39229
39324
  const modalRef = useRef7(null);
39230
39325
  const catDensities = { confortable: 80, compact: 30, standard: 53 };
@@ -39239,7 +39334,7 @@ function HTable({
39239
39334
  function resize(headers3) {
39240
39335
  return Object.fromEntries(headers3.map((h) => [h, getWidth(h)]));
39241
39336
  }
39242
- const [widths2, setWidths2] = useState15({});
39337
+ const [widths2, setWidths2] = useState16({});
39243
39338
  const startDrag2 = useCallback3(
39244
39339
  (e, headerKey) => {
39245
39340
  var _a;
@@ -39526,7 +39621,7 @@ function HTable({
39526
39621
  context.setEditions(newEditions);
39527
39622
  }
39528
39623
  }
39529
- ) : ((_c = context.buttons) == null ? void 0 : _c[key]) ? React9.cloneElement(context.buttons[key], {
39624
+ ) : ((_c = context.buttons) == null ? void 0 : _c[key]) ? React10.cloneElement(context.buttons[key], {
39530
39625
  // children: context.buttons[key]?.props?.children
39531
39626
  // ? item
39532
39627
  // : undefined,
@@ -39570,7 +39665,7 @@ function HTable({
39570
39665
  }) : ["number", "string"].includes(typeof item) ? valueFormatter({
39571
39666
  value: item,
39572
39667
  currentCoin: context.currentCoin
39573
- }) : React9.isValidElement(item) ? item : JSON.stringify(item)
39668
+ }) : React10.isValidElement(item) ? item : JSON.stringify(item)
39574
39669
  },
39575
39670
  row.id + i
39576
39671
  );
@@ -39667,7 +39762,7 @@ function HTable({
39667
39762
  "div",
39668
39763
  {
39669
39764
  className: "bg-white/40 absolute inset-0 text-black flex items-center justify-center",
39670
- style: { zIndex: 9999999 },
39765
+ style: { zIndex: 10 },
39671
39766
  children: "Loading..."
39672
39767
  }
39673
39768
  )
@@ -39705,7 +39800,7 @@ function ModalContent({
39705
39800
  }
39706
39801
  )
39707
39802
  ] }),
39708
- React9.cloneElement(context.modal, {
39803
+ React10.cloneElement(context.modal, {
39709
39804
  row: searchedData[currentIndex],
39710
39805
  hide
39711
39806
  })
@@ -39713,7 +39808,7 @@ function ModalContent({
39713
39808
  }
39714
39809
 
39715
39810
  // src/table-advanced/context.ts
39716
- import { useEffect as useEffect13, useMemo as useMemo11, useReducer as useReducer3, useState as useState16 } from "react";
39811
+ import { useEffect as useEffect13, useMemo as useMemo11, useReducer as useReducer3, useState as useState17 } from "react";
39717
39812
 
39718
39813
  // src/table-advanced/filter.reducer.ts
39719
39814
  var filterReducer = (acc, b) => {
@@ -39741,17 +39836,17 @@ var sortReducer = (acc, b) => {
39741
39836
  // src/table-advanced/context.ts
39742
39837
  function useContext({ onSelect }) {
39743
39838
  const excel = useExcel();
39744
- const [editions, setEditions] = useState16([]);
39745
- const [selected, setSelected] = useState16([]);
39746
- const [data, setData] = useState16([]);
39839
+ const [editions, setEditions] = useState17([]);
39840
+ const [selected, setSelected] = useState17([]);
39841
+ const [data, setData] = useState17([]);
39747
39842
  const headers = [...new Set(data.map((b) => Object.keys(b)).flat())];
39748
- const [currentHeader, setCurrentHeader] = useState16(null);
39843
+ const [currentHeader, setCurrentHeader] = useState17(null);
39749
39844
  const cols = headers.length;
39750
39845
  const [filters, setFilters] = useReducer3(
39751
39846
  filterReducer,
39752
39847
  new Array()
39753
39848
  );
39754
- const [searchBy, setSearchBy] = useState16("");
39849
+ const [searchBy, setSearchBy] = useState17("");
39755
39850
  const [sort, setSort] = useReducer3(sortReducer, new Array());
39756
39851
  const sortedData = useMemo11(() => {
39757
39852
  return [...data].sort((a, b) => {
@@ -39846,15 +39941,15 @@ function TableAdvanced(tableProps) {
39846
39941
  }
39847
39942
 
39848
39943
  // src/tabs/index.tsx
39849
- import React10, { useEffect as useEffect15, useState as useState18 } from "react";
39944
+ import React11, { useEffect as useEffect15, useState as useState19 } from "react";
39850
39945
  import { Fragment as Fragment3, jsx as jsx35, jsxs as jsxs27 } from "react/jsx-runtime";
39851
39946
  function TabContainer({
39852
39947
  children,
39853
39948
  labelMaxWidth,
39854
39949
  currentIndex = 0
39855
39950
  }) {
39856
- const [index, setIndex] = useState18(0);
39857
- const items = React10.Children.toArray(
39951
+ const [index, setIndex] = useState19(0);
39952
+ const items = React11.Children.toArray(
39858
39953
  children
39859
39954
  );
39860
39955
  const labels = items.map((c) => c.props.label);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-recomponents",
3
- "version": "2.0.67",
3
+ "version": "2.0.69",
4
4
  "description": "description nueva",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -30,3 +30,40 @@ export function DownloadIcon() {
30
30
  </svg>
31
31
  );
32
32
  }
33
+
34
+ export function OpenIcon() {
35
+ return (
36
+ <svg
37
+ stroke="currentColor"
38
+ fill="none"
39
+ strokeWidth="2"
40
+ viewBox="0 0 24 24"
41
+ strokeLinecap="round"
42
+ strokeLinejoin="round"
43
+ height="1em"
44
+ width="1em"
45
+ xmlns="http://www.w3.org/2000/svg"
46
+ >
47
+ <polyline points="15 3 21 3 21 9"></polyline>
48
+ <polyline points="9 21 3 21 3 15"></polyline>
49
+ <line x1="21" y1="3" x2="14" y2="10"></line>
50
+ <line x1="3" y1="21" x2="10" y2="14"></line>
51
+ </svg>
52
+ );
53
+ }
54
+ export function DeleteIcon() {
55
+ return (
56
+ <svg
57
+ stroke="currentColor"
58
+ fill="currentColor"
59
+ strokeWidth="0"
60
+ viewBox="0 0 24 24"
61
+ height="1em"
62
+ width="1em"
63
+ xmlns="http://www.w3.org/2000/svg"
64
+ >
65
+ <path fill="none" d="M0 0h24v24H0z"></path>
66
+ <path d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"></path>
67
+ </svg>
68
+ );
69
+ }