@brightspace-ui/core 2.28.0 → 2.28.3
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.
|
@@ -550,11 +550,7 @@ class Filter extends FocusMixin(LocalizeCoreElement(RtlMixin(LitElement))) {
|
|
|
550
550
|
if (shouldRecount) this._setFilterCounts(dimension);
|
|
551
551
|
if (shouldUpdate) this.requestUpdate();
|
|
552
552
|
if (shouldResizeDropdown) {
|
|
553
|
-
|
|
554
|
-
if (singleDimension && this.opened) {
|
|
555
|
-
const dropdown = this.shadowRoot.querySelector('d2l-dropdown-content');
|
|
556
|
-
dropdown.requestRepositionNextResize(this.shadowRoot.querySelector('.d2l-filter-container'));
|
|
557
|
-
}
|
|
553
|
+
this._requestDropdownResize();
|
|
558
554
|
}
|
|
559
555
|
}
|
|
560
556
|
|
|
@@ -717,9 +713,18 @@ class Filter extends FocusMixin(LocalizeCoreElement(RtlMixin(LitElement))) {
|
|
|
717
713
|
break;
|
|
718
714
|
}
|
|
719
715
|
|
|
716
|
+
this._requestDropdownResize();
|
|
720
717
|
this.requestUpdate();
|
|
721
718
|
}
|
|
722
719
|
|
|
720
|
+
_requestDropdownResize() {
|
|
721
|
+
const singleDimension = this._dimensions.length === 1;
|
|
722
|
+
if (singleDimension && this.opened) {
|
|
723
|
+
const dropdown = this.shadowRoot.querySelector('d2l-dropdown-content');
|
|
724
|
+
dropdown.requestRepositionNextResize(this.shadowRoot.querySelector('.d2l-filter-container'));
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
|
|
723
728
|
_setDimensionChangeEvent(dimension, change, dimensionCleared) {
|
|
724
729
|
if (!this._changeEventsToDispatch.has(dimension.key)) {
|
|
725
730
|
this._changeEventsToDispatch.set(dimension.key, { dimensionKey: dimension.key, cleared: false, changes: new Map() });
|
|
@@ -47,7 +47,7 @@ If you are unable to add a semantically aligned ARIA role or attach the tooltip
|
|
|
47
47
|
|
|
48
48
|
The `d2l-tooltip` component is used to display additional information when users focus or hover on a point of interest.
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
### Best Practices
|
|
51
51
|
|
|
52
52
|
<!-- docs: start best practices -->
|
|
53
53
|
<!-- docs: start dos -->
|
|
@@ -20,13 +20,13 @@ The `d2l-validation-custom` component is used to add custom validation logic to
|
|
|
20
20
|
</d2l-validation-custom>
|
|
21
21
|
|
|
22
22
|
<script>
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
});
|
|
23
|
+
const validator = document.querySelector('d2l-validation-custom');
|
|
24
|
+
validator.addEventListener('d2l-validation-custom-validate', e => {
|
|
25
|
+
// Implement your custom validation logic
|
|
26
|
+
const myTextInput = e.detail.forElement;
|
|
27
|
+
const isValid = myTextInput.value === 'secret phrase';
|
|
28
|
+
e.detail.resolve(isValid);
|
|
29
|
+
});
|
|
30
30
|
</script>
|
|
31
31
|
```
|
|
32
32
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightspace-ui/core",
|
|
3
|
-
"version": "2.28.
|
|
3
|
+
"version": "2.28.3",
|
|
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",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"axe-core": "^4",
|
|
52
52
|
"chalk": "^5",
|
|
53
53
|
"eslint": "^8",
|
|
54
|
-
"eslint-config-brightspace": "^0.
|
|
54
|
+
"eslint-config-brightspace": "^0.18",
|
|
55
55
|
"eslint-plugin-html": "^6",
|
|
56
56
|
"eslint-plugin-import": "^2",
|
|
57
57
|
"eslint-plugin-lit": "^1",
|