@brightspace-ui/core 2.118.4 → 2.118.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.
|
@@ -61,12 +61,9 @@ export const OverflowGroupMixin = superclass => class extends LocalizeCoreElemen
|
|
|
61
61
|
type: String,
|
|
62
62
|
attribute: 'opener-type'
|
|
63
63
|
},
|
|
64
|
-
_chompIndex: {
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
_mini: {
|
|
68
|
-
state: true
|
|
69
|
-
}
|
|
64
|
+
_chompIndex: { state: true },
|
|
65
|
+
_mini: { state: true },
|
|
66
|
+
_wrapping: { state: true }
|
|
70
67
|
};
|
|
71
68
|
}
|
|
72
69
|
|
|
@@ -80,7 +77,6 @@ export const OverflowGroupMixin = superclass => class extends LocalizeCoreElemen
|
|
|
80
77
|
}
|
|
81
78
|
.d2l-overflow-group-container {
|
|
82
79
|
display: flex;
|
|
83
|
-
flex-wrap: wrap;
|
|
84
80
|
justify-content: var(--d2l-overflow-group-justify-content, normal);
|
|
85
81
|
}
|
|
86
82
|
.d2l-overflow-group-container ::slotted([data-is-chomped]) {
|
|
@@ -102,6 +98,7 @@ export const OverflowGroupMixin = superclass => class extends LocalizeCoreElemen
|
|
|
102
98
|
this._mini = this.openerType === OPENER_TYPE.ICON;
|
|
103
99
|
this._overflowContainerHidden = false;
|
|
104
100
|
this._slotItems = [];
|
|
101
|
+
this._wrapping = false;
|
|
105
102
|
|
|
106
103
|
this.autoShow = false;
|
|
107
104
|
this.maxToShow = -1;
|
|
@@ -133,8 +130,9 @@ export const OverflowGroupMixin = superclass => class extends LocalizeCoreElemen
|
|
|
133
130
|
});
|
|
134
131
|
|
|
135
132
|
const containerStyles = {
|
|
136
|
-
|
|
137
|
-
|
|
133
|
+
flexWrap: this._wrapping ? 'wrap' : 'nowrap',
|
|
134
|
+
minHeight: this.autoShow ? 'none' : (this._itemHeight ? `${this._itemHeight}px` : 'auto'),
|
|
135
|
+
maxHeight: this.autoShow ? 'none' : (this._itemHeight ? `${this._itemHeight}px` : 'auto')
|
|
138
136
|
};
|
|
139
137
|
|
|
140
138
|
return html`
|
|
@@ -142,7 +140,7 @@ export const OverflowGroupMixin = superclass => class extends LocalizeCoreElemen
|
|
|
142
140
|
<slot @slotchange="${this._handleSlotChange}"></slot>
|
|
143
141
|
${overflowContainer}
|
|
144
142
|
</div>
|
|
145
|
-
<slot name="adjacent"></slot>
|
|
143
|
+
<slot name="adjacent"></slot>
|
|
146
144
|
`;
|
|
147
145
|
}
|
|
148
146
|
|
|
@@ -255,6 +253,7 @@ export const OverflowGroupMixin = superclass => class extends LocalizeCoreElemen
|
|
|
255
253
|
}
|
|
256
254
|
|
|
257
255
|
}
|
|
256
|
+
|
|
258
257
|
// if there is at least one showing and no more to be hidden, enable collapsing overflow container to mini overflow container
|
|
259
258
|
this._overflowContainerHidden = this._itemLayouts.length === showing.count;
|
|
260
259
|
if (!this._overflowContainerHidden && (isSoftOverflowing || isForcedOverflowing)) {
|
|
@@ -276,6 +275,9 @@ export const OverflowGroupMixin = superclass => class extends LocalizeCoreElemen
|
|
|
276
275
|
const overflowOverflowing = (showing.width + this._overflowContainerWidth >= this._availableWidth);
|
|
277
276
|
const swapToMini = overflowOverflowing && !this._overflowContainerHidden;
|
|
278
277
|
|
|
278
|
+
const requiredWidth = (isSoftOverflowing || isForcedOverflowing) ? showing.width + this._overflowContainerWidth : showing.width;
|
|
279
|
+
this._wrapping = (requiredWidth > this._availableWidth);
|
|
280
|
+
|
|
279
281
|
this._mini = this.openerType === OPENER_TYPE.ICON || swapToMini;
|
|
280
282
|
this._chompIndex = this._overflowContainerHidden ? null : showing.count;
|
|
281
283
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightspace-ui/core",
|
|
3
|
-
"version": "2.118.
|
|
3
|
+
"version": "2.118.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",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { sendKeys, sendMouse } from '@web/test-runner-commands';
|
|
2
2
|
|
|
3
3
|
export const focusWithKeyboard = async(element) => {
|
|
4
4
|
await sendKeys({ press: 'Tab' });
|
|
@@ -8,5 +8,5 @@ export const focusWithKeyboard = async(element) => {
|
|
|
8
8
|
export const focusWithMouse = async(element) => {
|
|
9
9
|
const { x, y } = element.getBoundingClientRect();
|
|
10
10
|
await sendMouse({ type: 'click', position: [Math.ceil(x), Math.ceil(y)] });
|
|
11
|
-
await
|
|
11
|
+
await sendMouse({ type: 'move', position: [0, 0] });
|
|
12
12
|
};
|