@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.
Files changed (134) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +2 -2
  6. package/build/lowcode/preview.js +142 -142
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +22 -22
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +22 -22
  11. package/es/components/iconfont/index.js +1 -1
  12. package/es/components/page/index.js +11 -6
  13. package/es/components/pisell-config-provider/context.d.ts +2 -3
  14. package/es/components/pisell-config-provider/index.d.ts +1 -0
  15. package/es/components/pisell-config-provider/index.js +5 -3
  16. package/es/components/pisellAlert/index.d.ts +12 -0
  17. package/es/components/pisellAlert/index.js +67 -0
  18. package/es/components/pisellAlert/index.less +149 -0
  19. package/es/components/pisellCard/index.d.ts +2 -42
  20. package/es/components/pisellCard/index.js +5 -78
  21. package/es/components/pisellCard/index.less +5 -85
  22. package/es/components/pisellCardList/index.d.ts +7 -4
  23. package/es/components/pisellCardList/index.js +22 -59
  24. package/es/components/pisellCheckboxGroup/index.d.ts +1 -1
  25. package/es/components/pisellCheckboxGroup/index.js +7 -7
  26. package/es/components/pisellInformationEntry/Input/index.d.ts +8 -0
  27. package/es/components/pisellInformationEntry/Input/index.js +47 -0
  28. package/es/components/pisellInformationEntry/Input/index.less +14 -0
  29. package/es/components/pisellInformationEntry/Scan/index.d.ts +8 -0
  30. package/es/components/pisellInformationEntry/Scan/index.js +24 -0
  31. package/es/components/pisellInformationEntry/Scan/index.less +8 -0
  32. package/es/components/pisellInformationEntry/constants.d.ts +3 -0
  33. package/es/components/pisellInformationEntry/constants.js +21 -0
  34. package/es/components/pisellInformationEntry/index.d.ts +31 -0
  35. package/es/components/pisellInformationEntry/index.js +188 -0
  36. package/es/components/pisellInformationEntry/index.less +40 -0
  37. package/es/components/pisellInformationEntry/utils.d.ts +4 -0
  38. package/es/components/pisellInformationEntry/utils.js +38 -0
  39. package/es/components/pisellModal/components/Information/index.js +4 -3
  40. package/es/components/pisellModal/components/Information/index.less +3 -2
  41. package/es/components/pisellModal/components/MobileModal/index.less +1 -0
  42. package/es/components/pisellModal/components/PcModal/index.d.ts +1 -1
  43. package/es/components/pisellModal/components/PcModal/index.less +8 -0
  44. package/es/components/pisellModal/constants.js +1 -1
  45. package/es/components/pisellScan/index.d.ts +14 -0
  46. package/es/components/pisellScan/index.js +73 -0
  47. package/es/components/pisellScan/index.less +12 -0
  48. package/es/components/pisellWalletPassCard/bg.jpeg +0 -0
  49. package/es/components/pisellWalletPassCard/index.d.ts +50 -0
  50. package/es/components/pisellWalletPassCard/index.js +91 -0
  51. package/es/components/pisellWalletPassCard/index.less +100 -0
  52. package/es/index.d.ts +6 -1
  53. package/es/index.js +9 -2
  54. package/es/locales/en-US.d.ts +6 -0
  55. package/es/locales/en-US.js +9 -1
  56. package/es/locales/zh-CN.d.ts +6 -0
  57. package/es/locales/zh-CN.js +9 -1
  58. package/es/locales/zh-TW.d.ts +6 -0
  59. package/es/locales/zh-TW.js +9 -1
  60. package/lib/components/iconfont/index.js +1 -1
  61. package/lib/components/page/index.js +13 -6
  62. package/lib/components/pisell-config-provider/context.d.ts +2 -3
  63. package/lib/components/pisell-config-provider/index.d.ts +1 -0
  64. package/lib/components/pisell-config-provider/index.js +8 -2
  65. package/lib/components/pisellAlert/index.d.ts +12 -0
  66. package/lib/components/pisellAlert/index.js +95 -0
  67. package/lib/components/pisellAlert/index.less +149 -0
  68. package/lib/components/pisellCard/index.d.ts +2 -42
  69. package/lib/components/pisellCard/index.js +5 -54
  70. package/lib/components/pisellCard/index.less +5 -85
  71. package/lib/components/pisellCardList/index.d.ts +7 -4
  72. package/lib/components/pisellCardList/index.js +21 -59
  73. package/lib/components/pisellCheckboxGroup/index.d.ts +1 -1
  74. package/lib/components/pisellCheckboxGroup/index.js +7 -7
  75. package/lib/components/pisellInformationEntry/Input/index.d.ts +8 -0
  76. package/lib/components/pisellInformationEntry/Input/index.js +54 -0
  77. package/lib/components/pisellInformationEntry/Input/index.less +14 -0
  78. package/lib/components/pisellInformationEntry/Scan/index.d.ts +8 -0
  79. package/lib/components/pisellInformationEntry/Scan/index.js +63 -0
  80. package/lib/components/pisellInformationEntry/Scan/index.less +8 -0
  81. package/lib/components/pisellInformationEntry/constants.d.ts +3 -0
  82. package/lib/components/pisellInformationEntry/constants.js +49 -0
  83. package/lib/components/pisellInformationEntry/index.d.ts +31 -0
  84. package/lib/components/pisellInformationEntry/index.js +162 -0
  85. package/lib/components/pisellInformationEntry/index.less +40 -0
  86. package/lib/components/pisellInformationEntry/utils.d.ts +4 -0
  87. package/lib/components/pisellInformationEntry/utils.js +40 -0
  88. package/lib/components/pisellModal/components/Information/index.js +3 -3
  89. package/lib/components/pisellModal/components/Information/index.less +3 -2
  90. package/lib/components/pisellModal/components/MobileModal/index.less +1 -0
  91. package/lib/components/pisellModal/components/PcModal/index.d.ts +1 -1
  92. package/lib/components/pisellModal/components/PcModal/index.less +8 -0
  93. package/lib/components/pisellModal/constants.js +1 -1
  94. package/lib/components/pisellScan/index.d.ts +14 -0
  95. package/lib/components/pisellScan/index.js +103 -0
  96. package/lib/components/pisellScan/index.less +12 -0
  97. package/lib/components/pisellWalletPassCard/bg.jpeg +0 -0
  98. package/lib/components/pisellWalletPassCard/index.d.ts +50 -0
  99. package/lib/components/pisellWalletPassCard/index.js +99 -0
  100. package/lib/components/pisellWalletPassCard/index.less +100 -0
  101. package/lib/index.d.ts +6 -1
  102. package/lib/index.js +20 -3
  103. package/lib/locales/en-US.d.ts +6 -0
  104. package/lib/locales/en-US.js +9 -1
  105. package/lib/locales/zh-CN.d.ts +6 -0
  106. package/lib/locales/zh-CN.js +9 -1
  107. package/lib/locales/zh-TW.d.ts +6 -0
  108. package/lib/locales/zh-TW.js +9 -1
  109. package/lowcode/pisell-alert/meta.ts +117 -0
  110. package/lowcode/pisell-alert/snippets.ts +50 -0
  111. package/lowcode/pisell-card/__screenshots__/card-1.png +0 -0
  112. package/lowcode/pisell-card/meta.ts +76 -165
  113. package/lowcode/pisell-card/snippets.ts +1 -11
  114. package/lowcode/pisell-information-entry/meta.ts +131 -0
  115. package/lowcode/pisell-information-entry/snippets.ts +17 -0
  116. package/lowcode/pisell-modal/meta.ts +31 -31
  117. package/lowcode/pisell-modal.information/meta.ts +7 -0
  118. package/lowcode/pisell-scan/meta.ts +53 -0
  119. package/lowcode/pisell-scan/snippets.ts +13 -0
  120. package/lowcode/pisell-wallet-pass-card/meta.ts +189 -0
  121. package/lowcode/pisell-wallet-pass-card/snippets.ts +20 -0
  122. package/package.json +4 -3
  123. package/build/lowcode/assets/7b1c7af5ce9e37e4b40ea53fea6ccfd9.jpeg +0 -0
  124. package/build/lowcode/render/default/assets/7b1c7af5ce9e37e4b40ea53fea6ccfd9.jpeg +0 -0
  125. package/dist/umd/materials.min.css +0 -1
  126. package/dist/umd/materials.min.js +0 -1
  127. package/dist/umd/static/DotsSix.57d66266.svg +0 -1
  128. package/dist/umd/static/arrow-left.e542294f.svg +0 -1
  129. package/dist/umd/static/arrow-right.763f03e0.svg +0 -1
  130. package/dist/umd/static/filter-lines.04a54ae9.svg +0 -1
  131. package/dist/umd/static/help-circle.31c9be40.svg +0 -1
  132. package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +0 -1
  133. package/es/components/pisellCard/bg.jpeg +0 -0
  134. package/lib/components/pisellCard/bg.jpeg +0 -0
