@king-design/intact 2.1.1 → 2.1.2
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.
- package/components/dropdown/dropdown.ts +1 -0
- package/components/form/index.spec.ts +22 -1
- package/components/tooltip/index.spec.ts +30 -0
- package/components/tooltip/tooltip.ts +3 -0
- package/es/components/dropdown/dropdown.js +2 -1
- package/es/components/form/index.spec.js +49 -2
- package/es/components/tooltip/index.spec.js +57 -0
- package/es/components/tooltip/tooltip.js +5 -1
- package/es/index.d.ts +2 -2
- package/es/index.js +2 -2
- package/es/site/data/components/copy/demos/basic/index.d.ts +5 -0
- package/es/site/data/components/copy/demos/basic/index.js +17 -0
- package/es/site/data/components/copy/demos/basic/react.d.ts +4 -0
- package/es/site/data/components/copy/demos/basic/react.js +23 -0
- package/es/site/data/components/copy/demos/children/index.d.ts +6 -0
- package/es/site/data/components/copy/demos/children/index.js +18 -0
- package/es/site/data/components/copy/demos/children/react.d.ts +5 -0
- package/es/site/data/components/copy/demos/children/react.js +44 -0
- package/es/site/data/components/copy/index.d.ts +57 -0
- package/es/site/data/components/copy/index.js +42 -0
- package/es/site/data/components/icon/demos/disabled/index.d.ts +6 -0
- package/es/site/data/components/icon/demos/disabled/index.js +18 -0
- package/es/site/data/components/icon/demos/disabled/react.d.ts +5 -0
- package/es/site/data/components/icon/demos/disabled/react.js +33 -0
- package/es/site/data/components/input/demos/flat/index.d.ts +5 -0
- package/es/site/data/components/input/demos/flat/index.js +17 -0
- package/es/site/data/components/input/demos/flat/react.d.ts +4 -0
- package/es/site/data/components/input/demos/flat/react.js +29 -0
- package/es/site/data/components/input/demos/showCount/index.d.ts +5 -0
- package/es/site/data/components/input/demos/showCount/index.js +17 -0
- package/es/site/data/components/input/demos/showCount/react.d.ts +4 -0
- package/es/site/data/components/input/demos/showCount/react.js +33 -0
- package/es/site/data/components/pagination/demos/flat/index.d.ts +6 -0
- package/es/site/data/components/pagination/demos/flat/index.js +18 -0
- package/es/site/data/components/pagination/demos/flat/react.d.ts +5 -0
- package/es/site/data/components/pagination/demos/flat/react.js +41 -0
- package/es/site/data/components/popover/demos/basic/index.d.ts +7 -0
- package/es/site/data/components/popover/demos/basic/index.js +28 -0
- package/es/site/data/components/popover/demos/basic/react.d.ts +8 -0
- package/es/site/data/components/popover/demos/basic/react.js +59 -0
- package/es/site/data/components/popover/demos/button/index.d.ts +8 -0
- package/es/site/data/components/popover/demos/button/index.js +42 -0
- package/es/site/data/components/popover/demos/button/react.d.ts +8 -0
- package/es/site/data/components/popover/demos/button/react.js +73 -0
- package/es/site/data/components/popover/demos/content/index.d.ts +7 -0
- package/es/site/data/components/popover/demos/content/index.js +28 -0
- package/es/site/data/components/popover/demos/content/react.d.ts +6 -0
- package/es/site/data/components/popover/demos/content/react.js +43 -0
- package/es/site/data/components/popover/demos/text/index.d.ts +7 -0
- package/es/site/data/components/popover/demos/text/index.js +28 -0
- package/es/site/data/components/popover/demos/text/react.d.ts +6 -0
- package/es/site/data/components/popover/demos/text/react.js +36 -0
- package/es/site/data/components/popover/demos/type/index.d.ts +11 -0
- package/es/site/data/components/popover/demos/type/index.js +34 -0
- package/es/site/data/components/popover/demos/type/react.d.ts +11 -0
- package/es/site/data/components/popover/demos/type/react.js +58 -0
- package/es/site/data/components/popover/index.d.ts +57 -0
- package/es/site/data/components/popover/index.js +42 -0
- package/es/site/data/components/progress/demos/circleSize/index.d.ts +14 -0
- package/es/site/data/components/progress/demos/circleSize/index.js +43 -0
- package/es/site/data/components/progress/demos/circleSize/react.d.ts +14 -0
- package/es/site/data/components/progress/demos/circleSize/react.js +98 -0
- package/es/site/data/components/select/demos/draggable/index.d.ts +10 -0
- package/es/site/data/components/select/demos/draggable/index.js +24 -0
- package/es/site/data/components/select/demos/draggable/react.d.ts +10 -0
- package/es/site/data/components/select/demos/draggable/react.js +85 -0
- package/es/site/data/components/select/demos/flat/index.d.ts +5 -0
- package/es/site/data/components/select/demos/flat/index.js +17 -0
- package/es/site/data/components/select/demos/flat/react.d.ts +4 -0
- package/es/site/data/components/select/demos/flat/react.js +73 -0
- package/es/site/data/components/select/demos/inline/index.d.ts +5 -0
- package/es/site/data/components/select/demos/inline/index.js +17 -0
- package/es/site/data/components/select/demos/inline/react.d.ts +4 -0
- package/es/site/data/components/select/demos/inline/react.js +27 -0
- package/es/site/data/components/select/demos/nowrap/index.d.ts +5 -0
- package/es/site/data/components/select/demos/nowrap/index.js +17 -0
- package/es/site/data/components/select/demos/nowrap/react.d.ts +4 -0
- package/es/site/data/components/select/demos/nowrap/react.js +41 -0
- package/es/site/data/components/steps/demos/vertical/index.d.ts +14 -0
- package/es/site/data/components/steps/demos/vertical/index.js +40 -0
- package/es/site/data/components/steps/demos/vertical/react.d.ts +14 -0
- package/es/site/data/components/steps/demos/vertical/react.js +124 -0
- package/es/site/data/components/switch/demos/disabled/index.d.ts +6 -0
- package/es/site/data/components/switch/demos/disabled/index.js +18 -0
- package/es/site/data/components/switch/demos/disabled/react.d.ts +5 -0
- package/es/site/data/components/switch/demos/disabled/react.js +27 -0
- package/es/site/data/components/tabs/demos/scroll/index.d.ts +18 -0
- package/es/site/data/components/tabs/demos/scroll/index.js +87 -0
- package/es/site/data/components/tabs/demos/scroll/react.d.ts +18 -0
- package/es/site/data/components/tabs/demos/scroll/react.js +166 -0
- package/es/site/data/components/tag/demos/draggable/index.d.ts +11 -0
- package/es/site/data/components/tag/demos/draggable/index.js +24 -0
- package/es/site/data/components/tag/demos/draggable/react.d.ts +11 -0
- package/es/site/data/components/tag/demos/draggable/react.js +62 -0
- package/es/site/data/components/tag/demos/tags/index.d.ts +12 -0
- package/es/site/data/components/tag/demos/tags/index.js +39 -0
- package/es/site/data/components/tag/demos/tags/react.d.ts +12 -0
- package/es/site/data/components/tag/demos/tags/react.js +83 -0
- package/index.ts +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,40 @@
|
|
|
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 './index.styl';
|
|
7
|
+
import { bind } from 'kpc';
|
|
8
|
+
|
|
9
|
+
var default_1 = /*#__PURE__*/function (_Component) {
|
|
10
|
+
_inheritsLoose(default_1, _Component);
|
|
11
|
+
|
|
12
|
+
function default_1() {
|
|
13
|
+
return _Component.apply(this, arguments) || this;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
default_1.defaults = function defaults() {
|
|
17
|
+
return {
|
|
18
|
+
index: 0
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
var _proto = default_1.prototype;
|
|
23
|
+
|
|
24
|
+
_proto.previous = function previous() {
|
|
25
|
+
this.set('index', this.get('index') - 1);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
_proto.next = function next() {
|
|
29
|
+
this.set('index', this.get('index') + 1);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
return default_1;
|
|
33
|
+
}(Component);
|
|
34
|
+
|
|
35
|
+
default_1.template = template;
|
|
36
|
+
export { default_1 as default };
|
|
37
|
+
|
|
38
|
+
__decorate([bind], default_1.prototype, "previous", null);
|
|
39
|
+
|
|
40
|
+
__decorate([bind], default_1.prototype, "next", null);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.styl';
|
|
3
|
+
interface Props {
|
|
4
|
+
index?: number;
|
|
5
|
+
}
|
|
6
|
+
export default class Demo extends React.Component<{}, Props> {
|
|
7
|
+
state: {
|
|
8
|
+
index: number;
|
|
9
|
+
};
|
|
10
|
+
previous(): void;
|
|
11
|
+
next(): void;
|
|
12
|
+
render(): JSX.Element;
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,124 @@
|
|
|
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 { Steps, Step, Button } from '@king-design/react';
|
|
6
|
+
import './index.styl';
|
|
7
|
+
import { bind } from '@king-design/react';
|
|
8
|
+
|
|
9
|
+
var Demo = /*#__PURE__*/function (_React$Component) {
|
|
10
|
+
_inheritsLoose(Demo, _React$Component);
|
|
11
|
+
|
|
12
|
+
function Demo() {
|
|
13
|
+
var _context;
|
|
14
|
+
|
|
15
|
+
var _this;
|
|
16
|
+
|
|
17
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
18
|
+
args[_key] = arguments[_key];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
_this = _React$Component.call.apply(_React$Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
|
|
22
|
+
_this.state = {
|
|
23
|
+
index: 0
|
|
24
|
+
};
|
|
25
|
+
return _this;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
var _proto = Demo.prototype;
|
|
29
|
+
|
|
30
|
+
_proto.previous = function previous() {
|
|
31
|
+
this.setState({
|
|
32
|
+
index: this.state.index - 1
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
_proto.next = function next() {
|
|
37
|
+
this.setState({
|
|
38
|
+
index: this.state.index + 1
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
_proto.render = function render() {
|
|
43
|
+
var _this2 = this;
|
|
44
|
+
|
|
45
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
46
|
+
className: "demo-wrapper"
|
|
47
|
+
}, /*#__PURE__*/React.createElement(Steps, {
|
|
48
|
+
value: this.state.index,
|
|
49
|
+
onChangeValue: function onChangeValue(index) {
|
|
50
|
+
return _this2.setState({
|
|
51
|
+
index: index
|
|
52
|
+
});
|
|
53
|
+
},
|
|
54
|
+
vertical: true
|
|
55
|
+
}, /*#__PURE__*/React.createElement(Step, {
|
|
56
|
+
title: "\u9009\u62E9\u914D\u7F6E"
|
|
57
|
+
}, "\u8BF7\u9009\u62E9\u4E3B\u673A\u7684\u914D\u7F6E\u4FE1\u606F"), /*#__PURE__*/React.createElement(Step, {
|
|
58
|
+
title: "\u9009\u62E9\u5F39\u6027IP"
|
|
59
|
+
}, "\u8BF7\u9009\u62E9\u4E3B\u673A\u5F39\u6027IP\u7684\u914D\u7F6E\u4FE1\u606F"), /*#__PURE__*/React.createElement(Step, {
|
|
60
|
+
title: "\u8BBE\u7F6EVPC"
|
|
61
|
+
})), /*#__PURE__*/React.createElement(Steps, {
|
|
62
|
+
value: this.state.index,
|
|
63
|
+
onChangeValue: function onChangeValue(index) {
|
|
64
|
+
return _this2.setState({
|
|
65
|
+
index: index
|
|
66
|
+
});
|
|
67
|
+
},
|
|
68
|
+
vertical: true,
|
|
69
|
+
type: "line"
|
|
70
|
+
}, /*#__PURE__*/React.createElement(Step, {
|
|
71
|
+
title: "\u9009\u62E9\u914D\u7F6E"
|
|
72
|
+
}, "\u8BF7\u9009\u62E9\u4E3B\u673A\u7684\u914D\u7F6E\u4FE1\u606F"), /*#__PURE__*/React.createElement(Step, {
|
|
73
|
+
title: "\u9009\u62E9\u5F39\u6027IP"
|
|
74
|
+
}, "\u8BF7\u9009\u62E9\u4E3B\u673A\u5F39\u6027IP\u7684\u914D\u7F6E\u4FE1\u606F"), /*#__PURE__*/React.createElement(Step, {
|
|
75
|
+
title: "\u8BBE\u7F6EVPC"
|
|
76
|
+
})), /*#__PURE__*/React.createElement(Steps, {
|
|
77
|
+
value: this.state.index,
|
|
78
|
+
onChangeValue: function onChangeValue(index) {
|
|
79
|
+
return _this2.setState({
|
|
80
|
+
index: index
|
|
81
|
+
});
|
|
82
|
+
},
|
|
83
|
+
vertical: true,
|
|
84
|
+
type: "line-compact"
|
|
85
|
+
}, /*#__PURE__*/React.createElement(Step, {
|
|
86
|
+
title: "\u9009\u62E9\u914D\u7F6E"
|
|
87
|
+
}, "\u8BF7\u9009\u62E9\u4E3B\u673A\u7684\u914D\u7F6E\u4FE1\u606F"), /*#__PURE__*/React.createElement(Step, {
|
|
88
|
+
title: "\u9009\u62E9\u5F39\u6027IP"
|
|
89
|
+
}, "\u8BF7\u9009\u62E9\u4E3B\u673A\u5F39\u6027IP\u7684\u914D\u7F6E\u4FE1\u606F"), /*#__PURE__*/React.createElement(Step, {
|
|
90
|
+
title: "\u8BBE\u7F6EVPC"
|
|
91
|
+
})), /*#__PURE__*/React.createElement(Steps, {
|
|
92
|
+
value: this.state.index,
|
|
93
|
+
onChangeValue: function onChangeValue(index) {
|
|
94
|
+
return _this2.setState({
|
|
95
|
+
index: index
|
|
96
|
+
});
|
|
97
|
+
},
|
|
98
|
+
vertical: true,
|
|
99
|
+
type: "simple"
|
|
100
|
+
}, /*#__PURE__*/React.createElement(Step, {
|
|
101
|
+
title: "\u9009\u62E9\u914D\u7F6E"
|
|
102
|
+
}, "\u8BF7\u9009\u62E9\u4E3B\u673A\u7684\u914D\u7F6E\u4FE1\u606F"), /*#__PURE__*/React.createElement(Step, {
|
|
103
|
+
title: "\u9009\u62E9\u5F39\u6027IP"
|
|
104
|
+
}, "\u8BF7\u9009\u62E9\u4E3B\u673A\u5F39\u6027IP\u7684\u914D\u7F6E\u4FE1\u606F"), /*#__PURE__*/React.createElement(Step, {
|
|
105
|
+
title: "\u8BBE\u7F6EVPC"
|
|
106
|
+
})), /*#__PURE__*/React.createElement(Button, {
|
|
107
|
+
type: "primary",
|
|
108
|
+
onClick: this.previous,
|
|
109
|
+
disabled: this.state.index === 0
|
|
110
|
+
}, "Previous Step"), /*#__PURE__*/React.createElement(Button, {
|
|
111
|
+
type: "primary",
|
|
112
|
+
onClick: this.next,
|
|
113
|
+
disabled: this.state.index === 3
|
|
114
|
+
}, "Next Step"));
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
return Demo;
|
|
118
|
+
}(React.Component);
|
|
119
|
+
|
|
120
|
+
export { Demo as default };
|
|
121
|
+
|
|
122
|
+
__decorate([bind], Demo.prototype, "previous", null);
|
|
123
|
+
|
|
124
|
+
__decorate([bind], Demo.prototype, "next", null);
|
|
@@ -0,0 +1,18 @@
|
|
|
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 './index.styl';
|
|
6
|
+
|
|
7
|
+
var default_1 = /*#__PURE__*/function (_Component) {
|
|
8
|
+
_inheritsLoose(default_1, _Component);
|
|
9
|
+
|
|
10
|
+
function default_1() {
|
|
11
|
+
return _Component.apply(this, arguments) || this;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
return default_1;
|
|
15
|
+
}(Component);
|
|
16
|
+
|
|
17
|
+
default_1.template = template;
|
|
18
|
+
export { default_1 as default };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Switch } from '@king-design/react';
|
|
4
|
+
import './index.styl';
|
|
5
|
+
|
|
6
|
+
var Demo = /*#__PURE__*/function (_React$Component) {
|
|
7
|
+
_inheritsLoose(Demo, _React$Component);
|
|
8
|
+
|
|
9
|
+
function Demo() {
|
|
10
|
+
return _React$Component.apply(this, arguments) || this;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
var _proto = Demo.prototype;
|
|
14
|
+
|
|
15
|
+
_proto.render = function render() {
|
|
16
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Switch, {
|
|
17
|
+
disabled: true
|
|
18
|
+
}), /*#__PURE__*/React.createElement(Switch, {
|
|
19
|
+
value: true,
|
|
20
|
+
disabled: true
|
|
21
|
+
}));
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
return Demo;
|
|
25
|
+
}(React.Component);
|
|
26
|
+
|
|
27
|
+
export { Demo as default };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export { default as data } from './index.json';
|
|
2
|
+
import { Component } from 'intact';
|
|
3
|
+
import './index.styl';
|
|
4
|
+
import { TabsProps } from 'kpc';
|
|
5
|
+
interface Props {
|
|
6
|
+
tab?: number;
|
|
7
|
+
tabs: TabItem[];
|
|
8
|
+
size: TabsProps['size'];
|
|
9
|
+
types: TabsProps['type'][];
|
|
10
|
+
}
|
|
11
|
+
declare type TabItem = {
|
|
12
|
+
value: number;
|
|
13
|
+
label: string;
|
|
14
|
+
};
|
|
15
|
+
export default class extends Component<Props> {
|
|
16
|
+
static template: string | import("intact").Template<any>;
|
|
17
|
+
static defaults(): Props;
|
|
18
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
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 './index.styl';
|
|
6
|
+
|
|
7
|
+
var default_1 = /*#__PURE__*/function (_Component) {
|
|
8
|
+
_inheritsLoose(default_1, _Component);
|
|
9
|
+
|
|
10
|
+
function default_1() {
|
|
11
|
+
return _Component.apply(this, arguments) || this;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
default_1.defaults = function defaults() {
|
|
15
|
+
return {
|
|
16
|
+
tab: 1,
|
|
17
|
+
tabs: [{
|
|
18
|
+
value: 1,
|
|
19
|
+
label: 'Table 1'
|
|
20
|
+
}, {
|
|
21
|
+
value: 2,
|
|
22
|
+
label: 'Table 2'
|
|
23
|
+
}, {
|
|
24
|
+
value: 3,
|
|
25
|
+
label: 'Table 3'
|
|
26
|
+
}, {
|
|
27
|
+
value: 4,
|
|
28
|
+
label: 'Table 4'
|
|
29
|
+
}, {
|
|
30
|
+
value: 5,
|
|
31
|
+
label: 'Table 5'
|
|
32
|
+
}, {
|
|
33
|
+
value: 6,
|
|
34
|
+
label: 'Table 6'
|
|
35
|
+
}, {
|
|
36
|
+
value: 7,
|
|
37
|
+
label: 'Table 7'
|
|
38
|
+
}, {
|
|
39
|
+
value: 8,
|
|
40
|
+
label: 'Table 8'
|
|
41
|
+
}, {
|
|
42
|
+
value: 9,
|
|
43
|
+
label: 'Table 9'
|
|
44
|
+
}, {
|
|
45
|
+
value: 10,
|
|
46
|
+
label: 'Table 10'
|
|
47
|
+
}, {
|
|
48
|
+
value: 11,
|
|
49
|
+
label: 'Table 11'
|
|
50
|
+
}, {
|
|
51
|
+
value: 12,
|
|
52
|
+
label: 'Table 12'
|
|
53
|
+
}, {
|
|
54
|
+
value: 13,
|
|
55
|
+
label: 'Table 13'
|
|
56
|
+
}, {
|
|
57
|
+
value: 14,
|
|
58
|
+
label: 'Table 14'
|
|
59
|
+
}, {
|
|
60
|
+
value: 15,
|
|
61
|
+
label: 'Table 15'
|
|
62
|
+
}, {
|
|
63
|
+
value: 16,
|
|
64
|
+
label: 'Table 16'
|
|
65
|
+
}, {
|
|
66
|
+
value: 17,
|
|
67
|
+
label: 'Table 17'
|
|
68
|
+
}, {
|
|
69
|
+
value: 18,
|
|
70
|
+
label: 'Table 18'
|
|
71
|
+
}, {
|
|
72
|
+
value: 19,
|
|
73
|
+
label: 'Table 19'
|
|
74
|
+
}, {
|
|
75
|
+
value: 20,
|
|
76
|
+
label: 'Table 20'
|
|
77
|
+
}],
|
|
78
|
+
size: 'default',
|
|
79
|
+
types: ['default', 'card', 'flat-card']
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
return default_1;
|
|
84
|
+
}(Component);
|
|
85
|
+
|
|
86
|
+
default_1.template = template;
|
|
87
|
+
export { default_1 as default };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.styl';
|
|
3
|
+
import { TabsProps } from '@king-design/react';
|
|
4
|
+
interface Props {
|
|
5
|
+
tab?: number;
|
|
6
|
+
tabs: TabItem[];
|
|
7
|
+
size: TabsProps['size'];
|
|
8
|
+
types: TabsProps['type'][];
|
|
9
|
+
}
|
|
10
|
+
declare type TabItem = {
|
|
11
|
+
value: number;
|
|
12
|
+
label: string;
|
|
13
|
+
};
|
|
14
|
+
export default class Demo extends React.Component<{}, Props> {
|
|
15
|
+
state: Props;
|
|
16
|
+
render(): JSX.Element;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,166 @@
|
|
|
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 { Tabs, Tab, Button, ButtonGroup } from '@king-design/react';
|
|
6
|
+
import './index.styl';
|
|
7
|
+
|
|
8
|
+
var Demo = /*#__PURE__*/function (_React$Component) {
|
|
9
|
+
_inheritsLoose(Demo, _React$Component);
|
|
10
|
+
|
|
11
|
+
function Demo() {
|
|
12
|
+
var _context;
|
|
13
|
+
|
|
14
|
+
var _this;
|
|
15
|
+
|
|
16
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
17
|
+
args[_key] = arguments[_key];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
_this = _React$Component.call.apply(_React$Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
|
|
21
|
+
_this.state = {
|
|
22
|
+
tab: 1,
|
|
23
|
+
tabs: [{
|
|
24
|
+
value: 1,
|
|
25
|
+
label: 'Table 1'
|
|
26
|
+
}, {
|
|
27
|
+
value: 2,
|
|
28
|
+
label: 'Table 2'
|
|
29
|
+
}, {
|
|
30
|
+
value: 3,
|
|
31
|
+
label: 'Table 3'
|
|
32
|
+
}, {
|
|
33
|
+
value: 4,
|
|
34
|
+
label: 'Table 4'
|
|
35
|
+
}, {
|
|
36
|
+
value: 5,
|
|
37
|
+
label: 'Table 5'
|
|
38
|
+
}, {
|
|
39
|
+
value: 6,
|
|
40
|
+
label: 'Table 6'
|
|
41
|
+
}, {
|
|
42
|
+
value: 7,
|
|
43
|
+
label: 'Table 7'
|
|
44
|
+
}, {
|
|
45
|
+
value: 8,
|
|
46
|
+
label: 'Table 8'
|
|
47
|
+
}, {
|
|
48
|
+
value: 9,
|
|
49
|
+
label: 'Table 9'
|
|
50
|
+
}, {
|
|
51
|
+
value: 10,
|
|
52
|
+
label: 'Table 10'
|
|
53
|
+
}, {
|
|
54
|
+
value: 11,
|
|
55
|
+
label: 'Table 11'
|
|
56
|
+
}, {
|
|
57
|
+
value: 12,
|
|
58
|
+
label: 'Table 12'
|
|
59
|
+
}, {
|
|
60
|
+
value: 13,
|
|
61
|
+
label: 'Table 13'
|
|
62
|
+
}, {
|
|
63
|
+
value: 14,
|
|
64
|
+
label: 'Table 14'
|
|
65
|
+
}, {
|
|
66
|
+
value: 15,
|
|
67
|
+
label: 'Table 15'
|
|
68
|
+
}, {
|
|
69
|
+
value: 16,
|
|
70
|
+
label: 'Table 16'
|
|
71
|
+
}, {
|
|
72
|
+
value: 17,
|
|
73
|
+
label: 'Table 17'
|
|
74
|
+
}, {
|
|
75
|
+
value: 18,
|
|
76
|
+
label: 'Table 18'
|
|
77
|
+
}, {
|
|
78
|
+
value: 19,
|
|
79
|
+
label: 'Table 19'
|
|
80
|
+
}, {
|
|
81
|
+
value: 20,
|
|
82
|
+
label: 'Table 20'
|
|
83
|
+
}],
|
|
84
|
+
size: 'default',
|
|
85
|
+
types: ['default', 'card', 'flat-card']
|
|
86
|
+
};
|
|
87
|
+
return _this;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
var _proto = Demo.prototype;
|
|
91
|
+
|
|
92
|
+
_proto.render = function render() {
|
|
93
|
+
var _this2 = this,
|
|
94
|
+
_context2,
|
|
95
|
+
_context3,
|
|
96
|
+
_context5;
|
|
97
|
+
|
|
98
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
99
|
+
style: {
|
|
100
|
+
"width": "600px"
|
|
101
|
+
}
|
|
102
|
+
}, /*#__PURE__*/React.createElement(ButtonGroup, {
|
|
103
|
+
value: this.state.size,
|
|
104
|
+
onChangeValue: function onChangeValue(size) {
|
|
105
|
+
return _this2.setState({
|
|
106
|
+
size: size
|
|
107
|
+
});
|
|
108
|
+
},
|
|
109
|
+
checkType: "radio"
|
|
110
|
+
}, _mapInstanceProperty(_context2 = ['large', 'default', 'small', 'mini']).call(_context2, function ($value, $key) {
|
|
111
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
112
|
+
value: $value
|
|
113
|
+
}, $value);
|
|
114
|
+
})), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), _mapInstanceProperty(_context3 = this.state.types).call(_context3, function ($value, $key) {
|
|
115
|
+
var _context4;
|
|
116
|
+
|
|
117
|
+
return /*#__PURE__*/React.createElement(Tabs, {
|
|
118
|
+
value: _this2.state.tab,
|
|
119
|
+
onChangeValue: function onChangeValue(tab) {
|
|
120
|
+
return _this2.setState({
|
|
121
|
+
tab: tab
|
|
122
|
+
});
|
|
123
|
+
},
|
|
124
|
+
type: $value,
|
|
125
|
+
size: _this2.state.size
|
|
126
|
+
}, _mapInstanceProperty(_context4 = _this2.state.tabs).call(_context4, function ($value, $key) {
|
|
127
|
+
return /*#__PURE__*/React.createElement(Tab, {
|
|
128
|
+
value: $value.value,
|
|
129
|
+
key: $value.value
|
|
130
|
+
}, $value.label);
|
|
131
|
+
}));
|
|
132
|
+
}), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("div", {
|
|
133
|
+
style: {
|
|
134
|
+
"display": "flex"
|
|
135
|
+
}
|
|
136
|
+
}, _mapInstanceProperty(_context5 = this.state.types).call(_context5, function ($value, $key) {
|
|
137
|
+
var _context6;
|
|
138
|
+
|
|
139
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
140
|
+
key: $value,
|
|
141
|
+
style: {
|
|
142
|
+
height: '200px'
|
|
143
|
+
}
|
|
144
|
+
}, /*#__PURE__*/React.createElement(Tabs, {
|
|
145
|
+
value: _this2.state.tab,
|
|
146
|
+
onChangeValue: function onChangeValue(tab) {
|
|
147
|
+
return _this2.setState({
|
|
148
|
+
tab: tab
|
|
149
|
+
});
|
|
150
|
+
},
|
|
151
|
+
type: $value,
|
|
152
|
+
size: _this2.state.size,
|
|
153
|
+
vertical: true
|
|
154
|
+
}, _mapInstanceProperty(_context6 = _this2.state.tabs).call(_context6, function ($value, $key) {
|
|
155
|
+
return /*#__PURE__*/React.createElement(Tab, {
|
|
156
|
+
value: $value.value,
|
|
157
|
+
key: $value.value
|
|
158
|
+
}, $value.label);
|
|
159
|
+
})));
|
|
160
|
+
})));
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
return Demo;
|
|
164
|
+
}(React.Component);
|
|
165
|
+
|
|
166
|
+
export { Demo as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { default as data } from './index.json';
|
|
2
|
+
import { Component } from 'intact';
|
|
3
|
+
import { TagProps } from 'kpc';
|
|
4
|
+
interface Props {
|
|
5
|
+
tags1: Required<TagProps>['type'][];
|
|
6
|
+
tags2: Required<TagProps>['type'][];
|
|
7
|
+
}
|
|
8
|
+
export default class extends Component<Props> {
|
|
9
|
+
static template: string | import("intact").Template<any>;
|
|
10
|
+
static defaults(): Props;
|
|
11
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
|
|
6
|
+
var default_1 = /*#__PURE__*/function (_Component) {
|
|
7
|
+
_inheritsLoose(default_1, _Component);
|
|
8
|
+
|
|
9
|
+
function default_1() {
|
|
10
|
+
return _Component.apply(this, arguments) || this;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
default_1.defaults = function defaults() {
|
|
14
|
+
return {
|
|
15
|
+
tags1: ['default', 'primary', 'success', 'warning', 'danger'],
|
|
16
|
+
tags2: ['default', 'primary', 'success', 'warning', 'danger']
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
return default_1;
|
|
21
|
+
}(Component);
|
|
22
|
+
|
|
23
|
+
default_1.template = template;
|
|
24
|
+
export { default_1 as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TagProps } from '@king-design/react';
|
|
3
|
+
interface Props {
|
|
4
|
+
tags1: Required<TagProps>['type'][];
|
|
5
|
+
tags2: Required<TagProps>['type'][];
|
|
6
|
+
}
|
|
7
|
+
export default class Demo extends React.Component<{}, Props> {
|
|
8
|
+
state: Props;
|
|
9
|
+
render(): JSX.Element;
|
|
10
|
+
}
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,62 @@
|
|
|
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 { Tags, Tag, Tooltip } from '@king-design/react';
|
|
6
|
+
|
|
7
|
+
var Demo = /*#__PURE__*/function (_React$Component) {
|
|
8
|
+
_inheritsLoose(Demo, _React$Component);
|
|
9
|
+
|
|
10
|
+
function Demo() {
|
|
11
|
+
var _context;
|
|
12
|
+
|
|
13
|
+
var _this;
|
|
14
|
+
|
|
15
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
16
|
+
args[_key] = arguments[_key];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
_this = _React$Component.call.apply(_React$Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
|
|
20
|
+
_this.state = {
|
|
21
|
+
tags1: ['default', 'primary', 'success', 'warning', 'danger'],
|
|
22
|
+
tags2: ['default', 'primary', 'success', 'warning', 'danger']
|
|
23
|
+
};
|
|
24
|
+
return _this;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
var _proto = Demo.prototype;
|
|
28
|
+
|
|
29
|
+
_proto.render = function render() {
|
|
30
|
+
var _context2, _context3;
|
|
31
|
+
|
|
32
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Tags, {
|
|
33
|
+
draggable: true
|
|
34
|
+
}, _mapInstanceProperty(_context2 = this.state.tags1).call(_context2, function ($value, $key) {
|
|
35
|
+
return /*#__PURE__*/React.createElement(Tag, {
|
|
36
|
+
key: $value,
|
|
37
|
+
type: $value
|
|
38
|
+
}, $value);
|
|
39
|
+
}), /*#__PURE__*/React.createElement(Tooltip, {
|
|
40
|
+
content: "test",
|
|
41
|
+
key: "test"
|
|
42
|
+
}, /*#__PURE__*/React.createElement(Tag, null, "with tooltip"))), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(Tags, {
|
|
43
|
+
draggable: true,
|
|
44
|
+
nowrap: true,
|
|
45
|
+
style: {
|
|
46
|
+
"width": "300px"
|
|
47
|
+
}
|
|
48
|
+
}, _mapInstanceProperty(_context3 = this.state.tags2).call(_context3, function ($value, $key) {
|
|
49
|
+
return /*#__PURE__*/React.createElement(Tag, {
|
|
50
|
+
key: $value,
|
|
51
|
+
type: $value
|
|
52
|
+
}, $value);
|
|
53
|
+
}), /*#__PURE__*/React.createElement(Tooltip, {
|
|
54
|
+
content: "test",
|
|
55
|
+
key: "test"
|
|
56
|
+
}, /*#__PURE__*/React.createElement(Tag, null, "with tooltip"))));
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
return Demo;
|
|
60
|
+
}(React.Component);
|
|
61
|
+
|
|
62
|
+
export { Demo as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { default as data } from './index.json';
|
|
2
|
+
import { Component } from 'intact';
|
|
3
|
+
import { TagProps } from 'kpc';
|
|
4
|
+
interface Props {
|
|
5
|
+
tags1: Required<TagProps>['type'][];
|
|
6
|
+
tags2: Required<TagProps>['type'][];
|
|
7
|
+
}
|
|
8
|
+
export default class extends Component<Props> {
|
|
9
|
+
static template: string | import("intact").Template<any>;
|
|
10
|
+
static defaults(): Props;
|
|
11
|
+
remove(name: keyof Props, type: Required<TagProps>['type'], e: MouseEvent): void;
|
|
12
|
+
}
|