@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
|
@@ -10,7 +10,8 @@ import '../../styles/global';
|
|
|
10
10
|
|
|
11
11
|
const defaults = {
|
|
12
12
|
get transition() { return theme.transition.small },
|
|
13
|
-
|
|
13
|
+
get disabledColor() { return theme.color.disabled },
|
|
14
|
+
get color() { return theme.color.lightBlack },
|
|
14
15
|
fontSize: {
|
|
15
16
|
default: '16px',
|
|
16
17
|
large: '22px',
|
|
@@ -29,6 +30,7 @@ export const sizes = ['large', 'small', 'mini'] as const;
|
|
|
29
30
|
|
|
30
31
|
export default function makeStyles(color?: string) {
|
|
31
32
|
return css`
|
|
33
|
+
color: ${icon.color};
|
|
32
34
|
font-size: ${icon.fontSize.default};
|
|
33
35
|
line-height: 1;
|
|
34
36
|
// display: inline-block;
|
|
@@ -73,5 +75,10 @@ export default function makeStyles(color?: string) {
|
|
|
73
75
|
}
|
|
74
76
|
`}
|
|
75
77
|
}
|
|
78
|
+
// disabled
|
|
79
|
+
&.k-disabled {
|
|
80
|
+
cursor: not-allowed;
|
|
81
|
+
color: ${icon.disabledColor} !important;
|
|
82
|
+
}
|
|
76
83
|
`;
|
|
77
84
|
}
|
|
@@ -49,15 +49,6 @@ const defaults = deepDefaults(
|
|
|
49
49
|
get paddingGap() { return styles.padding },
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
if (size === 'large') {
|
|
53
|
-
// use default padding for large size
|
|
54
|
-
Object.defineProperty(memo.large, 'paddingGap', {
|
|
55
|
-
get() {
|
|
56
|
-
return theme.default.padding;
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
|
|
61
52
|
return memo;
|
|
62
53
|
}, {} as Record<Sizes, {fontSize: string, height: string, paddingGap: string}>),
|
|
63
54
|
)
|
|
@@ -112,6 +103,8 @@ export function makeStyles() {
|
|
|
112
103
|
top: 50%;
|
|
113
104
|
transform: translateY(-50%);
|
|
114
105
|
z-index: 2;
|
|
106
|
+
color: ${theme.color.lightBlack};
|
|
107
|
+
line-height: 1;
|
|
115
108
|
}
|
|
116
109
|
|
|
117
110
|
// clearable
|
|
@@ -173,31 +166,31 @@ export function makeStyles() {
|
|
|
173
166
|
text-align: center;
|
|
174
167
|
white-space: nowrap;
|
|
175
168
|
.k-btn {
|
|
176
|
-
margin: -1px
|
|
177
|
-
border-radius: 0;
|
|
169
|
+
margin: -1px;
|
|
178
170
|
border: none;
|
|
171
|
+
&.k-none:hover {
|
|
172
|
+
background: transparent;
|
|
173
|
+
}
|
|
179
174
|
}
|
|
180
|
-
// select
|
|
181
175
|
.k-select {
|
|
182
176
|
margin: -1px;
|
|
183
177
|
text-align: left;
|
|
184
178
|
}
|
|
185
179
|
}
|
|
186
180
|
.k-input-prepend {
|
|
187
|
-
|
|
181
|
+
&,
|
|
182
|
+
.k-btn,
|
|
188
183
|
.k-select {
|
|
189
184
|
z-index: 1;
|
|
190
|
-
|
|
191
|
-
border-radius: ${theme.borderRadius} 0 0 ${theme.borderRadius};
|
|
192
|
-
}
|
|
185
|
+
border-radius: ${input.borderRadius} 0 0 ${input.borderRadius};
|
|
193
186
|
}
|
|
194
187
|
}
|
|
195
188
|
.k-input-append {
|
|
196
|
-
|
|
189
|
+
&,
|
|
190
|
+
.k-btn,
|
|
197
191
|
.k-select {
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
}
|
|
192
|
+
z-index: 1;
|
|
193
|
+
border-radius: 0 ${input.borderRadius} ${input.borderRadius} 0;
|
|
201
194
|
}
|
|
202
195
|
}
|
|
203
196
|
.k-input-padding {
|
|
@@ -256,6 +249,7 @@ export function makeStyles() {
|
|
|
256
249
|
}
|
|
257
250
|
}
|
|
258
251
|
`;
|
|
252
|
+
|
|
259
253
|
if (size === 'default') return sizeClassName;
|
|
260
254
|
return css`
|
|
261
255
|
&.k-${size} {
|
|
@@ -20,15 +20,15 @@ import {bind} from 'kpc';
|
|
|
20
20
|
|
|
21
21
|
export default class extends Component {
|
|
22
22
|
static template = template;
|
|
23
|
-
|
|
23
|
+
|
|
24
24
|
@bind
|
|
25
25
|
showMessage1() {
|
|
26
|
-
Message.info('close after 10s',
|
|
26
|
+
Message.info('close after 10s', 1000000);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
@bind
|
|
30
30
|
showMessage2() {
|
|
31
|
-
Message.
|
|
31
|
+
Message.success('stick message', 0);
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
```
|
|
@@ -14,7 +14,7 @@ sidebar: doc
|
|
|
14
14
|
| --- | --- | --- | --- |
|
|
15
15
|
| content | 提示内容 | `string` | `VNode` | `undefined` |
|
|
16
16
|
| duration | 提示展示多长时间后自动关闭,当传入0时,提示将会一直展示。单位ms | `number` | `5000` |
|
|
17
|
-
| type | 提示类型 | `"info"` | `"error"` | `"success"` | `"warning"
|
|
17
|
+
| type | 提示类型 | `"info"` | `"error"` | `"success"` | `"warning"`|
|
|
18
18
|
| closable | 是否展示关闭按钮 | `boolean` | `true` |
|
|
19
19
|
| hideIcon | 是否隐藏文字前面的icon | `boolean` | `false` |
|
|
20
20
|
|
|
@@ -16,7 +16,7 @@ import {bind} from '../utils';
|
|
|
16
16
|
export interface MessageProps {
|
|
17
17
|
content?: Children
|
|
18
18
|
duration?: number
|
|
19
|
-
type?: 'info' | 'error' | 'success' | 'warning'
|
|
19
|
+
type?: 'info' | 'error' | 'success' | 'warning'
|
|
20
20
|
closable?: boolean
|
|
21
21
|
hideIcon?: boolean
|
|
22
22
|
}
|
|
@@ -45,7 +45,7 @@ export class Message extends Component<MessageProps> {
|
|
|
45
45
|
|
|
46
46
|
static notice(
|
|
47
47
|
content: Children | Partial<MessageProps>,
|
|
48
|
-
duration: number =
|
|
48
|
+
duration: number = 3000,
|
|
49
49
|
type: MessageProps['type'] ='info'
|
|
50
50
|
) {
|
|
51
51
|
if (!messages) {
|
|
@@ -7,15 +7,15 @@ const {type, content, children, closable, hideIcon} = this.get();
|
|
|
7
7
|
|
|
8
8
|
const classNameObj = {
|
|
9
9
|
"k-message": true,
|
|
10
|
-
[`k-${type}`]: type
|
|
10
|
+
[`k-${type}`]: type,
|
|
11
11
|
[makeMessageStyles()]: true,
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
const iconMap = {
|
|
15
|
-
info: 'information',
|
|
16
|
-
warning: '
|
|
17
|
-
success: '
|
|
18
|
-
error: '
|
|
15
|
+
info: 'information-fill',
|
|
16
|
+
warning: 'warning-fill',
|
|
17
|
+
success: 'success-fill',
|
|
18
|
+
error: 'error-fill',
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
<div {...getRestProps(this)}
|
|
@@ -43,7 +43,7 @@ const iconMap = {
|
|
|
43
43
|
class="k-message-close"
|
|
44
44
|
ev-click={this.close}
|
|
45
45
|
>
|
|
46
|
-
<Icon class="
|
|
46
|
+
<Icon class="k-icon-close" hoverable />
|
|
47
47
|
</Button>
|
|
48
48
|
</div>
|
|
49
49
|
</div>
|
|
@@ -6,15 +6,15 @@ import '../../styles/global';
|
|
|
6
6
|
const defaults = {
|
|
7
7
|
get transition() { return theme.transition.middle },
|
|
8
8
|
top: `10px`,
|
|
9
|
+
left: `0px`,
|
|
9
10
|
transform: `translateY(-10px)`,
|
|
10
11
|
get bgColor() { return theme.color.bg },
|
|
11
12
|
get borderRadius() { return theme.borderRadius },
|
|
12
13
|
gap: `10px`,
|
|
13
14
|
boxShadow: 'none',
|
|
14
15
|
padding: `7px 33px 8px 8px`,
|
|
15
|
-
closeFontSize: `26px`,
|
|
16
16
|
fontSize: '12px',
|
|
17
|
-
get color() { return theme.color.
|
|
17
|
+
get color() { return theme.color.text },
|
|
18
18
|
minWidth: '400px',
|
|
19
19
|
maxWidth: '700px',
|
|
20
20
|
minHeight: '32px',
|
|
@@ -22,10 +22,10 @@ const defaults = {
|
|
|
22
22
|
get border() { return `1px solid ${theme.color.border}` },
|
|
23
23
|
|
|
24
24
|
icon: {
|
|
25
|
-
color: `inherit`,
|
|
26
|
-
fontSize: `
|
|
25
|
+
// color: `inherit`,
|
|
26
|
+
fontSize: `18px`,
|
|
27
27
|
left: `16px`,
|
|
28
|
-
top: `
|
|
28
|
+
top: `7px`,
|
|
29
29
|
},
|
|
30
30
|
};
|
|
31
31
|
|
|
@@ -38,6 +38,7 @@ export function makeMessagesStyles() {
|
|
|
38
38
|
return css`
|
|
39
39
|
position: fixed;
|
|
40
40
|
top: ${message.top};
|
|
41
|
+
left: ${message.left};
|
|
41
42
|
width: 100%;
|
|
42
43
|
pointer-events: none;
|
|
43
44
|
z-index: ${theme.maxZIndex + 1};
|
|
@@ -53,7 +54,6 @@ export function makeMessageStyles() {
|
|
|
53
54
|
.k-message-container {
|
|
54
55
|
display: inline-block;
|
|
55
56
|
box-shadow: ${message.boxShadow};
|
|
56
|
-
background: ${message.bgColor};
|
|
57
57
|
border-radius: ${message.borderRadius};
|
|
58
58
|
margin-bottom: ${message.gap};
|
|
59
59
|
pointer-events: all;
|
|
@@ -61,7 +61,6 @@ export function makeMessageStyles() {
|
|
|
61
61
|
max-width: ${message.maxWidth};
|
|
62
62
|
position: relative;
|
|
63
63
|
text-align: ${message.textAlign};
|
|
64
|
-
border: ${message.border};
|
|
65
64
|
min-height: ${message.minHeight};
|
|
66
65
|
}
|
|
67
66
|
.k-message-wrapper {
|
|
@@ -86,36 +85,28 @@ export function makeMessageStyles() {
|
|
|
86
85
|
&:hover {
|
|
87
86
|
background: none;
|
|
88
87
|
}
|
|
89
|
-
.k-icon {
|
|
90
|
-
font-size: ${message.closeFontSize};
|
|
91
|
-
}
|
|
92
88
|
}
|
|
93
89
|
.k-message-icon {
|
|
94
90
|
position: absolute;
|
|
95
91
|
left: ${message.icon.left};
|
|
96
92
|
top: ${message.icon.top};
|
|
97
|
-
color: ${message.icon.color};
|
|
98
93
|
font-size: ${message.icon.fontSize};
|
|
99
94
|
}
|
|
100
|
-
|
|
95
|
+
|
|
96
|
+
${(['info', 'error', 'success', 'warning'] as const).map(type => {
|
|
101
97
|
const color = theme.color[type === 'error' ? 'danger' : type];
|
|
102
98
|
return css`
|
|
103
99
|
&.k-${type} {
|
|
104
100
|
.k-message-container {
|
|
105
|
-
color: ${color};
|
|
106
|
-
border-color: ${color};
|
|
107
101
|
background: ${palette(color, -4)};
|
|
108
102
|
}
|
|
109
|
-
.k-message-
|
|
103
|
+
.k-message-icon {
|
|
110
104
|
color: ${color};
|
|
111
|
-
&:hover {
|
|
112
|
-
color: ${palette(color, 1)}
|
|
113
|
-
}
|
|
114
105
|
}
|
|
115
106
|
}
|
|
116
107
|
`
|
|
117
108
|
})}
|
|
118
|
-
|
|
109
|
+
|
|
119
110
|
// transition
|
|
120
111
|
&.transition-enter-from,
|
|
121
112
|
&.transition-leave-to {
|
|
@@ -115,18 +115,22 @@ let nextPage = value + 1;
|
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
<div class={classNameObj} {...getRestProps(this)}>
|
|
118
|
+
<div v-if={showTotal && !simple} class="k-pagination-total">
|
|
119
|
+
{_$('共 {n} 条', {n: total})}
|
|
120
|
+
</div>
|
|
121
|
+
|
|
118
122
|
<ButtonGroup checkType="radio" v-model="value">
|
|
119
123
|
<Button icon size={size}
|
|
120
|
-
type=
|
|
124
|
+
type="none"
|
|
121
125
|
disabled={value <= 1 || !!(disablePage && disablePage(value - 1, limit))}
|
|
122
126
|
ev-click={this.prev}
|
|
123
|
-
><Icon class="
|
|
127
|
+
><Icon class="k-icon-arrow-left" /></Button>
|
|
124
128
|
<template>{paginationItems}</template>
|
|
125
129
|
<Button icon size={size}
|
|
126
|
-
type=
|
|
130
|
+
type="none"
|
|
127
131
|
disabled={value >= totalPages || !!(disablePage && disablePage(value + 1, limit))}
|
|
128
132
|
ev-click={this.next}
|
|
129
|
-
><Icon class="
|
|
133
|
+
><Icon class="k-icon-arrow-right" /></Button>
|
|
130
134
|
</ButtonGroup>
|
|
131
135
|
|
|
132
136
|
<template v-if={!simple}>
|
|
@@ -142,10 +146,6 @@ let nextPage = value + 1;
|
|
|
142
146
|
<span class="c-middle">{_$('跳至')}</span>
|
|
143
147
|
<Input size={size} value={value} ev-change={this.goto}/>
|
|
144
148
|
<span class="c-middle">{_$('页')}</span>
|
|
145
|
-
</div>
|
|
146
|
-
|
|
147
|
-
<div v-if={showTotal} class="k-pagination-total">
|
|
148
|
-
{_$('共 {n} 条', {n: total})}
|
|
149
|
-
</div>
|
|
149
|
+
</div>
|
|
150
150
|
</template>
|
|
151
151
|
</div>
|
|
@@ -28,12 +28,12 @@ const defaults = deepDefaults(
|
|
|
28
28
|
{
|
|
29
29
|
get fontSize() { return theme.default.fontSize },
|
|
30
30
|
gap: '16px',
|
|
31
|
-
|
|
32
31
|
btn: {
|
|
33
32
|
gap: '6px',
|
|
34
33
|
padding: '0 3px',
|
|
34
|
+
get borderRadius() { return theme.borderRadius },
|
|
35
|
+
get hoverBgColor() { return theme.color.hoverBg }
|
|
35
36
|
},
|
|
36
|
-
|
|
37
37
|
// goto
|
|
38
38
|
goto: {
|
|
39
39
|
width: '60px',
|
|
@@ -60,32 +60,36 @@ setDefault(() => {
|
|
|
60
60
|
export function makeStyles() {
|
|
61
61
|
return css`
|
|
62
62
|
font-size: ${pagination.fontSize};
|
|
63
|
-
|
|
64
|
-
.k-pagination-goto,
|
|
65
|
-
.k-pagination-total {
|
|
66
|
-
margin-left: ${pagination.gap};
|
|
63
|
+
> * {
|
|
67
64
|
display: inline-block;
|
|
68
65
|
vertical-align: middle;
|
|
66
|
+
&:not(:first-child) {
|
|
67
|
+
margin-left: ${pagination.gap};
|
|
68
|
+
}
|
|
69
69
|
}
|
|
70
70
|
.k-pagination-ellipsis {
|
|
71
71
|
background-color: transparent;
|
|
72
72
|
border-color: transparent;
|
|
73
73
|
}
|
|
74
|
+
|
|
74
75
|
.k-btns {
|
|
75
76
|
.k-btn {
|
|
76
77
|
width: auto !important;
|
|
77
78
|
min-width: ${button.height};
|
|
78
79
|
padding: ${pagination.btn.padding};
|
|
79
80
|
margin-right: ${pagination.btn.gap};
|
|
81
|
+
border-radius: ${pagination.btn.borderRadius} !important;
|
|
80
82
|
&:last-of-type {
|
|
81
83
|
margin: 0 !important;
|
|
82
84
|
}
|
|
85
|
+
&:hover {
|
|
86
|
+
background: ${pagination.btn.hoverBgColor};
|
|
87
|
+
}
|
|
83
88
|
}
|
|
84
89
|
.k-icon {
|
|
85
90
|
font-size: 18px;
|
|
86
91
|
}
|
|
87
92
|
}
|
|
88
|
-
|
|
89
93
|
// goto
|
|
90
94
|
.k-pagination-goto {
|
|
91
95
|
.k-input {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {css} from '@emotion/css';
|
|
2
|
-
import {deepDefaults, darken} from '../../styles/utils';
|
|
2
|
+
import {deepDefaults, darken, palette} from '../../styles/utils';
|
|
3
3
|
import {theme, setDefault} from '../../styles/theme';
|
|
4
4
|
import '../../styles/global';
|
|
5
5
|
|
|
6
6
|
const defaults = {
|
|
7
|
-
width: '
|
|
7
|
+
width: '16px',
|
|
8
8
|
get transition() { return theme.transition.small },
|
|
9
9
|
get borderColor() { return theme.color.darkBorder; },
|
|
10
10
|
get hoverBorderColor() { return theme.color.primary; },
|
|
@@ -17,7 +17,17 @@ const defaults = {
|
|
|
17
17
|
get color() { return theme.color.disabled },
|
|
18
18
|
get borderColor() { return theme.color.disabledBorder },
|
|
19
19
|
get bgColor() { return theme.color.disabledBg },
|
|
20
|
-
|
|
20
|
+
checked: {
|
|
21
|
+
get borderColor() {
|
|
22
|
+
return palette(theme.color.primary, -2)
|
|
23
|
+
},
|
|
24
|
+
get bgColor() {
|
|
25
|
+
return palette(theme.color.primary, -4)
|
|
26
|
+
},
|
|
27
|
+
get innerColor() {
|
|
28
|
+
return palette(theme.color.primary, -3)
|
|
29
|
+
}
|
|
30
|
+
}
|
|
21
31
|
}
|
|
22
32
|
};
|
|
23
33
|
|
|
@@ -56,7 +66,10 @@ export function makeStyles() {
|
|
|
56
66
|
background-color: ${radio.checkedColor};
|
|
57
67
|
transform: scale(0);
|
|
58
68
|
transition: all ${radio.transition};
|
|
59
|
-
}
|
|
69
|
+
}
|
|
70
|
+
&:hover {
|
|
71
|
+
border: 1px solid ${radio.hoverBorderColor};
|
|
72
|
+
}
|
|
60
73
|
}
|
|
61
74
|
input {
|
|
62
75
|
width: 100%;
|
|
@@ -77,7 +90,7 @@ export function makeStyles() {
|
|
|
77
90
|
&:before {
|
|
78
91
|
transform: scale(1);
|
|
79
92
|
}
|
|
80
|
-
}
|
|
93
|
+
}
|
|
81
94
|
}
|
|
82
95
|
|
|
83
96
|
// focus
|
|
@@ -94,14 +107,20 @@ export function makeStyles() {
|
|
|
94
107
|
cursor: not-allowed;
|
|
95
108
|
.k-radio-wrapper {
|
|
96
109
|
border-color: ${radio.disabled.borderColor};
|
|
97
|
-
background: ${radio.disabled.bgColor};
|
|
98
|
-
&:before {
|
|
99
|
-
background: ${radio.disabled.innerColor};
|
|
100
|
-
}
|
|
110
|
+
background: ${radio.disabled.bgColor};
|
|
101
111
|
}
|
|
102
112
|
input {
|
|
103
113
|
cursor: not-allowed;
|
|
104
114
|
}
|
|
115
|
+
&.k-checked {
|
|
116
|
+
.k-radio-wrapper {
|
|
117
|
+
border-color: ${radio.disabled.checked.borderColor};
|
|
118
|
+
background: ${radio.disabled.checked.bgColor};
|
|
119
|
+
&:before {
|
|
120
|
+
background: ${radio.disabled.checked.innerColor};
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
105
124
|
}
|
|
106
125
|
`;
|
|
107
126
|
}
|
|
@@ -107,9 +107,10 @@ const {onFocusout, triggerRef} = this.focusout;
|
|
|
107
107
|
{$label}
|
|
108
108
|
</b:value>
|
|
109
109
|
</span>
|
|
110
|
-
<Icon class="
|
|
110
|
+
<Icon class="k-icon-close k-select-close"
|
|
111
111
|
ev-click={this.delete.bind(this, $key)}
|
|
112
112
|
hoverable={!disabled}
|
|
113
|
+
disabled={disabled}
|
|
113
114
|
/>
|
|
114
115
|
</div>
|
|
115
116
|
</b:values>
|
|
@@ -142,10 +143,8 @@ const {onFocusout, triggerRef} = this.focusout;
|
|
|
142
143
|
<b:suffix>
|
|
143
144
|
<Icon class="ion-load-c" rotate v-if={loading} />
|
|
144
145
|
<Icon v-else-if={!hideIcon}
|
|
145
|
-
class=
|
|
146
|
-
|
|
147
|
-
'k-disabled': $props.isDisableArrow
|
|
148
|
-
}}
|
|
146
|
+
class="k-select-arrow ion-ios-arrow-down"
|
|
147
|
+
disabled={$props.isDisableArrow}
|
|
149
148
|
/>
|
|
150
149
|
</b:suffix>
|
|
151
150
|
</span>
|
|
@@ -11,7 +11,7 @@ import {Select, Option} from 'kpc';
|
|
|
11
11
|
|
|
12
12
|
<div>
|
|
13
13
|
<div style="margin-bottom: 16px;">
|
|
14
|
-
<Select v-model="day"
|
|
14
|
+
<Select v-model="day">
|
|
15
15
|
<Option value="Monday">星期一</Option>
|
|
16
16
|
<Option value="Tuesday">星期二</Option>
|
|
17
17
|
<Option value="Wednesday">星期三</Option>
|
|
@@ -60,7 +60,7 @@ export type Container = string | ((parentDom: Element, anchor: Node | null) => E
|
|
|
60
60
|
| --- | --- | --- |
|
|
61
61
|
| value | 自定义选择结果的展示 | `([value: any, label: Children]) => Children` |
|
|
62
62
|
| values | 自定义多选的选择结果的展示 | `([values: any[], labels: Children[]]) => Children` |
|
|
63
|
-
| prefix |
|
|
63
|
+
| prefix | 自定义输入框前面展示的内容 | - |
|
|
64
64
|
| suffix | 自定义输入框后面展示的内容 | - |
|
|
65
65
|
| menu | 自定义整个菜单的内容 | - |
|
|
66
66
|
|
|
@@ -22,11 +22,9 @@ const defaults = deepDefaults(
|
|
|
22
22
|
get focusBorder() { return `1px solid ${theme.color.primary}` },
|
|
23
23
|
// get hoverBorder() { return `1px solid ${theme.color.darkBorder}` },
|
|
24
24
|
get hoverBorder() { return `1px solid ${theme.color.primary}` },
|
|
25
|
-
get iconColor() { return theme.color.placeholder },
|
|
26
25
|
get activeColor() { return theme.color.primary },
|
|
27
26
|
get borderRadius() { return theme.borderRadius },
|
|
28
27
|
suffixGap: '10px',
|
|
29
|
-
disabledArrowColor: '#e5e5e5',
|
|
30
28
|
|
|
31
29
|
clearGap: `8px`,
|
|
32
30
|
get placeholderColor() { return theme.color.placeholder },
|
|
@@ -58,15 +56,15 @@ const defaults = deepDefaults(
|
|
|
58
56
|
},
|
|
59
57
|
tag: {
|
|
60
58
|
margin: `3px 8px 3px 0`,
|
|
61
|
-
padding: `
|
|
59
|
+
padding: `1px 8px`,
|
|
62
60
|
get borderRadius() { return theme.borderRadius },
|
|
63
61
|
get bgColor() { return theme.color.bg },
|
|
64
|
-
disabledBgColor: '#
|
|
62
|
+
disabledBgColor: '#f8f9fa',
|
|
65
63
|
|
|
66
64
|
delete: {
|
|
67
65
|
gap: `8px`,
|
|
68
66
|
fontSize: '14px',
|
|
69
|
-
get color() { return theme.color.
|
|
67
|
+
get color() { return theme.color.lightBlack },
|
|
70
68
|
}
|
|
71
69
|
},
|
|
72
70
|
|
|
@@ -106,20 +104,6 @@ const defaults = deepDefaults(
|
|
|
106
104
|
multipleMargin: `0 2px 1px 0`,
|
|
107
105
|
}
|
|
108
106
|
|
|
109
|
-
if (size === 'large') {
|
|
110
|
-
// use default padding for large size
|
|
111
|
-
Object.defineProperty(memo.large, 'padding', {
|
|
112
|
-
get() {
|
|
113
|
-
return `0 ${theme.default.padding}`;
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
Object.defineProperty(memo.large, 'fontSize', {
|
|
117
|
-
get() {
|
|
118
|
-
return theme.default.fontSize;
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
|
|
123
107
|
return memo;
|
|
124
108
|
}, {} as Record<Sizes, SizeStyles>)
|
|
125
109
|
);
|
|
@@ -148,11 +132,11 @@ export default function makeStyles() {
|
|
|
148
132
|
}
|
|
149
133
|
.k-select-prefix,
|
|
150
134
|
.k-select-suffix {
|
|
151
|
-
color: ${select.iconColor};
|
|
152
135
|
position: relative;
|
|
153
136
|
}
|
|
154
137
|
.k-select-suffix {
|
|
155
138
|
margin-left: ${select.suffixGap};
|
|
139
|
+
margin-top: 2px;
|
|
156
140
|
}
|
|
157
141
|
|
|
158
142
|
.k-select-placeholder {
|
|
@@ -193,9 +177,6 @@ export default function makeStyles() {
|
|
|
193
177
|
.k-select-arrow {
|
|
194
178
|
display: inline-block;
|
|
195
179
|
transition: transform ${select.transition};
|
|
196
|
-
&.k-disabled {
|
|
197
|
-
color: ${select.disabledArrowColor};
|
|
198
|
-
}
|
|
199
180
|
}
|
|
200
181
|
|
|
201
182
|
// show
|
|
@@ -246,11 +227,7 @@ export default function makeStyles() {
|
|
|
246
227
|
.k-select-close {
|
|
247
228
|
margin-left: ${select.tag.delete.gap};
|
|
248
229
|
font-size: ${select.tag.delete.fontSize};
|
|
249
|
-
color: ${select.tag.delete.color};
|
|
250
230
|
}
|
|
251
|
-
// .k-select-input {
|
|
252
|
-
// margin-right: ${getRight(select.tag.margin)};
|
|
253
|
-
// }
|
|
254
231
|
|
|
255
232
|
// size
|
|
256
233
|
${sizes.map(size => {
|
|
@@ -20,9 +20,10 @@ const {decrease, increase, changeValue, onFocusin} = this.change;
|
|
|
20
20
|
disabled={this.isDisabledDecrease()}
|
|
21
21
|
class="k-spinner-btn k-left"
|
|
22
22
|
size={size}
|
|
23
|
+
type="none"
|
|
23
24
|
>
|
|
24
|
-
<Icon v-if={!vertical} class="k-spinner-icon
|
|
25
|
-
<Icon v-else class="k-spinner-icon
|
|
25
|
+
<Icon v-if={!vertical} class="k-spinner-icon k-icon-minus-small" />
|
|
26
|
+
<Icon v-else class="k-spinner-icon k-icon-arrow-down" />
|
|
26
27
|
</Button>
|
|
27
28
|
<Input
|
|
28
29
|
class="k-spinner-input"
|
|
@@ -38,8 +39,9 @@ const {decrease, increase, changeValue, onFocusin} = this.change;
|
|
|
38
39
|
disabled={this.isDisabledIncrease()}
|
|
39
40
|
class="k-spinner-btn k-right"
|
|
40
41
|
size={size}
|
|
42
|
+
type="none"
|
|
41
43
|
>
|
|
42
|
-
<Icon v-if={!vertical} class="k-spinner-icon
|
|
43
|
-
<Icon v-else class="k-spinner-icon
|
|
44
|
+
<Icon v-if={!vertical} class="k-spinner-icon k-icon-add-small" />
|
|
45
|
+
<Icon v-else class="k-spinner-icon k-icon-arrow-up" />
|
|
44
46
|
</Button>
|
|
45
47
|
</div>
|