@pisell/materials 6.3.17 → 6.3.18

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 (269) 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 +5 -5
  6. package/build/lowcode/preview.js +144 -144
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +23 -23
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +23 -23
  11. package/es/components/TimeResourceSelector/index.d.ts +21 -0
  12. package/es/components/auto-resize-text/auto-text-size-standalone.d.ts +20 -0
  13. package/es/components/auto-resize-text/auto-text-size-standalone.js +258 -0
  14. package/es/components/auto-resize-text/index.d.ts +6 -0
  15. package/es/components/auto-resize-text/index.js +40 -0
  16. package/es/components/cardPro/index.js +10 -3
  17. package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
  18. package/es/components/dataSourceComponents/fields/index.d.ts +16 -16
  19. package/es/components/iconfont/index.js +1 -1
  20. package/es/components/keyboard/index.d.ts +22 -0
  21. package/es/components/keyboard/index.js +159 -0
  22. package/es/components/keyboard/index.less +44 -0
  23. package/es/components/page/index.js +5 -2
  24. package/es/components/pisell-config-provider/context.d.ts +2 -0
  25. package/es/components/pisell-config-provider/index.d.ts +1 -0
  26. package/es/components/pisellAdjustPrice/index.js +5 -1
  27. package/es/components/pisellAdjustPrice/type.d.ts +2 -0
  28. package/es/components/pisellCardList/index.d.ts +32 -2
  29. package/es/components/pisellCardList/index.js +39 -2
  30. package/es/components/pisellCardList/index.less +9 -1
  31. package/es/components/pisellCheckboxGroup/index.d.ts +3 -0
  32. package/es/components/pisellCheckboxGroup/index.js +9 -4
  33. package/es/components/pisellCheckboxGroup/index.less +28 -1
  34. package/es/components/pisellCustomCheckboxGroup/index.d.ts +16 -0
  35. package/es/components/pisellGoodPassCard/index.d.ts +1 -0
  36. package/es/components/pisellGoodPassCard/index.js +17 -5
  37. package/es/components/pisellText/components/Amount/index.js +2 -1
  38. package/es/components/pisellToast/index.d.ts +1 -0
  39. package/es/components/pisellToast/index.js +4 -0
  40. package/es/components/pisellToast/squareToast/index.d.ts +15 -0
  41. package/es/components/pisellToast/squareToast/index.js +28 -0
  42. package/es/components/pisellToast/squareToast/index.less +60 -0
  43. package/es/components/pisellToast/squareToast/methods.d.ts +13 -0
  44. package/es/components/pisellToast/squareToast/methods.js +136 -0
  45. package/es/components/pisellToast/squareToast/renderImperatively.d.ts +28 -0
  46. package/es/components/pisellToast/squareToast/renderImperatively.js +190 -0
  47. package/es/components/pisellToast/squareToast/toast.d.ts +25 -0
  48. package/es/components/pisellToast/squareToast/toast.js +60 -0
  49. package/es/components/pisellWalletPassCard/index.d.ts +53 -1
  50. package/es/components/pisellWalletPassCard/index.js +333 -73
  51. package/es/components/pisellWalletPassCard/index.less +47 -9
  52. package/es/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +3 -0
  53. package/es/components/productCard/cartSkuCard/components/AmountFooter/index.js +80 -0
  54. package/es/components/productCard/cartSkuCard/components/AmountFooter/index.less +75 -0
  55. package/es/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +3 -0
  56. package/es/components/productCard/cartSkuCard/components/MultiDay/index.js +82 -0
  57. package/es/components/productCard/cartSkuCard/components/MultiDay/index.less +31 -0
  58. package/es/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +14 -0
  59. package/es/components/productCard/cartSkuCard/components/MultiDay/utils.js +56 -0
  60. package/es/components/productCard/cartSkuCard/components/Note/index.d.ts +3 -0
  61. package/es/components/productCard/cartSkuCard/components/Note/index.js +29 -0
  62. package/es/components/productCard/cartSkuCard/components/Note/index.less +27 -0
  63. package/es/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +28 -0
  64. package/es/components/productCard/cartSkuCard/components/basicInfo/index.js +94 -0
  65. package/es/components/productCard/cartSkuCard/components/basicInfo/index.less +117 -0
  66. package/es/components/productCard/cartSkuCard/components/discountReason/index.d.ts +2 -0
  67. package/es/components/productCard/cartSkuCard/components/discountReason/index.js +51 -0
  68. package/es/components/productCard/cartSkuCard/components/holders/index.d.ts +3 -0
  69. package/es/components/productCard/cartSkuCard/components/holders/index.js +49 -0
  70. package/es/components/productCard/cartSkuCard/components/holders/index.less +47 -0
  71. package/es/components/productCard/cartSkuCard/components/packages/index.d.ts +10 -0
  72. package/es/components/productCard/cartSkuCard/components/packages/index.js +52 -0
  73. package/es/components/productCard/cartSkuCard/components/packages/index.less +22 -0
  74. package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +20 -0
  75. package/es/components/productCard/cartSkuCard/components/packages/utils.js +40 -0
  76. package/es/components/productCard/cartSkuCard/components/resources/index.d.ts +3 -0
  77. package/es/components/productCard/cartSkuCard/components/resources/index.js +39 -0
  78. package/es/components/productCard/cartSkuCard/components/resources/index.less +19 -0
  79. package/es/components/productCard/cartSkuCard/components/sales/index.d.ts +12 -0
  80. package/es/components/productCard/cartSkuCard/components/sales/index.js +57 -0
  81. package/es/components/productCard/cartSkuCard/components/sales/index.less +22 -0
  82. package/es/components/productCard/cartSkuCard/components/specs/index.d.ts +3 -0
  83. package/es/components/productCard/cartSkuCard/components/specs/index.js +44 -0
  84. package/es/components/productCard/cartSkuCard/components/specs/index.less +34 -0
  85. package/es/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +46 -0
  86. package/es/components/productCard/cartSkuCard/components/swipeAction/index.js +360 -0
  87. package/es/components/productCard/cartSkuCard/components/swipeAction/index.less +74 -0
  88. package/es/components/productCard/cartSkuCard/components/timeRange/index.d.ts +6 -0
  89. package/es/components/productCard/cartSkuCard/components/timeRange/index.js +54 -0
  90. package/es/components/productCard/cartSkuCard/components/timeRange/index.less +38 -0
  91. package/es/components/productCard/cartSkuCard/index.d.ts +10 -0
  92. package/es/components/productCard/cartSkuCard/index.js +194 -0
  93. package/es/components/productCard/cartSkuCard/index.less +33 -0
  94. package/es/components/productCard/cartSkuCard/locales.d.ts +99 -0
  95. package/es/components/productCard/cartSkuCard/locales.js +33 -0
  96. package/es/components/productCard/components/Action/index.js +14 -1
  97. package/es/components/productCard/components/Action/index.less +3 -0
  98. package/es/components/productCard/components/Header/index.js +23 -8
  99. package/es/components/productCard/components/Header/index.less +16 -1
  100. package/es/components/productCard/components/Sales/index.js +2 -2
  101. package/es/components/productCard/components/Time/components/SelectHolderModal/index.js +3 -1
  102. package/es/components/productCard/components/Time/components/SelectHolderModal/index.less +3 -0
  103. package/es/components/productCard/index.d.ts +3 -1
  104. package/es/components/productCard/index.js +7 -2
  105. package/es/components/productCard/index.less +6 -0
  106. package/es/components/productCard/locales.js +3 -0
  107. package/es/components/productCard/status.js +1 -0
  108. package/es/components/productCard/types.d.ts +1 -0
  109. package/es/components/productCard/utils.js +8 -1
  110. package/es/components/select-time/index.d.ts +14 -0
  111. package/es/components/table/Table/AddFieldModal/index.d.ts +1 -0
  112. package/es/components/table/Table/AddFieldModal/index.js +13 -13
  113. package/es/components/table/Table/AddFieldModal/index.less +11 -11
  114. package/es/components/table/Table/utils.d.ts +1 -1
  115. package/es/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +5 -1
  116. package/es/components/virtual-keyboard/BaseNumberKeyboard/Presets.js +21 -7
  117. package/es/components/virtual-keyboard/BaseNumberKeyboard/Presets.less +9 -5
  118. package/es/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +4 -0
  119. package/es/components/virtual-keyboard/BaseNumberKeyboard/index.js +44 -25
  120. package/es/components/virtual-keyboard/Number/index.js +4 -1
  121. package/es/components/virtual-keyboard/Number/types.d.ts +1 -0
  122. package/es/components/virtual-keyboard/index.d.ts +11 -0
  123. package/es/components/virtual-keyboard/index.js +88 -3
  124. package/es/components/virtual-keyboard/index.less +33 -1
  125. package/es/components/virtualInput/BaseVirtualInput/index.d.ts +40 -0
  126. package/es/components/virtualInput/BaseVirtualInput/index.js +163 -0
  127. package/es/components/virtualInput/BaseVirtualInput/index.less +77 -0
  128. package/es/components/virtualInput/index.d.ts +24 -0
  129. package/es/components/virtualInput/index.js +60 -0
  130. package/es/components/virtualInput/index.less +42 -0
  131. package/es/index.d.ts +5 -1
  132. package/es/index.js +5 -2
  133. package/es/locales/en-US.d.ts +19 -2
  134. package/es/locales/en-US.js +29 -6
  135. package/es/locales/zh-CN.d.ts +19 -2
  136. package/es/locales/zh-CN.js +29 -6
  137. package/es/locales/zh-TW.d.ts +19 -2
  138. package/es/locales/zh-TW.js +28 -6
  139. package/lib/components/TimeResourceSelector/index.d.ts +21 -0
  140. package/lib/components/auto-resize-text/auto-text-size-standalone.d.ts +20 -0
  141. package/lib/components/auto-resize-text/auto-text-size-standalone.js +273 -0
  142. package/lib/components/auto-resize-text/index.d.ts +6 -0
  143. package/lib/components/auto-resize-text/index.js +71 -0
  144. package/lib/components/cardPro/index.js +3 -2
  145. package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
  146. package/lib/components/dataSourceComponents/fields/index.d.ts +16 -16
  147. package/lib/components/iconfont/index.js +1 -1
  148. package/lib/components/keyboard/index.d.ts +22 -0
  149. package/lib/components/keyboard/index.js +223 -0
  150. package/lib/components/keyboard/index.less +44 -0
  151. package/lib/components/page/index.js +3 -2
  152. package/lib/components/pisell-config-provider/context.d.ts +2 -0
  153. package/lib/components/pisell-config-provider/index.d.ts +1 -0
  154. package/lib/components/pisellAdjustPrice/index.js +4 -0
  155. package/lib/components/pisellAdjustPrice/type.d.ts +2 -0
  156. package/lib/components/pisellCardList/index.d.ts +32 -2
  157. package/lib/components/pisellCardList/index.js +39 -2
  158. package/lib/components/pisellCardList/index.less +9 -1
  159. package/lib/components/pisellCheckboxGroup/index.d.ts +3 -0
  160. package/lib/components/pisellCheckboxGroup/index.js +6 -1
  161. package/lib/components/pisellCheckboxGroup/index.less +28 -1
  162. package/lib/components/pisellCustomCheckboxGroup/index.d.ts +16 -0
  163. package/lib/components/pisellGoodPassCard/index.d.ts +1 -0
  164. package/lib/components/pisellGoodPassCard/index.js +31 -4
  165. package/lib/components/pisellText/components/Amount/index.js +2 -1
  166. package/lib/components/pisellToast/index.d.ts +1 -0
  167. package/lib/components/pisellToast/index.js +10 -1
  168. package/lib/components/pisellToast/squareToast/index.d.ts +15 -0
  169. package/lib/components/pisellToast/squareToast/index.js +58 -0
  170. package/lib/components/pisellToast/squareToast/index.less +60 -0
  171. package/lib/components/pisellToast/squareToast/methods.d.ts +13 -0
  172. package/lib/components/pisellToast/squareToast/methods.js +150 -0
  173. package/lib/components/pisellToast/squareToast/renderImperatively.d.ts +28 -0
  174. package/lib/components/pisellToast/squareToast/renderImperatively.js +162 -0
  175. package/lib/components/pisellToast/squareToast/toast.d.ts +25 -0
  176. package/lib/components/pisellToast/squareToast/toast.js +88 -0
  177. package/lib/components/pisellWalletPassCard/index.d.ts +53 -1
  178. package/lib/components/pisellWalletPassCard/index.js +257 -59
  179. package/lib/components/pisellWalletPassCard/index.less +47 -9
  180. package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +3 -0
  181. package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.js +80 -0
  182. package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.less +75 -0
  183. package/lib/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +3 -0
  184. package/lib/components/productCard/cartSkuCard/components/MultiDay/index.js +71 -0
  185. package/lib/components/productCard/cartSkuCard/components/MultiDay/index.less +31 -0
  186. package/lib/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +14 -0
  187. package/lib/components/productCard/cartSkuCard/components/MultiDay/utils.js +77 -0
  188. package/lib/components/productCard/cartSkuCard/components/Note/index.d.ts +3 -0
  189. package/lib/components/productCard/cartSkuCard/components/Note/index.js +56 -0
  190. package/lib/components/productCard/cartSkuCard/components/Note/index.less +27 -0
  191. package/lib/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +28 -0
  192. package/lib/components/productCard/cartSkuCard/components/basicInfo/index.js +83 -0
  193. package/lib/components/productCard/cartSkuCard/components/basicInfo/index.less +117 -0
  194. package/lib/components/productCard/cartSkuCard/components/discountReason/index.d.ts +2 -0
  195. package/lib/components/productCard/cartSkuCard/components/discountReason/index.js +70 -0
  196. package/lib/components/productCard/cartSkuCard/components/holders/index.d.ts +3 -0
  197. package/lib/components/productCard/cartSkuCard/components/holders/index.js +64 -0
  198. package/lib/components/productCard/cartSkuCard/components/holders/index.less +47 -0
  199. package/lib/components/productCard/cartSkuCard/components/packages/index.d.ts +10 -0
  200. package/lib/components/productCard/cartSkuCard/components/packages/index.js +73 -0
  201. package/lib/components/productCard/cartSkuCard/components/packages/index.less +22 -0
  202. package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +20 -0
  203. package/lib/components/productCard/cartSkuCard/components/packages/utils.js +44 -0
  204. package/lib/components/productCard/cartSkuCard/components/resources/index.d.ts +3 -0
  205. package/lib/components/productCard/cartSkuCard/components/resources/index.js +71 -0
  206. package/lib/components/productCard/cartSkuCard/components/resources/index.less +19 -0
  207. package/lib/components/productCard/cartSkuCard/components/sales/index.d.ts +12 -0
  208. package/lib/components/productCard/cartSkuCard/components/sales/index.js +77 -0
  209. package/lib/components/productCard/cartSkuCard/components/sales/index.less +22 -0
  210. package/lib/components/productCard/cartSkuCard/components/specs/index.d.ts +3 -0
  211. package/lib/components/productCard/cartSkuCard/components/specs/index.js +66 -0
  212. package/lib/components/productCard/cartSkuCard/components/specs/index.less +34 -0
  213. package/lib/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +46 -0
  214. package/lib/components/productCard/cartSkuCard/components/swipeAction/index.js +373 -0
  215. package/lib/components/productCard/cartSkuCard/components/swipeAction/index.less +74 -0
  216. package/lib/components/productCard/cartSkuCard/components/timeRange/index.d.ts +6 -0
  217. package/lib/components/productCard/cartSkuCard/components/timeRange/index.js +68 -0
  218. package/lib/components/productCard/cartSkuCard/components/timeRange/index.less +38 -0
  219. package/lib/components/productCard/cartSkuCard/index.d.ts +10 -0
  220. package/lib/components/productCard/cartSkuCard/index.js +229 -0
  221. package/lib/components/productCard/cartSkuCard/index.less +33 -0
  222. package/lib/components/productCard/cartSkuCard/locales.d.ts +99 -0
  223. package/lib/components/productCard/cartSkuCard/locales.js +64 -0
  224. package/lib/components/productCard/components/Action/index.js +9 -0
  225. package/lib/components/productCard/components/Action/index.less +3 -0
  226. package/lib/components/productCard/components/Header/index.js +21 -11
  227. package/lib/components/productCard/components/Header/index.less +16 -1
  228. package/lib/components/productCard/components/Sales/index.js +2 -2
  229. package/lib/components/productCard/components/Time/components/SelectHolderModal/index.js +1 -1
  230. package/lib/components/productCard/components/Time/components/SelectHolderModal/index.less +3 -0
  231. package/lib/components/productCard/index.d.ts +3 -1
  232. package/lib/components/productCard/index.js +7 -2
  233. package/lib/components/productCard/index.less +6 -0
  234. package/lib/components/productCard/locales.js +12 -3
  235. package/lib/components/productCard/status.js +1 -0
  236. package/lib/components/productCard/types.d.ts +1 -0
  237. package/lib/components/productCard/utils.js +8 -1
  238. package/lib/components/select-time/index.d.ts +14 -0
  239. package/lib/components/table/Table/AddFieldModal/index.d.ts +1 -0
  240. package/lib/components/table/Table/AddFieldModal/index.js +9 -9
  241. package/lib/components/table/Table/AddFieldModal/index.less +11 -11
  242. package/lib/components/table/Table/utils.d.ts +1 -1
  243. package/lib/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +5 -1
  244. package/lib/components/virtual-keyboard/BaseNumberKeyboard/Presets.js +19 -2
  245. package/lib/components/virtual-keyboard/BaseNumberKeyboard/Presets.less +9 -5
  246. package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +4 -0
  247. package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.js +45 -27
  248. package/lib/components/virtual-keyboard/Number/index.js +3 -0
  249. package/lib/components/virtual-keyboard/Number/types.d.ts +1 -0
  250. package/lib/components/virtual-keyboard/index.d.ts +11 -0
  251. package/lib/components/virtual-keyboard/index.js +60 -2
  252. package/lib/components/virtual-keyboard/index.less +33 -1
  253. package/lib/components/virtualInput/BaseVirtualInput/index.d.ts +40 -0
  254. package/lib/components/virtualInput/BaseVirtualInput/index.js +179 -0
  255. package/lib/components/virtualInput/BaseVirtualInput/index.less +77 -0
  256. package/lib/components/virtualInput/index.d.ts +24 -0
  257. package/lib/components/virtualInput/index.js +102 -0
  258. package/lib/components/virtualInput/index.less +42 -0
  259. package/lib/index.d.ts +5 -1
  260. package/lib/index.js +11 -0
  261. package/lib/locales/en-US.d.ts +19 -2
  262. package/lib/locales/en-US.js +24 -5
  263. package/lib/locales/zh-CN.d.ts +19 -2
  264. package/lib/locales/zh-CN.js +24 -5
  265. package/lib/locales/zh-TW.d.ts +19 -2
  266. package/lib/locales/zh-TW.js +23 -5
  267. package/package.json +4 -4
  268. package/es/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +0 -12
  269. package/lib/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +0 -12
