@gearbox-protocol/permissionless-ui 1.12.4 → 1.13.0

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,10 +1,10 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { cva as m } from "class-variance-authority";
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import { cva as n } from "class-variance-authority";
3
3
  import * as d from "react";
4
- import { Col as n } from "../layout/col/col.js";
5
- import { Grid as f } from "../layout/grid/grid.js";
6
- import { cn as s } from "../../utils/cn.js";
7
- const b = m("w-full", {
4
+ import { Col as f } from "../layout/col/col.js";
5
+ import { Grid as c } from "../layout/grid/grid.js";
6
+ import { cn as i } from "../../utils/cn.js";
7
+ const T = n("w-full", {
8
8
  variants: {
9
9
  size: {
10
10
  sm: "text-xs",
@@ -15,66 +15,72 @@ const b = m("w-full", {
15
15
  defaultVariants: {
16
16
  size: "default"
17
17
  }
18
- }), c = d.forwardRef(
19
- ({ className: e, size: a, cols: t = 12, gap: i = 0, ...l }, o) => /* @__PURE__ */ r("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ r(
20
- f,
18
+ }), g = d.forwardRef(
19
+ ({ className: e, size: t, cols: a = 12, gap: l = 0, ...r }, o) => /* @__PURE__ */ s("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ s(
20
+ c,
21
21
  {
22
22
  ref: o,
23
- cols: t,
24
- gap: i,
25
- className: s(b({ size: a, className: e })),
26
- ...l
23
+ cols: a,
24
+ gap: l,
25
+ className: i(T({ size: t, className: e })),
26
+ ...r
27
27
  }
28
28
  ) })
29
29
  );
30
- c.displayName = "GridTable";
31
- const p = d.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ r(
30
+ g.displayName = "GridTable";
31
+ const G = d.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ s(
32
32
  "div",
33
33
  {
34
- ref: t,
35
- className: s("contents [&>*]:border-b [&>*]:border-border", e),
36
- ...a
34
+ ref: a,
35
+ className: i("contents [&>*]:border-b [&>*]:border-border", e),
36
+ ...t
37
37
  }
38
38
  ));
39
- p.displayName = "GridTableHeader";
40
- const u = d.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ r(
39
+ G.displayName = "GridTableHeader";
40
+ const N = d.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ s(
41
41
  "div",
42
42
  {
43
- ref: t,
44
- className: s("contents [&>*:last-child>*]:border-0", e),
45
- ...a
43
+ ref: a,
44
+ className: i("contents [&>*:last-child>*]:border-0", e),
45
+ ...t
46
46
  }
47
47
  ));
48
- u.displayName = "GridTableBody";
49
- const y = d.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ r(
48
+ N.displayName = "GridTableBody";
49
+ const w = d.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ s(
50
50
  "div",
51
51
  {
52
- ref: t,
53
- className: s(
52
+ ref: a,
53
+ className: i(
54
54
  "contents [&>*]:border-t [&>*]:bg-muted/50 [&>*]:font-medium",
55
55
  e
56
56
  ),
57
- ...a
57
+ ...t
58
58
  }
59
59
  ));
60
- y.displayName = "GridTableFooter";
61
- const T = d.forwardRef(
62
- ({ className: e, cols: a, gap: t = 0, ...i }, l) => /* @__PURE__ */ r(
63
- f,
64
- {
65
- ref: l,
66
- cols: a,
67
- gap: t,
68
- className: s(
69
- "contents md:[&>*]:border-b [&>*]:border-border [&>*]:transition-colors hover:[&>*]:bg-muted/50 data-[state=selected]:[&>*]:bg-muted",
70
- e
71
- ),
72
- ...i
73
- }
74
- )
60
+ w.displayName = "GridTableFooter";
61
+ const v = d.forwardRef(
62
+ ({ className: e, cols: t, gap: a = 0, last: l, height: r, hideValue: o, style: u, ...y }, x) => {
63
+ const m = typeof r == "number" ? `${r}px` : r;
64
+ return /* @__PURE__ */ s(
65
+ c,
66
+ {
67
+ ref: x,
68
+ cols: t,
69
+ gap: a,
70
+ className: i(
71
+ "contents md:[&>*]:border-b [&>*]:border-border [&>*]:transition-colors hover:[&>*]:bg-muted/50 data-[state=selected]:[&>*]:bg-muted",
72
+ l && "[&>*]:border-b-0",
73
+ o && "[&>*]:opacity-0",
74
+ e
75
+ ),
76
+ style: { ...u, ...m ? { height: m } : {} },
77
+ ...y
78
+ }
79
+ );
80
+ }
75
81
  );
76
- T.displayName = "GridTableRow";
77
- const G = m(
82
+ v.displayName = "GridTableRow";
83
+ const R = n(
78
84
  "flex items-center justify-startborder-b text-left align-middle font-medium text-muted-foreground !bg-transparent",
79
85
  {
80
86
  variants: {
@@ -94,63 +100,71 @@ const G = m(
94
100
  justify: "start"
95
101
  }
96
102
  }
97
- ), N = d.forwardRef(
98
- ({ className: e, size: a, span: t = 1, justify: i = "start", ...l }, o) => /* @__PURE__ */ r(
99
- n,
103
+ ), b = d.forwardRef(
104
+ ({ className: e, size: t, span: a = 1, justify: l = "start", ...r }, o) => /* @__PURE__ */ s(
105
+ f,
100
106
  {
101
107
  ref: o,
102
- span: t,
103
- className: s(G({ size: a, justify: i, className: e })),
104
- ...l
108
+ span: a,
109
+ className: i(R({ size: t, justify: l, className: e })),
110
+ ...r
105
111
  }
106
112
  )
107
113
  );
108
- N.displayName = "GridTableHead";
109
- const x = m("align-middle", {
114
+ b.displayName = "GridTableHead";
115
+ const h = n("align-middle", {
110
116
  variants: {
111
117
  size: {
112
118
  sm: "p-2",
113
119
  default: "p-4",
114
120
  lg: "p-6"
121
+ },
122
+ textAlign: {
123
+ left: "text-left",
124
+ center: "text-center",
125
+ right: "text-right"
115
126
  }
116
127
  },
117
128
  defaultVariants: {
118
129
  size: "default"
119
130
  }
120
- }), g = d.forwardRef(
121
- ({ className: e, size: a, span: t = 1, ...i }, l) => /* @__PURE__ */ r(
122
- n,
131
+ }), p = d.forwardRef(
132
+ ({ className: e, size: t, span: a = 1, textAlign: l, ...r }, o) => /* @__PURE__ */ s(
133
+ f,
123
134
  {
124
- ref: l,
125
- span: t,
126
- className: s(x({ size: a, className: e })),
127
- ...i
135
+ ref: o,
136
+ span: a,
137
+ className: i(h({ size: t, textAlign: l, className: e })),
138
+ ...r
128
139
  }
129
140
  )
130
141
  );
131
- g.displayName = "GridTableCell";
132
- const w = d.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ r(
142
+ p.displayName = "GridTableCell";
143
+ const j = d.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ s(
133
144
  "div",
134
145
  {
135
- ref: t,
136
- className: s(
146
+ ref: a,
147
+ className: i(
137
148
  "col-span-full mt-4 text-sm text-muted-foreground",
138
149
  e
139
150
  ),
140
- ...a
151
+ ...t
141
152
  }
142
153
  ));
143
- w.displayName = "GridTableCaption";
154
+ j.displayName = "GridTableCaption";
155
+ const F = p, A = b;
144
156
  export {
145
- c as GridTable,
146
- u as GridTableBody,
147
- w as GridTableCaption,
148
- g as GridTableCell,
149
- y as GridTableFooter,
150
- N as GridTableHead,
151
- p as GridTableHeader,
152
- T as GridTableRow,
153
- x as gridTableCellVariants,
154
- G as gridTableHeadVariants,
155
- b as gridTableVariants
157
+ g as GridTable,
158
+ N as GridTableBody,
159
+ j as GridTableCaption,
160
+ p as GridTableCell,
161
+ w as GridTableFooter,
162
+ b as GridTableHead,
163
+ G as GridTableHeader,
164
+ v as GridTableRow,
165
+ F as Td,
166
+ A as Th,
167
+ h as gridTableCellVariants,
168
+ R as gridTableHeadVariants,
169
+ T as gridTableVariants
156
170
  };
@@ -1,16 +1,16 @@
1
1
  import { EditButton as r } from "./edit-button.js";
2
- import { GridTableCellAsset as o, GridTableCellUpdatable as b, GridTableEditable as d } from "./editable-grid-table.js";
2
+ import { GridTableCellAsset as o, GridTableCellUpdatable as d, GridTableEditable as b } from "./editable-grid-table.js";
3
3
  import { TableCellAsset as i, TableCellUpdatable as T, TableEditable as p } from "./editable-table.js";
4
4
  import { GridErrorLine as G } from "./grid-error-line.js";
5
5
  import { GridLoadingLine as f } from "./grid-loading-line.js";
6
- import { GridTable as C, GridTableBody as s, GridTableCaption as H, GridTableCell as L, GridTableFooter as V, GridTableHead as g, GridTableHeader as E, GridTableRow as S, gridTableCellVariants as u, gridTableHeadVariants as B, gridTableVariants as U } from "./grid-table.js";
7
- import { GridTableLoader as y } from "./grid-table-loader.js";
8
- import { SortableHeadCell as F } from "./sortable-head-cell.js";
9
- import { SortingTableHead as c, Table as h, TableBody as j, TableCaption as k, TableCell as q, TableFooter as v, TableHead as z, TableHeader as D, TableRow as I, tableCellVariants as J, tableHeadVariants as K, tableVariants as M } from "./table.js";
10
- import { TableLoader as O } from "./table-loader.js";
11
- import { TableLoaderGuard as Q } from "./table-loader-guard.js";
12
- import { TableCellSm as X, TableLineSm as Y } from "./table-sm.js";
13
- import { UpdatedValue as _ } from "./updated-value.js";
6
+ import { GridTable as C, GridTableBody as s, GridTableCaption as H, GridTableCell as L, GridTableFooter as V, GridTableHead as g, GridTableHeader as E, GridTableRow as S, Td as u, Th as B, gridTableCellVariants as U, gridTableHeadVariants as w, gridTableVariants as y } from "./grid-table.js";
7
+ import { GridTableLoader as F } from "./grid-table-loader.js";
8
+ import { SortableHeadCell as h } from "./sortable-head-cell.js";
9
+ import { SortingTableHead as j, Table as k, TableBody as q, TableCaption as v, TableCell as z, TableFooter as D, TableHead as I, TableHeader as J, TableRow as K, tableCellVariants as M, tableHeadVariants as N, tableVariants as O } from "./table.js";
10
+ import { TableLoader as Q } from "./table-loader.js";
11
+ import { TableLoaderGuard as X } from "./table-loader-guard.js";
12
+ import { TableCellSm as Z, TableLineSm as _ } from "./table-sm.js";
13
+ import { UpdatedValue as ee } from "./updated-value.js";
14
14
  export {
15
15
  r as EditButton,
16
16
  G as GridErrorLine,
@@ -20,35 +20,37 @@ export {
20
20
  H as GridTableCaption,
21
21
  L as GridTableCell,
22
22
  o as GridTableCellAsset,
23
- b as GridTableCellUpdatable,
24
- d as GridTableEditable,
23
+ d as GridTableCellUpdatable,
24
+ b as GridTableEditable,
25
25
  V as GridTableFooter,
26
26
  g as GridTableHead,
27
27
  E as GridTableHeader,
28
- y as GridTableLoader,
28
+ F as GridTableLoader,
29
29
  S as GridTableRow,
30
- F as SortableHeadCell,
31
- c as SortingTableHead,
32
- h as Table,
33
- j as TableBody,
34
- k as TableCaption,
35
- q as TableCell,
30
+ h as SortableHeadCell,
31
+ j as SortingTableHead,
32
+ k as Table,
33
+ q as TableBody,
34
+ v as TableCaption,
35
+ z as TableCell,
36
36
  i as TableCellAsset,
37
- X as TableCellSm,
37
+ Z as TableCellSm,
38
38
  T as TableCellUpdatable,
39
39
  p as TableEditable,
40
- v as TableFooter,
41
- z as TableHead,
42
- D as TableHeader,
43
- Y as TableLineSm,
44
- O as TableLoader,
45
- Q as TableLoaderGuard,
46
- I as TableRow,
47
- _ as UpdatedValue,
48
- u as gridTableCellVariants,
49
- B as gridTableHeadVariants,
50
- U as gridTableVariants,
51
- J as tableCellVariants,
52
- K as tableHeadVariants,
53
- M as tableVariants
40
+ D as TableFooter,
41
+ I as TableHead,
42
+ J as TableHeader,
43
+ _ as TableLineSm,
44
+ Q as TableLoader,
45
+ X as TableLoaderGuard,
46
+ K as TableRow,
47
+ u as Td,
48
+ B as Th,
49
+ ee as UpdatedValue,
50
+ U as gridTableCellVariants,
51
+ w as gridTableHeadVariants,
52
+ y as gridTableVariants,
53
+ M as tableCellVariants,
54
+ N as tableHeadVariants,
55
+ O as tableVariants
54
56
  };