@brightspace-ui/core 2.14.6 → 2.14.7
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.
|
@@ -31,6 +31,7 @@ class ListHeader extends RtlMixin(LocalizeCoreElement(LitElement)) {
|
|
|
31
31
|
* @type {boolean}
|
|
32
32
|
*/
|
|
33
33
|
selectAllPagesAllowed: { type: Boolean, attribute: 'select-all-pages-allowed' },
|
|
34
|
+
_hasActions: { state: true },
|
|
34
35
|
_scrolled: { type: Boolean, reflect: true }
|
|
35
36
|
};
|
|
36
37
|
}
|
|
@@ -60,6 +61,7 @@ class ListHeader extends RtlMixin(LocalizeCoreElement(LitElement)) {
|
|
|
60
61
|
height: 40px;
|
|
61
62
|
position: absolute;
|
|
62
63
|
width: 100%;
|
|
64
|
+
z-index: -1;
|
|
63
65
|
}
|
|
64
66
|
:host([hidden]) {
|
|
65
67
|
display: none;
|
|
@@ -69,6 +71,9 @@ class ListHeader extends RtlMixin(LocalizeCoreElement(LitElement)) {
|
|
|
69
71
|
display: flex;
|
|
70
72
|
margin-bottom: 6px;
|
|
71
73
|
margin-top: 6px;
|
|
74
|
+
min-height: 54px;
|
|
75
|
+
}
|
|
76
|
+
.d2l-list-header-container-slim {
|
|
72
77
|
min-height: 36px;
|
|
73
78
|
}
|
|
74
79
|
.d2l-list-header-extend-separator {
|
|
@@ -124,6 +129,7 @@ class ListHeader extends RtlMixin(LocalizeCoreElement(LitElement)) {
|
|
|
124
129
|
render() {
|
|
125
130
|
const classes = {
|
|
126
131
|
'd2l-list-header-container': true,
|
|
132
|
+
'd2l-list-header-container-slim': (!this._hasActions && !this.selectAllPagesAllowed),
|
|
127
133
|
'd2l-list-header-extend-separator': this._extendSeparator
|
|
128
134
|
};
|
|
129
135
|
return html`
|
|
@@ -138,13 +144,17 @@ class ListHeader extends RtlMixin(LocalizeCoreElement(LitElement)) {
|
|
|
138
144
|
${this.selectAllPagesAllowed ? html`<d2l-selection-select-all-pages></d2l-selection-select-all-pages>` : null}
|
|
139
145
|
`}
|
|
140
146
|
<div class="d2l-list-header-actions">
|
|
141
|
-
<d2l-overflow-group opener-type="icon"><slot></slot></d2l-overflow-group>
|
|
147
|
+
<d2l-overflow-group opener-type="icon"><slot @slotchange="${this._handleSlotChange}"></slot></d2l-overflow-group>
|
|
142
148
|
</div>
|
|
143
149
|
</div>
|
|
144
150
|
${!this.noSticky ? html`<div class="d2l-list-header-shadow"></div>` : null}
|
|
145
151
|
`;
|
|
146
152
|
}
|
|
147
153
|
|
|
154
|
+
_handleSlotChange(e) {
|
|
155
|
+
this._hasActions = (e.target.assignedNodes({ flatten: true }).filter(node => node.nodeType === Node.ELEMENT_NODE).length > 0);
|
|
156
|
+
}
|
|
157
|
+
|
|
148
158
|
}
|
|
149
159
|
|
|
150
160
|
customElements.define('d2l-list-header', ListHeader);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightspace-ui/core",
|
|
3
|
-
"version": "2.14.
|
|
3
|
+
"version": "2.14.7",
|
|
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",
|