@aveonline/ui-react 2.5.0 → 2.5.1

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.
@@ -1,6 +1,5 @@
1
1
  export { default as InputSearch } from './InputSearch';
2
- export { default as Pagination } from './Pagination';
3
2
  export { default as SortTable } from './SortTable';
4
3
  export * from './ISortTable';
5
- export * from './IPagination';
6
4
  export * from './Table';
5
+ export * from './pagination';
@@ -2,7 +2,8 @@ import { MouseEventHandler } from 'react';
2
2
  import { Table } from '@tanstack/react-table';
3
3
  interface IOptionPagination {
4
4
  optionsPages: number[];
5
- currentPage: (value: number) => void;
5
+ currentPage: number;
6
+ changeCurrentPage: (value: number) => void;
6
7
  totalPages: number;
7
8
  pageSize?: (value: number) => void;
8
9
  hasCanPreviousPage: boolean;
@@ -0,0 +1,2 @@
1
+ export * from './IPagination';
2
+ export { default as Pagination } from './Pagination';
@@ -0,0 +1,9 @@
1
+ import { IOptionPagination } from './IPagination';
2
+ export declare function usePagination(optionPagination: IOptionPagination): {
3
+ isMobile: boolean;
4
+ currentPage: number;
5
+ positionPages: number[];
6
+ onChangePage: (item: number) => void;
7
+ onPreviousPage: () => void;
8
+ onNextPage: () => void;
9
+ };
package/dist/ui-react.mjs CHANGED
@@ -1037,7 +1037,7 @@ const Oa = Xe((e, t) => {
1037
1037
  const { attributes: n, getClass: r } = Dm(e), { children: i, as: a = "p" } = e;
1038
1038
  return /* @__PURE__ */ b.jsx(a, { className: r, ...n, ref: t, children: i });
1039
1039
  });
1040
- function wae({
1040
+ function Sae({
1041
1041
  kind: e = "default",
1042
1042
  variant: t,
1043
1043
  className: n,
@@ -2618,7 +2618,7 @@ let Mx = "div", l7 = qr.RenderStrategy, u7 = Lt(function(e, t) {
2618
2618
  let n = $t(Q1) !== null, r = Kl() !== null;
2619
2619
  return z.createElement(z.Fragment, null, !n && r ? z.createElement(w2, { ref: t, ...e }) : z.createElement(u7, { ref: t, ...e }));
2620
2620
  }), nu = Object.assign(w2, { Child: kx, Root: w2 });
2621
- function Sae({
2621
+ function Oae({
2622
2622
  onChange: e,
2623
2623
  isSelected: t = !1,
2624
2624
  isDisabled: n,
@@ -5724,7 +5724,7 @@ const vw = Xe((e, t) => {
5724
5724
  ] })
5725
5725
  ] }) });
5726
5726
  });
5727
- function Oae({
5727
+ function Bae({
5728
5728
  track: e,
5729
5729
  isDisabled: t = !1,
5730
5730
  isSelected: n = !1,
@@ -10251,7 +10251,7 @@ const uu = (e) => /* @__PURE__ */ b.jsx(ni.DropdownIndicator, { ...e, children:
10251
10251
  ) })
10252
10252
  ] });
10253
10253
  };
10254
- function Bae({
10254
+ function Rae({
10255
10255
  options: e,
10256
10256
  placeholder: t = "",
10257
10257
  defaultValue: n,
@@ -10375,7 +10375,7 @@ var JB = /* @__PURE__ */ Xe(function(e, t) {
10375
10375
  }, r));
10376
10376
  });
10377
10377
  const qB = JB;
10378
- function Rae({
10378
+ function Pae({
10379
10379
  placeholder: e = "",
10380
10380
  id: t = "default-async",
10381
10381
  name: n = "default-async",
@@ -10488,7 +10488,7 @@ const KB = ({
10488
10488
  }
10489
10489
  ) });
10490
10490
  };
10491
- function Pae({
10491
+ function Mae({
10492
10492
  options: e,
10493
10493
  placeholder: t = "",
10494
10494
  defaultValue: n,
@@ -10646,7 +10646,7 @@ const T6 = ({ isDisabled: e }) => /* @__PURE__ */ b.jsx(
10646
10646
  }
10647
10647
  )
10648
10648
  ] }) });
