@kdcloudjs/kdesign 1.2.3 → 1.3.2
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/CHANGELOG.md +44 -0
- package/dist/kdesign-complete.less +14 -64
- package/dist/kdesign.css +25 -90
- package/dist/kdesign.css.map +1 -1
- package/dist/kdesign.js +193 -120
- package/dist/kdesign.js.map +1 -1
- package/dist/kdesign.min.css +3 -3
- package/dist/kdesign.min.js +8 -8
- package/dist/kdesign.min.js.map +1 -1
- package/es/badge/style/index.css +3 -4
- package/es/badge/style/index.less +3 -4
- package/es/badge/style/token.less +1 -0
- package/es/carousel/style/index.css +11 -84
- package/es/carousel/style/index.less +3 -60
- package/es/cascader/cascader.d.ts +7 -3
- package/es/cascader/cascader.js +8 -6
- package/es/checkbox/checkbox.js +4 -2
- package/es/checkbox/style/index.css +7 -0
- package/es/checkbox/style/index.less +7 -0
- package/es/form/Field.d.ts +2 -1
- package/es/form/Field.js +76 -20
- package/es/grid/row.d.ts +1 -1
- package/es/icon/interface.js +1 -1
- package/es/select/index.d.ts +2 -2
- package/es/select/interface.d.ts +7 -7
- package/es/select/select.js +12 -1
- package/es/style/icon/kdicon.css +3 -1
- package/es/style/icon/kdicon.woff +0 -0
- package/lib/badge/style/index.css +3 -4
- package/lib/badge/style/index.less +3 -4
- package/lib/badge/style/token.less +1 -0
- package/lib/carousel/style/index.css +11 -84
- package/lib/carousel/style/index.less +3 -60
- package/lib/cascader/cascader.d.ts +7 -3
- package/lib/cascader/cascader.js +10 -8
- package/lib/checkbox/checkbox.js +4 -2
- package/lib/checkbox/style/index.css +7 -0
- package/lib/checkbox/style/index.less +7 -0
- package/lib/form/Field.d.ts +2 -1
- package/lib/form/Field.js +79 -22
- package/lib/grid/row.d.ts +1 -1
- package/lib/icon/interface.js +1 -1
- package/lib/select/index.d.ts +2 -2
- package/lib/select/interface.d.ts +7 -7
- package/lib/select/select.js +12 -1
- package/lib/style/icon/kdicon.css +3 -1
- package/lib/style/icon/kdicon.woff +0 -0
- package/package.json +1 -1
package/lib/grid/row.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
declare type Align = 'top' | 'middle' | 'bottom';
|
|
2
|
+
declare type Align = 'top' | 'middle' | 'bottom' | 'stretch';
|
|
3
3
|
declare type Justify = 'start' | 'end' | 'center' | 'space-around' | 'space-between';
|
|
4
4
|
interface gutterObject {
|
|
5
5
|
xs?: number;
|
package/lib/icon/interface.js
CHANGED
|
@@ -13,7 +13,7 @@ var _type = require("../_utils/type");
|
|
|
13
13
|
|
|
14
14
|
var BaseIcon = ['arrow-up', 'arrow-down', 'arrow-left', 'arrow-right', 'first', 'last', 'double-arrow-left', 'double-arrow-right', 'push-down', 'put-top', 'put-bottom', 'put-on', 'put-off', 'switch-up', 'switch-down', 'all-border', 'top-border', 'right-border', 'bottom-border', 'left-border', 'left-extension', 'right-extension', 'left-unfold', 'right-unfold', 'unfoldmenu', 'foldmenu', 'enlarge', 'expand', 'close-full-screen', 'split', 'back', 'arrow', 'no-border', 'border', 'rough-border', 'align-left', 'align-right', 'align-center', 'vertical-center', 'delete-indentation', 'equal', 'greater-equal', 'not-equal', 'male', 'female', 'copy', 'print', 'lock', 'scanning', 'like', 'project', 'user-info', 'shutdown', 'image', 'delete-line', 'add-line', 'job-info', 'detect', 'cancel', 'stop', 'cell', 'fixed-shrink', 'attachment', 'location', 'reduce', 'resign-report', 'forbid', 'education', 'unlock', 'contract', 'filter', 'more', 'operating-element', 'fail', 'edit', 'have-attachment', 'hide', 'preview', 'unfold-all', 'wrap', 'filter-switch', 'qualification-info', 'cn', 'en', 'git', 'reset', 'preview-view', 'unfold', 'comment', 'shoppingcart', 'add-child', 'save', 'detail', 'table-setting', 'edit-view', 'edit-border', 'hyperlink', 'code', 'import', 'address', 'analysis', 'share', 'chart', 'fixed-window', 'order', 'phone', 'classify', 'feedback', 'menu', 'voice', 'search-border', 'material', 'finish', 'more-info', 'fixed', 'change', 'copy-code', 'return', 'qrcode', 'counterclockwise', 'list', 'switch', 'task-process', 'add', 'delete', 'add-word', 'two-window', 'spin', 'ordered-list', 'cooperation', 'quit', 'shrink', 'zoom', 'graffiti', 'experience', 'medical-report', 'bankcard', 'yunzhijia', 'customize', 'refresh', 'search', 'loadding', 'loadding-circle', 'right', 'close', 'upload', 'download', 'upload-cloud', 'waiting', 'warning', 'exclamatory', 'tips', 'setting', 'chart-display', 'date', 'more-item', 'international', 'little-k', 'bellOutlined', 'sigma'];
|
|
15
15
|
exports.BaseIcon = BaseIcon;
|
|
16
|
-
var SolidIcon = ['arrow-up-solid', 'arrow-right-solid', 'arrow-down-solid', 'arrow-left-solid', 'left-unfold-solid', 'right-unfold-solid', 'unlock-solid', 'multiply', 'division-solid', 'title-solid', 'communication-solid', 'fixed-solid', 'more-info-solid', 'timezone-solid', 'mosaic-solid', 'strike-solid', 'lock-solid', 'filter-solid', 'person-solid', 'bold-solid', 'delete-solid', 'processing-solid', 'tips-solid', 'quote-solid', 'oblique-solid', 'sun-solid', 'underline-solid', 'font-background-solid', 'eliminate-solid', 'font-color-solid', 'fx', 'refresh-solid', 'right-solid', 'location-solid', 'add-solid', 'warning-solid', 'close-solid', 'right-bold', 'close-bold', 'workbench', 'star', 'notice'];
|
|
16
|
+
var SolidIcon = ['arrow-up-solid', 'arrow-right-solid', 'arrow-down-solid', 'arrow-left-solid', 'left-unfold-solid', 'right-unfold-solid', 'unlock-solid', 'multiply', 'division-solid', 'title-solid', 'communication-solid', 'fixed-solid', 'more-info-solid', 'timezone-solid', 'mosaic-solid', 'strike-solid', 'lock-solid', 'filter-solid', 'person-solid', 'bold-solid', 'delete-solid', 'processing-solid', 'tips-solid', 'quote-solid', 'oblique-solid', 'sun-solid', 'underline-solid', 'font-background-solid', 'eliminate-solid', 'font-color-solid', 'fx', 'refresh-solid', 'right-solid', 'location-solid', 'add-solid', 'warning-solid', 'close-solid', 'right-bold', 'close-bold', 'workbench', 'star', 'notice', 'dashboard'];
|
|
17
17
|
exports.SolidIcon = SolidIcon;
|
|
18
18
|
|
|
19
19
|
var IconTypes = _type.tuple.apply(void 0, (0, _concat.default)(BaseIcon).call(BaseIcon, SolidIcon));
|
package/lib/select/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ISelectProps } from './interface';
|
|
2
|
+
import { ISelectProps, SelectValue } from './interface';
|
|
3
3
|
import Option from './option';
|
|
4
|
-
interface CompoundedComponent extends React.ForwardRefExoticComponent<ISelectProps & React.RefAttributes<HTMLElement>> {
|
|
4
|
+
interface CompoundedComponent extends React.ForwardRefExoticComponent<ISelectProps<SelectValue> & React.RefAttributes<HTMLElement>> {
|
|
5
5
|
Option: typeof Option;
|
|
6
6
|
}
|
|
7
7
|
declare const Select: CompoundedComponent;
|
|
@@ -43,17 +43,17 @@ export interface OptionsType {
|
|
|
43
43
|
value?: string;
|
|
44
44
|
label?: React.ReactNode;
|
|
45
45
|
}
|
|
46
|
-
export declare type SelectValue = string | string[] | number | number[] | LabeledValue | LabeledValue[] | null;
|
|
47
|
-
export interface ISelectProps<T
|
|
46
|
+
export declare type SelectValue = string | string[] | number | number[] | LabeledValue | LabeledValue[] | null | undefined;
|
|
47
|
+
export interface ISelectProps<T extends SelectValue> extends AbstractSelectProps {
|
|
48
48
|
value?: T;
|
|
49
49
|
defaultValue?: T;
|
|
50
50
|
mode?: Mode;
|
|
51
51
|
autoFocus?: boolean;
|
|
52
|
-
onChange?: (value
|
|
53
|
-
onSelect?: (value
|
|
54
|
-
onBlur?: (value
|
|
52
|
+
onChange?: (value?: T, option?: React.ReactElement<any> | React.ReactElement<any>[]) => void;
|
|
53
|
+
onSelect?: (value?: T extends (infer I)[] ? I : T, option?: React.ReactElement<any>) => void;
|
|
54
|
+
onBlur?: (value?: T) => void;
|
|
55
55
|
onFocus?: () => void;
|
|
56
|
-
onSearch?: () => void;
|
|
56
|
+
onSearch?: (value?: string) => void;
|
|
57
57
|
onClear?: () => void;
|
|
58
|
-
onDropdownVisibleChange?: (value
|
|
58
|
+
onDropdownVisibleChange?: (value?: T) => void;
|
|
59
59
|
}
|
package/lib/select/select.js
CHANGED
|
@@ -258,8 +258,19 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
258
258
|
onDropdownVisibleChange && onDropdownVisibleChange(!optionShow);
|
|
259
259
|
} // handleClear()
|
|
260
260
|
|
|
261
|
-
};
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
(0, _react.useEffect)(function () {
|
|
264
|
+
selectionRef.current.addEventListener('mouseup', function (e) {
|
|
265
|
+
var _a;
|
|
266
|
+
|
|
267
|
+
var isCloseBtn = ((_a = e === null || e === void 0 ? void 0 : e.target) === null || _a === void 0 ? void 0 : _a.className.indexOf('kd-tag-close-icon')) > -1;
|
|
262
268
|
|
|
269
|
+
if (isCloseBtn) {
|
|
270
|
+
e.stopPropagation();
|
|
271
|
+
}
|
|
272
|
+
});
|
|
273
|
+
}, []); // 点击下拉列表中某项回调
|
|
263
274
|
|
|
264
275
|
var handleOption = function handleOption(key, label, isSelected) {
|
|
265
276
|
var _a, _b, _c;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
@font-face {
|
|
2
2
|
font-family: "kdicon";
|
|
3
|
-
src: url("kdicon.woff?t=
|
|
3
|
+
src: url("kdicon.woff?t=1654677347390") format("woff");
|
|
4
4
|
}
|
|
5
5
|
.kdicon {
|
|
6
6
|
font-family: 'kdicon' !important;
|
|
7
|
+
font-size:16px;
|
|
7
8
|
font-style:normal;
|
|
8
9
|
-webkit-font-smoothing: antialiased;
|
|
9
10
|
-moz-osx-font-smoothing: grayscale;
|
|
@@ -62,6 +63,7 @@
|
|
|
62
63
|
.kdicon-copy:before { content: "\e678"; }
|
|
63
64
|
.kdicon-counterclockwise:before { content: "\e6e5"; }
|
|
64
65
|
.kdicon-customize:before { content: "\e707"; }
|
|
66
|
+
.kdicon-dashboard:before { content: "\e71c"; }
|
|
65
67
|
.kdicon-date-selection:before { content: "\e70f"; }
|
|
66
68
|
.kdicon-date:before { content: "\e6eb"; }
|
|
67
69
|
.kdicon-delete-indentation:before { content: "\e697"; }
|
|
Binary file
|