@pisell/materials 1.0.363 → 1.0.365

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 (294) hide show
  1. package/build/lowcode/assets/7b1c7af5ce9e37e4b40ea53fea6ccfd9.jpeg +0 -0
  2. package/build/lowcode/assets-daily.json +13 -13
  3. package/build/lowcode/assets-dev.json +4 -4
  4. package/build/lowcode/assets-prod.json +13 -13
  5. package/build/lowcode/index.js +1 -1
  6. package/build/lowcode/meta.js +2 -2
  7. package/build/lowcode/preview.js +142 -142
  8. package/build/lowcode/render/default/assets/7b1c7af5ce9e37e4b40ea53fea6ccfd9.jpeg +0 -0
  9. package/build/lowcode/render/default/view.css +1 -1
  10. package/build/lowcode/render/default/view.js +29 -27
  11. package/build/lowcode/view.css +1 -1
  12. package/build/lowcode/view.js +23 -21
  13. package/dist/umd/materials.min.css +1 -0
  14. package/dist/umd/materials.min.js +1 -0
  15. package/dist/umd/static/DotsSix.57d66266.svg +1 -0
  16. package/dist/umd/static/arrow-left.e542294f.svg +1 -0
  17. package/dist/umd/static/arrow-right.763f03e0.svg +1 -0
  18. package/dist/umd/static/filter-lines.04a54ae9.svg +1 -0
  19. package/dist/umd/static/help-circle.31c9be40.svg +1 -0
  20. package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +1 -0
  21. package/es/components/button/index.d.ts +4 -3
  22. package/es/components/button/index.js +14 -3
  23. package/es/components/iconfont/index.d.ts +2 -1
  24. package/es/components/iconfont/index.js +1 -1
  25. package/es/components/page/index.css +0 -0
  26. package/es/components/page/index.d.ts +2 -2
  27. package/es/components/page/index.js +208 -185
  28. package/es/components/pisell-config-provider/context.d.ts +16 -0
  29. package/es/components/pisell-config-provider/context.js +32 -0
  30. package/es/components/pisell-config-provider/hooks/usePisellConfig.d.ts +2 -0
  31. package/es/components/pisell-config-provider/hooks/usePisellConfig.js +7 -0
  32. package/es/components/pisell-config-provider/index.d.ts +9 -0
  33. package/es/components/pisell-config-provider/index.js +32 -0
  34. package/es/components/pisellCard/bg.jpeg +0 -0
  35. package/es/components/pisellCard/index.d.ts +47 -0
  36. package/es/components/pisellCard/index.js +84 -0
  37. package/es/components/pisellCard/index.less +89 -0
  38. package/es/components/pisellCardList/index.d.ts +23 -0
  39. package/es/components/pisellCardList/index.js +104 -0
  40. package/es/components/pisellCardList/index.less +75 -0
  41. package/es/components/pisellCheckboxGroup/index.d.ts +26 -0
  42. package/es/components/pisellCheckboxGroup/index.js +144 -0
  43. package/es/components/pisellCheckboxGroup/index.less +36 -0
  44. package/es/components/pisellCheckboxGroup/mock.d.ts +4 -0
  45. package/es/components/pisellCheckboxGroup/mock.js +16 -0
  46. package/es/components/pisellContainer/components/Portal/index.d.ts +10 -0
  47. package/es/components/pisellContainer/components/Portal/index.js +7 -0
  48. package/es/components/pisellContainer/containers.d.ts +1 -0
  49. package/es/components/pisellContainer/containers.js +8 -0
  50. package/es/components/pisellContainer/index.d.ts +22 -0
  51. package/es/components/pisellContainer/index.js +17 -0
  52. package/es/components/pisellCountdown/index.d.ts +24 -0
  53. package/es/components/pisellCountdown/index.js +44 -0
  54. package/es/components/pisellCountdown/utils.d.ts +1 -0
  55. package/es/components/pisellCountdown/utils.js +35 -0
  56. package/es/components/pisellDatePicker/datePickerCpt.d.ts +12 -0
  57. package/es/components/pisellDatePicker/datePickerCpt.js +131 -0
  58. package/es/components/pisellDatePicker/detePickerCpt.less +3 -0
  59. package/es/components/pisellDatePicker/index.d.ts +3 -0
  60. package/es/components/pisellDatePicker/index.js +17 -0
  61. package/es/components/pisellEmpty/index.d.ts +16 -0
  62. package/es/components/pisellEmpty/index.js +38 -0
  63. package/es/components/pisellEmpty/index.less +34 -0
  64. package/es/components/pisellInput/components/BankCard/cardPng/AMEX.png +0 -0
  65. package/es/components/pisellInput/components/BankCard/cardPng/Discover.png +0 -0
  66. package/es/components/pisellInput/components/BankCard/cardPng/JCB.png +0 -0
  67. package/es/components/pisellInput/components/BankCard/cardPng/MasterCard.png +0 -0
  68. package/es/components/pisellInput/components/BankCard/cardPng/UnionPay.png +0 -0
  69. package/es/components/pisellInput/components/BankCard/cardPng/VISA.png +0 -0
  70. package/es/components/pisellInput/components/BankCard/index.d.ts +11 -0
  71. package/es/components/pisellInput/components/BankCard/index.js +82 -0
  72. package/es/components/pisellInput/components/BankCard/index.less +4 -0
  73. package/es/components/pisellInput/components/BankCard/utils.d.ts +11 -0
  74. package/es/components/pisellInput/components/BankCard/utils.js +65 -0
  75. package/es/components/pisellInput/components/Copy/index.d.ts +11 -0
  76. package/es/components/pisellInput/components/Copy/index.js +53 -0
  77. package/es/components/pisellInput/components/SecurityCode/card.png +0 -0
  78. package/es/components/pisellInput/components/SecurityCode/index.d.ts +12 -0
  79. package/es/components/pisellInput/components/SecurityCode/index.js +46 -0
  80. package/es/components/pisellInput/components/SecurityCode/index.less +4 -0
  81. package/es/components/pisellInput/index.d.ts +13 -0
  82. package/es/components/pisellInput/index.js +15 -0
  83. package/es/components/pisellLoading/index.d.ts +15 -0
  84. package/es/components/pisellLoading/index.js +48 -0
  85. package/es/components/pisellLoading/index.less +35 -0
  86. package/es/components/pisellMessage/index.d.ts +4 -0
  87. package/es/components/pisellMessage/index.js +5 -0
  88. package/es/components/pisellModal/components/Information/index.d.ts +21 -0
  89. package/es/components/pisellModal/components/Information/index.js +23 -0
  90. package/es/components/pisellModal/components/Information/index.less +15 -0
  91. package/es/components/pisellModal/components/IpadModal/index.d.ts +6 -0
  92. package/es/components/pisellModal/components/IpadModal/index.js +6 -0
  93. package/es/components/pisellModal/components/MobileModal/index.d.ts +9 -0
  94. package/es/components/pisellModal/components/MobileModal/index.js +26 -0
  95. package/es/components/pisellModal/components/MobileModal/index.less +59 -0
  96. package/es/components/pisellModal/components/PcModal/index.d.ts +30 -0
  97. package/es/components/pisellModal/components/PcModal/index.js +129 -0
  98. package/es/components/pisellModal/components/PcModal/index.less +38 -0
  99. package/es/components/pisellModal/components/functions/index.d.ts +12 -0
  100. package/es/components/pisellModal/components/functions/index.js +44 -0
  101. package/es/components/pisellModal/components/functions/index.less +25 -0
  102. package/es/components/pisellModal/components/index.d.ts +10 -0
  103. package/es/components/pisellModal/components/index.js +9 -0
  104. package/es/components/pisellModal/constants.d.ts +6 -0
  105. package/es/components/pisellModal/constants.js +6 -0
  106. package/es/components/pisellModal/index.d.ts +43 -0
  107. package/es/components/pisellModal/index.js +30 -0
  108. package/es/components/pisellRow/index.d.ts +14 -0
  109. package/es/components/pisellRow/index.js +54 -0
  110. package/es/components/pisellRow/index.less +13 -0
  111. package/es/components/pisellText/components/Amount/index.d.ts +18 -0
  112. package/es/components/pisellText/components/Amount/index.js +25 -0
  113. package/es/components/pisellText/index.d.ts +8 -0
  114. package/es/components/pisellText/index.js +7 -0
  115. package/es/components/pisellToast/index.d.ts +16 -0
  116. package/es/components/pisellToast/index.js +32 -0
  117. package/es/components/pisellToast/index.less +26 -0
  118. package/es/components/pisellTooltip/index.d.ts +10 -0
  119. package/es/components/pisellTooltip/index.js +18 -0
  120. package/es/components/pisellTooltip/index.less +5 -0
  121. package/es/hooks/useCssVariables.d.ts +8 -0
  122. package/es/hooks/useCssVariables.js +21 -0
  123. package/es/index.d.ts +18 -0
  124. package/es/index.js +19 -1
  125. package/es/locales/en-US.d.ts +3 -0
  126. package/es/locales/en-US.js +5 -1
  127. package/es/locales/zh-CN.d.ts +3 -0
  128. package/es/locales/zh-CN.js +5 -1
  129. package/es/locales/zh-TW.d.ts +3 -0
  130. package/es/locales/zh-TW.js +5 -1
  131. package/es/utils/index.d.ts +1 -0
  132. package/es/utils/index.js +15 -1
  133. package/lib/components/button/index.d.ts +4 -3
  134. package/lib/components/button/index.js +13 -9
  135. package/lib/components/iconfont/index.d.ts +2 -1
  136. package/lib/components/iconfont/index.js +1 -1
  137. package/lib/components/page/index.css +0 -0
  138. package/lib/components/page/index.d.ts +2 -2
  139. package/lib/components/page/index.js +172 -159
  140. package/lib/components/pisell-config-provider/context.d.ts +16 -0
  141. package/lib/components/pisell-config-provider/context.js +49 -0
  142. package/lib/components/pisell-config-provider/hooks/usePisellConfig.d.ts +2 -0
  143. package/lib/components/pisell-config-provider/hooks/usePisellConfig.js +31 -0
  144. package/lib/components/pisell-config-provider/index.d.ts +9 -0
  145. package/lib/components/pisell-config-provider/index.js +61 -0
  146. package/lib/components/pisellCard/bg.jpeg +0 -0
  147. package/lib/components/pisellCard/index.d.ts +47 -0
  148. package/lib/components/pisellCard/index.js +97 -0
  149. package/lib/components/pisellCard/index.less +89 -0
  150. package/lib/components/pisellCardList/index.d.ts +23 -0
  151. package/lib/components/pisellCardList/index.js +146 -0
  152. package/lib/components/pisellCardList/index.less +75 -0
  153. package/lib/components/pisellCheckboxGroup/index.d.ts +26 -0
  154. package/lib/components/pisellCheckboxGroup/index.js +151 -0
  155. package/lib/components/pisellCheckboxGroup/index.less +36 -0
  156. package/lib/components/pisellCheckboxGroup/mock.d.ts +4 -0
  157. package/lib/components/pisellCheckboxGroup/mock.js +35 -0
  158. package/lib/components/pisellContainer/components/Portal/index.d.ts +10 -0
  159. package/lib/components/pisellContainer/components/Portal/index.js +40 -0
  160. package/lib/components/pisellContainer/containers.d.ts +1 -0
  161. package/lib/components/pisellContainer/containers.js +46 -0
  162. package/lib/components/pisellContainer/index.d.ts +22 -0
  163. package/lib/components/pisellContainer/index.js +49 -0
  164. package/lib/components/pisellCountdown/index.d.ts +24 -0
  165. package/lib/components/pisellCountdown/index.js +63 -0
  166. package/lib/components/pisellCountdown/utils.d.ts +1 -0
  167. package/lib/components/pisellCountdown/utils.js +60 -0
  168. package/lib/components/pisellDatePicker/datePickerCpt.d.ts +12 -0
  169. package/lib/components/pisellDatePicker/datePickerCpt.js +157 -0
  170. package/lib/components/pisellDatePicker/detePickerCpt.less +3 -0
  171. package/lib/components/pisellDatePicker/index.d.ts +3 -0
  172. package/lib/components/pisellDatePicker/index.js +48 -0
  173. package/lib/components/pisellEmpty/index.d.ts +16 -0
  174. package/lib/components/pisellEmpty/index.js +61 -0
  175. package/lib/components/pisellEmpty/index.less +34 -0
  176. package/lib/components/pisellInput/components/BankCard/cardPng/AMEX.png +0 -0
  177. package/lib/components/pisellInput/components/BankCard/cardPng/Discover.png +0 -0
  178. package/lib/components/pisellInput/components/BankCard/cardPng/JCB.png +0 -0
  179. package/lib/components/pisellInput/components/BankCard/cardPng/MasterCard.png +0 -0
  180. package/lib/components/pisellInput/components/BankCard/cardPng/UnionPay.png +0 -0
  181. package/lib/components/pisellInput/components/BankCard/cardPng/VISA.png +0 -0
  182. package/lib/components/pisellInput/components/BankCard/index.d.ts +11 -0
  183. package/lib/components/pisellInput/components/BankCard/index.js +98 -0
  184. package/lib/components/pisellInput/components/BankCard/index.less +4 -0
  185. package/lib/components/pisellInput/components/BankCard/utils.d.ts +11 -0
  186. package/lib/components/pisellInput/components/BankCard/utils.js +103 -0
  187. package/lib/components/pisellInput/components/Copy/index.d.ts +11 -0
  188. package/lib/components/pisellInput/components/Copy/index.js +61 -0
  189. package/lib/components/pisellInput/components/SecurityCode/card.png +0 -0
  190. package/lib/components/pisellInput/components/SecurityCode/index.d.ts +12 -0
  191. package/lib/components/pisellInput/components/SecurityCode/index.js +74 -0
  192. package/lib/components/pisellInput/components/SecurityCode/index.less +4 -0
  193. package/lib/components/pisellInput/index.d.ts +13 -0
  194. package/lib/components/pisellInput/index.js +46 -0
  195. package/lib/components/pisellLoading/index.d.ts +15 -0
  196. package/lib/components/pisellLoading/index.js +72 -0
  197. package/lib/components/pisellLoading/index.less +35 -0
  198. package/lib/components/pisellMessage/index.d.ts +4 -0
  199. package/lib/components/pisellMessage/index.js +34 -0
  200. package/lib/components/pisellModal/components/Information/index.d.ts +21 -0
  201. package/lib/components/pisellModal/components/Information/index.js +53 -0
  202. package/lib/components/pisellModal/components/Information/index.less +15 -0
  203. package/lib/components/pisellModal/components/IpadModal/index.d.ts +6 -0
  204. package/lib/components/pisellModal/components/IpadModal/index.js +40 -0
  205. package/lib/components/pisellModal/components/MobileModal/index.d.ts +9 -0
  206. package/lib/components/pisellModal/components/MobileModal/index.js +66 -0
  207. package/lib/components/pisellModal/components/MobileModal/index.less +59 -0
  208. package/lib/components/pisellModal/components/PcModal/index.d.ts +30 -0
  209. package/lib/components/pisellModal/components/PcModal/index.js +143 -0
  210. package/lib/components/pisellModal/components/PcModal/index.less +38 -0
  211. package/lib/components/pisellModal/components/functions/index.d.ts +12 -0
  212. package/lib/components/pisellModal/components/functions/index.js +90 -0
  213. package/lib/components/pisellModal/components/functions/index.less +25 -0
  214. package/lib/components/pisellModal/components/index.d.ts +10 -0
  215. package/lib/components/pisellModal/components/index.js +52 -0
  216. package/lib/components/pisellModal/constants.d.ts +6 -0
  217. package/lib/components/pisellModal/constants.js +33 -0
  218. package/lib/components/pisellModal/index.d.ts +43 -0
  219. package/lib/components/pisellModal/index.js +63 -0
  220. package/lib/components/pisellRow/index.d.ts +14 -0
  221. package/lib/components/pisellRow/index.js +85 -0
  222. package/lib/components/pisellRow/index.less +13 -0
  223. package/lib/components/pisellText/components/Amount/index.d.ts +18 -0
  224. package/lib/components/pisellText/components/Amount/index.js +64 -0
  225. package/lib/components/pisellText/index.d.ts +8 -0
  226. package/lib/components/pisellText/index.js +41 -0
  227. package/lib/components/pisellToast/index.d.ts +16 -0
  228. package/lib/components/pisellToast/index.js +59 -0
  229. package/lib/components/pisellToast/index.less +26 -0
  230. package/lib/components/pisellTooltip/index.d.ts +10 -0
  231. package/lib/components/pisellTooltip/index.js +56 -0
  232. package/lib/components/pisellTooltip/index.less +5 -0
  233. package/lib/hooks/useCssVariables.d.ts +8 -0
  234. package/lib/hooks/useCssVariables.js +36 -0
  235. package/lib/index.d.ts +18 -0
  236. package/lib/index.js +54 -0
  237. package/lib/locales/en-US.d.ts +3 -0
  238. package/lib/locales/en-US.js +5 -1
  239. package/lib/locales/zh-CN.d.ts +3 -0
  240. package/lib/locales/zh-CN.js +5 -1
  241. package/lib/locales/zh-TW.d.ts +3 -0
  242. package/lib/locales/zh-TW.js +5 -1
  243. package/lib/utils/index.d.ts +1 -0
  244. package/lib/utils/index.js +16 -0
  245. package/lowcode/_utils/transform-meta.ts +31 -10
  246. package/lowcode/button/__screenshots__/pisell-modal-information.png +0 -0
  247. package/lowcode/button/meta.ts +30 -0
  248. package/lowcode/button/snippets.ts +28 -0
  249. package/lowcode/information-modal/meta.ts +44 -1
  250. package/lowcode/modal/meta.ts +1 -1
  251. package/lowcode/pisell-card/meta.ts +189 -0
  252. package/lowcode/pisell-card/snippets.ts +20 -0
  253. package/lowcode/pisell-card-list/meta.ts +145 -0
  254. package/lowcode/pisell-card-list/snippets.ts +9 -0
  255. package/lowcode/pisell-checkbox-group/meta.ts +112 -0
  256. package/lowcode/pisell-checkbox-group/snippets.ts +13 -0
  257. package/lowcode/pisell-container/meta.ts +71 -0
  258. package/lowcode/pisell-container/snippets.ts +14 -0
  259. package/lowcode/pisell-countdown/meta.ts +71 -0
  260. package/lowcode/pisell-countdown/snippets.ts +12 -0
  261. package/lowcode/pisell-date-picker/meta.ts +76 -0
  262. package/lowcode/pisell-date-picker/snippets.ts +9 -0
  263. package/lowcode/pisell-empty/__screenshots__/empty-1.png +0 -0
  264. package/lowcode/pisell-empty/meta.ts +85 -0
  265. package/lowcode/pisell-empty/snippets.ts +10 -0
  266. package/lowcode/pisell-input/__screenshots__/input-1.png +0 -0
  267. package/lowcode/pisell-input/meta.ts +193 -0
  268. package/lowcode/pisell-input/snippets.ts +11 -0
  269. package/lowcode/pisell-input.bank-card-input/__screenshots__/pisell-input.bank-card-input.png +0 -0
  270. package/lowcode/pisell-input.bank-card-input/meta.ts +62 -0
  271. package/lowcode/pisell-input.bank-card-input/snippets.ts +11 -0
  272. package/lowcode/pisell-input.copy/meta.ts +73 -0
  273. package/lowcode/pisell-input.copy/snippets.ts +10 -0
  274. package/lowcode/pisell-input.security-code/__screenshots__/pisell-input.security-code.png +0 -0
  275. package/lowcode/pisell-input.security-code/meta.ts +92 -0
  276. package/lowcode/pisell-input.security-code/snippets.ts +11 -0
  277. package/lowcode/pisell-loading/meta.ts +98 -0
  278. package/lowcode/pisell-loading/snippets.ts +11 -0
  279. package/lowcode/pisell-modal/__screenshots__/modal-1.png +0 -0
  280. package/lowcode/pisell-modal/__screenshots__/modal-2.png +0 -0
  281. package/lowcode/pisell-modal/meta.ts +200 -0
  282. package/lowcode/pisell-modal/snippets.ts +38 -0
  283. package/lowcode/pisell-modal.information/__screenshots__/pisell-modal.information.png +0 -0
  284. package/lowcode/pisell-modal.information/meta.ts +109 -0
  285. package/lowcode/pisell-modal.information/snippets.ts +17 -0
  286. package/lowcode/pisell-row/meta.ts +127 -0
  287. package/lowcode/pisell-row/snippets.ts +24 -0
  288. package/lowcode/pisell-text/meta.ts +8117 -0
  289. package/lowcode/pisell-text.amount/meta.ts +61 -0
  290. package/lowcode/pisell-text.amount/snippets.ts +15 -0
  291. package/lowcode/pisell-tooltip/__screenshots__/tooltip-1.jpg +0 -0
  292. package/lowcode/pisell-tooltip/meta.ts +306 -0
  293. package/lowcode/pisell-tooltip/snippets.ts +12 -0
  294. package/package.json +3 -3