10649
- function Mae({
10649
+ function kae({
10650
10650
  id: e = "default-country",
10651
10651
  name: t = "default-country",
10652
10652
  placeholder: n = "",
@@ -10775,7 +10775,7 @@ var lR = /* @__PURE__ */ Xe(function(e, t) {
10775
10775
  }, i));
10776
10776
  });
10777
10777
  const uR = lR;
10778
- function kae({
10778
+ function Tae({
10779
10779
  placeholder: e = "",
10780
10780
  id: t = "default-async-creatable",
10781
10781
  name: n = "default-async-creatable",
@@ -10872,7 +10872,7 @@ function kae({
10872
10872
  }
10873
10873
  );
10874
10874
  }
10875
- function Tae({
10875
+ function Nae({
10876
10876
  tabs: e,
10877
10877
  variant: t = "default",
10878
10878
  defaultIndex: n,
@@ -11003,7 +11003,7 @@ function Bp({
11003
11003
  )
11004
11004
  ] });
11005
11005
  }
11006
- function Nae({
11006
+ function jae({
11007
11007
  title: e,
11008
11008
  iconTitle: t,
11009
11009
  subtitle: n,
@@ -11296,7 +11296,7 @@ function dR(e, { locales: t = "es-CO", currency: n = "COP", fractionDigits: r =
11296
11296
  minimumFractionDigits: r
11297
11297
  }).format(e ?? 0);
11298
11298
  }
11299
- function jae({
11299
+ function Dae({
11300
11300
  icon: e,
11301
11301
  isSelected: t = !1,
11302
11302
  title: n,
@@ -11382,7 +11382,7 @@ function jae({
11382
11382
  }
11383
11383
  );
11384
11384
  }
11385
- function Dae({
11385
+ function Fae({
11386
11386
  hasLogo: e = !1,
11387
11387
  className: t = "",
11388
11388
  menuMovil: n,
@@ -11433,7 +11433,7 @@ function Dae({
11433
11433
  }
11434
11434
  );
11435
11435
  }
11436
- function Fae({
11436
+ function Lae({
11437
11437
  children: e,
11438
11438
  onClose: t,
11439
11439
  isOpen: n
@@ -13233,7 +13233,7 @@ cl.Delete = function(t) {
13233
13233
  const { children: n, inputValue: r } = t;
13234
13234
  return (typeof r == "number" ? r > 0 : r) ? /* @__PURE__ */ b.jsx("span", { children: n }) : /* @__PURE__ */ b.jsx(b.Fragment, {});
13235
13235
  };
13236
- const Lae = Xe((e, t) => {
13236
+ const Vae = Xe((e, t) => {
13237
13237
  const {
13238
13238
  id: n,
13239
13239
  name: r,
@@ -13414,7 +13414,7 @@ const Lae = Xe((e, t) => {
13414
13414
  )
13415
13415
  ] });
13416
13416
  });
13417
- function Vae({
13417
+ function Qae({
13418
13418
  kind: e = "default",
13419
13419
  icon: t,
13420
13420
  description: n,
@@ -15448,7 +15448,7 @@ function zR({
15448
15448
  }
15449
15449
  );
15450
15450
  }
15451
- function Qae({
15451
+ function Hae({
15452
15452
  type: e,
15453
15453
  valueInput: t,
15454
15454
  textInsideInput: n,
@@ -15572,7 +15572,7 @@ function Qae({
15572
15572
  )
15573
15573
  ] });
15574
15574
  }
15575
- function Hae({
15575
+ function Gae({
15576
15576
  children: e,
15577
15577
  isSmall: t = !1,
15578
15578
  onClick: n,
@@ -15628,7 +15628,7 @@ function WR({ helpText: e, error: t, showErrorText: n }) {
15628
15628
  (t || n) && !e && /* @__PURE__ */ b.jsx(Bp, { icon: "error", children: t })
15629
15629
  ] }) : /* @__PURE__ */ b.jsx(b.Fragment, {});
15630
15630
  }
15631
- const Gae = Xe(
15631
+ const Zae = Xe(
15632
15632
  (e, t) => {
15633
15633
  const {
15634
15634
  error: n,
@@ -33227,7 +33227,7 @@ var Qy = function(t, n, r, i) {
33227
33227
  }],
33228
33228
  formatAxisMap: Ry
33229
33229
  });
33230
- function Zae({
33230
+ function zae({
33231
33231
  variant: e,
33232
33232
  width: t = 600,
33233
33233
  height: n = 600,
@@ -33302,7 +33302,7 @@ const $d = {
33302
33302
  violet: "#9D2FAE",
33303
33303
  pink: "#F56270"
33304
33304
  }, qu = (e) => Object.keys($d).includes(e) ? $d[e] : $d.cyan;
33305
- function zae({
33305
+ function Wae({
33306
33306
  className: e,
33307
33307
  data: t,
33308
33308
  cells: n,
@@ -33352,7 +33352,7 @@ function zae({
33352
33352
  ))
33353
33353
  ] }) });
33354
33354
  }
33355
- function Wae({
33355
+ function Xae({
33356
33356
  title: e,
33357
33357
  subtitle: t,
33358
33358
  defaultOpen: n = !1,
@@ -33414,7 +33414,7 @@ function Wae({
33414
33414
  )
33415
33415
  ] }) });
33416
33416
  }
33417
- function Xae({
33417
+ function Yae({
33418
33418
  name: e,
33419
33419
  email: t,
33420
33420
  items: n,
@@ -33479,7 +33479,7 @@ function Xae({
33479
33479
  )
33480
33480
  ] }) });
33481
33481
  }
33482
- function Yae({
33482
+ function _ae({
33483
33483
  icon: e,
33484
33484
  options: t,
33485
33485
  onSelected: n,
@@ -34218,7 +34218,7 @@ const Xy = "Popper", [Yy, _y] = Zy(Xy), [Wte, $y] = Yy(Xy), Xte = (e) => {
34218
34218
  }), r ? null : /* @__PURE__ */ Ge(Rs.div, ye({}, i, {
34219
34219
  ref: s
34220
34220
  }));
34221
- }), Uy = "PopperContent", [$te, _ae] = Yy(Uy), Ute = /* @__PURE__ */ Xe((e, t) => {
34221
+ }), Uy = "PopperContent", [$te, $ae] = Yy(Uy), Ute = /* @__PURE__ */ Xe((e, t) => {
34222
34222
  var n, r, i, a, o, s, l, u;
34223
34223
  const { __scopePopper: c, side: f = "bottom", sideOffset: g = 0, align: p = "center", alignOffset: v = 0, arrowPadding: d = 0, collisionBoundary: h = [], collisionPadding: A = 0, sticky: C = "partial", hideWhenDetached: m = !1, avoidCollisions: y = !0, onPlaced: E, ...x } = e, I = $y(Uy, c), [w, B] = he(null), N = $a(
34224
34224
  t,
@@ -34911,7 +34911,7 @@ var lb = S.forwardRef(function(e, t) {
34911
34911
  return S.createElement(Bf, Gn({}, e, { ref: t, sideCar: jne }));
34912
34912
  });
34913
34913
  lb.classNames = Bf.classNames;
34914
- const Dne = lb, ub = "Popover", [cb, $ae] = Zy(ub, [
34914
+ const Dne = lb, ub = "Popover", [cb, Uae] = Zy(ub, [
34915
34915
  _y
34916
34916
  ]), Qh = _y(), [Fne, Ps] = cb(ub), Lne = (e) => {
34917
34917
  const { __scopePopover: t, children: n, open: r, defaultOpen: i, onOpenChange: a, modal: o = !1 } = e, s = Qh(t), l = de(null), [u, c] = he(!1), [f = !1, g] = ane({
@@ -35906,7 +35906,7 @@ var Eb = S.forwardRef(function(e, t) {
35906
35906
  return S.createElement(Mf, Gn({}, e, { ref: t, sideCar: Lre }));
35907
35907
  });
35908
35908
  Eb.classNames = Mf.classNames;
35909
- const Vre = Eb, xb = "Dialog", [Ib, Uae] = Kne(xb), [Qre, Ua] = Ib(xb), Hre = (e) => {
35909
+ const Vre = Eb, xb = "Dialog", [Ib, Jae] = Kne(xb), [Qre, Ua] = Ib(xb), Hre = (e) => {
35910
35910
  const { __scopeDialog: t, children: n, open: r, defaultOpen: i, onOpenChange: a, modal: o = !0 } = e, s = de(null), l = de(null), [u = !1, c] = rre({
35911
35911
  prop: r,
35912
35912
  defaultProp: i,
@@ -36422,7 +36422,7 @@ const Bg = S.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ b.jsx(
36422
36422
  }
36423
36423
  ));
36424
36424
  Bg.displayName = dr.Item.displayName;
36425
- function Jae({
36425
+ function qae({
36426
36426
  title: e = "",
36427
36427
  titleNotFound: t = "No hay coincidencias",
36428
36428
  placeholderSearch: n = "Buscar",
@@ -39345,6 +39345,126 @@ function vae({
39345
39345
  )
39346
39346
  ] });
39347
39347
  }
39348
+ function mae({
39349
+ table: e,
39350
+ sortItem: t,
39351
+ checkBoxSelect: n,
39352
+ titleSortTable: r
39353
+ }) {
39354
+ return /* @__PURE__ */ b.jsx(
39355
+ hn,
39356
+ {
39357
+ as: "div",
39358
+ className: K(
39359
+ n,
39360
+ "relative inline-block text-left h-14 bg-action-secondary-default"
39361
+ ),
39362
+ children: /* @__PURE__ */ b.jsxs(b.Fragment, { children: [
39363
+ /* @__PURE__ */ b.jsx(
39364
+ hn.Button,
39365
+ {
39366
+ className: K(
39367
+ n,
39368
+ "flex flex-row items-center text-center justify-center justify-items-center h-14 px-[18px] pr-8"
39369
+ ),
39370
+ children: /* @__PURE__ */ b.jsxs("div", { className: "flex items-center justify-center gap-x-2", children: [
39371
+ /* @__PURE__ */ b.jsx(vt, { kind: "major-minor", color: "default" }),
39372
+ /* @__PURE__ */ b.jsx(Re, { variant: "button", className: "whitespace-nowrap", children: r })
39373
+ ] })
39374
+ }
39375
+ ),
39376
+ /* @__PURE__ */ b.jsx(
39377
+ nu,
39378
+ {
39379
+ as: _t,
39380
+ enter: "transition ease-out duration-100",
39381
+ enterFrom: "transform opacity-0 scale-95",
39382
+ enterTo: "transform opacity-100 scale-100",
39383
+ leave: "transition ease-in duration-90",
39384
+ leaveFrom: "transform opacity-100 scale-100",
39385
+ leaveTo: "transform opacity-0 scale-95",
39386
+ children: /* @__PURE__ */ b.jsx(hn.Items, { className: "absolute z-10 right-0 mt-2 w-[240px] h-auto origin-top-right divide-y divide-border-subdued rounded-sm bg-action-secondary-default shadow-[0px_2px_10px_0px_#0000001A]", children: /* @__PURE__ */ b.jsx("div", { children: e.getHeaderGroups().map(
39387
+ (i) => i.headers.map(
39388
+ (a) => t.map(
39389
+ (o, s) => o.idHeader === a.id && /* @__PURE__ */ b.jsx(hn.Item, { children: /* @__PURE__ */ b.jsx(
39390
+ Oa,
39391
+ {
39392
+ className: "cursor-pointer h-[36px] pl-4 px-2 flex items-center hover:bg-action-secondary-hovered hover:last:rounded-b-sm hover:first:rounded-t-sm active:bg-action-secondary-pressed",
39393
+ variant: "body",
39394
+ onClick: () => a.column.toggleSorting(
39395
+ o.asc ? !1 : o.desc ?? !1
39396
+ ),
39397
+ children: o.title
39398
+ }
39399
+ ) }, `${a.id}-${s}`)
39400
+ )
39401
+ )
39402
+ ) }) })
39403
+ }
39404
+ )
39405
+ ] })
39406
+ }
39407
+ );
39408
+ }
39409
+ const oC = Xe(
39410
+ ({ className: e, ...t }, n) => /* @__PURE__ */ b.jsx(
39411
+ "table",
39412
+ {
39413
+ ref: n,
39414
+ className: K("w-full table-auto", e),
39415
+ ...t
39416
+ }
39417
+ )
39418
+ );
39419
+ oC.displayName = "TableContainer";
39420
+ const sC = Xe(({ className: e, ...t }, n) => /* @__PURE__ */ b.jsx(
39421
+ "thead",
39422
+ {
39423
+ ref: n,
39424
+ className: K("bg-surface-neutral-default", e),
39425
+ ...t
39426
+ }
39427
+ ));
39428
+ sC.displayName = "TableHeader";
39429
+ const lC = Xe(({ className: e, ...t }, n) => /* @__PURE__ */ b.jsx(
39430
+ "tbody",
39431
+ {
39432
+ ref: n,
39433
+ className: K(
39434
+ "table--tbody text-center bg-surface-neutral-subdued",
39435
+ e
39436
+ ),
39437
+ ...t
39438
+ }
39439
+ ));
39440
+ lC.displayName = "TableBody";
39441
+ const uC = Xe(({ ...e }, t) => /* @__PURE__ */ b.jsx("tfoot", { ref: t, ...e }));
39442
+ uC.displayName = "TableFooter";
39443
+ const vo = Xe(({ className: e, ...t }, n) => /* @__PURE__ */ b.jsx("tr", { ref: n, className: K(e), ...t }));
39444
+ vo.displayName = "TableRow";
39445
+ const Tg = Xe(({ ...e }, t) => /* @__PURE__ */ b.jsx("th", { ref: t, ...e }));
39446
+ Tg.displayName = "TableHead";
39447
+ const Ng = Xe(({ ...e }, t) => /* @__PURE__ */ b.jsx("td", { ref: t, ...e }));
39448
+ Ng.displayName = "TableCell";
39449
+ function Aae(e) {
39450
+ const t = Fa("(min-width: 768px)"), [n, r] = he(
39451
+ e.currentPage - 1
39452
+ ), i = e == null ? void 0 : e.optionsPages.map((l) => l - 1);
39453
+ return {
39454
+ isMobile: t,
39455
+ currentPage: n,
39456
+ positionPages: i,
39457
+ onChangePage: (l) => {
39458
+ e == null || e.changeCurrentPage(l + 1), r(l);
39459
+ },
39460
+ onPreviousPage: () => {
39461
+ n !== 0 && (r(n - 1), e == null || e.changeCurrentPage(n));
39462
+ },
39463
+ onNextPage: () => {
39464
+ r(n + 1), e == null || e.changeCurrentPage(n + 2);
39465
+ }
39466
+ };
39467
+ }
39348
39468
  function h2({
39349
39469
  pageIndex: e,
39350
39470
  currentPage: t,
@@ -39398,18 +39518,19 @@ function h2({
39398
39518
  }
39399
39519
  );
39400
39520
  }
39401
- function mae({
39521
+ function yae({
39402
39522
  table: e,
39403
39523
  options: t,
39404
39524
  optionPagination: n
39405
39525
  }) {
39406
- const r = Fa("(min-width: 768px)"), [i, a] = he(0), o = n == null ? void 0 : n.optionsPages.map((c) => c - 1), s = (c) => {
39407
- n == null || n.currentPage(c + 1), a(c);
39408
- }, l = () => {
39409
- i !== 0 && (a(i - 1), n == null || n.currentPage(i));
39410
- }, u = () => {
39411
- a(i + 1), n == null || n.currentPage(i + 2);
39412
- };
39526
+ const {
39527
+ isMobile: r,
39528
+ currentPage: i,
39529
+ positionPages: a,
39530
+ onChangePage: o,
39531
+ onPreviousPage: s,
39532
+ onNextPage: l
39533
+ } = Aae(n);
39413
39534
  return /* @__PURE__ */ b.jsxs("div", { className: "items-center grid grid-cols-3 mt-4 mb-3", children: [
39414
39535
  /* @__PURE__ */ b.jsx("div", { className: K(r ? "col-start-2" : "col-end-1"), children: /* @__PURE__ */ b.jsxs("div", { className: "flex items-center justify-center gap-2", children: [
39415
39536
  /* @__PURE__ */ b.jsx("span", { className: "flex items-center gap-1 min-w-max", children: /* @__PURE__ */ b.jsxs(Re, { variant: "caption", children: [
@@ -39424,8 +39545,8 @@ function mae({
39424
39545
  {
39425
39546
  className: "focus:ring-none text-letter-default text-xxs p-0 flex justify-center items-center appearance-none bg-none border-transparent ring-transparent focus:shadow-none focus:outline-none focus:border-none",
39426
39547
  value: `${e.getState().pagination.pageSize}`,
39427
- onChange: (c) => (n.pageSize && (n == null || n.pageSize(Number(c.target.value))), e.setPageSize(Number(c.target.value))),
39428
- children: t == null ? void 0 : t.map((c) => /* @__PURE__ */ b.jsx("option", { value: c, children: c }, c))
39548
+ onChange: (u) => (n.pageSize && (n == null || n.pageSize(Number(u.target.value))), e.setPageSize(Number(u.target.value))),
39549
+ children: t == null ? void 0 : t.map((u) => /* @__PURE__ */ b.jsx("option", { value: u, children: u }, u))
39429
39550
  }
39430
39551
  )
39431
39552
  ] }) }),
@@ -39434,7 +39555,7 @@ function mae({
39434
39555
  "button",
39435
39556
  {
39436
39557
  className: "flex justify-center items-center",
39437
- onClick: l,
39558
+ onClick: s,
39438
39559
  disabled: !n.hasCanPreviousPage,
39439
39560
  children: /* @__PURE__ */ b.jsx(
39440
39561
  vt,
@@ -39452,35 +39573,35 @@ function mae({
39452
39573
  "flex flex-row justify-center items-center",
39453
39574
  (n == null ? void 0 : n.totalPages) < 99 ? "gap-2" : (n == null ? void 0 : n.totalPages) > 999 ? "gap-1 mr-1" : "gap-2 mr-2"
39454
39575
  ),
39455
- children: o.map(
39456
- (c) => c === 0 ? /* @__PURE__ */ b.jsx(
39576
+ children: a.map(
39577
+ (u) => u === 0 ? /* @__PURE__ */ b.jsx(
39457
39578
  h2,
39458
39579
  {
39459
39580
  position: "first",
39460
- pageIndex: c,
39581
+ pageIndex: u,
39461
39582
  currentPage: i,
39462
- onClick: () => s(c)
39583
+ onClick: () => o(u)
39463
39584
  },
39464
- c
39465
- ) : c !== 0 && c <= i + 1 && c >= i - 1 && c !== (n == null ? void 0 : n.totalPages) - 1 ? /* @__PURE__ */ b.jsx(
39585
+ u
39586
+ ) : u !== 0 && u <= i + 1 && u >= i - 1 && u !== (n == null ? void 0 : n.totalPages) - 1 ? /* @__PURE__ */ b.jsx(
39466
39587
  h2,
39467
39588
  {
39468
39589
  position: "middle",
39469
- pageIndex: c,
39590
+ pageIndex: u,
39470
39591
  currentPage: i,
39471
- onClick: () => s(c)
39592
+ onClick: () => o(u)
39472
39593
  },
39473
- c
39474
- ) : c === (n == null ? void 0 : n.totalPages) - 1 && /* @__PURE__ */ b.jsx(
39594
+ u
39595
+ ) : u === (n == null ? void 0 : n.totalPages) - 1 && /* @__PURE__ */ b.jsx(
39475
39596
  h2,
39476
39597
  {
39477
39598
  position: "last",
39478
- pageIndex: c,
39599
+ pageIndex: u,
39479
39600
  currentPage: i,
39480
- onClick: () => s(c),
39601
+ onClick: () => o(u),
39481
39602
  lastCount: (n == null ? void 0 : n.totalPages) - 1
39482
39603
  },
39483
- c
39604
+ u
39484
39605
  )
39485
39606
  )
39486
39607
  }
@@ -39489,7 +39610,7 @@ function mae({
39489
39610
  "button",
39490
39611
  {
39491
39612
  className: "flex justify-center items-center",
39492
- onClick: u,
39613
+ onClick: l,
39493
39614
  disabled: !n.hasCanNextPage,
39494
39615
  children: /* @__PURE__ */ b.jsx(
39495
39616
  vt,
@@ -39503,108 +39624,7 @@ function mae({
39503
39624
  ] }) })
39504
39625
  ] });
39505
39626
  }
39506
- function Aae({
39507
- table: e,
39508
- sortItem: t,
39509
- checkBoxSelect: n,
39510
- titleSortTable: r
39511
- }) {
39512
- return /* @__PURE__ */ b.jsx(
39513
- hn,
39514
- {
39515
- as: "div",
39516
- className: K(
39517
- n,
39518
- "relative inline-block text-left h-14 bg-action-secondary-default"
39519
- ),
39520
- children: /* @__PURE__ */ b.jsxs(b.Fragment, { children: [
39521
- /* @__PURE__ */ b.jsx(
39522
- hn.Button,
39523
- {
39524
- className: K(
39525
- n,
39526
- "flex flex-row items-center text-center justify-center justify-items-center h-14 px-[18px] pr-8"
39527
- ),
39528
- children: /* @__PURE__ */ b.jsxs("div", { className: "flex items-center justify-center gap-x-2", children: [
39529
- /* @__PURE__ */ b.jsx(vt, { kind: "major-minor", color: "default" }),
39530
- /* @__PURE__ */ b.jsx(Re, { variant: "button", className: "whitespace-nowrap", children: r })
39531
- ] })
39532
- }
39533
- ),
39534
- /* @__PURE__ */ b.jsx(
39535
- nu,
39536
- {
39537
- as: _t,
39538
- enter: "transition ease-out duration-100",
39539
- enterFrom: "transform opacity-0 scale-95",
39540
- enterTo: "transform opacity-100 scale-100",
39541
- leave: "transition ease-in duration-90",
39542
- leaveFrom: "transform opacity-100 scale-100",
39543
- leaveTo: "transform opacity-0 scale-95",
39544
- children: /* @__PURE__ */ b.jsx(hn.Items, { className: "absolute z-10 right-0 mt-2 w-[240px] h-auto origin-top-right divide-y divide-border-subdued rounded-sm bg-action-secondary-default shadow-[0px_2px_10px_0px_#0000001A]", children: /* @__PURE__ */ b.jsx("div", { children: e.getHeaderGroups().map(
39545
- (i) => i.headers.map(
39546
- (a) => t.map(
39547
- (o, s) => o.idHeader === a.id && /* @__PURE__ */ b.jsx(hn.Item, { children: /* @__PURE__ */ b.jsx(
39548
- Oa,
39549
- {
39550
- className: "cursor-pointer h-[36px] pl-4 px-2 flex items-center hover:bg-action-secondary-hovered hover:last:rounded-b-sm hover:first:rounded-t-sm active:bg-action-secondary-pressed",
39551
- variant: "body",
39552
- onClick: () => a.column.toggleSorting(
39553
- o.asc ? !1 : o.desc ?? !1
39554
- ),
39555
- children: o.title
39556
- }
39557
- ) }, `${a.id}-${s}`)
39558
- )
39559
- )
39560
- ) }) })
39561
- }
39562
- )
39563
- ] })
39564
- }
39565
- );
39566
- }
39567
- const oC = Xe(
39568
- ({ className: e, ...t }, n) => /* @__PURE__ */ b.jsx(
39569
- "table",
39570
- {
39571
- ref: n,
39572
- className: K("w-full table-auto", e),
39573
- ...t
39574
- }
39575
- )
39576
- );
39577
- oC.displayName = "TableContainer";
39578
- const sC = Xe(({ className: e, ...t }, n) => /* @__PURE__ */ b.jsx(
39579
- "thead",
39580
- {
39581
- ref: n,
39582
- className: K("bg-surface-neutral-default", e),
39583
- ...t
39584
- }
39585
- ));
39586
- sC.displayName = "TableHeader";
39587
- const lC = Xe(({ className: e, ...t }, n) => /* @__PURE__ */ b.jsx(
39588
- "tbody",
39589
- {
39590
- ref: n,
39591
- className: K(
39592
- "table--tbody text-center bg-surface-neutral-subdued",
39593
- e
39594
- ),
39595
- ...t
39596
- }
39597
- ));
39598
- lC.displayName = "TableBody";
39599
- const uC = Xe(({ ...e }, t) => /* @__PURE__ */ b.jsx("tfoot", { ref: t, ...e }));
39600
- uC.displayName = "TableFooter";
39601
- const vo = Xe(({ className: e, ...t }, n) => /* @__PURE__ */ b.jsx("tr", { ref: n, className: K(e), ...t }));
39602
- vo.displayName = "TableRow";
39603
- const Tg = Xe(({ ...e }, t) => /* @__PURE__ */ b.jsx("th", { ref: t, ...e }));
39604
- Tg.displayName = "TableHead";
39605
- const Ng = Xe(({ ...e }, t) => /* @__PURE__ */ b.jsx("td", { ref: t, ...e }));
39606
- Ng.displayName = "TableCell";
39607
- function qae({
39627
+ function Kae({
39608
39628
  columns: e = [],
39609
39629
  data: t = [],
39610
39630
  searchFilter: n = !1,
@@ -39722,7 +39742,7 @@ function qae({
39722
39742
  }
39723
39743
  ) : null,
39724
39744
  o && n && s && s.length > 0 ? /* @__PURE__ */ b.jsx(
39725
- Aae,
39745
+ mae,
39726
39746
  {
39727
39747
  checkBoxSelect: Object.keys(M).length > 0 ? "" : "rounded-tr-sm",
39728
39748
  sortItem: s,
@@ -39799,7 +39819,7 @@ function qae({
39799
39819
  ) }, P.id)) }, D.id)) })
39800
39820
  ] }) }),
39801
39821
  i && !A && /* @__PURE__ */ b.jsx(
39802
- mae,
39822
+ yae,
39803
39823
  {
39804
39824
  optionPagination: y,
39805
39825
  table: L,
@@ -39811,7 +39831,7 @@ function qae({
39811
39831
  )
39812
39832
  ] });
39813
39833
  }
39814
- function yae({
39834
+ function bae({
39815
39835
  value: e,
39816
39836
  onChange: t,
39817
39837
  debounce: n = 500,
@@ -39893,7 +39913,7 @@ function v2({
39893
39913
  }
39894
39914
  );
39895
39915
  }
39896
- function bae({
39916
+ function Cae({
39897
39917
  table: e,
39898
39918
  options: t
39899
39919
  }) {
@@ -39997,7 +40017,7 @@ function bae({
39997
40017
  ] }) })
39998
40018
  ] });
39999
40019
  }
40000
- function Cae({
40020
+ function Eae({
40001
40021
  table: e,
40002
40022
  sortItem: t,
40003
40023
  checkBoxSelect: n,
@@ -40098,7 +40118,7 @@ const jg = Xe(({ ...e }, t) => /* @__PURE__ */ b.jsx("th", { ref: t, ...e }));
40098
40118
  jg.displayName = "TableHead";
40099
40119
  const Dg = Xe(({ ...e }, t) => /* @__PURE__ */ b.jsx("td", { ref: t, ...e }));
40100
40120
  Dg.displayName = "TableCell";
40101
- function Eae({
40121
+ function xae({
40102
40122
  indeterminate: e,
40103
40123
  ...t
40104
40124
  }) {
@@ -40115,7 +40135,7 @@ function Eae({
40115
40135
  }
40116
40136
  );
40117
40137
  }
40118
- function Kae({
40138
+ function eoe({
40119
40139
  columns: e = [],
40120
40140
  data: t = [],
40121
40141
  searchFilter: n = !1,
@@ -40221,7 +40241,7 @@ function Kae({
40221
40241
  o ? "rounded-tl-sm" : "rounded-t-sm"
40222
40242
  ),
40223
40243
  children: /* @__PURE__ */ b.jsx(
40224
- yae,
40244
+ bae,
40225
40245
  {
40226
40246
  value: (x == null ? void 0 : x.trim()) ?? "",
40227
40247
  onChange: (P) => I(P == null ? void 0 : P.trim()),
@@ -40231,7 +40251,7 @@ function Kae({
40231
40251
  }
40232
40252
  ) : null,
40233
40253
  o && n && s && s.length > 0 ? /* @__PURE__ */ b.jsx(
40234
- Cae,
40254
+ Eae,
40235
40255
  {
40236
40256
  checkBoxSelect: Object.keys(M).length > 0 ? "" : "rounded-tr-sm",
40237
40257
  sortItem: s,
@@ -40262,7 +40282,7 @@ function Kae({
40262
40282
  "p-4 h-14"
40263
40283
  ),
40264
40284
  children: F.id === "select" ? /* @__PURE__ */ b.jsx(
40265
- Eae,
40285
+ xae,
40266
40286
  {
40267
40287
  checked: G.getIsAllPageRowsSelected(),
40268
40288
  indeterminate: G.getIsSomePageRowsSelected(),
@@ -40326,13 +40346,13 @@ function Kae({
40326
40346
  F.getContext()
40327
40347
  ) }, F.id)) }, P.id)) })
40328
40348
  ] }) }),
40329
- i && !m && /* @__PURE__ */ b.jsx(bae, { table: G, options: a })
40349
+ i && !m && /* @__PURE__ */ b.jsx(Cae, { table: G, options: a })
40330
40350
  ]
40331
40351
  }
40332
40352
  )
40333
40353
  ] });
40334
40354
  }
40335
- function eoe({ items: e = [], checkedItem: t, onChange: n }) {
40355
+ function toe({ items: e = [], checkedItem: t, onChange: n }) {
40336
40356
  const r = Fa("(max-width: 520px)"), i = (s, l) => l != null && l.error ? "border-action-critical-default" : l != null && l.isDisabled || l != null && l.isLoading ? "border-border-disabled" : s ? "shadow-[0px_0px_0px_1px_#3EADFE]" : "border-border-default hover:border-border-hovered", a = (s, l) => {
40337
40357
  var u, c;
40338
40358
  return ((u = s == null ? void 0 : s.id) == null ? void 0 : u.toLowerCase()) === ((c = l == null ? void 0 : l.id) == null ? void 0 : c.toLowerCase());
@@ -40456,7 +40476,7 @@ function eoe({ items: e = [], checkedItem: t, onChange: n }) {
40456
40476
  }
40457
40477
  ) : /* @__PURE__ */ b.jsx(b.Fragment, {});
40458
40478
  }
40459
- function toe({
40479
+ function noe({
40460
40480
  description: e = "",
40461
40481
  date: t = "",
40462
40482
  hour: n = "",
@@ -40588,50 +40608,50 @@ const Ii = Xe((e, t) => {
40588
40608
  );
40589
40609
  });
40590
40610
  export {
40591
- kae as AsyncCreatableSelect,
40592
- Rae as AsyncSelect,
40593
- qae as AsyncTable,
40611
+ Tae as AsyncCreatableSelect,
40612
+ Pae as AsyncSelect,
40613
+ Kae as AsyncTable,
40594
40614
  Jh as Avatar,
40595
40615
  Fm as Badge,
40596
- zae as Bar,
40616
+ Wae as Bar,
40597
40617
  Ii as Button,
40598
- toe as CardHistory,
40599
- eoe as CardSelect,
40600
- Eae as CheckBoxTable,
40618
+ noe as CardHistory,
40619
+ toe as CardSelect,
40620
+ xae as CheckBoxTable,
40601
40621
  Q7 as Checkbox,
40602
- Qae as DateInputPicker,
40622
+ Hae as DateInputPicker,
40603
40623
  Ate as DropdownButton,
40604
- Jae as DropdownFilter,
40605
- Yae as DropdownFilterMultiple,
40606
- Wae as DropdownSummary,
40607
- Xae as DropdownUser,
40624
+ qae as DropdownFilter,
40625
+ _ae as DropdownFilterMultiple,
40626
+ Xae as DropdownSummary,
40627
+ Yae as DropdownUser,
40608
40628
  N6 as EmptyState,
40609
- Lae as Field,
40610
- Vae as Flag,
40611
- Zae as Graphic,
40612
- Dae as Header,
40629
+ Vae as Field,
40630
+ Qae as Flag,
40631
+ zae as Graphic,
40632
+ Fae as Header,
40613
40633
  Jr as Heading,
40614
40634
  vt as Icon,
40615
40635
  Bp as InlineError,
40616
40636
  Yh as LayoutMain,
40617
- wae as Link,
40637
+ Sae as Link,
40618
40638
  fs as Logo,
40619
- Nae as Modal,
40620
- Hae as Navigation,
40621
- Fae as NavigationMovil,
40639
+ jae as Modal,
40640
+ Gae as Navigation,
40641
+ Lae as NavigationMovil,
40622
40642
  vw as Radio,
40623
- Bae as Select,
40624
- Pae as SelectButton,
40625
- Mae as SelectCountry,
40643
+ Rae as Select,
40644
+ Mae as SelectButton,
40645
+ kae as SelectCountry,
40626
40646
  iu as Spinner,
40627
40647
  Rp as Summary,
40628
- Sae as Switch,
40629
- Tae as Tab,
40630
- jae as TabNav,
40631
- Kae as Table,
40648
+ Oae as Switch,
40649
+ Nae as Tab,
40650
+ Dae as TabNav,
40651
+ eoe as Table,
40632
40652
  Re as Text,
40633
- Gae as TextArea,
40653
+ Zae as TextArea,
40634
40654
  Oa as TextRef,
40635
40655
  L7 as Tooltip,
40636
- Oae as Tracker
40656
+ Bae as Tracker
40637
40657
  };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@aveonline/ui-react",
3
3
  "description": "Home base for Aveonline design system - ecosystem react",
4
4
  "private": false,
5
- "version": "2.5.0",
5
+ "version": "2.5.1",
6
6
  "types": "./dist/index.d.ts",
7
7
  "files": [
8
8
  "dist"