@pisell/materials 2.2.41 → 2.2.43
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/es/components/TimeResourceSelector/index.d.ts +21 -0
- package/es/components/TimeResourceSelector/index.js +115 -0
- package/es/components/TimeResourceSelector/index.less +59 -0
- package/es/components/pisellAnchor/index.d.ts +15 -0
- package/es/components/pisellAnchor/index.js +126 -0
- package/es/components/pisellAnchor/index.less +177 -0
- package/es/components/pisellAvatar/index.d.ts +19 -0
- package/es/components/pisellAvatar/index.js +90 -0
- package/es/components/pisellAvatar/index.less +26 -0
- package/es/components/pisellCard/index.d.ts +8 -0
- package/es/components/pisellCard/index.js +34 -5
- package/es/components/pisellCard/index.less +31 -4
- package/es/components/pisellCustomCheckboxGroup/index.d.ts +16 -0
- package/es/components/pisellCustomCheckboxGroup/index.js +72 -0
- package/es/components/pisellCustomCheckboxGroup/index.less +0 -0
- package/es/components/pisellDropdown/index.d.ts +20 -0
- package/es/components/pisellDropdown/index.js +51 -0
- package/es/components/pisellDropdown/index.less +44 -0
- package/es/components/pisellEmpty/index.d.ts +2 -1
- package/es/components/pisellHeaderProgressBar/index.d.ts +29 -0
- package/es/components/pisellHeaderProgressBar/index.js +76 -0
- package/es/components/pisellHeaderProgressBar/index.less +18 -0
- package/es/components/pisellImageCarousels/index.d.ts +18 -0
- package/es/components/pisellImageCarousels/index.js +108 -0
- package/es/components/pisellImageCarousels/index.less +92 -0
- package/es/components/pisellList01/index.d.ts +17 -0
- package/es/components/pisellList01/index.js +105 -0
- package/es/components/pisellList01/index.less +53 -0
- package/es/components/pisellSectionHeaders/index.d.ts +21 -0
- package/es/components/pisellSectionHeaders/index.js +35 -0
- package/es/components/pisellSectionHeaders/index.less +46 -0
- package/es/components/pisellViewGrid/index.d.ts +16 -0
- package/es/components/pisellViewGrid/index.js +66 -0
- package/es/components/pisellViewGrid/index.less +31 -0
- package/es/components/productCard/components/Header/index.js +3 -2
- package/es/components/productCard/hooks/useOpenNote.js +3 -2
- package/es/components/productCard/index.js +7 -3
- package/es/components/productCard/index.less +6 -2
- package/es/components/productCard/status.js +3 -1
- package/es/components/productCard/types.d.ts +2 -0
- package/es/components/productCard/utils.js +17 -1
- package/es/components/section-footers/index.d.ts +9 -0
- package/es/components/section-footers/index.js +17 -0
- package/es/components/section-footers/index.less +5 -0
- package/es/components/table/Actions/component/ExportImport/utils/index.d.ts +9 -0
- package/es/components/table/Actions/component/ExportImport/utils/index.js +11 -0
- package/es/index.d.ts +10 -0
- package/es/index.js +11 -1
- package/lib/components/TimeResourceSelector/index.d.ts +21 -0
- package/lib/components/TimeResourceSelector/index.js +109 -0
- package/lib/components/TimeResourceSelector/index.less +59 -0
- package/lib/components/pisellAnchor/index.d.ts +15 -0
- package/lib/components/pisellAnchor/index.js +120 -0
- package/lib/components/pisellAnchor/index.less +177 -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/pisellCard/index.d.ts +8 -0
- package/lib/components/pisellCard/index.js +30 -7
- package/lib/components/pisellCard/index.less +31 -4
- package/lib/components/pisellCustomCheckboxGroup/index.d.ts +16 -0
- package/lib/components/pisellCustomCheckboxGroup/index.js +71 -0
- package/lib/components/pisellCustomCheckboxGroup/index.less +0 -0
- package/lib/components/pisellDropdown/index.d.ts +20 -0
- package/lib/components/pisellDropdown/index.js +72 -0
- package/lib/components/pisellDropdown/index.less +44 -0
- package/lib/components/pisellEmpty/index.d.ts +2 -1
- package/lib/components/pisellHeaderProgressBar/index.d.ts +29 -0
- package/lib/components/pisellHeaderProgressBar/index.js +88 -0
- package/lib/components/pisellHeaderProgressBar/index.less +18 -0
- package/lib/components/pisellImageCarousels/index.d.ts +18 -0
- package/lib/components/pisellImageCarousels/index.js +108 -0
- package/lib/components/pisellImageCarousels/index.less +92 -0
- package/lib/components/pisellList01/index.d.ts +17 -0
- package/lib/components/pisellList01/index.js +113 -0
- package/lib/components/pisellList01/index.less +53 -0
- package/lib/components/pisellSectionHeaders/index.d.ts +21 -0
- package/lib/components/pisellSectionHeaders/index.js +52 -0
- package/lib/components/pisellSectionHeaders/index.less +46 -0
- package/lib/components/pisellViewGrid/index.d.ts +16 -0
- package/lib/components/pisellViewGrid/index.js +98 -0
- package/lib/components/pisellViewGrid/index.less +31 -0
- package/lib/components/productCard/components/Header/index.js +3 -2
- package/lib/components/productCard/hooks/useOpenNote.js +2 -1
- package/lib/components/productCard/index.js +9 -4
- package/lib/components/productCard/index.less +6 -2
- package/lib/components/productCard/status.js +3 -1
- package/lib/components/productCard/types.d.ts +2 -0
- package/lib/components/productCard/utils.js +15 -4
- package/lib/components/section-footers/index.d.ts +9 -0
- package/lib/components/section-footers/index.js +44 -0
- package/lib/components/section-footers/index.less +5 -0
- package/lib/components/table/Actions/component/ExportImport/utils/index.d.ts +9 -0
- package/lib/components/table/Actions/component/ExportImport/utils/index.js +31 -0
- package/lib/index.d.ts +10 -0
- package/lib/index.js +30 -0
- package/lowcode/pisell-anchor/meta.ts +118 -0
- package/lowcode/pisell-anchor/snippets.ts +26 -0
- 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-card/meta.ts +62 -27
- package/lowcode/pisell-card/snippets.ts +6 -0
- package/lowcode/pisell-custom-checkbox-group/__screenshots__/card-1.png +0 -0
- package/lowcode/pisell-custom-checkbox-group/meta.ts +204 -0
- package/lowcode/pisell-custom-checkbox-group/snippets.ts +56 -0
- package/lowcode/pisell-dropdown/__screenshots__/dropdown-1.png +0 -0
- package/lowcode/pisell-dropdown/meta.ts +180 -0
- package/lowcode/pisell-dropdown/snippets.ts +69 -0
- package/lowcode/pisell-header-progress-bar/meta.ts +116 -0
- package/lowcode/pisell-header-progress-bar/snippets.ts +24 -0
- package/lowcode/pisell-image-carousels/meta.ts +143 -0
- package/lowcode/pisell-image-carousels/snippets.ts +20 -0
- package/lowcode/pisell-list01/meta.ts +74 -0
- package/lowcode/pisell-list01/snippets.ts +35 -0
- package/lowcode/pisell-section-headers/meta.ts +91 -0
- package/lowcode/pisell-section-headers/snippets.ts +22 -0
- package/lowcode/pisell-view-grid/__screenshots__/card-1.png +0 -0
- package/lowcode/pisell-view-grid/meta.ts +167 -0
- package/lowcode/pisell-view-grid/snippets.ts +54 -0
- package/lowcode/section-footers/meta.ts +66 -0
- package/lowcode/section-footers/snippe.ts +21 -0
- package/package.json +4 -3
- package/build/lowcode/assets-daily.json +0 -93
- package/build/lowcode/assets-dev.json +0 -93
- package/build/lowcode/assets-prod.json +0 -93
- package/build/lowcode/designer.html +0 -303
- package/build/lowcode/index.html +0 -305
- package/build/lowcode/index.js +0 -1
- package/build/lowcode/meta.js +0 -9
- package/build/lowcode/preview.css +0 -1
- package/build/lowcode/preview.html +0 -35
- package/build/lowcode/preview.js +0 -304
- package/build/lowcode/render/default/view.css +0 -1
- package/build/lowcode/render/default/view.js +0 -232
- package/build/lowcode/view.css +0 -1
- package/build/lowcode/view.js +0 -232
|
@@ -37,12 +37,35 @@ var import_antd = require("antd");
|
|
|
37
37
|
var import_classnames = __toESM(require("classnames"));
|
|
38
38
|
var import_index = require("./index.less");
|
|
39
39
|
var PisellCard = (props) => {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
40
|
+
const {
|
|
41
|
+
borderRadius = 12,
|
|
42
|
+
padding = 16,
|
|
43
|
+
loading = false,
|
|
44
|
+
selected = false,
|
|
45
|
+
bordered = true,
|
|
46
|
+
disabled = false,
|
|
47
|
+
style,
|
|
48
|
+
className,
|
|
49
|
+
isClickable = true
|
|
50
|
+
} = props;
|
|
51
|
+
(0, import_react.useEffect)(() => {
|
|
52
|
+
document.body.id = "body";
|
|
53
|
+
}, []);
|
|
54
|
+
const cardProps = {
|
|
55
|
+
...props,
|
|
56
|
+
style: {
|
|
57
|
+
"--card-padding": `${padding}px`,
|
|
58
|
+
"--card-borderRadius": `${borderRadius}px`,
|
|
59
|
+
...style
|
|
60
|
+
},
|
|
61
|
+
className: (0, import_classnames.default)(
|
|
62
|
+
"pisell-card-wrap",
|
|
63
|
+
selected && "pisell-card-wrap-selected",
|
|
64
|
+
disabled && "pisell-card-wrap-disabled",
|
|
65
|
+
!isClickable && "pisell-card-wrap-clickable",
|
|
66
|
+
className
|
|
67
|
+
)
|
|
68
|
+
};
|
|
69
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Card, { ...cardProps });
|
|
47
70
|
};
|
|
48
71
|
var pisellCard_default = PisellCard;
|
|
@@ -1,9 +1,36 @@
|
|
|
1
1
|
.pisell-card-wrap {
|
|
2
|
-
border-radius: 12px;
|
|
2
|
+
border-radius: var(--card-borderRadius, 12px);
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
cursor: pointer;
|
|
5
|
+
box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
|
|
6
|
+
&.pisell-card-wrap-selected {
|
|
7
|
+
border-width: 2px;
|
|
8
|
+
border-color: var(--theme-color, #7f56d9);
|
|
9
|
+
}
|
|
10
|
+
&.pisell-card-wrap-disabled {
|
|
11
|
+
cursor: not-allowed;
|
|
12
|
+
opacity: 0.4;
|
|
13
|
+
// pointer-events: none;
|
|
14
|
+
|
|
15
|
+
&:hover,
|
|
16
|
+
&:active,
|
|
17
|
+
&.focus {
|
|
18
|
+
background-color: inherit;
|
|
19
|
+
color: inherit;
|
|
20
|
+
text-decoration: none;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
3
23
|
.pisell-lowcode-card-body {
|
|
4
|
-
padding: 16px;
|
|
24
|
+
padding: var(--card-padding, 16px);
|
|
25
|
+
}
|
|
26
|
+
&:hover {
|
|
27
|
+
background: var(--Gray-50, #f9fafb);
|
|
5
28
|
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&.pisell-card-wrap-clickable {
|
|
32
|
+
cursor: initial;
|
|
6
33
|
&:hover {
|
|
7
|
-
background:
|
|
34
|
+
background: none;
|
|
8
35
|
}
|
|
9
|
-
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export interface PisellCustomCheckboxGroupProps {
|
|
4
|
+
dataSource?: any[];
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
allowAdd?: boolean;
|
|
7
|
+
isMultiple?: boolean;
|
|
8
|
+
id?: string | string[];
|
|
9
|
+
onClick?: (value: any) => void;
|
|
10
|
+
onAdd?: () => void;
|
|
11
|
+
renderAddItem?: (item: any) => React.ReactNode;
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
declare const PisellCustomCheckboxGroup: React.FC<PisellCustomCheckboxGroupProps>;
|
|
16
|
+
export default PisellCustomCheckboxGroup;
|
|
@@ -0,0 +1,71 @@
|
|
|
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/pisellCustomCheckboxGroup/index.tsx
|
|
30
|
+
var pisellCustomCheckboxGroup_exports = {};
|
|
31
|
+
__export(pisellCustomCheckboxGroup_exports, {
|
|
32
|
+
default: () => pisellCustomCheckboxGroup_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(pisellCustomCheckboxGroup_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_classnames = __toESM(require("classnames"));
|
|
37
|
+
var import_pisellViewGrid = __toESM(require("../pisellViewGrid"));
|
|
38
|
+
var import_index = require("./index.less");
|
|
39
|
+
var PisellCustomCheckboxGroup = ({
|
|
40
|
+
dataSource = [],
|
|
41
|
+
allowAdd = false,
|
|
42
|
+
onAdd,
|
|
43
|
+
onClick,
|
|
44
|
+
renderAddItem,
|
|
45
|
+
disabled = false,
|
|
46
|
+
isMultiple = false,
|
|
47
|
+
value,
|
|
48
|
+
onChange,
|
|
49
|
+
className,
|
|
50
|
+
...rest
|
|
51
|
+
}) => {
|
|
52
|
+
const finalDataSource = (0, import_react.useMemo)(() => {
|
|
53
|
+
return allowAdd ? [{ id: 0, text: "+", isAddCard: true }, ...dataSource] : dataSource;
|
|
54
|
+
}, [allowAdd, dataSource]);
|
|
55
|
+
const renderGridItem = (item, index) => {
|
|
56
|
+
var _a;
|
|
57
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { onClick: () => onClick(item) }, (item == null ? void 0 : item.isAddCard) && renderAddItem ? renderAddItem(item) : (_a = rest == null ? void 0 : rest.renderItem) == null ? void 0 : _a.call(rest, item, index));
|
|
58
|
+
};
|
|
59
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
60
|
+
import_pisellViewGrid.default,
|
|
61
|
+
{
|
|
62
|
+
...rest,
|
|
63
|
+
dataSource: finalDataSource,
|
|
64
|
+
renderItem: (item, index) => {
|
|
65
|
+
return renderGridItem(item, index);
|
|
66
|
+
},
|
|
67
|
+
className: (0, import_classnames.default)("pisell-custom-checkbox-group", className)
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
};
|
|
71
|
+
var pisellCustomCheckboxGroup_default = PisellCustomCheckboxGroup;
|
|
File without changes
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export interface MenuItemType {
|
|
4
|
+
key: string;
|
|
5
|
+
label: string;
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
shortcut?: string;
|
|
8
|
+
divider?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface PisellDropdownProps {
|
|
11
|
+
trigger?: React.ReactNode;
|
|
12
|
+
items?: MenuItemType[];
|
|
13
|
+
showShortcut?: boolean;
|
|
14
|
+
triggerType?: ('click' | 'hover')[];
|
|
15
|
+
className?: string;
|
|
16
|
+
style?: React.CSSProperties;
|
|
17
|
+
onSelect?: (key: string) => void;
|
|
18
|
+
}
|
|
19
|
+
declare const PisellDropdown: React.FC<PisellDropdownProps>;
|
|
20
|
+
export default PisellDropdown;
|
|
@@ -0,0 +1,72 @@
|
|
|
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/pisellDropdown/index.tsx
|
|
30
|
+
var pisellDropdown_exports = {};
|
|
31
|
+
__export(pisellDropdown_exports, {
|
|
32
|
+
default: () => pisellDropdown_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(pisellDropdown_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_dropdown = __toESM(require("../dropdown"));
|
|
38
|
+
var import_classnames = __toESM(require("classnames"));
|
|
39
|
+
var import_index = require("./index.less");
|
|
40
|
+
var PisellDropdown = ({
|
|
41
|
+
trigger,
|
|
42
|
+
items = [],
|
|
43
|
+
showShortcut = true,
|
|
44
|
+
triggerType = ["click"],
|
|
45
|
+
className,
|
|
46
|
+
style,
|
|
47
|
+
onSelect
|
|
48
|
+
}) => {
|
|
49
|
+
const renderMenuItem = (item) => {
|
|
50
|
+
const menuItem = /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-dropdown-item" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-dropdown-item-content" }, item.icon && /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-dropdown-item-icon" }, item.icon), /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-dropdown-item-label" }, item.label)), showShortcut && item.shortcut && /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-dropdown-item-shortcut" }, item.shortcut));
|
|
51
|
+
return item.divider ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, { key: item.key }, /* @__PURE__ */ import_react.default.createElement(import_antd.Menu.Item, { key: item.key }, menuItem), /* @__PURE__ */ import_react.default.createElement(import_antd.Menu.Divider, null)) : /* @__PURE__ */ import_react.default.createElement(import_antd.Menu.Item, { key: item.key }, menuItem);
|
|
52
|
+
};
|
|
53
|
+
const menu = /* @__PURE__ */ import_react.default.createElement(
|
|
54
|
+
import_antd.Menu,
|
|
55
|
+
{
|
|
56
|
+
onClick: ({ key }) => onSelect == null ? void 0 : onSelect(key),
|
|
57
|
+
className: "pisell-dropdown-menu"
|
|
58
|
+
},
|
|
59
|
+
items.map(renderMenuItem)
|
|
60
|
+
);
|
|
61
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
62
|
+
import_dropdown.default,
|
|
63
|
+
{
|
|
64
|
+
overlay: menu,
|
|
65
|
+
trigger: triggerType,
|
|
66
|
+
className: (0, import_classnames.default)("pisell-dropdown", className),
|
|
67
|
+
style
|
|
68
|
+
},
|
|
69
|
+
trigger || /* @__PURE__ */ import_react.default.createElement("span", null, "Account")
|
|
70
|
+
);
|
|
71
|
+
};
|
|
72
|
+
var pisellDropdown_default = PisellDropdown;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
.pisell-dropdown {
|
|
2
|
+
&-menu {
|
|
3
|
+
min-width: 200px;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
&-item {
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: space-between;
|
|
10
|
+
padding: 8px 12px;
|
|
11
|
+
|
|
12
|
+
&-content {
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
gap: 8px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&-icon {
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
font-size: 16px;
|
|
22
|
+
color: #666;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&-label {
|
|
26
|
+
color: #333;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&-shortcut {
|
|
30
|
+
color: #999;
|
|
31
|
+
font-size: 12px;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.ant-dropdown-menu-item {
|
|
37
|
+
padding: 0 !important;
|
|
38
|
+
|
|
39
|
+
&:hover {
|
|
40
|
+
.pisell-dropdown-item {
|
|
41
|
+
background-color: #f5f5f5;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { EmptyProps } from 'antd';
|
|
3
|
-
import { PisellContextType } from
|
|
3
|
+
import { PisellContextType } from '../pisell-config-provider/context';
|
|
4
4
|
import './index.less';
|
|
5
5
|
export interface PisellEmptyProps extends EmptyProps {
|
|
6
6
|
/** 平台 */
|
|
@@ -11,6 +11,7 @@ export interface PisellEmptyProps extends EmptyProps {
|
|
|
11
11
|
icon?: React.ReactNode;
|
|
12
12
|
/** 自定义底部额外操作区域 */
|
|
13
13
|
footer?: React.ReactNode;
|
|
14
|
+
[key: string]: any;
|
|
14
15
|
}
|
|
15
16
|
declare const PisellEmpty: (props: PisellEmptyProps) => React.JSX.Element;
|
|
16
17
|
export default PisellEmpty;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export interface PisellHeaderProgressBarProps {
|
|
4
|
+
title?: React.ReactNode;
|
|
5
|
+
stepText?: React.ReactNode;
|
|
6
|
+
showClose?: boolean;
|
|
7
|
+
/** 是否启用投影 */
|
|
8
|
+
enableShadow?: boolean;
|
|
9
|
+
/** 是否启用描边 */
|
|
10
|
+
enableBorder?: boolean;
|
|
11
|
+
/** 描边粗细 */
|
|
12
|
+
borderWidth?: number;
|
|
13
|
+
/** 描边颜色 */
|
|
14
|
+
borderColor?: string;
|
|
15
|
+
/** 头部背景颜色 */
|
|
16
|
+
backgroundColor?: string;
|
|
17
|
+
/** 自定义类名 */
|
|
18
|
+
className?: string;
|
|
19
|
+
/** 自定义样式 */
|
|
20
|
+
style?: React.CSSProperties;
|
|
21
|
+
/** 是否显示返回键 */
|
|
22
|
+
showBack?: boolean;
|
|
23
|
+
/** 返回按钮点击事件 */
|
|
24
|
+
onBack?: () => void;
|
|
25
|
+
/** 关闭按钮点击事件 */
|
|
26
|
+
onClose?: () => void;
|
|
27
|
+
}
|
|
28
|
+
declare const PisellHeaderProgressBar: React.FC<PisellHeaderProgressBarProps>;
|
|
29
|
+
export default PisellHeaderProgressBar;
|
|
@@ -0,0 +1,88 @@
|
|
|
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/pisellHeaderProgressBar/index.tsx
|
|
30
|
+
var pisellHeaderProgressBar_exports = {};
|
|
31
|
+
__export(pisellHeaderProgressBar_exports, {
|
|
32
|
+
default: () => pisellHeaderProgressBar_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(pisellHeaderProgressBar_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_classnames = __toESM(require("classnames"));
|
|
37
|
+
var import_pisellSectionHeaders = __toESM(require("../pisellSectionHeaders"));
|
|
38
|
+
var import_iconfont = __toESM(require("../iconfont"));
|
|
39
|
+
var import_index = require("./index.less");
|
|
40
|
+
var prefixCls = "pisell-header-progress-bar";
|
|
41
|
+
var PisellHeaderProgressBar = ({
|
|
42
|
+
title,
|
|
43
|
+
stepText,
|
|
44
|
+
showBack = true,
|
|
45
|
+
showClose = true,
|
|
46
|
+
enableShadow = false,
|
|
47
|
+
enableBorder = false,
|
|
48
|
+
borderWidth = 1,
|
|
49
|
+
borderColor = "#d0d5dd",
|
|
50
|
+
backgroundColor = "#FFFFFF",
|
|
51
|
+
className,
|
|
52
|
+
style,
|
|
53
|
+
onBack,
|
|
54
|
+
onClose
|
|
55
|
+
}) => {
|
|
56
|
+
const classes = (0, import_classnames.default)(prefixCls, className);
|
|
57
|
+
const customStyle = {
|
|
58
|
+
...style,
|
|
59
|
+
backgroundColor,
|
|
60
|
+
boxShadow: enableShadow ? "0px 1px 2px 0px rgba(16, 24, 40, 0.05)" : "none",
|
|
61
|
+
borderBottom: enableBorder ? `${borderWidth}px solid ${borderColor}` : "none"
|
|
62
|
+
};
|
|
63
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
64
|
+
import_pisellSectionHeaders.default,
|
|
65
|
+
{
|
|
66
|
+
backNode: showBack ? /* @__PURE__ */ import_react.default.createElement(
|
|
67
|
+
import_iconfont.default,
|
|
68
|
+
{
|
|
69
|
+
className: `${prefixCls}-back-icon`,
|
|
70
|
+
type: "pisell2-chevron-left"
|
|
71
|
+
}
|
|
72
|
+
) : null,
|
|
73
|
+
centerNode: /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-center` }, stepText ? /* @__PURE__ */ import_react.default.createElement("div", { className: "step" }, stepText) : null, title ? /* @__PURE__ */ import_react.default.createElement("div", { className: "select-text" }, title) : null),
|
|
74
|
+
actionNode: showClose ? /* @__PURE__ */ import_react.default.createElement(
|
|
75
|
+
import_iconfont.default,
|
|
76
|
+
{
|
|
77
|
+
type: "pisell2-x-close",
|
|
78
|
+
className: `${prefixCls}-close-icon`
|
|
79
|
+
}
|
|
80
|
+
) : null,
|
|
81
|
+
style: customStyle,
|
|
82
|
+
className: classes,
|
|
83
|
+
onAction: onClose,
|
|
84
|
+
onBack
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
};
|
|
88
|
+
var pisellHeaderProgressBar_default = PisellHeaderProgressBar;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import 'swiper/swiper-bundle.css';
|
|
3
|
+
import './index.less';
|
|
4
|
+
export interface PisellImageCarouselsProps {
|
|
5
|
+
dataSource?: string[];
|
|
6
|
+
width?: number | string;
|
|
7
|
+
height?: number;
|
|
8
|
+
showArrows?: boolean;
|
|
9
|
+
showDots?: boolean;
|
|
10
|
+
autoplay?: boolean;
|
|
11
|
+
interval?: number;
|
|
12
|
+
borderRadius?: number;
|
|
13
|
+
loop?: boolean;
|
|
14
|
+
className?: string;
|
|
15
|
+
style?: React.CSSProperties;
|
|
16
|
+
}
|
|
17
|
+
declare const PisellImageCarousels: React.FC<PisellImageCarouselsProps>;
|
|
18
|
+
export default PisellImageCarousels;
|
|
@@ -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/pisellImageCarousels/index.tsx
|
|
30
|
+
var pisellImageCarousels_exports = {};
|
|
31
|
+
__export(pisellImageCarousels_exports, {
|
|
32
|
+
default: () => pisellImageCarousels_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(pisellImageCarousels_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_swiper = require("swiper");
|
|
38
|
+
var import_swiper_bundle = require("swiper/swiper-bundle.css");
|
|
39
|
+
var import_iconfont = __toESM(require("../iconfont"));
|
|
40
|
+
var import_classnames = __toESM(require("classnames"));
|
|
41
|
+
var import_index = require("./index.less");
|
|
42
|
+
var PisellImageCarousels = ({
|
|
43
|
+
dataSource = [],
|
|
44
|
+
width = 640,
|
|
45
|
+
height = 400,
|
|
46
|
+
showArrows = true,
|
|
47
|
+
showDots = true,
|
|
48
|
+
autoplay = true,
|
|
49
|
+
interval = 3e3,
|
|
50
|
+
borderRadius = 8,
|
|
51
|
+
loop = true,
|
|
52
|
+
className,
|
|
53
|
+
style
|
|
54
|
+
}) => {
|
|
55
|
+
const swiperRef = (0, import_react.useRef)(null);
|
|
56
|
+
const swiperInstance = (0, import_react.useRef)(null);
|
|
57
|
+
(0, import_react.useEffect)(() => {
|
|
58
|
+
if (swiperRef.current) {
|
|
59
|
+
swiperInstance.current = new import_swiper.Swiper(swiperRef.current, {
|
|
60
|
+
modules: [import_swiper.Navigation, import_swiper.Pagination, import_swiper.Autoplay],
|
|
61
|
+
slidesPerView: 1,
|
|
62
|
+
spaceBetween: 0,
|
|
63
|
+
loop,
|
|
64
|
+
// 导航箭头
|
|
65
|
+
navigation: showArrows ? {
|
|
66
|
+
nextEl: ".pisell-carousel-next",
|
|
67
|
+
prevEl: ".pisell-carousel-prev"
|
|
68
|
+
} : false,
|
|
69
|
+
// 分页点
|
|
70
|
+
pagination: showDots ? {
|
|
71
|
+
el: ".pisell-carousel-pagination",
|
|
72
|
+
clickable: true
|
|
73
|
+
} : false,
|
|
74
|
+
// 自动播放
|
|
75
|
+
autoplay: autoplay ? {
|
|
76
|
+
delay: interval,
|
|
77
|
+
disableOnInteraction: false
|
|
78
|
+
} : false
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
return () => {
|
|
82
|
+
if (swiperInstance.current) {
|
|
83
|
+
swiperInstance.current.destroy();
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
}, [showArrows, showDots, autoplay, interval, loop]);
|
|
87
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
88
|
+
"div",
|
|
89
|
+
{
|
|
90
|
+
className: (0, import_classnames.default)("pisell-image-carousel", className),
|
|
91
|
+
style: { width, height, ...style }
|
|
92
|
+
},
|
|
93
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "swiper", ref: swiperRef }, /* @__PURE__ */ import_react.default.createElement("div", { className: "swiper-wrapper" }, dataSource == null ? void 0 : dataSource.map((item, index) => /* @__PURE__ */ import_react.default.createElement("div", { key: index, className: "swiper-slide" }, /* @__PURE__ */ import_react.default.createElement(
|
|
94
|
+
import_antd.Image,
|
|
95
|
+
{
|
|
96
|
+
preview: false,
|
|
97
|
+
src: item,
|
|
98
|
+
width,
|
|
99
|
+
height,
|
|
100
|
+
loading: "lazy",
|
|
101
|
+
style: {
|
|
102
|
+
borderRadius: `${borderRadius}px`
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
)))), showArrows && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-carousel-prev" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "carousel-arrow" }, /* @__PURE__ */ import_react.default.createElement(import_iconfont.default, { type: "pisell2-chevron-left" }))), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-carousel-next" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "carousel-arrow" }, /* @__PURE__ */ import_react.default.createElement(import_iconfont.default, { type: "pisell2-chevron-right" })))), showDots && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-carousel-pagination" }))
|
|
106
|
+
);
|
|
107
|
+
};
|
|
108
|
+
var pisellImageCarousels_default = PisellImageCarousels;
|