bkui-vue 0.0.1-beta.25 → 0.0.1-beta.28

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 (53) hide show
  1. package/dist/bkui-vue.cjs.js +1368 -296
  2. package/dist/bkui-vue.esm.js +1369 -298
  3. package/dist/bkui-vue.umd.js +1368 -296
  4. package/dist/style.css +585 -72
  5. package/lib/components.d.ts +1 -0
  6. package/lib/pagination/index.d.ts +3 -3
  7. package/lib/pagination/index.js +1 -1
  8. package/lib/pagination/pagination.d.ts +1 -1
  9. package/lib/pagination/type.d.ts +1 -1
  10. package/lib/popover/index.js +1 -1
  11. package/lib/resize-layout/index.d.ts +336 -0
  12. package/lib/resize-layout/index.js +1 -0
  13. package/lib/resize-layout/resize-layout.css +189 -0
  14. package/lib/resize-layout/resize-layout.d.ts +127 -0
  15. package/lib/resize-layout/resize-layout.less +233 -0
  16. package/lib/resize-layout/resize-layout.variable.css +282 -0
  17. package/lib/select/common.d.ts +23 -27
  18. package/lib/select/index.d.ts +530 -145
  19. package/lib/select/index.js +12 -12
  20. package/lib/select/optionGroup.d.ts +0 -76
  21. package/lib/select/select.css +156 -46
  22. package/lib/select/select.d.ts +150 -39
  23. package/lib/select/select.less +136 -75
  24. package/lib/select/select.variable.css +156 -46
  25. package/lib/select/type.d.ts +31 -0
  26. package/lib/styles/index.d.ts +2 -0
  27. package/lib/styles/index.js +1 -1
  28. package/lib/swiper/index.js +1 -1
  29. package/lib/swiper/swiper.css +14 -14
  30. package/lib/swiper/swiper.less +93 -77
  31. package/lib/swiper/swiper.variable.css +14 -14
  32. package/lib/table/table.css +1 -1
  33. package/lib/table/table.less +1 -1
  34. package/lib/table/table.variable.css +1 -1
  35. package/lib/tag/index.js +1 -1
  36. package/lib/tag/tag.css +11 -5
  37. package/lib/tag/tag.less +12 -5
  38. package/lib/tag/tag.variable.css +11 -5
  39. package/lib/tag-input/common.d.ts +24 -0
  40. package/lib/tag-input/index.d.ts +2 -0
  41. package/lib/tag-input/index.js +1 -0
  42. package/lib/tag-input/list-tag-render.d.ts +47 -0
  43. package/lib/tag-input/tag-input.css +208 -0
  44. package/lib/tag-input/tag-input.d.ts +374 -0
  45. package/lib/tag-input/tag-input.less +250 -0
  46. package/lib/tag-input/tag-input.variable.css +301 -0
  47. package/lib/tag-input/tag-props.d.ts +131 -0
  48. package/lib/tag-input/tag-render.d.ts +38 -0
  49. package/lib/tree/index.js +1 -1
  50. package/lib/tree/tree.css +6 -6
  51. package/lib/tree/tree.less +7 -6
  52. package/lib/tree/tree.variable.css +6 -6
  53. package/package.json +3 -3
