@king-design/intact 3.0.0-beta.1 → 3.0.0-beta.2

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.
Files changed (173) hide show
  1. package/components/button/demos/basic.md +1 -1
  2. package/components/button/demos/disabled.md +2 -1
  3. package/components/button/demos/group.md +2 -2
  4. package/components/button/demos/icon.md +7 -7
  5. package/components/button/demos/loading.md +4 -4
  6. package/components/button/demos/size.md +4 -4
  7. package/components/button/styles.ts +19 -13
  8. package/components/carousel/index.vdt +2 -2
  9. package/components/cascader/index.vdt +1 -1
  10. package/components/checkbox/demos/basic.md +1 -1
  11. package/components/checkbox/demos/group.md +1 -1
  12. package/components/checkbox/demos/indeterminate.md +1 -1
  13. package/components/checkbox/demos/value.md +1 -1
  14. package/components/collapse/item.vdt +1 -1
  15. package/components/copy/index.vdt +1 -1
  16. package/components/datepicker/calendar.vdt +6 -6
  17. package/components/datepicker/demos/datetime.md +5 -4
  18. package/components/datepicker/index.spec.ts +11 -1
  19. package/components/datepicker/styles.ts +6 -1
  20. package/components/datepicker/useValue.ts +35 -10
  21. package/components/dialog/styles.ts +1 -1
  22. package/components/dropdown/demos/basic.md +1 -1
  23. package/components/dropdown/demos/checkbox.md +1 -1
  24. package/components/dropdown/demos/disabled.md +2 -2
  25. package/components/dropdown/demos/nested.md +6 -6
  26. package/components/dropdown/demos/position.md +3 -3
  27. package/components/dropdown/demos/trigger.md +2 -2
  28. package/components/form/demos/basic.md +2 -2
  29. package/components/form/demos/custom.md +2 -4
  30. package/components/form/styles.ts +2 -2
  31. package/components/icon/demos/icons.md +130 -97
  32. package/components/icon/styles.ts +6 -2
  33. package/components/input/demos/blocks.md +7 -2
  34. package/components/input/demos/clearable.md +2 -2
  35. package/components/input/demos/showCount.md +18 -0
  36. package/components/input/demos/size.md +6 -4
  37. package/components/input/index.md +1 -0
  38. package/components/input/index.ts +5 -0
  39. package/components/input/index.vdt +22 -14
  40. package/components/input/search.vdt +2 -5
  41. package/components/input/styles.ts +81 -77
  42. package/components/input/useFocus.ts +17 -0
  43. package/components/menu/item.vdt +1 -1
  44. package/components/pagination/index.vdt +2 -2
  45. package/components/progress/index.vdt +1 -1
  46. package/components/radio/demos/basic.md +1 -1
  47. package/components/radio/demos/group.md +1 -1
  48. package/components/radio/demos/value.md +1 -1
  49. package/components/select/base.vdt +19 -17
  50. package/components/select/demos/customMenu.md +2 -2
  51. package/components/select/index.spec.ts +4 -1
  52. package/components/select/menu.vdt +2 -2
  53. package/components/select/option.vdt +1 -0
  54. package/components/select/styles.ts +5 -1
  55. package/components/spinner/index.vdt +4 -4
  56. package/components/spinner/styles.ts +9 -6
  57. package/components/steps/step.vdt +2 -2
  58. package/components/steps/styles.ts +5 -1
  59. package/components/table/cell.vdt +1 -1
  60. package/components/table/column.vdt +27 -16
  61. package/components/table/demos/group.md +4 -3
  62. package/components/table/demos/title.md +3 -5
  63. package/components/table/index.spec.ts +18 -1
  64. package/components/table/styles.ts +21 -28
  65. package/components/table/useGroup.ts +41 -23
  66. package/components/tabs/index.vdt +3 -2
  67. package/components/tag/index.md +31 -0
  68. package/components/tag/styles.ts +6 -6
  69. package/components/tag/tags.vdt +1 -0
  70. package/components/tag/useNowrap.ts +1 -1
  71. package/components/transfer/index.vdt +4 -3
  72. package/components/types.ts +1 -0
  73. package/components/upload/index.vdt +4 -4
  74. package/es/components/button/styles.d.ts +1 -1
  75. package/es/components/button/styles.js +3 -5
  76. package/es/components/carousel/index.vdt.js +2 -2
  77. package/es/components/cascader/index.vdt.js +1 -1
  78. package/es/components/collapse/item.vdt.js +1 -1
  79. package/es/components/copy/index.vdt.js +1 -1
  80. package/es/components/datepicker/calendar.vdt.js +6 -6
  81. package/es/components/datepicker/index.spec.js +170 -152
  82. package/es/components/datepicker/styles.js +1 -1
  83. package/es/components/datepicker/useValue.d.ts +3 -3
  84. package/es/components/datepicker/useValue.js +38 -9
  85. package/es/components/dialog/styles.js +1 -1
  86. package/es/components/form/styles.js +1 -1
  87. package/es/components/icon/styles.js +1 -1
  88. package/es/components/input/index.d.ts +3 -1
  89. package/es/components/input/index.js +4 -1
  90. package/es/components/input/index.vdt.js +21 -10
  91. package/es/components/input/search.vdt.js +2 -4
  92. package/es/components/input/styles.js +13 -6
  93. package/es/components/input/useFocus.d.ts +4 -0
  94. package/es/components/input/useFocus.js +21 -0
  95. package/es/components/menu/item.vdt.js +4 -1
  96. package/es/components/pagination/index.vdt.js +2 -2
  97. package/es/components/progress/index.vdt.js +1 -1
  98. package/es/components/select/base.vdt.js +36 -19
  99. package/es/components/select/index.spec.js +23 -11
  100. package/es/components/select/menu.vdt.js +5 -5
  101. package/es/components/select/option.vdt.js +2 -1
  102. package/es/components/select/styles.js +1 -1
  103. package/es/components/spinner/index.vdt.js +4 -4
  104. package/es/components/spinner/styles.js +2 -2
  105. package/es/components/steps/step.vdt.js +2 -2
  106. package/es/components/steps/styles.js +6 -2
  107. package/es/components/table/cell.vdt.js +1 -1
  108. package/es/components/table/column.vdt.js +40 -24
  109. package/es/components/table/index.spec.js +37 -6
  110. package/es/components/table/styles.js +15 -8
  111. package/es/components/table/useGroup.d.ts +9 -3
  112. package/es/components/table/useGroup.js +45 -37
  113. package/es/components/tabs/index.vdt.js +7 -2
  114. package/es/components/tag/styles.js +1 -1
  115. package/es/components/tag/tags.vdt.js +14 -2
  116. package/es/components/tag/useNowrap.js +1 -1
  117. package/es/components/transfer/index.vdt.js +14 -3
  118. package/es/components/types.d.ts +1 -0
  119. package/es/components/upload/index.vdt.js +4 -4
  120. package/es/index.d.ts +2 -2
  121. package/es/index.js +2 -2
  122. package/es/site/data/components/button/demos/disabled/react.js +5 -2
  123. package/es/site/data/components/button/demos/group/react.js +2 -2
  124. package/es/site/data/components/button/demos/icon/react.js +7 -7
  125. package/es/site/data/components/button/demos/loading/react.js +4 -4
  126. package/es/site/data/components/button/demos/size/react.js +4 -4
  127. package/es/site/data/components/datepicker/demos/datetime/index.d.ts +1 -0
  128. package/es/site/data/components/datepicker/demos/datetime/index.js +1 -0
  129. package/es/site/data/components/dropdown/demos/basic/react.js +1 -1
  130. package/es/site/data/components/dropdown/demos/checkbox/react.js +1 -1
  131. package/es/site/data/components/dropdown/demos/disabled/react.js +2 -2
  132. package/es/site/data/components/dropdown/demos/nested/react.js +9 -9
  133. package/es/site/data/components/dropdown/demos/position/react.js +3 -3
  134. package/es/site/data/components/dropdown/demos/trigger/react.js +2 -2
  135. package/es/site/data/components/form/demos/basic/react.js +1 -1
  136. package/es/site/data/components/icon/demos/icons/index.d.ts +8 -4
  137. package/es/site/data/components/icon/demos/icons/index.js +35 -1
  138. package/es/site/data/components/icon/demos/icons/react.d.ts +9 -4
  139. package/es/site/data/components/icon/demos/icons/react.js +51 -9
  140. package/es/site/data/components/input/demos/blocks/react.js +7 -7
  141. package/es/site/data/components/input/demos/clearable/react.js +2 -2
  142. package/es/site/data/components/input/demos/showCount/index.d.ts +5 -0
  143. package/es/site/data/components/input/demos/showCount/index.js +17 -0
  144. package/es/site/data/components/input/demos/showCount/react.d.ts +4 -0
  145. package/es/site/data/components/input/demos/showCount/react.js +33 -0
  146. package/es/site/data/components/input/demos/size/react.js +8 -8
  147. package/es/site/data/components/select/demos/customMenu/react.js +5 -5
  148. package/es/site/data/components/table/demos/title/react.js +4 -4
  149. package/es/site/src/pages/styles.js +1 -1
  150. package/es/site/src/router/index.js +1 -1
  151. package/es/styles/fonts/iconfont.eot +0 -0
  152. package/es/styles/fonts/iconfont.js +1 -1
  153. package/es/styles/fonts/iconfont.svg +35 -35
  154. package/es/styles/fonts/iconfont.ttf +0 -0
  155. package/es/styles/fonts/iconfont.woff +0 -0
  156. package/es/styles/global.js +1 -1
  157. package/index.ts +2 -2
  158. package/package.json +2 -2
  159. package/styles/fonts/demo.css +277 -108
  160. package/styles/fonts/demo_index.html +2169 -0
  161. package/styles/fonts/iconfont.css +52 -50
  162. package/styles/fonts/iconfont.eot +0 -0
  163. package/styles/fonts/iconfont.js +1 -0
  164. package/styles/fonts/iconfont.json +611 -0
  165. package/styles/fonts/iconfont.svg +35 -35
  166. package/styles/fonts/iconfont.ts +123 -124
  167. package/styles/fonts/iconfont.ttf +0 -0
  168. package/styles/fonts/iconfont.woff +0 -0
  169. package/styles/fonts/iconfont.woff2 +0 -0
  170. package/styles/global.ts +4 -4
  171. package/components/select/useNowrap.ts +0 -24
  172. package/es/components/select/useNowrap.d.ts +0 -3
  173. package/es/components/select/useNowrap.js +0 -19
