@openproject/primer-view-components 0.48.0 → 0.48.1-rc.0c99d18a
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/app/assets/javascripts/app/components/primer/open_project/zen_mode_button.d.ts +1 -0
- package/app/assets/javascripts/primer_view_components.js +1 -1
- package/app/assets/javascripts/primer_view_components.js.map +1 -1
- package/app/components/primer/open_project/zen_mode_button.d.ts +1 -0
- package/app/components/primer/open_project/zen_mode_button.js +11 -0
- package/package.json +1 -1
|
@@ -10,6 +10,16 @@ let ZenModeButtonElement = class ZenModeButtonElement extends HTMLElement {
|
|
|
10
10
|
super(...arguments);
|
|
11
11
|
this.inZenMode = false;
|
|
12
12
|
}
|
|
13
|
+
dispatchZenModeStatus() {
|
|
14
|
+
// Create a new custom event
|
|
15
|
+
const event = new CustomEvent('zenModeToggled', {
|
|
16
|
+
detail: {
|
|
17
|
+
active: this.inZenMode,
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
// Dispatch the custom event
|
|
21
|
+
window.dispatchEvent(event);
|
|
22
|
+
}
|
|
13
23
|
deactivateZenMode() {
|
|
14
24
|
this.inZenMode = false;
|
|
15
25
|
this.button.setAttribute('aria-pressed', 'false');
|
|
@@ -31,6 +41,7 @@ let ZenModeButtonElement = class ZenModeButtonElement extends HTMLElement {
|
|
|
31
41
|
else {
|
|
32
42
|
this.activateZenMode();
|
|
33
43
|
}
|
|
44
|
+
this.dispatchZenModeStatus();
|
|
34
45
|
}
|
|
35
46
|
};
|
|
36
47
|
__decorate([
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openproject/primer-view-components",
|
|
3
|
-
"version": "0.48.
|
|
3
|
+
"version": "0.48.1-rc.0c99d18a",
|
|
4
4
|
"description": "ViewComponents of the Primer Design System for OpenProject",
|
|
5
5
|
"main": "app/assets/javascripts/primer_view_components.js",
|
|
6
6
|
"module": "app/components/primer/primer.js",
|