next-recomponents 1.7.16 → 1.7.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -163,7 +163,7 @@ interface Props$1 extends React$1.DetailedHTMLProps<React$1.DialogHTMLAttributes
163
163
  declare function Modal({ button, children, ref, title }: Props$1): react_jsx_runtime.JSX.Element;
164
164
 
165
165
  type PreProps = {
166
- data: string;
166
+ data: any;
167
167
  };
168
168
  declare const Pre: React$1.FC<PreProps>;
169
169
 
package/dist/index.d.ts CHANGED
@@ -163,7 +163,7 @@ interface Props$1 extends React$1.DetailedHTMLProps<React$1.DialogHTMLAttributes
163
163
  declare function Modal({ button, children, ref, title }: Props$1): react_jsx_runtime.JSX.Element;
164
164
 
165
165
  type PreProps = {
166
- data: string;
166
+ data: any;
167
167
  };
168
168
  declare const Pre: React$1.FC<PreProps>;
169
169
 
package/dist/index.js CHANGED
@@ -10998,7 +10998,7 @@ function Container({
10998
10998
  {
10999
10999
  className: "bg-blue-100 overflow-hidden",
11000
11000
  initial: isFooterOpen,
11001
- animate: { height: isFooterOpen ? 200 : 40 },
11001
+ animate: { maxHeight: isFooterOpen ? 200 : 40 },
11002
11002
  transition: { duration: 0.3 },
11003
11003
  children: [
11004
11004
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "flex justify-center items-center p-2", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
@@ -43581,22 +43581,35 @@ function HTable(_a) {
43581
43581
  ] });
43582
43582
  }
43583
43583
 
43584
- // src/table/index.tsx
43584
+ // src/table/v.tsx
43585
43585
  var import_jsx_runtime14 = require("react/jsx-runtime");
43586
+ function VTable({ data }) {
43587
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("table", { className: "min-w-full border border-gray-300 bg-white text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("tbody", { children: Object.entries(data).map(([key, value], idx) => {
43588
+ const content = typeof value === "object" && value !== null && "content" in value ? value.content : value;
43589
+ const handler = typeof value === "object" && value !== null && "handler" in value ? value.handler : null;
43590
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("tr", { className: "border-t", children: [
43591
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("td", { className: "p-2 font-medium text-gray-700 bg-gray-100 w-1/3", children: key }),
43592
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("td", { className: "p-2 text-gray-900", children: handler ? handler : String(content) })
43593
+ ] }, idx);
43594
+ }) }) });
43595
+ }
43596
+
43597
+ // src/table/index.tsx
43598
+ var import_jsx_runtime15 = require("react/jsx-runtime");
43586
43599
  function Table(_a) {
43587
43600
  var props = __objRest(_a, []);
43588
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
43601
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
43589
43602
  "div",
43590
43603
  {
43591
43604
  className: "bg-gray-200 border rounded shadow p-1",
43592
- children: Array.isArray(props.data) ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(HTable, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: " p-5 border rounded shadow bg-yellw-500", children: "No es un array" })
43605
+ children: Array.isArray(props.data) ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(HTable, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(VTable, __spreadValues({}, props))
43593
43606
  }
43594
43607
  );
43595
43608
  }
43596
43609
 
43597
43610
  // src/text-area/index.tsx
43598
43611
  var import_react26 = require("react");
