@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
|
@@ -23,24 +23,21 @@ const defaults = deepDefaults(
|
|
|
23
23
|
get borderColor() { return theme.color.border },
|
|
24
24
|
borderWidth: '1px',
|
|
25
25
|
get border() { return `${tabs.borderWidth} solid ${tabs.borderColor}` },
|
|
26
|
-
margin: `0 10px`,
|
|
27
26
|
get color() { return theme.color.text },
|
|
28
|
-
|
|
27
|
+
closeGap: `8px`,
|
|
29
28
|
|
|
30
|
-
//
|
|
31
|
-
|
|
29
|
+
// scroll
|
|
30
|
+
navigatorWidth: `20px`,
|
|
32
31
|
|
|
33
32
|
//active
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
active: {
|
|
34
|
+
get color() { return theme.color.primary },
|
|
35
|
+
bar: {
|
|
36
|
+
height: '2px',
|
|
37
|
+
get bgColor() { return theme.color.primary },
|
|
38
|
+
}
|
|
39
39
|
},
|
|
40
40
|
|
|
41
|
-
// scroll
|
|
42
|
-
navigatorWidth: `20px`,
|
|
43
|
-
|
|
44
41
|
// border-card
|
|
45
42
|
borderCard: {
|
|
46
43
|
get bgColor() { return theme.color.bg },
|
|
@@ -49,14 +46,23 @@ const defaults = deepDefaults(
|
|
|
49
46
|
// no-border-card
|
|
50
47
|
noBorderCard: {
|
|
51
48
|
get bgColor() { return theme.color.bg },
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
// define size
|
|
52
|
+
size: {
|
|
53
|
+
large: {
|
|
54
|
+
padding: '24px',
|
|
55
|
+
},
|
|
56
|
+
default: {
|
|
57
|
+
padding: '16px',
|
|
58
|
+
},
|
|
59
|
+
},
|
|
54
60
|
},
|
|
55
61
|
sizes.reduce((memo, size) => {
|
|
56
62
|
memo[size] = {
|
|
57
63
|
get fontSize() { return theme[size].fontSize },
|
|
58
64
|
get height() { return theme[size].height },
|
|
59
|
-
get padding() { return `0 ${theme[size].padding}` },
|
|
65
|
+
get padding() { return `0 ${tabs.size[size as keyof typeof tabs.size]?.padding || theme[size].padding}` },
|
|
60
66
|
get closeFontSize() { return closeFontSizeMap[size] },
|
|
61
67
|
};
|
|
62
68
|
|
|
@@ -71,11 +77,35 @@ setDefault(() => {
|
|
|
71
77
|
|
|
72
78
|
export function makeStyles() {
|
|
73
79
|
return css`
|
|
74
|
-
|
|
80
|
+
${makeCommonStyles()};
|
|
81
|
+
${makeScrollStyles()};
|
|
82
|
+
|
|
83
|
+
&.k-type-default {
|
|
84
|
+
${makeDefaultStyles()}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&.k-type-card {
|
|
88
|
+
${makeDefaultStyles()}
|
|
89
|
+
${makeCardStyles()};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
&.k-type-border-card {
|
|
93
|
+
${makeBorderCardStyles()};
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&.k-type-no-border-card {
|
|
97
|
+
${makeNoBorderCardStyles()};
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
`;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function makeCommonStyles() {
|
|
104
|
+
const active = tabs.active;
|
|
105
|
+
const bar = active.bar;
|
|
106
|
+
return css`
|
|
75
107
|
position: relative;
|
|
76
|
-
line-height: 1;
|
|
77
108
|
.k-tab {
|
|
78
|
-
margin: ${tabs.margin};
|
|
79
109
|
cursor: pointer;
|
|
80
110
|
display: inline-block;
|
|
81
111
|
text-align: center;
|
|
@@ -87,7 +117,7 @@ export function makeStyles() {
|
|
|
87
117
|
text-overflow: ellipsis;
|
|
88
118
|
&:hover,
|
|
89
119
|
&.k-active {
|
|
90
|
-
color: ${
|
|
120
|
+
color: ${active.color};
|
|
91
121
|
}
|
|
92
122
|
&.k-disabled {
|
|
93
123
|
color: ${theme.color.disabled};
|
|
@@ -95,10 +125,11 @@ export function makeStyles() {
|
|
|
95
125
|
}
|
|
96
126
|
}
|
|
97
127
|
.k-tab-close {
|
|
98
|
-
margin-right: -${tabs.
|
|
99
|
-
margin-left: ${tabs.
|
|
128
|
+
margin-right: -${tabs.closeGap};
|
|
129
|
+
margin-left: ${tabs.closeGap};
|
|
100
130
|
position: relative;
|
|
101
131
|
top: -1px;
|
|
132
|
+
color:${theme.color.lightBlack};
|
|
102
133
|
}
|
|
103
134
|
|
|
104
135
|
// active-bar
|
|
@@ -106,138 +137,48 @@ export function makeStyles() {
|
|
|
106
137
|
transition: all ${tabs.transition};
|
|
107
138
|
position: absolute;
|
|
108
139
|
left: 0;
|
|
109
|
-
height: ${
|
|
110
|
-
background: ${
|
|
111
|
-
bottom: calc(-${
|
|
140
|
+
height: ${bar.height};
|
|
141
|
+
background: ${bar.bgColor};
|
|
142
|
+
bottom: calc(-${bar.height} / 2);
|
|
112
143
|
}
|
|
113
144
|
|
|
114
145
|
// vertical
|
|
115
146
|
&.k-vertical {
|
|
116
147
|
display: inline-block;
|
|
117
|
-
border-bottom: none;
|
|
118
|
-
border-right: ${tabs.border};
|
|
119
148
|
.k-tab {
|
|
120
149
|
display: block;
|
|
121
|
-
margin: 0;
|
|
122
|
-
padding: ${tabs.verticalPadding};
|
|
123
150
|
}
|
|
124
151
|
.k-tabs-active-bar {
|
|
125
152
|
left: auto;
|
|
126
153
|
top: 0;
|
|
127
|
-
right: calc(-${
|
|
128
|
-
width: ${
|
|
154
|
+
right: calc(-${bar.height} / 2);
|
|
155
|
+
width: ${bar.height};
|
|
129
156
|
height: auto;
|
|
130
157
|
}
|
|
131
158
|
}
|
|
132
159
|
|
|
133
|
-
//
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
content: '';
|
|
147
|
-
display: block;
|
|
148
|
-
position: absolute;
|
|
149
|
-
height: ${tabs.highlight.height};
|
|
150
|
-
background: ${theme.color.primary};
|
|
151
|
-
top: 0;
|
|
152
|
-
left: -${tabs.borderWidth};
|
|
153
|
-
right: -${tabs.borderWidth};
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
// vertical card
|
|
158
|
-
&.k-vertical {
|
|
159
|
-
.k-tabs-active-bar {
|
|
160
|
-
left: 0;
|
|
161
|
-
width: auto;
|
|
162
|
-
border-left: none;
|
|
163
|
-
border-right: none;
|
|
164
|
-
border-top: ${tabs.border};
|
|
165
|
-
border-bottom: ${tabs.border};
|
|
166
|
-
&:before {
|
|
167
|
-
width: ${tabs.highlight.height};
|
|
168
|
-
left: 0;
|
|
169
|
-
right: auto;
|
|
170
|
-
bottom: 0;
|
|
171
|
-
height: auto;
|
|
160
|
+
// size
|
|
161
|
+
${sizes.map(size => {
|
|
162
|
+
const styles = tabs[size];
|
|
163
|
+
return `
|
|
164
|
+
&.k-size-${size} {
|
|
165
|
+
.k-tab {
|
|
166
|
+
font-size: ${styles.fontSize};
|
|
167
|
+
height: ${styles.height};
|
|
168
|
+
line-height: ${styles.height};
|
|
169
|
+
padding: ${styles.padding};
|
|
170
|
+
}
|
|
171
|
+
.k-tab-close .k-icon {
|
|
172
|
+
font-size: ${styles.closeFontSize};
|
|
172
173
|
}
|
|
173
174
|
}
|
|
174
|
-
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
&.k-tabs-border-card {
|
|
179
|
-
border: ${tabs.border};
|
|
180
|
-
border-bottom: none;
|
|
181
|
-
background: ${tabs.borderCard.bgColor};
|
|
182
|
-
.k-tab {
|
|
183
|
-
margin: 0;
|
|
184
|
-
}
|
|
185
|
-
.k-tabs-active-bar {
|
|
186
|
-
background: #fff;
|
|
187
|
-
top: 0;
|
|
188
|
-
height: auto;
|
|
189
|
-
z-index: -1;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
&.k-vertical {
|
|
193
|
-
border-right: none;
|
|
194
|
-
border-bottom: ${tabs.border};
|
|
195
|
-
.k-tabs-active-bar {
|
|
196
|
-
width: auto;
|
|
197
|
-
height: 0;
|
|
198
|
-
left: 0;
|
|
199
|
-
bottom: 0;
|
|
200
|
-
right: 0;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
// no-border-card
|
|
206
|
-
&.k-tabs-no-border-card {
|
|
207
|
-
border-bottom: none;
|
|
208
|
-
.k-tab {
|
|
209
|
-
margin-right: ${tabs.noBorderCard.gutter};
|
|
210
|
-
&:before {
|
|
211
|
-
content: '';
|
|
212
|
-
display: block;
|
|
213
|
-
position: absolute;
|
|
214
|
-
background: ${tabs.noBorderCard.bgColor};
|
|
215
|
-
top: 0;
|
|
216
|
-
bottom: 0;
|
|
217
|
-
left: 0;
|
|
218
|
-
right: 0;
|
|
219
|
-
z-index: -1;
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
.k-tabs-acitve-bar {
|
|
223
|
-
border: none;
|
|
224
|
-
&:before {
|
|
225
|
-
left: 0;
|
|
226
|
-
right: 0;
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
&.k-vertical {
|
|
230
|
-
border-right: none;
|
|
231
|
-
.k-tab:not(:first-of-type) {
|
|
232
|
-
margin: ${tabs.noBorderCard.gutter} 0 0;
|
|
233
|
-
}
|
|
234
|
-
.k-tabs-active-bar {
|
|
235
|
-
border: none;
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
}
|
|
175
|
+
`
|
|
176
|
+
})}
|
|
177
|
+
`
|
|
178
|
+
}
|
|
239
179
|
|
|
240
|
-
|
|
180
|
+
function makeScrollStyles() {
|
|
181
|
+
return css`
|
|
241
182
|
&:not(.k-vertical) {
|
|
242
183
|
.k-tabs-scroll {
|
|
243
184
|
overflow: hidden;
|
|
@@ -274,23 +215,132 @@ export function makeStyles() {
|
|
|
274
215
|
padding: 0 ${tabs.navigatorWidth};
|
|
275
216
|
}
|
|
276
217
|
}
|
|
218
|
+
`
|
|
219
|
+
}
|
|
277
220
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
221
|
+
function makeDefaultStyles() {
|
|
222
|
+
return css`
|
|
223
|
+
border-bottom: ${tabs.border};
|
|
224
|
+
&.k-vertical {
|
|
225
|
+
border-bottom: none;
|
|
226
|
+
border-right: ${tabs.border};
|
|
227
|
+
}
|
|
228
|
+
`
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
function makeCardActiveBarCommonStyles() {
|
|
232
|
+
return css`
|
|
233
|
+
background: #fff;
|
|
234
|
+
top: 0;
|
|
235
|
+
height: auto;
|
|
236
|
+
z-index: -1;
|
|
237
|
+
`
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
function makeCardStyles() {
|
|
241
|
+
return css`
|
|
242
|
+
.k-tab {
|
|
243
|
+
margin: 0;
|
|
244
|
+
}
|
|
245
|
+
.k-tabs-active-bar {
|
|
246
|
+
${makeCardActiveBarCommonStyles()};
|
|
247
|
+
border-left: ${tabs.border};
|
|
248
|
+
border-right: ${tabs.border};
|
|
249
|
+
&:before {
|
|
250
|
+
content: '';
|
|
251
|
+
display: block;
|
|
252
|
+
position: absolute;
|
|
253
|
+
height: ${tabs.active.bar.height};
|
|
254
|
+
background: ${theme.color.primary};
|
|
255
|
+
top: 0;
|
|
256
|
+
left: -${tabs.borderWidth};
|
|
257
|
+
right: -${tabs.borderWidth};
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
// vertical card
|
|
262
|
+
&.k-vertical {
|
|
263
|
+
.k-tabs-active-bar {
|
|
264
|
+
left: 0;
|
|
265
|
+
width: auto;
|
|
266
|
+
border-left: none;
|
|
267
|
+
border-right: none;
|
|
268
|
+
border-top: ${tabs.border};
|
|
269
|
+
border-bottom: ${tabs.border};
|
|
270
|
+
&:before {
|
|
271
|
+
width: ${tabs.active.bar.height};
|
|
272
|
+
left: 0;
|
|
273
|
+
right: auto;
|
|
274
|
+
bottom: 0;
|
|
275
|
+
height: auto;
|
|
292
276
|
}
|
|
293
|
-
|
|
294
|
-
}
|
|
295
|
-
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
`
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
function makeBorderCardStyles() {
|
|
283
|
+
return css`
|
|
284
|
+
border: ${tabs.border};
|
|
285
|
+
border-bottom: none;
|
|
286
|
+
background: ${tabs.borderCard.bgColor};
|
|
287
|
+
.k-tab {
|
|
288
|
+
margin: 0;
|
|
289
|
+
}
|
|
290
|
+
.k-tabs-active-bar {
|
|
291
|
+
background: #fff;
|
|
292
|
+
top: 0;
|
|
293
|
+
height: auto;
|
|
294
|
+
z-index: -1;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
&.k-vertical {
|
|
298
|
+
border-right: none;
|
|
299
|
+
border-bottom: ${tabs.border};
|
|
300
|
+
.k-tabs-active-bar {
|
|
301
|
+
width: auto;
|
|
302
|
+
height: 0;
|
|
303
|
+
left: 0;
|
|
304
|
+
bottom: 0;
|
|
305
|
+
right: 0;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
`
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
function makeNoBorderCardStyles() {
|
|
312
|
+
return css`
|
|
313
|
+
border-radius: ${theme.borderRadius};
|
|
314
|
+
.k-tab {
|
|
315
|
+
&:before {
|
|
316
|
+
content: '';
|
|
317
|
+
display: block;
|
|
318
|
+
position: absolute;
|
|
319
|
+
background: ${tabs.noBorderCard.bgColor};
|
|
320
|
+
top: 0;
|
|
321
|
+
bottom: 0;
|
|
322
|
+
left: 0;
|
|
323
|
+
right: 0;
|
|
324
|
+
z-index: -1;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
.k-tabs-active-bar {
|
|
328
|
+
background: #fff;
|
|
329
|
+
top: 0;
|
|
330
|
+
height: auto;
|
|
331
|
+
z-index: -1;
|
|
332
|
+
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.08);
|
|
333
|
+
border-radius: 4px 4px 0px 0px;
|
|
334
|
+
}
|
|
335
|
+
&.k-vertical {
|
|
336
|
+
border-right: none;
|
|
337
|
+
.k-tabs-active-bar {
|
|
338
|
+
width: auto;
|
|
339
|
+
height: 0;
|
|
340
|
+
left: 0;
|
|
341
|
+
bottom: 0;
|
|
342
|
+
right: 0;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
`
|
|
296
346
|
}
|
package/components/tag/base.ts
CHANGED
|
@@ -3,7 +3,7 @@ title: 边框
|
|
|
3
3
|
order: 3
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
通过`border`可以定义边框样式: `solid`
|
|
6
|
+
通过`border`可以定义边框样式: `solid` `dashed` `none`(默认)
|
|
7
7
|
|
|
8
8
|
```vdt
|
|
9
9
|
import {Tag} from 'kpc';
|
|
@@ -40,7 +40,7 @@ export default class extends Component {
|
|
|
40
40
|
static defaults() {
|
|
41
41
|
return {
|
|
42
42
|
types: ['default', 'primary', 'success', 'warning', 'danger'],
|
|
43
|
-
borders: ['dashed', 'none'],
|
|
43
|
+
borders: ['solid', 'dashed', 'none'],
|
|
44
44
|
} as Props;
|
|
45
45
|
}
|
|
46
46
|
}
|
package/components/tag/index.md
CHANGED
|
@@ -14,7 +14,7 @@ sidebar: doc
|
|
|
14
14
|
| closed | 是否已关闭 | `boolean` | `false` |
|
|
15
15
|
| disabled | 是否展示禁用状态 | `boolean` | `false` |
|
|
16
16
|
| size | 组件尺寸 | `"large"` | `"default"` | `"small"` | `"mini"` | `"default"` |
|
|
17
|
-
| border | 定义边框样式 | `"solid"` | `"dashed"` | `"none"` | `"
|
|
17
|
+
| border | 定义边框样式 | `"solid"` | `"dashed"` | `"none"` | `"none"` |
|
|
18
18
|
|
|
19
19
|
# 事件
|
|
20
20
|
|
package/components/tag/styles.ts
CHANGED
|
@@ -14,11 +14,12 @@ const types = ['primary', 'warning', 'danger', 'success', 'disabled'] as const;
|
|
|
14
14
|
|
|
15
15
|
const defaults = deepDefaults(
|
|
16
16
|
{
|
|
17
|
-
get
|
|
17
|
+
get border() { return `1px solid ${theme.color.border}` },
|
|
18
18
|
get borderRadius() { return theme.borderRadius },
|
|
19
19
|
get fontSize() { return theme.default.fontSize },
|
|
20
20
|
padding: `0 8px`,
|
|
21
21
|
height: '20px',
|
|
22
|
+
get bgColor() { return theme.color.bg },
|
|
22
23
|
close: {
|
|
23
24
|
fontSize: '20px',
|
|
24
25
|
gap: '8px',
|
|
@@ -29,32 +30,33 @@ const defaults = deepDefaults(
|
|
|
29
30
|
get bgColor() { return theme.color.disabledBg },
|
|
30
31
|
},
|
|
31
32
|
large: {
|
|
32
|
-
padding: `0px
|
|
33
|
-
height: '
|
|
33
|
+
padding: `0px 8px`,
|
|
34
|
+
height: '24px',
|
|
34
35
|
close: {
|
|
35
|
-
fontSize: '
|
|
36
|
+
fontSize: '20px',
|
|
36
37
|
gap: '12px',
|
|
37
38
|
}
|
|
38
39
|
},
|
|
39
40
|
small: {
|
|
40
41
|
padding: `0 4px`,
|
|
41
|
-
height: '
|
|
42
|
+
height: '16px',
|
|
42
43
|
close: {
|
|
43
|
-
fontSize: '
|
|
44
|
+
fontSize: '12px',
|
|
44
45
|
gap: '4px'
|
|
45
46
|
}
|
|
46
47
|
},
|
|
47
48
|
mini: {
|
|
48
|
-
padding: `0
|
|
49
|
+
padding: `0 2px`,
|
|
49
50
|
height: '14px',
|
|
50
51
|
close: {
|
|
51
|
-
fontSize: '
|
|
52
|
+
fontSize: '12px',
|
|
52
53
|
gap: '2px'
|
|
53
54
|
}
|
|
54
55
|
},
|
|
55
56
|
none: {
|
|
56
57
|
get bgColor() { return theme.color.bg },
|
|
57
|
-
}
|
|
58
|
+
},
|
|
59
|
+
|
|
58
60
|
},
|
|
59
61
|
types.reduce((memo, type) => {
|
|
60
62
|
if (type === 'disabled') return memo;
|
|
@@ -76,11 +78,10 @@ export function makeStyles() {
|
|
|
76
78
|
display: inline-flex;
|
|
77
79
|
align-items: center;
|
|
78
80
|
padding: ${tag.padding};
|
|
79
|
-
border:
|
|
81
|
+
border: ${tag.border};
|
|
80
82
|
border-radius: ${tag.borderRadius};
|
|
81
83
|
font-size: ${tag.fontSize};
|
|
82
84
|
height: ${tag.height};
|
|
83
|
-
|
|
84
85
|
.k-tag-close {
|
|
85
86
|
font-size: ${tag.close.fontSize};
|
|
86
87
|
margin-left: ${tag.close.gap};
|
package/components/tip/index.vdt
CHANGED
package/components/tip/styles.ts
CHANGED
|
@@ -6,9 +6,10 @@ import {deepDefaults} from '../../styles/utils';
|
|
|
6
6
|
const defaults = {
|
|
7
7
|
title: {
|
|
8
8
|
fontSize: '14px',
|
|
9
|
-
gap: '8px'
|
|
9
|
+
gap: '8px',
|
|
10
|
+
fontWeight: '500'
|
|
10
11
|
},
|
|
11
|
-
get color() { return theme.color.
|
|
12
|
+
get color() { return theme.color.title },
|
|
12
13
|
get padding() { return `6px ${theme.default.padding}` },
|
|
13
14
|
};
|
|
14
15
|
|
|
@@ -35,10 +36,15 @@ export function makeStyles() {
|
|
|
35
36
|
.k-tip-title {
|
|
36
37
|
font-size: ${tip.title.fontSize};
|
|
37
38
|
margin-bottom: ${tip.title.gap};
|
|
39
|
+
font-weight: ${tip.title.fontWeight}
|
|
38
40
|
}
|
|
39
41
|
|
|
40
42
|
&.k-fade-leave-active {
|
|
41
43
|
position: relative;
|
|
42
44
|
}
|
|
45
|
+
|
|
46
|
+
.k-tip-close:hover {
|
|
47
|
+
background: none;
|
|
48
|
+
}
|
|
43
49
|
`;
|
|
44
50
|
}
|
|
@@ -37,8 +37,8 @@ const classNameObj = {
|
|
|
37
37
|
></i>
|
|
38
38
|
<div class="k-tooltip-buttons" v-if={confirm} key="tooltip-buttons">
|
|
39
39
|
<b:buttons>
|
|
40
|
-
<Button type="primary" ev-click={this.ok} size="small">{okText}</Button>
|
|
41
40
|
<Button ev-click={this.cancel} size="small">{cancelText}</Button>
|
|
41
|
+
<Button type="primary" ev-click={this.ok} size="small">{okText}</Button>
|
|
42
42
|
</b:buttons>
|
|
43
43
|
</div>
|
|
44
44
|
</b:children>
|
|
@@ -8,12 +8,13 @@ const defaults = {
|
|
|
8
8
|
get color() { return theme.color.text },
|
|
9
9
|
bgColor: '#fff',
|
|
10
10
|
lineHeight: 1.4,
|
|
11
|
-
maxWidth: '
|
|
11
|
+
maxWidth: '312px',
|
|
12
|
+
get boxShadow() { return theme.middleBoxShadow },
|
|
12
13
|
|
|
13
14
|
// arrow
|
|
14
15
|
arrow: {
|
|
15
|
-
borderColor: 'rgba(
|
|
16
|
-
width: '
|
|
16
|
+
borderColor: 'rgba(221, 221, 221, .5)',
|
|
17
|
+
width: '6px',
|
|
17
18
|
},
|
|
18
19
|
|
|
19
20
|
// confirm
|
|
@@ -23,9 +24,9 @@ const defaults = {
|
|
|
23
24
|
|
|
24
25
|
// dark
|
|
25
26
|
dark: {
|
|
26
|
-
get bgColor() { return theme.color.
|
|
27
|
+
get bgColor() { return theme.color.title },
|
|
27
28
|
color: '#fff',
|
|
28
|
-
get arrowBorderColor() { return theme.color.
|
|
29
|
+
get arrowBorderColor() { return theme.color.title },
|
|
29
30
|
},
|
|
30
31
|
|
|
31
32
|
smallPadding: '4px',
|
|
@@ -48,7 +49,7 @@ const directionMap = {
|
|
|
48
49
|
|
|
49
50
|
export default function makeStyles() {
|
|
50
51
|
const arrowLong = tooltip.arrow.width;
|
|
51
|
-
const arrowShort = `calc(${arrowLong} -
|
|
52
|
+
const arrowShort = `calc(${arrowLong} - 1px)`;
|
|
52
53
|
|
|
53
54
|
// use &.k-tooltip-content to override css in dropdown menu
|
|
54
55
|
return css`
|
|
@@ -59,6 +60,7 @@ export default function makeStyles() {
|
|
|
59
60
|
line-height: ${tooltip.lineHeight};
|
|
60
61
|
word-wrap: break-word;
|
|
61
62
|
pointer-events: none;
|
|
63
|
+
box-shadow: ${tooltip.boxShadow};
|
|
62
64
|
|
|
63
65
|
// hoverable
|
|
64
66
|
&.k-hoverable,
|
|
@@ -12,7 +12,7 @@ const {
|
|
|
12
12
|
} = this.get();
|
|
13
13
|
const {getShowedData} = this.filter;
|
|
14
14
|
const {enableAdd, enableRemove, add, remove} = this.transfer;
|
|
15
|
-
const {isCheckAll, toggleCheckAll, onCheckboxChange} = this.check;
|
|
15
|
+
const {isCheckAll, toggleCheckAll, onCheckboxChange, isIndeterminate} = this.check;
|
|
16
16
|
|
|
17
17
|
const classNameObj = {
|
|
18
18
|
'k-transfer': true,
|
|
@@ -33,6 +33,7 @@ const Panel = (model) => {
|
|
|
33
33
|
</div>
|
|
34
34
|
<Checkbox class="c-ellipsis"
|
|
35
35
|
value={isCheckAll(model)}
|
|
36
|
+
indeterminate={isIndeterminate(model)}
|
|
36
37
|
ev-click={toggleCheckAll.bind(null, model)}
|
|
37
38
|
>{title}</Checkbox>
|
|
38
39
|
</b:header>
|
|
@@ -94,4 +95,4 @@ const Panel = (model) => {
|
|
|
94
95
|
</Button>
|
|
95
96
|
</div>
|
|
96
97
|
{Panel('right')}
|
|
97
|
-
</div>
|
|
98
|
+
</div>
|