@opentiny/vue-search-box 0.1.1-alpha.3 → 0.1.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.
- package/README.md +1 -1
- package/README.zh-CN.md +1 -1
- package/dist/es/components/first-level-panel.vue.es.js +4 -0
- package/dist/es/components/first-level-panel.vue.es2.js +177 -0
- package/dist/es/components/second-level-panel.vue.es.js +4 -0
- package/dist/es/components/second-level-panel.vue.es2.js +466 -0
- package/dist/es/composables/use-checkbox.es.js +5 -18
- package/dist/es/composables/use-custom.es.js +1 -0
- package/dist/es/composables/use-datepicker.es.js +1 -1
- package/dist/es/composables/use-dropdown.es.js +27 -18
- package/dist/es/composables/use-edit.es.js +3 -1
- package/dist/es/composables/use-init.es.js +24 -10
- package/dist/es/composables/use-match.es.js +42 -42
- package/dist/es/composables/use-num-range.es.js +1 -1
- package/dist/es/composables/use-placeholder.es.js +2 -2
- package/dist/es/composables/use-tag.es.js +6 -1
- package/dist/es/{index-VrLZbD8H.css → index-BYxS8gdW.css} +56 -14
- package/dist/es/index.es.js +6 -0
- package/dist/es/index.vue.es2.js +150 -623
- package/dist/es/utils/dropdown.es.js +9 -5
- package/dist/es/utils/tag.es.js +2 -4
- package/dist/index.css +56 -14
- package/dist/lib/components/first-level-panel.vue.cjs.js +4 -0
- package/dist/lib/components/first-level-panel.vue.cjs2.js +177 -0
- package/dist/lib/components/second-level-panel.vue.cjs.js +4 -0
- package/dist/lib/components/second-level-panel.vue.cjs2.js +466 -0
- package/dist/lib/composables/use-checkbox.cjs.js +5 -18
- package/dist/lib/composables/use-custom.cjs.js +1 -0
- package/dist/lib/composables/use-datepicker.cjs.js +1 -1
- package/dist/lib/composables/use-dropdown.cjs.js +27 -18
- package/dist/lib/composables/use-edit.cjs.js +3 -1
- package/dist/lib/composables/use-init.cjs.js +24 -10
- package/dist/lib/composables/use-match.cjs.js +41 -41
- package/dist/lib/composables/use-num-range.cjs.js +1 -1
- package/dist/lib/composables/use-placeholder.cjs.js +2 -2
- package/dist/lib/composables/use-tag.cjs.js +6 -1
- package/dist/lib/{index-VrLZbD8H.css → index-BYxS8gdW.css} +56 -14
- package/dist/lib/index.cjs.js +6 -0
- package/dist/lib/index.vue.cjs2.js +156 -629
- package/dist/lib/utils/dropdown.cjs.js +9 -5
- package/dist/lib/utils/tag.cjs.js +1 -3
- package/dist/types/composables/use-checkbox.d.ts +0 -2
- package/dist/types/composables/use-dropdown.d.ts +1 -0
- package/package.json +1 -2
|
@@ -51,6 +51,7 @@ function useEdit({ props, state, t, nextTick, format, emits }) {
|
|
|
51
51
|
!state.prevItem && (state.prevItem = tag2);
|
|
52
52
|
state.selectValue = tag2.label;
|
|
53
53
|
state.currentModelValueIndex = index;
|
|
54
|
+
emits("tagClick", tag2);
|
|
54
55
|
setDropdownProps(tag2);
|
|
55
56
|
};
|
|
56
57
|
const selectPropChange = (item, disabled) => {
|
|
@@ -75,8 +76,9 @@ function useEdit({ props, state, t, nextTick, format, emits }) {
|
|
|
75
76
|
newTag = await validate.getVerifyTag(instance, state, props);
|
|
76
77
|
}
|
|
77
78
|
if (newTag) {
|
|
78
|
-
|
|
79
|
+
dropdown.showDropdown(state, false);
|
|
79
80
|
state.popoverVisible = false;
|
|
81
|
+
tag.emitChangeModelEvent({ emits, state, index, newTag, isEdit: true });
|
|
80
82
|
} else {
|
|
81
83
|
state.popoverVisible = true;
|
|
82
84
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const dropdown = require("../utils/dropdown.cjs.js");
|
|
4
|
+
const tag = require("../utils/tag.cjs.js");
|
|
4
5
|
function useInit({ props, state }) {
|
|
5
|
-
const { instance } = state;
|
|
6
6
|
const initItems = () => {
|
|
7
7
|
state.groupItems = {};
|
|
8
8
|
state.recordItems.forEach((item) => {
|
|
9
|
+
var _a;
|
|
9
10
|
const { groupKey = "0" } = item;
|
|
10
11
|
if (state.groupItems[groupKey]) {
|
|
11
12
|
state.groupItems[groupKey].push({ ...item });
|
|
@@ -13,12 +14,31 @@ function useInit({ props, state }) {
|
|
|
13
14
|
state.groupItems[groupKey] = [{ ...item }];
|
|
14
15
|
state.matchItems[groupKey] = { attr: [], attrValue: [] };
|
|
15
16
|
}
|
|
17
|
+
if (state.prevItem && item.field === state.prevItem.field && item !== state.prevItem) {
|
|
18
|
+
const { options, type } = item;
|
|
19
|
+
state.prevItem = item;
|
|
20
|
+
if (options == null ? void 0 : options.length) {
|
|
21
|
+
state.backupList = options;
|
|
22
|
+
}
|
|
23
|
+
if (type === "checkbox") {
|
|
24
|
+
state.filterList = state.backupList;
|
|
25
|
+
state.checkboxGroup = [];
|
|
26
|
+
(_a = state.backupList) == null ? void 0 : _a.forEach((subItem) => {
|
|
27
|
+
const { label } = subItem;
|
|
28
|
+
if (tag.hasTagItem(state, label)) {
|
|
29
|
+
state.checkboxGroup.push(`${item.label}${label}`);
|
|
30
|
+
}
|
|
31
|
+
subItem.isFilter = false;
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
dropdown.showDropdown(state, item.field === state.prevItem.field && item !== state.prevItem);
|
|
35
|
+
}
|
|
16
36
|
});
|
|
17
37
|
};
|
|
18
38
|
const handleClick = (e) => {
|
|
39
|
+
var _a;
|
|
19
40
|
const { backupPrevItem, prevItem } = state;
|
|
20
41
|
e.stopPropagation();
|
|
21
|
-
state.isResetFlag = true;
|
|
22
42
|
if (props.editable) {
|
|
23
43
|
state.popoverVisible = false;
|
|
24
44
|
state.currentEditValue = [];
|
|
@@ -26,24 +46,18 @@ function useInit({ props, state }) {
|
|
|
26
46
|
state.prevItem = backupPrevItem;
|
|
27
47
|
}
|
|
28
48
|
}
|
|
29
|
-
if (!state.
|
|
49
|
+
if (state.hasBackupList && (((_a = state.backupList) == null ? void 0 : _a.length) === 0 || !state.backupList) && !state.inputValue || props.items.length === 0) {
|
|
30
50
|
dropdown.showDropdown(state, false);
|
|
31
51
|
} else {
|
|
32
52
|
dropdown.showDropdown(state);
|
|
33
53
|
}
|
|
34
54
|
};
|
|
35
55
|
const watchOutsideClick = () => {
|
|
36
|
-
var _a, _b, _c;
|
|
37
|
-
if (!state.isMouseDown) {
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
56
|
if (props.editable) {
|
|
41
57
|
dropdown.showPopover(state, false);
|
|
42
58
|
}
|
|
43
59
|
state.isMouseDown = false;
|
|
44
|
-
|
|
45
|
-
dropdown.showDropdown(state, false);
|
|
46
|
-
}
|
|
60
|
+
dropdown.showDropdown(state, false);
|
|
47
61
|
};
|
|
48
62
|
const watchMouseDown = () => {
|
|
49
63
|
state.isMouseDown = true;
|
|
@@ -6,16 +6,18 @@ const index = require("../utils/index.cjs.js");
|
|
|
6
6
|
const tag = require("../utils/tag.cjs.js");
|
|
7
7
|
const dropdown = require("../utils/dropdown.cjs.js");
|
|
8
8
|
const escapeRegExp = (string) => string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
9
|
-
const getHighlightMatch = (labelRegex, label
|
|
9
|
+
const getHighlightMatch = (labelRegex, label) => {
|
|
10
10
|
const match = [];
|
|
11
|
-
let lastIndex;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const startIndex =
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
11
|
+
let lastIndex = 0;
|
|
12
|
+
let result;
|
|
13
|
+
while ((result = labelRegex.exec(label)) !== null) {
|
|
14
|
+
const startIndex = result.index;
|
|
15
|
+
const endIndex = labelRegex.lastIndex;
|
|
16
|
+
if (startIndex > lastIndex) {
|
|
17
|
+
match.push(label.slice(lastIndex, startIndex));
|
|
18
|
+
}
|
|
19
|
+
match.push(label.slice(startIndex, endIndex));
|
|
20
|
+
lastIndex = endIndex;
|
|
19
21
|
}
|
|
20
22
|
if (lastIndex < label.length) {
|
|
21
23
|
match.push(label.slice(lastIndex));
|
|
@@ -24,29 +26,18 @@ const getHighlightMatch = (labelRegex, label, valueLength) => {
|
|
|
24
26
|
};
|
|
25
27
|
function useMatch({ props, state, emits }) {
|
|
26
28
|
const loadingInstance = vue.ref(null);
|
|
27
|
-
vue.watch(
|
|
28
|
-
() => state.inputValue,
|
|
29
|
-
(newInput) => {
|
|
30
|
-
if (!newInput.trim()) {
|
|
31
|
-
state.isShowDropdown = true;
|
|
32
|
-
} else {
|
|
33
|
-
state.isShowDropdown = false;
|
|
34
|
-
}
|
|
35
|
-
dropdown.showDropdown(state, false);
|
|
36
|
-
}
|
|
37
|
-
);
|
|
38
29
|
const getMatchList = async (keyword) => {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
30
|
+
if (typeof document !== "undefined") {
|
|
31
|
+
!loadingInstance.value && (loadingInstance.value = Loading.service({
|
|
32
|
+
target: document.getElementById("potential-loading")
|
|
33
|
+
}));
|
|
34
|
+
}
|
|
42
35
|
state.potentialOptions = await props.potentialOptions.getMatchList(keyword);
|
|
43
36
|
loadingInstance.value && loadingInstance.value.close();
|
|
44
|
-
|
|
45
|
-
state.isShowDropdown = true;
|
|
46
|
-
}
|
|
47
|
-
dropdown.showDropdown(state, state.isShowDropdown);
|
|
37
|
+
dropdown.showDropdown(state, true);
|
|
48
38
|
};
|
|
49
39
|
const handleSearch = (e) => {
|
|
40
|
+
var _a, _b, _c;
|
|
50
41
|
const { recordItems, propItem } = state;
|
|
51
42
|
const inputValue = e.target.value.trim();
|
|
52
43
|
const { maxlength } = props;
|
|
@@ -55,13 +46,13 @@ function useMatch({ props, state, emits }) {
|
|
|
55
46
|
return;
|
|
56
47
|
}
|
|
57
48
|
if (inputValue.length === 0) {
|
|
49
|
+
dropdown.showDropdown(state);
|
|
58
50
|
return;
|
|
59
51
|
}
|
|
60
52
|
Object.keys(state.matchItems).forEach((key) => {
|
|
61
53
|
state.matchItems[key].attr = [];
|
|
62
54
|
state.matchItems[key].attrValue = [];
|
|
63
55
|
});
|
|
64
|
-
state.isShowDropdown = false;
|
|
65
56
|
const value = escapeRegExp(inputValue);
|
|
66
57
|
const patt = new RegExp(value, "i");
|
|
67
58
|
const hasItem = propItem.label || !value ? null : recordItems.find((item) => item.type === "map" && patt.test(item.label));
|
|
@@ -73,7 +64,7 @@ function useMatch({ props, state, emits }) {
|
|
|
73
64
|
state.backupList = hasItem.options || [];
|
|
74
65
|
return;
|
|
75
66
|
}
|
|
76
|
-
state.filterList = state.backupList.filter((item) => {
|
|
67
|
+
state.filterList = (_a = state.backupList) == null ? void 0 : _a.filter((item) => {
|
|
77
68
|
if (patt.test(item.label)) {
|
|
78
69
|
delete item.isFilter;
|
|
79
70
|
if (tag.hasTagItem(state, item.label)) {
|
|
@@ -86,62 +77,70 @@ function useMatch({ props, state, emits }) {
|
|
|
86
77
|
}
|
|
87
78
|
});
|
|
88
79
|
const labelRegex = new RegExp(value, "ig");
|
|
89
|
-
const
|
|
80
|
+
const hightlighStr = inputValue.toLowerCase();
|
|
90
81
|
if (state.propItem.label) {
|
|
91
|
-
state.backupList.forEach((item) => {
|
|
82
|
+
(_b = state.backupList) == null ? void 0 : _b.forEach((item) => {
|
|
83
|
+
item.hightlighStr = hightlighStr;
|
|
92
84
|
const itemLabel = item.label;
|
|
93
85
|
if (patt.test(itemLabel)) {
|
|
94
|
-
item.match = getHighlightMatch(labelRegex, itemLabel
|
|
86
|
+
item.match = getHighlightMatch(labelRegex, itemLabel);
|
|
95
87
|
item.isFilter = false;
|
|
96
|
-
state.isShowDropdown = true;
|
|
97
88
|
} else {
|
|
98
89
|
item.isFilter = true;
|
|
99
90
|
}
|
|
100
91
|
});
|
|
92
|
+
if (((_c = state.backupList) == null ? void 0 : _c.length) || inputValue) {
|
|
93
|
+
dropdown.showDropdown(state);
|
|
94
|
+
} else {
|
|
95
|
+
dropdown.showDropdown(state, false);
|
|
96
|
+
}
|
|
101
97
|
return;
|
|
102
98
|
}
|
|
103
99
|
for (const item of recordItems) {
|
|
104
100
|
const { options = [], groupKey = "0", ...rest } = item;
|
|
105
101
|
const itemLabel = rest.label;
|
|
106
102
|
if (patt.test(itemLabel)) {
|
|
107
|
-
const match = getHighlightMatch(labelRegex, itemLabel
|
|
108
|
-
state.matchItems[groupKey].attr.push({ ...item, match });
|
|
109
|
-
state.isShowDropdown = true;
|
|
103
|
+
const match = getHighlightMatch(labelRegex, itemLabel);
|
|
104
|
+
state.matchItems[groupKey].attr.push({ ...item, match, hightlighStr });
|
|
110
105
|
}
|
|
111
106
|
for (const option of options) {
|
|
112
107
|
const optionLabel = state.propItem.label ? itemLabel : `${itemLabel}:${option.label}`;
|
|
113
108
|
if (patt.test(optionLabel)) {
|
|
114
|
-
const match = getHighlightMatch(labelRegex, optionLabel
|
|
109
|
+
const match = getHighlightMatch(labelRegex, optionLabel);
|
|
115
110
|
state.matchItems[groupKey].attrValue.push({
|
|
116
111
|
...option,
|
|
117
112
|
...rest,
|
|
113
|
+
options,
|
|
114
|
+
hightlighStr,
|
|
118
115
|
value: option.label,
|
|
119
116
|
match
|
|
120
117
|
});
|
|
121
|
-
state.isShowDropdown = true;
|
|
122
118
|
}
|
|
123
119
|
}
|
|
124
120
|
}
|
|
125
121
|
if (value && props.potentialOptions && props.potentialOptions.getMatchList) {
|
|
126
122
|
getMatchList(value);
|
|
127
123
|
} else {
|
|
128
|
-
dropdown.showDropdown(state
|
|
124
|
+
dropdown.showDropdown(state);
|
|
129
125
|
}
|
|
130
126
|
};
|
|
131
127
|
const handleInput = index.debounce(handleSearch, 500);
|
|
132
128
|
const resetBackupList = () => {
|
|
133
|
-
|
|
129
|
+
var _a;
|
|
130
|
+
(_a = state.backupList) == null ? void 0 : _a.forEach((item) => item.isFilter && delete item.isFilter);
|
|
134
131
|
};
|
|
135
132
|
const selectFirstMap = (item, isFirst) => {
|
|
133
|
+
var _a;
|
|
136
134
|
const { options } = item;
|
|
137
135
|
const { prevItem, propItem } = state;
|
|
138
136
|
if (options) {
|
|
137
|
+
dropdown.showDropdown(state, false);
|
|
139
138
|
state.propItem.value = `${item.label}=`;
|
|
140
139
|
state.isShowTagKey = false;
|
|
141
140
|
state.inputValue = "";
|
|
142
141
|
state.backupList = item.options || [];
|
|
143
142
|
resetBackupList();
|
|
144
|
-
state.backupList.forEach((subItem) => {
|
|
143
|
+
(_a = state.backupList) == null ? void 0 : _a.forEach((subItem) => {
|
|
145
144
|
const value = propItem.value + subItem.label;
|
|
146
145
|
subItem.isChecked = tag.hasTagItem(state, value);
|
|
147
146
|
});
|
|
@@ -149,6 +148,7 @@ function useMatch({ props, state, emits }) {
|
|
|
149
148
|
if (item.isChecked) {
|
|
150
149
|
return;
|
|
151
150
|
}
|
|
151
|
+
dropdown.showDropdown(state, false);
|
|
152
152
|
state.isShowTagKey = true;
|
|
153
153
|
resetBackupList();
|
|
154
154
|
const { field, type } = prevItem;
|
|
@@ -12,10 +12,10 @@ function useNumRange({ props, state, t, emits }) {
|
|
|
12
12
|
}
|
|
13
13
|
const newTag = await validate.getVerifyNumTag(instance, state, props);
|
|
14
14
|
if (newTag) {
|
|
15
|
+
dropdown.showDropdown(state, false);
|
|
15
16
|
const newValue = props.modelValue.filter((prev) => prev.type !== newTag.type || prev.field !== newTag.field);
|
|
16
17
|
newValue.push(newTag);
|
|
17
18
|
tag.emitChangeModelEvent({ emits, state, newValue });
|
|
18
|
-
dropdown.showDropdown(state, false);
|
|
19
19
|
} else {
|
|
20
20
|
dropdown.showDropdown(state);
|
|
21
21
|
}
|
|
@@ -12,13 +12,14 @@ function usePlaceholder({ props, state, t }) {
|
|
|
12
12
|
vue.watch(
|
|
13
13
|
() => state.propItem.label,
|
|
14
14
|
(newValue) => {
|
|
15
|
+
var _a;
|
|
15
16
|
if (newValue) {
|
|
16
17
|
const { placeholder: placeholder2, type } = state.prevItem;
|
|
17
18
|
if (placeholder2) {
|
|
18
19
|
setPlaceholder(placeholder2);
|
|
19
20
|
} else if (type === "map") {
|
|
20
21
|
setPlaceholder(t("tvp.tvpSearchbox.tagPlaceholder"));
|
|
21
|
-
} else if (state.backupList.length) {
|
|
22
|
+
} else if ((_a = state.backupList) == null ? void 0 : _a.length) {
|
|
22
23
|
setPlaceholder(t("tvp.tvpSearchbox.dynamicPlaceholder", { newValue }));
|
|
23
24
|
} else {
|
|
24
25
|
setPlaceholder(t("tvp.tvpSearchbox.addPlaceholder"));
|
|
@@ -29,7 +30,6 @@ function usePlaceholder({ props, state, t }) {
|
|
|
29
30
|
} else {
|
|
30
31
|
setPlaceholder(props.emptyPlaceholder);
|
|
31
32
|
}
|
|
32
|
-
!state.hiden && (state.hiden = true);
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
);
|
|
@@ -15,18 +15,21 @@ function useTag({ props, state, emits }) {
|
|
|
15
15
|
}
|
|
16
16
|
};
|
|
17
17
|
const deleteTag = (tag$1) => {
|
|
18
|
+
dropdown.showDropdown(state, false);
|
|
18
19
|
changeIsChecked(tag$1);
|
|
19
20
|
const newValue = props.modelValue.filter((item) => item !== tag$1);
|
|
20
21
|
tag.emitChangeModelEvent({ emits, state, newValue });
|
|
21
22
|
};
|
|
22
23
|
const clearTag = () => {
|
|
24
|
+
dropdown.showDropdown(state, false);
|
|
23
25
|
props.modelValue.forEach((item) => changeIsChecked(item));
|
|
24
26
|
state.propItem = {};
|
|
25
27
|
state.inputValue = "";
|
|
26
28
|
tag.emitChangeModelEvent({ emits, state, newValue: [] });
|
|
27
|
-
|
|
29
|
+
emits("clear");
|
|
28
30
|
};
|
|
29
31
|
const backspaceDeleteTag = () => {
|
|
32
|
+
var _a, _b;
|
|
30
33
|
if (state.inputValue) {
|
|
31
34
|
return;
|
|
32
35
|
}
|
|
@@ -35,12 +38,14 @@ function useTag({ props, state, emits }) {
|
|
|
35
38
|
return;
|
|
36
39
|
}
|
|
37
40
|
if (lastInputValue.value === "" && state.inputValue === "") {
|
|
41
|
+
dropdown.showDropdown(state, false);
|
|
38
42
|
const lastIndex = props.modelValue.length - 1;
|
|
39
43
|
changeIsChecked(props.modelValue[lastIndex]);
|
|
40
44
|
const newValue = state.innerModelValue.slice(0, props.modelValue.length - 1);
|
|
41
45
|
tag.emitChangeModelEvent({ emits, state, newValue });
|
|
42
46
|
}
|
|
43
47
|
lastInputValue.value = state.inputValue;
|
|
48
|
+
(_b = (_a = state == null ? void 0 : state.instance) == null ? void 0 : _a.refs) == null ? void 0 : _b.inputRef.$el.click();
|
|
44
49
|
};
|
|
45
50
|
return {
|
|
46
51
|
deleteTag,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.tvp-search-box__dropdown-menu,
|
|
1
|
+
.tiny-popper.tvp-search-box__dropdown-menu,
|
|
2
2
|
.tvp-search-box__popover {
|
|
3
3
|
--tvp-SearchBox-bg-color: var(--tv-color-bg-secondary, #ffffff);
|
|
4
4
|
--tvp-SearchBox-border-color: var(--tv-color-bg-control-unactive, #c2c2c2);
|
|
@@ -29,17 +29,48 @@
|
|
|
29
29
|
--tvp-SearchBox-dropdown-desc-text-color: var(--tv-color-info-text-primary, #191919);
|
|
30
30
|
width: 232px;
|
|
31
31
|
overflow: auto;
|
|
32
|
-
overflow-x: hidden;
|
|
33
32
|
}
|
|
34
|
-
.
|
|
33
|
+
.tiny-popper.tvp-search-box__dropdown-menu::-webkit-scrollbar,
|
|
34
|
+
.tvp-search-box__popover::-webkit-scrollbar {
|
|
35
|
+
width: 8px;
|
|
36
|
+
height: 8px;
|
|
37
|
+
}
|
|
38
|
+
.tiny-popper.tvp-search-box__dropdown-menu::-webkit-scrollbar-corner,
|
|
39
|
+
.tvp-search-box__popover::-webkit-scrollbar-corner {
|
|
40
|
+
background: transparent;
|
|
41
|
+
}
|
|
42
|
+
.tiny-popper.tvp-search-box__dropdown-menu::-webkit-scrollbar-track,
|
|
43
|
+
.tvp-search-box__popover::-webkit-scrollbar-track {
|
|
44
|
+
background: transparent;
|
|
45
|
+
}
|
|
46
|
+
.tiny-popper.tvp-search-box__dropdown-menu::-webkit-scrollbar-thumb,
|
|
47
|
+
.tvp-search-box__popover::-webkit-scrollbar-thumb {
|
|
48
|
+
background: var(--tvp-SearchBox-color-bg-scrollbar-thumb);
|
|
49
|
+
border-radius: var(--tvp-SearchBox-border-radius-scrollbar-thumb);
|
|
50
|
+
}
|
|
51
|
+
.tiny-popper.tvp-search-box__dropdown-menu::-webkit-scrollbar-thumb:hover,
|
|
52
|
+
.tvp-search-box__popover::-webkit-scrollbar-thumb:hover {
|
|
53
|
+
background: var(--tv-color-bg-scrollbar-thumb-hover);
|
|
54
|
+
}
|
|
55
|
+
.tiny-popper.tvp-search-box__dropdown-menu::-webkit-scrollbar-thumb:active,
|
|
56
|
+
.tvp-search-box__popover::-webkit-scrollbar-thumb:active {
|
|
57
|
+
background: var(--tvp-SearchBox-color-bg-scrollbar-thumb-active);
|
|
58
|
+
}
|
|
59
|
+
.tiny-popper.tvp-search-box__dropdown-menu.tiny-popper.tvp-search-box__dropdown-menu .tvp-search-box__date-picker .baseClearicon,
|
|
60
|
+
.tiny-popper.tvp-search-box__dropdown-menu.tvp-search-box__popover .tvp-search-box__date-picker .baseClearicon,
|
|
61
|
+
.tvp-search-box__popover.tiny-popper.tvp-search-box__dropdown-menu .tvp-search-box__date-picker .baseClearicon,
|
|
62
|
+
.tvp-search-box__popover.tvp-search-box__popover .tvp-search-box__date-picker .baseClearicon {
|
|
63
|
+
background-color: var(--tvp-SearchBox-date-picker-clear-icon-bg);
|
|
64
|
+
}
|
|
65
|
+
.tiny-popper.tvp-search-box__dropdown-menu .tiny-form-item.is-error .tvp-search-box-select .tiny-select__tags-group,
|
|
35
66
|
.tvp-search-box__popover .tiny-form-item.is-error .tvp-search-box-select .tiny-select__tags-group {
|
|
36
67
|
border-color: #f23030;
|
|
37
68
|
}
|
|
38
|
-
.tvp-search-box__dropdown-menu .tvp-search-box-select .tiny-select .tiny-svg,
|
|
69
|
+
.tiny-popper.tvp-search-box__dropdown-menu .tvp-search-box-select .tiny-select .tiny-svg,
|
|
39
70
|
.tvp-search-box__popover .tvp-search-box-select .tiny-select .tiny-svg {
|
|
40
71
|
z-index: 1000;
|
|
41
72
|
}
|
|
42
|
-
.tvp-search-box__dropdown-menu .tvp-search-box-select .tiny-select__tags-group,
|
|
73
|
+
.tiny-popper.tvp-search-box__dropdown-menu .tvp-search-box-select .tiny-select__tags-group,
|
|
43
74
|
.tvp-search-box__popover .tvp-search-box-select .tiny-select__tags-group {
|
|
44
75
|
min-height: 32px;
|
|
45
76
|
max-height: 82px;
|
|
@@ -48,7 +79,7 @@
|
|
|
48
79
|
border: 1px solid #c2c2c2;
|
|
49
80
|
border-radius: 6px;
|
|
50
81
|
}
|
|
51
|
-
.tvp-search-box__dropdown-menu .tvp-search-box-select .tiny-select__tags.is-show-tag,
|
|
82
|
+
.tiny-popper.tvp-search-box__dropdown-menu .tvp-search-box-select .tiny-select__tags.is-show-tag,
|
|
52
83
|
.tvp-search-box__popover .tvp-search-box-select .tiny-select__tags.is-show-tag {
|
|
53
84
|
max-width: 276px !important;
|
|
54
85
|
width: calc(100% - 8px) !important;
|
|
@@ -57,24 +88,24 @@
|
|
|
57
88
|
max-height: 76px;
|
|
58
89
|
overflow: auto;
|
|
59
90
|
}
|
|
60
|
-
.tvp-search-box__dropdown-menu .tvp-search-box-select .tiny-input__suffix,
|
|
91
|
+
.tiny-popper.tvp-search-box__dropdown-menu .tvp-search-box-select .tiny-input__suffix,
|
|
61
92
|
.tvp-search-box__popover .tvp-search-box-select .tiny-input__suffix {
|
|
62
93
|
z-index: 1000;
|
|
63
94
|
}
|
|
64
|
-
.tvp-search-box__dropdown-menu .tvp-search-box-select .tiny-input__inner,
|
|
95
|
+
.tiny-popper.tvp-search-box__dropdown-menu .tvp-search-box-select .tiny-input__inner,
|
|
65
96
|
.tvp-search-box__popover .tvp-search-box-select .tiny-input__inner {
|
|
66
97
|
border: 0px;
|
|
67
98
|
overflow: hidden;
|
|
68
99
|
}
|
|
69
|
-
.tvp-search-box__dropdown-menu input[type='number'],
|
|
100
|
+
.tiny-popper.tvp-search-box__dropdown-menu input[type='number'],
|
|
70
101
|
.tvp-search-box__popover input[type='number'] {
|
|
71
102
|
-moz-appearance: textfield;
|
|
72
103
|
/* Firefox */
|
|
73
104
|
appearance: textfield;
|
|
74
105
|
}
|
|
75
|
-
.tvp-search-box__dropdown-menu input[type='number']::-webkit-inner-spin-button,
|
|
106
|
+
.tiny-popper.tvp-search-box__dropdown-menu input[type='number']::-webkit-inner-spin-button,
|
|
76
107
|
.tvp-search-box__popover input[type='number']::-webkit-inner-spin-button,
|
|
77
|
-
.tvp-search-box__dropdown-menu input[type='number']::-webkit-outer-spin-button,
|
|
108
|
+
.tiny-popper.tvp-search-box__dropdown-menu input[type='number']::-webkit-outer-spin-button,
|
|
78
109
|
.tvp-search-box__popover input[type='number']::-webkit-outer-spin-button {
|
|
79
110
|
-webkit-appearance: none;
|
|
80
111
|
/* Safari */
|
|
@@ -178,7 +209,7 @@
|
|
|
178
209
|
margin-right: var(--tvp-SearchBox-separator-icon-margin-right);
|
|
179
210
|
height: 14px;
|
|
180
211
|
width: 1px;
|
|
181
|
-
background-color:
|
|
212
|
+
background-color: var(--tvp-SearchBox-color-border-divider);
|
|
182
213
|
}
|
|
183
214
|
.tvp-search-box__input-help {
|
|
184
215
|
margin-right: 0px;
|
|
@@ -215,6 +246,9 @@
|
|
|
215
246
|
.tvp-search-box .tiny-dropdown__trigger {
|
|
216
247
|
display: block;
|
|
217
248
|
}
|
|
249
|
+
.tvp-search-box .tiny-dropdown__trigger:focus-visible {
|
|
250
|
+
outline: none;
|
|
251
|
+
}
|
|
218
252
|
.tvp-search-box .tiny-dropdown__trigger .tiny-dropdown__title {
|
|
219
253
|
width: 100%;
|
|
220
254
|
}
|
|
@@ -222,6 +256,9 @@
|
|
|
222
256
|
display: block;
|
|
223
257
|
flex: 1;
|
|
224
258
|
}
|
|
259
|
+
.tvp-search-box__loading-box {
|
|
260
|
+
min-height: 32px;
|
|
261
|
+
}
|
|
225
262
|
.tvp-search-box__radio-wrap {
|
|
226
263
|
max-height: 240px;
|
|
227
264
|
overflow: auto;
|
|
@@ -241,6 +278,8 @@
|
|
|
241
278
|
margin-top: var(--tvp-SearchBox-dropdown-btn-group-margin-top);
|
|
242
279
|
padding-top: var(--tvp-SearchBox-dropdown-btn-group-padding-top);
|
|
243
280
|
padding-right: 10px;
|
|
281
|
+
gap: 5px;
|
|
282
|
+
justify-content: flex-end;
|
|
244
283
|
padding-bottom: var(--tvp-SearchBox-dropdown-btn-group-padding-bottom);
|
|
245
284
|
}
|
|
246
285
|
.tvp-search-box__bottom-btn .tiny-button,
|
|
@@ -267,12 +306,11 @@
|
|
|
267
306
|
}
|
|
268
307
|
.tvp-search-box__filter-item {
|
|
269
308
|
color: var(--tvp-SearchBox-search-filter-text-color);
|
|
270
|
-
border-bottom: 1px solid #fff;
|
|
271
309
|
}
|
|
272
310
|
.tvp-search-box__dropdown-item.tiny-dropdown-item {
|
|
273
311
|
width: 100%;
|
|
274
312
|
max-width: 100%;
|
|
275
|
-
|
|
313
|
+
background: inherit;
|
|
276
314
|
}
|
|
277
315
|
.tvp-search-box__dropdown-item.tiny-dropdown-item > div {
|
|
278
316
|
white-space: nowrap;
|
|
@@ -282,6 +320,9 @@
|
|
|
282
320
|
.tvp-search-box__dropdown-item.tiny-dropdown-item.tvp-search-box__checkbox-item .tiny-checkbox__inner > .tiny-svg {
|
|
283
321
|
margin-right: 0;
|
|
284
322
|
}
|
|
323
|
+
.tvp-search-box__dropdown-item-init {
|
|
324
|
+
background-color: #f5f5f5;
|
|
325
|
+
}
|
|
285
326
|
.tvp-search-box__checkbox-item .tvp-search-box__checkbox-item-label,
|
|
286
327
|
.tvp-search-box__checkbox-item .tiny-checkbox,
|
|
287
328
|
.tvp-search-box__checkbox-item .tiny-dropdown-item__label {
|
|
@@ -315,6 +356,7 @@
|
|
|
315
356
|
.tvp-search-box__panel-box {
|
|
316
357
|
width: 100%;
|
|
317
358
|
padding: 0px 10px;
|
|
359
|
+
color: var(--tvp-SearchBox-dropdown-desc-text-color);
|
|
318
360
|
}
|
|
319
361
|
.tvp-search-box__date-item.tiny-form-item,
|
|
320
362
|
.tvp-search-box__number-item.tiny-form-item {
|
package/dist/lib/index.cjs.js
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
require("./index.vue.cjs.js");
|
|
4
|
+
require("./components/first-level-panel.vue.cjs.js");
|
|
5
|
+
require("./components/second-level-panel.vue.cjs.js");
|
|
4
6
|
const zh_CN = require("./utils/zh_CN.cjs.js");
|
|
5
7
|
const en_US = require("./utils/en_US.cjs.js");
|
|
6
8
|
;/* empty css */
|
|
7
9
|
require("./index.type.cjs.js");
|
|
8
10
|
const index_vue_vue_type_script_setup_true_lang = require("./index.vue.cjs2.js");
|
|
11
|
+
const firstLevelPanel_vue_vue_type_script_setup_true_lang = require("./components/first-level-panel.vue.cjs2.js");
|
|
12
|
+
const secondLevelPanel_vue_vue_type_script_setup_true_lang = require("./components/second-level-panel.vue.cjs2.js");
|
|
9
13
|
let apps;
|
|
10
14
|
index_vue_vue_type_script_setup_true_lang.default.install = function(app) {
|
|
11
15
|
apps = app;
|
|
@@ -19,4 +23,6 @@ const t = (key) => {
|
|
|
19
23
|
exports.zhCN = zh_CN.default;
|
|
20
24
|
exports.enUS = en_US.default;
|
|
21
25
|
exports.default = index_vue_vue_type_script_setup_true_lang.default;
|
|
26
|
+
exports.TinySearchBoxFirstLevelPanel = firstLevelPanel_vue_vue_type_script_setup_true_lang.default;
|
|
27
|
+
exports.TinySearchBoxSecondLevelPanel = secondLevelPanel_vue_vue_type_script_setup_true_lang.default;
|
|
22
28
|
exports.t = t;
|