@brightspace-ui/core 3.155.2 → 3.155.4
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.
@@ -3,7 +3,6 @@ import './filter-tags.js';
|
|
3
3
|
import { css, html, LitElement } from 'lit';
|
4
4
|
import { OVERFLOW_CLASS, OverflowGroupMixin } from '../overflow-group/overflow-group-mixin.js';
|
5
5
|
import { getUniqueId } from '../../helpers/uniqueId.js';
|
6
|
-
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
7
6
|
|
8
7
|
function createFilterItem(node) {
|
9
8
|
const dimensionSets = node.querySelectorAll('d2l-filter-dimension-set');
|
@@ -15,7 +14,7 @@ function createFilterItem(node) {
|
|
15
14
|
* A component that can be used to display a group of filters that will be put into an overflow filter when they no longer fit on the first line of their container
|
16
15
|
* @slot - d2l-filters to be added to the container
|
17
16
|
*/
|
18
|
-
class FilterOverflowGroup extends OverflowGroupMixin(
|
17
|
+
class FilterOverflowGroup extends OverflowGroupMixin(LitElement) {
|
19
18
|
|
20
19
|
static get properties() {
|
21
20
|
return {
|
@@ -31,11 +30,7 @@ class FilterOverflowGroup extends OverflowGroupMixin(RtlMixin(LitElement)) {
|
|
31
30
|
static get styles() {
|
32
31
|
return [super.styles, css`
|
33
32
|
::slotted(d2l-filter) {
|
34
|
-
margin-
|
35
|
-
}
|
36
|
-
:host([dir="rtl"]) ::slotted(d2l-filter) {
|
37
|
-
margin-left: 0.3rem;
|
38
|
-
margin-right: 0;
|
33
|
+
margin-inline-end: 0.3rem;
|
39
34
|
}
|
40
35
|
`];
|
41
36
|
}
|
@@ -32,7 +32,6 @@ import { getFlag } from '../../helpers/flags.js';
|
|
32
32
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
33
33
|
import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
|
34
34
|
import { offscreenStyles } from '../offscreen/offscreen.js';
|
35
|
-
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
36
35
|
import { SubscriberRegistryController } from '../../controllers/subscriber/subscriberControllers.js';
|
37
36
|
|
38
37
|
const ARROWLEFT_KEY_CODE = 37;
|
@@ -72,7 +71,7 @@ function addSpaceListener() {
|
|
72
71
|
* @fires d2l-filter-dimension-search - Dispatched when a dimension that supports searching and has the "manual" search-type is searched
|
73
72
|
* @fires d2l-filter-dimension-load-more - Dispatched when a dimension load more pager clicked
|
74
73
|
*/
|
75
|
-
class Filter extends FocusMixin(LocalizeCoreElement(
|
74
|
+
class Filter extends FocusMixin(LocalizeCoreElement(LitElement)) {
|
76
75
|
|
77
76
|
static get properties() {
|
78
77
|
return {
|
@@ -125,13 +124,7 @@ class Filter extends FocusMixin(LocalizeCoreElement(RtlMixin(LitElement))) {
|
|
125
124
|
|
126
125
|
d2l-input-search {
|
127
126
|
flex: 1 0;
|
128
|
-
margin-
|
129
|
-
margin-right: 0.6rem;
|
130
|
-
}
|
131
|
-
|
132
|
-
:host([dir="rtl"]) d2l-input-search {
|
133
|
-
margin-left: 0.6rem;
|
134
|
-
margin-right: 0.3rem;
|
127
|
+
margin-inline: 0.3rem 0.6rem;
|
135
128
|
}
|
136
129
|
|
137
130
|
.d2l-filter-dimension-select-all {
|
@@ -145,7 +138,7 @@ class Filter extends FocusMixin(LocalizeCoreElement(RtlMixin(LitElement))) {
|
|
145
138
|
|
146
139
|
.d2l-filter-dimension-header-text {
|
147
140
|
flex-grow: 1;
|
148
|
-
padding-
|
141
|
+
padding-inline-end: calc(2rem + 2px);
|
149
142
|
text-align: center;
|
150
143
|
${overflowClipEnabled ? overflowEllipsisDeclarations : css`
|
151
144
|
overflow: hidden;
|
@@ -153,10 +146,6 @@ class Filter extends FocusMixin(LocalizeCoreElement(RtlMixin(LitElement))) {
|
|
153
146
|
white-space: nowrap;
|
154
147
|
`}
|
155
148
|
}
|
156
|
-
:host([dir="rtl"]) .d2l-filter-dimension-header-text {
|
157
|
-
padding-left: calc(2rem + 2px);
|
158
|
-
padding-right: 0;
|
159
|
-
}
|
160
149
|
|
161
150
|
.d2l-filter-dimension-set-value {
|
162
151
|
align-items: center;
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import { getFirstFocusableDescendant, getLastFocusableDescendant, getNextFocusable, getPreviousFocusable } from '../../helpers/focus.js';
|
2
2
|
import { CollectionMixin } from '../../mixins/collection/collection-mixin.js';
|
3
3
|
import { isComposedAncestor } from '../../helpers/dom.js';
|
4
|
-
import { RtlMixin } from '../../mixins/rtl/rtl-mixin.js';
|
5
4
|
|
6
5
|
const keyCodes = {
|
7
6
|
DOWN: 40,
|
@@ -50,7 +49,7 @@ export class SelectionInfo {
|
|
50
49
|
|
51
50
|
}
|
52
51
|
|
53
|
-
export const SelectionMixin = superclass => class extends
|
52
|
+
export const SelectionMixin = superclass => class extends CollectionMixin(superclass) {
|
54
53
|
|
55
54
|
static get properties() {
|
56
55
|
return {
|
@@ -193,7 +192,8 @@ export const SelectionMixin = superclass => class extends RtlMixin(CollectionMix
|
|
193
192
|
}
|
194
193
|
};
|
195
194
|
|
196
|
-
const
|
195
|
+
const isRtl = (document.documentElement.getAttribute('dir') === 'rtl');
|
196
|
+
const forward = (!isRtl && e.keyCode === keyCodes.RIGHT) || (isRtl && e.keyCode === keyCodes.LEFT) || (e.keyCode === keyCodes.DOWN);
|
197
197
|
|
198
198
|
// first try to find next/previous selection-input relative to the event target within the selection component sub-tree that also belongs to the selection component
|
199
199
|
let focusable = forward ? getNextFocusable(target, false, true, true) : getPreviousFocusable(target, false, true, true);
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@brightspace-ui/core",
|
3
|
-
"version": "3.155.
|
3
|
+
"version": "3.155.4",
|
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",
|