@omegagrid/tabs 0.10.1 → 0.10.2
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/package.json +2 -2
- package/dist/components/index.d.ts +0 -4
- package/dist/components/index.d.ts.map +0 -1
- package/dist/components/index.js +0 -4
- package/dist/components/index.js.map +0 -1
- package/dist/components/tabContainer.d.ts +0 -59
- package/dist/components/tabContainer.d.ts.map +0 -1
- package/dist/components/tabContainer.js +0 -292
- package/dist/components/tabContainer.js.map +0 -1
- package/dist/components/tabContainer.style.d.ts +0 -2
- package/dist/components/tabContainer.style.d.ts.map +0 -1
- package/dist/components/tabContainer.style.js +0 -30
- package/dist/components/tabContainer.style.js.map +0 -1
- package/dist/components/tabSplitContainer.d.ts +0 -43
- package/dist/components/tabSplitContainer.d.ts.map +0 -1
- package/dist/components/tabSplitContainer.js +0 -291
- package/dist/components/tabSplitContainer.js.map +0 -1
- package/dist/components/tabs.d.ts +0 -66
- package/dist/components/tabs.d.ts.map +0 -1
- package/dist/components/tabs.js +0 -360
- package/dist/components/tabs.js.map +0 -1
- package/dist/components/tabs.style.d.ts +0 -2
- package/dist/components/tabs.style.d.ts.map +0 -1
- package/dist/components/tabs.style.js +0 -191
- package/dist/components/tabs.style.js.map +0 -1
- package/dist/constants.d.ts +0 -49
- package/dist/constants.d.ts.map +0 -1
- package/dist/constants.js +0 -7
- package/dist/constants.js.map +0 -1
- package/dist/index.d.ts +0 -4
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -4
- package/dist/index.js.map +0 -1
- package/dist/model/index.d.ts +0 -26
- package/dist/model/index.d.ts.map +0 -1
- package/dist/model/index.js +0 -122
- package/dist/model/index.js.map +0 -1
- package/dist/types.d.ts +0 -14
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -2
- package/dist/types.js.map +0 -1
package/dist/components/tabs.js
DELETED
|
@@ -1,360 +0,0 @@
|
|
|
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
|
-
var Tabs_1;
|
|
8
|
-
import { LitElement, html } from "lit";
|
|
9
|
-
import { customElement, property, query, queryAll } from "lit/decorators.js";
|
|
10
|
-
import { map } from "lit/directives/map.js";
|
|
11
|
-
import { classMap } from "lit/directives/class-map.js";
|
|
12
|
-
import { style } from './tabs.style';
|
|
13
|
-
import { dom, actions } from "@omegagrid/core";
|
|
14
|
-
import { createRef, ref } from 'lit/directives/ref.js';
|
|
15
|
-
import { styleMap } from 'lit/directives/style-map.js';
|
|
16
|
-
import { colors } from "@omegagrid/core";
|
|
17
|
-
export class TabEvent extends Event {
|
|
18
|
-
constructor(type, args) {
|
|
19
|
-
super(`tab.${type}`, { composed: true, bubbles: true, cancelable: true });
|
|
20
|
-
Object.assign(this, args);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
const closeMenuItems = [
|
|
24
|
-
{ key: 'close', value: "Close", icon: "xmark" },
|
|
25
|
-
{ key: 'close_others', value: "Close Others", icon: "xmark" },
|
|
26
|
-
{ key: 'close_right', value: "Close to the Right", icon: "xmark" },
|
|
27
|
-
{ key: 'close_saved', value: "Close Saved", icon: "xmark" },
|
|
28
|
-
{ key: 'close_all', value: "Close All", icon: "xmark" },
|
|
29
|
-
];
|
|
30
|
-
let Tabs = Tabs_1 = class Tabs extends LitElement {
|
|
31
|
-
constructor() {
|
|
32
|
-
super(...arguments);
|
|
33
|
-
this.closable = false;
|
|
34
|
-
this.draggable = false;
|
|
35
|
-
this.scrollable = false;
|
|
36
|
-
this.addButton = false;
|
|
37
|
-
this.selectedIndex = -1;
|
|
38
|
-
this.position = 'top';
|
|
39
|
-
this.tabSize = 'auto';
|
|
40
|
-
this.tabAlign = 'left';
|
|
41
|
-
this.menuRef = createRef();
|
|
42
|
-
this._contextMenuTabIndex = -1;
|
|
43
|
-
this._contextMenuItems = [];
|
|
44
|
-
this.hideOverlay = () => dom.hideElement(this.overlay);
|
|
45
|
-
this.getTabSize = (index) => {
|
|
46
|
-
const size = this.items[index]?.size ?? this.tabSize;
|
|
47
|
-
if (size === 'stretch')
|
|
48
|
-
return `${(100 / this.items.length)}%`;
|
|
49
|
-
if (typeof size === 'number' || (typeof size === 'string' && !isNaN(Number(size))))
|
|
50
|
-
return dom.px(size);
|
|
51
|
-
return size;
|
|
52
|
-
};
|
|
53
|
-
this.renderTabs = () => map(this.items, (item, index) => item.hidden ? null : html `
|
|
54
|
-
<div
|
|
55
|
-
.draggable="${this.draggable}"
|
|
56
|
-
class="${classMap({
|
|
57
|
-
'tab': true,
|
|
58
|
-
'active': index == this.selectedIndex,
|
|
59
|
-
'unsaved': !!item.unsaved,
|
|
60
|
-
'closable': this.closable,
|
|
61
|
-
'last': index == this.items.length - 1
|
|
62
|
-
})}"
|
|
63
|
-
style="${styleMap({
|
|
64
|
-
backgroundColor: item.color ? `#${item.color}` : null,
|
|
65
|
-
flexBasis: this.getTabSize(index)
|
|
66
|
-
})}"
|
|
67
|
-
@click="${() => this.selectTab(index, true)}"
|
|
68
|
-
@drop="${() => this._onDrop()}"
|
|
69
|
-
@dragover="${(e) => this._onDragover(e, index)}"
|
|
70
|
-
@dragleave="${() => this.hideOverlay()}"
|
|
71
|
-
@dragstart="${(e) => this._onDragStart(e, index)}"
|
|
72
|
-
@dragstop="${() => this._onDragStop()}"
|
|
73
|
-
@contextmenu="${(e) => this._onContextMenu(e, index)}">
|
|
74
|
-
<div
|
|
75
|
-
class="tab-text"
|
|
76
|
-
style="${styleMap({
|
|
77
|
-
color: item.color ? colors.getComplmentaryColor('#' + item.color) : null
|
|
78
|
-
})}">
|
|
79
|
-
${item.icon ? html `<og-icon icon="${item.icon}"></og-icon>` : ``}
|
|
80
|
-
${item.title ?? item.id}
|
|
81
|
-
</div>
|
|
82
|
-
|
|
83
|
-
${item.unsaved ? html `<div class="tab-save-mark">●</div>` : ``}
|
|
84
|
-
|
|
85
|
-
${this.closable ? html `<og-close
|
|
86
|
-
@click="${(e) => this._onCrossClick(e, index)}">
|
|
87
|
-
</og-close>` : ``}
|
|
88
|
-
</div>
|
|
89
|
-
`);
|
|
90
|
-
this.render = () => html `
|
|
91
|
-
${this.items && this.items.length > 0 ? this.scrollable ? html `
|
|
92
|
-
<og-container sliderSize="6" scrollMode="horizontal">
|
|
93
|
-
<div class="tabs" slot="content"
|
|
94
|
-
@dragend="${() => this.hideOverlay()}">
|
|
95
|
-
${this.renderTabs()}
|
|
96
|
-
</div>
|
|
97
|
-
</og-container>
|
|
98
|
-
` : html `
|
|
99
|
-
<div class="tabs"
|
|
100
|
-
@dragend="${() => this.hideOverlay()}">
|
|
101
|
-
${this.renderTabs()}
|
|
102
|
-
|
|
103
|
-
<div
|
|
104
|
-
class="empty"
|
|
105
|
-
@dragover="${(e) => this._onDragover(e, this.items.length)}"
|
|
106
|
-
@drop="${() => this._onDrop()}"
|
|
107
|
-
@dragleave="${() => this.hideOverlay()}">
|
|
108
|
-
${this.addButton ? html `
|
|
109
|
-
<og-button
|
|
110
|
-
id="btnAdd"
|
|
111
|
-
icon="plus"
|
|
112
|
-
color="gray"
|
|
113
|
-
@click="${() => this.dispatchEvent(new TabEvent('add', { tab: this.items[this.items.length - 1], tabs: this }))}">
|
|
114
|
-
</og-button>
|
|
115
|
-
` : ``}
|
|
116
|
-
</div>
|
|
117
|
-
</div>
|
|
118
|
-
` : ``}
|
|
119
|
-
|
|
120
|
-
${this.actions?.length ? html `
|
|
121
|
-
<div class="buttons">
|
|
122
|
-
${map(this.actions, action => html `
|
|
123
|
-
<og-icon .icon="${action.icon}" @click="${() => this._onActionClick(action)}"></og-icon>
|
|
124
|
-
`)}
|
|
125
|
-
</div>
|
|
126
|
-
` : ``}
|
|
127
|
-
|
|
128
|
-
<div class="marker"></div>
|
|
129
|
-
|
|
130
|
-
<div id="overlay" style="display: none"></div>
|
|
131
|
-
|
|
132
|
-
<og-menu ${ref(this.menuRef)}
|
|
133
|
-
style="display: none; z-index: 2000"
|
|
134
|
-
@select=${(e) => this._onMenuItemSelect(e)}>
|
|
135
|
-
</og-menu>
|
|
136
|
-
`;
|
|
137
|
-
}
|
|
138
|
-
get menu() { return this.menuRef.value; }
|
|
139
|
-
get selectedItem() { return this.items[this.selectedIndex]; }
|
|
140
|
-
get selectedTab() { return this.tabs?.[this.selectedIndex]; }
|
|
141
|
-
get container() {
|
|
142
|
-
return dom.findParent(this, 'og-tabcontainer');
|
|
143
|
-
}
|
|
144
|
-
async updated() {
|
|
145
|
-
this._contextMenuItems = [];
|
|
146
|
-
if (this.closable)
|
|
147
|
-
this._contextMenuItems = closeMenuItems;
|
|
148
|
-
this.menu.items = this._contextMenuItems;
|
|
149
|
-
this.animateMarker();
|
|
150
|
-
}
|
|
151
|
-
positionOverlay(target) {
|
|
152
|
-
if (!target)
|
|
153
|
-
return this.hideOverlay();
|
|
154
|
-
const offset = dom.getElementOffset(target, this);
|
|
155
|
-
dom.setPosition(this.overlay, { t: offset.top, l: offset.left });
|
|
156
|
-
dom.setSize(this.overlay, { w: target.offsetWidth, h: target.offsetHeight });
|
|
157
|
-
dom.showElement(this.overlay);
|
|
158
|
-
}
|
|
159
|
-
selectTab(index, dispatchEvent = false) {
|
|
160
|
-
this.selectedIndex = index;
|
|
161
|
-
if (dispatchEvent)
|
|
162
|
-
this.dispatchEvent(new TabEvent('select', {
|
|
163
|
-
tab: this.items[index],
|
|
164
|
-
tabs: this,
|
|
165
|
-
index: index
|
|
166
|
-
}));
|
|
167
|
-
}
|
|
168
|
-
getIndexById(id) {
|
|
169
|
-
return this.items.findIndex(item => item.id == id);
|
|
170
|
-
}
|
|
171
|
-
selectTabById(id, dispatchEvent = false) {
|
|
172
|
-
const index = this.getIndexById(id);
|
|
173
|
-
if (index > -1)
|
|
174
|
-
this.selectTab(index, dispatchEvent);
|
|
175
|
-
}
|
|
176
|
-
addTab(item, index = this.selectedIndex + 1) {
|
|
177
|
-
this.hideOverlay();
|
|
178
|
-
this.items.splice(index, 0, item);
|
|
179
|
-
this.requestUpdate();
|
|
180
|
-
}
|
|
181
|
-
removeTab(index, dispatchEvent = false) {
|
|
182
|
-
this.hideOverlay();
|
|
183
|
-
if (!this.dispatchEvent(new TabEvent('beforeRemove', { tab: this.items[index], tabs: this, index })))
|
|
184
|
-
return;
|
|
185
|
-
const [deletedItem] = this.items.splice(index, 1);
|
|
186
|
-
if (this.selectedIndex >= this.items.length) {
|
|
187
|
-
this.selectTab(this.items.length - 1, true);
|
|
188
|
-
}
|
|
189
|
-
else if (this.selectedIndex == index) {
|
|
190
|
-
this.selectTab(0, true);
|
|
191
|
-
}
|
|
192
|
-
this.requestUpdate();
|
|
193
|
-
if (dispatchEvent)
|
|
194
|
-
this.dispatchEvent(new TabEvent('remove', { tab: deletedItem, tabs: this, index }));
|
|
195
|
-
return deletedItem;
|
|
196
|
-
}
|
|
197
|
-
_onDragover(e, index) {
|
|
198
|
-
if (!Tabs_1.dragParent)
|
|
199
|
-
return;
|
|
200
|
-
if (Tabs_1.dragParent.topLevelComponent != this.topLevelComponent)
|
|
201
|
-
return;
|
|
202
|
-
e.preventDefault();
|
|
203
|
-
e.stopPropagation();
|
|
204
|
-
e.dataTransfer.dropEffect = 'move';
|
|
205
|
-
Tabs_1.dropIndex = index;
|
|
206
|
-
this.positionOverlay(index >= this.tabs.length ? this.empty : this.tabs[index]);
|
|
207
|
-
}
|
|
208
|
-
_onDragStart(_e, index) {
|
|
209
|
-
if (!this.draggable)
|
|
210
|
-
return;
|
|
211
|
-
Tabs_1.dragParent = this;
|
|
212
|
-
Tabs_1.dragTarget = null;
|
|
213
|
-
Tabs_1.dragIndex = index;
|
|
214
|
-
}
|
|
215
|
-
_onDragStop() {
|
|
216
|
-
Tabs_1.dragParent = null;
|
|
217
|
-
}
|
|
218
|
-
_onDrop() {
|
|
219
|
-
Tabs_1.dragTarget = this;
|
|
220
|
-
if (Tabs_1.dragParent == Tabs_1.dragTarget) {
|
|
221
|
-
this.moveTab(Tabs_1.dragIndex, Tabs_1.dropIndex, true);
|
|
222
|
-
}
|
|
223
|
-
else {
|
|
224
|
-
const tab = Tabs_1.dragParent.items[Tabs_1.dragIndex];
|
|
225
|
-
Tabs_1.dragParent.removeTab(Tabs_1.dragIndex);
|
|
226
|
-
Tabs_1.dragParent.selectTab(Math.min(Tabs_1.dragParent.items.length - 1, Tabs_1.dragIndex), true);
|
|
227
|
-
Tabs_1.dragTarget.addTab(tab, Tabs_1.dropIndex);
|
|
228
|
-
Tabs_1.dragTarget.selectTab(Tabs_1.dropIndex, true);
|
|
229
|
-
this.dispatchEvent(new TabEvent('move', { tab: tab, tabs: this }));
|
|
230
|
-
}
|
|
231
|
-
Tabs_1.dragParent = null;
|
|
232
|
-
}
|
|
233
|
-
moveTab(fromIndex, toIndex, dispatchEvent = false) {
|
|
234
|
-
if (fromIndex == toIndex)
|
|
235
|
-
return;
|
|
236
|
-
const [movedItem] = this.items.splice(toIndex, 0, this.items.splice(fromIndex, 1)[0]);
|
|
237
|
-
this.selectTab(Math.min(toIndex, this.tabs.length - 1), true);
|
|
238
|
-
this.requestUpdate();
|
|
239
|
-
if (dispatchEvent)
|
|
240
|
-
this.dispatchEvent(new TabEvent('move', { tab: movedItem, tabs: this }));
|
|
241
|
-
}
|
|
242
|
-
_onMenuItemSelect(e) {
|
|
243
|
-
const key = this._contextMenuItems[e.index].key;
|
|
244
|
-
if (key == 'close') {
|
|
245
|
-
this.removeTab(this._contextMenuTabIndex, true);
|
|
246
|
-
if (this.selectedIndex >= this.items.length)
|
|
247
|
-
this.selectTab(Math.max(this.items.length - 1, 0), true);
|
|
248
|
-
}
|
|
249
|
-
else if (key == 'close_all') {
|
|
250
|
-
while (this.items.length > 0)
|
|
251
|
-
this.removeTab(0, true);
|
|
252
|
-
}
|
|
253
|
-
else if (key == 'close_others') {
|
|
254
|
-
for (let i = this.items.length - 1; i >= 0; i--) {
|
|
255
|
-
if (i != this._contextMenuTabIndex)
|
|
256
|
-
this.removeTab(i, true);
|
|
257
|
-
}
|
|
258
|
-
this.selectTab(0, true);
|
|
259
|
-
}
|
|
260
|
-
else if (key == 'close_right') {
|
|
261
|
-
while (this.items.length > this._contextMenuTabIndex + 1)
|
|
262
|
-
this.removeTab(this._contextMenuTabIndex + 1, true);
|
|
263
|
-
if (this.selectedIndex >= this.items.length)
|
|
264
|
-
this.selectTab(Math.max(this.items.length - 1, 0), true);
|
|
265
|
-
}
|
|
266
|
-
else if (key == 'close_saved') {
|
|
267
|
-
this.items.forEach((item, i) => {
|
|
268
|
-
if (!item.unsaved)
|
|
269
|
-
this.removeTab(i, true);
|
|
270
|
-
});
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
_onCrossClick(e, index) {
|
|
274
|
-
e.stopPropagation();
|
|
275
|
-
this.removeTab(index, true);
|
|
276
|
-
}
|
|
277
|
-
_onContextMenu(e, index) {
|
|
278
|
-
e.preventDefault();
|
|
279
|
-
this._contextMenuTabIndex = index;
|
|
280
|
-
if (this.menu.items.length > 0)
|
|
281
|
-
this.menu.openAt(e.pageX, e.pageY);
|
|
282
|
-
this.dispatchEvent(new TabEvent('contextmenu', { tab: this.items[index], tabs: this, uiEvent: e }));
|
|
283
|
-
}
|
|
284
|
-
_onActionClick(action) {
|
|
285
|
-
actions.dispatchActionEvent(this, 'tabs', action);
|
|
286
|
-
}
|
|
287
|
-
disconnectedCallback() {
|
|
288
|
-
this.menu?.remove();
|
|
289
|
-
}
|
|
290
|
-
_onContainerDragover(e) {
|
|
291
|
-
e.preventDefault();
|
|
292
|
-
e.stopPropagation();
|
|
293
|
-
e.dataTransfer.dropEffect = 'move';
|
|
294
|
-
}
|
|
295
|
-
animateMarker() {
|
|
296
|
-
const tab = this.selectedTab;
|
|
297
|
-
if (!tab) {
|
|
298
|
-
dom.hideElement(this.marker);
|
|
299
|
-
return;
|
|
300
|
-
}
|
|
301
|
-
dom.showElement(this.marker);
|
|
302
|
-
const offset = dom.getElementOffset(tab, this);
|
|
303
|
-
dom.setPosition(this.marker, { l: offset.left, b: 0 });
|
|
304
|
-
dom.setSize(this.marker, { w: tab.offsetWidth });
|
|
305
|
-
setTimeout(() => dom.hideElement(this.marker), 200);
|
|
306
|
-
}
|
|
307
|
-
};
|
|
308
|
-
Tabs.styles = [style];
|
|
309
|
-
Tabs.dragIndex = -1;
|
|
310
|
-
Tabs.dropIndex = -1;
|
|
311
|
-
__decorate([
|
|
312
|
-
property({ type: Object })
|
|
313
|
-
], Tabs.prototype, "topLevelComponent", void 0);
|
|
314
|
-
__decorate([
|
|
315
|
-
property({ type: Array })
|
|
316
|
-
], Tabs.prototype, "items", void 0);
|
|
317
|
-
__decorate([
|
|
318
|
-
property({ type: Boolean })
|
|
319
|
-
], Tabs.prototype, "closable", void 0);
|
|
320
|
-
__decorate([
|
|
321
|
-
property({ type: Boolean })
|
|
322
|
-
], Tabs.prototype, "draggable", void 0);
|
|
323
|
-
__decorate([
|
|
324
|
-
property({ type: Boolean })
|
|
325
|
-
], Tabs.prototype, "scrollable", void 0);
|
|
326
|
-
__decorate([
|
|
327
|
-
property({ type: Boolean })
|
|
328
|
-
], Tabs.prototype, "addButton", void 0);
|
|
329
|
-
__decorate([
|
|
330
|
-
property({ type: Number })
|
|
331
|
-
], Tabs.prototype, "selectedIndex", void 0);
|
|
332
|
-
__decorate([
|
|
333
|
-
property({ type: Array })
|
|
334
|
-
], Tabs.prototype, "actions", void 0);
|
|
335
|
-
__decorate([
|
|
336
|
-
property({ type: String, reflect: true })
|
|
337
|
-
], Tabs.prototype, "position", void 0);
|
|
338
|
-
__decorate([
|
|
339
|
-
property({ type: String, reflect: true })
|
|
340
|
-
], Tabs.prototype, "tabSize", void 0);
|
|
341
|
-
__decorate([
|
|
342
|
-
property({ type: String, reflect: true })
|
|
343
|
-
], Tabs.prototype, "tabAlign", void 0);
|
|
344
|
-
__decorate([
|
|
345
|
-
query('.empty')
|
|
346
|
-
], Tabs.prototype, "empty", void 0);
|
|
347
|
-
__decorate([
|
|
348
|
-
query('.marker')
|
|
349
|
-
], Tabs.prototype, "marker", void 0);
|
|
350
|
-
__decorate([
|
|
351
|
-
query('#overlay')
|
|
352
|
-
], Tabs.prototype, "overlay", void 0);
|
|
353
|
-
__decorate([
|
|
354
|
-
queryAll('.tab')
|
|
355
|
-
], Tabs.prototype, "tabs", void 0);
|
|
356
|
-
Tabs = Tabs_1 = __decorate([
|
|
357
|
-
customElement('og-tabs')
|
|
358
|
-
], Tabs);
|
|
359
|
-
export { Tabs };
|
|
360
|
-
//# sourceMappingURL=tabs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.js","sourceRoot":"","sources":["../../src/components/tabs.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7E,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAErC,OAAO,EAAE,GAAG,EAAyB,OAAO,EAA+D,MAAM,iBAAiB,CAAC;AACnI,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC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ADhB,aAAa,CAAC,SAAS,CAAC;GACZ,IAAI,CA0UhB","sourcesContent":["import { LitElement, html } from \"lit\";\nimport { customElement, property, query, queryAll } from \"lit/decorators.js\";\nimport { map } from \"lit/directives/map.js\";\nimport { classMap } from \"lit/directives/class-map.js\";\nimport { style } from './tabs.style';\nimport { TabItem } from '../types';\nimport { dom, ListSelectEvent, Menu, actions, ComponentId, MenuItem, VerticalPosition, HorizontalPosition } from \"@omegagrid/core\";\nimport { createRef, ref } from 'lit/directives/ref.js';\nimport { TabContainer } from \"./tabContainer\";\nimport { styleMap } from 'lit/directives/style-map.js';\nimport { colors } from \"@omegagrid/core\";\n\nexport class TabEvent extends Event {\n\n\tindex: number;\n\ttabs: Tabs;\n\ttab: TabItem;\n\tuiEvent: UIEvent;\n\n\tconstructor(type: string, args: Partial<TabEvent>) {\n\t\tsuper(`tab.${type}`, {composed: true, bubbles: true, cancelable: true});\n\t\tObject.assign(this, args);\n\t}\n}\n\nexport type TabSize = 'auto'|'stretch'|string|number;\ntype CloseType = 'close'|'close_all'|'close_others'|'close_right'|'close_saved';\n\nconst closeMenuItems: {key: CloseType, value: string, icon?: string}[] = [\n\t{key: 'close', value: \"Close\", icon: \"xmark\"},\n\t{key: 'close_others', value: \"Close Others\", icon: \"xmark\"},\n\t{key: 'close_right', value: \"Close to the Right\", icon: \"xmark\"},\n\t{key: 'close_saved', value: \"Close Saved\", icon: \"xmark\"},\n\t{key: 'close_all', value: \"Close All\", icon: \"xmark\"},\n];\n\n@customElement('og-tabs')\nexport class Tabs extends LitElement {\n\n\tstatic styles = [style];\n\n\tstatic dragParent: Tabs;\n\tstatic dragIndex = -1;\n\tstatic dragTarget: Tabs;\n\tstatic dropIndex = -1;\n\n\t@property({type: Object})\n\ttopLevelComponent: HTMLElement;\n\n\t@property({type: Array})\n\titems: TabItem[];\n\n\t@property({type: Boolean})\n\tclosable = false;\n\n\t@property({type: Boolean})\n\tdraggable = false;\n\n\t@property({type: Boolean})\n\tscrollable = false;\n\n\t@property({type: Boolean})\n\taddButton = false;\n\n\t@property({type: Number})\n\tselectedIndex = -1;\n\n\t@property({type: Array})\n\tactions: actions.Action[];\n\n\t@property({type: String, reflect: true})\n\tposition: VerticalPosition = 'top';\n\n\t@property({type: String, reflect: true})\n\ttabSize: TabSize = 'auto';\n\n\t@property({type: String, reflect: true})\n\ttabAlign: HorizontalPosition = 'left';\n\n\t@query('.empty')\n\tempty: HTMLDivElement;\n\n\t@query('.marker')\n\tmarker: HTMLDivElement;\n\n\t@query('#overlay')\n\toverlay: HTMLDivElement;\n\n\t@queryAll('.tab')\n\ttabs: HTMLDivElement[];\n\n\tparentContainer: TabContainer;\n\t\n\tmenuRef = createRef<Menu>();\n\n\tget menu() { return this.menuRef.value }\n\n\tprivate _contextMenuTabIndex = -1;\n\tprivate _contextMenuItems: MenuItem[] = [];\n\n\tget selectedItem() { return this.items[this.selectedIndex] }\n\tget selectedTab() { return this.tabs?.[this.selectedIndex] }\n\n\tget container() {\n\t\treturn dom.findParent(this, 'og-tabcontainer') as TabContainer;\n\t}\n\n\tasync updated() {\n\t\tthis._contextMenuItems = [];\n\t\tif (this.closable) this._contextMenuItems = closeMenuItems;\n\t\tthis.menu.items = this._contextMenuItems;\n\t\tthis.animateMarker();\n\t}\n\n\tpositionOverlay(target?: HTMLElement) {\n\t\tif (!target) return this.hideOverlay();\n\n\t\tconst offset = dom.getElementOffset(target, this);\n\t\tdom.setPosition(this.overlay, {t: offset.top, l: offset.left});\n\t\tdom.setSize(this.overlay, {w: target.offsetWidth, h: target.offsetHeight});\n\t\tdom.showElement(this.overlay);\n\t}\n\t\n\thideOverlay = () => dom.hideElement(this.overlay);\n\n\tselectTab(index: number, dispatchEvent = false) {\n\t\tthis.selectedIndex = index;\n\t\tif (dispatchEvent) this.dispatchEvent(new TabEvent('select', {\n\t\t\ttab: this.items[index], \n\t\t\ttabs: this,\n\t\t\tindex: index\n\t\t}));\n\t}\n\n\tgetIndexById(id: ComponentId) {\n\t\treturn this.items.findIndex(item => item.id == id);\n\t}\n\n\tselectTabById(id: ComponentId, dispatchEvent = false) {\n\t\tconst index = this.getIndexById(id);\n\t\tif (index > -1) this.selectTab(index, dispatchEvent);\n\t}\n\n\taddTab(item: TabItem, index = this.selectedIndex + 1) {\n\t\tthis.hideOverlay();\n\t\tthis.items.splice(index, 0, item);\n\t\tthis.requestUpdate();\n\t}\n\n\tremoveTab(index: number, dispatchEvent = false) {\n\t\tthis.hideOverlay();\n\t\tif (!this.dispatchEvent(new TabEvent('beforeRemove', {tab: this.items[index], tabs: this, index}))) return;\n\n\t\tconst [deletedItem] = this.items.splice(index, 1);\n\t\t\n\t\tif (this.selectedIndex >= this.items.length) {\n\t\t\tthis.selectTab(this.items.length - 1, true);\n\t\t} else if (this.selectedIndex == index) {\n\t\t\tthis.selectTab(0, true);\n\t\t}\n\n\t\tthis.requestUpdate();\n\t\tif (dispatchEvent) this.dispatchEvent(new TabEvent('remove', {tab: deletedItem, tabs: this, index}));\n\t\treturn deletedItem;\n\t}\n\n\t_onDragover(e: DragEvent, index: number) {\n\t\tif (!Tabs.dragParent) return;\n\t\tif (Tabs.dragParent.topLevelComponent != this.topLevelComponent) return;\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t\te.dataTransfer.dropEffect = 'move';\n\t\tTabs.dropIndex = index;\n\t\tthis.positionOverlay(index >= this.tabs.length ? this.empty : this.tabs[index]);\n\t}\n\n\t_onDragStart(_e: DragEvent, index: number) {\n\t\tif (!this.draggable) return;\n\t\tTabs.dragParent = this;\n\t\tTabs.dragTarget = null;\n\t\tTabs.dragIndex = index;\n\t}\n\n\t_onDragStop() {\n\t\tTabs.dragParent = null;\n\t}\n\n\t_onDrop() {\n\t\tTabs.dragTarget = this;\n\t\tif (Tabs.dragParent == Tabs.dragTarget) {\n\t\t\tthis.moveTab(Tabs.dragIndex, Tabs.dropIndex, true);\n\t\t} else {\n\t\t\tconst tab = Tabs.dragParent.items[Tabs.dragIndex];\n\t\t\tTabs.dragParent.removeTab(Tabs.dragIndex);\n\t\t\tTabs.dragParent.selectTab(Math.min(Tabs.dragParent.items.length - 1, Tabs.dragIndex), true);\n\t\t\tTabs.dragTarget.addTab(tab, Tabs.dropIndex);\n\t\t\tTabs.dragTarget.selectTab(Tabs.dropIndex, true);\n\t\t\tthis.dispatchEvent(new TabEvent('move', {tab: tab, tabs: this}));\n\t\t}\n\t\tTabs.dragParent = null;\n\t}\n\t\n\tmoveTab(fromIndex: number, toIndex: number, dispatchEvent = false) {\n\t\tif (fromIndex == toIndex) return;\n\t\tconst [movedItem] = this.items.splice(toIndex, 0, this.items.splice(fromIndex, 1)[0]);\n\t\tthis.selectTab(Math.min(toIndex, this.tabs.length - 1), true);\n\t\tthis.requestUpdate();\n\t\tif (dispatchEvent) this.dispatchEvent(new TabEvent('move', {tab: movedItem, tabs: this}));\n\t}\n\n\t_onMenuItemSelect(e: ListSelectEvent) {\n\t\tconst key = this._contextMenuItems[e.index].key;\n\t\tif (key == 'close') {\n\t\t\tthis.removeTab(this._contextMenuTabIndex, true);\n\t\t\tif (this.selectedIndex >= this.items.length)\n\t\t\t\tthis.selectTab(Math.max(this.items.length - 1, 0), true);\n\t\t} else if (key == 'close_all') {\n\t\t\twhile (this.items.length > 0) this.removeTab(0, true);\n\t\t} else if (key == 'close_others') {\n\t\t\tfor (let i = this.items.length - 1; i >= 0; i--) {\n\t\t\t\tif (i != this._contextMenuTabIndex) this.removeTab(i, true);\n\t\t\t}\n\t\t\tthis.selectTab(0, true);\n\t\t} else if (key == 'close_right') {\n\t\t\twhile (this.items.length > this._contextMenuTabIndex + 1)\n\t\t\t\tthis.removeTab(this._contextMenuTabIndex + 1, true);\n\t\t\tif (this.selectedIndex >= this.items.length)\n\t\t\t\tthis.selectTab(Math.max(this.items.length - 1, 0), true);\n\t\t} else if (key == 'close_saved') {\n\t\t\tthis.items.forEach((item, i) => {\n\t\t\t\tif (!item.unsaved) this.removeTab(i, true);\n\t\t\t});\n\t\t}\n\t}\n\n\t_onCrossClick(e: MouseEvent, index: number) {\n\t\te.stopPropagation();\n\t\tthis.removeTab(index, true);\n\t}\n\n\t_onContextMenu(e: MouseEvent, index: number) {\n\t\te.preventDefault();\n\t\tthis._contextMenuTabIndex = index;\n\t\tif (this.menu.items.length > 0) this.menu.openAt(e.pageX, e.pageY);\n\t\tthis.dispatchEvent(new TabEvent('contextmenu', {tab: this.items[index], tabs: this, uiEvent: e}));\n\t}\n\n\t_onActionClick(action: actions.Action) {\n\t\tactions.dispatchActionEvent(this, 'tabs', action);\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.menu?.remove();\n\t}\n\n\t_onContainerDragover(e: DragEvent) {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t\te.dataTransfer.dropEffect = 'move';\n\t}\n\n\tgetTabSize = (index: number) => {\n\t\tconst size = this.items[index]?.size ?? this.tabSize;\n\t\tif (size === 'stretch') return `${(100 / this.items.length)}%`;\n\t\tif (typeof size === 'number' || (typeof size === 'string' && !isNaN(Number(size)))) return dom.px(size as number);\n\t\treturn size;\n\t}\n\n\tanimateMarker() {\n\t\tconst tab = this.selectedTab;\n\t\tif (!tab) {\n\t\t\tdom.hideElement(this.marker);\n\t\t\treturn;\n\t\t}\n\t\tdom.showElement(this.marker);\n\t\tconst offset = dom.getElementOffset(tab, this);\n\t\tdom.setPosition(this.marker, {l: offset.left, b: 0});\n\t\tdom.setSize(this.marker, {w: tab.offsetWidth});\n\t\tsetTimeout(() => dom.hideElement(this.marker), 200);\n\t}\n\n\trenderTabs = () => map(this.items, (item, index) => item.hidden ? null : html`\n\t\t<div\n\t\t\t.draggable=\"${this.draggable}\"\n\t\t\tclass=\"${classMap({\n\t\t\t\t'tab': true, \n\t\t\t\t'active': index == this.selectedIndex, \n\t\t\t\t'unsaved': !!item.unsaved,\n\t\t\t\t'closable': this.closable,\n\t\t\t\t'last': index == this.items.length -1\n\t\t\t})}\"\n\t\t\tstyle=\"${styleMap({\n\t\t\t\tbackgroundColor: item.color ? `#${item.color}` : null,\n\t\t\t\tflexBasis: this.getTabSize(index)\n\t\t\t})}\"\n\t\t\t@click=\"${() => this.selectTab(index, true)}\"\n\t\t\t@drop=\"${() => this._onDrop()}\"\n\t\t\t@dragover=\"${(e: DragEvent) => this._onDragover(e, index)}\"\n\t\t\t@dragleave=\"${() => this.hideOverlay()}\"\n\t\t\t@dragstart=\"${(e: DragEvent) => this._onDragStart(e, index)}\"\n\t\t\t@dragstop=\"${() => this._onDragStop()}\"\n\t\t\t@contextmenu=\"${(e: MouseEvent) => this._onContextMenu(e, index)}\">\n\t\t\t<div\n\t\t\t\tclass=\"tab-text\" \n\t\t\t\tstyle=\"${styleMap({\n\t\t\t\t\tcolor: item.color ? colors.getComplmentaryColor('#' + item.color) : null\n\t\t\t\t})}\">\n\t\t\t\t${item.icon ? html`<og-icon icon=\"${item.icon}\"></og-icon>` : ``}\n\t\t\t\t${item.title ?? item.id}\n\t\t\t</div>\n\n\t\t\t${item.unsaved ? html`<div class=\"tab-save-mark\">●</div>` : ``}\n\n\t\t\t${this.closable ? html`<og-close\n\t\t\t\t@click=\"${(e: MouseEvent) => this._onCrossClick(e, index)}\">\n\t\t\t</og-close>` : ``}\n\t\t</div>\n\t`)\n\n\trender = () => html`\n\t\t${this.items && this.items.length > 0 ? this.scrollable ? html`\n\t\t\t<og-container sliderSize=\"6\" scrollMode=\"horizontal\">\n\t\t\t\t<div class=\"tabs\" slot=\"content\"\n\t\t\t\t\t@dragend=\"${() => this.hideOverlay()}\">\n\t\t\t\t\t${this.renderTabs()}\n\t\t\t\t</div>\n\t\t\t</og-container>\n\t\t` : html`\n\t\t\t<div class=\"tabs\"\n\t\t\t\t@dragend=\"${() => this.hideOverlay()}\">\n\t\t\t\t${this.renderTabs()}\n\n\t\t\t\t<div\n\t\t\t\t\tclass=\"empty\"\n\t\t\t\t\t@dragover=\"${(e: DragEvent) => this._onDragover(e, this.items.length)}\"\n\t\t\t\t\t@drop=\"${() => this._onDrop()}\"\n\t\t\t\t\t@dragleave=\"${() => this.hideOverlay()}\">\n\t\t\t\t\t${this.addButton ? html`\n\t\t\t\t\t\t<og-button\n\t\t\t\t\t\t\tid=\"btnAdd\"\n\t\t\t\t\t\t\ticon=\"plus\"\n\t\t\t\t\t\t\tcolor=\"gray\"\n\t\t\t\t\t\t\t@click=\"${() => this.dispatchEvent(new TabEvent('add', {tab: this.items[this.items.length - 1], tabs: this}))}\">\n\t\t\t\t\t\t</og-button>\n\t\t\t\t\t` : ``}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t` : ``}\n\n\t\t${this.actions?.length ? html`\n\t\t\t<div class=\"buttons\">\n\t\t\t\t${map(this.actions, action => html`\n\t\t\t\t\t<og-icon .icon=\"${action.icon}\" @click=\"${() => this._onActionClick(action)}\"></og-icon>\n\t\t\t\t`)}\n\t\t\t</div>\n\t\t` : ``}\n\n\t\t<div class=\"marker\"></div>\n\n\t\t<div id=\"overlay\" style=\"display: none\"></div>\n\n\t\t<og-menu ${ref(this.menuRef)} \n\t\t\tstyle=\"display: none; z-index: 2000\"\n\t\t\t@select=${(e: ListSelectEvent) => this._onMenuItemSelect(e)}>\n\t\t</og-menu>\n\t`;\n\n}"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.style.d.ts","sourceRoot":"","sources":["../../src/components/tabs.style.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,KAAK,yBA0LjB,CAAC"}
|
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
import { device } from "@omegagrid/core";
|
|
2
|
-
import constants from "../constants";
|
|
3
|
-
import { css, unsafeCSS } from "lit";
|
|
4
|
-
export const style = css `
|
|
5
|
-
* {
|
|
6
|
-
box-sizing: border-box;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
:host {
|
|
10
|
-
color: var(--og-text-color);
|
|
11
|
-
min-height: ${constants.TAB_PANEL_HEIGHT}px;
|
|
12
|
-
line-height: ${constants.TAB_PANEL_HEIGHT}px;
|
|
13
|
-
background: var(--og-tab-panel-background-color);
|
|
14
|
-
border-bottom: 1px solid var(--og-tab-border-color);
|
|
15
|
-
display: flex;
|
|
16
|
-
position: relative;
|
|
17
|
-
font-size: var(--og-font-size);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.tabs {
|
|
21
|
-
height: ${constants.TAB_PANEL_HEIGHT - 1}px;
|
|
22
|
-
flex: 1;
|
|
23
|
-
white-space: nowrap;
|
|
24
|
-
display: flex;
|
|
25
|
-
flex-direction: row;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
og-container {
|
|
29
|
-
height: ${constants.TAB_PANEL_HEIGHT - 1}px;
|
|
30
|
-
flex: 1;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
:host([position="top"]) .tab {
|
|
34
|
-
border-top: ${constants.TAB_PANEL_BORDER}px solid var(--og-tab-panel-background-color);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
:host([position="bottom"]) .tab {
|
|
38
|
-
border-bottom: ${constants.TAB_PANEL_BORDER}px solid var(--og-tab-panel-background-color);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
:host([position="bottom"]) .tab.active {
|
|
42
|
-
top: -1px;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
:host([position="top"]) .tab:hover, :host([position="top"]) .tab.active {
|
|
46
|
-
border-top-color: var(--og-accent-color);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
:host([position="bottom"]) .tab:hover, :host([position="bottom"]) .tab.active {
|
|
50
|
-
border-bottom-color: var(--og-accent-color);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.marker {
|
|
54
|
-
display: none;
|
|
55
|
-
position: absolute;
|
|
56
|
-
height: 1px;
|
|
57
|
-
background-color: var(--og-accent-color);
|
|
58
|
-
transition: left 0.2s, width 0.2s;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
:host([position="top"]) .marker {
|
|
62
|
-
top: 0px;
|
|
63
|
-
bottom: auto;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
:host([position="bottom"]) .marker {
|
|
67
|
-
bottom: 0px;
|
|
68
|
-
top: auto;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
:host(.inactive) .tab.active {
|
|
72
|
-
border-top-color: var(--og-tab-border-color);
|
|
73
|
-
border-bottom-color: var(--og-tab-border-color);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
:host([tabsize="stretch"]) .tab.last {
|
|
77
|
-
border-right-width: 0;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.tab {
|
|
81
|
-
border-right: 1px solid var(--og-tab-border-color);
|
|
82
|
-
display: flex;
|
|
83
|
-
flex-direction: row;
|
|
84
|
-
height: 100%;
|
|
85
|
-
background: var(--og-tab-background-color);
|
|
86
|
-
cursor: pointer;
|
|
87
|
-
padding-left: 7px;
|
|
88
|
-
padding-right: 7px;
|
|
89
|
-
position: relative;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.tab.closable {
|
|
93
|
-
padding-right: 20px;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.tab.active {
|
|
97
|
-
background-color: var(--og-tab-background-color-active);
|
|
98
|
-
height: ${constants.TAB_PANEL_HEIGHT}px;
|
|
99
|
-
color: var(--og-text-color-3);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.tab:hover og-close {
|
|
103
|
-
display: block;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
og-close {
|
|
107
|
-
position: absolute;
|
|
108
|
-
right: 2px;
|
|
109
|
-
display: ${unsafeCSS(device.detect() == "mobile" ? "block" : "none")};
|
|
110
|
-
width: 16px;
|
|
111
|
-
height: 16px;
|
|
112
|
-
font-size: 10px;
|
|
113
|
-
line-height: 16px;
|
|
114
|
-
margin: 7px 0 0 5px;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.tab-save-mark {
|
|
118
|
-
height: 16px;
|
|
119
|
-
line-height: 16px;
|
|
120
|
-
margin: 6px 0 0 5px;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.tab.closable:hover .tab-save-mark {
|
|
124
|
-
display: none;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.tab.closable .tab-save-mark {
|
|
128
|
-
position: absolute;
|
|
129
|
-
right: 5px;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.tab.unsaved {
|
|
133
|
-
color: #959d00;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
:host([tabAlign="center"]) .tab-text {
|
|
137
|
-
text-align: center;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
:host([tabAlign="right"]) .tab-text {
|
|
141
|
-
text-align: right;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.tab-text {
|
|
145
|
-
flex: 1;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
.tab-text og-icon {
|
|
149
|
-
display: inline;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
.tab-x og-icon {
|
|
153
|
-
display: block;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
.tab-x:hover {
|
|
157
|
-
background-color: var(--og-accent-color-alpha-30);
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
.empty {
|
|
161
|
-
flex: 1;
|
|
162
|
-
height: 100%;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
.buttons {
|
|
166
|
-
flex: 0;
|
|
167
|
-
height: 100%;
|
|
168
|
-
padding: 0 10px 0 10px;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
.buttons og-icon {
|
|
172
|
-
cursor: pointer;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
.buttons og-icon:hover {
|
|
176
|
-
color: var(--og-text-color-2)
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
#overlay {
|
|
180
|
-
background-color: var(--og-accent-color);
|
|
181
|
-
opacity: 0.5;
|
|
182
|
-
pointer-events: none;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
#btnAdd {
|
|
186
|
-
margin-left: 5px;
|
|
187
|
-
line-height: 0;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
`;
|
|
191
|
-
//# sourceMappingURL=tabs.style.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.style.js","sourceRoot":"","sources":["../../src/components/tabs.style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AAErC,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,CAAA;;;;;;;gBAOR,SAAS,CAAC,gBAAgB;iBACzB,SAAS,CAAC,gBAAgB;;;;;;;;;YAS/B,SAAS,CAAC,gBAAgB,GAAG,CAAC;;;;;;;;YAQ9B,SAAS,CAAC,gBAAgB,GAAG,CAAC;;;;;gBAK1B,SAAS,CAAC,gBAAgB;;;;mBAIvB,SAAS,CAAC,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YA4DjC,SAAS,CAAC,gBAAgB;;;;;;;;;;;aAWzB,SAAS,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiFrE,CAAC","sourcesContent":["import { device } from \"@omegagrid/core\";\nimport constants from \"../constants\";\nimport { css, unsafeCSS } from \"lit\";\n\nexport const style = css`\n\t* {\n\t\tbox-sizing: border-box;\n\t}\n\n\t:host {\n\t\tcolor: var(--og-text-color);\n\t\tmin-height: ${constants.TAB_PANEL_HEIGHT}px;\n\t\tline-height: ${constants.TAB_PANEL_HEIGHT}px;\n\t\tbackground: var(--og-tab-panel-background-color);\n\t\tborder-bottom: 1px solid var(--og-tab-border-color);\n\t\tdisplay: flex;\n\t\tposition: relative;\n\t\tfont-size: var(--og-font-size);\n\t}\n\n\t.tabs {\n\t\theight: ${constants.TAB_PANEL_HEIGHT - 1}px;\n\t\tflex: 1;\n\t\twhite-space: nowrap;\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t}\n\n\tog-container {\n\t\theight: ${constants.TAB_PANEL_HEIGHT - 1}px;\n\t\tflex: 1;\n\t}\n\n\t:host([position=\"top\"]) .tab {\n\t\tborder-top: ${constants.TAB_PANEL_BORDER}px solid var(--og-tab-panel-background-color);\n\t}\n\n\t:host([position=\"bottom\"]) .tab {\n\t\tborder-bottom: ${constants.TAB_PANEL_BORDER}px solid var(--og-tab-panel-background-color);\n\t}\n\t\n\t:host([position=\"bottom\"]) .tab.active {\n\t\ttop: -1px;\n\t}\n\n\t:host([position=\"top\"]) .tab:hover, :host([position=\"top\"]) .tab.active {\n\t\tborder-top-color: var(--og-accent-color);\n\t}\n\n\t:host([position=\"bottom\"]) .tab:hover, :host([position=\"bottom\"]) .tab.active {\n\t\tborder-bottom-color: var(--og-accent-color);\n\t}\n\n\t.marker {\n\t\tdisplay: none;\n\t\tposition: absolute;\n\t\theight: 1px;\n\t\tbackground-color: var(--og-accent-color);\n\t\ttransition: left 0.2s, width 0.2s;\n\t}\n\n\t:host([position=\"top\"]) .marker {\n\t \ttop: 0px;\n\t\tbottom: auto;\t\n\t}\n\n\t:host([position=\"bottom\"]) .marker {\n\t \tbottom: 0px;\n\t\ttop: auto;\t\n\t}\n\n\t:host(.inactive) .tab.active {\n\t\tborder-top-color: var(--og-tab-border-color);\n\t\tborder-bottom-color: var(--og-tab-border-color);\n\t}\n\n\t:host([tabsize=\"stretch\"]) .tab.last {\n\t\tborder-right-width: 0;\n\t}\n\n\t.tab {\n\t\tborder-right: 1px solid var(--og-tab-border-color);\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\theight: 100%;\n\t\tbackground: var(--og-tab-background-color);\n\t\tcursor: pointer;\n\t\tpadding-left: 7px;\n\t\tpadding-right: 7px;\n\t\tposition: relative;\n\t}\n\n\t.tab.closable {\n\t\tpadding-right: 20px;\n\t}\n\n\t.tab.active {\n\t\tbackground-color: var(--og-tab-background-color-active);\n\t\theight: ${constants.TAB_PANEL_HEIGHT}px;\n\t\tcolor: var(--og-text-color-3);\n\t}\n\n\t.tab:hover og-close {\n\t\tdisplay: block;\n\t}\n\n\tog-close {\n\t\tposition: absolute;\n\t\tright: 2px;\n\t\tdisplay: ${unsafeCSS(device.detect() == \"mobile\" ? \"block\" : \"none\")};\n\t\twidth: 16px;\n\t\theight: 16px;\n\t\tfont-size: 10px;\n\t\tline-height: 16px;\n\t\tmargin: 7px 0 0 5px;\n\t}\n\n\t.tab-save-mark {\n\t\theight: 16px;\n\t\tline-height: 16px;\n\t\tmargin: 6px 0 0 5px;\n\t}\n\n\t.tab.closable:hover .tab-save-mark {\n\t\tdisplay: none;\n\t}\n\n\t.tab.closable .tab-save-mark {\n\t\tposition: absolute;\n\t\tright: 5px;\n\t}\n\n\t.tab.unsaved {\n\t\tcolor: #959d00;\n\t}\n\n\t:host([tabAlign=\"center\"]) .tab-text {\n\t\ttext-align: center;\n\t}\n\n\t:host([tabAlign=\"right\"]) .tab-text {\n\t\ttext-align: right;\n\t}\n\n\t.tab-text {\n\t\tflex: 1;\n\t}\n\n\t.tab-text og-icon {\n\t\tdisplay: inline;\n\t}\n\n\t.tab-x og-icon {\n\t\tdisplay: block;\n\t}\n\n\t.tab-x:hover {\n\t\tbackground-color: var(--og-accent-color-alpha-30);\n\t}\n\n\t.empty {\n\t\tflex: 1;\n\t\theight: 100%;\n\t}\n\t\n\t.buttons {\n\t\tflex: 0;\n\t\theight: 100%;\n\t\tpadding: 0 10px 0 10px;\n\t}\n\n\t.buttons og-icon {\n\t\tcursor: pointer;\n\t}\n\n\t.buttons og-icon:hover {\n\t\tcolor: var(--og-text-color-2)\n\t}\n\n\t#overlay {\n\t\tbackground-color: var(--og-accent-color);\n\t\topacity: 0.5;\n\t\tpointer-events: none;\n\t}\n\n\t#btnAdd {\n\t\tmargin-left: 5px;\n\t\tline-height: 0;\n\t}\n\n`;"]}
|
package/dist/constants.d.ts
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
PREFIX: string;
|
|
3
|
-
DEFAULT_ACCENT_COLOR: string;
|
|
4
|
-
DEFAULT_ACCENT_COLOR_2: import("color")<string | number | import("color")<string | number | import("color")<string | number | import("color")<string | number | import("color")<string | number | import("color")<string | number | import("color")<string | number | import("color")<string | number | import("color")<string | number | import("color")<string | number | import("color")<string | number | import("color")<string | number | any | ArrayLike<number> | {
|
|
5
|
-
[key: string]: any;
|
|
6
|
-
}> | ArrayLike<number> | {
|
|
7
|
-
[key: string]: any;
|
|
8
|
-
}> | ArrayLike<number> | {
|
|
9
|
-
[key: string]: any;
|
|
10
|
-
}> | ArrayLike<number> | {
|
|
11
|
-
[key: string]: any;
|
|
12
|
-
}> | ArrayLike<number> | {
|
|
13
|
-
[key: string]: any;
|
|
14
|
-
}> | ArrayLike<number> | {
|
|
15
|
-
[key: string]: any;
|
|
16
|
-
}> | ArrayLike<number> | {
|
|
17
|
-
[key: string]: any;
|
|
18
|
-
}> | ArrayLike<number> | {
|
|
19
|
-
[key: string]: any;
|
|
20
|
-
}> | ArrayLike<number> | {
|
|
21
|
-
[key: string]: any;
|
|
22
|
-
}> | ArrayLike<number> | {
|
|
23
|
-
[key: string]: any;
|
|
24
|
-
}> | ArrayLike<number> | {
|
|
25
|
-
[key: string]: any;
|
|
26
|
-
}> | ArrayLike<number> | {
|
|
27
|
-
[key: string]: any;
|
|
28
|
-
}>;
|
|
29
|
-
SIZER_SIZE: number;
|
|
30
|
-
SLIDER_SIZE: number;
|
|
31
|
-
SLIDER_MIN_LENGTH: number;
|
|
32
|
-
EXPANDER_SIZE: number;
|
|
33
|
-
LIST_ITEM_HEIGHT: number;
|
|
34
|
-
LIST_RENDERING_TRESHOLD: number;
|
|
35
|
-
LIST_AUTOSCROLL_TRESHOLD: number;
|
|
36
|
-
LIST_AUTOSCROLL_DELAY: number;
|
|
37
|
-
DEFAULT_TEXT_HIGHLIGHT_COLOR: string;
|
|
38
|
-
TOOLTIP_MARGIN: number;
|
|
39
|
-
MENU_ITEM_HEIGHT: number;
|
|
40
|
-
COLORPICKER_COLOR_SIZE: number;
|
|
41
|
-
DEFAULT_NUMBER_FORMAT: string;
|
|
42
|
-
BUTTON_HEIGHT: number;
|
|
43
|
-
FONT_SIZE: number;
|
|
44
|
-
FLOATING_WINDOW_MAX_WIDTH: number;
|
|
45
|
-
TAB_PANEL_HEIGHT: number;
|
|
46
|
-
TAB_PANEL_BORDER: number;
|
|
47
|
-
};
|
|
48
|
-
export default _default;
|
|
49
|
-
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,wBAIC"}
|