@brightspace-ui/core 2.87.0 → 2.89.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.
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import '../colors/colors.js';
|
|
2
2
|
import '../icons/icon.js';
|
|
3
3
|
import '../tooltip/tooltip.js';
|
|
4
|
-
import { css, html, LitElement } from 'lit';
|
|
4
|
+
import { css, html, LitElement, unsafeCSS } from 'lit';
|
|
5
5
|
import { VisibleOnAncestorMixin, visibleOnAncestorStyles } from '../../mixins/visible-on-ancestor-mixin.js';
|
|
6
6
|
import { ButtonMixin } from './button-mixin.js';
|
|
7
7
|
import { buttonStyles } from './button-styles.js';
|
|
8
|
+
import { getFocusPseudoClass } from '../../helpers/focus.js';
|
|
8
9
|
import { getUniqueId } from '../../helpers/uniqueId.js';
|
|
9
10
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
10
11
|
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
@@ -116,7 +117,8 @@ class ButtonIcon extends ThemeMixin(ButtonMixin(VisibleOnAncestorMixin(RtlMixin(
|
|
|
116
117
|
--d2l-icon-fill-color: var(--d2l-button-icon-fill-color-hover, var(--d2l-color-tungsten));
|
|
117
118
|
background-color: var(--d2l-button-icon-background-color-hover);
|
|
118
119
|
}
|
|
119
|
-
button.focus-visible
|
|
120
|
+
button.focus-visible,
|
|
121
|
+
button:${unsafeCSS(getFocusPseudoClass())} {
|
|
120
122
|
box-shadow: var(--d2l-button-icon-focus-box-shadow);
|
|
121
123
|
}
|
|
122
124
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { FocusMixin } from '../../mixins/focus-mixin.js';
|
|
2
|
-
import { FocusVisiblePolyfillMixin } from '../../mixins/focus-visible-polyfill-mixin.js';
|
|
3
2
|
|
|
4
|
-
export const ButtonMixin = superclass => class extends FocusMixin(
|
|
3
|
+
export const ButtonMixin = superclass => class extends FocusMixin(superclass) {
|
|
5
4
|
|
|
6
5
|
static get properties() {
|
|
7
6
|
return {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import '../colors/colors.js';
|
|
2
|
-
import { css } from 'lit';
|
|
2
|
+
import { css, unsafeCSS } from 'lit';
|
|
3
|
+
import { getFocusPseudoClass } from '../../helpers/focus.js';
|
|
3
4
|
|
|
4
5
|
export const buttonStyles = css`
|
|
5
6
|
button {
|
|
@@ -21,10 +22,8 @@ export const buttonStyles = css`
|
|
|
21
22
|
white-space: nowrap;
|
|
22
23
|
width: auto;
|
|
23
24
|
}
|
|
24
|
-
/*
|
|
25
|
-
|
|
26
|
-
:host(:not([data-js-focus-visible])) button:focus,
|
|
27
|
-
button.focus-visible {
|
|
25
|
+
button.focus-visible, /* still required for when forceFocusVisible is used programatically */
|
|
26
|
+
button:${unsafeCSS(getFocusPseudoClass())} {
|
|
28
27
|
box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--d2l-color-celestine);
|
|
29
28
|
}
|
|
30
29
|
`;
|
|
@@ -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.89.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",
|