@bcgov-sso/common-react-components 1.30.2 → 1.31.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/cjs/index.js +11525 -346
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/Table/Table.d.ts +30 -4
- package/dist/cjs/types/styles/theme.d.ts +1 -0
- package/dist/esm/index.js +11527 -348
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Table/Table.d.ts +30 -4
- package/dist/esm/types/styles/theme.d.ts +1 -0
- package/dist/index.d.ts +17 -4
- package/package.json +5 -3
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export declare const TABLE_BACKGROUND_COLOR = "#ededed";
|
|
2
3
|
export declare const TABLE_ROW_ACTIVE_COLOR = "#4950FA";
|
|
3
4
|
export declare const TABLE_ROW_HOVER_COLOR = "#fdb913";
|
|
@@ -5,8 +6,33 @@ export declare const TABLE_ROW_HEIGHT = 40;
|
|
|
5
6
|
export declare const TABLE_ROW_HEIGHT_MINI = 40;
|
|
6
7
|
export declare const TABLE_ROW_SPACING = 5;
|
|
7
8
|
export declare const TABLE_ROW_BORDER_RADIUS = 6;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
9
|
+
export interface Option {
|
|
10
|
+
value: string | string[];
|
|
11
|
+
label: string;
|
|
12
|
+
}
|
|
13
|
+
export interface TableFilter {
|
|
14
|
+
key?: string;
|
|
15
|
+
value?: string | Option[];
|
|
16
|
+
multiselect?: boolean;
|
|
17
|
+
onChange?: Function;
|
|
18
|
+
options: Option[];
|
|
19
|
+
label?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface Column {
|
|
22
|
+
header: string;
|
|
23
|
+
accessorKey: string;
|
|
24
|
+
}
|
|
25
|
+
export interface TableProps {
|
|
26
|
+
variant?: string;
|
|
27
|
+
readOnly?: boolean;
|
|
28
|
+
columns: Column[];
|
|
29
|
+
data: unknown[];
|
|
30
|
+
onRowSelect?: Function;
|
|
31
|
+
defaultPageSize?: number;
|
|
32
|
+
enableGlobalSearch?: boolean;
|
|
33
|
+
globalSearchPlaceholder?: string;
|
|
34
|
+
enablePagination?: boolean;
|
|
35
|
+
pageSizeOptions?: number[];
|
|
36
|
+
}
|
|
37
|
+
declare const Table: ({ variant, columns, data, readOnly, onRowSelect, defaultPageSize, enableGlobalSearch, globalSearchPlaceholder, enablePagination, pageSizeOptions, }: TableProps) => JSX.Element;
|
|
12
38
|
export default Table;
|
|
@@ -8,6 +8,7 @@ export declare const MAX_STRING_FIELD_WIDTH = "400px";
|
|
|
8
8
|
export declare const SUBTITLE_FONT_SIZE = "18px";
|
|
9
9
|
export declare const HELP_TEXT_FONT_SIZE = "12px";
|
|
10
10
|
export declare const SECONDARY_BLUE = "#38598a";
|
|
11
|
+
export declare const LINK_BLUE = "#1A5A96";
|
|
11
12
|
export declare const LINK_COLOR = "#0000EE";
|
|
12
13
|
export declare const PRIMARY_RED = "#D8292F";
|
|
13
14
|
export declare const FORM_BUTTON_MIN_WIDTH = "190px";
|
package/dist/index.d.ts
CHANGED
|
@@ -37,10 +37,23 @@ interface Props$4 {
|
|
|
37
37
|
}
|
|
38
38
|
declare const Alert: (props: Props$4) => JSX.Element;
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
40
|
+
interface Column {
|
|
41
|
+
header: string;
|
|
42
|
+
accessorKey: string;
|
|
43
|
+
}
|
|
44
|
+
interface TableProps {
|
|
45
|
+
variant?: string;
|
|
46
|
+
readOnly?: boolean;
|
|
47
|
+
columns: Column[];
|
|
48
|
+
data: unknown[];
|
|
49
|
+
onRowSelect?: Function;
|
|
50
|
+
defaultPageSize?: number;
|
|
51
|
+
enableGlobalSearch?: boolean;
|
|
52
|
+
globalSearchPlaceholder?: string;
|
|
53
|
+
enablePagination?: boolean;
|
|
54
|
+
pageSizeOptions?: number[];
|
|
55
|
+
}
|
|
56
|
+
declare const Table: ({ variant, columns, data, readOnly, onRowSelect, defaultPageSize, enableGlobalSearch, globalSearchPlaceholder, enablePagination, pageSizeOptions, }: TableProps) => JSX.Element;
|
|
44
57
|
|
|
45
58
|
declare const StyledTabs: styled_components.StyledComponent<rc_tabs_lib_Tabs.ForwardTabsType, any, {}, never>;
|
|
46
59
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bcgov-sso/common-react-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.31.0",
|
|
4
4
|
"description": "common react components",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"@fortawesome/fontawesome-svg-core": "^6.1.1",
|
|
26
26
|
"@fortawesome/free-solid-svg-icons": "^6.1.1",
|
|
27
27
|
"@fortawesome/react-fontawesome": "^0.1.18",
|
|
28
|
+
"@tanstack/react-table": "^8.20.1",
|
|
28
29
|
"@types/lodash.kebabcase": "^4.1.7",
|
|
29
30
|
"@types/styled-components": "^5.1.25",
|
|
30
31
|
"history": "^5.3.0",
|
|
@@ -33,6 +34,7 @@
|
|
|
33
34
|
"pre-commit": "^1.2.2",
|
|
34
35
|
"rc-tabs": "^11.16.0",
|
|
35
36
|
"react-loader-spinner": "^6.0.0-0",
|
|
37
|
+
"react-select": "^5.8.0",
|
|
36
38
|
"styled-components": "^5.3.5"
|
|
37
39
|
},
|
|
38
40
|
"peerDependencies": {
|
|
@@ -73,6 +75,7 @@
|
|
|
73
75
|
"@vanilla-extract/vite-plugin": "^3.8.0",
|
|
74
76
|
"@vitejs/plugin-react": "^3.1.0",
|
|
75
77
|
"babel-preset-react": "^6.24.1",
|
|
78
|
+
"loader-utils": "^2.0.4",
|
|
76
79
|
"prettier": "^2.7.1",
|
|
77
80
|
"react": "18.2.0",
|
|
78
81
|
"react-dom": "18.2.0",
|
|
@@ -81,7 +84,6 @@
|
|
|
81
84
|
"storybook-addon-designs": "^6.3.1",
|
|
82
85
|
"typescript": "^4.7.4",
|
|
83
86
|
"vite": "^4.2.1",
|
|
84
|
-
"vite-tsconfig-paths": "^4.0.7"
|
|
85
|
-
"loader-utils": "^2.0.4"
|
|
87
|
+
"vite-tsconfig-paths": "^4.0.7"
|
|
86
88
|
}
|
|
87
89
|
}
|