@@ -135,5 +135,13 @@ export default {
135
135
  'pisell-input-copy-success': '复制成功',
136
136
  'pisell-input-copy': '复制',
137
137
  // 空状态
138
- 'pisell-empty-description-no-data': '暂无数据'
138
+ 'pisell-empty-description-no-data': '暂无数据',
139
+ // 信息录入组件
140
+ 'pisell-information-entry-input-search': '搜索',
141
+ 'pisell-information-entry-scan-exit': '退出',
142
+ // 钱包卡片组件
143
+ 'pisell-wallet-pass-card-detail': '详情',
144
+ 'pisell-wallet-pass-card-redeem': '核销',
145
+ 'pisell-wallet-pass-card-balance': '余额',
146
+ 'pisell-wallet-pass-card-valid-to': '有效期至'
139
147
  };
@@ -112,5 +112,11 @@ declare const _default: {
112
112
  'pisell-input-copy-success': string;
113
113
  'pisell-input-copy': string;
114
114
  'pisell-empty-description-no-data': string;
115
+ 'pisell-information-entry-input-search': string;
116
+ 'pisell-information-entry-scan-exit': string;
117
+ 'pisell-wallet-pass-card-detail': string;
118
+ 'pisell-wallet-pass-card-redeem': string;
119
+ 'pisell-wallet-pass-card-balance': string;
120
+ 'pisell-wallet-pass-card-valid-to': string;
115
121
  };
