bkui-vue 0.0.1-beta.26 → 0.0.1-beta.29

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.
@@ -0,0 +1,374 @@
1
+ import { Ref } from 'vue';
2
+ declare const _default: import("vue").DefineComponent<{
3
+ modelValue: import("vue-types").VueTypeDef<string[]> & {
4
+ default: () => string[];
5
+ };
6
+ placeholder: import("vue-types").VueTypeValidableDef<string> & {
7
+ default: string;
8
+ } & {
9
+ default: string;
10
+ };
11
+ list: import("vue-types").VueTypeDef<{
12
+ [key: string]: any;
13
+ }[]> & {
14
+ default: () => {
15
+ [key: string]: any;
16
+ }[];
17
+ };
18
+ disabled: import("vue-types").VueTypeValidableDef<boolean> & {
19
+ default: boolean;
20
+ } & {
21
+ default: boolean;
22
+ };
23
+ tooltipKey: import("vue-types").VueTypeValidableDef<string> & {
24
+ default: string;
25
+ } & {
26
+ default: string;
27
+ };
28
+ saveKey: import("vue-types").VueTypeValidableDef<string> & {
29
+ default: string;
30
+ } & {
31
+ default: string;
32
+ };
33
+ displayKey: import("vue-types").VueTypeValidableDef<string> & {
34
+ default: string;
35
+ } & {
36
+ default: string;
37
+ };
38
+ hasDeleteIcon: import("vue-types").VueTypeValidableDef<boolean> & {
39
+ default: boolean;
40
+ } & {
41
+ default: boolean;
42
+ };
43
+ clearable: import("vue-types").VueTypeValidableDef<boolean> & {
44
+ default: boolean;
45
+ } & {
46
+ default: boolean;
47
+ };
48
+ trigger: import("vue-types").VueTypeDef<string> & {
49
+ default: string;
50
+ };
51
+ searchKey: import("vue-types").VueTypeDef<string | string[]> & {
52
+ default: string | (() => string[]);
53
+ };
54
+ useGroup: import("vue-types").VueTypeValidableDef<boolean> & {
55
+ default: boolean;
56
+ } & {
57
+ default: boolean;
58
+ };
59
+ allowCreate: import("vue-types").VueTypeValidableDef<boolean> & {
60
+ default: boolean;
61
+ } & {
62
+ default: boolean;
63
+ };
64
+ maxData: import("vue-types").VueTypeValidableDef<number> & {
65
+ default: number;
66
+ } & {
67
+ default: number;
68
+ };
69
+ maxResult: import("vue-types").VueTypeValidableDef<number> & {
70
+ default: number;
71
+ } & {
72
+ default: number;
73
+ };
74
+ contentMaxHeight: import("vue-types").VueTypeValidableDef<number> & {
75
+ default: number;
76
+ } & {
77
+ default: number;
78
+ };
79
+ contentWidth: import("vue-types").VueTypeValidableDef<number> & {
80
+ default: number;
81
+ } & {
82
+ default: number;
83
+ };
84
+ separator: import("vue-types").VueTypeValidableDef<string> & {
85
+ default: string;
86
+ } & {
87
+ default: string;
88
+ };
89
+ allowNextFocus: import("vue-types").VueTypeValidableDef<boolean> & {
90
+ default: boolean;
91
+ } & {
92
+ default: boolean;
93
+ };
94
+ allowAutoMatch: import("vue-types").VueTypeValidableDef<boolean> & {
95
+ default: boolean;
96
+ } & {
97
+ default: boolean;
98
+ };
99
+ showClearOnlyHover: import("vue-types").VueTypeValidableDef<boolean> & {
100
+ default: boolean;
101
+ } & {
102
+ default: boolean;
103
+ };
104
+ leftSpace: import("vue-types").VueTypeValidableDef<number> & {
105
+ default: number;
106
+ } & {
107
+ default: number;
108
+ };
109
+ createTagValidator: {
110
+ type: import("vue").PropType<(tag: any) => boolean>;
111
+ default: any;
112
+ };
113
+ filterCallback: {
114
+ type: import("vue").PropType<(value: string, searchKey: string | string[], list: any[]) => any[]>;
115
+ default: any;
116
+ };
117
+ tagTpl: {
118
+ type: import("vue").PropType<(node: any, highlightKeyword: Function, h: Function, ctx: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
119
+ [key: string]: any;
120
+ }>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
121
+ [key: string]: any;
122
+ }>>;
123
+ default: any;
124
+ };
125
+ tpl: {
126
+ type: import("vue").PropType<(node: any, h: Function, ctx: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
127
+ [key: string]: any;
128
+ }>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
129
+ [key: string]: any;
130
+ }>>;
131
+ default: any;
132
+ };
133
+ pasteFn: {
134
+ type: import("vue").PropType<(value: string) => any[]>;
135
+ default: any;
136
+ };
137
+ }, {
138
+ isShowPlaceholder: import("vue").ComputedRef<boolean>;
139
+ isShowClear: import("vue").ComputedRef<boolean>;
140
+ curInputValue: Ref<string>;
141
+ formatList: any[];
142
+ renderList: import("vue").ComputedRef<any[]>;
143
+ showTagClose: import("vue").ComputedRef<boolean>;
144
+ tagInputRef: any;
145
+ bkTagSelectorRef: any;
146
+ tagListRef: any;
147
+ tagInputItemRef: any;
148
+ selectorListRef: any;
149
+ popoverRef: any;
150
+ triggerClass: import("vue").ComputedRef<{
151
+ 'bk-tag-input-trigger': boolean;
152
+ active: boolean;
153
+ disabled: boolean;
154
+ }>;
155
+ focusInputTrigger: (e?: MouseEvent) => void;
156
+ activeClass: (data: any, index: number) => {
157
+ 'bk-selector-actived': boolean;
158
+ 'bk-selector-selected': boolean;
159
+ };
160
+ handleInput: (e?: Event) => void;
161
+ handleFocus: () => void;
162
+ handleBlur: () => void;
163
+ handleTagSelected: (item: any, type: string, e?: Event) => void;
164
+ handleTagRemove: (data: any, index: number, e?: MouseEvent) => void;
165
+ handleClear: (e: MouseEvent) => void;
166
+ tagFocus: (e: MouseEvent) => void;
167
+ handleKeydown: (e: KeyboardEvent) => void;
168
+ handlePaste: (e: ClipboardEvent) => boolean;
169
+ curPage: Ref<number>;
170
+ totalSize: Ref<number>;
171
+ totalPage: Ref<number>;
172
+ pageSize: Ref<number>;
173
+ isPageLoading: Ref<boolean>;
174
+ curPageList: Ref<any[]>;
175
+ renderListPaged: Ref<any[]>;
176
+ localList: Ref<any[]>;
177
+ tagListCache: Ref<any[]>;
178
+ selectedTagList: Ref<any[]>;
179
+ selectedTagListCache: Ref<any[]>;
180
+ isEdit: Ref<boolean>;
181
+ isHover: Ref<boolean>;
182
+ focusItemIndex: Ref<number>;
183
+ popoverProps: {
184
+ isShow: boolean;
185
+ width: number;
186
+ modifiers: {
187
+ name: string;
188
+ options: {
189
+ offset: number[];
190
+ };
191
+ }[];
192
+ };
193
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "blur" | "change" | "update:modelValue" | "remove" | "removeAll")[], "select" | "blur" | "change" | "update:modelValue" | "remove" | "removeAll", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
194
+ modelValue: import("vue-types").VueTypeDef<string[]> & {
195
+ default: () => string[];
196
+ };
197
+ placeholder: import("vue-types").VueTypeValidableDef<string> & {
198
+ default: string;
199
+ } & {
200
+ default: string;
201
+ };
202
+ list: import("vue-types").VueTypeDef<{
203
+ [key: string]: any;
204
+ }[]> & {
205
+ default: () => {
206
+ [key: string]: any;
207
+ }[];
208
+ };
209
+ disabled: import("vue-types").VueTypeValidableDef<boolean> & {
210
+ default: boolean;
211
+ } & {
212
+ default: boolean;
213
+ };
214
+ tooltipKey: import("vue-types").VueTypeValidableDef<string> & {
215
+ default: string;
216
+ } & {
217
+ default: string;
218
+ };
219
+ saveKey: import("vue-types").VueTypeValidableDef<string> & {
220
+ default: string;
221
+ } & {
222
+ default: string;
223
+ };
224
+ displayKey: import("vue-types").VueTypeValidableDef<string> & {
225
+ default: string;
226
+ } & {
227
+ default: string;
228
+ };
229
+ hasDeleteIcon: import("vue-types").VueTypeValidableDef<boolean> & {
230
+ default: boolean;
231
+ } & {
232
+ default: boolean;
233
+ };
234
+ clearable: import("vue-types").VueTypeValidableDef<boolean> & {
235
+ default: boolean;
236
+ } & {
237
+ default: boolean;
238
+ };
239
+ trigger: import("vue-types").VueTypeDef<string> & {
240
+ default: string;
241
+ };
242
+ searchKey: import("vue-types").VueTypeDef<string | string[]> & {
243
+ default: string | (() => string[]);
244
+ };
245
+ useGroup: import("vue-types").VueTypeValidableDef<boolean> & {
246
+ default: boolean;
247
+ } & {
248
+ default: boolean;
249
+ };
250
+ allowCreate: import("vue-types").VueTypeValidableDef<boolean> & {
251
+ default: boolean;
252
+ } & {
253
+ default: boolean;
254
+ };
255
+ maxData: import("vue-types").VueTypeValidableDef<number> & {
256
+ default: number;
257
+ } & {
258
+ default: number;
259
+ };
260
+ maxResult: import("vue-types").VueTypeValidableDef<number> & {
261
+ default: number;
262
+ } & {
263
+ default: number;
264
+ };
265
+ contentMaxHeight: import("vue-types").VueTypeValidableDef<number> & {
266
+ default: number;
267
+ } & {
268
+ default: number;
269
+ };
270
+ contentWidth: import("vue-types").VueTypeValidableDef<number> & {
271
+ default: number;
272
+ } & {
273
+ default: number;
274
+ };
275
+ separator: import("vue-types").VueTypeValidableDef<string> & {
276
+ default: string;
277
+ } & {
278
+ default: string;
279
+ };
280
+ allowNextFocus: import("vue-types").VueTypeValidableDef<boolean> & {
281
+ default: boolean;
282
+ } & {
283
+ default: boolean;
284
+ };
285
+ allowAutoMatch: import("vue-types").VueTypeValidableDef<boolean> & {
286
+ default: boolean;
287
+ } & {
288
+ default: boolean;
289
+ };
290
+ showClearOnlyHover: import("vue-types").VueTypeValidableDef<boolean> & {
291
+ default: boolean;
292
+ } & {
293
+ default: boolean;
294
+ };
295
+ leftSpace: import("vue-types").VueTypeValidableDef<number> & {
296
+ default: number;
297
+ } & {
298
+ default: number;
299
+ };
300
+ createTagValidator: {
301
+ type: import("vue").PropType<(tag: any) => boolean>;
302
+ default: any;
303
+ };
304
+ filterCallback: {
305
+ type: import("vue").PropType<(value: string, searchKey: string | string[], list: any[]) => any[]>;
306
+ default: any;
307
+ };
308
+ tagTpl: {
309
+ type: import("vue").PropType<(node: any, highlightKeyword: Function, h: Function, ctx: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
310
+ [key: string]: any;
311
+ }>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
312
+ [key: string]: any;
313
+ }>>;
314
+ default: any;
315
+ };
316
+ tpl: {
317
+ type: import("vue").PropType<(node: any, h: Function, ctx: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
318
+ [key: string]: any;
319
+ }>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
320
+ [key: string]: any;
321
+ }>>;
322
+ default: any;
323
+ };
324
+ pasteFn: {
325
+ type: import("vue").PropType<(value: string) => any[]>;
326
+ default: any;
327
+ };
328
+ }>> & {
329
+ onBlur?: (...args: any[]) => any;
330
+ onChange?: (...args: any[]) => any;
331
+ onSelect?: (...args: any[]) => any;
332
+ "onUpdate:modelValue"?: (...args: any[]) => any;
333
+ onRemove?: (...args: any[]) => any;
334
+ onRemoveAll?: (...args: any[]) => any;
335
+ }, {
336
+ placeholder: string;
337
+ list: {
338
+ [key: string]: any;
339
+ }[];
340
+ separator: string;
341
+ disabled: boolean;
342
+ modelValue: string[];
343
+ trigger: string;
344
+ clearable: boolean;
345
+ showClearOnlyHover: boolean;
346
+ searchKey: string | string[];
347
+ displayKey: string;
348
+ tooltipKey: string;
349
+ saveKey: string;
350
+ hasDeleteIcon: boolean;
351
+ useGroup: boolean;
352
+ allowCreate: boolean;
353
+ maxData: number;
354
+ maxResult: number;
355
+ contentMaxHeight: number;
356
+ contentWidth: number;
357
+ allowNextFocus: boolean;
358
+ allowAutoMatch: boolean;
359
+ leftSpace: number;
360
+ createTagValidator: (tag: any) => boolean;
361
+ filterCallback: (value: string, searchKey: string | string[], list: any[]) => any[];
362
+ tagTpl: (node: any, highlightKeyword: Function, h: Function, ctx: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
363
+ [key: string]: any;
364
+ }>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
365
+ [key: string]: any;
366
+ }>;
367
+ tpl: (node: any, h: Function, ctx: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
368
+ [key: string]: any;
369
+ }>) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
370
+ [key: string]: any;
371
+ }>;
372
+ pasteFn: (value: string) => any[];
373
+ }>;
374
+ export default _default;
@@ -0,0 +1,250 @@
1
+ @import '../styles/themes/themes.less';
2
+
3
+ @min-height: 32px;
4
+ @tag-input-disabled-bg-color: #fafbfd;
5
+
6
+ .@{bk-prefix}-tag-input {
7
+ position: relative;
8
+ min-height: @min-height;
9
+
10
+ .bk-popover-reference {
11
+ display: block;
12
+ }
13
+
14
+ .bk-tag-input-trigger {
15
+ position: relative;
16
+ display: flex;
17
+ min-height: @min-height;
18
+ padding: 0 0 0 5px;
19
+ overflow: hidden;
20
+ font-size: 12px;
21
+ cursor: pointer;
22
+ background: @white-color;
23
+ border: 1px solid @light-gray;
24
+ border-radius: 2px;
25
+ align-items: center;
26
+ justify-content: space-between;
27
+
28
+ &.active {
29
+ border-color: @primary-color;
30
+ }
31
+
32
+ &.disabled {
33
+ cursor: not-allowed;
34
+ background: @tag-input-disabled-bg-color;
35
+ border-color: @disable-color;
36
+ }
37
+
38
+ .tag-list {
39
+ display: inline-flex;
40
+ max-height: 135px;
41
+ padding: 0;
42
+ margin: 0;
43
+ overflow: auto;
44
+ align-items: center;
45
+ flex-wrap: wrap;
46
+
47
+ > li {
48
+ display: inline-flex;
49
+ height: 22px;
50
+ margin: 4px 5px 4px 0;
51
+ overflow: hidden;
52
+ font-size: 12px;
53
+ border: solid 1px transparent;
54
+ border-radius: 2px;
55
+ align-items: center;
56
+
57
+ &.tag-item {
58
+ background: #f0f1f5;
59
+ border-color: #f0f1f5;
60
+ }
61
+ }
62
+
63
+ .remove-tag {
64
+ flex-shrink: 0;
65
+ margin-right: 5px;
66
+ font-size: 14px;
67
+ line-height: 0;
68
+ }
69
+
70
+ .tag {
71
+ max-width: 190px;
72
+ overflow: hidden;
73
+ text-overflow: ellipsis;
74
+ word-break: break-all;
75
+ white-space: nowrap;
76
+ flex: 1;
77
+ }
78
+
79
+ .text {
80
+ padding: 0 5px;
81
+ line-height: 20px;
82
+ color: @default-color;
83
+ background-color: #f0f1f5;
84
+ border-radius: 2px;
85
+ box-sizing: border-box;
86
+ }
87
+
88
+ .tag-input {
89
+ width: 10px;
90
+ height: 22px;
91
+ max-width: 295px;
92
+ padding: 0;
93
+ border: 0;
94
+ outline: none;
95
+ box-sizing: border-box;
96
+ }
97
+ }
98
+
99
+ .placeholder {
100
+ position: absolute;
101
+ top: 0;
102
+ left: 8px;
103
+ padding: 0;
104
+ margin: 0;
105
+ line-height: 30px;
106
+ color: @light-gray;
107
+ }
108
+
109
+ .clear-icon {
110
+ margin-right: 5px;
111
+ font-size: 14px;
112
+ line-height: 0;
113
+ color: @light-gray;
114
+ cursor: pointer;
115
+
116
+ &:hover {
117
+ color: @gray-color;
118
+ }
119
+ }
120
+ }
121
+
122
+ .bk-popover-content {
123
+ padding: 0;
124
+ }
125
+ }
126
+
127
+ .bk-selector-list {
128
+ min-width: 150px;
129
+
130
+ .outside-ul {
131
+ max-height: 160px;
132
+ padding: 0;
133
+ padding: 6px 0;
134
+ margin: 0;
135
+ overflow-y: auto;
136
+ list-style: none;
137
+ background-color: @white-color;
138
+ border: 1px solid #dcdee5;
139
+ border-radius: 2px;
140
+
141
+ &::-webkit-scrollbar {
142
+ width: 6px;
143
+ height: 6px;
144
+ }
145
+
146
+ &::-webkit-scrollbar-thumb {
147
+ min-height: 24px;
148
+ background-color: #dcdee5;
149
+ border-radius: 3px;
150
+ }
151
+ }
152
+
153
+ .bk-selector-group-item {
154
+ list-style: none;
155
+
156
+ .group-name {
157
+ padding-left: 11px;
158
+ font-size: 12px;
159
+ line-height: 32px;
160
+ color: #979ba5;
161
+ }
162
+ }
163
+
164
+ .bk-selector-group-list-item {
165
+ padding: 0;
166
+ margin: 0;
167
+ list-style: none;
168
+ }
169
+
170
+ .bk-selector-list-item {
171
+ position: relative;
172
+ width: 100%;
173
+ cursor: pointer;
174
+ background-color: @white-color;
175
+ border-right: @light-gray;
176
+ border-left: @light-gray;
177
+
178
+ &:first-child {
179
+ border-top: @light-gray;
180
+ }
181
+
182
+ &:last-child {
183
+ border-bottom: @light-gray;
184
+ }
185
+
186
+ &.bk-selector-selected {
187
+ background-color: #f4f6fa;
188
+
189
+ .selected-icon {
190
+ display: inline-block;
191
+ }
192
+ }
193
+
194
+ &.bk-selector-actived {
195
+ background-color: #f4f6fa;
196
+ }
197
+
198
+ &:hover {
199
+ background-color: #eaf3ff;
200
+ }
201
+
202
+ &.disabled {
203
+ cursor: not-allowed;
204
+ background: @white-color;
205
+
206
+ .text {
207
+ color: @light-gray;
208
+ }
209
+ }
210
+
211
+ &.loading {
212
+ padding: 5px 0 3px;
213
+ text-align: center;
214
+ }
215
+
216
+ .loading {
217
+ position: relative;
218
+ width: 100%;
219
+ height: 40px;
220
+ font-size: 14px;
221
+ cursor: default;
222
+ }
223
+
224
+ .text {
225
+ padding: 0 10px;
226
+ overflow: hidden;
227
+ font-size: 12px;
228
+ line-height: 32px;
229
+ color: @default-color;
230
+ text-overflow: ellipsis;
231
+ white-space: nowrap;
232
+ }
233
+
234
+ .bk-selector-tools {
235
+ position: absolute;
236
+ top: 10px;
237
+ right: 0;
238
+ display: none;
239
+ font-size: 12px;
240
+
241
+ .bk-selector-list-icon {
242
+ margin-right: 14px;
243
+ }
244
+ }
245
+
246
+ .highlight-text {
247
+ color: @primary-color;
248
+ }
249
+ }
250
+ }