@konstructio/ui 0.1.2-alpha.101 → 0.1.2-alpha.103
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/AlertDialogTrigger-CgcsW_ta.js +109 -0
- package/dist/{Breadcrumb-Bmv0vzgt.js → Breadcrumb-Cp3abB2w.js} +1 -1
- package/dist/Checkbox-DzAx7n67.js +249 -0
- package/dist/{CommandInput-CYYsk_31.js → CommandInput-BnvRMfLI.js} +2 -2
- package/dist/{Counter-DWKyr569.js → Counter-CY0xGnVM.js} +2 -2
- package/dist/{DayPicker-CwO8Zff5.js → DayPicker-kweJz134.js} +750 -746
- package/dist/{DropdownButton-Beel5_gN.js → DropdownButton-DnlwdPmb.js} +1 -1
- package/dist/FlagSelectorList-BoYG-_It.js +852 -0
- package/dist/{HamburgerTrigger-7a4POUaM.js → HamburgerTrigger-1vOTrm8-.js} +2 -2
- package/dist/{Input-DG3snJf_.js → Input-CW0VwW2T.js} +4 -4
- package/dist/{Modal-Bcu6LLAp.js → Modal-Bfzggwlr.js} +2 -2
- package/dist/{Spinner-BegZ5yd7.js → Spinner-Lw9mZYhg.js} +1 -1
- package/dist/Switch-WBRr8uOJ.js +196 -0
- package/dist/Toast-ByH-l4XK.js +459 -0
- package/dist/{Wrapper-DwxJAkNQ.js → Wrapper-ClJ_Mham.js} +2 -2
- package/dist/{Wrapper-DtT29fc5.js → Wrapper-XeeD3av7.js} +1 -1
- 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/Breadcrumb/Breadcrumb.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 +2 -2
- package/dist/components/Command/components/DialogOverlay.js +1 -1
- package/dist/components/Command/components/index.js +1 -1
- package/dist/components/Counter/Counter.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/CalendarMonth.js +1 -1
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.js +1 -1
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.js +1 -1
- package/dist/components/Datepicker/DatePicker.js +2 -3
- package/dist/components/Drawer/Drawer.js +2 -2
- package/dist/components/DropdownButton/DropdownButton.js +1 -1
- package/dist/components/Filter/Filter.js +4 -3
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.js +23 -24
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +60 -65
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.js +35 -43
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +40 -45
- package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.hook.js +33 -34
- package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.js +45 -51
- package/dist/components/Filter/components/FilterDropdown/FilterDropdown.js +28 -0
- package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.js +56 -61
- package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.hook.js +33 -34
- package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.js +70 -75
- package/dist/components/Filter/contexts/filter.provider.js +8 -5
- package/dist/components/Filter/utils/index.js +1 -1
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/LineChart/LineChart.js +1 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Modal/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.js +1 -1
- package/dist/components/MultiSelectDropdown/components/List/List.js +1 -1
- package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/MultiSelectDropdown/components/index.js +1 -1
- package/dist/components/PhoneNumberInput/PhoneNumberInput.js +2 -2
- package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +1 -1
- package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +2 -2
- package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +2 -2
- package/dist/components/PhoneNumberInput/components/Wrapper.js +1 -1
- package/dist/components/PhoneNumberInput/components/index.js +2 -2
- package/dist/components/PhoneNumberInput/contexts/index.js +1 -1
- package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +1 -1
- package/dist/components/PieChart/PieChart.js +1 -1
- package/dist/components/Range/Range.js +1 -1
- package/dist/components/Select/components/List/List.js +1 -1
- package/dist/components/Sidebar/components/HamburgerTrigger/HamburgerTrigger.js +1 -1
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +1 -1
- package/dist/components/Sidebar/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/Sidebar/components/index.js +1 -1
- package/dist/components/Slider/Slider.js +1 -1
- package/dist/components/Spinner/Spinner.js +1 -1
- package/dist/components/Switch/Switch.js +1 -1
- package/dist/components/Table/components/Filter.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/TagSelect/TagSelect.js +1 -1
- package/dist/components/TagSelect/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/TagSelect/components/index.js +1 -1
- package/dist/components/Toast/Toast.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/components/VirtualizedTable/VirtualizedTable.js +87 -87
- package/dist/components/VirtualizedTable/components/Actions/Actions.js +19 -19
- package/dist/components/VirtualizedTable/components/Body/Body.js +50 -49
- package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +67 -21
- package/dist/components/VirtualizedTable/components/ExpandableRow/ExpandableRow.js +1 -1
- package/dist/components/VirtualizedTable/components/Filter/Filter.js +53 -63
- package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +10 -10
- package/dist/components/VirtualizedTable/components/Header/Header.js +47 -34
- package/dist/components/VirtualizedTable/components/Pagination/Pagination.js +19 -15
- package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +10 -10
- package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +1 -1
- package/dist/components/VirtualizedTable/components/WrapperBody/WrapperBody.js +8 -8
- package/dist/components/VirtualizedTable/contexts/index.js +1 -1
- package/dist/components/VirtualizedTable/contexts/table.context.js +1 -0
- package/dist/components/VirtualizedTable/contexts/table.provider.js +1 -1
- package/dist/components/index.js +10 -10
- package/dist/{components-CYt24H4n.js → components-BIHlj4yH.js} +1 -1
- package/dist/{debounce-KoeGNmnW.js → debounce-C5Ycjilj.js} +14 -14
- package/dist/dist-2bGlmy8N2.js +165 -0
- package/dist/dist-BiJrNvNo.js +193 -0
- package/dist/dist-BuFiu480.js +13 -0
- package/dist/dist-C2aTw0m62.js +1320 -0
- package/dist/{dist-DvoMuWKO2.js → dist-C2s4VX-42.js} +4 -4
- package/dist/dist-CT6d9xe7.js +441 -0
- package/dist/dist-CTvBzxW8.js +31 -0
- package/dist/dist-CVDFmWf2.js +358 -0
- package/dist/dist-D4FePjTS.js +194 -0
- package/dist/dist-DISvWx7U.js +99 -0
- package/dist/dist-Db6UeFo4.js +291 -0
- package/dist/{dist-DGO9opgu.js → dist-Dse3gSmZ.js} +49 -49
- package/dist/dist-j7FOUrFU.js +206 -0
- package/dist/{dist-C8NWUTUh.js → dist-l-aDnQZC.js} +1 -1
- package/dist/es2015-BWf6xQHm.js +222 -0
- package/dist/index.js +10 -10
- package/dist/{isObject-1ZmdWuhC.js → isObject-BeFFiVJK.js} +8 -8
- package/dist/lib/components/Alert/Alert.types.d.ts +1 -1
- package/dist/lib/components/AlertDialog/AlertDialog.types.d.ts +1 -1
- package/dist/lib/components/AlertDialog/components/AlertDialogTrigger.types.d.ts +2 -2
- package/dist/lib/components/Autocomplete/Autocomplete.types.d.ts +1 -1
- package/dist/lib/components/Breadcrumb/Breadcrumb.types.d.ts +1 -1
- package/dist/lib/components/Breadcrumb/components/BackButton/BackButton.types.d.ts +1 -1
- package/dist/lib/components/Breadcrumb/components/Item/Item.types.d.ts +1 -1
- package/dist/lib/components/Button/Button.types.d.ts +1 -1
- package/dist/lib/components/ButtonGroup/ButtonGroup.types.d.ts +1 -1
- package/dist/lib/components/Card/Card.types.d.ts +1 -1
- package/dist/lib/components/Checkbox/Checkbox.types.d.ts +1 -1
- package/dist/lib/components/Command/Command.types.d.ts +1 -1
- package/dist/lib/components/Counter/Counter.types.d.ts +1 -1
- package/dist/lib/components/DateRangePicker/DateRangePicker.types.d.ts +1 -1
- package/dist/lib/components/Drawer/Drawer.types.d.ts +1 -1
- package/dist/lib/components/Filter/Filter.types.d.ts +1 -1
- package/dist/lib/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.d.ts +2 -3
- package/dist/lib/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.d.ts +1 -2
- package/dist/lib/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.hook.d.ts +2 -3
- package/dist/lib/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.types.d.ts +1 -1
- package/dist/lib/components/Filter/components/FilterDropdown/FilterDropdown.d.ts +3 -0
- package/dist/lib/components/Filter/components/FilterDropdown/FilterDropdown.types.d.ts +9 -0
- package/dist/lib/components/Filter/components/ResetButton/ResetButton.types.d.ts +1 -1
- package/dist/lib/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.hook.d.ts +1 -2
- package/dist/lib/components/Filter/contexts/filter.context.d.ts +1 -0
- package/dist/lib/components/ImageUpload/ImageUpload.types.d.ts +1 -1
- package/dist/lib/components/Input/Input.types.d.ts +1 -1
- package/dist/lib/components/LineChart/LineChart.types.d.ts +1 -1
- package/dist/lib/components/Loading/Loading.types.d.ts +1 -1
- package/dist/lib/components/Modal/Modal.types.d.ts +1 -1
- package/dist/lib/components/Modal/components/Wrapper/Wrapper.types.d.ts +1 -1
- package/dist/lib/components/MultiSelectDropdown/components/Item/Item.types.d.ts +1 -1
- package/dist/lib/components/MultiSelectDropdown/components/List/List.types.d.ts +1 -1
- package/dist/lib/components/MultiSelectDropdown/components/Wrapper/Wrapper.types.d.ts +1 -1
- package/dist/lib/components/ProgressBar/ProgressBar.types.d.ts +1 -1
- package/dist/lib/components/Radio/Radio.types.d.ts +1 -1
- package/dist/lib/components/RadioCard/RadioCard.types.d.ts +1 -1
- package/dist/lib/components/RadioCardGroup/RadioCardGroup.types.d.ts +1 -1
- package/dist/lib/components/RadioGroup/RadioGroup.types.d.ts +1 -1
- package/dist/lib/components/Range/Range.types.d.ts +1 -1
- package/dist/lib/components/Select/Select.types.d.ts +1 -1
- package/dist/lib/components/Sidebar/Sidebar.types.d.ts +2 -2
- package/dist/lib/components/Sidebar/components/Label/Label.types.d.ts +1 -1
- package/dist/lib/components/Slider/Slider.types.d.ts +1 -1
- package/dist/lib/components/Spinner/Spinner.types.d.ts +2 -2
- package/dist/lib/components/Stepper/Stepper.types.d.ts +1 -1
- package/dist/lib/components/Stepper/components/StepItem/StepItem.types.d.ts +1 -1
- package/dist/lib/components/Switch/Switch.types.d.ts +1 -1
- package/dist/lib/components/Table/Table.types.d.ts +1 -1
- package/dist/lib/components/Tabs/Tabs.types.d.ts +1 -1
- package/dist/lib/components/TagSelect/TagSelect.types.d.ts +1 -1
- package/dist/lib/components/TagSelect/components/Item/Item.types.d.ts +2 -2
- package/dist/lib/components/TagSelect/components/List/List.types.d.ts +1 -1
- package/dist/lib/components/TagSelect/components/Wrapper/Wrapper.types.d.ts +1 -1
- package/dist/lib/components/TagSelect/contexts/TagSelect.types.d.ts +1 -1
- package/dist/lib/components/TextArea/TextArea.types.d.ts +1 -1
- package/dist/lib/components/Toast/Toast.types.d.ts +1 -1
- package/dist/lib/components/Typography/Typography.types.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/VirtualizedTable.types.d.ts +27 -3
- package/dist/lib/components/VirtualizedTable/components/Body/Body.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/components/Body/Body.types.d.ts +1 -0
- package/dist/lib/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.types.d.ts +2 -0
- package/dist/lib/components/VirtualizedTable/components/Filter/Filter.types.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/components/Header/Header.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/components/Header/Header.types.d.ts +1 -0
- package/dist/lib/components/VirtualizedTable/components/Pagination/Pagination.types.d.ts +2 -0
- package/dist/lib/components/VirtualizedTable/components/TruncateText/TruncateText.types.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/contexts/table.context.d.ts +2 -0
- package/dist/lib/components/VirtualizedTable/contexts/table.provider.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/contexts/table.types.d.ts +1 -0
- package/dist/lib/contexts/theme.context.d.ts +1 -1
- package/dist/lib/contexts/theme.hook.d.ts +1 -1
- package/dist/package.json +34 -33
- package/dist/{phone-number.provider-CJJOFYk-.js → phone-number.provider-BxQCTxp8.js} +457 -457
- package/dist/{prop-types-CaJpPVsa.js → prop-types-CfEYxTbR.js} +52 -52
- package/dist/styles.css +1 -1
- package/dist/{table.provider-9uUt5a-s.js → table.provider-2sAkE7z_.js} +395 -368
- package/dist/{utils-B6A9pnrH.js → utils-B-BTGYA5.js} +193 -193
- package/dist/{x-CESTrenk.js → x-BI9jmc7e.js} +1 -1
- package/package.json +34 -33
- package/dist/AlertDialogTrigger-HhbFOOUE.js +0 -124
- package/dist/Checkbox-B1rTwzR3.js +0 -240
- package/dist/FlagSelectorList-BARhzfj2.js +0 -848
- package/dist/Switch-1RGhhTtg.js +0 -178
- package/dist/Toast-CS-igZor.js +0 -467
- package/dist/dist-7edduNXi.js +0 -398
- package/dist/dist-BkYHh2kH.js +0 -408
- package/dist/dist-C6Cif8-U.js +0 -28
- package/dist/dist-CeuUxVmT.js +0 -13
- package/dist/dist-CfYOvauX.js +0 -125
- package/dist/dist-CktbIsHq.js +0 -264
- package/dist/dist-DGqWMRtc.js +0 -183
- package/dist/dist-DdFwUrO22.js +0 -11
- package/dist/dist-DnGj9MTf.js +0 -1692
- package/dist/dist-eAwtFCCA.js +0 -87
- /package/dist/{dist-AihTpWdF2.js → dist-AihTpWdF.js} +0 -0
|
@@ -1,73 +1,74 @@
|
|
|
1
1
|
import { t as r } from "../../../../utils-Cx-WzRZF.js";
|
|
2
|
-
import { n as
|
|
3
|
-
import { useTableContext as
|
|
4
|
-
import { Skeleton as
|
|
5
|
-
import { isPaginationBarVisible as
|
|
6
|
-
import { ExpandableRow as
|
|
7
|
-
import { Fragment as
|
|
8
|
-
import { jsx as e, jsxs as
|
|
9
|
-
var
|
|
10
|
-
const { table:
|
|
11
|
-
if (
|
|
12
|
-
numberOfRows:
|
|
13
|
-
table:
|
|
2
|
+
import { n as I } from "../../../../table.provider-2sAkE7z_.js";
|
|
3
|
+
import { useTableContext as T } from "../../contexts/table.hook.js";
|
|
4
|
+
import { Skeleton as q } from "../Skeleton/Skeleton.js";
|
|
5
|
+
import { isPaginationBarVisible as G } from "../../utils/pagination.js";
|
|
6
|
+
import { ExpandableRow as J } from "../ExpandableRow/ExpandableRow.js";
|
|
7
|
+
import { Fragment as K } from "react";
|
|
8
|
+
import { jsx as e, jsxs as Q } from "react/jsx-runtime";
|
|
9
|
+
var re = ({ isLoading: v, showPagination: N, emptyState: y, errorState: a }) => {
|
|
10
|
+
const { table: m, pageSize: E, totalItems: R = -1 / 0, tableLoading: C, tableError: c, enableExpandedRow: D, classNameExpandedRow: j, classNameExpandedCell: B, classNameExpandedContent: V, enableHoverRow: u, classNameHoverRow: z, classNameActiveExpandedRow: L, renderExpandedRow: f, isBorderOnAdjacentCell: _, isExpandColumnVisible: A } = T();
|
|
11
|
+
if (v || C) return /* @__PURE__ */ e(q, {
|
|
12
|
+
numberOfRows: E,
|
|
13
|
+
table: m
|
|
14
14
|
});
|
|
15
|
-
const
|
|
16
|
-
if (
|
|
17
|
-
const d =
|
|
15
|
+
const t = m.getRowModel().rows ?? [], l = N && G(R), x = t.length === 0 && !!c && !!a, h = t.length > 0 ? null : c && a ? typeof a == "function" ? a(c) : a : y ?? null;
|
|
16
|
+
if (h) {
|
|
17
|
+
const d = m.getVisibleLeafColumns().length;
|
|
18
18
|
return /* @__PURE__ */ e("tbody", {
|
|
19
|
-
className: r("text-slate-800", "text-sm", "font-normal", "relative", "dark:border-x"),
|
|
19
|
+
className: r("kvt-body", "text-slate-800", "text-sm", "font-normal", "relative", "dark:border-x"),
|
|
20
20
|
children: /* @__PURE__ */ e("tr", {
|
|
21
|
-
className: r("border-b", "border-b-gray-200", "dark:border-b-metal-700", "bg-transparent"),
|
|
21
|
+
className: r(x ? "kvt-error-row" : "kvt-empty-row", "border-b", "border-b-gray-200", "dark:border-b-metal-700", "bg-transparent"),
|
|
22
22
|
"data-empty-row": !0,
|
|
23
|
+
"data-error-row": x ? !0 : void 0,
|
|
23
24
|
children: /* @__PURE__ */ e("td", {
|
|
24
25
|
colSpan: d,
|
|
25
26
|
className: r("p-0", "bg-white", "dark:bg-metal-900", "dark:border", "dark:border-metal-700", "rounded-b-lg"),
|
|
26
27
|
children: /* @__PURE__ */ e("div", {
|
|
27
28
|
className: "flex items-center justify-center",
|
|
28
|
-
children:
|
|
29
|
+
children: h
|
|
29
30
|
})
|
|
30
31
|
})
|
|
31
32
|
})
|
|
32
33
|
});
|
|
33
34
|
}
|
|
34
35
|
return /* @__PURE__ */ e("tbody", {
|
|
35
|
-
className: r("text-slate-800", "text-sm", "font-normal", "relative", "dark:border-x"),
|
|
36
|
-
children:
|
|
37
|
-
const { id:
|
|
38
|
-
return /* @__PURE__ */
|
|
39
|
-
className: r({ "group/row":
|
|
40
|
-
"data-row-id":
|
|
41
|
-
...
|
|
42
|
-
children:
|
|
43
|
-
const
|
|
36
|
+
className: r("kvt-body", "text-slate-800", "text-sm", "font-normal", "relative", "dark:border-x"),
|
|
37
|
+
children: t.map((d, b) => {
|
|
38
|
+
const { id: p, original: g, getVisibleCells: F } = d, { meta: s = {} } = g, i = F(), n = D && d.getIsExpanded(), H = !!s.expandedRow || !!f, k = i[0]?.column.id !== "__expand" || A ? 0 : _ ? 1 : null;
|
|
39
|
+
return /* @__PURE__ */ Q(K, { children: [/* @__PURE__ */ e("tr", {
|
|
40
|
+
className: r("kvt-row", { "group/row": u }, "border-b", "border-b-gray-200", "dark:text-metal-50", "dark:border-b-metal-700", "bg-transparent", s.className),
|
|
41
|
+
"data-row-id": p,
|
|
42
|
+
...s.attributes ?? {},
|
|
43
|
+
children: i.map(({ id: M, column: o, getContext: O }, w) => {
|
|
44
|
+
const P = typeof o.columnDef.meta?.className == "function" ? o.columnDef.meta?.className(g) : o.columnDef.meta?.className;
|
|
44
45
|
return /* @__PURE__ */ e("td", {
|
|
45
|
-
className: r("px-4", "py-1", "text-sm", "bg-white", "dark:bg-metal-900", "dark:border-t", "dark:border-metal-700", "dark:first:border-l", "dark:last:border-r", {
|
|
46
|
-
"group-hover/row:bg-zinc-100 dark:group-hover/row:bg-metal-800":
|
|
47
|
-
[r("bg-zinc-100 dark:bg-metal-800",
|
|
48
|
-
},
|
|
49
|
-
"rounded-bl-lg":
|
|
50
|
-
"rounded-br-lg":
|
|
51
|
-
"dark:[tr:last-child_&]:border-b": !
|
|
46
|
+
className: r("kvt-cell", "px-4", "py-1", "text-sm", "bg-white", "dark:bg-metal-900", "dark:border-t", "dark:border-metal-700", "dark:first:border-l", "dark:last:border-r", {
|
|
47
|
+
"group-hover/row:bg-zinc-100 dark:group-hover/row:bg-metal-800": u,
|
|
48
|
+
[r("bg-zinc-100 dark:bg-metal-800", L)]: !!n
|
|
49
|
+
}, z, P, {
|
|
50
|
+
"rounded-bl-lg": b === t.length - 1 && k !== null && w === k && !l && !n,
|
|
51
|
+
"rounded-br-lg": b === t.length - 1 && w === i.length - 1 && !l && !n,
|
|
52
|
+
"dark:[tr:last-child_&]:border-b": !l
|
|
52
53
|
}),
|
|
53
|
-
"data-expanded":
|
|
54
|
-
...
|
|
55
|
-
children:
|
|
56
|
-
},
|
|
54
|
+
"data-expanded": n ? !0 : void 0,
|
|
55
|
+
...o.columnDef.meta?.attributes ?? {},
|
|
56
|
+
children: I(o.columnDef.cell, O())
|
|
57
|
+
}, M);
|
|
57
58
|
})
|
|
58
|
-
}),
|
|
59
|
-
classNameExpandedCell:
|
|
60
|
-
classNameExpandedContent:
|
|
61
|
-
classNameExpandedRow:
|
|
62
|
-
colSpan:
|
|
63
|
-
id:
|
|
64
|
-
isExpanded: !!
|
|
65
|
-
isLastRow:
|
|
66
|
-
children:
|
|
67
|
-
})] },
|
|
59
|
+
}), H && /* @__PURE__ */ e(J, {
|
|
60
|
+
classNameExpandedCell: B,
|
|
61
|
+
classNameExpandedContent: V,
|
|
62
|
+
classNameExpandedRow: j,
|
|
63
|
+
colSpan: i.length,
|
|
64
|
+
id: p,
|
|
65
|
+
isExpanded: !!n,
|
|
66
|
+
isLastRow: b === t.length - 1 && !l,
|
|
67
|
+
children: s.expandedRow ?? f?.(g)
|
|
68
|
+
})] }, p);
|
|
68
69
|
})
|
|
69
70
|
});
|
|
70
71
|
};
|
|
71
72
|
export {
|
|
72
|
-
|
|
73
|
+
re as Body
|
|
73
74
|
};
|
|
@@ -1,26 +1,72 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
import { t as o } from "../../../../utils-Cx-WzRZF.js";
|
|
2
|
+
import { t as u } from "../../../../chevron-up-Bjpvg6ui.js";
|
|
3
|
+
import { Typography as c } from "../../../Typography/Typography.js";
|
|
4
|
+
import { i as b, n as v, r as w, t as S } from "../../../../dist-2bGlmy8N2.js";
|
|
5
|
+
import { listVariants as k } from "../../../Select/components/List/List.variants.js";
|
|
6
|
+
import { listItemVariants as N } from "../../../Select/components/ListItem/ListItem.variants.js";
|
|
7
|
+
import { selectVariants as C } from "../../../Select/Select.variants.js";
|
|
8
|
+
import { DEFAULT_PAGE_SIZES as y } from "../../constants/pagination.js";
|
|
9
|
+
import { useTableContext as z } from "../../contexts/table.hook.js";
|
|
10
|
+
import { useState as O } from "react";
|
|
11
|
+
import { jsx as t, jsxs as r } from "react/jsx-runtime";
|
|
12
|
+
var _ = ({ pageSizes: d = y, isListPortal: f = !1, direction: s = "auto" }) => {
|
|
13
|
+
const { pageSize: i, onPageSize: g, handlePage: h } = z(), [n, l] = O(!1), m = (e) => {
|
|
14
|
+
g(Number(e)), h(0), l(!1);
|
|
15
|
+
}, p = /* @__PURE__ */ t(S, {
|
|
16
|
+
asChild: !0,
|
|
17
|
+
side: s === "up" ? "top" : "bottom",
|
|
18
|
+
avoidCollisions: s === "auto",
|
|
19
|
+
align: "start",
|
|
20
|
+
sideOffset: 4,
|
|
21
|
+
onOpenAutoFocus: (e) => {
|
|
22
|
+
e.preventDefault();
|
|
23
|
+
},
|
|
24
|
+
children: /* @__PURE__ */ t("ul", {
|
|
25
|
+
role: "listbox",
|
|
26
|
+
"aria-label": "Rows per page",
|
|
27
|
+
className: o(k(), "kvt-page-size-list", "static top-auto mt-0 z-50 w-(--radix-popover-trigger-width)"),
|
|
28
|
+
children: d.map((e) => {
|
|
29
|
+
const a = String(e);
|
|
30
|
+
return /* @__PURE__ */ t("li", {
|
|
31
|
+
role: "option",
|
|
32
|
+
"aria-selected": a === String(i),
|
|
33
|
+
tabIndex: 0,
|
|
34
|
+
className: o(N(), "dark:bg-metal-800"),
|
|
35
|
+
onClick: () => {
|
|
36
|
+
m(a);
|
|
37
|
+
},
|
|
38
|
+
onKeyDown: (x) => {
|
|
39
|
+
x.key === "Enter" && m(a);
|
|
40
|
+
},
|
|
41
|
+
children: /* @__PURE__ */ t(c, {
|
|
42
|
+
variant: "body2",
|
|
43
|
+
className: "text-sm dark:text-metal-50",
|
|
44
|
+
children: a
|
|
45
|
+
})
|
|
46
|
+
}, a);
|
|
47
|
+
})
|
|
48
|
+
})
|
|
49
|
+
});
|
|
50
|
+
return /* @__PURE__ */ r("div", {
|
|
51
|
+
className: "kvt-page-size flex items-center gap-2 dark:text-metal-300",
|
|
52
|
+
children: [/* @__PURE__ */ t("span", { children: "Show" }), /* @__PURE__ */ r(w, {
|
|
53
|
+
open: n,
|
|
54
|
+
onOpenChange: l,
|
|
55
|
+
children: [/* @__PURE__ */ r(b, {
|
|
56
|
+
"aria-label": "Rows per page",
|
|
57
|
+
className: o(C(), "w-22 bg-white"),
|
|
58
|
+
children: [/* @__PURE__ */ t(c, {
|
|
59
|
+
variant: "body2",
|
|
60
|
+
className: "flex-1 text-left text-sm text-metal-800 dark:text-metal-50",
|
|
61
|
+
children: i
|
|
62
|
+
}), /* @__PURE__ */ t(u, {
|
|
63
|
+
"data-state": n ? "open" : "closed",
|
|
64
|
+
className: "w-4 h-4 text-zinc-500 transition-all duration-100 data-[state=open]:rotate-0 data-[state=closed]:rotate-180 select-none"
|
|
65
|
+
})]
|
|
66
|
+
}), f ? /* @__PURE__ */ t(v, { children: p }) : p]
|
|
21
67
|
})]
|
|
22
68
|
});
|
|
23
69
|
};
|
|
24
70
|
export {
|
|
25
|
-
|
|
71
|
+
_ as DropdownPaginate
|
|
26
72
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as a } from "../../../../utils-Cx-WzRZF.js";
|
|
2
2
|
import { jsx as d } from "react/jsx-runtime";
|
|
3
3
|
var n = ({ children: o, classNameExpandedCell: b, classNameExpandedContent: t, classNameExpandedRow: l, colSpan: m, id: i, isExpanded: r, isLastRow: e }) => /* @__PURE__ */ d("tr", {
|
|
4
|
-
className: a("h-0 leading-0", l),
|
|
4
|
+
className: a("kvt-expanded-row h-0 leading-0", l),
|
|
5
5
|
"data-expanded-row-id": i,
|
|
6
6
|
children: /* @__PURE__ */ d("td", {
|
|
7
7
|
colSpan: m,
|
|
@@ -1,54 +1,43 @@
|
|
|
1
|
-
import { o as
|
|
2
|
-
import { t as
|
|
3
|
-
import { t as
|
|
4
|
-
import { Button as
|
|
5
|
-
import { resetEvent as
|
|
1
|
+
import { o as z } from "../../../../rolldown-runtime-Ck3dxwZt.js";
|
|
2
|
+
import { t as V } from "../../../../Input-CW0VwW2T.js";
|
|
3
|
+
import { t as $ } from "../../../../utils-Cx-WzRZF.js";
|
|
4
|
+
import { Button as f } from "../../../Button/Button.js";
|
|
5
|
+
import { resetEvent as G } from "../../../Filter/events/index.js";
|
|
6
6
|
import { Filter as n } from "../../../Filter/Filter.js";
|
|
7
|
-
import { t as
|
|
8
|
-
import { useTableContext as
|
|
9
|
-
import { VirtualizedTableEvent as
|
|
10
|
-
import {
|
|
11
|
-
import { jsx as s, jsxs as
|
|
12
|
-
var
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
i
|
|
23
|
-
]), T = w((e, t) => R(e, t.map((a) => a.id)), [R]), _ = w(() => {
|
|
24
|
-
l(""), c.current && (c.current.value = "");
|
|
25
|
-
}, [l]);
|
|
26
|
-
X(() => {
|
|
7
|
+
import { t as H } from "../../../../debounce-C5Ycjilj.js";
|
|
8
|
+
import { useTableContext as J } from "../../contexts/table.hook.js";
|
|
9
|
+
import { VirtualizedTableEvent as K } from "../../events/index.js";
|
|
10
|
+
import { useEffect as Q, useMemo as U, useRef as W } from "react";
|
|
11
|
+
import { jsx as s, jsxs as u } from "react/jsx-runtime";
|
|
12
|
+
var X = /* @__PURE__ */ z(H(), 1), me = ({ id: m, actions: i, filters: d, multiSelectFilter: h, placeholder: y, showFilterInput: F = !0, showResetButton: b = !0, resetButtonClassName: v, closeOnApply: S = !0 }) => {
|
|
13
|
+
const l = W(null), { termOfSearch: R, multiselectSelected: T, dateFilters: w, dateRangeFilters: D, timeFilters: x, onChangeTermOfSearch: c, onSelectMultiselect: M, onSelectDateFilter: j, onSelectDateRangeFilter: A, onSelectTimeFilter: E } = J(), k = [...d ?? h?.map((e) => ({
|
|
14
|
+
...e,
|
|
15
|
+
type: "badgeMultiSelect"
|
|
16
|
+
})) ?? [], ...i ?? []], p = (e, t) => {
|
|
17
|
+
M(e, t.map((a) => a.id));
|
|
18
|
+
}, O = () => {
|
|
19
|
+
c(""), l.current && (l.current.value = "");
|
|
20
|
+
};
|
|
21
|
+
Q(() => {
|
|
27
22
|
const e = Array.isArray(m) ? m.join(",") : String(m), t = new AbortController();
|
|
28
|
-
return document.addEventListener(
|
|
23
|
+
return document.addEventListener(K.RESET_FILTERS, (a) => {
|
|
29
24
|
const { detail: o } = a;
|
|
30
|
-
o.tableId === e && (
|
|
25
|
+
o.tableId === e && (c(""), l.current && (l.current.value = ""), G());
|
|
31
26
|
}, { signal: t.signal }), () => t.abort();
|
|
32
|
-
}, [m,
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
}, 500), [
|
|
36
|
-
y,
|
|
37
|
-
b,
|
|
38
|
-
F,
|
|
39
|
-
S,
|
|
40
|
-
v
|
|
41
|
-
]), g = (e) => {
|
|
27
|
+
}, [m, c]);
|
|
28
|
+
const B = U(() => (0, X.default)((e) => {
|
|
29
|
+
c(e.target.value);
|
|
30
|
+
}, 500), [c]), I = !!R || Object.values(T ?? {}).flat().length > 0 || Object.values(w ?? {}).some(Boolean) || Object.values(D ?? {}).some(Boolean) || Object.values(x ?? {}).some(Boolean), _ = (e) => {
|
|
42
31
|
if (e.type === "action") {
|
|
43
|
-
const { label: r, appearance:
|
|
44
|
-
return /* @__PURE__ */
|
|
45
|
-
appearance:
|
|
46
|
-
variant:
|
|
47
|
-
...
|
|
32
|
+
const { label: r, appearance: P = "compact", variant: N = "secondary", leftIcon: g, rightIcon: L, type: Y, ...q } = e;
|
|
33
|
+
return /* @__PURE__ */ u(f, {
|
|
34
|
+
appearance: P,
|
|
35
|
+
variant: N,
|
|
36
|
+
...q,
|
|
48
37
|
children: [
|
|
49
|
-
|
|
38
|
+
g,
|
|
50
39
|
r,
|
|
51
|
-
|
|
40
|
+
L
|
|
52
41
|
]
|
|
53
42
|
}, r);
|
|
54
43
|
}
|
|
@@ -58,14 +47,14 @@ var Z = /* @__PURE__ */ $(Q(), 1), ue = ({ id: m, actions: i, filters: d, multiS
|
|
|
58
47
|
position: o,
|
|
59
48
|
options: e.options,
|
|
60
49
|
onApply: (r) => {
|
|
61
|
-
|
|
50
|
+
p(t, r);
|
|
62
51
|
}
|
|
63
52
|
}, t) : e.type === "date" ? /* @__PURE__ */ s(n.DateFilterDropdown, {
|
|
64
53
|
label: a,
|
|
65
54
|
position: o,
|
|
66
55
|
countryCode: e.countryCode,
|
|
67
56
|
onApply: (r) => {
|
|
68
|
-
|
|
57
|
+
j(t, r);
|
|
69
58
|
}
|
|
70
59
|
}, t) : e.type === "dateRange" ? /* @__PURE__ */ s(n.DateRangeFilterDropdown, {
|
|
71
60
|
label: a,
|
|
@@ -78,7 +67,7 @@ var Z = /* @__PURE__ */ $(Q(), 1), ue = ({ id: m, actions: i, filters: d, multiS
|
|
|
78
67
|
maxDate: e.maxDate,
|
|
79
68
|
countryCode: e.countryCode,
|
|
80
69
|
onApply: (r) => {
|
|
81
|
-
|
|
70
|
+
A(t, r);
|
|
82
71
|
},
|
|
83
72
|
onRangeChange: e.onRangeChange
|
|
84
73
|
}, t) : e.type === "time" ? /* @__PURE__ */ s(n.TimeFilterDropdown, {
|
|
@@ -88,37 +77,38 @@ var Z = /* @__PURE__ */ $(Q(), 1), ue = ({ id: m, actions: i, filters: d, multiS
|
|
|
88
77
|
presets: e.presets,
|
|
89
78
|
showTimePicker: e.showTimePicker,
|
|
90
79
|
onApply: (r) => {
|
|
91
|
-
|
|
80
|
+
E(t, r);
|
|
92
81
|
}
|
|
93
82
|
}, t) : /* @__PURE__ */ s(n.BadgeMultiSelect, {
|
|
94
83
|
label: a,
|
|
95
84
|
position: o,
|
|
96
85
|
options: e.options,
|
|
97
86
|
onApply: (r) => {
|
|
98
|
-
|
|
87
|
+
p(t, r);
|
|
99
88
|
}
|
|
100
89
|
}, t);
|
|
101
90
|
};
|
|
102
|
-
return /* @__PURE__ */
|
|
103
|
-
className: "w-full flex items-center justify-end pb-6",
|
|
104
|
-
children: [
|
|
105
|
-
ref:
|
|
106
|
-
placeholder:
|
|
91
|
+
return /* @__PURE__ */ u("div", {
|
|
92
|
+
className: "kvt-filter w-full flex items-center justify-end pb-6",
|
|
93
|
+
children: [F && /* @__PURE__ */ s(V, {
|
|
94
|
+
ref: l,
|
|
95
|
+
placeholder: y,
|
|
107
96
|
isSearch: !0,
|
|
108
97
|
autoComplete: "false",
|
|
109
|
-
className: "w-72",
|
|
98
|
+
className: "kvt-search w-72",
|
|
110
99
|
inputMode: "search",
|
|
111
|
-
onChange:
|
|
112
|
-
}), /* @__PURE__ */
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
100
|
+
onChange: B
|
|
101
|
+
}), /* @__PURE__ */ u(n, {
|
|
102
|
+
className: "kvt-filter-actions",
|
|
103
|
+
closeOnApply: S,
|
|
104
|
+
children: [k.map(_), b && /* @__PURE__ */ s(n.ResetButton, {
|
|
105
|
+
className: $("select-none", v),
|
|
106
|
+
disabled: !I,
|
|
107
|
+
onClick: O
|
|
118
108
|
})]
|
|
119
109
|
})]
|
|
120
110
|
});
|
|
121
111
|
};
|
|
122
112
|
export {
|
|
123
|
-
|
|
113
|
+
me as Filter
|
|
124
114
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { t as s } from "../../../../Input-
|
|
1
|
+
import { t as s } from "../../../../Input-CW0VwW2T.js";
|
|
2
2
|
import { Button as i } from "../../../Button/Button.js";
|
|
3
3
|
import { Typography as p } from "../../../Typography/Typography.js";
|
|
4
4
|
import { useTableContext as u } from "../../contexts/table.hook.js";
|
|
5
|
-
import {
|
|
6
|
-
import { jsx as e, jsxs as
|
|
5
|
+
import { useRef as l } from "react";
|
|
6
|
+
import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
7
7
|
var N = () => {
|
|
8
|
-
const r =
|
|
9
|
-
return /* @__PURE__ */
|
|
8
|
+
const r = l(null), { totalPages: t, handlePage: m } = u();
|
|
9
|
+
return /* @__PURE__ */ c("form", {
|
|
10
10
|
"aria-label": "footer-pagination",
|
|
11
11
|
ref: r,
|
|
12
|
-
onSubmit:
|
|
13
|
-
|
|
14
|
-
const n = new FormData(
|
|
15
|
-
|
|
16
|
-
},
|
|
12
|
+
onSubmit: (o) => {
|
|
13
|
+
o.preventDefault();
|
|
14
|
+
const n = new FormData(o.currentTarget), a = Number(n.get("jump-to"));
|
|
15
|
+
m(((a < t ? a : t) || 1) - 1), r.current?.reset();
|
|
16
|
+
},
|
|
17
17
|
className: "flex items-center gap-2",
|
|
18
18
|
noValidate: !0,
|
|
19
19
|
children: [
|
|
@@ -1,40 +1,53 @@
|
|
|
1
|
-
import { t
|
|
2
|
-
import { n as
|
|
3
|
-
import { useTableContext as
|
|
1
|
+
import { t } from "../../../../utils-Cx-WzRZF.js";
|
|
2
|
+
import { n as g } from "../../../../table.provider-2sAkE7z_.js";
|
|
3
|
+
import { useTableContext as k } from "../../contexts/table.hook.js";
|
|
4
4
|
import u from "../../assets/chevron-up.js";
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
className: r("w-2 h-2 cursor-pointer", { "text-blue-600 dark:text-aurora-500": e.getIsSorted() === "asc" }, o),
|
|
28
|
-
onClick: () => m(e)
|
|
29
|
-
}), /* @__PURE__ */ a(k, {
|
|
30
|
-
className: r("w-2 h-2 cursor-pointer", { "text-blue-600 dark:text-aurora-500": e.getIsSorted() === "desc" }, o),
|
|
31
|
-
onClick: () => p(e)
|
|
32
|
-
})]
|
|
33
|
-
})]
|
|
5
|
+
import C from "../../assets/chevron-down.js";
|
|
6
|
+
import { jsx as r, jsxs as o } from "react/jsx-runtime";
|
|
7
|
+
var D = ({ className: c, classNameArrows: i, classNameActiveArrows: l, classNameHeaderContent: m }) => {
|
|
8
|
+
const { table: s, headerContent: d, onSorting: n } = k(), p = (a) => {
|
|
9
|
+
n([{
|
|
10
|
+
id: a.id,
|
|
11
|
+
desc: !1
|
|
12
|
+
}]);
|
|
13
|
+
}, x = (a) => {
|
|
14
|
+
n([{
|
|
15
|
+
id: a.id,
|
|
16
|
+
desc: !0
|
|
17
|
+
}]);
|
|
18
|
+
};
|
|
19
|
+
return /* @__PURE__ */ o("thead", {
|
|
20
|
+
className: t("kvt-header", "font-semibold", "uppercase", "text-slate-500", "text-xs", "not-italic", "bg-slate-100", "overflow-hidden", "dark:text-slate-300", "dark:bg-metal-800", c),
|
|
21
|
+
children: [d && /* @__PURE__ */ r("tr", {
|
|
22
|
+
"data-header-content": !0,
|
|
23
|
+
children: /* @__PURE__ */ r("th", {
|
|
24
|
+
colSpan: s.getVisibleLeafColumns().length,
|
|
25
|
+
className: t("kvt-header-content", "px-6", "py-4", "text-left", "text-sm", "font-normal", "normal-case", "text-slate-800", "bg-white", "rounded-tl-lg", "rounded-tr-lg", "border-b", "border-b-gray-200", "dark:border-b-0", "dark:text-metal-50", "dark:bg-metal-900", "dark:border-t", "dark:border-x", "dark:border-metal-700", m),
|
|
26
|
+
children: d
|
|
34
27
|
})
|
|
35
|
-
},
|
|
28
|
+
}), s.getHeaderGroups().map(({ id: a, headers: h }) => /* @__PURE__ */ r("tr", {
|
|
29
|
+
className: "kvt-header-row",
|
|
30
|
+
children: h.map(({ id: b, column: e, getContext: f }) => /* @__PURE__ */ r("th", {
|
|
31
|
+
scope: "col",
|
|
32
|
+
className: t("kvt-header-cell", "px-4", "py-3", "text-left", "text-xs", !d && "first:rounded-tl-lg", !d && "last:rounded-tr-lg", "border-transparent", "dark:border-t", "dark:border-metal-700", "dark:first:border-l", "dark:last:border-r", e.columnDef.meta?.headerClassName),
|
|
33
|
+
children: /* @__PURE__ */ o("span", {
|
|
34
|
+
className: "flex items-center gap-2 w-full",
|
|
35
|
+
children: [g(e.columnDef.header, f()), e.getCanSort() && /* @__PURE__ */ o("div", {
|
|
36
|
+
className: t("flex flex-col text-slate-400 justify-center items-center gap-1", i),
|
|
37
|
+
role: "presentation",
|
|
38
|
+
children: [/* @__PURE__ */ r(u, {
|
|
39
|
+
className: t("w-2 h-2 cursor-pointer", { "text-blue-600 dark:text-aurora-500": e.getIsSorted() === "asc" }, l),
|
|
40
|
+
onClick: () => p(e)
|
|
41
|
+
}), /* @__PURE__ */ r(C, {
|
|
42
|
+
className: t("w-2 h-2 cursor-pointer", { "text-blue-600 dark:text-aurora-500": e.getIsSorted() === "desc" }, l),
|
|
43
|
+
onClick: () => x(e)
|
|
44
|
+
})]
|
|
45
|
+
})]
|
|
46
|
+
})
|
|
47
|
+
}, b))
|
|
48
|
+
}, a))]
|
|
36
49
|
});
|
|
37
50
|
};
|
|
38
51
|
export {
|
|
39
|
-
|
|
52
|
+
D as Header
|
|
40
53
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import { useTableContext as
|
|
3
|
-
import { isPaginationBarVisible as
|
|
4
|
-
import { DotPaginate as
|
|
5
|
-
import { DropdownPaginate as
|
|
6
|
-
import { FormPaginate as
|
|
7
|
-
import { Fragment as
|
|
8
|
-
var
|
|
9
|
-
const { totalItems: r = -1 / 0,
|
|
10
|
-
return !
|
|
11
|
-
className:
|
|
1
|
+
import { t as x } from "../../../../utils-Cx-WzRZF.js";
|
|
2
|
+
import { useTableContext as g } from "../../contexts/table.hook.js";
|
|
3
|
+
import { isPaginationBarVisible as b } from "../../utils/pagination.js";
|
|
4
|
+
import { DotPaginate as u } from "../DotPaginate/DotPaginate.js";
|
|
5
|
+
import { DropdownPaginate as h } from "../DropdownPaginate/DropdownPaginate.js";
|
|
6
|
+
import { FormPaginate as v } from "../FormPaginate/FormPaginate.js";
|
|
7
|
+
import { Fragment as N, jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
8
|
+
var I = ({ showTotalItems: a = !0, showDropdownPagination: i = !0, showDotPagination: n = !0, showFormPagination: s = !0, pageSizes: l, classNamePagination: o, isLoading: m, isListPortal: d, dropdownPaginationDirection: c }) => {
|
|
9
|
+
const { totalItems: r = -1 / 0, tableLoading: p, isFirstLoad: f } = g();
|
|
10
|
+
return !b(r) || p || m ? null : /* @__PURE__ */ e(N, { children: /* @__PURE__ */ e("div", {
|
|
11
|
+
className: x("kvt-pagination", "bg-slate-50", "border", "border-y-transparent", "border-x-slate-100", "text-slate-500", "text-sm", "not-italic", "py-2", "px-6", "rounded-b-lg", "shadow", "dark:bg-metal-800", "dark:border-x-metal-700", "dark:border-b-metal-700", o, { "animate-in fade-in-10": !f }),
|
|
12
12
|
children: /* @__PURE__ */ t("div", {
|
|
13
13
|
className: "flex items-center justify-between",
|
|
14
14
|
children: [/* @__PURE__ */ t("div", {
|
|
@@ -18,15 +18,19 @@ var j = ({ showTotalItems: a = !0, showDropdownPagination: i = !0, showDotPagina
|
|
|
18
18
|
children: [r, " Results"]
|
|
19
19
|
}) : null, i && /* @__PURE__ */ e("div", {
|
|
20
20
|
className: "flex items-center gap-2",
|
|
21
|
-
children: /* @__PURE__ */ e(
|
|
21
|
+
children: /* @__PURE__ */ e(h, {
|
|
22
|
+
pageSizes: l,
|
|
23
|
+
isListPortal: d,
|
|
24
|
+
direction: c
|
|
25
|
+
})
|
|
22
26
|
})]
|
|
23
27
|
}), /* @__PURE__ */ t("div", {
|
|
24
28
|
className: "flex items-center gap-8",
|
|
25
|
-
children: [n && /* @__PURE__ */ e(
|
|
29
|
+
children: [n && /* @__PURE__ */ e(u, {}), s && /* @__PURE__ */ e(v, {})]
|
|
26
30
|
})]
|
|
27
31
|
})
|
|
28
|
-
})
|
|
32
|
+
}) });
|
|
29
33
|
};
|
|
30
34
|
export {
|
|
31
|
-
|
|
35
|
+
I as Pagination
|
|
32
36
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as l } from "../../../../utils-Cx-WzRZF.js";
|
|
2
|
-
import { Button as
|
|
3
|
-
import { t as
|
|
4
|
-
import { useTableContext as
|
|
2
|
+
import { Button as b } from "../../../Button/Button.js";
|
|
3
|
+
import { t as m } from "../../../../ellipsis-vertical-BBmhzIXn.js";
|
|
4
|
+
import { useTableContext as c } from "../../contexts/table.hook.js";
|
|
5
5
|
import { jsx as r } from "react/jsx-runtime";
|
|
6
|
-
var
|
|
7
|
-
const {
|
|
6
|
+
var y = ({ numberOfRows: i, table: o }) => {
|
|
7
|
+
const { tableLoading: n } = c(), t = Array.from({ length: i });
|
|
8
8
|
return /* @__PURE__ */ r("tbody", {
|
|
9
|
-
className: "text-slate-800 text-sm font-normal relative",
|
|
10
|
-
children: t.map((
|
|
9
|
+
className: "kvt-skeleton text-slate-800 text-sm font-normal relative",
|
|
10
|
+
children: t.map((h, e) => {
|
|
11
11
|
const d = o.getAllColumns();
|
|
12
12
|
return /* @__PURE__ */ r("tr", {
|
|
13
13
|
className: l("border-b", "border-b-gray-200", "bg-transparent", "last:border-b-transparent"),
|
|
@@ -25,13 +25,13 @@ var N = ({ numberOfRows: i, table: o }) => {
|
|
|
25
25
|
"[tr:last-child_&:first-of-type]:rounded-bl-lg": e === t.length - 1 && s === 0,
|
|
26
26
|
"[tr:last-child_&:last-of-type]:rounded-br-lg": e === t.length - 1 && s === d.length - 1
|
|
27
27
|
}),
|
|
28
|
-
children: /* @__PURE__ */ r(
|
|
28
|
+
children: /* @__PURE__ */ r(b, {
|
|
29
29
|
variant: "link",
|
|
30
30
|
shape: "circle",
|
|
31
31
|
size: "large",
|
|
32
32
|
disabled: !0,
|
|
33
33
|
"aria-hidden": "true",
|
|
34
|
-
children: /* @__PURE__ */ r(
|
|
34
|
+
children: /* @__PURE__ */ r(m, { className: l("w-5", "h-5", "text-slate-400", "dark:text-metal-700", { "text-gray-300 animate-pulse": n }) })
|
|
35
35
|
})
|
|
36
36
|
}, `skeleton-${a.id}`))
|
|
37
37
|
}, `skeleton-row-${e}`);
|
|
@@ -39,5 +39,5 @@ var N = ({ numberOfRows: i, table: o }) => {
|
|
|
39
39
|
});
|
|
40
40
|
};
|
|
41
41
|
export {
|
|
42
|
-
|
|
42
|
+
y as Skeleton
|
|
43
43
|
};
|