@@ -0,0 +1,44 @@
1
+ .pisell-virtual-keyboard-wrap {
2
+ display: flex;
3
+ gap: 7px;
4
+ .pisell-virtual-keyboard-content {
5
+ width: 100%;
6
+ display: flex;
7
+ flex-wrap: wrap;
8
+ align-items: center;
9
+ justify-content: flex-end;
10
+ gap: 7px;
11
+
12
+ .pisell-virtual-keyboard-item {
13
+ border-radius: 5px;
14
+ background: var(--Base-White, #fff);
15
+ box-shadow: 0px 1px 2px rgba(16, 24, 40, 0.06);;
16
+ overflow: hidden;
17
+ width: calc((100% - 14px) / 3 * 1);
18
+ padding-top: 25%;
19
+ position: relative;
20
+
21
+ .pisell-virtual-keyboard-item-button {
22
+ position: absolute;
23
+ left: 0;
24
+ top: 0;
25
+ width: 100%;
26
+ height: 100%;
27
+ border-radius: 5px;
28
+ color: var(--Base-Black, #000);
29
+ font-size: 25px;
30
+ font-style: normal;
31
+ font-weight: 400;
32
+ box-shadow: none;
33
+ padding: 0 !important;
34
+ }
35
+ }
36
+ }
37
+ .pisell-virtual-keyboard-right {
38
+ flex-direction: column;
39
+ justify-content: start;
40
+ .pisell-virtual-keyboard-item{
41
+ width: 100%;
42
+ }
43
+ }
44
+ }
@@ -1,5 +1,5 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["children", "style", "className", "locale"];
2
+ var _excluded = ["children", "style", "className", "locale", "isRenderPisellConfigProvider"];
3
3
  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); }
