@konoma-development/react-components 0.2.12 → 0.3.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,8 +1,11 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { PaginationClasses } from './pagination.tsx';
3
- export interface TableColumn<DataType> {
4
- id: keyof DataType;
3
+ export interface TableColumnBase {
4
+ id: string | number | symbol;
5
5
  title: ReactNode;
6
+ }
7
+ export interface TableColumn<DataType> extends TableColumnBase {
8
+ id: keyof DataType;
6
9
  initialWidth?: string | number;
7
10
  hidden?: boolean;
8
11
  sorting?: '+' | '-' | undefined;
@@ -19,7 +22,7 @@ export interface TableColumn<DataType> {
19
22
  export default function Table<DataType extends {
20
23
  dragRef?: React.RefObject<HTMLDivElement>;
21
24
  index?: number;
22
- }>({ noDataClasses, wrapperClasses, tableClasses, rowClasses, rowLeftWrapperClasses, rowCenterWrapperClasses, rowRightWrapperClasses, headerClasses, paginationClasses, filterComponents, columnsCenter, columnsRight, columnsLeft, cellRenderer, filters, data, pagination, totalRows, totalPagesProp, currentPage, noEntryLabel, allowReorder, showFilters, pagesize, xToY, isInfinite, name, firstPageIconName, firstPageIconPath, previousPageIconName, previousPageIconPath, nextPageIconName, nextPageIconPath, lastPageIconName, lastPageIconPath, sortingAscIconName, sortingAscIconPath, sortingDescIconName, sortingDescIconPath, removeFilterIconName, removeFilterIconPath, triggeredFilter, setTriggeredFilter, onDragRow, onDropRow, onRowClick, onRowDoubleClick, onScroll, onUpdateFilters, onSort, onFirstPage, onPreviousPage, onNextPage, onLastPage, toPage, }: {
25
+ }>({ noDataClasses, wrapperClasses, tableClasses, rowClasses, rowLeftWrapperClasses, rowCenterWrapperClasses, rowRightWrapperClasses, headerClasses, paginationClasses, filterComponents, columnsCenter, columnsRight, columnsLeft, cellRenderer, filters, data, pagination, totalRows, totalPagesProp, detailsRow, currentPage, noEntryLabel, allowReorder, showFilters, pagesize, xToY, isInfinite, name, firstPageIconName, firstPageIconPath, previousPageIconName, previousPageIconPath, nextPageIconName, nextPageIconPath, lastPageIconName, lastPageIconPath, sortingAscIconName, sortingAscIconPath, sortingDescIconName, sortingDescIconPath, removeFilterIconName, removeFilterIconPath, triggeredFilter, setTriggeredFilter, onDragRow, onDropRow, onRowClick, onRowDoubleClick, onScroll, onUpdateFilters, onSort, onFirstPage, onPreviousPage, onNextPage, onLastPage, toPage, }: {
23
26
  wrapperClasses?: string;
24
27
  tableClasses?: string;
25
28
  rowClasses?: string;
@@ -52,6 +55,7 @@ export default function Table<DataType extends {
52
55
  pagination?: boolean;
53
56
  totalRows: number;
54
57
  noEntryLabel?: string;
58
+ detailsRow?: (data: DataType) => ReactNode;
55
59
  allowReorder?: boolean;
56
60
  xToY?: string;
57
61
  isInfinite?: boolean;
@@ -1,3 +1,4 @@
1
+ import { ReactNode } from 'react';
1
2
  export default function TableActions({ children, classes, showActionsIconName, showActionsIconPath, }: {
2
3
  children: React.ReactNode;
3
4
  classes?: string;
@@ -5,8 +6,8 @@ export default function TableActions({ children, classes, showActionsIconName, s
5
6
  showActionsIconPath?: string;
6
7
  }): import("react/jsx-runtime").JSX.Element;
7
8
  type TableActionVariant = 'error' | 'success' | 'warning' | 'default';
8
- export declare function TableActionEntry({ text, errorClasses, defaultClasses, variant, onClick, }: {
9
- text: string;
9
+ export declare function TableActionEntry({ content, errorClasses, defaultClasses, variant, onClick, }: {
10
+ content: string | ReactNode;
10
11
  errorClasses?: string;
11
12
  defaultClasses?: string;
12
13
  variant?: TableActionVariant;
package/dist/main.d.ts CHANGED
@@ -13,7 +13,7 @@ import { default as ColumnChooser } from './components/table/columnChooser.tsx';
13
13
  import { default as ColumnChooserEntry } from './components/table/columnChooserEntry.tsx';
14
14
  import { FilterContext } from './components/table/FilterContext.ts';
15
15
  import { default as Pagination } from './components/table/pagination.tsx';
16
- import { TableColumn, default as Table } from './components/table/table.tsx';
16
+ import { TableColumn, TableColumnBase, default as Table } from './components/table/table.tsx';
17
17
  import { default as TableActions, TableActionEntry } from './components/table/tableActions.tsx';
18
18
  import { default as Button } from './components/ui/button.tsx';
19
19
  import { default as Icon } from './components/ui/icon.tsx';
@@ -23,4 +23,4 @@ import { default as Tabs } from './components/ui/tabs.tsx';
23
23
  import { default as Tag } from './components/ui/tag.tsx';
24
24
  import { default as ComponentsWrapper } from './components/wrapper.tsx';
25
25
  import * as validators from './components/form/validators.ts';
26
- export { Button, Checkbox, CheckboxList, Classes, ColumnChooser, ColumnChooserEntry, ComponentsWrapper, ErrorContext, FilterContext, Form, FormField, FormFieldProps, FormValue, Icon, Input, LoadingIndicator, Mask, Modal, Option, Pagination, PhoneInput, RadioButtonGroup, Select, Table, TableActionEntry, TableActions, TableColumn, Tabs, Tag, TagList, TextArea, validators, };
26
+ export { Button, Checkbox, CheckboxList, Classes, ColumnChooser, ColumnChooserEntry, ComponentsWrapper, ErrorContext, FilterContext, Form, FormField, FormFieldProps, FormValue, Icon, Input, LoadingIndicator, Mask, Modal, Option, Pagination, PhoneInput, RadioButtonGroup, Select, Table, TableActionEntry, TableActions, TableColumn, TableColumnBase, Tabs, Tag, TagList, TextArea, validators, };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@konoma-development/react-components",
3
3
  "packageManager": "yarn@4.12.0",
4
- "version": "0.2.12",
4
+ "version": "0.3.0",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -27,53 +27,53 @@
27
27
  "devDependencies": {
28
28
  "@emotion/react": "^11.14.0",
29
29
  "@emotion/styled": "^11.14.1",
30
- "@eslint/compat": "^1.2.5",
31
- "@eslint/js": "^9.18.0",
30
+ "@eslint/compat": "^2.0.1",
31
+ "@eslint/js": "^9.39.2",
32
32
  "@floating-ui/react": "^0.27.16",
33
33
  "@heroicons/react": "^2.2.0",
34
- "@iconify-icon/react": "^2.3.0",
35
- "@tailwindcss/postcss": "^4.1.10",
36
- "@types/node": "^22.10.8",
37
- "@types/react": "^19.2.6",
34
+ "@iconify-icon/react": "^3.0.3",
35
+ "@tailwindcss/postcss": "^4.1.18",
36
+ "@types/node": "^22.19.7",
37
+ "@types/react": "^19.2.8",
38
38
  "@types/react-dom": "^19.2.3",
39
- "@typescript-eslint/parser": "^8.21.0",
40
- "@vitejs/plugin-react": "^4.3.4",
39
+ "@typescript-eslint/parser": "^8.53.0",
40
+ "@vitejs/plugin-react": "^5.1.2",
41
41
  "dnd-core": "^16.0.1",
42
- "eslint": "^9.18.0",
43
- "eslint-config-prettier": "^10.0.1",
44
- "eslint-plugin-i18next": "^6.1.1",
45
- "eslint-plugin-prettier": "^5.2.3",
46
- "eslint-plugin-react": "^7.37.4",
42
+ "eslint": "^9.39.2",
43
+ "eslint-config-prettier": "^10.1.8",
44
+ "eslint-plugin-i18next": "^6.1.3",
45
+ "eslint-plugin-prettier": "^5.5.5",
46
+ "eslint-plugin-react": "^7.37.5",
47
47
  "eslint-plugin-simple-import-sort": "^12.1.1",
48
- "globals": "^15.14.0",
49
- "jiti": "^2.4.2",
50
- "prettier": "^3.4.2",
51
- "prettier-plugin-tailwindcss": "^0.6.12",
52
- "re-resizable": "^6.10.3",
53
- "react": "^19.2.0",
48
+ "globals": "^17.0.0",
49
+ "jiti": "^2.6.1",
50
+ "prettier": "^3.8.0",
51
+ "prettier-plugin-tailwindcss": "^0.7.2",
52
+ "re-resizable": "^6.11.2",
53
+ "react": "^19.2.3",
54
54
  "react-dnd": "^16.0.1",
55
55
  "react-dnd-html5-backend": "^16.0.1",
56
56
  "react-dnd-touch-backend": "^16.0.1",
57
- "react-dom": "^19.2.0",
57
+ "react-dom": "^19.2.3",
58
58
  "react-imask": "^7.6.1",
59
- "react-select": "^5.9.0",
60
- "rollup": "^4.31.0",
61
- "tailwindcss": "^4.1.10",
62
- "typescript": "^5.7.3",
63
- "typescript-eslint": "^8.21.0",
64
- "vite": "^6.0.11",
59
+ "react-select": "^5.10.2",
60
+ "rollup": "^4.55.2",
61
+ "tailwindcss": "^4.1.18",
62
+ "typescript": "^5.9.3",
63
+ "typescript-eslint": "^8.53.0",
64
+ "vite": "^7.3.1",
65
65
  "vite-plugin-css-injected-by-js": "^3.5.2",
66
- "vite-plugin-dts": "^4.5.0"
66
+ "vite-plugin-dts": "^4.5.4"
67
67
  },
68
68
  "peerDependencies": {
69
69
  "dnd-core": "^16.0.1",
70
- "re-resizable": "^6.10.3",
71
- "react": "^19.2.0",
70
+ "re-resizable": "^6.11.2",
71
+ "react": "^19.2.3",
72
72
  "react-dnd": "^16.0.1",
73
73
  "react-dnd-html5-backend": "^16.0.1",
74
74
  "react-dnd-touch-backend": "^16.0.1",
75
- "react-dom": "^19.2.0",
75
+ "react-dom": "^19.2.3",
76
76
  "react-imask": "^7.6.1",
77
- "react-select": "^5.9.0"
77
+ "react-select": "^5.10.2"
78
78
  }
79
79
  }