bkui-vue 0.0.1-beta.14 → 0.0.1-beta.15

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 (101) hide show
  1. package/README.md +25 -17
  2. package/README_EN.md +89 -0
  3. package/dist/bkui-vue.cjs.js +1473 -425
  4. package/dist/bkui-vue.esm.js +1472 -427
  5. package/dist/bkui-vue.umd.js +1473 -425
  6. package/dist/style.css +315 -177
  7. package/lib/alert/index.js +1 -1
  8. package/lib/badge/index.js +1 -1
  9. package/lib/breadcrumb/breadcrumb.css +10 -1
  10. package/lib/breadcrumb/breadcrumb.d.ts +20 -0
  11. package/lib/breadcrumb/breadcrumb.less +13 -2
  12. package/lib/breadcrumb/breadcrumb.variable.css +10 -1
  13. package/lib/breadcrumb/index.d.ts +37 -1
  14. package/lib/breadcrumb/index.js +1 -1
  15. package/lib/button/index.js +1 -1
  16. package/lib/card/index.js +1 -1
  17. package/lib/checkbox/index.js +1 -1
  18. package/lib/components.d.ts +2 -0
  19. package/lib/date-picker/index.js +1 -1
  20. package/lib/directives/index.js +1 -1
  21. package/lib/form/index.js +1 -1
  22. package/lib/icon/angle-down-fill.d.ts +4 -0
  23. package/lib/icon/angle-up-fill.d.ts +4 -0
  24. package/lib/icon/arrows-left.d.ts +4 -0
  25. package/lib/icon/index.d.ts +7 -3
  26. package/lib/icon/index.js +1 -1
  27. package/lib/icon/spinner.d.ts +4 -0
  28. package/lib/input/index.d.ts +11 -3
  29. package/lib/input/index.js +2 -2
  30. package/lib/input/input.css +1 -0
  31. package/lib/input/input.d.ts +3 -1
  32. package/lib/input/input.less +4 -3
  33. package/lib/input/input.variable.css +1 -0
  34. package/lib/loading/index.js +1 -1
  35. package/lib/menu/index.js +1 -1
  36. package/lib/modal/index.js +1 -1
  37. package/lib/notify/index.js +1 -1
  38. package/lib/notify/notifyConstructor.d.ts +2 -2
  39. package/lib/popover/index.d.ts +103 -48
  40. package/lib/popover/index.js +1 -1
  41. package/lib/popover/popover.css +22 -13
  42. package/lib/popover/popover.d.ts +30 -23
  43. package/lib/popover/popover.less +55 -45
  44. package/lib/popover/popover.variable.css +22 -13
  45. package/lib/popover/props.d.ts +77 -0
  46. package/lib/process/index.js +1 -1
  47. package/lib/progress/index.d.ts +23 -1
  48. package/lib/progress/index.js +1 -1
  49. package/lib/progress/progress.css +0 -3
  50. package/lib/progress/progress.d.ts +17 -1
  51. package/lib/progress/progress.less +0 -4
  52. package/lib/progress/progress.variable.css +0 -3
  53. package/lib/radio/index.js +1 -1
  54. package/lib/select/common.d.ts +10 -1
  55. package/lib/select/index.d.ts +131 -188
  56. package/lib/select/index.js +2 -2
  57. package/lib/select/option.d.ts +1 -7
  58. package/lib/select/optionGroup.d.ts +22 -15
  59. package/lib/select/select.css +71 -14
  60. package/lib/select/select.d.ts +40 -55
  61. package/lib/select/select.less +73 -14
  62. package/lib/select/select.variable.css +71 -14
  63. package/lib/shared/bk-helper-core.d.ts +6 -0
  64. package/lib/shared/bk-popover.d.ts +45 -4
  65. package/lib/shared/index.d.ts +10 -0
  66. package/lib/shared/index.js +1 -1
  67. package/lib/shared/utils.d.ts +6 -0
  68. package/lib/steps/index.js +1 -1
  69. package/lib/styles/index.d.ts +1 -0
  70. package/lib/styles/index.js +1 -1
  71. package/lib/switcher/index.js +1 -1
  72. package/lib/switcher/switcher.css +149 -135
  73. package/lib/switcher/switcher.less +210 -154
  74. package/lib/switcher/switcher.variable.css +149 -135
  75. package/lib/tab/index.js +1 -1
  76. package/lib/table/index.d.ts +76 -1
  77. package/lib/table/index.js +1 -1
  78. package/lib/table/props.d.ts +38 -0
  79. package/lib/table/render.d.ts +1 -1
  80. package/lib/table/table.css +6 -4
  81. package/lib/table/table.d.ts +34 -0
  82. package/lib/table/table.less +4 -4
  83. package/lib/table/table.variable.css +6 -4
  84. package/lib/table/utils.d.ts +7 -0
  85. package/lib/tree/index.d.ts +22 -8
  86. package/lib/tree/index.js +1 -1
  87. package/lib/tree/props.d.ts +52 -0
  88. package/lib/tree/tree.css +16 -7
  89. package/lib/tree/tree.d.ts +13 -7
  90. package/lib/tree/tree.less +24 -24
  91. package/lib/tree/tree.variable.css +16 -7
  92. package/lib/tree/util.d.ts +3 -44
  93. package/lib/virtual-render/index.d.ts +395 -0
  94. package/lib/virtual-render/index.js +1 -0
  95. package/lib/virtual-render/props.d.ts +147 -0
  96. package/lib/virtual-render/v-virtual-render.d.ts +7 -0
  97. package/lib/virtual-render/virtual-render.css +40 -0
  98. package/lib/virtual-render/virtual-render.d.ts +175 -0
  99. package/lib/virtual-render/virtual-render.less +51 -0
  100. package/lib/virtual-render/virtual-render.variable.css +40 -0
  101. package/package.json +8 -6
