@konstructio/ui 0.1.2-alpha.5 → 0.1.2-alpha.50
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,23 +1,36 @@
|
|
|
1
1
|
import { c as a } from "../../index-D29mdTf5.js";
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
]
|
|
2
|
+
const e = a(
|
|
3
|
+
[
|
|
4
|
+
"rounded-md",
|
|
5
|
+
"p-4",
|
|
6
|
+
"flex",
|
|
7
|
+
"flex-row",
|
|
8
|
+
"relative",
|
|
9
|
+
"overflow-hidden",
|
|
10
|
+
"h-14",
|
|
11
|
+
"items-center",
|
|
12
|
+
"gap-8",
|
|
13
|
+
"data-[state=open]:animate-slide-in",
|
|
14
|
+
"data-[state=closed]:animate-hide",
|
|
15
|
+
"data-[swipe=move]:translate-x-4",
|
|
16
|
+
"data-[swipe=cancel]:translate-x-0",
|
|
17
|
+
"data-[swipe=end]:animate-swipe-out",
|
|
18
|
+
"text-white",
|
|
19
|
+
"shadow-[0px_2px_4px_0px_rgba(100,116,139,0.25)]"
|
|
20
|
+
],
|
|
21
|
+
{
|
|
22
|
+
variants: {
|
|
23
|
+
variant: {
|
|
24
|
+
success: ["bg-green-800"],
|
|
25
|
+
error: ["bg-red-800"],
|
|
26
|
+
warning: ["bg-amber-800"]
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
defaultVariants: {
|
|
30
|
+
variant: "success"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
), i = a([
|
|
21
34
|
"fixed",
|
|
22
35
|
"bottom-0",
|
|
23
36
|
"right-0",
|
|
@@ -30,15 +43,15 @@ const t = a([
|
|
|
30
43
|
"m-0",
|
|
31
44
|
"z-50",
|
|
32
45
|
"outline-none"
|
|
33
|
-
]),
|
|
46
|
+
]), s = a([
|
|
34
47
|
"top-2",
|
|
35
48
|
"right-2",
|
|
36
49
|
"w-4",
|
|
37
50
|
"h-4",
|
|
38
|
-
"text-
|
|
51
|
+
"text-white"
|
|
39
52
|
]);
|
|
40
53
|
export {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
54
|
+
s as closeToastVariants,
|
|
55
|
+
e as toastVariants,
|
|
56
|
+
i as viewportToastVariants
|
|
44
57
|
};
|
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { S as
|
|
3
|
-
import { forwardRef as v, useRef as N, useImperativeHandle as
|
|
1
|
+
import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import { S as u } from "../../index-BvoZGpli.js";
|
|
3
|
+
import { forwardRef as v, useRef as N, useImperativeHandle as h, useMemo as w, isValidElement as x } from "react";
|
|
4
4
|
import { cn as o } from "../../utils/index.js";
|
|
5
5
|
import { arrowVariants as R, tooltipVariants as V } from "./Tooltip.variants.js";
|
|
6
|
-
import { useTooltip as
|
|
6
|
+
import { useTooltip as T } from "./hooks/useTooltip.js";
|
|
7
|
+
import { Typography as b } from "../Typography/Typography.js";
|
|
7
8
|
const I = v(
|
|
8
|
-
({ children: r, content:
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
const
|
|
9
|
+
({ children: r, content: i, className: m, theme: l, position: a, wrapperClassName: n }, p) => {
|
|
10
|
+
const c = N(null), { isVisible: f, componentRef: t } = T();
|
|
11
|
+
h(p, () => t.current, [t]);
|
|
12
|
+
const d = w(
|
|
12
13
|
() => x(r) ? r : /* @__PURE__ */ e("p", { className: "p-2", children: r }),
|
|
13
14
|
[r]
|
|
14
15
|
);
|
|
15
|
-
return /* @__PURE__ */ e("div", { className: o("w-full",
|
|
16
|
-
/* @__PURE__ */ e(
|
|
17
|
-
/* @__PURE__ */
|
|
16
|
+
return /* @__PURE__ */ e("div", { className: o("w-full", n), "data-theme": l, children: /* @__PURE__ */ s("div", { className: "relative w-max", children: [
|
|
17
|
+
/* @__PURE__ */ e(u, { ref: t, className: o("cursor-pointer ", m), children: d }),
|
|
18
|
+
/* @__PURE__ */ s(
|
|
18
19
|
"div",
|
|
19
20
|
{
|
|
20
|
-
ref:
|
|
21
|
+
ref: c,
|
|
21
22
|
className: o(V({ position: a })),
|
|
22
|
-
"data-visible":
|
|
23
|
+
"data-visible": f,
|
|
23
24
|
children: [
|
|
24
25
|
/* @__PURE__ */ e("span", { className: o(R({ position: a })) }),
|
|
25
|
-
/* @__PURE__ */ e(
|
|
26
|
+
/* @__PURE__ */ e(b, { variant: "tooltip", className: "text-white", children: i })
|
|
26
27
|
]
|
|
27
28
|
}
|
|
28
29
|
)
|
|
@@ -3,8 +3,9 @@ const a = r(
|
|
|
3
3
|
[
|
|
4
4
|
"absolute",
|
|
5
5
|
"w-max",
|
|
6
|
-
"
|
|
7
|
-
"
|
|
6
|
+
"py-2",
|
|
7
|
+
"px-[6px]",
|
|
8
|
+
"rounded-xs",
|
|
8
9
|
"shadow-md",
|
|
9
10
|
"transition-all",
|
|
10
11
|
"ease-linear",
|
|
@@ -12,7 +13,7 @@ const a = r(
|
|
|
12
13
|
"duration-250",
|
|
13
14
|
"[&[data-visible='true']]:opacity-100",
|
|
14
15
|
"delay-100",
|
|
15
|
-
"bg-
|
|
16
|
+
"bg-slate-700"
|
|
16
17
|
],
|
|
17
18
|
{
|
|
18
19
|
variants: {
|
|
@@ -28,7 +29,7 @@ const a = r(
|
|
|
28
29
|
}
|
|
29
30
|
}
|
|
30
31
|
), o = r(
|
|
31
|
-
["absolute", "w-0", "h-0", "border-
|
|
32
|
+
["absolute", "w-0", "h-0", "border-slate-700"],
|
|
32
33
|
{
|
|
33
34
|
variants: {
|
|
34
35
|
position: {
|
|
@@ -1,28 +1,26 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { typographyVariants as
|
|
5
|
-
const h =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
);
|
|
25
|
-
h.displayName = "Typography";
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as y } from "react";
|
|
3
|
+
import { cn as c } from "../../utils/index.js";
|
|
4
|
+
import { typographyVariants as f } from "./Typography.variants.js";
|
|
5
|
+
const h = y(({ className: r, theme: p, children: t, variant: o, component: m, ...e }, s) => {
|
|
6
|
+
const a = m ?? (o?.includes("h") ? o : "p");
|
|
7
|
+
return /* @__PURE__ */ n(
|
|
8
|
+
a,
|
|
9
|
+
{
|
|
10
|
+
ref: s,
|
|
11
|
+
"data-theme": p,
|
|
12
|
+
className: c(
|
|
13
|
+
f({
|
|
14
|
+
className: r,
|
|
15
|
+
variant: o
|
|
16
|
+
})
|
|
17
|
+
),
|
|
18
|
+
...e,
|
|
19
|
+
children: t
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
});
|
|
23
|
+
h.displayName = "KonstructTypography";
|
|
26
24
|
export {
|
|
27
25
|
h as Typography
|
|
28
26
|
};
|
|
@@ -1,57 +1,60 @@
|
|
|
1
1
|
import { c as t } from "../../index-D29mdTf5.js";
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"text-[
|
|
14
|
-
"font-medium",
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
2
|
+
const a = t(
|
|
3
|
+
["text-slate-800", "dark:text-metal-50"],
|
|
4
|
+
{
|
|
5
|
+
variants: {
|
|
6
|
+
variant: {
|
|
7
|
+
h1: ["text-[57px]", "leading-16"],
|
|
8
|
+
h2: ["text-[45px]", "leading-13"],
|
|
9
|
+
h3: ["text-4xl", "leading-11"],
|
|
10
|
+
h4: ["text-[32px]", "leading-10"],
|
|
11
|
+
h5: ["text-[28px]", "leading-9"],
|
|
12
|
+
h6: ["text-2xl", "font-medium", "leading-8", "tracking-[0.15px]"],
|
|
13
|
+
subtitle1: ["text-[22px]", "leading-7"],
|
|
14
|
+
subtitle2: ["text-sm", "font-medium", "leading-6", "tracking-[0.15px]"],
|
|
15
|
+
subtitle3: [
|
|
16
|
+
"text-[14px]",
|
|
17
|
+
"font-medium",
|
|
18
|
+
"leading-5",
|
|
19
|
+
"tracking-[0.1px]"
|
|
20
|
+
],
|
|
21
|
+
labelLarge: [
|
|
22
|
+
"text-sm",
|
|
23
|
+
"font-medium",
|
|
24
|
+
"text-slate-500",
|
|
25
|
+
"dark:text-metal-50"
|
|
26
|
+
],
|
|
27
|
+
labelMedium: [
|
|
28
|
+
"text-[12px]",
|
|
29
|
+
"font-medium",
|
|
30
|
+
"leading-4",
|
|
31
|
+
"tracking-[0.5px]",
|
|
32
|
+
"uppercase"
|
|
33
|
+
],
|
|
34
|
+
labelSmall: [
|
|
35
|
+
"text-[11px]",
|
|
36
|
+
"font-medium",
|
|
37
|
+
"leading-4",
|
|
38
|
+
"tracking-[0.5px]",
|
|
39
|
+
"uppercase"
|
|
40
|
+
],
|
|
41
|
+
buttonSmall: [
|
|
42
|
+
"text-[14px]",
|
|
43
|
+
"font-semibold",
|
|
44
|
+
"leading-5",
|
|
45
|
+
"tracking-[0.25px]"
|
|
46
|
+
],
|
|
47
|
+
body1: ["text-base", "leading-6", "tracking-[0.5px]"],
|
|
48
|
+
body2: ["text-sm", "leading-5", "tracking-[0.25px]"],
|
|
49
|
+
body3: ["text-xs", "leading-4", "tracking-[0.4px]"],
|
|
50
|
+
tooltip: ["text-sm", "leading-5.5"]
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
defaultVariants: {
|
|
54
|
+
variant: "body1"
|
|
49
55
|
}
|
|
50
|
-
},
|
|
51
|
-
defaultVariants: {
|
|
52
|
-
variant: "body1"
|
|
53
56
|
}
|
|
54
|
-
|
|
57
|
+
);
|
|
55
58
|
export {
|
|
56
|
-
|
|
59
|
+
a as typographyVariants
|
|
57
60
|
};
|
|
@@ -1,99 +1,125 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
2
|
-
import { useMemo as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { TableProvider as
|
|
5
|
-
import { Filter as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { jsx as r, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as I } from "react";
|
|
3
|
+
import { cn as c } from "../../utils/index.js";
|
|
4
|
+
import { TableProvider as K } from "./contexts/table.provider.js";
|
|
5
|
+
import { Filter as M } from "./components/Filter/Filter.js";
|
|
6
|
+
import { WrapperBody as W } from "./components/WrapperBody/WrapperBody.js";
|
|
7
|
+
import { Header as g } from "./components/Header/Header.js";
|
|
8
|
+
import { Body as q } from "./components/Body/Body.js";
|
|
9
|
+
import { Pagination as C } from "./components/Pagination/Pagination.js";
|
|
10
|
+
import { TruncateText as F } from "./components/TruncateText/TruncateText.js";
|
|
11
|
+
import { Actions as G } from "./components/Actions/Actions.js";
|
|
12
|
+
const J = ({
|
|
13
|
+
id: n,
|
|
14
|
+
ariaLabel: p,
|
|
14
15
|
columns: d,
|
|
15
|
-
data:
|
|
16
|
-
totalItems:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
data: f,
|
|
17
|
+
totalItems: u = -1 / 0,
|
|
18
|
+
className: b,
|
|
19
|
+
classNameHeaderActiveArrows: T,
|
|
20
|
+
classNameHeaderArrows: N,
|
|
21
|
+
classNameHeaderTable: x,
|
|
22
|
+
classNameTable: A,
|
|
23
|
+
classNameWrapperTable: y,
|
|
24
|
+
isLoading: a,
|
|
25
|
+
fetchData: h,
|
|
26
|
+
queryOptions: z,
|
|
21
27
|
// Pagination
|
|
22
|
-
showPagination:
|
|
23
|
-
showTotalItems:
|
|
24
|
-
showDropdownPagination:
|
|
25
|
-
showDotPagination:
|
|
26
|
-
showFormPagination:
|
|
27
|
-
pageSizes:
|
|
28
|
+
showPagination: B,
|
|
29
|
+
showTotalItems: t,
|
|
30
|
+
showDropdownPagination: i,
|
|
31
|
+
showDotPagination: l,
|
|
32
|
+
showFormPagination: m,
|
|
33
|
+
pageSizes: V,
|
|
28
34
|
// Filter
|
|
29
|
-
showFilter:
|
|
30
|
-
showFilterInput:
|
|
35
|
+
showFilter: j = !1,
|
|
36
|
+
showFilterInput: k,
|
|
31
37
|
filterSearchPlaceholder: v = "",
|
|
32
|
-
multiSelectFilter:
|
|
38
|
+
multiSelectFilter: w,
|
|
39
|
+
filterActions: P,
|
|
40
|
+
showResetButton: E = !0,
|
|
41
|
+
resetButtonClassName: H
|
|
33
42
|
}) => {
|
|
34
|
-
const
|
|
35
|
-
() =>
|
|
36
|
-
|
|
43
|
+
const e = I(
|
|
44
|
+
() => B || [
|
|
45
|
+
t,
|
|
46
|
+
i,
|
|
37
47
|
l,
|
|
38
|
-
|
|
39
|
-
i
|
|
48
|
+
m
|
|
40
49
|
].some(Boolean),
|
|
41
50
|
[]
|
|
42
51
|
);
|
|
43
52
|
return /* @__PURE__ */ r(
|
|
44
|
-
|
|
53
|
+
K,
|
|
45
54
|
{
|
|
46
|
-
id:
|
|
55
|
+
id: n,
|
|
47
56
|
columns: d,
|
|
48
|
-
data:
|
|
49
|
-
fetchData:
|
|
50
|
-
totalItems:
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
57
|
+
data: f,
|
|
58
|
+
fetchData: h,
|
|
59
|
+
totalItems: u,
|
|
60
|
+
queryOptions: z,
|
|
61
|
+
isPaginationEnabled: e,
|
|
62
|
+
children: /* @__PURE__ */ s("section", { className: c("w-full min-w-fit", b), children: [
|
|
63
|
+
j && /* @__PURE__ */ r(
|
|
64
|
+
M,
|
|
54
65
|
{
|
|
66
|
+
actions: P,
|
|
67
|
+
multiSelectFilter: w,
|
|
55
68
|
placeholder: v,
|
|
56
|
-
|
|
57
|
-
|
|
69
|
+
showFilterInput: k,
|
|
70
|
+
showResetButton: E,
|
|
71
|
+
resetButtonClassName: H
|
|
58
72
|
}
|
|
59
73
|
),
|
|
60
74
|
/* @__PURE__ */ r(
|
|
61
|
-
|
|
75
|
+
W,
|
|
62
76
|
{
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
children: /* @__PURE__ */
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
+
showPagination: e,
|
|
78
|
+
classNameWrapperTable: y,
|
|
79
|
+
isLoading: a,
|
|
80
|
+
children: /* @__PURE__ */ s(
|
|
81
|
+
"table",
|
|
82
|
+
{
|
|
83
|
+
className: c(
|
|
84
|
+
"w-full border-collapse table-auto",
|
|
85
|
+
"dark:border-separate dark:border-spacing-0",
|
|
86
|
+
A
|
|
87
|
+
),
|
|
88
|
+
"aria-label": p,
|
|
89
|
+
children: [
|
|
90
|
+
/* @__PURE__ */ r(
|
|
91
|
+
g,
|
|
92
|
+
{
|
|
93
|
+
className: x,
|
|
94
|
+
classNameArrows: N,
|
|
95
|
+
classNameActiveArrows: T
|
|
96
|
+
}
|
|
97
|
+
),
|
|
98
|
+
/* @__PURE__ */ r(q, { isLoading: a, showPagination: e })
|
|
99
|
+
]
|
|
100
|
+
}
|
|
101
|
+
)
|
|
77
102
|
}
|
|
78
103
|
),
|
|
79
|
-
|
|
80
|
-
|
|
104
|
+
e && /* @__PURE__ */ r(
|
|
105
|
+
C,
|
|
81
106
|
{
|
|
82
|
-
showTotalItems:
|
|
83
|
-
showDropdownPagination:
|
|
84
|
-
showDotPagination:
|
|
85
|
-
showFormPagination:
|
|
86
|
-
pageSizes:
|
|
107
|
+
showTotalItems: t,
|
|
108
|
+
showDropdownPagination: i,
|
|
109
|
+
showDotPagination: l,
|
|
110
|
+
showFormPagination: m,
|
|
111
|
+
pageSizes: V,
|
|
112
|
+
isLoading: a
|
|
87
113
|
}
|
|
88
114
|
)
|
|
89
115
|
] })
|
|
90
116
|
}
|
|
91
117
|
);
|
|
92
|
-
},
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
118
|
+
}, o = J;
|
|
119
|
+
o.displayName = "KonstructVirtualizedTable";
|
|
120
|
+
o.TruncateText = F;
|
|
121
|
+
o.Actions = G;
|
|
96
122
|
export {
|
|
97
|
-
|
|
98
|
-
|
|
123
|
+
F as TruncateText,
|
|
124
|
+
o as VirtualizedTable
|
|
99
125
|
};
|
|
@@ -1,46 +1,108 @@
|
|
|
1
|
-
import { jsxs as l, jsx as
|
|
2
|
-
import { Button as
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
], n = c("ellipsis-vertical", s), u = ({
|
|
15
|
-
actions: t,
|
|
16
|
-
...o
|
|
17
|
-
}) => t ? /* @__PURE__ */ l("div", { className: "relative group w-fit", children: [
|
|
1
|
+
import { jsxs as l, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { Button as a } from "../../../Button/Button.js";
|
|
3
|
+
import { cn as e } from "../../../../utils/index.js";
|
|
4
|
+
import { E as u } from "../../../../ellipsis-vertical-BVPtjl5f.js";
|
|
5
|
+
const b = ({
|
|
6
|
+
actions: o,
|
|
7
|
+
wrapperClassName: i,
|
|
8
|
+
triggerButtonClassName: n,
|
|
9
|
+
iconTriggerButtonClassName: s,
|
|
10
|
+
wrapperActionsClassName: d,
|
|
11
|
+
wrapperContentActionsClassName: h,
|
|
12
|
+
...c
|
|
13
|
+
}) => o ? /* @__PURE__ */ l("div", { className: e("relative group", i), children: [
|
|
18
14
|
/* @__PURE__ */ l(
|
|
19
|
-
|
|
15
|
+
a,
|
|
20
16
|
{
|
|
21
|
-
variant: "
|
|
17
|
+
variant: "link",
|
|
22
18
|
shape: "circle",
|
|
23
19
|
size: "large",
|
|
24
|
-
className:
|
|
20
|
+
className: e(
|
|
21
|
+
"text-slate-400",
|
|
22
|
+
"group-hover:text-slate-800",
|
|
23
|
+
"group-hover:bg-aurora-50",
|
|
24
|
+
"dark:text-metal-400",
|
|
25
|
+
"dark:group-hover:text-aurora-500",
|
|
26
|
+
"dark:group-hover:bg-aurora-900",
|
|
27
|
+
n
|
|
28
|
+
),
|
|
25
29
|
role: "presentation",
|
|
26
30
|
children: [
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
-
|
|
31
|
+
/* @__PURE__ */ r(
|
|
32
|
+
u,
|
|
33
|
+
{
|
|
34
|
+
"aria-hidden": "true",
|
|
35
|
+
className: e("w-7 h-7", s)
|
|
36
|
+
}
|
|
37
|
+
),
|
|
38
|
+
/* @__PURE__ */ r("span", { className: "sr-only", children: "Show Actions" })
|
|
29
39
|
]
|
|
30
40
|
}
|
|
31
41
|
),
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
-
|
|
42
|
+
/* @__PURE__ */ r(
|
|
43
|
+
"div",
|
|
34
44
|
{
|
|
35
|
-
className:
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
45
|
+
className: e(
|
|
46
|
+
"absolute",
|
|
47
|
+
"top-full",
|
|
48
|
+
"right-0",
|
|
49
|
+
"w-53.75",
|
|
50
|
+
"hidden",
|
|
51
|
+
"group-hover:block",
|
|
52
|
+
"z-10",
|
|
53
|
+
d
|
|
54
|
+
),
|
|
55
|
+
children: /* @__PURE__ */ r(
|
|
56
|
+
"div",
|
|
57
|
+
{
|
|
58
|
+
className: e(
|
|
59
|
+
"bg-white",
|
|
60
|
+
"mt-0.5",
|
|
61
|
+
"py-2",
|
|
62
|
+
"rounded-lg",
|
|
63
|
+
"shadow-lg",
|
|
64
|
+
"border",
|
|
65
|
+
"border-zinc-100",
|
|
66
|
+
"animate-in",
|
|
67
|
+
"fade-in-0",
|
|
68
|
+
"dark:bg-metal-800",
|
|
69
|
+
"dark:border-metal-700",
|
|
70
|
+
h
|
|
71
|
+
),
|
|
72
|
+
children: o.map(({ label: t, className: m, onClick: p }) => /* @__PURE__ */ r(
|
|
73
|
+
a,
|
|
74
|
+
{
|
|
75
|
+
className: e(
|
|
76
|
+
"w-full",
|
|
77
|
+
"text-slate-800",
|
|
78
|
+
"cursor-pointer",
|
|
79
|
+
"p-0",
|
|
80
|
+
"h-9",
|
|
81
|
+
"flex",
|
|
82
|
+
"gap-2",
|
|
83
|
+
"text-sm",
|
|
84
|
+
"font-normal",
|
|
85
|
+
"justify-start",
|
|
86
|
+
"rounded-none",
|
|
87
|
+
"px-6",
|
|
88
|
+
"hover:bg-gray-50",
|
|
89
|
+
"hover:text-slate-800",
|
|
90
|
+
"hover:no-underline",
|
|
91
|
+
"dark:hover:bg-metal-700",
|
|
92
|
+
m
|
|
93
|
+
),
|
|
94
|
+
variant: "link",
|
|
95
|
+
asChild: !0,
|
|
96
|
+
role: "presentation",
|
|
97
|
+
children: /* @__PURE__ */ r(a, { onClick: () => p(c.row.original), children: t })
|
|
98
|
+
},
|
|
99
|
+
t
|
|
100
|
+
))
|
|
101
|
+
}
|
|
102
|
+
)
|
|
103
|
+
}
|
|
104
|
+
)
|
|
43
105
|
] }) : null;
|
|
44
106
|
export {
|
|
45
|
-
|
|
107
|
+
b as Actions
|
|
46
108
|
};
|