tntd 2.8.0-beta.3 → 3.0.0-beta

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 (531) hide show
  1. package/es/alert/alert.js +70 -0
  2. package/es/alert/alert.js.map +1 -0
  3. package/es/alert/alert.less +128 -0
  4. package/es/alert/index.js +1 -1
  5. package/es/alert/index.js.map +1 -1
  6. package/es/alert/style/index.less +1 -0
  7. package/es/button/button.js +30 -3
  8. package/es/button/button.js.map +1 -1
  9. package/es/button/button.less +72 -0
  10. package/es/button/index.js +1 -0
  11. package/es/button/index.js.map +1 -1
  12. package/es/checkbox/check.png +0 -0
  13. package/es/checkbox/checkbox.js +48 -0
  14. package/es/checkbox/checkbox.js.map +1 -0
  15. package/es/checkbox/checkbox.less +69 -0
  16. package/es/checkbox/index.js +3 -7
  17. package/es/checkbox/index.js.map +1 -1
  18. package/es/color-picker/index.less +4 -1
  19. package/es/date-picker/DatePicker.js +101 -0
  20. package/es/date-picker/DatePicker.js.map +1 -0
  21. package/es/date-picker/index.js +6 -12
  22. package/es/date-picker/index.js.map +1 -1
  23. package/es/date-picker/index.less +294 -0
  24. package/es/date-picker/style/RangePicker.less +3 -3
  25. package/es/descriptions/descriptions.js +64 -21
  26. package/es/descriptions/descriptions.js.map +1 -1
  27. package/es/descriptions/descriptions.less +57 -60
  28. package/es/descriptions/index.js +2 -2
  29. package/es/descriptions/index.js.map +1 -1
  30. package/es/drawer/drawer.js +98 -13
  31. package/es/drawer/drawer.js.map +1 -1
  32. package/es/drawer/index.js +1 -1
  33. package/es/drawer/index.js.map +1 -1
  34. package/es/drawer/index.less +154 -0
  35. package/es/drawer/style/drawer.less +18 -3
  36. package/es/drawer/style/index.js +2 -1
  37. package/es/drawer/style/index.js.map +1 -1
  38. package/es/form/form.js +3 -0
  39. package/es/form/form.js.map +1 -1
  40. package/es/form/form.less +36 -0
  41. package/es/icon/index.js +2 -0
  42. package/es/icon/index.js.map +1 -1
  43. package/es/icon/style/style.less +4 -0
  44. package/es/input/index.js +1 -1
  45. package/es/input/index.js.map +1 -1
  46. package/es/input/input.js +21 -30
  47. package/es/input/input.js.map +1 -1
  48. package/es/input/input.less +123 -20
  49. package/es/input-number/index.js +4 -5
  50. package/es/input-number/index.js.map +1 -1
  51. package/es/input-number/inputNumber.js +29 -0
  52. package/es/input-number/inputNumber.js.map +1 -0
  53. package/es/input-number/inputNumber.less +12 -0
  54. package/es/locale/en_US.js +12 -1
  55. package/es/locale/en_US.js.map +1 -1
  56. package/es/locale/zh_CN.js +12 -1
  57. package/es/locale/zh_CN.js.map +1 -1
  58. package/es/message/message.less +2 -1
  59. package/es/modal/index.js +2 -3
  60. package/es/modal/index.js.map +1 -1
  61. package/es/modal/index.less +36 -0
  62. package/es/modal/modal.js +104 -17
  63. package/es/modal/modal.js.map +1 -1
  64. package/es/modal/style/index.js +2 -1
  65. package/es/modal/style/index.js.map +1 -1
  66. package/es/notification/assets/index.js +2 -0
  67. package/es/notification/assets/index.js.map +1 -0
  68. package/es/notification/assets/svg-error-tip.js +145 -0
  69. package/es/notification/assets/svg-error-tip.js.map +1 -0
  70. package/es/notification/assets/svg-success-tip.js +162 -0
  71. package/es/notification/assets/svg-success-tip.js.map +1 -0
  72. package/es/notification/index.js +1 -1
  73. package/es/notification/index.js.map +1 -1
  74. package/es/notification/notification.js +80 -0
  75. package/es/notification/notification.js.map +1 -0
  76. package/es/notification/notification.less +59 -0
  77. package/es/notification/style/index.less +2 -0
  78. package/es/popconfirm/index.js +2 -2
  79. package/es/popconfirm/index.js.map +1 -1
  80. package/es/popconfirm/index.less +26 -0
  81. package/es/popconfirm/popconfirm.js +40 -0
  82. package/es/popconfirm/popconfirm.js.map +1 -0
  83. package/es/popconfirm/style/index.js +2 -1
  84. package/es/popconfirm/style/index.js.map +1 -1
  85. package/es/popover/index.js +2 -2
  86. package/es/popover/index.js.map +1 -1
  87. package/es/popover/index.less +51 -0
  88. package/es/popover/popover.js +33 -0
  89. package/es/popover/popover.js.map +1 -0
  90. package/es/popover/style/index.js +1 -0
  91. package/es/popover/style/index.js.map +1 -1
  92. package/es/preview-text/index.js.map +1 -1
  93. package/es/progress/index.js +2 -2
  94. package/es/progress/index.js.map +1 -1
  95. package/es/progress/progress.js +132 -0
  96. package/es/progress/progress.js.map +1 -0
  97. package/es/progress/progress.less +82 -0
  98. package/es/query-form/Field/Composition/FieldPopover.js +284 -0
  99. package/es/query-form/Field/Composition/FieldPopover.js.map +1 -0
  100. package/es/query-form/Field/Composition/FieldPopover.less +35 -0
  101. package/es/query-form/Field/Composition/Select.js +108 -0
  102. package/es/query-form/Field/Composition/Select.js.map +1 -0
  103. package/es/query-form/Field/Composition/index.js +282 -0
  104. package/es/query-form/Field/Composition/index.js.map +1 -0
  105. package/es/query-form/Field/Composition/index.less +106 -0
  106. package/es/query-form/Field/Composition/utils.js +19 -0
  107. package/es/query-form/Field/Composition/utils.js.map +1 -0
  108. package/es/query-form/index.js +109 -125
  109. package/es/query-form/index.js.map +1 -1
  110. package/es/query-form/index.less +12 -9
  111. package/es/query-list-scene/index.less +4 -4
  112. package/es/radio/index.js +3 -5
  113. package/es/radio/index.js.map +1 -1
  114. package/es/radio/radio.js +57 -0
  115. package/es/radio/radio.js.map +1 -0
  116. package/es/radio/radio.less +43 -0
  117. package/es/segmented/index.less +126 -112
  118. package/es/select/index.js +1 -1
  119. package/es/select/index.js.map +1 -1
  120. package/es/select/select.js +5 -6
  121. package/es/select/select.js.map +1 -1
  122. package/es/select/select.less +83 -9
  123. package/es/steps/assets/background_left.svg +12 -0
  124. package/es/steps/assets/background_right.svg +12 -0
  125. package/es/steps/assets/horizontal_line.svg +3 -0
  126. package/es/steps/assets/vertical_line.svg +3 -0
  127. package/es/steps/index.js +9 -2
  128. package/es/steps/index.js.map +1 -1
  129. package/es/steps/stepStyle/icon.less +51 -0
  130. package/es/steps/stepStyle/index.less +173 -8
  131. package/es/steps/stepStyle/nav.less +51 -259
  132. package/es/steps/stepStyle/progress-dot.less +10 -0
  133. package/es/steps/stepStyle/variables.less +8 -0
  134. package/es/steps/stepStyle/vertical.less +41 -0
  135. package/es/steps/steps.js +53 -27
  136. package/es/steps/steps.js.map +1 -1
  137. package/es/steps/style/index.js +8 -0
  138. package/es/steps/style/index.js.map +1 -1
  139. package/es/style/themes/default.less +3 -2
  140. package/es/switch/index.less +46 -0
  141. package/es/switch/style/index.js +2 -1
  142. package/es/switch/style/index.js.map +1 -1
  143. package/es/switch/switch.js +40 -2
  144. package/es/switch/switch.js.map +1 -1
  145. package/es/table/style/index.less +51 -7
  146. package/es/table/style/size.less +5 -5
  147. package/es/table/table.js +37 -6
  148. package/es/table/table.js.map +1 -1
  149. package/es/table/table.less +33 -5
  150. package/es/tabs/index.js +1 -0
  151. package/es/tabs/index.js.map +1 -1
  152. package/es/tabs/style/index.js.map +1 -1
  153. package/es/tabs/style/index.less +1 -0
  154. package/es/tabs/tabs.js +22 -4
  155. package/es/tabs/tabs.js.map +1 -1
  156. package/es/tabs/tabs.less +114 -0
  157. package/es/tag/color.less +43 -0
  158. package/es/tag/index.js +11 -2
  159. package/es/tag/index.js.map +1 -1
  160. package/es/tag/tag.js +171 -0
  161. package/es/tag/tag.js.map +1 -0
  162. package/es/tag/tag.less +192 -0
  163. package/es/time-picker/TimePicker.js +36 -0
  164. package/es/time-picker/TimePicker.js.map +1 -0
  165. package/es/time-picker/index.js +2 -2
  166. package/es/time-picker/index.js.map +1 -1
  167. package/es/time-picker/index.less +38 -0
  168. package/es/tntd-action/Action.js +66 -0
  169. package/es/tntd-action/Action.js.map +1 -0
  170. package/es/tntd-action/index.js +64 -6
  171. package/es/tntd-action/index.js.map +1 -1
  172. package/es/tntd-action/index.less +36 -0
  173. package/es/tntd-cascader/AntdCascader/index.less +28 -27
  174. package/es/tooltip/index.js +2 -2
  175. package/es/tooltip/index.js.map +1 -1
  176. package/es/tooltip/index.less +24 -0
  177. package/es/tooltip/style/index.js +2 -1
  178. package/es/tooltip/style/index.js.map +1 -1
  179. package/es/tooltip/tooltip.js +32 -0
  180. package/es/tooltip/tooltip.js.map +1 -0
  181. package/es/utils/lang.js +8 -2
  182. package/es/utils/lang.js.map +1 -1
  183. package/lib/alert/alert.d.ts +12 -0
  184. package/lib/alert/alert.d.ts.map +1 -0
  185. package/lib/alert/alert.js +92 -0
  186. package/lib/alert/alert.js.map +1 -0
  187. package/lib/alert/alert.less +128 -0
  188. package/lib/alert/index.d.ts +1 -1
  189. package/lib/alert/index.d.ts.map +1 -1
  190. package/lib/alert/index.js +7 -8
  191. package/lib/alert/index.js.map +1 -1
  192. package/lib/alert/style/index.less +1 -0
  193. package/lib/button/button.d.ts +9 -4
  194. package/lib/button/button.d.ts.map +1 -1
  195. package/lib/button/button.js +27 -3
  196. package/lib/button/button.js.map +1 -1
  197. package/lib/button/button.less +72 -0
  198. package/lib/button/index.d.ts +1 -0
  199. package/lib/button/index.d.ts.map +1 -1
  200. package/lib/button/index.js +6 -5
  201. package/lib/button/index.js.map +1 -1
  202. package/lib/checkbox/check.png +0 -0
  203. package/lib/checkbox/checkbox.d.ts +16 -0
  204. package/lib/checkbox/checkbox.d.ts.map +1 -0
  205. package/lib/checkbox/checkbox.js +65 -0
  206. package/lib/checkbox/checkbox.js.map +1 -0
  207. package/lib/checkbox/checkbox.less +69 -0
  208. package/lib/checkbox/index.d.ts +3 -3
  209. package/lib/checkbox/index.d.ts.map +1 -1
  210. package/lib/checkbox/index.js +2 -17
  211. package/lib/checkbox/index.js.map +1 -1
  212. package/lib/color-picker/index.less +4 -1
  213. package/lib/date-picker/DatePicker.d.ts +21 -0
  214. package/lib/date-picker/DatePicker.d.ts.map +1 -0
  215. package/lib/date-picker/DatePicker.js +128 -0
  216. package/lib/date-picker/DatePicker.js.map +1 -0
  217. package/lib/date-picker/index.d.ts +2 -6
  218. package/lib/date-picker/index.d.ts.map +1 -1
  219. package/lib/date-picker/index.js +6 -37
  220. package/lib/date-picker/index.js.map +1 -1
  221. package/lib/date-picker/index.less +294 -0
  222. package/lib/date-picker/style/RangePicker.less +3 -3
  223. package/lib/descriptions/descriptions.d.ts +11 -6
  224. package/lib/descriptions/descriptions.d.ts.map +1 -1
  225. package/lib/descriptions/descriptions.js +68 -26
  226. package/lib/descriptions/descriptions.js.map +1 -1
  227. package/lib/descriptions/descriptions.less +57 -60
  228. package/lib/descriptions/index.d.ts +1 -1
  229. package/lib/descriptions/index.d.ts.map +1 -1
  230. package/lib/descriptions/index.js +7 -7
  231. package/lib/descriptions/index.js.map +1 -1
  232. package/lib/drawer/drawer.d.ts +22 -2
  233. package/lib/drawer/drawer.d.ts.map +1 -1
  234. package/lib/drawer/drawer.js +104 -13
  235. package/lib/drawer/drawer.js.map +1 -1
  236. package/lib/drawer/index.d.ts +1 -1
  237. package/lib/drawer/index.d.ts.map +1 -1
  238. package/lib/drawer/index.js +5 -5
  239. package/lib/drawer/index.js.map +1 -1
  240. package/lib/drawer/index.less +154 -0
  241. package/lib/drawer/style/drawer.less +18 -3
  242. package/lib/drawer/style/index.d.ts +1 -0
  243. package/lib/drawer/style/index.d.ts.map +1 -1
  244. package/lib/drawer/style/index.js +2 -1
  245. package/lib/drawer/style/index.js.map +1 -1
  246. package/lib/form/form.d.ts +1 -0
  247. package/lib/form/form.d.ts.map +1 -1
  248. package/lib/form/form.js +4 -0
  249. package/lib/form/form.js.map +1 -1
  250. package/lib/form/form.less +36 -0
  251. package/lib/icon/index.d.ts +1 -0
  252. package/lib/icon/index.d.ts.map +1 -1
  253. package/lib/icon/index.js +2 -1
  254. package/lib/icon/index.js.map +1 -1
  255. package/lib/icon/style/style.less +4 -0
  256. package/lib/input/index.d.ts +1 -1
  257. package/lib/input/index.d.ts.map +1 -1
  258. package/lib/input/index.js +7 -7
  259. package/lib/input/index.js.map +1 -1
  260. package/lib/input/input.d.ts +5 -5
  261. package/lib/input/input.d.ts.map +1 -1
  262. package/lib/input/input.js +11 -20
  263. package/lib/input/input.js.map +1 -1
  264. package/lib/input/input.less +123 -20
  265. package/lib/input-number/index.d.ts +4 -8
  266. package/lib/input-number/index.d.ts.map +1 -1
  267. package/lib/input-number/index.js +3 -5
  268. package/lib/input-number/index.js.map +1 -1
  269. package/lib/input-number/inputNumber.d.ts +10 -0
  270. package/lib/input-number/inputNumber.d.ts.map +1 -0
  271. package/lib/input-number/inputNumber.js +48 -0
  272. package/lib/input-number/inputNumber.js.map +1 -0
  273. package/lib/input-number/inputNumber.less +12 -0
  274. package/lib/locale/default.d.ts +11 -0
  275. package/lib/locale/default.d.ts.map +1 -1
  276. package/lib/locale/en_US.d.ts +11 -0
  277. package/lib/locale/en_US.d.ts.map +1 -1
  278. package/lib/locale/en_US.js +12 -1
  279. package/lib/locale/en_US.js.map +1 -1
  280. package/lib/locale/zh_CN.d.ts +11 -0
  281. package/lib/locale/zh_CN.d.ts.map +1 -1
  282. package/lib/locale/zh_CN.js +12 -1
  283. package/lib/locale/zh_CN.js.map +1 -1
  284. package/lib/message/message.less +2 -1
  285. package/lib/modal/index.d.ts +0 -1
  286. package/lib/modal/index.d.ts.map +1 -1
  287. package/lib/modal/index.js +2 -3
  288. package/lib/modal/index.js.map +1 -1
  289. package/lib/modal/index.less +36 -0
  290. package/lib/modal/modal.d.ts.map +1 -1
  291. package/lib/modal/modal.js +91 -16
  292. package/lib/modal/modal.js.map +1 -1
  293. package/lib/modal/style/index.d.ts +1 -0
  294. package/lib/modal/style/index.d.ts.map +1 -1
  295. package/lib/modal/style/index.js +2 -1
  296. package/lib/modal/style/index.js.map +1 -1
  297. package/lib/notification/assets/index.d.ts +3 -0
  298. package/lib/notification/assets/index.d.ts.map +1 -0
  299. package/lib/notification/assets/index.js +20 -0
  300. package/lib/notification/assets/index.js.map +1 -0
  301. package/lib/notification/assets/svg-error-tip.d.ts +4 -0
  302. package/lib/notification/assets/svg-error-tip.d.ts.map +1 -0
  303. package/lib/notification/assets/svg-error-tip.js +154 -0
  304. package/lib/notification/assets/svg-error-tip.js.map +1 -0
  305. package/lib/notification/assets/svg-success-tip.d.ts +4 -0
  306. package/lib/notification/assets/svg-success-tip.d.ts.map +1 -0
  307. package/lib/notification/assets/svg-success-tip.js +171 -0
  308. package/lib/notification/assets/svg-success-tip.js.map +1 -0
  309. package/lib/notification/index.d.ts +1 -1
  310. package/lib/notification/index.d.ts.map +1 -1
  311. package/lib/notification/index.js +7 -8
  312. package/lib/notification/index.js.map +1 -1
  313. package/lib/notification/notification.d.ts +9 -0
  314. package/lib/notification/notification.d.ts.map +1 -0
  315. package/lib/notification/notification.js +105 -0
  316. package/lib/notification/notification.js.map +1 -0
  317. package/lib/notification/notification.less +59 -0
  318. package/lib/notification/style/index.less +2 -0
  319. package/lib/popconfirm/index.d.ts +2 -2
  320. package/lib/popconfirm/index.d.ts.map +1 -1
  321. package/lib/popconfirm/index.js +1 -1
  322. package/lib/popconfirm/index.js.map +1 -1
  323. package/lib/popconfirm/index.less +26 -0
  324. package/lib/popconfirm/popconfirm.d.ts +6 -0
  325. package/lib/popconfirm/popconfirm.d.ts.map +1 -0
  326. package/lib/popconfirm/popconfirm.js +58 -0
  327. package/lib/popconfirm/popconfirm.js.map +1 -0
  328. package/lib/popconfirm/style/index.d.ts +1 -0
  329. package/lib/popconfirm/style/index.d.ts.map +1 -1
  330. package/lib/popconfirm/style/index.js +2 -1
  331. package/lib/popconfirm/style/index.js.map +1 -1
  332. package/lib/popover/index.d.ts +2 -2
  333. package/lib/popover/index.d.ts.map +1 -1
  334. package/lib/popover/index.js +2 -2
  335. package/lib/popover/index.js.map +1 -1
  336. package/lib/popover/index.less +51 -0
  337. package/lib/popover/popover.d.ts +13 -0
  338. package/lib/popover/popover.d.ts.map +1 -0
  339. package/lib/popover/popover.js +53 -0
  340. package/lib/popover/popover.js.map +1 -0
  341. package/lib/popover/style/index.d.ts +1 -0
  342. package/lib/popover/style/index.d.ts.map +1 -1
  343. package/lib/popover/style/index.js +2 -1
  344. package/lib/popover/style/index.js.map +1 -1
  345. package/lib/preview-text/index.d.ts +1 -1
  346. package/lib/preview-text/index.d.ts.map +1 -1
  347. package/lib/preview-text/index.js.map +1 -1
  348. package/lib/progress/index.d.ts +2 -2
  349. package/lib/progress/index.d.ts.map +1 -1
  350. package/lib/progress/index.js +1 -1
  351. package/lib/progress/index.js.map +1 -1
  352. package/lib/progress/progress.d.ts +12 -0
  353. package/lib/progress/progress.d.ts.map +1 -0
  354. package/lib/progress/progress.js +148 -0
  355. package/lib/progress/progress.js.map +1 -0
  356. package/lib/progress/progress.less +82 -0
  357. package/lib/query-form/Field/Composition/FieldPopover.d.ts +17 -0
  358. package/lib/query-form/Field/Composition/FieldPopover.d.ts.map +1 -0
  359. package/lib/query-form/Field/Composition/FieldPopover.js +319 -0
  360. package/lib/query-form/Field/Composition/FieldPopover.js.map +1 -0
  361. package/lib/query-form/Field/Composition/FieldPopover.less +35 -0
  362. package/lib/query-form/Field/Composition/Select.d.ts +4 -0
  363. package/lib/query-form/Field/Composition/Select.d.ts.map +1 -0
  364. package/lib/query-form/Field/Composition/Select.js +132 -0
  365. package/lib/query-form/Field/Composition/Select.js.map +1 -0
  366. package/lib/query-form/Field/Composition/index.d.ts +14 -0
  367. package/lib/query-form/Field/Composition/index.d.ts.map +1 -0
  368. package/lib/query-form/Field/Composition/index.js +337 -0
  369. package/lib/query-form/Field/Composition/index.js.map +1 -0
  370. package/lib/query-form/Field/Composition/index.less +106 -0
  371. package/lib/query-form/Field/Composition/utils.d.ts +6 -0
  372. package/lib/query-form/Field/Composition/utils.d.ts.map +1 -0
  373. package/lib/query-form/Field/Composition/utils.js +27 -0
  374. package/lib/query-form/Field/Composition/utils.js.map +1 -0
  375. package/lib/query-form/index.d.ts +4 -7
  376. package/lib/query-form/index.d.ts.map +1 -1
  377. package/lib/query-form/index.js +137 -149
  378. package/lib/query-form/index.js.map +1 -1
  379. package/lib/query-form/index.less +12 -9
  380. package/lib/query-list-scene/index.less +4 -4
  381. package/lib/radio/index.d.ts +3 -2
  382. package/lib/radio/index.d.ts.map +1 -1
  383. package/lib/radio/index.js +2 -5
  384. package/lib/radio/index.js.map +1 -1
  385. package/lib/radio/radio.d.ts +17 -0
  386. package/lib/radio/radio.d.ts.map +1 -0
  387. package/lib/radio/radio.js +75 -0
  388. package/lib/radio/radio.js.map +1 -0
  389. package/lib/radio/radio.less +43 -0
  390. package/lib/segmented/index.d.ts +1 -1
  391. package/lib/segmented/index.less +126 -112
  392. package/lib/select/index.d.ts +1 -1
  393. package/lib/select/index.d.ts.map +1 -1
  394. package/lib/select/index.js +6 -6
  395. package/lib/select/index.js.map +1 -1
  396. package/lib/select/select.d.ts +1 -1
  397. package/lib/select/select.d.ts.map +1 -1
  398. package/lib/select/select.js +3 -4
  399. package/lib/select/select.js.map +1 -1
  400. package/lib/select/select.less +83 -9
  401. package/lib/steps/assets/background_left.svg +12 -0
  402. package/lib/steps/assets/background_right.svg +12 -0
  403. package/lib/steps/assets/horizontal_line.svg +3 -0
  404. package/lib/steps/assets/vertical_line.svg +3 -0
  405. package/lib/steps/index.d.ts +1 -2
  406. package/lib/steps/index.d.ts.map +1 -1
  407. package/lib/steps/index.js +9 -2
  408. package/lib/steps/index.js.map +1 -1
  409. package/lib/steps/stepStyle/icon.less +51 -0
  410. package/lib/steps/stepStyle/index.less +173 -8
  411. package/lib/steps/stepStyle/nav.less +51 -259
  412. package/lib/steps/stepStyle/progress-dot.less +10 -0
  413. package/lib/steps/stepStyle/variables.less +8 -0
  414. package/lib/steps/stepStyle/vertical.less +41 -0
  415. package/lib/steps/steps.d.ts +10 -2
  416. package/lib/steps/steps.d.ts.map +1 -1
  417. package/lib/steps/steps.js +50 -22
  418. package/lib/steps/steps.js.map +1 -1
  419. package/lib/steps/style/index.d.ts.map +1 -1
  420. package/lib/steps/style/index.js.map +1 -1
  421. package/lib/style/themes/default.less +3 -2
  422. package/lib/svg-components/illustration-403.d.ts +1 -1
  423. package/lib/svg-components/illustration-404.d.ts +1 -1
  424. package/lib/svg-components/illustration-500.d.ts +1 -1
  425. package/lib/svg-components/illustration-empty.d.ts +1 -1
  426. package/lib/svg-components/illustration-failure.d.ts +1 -1
  427. package/lib/svg-components/illustration-no-access.d.ts +1 -1
  428. package/lib/svg-components/illustration-no-chart.d.ts +1 -1
  429. package/lib/svg-components/illustration-no-result.d.ts +1 -1
  430. package/lib/svg-components/illustration-offline.d.ts +1 -1
  431. package/lib/svg-components/illustration-success.d.ts +1 -1
  432. package/lib/switch/index.less +46 -0
  433. package/lib/switch/style/index.d.ts +1 -0
  434. package/lib/switch/style/index.d.ts.map +1 -1
  435. package/lib/switch/style/index.js +2 -1
  436. package/lib/switch/style/index.js.map +1 -1
  437. package/lib/switch/switch.d.ts +8 -0
  438. package/lib/switch/switch.d.ts.map +1 -1
  439. package/lib/switch/switch.js +40 -5
  440. package/lib/switch/switch.js.map +1 -1
  441. package/lib/table/assets/image-loading-background.d.ts +1 -1
  442. package/lib/table/assets/image-loading.d.ts +1 -1
  443. package/lib/table/style/index.less +51 -7
  444. package/lib/table/style/size.less +5 -5
  445. package/lib/table/table.d.ts +2 -1
  446. package/lib/table/table.d.ts.map +1 -1
  447. package/lib/table/table.js +35 -4
  448. package/lib/table/table.js.map +1 -1
  449. package/lib/table/table.less +33 -5
  450. package/lib/tabs/index.d.ts +1 -0
  451. package/lib/tabs/index.d.ts.map +1 -1
  452. package/lib/tabs/index.js +6 -5
  453. package/lib/tabs/index.js.map +1 -1
  454. package/lib/tabs/style/index.js.map +1 -1
  455. package/lib/tabs/style/index.less +1 -0
  456. package/lib/tabs/tabs.d.ts +3 -2
  457. package/lib/tabs/tabs.d.ts.map +1 -1
  458. package/lib/tabs/tabs.js +24 -3
  459. package/lib/tabs/tabs.js.map +1 -1
  460. package/lib/tabs/tabs.less +114 -0
  461. package/lib/tag/color.less +43 -0
  462. package/lib/tag/index.d.ts +3 -2
  463. package/lib/tag/index.d.ts.map +1 -1
  464. package/lib/tag/index.js +15 -9
  465. package/lib/tag/index.js.map +1 -1
  466. package/lib/tag/tag.d.ts +41 -0
  467. package/lib/tag/tag.d.ts.map +1 -0
  468. package/lib/tag/tag.js +183 -0
  469. package/lib/tag/tag.js.map +1 -0
  470. package/lib/tag/tag.less +192 -0
  471. package/lib/time-picker/TimePicker.d.ts +9 -0
  472. package/lib/time-picker/TimePicker.d.ts.map +1 -0
  473. package/lib/time-picker/TimePicker.js +55 -0
  474. package/lib/time-picker/TimePicker.js.map +1 -0
  475. package/lib/time-picker/index.d.ts +7 -6
  476. package/lib/time-picker/index.d.ts.map +1 -1
  477. package/lib/time-picker/index.js +4 -17
  478. package/lib/time-picker/index.js.map +1 -1
  479. package/lib/time-picker/index.less +38 -0
  480. package/lib/tntd-action/Action.d.ts +6 -0
  481. package/lib/tntd-action/Action.d.ts.map +1 -0
  482. package/lib/tntd-action/Action.js +86 -0
  483. package/lib/tntd-action/Action.js.map +1 -0
  484. package/lib/tntd-action/index.d.ts +4 -2
  485. package/lib/tntd-action/index.d.ts.map +1 -1
  486. package/lib/tntd-action/index.js +76 -5
  487. package/lib/tntd-action/index.js.map +1 -1
  488. package/lib/tntd-action/index.less +36 -0
  489. package/lib/tntd-cascader/AntdCascader/config/utils.d.ts +1 -1
  490. package/lib/tntd-cascader/AntdCascader/index.less +28 -27
  491. package/lib/tntd-rc-select/_util/PurePanel.d.ts +1 -1
  492. package/lib/tooltip/index.d.ts +2 -2
  493. package/lib/tooltip/index.d.ts.map +1 -1
  494. package/lib/tooltip/index.js +2 -2
  495. package/lib/tooltip/index.js.map +1 -1
  496. package/lib/tooltip/index.less +24 -0
  497. package/lib/tooltip/style/index.d.ts +1 -0
  498. package/lib/tooltip/style/index.d.ts.map +1 -1
  499. package/lib/tooltip/style/index.js +2 -1
  500. package/lib/tooltip/style/index.js.map +1 -1
  501. package/lib/tooltip/tooltip.d.ts +8 -0
  502. package/lib/tooltip/tooltip.d.ts.map +1 -0
  503. package/lib/tooltip/tooltip.js +51 -0
  504. package/lib/tooltip/tooltip.js.map +1 -0
  505. package/lib/utils/lang.d.ts.map +1 -1
  506. package/lib/utils/lang.js +8 -2
  507. package/lib/utils/lang.js.map +1 -1
  508. package/package.json +3 -2
  509. package/themes/common/index.less +29 -27
  510. package/themes/default/colors.less +1 -1
  511. package/themes/default/lessVars2.x.less +2 -1
  512. package/themes/default/lessVars3.x.less +1 -0
  513. package/themes/default/variables.less +60 -36
  514. package/es/checkbox/checkbox-group.js +0 -5
  515. package/es/checkbox/checkbox-group.js.map +0 -1
  516. package/es/drawer/drawer.less +0 -20
  517. package/es/modal/modal.less +0 -18
  518. package/es/radio/radio-group.js +0 -5
  519. package/es/radio/radio-group.js.map +0 -1
  520. package/es/steps/stepStyle/small.less +0 -5
  521. package/lib/checkbox/checkbox-group.d.ts +0 -8
  522. package/lib/checkbox/checkbox-group.d.ts.map +0 -1
  523. package/lib/checkbox/checkbox-group.js +0 -12
  524. package/lib/checkbox/checkbox-group.js.map +0 -1
  525. package/lib/drawer/drawer.less +0 -20
  526. package/lib/modal/modal.less +0 -18
  527. package/lib/radio/radio-group.d.ts +0 -8
  528. package/lib/radio/radio-group.d.ts.map +0 -1
  529. package/lib/radio/radio-group.js +0 -12
  530. package/lib/radio/radio-group.js.map +0 -1
  531. package/lib/steps/stepStyle/small.less +0 -5
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _exportNames = {
7
+ Alert: true
8
+ };
9
+ exports["default"] = exports.Alert = void 0;
10
+ var _react = _interopRequireWildcard(require("react"));
11
+ var _icon = _interopRequireDefault(require("antd/lib/icon"));
12
+ var _configProvider = require("antd/lib/config-provider");
13
+ var _alert = _interopRequireWildcard(require("antd/lib/alert"));
14
+ Object.keys(_alert).forEach(function (key) {
15
+ if (key === "default" || key === "__esModule") return;
16
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
17
+ if (key in exports && exports[key] === _alert[key]) return;
18
+ Object.defineProperty(exports, key, {
19
+ enumerable: true,
20
+ get: function get() {
21
+ return _alert[key];
22
+ }
23
+ });
24
+ });
25
+ var _classnames = _interopRequireDefault(require("classnames"));
26
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
27
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
28
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
29
+ 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); }
30
+ 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; }
31
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
32
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
33
+ var __rest = void 0 && (void 0).__rest || function (s, e) {
34
+ var t = {};
35
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
36
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
37
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
38
+ }
39
+ return t;
40
+ };
41
+ /*
42
+ * @Author: 周泽飞 zefei.zhou@tongdun.net
43
+ * @Date: 2024-03-21 19:43:36
44
+ * @LastEditors: 周泽飞 zefei.zhou@tongdun.net
45
+ * @LastEditTime: 2024-03-21 19:46:23
46
+ * @FilePath: /tntd/packages/tntd/src/alert/alert.tsx
47
+ * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
48
+ */
49
+
50
+ var prefix = 'tnt-alert';
51
+ var Alert = exports.Alert = (0, _react.forwardRef)(function (_a, ref) {
52
+ var action = _a.action,
53
+ message = _a.message,
54
+ rest = __rest(_a, ["action", "message"]);
55
+ var fragment = _react["default"].createElement(_react["default"].Fragment, null, message, !!action && _react["default"].createElement("span", {
56
+ className: "action-btn"
57
+ }, action));
58
+ var iconTheme = 'filled';
59
+ var iconType = 'default';
60
+ switch (rest === null || rest === void 0 ? void 0 : rest.type) {
61
+ case 'success':
62
+ iconType = 'check-circle';
63
+ break;
64
+ case 'info':
65
+ iconType = 'info-circle';
66
+ break;
67
+ case 'error':
68
+ iconType = 'close-circle';
69
+ break;
70
+ case 'warning':
71
+ iconType = 'exclamation-circle';
72
+ break;
73
+ default:
74
+ iconType = 'default';
75
+ }
76
+ var iconNode = rest.type ? _react["default"].createElement(_icon["default"], {
77
+ className: "".concat(prefix, "-icon"),
78
+ type: iconType,
79
+ theme: iconTheme
80
+ }) : null;
81
+ return _react["default"].createElement(_configProvider.ConfigConsumer, null, function (_ref) {
82
+ var getPrefixCls = _ref.getPrefixCls;
83
+ return _react["default"].createElement(_alert["default"], Object.assign({
84
+ ref: ref
85
+ }, rest, {
86
+ message: fragment,
87
+ icon: iconNode,
88
+ className: (0, _classnames["default"])(rest === null || rest === void 0 ? void 0 : rest.className, 'tnt-alert', _defineProperty({}, "".concat(prefix, "-with-action"), action))
89
+ }));
90
+ });
91
+ });
92
+ var _default = exports["default"] = Alert;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert.js","sourceRoot":"","sources":["../../src/alert/alert.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;GAOG;AACH,+CAAyC;AAGzC,wDAA+B;AAC/B,6DAAwD;AACxD,0DAAoD;AACpD,4DAAkC;AAClC,gDAA6B;AAS7B,MAAM,MAAM,GAAG,WAAW,CAAA;AAEb,QAAA,KAAK,GAAG,IAAA,kBAAU,EAAwB,CAAC,EAA4B,EAAE,GAAG,EAAE,EAAE;QAArC,EAAE,MAAM,EAAE,OAAO,OAAW,EAAN,IAAI,cAA1B,qBAA4B,CAAF;IAChF,MAAM,QAAQ,GAAG,CACf;QACG,OAAO;QACP,CAAC,CAAC,MAAM,IAAI,wCAAM,SAAS,EAAC,YAAY,IAAE,MAAM,CAAQ,CACxD,CACJ,CAAA;IAED,MAAM,SAAS,GAAc,QAAQ,CAAA;IACrC,IAAI,QAAQ,GAAG,SAAS,CAAA;IAExB,QAAQ,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,EAAE;QAClB,KAAK,SAAS;YACZ,QAAQ,GAAG,cAAc,CAAA;YACzB,MAAK;QACP,KAAK,MAAM;YACT,QAAQ,GAAG,aAAa,CAAA;YACxB,MAAK;QACP,KAAK,OAAO;YACV,QAAQ,GAAG,cAAc,CAAA;YACzB,MAAK;QACP,KAAK,SAAS;YACZ,QAAQ,GAAG,oBAAoB,CAAA;YAC/B,MAAK;QACP;YACE,QAAQ,GAAG,SAAS,CAAA;KACvB;IAED,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAC3B,8BAAC,cAAI,IAAC,SAAS,EAAE,GAAG,MAAM,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,GAAI,CACxE,CAAC,CAAC,CAAC,IAAI,CAAA;IAER,OAAO,CACL,8BAAC,gCAAc,QACZ,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;QACpB,OAAO,CACL,8BAAC,eAAS,kBACR,GAAG,EAAE,GAAG,IACJ,IAAI,IACR,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,QAAQ,EACd,SAAS,EAAE,IAAA,oBAAS,EAAC,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,SAAS,EAAE,WAAW,EAAE;gBACjD,CAAC,GAAG,MAAM,cAAc,CAAC,EAAE,MAAM;aAClC,CAAC,IACF,CACH,CAAA;IACH,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CAAmB,CAAA;AAEpB,kBAAe,aAAK,CAAA","sourcesContent":["/*\n * @Author: 周泽飞 zefei.zhou@tongdun.net\n * @Date: 2024-03-21 19:43:36\n * @LastEditors: 周泽飞 zefei.zhou@tongdun.net\n * @LastEditTime: 2024-03-21 19:46:23\n * @FilePath: /tntd/packages/tntd/src/alert/alert.tsx\n * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE\n */\nimport React, { forwardRef } from 'react'\nimport type { AlertProps as AntdAlertProps } from 'antd/lib/alert'\nimport type { ThemeType } from 'antd/lib/icon'\nimport Icon from 'antd/lib/icon'\nimport { ConfigConsumer } from 'antd/lib/config-provider'\nimport { default as AntdAlert } from 'antd/lib/alert'\nimport classname from 'classnames'\nexport * from 'antd/lib/alert'\n\nexport interface AlertProps extends AntdAlertProps {\n action: React.ReactNode\n}\n\ninterface AlertComponent\n extends React.ForwardRefExoticComponent<AntdAlertProps & React.RefAttributes<AntdAlert>> {}\n\nconst prefix = 'tnt-alert'\n\nexport const Alert = forwardRef<AntdAlert, AlertProps>(({ action, message, ...rest }, ref) => {\n const fragment = (\n <>\n {message}\n {!!action && <span className=\"action-btn\">{action}</span>}\n </>\n )\n\n const iconTheme: ThemeType = 'filled'\n let iconType = 'default'\n\n switch (rest?.type) {\n case 'success':\n iconType = 'check-circle'\n break\n case 'info':\n iconType = 'info-circle'\n break\n case 'error':\n iconType = 'close-circle'\n break\n case 'warning':\n iconType = 'exclamation-circle'\n break\n default:\n iconType = 'default'\n }\n\n const iconNode = rest.type ? (\n <Icon className={`${prefix}-icon`} type={iconType} theme={iconTheme} />\n ) : null\n\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n return (\n <AntdAlert\n ref={ref}\n {...rest}\n message={fragment}\n icon={iconNode}\n className={classname(rest?.className, 'tnt-alert', {\n [`${prefix}-with-action`]: action,\n })}\n />\n )\n }}\n </ConfigConsumer>\n )\n}) as AlertComponent\n\nexport default Alert\n"]}
@@ -0,0 +1,128 @@
1
+ @alert-prefix-cls: ~'@{ant-prefix}-alert';
2
+ @alert-description-color: @text-color-secondary;
3
+ @tnt-alert-prefix-cls: ~'tnt-alert';
4
+
5
+
6
+ .@{tnt-alert-prefix-cls} {
7
+
8
+ &.@{alert-prefix-cls}.@{alert-prefix-cls}-no-icon.@{alert-prefix-cls}-closable {
9
+ padding-right: 30px;
10
+ }
11
+
12
+ &.@{tnt-alert-prefix-cls}-with-action {
13
+ .@{alert-prefix-cls}-message {
14
+ display: flex;
15
+ justify-content: space-between;
16
+ > .action-btn {
17
+ flex: none;
18
+ margin-left: 36px;
19
+ margin-right: 12px;
20
+ font-size: @font-size-base;
21
+ }
22
+ }
23
+ }
24
+
25
+ &.@{alert-prefix-cls} {
26
+ border-radius: @border-radius-lg;
27
+ padding: 8px 15px 8px 44px;
28
+ & .anticon {
29
+ left: 20px;
30
+ top: 11px; // 与文字对齐
31
+ }
32
+
33
+ }
34
+
35
+ .@{alert-prefix-cls}-message {
36
+ font-weight: 500;
37
+ color: @alert-description-color;
38
+ }
39
+
40
+ & .@{alert-prefix-cls}-close-icon {
41
+ font-size: @font-size-lg;
42
+ }
43
+
44
+ &.@{alert-prefix-cls}-with-description {
45
+ padding: 16px 20px 16px 48px;
46
+ }
47
+
48
+ &.@{alert-prefix-cls}.@{alert-prefix-cls}-no-icon {
49
+ padding: 8px 20px;
50
+ }
51
+
52
+ &.@{alert-prefix-cls}-with-description.@{alert-prefix-cls}-no-icon {
53
+ padding: 16px 20px;
54
+ }
55
+
56
+ &.@{alert-prefix-cls}-with-description i.@{alert-prefix-cls}-icon {
57
+ top: 18px;
58
+ font-size: @font-size-xl;
59
+ }
60
+ }
61
+
62
+
63
+ .@{alert-prefix-cls}-success {
64
+ .action-btn {
65
+ background-color: @alert-success-bg-color;
66
+ color: @green-6;
67
+ a {
68
+ color: @green-6;
69
+ }
70
+ }
71
+ .@{alert-prefix-cls}-close-icon {
72
+ .@{iconfont-css-prefix}-close {
73
+ color: @alert-success-icon-color;
74
+ }
75
+ }
76
+ }
77
+
78
+ .@{alert-prefix-cls}-info {
79
+ .action-btn {
80
+ background-color: @alert-info-bg-color;
81
+ color: @alert-info-icon-color;
82
+ a {
83
+ color: @alert-info-icon-color;
84
+ }
85
+ }
86
+ .@{alert-prefix-cls}-close-icon {
87
+ .@{iconfont-css-prefix}-close {
88
+ color: @alert-info-icon-color;
89
+ }
90
+ }
91
+ }
92
+
93
+ .@{alert-prefix-cls}-warning {
94
+ .action-btn {
95
+ background-color: @alert-warning-bg-color;
96
+ color: @gold-7;
97
+ a {
98
+ color: @gold-7;
99
+ }
100
+ }
101
+ .@{alert-prefix-cls}-close-icon {
102
+ .@{iconfont-css-prefix}-close {
103
+ color: @alert-warning-icon-color;
104
+ }
105
+ }
106
+ }
107
+
108
+ .@{alert-prefix-cls}-error {
109
+ .action-btn {
110
+ background-color: @alert-error-bg-color;
111
+ color: @red-6;
112
+ a {
113
+ color: @red-6;
114
+ }
115
+ }
116
+ .@{alert-prefix-cls}-close-icon {
117
+ .@{iconfont-css-prefix}-close {
118
+ color: @alert-error-icon-color;
119
+ }
120
+ }
121
+ }
122
+
123
+ .@{alert-prefix-cls} {
124
+ >
125
+ .@{alert-prefix-cls}-icon {
126
+ font-size: @font-size-lg;
127
+ }
128
+ }
@@ -1,4 +1,4 @@
1
- import Alert from 'antd/lib/alert';
1
+ import Alert from './alert';
2
2
  import './style';
3
3
  export * from 'antd/lib/alert';
4
4
  export default Alert;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/alert/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,eAAe,CAAA;AAEjC,OAAO,SAAS,CAAA;AAEhB,cAAc,eAAe,CAAA;AAE7B,eAAe,KAAK,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/alert/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,SAAS,CAAA;AAE3B,OAAO,SAAS,CAAA;AAEhB,cAAc,eAAe,CAAA;AAE7B,eAAe,KAAK,CAAA"}
@@ -1,24 +1,23 @@
1
1
  "use strict";
2
2
 
3
- 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); }
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
7
6
  var _exportNames = {};
