@king-design/intact 2.0.2 → 2.0.3
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 +5 -6
- package/components/portal.ts +1 -1
- package/components/skeleton/demos/animate.md +30 -0
- package/components/skeleton/demos/avator.md +30 -0
- package/components/skeleton/demos/basic.md +30 -0
- package/components/skeleton/demos/custom.md +39 -0
- package/components/skeleton/demos/rows.md +32 -0
- package/components/skeleton/index.md +24 -0
- package/components/skeleton/index.ts +2 -0
- package/components/skeleton/item.ts +30 -0
- package/components/skeleton/item.vdt +28 -0
- package/components/skeleton/skeleton.ts +33 -0
- package/components/skeleton/skeleton.vdt +32 -0
- package/components/skeleton/style.ts +105 -0
- package/components/tree/useFilter.ts +1 -2
- package/es/components/diagram/index.d.ts +1 -1
- package/es/components/dropdown/dropdown.js +7 -7
- package/es/components/portal.js +1 -1
- package/es/components/skeleton/index.d.ts +2 -0
- package/es/components/skeleton/index.js +2 -0
- package/es/components/skeleton/item.d.ts +16 -0
- package/es/components/skeleton/item.js +26 -0
- package/es/components/skeleton/item.vdt.js +35 -0
- package/es/components/skeleton/skeleton.d.ts +17 -0
- package/es/components/skeleton/skeleton.js +30 -0
- package/es/components/skeleton/skeleton.vdt.js +37 -0
- package/es/components/skeleton/style.d.ts +6 -0
- package/es/components/skeleton/style.js +35 -0
- package/es/components/steps/context.d.ts +2 -2
- package/es/components/tree/useFilter.js +1 -2
- package/es/index.d.ts +3 -2
- package/es/index.js +3 -2
- package/es/packages/kpc-react/__tests__/components/form.spec.d.ts +1 -0
- package/es/packages/kpc-react/__tests__/components/form.spec.js +46 -0
- package/es/site/data/components/menu/demos/collapse/react.d.ts +1 -1
- package/es/site/data/components/menu/demos/size/react.d.ts +1 -1
- package/es/site/data/components/skeleton/demos/animate/index.d.ts +11 -0
- package/es/site/data/components/skeleton/demos/animate/index.js +23 -0
- package/es/site/data/components/skeleton/demos/animate/react.d.ts +11 -0
- package/es/site/data/components/skeleton/demos/animate/react.js +38 -0
- package/es/site/data/components/skeleton/demos/avator/index.d.ts +11 -0
- package/es/site/data/components/skeleton/demos/avator/index.js +23 -0
- package/es/site/data/components/skeleton/demos/avator/react.d.ts +11 -0
- package/es/site/data/components/skeleton/demos/avator/react.js +37 -0
- package/es/site/data/components/skeleton/demos/basic/index.d.ts +11 -0
- package/es/site/data/components/skeleton/demos/basic/index.js +23 -0
- package/es/site/data/components/skeleton/demos/basic/react.d.ts +11 -0
- package/es/site/data/components/skeleton/demos/basic/react.js +36 -0
- package/es/site/data/components/skeleton/demos/custom/index.d.ts +11 -0
- package/es/site/data/components/skeleton/demos/custom/index.js +23 -0
- package/es/site/data/components/skeleton/demos/custom/react.d.ts +11 -0
- package/es/site/data/components/skeleton/demos/custom/react.js +60 -0
- package/es/site/data/components/skeleton/demos/rows/index.d.ts +13 -0
- package/es/site/data/components/skeleton/demos/rows/index.js +24 -0
- package/es/site/data/components/skeleton/demos/rows/react.d.ts +13 -0
- package/es/site/data/components/skeleton/demos/rows/react.js +38 -0
- package/es/site/data/components/skeleton/index.d.ts +57 -0
- package/es/site/data/components/skeleton/index.js +42 -0
- package/es/site/src/components/footer/styles.js +1 -1
- package/es/site/src/pages/colorProcess/index.d.ts +21 -0
- package/es/site/src/pages/colorProcess/index.js +79 -0
- package/es/site/src/pages/colorProcess/style.d.ts +3 -0
- package/es/site/src/pages/colorProcess/style.js +53 -0
- package/es/site/src/pages/font/index.d.ts +12 -0
- package/es/site/src/pages/font/index.js +22 -0
- package/es/site/src/pages/font/styles.d.ts +1 -0
- package/es/site/src/pages/font/styles.js +9 -0
- package/es/site/src/pages/iframe/colorProcess/styles.js +2 -2
- package/es/site/src/pages/index/BestPractice/styles.js +1 -1
- package/es/site/src/pages/index/ColorProcess/styles.js +2 -2
- package/es/site/src/pages/index/KingVersion/styles.js +1 -1
- package/es/site/src/pages/index/NewFunction/index.d.ts +2 -0
- package/es/site/src/pages/index/NewFunction/index.js +8 -2
- package/es/site/src/pages/index/NewFunction/styles.js +1 -1
- package/es/site/src/pages/index/styles.js +2 -1
- package/es/site/src/pages/resource/index.d.ts +1 -0
- package/es/site/src/pages/resource/index.js +4 -1
- package/es/site/src/pages/styles.js +1 -1
- package/es/site/src/router/index.js +75 -5
- package/index.ts +3 -2
- package/package.json +4 -3
- package/es/components/cascader/index.d.ts +0 -34
- package/es/components/datepicker/index.d.ts +0 -63
- package/es/components/select/select.d.ts +0 -33
- package/es/components/timepicker/panelPicker.d.ts +0 -54
- package/es/components/treeSelect/index.d.ts +0 -27
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import _fillInstanceProperty from "@babel/runtime-corejs3/core-js/instance/fill";
|
|
2
|
+
import { map as _$ma, createUnknownComponentVNode as _$cc, createElementVNode as _$ce, className as _$cn } from 'intact';
|
|
3
|
+
import { SkeletonItem } from './item';
|
|
4
|
+
import { makeStyles, kls } from './style';
|
|
5
|
+
var _$tmp0 = {
|
|
6
|
+
'type': 'avator'
|
|
7
|
+
};
|
|
8
|
+
export default function ($props, $blocks, $__proto__) {
|
|
9
|
+
var _context, _classNameObj;
|
|
10
|
+
|
|
11
|
+
$blocks || ($blocks = {});
|
|
12
|
+
$props || ($props = {});
|
|
13
|
+
var $this = this;
|
|
14
|
+
|
|
15
|
+
var _this$get = this.get(),
|
|
16
|
+
rows = _this$get.rows,
|
|
17
|
+
avator = _this$get.avator,
|
|
18
|
+
animated = _this$get.animated,
|
|
19
|
+
children = _this$get.children,
|
|
20
|
+
loading = _this$get.loading,
|
|
21
|
+
size = _this$get.size;
|
|
22
|
+
|
|
23
|
+
var targetRows = typeof rows !== 'number' ? 3 : rows < 1 ? 1 : parseInt(rows);
|
|
24
|
+
|
|
25
|
+
var skeletonList = _fillInstanceProperty(_context = Array(targetRows + 2)).call(_context);
|
|
26
|
+
|
|
27
|
+
var skeletonItems = _$ma(skeletonList, function ($value, $key) {
|
|
28
|
+
return _$cc(SkeletonItem);
|
|
29
|
+
}, $this);
|
|
30
|
+
|
|
31
|
+
var classNameObj = (_classNameObj = {
|
|
32
|
+
'k-skeleton': true,
|
|
33
|
+
'k-animated': animated
|
|
34
|
+
}, _classNameObj[makeStyles(size)] = true, _classNameObj);
|
|
35
|
+
return loading ? _$ce(2, 'div', children ? _$ce(2, 'div', children, 0) : avator ? _$ce(2, 'div', [_$cc(SkeletonItem, _$tmp0), _$ce(2, 'div', skeletonItems, 0, 'k-skeleton-items')], 4, _$cn(kls('avator-box'))) : _$ce(2, 'div', skeletonItems, 0, 'k-skeleton-items'), 2, _$cn(classNameObj)) : undefined;
|
|
36
|
+
}
|
|
37
|
+
;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import '../../styles/global';
|
|
2
|
+
export declare const kls: (className: string) => string;
|
|
3
|
+
declare type ItemSize = 'default' | 'large' | 'small' | 'mini';
|
|
4
|
+
export declare function makeStyles(size: ItemSize): string;
|
|
5
|
+
export declare function makeItemStyles(): string;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
2
|
+
|
|
3
|
+
import { deepDefaults } from '../../styles/utils';
|
|
4
|
+
import { theme, setDefault } from '../../styles/theme';
|
|
5
|
+
import { css, keyframes } from '@emotion/css';
|
|
6
|
+
import '../../styles/global';
|
|
7
|
+
export var kls = function kls(className) {
|
|
8
|
+
return "k-skeleton-" + className;
|
|
9
|
+
};
|
|
10
|
+
var defaults = {
|
|
11
|
+
item: {
|
|
12
|
+
bgColor: '#dcdde0'
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
var skeleton;
|
|
16
|
+
setDefault(function () {
|
|
17
|
+
skeleton = deepDefaults(theme, {
|
|
18
|
+
skeleton: defaults
|
|
19
|
+
}).skeleton;
|
|
20
|
+
});
|
|
21
|
+
export function makeStyles(size) {
|
|
22
|
+
return /*#__PURE__*/css("&.k-animated{.", kls('item'), "{&>.k-skeleton-item-box{background:linear-gradient(90deg, #f2f2f2 25%, #e6e6e6 37%, #f2f2f2 63%);background-size:400% 100%;animation:", skeletonLoading, " 1.4s ease infinite;}}}.k-skeleton-items{.", kls('item'), ":first-child{.skeleton-item-text{width:33%;}}.", kls('item'), ":last-child{.skeleton-item-text{width:61%;}}}.", kls('avator-box'), "{display:flex;&>div:last-child{flex-grow:1;padding-left:20px;}}.skeleton-item-button,.skeleton-item-input{height:", theme[size].height, ";}");
|
|
23
|
+
}
|
|
24
|
+
var skeletonLoading = /*#__PURE__*/keyframes(process.env.NODE_ENV === "production" ? {
|
|
25
|
+
name: "1jmexzm",
|
|
26
|
+
styles: "0%{background-position:100% 50%;}to{background-position:0 50%;}"
|
|
27
|
+
} : {
|
|
28
|
+
name: "1jmexzm",
|
|
29
|
+
styles: "0%{background-position:100% 50%;}to{background-position:0 50%;}",
|
|
30
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
31
|
+
});
|
|
32
|
+
export function makeItemStyles() {
|
|
33
|
+
var skeletonItem = skeleton.item;
|
|
34
|
+
return /*#__PURE__*/css("&>div{background:", skeletonItem.bgColor, ";}.skeleton-item-text{width:100%;height:16px;border-radius:4px;margin-top:16px;}.skeleton-item-avator{width:40px;height:40px;border-radius:50%;}.skeleton-item-image{display:flex;justify-content:center;align-items:center;width:200px;height:200px;&>svg{width:48px;height:48px;fill:", skeletonItem.bgColor, ";}}.skeleton-item-button{width:64px;background:", skeletonItem.bgColor, ";}.skeleton-item-input{width:160px;background:", skeletonItem.bgColor, ";}");
|
|
35
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const context: {
|
|
2
|
-
Provider: import("
|
|
3
|
-
Consumer: import("
|
|
2
|
+
Provider: import("vdt").ComponentConstructor<import("intact").Component<import("../context").ProviderProps<any>, {}, {}, {}>>;
|
|
3
|
+
Consumer: import("vdt").ComponentConstructor<import("intact").Component<import("../context").ConsumerProps<any>, {}, {}, {}>>;
|
|
4
4
|
};
|
|
@@ -43,10 +43,9 @@ export function useFilter(getNodes, getExpandedKeys) {
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
function updateFilterUpward(node) {
|
|
46
|
-
if (!node) return; // should expand the node
|
|
46
|
+
if (!node || _filterInstanceProperty(node)) return; // should expand the node
|
|
47
47
|
|
|
48
48
|
getExpandedKeys().add(node.key);
|
|
49
|
-
if (_filterInstanceProperty(node)) return;
|
|
50
49
|
node.filter = true;
|
|
51
50
|
updateFilterUpward(node.parent);
|
|
52
51
|
}
|
package/es/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @king-design v2.0.
|
|
2
|
+
* @king-design v2.0.3
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Kingsoft Cloud
|
|
5
5
|
* Released under the MIT License
|
|
@@ -38,6 +38,7 @@ export * from './components/radio';
|
|
|
38
38
|
export * from './components/rate';
|
|
39
39
|
export * from './components/scrollSelect';
|
|
40
40
|
export * from './components/select';
|
|
41
|
+
export * from './components/skeleton';
|
|
41
42
|
export * from './components/slider';
|
|
42
43
|
export * from './components/spin';
|
|
43
44
|
export * from './components/spinner';
|
|
@@ -56,4 +57,4 @@ export * from './components/tree';
|
|
|
56
57
|
export * from './components/treeSelect';
|
|
57
58
|
export * from './components/upload';
|
|
58
59
|
export * from './components/wave';
|
|
59
|
-
export declare const version = "2.0.
|
|
60
|
+
export declare const version = "2.0.3";
|
package/es/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @king-design v2.0.
|
|
2
|
+
* @king-design v2.0.3
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Kingsoft Cloud
|
|
5
5
|
* Released under the MIT License
|
|
@@ -40,6 +40,7 @@ export * from './components/radio';
|
|
|
40
40
|
export * from './components/rate';
|
|
41
41
|
export * from './components/scrollSelect';
|
|
42
42
|
export * from './components/select';
|
|
43
|
+
export * from './components/skeleton';
|
|
43
44
|
export * from './components/slider';
|
|
44
45
|
export * from './components/spin';
|
|
45
46
|
export * from './components/spinner';
|
|
@@ -58,5 +59,5 @@ export * from './components/tree';
|
|
|
58
59
|
export * from './components/treeSelect';
|
|
59
60
|
export * from './components/upload';
|
|
60
61
|
export * from './components/wave';
|
|
61
|
-
export var version = '2.0.
|
|
62
|
+
export var version = '2.0.3';
|
|
62
63
|
/* generate end */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
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 { Tooltip, Form, FormItem } from '../../';
|
|
6
|
+
import { getElement, wait, dispatchEvent } from '../../../../test/utils';
|
|
7
|
+
describe('Form', function () {
|
|
8
|
+
it('should show Tooltip in append slot', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
9
|
+
var click, container, trigger;
|
|
10
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
11
|
+
while (1) {
|
|
12
|
+
switch (_context.prev = _context.next) {
|
|
13
|
+
case 0:
|
|
14
|
+
click = sinon.spy(function () {
|
|
15
|
+
return console.log(1);
|
|
16
|
+
});
|
|
17
|
+
container = document.createElement('div');
|
|
18
|
+
document.body.appendChild(container);
|
|
19
|
+
ReactDOM.render( /*#__PURE__*/React.createElement(Form, null, /*#__PURE__*/React.createElement(FormItem, {
|
|
20
|
+
label: "\u6D4B\u8BD5",
|
|
21
|
+
value: "1",
|
|
22
|
+
slotAppend: /*#__PURE__*/React.createElement(Tooltip, {
|
|
23
|
+
content: "\u6D4B\u8BD5"
|
|
24
|
+
}, /*#__PURE__*/React.createElement("i", {
|
|
25
|
+
className: "k-icon ion-ionic"
|
|
26
|
+
}))
|
|
27
|
+
})), container);
|
|
28
|
+
trigger = container.querySelector('.k-icon');
|
|
29
|
+
expect(trigger).to.be.exist;
|
|
30
|
+
dispatchEvent(trigger, 'mouseover');
|
|
31
|
+
_context.next = 9;
|
|
32
|
+
return wait();
|
|
33
|
+
|
|
34
|
+
case 9:
|
|
35
|
+
expect(getElement('.k-tooltip-content')).to.be.exist;
|
|
36
|
+
ReactDOM.unmountComponentAtNode(container);
|
|
37
|
+
document.body.removeChild(container);
|
|
38
|
+
|
|
39
|
+
case 12:
|
|
40
|
+
case "end":
|
|
41
|
+
return _context.stop();
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}, _callee);
|
|
45
|
+
})));
|
|
46
|
+
});
|
|
@@ -3,7 +3,7 @@ import { MenuProps } from '@king-design/react';
|
|
|
3
3
|
interface Props extends MenuProps {
|
|
4
4
|
}
|
|
5
5
|
export default class Demo extends React.Component<{}, Props> {
|
|
6
|
-
state: MenuProps<import("
|
|
6
|
+
state: MenuProps<import("vdt").Key>;
|
|
7
7
|
private __test;
|
|
8
8
|
setTheme(theme?: string): void;
|
|
9
9
|
render(): JSX.Element;
|
|
@@ -2,6 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import './index.styl';
|
|
3
3
|
import type { MenuProps } from '@king-design/react';
|
|
4
4
|
export default class Demo extends React.Component {
|
|
5
|
-
state: MenuProps<import("
|
|
5
|
+
state: MenuProps<import("vdt").Key>;
|
|
6
6
|
render(): JSX.Element;
|
|
7
7
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { default as data } from './index.json';
|
|
2
|
+
import { Component } from 'intact';
|
|
3
|
+
interface Props {
|
|
4
|
+
showSkeleton?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export default class extends Component<Props> {
|
|
7
|
+
static template: string | import("intact").Template<any>;
|
|
8
|
+
static defaults(): {
|
|
9
|
+
showSkeleton: boolean;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
export { default as data } from './index.json';
|
|
3
|
+
import { Component } from 'intact';
|
|
4
|
+
import template from './index.vdt';
|
|
5
|
+
|
|
6
|
+
var default_1 = /*#__PURE__*/function (_Component) {
|
|
7
|
+
_inheritsLoose(default_1, _Component);
|
|
8
|
+
|
|
9
|
+
function default_1() {
|
|
10
|
+
return _Component.apply(this, arguments) || this;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
default_1.defaults = function defaults() {
|
|
14
|
+
return {
|
|
15
|
+
showSkeleton: true
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
return default_1;
|
|
20
|
+
}(Component);
|
|
21
|
+
|
|
22
|
+
default_1.template = template;
|
|
23
|
+
export { default_1 as default };
|
|
@@ -0,0 +1,38 @@
|
|
|
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 { Skeleton } from '@king-design/react';
|
|
5
|
+
|
|
6
|
+
var Demo = /*#__PURE__*/function (_React$Component) {
|
|
7
|
+
_inheritsLoose(Demo, _React$Component);
|
|
8
|
+
|
|
9
|
+
function Demo() {
|
|
10
|
+
var _context;
|
|
11
|
+
|
|
12
|
+
var _this;
|
|
13
|
+
|
|
14
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
15
|
+
args[_key] = arguments[_key];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
_this = _React$Component.call.apply(_React$Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
|
|
19
|
+
_this.state = {
|
|
20
|
+
showSkeleton: true
|
|
21
|
+
};
|
|
22
|
+
return _this;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var _proto = Demo.prototype;
|
|
26
|
+
|
|
27
|
+
_proto.render = function render() {
|
|
28
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Skeleton, {
|
|
29
|
+
loading: this.state.showSkeleton,
|
|
30
|
+
avator: true,
|
|
31
|
+
animated: true
|
|
32
|
+
}));
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
return Demo;
|
|
36
|
+
}(React.Component);
|
|
37
|
+
|
|
38
|
+
export { Demo as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { default as data } from './index.json';
|
|
2
|
+
import { Component } from 'intact';
|
|
3
|
+
interface Props {
|
|
4
|
+
showSkeleton?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export default class extends Component<Props> {
|
|
7
|
+
static template: string | import("intact").Template<any>;
|
|
8
|
+
static defaults(): {
|
|
9
|
+
showSkeleton: boolean;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
export { default as data } from './index.json';
|
|
3
|
+
import { Component } from 'intact';
|
|
4
|
+
import template from './index.vdt';
|
|
5
|
+
|
|
6
|
+
var default_1 = /*#__PURE__*/function (_Component) {
|
|
7
|
+
_inheritsLoose(default_1, _Component);
|
|
8
|
+
|
|
9
|
+
function default_1() {
|
|
10
|
+
return _Component.apply(this, arguments) || this;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
default_1.defaults = function defaults() {
|
|
14
|
+
return {
|
|
15
|
+
showSkeleton: true
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
return default_1;
|
|
20
|
+
}(Component);
|
|
21
|
+
|
|
22
|
+
default_1.template = template;
|
|
23
|
+
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 React from 'react';
|
|
4
|
+
import { Skeleton } from '@king-design/react';
|
|
5
|
+
|
|
6
|
+
var Demo = /*#__PURE__*/function (_React$Component) {
|
|
7
|
+
_inheritsLoose(Demo, _React$Component);
|
|
8
|
+
|
|
9
|
+
function Demo() {
|
|
10
|
+
var _context;
|
|
11
|
+
|
|
12
|
+
var _this;
|
|
13
|
+
|
|
14
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
15
|
+
args[_key] = arguments[_key];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
_this = _React$Component.call.apply(_React$Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
|
|
19
|
+
_this.state = {
|
|
20
|
+
showSkeleton: true
|
|
21
|
+
};
|
|
22
|
+
return _this;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var _proto = Demo.prototype;
|
|
26
|
+
|
|
27
|
+
_proto.render = function render() {
|
|
28
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Skeleton, {
|
|
29
|
+
loading: this.state.showSkeleton,
|
|
30
|
+
avator: true
|
|
31
|
+
}));
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
return Demo;
|
|
35
|
+
}(React.Component);
|
|
36
|
+
|
|
37
|
+
export { Demo as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { default as data } from './index.json';
|
|
2
|
+
import { Component } from 'intact';
|
|
3
|
+
interface Props {
|
|
4
|
+
showSkeleton?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export default class extends Component<Props> {
|
|
7
|
+
static template: string | import("intact").Template<any>;
|
|
8
|
+
static defaults(): {
|
|
9
|
+
showSkeleton: boolean;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
export { default as data } from './index.json';
|
|
3
|
+
import { Component } from 'intact';
|
|
4
|
+
import template from './index.vdt';
|
|
5
|
+
|
|
6
|
+
var default_1 = /*#__PURE__*/function (_Component) {
|
|
7
|
+
_inheritsLoose(default_1, _Component);
|
|
8
|
+
|
|
9
|
+
function default_1() {
|
|
10
|
+
return _Component.apply(this, arguments) || this;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
default_1.defaults = function defaults() {
|
|
14
|
+
return {
|
|
15
|
+
showSkeleton: true
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
return default_1;
|
|
20
|
+
}(Component);
|
|
21
|
+
|
|
22
|
+
default_1.template = template;
|
|
23
|
+
export { default_1 as default };
|
|
@@ -0,0 +1,36 @@
|
|
|
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 { Skeleton } from '@king-design/react';
|
|
5
|
+
|
|
6
|
+
var Demo = /*#__PURE__*/function (_React$Component) {
|
|
7
|
+
_inheritsLoose(Demo, _React$Component);
|
|
8
|
+
|
|
9
|
+
function Demo() {
|
|
10
|
+
var _context;
|
|
11
|
+
|
|
12
|
+
var _this;
|
|
13
|
+
|
|
14
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
15
|
+
args[_key] = arguments[_key];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
_this = _React$Component.call.apply(_React$Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
|
|
19
|
+
_this.state = {
|
|
20
|
+
showSkeleton: true
|
|
21
|
+
};
|
|
22
|
+
return _this;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var _proto = Demo.prototype;
|
|
26
|
+
|
|
27
|
+
_proto.render = function render() {
|
|
28
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Skeleton, {
|
|
29
|
+
loading: this.state.showSkeleton
|
|
30
|
+
}));
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
return Demo;
|
|
34
|
+
}(React.Component);
|
|
35
|
+
|
|
36
|
+
export { Demo as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { default as data } from './index.json';
|
|
2
|
+
import { Component } from 'intact';
|
|
3
|
+
interface Props {
|
|
4
|
+
showSkeleton?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export default class extends Component<Props> {
|
|
7
|
+
static template: string | import("intact").Template<any>;
|
|
8
|
+
static defaults(): {
|
|
9
|
+
showSkeleton: boolean;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
export { default as data } from './index.json';
|
|
3
|
+
import { Component } from 'intact';
|
|
4
|
+
import template from './index.vdt';
|
|
5
|
+
|
|
6
|
+
var default_1 = /*#__PURE__*/function (_Component) {
|
|
7
|
+
_inheritsLoose(default_1, _Component);
|
|
8
|
+
|
|
9
|
+
function default_1() {
|
|
10
|
+
return _Component.apply(this, arguments) || this;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
default_1.defaults = function defaults() {
|
|
14
|
+
return {
|
|
15
|
+
showSkeleton: true
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
return default_1;
|
|
20
|
+
}(Component);
|
|
21
|
+
|
|
22
|
+
default_1.template = template;
|
|
23
|
+
export { default_1 as default };
|
|
@@ -0,0 +1,60 @@
|
|
|
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 { Skeleton, SkeletonItem } from '@king-design/react';
|
|
5
|
+
|
|
6
|
+
var Demo = /*#__PURE__*/function (_React$Component) {
|
|
7
|
+
_inheritsLoose(Demo, _React$Component);
|
|
8
|
+
|
|
9
|
+
function Demo() {
|
|
10
|
+
var _context;
|
|
11
|
+
|
|
12
|
+
var _this;
|
|
13
|
+
|
|
14
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
15
|
+
args[_key] = arguments[_key];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
_this = _React$Component.call.apply(_React$Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
|
|
19
|
+
_this.state = {
|
|
20
|
+
showSkeleton: true
|
|
21
|
+
};
|
|
22
|
+
return _this;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var _proto = Demo.prototype;
|
|
26
|
+
|
|
27
|
+
_proto.render = function render() {
|
|
28
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Skeleton, {
|
|
29
|
+
loading: this.state.showSkeleton,
|
|
30
|
+
avator: true,
|
|
31
|
+
animated: true
|
|
32
|
+
}, /*#__PURE__*/React.createElement(SkeletonItem, {
|
|
33
|
+
type: "image"
|
|
34
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
35
|
+
style: {
|
|
36
|
+
"display": "flex",
|
|
37
|
+
"justifyContent": "space-between",
|
|
38
|
+
"width": "200px",
|
|
39
|
+
"marginTop": "20px"
|
|
40
|
+
}
|
|
41
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(SkeletonItem, {
|
|
42
|
+
type: "button",
|
|
43
|
+
style: {
|
|
44
|
+
"height": "16px"
|
|
45
|
+
}
|
|
46
|
+
}), /*#__PURE__*/React.createElement(SkeletonItem, {
|
|
47
|
+
type: "button",
|
|
48
|
+
style: {
|
|
49
|
+
"height": "16px",
|
|
50
|
+
"marginTop": "8px"
|
|
51
|
+
}
|
|
52
|
+
})), /*#__PURE__*/React.createElement(SkeletonItem, {
|
|
53
|
+
type: "button"
|
|
54
|
+
}))));
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
return Demo;
|
|
58
|
+
}(React.Component);
|
|
59
|
+
|
|
60
|
+
export { Demo as default };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { default as data } from './index.json';
|
|
2
|
+
import { Component } from 'intact';
|
|
3
|
+
interface Props {
|
|
4
|
+
showSkeleton?: boolean;
|
|
5
|
+
rows?: number;
|
|
6
|
+
}
|
|
7
|
+
export default class extends Component<Props> {
|
|
8
|
+
static template: string | import("intact").Template<any>;
|
|
9
|
+
static defaults(): {
|
|
10
|
+
showSkeleton: boolean;
|
|
11
|
+
rows: number;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
export { default as data } from './index.json';
|
|
3
|
+
import { Component } from 'intact';
|
|
4
|
+
import template from './index.vdt';
|
|
5
|
+
|
|
6
|
+
var default_1 = /*#__PURE__*/function (_Component) {
|
|
7
|
+
_inheritsLoose(default_1, _Component);
|
|
8
|
+
|
|
9
|
+
function default_1() {
|
|
10
|
+
return _Component.apply(this, arguments) || this;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
default_1.defaults = function defaults() {
|
|
14
|
+
return {
|
|
15
|
+
showSkeleton: true,
|
|
16
|
+
rows: 4
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
return default_1;
|
|
21
|
+
}(Component);
|
|
22
|
+
|
|
23
|
+
default_1.template = template;
|
|
24
|
+
export { default_1 as default };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
showSkeleton?: boolean;
|
|
4
|
+
rows?: number;
|
|
5
|
+
}
|
|
6
|
+
export default class Demo extends React.Component<{}, Props> {
|
|
7
|
+
state: {
|
|
8
|
+
showSkeleton: boolean;
|
|
9
|
+
rows: number;
|
|
10
|
+
};
|
|
11
|
+
render(): JSX.Element;
|
|
12
|
+
}
|
|
13
|
+
export {};
|