@pisell/materials 1.0.365 → 1.0.366
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 +2 -2
- package/build/lowcode/preview.js +142 -142
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +22 -22
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +22 -22
- package/es/components/iconfont/index.js +1 -1
- package/es/components/page/index.js +11 -6
- package/es/components/pisell-config-provider/context.d.ts +2 -3
- package/es/components/pisell-config-provider/index.d.ts +1 -0
- package/es/components/pisell-config-provider/index.js +5 -3
- package/es/components/pisellAlert/index.d.ts +12 -0
- package/es/components/pisellAlert/index.js +67 -0
- package/es/components/pisellAlert/index.less +149 -0
- package/es/components/pisellCard/index.d.ts +2 -42
- package/es/components/pisellCard/index.js +5 -78
- package/es/components/pisellCard/index.less +5 -85
- package/es/components/pisellCardList/index.d.ts +7 -4
- package/es/components/pisellCardList/index.js +22 -59
- package/es/components/pisellCheckboxGroup/index.d.ts +1 -1
- package/es/components/pisellCheckboxGroup/index.js +7 -7
- package/es/components/pisellInformationEntry/Input/index.d.ts +8 -0
- package/es/components/pisellInformationEntry/Input/index.js +47 -0
- package/es/components/pisellInformationEntry/Input/index.less +14 -0
- package/es/components/pisellInformationEntry/Scan/index.d.ts +8 -0
- package/es/components/pisellInformationEntry/Scan/index.js +24 -0
- package/es/components/pisellInformationEntry/Scan/index.less +8 -0
- package/es/components/pisellInformationEntry/constants.d.ts +3 -0
- package/es/components/pisellInformationEntry/constants.js +21 -0
- package/es/components/pisellInformationEntry/index.d.ts +31 -0
- package/es/components/pisellInformationEntry/index.js +188 -0
- package/es/components/pisellInformationEntry/index.less +40 -0
- package/es/components/pisellInformationEntry/utils.d.ts +4 -0
- package/es/components/pisellInformationEntry/utils.js +38 -0
- package/es/components/pisellModal/components/Information/index.js +4 -3
- package/es/components/pisellModal/components/Information/index.less +3 -2
- package/es/components/pisellModal/components/MobileModal/index.less +1 -0
- package/es/components/pisellModal/components/PcModal/index.d.ts +1 -1
- package/es/components/pisellModal/components/PcModal/index.less +8 -0
- package/es/components/pisellModal/constants.js +1 -1
- package/es/components/pisellScan/index.d.ts +14 -0
- package/es/components/pisellScan/index.js +73 -0
- package/es/components/pisellScan/index.less +12 -0
- package/es/components/pisellWalletPassCard/bg.jpeg +0 -0
- package/es/components/pisellWalletPassCard/index.d.ts +50 -0
- package/es/components/pisellWalletPassCard/index.js +91 -0
- package/es/components/pisellWalletPassCard/index.less +100 -0
- package/es/index.d.ts +6 -1
- package/es/index.js +9 -2
- package/es/locales/en-US.d.ts +6 -0
- package/es/locales/en-US.js +9 -1
- package/es/locales/zh-CN.d.ts +6 -0
- package/es/locales/zh-CN.js +9 -1
- package/es/locales/zh-TW.d.ts +6 -0
- package/es/locales/zh-TW.js +9 -1
- package/lib/components/iconfont/index.js +1 -1
- package/lib/components/page/index.js +13 -6
- package/lib/components/pisell-config-provider/context.d.ts +2 -3
- package/lib/components/pisell-config-provider/index.d.ts +1 -0
- package/lib/components/pisell-config-provider/index.js +8 -2
- package/lib/components/pisellAlert/index.d.ts +12 -0
- package/lib/components/pisellAlert/index.js +95 -0
- package/lib/components/pisellAlert/index.less +149 -0
- package/lib/components/pisellCard/index.d.ts +2 -42
- package/lib/components/pisellCard/index.js +5 -54
- package/lib/components/pisellCard/index.less +5 -85
- package/lib/components/pisellCardList/index.d.ts +7 -4
- package/lib/components/pisellCardList/index.js +21 -59
- package/lib/components/pisellCheckboxGroup/index.d.ts +1 -1
- package/lib/components/pisellCheckboxGroup/index.js +7 -7
- package/lib/components/pisellInformationEntry/Input/index.d.ts +8 -0
- package/lib/components/pisellInformationEntry/Input/index.js +54 -0
- package/lib/components/pisellInformationEntry/Input/index.less +14 -0
- package/lib/components/pisellInformationEntry/Scan/index.d.ts +8 -0
- package/lib/components/pisellInformationEntry/Scan/index.js +63 -0
- package/lib/components/pisellInformationEntry/Scan/index.less +8 -0
- package/lib/components/pisellInformationEntry/constants.d.ts +3 -0
- package/lib/components/pisellInformationEntry/constants.js +49 -0
- package/lib/components/pisellInformationEntry/index.d.ts +31 -0
- package/lib/components/pisellInformationEntry/index.js +162 -0
- package/lib/components/pisellInformationEntry/index.less +40 -0
- package/lib/components/pisellInformationEntry/utils.d.ts +4 -0
- package/lib/components/pisellInformationEntry/utils.js +40 -0
- package/lib/components/pisellModal/components/Information/index.js +3 -3
- package/lib/components/pisellModal/components/Information/index.less +3 -2
- package/lib/components/pisellModal/components/MobileModal/index.less +1 -0
- package/lib/components/pisellModal/components/PcModal/index.d.ts +1 -1
- package/lib/components/pisellModal/components/PcModal/index.less +8 -0
- package/lib/components/pisellModal/constants.js +1 -1
- package/lib/components/pisellScan/index.d.ts +14 -0
- package/lib/components/pisellScan/index.js +103 -0
- package/lib/components/pisellScan/index.less +12 -0
- package/lib/components/pisellWalletPassCard/bg.jpeg +0 -0
- package/lib/components/pisellWalletPassCard/index.d.ts +50 -0
- package/lib/components/pisellWalletPassCard/index.js +99 -0
- package/lib/components/pisellWalletPassCard/index.less +100 -0
- package/lib/index.d.ts +6 -1
- package/lib/index.js +20 -3
- package/lib/locales/en-US.d.ts +6 -0
- package/lib/locales/en-US.js +9 -1
- package/lib/locales/zh-CN.d.ts +6 -0
- package/lib/locales/zh-CN.js +9 -1
- package/lib/locales/zh-TW.d.ts +6 -0
- package/lib/locales/zh-TW.js +9 -1
- package/lowcode/pisell-alert/meta.ts +117 -0
- package/lowcode/pisell-alert/snippets.ts +50 -0
- package/lowcode/pisell-card/__screenshots__/card-1.png +0 -0
- package/lowcode/pisell-card/meta.ts +76 -165
- package/lowcode/pisell-card/snippets.ts +1 -11
- package/lowcode/pisell-information-entry/meta.ts +131 -0
- package/lowcode/pisell-information-entry/snippets.ts +17 -0
- package/lowcode/pisell-modal/meta.ts +31 -31
- package/lowcode/pisell-modal.information/meta.ts +7 -0
- package/lowcode/pisell-scan/meta.ts +53 -0
- package/lowcode/pisell-scan/snippets.ts +13 -0
- package/lowcode/pisell-wallet-pass-card/meta.ts +189 -0
- package/lowcode/pisell-wallet-pass-card/snippets.ts +20 -0
- package/package.json +4 -3
- package/build/lowcode/assets/7b1c7af5ce9e37e4b40ea53fea6ccfd9.jpeg +0 -0
- package/build/lowcode/render/default/assets/7b1c7af5ce9e37e4b40ea53fea6ccfd9.jpeg +0 -0
- package/dist/umd/materials.min.css +0 -1
- package/dist/umd/materials.min.js +0 -1
- package/dist/umd/static/DotsSix.57d66266.svg +0 -1
- package/dist/umd/static/arrow-left.e542294f.svg +0 -1
- package/dist/umd/static/arrow-right.763f03e0.svg +0 -1
- package/dist/umd/static/filter-lines.04a54ae9.svg +0 -1
- package/dist/umd/static/help-circle.31c9be40.svg +0 -1
- package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +0 -1
- package/es/components/pisellCard/bg.jpeg +0 -0
- package/lib/components/pisellCard/bg.jpeg +0 -0
|
@@ -2,7 +2,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
2
2
|
import { createFromIconfontCN } from '@ant-design/icons';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
var MyIcon = createFromIconfontCN({
|
|
5
|
-
scriptUrl: 'https://at.alicdn.com/t/c/
|
|
5
|
+
scriptUrl: 'https://at.alicdn.com/t/c/font_4075221_v55dw714o2.js' // 在 iconfont.cn 上生成
|
|
6
6
|
});
|
|
7
7
|
|
|
8
8
|
var IconFont = function IconFont(props) {
|
|
@@ -44,15 +44,16 @@ var localeDateMap = {
|
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
46
|
var Page = function Page(props) {
|
|
47
|
-
var _context$appHelper, _localeDateMap;
|
|
47
|
+
var _context$appHelper, _context$engine, _context$engine$props, _localeDateMap;
|
|
48
48
|
var children = props.children,
|
|
49
49
|
style = props.style,
|
|
50
|
-
|
|
50
|
+
propsLocale = props.locale,
|
|
51
51
|
others = _objectWithoutProperties(props, _excluded);
|
|
52
52
|
var context = useEngineContext();
|
|
53
53
|
var _ref = ((_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.constants) || {},
|
|
54
54
|
platform = _ref.platform,
|
|
55
55
|
themeColor = _ref.themeColor;
|
|
56
|
+
var locale = propsLocale || (context === null || context === void 0 ? void 0 : (_context$engine = context.engine) === null || _context$engine === void 0 ? void 0 : (_context$engine$props = _context$engine.props) === null || _context$engine$props === void 0 ? void 0 : _context$engine$props.locale) || 'en';
|
|
56
57
|
var theme = useMemo(function () {
|
|
57
58
|
return {
|
|
58
59
|
components: {
|
|
@@ -141,7 +142,7 @@ var Page = function Page(props) {
|
|
|
141
142
|
},
|
|
142
143
|
|
|
143
144
|
token: {
|
|
144
|
-
colorPrimary: '#7F56D9',
|
|
145
|
+
colorPrimary: themeColor || '#7F56D9',
|
|
145
146
|
// colorPrimaryBg: '#F9F5FF',
|
|
146
147
|
// colorPrimaryBgHover: '#F4EBFF',
|
|
147
148
|
// colorPrimaryBorder: '#E9D7FE',
|
|
@@ -223,7 +224,9 @@ var Page = function Page(props) {
|
|
|
223
224
|
locale: localMap[locale],
|
|
224
225
|
prefixCls: props.prefixCls || 'pisell-lowcode',
|
|
225
226
|
theme: props.theme || theme
|
|
226
|
-
}), /*#__PURE__*/React.createElement(App,
|
|
227
|
+
}), /*#__PURE__*/React.createElement(App, {
|
|
228
|
+
component: false
|
|
229
|
+
}, /*#__PURE__*/React.createElement(LocalizationProvider, {
|
|
227
230
|
dateAdapter: AdapterDayjs,
|
|
228
231
|
adapterLocale: (localeDateMap === null || localeDateMap === void 0 ? void 0 : (_localeDateMap = localeDateMap[locale]) === null || _localeDateMap === void 0 ? void 0 : _localeDateMap.adapterLocale) || 'en'
|
|
229
232
|
}, /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
@@ -232,9 +235,11 @@ var Page = function Page(props) {
|
|
|
232
235
|
value: {
|
|
233
236
|
locale: locale
|
|
234
237
|
}
|
|
235
|
-
}, /*#__PURE__*/React.createElement(PisellConfigProvider,
|
|
238
|
+
}, /*#__PURE__*/React.createElement(PisellConfigProvider, {
|
|
239
|
+
locale: locale
|
|
240
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
236
241
|
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
237
|
-
'--theme-color': '#7F56D9'
|
|
242
|
+
'--theme-color': themeColor || '#7F56D9'
|
|
238
243
|
})
|
|
239
244
|
}, children)))))));
|
|
240
245
|
};
|
|
@@ -2,15 +2,14 @@
|
|
|
2
2
|
export interface PisellContextType {
|
|
3
3
|
platform: 'h5' | 'pc' | 'ipad';
|
|
4
4
|
symbol?: string;
|
|
5
|
+
locale?: string;
|
|
5
6
|
}
|
|
6
7
|
export declare const PisellContext: import("react").Context<PisellContextType>;
|
|
7
8
|
declare class GlobalConfig {
|
|
8
9
|
private config;
|
|
9
10
|
constructor();
|
|
10
11
|
setConfig(config: PisellContextType): void;
|
|
11
|
-
getConfig():
|
|
12
|
-
platform: "h5" | "ipad" | "pc";
|
|
13
|
-
};
|
|
12
|
+
getConfig(): PisellContextType;
|
|
14
13
|
}
|
|
15
14
|
export declare const globalConfig: GlobalConfig;
|
|
16
15
|
export default PisellContext;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { App } from
|
|
2
|
+
import { App } from 'antd';
|
|
3
3
|
import PisellContext, { globalConfig } from "./context";
|
|
4
4
|
import { useResponsive } from "../../hooks";
|
|
5
5
|
import useEngineContext from "../../hooks/useEngineContext";
|
|
@@ -13,14 +13,16 @@ var PisellConfigProvider = function PisellConfigProvider(props) {
|
|
|
13
13
|
var _context$appHelper;
|
|
14
14
|
var children = props.children,
|
|
15
15
|
propsPlatform = props.platform,
|
|
16
|
-
propsSymbol = props.symbol
|
|
16
|
+
propsSymbol = props.symbol,
|
|
17
|
+
locale = props.locale;
|
|
17
18
|
var platform = useResponsive();
|
|
18
19
|
var context = useEngineContext();
|
|
19
20
|
var _ref = ((_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils) || {},
|
|
20
21
|
getSymbolic = _ref.getSymbolic;
|
|
21
22
|
var config = {
|
|
22
23
|
platform: propsPlatform || platformMap[platform],
|
|
23
|
-
symbol: propsSymbol || (getSymbolic === null || getSymbolic === void 0 ? void 0 : getSymbolic()) || ''
|
|
24
|
+
symbol: propsSymbol || (getSymbolic === null || getSymbolic === void 0 ? void 0 : getSymbolic()) || '',
|
|
25
|
+
locale: locale || 'en'
|
|
24
26
|
};
|
|
25
27
|
var staticFunction = App.useApp();
|
|
26
28
|
setMessage(staticFunction.message);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AlertProps } from 'antd';
|
|
3
|
+
import './index.less';
|
|
4
|
+
export interface PisellAlertProps extends AlertProps {
|
|
5
|
+
showDismiss?: boolean;
|
|
6
|
+
dismiss?: React.ReactNode;
|
|
7
|
+
showView?: boolean;
|
|
8
|
+
view?: React.ReactNode;
|
|
9
|
+
onViewClick?: (e: any) => void;
|
|
10
|
+
}
|
|
11
|
+
declare const PisellAlert: (props: PisellAlertProps) => false | React.JSX.Element;
|
|
12
|
+
export default PisellAlert;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
var _excluded = ["message", "description", "type", "showIcon", "icon", "closable", "className", "showDismiss", "dismiss", "showView", "view", "onViewClick"];
|
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
5
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
6
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
7
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
8
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
9
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
10
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
|
+
import React, { useState } from 'react';
|
|
12
|
+
import { Alert } from 'antd';
|
|
13
|
+
import classNames from 'classnames';
|
|
14
|
+
import IconFont from "../iconfont";
|
|
15
|
+
import "./index.less";
|
|
16
|
+
var iconMap = {
|
|
17
|
+
success: 'pisell2-check-circle',
|
|
18
|
+
warning: 'pisell2-alert-circle',
|
|
19
|
+
error: 'pisell2-alert-circle',
|
|
20
|
+
info: 'pisell2-alert-circle'
|
|
21
|
+
};
|
|
22
|
+
var PisellAlert = function PisellAlert(props) {
|
|
23
|
+
var message = props.message,
|
|
24
|
+
description = props.description,
|
|
25
|
+
_props$type = props.type,
|
|
26
|
+
type = _props$type === void 0 ? 'success' : _props$type,
|
|
27
|
+
showIcon = props.showIcon,
|
|
28
|
+
icon = props.icon,
|
|
29
|
+
closable = props.closable,
|
|
30
|
+
className = props.className,
|
|
31
|
+
showDismiss = props.showDismiss,
|
|
32
|
+
dismiss = props.dismiss,
|
|
33
|
+
showView = props.showView,
|
|
34
|
+
view = props.view,
|
|
35
|
+
onViewClick = props.onViewClick,
|
|
36
|
+
others = _objectWithoutProperties(props, _excluded);
|
|
37
|
+
var _useState = useState(true),
|
|
38
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
39
|
+
visible = _useState2[0],
|
|
40
|
+
setVisible = _useState2[1];
|
|
41
|
+
return visible && /*#__PURE__*/React.createElement(Alert, _extends({}, others, {
|
|
42
|
+
icon: /*#__PURE__*/React.createElement("div", {
|
|
43
|
+
className: "pisell-alert-type-icon"
|
|
44
|
+
}, icon || /*#__PURE__*/React.createElement(IconFont, {
|
|
45
|
+
type: iconMap[type]
|
|
46
|
+
})),
|
|
47
|
+
message: message,
|
|
48
|
+
description: /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, description), (showDismiss || showView) && /*#__PURE__*/React.createElement("div", {
|
|
49
|
+
className: "pisell-alert-action-wrap"
|
|
50
|
+
}, showDismiss && /*#__PURE__*/React.createElement("span", {
|
|
51
|
+
className: "pisell-action-item pisell-action-dismiss",
|
|
52
|
+
onClick: function onClick(e) {
|
|
53
|
+
var _props$onClose;
|
|
54
|
+
setVisible(false);
|
|
55
|
+
props === null || props === void 0 ? void 0 : (_props$onClose = props.onClose) === null || _props$onClose === void 0 ? void 0 : _props$onClose.call(props, e);
|
|
56
|
+
}
|
|
57
|
+
}, dismiss), showView && /*#__PURE__*/React.createElement("span", {
|
|
58
|
+
className: "pisell-action-item pisell-action-view",
|
|
59
|
+
onClick: onViewClick
|
|
60
|
+
}, view))),
|
|
61
|
+
type: type,
|
|
62
|
+
showIcon: showIcon,
|
|
63
|
+
closable: closable,
|
|
64
|
+
className: classNames(className, 'pisell-alert-wrap')
|
|
65
|
+
}));
|
|
66
|
+
};
|
|
67
|
+
export default PisellAlert;
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
.pisell-alert-wrap {
|
|
2
|
+
border-radius: 12px;
|
|
3
|
+
padding: 16px;
|
|
4
|
+
position: relative;
|
|
5
|
+
.pisell-lowcode-alert-close-icon {
|
|
6
|
+
font-size: 18px;
|
|
7
|
+
padding: 9px;
|
|
8
|
+
position: absolute;
|
|
9
|
+
top: 8px;
|
|
10
|
+
right: 8px;
|
|
11
|
+
color: inherit;
|
|
12
|
+
.anticon-close {
|
|
13
|
+
color: inherit;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
.pisell-alert-type-icon {
|
|
17
|
+
font-size: 20px;
|
|
18
|
+
top: 4px;
|
|
19
|
+
margin-right: 16px;
|
|
20
|
+
&:before {
|
|
21
|
+
position: absolute;
|
|
22
|
+
content: '';
|
|
23
|
+
width: 28px;
|
|
24
|
+
height: 28px;
|
|
25
|
+
border-radius: 20px;
|
|
26
|
+
border-width: 2px;
|
|
27
|
+
border-style: solid;
|
|
28
|
+
border-color: inherit;
|
|
29
|
+
opacity: 0.3;
|
|
30
|
+
z-index: 2;
|
|
31
|
+
top: -4px;
|
|
32
|
+
left: -4px;
|
|
33
|
+
}
|
|
34
|
+
&:after {
|
|
35
|
+
position: absolute;
|
|
36
|
+
z-index: 2;
|
|
37
|
+
content: '';
|
|
38
|
+
width: 36px;
|
|
39
|
+
height: 36px;
|
|
40
|
+
border-radius: 20px;
|
|
41
|
+
border-width: 2px;
|
|
42
|
+
border-style: solid;
|
|
43
|
+
border-color: inherit;
|
|
44
|
+
opacity: 0.1;
|
|
45
|
+
top: -8px;
|
|
46
|
+
left: -8px;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
.pisell-lowcode-alert-message {
|
|
50
|
+
color: inherit;
|
|
51
|
+
font-weight: 600;
|
|
52
|
+
}
|
|
53
|
+
.pisell-lowcode-alert-description {
|
|
54
|
+
color: inherit;
|
|
55
|
+
}
|
|
56
|
+
.pisell-alert-action-wrap {
|
|
57
|
+
margin-top: 12px;
|
|
58
|
+
display: flex;
|
|
59
|
+
gap: 12px;
|
|
60
|
+
.pisell-action-item {
|
|
61
|
+
cursor: pointer;
|
|
62
|
+
font-weight: 600;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.pisell-lowcode-alert-success {
|
|
68
|
+
border: 1px solid var(--Success-600, #079455);
|
|
69
|
+
background: var(--Success-25, #f6fef9);
|
|
70
|
+
color: var(--Success-700, #067647);
|
|
71
|
+
.pisell-alert-type-icon {
|
|
72
|
+
color: #079455;
|
|
73
|
+
line-height: 1;
|
|
74
|
+
position: relative;
|
|
75
|
+
}
|
|
76
|
+
.pisell-alert-action-wrap {
|
|
77
|
+
.pisell-action-item.pisell-action-dismiss {
|
|
78
|
+
color: var(--Success-600, #079455);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
.pisell-lowcode-alert-close-icon {
|
|
82
|
+
.anticon-close {
|
|
83
|
+
color: #17B26A;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.pisell-lowcode-alert-info {
|
|
89
|
+
border: 1px solid var(--Blue-300, #84caff);
|
|
90
|
+
background: var(--Blue-50, #eff8ff);
|
|
91
|
+
color: var(--Blue-700, #175CD3);
|
|
92
|
+
.pisell-alert-type-icon {
|
|
93
|
+
color: #1570ef;
|
|
94
|
+
line-height: 1;
|
|
95
|
+
position: relative;
|
|
96
|
+
}
|
|
97
|
+
.pisell-alert-action-wrap {
|
|
98
|
+
.pisell-action-item.pisell-action-dismiss {
|
|
99
|
+
color: var(--Blue-600, #1570EF);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
.pisell-lowcode-alert-close-icon {
|
|
103
|
+
.anticon-close {
|
|
104
|
+
color: #2E90FA
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.pisell-lowcode-alert-warning {
|
|
110
|
+
border: 1px solid var(--Warning-300, #fec84b);
|
|
111
|
+
background: var(--Warning-25, #fffcf5);
|
|
112
|
+
color: var(--Warning-700, #B54708);
|
|
113
|
+
.pisell-alert-type-icon {
|
|
114
|
+
color: #dc6803;
|
|
115
|
+
line-height: 1;
|
|
116
|
+
position: relative;
|
|
117
|
+
}
|
|
118
|
+
.pisell-alert-action-wrap {
|
|
119
|
+
.pisell-action-item.pisell-action-dismiss {
|
|
120
|
+
color: var(--Warning-600, #DC6803);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
.pisell-lowcode-alert-close-icon {
|
|
124
|
+
.anticon-close {
|
|
125
|
+
color: #F79009
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.pisell-lowcode-alert-error {
|
|
131
|
+
border: 1px solid var(--Error-300, #fda29b);
|
|
132
|
+
background: var(--Error-25, #fffbfa);
|
|
133
|
+
color: var(--Error-700, #B42318);
|
|
134
|
+
.pisell-alert-type-icon {
|
|
135
|
+
color: #d92d20;
|
|
136
|
+
line-height: 1;
|
|
137
|
+
position: relative;
|
|
138
|
+
}
|
|
139
|
+
.pisell-alert-action-wrap {
|
|
140
|
+
.pisell-action-item.pisell-action-dismiss {
|
|
141
|
+
color: var(--Error-600, #D92D20);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
.pisell-lowcode-alert-close-icon {
|
|
145
|
+
.anticon-close {
|
|
146
|
+
color: #F04438
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
@@ -1,47 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { CardProps } from 'antd';
|
|
2
3
|
import './index.less';
|
|
3
|
-
export interface PisellCardProps {
|
|
4
|
-
id: number;
|
|
5
|
-
/** 商品名称 */
|
|
6
|
-
name: string;
|
|
7
|
-
/** 二维码 */
|
|
8
|
-
qrCode: string;
|
|
9
|
-
/** 共享店铺名称 */
|
|
10
|
-
storeName: string;
|
|
11
|
-
/** 余额 */
|
|
12
|
-
balance: number;
|
|
13
|
-
/** 识别码编号 */
|
|
14
|
-
code: string;
|
|
15
|
-
/** 有效期 */
|
|
16
|
-
validDate: string;
|
|
17
|
-
/** 使用金额 */
|
|
18
|
-
redeem: number;
|
|
19
|
-
/** 是否禁用 */
|
|
20
|
-
disabled?: boolean;
|
|
21
|
-
/** 禁用原因 */
|
|
22
|
-
disabledReason?: string;
|
|
23
|
-
/** 封面图 */
|
|
24
|
-
cover?: string;
|
|
25
|
-
/** 是否选中 */
|
|
26
|
-
active?: boolean;
|
|
27
|
-
/** 是否展示商品名称 */
|
|
28
|
-
showName?: boolean;
|
|
29
|
-
/** 是否展示共享店铺名称 */
|
|
30
|
-
showStoreName?: boolean;
|
|
31
|
-
/** 是否展示使用金额 */
|
|
32
|
-
showRedeem?: boolean;
|
|
33
|
-
/** 是否展示余额 */
|
|
34
|
-
showBalance?: boolean;
|
|
35
|
-
/** 是否展示识别码编号 */
|
|
36
|
-
showCode?: boolean;
|
|
37
|
-
/** 是否展示有效期 */
|
|
38
|
-
showValidDate?: boolean;
|
|
39
|
-
/** 是否展示右上角详情按钮 */
|
|
40
|
-
showDetail?: boolean;
|
|
41
|
-
/** 是否展示qrCode */
|
|
42
|
-
showQrCode?: boolean;
|
|
43
|
-
/** 是否展示封面 */
|
|
44
|
-
showCover?: boolean;
|
|
4
|
+
export interface PisellCardProps extends CardProps {
|
|
45
5
|
}
|
|
46
6
|
declare const PisellCard: (props: PisellCardProps) => React.JSX.Element;
|
|
47
7
|
export default PisellCard;
|
|
@@ -1,84 +1,11 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
1
2
|
import React from 'react';
|
|
3
|
+
import { Card } from 'antd';
|
|
2
4
|
import classNames from 'classnames';
|
|
3
|
-
import QRCode from "../qrcode";
|
|
4
|
-
import Iconfont from "../iconfont";
|
|
5
|
-
import Amount from "../pisellText/components/Amount";
|
|
6
|
-
|
|
7
|
-
// @ts-ignore
|
|
8
|
-
import bg from "./bg.jpeg";
|
|
9
5
|
import "./index.less";
|
|
10
6
|
var PisellCard = function PisellCard(props) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
balance = props.balance,
|
|
15
|
-
disabledReason = props.disabledReason,
|
|
16
|
-
name = props.name,
|
|
17
|
-
storeName = props.storeName,
|
|
18
|
-
redeem = props.redeem,
|
|
19
|
-
validDate = props.validDate,
|
|
20
|
-
disabled = props.disabled,
|
|
21
|
-
active = props.active,
|
|
22
|
-
cover = props.cover,
|
|
23
|
-
_props$showCover = props.showCover,
|
|
24
|
-
showCover = _props$showCover === void 0 ? true : _props$showCover,
|
|
25
|
-
_props$showDetail = props.showDetail,
|
|
26
|
-
showDetail = _props$showDetail === void 0 ? true : _props$showDetail,
|
|
27
|
-
_props$showBalance = props.showBalance,
|
|
28
|
-
showBalance = _props$showBalance === void 0 ? true : _props$showBalance,
|
|
29
|
-
_props$showRedeem = props.showRedeem,
|
|
30
|
-
showRedeem = _props$showRedeem === void 0 ? true : _props$showRedeem,
|
|
31
|
-
_props$showName = props.showName,
|
|
32
|
-
showName = _props$showName === void 0 ? true : _props$showName,
|
|
33
|
-
_props$showCode = props.showCode,
|
|
34
|
-
showCode = _props$showCode === void 0 ? true : _props$showCode,
|
|
35
|
-
_props$showStoreName = props.showStoreName,
|
|
36
|
-
showStoreName = _props$showStoreName === void 0 ? true : _props$showStoreName,
|
|
37
|
-
_props$showValidDate = props.showValidDate,
|
|
38
|
-
showValidDate = _props$showValidDate === void 0 ? true : _props$showValidDate,
|
|
39
|
-
_props$showQrCode = props.showQrCode,
|
|
40
|
-
showQrCode = _props$showQrCode === void 0 ? true : _props$showQrCode;
|
|
41
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
42
|
-
className: classNames('pisell-card', {
|
|
43
|
-
'pisell-card-disabled': disabled
|
|
44
|
-
}),
|
|
45
|
-
style: showCover ? {
|
|
46
|
-
backgroundImage: "url('".concat(cover || bg, "')")
|
|
47
|
-
} : {}
|
|
48
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
49
|
-
className: "pisell-card-name-wrap"
|
|
50
|
-
}, /*#__PURE__*/React.createElement("span", null, showName && name), showDetail && /*#__PURE__*/React.createElement("span", null, "Detail")), /*#__PURE__*/React.createElement("div", {
|
|
51
|
-
className: "pisell-card-store-name"
|
|
52
|
-
}, showStoreName && storeName), /*#__PURE__*/React.createElement("div", {
|
|
53
|
-
className: "pisell-card-amount-wrap"
|
|
54
|
-
}, showRedeem && !disabled && /*#__PURE__*/React.createElement("div", {
|
|
55
|
-
className: "pisell-card-amount-item"
|
|
56
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
57
|
-
className: "pisell-card-amount-item-label"
|
|
58
|
-
}, "Redeem"), /*#__PURE__*/React.createElement(Amount, {
|
|
59
|
-
className: "pisell-card-amount-item-value",
|
|
60
|
-
useThousandsSeparator: true,
|
|
61
|
-
value: redeem
|
|
62
|
-
})), showBalance && /*#__PURE__*/React.createElement("div", {
|
|
63
|
-
className: "pisell-card-amount-item"
|
|
64
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
65
|
-
className: "pisell-card-amount-item-label"
|
|
66
|
-
}, "Balance", disabled ? ': ' : ''), /*#__PURE__*/React.createElement(Amount, {
|
|
67
|
-
className: "pisell-card-amount-item-value",
|
|
68
|
-
useThousandsSeparator: true,
|
|
69
|
-
value: balance
|
|
70
|
-
}))), /*#__PURE__*/React.createElement("div", {
|
|
71
|
-
className: "pisell-card-code-wrap"
|
|
72
|
-
}, /*#__PURE__*/React.createElement("div", null, showCode && /*#__PURE__*/React.createElement("div", null, code), showValidDate && /*#__PURE__*/React.createElement("div", null, "Valid to ", validDate)), showQrCode && /*#__PURE__*/React.createElement("div", {
|
|
73
|
-
className: "pisell-card-qr-code"
|
|
74
|
-
}, /*#__PURE__*/React.createElement(QRCode, {
|
|
75
|
-
value: qrCode,
|
|
76
|
-
size: 60
|
|
77
|
-
}))), (disabled || disabledReason) && /*#__PURE__*/React.createElement("div", {
|
|
78
|
-
className: "pisell-card-warn-message"
|
|
79
|
-
}, /*#__PURE__*/React.createElement(Iconfont, {
|
|
80
|
-
className: "pisell-card-icon",
|
|
81
|
-
type: "pisell2-alert-circle"
|
|
82
|
-
}), /*#__PURE__*/React.createElement("span", null, disabledReason)));
|
|
7
|
+
return /*#__PURE__*/React.createElement(Card, _extends({}, props, {
|
|
8
|
+
className: classNames('pisell-card-wrap', props.className)
|
|
9
|
+
}));
|
|
83
10
|
};
|
|
84
11
|
export default PisellCard;
|
|
@@ -1,89 +1,9 @@
|
|
|
1
|
-
.pisell-card {
|
|
2
|
-
padding: 16px;
|
|
3
|
-
color: var(--Gray-900, #101828);
|
|
4
|
-
font-size: 14px;
|
|
5
|
-
font-style: normal;
|
|
6
|
-
position: relative;
|
|
7
|
-
overflow: hidden;
|
|
1
|
+
.pisell-card-wrap {
|
|
8
2
|
border-radius: 12px;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
.pisell-card-name-wrap {
|
|
12
|
-
display: flex;
|
|
13
|
-
justify-content: space-between;
|
|
14
|
-
font-weight: 500;
|
|
15
|
-
line-height: 20px;
|
|
3
|
+
.pisell-lowcode-card-body {
|
|
4
|
+
padding: 16px;
|
|
16
5
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
font-size: 12px;
|
|
20
|
-
font-weight: 400;
|
|
21
|
-
line-height: 18px; /* 150% */
|
|
22
|
-
margin-bottom: 22px;
|
|
23
|
-
}
|
|
24
|
-
.pisell-card-amount-wrap {
|
|
25
|
-
display: flex;
|
|
26
|
-
margin-bottom: 4px;
|
|
27
|
-
.pisell-card-amount-item {
|
|
28
|
-
display: flex;
|
|
29
|
-
flex-direction: column;
|
|
30
|
-
margin-right: 16px;
|
|
31
|
-
.pisell-card-amount-item-label {
|
|
32
|
-
color: var(--Gray-500, #667085);
|
|
33
|
-
font-weight: 400;
|
|
34
|
-
line-height: 20px;
|
|
35
|
-
height: 20px;
|
|
36
|
-
}
|
|
37
|
-
.pisell-card-amount-item-value {
|
|
38
|
-
font-size: 20px;
|
|
39
|
-
font-weight: 600;
|
|
40
|
-
line-height: 30px;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
.pisell-card-code-wrap {
|
|
45
|
-
display: flex;
|
|
46
|
-
justify-content: space-between;
|
|
47
|
-
position: relative;
|
|
48
|
-
.pisell-card-qr-code {
|
|
49
|
-
position: absolute;
|
|
50
|
-
top: -16px;
|
|
51
|
-
right: -6px;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
.pisell-lowcode-qrcode {
|
|
55
|
-
padding: 6px;
|
|
56
|
-
}
|
|
57
|
-
.pisell-card-warn-message {
|
|
58
|
-
position: absolute;
|
|
59
|
-
bottom: 0;
|
|
60
|
-
width: 100%;
|
|
61
|
-
left: 0;
|
|
62
|
-
background: var(--Warning-200, #FEDF89);
|
|
63
|
-
display: flex;
|
|
64
|
-
padding: 10px 16px;
|
|
65
|
-
color: var(--Gray-900, #101828);
|
|
66
|
-
font-weight: 600;
|
|
67
|
-
line-height: 20px;
|
|
68
|
-
.pisell-card-icon {
|
|
69
|
-
font-size: 20px;
|
|
70
|
-
color: #DC6803;
|
|
71
|
-
margin-right: 6px;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
.pisell-card-disabled {
|
|
76
|
-
color: var(--Gray-500, #667085);
|
|
77
|
-
padding-bottom: 36px;
|
|
78
|
-
.pisell-card-amount-wrap {
|
|
79
|
-
.pisell-card-amount-item {
|
|
80
|
-
flex-direction: row;
|
|
81
|
-
align-items: center;
|
|
82
|
-
.pisell-card-amount-item-value {
|
|
83
|
-
font-size: 14px;
|
|
84
|
-
font-weight: 400;
|
|
85
|
-
line-height: 20px;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
6
|
+
&:hover {
|
|
7
|
+
background: var(--Gray-50, #F9FAFB);
|
|
88
8
|
}
|
|
89
9
|
}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PisellCheckboxGroupProps } from '../pisellCheckboxGroup';
|
|
3
3
|
import { PisellContextType } from '../pisell-config-provider/context';
|
|
4
|
-
import {
|
|
4
|
+
import { PisellWalletPassCardProps } from '../pisellWalletPassCard';
|
|
5
5
|
export interface PisellCardListProps extends Omit<PisellCheckboxGroupProps, 'options'> {
|
|
6
6
|
platform?: PisellContextType['platform'];
|
|
7
7
|
endMessage?: React.ReactNode;
|
|
8
8
|
loader?: React.ReactNode;
|
|
9
9
|
hasMore: boolean;
|
|
10
10
|
loadMoreData?: () => Promise<void>;
|
|
11
|
-
data:
|
|
11
|
+
data: PisellWalletPassCardProps[];
|
|
12
|
+
empty?: React.ReactNode;
|
|
13
|
+
showEmpty?: boolean;
|
|
12
14
|
showName?: boolean;
|
|
13
15
|
showStoreName?: boolean;
|
|
14
16
|
showRedeem?: boolean;
|
|
@@ -18,6 +20,7 @@ export interface PisellCardListProps extends Omit<PisellCheckboxGroupProps, 'opt
|
|
|
18
20
|
showDetail?: boolean;
|
|
19
21
|
showQrCode?: boolean;
|
|
20
22
|
showCover?: boolean;
|
|
23
|
+
showBalanceSymbol?: boolean;
|
|
21
24
|
}
|
|
22
|
-
declare const
|
|
23
|
-
export default
|
|
25
|
+
declare const _default: React.MemoExoticComponent<(props: PisellCardListProps) => React.JSX.Element>;
|
|
26
|
+
export default _default;
|