@qn-pandora/pandora-component 3.0.2 → 4.0.0

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 (319) hide show
  1. package/CHANGELOG.json +20 -0
  2. package/CHANGELOG.md +9 -1
  3. package/es/components/AutoComplete/style.css +25 -29
  4. package/es/components/Button/index.d.ts +0 -8
  5. package/es/components/Button/index.js +4 -4
  6. package/es/components/Button/style.css +100 -104
  7. package/es/components/Button/style.less +3 -14
  8. package/es/components/Card/style.css +28 -2
  9. package/es/components/CheckTransformList/Item/index.js +7 -3
  10. package/es/components/CheckTransformList/style.css +50 -21
  11. package/es/components/Checkbox/style.css +1 -1
  12. package/es/components/CheckboxList/index.d.ts +2 -0
  13. package/es/components/CheckboxList/index.js +2 -2
  14. package/es/components/CheckboxList/style.css +5 -3
  15. package/es/components/CheckboxList/style.less +4 -2
  16. package/es/components/Collapse/Panel/index.d.ts +8 -40
  17. package/es/components/Collapse/Panel/index.js +34 -45
  18. package/es/components/Collapse/index.d.ts +15 -20
  19. package/es/components/Collapse/index.js +44 -18
  20. package/es/components/Collapse/style.css +214 -0
  21. package/es/components/Collapse/style.less +57 -0
  22. package/es/components/CollapsiblePanel/style.css +4 -4
  23. package/es/components/CollapsiblePanel/style.less +4 -4
  24. package/es/components/DateTimePicker/Base/index.d.ts +1 -0
  25. package/es/components/DateTimePicker/Base/index.js +29 -13
  26. package/es/components/DateTimePicker/Base/relativeTimePicker.d.ts +1 -0
  27. package/es/components/DateTimePicker/Base/relativeTimePicker.js +16 -3
  28. package/es/components/DateTimePicker/Base/style.css +378 -49
  29. package/es/components/DateTimePicker/Base/style.less +37 -41
  30. package/es/components/DateTimePicker/BaseMobile/Absolute/index.d.ts +1 -0
  31. package/es/components/DateTimePicker/BaseMobile/Absolute/index.js +8 -3
  32. package/es/components/DateTimePicker/BaseMobile/index.d.ts +2 -0
  33. package/es/components/DateTimePicker/BaseMobile/index.js +7 -2
  34. package/es/components/DateTimePicker/BaseMobile/style.css +4 -4
  35. package/es/components/DateTimePicker/BaseMobile/style.less +4 -4
  36. package/es/components/DateTimePicker/Collapse/Panel/index.d.ts +41 -0
  37. package/es/components/DateTimePicker/Collapse/Panel/index.js +51 -0
  38. package/es/components/{Collapse → DateTimePicker/Collapse}/Panel/style.css +0 -0
  39. package/es/components/{Collapse → DateTimePicker/Collapse}/Panel/style.less +1 -1
  40. package/es/components/DateTimePicker/Collapse/index.d.ts +24 -0
  41. package/es/components/DateTimePicker/Collapse/index.js +42 -0
  42. package/es/components/DateTimePicker/DisplayInput/index.d.ts +1 -0
  43. package/es/components/DateTimePicker/DisplayInput/index.js +4 -1
  44. package/es/components/DateTimePicker/DisplayInput/style.css +47 -16
  45. package/es/components/DateTimePicker/constants.d.ts +5 -6
  46. package/es/components/DateTimePicker/constants.js +56 -50
  47. package/es/components/DateTimePicker/index.js +1 -1
  48. package/es/components/DateTimePicker/style.css +7 -7
  49. package/es/components/DateTimePicker/style.less +12 -10
  50. package/es/components/DateTimePicker/time.d.ts +2 -2
  51. package/es/components/DateTimePicker/time.js +17 -11
  52. package/es/components/DateTimePicker/transform.d.ts +4 -0
  53. package/es/components/DateTimePicker/transform.js +52 -0
  54. package/es/components/Drawer/style.css +45 -45
  55. package/es/components/Input/index.d.ts +1 -2
  56. package/es/components/Input/index.js +0 -2
  57. package/es/components/Input/style.css +47 -16
  58. package/es/components/InputNumber/index.d.ts +1 -8
  59. package/es/components/InputNumber/index.js +1 -35
  60. package/es/components/Menu/Option.d.ts +4 -0
  61. package/es/components/Menu/Option.js +2 -1
  62. package/es/components/Menu/index.d.ts +1 -1
  63. package/es/components/Menu/style.css +20 -10
  64. package/es/components/Menu/style.less +10 -0
  65. package/es/components/NameLimiter/style.css +2 -4
  66. package/es/components/NameLimiter/style.less +2 -4
  67. package/es/components/OptionList/OptionItem/style.css +2 -2
  68. package/es/components/OptionList/OptionItem/style.less +2 -2
  69. package/es/components/OptionList/style.css +2 -2
  70. package/es/components/RadioGroup/index.d.ts +53 -0
  71. package/es/components/RadioGroup/index.js +31 -0
  72. package/es/components/{SolidRadioGroup → RadioGroup}/style.css +43 -49
  73. package/es/components/RadioGroup/style.less +32 -0
  74. package/es/components/RangeInput/index.js +13 -7
  75. package/es/components/RangeInput/style.css +427 -27
  76. package/es/components/RemarkName/style.css +2 -4
  77. package/es/components/Selector/index.js +2 -2
  78. package/es/components/Selector/style.css +25 -29
  79. package/es/components/Selector/style.less +27 -28
  80. package/es/components/SolidRadioGroup/index.d.ts +3 -45
  81. package/es/components/SolidRadioGroup/index.js +13 -25
  82. package/es/components/Spin/style.css +0 -1
  83. package/es/components/Steps/ControlButton/index.js +8 -2
  84. package/es/components/Steps/style.css +8 -11
  85. package/es/components/Steps/style.less +9 -12
  86. package/es/components/Table/index.d.ts +1 -0
  87. package/es/components/Table/index.js +14 -5
  88. package/es/components/Table/style.css +91 -25
  89. package/es/components/Table/style.less +20 -20
  90. package/es/components/Tabs/style.css +29 -1
  91. package/es/components/Tabs/style.less +3 -1
  92. package/es/components/TagList/style.css +10 -10
  93. package/es/components/TagList/style.less +1 -1
  94. package/es/components/Timeline/TimelineItem/index.js +6 -4
  95. package/es/components/Timeline/TimelineItem/style.css +1 -2
  96. package/es/components/Timeline/TimelineItem/style.less +1 -2
  97. package/es/components/Transfer/List/index.js +10 -5
  98. package/es/components/Transfer/List/style.css +3 -0
  99. package/es/components/Transfer/List/style.less +4 -0
  100. package/es/components/Transfer/style.css +3 -0
  101. package/es/components/TreeSelector/style.css +64 -20
  102. package/es/components/TreeSelector/style.less +9 -7
  103. package/es/constants/language/check_transform_list/en.d.ts +2 -0
  104. package/es/constants/language/check_transform_list/en.js +5 -0
  105. package/es/constants/language/check_transform_list/type.d.ts +6 -0
  106. package/es/constants/language/check_transform_list/type.js +3 -0
  107. package/es/constants/language/check_transform_list/zh.d.ts +2 -0
  108. package/es/constants/language/check_transform_list/zh.js +5 -0
  109. package/es/constants/language/datetime/en.d.ts +2 -0
  110. package/es/constants/language/datetime/en.js +79 -0
  111. package/es/constants/language/datetime/type.d.ts +80 -0
  112. package/es/constants/language/datetime/type.js +3 -0
  113. package/es/constants/language/datetime/zh.d.ts +2 -0
  114. package/es/constants/language/datetime/zh.js +79 -0
  115. package/es/constants/language/en.d.ts +2 -0
  116. package/es/constants/language/en.js +14 -0
  117. package/es/constants/language/range_input/en.d.ts +2 -0
  118. package/es/constants/language/range_input/en.js +7 -0
  119. package/es/constants/language/range_input/type.d.ts +8 -0
  120. package/es/constants/language/range_input/type.js +3 -0
  121. package/es/constants/language/range_input/zh.d.ts +2 -0
  122. package/es/constants/language/range_input/zh.js +7 -0
  123. package/es/constants/language/steps/en.d.ts +2 -0
  124. package/es/constants/language/steps/en.js +4 -0
  125. package/es/constants/language/steps/type.d.ts +5 -0
  126. package/es/constants/language/steps/type.js +3 -0
  127. package/es/constants/language/steps/zh.d.ts +2 -0
  128. package/es/constants/language/steps/zh.js +4 -0
  129. package/es/constants/language/table/en.d.ts +2 -0
  130. package/es/constants/language/table/en.js +4 -0
  131. package/es/constants/language/table/type.d.ts +5 -0
  132. package/es/constants/language/table/type.js +3 -0
  133. package/es/constants/language/table/zh.d.ts +2 -0
  134. package/es/constants/language/table/zh.js +4 -0
  135. package/es/constants/language/transfer/en.d.ts +2 -0
  136. package/es/constants/language/transfer/en.js +4 -0
  137. package/es/constants/language/transfer/type.d.ts +5 -0
  138. package/es/constants/language/transfer/type.js +3 -0
  139. package/es/constants/language/transfer/zh.d.ts +2 -0
  140. package/es/constants/language/transfer/zh.js +4 -0
  141. package/es/constants/language/type.d.ts +15 -0
  142. package/es/constants/language/type.js +3 -0
  143. package/es/constants/language/zh.d.ts +2 -0
  144. package/es/constants/language/zh.js +14 -0
  145. package/es/index.css +3570 -2886
  146. package/es/index.d.ts +3 -2
  147. package/es/index.js +2 -1
  148. package/es/index.less +4 -5
  149. package/es/style/theme.less +9 -0
  150. package/es/utils/language.d.ts +1 -0
  151. package/es/utils/language.js +15 -0
  152. package/es/utils/languageLocale.d.ts +1 -0
  153. package/es/utils/languageLocale.js +9 -0
  154. package/lib/components/AutoComplete/style.css +25 -29
  155. package/lib/components/Button/index.d.ts +0 -8
  156. package/lib/components/Button/index.js +4 -4
  157. package/lib/components/Button/style.css +100 -104
  158. package/lib/components/Button/style.less +3 -14
  159. package/lib/components/Card/style.css +28 -2
  160. package/lib/components/CheckTransformList/Item/index.js +7 -3
  161. package/lib/components/CheckTransformList/style.css +50 -21
  162. package/lib/components/Checkbox/style.css +1 -1
  163. package/lib/components/CheckboxList/index.d.ts +2 -0
  164. package/lib/components/CheckboxList/index.js +2 -2
  165. package/lib/components/CheckboxList/style.css +5 -3
  166. package/lib/components/CheckboxList/style.less +4 -2
  167. package/lib/components/Collapse/Panel/index.d.ts +8 -40
  168. package/lib/components/Collapse/Panel/index.js +35 -46
  169. package/lib/components/Collapse/index.d.ts +15 -20
  170. package/lib/components/Collapse/index.js +47 -20
  171. package/lib/components/Collapse/style.css +214 -0
  172. package/lib/components/Collapse/style.less +57 -0
  173. package/lib/components/CollapsiblePanel/style.css +4 -4
  174. package/lib/components/CollapsiblePanel/style.less +4 -4
  175. package/lib/components/DateTimePicker/Base/index.d.ts +1 -0
  176. package/lib/components/DateTimePicker/Base/index.js +29 -13
  177. package/lib/components/DateTimePicker/Base/relativeTimePicker.d.ts +1 -0
  178. package/lib/components/DateTimePicker/Base/relativeTimePicker.js +16 -3
  179. package/lib/components/DateTimePicker/Base/style.css +378 -49
  180. package/lib/components/DateTimePicker/Base/style.less +37 -41
  181. package/lib/components/DateTimePicker/BaseMobile/Absolute/index.d.ts +1 -0
  182. package/lib/components/DateTimePicker/BaseMobile/Absolute/index.js +8 -3
  183. package/lib/components/DateTimePicker/BaseMobile/index.d.ts +2 -0
  184. package/lib/components/DateTimePicker/BaseMobile/index.js +7 -2
  185. package/lib/components/DateTimePicker/BaseMobile/style.css +4 -4
  186. package/lib/components/DateTimePicker/BaseMobile/style.less +4 -4
  187. package/lib/components/DateTimePicker/Collapse/Panel/index.d.ts +41 -0
  188. package/lib/components/DateTimePicker/Collapse/Panel/index.js +64 -0
  189. package/lib/components/{Collapse → DateTimePicker/Collapse}/Panel/style.css +0 -0
  190. package/lib/components/{Collapse → DateTimePicker/Collapse}/Panel/style.less +1 -1
  191. package/lib/components/DateTimePicker/Collapse/index.d.ts +24 -0
  192. package/lib/components/DateTimePicker/Collapse/index.js +54 -0
  193. package/lib/components/DateTimePicker/DisplayInput/index.d.ts +1 -0
  194. package/lib/components/DateTimePicker/DisplayInput/index.js +4 -1
  195. package/lib/components/DateTimePicker/DisplayInput/style.css +47 -16
  196. package/lib/components/DateTimePicker/constants.d.ts +5 -6
  197. package/lib/components/DateTimePicker/constants.js +56 -50
  198. package/lib/components/DateTimePicker/index.js +1 -1
  199. package/lib/components/DateTimePicker/style.css +7 -7
  200. package/lib/components/DateTimePicker/style.less +12 -10
  201. package/lib/components/DateTimePicker/time.d.ts +2 -2
  202. package/lib/components/DateTimePicker/time.js +16 -10
  203. package/lib/components/DateTimePicker/transform.d.ts +4 -0
  204. package/lib/components/DateTimePicker/transform.js +53 -0
  205. package/lib/components/Drawer/style.css +45 -45
  206. package/lib/components/Input/index.d.ts +1 -2
  207. package/lib/components/Input/index.js +0 -2
  208. package/lib/components/Input/style.css +47 -16
  209. package/lib/components/InputNumber/index.d.ts +1 -8
  210. package/lib/components/InputNumber/index.js +1 -38
  211. package/lib/components/Menu/Option.d.ts +4 -0
  212. package/lib/components/Menu/Option.js +2 -1
  213. package/lib/components/Menu/index.d.ts +1 -1
  214. package/lib/components/Menu/style.css +20 -10
  215. package/lib/components/Menu/style.less +10 -0
  216. package/lib/components/NameLimiter/style.css +2 -4
  217. package/lib/components/NameLimiter/style.less +2 -4
  218. package/lib/components/OptionList/OptionItem/style.css +2 -2
  219. package/lib/components/OptionList/OptionItem/style.less +2 -2
  220. package/lib/components/OptionList/style.css +2 -2
  221. package/lib/components/RadioGroup/index.d.ts +53 -0
  222. package/lib/components/RadioGroup/index.js +44 -0
  223. package/lib/components/{SolidRadioGroup → RadioGroup}/style.css +43 -49
  224. package/lib/components/RadioGroup/style.less +32 -0
  225. package/lib/components/RangeInput/index.js +13 -7
  226. package/lib/components/RangeInput/style.css +427 -27
  227. package/lib/components/RemarkName/style.css +2 -4
  228. package/lib/components/Selector/index.js +1 -1
  229. package/lib/components/Selector/style.css +25 -29
  230. package/lib/components/Selector/style.less +27 -28
  231. package/lib/components/SolidRadioGroup/index.d.ts +3 -45
  232. package/lib/components/SolidRadioGroup/index.js +13 -25
  233. package/lib/components/Spin/style.css +0 -1
  234. package/lib/components/Steps/ControlButton/index.js +8 -2
  235. package/lib/components/Steps/style.css +8 -11
  236. package/lib/components/Steps/style.less +9 -12
  237. package/lib/components/Table/index.d.ts +1 -0
  238. package/lib/components/Table/index.js +14 -5
  239. package/lib/components/Table/style.css +91 -25
  240. package/lib/components/Table/style.less +20 -20
  241. package/lib/components/Tabs/style.css +29 -1
  242. package/lib/components/Tabs/style.less +3 -1
  243. package/lib/components/TagList/style.css +10 -10
  244. package/lib/components/TagList/style.less +1 -1
  245. package/lib/components/Timeline/TimelineItem/index.js +6 -4
  246. package/lib/components/Timeline/TimelineItem/style.css +1 -2
  247. package/lib/components/Timeline/TimelineItem/style.less +1 -2
  248. package/lib/components/Transfer/List/index.js +9 -4
  249. package/lib/components/Transfer/List/style.css +3 -0
  250. package/lib/components/Transfer/List/style.less +4 -0
  251. package/lib/components/Transfer/style.css +3 -0
  252. package/lib/components/TreeSelector/style.css +64 -20
  253. package/lib/components/TreeSelector/style.less +9 -7
  254. package/lib/constants/language/check_transform_list/en.d.ts +2 -0
  255. package/lib/constants/language/check_transform_list/en.js +7 -0
  256. package/lib/constants/language/check_transform_list/type.d.ts +6 -0
  257. package/lib/constants/language/check_transform_list/type.js +5 -0
  258. package/lib/constants/language/check_transform_list/zh.d.ts +2 -0
  259. package/lib/constants/language/check_transform_list/zh.js +7 -0
  260. package/lib/constants/language/datetime/en.d.ts +2 -0
  261. package/lib/constants/language/datetime/en.js +81 -0
  262. package/lib/constants/language/datetime/type.d.ts +80 -0
  263. package/lib/constants/language/datetime/type.js +5 -0
  264. package/lib/constants/language/datetime/zh.d.ts +2 -0
  265. package/lib/constants/language/datetime/zh.js +81 -0
  266. package/lib/constants/language/en.d.ts +2 -0
  267. package/lib/constants/language/en.js +16 -0
  268. package/lib/constants/language/range_input/en.d.ts +2 -0
  269. package/lib/constants/language/range_input/en.js +9 -0
  270. package/lib/constants/language/range_input/type.d.ts +8 -0
  271. package/lib/constants/language/range_input/type.js +5 -0
  272. package/lib/constants/language/range_input/zh.d.ts +2 -0
  273. package/lib/constants/language/range_input/zh.js +9 -0
  274. package/lib/constants/language/steps/en.d.ts +2 -0
  275. package/lib/constants/language/steps/en.js +6 -0
  276. package/lib/constants/language/steps/type.d.ts +5 -0
  277. package/lib/constants/language/steps/type.js +5 -0
  278. package/lib/constants/language/steps/zh.d.ts +2 -0
  279. package/lib/constants/language/steps/zh.js +6 -0
  280. package/lib/constants/language/table/en.d.ts +2 -0
  281. package/lib/constants/language/table/en.js +6 -0
  282. package/lib/constants/language/table/type.d.ts +5 -0
  283. package/lib/constants/language/table/type.js +5 -0
  284. package/lib/constants/language/table/zh.d.ts +2 -0
  285. package/lib/constants/language/table/zh.js +6 -0
  286. package/lib/constants/language/transfer/en.d.ts +2 -0
  287. package/lib/constants/language/transfer/en.js +6 -0
  288. package/lib/constants/language/transfer/type.d.ts +5 -0
  289. package/lib/constants/language/transfer/type.js +5 -0
  290. package/lib/constants/language/transfer/zh.d.ts +2 -0
  291. package/lib/constants/language/transfer/zh.js +6 -0
  292. package/lib/constants/language/type.d.ts +15 -0
  293. package/lib/constants/language/type.js +5 -0
  294. package/lib/constants/language/zh.d.ts +2 -0
  295. package/lib/constants/language/zh.js +16 -0
  296. package/lib/index.css +3637 -2953
  297. package/lib/index.d.ts +3 -2
  298. package/lib/index.js +3 -0
  299. package/lib/index.less +7 -8
  300. package/lib/style/theme.less +9 -0
  301. package/lib/utils/language.d.ts +1 -0
  302. package/lib/utils/language.js +21 -0
  303. package/lib/utils/languageLocale.d.ts +1 -0
  304. package/lib/utils/languageLocale.js +12 -0
  305. package/package.json +15 -41
  306. package/es/components/Collapse/stories/style.stories.css +0 -12
  307. package/es/components/Collapse/stories/style.stories.less +0 -7
  308. package/es/components/Input/NumberInput/index.d.ts +0 -29
  309. package/es/components/Input/NumberInput/index.js +0 -116
  310. package/es/components/InputNumber/style.css +0 -400
  311. package/es/components/InputNumber/style.less +0 -45
  312. package/es/components/SolidRadioGroup/style.less +0 -39
  313. package/lib/components/Collapse/stories/style.stories.css +0 -12
  314. package/lib/components/Collapse/stories/style.stories.less +0 -7
  315. package/lib/components/Input/NumberInput/index.d.ts +0 -29
  316. package/lib/components/Input/NumberInput/index.js +0 -121
  317. package/lib/components/InputNumber/style.css +0 -400
  318. package/lib/components/InputNumber/style.less +0 -45
  319. package/lib/components/SolidRadioGroup/style.less +0 -39
