@brightspace-ui/core 2.85.4 → 2.85.6
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.
|
@@ -175,7 +175,7 @@ If a `d2l-list-item` is selectable then it should have a `label` attribute that
|
|
|
175
175
|
</script>
|
|
176
176
|
|
|
177
177
|
<d2l-list>
|
|
178
|
-
<d2l-list-controls slot="controls">
|
|
178
|
+
<d2l-list-controls slot="controls" no-sticky>
|
|
179
179
|
<d2l-selection-action icon="tier1:delete" text="Delete" requires-selection></d2l-selection-action>
|
|
180
180
|
</d2l-list-controls>
|
|
181
181
|
<d2l-list-item selectable key="eth" label="Earth Sciences">
|
|
@@ -329,7 +329,7 @@ If an item is draggable, the `drag-handle-text` attribute should be used to prov
|
|
|
329
329
|
|
|
330
330
|
The `d2l-list-controls` component can be placed in the `d2l-list`'s `controls` slot to provide a select-all checkbox, summary, a slot for `d2l-selection-action`s, and overflow-group behaviour.
|
|
331
331
|
|
|
332
|
-
<!-- docs: demo live name:d2l-list-controls display:block autoSize:false size:
|
|
332
|
+
<!-- docs: demo live name:d2l-list-controls display:block autoSize:false size:small -->
|
|
333
333
|
```html
|
|
334
334
|
<script type="module">
|
|
335
335
|
import '@brightspace-ui/core/components/list/list.js';
|
|
@@ -338,6 +338,14 @@ The `d2l-list-controls` component can be placed in the `d2l-list`'s `controls` s
|
|
|
338
338
|
import '@brightspace-ui/core/components/list/list-item-content.js';
|
|
339
339
|
import '@brightspace-ui/core/components/selection/selection-action.js';
|
|
340
340
|
</script>
|
|
341
|
+
<!-- docs: start hidden content -->
|
|
342
|
+
<style>
|
|
343
|
+
#demo-element {
|
|
344
|
+
margin-bottom: 300px;
|
|
345
|
+
margin-top: 0;
|
|
346
|
+
}
|
|
347
|
+
</style>
|
|
348
|
+
<!-- docs: end hidden content -->
|
|
341
349
|
|
|
342
350
|
<d2l-list>
|
|
343
351
|
<d2l-list-controls slot="controls">
|
|
@@ -64,7 +64,7 @@ The `SelectionMixin` defines the `selection-single` attribute that consumers can
|
|
|
64
64
|
</style>
|
|
65
65
|
<!-- docs: end hidden content -->
|
|
66
66
|
<d2l-demo-selection>
|
|
67
|
-
<d2l-selection-controls>
|
|
67
|
+
<d2l-selection-controls no-sticky>
|
|
68
68
|
<d2l-selection-action text="Bookmark" icon="tier1:bookmark-hollow" requires-selection></d2l-selection-action>
|
|
69
69
|
<d2l-selection-action text="Settings" icon="tier1:gear"></d2l-selection-action>
|
|
70
70
|
</d2l-selection-controls>
|
|
@@ -436,7 +436,7 @@ The `d2l-selection-controls` provides a standardized wrapper to display selectio
|
|
|
436
436
|
|
|
437
437
|
When using lists, use the list-specific `d2l-list-controls` instead, which extends this component's behaviour.
|
|
438
438
|
|
|
439
|
-
<!-- docs: demo live name:d2l-selection-controls display:block -->
|
|
439
|
+
<!-- docs: demo live name:d2l-selection-controls display:block autoSize:false size:small -->
|
|
440
440
|
```html
|
|
441
441
|
<script type="module">
|
|
442
442
|
import '@brightspace-ui/core/components/selection/selection-action.js';
|
|
@@ -446,6 +446,10 @@ When using lists, use the list-specific `d2l-list-controls` instead, which exten
|
|
|
446
446
|
</script>
|
|
447
447
|
<!-- docs: start hidden content -->
|
|
448
448
|
<style>
|
|
449
|
+
#demo-element {
|
|
450
|
+
margin-bottom: 250px;
|
|
451
|
+
margin-top: 0;
|
|
452
|
+
}
|
|
449
453
|
ul {
|
|
450
454
|
padding: 0;
|
|
451
455
|
}
|
|
@@ -329,7 +329,7 @@ The `d2l-table-controls` component can be placed in the `d2l-table-wrapper`'s `c
|
|
|
329
329
|
render() {
|
|
330
330
|
return html`
|
|
331
331
|
<d2l-table-wrapper>
|
|
332
|
-
<d2l-table-controls slot="controls"
|
|
332
|
+
<d2l-table-controls slot="controls">
|
|
333
333
|
<d2l-selection-action icon="tier1:delete" text="Delete" requires-selection></d2l-selection-action>
|
|
334
334
|
<d2l-selection-action icon="tier1:gear" text="Settings"></d2l-selection-action>
|
|
335
335
|
</d2l-table-controls>
|
|
@@ -342,9 +342,9 @@ The `d2l-table-controls` component can be placed in the `d2l-table-wrapper`'s `c
|
|
|
342
342
|
</thead>
|
|
343
343
|
<tbody>
|
|
344
344
|
${Object.keys(this._data).map((key, i) => html`
|
|
345
|
-
<tr
|
|
345
|
+
<tr>
|
|
346
346
|
<td>
|
|
347
|
-
<d2l-selection-input
|
|
347
|
+
<d2l-selection-input key="${key}" label="${key}" ?selected="${this._data[key].checked}" @d2l-selection-change="${this._selectRow}"></d2l-selection-input>
|
|
348
348
|
</td>
|
|
349
349
|
<td>this row is ${!this._data[key].checked ? 'not' : ''} selected</td>
|
|
350
350
|
</tr>
|
|
@@ -357,12 +357,21 @@ The `d2l-table-controls` component can be placed in the `d2l-table-wrapper`'s `c
|
|
|
357
357
|
|
|
358
358
|
_selectRow(e) {
|
|
359
359
|
const key = e.target.key;
|
|
360
|
-
this._data[key].checked =
|
|
360
|
+
this._data[key].checked = e.target.selected;
|
|
361
|
+
this.requestUpdate();
|
|
361
362
|
}
|
|
362
363
|
|
|
363
364
|
}
|
|
364
365
|
customElements.define('d2l-sample-table-with-controls', SampleTableWithControls);
|
|
365
366
|
</script>
|
|
367
|
+
<!-- docs: start hidden content -->
|
|
368
|
+
<style>
|
|
369
|
+
#demo-element {
|
|
370
|
+
margin-bottom: 300px;
|
|
371
|
+
margin-top: 0;
|
|
372
|
+
}
|
|
373
|
+
</style>
|
|
374
|
+
<!-- docs: end hidden content -->
|
|
366
375
|
<d2l-sample-table-with-controls></d2l-sample-table-with-controls>
|
|
367
376
|
```
|
|
368
377
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../selection/selection-select-all-pages.js';
|
|
2
2
|
import '../selection/selection-summary.js';
|
|
3
|
-
import { html, nothing } from 'lit';
|
|
3
|
+
import { css, html, nothing } from 'lit';
|
|
4
4
|
import { SelectionControls } from '../selection/selection-controls.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -17,6 +17,18 @@ class TableControls extends SelectionControls {
|
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
static get styles() {
|
|
21
|
+
return [super.styles, css`
|
|
22
|
+
:host {
|
|
23
|
+
--d2l-selection-controls-background-color: var(--d2l-table-controls-background-color);
|
|
24
|
+
z-index: 2; /* must be greater than d2l-table rows */
|
|
25
|
+
}
|
|
26
|
+
:host([no-sticky]) {
|
|
27
|
+
z-index: auto;
|
|
28
|
+
}
|
|
29
|
+
`];
|
|
30
|
+
}
|
|
31
|
+
|
|
20
32
|
_renderSelection() {
|
|
21
33
|
return html`
|
|
22
34
|
<d2l-selection-summary
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightspace-ui/core",
|
|
3
|
-
"version": "2.85.
|
|
3
|
+
"version": "2.85.6",
|
|
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",
|