8
7
  exports["default"] = void 0;
9
- var _alert = _interopRequireWildcard(require("antd/lib/alert"));
10
- Object.keys(_alert).forEach(function (key) {
8
+ var _alert = _interopRequireDefault(require("./alert"));
9
+ require("./style");
10
+ var _alert2 = require("antd/lib/alert");
11
+ Object.keys(_alert2).forEach(function (key) {
11
12
  if (key === "default" || key === "__esModule") return;
12
13
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
13
- if (key in exports && exports[key] === _alert[key]) return;
14
+ if (key in exports && exports[key] === _alert2[key]) return;
14
15
  Object.defineProperty(exports, key, {
15
16
  enumerable: true,
16
17
  get: function get() {
17
- return _alert[key];
18
+ return _alert2[key];
18
19
  }
19
20
  });
20
21
  });
21
- require("./style");
22
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
23
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
22
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
24
23
  var _default = exports["default"] = _alert["default"];
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/alert/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,0DAAiC;AAEjC,mBAAgB;AAEhB,gDAA6B;AAE7B,kBAAe,eAAK,CAAA","sourcesContent":["import Alert from 'antd/lib/alert'\n\nimport './style'\n\nexport * from 'antd/lib/alert'\n\nexport default Alert\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/alert/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,oDAA2B;AAE3B,mBAAgB;AAEhB,gDAA6B;AAE7B,kBAAe,eAAK,CAAA","sourcesContent":["import Alert from './alert'\n\nimport './style'\n\nexport * from 'antd/lib/alert'\n\nexport default Alert\n"]}
@@ -1,5 +1,6 @@
1
1
  @import '../../style/themes/index';
2
2
  @import '../../style/mixins/index';
3
+ @import '../alert';
3
4
 
4
5
  @alert-prefix-cls: ~'@{ant-prefix}-alert';
5
6
 
@@ -1,14 +1,19 @@
1
1
  import React from 'react';
2
- import type { ButtonProps as AntdButtonProps } from 'antd/lib/button';
2
+ import type { ButtonProps as AntdButtonProps, ButtonGroupProps as AntdButtonGroupProps, ButtonType } from 'antd/lib/button';
3
3
  import { default as AntdButton } from 'antd/lib/button';
4
4
  export * from 'antd/lib/button';
5
- export { ButtonShape, ButtonSize, ButtonType, ButtonGroupProps } from 'antd/lib/button';
6
- export interface ButtonProps extends AntdButtonProps {
5
+ export declare type TntButtonType = ButtonType | 'tertiary';
6
+ export interface ButtonProps extends Omit<AntdButtonProps, 'size' | 'type'> {
7
7
  upperCaseIgnore?: [];
8
8
  unUpperConverted?: boolean;
9
+ size?: 'large' | 'default' | 'small' | 'mini';
10
+ type?: 'default' | 'primary' | 'tertiary' | 'ghost' | 'dashed' | 'danger' | 'link';
11
+ }
12
+ export interface ButtonGroupProps extends Omit<AntdButtonGroupProps, 'size'> {
13
+ size?: 'large' | 'default' | 'small' | 'mini';
9
14
  }
10
15
  interface ButtonComponent extends React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<AntdButton>> {
11
- Group: typeof AntdButton.Group;
16
+ Group: React.FC<ButtonGroupProps>;
12
17
  }
13
18
  export declare const Button: ButtonComponent;
14
19
  //# sourceMappingURL=button.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/button/button.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAqB,MAAM,OAAO,CAAA;AACzC,OAAO,KAAK,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAEpE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAEtD,cAAc,gBAAgB,CAAA;AAC9B,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAEtF,MAAM,WAAW,WAAY,SAAQ,eAAe;IAClD,eAAe,CAAC,EAAE,EAAE,CAAA;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B;AAED,UAAU,eACR,SAAQ,KAAK,CAAC,yBAAyB,CAAC,WAAW,GAAG,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IACtF,KAAK,EAAE,OAAO,UAAU,CAAC,KAAK,CAAA;CAC/B;AAED,eAAO,MAAM,MAAM,iBAkBC,CAAA"}
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/button/button.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAqB,MAAM,OAAO,CAAA;AACzC,OAAO,KAAK,EACV,WAAW,IAAI,eAAe,EAC9B,gBAAgB,IAAI,oBAAoB,EACxC,UAAU,EACX,MAAM,gBAAgB,CAAA;AAEvB,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAItD,cAAc,gBAAgB,CAAA;AAE9B,oBAAY,aAAa,GAAG,UAAU,GAAG,UAAU,CAAA;AACnD,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,CAAC;IACzE,eAAe,CAAC,EAAE,EAAE,CAAA;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAA;IAC7C,IAAI,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAA;CACnF;AACD,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,oBAAoB,EAAE,MAAM,CAAC;IAC1E,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAA;CAC9C;AAED,UAAU,eACR,SAAQ,KAAK,CAAC,yBAAyB,CAAC,WAAW,GAAG,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IACtF,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAAC,CAAA;CAClC;AAID,eAAO,MAAM,MAAM,iBA8BC,CAAA"}
@@ -23,8 +23,13 @@ Object.keys(_button).forEach(function (key) {
23
23
  });
24
24
  });
25
25
  var _lang = require("../utils/lang");
26
+ var _classnames = _interopRequireDefault(require("classnames"));
27
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
26
28
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
27
29
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
30
+ 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; }
31
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
32
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
28
33
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
29
34
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
30
35
  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); }