@@ -45,6 +45,11 @@ const defaults = deepDefaults(
45
45
  flat: {
46
46
  get color() { return theme.color.lightBlack },
47
47
  get bgColor() { return theme.color.bg },
48
+ },
49
+
50
+ // count
51
+ count: {
52
+ get color() { return theme.color.placeholder },
48
53
  }
49
54
  },
50
55
  sizes.reduce((memo, size) => {
@@ -68,30 +73,35 @@ export function makeStyles() {
68
73
  return css`
69
74
  display: inline-block;
70
75
  width: ${input.width};
76
+ color: ${input.color};
71
77
  vertical-align: middle;
72
78
  .k-input-wrapper {
73
- display: inline-block;
79
+ display: inline-flex;
80
+ align-items: center;
74
81
  width: 100%;
75
82
  position: relative;
76
- }
77
- .k-input-inner {
78
- display: inline-block;
79
- width: 100%;
80
83
  border: ${input.border};
81
84
  background-color: ${input.bgColor};
82
85
  transition: border ${input.transition}, background ${input.transition}, box-shadow ${input.transition};
83
86
  border-radius: ${input.borderRadius};
84
- outline: none;
85
- position: relative;
86
- color: ${input.color};
87
87
  &:hover {
88
88
  border: ${input.hoverBorder};
89
89
  z-index: 1;
90
90
  }
91
- &:focus {
92
- border: ${input.focusBorder};
93
- z-index: 1;
94
- }
91
+ }
92
+ &.k-focus .k-input-wrapper {
93
+ border: ${input.focusBorder};
94
+ z-index: 1;
95
+ }
96
+ .k-input-inner {
97
+ flex: 1;
98
+ outline: none;
99
+ color: inherit;
100
+ font-size: inherit;
101
+ border: none;
102
+ background: transparent;
103
+ padding: 0;
104
+ width: 0; // must set width to 0, otherwise it has min width
95
105
  &::placeholder {
96
106
  color: ${input.placeholderColor};
97
107
  }
@@ -105,12 +115,17 @@ export function makeStyles() {
105
115
  // prefix & suffix
106
116
  .k-input-prefix,
107
117
  .k-input-suffix {
108
- position: absolute;
109
- top: 50%;
110
- transform: translateY(-50%);
111
- z-index: 2;
118
+ display: flex;
119
+ align-items: center;
120
+ gap: ${input.clearIconGap};
112
121
  color: ${theme.color.lightBlack};
113
- line-height: 1;
122
+ position: relative;
123
+ }
124
+ .k-input-prefix {
125
+ margin-right: ${input.clearIconGap};
126
+ }
127
+ .k-input-suffix {
128
+ margin-left: ${input.clearIconGap};
114
129
  }
115
130
 
116
131
  // clearable
@@ -119,9 +134,6 @@ export function makeStyles() {
119
134
  transition: opacity ${input.transition};
120
135
  pointer-events: none;
121
136
  color: ${input.clearIconColor};
122
- + * {
123
- margin-left: ${input.clearIconGap};
124
- }
125
137
  }
126
138
  &:hover .k-input-clear.k-input-show {
127
139
  opacity: 1;
@@ -139,12 +151,12 @@ export function makeStyles() {
139
151
  position: absolute;
140
152
  z-index: 1;
141
153
  right: 0;
142
- &.k-input-show + i {
154
+ &.k-input-show + * {
143
155
  transition: opacity ${input.transition};
144
156
  }
145
157
  }
146
158
  &:hover {
147
- .k-input-clear.k-input-show + i {
159
+ .k-input-clear.k-input-show + * {
148
160
  opacity: 0;
149
161
  }
150
162
  }
@@ -152,29 +164,23 @@ export function makeStyles() {
152
164
 
153
165
  // group
154
166
  &.k-group {
155
- display: table;
156
- .k-input-inner {
167
+ display: inline-flex;
168
+ .k-input-wrapper {
157
169
  border-radius: 0;
158
170
  }
159
171
  .k-input-wrapper:first-child {
160
- .k-input-inner {
161
- border-radius: ${input.borderRadius} 0 0 ${input.borderRadius};
162
- }
172
+ border-radius: ${input.borderRadius} 0 0 ${input.borderRadius};
163
173
  }
164
174
  .k-input-wrapper:last-child {
165
- .k-input-inner {
166
- border-radius: 0 ${input.borderRadius} ${input.borderRadius} 0;
167
- }
175
+ border-radius: 0 ${input.borderRadius} ${input.borderRadius} 0;
168
176
  }
169
177
  }
170
178
  .k-input-prepend,
171
179
  .k-input-append {
172
- display: table-cell;
173
- width: 1px;
174
- vertical-align: middle;
180
+ display: inline-flex;
181
+ align-items: center;
175
182
  background-color: ${input.groupBgColor};
176
183
  border: ${input.border};
177
- text-align: center;
178
184
  white-space: nowrap;
179
185
  .k-btn {
180
186
  margin: -1px;
@@ -216,10 +222,10 @@ export function makeStyles() {
216
222
 
217
223
  // flat
218
224
  &.k-flat {
219
- .k-input-inner {
225
+ color: ${input.flat.color};
226
+ .k-input-wrapper {
220
227
  border: none;
221
228
  background: ${input.flat.bgColor};
222
- color: ${input.flat.color};
223
229
  }
224
230
  }
225
231
 
@@ -227,10 +233,11 @@ export function makeStyles() {
227
233
  &.k-disabled {
228
234
  color: ${input.disabledColor};
229
235
  cursor: not-allowed;
230
- .k-input-inner {
231
- color: ${input.disabledColor};
236
+ .k-input-wrapper {
232
237
  border-color: ${input.disabledBorderColor};
233
238
  background: ${input.disabledBgColor};
239
+ }
240
+ .k-input-inner {
234
241
  cursor: not-allowed;
235
242
  }
236
243
  }
@@ -240,34 +247,10 @@ export function makeStyles() {
240
247
  const styles = input[size];
241
248
  const sizeClassName = css`
242
249
  font-size: ${styles.fontSize};
243
- .k-input-inner {
250
+ .k-input-wrapper {
244
251
  height: ${styles.height};
245
- line-height: ${styles.height};
246
- font-size: ${styles.fontSize};
247
252
  padding: 0 ${styles.paddingGap};
248
253
  }
249
- .k-input-prefix {
250
- left: ${styles.paddingGap};
251
- }
252
- .k-input-suffix {
253
- right: ${styles.paddingGap};
254
- }
255
- &.k-with-prefix {
256
- .k-input-inner {
257
- padding-left: calc(${styles.paddingGap} + 1rem + ${input.clearIconGap});
258
- }
259
- }
260
- &.k-with-suffix,
261
- &.k-clearable {
262
- .k-input-inner {
263
- padding-right: calc(${styles.paddingGap} + 1rem + ${input.clearIconGap});
264
- }
265
- }
266
- &:not(.k-stack-clear).k-with-suffix.k-clearable {
267
- .k-input-inner {
268
- padding-right: calc(${styles.paddingGap} + 2rem + ${input.clearIconGap} * 2);
269
- }
270
- }
271
254
  `;
272
255
 
273
256
  if (size === 'default') return sizeClassName;
@@ -280,9 +263,8 @@ export function makeStyles() {
280
263
 
281
264
  // inline
282
265
  &.k-inline {
283
- .k-input-inner {
266
+ .k-input-wrapper {
284
267
  height: auto;
285
- line-height: inherit;
286
268
  border: none;
287
269
  border-radius: 0;
288
270
  padding: 0;
@@ -290,11 +272,22 @@ export function makeStyles() {
290
272
  }
291
273
 
292
274
  // textarea
293
- .k-textarea {
294
- padding: ${input.textareaPadding};
295
- height: auto;
296
- line-height: 1.5;
297
- vertical-align: top;
275
+ &.k-type-textarea {
276
+ .k-input-wrapper {
277
+ display: inline-block;
278
+ padding: 0;
279
+ height: auto;
280
+ }
281
+ .k-textarea {
282
+ width: 100%;
283
+ padding: ${input.textareaPadding};
284
+ line-height: 1.5;
285
+ vertical-align: top;
286
+ }
287
+ .k-input-suffix {
288
+ margin: 0;
289
+ justify-content: flex-end;
290
+ }
298
291
  }
299
292
  ${(Input.typeDefs.resize as string[]).map(type => {
300
293
  return css`
@@ -308,18 +301,23 @@ export function makeStyles() {
308
301
 
309
302
  // fake dom for get value's width
310
303
  .k-input-fake {
304
+ left: 0;
305
+ top: 0;
306
+ right: 0;
311
307
  position: absolute;
308
+ overflow: hidden;
309
+ width: 100%;
312
310
  visibility: hidden;
313
- top: 0;
314
311
  white-space: nowrap;
315
312
  }
316
313
  &.k-auto-width {
317
314
  width: auto;
318
315
  max-width: 100%;
319
- .k-input-inner {
320
- max-width: 100%;
321
- box-sizing: content-box;
322
- }
316
+ }
317
+
318
+ // count
319
+ .k-input-count {
320
+ color: ${input.count.color};
323
321
  }
324
322
  `
325
323
  }
@@ -337,6 +335,9 @@ export function makeSearchStyles() {
337
335
  right: 0;
338
336
  z-index: 1;
339
337
  }
338
+ &.k-default .k-btn:hover {
339
+ background: transparent;
340
+ }
340
341
  .k-input-suffix {
341
342
  margin-right: ${input.search.suffixMarginRight};
342
343
  }
@@ -361,13 +362,16 @@ export function makeSearchStyles() {
361
362
 
362
363
  // line
363
364
  &.k-line {
364
- .k-input-inner {
365
+ .k-input-wrapper {
365
366
  border-width: 0;
366
367
  }
367
368
  &.k-open {
368
- .k-input-inner {
369
+ .k-input-wrapper {
369
370
  border-bottom-width: 1px;
370
371
  }
372
+ .k-btn:hover {
373
+ background: transparent;
374
+ }
371
375
  }
372
376
  }
373
377
  `
@@ -0,0 +1,17 @@
1
+ import {useInstance, createRef, onMounted, nextTick} from 'intact';
2
+ import type {Input} from './';
3
+ import {useState} from '../../hooks/useState';
4
+
5
+ export function useFocus() {
6
+ const instance = useInstance() as Input;
7
+ const isFocus = useState(false);
8
+
9
+ instance.on('focus', () => isFocus.set(true));
10
+ instance.on('blur', () => isFocus.set(false));
11
+
12
+ function focusInputOnClick(e: MouseEvent) {
13
+ instance.focus();
14
+ }
15
+
16
+ return { isFocus, focusInputOnClick };
17
+ }
@@ -35,7 +35,7 @@ const title = (children) => (
35
35
  >
36
36
  <Icon class="k-menu-dot ion-record" v-if={showDot} />
37
37
  <div class="k-menu-name">{children}</div>
38
- <i class="k-menu-arrow ion-ios-arrow-down" v-if={subMenuVNode}></i>
38
+ <Icon class="k-menu-arrow k-icon-down" v-if={subMenuVNode} />
39
39
  </div>
40
40
  );
41
41
 
@@ -121,13 +121,13 @@ let nextPage = value + 1;
121
121
  type="none"
122
122
  disabled={value <= 1 || !!(disablePage && disablePage(value - 1, limit))}
123
123
  ev-click={this.prev}
124
- ><Icon class="k-icon-arrow-left" /></Button>
124
+ ><Icon class="k-icon-left" /></Button>
125
125
  <template>{paginationItems}</template>
126
126
  <Button icon size={size}
127
127
  type="none"
128
128
  disabled={value >= totalPages || !!(disablePage && disablePage(value + 1, limit))}
129
129
  ev-click={this.next}
130
- ><Icon class="k-icon-arrow-right" /></Button>
130
+ ><Icon class="k-icon-right" /></Button>
131
131
  </ButtonGroup>
132
132
 
133
133
  <template v-if={!simple}>
@@ -90,7 +90,7 @@ const classNameObj = {
90
90
  } else {
91
91
  switch (status) {
92
92
  case 'success':
93
- icon = 'k-icon-truth';
93
+ icon = 'k-icon-check';
94
94
  break;
95
95
  case 'error':
96
96
  case 'warning':
@@ -20,7 +20,7 @@ import {Radio} from 'kpc';
20
20
 
21
21
  ```styl
22
22
  .k-radio
23
- margin-right 20px
23
+ margin-right 24px
24
24
  ```
25
25
 
26
26
  ```ts
@@ -18,7 +18,7 @@ import {Radio} from 'kpc';
18
18
 
19
19
  ```styl
20
20
  .k-radio
21
- margin-right 20px
21
+ margin-right 24px
22
22
  ```
23
23
 
24
24
  ```ts
@@ -23,7 +23,7 @@ import {Radio} from 'kpc';
23
23
 
24
24
  ```styl
25
25
  .k-radio
26
- margin-right 20px
26
+ margin-right 24px
27
27
  ```
28
28
 
29
29
  ```ts
@@ -38,6 +38,21 @@ const label = this.getLabel();
38
38
  const hasValue = this.hasValue();
39
39
  const {onInput, inputRef, keywords: {value: keywords}} = this.input;
40
40
  const {onFocusout, triggerRef} = this.focusout;
41
+ const filterInput = <Input v-if={filterable}
42
+ class="k-select-input"
43
+ value={keywords}
44
+ ev-$change:value={onInput}
45
+ disabled={disabled}
46
+ placeholder={!hasValue ? placeholder : ''}
47
+ ref={inputRef}
48
+ autoWidth
49
+ inline
50
+ size={size}
51
+ key="filter"
52
+ readonly={!show}
53
+ waveDisabled={true}
54
+ flat={flat}
55
+ />
41
56
 
42
57
  <ErrorContext.Consumer defaultValue={false}>
43
58
  {isInvalid => {
@@ -90,7 +105,7 @@ const {onFocusout, triggerRef} = this.focusout;
90
105
  </div>
91
106
  <div v-else key="values" class="k-select-values">
92
107
  <b:values params={[value, label]}>
93
- <Tags v-if={label && label.length}
108
+ <Tags v-if={label && label.length || filterable}
94
109
  nowrap={nowrap}
95
110
  size={size}
96
111
  draggable={draggable}
@@ -117,23 +132,10 @@ const {onFocusout, triggerRef} = this.focusout;
117
132
  </b:value>
118
133
  </template>
119
134
  </Tag>
135
+ <b:append>{filterInput}</b:append>
120
136
  </Tags>
121
137
  </b:values>
122
- <Input v-if={filterable}
123
- class="k-select-input"
124
- value={keywords}
125
- ev-$change:value={onInput}
126
- disabled={disabled}
127
- placeholder={!hasValue ? placeholder : ''}
128
- ref={inputRef}
129
- autoWidth
130
- inline
131
- size={size}
132
- key="filter"
133
- readonly={!show}
134
- waveDisabled={true}
135
- flat={flat}
136
- />
138
+ <template v-if={$blocks && $blocks.values}>{filterInput}</template>
137
139
  </div>
138
140
  </TransitionGroup>
139
141
  </div>
@@ -147,7 +149,7 @@ const {onFocusout, triggerRef} = this.focusout;
147
149
  <b:suffix>
148
150
  <Icon class="ion-load-c" rotate v-if={loading} />
149
151
  <Icon v-else-if={!hideIcon}
150
- class="k-select-arrow ion-ios-arrow-down"
152
+ class="k-select-arrow k-icon-down"
151
153
  disabled={$props.isDisableArrow}
152
154
  />
153
155
  </b:suffix>
@@ -14,7 +14,7 @@ import {Select, Table, TableColumn, Input, Button, Icon} from 'kpc';
14
14
  >
15
15
  <b:menu>
16
16
  <Input placeholder="请输入关键字" size="small" fluid v-model="keywords" waveDisabled={true}>
17
- <b:suffix><Icon class="ion-ios-search" /></b:suffix>
17
+ <b:suffix><Icon class="k-icon-search" /></b:suffix>
18
18
  </Input>
19
19
  <Table data={this.filter()}
20
20
  type="border"
@@ -27,8 +27,8 @@ import {Select, Table, TableColumn, Input, Button, Icon} from 'kpc';
27
27
  <TableColumn title="Domain" key="domain" />
28
28
  </Table>
29
29
  <div class="footer">
30
- <Button type="primary" size="small" ev-click={this.confirm}>确定</Button>
31
30
  <Button size="small" ev-click={this.hide}>取消</Button>
31
+ <Button type="primary" size="small" ev-click={this.confirm}>确定</Button>
32
32
  </div>
33
33
  </b:menu>
34
34
  </Select>
@@ -256,11 +256,12 @@ describe('Select', () => {
256
256
  await wait();
257
257
  const dropdown = getElement('.k-select-menu')!;
258
258
  const [selectAll, toggleSelect, unselectAll] = dropdown.querySelectorAll<HTMLElement>('.k-select-op .k-btn');
259
- const [confirm, cancel] = dropdown.querySelectorAll<HTMLElement>('.k-select-footer .k-btn');
259
+ const [cancel, confirm] = dropdown.querySelectorAll<HTMLElement>('.k-select-footer .k-btn');
260
260
 
261
261
  // select all
262
262
  selectAll.click();
263
263
  confirm.click();
264
+ await wait();
264
265
  expect(instance.get('days')).have.length(7);
265
266
 
266
267
  // unselect all
@@ -268,6 +269,7 @@ describe('Select', () => {
268
269
  await wait();
269
270
  unselectAll.click();
270
271
  confirm.click();
272
+ await wait();
271
273
  expect(instance.get('days')).have.length(0);
272
274
 
273
275
  // toggle select
@@ -281,6 +283,7 @@ describe('Select', () => {
281
283
  await wait();
282
284
  toggleSelect.click();
283
285
  confirm.click();
286
+ await wait();
284
287
  expect(instance.get('days')).have.length(5);
285
288
  expect(instance.get('days')).include('Monday')
286
289
  });
@@ -61,7 +61,7 @@ if (searchable) {
61
61
  clearable
62
62
  waveDisabled={true}
63
63
  >
64
- <b:suffix><Icon class="ion-ios-search" /></b:suffix>
64
+ <b:suffix><Icon class="k-icon-search" /></b:suffix>
65
65
  </Input>
66
66
  <div class="k-select-op" v-if={multiple}>
67
67
  <Button type="link" size="small"
@@ -79,8 +79,8 @@ if (searchable) {
79
79
  {children}
80
80
  </div>
81
81
  <div class="k-select-footer" v-if={multiple}>
82
- <Button type="primary" size="small" ev-click={confirm}>{_$('确定')}</Button>
83
82
  <Button size="small" ev-click={this.select.hide}>{_$('取消')}</Button>
83
+ <Button type="primary" size="small" ev-click={confirm}>{_$('确定')}</Button>
84
84
  </div>
85
85
  </Provider>
86
86
  );
@@ -43,6 +43,7 @@ if (searchable && multiple) {
43
43
  <Transition name="k-scale" v-if={!searchable}>
44
44
  <Icon v-if={multiple && isActive}
45
45
  class="k-select-checkmark ion-ios-checkmark-empty"
46
+ color="primary"
46
47
  />
47
48
  </Transition>
48
49
  </DropdownItem>
@@ -133,6 +133,8 @@ export default function makeStyles() {
133
133
  }
134
134
  .k-select-prefix,
135
135
  .k-select-suffix {
136
+ display: flex;
137
+ align-items: center;
136
138
  position: relative;
137
139
  }
138
140
  .k-select-suffix {
@@ -176,7 +178,8 @@ export default function makeStyles() {
176
178
  }
177
179
  }
178
180
  .k-select-suffix-icon {
179
- display: inline-block;
181
+ display: inline-flex;
182
+ align-items: center;
180
183
  transition: opacity ${select.transition};
181
184
  }
182
185
 
@@ -204,6 +207,7 @@ export default function makeStyles() {
204
207
  .k-tag {
205
208
  word-break: break-word;
206
209
  height: auto;
210
+ max-width: calc(100% - ${getRight(select.tag.margin)} - 1px);
207
211
  }
208
212
 
209
213
  // size
@@ -24,8 +24,8 @@ const {showValue, onInput} = this.value;
24
24
  type="none"
25
25
  tabindex="-1"
26
26
  >
27
- <Icon v-if={!vertical} class="k-spinner-icon k-icon-minus-small" />
28
- <Icon v-else class="k-spinner-icon k-icon-arrow-down" />
27
+ <Icon v-if={!vertical} class="k-spinner-icon k-icon-minus" />
28
+ <Icon v-else class="k-spinner-icon k-icon-down" />
29
29
  </Button>
30
30
  <Input
31
31
  class="k-spinner-input"
@@ -44,7 +44,7 @@ const {showValue, onInput} = this.value;
44
44
  type="none"
45
45
  tabindex="-1"
46
46
  >
47
- <Icon v-if={!vertical} class="k-spinner-icon k-icon-add-small" />
48
- <Icon v-else class="k-spinner-icon k-icon-arrow-up" />
47
+ <Icon v-if={!vertical} class="k-spinner-icon k-icon-add" />
48
+ <Icon v-else class="k-spinner-icon k-icon-up" />
49
49
  </Button>
50
50
  </div>
@@ -71,15 +71,19 @@ export function makeStyles() {
71
71
  }
72
72
  .k-spinner-input {
73
73
  width: ${spinner.default.inputWidth};
74
- .k-input-inner {
75
- text-align: center;
74
+ .k-input-wrapper {
76
75
  border:none;
77
76
  border-radius: 0;
78
- &:hover,
79
- &:focus {
77
+ &:hover{
80
78
  border: none
81
79
  }
82
80
  }
81
+ &.k-focus .k-input-wrapper {
82
+ border: none;
83
+ }
84
+ .k-input-inner {
85
+ text-align: center;
86
+ }
83
87
  }
84
88
  .k-spinner-icon {
85
89
  font-size: ${spinner.default.iconFontSize};
@@ -106,8 +110,7 @@ export function makeStyles() {
106
110
  border-radius: 0 ${spinner.borderRadius} 0 0;
107
111
  }
108
112
  .k-spinner-input {
109
- font-size: 0;
110
- .k-input-inner {
113
+ .k-input-wrapper {
111
114
  border-radius: ${spinner.borderRadius} 0 0 ${spinner.borderRadius};
112
115
  }
113
116
  }
@@ -26,9 +26,9 @@ const {children, title, index, className, style} = this.get();
26
26
  ev-click={linkEvent(index, onChange)}
27
27
  >
28
28
  <div class="k-step-mark">
29
- <Icon v-if={error && type !== 'simple'} class="k-icon-close-big" color="danger" />
29
+ <Icon v-if={error && type !== 'simple'} class="k-icon-close-bold" color="danger" />
30
30
  <Icon v-else-if={done && (type === 'line' || type === 'line-compact')}
31
- class="k-icon-check"
31
+ class="k-icon-check-bold"
32
32
  color="primary"
33
33
  />
34
34
  <span v-else-if={type !== 'simple'}>{index + 1}</span>
@@ -1,6 +1,6 @@
1
1
  import {css, cx} 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
 
6
6
  const defaults = {
@@ -22,6 +22,7 @@ const defaults = {
22
22
  done: {
23
23
  get markColor() { return theme.color.primary },
24
24
  get markBorderColor() { return theme.color.primary },
25
+ get markHoverBgColor() { return palette(theme.color.primary, -4) },
25
26
  markBgColor: '#fff',
26
27
  get mainColor() { return theme.color.primary },
27
28
  },
@@ -109,6 +110,9 @@ export function makeStepsStyles() {
109
110
  &.k-clickable {
110
111
  .k-done {
111
112
  cursor: pointer;
113
+ .k-step-wrapper:hover .k-step-mark {
114
+ background: ${steps.done.markHoverBgColor};
115
+ }
112
116
  }
113
117
  }
114
118
 
@@ -36,7 +36,7 @@ if (columnIndex === 0 && indent) {
36
36
  class="k-table-arrow"
37
37
  ev-click={onClickArrow}
38
38
  >
39
- <Icon class="ion-ios-arrow-right" size="small" />
39
+ <Icon class="k-icon-right" size="small" />
40
40
  </Button>
41
41
  {children}
42
42
  </td>