@brightspace-ui/core 1.231.2 → 1.232.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/README.md +1 -0
- package/components/list/list-header.js +20 -12
- package/custom-elements.json +14 -1
- package/package.json +2 -2
|
@@ -311,6 +311,7 @@ The `d2l-list-header` component can be placed in the `d2l-list`'s `header` slot
|
|
|
311
311
|
|
|
312
312
|
| Property | Type | Description |
|
|
313
313
|
|---|---|---|
|
|
314
|
+
| `no-selection` | Boolean | Whether to render select-all and selection summary |
|
|
314
315
|
| `padding-type` | String | Header whitespace (`normal` (default), `slim`) |
|
|
315
316
|
| `select-all-pages-allowed` | Boolean | Whether all pages can be selected |
|
|
316
317
|
<!-- docs: end hidden content -->
|
|
@@ -15,12 +15,10 @@ class ListHeader extends RtlMixin(LocalizeCoreElement(LitElement)) {
|
|
|
15
15
|
static get properties() {
|
|
16
16
|
return {
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
19
|
-
* Whether to render a header with reduced whitespace
|
|
20
|
-
* TODO: Remove
|
|
18
|
+
* Whether to render select-all and selection summary
|
|
21
19
|
* @type {boolean}
|
|
22
20
|
*/
|
|
23
|
-
|
|
21
|
+
noSelection: { type: Boolean, attribute: 'no-selection' },
|
|
24
22
|
/**
|
|
25
23
|
* How much padding to render list items with
|
|
26
24
|
* @type {'normal'|'slim'}
|
|
@@ -31,6 +29,13 @@ class ListHeader extends RtlMixin(LocalizeCoreElement(LitElement)) {
|
|
|
31
29
|
* @type {boolean}
|
|
32
30
|
*/
|
|
33
31
|
selectAllPagesAllowed: { type: Boolean, attribute: 'select-all-pages-allowed' },
|
|
32
|
+
/**
|
|
33
|
+
* @ignore
|
|
34
|
+
* Whether to render a header with reduced whitespace
|
|
35
|
+
* TODO: Remove
|
|
36
|
+
* @type {boolean}
|
|
37
|
+
*/
|
|
38
|
+
slim: { reflect: true, type: Boolean }
|
|
34
39
|
};
|
|
35
40
|
}
|
|
36
41
|
|
|
@@ -87,21 +92,24 @@ class ListHeader extends RtlMixin(LocalizeCoreElement(LitElement)) {
|
|
|
87
92
|
|
|
88
93
|
constructor() {
|
|
89
94
|
super();
|
|
90
|
-
this.
|
|
95
|
+
this.noSelection = false;
|
|
91
96
|
this.paddingType = 'normal';
|
|
92
97
|
this.selectAllPagesAllowed = false;
|
|
98
|
+
this.slim = false;
|
|
93
99
|
}
|
|
94
100
|
|
|
95
101
|
render() {
|
|
96
102
|
return html`
|
|
97
103
|
<div class="d2l-list-header-container">
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
104
|
+
${this.noSelection ? null : html`
|
|
105
|
+
<d2l-selection-select-all></d2l-selection-select-all>
|
|
106
|
+
<d2l-selection-summary
|
|
107
|
+
aria-hidden="true"
|
|
108
|
+
class="d2l-list-header-summary"
|
|
109
|
+
no-selection-text="${this.localize('components.selection.select-all')}">
|
|
110
|
+
</d2l-selection-summary>
|
|
111
|
+
${this.selectAllPagesAllowed ? html`<d2l-selection-select-all-pages></d2l-selection-select-all-pages>` : null}
|
|
112
|
+
`}
|
|
105
113
|
<div class="d2l-list-header-actions">
|
|
106
114
|
<d2l-overflow-group opener-type="icon"><slot></slot></d2l-overflow-group>
|
|
107
115
|
</div>
|
package/custom-elements.json
CHANGED
|
@@ -6673,6 +6673,12 @@
|
|
|
6673
6673
|
"path": "./components/list/list-header.js",
|
|
6674
6674
|
"description": "A header for list components containing select-all, etc.",
|
|
6675
6675
|
"attributes": [
|
|
6676
|
+
{
|
|
6677
|
+
"name": "no-selection",
|
|
6678
|
+
"description": "Whether to render select-all and selection summary",
|
|
6679
|
+
"type": "boolean",
|
|
6680
|
+
"default": "false"
|
|
6681
|
+
},
|
|
6676
6682
|
{
|
|
6677
6683
|
"name": "padding-type",
|
|
6678
6684
|
"description": "How much padding to render list items with",
|
|
@@ -6688,7 +6694,9 @@
|
|
|
6688
6694
|
],
|
|
6689
6695
|
"properties": [
|
|
6690
6696
|
{
|
|
6691
|
-
"name": "
|
|
6697
|
+
"name": "noSelection",
|
|
6698
|
+
"attribute": "no-selection",
|
|
6699
|
+
"description": "Whether to render select-all and selection summary",
|
|
6692
6700
|
"type": "boolean",
|
|
6693
6701
|
"default": "false"
|
|
6694
6702
|
},
|
|
@@ -6705,6 +6713,11 @@
|
|
|
6705
6713
|
"description": "Whether all pages can be selected",
|
|
6706
6714
|
"type": "boolean",
|
|
6707
6715
|
"default": "false"
|
|
6716
|
+
},
|
|
6717
|
+
{
|
|
6718
|
+
"name": "slim",
|
|
6719
|
+
"type": "boolean",
|
|
6720
|
+
"default": "false"
|
|
6708
6721
|
}
|
|
6709
6722
|
],
|
|
6710
6723
|
"slots": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightspace-ui/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.232.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",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"license": "Apache-2.0",
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@babel/eslint-parser": "^7",
|
|
47
|
-
"@brightspace-ui/stylelint-config": "^0.
|
|
47
|
+
"@brightspace-ui/stylelint-config": "^0.4",
|
|
48
48
|
"@open-wc/testing": "^2",
|
|
49
49
|
"@web/dev-server": "^0.1",
|
|
50
50
|
"@web/test-runner": "^0.13",
|