@kopexa/data-table 2.0.9 → 3.0.0
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/{chunk-CKVQMNCL.mjs → chunk-KZV4ZXTH.mjs} +1 -1
- package/dist/chunk-SQPB7CJB.mjs +44 -0
- package/dist/data-table.js +20 -21
- package/dist/data-table.mjs +2 -2
- package/dist/index.js +20 -21
- package/dist/index.mjs +2 -2
- package/dist/internal/data-table-search.js +20 -21
- package/dist/internal/data-table-search.mjs +1 -1
- package/package.json +11 -11
- package/dist/chunk-F7TXNG3S.mjs +0 -45
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
useDataTableContext
|
|
4
|
+
} from "./chunk-XCOD2RDA.mjs";
|
|
5
|
+
|
|
6
|
+
// src/internal/data-table-search.tsx
|
|
7
|
+
import { SearchIcon } from "@kopexa/icons";
|
|
8
|
+
import { Input, InputWrapper } from "@kopexa/input";
|
|
9
|
+
import { cn } from "@kopexa/shared-utils";
|
|
10
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
var DataTableSearch = (props) => {
|
|
12
|
+
const { className, ...rest } = props;
|
|
13
|
+
const { instance } = useDataTableContext();
|
|
14
|
+
if (!instance.enableSearch) {
|
|
15
|
+
throw new Error(
|
|
16
|
+
"DataTable.Search was rendered but search is not enabled. Make sure to pass search to 'useDataTable'"
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
return /* @__PURE__ */ jsxs(InputWrapper, { className: "max-w-sm", children: [
|
|
20
|
+
/* @__PURE__ */ jsx(SearchIcon, { className: "pointer-events-none text-muted-foreground" }),
|
|
21
|
+
/* @__PURE__ */ jsx(
|
|
22
|
+
Input,
|
|
23
|
+
{
|
|
24
|
+
size: "sm",
|
|
25
|
+
type: "search",
|
|
26
|
+
value: instance.getSearch(),
|
|
27
|
+
onChange: (e) => instance.onSearchChange(e.target.value),
|
|
28
|
+
className: cn(
|
|
29
|
+
"max-w-sm",
|
|
30
|
+
{
|
|
31
|
+
"pr-[calc(15px+2px+8px)]": instance.isLoading
|
|
32
|
+
},
|
|
33
|
+
className
|
|
34
|
+
),
|
|
35
|
+
...rest
|
|
36
|
+
}
|
|
37
|
+
)
|
|
38
|
+
] });
|
|
39
|
+
};
|
|
40
|
+
DataTableSearch.displayName = "DataTable.Search";
|
|
41
|
+
|
|
42
|
+
export {
|
|
43
|
+
DataTableSearch
|
|
44
|
+
};
|
package/dist/data-table.js
CHANGED
|
@@ -47,27 +47,26 @@ var DataTableSearch = (props) => {
|
|
|
47
47
|
"DataTable.Search was rendered but search is not enabled. Make sure to pass search to 'useDataTable'"
|
|
48
48
|
);
|
|
49
49
|
}
|
|
50
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
);
|
|
50
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_input.InputWrapper, { className: "max-w-sm", children: [
|
|
51
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.SearchIcon, { className: "pointer-events-none text-muted-foreground" }),
|
|
52
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
53
|
+
import_input.Input,
|
|
54
|
+
{
|
|
55
|
+
size: "sm",
|
|
56
|
+
type: "search",
|
|
57
|
+
value: instance.getSearch(),
|
|
58
|
+
onChange: (e) => instance.onSearchChange(e.target.value),
|
|
59
|
+
className: (0, import_shared_utils.cn)(
|
|
60
|
+
"max-w-sm",
|
|
61
|
+
{
|
|
62
|
+
"pr-[calc(15px+2px+8px)]": instance.isLoading
|
|
63
|
+
},
|
|
64
|
+
className
|
|
65
|
+
),
|
|
66
|
+
...rest
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
] });
|
|
71
70
|
};
|
|
72
71
|
DataTableSearch.displayName = "DataTable.Search";
|
|
73
72
|
|
package/dist/data-table.mjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -195,27 +195,26 @@ var DataTableSearch = (props) => {
|
|
|
195
195
|
"DataTable.Search was rendered but search is not enabled. Make sure to pass search to 'useDataTable'"
|
|
196
196
|
);
|
|
197
197
|
}
|
|
198
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
);
|
|
198
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_input.InputWrapper, { className: "max-w-sm", children: [
|
|
199
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_icons2.SearchIcon, { className: "pointer-events-none text-muted-foreground" }),
|
|
200
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
201
|
+
import_input.Input,
|
|
202
|
+
{
|
|
203
|
+
size: "sm",
|
|
204
|
+
type: "search",
|
|
205
|
+
value: instance.getSearch(),
|
|
206
|
+
onChange: (e) => instance.onSearchChange(e.target.value),
|
|
207
|
+
className: (0, import_shared_utils.cn)(
|
|
208
|
+
"max-w-sm",
|
|
209
|
+
{
|
|
210
|
+
"pr-[calc(15px+2px+8px)]": instance.isLoading
|
|
211
|
+
},
|
|
212
|
+
className
|
|
213
|
+
),
|
|
214
|
+
...rest
|
|
215
|
+
}
|
|
216
|
+
)
|
|
217
|
+
] });
|
|
219
218
|
};
|
|
220
219
|
DataTableSearch.displayName = "DataTable.Search";
|
|
221
220
|
|
package/dist/index.mjs
CHANGED
|
@@ -5,8 +5,8 @@ import {
|
|
|
5
5
|
import "./chunk-2MXIGADC.mjs";
|
|
6
6
|
import {
|
|
7
7
|
DataTable
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-KZV4ZXTH.mjs";
|
|
9
|
+
import "./chunk-SQPB7CJB.mjs";
|
|
10
10
|
import "./chunk-RWEBWSKN.mjs";
|
|
11
11
|
import "./chunk-MVR4VTRC.mjs";
|
|
12
12
|
import "./chunk-TZVDGQM6.mjs";
|
|
@@ -45,27 +45,26 @@ var DataTableSearch = (props) => {
|
|
|
45
45
|
"DataTable.Search was rendered but search is not enabled. Make sure to pass search to 'useDataTable'"
|
|
46
46
|
);
|
|
47
47
|
}
|
|
48
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
);
|
|
48
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_input.InputWrapper, { className: "max-w-sm", children: [
|
|
49
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.SearchIcon, { className: "pointer-events-none text-muted-foreground" }),
|
|
50
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
51
|
+
import_input.Input,
|
|
52
|
+
{
|
|
53
|
+
size: "sm",
|
|
54
|
+
type: "search",
|
|
55
|
+
value: instance.getSearch(),
|
|
56
|
+
onChange: (e) => instance.onSearchChange(e.target.value),
|
|
57
|
+
className: (0, import_shared_utils.cn)(
|
|
58
|
+
"max-w-sm",
|
|
59
|
+
{
|
|
60
|
+
"pr-[calc(15px+2px+8px)]": instance.isLoading
|
|
61
|
+
},
|
|
62
|
+
className
|
|
63
|
+
),
|
|
64
|
+
...rest
|
|
65
|
+
}
|
|
66
|
+
)
|
|
67
|
+
] });
|
|
69
68
|
};
|
|
70
69
|
DataTableSearch.displayName = "DataTable.Search";
|
|
71
70
|
// Annotate the CommonJS export names for ESM import in node:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kopexa/data-table",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"data-table"
|
|
@@ -28,19 +28,19 @@
|
|
|
28
28
|
"motion": ">=12.23.6",
|
|
29
29
|
"react": ">=19.0.0-rc.0",
|
|
30
30
|
"react-dom": ">=19.0.0-rc.0",
|
|
31
|
-
"@kopexa/theme": "
|
|
31
|
+
"@kopexa/theme": "2.0.0"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@tanstack/react-table": "^8.21.3",
|
|
35
|
-
"@kopexa/react-utils": "
|
|
36
|
-
"@kopexa/shared-utils": "
|
|
37
|
-
"@kopexa/dropdown-menu": "
|
|
38
|
-
"@kopexa/button": "
|
|
39
|
-
"@kopexa/icons": "
|
|
40
|
-
"@kopexa/checkbox": "
|
|
41
|
-
"@kopexa/table": "
|
|
42
|
-
"@kopexa/input": "
|
|
43
|
-
"@kopexa/skeleton": "
|
|
35
|
+
"@kopexa/react-utils": "3.0.0",
|
|
36
|
+
"@kopexa/shared-utils": "2.0.0",
|
|
37
|
+
"@kopexa/dropdown-menu": "4.0.0",
|
|
38
|
+
"@kopexa/button": "9.0.0",
|
|
39
|
+
"@kopexa/icons": "11.0.0",
|
|
40
|
+
"@kopexa/checkbox": "3.0.0",
|
|
41
|
+
"@kopexa/table": "3.0.0",
|
|
42
|
+
"@kopexa/input": "4.0.0",
|
|
43
|
+
"@kopexa/skeleton": "3.0.0"
|
|
44
44
|
},
|
|
45
45
|
"clean-package": "../../../clean-package.config.json",
|
|
46
46
|
"module": "dist/index.mjs",
|
package/dist/chunk-F7TXNG3S.mjs
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
useDataTableContext
|
|
4
|
-
} from "./chunk-XCOD2RDA.mjs";
|
|
5
|
-
|
|
6
|
-
// src/internal/data-table-search.tsx
|
|
7
|
-
import { SearchIcon } from "@kopexa/icons";
|
|
8
|
-
import { Input } from "@kopexa/input";
|
|
9
|
-
import { cn } from "@kopexa/shared-utils";
|
|
10
|
-
import { jsx } from "react/jsx-runtime";
|
|
11
|
-
var DataTableSearch = (props) => {
|
|
12
|
-
const { className, ...rest } = props;
|
|
13
|
-
const { instance } = useDataTableContext();
|
|
14
|
-
if (!instance.enableSearch) {
|
|
15
|
-
throw new Error(
|
|
16
|
-
"DataTable.Search was rendered but search is not enabled. Make sure to pass search to 'useDataTable'"
|
|
17
|
-
);
|
|
18
|
-
}
|
|
19
|
-
return /* @__PURE__ */ jsx(
|
|
20
|
-
Input,
|
|
21
|
-
{
|
|
22
|
-
size: "sm",
|
|
23
|
-
type: "search",
|
|
24
|
-
value: instance.getSearch(),
|
|
25
|
-
startContent: /* @__PURE__ */ jsx(SearchIcon, { className: "pointer-events-none text-muted-foreground" }),
|
|
26
|
-
onChange: (e) => instance.onSearchChange(e.target.value),
|
|
27
|
-
classNames: {
|
|
28
|
-
inputWrapper: "max-w-sm"
|
|
29
|
-
},
|
|
30
|
-
className: cn(
|
|
31
|
-
"max-w-sm",
|
|
32
|
-
{
|
|
33
|
-
"pr-[calc(15px+2px+8px)]": instance.isLoading
|
|
34
|
-
},
|
|
35
|
-
className
|
|
36
|
-
),
|
|
37
|
-
...rest
|
|
38
|
-
}
|
|
39
|
-
);
|
|
40
|
-
};
|
|
41
|
-
DataTableSearch.displayName = "DataTable.Search";
|
|
42
|
-
|
|
43
|
-
export {
|
|
44
|
-
DataTableSearch
|
|
45
|
-
};
|