@omegagrid/core 0.10.2 → 0.10.4
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/dist/common/actions.d.ts +16 -0
- package/dist/common/actions.d.ts.map +1 -0
- package/dist/common/actions.js +14 -0
- package/dist/common/actions.js.map +1 -0
- package/dist/common/colors.d.ts +39 -0
- package/dist/common/colors.d.ts.map +1 -0
- package/dist/common/colors.js +59 -0
- package/dist/common/colors.js.map +1 -0
- package/dist/common/csv.d.ts +23 -0
- package/dist/common/csv.d.ts.map +1 -0
- package/dist/common/csv.js +93 -0
- package/dist/common/csv.js.map +1 -0
- package/dist/common/dates.d.ts +32 -0
- package/dist/common/dates.d.ts.map +1 -0
- package/dist/common/dates.js +172 -0
- package/dist/common/dates.js.map +1 -0
- package/dist/common/device.d.ts +2 -0
- package/dist/common/device.d.ts.map +1 -0
- package/dist/common/device.js +13 -0
- package/dist/common/device.js.map +1 -0
- package/dist/common/dom.d.ts +90 -0
- package/dist/common/dom.d.ts.map +1 -0
- package/dist/common/dom.js +308 -0
- package/dist/common/dom.js.map +1 -0
- package/dist/common/events.d.ts +15 -0
- package/dist/common/events.d.ts.map +1 -0
- package/dist/common/events.js +33 -0
- package/dist/common/events.js.map +1 -0
- package/dist/common/html.d.ts +3 -0
- package/dist/common/html.d.ts.map +1 -0
- package/dist/common/html.js +25 -0
- package/dist/common/html.js.map +1 -0
- package/dist/common/index.d.ts +19 -0
- package/dist/common/index.d.ts.map +1 -0
- package/dist/common/index.js +19 -0
- package/dist/common/index.js.map +1 -0
- package/dist/common/linkedList.d.ts +24 -0
- package/dist/common/linkedList.d.ts.map +1 -0
- package/dist/common/linkedList.js +65 -0
- package/dist/common/linkedList.js.map +1 -0
- package/dist/common/loaders.d.ts +17 -0
- package/dist/common/loaders.d.ts.map +1 -0
- package/dist/common/loaders.js +54 -0
- package/dist/common/loaders.js.map +1 -0
- package/dist/common/logger.d.ts +25 -0
- package/dist/common/logger.d.ts.map +1 -0
- package/dist/common/logger.js +57 -0
- package/dist/common/logger.js.map +1 -0
- package/dist/common/matrix.d.ts +6 -0
- package/dist/common/matrix.d.ts.map +1 -0
- package/dist/common/matrix.js +17 -0
- package/dist/common/matrix.js.map +1 -0
- package/dist/common/numbers.d.ts +26 -0
- package/dist/common/numbers.d.ts.map +1 -0
- package/dist/common/numbers.js +239 -0
- package/dist/common/numbers.js.map +1 -0
- package/dist/common/options.d.ts +17 -0
- package/dist/common/options.d.ts.map +1 -0
- package/dist/common/options.js +29 -0
- package/dist/common/options.js.map +1 -0
- package/dist/common/paper.d.ts +8 -0
- package/dist/common/paper.d.ts.map +1 -0
- package/dist/common/paper.js +17 -0
- package/dist/common/paper.js.map +1 -0
- package/dist/common/shortcutManager.d.ts +17 -0
- package/dist/common/shortcutManager.d.ts.map +1 -0
- package/dist/common/shortcutManager.js +49 -0
- package/dist/common/shortcutManager.js.map +1 -0
- package/dist/common/tree.d.ts +87 -0
- package/dist/common/tree.d.ts.map +1 -0
- package/dist/common/tree.js +204 -0
- package/dist/common/tree.js.map +1 -0
- package/dist/common/utils.d.ts +30 -0
- package/dist/common/utils.d.ts.map +1 -0
- package/dist/common/utils.js +136 -0
- package/dist/common/utils.js.map +1 -0
- package/dist/constants.d.ts +48 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +24 -0
- package/dist/constants.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/model/adapter.d.ts +8 -0
- package/dist/model/adapter.d.ts.map +1 -0
- package/dist/model/adapter.js +13 -0
- package/dist/model/adapter.js.map +1 -0
- package/dist/model/component.d.ts +19 -0
- package/dist/model/component.d.ts.map +1 -0
- package/dist/model/component.js +84 -0
- package/dist/model/component.js.map +1 -0
- package/dist/model/componentSlice.d.ts +8 -0
- package/dist/model/componentSlice.d.ts.map +1 -0
- package/dist/model/componentSlice.js +10 -0
- package/dist/model/componentSlice.js.map +1 -0
- package/dist/model/componentStore.d.ts +12 -0
- package/dist/model/componentStore.d.ts.map +1 -0
- package/dist/model/componentStore.js +26 -0
- package/dist/model/componentStore.js.map +1 -0
- package/dist/model/index.d.ts +6 -0
- package/dist/model/index.d.ts.map +1 -0
- package/dist/model/index.js +6 -0
- package/dist/model/index.js.map +1 -0
- package/dist/model/plugins.d.ts +13 -0
- package/dist/model/plugins.d.ts.map +1 -0
- package/dist/model/plugins.js +27 -0
- package/dist/model/plugins.js.map +1 -0
- package/dist/themes/definitions/tmDark.d.ts +4 -0
- package/dist/themes/definitions/tmDark.d.ts.map +1 -0
- package/dist/themes/definitions/tmDark.js +83 -0
- package/dist/themes/definitions/tmDark.js.map +1 -0
- package/dist/themes/definitions/tmLight.d.ts +4 -0
- package/dist/themes/definitions/tmLight.d.ts.map +1 -0
- package/dist/themes/definitions/tmLight.js +83 -0
- package/dist/themes/definitions/tmLight.js.map +1 -0
- package/dist/themes/helpers.d.ts +7 -0
- package/dist/themes/helpers.d.ts.map +1 -0
- package/dist/themes/helpers.js +34 -0
- package/dist/themes/helpers.js.map +1 -0
- package/dist/themes/index.d.ts +18 -0
- package/dist/themes/index.d.ts.map +1 -0
- package/dist/themes/index.js +48 -0
- package/dist/themes/index.js.map +1 -0
- package/dist/themes/mixins.d.ts +10 -0
- package/dist/themes/mixins.d.ts.map +1 -0
- package/dist/themes/mixins.js +39 -0
- package/dist/themes/mixins.js.map +1 -0
- package/dist/themes/transformations.d.ts +9 -0
- package/dist/themes/transformations.d.ts.map +1 -0
- package/dist/themes/transformations.js +48 -0
- package/dist/themes/transformations.js.map +1 -0
- package/dist/types.d.ts +130 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +12 -0
- package/dist/types.js.map +1 -0
- package/dist/ui/accordion.d.ts +16 -0
- package/dist/ui/accordion.d.ts.map +1 -0
- package/dist/ui/accordion.js +209 -0
- package/dist/ui/accordion.js.map +1 -0
- package/dist/ui/alert.d.ts +15 -0
- package/dist/ui/alert.d.ts.map +1 -0
- package/dist/ui/alert.js +101 -0
- package/dist/ui/alert.js.map +1 -0
- package/dist/ui/baseElement.d.ts +7 -0
- package/dist/ui/baseElement.d.ts.map +1 -0
- package/dist/ui/baseElement.js +10 -0
- package/dist/ui/baseElement.js.map +1 -0
- package/dist/ui/button.d.ts +21 -0
- package/dist/ui/button.d.ts.map +1 -0
- package/dist/ui/button.js +100 -0
- package/dist/ui/button.js.map +1 -0
- package/dist/ui/button.style.d.ts +2 -0
- package/dist/ui/button.style.d.ts.map +1 -0
- package/dist/ui/button.style.js +60 -0
- package/dist/ui/button.style.js.map +1 -0
- package/dist/ui/checkbox.d.ts +14 -0
- package/dist/ui/checkbox.d.ts.map +1 -0
- package/dist/ui/checkbox.js +47 -0
- package/dist/ui/checkbox.js.map +1 -0
- package/dist/ui/close.d.ts +6 -0
- package/dist/ui/close.d.ts.map +1 -0
- package/dist/ui/close.js +33 -0
- package/dist/ui/close.js.map +1 -0
- package/dist/ui/colorpicker.d.ts +24 -0
- package/dist/ui/colorpicker.d.ts.map +1 -0
- package/dist/ui/colorpicker.js +228 -0
- package/dist/ui/colorpicker.js.map +1 -0
- package/dist/ui/container.d.ts +39 -0
- package/dist/ui/container.d.ts.map +1 -0
- package/dist/ui/container.js +313 -0
- package/dist/ui/container.js.map +1 -0
- package/dist/ui/dropdown.d.ts +48 -0
- package/dist/ui/dropdown.d.ts.map +1 -0
- package/dist/ui/dropdown.js +300 -0
- package/dist/ui/dropdown.js.map +1 -0
- package/dist/ui/dropdownColorPicker.d.ts +12 -0
- package/dist/ui/dropdownColorPicker.d.ts.map +1 -0
- package/dist/ui/dropdownColorPicker.js +60 -0
- package/dist/ui/dropdownColorPicker.js.map +1 -0
- package/dist/ui/dropdownList.d.ts +8 -0
- package/dist/ui/dropdownList.d.ts.map +1 -0
- package/dist/ui/dropdownList.js +48 -0
- package/dist/ui/dropdownList.js.map +1 -0
- package/dist/ui/dropdownMenu.d.ts +11 -0
- package/dist/ui/dropdownMenu.d.ts.map +1 -0
- package/dist/ui/dropdownMenu.js +61 -0
- package/dist/ui/dropdownMenu.js.map +1 -0
- package/dist/ui/expander.d.ts +28 -0
- package/dist/ui/expander.d.ts.map +1 -0
- package/dist/ui/expander.js +144 -0
- package/dist/ui/expander.js.map +1 -0
- package/dist/ui/fileInput.d.ts +24 -0
- package/dist/ui/fileInput.d.ts.map +1 -0
- package/dist/ui/fileInput.js +130 -0
- package/dist/ui/fileInput.js.map +1 -0
- package/dist/ui/fileInput.style.d.ts +2 -0
- package/dist/ui/fileInput.style.d.ts.map +1 -0
- package/dist/ui/fileInput.style.js +73 -0
- package/dist/ui/fileInput.style.js.map +1 -0
- package/dist/ui/floatingWindow.d.ts +19 -0
- package/dist/ui/floatingWindow.d.ts.map +1 -0
- package/dist/ui/floatingWindow.js +87 -0
- package/dist/ui/floatingWindow.js.map +1 -0
- package/dist/ui/icon.d.ts +46 -0
- package/dist/ui/icon.d.ts.map +1 -0
- package/dist/ui/icon.js +189 -0
- package/dist/ui/icon.js.map +1 -0
- package/dist/ui/icon.style.d.ts +2 -0
- package/dist/ui/icon.style.d.ts.map +1 -0
- package/dist/ui/icon.style.js +556 -0
- package/dist/ui/icon.style.js.map +1 -0
- package/dist/ui/images.d.ts +2 -0
- package/dist/ui/images.d.ts.map +1 -0
- package/dist/ui/images.js +14 -0
- package/dist/ui/images.js.map +1 -0
- package/dist/ui/index.d.ts +32 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +32 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/input.d.ts +12 -0
- package/dist/ui/input.d.ts.map +1 -0
- package/dist/ui/input.js +45 -0
- package/dist/ui/input.js.map +1 -0
- package/dist/ui/input.style.d.ts +2 -0
- package/dist/ui/input.style.d.ts.map +1 -0
- package/dist/ui/input.style.js +36 -0
- package/dist/ui/input.style.js.map +1 -0
- package/dist/ui/label.d.ts +16 -0
- package/dist/ui/label.d.ts.map +1 -0
- package/dist/ui/label.js +90 -0
- package/dist/ui/label.js.map +1 -0
- package/dist/ui/list.d.ts +87 -0
- package/dist/ui/list.d.ts.map +1 -0
- package/dist/ui/list.js +427 -0
- package/dist/ui/list.js.map +1 -0
- package/dist/ui/list.style.d.ts +2 -0
- package/dist/ui/list.style.d.ts.map +1 -0
- package/dist/ui/list.style.js +35 -0
- package/dist/ui/list.style.js.map +1 -0
- package/dist/ui/loader.d.ts +6 -0
- package/dist/ui/loader.d.ts.map +1 -0
- package/dist/ui/loader.js +25 -0
- package/dist/ui/loader.js.map +1 -0
- package/dist/ui/menu.d.ts +41 -0
- package/dist/ui/menu.d.ts.map +1 -0
- package/dist/ui/menu.js +154 -0
- package/dist/ui/menu.js.map +1 -0
- package/dist/ui/menu.style.d.ts +3 -0
- package/dist/ui/menu.style.d.ts.map +1 -0
- package/dist/ui/menu.style.js +50 -0
- package/dist/ui/menu.style.js.map +1 -0
- package/dist/ui/numericInput.d.ts +37 -0
- package/dist/ui/numericInput.d.ts.map +1 -0
- package/dist/ui/numericInput.js +175 -0
- package/dist/ui/numericInput.js.map +1 -0
- package/dist/ui/numericInput.style.d.ts +2 -0
- package/dist/ui/numericInput.style.d.ts.map +1 -0
- package/dist/ui/numericInput.style.js +29 -0
- package/dist/ui/numericInput.style.js.map +1 -0
- package/dist/ui/overlay.d.ts +17 -0
- package/dist/ui/overlay.d.ts.map +1 -0
- package/dist/ui/overlay.js +87 -0
- package/dist/ui/overlay.js.map +1 -0
- package/dist/ui/overlay.style.d.ts +2 -0
- package/dist/ui/overlay.style.d.ts.map +1 -0
- package/dist/ui/overlay.style.js +46 -0
- package/dist/ui/overlay.style.js.map +1 -0
- package/dist/ui/panel.d.ts +25 -0
- package/dist/ui/panel.d.ts.map +1 -0
- package/dist/ui/panel.js +151 -0
- package/dist/ui/panel.js.map +1 -0
- package/dist/ui/panel.style.d.ts +2 -0
- package/dist/ui/panel.style.d.ts.map +1 -0
- package/dist/ui/panel.style.js +73 -0
- package/dist/ui/panel.style.js.map +1 -0
- package/dist/ui/sizer.d.ts +53 -0
- package/dist/ui/sizer.d.ts.map +1 -0
- package/dist/ui/sizer.js +203 -0
- package/dist/ui/sizer.js.map +1 -0
- package/dist/ui/slider.d.ts +52 -0
- package/dist/ui/slider.d.ts.map +1 -0
- package/dist/ui/slider.js +213 -0
- package/dist/ui/slider.js.map +1 -0
- package/dist/ui/slider.style.d.ts +2 -0
- package/dist/ui/slider.style.d.ts.map +1 -0
- package/dist/ui/slider.style.js +61 -0
- package/dist/ui/slider.style.js.map +1 -0
- package/dist/ui/sortableList.d.ts +39 -0
- package/dist/ui/sortableList.d.ts.map +1 -0
- package/dist/ui/sortableList.js +167 -0
- package/dist/ui/sortableList.js.map +1 -0
- package/dist/ui/splitContainer.d.ts +52 -0
- package/dist/ui/splitContainer.d.ts.map +1 -0
- package/dist/ui/splitContainer.js +252 -0
- package/dist/ui/splitContainer.js.map +1 -0
- package/dist/ui/splitContainer.style.d.ts +2 -0
- package/dist/ui/splitContainer.style.d.ts.map +1 -0
- package/dist/ui/splitContainer.style.js +62 -0
- package/dist/ui/splitContainer.style.js.map +1 -0
- package/dist/ui/switch.d.ts +22 -0
- package/dist/ui/switch.d.ts.map +1 -0
- package/dist/ui/switch.js +83 -0
- package/dist/ui/switch.js.map +1 -0
- package/dist/ui/switch.style.d.ts +2 -0
- package/dist/ui/switch.style.d.ts.map +1 -0
- package/dist/ui/switch.style.js +149 -0
- package/dist/ui/switch.style.js.map +1 -0
- package/dist/ui/tooltip.d.ts +24 -0
- package/dist/ui/tooltip.d.ts.map +1 -0
- package/dist/ui/tooltip.js +143 -0
- package/dist/ui/tooltip.js.map +1 -0
- package/dist/ui/tooltip.style.d.ts +2 -0
- package/dist/ui/tooltip.style.d.ts.map +1 -0
- package/dist/ui/tooltip.style.js +112 -0
- package/dist/ui/tooltip.style.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { LitElement, html, css } from 'lit';
|
|
8
|
+
import { customElement, property, query } from 'lit/decorators.js';
|
|
9
|
+
import { ColorTypes } from '../types';
|
|
10
|
+
import * as dom from '../common/dom';
|
|
11
|
+
import { unsafeHTML } from 'lit/directives/unsafe-html.js';
|
|
12
|
+
import { createRef, ref } from 'lit-html/directives/ref.js';
|
|
13
|
+
import { guard } from 'lit/directives/guard.js';
|
|
14
|
+
import { utils } from '../common';
|
|
15
|
+
import { colorable } from '../themes';
|
|
16
|
+
import constants from '../constants';
|
|
17
|
+
export class DropdownEvent extends Event {
|
|
18
|
+
constructor(event) {
|
|
19
|
+
super(`dropdown.${event}`);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
let DropdownContainer = class DropdownContainer extends LitElement {
|
|
23
|
+
constructor() {
|
|
24
|
+
super();
|
|
25
|
+
this.color = ColorTypes.Accent;
|
|
26
|
+
this.render = () => html `<div><slot name="inner-content"></slot></div>`;
|
|
27
|
+
this.addEventListener('mousedown', (e) => e.stopPropagation());
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
DropdownContainer.styles = css `
|
|
31
|
+
:host {
|
|
32
|
+
background-color: var(--og-background-color);
|
|
33
|
+
position: absolute;
|
|
34
|
+
overflow: hidden;
|
|
35
|
+
box-sizing: border-box;
|
|
36
|
+
color: var(--og-text-color);
|
|
37
|
+
z-index: 60000;
|
|
38
|
+
font-size: var(--og-font-size);
|
|
39
|
+
font-family: var(--og-font-family);
|
|
40
|
+
border-radius: var(--og-base-radius);
|
|
41
|
+
box-shadow: var(--og-base-shadow);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
:host(.radiusfix-down) {
|
|
45
|
+
border-top-left-radius: 0;
|
|
46
|
+
border-top-right-radius: 0;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
:host(.radiusfix-up) {
|
|
50
|
+
border-bottom-left-radius: 0;
|
|
51
|
+
border-bottom-right-radius: 0;
|
|
52
|
+
}
|
|
53
|
+
`;
|
|
54
|
+
__decorate([
|
|
55
|
+
property({ type: String, reflect: true })
|
|
56
|
+
], DropdownContainer.prototype, "color", void 0);
|
|
57
|
+
DropdownContainer = __decorate([
|
|
58
|
+
customElement('og-dropdown-container'),
|
|
59
|
+
colorable({ props: ['border'] })
|
|
60
|
+
], DropdownContainer);
|
|
61
|
+
export { DropdownContainer };
|
|
62
|
+
let Dropdown = class Dropdown extends LitElement {
|
|
63
|
+
constructor() {
|
|
64
|
+
super(...arguments);
|
|
65
|
+
this.alignment = 'right';
|
|
66
|
+
this.openDirection = 'down';
|
|
67
|
+
this.positionOffset = 0;
|
|
68
|
+
this.dropdownParent = document.body;
|
|
69
|
+
this.animation = 0.1;
|
|
70
|
+
this.color = ColorTypes.Accent;
|
|
71
|
+
this.noCaret = false;
|
|
72
|
+
this.disabled = false;
|
|
73
|
+
this.dropdownRef = createRef();
|
|
74
|
+
this._onDocumentMouseDown = (e) => {
|
|
75
|
+
for (const elm of e.composedPath()) {
|
|
76
|
+
if (elm == this.dropdown || elm == this)
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
this.close();
|
|
80
|
+
};
|
|
81
|
+
this._onMousedown = async () => this.toggle();
|
|
82
|
+
this.renderDropdown = () => html `
|
|
83
|
+
<og-dropdown-container ${ref(this.dropdownRef)}
|
|
84
|
+
style="display: none">
|
|
85
|
+
</og-dropdown-container>
|
|
86
|
+
`;
|
|
87
|
+
this.renderLabel = () => {
|
|
88
|
+
if (utils.isString(this.label)) {
|
|
89
|
+
return this.label === '' ? unsafeHTML(' ') : html `<div class="text">${this.label}</div>`;
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
return this.label;
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
this.render = () => html `
|
|
96
|
+
<og-button
|
|
97
|
+
@mousedown="${this._onMousedown}"
|
|
98
|
+
class="main"
|
|
99
|
+
color="${this.color}"
|
|
100
|
+
?disabled="${this.disabled}"
|
|
101
|
+
.icon="${this.icon}"
|
|
102
|
+
.caret="${this.noCaret ? 'none' : this.openDirection}">
|
|
103
|
+
${this.hasLabelSlot ? html `
|
|
104
|
+
<div class="label" slot="content"><slot name="label"></slot></div>
|
|
105
|
+
` : guard([this.label], () => (this.hasLabel ? html `
|
|
106
|
+
<div class="label" slot="content">${this.renderLabel()}</div>
|
|
107
|
+
` : ''))}
|
|
108
|
+
</og-button>
|
|
109
|
+
|
|
110
|
+
${this.renderDropdown()}
|
|
111
|
+
`;
|
|
112
|
+
}
|
|
113
|
+
get dropdown() { return this.dropdownRef?.value; }
|
|
114
|
+
get isOpen() { return this.dropdown && !dom.isHidden(this.dropdown); }
|
|
115
|
+
connectedCallback() {
|
|
116
|
+
super.connectedCallback();
|
|
117
|
+
this.tabIndex = 0;
|
|
118
|
+
}
|
|
119
|
+
animateDropdown(seconds) {
|
|
120
|
+
const height = this.dropdown.offsetHeight;
|
|
121
|
+
dom.setSize(this.dropdown, { h: 0 });
|
|
122
|
+
this.dropdown.style.transition = `height ${seconds}s ease-in-out`;
|
|
123
|
+
setTimeout(() => dom.setSize(this.dropdown, { h: height }), 0);
|
|
124
|
+
setTimeout(() => {
|
|
125
|
+
this.dropdown.style.height = 'auto';
|
|
126
|
+
this.dropdown.style.transition = '';
|
|
127
|
+
this.layout();
|
|
128
|
+
}, seconds * 1000);
|
|
129
|
+
}
|
|
130
|
+
async open() {
|
|
131
|
+
this.dispatchEvent(new DropdownEvent('beforeOpen'));
|
|
132
|
+
await this.updateComplete;
|
|
133
|
+
if (this.dropdown.parentElement !== this.dropdownParent) {
|
|
134
|
+
this.dropdownParent.appendChild(this.dropdown);
|
|
135
|
+
}
|
|
136
|
+
if (this.children.length > 0 && !this._contentElm) {
|
|
137
|
+
this._contentElm = [...this.children].find(elm => elm.slot == 'content');
|
|
138
|
+
if (this._contentElm) {
|
|
139
|
+
this._contentElm.slot = 'inner-content';
|
|
140
|
+
this.dropdown.appendChild(this._contentElm);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
if (this.width > 0)
|
|
144
|
+
dom.setSize(this.dropdown, { w: this.width });
|
|
145
|
+
dom.showElement(this.dropdown);
|
|
146
|
+
this.requestUpdate();
|
|
147
|
+
await this.dropdown.updateComplete;
|
|
148
|
+
this.dispatchEvent(new DropdownEvent('open'));
|
|
149
|
+
this.layout();
|
|
150
|
+
if (this.animation > 0)
|
|
151
|
+
this.animateDropdown(this.animation);
|
|
152
|
+
document.body.addEventListener('mousedown', this._onDocumentMouseDown);
|
|
153
|
+
}
|
|
154
|
+
close() {
|
|
155
|
+
if (this.dropdown)
|
|
156
|
+
dom.hideElement(this.dropdown);
|
|
157
|
+
this.layout();
|
|
158
|
+
document.body.removeEventListener('mousedown', this._onDocumentMouseDown);
|
|
159
|
+
}
|
|
160
|
+
toggle() {
|
|
161
|
+
if (this.disabled)
|
|
162
|
+
return;
|
|
163
|
+
if (this.isOpen)
|
|
164
|
+
this.close();
|
|
165
|
+
else
|
|
166
|
+
this.open();
|
|
167
|
+
}
|
|
168
|
+
disconnectedCallback() {
|
|
169
|
+
this.dropdown?.remove();
|
|
170
|
+
super.disconnectedCallback();
|
|
171
|
+
}
|
|
172
|
+
get hasLabelSlot() {
|
|
173
|
+
return this.querySelector('[slot="label"]') != null;
|
|
174
|
+
}
|
|
175
|
+
get hasLabel() {
|
|
176
|
+
return this.label !== '' && this.label != null;
|
|
177
|
+
}
|
|
178
|
+
updated(props) {
|
|
179
|
+
super.updated(props);
|
|
180
|
+
if (this.dropdown)
|
|
181
|
+
this.dropdown.color = this.color == ColorTypes.Transparent ? ColorTypes.Accent : this.color;
|
|
182
|
+
}
|
|
183
|
+
get useRadiusFix() {
|
|
184
|
+
return this.isOpen && this.color != ColorTypes.Transparent;
|
|
185
|
+
}
|
|
186
|
+
layout() {
|
|
187
|
+
this.classList.toggle(`radiusfix-${this.openDirection}`, this.useRadiusFix);
|
|
188
|
+
if (!this.dropdown)
|
|
189
|
+
return;
|
|
190
|
+
this.dropdown.classList.toggle(`radiusfix-${this.openDirection}`, this.useRadiusFix);
|
|
191
|
+
if (!this.isOpen)
|
|
192
|
+
return;
|
|
193
|
+
const offset = dom.getElementOffset(this, this.dropdownParent);
|
|
194
|
+
dom.setSize(this.dropdown, { w: this.offsetWidth }, true);
|
|
195
|
+
const pos = { t: 'unset', b: 'unset', l: 'unset', r: 'unset' };
|
|
196
|
+
if (this.openDirection == 'down') {
|
|
197
|
+
pos.t = offset.top + this.offsetHeight - 1;
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
pos.t = offset.top - this.dropdown.offsetHeight + 1;
|
|
201
|
+
}
|
|
202
|
+
if (this.alignment == 'left') {
|
|
203
|
+
this.dropdown.style.right = 'auto';
|
|
204
|
+
pos.l = this.positionOffset + offset.left;
|
|
205
|
+
}
|
|
206
|
+
else {
|
|
207
|
+
this.dropdown.style.left = 'auto';
|
|
208
|
+
pos.r = this.dropdownParent.clientWidth - this.positionOffset - offset.left - this.offsetWidth;
|
|
209
|
+
}
|
|
210
|
+
dom.setPosition(this.dropdown, pos);
|
|
211
|
+
dom.fixElementPosition(this.dropdown);
|
|
212
|
+
}
|
|
213
|
+
};
|
|
214
|
+
Dropdown.styles = [css `
|
|
215
|
+
:host {
|
|
216
|
+
box-sizing: border-box;
|
|
217
|
+
display: flex;
|
|
218
|
+
align-items: stretch;
|
|
219
|
+
flex-direction: row;
|
|
220
|
+
font-size: var(--og-font-size);
|
|
221
|
+
font-family: var(--og-font-family);
|
|
222
|
+
cursor: pointer;
|
|
223
|
+
user-select: none;
|
|
224
|
+
outline: none;
|
|
225
|
+
border-radius: var(--og-base-radius);
|
|
226
|
+
height: ${constants.BUTTON_HEIGHT}px;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
:host(.radiusfix-down) {
|
|
230
|
+
border-bottom-left-radius: 0;
|
|
231
|
+
border-bottom-right-radius: 0;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
:host(.radiusfix-up) {
|
|
235
|
+
border-top-left-radius: 0;
|
|
236
|
+
border-top-right-radius: 0;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
:host([disabled]) {
|
|
240
|
+
border-color: var(--og-colortype-gray-border-color);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
div.text {
|
|
244
|
+
flex: 1;
|
|
245
|
+
color: var(--og-text-color-1);
|
|
246
|
+
padding-left: 2px;
|
|
247
|
+
white-space: nowrap;
|
|
248
|
+
text-overflow: ellipsis;
|
|
249
|
+
overflow: hidden;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
og-button {
|
|
253
|
+
flex: 1;
|
|
254
|
+
border-radius: 0;
|
|
255
|
+
border: none;
|
|
256
|
+
height: 100%;
|
|
257
|
+
}
|
|
258
|
+
`];
|
|
259
|
+
__decorate([
|
|
260
|
+
property({ type: String })
|
|
261
|
+
], Dropdown.prototype, "alignment", void 0);
|
|
262
|
+
__decorate([
|
|
263
|
+
property({ type: String, reflect: true })
|
|
264
|
+
], Dropdown.prototype, "openDirection", void 0);
|
|
265
|
+
__decorate([
|
|
266
|
+
property({ type: Number })
|
|
267
|
+
], Dropdown.prototype, "positionOffset", void 0);
|
|
268
|
+
__decorate([
|
|
269
|
+
property({ type: Object })
|
|
270
|
+
], Dropdown.prototype, "dropdownParent", void 0);
|
|
271
|
+
__decorate([
|
|
272
|
+
property({ type: Number })
|
|
273
|
+
], Dropdown.prototype, "animation", void 0);
|
|
274
|
+
__decorate([
|
|
275
|
+
property()
|
|
276
|
+
], Dropdown.prototype, "label", void 0);
|
|
277
|
+
__decorate([
|
|
278
|
+
property()
|
|
279
|
+
], Dropdown.prototype, "icon", void 0);
|
|
280
|
+
__decorate([
|
|
281
|
+
property({ type: Number })
|
|
282
|
+
], Dropdown.prototype, "width", void 0);
|
|
283
|
+
__decorate([
|
|
284
|
+
property({ type: String, reflect: true })
|
|
285
|
+
], Dropdown.prototype, "color", void 0);
|
|
286
|
+
__decorate([
|
|
287
|
+
property({ type: Boolean })
|
|
288
|
+
], Dropdown.prototype, "noCaret", void 0);
|
|
289
|
+
__decorate([
|
|
290
|
+
property({ type: Boolean, reflect: true })
|
|
291
|
+
], Dropdown.prototype, "disabled", void 0);
|
|
292
|
+
__decorate([
|
|
293
|
+
query('.label')
|
|
294
|
+
], Dropdown.prototype, "labelElm", void 0);
|
|
295
|
+
Dropdown = __decorate([
|
|
296
|
+
customElement('og-dropdown'),
|
|
297
|
+
colorable({ props: ['border'] })
|
|
298
|
+
], Dropdown);
|
|
299
|
+
export { Dropdown };
|
|
300
|
+
//# sourceMappingURL=dropdown.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdown.js","sourceRoot":"","sources":["../../src/ui/dropdown.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAkB,MAAM,KAAK,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,UAAU,EAA0C,MAAM,UAAU,CAAC;AAC9E,OAAO,KAAK,GAAG,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAEhD,OAAO,EA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AC;IAC5B,SAAS,CAAC,EAAC,KAAK,EAAE,CAAC,QAAQ,CAAC,EAAC,CAAC;GAClB,QAAQ,CAgPpB","sourcesContent":["import { LitElement, html, css, TemplateResult } from 'lit';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { ColorTypes, CssPosition, Layout, VerticalDirection } from '../types';\nimport * as dom from '../common/dom';\nimport { unsafeHTML } from 'lit/directives/unsafe-html.js';\nimport { createRef, ref } from 'lit-html/directives/ref.js';\nimport { guard } from 'lit/directives/guard.js';\nimport { IconSpec } from './icon';\nimport { utils } from '../common';\nimport { colorable } from '../themes';\nimport constants from '../constants';\n\nexport class DropdownEvent extends Event {\n\n\tconstructor(event: string) {\n\t\tsuper(`dropdown.${event}`);\n\t}\n}\n\n@customElement('og-dropdown-container')\n@colorable({props: ['border']})\nexport class DropdownContainer extends LitElement {\n\n\tstatic styles = css`\n\t\t:host {\n\t\t\tbackground-color: var(--og-background-color);\n\t\t\tposition: absolute;\n\t\t\toverflow: hidden;\n\t\t\tbox-sizing: border-box;\n\t\t\tcolor: var(--og-text-color);\n\t\t\tz-index: 60000;\n\t\t\tfont-size: var(--og-font-size);\n\t\t\tfont-family: var(--og-font-family);\n\t\t\tborder-radius: var(--og-base-radius);\n\t\t\tbox-shadow: var(--og-base-shadow);\n\t\t}\n\n\t\t:host(.radiusfix-down) {\n\t\t\tborder-top-left-radius: 0;\n\t\t\tborder-top-right-radius: 0;\n\t\t}\n\n\t\t:host(.radiusfix-up) {\n\t\t\tborder-bottom-left-radius: 0;\n\t\t\tborder-bottom-right-radius: 0;\n\t\t}\n\t`;\n\n\t@property({type: String, reflect: true})\n\tcolor = ColorTypes.Accent;\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis.addEventListener('mousedown', (e: MouseEvent) => e.stopPropagation());\n\t}\n\n\trender = () => html`<div><slot name=\"inner-content\"></slot></div>`;\n}\n\n@customElement('og-dropdown')\n@colorable({props: ['border']})\nexport class Dropdown extends LitElement implements Layout {\n\n\tstatic styles = [css`\n\t\t:host {\n\t\t\tbox-sizing: border-box;\n\t\t\tdisplay: flex;\n\t\t\talign-items: stretch;\n\t\t\tflex-direction: row;\n\t\t\tfont-size: var(--og-font-size);\n\t\t\tfont-family: var(--og-font-family);\n\t\t\tcursor: pointer;\n\t\t\tuser-select: none;\n\t\t\toutline: none;\n\t\t\tborder-radius: var(--og-base-radius);\n\t\t\theight: ${constants.BUTTON_HEIGHT}px;\n\t\t}\n\n\t\t:host(.radiusfix-down) {\n\t\t\tborder-bottom-left-radius: 0;\n\t\t\tborder-bottom-right-radius: 0;\n\t\t}\n\n\t\t:host(.radiusfix-up) {\n\t\t\tborder-top-left-radius: 0;\n\t\t\tborder-top-right-radius: 0;\n\t\t}\n\n\t\t:host([disabled]) {\n\t\t\tborder-color: var(--og-colortype-gray-border-color);\n\t\t}\n\n\t\tdiv.text {\n\t\t\tflex: 1;\n\t\t\tcolor: var(--og-text-color-1);\n\t\t\tpadding-left: 2px;\n\t\t\twhite-space: nowrap;\n\t\t\ttext-overflow: ellipsis;\n\t\t\toverflow: hidden;\n\t\t}\n\n\t\tog-button {\n\t\t\tflex: 1;\n\t\t\tborder-radius: 0;\n\t\t\tborder: none;\n\t\t\theight: 100%;\n\t\t}\n\t`];\n\n\t@property({type: String})\n\talignment: 'left'|'right' = 'right';\n\n\t@property({type: String, reflect: true})\n\topenDirection: VerticalDirection = 'down';\n\n\t@property({type: Number})\n\tpositionOffset = 0;\n\n\t@property({type: Object})\n\tdropdownParent: HTMLElement = document.body;\n\n\t@property({type: Number})\n\tanimation = 0.1;\n\n\t@property()\n\tlabel: string|HTMLElement|TemplateResult;\n\n\t@property()\n\ticon: IconSpec|string;\n\n\t@property({type: Number})\n\twidth: number;\n\n\t@property({type: String, reflect: true})\n\tcolor = ColorTypes.Accent;\n\n\t@property({type: Boolean})\n\tnoCaret = false;\n\n\t@property({type: Boolean, reflect: true})\n\tdisabled = false;\n\n\t@query('.label')\n\tlabelElm: HTMLDivElement;\n\n\tprivate _contentElm: HTMLElement;\n\n\tprotected dropdownRef = createRef<DropdownContainer>();\n\tget dropdown() { return this.dropdownRef?.value }\n\n\tget isOpen() { return this.dropdown && !dom.isHidden(this.dropdown) }\n\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback();\n\t\tthis.tabIndex = 0;\n\t}\n\n\t_onDocumentMouseDown = (e: MouseEvent) => {\n\t\tfor (const elm of e.composedPath()) {\n\t\t\tif (elm == this.dropdown || elm == this) return;\n\t\t}\n\t\tthis.close();\n\t}\n\n\tanimateDropdown(seconds: number) {\n\t\tconst height = this.dropdown.offsetHeight;\n\t\tdom.setSize(this.dropdown, {h: 0});\n\t\tthis.dropdown.style.transition = `height ${seconds}s ease-in-out`;\n\t\tsetTimeout(() => dom.setSize(this.dropdown, {h: height}), 0);\n\t\tsetTimeout(() => {\n\t\t\tthis.dropdown.style.height = 'auto';\n\t\t\tthis.dropdown.style.transition = '';\n\t\t\tthis.layout();\n\t\t}, seconds * 1000);\n\t}\n\n\tasync open() {\n\t\tthis.dispatchEvent(new DropdownEvent('beforeOpen'));\n\t\tawait this.updateComplete;\n\t\t\n\t\tif (this.dropdown.parentElement !== this.dropdownParent) {\n\t\t\tthis.dropdownParent.appendChild(this.dropdown);\n\t\t}\n\n\t\tif (this.children.length > 0 && !this._contentElm) {\n\t\t\tthis._contentElm = [...this.children].find(elm => elm.slot == 'content') as HTMLElement;\n\t\t\tif (this._contentElm) {\n\t\t\t\tthis._contentElm.slot = 'inner-content';\n\t\t\t\tthis.dropdown.appendChild(this._contentElm);\n\t\t\t}\n\t\t}\n\n\t\tif (this.width > 0) dom.setSize(this.dropdown, {w: this.width});\n\t\tdom.showElement(this.dropdown);\n\t\tthis.requestUpdate();\n\t\tawait this.dropdown.updateComplete;\n\t\tthis.dispatchEvent(new DropdownEvent('open'));\n\t\tthis.layout();\n\n\t\tif (this.animation > 0) this.animateDropdown(this.animation);\n\n\t\tdocument.body.addEventListener('mousedown', this._onDocumentMouseDown);\n\t}\n\n\tclose() {\n\t\tif (this.dropdown) dom.hideElement(this.dropdown);\n\t\tthis.layout();\n\t\tdocument.body.removeEventListener('mousedown', this._onDocumentMouseDown);\n\t}\n\n\ttoggle() {\n\t\tif (this.disabled) return;\n\t\tif (this.isOpen) this.close();\n\t\telse this.open();\n\t}\n\n\t_onMousedown = async () => this.toggle();\n\n\tdisconnectedCallback() {\n\t\tthis.dropdown?.remove();\n\t\tsuper.disconnectedCallback();\n\t}\n\n\trenderDropdown = () => html`\n\t\t<og-dropdown-container ${ref(this.dropdownRef)}\n\t\t\tstyle=\"display: none\">\n\t\t</og-dropdown-container>\n\t`;\n\n\trenderLabel = () => {\n\t\tif (utils.isString(this.label)) {\n\t\t\treturn this.label === '' ? unsafeHTML(' ') : html`<div class=\"text\">${this.label}</div>`;\n\t\t} else {\n\t\t\treturn this.label;\n\t\t}\n\t};\n\n\tget hasLabelSlot() {\n\t\treturn this.querySelector('[slot=\"label\"]') != null;\n\t}\n\n\tget hasLabel() {\n\t\treturn this.label !== '' && this.label != null;\n\t}\n\n\tupdated(props: Map<string, unknown>) {\n\t\tsuper.updated(props);\n\t\tif (this.dropdown) this.dropdown.color = this.color == ColorTypes.Transparent ? ColorTypes.Accent : this.color;\n\t}\n\n\trender = () => html`\n\t\t<og-button\n\t\t\t@mousedown=\"${this._onMousedown}\"\n\t\t\tclass=\"main\"\n\t\t\tcolor=\"${this.color}\"\n\t\t\t?disabled=\"${this.disabled}\"\n\t\t\t.icon=\"${this.icon}\"\n\t\t\t.caret=\"${this.noCaret ? 'none' : this.openDirection}\">\n\t\t\t${this.hasLabelSlot ? html`\n\t\t\t\t<div class=\"label\" slot=\"content\"><slot name=\"label\"></slot></div>\n\t\t\t` : guard([this.label], () => (this.hasLabel ? html`\n\t\t\t\t<div class=\"label\" slot=\"content\">${this.renderLabel()}</div>\n\t\t\t` : ''))}\n\t\t</og-button>\n\n\t\t${this.renderDropdown()}\n\t`;\n\n\tget useRadiusFix() {\n\t\treturn this.isOpen && this.color != ColorTypes.Transparent;\n\t}\n\n\tlayout() {\n\t\tthis.classList.toggle(`radiusfix-${this.openDirection}`, this.useRadiusFix);\n\t\tif (!this.dropdown) return;\n\t\tthis.dropdown.classList.toggle(`radiusfix-${this.openDirection}`, this.useRadiusFix);\n\t\tif (!this.isOpen) return;\n\n\t\tconst offset = dom.getElementOffset(this, this.dropdownParent);\n\t\tdom.setSize(this.dropdown, {w: this.offsetWidth}, true);\n\n\t\tconst pos: CssPosition = {t: 'unset', b: 'unset', l: 'unset', r: 'unset'};\n\n\t\tif (this.openDirection == 'down') {\n\t\t\tpos.t = offset.top + this.offsetHeight - 1;\n\t\t} else {\n\t\t\tpos.t = offset.top - this.dropdown.offsetHeight + 1;\n\t\t}\n\n\t\tif (this.alignment == 'left') {\n\t\t\tthis.dropdown.style.right = 'auto';\n\t\t\tpos.l = this.positionOffset + offset.left;\n\t\t} else {\n\t\t\tthis.dropdown.style.left = 'auto';\n\t\t\tpos.r = this.dropdownParent.clientWidth - this.positionOffset - offset.left - this.offsetWidth;\n\t\t}\n\n\t\tdom.setPosition(this.dropdown, pos);\n\t\tdom.fixElementPosition(this.dropdown);\n\t}\n\n}"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Dropdown } from './dropdown';
|
|
2
|
+
import { ColorPicker } from './colorpicker';
|
|
3
|
+
export declare class DropdownColorPicker extends Dropdown {
|
|
4
|
+
static styles: import("lit").CSSResult[];
|
|
5
|
+
value: string;
|
|
6
|
+
_picker: ColorPicker;
|
|
7
|
+
get picker(): ColorPicker;
|
|
8
|
+
updateLabel(): void;
|
|
9
|
+
willUpdate(): void;
|
|
10
|
+
constructor();
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=dropdownColorPicker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdownColorPicker.d.ts","sourceRoot":"","sources":["../../src/ui/dropdownColorPicker.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,qBACa,mBAAoB,SAAQ,QAAQ;IAEhD,MAAM,CAAC,MAAM,4BAMV;IAGH,KAAK,EAAE,MAAM,CAAC;IAEd,OAAO,EAAE,WAAW,CAAC;IACrB,IAAI,MAAM,gBAeT;IAED,WAAW;IAQX,UAAU;;CAWV"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { colors, dom, events } from '../common';
|
|
8
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
9
|
+
import { Dropdown } from './dropdown';
|
|
10
|
+
import { css, html } from 'lit';
|
|
11
|
+
let DropdownColorPicker = class DropdownColorPicker extends Dropdown {
|
|
12
|
+
get picker() {
|
|
13
|
+
if (this._picker)
|
|
14
|
+
return this._picker;
|
|
15
|
+
this._picker = dom.createElement('og-colorpicker');
|
|
16
|
+
this._picker.slot = 'inner-content';
|
|
17
|
+
this._picker.style.border = 'none';
|
|
18
|
+
this._picker.style.minWidth = '100%';
|
|
19
|
+
this._picker.addEventListener('change', (e) => {
|
|
20
|
+
this.value = e.value;
|
|
21
|
+
this.updateLabel();
|
|
22
|
+
this.close();
|
|
23
|
+
this.dispatchEvent(new events.ChangeEvent(this.value));
|
|
24
|
+
});
|
|
25
|
+
this._picker.addEventListener('render', () => this.layout());
|
|
26
|
+
this.dropdown.appendChild(this._picker);
|
|
27
|
+
return this._picker;
|
|
28
|
+
}
|
|
29
|
+
updateLabel() {
|
|
30
|
+
this.label = this.value ? html `
|
|
31
|
+
<div style="background: ${this.value}; color: ${colors.contrastColor(this.value)}; padding: 2px">${this.value}</div>
|
|
32
|
+
` : html `
|
|
33
|
+
<div style="padding: 2px"> </div>
|
|
34
|
+
`;
|
|
35
|
+
}
|
|
36
|
+
willUpdate() {
|
|
37
|
+
this.value = colors.css(this.value);
|
|
38
|
+
this.updateLabel();
|
|
39
|
+
}
|
|
40
|
+
constructor() {
|
|
41
|
+
super();
|
|
42
|
+
this.addEventListener('dropdown.beforeOpen', () => this.picker);
|
|
43
|
+
this.addEventListener('dropdown.open', () => this.picker.focus());
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
DropdownColorPicker.styles = [...Dropdown.styles, css `
|
|
47
|
+
og-button {
|
|
48
|
+
padding-top: 0;
|
|
49
|
+
padding-left: 0;
|
|
50
|
+
padding-bottom: 0;
|
|
51
|
+
}
|
|
52
|
+
`];
|
|
53
|
+
__decorate([
|
|
54
|
+
property({ type: String })
|
|
55
|
+
], DropdownColorPicker.prototype, "value", void 0);
|
|
56
|
+
DropdownColorPicker = __decorate([
|
|
57
|
+
customElement(`og-dropdown-colorpicker`)
|
|
58
|
+
], DropdownColorPicker);
|
|
59
|
+
export { DropdownColorPicker };
|
|
60
|
+
//# sourceMappingURL=dropdownColorPicker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdownColorPicker.js","sourceRoot":"","sources":["../../src/ui/dropdownColorPicker.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,GA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AA;;GAEP,CAAC;IACH,CAAC;IAED,UAAU;QACT,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACpC,IAAI,CAAC,WAAW,EAAE,CAAC;IACpB,CAAC;IAED;QACC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,gBAAgB,CAAC,qBAAqB,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAChE,IAAI,CAAC,gBAAgB,CAAC,eAAe,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;IACnE,CAAC;;AA9CM,0BAAM,GAAG,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,GAAG,CAAA;;;;;;EAMvC,CAAC,AANW,CAMV;AAGH;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAC,CAAC;kDACX;AAXF,mBAAmB;IAD/B,aAAa,CAAC,yBAAyB,CAAC;GAC5B,mBAAmB,CAkD/B","sourcesContent":["import { colors, dom, events } from '../common';\nimport { customElement, property } from 'lit/decorators.js';\nimport { Dropdown } from './dropdown';\nimport { ColorPicker } from './colorpicker';\nimport { css, html } from 'lit';\n\n@customElement(`og-dropdown-colorpicker`)\nexport class DropdownColorPicker extends Dropdown {\n\n\tstatic styles = [...Dropdown.styles, css`\n\t\tog-button {\n\t\t\tpadding-top: 0;\n\t\t\tpadding-left: 0;\n\t\t\tpadding-bottom: 0;\n\t\t}\t\n\t`];\n\n\t@property({type: String})\n\tvalue: string;\n\n\t_picker: ColorPicker;\n\tget picker() {\n\t\tif (this._picker) return this._picker;\n\t\tthis._picker = dom.createElement<ColorPicker>('og-colorpicker');\n\t\tthis._picker.slot = 'inner-content';\n\t\tthis._picker.style.border = 'none';\n\t\tthis._picker.style.minWidth = '100%';\n\t\tthis._picker.addEventListener('change', (e: events.ChangeEvent) => {\n\t\t\tthis.value = e.value as string;\n\t\t\tthis.updateLabel();\n\t\t\tthis.close();\n\t\t\tthis.dispatchEvent(new events.ChangeEvent(this.value));\n\t\t});\n\t\tthis._picker.addEventListener('render', () => this.layout());\n\t\tthis.dropdown.appendChild(this._picker);\n\t\treturn this._picker;\n\t}\n\n\tupdateLabel() {\n\t\tthis.label = this.value ? html`\n\t\t\t<div style=\"background: ${this.value}; color: ${colors.contrastColor(this.value)}; padding: 2px\">${this.value}</div>\n\t\t` : html`\n\t\t\t<div style=\"padding: 2px\"> </div>\n\t\t`; \n\t}\n\n\twillUpdate() {\n\t\tthis.value = colors.css(this.value);\n\t\tthis.updateLabel();\n\t}\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis.addEventListener('dropdown.beforeOpen', () => this.picker);\n\t\tthis.addEventListener('dropdown.open', () => this.picker.focus());\n\t}\n\t\n}"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DropdownMenu } from './dropdownMenu';
|
|
2
|
+
export declare class DropdownList extends DropdownMenu {
|
|
3
|
+
value: string | number | boolean;
|
|
4
|
+
constructor();
|
|
5
|
+
open(): Promise<void>;
|
|
6
|
+
willUpdate(props: Map<string, unknown>): void;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=dropdownList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdownList.d.ts","sourceRoot":"","sources":["../../src/ui/dropdownList.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,qBACa,YAAa,SAAQ,YAAY;IAG7C,KAAK,EAAE,MAAM,GAAC,MAAM,GAAC,OAAO,CAAC;;IAWvB,IAAI;IAQV,UAAU,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;CAatC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
8
|
+
import { ChangeEvent } from '../common/events';
|
|
9
|
+
import { DropdownMenu } from './dropdownMenu';
|
|
10
|
+
let DropdownList = class DropdownList extends DropdownMenu {
|
|
11
|
+
constructor() {
|
|
12
|
+
super();
|
|
13
|
+
this.label = String.fromCharCode(160);
|
|
14
|
+
this.addEventListener('menu.select', (e) => {
|
|
15
|
+
this.value = e.item.key ?? e.item.k;
|
|
16
|
+
this.dispatchEvent(new ChangeEvent(this.value));
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
async open() {
|
|
20
|
+
await super.open();
|
|
21
|
+
if (this.value != null) {
|
|
22
|
+
const index = this.items.findIndex(i => i.key == this.value);
|
|
23
|
+
if (index > -1)
|
|
24
|
+
setTimeout(() => this.menu.list.scrollToIndex(index), 10);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
willUpdate(props) {
|
|
28
|
+
super.willUpdate(props);
|
|
29
|
+
if (props.has('value')) {
|
|
30
|
+
const index = this.items.findIndex(i => (i.key ?? i.k) == this.value);
|
|
31
|
+
if (index > -1) {
|
|
32
|
+
const item = this.items[index];
|
|
33
|
+
this.label = item.renderer ? item.renderer(this.labelElm, index, item) : (item.value ?? item.v);
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
this.label = this.value;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
__decorate([
|
|
42
|
+
property()
|
|
43
|
+
], DropdownList.prototype, "value", void 0);
|
|
44
|
+
DropdownList = __decorate([
|
|
45
|
+
customElement(`og-dropdown-list`)
|
|
46
|
+
], DropdownList);
|
|
47
|
+
export { DropdownList };
|
|
48
|
+
//# sourceMappingURL=dropdownList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdownList.js","sourceRoot":"","sources":["../../src/ui/dropdownList.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAGvC,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,YAAY;IAK7C;QACC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;QACtC,IAAI,CAAC,gBAAgB,CAAC,aAAa,EAAE,CAAC,CAAY,EAAE,EAAE;YACrD,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;YACpC,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QACjD,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,IAAI;QACT,MAAM,KAAK,CAAC,IAAI,EAAE,CAAC;QACnB,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,EAAE,CAAC;YACxB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC;YAC7D,IAAI,KAAK,GAAG,CAAC,CAAC;gBAAE,UAAU,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;QAC3E,CAAC;IACF,CAAC;IAED,UAAU,CAAC,KAA2B;QACrC,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QACxB,IAAI,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;YACxB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC;YACtE,IAAI,KAAK,GAAG,CAAC,CAAC,EAAE,CAAC;gBAChB,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;gBAC/B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC;YACjG,CAAC;iBAAM,CAAC;gBACP,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAe,CAAC;YACnC,CAAC;QACF,CAAC;IACF,CAAC;CAED,CAAA;AAhCA;IADC,QAAQ,EAAE;2CACkB;AAHjB,YAAY;IADxB,aAAa,CAAC,kBAAkB,CAAC;GACrB,YAAY,CAmCxB","sourcesContent":["import { customElement, property } from 'lit/decorators.js';\nimport { MenuEvent } from './menu';\nimport { ChangeEvent } from '../common/events';\nimport { DropdownMenu } from './dropdownMenu';\n\n@customElement(`og-dropdown-list`)\nexport class DropdownList extends DropdownMenu {\n\n\t@property()\n\tvalue: string|number|boolean;\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis.label = String.fromCharCode(160);\n\t\tthis.addEventListener('menu.select', (e: MenuEvent) => {\n\t\t\tthis.value = e.item.key ?? e.item.k;\n\t\t\tthis.dispatchEvent(new ChangeEvent(this.value));\n\t\t});\n\t}\n\n\tasync open() {\n\t\tawait super.open();\n\t\tif (this.value != null) {\n\t\t\tconst index = this.items.findIndex(i => i.key == this.value);\n\t\t\tif (index > -1) setTimeout(() => this.menu.list.scrollToIndex(index), 10);\n\t\t}\n\t}\n\n\twillUpdate(props: Map<string, unknown>) {\n\t\tsuper.willUpdate(props);\n\t\tif (props.has('value')) {\n\t\t\tconst index = this.items.findIndex(i => (i.key ?? i.k) == this.value);\n\t\t\tif (index > -1) {\n\t\t\t\tconst item = this.items[index];\n\t\t\t\tthis.label = item.renderer ? item.renderer(this.labelElm, index, item) : (item.value ?? item.v);\n\t\t\t} else {\n\t\t\t\tthis.label = this.value as string;\n\t\t\t}\n\t\t}\n\t}\n\t\n}"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Dropdown } from './dropdown';
|
|
2
|
+
import { Menu, MenuItem } from './menu';
|
|
3
|
+
export declare class DropdownMenu extends Dropdown {
|
|
4
|
+
items: MenuItem[];
|
|
5
|
+
dynamicWidth: boolean;
|
|
6
|
+
private _menu;
|
|
7
|
+
get menu(): Menu;
|
|
8
|
+
constructor();
|
|
9
|
+
updated(props: Map<string, unknown>): void;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=dropdownMenu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdownMenu.d.ts","sourceRoot":"","sources":["../../src/ui/dropdownMenu.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,IAAI,EAAa,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAEnD,qBACa,YAAa,SAAQ,QAAQ;IAGzC,KAAK,EAAE,QAAQ,EAAE,CAAC;IAGlB,YAAY,UAAS;IAErB,OAAO,CAAC,KAAK,CAAO;IAEpB,IAAI,IAAI,SAoBP;;IAWD,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;CAQnC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { dom } from '../common';
|
|
8
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
9
|
+
import { Dropdown } from './dropdown';
|
|
10
|
+
import { MenuEvent } from './menu';
|
|
11
|
+
let DropdownMenu = class DropdownMenu extends Dropdown {
|
|
12
|
+
get menu() {
|
|
13
|
+
if (this._menu)
|
|
14
|
+
return this._menu;
|
|
15
|
+
this._menu = dom.createElement('og-menu', {
|
|
16
|
+
slot: 'inner-content',
|
|
17
|
+
dynamicWidth: this.dynamicWidth,
|
|
18
|
+
items: this.items,
|
|
19
|
+
style: {
|
|
20
|
+
border: 'none',
|
|
21
|
+
minWidth: '100%'
|
|
22
|
+
},
|
|
23
|
+
listeners: [
|
|
24
|
+
['render', () => this.layout()],
|
|
25
|
+
['menu.select', (e) => {
|
|
26
|
+
this.close();
|
|
27
|
+
this.dispatchEvent(new MenuEvent('select', e.item));
|
|
28
|
+
}]
|
|
29
|
+
]
|
|
30
|
+
});
|
|
31
|
+
this.dropdown.appendChild(this._menu);
|
|
32
|
+
return this._menu;
|
|
33
|
+
}
|
|
34
|
+
constructor() {
|
|
35
|
+
super();
|
|
36
|
+
this.dynamicWidth = false;
|
|
37
|
+
this.addEventListener('dropdown.beforeOpen', () => this.menu);
|
|
38
|
+
this.addEventListener('dropdown.open', () => {
|
|
39
|
+
this.menu.focus();
|
|
40
|
+
setTimeout(() => this.layout(), 0);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
updated(props) {
|
|
44
|
+
super.updated(props);
|
|
45
|
+
if (this._menu) {
|
|
46
|
+
this._menu.dynamicWidth = this.dynamicWidth;
|
|
47
|
+
this._menu.items = this.items;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
__decorate([
|
|
52
|
+
property({ type: Array })
|
|
53
|
+
], DropdownMenu.prototype, "items", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
property({ type: Boolean })
|
|
56
|
+
], DropdownMenu.prototype, "dynamicWidth", void 0);
|
|
57
|
+
DropdownMenu = __decorate([
|
|
58
|
+
customElement(`og-dropdown-menu`)
|
|
59
|
+
], DropdownMenu);
|
|
60
|
+
export { DropdownMenu };
|
|
61
|
+
//# sourceMappingURL=dropdownMenu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdownMenu.js","sourceRoot":"","sources":["../../src/ui/dropdownMenu.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAChC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAQ,SAAS,EAAY,MAAM,QAAQ,CAAC;AAG5C,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,QAAQ;IAUzC,IAAI,IAAI;QACP,IAAI,IAAI,CAAC,KAAK;YAAE,OAAO,IAAI,CAAC,KAAK,CAAC;QAClC,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,aAAa,CAAO,SAAS,EAAE;YAC/C,IAAI,EAAE,eAAe;YACrB,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,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,EAAC,IAAI,EAAE,KAAK,EAAC,CAAC;2CACN;AAGlB;IADC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;kDACL;AANT,YAAY;IADxB,aAAa,CAAC,kBAAkB,CAAC;GACrB,YAAY,CAiDxB","sourcesContent":["import { dom } from '../common';\nimport { customElement, property } from 'lit/decorators.js';\nimport { Dropdown } from './dropdown';\nimport { Menu, MenuEvent, MenuItem } from './menu';\n\n@customElement(`og-dropdown-menu`)\nexport class DropdownMenu extends Dropdown {\n\n\t@property({type: Array})\n\titems: MenuItem[];\n\n\t@property({type: Boolean})\n\tdynamicWidth = false;\n\n\tprivate _menu: Menu;\n\n\tget menu() {\n\t\tif (this._menu) return this._menu;\n\t\tthis._menu = dom.createElement<Menu>('og-menu', {\n\t\t\tslot: 'inner-content',\n\t\t\tdynamicWidth: this.dynamicWidth,\n\t\t\titems: this.items,\n\t\t\tstyle: {\n\t\t\t\tborder: 'none',\n\t\t\t\tminWidth: '100%'\n\t\t\t},\n\t\t\tlisteners: [\n\t\t\t\t['render', () => this.layout()],\n\t\t\t\t['menu.select', (e: MenuEvent) => {\n\t\t\t\t\tthis.close();\n\t\t\t\t\tthis.dispatchEvent(new MenuEvent('select', e.item));\n\t\t\t\t}]\n\t\t\t]\n\t\t});\n\t\tthis.dropdown.appendChild(this._menu);\n\t\treturn this._menu;\n\t}\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis.addEventListener('dropdown.beforeOpen', () => this.menu);\n\t\tthis.addEventListener('dropdown.open', () => {\n\t\t\tthis.menu.focus();\n\t\t\tsetTimeout(() => this.layout(), 0);\n\t\t});\n\t}\n\n\tupdated(props: Map<string, unknown>) {\n\t\tsuper.updated(props);\n\t\tif (this._menu) {\n\t\t\tthis._menu.dynamicWidth = this.dynamicWidth;\n\t\t\tthis._menu.items = this.items;\n\t\t}\n\t}\n\t\n}"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
export type ExpanderState = 'open' | 'closed' | 'waiting';
|
|
3
|
+
export declare class ExpandEvent extends Event {
|
|
4
|
+
readonly state?: ExpanderState;
|
|
5
|
+
get collapsed(): boolean;
|
|
6
|
+
get closed(): boolean;
|
|
7
|
+
constructor(state?: ExpanderState);
|
|
8
|
+
}
|
|
9
|
+
export declare class LevelExpandEvent extends ExpandEvent {
|
|
10
|
+
readonly level: number;
|
|
11
|
+
constructor(level: number);
|
|
12
|
+
}
|
|
13
|
+
export declare class Expander extends LitElement {
|
|
14
|
+
static styles: import("lit").CSSResult[];
|
|
15
|
+
state: ExpanderState;
|
|
16
|
+
collapsedImage: string;
|
|
17
|
+
expandedImage: string;
|
|
18
|
+
toggle: () => "open" | "closed";
|
|
19
|
+
constructor();
|
|
20
|
+
render: () => import("lit-html").TemplateResult<1>;
|
|
21
|
+
}
|
|
22
|
+
export declare class LevelExpander extends LitElement {
|
|
23
|
+
static styles: import("lit").CSSResult[];
|
|
24
|
+
level: number;
|
|
25
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
26
|
+
constructor();
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=expander.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expander.d.ts","sourceRoot":"","sources":["../../src/ui/expander.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAwB,MAAM,KAAK,CAAC;AA2BvD,MAAM,MAAM,aAAa,GAAG,MAAM,GAAC,QAAQ,GAAC,SAAS,CAAC;AAEtD,qBAAa,WAAY,SAAQ,KAAK;aAKT,KAAK,CAAC,EAAE,aAAa;IAHjD,IAAI,SAAS,YAAoC;IACjD,IAAI,MAAM,YAA6B;gBAEX,KAAK,CAAC,EAAE,aAAa;CAIjD;AAED,qBAAa,gBAAiB,SAAQ,WAAW;aACpB,KAAK,EAAE,MAAM;gBAAb,KAAK,EAAE,MAAM;CAGzC;AAED,qBACa,QAAS,SAAQ,UAAU;IAEvC,MAAM,CAAC,MAAM,4BAoCX;IAGF,KAAK,EAAE,aAAa,CAAC;IAGrB,cAAc,EAAE,MAAM,CAAC;IAGvB,aAAa,EAAE,MAAM,CAAC;IAEtB,MAAM,0BAAiE;;IAcvE,MAAM,6CAEJ;CAEF;AAED,qBACa,aAAc,SAAQ,UAAU;IAE5C,MAAM,CAAC,MAAM,4BAUX;IAGF,KAAK,EAAE,MAAM,CAAC;IAEd,MAAM;;CAeN"}
|