@brightspace-ui/core 3.5.0 → 3.5.1
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/list/list.js
CHANGED
@@ -225,6 +225,9 @@ class List extends PageableMixin(SelectionMixin(LitElement)) {
|
|
225
225
|
if (changedProperties.has('add-button') || changedProperties.has('add-button-text')) {
|
226
226
|
this._listChildrenUpdatedSubscribers.updateSubscribers();
|
227
227
|
}
|
228
|
+
if (changedProperties.has('grid') && this.grid) {
|
229
|
+
this.selectionNoInputArrowKeyBehaviour = true;
|
230
|
+
}
|
228
231
|
}
|
229
232
|
|
230
233
|
getItems(slot) {
|
@@ -42,6 +42,10 @@ export const SelectionMixin = superclass => class extends RtlMixin(CollectionMix
|
|
42
42
|
|
43
43
|
static get properties() {
|
44
44
|
return {
|
45
|
+
/**
|
46
|
+
* @ignore
|
47
|
+
*/
|
48
|
+
selectionNoInputArrowKeyBehaviour: { type: Boolean, attribute: 'selection-no-input-arrow-key-behavior' },
|
45
49
|
/**
|
46
50
|
* Whether to render with single selection behaviour. If `selection-single` is specified, the nested `d2l-selection-input` elements will render radios instead of checkboxes, and the selection component will maintain a single selected item.
|
47
51
|
* @type {boolean}
|
@@ -52,6 +56,7 @@ export const SelectionMixin = superclass => class extends RtlMixin(CollectionMix
|
|
52
56
|
|
53
57
|
constructor() {
|
54
58
|
super();
|
59
|
+
this.selectionNoInputArrowKeyBehaviour = false;
|
55
60
|
this.selectionSingle = false;
|
56
61
|
this._selectAllPages = false;
|
57
62
|
this._selectionObservers = new Map();
|
@@ -153,7 +158,7 @@ export const SelectionMixin = superclass => class extends RtlMixin(CollectionMix
|
|
153
158
|
const target = e.composedPath()[0];
|
154
159
|
|
155
160
|
// check composed path for radio (e.target could be d2l-list-item or other element due to retargeting)
|
156
|
-
if (!target.classList.contains('d2l-selection-input-radio')) return;
|
161
|
+
if (!target.classList.contains('d2l-selection-input-radio') || this.selectionNoInputArrowKeyBehaviour) return;
|
157
162
|
if (e.keyCode < keyCodes.LEFT || e.keyCode > keyCodes.DOWN) return;
|
158
163
|
|
159
164
|
const getSelectionInput = (focusable, forward) => {
|
package/custom-elements.json
CHANGED
@@ -9282,6 +9282,11 @@
|
|
9282
9282
|
"description": "Total number of items. If not specified, features like select-all-pages will be disabled.",
|
9283
9283
|
"type": "number"
|
9284
9284
|
},
|
9285
|
+
{
|
9286
|
+
"name": "selectionNoInputArrowKeyBehaviour",
|
9287
|
+
"type": "boolean",
|
9288
|
+
"default": "false"
|
9289
|
+
},
|
9285
9290
|
{
|
9286
9291
|
"name": "selectionSingle",
|
9287
9292
|
"attribute": "selection-single",
|
@@ -10617,6 +10622,11 @@
|
|
10617
10622
|
}
|
10618
10623
|
],
|
10619
10624
|
"properties": [
|
10625
|
+
{
|
10626
|
+
"name": "selectionNoInputArrowKeyBehaviour",
|
10627
|
+
"type": "boolean",
|
10628
|
+
"default": "false"
|
10629
|
+
},
|
10620
10630
|
{
|
10621
10631
|
"name": "selectionSingle",
|
10622
10632
|
"attribute": "selection-single",
|
@@ -10662,6 +10672,11 @@
|
|
10662
10672
|
}
|
10663
10673
|
],
|
10664
10674
|
"properties": [
|
10675
|
+
{
|
10676
|
+
"name": "selectionNoInputArrowKeyBehaviour",
|
10677
|
+
"type": "boolean",
|
10678
|
+
"default": "false"
|
10679
|
+
},
|
10665
10680
|
{
|
10666
10681
|
"name": "selectionSingle",
|
10667
10682
|
"attribute": "selection-single",
|
@@ -11314,6 +11329,11 @@
|
|
11314
11329
|
}
|
11315
11330
|
],
|
11316
11331
|
"properties": [
|
11332
|
+
{
|
11333
|
+
"name": "selectionNoInputArrowKeyBehaviour",
|
11334
|
+
"type": "boolean",
|
11335
|
+
"default": "false"
|
11336
|
+
},
|
11317
11337
|
{
|
11318
11338
|
"name": "selectionSingle",
|
11319
11339
|
"attribute": "selection-single",
|
@@ -11413,6 +11433,11 @@
|
|
11413
11433
|
}
|
11414
11434
|
],
|
11415
11435
|
"properties": [
|
11436
|
+
{
|
11437
|
+
"name": "selectionNoInputArrowKeyBehaviour",
|
11438
|
+
"type": "boolean",
|
11439
|
+
"default": "false"
|
11440
|
+
},
|
11416
11441
|
{
|
11417
11442
|
"name": "selectionSingle",
|
11418
11443
|
"attribute": "selection-single",
|
@@ -11997,6 +12022,11 @@
|
|
11997
12022
|
"description": "Total number of items. If not specified, features like select-all-pages will be disabled.",
|
11998
12023
|
"type": "number"
|
11999
12024
|
},
|
12025
|
+
{
|
12026
|
+
"name": "selectionNoInputArrowKeyBehaviour",
|
12027
|
+
"type": "boolean",
|
12028
|
+
"default": "false"
|
12029
|
+
},
|
12000
12030
|
{
|
12001
12031
|
"name": "selectionSingle",
|
12002
12032
|
"attribute": "selection-single",
|
@@ -12353,6 +12383,11 @@
|
|
12353
12383
|
"description": "Total number of items. If not specified, features like select-all-pages will be disabled.",
|
12354
12384
|
"type": "number"
|
12355
12385
|
},
|
12386
|
+
{
|
12387
|
+
"name": "selectionNoInputArrowKeyBehaviour",
|
12388
|
+
"type": "boolean",
|
12389
|
+
"default": "false"
|
12390
|
+
},
|
12356
12391
|
{
|
12357
12392
|
"name": "selectionSingle",
|
12358
12393
|
"attribute": "selection-single",
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@brightspace-ui/core",
|
3
|
-
"version": "3.5.
|
3
|
+
"version": "3.5.1",
|
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",
|