pv-design 1.0.2
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/README.md +5 -0
- package/dist/index-4ijmaxJU.js +31 -0
- package/dist/index-CvfKM3mo.js +90 -0
- package/dist/pv-design.js +6 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/pvTable/index.d.ts +17 -0
- package/dist/types/pvTabs/index.d.ts +6 -0
- package/package.json +55 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime.js";
|
|
2
|
+
import { ConfigProvider as a, Tabs as n } from "antd";
|
|
3
|
+
const t = ({ theme: o, ...e }) => /* @__PURE__ */ r(
|
|
4
|
+
a,
|
|
5
|
+
{
|
|
6
|
+
theme: {
|
|
7
|
+
components: {
|
|
8
|
+
Tabs: {
|
|
9
|
+
cardBg: "rgba(255,255,255,0)",
|
|
10
|
+
colorBgContainer: "rgb(24,25,26)",
|
|
11
|
+
colorBorderSecondary: "rgba(48,48,48,0)",
|
|
12
|
+
itemSelectedColor: "#419DEE",
|
|
13
|
+
margin: 0,
|
|
14
|
+
marginSM: 0,
|
|
15
|
+
marginXS: 0,
|
|
16
|
+
marginXXS: 0
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
...o || {}
|
|
20
|
+
},
|
|
21
|
+
children: /* @__PURE__ */ r(
|
|
22
|
+
n,
|
|
23
|
+
{
|
|
24
|
+
...e
|
|
25
|
+
}
|
|
26
|
+
)
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
export {
|
|
30
|
+
t as default
|
|
31
|
+
};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { jsxs as p, jsx as l } from "react/jsx-runtime.js";
|
|
2
|
+
import { ConfigProvider as d, Table as c } from "antd";
|
|
3
|
+
const s = ({ theme: o, customRowClass: a, ...e }) => {
|
|
4
|
+
const b = (n, t) => {
|
|
5
|
+
const r = t % 2 === 0 ? "pv-table-even-row" : "pv-table-odd-row";
|
|
6
|
+
return a ? a(r, n, t) : r;
|
|
7
|
+
};
|
|
8
|
+
return /* @__PURE__ */ p(
|
|
9
|
+
d,
|
|
10
|
+
{
|
|
11
|
+
prefixCls: "pv-table",
|
|
12
|
+
theme: {
|
|
13
|
+
components: {
|
|
14
|
+
Table: {}
|
|
15
|
+
},
|
|
16
|
+
...o || {}
|
|
17
|
+
},
|
|
18
|
+
children: [
|
|
19
|
+
/* @__PURE__ */ l("style", { children: `
|
|
20
|
+
.pv-table-table {
|
|
21
|
+
background: #18191a !important;
|
|
22
|
+
scrollbar-color: unset !important;
|
|
23
|
+
}
|
|
24
|
+
.pv-table-table-header {
|
|
25
|
+
border-right: 16px solid #18191a !important;
|
|
26
|
+
}
|
|
27
|
+
.pv-table-table-header .pv-table-table-cell {
|
|
28
|
+
background: #18191a !important;
|
|
29
|
+
}
|
|
30
|
+
.pv-table-table-body::-webkit-scrollbar {
|
|
31
|
+
background-color: transparent;
|
|
32
|
+
height: 16px;
|
|
33
|
+
width: 16px;
|
|
34
|
+
}
|
|
35
|
+
.pv-table-table-body::-webkit-scrollbar-corner {
|
|
36
|
+
background-color: transparent;
|
|
37
|
+
}
|
|
38
|
+
.pv-table-table-body::-webkit-scrollbar-thumb {
|
|
39
|
+
background-color: #3D3E40;
|
|
40
|
+
border-radius: 8px;
|
|
41
|
+
border: 6px solid #18191a;
|
|
42
|
+
}
|
|
43
|
+
.pv-table-body::-webkit-scrollbar-track {
|
|
44
|
+
background: transparent;
|
|
45
|
+
}
|
|
46
|
+
.pv-table-even-row .pv-table-table-cell {
|
|
47
|
+
background-color: #0a0a0a !important;
|
|
48
|
+
}
|
|
49
|
+
.pv-table-even-row .pv-table-table-cell-row-hover {background-color: #0a0a0a !important;}
|
|
50
|
+
|
|
51
|
+
.pv-table-odd-row .pv-table-table-cell {
|
|
52
|
+
background-color: #18191a !important;
|
|
53
|
+
}
|
|
54
|
+
.pv-table-odd-row .pv-table-table-cell-row-hover {background-color: #18191a !important;}
|
|
55
|
+
|
|
56
|
+
.pv-table-even-row .pv-table-table-cell:first-child {
|
|
57
|
+
border-bottom-left-radius: 4px;
|
|
58
|
+
border-top-left-radius: 4px;
|
|
59
|
+
}
|
|
60
|
+
.pv-table-even-row .pv-table-table-cell:last-child {
|
|
61
|
+
border-bottom-right-radius: 4px;
|
|
62
|
+
border-top-right-radius: 4px;
|
|
63
|
+
}
|
|
64
|
+
.pv-table-table-cell {
|
|
65
|
+
border: none !important;
|
|
66
|
+
}
|
|
67
|
+
.pv-table-table-cell::before {
|
|
68
|
+
background: transparent !important;
|
|
69
|
+
}
|
|
70
|
+
.pv-table-table-small {
|
|
71
|
+
font-size: 12px !important;
|
|
72
|
+
}
|
|
73
|
+
.pv-table-table-small .pv-table-even-row>td {
|
|
74
|
+
padding: 5px 8px !important;
|
|
75
|
+
}
|
|
76
|
+
` }),
|
|
77
|
+
/* @__PURE__ */ l(
|
|
78
|
+
c,
|
|
79
|
+
{
|
|
80
|
+
...e,
|
|
81
|
+
rowClassName: e != null && e.rowClassName ? e.rowClassName : b
|
|
82
|
+
}
|
|
83
|
+
)
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
};
|
|
88
|
+
export {
|
|
89
|
+
s as default
|
|
90
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { TableProps } from 'antd';
|
|
2
|
+
/**
|
|
3
|
+
* 扩展表格属性接口
|
|
4
|
+
*/
|
|
5
|
+
export interface ExtendedTableProps extends TableProps {
|
|
6
|
+
theme?: object;
|
|
7
|
+
customRowClass?: (currentClassName: string, record: RecordType, index: number) => string;
|
|
8
|
+
}
|
|
9
|
+
type RecordType = any;
|
|
10
|
+
/**
|
|
11
|
+
* PvTable 组件
|
|
12
|
+
* @param theme - 自定义主题
|
|
13
|
+
* @param customRowClass - 自定义行样式函数
|
|
14
|
+
* @param props - 表格的其他属性
|
|
15
|
+
*/
|
|
16
|
+
declare const PvTable: React.FC<ExtendedTableProps>;
|
|
17
|
+
export default PvTable;
|
package/package.json
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "pv-design",
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "pvmed ui design",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/pv-design.js",
|
|
7
|
+
"types": "./dist/types/index.d.ts",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"start": "vite --port 1122",
|
|
10
|
+
"build": "vite build --config vite.config.ts && tsc --jsx react --project tsconfig.types.json",
|
|
11
|
+
"build:template": "tsc -b && vite build --config vite.template.config.ts",
|
|
12
|
+
"build:doc": "typedoc",
|
|
13
|
+
"doc:view": "http-serve docs -p 80",
|
|
14
|
+
"lint": "eslint ."
|
|
15
|
+
},
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "ssh://git@192.168.18.221:12225/pvmed-prd/icp/pv-design.git"
|
|
19
|
+
},
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"@eslint/js": "^9.9.0",
|
|
22
|
+
"@types/node": "^22.7.4",
|
|
23
|
+
"@types/react": "^18.3.3",
|
|
24
|
+
"@types/react-dom": "^18.3.0",
|
|
25
|
+
"@vitejs/plugin-react-swc": "^3.5.0",
|
|
26
|
+
"antd": "^5.21.1",
|
|
27
|
+
"eslint": "^9.9.0",
|
|
28
|
+
"eslint-plugin-react-hooks": "^5.1.0-rc.0",
|
|
29
|
+
"eslint-plugin-react-refresh": "^0.4.9",
|
|
30
|
+
"globals": "^15.9.0",
|
|
31
|
+
"path": "^0.12.7",
|
|
32
|
+
"react": "^18.3.1",
|
|
33
|
+
"react-dom": "^18.3.1",
|
|
34
|
+
"typedoc": "^0.26.7",
|
|
35
|
+
"typescript": "^5.5.3",
|
|
36
|
+
"typescript-eslint": "^8.0.1",
|
|
37
|
+
"vite": "^5.4.1"
|
|
38
|
+
},
|
|
39
|
+
"peerDependencies": {
|
|
40
|
+
"antd": "^5.0.0",
|
|
41
|
+
"react": ">16.8.0"
|
|
42
|
+
},
|
|
43
|
+
"keywords": [
|
|
44
|
+
"ui",
|
|
45
|
+
"ux",
|
|
46
|
+
"pvmed",
|
|
47
|
+
"design"
|
|
48
|
+
],
|
|
49
|
+
"author": "pvmed",
|
|
50
|
+
"license": "ISC",
|
|
51
|
+
"files": [
|
|
52
|
+
"dist",
|
|
53
|
+
"README.md"
|
|
54
|
+
]
|
|
55
|
+
}
|