@king-design/intact 2.1.0 → 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 +35 -70
- package/components/dropdown/index.spec.ts +53 -4
- package/components/dropdown/item.ts +15 -5
- package/components/dropdown/menu.ts +3 -3
- package/components/dropdown/usePosition.ts +3 -0
- package/components/form/index.spec.ts +22 -1
- package/components/menu/demos/collapse.md +1 -1
- package/components/menu/index.spec.ts +9 -1
- package/components/menu/item.ts +7 -0
- package/components/pagination/index.spec.ts +23 -0
- package/components/pagination/index.ts +3 -1
- package/components/tooltip/content.ts +15 -1
- package/components/tooltip/content.vdt +6 -1
- package/components/tooltip/index.spec.ts +87 -1
- package/components/tooltip/styles.ts +1 -1
- package/components/tooltip/tooltip.ts +11 -0
- package/components/virtual.ts +98 -0
- package/es/components/dropdown/dropdown.d.ts +6 -5
- package/es/components/dropdown/dropdown.js +42 -69
- package/es/components/dropdown/index.spec.js +96 -17
- package/es/components/dropdown/item.d.ts +1 -1
- package/es/components/dropdown/item.js +16 -4
- package/es/components/dropdown/usePosition.js +4 -2
- package/es/components/form/index.spec.js +49 -2
- package/es/components/menu/index.spec.js +26 -15
- package/es/components/menu/item.d.ts +2 -0
- package/es/components/menu/item.js +5 -0
- package/es/components/pagination/index.js +4 -1
- package/es/components/pagination/index.spec.js +49 -0
- package/es/components/tooltip/content.d.ts +1 -0
- package/es/components/tooltip/content.js +18 -1
- package/es/components/tooltip/content.vdt.js +3 -1
- package/es/components/tooltip/index.spec.js +165 -0
- package/es/components/tooltip/styles.d.ts +22 -0
- package/es/components/tooltip/styles.js +1 -1
- package/es/components/tooltip/tooltip.d.ts +1 -0
- package/es/components/tooltip/tooltip.js +16 -1
- package/es/components/virtual.d.ts +8 -0
- package/es/components/virtual.js +126 -0
- 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/dialog/demos/basic/react.js +1 -4
- 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/menu/demos/collapse/index.js +1 -1
- package/es/site/data/components/menu/demos/collapse/react.js +1 -1
- 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 +4 -3
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime-corejs3/helpers/objectWithoutPropertiesLoose";
|
|
3
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
4
|
+
var _excluded = ["children"];
|
|
5
|
+
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/concat";
|
|
6
|
+
import _startsWithInstanceProperty from "@babel/runtime-corejs3/core-js/instance/starts-with";
|
|
7
|
+
import { Component, directClone, createVNode } from 'intact';
|
|
8
|
+
import { isTextChildren } from './utils';
|
|
9
|
+
import { EMPTY_OBJ, isFunction, hasOwn } from 'intact-shared';
|
|
10
|
+
import { cx } from '@emotion/css';
|
|
11
|
+
var reactEventReg = /on[A-Z]/;
|
|
12
|
+
export var Virtual = /*#__PURE__*/function (_Component) {
|
|
13
|
+
_inheritsLoose(Virtual, _Component);
|
|
14
|
+
|
|
15
|
+
function Virtual() {
|
|
16
|
+
var _context;
|
|
17
|
+
|
|
18
|
+
var _this;
|
|
19
|
+
|
|
20
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
21
|
+
args[_key] = arguments[_key];
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
_this = _Component.call.apply(_Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
|
|
25
|
+
_this.vNodeProps = null;
|
|
26
|
+
return _this;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
Virtual.template = function template() {
|
|
30
|
+
var _cx;
|
|
31
|
+
|
|
32
|
+
var _this$get = this.get(),
|
|
33
|
+
children = _this$get.children,
|
|
34
|
+
props = _objectWithoutPropertiesLoose(_this$get, _excluded);
|
|
35
|
+
|
|
36
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
37
|
+
if (!children || Array.isArray(children) && children.length !== 1) {
|
|
38
|
+
throw new Error('Component must receive one children');
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
var vNode = Array.isArray(children) ? children[0] : children;
|
|
43
|
+
var clonedVNode = isTextChildren(vNode) ? createVNode('span', null, vNode) : directClone(vNode);
|
|
44
|
+
var vNodeProps = this.vNodeProps = this.getVNodeProps(clonedVNode.props || EMPTY_OBJ);
|
|
45
|
+
var eventProps = this.getEventProps(); // merge className
|
|
46
|
+
|
|
47
|
+
var className = clonedVNode.className || vNodeProps.className;
|
|
48
|
+
className = cx((_cx = {}, _cx[className] = !!className, _cx[props.className] = !!props.className, _cx));
|
|
49
|
+
clonedVNode.props = _extends({}, props, vNodeProps, eventProps, {
|
|
50
|
+
className: className
|
|
51
|
+
});
|
|
52
|
+
clonedVNode.className = className;
|
|
53
|
+
return clonedVNode;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
var _proto = Virtual.prototype;
|
|
57
|
+
|
|
58
|
+
_proto.getVNodeProps = function getVNodeProps(props) {
|
|
59
|
+
var vnode = props.vnode;
|
|
60
|
+
if (!vnode) return props; // maybe we render the intact component in react slot property, in this case
|
|
61
|
+
// the $isReact is false. so use the vnode $$typeof field as gauge
|
|
62
|
+
|
|
63
|
+
if (vnode.$$typeof || vnode.__v_isVNode
|
|
64
|
+
/* vue3 vnode */
|
|
65
|
+
) {
|
|
66
|
+
var _props = vnode.props;
|
|
67
|
+
if (!_props) return props;
|
|
68
|
+
var events = {};
|
|
69
|
+
|
|
70
|
+
for (var key in _props) {
|
|
71
|
+
if (reactEventReg.test(key)) {
|
|
72
|
+
events["ev-" + key.substring(2).toLowerCase()] = _props[key];
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
return _extends({}, props, events, {
|
|
77
|
+
className: _props.className || _props.class
|
|
78
|
+
/* vue-next */
|
|
79
|
+
|
|
80
|
+
});
|
|
81
|
+
} else if (hasOwn.call(vnode, 'componentOptions')
|
|
82
|
+
/* vue2 vnode */
|
|
83
|
+
) {
|
|
84
|
+
var data = vnode.data;
|
|
85
|
+
var on = data && data.on || EMPTY_OBJ;
|
|
86
|
+
var _events = {};
|
|
87
|
+
|
|
88
|
+
for (var _key2 in on) {
|
|
89
|
+
_events["ev-" + _key2] = on[_key2];
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
return _extends({}, props, _events);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return props;
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
_proto.getEventProps = function getEventProps() {
|
|
99
|
+
var _this2 = this;
|
|
100
|
+
|
|
101
|
+
var props = {};
|
|
102
|
+
|
|
103
|
+
var _loop = function _loop(prop) {
|
|
104
|
+
if (_startsWithInstanceProperty(prop).call(prop, 'ev-')) {
|
|
105
|
+
props[prop] = function (e) {
|
|
106
|
+
return _this2.callEvent(prop, e);
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
for (var prop in this.get()) {
|
|
112
|
+
_loop(prop);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
return props;
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
_proto.callEvent = function callEvent(name, e) {
|
|
119
|
+
var callback = this.vNodeProps[name];
|
|
120
|
+
var callbackOnVirtual = this.get(name);
|
|
121
|
+
if (isFunction(callback)) callback(e);
|
|
122
|
+
if (isFunction(callbackOnVirtual)) callbackOnVirtual(e);
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
return Virtual;
|
|
126
|
+
}(Component);
|
package/es/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @king-design v2.1.
|
|
2
|
+
* @king-design v2.1.2
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Kingsoft Cloud
|
|
5
5
|
* Released under the MIT License
|
|
@@ -57,4 +57,4 @@ export * from './components/tree';
|
|
|
57
57
|
export * from './components/treeSelect';
|
|
58
58
|
export * from './components/upload';
|
|
59
59
|
export * from './components/wave';
|
|
60
|
-
export declare const version = "2.1.
|
|
60
|
+
export declare const version = "2.1.2";
|
package/es/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @king-design v2.1.
|
|
2
|
+
* @king-design v2.1.2
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Kingsoft Cloud
|
|
5
5
|
* Released under the MIT License
|
|
@@ -59,5 +59,5 @@ export * from './components/tree';
|
|
|
59
59
|
export * from './components/treeSelect';
|
|
60
60
|
export * from './components/upload';
|
|
61
61
|
export * from './components/wave';
|
|
62
|
-
export var version = '2.1.
|
|
62
|
+
export var version = '2.1.2';
|
|
63
63
|
/* generate end */
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
return default_1;
|
|
14
|
+
}(Component);
|
|
15
|
+
|
|
16
|
+
default_1.template = template;
|
|
17
|
+
export { default_1 as default };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Copy } from '@king-design/react';
|
|
4
|
+
|
|
5
|
+
var Demo = /*#__PURE__*/function (_React$Component) {
|
|
6
|
+
_inheritsLoose(Demo, _React$Component);
|
|
7
|
+
|
|
8
|
+
function Demo() {
|
|
9
|
+
return _React$Component.apply(this, arguments) || this;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
var _proto = Demo.prototype;
|
|
13
|
+
|
|
14
|
+
_proto.render = function render() {
|
|
15
|
+
return /*#__PURE__*/React.createElement(Copy, {
|
|
16
|
+
text: "Hello King Desgin!"
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
return Demo;
|
|
21
|
+
}(React.Component);
|
|
22
|
+
|
|
23
|
+
export { Demo as default };
|
|
@@ -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,44 @@
|
|
|
1
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Copy, Button, Icon } 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(Copy, {
|
|
17
|
+
text: "Hello King Desgin!"
|
|
18
|
+
}, "Copy"), /*#__PURE__*/React.createElement(Copy, {
|
|
19
|
+
text: "Hello King Desgin!"
|
|
20
|
+
}, /*#__PURE__*/React.createElement(Button, null, "Copy")), /*#__PURE__*/React.createElement(Copy, {
|
|
21
|
+
text: "Hello King Desgin!"
|
|
22
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
23
|
+
type: "link",
|
|
24
|
+
size: "mini"
|
|
25
|
+
}, "Copy")), /*#__PURE__*/React.createElement(Copy, {
|
|
26
|
+
text: "Hello King Desgin!"
|
|
27
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
28
|
+
className: "ion-ios-copy",
|
|
29
|
+
size: "large",
|
|
30
|
+
hoverable: true
|
|
31
|
+
})), /*#__PURE__*/React.createElement(Copy, {
|
|
32
|
+
text: "Hello King Desgin!"
|
|
33
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
34
|
+
icon: true,
|
|
35
|
+
circle: true
|
|
36
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
37
|
+
className: "ion-ios-copy-outline"
|
|
38
|
+
}))));
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
return Demo;
|
|
42
|
+
}(React.Component);
|
|
43
|
+
|
|
44
|
+
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
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
2
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
3
|
+
import _keysInstanceProperty from "@babel/runtime-corejs3/core-js/instance/keys";
|
|
4
|
+
import _startsWithInstanceProperty from "@babel/runtime-corejs3/core-js/instance/starts-with";
|
|
5
|
+
import Article from '~/../src/components/article';
|
|
6
|
+
import data from './index.json';
|
|
7
|
+
import sidebar from '~/doc.json';
|
|
8
|
+
|
|
9
|
+
var r = require.context('./', true, /demos.*(index|demo).ts/);
|
|
10
|
+
|
|
11
|
+
var keys = _keysInstanceProperty(r).call(r);
|
|
12
|
+
|
|
13
|
+
var demos = [];
|
|
14
|
+
|
|
15
|
+
for (var i = 0; i < keys.length; i++) {
|
|
16
|
+
var file = keys[i];
|
|
17
|
+
if (!_startsWithInstanceProperty(file).call(file, '.')) continue; // if we found demo.js then ignore index.js
|
|
18
|
+
|
|
19
|
+
if (/demo.ts$/.test(file)) i++;
|
|
20
|
+
demos.push(r(file));
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
var default_1 = /*#__PURE__*/function (_Article) {
|
|
24
|
+
_inheritsLoose(default_1, _Article);
|
|
25
|
+
|
|
26
|
+
function default_1() {
|
|
27
|
+
return _Article.apply(this, arguments) || this;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return default_1;
|
|
31
|
+
}(Article);
|
|
32
|
+
|
|
33
|
+
default_1.sidebar = sidebar;
|
|
34
|
+
default_1.data = data;
|
|
35
|
+
|
|
36
|
+
default_1.defaults = function () {
|
|
37
|
+
return _extends({}, Article.defaults, data, {
|
|
38
|
+
demos: demos
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export { default_1 as default };
|
|
@@ -50,10 +50,7 @@ var Demo = /*#__PURE__*/function (_React$Component) {
|
|
|
50
50
|
ref: function ref(i) {
|
|
51
51
|
return _this2.__demo = i;
|
|
52
52
|
}
|
|
53
|
-
}, "Dialog Body",
|
|
54
|
-
filterable: true,
|
|
55
|
-
multiple: true
|
|
56
|
-
})) : undefined));
|
|
53
|
+
}, "Dialog Body", /*#__PURE__*/React.createElement(Select, null)));
|
|
57
54
|
};
|
|
58
55
|
|
|
59
56
|
return Demo;
|
|
@@ -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,33 @@
|
|
|
1
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Icon } 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(Icon, {
|
|
17
|
+
className: "ion-happy-outline",
|
|
18
|
+
disabled: true
|
|
19
|
+
}), /*#__PURE__*/React.createElement(Icon, {
|
|
20
|
+
className: "ion-happy-outline",
|
|
21
|
+
disabled: true,
|
|
22
|
+
hoverable: true
|
|
23
|
+
}), /*#__PURE__*/React.createElement(Icon, {
|
|
24
|
+
className: "ion-happy-outline",
|
|
25
|
+
disabled: true,
|
|
26
|
+
color: "primary"
|
|
27
|
+
}));
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
return Demo;
|
|
31
|
+
}(React.Component);
|
|
32
|
+
|
|
33
|
+
export { Demo as default };
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
return default_1;
|
|
14
|
+
}(Component);
|
|
15
|
+
|
|
16
|
+
default_1.template = template;
|
|
17
|
+
export { default_1 as default };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Input } from '@king-design/react';
|
|
4
|
+
|
|
5
|
+
var Demo = /*#__PURE__*/function (_React$Component) {
|
|
6
|
+
_inheritsLoose(Demo, _React$Component);
|
|
7
|
+
|
|
8
|
+
function Demo() {
|
|
9
|
+
return _React$Component.apply(this, arguments) || this;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
var _proto = Demo.prototype;
|
|
13
|
+
|
|
14
|
+
_proto.render = function render() {
|
|
15
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Input, {
|
|
16
|
+
placeholder: "Please enter",
|
|
17
|
+
flat: true
|
|
18
|
+
}), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(Input, {
|
|
19
|
+
placeholder: "Please enter",
|
|
20
|
+
flat: true,
|
|
21
|
+
value: "disabled",
|
|
22
|
+
disabled: true
|
|
23
|
+
}));
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
return Demo;
|
|
27
|
+
}(React.Component);
|
|
28
|
+
|
|
29
|
+
export { Demo as default };
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
return default_1;
|
|
14
|
+
}(Component);
|
|
15
|
+
|
|
16
|
+
default_1.template = template;
|
|
17
|
+
export { default_1 as default };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Input } from '@king-design/react';
|
|
4
|
+
|
|
5
|
+
var Demo = /*#__PURE__*/function (_React$Component) {
|
|
6
|
+
_inheritsLoose(Demo, _React$Component);
|
|
7
|
+
|
|
8
|
+
function Demo() {
|
|
9
|
+
return _React$Component.apply(this, arguments) || this;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
var _proto = Demo.prototype;
|
|
13
|
+
|
|
14
|
+
_proto.render = function render() {
|
|
15
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Input, {
|
|
16
|
+
placeholder: "Please enter",
|
|
17
|
+
showCount: true
|
|
18
|
+
}), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(Input, {
|
|
19
|
+
placeholder: "Please enter",
|
|
20
|
+
showCount: true,
|
|
21
|
+
maxlength: "10"
|
|
22
|
+
}), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(Input, {
|
|
23
|
+
type: "textarea",
|
|
24
|
+
placeholder: "please enter",
|
|
25
|
+
showCount: true,
|
|
26
|
+
maxlength: "100"
|
|
27
|
+
}));
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
return Demo;
|
|
31
|
+
}(React.Component);
|
|
32
|
+
|
|
33
|
+
export { Demo as default };
|
|
@@ -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 };
|