@king-design/intact 2.0.15 → 3.0.0-beta.0
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/button/styles.ts +4 -1
- package/components/card/styles.ts +3 -2
- package/components/checkbox/styles.ts +31 -6
- package/components/collapse/styles.ts +4 -1
- package/components/datepicker/styles.ts +3 -1
- package/components/dialog/base.vdt +4 -5
- package/components/dialog/styles.ts +18 -13
- package/components/drawer/styles.ts +20 -10
- package/components/dropdown/styles.ts +1 -1
- package/components/form/styles.ts +1 -1
- package/components/icon/demos/disabled.md +21 -0
- package/components/icon/demos/icons.md +87 -116
- package/components/icon/index.md +1 -0
- package/components/icon/index.ts +2 -0
- package/components/icon/index.vdt +6 -2
- package/components/icon/styles.ts +8 -1
- package/components/input/styles.ts +14 -20
- package/components/message/demos/basic.md +1 -1
- package/components/message/demos/duration.md +3 -3
- package/components/message/index.md +1 -1
- package/components/message/message.ts +2 -2
- package/components/message/message.vdt +6 -6
- package/components/message/styles.ts +10 -19
- package/components/pagination/index.vdt +9 -9
- package/components/pagination/styles.ts +11 -7
- package/components/radio/styles.ts +28 -9
- package/components/select/base.vdt +4 -5
- package/components/select/demos/basic.md +1 -1
- package/components/select/index.md +1 -1
- package/components/select/styles.ts +4 -27
- package/components/spinner/index.vdt +6 -4
- package/components/spinner/styles.ts +36 -36
- package/components/steps/demos/basic.md +2 -1
- package/components/steps/demos/clickable.md +6 -0
- package/components/steps/demos/error.md +25 -5
- package/components/steps/demos/line.md +7 -6
- package/components/steps/demos/simple.md +0 -6
- package/components/steps/index.md +1 -1
- package/components/steps/index.ts +4 -4
- package/components/steps/index.vdt +1 -0
- package/components/steps/step.vdt +16 -13
- package/components/steps/styles.ts +297 -259
- package/components/switch/demos/basic.md +1 -2
- package/components/switch/demos/disabled.md +20 -0
- package/components/switch/demos/onOff.md +5 -0
- package/components/switch/styles.ts +29 -37
- package/components/table/column.vdt +26 -10
- package/components/table/demos/rowExpandable.md +1 -1
- package/components/table/demos/selectedKeys.md +1 -1
- package/components/table/index.md +3 -3
- package/components/table/index.spec.ts +2 -2
- package/components/table/styles.ts +17 -6
- package/components/table/useGroup.ts +18 -2
- package/components/table/useSortable.ts +4 -1
- package/components/tabs/demos/basic.md +0 -1
- package/components/tabs/index.ts +2 -2
- package/components/tabs/index.vdt +3 -3
- package/components/tabs/styles.ts +202 -152
- package/components/tag/base.ts +1 -1
- package/components/tag/demos/border.md +2 -2
- package/components/tag/index.md +1 -1
- package/components/tag/styles.ts +12 -11
- package/components/tip/index.vdt +1 -3
- package/components/tip/styles.ts +8 -2
- package/components/tooltip/content.vdt +1 -1
- package/components/tooltip/styles.ts +8 -6
- package/components/transfer/index.vdt +3 -2
- package/components/transfer/styles.ts +1 -0
- package/components/transfer/useCheck.ts +9 -2
- package/components/upload/demos/manually.md +12 -13
- package/components/upload/index.vdt +40 -34
- package/components/upload/styles.ts +60 -64
- package/es/components/button/styles.js +2 -2
- package/es/components/card/styles.js +10 -2
- package/es/components/checkbox/styles.js +21 -10
- package/es/components/collapse/styles.js +6 -1
- package/es/components/datepicker/styles.d.ts +1 -1
- package/es/components/datepicker/styles.js +4 -1
- package/es/components/dialog/base.vdt.js +5 -6
- package/es/components/dialog/styles.js +16 -14
- package/es/components/drawer/styles.js +20 -5
- package/es/components/dropdown/styles.js +1 -1
- package/es/components/form/styles.js +1 -1
- package/es/components/icon/index.d.ts +1 -0
- package/es/components/icon/index.js +2 -1
- package/es/components/icon/index.vdt.js +4 -2
- package/es/components/icon/styles.js +10 -2
- package/es/components/input/styles.js +1 -11
- package/es/components/message/message.js +1 -1
- package/es/components/message/message.vdt.js +7 -6
- package/es/components/message/styles.js +8 -8
- package/es/components/pagination/index.vdt.js +8 -8
- package/es/components/pagination/styles.js +11 -2
- package/es/components/radio/styles.js +16 -6
- package/es/components/select/base.vdt.js +5 -6
- package/es/components/select/styles.js +4 -24
- package/es/components/spinner/index.vdt.js +6 -4
- package/es/components/spinner/styles.js +33 -5
- package/es/components/steps/index.d.ts +2 -2
- package/es/components/steps/index.js +2 -2
- package/es/components/steps/index.vdt.js +1 -0
- package/es/components/steps/step.vdt.js +17 -8
- package/es/components/steps/styles.d.ts +1 -1
- package/es/components/steps/styles.js +80 -75
- package/es/components/switch/styles.js +20 -34
- package/es/components/table/column.vdt.js +43 -7
- package/es/components/table/index.spec.js +2 -2
- package/es/components/table/styles.js +16 -5
- package/es/components/table/useGroup.d.ts +3 -0
- package/es/components/table/useGroup.js +24 -1
- package/es/components/table/useSortable.d.ts +3 -1
- package/es/components/table/useSortable.js +4 -1
- package/es/components/tabs/index.d.ts +1 -1
- package/es/components/tabs/index.js +1 -1
- package/es/components/tabs/index.vdt.js +1 -1
- package/es/components/tabs/styles.js +68 -22
- package/es/components/tag/base.js +1 -1
- package/es/components/tag/styles.js +15 -10
- package/es/components/tip/index.vdt.js +1 -3
- package/es/components/tip/styles.js +4 -3
- package/es/components/tooltip/content.vdt.js +4 -4
- package/es/components/tooltip/styles.js +12 -7
- package/es/components/transfer/index.vdt.js +3 -1
- package/es/components/transfer/styles.js +1 -1
- package/es/components/transfer/useCheck.d.ts +1 -0
- package/es/components/transfer/useCheck.js +8 -1
- package/es/components/upload/index.vdt.js +21 -20
- package/es/components/upload/styles.js +22 -30
- package/es/i18n/en-US.d.ts +2 -1
- package/es/i18n/en-US.js +2 -1
- package/es/index.d.ts +2 -2
- package/es/index.js +2 -2
- package/es/site/data/components/icon/demos/disabled/index.d.ts +6 -0
- package/es/site/data/components/icon/demos/disabled/index.js +18 -0
- package/es/site/data/components/icon/demos/disabled/react.d.ts +5 -0
- package/es/site/data/components/icon/demos/disabled/react.js +33 -0
- package/es/site/data/components/icon/demos/icons/index.js +1 -1
- package/es/site/data/components/icon/demos/icons/react.js +1 -1
- package/es/site/data/components/menu/demos/collapse/react.d.ts +11 -0
- package/es/site/data/components/menu/demos/size/react.d.ts +7 -0
- package/es/site/data/components/message/demos/duration/index.js +2 -2
- package/es/site/data/components/message/demos/duration/react.js +2 -2
- package/es/site/data/components/select/demos/basic/react.js +1 -2
- package/es/site/data/components/steps/demos/basic/react.js +1 -1
- package/es/site/data/components/steps/demos/clickable/react.js +15 -0
- package/es/site/data/components/steps/demos/error/react.js +22 -2
- package/es/site/data/components/steps/demos/line/react.js +15 -11
- package/es/site/data/components/steps/demos/simple/react.js +1 -11
- package/es/site/data/components/switch/demos/basic/react.js +0 -2
- package/es/site/data/components/switch/demos/disabled/index.d.ts +6 -0
- package/es/site/data/components/switch/demos/disabled/index.js +18 -0
- package/es/site/data/components/switch/demos/disabled/react.d.ts +5 -0
- package/es/site/data/components/switch/demos/disabled/react.js +27 -0
- package/es/site/data/components/switch/demos/onOff/react.js +13 -0
- package/es/site/data/components/tag/demos/border/index.js +1 -1
- package/es/site/data/components/tag/demos/border/react.js +1 -1
- package/es/site/data/components/upload/demos/manually/react.js +5 -7
- package/es/site/src/pages/document/index.js +3 -2
- package/es/site/src/pages/document/styles.js +1 -1
- package/es/styles/fonts/iconfont.eot +0 -0
- package/es/styles/fonts/iconfont.js +1 -1
- package/es/styles/fonts/iconfont.svg +189 -369
- package/es/styles/fonts/iconfont.ttf +0 -0
- package/es/styles/fonts/iconfont.woff +0 -0
- package/es/styles/theme.d.ts +10 -2
- package/es/styles/theme.js +23 -21
- package/i18n/en-US.ts +2 -1
- package/index.ts +2 -2
- package/package.json +4 -3
- package/styles/fonts/iconfont.css +172 -289
- package/styles/fonts/iconfont.eot +0 -0
- package/styles/fonts/iconfont.svg +189 -369
- package/styles/fonts/iconfont.ts +255 -369
- package/styles/fonts/iconfont.ttf +0 -0
- package/styles/fonts/iconfont.woff +0 -0
- package/styles/fonts/iconfont.woff2 +0 -0
- package/styles/theme.ts +23 -19
|
@@ -4,13 +4,41 @@ import { deepDefaults, sizes } from '../../styles/utils';
|
|
|
4
4
|
import { theme, setDefault } from '../../styles/theme';
|
|
5
5
|
import '../../styles/global';
|
|
6
6
|
var defaults = {
|
|
7
|
+
get borderRadius() {
|
|
8
|
+
return theme.borderRadius;
|
|
9
|
+
},
|
|
10
|
+
|
|
11
|
+
get border() {
|
|
12
|
+
return "1px solid " + theme.color.border;
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
get hoverBorderColor() {
|
|
16
|
+
return theme.color.primary;
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
get hoverBtnBg() {
|
|
20
|
+
return theme.color.bg;
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
get disabledBorderColor() {
|
|
24
|
+
return theme.color.disabledBorder;
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
get disabledBg() {
|
|
28
|
+
return theme.color.disabledBg;
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
get disabledColor() {
|
|
32
|
+
return theme.color.disabled;
|
|
33
|
+
},
|
|
34
|
+
|
|
7
35
|
default: {
|
|
8
36
|
inputWidth: '46px',
|
|
9
|
-
iconFontSize: '
|
|
37
|
+
iconFontSize: '16px'
|
|
10
38
|
},
|
|
11
39
|
large: {
|
|
12
40
|
inputWidth: '60px',
|
|
13
|
-
iconFontSize: '
|
|
41
|
+
iconFontSize: '24px'
|
|
14
42
|
},
|
|
15
43
|
small: {
|
|
16
44
|
inputWidth: '32px',
|
|
@@ -42,9 +70,9 @@ setDefault(function () {
|
|
|
42
70
|
}).spinner;
|
|
43
71
|
});
|
|
44
72
|
export function makeStyles() {
|
|
45
|
-
return /*#__PURE__*/css("display:inline-block;vertical-align:middle;
|
|
73
|
+
return /*#__PURE__*/css("display:inline-block;vertical-align:middle;border:", spinner.border, ";border-radius:", spinner.borderRadius, ";&:hover{border-color:", spinner.hoverBorderColor, ";.k-spinner-btn{background:", spinner.hoverBtnBg, ";}.k-left{border-radius:", spinner.borderRadius, " 0 0 ", spinner.borderRadius, ";}.k-right{border-radius:0 ", spinner.borderRadius, " ", spinner.borderRadius, " 0;}}.k-spinner-input{width:", spinner.default.inputWidth, ";.k-input-inner{text-align:center;border:none;border-radius:0;&:hover,&:focus{border:none;}}}.k-spinner-icon{font-size:", spinner.default.iconFontSize, ";}&.k-vertical{position:relative;font-size:0;", _mapInstanceProperty(sizes).call(sizes, function (size) {
|
|
46
74
|
var generate = function generate() {
|
|
47
|
-
return "\n .k-spinner-input {\n padding-right:
|
|
75
|
+
return "\n .k-spinner-input {\n padding-right: " + theme[size].height + ";\n width: " + spinner.vertical[size].width + ";\n }\n ";
|
|
48
76
|
};
|
|
49
77
|
|
|
50
78
|
if (size === 'default') {
|
|
@@ -52,7 +80,7 @@ export function makeStyles() {
|
|
|
52
80
|
} else {
|
|
53
81
|
return "\n &.k-" + size + " {\n " + generate() + "\n }\n ";
|
|
54
82
|
}
|
|
55
|
-
}), ";.k-spinner-btn{position:absolute;right:0;margin:0;height:calc(50%
|
|
83
|
+
}), ";.k-spinner-btn{position:absolute;right:0;margin:0;height:calc(50% - 2px);line-height:50%;}.k-spinner-icon{font-size:inherit!important;}.k-spinner-btn.k-left{bottom:1px;border-radius:0 0 ", spinner.borderRadius, " 0;}.k-spinner-btn.k-right{top:1px;border-radius:0 ", spinner.borderRadius, " 0 0;}.k-spinner-input{font-size:0;.k-input-inner{border-radius:", spinner.borderRadius, " 0 0 ", spinner.borderRadius, ";}}}&.k-disabled{border-color:", spinner.disabledBorderColor, ";background:", spinner.disabledBg, ";}", _mapInstanceProperty(sizes).call(sizes, function (size) {
|
|
56
84
|
var styles = spinner[size];
|
|
57
85
|
|
|
58
86
|
var generate = function generate() {
|
|
@@ -2,8 +2,8 @@ import { Component, TypeDefs } from 'intact';
|
|
|
2
2
|
export * from './step';
|
|
3
3
|
export interface StepsProps {
|
|
4
4
|
value?: number;
|
|
5
|
-
status?: 'normal' | 'error';
|
|
6
|
-
type?: 'default' | 'line' | 'simple';
|
|
5
|
+
status?: 'normal' | 'error' | 'done';
|
|
6
|
+
type?: 'default' | 'line' | 'simple' | 'line-compact' | 'dot';
|
|
7
7
|
clickable?: boolean;
|
|
8
8
|
}
|
|
9
9
|
export declare class Steps extends Component<StepsProps> {
|
|
@@ -6,8 +6,8 @@ import { bind } from '../utils';
|
|
|
6
6
|
export * from './step';
|
|
7
7
|
var typeDefs = {
|
|
8
8
|
value: Number,
|
|
9
|
-
status: ['normal', 'error'],
|
|
10
|
-
type: ['default', 'line', 'simple'],
|
|
9
|
+
status: ['normal', 'error', 'done'],
|
|
10
|
+
type: ['default', 'line', 'simple', 'line-compact', 'dot'],
|
|
11
11
|
clickable: Boolean
|
|
12
12
|
};
|
|
13
13
|
|
|
@@ -2,8 +2,16 @@ import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
|
2
2
|
import { createUnknownComponentVNode as _$cc, createVNode as _$cv, className as _$cn, createElementVNode as _$ce } from 'intact';
|
|
3
3
|
import { linkEvent } from 'intact';
|
|
4
4
|
import { getRestProps, addStyle } from '../utils';
|
|
5
|
-
import { makeStepStyles } from './styles';
|
|
6
5
|
import { context as StepsContext } from './context';
|
|
6
|
+
import { Icon } from '../icon';
|
|
7
|
+
var _$tmp0 = {
|
|
8
|
+
'className': 'k-icon-close-big',
|
|
9
|
+
'color': 'danger'
|
|
10
|
+
};
|
|
11
|
+
var _$tmp1 = {
|
|
12
|
+
'className': 'k-icon-check',
|
|
13
|
+
'color': 'primary'
|
|
14
|
+
};
|
|
7
15
|
export default function ($props, $blocks, $__proto__) {
|
|
8
16
|
var _this = this;
|
|
9
17
|
|
|
@@ -25,22 +33,23 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
25
33
|
var value = _ref.value,
|
|
26
34
|
status = _ref.status,
|
|
27
35
|
width = _ref.width,
|
|
28
|
-
onChange = _ref.onChange
|
|
36
|
+
onChange = _ref.onChange,
|
|
37
|
+
type = _ref.type;
|
|
29
38
|
var selected = value === index;
|
|
30
39
|
var error = selected && status === 'error';
|
|
40
|
+
var done = value > index;
|
|
31
41
|
var classNameObj = (_classNameObj = {
|
|
32
42
|
'k-step': true,
|
|
33
43
|
'k-active': selected,
|
|
34
|
-
'k-done':
|
|
44
|
+
'k-done': done,
|
|
35
45
|
'k-error': error
|
|
36
|
-
}, _classNameObj[className] = className, _classNameObj
|
|
46
|
+
}, _classNameObj[className] = className, _classNameObj);
|
|
37
47
|
return _$cv('div', _extends({}, getRestProps(_this), {
|
|
38
48
|
'className': _$cn(classNameObj),
|
|
39
|
-
'style':
|
|
40
|
-
|
|
41
|
-
}),
|
|
49
|
+
'style': style
|
|
50
|
+
}), [_$ce(2, 'div', [_$ce(2, 'div', error && type !== 'simple' ? _$cc(Icon, _$tmp0) : done && (type === 'line' || type === 'line-compact') ? _$cc(Icon, _$tmp1) : type !== 'simple' ? _$ce(2, 'span', index + 1, 0) : undefined, 0, 'k-step-mark'), _$ce(2, 'div', [_$ce(2, 'div', title, 0, 'k-step-title'), _$ce(2, 'div', _children, 0, 'k-step-content')], 4, 'k-step-main')], 4, 'k-step-wrapper', {
|
|
42
51
|
'ev-click': linkEvent(index, onChange)
|
|
43
|
-
}),
|
|
52
|
+
}), _$ce(2, 'div', null, 1, 'k-step-tail')]);
|
|
44
53
|
}
|
|
45
54
|
});
|
|
46
55
|
}
|
|
@@ -4,137 +4,116 @@ import { theme, setDefault } from '../../styles/theme';
|
|
|
4
4
|
import { deepDefaults } from '../../styles/utils';
|
|
5
5
|
import '../../styles/global';
|
|
6
6
|
var defaults = {
|
|
7
|
-
|
|
8
|
-
return theme.transition.middle;
|
|
9
|
-
},
|
|
7
|
+
gap: '10px',
|
|
10
8
|
|
|
11
|
-
get
|
|
12
|
-
return theme.
|
|
9
|
+
get titleColor() {
|
|
10
|
+
return theme.color.title;
|
|
13
11
|
},
|
|
14
12
|
|
|
15
|
-
get
|
|
16
|
-
return theme.color.
|
|
13
|
+
get desColor() {
|
|
14
|
+
return theme.color.lightBlack;
|
|
17
15
|
},
|
|
18
16
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
head: {
|
|
23
|
-
innerWidth: '16px',
|
|
24
|
-
|
|
25
|
-
get innerBorder() {
|
|
26
|
-
return "1px solid " + theme.color.placeholder;
|
|
27
|
-
},
|
|
17
|
+
get markColor() {
|
|
18
|
+
return theme.color.placeholder;
|
|
19
|
+
},
|
|
28
20
|
|
|
29
|
-
|
|
30
|
-
|
|
21
|
+
get markborder() {
|
|
22
|
+
return "1px solid " + theme.color.placeholder;
|
|
31
23
|
},
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
24
|
+
|
|
25
|
+
markBgColor: '#fff',
|
|
26
|
+
default: {
|
|
27
|
+
get height() {
|
|
28
|
+
return theme.default.height;
|
|
35
29
|
},
|
|
36
30
|
|
|
37
|
-
get
|
|
38
|
-
return
|
|
31
|
+
get bgColor() {
|
|
32
|
+
return theme.color.bg;
|
|
39
33
|
},
|
|
40
34
|
|
|
41
|
-
|
|
35
|
+
markWidth: '16px'
|
|
42
36
|
},
|
|
43
37
|
// done
|
|
44
38
|
done: {
|
|
45
|
-
get
|
|
39
|
+
get markColor() {
|
|
46
40
|
return theme.color.primary;
|
|
47
41
|
},
|
|
48
42
|
|
|
49
|
-
get
|
|
43
|
+
get markBorderColor() {
|
|
50
44
|
return theme.color.primary;
|
|
51
45
|
},
|
|
52
46
|
|
|
53
|
-
|
|
47
|
+
markBgColor: '#fff',
|
|
54
48
|
|
|
55
49
|
get mainColor() {
|
|
56
50
|
return theme.color.primary;
|
|
57
|
-
},
|
|
58
|
-
|
|
59
|
-
get simpleColor() {
|
|
60
|
-
return theme.color.text;
|
|
61
51
|
}
|
|
62
52
|
|
|
63
53
|
},
|
|
64
54
|
// active
|
|
65
55
|
active: {
|
|
66
|
-
|
|
56
|
+
markColor: '#fff',
|
|
67
57
|
|
|
68
|
-
get
|
|
58
|
+
get markBorderColor() {
|
|
69
59
|
return theme.color.primary;
|
|
70
60
|
},
|
|
71
61
|
|
|
72
|
-
get
|
|
62
|
+
get markBgColor() {
|
|
73
63
|
return theme.color.primary;
|
|
74
64
|
},
|
|
75
65
|
|
|
76
66
|
get mainColor() {
|
|
77
67
|
return theme.color.primary;
|
|
78
|
-
},
|
|
79
|
-
|
|
80
|
-
get simpleColor() {
|
|
81
|
-
return theme.color.primary;
|
|
82
68
|
}
|
|
83
69
|
|
|
84
70
|
},
|
|
85
71
|
// error
|
|
86
72
|
error: {
|
|
87
|
-
get
|
|
73
|
+
get markColor() {
|
|
88
74
|
return theme.color.danger;
|
|
89
75
|
},
|
|
90
76
|
|
|
91
|
-
get
|
|
77
|
+
get markBorderColor() {
|
|
92
78
|
return theme.color.danger;
|
|
93
79
|
},
|
|
94
80
|
|
|
95
|
-
|
|
81
|
+
markBgColor: '#fff',
|
|
96
82
|
|
|
97
83
|
get mainColor() {
|
|
98
84
|
return theme.color.danger;
|
|
99
|
-
},
|
|
100
|
-
|
|
101
|
-
get simpleColor() {
|
|
102
|
-
return theme.color.danger;
|
|
103
85
|
}
|
|
104
86
|
|
|
105
87
|
},
|
|
106
88
|
// line
|
|
107
89
|
line: {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
get tailBgColor() {
|
|
112
|
-
return theme.color.placeholder;
|
|
113
|
-
},
|
|
90
|
+
markWidth: '32px',
|
|
91
|
+
markFontSize: '24px',
|
|
114
92
|
|
|
115
|
-
get
|
|
116
|
-
return theme.color.
|
|
93
|
+
get lineColor() {
|
|
94
|
+
return theme.color.border;
|
|
117
95
|
},
|
|
118
96
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
headTop: '16px',
|
|
123
|
-
titleFontSize: '14px',
|
|
124
|
-
titleGopTop: '16px',
|
|
125
|
-
iconLineHeight: '30px',
|
|
126
|
-
tailTop: '16px',
|
|
127
|
-
width: '160px'
|
|
97
|
+
titleGap: '16px',
|
|
98
|
+
descGap: '4px',
|
|
99
|
+
contentMaxWidth: '200px'
|
|
128
100
|
},
|
|
129
101
|
// simple
|
|
130
102
|
simple: {
|
|
131
|
-
|
|
103
|
+
markWidth: '12px',
|
|
104
|
+
|
|
105
|
+
get markBgColor() {
|
|
106
|
+
return theme.color.placeholder;
|
|
107
|
+
},
|
|
132
108
|
|
|
133
|
-
get
|
|
134
|
-
return theme.color.
|
|
109
|
+
get doneMarkBgColor() {
|
|
110
|
+
return theme.color.primary;
|
|
135
111
|
},
|
|
136
112
|
|
|
137
|
-
|
|
113
|
+
get errorMarkBgColor() {
|
|
114
|
+
return theme.color.danger;
|
|
115
|
+
}
|
|
116
|
+
|
|
138
117
|
}
|
|
139
118
|
};
|
|
140
119
|
var steps;
|
|
@@ -145,14 +124,40 @@ setDefault(function () {
|
|
|
145
124
|
});
|
|
146
125
|
var stepStatus = ['done', 'active', 'error'];
|
|
147
126
|
export function makeStepsStyles() {
|
|
148
|
-
return /*#__PURE__*/css("display:flex;&.k-default,&.k-line{",
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
127
|
+
return /*#__PURE__*/css("display:flex;", makeCommonStyles(), ";&.k-default{", makeDefaultStyles(), ";}&.k-line,&.k-line-compact,&.k-simple{", makeLineStyles(), ";}&.k-line-compact{", makeLineCompactStyles(), ";}&.k-simple{", makeSimpleStyles(), ";}&.k-clickable{.k-done{cursor:pointer;}}");
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
function makeDefaultStyles() {
|
|
131
|
+
var defaults = steps.default;
|
|
132
|
+
return /*#__PURE__*/css("text-align:center;height:", defaults.height, ";background:", defaults.bgColor, ";.k-step-wrapper{", center(), ";height:100%;}.k-step-mark{width:", defaults.markWidth, ";height:", defaults.markWidth, ";margin-right:", steps.gap, ";}.k-step-main{display:flex;overflow:hidden;white-space:nowrap;}.k-step-title{padding-right:", steps.gap, ";}.k-step:last-of-type{.k-step-tail{display:none;}}.k-step-tail{position:absolute;top:0;right:calc(-1 * (", defaults.height, " / 2 + ", steps.gap, "));width:calc(", defaults.height, " / 2 + ", steps.gap, ");height:", defaults.height, ";overflow:hidden;z-index:1;&:after,&:before{content:'';border-width:calc(", defaults.height, " / 2 + ", steps.gap, ");border-style:solid;border-color:transparent;position:absolute;top:calc(-1 * ", steps.gap, ");}&:after{border-left-color:", defaults.bgColor, ";left:calc(-1 * ", steps.gap, ");}&:before{border-left-color:#fff;left:0;}}.k-step:not(:first-of-type){padding-left:calc(", defaults.height, " / 2 + ", steps.gap, ");}");
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
function makeLineStyles() {
|
|
136
|
+
var line = defaults.line;
|
|
137
|
+
return /*#__PURE__*/css(".k-step{display:flex;}.k-step-wrapper{display:inline-block;text-align:center;position:relative;}.k-step:last-of-type{flex:0 0 auto;}.k-step-mark{width:", line.markWidth, ";height:", line.markWidth, ";position:relative;z-index:1;&,.k-icon{font-size:", line.markFontSize, ";}}.k-step-main{padding-top:", line.titleGap, ";}.k-step-title{font-size:14px;color:", theme.color.text, ";}.k-step-content{margin-top:", line.descGap, ";color:", theme.color.placeholder, ";max-width:", line.contentMaxWidth, ";}.k-step-wrapper{&:before,&:after{content:'';display:block;height:1px;background:", line.lineColor, ";width:50%;position:absolute;top:calc(", line.markWidth, " / 2);}&:after{right:0;}}.k-step{&:first-of-type .k-step-wrapper:before,&:last-of-type .k-step-wrapper:after{background:transparent;}}.k-step-tail{flex:1;height:1px;background:", line.lineColor, ";margin-top:calc(", line.markWidth, " / 2);}.k-step{&.k-done{.k-step-tail,&:not(:last-of-type) .k-step-wrapper:after,&:not(:first-of-type) .k-step-wrapper:before{background:", theme.color.primary, ";}}&:not(:first-of-type).k-active{.k-step-wrapper:before{background:", theme.color.primary, ";}}&.k-active .k-step-title{color:", theme.color.primary, ";}&.k-error .k-step-title{color:", theme.color.danger, ";}}");
|
|
155
138
|
}
|
|
156
|
-
|
|
157
|
-
|
|
139
|
+
|
|
140
|
+
function makeLineCompactStyles() {
|
|
141
|
+
var line = defaults.line;
|
|
142
|
+
return /*#__PURE__*/css(".k-step-wrapper{display:inline-flex;text-align:left;&:before,&:after{display:none;}}.k-step-main{flex:1;padding:0 0 0 ", line.titleGap, ";}.k-step-content{margin:0;}.k-step-tail{margin-right:", line.titleGap, ";}.k-step-title{display:flex;align-items:center;height:", line.markWidth, ";&:after{content:'';display:block;flex:1;height:1px;background:", line.lineColor, ";margin-left:", line.titleGap, ";}}.k-step:last-of-type .k-step-title:after{display:none;}.k-step{&.k-done{.k-step-title:after{background:", theme.color.primary, ";}}}");
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
function makeSimpleStyles() {
|
|
146
|
+
var simple = defaults.simple;
|
|
147
|
+
return /*#__PURE__*/css(".k-step-mark{width:", simple.markWidth, ";height:", simple.markWidth, ";background:", simple.markBgColor, ";}.k-step-wrapper{font-size:0;&:before,&:after{top:calc(", simple.markWidth, " / 2);}}.k-step-main{font-size:", theme.default.fontSize, ";}.k-step-tail{margin-top:calc(", simple.markWidth, " / 2);}.k-step{&.k-done{.k-step-mark{background:", simple.doneMarkBgColor, ";}}&.k-error{.k-step-mark{background:", simple.errorMarkBgColor, ";}}}");
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
function center(flex) {
|
|
151
|
+
if (flex === void 0) {
|
|
152
|
+
flex = 'flex';
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
return /*#__PURE__*/css("display:", flex, ";align-items:center;justify-content:center;");
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export function makeCommonStyles() {
|
|
159
|
+
return /*#__PURE__*/css(".k-step{position:relative;flex:1;", _mapInstanceProperty(stepStatus).call(stepStatus, function (status) {
|
|
160
|
+
var styles = steps[status];
|
|
161
|
+
return /*#__PURE__*/css("&.k-", status, "{.k-step-mark{color:", styles.markColor, ";border-color:", styles.markBorderColor, ";background:", styles.markBgColor, ";}.k-step-main{color:", styles.mainColor, ";}}");
|
|
162
|
+
}), ";}.k-step-mark{", center('inline-flex'), ";border:", steps.markborder, ";border-radius:50%;vertical-align:top;color:", steps.markColor, ";background:", steps.markBgColor, ";}");
|
|
158
163
|
}
|
|
@@ -1,68 +1,54 @@
|
|
|
1
1
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js/instance/map";
|
|
2
2
|
import { css } from '@emotion/css';
|
|
3
3
|
import { theme, setDefault } from '../../styles/theme';
|
|
4
|
-
import { deepDefaults, sizes } from '../../styles/utils';
|
|
4
|
+
import { deepDefaults, sizes, palette } from '../../styles/utils';
|
|
5
5
|
import '../../styles/global';
|
|
6
6
|
var defaults = {
|
|
7
7
|
get transition() {
|
|
8
8
|
return theme.transition.middle;
|
|
9
9
|
},
|
|
10
10
|
|
|
11
|
-
bgColor
|
|
12
|
-
fontSize: "12px",
|
|
13
|
-
|
|
14
|
-
get color() {
|
|
15
|
-
return theme.color.text;
|
|
16
|
-
},
|
|
17
|
-
|
|
18
|
-
checkedBgColor: "#fff",
|
|
19
|
-
handleBorderRadius: "100%",
|
|
20
|
-
|
|
21
|
-
get handleBgColor() {
|
|
11
|
+
get bgColor() {
|
|
22
12
|
return theme.color.border;
|
|
23
13
|
},
|
|
24
14
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
15
|
+
fontSize: "12px",
|
|
16
|
+
color: '#fff',
|
|
17
|
+
handleBorderRadius: "100%",
|
|
18
|
+
handleBgColor: '#fff',
|
|
29
19
|
// checked
|
|
30
20
|
checked: {
|
|
31
|
-
get
|
|
32
|
-
return theme.color.primary;
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
get color() {
|
|
21
|
+
get bgColor() {
|
|
36
22
|
return theme.color.primary;
|
|
37
23
|
},
|
|
38
24
|
|
|
39
|
-
get
|
|
40
|
-
return theme.color.primary;
|
|
25
|
+
get disabledBgColor() {
|
|
26
|
+
return palette(theme.color.primary, -3);
|
|
41
27
|
}
|
|
42
28
|
|
|
43
29
|
},
|
|
44
30
|
// default
|
|
45
31
|
default: {
|
|
46
|
-
width: "
|
|
47
|
-
height: "
|
|
48
|
-
padding: "
|
|
32
|
+
width: "45px",
|
|
33
|
+
height: "24px",
|
|
34
|
+
padding: "3px"
|
|
49
35
|
},
|
|
50
36
|
// large
|
|
51
37
|
large: {
|
|
52
|
-
width: "
|
|
53
|
-
height: "
|
|
54
|
-
padding: "
|
|
38
|
+
width: "58px",
|
|
39
|
+
height: "30px",
|
|
40
|
+
padding: "3px"
|
|
55
41
|
},
|
|
56
42
|
// small
|
|
57
43
|
small: {
|
|
58
|
-
width: "
|
|
44
|
+
width: "30px",
|
|
59
45
|
height: "16px",
|
|
60
46
|
padding: "2px"
|
|
61
47
|
},
|
|
62
48
|
// mini
|
|
63
49
|
mini: {
|
|
64
|
-
width: "
|
|
65
|
-
height: "
|
|
50
|
+
width: "18px",
|
|
51
|
+
height: "10px",
|
|
66
52
|
padding: "1px"
|
|
67
53
|
},
|
|
68
54
|
|
|
@@ -79,11 +65,11 @@ setDefault(function () {
|
|
|
79
65
|
}).switch;
|
|
80
66
|
});
|
|
81
67
|
export function makeStyles() {
|
|
82
|
-
return /*#__PURE__*/css("display:inline-block;vertical-align:middle;background:", kswitch.bgColor, ";position:relative;cursor:pointer;user-select:none;overflow:hidden;
|
|
68
|
+
return /*#__PURE__*/css("display:inline-block;vertical-align:middle;background:", kswitch.bgColor, ";position:relative;cursor:pointer;user-select:none;overflow:hidden;box-sizing:content-box;input{opacity:0;position:absolute;}.k-switch-bar,.k-switch-off{box-sizing:border-box;}.k-switch-bar{position:absolute;text-align:right;overflow:hidden;}.k-switch-wrapper{display:inline-block;position:relative;z-index:1;border-radius:", kswitch.handleBorderRadius, ";}.k-switch-bar,.k-switch-wrapper{height:100%;background:", kswitch.bgColor, ";transition:all ", kswitch.transition, ";}.k-switch-handle{border-radius:", kswitch.handleBorderRadius, ";background:", kswitch.handleBgColor, ";height:100%;cursor:pointer;transition:left ", kswitch.transition, ";display:inline-block;img{height:100%;visibility:hidden;}}.k-switch-on,.k-switch-off{position:absolute;font-size:", kswitch.fontSize, ";color:", kswitch.color, ";text-align:center;}&.k-dragging{.k-switch-bar,.k-switch-wrapper{background:", kswitch.checked.bgColor, ";transition:background ", kswitch.transition, ";}}&:focus{outline:none;}", _mapInstanceProperty(sizes).call(sizes, function (size) {
|
|
83
69
|
var _kswitch$size = kswitch[size],
|
|
84
70
|
width = _kswitch$size.width,
|
|
85
71
|
height = _kswitch$size.height,
|
|
86
72
|
padding = _kswitch$size.padding;
|
|
87
73
|
return /*#__PURE__*/css("&.k-", size, ",&.k-", size, " .k-switch-on,&.k-", size, " .k-switch-off{width:", width, ";height:", height, ";}&.k-", size, "{border-radius:", height, ";.k-switch-bar{width:", height, ";border-radius:", height, ";}.k-switch-wrapper{padding:", padding, ";}.k-switch-on,.k-switch-off{line-height:", height, ";left:0;}.k-switch-on{padding:0 ", height, " 0 calc(", height, " / 3);}.k-switch-off{padding:0 calc(", height, " / 3) 0 ", height, ";}}");
|
|
88
|
-
}), "&.k-checked{
|
|
74
|
+
}), "&.k-checked{.k-switch-bar,.k-switch-wrapper{background:", kswitch.checked.bgColor, ";}.k-switch-bar{width:100%;}}&.k-disabled{&,.k-switch-handle{cursor:not-allowed;}&,.k-switch-bar,.k-switch-wrapper{background:", kswitch.disabledBgColor, ";}&.k-checked{&,.k-switch-bar,.k-switch-wrapper{background:", kswitch.checked.disabledBgColor, ";}}}");
|
|
89
75
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _sortInstanceProperty from "@babel/runtime-corejs3/core-js/instance/sort";
|
|
2
|
-
import { createUnknownComponentVNode as _$cc, createElementVNode as _$ce, noop as _$no, className as _$cn, map as _$ma } from 'intact';
|
|
2
|
+
import { createUnknownComponentVNode as _$cc, createElementVNode as _$ce, noop as _$no, className as _$cn, extend as _$ex, EMPTY_OBJ as _$em, map as _$ma } from 'intact';
|
|
3
3
|
import { getClassAndStyleForFixed } from './useFixedColumns';
|
|
4
4
|
import { Dropdown, DropdownMenu, DropdownItem } from '../dropdown';
|
|
5
5
|
import { Button } from '../button';
|
|
@@ -14,13 +14,18 @@ import { context as TableContext } from './useColumns';
|
|
|
14
14
|
import { context as ResizableContext } from './useResizable';
|
|
15
15
|
import { context as FixedColumnsContext } from './useFixedColumns';
|
|
16
16
|
import { stopPropagation } from '../utils';
|
|
17
|
+
import { Input } from '../input';
|
|
18
|
+
import { _$ } from '../../i18n';
|
|
17
19
|
var _$tmp0 = {
|
|
18
20
|
'className': 'ion-android-arrow-dropdown'
|
|
19
21
|
};
|
|
20
22
|
var _$tmp1 = {
|
|
21
|
-
'className': 'ion-
|
|
23
|
+
'className': 'ion-ios-search'
|
|
22
24
|
};
|
|
23
25
|
var _$tmp2 = {
|
|
26
|
+
'className': 'ion-android-arrow-dropup k-asc'
|
|
27
|
+
};
|
|
28
|
+
var _$tmp3 = {
|
|
24
29
|
'className': 'ion-android-arrow-dropdown k-desc'
|
|
25
30
|
};
|
|
26
31
|
export default function ($props, $blocks, $__proto__) {
|
|
@@ -45,7 +50,9 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
45
50
|
var _this$group = this.group,
|
|
46
51
|
onSelect = _this$group.onSelect,
|
|
47
52
|
isChecked = _this$group.isChecked,
|
|
48
|
-
getGroupText = _this$group.getGroupText
|
|
53
|
+
getGroupText = _this$group.getGroupText,
|
|
54
|
+
keywords = _this$group.keywords,
|
|
55
|
+
filteredGroup = _this$group.filteredGroup;
|
|
49
56
|
return _$cc(TableContext.Consumer, {
|
|
50
57
|
'children': function children(checkType) {
|
|
51
58
|
return _$cc(GroupContext.Consumer, {
|
|
@@ -98,17 +105,46 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
98
105
|
collision: 'flipfit'
|
|
99
106
|
},
|
|
100
107
|
'key': 'dropdown',
|
|
108
|
+
'trigger': 'click',
|
|
109
|
+
'ev-show': function evShow() {
|
|
110
|
+
return keywords.set('');
|
|
111
|
+
},
|
|
101
112
|
'children': [_$cc(Button, {
|
|
102
113
|
'icon': true,
|
|
103
114
|
'size': 'mini',
|
|
104
115
|
'className': 'k-table-group',
|
|
105
|
-
'ev-click':
|
|
116
|
+
'ev-click': function evClick(e) {
|
|
117
|
+
return e._ignoreSortable = true;
|
|
118
|
+
},
|
|
106
119
|
'children': _$cc(Icon, _$tmp0)
|
|
107
120
|
}), _$cc(DropdownMenu, {
|
|
108
121
|
'className': _$cn((_$cn2 = {
|
|
109
122
|
"k-table-group-dropdown": true
|
|
110
123
|
}, _$cn2[makeGroupMenuStyles()] = true, _$cn2)),
|
|
111
|
-
'children': _$
|
|
124
|
+
'children': [_$ce(2, 'div', _$cc(Input, {
|
|
125
|
+
'size': 'small',
|
|
126
|
+
'fluid': true,
|
|
127
|
+
'placeholder': _$('请输入关键字'),
|
|
128
|
+
'value': keywords.value,
|
|
129
|
+
'ev-$change:value': keywords.set,
|
|
130
|
+
'clearable': true,
|
|
131
|
+
'$blocks': function ($blocks) {
|
|
132
|
+
var _$blocks = {},
|
|
133
|
+
__$blocks = _$ex({}, $blocks);
|
|
134
|
+
|
|
135
|
+
return (_$blocks['suffix'] = function ($super) {
|
|
136
|
+
return _$cc(Icon, _$tmp1);
|
|
137
|
+
}, __$blocks['suffix'] = function ($super, data) {
|
|
138
|
+
var block = $blocks['suffix'];
|
|
139
|
+
|
|
140
|
+
var callBlock = function callBlock() {
|
|
141
|
+
return _$blocks['suffix'].call($this, $super, data);
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
return block ? block.call($this, callBlock, data) : callBlock();
|
|
145
|
+
}), __$blocks;
|
|
146
|
+
}.call($this, _$em)
|
|
147
|
+
}), 2, 'k-table-group-header'), _$ce(2, 'div', _$ma(filteredGroup.value, function ($value, $key) {
|
|
112
148
|
return _$cc(DropdownItem, {
|
|
113
149
|
'ev-select': function evSelect() {
|
|
114
150
|
return onSelect($value.value, groupValue, onChange);
|
|
@@ -122,9 +158,9 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
122
158
|
'children': $value.label
|
|
123
159
|
}) : _$ce(2, 'span', $value.label, 0)
|
|
124
160
|
});
|
|
125
|
-
}, $this)
|
|
161
|
+
}, $this), 4, 'k-table-group-body')]
|
|
126
162
|
})]
|
|
127
|
-
}, 'dropdown') : undefined, sortable ? _$ce(2, 'div', [_$cc(Icon, _$
|
|
163
|
+
}, 'dropdown') : undefined, sortable ? _$ce(2, 'div', [_$cc(Icon, _$tmp2), _$cc(Icon, _$tmp3)], 4, _$cn((_$cn3 = {
|
|
128
164
|
'k-column-sort': true
|
|
129
165
|
}, _$cn3["k-" + type] = type, _$cn3))) : undefined], 0, 'k-table-title')], 0, _$cn(classNameObj), {
|
|
130
166
|
'style': style,
|
|
@@ -352,7 +352,7 @@ describe('Table', function () {
|
|
|
352
352
|
_instance$refs4 = instance.refs, __test1 = _instance$refs4.__test1, __test2 = _instance$refs4.__test2;
|
|
353
353
|
_element$querySelecto8 = element.querySelectorAll('.k-table'), table1 = _element$querySelecto8[0], table2 = _element$querySelecto8[1];
|
|
354
354
|
icon = table1.querySelector('.k-table-group');
|
|
355
|
-
dispatchEvent(icon, '
|
|
355
|
+
dispatchEvent(icon, 'click');
|
|
356
356
|
_context7.next = 7;
|
|
357
357
|
return wait();
|
|
358
358
|
|
|
@@ -370,7 +370,7 @@ describe('Table', function () {
|
|
|
370
370
|
});
|
|
371
371
|
expect(table1.innerHTML).to.matchSnapshot();
|
|
372
372
|
icon2 = table2.querySelector('.k-table-group');
|
|
373
|
-
dispatchEvent(icon2, '
|
|
373
|
+
dispatchEvent(icon2, 'click');
|
|
374
374
|
_context7.next = 19;
|
|
375
375
|
return wait();
|
|
376
376
|
|