@cagatayfdn/flora-components 0.0.129 → 0.0.131
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/Table.css +1 -1
- package/dist/Table.module-DUqpZOLt.js +29 -0
- package/dist/components/Table/Table.js +186 -146
- package/dist/components/Table/TableHeader.js +1 -1
- package/dist/components/Table/TableSort.js +1 -1
- package/dist/index.d.mts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/prodivers.css +1 -1
- package/package.json +1 -1
- package/dist/Table.module-B3i0luMt.js +0 -29
package/dist/Table.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight:initial;--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-
|
|
1
|
+
/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight:initial;--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-border-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-tracking:initial}}}._wrapper_xi76o_2{position:relative}._header_xi76o_2{padding:calc(var(--spacing,.25rem)*5)}._header_xi76o_2 ._title_xi76o_2{margin:calc(var(--spacing,.25rem)*0);font-size:var(--font-lg);--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);color:var(--dark-4a)}._header_xi76o_2 ._subTitle_xi76o_2{margin:calc(var(--spacing,.25rem)*0);--tw-font-weight:var(--font-weight-normal,400);font-weight:var(--font-weight-normal,400);color:var(--gray-95)}._table_xi76o_2{border-collapse:collapse;--tw-border-spacing-x:calc(var(--spacing,.25rem)*0);--tw-border-spacing-y:calc(var(--spacing,.25rem)*0);width:100%;border-spacing:var(--tw-border-spacing-x)var(--tw-border-spacing-y);text-align:left}._table_xi76o_2._fixed_xi76o_2{position:relative}._table_xi76o_2._fixed_xi76o_2 th{top:calc(var(--spacing,.25rem)*0);z-index:999;background-color:var(--gray-57);position:sticky}._table_xi76o_2 td,._table_xi76o_2 th{padding-inline:calc(var(--spacing,.25rem)*5);padding-block:calc(var(--spacing,.25rem)*2.5);color:var(--gray-5c)}._table_xi76o_2 th{font-size:var(--text-xs,.75rem);line-height:var(--tw-leading,var(--text-xs--line-height,calc(1/.75)));--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500)}._table_xi76o_2 td{--tw-font-weight:var(--font-weight-normal,400);font-weight:var(--font-weight-normal,400)}._light_xi76o_2 ._table_xi76o_2 td,._light_xi76o_2 ._table_xi76o_2 th{border-style:var(--tw-border-style);--tw-border-style:solid;border-style:solid;border-width:1px;border-color:var(--gray-f2)}._wrapper_xi76o_2._light_xi76o_2{background-color:var(--white);color:var(--black);border-radius:10px}._wrapper_xi76o_2._light_xi76o_2 ._table_xi76o_2 thead{background-color:var(--gray-f9)}._wrapper_xi76o_2._light_xi76o_2 ._table_xi76o_2._fixedHeader_xi76o_2 th{top:calc(var(--spacing,.25rem)*0);background-color:var(--white)}._wrapper_xi76o_2._light_xi76o_2 ._table_xi76o_2 tbody td{padding:calc(var(--spacing,.25rem)*5)}._wrapper_xi76o_2._light_xi76o_2 ._table_xi76o_2 tbody tr:nth-child(2n) td{background-color:var(--gray-fd)}._wrapper_xi76o_2._dark_xi76o_2 ._header_xi76o_2{padding-inline:calc(var(--spacing,.25rem)*3);padding-block:calc(var(--spacing,.25rem)*5)}._wrapper_xi76o_2._dark_xi76o_2 ._header_xi76o_2 ._title_xi76o_2{color:var(--white)}._wrapper_xi76o_2._dark_xi76o_2>._tableWrap_xi76o_2{background-color:var(--gray-57);--tw-shadow:0 2px 4px 0 var(--tw-shadow-color,#0003);height:100%;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-radius:10px;padding:30px;position:relative}._wrapper_xi76o_2 ._dark_xi76o_2 ._table_xi76o_2 thead{background-image:none}._dark_xi76o_2 ._table_xi76o_2 thead tr th{--tw-border-style:none!important;border-style:none!important}._wrapper_xi76o_2._dark_xi76o_2 ._table_xi76o_2 th{color:var(--gray-5c);--tw-border-style:none!important;border-style:none!important}._wrapper_xi76o_2._dark_xi76o_2 ._table_xi76o_2 td:first-child,._wrapper_xi76o_2._dark_xi76o_2 ._table_xi76o_2 th:first-child{padding-left:calc(var(--spacing,.25rem)*0)}._wrapper_xi76o_2._dark_xi76o_2 ._table_xi76o_2 td:last-child,._wrapper_xi76o_2._dark_xi76o_2 ._table_xi76o_2 th:last-child{padding-right:calc(var(--spacing,.25rem)*0)}._wrapper_xi76o_2._dark_xi76o_2 ._table_xi76o_2 th{padding-top:calc(var(--spacing,.25rem)*0);--tw-font-weight:var(--font-weight-semibold,600);font-size:11px;font-weight:var(--font-weight-semibold,600);--tw-tracking:.39px;letter-spacing:.39px;color:var(--gray-9b);text-transform:uppercase}._wrapper_xi76o_2._dark_xi76o_2 ._table_xi76o_2 td{border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:var(--gray-5c);font-size:var(--font-md);--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);color:var(--gray-f2)}._wrapper_xi76o_2._dark_xi76o_2 ._table_xi76o_2 tbody tr:last-child td{border-bottom-style:var(--tw-border-style);padding-bottom:calc(var(--spacing,.25rem)*0);border-bottom-width:0}._wrapper_xi76o_2._dark_xi76o_2 ._actionWrap_xi76o_2{margin-top:calc(var(--spacing,.25rem)*0)}._tableLoading_xi76o_2{border-radius:10px}._actionWrap_xi76o_2{margin-top:calc(var(--spacing,.25rem)*2.5);justify-content:space-between;display:flex}._selectedAction_xi76o_2{display:flex}._selectedAction_xi76o_2 button{margin-left:15px}._rightGroup_xi76o_2{display:flex}._pageSizeWrap_xi76o_2{align-items:center;display:inline-flex}._pageSizeWrap_xi76o_2 span{margin-left:calc(var(--spacing,.25rem)*2.5);--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);color:var(--gray-95)}._pager_xi76o_2{margin-left:35px}._size_xi76o_2{max-width:75px}._noResult_xi76o_2{text-align:left;min-height:60px;font-size:var(--font-def);--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500);align-items:center;display:flex}._scrollWrap_xi76o_2{max-height:100%!important}._justifyContentEnd_xi76o_2{justify-content:flex-end}._width100_xi76o_2{width:100%}._sort_xi76o_2{cursor:pointer;-webkit-user-select:none;user-select:none;justify-content:space-between;align-items:center;display:flex}._icons_xi76o_2{justify-content:center;align-items:center;gap:calc(var(--spacing,.25rem)*.5);color:var(--dark-1e);display:flex}._sorted_xi76o_2{color:var(--gray-95)}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-border-spacing-x{syntax:"<length>";inherits:false;initial-value:0}@property --tw-border-spacing-y{syntax:"<length>";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-tracking{syntax:"*";inherits:false}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import './Table.css';const t = "_wrapper_xi76o_2", o = "_header_xi76o_2", _ = "_title_xi76o_2", e = "_subTitle_xi76o_2", i = "_table_xi76o_2", s = "_fixed_xi76o_2", n = "_light_xi76o_2", a = "_fixedHeader_xi76o_2", r = "_dark_xi76o_2", c = "_tableWrap_xi76o_2", l = "_actionWrap_xi76o_2", x = "_tableLoading_xi76o_2", d = "_selectedAction_xi76o_2", p = "_rightGroup_xi76o_2", g = "_pageSizeWrap_xi76o_2", b = "_pager_xi76o_2", h = "_size_xi76o_2", u = "_noResult_xi76o_2", W = "_scrollWrap_xi76o_2", f = "_justifyContentEnd_xi76o_2", w = "_width100_xi76o_2", z = "_sort_xi76o_2", y = "_icons_xi76o_2", j = "_sorted_xi76o_2", k = {
|
|
2
|
+
wrapper: t,
|
|
3
|
+
header: o,
|
|
4
|
+
title: _,
|
|
5
|
+
subTitle: e,
|
|
6
|
+
table: i,
|
|
7
|
+
fixed: s,
|
|
8
|
+
light: n,
|
|
9
|
+
fixedHeader: a,
|
|
10
|
+
dark: r,
|
|
11
|
+
tableWrap: c,
|
|
12
|
+
actionWrap: l,
|
|
13
|
+
tableLoading: x,
|
|
14
|
+
selectedAction: d,
|
|
15
|
+
rightGroup: p,
|
|
16
|
+
pageSizeWrap: g,
|
|
17
|
+
pager: b,
|
|
18
|
+
size: h,
|
|
19
|
+
noResult: u,
|
|
20
|
+
scrollWrap: W,
|
|
21
|
+
justifyContentEnd: f,
|
|
22
|
+
width100: w,
|
|
23
|
+
sort: z,
|
|
24
|
+
icons: y,
|
|
25
|
+
sorted: j
|
|
26
|
+
};
|
|
27
|
+
export {
|
|
28
|
+
k as s
|
|
29
|
+
};
|
|
@@ -1,215 +1,255 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { useState as
|
|
3
|
-
import
|
|
4
|
-
import { c as
|
|
5
|
-
import { s as
|
|
6
|
-
import { ThemeAppearance as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { _ as
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
import { j as t } from "../../jsx-runtime-BcAkpsdy.js";
|
|
2
|
+
import ae, { useState as E, useEffect as se } from "react";
|
|
3
|
+
import ne from "../NoResult/NoResult.js";
|
|
4
|
+
import { c as C } from "../../index-BHf7G3IG.js";
|
|
5
|
+
import { s as p } from "../../Table.module-DUqpZOLt.js";
|
|
6
|
+
import { ThemeAppearance as F, AppearanceSpinner as O } from "../../enums/appearance.js";
|
|
7
|
+
import z from "../Checkbox/Checkbox.js";
|
|
8
|
+
import oe from "../Loading/Loading.js";
|
|
9
|
+
import le from "../ScrollContainer/ScrollContainer.js";
|
|
10
|
+
import D from "./TableHeader.js";
|
|
11
|
+
import ie from "./TableSort.js";
|
|
12
|
+
import de from "../Icon/index.js";
|
|
13
|
+
import { Icons as ce } from "../../assets/icons/icons.js";
|
|
14
|
+
import { i as h } from "../../includes-8YTFrx85.js";
|
|
15
|
+
import { _ as V, k as pe } from "../../keys-B0bo5Q7o.js";
|
|
16
|
+
import { _ as G, a as he, b as fe } from "../../_reduce-DsUCMz4O.js";
|
|
17
|
+
import { _ as xe } from "../../Select-BE_y91ZN.js";
|
|
18
|
+
function ue(o, s) {
|
|
19
|
+
for (var n = 0, l = s.length, f = []; n < l; )
|
|
20
|
+
o(s[n]) && (f[f.length] = s[n]), n += 1;
|
|
21
|
+
return f;
|
|
20
22
|
}
|
|
21
|
-
var
|
|
22
|
-
function
|
|
23
|
-
this.xf =
|
|
23
|
+
var ge = /* @__PURE__ */ function() {
|
|
24
|
+
function o(s, n) {
|
|
25
|
+
this.xf = n, this.f = s;
|
|
24
26
|
}
|
|
25
|
-
return
|
|
26
|
-
return this.f(
|
|
27
|
-
},
|
|
28
|
-
}(),
|
|
29
|
-
return new
|
|
27
|
+
return o.prototype["@@transducer/init"] = G.init, o.prototype["@@transducer/result"] = G.result, o.prototype["@@transducer/step"] = function(s, n) {
|
|
28
|
+
return this.f(n) ? this.xf["@@transducer/step"](s, n) : s;
|
|
29
|
+
}, o;
|
|
30
|
+
}(), je = /* @__PURE__ */ V(function(s, n) {
|
|
31
|
+
return new ge(s, n);
|
|
30
32
|
});
|
|
31
|
-
const
|
|
32
|
-
var
|
|
33
|
-
/* @__PURE__ */
|
|
34
|
-
return
|
|
35
|
-
return
|
|
36
|
-
}, {},
|
|
33
|
+
const me = je;
|
|
34
|
+
var w = /* @__PURE__ */ V(
|
|
35
|
+
/* @__PURE__ */ he(["filter"], me, function(o, s) {
|
|
36
|
+
return xe(s) ? fe(function(n, l) {
|
|
37
|
+
return o(s[l]) && (n[l] = s[l]), n;
|
|
38
|
+
}, {}, pe(s)) : (
|
|
37
39
|
// else
|
|
38
|
-
|
|
40
|
+
ue(o, s)
|
|
39
41
|
);
|
|
40
42
|
})
|
|
41
43
|
);
|
|
42
|
-
const
|
|
44
|
+
const Oe = (o) => {
|
|
43
45
|
const {
|
|
44
|
-
columns:
|
|
45
|
-
dataSource:
|
|
46
|
+
columns: s = [],
|
|
47
|
+
dataSource: n = [],
|
|
46
48
|
totalCount: l,
|
|
47
|
-
currentPage:
|
|
48
|
-
className:
|
|
49
|
-
wrapperClass:
|
|
50
|
-
title:
|
|
51
|
-
rowSelection:
|
|
52
|
-
actionOnChange:
|
|
53
|
-
rowSelectionChange:
|
|
54
|
-
pagerVisible:
|
|
55
|
-
pagerOnChange:
|
|
56
|
-
columnRenderer:
|
|
57
|
-
pageSizeOnChange:
|
|
58
|
-
pageSize:
|
|
59
|
-
headerVisible:
|
|
60
|
-
headerLeftItem:
|
|
61
|
-
customFooterItem:
|
|
62
|
-
isLoading:
|
|
63
|
-
footerAction:
|
|
64
|
-
pageSizeVisible:
|
|
65
|
-
appearance:
|
|
66
|
-
fixedHeader:
|
|
67
|
-
showItemsText:
|
|
49
|
+
currentPage: f,
|
|
50
|
+
className: U,
|
|
51
|
+
wrapperClass: W,
|
|
52
|
+
title: X,
|
|
53
|
+
rowSelection: g = !1,
|
|
54
|
+
actionOnChange: N,
|
|
55
|
+
rowSelectionChange: i,
|
|
56
|
+
pagerVisible: k,
|
|
57
|
+
pagerOnChange: S,
|
|
58
|
+
columnRenderer: _,
|
|
59
|
+
pageSizeOnChange: R,
|
|
60
|
+
pageSize: y,
|
|
61
|
+
headerVisible: B = !0,
|
|
62
|
+
headerLeftItem: K,
|
|
63
|
+
customFooterItem: P,
|
|
64
|
+
isLoading: q = !1,
|
|
65
|
+
footerAction: J = !0,
|
|
66
|
+
pageSizeVisible: M = !0,
|
|
67
|
+
appearance: j = F.LIGHT,
|
|
68
|
+
fixedHeader: Q,
|
|
69
|
+
showItemsText: v,
|
|
68
70
|
customHeader: L,
|
|
69
|
-
selectedItems:
|
|
70
|
-
scrollClass:
|
|
71
|
-
disabledItems:
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
71
|
+
selectedItems: H = [],
|
|
72
|
+
scrollClass: Y,
|
|
73
|
+
disabledItems: u = [],
|
|
74
|
+
expandable: x
|
|
75
|
+
} = o, [d, m] = E(H), [T, $] = E([]), Z = (e) => {
|
|
76
|
+
i && (e.target.checked ? (m(
|
|
77
|
+
n.filter((a) => !h(a, u))
|
|
78
|
+
), i(
|
|
79
|
+
n.filter((a) => !h(a, u))
|
|
80
|
+
)) : (m([]), i([])));
|
|
81
|
+
}, I = (e, a) => {
|
|
82
|
+
i && (e.target.checked ? (m([...d, a]), i([...d, a])) : (m(
|
|
83
|
+
w((r) => r.pk !== a.pk, d)
|
|
84
|
+
), i(
|
|
85
|
+
w((r) => r.pk !== a.pk, d)
|
|
83
86
|
)));
|
|
84
|
-
},
|
|
87
|
+
}, ee = (e) => {
|
|
88
|
+
h(e, T) ? $((a) => w((r) => r !== e, a)) : $((a) => [...a, e]);
|
|
89
|
+
}, te = (e, a) => e == null ? void 0 : e.map((r, c) => /* @__PURE__ */ t.jsx(
|
|
85
90
|
"td",
|
|
86
91
|
{
|
|
87
92
|
width: r.width,
|
|
88
93
|
onClick: (b) => {
|
|
89
|
-
r != null && r.onClick && (r == null || r.onClick(b,
|
|
94
|
+
r != null && r.onClick && (r == null || r.onClick(b, a, r, c));
|
|
90
95
|
},
|
|
91
|
-
className:
|
|
92
|
-
children: r.render ? r.render(
|
|
96
|
+
className: C(r.className, r.tdClassName),
|
|
97
|
+
children: r.render ? r.render(a[r.dataIndex], a) : a[r.dataIndex]
|
|
93
98
|
},
|
|
94
|
-
`col-${
|
|
99
|
+
`col-${c}`
|
|
95
100
|
));
|
|
96
|
-
return
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
);
|
|
100
|
-
}, [o, p]), /* @__PURE__ */ s.jsxs(
|
|
101
|
+
return se(() => {
|
|
102
|
+
i && i(H.filter((e) => !h(e, u)));
|
|
103
|
+
}, [d, u]), /* @__PURE__ */ t.jsxs(
|
|
101
104
|
"div",
|
|
102
105
|
{
|
|
103
106
|
"data-testid": "table-container",
|
|
104
|
-
className:
|
|
105
|
-
[
|
|
107
|
+
className: C(p.wrapper, W, {
|
|
108
|
+
[p[`${j}`]]: j
|
|
106
109
|
}),
|
|
107
110
|
children: [
|
|
108
|
-
|
|
109
|
-
|
|
111
|
+
B && /* @__PURE__ */ t.jsx(
|
|
112
|
+
D,
|
|
110
113
|
{
|
|
111
|
-
title:
|
|
112
|
-
showItemsText:
|
|
113
|
-
actionOnChange:
|
|
114
|
-
pageSize:
|
|
115
|
-
pageSizeOnChange:
|
|
116
|
-
pagerOnChange:
|
|
117
|
-
pagerVisible:
|
|
114
|
+
title: X,
|
|
115
|
+
showItemsText: v,
|
|
116
|
+
actionOnChange: N,
|
|
117
|
+
pageSize: y,
|
|
118
|
+
pageSizeOnChange: R,
|
|
119
|
+
pagerOnChange: S,
|
|
120
|
+
pagerVisible: k,
|
|
118
121
|
totalCount: l,
|
|
119
|
-
currentPage:
|
|
122
|
+
currentPage: f
|
|
120
123
|
}
|
|
121
124
|
),
|
|
122
|
-
/* @__PURE__ */
|
|
123
|
-
|
|
124
|
-
|
|
125
|
+
/* @__PURE__ */ t.jsxs("div", { className: p.tableWrap, children: [
|
|
126
|
+
q && /* @__PURE__ */ t.jsx(
|
|
127
|
+
oe,
|
|
125
128
|
{
|
|
126
|
-
wrapperClass:
|
|
127
|
-
appearance:
|
|
129
|
+
wrapperClass: p.tableLoading,
|
|
130
|
+
appearance: j === F.LIGHT ? O.LIGHT : O.DARK
|
|
128
131
|
}
|
|
129
132
|
),
|
|
130
133
|
L && L,
|
|
131
|
-
/* @__PURE__ */
|
|
134
|
+
/* @__PURE__ */ t.jsx(le, { className: Y || p.scrollWrap, children: /* @__PURE__ */ t.jsxs(
|
|
132
135
|
"table",
|
|
133
136
|
{
|
|
134
137
|
"data-testid": "table-content",
|
|
135
|
-
className:
|
|
136
|
-
[
|
|
138
|
+
className: C(p.table, U, {
|
|
139
|
+
[p.fixed]: Q
|
|
137
140
|
}),
|
|
138
141
|
children: [
|
|
139
|
-
/* @__PURE__ */
|
|
140
|
-
|
|
141
|
-
|
|
142
|
+
/* @__PURE__ */ t.jsx("thead", { "data-testid": "table-head", children: /* @__PURE__ */ t.jsxs("tr", { "data-testid": "table-row", children: [
|
|
143
|
+
x && /* @__PURE__ */ t.jsx("th", { className: "w-[48px]" }),
|
|
144
|
+
g && /* @__PURE__ */ t.jsx("th", { className: "w-[26px]", children: /* @__PURE__ */ t.jsx(
|
|
145
|
+
z,
|
|
142
146
|
{
|
|
143
147
|
name: "selectAll",
|
|
144
|
-
isDisabled:
|
|
145
|
-
checked:
|
|
146
|
-
onChange:
|
|
148
|
+
isDisabled: n.length === 0,
|
|
149
|
+
checked: n.length > 0 && n.length === d.length,
|
|
150
|
+
onChange: Z
|
|
147
151
|
}
|
|
148
152
|
) }),
|
|
149
|
-
|
|
150
|
-
var r,
|
|
151
|
-
return e.sortable ? /* @__PURE__ */
|
|
153
|
+
s == null ? void 0 : s.map((e, a) => {
|
|
154
|
+
var r, c;
|
|
155
|
+
return e.sortable ? /* @__PURE__ */ t.jsx(
|
|
152
156
|
"th",
|
|
153
157
|
{
|
|
154
158
|
"data-testid": "table-head-item",
|
|
155
159
|
style: { width: e.width },
|
|
156
160
|
className: e.className,
|
|
157
|
-
children: /* @__PURE__ */
|
|
158
|
-
|
|
161
|
+
children: /* @__PURE__ */ t.jsx(
|
|
162
|
+
ie,
|
|
159
163
|
{
|
|
160
164
|
title: (r = e.title) == null ? void 0 : r.toString().toLocaleUpperCase(),
|
|
161
|
-
onClick: (b,
|
|
162
|
-
var
|
|
163
|
-
return (
|
|
165
|
+
onClick: (b, re) => {
|
|
166
|
+
var A;
|
|
167
|
+
return (A = e == null ? void 0 : e.onSort) == null ? void 0 : A.call(e, b, re);
|
|
164
168
|
}
|
|
165
169
|
}
|
|
166
170
|
)
|
|
167
171
|
},
|
|
168
|
-
`table-header-${
|
|
169
|
-
) : /* @__PURE__ */
|
|
172
|
+
`table-header-${a}`
|
|
173
|
+
) : /* @__PURE__ */ t.jsx(
|
|
170
174
|
"th",
|
|
171
175
|
{
|
|
172
176
|
"data-testid": "table-head-item",
|
|
173
177
|
style: { width: e.width },
|
|
174
178
|
className: e.className,
|
|
175
|
-
children: typeof e.title == "string" || e.title instanceof String ? (
|
|
179
|
+
children: typeof e.title == "string" || e.title instanceof String ? (c = e.title) == null ? void 0 : c.toString().toLocaleUpperCase() : e.title
|
|
176
180
|
},
|
|
177
|
-
`table-header-${
|
|
181
|
+
`table-header-${a}`
|
|
178
182
|
);
|
|
179
183
|
})
|
|
180
184
|
] }) }),
|
|
181
|
-
/* @__PURE__ */
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
{
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
185
|
+
/* @__PURE__ */ t.jsx("tbody", { "data-testid": "table-body", children: n.length > 0 ? n.map((e, a) => {
|
|
186
|
+
const r = h(a, T);
|
|
187
|
+
return /* @__PURE__ */ t.jsxs(ae.Fragment, { children: [
|
|
188
|
+
/* @__PURE__ */ t.jsxs("tr", { children: [
|
|
189
|
+
x && /* @__PURE__ */ t.jsx(
|
|
190
|
+
"td",
|
|
191
|
+
{
|
|
192
|
+
className: "text-center cursor-pointer pr-[0]!",
|
|
193
|
+
onClick: () => ee(a),
|
|
194
|
+
children: /* @__PURE__ */ t.jsx(
|
|
195
|
+
"span",
|
|
196
|
+
{
|
|
197
|
+
className: "inline-block transition-transform duration-200",
|
|
198
|
+
style: {
|
|
199
|
+
transform: r ? "rotate(90deg)" : "rotate(0deg)"
|
|
200
|
+
},
|
|
201
|
+
children: /* @__PURE__ */ t.jsx(de, { name: ce.ChevronRight })
|
|
202
|
+
}
|
|
203
|
+
)
|
|
204
|
+
}
|
|
205
|
+
),
|
|
206
|
+
g && /* @__PURE__ */ t.jsx("td", { children: /* @__PURE__ */ t.jsx(
|
|
207
|
+
z,
|
|
208
|
+
{
|
|
209
|
+
checked: h(e, d),
|
|
210
|
+
name: `select-${a}`,
|
|
211
|
+
onChange: (c) => I(c, e),
|
|
212
|
+
isDisabled: h(e, u)
|
|
213
|
+
}
|
|
214
|
+
) }),
|
|
215
|
+
_ ? _(s, e) : te(s, e)
|
|
216
|
+
] }),
|
|
217
|
+
x && r && /* @__PURE__ */ t.jsx("tr", { children: /* @__PURE__ */ t.jsx(
|
|
218
|
+
"td",
|
|
219
|
+
{
|
|
220
|
+
colSpan: s.length + (g ? 1 : 0) + (x ? 1 : 0),
|
|
221
|
+
className: "p-0 border-0",
|
|
222
|
+
children: x.expandedRowRender(e)
|
|
223
|
+
}
|
|
224
|
+
) })
|
|
225
|
+
] }, `row-${a}`);
|
|
226
|
+
}) : /* @__PURE__ */ t.jsx("tr", { children: /* @__PURE__ */ t.jsx(
|
|
227
|
+
"td",
|
|
228
|
+
{
|
|
229
|
+
colSpan: s.length + (g ? 1 : 0) + (x ? 1 : 0),
|
|
230
|
+
children: /* @__PURE__ */ t.jsx(ne, {})
|
|
231
|
+
}
|
|
232
|
+
) }) })
|
|
193
233
|
]
|
|
194
234
|
}
|
|
195
235
|
) })
|
|
196
236
|
] }),
|
|
197
|
-
|
|
198
|
-
|
|
237
|
+
J && /* @__PURE__ */ t.jsx(
|
|
238
|
+
D,
|
|
199
239
|
{
|
|
200
240
|
className: "mt-0",
|
|
201
|
-
showItemsText:
|
|
202
|
-
actionOnChange:
|
|
203
|
-
pageSize:
|
|
204
|
-
pageSizeOnChange:
|
|
205
|
-
pagerOnChange:
|
|
206
|
-
pagerVisible:
|
|
207
|
-
pageSizeVisible:
|
|
241
|
+
showItemsText: v,
|
|
242
|
+
actionOnChange: N,
|
|
243
|
+
pageSize: y,
|
|
244
|
+
pageSizeOnChange: R,
|
|
245
|
+
pagerOnChange: S,
|
|
246
|
+
pagerVisible: k,
|
|
247
|
+
pageSizeVisible: M,
|
|
208
248
|
totalCount: l,
|
|
209
|
-
customItem:
|
|
210
|
-
headerLeftItem:
|
|
211
|
-
currentPage:
|
|
212
|
-
appearance:
|
|
249
|
+
customItem: P,
|
|
250
|
+
headerLeftItem: K,
|
|
251
|
+
currentPage: f,
|
|
252
|
+
appearance: j
|
|
213
253
|
}
|
|
214
254
|
)
|
|
215
255
|
]
|
|
@@ -217,5 +257,5 @@ const Le = (i) => {
|
|
|
217
257
|
);
|
|
218
258
|
};
|
|
219
259
|
export {
|
|
220
|
-
|
|
260
|
+
Oe as default
|
|
221
261
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as e } from "../../jsx-runtime-BcAkpsdy.js";
|
|
2
2
|
import { useState as x, useEffect as R } from "react";
|
|
3
3
|
import { c as f } from "../../index-BHf7G3IG.js";
|
|
4
|
-
import { s } from "../../Table.module-
|
|
4
|
+
import { s } from "../../Table.module-DUqpZOLt.js";
|
|
5
5
|
import { FormFieldAppearance as j, AppearanceButton as B } from "../../enums/appearance.js";
|
|
6
6
|
import D from "../Button/Button.js";
|
|
7
7
|
import W from "../Heading/Heading.js";
|
|
@@ -2,7 +2,7 @@ import { j as r } from "../../jsx-runtime-BcAkpsdy.js";
|
|
|
2
2
|
import { useState as p } from "react";
|
|
3
3
|
import { Icons as s } from "../../assets/icons/icons.js";
|
|
4
4
|
import o from "../Icon/index.js";
|
|
5
|
-
import { s as a } from "../../Table.module-
|
|
5
|
+
import { s as a } from "../../Table.module-DUqpZOLt.js";
|
|
6
6
|
import { SortEnum as t } from "../../enums/status.js";
|
|
7
7
|
const g = (m) => {
|
|
8
8
|
const [c, i] = p(t.ASC), { title: d, onClick: l } = m, x = (j) => {
|
package/dist/index.d.mts
CHANGED
|
@@ -496,6 +496,11 @@ export declare interface EventProps<T = HTMLElement> {
|
|
|
496
496
|
onInvalid?: (e: React.FormEvent<T>) => void;
|
|
497
497
|
}
|
|
498
498
|
|
|
499
|
+
declare type ExpandableType = {
|
|
500
|
+
expandedRowRender: (record: any) => ReactNode;
|
|
501
|
+
rowExpandable?: (record: any) => boolean;
|
|
502
|
+
};
|
|
503
|
+
|
|
499
504
|
export declare const FileUpload: React_2.ForwardRefExoticComponent<{
|
|
500
505
|
type?: "number" | "email" | "search" | "text" | "url" | "tel" | "password" | "hidden" | undefined;
|
|
501
506
|
id?: string | undefined;
|
|
@@ -1316,6 +1321,7 @@ export declare type TableProps = {
|
|
|
1316
1321
|
fixedHeader?: boolean;
|
|
1317
1322
|
customHeader?: ReactNode;
|
|
1318
1323
|
scrollClass?: string;
|
|
1324
|
+
expandable?: ExpandableType;
|
|
1319
1325
|
} & TableHeaderProps;
|
|
1320
1326
|
|
|
1321
1327
|
export declare const TableSort: (props: TableSortProps) => JSX_2.Element;
|
package/dist/index.d.ts
CHANGED
|
@@ -496,6 +496,11 @@ export declare interface EventProps<T = HTMLElement> {
|
|
|
496
496
|
onInvalid?: (e: React.FormEvent<T>) => void;
|
|
497
497
|
}
|
|
498
498
|
|
|
499
|
+
declare type ExpandableType = {
|
|
500
|
+
expandedRowRender: (record: any) => ReactNode;
|
|
501
|
+
rowExpandable?: (record: any) => boolean;
|
|
502
|
+
};
|
|
503
|
+
|
|
499
504
|
export declare const FileUpload: React_2.ForwardRefExoticComponent<{
|
|
500
505
|
type?: "number" | "email" | "search" | "text" | "url" | "tel" | "password" | "hidden" | undefined;
|
|
501
506
|
id?: string | undefined;
|
|
@@ -1316,6 +1321,7 @@ export declare type TableProps = {
|
|
|
1316
1321
|
fixedHeader?: boolean;
|
|
1317
1322
|
customHeader?: ReactNode;
|
|
1318
1323
|
scrollClass?: string;
|
|
1324
|
+
expandable?: ExpandableType;
|
|
1319
1325
|
} & TableHeaderProps;
|
|
1320
1326
|
|
|
1321
1327
|
export declare const TableSort: (props: TableSortProps) => JSX_2.Element;
|