@king-design/intact 3.6.2-beta.1 → 3.7.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 (281) hide show
  1. package/components/.DS_Store +0 -0
  2. package/components/anchor/constants.ts +3 -0
  3. package/components/anchor/demos/basic.md +34 -0
  4. package/components/anchor/demos/container.md +76 -0
  5. package/components/anchor/demos/events.md +100 -0
  6. package/components/anchor/demos/horizontal.md +33 -0
  7. package/components/anchor/demos/nested.md +132 -0
  8. package/components/anchor/index.md +38 -0
  9. package/components/anchor/index.spec.ts +171 -0
  10. package/components/anchor/index.ts +159 -0
  11. package/components/anchor/index.vdt +24 -0
  12. package/components/anchor/link.ts +44 -0
  13. package/components/anchor/link.vdt +49 -0
  14. package/components/anchor/styles.ts +50 -0
  15. package/components/anchor/useScroll.ts +221 -0
  16. package/components/config/demos/basic.md +11 -3
  17. package/components/descriptions/.DS_Store +0 -0
  18. package/components/dialog/base.vdt +3 -1
  19. package/components/drawer/demos/resizable.md +67 -0
  20. package/components/drawer/index.md +1 -0
  21. package/components/drawer/index.spec.ts +43 -0
  22. package/components/drawer/index.ts +14 -0
  23. package/components/drawer/index.vdt +20 -3
  24. package/components/drawer/styles.ts +44 -0
  25. package/components/drawer/useDrawerResizable.ts +190 -0
  26. package/components/icon/demos/color.md +1 -1
  27. package/components/icon/demos/icons.md +18 -0
  28. package/components/menu/.DS_Store +0 -0
  29. package/components/menu/demos/.DS_Store +0 -0
  30. package/components/menu/demos/collapse.md +2 -2
  31. package/components/menu/demos/showCollapseArrow.md +3 -3
  32. package/components/menu/demos/size.md +4 -4
  33. package/components/menu/styles.ts +7 -3
  34. package/components/notification/demos/basic.md +27 -0
  35. package/components/notification/demos/close.md +52 -0
  36. package/components/notification/demos/duration.md +43 -0
  37. package/components/notification/demos/events.md +39 -0
  38. package/components/notification/demos/hideClose.md +30 -0
  39. package/components/notification/demos/icon.md +47 -0
  40. package/components/notification/demos/position.md +39 -0
  41. package/components/notification/demos/types.md +38 -0
  42. package/components/notification/index.md +62 -0
  43. package/components/notification/index.spec.ts +211 -0
  44. package/components/notification/index.ts +2 -0
  45. package/components/notification/notification.ts +185 -0
  46. package/components/notification/notification.vdt +62 -0
  47. package/components/notification/notifications.ts +46 -0
  48. package/components/notification/notifications.vdt +16 -0
  49. package/components/notification/styles.ts +179 -0
  50. package/components/select/styles.ts +2 -0
  51. package/components/table/.DS_Store +0 -0
  52. package/components/table/demos/hidden.md +8 -2
  53. package/components/table/demos/sort.md +4 -4
  54. package/components/table/styles.ts +6 -2
  55. package/components/tabs/useActiveBar.ts +3 -3
  56. package/components/tag/base.ts +4 -0
  57. package/components/tag/demos/border.md +1 -1
  58. package/components/tag/demos/color.md +40 -0
  59. package/components/tag/demos/draggable.md +1 -1
  60. package/components/tag/demos/tags.md +1 -1
  61. package/components/tag/index.md +1 -0
  62. package/components/tag/index.spec.ts +8 -0
  63. package/components/tag/index.vdt +6 -4
  64. package/components/tag/styles.ts +23 -0
  65. package/components/tag/useColor.ts +79 -0
  66. package/components/timepicker/index.spec.ts +16 -5
  67. package/components/timepicker/useDefaultValue.ts +16 -7
  68. package/components/timepicker/useStep.ts +3 -2
  69. package/components/tour/.DS_Store +0 -0
  70. package/components/transfer/demos/customFilter.md +1 -1
  71. package/components/transfer/demos/customList.md +1 -1
  72. package/components/transfer/demos/getData.md +1 -1
  73. package/components/transfer/demos/leftChecked.md +1 -1
  74. package/components/transfer/demos/pagination.md +63 -0
  75. package/components/transfer/demos/table.md +248 -0
  76. package/components/transfer/demos/tree.md +1 -1
  77. package/components/transfer/index.md +2 -0
  78. package/components/transfer/index.spec.ts +147 -0
  79. package/components/transfer/index.ts +7 -0
  80. package/components/transfer/index.vdt +30 -4
  81. package/components/transfer/styles.ts +11 -1
  82. package/components/transfer/useCheck.ts +5 -5
  83. package/components/transfer/usePagination.ts +92 -0
  84. package/components/virtualList/.DS_Store +0 -0
  85. package/components/virtualList/demos/.DS_Store +0 -0
  86. package/dist/fonts/iconfont.eot +0 -0
  87. package/dist/fonts/iconfont.svg +235 -0
  88. package/dist/fonts/iconfont.ttf +0 -0
  89. package/dist/fonts/iconfont.woff +0 -0
  90. package/dist/fonts/iconfont.woff2 +0 -0
  91. package/dist/fonts/ionicons.eot +0 -0
  92. package/dist/fonts/ionicons.svg +2230 -0
  93. package/dist/fonts/ionicons.ttf +0 -0
  94. package/dist/fonts/ionicons.woff +0 -0
  95. package/dist/fonts/ionicons.woff2 +0 -0
  96. package/dist/i18n/en-US.js +1411 -0
  97. package/dist/i18n/en-US.js.map +1 -0
  98. package/dist/i18n/en-US.min.js +1 -0
  99. package/dist/i18n/index.js +283 -0
  100. package/dist/i18n/index.js.map +1 -0
  101. package/dist/i18n/index.min.js +1 -0
  102. package/dist/kpc.js +50764 -0
  103. package/dist/kpc.js.map +1 -0
  104. package/dist/kpc.min.js +1 -0
  105. package/dist/kpc.react.js +58380 -0
  106. package/dist/kpc.react.js.map +1 -0
  107. package/dist/kpc.react.min.js +1 -0
  108. package/dist/kpc.tmp.js.map +1 -0
  109. package/dist/kpc.vue-legacy.js +58272 -0
  110. package/dist/kpc.vue-legacy.js.map +1 -0
  111. package/dist/kpc.vue-legacy.min.js +1 -0
  112. package/dist/kpc.vue.js +58128 -0
  113. package/dist/kpc.vue.js.map +1 -0
  114. package/dist/kpc.vue.min.js +1 -0
  115. package/es/components/anchor/constants.d.ts +2 -0
  116. package/es/components/anchor/constants.js +2 -0
  117. package/es/components/anchor/index.d.ts +41 -0
  118. package/es/components/anchor/index.js +141 -0
  119. package/es/components/anchor/index.spec.d.ts +1 -0
  120. package/es/components/anchor/index.spec.js +230 -0
  121. package/es/components/anchor/index.vdt.js +31 -0
  122. package/es/components/anchor/link.d.ts +16 -0
  123. package/es/components/anchor/link.js +52 -0
  124. package/es/components/anchor/link.vdt.js +49 -0
  125. package/es/components/anchor/styles.d.ts +5 -0
  126. package/es/components/anchor/styles.js +30 -0
  127. package/es/components/anchor/useScroll.d.ts +7 -0
  128. package/es/components/anchor/useScroll.js +218 -0
  129. package/es/components/dialog/base.vdt.js +1 -1
  130. package/es/components/drawer/index.d.ts +3 -0
  131. package/es/components/drawer/index.js +22 -3
  132. package/es/components/drawer/index.spec.js +83 -0
  133. package/es/components/drawer/index.vdt.js +23 -3
  134. package/es/components/drawer/styles.js +1 -1
  135. package/es/components/drawer/useDrawerResizable.d.ts +10 -0
  136. package/es/components/drawer/useDrawerResizable.js +162 -0
  137. package/es/components/menu/styles.d.ts +1 -0
  138. package/es/components/menu/styles.js +4 -1
  139. package/es/components/notification/index.d.ts +1 -0
  140. package/es/components/notification/index.js +1 -0
  141. package/es/components/notification/index.spec.d.ts +1 -0
  142. package/es/components/notification/index.spec.js +317 -0
  143. package/es/components/notification/notification.d.ts +39 -0
  144. package/es/components/notification/notification.js +183 -0
  145. package/es/components/notification/notification.vdt.js +56 -0
  146. package/es/components/notification/notifications.d.ts +16 -0
  147. package/es/components/notification/notifications.js +51 -0
  148. package/es/components/notification/notifications.vdt.js +24 -0
  149. package/es/components/notification/styles.d.ts +9 -0
  150. package/es/components/notification/styles.js +110 -0
  151. package/es/components/select/styles.js +1 -1
  152. package/es/components/table/styles.js +1 -1
  153. package/es/components/tabs/useActiveBar.js +7 -3
  154. package/es/components/tag/base.d.ts +2 -0
  155. package/es/components/tag/base.js +3 -0
  156. package/es/components/tag/index.spec.js +17 -0
  157. package/es/components/tag/index.vdt.js +12 -5
  158. package/es/components/tag/styles.d.ts +9 -0
  159. package/es/components/tag/styles.js +14 -1
  160. package/es/components/tag/useColor.d.ts +7 -0
  161. package/es/components/tag/useColor.js +71 -0
  162. package/es/components/timepicker/index.spec.js +70 -42
  163. package/es/components/timepicker/useDefaultValue.js +12 -7
  164. package/es/components/timepicker/useStep.js +4 -2
  165. package/es/components/transfer/index.d.ts +13 -0
  166. package/es/components/transfer/index.js +6 -2
  167. package/es/components/transfer/index.spec.js +197 -0
  168. package/es/components/transfer/index.vdt.js +28 -5
  169. package/es/components/transfer/styles.js +4 -1
  170. package/es/components/transfer/useCheck.js +2 -1
  171. package/es/components/transfer/usePagination.d.ts +12 -0
  172. package/es/components/transfer/usePagination.js +79 -0
  173. package/es/index.d.ts +4 -2
  174. package/es/index.js +4 -2
  175. package/es/site/data/components/anchor/demos/basic/index.d.ts +11 -0
  176. package/es/site/data/components/anchor/demos/basic/index.js +18 -0
  177. package/es/site/data/components/anchor/demos/basic/react.d.ts +11 -0
  178. package/es/site/data/components/anchor/demos/basic/react.js +46 -0
  179. package/es/site/data/components/anchor/demos/container/index.d.ts +12 -0
  180. package/es/site/data/components/anchor/demos/container/index.js +19 -0
  181. package/es/site/data/components/anchor/demos/container/react.d.ts +12 -0
  182. package/es/site/data/components/anchor/demos/container/react.js +52 -0
  183. package/es/site/data/components/anchor/demos/events/index.d.ts +17 -0
  184. package/es/site/data/components/anchor/demos/events/index.js +36 -0
  185. package/es/site/data/components/anchor/demos/events/react.d.ts +17 -0
  186. package/es/site/data/components/anchor/demos/events/react.js +88 -0
  187. package/es/site/data/components/anchor/demos/horizontal/index.d.ts +11 -0
  188. package/es/site/data/components/anchor/demos/horizontal/index.js +18 -0
  189. package/es/site/data/components/anchor/demos/horizontal/react.d.ts +11 -0
  190. package/es/site/data/components/anchor/demos/horizontal/react.js +46 -0
  191. package/es/site/data/components/anchor/demos/nested/index.d.ts +12 -0
  192. package/es/site/data/components/anchor/demos/nested/index.js +19 -0
  193. package/es/site/data/components/anchor/demos/nested/react.d.ts +12 -0
  194. package/es/site/data/components/anchor/demos/nested/react.js +100 -0
  195. package/es/site/data/components/anchor/index.d.ts +57 -0
  196. package/es/site/data/components/anchor/index.js +32 -0
  197. package/es/site/data/components/config/demos/basic/index.d.ts +1 -0
  198. package/es/site/data/components/config/demos/basic/index.js +8 -1
  199. package/es/site/data/components/config/demos/basic/react.d.ts +1 -0
  200. package/es/site/data/components/config/demos/basic/react.js +15 -3
  201. package/es/site/data/components/drawer/demos/resizable/index.d.ts +15 -0
  202. package/es/site/data/components/drawer/demos/resizable/index.js +26 -0
  203. package/es/site/data/components/drawer/demos/resizable/react.d.ts +15 -0
  204. package/es/site/data/components/drawer/demos/resizable/react.js +63 -0
  205. package/es/site/data/components/icon/demos/icons/index.js +1 -1
  206. package/es/site/data/components/menu/demos/collapse/index.d.ts +6 -1
  207. package/es/site/data/components/menu/demos/collapse/react.d.ts +6 -1
  208. package/es/site/data/components/menu/demos/showCollapseArrow/index.d.ts +8 -1
  209. package/es/site/data/components/menu/demos/showCollapseArrow/react.d.ts +8 -1
  210. package/es/site/data/components/menu/demos/size/index.d.ts +7 -2
  211. package/es/site/data/components/menu/demos/size/react.d.ts +7 -2
  212. package/es/site/data/components/notification/demos/basic/index.d.ts +6 -0
  213. package/es/site/data/components/notification/demos/basic/index.js +21 -0
  214. package/es/site/data/components/notification/demos/basic/react.d.ts +5 -0
  215. package/es/site/data/components/notification/demos/basic/react.js +24 -0
  216. package/es/site/data/components/notification/demos/close/index.d.ts +13 -0
  217. package/es/site/data/components/notification/demos/close/index.js +38 -0
  218. package/es/site/data/components/notification/demos/close/react.d.ts +13 -0
  219. package/es/site/data/components/notification/demos/close/react.js +52 -0
  220. package/es/site/data/components/notification/demos/duration/index.d.ts +7 -0
  221. package/es/site/data/components/notification/demos/duration/index.js +33 -0
  222. package/es/site/data/components/notification/demos/duration/react.d.ts +6 -0
  223. package/es/site/data/components/notification/demos/duration/react.js +38 -0
  224. package/es/site/data/components/notification/demos/events/index.d.ts +6 -0
  225. package/es/site/data/components/notification/demos/events/index.js +31 -0
  226. package/es/site/data/components/notification/demos/events/react.d.ts +5 -0
  227. package/es/site/data/components/notification/demos/events/react.js +34 -0
  228. package/es/site/data/components/notification/demos/hideClose/index.d.ts +6 -0
  229. package/es/site/data/components/notification/demos/hideClose/index.js +25 -0
  230. package/es/site/data/components/notification/demos/hideClose/react.d.ts +5 -0
  231. package/es/site/data/components/notification/demos/hideClose/react.js +28 -0
  232. package/es/site/data/components/notification/demos/icon/index.d.ts +7 -0
  233. package/es/site/data/components/notification/demos/icon/index.js +33 -0
  234. package/es/site/data/components/notification/demos/icon/react.d.ts +6 -0
  235. package/es/site/data/components/notification/demos/icon/react.js +42 -0
  236. package/es/site/data/components/notification/demos/position/index.d.ts +9 -0
  237. package/es/site/data/components/notification/demos/position/index.js +27 -0
  238. package/es/site/data/components/notification/demos/position/react.d.ts +8 -0
  239. package/es/site/data/components/notification/demos/position/react.js +40 -0
  240. package/es/site/data/components/notification/demos/types/index.d.ts +9 -0
  241. package/es/site/data/components/notification/demos/types/index.js +26 -0
  242. package/es/site/data/components/notification/demos/types/react.d.ts +8 -0
  243. package/es/site/data/components/notification/demos/types/react.js +39 -0
  244. package/es/site/data/components/notification/index.d.ts +57 -0
  245. package/es/site/data/components/notification/index.js +32 -0
  246. package/es/site/data/components/table/demos/hidden/react.js +21 -3
  247. package/es/site/data/components/tag/demos/color/index.d.ts +10 -0
  248. package/es/site/data/components/tag/demos/color/index.js +19 -0
  249. package/es/site/data/components/tag/demos/color/react.d.ts +10 -0
  250. package/es/site/data/components/tag/demos/color/react.js +34 -0
  251. package/es/site/data/components/transfer/demos/pagination/index.d.ts +19 -0
  252. package/es/site/data/components/transfer/demos/pagination/index.js +42 -0
  253. package/es/site/data/components/transfer/demos/pagination/react.d.ts +20 -0
  254. package/es/site/data/components/transfer/demos/pagination/react.js +65 -0
  255. package/es/site/data/components/transfer/demos/table/index.d.ts +33 -0
  256. package/es/site/data/components/transfer/demos/table/index.js +132 -0
  257. package/es/site/data/components/transfer/demos/table/react.d.ts +35 -0
  258. package/es/site/data/components/transfer/demos/table/react.js +246 -0
  259. package/es/site/src/router/index.js +4 -33
  260. package/es/styles/fonts/iconfont.eot +0 -0
  261. package/es/styles/fonts/iconfont.js +1 -1
  262. package/es/styles/fonts/iconfont.svg +38 -0
  263. package/es/styles/fonts/iconfont.ttf +0 -0
  264. package/es/styles/fonts/iconfont.woff +0 -0
  265. package/es/styles/fonts/iconfont.woff2 +0 -0
  266. package/es/styles/theme.d.ts +8 -0
  267. package/es/styles/theme.js +5 -1
  268. package/index.ts +4 -2
  269. package/package.json +2 -2
  270. package/styles/.DS_Store +0 -0
  271. package/styles/fonts/demo_index.html +443 -6
  272. package/styles/fonts/iconfont.css +82 -6
  273. package/styles/fonts/iconfont.eot +0 -0
  274. package/styles/fonts/iconfont.js +1 -1
  275. package/styles/fonts/iconfont.json +133 -0
  276. package/styles/fonts/iconfont.svg +38 -0
  277. package/styles/fonts/iconfont.ts +76 -0
  278. package/styles/fonts/iconfont.ttf +0 -0
  279. package/styles/fonts/iconfont.woff +0 -0
  280. package/styles/fonts/iconfont.woff2 +0 -0
  281. package/styles/theme.ts +4 -0
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ interface Props {
3
+ notificationId?: number;
4
+ }
5
+ export default class Demo extends React.Component<{}, Props> {
6
+ state: {
7
+ notificationId: undefined;
8
+ };
9
+ showNotification(): void;
10
+ closeNotification(): void;
11
+ render(): React.JSX.Element;
12
+ }
13
+ export {};
@@ -0,0 +1,52 @@
1
+ import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
2
+ import _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/concat";
3
+ import { __decorate } from "tslib";
4
+ import React from 'react';
5
+ import { ButtonGroup, Button } from '@king-design/react';
6
+ import { Notification, bind } from '@king-design/react';
7
+ var Demo = /*#__PURE__*/function (_React$Component) {
8
+ _inheritsLoose(Demo, _React$Component);
9
+ function Demo() {
10
+ var _context;
11
+ var _this;
12
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
13
+ args[_key] = arguments[_key];
14
+ }
15
+ _this = _React$Component.call.apply(_React$Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
16
+ _this.state = {
17
+ notificationId: undefined
18
+ };
19
+ return _this;
20
+ }
21
+ var _proto = Demo.prototype;
22
+ _proto.showNotification = function showNotification() {
23
+ var id = Notification.info({
24
+ title: '可关闭的通知',
25
+ content: '点击"关闭通知"按钮可以关闭此通知',
26
+ duration: 0
27
+ });
28
+ this.setState({
29
+ notificationId: id
30
+ });
31
+ };
32
+ _proto.closeNotification = function closeNotification() {
33
+ var notificationId = this.state.notificationId;
34
+ if (notificationId !== undefined) {
35
+ Notification.close(notificationId);
36
+ this.setState({
37
+ notificationId: undefined
38
+ });
39
+ }
40
+ };
41
+ _proto.render = function render() {
42
+ return /*#__PURE__*/React.createElement(ButtonGroup, null, /*#__PURE__*/React.createElement(Button, {
43
+ onClick: this.showNotification
44
+ }, "\u663E\u793A\u901A\u77E5"), /*#__PURE__*/React.createElement(Button, {
45
+ onClick: this.closeNotification
46
+ }, "\u5173\u95ED\u901A\u77E5"));
47
+ };
48
+ return Demo;
49
+ }(React.Component);
50
+ export { Demo as default };
51
+ __decorate([bind], Demo.prototype, "showNotification", null);
52
+ __decorate([bind], Demo.prototype, "closeNotification", null);
@@ -0,0 +1,7 @@
1
+ export { default as data } from './index.json';
2
+ import { Component } from 'intact';
3
+ export default class extends Component {
4
+ static template: string | import("intact").Template<any>;
5
+ showCloseDelay(): void;
6
+ showStick(): void;
7
+ }
@@ -0,0 +1,33 @@
1
+ import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
2
+ import { __decorate } from "tslib";
3
+ export { default as data } from './index.json';
4
+ import { Component } from 'intact';
5
+ import template from './index.vdt';
6
+ import { Notification } from 'kpc';
7
+ import { bind } from 'kpc';
8
+ var default_1 = /*#__PURE__*/function (_Component) {
9
+ _inheritsLoose(default_1, _Component);
10
+ function default_1() {
11
+ return _Component.apply(this, arguments) || this;
12
+ }
13
+ var _proto = default_1.prototype;
14
+ _proto.showCloseDelay = function showCloseDelay() {
15
+ Notification.warning({
16
+ title: '10s后关闭',
17
+ content: '这条通知10s后才会自动关闭',
18
+ duration: 10000
19
+ });
20
+ };
21
+ _proto.showStick = function showStick() {
22
+ Notification.warning({
23
+ title: '不会自动关闭',
24
+ content: '这条通知不会自动关闭,需要手动关闭',
25
+ duration: 0
26
+ });
27
+ };
28
+ return default_1;
29
+ }(Component);
30
+ default_1.template = template;
31
+ export { default_1 as default };
32
+ __decorate([bind], default_1.prototype, "showCloseDelay", null);
33
+ __decorate([bind], default_1.prototype, "showStick", null);
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ export default class Demo extends React.Component {
3
+ showCloseDelay(): void;
4
+ showStick(): void;
5
+ render(): React.JSX.Element;
6
+ }
@@ -0,0 +1,38 @@
1
+ import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
2
+ import { __decorate } from "tslib";
3
+ import React from 'react';
4
+ import { ButtonGroup, Button } from '@king-design/react';
5
+ import { Notification } from '@king-design/react';
6
+ import { bind } from '@king-design/react';
7
+ var Demo = /*#__PURE__*/function (_React$Component) {
8
+ _inheritsLoose(Demo, _React$Component);
9
+ function Demo() {
10
+ return _React$Component.apply(this, arguments) || this;
11
+ }
12
+ var _proto = Demo.prototype;
13
+ _proto.showCloseDelay = function showCloseDelay() {
14
+ Notification.warning({
15
+ title: '10s后关闭',
16
+ content: '这条通知10s后才会自动关闭',
17
+ duration: 10000
18
+ });
19
+ };
20
+ _proto.showStick = function showStick() {
21
+ Notification.warning({
22
+ title: '不会自动关闭',
23
+ content: '这条通知不会自动关闭,需要手动关闭',
24
+ duration: 0
25
+ });
26
+ };
27
+ _proto.render = function render() {
28
+ return /*#__PURE__*/React.createElement(ButtonGroup, null, /*#__PURE__*/React.createElement(Button, {
29
+ onClick: this.showCloseDelay
30
+ }, "10s\u540E\u5173\u95ED"), /*#__PURE__*/React.createElement(Button, {
31
+ onClick: this.showStick
32
+ }, "\u4E0D\u4F1A\u81EA\u52A8\u5173\u95ED"));
33
+ };
34
+ return Demo;
35
+ }(React.Component);
36
+ export { Demo as default };
37
+ __decorate([bind], Demo.prototype, "showCloseDelay", null);
38
+ __decorate([bind], Demo.prototype, "showStick", null);
@@ -0,0 +1,6 @@
1
+ export { default as data } from './index.json';
2
+ import { Component } from 'intact';
3
+ export default class extends Component {
4
+ static template: string | import("intact").Template<any>;
5
+ showNotification(): void;
6
+ }
@@ -0,0 +1,31 @@
1
+ import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
2
+ import { __decorate } from "tslib";
3
+ export { default as data } from './index.json';
4
+ import { Component } from 'intact';
5
+ import template from './index.vdt';
6
+ import { Notification, Message } from 'kpc';
7
+ import { bind } from 'kpc';
8
+ var default_1 = /*#__PURE__*/function (_Component) {
9
+ _inheritsLoose(default_1, _Component);
10
+ function default_1() {
11
+ return _Component.apply(this, arguments) || this;
12
+ }
13
+ var _proto = default_1.prototype;
14
+ _proto.showNotification = function showNotification() {
15
+ Notification.info({
16
+ title: '事件通知',
17
+ content: '点击通知或等待自动关闭,查看页面信息提示',
18
+ onClick: function onClick(e) {
19
+ Message.info('你点击了通知');
20
+ },
21
+ onClose: function onClose() {
22
+ Message.warning('通知已关闭');
23
+ },
24
+ className: 'event-test'
25
+ });
26
+ };
27
+ return default_1;
28
+ }(Component);
29
+ default_1.template = template;
30
+ export { default_1 as default };
31
+ __decorate([bind], default_1.prototype, "showNotification", null);
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ export default class Demo extends React.Component {
3
+ showNotification(): void;
4
+ render(): React.JSX.Element;
5
+ }
@@ -0,0 +1,34 @@
1
+ import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
2
+ import { __decorate } from "tslib";
3
+ import React from 'react';
4
+ import { ButtonGroup, Button } from '@king-design/react';
5
+ import { Notification, Message } from '@king-design/react';
6
+ import { bind } from '@king-design/react';
7
+ var Demo = /*#__PURE__*/function (_React$Component) {
8
+ _inheritsLoose(Demo, _React$Component);
9
+ function Demo() {
10
+ return _React$Component.apply(this, arguments) || this;
11
+ }
12
+ var _proto = Demo.prototype;
13
+ _proto.showNotification = function showNotification() {
14
+ Notification.info({
15
+ title: '事件通知',
16
+ content: '点击通知或等待自动关闭,查看页面信息提示',
17
+ onClick: function onClick(e) {
18
+ Message.info('你点击了通知');
19
+ },
20
+ onClose: function onClose() {
21
+ Message.warning('通知已关闭');
22
+ },
23
+ className: 'event-test'
24
+ });
25
+ };
26
+ _proto.render = function render() {
27
+ return /*#__PURE__*/React.createElement(ButtonGroup, null, /*#__PURE__*/React.createElement(Button, {
28
+ onClick: this.showNotification
29
+ }, "\u663E\u793A\u901A\u77E5"));
30
+ };
31
+ return Demo;
32
+ }(React.Component);
33
+ export { Demo as default };
34
+ __decorate([bind], Demo.prototype, "showNotification", null);
@@ -0,0 +1,6 @@
1
+ export { default as data } from './index.json';
2
+ import { Component } from 'intact';
3
+ export default class extends Component {
4
+ static template: string | import("intact").Template<any>;
5
+ hideClosable(): void;
6
+ }
@@ -0,0 +1,25 @@
1
+ import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
2
+ import { __decorate } from "tslib";
3
+ export { default as data } from './index.json';
4
+ import { Component } from 'intact';
5
+ import template from './index.vdt';
6
+ import { Notification } from 'kpc';
7
+ import { bind } from 'kpc';
8
+ var default_1 = /*#__PURE__*/function (_Component) {
9
+ _inheritsLoose(default_1, _Component);
10
+ function default_1() {
11
+ return _Component.apply(this, arguments) || this;
12
+ }
13
+ var _proto = default_1.prototype;
14
+ _proto.hideClosable = function hideClosable() {
15
+ Notification.info({
16
+ title: '隐藏关闭按钮',
17
+ content: '这条通知隐藏了关闭按钮',
18
+ closable: false
19
+ });
20
+ };
21
+ return default_1;
22
+ }(Component);
23
+ default_1.template = template;
24
+ export { default_1 as default };
25
+ __decorate([bind], default_1.prototype, "hideClosable", null);
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ export default class Demo extends React.Component {
3
+ hideClosable(): void;
4
+ render(): React.JSX.Element;
5
+ }
@@ -0,0 +1,28 @@
1
+ import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
2
+ import { __decorate } from "tslib";
3
+ import React from 'react';
4
+ import { Button } from '@king-design/react';
5
+ import { Notification } from '@king-design/react';
6
+ import { bind } from '@king-design/react';
7
+ var Demo = /*#__PURE__*/function (_React$Component) {
8
+ _inheritsLoose(Demo, _React$Component);
9
+ function Demo() {
10
+ return _React$Component.apply(this, arguments) || this;
11
+ }
12
+ var _proto = Demo.prototype;
13
+ _proto.hideClosable = function hideClosable() {
14
+ Notification.info({
15
+ title: '隐藏关闭按钮',
16
+ content: '这条通知隐藏了关闭按钮',
17
+ closable: false
18
+ });
19
+ };
20
+ _proto.render = function render() {
21
+ return /*#__PURE__*/React.createElement(Button, {
22
+ onClick: this.hideClosable
23
+ }, "\u9690\u85CF\u5173\u95ED\u6309\u94AE");
24
+ };
25
+ return Demo;
26
+ }(React.Component);
27
+ export { Demo as default };
28
+ __decorate([bind], Demo.prototype, "hideClosable", null);
@@ -0,0 +1,7 @@
1
+ export { default as data } from './index.json';
2
+ import { Component } from 'intact';
3
+ export default class extends Component {
4
+ static template: string | import("intact").Template<any>;
5
+ showNotificationIcon(): void;
6
+ showTimeIcon(): void;
7
+ }
@@ -0,0 +1,33 @@
1
+ import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
2
+ import { __decorate } from "tslib";
3
+ export { default as data } from './index.json';
4
+ import { Component } from 'intact';
5
+ import template from './index.vdt';
6
+ import { Notification } from 'kpc';
7
+ import { bind } from 'kpc';
8
+ var default_1 = /*#__PURE__*/function (_Component) {
9
+ _inheritsLoose(default_1, _Component);
10
+ function default_1() {
11
+ return _Component.apply(this, arguments) || this;
12
+ }
13
+ var _proto = default_1.prototype;
14
+ _proto.showNotificationIcon = function showNotificationIcon() {
15
+ Notification.notice({
16
+ title: '自定义图标',
17
+ content: 'hello, kc',
18
+ icon: 'k-icon-notification-fill'
19
+ });
20
+ };
21
+ _proto.showTimeIcon = function showTimeIcon() {
22
+ Notification.notice({
23
+ title: '自定义图标',
24
+ content: 'hello, kc',
25
+ icon: 'k-icon-time'
26
+ });
27
+ };
28
+ return default_1;
29
+ }(Component);
30
+ default_1.template = template;
31
+ export { default_1 as default };
32
+ __decorate([bind], default_1.prototype, "showNotificationIcon", null);
33
+ __decorate([bind], default_1.prototype, "showTimeIcon", null);
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ export default class Demo extends React.Component {
3
+ showNotificationIcon(): void;
4
+ showTimeIcon(): void;
5
+ render(): React.JSX.Element;
6
+ }
@@ -0,0 +1,42 @@
1
+ import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
2
+ import { __decorate } from "tslib";
3
+ import React from 'react';
4
+ import { ButtonGroup, Button, Icon } from '@king-design/react';
5
+ import { Notification } from '@king-design/react';
6
+ import { bind } from '@king-design/react';
7
+ var Demo = /*#__PURE__*/function (_React$Component) {
8
+ _inheritsLoose(Demo, _React$Component);
9
+ function Demo() {
10
+ return _React$Component.apply(this, arguments) || this;
11
+ }
12
+ var _proto = Demo.prototype;
13
+ _proto.showNotificationIcon = function showNotificationIcon() {
14
+ Notification.notice({
15
+ title: '自定义图标',
16
+ content: 'hello, kc',
17
+ icon: 'k-icon-notification-fill'
18
+ });
19
+ };
20
+ _proto.showTimeIcon = function showTimeIcon() {
21
+ Notification.notice({
22
+ title: '自定义图标',
23
+ content: 'hello, kc',
24
+ icon: 'k-icon-time'
25
+ });
26
+ };
27
+ _proto.render = function render() {
28
+ return /*#__PURE__*/React.createElement(ButtonGroup, null, /*#__PURE__*/React.createElement(Button, {
29
+ onClick: this.showNotificationIcon
30
+ }, /*#__PURE__*/React.createElement(Icon, {
31
+ className: "k-icon-notification-fill"
32
+ })), /*#__PURE__*/React.createElement(Button, {
33
+ onClick: this.showTimeIcon
34
+ }, /*#__PURE__*/React.createElement(Icon, {
35
+ className: "k-icon-time"
36
+ })));
37
+ };
38
+ return Demo;
39
+ }(React.Component);
40
+ export { Demo as default };
41
+ __decorate([bind], Demo.prototype, "showNotificationIcon", null);
42
+ __decorate([bind], Demo.prototype, "showTimeIcon", null);
@@ -0,0 +1,9 @@
1
+ export { default as data } from './index.json';
2
+ import { Component } from 'intact';
3
+ export default class extends Component {
4
+ static template: string | import("intact").Template<any>;
5
+ static defaults(): {
6
+ positions: readonly ["topRight", "topLeft", "bottomRight", "bottomLeft", "top", "bottom"];
7
+ };
8
+ showNotification(position: 'topRight' | 'topLeft' | 'bottomRight' | 'bottomLeft' | 'top' | 'bottom'): void;
9
+ }
@@ -0,0 +1,27 @@
1
+ import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
2
+ export { default as data } from './index.json';
3
+ import { Component } from 'intact';
4
+ import template from './index.vdt';
5
+ import { Notification } from 'kpc';
6
+ var default_1 = /*#__PURE__*/function (_Component) {
7
+ _inheritsLoose(default_1, _Component);
8
+ function default_1() {
9
+ return _Component.apply(this, arguments) || this;
10
+ }
11
+ default_1.defaults = function defaults() {
12
+ return {
13
+ positions: ['topRight', 'topLeft', 'bottomRight', 'bottomLeft', 'top', 'bottom']
14
+ };
15
+ };
16
+ var _proto = default_1.prototype;
17
+ _proto.showNotification = function showNotification(position) {
18
+ Notification.info({
19
+ title: '通知标题',
20
+ content: "\u901A\u77E5\u51FA\u73B0\u5728" + position + "\u4F4D\u7F6E",
21
+ position: position
22
+ });
23
+ };
24
+ return default_1;
25
+ }(Component);
26
+ default_1.template = template;
27
+ export { default_1 as default };
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ export default class Demo extends React.Component {
3
+ state: {
4
+ positions: readonly ["topRight", "topLeft", "bottomRight", "bottomLeft", "top", "bottom"];
5
+ };
6
+ showNotification(position: 'topRight' | 'topLeft' | 'bottomRight' | 'bottomLeft' | 'top' | 'bottom'): void;
7
+ render(): React.JSX.Element;
8
+ }
@@ -0,0 +1,40 @@
1
+ import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
2
+ import _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/concat";
3
+ import _mapInstanceProperty from "@babel/runtime-corejs3/core-js/instance/map";
4
+ import React from 'react';
5
+ import { ButtonGroup, Button } from '@king-design/react';
6
+ import { Notification } from '@king-design/react';
7
+ var Demo = /*#__PURE__*/function (_React$Component) {
8
+ _inheritsLoose(Demo, _React$Component);
9
+ function Demo() {
10
+ var _context;
11
+ var _this;
12
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
13
+ args[_key] = arguments[_key];
14
+ }
15
+ _this = _React$Component.call.apply(_React$Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
16
+ _this.state = {
17
+ positions: ['topRight', 'topLeft', 'bottomRight', 'bottomLeft', 'top', 'bottom']
18
+ };
19
+ return _this;
20
+ }
21
+ var _proto = Demo.prototype;
22
+ _proto.showNotification = function showNotification(position) {
23
+ Notification.info({
24
+ title: '通知标题',
25
+ content: "\u901A\u77E5\u51FA\u73B0\u5728" + position + "\u4F4D\u7F6E",
26
+ position: position
27
+ });
28
+ };
29
+ _proto.render = function render() {
30
+ var _context2,
31
+ _this2 = this;
32
+ return /*#__PURE__*/React.createElement(ButtonGroup, null, _mapInstanceProperty(_context2 = this.state.positions).call(_context2, function ($value, $key) {
33
+ return /*#__PURE__*/React.createElement(Button, {
34
+ onClick: _this2.showNotification.bind(_this2, $value)
35
+ }, $value);
36
+ }));
37
+ };
38
+ return Demo;
39
+ }(React.Component);
40
+ export { Demo as default };
@@ -0,0 +1,9 @@
1
+ export { default as data } from './index.json';
2
+ import { Component } from 'intact';
3
+ export default class extends Component {
4
+ static template: string | import("intact").Template<any>;
5
+ static defaults(): {
6
+ types: readonly ["info", "error", "warning", "success"];
7
+ };
8
+ showNotification(type: 'info' | 'error' | 'warning' | 'success'): void;
9
+ }
@@ -0,0 +1,26 @@
1
+ import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
2
+ export { default as data } from './index.json';
3
+ import { Component } from 'intact';
4
+ import template from './index.vdt';
5
+ import { Notification } from 'kpc';
6
+ var default_1 = /*#__PURE__*/function (_Component) {
7
+ _inheritsLoose(default_1, _Component);
8
+ function default_1() {
9
+ return _Component.apply(this, arguments) || this;
10
+ }
11
+ default_1.defaults = function defaults() {
12
+ return {
13
+ types: ['info', 'error', 'warning', 'success']
14
+ };
15
+ };
16
+ var _proto = default_1.prototype;
17
+ _proto.showNotification = function showNotification(type) {
18
+ Notification[type]({
19
+ title: type,
20
+ content: "\u8FD9\u662F\u4E00\u6761" + type + "\u7C7B\u578B\u7684\u901A\u77E5"
21
+ });
22
+ };
23
+ return default_1;
24
+ }(Component);
25
+ default_1.template = template;
26
+ export { default_1 as default };
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ export default class Demo extends React.Component {
3
+ state: {
4
+ types: readonly ["info", "error", "warning", "success"];
5
+ };
6
+ showNotification(type: 'info' | 'error' | 'warning' | 'success'): void;
7
+ render(): React.JSX.Element;
8
+ }
@@ -0,0 +1,39 @@
1
+ import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
2
+ import _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/concat";
3
+ import _mapInstanceProperty from "@babel/runtime-corejs3/core-js/instance/map";
4
+ import React from 'react';
5
+ import { ButtonGroup, Button } from '@king-design/react';
6
+ import { Notification } from '@king-design/react';
7
+ var Demo = /*#__PURE__*/function (_React$Component) {
8
+ _inheritsLoose(Demo, _React$Component);
9
+ function Demo() {
10
+ var _context;
11
+ var _this;
12
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
13
+ args[_key] = arguments[_key];
14
+ }
15
+ _this = _React$Component.call.apply(_React$Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
16
+ _this.state = {
17
+ types: ['info', 'error', 'warning', 'success']
18
+ };
19
+ return _this;
20
+ }
21
+ var _proto = Demo.prototype;
22
+ _proto.showNotification = function showNotification(type) {
23
+ Notification[type]({
24
+ title: type,
25
+ content: "\u8FD9\u662F\u4E00\u6761" + type + "\u7C7B\u578B\u7684\u901A\u77E5"
26
+ });
27
+ };
28
+ _proto.render = function render() {
29
+ var _context2,
30
+ _this2 = this;
31
+ return /*#__PURE__*/React.createElement(ButtonGroup, null, _mapInstanceProperty(_context2 = this.state.types).call(_context2, function ($value, $key) {
32
+ return /*#__PURE__*/React.createElement(Button, {
33
+ onClick: _this2.showNotification.bind(_this2, $value)
34
+ }, $value);
35
+ }));
36
+ };
37
+ return Demo;
38
+ }(React.Component);
39
+ export { Demo as default };
@@ -0,0 +1,57 @@
1
+ import { Component } from 'intact';
2
+ import Article from '~/../src/components/article';
3
+ export default class extends Article {
4
+ static sidebar: {
5
+ 组件: {
6
+ title: string;
7
+ category: string;
8
+ order: number;
9
+ sidebar: string;
10
+ path: string;
11
+ }[];
12
+ undefined: ({
13
+ title: string;
14
+ order: number;
15
+ sidebar: string;
16
+ disabled: boolean;
17
+ path: string;
18
+ } | {
19
+ title: string;
20
+ order: number;
21
+ sidebar: string;
22
+ path: string;
23
+ disabled?: undefined;
24
+ })[];
25
+ };
26
+ static data: {
27
+ setting: {
28
+ title: string;
29
+ category: string;
30
+ order: number;
31
+ sidebar: string;
32
+ };
33
+ contents: string;
34
+ index: string;
35
+ catalogs: {
36
+ text: string;
37
+ level: number;
38
+ id: string;
39
+ }[];
40
+ };
41
+ static defaults: () => {
42
+ demos: Component<any, {}, {}, {}>[];
43
+ setting: {
44
+ title: string;
45
+ category: string;
46
+ order: number;
47
+ sidebar: string;
48
+ };
49
+ contents: string;
50
+ index: string;
51
+ catalogs: {
52
+ text: string;
53
+ level: number;
54
+ id: string;
55
+ }[];
56
+ };
57
+ }