@brightspace-ui/core 3.288.2 → 3.288.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.
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { css, html, LitElement } from 'lit';
|
|
2
|
+
import { getFlag } from '../../helpers/flags.js';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* A button container component for button toggles.
|
|
@@ -52,13 +53,16 @@ class ButtonToggle extends LitElement {
|
|
|
52
53
|
`;
|
|
53
54
|
}
|
|
54
55
|
|
|
56
|
+
// remove with "button-toggle-no-change-event-on-prop-update" flag
|
|
55
57
|
updated(changedProperties) {
|
|
56
58
|
super.updated(changedProperties);
|
|
57
59
|
|
|
58
60
|
if (changedProperties.get('pressed') === undefined) return;
|
|
59
61
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
+
if (!getFlag('button-toggle-no-change-event-on-prop-update', true)) {
|
|
63
|
+
/** Dispatched when the pressed state changes */
|
|
64
|
+
this.dispatchEvent(new CustomEvent('d2l-button-toggle-change'));
|
|
65
|
+
}
|
|
62
66
|
}
|
|
63
67
|
|
|
64
68
|
focus() {
|
|
@@ -102,6 +106,10 @@ class ButtonToggle extends LitElement {
|
|
|
102
106
|
this.pressed = newPressed;
|
|
103
107
|
await this.updateComplete;
|
|
104
108
|
this.focus();
|
|
109
|
+
if (getFlag('button-toggle-no-change-event-on-prop-update', true)) {
|
|
110
|
+
/** Dispatched when the pressed state changes */
|
|
111
|
+
this.dispatchEvent(new CustomEvent('d2l-button-toggle-change'));
|
|
112
|
+
}
|
|
105
113
|
}
|
|
106
114
|
|
|
107
115
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightspace-ui/core",
|
|
3
|
-
"version": "3.288.
|
|
3
|
+
"version": "3.288.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",
|