assui 2.0.2 → 2.0.6

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 (245) hide show
  1. package/es/button-drawer/index.d.ts +10 -0
  2. package/es/button-drawer/index.js +116 -0
  3. package/es/button-drawer/style/index.d.ts +1 -0
  4. package/es/button-drawer/style/index.js +1 -0
  5. package/es/button-modal/index.d.ts +14 -0
  6. package/es/button-modal/index.js +131 -0
  7. package/es/button-modal/style/index.d.ts +1 -0
  8. package/es/button-modal/style/index.js +1 -0
  9. package/es/condition-input/index.d.ts +15 -0
  10. package/es/condition-input/index.js +108 -0
  11. package/es/condition-input/parse2RegexOption.d.ts +13 -0
  12. package/es/condition-input/parse2RegexOption.js +57 -0
  13. package/es/condition-input/style/index.d.ts +1 -0
  14. package/es/condition-input/style/index.js +1 -0
  15. package/es/copy-to-clipboard/index.d.ts +22 -0
  16. package/es/copy-to-clipboard/index.js +95 -0
  17. package/es/copy-to-clipboard/style/index.css +249 -0
  18. package/es/copy-to-clipboard/style/index.d.ts +1 -0
  19. package/es/copy-to-clipboard/style/index.js +1 -0
  20. package/es/copy-to-clipboard/style/index.less +1 -0
  21. package/es/highlight-textarea/HighlighedContents.d.ts +7 -0
  22. package/es/highlight-textarea/HighlighedContents.js +15 -0
  23. package/es/highlight-textarea/extractSpansOfClasses.d.ts +15 -0
  24. package/es/highlight-textarea/extractSpansOfClasses.js +159 -0
  25. package/es/highlight-textarea/getRanges.d.ts +2 -0
  26. package/es/highlight-textarea/getRanges.js +142 -0
  27. package/es/highlight-textarea/getType.d.ts +2 -0
  28. package/es/highlight-textarea/getType.js +29 -0
  29. package/es/highlight-textarea/index.d.ts +12 -0
  30. package/es/highlight-textarea/index.js +132 -0
  31. package/es/highlight-textarea/style/index.css +38 -0
  32. package/es/highlight-textarea/style/index.d.ts +2 -0
  33. package/es/highlight-textarea/style/index.js +2 -0
  34. package/es/highlight-textarea/style/index.less +42 -0
  35. package/es/highlight-textarea/types.d.ts +16 -0
  36. package/es/highlight-textarea/types.js +0 -0
  37. package/es/highlight-words/index.d.ts +3 -0
  38. package/es/highlight-words/index.js +2 -0
  39. package/es/highlight-words/style/index.d.ts +1 -0
  40. package/es/highlight-words/style/index.js +0 -0
  41. package/es/icon/demo/svg/check-circle-filled.svg +6 -0
  42. package/es/icon/demo/svg/coin-circle.svg +9 -0
  43. package/es/icon/index.d.ts +27 -0
  44. package/es/icon/index.js +95 -0
  45. package/es/icon/style/index.d.ts +1 -0
  46. package/es/icon/style/index.js +0 -0
  47. package/es/icon/utils.d.ts +6 -0
  48. package/es/icon/utils.js +22 -0
  49. package/es/img-crop/EasyCrop.d.ts +6 -0
  50. package/es/img-crop/EasyCrop.js +113 -0
  51. package/es/img-crop/getCroppedImg.d.ts +6 -0
  52. package/es/img-crop/getCroppedImg.js +199 -0
  53. package/es/img-crop/index.d.ts +53 -0
  54. package/es/img-crop/index.js +531 -0
  55. package/es/img-crop/style/index.css +52 -0
  56. package/es/img-crop/style/index.d.ts +3 -0
  57. package/es/img-crop/style/index.js +3 -0
  58. package/es/img-crop/style/index.less +54 -0
  59. package/es/index.d.ts +34 -2
  60. package/es/index.js +18 -2
  61. package/es/keep-tab/demo/index.modules.less +66 -0
  62. package/es/keep-tab/index.d.ts +29 -0
  63. package/es/keep-tab/index.js +129 -0
  64. package/es/keep-tab/style/index.css +1129 -0
  65. package/es/keep-tab/style/index.d.ts +2 -0
  66. package/es/keep-tab/style/index.js +2 -0
  67. package/es/keep-tab/style/index.less +2 -0
  68. package/es/number-input/index.d.ts +22 -7
  69. package/es/number-input/index.js +22 -11
  70. package/es/number-input/style/index.d.ts +1 -1
  71. package/es/number-input/style/index.js +1 -1
  72. package/es/number-input/utils.d.ts +10 -11
  73. package/es/number-input/utils.js +7 -7
  74. package/es/rc-echart/core.d.ts +32 -0
  75. package/es/rc-echart/core.js +136 -0
  76. package/es/rc-echart/index.d.ts +21 -0
  77. package/es/rc-echart/index.js +27 -0
  78. package/es/rc-echart/style/index.d.ts +1 -0
  79. package/es/rc-echart/style/index.js +0 -0
  80. package/es/rc-motion/demo/CSSMotion.less +91 -0
  81. package/es/rc-motion/index.d.ts +2 -0
  82. package/es/rc-motion/index.js +2 -0
  83. package/es/rc-motion/style/index.d.ts +1 -0
  84. package/es/rc-motion/style/index.js +0 -0
  85. package/es/rc-qrcode/index.d.ts +20 -0
  86. package/es/rc-qrcode/index.js +57 -0
  87. package/es/rc-qrcode/style/index.d.ts +1 -0
  88. package/es/rc-qrcode/style/index.js +0 -0
  89. package/es/rc-qrcode/useQrcode.d.ts +4 -0
  90. package/es/rc-qrcode/useQrcode.js +50 -0
  91. package/es/rc-transition-group/index.d.ts +2 -0
  92. package/es/rc-transition-group/index.js +2 -0
  93. package/es/rc-transition-group/style/index.d.ts +1 -0
  94. package/es/rc-transition-group/style/index.js +0 -0
  95. package/es/single-img-upload/index.d.ts +19 -0
  96. package/es/single-img-upload/index.js +199 -0
  97. package/es/single-img-upload/style/index.css +74 -0
  98. package/es/single-img-upload/style/index.d.ts +3 -0
  99. package/es/single-img-upload/style/index.js +3 -0
  100. package/es/single-img-upload/style/index.less +85 -0
  101. package/es/sortable-hoc/demo/VerticalListBase/index.modules.less +63 -0
  102. package/es/sortable-hoc/demo/index.modules.less +248 -0
  103. package/es/sortable-hoc/index.d.ts +2 -0
  104. package/es/sortable-hoc/index.js +2 -0
  105. package/es/sortable-hoc/style/index.d.ts +1 -0
  106. package/es/sortable-hoc/style/index.js +0 -0
  107. package/es/split-pane/index.d.ts +59 -0
  108. package/es/split-pane/index.js +21 -0
  109. package/es/split-pane/style/index.css +41 -0
  110. package/es/split-pane/style/index.d.ts +1 -0
  111. package/es/split-pane/style/index.js +1 -0
  112. package/es/split-pane/style/index.less +49 -0
  113. package/es/text-area/index.d.ts +12 -0
  114. package/es/text-area/index.js +96 -0
  115. package/es/text-area/style/index.d.ts +1 -0
  116. package/es/text-area/style/index.js +1 -0
  117. package/es/text-input/index.d.ts +5 -0
  118. package/es/text-input/index.js +85 -0
  119. package/es/{number-input → text-input}/style/index.css +0 -3
  120. package/es/text-input/style/index.d.ts +1 -0
  121. package/es/text-input/style/index.js +1 -0
  122. package/es/{number-input → text-input}/style/index.less +0 -4
  123. package/lib/button-drawer/index.d.ts +10 -0
  124. package/lib/button-drawer/index.js +164 -0
  125. package/lib/button-drawer/style/index.d.ts +1 -0
  126. package/lib/button-drawer/style/index.js +7 -0
  127. package/lib/button-modal/index.d.ts +14 -0
  128. package/lib/button-modal/index.js +178 -0
  129. package/lib/button-modal/style/index.d.ts +1 -0
  130. package/lib/button-modal/style/index.js +7 -0
  131. package/lib/condition-input/index.d.ts +15 -0
  132. package/lib/condition-input/index.js +158 -0
  133. package/lib/condition-input/parse2RegexOption.d.ts +13 -0
  134. package/lib/condition-input/parse2RegexOption.js +72 -0
  135. package/lib/condition-input/style/index.d.ts +1 -0
  136. package/lib/condition-input/style/index.js +7 -0
  137. package/lib/copy-to-clipboard/index.d.ts +22 -0
  138. package/lib/copy-to-clipboard/index.js +143 -0
  139. package/lib/copy-to-clipboard/style/index.css +249 -0
  140. package/lib/copy-to-clipboard/style/index.d.ts +1 -0
  141. package/lib/copy-to-clipboard/style/index.js +7 -0
  142. package/lib/copy-to-clipboard/style/index.less +1 -0
  143. package/lib/highlight-textarea/HighlighedContents.d.ts +7 -0
  144. package/lib/highlight-textarea/HighlighedContents.js +29 -0
  145. package/lib/highlight-textarea/extractSpansOfClasses.d.ts +15 -0
  146. package/lib/highlight-textarea/extractSpansOfClasses.js +173 -0
  147. package/lib/highlight-textarea/getRanges.d.ts +2 -0
  148. package/lib/highlight-textarea/getRanges.js +156 -0
  149. package/lib/highlight-textarea/getType.d.ts +2 -0
  150. package/lib/highlight-textarea/getType.js +37 -0
  151. package/lib/highlight-textarea/index.d.ts +12 -0
  152. package/lib/highlight-textarea/index.js +183 -0
  153. package/lib/highlight-textarea/style/index.css +38 -0
  154. package/lib/highlight-textarea/style/index.d.ts +2 -0
  155. package/lib/highlight-textarea/style/index.js +9 -0
  156. package/lib/highlight-textarea/style/index.less +42 -0
  157. package/lib/highlight-textarea/types.d.ts +16 -0
  158. package/lib/highlight-textarea/types.js +5 -0
  159. package/lib/highlight-words/index.d.ts +3 -0
  160. package/lib/highlight-words/index.js +15 -0
  161. package/lib/highlight-words/style/index.d.ts +1 -0
  162. package/lib/highlight-words/style/index.js +0 -0
  163. package/lib/icon/demo/svg/check-circle-filled.svg +6 -0
  164. package/lib/icon/demo/svg/coin-circle.svg +9 -0
  165. package/lib/icon/index.d.ts +27 -0
  166. package/lib/icon/index.js +143 -0
  167. package/lib/icon/style/index.d.ts +1 -0
  168. package/lib/icon/style/index.js +0 -0
  169. package/lib/icon/utils.d.ts +6 -0
  170. package/lib/icon/utils.js +32 -0
  171. package/lib/img-crop/EasyCrop.d.ts +6 -0
  172. package/lib/img-crop/EasyCrop.js +160 -0
  173. package/lib/img-crop/getCroppedImg.d.ts +6 -0
  174. package/lib/img-crop/getCroppedImg.js +205 -0
  175. package/lib/img-crop/index.d.ts +53 -0
  176. package/lib/img-crop/index.js +582 -0
  177. package/lib/img-crop/style/index.css +52 -0
  178. package/lib/img-crop/style/index.d.ts +3 -0
  179. package/lib/img-crop/style/index.js +11 -0
  180. package/lib/img-crop/style/index.less +54 -0
  181. package/lib/index.d.ts +34 -2
  182. package/lib/index.js +160 -9
  183. package/lib/keep-tab/demo/index.modules.less +66 -0
  184. package/lib/keep-tab/index.d.ts +29 -0
  185. package/lib/keep-tab/index.js +181 -0
  186. package/lib/keep-tab/style/index.css +1129 -0
  187. package/lib/keep-tab/style/index.d.ts +2 -0
  188. package/lib/keep-tab/style/index.js +9 -0
  189. package/lib/keep-tab/style/index.less +2 -0
  190. package/lib/number-input/index.d.ts +22 -7
  191. package/lib/number-input/index.js +22 -11
  192. package/lib/number-input/style/index.d.ts +1 -1
  193. package/lib/number-input/style/index.js +1 -1
  194. package/lib/number-input/utils.d.ts +10 -11
  195. package/lib/number-input/utils.js +8 -8
  196. package/lib/rc-echart/core.d.ts +32 -0
  197. package/lib/rc-echart/core.js +185 -0
  198. package/lib/rc-echart/index.d.ts +21 -0
  199. package/lib/rc-echart/index.js +75 -0
  200. package/lib/rc-echart/style/index.d.ts +1 -0
  201. package/lib/rc-echart/style/index.js +0 -0
  202. package/lib/rc-motion/demo/CSSMotion.less +91 -0
  203. package/lib/rc-motion/index.d.ts +2 -0
  204. package/lib/rc-motion/index.js +43 -0
  205. package/lib/rc-motion/style/index.d.ts +1 -0
  206. package/lib/rc-motion/style/index.js +0 -0
  207. package/lib/rc-qrcode/index.d.ts +20 -0
  208. package/lib/rc-qrcode/index.js +108 -0
  209. package/lib/rc-qrcode/style/index.d.ts +1 -0
  210. package/lib/rc-qrcode/style/index.js +0 -0
  211. package/lib/rc-qrcode/useQrcode.d.ts +4 -0
  212. package/lib/rc-qrcode/useQrcode.js +66 -0
  213. package/lib/rc-transition-group/index.d.ts +2 -0
  214. package/lib/rc-transition-group/index.js +43 -0
  215. package/lib/rc-transition-group/style/index.d.ts +1 -0
  216. package/lib/rc-transition-group/style/index.js +0 -0
  217. package/lib/single-img-upload/index.d.ts +19 -0
  218. package/lib/single-img-upload/index.js +250 -0
  219. package/lib/single-img-upload/style/index.css +74 -0
  220. package/lib/single-img-upload/style/index.d.ts +3 -0
  221. package/lib/single-img-upload/style/index.js +11 -0
  222. package/lib/single-img-upload/style/index.less +85 -0
  223. package/lib/sortable-hoc/demo/VerticalListBase/index.modules.less +63 -0
  224. package/lib/sortable-hoc/demo/index.modules.less +248 -0
  225. package/lib/sortable-hoc/index.d.ts +2 -0
  226. package/lib/sortable-hoc/index.js +43 -0
  227. package/lib/sortable-hoc/style/index.d.ts +1 -0
  228. package/lib/sortable-hoc/style/index.js +0 -0
  229. package/lib/split-pane/index.d.ts +59 -0
  230. package/lib/split-pane/index.js +69 -0
  231. package/lib/split-pane/style/index.css +41 -0
  232. package/lib/split-pane/style/index.d.ts +1 -0
  233. package/lib/split-pane/style/index.js +7 -0
  234. package/lib/split-pane/style/index.less +49 -0
  235. package/lib/text-area/index.d.ts +12 -0
  236. package/lib/text-area/index.js +144 -0
  237. package/lib/text-area/style/index.d.ts +1 -0
  238. package/lib/text-area/style/index.js +7 -0
  239. package/lib/text-input/index.d.ts +5 -0
  240. package/lib/text-input/index.js +99 -0
  241. package/lib/{number-input → text-input}/style/index.css +0 -3
  242. package/lib/text-input/style/index.d.ts +1 -0
  243. package/lib/text-input/style/index.js +7 -0
  244. package/lib/{number-input → text-input}/style/index.less +0 -4
  245. package/package.json +20 -3
