funda-ui 1.1.155 → 1.1.159
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/LiveSearch/index.js +4 -3
- package/MultiFuncSelect/index.css +164 -108
- package/MultiFuncSelect/index.d.ts +1 -0
- package/MultiFuncSelect/index.js +162 -163
- package/MultipleCheckboxes/index.js +8 -3
- package/README.md +1 -1
- package/TagInput/index.js +11 -6
- package/lib/cjs/LiveSearch/index.js +4 -3
- package/lib/cjs/MultiFuncSelect/index.d.ts +1 -0
- package/lib/cjs/MultiFuncSelect/index.js +162 -163
- package/lib/cjs/MultipleCheckboxes/index.js +8 -3
- package/lib/cjs/TagInput/index.js +11 -6
- package/lib/css/MultiFuncSelect/index.css +164 -108
- package/lib/esm/LiveSearch/index.tsx +5 -4
- package/lib/esm/MultiFuncSelect/index.scss +177 -95
- package/lib/esm/MultiFuncSelect/index.tsx +198 -175
- package/lib/esm/MultiFuncSelect/utils/get-element-property.js +1 -0
- package/lib/esm/MultipleCheckboxes/index.tsx +9 -1
- package/lib/esm/TagInput/index.tsx +12 -6
- package/package.json +1 -1
package/LiveSearch/index.js
CHANGED
|
@@ -804,11 +804,12 @@ var LiveSearch = function LiveSearch(props) {
|
|
|
804
804
|
return data.filter(function (item) {
|
|
805
805
|
// Avoid fatal errors causing page crashes
|
|
806
806
|
var _queryString = typeof item.queryString !== 'undefined' && item.queryString !== null ? item.queryString : '';
|
|
807
|
+
var _val = typeof val !== 'undefined' && val !== null ? val : '';
|
|
807
808
|
if ((_queryString.split(',').some(function (l) {
|
|
808
|
-
return l.charAt(0) ===
|
|
809
|
+
return l.charAt(0) === _val.toLowerCase();
|
|
809
810
|
}) || _queryString.split(',').some(function (l) {
|
|
810
|
-
return l.replace(/ /g, '').indexOf(
|
|
811
|
-
}) || item.label.toLowerCase().indexOf(
|
|
811
|
+
return l.replace(/ /g, '').indexOf(_val.toLowerCase()) >= 0;
|
|
812
|
+
}) || item.label.toLowerCase().indexOf(_val.toLowerCase()) >= 0) && _val != '') {
|
|
812
813
|
return true;
|
|
813
814
|
} else {
|
|
814
815
|
return false;
|
|
@@ -1,98 +1,156 @@
|
|
|
1
1
|
/* ======================================================
|
|
2
2
|
<!-- Multifunction Select -->
|
|
3
3
|
/* ====================================================== */
|
|
4
|
-
.
|
|
5
|
-
--
|
|
6
|
-
--
|
|
7
|
-
--
|
|
8
|
-
--
|
|
9
|
-
--
|
|
10
|
-
--
|
|
11
|
-
--
|
|
12
|
-
--
|
|
13
|
-
--
|
|
14
|
-
--
|
|
15
|
-
--
|
|
16
|
-
--
|
|
4
|
+
.mf-select__wrapper {
|
|
5
|
+
--mf-sel-focus-border-color:#86b7fe;
|
|
6
|
+
--mf-sel-focus-box-shadow: 0 0 0 0.25rem rgba(13,110,253,.25);
|
|
7
|
+
--mf-sel-placeholder-color: rgba(33, 37, 41, 0.75);
|
|
8
|
+
--mf-sel-input-placeholder-color: #c5c9d1;
|
|
9
|
+
--mf-sel-control-wrapper-bg: #fff;
|
|
10
|
+
--mf-sel-control-wrapper-border-color: #dee2e6;
|
|
11
|
+
--mf-sel-control-list-bg: #efefef;
|
|
12
|
+
--mf-sel-arrow-fill: #a5a5a5;
|
|
13
|
+
--mf-sel-searchbtn-fill: #a5a5a5;
|
|
14
|
+
--mf-sel-searchbtn-hover-fill: #333;
|
|
15
|
+
--mf-sel-removebtn-fill: #000;
|
|
16
|
+
--mf-sel-removebtn-hover-fill: #f00;
|
|
17
17
|
/*------ Placeholder for input ------*/
|
|
18
18
|
/*------ Arrow ------*/
|
|
19
19
|
/*------ Input ------*/
|
|
20
|
+
/*------ Blinking cursor ------*/
|
|
21
|
+
/*------ Single selection ------*/
|
|
20
22
|
/*------ Multiple selection ------*/
|
|
23
|
+
/*------ Search button ------*/
|
|
21
24
|
/*------------*/
|
|
22
25
|
}
|
|
23
|
-
.
|
|
24
|
-
color: var(--
|
|
26
|
+
.mf-select__wrapper input::placeholder {
|
|
27
|
+
color: var(--mf-sel-input-placeholder-color);
|
|
25
28
|
}
|
|
26
|
-
.
|
|
27
|
-
fill: var(--
|
|
29
|
+
.mf-select__wrapper .arrow svg .arrow-fill-g {
|
|
30
|
+
fill: var(--mf-sel-arrow-fill);
|
|
28
31
|
}
|
|
29
|
-
.
|
|
32
|
+
.mf-select__wrapper [data-select]:focus {
|
|
30
33
|
box-shadow: none;
|
|
31
34
|
border-color: transparent;
|
|
32
35
|
outline: 0;
|
|
33
36
|
}
|
|
34
|
-
.
|
|
37
|
+
.mf-select__wrapper .mf-select-multi__control-blinking-cursor {
|
|
38
|
+
display: inline-block;
|
|
39
|
+
color: var(--mf-sel-placeholder-color);
|
|
40
|
+
}
|
|
41
|
+
.mf-select__wrapper .mf-select-multi__control-blinking-cursor.animated {
|
|
42
|
+
animation: 1s mf-sel-blink step-end infinite;
|
|
43
|
+
}
|
|
44
|
+
.mf-select__wrapper .mf-select-multi__control-blinking-cursor.control-placeholder {
|
|
45
|
+
color: var(--mf-sel-input-placeholder-color);
|
|
46
|
+
}
|
|
47
|
+
@keyframes mf-sel-blink {
|
|
48
|
+
from, to {
|
|
49
|
+
color: transparent;
|
|
50
|
+
}
|
|
51
|
+
50% {
|
|
52
|
+
color: var(--mf-sel-placeholder-color);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
.mf-select__wrapper .mf-select-single__inputplaceholder-wrapper {
|
|
35
56
|
position: absolute;
|
|
36
57
|
top: 0;
|
|
37
58
|
width: 100%;
|
|
38
59
|
pointer-events: none;
|
|
60
|
+
overflow: hidden;
|
|
61
|
+
text-overflow: ellipsis;
|
|
62
|
+
border-radius: 0.375rem;
|
|
39
63
|
}
|
|
40
|
-
.
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
64
|
+
.mf-select__wrapper .mf-select-single__inputplaceholder-wrapper .mf-select-multi__control-blinking-cursor {
|
|
65
|
+
position: absolute;
|
|
66
|
+
top: 0.1rem;
|
|
67
|
+
left: 0;
|
|
68
|
+
padding: 0.1rem 1.5rem 0.1rem 1rem;
|
|
69
|
+
font-size: 0.875rem;
|
|
70
|
+
/* bootstrap style that match ".form-control" */
|
|
71
|
+
top: 0.375rem;
|
|
72
|
+
}
|
|
73
|
+
.mf-select__wrapper .mf-select-single__inputplaceholder-wrapper .mf-select-multi__control-blinking-cursor .control-placeholder {
|
|
74
|
+
color: var(--mf-sel-input-placeholder-color);
|
|
45
75
|
}
|
|
46
|
-
.
|
|
76
|
+
.mf-select__wrapper .mf-select-single__inputplaceholder-wrapper .mf-select-single__control-searchbtn {
|
|
47
77
|
z-index: 5;
|
|
48
78
|
pointer-events: auto;
|
|
49
79
|
}
|
|
50
|
-
.
|
|
51
|
-
.
|
|
52
|
-
fill: var(--
|
|
80
|
+
.mf-select__wrapper .mf-select-single__inputplaceholder-wrapper .mf-select-single__control-searchbtn svg,
|
|
81
|
+
.mf-select__wrapper .mf-select-single__inputplaceholder-wrapper .mf-select-single__control-searchbtn path {
|
|
82
|
+
fill: var(--single-sel-searchbtn-fill);
|
|
53
83
|
}
|
|
54
|
-
.
|
|
55
|
-
.
|
|
56
|
-
fill: var(--
|
|
84
|
+
.mf-select__wrapper .mf-select-single__inputplaceholder-wrapper .mf-select-single__control-searchbtn:hover svg,
|
|
85
|
+
.mf-select__wrapper .mf-select-single__inputplaceholder-wrapper .mf-select-single__control-searchbtn:hover path {
|
|
86
|
+
fill: var(--single-sel-searchbtn-hover-fill);
|
|
57
87
|
}
|
|
58
|
-
.
|
|
88
|
+
.mf-select__wrapper .mf-select-single__inputplaceholder-wrapper .mf-select-single__inputplaceholder-inner {
|
|
89
|
+
display: inline-block;
|
|
59
90
|
position: relative;
|
|
91
|
+
width: 100%;
|
|
60
92
|
/* bootstrap style that match ".form-control" */
|
|
61
|
-
background-color: var(--
|
|
93
|
+
background-color: var(--mf-sel-control-wrapper-bg);
|
|
94
|
+
border: 1px solid var(--mf-sel-control-wrapper-border-color);
|
|
95
|
+
appearance: none;
|
|
96
|
+
border-radius: inherit;
|
|
97
|
+
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
|
|
98
|
+
}
|
|
99
|
+
.mf-select__wrapper .mf-select-single__inputplaceholder-wrapper .mf-select-single__inputplaceholder-inner > input {
|
|
100
|
+
padding: 0.32rem 0.75rem;
|
|
101
|
+
opacity: 0;
|
|
102
|
+
pointer-events: none;
|
|
103
|
+
}
|
|
104
|
+
.mf-select__wrapper .mf-select-multi__inputplaceholder-wrapper {
|
|
105
|
+
position: absolute;
|
|
106
|
+
top: 0;
|
|
107
|
+
width: 100%;
|
|
108
|
+
pointer-events: none;
|
|
109
|
+
}
|
|
110
|
+
.mf-select__wrapper .mf-select-multi__inputplaceholder-wrapper ul,
|
|
111
|
+
.mf-select__wrapper .mf-select-multi__inputplaceholder-wrapper li {
|
|
112
|
+
padding: 0;
|
|
113
|
+
margin: 0;
|
|
114
|
+
list-style: none;
|
|
115
|
+
}
|
|
116
|
+
.mf-select__wrapper .mf-select-multi__inputplaceholder-wrapper .mf-select-multi__inputplaceholder-inner > div {
|
|
117
|
+
position: relative;
|
|
118
|
+
/* bootstrap style that match ".form-control" */
|
|
119
|
+
background-color: var(--mf-sel-control-wrapper-bg);
|
|
62
120
|
background-clip: padding-box;
|
|
63
|
-
border: 1px solid var(--
|
|
121
|
+
border: 1px solid var(--mf-sel-control-wrapper-border-color);
|
|
64
122
|
appearance: none;
|
|
65
123
|
border-radius: 0.375rem;
|
|
66
124
|
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
|
|
67
125
|
padding-bottom: 1px;
|
|
68
126
|
}
|
|
69
|
-
.
|
|
127
|
+
.mf-select__wrapper .mf-select-multi__inputplaceholder-wrapper ul.mf-select-multi__list {
|
|
70
128
|
margin-right: 1rem;
|
|
71
129
|
}
|
|
72
|
-
.
|
|
130
|
+
.mf-select__wrapper .mf-select-multi__inputplaceholder-wrapper ul.mf-select-multi__list li {
|
|
73
131
|
display: inline-block;
|
|
74
132
|
margin: 5px;
|
|
75
133
|
margin-bottom: 0;
|
|
76
134
|
padding: 0.1rem 1.5rem 0.1rem 1rem;
|
|
77
135
|
font-size: 0.875rem;
|
|
78
|
-
background: var(--
|
|
136
|
+
background: var(--mf-sel-control-list-bg);
|
|
79
137
|
border-radius: 30px;
|
|
80
138
|
overflow: hidden;
|
|
81
139
|
text-overflow: ellipsis;
|
|
82
140
|
position: relative;
|
|
83
141
|
}
|
|
84
|
-
.
|
|
142
|
+
.mf-select__wrapper .mf-select-multi__inputplaceholder-wrapper ul.mf-select-multi__list li.mf-select-multi__list-item-placeholder {
|
|
85
143
|
background: transparent;
|
|
86
|
-
color: var(--
|
|
144
|
+
color: var(--mf-sel-placeholder-color);
|
|
87
145
|
padding-left: 0.75rem;
|
|
88
146
|
padding-right: 0;
|
|
89
147
|
margin-left: 0;
|
|
90
148
|
white-space: nowrap;
|
|
91
149
|
}
|
|
92
|
-
.
|
|
150
|
+
.mf-select__wrapper .mf-select-multi__inputplaceholder-wrapper ul.mf-select-multi__list li.mf-select-multi__list-item-placeholder.hide {
|
|
93
151
|
min-width: 100px;
|
|
94
152
|
}
|
|
95
|
-
.
|
|
153
|
+
.mf-select__wrapper .mf-select-multi__inputplaceholder-wrapper ul.mf-select-multi__list li > a {
|
|
96
154
|
font-weight: 400;
|
|
97
155
|
opacity: 0.6;
|
|
98
156
|
font-size: 18px;
|
|
@@ -102,115 +160,113 @@
|
|
|
102
160
|
top: 0;
|
|
103
161
|
pointer-events: auto;
|
|
104
162
|
}
|
|
105
|
-
.
|
|
106
|
-
fill: var(--
|
|
163
|
+
.mf-select__wrapper .mf-select-multi__inputplaceholder-wrapper ul.mf-select-multi__list li > a path {
|
|
164
|
+
fill: var(--mf-sel-removebtn-fill);
|
|
107
165
|
}
|
|
108
|
-
.
|
|
109
|
-
fill: var(--
|
|
166
|
+
.mf-select__wrapper .mf-select-multi__inputplaceholder-wrapper ul.mf-select-multi__list li > a:hover path {
|
|
167
|
+
fill: var(--mf-sel-removebtn-hover-fill);
|
|
110
168
|
}
|
|
111
|
-
.
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}
|
|
115
|
-
.multifunc-select__wrapper .multifunc-select-multi__wrapper .multifunc-select-multi__control-blinking-cursor.animated {
|
|
116
|
-
animation: 1s multi-sel-blink step-end infinite;
|
|
169
|
+
.mf-select__wrapper .mf-select-multi__control-searchbtn {
|
|
170
|
+
z-index: 5;
|
|
171
|
+
pointer-events: auto;
|
|
117
172
|
}
|
|
118
|
-
.
|
|
119
|
-
|
|
173
|
+
.mf-select__wrapper .mf-select-multi__control-searchbtn svg,
|
|
174
|
+
.mf-select__wrapper .mf-select-multi__control-searchbtn path {
|
|
175
|
+
fill: var(--mf-sel-searchbtn-fill);
|
|
120
176
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}
|
|
125
|
-
50% {
|
|
126
|
-
color: var(--multi-sel-placeholder-color);
|
|
127
|
-
}
|
|
177
|
+
.mf-select__wrapper .mf-select-multi__control-searchbtn:hover svg,
|
|
178
|
+
.mf-select__wrapper .mf-select-multi__control-searchbtn:hover path {
|
|
179
|
+
fill: var(--mf-sel-searchbtn-hover-fill);
|
|
128
180
|
}
|
|
129
|
-
.
|
|
181
|
+
.mf-select__wrapper [data-select]:focus {
|
|
130
182
|
cursor: text !important;
|
|
183
|
+
opacity: 0;
|
|
184
|
+
}
|
|
185
|
+
.mf-select__wrapper.active .list-group {
|
|
186
|
+
display: block;
|
|
131
187
|
}
|
|
132
|
-
.
|
|
133
|
-
box-shadow: var(--
|
|
134
|
-
border-color: var(--
|
|
188
|
+
.mf-select__wrapper.focus .mf-select-single__inputplaceholder-wrapper {
|
|
189
|
+
box-shadow: var(--mf-sel-focus-box-shadow);
|
|
190
|
+
border-color: var(--mf-sel-focus-border-color);
|
|
135
191
|
outline: 0;
|
|
136
192
|
}
|
|
137
|
-
.
|
|
138
|
-
|
|
193
|
+
.mf-select__wrapper.focus .mf-select-single__inputplaceholder-wrapper .mf-select-single__inputplaceholder-inner {
|
|
194
|
+
border-color: var(--mf-sel-focus-border-color);
|
|
139
195
|
}
|
|
140
|
-
.
|
|
141
|
-
box-shadow: var(--
|
|
142
|
-
border-color: var(--
|
|
196
|
+
.mf-select__wrapper.focus .mf-select-multi__inputplaceholder-inner > div {
|
|
197
|
+
box-shadow: var(--mf-sel-focus-box-shadow);
|
|
198
|
+
border-color: var(--mf-sel-focus-border-color);
|
|
143
199
|
outline: 0;
|
|
144
200
|
}
|
|
145
201
|
|
|
146
202
|
/*------ List ------*/
|
|
147
|
-
.
|
|
148
|
-
--
|
|
149
|
-
--
|
|
150
|
-
--
|
|
151
|
-
--
|
|
152
|
-
--
|
|
153
|
-
--
|
|
154
|
-
--
|
|
203
|
+
.mf-select__options-wrapper {
|
|
204
|
+
--mf-sel-listgroup-popwin-min-width: 200px;
|
|
205
|
+
--mf-sel-listgroup-tool-bg: rgb(248,249,250);
|
|
206
|
+
--mf-sel-listgroup-checkbox: #a5a5a5;
|
|
207
|
+
--mf-sel-listgroup-item-hover-focus-bg: rgba(0,0,0,.1);
|
|
208
|
+
--mf-sel-listgroup-content-scrollbar-color: rgba(0, 0, 0, 0.2);
|
|
209
|
+
--mf-sel-listgroup-content-scrollbar-track: rgba(0, 0, 0, 0);
|
|
210
|
+
--mf-sel-listgroup-content-scrollbar-w: 3px;
|
|
155
211
|
display: none;
|
|
156
|
-
min-width: var(--
|
|
212
|
+
min-width: var(--mf-sel-listgroup-popwin-min-width);
|
|
157
213
|
z-index: 1055; /* --bs-modal-zindex */
|
|
158
214
|
/*------ Multiple selection ------*/
|
|
159
215
|
}
|
|
160
|
-
.
|
|
216
|
+
.mf-select__options-wrapper.active {
|
|
161
217
|
display: block;
|
|
162
218
|
}
|
|
163
|
-
.
|
|
219
|
+
.mf-select__options-wrapper .mf-select__options-contentlist {
|
|
164
220
|
overflow: hidden;
|
|
165
221
|
overflow-y: auto;
|
|
166
222
|
}
|
|
167
|
-
.
|
|
223
|
+
.mf-select__options-wrapper .mf-select__options-contentlist.noscroll {
|
|
168
224
|
overflow-y: hidden;
|
|
169
225
|
}
|
|
170
|
-
.
|
|
171
|
-
height: var(--
|
|
172
|
-
width: var(--
|
|
226
|
+
.mf-select__options-wrapper .mf-select__options-contentlist::-webkit-scrollbar {
|
|
227
|
+
height: var(--mf-sel-listgroup-content-scrollbar-h);
|
|
228
|
+
width: var(--mf-sel-listgroup-content-scrollbar-w);
|
|
173
229
|
}
|
|
174
|
-
.
|
|
175
|
-
background: var(--
|
|
230
|
+
.mf-select__options-wrapper .mf-select__options-contentlist::-webkit-scrollbar-thumb {
|
|
231
|
+
background: var(--mf-sel-listgroup-content-scrollbar-color);
|
|
176
232
|
}
|
|
177
|
-
.
|
|
178
|
-
background: var(--
|
|
233
|
+
.mf-select__options-wrapper .mf-select__options-contentlist::-webkit-scrollbar-track {
|
|
234
|
+
background: var(--mf-sel-listgroup-content-scrollbar-track);
|
|
179
235
|
}
|
|
180
|
-
.
|
|
181
|
-
background-color: var(--
|
|
236
|
+
.mf-select__options-wrapper .bg-light {
|
|
237
|
+
background-color: var(--mf-sel-listgroup-tool-bg) !important;
|
|
182
238
|
}
|
|
183
|
-
.
|
|
239
|
+
.mf-select__options-wrapper .list-group-item.hide {
|
|
184
240
|
display: none;
|
|
185
241
|
}
|
|
186
|
-
.
|
|
242
|
+
.mf-select__options-wrapper .list-group-item .mf-select-multi__control-option-item--nomatch.hide {
|
|
187
243
|
display: none;
|
|
188
244
|
}
|
|
189
|
-
.
|
|
245
|
+
.mf-select__options-wrapper .list-group-item .mf-select-multi__control-option-checkbox-placeholder {
|
|
246
|
+
display: inline-block;
|
|
247
|
+
}
|
|
248
|
+
.mf-select__options-wrapper .list-group-item .mf-select-multi__control-option-checkbox-placeholder svg {
|
|
190
249
|
fill: transparent;
|
|
191
250
|
}
|
|
192
|
-
.
|
|
193
|
-
stroke: var(--
|
|
251
|
+
.mf-select__options-wrapper .list-group-item .mf-select-multi__control-option-checkbox-placeholder svg path {
|
|
252
|
+
stroke: var(--mf-sel-listgroup-checkbox);
|
|
194
253
|
}
|
|
195
|
-
.
|
|
196
|
-
display:
|
|
197
|
-
}
|
|
198
|
-
.multifunc-select__options-wrapper .list-group-item .multifunc-select-multi__control-option-checkbox svg {
|
|
199
|
-
fill: var(--multi-sel-listgroup-checkbox);
|
|
254
|
+
.mf-select__options-wrapper .list-group-item .mf-select-multi__control-option-checkbox-selected {
|
|
255
|
+
display: inline-block;
|
|
200
256
|
}
|
|
201
|
-
.
|
|
202
|
-
|
|
257
|
+
.mf-select__options-wrapper .list-group-item .mf-select-multi__control-option-checkbox-selected svg {
|
|
258
|
+
fill: var(--mf-sel-listgroup-checkbox);
|
|
203
259
|
}
|
|
204
|
-
.
|
|
205
|
-
|
|
260
|
+
.mf-select__options-wrapper .list-group-item .mf-select-multi__control-option-checkbox-selected svg path {
|
|
261
|
+
stroke: var(--mf-sel-listgroup-checkbox);
|
|
206
262
|
}
|
|
207
|
-
.
|
|
208
|
-
background-color: var(--
|
|
263
|
+
.mf-select__options-wrapper .list-group-item:hover, .mf-select__options-wrapper .list-group-item:focus {
|
|
264
|
+
background-color: var(--mf-sel-listgroup-item-hover-focus-bg);
|
|
209
265
|
}
|
|
210
|
-
.
|
|
266
|
+
.mf-select__options-wrapper .mf-select-multi__control-option-item--select-all.hide {
|
|
211
267
|
display: none !important;
|
|
212
268
|
}
|
|
213
|
-
.
|
|
269
|
+
.mf-select__options-wrapper .mf-select-multi__control-option-item--select-all .btn {
|
|
214
270
|
font-size: 0.75rem;
|
|
215
271
|
padding: 0.1rem 0.5rem;
|
|
216
272
|
}
|