@king-design/intact 2.0.16 → 3.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/button/styles.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/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/styles.ts +11 -6
- 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/styles.js +9 -4
- 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/message/demos/duration/index.js +2 -2
- package/es/site/data/components/message/demos/duration/react.js +2 -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 +2 -1
- 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
|
@@ -29,7 +29,7 @@ export const types = ['primary', 'warning', 'danger', 'active', 'success'] as co
|
|
|
29
29
|
const sizes = ['large', 'small', 'mini'] as const;
|
|
30
30
|
|
|
31
31
|
const btnStyles = {
|
|
32
|
-
get color() { return theme.color.
|
|
32
|
+
get color() { return theme.color.lightBlack },
|
|
33
33
|
bgColor: '#fff',
|
|
34
34
|
lineHeight: '1.15',
|
|
35
35
|
get padding() { return `0 ${theme.default.padding}` },
|
|
@@ -171,6 +171,9 @@ export function makeButtonStyles({iconSide}: {iconSide?: string}) {
|
|
|
171
171
|
white-space: nowrap;
|
|
172
172
|
transition: all ${button.transition};
|
|
173
173
|
line-height: ${button.lineHeight};
|
|
174
|
+
.k-icon {
|
|
175
|
+
color: inherit;
|
|
176
|
+
}
|
|
174
177
|
&:hover,
|
|
175
178
|
&:focus {
|
|
176
179
|
border-color: ${button.hoverBorderColor};
|
|
@@ -6,7 +6,8 @@ import '../../styles/global';
|
|
|
6
6
|
const defaults = {
|
|
7
7
|
border: '1px solid #e5e5e5',
|
|
8
8
|
padding: '16px',
|
|
9
|
-
boxShadow
|
|
9
|
+
get boxShadow() { return theme.boxShadow },
|
|
10
|
+
get borderRadius() {return theme.largeBorderRadius},
|
|
10
11
|
headerHeight: '48px',
|
|
11
12
|
headerFontSize: '14px',
|
|
12
13
|
bgColor: '#fff',
|
|
@@ -19,7 +20,7 @@ setDefault(() => {
|
|
|
19
20
|
|
|
20
21
|
export function makeStyles() {
|
|
21
22
|
return css`
|
|
22
|
-
border-radius: ${
|
|
23
|
+
border-radius: ${card.borderRadius};
|
|
23
24
|
background: ${card.bgColor};
|
|
24
25
|
.k-card-header {
|
|
25
26
|
height: ${card.headerHeight};
|
|
@@ -4,10 +4,13 @@ import {deepDefaults, palette, getLeft} from '../../styles/utils';
|
|
|
4
4
|
import '../../styles/global';
|
|
5
5
|
|
|
6
6
|
const defaults = {
|
|
7
|
-
width: '
|
|
8
|
-
get borderColor() { return theme.color.
|
|
7
|
+
width: '16px',
|
|
8
|
+
get borderColor() { return theme.color.border },
|
|
9
9
|
get borderRadius() { return theme.borderRadius },
|
|
10
10
|
get transition() { return theme.transition.small },
|
|
11
|
+
get hoverBorder() {
|
|
12
|
+
return `1px solid ${theme.color.primary}`
|
|
13
|
+
},
|
|
11
14
|
bgColor: '#fff',
|
|
12
15
|
|
|
13
16
|
// text
|
|
@@ -21,11 +24,12 @@ const defaults = {
|
|
|
21
24
|
get bgColor() { return checkbox.checked.borderColor },
|
|
22
25
|
},
|
|
23
26
|
|
|
27
|
+
|
|
24
28
|
inner: {
|
|
25
29
|
width: '5px',
|
|
26
30
|
height: '10px',
|
|
27
|
-
top: '
|
|
28
|
-
left: '
|
|
31
|
+
top: '0px',
|
|
32
|
+
left: '5px',
|
|
29
33
|
border: '1px solid #fff',
|
|
30
34
|
},
|
|
31
35
|
|
|
@@ -34,12 +38,20 @@ const defaults = {
|
|
|
34
38
|
get color() { return theme.color.disabled },
|
|
35
39
|
get borderColor() { return theme.color.disabledBorder },
|
|
36
40
|
get bgColor() { return theme.color.disabledBg },
|
|
37
|
-
|
|
41
|
+
innerColor: '#fff',
|
|
42
|
+
checked:{
|
|
43
|
+
get borderColor() {
|
|
44
|
+
return palette(theme.color.primary, -3)
|
|
45
|
+
},
|
|
46
|
+
get bgColor() {
|
|
47
|
+
return palette(theme.color.primary, -3)
|
|
48
|
+
},
|
|
49
|
+
}
|
|
38
50
|
},
|
|
39
51
|
|
|
40
52
|
// indeterminate
|
|
41
53
|
indeterminate: {
|
|
42
|
-
innerLeft: '
|
|
54
|
+
innerLeft: '4px',
|
|
43
55
|
}
|
|
44
56
|
};
|
|
45
57
|
|
|
@@ -79,6 +91,9 @@ export default function makeStyles() {
|
|
|
79
91
|
transform: rotate(45deg) scale(0);
|
|
80
92
|
transition: all ${checkbox.transition};
|
|
81
93
|
}
|
|
94
|
+
&:hover {
|
|
95
|
+
border: ${checkbox.hoverBorder}
|
|
96
|
+
}
|
|
82
97
|
}
|
|
83
98
|
|
|
84
99
|
input {
|
|
@@ -113,6 +128,7 @@ export default function makeStyles() {
|
|
|
113
128
|
left: ${checkbox.indeterminate.innerLeft};
|
|
114
129
|
}
|
|
115
130
|
}
|
|
131
|
+
|
|
116
132
|
}
|
|
117
133
|
&.k-checked {
|
|
118
134
|
.k-checkbox-wrapper {
|
|
@@ -120,6 +136,7 @@ export default function makeStyles() {
|
|
|
120
136
|
transform: rotate(45deg) scale(1);
|
|
121
137
|
}
|
|
122
138
|
}
|
|
139
|
+
|
|
123
140
|
}
|
|
124
141
|
|
|
125
142
|
// focus
|
|
@@ -146,6 +163,14 @@ export default function makeStyles() {
|
|
|
146
163
|
input {
|
|
147
164
|
cursor: not-allowed;
|
|
148
165
|
}
|
|
166
|
+
&.k-checked,
|
|
167
|
+
&.k-indeterminate {
|
|
168
|
+
.k-checkbox-wrapper {
|
|
169
|
+
border-color: ${checkbox.disabled.checked.borderColor};
|
|
170
|
+
background: ${checkbox.disabled.checked.bgColor};
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
149
174
|
}
|
|
150
175
|
`;
|
|
151
176
|
}
|
|
@@ -11,6 +11,9 @@ const defaults = {
|
|
|
11
11
|
titleMarginRight: '8px',
|
|
12
12
|
borderPadding: '0 24px',
|
|
13
13
|
collBorder: '1px solid #eee',
|
|
14
|
+
get borderRadius() {
|
|
15
|
+
return theme.largeBorderRadius
|
|
16
|
+
},
|
|
14
17
|
|
|
15
18
|
item: {
|
|
16
19
|
borderBottom: '1px solid #e5e5e5',
|
|
@@ -37,7 +40,7 @@ export function makeStyles() {
|
|
|
37
40
|
}
|
|
38
41
|
|
|
39
42
|
&.k-border {
|
|
40
|
-
border-radius: ${
|
|
43
|
+
border-radius: ${collapse.borderRadius};
|
|
41
44
|
padding: ${collapse.borderPadding};
|
|
42
45
|
border: ${collapse.collBorder};
|
|
43
46
|
}
|
|
@@ -48,23 +48,22 @@ const dialog = (
|
|
|
48
48
|
v-if={!hideClose && !$props.hideClose}
|
|
49
49
|
ev-mousedown={stopPropagation}
|
|
50
50
|
>
|
|
51
|
-
<Icon class="
|
|
51
|
+
<Icon class="k-icon-close" />
|
|
52
52
|
</Button>
|
|
53
53
|
</div>
|
|
54
54
|
<div class="k-dialog-body"><b:body>{children}</b:body></div>
|
|
55
55
|
<b:footer-wrapper>
|
|
56
56
|
<div class="k-dialog-footer">
|
|
57
57
|
<b:footer>
|
|
58
|
+
<Button class="k-dialog-cancel"
|
|
59
|
+
ev-click={this.cancel}
|
|
60
|
+
>{cancelText}</Button>
|
|
58
61
|
<Button class="k-dialog-ok"
|
|
59
62
|
type="primary"
|
|
60
63
|
ev-click={this.ok}
|
|
61
64
|
loading={loading}
|
|
62
65
|
disabled={disabledOk}
|
|
63
66
|
>{okText}</Button>
|
|
64
|
-
<Button class="k-dialog-cancel"
|
|
65
|
-
type="secondary"
|
|
66
|
-
ev-click={this.cancel}
|
|
67
|
-
>{cancelText}</Button>
|
|
68
67
|
</b:footer>
|
|
69
68
|
</div>
|
|
70
69
|
</b:footer-wrapper>
|
|
@@ -9,32 +9,33 @@ const defaults = {
|
|
|
9
9
|
get borderRadius() { return theme.borderRadius },
|
|
10
10
|
get transition() { return theme.transition.large },
|
|
11
11
|
padding: '0',
|
|
12
|
-
margin: '0
|
|
12
|
+
margin: '0 24px',
|
|
13
13
|
get color() { return theme.color.text },
|
|
14
14
|
get fontSize() { return theme.fontSize },
|
|
15
|
-
get boxShadow() { return theme.
|
|
15
|
+
get boxShadow() { return theme.largeBoxShadow },
|
|
16
16
|
|
|
17
17
|
// header
|
|
18
18
|
header: {
|
|
19
|
-
fontSize: '
|
|
19
|
+
fontSize: '14px',
|
|
20
|
+
fontWeight: '500',
|
|
20
21
|
get color() { return theme.color.title },
|
|
21
|
-
height: '
|
|
22
|
-
border: `1px solid #
|
|
23
|
-
closeTop: '
|
|
22
|
+
height: '52px',
|
|
23
|
+
border: `1px solid #e2e5e8`,
|
|
24
|
+
closeTop: '9px',
|
|
24
25
|
closeRight: '-9px',
|
|
25
|
-
closeIconFontSize: '
|
|
26
|
+
closeIconFontSize: '16px',
|
|
26
27
|
},
|
|
27
28
|
|
|
28
29
|
// body
|
|
29
30
|
body: {
|
|
30
|
-
padding: `
|
|
31
|
+
padding: `24px`,
|
|
31
32
|
},
|
|
32
33
|
|
|
33
34
|
// footer
|
|
34
35
|
footer: {
|
|
35
|
-
padding: `
|
|
36
|
-
btnGap: `
|
|
37
|
-
border: `1px solid #
|
|
36
|
+
padding: `16px 0`,
|
|
37
|
+
btnGap: `8px`,
|
|
38
|
+
border: `1px solid #e2e5e8`,
|
|
38
39
|
},
|
|
39
40
|
|
|
40
41
|
// transition
|
|
@@ -47,13 +48,14 @@ const defaults = {
|
|
|
47
48
|
|
|
48
49
|
// alert dialog
|
|
49
50
|
alert: {
|
|
50
|
-
padding: `0
|
|
51
|
+
padding: `0 24px`,
|
|
51
52
|
bodyMarginTop: `-25px`,
|
|
52
53
|
tipIconMarginBottom: '10px',
|
|
53
54
|
tipIconFontSize: '37px',
|
|
54
55
|
tipIconLineHeight: '37px',
|
|
55
56
|
|
|
56
57
|
// with title
|
|
58
|
+
titleFontWeight: '500',
|
|
57
59
|
titleTipIconFontSize: '37px',
|
|
58
60
|
titleFontSize: '14px',
|
|
59
61
|
wrapperPaddingLeft: '8px',
|
|
@@ -117,6 +119,7 @@ export function makeDialogStyles() {
|
|
|
117
119
|
font-size: ${dialog.header.fontSize};
|
|
118
120
|
color: ${dialog.header.color};
|
|
119
121
|
position: relative;
|
|
122
|
+
font-weight: ${dialog.header.fontWeight};
|
|
120
123
|
}
|
|
121
124
|
.k-dialog-title {
|
|
122
125
|
display: inline-block;
|
|
@@ -128,6 +131,7 @@ export function makeDialogStyles() {
|
|
|
128
131
|
.k-icon {
|
|
129
132
|
font-size: ${dialog.header.closeIconFontSize};
|
|
130
133
|
}
|
|
134
|
+
|
|
131
135
|
}
|
|
132
136
|
|
|
133
137
|
// body
|
|
@@ -228,7 +232,8 @@ export function makeAlertStyles() {
|
|
|
228
232
|
.k-alert-dialog-title {
|
|
229
233
|
line-height: ${dialog.alert.tipIconLineHeight};
|
|
230
234
|
font-size: ${dialog.alert.titleFontSize};
|
|
231
|
-
|
|
235
|
+
font-weight: ${dialog.alert.titleFontWeight};
|
|
236
|
+
}
|
|
232
237
|
}
|
|
233
238
|
}
|
|
234
239
|
`
|
|
@@ -11,7 +11,7 @@ export const placements = ['top', 'right', 'bottom', 'left'] as const;
|
|
|
11
11
|
|
|
12
12
|
const defaults = {
|
|
13
13
|
get transition() { return theme.transition.large },
|
|
14
|
-
get boxShadow() { return theme.
|
|
14
|
+
get boxShadow() { return theme.largeBoxShadow },
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
let drawer: typeof defaults;
|
|
@@ -21,8 +21,6 @@ setDefault(() => {
|
|
|
21
21
|
|
|
22
22
|
export function makeStyles(overlay: boolean) {
|
|
23
23
|
return css`
|
|
24
|
-
box-shadow: none;
|
|
25
|
-
border-radius: 0;
|
|
26
24
|
position: fixed !important;
|
|
27
25
|
background: transparent !important;
|
|
28
26
|
box-shadow: none !important;
|
|
@@ -53,6 +51,7 @@ export function makeStyles(overlay: boolean) {
|
|
|
53
51
|
${placements.map((placement) => {
|
|
54
52
|
let positionValue: string = '';
|
|
55
53
|
let transformValue: string = '';
|
|
54
|
+
let borderRadius: string = '';
|
|
56
55
|
placements.forEach((p) => {
|
|
57
56
|
// Set top to `0 !important` when overlay is false and placement is right or left
|
|
58
57
|
// Because dialog without overlay don't have positional parent element
|
|
@@ -63,16 +62,24 @@ export function makeStyles(overlay: boolean) {
|
|
|
63
62
|
: `${p}: 0;`;
|
|
64
63
|
});
|
|
65
64
|
|
|
66
|
-
if(placement === 'left' || placement === 'right') {
|
|
65
|
+
if (placement === 'left' || placement === 'right') {
|
|
67
66
|
positionValue += 'height: 100% !important;';
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
if (placement === 'left') {
|
|
68
|
+
borderRadius = `0 ${theme.largeBorderRadius} ${theme.largeBorderRadius} 0`;
|
|
69
|
+
transformValue = 'translateX(-100%)';
|
|
70
|
+
} else {
|
|
71
|
+
borderRadius = `${theme.largeBorderRadius} 0 0 ${theme.largeBorderRadius}`;
|
|
72
|
+
transformValue = 'translateX(100%)';
|
|
73
|
+
}
|
|
71
74
|
} else {
|
|
72
75
|
positionValue += 'width: 100% !important;';
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
+
if (placement === 'top') {
|
|
77
|
+
borderRadius = `0 0 ${theme.largeBorderRadius} ${theme.largeBorderRadius}`;
|
|
78
|
+
transformValue = 'translateY(-100%)';
|
|
79
|
+
} else {
|
|
80
|
+
borderRadius = `${theme.largeBorderRadius} ${theme.largeBorderRadius} 0 0`;
|
|
81
|
+
transformValue = 'translateY(100%)';
|
|
82
|
+
}
|
|
76
83
|
}
|
|
77
84
|
|
|
78
85
|
return `
|
|
@@ -86,6 +93,9 @@ export function makeStyles(overlay: boolean) {
|
|
|
86
93
|
transform: ${transformValue};
|
|
87
94
|
}
|
|
88
95
|
}
|
|
96
|
+
.k-drawer-content {
|
|
97
|
+
border-radius: ${borderRadius};
|
|
98
|
+
}
|
|
89
99
|
}
|
|
90
100
|
`
|
|
91
101
|
})}
|
|
@@ -33,7 +33,7 @@ export function makeMenuStyles() {
|
|
|
33
33
|
min-width: ${dropdown.menu.minWidth};
|
|
34
34
|
background: ${dropdown.menu.bgColor};
|
|
35
35
|
border-radius: ${dropdown.menu.borderRadius};
|
|
36
|
-
box-shadow: ${theme.
|
|
36
|
+
box-shadow: ${theme.middleBoxShadow};
|
|
37
37
|
font-size: ${dropdown.menu.fontSize};
|
|
38
38
|
z-index: ${dropdown.menu.zIndex};
|
|
39
39
|
top: 0;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 禁用状态
|
|
3
|
+
order: 2
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
添加`diasbled`属性
|
|
7
|
+
|
|
8
|
+
```vdt
|
|
9
|
+
import {Icon} from 'kpc';
|
|
10
|
+
|
|
11
|
+
<div>
|
|
12
|
+
<Icon class="ion-happy-outline" disabled />
|
|
13
|
+
<Icon class="ion-happy-outline" disabled hoverable />
|
|
14
|
+
<Icon class="ion-happy-outline" disabled color="primary" />
|
|
15
|
+
</div>
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
```styl
|
|
19
|
+
.k-icon
|
|
20
|
+
margin-right 8px
|
|
21
|
+
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: King-Design Icons
|
|
3
|
-
order:
|
|
3
|
+
order: 3
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
|
|
@@ -36,121 +36,92 @@ export default class extends Component {
|
|
|
36
36
|
static defaults() {
|
|
37
37
|
return {
|
|
38
38
|
fonts: [
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
'hide',
|
|
126
|
-
'users',
|
|
127
|
-
'user',
|
|
128
|
-
'return-right',
|
|
129
|
-
'message',
|
|
130
|
-
'paper',
|
|
131
|
-
'phonecall-prohibit',
|
|
132
|
-
'speedometer',
|
|
133
|
-
'settings-horizontal',
|
|
134
|
-
'phone',
|
|
135
|
-
'star',
|
|
136
|
-
'play',
|
|
137
|
-
'refresh-lock',
|
|
138
|
-
'shield',
|
|
139
|
-
'panel',
|
|
140
|
-
'structure',
|
|
141
|
-
'settings-vertical',
|
|
142
|
-
'printer',
|
|
143
|
-
'stop',
|
|
144
|
-
'return-left',
|
|
145
|
-
'question',
|
|
146
|
-
'unlock',
|
|
147
|
-
'sound-off',
|
|
148
|
-
'up-squared',
|
|
149
|
-
'sound-on',
|
|
150
|
-
'upload',
|
|
151
|
-
'tool',
|
|
152
|
-
'visible',
|
|
153
|
-
'truth',
|
|
39
|
+
"tag",
|
|
40
|
+
"clone",
|
|
41
|
+
"information-fill",
|
|
42
|
+
"warning-fill",
|
|
43
|
+
"success-fill",
|
|
44
|
+
"error-fill",
|
|
45
|
+
"question-fill",
|
|
46
|
+
"information",
|
|
47
|
+
"cloud",
|
|
48
|
+
"pin",
|
|
49
|
+
"home",
|
|
50
|
+
"cut",
|
|
51
|
+
"servers",
|
|
52
|
+
"internet",
|
|
53
|
+
"mail",
|
|
54
|
+
"paper",
|
|
55
|
+
"phone",
|
|
56
|
+
"panel",
|
|
57
|
+
"alarm",
|
|
58
|
+
"notification-outline",
|
|
59
|
+
"earphone",
|
|
60
|
+
"settings-horizontal",
|
|
61
|
+
"message",
|
|
62
|
+
"heart-outline",
|
|
63
|
+
"return-right",
|
|
64
|
+
"picture",
|
|
65
|
+
"logout",
|
|
66
|
+
"all",
|
|
67
|
+
"drag",
|
|
68
|
+
"settings-vertical",
|
|
69
|
+
"more",
|
|
70
|
+
"more-circled",
|
|
71
|
+
"folder",
|
|
72
|
+
"unlock",
|
|
73
|
+
"user",
|
|
74
|
+
"folder-open",
|
|
75
|
+
"lock",
|
|
76
|
+
"users",
|
|
77
|
+
"edit",
|
|
78
|
+
"location",
|
|
79
|
+
"delete",
|
|
80
|
+
"edit2",
|
|
81
|
+
"settings",
|
|
82
|
+
"calendar",
|
|
83
|
+
"search",
|
|
84
|
+
"alert",
|
|
85
|
+
"question",
|
|
86
|
+
"zoom-in",
|
|
87
|
+
"zoom-out",
|
|
88
|
+
"fault-outline",
|
|
89
|
+
"truth-circled",
|
|
90
|
+
"hide",
|
|
91
|
+
"visible",
|
|
92
|
+
"time",
|
|
93
|
+
"refresh",
|
|
94
|
+
"batchsearch",
|
|
95
|
+
"refresh2",
|
|
96
|
+
"upload",
|
|
97
|
+
"download",
|
|
98
|
+
"left-squared",
|
|
99
|
+
"right-squared",
|
|
100
|
+
"down-squared",
|
|
101
|
+
"up-squared",
|
|
102
|
+
"arrow-right-circled",
|
|
103
|
+
"arrow-down-circled",
|
|
104
|
+
"arrow-left-circled",
|
|
105
|
+
"arrow-up-circled",
|
|
106
|
+
"arrow-up-big",
|
|
107
|
+
"arrow-left-big",
|
|
108
|
+
"arrow-down",
|
|
109
|
+
"arrow-right-big",
|
|
110
|
+
"arrow-right",
|
|
111
|
+
"sortfill",
|
|
112
|
+
"arrow-left",
|
|
113
|
+
"arrow-up",
|
|
114
|
+
"arrow-down-big",
|
|
115
|
+
"sort",
|
|
116
|
+
"sortbig",
|
|
117
|
+
"truth",
|
|
118
|
+
"check",
|
|
119
|
+
"close-big",
|
|
120
|
+
"add-small",
|
|
121
|
+
"minus",
|
|
122
|
+
"close",
|
|
123
|
+
"minuss-mall",
|
|
124
|
+
"add-big"
|
|
154
125
|
]
|
|
155
126
|
}
|
|
156
127
|
}
|
package/components/icon/index.md
CHANGED
|
@@ -13,3 +13,4 @@ sidebar: doc
|
|
|
13
13
|
| color | 图标颜色 | `"default"` | `"primary"` | `"danger"` | `"warning"` | `"success"` | `string` | `undefined` |
|
|
14
14
|
| rotate | 是否一直旋转图标 | `boolean` | `false` |
|
|
15
15
|
| hoverable | 图标是否具有`hover`效果 | `boolean` | `false` |
|
|
16
|
+
| disbaled | 是否展示disabled状态 | `boolean` | `false` |
|
package/components/icon/index.ts
CHANGED
|
@@ -8,6 +8,7 @@ export interface IconProps {
|
|
|
8
8
|
color?: string
|
|
9
9
|
rotate?: boolean
|
|
10
10
|
hoverable?: boolean,
|
|
11
|
+
disabled?: boolean,
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
const typeDefs: Required<TypeDefs<IconProps>> = {
|
|
@@ -15,6 +16,7 @@ const typeDefs: Required<TypeDefs<IconProps>> = {
|
|
|
15
16
|
color: String,
|
|
16
17
|
rotate: Boolean,
|
|
17
18
|
hoverable: Boolean,
|
|
19
|
+
disabled: Boolean,
|
|
18
20
|
};
|
|
19
21
|
|
|
20
22
|
const defaults = (): Partial<IconProps> => ({
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import {addStyle, getRestProps} from '../utils';
|
|
2
2
|
import makeStyles from './styles';
|
|
3
3
|
|
|
4
|
-
const {
|
|
4
|
+
const {
|
|
5
|
+
className, style, size, color,
|
|
6
|
+
rotate, hoverable, children, disabled
|
|
7
|
+
} = this.get();
|
|
5
8
|
|
|
6
9
|
const classNameObj = {
|
|
7
10
|
'k-icon': true,
|
|
8
11
|
'k-rotate': rotate,
|
|
9
|
-
'k-hoverable': hoverable,
|
|
12
|
+
'k-hoverable': !disabled && hoverable,
|
|
13
|
+
'k-disabled': disabled,
|
|
10
14
|
[className]: className,
|
|
11
15
|
};
|
|
12
16
|
const _style = {};
|