@zixili/design-system 1.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.
- package/LICENSE +21 -0
- package/README.md +181 -0
- package/dist/bedi.cjs +52 -0
- package/dist/bedi.css +1 -0
- package/dist/bedi.js +3444 -0
- package/dist/components/CodeBlock/index.d.ts +8 -0
- package/dist/components/CodeEditor.d.ts +9 -0
- package/dist/components/ComponentDemo.d.ts +20 -0
- package/dist/components/Header.d.ts +2 -0
- package/dist/components/PropsTable/index.d.ts +13 -0
- package/dist/components/SearchModal/index.d.ts +13 -0
- package/dist/components/basic/Button.d.ts +13 -0
- package/dist/components/basic/ButtonDoc.d.ts +2 -0
- package/dist/components/basic/Icon.d.ts +12 -0
- package/dist/components/basic/Link.d.ts +15 -0
- package/dist/components/basic/index.d.ts +7 -0
- package/dist/components/display/Avatar.d.ts +14 -0
- package/dist/components/display/Badge.d.ts +15 -0
- package/dist/components/display/Card.d.ts +13 -0
- package/dist/components/display/Empty.d.ts +8 -0
- package/dist/components/display/Progress.d.ts +9 -0
- package/dist/components/display/Rate.d.ts +13 -0
- package/dist/components/display/Skeleton.d.ts +23 -0
- package/dist/components/display/Table.d.ts +29 -0
- package/dist/components/display/Tag.d.ts +10 -0
- package/dist/components/display/Tooltip.d.ts +14 -0
- package/dist/components/display/index.d.ts +20 -0
- package/dist/components/feedback/Alert.d.ts +12 -0
- package/dist/components/feedback/Modal.d.ts +17 -0
- package/dist/components/feedback/index.d.ts +4 -0
- package/dist/components/index.d.ts +6 -0
- package/dist/components/input/Checkbox.d.ts +7 -0
- package/dist/components/input/DatePicker.d.ts +12 -0
- package/dist/components/input/Input.d.ts +11 -0
- package/dist/components/input/Radio.d.ts +6 -0
- package/dist/components/input/Select.d.ts +12 -0
- package/dist/components/input/Slider.d.ts +17 -0
- package/dist/components/input/Switch.d.ts +7 -0
- package/dist/components/input/Upload.d.ts +33 -0
- package/dist/components/input/index.d.ts +16 -0
- package/dist/components/layout/Divider.d.ts +13 -0
- package/dist/components/layout/Grid.d.ts +35 -0
- package/dist/components/layout/Layout.d.ts +38 -0
- package/dist/components/layout/Space.d.ts +13 -0
- package/dist/components/layout/index.d.ts +8 -0
- package/dist/components/navigation/Affix.d.ts +13 -0
- package/dist/components/navigation/Anchor.d.ts +25 -0
- package/dist/components/navigation/BackTop.d.ts +12 -0
- package/dist/components/navigation/Breadcrumb.d.ts +14 -0
- package/dist/components/navigation/Dropdown.d.ts +21 -0
- package/dist/components/navigation/Menu.d.ts +40 -0
- package/dist/components/navigation/Pagination.d.ts +13 -0
- package/dist/components/navigation/Steps.d.ts +17 -0
- package/dist/components/navigation/StickyTool.d.ts +21 -0
- package/dist/components/navigation/Tabs.d.ts +16 -0
- package/dist/components/navigation/index.d.ts +20 -0
- package/dist/context/LanguageContext.d.ts +14 -0
- package/dist/context/ThemeContext.d.ts +12 -0
- package/dist/data/componentList.d.ts +6 -0
- package/dist/i18n/translations.d.ts +856 -0
- package/dist/index.d.ts +3 -0
- package/package.json +63 -0
- package/src/index.css +1 -0
- package/src/tokens/base.css +58 -0
- package/src/tokens/dark.css +27 -0
- package/src/tokens/index.css +4 -0
- package/src/tokens/utilities.css +57 -0
- package/src/tokens/variables.css +145 -0
package/dist/index.d.ts
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@zixili/design-system",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "BEDI Design System — 企业级 React 组件库,50+ 组件,TypeScript + 暗色模式 + i18n",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "ZiXi",
|
|
7
|
+
"keywords": ["react", "design-system", "components", "typescript", "ui", "bedi"],
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/Zixi370719/BDesign.git"
|
|
11
|
+
},
|
|
12
|
+
"type": "module",
|
|
13
|
+
"main": "dist/bedi.cjs",
|
|
14
|
+
"module": "dist/bedi.js",
|
|
15
|
+
"types": "dist/index.d.ts",
|
|
16
|
+
"style": "dist/bedi.css",
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"import": "./dist/bedi.js",
|
|
20
|
+
"require": "./dist/bedi.cjs",
|
|
21
|
+
"types": "./dist/index.d.ts"
|
|
22
|
+
},
|
|
23
|
+
"./tokens": "./src/tokens/index.css",
|
|
24
|
+
"./src/tokens/index.css": "./src/tokens/index.css",
|
|
25
|
+
"./src/tokens/variables.css": "./src/tokens/variables.css",
|
|
26
|
+
"./src/tokens/dark.css": "./src/tokens/dark.css",
|
|
27
|
+
"./src/tokens/base.css": "./src/tokens/base.css",
|
|
28
|
+
"./src/index.css": "./src/index.css"
|
|
29
|
+
},
|
|
30
|
+
"files": [
|
|
31
|
+
"dist",
|
|
32
|
+
"src/tokens",
|
|
33
|
+
"src/index.css",
|
|
34
|
+
"LICENSE"
|
|
35
|
+
],
|
|
36
|
+
"scripts": {
|
|
37
|
+
"dev": "vite",
|
|
38
|
+
"build": "vite build",
|
|
39
|
+
"build:lib": "vite build --config vite.lib.config.ts",
|
|
40
|
+
"preview": "vite preview",
|
|
41
|
+
"typecheck": "tsc --noEmit",
|
|
42
|
+
"release": "npm run build:lib && npm version patch && npm publish --access public"
|
|
43
|
+
},
|
|
44
|
+
"dependencies": {},
|
|
45
|
+
"peerDependencies": {
|
|
46
|
+
"framer-motion": "^10.16.16",
|
|
47
|
+
"react": "^18.2.0",
|
|
48
|
+
"react-dom": "^18.2.0"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@types/react": "^18.2.45",
|
|
52
|
+
"@types/react-dom": "^18.2.18",
|
|
53
|
+
"@vitejs/plugin-react": "^4.2.1",
|
|
54
|
+
"framer-motion": "^10.16.16",
|
|
55
|
+
"fuse.js": "^7.1.0",
|
|
56
|
+
"react": "^18.2.0",
|
|
57
|
+
"react-dom": "^18.2.0",
|
|
58
|
+
"react-router-dom": "^6.20.0",
|
|
59
|
+
"typescript": "^5.3.3",
|
|
60
|
+
"vite": "^5.0.8",
|
|
61
|
+
"vite-plugin-dts": "^3.7.0"
|
|
62
|
+
}
|
|
63
|
+
}
|
package/src/index.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import './tokens/index.css';
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
* {
|
|
2
|
+
margin: 0;
|
|
3
|
+
padding: 0;
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
body {
|
|
8
|
+
font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
|
|
9
|
+
-webkit-font-smoothing: antialiased;
|
|
10
|
+
-moz-osx-font-smoothing: grayscale;
|
|
11
|
+
color: var(--color-text-1);
|
|
12
|
+
background-color: var(--color-bg-2);
|
|
13
|
+
line-height: var(--line-height-base);
|
|
14
|
+
font-size: var(--font-size-md);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
#root {
|
|
18
|
+
min-height: 100vh;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.app {
|
|
22
|
+
min-height: 100vh;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
a {
|
|
26
|
+
text-decoration: none;
|
|
27
|
+
color: inherit;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
button {
|
|
31
|
+
font-family: inherit;
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
:where(a, button, input, select, textarea):focus-visible {
|
|
36
|
+
outline: none;
|
|
37
|
+
box-shadow: var(--shadow-focus);
|
|
38
|
+
border-radius: var(--radius-md);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* Scrollbar styling */
|
|
42
|
+
::-webkit-scrollbar {
|
|
43
|
+
width: 6px;
|
|
44
|
+
height: 6px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
::-webkit-scrollbar-track {
|
|
48
|
+
background: transparent;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
::-webkit-scrollbar-thumb {
|
|
52
|
+
background: var(--color-fill-2);
|
|
53
|
+
border-radius: 3px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
::-webkit-scrollbar-thumb:hover {
|
|
57
|
+
background: var(--color-fill-3);
|
|
58
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
[data-theme="dark"] {
|
|
2
|
+
--color-text-1: #F6F6F6;
|
|
3
|
+
--color-text-2: #C9CDD4;
|
|
4
|
+
--color-text-3: #86909C;
|
|
5
|
+
--color-text-4: #4E5969;
|
|
6
|
+
|
|
7
|
+
--color-bg-1: #1D2129;
|
|
8
|
+
--color-bg-2: #23272E;
|
|
9
|
+
--color-bg-3: #2A2E35;
|
|
10
|
+
--color-bg-4: #33373E;
|
|
11
|
+
|
|
12
|
+
--color-border-1: #33373E;
|
|
13
|
+
--color-border-2: #484848;
|
|
14
|
+
--color-border-3: #5B5B5B;
|
|
15
|
+
|
|
16
|
+
--color-fill-1: #33373E;
|
|
17
|
+
--color-fill-2: #484848;
|
|
18
|
+
--color-fill-3: #5B5B5B;
|
|
19
|
+
|
|
20
|
+
/* 优化深色模式下的primary颜色,提高饱和度 */
|
|
21
|
+
--color-primary: #4D94FF;
|
|
22
|
+
--color-primary-hover: #6FA8FF;
|
|
23
|
+
--color-primary-active: #2D7FE8;
|
|
24
|
+
--color-primary-light: rgba(77, 148, 255, 0.2);
|
|
25
|
+
|
|
26
|
+
--shadow-focus: 0 0 0 2px rgba(77, 148, 255, 0.4);
|
|
27
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/* BDesign utility classes */
|
|
2
|
+
|
|
3
|
+
/* 三级标题 - 标准样式 */
|
|
4
|
+
.third-level-title {
|
|
5
|
+
font-size: 18px;
|
|
6
|
+
font-weight: 600;
|
|
7
|
+
color: var(--color-text-1);
|
|
8
|
+
margin-bottom: var(--spacing-md);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/* 三级标题 - 小间距 */
|
|
12
|
+
.third-level-title-small-margin {
|
|
13
|
+
font-size: 18px;
|
|
14
|
+
font-weight: 600;
|
|
15
|
+
color: var(--color-text-1);
|
|
16
|
+
margin-bottom: var(--spacing-sm);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* 三级标题 - 左对齐 */
|
|
20
|
+
.third-level-title-left-align {
|
|
21
|
+
font-size: 18px;
|
|
22
|
+
font-weight: 600;
|
|
23
|
+
color: var(--color-text-1);
|
|
24
|
+
margin-bottom: var(--spacing-sm);
|
|
25
|
+
text-align: left;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* 三级标题 - 无间距 */
|
|
29
|
+
.third-level-title-no-margin {
|
|
30
|
+
font-size: 18px;
|
|
31
|
+
font-weight: 600;
|
|
32
|
+
color: var(--color-text-1);
|
|
33
|
+
margin-bottom: 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* 三级标题 - 居中对齐 */
|
|
37
|
+
.third-level-title-center {
|
|
38
|
+
font-size: 18px;
|
|
39
|
+
font-weight: 600;
|
|
40
|
+
color: var(--color-text-1);
|
|
41
|
+
margin-bottom: var(--spacing-md);
|
|
42
|
+
text-align: center;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* 三级标题 - 带下划线 */
|
|
46
|
+
.third-level-title-underline {
|
|
47
|
+
font-size: 18px;
|
|
48
|
+
font-weight: 600;
|
|
49
|
+
color: var(--color-text-1);
|
|
50
|
+
margin-bottom: var(--spacing-md);
|
|
51
|
+
padding-bottom: var(--spacing-sm);
|
|
52
|
+
border-bottom: 1px solid transparent;
|
|
53
|
+
background-image: linear-gradient(to right, #e0e0e0, transparent);
|
|
54
|
+
background-position: 0 100%;
|
|
55
|
+
background-repeat: no-repeat;
|
|
56
|
+
background-size: 100% 1px;
|
|
57
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
/* =========================================================
|
|
3
|
+
* BEDI Design System (Arco-inspired)
|
|
4
|
+
* ========================================================= */
|
|
5
|
+
|
|
6
|
+
/* Layout */
|
|
7
|
+
--page-max-width: 1200px;
|
|
8
|
+
--content-max-width: 1040px;
|
|
9
|
+
--header-height: 64px;
|
|
10
|
+
|
|
11
|
+
/* Brand / Semantic colors */
|
|
12
|
+
--color-primary: #165DFF;
|
|
13
|
+
--color-primary-hover: #4080FF;
|
|
14
|
+
--color-primary-active: #0E42D2;
|
|
15
|
+
--color-primary-light: #E8F3FF;
|
|
16
|
+
|
|
17
|
+
--color-success: #00B42A;
|
|
18
|
+
--color-success-hover: #23C343;
|
|
19
|
+
--color-success-active: #009122;
|
|
20
|
+
--color-success-light: #E8FFEA;
|
|
21
|
+
|
|
22
|
+
--color-warning: #FF7D00;
|
|
23
|
+
--color-warning-hover: #FF9A2E;
|
|
24
|
+
--color-warning-active: #D25F00;
|
|
25
|
+
--color-warning-light: #FFF7E8;
|
|
26
|
+
|
|
27
|
+
--color-error: #F53F3F;
|
|
28
|
+
--color-error-hover: #F76560;
|
|
29
|
+
--color-error-active: #CB272D;
|
|
30
|
+
--color-error-light: #FFE8E8;
|
|
31
|
+
|
|
32
|
+
/* Neutral (text) */
|
|
33
|
+
--color-text-1: #1D2129;
|
|
34
|
+
--color-text-2: #4E5969;
|
|
35
|
+
--color-text-3: #86909C;
|
|
36
|
+
--color-text-4: #C9CDD4;
|
|
37
|
+
|
|
38
|
+
/* Neutral (surface) */
|
|
39
|
+
--color-bg-1: #FFFFFF;
|
|
40
|
+
--color-bg-2: #F7F8FA;
|
|
41
|
+
--color-bg-3: #F2F3F5;
|
|
42
|
+
--color-bg-4: #E5E6EB;
|
|
43
|
+
|
|
44
|
+
--color-border-1: #E5E6EB;
|
|
45
|
+
--color-border-2: #D9D9D9;
|
|
46
|
+
--color-border-3: #C9CDD4;
|
|
47
|
+
|
|
48
|
+
--color-fill-1: #F2F3F5;
|
|
49
|
+
--color-fill-2: #E5E6EB;
|
|
50
|
+
--color-fill-3: #D9D9D9;
|
|
51
|
+
|
|
52
|
+
/* Color scales (minimal subset used by components) */
|
|
53
|
+
--color-blue-1: #E8F3FF;
|
|
54
|
+
--color-blue-2: #C9DDFF;
|
|
55
|
+
--color-blue-3: #A6C8FF;
|
|
56
|
+
--color-blue-4: #7DB3FF;
|
|
57
|
+
--color-blue-6: var(--color-primary);
|
|
58
|
+
--color-blue-7: var(--color-primary-active);
|
|
59
|
+
|
|
60
|
+
--color-green-1: #E8FFEA;
|
|
61
|
+
--color-green-2: #CFFFD6;
|
|
62
|
+
--color-green-4: #4CD263;
|
|
63
|
+
--color-green-6: var(--color-success);
|
|
64
|
+
--color-green-7: #009A29;
|
|
65
|
+
|
|
66
|
+
--color-orange-1: #FFF7E8;
|
|
67
|
+
--color-orange-2: #FFE4BA;
|
|
68
|
+
--color-orange-4: #FF9A2E;
|
|
69
|
+
--color-orange-6: var(--color-warning);
|
|
70
|
+
--color-orange-7: #D25F00;
|
|
71
|
+
|
|
72
|
+
--color-red-1: #FFE8E8;
|
|
73
|
+
--color-red-2: #FFCECE;
|
|
74
|
+
--color-red-4: #F76560;
|
|
75
|
+
--color-red-6: var(--color-error);
|
|
76
|
+
--color-red-7: var(--color-error-active);
|
|
77
|
+
|
|
78
|
+
/* Spacing (semantic + numeric) */
|
|
79
|
+
--spacing-unit: 4px;
|
|
80
|
+
--spacing-0: 0px;
|
|
81
|
+
--spacing-1: 4px;
|
|
82
|
+
--spacing-2: 8px;
|
|
83
|
+
--spacing-3: 12px;
|
|
84
|
+
--spacing-4: 16px;
|
|
85
|
+
--spacing-5: 20px;
|
|
86
|
+
--spacing-6: 24px;
|
|
87
|
+
--spacing-8: 32px;
|
|
88
|
+
--spacing-10: 40px;
|
|
89
|
+
--spacing-12: 48px;
|
|
90
|
+
--spacing-14: 56px;
|
|
91
|
+
--spacing-16: 64px;
|
|
92
|
+
|
|
93
|
+
--spacing-xs: var(--spacing-1);
|
|
94
|
+
--spacing-sm: var(--spacing-2);
|
|
95
|
+
--spacing-md: var(--spacing-3);
|
|
96
|
+
--spacing-lg: var(--spacing-4);
|
|
97
|
+
--spacing-xl: var(--spacing-6);
|
|
98
|
+
--spacing-xxl: var(--spacing-8);
|
|
99
|
+
--spacing-xxxl: var(--spacing-12);
|
|
100
|
+
|
|
101
|
+
/* Typography */
|
|
102
|
+
--font-size-xs: 12px;
|
|
103
|
+
--font-size-sm: 13px;
|
|
104
|
+
--font-size-md: 14px;
|
|
105
|
+
--font-size-lg: 16px;
|
|
106
|
+
--font-size-xl: 20px;
|
|
107
|
+
--font-size-xxl: 24px;
|
|
108
|
+
--font-size-hero: 48px;
|
|
109
|
+
|
|
110
|
+
--line-height-base: 1.5715;
|
|
111
|
+
|
|
112
|
+
/* Radius */
|
|
113
|
+
--radius-xs: 2px;
|
|
114
|
+
--radius-sm: 2px;
|
|
115
|
+
--radius-md: 4px;
|
|
116
|
+
--radius-lg: 8px;
|
|
117
|
+
--radius-xl: 12px;
|
|
118
|
+
--radius-xxl: 16px;
|
|
119
|
+
|
|
120
|
+
/* Shadow */
|
|
121
|
+
--shadow-1: 0 1px 2px rgba(0, 0, 0, 0.06);
|
|
122
|
+
--shadow-2: 0 2px 8px rgba(0, 0, 0, 0.08);
|
|
123
|
+
--shadow-3: 0 4px 16px rgba(0, 0, 0, 0.12);
|
|
124
|
+
--shadow-4: 0 8px 24px rgba(0, 0, 0, 0.14);
|
|
125
|
+
--shadow-5: 0 12px 32px rgba(0, 0, 0, 0.16);
|
|
126
|
+
|
|
127
|
+
--shadow-sm: var(--shadow-1);
|
|
128
|
+
--shadow-md: var(--shadow-2);
|
|
129
|
+
--shadow-lg: var(--shadow-3);
|
|
130
|
+
|
|
131
|
+
/* Focus ring */
|
|
132
|
+
--shadow-focus: 0 0 0 2px rgba(22, 93, 255, 0.2);
|
|
133
|
+
|
|
134
|
+
/* Compatibility aliases (older component CSS) */
|
|
135
|
+
--text-primary: var(--color-text-1);
|
|
136
|
+
--text-secondary: var(--color-text-2);
|
|
137
|
+
--text-tertiary: var(--color-text-3);
|
|
138
|
+
|
|
139
|
+
--bg-primary: var(--color-bg-1);
|
|
140
|
+
--bg-secondary: var(--color-bg-2);
|
|
141
|
+
--bg-tertiary: var(--color-fill-1);
|
|
142
|
+
|
|
143
|
+
--border-color: var(--color-border-1);
|
|
144
|
+
--color-border: var(--color-border-1);
|
|
145
|
+
}
|