@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.
@@ -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
+ };
@@ -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
@@ -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.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
- );
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-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.9",
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": "1.7.6"
31
+ "@kopexa/theme": "2.0.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.9",
38
- "@kopexa/button": "8.0.9",
39
- "@kopexa/icons": "10.0.9",
40
- "@kopexa/checkbox": "2.0.9",
41
- "@kopexa/table": "2.0.9",
42
- "@kopexa/input": "3.0.9",
43
- "@kopexa/skeleton": "2.0.6"
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",
@@ -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
- };