116
122
  export default _default;
@@ -135,5 +135,13 @@ export default {
135
135
  'pisell-input-copy-success': '復製成功',
136
136
  'pisell-input-copy': '復製',
137
137
  // 空状态
138
- 'pisell-empty-description-no-data': '暫無數據'
138
+ 'pisell-empty-description-no-data': '暫無數據',
139
+ // 信息录入组件
140
+ 'pisell-information-entry-input-search': '搜索',
141
+ 'pisell-information-entry-scan-exit': '退出',
142
+ // 钱包卡片组件
143
+ 'pisell-wallet-pass-card-detail': '詳情',
144
+ 'pisell-wallet-pass-card-redeem': '核銷',
145
+ 'pisell-wallet-pass-card-balance': '餘額',
146
+ 'pisell-wallet-pass-card-valid-to': '有效期至'
139
147
  };
@@ -35,7 +35,7 @@ module.exports = __toCommonJS(iconfont_exports);
35
35
  var import_icons = require("@ant-design/icons");
36
36
  var import_react = __toESM(require("react"));
37
37
  var MyIcon = (0, import_icons.createFromIconfontCN)({
38
- scriptUrl: "https://at.alicdn.com/t/c/font_4075221_zzvy4hs6j7o.js"
38
+ scriptUrl: "https://at.alicdn.com/t/c/font_4075221_v55dw714o2.js"
39
39
  // 在 iconfont.cn 上生成
40
40
  });
41
41
  var IconFont = (props) => {
@@ -68,10 +68,11 @@ var localeDateMap = {
68
68
  }
69
69
  };