@@ -3,162 +3,181 @@
3
3
 
4
4
  .@{bk-prefix}-switcher {
5
5
  position: relative;
6
+ position: relative;
7
+ display: inline-block;
6
8
  display: inline-block;
9
+ height: 20px;
7
10
 
8
11
  /* 默认尺寸 */
9
- width: 36px;
10
- height: 20px;
12
+ min-width: 36px;
13
+ padding: 0;
14
+ margin: 0;
15
+ font-size: 14px;
11
16
  line-height: 20px;
12
17
  text-align: left;
13
18
  vertical-align: middle;
19
+ list-style: none;
20
+ cursor: pointer;
14
21
  background-color: @switch-grey-color;
22
+ border: 1px solid transparent;
15
23
  border-radius: 50px;
24
+ border-radius: 100px;
25
+ box-sizing: border-box;
16
26
  transition: all .4s ease;
17
-
18
- &:focus {
19
- box-shadow: 0px 0px 6px @switch-grey-color;
20
- }
27
+ transition: all .36s;
28
+ user-select: none;
21
29
 
22
30
  &:after {
23
31
  position: absolute;
24
- top: 2px;
25
- left: 2px;
26
- display: block;
27
- width: 24px;
28
- height: 24px;
29
- cursor: pointer;
30
- background: @switch-default-color;
31
- border-radius: 100px;
32
- content: '';
33
- box-shadow: 0 0 3px rgba(0, 0, 0, .2);
34
- transition: all .3s ease
35
- }
36
-
37
- &:not(.show-label):after {
32
+ top: 1px;
33
+ left: 1px;
38
34
  width: 16px;
39
35
  height: 16px;
36
+ cursor: pointer;
37
+ background: @switch-default-color;
38
+ background-color: #fff;
39
+ border-radius: 18px;
40
+ content: ' ';
41
+ transition: all .3s ease;
40
42
  }
41
43
 
42
- &:not(.show-label).is-checked {
43
- &:after {
44
- margin-left: -18px;
45
- }
44
+ .switcher-text {
45
+ display: block;
46
+ margin-right: 6px;
47
+ margin-left: 28px;
48
+ font-size: 12px;
49
+ font-weight: 400;
50
+ color: #fff;
51
+ text-align: center;
52
+ transition: all .3s ease;
46
53
  }
47
54
 
48
- &.is-loading {
49
- cursor: defalt;
55
+ .animating-node {
56
+ position: absolute;
57
+ top: 0;
58
+ right: 0;
59
+ bottom: 0;
60
+ left: 0;
61
+ display: block;
62
+ pointer-events: none;
63
+ border-radius: inherit;
64
+ content: '';
65
+ // box-shadow: 0 0 0 0 var(--antd-wave-shadow-color);
66
+ opacity: .2;
67
+ box-shadow: 0 0 0 0 #1890ff;
68
+ animation: fadeEffect 2s cubic-bezier(.08,.82,.17,1),waveEffect .4s cubic-bezier(.08,.82,.17,1);
69
+ animation-fill-mode: forwards;
50
70
 
51
- input[type=checkbox] {
52
- cursor: default;
53
- }
54
71
  }
55
72
 
73
+
56
74
  .bk-switcher-loading {
57
75
  position: absolute;
58
- top: 50%;
76
+ top: 1px;
59
77
  left: 1px;
60
- z-index: 10;
61
- display: flex;
62
- width: 18px;
63
- height: 18px;
64
- transform: translateY(-50%);
78
+ z-index: 1;
79
+ width: 16px;
80
+ height: 16px;
81
+ font-size: 12px;
82
+ color: @switch-grey-color;
83
+ cursor: pointer;
84
+ background: transparent;
85
+ border-radius: 16px;
86
+ content: ' ';
87
+ transition: all .36s cubic-bezier(.78,.14,.15,.86);
65
88
 
66
89
  svg {
67
- color: rgb(58, 132, 255);;
90
+ position: absolute;
91
+ top: 0;
92
+ right: 0;
93
+ bottom: 0;
94
+ left: 0;
95
+ margin: auto;
96
+ animation: loading 1s linear infinite
68
97
  }
69
98
  }
70
99
 
71
- .switcher-label {
72
- display: none;
73
- width: 30px;
74
- height: 28px;
75
- margin: 0 0 0 26px;
76
- font-size: 12px;
77
- font-weight: normal;
78
- color: @switch-default-color;
79
- text-align: center;
80
- vertical-align: top;
81
- transition: all ease .3s;
82
-
83
- .on-text {
84
- display: none;
85
- }
100
+ &.is-loading {
101
+ cursor: defalt;
86
102
 
87
- .off-text {
88
- display: inline-block
103
+ input[type=checkbox] {
104
+ cursor: default;
89
105
  }
90
106
  }
91
107
 
92
108
  /* 显示文本时固定尺寸 */
93
109
  &.show-label {
94
- width: 60px;
95
110
  height: 28px;
111
+ min-width: 60px;
96
112
  line-height: 28px;
97
113
 
98
- .switcher-label {
99
- display: inline-block;
114
+ &::after {
115
+ width: 24px;
116
+ height: 24px;
100
117
  }
101
118
 
102
119
  .bk-switcher-loading {
103
- width: 26px;
104
- height: 26px;
105
- align-items: center;
106
- justify-content: center;
120
+ width: 24px;
121
+ height: 24px;
122
+ font-size: 20px;
123
+ }
124
+ }
107
125
 
108
- svg {
109
- font-size: 24px;
110
- }
126
+ &.show-label.is-checked {
127
+ .bk-switcher-loading {
128
+ left: 100%;
129
+ margin-left: -25px;
111
130
  }
112
131
  }
113
132
 
114
133
  &.is-disabled {
115
- cursor: default;
116
-
117
- /* background-color: #eee !important; */
134
+ cursor: not-allowed;
118
135
  opacity: .3;
119
136
 
120
- input[type=checkbox] {
137
+ .bk-switcher-loading {
121
138
  cursor: not-allowed;
122
139
  }
123
- }
124
140
 
141
+ &::after {
142
+ cursor: not-allowed;
143
+ }
144
+ }
145
+
125
146
  &.is-checked {
126
147
  background: @success-color;
127
-
128
- &:focus {
129
- box-shadow: 0px 0px 6px @success-color;
148
+
149
+ .bk-switcher-loading {
150
+ svg {
151
+ color: @success-color;
152
+ }
130
153
  }
131
154
 
132
- &.primary {
155
+ &:not(.bk-switcher-outline)&.primary {
133
156
  background: @primary-color;
134
157
 
135
- &:focus {
136
- box-shadow: 0px 0px 6px @primary-color;
158
+ .bk-switcher-loading {
159
+ svg {
160
+ color: @primary-color;
161
+ }
137
162
  }
138
163
  }
139
164
 
140
165
  &:after {
141
- top: 2px;
142
166
  left: 100%;
143
- margin-left: -26px;
167
+ margin-left: -1px;
168
+ transform: translateX(-100%);
144
169
  }
145
170
 
146
- .switcher-label {
147
- margin-left: 4px;
148
-
149
- .on-text {
150
- display: inline-block;
151
- }
152
-
153
- .off-text {
154
- display: none;
155
- }
171
+ .switcher-text {
172
+ margin-right: 28px;
173
+ margin-left: 6px;
156
174
  }
157
175
 
158
- .bk-switcher-loading {
159
- right: 1px;
160
- left: auto;
161
- }
176
+ }
177
+
178
+ &:not(.show-label).is-checked .bk-switcher-loading {
179
+ left: 100%;
180
+ margin-left: -17px;
162
181
  }
163
182
 
164
183
  &.bk-switcher-outline {
@@ -166,64 +185,63 @@
166
185
  border: 1px solid @switch-grey-color;
167
186
 
168
187
  &:after {
169
- width: 22px;
170
- height: 22px;
188
+ width: 24px;
189
+ height: 24px;
171
190
  background-color: @switch-grey-color;
172
191
  box-shadow: none;
173
192
  }
174
193
 
175
- .switcher-label {
176
- height: 26px;
177
- margin-left: 24px;
194
+ .switcher-text {
178
195
  color: @switch-grey-color;
179
196
  }
180
197
 
181
- .bk-switcher-loading {
182
- width: 22px;
183
- height: 22px;
184
- align-items: center;
185
- justify-content: center;
186
- }
198
+
187
199
 
188
200
  &.is-checked {
189
201
  border: 1px solid @success-color;
190
202
 
191
203
  &:after {
192
- margin-left: -24px;
204
+ // margin-left: -33px;
193
205
  background-color: @success-color;
194
206
  }
195
207
 
196
- .switcher-label {
197
- margin-left: 4px;
208
+ .switcher-text {
198
209
  color: @success-color;
199
210
  }
211
+
200
212
  }
201
213
 
202
- &.is-disabled {
203
- background-color: @switch-default-color;
204
- border-color: #eee;
214
+ // &.is-disabled {
215
+ // background-color: @switch-default-color;
216
+ // border-color: #eee;
205
217
 
206
- .switcher-label {
207
- color: #eee;
208
- }
218
+ // .switcher-text {
219
+ // color: #eee;
220
+ // }
209
221
 
210
- &:after {
211
- background-color: #eee;
222
+ // &:after {
223
+ // background-color: #eee;
224
+ // }
225
+ // }
226
+
227
+ .bk-switcher-loading {
228
+ svg {
229
+ color: #fff;
212
230
  }
213
231
  }
232
+ }
214
233
 
215
- &.bk-switcher-large {
234
+ &.bk-switcher-outline&.primary {
235
+ &.is-checked {
236
+ border: 1px solid @primary-color;
216
237
  &:after {
217
- width: 18px;
218
- height: 18px;
238
+ background: @primary-color;
219
239
  }
220
-
221
- &.is-checked {
222
- &:after {
223
- margin-left: -20px;
224
- }
240
+ .switcher-text {
241
+ color: @primary-color;
225
242
  }
226
243
  }
244
+
227
245
  }
228
246
 
229
247
  &.bk-switcher-square {
@@ -232,40 +250,43 @@
232
250
  &:after {
233
251
  border-radius: 2px;
234
252
  }
235
-
236
- .switcher-label {
237
- width: 35px;
238
- }
239
253
  }
240
254
 
241
255
  &.bk-switcher-large {
242
- width: 42px;
243
256
  height: 24px;
257
+ min-width: 42px;
244
258
  line-height: 22px;
245
- border-radius: 12px;
246
-
259
+
247
260
  &:after {
248
261
  width: 20px;
249
262
  height: 20px;
250
263
  }
251
264
 
265
+ .bk-switcher-loading {
266
+ width: 20px;
267
+ height: 20px;
268
+ font-size: 16px;
269
+ }
270
+
252
271
  &.is-checked {
253
- &:after {
254
- top: 2px;
255
- left: 100%;
256
- margin-left: -22px;
272
+ .bk-switcher-loading {
273
+ margin-left: -21px;
257
274
  }
258
275
  }
259
276
 
260
- .bk-switcher-loading {
261
- width: 22px;
262
- height: 22px;
263
- }
277
+ // &.is-checked {
278
+ // &:after {
279
+ // top: 2px;
280
+ // left: 100%;
281
+ // margin-left: -22px;
282
+ // }
283
+
284
+ // }
264
285
  }
265
286
 
266
287
  &.bk-switcher-small {
267
- width: 26px;
268
288
  height: 16px;
289
+ min-width: 26px;
269
290
  line-height: 22px;
270
291
 
271
292
  &:after {
@@ -273,30 +294,65 @@
273
294
  height: 12px;
274
295
  }
275
296
 
276
- &.is-checked {
277
- &:after {
278
- top: 2px;
279
- left: 100%;
280
- margin-left: -14px;
281
- }
297
+ .bk-switcher-loading {
298
+ width: 12px;
299
+ height: 12px;
300
+ font-weight: 700;
301
+ transform: scale(.66667);
282
302
  }
303
+ }
283
304
 
305
+ &.bk-switcher-small.is-checked {
284
306
  .bk-switcher-loading {
285
- width: 14px;
286
- height: 14px;
307
+ margin-left: -13px;
287
308
  }
309
+
288
310
  }
311
+ }
289
312
 
290
- input[type=checkbox],
291
- input[type=radio] {
292
- position: absolute;
293
- top: 0;
294
- left: 0;
295
- z-index: 1;
296
- width: 100%;
297
- height: 100%;
298
- margin: 0;
299
- cursor: pointer;
313
+ &:not(.show-label).bk-switcher-nomal.bk-switcher-outline {
314
+ &::after {
315
+ width: 16px;
316
+ height: 16px;
317
+ }
318
+ }
319
+
320
+ &:not(.show-label).bk-switcher-outline.is-checked.bk-switcher-small {
321
+ &::after {
322
+ width: 12px;
323
+ height: 12px;
324
+ }
325
+ }
326
+
327
+ &:not(.show-label).bk-switcher-outline.is-checked.bk-switcher-large {
328
+ &::after {
329
+ width: 20px;
330
+ height: 20px;
331
+ }
332
+ }
333
+
334
+ &:not(.show-label).bk-switcher-outline.is-checked {
335
+ &::after {
336
+ width: 16px;
337
+ height: 16px;
338
+ }
339
+ }
340
+
341
+
342
+ @keyframes fadeEffect {
343
+ 100% {
300
344
  opacity: 0;
301
345
  }
302
346
  }
347
+
348
+ @keyframes waveEffect {
349
+ 100% {
350
+ box-shadow: 0 0 0 #1890ff;
351
+ }
352
+ }
353
+
354
+ @keyframes loading {
355
+ 100% {
356
+ transform: rotate(1turn);
357
+ }
358
+ }