@kopexa/data-table 2.0.10 → 4.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.
@@ -34,11 +34,10 @@ var createDataTableColumnHelper = () => {
34
34
  });
35
35
  },
36
36
  display,
37
- action: ({ actions, ...props }) => display({
37
+ action: ({ ...props }) => display({
38
38
  id: "action",
39
39
  cell: (ctx) => /* @__PURE__ */ jsx(DataTableActionCell, { ctx }),
40
40
  meta: {
41
- ___actions: actions,
42
41
  ...props.meta || {}
43
42
  },
44
43
  ...props
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  DataTableSearch
4
- } from "./chunk-F7TXNG3S.mjs";
4
+ } from "./chunk-SQPB7CJB.mjs";
5
5
  import {
6
6
  DataTableTable
7
7
  } from "./chunk-RWEBWSKN.mjs";
@@ -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
+ };
@@ -147,11 +147,10 @@ var createDataTableColumnHelper = () => {
147
147
  });
148
148
  },
149
149
  display,
150
- action: ({ actions, ...props }) => display({
150
+ action: ({ ...props }) => display({
151
151
  id: "action",
152
152
  cell: (ctx) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(DataTableActionCell, { ctx }),
153
153
  meta: {
154
- ___actions: actions,
155
154
  ...props.meta || {}
156
155
  },
157
156
  ...props
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  createDataTableColumnHelper
4
- } from "./chunk-UATHOR24.mjs";
4
+ } from "./chunk-4TNZXYRK.mjs";
5
5
  import "./chunk-2MXIGADC.mjs";
6
6
  import "./chunk-MBB33GVR.mjs";
7
7
  export {
@@ -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.jsx)(
51
- import_input.Input,
52
- {
53
- size: "sm",
54
- type: "search",
55
- value: instance.getSearch(),
56
- startContent: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.SearchIcon, { className: "pointer-events-none text-muted-foreground" }),
57
- onChange: (e) => instance.onSearchChange(e.target.value),
58
- classNames: {
59
- inputWrapper: "max-w-sm"
60
- },
61
- className: (0, import_shared_utils.cn)(
62
- "max-w-sm",
63
- {
64
- "pr-[calc(15px+2px+8px)]": instance.isLoading
65
- },
66
- className
67
- ),
68
- ...rest
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
 
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  DataTable,
4
4
  Root
5
- } from "./chunk-CKVQMNCL.mjs";
6
- import "./chunk-F7TXNG3S.mjs";
5
+ } from "./chunk-KZV4ZXTH.mjs";
6
+ import "./chunk-SQPB7CJB.mjs";
7
7
  import "./chunk-RWEBWSKN.mjs";
8
8
  import "./chunk-MVR4VTRC.mjs";
9
9
  import "./chunk-TZVDGQM6.mjs";
package/dist/index.js CHANGED
@@ -151,11 +151,10 @@ var createDataTableColumnHelper = () => {
151
151
  });
152
152
  },
153
153
  display,
154
- action: ({ actions, ...props }) => display({
154
+ action: ({ ...props }) => display({
155
155
  id: "action",
156
156
  cell: (ctx) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(DataTableActionCell, { ctx }),
157
157
  meta: {
158
- ___actions: actions,
159
158
  ...props.meta || {}
160
159
  },
161
160
  ...props
@@ -195,27 +194,26 @@ var DataTableSearch = (props) => {
195
194
  "DataTable.Search was rendered but search is not enabled. Make sure to pass search to 'useDataTable'"
196
195
  );
197
196
  }
198
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
199
- import_input.Input,
200
- {
201
- size: "sm",
202
- type: "search",
203
- value: instance.getSearch(),
204
- startContent: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_icons2.SearchIcon, { className: "pointer-events-none text-muted-foreground" }),
205
- onChange: (e) => instance.onSearchChange(e.target.value),
206
- classNames: {
207
- inputWrapper: "max-w-sm"
208
- },
209
- className: (0, import_shared_utils.cn)(
210
- "max-w-sm",
211
- {
212
- "pr-[calc(15px+2px+8px)]": instance.isLoading
213
- },
214
- className
215
- ),
216
- ...rest
217
- }
218
- );
197
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_input.InputWrapper, { className: "max-w-sm", children: [
198
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_icons2.SearchIcon, { className: "pointer-events-none text-muted-foreground" }),
199
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
200
+ import_input.Input,
201
+ {
202
+ size: "sm",
203
+ type: "search",
204
+ value: instance.getSearch(),
205
+ onChange: (e) => instance.onSearchChange(e.target.value),
206
+ className: (0, import_shared_utils.cn)(
207
+ "max-w-sm",
208
+ {
209
+ "pr-[calc(15px+2px+8px)]": instance.isLoading
210
+ },
211
+ className
212
+ ),
213
+ ...rest
214
+ }
215
+ )
216
+ ] });
219
217
  };
220
218
  DataTableSearch.displayName = "DataTable.Search";
221
219
 
package/dist/index.mjs CHANGED
@@ -1,12 +1,12 @@
1
1
  "use client";
2
2
  import {
3
3
  createDataTableColumnHelper
4
- } from "./chunk-UATHOR24.mjs";
4
+ } from "./chunk-4TNZXYRK.mjs";
5
5
  import "./chunk-2MXIGADC.mjs";
6
6
  import {
7
7
  DataTable
8
- } from "./chunk-CKVQMNCL.mjs";
9
- import "./chunk-F7TXNG3S.mjs";
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.jsx)(
49
- import_input.Input,
50
- {
51
- size: "sm",
52
- type: "search",
53
- value: instance.getSearch(),
54
- startContent: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.SearchIcon, { className: "pointer-events-none text-muted-foreground" }),
55
- onChange: (e) => instance.onSearchChange(e.target.value),
56
- classNames: {
57
- inputWrapper: "max-w-sm"
58
- },
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
- );
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:
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  DataTableSearch
4
- } from "../chunk-F7TXNG3S.mjs";
4
+ } from "../chunk-SQPB7CJB.mjs";
5
5
  import "../chunk-XCOD2RDA.mjs";
6
6
  export {
7
7
  DataTableSearch
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kopexa/data-table",
3
- "version": "2.0.10",
3
+ "version": "4.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": "1.7.7"
31
+ "@kopexa/theme": "2.1.0"
32
32
  },
33
33
  "dependencies": {
34
34
  "@tanstack/react-table": "^8.21.3",
35
- "@kopexa/react-utils": "2.0.8",
36
- "@kopexa/shared-utils": "1.1.7",
37
- "@kopexa/dropdown-menu": "3.0.10",
38
- "@kopexa/button": "8.0.10",
39
- "@kopexa/icons": "10.0.10",
40
- "@kopexa/checkbox": "2.0.10",
41
- "@kopexa/table": "2.0.10",
42
- "@kopexa/input": "3.0.10",
43
- "@kopexa/skeleton": "2.0.7"
35
+ "@kopexa/shared-utils": "2.0.0",
36
+ "@kopexa/react-utils": "3.0.0",
37
+ "@kopexa/dropdown-menu": "5.0.0",
38
+ "@kopexa/button": "10.0.0",
39
+ "@kopexa/icons": "12.0.0",
40
+ "@kopexa/checkbox": "4.0.0",
41
+ "@kopexa/table": "4.0.0",
42
+ "@kopexa/input": "5.0.0",
43
+ "@kopexa/skeleton": "4.0.0"
44
44
  },
45
45
  "clean-package": "../../../clean-package.config.json",
46
46
  "module": "dist/index.mjs",
@@ -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
- };