@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
|
@@ -25,7 +25,6 @@ export function useCheck({getEnabledData, getShowedData}: ReturnType<typeof useF
|
|
|
25
25
|
|
|
26
26
|
return data.length && checked.length >= data.length;
|
|
27
27
|
}
|
|
28
|
-
|
|
29
28
|
function toggleCheckAll(model: Model, e: MouseEvent) {
|
|
30
29
|
if ((e.target as HTMLInputElement).checked) {
|
|
31
30
|
selectAll(model);
|
|
@@ -34,6 +33,13 @@ export function useCheck({getEnabledData, getShowedData}: ReturnType<typeof useF
|
|
|
34
33
|
}
|
|
35
34
|
}
|
|
36
35
|
|
|
36
|
+
function isIndeterminate(model: Model) {
|
|
37
|
+
const checked = instance.get(`${model}CheckedKeys` as CheckedKeys)!;
|
|
38
|
+
const data = getEnabledData(model);
|
|
39
|
+
|
|
40
|
+
return checked.length > 0 && checked.length < data.length;
|
|
41
|
+
}
|
|
42
|
+
|
|
37
43
|
function onCheckboxChange(model: Model, index: number, e: MouseEvent) {
|
|
38
44
|
if (startIndex === undefined || !e.shiftKey) {
|
|
39
45
|
startIndex = index;
|
|
@@ -91,6 +97,7 @@ export function useCheck({getEnabledData, getShowedData}: ReturnType<typeof useF
|
|
|
91
97
|
return {
|
|
92
98
|
isCheckAll,
|
|
93
99
|
toggleCheckAll,
|
|
94
|
-
onCheckboxChange
|
|
100
|
+
onCheckboxChange,
|
|
101
|
+
isIndeterminate
|
|
95
102
|
};
|
|
96
103
|
}
|
|
@@ -6,20 +6,19 @@ order: 4
|
|
|
6
6
|
手动上传需要通过指定`autoUpload`为`false`来关闭自动上传,然后调用组件的`submit`方法来手动上传
|
|
7
7
|
|
|
8
8
|
```vdt
|
|
9
|
-
import {Upload} from 'kpc';
|
|
10
|
-
import {Button} from 'kpc';
|
|
9
|
+
import {Upload, Button} from 'kpc';
|
|
11
10
|
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
</
|
|
11
|
+
<div>
|
|
12
|
+
<Upload
|
|
13
|
+
ref="instance"
|
|
14
|
+
multiple
|
|
15
|
+
action="//fakestoreapi.com/products"
|
|
16
|
+
autoUpload={false}
|
|
17
|
+
>
|
|
18
|
+
<Button type="primary">选择文件</Button>
|
|
19
|
+
</Upload>
|
|
20
|
+
<Button ev-click={this.upload}>开始上传</Button>
|
|
21
|
+
</div>
|
|
23
22
|
```
|
|
24
23
|
|
|
25
24
|
```styl
|
|
@@ -38,22 +38,26 @@ const handle = (
|
|
|
38
38
|
<b:content>
|
|
39
39
|
<b:children v-if={children}>{children}</b:children>
|
|
40
40
|
<template v-else-if={type !== 'gallery'}>
|
|
41
|
-
<Button
|
|
41
|
+
<Button v-if={type === 'select'}>
|
|
42
|
+
<Icon class="k-icon-upload" />
|
|
43
|
+
{_$('点击上传')}
|
|
44
|
+
</Button>
|
|
42
45
|
<div class="k-upload-area" v-else>
|
|
43
|
-
<Icon class="
|
|
44
|
-
<div
|
|
46
|
+
<Icon class="k-icon-add-big" />
|
|
47
|
+
<div innerHTML={_$('将文件拖到此处,或<a>点击上传</a>')}></div>
|
|
45
48
|
</div>
|
|
46
49
|
</template>
|
|
47
|
-
<
|
|
48
|
-
<Icon class="k-
|
|
49
|
-
|
|
50
|
+
<div v-else class="k-upload-picture-card k-upload-add">
|
|
51
|
+
<Icon class="k-icon-add-big" size="large" />
|
|
52
|
+
<div>{_$('上传图片')}</div>
|
|
53
|
+
</div>
|
|
50
54
|
</b:content>
|
|
51
55
|
</div>
|
|
52
56
|
);
|
|
53
57
|
|
|
54
58
|
const {removeFile} = this.files;
|
|
55
|
-
const closeBtn = (value, index
|
|
56
|
-
<Icon class=
|
|
59
|
+
const closeBtn = (value, index) => (
|
|
60
|
+
<Icon class="k-upload-close k-icon-delete"
|
|
57
61
|
ev-click={() => removeFile(value, index)}
|
|
58
62
|
hoverable
|
|
59
63
|
/>
|
|
@@ -94,13 +98,14 @@ const {show, close, image, isShow} = this.showImage;
|
|
|
94
98
|
class="k-upload-progress"
|
|
95
99
|
/>
|
|
96
100
|
</div>
|
|
97
|
-
<div class="k-upload-overlap k-upload-icons" v-else
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
+
<div class="k-upload-overlap k-upload-icons" v-else>
|
|
102
|
+
<Icon class="k-upload-zoom ion-ios-eye-outline" size="large"
|
|
103
|
+
hoverable
|
|
104
|
+
ev-click={linkEvent($value, show)}
|
|
105
|
+
/>
|
|
106
|
+
{closeBtn($value, $key)}
|
|
101
107
|
</div>
|
|
102
108
|
</Transition>
|
|
103
|
-
{closeBtn($value, $key, 'ion-ios-close')}
|
|
104
109
|
</div>
|
|
105
110
|
<div key="handle" class="c-middle" v-if={!limit || files.length < limit}>
|
|
106
111
|
{handle}
|
|
@@ -120,28 +125,29 @@ const {show, close, image, isShow} = this.showImage;
|
|
|
120
125
|
}}
|
|
121
126
|
key={$value.uid}
|
|
122
127
|
>
|
|
123
|
-
<div class="k-upload-
|
|
124
|
-
<
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
128
|
+
<div class="k-upload-file-main">
|
|
129
|
+
<div class="k-upload-name c-ellipsis">
|
|
130
|
+
<Icon class="k-upload-file-icon ion-document" />
|
|
131
|
+
<span class="k-upload-file-name">{$value.name}</span>
|
|
132
|
+
<Icon class="k-upload-status-icon ion-ios-checkmark-outline"
|
|
133
|
+
v-if={$value.status === UploadFileStatus.Done}
|
|
134
|
+
/>
|
|
135
|
+
<Icon class="k-upload-status-icon ion-ios-close-outline"
|
|
136
|
+
v-else-if={$value.status === UploadFileStatus.Error}
|
|
137
|
+
/>
|
|
138
|
+
</div>
|
|
139
|
+
<Transition {...expandAnimationCallbacks}>
|
|
140
|
+
<Progress percent={$value.percent}
|
|
141
|
+
size="mini"
|
|
142
|
+
class="k-upload-progress"
|
|
143
|
+
v-if={
|
|
144
|
+
$value.status === UploadFileStatus.Ready ||
|
|
145
|
+
$value.status === UploadFileStatus.Uploading
|
|
146
|
+
}
|
|
147
|
+
/>
|
|
148
|
+
</Transition>
|
|
133
149
|
</div>
|
|
134
|
-
|
|
135
|
-
<Progress percent={$value.percent}
|
|
136
|
-
size="mini"
|
|
137
|
-
class="k-upload-progress"
|
|
138
|
-
v-if={
|
|
139
|
-
$value.status === UploadFileStatus.Ready ||
|
|
140
|
-
$value.status === UploadFileStatus.Uploading
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
/>
|
|
144
|
-
</Transition>
|
|
150
|
+
{closeBtn($value, $key)}
|
|
145
151
|
</div>
|
|
146
152
|
</TransitionGroup>
|
|
147
153
|
</div>
|
|
@@ -6,11 +6,10 @@ import '../../styles/global';
|
|
|
6
6
|
const defaults = {
|
|
7
7
|
get transition() { return theme.transition.middle },
|
|
8
8
|
fontSize: '12px',
|
|
9
|
+
get color() { return theme.color.lightBlack },
|
|
9
10
|
tip: {
|
|
10
|
-
gap: '
|
|
11
|
-
get color() { return theme.color.lightBlack }
|
|
11
|
+
gap: '8px',
|
|
12
12
|
},
|
|
13
|
-
closeFontSize: '24px',
|
|
14
13
|
|
|
15
14
|
// files list
|
|
16
15
|
filesGap: '16px',
|
|
@@ -24,22 +23,27 @@ const defaults = {
|
|
|
24
23
|
status: {
|
|
25
24
|
// width: '16px',
|
|
26
25
|
get color() { return theme.color.success },
|
|
27
|
-
gap: '8px',
|
|
28
26
|
get errorColor() { return theme.color.danger },
|
|
27
|
+
offsetRight: '2px',
|
|
28
|
+
},
|
|
29
|
+
delete: {
|
|
30
|
+
width: '20px',
|
|
31
|
+
top: '7px',
|
|
32
|
+
right: '2px',
|
|
29
33
|
},
|
|
30
34
|
get errorColor() { return theme.color.danger },
|
|
31
35
|
},
|
|
32
36
|
|
|
33
37
|
// drag
|
|
34
38
|
drag: {
|
|
35
|
-
get color() { return theme.color.lightBlack },
|
|
36
39
|
get border() { return `1px dashed ${theme.color.border}` },
|
|
37
40
|
get borderRadius() { return theme.borderRadius },
|
|
38
41
|
get hoverBorderColor() { return theme.color.primary },
|
|
39
|
-
|
|
42
|
+
get bgColor() { return theme.color.bg },
|
|
43
|
+
padding: `42px 0`,
|
|
40
44
|
icon: {
|
|
41
|
-
fontSize: '
|
|
42
|
-
|
|
45
|
+
fontSize: '40px',
|
|
46
|
+
gap: '16px',
|
|
43
47
|
},
|
|
44
48
|
get overBorderColor() { return theme.color.primary },
|
|
45
49
|
},
|
|
@@ -54,23 +58,17 @@ const defaults = {
|
|
|
54
58
|
padding: '8px',
|
|
55
59
|
bgColor: '#fff',
|
|
56
60
|
get errorBorderColor() { return theme.color.danger },
|
|
57
|
-
close: {
|
|
58
|
-
top: '-8px',
|
|
59
|
-
right: '-8px',
|
|
60
|
-
fontSize: '18px',
|
|
61
|
-
},
|
|
62
61
|
add: {
|
|
63
62
|
get border() { return `1px dashed ${theme.color.border}` },
|
|
64
|
-
fontSize: '44px',
|
|
65
63
|
get hoverBorderColor() { return theme.color.primary },
|
|
66
64
|
}
|
|
67
65
|
},
|
|
68
66
|
|
|
69
67
|
// overlap
|
|
70
68
|
overlap: {
|
|
71
|
-
bgColor: 'rgba(
|
|
69
|
+
bgColor: 'rgba(21, 27, 30, .5)',
|
|
72
70
|
color: '#fff',
|
|
73
|
-
|
|
71
|
+
iconGap: '16px',
|
|
74
72
|
}
|
|
75
73
|
};
|
|
76
74
|
|
|
@@ -83,14 +81,20 @@ export function makeStyles() {
|
|
|
83
81
|
return css`
|
|
84
82
|
font-size: ${upload.fontSize};
|
|
85
83
|
position: relative;
|
|
86
|
-
|
|
87
|
-
|
|
84
|
+
|
|
85
|
+
// keep vertical align middle
|
|
86
|
+
.k-icon-upload {
|
|
87
|
+
position: relative;
|
|
88
|
+
top: -1px;
|
|
89
|
+
}
|
|
90
|
+
.k-upload-handle {
|
|
88
91
|
display: inline-block;
|
|
89
92
|
vertical-align: middle;
|
|
93
|
+
color: ${upload.color};
|
|
90
94
|
}
|
|
91
95
|
.k-upload-tip {
|
|
92
|
-
margin-
|
|
93
|
-
color: ${upload.
|
|
96
|
+
margin-top: ${upload.tip.gap};
|
|
97
|
+
color: ${upload.color};
|
|
94
98
|
}
|
|
95
99
|
|
|
96
100
|
// filelist
|
|
@@ -99,15 +103,24 @@ export function makeStyles() {
|
|
|
99
103
|
}
|
|
100
104
|
.k-upload-file {
|
|
101
105
|
margin: ${upload.file.margin};
|
|
102
|
-
padding: ${upload.file.
|
|
103
|
-
|
|
106
|
+
padding-right: ${upload.file.delete.width};
|
|
107
|
+
position: relative;
|
|
104
108
|
&:hover {
|
|
105
|
-
background: ${upload.file.bgColor};
|
|
106
109
|
.k-upload-close {
|
|
107
110
|
display: inline-flex;
|
|
111
|
+
position: absolute;
|
|
112
|
+
right: ${upload.file.delete.right};
|
|
113
|
+
top: ${upload.file.delete.top};
|
|
108
114
|
}
|
|
115
|
+
.k-upload-file-main {
|
|
116
|
+
background: ${upload.file.bgColor};
|
|
117
|
+
}
|
|
109
118
|
}
|
|
110
119
|
}
|
|
120
|
+
.k-upload-file-main {
|
|
121
|
+
padding: ${upload.file.padding};
|
|
122
|
+
border-radius: ${upload.file.borderRadius};
|
|
123
|
+
}
|
|
111
124
|
.k-upload-name {
|
|
112
125
|
display: flex;
|
|
113
126
|
align-items: center;
|
|
@@ -121,13 +134,10 @@ export function makeStyles() {
|
|
|
121
134
|
}
|
|
122
135
|
.k-upload-status-icon {
|
|
123
136
|
color: ${upload.file.status.color};
|
|
124
|
-
margin-
|
|
137
|
+
margin-right: ${upload.file.status.offsetRight};
|
|
125
138
|
}
|
|
126
139
|
.k-upload-close {
|
|
127
140
|
display: none;
|
|
128
|
-
.k-icon {
|
|
129
|
-
font-size: ${upload.closeFontSize};
|
|
130
|
-
}
|
|
131
141
|
}
|
|
132
142
|
.k-upload-file.k-error {
|
|
133
143
|
color: ${upload.file.errorColor};
|
|
@@ -144,13 +154,13 @@ export function makeStyles() {
|
|
|
144
154
|
// drag
|
|
145
155
|
&.k-drag {
|
|
146
156
|
.k-upload-handle {
|
|
147
|
-
color: ${upload.drag.color};
|
|
148
157
|
display: block;
|
|
149
158
|
border: ${upload.drag.border};
|
|
150
159
|
border-radius: ${upload.drag.borderRadius};
|
|
151
160
|
cursor: pointer;
|
|
152
161
|
text-align: center;
|
|
153
162
|
transition: border-color ${upload.transition};
|
|
163
|
+
background: ${upload.drag.bgColor};
|
|
154
164
|
&:hover {
|
|
155
165
|
border-color: ${upload.drag.hoverBorderColor};
|
|
156
166
|
}
|
|
@@ -158,9 +168,9 @@ export function makeStyles() {
|
|
|
158
168
|
.k-upload-area {
|
|
159
169
|
padding: ${upload.drag.padding};
|
|
160
170
|
.k-icon {
|
|
171
|
+
display: inline-block;
|
|
161
172
|
font-size: ${upload.drag.icon.fontSize};
|
|
162
|
-
|
|
163
|
-
line-height: 1;
|
|
173
|
+
margin-bottom: ${upload.drag.icon.gap};
|
|
164
174
|
}
|
|
165
175
|
}
|
|
166
176
|
&.k-dragover {
|
|
@@ -182,10 +192,12 @@ export function makeStyles() {
|
|
|
182
192
|
&.k-error {
|
|
183
193
|
border-color: ${upload.gallery.errorBorderColor};
|
|
184
194
|
}
|
|
195
|
+
.k-upload-close {
|
|
196
|
+
display: inline-flex;
|
|
197
|
+
}
|
|
185
198
|
&:hover {
|
|
186
|
-
.k-upload-
|
|
187
|
-
opacity: 1;
|
|
188
|
-
pointer-events: all;
|
|
199
|
+
.k-upload-icons {
|
|
200
|
+
opacity: 1;
|
|
189
201
|
}
|
|
190
202
|
}
|
|
191
203
|
.k-upload-img {
|
|
@@ -193,57 +205,48 @@ export function makeStyles() {
|
|
|
193
205
|
width: 100%;
|
|
194
206
|
height: 100%;
|
|
195
207
|
}
|
|
196
|
-
.k-upload-close {
|
|
197
|
-
position: absolute;
|
|
198
|
-
top: ${upload.gallery.close.top};
|
|
199
|
-
right: ${upload.gallery.close.right};
|
|
200
|
-
display: inline-block;
|
|
201
|
-
opacity: 0;
|
|
202
|
-
transition: opacity ${upload.transition};
|
|
203
|
-
pointer-events: none;
|
|
204
|
-
.k-icon {
|
|
205
|
-
font-size: ${upload.gallery.close.fontSize};
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
208
|
.k-upload-icons {
|
|
209
209
|
opacity: 0;
|
|
210
210
|
transition: opacity ${upload.transition};
|
|
211
211
|
}
|
|
212
|
-
&:hover {
|
|
213
|
-
.k-upload-icons {
|
|
214
|
-
opacity: 1;
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
212
|
}
|
|
218
213
|
|
|
219
214
|
.k-upload-picture-card {
|
|
220
|
-
display: inline-
|
|
215
|
+
display: inline-flex;
|
|
221
216
|
width: ${upload.gallery.width};
|
|
222
217
|
height: ${upload.gallery.height};
|
|
223
218
|
border-radius: ${upload.gallery.borderRadius};
|
|
224
219
|
border: ${upload.gallery.border};
|
|
225
|
-
text-align: center;
|
|
226
|
-
cursor: pointer;
|
|
227
220
|
margin: ${upload.gallery.margin};
|
|
228
221
|
background: ${upload.gallery.bgColor};
|
|
222
|
+
align-items: center;
|
|
223
|
+
justify-content: center;
|
|
224
|
+
flex-direction: column;
|
|
229
225
|
}
|
|
230
226
|
.k-upload-add {
|
|
231
227
|
border: ${upload.gallery.add.border};
|
|
232
|
-
font-size: ${upload.gallery.add.fontSize};
|
|
233
|
-
line-height: calc(${upload.gallery.height} - 2px);
|
|
228
|
+
// font-size: ${upload.gallery.add.fontSize};
|
|
229
|
+
// line-height: calc(${upload.gallery.height} - 2px);
|
|
230
|
+
cursor: pointer;
|
|
234
231
|
&:hover {
|
|
235
232
|
border-color: ${upload.gallery.add.hoverBorderColor};
|
|
236
233
|
}
|
|
237
234
|
}
|
|
238
|
-
|
|
239
235
|
.k-upload-overlap {
|
|
240
236
|
position: absolute;
|
|
241
237
|
width: 100%;
|
|
242
238
|
height: 100%;
|
|
243
239
|
left: 0;
|
|
244
240
|
top: 0;
|
|
245
|
-
color: ${upload.overlap.color};
|
|
246
241
|
background: ${upload.overlap.bgColor};
|
|
242
|
+
display: flex;
|
|
243
|
+
align-items: center;
|
|
244
|
+
justify-content: center;
|
|
245
|
+
gap: ${upload.overlap.iconGap};
|
|
246
|
+
color: ${upload.overlap.color};
|
|
247
|
+
.k-icon:not(:hover) {
|
|
248
|
+
color: inherit;
|
|
249
|
+
}
|
|
247
250
|
.k-upload-progress {
|
|
248
251
|
position: absolute;
|
|
249
252
|
width: 100%;
|
|
@@ -252,13 +255,6 @@ export function makeStyles() {
|
|
|
252
255
|
transform: translateY(-50%);
|
|
253
256
|
}
|
|
254
257
|
}
|
|
255
|
-
.k-upload-zoom {
|
|
256
|
-
display: inline-block;
|
|
257
|
-
position: relative;
|
|
258
|
-
top: 50%;
|
|
259
|
-
transform: translateY(-50%);
|
|
260
|
-
font-size: ${upload.overlap.zoomFontSize};
|
|
261
|
-
}
|
|
262
258
|
`;
|
|
263
259
|
}
|
|
264
260
|
|
|
@@ -7,7 +7,7 @@ export var types = ['primary', 'warning', 'danger', 'active', 'success'];
|
|
|
7
7
|
var sizes = ['large', 'small', 'mini'];
|
|
8
8
|
var btnStyles = {
|
|
9
9
|
get color() {
|
|
10
|
-
return theme.color.
|
|
10
|
+
return theme.color.lightBlack;
|
|
11
11
|
},
|
|
12
12
|
|
|
13
13
|
bgColor: '#fff',
|
|
@@ -235,7 +235,7 @@ export function makeButtonStyles(_ref) {
|
|
|
235
235
|
return cx(
|
|
236
236
|
/*#__PURE__*/
|
|
237
237
|
// extract static styles to individual css method for performance
|
|
238
|
-
css("display:inline-flex;align-items:center;justify-content:center;cursor:pointer;height:", button.height, ";padding:", button.padding, ";outline:none;vertical-align:middle;color:", button.color, ";background:", button.bgColor, ";border-radius:", button.borderRadius, ";border:1px solid ", button.borderColor, ";font-size:", button.fontSize, ";white-space:nowrap;transition:all ", button.transition, ";line-height:", button.lineHeight, "
|
|
238
|
+
css("display:inline-flex;align-items:center;justify-content:center;cursor:pointer;height:", button.height, ";padding:", button.padding, ";outline:none;vertical-align:middle;color:", button.color, ";background:", button.bgColor, ";border-radius:", button.borderRadius, ";border:1px solid ", button.borderColor, ";font-size:", button.fontSize, ";white-space:nowrap;transition:all ", button.transition, ";line-height:", button.lineHeight, ";.k-icon{color:inherit;}&:hover,&:focus{border-color:", button.hoverBorderColor, ";color:", button.hoverColor, ";}&:active{background:", palette(theme.color.primary, -4), ";}.k-button-input{position:absolute;opacity:0;width:0;height:0;}", _mapInstanceProperty(types).call(types, function (type) {
|
|
239
239
|
var typeStyles = button[type];
|
|
240
240
|
return /*#__PURE__*/css("&.k-", type, "{background:", typeStyles.bgColor, ";color:", typeStyles.color, ";border-color:", typeStyles.borderColor, ";&:hover,&:focus{background:", palette(typeStyles.bgColor, -1), ";border-color:", typeStyles.hoverBorderColor, ";color:", typeStyles.color, ";}&:active{background:", palette(typeStyles.bgColor, 1), ";border-color:", palette(typeStyles.borderColor, 1), ";}}");
|
|
241
241
|
}), "&.k-secondary{color:", secondary.color, ";border-color:", secondary.borderColor, ";&:hover,&:focus{background:", secondary.hoverBgColor, ";}&:active{background:", secondary.activeBgColor, ";}}&.k-link{color:", link.color, ";&:hover{color:", link.hoverColor, ";background:", link.hoverBgColor, ";}}&.k-disabled{&,&:hover{color:", button.disabled.color, ";background:", button.disabled.bgColor, ";border-color:", button.disabled.borderColor, ";cursor:not-allowed;}}&.k-none,&.k-link{background:transparent;&,&:hover{border:none;}&.k-active{color:", theme.color.primary, ";}}&.k-none:hover{background:", button.none.hoverBgColor, ";}", _mapInstanceProperty(sizes).call(sizes, function (size) {
|
|
@@ -5,7 +5,15 @@ import '../../styles/global';
|
|
|
5
5
|
var defaults = {
|
|
6
6
|
border: '1px solid #e5e5e5',
|
|
7
7
|
padding: '16px',
|
|
8
|
-
|
|
8
|
+
|
|
9
|
+
get boxShadow() {
|
|
10
|
+
return theme.boxShadow;
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
get borderRadius() {
|
|
14
|
+
return theme.largeBorderRadius;
|
|
15
|
+
},
|
|
16
|
+
|
|
9
17
|
headerHeight: '48px',
|
|
10
18
|
headerFontSize: '14px',
|
|
11
19
|
bgColor: '#fff'
|
|
@@ -17,5 +25,5 @@ setDefault(function () {
|
|
|
17
25
|
}).card;
|
|
18
26
|
});
|
|
19
27
|
export function makeStyles() {
|
|
20
|
-
return /*#__PURE__*/css("border-radius:",
|
|
28
|
+
return /*#__PURE__*/css("border-radius:", card.borderRadius, ";background:", card.bgColor, ";.k-card-header{height:", card.headerHeight, ";line-height:", card.headerHeight, ";padding:0 ", card.padding, ";}.k-card-title{font-size:", card.headerFontSize, ";display:inline-block;}.k-card-extra{float:right;height:100%;display:flex;align-items:center;}.k-card-body{padding:0 ", card.padding, " ", card.padding, ";}&.k-shadow{box-shadow:", card.boxShadow, ";}&.k-none{box-shadow:none;}&.k-border{border:", card.border, ";.k-card-header{border-bottom:", card.border, ";}.k-card-body{padding-top:", card.padding, ";}}&.k-no-header{.k-card-body{padding-top:", card.padding, ";}}&.k-card-grid{.k-card-body{display:flex;padding:0;}&.k-border{.k-card-column:not(:last-of-type){border-right:", card.border, ";}}}.k-card-column{display:flex;align-items:center;padding:", card.padding, ";&.k-fluid{flex:1;}&.k-center{justify-content:center;}}");
|
|
21
29
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { css } from '@emotion/css';
|
|
2
2
|
import { theme, setDefault } from '../../styles/theme';
|
|
3
|
-
import { deepDefaults } from '../../styles/utils';
|
|
3
|
+
import { deepDefaults, palette } from '../../styles/utils';
|
|
4
4
|
import '../../styles/global';
|
|
5
5
|
var defaults = {
|
|
6
|
-
width: '
|
|
6
|
+
width: '16px',
|
|
7
7
|
|
|
8
8
|
get borderColor() {
|
|
9
|
-
return theme.color.
|
|
9
|
+
return theme.color.border;
|
|
10
10
|
},
|
|
11
11
|
|
|
12
12
|
get borderRadius() {
|
|
@@ -17,6 +17,10 @@ var defaults = {
|
|
|
17
17
|
return theme.transition.small;
|
|
18
18
|
},
|
|
19
19
|
|
|
20
|
+
get hoverBorder() {
|
|
21
|
+
return "1px solid " + theme.color.primary;
|
|
22
|
+
},
|
|
23
|
+
|
|
20
24
|
bgColor: '#fff',
|
|
21
25
|
// text
|
|
22
26
|
text: {
|
|
@@ -36,8 +40,8 @@ var defaults = {
|
|
|
36
40
|
inner: {
|
|
37
41
|
width: '5px',
|
|
38
42
|
height: '10px',
|
|
39
|
-
top: '
|
|
40
|
-
left: '
|
|
43
|
+
top: '0px',
|
|
44
|
+
left: '5px',
|
|
41
45
|
border: '1px solid #fff'
|
|
42
46
|
},
|
|
43
47
|
// disabled
|
|
@@ -54,14 +58,21 @@ var defaults = {
|
|
|
54
58
|
return theme.color.disabledBg;
|
|
55
59
|
},
|
|
56
60
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
61
|
+
innerColor: '#fff',
|
|
62
|
+
checked: {
|
|
63
|
+
get borderColor() {
|
|
64
|
+
return palette(theme.color.primary, -3);
|
|
65
|
+
},
|
|
66
|
+
|
|
67
|
+
get bgColor() {
|
|
68
|
+
return palette(theme.color.primary, -3);
|
|
69
|
+
}
|
|
60
70
|
|
|
71
|
+
}
|
|
61
72
|
},
|
|
62
73
|
// indeterminate
|
|
63
74
|
indeterminate: {
|
|
64
|
-
innerLeft: '
|
|
75
|
+
innerLeft: '4px'
|
|
65
76
|
}
|
|
66
77
|
};
|
|
67
78
|
var checkbox;
|
|
@@ -71,5 +82,5 @@ setDefault(function () {
|
|
|
71
82
|
}).checkbox;
|
|
72
83
|
});
|
|
73
84
|
export default function makeStyles() {
|
|
74
|
-
return /*#__PURE__*/css("display:inline-flex;align-items:center;cursor:pointer;vertical-align:middle;.k-checkbox-wrapper{width:", checkbox.width, ";height:", checkbox.width, ";border:1px solid ", checkbox.borderColor, ";border-radius:", checkbox.borderRadius, ";position:relative;transition:all ", checkbox.transition, ";background:", checkbox.bgColor, ";flex:0 0 auto;&:before{content:\"\";display:block;position:absolute;width:", checkbox.inner.width, ";height:", checkbox.inner.height, ";top:", checkbox.inner.top, ";left:", checkbox.inner.left, ";border:", checkbox.inner.border, ";border-top:0;border-left:0;transform:rotate(45deg) scale(0);transition:all ", checkbox.transition, ";}}input{width:100%;height:100%;opacity:0;cursor:pointer;position:absolute;left:0;top:0;margin:0;}.k-checkbox-text{margin-left:", checkbox.text.gap, ";flex:0 1 auto;}&.k-checked,&.k-indeterminate{.k-checkbox-wrapper{border-color:", checkbox.checked.borderColor, ";background:", checkbox.checked.bgColor, ";}}&.k-indeterminate{.k-checkbox-wrapper{&:before{transform:rotate(90deg) scale(1);border-bottom:0;left:", checkbox.indeterminate.innerLeft, ";}}}&.k-checked{.k-checkbox-wrapper{&:before{transform:rotate(45deg) scale(1);}}}&:focus{outline:none;.k-checkbox-wrapper{border-color:", checkbox.checked.borderColor, ";}}&.k-disabled{color:", checkbox.disabled.color, ";cursor:not-allowed;.k-checkbox-wrapper{border-color:", checkbox.disabled.borderColor, ";background:", checkbox.disabled.bgColor, ";&:before{border-color:", checkbox.disabled.innerColor, ";}}input{cursor:not-allowed;}}");
|
|
85
|
+
return /*#__PURE__*/css("display:inline-flex;align-items:center;cursor:pointer;vertical-align:middle;.k-checkbox-wrapper{width:", checkbox.width, ";height:", checkbox.width, ";border:1px solid ", checkbox.borderColor, ";border-radius:", checkbox.borderRadius, ";position:relative;transition:all ", checkbox.transition, ";background:", checkbox.bgColor, ";flex:0 0 auto;&:before{content:\"\";display:block;position:absolute;width:", checkbox.inner.width, ";height:", checkbox.inner.height, ";top:", checkbox.inner.top, ";left:", checkbox.inner.left, ";border:", checkbox.inner.border, ";border-top:0;border-left:0;transform:rotate(45deg) scale(0);transition:all ", checkbox.transition, ";}&:hover{border:", checkbox.hoverBorder, ";}}input{width:100%;height:100%;opacity:0;cursor:pointer;position:absolute;left:0;top:0;margin:0;}.k-checkbox-text{margin-left:", checkbox.text.gap, ";flex:0 1 auto;}&.k-checked,&.k-indeterminate{.k-checkbox-wrapper{border-color:", checkbox.checked.borderColor, ";background:", checkbox.checked.bgColor, ";}}&.k-indeterminate{.k-checkbox-wrapper{&:before{transform:rotate(90deg) scale(1);border-bottom:0;left:", checkbox.indeterminate.innerLeft, ";}}}&.k-checked{.k-checkbox-wrapper{&:before{transform:rotate(45deg) scale(1);}}}&:focus{outline:none;.k-checkbox-wrapper{border-color:", checkbox.checked.borderColor, ";}}&.k-disabled{color:", checkbox.disabled.color, ";cursor:not-allowed;.k-checkbox-wrapper{border-color:", checkbox.disabled.borderColor, ";background:", checkbox.disabled.bgColor, ";&:before{border-color:", checkbox.disabled.innerColor, ";}}input{cursor:not-allowed;}&.k-checked,&.k-indeterminate{.k-checkbox-wrapper{border-color:", checkbox.disabled.checked.borderColor, ";background:", checkbox.disabled.checked.bgColor, ";}}}");
|
|
75
86
|
}
|
|
@@ -14,6 +14,11 @@ var defaults = {
|
|
|
14
14
|
titleMarginRight: '8px',
|
|
15
15
|
borderPadding: '0 24px',
|
|
16
16
|
collBorder: '1px solid #eee',
|
|
17
|
+
|
|
18
|
+
get borderRadius() {
|
|
19
|
+
return theme.largeBorderRadius;
|
|
20
|
+
},
|
|
21
|
+
|
|
17
22
|
item: {
|
|
18
23
|
borderBottom: '1px solid #e5e5e5',
|
|
19
24
|
titleHeight: '40px',
|
|
@@ -27,7 +32,7 @@ setDefault(function () {
|
|
|
27
32
|
}).collapse;
|
|
28
33
|
});
|
|
29
34
|
export function makeStyles() {
|
|
30
|
-
return /*#__PURE__*/css("font-size:", collapse.fontSize, ";&.k-left{.", kls('arrow'), "{float:left;margin-right:", collapse.titleMarginRight, ";transform-origin:center center 0;}}&.k-border{border-radius:",
|
|
35
|
+
return /*#__PURE__*/css("font-size:", collapse.fontSize, ";&.k-left{.", kls('arrow'), "{float:left;margin-right:", collapse.titleMarginRight, ";transform-origin:center center 0;}}&.k-border{border-radius:", collapse.borderRadius, ";padding:", collapse.borderPadding, ";border:", collapse.collBorder, ";}");
|
|
31
36
|
}
|
|
32
37
|
export function makeItemStyles() {
|
|
33
38
|
var collapseItem = collapse.item;
|
|
@@ -7,7 +7,7 @@ import { Transition } from 'intact';
|
|
|
7
7
|
import { getRestProps, stopPropagation } from '../utils';
|
|
8
8
|
import { makeDialogStyles, makeWrapperStyles } from './styles';
|
|
9
9
|
var _$tmp0 = {
|
|
10
|
-
'className': '
|
|
10
|
+
'className': 'k-icon-close'
|
|
11
11
|
};
|
|
12
12
|
export default function ($props, $blocks, $__proto__) {
|
|
13
13
|
var _classNameObj, _$cn2;
|
|
@@ -79,17 +79,16 @@ export default function ($props, $blocks, $__proto__) {
|
|
|
79
79
|
}, __$blocks['body'](_$no)), 0, 'k-dialog-body'), (_$blocks['footer-wrapper'] = function ($super) {
|
|
80
80
|
return _$ce(2, 'div', (_$blocks['footer'] = function ($super) {
|
|
81
81
|
return [_$cc(Button, {
|
|
82
|
+
'className': 'k-dialog-cancel',
|
|
83
|
+
'ev-click': this.cancel,
|
|
84
|
+
'children': cancelText
|
|
85
|
+
}), _$cc(Button, {
|
|
82
86
|
'className': 'k-dialog-ok',
|
|
83
87
|
'type': 'primary',
|
|
84
88
|
'ev-click': this.ok,
|
|
85
89
|
'loading': loading,
|
|
86
90
|
'disabled': disabledOk,
|
|
87
91
|
'children': okText
|
|
88
|
-
}), _$cc(Button, {
|
|
89
|
-
'className': 'k-dialog-cancel',
|
|
90
|
-
'type': 'secondary',
|
|
91
|
-
'ev-click': this.cancel,
|
|
92
|
-
'children': cancelText
|
|
93
92
|
})];
|
|
94
93
|
}, __$blocks['footer'] = function ($super, data) {
|
|
95
94
|
var block = $blocks['footer'];
|