@konstructio/ui 0.1.2-alpha.20 → 0.1.2-alpha.22
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-B8jrP02v.js → Modal-Dpk-1N9W.js} +2 -2
- package/dist/chevron-down-DgT-uSF9.js +5 -0
- package/dist/chevron-right-DYvXLeql.js +7 -0
- package/dist/components/Alert/Alert.js +2 -2
- 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/Badge/Badge.js +2 -8
- package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/components/Breadcrumb/components/Item/Item.js +1 -1
- package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +1 -1
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +6 -7
- 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 +2 -2
- 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 +2 -2
- package/dist/components/Command/components/DialogOverlay.js +1 -1
- package/dist/components/Datepicker/DatePicker.js +1 -1
- package/dist/components/Dropdown/components/List/List.js +1 -1
- package/dist/components/Dropdown/components/Wrapper.js +52 -64
- package/dist/components/DropdownButton/DropdownButton.js +1 -1
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +1 -1
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +1 -1
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Loading/Loading.js +1 -7
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Modal/components/Body/Body.js +1 -1
- package/dist/components/Modal/components/Footer/Footer.js +1 -1
- package/dist/components/Modal/components/Header/Header.js +1 -1
- package/dist/components/Modal/components/Wrapper/Wrapper.js +3 -3
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/NumberInput/NumberInput.js +2 -2
- package/dist/components/PieChart/PieChart.js +0 -18
- package/dist/components/RadioGroup/RadioGroup.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 +10 -11
- 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/Tag/Tag.js +1 -1
- package/dist/components/TagSelect/components/Wrapper/Wrapper.js +2 -2
- package/dist/components/TimePicker/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/Toast/Toast.js +233 -210
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/components/VirtualizedTable/VirtualizedTable.js +64 -67
- package/dist/components/VirtualizedTable/components/Actions/Actions.js +2 -2
- package/dist/components/VirtualizedTable/components/Body/Body.js +36 -22
- package/dist/components/VirtualizedTable/components/DotPaginate/DotPaginate.js +1 -1
- package/dist/components/VirtualizedTable/components/Header/Header.js +40 -38
- package/dist/components/VirtualizedTable/components/Pagination/Pagination.js +23 -16
- package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +52 -0
- package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +263 -236
- package/dist/components/VirtualizedTable/components/WrapperBody/WrapperBody.js +27 -0
- package/dist/components/VirtualizedTable/components/index.js +8 -6
- package/dist/components/VirtualizedTable/contexts/table.context.js +1 -0
- package/dist/components/VirtualizedTable/contexts/table.provider.js +43 -42
- package/dist/components/index.js +1 -1
- package/dist/contexts/theme.provider.js +0 -1
- package/dist/{createLucideIcon-DGhJ8Z4k.js → createLucideIcon-D4r5Phnh.js} +0 -24
- package/dist/{ellipsis-vertical-DpnVYRxI.js → ellipsis-vertical-BVPtjl5f.js} +1 -7
- package/dist/{index-N2OStZoU.js → index--V_ZsiQe.js} +0 -21
- package/dist/{index-bwWKd82e.js → index-BbQkJE5L.js} +1 -1
- package/dist/index-BtQfgaSF.js +60 -0
- package/dist/index-CIAmiWcw.js +200 -0
- package/dist/index-CSFe9uC5.js +14 -0
- package/dist/{index-Dx2grAuN.js → index-CSWGJT-v.js} +0 -20
- package/dist/index-CigKKiZS.js +91 -0
- package/dist/index-DDByhzds.js +137 -0
- package/dist/{index-DQJhMz8c.js → index-DH2Fnov1.js} +11 -12
- package/dist/index-DLcqcWxM.js +29 -0
- package/dist/{index-CffpTFMi.js → index-Dbt2vBmS.js} +5 -6
- package/dist/{index-l3NwplN0.js → index-DpW9ExsS.js} +10 -11
- package/dist/index-DrWQH0QF.js +55 -0
- package/dist/{index-0XtjXVpJ.js → index-X4k_cU8k.js} +4 -4
- package/dist/index-kyuBfLcN.js +479 -0
- package/dist/{index-C1g_chDT.js → index-mPY_8Y5v.js} +2 -2
- package/dist/{index-BAEWsOG1.js → index-ohdbKsws.js} +1 -1
- package/dist/index.d.ts +9 -0
- package/dist/index.js +1 -1
- package/dist/package.json +17 -17
- package/dist/styles.css +1 -1
- package/dist/{useBreadcrumb-B8DnuqkR.js → useBreadcrumb-BAHbGQ_O.js} +0 -10
- package/dist/{x-4F_5p77m.js → x-DPU9OdYH.js} +1 -1
- package/package.json +17 -17
- package/dist/chevron-down-J5nS1Tu0.js +0 -11
- package/dist/chevron-right-DeMVrnIg.js +0 -19
- package/dist/components/Skeleton/Skeleton.js +0 -42
- package/dist/index-BVRIAMfe.js +0 -36
- package/dist/index-BfXxHr_2.js +0 -125
- package/dist/index-Bn4c-gww.js +0 -131
- package/dist/index-Cvx4lqTq.js +0 -47
- package/dist/index-DQH6odE9.js +0 -82
- package/dist/index-DdXGVVBv.js +0 -15
- package/dist/index-amYX3uxF.js +0 -436
- package/dist/index-sp5ZfG6g.js +0 -31
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { cn as m } from "../../../../utils/index.js";
|
|
3
|
+
import { useTableContext as s } from "../../contexts/table.hook.js";
|
|
4
|
+
const p = ({
|
|
5
|
+
children: o,
|
|
6
|
+
classNameWrapperTable: r,
|
|
7
|
+
isLoading: e,
|
|
8
|
+
showPagination: t
|
|
9
|
+
}) => {
|
|
10
|
+
const { tableFetching: d } = s();
|
|
11
|
+
return /* @__PURE__ */ n(
|
|
12
|
+
"div",
|
|
13
|
+
{
|
|
14
|
+
className: m(
|
|
15
|
+
"shadow rounded-t-lg",
|
|
16
|
+
{
|
|
17
|
+
"overflow-hidden rounded-lg": !t || d || e
|
|
18
|
+
},
|
|
19
|
+
r
|
|
20
|
+
),
|
|
21
|
+
children: o
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
};
|
|
25
|
+
export {
|
|
26
|
+
p as WrapperBody
|
|
27
|
+
};
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { Actions as e } from "./Actions/Actions.js";
|
|
2
|
-
import { Body as
|
|
3
|
-
import { Filter as
|
|
2
|
+
import { Body as p } from "./Body/Body.js";
|
|
3
|
+
import { Filter as f } from "./Filter/Filter.js";
|
|
4
4
|
import { Header as a } from "./Header/Header.js";
|
|
5
5
|
import { Pagination as n } from "./Pagination/Pagination.js";
|
|
6
|
-
import { TruncateText as
|
|
6
|
+
import { TruncateText as c } from "./TruncateText/TruncateText.js";
|
|
7
|
+
import { WrapperBody as B } from "./WrapperBody/WrapperBody.js";
|
|
7
8
|
export {
|
|
8
9
|
e as Actions,
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
p as Body,
|
|
11
|
+
f as Filter,
|
|
11
12
|
a as Header,
|
|
12
13
|
n as Pagination,
|
|
13
|
-
|
|
14
|
+
c as TruncateText,
|
|
15
|
+
B as WrapperBody
|
|
14
16
|
};
|
|
@@ -1,84 +1,85 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useQuery as
|
|
3
|
-
import { u as
|
|
4
|
-
import { useState as
|
|
5
|
-
import { TableContext as
|
|
6
|
-
import { DEFAULT_PAGE_SIZE as
|
|
7
|
-
const
|
|
8
|
-
children:
|
|
1
|
+
import { jsx as k } from "react/jsx-runtime";
|
|
2
|
+
import { useQuery as A } from "@tanstack/react-query";
|
|
3
|
+
import { u as D, g as Q, a as $ } from "../../../index-CSWGJT-v.js";
|
|
4
|
+
import { useState as t, useMemo as G, useCallback as c } from "react";
|
|
5
|
+
import { TableContext as U } from "./table.context.js";
|
|
6
|
+
import { DEFAULT_PAGE_SIZE as W } from "../constants/pagination.js";
|
|
7
|
+
const X = ({
|
|
8
|
+
children: p,
|
|
9
9
|
id: r,
|
|
10
10
|
data: g = [],
|
|
11
|
-
columns:
|
|
11
|
+
columns: S = [],
|
|
12
12
|
totalItems: y,
|
|
13
13
|
isPaginationEnabled: b,
|
|
14
14
|
queryOptions: M = {},
|
|
15
15
|
fetchData: m
|
|
16
16
|
}) => {
|
|
17
|
-
const [f,
|
|
17
|
+
const [f, d] = t([]), [C, P] = t(!0), [i, h] = t(0), [a, w] = t(), [s, F] = t(W), [l, O] = t(y), T = G(
|
|
18
18
|
() => Math.ceil(l / s),
|
|
19
19
|
[l, s]
|
|
20
|
-
), [
|
|
20
|
+
), [n, L] = t({}), I = () => {
|
|
21
21
|
const e = typeof r == "string" || typeof r == "number" ? [r] : r;
|
|
22
|
-
return b && e.push(i, s),
|
|
23
|
-
e.push(`${
|
|
22
|
+
return b && e.push(i, s), a && e.push(a), Object.entries(n).forEach(([o, u]) => {
|
|
23
|
+
e.push(`${o}:${u.join(",")}`);
|
|
24
24
|
}), e;
|
|
25
|
-
}, { data: R, isLoading: j, isFetching: x } =
|
|
26
|
-
queryKey:
|
|
25
|
+
}, { data: R, isLoading: j, isFetching: x } = A({
|
|
26
|
+
queryKey: I(),
|
|
27
27
|
refetchOnMount: !1,
|
|
28
28
|
refetchOnWindowFocus: !1,
|
|
29
29
|
initialData: g,
|
|
30
30
|
queryFn: async () => m ? m({
|
|
31
31
|
page: Math.max(i + 1, 1),
|
|
32
32
|
pageSize: s,
|
|
33
|
-
termOfSearch:
|
|
34
|
-
...Object.keys(
|
|
35
|
-
}).then(({ data: e, totalItemsCount:
|
|
33
|
+
termOfSearch: a,
|
|
34
|
+
...Object.keys(n).length > 0 ? n : {}
|
|
35
|
+
}).then(({ data: e, totalItemsCount: o }) => (P(!1), o && O(o), e)) : g ?? [],
|
|
36
36
|
...M
|
|
37
37
|
}), E = c((e) => {
|
|
38
|
-
|
|
39
|
-
}, []),
|
|
38
|
+
w(e), h(0);
|
|
39
|
+
}, []), K = c((e, o) => {
|
|
40
40
|
const u = e.toLowerCase().replace(/\s+/g, "_");
|
|
41
|
-
|
|
42
|
-
...
|
|
43
|
-
[u]:
|
|
41
|
+
L((_) => ({
|
|
42
|
+
..._,
|
|
43
|
+
[u]: o
|
|
44
44
|
}));
|
|
45
|
-
}, []),
|
|
46
|
-
(e) =>
|
|
45
|
+
}, []), q = c((e) => h(e), []), v = c(
|
|
46
|
+
(e) => F(e),
|
|
47
47
|
[]
|
|
48
|
-
),
|
|
48
|
+
), z = D({
|
|
49
49
|
data: R,
|
|
50
|
-
columns:
|
|
50
|
+
columns: S,
|
|
51
51
|
state: {
|
|
52
52
|
sorting: f
|
|
53
53
|
},
|
|
54
|
-
onSortingChange:
|
|
55
|
-
getCoreRowModel:
|
|
56
|
-
getSortedRowModel:
|
|
54
|
+
onSortingChange: d,
|
|
55
|
+
getCoreRowModel: $(),
|
|
56
|
+
getSortedRowModel: Q()
|
|
57
57
|
});
|
|
58
|
-
return /* @__PURE__ */
|
|
59
|
-
|
|
58
|
+
return /* @__PURE__ */ k(
|
|
59
|
+
U.Provider,
|
|
60
60
|
{
|
|
61
61
|
value: {
|
|
62
62
|
sortedData: f,
|
|
63
|
-
table:
|
|
63
|
+
table: z,
|
|
64
64
|
tableFetching: x,
|
|
65
65
|
tableLoading: j,
|
|
66
66
|
totalItems: l,
|
|
67
|
-
termOfSearch:
|
|
67
|
+
termOfSearch: a,
|
|
68
68
|
page: i,
|
|
69
|
-
multiselectSelected:
|
|
69
|
+
multiselectSelected: n,
|
|
70
70
|
pageSize: s,
|
|
71
|
-
totalPages:
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
totalPages: T,
|
|
72
|
+
isFirstLoad: C,
|
|
73
|
+
handlePage: q,
|
|
74
|
+
onPageSize: v,
|
|
74
75
|
onChangeTermOfSearch: E,
|
|
75
|
-
onSorting:
|
|
76
|
-
onSelectMultiselect:
|
|
76
|
+
onSorting: d,
|
|
77
|
+
onSelectMultiselect: K
|
|
77
78
|
},
|
|
78
|
-
children:
|
|
79
|
+
children: p
|
|
79
80
|
}
|
|
80
81
|
);
|
|
81
82
|
};
|
|
82
83
|
export {
|
|
83
|
-
|
|
84
|
+
X as TableProvider
|
|
84
85
|
};
|
package/dist/components/index.js
CHANGED
|
@@ -13,7 +13,7 @@ import { DropdownButton as N } from "./DropdownButton/DropdownButton.js";
|
|
|
13
13
|
import { Filter as h } from "./Filter/Filter.js";
|
|
14
14
|
import { Input as A } from "./Input/Input.js";
|
|
15
15
|
import { Loading as k } from "./Loading/Loading.js";
|
|
16
|
-
import { M as G } from "../Modal-
|
|
16
|
+
import { M as G } from "../Modal-Dpk-1N9W.js";
|
|
17
17
|
import { NumberInput as M } from "./NumberInput/NumberInput.js";
|
|
18
18
|
import { PieChart as I } from "./PieChart/PieChart.js";
|
|
19
19
|
import { ProgressBar as O } from "./ProgressBar/ProgressBar.js";
|
|
@@ -2,7 +2,6 @@ import { jsx as v } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as h, useEffect as g } from "react";
|
|
3
3
|
import { isClient as l } from "../utils/index.js";
|
|
4
4
|
import { ThemeContext as C } from "./theme.context.js";
|
|
5
|
-
/*! js-cookie v3.0.5 | MIT */
|
|
6
5
|
function p(r) {
|
|
7
6
|
for (var o = 1; o < arguments.length; o++) {
|
|
8
7
|
var t = arguments[o];
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
import { forwardRef as l, createElement as n } from "react";
|
|
2
|
-
/**
|
|
3
|
-
* @license lucide-react v0.548.0 - ISC
|
|
4
|
-
*
|
|
5
|
-
* This source code is licensed under the ISC license.
|
|
6
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
-
*/
|
|
8
2
|
const w = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), h = (t) => t.replace(
|
|
9
3
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
10
4
|
(e, r, o) => o ? o.toUpperCase() : r.toLowerCase()
|
|
@@ -16,12 +10,6 @@ const w = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), h = (t)
|
|
|
16
10
|
if (e.startsWith("aria-") || e === "role" || e === "title")
|
|
17
11
|
return !0;
|
|
18
12
|
};
|
|
19
|
-
/**
|
|
20
|
-
* @license lucide-react v0.548.0 - ISC
|
|
21
|
-
*
|
|
22
|
-
* This source code is licensed under the ISC license.
|
|
23
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
24
|
-
*/
|
|
25
13
|
var g = {
|
|
26
14
|
xmlns: "http://www.w3.org/2000/svg",
|
|
27
15
|
width: 24,
|
|
@@ -33,12 +21,6 @@ var g = {
|
|
|
33
21
|
strokeLinecap: "round",
|
|
34
22
|
strokeLinejoin: "round"
|
|
35
23
|
};
|
|
36
|
-
/**
|
|
37
|
-
* @license lucide-react v0.548.0 - ISC
|
|
38
|
-
*
|
|
39
|
-
* This source code is licensed under the ISC license.
|
|
40
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/
|
|
42
24
|
const A = l(
|
|
43
25
|
({
|
|
44
26
|
color: t = "currentColor",
|
|
@@ -68,12 +50,6 @@ const A = l(
|
|
|
68
50
|
]
|
|
69
51
|
)
|
|
70
52
|
);
|
|
71
|
-
/**
|
|
72
|
-
* @license lucide-react v0.548.0 - ISC
|
|
73
|
-
*
|
|
74
|
-
* This source code is licensed under the ISC license.
|
|
75
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
-
*/
|
|
77
53
|
const k = (t, e) => {
|
|
78
54
|
const r = l(
|
|
79
55
|
({ className: o, ...s }, a) => n(A, {
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
import { c } from "./createLucideIcon-
|
|
2
|
-
/**
|
|
3
|
-
* @license lucide-react v0.548.0 - ISC
|
|
4
|
-
*
|
|
5
|
-
* This source code is licensed under the ISC license.
|
|
6
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
-
*/
|
|
1
|
+
import { c } from "./createLucideIcon-D4r5Phnh.js";
|
|
8
2
|
const e = [
|
|
9
3
|
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
|
|
10
4
|
["circle", { cx: "12", cy: "5", r: "1", key: "gxeob9" }],
|
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
import { g as ge } from "./_commonjsHelpers-DaMA6jEr.js";
|
|
2
2
|
var V = { exports: {} }, N = { exports: {} }, T = {};
|
|
3
|
-
/** @license React v16.13.1
|
|
4
|
-
* react-is.production.min.js
|
|
5
|
-
*
|
|
6
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
7
|
-
*
|
|
8
|
-
* This source code is licensed under the MIT license found in the
|
|
9
|
-
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/
|
|
11
3
|
var ue;
|
|
12
4
|
function Se() {
|
|
13
5
|
if (ue) return T;
|
|
@@ -75,14 +67,6 @@ function Se() {
|
|
|
75
67
|
}, T.typeOf = I, T;
|
|
76
68
|
}
|
|
77
69
|
var m = {};
|
|
78
|
-
/** @license React v16.13.1
|
|
79
|
-
* react-is.development.js
|
|
80
|
-
*
|
|
81
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
82
|
-
*
|
|
83
|
-
* This source code is licensed under the MIT license found in the
|
|
84
|
-
* LICENSE file in the root directory of this source tree.
|
|
85
|
-
*/
|
|
86
70
|
var fe;
|
|
87
71
|
function Pe() {
|
|
88
72
|
return fe || (fe = 1, process.env.NODE_ENV !== "production" && function() {
|
|
@@ -170,11 +154,6 @@ var le;
|
|
|
170
154
|
function he() {
|
|
171
155
|
return le || (le = 1, process.env.NODE_ENV === "production" ? N.exports = /* @__PURE__ */ Se() : N.exports = /* @__PURE__ */ Pe()), N.exports;
|
|
172
156
|
}
|
|
173
|
-
/*
|
|
174
|
-
object-assign
|
|
175
|
-
(c) Sindre Sorhus
|
|
176
|
-
@license MIT
|
|
177
|
-
*/
|
|
178
157
|
var re, pe;
|
|
179
158
|
function Oe() {
|
|
180
159
|
if (pe) return re;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
import { c as S } from "./index-DLcqcWxM.js";
|
|
3
|
+
import { jsx as y } from "react/jsx-runtime";
|
|
4
|
+
var E = Symbol.for("react.lazy"), p = e[" use ".trim().toString()];
|
|
5
|
+
function g(r) {
|
|
6
|
+
return typeof r == "object" && r !== null && "then" in r;
|
|
7
|
+
}
|
|
8
|
+
function d(r) {
|
|
9
|
+
return r != null && typeof r == "object" && "$$typeof" in r && r.$$typeof === E && "_payload" in r && g(r._payload);
|
|
10
|
+
}
|
|
11
|
+
// @__NO_SIDE_EFFECTS__
|
|
12
|
+
function C(r) {
|
|
13
|
+
const n = /* @__PURE__ */ _(r), o = e.forwardRef((i, t) => {
|
|
14
|
+
let { children: l, ...a } = i;
|
|
15
|
+
d(l) && typeof p == "function" && (l = p(l._payload));
|
|
16
|
+
const s = e.Children.toArray(l), f = s.find(b);
|
|
17
|
+
if (f) {
|
|
18
|
+
const c = f.props.children, m = s.map((u) => u === f ? e.Children.count(c) > 1 ? e.Children.only(null) : e.isValidElement(c) ? c.props.children : null : u);
|
|
19
|
+
return /* @__PURE__ */ y(n, { ...a, ref: t, children: e.isValidElement(c) ? e.cloneElement(c, void 0, m) : null });
|
|
20
|
+
}
|
|
21
|
+
return /* @__PURE__ */ y(n, { ...a, ref: t, children: l });
|
|
22
|
+
});
|
|
23
|
+
return o.displayName = `${r}.Slot`, o;
|
|
24
|
+
}
|
|
25
|
+
var V = /* @__PURE__ */ C("Slot");
|
|
26
|
+
// @__NO_SIDE_EFFECTS__
|
|
27
|
+
function _(r) {
|
|
28
|
+
const n = e.forwardRef((o, i) => {
|
|
29
|
+
let { children: t, ...l } = o;
|
|
30
|
+
if (d(t) && typeof p == "function" && (t = p(t._payload)), e.isValidElement(t)) {
|
|
31
|
+
const a = P(t), s = h(l, t.props);
|
|
32
|
+
return t.type !== e.Fragment && (s.ref = i ? S(i, a) : a), e.cloneElement(t, s);
|
|
33
|
+
}
|
|
34
|
+
return e.Children.count(t) > 1 ? e.Children.only(null) : null;
|
|
35
|
+
});
|
|
36
|
+
return n.displayName = `${r}.SlotClone`, n;
|
|
37
|
+
}
|
|
38
|
+
var R = Symbol("radix.slottable");
|
|
39
|
+
function b(r) {
|
|
40
|
+
return e.isValidElement(r) && typeof r.type == "function" && "__radixId" in r.type && r.type.__radixId === R;
|
|
41
|
+
}
|
|
42
|
+
function h(r, n) {
|
|
43
|
+
const o = { ...n };
|
|
44
|
+
for (const i in n) {
|
|
45
|
+
const t = r[i], l = n[i];
|
|
46
|
+
/^on[A-Z]/.test(i) ? t && l ? o[i] = (...s) => {
|
|
47
|
+
const f = l(...s);
|
|
48
|
+
return t(...s), f;
|
|
49
|
+
} : t && (o[i] = t) : i === "style" ? o[i] = { ...t, ...l } : i === "className" && (o[i] = [t, l].filter(Boolean).join(" "));
|
|
50
|
+
}
|
|
51
|
+
return { ...r, ...o };
|
|
52
|
+
}
|
|
53
|
+
function P(r) {
|
|
54
|
+
let n = Object.getOwnPropertyDescriptor(r.props, "ref")?.get, o = n && "isReactWarning" in n && n.isReactWarning;
|
|
55
|
+
return o ? r.ref : (n = Object.getOwnPropertyDescriptor(r, "ref")?.get, o = n && "isReactWarning" in n && n.isReactWarning, o ? r.props.ref : r.props.ref || r.ref);
|
|
56
|
+
}
|
|
57
|
+
export {
|
|
58
|
+
V as S,
|
|
59
|
+
C as c
|
|
60
|
+
};
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import * as r from "react";
|
|
2
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
3
|
+
import * as y from "react-dom";
|
|
4
|
+
import { c as E } from "./index-DLcqcWxM.js";
|
|
5
|
+
function M(e, t) {
|
|
6
|
+
const n = r.createContext(t), s = (i) => {
|
|
7
|
+
const { children: u, ...c } = i, l = r.useMemo(() => c, Object.values(c));
|
|
8
|
+
return /* @__PURE__ */ m(n.Provider, { value: l, children: u });
|
|
9
|
+
};
|
|
10
|
+
s.displayName = e + "Provider";
|
|
11
|
+
function o(i) {
|
|
12
|
+
const u = r.useContext(n);
|
|
13
|
+
if (u) return u;
|
|
14
|
+
if (t !== void 0) return t;
|
|
15
|
+
throw new Error(`\`${i}\` must be used within \`${e}\``);
|
|
16
|
+
}
|
|
17
|
+
return [s, o];
|
|
18
|
+
}
|
|
19
|
+
function W(e, t = []) {
|
|
20
|
+
let n = [];
|
|
21
|
+
function s(i, u) {
|
|
22
|
+
const c = r.createContext(u), l = n.length;
|
|
23
|
+
n = [...n, u];
|
|
24
|
+
const f = (a) => {
|
|
25
|
+
const { scope: v, children: C, ...p } = a, h = v?.[e]?.[l] || c, S = r.useMemo(() => p, Object.values(p));
|
|
26
|
+
return /* @__PURE__ */ m(h.Provider, { value: S, children: C });
|
|
27
|
+
};
|
|
28
|
+
f.displayName = i + "Provider";
|
|
29
|
+
function d(a, v) {
|
|
30
|
+
const C = v?.[e]?.[l] || c, p = r.useContext(C);
|
|
31
|
+
if (p) return p;
|
|
32
|
+
if (u !== void 0) return u;
|
|
33
|
+
throw new Error(`\`${a}\` must be used within \`${i}\``);
|
|
34
|
+
}
|
|
35
|
+
return [f, d];
|
|
36
|
+
}
|
|
37
|
+
const o = () => {
|
|
38
|
+
const i = n.map((u) => r.createContext(u));
|
|
39
|
+
return function(c) {
|
|
40
|
+
const l = c?.[e] || i;
|
|
41
|
+
return r.useMemo(
|
|
42
|
+
() => ({ [`__scope${e}`]: { ...c, [e]: l } }),
|
|
43
|
+
[c, l]
|
|
44
|
+
);
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
return o.scopeName = e, [s, x(o, ...t)];
|
|
48
|
+
}
|
|
49
|
+
function x(...e) {
|
|
50
|
+
const t = e[0];
|
|
51
|
+
if (e.length === 1) return t;
|
|
52
|
+
const n = () => {
|
|
53
|
+
const s = e.map((o) => ({
|
|
54
|
+
useScope: o(),
|
|
55
|
+
scopeName: o.scopeName
|
|
56
|
+
}));
|
|
57
|
+
return function(i) {
|
|
58
|
+
const u = s.reduce((c, { useScope: l, scopeName: f }) => {
|
|
59
|
+
const a = l(i)[`__scope${f}`];
|
|
60
|
+
return { ...c, ...a };
|
|
61
|
+
}, {});
|
|
62
|
+
return r.useMemo(() => ({ [`__scope${t.scopeName}`]: u }), [u]);
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
return n.scopeName = t.scopeName, n;
|
|
66
|
+
}
|
|
67
|
+
function A(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
68
|
+
return function(o) {
|
|
69
|
+
if (e?.(o), n === !1 || !o.defaultPrevented)
|
|
70
|
+
return t?.(o);
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
var P = globalThis?.document ? r.useLayoutEffect : () => {
|
|
74
|
+
}, b = r[" useInsertionEffect ".trim().toString()] || P;
|
|
75
|
+
function H({
|
|
76
|
+
prop: e,
|
|
77
|
+
defaultProp: t,
|
|
78
|
+
onChange: n = () => {
|
|
79
|
+
},
|
|
80
|
+
caller: s
|
|
81
|
+
}) {
|
|
82
|
+
const [o, i, u] = g({
|
|
83
|
+
defaultProp: t,
|
|
84
|
+
onChange: n
|
|
85
|
+
}), c = e !== void 0, l = c ? e : o;
|
|
86
|
+
{
|
|
87
|
+
const d = r.useRef(e !== void 0);
|
|
88
|
+
r.useEffect(() => {
|
|
89
|
+
const a = d.current;
|
|
90
|
+
a !== c && console.warn(
|
|
91
|
+
`${s} is changing from ${a ? "controlled" : "uncontrolled"} to ${c ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
|
|
92
|
+
), d.current = c;
|
|
93
|
+
}, [c, s]);
|
|
94
|
+
}
|
|
95
|
+
const f = r.useCallback(
|
|
96
|
+
(d) => {
|
|
97
|
+
if (c) {
|
|
98
|
+
const a = w(d) ? d(e) : d;
|
|
99
|
+
a !== e && u.current?.(a);
|
|
100
|
+
} else
|
|
101
|
+
i(d);
|
|
102
|
+
},
|
|
103
|
+
[c, e, i, u]
|
|
104
|
+
);
|
|
105
|
+
return [l, f];
|
|
106
|
+
}
|
|
107
|
+
function g({
|
|
108
|
+
defaultProp: e,
|
|
109
|
+
onChange: t
|
|
110
|
+
}) {
|
|
111
|
+
const [n, s] = r.useState(e), o = r.useRef(n), i = r.useRef(t);
|
|
112
|
+
return b(() => {
|
|
113
|
+
i.current = t;
|
|
114
|
+
}, [t]), r.useEffect(() => {
|
|
115
|
+
o.current !== n && (i.current?.(n), o.current = n);
|
|
116
|
+
}, [n, o]), [n, s, i];
|
|
117
|
+
}
|
|
118
|
+
function w(e) {
|
|
119
|
+
return typeof e == "function";
|
|
120
|
+
}
|
|
121
|
+
// @__NO_SIDE_EFFECTS__
|
|
122
|
+
function R(e) {
|
|
123
|
+
const t = /* @__PURE__ */ $(e), n = r.forwardRef((s, o) => {
|
|
124
|
+
const { children: i, ...u } = s, c = r.Children.toArray(i), l = c.find(O);
|
|
125
|
+
if (l) {
|
|
126
|
+
const f = l.props.children, d = c.map((a) => a === l ? r.Children.count(f) > 1 ? r.Children.only(null) : r.isValidElement(f) ? f.props.children : null : a);
|
|
127
|
+
return /* @__PURE__ */ m(t, { ...u, ref: o, children: r.isValidElement(f) ? r.cloneElement(f, void 0, d) : null });
|
|
128
|
+
}
|
|
129
|
+
return /* @__PURE__ */ m(t, { ...u, ref: o, children: i });
|
|
130
|
+
});
|
|
131
|
+
return n.displayName = `${e}.Slot`, n;
|
|
132
|
+
}
|
|
133
|
+
// @__NO_SIDE_EFFECTS__
|
|
134
|
+
function $(e) {
|
|
135
|
+
const t = r.forwardRef((n, s) => {
|
|
136
|
+
const { children: o, ...i } = n;
|
|
137
|
+
if (r.isValidElement(o)) {
|
|
138
|
+
const u = D(o), c = N(i, o.props);
|
|
139
|
+
return o.type !== r.Fragment && (c.ref = s ? E(s, u) : u), r.cloneElement(o, c);
|
|
140
|
+
}
|
|
141
|
+
return r.Children.count(o) > 1 ? r.Children.only(null) : null;
|
|
142
|
+
});
|
|
143
|
+
return t.displayName = `${e}.SlotClone`, t;
|
|
144
|
+
}
|
|
145
|
+
var _ = Symbol("radix.slottable");
|
|
146
|
+
function O(e) {
|
|
147
|
+
return r.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === _;
|
|
148
|
+
}
|
|
149
|
+
function N(e, t) {
|
|
150
|
+
const n = { ...t };
|
|
151
|
+
for (const s in t) {
|
|
152
|
+
const o = e[s], i = t[s];
|
|
153
|
+
/^on[A-Z]/.test(s) ? o && i ? n[s] = (...c) => {
|
|
154
|
+
const l = i(...c);
|
|
155
|
+
return o(...c), l;
|
|
156
|
+
} : o && (n[s] = o) : s === "style" ? n[s] = { ...o, ...i } : s === "className" && (n[s] = [o, i].filter(Boolean).join(" "));
|
|
157
|
+
}
|
|
158
|
+
return { ...e, ...n };
|
|
159
|
+
}
|
|
160
|
+
function D(e) {
|
|
161
|
+
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
162
|
+
return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
163
|
+
}
|
|
164
|
+
var I = [
|
|
165
|
+
"a",
|
|
166
|
+
"button",
|
|
167
|
+
"div",
|
|
168
|
+
"form",
|
|
169
|
+
"h2",
|
|
170
|
+
"h3",
|
|
171
|
+
"img",
|
|
172
|
+
"input",
|
|
173
|
+
"label",
|
|
174
|
+
"li",
|
|
175
|
+
"nav",
|
|
176
|
+
"ol",
|
|
177
|
+
"p",
|
|
178
|
+
"select",
|
|
179
|
+
"span",
|
|
180
|
+
"svg",
|
|
181
|
+
"ul"
|
|
182
|
+
], L = I.reduce((e, t) => {
|
|
183
|
+
const n = /* @__PURE__ */ R(`Primitive.${t}`), s = r.forwardRef((o, i) => {
|
|
184
|
+
const { asChild: u, ...c } = o, l = u ? n : t;
|
|
185
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ m(l, { ...c, ref: i });
|
|
186
|
+
});
|
|
187
|
+
return s.displayName = `Primitive.${t}`, { ...e, [t]: s };
|
|
188
|
+
}, {});
|
|
189
|
+
function T(e, t) {
|
|
190
|
+
e && y.flushSync(() => e.dispatchEvent(t));
|
|
191
|
+
}
|
|
192
|
+
export {
|
|
193
|
+
L as P,
|
|
194
|
+
H as a,
|
|
195
|
+
A as b,
|
|
196
|
+
W as c,
|
|
197
|
+
T as d,
|
|
198
|
+
M as e,
|
|
199
|
+
P as u
|
|
200
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as o from "react";
|
|
2
|
+
import m from "react-dom";
|
|
3
|
+
import { u as c, P as f } from "./index-CIAmiWcw.js";
|
|
4
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
5
|
+
var u = "Portal", p = o.forwardRef((r, a) => {
|
|
6
|
+
const { container: e, ...s } = r, [n, i] = o.useState(!1);
|
|
7
|
+
c(() => i(!0), []);
|
|
8
|
+
const t = e || n && globalThis?.document?.body;
|
|
9
|
+
return t ? m.createPortal(/* @__PURE__ */ l(f.div, { ...s, ref: a }), t) : null;
|
|
10
|
+
});
|
|
11
|
+
p.displayName = u;
|
|
12
|
+
export {
|
|
13
|
+
p as P
|
|
14
|
+
};
|
|
@@ -1,14 +1,4 @@
|
|
|
1
1
|
import * as j from "react";
|
|
2
|
-
/**
|
|
3
|
-
* table-core
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) TanStack
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
9
|
-
*
|
|
10
|
-
* @license MIT
|
|
11
|
-
*/
|
|
12
2
|
function I(e, o) {
|
|
13
3
|
return typeof e == "function" ? e(o) : e;
|
|
14
4
|
}
|
|
@@ -1683,16 +1673,6 @@ function it() {
|
|
|
1683
1673
|
};
|
|
1684
1674
|
}, C(e.options, "debugTable", "getSortedRowModel", () => e._autoResetPageIndex()));
|
|
1685
1675
|
}
|
|
1686
|
-
/**
|
|
1687
|
-
* react-table
|
|
1688
|
-
*
|
|
1689
|
-
* Copyright (c) TanStack
|
|
1690
|
-
*
|
|
1691
|
-
* This source code is licensed under the MIT license found in the
|
|
1692
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
1693
|
-
*
|
|
1694
|
-
* @license MIT
|
|
1695
|
-
*/
|
|
1696
1676
|
function lt(e, o) {
|
|
1697
1677
|
return e ? tt(e) ? /* @__PURE__ */ j.createElement(e, o) : e : null;
|
|
1698
1678
|
}
|