@king-design/intact 2.0.13 → 2.0.15
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/cascader/index.md +1 -0
- package/components/cascader/useValue.ts +1 -1
- package/components/colorpicker/index.md +1 -0
- package/components/colorpicker/index.ts +2 -0
- package/components/colorpicker/index.vdt +1 -0
- package/components/datepicker/index.md +1 -0
- package/components/dialog/alert.vdt +5 -3
- package/components/dialog/index.md +3 -0
- package/components/dialog/index.spec.ts +35 -0
- package/components/dialog/staticMethods.ts +14 -1
- package/components/dialog/useFixBody.ts +3 -1
- package/components/form/styles.ts +5 -2
- package/components/icon/demos/icons.md +158 -0
- package/components/pagination/demos/disable.md +51 -0
- package/components/pagination/index.md +2 -0
- package/components/pagination/index.spec.ts +14 -0
- package/components/pagination/index.ts +8 -0
- package/components/pagination/index.vdt +13 -3
- package/components/pagination/styles.ts +3 -0
- package/components/portal.ts +38 -28
- package/components/select/base.ts +5 -7
- package/components/select/base.vdt +5 -7
- package/components/select/demos/basic.md +1 -1
- package/components/select/index.md +1 -0
- package/components/select/useEqualWidth.ts +1 -1
- package/components/select/useFocusout.ts +1 -1
- package/components/select/useInput.ts +1 -1
- package/components/treeSelect/index.md +1 -0
- package/components/wave/index.ts +1 -1
- package/components/wave/styles.ts +2 -1
- package/es/components/cascader/useValue.js +1 -1
- package/es/components/colorpicker/index.d.ts +1 -0
- package/es/components/colorpicker/index.js +2 -1
- package/es/components/colorpicker/index.vdt.js +5 -1
- package/es/components/dialog/alert.vdt.js +6 -4
- package/es/components/dialog/index.spec.js +61 -1
- package/es/components/dialog/staticMethods.d.ts +4 -2
- package/es/components/dialog/staticMethods.js +16 -0
- package/es/components/dialog/useFixBody.js +3 -1
- package/es/components/form/styles.js +1 -1
- package/es/components/pagination/index.d.ts +2 -0
- package/es/components/pagination/index.js +12 -1
- package/es/components/pagination/index.spec.js +28 -0
- package/es/components/pagination/index.vdt.js +18 -3
- package/es/components/pagination/styles.js +1 -1
- package/es/components/portal.js +23 -11
- package/es/components/select/base.d.ts +1 -1
- package/es/components/select/base.js +4 -4
- package/es/components/select/base.vdt.js +6 -6
- package/es/components/select/useEqualWidth.js +1 -1
- package/es/components/select/useFocusout.js +1 -1
- package/es/components/select/useInput.js +1 -1
- package/es/components/wave/styles.js +1 -1
- package/es/index.d.ts +2 -2
- package/es/index.js +2 -2
- package/es/packages/kpc-react/__tests__/components/dialog.spec.d.ts +1 -0
- package/es/packages/kpc-react/__tests__/components/dialog.spec.js +45 -0
- package/es/packages/kpc-react/__tests__/components/drawer.spec.js +65 -10
- package/es/site/data/components/icon/demos/icons/index.d.ts +9 -0
- package/es/site/data/components/icon/demos/icons/index.js +24 -0
- package/es/site/data/components/{menu/demos/size → icon/demos/icons}/react.d.ts +4 -2
- package/es/site/data/components/icon/demos/icons/react.js +63 -0
- package/es/site/data/components/pagination/demos/disable/index.d.ts +16 -0
- package/es/site/data/components/pagination/demos/disable/index.js +35 -0
- package/es/site/data/components/pagination/demos/disable/react.d.ts +16 -0
- package/es/site/data/components/pagination/demos/disable/react.js +65 -0
- package/es/site/data/components/select/demos/basic/react.js +2 -1
- package/es/styles/global.js +1 -1
- package/index.ts +2 -2
- package/package.json +2 -2
- package/styles/fonts/demo.css +370 -0
- package/styles/fonts/demo.html +29 -0
- package/styles/fonts/iconfont.css +477 -0
- package/styles/global.ts +1 -1
- package/es/site/data/components/menu/demos/collapse/react.d.ts +0 -11
|
@@ -13,5 +13,5 @@ setDefault(function () {
|
|
|
13
13
|
});
|
|
14
14
|
export function makeStyles(color, inset) {
|
|
15
15
|
var waveEffect = /*#__PURE__*/keyframes("100%{top:calc(", inset, " + ", wave.inset, ");bottom:calc(", inset, " + ", wave.inset, ");left:calc(", inset, " + ", wave.inset, ");right:calc(", inset, " + ", wave.inset, ");opacity:0.05;}");
|
|
16
|
-
return /*#__PURE__*/css("position:relative;&::after{display:block;content:'';position:absolute;top:", inset, ";bottom:", inset, ";left:", inset, ";right:", inset, ";opacity:0.4;border-radius:4px;z-index:2;animation:", waveEffect, " .2s ease-in;animation-fill-mode:forwards;border:2px solid ", color, ";}&.k-circle,&.k-radio-wrapper{&:after{border-radius:calc(", theme.large.height, " / 2 + 4px);}}");
|
|
16
|
+
return /*#__PURE__*/css("position:relative;&::after{display:block;content:'';position:absolute;top:", inset, ";bottom:", inset, ";left:", inset, ";right:", inset, ";opacity:0.4;border-radius:4px;z-index:2;animation:", waveEffect, " .2s ease-in;animation-fill-mode:forwards;border:2px solid ", color, ";pointer-events:none;}&.k-circle,&.k-radio-wrapper{&:after{border-radius:calc(", theme.large.height, " / 2 + 4px);}}");
|
|
17
17
|
}
|
package/es/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @king-design v2.0.
|
|
2
|
+
* @king-design v2.0.15
|
|
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.0.
|
|
60
|
+
export declare const version = "2.0.15";
|
package/es/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @king-design v2.0.
|
|
2
|
+
* @king-design v2.0.15
|
|
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.0.
|
|
62
|
+
export var version = '2.0.15';
|
|
63
63
|
/* generate end */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import _asyncToGenerator from "@babel/runtime-corejs3/helpers/asyncToGenerator";
|
|
2
|
+
import _regeneratorRuntime from "@babel/runtime-corejs3/regenerator";
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import * as ReactDOM from 'react-dom';
|
|
5
|
+
import { Dialog, Icon } from '../../';
|
|
6
|
+
import { getElement, wait } from '../../../../test/utils';
|
|
7
|
+
describe('Dialog', function () {
|
|
8
|
+
var container;
|
|
9
|
+
beforeEach(function () {
|
|
10
|
+
container = document.createElement('div');
|
|
11
|
+
document.body.appendChild(container);
|
|
12
|
+
});
|
|
13
|
+
afterEach(function () {
|
|
14
|
+
ReactDOM.unmountComponentAtNode(container);
|
|
15
|
+
document.body.removeChild(container);
|
|
16
|
+
});
|
|
17
|
+
it('should render vNode as content', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
18
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
19
|
+
while (1) {
|
|
20
|
+
switch (_context.prev = _context.next) {
|
|
21
|
+
case 0:
|
|
22
|
+
Dialog.confirm({
|
|
23
|
+
content: /*#__PURE__*/React.createElement("div", null, "test"),
|
|
24
|
+
className: 'confirm-test',
|
|
25
|
+
icon: /*#__PURE__*/React.createElement(Icon, {
|
|
26
|
+
className: "test"
|
|
27
|
+
})
|
|
28
|
+
});
|
|
29
|
+
_context.next = 3;
|
|
30
|
+
return wait(100);
|
|
31
|
+
|
|
32
|
+
case 3:
|
|
33
|
+
expect(getElement('.confirm-test').innerHTML).to.matchSnapshot();
|
|
34
|
+
getElement('.confirm-test .k-primary').click();
|
|
35
|
+
_context.next = 7;
|
|
36
|
+
return wait(600);
|
|
37
|
+
|
|
38
|
+
case 7:
|
|
39
|
+
case "end":
|
|
40
|
+
return _context.stop();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}, _callee);
|
|
44
|
+
})));
|
|
45
|
+
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
2
|
import _asyncToGenerator from "@babel/runtime-corejs3/helpers/asyncToGenerator";
|
|
3
3
|
import _regeneratorRuntime from "@babel/runtime-corejs3/regenerator";
|
|
4
|
-
import React, { useState } from 'react';
|
|
4
|
+
import React, { useState, useEffect } from 'react';
|
|
5
5
|
import * as ReactDOM from 'react-dom';
|
|
6
|
-
import { Drawer, Card, Button } from '../../';
|
|
6
|
+
import { Drawer, Card, Button, Select, Option } from '../../';
|
|
7
7
|
import { Component } from 'intact-react';
|
|
8
8
|
import { wait, dispatchEvent } from '../../../../test/utils';
|
|
9
9
|
describe('Drawer', function () {
|
|
@@ -64,7 +64,7 @@ describe('Drawer', function () {
|
|
|
64
64
|
}, _callee);
|
|
65
65
|
})));
|
|
66
66
|
it('should handle event correctly', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
67
|
-
var click1, click2, _document$querySelect, element1, element2;
|
|
67
|
+
var click1, click2, click3, _document$querySelect, element1, element2, element3;
|
|
68
68
|
|
|
69
69
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
70
70
|
while (1) {
|
|
@@ -76,6 +76,9 @@ describe('Drawer', function () {
|
|
|
76
76
|
click2 = sinon.spy(function () {
|
|
77
77
|
return console.log(2);
|
|
78
78
|
});
|
|
79
|
+
click3 = sinon.spy(function () {
|
|
80
|
+
return console.log(3);
|
|
81
|
+
});
|
|
79
82
|
ReactDOM.render( /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Drawer, {
|
|
80
83
|
value: true,
|
|
81
84
|
title: "1"
|
|
@@ -97,26 +100,78 @@ describe('Drawer', function () {
|
|
|
97
100
|
}, /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement("div", {
|
|
98
101
|
className: "click",
|
|
99
102
|
onClick: click2
|
|
100
|
-
}, "click")))
|
|
101
|
-
|
|
103
|
+
}, "click"))), /*#__PURE__*/React.createElement(Drawer, {
|
|
104
|
+
value: true,
|
|
105
|
+
title: "3"
|
|
106
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement("div", {
|
|
107
|
+
className: "click",
|
|
108
|
+
onClick: click3
|
|
109
|
+
}, "click"))))), container);
|
|
110
|
+
_document$querySelect = document.querySelectorAll('.click'), element1 = _document$querySelect[0], element2 = _document$querySelect[1], element3 = _document$querySelect[2];
|
|
102
111
|
dispatchEvent(element1, 'click');
|
|
103
|
-
_context2.next =
|
|
112
|
+
_context2.next = 8;
|
|
104
113
|
return wait();
|
|
105
114
|
|
|
106
|
-
case
|
|
115
|
+
case 8:
|
|
107
116
|
expect(click1.callCount).to.eql(1);
|
|
108
117
|
dispatchEvent(element2, 'click');
|
|
109
|
-
_context2.next =
|
|
118
|
+
_context2.next = 12;
|
|
110
119
|
return wait();
|
|
111
120
|
|
|
112
|
-
case
|
|
121
|
+
case 12:
|
|
113
122
|
expect(click2.callCount).to.eql(1);
|
|
123
|
+
dispatchEvent(element3, 'click');
|
|
124
|
+
_context2.next = 16;
|
|
125
|
+
return wait();
|
|
114
126
|
|
|
115
|
-
case
|
|
127
|
+
case 16:
|
|
128
|
+
expect(click3.callCount).to.eql(1);
|
|
129
|
+
|
|
130
|
+
case 17:
|
|
116
131
|
case "end":
|
|
117
132
|
return _context2.stop();
|
|
118
133
|
}
|
|
119
134
|
}
|
|
120
135
|
}, _callee2);
|
|
121
136
|
})));
|
|
137
|
+
it('$update call before mountedQueue in $receive', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
|
138
|
+
var App;
|
|
139
|
+
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
140
|
+
while (1) {
|
|
141
|
+
switch (_context3.prev = _context3.next) {
|
|
142
|
+
case 0:
|
|
143
|
+
App = function _App2() {
|
|
144
|
+
var _useState2 = useState(false),
|
|
145
|
+
state = _useState2[0],
|
|
146
|
+
setState = _useState2[1];
|
|
147
|
+
|
|
148
|
+
useEffect(function () {
|
|
149
|
+
setState(true);
|
|
150
|
+
}, []);
|
|
151
|
+
return /*#__PURE__*/React.createElement(Drawer, {
|
|
152
|
+
value: true,
|
|
153
|
+
mode: "destroy"
|
|
154
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement("div", null, "react element"), /*#__PURE__*/React.createElement(Select, {
|
|
155
|
+
container: function container(parentElement) {
|
|
156
|
+
return parentElement.closest('.k-dialog-body');
|
|
157
|
+
}
|
|
158
|
+
}, state ? /*#__PURE__*/React.createElement(Option, {
|
|
159
|
+
value: "1"
|
|
160
|
+
}, "1") : null))));
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
ReactDOM.render( /*#__PURE__*/React.createElement(App, null), container);
|
|
164
|
+
_context3.next = 4;
|
|
165
|
+
return wait();
|
|
166
|
+
|
|
167
|
+
case 4:
|
|
168
|
+
expect(document.querySelector('.k-dialog-body .k-select-menu').textContent).to.eql('1');
|
|
169
|
+
|
|
170
|
+
case 5:
|
|
171
|
+
case "end":
|
|
172
|
+
return _context3.stop();
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}, _callee3);
|
|
176
|
+
})));
|
|
122
177
|
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { default as data } from './index.json';
|
|
2
|
+
import { Component } from 'intact';
|
|
3
|
+
import './index.styl';
|
|
4
|
+
export default class extends Component {
|
|
5
|
+
static template: string | import("intact").Template<any>;
|
|
6
|
+
static defaults(): {
|
|
7
|
+
fonts: string[];
|
|
8
|
+
};
|
|
9
|
+
}
|
|
@@ -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
|
+
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
|
+
fonts: ['alert', 'alarm', 'calendar', 'application', 'arrow-right', 'arrow-up', 'arrow-left', 'arrow-down', 'arrow-expand', 'arrow-left-circled', 'arrow-right-circled', 'close', 'bill', 'change', 'cloud-download', 'content-squared', 'cloud', 'arrow-move', 'code-download', 'cloud-server', 'arrow-shrink', 'clone', 'cloud-servers', 'cart', 'delete', 'fault-outline', 'calculate', 'arrow-swap', 'download', 'information', 'internet', 'edit', 'search', 'code-working', 'heart', 'content', 'cut', 'money-square', 'logout', 'cloud-upload', 'lock', 'corporate', 'truth-none', 'resize', 'protect', 'time', 'date', 'document-change', 'scanner', 'notification', 'notification-outline', 'silent', 'heart-outline', 'share', 'pay', 'picture', 'desktop', 'earphone', 'cube', 'user-verify', 'fault', 'location', 'down-squared', 'pay-dollar', 'paperclip', 'settings', 'home', 'more', 'phonecall', 'tag', 'truth-circled', 'refresh', 'watch', 'images', 'sort', 'money-circled', 'trade', 'star-outline', 'minus-circled', 'right', 'left', 'up', 'down', 'upward', 'up-circled', 'pin', 'hide', 'users', 'user', 'return-right', 'message', 'paper', 'phonecall-prohibit', 'speedometer', 'settings-horizontal', 'phone', 'star', 'play', 'refresh-lock', 'shield', 'panel', 'structure', 'settings-vertical', 'printer', 'stop', 'return-left', 'question', 'unlock', 'sound-off', 'up-squared', 'sound-on', 'upload', 'tool', 'visible', 'truth']
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
return default_1;
|
|
21
|
+
}(Component);
|
|
22
|
+
|
|
23
|
+
default_1.template = template;
|
|
24
|
+
export { default_1 as default };
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './index.styl';
|
|
3
|
-
import type { MenuProps } from '@king-design/react';
|
|
4
3
|
export default class Demo extends React.Component {
|
|
5
|
-
state:
|
|
4
|
+
state: {
|
|
5
|
+
fonts: string[];
|
|
6
|
+
};
|
|
7
|
+
private classNames;
|
|
6
8
|
render(): JSX.Element;
|
|
7
9
|
}
|
|
@@ -0,0 +1,63 @@
|
|
|
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 { Icon } 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
|
+
fonts: ['alert', 'alarm', 'calendar', 'application', 'arrow-right', 'arrow-up', 'arrow-left', 'arrow-down', 'arrow-expand', 'arrow-left-circled', 'arrow-right-circled', 'close', 'bill', 'change', 'cloud-download', 'content-squared', 'cloud', 'arrow-move', 'code-download', 'cloud-server', 'arrow-shrink', 'clone', 'cloud-servers', 'cart', 'delete', 'fault-outline', 'calculate', 'arrow-swap', 'download', 'information', 'internet', 'edit', 'search', 'code-working', 'heart', 'content', 'cut', 'money-square', 'logout', 'cloud-upload', 'lock', 'corporate', 'truth-none', 'resize', 'protect', 'time', 'date', 'document-change', 'scanner', 'notification', 'notification-outline', 'silent', 'heart-outline', 'share', 'pay', 'picture', 'desktop', 'earphone', 'cube', 'user-verify', 'fault', 'location', 'down-squared', 'pay-dollar', 'paperclip', 'settings', 'home', 'more', 'phonecall', 'tag', 'truth-circled', 'refresh', 'watch', 'images', 'sort', 'money-circled', 'trade', 'star-outline', 'minus-circled', 'right', 'left', 'up', 'down', 'upward', 'up-circled', 'pin', 'hide', 'users', 'user', 'return-right', 'message', 'paper', 'phonecall-prohibit', 'speedometer', 'settings-horizontal', 'phone', 'star', 'play', 'refresh-lock', 'shield', 'panel', 'structure', 'settings-vertical', 'printer', 'stop', 'return-left', 'question', 'unlock', 'sound-off', 'up-squared', 'sound-on', 'upload', 'tool', 'visible', 'truth']
|
|
23
|
+
};
|
|
24
|
+
return _this;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
var _proto = Demo.prototype;
|
|
28
|
+
|
|
29
|
+
_proto.classNames = function classNames(_classNames) {
|
|
30
|
+
if (typeof _classNames === 'string') return _classNames;
|
|
31
|
+
var ret = [];
|
|
32
|
+
|
|
33
|
+
for (var key in _classNames) {
|
|
34
|
+
var value = _classNames[key];
|
|
35
|
+
|
|
36
|
+
if (value) {
|
|
37
|
+
ret.push(key);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return ret.join(' ');
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
_proto.render = function render() {
|
|
45
|
+
var _context2,
|
|
46
|
+
_this2 = this;
|
|
47
|
+
|
|
48
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
49
|
+
className: "icons"
|
|
50
|
+
}, _mapInstanceProperty(_context2 = this.state.fonts).call(_context2, function ($value, $key) {
|
|
51
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
52
|
+
className: "icon"
|
|
53
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
54
|
+
className: _this2.classNames('k-icon-' + $value),
|
|
55
|
+
size: "large"
|
|
56
|
+
}), /*#__PURE__*/React.createElement("div", null, 'k-icon-' + $value));
|
|
57
|
+
}));
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
return Demo;
|
|
61
|
+
}(React.Component);
|
|
62
|
+
|
|
63
|
+
export { Demo as default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { default as data } from './index.json';
|
|
2
|
+
import { Component } from 'intact';
|
|
3
|
+
import './index.styl';
|
|
4
|
+
interface Props {
|
|
5
|
+
value1?: number;
|
|
6
|
+
value2?: number;
|
|
7
|
+
}
|
|
8
|
+
export default class extends Component<Props> {
|
|
9
|
+
static template: string | import("intact").Template<any>;
|
|
10
|
+
static defaults(): {
|
|
11
|
+
value1: number;
|
|
12
|
+
value2: number;
|
|
13
|
+
};
|
|
14
|
+
disableBtn(page: number, limit: number): boolean;
|
|
15
|
+
disablePage(page: number, limit: number): boolean;
|
|
16
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
value1: 10,
|
|
17
|
+
value2: 10
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
var _proto = default_1.prototype;
|
|
22
|
+
|
|
23
|
+
_proto.disableBtn = function disableBtn(page, limit) {
|
|
24
|
+
return page > 10;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
_proto.disablePage = function disablePage(page, limit) {
|
|
28
|
+
return page > 10;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
return default_1;
|
|
32
|
+
}(Component);
|
|
33
|
+
|
|
34
|
+
default_1.template = template;
|
|
35
|
+
export { default_1 as default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.styl';
|
|
3
|
+
interface Props {
|
|
4
|
+
value1?: number;
|
|
5
|
+
value2?: number;
|
|
6
|
+
}
|
|
7
|
+
export default class Demo extends React.Component<{}, Props> {
|
|
8
|
+
state: {
|
|
9
|
+
value1: number;
|
|
10
|
+
value2: number;
|
|
11
|
+
};
|
|
12
|
+
disableBtn(page: number, limit: number): boolean;
|
|
13
|
+
disablePage(page: number, limit: number): boolean;
|
|
14
|
+
render(): JSX.Element;
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,65 @@
|
|
|
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 { Pagination } from '@king-design/react';
|
|
5
|
+
import './index.styl';
|
|
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
|
+
value1: 10,
|
|
22
|
+
value2: 10
|
|
23
|
+
};
|
|
24
|
+
return _this;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
var _proto = Demo.prototype;
|
|
28
|
+
|
|
29
|
+
_proto.disableBtn = function disableBtn(page, limit) {
|
|
30
|
+
return page > 10;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
_proto.disablePage = function disablePage(page, limit) {
|
|
34
|
+
return page > 10;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
_proto.render = function render() {
|
|
38
|
+
var _this2 = this;
|
|
39
|
+
|
|
40
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Pagination, {
|
|
41
|
+
value: this.state.value1,
|
|
42
|
+
onChangeValue: function onChangeValue(value1) {
|
|
43
|
+
return _this2.setState({
|
|
44
|
+
value1: value1
|
|
45
|
+
});
|
|
46
|
+
},
|
|
47
|
+
total: 200,
|
|
48
|
+
disableBtn: this.disableBtn
|
|
49
|
+
}), /*#__PURE__*/React.createElement(Pagination, {
|
|
50
|
+
value: this.state.value2,
|
|
51
|
+
onChangeValue: function onChangeValue(value2) {
|
|
52
|
+
return _this2.setState({
|
|
53
|
+
value2: value2
|
|
54
|
+
});
|
|
55
|
+
},
|
|
56
|
+
total: 200,
|
|
57
|
+
showGoto: true,
|
|
58
|
+
disablePage: this.disablePage
|
|
59
|
+
}));
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
return Demo;
|
|
63
|
+
}(React.Component);
|
|
64
|
+
|
|
65
|
+
export { Demo as default };
|
|
@@ -37,7 +37,8 @@ var Demo = /*#__PURE__*/function (_React$Component) {
|
|
|
37
37
|
return _this2.setState({
|
|
38
38
|
day: day
|
|
39
39
|
});
|
|
40
|
-
}
|
|
40
|
+
},
|
|
41
|
+
show: true
|
|
41
42
|
}, /*#__PURE__*/React.createElement(Option, {
|
|
42
43
|
value: "Monday"
|
|
43
44
|
}, "\u661F\u671F\u4E00"), /*#__PURE__*/React.createElement(Option, {
|
package/es/styles/global.js
CHANGED
|
@@ -12,6 +12,6 @@ var slideDirections = {
|
|
|
12
12
|
right: 'left center 0'
|
|
13
13
|
}; // TODO: update global when theme changed
|
|
14
14
|
|
|
15
|
-
injectGlobal("html{--var-wave-color:", theme.color.primary, ";box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,SF Pro SC,SF Pro Text,Helvetica Neue,Helvetica,PingFang SC,Segoe UI,Roboto,Hiragino Sans GB,arial,microsoft yahei ui,Microsoft YaHei,
|
|
15
|
+
injectGlobal("html{--var-wave-color:", theme.color.primary, ";box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,SF Pro SC,SF Pro Text,Helvetica Neue,Helvetica,PingFang SC,Segoe UI,Roboto,Hiragino Sans GB,arial,microsoft yahei ui,Microsoft YaHei,sans-serif;}body{font-size:", theme.fontSize, ";line-height:", theme.lineHeight, ";margin:0;padding:0;color:", theme.color.text, ";}*,*:before,*:after{box-sizing:inherit;}", _mapInstanceProperty(_context = _Object$keys(slideDirections)).call(_context, function (direction) {
|
|
16
16
|
return "\n .k-slide" + direction + "-enter-from,\n .k-slide" + direction + "-leave-to {\n transform-origin: " + slideDirections[direction] + ";\n opacity: 0;\n transform: " + (direction === 'down' || direction === 'up' ? "scaleY(.8)" : 'scaleX(.8)') + ";\n }\n .k-slide" + direction + "-enter-active,\n .k-slide" + direction + "-leave-active {\n transform-origin: " + slideDirections[direction] + ";\n transition: opacity " + theme.transition.large + ", transform " + theme.transition.large + " !important;\n pointer-events: none;\n }\n ";
|
|
17
17
|
}).join(''), " .k-fade-enter-from,.k-fade-leave-to{opacity:0!important;}.k-fade-enter-active,.k-fade-leave-active{transition:opacity ", theme.transition.large, ";}.k-fade-leave-active:not(tr){position:absolute;}.k-fade-move{transition:transform ", theme.transition.large, ";}.k-scale-enter-from,.k-scale-leave-to{transform:scale(0);}.k-scale-enter-active,.k-scale-leave-active{transition:transform ", theme.transition.large, ";}.k-expand-enter-from,.k-expand-leave-to{opacity:0;overflow:hidden;}.k-expand-enter-active,.k-expand-leave-active{transition:all ", theme.transition.large, "!important;overflow:hidden;}.k-expand-move{transition:transform ", theme.transition.large, ";}.k-dropdown-enter-from,.k-dropdown-leave-to{opacity:0;transform:translateY(-20px);}.k-dropdown-enter-active,.k-dropdown-leave-active,.k-dropdown-move{transition:all ", theme.transition.large, ";}.k-dropdown-leave-active{position:absolute!important;}.k-dropdown-move{transition:transform ", theme.transition.large, ";}.k-fade-in-left-enter-from,.k-fade-in-left-leave-to{opacity:0;transform:translate3d(-15px, 0, 0);}.k-fade-in-left-enter-active,.k-fade-in-left-leave-active{transition:all ", theme.transition.large, ";td{background:", palette(theme.color.primary, -4), "!important;}}.k-fade-in-left-move{transition:transform ", theme.transition.large, ";}.k-fade-expand-enter-from,.k-fade-expand-leave-to{opacity:0;}.k-fade-expand-enter-active,.k-fade-expand-leave-active{transition:all ", theme.transition.large, ";background:", palette(theme.color.primary, -4), "!important;}.c-ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}.c-hidden{display:none;}.c-middle{display:inline-block;vertical-align:middle;}");
|
package/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @king-design v2.0.
|
|
2
|
+
* @king-design v2.0.15
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Kingsoft Cloud
|
|
5
5
|
* Released under the MIT License
|
|
@@ -62,6 +62,6 @@ export * from './components/treeSelect';
|
|
|
62
62
|
export * from './components/upload';
|
|
63
63
|
export * from './components/wave';
|
|
64
64
|
|
|
65
|
-
export const version = '2.0.
|
|
65
|
+
export const version = '2.0.15';
|
|
66
66
|
|
|
67
67
|
/* generate end */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@king-design/intact",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.15",
|
|
4
4
|
"description": "A component library written in Intact for Intact, Vue, React and Angular",
|
|
5
5
|
"main": "es/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
"highlight.js": "^10.4.1",
|
|
117
117
|
"history": "^5.0.0",
|
|
118
118
|
"html-webpack-plugin": "5.3.1",
|
|
119
|
-
"intact-react": "^3.0.
|
|
119
|
+
"intact-react": "^3.0.15",
|
|
120
120
|
"istanbul-instrumenter-loader": "^3.0.0",
|
|
121
121
|
"js-yaml": "^4.1.0",
|
|
122
122
|
"karma": "^6.3.2",
|