@konstructio/ui 0.1.2-alpha.31 → 0.1.2-alpha.33
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/{Modal-5xSxFoaD.js → Modal-CtAG97Ts.js} +1 -1
- package/dist/chevron-left-C4LEg1fH.js +7 -0
- 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/Command/Command.js +1 -1
- package/dist/components/Command/components/Command.js +1 -1
- package/dist/components/Command/components/CommandEmpty.js +1 -1
- package/dist/components/Command/components/CommandGroup.js +1 -1
- package/dist/components/Command/components/CommandInput.js +1 -1
- package/dist/components/Command/components/CommandItem.js +1 -1
- package/dist/components/Command/components/CommandList.js +1 -1
- package/dist/components/Command/components/CommandSeparator.js +1 -1
- package/dist/components/Command/components/DialogContent.js +1 -1
- package/dist/components/Command/components/DialogOverlay.js +1 -1
- package/dist/components/Datepicker/DatePicker.js +273 -283
- package/dist/components/Input/Input.variants.js +2 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Modal/components/Wrapper/Wrapper.js +2 -2
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/PhoneNumberInput/PhoneNumberInput.variants.js +5 -4
- package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +1089 -1084
- package/dist/components/VirtualizedTable/VirtualizedTable.js +25 -23
- package/dist/components/VirtualizedTable/components/DotPaginate/DotPaginate.js +1 -1
- package/dist/components/VirtualizedTable/components/Filter/Filter.js +37 -32
- package/dist/components/index.js +1 -1
- package/dist/{index-DDByhzds.js → index-C65LtGuU.js} +1 -1
- package/dist/{index-X4k_cU8k.js → index-CdwPV0FE.js} +1 -1
- package/dist/{index-kyuBfLcN.js → index-Ds6U2x4Z.js} +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -1
- package/dist/package.json +12 -12
- package/dist/styles.css +1 -1
- package/package.json +12 -12
- package/dist/chevron-right-DYvXLeql.js +0 -7
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as r, jsxs as s } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo as
|
|
2
|
+
import { useMemo as K } from "react";
|
|
3
3
|
import { cn as c } from "../../utils/index.js";
|
|
4
|
-
import { TableProvider as
|
|
5
|
-
import { Filter as
|
|
6
|
-
import { WrapperBody as
|
|
7
|
-
import { Header as
|
|
8
|
-
import { Body as
|
|
9
|
-
import { Pagination as
|
|
10
|
-
import { TruncateText as
|
|
11
|
-
import { Actions as
|
|
12
|
-
const
|
|
4
|
+
import { TableProvider as M } from "./contexts/table.provider.js";
|
|
5
|
+
import { Filter as W } from "./components/Filter/Filter.js";
|
|
6
|
+
import { WrapperBody as k } from "./components/WrapperBody/WrapperBody.js";
|
|
7
|
+
import { Header as q } from "./components/Header/Header.js";
|
|
8
|
+
import { Body as C } from "./components/Body/Body.js";
|
|
9
|
+
import { Pagination as F } from "./components/Pagination/Pagination.js";
|
|
10
|
+
import { TruncateText as G } from "./components/TruncateText/TruncateText.js";
|
|
11
|
+
import { Actions as J } from "./components/Actions/Actions.js";
|
|
12
|
+
const O = ({
|
|
13
13
|
id: n,
|
|
14
14
|
ariaLabel: f,
|
|
15
15
|
columns: p,
|
|
@@ -37,9 +37,10 @@ const J = ({
|
|
|
37
37
|
filterSearchPlaceholder: w = "",
|
|
38
38
|
multiSelectFilter: P,
|
|
39
39
|
filterActions: E,
|
|
40
|
-
showResetButton: H = !0
|
|
40
|
+
showResetButton: H = !0,
|
|
41
|
+
resetButtonClassName: I
|
|
41
42
|
}) => {
|
|
42
|
-
const e =
|
|
43
|
+
const e = K(
|
|
43
44
|
() => B || [
|
|
44
45
|
t,
|
|
45
46
|
a,
|
|
@@ -49,7 +50,7 @@ const J = ({
|
|
|
49
50
|
[]
|
|
50
51
|
);
|
|
51
52
|
return /* @__PURE__ */ r(
|
|
52
|
-
|
|
53
|
+
M,
|
|
53
54
|
{
|
|
54
55
|
id: n,
|
|
55
56
|
columns: p,
|
|
@@ -60,17 +61,18 @@ const J = ({
|
|
|
60
61
|
isPaginationEnabled: e,
|
|
61
62
|
children: /* @__PURE__ */ s("section", { className: c("w-full min-w-fit", b), children: [
|
|
62
63
|
j && /* @__PURE__ */ r(
|
|
63
|
-
|
|
64
|
+
W,
|
|
64
65
|
{
|
|
65
66
|
actions: E,
|
|
66
67
|
multiSelectFilter: P,
|
|
67
68
|
placeholder: w,
|
|
68
69
|
showFilterInput: v,
|
|
69
|
-
showResetButton: H
|
|
70
|
+
showResetButton: H,
|
|
71
|
+
resetButtonClassName: I
|
|
70
72
|
}
|
|
71
73
|
),
|
|
72
74
|
/* @__PURE__ */ r(
|
|
73
|
-
|
|
75
|
+
k,
|
|
74
76
|
{
|
|
75
77
|
showPagination: e,
|
|
76
78
|
classNameWrapperTable: y,
|
|
@@ -82,21 +84,21 @@ const J = ({
|
|
|
82
84
|
"aria-label": f,
|
|
83
85
|
children: [
|
|
84
86
|
/* @__PURE__ */ r(
|
|
85
|
-
|
|
87
|
+
q,
|
|
86
88
|
{
|
|
87
89
|
className: N,
|
|
88
90
|
classNameArrows: x,
|
|
89
91
|
classNameActiveArrows: T
|
|
90
92
|
}
|
|
91
93
|
),
|
|
92
|
-
/* @__PURE__ */ r(
|
|
94
|
+
/* @__PURE__ */ r(C, { isLoading: o, showPagination: e })
|
|
93
95
|
]
|
|
94
96
|
}
|
|
95
97
|
)
|
|
96
98
|
}
|
|
97
99
|
),
|
|
98
100
|
e && /* @__PURE__ */ r(
|
|
99
|
-
|
|
101
|
+
F,
|
|
100
102
|
{
|
|
101
103
|
showTotalItems: t,
|
|
102
104
|
showDropdownPagination: a,
|
|
@@ -109,11 +111,11 @@ const J = ({
|
|
|
109
111
|
] })
|
|
110
112
|
}
|
|
111
113
|
);
|
|
112
|
-
}, i =
|
|
114
|
+
}, i = O;
|
|
113
115
|
i.displayName = "KonstructVirtualizedTable";
|
|
114
|
-
i.TruncateText =
|
|
115
|
-
i.Actions =
|
|
116
|
+
i.TruncateText = G;
|
|
117
|
+
i.Actions = J;
|
|
116
118
|
export {
|
|
117
|
-
|
|
119
|
+
G as TruncateText,
|
|
118
120
|
i as VirtualizedTable
|
|
119
121
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as i, jsxs as m } from "react/jsx-runtime";
|
|
2
2
|
import { memo as u } from "react";
|
|
3
3
|
import { cn as p } from "../../../../utils/index.js";
|
|
4
|
-
import { C as g, a as d } from "../../../../chevron-
|
|
4
|
+
import { C as g, a as d } from "../../../../chevron-left-C4LEg1fH.js";
|
|
5
5
|
import { useTableContext as f } from "../../contexts/table.hook.js";
|
|
6
6
|
const r = u(
|
|
7
7
|
({
|
|
@@ -1,68 +1,70 @@
|
|
|
1
1
|
import { jsxs as m, jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import { d as
|
|
3
|
-
import { useRef as
|
|
4
|
-
import { Filter as n } from "../../../Filter/Filter.js";
|
|
5
|
-
import { Input as R } from "../../../Input/Input.js";
|
|
2
|
+
import { d as O } from "../../../../debounce-BFejQm9P.js";
|
|
3
|
+
import { useRef as R, useCallback as u, useMemo as p } from "react";
|
|
6
4
|
import { Button as y } from "../../../Button/Button.js";
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
import { Filter as s } from "../../../Filter/Filter.js";
|
|
6
|
+
import { Input as B } from "../../../Input/Input.js";
|
|
7
|
+
import { cn as N } from "../../../../utils/index.js";
|
|
8
|
+
import { useTableContext as T } from "../../contexts/table.hook.js";
|
|
9
|
+
const E = ({
|
|
10
|
+
actions: f,
|
|
11
|
+
multiSelectFilter: d,
|
|
11
12
|
placeholder: h,
|
|
12
13
|
showFilterInput: g = !0,
|
|
13
|
-
showResetButton: x = !0
|
|
14
|
+
showResetButton: x = !0,
|
|
15
|
+
resetButtonClassName: C
|
|
14
16
|
}) => {
|
|
15
|
-
const
|
|
17
|
+
const n = R(null), {
|
|
16
18
|
termOfSearch: o,
|
|
17
19
|
multiselectSelected: c,
|
|
18
20
|
onChangeTermOfSearch: a,
|
|
19
21
|
onSelectMultiselect: i
|
|
20
|
-
} =
|
|
22
|
+
} = T(), S = u(
|
|
21
23
|
(e, t) => i(
|
|
22
24
|
e,
|
|
23
25
|
t.map((r) => r.id)
|
|
24
26
|
),
|
|
25
27
|
[i]
|
|
26
|
-
),
|
|
27
|
-
a(""),
|
|
28
|
-
}, [a]),
|
|
29
|
-
() =>
|
|
28
|
+
), b = u(() => {
|
|
29
|
+
a(""), n.current && (n.current.value = "");
|
|
30
|
+
}, [a]), F = p(
|
|
31
|
+
() => O((e) => {
|
|
30
32
|
a(e.target.value);
|
|
31
33
|
}, 500),
|
|
32
34
|
[a]
|
|
33
|
-
),
|
|
35
|
+
), M = p(
|
|
34
36
|
() => !!o || Object.entries(c ?? {}).map(([, e]) => e).flat().length > 0,
|
|
35
37
|
[o, c]
|
|
36
38
|
);
|
|
37
39
|
return /* @__PURE__ */ m("div", { className: "w-full flex items-center justify-end pb-6", children: [
|
|
38
40
|
g && /* @__PURE__ */ l(
|
|
39
|
-
|
|
41
|
+
B,
|
|
40
42
|
{
|
|
41
|
-
ref:
|
|
43
|
+
ref: n,
|
|
42
44
|
placeholder: h,
|
|
43
45
|
isSearch: !0,
|
|
44
46
|
autoComplete: "false",
|
|
45
47
|
className: "w-72",
|
|
46
48
|
inputMode: "search",
|
|
47
|
-
onChange:
|
|
49
|
+
onChange: F
|
|
48
50
|
}
|
|
49
51
|
),
|
|
50
|
-
/* @__PURE__ */ m(
|
|
51
|
-
|
|
52
|
-
({ key: e, label: t, position: r = "right", options:
|
|
53
|
-
|
|
52
|
+
/* @__PURE__ */ m(s, { children: [
|
|
53
|
+
d?.map(
|
|
54
|
+
({ key: e, label: t, position: r = "right", options: j }) => /* @__PURE__ */ l(
|
|
55
|
+
s.BadgeMultiSelect,
|
|
54
56
|
{
|
|
55
57
|
label: t,
|
|
56
58
|
position: r,
|
|
57
|
-
options:
|
|
58
|
-
onApply: (
|
|
59
|
-
|
|
59
|
+
options: j,
|
|
60
|
+
onApply: (v) => {
|
|
61
|
+
S(e, v);
|
|
60
62
|
}
|
|
61
63
|
},
|
|
62
64
|
t
|
|
63
65
|
)
|
|
64
66
|
),
|
|
65
|
-
|
|
67
|
+
f?.map(({ label: e, onClick: t, variant: r = "secondary" }) => /* @__PURE__ */ l(
|
|
66
68
|
y,
|
|
67
69
|
{
|
|
68
70
|
variant: r,
|
|
@@ -73,16 +75,19 @@ const $ = ({
|
|
|
73
75
|
e
|
|
74
76
|
)),
|
|
75
77
|
x && /* @__PURE__ */ l(
|
|
76
|
-
|
|
78
|
+
s.ResetButton,
|
|
77
79
|
{
|
|
78
|
-
className:
|
|
79
|
-
|
|
80
|
-
|
|
80
|
+
className: N(
|
|
81
|
+
"text-slate-700 hover:text-slate-700 disabled:text-slate-700/45 select-none",
|
|
82
|
+
C
|
|
83
|
+
),
|
|
84
|
+
disabled: !M,
|
|
85
|
+
onClick: b
|
|
81
86
|
}
|
|
82
87
|
)
|
|
83
88
|
] })
|
|
84
89
|
] });
|
|
85
90
|
};
|
|
86
91
|
export {
|
|
87
|
-
|
|
92
|
+
E as Filter
|
|
88
93
|
};
|
package/dist/components/index.js
CHANGED
|
@@ -13,7 +13,7 @@ import { DropdownButton as h } from "./DropdownButton/DropdownButton.js";
|
|
|
13
13
|
import { Filter as P } from "./Filter/Filter.js";
|
|
14
14
|
import { Input as w } from "./Input/Input.js";
|
|
15
15
|
import { Loading as k } from "./Loading/Loading.js";
|
|
16
|
-
import { M as G } from "../Modal-
|
|
16
|
+
import { M as G } from "../Modal-CtAG97Ts.js";
|
|
17
17
|
import { NumberInput as L } from "./NumberInput/NumberInput.js";
|
|
18
18
|
import { PhoneNumberInput as y } from "./PhoneNumberInput/PhoneNumberInput.js";
|
|
19
19
|
import { PieChart as O } from "./PieChart/PieChart.js";
|
|
@@ -2,7 +2,7 @@ import { jsx as a, Fragment as O, jsxs as w } from "react/jsx-runtime";
|
|
|
2
2
|
import * as l from "react";
|
|
3
3
|
import { c as I, b as x } from "./index-CIAmiWcw.js";
|
|
4
4
|
import { u } from "./index-DLcqcWxM.js";
|
|
5
|
-
import { c as A, R as M, P as L, O as $, W as F, C as B, T as G, d as W, b as v, e as j } from "./index-
|
|
5
|
+
import { c as A, R as M, P as L, O as $, W as F, C as B, T as G, d as W, b as v, e as j } from "./index-Ds6U2x4Z.js";
|
|
6
6
|
import { Button as Y } from "./components/Button/Button.js";
|
|
7
7
|
import { cn as k } from "./utils/index.js";
|
|
8
8
|
var q = Symbol("radix.slottable");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as Ee, P as ke, O as Se, C as Ie } from "./index-
|
|
1
|
+
import { R as Ee, P as ke, O as Se, C as Ie } from "./index-Ds6U2x4Z.js";
|
|
2
2
|
import * as n from "react";
|
|
3
3
|
import { P as C } from "./index-CIAmiWcw.js";
|
|
4
4
|
import { u as P } from "./index-BbQkJE5L.js";
|
|
@@ -7,7 +7,7 @@ import { u as $ } from "./index-0ioNhtNM.js";
|
|
|
7
7
|
import { jsx as u, jsxs as j, Fragment as B } from "react/jsx-runtime";
|
|
8
8
|
import { P as be } from "./index-CSFe9uC5.js";
|
|
9
9
|
import { P as U } from "./index-mPY_8Y5v.js";
|
|
10
|
-
import { R as Re } from "./Combination-
|
|
10
|
+
import { R as Re } from "./Combination-BtmnusWq.js";
|
|
11
11
|
var x = "focusScope.autoFocusOnMount", W = "focusScope.autoFocusOnUnmount", q = { bubbles: !1, cancelable: !0 }, Ae = "FocusScope", Q = i.forwardRef((e, t) => {
|
|
12
12
|
const {
|
|
13
13
|
loop: n = !1,
|
package/dist/index.d.ts
CHANGED
|
@@ -601,13 +601,11 @@ declare type Props_3 = {
|
|
|
601
601
|
* @required
|
|
602
602
|
*/
|
|
603
603
|
values: number[];
|
|
604
|
-
}
|
|
605
|
-
/**
|
|
604
|
+
} /**
|
|
606
605
|
* Union type that enforces either:
|
|
607
606
|
* - No title and no subtitle
|
|
608
607
|
* - Title with optional subtitle
|
|
609
|
-
*/
|
|
610
|
-
({
|
|
608
|
+
*/ & ({
|
|
611
609
|
title?: undefined;
|
|
612
610
|
subtitle?: never;
|
|
613
611
|
} | {
|
|
@@ -659,6 +657,7 @@ declare type Props_5<TData extends RowData_2> = VariantProps<typeof virtualizeTa
|
|
|
659
657
|
showFilterInput?: boolean;
|
|
660
658
|
filterActions?: FilterAction[];
|
|
661
659
|
showResetButton?: boolean;
|
|
660
|
+
resetButtonClassName?: string;
|
|
662
661
|
} | {
|
|
663
662
|
filterSearchPlaceholder?: never;
|
|
664
663
|
multiSelectFilter?: never;
|
|
@@ -666,6 +665,7 @@ declare type Props_5<TData extends RowData_2> = VariantProps<typeof virtualizeTa
|
|
|
666
665
|
showFilterInput?: never;
|
|
667
666
|
filterActions?: FilterAction[];
|
|
668
667
|
showResetButton?: never;
|
|
668
|
+
resetButtonClassName?: never;
|
|
669
669
|
});
|
|
670
670
|
|
|
671
671
|
declare type Props_6<TData extends RowData> = CellContext<TData, unknown> & {
|
package/dist/index.js
CHANGED
|
@@ -16,7 +16,7 @@ import { BadgeMultiSelect as k } from "./components/Filter/components/BadgeDropd
|
|
|
16
16
|
import { DateFilterDropdown as G } from "./components/Filter/components/DateFilterDropdown/DateFilterDropdown.js";
|
|
17
17
|
import { Input as L } from "./components/Input/Input.js";
|
|
18
18
|
import { Loading as y } from "./components/Loading/Loading.js";
|
|
19
|
-
import { M as O } from "./Modal-
|
|
19
|
+
import { M as O } from "./Modal-CtAG97Ts.js";
|
|
20
20
|
import { NumberInput as j } from "./components/NumberInput/NumberInput.js";
|
|
21
21
|
import { PhoneNumberInput as E } from "./components/PhoneNumberInput/PhoneNumberInput.js";
|
|
22
22
|
import { PieChart as J } from "./components/PieChart/PieChart.js";
|
package/dist/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@konstructio/ui",
|
|
3
3
|
"description": "A set of reusable and customizable React components built for konstruct.io",
|
|
4
4
|
"private": false,
|
|
5
|
-
"version": "0.1.2-alpha.
|
|
5
|
+
"version": "0.1.2-alpha.32",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"main": "dist/index.js",
|
|
@@ -77,12 +77,12 @@
|
|
|
77
77
|
"google-libphonenumber": "^3.2.43",
|
|
78
78
|
"i18n-iso-countries": "^7.14.0",
|
|
79
79
|
"js-cookie": "^3.0.5",
|
|
80
|
-
"lucide-react": "^0.
|
|
80
|
+
"lucide-react": "^0.555.0",
|
|
81
81
|
"react-chartjs-2": "^5.3.1",
|
|
82
|
-
"react-day-picker": "^9.11.
|
|
82
|
+
"react-day-picker": "^9.11.3",
|
|
83
83
|
"react-feather": "^2.0.10",
|
|
84
|
-
"react-focus-lock": "^2.13.
|
|
85
|
-
"react-remove-scroll": "^2.7.
|
|
84
|
+
"react-focus-lock": "^2.13.7",
|
|
85
|
+
"react-remove-scroll": "^2.7.2",
|
|
86
86
|
"tailwind-merge": "^3.4.0"
|
|
87
87
|
},
|
|
88
88
|
"peerDependencies": {
|
|
@@ -120,11 +120,11 @@
|
|
|
120
120
|
"devDependencies": {
|
|
121
121
|
"@faker-js/faker": "^10.1.0",
|
|
122
122
|
"@rollup/plugin-alias": "^6.0.0",
|
|
123
|
-
"@storybook/addon-docs": "^10.
|
|
124
|
-
"@storybook/addon-links": "^10.
|
|
125
|
-
"@storybook/react-vite": "^10.
|
|
123
|
+
"@storybook/addon-docs": "^10.1.2",
|
|
124
|
+
"@storybook/addon-links": "^10.1.2",
|
|
125
|
+
"@storybook/react-vite": "^10.1.2",
|
|
126
126
|
"@tailwindcss/vite": "^4.1.17",
|
|
127
|
-
"@tanstack/react-query": "^5.90.
|
|
127
|
+
"@tanstack/react-query": "^5.90.11",
|
|
128
128
|
"@testing-library/jest-dom": "^6.9.1",
|
|
129
129
|
"@testing-library/react": "^16.3.0",
|
|
130
130
|
"@testing-library/user-event": "^14.6.1",
|
|
@@ -151,13 +151,13 @@
|
|
|
151
151
|
"jsdom": "^27.2.0",
|
|
152
152
|
"lodash": "^4.17.21",
|
|
153
153
|
"postcss": "^8.5.6",
|
|
154
|
-
"prettier": "^3.
|
|
154
|
+
"prettier": "^3.7.3",
|
|
155
155
|
"rimraf": "^6.1.2",
|
|
156
|
-
"storybook": "^10.
|
|
156
|
+
"storybook": "^10.1.2",
|
|
157
157
|
"tailwindcss": "^4.1.17",
|
|
158
158
|
"ts-node": "^10.9.2",
|
|
159
159
|
"typescript": "^5.9.3",
|
|
160
|
-
"vite": "^7.2.
|
|
160
|
+
"vite": "^7.2.6",
|
|
161
161
|
"vite-plugin-dts": "^4.5.4",
|
|
162
162
|
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
163
163
|
"vite-plugin-svgr": "^4.5.0",
|