@brightspace-ui/core 3.118.0 → 3.119.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/list/demo/list-nested.html +63 -1
- package/components/list/list-item-button-mixin.js +10 -1
- package/components/list/list-item-nav-button-mixin.js +124 -0
- package/components/list/list-item-nav-button.js +19 -0
- package/components/list/list.js +41 -1
- package/custom-elements.json +285 -0
- package/package.json +1 -1
@@ -10,10 +10,12 @@
|
|
10
10
|
import '../../demo/demo-page.js';
|
11
11
|
import '../../dropdown/dropdown-menu.js';
|
12
12
|
import '../../dropdown/dropdown-more.js';
|
13
|
+
import '../../icons/icon.js';
|
13
14
|
import '../list-item-button.js';
|
14
15
|
import '../list-item-content.js';
|
15
16
|
import './list-item-custom.js';
|
16
17
|
import '../list-item.js';
|
18
|
+
import '../list-item-nav-button.js';
|
17
19
|
import '../list-controls.js';
|
18
20
|
import '../list.js';
|
19
21
|
import '../../menu/menu.js';
|
@@ -21,6 +23,7 @@
|
|
21
23
|
import '../../paging/pager-load-more.js';
|
22
24
|
import '../../selection/selection-action.js';
|
23
25
|
import '../../switch/switch.js';
|
26
|
+
import '../../tooltip/tooltip-help.js';
|
24
27
|
|
25
28
|
import './demo-list-nested-iterations-helper.js';
|
26
29
|
</script>
|
@@ -29,7 +32,6 @@
|
|
29
32
|
|
30
33
|
<d2l-demo-page page-title="d2l-list (nested)">
|
31
34
|
|
32
|
-
|
33
35
|
<d2l-demo-snippet>
|
34
36
|
<template>
|
35
37
|
<d2l-list grid>
|
@@ -224,6 +226,66 @@
|
|
224
226
|
</template>
|
225
227
|
</d2l-demo-snippet>
|
226
228
|
|
229
|
+
<h2>Side nav item</h2>
|
230
|
+
|
231
|
+
<d2l-demo-snippet>
|
232
|
+
<template>
|
233
|
+
<d2l-list grid style="width: 334px;">
|
234
|
+
<d2l-list-item-nav-button key="L1-1" label="Welcome!" color="#006fbf" expandable expanded draggable>
|
235
|
+
<d2l-list-item-content>
|
236
|
+
<div>Welcome!</div>
|
237
|
+
</d2l-list-item-content>
|
238
|
+
<d2l-list slot="nested" grid>
|
239
|
+
<d2l-list-item-nav-button key="L2-1" label="Syallabus Confirmation" draggable>
|
240
|
+
<d2l-list-item-content>
|
241
|
+
<div><d2l-icon style="margin-right: 0.7rem;" icon="tier2:file-document"></d2l-icon>Syallabus Confirmation</div>
|
242
|
+
<div slot="secondary"><d2l-tooltip-help text="Due: May 2, 2023 at 2 pm">Due: May 2, 2023</d2l-tooltip-help></div>
|
243
|
+
</d2l-list-item-content>
|
244
|
+
</d2l-list-item-nav-button>
|
245
|
+
</d2l-list>
|
246
|
+
</d2l-list-item-nav-button>
|
247
|
+
<d2l-list-item-nav-button key="L2-2" label="Unit 1: Poetry" color="#29a6ff" expandable expanded draggable>
|
248
|
+
<d2l-list-item-content>
|
249
|
+
<div>Unit 1: Fiction</div>
|
250
|
+
<div slot="secondary"><d2l-tooltip-help text="Starts: May 2, 2023 at 2 pm">Starts: May 2, 2023</d2l-tooltip-help></div>
|
251
|
+
</d2l-list-item-content>
|
252
|
+
<d2l-list slot="nested" grid>
|
253
|
+
<d2l-list-item-nav-button key="L3-2" label="Fiction" draggable>
|
254
|
+
<d2l-list-item-content>
|
255
|
+
<div><d2l-icon style="margin-right: 0.7rem;" icon="tier2:file-document"></d2l-icon>Fiction</div>
|
256
|
+
</d2l-list-item-content>
|
257
|
+
</d2l-list-item-nav-button>
|
258
|
+
<d2l-list-item-nav-button key="L3-2" label="Ten rules for writing fiction" draggable>
|
259
|
+
<d2l-list-item-content>
|
260
|
+
<div><d2l-icon style="margin-right: 0.7rem;" icon="tier2:file-document"></d2l-icon>Ten rules for writing fiction</div>
|
261
|
+
</d2l-list-item-content>
|
262
|
+
</d2l-list-item-nav-button>
|
263
|
+
</d2l-list>
|
264
|
+
</d2l-list-item-nav-button>
|
265
|
+
</d2l-list>
|
266
|
+
<script>
|
267
|
+
(demo => {
|
268
|
+
let currentItem = document.querySelector('d2l-list-item-nav-button[current]');
|
269
|
+
demo.addEventListener('d2l-list-item-button-click', (e) => {
|
270
|
+
console.log('d2l-list-item-nav-button: click event');
|
271
|
+
|
272
|
+
if (!e.target.expandable) {
|
273
|
+
currentItem = e.target;
|
274
|
+
return;
|
275
|
+
}
|
276
|
+
|
277
|
+
if (currentItem !== e.target) {
|
278
|
+
e.target.expanded = true;
|
279
|
+
currentItem = e.target;
|
280
|
+
} else {
|
281
|
+
e.target.expanded = !e.target.expanded;
|
282
|
+
}
|
283
|
+
});
|
284
|
+
})(document.currentScript.parentNode);
|
285
|
+
</script>
|
286
|
+
</template>
|
287
|
+
</d2l-demo-snippet>
|
288
|
+
|
227
289
|
<h2>All Iterations</h2>
|
228
290
|
|
229
291
|
<d2l-demo-snippet full-width>
|
@@ -2,6 +2,7 @@ import '../colors/colors.js';
|
|
2
2
|
import { css, html, nothing } from 'lit';
|
3
3
|
import { isInteractiveInListItemComposedPath, ListItemMixin } from './list-item-mixin.js';
|
4
4
|
import { getUniqueId } from '../../helpers/uniqueId.js';
|
5
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
5
6
|
|
6
7
|
export const ListItemButtonMixin = superclass => class extends ListItemMixin(superclass) {
|
7
8
|
static get properties() {
|
@@ -10,7 +11,8 @@ export const ListItemButtonMixin = superclass => class extends ListItemMixin(sup
|
|
10
11
|
* Disables the primary action button
|
11
12
|
* @type {boolean}
|
12
13
|
*/
|
13
|
-
buttonDisabled : { type: Boolean, attribute: 'button-disabled', reflect: true }
|
14
|
+
buttonDisabled : { type: Boolean, attribute: 'button-disabled', reflect: true },
|
15
|
+
_ariaCurrent: { type: String }
|
14
16
|
};
|
15
17
|
}
|
16
18
|
|
@@ -75,6 +77,12 @@ export const ListItemButtonMixin = superclass => class extends ListItemMixin(sup
|
|
75
77
|
this.buttonDisabled = false;
|
76
78
|
}
|
77
79
|
|
80
|
+
firstUpdated(changedProperties) {
|
81
|
+
super.firstUpdated(changedProperties);
|
82
|
+
|
83
|
+
this._button = this.shadowRoot.querySelector(`#${this._primaryActionId}`);
|
84
|
+
}
|
85
|
+
|
78
86
|
willUpdate(changedProperties) {
|
79
87
|
super.willUpdate(changedProperties);
|
80
88
|
if (changedProperties.has('buttonDisabled') && this.buttonDisabled === true) this._hoveringPrimaryAction = false;
|
@@ -115,6 +123,7 @@ export const ListItemButtonMixin = superclass => class extends ListItemMixin(sup
|
|
115
123
|
_renderPrimaryAction(labelledBy, content) {
|
116
124
|
return html`<button
|
117
125
|
id="${this._primaryActionId}"
|
126
|
+
aria-current="${ifDefined(this._ariaCurrent)}"
|
118
127
|
aria-labelledby="${labelledBy}"
|
119
128
|
@click="${this._onButtonClick}"
|
120
129
|
@focusin="${this._onButtonFocus}"
|
@@ -0,0 +1,124 @@
|
|
1
|
+
import '../colors/colors.js';
|
2
|
+
import { css } from 'lit';
|
3
|
+
import { ListItemButtonMixin } from './list-item-button-mixin.js';
|
4
|
+
|
5
|
+
export const ListItemNavButtonMixin = superclass => class extends ListItemButtonMixin(superclass) {
|
6
|
+
|
7
|
+
static get properties() {
|
8
|
+
return {
|
9
|
+
/**
|
10
|
+
* Whether the list item is the current page in a navigation context
|
11
|
+
* @type {boolean}
|
12
|
+
*/
|
13
|
+
current: { type: Boolean, reflect: true },
|
14
|
+
_childCurrent: { type: Boolean, reflect: true, attribute: '_child-current' },
|
15
|
+
};
|
16
|
+
}
|
17
|
+
|
18
|
+
static get styles() {
|
19
|
+
|
20
|
+
const styles = [ css`
|
21
|
+
:host(:not([button-disabled])) {
|
22
|
+
--d2l-list-item-content-text-color: var(--d2l-color-ferrite);
|
23
|
+
}
|
24
|
+
.d2l-list-item-content ::slotted(*) {
|
25
|
+
width: 100%;
|
26
|
+
}
|
27
|
+
:host([current]) [slot="outside-control-container"] {
|
28
|
+
border: 3px solid var(--d2l-color-celestine);
|
29
|
+
margin-block: -1px;
|
30
|
+
}
|
31
|
+
:host([_focusing-primary-action]:not([current])) [slot="outside-control-container"] {
|
32
|
+
border: 2px solid var(--d2l-color-celestine);
|
33
|
+
}
|
34
|
+
:host([current]) [slot="control-container"]::before,
|
35
|
+
:host([current]) [slot="control-container"]::after {
|
36
|
+
border-color: transparent;
|
37
|
+
}
|
38
|
+
:host([_focusing-primary-action]) .d2l-list-item-content {
|
39
|
+
--d2l-list-item-content-text-outline: none;
|
40
|
+
}
|
41
|
+
:host([_hovering-primary-action]) .d2l-list-item-content,
|
42
|
+
:host([_focusing-primary-action]) .d2l-list-item-content {
|
43
|
+
--d2l-list-item-content-text-color: var(--d2l-color-ferrite);
|
44
|
+
--d2l-list-item-content-text-decoration: none;
|
45
|
+
}
|
46
|
+
|
47
|
+
` ];
|
48
|
+
|
49
|
+
super.styles && styles.unshift(super.styles);
|
50
|
+
return styles;
|
51
|
+
}
|
52
|
+
|
53
|
+
constructor() {
|
54
|
+
super();
|
55
|
+
this.current = false;
|
56
|
+
this._childCurrent = false;
|
57
|
+
}
|
58
|
+
|
59
|
+
connectedCallback() {
|
60
|
+
super.connectedCallback();
|
61
|
+
this.addEventListener('d2l-list-item-nav-set-child-current', this.#setChildCurrent);
|
62
|
+
}
|
63
|
+
|
64
|
+
disconnectedCallback() {
|
65
|
+
super.disconnectedCallback();
|
66
|
+
this.removeEventListener('d2l-list-item-nav-set-child-current', this.#setChildCurrent);
|
67
|
+
}
|
68
|
+
|
69
|
+
firstUpdated(changedProperties) {
|
70
|
+
super.firstUpdated(changedProperties);
|
71
|
+
|
72
|
+
if (this.current) {
|
73
|
+
this.dispatchSetChildCurrentEvent(true);
|
74
|
+
}
|
75
|
+
}
|
76
|
+
|
77
|
+
updated(changedProperties) {
|
78
|
+
super.updated(changedProperties);
|
79
|
+
if (changedProperties.get('current') !== undefined) {
|
80
|
+
/** @ignore */
|
81
|
+
this.dispatchEvent(new CustomEvent('d2l-list-item-property-change', { bubbles: true, composed: true, detail: { name: 'current', value: this.current } }));
|
82
|
+
}
|
83
|
+
}
|
84
|
+
|
85
|
+
willUpdate(changedProperties) {
|
86
|
+
super.willUpdate(changedProperties);
|
87
|
+
if (changedProperties.has('current') || changedProperties.has('_childCurrent')) {
|
88
|
+
if (this.current) {
|
89
|
+
this.#setAriaCurrent('page');
|
90
|
+
} else if (this._childCurrent) {
|
91
|
+
this.#setAriaCurrent('location');
|
92
|
+
} else {
|
93
|
+
this.#setAriaCurrent(undefined);
|
94
|
+
}
|
95
|
+
}
|
96
|
+
}
|
97
|
+
|
98
|
+
/**
|
99
|
+
* Internal. Do not use.
|
100
|
+
*/
|
101
|
+
dispatchSetChildCurrentEvent(val) {
|
102
|
+
/** @ignore */
|
103
|
+
this.dispatchEvent(new CustomEvent('d2l-list-item-nav-set-child-current', { bubbles: true, composed: true, detail: { value: val } }));
|
104
|
+
}
|
105
|
+
|
106
|
+
_onButtonClick(e) {
|
107
|
+
if (!this._getDescendantClicked(e)) {
|
108
|
+
this.current = true;
|
109
|
+
this._childCurrent = false;
|
110
|
+
}
|
111
|
+
super._onButtonClick(e);
|
112
|
+
}
|
113
|
+
|
114
|
+
#setAriaCurrent(val) {
|
115
|
+
this._ariaCurrent = val;
|
116
|
+
}
|
117
|
+
|
118
|
+
async #setChildCurrent(e) {
|
119
|
+
await this.updateComplete; // ensure button exists
|
120
|
+
if (e.target === this) return;
|
121
|
+
this._childCurrent = e.detail.value;
|
122
|
+
}
|
123
|
+
|
124
|
+
};
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { ListItemNavButtonMixin } from './list-item-nav-button-mixin.js';
|
2
|
+
import { LitElement } from 'lit';
|
3
|
+
|
4
|
+
/**
|
5
|
+
* A component for a "listitem" child within a list. It provides semantics, basic layout, breakpoints for responsiveness, a link for navigation, and selection.
|
6
|
+
* @slot - Default content placed inside of the component
|
7
|
+
* @slot illustration - Image associated with the list item located at the left of the item
|
8
|
+
* @slot actions - Actions (e.g., button icons) associated with the listen item located at the right of the item
|
9
|
+
* @slot nested - Nested d2l-list element
|
10
|
+
*/
|
11
|
+
class ListItemNavButton extends ListItemNavButtonMixin(LitElement) {
|
12
|
+
|
13
|
+
render() {
|
14
|
+
return this._renderListItem();
|
15
|
+
}
|
16
|
+
|
17
|
+
}
|
18
|
+
|
19
|
+
customElements.define('d2l-list-item-nav-button', ListItemNavButton);
|
package/components/list/list.js
CHANGED
@@ -370,8 +370,8 @@ class List extends PageableMixin(SelectionMixin(LitElement)) {
|
|
370
370
|
}
|
371
371
|
|
372
372
|
_handleListItemPropertyChange(e) {
|
373
|
-
e.stopPropagation();
|
374
373
|
if (e.detail.name === 'color') {
|
374
|
+
e.stopPropagation();
|
375
375
|
if (e.detail.value) {
|
376
376
|
this._childHasColor = true;
|
377
377
|
this._listChildrenUpdatedSubscribers.updateSubscribers();
|
@@ -379,6 +379,46 @@ class List extends PageableMixin(SelectionMixin(LitElement)) {
|
|
379
379
|
// if color has had its value removed then need to loop through all the items to determine if there are still others with colors
|
380
380
|
this._handleListItemNestedChange(e);
|
381
381
|
}
|
382
|
+
} else if (e.detail.name === 'current') {
|
383
|
+
if (this.slot === 'nested') return;
|
384
|
+
e.stopPropagation();
|
385
|
+
|
386
|
+
if (!e.detail.value) {
|
387
|
+
e.target.dispatchSetChildCurrentEvent(false);
|
388
|
+
return;
|
389
|
+
}
|
390
|
+
|
391
|
+
/**
|
392
|
+
* When a nav item is set to current, do the following:
|
393
|
+
* - If previous current item:
|
394
|
+
* - Set its current to FALSE
|
395
|
+
* - This triggers the d2l-list-item-nav-set-child-current with value of false, causing
|
396
|
+
* the previous current item to set its aria-current to undefined if it is not the current item
|
397
|
+
* - After the reset event has worked its way up OR if there is no previous current item:
|
398
|
+
* - Trigger the d2l-list-item-nav-set-child-current event with value of true, which sets all parent item aria-current to "location"
|
399
|
+
*/
|
400
|
+
const currentItems = this.querySelectorAll('[current]');
|
401
|
+
// length of 2 is fine as long as one is e.target and the other is the previous current item
|
402
|
+
if (currentItems.length > 2) {
|
403
|
+
console.warn('d2l-list: More than one list item has been set to current. This is not allowed and will cause unexpected behavior.');
|
404
|
+
}
|
405
|
+
const target = e.target;
|
406
|
+
|
407
|
+
let prevCurrent = false;
|
408
|
+
currentItems.forEach((item) => {
|
409
|
+
if (item === target) return;
|
410
|
+
prevCurrent = item;
|
411
|
+
});
|
412
|
+
|
413
|
+
if (prevCurrent) {
|
414
|
+
this.addEventListener('d2l-list-item-nav-set-child-current', (e) => {
|
415
|
+
e.stopPropagation();
|
416
|
+
target.dispatchSetChildCurrentEvent(true);
|
417
|
+
}, { once: true });
|
418
|
+
prevCurrent.current = false;
|
419
|
+
} else {
|
420
|
+
target.dispatchSetChildCurrentEvent(true);
|
421
|
+
}
|
382
422
|
}
|
383
423
|
}
|
384
424
|
|
package/custom-elements.json
CHANGED
@@ -9394,6 +9394,291 @@
|
|
9394
9394
|
}
|
9395
9395
|
]
|
9396
9396
|
},
|
9397
|
+
{
|
9398
|
+
"name": "d2l-list-item-nav-button",
|
9399
|
+
"path": "./components/list/list-item-nav-button.js",
|
9400
|
+
"description": "A component for a \"listitem\" child within a list. It provides semantics, basic layout, breakpoints for responsiveness, a link for navigation, and selection.",
|
9401
|
+
"attributes": [
|
9402
|
+
{
|
9403
|
+
"name": "current",
|
9404
|
+
"description": "Whether the list item is the current page in a navigation context",
|
9405
|
+
"type": "boolean",
|
9406
|
+
"default": "false"
|
9407
|
+
},
|
9408
|
+
{
|
9409
|
+
"name": "button-disabled",
|
9410
|
+
"description": "Disables the primary action button",
|
9411
|
+
"type": "boolean",
|
9412
|
+
"default": "false"
|
9413
|
+
},
|
9414
|
+
{
|
9415
|
+
"name": "drag-target-handle-only",
|
9416
|
+
"description": "Whether to allow the drag target to be the handle only rather than the entire cell",
|
9417
|
+
"type": "boolean"
|
9418
|
+
},
|
9419
|
+
{
|
9420
|
+
"name": "color",
|
9421
|
+
"description": "A color indicator to appear at the beginning of a list item. Expected value is a valid 3, 4, 6, or 8 character CSS color hex code (e.g., #006fbf).",
|
9422
|
+
"type": "string"
|
9423
|
+
},
|
9424
|
+
{
|
9425
|
+
"name": "no-primary-action",
|
9426
|
+
"description": "Whether to disable rendering the entire item as the primary action. Required if slotted content is interactive.",
|
9427
|
+
"type": "boolean",
|
9428
|
+
"default": "false"
|
9429
|
+
},
|
9430
|
+
{
|
9431
|
+
"name": "padding-type",
|
9432
|
+
"description": "How much padding to render list items with",
|
9433
|
+
"type": "'normal'|'none'",
|
9434
|
+
"default": "\"normal\""
|
9435
|
+
},
|
9436
|
+
{
|
9437
|
+
"name": "selectable",
|
9438
|
+
"description": "**Selection:** Indicates an input should be rendered for selecting the item",
|
9439
|
+
"type": "boolean",
|
9440
|
+
"default": "false"
|
9441
|
+
},
|
9442
|
+
{
|
9443
|
+
"name": "selected",
|
9444
|
+
"description": "**Selection:** Whether the item is selected",
|
9445
|
+
"type": "boolean",
|
9446
|
+
"default": "false"
|
9447
|
+
},
|
9448
|
+
{
|
9449
|
+
"name": "selection-disabled",
|
9450
|
+
"description": "**Selection:** Disables selection",
|
9451
|
+
"type": "boolean",
|
9452
|
+
"default": "false"
|
9453
|
+
},
|
9454
|
+
{
|
9455
|
+
"name": "drag-handle-text",
|
9456
|
+
"description": "**Drag & drop:** The drag-handle label for assistive technology. If implementing drag & drop, you should change this to dynamically announce what the drag-handle is moving for assistive technology in keyboard mode.",
|
9457
|
+
"type": "string"
|
9458
|
+
},
|
9459
|
+
{
|
9460
|
+
"name": "drop-text",
|
9461
|
+
"description": "**Drag & drop:** Text to drag and drop",
|
9462
|
+
"type": "string"
|
9463
|
+
},
|
9464
|
+
{
|
9465
|
+
"name": "key",
|
9466
|
+
"description": "**Selection:** Value to identify item if selectable",
|
9467
|
+
"type": "string"
|
9468
|
+
},
|
9469
|
+
{
|
9470
|
+
"name": "draggable",
|
9471
|
+
"description": "**Drag & drop:** Whether the item is draggable",
|
9472
|
+
"type": "boolean",
|
9473
|
+
"default": "false"
|
9474
|
+
},
|
9475
|
+
{
|
9476
|
+
"name": "drop-nested",
|
9477
|
+
"description": "**Drag & drop:** Whether nested items can be dropped on this item",
|
9478
|
+
"type": "boolean",
|
9479
|
+
"default": "false"
|
9480
|
+
},
|
9481
|
+
{
|
9482
|
+
"name": "expandable",
|
9483
|
+
"description": "Whether to show the expand collapse toggle",
|
9484
|
+
"type": "boolean"
|
9485
|
+
},
|
9486
|
+
{
|
9487
|
+
"name": "expanded",
|
9488
|
+
"description": "Default state for expand collapse toggle - if not set, collapsed will be the default state",
|
9489
|
+
"type": "boolean"
|
9490
|
+
},
|
9491
|
+
{
|
9492
|
+
"name": "skeleton",
|
9493
|
+
"description": "Render the component as a [skeleton loader](https://github.com/BrightspaceUI/core/tree/main/components/skeleton).",
|
9494
|
+
"type": "boolean"
|
9495
|
+
},
|
9496
|
+
{
|
9497
|
+
"name": "labelled-by",
|
9498
|
+
"description": "ACCESSIBILITY: The id of element that provides the label for this element. Use when another visible element should act as the label.",
|
9499
|
+
"type": "string"
|
9500
|
+
},
|
9501
|
+
{
|
9502
|
+
"name": "label",
|
9503
|
+
"description": "ACCESSIBILITY: REQUIRED: Explicitly defined label for the element",
|
9504
|
+
"type": "string"
|
9505
|
+
}
|
9506
|
+
],
|
9507
|
+
"properties": [
|
9508
|
+
{
|
9509
|
+
"name": "current",
|
9510
|
+
"attribute": "current",
|
9511
|
+
"description": "Whether the list item is the current page in a navigation context",
|
9512
|
+
"type": "boolean",
|
9513
|
+
"default": "false"
|
9514
|
+
},
|
9515
|
+
{
|
9516
|
+
"name": "buttonDisabled",
|
9517
|
+
"attribute": "button-disabled",
|
9518
|
+
"description": "Disables the primary action button",
|
9519
|
+
"type": "boolean",
|
9520
|
+
"default": "false"
|
9521
|
+
},
|
9522
|
+
{
|
9523
|
+
"name": "dragTargetHandleOnly",
|
9524
|
+
"attribute": "drag-target-handle-only",
|
9525
|
+
"description": "Whether to allow the drag target to be the handle only rather than the entire cell",
|
9526
|
+
"type": "boolean"
|
9527
|
+
},
|
9528
|
+
{
|
9529
|
+
"name": "color",
|
9530
|
+
"attribute": "color",
|
9531
|
+
"description": "A color indicator to appear at the beginning of a list item. Expected value is a valid 3, 4, 6, or 8 character CSS color hex code (e.g., #006fbf).",
|
9532
|
+
"type": "string"
|
9533
|
+
},
|
9534
|
+
{
|
9535
|
+
"name": "first",
|
9536
|
+
"type": "boolean",
|
9537
|
+
"default": "false"
|
9538
|
+
},
|
9539
|
+
{
|
9540
|
+
"name": "noPrimaryAction",
|
9541
|
+
"attribute": "no-primary-action",
|
9542
|
+
"description": "Whether to disable rendering the entire item as the primary action. Required if slotted content is interactive.",
|
9543
|
+
"type": "boolean",
|
9544
|
+
"default": "false"
|
9545
|
+
},
|
9546
|
+
{
|
9547
|
+
"name": "paddingType",
|
9548
|
+
"attribute": "padding-type",
|
9549
|
+
"description": "How much padding to render list items with",
|
9550
|
+
"type": "'normal'|'none'",
|
9551
|
+
"default": "\"normal\""
|
9552
|
+
},
|
9553
|
+
{
|
9554
|
+
"name": "selectable",
|
9555
|
+
"attribute": "selectable",
|
9556
|
+
"description": "**Selection:** Indicates an input should be rendered for selecting the item",
|
9557
|
+
"type": "boolean",
|
9558
|
+
"default": "false"
|
9559
|
+
},
|
9560
|
+
{
|
9561
|
+
"name": "selected",
|
9562
|
+
"attribute": "selected",
|
9563
|
+
"description": "**Selection:** Whether the item is selected",
|
9564
|
+
"type": "boolean",
|
9565
|
+
"default": "false"
|
9566
|
+
},
|
9567
|
+
{
|
9568
|
+
"name": "selectionDisabled",
|
9569
|
+
"attribute": "selection-disabled",
|
9570
|
+
"description": "**Selection:** Disables selection",
|
9571
|
+
"type": "boolean",
|
9572
|
+
"default": "false"
|
9573
|
+
},
|
9574
|
+
{
|
9575
|
+
"name": "selectionInfo"
|
9576
|
+
},
|
9577
|
+
{
|
9578
|
+
"name": "dragHandleText",
|
9579
|
+
"attribute": "drag-handle-text",
|
9580
|
+
"description": "**Drag & drop:** The drag-handle label for assistive technology. If implementing drag & drop, you should change this to dynamically announce what the drag-handle is moving for assistive technology in keyboard mode.",
|
9581
|
+
"type": "string"
|
9582
|
+
},
|
9583
|
+
{
|
9584
|
+
"name": "dropText",
|
9585
|
+
"attribute": "drop-text",
|
9586
|
+
"description": "**Drag & drop:** Text to drag and drop",
|
9587
|
+
"type": "string"
|
9588
|
+
},
|
9589
|
+
{
|
9590
|
+
"name": "key",
|
9591
|
+
"attribute": "key",
|
9592
|
+
"description": "**Selection:** Value to identify item if selectable",
|
9593
|
+
"type": "string"
|
9594
|
+
},
|
9595
|
+
{
|
9596
|
+
"name": "draggable",
|
9597
|
+
"attribute": "draggable",
|
9598
|
+
"description": "**Drag & drop:** Whether the item is draggable",
|
9599
|
+
"type": "boolean",
|
9600
|
+
"default": "false"
|
9601
|
+
},
|
9602
|
+
{
|
9603
|
+
"name": "dropNested",
|
9604
|
+
"attribute": "drop-nested",
|
9605
|
+
"description": "**Drag & drop:** Whether nested items can be dropped on this item",
|
9606
|
+
"type": "boolean",
|
9607
|
+
"default": "false"
|
9608
|
+
},
|
9609
|
+
{
|
9610
|
+
"name": "expandable",
|
9611
|
+
"attribute": "expandable",
|
9612
|
+
"description": "Whether to show the expand collapse toggle",
|
9613
|
+
"type": "boolean"
|
9614
|
+
},
|
9615
|
+
{
|
9616
|
+
"name": "expanded",
|
9617
|
+
"attribute": "expanded",
|
9618
|
+
"description": "Default state for expand collapse toggle - if not set, collapsed will be the default state",
|
9619
|
+
"type": "boolean"
|
9620
|
+
},
|
9621
|
+
{
|
9622
|
+
"name": "skeleton",
|
9623
|
+
"attribute": "skeleton",
|
9624
|
+
"description": "Render the component as a [skeleton loader](https://github.com/BrightspaceUI/core/tree/main/components/skeleton).",
|
9625
|
+
"type": "boolean"
|
9626
|
+
},
|
9627
|
+
{
|
9628
|
+
"name": "labelledBy",
|
9629
|
+
"attribute": "labelled-by",
|
9630
|
+
"description": "ACCESSIBILITY: The id of element that provides the label for this element. Use when another visible element should act as the label.",
|
9631
|
+
"type": "string"
|
9632
|
+
},
|
9633
|
+
{
|
9634
|
+
"name": "label",
|
9635
|
+
"attribute": "label",
|
9636
|
+
"description": "ACCESSIBILITY: REQUIRED: Explicitly defined label for the element",
|
9637
|
+
"type": "string"
|
9638
|
+
},
|
9639
|
+
{
|
9640
|
+
"name": "labelRequired",
|
9641
|
+
"type": "boolean",
|
9642
|
+
"default": "true"
|
9643
|
+
}
|
9644
|
+
],
|
9645
|
+
"events": [
|
9646
|
+
{
|
9647
|
+
"name": "d2l-list-item-button-click",
|
9648
|
+
"description": "Dispatched when the item's primary button action is clicked"
|
9649
|
+
},
|
9650
|
+
{
|
9651
|
+
"name": "d2l-list-item-selected",
|
9652
|
+
"description": "Dispatched when the component item is selected"
|
9653
|
+
},
|
9654
|
+
{
|
9655
|
+
"name": "d2l-list-item-position-change",
|
9656
|
+
"description": "Dispatched when a draggable list item's position changes in the list. See [Event Details: d2l-list-item-position-change](#event-details%3A-d2l-list-item-position-change)."
|
9657
|
+
},
|
9658
|
+
{
|
9659
|
+
"name": "d2l-list-item-expand-collapse-toggled",
|
9660
|
+
"description": "Dispatched whenever the list item expand state is toggled."
|
9661
|
+
}
|
9662
|
+
],
|
9663
|
+
"slots": [
|
9664
|
+
{
|
9665
|
+
"name": "",
|
9666
|
+
"description": "Default content placed inside of the component"
|
9667
|
+
},
|
9668
|
+
{
|
9669
|
+
"name": "illustration",
|
9670
|
+
"description": "Image associated with the list item located at the left of the item"
|
9671
|
+
},
|
9672
|
+
{
|
9673
|
+
"name": "actions",
|
9674
|
+
"description": "Actions (e.g., button icons) associated with the listen item located at the right of the item"
|
9675
|
+
},
|
9676
|
+
{
|
9677
|
+
"name": "nested",
|
9678
|
+
"description": "Nested d2l-list element"
|
9679
|
+
}
|
9680
|
+
]
|
9681
|
+
},
|
9397
9682
|
{
|
9398
9683
|
"name": "d2l-list-item-placement-marker",
|
9399
9684
|
"path": "./components/list/list-item-placement-marker.js"
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@brightspace-ui/core",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.119.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",
|