@@ -1,4 +1,4 @@
1
- import { OnFirstUpdateFnType } from '@bkui-vue/shared';
1
+ import { OptionInstanceType } from './type';
2
2
  declare const _default: import("vue").DefineComponent<{
3
3
  modelValue: import("vue-types").VueTypeValidableDef<any>;
4
4
  multiple: import("vue-types").VueTypeValidableDef<boolean> & {
@@ -6,11 +6,6 @@ declare const _default: import("vue").DefineComponent<{
6
6
  } & {
7
7
  default: boolean;
8
8
  };
9
- placeholder: import("vue-types").VueTypeValidableDef<string> & {
10
- default: string;
11
- } & {
12
- default: string;
13
- };
14
9
  disabled: import("vue-types").VueTypeValidableDef<boolean> & {
15
10
  default: boolean;
16
11
  } & {
@@ -42,34 +37,61 @@ declare const _default: import("vue").DefineComponent<{
42
37
  } & {
43
38
  default: number;
44
39
  };
40
+ showSelectAll: import("vue-types").VueTypeValidableDef<boolean> & {
41
+ default: boolean;
42
+ } & {
43
+ default: boolean;
44
+ };
45
+ popoverMinWidth: import("vue-types").VueTypeValidableDef<number> & {
46
+ default: number;
47
+ } & {
48
+ default: number;
49
+ };
50
+ showOnInit: import("vue-types").VueTypeValidableDef<boolean> & {
51
+ default: boolean;
52
+ } & {
53
+ default: boolean;
54
+ };
55
+ multipleMode: import("vue-types").VueTypeDef<string> & {
56
+ default: string;
57
+ };
58
+ tagTheme: import("vue-types").VueTypeDef<string> & {
59
+ default: string;
60
+ };
61
+ behavior: import("vue-types").VueTypeDef<string> & {
62
+ default: string;
63
+ };
64
+ collapseTags: import("vue-types").VueTypeValidableDef<boolean> & {
65
+ default: boolean;
66
+ } & {
67
+ default: boolean;
68
+ };
69
+ noDataText: import("vue-types").VueTypeValidableDef<string> & {
70
+ default: string;
71
+ } & {
72
+ default: string;
73
+ };
74
+ noMatchText: import("vue-types").VueTypeValidableDef<string> & {
75
+ default: string;
76
+ } & {
77
+ default: string;
78
+ };
79
+ loadingText: import("vue-types").VueTypeValidableDef<string> & {
80
+ default: string;
81
+ } & {
82
+ default: string;
83
+ };
84
+ placeholder: import("vue-types").VueTypeValidableDef<string> & {
85
+ default: string;
86
+ } & {
87
+ default: string;
88
+ };
89
+ selectAllText: import("vue-types").VueTypeValidableDef<string> & {
90
+ default: string;
91
+ } & {
92
+ default: string;
93
+ };
45
94
  }, {
46
- selectedLabel: import("vue").ComputedRef<string>;
47
- selectClass: import("vue").ComputedRef<{
48
- [x: string]: boolean;
49
- 'bk-select': boolean;
50
- 'popover-show': boolean;
51
- 'is-disabled': boolean;
52
- 'is-focus': boolean;
53
- }>;
54
- isPopoverShow: import("vue").Ref<boolean>;
55
- isHover: import("vue").Ref<boolean>;
56
- popperWidth: import("vue").Ref<string | number>;
57
- selectTriggerRef: import("vue").Ref<HTMLElement>;
58
- inputRef: import("vue").Ref<HTMLElement>;
59
- searchKey: import("vue").Ref<string>;
60
- searchLoading: import("vue").Ref<boolean>;
61
- isEmpty: import("vue").ComputedRef<boolean>;
62
- isFocus: import("vue").Ref<boolean>;
63
- setHover: () => void;
64
- cancelHover: () => void;
65
- handleFocus: () => void;
66
- handleInput: (e: any) => void;
67
- toggleMenu: () => void;
68
- handleClear: (e: Event) => void;
69
- onPopoverFirstUpdate: OnFirstUpdateFnType;
70
- hidePopover: () => void;
71
- showPopover: () => void;
72
- currentPlaceholder: import("vue").Ref<string>;
73
95
  options: import("vue").Ref<Set<{
74
96
  $: import("vue").ComponentInternalInstance;
75
97
  $data: {};
@@ -146,6 +168,34 @@ declare const _default: import("vue").DefineComponent<{
146
168
  handleOptionClick: () => void;
147
169
  visible: import("vue").Ref<boolean>;
148
170
  }> & {} & {} & import("vue").ComponentCustomProperties>>;
171
+ isDisabled: import("vue").ComputedRef<boolean>;
172
+ selectedLabel: import("vue").ComputedRef<(string | number)[]>;
173
+ isPopoverShow: import("vue").Ref<boolean>;
174
+ isHover: import("vue").Ref<boolean>;
175
+ popperWidth: import("vue").Ref<string | number>;
176
+ popoverRef: import("vue").Ref<any>;
177
+ inputRef: import("vue").Ref<HTMLElement>;
178
+ searchLoading: import("vue").Ref<boolean>;
179
+ isOptionsEmpty: import("vue").ComputedRef<boolean>;
180
+ isSearchEmpty: import("vue").ComputedRef<boolean>;
181
+ isFocus: import("vue").Ref<boolean>;
182
+ isShowSelectContent: import("vue").ComputedRef<boolean>;
183
+ curContentText: import("vue").ComputedRef<string>;
184
+ isGroup: import("vue").ComputedRef<boolean>;
185
+ searchKey: import("vue").Ref<string>;
186
+ setHover: () => void;
187
+ cancelHover: () => void;
188
+ handleFocus: () => void;
189
+ handleInput: (e: any) => void;
190
+ handleTogglePopover: () => void;
191
+ handleClear: (e: Event) => void;
192
+ onPopoverFirstUpdate: import("@bkui-vue/shared").OnFirstUpdateFnType;
193
+ hidePopover: () => void;
194
+ showPopover: () => void;
195
+ handleToggleAll: () => void;
196
+ handleOptionSelected: (option: OptionInstanceType) => void;
197
+ handleClickOutside: () => void;
198
+ currentPlaceholder: import("vue").Ref<string>;
149
199
  selectedOptions: import("vue").Ref<Set<{
150
200
  $: import("vue").ComponentInternalInstance;
151
201
  $data: {};
@@ -223,18 +273,13 @@ declare const _default: import("vue").DefineComponent<{
223
273
  visible: import("vue").Ref<boolean>;
224
274
  }> & {} & {} & import("vue").ComponentCustomProperties>>;
225
275
  currentSelectedLabel: import("vue").Ref<string>;
226
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "toggle" | "update:modelValue")[], "change" | "toggle" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
276
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "toggle" | "clear" | "update:modelValue")[], "change" | "toggle" | "clear" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
227
277
  modelValue: import("vue-types").VueTypeValidableDef<any>;
228
278
  multiple: import("vue-types").VueTypeValidableDef<boolean> & {
229
279
  default: boolean;
230
280
  } & {
231
281
  default: boolean;
232
282
  };
233
- placeholder: import("vue-types").VueTypeValidableDef<string> & {
234
- default: string;
235
- } & {
236
- default: string;
237
- };
238
283
  disabled: import("vue-types").VueTypeValidableDef<boolean> & {
239
284
  default: boolean;
240
285
  } & {
@@ -266,9 +311,64 @@ declare const _default: import("vue").DefineComponent<{
266
311
  } & {
267
312
  default: number;
268
313
  };
314
+ showSelectAll: import("vue-types").VueTypeValidableDef<boolean> & {
315
+ default: boolean;
316
+ } & {
317
+ default: boolean;
318
+ };
319
+ popoverMinWidth: import("vue-types").VueTypeValidableDef<number> & {
320
+ default: number;
321
+ } & {
322
+ default: number;
323
+ };
324
+ showOnInit: import("vue-types").VueTypeValidableDef<boolean> & {
325
+ default: boolean;
326
+ } & {
327
+ default: boolean;
328
+ };
329
+ multipleMode: import("vue-types").VueTypeDef<string> & {
330
+ default: string;
331
+ };
332
+ tagTheme: import("vue-types").VueTypeDef<string> & {
333
+ default: string;
334
+ };
335
+ behavior: import("vue-types").VueTypeDef<string> & {
336
+ default: string;
337
+ };
338
+ collapseTags: import("vue-types").VueTypeValidableDef<boolean> & {
339
+ default: boolean;
340
+ } & {
341
+ default: boolean;
342
+ };
343
+ noDataText: import("vue-types").VueTypeValidableDef<string> & {
344
+ default: string;
345
+ } & {
346
+ default: string;
347
+ };
348
+ noMatchText: import("vue-types").VueTypeValidableDef<string> & {
349
+ default: string;
350
+ } & {
351
+ default: string;
352
+ };
353
+ loadingText: import("vue-types").VueTypeValidableDef<string> & {
354
+ default: string;
355
+ } & {
356
+ default: string;
357
+ };
358
+ placeholder: import("vue-types").VueTypeValidableDef<string> & {
359
+ default: string;
360
+ } & {
361
+ default: string;
362
+ };
363
+ selectAllText: import("vue-types").VueTypeValidableDef<string> & {
364
+ default: string;
365
+ } & {
366
+ default: string;
367
+ };
269
368
  }>> & {
270
369
  onChange?: (...args: any[]) => any;
271
370
  "onUpdate:modelValue"?: (...args: any[]) => any;
371
+ onClear?: (...args: any[]) => any;
272
372
  onToggle?: (...args: any[]) => any;
273
373
  }, {
274
374
  placeholder: string;
@@ -276,9 +376,20 @@ declare const _default: import("vue").DefineComponent<{
276
376
  multiple: boolean;
277
377
  disabled: boolean;
278
378
  loading: boolean;
379
+ showOnInit: boolean;
279
380
  clearable: boolean;
381
+ behavior: string;
382
+ popoverMinWidth: number;
280
383
  filterable: boolean;
281
384
  remoteMethod: (...args: any[]) => any;
282
385
  scrollHeight: number;
386
+ showSelectAll: boolean;
387
+ multipleMode: string;
388
+ tagTheme: string;
389
+ collapseTags: boolean;
390
+ noDataText: string;
391
+ noMatchText: string;
392
+ loadingText: string;
393
+ selectAllText: string;
283
394
  }>;
284
395
  export default _default;
@@ -1,19 +1,7 @@
1
1
  @import '../styles/themes/themes.less';
2
+ @import '../styles/mixins/animate.less';
2
3
 
3
4
  .@{bk-prefix}-select {
4
- display: inline-block;
5
-
6
- ul {
7
- padding: 0;
8
- margin: 0;
9
- font-weight: normal;
10
- list-style: none;
11
- }
12
-
13
- .bk-popover-content {
14
- padding: 0;
15
- }
16
-
17
5
  .bk-select-icon(@fontSize: 20px, @color: #979ba5) {
18
6
  display: flex;
19
7
  align-items: center;
@@ -24,16 +12,13 @@
24
12
  color: @color;
25
13
  }
26
14
 
27
- .input-right-icon() {
15
+ .fix-icon() {
28
16
  position: absolute;
29
- top: 6px;
30
- right: 4px;
31
- }
32
-
33
- .input-left-icon() {
34
- position: absolute;
35
- top: 6px;
36
- left: 4px;
17
+ top: 0;
18
+ display: inline-flex;
19
+ height: 100%;
20
+ align-items: center;
21
+ justify-content: center;
37
22
  }
38
23
 
39
24
  .ellipsis() {
@@ -42,13 +27,97 @@
42
27
  white-space: nowrap;
43
28
  }
44
29
 
45
- &.is-focus {
30
+ .mr(@marginRight) {
31
+ margin-right: @marginRight;
32
+ }
33
+
34
+ .ml(@marginLeft) {
35
+ margin-left: @marginLeft;
36
+ }
37
+
38
+ .mr5 {
39
+ .mr(5px)
40
+ }
41
+
42
+ .ml5 {
43
+ .ml(5px)
44
+ }
45
+
46
+ .input {
47
+ width: 100%;
48
+ height: 32px;
49
+ padding: 0 28px 0 10px;
50
+ line-height: normal;
51
+ color: @default-color;
52
+ text-align: left;
53
+ vertical-align: middle;
54
+ cursor: pointer;
55
+ background-color: @white-color;
56
+ border: 1px solid @light-gray;
57
+ border-radius: 2px;
58
+ outline: none;
59
+ box-sizing: border-box;
60
+ transition: all .1s;
61
+ resize: none;
62
+ .ellipsis();
63
+
64
+ &::placeholder {
65
+ color: @light-gray;
66
+ }
67
+ }
68
+
69
+ ul {
70
+ padding: 0;
71
+ margin: 0;
72
+ font-weight: normal;
73
+ list-style: none;
74
+ }
75
+
76
+ .bk-popover-reference {
77
+ display: unset;
78
+ }
79
+
80
+ .bk-popover-content {
81
+ padding: 0;
82
+ }
83
+
84
+ &.small {
85
+ .bk-select-trigger .bk-select-input {
86
+ height: 24px;
87
+ }
88
+ }
89
+
90
+ &.large {
91
+ .bk-select-trigger .bk-select-input {
92
+ height: 36px;
93
+ font-size: 14px;
94
+ }
95
+
96
+ .bk-select-content {
97
+ font-size: 14px;
98
+ }
99
+ }
100
+
101
+ &.simplicity {
102
+ .bk-select-trigger .bk-select-input {
103
+ border: none;
104
+ border-bottom: 1px solid @light-gray;
105
+ }
106
+ }
107
+
108
+ &.is-focus.normal {
46
109
  .bk-select-trigger .bk-select-input {
47
110
  border-color: @primary-color;
48
111
  box-shadow: 0px 0px 3px 0px #a3c5fd;
49
112
  }
50
113
  }
51
114
 
115
+ &.is-focus.simplicity {
116
+ .bk-select-trigger .bk-select-input {
117
+ border-color: @primary-color;
118
+ }
119
+ }
120
+
52
121
  &.is-disabled {
53
122
  .bk-select-trigger .bk-select-input {
54
123
  cursor: not-allowed;
@@ -58,6 +127,15 @@
58
127
  }
59
128
  }
60
129
 
130
+ &.is-filterable {
131
+ .bk-select-trigger {
132
+ .bk-select-input,
133
+ .bk-select-tag-input {
134
+ cursor: text;
135
+ }
136
+ }
137
+ }
138
+
61
139
  &.popover-show {
62
140
  .bk-select-trigger .angle-up {
63
141
  transform: rotate(0);
@@ -69,44 +147,47 @@
69
147
  cursor: pointer;
70
148
 
71
149
  .bk-select-input {
72
- width: 100%;
73
- height: 32px;
74
- padding: 0 28px 0 10px;
75
- font-size: 12px;
76
- line-height: normal;
77
- color: @default-color;
78
- text-align: left;
79
- vertical-align: middle;
80
- cursor: pointer;
81
- background-color: @white-color;
82
- border: 1px solid @light-gray;
83
- border-radius: 2px;
84
- outline: none;
85
- box-sizing: border-box;
86
- transition: all .1s;
87
- resize: none;
88
-
89
- &::placeholder {
90
- color: @light-gray;
150
+ .input()
151
+ }
152
+
153
+ .bk-select-tag {
154
+ .input();
155
+ display: flex;
156
+ width: auto;
157
+ height: auto;
158
+ min-height: 32px;
159
+ align-items: center;
160
+ flex-wrap: wrap;
161
+
162
+ &-input {
163
+ .input();
164
+ width: auto;
165
+ height: auto;
166
+ padding: 0;
167
+ border: none;
168
+ outline: none;
91
169
  }
92
170
  }
93
171
 
94
172
  .bk-select-prefix {
95
- .input-left-icon();
173
+ .fix-icon();
174
+ left: 4px;
96
175
  font-size: 14px;
97
176
  }
98
177
 
99
178
  .angle-up {
179
+ right: 4px;
100
180
  transform: rotate(180deg);
101
181
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
102
182
  .bk-select-icon();
103
- .input-right-icon();
183
+ .fix-icon();
104
184
  }
105
185
 
106
186
  .clear-icon {
187
+ right: 4px;
107
188
  transition: all .1s;
108
189
  .bk-select-icon(14px, #c4c6cc);
109
- .input-right-icon();
190
+ .fix-icon();
110
191
 
111
192
  &:hover {
112
193
  color: #979ba5;
@@ -114,8 +195,9 @@
114
195
  }
115
196
 
116
197
  .spinner {
117
- .input-right-icon();
118
- .bk-select-icon(16px, #3A84FF);
198
+ position: absolute;
199
+ top: 8px;
200
+ right: 6px;
119
201
  }
120
202
  }
121
203
 
@@ -140,32 +222,6 @@
140
222
 
141
223
  .bk-select-dropdown {
142
224
  overflow: auto;
143
-
144
- .bk-select-search {
145
- position: relative;
146
- padding: 0 5px;
147
-
148
- &-icon {
149
- position: absolute;
150
- top: 50%;
151
- left: 8px;
152
- font-size: 16px;
153
- color: #979ba5;
154
- transform: translateY(-50%);
155
- transform: translateY(-50%);
156
- }
157
-
158
- &-input {
159
- width: 100%;
160
- height: 32px;
161
- padding: 0 10px 0 26px;
162
- font-size: 12px;
163
- cursor: text;
164
- border: none;
165
- border-bottom: 1px solid #dcdee5;
166
- outline: 0;
167
- }
168
- }
169
225
  }
170
226
 
171
227
  .bk-select-extension {
@@ -202,7 +258,6 @@
202
258
  &.is-multiple::after {
203
259
  position: absolute;
204
260
  right: 12px;
205
- font-size: 12px;
206
261
  font-weight: 700;
207
262
  content: '\2713';
208
263
  }
@@ -235,6 +290,13 @@
235
290
  }
236
291
  }
237
292
 
293
+ &.disabled {
294
+ .default-group-label {
295
+ color: #c4c6cc;
296
+ cursor: not-allowed;
297
+ }
298
+ }
299
+
238
300
  .default-group-label {
239
301
  display: flex;
240
302
  user-select: none;
@@ -245,7 +307,6 @@
245
307
  width: 12px;
246
308
  height: 12px;
247
309
  margin-right: 8px;
248
- font-size: 12px;
249
310
  transition: all .1s;
250
311
  align-items: center;
251
312
  justify-content: center;