@king-design/react 3.1.6 → 3.2.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/__tests__/__snapshots__/React Demos.md +22 -16
- package/components/config/index.spec.js +22 -14
- package/components/layout/aside.vdt.js +1 -1
- package/components/layout/styles.js +2 -17
- package/components/menu/index.d.ts +1 -0
- package/components/menu/index.js +2 -1
- package/components/menu/index.spec.js +59 -28
- package/components/menu/item.vdt.js +3 -3
- package/components/menu/menu.d.ts +2 -0
- package/components/menu/menu.js +12 -1
- package/components/menu/menu.vdt.js +9 -4
- package/components/menu/styles.d.ts +15 -12
- package/components/menu/styles.js +38 -38
- package/components/menu/title.d.ts +7 -0
- package/components/menu/title.js +22 -0
- package/components/menu/title.vdt.js +25 -0
- package/components/radio/styles.js +1 -1
- package/components/select/index.spec.js +1 -1
- package/components/select/option.vdt.js +1 -0
- package/components/select/select.js +4 -1
- package/components/table/column.vdt.js +6 -6
- package/components/table/useSortable.d.ts +7 -3
- package/components/table/useSortable.js +5 -1
- package/index.d.ts +2 -2
- package/index.js +2 -2
- package/package.json +2 -2
- package/styles/theme.js +1 -2
- package/yarn-error.log +38 -38
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
2
|
+
import { createVNode as _$cv, className as _$cn, createElementVNode as _$ce } from 'intact-react';
|
|
3
|
+
import { Icon } from '../icon';
|
|
4
|
+
import { getRestProps, findChildren, isComponentVNode } from '../utils';
|
|
5
|
+
import { makeTitleStyles } from './styles';
|
|
6
|
+
export default function ($props, $blocks, $__proto__) {
|
|
7
|
+
var _classNameObj, _$cn2;
|
|
8
|
+
$blocks || ($blocks = {});
|
|
9
|
+
$props || ($props = {});
|
|
10
|
+
var $this = this;
|
|
11
|
+
var rootMenu = this.rootMenu;
|
|
12
|
+
var _rootMenu$get = rootMenu.get(),
|
|
13
|
+
collapse = _rootMenu$get.collapse;
|
|
14
|
+
var _this$get = this.get(),
|
|
15
|
+
children = _this$get.children,
|
|
16
|
+
className = _this$get.className;
|
|
17
|
+
var k = this.config.k;
|
|
18
|
+
var classNameObj = (_classNameObj = {}, _classNameObj[k + "-menu-title"] = true, _classNameObj[className] = className, _classNameObj);
|
|
19
|
+
return _$cv('div', _extends({
|
|
20
|
+
'className': _$cn(classNameObj)
|
|
21
|
+
}, getRestProps(this)), _$ce(2, 'div', !collapse ? _$ce(2, 'span', children, 0) : findChildren(children, function (vNode) {
|
|
22
|
+
return isComponentVNode(vNode, Icon);
|
|
23
|
+
}), 0, _$cn((_$cn2 = {}, _$cn2[k + "-menu-name"] = true, _$cn2[makeTitleStyles(k)] = true, _$cn2))));
|
|
24
|
+
}
|
|
25
|
+
;
|
|
@@ -409,7 +409,7 @@ describe('Select', function () {
|
|
|
409
409
|
_context12.next = 12;
|
|
410
410
|
return wait();
|
|
411
411
|
case 12:
|
|
412
|
-
expect(instance.get('days')).have.length(
|
|
412
|
+
expect(instance.get('days')).have.length(6);
|
|
413
413
|
// unselect all
|
|
414
414
|
select.click();
|
|
415
415
|
_context12.next = 16;
|
|
@@ -58,7 +58,10 @@ export var Select = /*#__PURE__*/function (_BaseSelect) {
|
|
|
58
58
|
var loop = function loop(children) {
|
|
59
59
|
eachChildren(children, function (vNode) {
|
|
60
60
|
if (isComponentVNode(vNode, Option)) {
|
|
61
|
-
|
|
61
|
+
var props = vNode.props;
|
|
62
|
+
if (!props.disabled) {
|
|
63
|
+
values.push(props.value);
|
|
64
|
+
}
|
|
62
65
|
} else if (isComponentVNode(vNode, OptionGroup)) {
|
|
63
66
|
loop(vNode.props.children);
|
|
64
67
|
}
|
|
@@ -16,6 +16,7 @@ import { context as FixedColumnsContext } from './useFixedColumns';
|
|
|
16
16
|
import { stopPropagation } from '../utils';
|
|
17
17
|
import { Input } from '../input';
|
|
18
18
|
import { _$ } from '../../i18n';
|
|
19
|
+
import { ignoreSortable } from './useSortable';
|
|
19
20
|
export default function ($props, $blocks, $__proto__) {
|
|
20
21
|
var _this = this;
|
|
21
22
|
$blocks || ($blocks = {});
|
|
@@ -73,7 +74,8 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
73
74
|
'ev-mousedown': function evMousedown(e) {
|
|
74
75
|
e._vNode = _this.$vNode;
|
|
75
76
|
onStart(e);
|
|
76
|
-
}
|
|
77
|
+
},
|
|
78
|
+
'ev-click': ignoreSortable
|
|
77
79
|
}) : undefined, _$ce(2, 'div', [_$ce(2, 'div', (_$blocks['title'] = function ($super) {
|
|
78
80
|
return title;
|
|
79
81
|
}, __$blocks['title'] = function ($super, data) {
|
|
@@ -96,9 +98,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
96
98
|
'ref': dropdownRef,
|
|
97
99
|
'children': [_$cc(Icon, {
|
|
98
100
|
'className': _$cn(k + "-icon-down-squared " + k + "-table-group"),
|
|
99
|
-
'ev-click':
|
|
100
|
-
return e._ignoreSortable = true;
|
|
101
|
-
},
|
|
101
|
+
'ev-click': ignoreSortable,
|
|
102
102
|
'hoverable': true,
|
|
103
103
|
'color': isEmptyValue(groupValue) ? null : 'primary'
|
|
104
104
|
}), _$cc(DropdownMenu, {
|
|
@@ -161,10 +161,10 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
161
161
|
})], 4, _$cn(k + "-table-group-footer")) : undefined]
|
|
162
162
|
})]
|
|
163
163
|
}, 'dropdown', dropdownRef) : undefined, sortable ? _$ce(2, 'div', [_$cc(Icon, {
|
|
164
|
-
'className': _$cn(k + "-icon-up " + k + "-asc"),
|
|
164
|
+
'className': _$cn(k + "-icon-up-bold " + k + "-asc"),
|
|
165
165
|
'size': 'mini'
|
|
166
166
|
}), _$cc(Icon, {
|
|
167
|
-
'className': _$cn(k + "-icon-down " + k + "-desc"),
|
|
167
|
+
'className': _$cn(k + "-icon-down-bold " + k + "-desc"),
|
|
168
168
|
'size': 'mini'
|
|
169
169
|
})], 4, _$cn((_$cn4 = {}, _$cn4[k + "-column-sort"] = true, _$cn4[k + "-" + type] = type, _$cn4))) : undefined], 0, _$cn(k + "-table-title"))], 0, _$cn(classNameObj), {
|
|
170
170
|
'style': style,
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
+
type SortEvent = Event & {
|
|
2
|
+
_ignoreSortable?: boolean;
|
|
3
|
+
};
|
|
1
4
|
export declare const context: {
|
|
2
5
|
Provider: import('intact-react').ComponentConstructor<import('intact-react').Component<import("../context").ProviderProps<any>, {}, {}, {}>>;
|
|
3
6
|
Consumer: import('intact-react').ComponentConstructor<import('intact-react').Component<import("../context").ConsumerProps<any>, {}, {}, {}>>;
|
|
4
7
|
useContext: () => import('intact-react').RefObject<any>;
|
|
5
8
|
};
|
|
6
9
|
export declare function useSortable(): {
|
|
7
|
-
onChange: (key: string, event:
|
|
8
|
-
|
|
9
|
-
}) => void;
|
|
10
|
+
onChange: (key: string, event: SortEvent) => void;
|
|
11
|
+
ignoreSortable: typeof ignoreSortable;
|
|
10
12
|
};
|
|
13
|
+
export declare function ignoreSortable(e: SortEvent): void;
|
|
14
|
+
export {};
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @king-design v3.1
|
|
2
|
+
* @king-design v3.2.1
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Kingsoft Cloud
|
|
5
5
|
* Released under the MIT License
|
|
@@ -60,7 +60,7 @@ export * from './components/tree';
|
|
|
60
60
|
export * from './components/treeSelect';
|
|
61
61
|
export * from './components/upload';
|
|
62
62
|
export * from './components/wave';
|
|
63
|
-
export declare const version = "3.1
|
|
63
|
+
export declare const version = "3.2.1";
|
|
64
64
|
|
|
65
65
|
|
|
66
66
|
export {normalize} from 'intact-react';
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @king-design v3.1
|
|
2
|
+
* @king-design v3.2.1
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Kingsoft Cloud
|
|
5
5
|
* Released under the MIT License
|
|
@@ -61,7 +61,7 @@ export * from './components/tree';
|
|
|
61
61
|
export * from './components/treeSelect';
|
|
62
62
|
export * from './components/upload';
|
|
63
63
|
export * from './components/wave';
|
|
64
|
-
export var version = '3.1
|
|
64
|
+
export var version = '3.2.1';
|
|
65
65
|
/* generate end */
|
|
66
66
|
|
|
67
67
|
export {normalize} from 'intact-react';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@king-design/react",
|
|
3
|
-
"version": "3.1
|
|
3
|
+
"version": "3.2.1",
|
|
4
4
|
"description": "King-Design UI components for React.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"component",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@emotion/css": "^11.5.0",
|
|
37
37
|
"dayjs": "^1.10.7",
|
|
38
38
|
"enquire.js": "^2.1.6",
|
|
39
|
-
"intact-react": "3.0.
|
|
39
|
+
"intact-react": "3.0.31",
|
|
40
40
|
"monaco-editor": "^0.26.1",
|
|
41
41
|
"mxgraphx": "^4.0.7",
|
|
42
42
|
"resize-observer-polyfill": "^1.5.1",
|
package/styles/theme.js
CHANGED
|
@@ -32,7 +32,7 @@ export function defaultTheme() {
|
|
|
32
32
|
info: '#0091ea',
|
|
33
33
|
bg: '#f3f5f6',
|
|
34
34
|
title: '#151b1e',
|
|
35
|
-
darkBorder: '#
|
|
35
|
+
darkBorder: '#2f2f36',
|
|
36
36
|
placeholder: '#bec3c5',
|
|
37
37
|
get link() {
|
|
38
38
|
return theme.color.primary;
|
|
@@ -41,7 +41,6 @@ export function defaultTheme() {
|
|
|
41
41
|
return palette(theme.color.primary, -1);
|
|
42
42
|
},
|
|
43
43
|
hoverBg: '#f3f5f6',
|
|
44
|
-
// get hoverBg() { return palette(theme.color.primary, -4) },
|
|
45
44
|
disabled: '#bec3c5',
|
|
46
45
|
disabledBg: '#f0f2f4',
|
|
47
46
|
disabledBorder: '#d0d5d9',
|
package/yarn-error.log
CHANGED
|
@@ -2,7 +2,7 @@ Arguments:
|
|
|
2
2
|
/home/javey/.nvm/versions/node/v14.21.3/bin/node /usr/share/yarn/bin/yarn.js --registry=https://registry.npmjs.org
|
|
3
3
|
|
|
4
4
|
PATH:
|
|
5
|
-
/tmp/yarn--
|
|
5
|
+
/tmp/yarn--1708935676521-0.35192946088841937:/home/javey/Workspaces/kpc/node_modules/.bin:/home/javey/.config/yarn/link/node_modules/.bin:/home/javey/.nvm/versions/node/v14.21.3/libexec/lib/node_modules/npm/bin/node-gyp-bin:/home/javey/.nvm/versions/node/v14.21.3/lib/node_modules/npm/bin/node-gyp-bin:/home/javey/.nvm/versions/node/v14.21.3/bin/node_modules/npm/bin/node-gyp-bin:/home/javey/.nvm/versions/node/v14.21.3/bin:/home/javey/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/home/javey/.yarn/bin:/home/javey/.local/bin:/home/javey/.yarn/bin:/home/javey/.local/bin
|
|
6
6
|
|
|
7
7
|
Yarn version:
|
|
8
8
|
1.22.19
|
|
@@ -22,7 +22,7 @@ Trace:
|
|
|
22
22
|
npm manifest:
|
|
23
23
|
{
|
|
24
24
|
"name": "@king-design/react",
|
|
25
|
-
"version": "3.1.
|
|
25
|
+
"version": "3.1.6",
|
|
26
26
|
"description": "King-Design UI components for React.",
|
|
27
27
|
"keywords": [
|
|
28
28
|
"component",
|
|
@@ -58,7 +58,7 @@ npm manifest:
|
|
|
58
58
|
"@emotion/css": "^11.5.0",
|
|
59
59
|
"dayjs": "^1.10.7",
|
|
60
60
|
"enquire.js": "^2.1.6",
|
|
61
|
-
"intact-react": "3.0.
|
|
61
|
+
"intact-react": "3.0.30",
|
|
62
62
|
"monaco-editor": "^0.26.1",
|
|
63
63
|
"mxgraphx": "^4.0.7",
|
|
64
64
|
"resize-observer-polyfill": "^1.5.1",
|
|
@@ -347,30 +347,30 @@ Lockfile:
|
|
|
347
347
|
parent-module "^1.0.0"
|
|
348
348
|
resolve-from "^4.0.0"
|
|
349
349
|
|
|
350
|
-
intact-react@3.0.
|
|
351
|
-
version "3.0.
|
|
352
|
-
resolved "https://registry.npmjs.org/intact-react/-/intact-react-3.0.
|
|
353
|
-
integrity sha512-
|
|
350
|
+
intact-react@3.0.29:
|
|
351
|
+
version "3.0.29"
|
|
352
|
+
resolved "https://registry.npmjs.org/intact-react/-/intact-react-3.0.29.tgz#d14efa01e59479170b8d05c6dae427d7a419d8b6"
|
|
353
|
+
integrity sha512-1DK0BI2WUzrAuek3lyn3rry0rzboPZi2WwZsg24WJ6wUZCw7qi5f8s3k/ocgmXrPgwIjKBj6XUPQfacOOCnikA==
|
|
354
354
|
dependencies:
|
|
355
|
-
intact "^3.0.
|
|
356
|
-
intact-shared "^3.0.
|
|
355
|
+
intact "^3.0.29"
|
|
356
|
+
intact-shared "^3.0.29"
|
|
357
357
|
tslib "^2.3.1"
|
|
358
358
|
|
|
359
|
-
intact-shared@^3.0.
|
|
360
|
-
version "3.0.
|
|
361
|
-
resolved "https://registry.npmjs.org/intact-shared/-/intact-shared-3.0.
|
|
362
|
-
integrity sha512-
|
|
359
|
+
intact-shared@^3.0.29:
|
|
360
|
+
version "3.0.29"
|
|
361
|
+
resolved "https://registry.npmjs.org/intact-shared/-/intact-shared-3.0.29.tgz#bb179d0b04c8983a412205aafe01d4c477477564"
|
|
362
|
+
integrity sha512-fcusA0hnPHv3G7iiEhXtfrAfI6oqtO51LxZKFb+UmPtZ6vSBny0x2avh6EWLShp3+jzDDr79Asvc5xXn+VsEhw==
|
|
363
363
|
|
|
364
|
-
intact@^3.0.
|
|
365
|
-
version "3.0.
|
|
366
|
-
resolved "https://registry.npmjs.org/intact/-/intact-3.0.
|
|
367
|
-
integrity sha512-
|
|
364
|
+
intact@^3.0.29:
|
|
365
|
+
version "3.0.29"
|
|
366
|
+
resolved "https://registry.npmjs.org/intact/-/intact-3.0.29.tgz#89afe82a568540c9f6a6c57fbb80ef6bb3d9c014"
|
|
367
|
+
integrity sha512-E9yyYZ43DQ6+Fjogv3+ZgHgxQJWxoIg9ESwAQ3XSIwPyxpj/XTDUEN3Y4hD/98X+KYdn+J40T21iYCCOrop3Xw==
|
|
368
368
|
dependencies:
|
|
369
|
-
intact-shared "^3.0.
|
|
370
|
-
misstime "^3.0.
|
|
369
|
+
intact-shared "^3.0.29"
|
|
370
|
+
misstime "^3.0.29"
|
|
371
371
|
tslib "^2.2.0"
|
|
372
|
-
vdt "^3.0.
|
|
373
|
-
vdt-compiler "^3.0.
|
|
372
|
+
vdt "^3.0.29"
|
|
373
|
+
vdt-compiler "^3.0.29"
|
|
374
374
|
|
|
375
375
|
is-arrayish@^0.2.1:
|
|
376
376
|
version "0.2.1"
|
|
@@ -399,12 +399,12 @@ Lockfile:
|
|
|
399
399
|
resolved "https://registry.npmmirror.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632"
|
|
400
400
|
integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==
|
|
401
401
|
|
|
402
|
-
misstime@^3.0.
|
|
403
|
-
version "3.0.
|
|
404
|
-
resolved "https://registry.npmjs.org/misstime/-/misstime-3.0.
|
|
405
|
-
integrity sha512-
|
|
402
|
+
misstime@^3.0.29:
|
|
403
|
+
version "3.0.29"
|
|
404
|
+
resolved "https://registry.npmjs.org/misstime/-/misstime-3.0.29.tgz#4246fc5003b81be5e41eb32e5129518456ec9617"
|
|
405
|
+
integrity sha512-h5IQXJ3CH7JceZI+Raoiw6GyPzdc7ZR8L5P1Rso6ihKjRx7iNVAVAbVRX0dDS53Oqv2UofDWLCzrFLYDdBSjyQ==
|
|
406
406
|
dependencies:
|
|
407
|
-
intact-shared "^3.0.
|
|
407
|
+
intact-shared "^3.0.29"
|
|
408
408
|
|
|
409
409
|
monaco-editor@^0.26.1:
|
|
410
410
|
version "0.26.1"
|
|
@@ -504,22 +504,22 @@ Lockfile:
|
|
|
504
504
|
resolved "https://registry.npmmirror.com/tslib/-/tslib-2.6.1.tgz#fd8c9a0ff42590b25703c0acb3de3d3f4ede0410"
|
|
505
505
|
integrity sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==
|
|
506
506
|
|
|
507
|
-
vdt-compiler@^3.0.
|
|
508
|
-
version "3.0.
|
|
509
|
-
resolved "https://registry.npmjs.org/vdt-compiler/-/vdt-compiler-3.0.
|
|
510
|
-
integrity sha512-
|
|
507
|
+
vdt-compiler@^3.0.29:
|
|
508
|
+
version "3.0.29"
|
|
509
|
+
resolved "https://registry.npmjs.org/vdt-compiler/-/vdt-compiler-3.0.29.tgz#956f7d14958e1af75a161112f416d3ea04b5dbc1"
|
|
510
|
+
integrity sha512-wuZHaSqnaJWXz8iGGKTlTeKVgRPUiN5E3GcTG6ekAQ9WlSD+hv58WhdD+BHwrT8sXm7AWuo2AwnOz6CYAOrmTQ==
|
|
511
511
|
dependencies:
|
|
512
|
-
intact-shared "^3.0.
|
|
513
|
-
misstime "^3.0.
|
|
512
|
+
intact-shared "^3.0.29"
|
|
513
|
+
misstime "^3.0.29"
|
|
514
514
|
tslib "^2.2.0"
|
|
515
515
|
|
|
516
|
-
vdt@^3.0.
|
|
517
|
-
version "3.0.
|
|
518
|
-
resolved "https://registry.npmjs.org/vdt/-/vdt-3.0.
|
|
519
|
-
integrity sha512-
|
|
516
|
+
vdt@^3.0.29:
|
|
517
|
+
version "3.0.29"
|
|
518
|
+
resolved "https://registry.npmjs.org/vdt/-/vdt-3.0.29.tgz#6651cb6489d5019963a2ef2107a2f8792182e4d2"
|
|
519
|
+
integrity sha512-MOnR3FGdHl3QVd7tB6eCxZ73YM3wAQg/SMEQpC2SC74knKjXivzQY7+dhXDT39HDhhGf8dlz2cYFP/afxLgJuA==
|
|
520
520
|
dependencies:
|
|
521
|
-
intact-shared "^3.0.
|
|
522
|
-
misstime "^3.0.
|
|
521
|
+
intact-shared "^3.0.29"
|
|
522
|
+
misstime "^3.0.29"
|
|
523
523
|
tslib "^2.2.0"
|
|
524
524
|
|
|
525
525
|
yaml@^1.10.0:
|