@konstructio/ui 0.1.2-alpha.6 → 0.1.2-alpha.8
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/{Modal-D-NOEWMX.js → Modal-B8jrP02v.js} +20 -20
- package/dist/components/Alert/Alert.js +1 -1
- package/dist/components/AlertDialog/AlertDialog.js +1 -1
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/Command/Command.js +2 -2
- package/dist/components/Command/components/Command.js +1 -1
- package/dist/components/Command/components/CommandEmpty.js +1 -1
- package/dist/components/Command/components/CommandGroup.js +1 -1
- package/dist/components/Command/components/CommandInput.js +1 -1
- package/dist/components/Command/components/CommandItem.js +1 -1
- package/dist/components/Command/components/CommandList.js +1 -1
- package/dist/components/Command/components/CommandSeparator.js +1 -1
- package/dist/components/Command/components/DialogContent.js +1 -1
- package/dist/components/Command/components/DialogOverlay.js +1 -1
- package/dist/components/Modal/Modal.js +2 -2
- package/dist/components/Modal/components/Wrapper/Wrapper.js +2 -2
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/NumberInput/NumberInput.js +1 -1
- package/dist/components/Range/Range.js +1 -1
- package/dist/components/Slider/Slider.js +1 -1
- package/dist/components/Switch/Switch.js +1 -1
- package/dist/components/Tabs/Tabs.js +1 -1
- package/dist/components/Tabs/components/Content.js +1 -1
- package/dist/components/Tabs/components/List.js +1 -1
- package/dist/components/Tabs/components/Trigger.js +1 -1
- package/dist/components/Toast/Toast.js +54 -53
- package/dist/components/VirtualizedTable/VirtualizedTable.js +72 -58
- package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +4 -3
- package/dist/components/VirtualizedTable/contexts/table.provider.js +64 -760
- package/dist/components/index.js +1 -1
- package/dist/{index-B7t8D14s.js → index-0XtjXVpJ.js} +2 -2
- package/dist/index-BVRIAMfe.js +36 -0
- package/dist/{index-os7vysFS.js → index-Bn4c-gww.js} +1 -1
- package/dist/{index-Cd2vhaop.js → index-CffpTFMi.js} +1 -1
- package/dist/{index-Bnb0ezr3.js → index-DQJhMz8c.js} +1 -1
- package/dist/index-DdXGVVBv.js +15 -0
- package/dist/{index-DzIBBMjs.js → index-amYX3uxF.js} +3 -3
- package/dist/{index-C84F4YyO.js → index-l3NwplN0.js} +1 -1
- package/dist/{index-DBbEcSUG.js → index-sp5ZfG6g.js} +1 -1
- package/dist/index.d.ts +8 -4
- package/dist/index.js +1 -1
- package/dist/package.json +6 -2
- package/package.json +6 -2
- package/dist/index-BITvcJAz.js +0 -423
- package/dist/index-ti1b9kqV.js +0 -14
|
@@ -1,38 +1,41 @@
|
|
|
1
1
|
import { jsx as r, jsxs as m } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { TableProvider as
|
|
5
|
-
import { Filter as
|
|
6
|
-
import { Header as
|
|
7
|
-
import { Body as
|
|
8
|
-
import { Pagination as
|
|
9
|
-
import { TruncateText as
|
|
10
|
-
import { Actions as
|
|
11
|
-
const
|
|
12
|
-
id:
|
|
13
|
-
ariaLabel:
|
|
14
|
-
columns:
|
|
15
|
-
data:
|
|
16
|
-
totalItems:
|
|
17
|
-
|
|
18
|
-
classNameHeaderArrows: u,
|
|
2
|
+
import { useMemo as y } from "react";
|
|
3
|
+
import { cn as s } from "../../utils/index.js";
|
|
4
|
+
import { TableProvider as B } from "./contexts/table.provider.js";
|
|
5
|
+
import { Filter as H } from "./components/Filter/Filter.js";
|
|
6
|
+
import { Header as K } from "./components/Header/Header.js";
|
|
7
|
+
import { Body as M } from "./components/Body/Body.js";
|
|
8
|
+
import { Pagination as P } from "./components/Pagination/Pagination.js";
|
|
9
|
+
import { TruncateText as k } from "./components/TruncateText/TruncateText.js";
|
|
10
|
+
import { Actions as q } from "./components/Actions/Actions.js";
|
|
11
|
+
const C = ({
|
|
12
|
+
id: c,
|
|
13
|
+
ariaLabel: d,
|
|
14
|
+
columns: n,
|
|
15
|
+
data: f,
|
|
16
|
+
totalItems: p,
|
|
17
|
+
className: u,
|
|
19
18
|
classNameHeaderActiveArrows: b,
|
|
20
|
-
|
|
19
|
+
classNameHeaderArrows: T,
|
|
20
|
+
classNameHeaderTable: N,
|
|
21
|
+
classNameTable: h,
|
|
22
|
+
classNameWrapperTable: x,
|
|
23
|
+
fetchData: A,
|
|
21
24
|
// Pagination
|
|
22
|
-
showPagination:
|
|
25
|
+
showPagination: v,
|
|
23
26
|
showTotalItems: o,
|
|
24
27
|
showDropdownPagination: l,
|
|
25
28
|
showDotPagination: a,
|
|
26
29
|
showFormPagination: i,
|
|
27
|
-
pageSizes:
|
|
30
|
+
pageSizes: z,
|
|
28
31
|
// Filter
|
|
29
|
-
showFilter:
|
|
30
|
-
showFilterInput:
|
|
31
|
-
filterSearchPlaceholder:
|
|
32
|
-
multiSelectFilter:
|
|
32
|
+
showFilter: V = !1,
|
|
33
|
+
showFilterInput: g,
|
|
34
|
+
filterSearchPlaceholder: j = "",
|
|
35
|
+
multiSelectFilter: w
|
|
33
36
|
}) => {
|
|
34
|
-
const t =
|
|
35
|
-
() =>
|
|
37
|
+
const t = y(
|
|
38
|
+
() => v || [
|
|
36
39
|
o,
|
|
37
40
|
l,
|
|
38
41
|
a,
|
|
@@ -41,59 +44,70 @@ const P = ({
|
|
|
41
44
|
[]
|
|
42
45
|
);
|
|
43
46
|
return /* @__PURE__ */ r(
|
|
44
|
-
|
|
47
|
+
B,
|
|
45
48
|
{
|
|
46
|
-
id:
|
|
47
|
-
columns:
|
|
48
|
-
data:
|
|
49
|
-
fetchData:
|
|
50
|
-
totalItems:
|
|
51
|
-
children: /* @__PURE__ */ m("section", { children: [
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
id: c,
|
|
50
|
+
columns: n,
|
|
51
|
+
data: f,
|
|
52
|
+
fetchData: A,
|
|
53
|
+
totalItems: p,
|
|
54
|
+
children: /* @__PURE__ */ m("section", { className: u, children: [
|
|
55
|
+
V && /* @__PURE__ */ r(
|
|
56
|
+
H,
|
|
54
57
|
{
|
|
55
|
-
placeholder:
|
|
56
|
-
multiSelectFilter:
|
|
57
|
-
showFilterInput:
|
|
58
|
+
placeholder: j,
|
|
59
|
+
multiSelectFilter: w,
|
|
60
|
+
showFilterInput: g
|
|
58
61
|
}
|
|
59
62
|
),
|
|
60
63
|
/* @__PURE__ */ r(
|
|
61
64
|
"div",
|
|
62
65
|
{
|
|
63
|
-
className:
|
|
64
|
-
"
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
66
|
+
className: s(
|
|
67
|
+
"shadow rounded-t-lg",
|
|
68
|
+
{
|
|
69
|
+
"overflow-hidden rounded-lg": !t
|
|
70
|
+
},
|
|
71
|
+
x
|
|
72
|
+
),
|
|
73
|
+
children: /* @__PURE__ */ m(
|
|
74
|
+
"table",
|
|
75
|
+
{
|
|
76
|
+
className: s("w-full border-collapse", h),
|
|
77
|
+
"aria-label": d,
|
|
78
|
+
children: [
|
|
79
|
+
/* @__PURE__ */ r(
|
|
80
|
+
K,
|
|
81
|
+
{
|
|
82
|
+
className: N,
|
|
83
|
+
classNameArrows: T,
|
|
84
|
+
classNameActiveArrows: b
|
|
85
|
+
}
|
|
86
|
+
),
|
|
87
|
+
/* @__PURE__ */ r(M, {})
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
)
|
|
77
91
|
}
|
|
78
92
|
),
|
|
79
93
|
t && /* @__PURE__ */ r(
|
|
80
|
-
|
|
94
|
+
P,
|
|
81
95
|
{
|
|
82
96
|
showTotalItems: o,
|
|
83
97
|
showDropdownPagination: l,
|
|
84
98
|
showDotPagination: a,
|
|
85
99
|
showFormPagination: i,
|
|
86
|
-
pageSizes:
|
|
100
|
+
pageSizes: z
|
|
87
101
|
}
|
|
88
102
|
)
|
|
89
103
|
] })
|
|
90
104
|
}
|
|
91
105
|
);
|
|
92
|
-
}, e =
|
|
106
|
+
}, e = C;
|
|
93
107
|
e.displayName = "KonstructVirtualizedTable";
|
|
94
|
-
e.TruncateText =
|
|
95
|
-
e.Actions =
|
|
108
|
+
e.TruncateText = k;
|
|
109
|
+
e.Actions = q;
|
|
96
110
|
export {
|
|
97
|
-
|
|
111
|
+
k as TruncateText,
|
|
98
112
|
e as VirtualizedTable
|
|
99
113
|
};
|
|
@@ -3,13 +3,14 @@ import * as g from "react";
|
|
|
3
3
|
import { useLayoutEffect as Vt, useRef as zt, useState as jt, useCallback as Yt, useEffect as ze } from "react";
|
|
4
4
|
import { c as ot, u as je, a as Xt, b as J } from "../../../../index-BfXxHr_2.js";
|
|
5
5
|
import { u as ge, b as Gt } from "../../../../index-DQH6odE9.js";
|
|
6
|
-
import { D as qt } from "../../../../index-
|
|
6
|
+
import { D as qt } from "../../../../index-CffpTFMi.js";
|
|
7
7
|
import { u as Ut } from "../../../../index-bwWKd82e.js";
|
|
8
|
-
import
|
|
8
|
+
import * as Kt from "react-dom";
|
|
9
|
+
import { P as we } from "../../../../index-BVRIAMfe.js";
|
|
9
10
|
import { u as Zt } from "../../../../index-0ioNhtNM.js";
|
|
10
11
|
import { u as Jt } from "../../../../index-BAEWsOG1.js";
|
|
11
12
|
import { P as Qt } from "../../../../index-C1g_chDT.js";
|
|
12
|
-
import { R as en } from "../../../../index-
|
|
13
|
+
import { R as en } from "../../../../index-sp5ZfG6g.js";
|
|
13
14
|
import { d as tn } from "../../../../debounce-BFejQm9P.js";
|
|
14
15
|
const nn = ["top", "right", "bottom", "left"], U = Math.min, F = Math.max, de = Math.round, fe = Math.floor, j = (e) => ({
|
|
15
16
|
x: e,
|