@@ -0,0 +1,52 @@
1
+ /* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */
2
+ /* stylelint-disable no-duplicate-selectors */
3
+ /* stylelint-disable */
4
+ /* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
5
+ .ant-img-crop-modal .ant-modal-body {
6
+ padding-bottom: 16px;
7
+ }
8
+ .ant-img-crop-modal .ant-img-crop-container {
9
+ position: relative;
10
+ width: 100%;
11
+ height: 40vh;
12
+ margin-bottom: 16px;
13
+ }
14
+ .ant-img-crop-modal .ant-img-crop-control {
15
+ display: flex;
16
+ align-items: center;
17
+ width: 60%;
18
+ margin-right: auto;
19
+ margin-left: auto;
20
+ }
21
+ .ant-img-crop-modal .ant-img-crop-control button {
22
+ display: flex;
23
+ align-items: center;
24
+ justify-content: center;
25
+ width: 34px;
26
+ height: 34px;
27
+ padding: 0;
28
+ font-style: normal;
29
+ background: transparent;
30
+ border: 0;
31
+ outline: 0;
32
+ cursor: pointer;
33
+ }
34
+ .ant-img-crop-modal .ant-img-crop-control button[disabled] {
35
+ cursor: default;
36
+ }
37
+ .ant-img-crop-modal .ant-img-crop-control.zoom button {
38
+ font-size: 18px;
39
+ }
40
+ .ant-img-crop-modal .ant-img-crop-control.rotate button {
41
+ font-size: 16px;
42
+ }
43
+ .ant-img-crop-modal .ant-img-crop-control.rotate button:first-of-type {
44
+ transform: rotate(-20deg);
45
+ }
46
+ .ant-img-crop-modal .ant-img-crop-control.rotate button:last-of-type {
47
+ transform: rotate(20deg);
48
+ }
49
+ .ant-img-crop-modal .ant-img-crop-control .ant-slider {
50
+ flex: 1;
51
+ margin: 0 8px;
52
+ }
@@ -0,0 +1,3 @@
1
+ import 'antd/es/slider/style';
2
+ import 'antd/es/modal/style';
3
+ import './index.less';
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ require("antd/es/slider/style");
8
+
9
+ require("antd/es/modal/style");
10
+
11
+ require("./index.less");
@@ -0,0 +1,54 @@
1
+ @import '~antd/es/style/themes/index';
2
+
3
+ @pkg: ~'@{ant-prefix}-img-crop';
4
+ .@{pkg}-modal {
5
+ .ant-modal-body {
6
+ padding-bottom: 16px;
7
+ }
8
+ .@{pkg}-container {
9
+ position: relative;
10
+ width: 100%;
11
+ height: 40vh;
12
+ margin-bottom: 16px;
13
+ }
14
+ .@{pkg}-control {
15
+ display: flex;
16
+ align-items: center;
17
+ width: 60%;
18
+ margin-right: auto;
19
+ margin-left: auto;
20
+
21
+ button {
22
+ display: flex;
23
+ align-items: center;
24
+ justify-content: center;
25
+ width: 34px;
26
+ height: 34px;
27
+ padding: 0;
28
+ font-style: normal;
29
+ background: transparent;
30
+ border: 0;
31
+ outline: 0;
32
+ cursor: pointer;
33
+ &[disabled] {
34
+ cursor: default;
35
+ }
36
+ }
37
+ &.zoom button {
38
+ font-size: 18px;
39
+ }
40
+ &.rotate button {
41
+ font-size: 16px;
42
+ &:first-of-type {
43
+ transform: rotate(-20deg);
44
+ }
45
+ &:last-of-type {
46
+ transform: rotate(20deg);
47
+ }
48
+ }
49
+ .ant-slider {
50
+ flex: 1;
51
+ margin: 0 8px;
52
+ }
53
+ }
54
+ }
package/lib/index.d.ts CHANGED
@@ -1,2 +1,34 @@
1
- import NumberInput from './number-input';
2
- export { NumberInput };
1
+ export type { ButtonDrawerProps } from './button-drawer';
2
+ export { default as ButtonDrawer } from './button-drawer';
3
+ export type { ButtonModalProps } from './button-modal';
4
+ export { default as ButtonModal } from './button-modal';
5
+ export type { ConditionInputProps } from './condition-input';
6
+ export { default as ConditionInput } from './condition-input';
7
+ export type { CopyToClipboardProps } from './copy-to-clipboard';
8
+ export { default as CopyToClipboard } from './copy-to-clipboard';
9
+ export type { HighlightWithinTextareaProps } from './highlight-textarea';
10
+ export { default as HighlightWithinTextarea } from './highlight-textarea';
11
+ export type { FindChunks, Chunk, HighlighterProps } from './highlight-words';
12
+ export { default as HighlightWords } from './highlight-words';
13
+ export type { IconProps } from './icon';
14
+ export { default as Icon } from './icon';
15
+ export type { ImgCropProps } from './img-crop';
16
+ export { default as ImgCrop } from './img-crop';
17
+ export type { KeepTabProps } from './keep-tab';
18
+ export { default as KeepTab } from './keep-tab';
19
+ export type { NumberInputProps } from './number-input';
20
+ export { default as NumberInput } from './number-input';
21
+ export type { RcEchartPropsType } from './rc-echart';
22
+ export { default as RcEcharts } from './rc-echart';
23
+ export type { RcQRcodeProps } from './rc-qrcode';
24
+ export { default as RcQRcode } from './rc-qrcode';
25
+ export { default as RcTransitionGroup } from './rc-transition-group';
26
+ export type { SingleImgUploadProps } from './single-img-upload';
27
+ export { default as SingleImgUpload } from './single-img-upload';
28
+ export { default as sortableHoc } from './sortable-hoc';
29
+ export type { SplitPaneProps } from './split-pane';
30
+ export { default as SplitPane } from './split-pane';
31
+ export type { TAreaProps } from './text-area';
32
+ export { default as TextArea } from './text-area';
33
+ export type { TextInputProps } from './text-input';
34
+ export { default as TextInput } from './text-input';
package/lib/index.js CHANGED
@@ -1,16 +1,167 @@
1
1
  "use strict";
2
2
 
3
- var __importDefault = this && this.__importDefault || function (mod) {
4
- return mod && mod.__esModule ? mod : {
5
- "default": mod
6
- };
7
- };
8
-
9
3
  Object.defineProperty(exports, "__esModule", {
10
4
  value: true
11
5
  });
12
- exports.NumberInput = void 0;
13
6
 
14
- var number_input_1 = __importDefault(require("./number-input"));
7
+ var button_drawer_1 = require("./button-drawer");
8
+
9
+ Object.defineProperty(exports, "ButtonDrawer", {
10
+ enumerable: true,
11
+ get: function get() {
12
+ return button_drawer_1["default"];
13
+ }
14
+ });
15
+
16
+ var button_modal_1 = require("./button-modal");
17
+
18
+ Object.defineProperty(exports, "ButtonModal", {
19
+ enumerable: true,
20
+ get: function get() {
21
+ return button_modal_1["default"];
22
+ }
23
+ });
24
+
25
+ var condition_input_1 = require("./condition-input");
26
+
27
+ Object.defineProperty(exports, "ConditionInput", {
28
+ enumerable: true,
29
+ get: function get() {
30
+ return condition_input_1["default"];
31
+ }
32
+ });
33
+
34
+ var copy_to_clipboard_1 = require("./copy-to-clipboard");
35
+
36
+ Object.defineProperty(exports, "CopyToClipboard", {
37
+ enumerable: true,
38
+ get: function get() {
39
+ return copy_to_clipboard_1["default"];
40
+ }
41
+ });
42
+
43
+ var highlight_textarea_1 = require("./highlight-textarea");
44
+
45
+ Object.defineProperty(exports, "HighlightWithinTextarea", {
46
+ enumerable: true,
47
+ get: function get() {
48
+ return highlight_textarea_1["default"];
49
+ }
50
+ });
51
+
52
+ var highlight_words_1 = require("./highlight-words");
53
+
54
+ Object.defineProperty(exports, "HighlightWords", {
55
+ enumerable: true,
56
+ get: function get() {
57
+ return highlight_words_1["default"];
58
+ }
59
+ });
60
+
61
+ var icon_1 = require("./icon");
62
+
63
+ Object.defineProperty(exports, "Icon", {
64
+ enumerable: true,
65
+ get: function get() {
66
+ return icon_1["default"];
67
+ }
68
+ });
69
+
70
+ var img_crop_1 = require("./img-crop");
71
+
72
+ Object.defineProperty(exports, "ImgCrop", {
73
+ enumerable: true,
74
+ get: function get() {
75
+ return img_crop_1["default"];
76
+ }
77
+ });
78
+
79
+ var keep_tab_1 = require("./keep-tab");
80
+
81
+ Object.defineProperty(exports, "KeepTab", {
82
+ enumerable: true,
83
+ get: function get() {
84
+ return keep_tab_1["default"];
85
+ }
86
+ });
87
+
88
+ var number_input_1 = require("./number-input");
89
+
90
+ Object.defineProperty(exports, "NumberInput", {
91
+ enumerable: true,
92
+ get: function get() {
93
+ return number_input_1["default"];
94
+ }
95
+ });
96
+
97
+ var rc_echart_1 = require("./rc-echart");
98
+
99
+ Object.defineProperty(exports, "RcEcharts", {
100
+ enumerable: true,
101
+ get: function get() {
102
+ return rc_echart_1["default"];
103
+ }
104
+ });
105
+
106
+ var rc_qrcode_1 = require("./rc-qrcode");
107
+
108
+ Object.defineProperty(exports, "RcQRcode", {
109
+ enumerable: true,
110
+ get: function get() {
111
+ return rc_qrcode_1["default"];
112
+ }
113
+ });
114
+
115
+ var rc_transition_group_1 = require("./rc-transition-group");
116
+
117
+ Object.defineProperty(exports, "RcTransitionGroup", {
118
+ enumerable: true,
119
+ get: function get() {
120
+ return rc_transition_group_1["default"];
121
+ }
122
+ });
123
+
124
+ var single_img_upload_1 = require("./single-img-upload");
125
+
126
+ Object.defineProperty(exports, "SingleImgUpload", {
127
+ enumerable: true,
128
+ get: function get() {
129
+ return single_img_upload_1["default"];
130
+ }
131
+ });
132
+
133
+ var sortable_hoc_1 = require("./sortable-hoc");
134
+
135
+ Object.defineProperty(exports, "sortableHoc", {
136
+ enumerable: true,
137
+ get: function get() {
138
+ return sortable_hoc_1["default"];
139
+ }
140
+ });
141
+
142
+ var split_pane_1 = require("./split-pane");
143
+
144
+ Object.defineProperty(exports, "SplitPane", {
145
+ enumerable: true,
146
+ get: function get() {
147
+ return split_pane_1["default"];
148
+ }
149
+ });
150
+
151
+ var text_area_1 = require("./text-area");
152
+
153
+ Object.defineProperty(exports, "TextArea", {
154
+ enumerable: true,
155
+ get: function get() {
156
+ return text_area_1["default"];
157
+ }
158
+ });
159
+
160
+ var text_input_1 = require("./text-input");
15
161
 
16
- exports.NumberInput = number_input_1["default"];
162
+ Object.defineProperty(exports, "TextInput", {
163
+ enumerable: true,
164
+ get: function get() {
165
+ return text_input_1["default"];
166
+ }
167
+ });
@@ -0,0 +1,66 @@
1
+ .assui-tabs-card {
2
+ .ant-tabs-tab + .ant-tabs-tab {
3
+ margin: 0;
4
+ }
5
+
6
+ &.ant-tabs-top > .ant-tabs-nav:before {
7
+ display: none;
8
+ }
9
+
10
+ .ant-tabs-nav-list {
11
+ background-color: #fff;
12
+ border-radius: 6px;
13
+ box-shadow: 0 11px rgba(92, 118, 166, 0.05);
14
+
15
+ .ant-tabs-tab {
16
+ min-width: 96px;
17
+ padding: 9px 16px;
18
+ color: #8598bb;
19
+ font-size: 16px;
20
+ border-radius: 6px;
21
+
22
+ .ant-tabs-tab-btn {
23
+ width: 100%;
24
+ line-height: 22px;
25
+ text-align: center;
26
+ transition: none;
27
+ }
28
+ }
29
+
30
+ .tab-badge {
31
+ color: #8598bb;
32
+ font-size: 16px;
33
+ }
34
+
35
+ .ant-badge-count {
36
+ display: inline-block;
37
+ height: 14px;
38
+ padding-right: 4px;
39
+ padding-left: 3px;
40
+ font-size: 12px;
41
+ line-height: 14px;
42
+ text-align: center;
43
+ vertical-align: middle;
44
+ background-color: #ffd100;
45
+ border-radius: 6.5px;
46
+ transform: scale(0.9);
47
+ }
48
+
49
+ .ant-tabs-tab-active {
50
+ background-color: #3093ea;
51
+
52
+ .tab-badge {
53
+ color: #fff;
54
+ }
55
+
56
+ .ant-tabs-tab-btn {
57
+ color: #fff;
58
+ transition: none;
59
+ }
60
+ }
61
+
62
+ .ant-tabs-ink-bar {
63
+ display: none;
64
+ }
65
+ }
66
+ }
@@ -0,0 +1,29 @@
1
+ import * as React from 'react';
2
+ import { BadgeProps } from 'antd/lib/badge';
3
+ import { TabPaneProps } from 'antd/lib/tabs';
4
+ export interface KeepTabProps {
5
+ /** 由TabPane组成的children */
6
+ children: React.ReactNode;
7
+ /** 初始化选中面板的 key,如果没有设置 activeKey */
8
+ defaultActiveKey?: string;
9
+ /** 保存激活 tab 面板的的key名 */
10
+ saveActiveKeyName: string;
11
+ /** 当前激活 tab 面板的 key */
12
+ activeKey?: string;
13
+ /** 切换面板的回调 */
14
+ onChange?: (activeKey: string) => void;
15
+ /** antd Badge组件除count意外的所有props */
16
+ badgeProps?: Omit<BadgeProps, 'count'>;
17
+ }
18
+ export interface SelfTabPaneProps extends TabPaneProps {
19
+ count: Pick<BadgeProps, 'count'>;
20
+ }
21
+ declare const KeepTab: {
22
+ (props: KeepTabProps): JSX.Element;
23
+ defaultProps: {
24
+ saveActiveKeyName: string;
25
+ };
26
+ displayName: string;
27
+ TabPane: typeof import("rc-tabs").TabPane;
28
+ };
29
+ export default KeepTab;
@@ -0,0 +1,181 @@
1
+ "use strict";
2
+
3
+ var __assign = this && this.__assign || function () {
4
+ __assign = Object.assign || function (t) {
5
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
6
+ s = arguments[i];
7
+
8
+ for (var p in s) {
9
+ if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
10
+ }
11
+ }
12
+
13
+ return t;
14
+ };
15
+
16
+ return __assign.apply(this, arguments);
17
+ };
18
+
19
+ var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
20
+ if (k2 === undefined) k2 = k;
21
+ Object.defineProperty(o, k2, {
22
+ enumerable: true,
23
+ get: function get() {
24
+ return m[k];
25
+ }
26
+ });
27
+ } : function (o, m, k, k2) {
28
+ if (k2 === undefined) k2 = k;
29
+ o[k2] = m[k];
30
+ });
31
+
32
+ var __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function (o, v) {
33
+ Object.defineProperty(o, "default", {
34
+ enumerable: true,
35
+ value: v
36
+ });
37
+ } : function (o, v) {
38
+ o["default"] = v;
39
+ });
40
+
41
+ var __importStar = this && this.__importStar || function (mod) {
42
+ if (mod && mod.__esModule) return mod;
43
+ var result = {};
44
+ if (mod != null) for (var k in mod) {
45
+ if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
46
+ }
47
+
48
+ __setModuleDefault(result, mod);
49
+
50
+ return result;
51
+ };
52
+
53
+ var __rest = this && this.__rest || function (s, e) {
54
+ var t = {};
55
+
56
+ for (var p in s) {
57
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
58
+ }
59
+
60
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
61
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
62
+ }
63
+ return t;
64
+ };
65
+
66
+ var __read = this && this.__read || function (o, n) {
67
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
68
+ if (!m) return o;
69
+ var i = m.call(o),
70
+ r,
71
+ ar = [],
72
+ e;
73
+
74
+ try {
75
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
76
+ ar.push(r.value);
77
+ }
78
+ } catch (error) {
79
+ e = {
80
+ error: error
81
+ };
82
+ } finally {
83
+ try {
84
+ if (r && !r.done && (m = i["return"])) m.call(i);
85
+ } finally {
86
+ if (e) throw e.error;
87
+ }
88
+ }
89
+
90
+ return ar;
91
+ };
92
+
93
+ var __importDefault = this && this.__importDefault || function (mod) {
94
+ return mod && mod.__esModule ? mod : {
95
+ "default": mod
96
+ };
97
+ };
98
+
99
+ Object.defineProperty(exports, "__esModule", {
100
+ value: true
101
+ });
102
+
103
+ var React = __importStar(require("react"));
104
+
105
+ var badge_1 = __importDefault(require("antd/lib/badge"));
106
+
107
+ var tabs_1 = __importDefault(require("antd/lib/tabs"));
108
+
109
+ var react_router_dom_1 = require("react-router-dom");
110
+
111
+ var use_url_state_1 = __importDefault(require("@ahooksjs/use-url-state"));
112
+
113
+ var toArray_1 = __importDefault(require("rc-util/lib/Children/toArray"));
114
+
115
+ var TabPane = tabs_1["default"].TabPane;
116
+ var defaultBadgeProps = {};
117
+
118
+ var KeepTab = function KeepTab(props) {
119
+ var _a;
120
+
121
+ var children = props.children,
122
+ defaultActiveKey = props.defaultActiveKey,
123
+ saveActiveKeyName = props.saveActiveKeyName,
124
+ tabActiveKey = props.activeKey,
125
+ onChange = props.onChange,
126
+ _b = props.badgeProps,
127
+ badgeProps = _b === void 0 ? defaultBadgeProps : _b,
128
+ restProps = __rest(props, ["children", "defaultActiveKey", "saveActiveKeyName", "activeKey", "onChange", "badgeProps"]);
129
+
130
+ var defaultUrlParams = react_router_dom_1.useParams();
131
+
132
+ var _c = __read(use_url_state_1["default"]((_a = {}, _a[saveActiveKeyName] = defaultUrlParams[saveActiveKeyName] || defaultActiveKey, _a)), 2),
133
+ urlParams = _c[0],
134
+ setUrlParams = _c[1];
135
+
136
+ var handleTabChange = function handleTabChange(nextActiveKey) {
137
+ var _a;
138
+
139
+ setUrlParams((_a = {}, _a[saveActiveKeyName] = nextActiveKey, _a));
140
+
141
+ if (onChange) {
142
+ onChange(nextActiveKey);
143
+ }
144
+ };
145
+
146
+ var resultChildren = toArray_1["default"](children).map(function (childItem) {
147
+ var count = childItem.props.count;
148
+
149
+ if (count) {
150
+ return React.cloneElement(childItem, {
151
+ tab: React.createElement(badge_1["default"], __assign({
152
+ className: "tab-badge",
153
+ count: count,
154
+ offset: [16, -9]
155
+ }, badgeProps), React.createElement("span", null, childItem.props.tab))
156
+ });
157
+ }
158
+
159
+ return childItem;
160
+ });
161
+ var resultTabActiveKey = {};
162
+
163
+ if (tabActiveKey) {
164
+ resultTabActiveKey = {
165
+ activeKey: tabActiveKey
166
+ };
167
+ }
168
+
169
+ return React.createElement(tabs_1["default"], __assign({
170
+ onChange: handleTabChange,
171
+ destroyInactiveTabPane: true,
172
+ defaultActiveKey: urlParams[saveActiveKeyName]
173
+ }, resultTabActiveKey, restProps), resultChildren);
174
+ };
175
+
176
+ KeepTab.defaultProps = {
177
+ saveActiveKeyName: 'active'
178
+ };
179
+ KeepTab.displayName = 'KeepTab';
180
+ KeepTab.TabPane = TabPane;
181
+ exports["default"] = KeepTab;