@king-design/vue 2.0.16 → 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.js +2 -2
- package/components/card/styles.js +10 -2
- package/components/checkbox/styles.js +21 -10
- package/components/collapse/styles.js +6 -1
- package/components/datepicker/styles.d.ts +1 -1
- package/components/datepicker/styles.js +4 -1
- package/components/dialog/base.vdt.js +5 -6
- package/components/dialog/styles.js +16 -14
- package/components/drawer/styles.js +20 -5
- package/components/dropdown/styles.js +1 -1
- package/components/form/styles.js +1 -1
- package/components/icon/index.d.ts +1 -0
- package/components/icon/index.js +2 -1
- package/components/icon/index.vdt.js +4 -2
- package/components/icon/styles.js +10 -2
- package/components/input/styles.js +1 -11
- package/components/message/message.js +1 -1
- package/components/message/message.vdt.js +7 -6
- package/components/message/styles.js +8 -8
- package/components/pagination/index.vdt.js +8 -8
- package/components/pagination/styles.js +11 -2
- package/components/radio/styles.js +16 -6
- package/components/select/base.vdt.js +5 -6
- package/components/select/styles.js +4 -24
- package/components/spinner/index.vdt.js +6 -4
- package/components/spinner/styles.js +33 -5
- package/components/steps/index.d.ts +2 -2
- package/components/steps/index.js +2 -2
- package/components/steps/index.vdt.js +1 -0
- package/components/steps/step.vdt.js +17 -8
- package/components/steps/styles.d.ts +1 -1
- package/components/steps/styles.js +80 -75
- package/components/switch/styles.js +20 -34
- package/components/table/styles.js +9 -4
- package/components/tabs/index.d.ts +1 -1
- package/components/tabs/index.js +1 -1
- package/components/tabs/index.vdt.js +1 -1
- package/components/tabs/styles.js +68 -22
- package/components/tag/base.js +1 -1
- package/components/tag/styles.js +15 -10
- package/components/tip/index.vdt.js +1 -3
- package/components/tip/styles.js +4 -3
- package/components/tooltip/content.vdt.js +4 -4
- package/components/tooltip/styles.js +12 -7
- package/components/transfer/index.vdt.js +3 -1
- package/components/transfer/styles.js +1 -1
- package/components/transfer/useCheck.d.ts +1 -0
- package/components/transfer/useCheck.js +8 -1
- package/components/upload/index.vdt.js +21 -20
- package/components/upload/styles.js +22 -30
- package/i18n/en-US.d.ts +2 -1
- package/i18n/en-US.js +2 -1
- package/index.d.ts +2 -2
- package/index.js +2 -2
- package/package.json +1 -1
- package/styles/fonts/iconfont.eot +0 -0
- package/styles/fonts/iconfont.js +1 -1
- package/styles/fonts/iconfont.svg +189 -369
- package/styles/fonts/iconfont.ttf +0 -0
- package/styles/fonts/iconfont.woff +0 -0
- package/styles/theme.d.ts +10 -2
- package/styles/theme.js +23 -21
|
@@ -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
|
}
|
|
@@ -10,7 +10,12 @@ var defaults = {
|
|
|
10
10
|
},
|
|
11
11
|
|
|
12
12
|
// transition: '15000s',
|
|
13
|
-
border: "1px solid #
|
|
13
|
+
border: "1px solid #e2e5e8",
|
|
14
|
+
|
|
15
|
+
get borderRadius() {
|
|
16
|
+
return theme.borderRadius;
|
|
17
|
+
},
|
|
18
|
+
|
|
14
19
|
fontSize: "12px",
|
|
15
20
|
bgColor: "#fff",
|
|
16
21
|
|
|
@@ -30,7 +35,7 @@ var defaults = {
|
|
|
30
35
|
fontSize: "12px",
|
|
31
36
|
fontWeight: "bold",
|
|
32
37
|
textAlign: 'left',
|
|
33
|
-
height: "
|
|
38
|
+
height: "40px",
|
|
34
39
|
delimiterHeight: '12px',
|
|
35
40
|
delimiterColor: '#bfbfbf'
|
|
36
41
|
},
|
|
@@ -66,7 +71,7 @@ var defaults = {
|
|
|
66
71
|
sort: {
|
|
67
72
|
iconHeight: "7px",
|
|
68
73
|
gap: "10px",
|
|
69
|
-
color: "#
|
|
74
|
+
color: "#d0d5d9",
|
|
70
75
|
disabledColor: "#ddd"
|
|
71
76
|
},
|
|
72
77
|
expandBgColor: '#fdfcff',
|
|
@@ -90,7 +95,7 @@ setDefault(function () {
|
|
|
90
95
|
}).table;
|
|
91
96
|
});
|
|
92
97
|
export function makeStyles() {
|
|
93
|
-
return /*#__PURE__*/css("font-size:", table.fontSize, ";color:", table.color, ";
|
|
98
|
+
return /*#__PURE__*/css("font-size:", table.fontSize, ";color:", table.color, ";position:relative;z-index:0;.k-table-wrapper{border-bottom:", table.border, ";overflow:auto;border-radius:", table.borderRadius, ";}table{width:100%;border-spacing:0;table-layout:fixed;td,th{transition:all ", table.transition, ";}}thead{text-align:", table.thead.textAlign, ";font-size:", table.thead.fontSize, ";font-weight:", table.thead.fontWeight, ";position:sticky;top:0;z-index:2;tr{height:", table.thead.height, ";&:not(:last-of-type) th{border-bottom:", table.border, ";}}}th{padding:", table.thead.padding, ";position:relative;background:", table.thead.bgColor, ";line-height:normal;&:before{content:'';height:", table.thead.delimiterHeight, ";position:absolute;background-color:", table.thead.delimiterColor, ";width:1px;left:1px;top:50%;transform:translateY(-50%);}&:first-of-type:before{display:none;}}.k-table-title{display:inline-flex;align-items:center;max-width:100%;color:", theme.color.lightBlack, ";}.k-table-title-text{flex:1;}tbody{tr{&:hover td{background:", table.tbody.hoverBgcolor, ";}&:last-of-type td{border-bottom-color:transparent;}}}td{padding:", table.tbody.padding, ";border-bottom:", table.border, ";background:", table.bgColor, ";word-wrap:break-word;}.k-fixed-left,.k-fixed-right{position:sticky;z-index:1;&:after{content:'';display:block;transition:box-shadow ", table.transition, ";position:absolute;top:0;bottom:0px;width:10px;pointer-events:none;}}.k-fixed-left:after{right:-11px;}.k-fixed-right:after{left:-11px;}&.k-scroll-left .k-fixed-right:after{box-shadow:", table.fixRightShadow, ";}&.k-scroll-right .k-fixed-left:after{box-shadow:", table.fixLeftShadow, ";}&.k-scroll-middle{.k-fixed-left:after{box-shadow:", table.fixLeftShadow, ";}.k-fixed-right:after{box-shadow:", table.fixRightShadow, ";}}.k-fixed-right+.k-fixed-right:after{display:none;}.k-table-affix-header{position:sticky;top:0;left:0;.k-affix-wrapper{overflow:hidden;}&.k-fixed{position:relative;}}&.k-border,&.k-grid{.k-table-wrapper{border-top:", table.border, ";border-left:", table.border, ";border-right:", table.border, ";}}&.k-grid{td:not(:last-of-type),th:not(:last-of-type){border-right:", table.border, ";}th:before{display:none;}}&.k-stripe{tr:nth-child(even):not(:hover) td{background:", table.stripeBgColor, ";}}.k-table-group{width:", table.group.width, "!important;height:", table.group.width, "!important;margin-left:", table.group.gap, ";position:relative;color:", table.group.color, ";&:hover{color:", theme.color.primary, ";}.k-icon{transition:transform ", table.transition, ";}&.k-dropdown-open .k-icon{transform:rotate(180deg);}}.k-table-check{.k-checkbox,.k-radio{position:relative;top:-1px;}}.k-column-sortable{cursor:pointer;}.k-column-sort{.k-icon{display:block;height:", _sortInstanceProperty(table).iconHeight, ";line-height:", _sortInstanceProperty(table).iconHeight, ";margin-left:", _sortInstanceProperty(table).gap, ";color:", _sortInstanceProperty(table).color, ";}&.k-asc .k-icon.k-desc,&.k-desc .k-icon.k-asc{color:", _sortInstanceProperty(table).disabledColor, ";}}.k-table-spin.k-overlay{z-index:2;}.k-table-empty{text-align:center;}tr.k-expand{td{padding:0;background:#fdfcff;}}&.k-with-expand{tr:not(.k-expand){td{border-bottom:none;}}}.k-table-expand{border-top:", table.border, ";box-sizing:content-box;}tbody tr.k-selected td{background:", table.selectedBgColor, ";}.k-table-arrow{margin-right:", table.arrow.gap, ";transition:transform ", table.transition, ";position:relative;top:-1px;}tr.k-spreaded{.k-table-arrow{transform:rotate(90deg);}}.k-table-resize{height:100%;width:", table.resizeWidth, ";position:absolute;top:0;left:-1px;cursor:ew-resize;}tr.k-dragging{opacity:", table.draggingOpacity, ";}.k-table-scrollbar{overflow-x:auto;overflow-y:hidden;}.k-table-scrollbar-inner{height:1px;}", _mapInstanceProperty(aligns).call(aligns, function (type) {
|
|
94
99
|
return /*#__PURE__*/css(".k-align-", type, "{text-align:", type, ";}");
|
|
95
100
|
}), ";");
|
|
96
101
|
}
|
|
@@ -7,7 +7,7 @@ export interface TabsProps<T = any> {
|
|
|
7
7
|
value?: T;
|
|
8
8
|
vertical?: boolean;
|
|
9
9
|
size?: Sizes;
|
|
10
|
-
type?: 'default' | 'card' | 'border-card' | 'no-border-card';
|
|
10
|
+
type?: 'default' | 'card' | 'border-card' | 'no-border-card' | 'flat-card';
|
|
11
11
|
closable?: boolean;
|
|
12
12
|
beforeChange?: (value: T) => boolean | Promise<boolean>;
|
|
13
13
|
}
|
package/components/tabs/index.js
CHANGED
|
@@ -13,7 +13,7 @@ var typeDefs = {
|
|
|
13
13
|
value: null,
|
|
14
14
|
vertical: Boolean,
|
|
15
15
|
size: sizes,
|
|
16
|
-
type: ['default', 'card', 'border-card', 'no-border-card'],
|
|
16
|
+
type: ['default', 'card', 'border-card', 'no-border-card', 'flat-card'],
|
|
17
17
|
closable: Boolean,
|
|
18
18
|
beforeChange: Function
|
|
19
19
|
};
|
|
@@ -28,7 +28,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
28
28
|
wrapperRef = _this$scroll.wrapperRef;
|
|
29
29
|
var classNameObj = (_classNameObj = {
|
|
30
30
|
'k-tabs': true
|
|
31
|
-
}, _classNameObj["k-" + size] = size, _classNameObj['k-vertical'] = vertical, _classNameObj[
|
|
31
|
+
}, _classNameObj["k-size-" + size] = size, _classNameObj['k-vertical'] = vertical, _classNameObj["k-type-" + type] = true, _classNameObj["k-is-scroll"] = isScroll.value, _classNameObj[className] = className, _classNameObj[makeStyles()] = true, _classNameObj);
|
|
32
32
|
return _$cv('div', _extends({
|
|
33
33
|
'className': _$cn(classNameObj)
|
|
34
34
|
}, getRestProps(this)), [isScroll.value ? _$cc(Button, {
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js/instance/map";
|
|
2
|
+
|
|
3
|
+
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)."; }
|
|
4
|
+
|
|
2
5
|
import { css } from '@emotion/css';
|
|
3
6
|
import { theme, setDefault } from '../../styles/theme';
|
|
4
7
|
import { deepDefaults, sizes } from '../../styles/utils';
|
|
@@ -24,32 +27,28 @@ var defaults = deepDefaults({
|
|
|
24
27
|
return tabs.borderWidth + " solid " + tabs.borderColor;
|
|
25
28
|
},
|
|
26
29
|
|
|
27
|
-
margin: "0 10px",
|
|
28
|
-
|
|
29
30
|
get color() {
|
|
30
31
|
return theme.color.text;
|
|
31
32
|
},
|
|
32
33
|
|
|
33
|
-
|
|
34
|
-
//
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
closeGap: "8px",
|
|
35
|
+
// scroll
|
|
36
|
+
navigatorWidth: "20px",
|
|
37
37
|
//active
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
active: {
|
|
39
|
+
get color() {
|
|
40
|
+
return theme.color.primary;
|
|
41
|
+
},
|
|
41
42
|
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
bar: {
|
|
44
|
+
height: '2px',
|
|
44
45
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
46
|
+
get bgColor() {
|
|
47
|
+
return theme.color.primary;
|
|
48
|
+
}
|
|
49
49
|
|
|
50
|
+
}
|
|
50
51
|
},
|
|
51
|
-
// scroll
|
|
52
|
-
navigatorWidth: "20px",
|
|
53
52
|
// border-card
|
|
54
53
|
borderCard: {
|
|
55
54
|
get bgColor() {
|
|
@@ -61,9 +60,17 @@ var defaults = deepDefaults({
|
|
|
61
60
|
noBorderCard: {
|
|
62
61
|
get bgColor() {
|
|
63
62
|
return theme.color.bg;
|
|
64
|
-
}
|
|
63
|
+
}
|
|
65
64
|
|
|
66
|
-
|
|
65
|
+
},
|
|
66
|
+
// define size
|
|
67
|
+
size: {
|
|
68
|
+
large: {
|
|
69
|
+
padding: '24px'
|
|
70
|
+
},
|
|
71
|
+
default: {
|
|
72
|
+
padding: '16px'
|
|
73
|
+
}
|
|
67
74
|
}
|
|
68
75
|
}, sizes.reduce(function (memo, size) {
|
|
69
76
|
memo[size] = {
|
|
@@ -76,7 +83,9 @@ var defaults = deepDefaults({
|
|
|
76
83
|
},
|
|
77
84
|
|
|
78
85
|
get padding() {
|
|
79
|
-
|
|
86
|
+
var _tabs$size$size;
|
|
87
|
+
|
|
88
|
+
return "0 " + (((_tabs$size$size = tabs.size[size]) == null ? void 0 : _tabs$size$size.padding) || theme[size].padding);
|
|
80
89
|
},
|
|
81
90
|
|
|
82
91
|
get closeFontSize() {
|
|
@@ -93,8 +102,45 @@ setDefault(function () {
|
|
|
93
102
|
}).tabs;
|
|
94
103
|
});
|
|
95
104
|
export function makeStyles() {
|
|
96
|
-
return /*#__PURE__*/css(
|
|
105
|
+
return /*#__PURE__*/css(makeCommonStyles(), ";", makeScrollStyles(), ";&.k-type-default{", makeDefaultStyles(), ";}&.k-type-card{", makeDefaultStyles(), " ", makeCardStyles(), ";}&.k-type-border-card{", makeBorderCardStyles(), ";}&.k-type-no-border-card{", makeNoBorderCardStyles(), ";}");
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function makeCommonStyles() {
|
|
109
|
+
var active = tabs.active;
|
|
110
|
+
var bar = active.bar;
|
|
111
|
+
return /*#__PURE__*/css("position:relative;.k-tab{cursor:pointer;display:inline-block;text-align:center;color:", tabs.color, ";position:relative;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;&:hover,&.k-active{color:", active.color, ";}&.k-disabled{color:", theme.color.disabled, ";cursor:not-allowed;}}.k-tab-close{margin-right:-", tabs.closeGap, ";margin-left:", tabs.closeGap, ";position:relative;top:-1px;color:", theme.color.lightBlack, ";}.k-tabs-active-bar{transition:all ", tabs.transition, ";position:absolute;left:0;height:", bar.height, ";background:", bar.bgColor, ";bottom:calc(-", bar.height, " / 2);}&.k-vertical{display:inline-block;.k-tab{display:block;}.k-tabs-active-bar{left:auto;top:0;right:calc(-", bar.height, " / 2);width:", bar.height, ";height:auto;}}", _mapInstanceProperty(sizes).call(sizes, function (size) {
|
|
97
112
|
var styles = tabs[size];
|
|
98
|
-
return "\n &.k-" + size + " {\n .k-tab {\n font-size: " + styles.fontSize + ";\n height: " + styles.height + ";\n line-height: " + styles.height + ";\n padding: " + styles.padding + ";\n }\n .k-tab-close .k-icon {\n font-size: " + styles.closeFontSize + ";\n }\n }\n ";
|
|
113
|
+
return "\n &.k-size-" + size + " {\n .k-tab {\n font-size: " + styles.fontSize + ";\n height: " + styles.height + ";\n line-height: " + styles.height + ";\n padding: " + styles.padding + ";\n }\n .k-tab-close .k-icon {\n font-size: " + styles.closeFontSize + ";\n }\n }\n ";
|
|
99
114
|
}), ";");
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
function makeScrollStyles() {
|
|
118
|
+
return /*#__PURE__*/css("&:not(.k-vertical){.k-tabs-scroll{overflow:hidden;position:relative;padding-bottom:1px;margin-bottom:-1px;}&.k-tabs-border-card,&.k-tabs-no-border-card{.k-tabs-scroll{padding-bottom:0;margin-bottom:0;}}.k-tabs-wrapper{white-space:nowrap;float:left;transition:transform ", tabs.transition, ";}.k-tabs-prev,.k-tabs-next{position:absolute;top:0;width:", tabs.navigatorWidth, "!important;}.k-tabs-prev{left:0;}.k-tabs-next{right:0;}&.k-is-scroll{padding:0 ", tabs.navigatorWidth, ";}}");
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function makeDefaultStyles() {
|
|
122
|
+
return /*#__PURE__*/css("border-bottom:", tabs.border, ";&.k-vertical{border-bottom:none;border-right:", tabs.border, ";}");
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
function makeCardActiveBarCommonStyles() {
|
|
126
|
+
return /*#__PURE__*/css(process.env.NODE_ENV === "production" ? {
|
|
127
|
+
name: "1c3pzdg",
|
|
128
|
+
styles: "background:#fff;top:0;height:auto;z-index:-1"
|
|
129
|
+
} : {
|
|
130
|
+
name: "1c3pzdg",
|
|
131
|
+
styles: "background:#fff;top:0;height:auto;z-index:-1",
|
|
132
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function makeCardStyles() {
|
|
137
|
+
return /*#__PURE__*/css(".k-tab{margin:0;}.k-tabs-active-bar{", makeCardActiveBarCommonStyles(), ";border-left:", tabs.border, ";border-right:", tabs.border, ";&:before{content:'';display:block;position:absolute;height:", tabs.active.bar.height, ";background:", theme.color.primary, ";top:0;left:-", tabs.borderWidth, ";right:-", tabs.borderWidth, ";}}&.k-vertical{.k-tabs-active-bar{left:0;width:auto;border-left:none;border-right:none;border-top:", tabs.border, ";border-bottom:", tabs.border, ";&:before{width:", tabs.active.bar.height, ";left:0;right:auto;bottom:0;height:auto;}}}");
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
function makeBorderCardStyles() {
|
|
141
|
+
return /*#__PURE__*/css("border:", tabs.border, ";border-bottom:none;background:", tabs.borderCard.bgColor, ";.k-tab{margin:0;}.k-tabs-active-bar{background:#fff;top:0;height:auto;z-index:-1;}&.k-vertical{border-right:none;border-bottom:", tabs.border, ";.k-tabs-active-bar{width:auto;height:0;left:0;bottom:0;right:0;}}");
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
function makeNoBorderCardStyles() {
|
|
145
|
+
return /*#__PURE__*/css("border-radius:", theme.borderRadius, ";.k-tab{&:before{content:'';display:block;position:absolute;background:", tabs.noBorderCard.bgColor, ";top:0;bottom:0;left:0;right:0;z-index:-1;}}.k-tabs-active-bar{background:#fff;top:0;height:auto;z-index:-1;box-shadow:0px 0px 5px rgba(0, 0, 0, 0.08);border-radius:4px 4px 0px 0px;}&.k-vertical{border-right:none;.k-tabs-active-bar{width:auto;height:0;left:0;bottom:0;right:0;}}");
|
|
100
146
|
}
|
package/components/tag/base.js
CHANGED
package/components/tag/styles.js
CHANGED
|
@@ -5,8 +5,8 @@ import { theme, setDefault } from '../../styles/theme';
|
|
|
5
5
|
import '../../styles/global';
|
|
6
6
|
var types = ['primary', 'warning', 'danger', 'success', 'disabled'];
|
|
7
7
|
var defaults = deepDefaults({
|
|
8
|
-
get
|
|
9
|
-
return theme.color.border;
|
|
8
|
+
get border() {
|
|
9
|
+
return "1px solid " + theme.color.border;
|
|
10
10
|
},
|
|
11
11
|
|
|
12
12
|
get borderRadius() {
|
|
@@ -19,6 +19,11 @@ var defaults = deepDefaults({
|
|
|
19
19
|
|
|
20
20
|
padding: "0 8px",
|
|
21
21
|
height: '20px',
|
|
22
|
+
|
|
23
|
+
get bgColor() {
|
|
24
|
+
return theme.color.bg;
|
|
25
|
+
},
|
|
26
|
+
|
|
22
27
|
close: {
|
|
23
28
|
fontSize: '20px',
|
|
24
29
|
gap: '8px'
|
|
@@ -38,26 +43,26 @@ var defaults = deepDefaults({
|
|
|
38
43
|
|
|
39
44
|
},
|
|
40
45
|
large: {
|
|
41
|
-
padding: "0px
|
|
42
|
-
height: '
|
|
46
|
+
padding: "0px 8px",
|
|
47
|
+
height: '24px',
|
|
43
48
|
close: {
|
|
44
|
-
fontSize: '
|
|
49
|
+
fontSize: '20px',
|
|
45
50
|
gap: '12px'
|
|
46
51
|
}
|
|
47
52
|
},
|
|
48
53
|
small: {
|
|
49
54
|
padding: "0 4px",
|
|
50
|
-
height: '
|
|
55
|
+
height: '16px',
|
|
51
56
|
close: {
|
|
52
|
-
fontSize: '
|
|
57
|
+
fontSize: '12px',
|
|
53
58
|
gap: '4px'
|
|
54
59
|
}
|
|
55
60
|
},
|
|
56
61
|
mini: {
|
|
57
|
-
padding: "0
|
|
62
|
+
padding: "0 2px",
|
|
58
63
|
height: '14px',
|
|
59
64
|
close: {
|
|
60
|
-
fontSize: '
|
|
65
|
+
fontSize: '12px',
|
|
61
66
|
gap: '2px'
|
|
62
67
|
}
|
|
63
68
|
},
|
|
@@ -88,7 +93,7 @@ setDefault(function () {
|
|
|
88
93
|
}).tag;
|
|
89
94
|
});
|
|
90
95
|
export function makeStyles() {
|
|
91
|
-
return /*#__PURE__*/css("display:inline-flex;align-items:center;padding:", tag.padding, ";border:
|
|
96
|
+
return /*#__PURE__*/css("display:inline-flex;align-items:center;padding:", tag.padding, ";border:", tag.border, ";border-radius:", tag.borderRadius, ";font-size:", tag.fontSize, ";height:", tag.height, ";.k-tag-close{font-size:", tag.close.fontSize, ";margin-left:", tag.close.gap, ";}&.k-none{border:none;background:", tag.none.bgColor, ";}", _mapInstanceProperty(types).call(types, function (t) {
|
|
92
97
|
var styles = tag[t];
|
|
93
98
|
return /*#__PURE__*/css("&.k-", t, "{color:", styles.color, ";border-color:", styles.color, ";background:", styles.bgColor, ";}");
|
|
94
99
|
}), " ", _mapInstanceProperty(sizes).call(sizes, function (s) {
|
|
@@ -55,9 +55,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
55
55
|
'className': 'k-tip-close',
|
|
56
56
|
'children': (_$blocks['close'] = function ($super) {
|
|
57
57
|
return _$cc(Icon, {
|
|
58
|
-
'className': '
|
|
59
|
-
'size': 'large',
|
|
60
|
-
'color': type,
|
|
58
|
+
'className': 'k-icon-close',
|
|
61
59
|
'hoverable': !disabled
|
|
62
60
|
});
|
|
63
61
|
}, __$blocks['close'] = function ($super, data) {
|
package/components/tip/styles.js
CHANGED
|
@@ -5,11 +5,12 @@ import { deepDefaults } from '../../styles/utils';
|
|
|
5
5
|
var defaults = {
|
|
6
6
|
title: {
|
|
7
7
|
fontSize: '14px',
|
|
8
|
-
gap: '8px'
|
|
8
|
+
gap: '8px',
|
|
9
|
+
fontWeight: '500'
|
|
9
10
|
},
|
|
10
11
|
|
|
11
12
|
get color() {
|
|
12
|
-
return theme.color.
|
|
13
|
+
return theme.color.title;
|
|
13
14
|
},
|
|
14
15
|
|
|
15
16
|
get padding() {
|
|
@@ -24,5 +25,5 @@ setDefault(function () {
|
|
|
24
25
|
}).tip;
|
|
25
26
|
});
|
|
26
27
|
export function makeStyles() {
|
|
27
|
-
return /*#__PURE__*/css("&.k-tip{display:flex;height:auto;padding:0;color:", tip.color, "!important;align-items:flex-start;}.k-tip-wrapper{flex:1;padding:", tip.padding, ";}.k-tip-title{font-size:", tip.title.fontSize, ";margin-bottom:", tip.title.gap, ";}&.k-fade-leave-active{position:relative;}");
|
|
28
|
+
return /*#__PURE__*/css("&.k-tip{display:flex;height:auto;padding:0;color:", tip.color, "!important;align-items:flex-start;}.k-tip-wrapper{flex:1;padding:", tip.padding, ";}.k-tip-title{font-size:", tip.title.fontSize, ";margin-bottom:", tip.title.gap, ";font-weight:", tip.title.fontWeight, ";}&.k-fade-leave-active{position:relative;}.k-tip-close:hover{background:none;}");
|
|
28
29
|
}
|
|
@@ -52,14 +52,14 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
52
52
|
"k-tooltip-arrow": true
|
|
53
53
|
}, _$cn2["k-" + arrowType.value] = arrowType.value, _$cn2)), null, 'tooltip-arrow', arrowRef) : undefined, confirm ? _$ce(2, 'div', (_$blocks['buttons'] = function ($super) {
|
|
54
54
|
return [_$cc(Button, {
|
|
55
|
+
'ev-click': this.cancel,
|
|
56
|
+
'size': 'small',
|
|
57
|
+
'children': cancelText
|
|
58
|
+
}), _$cc(Button, {
|
|
55
59
|
'type': 'primary',
|
|
56
60
|
'ev-click': this.ok,
|
|
57
61
|
'size': 'small',
|
|
58
62
|
'children': okText
|
|
59
|
-
}), _$cc(Button, {
|
|
60
|
-
'ev-click': this.cancel,
|
|
61
|
-
'size': 'small',
|
|
62
|
-
'children': cancelText
|
|
63
63
|
})];
|
|
64
64
|
}, __$blocks['buttons'] = function ($super, data) {
|
|
65
65
|
var block = $blocks['buttons'];
|
|
@@ -13,11 +13,16 @@ var defaults = {
|
|
|
13
13
|
|
|
14
14
|
bgColor: '#fff',
|
|
15
15
|
lineHeight: 1.4,
|
|
16
|
-
maxWidth: '
|
|
16
|
+
maxWidth: '312px',
|
|
17
|
+
|
|
18
|
+
get boxShadow() {
|
|
19
|
+
return theme.middleBoxShadow;
|
|
20
|
+
},
|
|
21
|
+
|
|
17
22
|
// arrow
|
|
18
23
|
arrow: {
|
|
19
|
-
borderColor: 'rgba(
|
|
20
|
-
width: '
|
|
24
|
+
borderColor: 'rgba(221, 221, 221, .5)',
|
|
25
|
+
width: '6px'
|
|
21
26
|
},
|
|
22
27
|
// confirm
|
|
23
28
|
confirm: {
|
|
@@ -26,13 +31,13 @@ var defaults = {
|
|
|
26
31
|
// dark
|
|
27
32
|
dark: {
|
|
28
33
|
get bgColor() {
|
|
29
|
-
return theme.color.
|
|
34
|
+
return theme.color.title;
|
|
30
35
|
},
|
|
31
36
|
|
|
32
37
|
color: '#fff',
|
|
33
38
|
|
|
34
39
|
get arrowBorderColor() {
|
|
35
|
-
return theme.color.
|
|
40
|
+
return theme.color.title;
|
|
36
41
|
}
|
|
37
42
|
|
|
38
43
|
},
|
|
@@ -53,9 +58,9 @@ var directionMap = {
|
|
|
53
58
|
};
|
|
54
59
|
export default function makeStyles() {
|
|
55
60
|
var arrowLong = tooltip.arrow.width;
|
|
56
|
-
var arrowShort = "calc(" + arrowLong + " -
|
|
61
|
+
var arrowShort = "calc(" + arrowLong + " - 1px)"; // use &.k-tooltip-content to override css in dropdown menu
|
|
57
62
|
|
|
58
|
-
return /*#__PURE__*/css("&.k-tooltip-content{max-width:", tooltip.maxWidth, ";min-width:0;padding:", tooltip.padding, ";line-height:", tooltip.lineHeight, ";word-wrap:break-word;pointer-events:none;&.k-hoverable,&.k-always{pointer-events:all;}.k-tooltip-arrow{pointer-events:none;&:before,&{position:absolute;display:block;border-style:solid;border-color:transparent;}&:before{content:' ';}&.k-top,&.k-bottom{&:before,&{border-width:", arrowLong, " ", arrowShort, ";}&:before{left:calc(-1 * ", arrowShort, ");}}&.k-top{top:calc(-2 * ", arrowLong, ");&:before{top:calc(-", arrowLong, " + 1px);}}&.k-bottom{bottom:calc(-2 * ", arrowLong, ");&:before{bottom:calc(-", arrowLong, " + 1px);}}&.k-left,&.k-right{&:before,&{border-width:", arrowShort, " ", arrowLong, ";}&:before{top:calc(-1 * ", arrowShort, ");}}&.k-left{left:calc(-2 * ", arrowLong, ");&:before{left:calc(-", arrowLong, " + 1px);}}&.k-right{right:calc(-2 * ", arrowLong, ");&:before{right:calc(-", arrowLong, " + 1px);}}}", _mapInstanceProperty(themes).call(themes, function (theme) {
|
|
63
|
+
return /*#__PURE__*/css("&.k-tooltip-content{max-width:", tooltip.maxWidth, ";min-width:0;padding:", tooltip.padding, ";line-height:", tooltip.lineHeight, ";word-wrap:break-word;pointer-events:none;box-shadow:", tooltip.boxShadow, ";&.k-hoverable,&.k-always{pointer-events:all;}.k-tooltip-arrow{pointer-events:none;&:before,&{position:absolute;display:block;border-style:solid;border-color:transparent;}&:before{content:' ';}&.k-top,&.k-bottom{&:before,&{border-width:", arrowLong, " ", arrowShort, ";}&:before{left:calc(-1 * ", arrowShort, ");}}&.k-top{top:calc(-2 * ", arrowLong, ");&:before{top:calc(-", arrowLong, " + 1px);}}&.k-bottom{bottom:calc(-2 * ", arrowLong, ");&:before{bottom:calc(-", arrowLong, " + 1px);}}&.k-left,&.k-right{&:before,&{border-width:", arrowShort, " ", arrowLong, ";}&:before{top:calc(-1 * ", arrowShort, ");}}&.k-left{left:calc(-2 * ", arrowLong, ");&:before{left:calc(-", arrowLong, " + 1px);}}&.k-right{right:calc(-2 * ", arrowLong, ");&:before{right:calc(-", arrowLong, " + 1px);}}}", _mapInstanceProperty(themes).call(themes, function (theme) {
|
|
59
64
|
var _context;
|
|
60
65
|
|
|
61
66
|
var borderColor;
|
|
@@ -37,7 +37,8 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
37
37
|
var _this$check = this.check,
|
|
38
38
|
isCheckAll = _this$check.isCheckAll,
|
|
39
39
|
toggleCheckAll = _this$check.toggleCheckAll,
|
|
40
|
-
onCheckboxChange = _this$check.onCheckboxChange
|
|
40
|
+
onCheckboxChange = _this$check.onCheckboxChange,
|
|
41
|
+
isIndeterminate = _this$check.isIndeterminate;
|
|
41
42
|
var classNameObj = (_classNameObj = {
|
|
42
43
|
'k-transfer': true
|
|
43
44
|
}, _classNameObj[className] = className, _classNameObj[makeStyles()] = true, _classNameObj);
|
|
@@ -50,6 +51,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
50
51
|
return [_$ce(2, 'div', [this.get(model + "CheckedKeys.length"), _$ct(' /\n '), data.length], 0, 'k-transfer-count'), _$cc(Checkbox, {
|
|
51
52
|
'className': 'c-ellipsis',
|
|
52
53
|
'value': isCheckAll(model),
|
|
54
|
+
'indeterminate': isIndeterminate(model),
|
|
53
55
|
'ev-click': toggleCheckAll.bind(null, model),
|
|
54
56
|
'children': title
|
|
55
57
|
})];
|
|
@@ -63,5 +63,5 @@ setDefault(function () {
|
|
|
63
63
|
}).transfer;
|
|
64
64
|
});
|
|
65
65
|
export function makeStyles() {
|
|
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, ";}}");
|
|
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;overflow:auto;}.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, ";}}");
|
|
67
67
|
}
|
|
@@ -4,4 +4,5 @@ export declare function useCheck({ getEnabledData, getShowedData }: ReturnType<t
|
|
|
4
4
|
isCheckAll: (model: Model) => boolean | 0;
|
|
5
5
|
toggleCheckAll: (model: Model, e: MouseEvent) => void;
|
|
6
6
|
onCheckboxChange: (model: Model, index: number, e: MouseEvent) => void;
|
|
7
|
+
isIndeterminate: (model: Model) => boolean;
|
|
7
8
|
};
|
|
@@ -33,6 +33,12 @@ export function useCheck(_ref) {
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
+
function isIndeterminate(model) {
|
|
37
|
+
var checked = instance.get(model + "CheckedKeys");
|
|
38
|
+
var data = getEnabledData(model);
|
|
39
|
+
return checked.length > 0 && checked.length < data.length;
|
|
40
|
+
}
|
|
41
|
+
|
|
36
42
|
function onCheckboxChange(model, index, e) {
|
|
37
43
|
if (startIndex === undefined || !e.shiftKey) {
|
|
38
44
|
startIndex = index;
|
|
@@ -84,6 +90,7 @@ export function useCheck(_ref) {
|
|
|
84
90
|
return {
|
|
85
91
|
isCheckAll: isCheckAll,
|
|
86
92
|
toggleCheckAll: toggleCheckAll,
|
|
87
|
-
onCheckboxChange: onCheckboxChange
|
|
93
|
+
onCheckboxChange: onCheckboxChange,
|
|
94
|
+
isIndeterminate: isIndeterminate
|
|
88
95
|
};
|
|
89
96
|
}
|