@king-design/intact 3.2.2-beta.0 → 3.3.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.
- package/components/divider/demos/basic.md +35 -0
- package/components/divider/demos/horizontal.md +31 -0
- package/components/divider/demos/margin.md +32 -0
- package/components/divider/demos/text.md +27 -0
- package/components/divider/index.md +16 -0
- package/components/divider/index.spec.ts +0 -0
- package/components/divider/index.ts +36 -0
- package/components/divider/index.vdt +35 -0
- package/components/divider/styles.ts +109 -0
- package/components/dropdown/dropdown.ts +1 -1
- package/components/ellipsis/demos/basic.md +44 -0
- package/components/ellipsis/demos/custom.md +36 -0
- package/components/ellipsis/demos/position.md +24 -0
- package/components/ellipsis/index.md +14 -0
- package/components/ellipsis/index.spec.ts +58 -0
- package/components/ellipsis/index.ts +36 -0
- package/components/ellipsis/index.vdt +39 -0
- package/components/ellipsis/styles.ts +22 -0
- package/components/ellipsis/useEllipsis.ts +31 -0
- package/components/menu/demos/showCollapseArrow.md +7 -4
- package/components/menu/item.vdt +6 -3
- package/components/menu/styles.ts +8 -8
- package/components/menu/title.vdt +2 -1
- package/components/table/table.vdt +1 -1
- package/components/tag/index.spec.ts +1 -1
- package/components/tag/tags.vdt +1 -1
- package/components/view/index.ts +24 -0
- package/es/components/divider/index.d.ts +14 -0
- package/es/components/divider/index.js +38 -0
- package/es/components/divider/index.spec.d.ts +1 -0
- package/es/components/divider/index.spec.js +1 -0
- package/es/components/divider/index.vdt.js +31 -0
- package/es/components/divider/styles.d.ts +5 -0
- package/es/components/divider/styles.js +35 -0
- package/es/components/dropdown/dropdown.js +2 -2
- package/es/components/ellipsis/index.d.ts +16 -0
- package/es/components/ellipsis/index.js +36 -0
- package/es/components/ellipsis/index.spec.d.ts +1 -0
- package/es/components/ellipsis/index.spec.js +94 -0
- package/es/components/ellipsis/index.vdt.js +50 -0
- package/es/components/ellipsis/styles.d.ts +5 -0
- package/es/components/ellipsis/styles.js +10 -0
- package/es/components/ellipsis/useEllipsis.d.ts +4 -0
- package/es/components/ellipsis/useEllipsis.js +21 -0
- package/es/components/menu/item.vdt.js +8 -3
- package/es/components/menu/styles.d.ts +1 -1
- package/es/components/menu/styles.js +6 -5
- package/es/components/menu/title.vdt.js +6 -2
- package/es/components/table/table.vdt.js +1 -1
- package/es/components/tag/index.spec.js +4 -2
- package/es/components/tag/tags.vdt.js +2 -1
- package/es/components/view/index.d.ts +15 -0
- package/es/components/view/index.js +30 -0
- package/es/i18n/en-US.d.ts +1 -1
- package/es/i18n/en-US.js +1 -1
- package/es/index.d.ts +5 -2
- package/es/index.js +5 -2
- package/es/site/data/components/divider/demos/basic/index.d.ts +9 -0
- package/es/site/data/components/divider/demos/basic/index.js +18 -0
- package/es/site/data/components/divider/demos/basic/react.d.ts +9 -0
- package/es/site/data/components/divider/demos/basic/react.js +27 -0
- package/es/site/data/components/divider/demos/horizontal/index.d.ts +6 -0
- package/es/site/data/components/divider/demos/horizontal/index.js +14 -0
- package/es/site/data/components/divider/demos/horizontal/react.d.ts +5 -0
- package/es/site/data/components/divider/demos/horizontal/react.js +26 -0
- package/es/site/data/components/divider/demos/margin/index.d.ts +8 -0
- package/es/site/data/components/divider/demos/margin/index.js +18 -0
- package/es/site/data/components/divider/demos/margin/react.d.ts +7 -0
- package/es/site/data/components/divider/demos/margin/react.js +37 -0
- package/es/site/data/components/divider/demos/text/index.d.ts +5 -0
- package/es/site/data/components/divider/demos/text/index.js +13 -0
- package/es/site/data/components/divider/demos/text/react.d.ts +4 -0
- package/es/site/data/components/divider/demos/text/react.js +19 -0
- package/es/site/data/components/divider/index.d.ts +57 -0
- package/es/site/data/components/divider/index.js +32 -0
- package/es/site/data/components/ellipsis/demos/basic/index.d.ts +12 -0
- package/es/site/data/components/ellipsis/demos/basic/index.js +19 -0
- package/es/site/data/components/ellipsis/demos/basic/react.d.ts +12 -0
- package/es/site/data/components/ellipsis/demos/basic/react.js +40 -0
- package/es/site/data/components/ellipsis/demos/custom/index.d.ts +6 -0
- package/es/site/data/components/ellipsis/demos/custom/index.js +14 -0
- package/es/site/data/components/ellipsis/demos/custom/react.d.ts +5 -0
- package/es/site/data/components/ellipsis/demos/custom/react.js +42 -0
- package/es/site/data/components/ellipsis/demos/position/index.d.ts +6 -0
- package/es/site/data/components/ellipsis/demos/position/index.js +14 -0
- package/es/site/data/components/ellipsis/demos/position/react.d.ts +5 -0
- package/es/site/data/components/ellipsis/demos/position/react.js +26 -0
- package/es/site/data/components/ellipsis/index.d.ts +57 -0
- package/es/site/data/components/ellipsis/index.js +32 -0
- package/es/site/data/components/menu/demos/showCollapseArrow/react.js +7 -4
- package/es/styles/theme.d.ts +8 -0
- package/es/styles/theme.js +8 -4
- package/i18n/en-US.ts +1 -1
- package/index.ts +5 -2
- package/package.json +2 -2
- package/styles/theme.ts +4 -0
|
@@ -78,6 +78,6 @@ export declare const makeItemStyles: {
|
|
|
78
78
|
clearCache(): {};
|
|
79
79
|
};
|
|
80
80
|
export declare const makeNestedMenuStyles: {
|
|
81
|
-
(k: string, hasIcon: boolean, parentPaddingLeft
|
|
81
|
+
(k: string, hasIcon: boolean, parentPaddingLeft: string | undefined, size: "small" | "large" | "default" | undefined): string;
|
|
82
82
|
clearCache(): {};
|
|
83
83
|
};
|
|
@@ -112,7 +112,7 @@ export { menu };
|
|
|
112
112
|
export var makeMenuStyles = cache(function makeMenuStyles(k) {
|
|
113
113
|
// we must increase the priority by adding &.${k}-menu
|
|
114
114
|
// to override the css of dropdownMenu
|
|
115
|
-
return /*#__PURE__*/css("&.", k, "-menu{width:", menu.width, ";transition:width ", menu.transition, ";background:", menu.bgColor, ";font-size:", menu.fontSize, ";position:relative;}.", k, "-icon{width:", menu.icon.width, ";margin-right:", menu.icon.gap, ";text-align:center;flex-shrink:0;}.", k, "-menu-header{height:", menu.header.height, ";padding:0 21px;color:", menu.header.color, ";font-size:", menu.header.fontSize, ";font-weight:bold;}.", k, "-menu-body{padding:", menu.item.bodyPadding, ";max-height:calc(
|
|
115
|
+
return /*#__PURE__*/css("&.", k, "-menu{width:", menu.width, ";transition:width ", menu.transition, ";background:", menu.bgColor, ";font-size:", menu.fontSize, ";position:relative;}.", k, "-icon{width:", menu.icon.width, ";margin-right:", menu.icon.gap, ";text-align:center;flex-shrink:0;}.", k, "-menu-header{height:", menu.header.height, ";padding:0 21px;color:", menu.header.color, ";font-size:", menu.header.fontSize, ";font-weight:bold;}.", k, "-menu-body{padding:", menu.item.bodyPadding, ";max-height:calc(100% - ", menu.header.height, ");overflow-y:auto;overflow-x:hidden;}.", k, "-menu-title{height:", menu.title.height, ";border-top:", menu.border, ";margin-top:4px;.", k, "-menu-name{transition:all ", menu.transition, ";height:", menu.title.height, ";color:", menu.title.color, ";font-weight:bold;}}.", k, "-menu-arrow-box{width:14px;height:60px;cursor:pointer;background:", menu.bgColor, ";border-radius:0 8px 8px 0;position:absolute;display:flex;align-items:center;justify-content:center;top:50%;left:calc(", menu.width, " - 2px);transition:left ", menu.transition, ";transform:translateY(-50%);border:", menu.border, ";border-left:none;.", k, "-icon{margin-right:0;}&:hover{.", k, "-menu-arrow:before{color:", menu.item.activeBgColor, ";}}}&.", k, "-light{border:1px solid ", theme.color.disabledBg, ";border-top:0;background:", menu.light.bgColor, ";.", k, "-menu-header{color:", menu.light.title.color, ";}.", k, "-menu-item{.", k, "-menu-item-title{color:", menu.light.item.color, ";&:hover{background:", menu.light.item.hoverBg, ";}}.", k, "-menu-item-arrow{color:", menu.light.item.color, ";}&.", k, "-highlighted{>.", k, "-menu-item-title{color:", menu.light.item.hoverColor, ";}}&.", k, "-disabled{>.", k, "-menu-item-title{color:", menu.light.item.disabledColor, "!important;}}}.", k, "-menu-title{border-top:", menu.light.border, ";.", k, "-menu-name{color:", menu.light.title.color, ";}}.", k, "-menu-arrow-box{background:", menu.light.bgColor, ";border:", menu.light.border, ";border-left:none;&:hover{.", k, "-menu-arrow:before{color:", menu.light.active.color, ";}}}.", k, "-menu:not(.", k, "-dropdown-menu){background:", menu.light.bgColor, ";}&.", k, "-horizontal{.", k, "-menu-header{border-right:", menu.light.border, ";}.", k, "-menu-body>.", k, "-menu-title{border-right:", menu.light.border, ";}}.", k, "-menu-item.", k, "-active{>.", k, "-menu-item-title{color:", menu.light.active.color, "!important;background:", menu.light.active.bgColor, ";}}.", k, "-sub-menu{.", k, "-menu-item-title,.", k, "-menu-item-arrow{color:", menu.light.item.subTitleColor, "!important;}}}", _mapInstanceProperty(sizes).call(sizes, function (size) {
|
|
116
116
|
var styles = menu[size];
|
|
117
117
|
return /*#__PURE__*/css("&.", k, "-", size, "{width:", styles.width, ";font-size:", styles.fontSize, ";.", k, "-menu{font-size:", styles.fontSize, ";}.", k, "-menu-arrow-box{left:calc(", styles.width, " - 2px);}}");
|
|
118
118
|
}), "&.", k, "-collapsed{width:calc(", menu.icon.width, " + (", getLeft(menu.item.padding), " + ", getLeft(menu.item.bodyPadding), ") * 2);.", k, "-icon{margin-right:0;}.", k, "-menu-item-arrow{display:none;}}&.", k, "-collapsed-arrow{width:0px;border-left:none;.", k, "-menu-body{overflow:hidden;padding:0;}.", k, "-menu-arrow-box{left:0;.", k, "-menu-arrow:before{transform:rotateY(180deg);}}}&.", k, "-dropdown-menu{width:fit-content;min-width:", menu.dropdown.minWidth, ";.", k, "-menu-item-arrow{transform:rotate(-90deg);}}&.", k, "-horizontal{width:auto;display:flex;.", k, "-menu-body{display:flex;align-items:center;.", k, "-menu-title{border-top:none;border-right:", menu.border, ";}}}");
|
|
@@ -123,12 +123,13 @@ export var makeTitleStyles = cache(function makeTitleStyles(k) {
|
|
|
123
123
|
});
|
|
124
124
|
export var makeItemStyles = cache(function makeItemStyles(k) {
|
|
125
125
|
var item = menu.item;
|
|
126
|
-
return /*#__PURE__*/css(".", k, "-menu-item-title{transition:all ", menu.transition, ";cursor:pointer;height:", item.height, ";&:hover{padding:", item.padding, ";border-radius:", menu.borderRadius, ";background:#2a2a30;}&>.", k, "-menu-item-arrow:before{font-size:small;}}.", k, "-menu-name{flex:1;display:flex;align-items:center;min-width:0
|
|
126
|
+
return /*#__PURE__*/css(".", k, "-menu-item-title{transition:all ", menu.transition, ";cursor:pointer;height:", item.height, ";&:hover{padding:", item.padding, ";border-radius:", menu.borderRadius, ";background:#2a2a30;}&>.", k, "-menu-item-arrow:before{font-size:small;}}.", k, "-menu-name{flex:1;display:flex;align-items:center;min-width:0;.", k, "-icon{color:inherit;display:inline-block;}}.", k, "-menu-item-arrow{color:", item.color, ";margin:0 0 0 ", menu.icon.gap, ";transition:transform ", menu.transition, ";}&.", k, "-expanded{>.", k, "-menu-item-title{color:", item.hoverColor, ";.", k, "-menu-item-arrow{transform:rotate(180deg);}}}&.", k, "-highlighted{>.", k, "-menu-item-title{color:", menu.light.item.hoverColor, ";}}&.", k, "-active{>.", k, "-menu-item-title{border-radius:", menu.borderRadius, ";color:", item.activeBgColor, "!important;background:", item.hoverBgColor, ";}}&.", k, "-disabled{>.", k, "-menu-item-title{color:", item.disabledColor, "!important;cursor:not-allowed;}}.", k, "-menu-dot{font-size:", item.dotFontSize, ";transform:scale(.4);}");
|
|
127
127
|
});
|
|
128
|
-
export var makeNestedMenuStyles = cache(function makeNestedMenuStyles(k, hasIcon, parentPaddingLeft) {
|
|
128
|
+
export var makeNestedMenuStyles = cache(function makeNestedMenuStyles(k, hasIcon, parentPaddingLeft, size) {
|
|
129
129
|
if (parentPaddingLeft === void 0) {
|
|
130
130
|
parentPaddingLeft = getLeft(menu.item.padding);
|
|
131
131
|
}
|
|
132
|
-
var
|
|
133
|
-
|
|
132
|
+
var fontSize = "" + (size === 'small' ? menu.small.fontSize : menu.fontSize);
|
|
133
|
+
var paddingLeft = "" + parentPaddingLeft + (hasIcon ? ' + ' + menu.icon.width + ' + ' + menu.icon.gap : ' + ' + fontSize);
|
|
134
|
+
return [/*#__PURE__*/css("&.", k, "-menu{position:relative;width:auto;background:", menu.bgColor, ";border:none;.", k, "-menu-body{padding:0;max-height:100%;.", k, "-menu-item-title{padding-left:calc(", paddingLeft, ");}.", k, "-menu-item-title,.", k, "-menu-item-arrow{color:", menu.item.subTitleColor, ";}}}"), paddingLeft];
|
|
134
135
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
2
|
-
import { createVNode as _$cv, className as _$cn, createElementVNode as _$ce } from 'intact';
|
|
2
|
+
import { createVNode as _$cv, className as _$cn, createElementVNode as _$ce, createUnknownComponentVNode as _$cc } from 'intact';
|
|
3
3
|
import { Icon } from '../icon';
|
|
4
|
+
import { Ellipsis } from '../ellipsis';
|
|
4
5
|
import { getRestProps, findChildren, isComponentVNode } from '../utils';
|
|
5
6
|
import { makeTitleStyles } from './styles';
|
|
6
7
|
export default function ($props, $blocks, $__proto__) {
|
|
@@ -18,7 +19,10 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
18
19
|
var classNameObj = (_classNameObj = {}, _classNameObj[k + "-menu-title"] = true, _classNameObj[className] = className, _classNameObj);
|
|
19
20
|
return _$cv('div', _extends({
|
|
20
21
|
'className': _$cn(classNameObj)
|
|
21
|
-
}, getRestProps(this)), _$ce(2, 'div', !collapse ? _$
|
|
22
|
+
}, getRestProps(this)), _$ce(2, 'div', !collapse ? _$cc(Ellipsis, {
|
|
23
|
+
'position': 'bottom',
|
|
24
|
+
'children': children
|
|
25
|
+
}) : findChildren(children, function (vNode) {
|
|
22
26
|
return isComponentVNode(vNode, Icon);
|
|
23
27
|
}), 0, _$cn((_$cn2 = {}, _$cn2[k + "-menu-name"] = true, _$cn2[makeTitleStyles(k)] = true, _$cn2))));
|
|
24
28
|
}
|
|
@@ -160,7 +160,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
160
160
|
onRowDragEnd = _this$draggable.onRowDragEnd,
|
|
161
161
|
draggingKey = _this$draggable.draggingKey;
|
|
162
162
|
var tbody = _$ce(2, 'tbody', !hasData ? _$ce(2, 'tr', _$ce(2, 'td', (_$blocks['empty'] = function ($super) {
|
|
163
|
-
return _$('
|
|
163
|
+
return _$('暂无数据');
|
|
164
164
|
}, __$blocks['empty'] = function ($super, data) {
|
|
165
165
|
var block = $blocks['empty'];
|
|
166
166
|
var callBlock = function callBlock() {
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import _asyncToGenerator from "@babel/runtime-corejs3/helpers/asyncToGenerator";
|
|
2
2
|
import _regeneratorRuntime from "@babel/runtime-corejs3/regenerator";
|
|
3
3
|
import ClosableDemo from '~/components/tag/demos/closable';
|
|
4
|
-
import { mount, wait, dispatchEvent, getElement } from '../../test/utils';
|
|
4
|
+
import { mount, unmount, wait, dispatchEvent, getElement } from '../../test/utils';
|
|
5
5
|
import TagsDemo from '~/components/tag/demos/tags';
|
|
6
6
|
import DraggableDemo from '~/components/tag/demos/draggable';
|
|
7
7
|
describe('Tag', function () {
|
|
8
|
-
|
|
8
|
+
afterEach(function () {
|
|
9
|
+
return unmount();
|
|
10
|
+
});
|
|
9
11
|
it('should not close tag if we has prevented default', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
10
12
|
var _mount, instance, element, btns, preventDefaultBtn, commonBtn;
|
|
11
13
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
@@ -55,7 +55,8 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
55
55
|
var _$blocks = {},
|
|
56
56
|
__$blocks = _$ex({}, $blocks);
|
|
57
57
|
return (_$blocks['content'] = function ($super) {
|
|
58
|
-
|
|
58
|
+
var _extends2;
|
|
59
|
+
return _$ce(2, 'div', hiddenChildren.value, 0, _$cn(_extends({}, classNameObj, (_extends2 = {}, _extends2[k + "-nowrap"] = false, _extends2))));
|
|
59
60
|
}, __$blocks['content'] = function ($super, data) {
|
|
60
61
|
var block = $blocks['content'];
|
|
61
62
|
var callBlock = function callBlock() {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Component, TypeDefs } from 'intact';
|
|
2
|
+
export interface ViewProps {
|
|
3
|
+
tag?: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* A component only used in React or Vue to bind event, so that
|
|
7
|
+
* it can use Intact Event system to stop propagation (stopPropagation).
|
|
8
|
+
*/
|
|
9
|
+
export declare class View extends Component<ViewProps> {
|
|
10
|
+
static template(this: View): import("intact").VNode<string>;
|
|
11
|
+
static typeDefs: Required<TypeDefs<ViewProps>>;
|
|
12
|
+
static defaults(): {
|
|
13
|
+
tag: string;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime-corejs3/helpers/objectWithoutPropertiesLoose";
|
|
2
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
3
|
+
var _excluded = ["tag"];
|
|
4
|
+
import { Component, createVNode as h } from 'intact';
|
|
5
|
+
var typeDefs = {
|
|
6
|
+
tag: String
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* A component only used in React or Vue to bind event, so that
|
|
10
|
+
* it can use Intact Event system to stop propagation (stopPropagation).
|
|
11
|
+
*/
|
|
12
|
+
export var View = /*#__PURE__*/function (_Component) {
|
|
13
|
+
_inheritsLoose(View, _Component);
|
|
14
|
+
function View() {
|
|
15
|
+
return _Component.apply(this, arguments) || this;
|
|
16
|
+
}
|
|
17
|
+
View.template = function template() {
|
|
18
|
+
var _this$get = this.get(),
|
|
19
|
+
tag = _this$get.tag,
|
|
20
|
+
rest = _objectWithoutPropertiesLoose(_this$get, _excluded);
|
|
21
|
+
return h(tag, rest);
|
|
22
|
+
};
|
|
23
|
+
View.defaults = function defaults() {
|
|
24
|
+
return {
|
|
25
|
+
tag: 'div'
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
return View;
|
|
29
|
+
}(Component);
|
|
30
|
+
View.typeDefs = typeDefs;
|
package/es/i18n/en-US.d.ts
CHANGED
package/es/i18n/en-US.js
CHANGED
package/es/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @king-design v3.
|
|
2
|
+
* @king-design v3.3.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Kingsoft Cloud
|
|
5
5
|
* Released under the MIT License
|
|
@@ -24,9 +24,11 @@ export * from './components/config';
|
|
|
24
24
|
export * from './components/copy';
|
|
25
25
|
export * from './components/datepicker';
|
|
26
26
|
export * from './components/dialog';
|
|
27
|
+
export * from './components/divider';
|
|
27
28
|
export * from './components/drawer';
|
|
28
29
|
export * from './components/dropdown';
|
|
29
30
|
export * from './components/editable';
|
|
31
|
+
export * from './components/ellipsis';
|
|
30
32
|
export * from './components/form';
|
|
31
33
|
export * from './components/grid';
|
|
32
34
|
export * from './components/icon';
|
|
@@ -59,5 +61,6 @@ export * from './components/transfer';
|
|
|
59
61
|
export * from './components/tree';
|
|
60
62
|
export * from './components/treeSelect';
|
|
61
63
|
export * from './components/upload';
|
|
64
|
+
export * from './components/view';
|
|
62
65
|
export * from './components/wave';
|
|
63
|
-
export declare const version = "3.
|
|
66
|
+
export declare const version = "3.3.0";
|
package/es/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @king-design v3.
|
|
2
|
+
* @king-design v3.3.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Kingsoft Cloud
|
|
5
5
|
* Released under the MIT License
|
|
@@ -25,9 +25,11 @@ export * from './components/config';
|
|
|
25
25
|
export * from './components/copy';
|
|
26
26
|
export * from './components/datepicker';
|
|
27
27
|
export * from './components/dialog';
|
|
28
|
+
export * from './components/divider';
|
|
28
29
|
export * from './components/drawer';
|
|
29
30
|
export * from './components/dropdown';
|
|
30
31
|
export * from './components/editable';
|
|
32
|
+
export * from './components/ellipsis';
|
|
31
33
|
export * from './components/form';
|
|
32
34
|
export * from './components/grid';
|
|
33
35
|
export * from './components/icon';
|
|
@@ -60,6 +62,7 @@ export * from './components/transfer';
|
|
|
60
62
|
export * from './components/tree';
|
|
61
63
|
export * from './components/treeSelect';
|
|
62
64
|
export * from './components/upload';
|
|
65
|
+
export * from './components/view';
|
|
63
66
|
export * from './components/wave';
|
|
64
|
-
export var version = '3.
|
|
67
|
+
export var version = '3.3.0';
|
|
65
68
|
/* generate end */
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { default as data } from './index.json';
|
|
2
|
+
import { Component } from 'intact';
|
|
3
|
+
interface Props {
|
|
4
|
+
border?: 'solid' | 'dashed' | 'dotted' | 'double';
|
|
5
|
+
}
|
|
6
|
+
export default class extends Component<Props> {
|
|
7
|
+
static template: string | import("intact").Template<any>;
|
|
8
|
+
static defaults(): Props;
|
|
9
|
+
}
|
|
@@ -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
|
+
var default_1 = /*#__PURE__*/function (_Component) {
|
|
6
|
+
_inheritsLoose(default_1, _Component);
|
|
7
|
+
function default_1() {
|
|
8
|
+
return _Component.apply(this, arguments) || this;
|
|
9
|
+
}
|
|
10
|
+
default_1.defaults = function defaults() {
|
|
11
|
+
return {
|
|
12
|
+
border: 'dashed'
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
return default_1;
|
|
16
|
+
}(Component);
|
|
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 _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/concat";
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { Card, Divider } from '@king-design/react';
|
|
5
|
+
var Demo = /*#__PURE__*/function (_React$Component) {
|
|
6
|
+
_inheritsLoose(Demo, _React$Component);
|
|
7
|
+
function Demo() {
|
|
8
|
+
var _context;
|
|
9
|
+
var _this;
|
|
10
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
11
|
+
args[_key] = arguments[_key];
|
|
12
|
+
}
|
|
13
|
+
_this = _React$Component.call.apply(_React$Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
|
|
14
|
+
_this.state = {
|
|
15
|
+
border: 'dashed'
|
|
16
|
+
};
|
|
17
|
+
return _this;
|
|
18
|
+
}
|
|
19
|
+
var _proto = Demo.prototype;
|
|
20
|
+
_proto.render = function render() {
|
|
21
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement("div", null, "\u9ED8\u8BA4\u76F4\u7EBF"), /*#__PURE__*/React.createElement(Divider, null), /*#__PURE__*/React.createElement("div", null, "\u865A\u7EBF"), /*#__PURE__*/React.createElement(Divider, {
|
|
22
|
+
borderType: this.state.border
|
|
23
|
+
})));
|
|
24
|
+
};
|
|
25
|
+
return Demo;
|
|
26
|
+
}(React.Component);
|
|
27
|
+
export { Demo as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
var default_1 = /*#__PURE__*/function (_Component) {
|
|
7
|
+
_inheritsLoose(default_1, _Component);
|
|
8
|
+
function default_1() {
|
|
9
|
+
return _Component.apply(this, arguments) || this;
|
|
10
|
+
}
|
|
11
|
+
return default_1;
|
|
12
|
+
}(Component);
|
|
13
|
+
default_1.template = template;
|
|
14
|
+
export { default_1 as default };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Divider } from '@king-design/react';
|
|
4
|
+
import './index.styl';
|
|
5
|
+
var Demo = /*#__PURE__*/function (_React$Component) {
|
|
6
|
+
_inheritsLoose(Demo, _React$Component);
|
|
7
|
+
function Demo() {
|
|
8
|
+
return _React$Component.apply(this, arguments) || this;
|
|
9
|
+
}
|
|
10
|
+
var _proto = Demo.prototype;
|
|
11
|
+
_proto.render = function render() {
|
|
12
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
13
|
+
className: "divider-content"
|
|
14
|
+
}, "Text", /*#__PURE__*/React.createElement(Divider, {
|
|
15
|
+
type: "vertical"
|
|
16
|
+
}), /*#__PURE__*/React.createElement("a", {
|
|
17
|
+
href: "#"
|
|
18
|
+
}, "Link"), /*#__PURE__*/React.createElement(Divider, {
|
|
19
|
+
type: "vertical"
|
|
20
|
+
}, "Text"), /*#__PURE__*/React.createElement("a", {
|
|
21
|
+
href: "#"
|
|
22
|
+
}, "Link"));
|
|
23
|
+
};
|
|
24
|
+
return Demo;
|
|
25
|
+
}(React.Component);
|
|
26
|
+
export { Demo as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
+
margin: readonly ["large", "default", "small", "none"];
|
|
7
|
+
};
|
|
8
|
+
}
|
|
@@ -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
|
+
var default_1 = /*#__PURE__*/function (_Component) {
|
|
6
|
+
_inheritsLoose(default_1, _Component);
|
|
7
|
+
function default_1() {
|
|
8
|
+
return _Component.apply(this, arguments) || this;
|
|
9
|
+
}
|
|
10
|
+
default_1.defaults = function defaults() {
|
|
11
|
+
return {
|
|
12
|
+
margin: ['large', 'default', 'small', 'none']
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
return default_1;
|
|
16
|
+
}(Component);
|
|
17
|
+
default_1.template = template;
|
|
18
|
+
export { default_1 as default };
|
|
@@ -0,0 +1,37 @@
|
|
|
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 { Divider } from '@king-design/react';
|
|
6
|
+
var Demo = /*#__PURE__*/function (_React$Component) {
|
|
7
|
+
_inheritsLoose(Demo, _React$Component);
|
|
8
|
+
function Demo() {
|
|
9
|
+
var _context;
|
|
10
|
+
var _this;
|
|
11
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
12
|
+
args[_key] = arguments[_key];
|
|
13
|
+
}
|
|
14
|
+
_this = _React$Component.call.apply(_React$Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
|
|
15
|
+
_this.state = {
|
|
16
|
+
margin: ['large', 'default', 'small', 'none']
|
|
17
|
+
};
|
|
18
|
+
return _this;
|
|
19
|
+
}
|
|
20
|
+
var _proto = Demo.prototype;
|
|
21
|
+
_proto.render = function render() {
|
|
22
|
+
var _context2;
|
|
23
|
+
return /*#__PURE__*/React.createElement("div", null, _mapInstanceProperty(_context2 = this.state.margin).call(_context2, function ($value, $key) {
|
|
24
|
+
return /*#__PURE__*/React.createElement("div", null, "margin ", $value, /*#__PURE__*/React.createElement(Divider, {
|
|
25
|
+
margin: $value
|
|
26
|
+
}));
|
|
27
|
+
}), "\u81EA\u5B9A\u4E49margin", /*#__PURE__*/React.createElement(Divider, {
|
|
28
|
+
margin: 30
|
|
29
|
+
}), "\u81EA\u5B9A\u4E49margin", /*#__PURE__*/React.createElement(Divider, {
|
|
30
|
+
style: {
|
|
31
|
+
margin: '8px 0 0 0'
|
|
32
|
+
}
|
|
33
|
+
}));
|
|
34
|
+
};
|
|
35
|
+
return Demo;
|
|
36
|
+
}(React.Component);
|
|
37
|
+
export { Demo as default };
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
var default_1 = /*#__PURE__*/function (_Component) {
|
|
6
|
+
_inheritsLoose(default_1, _Component);
|
|
7
|
+
function default_1() {
|
|
8
|
+
return _Component.apply(this, arguments) || this;
|
|
9
|
+
}
|
|
10
|
+
return default_1;
|
|
11
|
+
}(Component);
|
|
12
|
+
default_1.template = template;
|
|
13
|
+
export { default_1 as default };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Card, Divider } from '@king-design/react';
|
|
4
|
+
var Demo = /*#__PURE__*/function (_React$Component) {
|
|
5
|
+
_inheritsLoose(Demo, _React$Component);
|
|
6
|
+
function Demo() {
|
|
7
|
+
return _React$Component.apply(this, arguments) || this;
|
|
8
|
+
}
|
|
9
|
+
var _proto = Demo.prototype;
|
|
10
|
+
_proto.render = function render() {
|
|
11
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement("div", null, "\u5361\u7247\u5185\u5BB9"), /*#__PURE__*/React.createElement(Divider, null, "Text"), /*#__PURE__*/React.createElement("div", null, "\u5361\u7247\u5185\u5BB9"), /*#__PURE__*/React.createElement(Divider, {
|
|
12
|
+
position: "left"
|
|
13
|
+
}, "Text"), /*#__PURE__*/React.createElement("div", null, "\u5361\u7247\u5185\u5BB9"), /*#__PURE__*/React.createElement(Divider, {
|
|
14
|
+
position: "right"
|
|
15
|
+
}, "Text")));
|
|
16
|
+
};
|
|
17
|
+
return Demo;
|
|
18
|
+
}(React.Component);
|
|
19
|
+
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,32 @@
|
|
|
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
|
+
var r = require.context('./', true, /demos.*(index|demo).ts/);
|
|
9
|
+
var keys = _keysInstanceProperty(r).call(r);
|
|
10
|
+
var demos = [];
|
|
11
|
+
for (var i = 0; i < keys.length; i++) {
|
|
12
|
+
var file = keys[i];
|
|
13
|
+
if (!_startsWithInstanceProperty(file).call(file, '.')) continue;
|
|
14
|
+
// if we found demo.js then ignore index.js
|
|
15
|
+
if (/demo.ts$/.test(file)) i++;
|
|
16
|
+
demos.push(r(file));
|
|
17
|
+
}
|
|
18
|
+
var default_1 = /*#__PURE__*/function (_Article) {
|
|
19
|
+
_inheritsLoose(default_1, _Article);
|
|
20
|
+
function default_1() {
|
|
21
|
+
return _Article.apply(this, arguments) || this;
|
|
22
|
+
}
|
|
23
|
+
return default_1;
|
|
24
|
+
}(Article);
|
|
25
|
+
default_1.sidebar = sidebar;
|
|
26
|
+
default_1.data = data;
|
|
27
|
+
default_1.defaults = function () {
|
|
28
|
+
return _extends({}, Article.defaults, data, {
|
|
29
|
+
demos: demos
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
export { default_1 as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { default as data } from './index.json';
|
|
2
|
+
import { Component } from 'intact';
|
|
3
|
+
import './index.styl';
|
|
4
|
+
interface Props {
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export default class extends Component<Props> {
|
|
8
|
+
static template: string | import("intact").Template<any>;
|
|
9
|
+
static defaults(): {
|
|
10
|
+
disabled: boolean;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
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
|
+
disabled: true
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
return default_1;
|
|
17
|
+
}(Component);
|
|
18
|
+
default_1.template = template;
|
|
19
|
+
export { default_1 as default };
|