@blueking/bk-user-selector 0.0.1-beta.2 → 0.0.2-9.beta.1

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/vue3/vue3.css CHANGED
@@ -1,219 +1,162 @@
1
-
2
- .user-selector[data-v-5e8a952d] {
3
- width: 100%;
4
- }
5
- .form-item[data-v-5e8a952d] {
6
- display: flex;
1
+ .me-tag[data-v-9ccd9029] {
2
+ position: absolute;
3
+ top: 50%;
4
+ right: 8px;
5
+ z-index: 1;
6
+ display: inline-flex;
7
7
  align-items: center;
8
- margin-bottom: 15px;
9
- }
10
- .form-label[data-v-5e8a952d] {
11
- width: 80px;
12
- text-align: right;
13
- padding-right: 10px;
14
- font-size: 14px;
15
- color: #63656e;
8
+ justify-content: center;
9
+ width: 24px;
10
+ height: 24px;
11
+ padding: 0 8px;
12
+ font-size: 12px;
13
+ color: #4d4f56;
14
+ cursor: pointer;
15
+ background-color: #e1ecff;
16
+ border-radius: 50%;
17
+ transform: translateY(-50%);
16
18
  }
17
- .form-required[data-v-5e8a952d] {
18
- color: #ea3636;
19
- margin-right: 4px;
19
+ .me-tag[data-v-9ccd9029]:hover {
20
+ color: #3a84ff;
21
+ background-color: #cddffe;
20
22
  }
21
- .form-content[data-v-5e8a952d] {
22
- flex: 1;
23
- position: relative;
23
+ .me-tag.disabled[data-v-9ccd9029] {
24
+ color: #c4c6cc;
25
+ cursor: not-allowed;
26
+ background-color: #f0f1f5;
27
+ }.dropdown-content[data-v-a4132257] {
28
+ min-height: 40px;
29
+ max-height: 300px;
30
+ padding: 5px 0;
31
+ overflow-y: auto;
24
32
  }
25
- .tag-input-container[data-v-5e8a952d] {
26
- display: flex;
27
- flex-wrap: wrap;
28
- border: 1px solid #dcdee5;
29
- border-radius: 2px;
30
- min-height: 32px;
31
- align-items: center;
32
- padding: 2px 8px;
33
- gap: 4px;
33
+ .dropdown-content .no-data[data-v-a4132257] {
34
+ padding: 10px;
35
+ color: #979ba5;
36
+ text-align: center;
34
37
  }
35
- .tag-inline-container[data-v-5e8a952d] {
38
+ .dropdown-content .user-group .group-header[data-v-a4132257] {
36
39
  display: flex;
37
- flex-wrap: nowrap;
38
40
  align-items: center;
39
- gap: 4px;
40
- flex-grow: 1;
41
- min-height: 24px;
42
- }
43
- .is-focused[data-v-5e8a952d] {
44
- border-color: #3a84ff;
45
- }
46
- .tag-group[data-v-5e8a952d] {
47
- display: contents;
48
- /* 让draggable的内容直接成为父容器的子元素 */
41
+ padding: 8px 12px;
42
+ color: #979ba5;
49
43
  }
50
- .tag-item[data-v-5e8a952d] {
51
- flex-shrink: 0;
52
- height: 24px;
53
- line-height: 24px;
54
- margin: 0;
55
- cursor: pointer;
56
- display: inline-flex;
57
- align-items: center;
44
+ .dropdown-content .user-group .group-header .group-count[data-v-a4132257] {
45
+ margin-left: 4px;
58
46
  }
59
- .tag-content[data-v-5e8a952d] {
47
+ .dropdown-content .user-option[data-v-a4132257] {
60
48
  display: flex;
61
49
  align-items: center;
62
- height: 100%;
63
- }
64
-
65
- /* 输入框样式 */
66
- .tag-input[data-v-5e8a952d] {
67
- flex-grow: 0;
68
- width: 10px;
69
- min-width: 10px;
70
- max-width: 100%;
71
- border: none;
72
- outline: none;
73
50
  height: 32px;
74
- font-size: 14px;
75
- padding: 0 8px;
76
- background: transparent;
77
- cursor: text;
78
- transition: width 0.1s ease-in-out;
79
- }
80
- .tag-input[data-v-5e8a952d]::placeholder {
81
- color: #c4c6cc;
82
- font-size: 12px;
83
- }
84
- .full-width[data-v-5e8a952d] {
85
- flex-grow: 1;
86
- padding: 0 8px;
87
- /* 添加统一的内边距 */
88
- }
89
- .popover-content[data-v-5e8a952d] {
90
- min-height: 80px;
91
- max-height: 250px;
92
- overflow-y: auto;
93
- background-color: #fff;
94
- }
95
- .user-option[data-v-5e8a952d] {
96
- display: flex;
97
- align-items: center;
98
51
  padding: 8px 12px;
99
52
  cursor: pointer;
100
53
  }
101
- .user-option[data-v-5e8a952d]:hover {
54
+ .dropdown-content .user-option[data-v-a4132257]:hover {
102
55
  background-color: #f5f7fa;
56
+ }.bk-user-selector-popover.bk-user-selector-pop2-content {
57
+ padding: 0;
58
+ }.user-tag[data-v-51944a49] {
59
+ margin-right: 4px;
60
+ margin-left: 0;
103
61
  }
104
- .user-avatar[data-v-5e8a952d] {
105
- width: 24px;
106
- height: 24px;
107
- border-radius: 50%;
108
- margin-right: 8px;
62
+ .user-tag.draggable[data-v-51944a49] {
63
+ cursor: move;
109
64
  }
110
- .user-avatar-text[data-v-5e8a952d] {
111
- width: 24px;
112
- height: 24px;
113
- line-height: 24px;
114
- text-align: center;
115
- border-radius: 50%;
116
- background-color: #3a84ff;
117
- color: white;
118
- font-size: 12px;
119
- margin-right: 8px;
65
+ .user-tag.active[data-v-51944a49] {
66
+ background-color: #e1ecff;
67
+ border-color: #3a84ff;
120
68
  }
121
- .user-name[data-v-5e8a952d] {
69
+ .user-tag .tag-content .user-name[data-v-51944a49] {
70
+ overflow: hidden;
122
71
  font-size: 12px;
72
+ text-overflow: ellipsis;
73
+ white-space: nowrap;
74
+ }.multiple-selector[data-v-bebe517d] {
75
+ position: relative;
76
+ width: 100%;
123
77
  }
124
-
125
- /* 拖拽相关样式 */
126
- .draggable[data-v-5e8a952d] {
127
- cursor: move;
128
- padding-left: 4px;
129
- }
130
- .ghost-tag[data-v-5e8a952d] {
131
- opacity: 0.5;
132
- background: #c8ebfb;
78
+ .multiple-selector.is-disabled[data-v-bebe517d] {
79
+ pointer-events: none;
133
80
  }
134
- .chosen-tag[data-v-5e8a952d] {
135
- box-shadow: 0 0 2px 2px #3a84ff;
81
+ .multiple-selector .tags-container[data-v-bebe517d] {
82
+ min-height: 32px;
83
+ padding: 1px 10px 1px 8px;
84
+ background-color: #fff;
85
+ border: 1px solid #c4c6cc;
86
+ border-radius: 2px;
87
+ transition: all 0.2s ease;
136
88
  }
137
- .drag-tag[data-v-5e8a952d] {
138
- opacity: 0.8;
89
+ .multiple-selector .tags-container.focused[data-v-bebe517d] {
90
+ border-color: #3a84ff;
91
+ box-shadow: 0 0 0 2px rgba(58, 132, 255, 0.1);
139
92
  }
140
- .drag-handle[data-v-5e8a952d] {
141
- display: inline-flex;
93
+ .multiple-selector .tags-container.collapsed[data-v-bebe517d] {
94
+ display: flex;
95
+ flex-wrap: wrap;
142
96
  align-items: center;
143
- margin-right: 4px;
144
- opacity: 0.6;
145
- cursor: move;
146
- }
147
- .drag-handle svg[data-v-5e8a952d] {
148
- fill: currentColor;
149
97
  }
150
- .tag-wrapper[data-v-5e8a952d] {
98
+ .multiple-selector .tag-list[data-v-bebe517d] {
151
99
  display: flex;
100
+ flex-wrap: wrap;
152
101
  align-items: center;
153
- padding: 0;
154
- height: 24px;
155
102
  }
156
- .inline-input[data-v-5e8a952d] {
157
- margin-left: 4px;
103
+ .multiple-selector .tag-wrapper[data-v-bebe517d] {
104
+ display: inline-flex;
105
+ align-items: center;
106
+ max-width: 100%;
107
+ }
108
+ .multiple-selector .search-input[data-v-bebe517d] {
158
109
  min-width: 10px;
159
- padding: 0 2px;
110
+ height: 28px;
111
+ background: transparent;
112
+ border: none;
113
+ outline: none;
160
114
  }
161
-
162
- /* 测量元素样式 */
163
- .measure-text[data-v-5e8a952d] {
164
- position: absolute;
165
- visibility: hidden;
166
- height: 0;
167
- white-space: pre;
168
- font-size: 14px;
169
- font-family: inherit;
170
- padding: 0 2px;
171
- }
172
-
173
- /* 单选模式样式 */
174
- .is-single[data-v-5e8a952d] {
175
- cursor: pointer;
115
+ .multiple-selector .search-input[data-v-bebe517d]::placeholder {
116
+ color: #c4c6cc;
176
117
  }
177
- .single-select[data-v-5e8a952d] {
178
- display: flex;
179
- align-items: center;
180
- justify-content: space-between;
118
+ .multiple-selector .search-input.inline[data-v-bebe517d] {
119
+ min-width: 10px;
120
+ }
121
+ .multiple-selector .search-input.last[data-v-bebe517d], .multiple-selector .search-input.collapsed[data-v-bebe517d] {
122
+ flex: 1;
123
+ min-width: 60px;
124
+ }.single-selector[data-v-67f2ee6a] {
125
+ position: relative;
181
126
  width: 100%;
182
- height: 100%;
183
127
  }
184
- .single-value[data-v-5e8a952d] {
128
+ .single-selector.is-disabled[data-v-67f2ee6a] {
129
+ pointer-events: none;
130
+ }
131
+ .input-container[data-v-67f2ee6a] {
132
+ position: relative;
185
133
  display: flex;
186
134
  align-items: center;
135
+ min-height: 32px;
187
136
  padding: 0 8px;
188
- margin-right: 4px;
189
- height: 24px;
137
+ background-color: #fff;
138
+ border: 1px solid #c4c6cc;
139
+ border-radius: 2px;
190
140
  }
191
- .single-input[data-v-5e8a952d] {
141
+ .input-container[data-v-67f2ee6a]:focus-within {
142
+ border-color: #3a84ff;
143
+ box-shadow: 0 0 0 2px rgba(58, 132, 255, 0.1);
144
+ }
145
+ .search-input[data-v-67f2ee6a] {
192
146
  flex: 1;
193
- width: auto;
147
+ height: 30px;
148
+ background: transparent;
149
+ border: none;
150
+ outline: none;
194
151
  }
195
- .placeholder[data-v-5e8a952d] {
152
+ .search-input[data-v-67f2ee6a]::placeholder {
196
153
  color: #c4c6cc;
197
- }
198
- .dropdown-arrow[data-v-5e8a952d] {
199
- margin-left: 8px;
200
- font-size: 10px;
201
- color: #979ba5;
202
- }
203
- .clear-icon[data-v-5e8a952d] {
204
- margin-left: 8px;
205
- font-size: 14px;
206
- color: #979ba5;
207
- cursor: pointer;
208
- }
209
- .clear-icon[data-v-5e8a952d]:hover {
210
- color: #63656e;
211
- }
212
- .no-data[data-v-5e8a952d] {
213
- padding: 8px 12px;
154
+ }.bk-user-selector[data-v-30b84150] {
155
+ position: relative;
156
+ width: 100%;
214
157
  font-size: 12px;
215
- text-align: center;
216
- display: flex;
217
- align-items: center;
218
- justify-content: center;
219
158
  }
159
+ .bk-user-selector.is-disabled[data-v-30b84150] {
160
+ cursor: not-allowed;
161
+ background-color: #dcdee5;
162
+ }
@@ -1,22 +0,0 @@
1
- declare const _default: import("vue").DefineComponent<{}, {
2
- $emit: (event: "update:modelValue" | "change", ...args: any[]) => void;
3
- label: string;
4
- required: boolean;
5
- placeholder: string;
6
- modelValue: string | unknown[];
7
- draggable: boolean;
8
- multiple: boolean;
9
- apiBaseUrl: string;
10
- tenantId: string;
11
- $props: {
12
- readonly label?: string | undefined;
13
- readonly required?: boolean | undefined;
14
- readonly placeholder?: string | undefined;
15
- readonly modelValue?: string | unknown[] | undefined;
16
- readonly draggable?: boolean | undefined;
17
- readonly multiple?: boolean | undefined;
18
- readonly apiBaseUrl?: string | undefined;
19
- readonly tenantId?: string | undefined;
20
- };
21
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
22
- export default _default;
@@ -1,12 +0,0 @@
1
- declare const _default: import("vue").DefineComponent<{}, {
2
- $emit: (event: "update:modelValue" | "change", ...args: any[]) => void;
3
- modelValue: string;
4
- apiBaseUrl: string;
5
- tenantId: string;
6
- $props: {
7
- readonly modelValue?: string | undefined;
8
- readonly apiBaseUrl?: string | undefined;
9
- readonly tenantId?: string | undefined;
10
- };
11
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
12
- export default _default;
@@ -1,59 +0,0 @@
1
- export interface IDept {
2
- id: number | string;
3
- name: string;
4
- full_name: string;
5
- has_children?: boolean;
6
- parent?: number | string;
7
- children?: IDept[];
8
- order?: number;
9
- extras?: {
10
- code: string;
11
- };
12
- enabled?: boolean;
13
- ancestors?: {
14
- id: number | string;
15
- name: string;
16
- full_name: string;
17
- has_children?: boolean;
18
- children?: IDept[];
19
- }[];
20
- code?: string;
21
- level?: number;
22
- async?: boolean;
23
- }
24
- export declare const enum LookupFieldEnum {
25
- ID = "id",
26
- LEVEL = "level",
27
- NAME = "name",
28
- PARENT = "parent"
29
- }
30
- export interface IAPIParams {
31
- lookup_field: Lowercase<keyof typeof LookupFieldEnum>;
32
- exact_lookups?: number | string;
33
- no_page?: boolean;
34
- fuzzy_lookups?: string;
35
- with_ancestors?: boolean;
36
- }
37
- export interface IAPIResponse {
38
- code: number;
39
- data: IDept[];
40
- message: string;
41
- result?: boolean;
42
- request_id?: string;
43
- }
44
- export interface ITreeNode {
45
- ids: IDept['id'][];
46
- map: IDept;
47
- remove?: boolean;
48
- }
49
- export interface IOrgSelectorProps {
50
- modelValue: number | number[] | string | string[];
51
- dataUrl: string;
52
- multiple?: boolean;
53
- disabled?: boolean;
54
- showOnInit?: boolean;
55
- dropdownMaxHeight?: number;
56
- autoExpandTags?: boolean;
57
- placeholder?: string;
58
- searchPlaceholder?: string;
59
- }
@@ -1,4 +0,0 @@
1
- export declare const jsonp: <T>(url: string, data: object, { cbName, v }: {
2
- cbName?: string | undefined;
3
- v?: string | undefined;
4
- }) => Promise<T>;
@@ -1,3 +0,0 @@
1
- export declare const LANG: string;
2
- export declare const langData: {};
3
- export declare const t: (key: keyof typeof langData, query?: Record<string, string>) => string;
@@ -1,36 +0,0 @@
1
- import { type IOrgSelectorProps, type IAPIParams, type IDept, LookupFieldEnum } from './index';
2
- declare const _default: (props: IOrgSelectorProps) => {
3
- level0Params: () => {
4
- no_page: boolean;
5
- lookup_field: LookupFieldEnum;
6
- exact_lookups: number;
7
- };
8
- searchParams: (keyword: string) => {
9
- no_page: boolean;
10
- lookup_field: LookupFieldEnum;
11
- fuzzy_lookups: string;
12
- with_ancestors: boolean;
13
- };
14
- expandParentParams: (id: IDept["id"]) => {
15
- no_page: boolean;
16
- lookup_field: LookupFieldEnum;
17
- exact_lookups: string | number;
18
- with_ancestors: boolean;
19
- };
20
- defaultValueParams: (values: IDept["id"][]) => {
21
- no_page: boolean;
22
- lookup_field: LookupFieldEnum;
23
- exact_lookups: string;
24
- with_ancestors: boolean;
25
- };
26
- getCheckedFullTreeData: (checkedTreeData: IDept[]) => Promise<IDept[]>;
27
- getTreeSearchData: (data: IDept[]) => IDept[];
28
- fetchData: (params: IAPIParams) => Promise<IDept[]>;
29
- loading: {
30
- level0: boolean;
31
- expandParent: boolean;
32
- defaultValue: boolean;
33
- search: boolean;
34
- };
35
- };
36
- export default _default;