43599
- var import_jsx_runtime15 = require("react/jsx-runtime");
43612
+ var import_jsx_runtime16 = require("react/jsx-runtime");
43600
43613
  function TextArea(_a) {
43601
43614
  var _b = _a, {
43602
43615
  label,
@@ -43612,10 +43625,10 @@ function TextArea(_a) {
43612
43625
  "children"
43613
43626
  ]);
43614
43627
  const [value, setValue] = (0, import_react26.useState)(children);
43615
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "w-full", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { className: "flex flex-col gap-1", children: [
43616
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "font-bold ", children: label }),
43617
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { children: [
43618
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
43628
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "w-full", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("label", { className: "flex flex-col gap-1", children: [
43629
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "font-bold ", children: label }),
43630
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { children: [
43631
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
43619
43632
  "textarea",
43620
43633
  __spreadProps(__spreadValues({}, props), {
43621
43634
  className: ["p-1 w-full rounded border shadow", className].join(
@@ -43631,7 +43644,7 @@ function TextArea(_a) {
43631
43644
  value
43632
43645
  })
43633
43646
  ),
43634
- maxLength && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: " text-xs text-gray text-right", children: [
43647
+ maxLength && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: " text-xs text-gray text-right", children: [
43635
43648
  value.length,
43636
43649
  " / ",
43637
43650
  maxLength
@@ -44133,9 +44146,9 @@ function useResources({
44133
44146
  var import_react29 = __toESM(require("react"));
44134
44147
 
44135
44148
  // src/select/icon.tsx
44136
- var import_jsx_runtime16 = require("react/jsx-runtime");
44149
+ var import_jsx_runtime17 = require("react/jsx-runtime");
44137
44150
  function SelectIcon() {
44138
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
44151
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
44139
44152
  "svg",
44140
44153
  {
44141
44154
  stroke: "currentColor",
@@ -44145,15 +44158,15 @@ function SelectIcon() {
44145
44158
  height: "20px",
44146
44159
  width: "20px",
44147
44160
  xmlns: "http://www.w3.org/2000/svg",
44148
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("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" })
44161
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("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" })
44149
44162
  }
44150
44163
  );
44151
44164
  }
44152
44165
 
44153
44166
  // src/select/close.tsx
44154
- var import_jsx_runtime17 = require("react/jsx-runtime");
44167
+ var import_jsx_runtime18 = require("react/jsx-runtime");
44155
44168
  function CloseIcon() {
44156
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
44169
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
44157
44170
  "svg",
44158
44171
  {
44159
44172
  stroke: "currentColor",
@@ -44163,13 +44176,13 @@ function CloseIcon() {
44163
44176
  height: "20px",
44164
44177
  width: "20px",
44165
44178
  xmlns: "http://www.w3.org/2000/svg",
44166
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("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" })
44179
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("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" })
44167
44180
  }
44168
44181
  );
44169
44182
  }
44170
44183
 
44171
44184
  // src/select/index.tsx
44172
- var import_jsx_runtime18 = require("react/jsx-runtime");
44185
+ var import_jsx_runtime19 = require("react/jsx-runtime");
44173
44186
  function Select(_a) {
44174
44187
  var _b = _a, {
44175
44188
  label,
@@ -44251,10 +44264,10 @@ function Select(_a) {
44251
44264
  }
44252
44265
  }
44253
44266
  }, [isOpen]);
44254
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { ref: containerRef, className: "w-full", children: [
44255
- label && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("label", { className: "font-bold mb-1 block", children: label }),
44256
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "relative", children: [
44257
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
44267
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { ref: containerRef, className: "w-full", children: [
44268
+ label && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("label", { className: "font-bold mb-1 block", children: label }),
44269
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "relative", children: [
44270
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
44258
44271
  "input",
44259
44272
  __spreadProps(__spreadValues({
44260
44273
  autoComplete: "off",
@@ -44292,8 +44305,8 @@ function Select(_a) {
44292
44305
  onKeyDown: handleKeyDown
44293
44306
  })
44294
44307
  ),
44295
- !isOpen && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "absolute top-0 right-0 flex flex-col justify-center items-center px-2 py-2 font-bold", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SelectIcon, {}) }),
44296
- isOpen && inputValue != "" && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
44308
+ !isOpen && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "absolute top-0 right-0 flex flex-col justify-center items-center px-2 py-2 font-bold", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(SelectIcon, {}) }),
44309
+ isOpen && inputValue != "" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
44297
44310
  "button",
44298
44311
  {
44299
44312
  onClick: (e) => {
@@ -44306,14 +44319,14 @@ function Select(_a) {
44306
44319
  },
44307
44320
  className: "absolute top-0 right-0 flex flex-col justify-center items-center px-2 py-2 font-bold text-red-500",
44308
44321
  style: { zIndex: 999999999 },
44309
- children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(CloseIcon, {})
44322
+ children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(CloseIcon, {})
44310
44323
  }
44311
44324
  ),
44312
- isOpen && filtered.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
44325
+ isOpen && filtered.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
44313
44326
  "div",
44314
44327
  {
44315
44328
  className: `absolute w-full border rounded shadow bg-white z-10 max-h-60 overflow-y-auto ${openUpwards ? "bottom-full mb-1" : "mt-1"}`,
44316
- children: filtered.map((opt, index) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
44329
+ children: filtered.map((opt, index) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
44317
44330
  "div",
44318
44331
  {
44319
44332
  className: `p-2 cursor-pointer ${index === highlightedIndex ? "bg-blue-100" : "hover:bg-gray-100"}`,
@@ -44344,7 +44357,7 @@ function Select(_a) {
44344
44357
  }
44345
44358
  )
44346
44359
  ] }),
44347
- isOpen && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
44360
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
44348
44361
  "div",
44349
44362
  {
44350
44363
  className: "fixed top-0 left-0 w-full h-screen",
@@ -44358,9 +44371,9 @@ function Select(_a) {
44358
44371
  var import_react30 = __toESM(require("react"));
44359
44372
 
44360
44373
  // src/modal/close.tsx
44361
- var import_jsx_runtime19 = require("react/jsx-runtime");
44374
+ var import_jsx_runtime20 = require("react/jsx-runtime");
44362
44375
  function CloseIcon2() {
44363
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
44376
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
44364
44377
  "svg",
44365
44378
  {
44366
44379
  stroke: "currentColor",
@@ -44370,13 +44383,13 @@ function CloseIcon2() {
44370
44383
  height: "20px",
44371
44384
  width: "20px",
44372
44385
  xmlns: "http://www.w3.org/2000/svg",
44373
- children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("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" })
44386
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("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" })
44374
44387
  }
44375
44388
  );
44376
44389
  }
44377
44390
 
44378
44391
  // src/modal/index.tsx
44379
- var import_jsx_runtime20 = require("react/jsx-runtime");
44392
+ var import_jsx_runtime21 = require("react/jsx-runtime");
44380
44393
  function Modal({ button, children, ref, title = "" }) {
44381
44394
  const modalRef = ref || (0, import_react30.useRef)(null);
44382
44395
  function show() {
@@ -44387,7 +44400,7 @@ function Modal({ button, children, ref, title = "" }) {
44387
44400
  var _a;
44388
44401
  typeof modalRef == "object" && ((_a = modalRef.current) == null ? void 0 : _a.close());
44389
44402
  }
44390
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
44403
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
44391
44404
  import_react30.default.Children.map(button, (child) => {
44392
44405
  if (import_react30.default.isValidElement(child)) {
44393
44406
  const { type, props } = child;
@@ -44401,17 +44414,17 @@ function Modal({ button, children, ref, title = "" }) {
44401
44414
  }
44402
44415
  return child;
44403
44416
  }),
44404
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("dialog", { ref: modalRef, className: "p-5 border shadow rounded", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "relative", children: [
44405
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
44417
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("dialog", { ref: modalRef, className: "p-5 border shadow rounded", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "relative", children: [
44418
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
44406
44419
  "button",
44407
44420
  {
44408
44421
  onClick: hide,
44409
44422
  className: "absolute top-0 right-0 text-red-500 ",
44410
- children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(CloseIcon2, {})
44423
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CloseIcon2, {})
44411
44424
  }
44412
44425
  ),
44413
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "font-bold text-xl", children: title }),
44414
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "flex flex-col gap-3 pt-6", children: import_react30.default.Children.map(children, (child) => {
44426
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "font-bold text-xl", children: title }),
44427
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "flex flex-col gap-3 pt-6", children: import_react30.default.Children.map(children, (child) => {
44415
44428
  if (import_react30.default.isValidElement(child)) {
44416
44429
  const { type, props } = child;
44417
44430
  return import_react30.default.createElement(type, __spreadProps(__spreadValues({}, props), { hide }));
@@ -44423,16 +44436,10 @@ function Modal({ button, children, ref, title = "" }) {
44423
44436
  }
44424
44437
 
44425
44438
  // src/pre/index.tsx
44426
- var import_jsx_runtime21 = require("react/jsx-runtime");
44439
+ var import_jsx_runtime22 = require("react/jsx-runtime");
44427
44440
  var Pre = ({ data }) => {
44428
- let formatted = data;
44429
- try {
44430
- const parsed = JSON.parse(data);
44431
- formatted = JSON.stringify(parsed, null, 2);
44432
- } catch (err) {
44433
- console.error("Invalid JSON string:", err);
44434
- }
44435
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
44441
+ const formatted = JSON.stringify(data, null, 2);
44442
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
44436
44443
  "pre",
44437
44444
  {
44438
44445
  style: {
@@ -44563,9 +44570,9 @@ var import_react31 = require("react");
44563
44570
  var import_react_datepicker = __toESM(require("react-datepicker"));
44564
44571
 
44565
44572
  // src/calendar/calendar.icon.tsx
44566
- var import_jsx_runtime22 = require("react/jsx-runtime");
44573
+ var import_jsx_runtime23 = require("react/jsx-runtime");
44567
44574
  function CalendarIcon() {
44568
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
44575
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
44569
44576
  "svg",
44570
44577
  {
44571
44578
  stroke: "currentColor",
@@ -44575,13 +44582,13 @@ function CalendarIcon() {
44575
44582
  height: "20px",
44576
44583
  width: "20px",
44577
44584
  xmlns: "http://www.w3.org/2000/svg",
44578
- children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("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" })
44585
+ children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("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" })
44579
44586
  }
44580
44587
  );
44581
44588
  }
44582
44589
 
44583
44590
  // src/calendar/index.tsx
44584
- var import_jsx_runtime23 = require("react/jsx-runtime");
44591
+ var import_jsx_runtime24 = require("react/jsx-runtime");
44585
44592
  function MyCalendar(_a) {
44586
44593
  var _b = _a, {
44587
44594
  enabledDates,
@@ -44619,10 +44626,10 @@ function MyCalendar(_a) {
44619
44626
  if (!(enabledDates == null ? void 0 : enabledDates.length)) {
44620
44627
  return null;
44621
44628
  }
44622
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "relative", children: [
44623
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("label", { className: "flex flex-col gap-1", children: [
44624
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "font-bold ", children: label }),
44625
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
44629
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "relative", children: [
44630
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("label", { className: "flex flex-col gap-1", children: [
44631
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "font-bold ", children: label }),
44632
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
44626
44633
  "div",
44627
44634
  {
44628
44635
  onClick: () => {
@@ -44631,7 +44638,7 @@ function MyCalendar(_a) {
44631
44638
  },
44632
44639
  className: "cursor-pointer flex items-center justify-center",
44633
44640
  children: [
44634
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
44641
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
44635
44642
  "input",
44636
44643
  __spreadProps(__spreadValues({}, otherProps), {
44637
44644
  className: [
@@ -44644,12 +44651,12 @@ function MyCalendar(_a) {
44644
44651
  readOnly: true
44645
44652
  })
44646
44653
  ),
44647
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "absolute", style: { right: "10px" }, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(CalendarIcon, {}) })
44654
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "absolute", style: { right: "10px" }, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(CalendarIcon, {}) })
44648
44655
  ]
44649
44656
  }
44650
44657
  ) })
44651
44658
  ] }),
44652
- visible && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
44659
+ visible && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
44653
44660
  "dialog",
44654
44661
  {
44655
44662
  ref: modalRef,
@@ -44661,7 +44668,7 @@ function MyCalendar(_a) {
44661
44668
  (_a2 = modalRef.current) == null ? void 0 : _a2.close();
44662
44669
  }
44663
44670
  },
44664
- children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
44671
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
44665
44672
  import_react_datepicker.default,
44666
44673
  {
44667
44674
  inline: true,
@@ -44676,7 +44683,7 @@ function MyCalendar(_a) {
44676
44683
  }
44677
44684
 
44678
44685
  // src/doc-viewer/index.tsx
44679
- var import_jsx_runtime24 = require("react/jsx-runtime");
44686
+ var import_jsx_runtime25 = require("react/jsx-runtime");
44680
44687
  function DocumentViewer({ item }) {
44681
44688
  const { url, name, contentType, width = "100%", height = "100%" } = item;
44682
44689
  const isImage = contentType.startsWith("image/");
@@ -44685,10 +44692,10 @@ function DocumentViewer({ item }) {
44685
44692
  const viewerUrl = isGoogleDocCompatible ? `https://docs.google.com/gview?url=${encodeURIComponent(
44686
44693
  url
44687
44694
  )}&embedded=true` : url;
44688
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "border shadow rounded p-2 h-[100%]", children: [
44689
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "mb-1 flex justify-between ", children: [
44690
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("h3", { className: "font-bold", children: name }),
44691
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
44695
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "border shadow rounded p-2 h-[100%]", children: [
44696
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "mb-1 flex justify-between ", children: [
44697
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("h3", { className: "font-bold", children: name }),
44698
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
44692
44699
  "a",
44693
44700
  {
44694
44701
  href: url,
@@ -44700,7 +44707,7 @@ function DocumentViewer({ item }) {
44700
44707
  }
44701
44708
  )
44702
44709
  ] }),
44703
- isImage ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
44710
+ isImage ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
44704
44711
  "img",
44705
44712
  {
44706
44713
  src: url,
@@ -44713,7 +44720,7 @@ function DocumentViewer({ item }) {
44713
44720
  display: "block"
44714
44721
  }
44715
44722
  }
44716
- ) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
44723
+ ) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
44717
44724
  "iframe",
44718
44725
  {
44719
44726
  title: name,
package/dist/index.mjs CHANGED
@@ -10975,7 +10975,7 @@ function Container({
10975
10975
  {
10976
10976
  className: "bg-blue-100 overflow-hidden",
10977
10977
  initial: isFooterOpen,
10978
- animate: { height: isFooterOpen ? 200 : 40 },
10978
+ animate: { maxHeight: isFooterOpen ? 200 : 40 },
10979
10979
  transition: { duration: 0.3 },
10980
10980
  children: [
10981
10981
  /* @__PURE__ */ jsx5("div", { className: "flex justify-center items-center p-2", children: /* @__PURE__ */ jsx5(
@@ -43563,15 +43563,28 @@ function HTable(_a) {
43563
43563
  ] });
43564
43564
  }
43565
43565
 
43566
+ // src/table/v.tsx
43567
+ import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
43568
+ function VTable({ data }) {
43569
+ return /* @__PURE__ */ jsx13("table", { className: "min-w-full border border-gray-300 bg-white text-sm", children: /* @__PURE__ */ jsx13("tbody", { children: Object.entries(data).map(([key, value], idx) => {
43570
+ const content = typeof value === "object" && value !== null && "content" in value ? value.content : value;
43571
+ const handler = typeof value === "object" && value !== null && "handler" in value ? value.handler : null;
43572
+ return /* @__PURE__ */ jsxs11("tr", { className: "border-t", children: [
43573
+ /* @__PURE__ */ jsx13("td", { className: "p-2 font-medium text-gray-700 bg-gray-100 w-1/3", children: key }),
43574
+ /* @__PURE__ */ jsx13("td", { className: "p-2 text-gray-900", children: handler ? handler : String(content) })
43575
+ ] }, idx);
43576
+ }) }) });
43577
+ }
43578
+
43566
43579
  // src/table/index.tsx
43567
- import { jsx as jsx13 } from "react/jsx-runtime";
43580
+ import { jsx as jsx14 } from "react/jsx-runtime";
43568
43581
  function Table(_a) {
43569
43582
  var props = __objRest(_a, []);
43570
- return /* @__PURE__ */ jsx13(
43583
+ return /* @__PURE__ */ jsx14(
43571
43584
  "div",
43572
43585
  {
43573
43586
  className: "bg-gray-200 border rounded shadow p-1",
43574
- children: Array.isArray(props.data) ? /* @__PURE__ */ jsx13(HTable, __spreadValues({}, props)) : /* @__PURE__ */ jsx13("div", { className: " p-5 border rounded shadow bg-yellw-500", children: "No es un array" })
43587
+ children: Array.isArray(props.data) ? /* @__PURE__ */ jsx14(HTable, __spreadValues({}, props)) : /* @__PURE__ */ jsx14(VTable, __spreadValues({}, props))
43575
43588
  }
43576
43589
  );
43577
43590
  }
@@ -43580,7 +43593,7 @@ function Table(_a) {
43580
43593
  import {
43581
43594
  useState as useState7
43582
43595
  } from "react";
43583
- import { jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
43596
+ import { jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
43584
43597
  function TextArea(_a) {
43585
43598
  var _b = _a, {
43586
43599
  label,
@@ -43596,10 +43609,10 @@ function TextArea(_a) {
43596
43609
  "children"
43597
43610
  ]);
43598
43611
  const [value, setValue] = useState7(children);
43599
- return /* @__PURE__ */ jsx14("div", { className: "w-full", children: /* @__PURE__ */ jsxs11("label", { className: "flex flex-col gap-1", children: [
43600
- /* @__PURE__ */ jsx14("div", { className: "font-bold ", children: label }),
43601
- /* @__PURE__ */ jsxs11("div", { children: [
43602
- /* @__PURE__ */ jsx14(
43612
+ return /* @__PURE__ */ jsx15("div", { className: "w-full", children: /* @__PURE__ */ jsxs12("label", { className: "flex flex-col gap-1", children: [
43613
+ /* @__PURE__ */ jsx15("div", { className: "font-bold ", children: label }),
43614
+ /* @__PURE__ */ jsxs12("div", { children: [
43615
+ /* @__PURE__ */ jsx15(
43603
43616
  "textarea",
43604
43617
  __spreadProps(__spreadValues({}, props), {
43605
43618
  className: ["p-1 w-full rounded border shadow", className].join(
@@ -43615,7 +43628,7 @@ function TextArea(_a) {
43615
43628
  value
43616
43629
  })
43617
43630
  ),
43618
- maxLength && /* @__PURE__ */ jsxs11("div", { className: " text-xs text-gray text-right", children: [
43631
+ maxLength && /* @__PURE__ */ jsxs12("div", { className: " text-xs text-gray text-right", children: [
43619
43632
  value.length,
43620
43633
  " / ",
43621
43634
  maxLength
@@ -44121,9 +44134,9 @@ import React6, {
44121
44134
  } from "react";
44122
44135
 
44123
44136
  // src/select/icon.tsx
44124
- import { jsx as jsx15 } from "react/jsx-runtime";
44137
+ import { jsx as jsx16 } from "react/jsx-runtime";
44125
44138
  function SelectIcon() {
44126
- return /* @__PURE__ */ jsx15(
44139
+ return /* @__PURE__ */ jsx16(
44127
44140
  "svg",
44128
44141
  {
44129
44142
  stroke: "currentColor",
@@ -44133,15 +44146,15 @@ function SelectIcon() {
44133
44146
  height: "20px",
44134
44147
  width: "20px",
44135
44148
  xmlns: "http://www.w3.org/2000/svg",
44136
- children: /* @__PURE__ */ jsx15("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" })
44149
+ children: /* @__PURE__ */ jsx16("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" })
44137
44150
  }
44138
44151
  );
44139
44152
  }
44140
44153
 
44141
44154
  // src/select/close.tsx
44142
- import { jsx as jsx16 } from "react/jsx-runtime";
44155
+ import { jsx as jsx17 } from "react/jsx-runtime";
44143
44156
  function CloseIcon() {
44144
- return /* @__PURE__ */ jsx16(
44157
+ return /* @__PURE__ */ jsx17(
44145
44158
  "svg",
44146
44159
  {
44147
44160
  stroke: "currentColor",
@@ -44151,13 +44164,13 @@ function CloseIcon() {
44151
44164
  height: "20px",
44152
44165
  width: "20px",
44153
44166
  xmlns: "http://www.w3.org/2000/svg",
44154
- children: /* @__PURE__ */ jsx16("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" })
44167
+ children: /* @__PURE__ */ jsx17("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" })
44155
44168
  }
44156
44169
  );
44157
44170
  }
44158
44171
 
44159
44172
  // src/select/index.tsx
44160
- import { jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
44173
+ import { jsx as jsx18, jsxs as jsxs13 } from "react/jsx-runtime";
44161
44174
  function Select(_a) {
44162
44175
  var _b = _a, {
44163
44176
  label,
@@ -44239,10 +44252,10 @@ function Select(_a) {
44239
44252
  }
44240
44253
  }
44241
44254
  }, [isOpen]);
44242
- return /* @__PURE__ */ jsxs12("div", { ref: containerRef, className: "w-full", children: [
44243
- label && /* @__PURE__ */ jsx17("label", { className: "font-bold mb-1 block", children: label }),
44244
- /* @__PURE__ */ jsxs12("div", { className: "relative", children: [
44245
- /* @__PURE__ */ jsx17(
44255
+ return /* @__PURE__ */ jsxs13("div", { ref: containerRef, className: "w-full", children: [
44256
+ label && /* @__PURE__ */ jsx18("label", { className: "font-bold mb-1 block", children: label }),
44257
+ /* @__PURE__ */ jsxs13("div", { className: "relative", children: [
44258
+ /* @__PURE__ */ jsx18(
44246
44259
  "input",
44247
44260
  __spreadProps(__spreadValues({
44248
44261
  autoComplete: "off",
@@ -44280,8 +44293,8 @@ function Select(_a) {
44280
44293
  onKeyDown: handleKeyDown
44281
44294
  })
44282
44295
  ),
44283
- !isOpen && /* @__PURE__ */ jsx17("div", { className: "absolute top-0 right-0 flex flex-col justify-center items-center px-2 py-2 font-bold", children: /* @__PURE__ */ jsx17(SelectIcon, {}) }),
44284
- isOpen && inputValue != "" && /* @__PURE__ */ jsx17(
44296
+ !isOpen && /* @__PURE__ */ jsx18("div", { className: "absolute top-0 right-0 flex flex-col justify-center items-center px-2 py-2 font-bold", children: /* @__PURE__ */ jsx18(SelectIcon, {}) }),
44297
+ isOpen && inputValue != "" && /* @__PURE__ */ jsx18(
44285
44298
  "button",
44286
44299
  {
44287
44300
  onClick: (e) => {
@@ -44294,14 +44307,14 @@ function Select(_a) {
44294
44307
  },
44295
44308
  className: "absolute top-0 right-0 flex flex-col justify-center items-center px-2 py-2 font-bold text-red-500",
44296
44309
  style: { zIndex: 999999999 },
44297
- children: /* @__PURE__ */ jsx17(CloseIcon, {})
44310
+ children: /* @__PURE__ */ jsx18(CloseIcon, {})
44298
44311
  }
44299
44312
  ),
44300
- isOpen && filtered.length > 0 && /* @__PURE__ */ jsx17(
44313
+ isOpen && filtered.length > 0 && /* @__PURE__ */ jsx18(
44301
44314
  "div",
44302
44315
  {
44303
44316
  className: `absolute w-full border rounded shadow bg-white z-10 max-h-60 overflow-y-auto ${openUpwards ? "bottom-full mb-1" : "mt-1"}`,
44304
- children: filtered.map((opt, index) => /* @__PURE__ */ jsx17(
44317
+ children: filtered.map((opt, index) => /* @__PURE__ */ jsx18(
44305
44318
  "div",
44306
44319
  {
44307
44320
  className: `p-2 cursor-pointer ${index === highlightedIndex ? "bg-blue-100" : "hover:bg-gray-100"}`,
@@ -44332,7 +44345,7 @@ function Select(_a) {
44332
44345
  }
44333
44346
  )
44334
44347
  ] }),
44335
- isOpen && /* @__PURE__ */ jsx17(
44348
+ isOpen && /* @__PURE__ */ jsx18(
44336
44349
  "div",
44337
44350
  {
44338
44351
  className: "fixed top-0 left-0 w-full h-screen",
@@ -44346,9 +44359,9 @@ function Select(_a) {
44346
44359
  import React7, { useRef as useRef6 } from "react";
44347
44360
 
44348
44361
  // src/modal/close.tsx
44349
- import { jsx as jsx18 } from "react/jsx-runtime";
44362
+ import { jsx as jsx19 } from "react/jsx-runtime";
44350
44363
  function CloseIcon2() {
44351
- return /* @__PURE__ */ jsx18(
44364
+ return /* @__PURE__ */ jsx19(
44352
44365
  "svg",
44353
44366
  {
44354
44367
  stroke: "currentColor",
@@ -44358,13 +44371,13 @@ function CloseIcon2() {
44358
44371
  height: "20px",
44359
44372
  width: "20px",
44360
44373
  xmlns: "http://www.w3.org/2000/svg",
44361
- children: /* @__PURE__ */ jsx18("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" })
44374
+ children: /* @__PURE__ */ jsx19("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" })
44362
44375
  }
44363
44376
  );
44364
44377
  }
44365
44378
 
44366
44379
  // src/modal/index.tsx
44367
- import { Fragment as Fragment6, jsx as jsx19, jsxs as jsxs13 } from "react/jsx-runtime";
44380
+ import { Fragment as Fragment6, jsx as jsx20, jsxs as jsxs14 } from "react/jsx-runtime";
44368
44381
  function Modal({ button, children, ref, title = "" }) {
44369
44382
  const modalRef = ref || useRef6(null);
44370
44383
  function show() {
@@ -44375,7 +44388,7 @@ function Modal({ button, children, ref, title = "" }) {
44375
44388
  var _a;
44376
44389
  typeof modalRef == "object" && ((_a = modalRef.current) == null ? void 0 : _a.close());
44377
44390
  }
44378
- return /* @__PURE__ */ jsxs13(Fragment6, { children: [
44391
+ return /* @__PURE__ */ jsxs14(Fragment6, { children: [
44379
44392
  React7.Children.map(button, (child) => {
44380
44393
  if (React7.isValidElement(child)) {
44381
44394
  const { type, props } = child;
@@ -44389,17 +44402,17 @@ function Modal({ button, children, ref, title = "" }) {
44389
44402
  }
44390
44403
  return child;
44391
44404
  }),
44392
- /* @__PURE__ */ jsx19("dialog", { ref: modalRef, className: "p-5 border shadow rounded", children: /* @__PURE__ */ jsxs13("div", { className: "relative", children: [
44393
- /* @__PURE__ */ jsx19(
44405
+ /* @__PURE__ */ jsx20("dialog", { ref: modalRef, className: "p-5 border shadow rounded", children: /* @__PURE__ */ jsxs14("div", { className: "relative", children: [
44406
+ /* @__PURE__ */ jsx20(
44394
44407
  "button",
44395
44408
  {
44396
44409
  onClick: hide,
44397
44410
  className: "absolute top-0 right-0 text-red-500 ",
44398
- children: /* @__PURE__ */ jsx19(CloseIcon2, {})
44411
+ children: /* @__PURE__ */ jsx20(CloseIcon2, {})
44399
44412
  }
44400
44413
  ),
44401
- /* @__PURE__ */ jsx19("div", { className: "font-bold text-xl", children: title }),
44402
- /* @__PURE__ */ jsx19("div", { className: "flex flex-col gap-3 pt-6", children: React7.Children.map(children, (child) => {
44414
+ /* @__PURE__ */ jsx20("div", { className: "font-bold text-xl", children: title }),
44415
+ /* @__PURE__ */ jsx20("div", { className: "flex flex-col gap-3 pt-6", children: React7.Children.map(children, (child) => {
44403
44416
  if (React7.isValidElement(child)) {
44404
44417
  const { type, props } = child;
44405
44418
  return React7.createElement(type, __spreadProps(__spreadValues({}, props), { hide }));
@@ -44411,16 +44424,10 @@ function Modal({ button, children, ref, title = "" }) {
44411
44424
  }
44412
44425
 
44413
44426
  // src/pre/index.tsx
44414
- import { jsx as jsx20 } from "react/jsx-runtime";
44427
+ import { jsx as jsx21 } from "react/jsx-runtime";
44415
44428
  var Pre = ({ data }) => {
44416
- let formatted = data;
44417
- try {
44418
- const parsed = JSON.parse(data);
44419
- formatted = JSON.stringify(parsed, null, 2);
44420
- } catch (err) {
44421
- console.error("Invalid JSON string:", err);
44422
- }
44423
- return /* @__PURE__ */ jsx20(
44429
+ const formatted = JSON.stringify(data, null, 2);
44430
+ return /* @__PURE__ */ jsx21(
44424
44431
  "pre",
44425
44432
  {
44426
44433
  style: {
@@ -44555,9 +44562,9 @@ import {
44555
44562
  import DatePicker from "react-datepicker";
44556
44563
 
44557
44564
  // src/calendar/calendar.icon.tsx
44558
- import { jsx as jsx21 } from "react/jsx-runtime";
44565
+ import { jsx as jsx22 } from "react/jsx-runtime";
44559
44566
  function CalendarIcon() {
44560
- return /* @__PURE__ */ jsx21(
44567
+ return /* @__PURE__ */ jsx22(
44561
44568
  "svg",
44562
44569
  {
44563
44570
  stroke: "currentColor",
@@ -44567,13 +44574,13 @@ function CalendarIcon() {
44567
44574
  height: "20px",
44568
44575
  width: "20px",
44569
44576
  xmlns: "http://www.w3.org/2000/svg",
44570
- children: /* @__PURE__ */ jsx21("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" })
44577
+ children: /* @__PURE__ */ jsx22("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" })
44571
44578
  }
44572
44579
  );
44573
44580
  }
44574
44581
 
44575
44582
  // src/calendar/index.tsx
44576
- import { jsx as jsx22, jsxs as jsxs14 } from "react/jsx-runtime";
44583
+ import { jsx as jsx23, jsxs as jsxs15 } from "react/jsx-runtime";
44577
44584
  function MyCalendar(_a) {
44578
44585
  var _b = _a, {
44579
44586
  enabledDates,
@@ -44611,10 +44618,10 @@ function MyCalendar(_a) {
44611
44618
  if (!(enabledDates == null ? void 0 : enabledDates.length)) {
44612
44619
  return null;
44613
44620
  }
44614
- return /* @__PURE__ */ jsxs14("div", { className: "relative", children: [
44615
- /* @__PURE__ */ jsxs14("label", { className: "flex flex-col gap-1", children: [
44616
- /* @__PURE__ */ jsx22("div", { className: "font-bold ", children: label }),
44617
- /* @__PURE__ */ jsx22("div", { children: /* @__PURE__ */ jsxs14(
44621
+ return /* @__PURE__ */ jsxs15("div", { className: "relative", children: [
44622
+ /* @__PURE__ */ jsxs15("label", { className: "flex flex-col gap-1", children: [
44623
+ /* @__PURE__ */ jsx23("div", { className: "font-bold ", children: label }),
44624
+ /* @__PURE__ */ jsx23("div", { children: /* @__PURE__ */ jsxs15(
44618
44625
  "div",
44619
44626
  {
44620
44627
  onClick: () => {
@@ -44623,7 +44630,7 @@ function MyCalendar(_a) {
44623
44630
  },
44624
44631
  className: "cursor-pointer flex items-center justify-center",
44625
44632
  children: [
44626
- /* @__PURE__ */ jsx22(
44633
+ /* @__PURE__ */ jsx23(
44627
44634
  "input",
44628
44635
  __spreadProps(__spreadValues({}, otherProps), {
44629
44636
  className: [
@@ -44636,12 +44643,12 @@ function MyCalendar(_a) {
44636
44643
  readOnly: true
44637
44644
  })
44638
44645
  ),
44639
- /* @__PURE__ */ jsx22("div", { className: "absolute", style: { right: "10px" }, children: /* @__PURE__ */ jsx22(CalendarIcon, {}) })
44646
+ /* @__PURE__ */ jsx23("div", { className: "absolute", style: { right: "10px" }, children: /* @__PURE__ */ jsx23(CalendarIcon, {}) })
44640
44647
  ]
44641
44648
  }
44642
44649
  ) })
44643
44650
  ] }),
44644
- visible && /* @__PURE__ */ jsx22(
44651
+ visible && /* @__PURE__ */ jsx23(
44645
44652
  "dialog",
44646
44653
  {
44647
44654
  ref: modalRef,
@@ -44653,7 +44660,7 @@ function MyCalendar(_a) {
44653
44660
  (_a2 = modalRef.current) == null ? void 0 : _a2.close();
44654
44661
  }
44655
44662
  },
44656
- children: /* @__PURE__ */ jsx22(
44663
+ children: /* @__PURE__ */ jsx23(
44657
44664
  DatePicker,
44658
44665
  {
44659
44666
  inline: true,
@@ -44668,7 +44675,7 @@ function MyCalendar(_a) {
44668
44675
  }
44669
44676
 
44670
44677
  // src/doc-viewer/index.tsx
44671
- import { jsx as jsx23, jsxs as jsxs15 } from "react/jsx-runtime";
44678
+ import { jsx as jsx24, jsxs as jsxs16 } from "react/jsx-runtime";
44672
44679
  function DocumentViewer({ item }) {
44673
44680
  const { url, name, contentType, width = "100%", height = "100%" } = item;
44674
44681
  const isImage = contentType.startsWith("image/");
@@ -44677,10 +44684,10 @@ function DocumentViewer({ item }) {
44677
44684
  const viewerUrl = isGoogleDocCompatible ? `https://docs.google.com/gview?url=${encodeURIComponent(
44678
44685
  url
44679
44686
  )}&embedded=true` : url;
44680
- return /* @__PURE__ */ jsxs15("div", { className: "border shadow rounded p-2 h-[100%]", children: [
44681
- /* @__PURE__ */ jsxs15("div", { className: "mb-1 flex justify-between ", children: [
44682
- /* @__PURE__ */ jsx23("h3", { className: "font-bold", children: name }),
44683
- /* @__PURE__ */ jsx23(
44687
+ return /* @__PURE__ */ jsxs16("div", { className: "border shadow rounded p-2 h-[100%]", children: [
44688
+ /* @__PURE__ */ jsxs16("div", { className: "mb-1 flex justify-between ", children: [
44689
+ /* @__PURE__ */ jsx24("h3", { className: "font-bold", children: name }),
44690
+ /* @__PURE__ */ jsx24(
44684
44691
  "a",
44685
44692
  {
44686
44693
  href: url,
@@ -44692,7 +44699,7 @@ function DocumentViewer({ item }) {
44692
44699
  }
44693
44700
  )
44694
44701
  ] }),
44695
- isImage ? /* @__PURE__ */ jsx23(
44702
+ isImage ? /* @__PURE__ */ jsx24(
44696
44703
  "img",
44697
44704
  {
44698
44705
  src: url,
@@ -44705,7 +44712,7 @@ function DocumentViewer({ item }) {
44705
44712
  display: "block"
44706
44713
  }
44707
44714
  }
44708
- ) : /* @__PURE__ */ jsx23(
44715
+ ) : /* @__PURE__ */ jsx24(
44709
44716
  "iframe",
44710
44717
  {
44711
44718
  title: name,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-recomponents",
3
- "version": "1.7.16",
3
+ "version": "1.7.18",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -158,7 +158,7 @@ export default function Container({
158
158
  <motion.footer
159
159
  className="bg-blue-100 overflow-hidden"
160
160
  initial={isFooterOpen}
161
- animate={{ height: isFooterOpen ? 200 : 40 }}
161
+ animate={{ maxHeight: isFooterOpen ? 200 : 40 }}
162
162
  transition={{ duration: 0.3 }}
163
163
  >
164
164
  <div className="flex justify-center items-center p-2">
package/src/pre/index.tsx CHANGED
@@ -1,18 +1,11 @@
1
1
  import React from "react";
2
2
 
3
3
  type PreProps = {
4
- data: string;
4
+ data: any;
5
5
  };
6
6
 
7
7
  const Pre: React.FC<PreProps> = ({ data }) => {
8
- let formatted = data;
9
-
10
- try {
11
- const parsed = JSON.parse(data);
12
- formatted = JSON.stringify(parsed, null, 2); // Formatea con indentación
13
- } catch (err) {
14
- console.error("Invalid JSON string:", err);
15
- }
8
+ const formatted = JSON.stringify(data, null, 2);
16
9
 
17
10
  return (
18
11
  <pre
@@ -1,5 +1,6 @@
1
1
  import { ReactNode } from "react";
2
2
  import HTable from "./h";
3
+ import VTable from "./v";
3
4
  type DataType = string | number | Date | object | undefined | null;
4
5
  type Item = { content: DataType; handler: ReactNode };
5
6
  export type DataTypeOrItem = DataType | Item;
@@ -46,9 +47,7 @@ export default function Table({ ...props }: TableProps) {
46
47
  {Array.isArray(props.data) ? (
47
48
  <HTable {...props} />
48
49
  ) : (
49
- <div className=" p-5 border rounded shadow bg-yellw-500">
50
- No es un array
51
- </div>
50
+ <VTable {...props} />
52
51
  )}
53
52
  </div>
54
53
  );
@@ -0,0 +1,32 @@
1
+ import { DataTypeOrItem, TableProps } from ".";
2
+
3
+ export default function VTable({ data }: TableProps) {
4
+ return (
5
+ <table className="min-w-full border border-gray-300 bg-white text-sm">
6
+ <tbody>
7
+ {Object.entries(data).map(([key, value], idx) => {
8
+ const content =
9
+ typeof value === "object" && value !== null && "content" in value
10
+ ? value.content
11
+ : value;
12
+
13
+ const handler =
14
+ typeof value === "object" && value !== null && "handler" in value
15
+ ? value.handler
16
+ : null;
17
+
18
+ return (
19
+ <tr key={idx} className="border-t">
20
+ <td className="p-2 font-medium text-gray-700 bg-gray-100 w-1/3">
21
+ {key}
22
+ </td>
23
+ <td className="p-2 text-gray-900">
24
+ {handler ? handler : String(content)}
25
+ </td>
26
+ </tr>
27
+ );
28
+ })}
29
+ </tbody>
30
+ </table>
31
+ );
32
+ }