@konstructio/ui 0.1.2-alpha.5 → 0.1.2-alpha.51
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/{Combination-VYaRRJBZ.js → Combination-BtmnusWq.js} +141 -138
- package/dist/DatePicker.css +1 -1
- package/dist/Modal-CjC-CIJ8.js +99 -0
- package/dist/assets/icons/index.js +7 -0
- package/dist/chevron-down-DgT-uSF9.js +5 -0
- package/dist/chevron-right-DYvXLeql.js +7 -0
- package/dist/chevron-up-DEfvgPCw.js +54 -0
- package/dist/chevron-up-DrQr2Fwd.js +5 -0
- package/dist/components/Alert/Alert.js +2 -2
- package/dist/components/AlertDialog/AlertDialog.js +81 -53
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +3 -2
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/Badge/Badge.js +41 -44
- package/dist/components/Badge/Badge.variants.js +52 -13
- package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.variants.js +3 -3
- package/dist/components/Breadcrumb/components/Item/Item.js +22 -22
- package/dist/components/Breadcrumb/components/Item/Item.variants.js +25 -14
- package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +1 -1
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Button/Button.variants.js +108 -98
- package/dist/components/Card/Card.variants.js +7 -12
- package/dist/components/Checkbox/Checkbox.js +108 -105
- package/dist/components/Checkbox/Checkbox.variants.js +34 -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/Counter/Counter.js +210 -0
- package/dist/components/Counter/Counter.variants.js +70 -0
- package/dist/components/Datepicker/DatePicker.js +1587 -1353
- package/dist/components/Divider/Divider.variants.js +1 -1
- package/dist/components/DropdownButton/DropdownButton.js +1 -1
- package/dist/components/Filter/Filter.js +1 -1
- package/dist/components/Filter/Filter.variants.js +8 -7
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +71 -45
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.js +2 -2
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +76 -43
- package/dist/components/Filter/components/ResetButton/ResetButton.js +15 -12
- package/dist/components/Filter/events/index.js +3 -3
- package/dist/components/ImageUpload/ImageUpload.js +221 -0
- package/dist/components/ImageUpload/ImageUpload.variants.js +109 -0
- package/dist/components/Input/Input.js +185 -118
- package/dist/components/Input/Input.variants.js +24 -19
- package/dist/components/Loading/Loading.js +1 -7
- package/dist/components/Modal/Modal.js +2 -2
- 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 +4 -4
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.js +34 -0
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.variants.js +30 -0
- package/dist/components/MultiSelectDropdown/components/Item/Item.js +30 -0
- package/dist/components/MultiSelectDropdown/components/Item/Item.variants.js +38 -0
- package/dist/components/MultiSelectDropdown/components/List/List.js +30 -0
- package/dist/components/MultiSelectDropdown/components/List/List.variants.js +25 -0
- package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.js +119 -0
- package/dist/components/MultiSelectDropdown/components/index.js +8 -0
- package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.context.js +21 -0
- package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.hook.js +13 -0
- package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.provider.js +138 -0
- package/dist/components/MultiSelectDropdown/contexts/index.js +6 -0
- package/dist/components/MultiSelectDropdown/hooks/useMultiSelectDropdown.js +32 -0
- package/dist/components/PhoneNumberInput/PhoneNumberInput.js +8 -0
- package/dist/components/PhoneNumberInput/PhoneNumberInput.variants.js +46 -0
- package/dist/components/PhoneNumberInput/components/FlagContent/FlagContent.js +36 -0
- package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +690 -0
- package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +60 -0
- package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +45 -0
- package/dist/components/PhoneNumberInput/components/Wrapper.js +651 -0
- package/dist/components/PhoneNumberInput/components/index.js +6 -0
- package/dist/components/PhoneNumberInput/contexts/index.js +8 -0
- package/dist/components/PhoneNumberInput/contexts/phone-number.context.js +28 -0
- package/dist/components/PhoneNumberInput/contexts/phone-number.hook.js +13 -0
- package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +6144 -0
- package/dist/components/PhoneNumberInput/utils/index.js +11 -0
- package/dist/components/PieChart/PieChart.js +463 -482
- package/dist/components/Radio/Radio.js +47 -44
- package/dist/components/Radio/Radio.variants.js +12 -8
- package/dist/components/RadioCard/RadioCard.variants.js +1 -6
- package/dist/components/RadioGroup/RadioGroup.js +10 -10
- package/dist/components/Range/Range.js +1 -1
- package/dist/components/Select/Select.js +48 -0
- package/dist/components/{Dropdown/Dropdown.variants.js → Select/Select.variants.js} +17 -11
- package/dist/components/Select/components/List/List.js +172 -0
- package/dist/components/{Dropdown → Select}/components/List/List.variants.js +11 -8
- package/dist/components/Select/components/ListItem/ListItem.js +117 -0
- package/dist/components/{Dropdown → Select}/components/ListItem/ListItem.variants.js +5 -4
- package/dist/components/Select/components/Wrapper.js +226 -0
- package/dist/components/Select/constants/index.js +4 -0
- package/dist/components/Select/constants/pagination.js +4 -0
- package/dist/components/Select/contexts/index.js +6 -0
- package/dist/components/Select/contexts/select.context.js +36 -0
- package/dist/components/Select/contexts/select.hook.js +11 -0
- package/dist/components/Select/contexts/select.provider.js +58 -0
- package/dist/components/Select/hooks/useNavigationList.js +50 -0
- package/dist/components/Select/hooks/useSelect.js +103 -0
- package/dist/components/Sidebar/Sidebar.variants.js +2 -2
- package/dist/components/Slider/Slider.js +1 -1
- package/dist/components/Switch/Switch.js +156 -129
- package/dist/components/Switch/Switch.variants.js +19 -10
- package/dist/components/Tabs/Tabs.js +1 -1
- package/dist/components/Tabs/Tabs.variants.js +4 -3
- 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/Tag/Tag.variants.js +1 -0
- package/dist/components/TagSelect/components/Wrapper/Wrapper.js +49 -98
- package/dist/components/TimePicker/TimePicker.js +1 -1
- package/dist/components/TimePicker/TimePicker.variants.js +26 -14
- package/dist/components/TimePicker/components/MeridianList/MeridianList.js +30 -20
- package/dist/components/TimePicker/components/Wrapper/Wrapper.js +57 -35
- package/dist/components/TimePicker/components/WrapperList/WrapperList.js +53 -45
- package/dist/components/Toast/Toast.js +283 -256
- package/dist/components/Toast/Toast.variants.js +37 -24
- package/dist/components/Tooltip/Tooltip.js +15 -14
- package/dist/components/Tooltip/Tooltip.variants.js +5 -4
- package/dist/components/Typography/Typography.js +23 -25
- package/dist/components/Typography/Typography.variants.js +55 -52
- package/dist/components/VirtualizedTable/VirtualizedTable.js +97 -71
- package/dist/components/VirtualizedTable/components/Actions/Actions.js +95 -33
- package/dist/components/VirtualizedTable/components/Body/Body.js +73 -21
- package/dist/components/VirtualizedTable/components/DotPaginate/DotPaginate.js +94 -91
- package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +20 -20
- package/dist/components/VirtualizedTable/components/Filter/Filter.js +61 -44
- package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +33 -21
- package/dist/components/VirtualizedTable/components/Header/Header.js +61 -41
- package/dist/components/VirtualizedTable/components/Pagination/Pagination.js +43 -22
- package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +106 -0
- package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +22 -1858
- 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 +68 -761
- package/dist/components/index.js +94 -86
- package/dist/contexts/theme.provider.js +0 -1
- package/dist/{createLucideIcon-D2CN7Ma9.js → createLucideIcon-D4r5Phnh.js} +0 -24
- package/dist/ellipsis-vertical-BVPtjl5f.js +9 -0
- package/dist/{index-C1g_chDT.js → index-AV6ZtGhy.js} +2 -2
- package/dist/index-BG8O18ZY.js +93 -0
- package/dist/index-BKjcReYh.js +55 -0
- package/dist/{index-N2OStZoU.js → index-BOE_3f_Z.js} +4 -25
- package/dist/{index-Cd2vhaop.js → index-BlSRBdPy.js} +5 -6
- package/dist/index-BmVmDQGH.js +662 -0
- package/dist/index-BvoZGpli.js +60 -0
- package/dist/index-Byr10W8m.js +1873 -0
- package/dist/{index-Dx2grAuN.js → index-CSWGJT-v.js} +0 -20
- package/dist/index-CeZcoQDw.js +479 -0
- package/dist/index-D6KzX_ef.js +135 -0
- package/dist/{index-B7t8D14s.js → index-D9SSJ6om.js} +4 -4
- package/dist/index-DKfEnhKr.js +200 -0
- package/dist/index-DLcqcWxM.js +29 -0
- package/dist/{index-ti1b9kqV.js → index-DMb4KD0b.js} +4 -4
- package/dist/{index-BAEWsOG1.js → index-DtEcCIrM.js} +1 -1
- package/dist/{index-bwWKd82e.js → index-Dy59FQl5.js} +1 -1
- package/dist/{index-C84F4YyO.js → index-gSPwC-1I.js} +10 -11
- package/dist/{index-Bnb0ezr3.js → index-vcSp8YRZ.js} +11 -12
- package/dist/index.d.ts +2142 -99
- package/dist/index.js +116 -106
- package/dist/libphonenumber-FTwQ9nyV.js +11549 -0
- package/dist/loader-juvMSJ9L.js +5 -0
- package/dist/package.json +43 -33
- package/dist/styles.css +1 -1
- package/dist/ui/civo-theme.css +194 -168
- package/dist/ui/theme.css +27 -0
- package/dist/{useBreadcrumb-B8DnuqkR.js → useBreadcrumb-BAHbGQ_O.js} +0 -10
- package/dist/utils/index.js +534 -501
- package/dist/x-BXShoIAM.js +8 -0
- package/dist/{x-4F_5p77m.js → x-Eoa9FJjA.js} +1 -1
- package/package.json +43 -33
- package/dist/Modal-D-NOEWMX.js +0 -98
- package/dist/chevron-down-MZvQoT2F.js +0 -11
- package/dist/chevron-right-VYBOBhRt.js +0 -19
- package/dist/components/Dropdown/Dropdown.js +0 -42
- package/dist/components/Dropdown/components/List/List.js +0 -79
- package/dist/components/Dropdown/components/ListItem/ListItem.js +0 -67
- package/dist/components/Dropdown/components/Wrapper.js +0 -205
- package/dist/components/Dropdown/contexts/dropdown.context.js +0 -19
- package/dist/components/Dropdown/contexts/dropdown.hook.js +0 -13
- package/dist/components/Dropdown/contexts/dropdown.provider.js +0 -30
- package/dist/components/Dropdown/contexts/index.js +0 -6
- package/dist/components/Dropdown/hooks/useDropdown.js +0 -58
- package/dist/components/Dropdown/hooks/useNavigationList.js +0 -62
- package/dist/components/NumberInput/NumberInput.js +0 -179
- package/dist/components/NumberInput/NumberInput.variants.js +0 -50
- package/dist/components/TimePicker/components/WrapperList/WrapperList.variants.js +0 -16
- package/dist/index-BITvcJAz.js +0 -423
- package/dist/index-BfXxHr_2.js +0 -125
- package/dist/index-Cvx4lqTq.js +0 -47
- package/dist/index-DBbEcSUG.js +0 -31
- package/dist/index-DQH6odE9.js +0 -82
- package/dist/index-DzIBBMjs.js +0 -436
- package/dist/index-os7vysFS.js +0 -131
- /package/dist/components/{Dropdown → Select}/components/EmptyList.js +0 -0
- /package/dist/components/{Dropdown → Select}/components/index.js +0 -0
|
@@ -1,70 +1,90 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { f as
|
|
3
|
-
import { useCallback as
|
|
4
|
-
import { cn as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { useTableContext as
|
|
1
|
+
import { jsx as r, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import { f as b } from "../../../../index-CSWGJT-v.js";
|
|
3
|
+
import { useCallback as l } from "react";
|
|
4
|
+
import { cn as a } from "../../../../utils/index.js";
|
|
5
|
+
import g from "../../assets/chevron-up.js";
|
|
6
|
+
import u from "../../assets/chevron-down.js";
|
|
7
|
+
import { useTableContext as k } from "../../contexts/table.hook.js";
|
|
8
8
|
const y = ({
|
|
9
|
-
className:
|
|
10
|
-
classNameArrows:
|
|
11
|
-
classNameActiveArrows:
|
|
9
|
+
className: n,
|
|
10
|
+
classNameArrows: i,
|
|
11
|
+
classNameActiveArrows: s
|
|
12
12
|
}) => {
|
|
13
|
-
const { table: c, onSorting:
|
|
14
|
-
(t) =>
|
|
15
|
-
[
|
|
16
|
-
),
|
|
17
|
-
(t) =>
|
|
18
|
-
[
|
|
13
|
+
const { table: c, onSorting: o } = k(), m = l(
|
|
14
|
+
(t) => o([{ id: t.id, desc: !1 }]),
|
|
15
|
+
[o]
|
|
16
|
+
), p = l(
|
|
17
|
+
(t) => o([{ id: t.id, desc: !0 }]),
|
|
18
|
+
[o]
|
|
19
19
|
);
|
|
20
|
-
return /* @__PURE__ */
|
|
20
|
+
return /* @__PURE__ */ r(
|
|
21
21
|
"thead",
|
|
22
22
|
{
|
|
23
|
-
className:
|
|
24
|
-
"font-semibold
|
|
25
|
-
|
|
23
|
+
className: a(
|
|
24
|
+
"font-semibold",
|
|
25
|
+
"uppercase",
|
|
26
|
+
"text-slate-500",
|
|
27
|
+
"text-xs",
|
|
28
|
+
"not-italic",
|
|
29
|
+
"bg-slate-100",
|
|
30
|
+
"overflow-hidden",
|
|
31
|
+
"dark:text-slate-300",
|
|
32
|
+
"dark:bg-metal-800",
|
|
33
|
+
n
|
|
26
34
|
),
|
|
27
|
-
children: c.getHeaderGroups().map(({ id: t, headers: f }) => /* @__PURE__ */
|
|
35
|
+
children: c.getHeaderGroups().map(({ id: t, headers: f }) => /* @__PURE__ */ r("tr", { children: f.map(({ id: x, column: e, getContext: h }) => /* @__PURE__ */ r(
|
|
28
36
|
"th",
|
|
29
37
|
{
|
|
30
38
|
scope: "col",
|
|
31
|
-
className:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
39
|
+
className: a(
|
|
40
|
+
"px-4",
|
|
41
|
+
"py-3",
|
|
42
|
+
"text-left",
|
|
43
|
+
"text-xs",
|
|
44
|
+
"first:rounded-tl-lg",
|
|
45
|
+
"last:rounded-tr-lg",
|
|
46
|
+
"border-transparent",
|
|
47
|
+
"dark:border-t",
|
|
48
|
+
"dark:border-metal-700",
|
|
49
|
+
"dark:first:border-l",
|
|
50
|
+
"dark:last:border-r",
|
|
51
|
+
e.columnDef.meta?.headerClassName
|
|
52
|
+
),
|
|
53
|
+
children: /* @__PURE__ */ d("span", { className: "flex items-center gap-2 w-full", children: [
|
|
54
|
+
b(e.columnDef.header, h()),
|
|
55
|
+
e.getCanSort() && /* @__PURE__ */ d(
|
|
36
56
|
"div",
|
|
37
57
|
{
|
|
38
|
-
className:
|
|
58
|
+
className: a(
|
|
39
59
|
"flex flex-col text-slate-400 justify-center items-center gap-1",
|
|
40
|
-
|
|
60
|
+
i
|
|
41
61
|
),
|
|
42
62
|
role: "presentation",
|
|
43
63
|
children: [
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
|
|
64
|
+
/* @__PURE__ */ r(
|
|
65
|
+
g,
|
|
46
66
|
{
|
|
47
|
-
className:
|
|
67
|
+
className: a(
|
|
48
68
|
"w-2 h-2 cursor-pointer",
|
|
49
69
|
{
|
|
50
|
-
"text-blue-600": e.getIsSorted() === "asc"
|
|
70
|
+
"text-blue-600 dark:text-aurora-500": e.getIsSorted() === "asc"
|
|
51
71
|
},
|
|
52
|
-
|
|
72
|
+
s
|
|
53
73
|
),
|
|
54
|
-
onClick: () =>
|
|
74
|
+
onClick: () => m(e)
|
|
55
75
|
}
|
|
56
76
|
),
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
|
|
77
|
+
/* @__PURE__ */ r(
|
|
78
|
+
u,
|
|
59
79
|
{
|
|
60
|
-
className:
|
|
80
|
+
className: a(
|
|
61
81
|
"w-2 h-2 cursor-pointer",
|
|
62
82
|
{
|
|
63
|
-
"text-blue-600": e.getIsSorted() === "desc"
|
|
83
|
+
"text-blue-600 dark:text-aurora-500": e.getIsSorted() === "desc"
|
|
64
84
|
},
|
|
65
|
-
|
|
85
|
+
s
|
|
66
86
|
),
|
|
67
|
-
onClick: () =>
|
|
87
|
+
onClick: () => p(e)
|
|
68
88
|
}
|
|
69
89
|
)
|
|
70
90
|
]
|
|
@@ -72,7 +92,7 @@ const y = ({
|
|
|
72
92
|
)
|
|
73
93
|
] })
|
|
74
94
|
},
|
|
75
|
-
|
|
95
|
+
x
|
|
76
96
|
)) }, t))
|
|
77
97
|
}
|
|
78
98
|
);
|
|
@@ -1,45 +1,66 @@
|
|
|
1
|
-
import { jsxs as t, Fragment as
|
|
2
|
-
import { DotPaginate as
|
|
3
|
-
import { DropdownPaginate as
|
|
4
|
-
import { FormPaginate as
|
|
5
|
-
import { cn as
|
|
6
|
-
import { useTableContext as
|
|
7
|
-
import { DEFAULT_PAGE_SIZE as
|
|
8
|
-
const
|
|
1
|
+
import { jsxs as t, Fragment as f, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { DotPaginate as p } from "../DotPaginate/DotPaginate.js";
|
|
3
|
+
import { DropdownPaginate as x } from "../DropdownPaginate/DropdownPaginate.js";
|
|
4
|
+
import { FormPaginate as u } from "../FormPaginate/FormPaginate.js";
|
|
5
|
+
import { cn as b } from "../../../../utils/index.js";
|
|
6
|
+
import { useTableContext as g } from "../../contexts/table.hook.js";
|
|
7
|
+
import { DEFAULT_PAGE_SIZE as h } from "../../constants/pagination.js";
|
|
8
|
+
const j = ({
|
|
9
9
|
showTotalItems: a = !0,
|
|
10
10
|
showDropdownPagination: i = !0,
|
|
11
11
|
showDotPagination: n = !0,
|
|
12
|
-
showFormPagination:
|
|
13
|
-
pageSizes:
|
|
14
|
-
classNamePagination:
|
|
12
|
+
showFormPagination: l = !0,
|
|
13
|
+
pageSizes: s,
|
|
14
|
+
classNamePagination: m,
|
|
15
|
+
isLoading: o
|
|
15
16
|
}) => {
|
|
16
|
-
const {
|
|
17
|
-
|
|
17
|
+
const {
|
|
18
|
+
totalItems: r = -1 / 0,
|
|
19
|
+
tableFetching: d,
|
|
20
|
+
isFirstLoad: c
|
|
21
|
+
} = g();
|
|
22
|
+
return r <= h || d || o ? null : /* @__PURE__ */ t(f, { children: [
|
|
18
23
|
/* @__PURE__ */ e(
|
|
19
24
|
"div",
|
|
20
25
|
{
|
|
21
|
-
className:
|
|
22
|
-
"bg-slate-50
|
|
23
|
-
|
|
26
|
+
className: b(
|
|
27
|
+
"bg-slate-50",
|
|
28
|
+
"border",
|
|
29
|
+
"border-y-transparent",
|
|
30
|
+
"border-x-slate-100",
|
|
31
|
+
"text-slate-500",
|
|
32
|
+
"text-sm",
|
|
33
|
+
"not-italic",
|
|
34
|
+
"py-2",
|
|
35
|
+
"px-6",
|
|
36
|
+
"rounded-b-lg",
|
|
37
|
+
"shadow",
|
|
38
|
+
"dark:bg-metal-800",
|
|
39
|
+
"dark:border-x-metal-700",
|
|
40
|
+
"dark:border-b-metal-700",
|
|
41
|
+
m,
|
|
42
|
+
{
|
|
43
|
+
"animate-in fade-in-10": !c
|
|
44
|
+
}
|
|
24
45
|
),
|
|
25
46
|
children: /* @__PURE__ */ t("div", { className: "flex items-center justify-between", children: [
|
|
26
47
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-6", children: [
|
|
27
|
-
r && a ? /* @__PURE__ */ t("span", { className: "text-slate-800", children: [
|
|
48
|
+
r && a ? /* @__PURE__ */ t("span", { className: "text-slate-800 dark:text-metal-300", children: [
|
|
28
49
|
r,
|
|
29
50
|
" Results"
|
|
30
51
|
] }) : null,
|
|
31
|
-
i && /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e(
|
|
52
|
+
i && /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e(x, { pageSizes: s }) })
|
|
32
53
|
] }),
|
|
33
54
|
/* @__PURE__ */ t("div", { className: "flex items-center gap-8", children: [
|
|
34
|
-
n && /* @__PURE__ */ e(
|
|
35
|
-
|
|
55
|
+
n && /* @__PURE__ */ e(p, {}),
|
|
56
|
+
l && /* @__PURE__ */ e(u, {})
|
|
36
57
|
] })
|
|
37
58
|
] })
|
|
38
59
|
}
|
|
39
60
|
),
|
|
40
|
-
/* @__PURE__ */ e("div", { className: "w-full min-h-
|
|
61
|
+
/* @__PURE__ */ e("div", { className: "w-full min-h-37.5" })
|
|
41
62
|
] });
|
|
42
63
|
};
|
|
43
64
|
export {
|
|
44
|
-
|
|
65
|
+
j as Pagination
|
|
45
66
|
};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { Button as m } from "../../../Button/Button.js";
|
|
3
|
+
import { cn as l } from "../../../../utils/index.js";
|
|
4
|
+
import { useTableContext as c } from "../../contexts/table.hook.js";
|
|
5
|
+
import { E as h } from "../../../../ellipsis-vertical-BVPtjl5f.js";
|
|
6
|
+
const N = ({ numberOfRows: i, table: o }) => {
|
|
7
|
+
const { tableFetching: n, tableLoading: b } = c(), t = Array.from({ length: i });
|
|
8
|
+
return /* @__PURE__ */ r("tbody", { className: "text-slate-800 text-sm font-normal relative", children: t.map((g, e) => {
|
|
9
|
+
const d = o.getAllColumns();
|
|
10
|
+
return /* @__PURE__ */ r(
|
|
11
|
+
"tr",
|
|
12
|
+
{
|
|
13
|
+
className: l(
|
|
14
|
+
"border-b",
|
|
15
|
+
"border-b-gray-200",
|
|
16
|
+
"bg-transparent",
|
|
17
|
+
"last:border-b-transparent"
|
|
18
|
+
),
|
|
19
|
+
children: d.map((a, s) => a.id !== "actions" ? /* @__PURE__ */ r(
|
|
20
|
+
"td",
|
|
21
|
+
{
|
|
22
|
+
className: l(
|
|
23
|
+
"px-4",
|
|
24
|
+
"py-1",
|
|
25
|
+
"bg-white",
|
|
26
|
+
"dark:bg-metal-900",
|
|
27
|
+
"dark:border-t",
|
|
28
|
+
"dark:border-metal-700",
|
|
29
|
+
"dark:first:border-l",
|
|
30
|
+
"dark:last:border-r",
|
|
31
|
+
"dark:[tr:last-child_&]:border-b",
|
|
32
|
+
a.columnDef.meta?.className,
|
|
33
|
+
{
|
|
34
|
+
"[tr:last-child_&:first-of-type]:rounded-bl-lg": e === t.length - 1 && s === 0,
|
|
35
|
+
"[tr:last-child_&:last-of-type]:rounded-br-lg": e === t.length - 1 && s === d.length - 1
|
|
36
|
+
}
|
|
37
|
+
),
|
|
38
|
+
children: /* @__PURE__ */ r("div", { className: "animate-in fade-in-0", children: /* @__PURE__ */ r(
|
|
39
|
+
"div",
|
|
40
|
+
{
|
|
41
|
+
className: l(
|
|
42
|
+
"bg-gray-200",
|
|
43
|
+
"dark:bg-metal-700",
|
|
44
|
+
"animate-pulse",
|
|
45
|
+
"rounded",
|
|
46
|
+
"h-5",
|
|
47
|
+
"w-full"
|
|
48
|
+
)
|
|
49
|
+
}
|
|
50
|
+
) })
|
|
51
|
+
},
|
|
52
|
+
`skeleton-${a.id}`
|
|
53
|
+
) : /* @__PURE__ */ r(
|
|
54
|
+
"td",
|
|
55
|
+
{
|
|
56
|
+
className: l(
|
|
57
|
+
"px-4",
|
|
58
|
+
"py-1",
|
|
59
|
+
"bg-white",
|
|
60
|
+
"dark:bg-metal-900",
|
|
61
|
+
"dark:border-t",
|
|
62
|
+
"dark:border-metal-700",
|
|
63
|
+
"dark:first:border-l",
|
|
64
|
+
"dark:last:border-r",
|
|
65
|
+
"dark:[tr:last-child_&]:border-b",
|
|
66
|
+
a.columnDef.meta?.className,
|
|
67
|
+
{
|
|
68
|
+
"[tr:last-child_&:first-of-type]:rounded-bl-lg": e === t.length - 1 && s === 0,
|
|
69
|
+
"[tr:last-child_&:last-of-type]:rounded-br-lg": e === t.length - 1 && s === d.length - 1
|
|
70
|
+
}
|
|
71
|
+
),
|
|
72
|
+
children: /* @__PURE__ */ r(
|
|
73
|
+
m,
|
|
74
|
+
{
|
|
75
|
+
variant: "link",
|
|
76
|
+
shape: "circle",
|
|
77
|
+
size: "large",
|
|
78
|
+
disabled: !0,
|
|
79
|
+
"aria-hidden": "true",
|
|
80
|
+
children: /* @__PURE__ */ r(
|
|
81
|
+
h,
|
|
82
|
+
{
|
|
83
|
+
className: l(
|
|
84
|
+
"w-5",
|
|
85
|
+
"h-5",
|
|
86
|
+
"text-slate-400",
|
|
87
|
+
"dark:text-metal-700",
|
|
88
|
+
{
|
|
89
|
+
"text-gray-300 animate-pulse": n || b
|
|
90
|
+
}
|
|
91
|
+
)
|
|
92
|
+
}
|
|
93
|
+
)
|
|
94
|
+
}
|
|
95
|
+
)
|
|
96
|
+
},
|
|
97
|
+
`skeleton-${a.id}`
|
|
98
|
+
))
|
|
99
|
+
},
|
|
100
|
+
`skeleton-row-${e}`
|
|
101
|
+
);
|
|
102
|
+
}) });
|
|
103
|
+
};
|
|
104
|
+
export {
|
|
105
|
+
N as Skeleton
|
|
106
|
+
};
|