@@ -43,7 +43,7 @@ var __rest = (this && this.__rest) || function (s, e) {
43
43
  return t;
44
44
  };
45
45
  import * as React from 'react';
46
- import { isArray, concat } from 'lodash';
46
+ import { isArray, concat, isNumber, toString } from 'lodash';
47
47
  import classnames from 'classnames';
48
48
  import { Checkbox, Select } from 'antd';
49
49
  import PropTypes from 'prop-types';
@@ -74,7 +74,7 @@ var formatOptions = function (options) {
74
74
  var getOptionComponent = function (options) {
75
75
  return options.map(function (option) {
76
76
  var key = option.key, value = option.value, disabled = option.disabled, text = option.text;
77
- return (React.createElement(Select.Option, { key: key || value, value: value, disabled: disabled }, text));
77
+ return (React.createElement(Select.Option, { key: key || value, value: value, disabled: disabled }, isNumber(text) ? toString(text) : text));
78
78
  });
79
79
  };
80
80
  var getGroupComponent = function (options, groupOptions) {
@@ -379,11 +379,11 @@
379
379
  cursor: auto;
380
380
  }
381
381
  .ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) .ant-select-selector {
382
- border-color: #528cde;
382
+ border-color: #9ca0a6;
383
+ -webkit-box-shadow: 0 0 0 2px rgba(122, 134, 154, 0.2);
384
+ box-shadow: 0 0 0 2px rgba(122, 134, 154, 0.2);
383
385
  border-right-width: 1px !important;
384
386
  outline: 0;
385
- -webkit-box-shadow: 0 0 0 2px rgba(44, 109, 210, 0.2);
386
- box-shadow: 0 0 0 2px rgba(44, 109, 210, 0.2);
387
387
  }
