@design.estate/dees-catalog 21.49.0 → 21.49.1
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_bundle/bundle.js +85 -132
- package/dist_bundle/bundle.js.map +1 -1
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-QG5BHDQO.js → chunk-2O2L36Y3.js} +91 -69
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-QG5BHDQO.js.map → chunk-2O2L36Y3.js.map} +1 -1
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-Q5VY4AV7.js → chunk-DTFC5CU3.js} +493 -34
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/chunk-DTFC5CU3.js.map +1 -0
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-modal-YOGT7PSU.js → dees-modal-4DMZSC7L.js} +2 -2
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-workspace-terminal-ORLONA36.js → dees-workspace-terminal-DM23WG2C.js} +3 -3
- package/dist_ts_web/00_commitinfo_data.js +1 -1
- package/dist_ts_web/elements/00group-appui/dees-appui-activitylog/dees-appui-activitylog.d.ts +2 -0
- package/dist_ts_web/elements/00group-appui/dees-appui-activitylog/dees-appui-activitylog.js +5 -20
- package/dist_ts_web/elements/00group-appui/dees-appui-mainmenu/dees-appui-mainmenu.d.ts +2 -0
- package/dist_ts_web/elements/00group-appui/dees-appui-mainmenu/dees-appui-mainmenu.js +5 -18
- package/dist_ts_web/elements/00group-appui/dees-appui-secondarymenu/dees-appui-secondarymenu.d.ts +2 -0
- package/dist_ts_web/elements/00group-appui/dees-appui-secondarymenu/dees-appui-secondarymenu.js +5 -18
- package/dist_ts_web/elements/00group-appui/dees-appui-tabs/dees-appui-tabs.d.ts +2 -0
- package/dist_ts_web/elements/00group-appui/dees-appui-tabs/dees-appui-tabs.js +10 -33
- package/dist_ts_web/elements/00group-feedback/dees-progressbar/dees-progressbar.d.ts +2 -0
- package/dist_ts_web/elements/00group-feedback/dees-progressbar/dees-progressbar.js +6 -14
- package/dist_ts_web/elements/00group-harness/dees-harness-message-list/dees-harness-message-list.d.ts +2 -0
- package/dist_ts_web/elements/00group-harness/dees-harness-message-list/dees-harness-message-list.js +14 -4
- package/dist_ts_web/elements/00group-input/dees-input-dropdown/dees-input-dropdown-popup.d.ts +2 -0
- package/dist_ts_web/elements/00group-input/dees-input-dropdown/dees-input-dropdown-popup.js +5 -18
- package/dist_ts_web/elements/00group-input/dees-input-tags/dees-input-tags.d.ts +2 -0
- package/dist_ts_web/elements/00group-input/dees-input-tags/dees-input-tags.js +14 -23
- package/dist_ts_web/elements/00group-input/dees-input-wysiwyg/blocks/text/code.block.js +7 -19
- package/dist_ts_web/elements/00group-input/dees-input-wysiwyg/wysiwyg.markdown.view.d.ts +3 -0
- package/dist_ts_web/elements/00group-input/dees-input-wysiwyg/wysiwyg.markdown.view.js +15 -1
- package/dist_ts_web/elements/00scrollbars.d.ts +122 -0
- package/dist_ts_web/elements/00scrollbars.js +545 -0
- package/dist_ts_web/elements/00scrolledges.d.ts +1 -14
- package/dist_ts_web/elements/00scrolledges.js +7 -70
- package/dist_ts_web/elements/00scrollerwatch.d.ts +31 -0
- package/dist_ts_web/elements/00scrollerwatch.js +88 -0
- package/dist_ts_web/elements/index.d.ts +1 -0
- package/dist_ts_web/elements/index.js +3 -1
- package/package.json +1 -1
- package/readme.md +45 -0
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/elements/00group-appui/dees-appui-activitylog/dees-appui-activitylog.ts +8 -19
- package/ts_web/elements/00group-appui/dees-appui-mainmenu/dees-appui-mainmenu.ts +8 -17
- package/ts_web/elements/00group-appui/dees-appui-secondarymenu/dees-appui-secondarymenu.ts +8 -17
- package/ts_web/elements/00group-appui/dees-appui-tabs/dees-appui-tabs.ts +13 -32
- package/ts_web/elements/00group-feedback/dees-progressbar/dees-progressbar.ts +9 -13
- package/ts_web/elements/00group-harness/dees-harness-message-list/dees-harness-message-list.ts +13 -3
- package/ts_web/elements/00group-input/dees-input-dropdown/dees-input-dropdown-popup.ts +8 -17
- package/ts_web/elements/00group-input/dees-input-tags/dees-input-tags.ts +17 -22
- package/ts_web/elements/00group-input/dees-input-wysiwyg/blocks/text/code.block.ts +7 -18
- package/ts_web/elements/00group-input/dees-input-wysiwyg/wysiwyg.markdown.view.ts +14 -0
- package/ts_web/elements/00scrollbars.ts +613 -0
- package/ts_web/elements/00scrolledges.ts +6 -71
- package/ts_web/elements/00scrollerwatch.ts +89 -0
- package/ts_web/elements/index.ts +2 -0
- package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/chunk-Q5VY4AV7.js.map +0 -1
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-modal-YOGT7PSU.js.map → dees-modal-4DMZSC7L.js.map} +0 -0
- /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-workspace-terminal-ORLONA36.js.map → dees-workspace-terminal-DM23WG2C.js.map} +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { css, html } from '@design.estate/dees-element';
|
|
2
|
+
import { ScrollerWatch } from './00scrollerwatch.js';
|
|
2
3
|
/** Scroll offsets within this distance of an end are layout rounding, not content past the edge. */
|
|
3
4
|
const edgeThresholdPx = 1;
|
|
4
5
|
/**
|
|
@@ -156,13 +157,10 @@ export const scrollEdgeFadeStyles = css `
|
|
|
156
157
|
export class ScrollEdgeShadowController {
|
|
157
158
|
host;
|
|
158
159
|
scrollerArg;
|
|
159
|
-
scroller = null;
|
|
160
160
|
connected = false;
|
|
161
161
|
topVisible = false;
|
|
162
162
|
bottomVisible = false;
|
|
163
|
-
|
|
164
|
-
mutationObserver;
|
|
165
|
-
slots = [];
|
|
163
|
+
watch = new ScrollerWatch(() => this.sync(), () => this.sync());
|
|
166
164
|
constructor(host, scrollerArg) {
|
|
167
165
|
this.host = host;
|
|
168
166
|
this.scrollerArg = scrollerArg;
|
|
@@ -181,7 +179,7 @@ export class ScrollEdgeShadowController {
|
|
|
181
179
|
this.connected = true;
|
|
182
180
|
void this.host.updateComplete.then(() => {
|
|
183
181
|
if (this.connected) {
|
|
184
|
-
this.follow();
|
|
182
|
+
this.watch.follow(this.scrollerArg() ?? null);
|
|
185
183
|
this.sync();
|
|
186
184
|
}
|
|
187
185
|
});
|
|
@@ -189,13 +187,13 @@ export class ScrollEdgeShadowController {
|
|
|
189
187
|
/** Every render may change the scroller, its content or where it is scrolled to. */
|
|
190
188
|
hostUpdated() {
|
|
191
189
|
if (this.connected) {
|
|
192
|
-
this.follow();
|
|
190
|
+
this.watch.follow(this.scrollerArg() ?? null);
|
|
193
191
|
this.sync();
|
|
194
192
|
}
|
|
195
193
|
}
|
|
196
194
|
hostDisconnected() {
|
|
197
195
|
this.connected = false;
|
|
198
|
-
this.unfollow();
|
|
196
|
+
this.watch.unfollow();
|
|
199
197
|
}
|
|
200
198
|
/**
|
|
201
199
|
* The bands both edges cast, each visible while content lies past its edge. They go right after
|
|
@@ -219,7 +217,7 @@ export class ScrollEdgeShadowController {
|
|
|
219
217
|
* scrolls at the edge does, calls it to show the edges in the same frame.
|
|
220
218
|
*/
|
|
221
219
|
sync = () => {
|
|
222
|
-
const scroller = this.scroller;
|
|
220
|
+
const scroller = this.watch.scroller;
|
|
223
221
|
const top = !!scroller && scroller.scrollTop > edgeThresholdPx;
|
|
224
222
|
const bottom = !!scroller
|
|
225
223
|
&& scroller.scrollTop + scroller.clientHeight < scroller.scrollHeight - edgeThresholdPx;
|
|
@@ -230,66 +228,5 @@ export class ScrollEdgeShadowController {
|
|
|
230
228
|
this.bottomVisible = bottom;
|
|
231
229
|
this.host.requestUpdate();
|
|
232
230
|
};
|
|
233
|
-
/** Follows the scroller the host names now; the same scroller stays followed as it is. */
|
|
234
|
-
follow() {
|
|
235
|
-
const scroller = this.scrollerArg() ?? null;
|
|
236
|
-
if (scroller === this.scroller) {
|
|
237
|
-
return;
|
|
238
|
-
}
|
|
239
|
-
this.unfollow();
|
|
240
|
-
this.scroller = scroller;
|
|
241
|
-
if (!scroller) {
|
|
242
|
-
return;
|
|
243
|
-
}
|
|
244
|
-
scroller.addEventListener('scroll', this.sync, { passive: true });
|
|
245
|
-
this.resizeObserver = new ResizeObserver(this.sync);
|
|
246
|
-
this.mutationObserver = new MutationObserver(this.observeContent);
|
|
247
|
-
this.mutationObserver.observe(scroller, { childList: true });
|
|
248
|
-
this.observeContent();
|
|
249
|
-
}
|
|
250
|
-
/**
|
|
251
|
-
* Observes the scroller and what fills it: the scroll height changes with the size of its
|
|
252
|
-
* children, and with the elements assigned to a slot among them. Children that come or go are
|
|
253
|
-
* observed anew, and their coming or going is measured at once, since a child that leaves
|
|
254
|
-
* resizes nothing that stays.
|
|
255
|
-
*/
|
|
256
|
-
observeContent = () => {
|
|
257
|
-
const scroller = this.scroller;
|
|
258
|
-
const resizeObserver = this.resizeObserver;
|
|
259
|
-
if (!scroller || !resizeObserver) {
|
|
260
|
-
return;
|
|
261
|
-
}
|
|
262
|
-
resizeObserver.disconnect();
|
|
263
|
-
for (const slot of this.slots) {
|
|
264
|
-
slot.removeEventListener('slotchange', this.observeContent);
|
|
265
|
-
}
|
|
266
|
-
this.slots = [];
|
|
267
|
-
resizeObserver.observe(scroller);
|
|
268
|
-
for (const child of scroller.children) {
|
|
269
|
-
if (child instanceof HTMLSlotElement) {
|
|
270
|
-
this.slots.push(child);
|
|
271
|
-
child.addEventListener('slotchange', this.observeContent);
|
|
272
|
-
for (const assigned of child.assignedElements({ flatten: true })) {
|
|
273
|
-
resizeObserver.observe(assigned);
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
else {
|
|
277
|
-
resizeObserver.observe(child);
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
this.sync();
|
|
281
|
-
};
|
|
282
|
-
unfollow() {
|
|
283
|
-
this.scroller?.removeEventListener('scroll', this.sync);
|
|
284
|
-
this.resizeObserver?.disconnect();
|
|
285
|
-
this.resizeObserver = undefined;
|
|
286
|
-
this.mutationObserver?.disconnect();
|
|
287
|
-
this.mutationObserver = undefined;
|
|
288
|
-
for (const slot of this.slots) {
|
|
289
|
-
slot.removeEventListener('slotchange', this.observeContent);
|
|
290
|
-
}
|
|
291
|
-
this.slots = [];
|
|
292
|
-
this.scroller = null;
|
|
293
|
-
}
|
|
294
231
|
}
|
|
295
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
232
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBzY3JvbGxlZGdlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzX3dlYi9lbGVtZW50cy8wMHNjcm9sbGVkZ2VzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxHQUFHLEVBQUUsSUFBSSxFQUF5RCxNQUFNLDZCQUE2QixDQUFDO0FBRS9HLE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUVyRCxvR0FBb0c7QUFDcEcsTUFBTSxlQUFlLEdBQUcsQ0FBQyxDQUFDO0FBRTFCOzs7Ozs7Ozs7R0FTRztBQUNILE1BQU0sQ0FBQyxNQUFNLHNCQUFzQixHQUFjLEdBQUcsQ0FBQTs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztDQTJDbkQsQ0FBQztBQUVGOzs7O0dBSUc7QUFDSCxNQUFNLGtCQUFrQixHQUFHLENBQUMsd0JBQXdCLEVBQUUsMkJBQTJCLENBQUMsQ0FBQztBQUNuRixJQUFJLE9BQU8sR0FBRyxLQUFLLFdBQVcsSUFBSSxrQkFBa0IsSUFBSSxHQUFHLEVBQUUsQ0FBQztJQ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Q0FBQyxhQUFhLEVBQUUsQ0FBQztJQUM1QixDQUFDLENBQUM7Q0FDSCJ9
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Follows one scroller for what a scroller's companions measure: it calls `onScroll` when the
|
|
3
|
+
* scroller scrolls and `onLayout` when the scroller or any of its element children resizes — a
|
|
4
|
+
* row added, a group folded, a pane dragged narrower — and when children come or go. A slot among
|
|
5
|
+
* the children stands for the elements assigned to it. Scroll edges and overlay scrollbars both
|
|
6
|
+
* follow their scroller through it.
|
|
7
|
+
*/
|
|
8
|
+
export declare class ScrollerWatch {
|
|
9
|
+
private readonly onScroll;
|
|
10
|
+
private readonly onLayout;
|
|
11
|
+
private target;
|
|
12
|
+
private resizeObserver;
|
|
13
|
+
private mutationObserver;
|
|
14
|
+
private slots;
|
|
15
|
+
constructor(onScroll: () => void, onLayout: () => void);
|
|
16
|
+
/** The scroller followed now, if any. */
|
|
17
|
+
get scroller(): HTMLElement | null;
|
|
18
|
+
/**
|
|
19
|
+
* Follows `scroller`, or nothing; the same scroller stays followed as it is. Answers whether the
|
|
20
|
+
* followed scroller changed. A new one is measured at once, through `onLayout`.
|
|
21
|
+
*/
|
|
22
|
+
follow(scroller: HTMLElement | null): boolean;
|
|
23
|
+
unfollow(): void;
|
|
24
|
+
/**
|
|
25
|
+
* Observes the scroller and what fills it: the scroll height changes with the size of its
|
|
26
|
+
* children, and with the elements assigned to a slot among them. Children that come or go are
|
|
27
|
+
* observed anew, and their coming or going is measured at once, since a child that leaves
|
|
28
|
+
* resizes nothing that stays.
|
|
29
|
+
*/
|
|
30
|
+
private readonly observeContent;
|
|
31
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Follows one scroller for what a scroller's companions measure: it calls `onScroll` when the
|
|
3
|
+
* scroller scrolls and `onLayout` when the scroller or any of its element children resizes — a
|
|
4
|
+
* row added, a group folded, a pane dragged narrower — and when children come or go. A slot among
|
|
5
|
+
* the children stands for the elements assigned to it. Scroll edges and overlay scrollbars both
|
|
6
|
+
* follow their scroller through it.
|
|
7
|
+
*/
|
|
8
|
+
export class ScrollerWatch {
|
|
9
|
+
onScroll;
|
|
10
|
+
onLayout;
|
|
11
|
+
target = null;
|
|
12
|
+
resizeObserver;
|
|
13
|
+
mutationObserver;
|
|
14
|
+
slots = [];
|
|
15
|
+
constructor(onScroll, onLayout) {
|
|
16
|
+
this.onScroll = onScroll;
|
|
17
|
+
this.onLayout = onLayout;
|
|
18
|
+
}
|
|
19
|
+
/** The scroller followed now, if any. */
|
|
20
|
+
get scroller() {
|
|
21
|
+
return this.target;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Follows `scroller`, or nothing; the same scroller stays followed as it is. Answers whether the
|
|
25
|
+
* followed scroller changed. A new one is measured at once, through `onLayout`.
|
|
26
|
+
*/
|
|
27
|
+
follow(scroller) {
|
|
28
|
+
if (scroller === this.target) {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
this.unfollow();
|
|
32
|
+
this.target = scroller;
|
|
33
|
+
if (!scroller) {
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
scroller.addEventListener('scroll', this.onScroll, { passive: true });
|
|
37
|
+
this.resizeObserver = new ResizeObserver(() => this.onLayout());
|
|
38
|
+
this.mutationObserver = new MutationObserver(this.observeContent);
|
|
39
|
+
this.mutationObserver.observe(scroller, { childList: true });
|
|
40
|
+
this.observeContent();
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
unfollow() {
|
|
44
|
+
this.target?.removeEventListener('scroll', this.onScroll);
|
|
45
|
+
this.resizeObserver?.disconnect();
|
|
46
|
+
this.resizeObserver = undefined;
|
|
47
|
+
this.mutationObserver?.disconnect();
|
|
48
|
+
this.mutationObserver = undefined;
|
|
49
|
+
for (const slot of this.slots) {
|
|
50
|
+
slot.removeEventListener('slotchange', this.observeContent);
|
|
51
|
+
}
|
|
52
|
+
this.slots = [];
|
|
53
|
+
this.target = null;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Observes the scroller and what fills it: the scroll height changes with the size of its
|
|
57
|
+
* children, and with the elements assigned to a slot among them. Children that come or go are
|
|
58
|
+
* observed anew, and their coming or going is measured at once, since a child that leaves
|
|
59
|
+
* resizes nothing that stays.
|
|
60
|
+
*/
|
|
61
|
+
observeContent = () => {
|
|
62
|
+
const scroller = this.target;
|
|
63
|
+
const resizeObserver = this.resizeObserver;
|
|
64
|
+
if (!scroller || !resizeObserver) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
resizeObserver.disconnect();
|
|
68
|
+
for (const slot of this.slots) {
|
|
69
|
+
slot.removeEventListener('slotchange', this.observeContent);
|
|
70
|
+
}
|
|
71
|
+
this.slots = [];
|
|
72
|
+
resizeObserver.observe(scroller);
|
|
73
|
+
for (const child of scroller.children) {
|
|
74
|
+
if (child instanceof HTMLSlotElement) {
|
|
75
|
+
this.slots.push(child);
|
|
76
|
+
child.addEventListener('slotchange', this.observeContent);
|
|
77
|
+
for (const assigned of child.assignedElements({ flatten: true })) {
|
|
78
|
+
resizeObserver.observe(assigned);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
resizeObserver.observe(child);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
this.onLayout();
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBzY3JvbGxlcndhdGNoLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHNfd2ViL2VsZW1lbnRzLzAwc2Nyb2xsZXJ3YXRjaC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7O0dBTUc7QUFDSCxNQUFNLE9BQU8sYUFBYTtJQU9MLFFBQVE7SUFDUixRQUFRO0lBUG5CLE1BQU0sR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MsbUJBQW1CLENBQUMsWUFBWSxFQUFFLElBQUksQ0FBQyxjQUFjLENBQUMsQ0FBQztRQUM5RCxDQUFDO1FBQ0QsSUFBSSxDQUFDLEtBQUssR0FBRyxFQUFFLENBQUM7UUFDaEIsY0FBYyxDQUFDLE9BQU8sQ0FBQyxRQUFRLENBQUMsQ0FBQztRQUNqQyxLQUFLLE1BQU0sS0FBSyxJQUFJLFFBQVEsQ0FBQyxRQUFRLEVBQUUsQ0FBQztZQUN0QyxJQUFJLEtBQUssWUFBWSxlQUFlLEVBQUUsQ0FBQztnQkFDckMsSUFBSSxDQUFDLEtBQUssQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLENBQUM7Z0JBQ3ZCLEtBQUssQ0FBQyxnQkFBZ0IsQ0FBQyxZQUFZLEVBQUUsSUFBSSxDQUFDLGNBQWMsQ0FBQyxDQUFDO2dCQUMxRCxLQUFLLE1BQU0sUUFBUSxJQUFJLEtBQUssQ0FBQyxnQkFBZ0IsQ0FBQyxFQUFFLE9BQU8sRUFBRSxJQUFJLEVBQUUsQ0FBQyxFQUFFLENBQUM7b0JBQ2pFLGNBQWMsQ0FBQyxPQUFPLENBQUMsUUFBUSxDQUFDLENBQUM7Z0JBQ25DLENBQUM7WUFDSCxDQUFDO2lCQUFNLENBQUM7Z0JBQ04sY0FBYyxDQUFDLE9BQU8sQ0FBQyxLQUFLLENBQUMsQ0FBQztZQUNoQyxDQUFDO1FBQ0gsQ0FBQztRQUNELElBQUksQ0FBQyxRQUFRLEVBQUUsQ0FBQztJQUNsQixDQUFDLENBQUM7Q0FDSCJ9
|
|
@@ -2,6 +2,7 @@ export * from './00actionerror.js';
|
|
|
2
2
|
export * from './00zindex.js';
|
|
3
3
|
export * from './00theme.js';
|
|
4
4
|
export * from './00scrolledges.js';
|
|
5
|
+
export * from './00scrollbars.js';
|
|
5
6
|
export * from './00visuallyhidden.js';
|
|
6
7
|
export * from './00tilebar.js';
|
|
7
8
|
export type { TBarInfo } from './00barinfo.js';
|
|
@@ -3,6 +3,8 @@ export * from './00zindex.js';
|
|
|
3
3
|
export * from './00theme.js';
|
|
4
4
|
// Scroll edges: shadows where content scrolls beneath fixed chrome, fades where it scrolls in a surface of its own.
|
|
5
5
|
export * from './00scrolledges.js';
|
|
6
|
+
// Overlay scrollbars: shown while a scroller scrolls or the pointer is over it, taking no room.
|
|
7
|
+
export * from './00scrollbars.js';
|
|
6
8
|
// Text for assistive technology alone, out of sight.
|
|
7
9
|
export * from './00visuallyhidden.js';
|
|
8
10
|
// A tile's standard header and footer bar, for a header or footer a component slots into a tile.
|
|
@@ -27,4 +29,4 @@ export * from './00group-simple/index.js';
|
|
|
27
29
|
export * from './00group-terminal/index.js';
|
|
28
30
|
export * from './00group-utility/index.js';
|
|
29
31
|
export * from './00group-workspace/index.js';
|
|
30
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
32
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90c193ZWIvZWxlbWVudHMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxvQkFBb0IsQ0FBQztBQUNuQyxjQUFjLGVBQWUsQ0FBQztBQUM5QixjQUFjLGNBQWMsQ0FBQztBQUM3QixvSEFBb0g7QUFDcEgsY0FBYyxvQkFBb0IsQ0FBQztBQUNuQyxnR0FBZ0c7QUFDaEcsY0FBYyxtQkFBbUIsQ0FBQztBQUNsQyxxREFBcUQ7QUFDckQsY0FBYyx1QkFBdUIsQ0FBQztBQUN0QyxpR0FBaUc7QUFDakcsY0FBYyxnQkFBZ0IsQ0FBQztBQU0vQixzRkFBc0Y7QUFDdEYsY0FBYyx1QkFBdUIsQ0FBQztBQUV0QyxtQkFBbUI7QUFDbkIsY0FBYywwQkFBMEIsQ0FBQztBQUN6QyxjQUFjLDJCQUEyQixDQUFDO0FBQzFDLGNBQWMsMEJBQTBCLENBQUM7QUFDekMsY0FBYyw2QkFBNkIsQ0FBQztBQUM1QyxjQUFjLDZCQUE2QixDQUFDO0FBQzVDLGNBQWMseUJBQXlCLENBQUM7QUFDeEMsY0FBYyw0QkFBNEIsQ0FBQztBQUMzQyxjQUFjLDJCQUEyQixDQUFDO0FBQzFDLGNBQWMsMEJBQTBCLENBQUM7QUFDekMsY0FBYywyQkFBMkIsQ0FBQztBQUMxQyxjQUFjLDBCQUEwQixDQUFDO0FBQ3pDLGNBQWMsNEJBQTRCLENBQUM7QUFDM0MsY0FBYyw0QkFBNEIsQ0FBQztBQUMzQyxjQUFjLDJCQUEyQixDQUFDO0FBQzFDLGNBQWMsNkJBQTZCLENBQUM7QUFDNUMsY0FBYyw0QkFBNEIsQ0FBQztBQUMzQyxjQUFjLDhCQUE4QixDQUFDIn0=
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@design.estate/dees-catalog",
|
|
3
|
-
"version": "21.49.
|
|
3
|
+
"version": "21.49.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.",
|
|
6
6
|
"main": "dist_ts_web/index.js",
|
package/readme.md
CHANGED
|
@@ -806,6 +806,51 @@ public render() {
|
|
|
806
806
|
}
|
|
807
807
|
```
|
|
808
808
|
|
|
809
|
+
### Scrollbars
|
|
810
|
+
|
|
811
|
+
A scrollbar shows while its area scrolls and for a second after, and while a mouse rests over
|
|
812
|
+
the area, so the reader finds it and drags its thumb; otherwise it is invisible and takes no room.
|
|
813
|
+
It looks and behaves the same on macOS, Windows and Linux, in Chromium, Safari and Firefox: a 6px
|
|
814
|
+
thumb of `--dees-color-scrollbar-thumb` along the end and bottom edges, `-hover` while the pointer
|
|
815
|
+
rests on it or drags it, fading in with the theme's fast step and out with its slow one, at once
|
|
816
|
+
under reduced motion. The platform's own scrollbars are hidden, so a classic scrollbar (Windows,
|
|
817
|
+
Linux) reserves no gutter either. Wheel, touch, the keyboard and clicks scroll and reach the
|
|
818
|
+
content as before; only a mouse or pen press on a shown thumb is the scrollbar's. In forced
|
|
819
|
+
colours the platform's scrollbars come back, in the system's colours.
|
|
820
|
+
|
|
821
|
+
In the catalog: `dees-appui-mainmenu`, `dees-appui-secondarymenu`, `dees-appui-tabs`,
|
|
822
|
+
`dees-appui-activitylog`, the suggestions of `dees-input-tags`, the options of
|
|
823
|
+
`dees-input-dropdown`, `dees-progressbar`'s log, the code blocks of `dees-input-wysiwyg` (editor
|
|
824
|
+
and Markdown view) and `dees-harness-message-list`, whose `hideScrollbar` hides it altogether.
|
|
825
|
+
|
|
826
|
+
A component of its own joins with `OverlayScrollbarController` and `overlayScrollbarStyles`,
|
|
827
|
+
exported from the package root, instead of styling `::-webkit-scrollbar` (which turns the
|
|
828
|
+
platform's overlay scrollbar into one that always shows) or `scrollbar-width`. The controller
|
|
829
|
+
follows the scroller the host names as the scroll-edge controller does, and inserts the rails
|
|
830
|
+
right after it, in a positioned box around it; the rails cover the scroller's padding box.
|
|
831
|
+
`OverlayScrollbars` does the same for a scroller outside a Lit render (`attach(scroller)`,
|
|
832
|
+
`detach()`; a host that renders its scroller anew detaches the old one's, and a scroller dropped
|
|
833
|
+
with the DOM around it needs no `detach()`, since a drag it held ends at the next release or
|
|
834
|
+
press); `onDrag` tells a host when a thumb drag starts and ends:
|
|
835
|
+
|
|
836
|
+
```typescript
|
|
837
|
+
import { OverlayScrollbarController, overlayScrollbarStyles, themeDefaultStyles } from '@design.estate/dees-catalog';
|
|
838
|
+
|
|
839
|
+
public static styles = [themeDefaultStyles, overlayScrollbarStyles, css`
|
|
840
|
+
.listFrame { position: relative; flex: 1; min-height: 0; }
|
|
841
|
+
.list { height: 100%; overflow-y: auto; }
|
|
842
|
+
`];
|
|
843
|
+
|
|
844
|
+
private readonly scrollbars = new OverlayScrollbarController(this, () => this.shadowRoot?.querySelector<HTMLElement>('.list'));
|
|
845
|
+
|
|
846
|
+
public render() {
|
|
847
|
+
return html`<div class="listFrame"><div class="list">…</div></div>`;
|
|
848
|
+
}
|
|
849
|
+
```
|
|
850
|
+
|
|
851
|
+
A host that changes the scroller in a way its renders, its scroll and its children's sizes do not
|
|
852
|
+
show calls `scrollbars.sync()`.
|
|
853
|
+
|
|
809
854
|
### Visually hidden
|
|
810
855
|
|
|
811
856
|
Text meant for assistive technology alone — a live region's announcement, the name of a column
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@design.estate/dees-catalog',
|
|
6
|
-
version: '21.49.
|
|
6
|
+
version: '21.49.1',
|
|
7
7
|
description: 'A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.'
|
|
8
8
|
}
|
|
@@ -17,6 +17,7 @@ import { demoFunc } from './dees-appui-activitylog.demo.js';
|
|
|
17
17
|
import * as plugins from '../../00plugins.js';
|
|
18
18
|
import { themeDefaultStyles } from '../../00theme.js';
|
|
19
19
|
import { ScrollEdgeShadowController, scrollEdgeShadowStyles } from '../../00scrolledges.js';
|
|
20
|
+
import { OverlayScrollbarController, overlayScrollbarStyles } from '../../00scrollbars.js';
|
|
20
21
|
import { appuiWords, type TAppuiActivitylogLabels } from '../appui.labels.js';
|
|
21
22
|
import { dcLocalize } from '../../../i18n/localize.js';
|
|
22
23
|
import { dcSourceI18n } from '../../../i18n/formats.js';
|
|
@@ -69,11 +70,18 @@ export class DeesAppuiActivitylog extends DeesElement implements IActivityLogAPI
|
|
|
69
70
|
() => this.shadowRoot?.querySelector<HTMLElement>('.activityContainer'),
|
|
70
71
|
);
|
|
71
72
|
|
|
73
|
+
/** The log's scrollbar, shown while it scrolls or the pointer is over it. */
|
|
74
|
+
private readonly scrollbars = new OverlayScrollbarController(
|
|
75
|
+
this,
|
|
76
|
+
() => this.shadowRoot?.querySelector<HTMLElement>('.activityContainer'),
|
|
77
|
+
);
|
|
78
|
+
|
|
72
79
|
// STYLES
|
|
73
80
|
public static styles = [
|
|
74
81
|
themeDefaultStyles,
|
|
75
82
|
cssManager.defaultStyles,
|
|
76
83
|
scrollEdgeShadowStyles,
|
|
84
|
+
overlayScrollbarStyles,
|
|
77
85
|
css`
|
|
78
86
|
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
|
|
79
87
|
|
|
@@ -173,25 +181,6 @@ export class DeesAppuiActivitylog extends DeesElement implements IActivityLogAPI
|
|
|
173
181
|
padding: var(--activitylog-padding-block) 0;
|
|
174
182
|
overflow-y: auto;
|
|
175
183
|
overscroll-behavior: contain;
|
|
176
|
-
scrollbar-width: thin;
|
|
177
|
-
scrollbar-color: var(--dees-color-border-strong) transparent;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
.activityContainer::-webkit-scrollbar {
|
|
181
|
-
width: 6px;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
.activityContainer::-webkit-scrollbar-track {
|
|
185
|
-
background: transparent;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.activityContainer::-webkit-scrollbar-thumb {
|
|
189
|
-
background: var(--dees-color-border-strong);
|
|
190
|
-
border-radius: 3px;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
.activityContainer::-webkit-scrollbar-thumb:hover {
|
|
194
|
-
background: var(--dees-color-text-muted);
|
|
195
184
|
}
|
|
196
185
|
|
|
197
186
|
.empty-state {
|
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
import { demoFunc } from './dees-appui-mainmenu.demo.js';
|
|
22
22
|
import { themeDefaultStyles } from '../../00theme.js';
|
|
23
23
|
import { ScrollEdgeShadowController, scrollEdgeShadowStyles } from '../../00scrolledges.js';
|
|
24
|
+
import { OverlayScrollbarController, overlayScrollbarStyles } from '../../00scrollbars.js';
|
|
24
25
|
|
|
25
26
|
/**
|
|
26
27
|
* the most left menu
|
|
@@ -87,11 +88,18 @@ export class DeesAppuiMainmenu extends DeesElement {
|
|
|
87
88
|
() => this.shadowRoot?.querySelector<HTMLElement>('.menuSection'),
|
|
88
89
|
);
|
|
89
90
|
|
|
91
|
+
/** The groups' scrollbar, shown while they scroll or the pointer is over them. */
|
|
92
|
+
private readonly scrollbars = new OverlayScrollbarController(
|
|
93
|
+
this,
|
|
94
|
+
() => this.shadowRoot?.querySelector<HTMLElement>('.menuSection'),
|
|
95
|
+
);
|
|
96
|
+
|
|
90
97
|
public static styles = [
|
|
91
98
|
themeDefaultStyles,
|
|
92
99
|
cssManager.defaultStyles,
|
|
93
100
|
appuiRailStyles,
|
|
94
101
|
scrollEdgeShadowStyles,
|
|
102
|
+
overlayScrollbarStyles,
|
|
95
103
|
css`
|
|
96
104
|
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
|
|
97
105
|
|
|
@@ -192,23 +200,6 @@ export class DeesAppuiMainmenu extends DeesElement {
|
|
|
192
200
|
padding: var(--dees-spacing-sm) 0;
|
|
193
201
|
}
|
|
194
202
|
|
|
195
|
-
.menuSection::-webkit-scrollbar {
|
|
196
|
-
width: 6px;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
.menuSection::-webkit-scrollbar-track {
|
|
200
|
-
background: transparent;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
.menuSection::-webkit-scrollbar-thumb {
|
|
204
|
-
background: var(--dees-color-scrollbar-thumb);
|
|
205
|
-
border-radius: var(--dees-radius-xs);
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
.menuSection::-webkit-scrollbar-thumb:hover {
|
|
209
|
-
background: var(--dees-color-scrollbar-thumb-hover);
|
|
210
|
-
}
|
|
211
|
-
|
|
212
203
|
/* Menu Group. Its inset is the same in the rail, which keeps each icon
|
|
213
204
|
where it is while the width moves. */
|
|
214
205
|
.menuGroup {
|
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
import { demoFunc } from './dees-appui-secondarymenu.demo.js';
|
|
25
25
|
import { themeDefaultStyles } from '../../00theme.js';
|
|
26
26
|
import { ScrollEdgeShadowController, scrollEdgeShadowStyles } from '../../00scrolledges.js';
|
|
27
|
+
import { OverlayScrollbarController, overlayScrollbarStyles } from '../../00scrollbars.js';
|
|
27
28
|
import { SubtreeOpenState, subtreeFoldTransition, subtreeRevealTransition, subtreeStyles } from '../../00subtree.js';
|
|
28
29
|
|
|
29
30
|
/**
|
|
@@ -113,11 +114,18 @@ export class DeesAppuiSecondarymenu extends DeesElement {
|
|
|
113
114
|
() => this.shadowRoot?.querySelector<HTMLElement>('.menuSection'),
|
|
114
115
|
);
|
|
115
116
|
|
|
117
|
+
/** The groups' scrollbar, shown while they scroll or the pointer is over them. */
|
|
118
|
+
private readonly scrollbars = new OverlayScrollbarController(
|
|
119
|
+
this,
|
|
120
|
+
() => this.shadowRoot?.querySelector<HTMLElement>('.menuSection'),
|
|
121
|
+
);
|
|
122
|
+
|
|
116
123
|
public static styles = [
|
|
117
124
|
themeDefaultStyles,
|
|
118
125
|
cssManager.defaultStyles,
|
|
119
126
|
appuiRailStyles,
|
|
120
127
|
scrollEdgeShadowStyles,
|
|
128
|
+
overlayScrollbarStyles,
|
|
121
129
|
subtreeStyles,
|
|
122
130
|
css`
|
|
123
131
|
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
|
|
@@ -228,23 +236,6 @@ export class DeesAppuiSecondarymenu extends DeesElement {
|
|
|
228
236
|
padding: var(--dees-spacing-sm) 0;
|
|
229
237
|
}
|
|
230
238
|
|
|
231
|
-
.menuSection::-webkit-scrollbar {
|
|
232
|
-
width: 6px;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
.menuSection::-webkit-scrollbar-track {
|
|
236
|
-
background: transparent;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
.menuSection::-webkit-scrollbar-thumb {
|
|
240
|
-
background: var(--dees-color-scrollbar-thumb);
|
|
241
|
-
border-radius: var(--dees-radius-xs);
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
.menuSection::-webkit-scrollbar-thumb:hover {
|
|
245
|
-
background: var(--dees-color-scrollbar-thumb-hover);
|
|
246
|
-
}
|
|
247
|
-
|
|
248
239
|
/* Menu Group. Its inset is the same in the rail, which keeps each icon
|
|
249
240
|
where it is while the width moves. */
|
|
250
241
|
.menuGroup {
|
|
@@ -15,6 +15,7 @@ import * as domtools from '@design.estate/dees-domtools';
|
|
|
15
15
|
import { demoFunc } from './dees-appui-tabs.demo.js';
|
|
16
16
|
import { themeDefaultStyles } from '../../00theme.js';
|
|
17
17
|
import { prefersReducedMotion } from '../../00motion.js';
|
|
18
|
+
import { OverlayScrollbarController, overlayScrollbarStyles } from '../../00scrollbars.js';
|
|
18
19
|
import '../../00group-feedback/dees-badge/dees-badge.js';
|
|
19
20
|
import { DeesContextmenu } from '../../00group-overlay/dees-contextmenu/dees-contextmenu.js';
|
|
20
21
|
import { nextRovingIndex } from '../appui.roving.js';
|
|
@@ -88,11 +89,18 @@ export class DeesAppuiTabs extends DeesElement {
|
|
|
88
89
|
private accessor canScrollRight: boolean = false;
|
|
89
90
|
|
|
90
91
|
private resizeObserver: ResizeObserver | null = null;
|
|
92
|
+
|
|
93
|
+
/** The horizontal strip's scrollbar, shown while it scrolls or the pointer is over it. */
|
|
94
|
+
private readonly scrollbars = new OverlayScrollbarController(
|
|
95
|
+
this,
|
|
96
|
+
() => this.shadowRoot?.querySelector<HTMLElement>('.tabsContainer.horizontal'),
|
|
97
|
+
);
|
|
91
98
|
private renaming = false;
|
|
92
99
|
|
|
93
100
|
public static styles = [
|
|
94
101
|
themeDefaultStyles,
|
|
95
102
|
cssManager.defaultStyles,
|
|
103
|
+
overlayScrollbarStyles,
|
|
96
104
|
css`
|
|
97
105
|
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
|
|
98
106
|
|
|
@@ -149,6 +157,11 @@ export class DeesAppuiTabs extends DeesElement {
|
|
|
149
157
|
opacity: 1;
|
|
150
158
|
}
|
|
151
159
|
|
|
160
|
+
/* The strip's scrollbar draws over the fades at its ends. */
|
|
161
|
+
.scroll-area > .overlayScrollbar {
|
|
162
|
+
z-index: 11;
|
|
163
|
+
}
|
|
164
|
+
|
|
152
165
|
.scroll-area {
|
|
153
166
|
position: relative;
|
|
154
167
|
flex: 1;
|
|
@@ -226,44 +239,12 @@ export class DeesAppuiTabs extends DeesElement {
|
|
|
226
239
|
overflow-x: auto;
|
|
227
240
|
overflow-y: hidden;
|
|
228
241
|
overscroll-behavior: contain;
|
|
229
|
-
scrollbar-width: thin;
|
|
230
|
-
scrollbar-color: transparent transparent;
|
|
231
242
|
height: 100%;
|
|
232
243
|
width: 100%;
|
|
233
244
|
padding: 4px 12px 0;
|
|
234
245
|
gap: 4px;
|
|
235
246
|
}
|
|
236
247
|
|
|
237
|
-
/* Show scrollbar on hover */
|
|
238
|
-
.tabs-wrapper:hover .tabsContainer.horizontal,
|
|
239
|
-
.scroll-area:hover .tabsContainer.horizontal {
|
|
240
|
-
scrollbar-color: var(--dees-color-scrollbar-thumb) transparent;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
.tabsContainer.horizontal::-webkit-scrollbar {
|
|
244
|
-
height: 4px;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
.tabsContainer.horizontal::-webkit-scrollbar-track {
|
|
248
|
-
background: transparent;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
.tabsContainer.horizontal::-webkit-scrollbar-thumb {
|
|
252
|
-
background: transparent;
|
|
253
|
-
border-radius: 2px;
|
|
254
|
-
transition: background var(--dees-transition-default) var(--dees-ease-standard);
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
.tabs-wrapper:hover .tabsContainer.horizontal::-webkit-scrollbar-thumb,
|
|
258
|
-
.scroll-area:hover .tabsContainer.horizontal::-webkit-scrollbar-thumb {
|
|
259
|
-
background: var(--dees-color-scrollbar-thumb);
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
.tabs-wrapper:hover .tabsContainer.horizontal::-webkit-scrollbar-thumb:hover,
|
|
263
|
-
.scroll-area:hover .tabsContainer.horizontal::-webkit-scrollbar-thumb:hover {
|
|
264
|
-
background: var(--dees-color-scrollbar-thumb-hover);
|
|
265
|
-
}
|
|
266
|
-
|
|
267
248
|
.tabsContainer.vertical {
|
|
268
249
|
display: flex;
|
|
269
250
|
flex-direction: column;
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
} from '@design.estate/dees-element';
|
|
11
11
|
import { themeDefaultStyles } from '../../00theme.js';
|
|
12
12
|
import { reducedMotionQuery } from '../../00motion.js';
|
|
13
|
+
import { OverlayScrollbarController, overlayScrollbarStyles } from '../../00scrollbars.js';
|
|
13
14
|
import { dcLocalize } from '../../../i18n/localize.js';
|
|
14
15
|
|
|
15
16
|
declare global {
|
|
@@ -83,9 +84,16 @@ export class DeesProgressbar extends DeesElement {
|
|
|
83
84
|
/** Owned for the length of a connection, so the text spinner stops and starts with the preference. */
|
|
84
85
|
private reducedMotion: MediaQueryList | undefined;
|
|
85
86
|
|
|
87
|
+
/** The terminal's scrollbar, shown while it scrolls or the pointer is over it; the panel is its frame. */
|
|
88
|
+
private readonly scrollbars = new OverlayScrollbarController(
|
|
89
|
+
this,
|
|
90
|
+
() => this.shadowRoot?.querySelector<HTMLElement>('.terminalScroller'),
|
|
91
|
+
);
|
|
92
|
+
|
|
86
93
|
public static styles = [
|
|
87
94
|
themeDefaultStyles,
|
|
88
95
|
cssManager.defaultStyles,
|
|
96
|
+
overlayScrollbarStyles,
|
|
89
97
|
css`
|
|
90
98
|
:host {
|
|
91
99
|
/* inner bevel hairline, dark mode only */
|
|
@@ -149,6 +157,7 @@ export class DeesProgressbar extends DeesElement {
|
|
|
149
157
|
}
|
|
150
158
|
|
|
151
159
|
.statusPanel {
|
|
160
|
+
position: relative;
|
|
152
161
|
margin-top: var(--dees-spacing-sm);
|
|
153
162
|
height: calc(var(--status-rows, 3) * var(--dees-font-caption1-line) + 2 * var(--dees-spacing-sm));
|
|
154
163
|
min-height: calc(var(--status-rows, 3) * var(--dees-font-caption1-line) + 2 * var(--dees-spacing-sm));
|
|
@@ -176,19 +185,6 @@ export class DeesProgressbar extends DeesElement {
|
|
|
176
185
|
overflow: auto;
|
|
177
186
|
}
|
|
178
187
|
|
|
179
|
-
.terminalScroller::-webkit-scrollbar {
|
|
180
|
-
width: 6px;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
.terminalScroller::-webkit-scrollbar-thumb {
|
|
184
|
-
background: var(--dees-color-border-strong);
|
|
185
|
-
border-radius: var(--dees-radius-full);
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.terminalScroller::-webkit-scrollbar-track {
|
|
189
|
-
background: transparent;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
188
|
.linePrefix {
|
|
193
189
|
width: 1ch;
|
|
194
190
|
flex: 0 0 1ch;
|