@pisell/materials 6.0.5 → 6.0.7
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 +7 -7
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +21 -53
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +18 -50
- package/es/components/config-provider/index.js +1 -1
- package/es/components/dataSourceComponents/dataSourceForm/BaseForm.js +20 -11
- package/es/components/dataSourceComponents/dataSourceForm/formItem.js +1 -1
- package/es/components/dataSourceComponents/dataSourceForm/group/index.less +2 -2
- package/es/components/dataSourceComponents/dataSourceForm/index.js +4 -2
- package/es/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingContext.d.ts +4 -0
- package/es/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingProvider.js +11 -3
- package/es/components/dataSourceComponents/dataSourceForm/provider/jsonWrapper/JsonWrapperProvider.js +10 -3
- package/es/components/dataSourceComponents/dataSourceForm/serve.d.ts +3 -2
- package/es/components/dataSourceComponents/dataSourceForm/serve.js +36 -20
- package/es/components/dataSourceComponents/dataSourceForm/submitButton/index.js +50 -35
- package/es/components/dataSourceComponents/dataSourceForm/type.d.ts +5 -0
- package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +3 -1
- package/es/components/dataSourceComponents/dataSourceForm/utils.js +38 -10
- package/es/components/dataSourceComponents/dataSourceTable/BaseTable.js +6 -1
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.js +1 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useColumns.js +4 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useFormat.js +2 -2
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +14 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +48 -4
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.js +2 -2
- package/es/components/dataSourceComponents/dataSourceTable/index.js +4 -2
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +15 -1
- package/es/components/dataSourceComponents/fields/Input.Phone/WithMode.js +7 -1
- package/es/components/dataSourceComponents/fields/Input.Url/ReadPretty.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Input.Url/ReadPretty.js +16 -1
- package/es/components/dataSourceComponents/fields/Input.Url/ReadPretty.less +1 -1
- package/es/components/dataSourceComponents/fields/Select/index.js +7 -1
- package/es/components/dataSourceComponents/fields/Upload/serve.d.ts +4 -1
- package/es/components/dataSourceComponents/fields/Upload/serve.js +10 -31
- package/es/components/dataSourceComponents/hooks/useActions.d.ts +2 -1
- package/es/components/dataSourceComponents/hooks/useActions.js +73 -36
- package/es/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +7 -0
- package/es/components/dataSourceComponents/provider/dataSource/DataSourceProvider.js +3 -1
- package/es/components/dataSourceComponents/provider/variables/VariablesProvider.js +53 -6
- package/es/components/login-and-register/index.d.ts +82 -0
- package/es/components/login-and-register/index.js +360 -0
- package/es/components/login-and-register/index.less +211 -0
- package/es/components/organizationTenantSwitcher/defaultLogo.png +0 -0
- package/es/components/organizationTenantSwitcher/index.d.ts +17 -0
- package/es/components/organizationTenantSwitcher/index.js +96 -0
- package/es/components/organizationTenantSwitcher/index.less +88 -0
- package/es/components/page/index.js +8 -6
- package/es/components/page-header/index.d.ts +14 -0
- package/es/components/page-header/index.js +36 -0
- package/es/components/page-header/index.less +45 -0
- package/es/components/pisellAvatar/index.d.ts +19 -0
- package/es/components/pisellAvatar/index.js +89 -0
- package/es/components/pisellAvatar/index.less +26 -0
- package/es/components/pisellModal/components/PcModal/index.js +1 -1
- package/es/components/pisellTags/index.d.ts +13 -0
- package/es/components/pisellTags/index.js +83 -0
- package/es/components/pisellTags/index.less +17 -0
- package/es/components/pisellTags/utils.d.ts +1 -0
- package/es/components/pisellTags/utils.js +89 -0
- package/es/components/pisellText/components/Amount/index.js +1 -1
- package/es/components/profileMenu/index.d.ts +26 -0
- package/es/components/profileMenu/index.js +115 -0
- package/es/components/profileMenu/index.less +135 -0
- package/es/components/select/index.js +3 -2
- package/es/components/table/Header/index.js +8 -11
- package/es/index.d.ts +6 -0
- package/es/index.js +7 -1
- package/es/locales/en-US.d.ts +1 -0
- package/es/locales/en-US.js +1 -0
- package/es/locales/zh-CN.d.ts +1 -0
- package/es/locales/zh-CN.js +1 -0
- package/es/locales/zh-TW.d.ts +1 -0
- package/es/locales/zh-TW.js +1 -0
- package/lib/components/config-provider/index.js +1 -1
- package/lib/components/dataSourceComponents/dataSourceForm/BaseForm.js +22 -4
- package/lib/components/dataSourceComponents/dataSourceForm/formItem.js +1 -1
- package/lib/components/dataSourceComponents/dataSourceForm/group/index.less +2 -2
- package/lib/components/dataSourceComponents/dataSourceForm/index.js +3 -2
- package/lib/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingContext.d.ts +4 -0
- package/lib/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingProvider.js +17 -3
- package/lib/components/dataSourceComponents/dataSourceForm/provider/jsonWrapper/JsonWrapperProvider.js +16 -6
- package/lib/components/dataSourceComponents/dataSourceForm/serve.d.ts +3 -2
- package/lib/components/dataSourceComponents/dataSourceForm/serve.js +9 -5
- package/lib/components/dataSourceComponents/dataSourceForm/submitButton/index.js +19 -9
- package/lib/components/dataSourceComponents/dataSourceForm/type.d.ts +5 -0
- package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +3 -1
- package/lib/components/dataSourceComponents/dataSourceForm/utils.js +51 -5
- package/lib/components/dataSourceComponents/dataSourceTable/BaseTable.js +6 -1
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.js +1 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useColumns.js +4 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useFormat.js +1 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +14 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +46 -3
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.js +2 -2
- package/lib/components/dataSourceComponents/dataSourceTable/index.js +2 -2
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +15 -1
- package/lib/components/dataSourceComponents/fields/Input.Phone/WithMode.js +6 -1
- package/lib/components/dataSourceComponents/fields/Input.Url/ReadPretty.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Input.Url/ReadPretty.js +17 -2
- package/lib/components/dataSourceComponents/fields/Input.Url/ReadPretty.less +1 -1
- package/lib/components/dataSourceComponents/fields/Select/index.js +5 -1
- package/lib/components/dataSourceComponents/fields/Upload/serve.d.ts +4 -1
- package/lib/components/dataSourceComponents/fields/Upload/serve.js +20 -12
- package/lib/components/dataSourceComponents/hooks/useActions.d.ts +2 -1
- package/lib/components/dataSourceComponents/hooks/useActions.js +25 -7
- package/lib/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +7 -0
- package/lib/components/dataSourceComponents/provider/dataSource/DataSourceProvider.js +3 -1
- package/lib/components/dataSourceComponents/provider/variables/VariablesProvider.js +48 -7
- package/lib/components/login-and-register/index.d.ts +82 -0
- package/lib/components/login-and-register/index.js +261 -0
- package/lib/components/login-and-register/index.less +211 -0
- package/lib/components/organizationTenantSwitcher/defaultLogo.png +0 -0
- package/lib/components/organizationTenantSwitcher/index.d.ts +17 -0
- package/lib/components/organizationTenantSwitcher/index.js +119 -0
- package/lib/components/organizationTenantSwitcher/index.less +88 -0
- package/lib/components/page/index.js +6 -6
- package/lib/components/page-header/index.d.ts +14 -0
- package/lib/components/page-header/index.js +63 -0
- package/lib/components/page-header/index.less +45 -0
- package/lib/components/pisellAvatar/index.d.ts +19 -0
- package/lib/components/pisellAvatar/index.js +108 -0
- package/lib/components/pisellAvatar/index.less +26 -0
- package/lib/components/pisellModal/components/PcModal/index.js +1 -1
- package/lib/components/pisellTags/index.d.ts +13 -0
- package/lib/components/pisellTags/index.js +113 -0
- package/lib/components/pisellTags/index.less +17 -0
- package/lib/components/pisellTags/utils.d.ts +1 -0
- package/lib/components/pisellTags/utils.js +86 -0
- package/lib/components/pisellText/components/Amount/index.js +2 -2
- package/lib/components/profileMenu/index.d.ts +26 -0
- package/lib/components/profileMenu/index.js +113 -0
- package/lib/components/profileMenu/index.less +135 -0
- package/lib/components/select/index.js +2 -1
- package/lib/components/table/Header/index.js +11 -1
- package/lib/index.d.ts +6 -0
- package/lib/index.js +18 -0
- package/lib/locales/en-US.d.ts +1 -0
- package/lib/locales/en-US.js +1 -0
- package/lib/locales/zh-CN.d.ts +1 -0
- package/lib/locales/zh-CN.js +1 -0
- package/lib/locales/zh-TW.d.ts +1 -0
- package/lib/locales/zh-TW.js +1 -0
- package/lowcode/_utils/defaultSchema.ts +64 -0
- package/lowcode/data-source-form/meta.ts +130 -0
- package/lowcode/data-source-form/utils.ts +33 -3
- package/lowcode/data-source-table/meta.ts +420 -3
- package/lowcode/data-source-table/utils.tsx +6 -0
- package/lowcode/form-item-date-picker/snippets.ts +3 -0
- package/lowcode/form-item-input/snippets.ts +3 -1
- package/lowcode/form-item-input-number/snippets.ts +4 -0
- package/lowcode/form-item-input.email/snippets.ts +3 -0
- package/lowcode/form-item-input.json/snippets.ts +4 -1
- package/lowcode/form-item-input.password/snippets.ts +3 -0
- package/lowcode/form-item-input.phone/snippets.ts +3 -0
- package/lowcode/form-item-input.text-area/snippets.ts +3 -1
- package/lowcode/form-item-input.url/snippets.ts +3 -0
- package/lowcode/form-item-select/meta.ts +2 -1
- package/lowcode/form-item-select/snippets.ts +6 -0
- package/lowcode/form-item-time-picker/snippets.ts +3 -0
- package/lowcode/form-item-translation/snippets.ts +3 -1
- package/lowcode/login-and-register/meta.ts +541 -0
- package/lowcode/login-and-register/snippets.ts +38 -0
- package/lowcode/organization-tenant-switch/meta.ts +127 -0
- package/lowcode/page-header/meta.ts +68 -124
- package/lowcode/page-header/snippets.ts +1 -1
- package/lowcode/pisell-avatar/__screenshots__/avatar-1.jpg +0 -0
- package/lowcode/pisell-avatar/meta.ts +111 -0
- package/lowcode/pisell-avatar/snippets.ts +14 -0
- package/lowcode/pisell-tags/__screenshots__/tag-1.png +0 -0
- package/lowcode/pisell-tags/meta.ts +123 -0
- package/lowcode/pisell-tags/snippets.ts +14 -0
- package/lowcode/profile-menu/meta.ts +175 -0
- package/lowcode/profile-menu/snippets.ts +71 -0
- package/lowcode/submit-button/meta.ts +6 -0
- package/package.json +3 -3
|
@@ -38,10 +38,10 @@ var import_AdapterDayjs = require("@pisell/date-picker/es/AdapterDayjs");
|
|
|
38
38
|
var import_VariablesProvider = __toESM(require("../dataSourceComponents/provider/variables/VariablesProvider"));
|
|
39
39
|
var import_date_picker = require("@pisell/date-picker");
|
|
40
40
|
var import_antd = require("antd");
|
|
41
|
-
var import_en_US = __toESM(require("antd/locale/en_US"));
|
|
42
|
-
var import_zh_CN = __toESM(require("antd/locale/zh_CN"));
|
|
43
|
-
var import_zh_TW = __toESM(require("antd/locale/zh_TW"));
|
|
44
|
-
var import_zh_HK = __toESM(require("antd/locale/zh_HK"));
|
|
41
|
+
var import_en_US = __toESM(require("antd/es/locale/en_US"));
|
|
42
|
+
var import_zh_CN = __toESM(require("antd/es/locale/zh_CN"));
|
|
43
|
+
var import_zh_TW = __toESM(require("antd/es/locale/zh_TW"));
|
|
44
|
+
var import_zh_HK = __toESM(require("antd/es/locale/zh_HK"));
|
|
45
45
|
var import_pisell_config_provider = __toESM(require("../pisell-config-provider"));
|
|
46
46
|
var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
|
|
47
47
|
var localMap = {
|
|
@@ -69,7 +69,7 @@ var localeDateMap = {
|
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
71
|
var Page = (props) => {
|
|
72
|
-
var _a, _b, _c, _d;
|
|
72
|
+
var _a, _b, _c, _d, _e, _f;
|
|
73
73
|
const { children, style, className, locale: propsLocale, ...others } = props;
|
|
74
74
|
const context = (0, import_useEngineContext.default)();
|
|
75
75
|
const { platform, themeColor } = ((_a = context.appHelper) == null ? void 0 : _a.constants) || {};
|
|
@@ -271,7 +271,7 @@ var Page = (props) => {
|
|
|
271
271
|
dateAdapter: import_AdapterDayjs.AdapterDayjs,
|
|
272
272
|
adapterLocale: ((_d = localeDateMap == null ? void 0 : localeDateMap[locale]) == null ? void 0 : _d.adapterLocale) || "en"
|
|
273
273
|
},
|
|
274
|
-
/* @__PURE__ */ import_react.default.createElement(import_date_picker.ThemeProvider, { theme: datePickerTheme }, /* @__PURE__ */ import_react.default.createElement(import_date_picker.LocaleProvider, { value: { locale } }, /* @__PURE__ */ import_react.default.createElement(import_pisell_config_provider.default, { locale }, /* @__PURE__ */ import_react.default.createElement(import_VariablesProvider.default, null, /* @__PURE__ */ import_react.default.createElement(
|
|
274
|
+
/* @__PURE__ */ import_react.default.createElement(import_date_picker.ThemeProvider, { theme: datePickerTheme }, /* @__PURE__ */ import_react.default.createElement(import_date_picker.LocaleProvider, { value: { locale } }, /* @__PURE__ */ import_react.default.createElement(import_pisell_config_provider.default, { locale }, /* @__PURE__ */ import_react.default.createElement(import_VariablesProvider.default, { variables: ((_f = (_e = context.engine) == null ? void 0 : _e.props) == null ? void 0 : _f.variables) || {} }, /* @__PURE__ */ import_react.default.createElement(
|
|
275
275
|
"div",
|
|
276
276
|
{
|
|
277
277
|
style: {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface PageHeaderProps {
|
|
4
|
+
title?: React.ReactNode;
|
|
5
|
+
showTitle?: boolean;
|
|
6
|
+
subTitle?: React.ReactNode;
|
|
7
|
+
showSubTitle?: boolean;
|
|
8
|
+
showDivider?: boolean;
|
|
9
|
+
extra?: React.ReactNode;
|
|
10
|
+
className?: string;
|
|
11
|
+
style?: React.CSSProperties;
|
|
12
|
+
}
|
|
13
|
+
declare const PageHeader: (props: PageHeaderProps) => React.JSX.Element | null;
|
|
14
|
+
export default PageHeader;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/page-header/index.tsx
|
|
30
|
+
var page_header_exports = {};
|
|
31
|
+
__export(page_header_exports, {
|
|
32
|
+
default: () => page_header_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(page_header_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_classnames = __toESM(require("classnames"));
|
|
38
|
+
var import_index = require("./index.less");
|
|
39
|
+
var PageHeader = (props) => {
|
|
40
|
+
const {
|
|
41
|
+
title,
|
|
42
|
+
showTitle,
|
|
43
|
+
subTitle,
|
|
44
|
+
showSubTitle,
|
|
45
|
+
showDivider,
|
|
46
|
+
extra,
|
|
47
|
+
className,
|
|
48
|
+
style
|
|
49
|
+
} = props;
|
|
50
|
+
if ((!showTitle || !title) && (!showSubTitle || !subTitle) && !extra) {
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
54
|
+
"div",
|
|
55
|
+
{
|
|
56
|
+
className: (0, import_classnames.default)("pisell-lowcode-page-header-wrap", className),
|
|
57
|
+
style
|
|
58
|
+
},
|
|
59
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-page-header" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-page-header-left" }, showTitle && title && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-page-header-title" }, title), showSubTitle && subTitle && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-page-header-sub-title" }, subTitle)), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-page-header-extra" }, extra)),
|
|
60
|
+
showDivider && /* @__PURE__ */ import_react.default.createElement(import_antd.Divider, { className: "pisell-lowcode-page-header-divider" })
|
|
61
|
+
);
|
|
62
|
+
};
|
|
63
|
+
var page_header_default = PageHeader;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
.pisell-lowcode-page-header-wrap {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: 4px;
|
|
5
|
+
margin-bottom: 16px;
|
|
6
|
+
.pisell-lowcode-page-header {
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: space-between;
|
|
10
|
+
width: 100%;
|
|
11
|
+
|
|
12
|
+
.pisell-lowcode-page-header-left {
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
gap: 4px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.pisell-lowcode-page-header-title {
|
|
19
|
+
color: var(--Colors-Neutral-Text-colorText, rgba(0, 0, 0, 0.88));
|
|
20
|
+
font-size: var(--Typography-Font-Size-fontSizeHeading4, 20px);
|
|
21
|
+
font-weight: var(--Typography-Font-Weight-fontWeightStrong, 700);
|
|
22
|
+
line-height: var(
|
|
23
|
+
--Typography-Line-Height-lineHeightHeading4,
|
|
24
|
+
28px
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.pisell-lowcode-page-header-extra {
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
gap: 8px;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
.pisell-lowcode-page-header-sub-title {
|
|
35
|
+
color: var(--Colors-Neutral-Text-colorTextSecondary, rgba(0, 0, 0, 0.65));
|
|
36
|
+
font-size: var(--Typography-Font-Size-fontSize, 14px);
|
|
37
|
+
font-style: normal;
|
|
38
|
+
font-weight: var(--Typography-Font-Weight-fontWeightNormal, 400);
|
|
39
|
+
line-height: var(--Typography-Line-Height-lineHeight, 22px);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.pisell-lowcode-page-header-divider {
|
|
43
|
+
margin: 16px 0 0;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { AvatarProps } from 'antd';
|
|
3
|
+
import './index.less';
|
|
4
|
+
export declare type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
5
|
+
export interface PisellAvatarProps extends Omit<AvatarProps, 'size' | 'shape'> {
|
|
6
|
+
shape?: 'circle' | 'square';
|
|
7
|
+
size?: AvatarSize;
|
|
8
|
+
src?: string;
|
|
9
|
+
alt?: string;
|
|
10
|
+
icon?: React.ReactNode;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
className?: string;
|
|
13
|
+
style?: React.CSSProperties;
|
|
14
|
+
useTextAvatar?: boolean;
|
|
15
|
+
borderRadius?: number;
|
|
16
|
+
onError?: () => boolean;
|
|
17
|
+
}
|
|
18
|
+
declare const PisellAvatar: React.FC<PisellAvatarProps>;
|
|
19
|
+
export default PisellAvatar;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/pisellAvatar/index.tsx
|
|
30
|
+
var pisellAvatar_exports = {};
|
|
31
|
+
__export(pisellAvatar_exports, {
|
|
32
|
+
default: () => pisellAvatar_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(pisellAvatar_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_classnames = __toESM(require("classnames"));
|
|
38
|
+
var import_iconfont = __toESM(require("../iconfont"));
|
|
39
|
+
var import_index = require("./index.less");
|
|
40
|
+
var sizeMap = {
|
|
41
|
+
xs: 24,
|
|
42
|
+
sm: 32,
|
|
43
|
+
md: 40,
|
|
44
|
+
lg: 48,
|
|
45
|
+
xl: 56,
|
|
46
|
+
xxl: 64
|
|
47
|
+
};
|
|
48
|
+
var fontSizeMap = {
|
|
49
|
+
xs: 12,
|
|
50
|
+
sm: 14,
|
|
51
|
+
md: 16,
|
|
52
|
+
lg: 18,
|
|
53
|
+
xl: 20,
|
|
54
|
+
xxl: 24
|
|
55
|
+
};
|
|
56
|
+
var PisellAvatar = ({
|
|
57
|
+
shape = "circle",
|
|
58
|
+
size = "xs",
|
|
59
|
+
src,
|
|
60
|
+
alt,
|
|
61
|
+
icon,
|
|
62
|
+
children,
|
|
63
|
+
className,
|
|
64
|
+
style,
|
|
65
|
+
useTextAvatar,
|
|
66
|
+
borderRadius = 4,
|
|
67
|
+
onError,
|
|
68
|
+
...restProps
|
|
69
|
+
}) => {
|
|
70
|
+
const classes = (0, import_classnames.default)(
|
|
71
|
+
"pisell-avatar",
|
|
72
|
+
`pisell-avatar-${size}`,
|
|
73
|
+
`pisell-avatar-${shape}`,
|
|
74
|
+
{
|
|
75
|
+
"pisell-avatar-with-text": !src && !icon && children
|
|
76
|
+
},
|
|
77
|
+
className
|
|
78
|
+
);
|
|
79
|
+
const mergedStyle = {
|
|
80
|
+
...style,
|
|
81
|
+
width: sizeMap[size],
|
|
82
|
+
height: sizeMap[size],
|
|
83
|
+
fontSize: children || icon ? fontSizeMap[size] : void 0,
|
|
84
|
+
lineHeight: `${sizeMap[size]}px`,
|
|
85
|
+
borderRadius: shape === "square" ? `${borderRadius}px` : "50%"
|
|
86
|
+
};
|
|
87
|
+
const renderChildren = (0, import_react.useMemo)(() => {
|
|
88
|
+
if (useTextAvatar && children) {
|
|
89
|
+
return children;
|
|
90
|
+
}
|
|
91
|
+
return /* @__PURE__ */ import_react.default.createElement(import_iconfont.default, { type: "pisell2-user-01" });
|
|
92
|
+
}, [useTextAvatar, children]);
|
|
93
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
94
|
+
import_antd.Avatar,
|
|
95
|
+
{
|
|
96
|
+
...restProps,
|
|
97
|
+
className: classes,
|
|
98
|
+
shape,
|
|
99
|
+
style: mergedStyle,
|
|
100
|
+
src,
|
|
101
|
+
alt,
|
|
102
|
+
icon,
|
|
103
|
+
onError
|
|
104
|
+
},
|
|
105
|
+
renderChildren
|
|
106
|
+
);
|
|
107
|
+
};
|
|
108
|
+
var pisellAvatar_default = PisellAvatar;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
@prefix: pisell-avatar;
|
|
2
|
+
|
|
3
|
+
.@{prefix} {
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
background: var(--Gray-100, #f2f4f7); // 默认背景色
|
|
8
|
+
border: 1px solid #D0D5DD; // 移除默认边框
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
|
|
11
|
+
img {
|
|
12
|
+
object-fit: cover;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.anticon {
|
|
16
|
+
font-size: inherit !important;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// 文本头像样式
|
|
20
|
+
&.pisell-avatar-with-text {
|
|
21
|
+
background: var(--Gray-100, #f2f4f7); // 文本头像的背景色
|
|
22
|
+
color: var(--Gray-600, #475467); // 文本颜色
|
|
23
|
+
font-weight: 600;
|
|
24
|
+
// border: 0.75px solid var(--Gray-900, #101828);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -37,7 +37,7 @@ var import_antd = require("antd");
|
|
|
37
37
|
var import_classnames = __toESM(require("classnames"));
|
|
38
38
|
var import_utils = require("@pisell/utils");
|
|
39
39
|
var import_XClose = __toESM(require("@pisell/icon/es/XClose"));
|
|
40
|
-
var import_Delete_wght300_24px = __toESM(require("@pisell/icon/
|
|
40
|
+
var import_Delete_wght300_24px = __toESM(require("@pisell/icon/es/Delete_wght300_24px"));
|
|
41
41
|
var import_modal = __toESM(require("../../../modal"));
|
|
42
42
|
var import_constants = require("../../constants");
|
|
43
43
|
var import_index = require("./index.less");
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export declare type PisellTagsType = 'pill_color' | 'pill_outline';
|
|
4
|
+
export declare type PisellTagsColor = 'success' | 'warning' | 'error' | 'gray' | string;
|
|
5
|
+
export interface PisellTagsProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement> {
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
others?: React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;
|
|
8
|
+
type: PisellTagsType;
|
|
9
|
+
icon?: React.ReactNode;
|
|
10
|
+
color?: PisellTagsColor;
|
|
11
|
+
}
|
|
12
|
+
declare const PisellTags: (props: PisellTagsProps) => React.JSX.Element;
|
|
13
|
+
export default PisellTags;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/pisellTags/index.tsx
|
|
30
|
+
var pisellTags_exports = {};
|
|
31
|
+
__export(pisellTags_exports, {
|
|
32
|
+
default: () => pisellTags_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(pisellTags_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_classnames = __toESM(require("classnames"));
|
|
37
|
+
var import_utils = require("./utils");
|
|
38
|
+
var import_index = require("./index.less");
|
|
39
|
+
var pisellTagsColors = {
|
|
40
|
+
success: "#067647",
|
|
41
|
+
warning: "#B54708",
|
|
42
|
+
error: "#B42318",
|
|
43
|
+
gray: "#344054"
|
|
44
|
+
};
|
|
45
|
+
var getColor = (_color) => {
|
|
46
|
+
if (_color) {
|
|
47
|
+
return pisellTagsColors[_color] || _color;
|
|
48
|
+
}
|
|
49
|
+
return "#344054";
|
|
50
|
+
};
|
|
51
|
+
var getPillColorStyles = (_color) => {
|
|
52
|
+
const colorShades = (0, import_utils.generateColorShades)(_color);
|
|
53
|
+
return {
|
|
54
|
+
"--pisell-tags-bg-color": colorShades["color_50"],
|
|
55
|
+
"--pisell-tags-font-color": colorShades["color_700"],
|
|
56
|
+
"--pisell-tags-border-color": colorShades["color_200"]
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
var getPillOutlineStyles = (_color) => {
|
|
60
|
+
const colorShades = (0, import_utils.generateColorShades)(_color);
|
|
61
|
+
return {
|
|
62
|
+
"--pisell-tags-bg-color": "transparent",
|
|
63
|
+
"--pisell-tags-font-color": colorShades["color_700"],
|
|
64
|
+
"--pisell-tags-border-color": colorShades["color_600"]
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
var PisellTags = (props) => {
|
|
68
|
+
const {
|
|
69
|
+
children,
|
|
70
|
+
type,
|
|
71
|
+
icon,
|
|
72
|
+
color,
|
|
73
|
+
style = {},
|
|
74
|
+
others = {},
|
|
75
|
+
...otherProps
|
|
76
|
+
} = props;
|
|
77
|
+
const styles = (0, import_react.useMemo)(() => {
|
|
78
|
+
let obj = {
|
|
79
|
+
...style,
|
|
80
|
+
...others.style
|
|
81
|
+
};
|
|
82
|
+
const _color = getColor(props.color);
|
|
83
|
+
if (type === "pill_color") {
|
|
84
|
+
obj = {
|
|
85
|
+
...obj,
|
|
86
|
+
...getPillColorStyles(_color)
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
if (type === "pill_outline") {
|
|
90
|
+
obj = {
|
|
91
|
+
...obj,
|
|
92
|
+
...getPillOutlineStyles(_color)
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
return obj;
|
|
96
|
+
}, [color, style, others.style, type]);
|
|
97
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
98
|
+
"span",
|
|
99
|
+
{
|
|
100
|
+
style: { ...styles, ...style },
|
|
101
|
+
...others,
|
|
102
|
+
...otherProps,
|
|
103
|
+
className: (0, import_classnames.default)(
|
|
104
|
+
"pisell-tags",
|
|
105
|
+
others.className,
|
|
106
|
+
otherProps.className
|
|
107
|
+
)
|
|
108
|
+
},
|
|
109
|
+
icon ? icon : null,
|
|
110
|
+
children
|
|
111
|
+
);
|
|
112
|
+
};
|
|
113
|
+
var pisellTags_default = PisellTags;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
.pisell-tags {
|
|
2
|
+
--pisell-tags-bg-color: #F9FAFB;
|
|
3
|
+
--pisell-tags-font-color: #344054;
|
|
4
|
+
--pisell-tags-border-color: #EAECF0;
|
|
5
|
+
border-radius: 16px;
|
|
6
|
+
border: 1px solid var(--pisell-tags-border-color);
|
|
7
|
+
background: var(--pisell-tags-bg-color);
|
|
8
|
+
display: inline-flex;
|
|
9
|
+
padding: 2px 12px;
|
|
10
|
+
align-items: center;
|
|
11
|
+
gap: 6px;
|
|
12
|
+
|
|
13
|
+
color: var(--pisell-tags-font-color);
|
|
14
|
+
font-size: 14px;
|
|
15
|
+
font-style: normal;
|
|
16
|
+
font-weight: 500;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const generateColorShades: (color: string) => Record<string, string>;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/components/pisellTags/utils.ts
|
|
20
|
+
var utils_exports = {};
|
|
21
|
+
__export(utils_exports, {
|
|
22
|
+
generateColorShades: () => generateColorShades
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(utils_exports);
|
|
25
|
+
var hexToRgb = (hex) => {
|
|
26
|
+
hex = hex.replace(/^#/, "");
|
|
27
|
+
if (hex.length === 3) {
|
|
28
|
+
hex = hex.split("").map((h) => h + h).join("");
|
|
29
|
+
}
|
|
30
|
+
const intVal = parseInt(hex, 16);
|
|
31
|
+
return {
|
|
32
|
+
r: intVal >> 16 & 255,
|
|
33
|
+
// 提取红色分量
|
|
34
|
+
g: intVal >> 8 & 255,
|
|
35
|
+
// 提取绿色分量
|
|
36
|
+
b: intVal & 255
|
|
37
|
+
// 提取蓝色分量
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
var rgbToHex = (r, g, b) => {
|
|
41
|
+
return "#" + [r, g, b].map((x) => {
|
|
42
|
+
const hex = x.toString(16);
|
|
43
|
+
return hex.length === 1 ? "0" + hex : hex;
|
|
44
|
+
}).join("");
|
|
45
|
+
};
|
|
46
|
+
var parseColor = (color) => {
|
|
47
|
+
if (color.startsWith("#")) {
|
|
48
|
+
return hexToRgb(color);
|
|
49
|
+
} else if (color.startsWith("rgb")) {
|
|
50
|
+
const rgba = color.replace(/rgba?\(|\s+|\)/g, "").split(",").map(Number);
|
|
51
|
+
return { r: rgba[0], g: rgba[1], b: rgba[2], a: rgba[3] !== void 0 ? rgba[3] : 1 };
|
|
52
|
+
} else {
|
|
53
|
+
throw new Error("无效的颜色格式");
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
var generateColorShades = (color) => {
|
|
57
|
+
const { r, g, b, a } = parseColor(color);
|
|
58
|
+
const max = 700;
|
|
59
|
+
const gap = 1 / max;
|
|
60
|
+
const ratios = {
|
|
61
|
+
50: gap * 50,
|
|
62
|
+
200: gap * 200,
|
|
63
|
+
500: gap * 500,
|
|
64
|
+
600: gap * 600,
|
|
65
|
+
700: gap * 700
|
|
66
|
+
};
|
|
67
|
+
const adjustColorComponent = (component, ratio) => Math.round(component * ratio + 255 * (1 - ratio));
|
|
68
|
+
const shades = {
|
|
69
|
+
"color_50": rgbToHex(adjustColorComponent(r, ratios[50]), adjustColorComponent(g, ratios[50]), adjustColorComponent(b, ratios[50])),
|
|
70
|
+
"color_200": rgbToHex(adjustColorComponent(r, ratios[200]), adjustColorComponent(g, ratios[200]), adjustColorComponent(b, ratios[200])),
|
|
71
|
+
"color_500": rgbToHex(adjustColorComponent(r, ratios[500]), adjustColorComponent(g, ratios[500]), adjustColorComponent(b, ratios[500])),
|
|
72
|
+
"color_600": rgbToHex(adjustColorComponent(r, ratios[600]), adjustColorComponent(g, ratios[600]), adjustColorComponent(b, ratios[600])),
|
|
73
|
+
"color_700": color
|
|
74
|
+
};
|
|
75
|
+
if (a !== void 0) {
|
|
76
|
+
shades["color_50"] = `rgba(${adjustColorComponent(r, ratios[50])}, ${adjustColorComponent(g, ratios[50])}, ${adjustColorComponent(b, ratios[50])}, ${a})`;
|
|
77
|
+
shades["color_200"] = `rgba(${adjustColorComponent(r, ratios[200])}, ${adjustColorComponent(g, ratios[200])}, ${adjustColorComponent(b, ratios[200])}, ${a})`;
|
|
78
|
+
shades["color_500"] = `rgba(${adjustColorComponent(r, ratios[500])}, ${adjustColorComponent(g, ratios[500])}, ${adjustColorComponent(b, ratios[500])}, ${a})`;
|
|
79
|
+
shades["color_600"] = `rgba(${adjustColorComponent(r, ratios[600])}, ${adjustColorComponent(g, ratios[600])}, ${adjustColorComponent(b, ratios[600])}, ${a})`;
|
|
80
|
+
}
|
|
81
|
+
return shades;
|
|
82
|
+
};
|
|
83
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
84
|
+
0 && (module.exports = {
|
|
85
|
+
generateColorShades
|
|
86
|
+
});
|
|
@@ -33,7 +33,7 @@ __export(Amount_exports, {
|
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(Amount_exports);
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
|
-
var
|
|
36
|
+
var import_utils = require("@pisell/utils");
|
|
37
37
|
var import_usePisellConfig = __toESM(require("../../../pisell-config-provider/hooks/usePisellConfig"));
|
|
38
38
|
var Amount = (props) => {
|
|
39
39
|
const {
|
|
@@ -46,7 +46,7 @@ var Amount = (props) => {
|
|
|
46
46
|
} = props;
|
|
47
47
|
const config = (0, import_usePisellConfig.default)();
|
|
48
48
|
const amount = (0, import_react.useMemo)(() => {
|
|
49
|
-
return (0,
|
|
49
|
+
return (0, import_utils.formatAmountWithOptions)(value, (config == null ? void 0 : config.symbol) || "", {
|
|
50
50
|
precision,
|
|
51
51
|
showCurrencySymbol,
|
|
52
52
|
useThousandsSeparator,
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { MenuProps } from 'antd';
|
|
3
|
+
import './index.less';
|
|
4
|
+
interface AvatarConfig {
|
|
5
|
+
src?: string;
|
|
6
|
+
alt?: string;
|
|
7
|
+
}
|
|
8
|
+
interface ProfileMenuProps {
|
|
9
|
+
menuIcon?: React.ReactNode;
|
|
10
|
+
userName?: string;
|
|
11
|
+
email?: string;
|
|
12
|
+
isShowUserName?: boolean;
|
|
13
|
+
isShowEmail?: boolean;
|
|
14
|
+
isShowUserInfo?: boolean;
|
|
15
|
+
onClick?: () => void;
|
|
16
|
+
avatar?: AvatarConfig;
|
|
17
|
+
className?: string;
|
|
18
|
+
style?: React.CSSProperties;
|
|
19
|
+
menuItems?: MenuProps['items'];
|
|
20
|
+
placement?: 'bottomLeft' | 'bottomCenter' | 'bottomRight' | 'topLeft' | 'topCenter' | 'topRight';
|
|
21
|
+
trigger?: ('click' | 'hover')[];
|
|
22
|
+
showBadge?: boolean;
|
|
23
|
+
badgeCount?: number;
|
|
24
|
+
}
|
|
25
|
+
declare const ProfileMenu: React.FC<ProfileMenuProps>;
|
|
26
|
+
export default ProfileMenu;
|