@internetstiftelsen/styleguide 4.1.4 → 4.1.6
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.
|
@@ -31,7 +31,12 @@ var MultiSelect = function () {
|
|
|
31
31
|
|
|
32
32
|
var suggestions = _this.filterData(value);
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
if (suggestions.length) {
|
|
35
|
+
_this.populateSuggestions(suggestions);
|
|
36
|
+
} else {
|
|
37
|
+
_this.clearSuggestions();
|
|
38
|
+
}
|
|
39
|
+
|
|
35
40
|
_this.resetFocus();
|
|
36
41
|
};
|
|
37
42
|
|
|
@@ -105,6 +110,7 @@ var MultiSelect = function () {
|
|
|
105
110
|
}, {
|
|
106
111
|
key: 'clearSuggestions',
|
|
107
112
|
value: function clearSuggestions() {
|
|
113
|
+
this.input.setAttribute('aria-expanded', 'false');
|
|
108
114
|
this.suggestionsBox.innerHTML = '';
|
|
109
115
|
}
|
|
110
116
|
}, {
|
|
@@ -157,6 +163,10 @@ var MultiSelect = function () {
|
|
|
157
163
|
this.suggestionsBox.innerHTML = suggestions.map(function (item) {
|
|
158
164
|
return '<button class=\'' + cls + '\' tabindex=\'0\' value="' + item.value + '">' + item.name + '</button>';
|
|
159
165
|
}).join('');
|
|
166
|
+
|
|
167
|
+
if (this.suggestionsBox.innerHTML) {
|
|
168
|
+
this.input.setAttribute('aria-expanded', 'true');
|
|
169
|
+
}
|
|
160
170
|
}
|
|
161
171
|
}, {
|
|
162
172
|
key: 'removeItem',
|
package/package.json
CHANGED
|
@@ -2,28 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
@include organism(schedule-filter) {
|
|
4
4
|
margin-bottom: rhythm(2);
|
|
5
|
-
position: sticky;
|
|
6
|
-
top: -1px;
|
|
7
|
-
padding-top: 1px;
|
|
8
5
|
background-color: $color-ash;
|
|
9
6
|
z-index: z_index(foregroundMinus);
|
|
10
7
|
transition: box-shadow 0.25s ease, border-width 0.25s ease, background-color 0.25s ease;
|
|
11
8
|
|
|
12
|
-
&.is-sticky {
|
|
13
|
-
border-bottom: 1px solid $color-concrete;
|
|
14
|
-
margin-left: -#{$grid-gutter-width};
|
|
15
|
-
margin-right: -#{$grid-gutter-width};
|
|
16
|
-
padding-left: $grid-gutter-width;
|
|
17
|
-
padding-right: $grid-gutter-width;
|
|
18
|
-
background-color: $color-snow;
|
|
19
|
-
@extend %box-shadow;
|
|
20
|
-
|
|
21
|
-
@include bp-up(xxl) {
|
|
22
|
-
border-bottom-left-radius: $border-radius;
|
|
23
|
-
border-bottom-right-radius: $border-radius;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
9
|
@include e(button) {
|
|
28
10
|
font-size: $size-base;
|
|
29
11
|
|