@@ -0,0 +1,53 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
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 _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
4
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
5
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
6
+ import React, { useRef } from 'react';
7
+ import { Button, message, Space } from 'antd';
8
+ import { copyToClipboard } from '@pisell/utils';
9
+ import Input from "../../../input";
10
+ import Icon from "../../../icon";
11
+ import { getText } from "../../../../locales";
12
+ var Copy = function Copy(props) {
13
+ var _props$disabled;
14
+ var buttonProps = props.buttonProps;
15
+ var inputRef = useRef(null);
16
+ var handleCopyClick = /*#__PURE__*/function () {
17
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(e) {
18
+ var _buttonProps$onClick, _inputRef$current, _inputRef$current$inp;
19
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
20
+ while (1) switch (_context.prev = _context.next) {
21
+ case 0:
22
+ buttonProps === null || buttonProps === void 0 ? void 0 : (_buttonProps$onClick = buttonProps.onClick) === null || _buttonProps$onClick === void 0 ? void 0 : _buttonProps$onClick.call(buttonProps, e);
23
+ _context.next = 3;
24
+ return copyToClipboard(((_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : (_inputRef$current$inp = _inputRef$current.input) === null || _inputRef$current$inp === void 0 ? void 0 : _inputRef$current$inp.value) || '');
25
+ case 3:
26
+ message.success(getText('pisell-input-copy-success'));
27
+ case 4:
28
+ case "end":
29
+ return _context.stop();
30
+ }
31
+ }, _callee);
32
+ }));
33
+ return function handleCopyClick(_x) {
34
+ return _ref.apply(this, arguments);
35
+ };
36
+ }();
37
+ return /*#__PURE__*/React.createElement(Space.Compact, {
38
+ block: true
39
+ }, /*#__PURE__*/React.createElement(Input, _extends({}, props, {
40
+ ref: inputRef,
41
+ disabled: (_props$disabled = props.disabled) !== null && _props$disabled !== void 0 ? _props$disabled : true,
42
+ size: "large"
43
+ })), /*#__PURE__*/React.createElement(Button, _extends({
44
+ size: "large",
45
+ icon: /*#__PURE__*/React.createElement(Icon, {
46
+ type: "pisell2-copy-03"
47
+ })
48
+ }, buttonProps, {
49
+ onClick: handleCopyClick,
50
+ children: (buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.children) || getText('pisell-input-copy')
51
+ })));
52
+ };
53
+ export default Copy;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { InputProps } from 'antd';
3
+ import './index.less';
4
+ import { PisellContextType } from "../../../pisell-config-provider/context";
5
+ export interface SecurityCodeProps extends Omit<InputProps, 'onChange'> {
6
+ /** 平台 */
7
+ platform?: PisellContextType['platform'];
8
+ onChange?: (val: string) => void;
9
+ showCVCIcon?: boolean;
10
+ }
11
+ declare const SecurityCode: (props: SecurityCodeProps) => React.JSX.Element;
12
+ export default SecurityCode;
@@ -0,0 +1,46 @@
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); }
2
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
3
+ 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."); }
4
+ 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); }
5
+ 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; }
6
+ 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; } }
7
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
8
+ import React from 'react';
9
+ import { useControllableValue } from 'ahooks';
10
+ import Input from "../../../input";
11
+ // @ts-ignore
12
+ import card from "./card.png";
13
+ import "./index.less";
14
+ var SecurityCode = function SecurityCode(props) {
15
+ var maxLength = props.maxLength,
16
+ _props$showCVCIcon = props.showCVCIcon,
17
+ showCVCIcon = _props$showCVCIcon === void 0 ? true : _props$showCVCIcon;
18
+ var _useControllableValue = useControllableValue(props, {
19
+ defaultValue: ''
20
+ }),
21
+ _useControllableValue2 = _slicedToArray(_useControllableValue, 2),
22
+ state = _useControllableValue2[0],
23
+ setState = _useControllableValue2[1];
24
+ var handleChange = function handleChange(e) {
25
+ var value = e.target.value;
26
+ var numberValue = value.replace(/\D/g, '');
27
+ if (maxLength) {
28
+ numberValue = numberValue.slice(0, maxLength);
29
+ }
30
+ setState === null || setState === void 0 ? void 0 : setState(numberValue);
31
+ };
32
+ return /*#__PURE__*/React.createElement(Input, _extends({}, props, {
33
+ value: state,
34
+ onChange: handleChange,
35
+ maxLength: maxLength,
36
+ size: 'large',
37
+ placeholder: 'CVC',
38
+ type: "number",
39
+ suffix: showCVCIcon && /*#__PURE__*/React.createElement("img", {
40
+ className: "pisell-security-code-suffix",
41
+ src: card,
42
+ alt: "security code img"
43
+ })
44
+ }));
45
+ };
46
+ export default SecurityCode;
@@ -0,0 +1,4 @@
1
+ .pisell-security-code-suffix {
2
+ width: 34px;
3
+ height: 24px;
4
+ }
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { InputProps } from 'antd';
3
+ import { PisellContextType } from '../pisell-config-provider/context';
4
+ declare const PisellInput: {
5
+ (props: InputProps & {
6
+ /** 平台 */
7
+ platform?: PisellContextType['platform'];
8
+ }): React.JSX.Element;
9
+ BankCard: (props: import("./components/BankCard").BankCardProps) => React.JSX.Element;
10
+ SecurityCode: (props: import("./components/SecurityCode").SecurityCodeProps) => React.JSX.Element;
11
+ Copy: (props: import("./components/Copy").CopyProps) => React.JSX.Element;
12
+ };
13
+ export default PisellInput;
@@ -0,0 +1,15 @@
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); }
2
+ import React from 'react';
3
+ import Input from "../input";
4
+ import BankCard from "./components/BankCard";
5
+ import SecurityCode from "./components/SecurityCode";
6
+ import Copy from "./components/Copy";
7
+ var PisellInput = function PisellInput(props) {
8
+ return /*#__PURE__*/React.createElement(Input, _extends({}, props, {
9
+ size: props.size || 'large'
10
+ }));
11
+ };
12
+ PisellInput.BankCard = BankCard;
13
+ PisellInput.SecurityCode = SecurityCode;
14
+ PisellInput.Copy = Copy;
15
+ export default PisellInput;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { SpinProps } from 'antd';
3
+ import './index.less';
4
+ declare type MaskType = {
5
+ width: number | string;
6
+ height: number | string;
7
+ backgroundColor: string;
8
+ };
9
+ export interface PisellLoadingProps extends SpinProps {
10
+ loading: boolean;
11
+ mask?: boolean | MaskType;
12
+ fullscreen?: boolean;
13
+ }
14
+ declare const PisellLoading: (props: PisellLoadingProps) => React.JSX.Element;
15
+ export default PisellLoading;
@@ -0,0 +1,48 @@
1
+ import React, { useEffect, useRef } from 'react';
2
+ import { Spin } from 'antd';
3
+ import IconFont from "../iconfont";
4
+ import useCssVariables from "../../hooks/useCssVariables";
5
+ import { getCssNumber } from "../../utils";
6
+ import "./index.less";
7
+ var PisellLoading = function PisellLoading(props) {
8
+ var children = props.children,
9
+ fullscreen = props.fullscreen,
10
+ mask = props.mask,
11
+ loading = props.loading;
12
+ var ref = useRef(null);
13
+ var _ref = mask || {},
14
+ _ref$backgroundColor = _ref.backgroundColor,
15
+ backgroundColor = _ref$backgroundColor === void 0 ? '#fff' : _ref$backgroundColor,
16
+ _ref$width = _ref.width,
17
+ width = _ref$width === void 0 ? '100%' : _ref$width,
18
+ _ref$height = _ref.height,
19
+ height = _ref$height === void 0 ? '100%' : _ref$height;
20
+ useCssVariables({
21
+ variables: {
22
+ '--pisell-loading-mask-opacity': mask ? '1' : '0',
23
+ '--pisell-loading-bg-color': fullscreen && !mask ? 'transparent' : backgroundColor,
24
+ '--pisell-loading-bg-width': getCssNumber(width) || '100%',
25
+ '--pisell-loading-bg-height': getCssNumber(height) || '100%',
26
+ '--pisell-loading-bg-border-radius': width !== '100%' || height !== '100%' ? '12px' : '0px'
27
+ },
28
+ ref: ref
29
+ });
30
+ useEffect(function () {
31
+ document.body.id = 'body';
32
+ }, []);
33
+ return /*#__PURE__*/React.createElement("div", {
34
+ ref: ref,
35
+ className: 'pisell-loading-wrapper'
36
+ }, /*#__PURE__*/React.createElement(Spin, {
37
+ fullscreen: fullscreen,
38
+ spinning: loading,
39
+ indicator: /*#__PURE__*/React.createElement(IconFont, {
40
+ type: 'pisell2-loader2',
41
+ style: {
42
+ fontSize: 40
43
+ },
44
+ spin: true
45
+ })
46
+ }, children));
47
+ };
48
+ export default PisellLoading;
@@ -0,0 +1,35 @@
1
+ .pisell-loading-wrapper {
2
+ .pisell-lowcode-spin-spinning {
3
+ z-index: 11;
4
+ }
5
+ .pisell-lowcode-spin-fullscreen {
6
+ background-color: var(--pisell-loading-bg-color);
7
+ width: var(--pisell-loading-bg-width);
8
+ height: var(--pisell-loading-bg-height);
9
+ border-radius: var(--pisell-loading-bg-border-radius);
10
+ top: 50%;
11
+ left: 50%;
12
+ transform: translate(-50%, -50%);
13
+ .pisell-lowcode-spin-dot {
14
+ transform: none;
15
+ margin: 0;
16
+ }
17
+ }
18
+ .pisell-lowcode-spin-dot {
19
+ transform: translate(-50%, -50%);
20
+ margin: 0;
21
+ }
22
+ .pisell-lowcode-spin-blur {
23
+ opacity: 1;
24
+ }
25
+ .pisell-lowcode-spin-blur::after {
26
+ opacity: var(--pisell-loading-mask-opacity);
27
+ background-color: var(--pisell-loading-bg-color);
28
+ width: var(--pisell-loading-bg-width);
29
+ height: var(--pisell-loading-bg-height);
30
+ border-radius: var(--pisell-loading-bg-border-radius);
31
+ top: 50%;
32
+ left: 50%;
33
+ transform: translate(-50%, -50%);
34
+ }
35
+ }
@@ -0,0 +1,4 @@
1
+ import type { MessageInstance } from 'antd/es/message/interface';
2
+ declare let message: MessageInstance;
3
+ declare const setMessage: (m: MessageInstance) => void;
4
+ export { message, setMessage };
@@ -0,0 +1,5 @@
1
+ var message;
2
+ var setMessage = function setMessage(m) {
3
+ message = m;
4
+ };
5
+ export { message, setMessage };
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import { PisellModalProps } from '../../index';
3
+ import './index.less';
4
+ export interface InformationProps extends PisellModalProps {
5
+ /** 标题 */
6
+ title: string;
7
+ /** 描述 */
8
+ describe: string;
9
+ /** 取消按钮是否展示 */
10
+ cancelVisible?: boolean;
11
+ /** 确认按钮是否展示 */
12
+ okVisible?: boolean;
13
+ /** 确认按钮文字 */
14
+ okText: React.ReactNode;
15
+ /** 取消按钮文字 */
16
+ cancelText: React.ReactNode;
17
+ /** 右上角关闭按钮是否展示 */
18
+ closable?: boolean;
19
+ }
20
+ declare const Information: (props: InformationProps) => React.JSX.Element;
21
+ export default Information;
@@ -0,0 +1,23 @@
1
+ var _excluded = ["title", "describe"];
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 _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; }
4
+ 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; }
5
+ import React from 'react';
6
+ import PisellModal from "../../index";
7
+ import "./index.less";
8
+ var Information = function Information(props) {
9
+ var title = props.title,
10
+ describe = props.describe,
11
+ others = _objectWithoutProperties(props, _excluded);
12
+ return /*#__PURE__*/React.createElement(PisellModal, _extends({}, others, {
13
+ mobileModalHeight: 230,
14
+ headerDivider: false,
15
+ footerDivider: false,
16
+ size: "small"
17
+ }), /*#__PURE__*/React.createElement("div", {
18
+ className: "pisell-modal-information-title"
19
+ }, title), /*#__PURE__*/React.createElement("div", {
20
+ className: "pisell-modal-information-describe"
21
+ }, describe));
22
+ };
23
+ export default Information;
@@ -0,0 +1,15 @@
1
+ .pisell-modal-information-title {
2
+ color: var(--Gray-900, #101828);
3
+ font-size: 18px;
4
+ font-style: normal;
5
+ font-weight: 600;
6
+ line-height: 28px; /* 155.556% */
7
+ margin-bottom: 4px;
8
+ }
9
+ .pisell-modal-information-describe {
10
+ color: var(--Gray-900, #101828);
11
+ font-size: 14px;
12
+ font-style: normal;
13
+ font-weight: 400;
14
+ line-height: 20px; /* 142.857% */
15
+ }
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { PcModalProps } from '../PcModal';
3
+ export interface IpadModalProps extends PcModalProps {
4
+ }
5
+ declare const IpadModal: (props: IpadModalProps) => React.JSX.Element;
6
+ export default IpadModal;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import PcModal from "../PcModal";
3
+ var IpadModal = function IpadModal(props) {
4
+ return /*#__PURE__*/React.createElement(PcModal, props);
5
+ };
6
+ export default IpadModal;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { PcModalProps } from '../PcModal';
3
+ import './index.less';
4
+ export interface MobileModalProps extends PcModalProps {
5
+ /** 移动端展示时弹窗高度 默认null 在移动端全屏 */
6
+ mobileModalHeight?: string | number;
7
+ }
8
+ declare const MobileModal: (props: MobileModalProps) => React.JSX.Element;
9
+ export default MobileModal;
@@ -0,0 +1,26 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
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 _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
5
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
6
+ import React from 'react';
7
+ import classNames from 'classnames';
8
+ import PcModal from "../PcModal";
9
+ import "./index.less";
10
+ var MobileModal = function MobileModal(props) {
11
+ var wrapClassName = props.wrapClassName,
12
+ mobileModalHeight = props.mobileModalHeight;
13
+ return /*#__PURE__*/React.createElement(PcModal, _extends({}, props, {
14
+ width: "100%",
15
+ wrapClassName: classNames('pisell-mobile-modal', _defineProperty({}, wrapClassName, wrapClassName)),
16
+ modalRender: function modalRender(node) {
17
+ return /*#__PURE__*/React.createElement("div", {
18
+ className: classNames(_defineProperty({}, 'pisell-mobile-modal-render', mobileModalHeight)),
19
+ style: {
20
+ height: mobileModalHeight || '100%'
21
+ }
22
+ }, node);
23
+ }
24
+ }));
25
+ };
26
+ export default MobileModal;
@@ -0,0 +1,59 @@
1
+ .pisell-lowcode-modal-root {
2
+ .pisell-mobile-modal {
3
+ .pisell-lowcode-modal {
4
+ margin: 0;
5
+ height: 100%;
6
+ max-width: 100%;
7
+ bottom: 0;
8
+ top: auto;
9
+ padding-bottom: 0;
10
+ vertical-align: bottom;
11
+ }
12
+ .pisell-mobile-modal-render {
13
+ position: absolute;
14
+ width: 100%;
15
+ bottom: 0;
16
+ border-radius: 12px 12px 0 0;
17
+ overflow: hidden;
18
+ max-height: 90%;
19
+ min-height: 200px;
20
+ }
21
+ .pisell-lowcode-modal-content {
22
+ padding: 0;
23
+ border-radius: 0;
24
+ height: 100%;
25
+ display: flex;
26
+ flex-direction: column;
27
+ .pisell-lowcode-modal-close {
28
+ padding: 10px;
29
+ top: 8px;
30
+ right: 16px;
31
+ box-sizing: content-box;
32
+ }
33
+ .pisell-lowcode-modal-header {
34
+ padding: 16px 24px;
35
+ border-bottom: 1px solid var(--Gray-200, #eaecf0);
36
+ margin: 0;
37
+ .pisell-lowcode-modal-title {
38
+ color: var(--Gray-900, #101828);
39
+ font-size: 18px;
40
+ font-style: normal;
41
+ font-weight: 600;
42
+ line-height: 24px;
43
+ }
44
+ }
45
+ .pisell-lowcode-modal-body {
46
+ padding: 0 24px;
47
+ flex: 1;
48
+ overflow: auto;
49
+ }
50
+ .pisell-lowcode-modal-footer {
51
+ display: flex;
52
+ gap: 12px;
53
+ border-top: 1px solid var(--Gray-200, #eaecf0);
54
+ padding: 24px;
55
+ margin: 0;
56
+ }
57
+ }
58
+ }
59
+ }
@@ -0,0 +1,30 @@
1
+ import React from 'react';
2
+ import { ButtonProps, ModalProps } from 'antd';
3
+ import './index.less';
4
+ export interface PcModalProps extends ModalProps {
5
+ /**
6
+ * 弹窗大小
7
+ * large 800
8
+ * middle 600
9
+ * small 400
10
+ * */
11
+ size?: 'large' | 'middle' | 'small';
12
+ /** 头部分割线是否展示 */
13
+ headerDivider?: boolean;
14
+ /** 底部分割线是否展示 */
15
+ footerDivider?: boolean;
16
+ /** 删除按钮props */
17
+ deleteButtonProps?: ButtonProps | null;
18
+ /** 删除事件 */
19
+ onDelete?: () => void;
20
+ /** footer中额外操作按钮 */
21
+ actions?: React.ReactNode;
22
+ /** 取消按钮是否展示 */
23
+ cancelVisible?: boolean;
24
+ /** 确认按钮是否展示 */
25
+ okVisible?: boolean;
26
+ /** header是否展示 */
27
+ header?: boolean | null;
28
+ }
29
+ declare const PcModal: (props: PcModalProps) => React.JSX.Element;
30
+ export default PcModal;
@@ -0,0 +1,129 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
+ 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); }
8
+ import React, { useMemo } from 'react';
9
+ import { Button } from 'antd';
10
+ import classNames from 'classnames';
11
+ import { isBoolean, isUndefined } from '@pisell/utils';
12
+ import XClose from '@pisell/icon/es/XClose';
13
+ import Delete_wght300_24px from '@pisell/icon/src/Delete_wght300_24px';
14
+ import Modal from "../../../modal";
15
+ import { sizeMap } from "../../constants";
16
+ import "./index.less";
17
+ var PcModal = function PcModal(props) {
18
+ var wrapClassName = props.wrapClassName,
19
+ okButtonProps = props.okButtonProps,
20
+ cancelButtonProps = props.cancelButtonProps,
21
+ propsWidth = props.width,
22
+ _props$size = props.size,
23
+ size = _props$size === void 0 ? 'middle' : _props$size,
24
+ propsCloseIcon = props.closeIcon,
25
+ headerDivider = props.headerDivider,
26
+ footerDivider = props.footerDivider,
27
+ title = props.title,
28
+ _props$centered = props.centered,
29
+ centered = _props$centered === void 0 ? true : _props$centered,
30
+ deleteButtonProps = props.deleteButtonProps,
31
+ onDelete = props.onDelete,
32
+ _props$cancelVisible = props.cancelVisible,
33
+ cancelVisible = _props$cancelVisible === void 0 ? true : _props$cancelVisible,
34
+ _props$okVisible = props.okVisible,
35
+ okVisible = _props$okVisible === void 0 ? true : _props$okVisible,
36
+ actions = props.actions,
37
+ footer = props.footer,
38
+ header = props.header;
39
+ var width = useMemo(function () {
40
+ // 如果没有设置宽度,则根据size来设置宽度
41
+ return propsWidth || sizeMap[size];
42
+ }, [propsWidth, size]);
43
+ var closeIcon = useMemo(function () {
44
+ if (isUndefined(propsCloseIcon)) {
45
+ return /*#__PURE__*/React.createElement(XClose, {
46
+ style: {
47
+ fontSize: 20
48
+ }
49
+ });
50
+ }
51
+ }, [propsCloseIcon]);
52
+ var deleteBtn = useMemo(function () {
53
+ if (!deleteButtonProps) {
54
+ return null;
55
+ }
56
+ return /*#__PURE__*/React.createElement("span", {
57
+ style: {
58
+ flexShrink: 0
59
+ }
60
+ }, /*#__PURE__*/React.createElement(Button, _extends({
61
+ icon: /*#__PURE__*/React.createElement(Delete_wght300_24px, {
62
+ style: {
63
+ fontSize: 20
64
+ }
65
+ }),
66
+ size: 'large'
67
+ }, deleteButtonProps, {
68
+ onClick: function onClick(e) {
69
+ var _deleteButtonProps$on;
70
+ deleteButtonProps === null || deleteButtonProps === void 0 ? void 0 : (_deleteButtonProps$on = deleteButtonProps.onClick) === null || _deleteButtonProps$on === void 0 ? void 0 : _deleteButtonProps$on.call(deleteButtonProps, e);
71
+ onDelete === null || onDelete === void 0 ? void 0 : onDelete();
72
+ }
73
+ })));
74
+ }, [deleteButtonProps]);
75
+ var isHideFooter = useMemo(function () {
76
+ return isBoolean(footer) && !footer || footer === null;
77
+ }, [footer]);
78
+ var isHideHeader = useMemo(function () {
79
+ return isBoolean(header) && !header || header === null;
80
+ }, [header]);
81
+ var renderFooter = function renderFooter(_, _ref) {
82
+ var OkBtn = _ref.OkBtn,
83
+ CancelBtn = _ref.CancelBtn;
84
+ if (footer) {
85
+ return footer;
86
+ }
87
+ if ([deleteBtn, actions, cancelVisible, okVisible].every(function (item) {
88
+ return !item;
89
+ })) {
90
+ return null;
91
+ }
92
+ return /*#__PURE__*/React.createElement(React.Fragment, null, deleteBtn, actions, cancelVisible && /*#__PURE__*/React.createElement(CancelBtn, null), okVisible && /*#__PURE__*/React.createElement(OkBtn, null));
93
+ };
94
+ return /*#__PURE__*/React.createElement(Modal, _extends({
95
+ keyboard: false
96
+ }, props, {
97
+ centered: centered,
98
+ title: title || /*#__PURE__*/React.createElement("div", {
99
+ style: {
100
+ height: 24
101
+ }
102
+ }),
103
+ width: width,
104
+ wrapClassName: classNames('pisell-pc-modal', _defineProperty({}, wrapClassName, wrapClassName)),
105
+ closeIcon: closeIcon,
106
+ footer: isHideFooter ? null : renderFooter,
107
+ okButtonProps: _objectSpread({
108
+ block: true,
109
+ size: 'large',
110
+ style: {
111
+ margin: 0
112
+ }
113
+ }, okButtonProps || {}),
114
+ cancelButtonProps: _objectSpread({
115
+ block: true,
116
+ size: 'large'
117
+ }, cancelButtonProps || {}),
118
+ styles: {
119
+ header: {
120
+ borderBottom: headerDivider ? '1px solid var(--Gray-200, #EAECF0)' : 'none',
121
+ display: isHideHeader ? 'none' : 'block'
122
+ },
123
+ footer: {
124
+ borderTop: footerDivider ? '1px solid var(--Gray-200, #EAECF0)' : 'none'
125
+ }
126
+ }
127
+ }));
128
+ };
129
+ export default PcModal;