@brightspace-ui/core 2.87.0 → 2.88.0
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/components/filter/filter.js +20 -10
- package/package.json +1 -1
|
@@ -5,6 +5,7 @@ import '../button/button-subtle.js';
|
|
|
5
5
|
import '../dropdown/dropdown-button-subtle.js';
|
|
6
6
|
import '../dropdown/dropdown-content.js';
|
|
7
7
|
import '../dropdown/dropdown-menu.js';
|
|
8
|
+
import '../empty-state/empty-state-simple.js';
|
|
8
9
|
import '../hierarchical-view/hierarchical-view.js';
|
|
9
10
|
import '../inputs/input-search.js';
|
|
10
11
|
import '../list/list.js';
|
|
@@ -156,8 +157,12 @@ class Filter extends FocusMixin(LocalizeCoreElement(RtlMixin(LitElement))) {
|
|
|
156
157
|
padding: 0 1.5rem 1.5rem;
|
|
157
158
|
}
|
|
158
159
|
|
|
160
|
+
.d2l-empty-state-container {
|
|
161
|
+
padding: 0.9rem;
|
|
162
|
+
}
|
|
163
|
+
|
|
159
164
|
.d2l-filter-dimension-info-message {
|
|
160
|
-
|
|
165
|
+
color: var(--d2l-color-ferrite);
|
|
161
166
|
text-align: center;
|
|
162
167
|
}
|
|
163
168
|
|
|
@@ -283,7 +288,7 @@ class Filter extends FocusMixin(LocalizeCoreElement(RtlMixin(LitElement))) {
|
|
|
283
288
|
switch (dimension.type) {
|
|
284
289
|
case 'd2l-filter-dimension-set':
|
|
285
290
|
dimensionHTML = html`
|
|
286
|
-
<div
|
|
291
|
+
<div class="d2l-filter-container">
|
|
287
292
|
${this._createSetDimension(dimension)}
|
|
288
293
|
</div>`;
|
|
289
294
|
break;
|
|
@@ -416,9 +421,12 @@ class Filter extends FocusMixin(LocalizeCoreElement(RtlMixin(LitElement))) {
|
|
|
416
421
|
|
|
417
422
|
if (this._isDimensionEmpty(dimension)) {
|
|
418
423
|
return html`
|
|
419
|
-
<
|
|
420
|
-
|
|
421
|
-
|
|
424
|
+
<div class="d2l-empty-state-container" role="alert">
|
|
425
|
+
<d2l-empty-state-simple
|
|
426
|
+
class="d2l-filter-dimension-info-message"
|
|
427
|
+
description="${this.localize('components.filter.noFilters')}">
|
|
428
|
+
</d2l-empty-state-simple>
|
|
429
|
+
</div>
|
|
422
430
|
`;
|
|
423
431
|
}
|
|
424
432
|
|
|
@@ -426,15 +434,17 @@ class Filter extends FocusMixin(LocalizeCoreElement(RtlMixin(LitElement))) {
|
|
|
426
434
|
if (dimension.searchValue && dimension.searchValue !== '') {
|
|
427
435
|
const count = dimension.values.reduce((total, value) => { return !value.hidden ? total + 1 : total; }, 0);
|
|
428
436
|
const classes = {
|
|
429
|
-
'd2l-
|
|
430
|
-
'd2l-body-small': true,
|
|
437
|
+
'd2l-empty-state-container': true,
|
|
431
438
|
'd2l-offscreen': count !== 0
|
|
432
439
|
};
|
|
433
440
|
|
|
434
441
|
searchResults = html`
|
|
435
|
-
<
|
|
436
|
-
|
|
437
|
-
|
|
442
|
+
<div class="${classMap(classes)}" role="alert">
|
|
443
|
+
<d2l-empty-state-simple
|
|
444
|
+
class="d2l-filter-dimension-info-message"
|
|
445
|
+
description="${this.localize('components.filter.searchResults', { number: count })}">
|
|
446
|
+
</d2l-empty-state-simple>
|
|
447
|
+
</div>
|
|
438
448
|
`;
|
|
439
449
|
|
|
440
450
|
if (count === 0) return searchResults;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightspace-ui/core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.88.0",
|
|
4
4
|
"description": "A collection of accessible, free, open-source web components for building Brightspace applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": "https://github.com/BrightspaceUI/core.git",
|