70
70
  var Page = (props) => {
71
- var _a, _b;
72
- const { children, style, locale, ...others } = props;
71
+ var _a, _b, _c, _d;
72
+ const { children, style, locale: propsLocale, ...others } = props;
73
73
  const context = (0, import_useEngineContext.default)();
74
74
  const { platform, themeColor } = ((_a = context.appHelper) == null ? void 0 : _a.constants) || {};
75
+ const locale = propsLocale || ((_c = (_b = context == null ? void 0 : context.engine) == null ? void 0 : _b.props) == null ? void 0 : _c.locale) || "en";
75
76
  const theme = (0, import_react.useMemo)(() => {
76
77
  return {
77
78
  components: {
@@ -158,7 +159,7 @@ var Page = (props) => {
158
159
  }
159
160
  },
160
161
  token: {
161
- colorPrimary: "#7F56D9",
162
+ colorPrimary: themeColor || "#7F56D9",
162
163
  // colorPrimaryBg: '#F9F5FF',
163
164
  // colorPrimaryBgHover: '#F4EBFF',
164
165
  // colorPrimaryBorder: '#E9D7FE',
@@ -242,13 +243,19 @@ var Page = (props) => {
242
243
  prefixCls: props.prefixCls || "pisell-lowcode",
243
244
  theme: props.theme || theme
244
245
  },
245
- /* @__PURE__ */ import_react.default.createElement(import_antd.App, null, /* @__PURE__ */ import_react.default.createElement(
246
+ /* @__PURE__ */ import_react.default.createElement(import_antd.App, { component: false }, /* @__PURE__ */ import_react.default.createElement(
246
247
  import_date_picker.LocalizationProvider,
247
248
  {
248
249
  dateAdapter: import_AdapterDayjs.AdapterDayjs,
249
- adapterLocale: ((_b = localeDateMap == null ? void 0 : localeDateMap[locale]) == null ? void 0 : _b.adapterLocale) || "en"
250
+ adapterLocale: ((_d = localeDateMap == null ? void 0 : localeDateMap[locale]) == null ? void 0 : _d.adapterLocale) || "en"
250
251
  },
251
- /* @__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, null, /* @__PURE__ */ import_react.default.createElement("div", { style: { ...style, "--theme-color": "#7F56D9" } }, children))))
252
+ /* @__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(
253
+ "div",
254
+ {
255
+ style: { ...style, "--theme-color": themeColor || "#7F56D9" }
256
+ },
257
+ children
258
+ ))))
252
259
  ))
253
260
  );
254
261
  };
@@ -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;
@@ -4,6 +4,7 @@ interface PisellConfigProviderType {
4
4
  platform?: PisellContextType['platform'];
5
5
  children: React.ReactNode;
6
6
  symbol?: string;
7
+ locale?: string;
7
8
  }
8
9
  declare const PisellConfigProvider: React.FC<PisellConfigProviderType>;
9
10
  export default PisellConfigProvider;
@@ -45,13 +45,19 @@ var platformMap = {
45
45
  };
46
46
  var PisellConfigProvider = (props) => {
47
47
  var _a;
48
- const { children, platform: propsPlatform, symbol: propsSymbol } = props;
48
+ const {
49
+ children,
50
+ platform: propsPlatform,
51
+ symbol: propsSymbol,
52
+ locale
53
+ } = props;
49
54
  const platform = (0, import_hooks.useResponsive)();
50
55
  const context = (0, import_useEngineContext.default)();
51
56
  const { getSymbolic } = ((_a = context.appHelper) == null ? void 0 : _a.utils) || {};
52
57
  const config = {
53
58
  platform: propsPlatform || platformMap[platform],
54
- symbol: propsSymbol || (getSymbolic == null ? void 0 : getSymbolic()) || ""
59
+ symbol: propsSymbol || (getSymbolic == null ? void 0 : getSymbolic()) || "",
60
+ locale: locale || "en"
55
61
  };
56
62
  const staticFunction = import_antd.App.useApp();
57
63
  (0, import_pisellMessage.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,95 @@
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/pisellAlert/index.tsx
30
+ var pisellAlert_exports = {};
31
+ __export(pisellAlert_exports, {
32
+ default: () => pisellAlert_default
33
+ });
34
+ module.exports = __toCommonJS(pisellAlert_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 iconMap = {
41
+ success: "pisell2-check-circle",
42
+ warning: "pisell2-alert-circle",
43
+ error: "pisell2-alert-circle",
44
+ info: "pisell2-alert-circle"
45
+ };
46
+ var PisellAlert = (props) => {
47
+ const {
48
+ message,
49
+ description,
50
+ type = "success",
51
+ showIcon,
52
+ icon,
53
+ closable,
54
+ className,
55
+ showDismiss,
56
+ dismiss,
57
+ showView,
58
+ view,
59
+ onViewClick,
60
+ ...others
61
+ } = props;
62
+ const [visible, setVisible] = (0, import_react.useState)(true);
63
+ return visible && /* @__PURE__ */ import_react.default.createElement(
64
+ import_antd.Alert,
65
+ {
66
+ ...others,
67
+ icon: /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-alert-type-icon" }, icon || /* @__PURE__ */ import_react.default.createElement(import_iconfont.default, { type: iconMap[type] })),
68
+ message,
69
+ description: /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement("div", null, description), (showDismiss || showView) && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-alert-action-wrap" }, showDismiss && /* @__PURE__ */ import_react.default.createElement(
70
+ "span",
71
+ {
72
+ className: "pisell-action-item pisell-action-dismiss",
73
+ onClick: (e) => {
74
+ var _a;
75
+ setVisible(false);
76
+ (_a = props == null ? void 0 : props.onClose) == null ? void 0 : _a.call(props, e);
77
+ }
78
+ },
79
+ dismiss
80
+ ), showView && /* @__PURE__ */ import_react.default.createElement(
81
+ "span",
82
+ {
83
+ className: "pisell-action-item pisell-action-view",
84
+ onClick: onViewClick
85
+ },
86
+ view
87
+ ))),
88
+ type,
89
+ showIcon,
90
+ closable,
91
+ className: (0, import_classnames.default)(className, "pisell-alert-wrap")
92
+ }
93
+ );
94
+ };
95
+ var pisellAlert_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;
@@ -33,65 +33,16 @@ __export(pisellCard_exports, {
33
33
  });
34
34
  module.exports = __toCommonJS(pisellCard_exports);
35
35
  var import_react = __toESM(require("react"));
36
+ var import_antd = require("antd");
36
37
  var import_classnames = __toESM(require("classnames"));
37
- var import_qrcode = __toESM(require("../qrcode"));
38
- var import_iconfont = __toESM(require("../iconfont"));
39
- var import_Amount = __toESM(require("../pisellText/components/Amount"));
40
- var import_bg = __toESM(require("./bg.jpeg"));
41
38
  var import_index = require("./index.less");
42
39
  var PisellCard = (props) => {
43
- const {
44
- id,
45
- code,
46
- qrCode,
47
- balance,
48
- disabledReason,
49
- name,
50
- storeName,
51
- redeem,
52
- validDate,
53
- disabled,
54
- active,
55
- cover,
56
- showCover = true,
57
- showDetail = true,
58
- showBalance = true,
59
- showRedeem = true,
60
- showName = true,
61
- showCode = true,
62
- showStoreName = true,
63
- showValidDate = true,
64
- showQrCode = true
65
- } = props;
66
40
  return /* @__PURE__ */ import_react.default.createElement(
67
- "div",
41
+ import_antd.Card,
68
42
  {
69
- className: (0, import_classnames.default)("pisell-card", {
70
- "pisell-card-disabled": disabled
71
- }),
72
- style: showCover ? {
73
- backgroundImage: `url('${cover || import_bg.default}')`
74
- } : {}
75
- },
76
- /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-card-name-wrap" }, /* @__PURE__ */ import_react.default.createElement("span", null, showName && name), showDetail && /* @__PURE__ */ import_react.default.createElement("span", null, "Detail")),
77
- /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-card-store-name" }, showStoreName && storeName),
78
- /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-card-amount-wrap" }, showRedeem && !disabled && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-card-amount-item" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-card-amount-item-label" }, "Redeem"), /* @__PURE__ */ import_react.default.createElement(
79
- import_Amount.default,
80
- {
81
- className: "pisell-card-amount-item-value",
82
- useThousandsSeparator: true,
83
- value: redeem
84
- }
85
- )), showBalance && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-card-amount-item" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-card-amount-item-label" }, "Balance", disabled ? ": " : ""), /* @__PURE__ */ import_react.default.createElement(
86
- import_Amount.default,
87
- {
88
- className: "pisell-card-amount-item-value",
89
- useThousandsSeparator: true,
90
- value: balance
91
- }
92
- ))),
93
- /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-card-code-wrap" }, /* @__PURE__ */ import_react.default.createElement("div", null, showCode && /* @__PURE__ */ import_react.default.createElement("div", null, code), showValidDate && /* @__PURE__ */ import_react.default.createElement("div", null, "Valid to ", validDate)), showQrCode && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-card-qr-code" }, /* @__PURE__ */ import_react.default.createElement(import_qrcode.default, { value: qrCode, size: 60 }))),
94
- (disabled || disabledReason) && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-card-warn-message" }, /* @__PURE__ */ import_react.default.createElement(import_iconfont.default, { className: "pisell-card-icon", type: "pisell2-alert-circle" }), /* @__PURE__ */ import_react.default.createElement("span", null, disabledReason))
43
+ ...props,
44
+ className: (0, import_classnames.default)("pisell-card-wrap", props.className)
45
+ }
95
46
  );
96
47
  };
97
48
  var pisellCard_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
- background-size: cover;
10
- height: 190px;
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
- .pisell-card-store-name {
18
- height: 20px;
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 { PisellCardProps } from "../pisellCard";
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: PisellCardProps[];
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 PisellCardList: (props: PisellCardListProps) => React.JSX.Element;
23
- export default PisellCardList;
25
+ declare const _default: React.MemoExoticComponent<(props: PisellCardListProps) => React.JSX.Element>;
26
+ export default _default;