4
4
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
5
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -50,6 +50,8 @@ var Page = function Page(props) {
50
50
  style = props.style,
51
51
  className = props.className,
52
52
  propsLocale = props.locale,
53
+ _props$isRenderPisell = props.isRenderPisellConfigProvider,
54
+ isRenderPisellConfigProvider = _props$isRenderPisell === void 0 ? true : _props$isRenderPisell,
53
55
  others = _objectWithoutProperties(props, _excluded);
54
56
  var context = useEngineContext();
55
57
  var _ref = ((_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.constants) || {},
@@ -197,6 +199,7 @@ var Page = function Page(props) {
197
199
  }
198
200
  });
199
201
  }, [platform, themeColor]);
202
+ var PisellConfigProvid = isRenderPisellConfigProvider ? PisellConfigProvider : React.Fragment;
200
203
  return /*#__PURE__*/React.createElement(ConfigProvider, _extends({}, others, {
201
204
  locale: localMap[locale],
202
205
  prefixCls: props.prefixCls || 'pisell-lowcode',
@@ -215,7 +218,7 @@ var Page = function Page(props) {
215
218
  value: {
216
219
  locale: locale
217
220
  }
218
- }, /*#__PURE__*/React.createElement(PisellConfigProvider, {
221
+ }, /*#__PURE__*/React.createElement(PisellConfigProvid, {
219
222
  locale: locale
220
223
  }, /*#__PURE__*/React.createElement(VariablesProvider, {
221
224
  variables: ((_context$engine2 = context.engine) === null || _context$engine2 === void 0 || (_context$engine2 = _context$engine2.props) === null || _context$engine2 === void 0 ? void 0 : _context$engine2.variables) || {}
@@ -5,6 +5,8 @@ export interface PisellContextType {
5
5
  symbol?: string;
6
6
  /** 当前语言环境 */
7
7
  locale?: string;
8
+ /** 获取货币符号 */
9
+ getSymbolic?: () => string;
8
10
  }
9
11
  export declare const PisellContext: import("react").Context<PisellContextType>;
10
12
  /**
@@ -7,6 +7,7 @@ interface PisellConfigProviderType {
7
7
  symbol?: string;
8
8
  /** 当前语言环境 */
9
9
  locale?: string;
10
+ getSymbolic?: () => string;
10
11
  }
11
12
  declare const PisellConfigProvider: React.FC<PisellConfigProviderType>;
12
13
  export default PisellConfigProvider;
@@ -1,5 +1,5 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["value", "onChange", "defaultValue", "originValue", "selectType"];
2
+ var _excluded = ["value", "onChange", "defaultValue", "originValue", "selectType", "resetText", "doneText"];
3
3
  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); }
4
4
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
5
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -31,6 +31,8 @@ var PisellAdjustPrice = function PisellAdjustPrice(props) {
31
31
  originValue = props.originValue,
32
32
  _props$selectType = props.selectType,
33
33
  selectType = _props$selectType === void 0 ? 'light' : _props$selectType,
34
+ resetText = props.resetText,
35
+ doneText = props.doneText,
34
36
  others = _objectWithoutProperties(props, _excluded);
35
37
  var config = usePisellConfig();
36
38
  var _useState = useState(value || 0),
@@ -177,6 +179,8 @@ var PisellAdjustPrice = function PisellAdjustPrice(props) {
177
179
  onChange: handleChange,
178
180
  onEnter: handleEnter,
179
181
  placeholder: discountMode === 'amount' ? '0' : '%',
182
+ resetText: resetText,
183
+ doneText: doneText,
180
184
  rightItemsStyle: {
181
185
  buttonBackgroundColor: configColor.buttonBackgroundColor,
182
186
  textColor: configColor.textColor,
@@ -17,4 +17,6 @@ export interface PisellAdjustPriceProps {
17
17
  mainTextColor?: string;
18
18
  isShowSubText?: boolean;
19
19
  subTextColor?: string;
20
+ resetText?: string;
21
+ doneText?: string;
20
22
  }
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { PisellCheckboxGroupProps } from '../pisellCheckboxGroup';
3
3
  import { PisellContextType } from '../pisell-config-provider/context';
4
- import { PisellWalletPassCardProps } from '../pisellWalletPassCard';
4
+ import { PisellWalletPassCardProps, FormatOption } from '../pisellWalletPassCard';
5
5
  import './index.less';
6
6
  export interface PisellCardListProps extends Omit<PisellCheckboxGroupProps, 'options'> {
7
7
  platform?: PisellContextType['platform'];
@@ -71,7 +71,37 @@ export interface PisellCardListProps extends Omit<PisellCheckboxGroupProps, 'opt
71
71
  /** 编辑编辑按钮后,弹窗展示之前 */
72
72
  beforeEdit?: (value: any, index: number) => Promise<any> | boolean | void;
73
73
  /** 编辑弹窗点击提交 */
74
- onConfirmEdit?: (value: any, index: number) => void;
74
+ onConfirmEdit?: (value: any, index: number, data: any) => void;
75
+ /** 是否展示状态标识 */
76
+ showStatus?: boolean;
77
+ /** 名称标题字号字重颜色配置 */
78
+ nameTitleStyle?: {
79
+ fontSize: number;
80
+ fontWeight: number;
81
+ color: string;
82
+ };
83
+ /** 开启编辑金额 */
84
+ enableEditAmount?: boolean;
85
+ /** 编辑金额事件 */
86
+ onConfirmEditAmount?: (value: number, index: number, data: any) => void;
87
+ /** 是否使用外部详情处理 */
88
+ useExternalDetail?: boolean;
89
+ /** 详情事件 */
90
+ onDetail?: (value: any, index: number) => void;
91
+ /** 自定义余额格式化函数,如果提供则优先使用 */
92
+ formatBalance?: (balance?: number, option?: FormatOption) => React.ReactNode;
93
+ /** 自定义余额标题格式化函数,如果提供则优先使用 */
94
+ formatBalanceTitle?: (balanceTitle?: string, option?: FormatOption) => React.ReactNode;
95
+ /** 自定义使用金额格式化函数,如果提供则优先使用 */
96
+ formatRedeem?: (redeem?: number, option?: FormatOption) => React.ReactNode;
97
+ /** 自定义使用金额标题格式化函数,如果提供则优先使用 */
98
+ formatRedeemTitle?: (redeemTitle?: string, option?: FormatOption) => React.ReactNode;
99
+ /** 编辑金额前事件 */
100
+ onBeforeEditAmount?: (value: any, index: number, data: any) => Promise<any> | boolean | void;
101
+ /** 选项点击事件 */
102
+ onItemClick?: (e: React.MouseEvent<HTMLDivElement>, option: any) => void;
103
+ /** 是否展示选中状态的背景色 */
104
+ showActiveBackground?: boolean;
75
105
  }
76
106
  declare const _default: React.NamedExoticComponent<PisellCardListProps>;
77
107
  export default _default;
@@ -39,6 +39,18 @@ var PisellCardList = function PisellCardList(props) {
39
39
  showEmpty = props.showEmpty,
40
40
  showBalanceSymbol = props.showBalanceSymbol,
41
41
  onChangeDebounce = props.onChangeDebounce,
42
+ showStatus = props.showStatus,
43
+ nameTitleStyle = props.nameTitleStyle,
44
+ enableEditAmount = props.enableEditAmount,
45
+ useExternalDetail = props.useExternalDetail,
46
+ onDetail = props.onDetail,
47
+ formatBalance = props.formatBalance,
48
+ formatBalanceTitle = props.formatBalanceTitle,
49
+ formatRedeem = props.formatRedeem,
50
+ formatRedeemTitle = props.formatRedeemTitle,
51
+ onBeforeEditAmount = props.onBeforeEditAmount,
52
+ onItemClick = props.onItemClick,
53
+ showActiveBackground = props.showActiveBackground,
42
54
  validDateBySchedule = props.validDateBySchedule,
43
55
  scheduleList = props.scheduleList;
44
56
  return data.length ? /*#__PURE__*/React.createElement(PisellCheckboxGroup, {
@@ -52,9 +64,16 @@ var PisellCardList = function PisellCardList(props) {
52
64
  iconPosition: "hide",
53
65
  fullWidth: fullWidth,
54
66
  onChangeDebounce: onChangeDebounce,
67
+ onItemClick: onItemClick,
68
+ showActiveBackground: showActiveBackground,
55
69
  renderOption: function renderOption(item, active, index) {
56
70
  return /*#__PURE__*/React.createElement(PisellWalletPassCard, _extends({}, item, {
57
71
  active: active,
72
+ mode: mode,
73
+ showActiveIcon: true,
74
+ showStatus: showStatus || (item === null || item === void 0 ? void 0 : item.showStatus),
75
+ cardStatus: item === null || item === void 0 ? void 0 : item.cardStatus,
76
+ nameTitleStyle: nameTitleStyle || (item === null || item === void 0 ? void 0 : item.nameTitleStyle),
58
77
  showName: showName || (item === null || item === void 0 ? void 0 : item.showName),
59
78
  showBalance: showBalance || (item === null || item === void 0 ? void 0 : item.showBalance),
60
79
  showCode: showCode || (item === null || item === void 0 ? void 0 : item.showCode),
@@ -67,20 +86,38 @@ var PisellCardList = function PisellCardList(props) {
67
86
  showBalanceSymbol: showBalanceSymbol || (item === null || item === void 0 ? void 0 : item.showBalanceSymbol),
68
87
  showActions: props.showActions || (item === null || item === void 0 ? void 0 : item.showActions),
69
88
  actions: props.actions || (item === null || item === void 0 ? void 0 : item.actions),
89
+ enableEditAmount: enableEditAmount || (item === null || item === void 0 ? void 0 : item.enableEditAmount),
90
+ useExternalDetail: useExternalDetail || (item === null || item === void 0 ? void 0 : item.useExternalDetail),
91
+ onDetail: function onDetail(record) {
92
+ var _props$onDetail;
93
+ return props === null || props === void 0 || (_props$onDetail = props.onDetail) === null || _props$onDetail === void 0 ? void 0 : _props$onDetail.call(props, record, index);
94
+ },
70
95
  validDateBySchedule: validDateBySchedule || (item === null || item === void 0 ? void 0 : item.validDateBySchedule),
71
96
  scheduleList: scheduleList || (item === null || item === void 0 ? void 0 : item.scheduleList),
72
97
  beforeEdit: function beforeEdit(record) {
73
98
  var _props$beforeEdit;
74
99
  return props === null || props === void 0 || (_props$beforeEdit = props.beforeEdit) === null || _props$beforeEdit === void 0 ? void 0 : _props$beforeEdit.call(props, record, index);
75
100
  },
101
+ onConfirmEditAmount: function onConfirmEditAmount(value) {
102
+ var _props$onConfirmEditA;
103
+ (_props$onConfirmEditA = props.onConfirmEditAmount) === null || _props$onConfirmEditA === void 0 || _props$onConfirmEditA.call(props, value, index, item);
104
+ },
76
105
  onConfirmEdit: function onConfirmEdit(newVal) {
77
106
  var _props$onConfirmEdit;
78
- (_props$onConfirmEdit = props.onConfirmEdit) === null || _props$onConfirmEdit === void 0 || _props$onConfirmEdit.call(props, newVal, index);
107
+ (_props$onConfirmEdit = props.onConfirmEdit) === null || _props$onConfirmEdit === void 0 || _props$onConfirmEdit.call(props, newVal, index, item);
79
108
  },
109
+ formatBalance: formatBalance || (item === null || item === void 0 ? void 0 : item.formatBalance),
110
+ formatBalanceTitle: formatBalanceTitle || (item === null || item === void 0 ? void 0 : item.formatBalanceTitle),
80
111
  type: type,
81
112
  style: direction === 'vertical' || direction === 'horizontal' && fullWidth ? {
82
113
  width: '100%'
83
- } : {}
114
+ } : {},
115
+ formatRedeem: formatRedeem || (item === null || item === void 0 ? void 0 : item.formatRedeem),
116
+ formatRedeemTitle: formatRedeemTitle || (item === null || item === void 0 ? void 0 : item.formatRedeemTitle),
117
+ onBeforeEditAmount: function onBeforeEditAmount(record) {
118
+ var _props$onBeforeEditAm;
119
+ return props === null || props === void 0 || (_props$onBeforeEditAm = props.onBeforeEditAmount) === null || _props$onBeforeEditAm === void 0 ? void 0 : _props$onBeforeEditAm.call(props, record, index, item);
120
+ }
84
121
  }));
85
122
  }
86
123
  }) : showEmpty && (empty || /*#__PURE__*/React.createElement(PisellEmpty, null));
@@ -72,4 +72,12 @@
72
72
  // .pisell-card-disabled {
73
73
  // color: var(--Gray-500, #667085);
74
74
  // padding-bottom: 36px;
75
- // }
75
+ // }
76
+
77
+ .keyboard-modal-wrapper {
78
+ .pisell-amount-keyboard-wrap {
79
+ padding: 10px;
80
+ background: rgba(29, 41, 57, .8) !important;
81
+ border-radius: 10px;
82
+ }
83
+ }
@@ -5,6 +5,7 @@ export interface PisellCheckboxGroupOption {
5
5
  label: string;
6
6
  value: string;
7
7
  disabled?: boolean;
8
+ error?: boolean;
8
9
  [key: string]: any;
9
10
  }
10
11
  declare type PisellCheckboxGroupValue = string | string[] | any;
@@ -24,6 +25,8 @@ export interface PisellCheckboxGroupProps extends React.HTMLAttributes<HTMLDivEl
24
25
  optionClassName?: string;
25
26
  optionActiveClassName?: string;
26
27
  onChangeDebounce?: boolean;
28
+ onItemClick?: (e: React.MouseEvent<HTMLDivElement>, option: PisellCheckboxGroupOption) => void;
29
+ showActiveBackground?: boolean;
27
30
  }
28
31
  /**
29
32
  * @title: PisellCheckboxGroup
@@ -1,5 +1,5 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["platform", "gap", "style", "options", "onChange", "value", "renderOption", "padding", "rowKey", "mode", "direction", "fullWidth", "iconPosition", "optionClassName", "optionActiveClassName", "onChangeDebounce"];
2
+ var _excluded = ["platform", "gap", "style", "options", "onChange", "value", "renderOption", "padding", "rowKey", "mode", "direction", "fullWidth", "iconPosition", "optionClassName", "optionActiveClassName", "onChangeDebounce", "onItemClick", "showActiveBackground"];
3
3
  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); }
4
4
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
5
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -65,6 +65,9 @@ var PisellCheckboxGroup = function PisellCheckboxGroup(props) {
65
65
  optionClassName = props.optionClassName,
66
66
  optionActiveClassName = props.optionActiveClassName,
67
67
  onChangeDebounce = props.onChangeDebounce,
68
+ onItemClick = props.onItemClick,
69
+ _props$showActiveBack = props.showActiveBackground,
70
+ showActiveBackground = _props$showActiveBack === void 0 ? false : _props$showActiveBack,
68
71
  rest = _objectWithoutProperties(props, _excluded);
69
72
  var _useState = useState([]),
70
73
  _useState2 = _slicedToArray(_useState, 2),
@@ -183,13 +186,15 @@ var PisellCheckboxGroup = function PisellCheckboxGroup(props) {
183
186
  }), options.map(function (option, index) {
184
187
  var active = _value.includes(option[rowKey]);
185
188
  return /*#__PURE__*/React.createElement(PisellRow, {
186
- className: classNames('pisell-checkbox-group-item', optionClassName, _defineProperty({
187
- 'pisell-checkbox-group-item-active': active
188
- }, optionActiveClassName, active)),
189
+ className: classNames('pisell-checkbox-group-item', optionClassName, _defineProperty(_defineProperty({
190
+ 'pisell-checkbox-group-item-active': active,
191
+ 'pisell-checkbox-group-item-with-background': active && showActiveBackground
192
+ }, optionActiveClassName, active), 'pisell-checkbox-group-item-error', option.error)),
189
193
  key: option[rowKey],
190
194
  gap: 10,
191
195
  style: rowStyle,
192
196
  onClick: function onClick(e) {
197
+ onItemClick === null || onItemClick === void 0 || onItemClick(e, option);
193
198
  if (option.disabled) return;
194
199
  if (onChangeDebounce) {
195
200
  run(option[rowKey], option);
@@ -24,10 +24,37 @@
24
24
 
25
25
  &.pisell-checkbox-group-item-active {
26
26
  &::before {
27
- border-width: 2px;
27
+ border-width: 4px;
28
28
  border-color: var(--theme-color);
29
+ z-index: 1;
30
+ box-sizing: border-box;
31
+ }
32
+
33
+ // 可选的背景色样式,需要额外的类名才会应用
34
+ &.pisell-checkbox-group-item-with-background {
35
+ &::before {
36
+ background: var(--Primary-50, #F9F5FF);
37
+ }
38
+ }
39
+ .pisell-row-center {
40
+ .pisell-row {
41
+ position: relative;
42
+ z-index: 1;
43
+ }
44
+ }
45
+ .pisell-row-right {
46
+ position: relative;
47
+ z-index: 1;
29
48
  }
49
+ }
30
50
 
51
+ &.pisell-checkbox-group-item-error {
52
+ &::before {
53
+ border-color: var(--Error-500, #F04438);
54
+ border-width: 2px;
55
+ background: var(--Error-50, #FEF3F2);
56
+ z-index: 1;
57
+ }
31
58
  }
32
59
  }
33
60
  }
@@ -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;
@@ -44,6 +44,7 @@ export interface PisellGoodPassCardProps {
44
44
  style: React.CSSProperties;
45
45
  /**快捷展示排序 */
46
46
  mixedSort?: (val: Discount[]) => Discount[];
47
+ isInModal: boolean;
47
48
  }
48
49
  declare const index: (props: PisellGoodPassCardProps) => JSX.Element;
49
50
  export default index;
@@ -47,7 +47,7 @@ var index = function index(props) {
47
47
  var renderVoucherContent = function renderVoucherContent(item) {
48
48
  return /*#__PURE__*/React.createElement("span", {
49
49
  className: "voucher-item-content-save"
50
- }, getText('pisell2.text.goodpass.save'), " ", /*#__PURE__*/React.createElement(PisellText.Amount, {
50
+ }, getText('pisell2.text.goodpass.save'), ' ', /*#__PURE__*/React.createElement(PisellText.Amount, {
51
51
  value: item.savedAmount
52
52
  }));
53
53
  };
@@ -86,8 +86,8 @@ var index = function index(props) {
86
86
  }, /*#__PURE__*/React.createElement("div", {
87
87
  style: {
88
88
  padding: '10px 0',
89
- display: "flex",
90
- flexDirection: "column",
89
+ display: 'flex',
90
+ flexDirection: 'column',
91
91
  gap: 12
92
92
  }
93
93
  }, dataSource.map(renderVoucherItem)));
@@ -110,13 +110,25 @@ var index = function index(props) {
110
110
  className: "".concat(clsPrefix, "-body")
111
111
  }, list.map(renderVoucherItem)));
112
112
  };
113
- return /*#__PURE__*/React.createElement(React.Fragment, null, renderModal(), /*#__PURE__*/React.createElement(PisellCard, {
113
+ var renderModalMode = function renderModalMode() {
114
+ var sortList = (mixedSort === null || mixedSort === void 0 ? void 0 : mixedSort(dataSource)) || dataSource;
115
+ if (sortList.length === 0) return null;
116
+ return /*#__PURE__*/React.createElement("div", {
117
+ style: {
118
+ padding: '10px 0',
119
+ display: 'flex',
120
+ flexDirection: 'column',
121
+ gap: 12
122
+ }
123
+ }, sortList.map(renderVoucherItem));
124
+ };
125
+ return /*#__PURE__*/React.createElement(React.Fragment, null, !props.isInModal ? renderModal() : null, dataSource.length > 0 ? /*#__PURE__*/React.createElement(PisellCard, {
114
126
  padding: 8,
115
127
  borderRadius: 8,
116
128
  style: _objectSpread({
117
129
  width: 378
118
130
  }, style),
119
131
  className: clsPrefix
120
- }, renderMixedMode()));
132
+ }, props.isInModal ? renderModalMode() : renderMixedMode()) : null);
121
133
  };
122
134
  export default index;
@@ -14,7 +14,8 @@ var Amount = function Amount(props) {
14
14
  others = _objectWithoutProperties(props, _excluded);
15
15
  var config = usePisellConfig();
16
16
  var amount = useMemo(function () {
17
- return formatAmountWithOptions(value, symbol || (config === null || config === void 0 ? void 0 : config.symbol) || "", {
17
+ var _config$getSymbolic;
18
+ return formatAmountWithOptions(value, symbol || (config === null || config === void 0 ? void 0 : config.symbol) || (config === null || config === void 0 || (_config$getSymbolic = config.getSymbolic) === null || _config$getSymbolic === void 0 ? void 0 : _config$getSymbolic.call(config)) || "", {
18
19
  precision: precision,
19
20
  showCurrencySymbol: showCurrencySymbol,
20
21
  useThousandsSeparator: useThousandsSeparator,
@@ -13,4 +13,5 @@ export interface PisellToastProps {
13
13
  onClose?: () => void;
14
14
  }
15
15
  declare const PisellToast: (props: PisellToastProps) => void;
16
+ export { useToast } from './squareToast';
16
17
  export default PisellToast;
@@ -10,6 +10,9 @@ var PisellToast = function PisellToast(props) {
10
10
  actionText = props.actionText,
11
11
  onClose = props.onClose;
12
12
  var key = getUniqueId();
13
+ if (!message) {
14
+ return alert(content);
15
+ }
13
16
  message.open({
14
17
  key: key,
15
18
  content: /*#__PURE__*/React.createElement("div", {
@@ -29,4 +32,5 @@ var PisellToast = function PisellToast(props) {
29
32
  onClose: onClose
30
33
  });
31
34
  };
35
+ export { useToast } from "./squareToast";
32
36
  export default PisellToast;
@@ -0,0 +1,15 @@
1
+ import { clear, show, success, info, loading, fail, hide } from './methods';
2
+ import './index.less';
3
+ interface ToastInstance {
4
+ show: typeof show;
5
+ clear: typeof clear;
6
+ success: typeof success;
7
+ info: typeof info;
8
+ loading: typeof loading;
9
+ fail: typeof fail;
10
+ error: typeof fail;
11
+ hide: typeof hide;
12
+ }
13
+ declare const Toast: ToastInstance;
14
+ export declare const useToast: () => ToastInstance;
15
+ export default Toast;
@@ -0,0 +1,28 @@
1
+ import { useMemo } from 'react';
2
+ import { clear, show, success, info, loading, fail, hide } from "./methods";
3
+ import "./index.less";
4
+ var Toast = {
5
+ show: show,
6
+ clear: clear,
7
+ success: success,
8
+ info: info,
9
+ loading: loading,
10
+ fail: fail,
11
+ error: fail,
12
+ hide: hide
13
+ };
14
+ export var useToast = function useToast() {
15
+ return useMemo(function () {
16
+ return {
17
+ show: show,
18
+ clear: clear,
19
+ success: success,
20
+ info: info,
21
+ loading: loading,
22
+ fail: fail,
23
+ error: fail,
24
+ hide: hide
25
+ };
26
+ }, []);
27
+ };
28
+ export default Toast;
@@ -0,0 +1,60 @@
1
+ .pisell-square-toast-wrap {
2
+ pointer-events: none;
3
+ }
4
+
5
+ .pisell-square-toast-modal {
6
+ pointer-events: none;
7
+ user-select: none;
8
+ min-width: 190px;
9
+ min-height: 74px;
10
+
11
+ // Toast 容器
12
+ .pisell-square-toast {
13
+ min-width: 190px;
14
+ max-width: 201px;
15
+ display: flex;
16
+ align-items: center;
17
+ justify-content: center;
18
+ flex-direction: column;
19
+ padding: 32px 12px;
20
+ border-radius: 8px;
21
+ overflow: hidden;
22
+ background: rgba(0, 0, 0, 0.8);
23
+
24
+ .pisell-square-toast-icon-wrapper {
25
+ display: flex;
26
+ align-items: center;
27
+ justify-content: center;
28
+ margin-bottom: 11px;
29
+
30
+ .pisell-square-toast-icon {
31
+ font-size: 50px;
32
+ color: #ffffff;
33
+ width: 50px;
34
+ height: 50px;
35
+ display: flex;
36
+ align-items: center;
37
+ justify-content: center;
38
+
39
+ &-loading {
40
+ animation: fadenum 1s infinite linear;
41
+ }
42
+ }
43
+ }
44
+
45
+ // 内容区域
46
+ .pisell-square-toast-content {
47
+ font-size: 20px;
48
+ line-height: 1.5;
49
+ color: #ffffff;
50
+ text-align: center;
51
+ }
52
+ }
53
+ }
54
+
55
+ // loading 旋转动画
56
+ @keyframes fadenum {
57
+ to {
58
+ transform: rotate(360deg);
59
+ }
60
+ }
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { ToastProps } from './toast';
3
+ interface ToastInstance {
4
+ close: () => void;
5
+ }
6
+ declare const show: (configOrContent: Partial<ToastProps> | React.ReactNode, duration?: number, afterClose?: () => void) => ToastInstance;
7
+ declare const clear: () => void;
8
+ declare const success: (content: React.ReactNode, duration?: number, afterClose?: () => void) => ToastInstance;
9
+ declare const info: (content: React.ReactNode, duration?: number, afterClose?: () => void) => ToastInstance;
10
+ declare const loading: (content: React.ReactNode, duration?: number, afterClose?: () => void) => ToastInstance;
11
+ declare const fail: (content: React.ReactNode, duration?: number, afterClose?: () => void) => ToastInstance;
12
+ declare const hide: () => void;
13
+ export { show, clear, success, info, loading, fail, hide };