@pisell/materials 1.0.512 → 1.0.514
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +3 -3
- package/build/lowcode/preview.js +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +21 -21
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +21 -21
- package/es/components/pisellHeaderProgressBar/index.js +3 -4
- package/es/components/pisellHeaderProgressBar/index.less +0 -1
- package/es/components/pisellImageCarousels/index.d.ts +1 -0
- package/es/components/pisellImageCarousels/index.js +4 -2
- package/es/components/pisellList01/index.d.ts +1 -0
- package/es/components/pisellList01/index.js +11 -7
- package/es/components/profileMenu/index.d.ts +25 -0
- package/es/components/profileMenu/index.js +110 -0
- package/es/components/profileMenu/index.less +112 -0
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/lib/components/pisellHeaderProgressBar/index.js +3 -2
- package/lib/components/pisellHeaderProgressBar/index.less +0 -1
- package/lib/components/pisellImageCarousels/index.d.ts +1 -0
- package/lib/components/pisellImageCarousels/index.js +3 -2
- package/lib/components/pisellList01/index.d.ts +1 -0
- package/lib/components/pisellList01/index.js +8 -3
- package/lib/components/profileMenu/index.d.ts +25 -0
- package/lib/components/profileMenu/index.js +118 -0
- package/lib/components/profileMenu/index.less +112 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -0
- package/lowcode/profile-menu/meta.ts +175 -0
- package/lowcode/profile-menu/snippets.ts +67 -0
- package/package.json +3 -3
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
.profile-menu-wrap {
|
|
2
|
+
display: flex;
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
gap: 10px;
|
|
5
|
+
width: fit-content;
|
|
6
|
+
align-items: center;
|
|
7
|
+
padding-top: 6px;
|
|
8
|
+
padding-bottom: 6px;
|
|
9
|
+
padding-left: 16px;
|
|
10
|
+
|
|
11
|
+
border-radius: 50px;
|
|
12
|
+
border: 1px solid var(--Gray-100, #f2f4f7);
|
|
13
|
+
background: var(--Base-White, #fff);
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
transition: all 0.3s ease;
|
|
16
|
+
|
|
17
|
+
/* Shadow/sm */
|
|
18
|
+
// box-shadow: 0px 1px 3px 0px rgba(16, 24, 40, 0.1),
|
|
19
|
+
// 0px 1px 2px 0px rgba(16, 24, 40, 0.06);
|
|
20
|
+
|
|
21
|
+
&:hover {
|
|
22
|
+
border-color: var(--Gray-200, #e5e7eb);
|
|
23
|
+
box-shadow: 0px 2px 4px 0px rgba(16, 24, 40, 0.15);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.profile-menu-icon {
|
|
27
|
+
display: flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
.profile-menu-user-info {
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
justify-content: center;
|
|
38
|
+
min-width: 0;
|
|
39
|
+
padding: 0;
|
|
40
|
+
|
|
41
|
+
&-item {
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
gap: 12px;
|
|
45
|
+
width: 100%;
|
|
46
|
+
flex-wrap: nowrap;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&-name {
|
|
50
|
+
color: var(--Gray-700, #344054);
|
|
51
|
+
font-family: Inter;
|
|
52
|
+
font-size: 14px;
|
|
53
|
+
font-weight: 600;
|
|
54
|
+
line-height: 20px;
|
|
55
|
+
margin: 0;
|
|
56
|
+
white-space: nowrap;
|
|
57
|
+
overflow: hidden;
|
|
58
|
+
text-overflow: ellipsis;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&-email {
|
|
62
|
+
color: var(--Gray-600, #475467);
|
|
63
|
+
font-family: Inter;
|
|
64
|
+
font-size: 14px;
|
|
65
|
+
font-weight: 400;
|
|
66
|
+
line-height: 20px;
|
|
67
|
+
margin: 0;
|
|
68
|
+
white-space: nowrap;
|
|
69
|
+
overflow: hidden;
|
|
70
|
+
text-overflow: ellipsis;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.profile-menu-dropdown {
|
|
75
|
+
.ant-dropdown-menu {
|
|
76
|
+
padding: 8px;
|
|
77
|
+
border-radius: 8px;
|
|
78
|
+
border: 1px solid var(--Gray-100, #f2f4f7);
|
|
79
|
+
background: var(--Base-White, #fff);
|
|
80
|
+
box-shadow: 0px 4px 6px -2px rgba(16, 24, 40, 0.03),
|
|
81
|
+
0px 12px 16px -4px rgba(16, 24, 40, 0.08);
|
|
82
|
+
|
|
83
|
+
.ant-dropdown-menu-item {
|
|
84
|
+
padding: 8px 12px;
|
|
85
|
+
border-radius: 6px;
|
|
86
|
+
min-height: 40px;
|
|
87
|
+
display: flex;
|
|
88
|
+
align-items: center;
|
|
89
|
+
|
|
90
|
+
&:hover {
|
|
91
|
+
background: var(--Gray-50, #f9fafb);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&:active {
|
|
95
|
+
background: var(--Gray-100, #f2f4f7);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.profile-menu-user-info-item {
|
|
99
|
+
display: flex;
|
|
100
|
+
align-items: center;
|
|
101
|
+
gap: 12px;
|
|
102
|
+
width: 100%;
|
|
103
|
+
flex-wrap: nowrap;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.ant-dropdown-menu-item-divider {
|
|
108
|
+
margin: 8px 0;
|
|
109
|
+
background-color: var(--Gray-100, #f2f4f7);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
package/lib/index.d.ts
CHANGED
|
@@ -104,6 +104,7 @@ export { default as PisellToast } from './components/pisellToast';
|
|
|
104
104
|
export { default as PisellWalletPassCard } from './components/pisellWalletPassCard';
|
|
105
105
|
export { default as PisellScan } from './components/pisellScan';
|
|
106
106
|
export { default as PisellAlert } from './components/pisellAlert';
|
|
107
|
+
export { default as ProfileMenu } from './components/profileMenu';
|
|
107
108
|
export { default as PisellCard } from './components/pisellCard';
|
|
108
109
|
export { default as CropPhoto } from './components/cropPhoto';
|
|
109
110
|
export { default as PisellQrcode } from './components/pisellQrcode';
|
package/lib/index.js
CHANGED
|
@@ -139,6 +139,7 @@ __export(src_exports, {
|
|
|
139
139
|
Popconfirm: () => import_antd21.Popconfirm,
|
|
140
140
|
Popover: () => import_antd22.Popover,
|
|
141
141
|
ProductCard: () => import_productCard.default,
|
|
142
|
+
ProfileMenu: () => import_profileMenu.default,
|
|
142
143
|
Progress: () => import_antd23.Progress,
|
|
143
144
|
QRCode: () => import_qrcode.default,
|
|
144
145
|
Radio: () => import_radio.default,
|
|
@@ -290,6 +291,7 @@ var import_pisellToast = __toESM(require("./components/pisellToast"));
|
|
|
290
291
|
var import_pisellWalletPassCard = __toESM(require("./components/pisellWalletPassCard"));
|
|
291
292
|
var import_pisellScan = __toESM(require("./components/pisellScan"));
|
|
292
293
|
var import_pisellAlert = __toESM(require("./components/pisellAlert"));
|
|
294
|
+
var import_profileMenu = __toESM(require("./components/profileMenu"));
|
|
293
295
|
var import_pisellCard = __toESM(require("./components/pisellCard"));
|
|
294
296
|
var import_cropPhoto = __toESM(require("./components/cropPhoto"));
|
|
295
297
|
var import_pisellQrcode = __toESM(require("./components/pisellQrcode"));
|
|
@@ -448,6 +450,7 @@ var import_pisellList01 = __toESM(require("./components/pisellList01"));
|
|
|
448
450
|
Popconfirm,
|
|
449
451
|
Popover,
|
|
450
452
|
ProductCard,
|
|
453
|
+
ProfileMenu,
|
|
451
454
|
Progress,
|
|
452
455
|
QRCode,
|
|
453
456
|
Radio,
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import snippets from './snippets';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
snippets,
|
|
5
|
+
componentName: 'ProfileMenu',
|
|
6
|
+
title: '个人中心菜单',
|
|
7
|
+
category: '通用',
|
|
8
|
+
npm: {
|
|
9
|
+
package: '@pisell/materials',
|
|
10
|
+
version: '1.0.0',
|
|
11
|
+
exportName: 'ProfileMenu',
|
|
12
|
+
main: 'src/index.tsx',
|
|
13
|
+
destructuring: true,
|
|
14
|
+
subName: '',
|
|
15
|
+
},
|
|
16
|
+
props: [
|
|
17
|
+
{
|
|
18
|
+
title: {
|
|
19
|
+
label: "入口菜单设置"
|
|
20
|
+
},
|
|
21
|
+
display: "block",
|
|
22
|
+
type: "group",
|
|
23
|
+
items: [
|
|
24
|
+
{
|
|
25
|
+
name: 'showBadge',
|
|
26
|
+
title: { label: '显示徽标', tip: '是否在头像右上角显示徽标' },
|
|
27
|
+
propType: 'bool',
|
|
28
|
+
defaultValue: false,
|
|
29
|
+
setter: 'BoolSetter',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: 'badgeCount',
|
|
33
|
+
title: { label: '徽标数量', tip: '徽标显示的数字' },
|
|
34
|
+
propType: 'number',
|
|
35
|
+
defaultValue: 1,
|
|
36
|
+
setter: 'NumberSetter',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: 'menuIcon',
|
|
40
|
+
title: { label: '菜单图标', tip: '左侧菜单图标' },
|
|
41
|
+
propType: { type: 'oneOfType', value: ['string', 'node'] },
|
|
42
|
+
setter: [{
|
|
43
|
+
componentName: 'IconSetter',
|
|
44
|
+
}, {
|
|
45
|
+
componentName: 'SlotSetter',
|
|
46
|
+
}],
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: 'userName',
|
|
50
|
+
title: { label: '用户名', tip: '显示的用户名' },
|
|
51
|
+
propType: 'string',
|
|
52
|
+
setter: 'StringSetter',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: 'email',
|
|
56
|
+
title: { label: '邮箱', tip: '显示的邮箱地址' },
|
|
57
|
+
propType: 'string',
|
|
58
|
+
setter: 'StringSetter',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: 'isShowUserName',
|
|
62
|
+
title: { label: '显示用户名', tip: '是否显示用户名' },
|
|
63
|
+
propType: 'bool',
|
|
64
|
+
defaultValue: false,
|
|
65
|
+
setter: 'BoolSetter',
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: 'isShowEmail',
|
|
69
|
+
title: { label: '显示邮箱', tip: '是否显示邮箱' },
|
|
70
|
+
propType: 'bool',
|
|
71
|
+
defaultValue: false,
|
|
72
|
+
setter: 'BoolSetter',
|
|
73
|
+
},
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
title: {
|
|
78
|
+
label: "菜单字段设置"
|
|
79
|
+
},
|
|
80
|
+
display: "block",
|
|
81
|
+
type: "group",
|
|
82
|
+
items: [
|
|
83
|
+
{
|
|
84
|
+
name: 'isShowUserInfo',
|
|
85
|
+
title: {
|
|
86
|
+
label: '显示用户信息展示区域',
|
|
87
|
+
tip: '在下拉菜单顶部显示用户信息'
|
|
88
|
+
},
|
|
89
|
+
propType: 'bool',
|
|
90
|
+
defaultValue: false,
|
|
91
|
+
setter: 'BoolSetter',
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
name: 'menuItems',
|
|
95
|
+
title: { label: '下拉菜单项', tip: '下拉菜单的配置项' },
|
|
96
|
+
propType: {
|
|
97
|
+
type: 'arrayOf',
|
|
98
|
+
value: {
|
|
99
|
+
type: 'shape',
|
|
100
|
+
value: {
|
|
101
|
+
key: 'string',
|
|
102
|
+
label: 'string',
|
|
103
|
+
icon: 'node',
|
|
104
|
+
danger: 'bool',
|
|
105
|
+
disabled: 'bool',
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
setter: {
|
|
110
|
+
componentName: 'ArraySetter',
|
|
111
|
+
props: {
|
|
112
|
+
itemSetter: {
|
|
113
|
+
componentName: 'ObjectSetter',
|
|
114
|
+
props: {
|
|
115
|
+
config: {
|
|
116
|
+
items: [
|
|
117
|
+
{
|
|
118
|
+
name: 'key',
|
|
119
|
+
title: '唯一标识',
|
|
120
|
+
setter: 'StringSetter',
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
name: 'label',
|
|
124
|
+
title: '菜单项文本',
|
|
125
|
+
setter: 'StringSetter',
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
name: 'icon',
|
|
129
|
+
title: '图标',
|
|
130
|
+
setter: 'IconSetter',
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
name: 'danger',
|
|
134
|
+
title: '危险项',
|
|
135
|
+
setter: 'BoolSetter',
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
name: 'disabled',
|
|
139
|
+
title: '禁用',
|
|
140
|
+
setter: 'BoolSetter',
|
|
141
|
+
},
|
|
142
|
+
],
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
name: 'placement',
|
|
151
|
+
title: { label: '弹出位置', tip: '下拉菜单弹出的位置' },
|
|
152
|
+
propType: {
|
|
153
|
+
type: 'oneOf',
|
|
154
|
+
value: ['bottomLeft', 'bottomCenter', 'bottomRight', 'topLeft', 'topCenter', 'topRight'],
|
|
155
|
+
},
|
|
156
|
+
defaultValue: 'bottomRight',
|
|
157
|
+
setter: {
|
|
158
|
+
componentName: 'SelectSetter',
|
|
159
|
+
props: {
|
|
160
|
+
options: [
|
|
161
|
+
{ label: '左下', value: 'bottomLeft' },
|
|
162
|
+
{ label: '下居中', value: 'bottomCenter' },
|
|
163
|
+
{ label: '右下', value: 'bottomRight' },
|
|
164
|
+
{ label: '左上', value: 'topLeft' },
|
|
165
|
+
{ label: '上居中', value: 'topCenter' },
|
|
166
|
+
{ label: '右上', value: 'topRight' },
|
|
167
|
+
],
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
]
|
|
172
|
+
}
|
|
173
|
+
],
|
|
174
|
+
configure: { supports: { style: true, className: true } },
|
|
175
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
export default [
|
|
2
|
+
{
|
|
3
|
+
title: '个人中心菜单',
|
|
4
|
+
screenshot: '',
|
|
5
|
+
schema: {
|
|
6
|
+
componentName: 'ProfileMenu',
|
|
7
|
+
props: {
|
|
8
|
+
isShowEmail: true,
|
|
9
|
+
isShowUserName: true,
|
|
10
|
+
isShowUserInfo: false,
|
|
11
|
+
menuIcon: {
|
|
12
|
+
type: "JSSlot",
|
|
13
|
+
value: [
|
|
14
|
+
{
|
|
15
|
+
componentName: "Icon",
|
|
16
|
+
props: {
|
|
17
|
+
type: "MenuOutlined",
|
|
18
|
+
size: 20,
|
|
19
|
+
rotate: 0,
|
|
20
|
+
spin: false,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
},
|
|
25
|
+
menuItems: [
|
|
26
|
+
{
|
|
27
|
+
key: 'account',
|
|
28
|
+
label: 'My Account',
|
|
29
|
+
icon: {
|
|
30
|
+
type: "JSSlot",
|
|
31
|
+
value: [
|
|
32
|
+
{
|
|
33
|
+
componentName: "Icon",
|
|
34
|
+
props: {
|
|
35
|
+
type: "UserOutlined",
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
type: 'divider',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
key: 'logout',
|
|
46
|
+
label: 'Log Out',
|
|
47
|
+
icon: {
|
|
48
|
+
type: "JSSlot",
|
|
49
|
+
value: [
|
|
50
|
+
{
|
|
51
|
+
componentName: "Icon",
|
|
52
|
+
props: {
|
|
53
|
+
type: "LogoutOutlined",
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
},
|
|
58
|
+
danger: true,
|
|
59
|
+
},
|
|
60
|
+
],
|
|
61
|
+
placement: 'bottomRight',
|
|
62
|
+
showBadge: false,
|
|
63
|
+
badgeCount: 1,
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/materials",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.514",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -69,8 +69,8 @@
|
|
|
69
69
|
"libphonenumber-js": "^1.11.17",
|
|
70
70
|
"swiper": "^8.4.7",
|
|
71
71
|
"@pisell/date-picker": "1.0.114",
|
|
72
|
-
"@pisell/
|
|
73
|
-
"@pisell/
|
|
72
|
+
"@pisell/utils": "1.0.43",
|
|
73
|
+
"@pisell/icon": "0.0.10"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
76
|
"react": "^18.0.0",
|