mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-23 02:41:50 +03:00
07d89262f1
refs https://github.com/TryGhost/Team/issues/931 - adds handling for component atoms - add prototype button atom to test atom behaviour - add `Cmd+Shift+B` keyboard shortcut to create a dummy button atom when the `emailCardSegments` feature is enabled
25 lines
595 B
JavaScript
25 lines
595 B
JavaScript
import Service from '@ember/service';
|
|
import {tracked} from '@glimmer/tracking';
|
|
|
|
export default class KoenigUiService extends Service {
|
|
@tracked captionHasFocus = false;
|
|
@tracked inputHasFocus = false;
|
|
@tracked isDragging = false;
|
|
|
|
buttonCount = 0;
|
|
|
|
#focusedCaption = null;
|
|
|
|
captionGainedFocus(caption) {
|
|
this.captionHasFocus = true;
|
|
this.#focusedCaption = caption;
|
|
}
|
|
|
|
captionLostFocus(caption) {
|
|
if (this.#focusedCaption === caption) {
|
|
this.captionHasFocus = false;
|
|
this.#focusedCaption = null;
|
|
}
|
|
}
|
|
}
|