@king-design/intact 2.0.0 → 2.0.1
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/README.md +20 -118
- package/components/datepicker/index.vdt +7 -6
- package/components/dropdown/dropdown.ts +2 -0
- package/components/tooltip/index.spec.ts +6 -1
- package/components/transfer/styles.ts +2 -8
- package/es/components/datepicker/index.vdt.js +10 -5
- package/es/components/dropdown/dropdown.js +1 -0
- package/es/components/tooltip/index.spec.js +4 -1
- package/es/components/transfer/styles.js +2 -6
- package/es/i18n/en-US.d.ts +1 -0
- package/es/i18n/en-US.js +1 -0
- package/es/index.d.ts +2 -2
- package/es/index.js +2 -2
- package/es/site/src/client.js +3 -0
- package/es/site/src/pages/index/styles.js +1 -1
- package/es/site/src/pages/layout.d.ts +1 -0
- package/es/site/src/pages/layout.js +9 -1
- package/es/site/src/pages/resource/index.js +4 -4
- package/es/site/src/pages/solution/index.js +1 -2
- package/es/site/src/pages/styles.js +2 -2
- package/i18n/en-US.ts +1 -0
- package/index.ts +2 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
|
|
3
|
-
<a href="https://
|
|
4
|
-
<img src="/site/src/imgs/
|
|
3
|
+
<a href="https://design.ksyun.com" rel="nofollow">
|
|
4
|
+
<img src="/site/src/imgs/header_logo_x2.png" alt="LOGO" />
|
|
5
5
|
</a>
|
|
6
6
|
|
|
7
7
|
<p></p>
|
|
8
8
|
|
|
9
9
|
[](https://github.com/ksc-fe/kpc/actions?query=workflow%3A%22Node.js+CI%22)
|
|
10
10
|
[](https://codecov.io/gh/ksc-fe/kpc/branch/master)
|
|
11
|
-
[](https://cdn.jsdelivr.net/npm/kpc/dist/)
|
|
11
|
+
[](https://www.npmjs.com/package/@king-design/vue)
|
|
13
12
|
|
|
14
|
-
[](https://www.npmjs.com/package/@king-design/react)
|
|
14
|
+
[](https://www.npmjs.com/package/@king-design/vue)
|
|
15
|
+
[](https://www.npmjs.com/package/@king-design/vue-legacy)
|
|
16
16
|
|
|
17
17
|
</div>
|
|
18
18
|
|
|
@@ -20,11 +20,11 @@ English | [简体中文](./README-zh_CN.md)
|
|
|
20
20
|
|
|
21
21
|
## Features
|
|
22
22
|
|
|
23
|
-
* Support multiple frameworks: [Intact][1] / [Vue][2] / [React][3]
|
|
24
|
-
*
|
|
25
|
-
*
|
|
23
|
+
* Support multiple frameworks: [Intact][1] / [Vue][2] / [React][3].
|
|
24
|
+
* Support TypeScript.
|
|
25
|
+
* Change theme on runtime.
|
|
26
26
|
* Declarative form validation.
|
|
27
|
-
* Excellent [documents](https://
|
|
27
|
+
* Excellent [documents](https://design.ksyun.com) and design
|
|
28
28
|
* 90% coverage unit tests.
|
|
29
29
|
|
|
30
30
|
## Browsers Support
|
|
@@ -38,7 +38,11 @@ English | [简体中文](./README-zh_CN.md)
|
|
|
38
38
|
### Installation
|
|
39
39
|
|
|
40
40
|
```shell
|
|
41
|
-
|
|
41
|
+
# Vue3
|
|
42
|
+
npm install @king-design/vue --save
|
|
43
|
+
|
|
44
|
+
# Vue2
|
|
45
|
+
npm install @king-desing/vue-legacy --save
|
|
42
46
|
```
|
|
43
47
|
|
|
44
48
|
### Usage
|
|
@@ -48,7 +52,7 @@ npm install kpc-vue --save
|
|
|
48
52
|
<Button>Hello</Button>
|
|
49
53
|
</template>
|
|
50
54
|
<script>
|
|
51
|
-
import {Button} from '
|
|
55
|
+
import {Button} from '@king-design/vue';
|
|
52
56
|
|
|
53
57
|
export default {
|
|
54
58
|
components: {
|
|
@@ -63,114 +67,16 @@ export default {
|
|
|
63
67
|
### Installation
|
|
64
68
|
|
|
65
69
|
```shell
|
|
66
|
-
npm install
|
|
70
|
+
npm install @king-design/react--save
|
|
67
71
|
```
|
|
68
72
|
|
|
69
73
|
### Usage
|
|
70
74
|
|
|
71
75
|
```jsx
|
|
72
|
-
import
|
|
73
|
-
import {Button} from 'kpc-react';
|
|
74
|
-
|
|
75
|
-
class App extends React.Component {
|
|
76
|
-
render() {
|
|
77
|
-
return <Button>Hello</Button>
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
## Intact
|
|
83
|
-
|
|
84
|
-
### Installation
|
|
85
|
-
|
|
86
|
-
```shell
|
|
87
|
-
npm install kpc --save
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
### Usage
|
|
91
|
-
|
|
92
|
-
```js
|
|
93
|
-
import {Button} from 'kpc';
|
|
94
|
-
|
|
95
|
-
<Button>Hello</Button>
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
## Angular
|
|
99
|
-
|
|
100
|
-
Read [more][5]
|
|
76
|
+
import {Button} from '@king-design/react';
|
|
101
77
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
```shell
|
|
105
|
-
npm install kpc-angular -S
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
### Configure `webpack.config.js`
|
|
109
|
-
|
|
110
|
-
You need use `@angular-builders/custom-webapck` to configure webpack, if your project initialized by Angular CLI.
|
|
111
|
-
|
|
112
|
-
```js
|
|
113
|
-
const path = require('path');
|
|
114
|
-
|
|
115
|
-
module.exports = function(config) {
|
|
116
|
-
config.module.rules.find(rule => {
|
|
117
|
-
if (rule.test.toString() === '/\\.css$/') {
|
|
118
|
-
rule.exclude.push(path.resolve(__dirname, 'node_modules/kpc-angular'));
|
|
119
|
-
return true;
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
|
|
123
|
-
return config;
|
|
124
|
-
};
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
### Usage
|
|
128
|
-
|
|
129
|
-
`src/app/app.module.ts`
|
|
130
|
-
|
|
131
|
-
```ts
|
|
132
|
-
import { KpcBrowserModule, KpcModule } from 'kpc-angular';
|
|
133
|
-
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
134
|
-
|
|
135
|
-
import { AppRoutingModule } from './app-routing.module';
|
|
136
|
-
import { AppComponent } from './app.component';
|
|
137
|
-
|
|
138
|
-
@NgModule({
|
|
139
|
-
declarations: [
|
|
140
|
-
AppComponent
|
|
141
|
-
],
|
|
142
|
-
imports: [
|
|
143
|
-
KpcBrowserModule,
|
|
144
|
-
AppRoutingModule,
|
|
145
|
-
KpcModule,
|
|
146
|
-
],
|
|
147
|
-
providers: [],
|
|
148
|
-
bootstrap: [AppComponent],
|
|
149
|
-
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
150
|
-
})
|
|
151
|
-
export class AppModule { }
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
```ts
|
|
155
|
-
import { Component, ViewEncapsulation } from '@angular/core';
|
|
156
|
-
import { MessageComponent } from 'kpc-angular';
|
|
157
|
-
|
|
158
|
-
@Component({
|
|
159
|
-
selector: 'app-root',
|
|
160
|
-
template: `
|
|
161
|
-
<k-button type="primary" (click)="onClick()">Hello World</k-button>
|
|
162
|
-
`,
|
|
163
|
-
style: `
|
|
164
|
-
.k-button {
|
|
165
|
-
margin: 10px;
|
|
166
|
-
}
|
|
167
|
-
`,
|
|
168
|
-
encapsulation: ViewEncapsulation.None,
|
|
169
|
-
})
|
|
170
|
-
export class AppComponent {
|
|
171
|
-
onClick() {
|
|
172
|
-
MessageComponent.success('Welcome to kpc world!');
|
|
173
|
-
}
|
|
78
|
+
function App() {
|
|
79
|
+
return <Button>Hello</Button>
|
|
174
80
|
}
|
|
175
81
|
```
|
|
176
82
|
|
|
@@ -187,10 +93,6 @@ Welcome to join us by QQ. Group Number: 529739732
|
|
|
187
93
|
|
|
188
94
|
* [KPC Document](https://design.ksyun.com)
|
|
189
95
|
* [Intact MVVM Framework][1]
|
|
190
|
-
* [Vdt Template Engine](http://javey.github.io/vdt.js/)
|
|
191
|
-
* [Intact-Vue Compatibility Layer](https://github.com/Javey/intact-vue)
|
|
192
|
-
* [Intact-React Compatibility Layer](https://github.com/ksc-fe/intact-react)
|
|
193
|
-
* [Intact-Angular Compatibility Layer](https://github.com/ksc-fe/intact-angular)
|
|
194
96
|
|
|
195
97
|
## Develop
|
|
196
98
|
|
|
@@ -76,12 +76,13 @@ const generatePanel = (flag) => {
|
|
|
76
76
|
<b:base-menu>
|
|
77
77
|
<DropdownMenu class={classNameObj}>
|
|
78
78
|
<div class="k-datepicker-shortcuts" v-if={shortcuts && shortcuts.length}>
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
79
|
+
{shortcuts.map($value => {
|
|
80
|
+
const label = isFunction($value.label) ? $value.label() : $value.label;
|
|
81
|
+
return <div class="k-datepicker-shortcut c-ellipsis"
|
|
82
|
+
title={label}
|
|
83
|
+
ev-click={linkEvent($value, this.setByShortcut)}
|
|
84
|
+
>{label}</div>
|
|
85
|
+
})}
|
|
85
86
|
</div>
|
|
86
87
|
<div class="k-datepicker-wrapper">
|
|
87
88
|
<div class="k-datepicker-calendars">
|
|
@@ -50,7 +50,12 @@ describe('Tooltip', () => {
|
|
|
50
50
|
const at = element.querySelector('.opera .k-btn') as HTMLElement;
|
|
51
51
|
const {width, height, left, top} = at.getBoundingClientRect();
|
|
52
52
|
const contains = (name: string) => expect(arrow.classList.contains(name)).to.be.true;
|
|
53
|
-
const eql = (a: number, b: number) =>
|
|
53
|
+
const eql = (a: number, b: number) => {
|
|
54
|
+
a = Math.floor(a);
|
|
55
|
+
b = Math.floor(b);
|
|
56
|
+
// Don't be entangled with the difference of 1 to 2 pixels
|
|
57
|
+
expect(a >= b - 1 && a <= b + 1).to.be.true;
|
|
58
|
+
};
|
|
54
59
|
|
|
55
60
|
|
|
56
61
|
instance.set('position', 'left');
|
|
@@ -29,8 +29,7 @@ const defaults = {
|
|
|
29
29
|
get hoverColor() { return theme.color.primary },
|
|
30
30
|
bgColor: '#fff',
|
|
31
31
|
hoverBgColor: 'transparent',
|
|
32
|
-
padding: '
|
|
33
|
-
get height() { return theme.default.height },
|
|
32
|
+
padding: '7px 16px',
|
|
34
33
|
get descColor() { return theme.color.lightBlack },
|
|
35
34
|
},
|
|
36
35
|
|
|
@@ -68,7 +67,6 @@ export function makeStyles() {
|
|
|
68
67
|
.k-checkbox {
|
|
69
68
|
color: ${transfer.title.color};
|
|
70
69
|
font-size: ${transfer.title.fontSize};
|
|
71
|
-
display: block;
|
|
72
70
|
}
|
|
73
71
|
}
|
|
74
72
|
.k-transfer-count {
|
|
@@ -84,7 +82,6 @@ export function makeStyles() {
|
|
|
84
82
|
color: ${transfer.item.color};
|
|
85
83
|
background: ${transfer.item.bgColor};
|
|
86
84
|
user-select: none;
|
|
87
|
-
display: table;
|
|
88
85
|
width: 100%;
|
|
89
86
|
&:not(.k-disabled):hover {
|
|
90
87
|
background: ${transfer.item.hoverBgColor};
|
|
@@ -95,10 +92,7 @@ export function makeStyles() {
|
|
|
95
92
|
}
|
|
96
93
|
.k-checkbox {
|
|
97
94
|
padding: ${transfer.item.padding};
|
|
98
|
-
display:
|
|
99
|
-
height: ${transfer.item.height};
|
|
100
|
-
vertical-align: middle;
|
|
101
|
-
white-space: nowrap;
|
|
95
|
+
display: flex;
|
|
102
96
|
}
|
|
103
97
|
p {
|
|
104
98
|
margin: 0;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js/instance/map";
|
|
2
|
+
import { createElementVNode as _$ce, createUnknownComponentVNode as _$cc, superCall as _$su, extend as _$ex, EMPTY_OBJ as _$em, className as _$cn, createTextVNode as _$ct } from 'intact';
|
|
2
3
|
import { linkEvent } from 'intact';
|
|
3
4
|
import { DropdownMenu } from '../dropdown';
|
|
4
5
|
import { DatepickerCalendar } from './calendar';
|
|
@@ -102,13 +103,17 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
102
103
|
__$blocks = _$ex({}, $blocks);
|
|
103
104
|
|
|
104
105
|
return (_$blocks['base-menu'] = function ($super) {
|
|
106
|
+
var _this2 = this;
|
|
107
|
+
|
|
105
108
|
return _$cc(DropdownMenu, {
|
|
106
109
|
'className': _$cn(classNameObj),
|
|
107
|
-
'children': [shortcuts && shortcuts.length ? _$ce(2, 'div',
|
|
108
|
-
|
|
109
|
-
|
|
110
|
+
'children': [shortcuts && shortcuts.length ? _$ce(2, 'div', _mapInstanceProperty(shortcuts).call(shortcuts, function ($value) {
|
|
111
|
+
var label = isFunction($value.label) ? $value.label() : $value.label;
|
|
112
|
+
return _$ce(2, 'div', label, 0, 'k-datepicker-shortcut c-ellipsis', {
|
|
113
|
+
'title': label,
|
|
114
|
+
'ev-click': linkEvent($value, _this2.setByShortcut)
|
|
110
115
|
});
|
|
111
|
-
}
|
|
116
|
+
}), 0, 'k-datepicker-shortcuts') : undefined, _$ce(2, 'div', [_$ce(2, 'div', [generatePanel(PanelFlags.Start), _$ct('\n '), range ? generatePanel(PanelFlags.End) : null], 0, 'k-datepicker-calendars'), type === 'datetime' ? _$ce(2, 'div', _$cc(Button, {
|
|
112
117
|
'type': 'primary',
|
|
113
118
|
'size': 'small',
|
|
114
119
|
'disabled': isDisabledConfirm(),
|
|
@@ -83,7 +83,10 @@ describe('Tooltip', function () {
|
|
|
83
83
|
};
|
|
84
84
|
|
|
85
85
|
eql = function eql(a, b) {
|
|
86
|
-
|
|
86
|
+
a = Math.floor(a);
|
|
87
|
+
b = Math.floor(b); // Don't be entangled with the difference of 1 to 2 pixels
|
|
88
|
+
|
|
89
|
+
expect(a >= b - 1 && a <= b + 1).to.be.true;
|
|
87
90
|
};
|
|
88
91
|
|
|
89
92
|
instance.set('position', 'left');
|
|
@@ -45,11 +45,7 @@ var defaults = {
|
|
|
45
45
|
|
|
46
46
|
bgColor: '#fff',
|
|
47
47
|
hoverBgColor: 'transparent',
|
|
48
|
-
padding: '
|
|
49
|
-
|
|
50
|
-
get height() {
|
|
51
|
-
return theme.default.height;
|
|
52
|
-
},
|
|
48
|
+
padding: '7px 16px',
|
|
53
49
|
|
|
54
50
|
get descColor() {
|
|
55
51
|
return theme.color.lightBlack;
|
|
@@ -67,5 +63,5 @@ setDefault(function () {
|
|
|
67
63
|
}).transfer;
|
|
68
64
|
});
|
|
69
65
|
export function makeStyles() {
|
|
70
|
-
return /*#__PURE__*/css("font-size:", transfer.fontSize, ";.k-transfer-panel,.k-transfer-arrows{display:inline-block;vertical-align:middle;}.k-transfer-panel{width:", transfer.panel.width, ";border:", transfer.panel.border, ";border-radius:", transfer.panel.borderRadius, ";height:", transfer.panel.height, ";display:inline-flex;flex-direction:column;}.k-transfer-title{line-height:", transfer.title.lineHeight, ";background:", transfer.title.bgColor, ";padding:", transfer.title.padding, ";.k-checkbox{color:", transfer.title.color, ";font-size:", transfer.title.fontSize, ";
|
|
66
|
+
return /*#__PURE__*/css("font-size:", transfer.fontSize, ";.k-transfer-panel,.k-transfer-arrows{display:inline-block;vertical-align:middle;}.k-transfer-panel{width:", transfer.panel.width, ";border:", transfer.panel.border, ";border-radius:", transfer.panel.borderRadius, ";height:", transfer.panel.height, ";display:inline-flex;flex-direction:column;}.k-transfer-title{line-height:", transfer.title.lineHeight, ";background:", transfer.title.bgColor, ";padding:", transfer.title.padding, ";.k-checkbox{color:", transfer.title.color, ";font-size:", transfer.title.fontSize, ";}}.k-transfer-count{float:right;margin-left:", transfer.title.countGap, ";}.k-transfer-list{overflow:auto;position:relative;flex:1;}.k-transfer-item{color:", transfer.item.color, ";background:", transfer.item.bgColor, ";user-select:none;width:100%;&:not(.k-disabled):hover{background:", transfer.item.hoverBgColor, ";color:", transfer.item.hoverColor, ";p{color:", transfer.item.hoverColor, ";}}.k-checkbox{padding:", transfer.item.padding, ";display:flex;}p{margin:0;color:", transfer.item.descColor, ";}&.k-disabled{p{color:", theme.color.disabled, ";}}}.k-input{width:auto;margin:", transfer.searchGap, ";}.k-transfer-arrows{.k-btn{display:flex;margin:", transfer.arrow.gap, ";}}");
|
|
71
67
|
}
|
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 v2.0.
|
|
2
|
+
* @king-design v2.0.1
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Kingsoft Cloud
|
|
5
5
|
* Released under the MIT License
|
|
@@ -56,4 +56,4 @@ export * from './components/tree';
|
|
|
56
56
|
export * from './components/treeSelect';
|
|
57
57
|
export * from './components/upload';
|
|
58
58
|
export * from './components/wave';
|
|
59
|
-
export declare const version = "2.0.
|
|
59
|
+
export declare const version = "2.0.1";
|
package/es/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @king-design v2.0.
|
|
2
|
+
* @king-design v2.0.1
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Kingsoft Cloud
|
|
5
5
|
* Released under the MIT License
|
|
@@ -58,5 +58,5 @@ export * from './components/tree';
|
|
|
58
58
|
export * from './components/treeSelect';
|
|
59
59
|
export * from './components/upload';
|
|
60
60
|
export * from './components/wave';
|
|
61
|
-
export var version = '2.0.
|
|
61
|
+
export var version = '2.0.1';
|
|
62
62
|
/* generate end */
|
package/es/site/src/client.js
CHANGED
|
@@ -3,6 +3,9 @@ import _regeneratorRuntime from "@babel/runtime-corejs3/regenerator";
|
|
|
3
3
|
import router from './router';
|
|
4
4
|
import { render, createVNode as h } from 'intact';
|
|
5
5
|
import { history } from './history';
|
|
6
|
+
import { localize } from 'kpc';
|
|
7
|
+
import i18n from 'kpc/i18n/en-US';
|
|
8
|
+
localize(i18n);
|
|
6
9
|
var container = document.getElementById('page');
|
|
7
10
|
var unlisten;
|
|
8
11
|
|
|
@@ -2,5 +2,5 @@ import { css } from '@emotion/css';
|
|
|
2
2
|
import global from '../../styles/default';
|
|
3
3
|
import banner from '../../imgs/banner.jpg';
|
|
4
4
|
export function makeStyles() {
|
|
5
|
-
return /*#__PURE__*/css("font-family:", global.fontFamily, ";.nav{height:460px;position:relative;margin-top:-64px;.nav-bg,.nav-content-box{width:100%;height:100%;position:absolute;left:0;top:0;}.nav-bg{z-index:1;background-image:url(", banner, ");background-repeat:no-repeat;background-size:1920px 460px;}.nav-video-box{width:100%;height:100%;overflow:hidden;position:absolute;left:0;top:0;.nav-video-bg{width:1920px;height:460px;}}.nav-content-box{z-index:10;background:linear-gradient(270deg, rgba(248,252,255,0) 32%, rgba(244,249,255,0.96) 73%);display:flex;align-items:center;justify-content:center;padding-left:20px;}.nav-content{width:", global.contentWidth, "px;color:#000000;height:100%;position:relative;&>div{position:absolute;}&>div:first-child{font-size:45px;font-weight:500;top:164px;}&>div:nth-child(2){font-size:22px;top:237px;}&>div:nth-child(3){top:340px;.k-btn{margin-right:16px;}}}}@media (max-width: 768px){.nav{.nav-content{width:100%;&>div:first-child{font-size:34px;}&>div:nth-child(2){width:300px;background-size:contain;background-position:center;font-size:16px;}}}}");
|
|
5
|
+
return /*#__PURE__*/css("font-family:", global.fontFamily, ";.nav{height:460px;position:relative;margin-top:-64px;.nav-bg,.nav-content-box{width:100%;height:100%;position:absolute;left:0;top:0;}.nav-bg{z-index:1;background-image:url(", banner, ");background-repeat:no-repeat;background-size:1920px 460px;}.nav-video-box{width:100%;height:100%;overflow:hidden;position:absolute;left:0;top:0;.nav-video-bg{width:1920px;height:460px;}}.nav-content-box{z-index:10;background:linear-gradient(270deg, rgba(248,252,255,0) 32%, rgba(244,249,255,0.96) 73%);display:flex;align-items:center;justify-content:center;padding-left:20px;}.nav-content{width:", global.contentWidth, "px;color:#000000;height:100%;position:relative;&>div{position:absolute;}&>div:first-child{font-size:45px;font-weight:500;top:164px;}&>div:nth-child(2){font-size:22px;top:237px;}&>div:nth-child(3){top:340px;.k-btn{margin-right:16px;}}}}@media (max-width: 768px){.nav{.nav-content{width:100%;&>div:first-child{font-size:34px;}&>div:nth-child(2){width:300px;background-size:contain;background-position:center;font-size:16px;}}.nav-video-box{&,& video{display:none;}}}}");
|
|
6
6
|
}
|
|
@@ -59,6 +59,12 @@ var Layout = /*#__PURE__*/function (_Component) {
|
|
|
59
59
|
this.set('curLang', langType);
|
|
60
60
|
};
|
|
61
61
|
|
|
62
|
+
_proto.onChangeVersion = function onChangeVersion(version) {
|
|
63
|
+
if (version === 'v1') {
|
|
64
|
+
location.href = '/v1/';
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
|
|
62
68
|
return Layout;
|
|
63
69
|
}(Component);
|
|
64
70
|
|
|
@@ -79,4 +85,6 @@ export { Layout as default };
|
|
|
79
85
|
|
|
80
86
|
__decorate([bind], Layout.prototype, "showColorList", null);
|
|
81
87
|
|
|
82
|
-
__decorate([bind], Layout.prototype, "hideColorList", null);
|
|
88
|
+
__decorate([bind], Layout.prototype, "hideColorList", null);
|
|
89
|
+
|
|
90
|
+
__decorate([bind], Layout.prototype, "onChangeVersion", null);
|
|
@@ -4,16 +4,16 @@ import template from './index.vdt';
|
|
|
4
4
|
import Layout from '../layout';
|
|
5
5
|
import { Link } from '../../components/link';
|
|
6
6
|
export var getAxure = function getAxure() {
|
|
7
|
-
|
|
7
|
+
location.href = 'https://damife.ks3-cn-beijing.ksyuncs.com/kpc/KingDesign-Axure.zip';
|
|
8
8
|
};
|
|
9
9
|
export var getSketch = function getSketch() {
|
|
10
|
-
|
|
10
|
+
location.href = 'https://damife.ks3-cn-beijing.ksyuncs.com/kpc/KingDesign-Sketch.zip';
|
|
11
11
|
};
|
|
12
12
|
export var getFigma = function getFigma() {
|
|
13
|
-
|
|
13
|
+
window.open('https://www.figma.com/file/Uo5AKEmBXT4HOD41CDWliK/King-Design-V1.0.0?node-id=0%3A1');
|
|
14
14
|
};
|
|
15
15
|
export var getWeights = function getWeights() {
|
|
16
|
-
|
|
16
|
+
location.href = 'https://damife.ks3-cn-beijing.ksyuncs.com/kpc/度量工具.xlsx';
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
var Index = /*#__PURE__*/function (_Layout) {
|
|
@@ -2,7 +2,6 @@ import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
|
2
2
|
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
3
3
|
import template from './index.vdt';
|
|
4
4
|
import Layout from '../layout';
|
|
5
|
-
import { Link } from '../../components/link';
|
|
6
5
|
|
|
7
6
|
var Index = /*#__PURE__*/function (_Layout) {
|
|
8
7
|
_inheritsLoose(Index, _Layout);
|
|
@@ -30,7 +29,7 @@ var Index = /*#__PURE__*/function (_Layout) {
|
|
|
30
29
|
};
|
|
31
30
|
|
|
32
31
|
_proto.downloadSketch = function downloadSketch(info) {
|
|
33
|
-
|
|
32
|
+
location.href = "https://damife.ks3-cn-beijing.ksyuncs.com/kpc/" + info.downloadFileName;
|
|
34
33
|
};
|
|
35
34
|
|
|
36
35
|
return Index;
|
|
@@ -4,8 +4,8 @@ import headerLogo2x from '../imgs/header_logo_x2.png';
|
|
|
4
4
|
import { center } from '../styles/default';
|
|
5
5
|
import { theme } from 'kpc/styles/theme';
|
|
6
6
|
export function makeHeaderStyles() {
|
|
7
|
-
return /*#__PURE__*/css("&.k-layout-header{background:rgba(255, 255, 255, 0.65);box-shadow:0px 1px 4px 0px rgba(11, 11, 11, 0.2);color:#000;backdrop-filter:blur(20px);-moz-backdrop-filter:blur(20px);justify-content:space-between;.logo{background-image:url(", headerLogo, ");width:182px;height:40px;background-size:cover;margin-left:22px;cursor:pointer;}@media screen and (-webkit-min-device-pixel-ratio: 2){.logo{background-image:url(", headerLogo2x, ");}}.k-tabs{border:none;display:flex;align-items:center;}.k-tab{a{color:inherit;&:before{content:'';position:absolute;inset:0;}}}.lang-wrapper{height:100%;display:flex;align-items:center;}.lang-box{display:flex;background:#DFEAF2;border-radius:2px;padding:4px;&>div{color:#090909;width:66px;height:24px;border-radius:2px;line-height:24px;text-align:center;}&>div.active{background:#FFFFFF;color:#0191EA;}}.main{height:100%;display:flex;align-items:center;.k-tabs{margin-right:40px;.k-tab{color:#000000;}}.theme-color-box{font-size:14px;position:relative;
|
|
7
|
+
return /*#__PURE__*/css("&.k-layout-header{background:rgba(255, 255, 255, 0.65);box-shadow:0px 1px 4px 0px rgba(11, 11, 11, 0.2);color:#000;backdrop-filter:blur(20px);-moz-backdrop-filter:blur(20px);justify-content:space-between;.logo{background-image:url(", headerLogo, ");width:182px;height:40px;background-size:cover;margin-left:22px;cursor:pointer;}@media screen and (-webkit-min-device-pixel-ratio: 2){.logo{background-image:url(", headerLogo2x, ");}}.k-tabs{border:none;display:flex;align-items:center;}.k-tab{a{color:inherit;&:before{content:'';position:absolute;inset:0;}}}.k-select.versions{background:transparent;}.lang-wrapper{height:100%;display:flex;align-items:center;}.lang-box{display:flex;background:#DFEAF2;border-radius:2px;padding:4px;&>div{color:#090909;width:66px;height:24px;border-radius:2px;line-height:24px;text-align:center;}&>div.active{background:#FFFFFF;color:#0191EA;}}.main{height:100%;display:flex;align-items:center;.k-tabs{margin-right:40px;.k-tab{color:#000000;}}.theme-color-box{font-size:14px;position:relative;height:100%;display:flex;align-items:center;padding:0 16px;white-space:nowrap;&:hover{background:#ffffff;&>div:first-child{background:#ffffff;}}&>div:first-child{display:flex;align-items:center;height:100%;padding-right:10px;}.cur-color{height:100%;", center(), ";flex-grow:1;}.theme-color-option{width:100%;position:absolute;left:0;top:65px;background:#ffffff;box-shadow:0px 4px 20px rgba(108, 103, 103, 0.25);border-radius:4px;overflow:hidden;&>div{height:62px;", center(), ";}&>div:hover{background:#F8F8F8;}}.color-item{", center(), ";cursor:pointer;width:34px;height:34px;border-radius:50%;color:#ffffff;border:4px solid #FFFFFF;box-shadow:0px 4px 20px rgba(108, 103, 103, 0.25);box-sizing:border-box;}.color-item:hover{box-shadow:0 0 16px rgba(0, 0, 0, .1);}}}.menu-btn{display:none;margin-right:20px;}@media (max-width: 768px){.logo{width:50px;}.k-tabs{display:none;}.menu-btn{display:block;}.nav-menu-list{width:100%;.active{color:", theme.color.primary, ";}}}}");
|
|
8
8
|
}
|
|
9
9
|
export function makeLayoutStyles() {
|
|
10
|
-
return /*#__PURE__*/css("a,a code{color:", theme.color.link, ";text-decoration:none;&:hover{color:", theme.color.linkHover, ";}}");
|
|
10
|
+
return /*#__PURE__*/css("min-width:1240px;a,a code{color:", theme.color.link, ";text-decoration:none;&:hover{color:", theme.color.linkHover, ";}}@media (max-width: 768px){min-width:auto;}");
|
|
11
11
|
}
|
package/i18n/en-US.ts
CHANGED
package/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @king-design v2.0.
|
|
2
|
+
* @king-design v2.0.1
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Kingsoft Cloud
|
|
5
5
|
* Released under the MIT License
|
|
@@ -61,6 +61,6 @@ export * from './components/treeSelect';
|
|
|
61
61
|
export * from './components/upload';
|
|
62
62
|
export * from './components/wave';
|
|
63
63
|
|
|
64
|
-
export const version = '2.0.
|
|
64
|
+
export const version = '2.0.1';
|
|
65
65
|
|
|
66
66
|
/* 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.1",
|
|
4
4
|
"description": "A component library written in Intact for Intact, Vue, React and Angular",
|
|
5
5
|
"main": "es/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
"highlight.js": "^10.4.1",
|
|
114
114
|
"history": "^5.0.0",
|
|
115
115
|
"html-webpack-plugin": "5.3.1",
|
|
116
|
-
"intact-react": "^3.0.
|
|
116
|
+
"intact-react": "^3.0.1",
|
|
117
117
|
"istanbul-instrumenter-loader": "^3.0.0",
|
|
118
118
|
"js-yaml": "^4.1.0",
|
|
119
119
|
"karma": "^6.3.2",
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
"dayjs": "^1.10.7",
|
|
176
176
|
"downloadjs": "^1.4.7",
|
|
177
177
|
"enquire.js": "^2.1.6",
|
|
178
|
-
"intact": "^3.0.
|
|
178
|
+
"intact": "^3.0.1",
|
|
179
179
|
"monaco-editor": "^0.26.1",
|
|
180
180
|
"mxgraphx": "^4.0.7",
|
|
181
181
|
"resize-observer-polyfill": "^1.5.1",
|