@brightspace-ui/core 2.73.1 → 2.75.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/expand-collapse/expand-collapse-content.js +15 -4
- package/components/list/list-header.js +0 -1
- package/components/selection/selection-header.js +18 -15
- package/components/table/README.md +84 -0
- package/components/table/demo/table-test.js +60 -16
- package/components/table/table-header.js +22 -0
- package/components/table/table-wrapper.js +7 -6
- package/custom-elements.json +122 -0
- package/package.json +1 -1
|
@@ -35,6 +35,8 @@ class ExpandCollapseContent extends LitElement {
|
|
|
35
35
|
static get styles() {
|
|
36
36
|
return css`
|
|
37
37
|
:host {
|
|
38
|
+
--d2l-expand-collapse-content-transition-duration: 0.2s;
|
|
39
|
+
--d2l-expand-collapse-content-transition-function: cubic-bezier(0.4, 0.4, 0.25, 1);
|
|
38
40
|
display: block;
|
|
39
41
|
}
|
|
40
42
|
|
|
@@ -43,19 +45,28 @@ class ExpandCollapseContent extends LitElement {
|
|
|
43
45
|
}
|
|
44
46
|
|
|
45
47
|
.d2l-expand-collapse-content-container {
|
|
46
|
-
display:
|
|
48
|
+
display: block;
|
|
49
|
+
opacity: 0;
|
|
47
50
|
overflow: hidden;
|
|
48
|
-
transition:
|
|
51
|
+
transition:
|
|
52
|
+
height var(--d2l-expand-collapse-content-transition-duration) var(--d2l-expand-collapse-content-transition-function),
|
|
53
|
+
opacity var(--d2l-expand-collapse-content-transition-duration) var(--d2l-expand-collapse-content-transition-function);
|
|
49
54
|
}
|
|
50
55
|
|
|
51
|
-
.d2l-expand-collapse-content-container
|
|
52
|
-
display:
|
|
56
|
+
.d2l-expand-collapse-content-container[data-state="collapsed"] {
|
|
57
|
+
display: none;
|
|
53
58
|
}
|
|
54
59
|
|
|
55
60
|
.d2l-expand-collapse-content-container[data-state="expanded"] {
|
|
56
61
|
overflow: visible;
|
|
57
62
|
}
|
|
58
63
|
|
|
64
|
+
|
|
65
|
+
.d2l-expand-collapse-content-container[data-state="expanded"],
|
|
66
|
+
.d2l-expand-collapse-content-container[data-state="expanding"] {
|
|
67
|
+
opacity: 1;
|
|
68
|
+
}
|
|
69
|
+
|
|
59
70
|
/* prevent margin colapse on slotted children */
|
|
60
71
|
.d2l-expand-collapse-content-inner::before,
|
|
61
72
|
.d2l-expand-collapse-content-inner::after {
|
|
@@ -4,7 +4,6 @@ import { SelectionHeader } from '../selection/selection-header.js';
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* A header for list components containing select-all, etc.
|
|
7
|
-
* @slot - Responsive container using `d2l-overflow-group` for `d2l-selection-action` elements
|
|
8
7
|
*/
|
|
9
8
|
class ListHeader extends SelectionHeader {
|
|
10
9
|
static get properties() {
|
|
@@ -2,7 +2,7 @@ import '../overflow-group/overflow-group.js';
|
|
|
2
2
|
import './selection-select-all.js';
|
|
3
3
|
import './selection-select-all-pages.js';
|
|
4
4
|
import './selection-summary.js';
|
|
5
|
-
import { css, html, LitElement } from 'lit';
|
|
5
|
+
import { css, html, LitElement, nothing } from 'lit';
|
|
6
6
|
import { classMap } from 'lit/directives/class-map.js';
|
|
7
7
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
8
8
|
import { LocalizeCoreElement } from '../../helpers/localize-core-element.js';
|
|
@@ -77,14 +77,13 @@ export class SelectionHeader extends SelectionObserverMixin(RtlMixin(LocalizeCor
|
|
|
77
77
|
.d2l-selection-header-container-slim {
|
|
78
78
|
min-height: 36px;
|
|
79
79
|
}
|
|
80
|
-
d2l-selection-select-all {
|
|
80
|
+
d2l-selection-select-all, d2l-selection-summary {
|
|
81
81
|
flex: none;
|
|
82
82
|
}
|
|
83
|
-
d2l-selection-summary {
|
|
84
|
-
flex: none;
|
|
83
|
+
d2l-selection-select-all + d2l-selection-summary {
|
|
85
84
|
margin-left: 0.9rem;
|
|
86
85
|
}
|
|
87
|
-
:host([dir="rtl"]) d2l-selection-summary {
|
|
86
|
+
:host([dir="rtl"]) d2l-selection-select-all + d2l-selection-summary {
|
|
88
87
|
margin-left: 0;
|
|
89
88
|
margin-right: 0.9rem;
|
|
90
89
|
}
|
|
@@ -132,20 +131,12 @@ export class SelectionHeader extends SelectionObserverMixin(RtlMixin(LocalizeCor
|
|
|
132
131
|
return html`
|
|
133
132
|
<div class="d2l-sticky-edge"></div>
|
|
134
133
|
<section class="${classMap(classes)}" aria-label="${ifDefined(label)}">
|
|
135
|
-
${this.noSelection ?
|
|
136
|
-
<d2l-selection-select-all></d2l-selection-select-all>
|
|
137
|
-
<d2l-selection-summary
|
|
138
|
-
aria-hidden="true"
|
|
139
|
-
no-selection-text="${this.localize('components.selection.select-all')}"
|
|
140
|
-
>
|
|
141
|
-
</d2l-selection-summary>
|
|
142
|
-
${this.selectAllPagesAllowed ? html`<d2l-selection-select-all-pages></d2l-selection-select-all-pages>` : null}
|
|
143
|
-
`}
|
|
134
|
+
${this.noSelection ? nothing : this._renderSelection()}
|
|
144
135
|
<div class="d2l-selection-header-actions">
|
|
145
136
|
<d2l-overflow-group opener-type="icon"><slot @slotchange="${this._handleSlotChange}"></slot></d2l-overflow-group>
|
|
146
137
|
</div>
|
|
147
138
|
</section>
|
|
148
|
-
${!this.noSticky ? html`<div class="d2l-selection-header-shadow"></div>` :
|
|
139
|
+
${!this.noSticky ? html`<div class="d2l-selection-header-shadow"></div>` : nothing}
|
|
149
140
|
`;
|
|
150
141
|
}
|
|
151
142
|
|
|
@@ -172,6 +163,18 @@ export class SelectionHeader extends SelectionObserverMixin(RtlMixin(LocalizeCor
|
|
|
172
163
|
this._hasActions = (e.target.assignedNodes({ flatten: true }).filter(node => node.nodeType === Node.ELEMENT_NODE).length > 0);
|
|
173
164
|
}
|
|
174
165
|
|
|
166
|
+
_renderSelection() {
|
|
167
|
+
return html`
|
|
168
|
+
<d2l-selection-select-all></d2l-selection-select-all>
|
|
169
|
+
<d2l-selection-summary
|
|
170
|
+
aria-hidden="true"
|
|
171
|
+
no-selection-text="${this.localize('components.selection.select-all')}"
|
|
172
|
+
>
|
|
173
|
+
</d2l-selection-summary>
|
|
174
|
+
${this.selectAllPagesAllowed ? html`<d2l-selection-select-all-pages></d2l-selection-select-all-pages>` : nothing}
|
|
175
|
+
`;
|
|
176
|
+
}
|
|
177
|
+
|
|
175
178
|
_stickyObserverDisconnect() {
|
|
176
179
|
if (this._stickyIntersectionObserver) {
|
|
177
180
|
this._stickyIntersectionObserver.disconnect();
|
|
@@ -299,3 +299,87 @@ If your table supports row selection, apply the `selected` attribute to `<tr>` r
|
|
|
299
299
|
<td>this row is selected</td>
|
|
300
300
|
</tr>
|
|
301
301
|
```
|
|
302
|
+
|
|
303
|
+
## Table Header [d2l-table-header]
|
|
304
|
+
|
|
305
|
+
The `d2l-table-header` component can be placed in the `d2l-table-wrapper`'s `header` slot to provide a selection summary, a slot for `d2l-selection-action`s, and overflow-group behaviour.
|
|
306
|
+
|
|
307
|
+
<!-- docs: demo live name:d2l-table-header -->
|
|
308
|
+
```html
|
|
309
|
+
<script type="module">
|
|
310
|
+
import '@brightspace-ui/core/components/selection/selection-action.js';
|
|
311
|
+
import '@brightspace-ui/core/components/selection/selection-input.js';
|
|
312
|
+
import '@brightspace-ui/core/components/selection/selection-select-all.js';
|
|
313
|
+
import '@brightspace-ui/core/components/table/table-header.js';
|
|
314
|
+
import { html, LitElement } from 'lit';
|
|
315
|
+
import { tableStyles } from '@brightspace-ui/core/components/table/table-wrapper.js';
|
|
316
|
+
|
|
317
|
+
class MyTableWithHeaderElem extends LitElement {
|
|
318
|
+
|
|
319
|
+
static get properties() {
|
|
320
|
+
return {
|
|
321
|
+
_data: { state: true }
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
static get styles() {
|
|
326
|
+
return tableStyles;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
constructor() {
|
|
330
|
+
super();
|
|
331
|
+
this._data = {
|
|
332
|
+
a: { checked: true },
|
|
333
|
+
b: { checked: false },
|
|
334
|
+
};
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
render() {
|
|
338
|
+
return html`
|
|
339
|
+
<d2l-table-wrapper>
|
|
340
|
+
<d2l-table-header slot="header" no-sticky>
|
|
341
|
+
<d2l-selection-action icon="tier1:delete" text="Delete" requires-selection></d2l-selection-action>
|
|
342
|
+
<d2l-selection-action icon="tier1:gear" text="Settings"></d2l-selection-action>
|
|
343
|
+
</d2l-table-header>
|
|
344
|
+
<table class="d2l-table">
|
|
345
|
+
<thead>
|
|
346
|
+
<tr>
|
|
347
|
+
<th><d2l-selection-select-all></d2l-selection-select-all></th>
|
|
348
|
+
<th>Column B</th>
|
|
349
|
+
</tr>
|
|
350
|
+
</thead>
|
|
351
|
+
<tbody>
|
|
352
|
+
${Object.keys(this._data).map((key, i) => html`
|
|
353
|
+
<tr ?selected="${i === 0}">
|
|
354
|
+
<td>
|
|
355
|
+
<d2l-selection-input selected key="${key}" label="${key}" ?checked="${this._data[key].checked}" @d2l-selection-change="${this._selectRow}"></d2l-selection-input>
|
|
356
|
+
</td>
|
|
357
|
+
<td>this row is ${!this._data[key].checked ? 'not' : ''} selected</td>
|
|
358
|
+
</tr>
|
|
359
|
+
`)}
|
|
360
|
+
</tbody>
|
|
361
|
+
</table>
|
|
362
|
+
</d2l-table-wrapper>
|
|
363
|
+
`;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
_selectRow(e) {
|
|
367
|
+
const key = e.target.key;
|
|
368
|
+
this._data[key].checked = !this._data[key].checked;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
}
|
|
372
|
+
customElements.define('d2l-my-table-with-header-elem', MyTableWithHeaderElem);
|
|
373
|
+
</script>
|
|
374
|
+
<d2l-my-table-with-header-elem></d2l-my-table-with-header-elem>
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
<!-- docs: start hidden content -->
|
|
378
|
+
### Properties
|
|
379
|
+
|
|
380
|
+
| Property | Type | Description |
|
|
381
|
+
|---|---|---|
|
|
382
|
+
| `no-selection` | Boolean | Whether to render the selection summary |
|
|
383
|
+
| `no-sticky` | Boolean | Disables sticky positioning for the header |
|
|
384
|
+
| `select-all-pages-allowed` | Boolean | Whether all pages can be selected |
|
|
385
|
+
<!-- docs: end hidden content -->
|
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
import '../table-col-sort-button.js';
|
|
2
|
+
import '../table-header.js';
|
|
3
|
+
import '../../dropdown/dropdown-button-subtle.js';
|
|
4
|
+
import '../../dropdown/dropdown-menu.js';
|
|
5
|
+
import '../../menu/menu.js';
|
|
6
|
+
import '../../menu/menu-item.js';
|
|
7
|
+
import '../../selection/selection-action.js';
|
|
8
|
+
import '../../selection/selection-action-dropdown.js';
|
|
9
|
+
import '../../selection/selection-action-menu-item.js';
|
|
10
|
+
import '../../selection/selection-input.js';
|
|
11
|
+
|
|
2
12
|
import { css, html, LitElement } from 'lit';
|
|
3
13
|
import { RtlMixin } from '../../../mixins/rtl-mixin.js';
|
|
4
14
|
import { tableStyles } from '../table-wrapper.js';
|
|
5
15
|
|
|
6
16
|
const fruits = ['Apples', 'Oranges', 'Bananas'];
|
|
7
17
|
|
|
8
|
-
const data = [
|
|
9
|
-
{ name: 'Canada', fruit: { 'apples': 356863, 'oranges': 0, 'bananas': 0 }, selected:
|
|
10
|
-
{ name: 'Australia', fruit: { 'apples': 308298, 'oranges': 398610, 'bananas': 354241 }, selected:
|
|
18
|
+
const data = () => [
|
|
19
|
+
{ name: 'Canada', fruit: { 'apples': 356863, 'oranges': 0, 'bananas': 0 }, selected: true },
|
|
20
|
+
{ name: 'Australia', fruit: { 'apples': 308298, 'oranges': 398610, 'bananas': 354241 }, selected: true },
|
|
11
21
|
{ name: 'Mexico', fruit: { 'apples': 716931, 'oranges': 4603253, 'bananas': 2384778 }, selected: false },
|
|
12
22
|
{ name: 'Brazil', fruit: { 'apples': 1300000, 'oranges': 50000, 'bananas': 6429875 }, selected: false },
|
|
13
23
|
{ name: 'England', fruit: { 'apples': 345782, 'oranges': 4, 'bananas': 1249875 }, selected: false },
|
|
@@ -36,6 +46,7 @@ class TestTable extends RtlMixin(LitElement) {
|
|
|
36
46
|
* @type {boolean}
|
|
37
47
|
*/
|
|
38
48
|
stickyHeaders: { attribute: 'sticky-headers', type: Boolean },
|
|
49
|
+
_data: { state: true },
|
|
39
50
|
_sortField: { attribute: false, type: String },
|
|
40
51
|
_sortDesc: { attribute: false, type: Boolean }
|
|
41
52
|
};
|
|
@@ -55,11 +66,12 @@ class TestTable extends RtlMixin(LitElement) {
|
|
|
55
66
|
this.sortDesc = false;
|
|
56
67
|
this.stickyHeaders = false;
|
|
57
68
|
this.type = 'default';
|
|
69
|
+
this._data = data();
|
|
58
70
|
}
|
|
59
71
|
|
|
60
72
|
render() {
|
|
61
73
|
const type = this.type === 'light' ? 'light' : 'default';
|
|
62
|
-
const sorted =
|
|
74
|
+
const sorted = this._data.sort((a, b) => {
|
|
63
75
|
if (this._sortDesc) {
|
|
64
76
|
return b.fruit[this._sortField] - a.fruit[this._sortField];
|
|
65
77
|
}
|
|
@@ -67,18 +79,53 @@ class TestTable extends RtlMixin(LitElement) {
|
|
|
67
79
|
});
|
|
68
80
|
return html`
|
|
69
81
|
<d2l-table-wrapper ?no-column-border="${this.noColumnBorder}" ?sticky-headers="${this.stickyHeaders}" type="${type}">
|
|
82
|
+
<d2l-table-header slot="header" no-sticky>
|
|
83
|
+
<d2l-selection-action icon="tier1:plus-default" text="Add" @d2l-selection-action-click="${this._handleAddItem}"></d2l-selection-action>
|
|
84
|
+
<d2l-selection-action-dropdown text="Move To" requires-selection>
|
|
85
|
+
<d2l-dropdown-menu>
|
|
86
|
+
<d2l-menu label="Move To Options">
|
|
87
|
+
<d2l-menu-item text="Top of Quiz"></d2l-menu-item>
|
|
88
|
+
<d2l-menu-item text="Bottom of Quiz"></d2l-menu-item>
|
|
89
|
+
<d2l-menu-item text="Section">
|
|
90
|
+
<d2l-menu>
|
|
91
|
+
<d2l-menu-item text="Option 1"></d2l-menu-item>
|
|
92
|
+
<d2l-menu-item text="Option 2"></d2l-menu-item>
|
|
93
|
+
</d2l-menu>
|
|
94
|
+
</d2l-menu-item>
|
|
95
|
+
</d2l-menu>
|
|
96
|
+
</d2l-dropdown-menu>
|
|
97
|
+
</d2l-selection-action-dropdown>
|
|
98
|
+
<d2l-dropdown-button-subtle text="Actions">
|
|
99
|
+
<d2l-dropdown-menu>
|
|
100
|
+
<d2l-menu label="Actions">
|
|
101
|
+
<d2l-selection-action-menu-item text="Bookmark (requires selection)" requires-selection></d2l-selection-action-menu-item>
|
|
102
|
+
<d2l-selection-action-menu-item text="Advanced"></d2l-selection-action-menu-item>
|
|
103
|
+
</d2l-menu>
|
|
104
|
+
</d2l-dropdown-menu>
|
|
105
|
+
</d2l-dropdown-button-subtle>
|
|
106
|
+
<d2l-selection-action icon="tier1:gear" text="Settings" requires-selection></d2l-selection-action>
|
|
107
|
+
</d2l-table-header>
|
|
108
|
+
|
|
70
109
|
<table class="d2l-table">
|
|
71
110
|
<thead>
|
|
72
111
|
<tr>
|
|
73
|
-
<th
|
|
112
|
+
<th scope="col"><d2l-selection-select-all></d2l-selection-select-all></th>
|
|
113
|
+
<th scope="col">Country</th>
|
|
74
114
|
${fruits.map(fruit => this._renderSortButton(fruit))}
|
|
75
115
|
</tr>
|
|
76
116
|
</thead>
|
|
77
117
|
<tbody>
|
|
78
118
|
${sorted.map((row) => html`
|
|
79
|
-
<tr ?selected="${row.selected}">
|
|
80
|
-
<th
|
|
81
|
-
|
|
119
|
+
<tr ?selected="${row.selected}" data-name="${row.name}">
|
|
120
|
+
<th scope="row">
|
|
121
|
+
<d2l-selection-input
|
|
122
|
+
@d2l-selection-change="${this._selectRow}"
|
|
123
|
+
?selected="${row.selected}"
|
|
124
|
+
key="${row.name}"
|
|
125
|
+
label="${row.name}">
|
|
126
|
+
</d2l-selection-input>
|
|
127
|
+
</th>
|
|
128
|
+
<th scope="row">${row.name}</th>
|
|
82
129
|
${fruits.map((fruit) => html`<td>${formatter.format(row.fruit[fruit.toLowerCase()])}</td>`)}
|
|
83
130
|
</tr>
|
|
84
131
|
`)}
|
|
@@ -98,7 +145,7 @@ class TestTable extends RtlMixin(LitElement) {
|
|
|
98
145
|
_renderSortButton(fruit) {
|
|
99
146
|
const noSort = this._sortField !== fruit.toLowerCase();
|
|
100
147
|
return html`
|
|
101
|
-
<th>
|
|
148
|
+
<th scope="col">
|
|
102
149
|
<d2l-table-col-sort-button
|
|
103
150
|
@click="${this._handleSort}"
|
|
104
151
|
?desc="${this._sortDesc}"
|
|
@@ -108,13 +155,10 @@ class TestTable extends RtlMixin(LitElement) {
|
|
|
108
155
|
}
|
|
109
156
|
|
|
110
157
|
_selectRow(e) {
|
|
111
|
-
const country = e.target.parentNode.
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
this.requestUpdate();
|
|
116
|
-
}
|
|
117
|
-
});
|
|
158
|
+
const country = e.target.parentNode.parentNode.dataset.name;
|
|
159
|
+
const row = this._data.find(row => row.name === country);
|
|
160
|
+
row.selected = e.target.selected;
|
|
161
|
+
this.requestUpdate();
|
|
118
162
|
}
|
|
119
163
|
|
|
120
164
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import '../selection/selection-select-all-pages.js';
|
|
2
|
+
import '../selection/selection-summary.js';
|
|
3
|
+
import { html, nothing } from 'lit';
|
|
4
|
+
import { SelectionHeader } from '../selection/selection-header.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A header for table components containing a selection summary and selection actions.
|
|
8
|
+
*/
|
|
9
|
+
class TableHeader extends SelectionHeader {
|
|
10
|
+
_renderSelection() {
|
|
11
|
+
return html`
|
|
12
|
+
<d2l-selection-summary
|
|
13
|
+
aria-hidden="true"
|
|
14
|
+
no-selection-text="${this.localize('components.selection.select-all')}"
|
|
15
|
+
>
|
|
16
|
+
</d2l-selection-summary>
|
|
17
|
+
${this.selectAllPagesAllowed ? html`<d2l-selection-select-all-pages></d2l-selection-select-all-pages>` : nothing}
|
|
18
|
+
`;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
customElements.define('d2l-table-header', TableHeader);
|
|
@@ -2,6 +2,7 @@ import '../colors/colors.js';
|
|
|
2
2
|
import '../scroll-wrapper/scroll-wrapper.js';
|
|
3
3
|
import { css, html, LitElement } from 'lit';
|
|
4
4
|
import { RtlMixin } from '../../mixins/rtl-mixin.js';
|
|
5
|
+
import { SelectionMixin } from '../selection/selection-mixin.js';
|
|
5
6
|
|
|
6
7
|
export const tableStyles = css`
|
|
7
8
|
.d2l-table {
|
|
@@ -170,8 +171,9 @@ export const tableStyles = css`
|
|
|
170
171
|
/**
|
|
171
172
|
* Wraps a native <table> element, providing styling and scroll buttons for overflow.
|
|
172
173
|
* @slot - Content to wrap
|
|
174
|
+
* @slot header - Slot for `d2l-table-header` to be rendered above the table
|
|
173
175
|
*/
|
|
174
|
-
export class TableWrapper extends RtlMixin(LitElement) {
|
|
176
|
+
export class TableWrapper extends RtlMixin(SelectionMixin(LitElement)) {
|
|
175
177
|
|
|
176
178
|
static get properties() {
|
|
177
179
|
return {
|
|
@@ -250,11 +252,10 @@ export class TableWrapper extends RtlMixin(LitElement) {
|
|
|
250
252
|
|
|
251
253
|
render() {
|
|
252
254
|
const slot = html`<slot @slotchange="${this._handleSlotChange}"></slot>`;
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
}
|
|
255
|
+
return html`
|
|
256
|
+
<slot name="header"></slot>
|
|
257
|
+
${this.stickyHeaders ? slot : html`<d2l-scroll-wrapper>${slot}</d2l-scroll-wrapper>`}
|
|
258
|
+
`;
|
|
258
259
|
}
|
|
259
260
|
|
|
260
261
|
updated(changedProperties) {
|
package/custom-elements.json
CHANGED
|
@@ -10682,6 +10682,83 @@
|
|
|
10682
10682
|
}
|
|
10683
10683
|
]
|
|
10684
10684
|
},
|
|
10685
|
+
{
|
|
10686
|
+
"name": "d2l-table-header",
|
|
10687
|
+
"path": "./components/table/table-header.js",
|
|
10688
|
+
"description": "A header for table components containing a selection summary and selection actions.",
|
|
10689
|
+
"attributes": [
|
|
10690
|
+
{
|
|
10691
|
+
"name": "no-selection",
|
|
10692
|
+
"description": "Whether to render select-all and selection summary",
|
|
10693
|
+
"type": "boolean",
|
|
10694
|
+
"default": "false"
|
|
10695
|
+
},
|
|
10696
|
+
{
|
|
10697
|
+
"name": "no-sticky",
|
|
10698
|
+
"description": "Disables sticky positioning for the header",
|
|
10699
|
+
"type": "boolean",
|
|
10700
|
+
"default": "false"
|
|
10701
|
+
},
|
|
10702
|
+
{
|
|
10703
|
+
"name": "select-all-pages-allowed",
|
|
10704
|
+
"description": "Whether all pages can be selected",
|
|
10705
|
+
"type": "boolean",
|
|
10706
|
+
"default": "false"
|
|
10707
|
+
},
|
|
10708
|
+
{
|
|
10709
|
+
"name": "selection-for",
|
|
10710
|
+
"description": "Id of the `SelectionMixin` component this component wants to observe (if not located within that component)",
|
|
10711
|
+
"type": "string"
|
|
10712
|
+
}
|
|
10713
|
+
],
|
|
10714
|
+
"properties": [
|
|
10715
|
+
{
|
|
10716
|
+
"name": "noSelection",
|
|
10717
|
+
"attribute": "no-selection",
|
|
10718
|
+
"description": "Whether to render select-all and selection summary",
|
|
10719
|
+
"type": "boolean",
|
|
10720
|
+
"default": "false"
|
|
10721
|
+
},
|
|
10722
|
+
{
|
|
10723
|
+
"name": "noSticky",
|
|
10724
|
+
"attribute": "no-sticky",
|
|
10725
|
+
"description": "Disables sticky positioning for the header",
|
|
10726
|
+
"type": "boolean",
|
|
10727
|
+
"default": "false"
|
|
10728
|
+
},
|
|
10729
|
+
{
|
|
10730
|
+
"name": "selectAllPagesAllowed",
|
|
10731
|
+
"attribute": "select-all-pages-allowed",
|
|
10732
|
+
"description": "Whether all pages can be selected",
|
|
10733
|
+
"type": "boolean",
|
|
10734
|
+
"default": "false"
|
|
10735
|
+
},
|
|
10736
|
+
{
|
|
10737
|
+
"name": "selectionFor",
|
|
10738
|
+
"attribute": "selection-for",
|
|
10739
|
+
"description": "Id of the `SelectionMixin` component this component wants to observe (if not located within that component)",
|
|
10740
|
+
"type": "string"
|
|
10741
|
+
},
|
|
10742
|
+
{
|
|
10743
|
+
"name": "selectionInfo"
|
|
10744
|
+
},
|
|
10745
|
+
{
|
|
10746
|
+
"name": "documentLocaleSettings",
|
|
10747
|
+
"default": "\"getDocumentLocaleSettings()\""
|
|
10748
|
+
}
|
|
10749
|
+
],
|
|
10750
|
+
"events": [
|
|
10751
|
+
{
|
|
10752
|
+
"name": "d2l-selection-observer-subscribe"
|
|
10753
|
+
}
|
|
10754
|
+
],
|
|
10755
|
+
"slots": [
|
|
10756
|
+
{
|
|
10757
|
+
"name": "",
|
|
10758
|
+
"description": "Responsive container using `d2l-overflow-group` for `d2l-selection-action` elements"
|
|
10759
|
+
}
|
|
10760
|
+
]
|
|
10761
|
+
},
|
|
10685
10762
|
{
|
|
10686
10763
|
"name": "d2l-table-wrapper",
|
|
10687
10764
|
"path": "./components/table/table-wrapper.js",
|
|
@@ -10704,6 +10781,23 @@
|
|
|
10704
10781
|
"description": "Type of table style to apply. The \"light\" style has fewer borders and tighter padding.",
|
|
10705
10782
|
"type": "'default'|'light'",
|
|
10706
10783
|
"default": "\"default\""
|
|
10784
|
+
},
|
|
10785
|
+
{
|
|
10786
|
+
"name": "selection-count-override",
|
|
10787
|
+
"description": "ADVANCED: Temporary optional parameter used to override existing count. Will be removed soon, use with caution.",
|
|
10788
|
+
"type": "number"
|
|
10789
|
+
},
|
|
10790
|
+
{
|
|
10791
|
+
"name": "item-count",
|
|
10792
|
+
"description": "Total number of items. Required when selecting all pages is allowed.",
|
|
10793
|
+
"type": "number",
|
|
10794
|
+
"default": "0"
|
|
10795
|
+
},
|
|
10796
|
+
{
|
|
10797
|
+
"name": "selection-single",
|
|
10798
|
+
"description": "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.",
|
|
10799
|
+
"type": "boolean",
|
|
10800
|
+
"default": "false"
|
|
10707
10801
|
}
|
|
10708
10802
|
],
|
|
10709
10803
|
"properties": [
|
|
@@ -10727,15 +10821,43 @@
|
|
|
10727
10821
|
"description": "Type of table style to apply. The \"light\" style has fewer borders and tighter padding.",
|
|
10728
10822
|
"type": "'default'|'light'",
|
|
10729
10823
|
"default": "\"default\""
|
|
10824
|
+
},
|
|
10825
|
+
{
|
|
10826
|
+
"name": "selectionCountOverride",
|
|
10827
|
+
"attribute": "selection-count-override",
|
|
10828
|
+
"description": "ADVANCED: Temporary optional parameter used to override existing count. Will be removed soon, use with caution.",
|
|
10829
|
+
"type": "number"
|
|
10830
|
+
},
|
|
10831
|
+
{
|
|
10832
|
+
"name": "itemCount",
|
|
10833
|
+
"attribute": "item-count",
|
|
10834
|
+
"description": "Total number of items. Required when selecting all pages is allowed.",
|
|
10835
|
+
"type": "number",
|
|
10836
|
+
"default": "0"
|
|
10837
|
+
},
|
|
10838
|
+
{
|
|
10839
|
+
"name": "selectionSingle",
|
|
10840
|
+
"attribute": "selection-single",
|
|
10841
|
+
"description": "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.",
|
|
10842
|
+
"type": "boolean",
|
|
10843
|
+
"default": "false"
|
|
10730
10844
|
}
|
|
10731
10845
|
],
|
|
10732
10846
|
"slots": [
|
|
10733
10847
|
{
|
|
10734
10848
|
"name": "",
|
|
10735
10849
|
"description": "Content to wrap"
|
|
10850
|
+
},
|
|
10851
|
+
{
|
|
10852
|
+
"name": "header",
|
|
10853
|
+
"description": "Slot for `d2l-table-header` to be rendered above the table"
|
|
10736
10854
|
}
|
|
10737
10855
|
]
|
|
10738
10856
|
},
|
|
10857
|
+
{
|
|
10858
|
+
"name": "d2l-test-table-header-visual-diff",
|
|
10859
|
+
"path": "./components/table/test/table-test-header-visual-diff.js"
|
|
10860
|
+
},
|
|
10739
10861
|
{
|
|
10740
10862
|
"name": "d2l-test-table-sticky-visual-diff",
|
|
10741
10863
|
"path": "./components/table/test/table-test-sticky-visual-diff.js"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightspace-ui/core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.75.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",
|