@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
|
@@ -16,7 +16,7 @@ var defaults = {
|
|
|
16
16
|
},
|
|
17
17
|
|
|
18
18
|
padding: '0',
|
|
19
|
-
margin: '0
|
|
19
|
+
margin: '0 24px',
|
|
20
20
|
|
|
21
21
|
get color() {
|
|
22
22
|
return theme.color.text;
|
|
@@ -27,32 +27,33 @@ var defaults = {
|
|
|
27
27
|
},
|
|
28
28
|
|
|
29
29
|
get boxShadow() {
|
|
30
|
-
return theme.
|
|
30
|
+
return theme.largeBoxShadow;
|
|
31
31
|
},
|
|
32
32
|
|
|
33
33
|
// header
|
|
34
34
|
header: {
|
|
35
|
-
fontSize: '
|
|
35
|
+
fontSize: '14px',
|
|
36
|
+
fontWeight: '500',
|
|
36
37
|
|
|
37
38
|
get color() {
|
|
38
39
|
return theme.color.title;
|
|
39
40
|
},
|
|
40
41
|
|
|
41
|
-
height: '
|
|
42
|
-
border: "1px solid #
|
|
43
|
-
closeTop: '
|
|
42
|
+
height: '52px',
|
|
43
|
+
border: "1px solid #e2e5e8",
|
|
44
|
+
closeTop: '9px',
|
|
44
45
|
closeRight: '-9px',
|
|
45
|
-
closeIconFontSize: '
|
|
46
|
+
closeIconFontSize: '16px'
|
|
46
47
|
},
|
|
47
48
|
// body
|
|
48
49
|
body: {
|
|
49
|
-
padding: "
|
|
50
|
+
padding: "24px"
|
|
50
51
|
},
|
|
51
52
|
// footer
|
|
52
53
|
footer: {
|
|
53
|
-
padding: "
|
|
54
|
-
btnGap: "
|
|
55
|
-
border: "1px solid #
|
|
54
|
+
padding: "16px 0",
|
|
55
|
+
btnGap: "8px",
|
|
56
|
+
border: "1px solid #e2e5e8"
|
|
56
57
|
},
|
|
57
58
|
// transition
|
|
58
59
|
transform: 'translateY(-10px) scale(1.05)',
|
|
@@ -62,12 +63,13 @@ var defaults = {
|
|
|
62
63
|
miniWidth: '400px',
|
|
63
64
|
// alert dialog
|
|
64
65
|
alert: {
|
|
65
|
-
padding: "0
|
|
66
|
+
padding: "0 24px",
|
|
66
67
|
bodyMarginTop: "-25px",
|
|
67
68
|
tipIconMarginBottom: '10px',
|
|
68
69
|
tipIconFontSize: '37px',
|
|
69
70
|
tipIconLineHeight: '37px',
|
|
70
71
|
// with title
|
|
72
|
+
titleFontWeight: '500',
|
|
71
73
|
titleTipIconFontSize: '37px',
|
|
72
74
|
titleFontSize: '14px',
|
|
73
75
|
wrapperPaddingLeft: '8px',
|
|
@@ -85,7 +87,7 @@ export function makeDialogStyles() {
|
|
|
85
87
|
|
|
86
88
|
return /*#__PURE__*/css("position:absolute;width:", dialog.width, ";border-radius:", dialog.borderRadius, ";background:", dialog.bgColor, ";font-size:", dialog.fontSize, ";color:", dialog.color, ";box-shadow:", dialog.boxShadow, ";max-width:100%;z-index:", theme.maxZIndex, ";&.k-dragging{cursor:move;user-select:none;}&.transition-enter-active,&.transition-leave-active,&.transition-appear-active{transition:all ", dialog.transition, ";}&.transition-enter-from,&.transition-leave-to,&.transition-appear-from{transform:", dialog.transform, ";opacity:0;}", _mapInstanceProperty(_context = ['large', 'small', 'mini']).call(_context, function (size) {
|
|
87
89
|
return /*#__PURE__*/css("&.k-", size, "{width:", dialog[size + "Width"], ";}");
|
|
88
|
-
}), ".k-dialog-header{padding:0 ", dialog.padding, ";margin:", dialog.margin, ";border-bottom:", dialog.header.border, ";height:", dialog.header.height, ";line-height:", dialog.header.height, ";font-size:", dialog.header.fontSize, ";color:", dialog.header.color, ";position:relative;}.k-dialog-title{display:inline-block;}.k-dialog-close{position:absolute;right:", dialog.header.closeRight, ";top:", dialog.header.closeTop, ";.k-icon{font-size:", dialog.header.closeIconFontSize, ";}}.k-dialog-body{padding:", dialog.body.padding, ";}.k-dialog-footer{text-align:right;padding:", dialog.footer.padding, ";margin:", dialog.margin, ";border-top:", dialog.footer.border, ";.k-btn{margin-left:", dialog.footer.btnGap, ";}}");
|
|
90
|
+
}), ".k-dialog-header{padding:0 ", dialog.padding, ";margin:", dialog.margin, ";border-bottom:", dialog.header.border, ";height:", dialog.header.height, ";line-height:", dialog.header.height, ";font-size:", dialog.header.fontSize, ";color:", dialog.header.color, ";position:relative;font-weight:", dialog.header.fontWeight, ";}.k-dialog-title{display:inline-block;}.k-dialog-close{position:absolute;right:", dialog.header.closeRight, ";top:", dialog.header.closeTop, ";.k-icon{font-size:", dialog.header.closeIconFontSize, ";}}.k-dialog-body{padding:", dialog.body.padding, ";}.k-dialog-footer{text-align:right;padding:", dialog.footer.padding, ";margin:", dialog.margin, ";border-top:", dialog.footer.border, ";.k-btn{margin-left:", dialog.footer.btnGap, ";}}");
|
|
89
91
|
}
|
|
90
92
|
export function makeWrapperStyles() {
|
|
91
93
|
// k-fade-leave-active will add position absolute to the styles
|
|
@@ -98,5 +100,5 @@ export function makeAlertStyles() {
|
|
|
98
100
|
return /*#__PURE__*/css("&.k-alert-dialog{.k-dialog-body{margin-top:", dialog.alert.bodyMarginTop, ";padding:", dialog.alert.padding, ";text-align:center;position:relative;z-index:1;}.k-dialog-header,.k-dialog-footer{border:none;}.k-dialog-tip-icon{margin-bottom:", dialog.alert.tipIconMarginBottom, ";.k-icon{font-size:", dialog.alert.tipIconFontSize, ";line-height:", dialog.alert.tipIconLineHeight, ";}}", _mapInstanceProperty(_context2 = ['success', 'warning', 'error', 'confirm']).call(_context2, function (type) {
|
|
99
101
|
var color = type === 'error' ? theme.color.danger : type === 'confirm' ? theme.color.primary : theme.color[type];
|
|
100
102
|
return /*#__PURE__*/css("&.k-", type, "{.k-dialog-tip-icon{color:", color, ";}}");
|
|
101
|
-
}), " &:not(.k-confirm){.k-dialog-cancel{display:none;}}&.k-with-title{.k-dialog-body{margin-top:", dialog.alert.titleBodyMarginTop, ";text-align:left;}.k-dialog-tip-icon{float:left;.k-icon{font-size:", dialog.alert.titleTipIconFontSize, ";}}.k-alert-dialog-wrapper{overflow:hidden;padding-left:", dialog.alert.wrapperPaddingLeft, ";}.k-alert-dialog-title{line-height:", dialog.alert.tipIconLineHeight, ";font-size:", dialog.alert.titleFontSize, ";}}}");
|
|
103
|
+
}), " &:not(.k-confirm){.k-dialog-cancel{display:none;}}&.k-with-title{.k-dialog-body{margin-top:", dialog.alert.titleBodyMarginTop, ";text-align:left;}.k-dialog-tip-icon{float:left;.k-icon{font-size:", dialog.alert.titleTipIconFontSize, ";}}.k-alert-dialog-wrapper{overflow:hidden;padding-left:", dialog.alert.wrapperPaddingLeft, ";}.k-alert-dialog-title{line-height:", dialog.alert.tipIconLineHeight, ";font-size:", dialog.alert.titleFontSize, ";font-weight:", dialog.alert.titleFontWeight, ";}}}");
|
|
102
104
|
}
|
|
@@ -10,7 +10,7 @@ var defaults = {
|
|
|
10
10
|
},
|
|
11
11
|
|
|
12
12
|
get boxShadow() {
|
|
13
|
-
return theme.
|
|
13
|
+
return theme.largeBoxShadow;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
};
|
|
@@ -21,9 +21,10 @@ setDefault(function () {
|
|
|
21
21
|
}).drawer;
|
|
22
22
|
});
|
|
23
23
|
export function makeStyles(overlay) {
|
|
24
|
-
return /*#__PURE__*/css("
|
|
24
|
+
return /*#__PURE__*/css("position:fixed!important;background:transparent!important;box-shadow:none!important;&.transition-enter-active,&.transition-leave-active,&.transition-appear-active{transition:opacity ", drawer.transition, "!important;overflow:hidden;.k-drawer-content{transition:transform ", drawer.transition, ";}}.k-drawer-content{height:100%;display:flex;background:#fff;flex-direction:column;transform:translateX(0);box-shadow:", drawer.boxShadow, ";.k-dialog-body{flex-grow:1;overflow:auto;}}", _mapInstanceProperty(placements).call(placements, function (placement) {
|
|
25
25
|
var positionValue = '';
|
|
26
26
|
var transformValue = '';
|
|
27
|
+
var borderRadius = '';
|
|
27
28
|
placements.forEach(function (p) {
|
|
28
29
|
// Set top to `0 !important` when overlay is false and placement is right or left
|
|
29
30
|
// Because dialog without overlay don't have positional parent element
|
|
@@ -32,12 +33,26 @@ export function makeStyles(overlay) {
|
|
|
32
33
|
|
|
33
34
|
if (placement === 'left' || placement === 'right') {
|
|
34
35
|
positionValue += 'height: 100% !important;';
|
|
35
|
-
|
|
36
|
+
|
|
37
|
+
if (placement === 'left') {
|
|
38
|
+
borderRadius = "0 " + theme.largeBorderRadius + " " + theme.largeBorderRadius + " 0";
|
|
39
|
+
transformValue = 'translateX(-100%)';
|
|
40
|
+
} else {
|
|
41
|
+
borderRadius = theme.largeBorderRadius + " 0 0 " + theme.largeBorderRadius;
|
|
42
|
+
transformValue = 'translateX(100%)';
|
|
43
|
+
}
|
|
36
44
|
} else {
|
|
37
45
|
positionValue += 'width: 100% !important;';
|
|
38
|
-
|
|
46
|
+
|
|
47
|
+
if (placement === 'top') {
|
|
48
|
+
borderRadius = "0 0 " + theme.largeBorderRadius + " " + theme.largeBorderRadius;
|
|
49
|
+
transformValue = 'translateY(-100%)';
|
|
50
|
+
} else {
|
|
51
|
+
borderRadius = theme.largeBorderRadius + " " + theme.largeBorderRadius + " 0 0";
|
|
52
|
+
transformValue = 'translateY(100%)';
|
|
53
|
+
}
|
|
39
54
|
}
|
|
40
55
|
|
|
41
|
-
return "\n &.k-" + placement + " {\n " + positionValue + "\n &.transition-enter-from,\n &.transition-leave-to,\n &.transition-appear-from {\n transform: none !important;\n .k-drawer-content {\n transform: " + transformValue + ";\n }\n }\n }\n ";
|
|
56
|
+
return "\n &.k-" + placement + " {\n " + positionValue + "\n &.transition-enter-from,\n &.transition-leave-to,\n &.transition-appear-from {\n transform: none !important;\n .k-drawer-content {\n transform: " + transformValue + ";\n }\n }\n .k-drawer-content {\n border-radius: " + borderRadius + ";\n }\n }\n ";
|
|
42
57
|
}), ";");
|
|
43
58
|
}
|
|
@@ -49,7 +49,7 @@ setDefault(function () {
|
|
|
49
49
|
}).dropdown;
|
|
50
50
|
});
|
|
51
51
|
export function makeMenuStyles() {
|
|
52
|
-
return /*#__PURE__*/css("position:absolute;min-width:", dropdown.menu.minWidth, ";background:", dropdown.menu.bgColor, ";border-radius:", dropdown.menu.borderRadius, ";box-shadow:", theme.
|
|
52
|
+
return /*#__PURE__*/css("position:absolute;min-width:", dropdown.menu.minWidth, ";background:", dropdown.menu.bgColor, ";border-radius:", dropdown.menu.borderRadius, ";box-shadow:", theme.middleBoxShadow, ";font-size:", dropdown.menu.fontSize, ";z-index:", dropdown.menu.zIndex, ";top:0;left:0;.k-dropdown{display:block;}");
|
|
53
53
|
}
|
|
54
54
|
export function makeItemStyles() {
|
|
55
55
|
return /*#__PURE__*/css("padding:", dropdown.item.padding, ";cursor:pointer;white-space:nowrap;height:", dropdown.item.height, ";line-height:", dropdown.item.height, ";&.k-hover{background:", dropdown.item.hoverBgColor, ";}&:first-of-type{border-radius:", dropdown.menu.borderRadius, " ", dropdown.menu.borderRadius, " 0 0;}&:last-of-type{border-radius:0 0 ", dropdown.menu.borderRadius, " ", dropdown.menu.borderRadius, ";}&.k-disabled{background:", dropdown.item.disabledBgColor, ";color:", dropdown.item.disabledColor, ";cursor:not-allowed;}.k-checkbox,.k-radio{display:flex;margin:0 -", getRight(dropdown.item.padding), " 0 -", getLeft(dropdown.item.padding), ";padding:", dropdown.item.padding, ";}.k-checkbox-wrapper,.k-radio-wrapper{vertical-align:text-bottom;}.k-checkbox-text,.k-radio-text{vertical-align:baseline;}");
|
|
@@ -56,6 +56,6 @@ export function makeFormStyles() {
|
|
|
56
56
|
var _context;
|
|
57
57
|
|
|
58
58
|
return /*#__PURE__*/css("&.k-inline{.k-form-item{display:inline-block;vertical-align:top;margin-right:", form.item.inlineGap, ";}.k-form-label{width:auto;}}&.k-vertical{.k-form-item,.k-form-label,.k-form-content{display:block;}.k-form-label{width:auto;text-align:left;line-height:inherit;margin-bottom:", form.item.verticalLabelGap, ";}}", _mapInstanceProperty(_context = ['small', 'mini']).call(_context, function (size) {
|
|
59
|
-
return /*#__PURE__*/css("&.k-", size, "{.k-form-item:not(:last-of-type){margin:", form.item[size + "Gap"], ";}&.k-inline{.k-form-item{margin-right:", form.item[size + "InlineGap"], ";}}}");
|
|
59
|
+
return /*#__PURE__*/css("&.k-", size, "{.k-form-item:not(:last-of-type){margin-bottom:", form.item[size + "Gap"], ";}&.k-inline{.k-form-item{margin-right:", form.item[size + "InlineGap"], ";}}}");
|
|
60
60
|
}), ";");
|
|
61
61
|
}
|
|
@@ -10,7 +10,8 @@ var typeDefs = {
|
|
|
10
10
|
size: _concatInstanceProperty(_context = []).call(_context, sizes, ['default', String, Number]),
|
|
11
11
|
color: String,
|
|
12
12
|
rotate: Boolean,
|
|
13
|
-
hoverable: Boolean
|
|
13
|
+
hoverable: Boolean,
|
|
14
|
+
disabled: Boolean
|
|
14
15
|
};
|
|
15
16
|
|
|
16
17
|
var defaults = function defaults() {
|
|
@@ -16,12 +16,14 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
16
16
|
color = _this$get.color,
|
|
17
17
|
rotate = _this$get.rotate,
|
|
18
18
|
hoverable = _this$get.hoverable,
|
|
19
|
-
children = _this$get.children
|
|
19
|
+
children = _this$get.children,
|
|
20
|
+
disabled = _this$get.disabled;
|
|
20
21
|
|
|
21
22
|
var classNameObj = (_classNameObj = {
|
|
22
23
|
'k-icon': true,
|
|
23
24
|
'k-rotate': rotate,
|
|
24
|
-
'k-hoverable': hoverable
|
|
25
|
+
'k-hoverable': !disabled && hoverable,
|
|
26
|
+
'k-disabled': disabled
|
|
25
27
|
}, _classNameObj[className] = className, _classNameObj);
|
|
26
28
|
var _style = {};
|
|
27
29
|
|
|
@@ -11,6 +11,14 @@ var defaults = {
|
|
|
11
11
|
return theme.transition.small;
|
|
12
12
|
},
|
|
13
13
|
|
|
14
|
+
get disabledColor() {
|
|
15
|
+
return theme.color.disabled;
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
get color() {
|
|
19
|
+
return theme.color.lightBlack;
|
|
20
|
+
},
|
|
21
|
+
|
|
14
22
|
fontSize: {
|
|
15
23
|
default: '16px',
|
|
16
24
|
large: '22px',
|
|
@@ -27,11 +35,11 @@ setDefault(function () {
|
|
|
27
35
|
export var colors = ['primary', 'warning', 'danger', 'success'];
|
|
28
36
|
export var sizes = ['large', 'small', 'mini'];
|
|
29
37
|
export default function makeStyles(color) {
|
|
30
|
-
return /*#__PURE__*/css("font-size:", icon.fontSize.default, ";line-height:1;", _mapInstanceProperty(sizes).call(sizes, function (size) {
|
|
38
|
+
return /*#__PURE__*/css("color:", icon.color, ";font-size:", icon.fontSize.default, ";line-height:1;", _mapInstanceProperty(sizes).call(sizes, function (size) {
|
|
31
39
|
var fontSize = icon.fontSize[size];
|
|
32
40
|
return /*#__PURE__*/css("&.k-", size, "{font-size:", fontSize, ";}");
|
|
33
41
|
}), " ", _mapInstanceProperty(colors).call(colors, function (color) {
|
|
34
42
|
var _color = theme.color[color];
|
|
35
43
|
return /*#__PURE__*/css("&.k-", color, "{color:", _color, ";&.k-hoverable:hover{color:", palette(_color, -2), ";}}");
|
|
36
|
-
}), " &.k-rotate:before{animation:", rotate, " 1s infinite linear;}&:before{position:relative;font-size:inherit;z-index:1;}&.k-hoverable{cursor:pointer;transition:color ", icon.transition, ";", color && "\n &:hover {\n color: " + palette(color, -2) + " !important;\n }\n ", ";&:hover{color:", theme.color.primary, ";}}");
|
|
44
|
+
}), " &.k-rotate:before{animation:", rotate, " 1s infinite linear;}&:before{position:relative;font-size:inherit;z-index:1;}&.k-hoverable{cursor:pointer;transition:color ", icon.transition, ";", color && "\n &:hover {\n color: " + palette(color, -2) + " !important;\n }\n ", ";&:hover{color:", theme.color.primary, ";}}&.k-disabled{cursor:not-allowed;color:", icon.disabledColor, "!important;}");
|
|
37
45
|
}
|
|
@@ -101,16 +101,6 @@ var defaults = deepDefaults({
|
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
};
|
|
104
|
-
|
|
105
|
-
if (size === 'large') {
|
|
106
|
-
// use default padding for large size
|
|
107
|
-
Object.defineProperty(memo.large, 'paddingGap', {
|
|
108
|
-
get: function get() {
|
|
109
|
-
return theme.default.padding;
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
|
|
114
104
|
return memo;
|
|
115
105
|
}, {}));
|
|
116
106
|
var input;
|
|
@@ -120,7 +110,7 @@ setDefault(function () {
|
|
|
120
110
|
}).input;
|
|
121
111
|
});
|
|
122
112
|
export function makeStyles() {
|
|
123
|
-
return /*#__PURE__*/css("display:inline-block;width:", input.width, ";vertical-align:middle;.k-input-wrapper{display:inline-block;width:100%;position:relative;}.k-input-inner{display:inline-block;width:100%;border:", input.border, ";background-color:", input.bgColor, ";transition:border ", input.transition, ",background ", input.transition, ",box-shadow ", input.transition, ";border-radius:", input.borderRadius, ";outline:none;position:relative;color:", input.color, ";&:hover{border:", input.hoverBorder, ";z-index:1;}&:focus{border:", input.focusBorder, ";z-index:1;}&::placeholder{color:", input.placeholderColor, ";}}&.k-fluid{width:100%;}.k-input-prefix,.k-input-suffix{position:absolute;top:50%;transform:translateY(-50%);z-index:2;}.k-input-clear{opacity:0;transition:opacity ", input.transition, ";pointer-events:none;color:", input.clearIconColor, ";+*{margin-left:", input.clearIconGap, ";}}&:hover .k-input-clear.k-input-show{opacity:1;pointer-events:all;}&.k-stack-clear{.k-input-clear{position:absolute;z-index:1;right:0;&.k-input-show+i{transition:opacity ", input.transition, ";}}&:hover{.k-input-clear.k-input-show+i{opacity:0;}}}&.k-group{display:table;.k-input-inner{border-radius:0;}.k-input-wrapper:first-child{.k-input-inner{border-radius:", input.borderRadius, " 0 0 ", input.borderRadius, ";}}.k-input-wrapper:last-child{.k-input-inner{border-radius:0 ", input.borderRadius, " ", input.borderRadius, " 0;}}}.k-input-prepend,.k-input-append{display:table-cell;width:1px;vertical-align:middle;background-color:", input.groupBgColor, ";border:", input.border, ";text-align:center;white-space:nowrap;.k-btn{margin:-1px
|
|
113
|
+
return /*#__PURE__*/css("display:inline-block;width:", input.width, ";vertical-align:middle;.k-input-wrapper{display:inline-block;width:100%;position:relative;}.k-input-inner{display:inline-block;width:100%;border:", input.border, ";background-color:", input.bgColor, ";transition:border ", input.transition, ",background ", input.transition, ",box-shadow ", input.transition, ";border-radius:", input.borderRadius, ";outline:none;position:relative;color:", input.color, ";&:hover{border:", input.hoverBorder, ";z-index:1;}&:focus{border:", input.focusBorder, ";z-index:1;}&::placeholder{color:", input.placeholderColor, ";}}&.k-fluid{width:100%;}.k-input-prefix,.k-input-suffix{position:absolute;top:50%;transform:translateY(-50%);z-index:2;color:", theme.color.lightBlack, ";line-height:1;}.k-input-clear{opacity:0;transition:opacity ", input.transition, ";pointer-events:none;color:", input.clearIconColor, ";+*{margin-left:", input.clearIconGap, ";}}&:hover .k-input-clear.k-input-show{opacity:1;pointer-events:all;}&.k-stack-clear{.k-input-clear{position:absolute;z-index:1;right:0;&.k-input-show+i{transition:opacity ", input.transition, ";}}&:hover{.k-input-clear.k-input-show+i{opacity:0;}}}&.k-group{display:table;.k-input-inner{border-radius:0;}.k-input-wrapper:first-child{.k-input-inner{border-radius:", input.borderRadius, " 0 0 ", input.borderRadius, ";}}.k-input-wrapper:last-child{.k-input-inner{border-radius:0 ", input.borderRadius, " ", input.borderRadius, " 0;}}}.k-input-prepend,.k-input-append{display:table-cell;width:1px;vertical-align:middle;background-color:", input.groupBgColor, ";border:", input.border, ";text-align:center;white-space:nowrap;.k-btn{margin:-1px;border:none;&.k-none:hover{background:transparent;}}.k-select{margin:-1px;text-align:left;}}.k-input-prepend{&,.k-btn,.k-select{z-index:1;border-radius:", input.borderRadius, " 0 0 ", input.borderRadius, ";}}.k-input-append{&,.k-btn,.k-select{z-index:1;border-radius:0 ", input.borderRadius, " ", input.borderRadius, " 0;}}.k-input-padding{padding:0 ", input.groupPaddingGap, ";}.k-input-prepend{border-right:none;}.k-input-append{border-left:none;}&.k-disabled{color:", input.disabledColor, ";cursor:not-allowed;.k-input-inner{color:", input.disabledColor, ";border-color:", input.disabledBorderColor, ";background:", input.disabledBgColor, ";cursor:not-allowed;}}", _mapInstanceProperty(sizes).call(sizes, function (size) {
|
|
124
114
|
var styles = input[size];
|
|
125
115
|
var sizeClassName = /*#__PURE__*/css("font-size:", styles.fontSize, ";.k-input-inner{height:", styles.height, ";line-height:", styles.height, ";font-size:", styles.fontSize, ";padding:0 ", styles.paddingGap, ";}.k-input-prefix{left:", styles.paddingGap, ";}.k-input-suffix{right:", styles.paddingGap, ";}&.k-with-prefix{.k-input-inner{padding-left:calc(", styles.paddingGap, " + 1rem + ", input.clearIconGap, ");}}&.k-with-suffix,&.k-clearable{.k-input-inner{padding-right:calc(", styles.paddingGap, " + 1rem + ", input.clearIconGap, ");}}&:not(.k-stack-clear).k-with-suffix.k-clearable{.k-input-inner{padding-right:calc(", styles.paddingGap, " + 2rem + ", input.clearIconGap, " * 2);}}");
|
|
126
116
|
if (size === 'default') return sizeClassName;
|
|
@@ -5,7 +5,8 @@ import { Icon } from '../icon';
|
|
|
5
5
|
import { getRestProps } from '../utils';
|
|
6
6
|
import { makeMessageStyles } from './styles';
|
|
7
7
|
var _$tmp0 = {
|
|
8
|
-
'className': '
|
|
8
|
+
'className': 'k-icon-close',
|
|
9
|
+
'hoverable': true
|
|
9
10
|
};
|
|
10
11
|
export default function ($props, $blocks, $__proto__) {
|
|
11
12
|
var _classNameObj, _$cn2;
|
|
@@ -23,12 +24,12 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
23
24
|
|
|
24
25
|
var classNameObj = (_classNameObj = {
|
|
25
26
|
"k-message": true
|
|
26
|
-
}, _classNameObj["k-" + type] = type
|
|
27
|
+
}, _classNameObj["k-" + type] = type, _classNameObj[makeMessageStyles()] = true, _classNameObj);
|
|
27
28
|
var iconMap = {
|
|
28
|
-
info: 'information',
|
|
29
|
-
warning: '
|
|
30
|
-
success: '
|
|
31
|
-
error: '
|
|
29
|
+
info: 'information-fill',
|
|
30
|
+
warning: 'warning-fill',
|
|
31
|
+
success: 'success-fill',
|
|
32
|
+
error: 'error-fill'
|
|
32
33
|
};
|
|
33
34
|
return _$cv('div', _extends({}, getRestProps(this), {
|
|
34
35
|
'className': _$cn(classNameObj),
|
|
@@ -9,6 +9,7 @@ var defaults = {
|
|
|
9
9
|
},
|
|
10
10
|
|
|
11
11
|
top: "10px",
|
|
12
|
+
left: "0px",
|
|
12
13
|
transform: "translateY(-10px)",
|
|
13
14
|
|
|
14
15
|
get bgColor() {
|
|
@@ -22,11 +23,10 @@ var defaults = {
|
|
|
22
23
|
gap: "10px",
|
|
23
24
|
boxShadow: 'none',
|
|
24
25
|
padding: "7px 33px 8px 8px",
|
|
25
|
-
closeFontSize: "26px",
|
|
26
26
|
fontSize: '12px',
|
|
27
27
|
|
|
28
28
|
get color() {
|
|
29
|
-
return theme.color.
|
|
29
|
+
return theme.color.text;
|
|
30
30
|
},
|
|
31
31
|
|
|
32
32
|
minWidth: '400px',
|
|
@@ -39,10 +39,10 @@ var defaults = {
|
|
|
39
39
|
},
|
|
40
40
|
|
|
41
41
|
icon: {
|
|
42
|
-
color:
|
|
43
|
-
fontSize: "
|
|
42
|
+
// color: `inherit`,
|
|
43
|
+
fontSize: "18px",
|
|
44
44
|
left: "16px",
|
|
45
|
-
top: "
|
|
45
|
+
top: "7px"
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
48
|
var message;
|
|
@@ -52,13 +52,13 @@ setDefault(function () {
|
|
|
52
52
|
}).message;
|
|
53
53
|
});
|
|
54
54
|
export function makeMessagesStyles() {
|
|
55
|
-
return /*#__PURE__*/css("position:fixed;top:", message.top, ";width:100%;pointer-events:none;z-index:", theme.maxZIndex + 1, ";");
|
|
55
|
+
return /*#__PURE__*/css("position:fixed;top:", message.top, ";left:", message.left, ";width:100%;pointer-events:none;z-index:", theme.maxZIndex + 1, ";");
|
|
56
56
|
}
|
|
57
57
|
export function makeMessageStyles() {
|
|
58
58
|
var _context;
|
|
59
59
|
|
|
60
|
-
return /*#__PURE__*/css("text-align:center;width:100%;font-size:", message.fontSize, ";color:", message.color, ";.k-message-container{display:inline-block;box-shadow:", message.boxShadow, ";
|
|
60
|
+
return /*#__PURE__*/css("text-align:center;width:100%;font-size:", message.fontSize, ";color:", message.color, ";.k-message-container{display:inline-block;box-shadow:", message.boxShadow, ";border-radius:", message.borderRadius, ";margin-bottom:", message.gap, ";pointer-events:all;min-width:", message.minWidth, ";max-width:", message.maxWidth, ";position:relative;text-align:", message.textAlign, ";min-height:", message.minHeight, ";}.k-message-wrapper{position:relative;display:inline-block;&.k-with-icon{padding-left:calc(", message.icon.left, " + 14px);}}.k-message-content{display:inline-block;padding:", message.padding, ";vertical-align:middle;word-break:break-word;word-wrap:break-word;}.k-message-close{vertical-align:middle;position:absolute;right:0;top:0;&:hover{background:none;}}.k-message-icon{position:absolute;left:", message.icon.left, ";top:", message.icon.top, ";font-size:", message.icon.fontSize, ";}", _mapInstanceProperty(_context = ['info', 'error', 'success', 'warning']).call(_context, function (type) {
|
|
61
61
|
var color = theme.color[type === 'error' ? 'danger' : type];
|
|
62
|
-
return /*#__PURE__*/css("&.k-", type, "{.k-message-container{
|
|
62
|
+
return /*#__PURE__*/css("&.k-", type, "{.k-message-container{background:", palette(color, -4), ";}.k-message-icon{color:", color, ";}}");
|
|
63
63
|
}), "&.transition-enter-from,&.transition-leave-to{opacity:0;transform:", message.transform, ";}&.transition-enter-active,&.transition-leave-active{transition:transform ", message.transition, ",opacity ", message.transition, ";}&.transition-move{transition:transform ", message.transition, ";}");
|
|
64
64
|
}
|
|
@@ -8,10 +8,10 @@ import { Icon } from '../icon';
|
|
|
8
8
|
import { _$ } from '../../i18n';
|
|
9
9
|
import { makeStyles } from './styles';
|
|
10
10
|
var _$tmp0 = {
|
|
11
|
-
'className': '
|
|
11
|
+
'className': 'k-icon-arrow-left'
|
|
12
12
|
};
|
|
13
13
|
var _$tmp1 = {
|
|
14
|
-
'className': '
|
|
14
|
+
'className': 'k-icon-arrow-right'
|
|
15
15
|
};
|
|
16
16
|
export default function ($props, $blocks, $__proto__) {
|
|
17
17
|
var _classNameObj;
|
|
@@ -140,19 +140,21 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
140
140
|
|
|
141
141
|
return _$cv('div', _extends({
|
|
142
142
|
'className': _$cn(classNameObj)
|
|
143
|
-
}, getRestProps(this)), [_$
|
|
143
|
+
}, getRestProps(this)), [showTotal && !simple ? _$ce(2, 'div', _$('共 {n} 条', {
|
|
144
|
+
n: total
|
|
145
|
+
}), 0, 'k-pagination-total') : undefined, _$cc(ButtonGroup, {
|
|
144
146
|
'checkType': 'radio',
|
|
145
147
|
'children': [_$cc(Button, {
|
|
146
148
|
'icon': true,
|
|
147
149
|
'size': size,
|
|
148
|
-
'type':
|
|
150
|
+
'type': 'none',
|
|
149
151
|
'disabled': value <= 1 || !!(disablePage && disablePage(value - 1, limit)),
|
|
150
152
|
'ev-click': this.prev,
|
|
151
153
|
'children': _$cc(Icon, _$tmp0)
|
|
152
154
|
}), paginationItems, _$cc(Button, {
|
|
153
155
|
'icon': true,
|
|
154
156
|
'size': size,
|
|
155
|
-
'type':
|
|
157
|
+
'type': 'none',
|
|
156
158
|
'disabled': value >= totalPages || !!(disablePage && disablePage(value + 1, limit)),
|
|
157
159
|
'ev-click': this.next,
|
|
158
160
|
'children': _$cc(Icon, _$tmp1)
|
|
@@ -179,8 +181,6 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
179
181
|
'size': size,
|
|
180
182
|
'value': value,
|
|
181
183
|
'ev-change': this.goto
|
|
182
|
-
}), _$ce(2, 'span', _$('页'), 0, 'c-middle')], 4, 'k-pagination-goto') : undefined
|
|
183
|
-
n: total
|
|
184
|
-
}), 0, 'k-pagination-total') : undefined] : undefined]);
|
|
184
|
+
}), _$ce(2, 'span', _$('页'), 0, 'c-middle')], 4, 'k-pagination-goto') : undefined] : undefined]);
|
|
185
185
|
}
|
|
186
186
|
;
|
|
@@ -23,7 +23,16 @@ var defaults = deepDefaults({
|
|
|
23
23
|
gap: '16px',
|
|
24
24
|
btn: {
|
|
25
25
|
gap: '6px',
|
|
26
|
-
padding: '0 3px'
|
|
26
|
+
padding: '0 3px',
|
|
27
|
+
|
|
28
|
+
get borderRadius() {
|
|
29
|
+
return theme.borderRadius;
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
get hoverBgColor() {
|
|
33
|
+
return theme.color.hoverBg;
|
|
34
|
+
}
|
|
35
|
+
|
|
27
36
|
},
|
|
28
37
|
// goto
|
|
29
38
|
goto: {
|
|
@@ -55,7 +64,7 @@ setDefault(function () {
|
|
|
55
64
|
}).pagination;
|
|
56
65
|
});
|
|
57
66
|
export function makeStyles() {
|
|
58
|
-
return /*#__PURE__*/css("font-size:", pagination.fontSize, "
|
|
67
|
+
return /*#__PURE__*/css("font-size:", pagination.fontSize, ";>*{display:inline-block;vertical-align:middle;&:not(:first-child){margin-left:", pagination.gap, ";}}.k-pagination-ellipsis{background-color:transparent;border-color:transparent;}.k-btns{.k-btn{width:auto!important;min-width:", button.height, ";padding:", pagination.btn.padding, ";margin-right:", pagination.btn.gap, ";border-radius:", pagination.btn.borderRadius, "!important;&:last-of-type{margin:0!important;}&:hover{background:", pagination.btn.hoverBgColor, ";}}.k-icon{font-size:18px;}}.k-pagination-goto{.k-input{font-size:inherit;width:", pagination.goto.width, ";margin:", pagination.goto.gap, ";}.k-input-inner{text-align:center;}}.k-select{width:auto;}", _mapInstanceProperty(sizes).call(sizes, function (size) {
|
|
59
68
|
var styles = pagination[size];
|
|
60
69
|
var btnStyles = button[size];
|
|
61
70
|
return /*#__PURE__*/css("&.k-", size, "{font-size:", styles.fontSize, ";.k-btn{margin-right:", styles.btnGap, ";min-width:", btnStyles.height, ";.k-icon{font-size:", styles.iconFontSize, ";}}}");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { css } from '@emotion/css';
|
|
2
|
-
import { deepDefaults } from '../../styles/utils';
|
|
2
|
+
import { deepDefaults, palette } from '../../styles/utils';
|
|
3
3
|
import { theme, setDefault } from '../../styles/theme';
|
|
4
4
|
import '../../styles/global';
|
|
5
5
|
var defaults = {
|
|
6
|
-
width: '
|
|
6
|
+
width: '16px',
|
|
7
7
|
|
|
8
8
|
get transition() {
|
|
9
9
|
return theme.transition.small;
|
|
@@ -38,10 +38,20 @@ var defaults = {
|
|
|
38
38
|
return theme.color.disabledBg;
|
|
39
39
|
},
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
checked: {
|
|
42
|
+
get borderColor() {
|
|
43
|
+
return palette(theme.color.primary, -2);
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
get bgColor() {
|
|
47
|
+
return palette(theme.color.primary, -4);
|
|
48
|
+
},
|
|
44
49
|
|
|
50
|
+
get innerColor() {
|
|
51
|
+
return palette(theme.color.primary, -3);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
}
|
|
45
55
|
}
|
|
46
56
|
};
|
|
47
57
|
var radio;
|
|
@@ -51,5 +61,5 @@ setDefault(function () {
|
|
|
51
61
|
}).radio;
|
|
52
62
|
});
|
|
53
63
|
export function makeStyles() {
|
|
54
|
-
return /*#__PURE__*/css("display:inline-flex;align-items:center;cursor:pointer;vertical-align:middle;.k-radio-wrapper{width:", radio.width, ";height:", radio.width, ";border:1px solid ", radio.borderColor, ";border-radius:50%;transition:all ", radio.transition, ";position:relative;background:", radio.bgColor, ";flex:0 0 auto;&:before{content:\"\";display:block;position:absolute;width:", radio.innerWidth, ";height:", radio.innerWidth, ";top:50%;left:50%;margin-left:calc(-", radio.innerWidth, " / 2);margin-top:calc(-", radio.innerWidth, " / 2);border-radius:50%;background-color:", radio.checkedColor, ";transform:scale(0);transition:all ", radio.transition, ";}}input{width:100%;height:100%;opacity:0;cursor:pointer;position:absolute;}.k-radio-text{margin-left:", radio.textGap, ";flex:0 1 auto;}&.k-checked{.k-radio-wrapper{border-color:", radio.checkedColor, ";&:before{transform:scale(1);}}}&:focus{outline:none;.k-radio-wrapper{border-color:", radio.checkedColor, ";}}&.k-disabled{color:", radio.disabled.color, ";cursor:not-allowed;.k-radio-wrapper{border-color:", radio.disabled.borderColor, ";background:", radio.disabled.bgColor, ";&:before{background:", radio.disabled.innerColor, ";}}
|
|
64
|
+
return /*#__PURE__*/css("display:inline-flex;align-items:center;cursor:pointer;vertical-align:middle;.k-radio-wrapper{width:", radio.width, ";height:", radio.width, ";border:1px solid ", radio.borderColor, ";border-radius:50%;transition:all ", radio.transition, ";position:relative;background:", radio.bgColor, ";flex:0 0 auto;&:before{content:\"\";display:block;position:absolute;width:", radio.innerWidth, ";height:", radio.innerWidth, ";top:50%;left:50%;margin-left:calc(-", radio.innerWidth, " / 2);margin-top:calc(-", radio.innerWidth, " / 2);border-radius:50%;background-color:", radio.checkedColor, ";transform:scale(0);transition:all ", radio.transition, ";}&:hover{border:1px solid ", radio.hoverBorderColor, ";}}input{width:100%;height:100%;opacity:0;cursor:pointer;position:absolute;}.k-radio-text{margin-left:", radio.textGap, ";flex:0 1 auto;}&.k-checked{.k-radio-wrapper{border-color:", radio.checkedColor, ";&:before{transform:scale(1);}}}&:focus{outline:none;.k-radio-wrapper{border-color:", radio.checkedColor, ";}}&.k-disabled{color:", radio.disabled.color, ";cursor:not-allowed;.k-radio-wrapper{border-color:", radio.disabled.borderColor, ";background:", radio.disabled.bgColor, ";}input{cursor:not-allowed;}&.k-checked{.k-radio-wrapper{border-color:", radio.disabled.checked.borderColor, ";background:", radio.disabled.checked.bgColor, ";&:before{background:", radio.disabled.checked.innerColor, ";}}}}");
|
|
55
65
|
}
|
|
@@ -130,9 +130,10 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
130
130
|
|
|
131
131
|
return block ? block.call($this, callBlock, data) : callBlock();
|
|
132
132
|
}, __$blocks['value'](_$no, [value[$key], $label])), 0, 'k-select-text'), _$cc(Icon, {
|
|
133
|
-
'className': '
|
|
133
|
+
'className': 'k-icon-close k-select-close',
|
|
134
134
|
'ev-click': this.delete.bind(this, $key),
|
|
135
|
-
'hoverable': !disabled
|
|
135
|
+
'hoverable': !disabled,
|
|
136
|
+
'disabled': disabled
|
|
136
137
|
})], 4, 'k-select-tag', null, isStringOrNumber($label) ? $label : isStringOrNumber(value[$key]) ? value[$key] : undefined);
|
|
137
138
|
}, $this);
|
|
138
139
|
}, __$blocks['values'] = function ($super, data) {
|
|
@@ -170,10 +171,8 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
170
171
|
'hoverable': true
|
|
171
172
|
}) : undefined, _$ce(2, 'span', (_$blocks['suffix'] = function ($super) {
|
|
172
173
|
return loading ? _$cc(Icon, _$tmp0) : !hideIcon ? _$cc(Icon, {
|
|
173
|
-
'className':
|
|
174
|
-
|
|
175
|
-
'k-disabled': $props.isDisableArrow
|
|
176
|
-
})
|
|
174
|
+
'className': 'k-select-arrow ion-ios-arrow-down',
|
|
175
|
+
'disabled': $props.isDisableArrow
|
|
177
176
|
}) : undefined;
|
|
178
177
|
}, __$blocks['suffix'] = function ($super, data) {
|
|
179
178
|
var block = $blocks['suffix'];
|
|
@@ -33,10 +33,6 @@ var defaults = deepDefaults({
|
|
|
33
33
|
return "1px solid " + theme.color.primary;
|
|
34
34
|
},
|
|
35
35
|
|
|
36
|
-
get iconColor() {
|
|
37
|
-
return theme.color.placeholder;
|
|
38
|
-
},
|
|
39
|
-
|
|
40
36
|
get activeColor() {
|
|
41
37
|
return theme.color.primary;
|
|
42
38
|
},
|
|
@@ -46,7 +42,6 @@ var defaults = deepDefaults({
|
|
|
46
42
|
},
|
|
47
43
|
|
|
48
44
|
suffixGap: '10px',
|
|
49
|
-
disabledArrowColor: '#e5e5e5',
|
|
50
45
|
clearGap: "8px",
|
|
51
46
|
|
|
52
47
|
get placeholderColor() {
|
|
@@ -94,7 +89,7 @@ var defaults = deepDefaults({
|
|
|
94
89
|
},
|
|
95
90
|
tag: {
|
|
96
91
|
margin: "3px 8px 3px 0",
|
|
97
|
-
padding: "
|
|
92
|
+
padding: "1px 8px",
|
|
98
93
|
|
|
99
94
|
get borderRadius() {
|
|
100
95
|
return theme.borderRadius;
|
|
@@ -104,13 +99,13 @@ var defaults = deepDefaults({
|
|
|
104
99
|
return theme.color.bg;
|
|
105
100
|
},
|
|
106
101
|
|
|
107
|
-
disabledBgColor: '#
|
|
102
|
+
disabledBgColor: '#f8f9fa',
|
|
108
103
|
delete: {
|
|
109
104
|
gap: "8px",
|
|
110
105
|
fontSize: '14px',
|
|
111
106
|
|
|
112
107
|
get color() {
|
|
113
|
-
return theme.color.
|
|
108
|
+
return theme.color.lightBlack;
|
|
114
109
|
}
|
|
115
110
|
|
|
116
111
|
}
|
|
@@ -164,21 +159,6 @@ var defaults = deepDefaults({
|
|
|
164
159
|
multipleGap: "1px",
|
|
165
160
|
multipleMargin: "0 2px 1px 0"
|
|
166
161
|
};
|
|
167
|
-
|
|
168
|
-
if (size === 'large') {
|
|
169
|
-
// use default padding for large size
|
|
170
|
-
Object.defineProperty(memo.large, 'padding', {
|
|
171
|
-
get: function get() {
|
|
172
|
-
return "0 " + theme.default.padding;
|
|
173
|
-
}
|
|
174
|
-
});
|
|
175
|
-
Object.defineProperty(memo.large, 'fontSize', {
|
|
176
|
-
get: function get() {
|
|
177
|
-
return theme.default.fontSize;
|
|
178
|
-
}
|
|
179
|
-
});
|
|
180
|
-
}
|
|
181
|
-
|
|
182
162
|
return memo;
|
|
183
163
|
}, {}));
|
|
184
164
|
var select;
|
|
@@ -188,7 +168,7 @@ setDefault(function () {
|
|
|
188
168
|
}).select;
|
|
189
169
|
});
|
|
190
170
|
export default function makeStyles() {
|
|
191
|
-
return /*#__PURE__*/css("display:inline-flex;align-items:center;vertical-align:middle;position:relative;width:", select.width, ";cursor:pointer;outline:none;border:", select.border, ";background:", select.bgColor, ";transition:border ", select.transition, ",background ", select.transition, ",box-shadow ", select.transition, ";border-radius:", select.borderRadius, ";.k-select-main{flex:1;min-width:0;}.k-select-prefix,.k-select-suffix{
|
|
171
|
+
return /*#__PURE__*/css("display:inline-flex;align-items:center;vertical-align:middle;position:relative;width:", select.width, ";cursor:pointer;outline:none;border:", select.border, ";background:", select.bgColor, ";transition:border ", select.transition, ",background ", select.transition, ",box-shadow ", select.transition, ";border-radius:", select.borderRadius, ";.k-select-main{flex:1;min-width:0;}.k-select-prefix,.k-select-suffix{position:relative;}.k-select-suffix{margin-left:", select.suffixGap, ";margin-top:2px;}.k-select-placeholder{color:", select.placeholderColor, ";user-select:none;}&.k-fluid{width:100%;}.k-select-clear{opacity:0;transition:opacity ", select.transition, ",color ", select.transition, "!important;pointer-events:none;position:absolute;z-index:1;top:50%;left:50%;transform:translate(-50%, -50%);}&:hover{border:", select.hoverBorder, ";.k-select-clear.k-show{opacity:1;pointer-events:all;+.k-select-suffix-icon{opacity:0;}}}.k-select-suffix-icon{display:inline-block;transition:opacity ", select.transition, ";}.k-select-arrow{display:inline-block;transition:transform ", select.transition, ";}&.k-dropdown-open{border:", select.focusBorder, ";.k-select-arrow{transform:rotateX(180deg);}}&:focus{outline:none;border:", select.focusBorder, ";}&.k-disabled{color:", select.disabled.color, ";cursor:not-allowed;background:", select.disabled.bgColor, ";border-color:", select.disabled.borderColor, ";.k-select-tag{background:", select.tag.disabledBgColor, ";}}.k-select-values{display:inline-block;margin-right:-", getRight(select.tag.margin), ";width:100%;&.k-with-values{margin:0;}}.k-select-tag{display:inline-flex;align-items:center;padding:", select.tag.padding, ";background:", select.tag.bgColor, ";border-radius:", select.tag.borderRadius, ";margin:", select.tag.margin, ";max-width:calc(100% - ", getRight(select.tag.margin), " - 1px);}.k-select-text{max-width:calc(100% - 18px);word-break:break-word;}.k-select-close{margin-left:", select.tag.delete.gap, ";font-size:", select.tag.delete.fontSize, ";}", _mapInstanceProperty(sizes).call(sizes, function (size) {
|
|
192
172
|
var styles = select[size];
|
|
193
173
|
var className = /*#__PURE__*/css("font-size:", styles.fontSize, ";min-height:", styles.height, ";padding:", styles.padding, ";");
|
|
194
174
|
if (size === 'default') return className;
|
|
@@ -6,16 +6,16 @@ import { Input } from '../input';
|
|
|
6
6
|
import { getRestProps } from '../utils';
|
|
7
7
|
import { makeStyles } from './styles';
|
|
8
8
|
var _$tmp0 = {
|
|
9
|
-
'className': 'k-spinner-icon
|
|
9
|
+
'className': 'k-spinner-icon k-icon-minus-small'
|
|
10
10
|
};
|
|
11
11
|
var _$tmp1 = {
|
|
12
|
-
'className': 'k-spinner-icon
|
|
12
|
+
'className': 'k-spinner-icon k-icon-arrow-down'
|
|
13
13
|
};
|
|
14
14
|
var _$tmp2 = {
|
|
15
|
-
'className': 'k-spinner-icon
|
|
15
|
+
'className': 'k-spinner-icon k-icon-add-small'
|
|
16
16
|
};
|
|
17
17
|
var _$tmp3 = {
|
|
18
|
-
'className': 'k-spinner-icon
|
|
18
|
+
'className': 'k-spinner-icon k-icon-arrow-up'
|
|
19
19
|
};
|
|
20
20
|
export default function ($props, $blocks, $__proto__) {
|
|
21
21
|
var _classNameObj;
|
|
@@ -49,6 +49,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
49
49
|
'disabled': this.isDisabledDecrease(),
|
|
50
50
|
'className': 'k-spinner-btn k-left',
|
|
51
51
|
'size': size,
|
|
52
|
+
'type': 'none',
|
|
52
53
|
'children': !vertical ? _$cc(Icon, _$tmp0) : _$cc(Icon, _$tmp1)
|
|
53
54
|
}), _$cc(Input, {
|
|
54
55
|
'className': 'k-spinner-input',
|
|
@@ -65,6 +66,7 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
65
66
|
'disabled': this.isDisabledIncrease(),
|
|
66
67
|
'className': 'k-spinner-btn k-right',
|
|
67
68
|
'size': size,
|
|
69
|
+
'type': 'none',
|
|
68
70
|
'children': !vertical ? _$cc(Icon, _$tmp2) : _$cc(Icon, _$tmp3)
|
|
69
71
|
})]);
|
|
70
72
|
}
|