388
388
  .ant-select-disabled.ant-select:not(.ant-select-customize-input) .ant-select-selector {
389
389
  color: rgba(0, 0, 0, 0.25);
@@ -408,6 +408,7 @@
408
408
  }
409
409
  .ant-select:not(.ant-select-customize-input) .ant-select-selector .ant-select-selection-search-input::-webkit-search-cancel-button {
410
410
  display: none;
411
+ /* stylelint-disable-next-line property-no-vendor-prefix */
411
412
  -webkit-appearance: none;
412
413
  }
413
414
  .ant-select:not(.ant-select-disabled):hover .ant-select-selector {
@@ -419,6 +420,7 @@
419
420
  -ms-flex: 1;
420
421
  flex: 1;
421
422
  overflow: hidden;
423
+ font-weight: normal;
422
424
  white-space: nowrap;
423
425
  text-overflow: ellipsis;
424
426
  }
@@ -803,7 +805,7 @@
803
805
  .ant-checkbox-inner::after {
804
806
  position: absolute;
805
807
  top: 50%;
806
- left: 22%;
808
+ left: 21.5%;
807
809
  display: table;
808
810
  width: 5.71428571px;
809
811
  height: 9.14285714px;
@@ -984,16 +986,13 @@
984
986
  .pandora-sdk-selector .ant-select-selection:hover .ant-select-selection__clear + .ant-select-arrow {
985
987
  opacity: 0;
986
988
  }
987
- .pandora-sdk-selector .ant-select-selection__choice {
988
- color: #666 !important;
989
- background: #f5f5f5 !important;
989
+ .pandora-sdk-selector.ant-select-multiple .ant-select-selection-item {
990
+ color: #666;
991
+ background: #f5f5f5;
990
992
  border: none;
991
993
  }
992
- .pandora-sdk-selector .ant-select-selection__choice__remove {
993
- color: #d9d9d9 !important;
994
- }
995
- .pandora-sdk-selector .ant-select-selection__choice__remove i {
996
- font-size: 12px;
994
+ .pandora-sdk-selector .ant-select-selection-item-remove {
995
+ color: #d9d9d9;
997
996
  }
998
997
  .pandora-sdk-selector .ant-select-selection--single {
999
998
  height: 32px;
@@ -1008,17 +1007,6 @@
1008
1007
  .pandora-sdk-selector .ant-select-selection__clear i {
1009
1008
  color: inherit;
1010
1009
  }
1011
- .pandora-sdk-selector-dropdown .pandora-sdk-selector-create-option {
1012
- color: #2c6dd2 !important;
1013
- cursor: default !important;
1014
- }
1015
- .pandora-sdk-selector-dropdown .pandora-sdk-selector-create-option::before,
1016
- .pandora-sdk-selector-dropdown .pandora-sdk-selector-create-option::after {
1017
- content: none !important;
1018
- }
1019
- .pandora-sdk-selector-dropdown .pandora-sdk-selector-create-option a {
1020
- color: #2c6dd2;
1021
- }
1022
1010
  .pandora-sdk-selector-dropdown .ant-select-dropdown-menu {
1023
1011
  margin: 0;
1024
1012
  }
@@ -1046,15 +1034,12 @@
1046
1034
  background: transparent;
1047
1035
  }
1048
1036
  .pandora-sdk-selector-dropdown .ant-select-item-option-disabled {
1049
- color: #d9d9d9 !important;
1037
+ color: #d9d9d9;
1050
1038
  }
1051
1039
  .pandora-sdk-selector-dropdown .ant-select-item-option-selected {
1052
1040
  color: #2c6dd2;
1053
1041
  font-weight: 400;
1054
1042
  }
1055
- .pandora-sdk-selector-dropdown .ant-select-item-option-selected::after {
1056
- color: #2c6dd2 !important;
1057
- }
1058
1043
  .pandora-sdk-selector-dropdown .ant-select-item-option:hover {
1059
1044
  color: #2c6dd2;
1060
1045
  }
@@ -1069,8 +1054,19 @@
1069
1054
  overflow: unset;
1070
1055
  text-overflow: unset;
1071
1056
  }
1072
- .pandora-sdk-selector-dropdown.ant-select-dropdown--multiple .ant-select-dropdown-menu-item-selected .ant-select-selected-icon {
1073
- color: inherit !important;
1057
+ .pandora-sdk-selector-dropdown .pandora-sdk-selector-create-option {
1058
+ color: #2c6dd2;
1059
+ cursor: default;
1060
+ }
1061
+ .pandora-sdk-selector-dropdown .pandora-sdk-selector-create-option::before,
1062
+ .pandora-sdk-selector-dropdown .pandora-sdk-selector-create-option::after {
1063
+ content: none;
1064
+ }
1065
+ .pandora-sdk-selector-dropdown .pandora-sdk-selector-create-option a {
1066
+ color: #2c6dd2;
1067
+ }
1068
+ .pandora-sdk-selector-dropdown .ant-select-item-option-selected:not(.ant-select-item-option-disabled) .ant-select-item-option-state .anticon-check.anticon {
1069
+ color: #2c6dd2;
1074
1070
  }
1075
1071
  .pandora-sdk-selector-create-lint {
1076
1072
  display: block;
@@ -14,17 +14,16 @@
14
14
  }
15
15
  }
16
16
  }
17
- .@{ant-prefix}-select-selection__choice {
18
- color: @font-color-6!important;
19
- background: @select-selection-bg!important;
20
- border: none;
21
- }
22
- .@{ant-prefix}-select-selection__choice__remove {
23
- color: @font-disable-color !important;
24
- i {
25
- font-size: 12px;
17
+ &.@{ant-prefix}-select-multiple {
18
+ .@{ant-prefix}-select-selection-item {
19
+ color: @font-color-6;
20
+ background: @select-selection-bg;
21
+ border: none;
26
22
  }
27
23
  }
24
+ .@{ant-prefix}-select-selection-item-remove {
25
+ color: @font-disable-color;
26
+ }
28
27
  .@{ant-prefix}-select-selection--single {
29
28
  height: 32px;
30
29
  }
@@ -41,30 +40,16 @@
41
40
  }
42
41
 
43
42
  .@{sdk-prefix}-selector-dropdown {
44
- .@{sdk-prefix}-selector-create-option {
45
- color: @theme-color!important;
46
- cursor: default !important;
47
- &::before,
48
- &::after {
49
- content: none !important;
50
- }
51
- a {
52
- color: @theme-color;
53
- }
54
- }
55
43
  .@{ant-prefix}-select-dropdown-menu {
56
44
  margin: 0;
57
45
  .scrollbar();
58
46
  }
59
47
  .@{ant-prefix}-select-item-option-disabled {
60
- color: @font-disable-color!important;
48
+ color: @font-disable-color;
61
49
  }
62
50
  .@{ant-prefix}-select-item-option-selected {
63
51
  color: @theme-color;
64
52
  font-weight: 400;
65
- &::after {
66
- color: @theme-color!important;
67
- }
68
53
  }
69
54
  .@{ant-prefix}-select-item-option:hover {
70
55
  color: @theme-color;
@@ -84,10 +69,24 @@
84
69
  }
85
70
  }
86
71
 
87
- &.@{ant-prefix}-select-dropdown--multiple
88
- .@{ant-prefix}-select-dropdown-menu-item-selected
89
- .@{ant-prefix}-select-selected-icon {
90
- color: inherit !important;
72
+ .@{sdk-prefix}-selector-create-option {
73
+ color: @theme-color;
74
+ cursor: default;
75
+ &::before,
76
+ &::after {
77
+ content: none;
78
+ }
79
+ a {
80
+ color: @theme-color;
81
+ }
82
+ }
83
+ .@{ant-prefix}-select-item-option-selected:not(.@{ant-prefix}-select-item-option-disabled)
84
+ .@{ant-prefix}-select-item-option-state {
85
+ .anticon-check {
86
+ &.anticon {
87
+ color: @theme-color;
88
+ }
89
+ }
91
90
  }
92
91
  }
93
92
 
@@ -1,49 +1,7 @@
1
1
  import * as React from 'react';
2
- declare type BasicType = string | number | boolean;
3
- export interface IOption<T = BasicType> {
4
- /**
5
- * 选项的值
6
- */
7
- value: T;
8
- /**
9
- * 选项的展示形式:string类型或者React组件
10
- */
11
- item: string | React.ReactNode;
12
- /**
13
- * 禁用选项
14
- */
15
- disabled?: boolean;
16
- }
17
- export interface ISolidRadioGroupProps<T = BasicType> {
18
- /**
19
- * 当前值
20
- */
21
- value?: T;
22
- /**
23
- * 选中变化回调
24
- */
25
- onChange?: (value: any) => void;
26
- /**
27
- * 容器样式
28
- */
29
- className?: string;
30
- /**
31
- * 按钮样式
32
- */
33
- buttonClassName?: string;
34
- /**
35
- * 按钮大小
36
- */
37
- size?: 'small' | 'middle' | 'large';
38
- /**
39
- * 禁用
40
- */
41
- disabled?: boolean;
42
- /**
43
- * 可选线列表
44
- */
45
- options?: Array<IOption<T>> | IKeyValues<string | React.ReactNode>;
46
- children?: any;
2
+ import { IRadioGroupProps, IOption } from '../RadioGroup';
3
+ export { IOption };
4
+ export interface ISolidRadioGroupProps<T = any> extends Omit<IRadioGroupProps<T>, 'optionType'> {
47
5
  }
48
6
  declare function SolidRadioGroup(props: ISolidRadioGroupProps): JSX.Element;
49
7
  declare namespace SolidRadioGroup {
@@ -1,30 +1,18 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
1
12
  import * as React from 'react';
2
- import { isArray, isUndefined } from 'lodash';
3
13
  import Radio from 'antd/es/radio';
4
- import classnames from 'classnames';
5
- import { SDK_PREFIX } from '../../constants/style';
6
- var useCallback = React.useCallback, useMemo = React.useMemo;
14
+ import { default as RadioGroup } from '../RadioGroup';
7
15
  export default function SolidRadioGroup(props) {
8
- var className = props.className, buttonClassName = props.buttonClassName, value = props.value, size = props.size, onChange = props.onChange, children = props.children, disabled = props.disabled, _a = props.options, options = _a === void 0 ? {} : _a;
9
- var handleChange = useCallback(function (e) {
10
- if (onChange) {
11
- onChange(e.target.value);
12
- }
13
- }, [onChange]);
14
- var radioOptions = useMemo(function () {
15
- return isArray(options)
16
- ? options
17
- : Object.keys(options).map(function (key) { return ({ value: key, item: options[key] }); });
18
- }, [options]);
19
- return (React.createElement(Radio.Group, { className: classnames(SDK_PREFIX + "-solid-radio-group", className), value: value, onChange: handleChange, size: size },
20
- radioOptions.map(function (option) {
21
- var _a;
22
- var value = option.value, item = option.item;
23
- var disableRealVal = isUndefined(option.disabled)
24
- ? disabled
25
- : option.disabled;
26
- return (React.createElement(Radio.Button, { key: value.toString(), value: value, disabled: disableRealVal, className: classnames((_a = {}, _a[SDK_PREFIX + "-solid-radio-item"] = !disableRealVal, _a), buttonClassName) }, item));
27
- }),
28
- children));
16
+ return React.createElement(RadioGroup, __assign({ optionType: "button" }, props));
29
17
  }
30
18
  SolidRadioGroup.Button = Radio.Button;
@@ -101,7 +101,6 @@
101
101
  }
102
102
  .ant-spin-blur {
103
103
  clear: both;
104
- overflow: hidden;
105
104
  opacity: 0.5;
106
105
  -webkit-user-select: none;
107
106
  -moz-user-select: none;
@@ -1,10 +1,14 @@
1
1
  import * as React from 'react';
2
+ import { ConfigContext } from 'antd/es/config-provider';
2
3
  import Button from '../../Button';
4
+ import { formatString } from '../../../utils/language';
3
5
  import { SDK_PREFIX } from '../../../constants/style';
6
+ import { StepsLocale } from '../../../constants/language/steps/type';
4
7
  import { StepsContext } from '../context';
5
8
  function ControlButton(props) {
6
9
  var lastStepText = props.lastStepText, nextDisabled = props.nextDisabled, onStepChange = props.onStepChange, onStepLast = props.onStepLast;
7
10
  var _a = React.useContext(StepsContext), stepCount = _a.count, current = _a.current;
11
+ var locale = React.useContext(ConfigContext).locale;
8
12
  var isLastStep = current === stepCount - 1;
9
13
  var handlePreStep = function () {
10
14
  if (current > 0 && onStepChange) {
@@ -20,7 +24,9 @@ function ControlButton(props) {
20
24
  }
21
25
  };
22
26
  return (React.createElement(React.Fragment, null,
23
- React.createElement(Button, { className: SDK_PREFIX + "-prev-button", onClick: handlePreStep, disabled: current === 0 }, "\u4E0A\u4E00\u6B65"),
24
- React.createElement(Button, { className: SDK_PREFIX + "-next-button", type: "primary", onClick: handleNextStep, disabled: nextDisabled || (isLastStep && !lastStepText) }, isLastStep && lastStepText ? lastStepText : '下一步')));
27
+ React.createElement(Button, { className: SDK_PREFIX + "-prev-button", onClick: handlePreStep, disabled: current === 0 }, formatString(StepsLocale.previous_step, locale)),
28
+ React.createElement(Button, { className: SDK_PREFIX + "-next-button", type: "primary", onClick: handleNextStep, disabled: nextDisabled || (isLastStep && !lastStepText) }, isLastStep && lastStepText
29
+ ? lastStepText
30
+ : formatString(StepsLocale.next_step, locale))));
25
31
  }
26
32
  export default React.memo(ControlButton);
@@ -479,12 +479,12 @@
479
479
  left: 0;
480
480
  }
481
481
  .ant-steps-vertical.ant-steps-dot .ant-steps-item-icon {
482
- margin-top: 8px;
482
+ margin-top: 13px;
483
483
  margin-left: 0;
484
484
  background: none;
485
485
  }
486
486
  .ant-steps-vertical.ant-steps-dot .ant-steps-item > .ant-steps-item-container > .ant-steps-item-tail {
487
- top: 2px;
487
+ top: 6.5px;
488
488
  left: -9px;
489
489
  margin: 0;
490
490
  padding: 22px 0 4px;
@@ -496,7 +496,8 @@
496
496
  width: inherit;
497
497
  }
498
498
  .ant-steps-vertical.ant-steps-dot .ant-steps-item-process .ant-steps-item-container .ant-steps-item-icon .ant-steps-icon-dot {
499
- left: -2px;
499
+ top: -1px;
500
+ left: -1px;
500
501
  }
501
502
  .ant-steps-navigation {
502
503
  padding-top: 12px;
@@ -767,9 +768,8 @@
767
768
  .pandora-sdk-steps .ant-steps-item-icon {
768
769
  width: 24px;
769
770
  height: 24px;
770
- line-height: 28px;
771
- margin-top: 2px;
772
771
  font-size: 12px;
772
+ line-height: 24px;
773
773
  }
774
774
  .pandora-sdk-steps .ant-steps-item-icon .ant-steps-icon {
775
775
  font-size: 10px;
@@ -785,18 +785,15 @@
785
785
  background: #2c6dd2;
786
786
  border: none;
787
787
  }
788
- .pandora-sdk-steps .ant-steps-item .ant-steps-item-icon .ant-steps-icon {
789
- top: -1px;
790
- }
791
788
  .pandora-sdk-steps .ant-steps-item.ant-steps-item-finish .ant-steps-item-icon .ant-steps-icon {
792
789
  color: #ffffff;
793
790
  }
794
- .pandora-sdk-steps .ant-steps-item.ant-steps-item-finish .ant-steps-item-icon .ant-steps-icon .antion {
795
- color: #ffffff !important;
791
+ .pandora-sdk-steps .ant-steps-item.ant-steps-item-finish .ant-steps-item-icon .ant-steps-icon span.anticon.anticon-check.ant-steps-finish-icon {
792
+ color: #ffffff;
796
793
  }
797
794
  .pandora-sdk-steps .ant-steps-item.ant-steps-item-wait .ant-steps-item-icon {
798
795
  background: #eee;
799
796
  }
800
797
  .pandora-sdk-steps .ant-steps-item.ant-steps-item-wait .ant-steps-item-icon .ant-steps-icon {
801
- color: #bfbfbf !important;
798
+ color: #bfbfbf;
802
799
  }
@@ -5,9 +5,8 @@
5
5
  .@{ant-prefix}-steps-item-icon {
6
6
  width: 24px;
7
7
  height: 24px;
8
- line-height: 28px;
9
- margin-top: 2px;
10
8
  font-size: 12px;
9
+ line-height: 24px;
11
10
  .@{ant-prefix}-steps-icon {
12
11
  font-size: 10px;
13
12
  }
@@ -27,16 +26,14 @@
27
26
  border-radius: 2px;
28
27
  background: @theme-color;
29
28
  border: none;
30
- .@{ant-prefix}-steps-icon {
31
- top: -1px;
32
- }
33
29
  }
34
-
35
- &.@{ant-prefix}-steps-item-finish .@{ant-prefix}-steps-item-icon {
36
- .@{ant-prefix}-steps-icon {
37
- color: @normal-color;
38
- .antion {
39
- color: @normal-color !important;
30
+ &.@{ant-prefix}-steps-item-finish {
31
+ .@{ant-prefix}-steps-item-icon {
32
+ .@{ant-prefix}-steps-icon {
33
+ color: @normal-color;
34
+ span.anticon.anticon-check.@{ant-prefix}-steps-finish-icon {
35
+ color: @normal-color;
36
+ }
40
37
  }
41
38
  }
42
39
  }
@@ -44,7 +41,7 @@
44
41
  &.@{ant-prefix}-steps-item-wait .@{ant-prefix}-steps-item-icon {
45
42
  background: @button-disabled-bg;
46
43
  .@{ant-prefix}-steps-icon {
47
- color: @icon-color !important;
44
+ color: @icon-color;
48
45
  }
49
46
  }
50
47
  }
@@ -40,6 +40,7 @@ declare class Table<T = any> extends React.Component<ITableProps<T>, any> {
40
40
  title?: string | undefined;
41
41
  tagClassName?: string | undefined;
42
42
  }) => JSX.Element;
43
+ static contextType: React.Context<import("antd/es/config-provider").ConfigConsumerProps>;
43
44
  indeterminate: boolean;
44
45
  checkAll: boolean;
45
46
  UNSAFE_componentWillReceiveProps(nextProps: ITableProps<T>): void;
@@ -63,13 +63,17 @@ var __spread = (this && this.__spread) || function () {
63
63
  return ar;
64
64
  };
65
65
  import * as React from 'react';
66
- import { Table as AntTable, Checkbox } from 'antd';
67
66
  import classnames from 'classnames';
67
+ import { observer } from 'mobx-react';
68
68
  import { observable, action, computed } from 'mobx';
69
69
  import { size, xor, union, unionBy, differenceBy, get } from 'lodash';
70
- import { observer } from 'mobx-react';
70
+ import { Table as AntTable, Checkbox } from 'antd';
71
+ import { ConfigContext } from 'antd/es/config-provider';
72
+ import { EmptyIcon } from '@qn-pandora/pandora-component-icons';
71
73
  import bind from '../../utils/bind';
74
+ import { formatString } from '../../utils/language';
72
75
  import { SDK_PREFIX } from '../../constants/style';
76
+ import { TableLocale } from '../../constants/language/table/type';
73
77
  import { ColumnTag } from './ColumnTag/ColumnTag';
74
78
  /**
75
79
  * pandora2.0风格的表格
@@ -228,9 +232,12 @@ var Table = /** @class */ (function (_super) {
228
232
  Table.prototype.render = function () {
229
233
  var _a, _b;
230
234
  var _this = this;
231
- var _c = this.props, className = _c.className, batchOptions = _c.batchOptions, scroll = _c.scroll, restProps = __rest(_c, ["className", "batchOptions", "scroll"]);
235
+ var _c = this.props, className = _c.className, batchOptions = _c.batchOptions, scroll = _c.scroll, locale = _c.locale, restProps = __rest(_c, ["className", "batchOptions", "scroll", "locale"]);
232
236
  return (React.createElement("div", null,
233
- React.createElement(AntTable, __assign({ scroll: scroll }, restProps, { className: classnames(SDK_PREFIX + "-table-wrapper", (_a = {}, _a[SDK_PREFIX + "-table-scrollX"] = get(scroll, 'x'), _a), (_b = {}, _b[SDK_PREFIX + "-table-scrollY"] = get(scroll, 'y'), _b), className),
237
+ React.createElement(AntTable, __assign({ scroll: scroll, locale: __assign({ emptyText: (React.createElement("div", { className: SDK_PREFIX + "-table-empty" },
238
+ React.createElement("div", { className: SDK_PREFIX + "-table-empty-icon" },
239
+ React.createElement(EmptyIcon, null)),
240
+ React.createElement("div", { className: SDK_PREFIX + "-table-empty-text" }, formatString(TableLocale.empty, this.context.locale)))) }, locale) }, restProps, { className: classnames(SDK_PREFIX + "-table-wrapper", (_a = {}, _a[SDK_PREFIX + "-table-scrollX"] = get(scroll, 'x'), _a), (_b = {}, _b[SDK_PREFIX + "-table-scrollY"] = get(scroll, 'y'), _b), className),
234
241
  // 涉及到权限
235
242
  // getCheckboxProps只能放到tableBatchWrapper里,因为selectedRowKeys在那个组件计算
236
243
  rowSelection: batchOptions && this.props.rowSelection
@@ -242,7 +249,8 @@ var Table = /** @class */ (function (_super) {
242
249
  this.props.dataSource.length > 0 ? (React.createElement("div", { className: SDK_PREFIX + "-table-batch-opt" },
243
250
  React.createElement(Checkbox, { indeterminate: this.indeterminate, onChange: this.handleCheckAllChange, checked: this.checkAll, disabled: size(this.undisabledData) === 0 }),
244
251
  React.createElement("span", { className: SDK_PREFIX + "-table-batch-opt-label" },
245
- "\u5DF2\u9009 ",
252
+ formatString(TableLocale.selected, this.context.locale),
253
+ ' ',
246
254
  this.selectedRowKeys.length),
247
255
  React.createElement("span", null, (batchOptions || []).map(function (option, index) {
248
256
  var _a;
@@ -254,6 +262,7 @@ var Table = /** @class */ (function (_super) {
254
262
  };
255
263
  Table.Column = AntTable.Column;
256
264
  Table.ColumnTag = ColumnTag;
265
+ Table.contextType = ConfigContext;
257
266
  __decorate([
258
267
  observable,
259
268
  __metadata("design:type", Object)