@@ -48,11 +53,15 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
48
53
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
49
54
  */
50
55
 
56
+ var tntPrefixCls = 'tnt-btn';
51
57
  var Button = exports.Button = (0, _react.forwardRef)(function (_a, ref) {
52
- var children = _a.children,
58
+ var className = _a.className,
59
+ size = _a.size,
60
+ type = _a.type,
61
+ children = _a.children,
53
62
  unUpperConverted = _a.unUpperConverted,
54
63
  upperCaseIgnore = _a.upperCaseIgnore,
55
- rest = __rest(_a, ["children", "unUpperConverted", "upperCaseIgnore"]);
64
+ rest = __rest(_a, ["className", "size", "type", "children", "unUpperConverted", "upperCaseIgnore"]);
56
65
  var newChildren = children;
57
66
  if (!unUpperConverted && newChildren) {
58
67
  if (typeof newChildren === 'string') {
@@ -66,9 +75,24 @@ var Button = exports.Button = (0, _react.forwardRef)(function (_a, ref) {
66
75
  return _react["default"].createElement(_configProvider.ConfigConsumer, null, function (_ref) {
67
76
  var getPrefixCls = _ref.getPrefixCls;
68
77
  return _react["default"].createElement(_button["default"], Object.assign({}, rest, {
78
+ type: type === 'tertiary' ? undefined : type,
79
+ size: size === 'mini' ? undefined : size,
80
+ className: (0, _classnames["default"])(className, tntPrefixCls, _defineProperty(_defineProperty({}, "".concat(tntPrefixCls, "-mini"), size === 'mini'), "".concat(tntPrefixCls, "-tertiary"), type === 'tertiary')),
69
81
  children: newChildren,
70
82
  ref: ref
71
83
  }));
72
84
  });
73
85
  });
74
- Button.Group = _button["default"].Group;
86
+ var ButtonGroup = function ButtonGroup(_a) {
87
+ var className = _a.className,
88
+ size = _a.size,
89
+ rest = __rest(_a, ["className", "size"]);
90
+ return _react["default"].createElement(_configProvider.ConfigConsumer, null, function (_ref2) {
91
+ var getPrefixCls = _ref2.getPrefixCls;
92
+ return _react["default"].createElement(_button["default"].Group, Object.assign({}, rest, {
93
+ size: size === 'mini' ? undefined : size,
94
+ className: (0, _classnames["default"])(className, _defineProperty({}, "".concat(tntPrefixCls, "-group-mini"), size === 'mini'))
95
+ }));
96
+ });
97
+ };
98
+ Button.Group = ButtonGroup;
@@ -1 +1 @@
1
- {"version":3,"file":"button.js","sourceRoot":"","sources":["../../src/button/button.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;GAOG;AACH,+CAAyC;AAEzC,6DAAwD;AACxD,4DAAsD;AACtD,wCAA8C;AAC9C,iDAA8B;AAC9B,yCAAsF;AAYzE,QAAA,MAAM,GAAG,IAAA,kBAAU,EAC9B,CAAC,EAAwD,EAAE,GAAG,EAAE,EAAE;QAAjE,EAAE,QAAQ,EAAE,gBAAgB,EAAE,eAAe,OAAW,EAAN,IAAI,cAAtD,mDAAwD,CAAF;IACrD,IAAI,WAAW,GAAG,QAAQ,CAAA;IAC1B,IAAI,CAAC,gBAAgB,IAAI,WAAW,EAAE;QACpC,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;YACnC,WAAW,GAAG,IAAA,qBAAc,EAAC,WAAW,EAAE,eAAe,CAAC,CAAA;SAC3D;aAAM,IAAI,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE;YACrC,WAAW,GAAG,CAAC,GAAG,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,IAAA,qBAAc,EAAC,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAA;SAC5F;KACF;IACD,OAAO,CACL,8BAAC,gCAAc,QACZ,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;QACpB,OAAO,8BAAC,gBAAU,oBAAK,IAAI,IAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,EAAE,GAAG,IAAI,CAAA;IAClE,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CACiB,CAAA;AAEpB,cAAM,CAAC,KAAK,GAAG,gBAAU,CAAC,KAAK,CAAA","sourcesContent":["/*\n * @Author: 周泽飞 zefei.zhou@tongdun.net\n * @Date: 2023-10-26 09:46:28\n * @LastEditors: 周泽飞 zefei.zhou@tongdun.net\n * @LastEditTime: 2023-10-31 09:59:35\n * @FilePath: /tntd/packages/tntd/src/button/button.tsx\n * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE\n */\nimport React, { forwardRef } from 'react'\nimport type { ButtonProps as AntdButtonProps } from 'antd/lib/button'\nimport { ConfigConsumer } from 'antd/lib/config-provider'\nimport { default as AntdButton } from 'antd/lib/button'\nimport { titleCaseUpper } from '../utils/lang'\nexport * from 'antd/lib/button'\nexport { ButtonShape, ButtonSize, ButtonType, ButtonGroupProps } from 'antd/lib/button'\n\nexport interface ButtonProps extends AntdButtonProps {\n upperCaseIgnore?: []\n unUpperConverted?: boolean\n}\n\ninterface ButtonComponent\n extends React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<AntdButton>> {\n Group: typeof AntdButton.Group\n}\n\nexport const Button = forwardRef<AntdButton, ButtonProps>(\n ({ children, unUpperConverted, upperCaseIgnore, ...rest }, ref) => {\n let newChildren = children\n if (!unUpperConverted && newChildren) {\n if (typeof newChildren === 'string') {\n newChildren = titleCaseUpper(newChildren, upperCaseIgnore)\n } else if (Array.isArray(newChildren)) {\n newChildren = [...newChildren].map((subChild) => titleCaseUpper(subChild, upperCaseIgnore))\n }\n }\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n return <AntdButton {...rest} children={newChildren} ref={ref} />\n }}\n </ConfigConsumer>\n )\n }\n) as ButtonComponent\n\nButton.Group = AntdButton.Group\n"]}
1
+ {"version":3,"file":"button.js","sourceRoot":"","sources":["../../src/button/button.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;GAOG;AACH,+CAAyC;AAMzC,6DAAwD;AACxD,4DAAsD;AACtD,wCAA8C;AAC9C,4DAAmC;AAEnC,iDAA8B;AAkB9B,MAAM,YAAY,GAAG,SAAS,CAAA;AAEjB,QAAA,MAAM,GAAG,IAAA,kBAAU,EAC9B,CAAC,EAA+E,EAAE,GAAG,EAAE,EAAE;QAAxF,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,gBAAgB,EAAE,eAAe,OAAW,EAAN,IAAI,cAA7E,gFAA+E,CAAF;IAC5E,IAAI,WAAW,GAAG,QAAQ,CAAA;IAC1B,IAAI,CAAC,gBAAgB,IAAI,WAAW,EAAE;QACpC,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;YACnC,WAAW,GAAG,IAAA,qBAAc,EAAC,WAAW,EAAE,eAAe,CAAC,CAAA;SAC3D;aAAM,IAAI,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE;YACrC,WAAW,GAAG,CAAC,GAAG,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,IAAA,qBAAc,EAAC,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAA;SAC5F;KACF;IACD,OAAO,CACL,8BAAC,gCAAc,QACZ,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;QACpB,OAAO,CACL,8BAAC,gBAAU,oBACL,IAAI,IACR,IAAI,EAAE,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,EAC5C,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,EACxC,SAAS,EAAE,IAAA,oBAAU,EAAC,SAAS,EAAE,YAAY,EAAE;gBAC7C,CAAC,GAAG,YAAY,OAAO,CAAC,EAAE,IAAI,KAAK,MAAM;gBACzC,CAAC,GAAG,YAAY,WAAW,CAAC,EAAE,IAAI,KAAK,UAAU;aAClD,CAAC,EACF,QAAQ,EAAE,WAAW,EACrB,GAAG,EAAE,GAAG,IACR,CACH,CAAA;IACH,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CACiB,CAAA;AAEpB,MAAM,WAAW,GAA+B,CAAC,EAA4B,EAAE,EAAE;QAAhC,EAAE,SAAS,EAAE,IAAI,OAAW,EAAN,IAAI,cAA1B,qBAA4B,CAAF;IACzE,OAAO,CACL,8BAAC,gCAAc,QACZ,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;QACpB,OAAO,CACL,8BAAC,gBAAU,CAAC,KAAK,oBACX,IAAI,IACR,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,EACxC,SAAS,EAAE,IAAA,oBAAU,EAAC,SAAS,EAAE;gBAC/B,CAAC,GAAG,YAAY,aAAa,CAAC,EAAE,IAAI,KAAK,MAAM;aAChD,CAAC,IACF,CACH,CAAA;IACH,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CAAA;AAED,cAAM,CAAC,KAAK,GAAG,WAAW,CAAA","sourcesContent":["/*\n * @Author: 周泽飞 zefei.zhou@tongdun.net\n * @Date: 2023-10-26 09:46:28\n * @LastEditors: 周泽飞 zefei.zhou@tongdun.net\n * @LastEditTime: 2023-10-31 09:59:35\n * @FilePath: /tntd/packages/tntd/src/button/button.tsx\n * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE\n */\nimport React, { forwardRef } from 'react'\nimport type {\n ButtonProps as AntdButtonProps,\n ButtonGroupProps as AntdButtonGroupProps,\n ButtonType,\n} from 'antd/lib/button'\nimport { ConfigConsumer } from 'antd/lib/config-provider'\nimport { default as AntdButton } from 'antd/lib/button'\nimport { titleCaseUpper } from '../utils/lang'\nimport classNames from 'classnames'\n\nexport * from 'antd/lib/button'\n\nexport type TntButtonType = ButtonType | 'tertiary'\nexport interface ButtonProps extends Omit<AntdButtonProps, 'size' | 'type'> {\n upperCaseIgnore?: []\n unUpperConverted?: boolean\n size?: 'large' | 'default' | 'small' | 'mini'\n type?: 'default' | 'primary' | 'tertiary' | 'ghost' | 'dashed' | 'danger' | 'link'\n}\nexport interface ButtonGroupProps extends Omit<AntdButtonGroupProps, 'size'> {\n size?: 'large' | 'default' | 'small' | 'mini'\n}\n\ninterface ButtonComponent\n extends React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<AntdButton>> {\n Group: React.FC<ButtonGroupProps>\n}\n\nconst tntPrefixCls = 'tnt-btn'\n\nexport const Button = forwardRef<AntdButton, ButtonProps>(\n ({ className, size, type, children, unUpperConverted, upperCaseIgnore, ...rest }, ref) => {\n let newChildren = children\n if (!unUpperConverted && newChildren) {\n if (typeof newChildren === 'string') {\n newChildren = titleCaseUpper(newChildren, upperCaseIgnore)\n } else if (Array.isArray(newChildren)) {\n newChildren = [...newChildren].map((subChild) => titleCaseUpper(subChild, upperCaseIgnore))\n }\n }\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n return (\n <AntdButton\n {...rest}\n type={type === 'tertiary' ? undefined : type}\n size={size === 'mini' ? undefined : size}\n className={classNames(className, tntPrefixCls, {\n [`${tntPrefixCls}-mini`]: size === 'mini',\n [`${tntPrefixCls}-tertiary`]: type === 'tertiary',\n })}\n children={newChildren}\n ref={ref}\n />\n )\n }}\n </ConfigConsumer>\n )\n }\n) as ButtonComponent\n\nconst ButtonGroup: React.FC<ButtonGroupProps> = ({ className, size, ...rest }) => {\n return (\n <ConfigConsumer>\n {({ getPrefixCls }) => {\n return (\n <AntdButton.Group\n {...rest}\n size={size === 'mini' ? undefined : size}\n className={classNames(className, {\n [`${tntPrefixCls}-group-mini`]: size === 'mini',\n })}\n />\n )\n }}\n </ConfigConsumer>\n )\n}\n\nButton.Group = ButtonGroup\n"]}
@@ -0,0 +1,72 @@
1
+ @import './style/mixin.less';
2
+ @import '../style/mixins/size.less';
3
+
4
+ @btn-prefix-cls: ~'@{ant-prefix}-btn';
5
+
6
+ .tnt-btn {
7
+ &-tertiary {
8
+ .button-variant-tertiary(@btn-default-color, @primary-color, @btn-tertiary-bg);
9
+ }
10
+ &.@{btn-prefix-cls}-primary {
11
+ .button-disabled(@btn-primary-color, @blue-3, @blue-3);
12
+ }
13
+ &.@{btn-prefix-cls}-danger {
14
+ .button-disabled(@btn-primary-color, @red-3, @red-3);
15
+ }
16
+ &.@{btn-prefix-cls}-link {
17
+ .button-disabled(@blue-3, transparent, transparent);
18
+ }
19
+ &.tnt-btn-mini {
20
+ .button-size(@btn-height-mini; @btn-padding-mini; @btn-font-size-mini; @btn-border-radius-sm);
21
+ &.@{btn-prefix-cls}-icon-only {
22
+ .square(@btn-height-mini);
23
+ padding-right: 0;
24
+ padding-left: 0;
25
+ }
26
+ &.@{btn-prefix-cls}-circle {
27
+ min-width: @btn-height-mini;
28
+ border-radius: 50%;
29
+ }
30
+ &.@{btn-prefix-cls}-round {
31
+ .button-size(@btn-circle-size-mini; 0 @btn-circle-size-mini / 2; @btn-font-size-mini; @btn-circle-size-mini);
32
+ &.@{btn-prefix-cls}-icon-only {
33
+ width: auto;
34
+ }
35
+ }
36
+ }
37
+ &-group-mini {
38
+ & > .@{btn-prefix-cls},
39
+ & > span > .@{btn-prefix-cls} {
40
+ .button-size(@btn-height-mini; @btn-padding-mini; @btn-font-size-mini; 0);
41
+ line-height: calc(@btn-height-mini - 2px);
42
+ }
43
+ & > .@{btn-prefix-cls}.@{btn-prefix-cls}-icon-only {
44
+ .square(@btn-height-mini);
45
+ padding-right: 0;
46
+ padding-left: 0;
47
+ }
48
+ }
49
+ }
50
+
51
+ .button-variant-tertiary(@color; @hover-color; @background) {
52
+ .button-color(@color; @background; @background);
53
+
54
+ text-shadow: @btn-text-shadow;
55
+ box-shadow: @btn-primary-shadow;
56
+
57
+ &:hover,
58
+ &:focus {
59
+ .button-color(
60
+ @hover-color; ~`colorPalette('@{background}', 5) `; ~`colorPalette('@{background}', 5) `
61
+ );
62
+ }
63
+
64
+ &:active,
65
+ &.active {
66
+ .button-color(
67
+ @hover-color; ~`colorPalette('@{background}', 6) `; ~`colorPalette('@{background}', 6) `
68
+ );
69
+ }
70
+
71
+ .button-disabled(@btn-disable-color; @btn-disable-bg; transparent);
72
+ }
@@ -1,4 +1,5 @@
1
1
  import './style';
2
+ import './button.less';
2
3
  import { Button } from './button';
3
4
  export * from './button';
4
5
  export default Button;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/button/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,CAAA;AAChB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEjC,cAAc,UAAU,CAAA;AAExB,eAAe,MAAM,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/button/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,CAAA;AAChB,OAAO,eAAe,CAAA;AACtB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEjC,cAAc,UAAU,CAAA;AAExB,eAAe,MAAM,CAAA"}
@@ -6,16 +6,17 @@ Object.defineProperty(exports, "__esModule", {
6
6
  var _exportNames = {};
7
7
  exports["default"] = void 0;
8
8
  require("./style");
9
- var _button = require("./button");
10
- Object.keys(_button).forEach(function (key) {
9
+ require("./button.less");
10
+ var _button2 = require("./button");
11
+ Object.keys(_button2).forEach(function (key) {
11
12
  if (key === "default" || key === "__esModule") return;
12
13
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
13
- if (key in exports && exports[key] === _button[key]) return;
14
+ if (key in exports && exports[key] === _button2[key]) return;
14
15
  Object.defineProperty(exports, key, {
15
16
  enumerable: true,
16
17
  get: function get() {
17
- return _button[key];
18
+ return _button2[key];
18
19
  }
19
20
  });
20
21
  });
21
- var _default = exports["default"] = _button.Button;
22
+ var _default = exports["default"] = _button2.Button;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/button/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mBAAgB;AAChB,qCAAiC;AAEjC,2CAAwB;AAExB,kBAAe,eAAM,CAAA","sourcesContent":["import './style'\nimport { Button } from './button'\n\nexport * from './button'\n\nexport default Button\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/button/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mBAAgB;AAChB,yBAAsB;AACtB,qCAAiC;AAEjC,2CAAwB;AAExB,kBAAe,eAAM,CAAA","sourcesContent":["import './style'\nimport './button.less'\nimport { Button } from './button'\n\nexport * from './button'\n\nexport default Button\n"]}
Binary file
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import type { CheckboxProps as AntdCheckboxProps, CheckboxGroupProps as AntdCheckboxGroupProps } from 'antd/lib/checkbox';
3
+ import AntdCheckbox from 'antd/lib/checkbox';
4
+ export * from 'antd/lib/checkbox';
5
+ export declare type CheckboxProps = AntdCheckboxProps & {
6
+ desc?: string | React.ReactNode;
7
+ };
8
+ export declare type CheckboxGroupProps = AntdCheckboxGroupProps & {
9
+ readonly?: boolean;
10
+ };
11
+ interface CheckboxComponent extends React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<AntdCheckbox>> {
12
+ Group: React.FC<CheckboxGroupProps>;
13
+ }
14
+ declare const Checkbox: CheckboxComponent;
15
+ export default Checkbox;
16
+ //# sourceMappingURL=checkbox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../src/checkbox/checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AACzC,OAAO,KAAK,EACV,aAAa,IAAI,iBAAiB,EAClC,kBAAkB,IAAI,sBAAsB,EAC7C,MAAM,kBAAkB,CAAA;AAEzB,OAAO,YAAY,MAAM,kBAAkB,CAAA;AAM3C,cAAc,kBAAkB,CAAA;AAEhC,oBAAY,aAAa,GAAG,iBAAiB,GAAG;IAC9C,IAAI,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAA;CAChC,CAAA;AACD,oBAAY,kBAAkB,GAAG,sBAAsB,GAAG;IACxD,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,UAAU,iBACR,SAAQ,KAAK,CAAC,yBAAyB,CAAC,aAAa,GAAG,KAAK,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;IAC1F,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAAC,CAAA;CACpC;AAID,QAAA,MAAM,QAAQ,mBAiBQ,CAAA;AAsBtB,eAAe,QAAQ,CAAA"}
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+
3
+ 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); }
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ var _exportNames = {};
8
+ exports["default"] = void 0;
9
+ var _react = _interopRequireWildcard(require("react"));
10
+ var _configProvider = require("antd/lib/config-provider");
11
+ var _checkbox = _interopRequireWildcard(require("antd/lib/checkbox"));
12
+ Object.keys(_checkbox).forEach(function (key) {
13
+ if (key === "default" || key === "__esModule") return;
14
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
15
+ if (key in exports && exports[key] === _checkbox[key]) return;
16
+ Object.defineProperty(exports, key, {
17
+ enumerable: true,
18
+ get: function get() {
19
+ return _checkbox[key];
20
+ }
21
+ });
22
+ });
23
+ var _connect = require("../connect");
24
+ var _previewText = require("../preview-text");
25
+ var _classnames = _interopRequireDefault(require("classnames"));
26
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
27
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
28
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
29
+ var __rest = void 0 && (void 0).__rest || function (s, e) {
30
+ var t = {};
31
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
32
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
33
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
34
+ }
35
+ return t;
36
+ };
37
+ var tntPrefixCls = 'tnt-checkbox';
38
+ var Checkbox = (0, _react.forwardRef)(function (_a, ref) {
39
+ var className = _a.className,
40
+ children = _a.children,
41
+ desc = _a.desc,
42
+ rest = __rest(_a, ["className", "children", "desc"]);
43
+ return _react["default"].createElement(_configProvider.ConfigConsumer, null, function () {
44
+ return _react["default"].createElement(_checkbox["default"], Object.assign({}, rest, {
45
+ ref: ref,
46
+ className: (0, _classnames["default"])(className, tntPrefixCls)
47
+ }), _react["default"].createElement("span", {
48
+ className: "".concat(tntPrefixCls, "-children")
49
+ }, _react["default"].createElement("span", null, children), !!desc && _react["default"].createElement("span", {
50
+ className: "".concat(tntPrefixCls, "-desc")
51
+ }, desc)));
52
+ });
53
+ });
54
+ var CheckboxGroup = (0, _react.forwardRef)(function (_a, ref) {
55
+ var className = _a.className,
56
+ rest = __rest(_a, ["className"]);
57
+ return _react["default"].createElement(_configProvider.ConfigConsumer, null, function () {
58
+ return _react["default"].createElement(_checkbox["default"].Group, Object.assign({}, rest, {
59
+ ref: ref,
60
+ className: (0, _classnames["default"])(className, "".concat(tntPrefixCls, "-group"))
61
+ }));
62
+ });
63
+ });
64
+ Checkbox.Group = (0, _connect.connectReadonlyComponent)(CheckboxGroup, _previewText.PreviewText.Select);
65
+ var _default = exports["default"] = Checkbox;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkbox.js","sourceRoot":"","sources":["../../src/checkbox/checkbox.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAyC;AAKzC,6DAAwD;AACxD,gEAA2C;AAE3C,wCAAqD;AACrD,kDAA6C;AAC7C,4DAAmC;AAEnC,mDAAgC;AAchC,MAAM,YAAY,GAAG,cAAc,CAAA;AAEnC,MAAM,QAAQ,GAAG,IAAA,kBAAU,EACzB,CAAC,EAAsC,EAAE,GAAG,EAAE,EAAE;QAA/C,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,OAAW,EAAN,IAAI,cAApC,iCAAsC,CAAF;IACnC,OAAO,CACL,8BAAC,gCAAc,QACZ,GAAG,EAAE;QACJ,OAAO,CACL,8BAAC,kBAAY,oBAAK,IAAI,IAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,IAAA,oBAAU,EAAC,SAAS,EAAE,YAAY,CAAC;YAC9E,wCAAM,SAAS,EAAE,GAAG,YAAY,WAAW;gBACzC,4CAAO,QAAQ,CAAQ;gBACtB,CAAC,CAAC,IAAI,IAAI,wCAAM,SAAS,EAAE,GAAG,YAAY,OAAO,IAAG,IAAI,CAAQ,CAC5D,CACM,CAChB,CAAA;IACH,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CACmB,CAAA;AAEtB,MAAM,aAAa,GAAG,IAAA,kBAAU,EAC9B,CAAC,EAAsB,EAAE,GAAG,EAAE,EAAE;QAA/B,EAAE,SAAS,OAAW,EAAN,IAAI,cAApB,aAAsB,CAAF;IACnB,OAAO,CACL,8BAAC,gCAAc,QACZ,GAAG,EAAE;QACJ,OAAO,CACL,8BAAC,kBAAY,CAAC,KAAK,oBACb,IAAI,IACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,oBAAU,EAAC,SAAS,EAAE,GAAG,YAAY,QAAQ,CAAC,IACzD,CACH,CAAA;IACH,CAAC,CACc,CAClB,CAAA;AACH,CAAC,CACF,CAAA;AAED,QAAQ,CAAC,KAAK,GAAG,IAAA,kCAAwB,EAAC,aAAa,EAAE,0BAAW,CAAC,MAAM,CAAC,CAAA;AAE5E,kBAAe,QAAQ,CAAA","sourcesContent":["import React, { forwardRef } from 'react'\nimport type {\n CheckboxProps as AntdCheckboxProps,\n CheckboxGroupProps as AntdCheckboxGroupProps,\n} from 'antd/lib/checkbox'\nimport { ConfigConsumer } from 'antd/lib/config-provider'\nimport AntdCheckbox from 'antd/lib/checkbox'\nimport type AntdCheckboxGroup from 'antd/lib/checkbox/Group'\nimport { connectReadonlyComponent } from '../connect'\nimport { PreviewText } from '../preview-text'\nimport classNames from 'classnames'\n\nexport * from 'antd/lib/checkbox'\n\nexport type CheckboxProps = AntdCheckboxProps & {\n desc?: string | React.ReactNode\n}\nexport type CheckboxGroupProps = AntdCheckboxGroupProps & {\n readonly?: boolean\n}\n\ninterface CheckboxComponent\n extends React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<AntdCheckbox>> {\n Group: React.FC<CheckboxGroupProps>\n}\n\nconst tntPrefixCls = 'tnt-checkbox'\n\nconst Checkbox = forwardRef<AntdCheckbox, CheckboxProps>(\n ({ className, children, desc, ...rest }, ref) => {\n return (\n <ConfigConsumer>\n {() => {\n return (\n <AntdCheckbox {...rest} ref={ref} className={classNames(className, tntPrefixCls)}>\n <span className={`${tntPrefixCls}-children`}>\n <span>{children}</span>\n {!!desc && <span className={`${tntPrefixCls}-desc`}>{desc}</span>}\n </span>\n </AntdCheckbox>\n )\n }}\n </ConfigConsumer>\n )\n }\n) as CheckboxComponent\n\nconst CheckboxGroup = forwardRef<AntdCheckboxGroup, CheckboxGroupProps>(\n ({ className, ...rest }, ref) => {\n return (\n <ConfigConsumer>\n {() => {\n return (\n <AntdCheckbox.Group\n {...rest}\n ref={ref}\n className={classNames(className, `${tntPrefixCls}-group`)}\n />\n )\n }}\n </ConfigConsumer>\n )\n }\n)\n\nCheckbox.Group = connectReadonlyComponent(CheckboxGroup, PreviewText.Select)\n\nexport default Checkbox\n"]}