@deepfuture/dui-components 0.0.12 → 0.0.14
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/_deprecated/center/center.js +2 -2
- package/_deprecated/hstack/hstack.js +79 -33
- package/_deprecated/page-inset/page-inset.js +104 -56
- package/_deprecated/vstack/vstack.js +61 -19
- package/accordion/accordion-item.js +217 -147
- package/accordion/accordion.js +214 -149
- package/alert-dialog/alert-dialog-close.js +2 -2
- package/alert-dialog/alert-dialog-popup.js +230 -166
- package/alert-dialog/alert-dialog-trigger.js +2 -2
- package/alert-dialog/alert-dialog.js +128 -73
- package/avatar/avatar.js +175 -115
- package/badge/badge.js +2 -2
- package/breadcrumb/breadcrumb-ellipsis.js +2 -2
- package/breadcrumb/breadcrumb-item.js +2 -2
- package/breadcrumb/breadcrumb-link.js +2 -2
- package/breadcrumb/breadcrumb-page.js +2 -2
- package/breadcrumb/breadcrumb-separator.js +2 -2
- package/breadcrumb/breadcrumb.js +2 -2
- package/button/button.js +109 -65
- package/calendar/calendar.js +368 -290
- package/checkbox/checkbox-group.js +146 -87
- package/checkbox/checkbox.js +232 -167
- package/collapsible/collapsible.js +210 -132
- package/combobox/combobox.js +318 -252
- package/command/command-empty.js +67 -25
- package/command/command-group.js +87 -47
- package/command/command-input.js +84 -44
- package/command/command-item.js +168 -124
- package/command/command-list.js +60 -18
- package/command/command-separator.js +2 -2
- package/command/command-shortcut.js +2 -2
- package/command/command.js +297 -232
- package/data-table/data-table.js +225 -153
- package/dialog/dialog-close.js +2 -2
- package/dialog/dialog-popup.js +247 -181
- package/dialog/dialog-trigger.js +2 -2
- package/dialog/dialog.js +128 -73
- package/dropzone/dropzone.js +310 -249
- package/icon/icon.js +2 -2
- package/input/input.js +204 -143
- package/link/link.js +62 -24
- package/menu/menu-item.js +66 -24
- package/menu/menu.js +189 -136
- package/menubar/menubar.js +142 -91
- package/number-field/number-field.js +277 -204
- package/package.json +2 -3
- package/popover/popover-close.js +2 -2
- package/popover/popover-popup.js +126 -76
- package/popover/popover-trigger.js +2 -2
- package/popover/popover.js +181 -120
- package/portal/portal.js +128 -86
- package/preview-card/preview-card-popup.js +114 -66
- package/preview-card/preview-card-trigger.js +2 -2
- package/preview-card/preview-card.js +211 -142
- package/progress/progress.js +91 -45
- package/radio/radio-group.js +153 -90
- package/radio/radio.js +137 -94
- package/scroll-area/scroll-area.js +382 -283
- package/select/select.js +260 -203
- package/separator/separator.js +60 -18
- package/sidebar/sidebar-content.js +2 -2
- package/sidebar/sidebar-footer.js +2 -2
- package/sidebar/sidebar-group-label.js +2 -2
- package/sidebar/sidebar-group.js +2 -2
- package/sidebar/sidebar-header.js +2 -2
- package/sidebar/sidebar-inset.js +2 -2
- package/sidebar/sidebar-menu-button.js +118 -74
- package/sidebar/sidebar-menu-item.js +2 -2
- package/sidebar/sidebar-menu.js +2 -2
- package/sidebar/sidebar-provider.js +202 -129
- package/sidebar/sidebar-separator.js +2 -2
- package/sidebar/sidebar-trigger.js +2 -2
- package/sidebar/sidebar.js +150 -85
- package/slider/slider.js +217 -159
- package/spinner/spinner.js +70 -28
- package/switch/switch.js +174 -111
- package/tabs/tab.js +89 -47
- package/tabs/tabs-indicator.js +2 -2
- package/tabs/tabs-list.js +92 -54
- package/tabs/tabs-panel.js +90 -44
- package/tabs/tabs.js +130 -71
- package/textarea/textarea.js +153 -95
- package/toggle/toggle-group.js +184 -125
- package/toggle/toggle.js +131 -76
- package/toolbar/toolbar.js +79 -33
- package/tooltip/tooltip-popup.js +108 -60
- package/tooltip/tooltip-trigger.js +93 -55
- package/tooltip/tooltip.js +225 -154
- package/trunc/trunc.js +78 -34
|
@@ -1,13 +1,44 @@
|
|
|
1
1
|
/** Ported from original DUI: deep-future-app/app/client/components/dui/scroll-area */
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
3
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
4
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
5
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
6
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
7
|
+
var _, done = false;
|
|
8
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
9
|
+
var context = {};
|
|
10
|
+
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
11
|
+
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
12
|
+
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
13
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
14
|
+
if (kind === "accessor") {
|
|
15
|
+
if (result === void 0) continue;
|
|
16
|
+
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
17
|
+
if (_ = accept(result.get)) descriptor.get = _;
|
|
18
|
+
if (_ = accept(result.set)) descriptor.set = _;
|
|
19
|
+
if (_ = accept(result.init)) initializers.unshift(_);
|
|
20
|
+
}
|
|
21
|
+
else if (_ = accept(result)) {
|
|
22
|
+
if (kind === "field") initializers.unshift(_);
|
|
23
|
+
else descriptor[key] = _;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
27
|
+
done = true;
|
|
28
|
+
};
|
|
29
|
+
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
|
|
30
|
+
var useValue = arguments.length > 2;
|
|
31
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
32
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
33
|
+
}
|
|
34
|
+
return useValue ? value : void 0;
|
|
35
|
+
};
|
|
36
|
+
var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
|
|
37
|
+
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
|
|
38
|
+
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
|
7
39
|
};
|
|
8
|
-
var _a;
|
|
9
40
|
import { css, html, LitElement, nothing, } from "lit";
|
|
10
|
-
import { property } from "lit/decorators.js";
|
|
41
|
+
import { property, state } from "lit/decorators.js";
|
|
11
42
|
import { base } from "@deepfuture/dui-core/base";
|
|
12
43
|
const styles = css `
|
|
13
44
|
:host {
|
|
@@ -118,271 +149,347 @@ const styles = css `
|
|
|
118
149
|
* @cssprop [--scroll-area-thumb-color] - Scrollbar thumb color.
|
|
119
150
|
* @cssprop [--scroll-fade-color] - Fade overlay color.
|
|
120
151
|
*/
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
this.#resizeObserver = new ResizeObserver(() => this.#measure());
|
|
198
|
-
this.#resizeObserver.observe(viewport);
|
|
199
|
-
const slot = viewport.querySelector("slot");
|
|
200
|
-
if (slot) {
|
|
201
|
-
const observe = () => {
|
|
202
|
-
for (const node of slot.assignedElements()) {
|
|
203
|
-
this.#resizeObserver.observe(node);
|
|
204
|
-
}
|
|
205
|
-
};
|
|
206
|
-
slot.addEventListener("slotchange", () => {
|
|
207
|
-
observe();
|
|
208
|
-
requestAnimationFrame(() => this.#measure());
|
|
209
|
-
});
|
|
210
|
-
observe();
|
|
152
|
+
let DuiScrollArea = (() => {
|
|
153
|
+
var _a;
|
|
154
|
+
let _classSuper = LitElement;
|
|
155
|
+
let _orientation_decorators;
|
|
156
|
+
let _orientation_initializers = [];
|
|
157
|
+
let _orientation_extraInitializers = [];
|
|
158
|
+
let _fade_decorators;
|
|
159
|
+
let _fade_initializers = [];
|
|
160
|
+
let _fade_extraInitializers = [];
|
|
161
|
+
let _maxHeight_decorators;
|
|
162
|
+
let _maxHeight_initializers = [];
|
|
163
|
+
let _maxHeight_extraInitializers = [];
|
|
164
|
+
let _private_hasOverflowX_decorators;
|
|
165
|
+
let _private_hasOverflowX_initializers = [];
|
|
166
|
+
let _private_hasOverflowX_extraInitializers = [];
|
|
167
|
+
let _private_hasOverflowX_descriptor;
|
|
168
|
+
let _private_hasOverflowY_decorators;
|
|
169
|
+
let _private_hasOverflowY_initializers = [];
|
|
170
|
+
let _private_hasOverflowY_extraInitializers = [];
|
|
171
|
+
let _private_hasOverflowY_descriptor;
|
|
172
|
+
let _private_hovering_decorators;
|
|
173
|
+
let _private_hovering_initializers = [];
|
|
174
|
+
let _private_hovering_extraInitializers = [];
|
|
175
|
+
let _private_hovering_descriptor;
|
|
176
|
+
let _private_scrolling_decorators;
|
|
177
|
+
let _private_scrolling_initializers = [];
|
|
178
|
+
let _private_scrolling_extraInitializers = [];
|
|
179
|
+
let _private_scrolling_descriptor;
|
|
180
|
+
let _private_thumbHeightPercent_decorators;
|
|
181
|
+
let _private_thumbHeightPercent_initializers = [];
|
|
182
|
+
let _private_thumbHeightPercent_extraInitializers = [];
|
|
183
|
+
let _private_thumbHeightPercent_descriptor;
|
|
184
|
+
let _private_thumbWidthPercent_decorators;
|
|
185
|
+
let _private_thumbWidthPercent_initializers = [];
|
|
186
|
+
let _private_thumbWidthPercent_extraInitializers = [];
|
|
187
|
+
let _private_thumbWidthPercent_descriptor;
|
|
188
|
+
let _private_thumbTopPercent_decorators;
|
|
189
|
+
let _private_thumbTopPercent_initializers = [];
|
|
190
|
+
let _private_thumbTopPercent_extraInitializers = [];
|
|
191
|
+
let _private_thumbTopPercent_descriptor;
|
|
192
|
+
let _private_thumbLeftPercent_decorators;
|
|
193
|
+
let _private_thumbLeftPercent_initializers = [];
|
|
194
|
+
let _private_thumbLeftPercent_extraInitializers = [];
|
|
195
|
+
let _private_thumbLeftPercent_descriptor;
|
|
196
|
+
let _private_isAtTop_decorators;
|
|
197
|
+
let _private_isAtTop_initializers = [];
|
|
198
|
+
let _private_isAtTop_extraInitializers = [];
|
|
199
|
+
let _private_isAtTop_descriptor;
|
|
200
|
+
return class DuiScrollArea extends _classSuper {
|
|
201
|
+
static {
|
|
202
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
203
|
+
_orientation_decorators = [property({ reflect: true })];
|
|
204
|
+
_fade_decorators = [property({ type: Boolean, reflect: true })];
|
|
205
|
+
_maxHeight_decorators = [property({ attribute: "max-height" })];
|
|
206
|
+
_private_hasOverflowX_decorators = [state()];
|
|
207
|
+
_private_hasOverflowY_decorators = [state()];
|
|
208
|
+
_private_hovering_decorators = [state()];
|
|
209
|
+
_private_scrolling_decorators = [state()];
|
|
210
|
+
_private_thumbHeightPercent_decorators = [state()];
|
|
211
|
+
_private_thumbWidthPercent_decorators = [state()];
|
|
212
|
+
_private_thumbTopPercent_decorators = [state()];
|
|
213
|
+
_private_thumbLeftPercent_decorators = [state()];
|
|
214
|
+
_private_isAtTop_decorators = [state()];
|
|
215
|
+
__esDecorate(this, null, _orientation_decorators, { kind: "accessor", name: "orientation", static: false, private: false, access: { has: obj => "orientation" in obj, get: obj => obj.orientation, set: (obj, value) => { obj.orientation = value; } }, metadata: _metadata }, _orientation_initializers, _orientation_extraInitializers);
|
|
216
|
+
__esDecorate(this, null, _fade_decorators, { kind: "accessor", name: "fade", static: false, private: false, access: { has: obj => "fade" in obj, get: obj => obj.fade, set: (obj, value) => { obj.fade = value; } }, metadata: _metadata }, _fade_initializers, _fade_extraInitializers);
|
|
217
|
+
__esDecorate(this, null, _maxHeight_decorators, { kind: "accessor", name: "maxHeight", static: false, private: false, access: { has: obj => "maxHeight" in obj, get: obj => obj.maxHeight, set: (obj, value) => { obj.maxHeight = value; } }, metadata: _metadata }, _maxHeight_initializers, _maxHeight_extraInitializers);
|
|
218
|
+
__esDecorate(this, _private_hasOverflowX_descriptor = { get: __setFunctionName(function () { return this.#hasOverflowX_accessor_storage; }, "#hasOverflowX", "get"), set: __setFunctionName(function (value) { this.#hasOverflowX_accessor_storage = value; }, "#hasOverflowX", "set") }, _private_hasOverflowX_decorators, { kind: "accessor", name: "#hasOverflowX", static: false, private: true, access: { has: obj => #hasOverflowX in obj, get: obj => obj.#hasOverflowX, set: (obj, value) => { obj.#hasOverflowX = value; } }, metadata: _metadata }, _private_hasOverflowX_initializers, _private_hasOverflowX_extraInitializers);
|
|
219
|
+
__esDecorate(this, _private_hasOverflowY_descriptor = { get: __setFunctionName(function () { return this.#hasOverflowY_accessor_storage; }, "#hasOverflowY", "get"), set: __setFunctionName(function (value) { this.#hasOverflowY_accessor_storage = value; }, "#hasOverflowY", "set") }, _private_hasOverflowY_decorators, { kind: "accessor", name: "#hasOverflowY", static: false, private: true, access: { has: obj => #hasOverflowY in obj, get: obj => obj.#hasOverflowY, set: (obj, value) => { obj.#hasOverflowY = value; } }, metadata: _metadata }, _private_hasOverflowY_initializers, _private_hasOverflowY_extraInitializers);
|
|
220
|
+
__esDecorate(this, _private_hovering_descriptor = { get: __setFunctionName(function () { return this.#hovering_accessor_storage; }, "#hovering", "get"), set: __setFunctionName(function (value) { this.#hovering_accessor_storage = value; }, "#hovering", "set") }, _private_hovering_decorators, { kind: "accessor", name: "#hovering", static: false, private: true, access: { has: obj => #hovering in obj, get: obj => obj.#hovering, set: (obj, value) => { obj.#hovering = value; } }, metadata: _metadata }, _private_hovering_initializers, _private_hovering_extraInitializers);
|
|
221
|
+
__esDecorate(this, _private_scrolling_descriptor = { get: __setFunctionName(function () { return this.#scrolling_accessor_storage; }, "#scrolling", "get"), set: __setFunctionName(function (value) { this.#scrolling_accessor_storage = value; }, "#scrolling", "set") }, _private_scrolling_decorators, { kind: "accessor", name: "#scrolling", static: false, private: true, access: { has: obj => #scrolling in obj, get: obj => obj.#scrolling, set: (obj, value) => { obj.#scrolling = value; } }, metadata: _metadata }, _private_scrolling_initializers, _private_scrolling_extraInitializers);
|
|
222
|
+
__esDecorate(this, _private_thumbHeightPercent_descriptor = { get: __setFunctionName(function () { return this.#thumbHeightPercent_accessor_storage; }, "#thumbHeightPercent", "get"), set: __setFunctionName(function (value) { this.#thumbHeightPercent_accessor_storage = value; }, "#thumbHeightPercent", "set") }, _private_thumbHeightPercent_decorators, { kind: "accessor", name: "#thumbHeightPercent", static: false, private: true, access: { has: obj => #thumbHeightPercent in obj, get: obj => obj.#thumbHeightPercent, set: (obj, value) => { obj.#thumbHeightPercent = value; } }, metadata: _metadata }, _private_thumbHeightPercent_initializers, _private_thumbHeightPercent_extraInitializers);
|
|
223
|
+
__esDecorate(this, _private_thumbWidthPercent_descriptor = { get: __setFunctionName(function () { return this.#thumbWidthPercent_accessor_storage; }, "#thumbWidthPercent", "get"), set: __setFunctionName(function (value) { this.#thumbWidthPercent_accessor_storage = value; }, "#thumbWidthPercent", "set") }, _private_thumbWidthPercent_decorators, { kind: "accessor", name: "#thumbWidthPercent", static: false, private: true, access: { has: obj => #thumbWidthPercent in obj, get: obj => obj.#thumbWidthPercent, set: (obj, value) => { obj.#thumbWidthPercent = value; } }, metadata: _metadata }, _private_thumbWidthPercent_initializers, _private_thumbWidthPercent_extraInitializers);
|
|
224
|
+
__esDecorate(this, _private_thumbTopPercent_descriptor = { get: __setFunctionName(function () { return this.#thumbTopPercent_accessor_storage; }, "#thumbTopPercent", "get"), set: __setFunctionName(function (value) { this.#thumbTopPercent_accessor_storage = value; }, "#thumbTopPercent", "set") }, _private_thumbTopPercent_decorators, { kind: "accessor", name: "#thumbTopPercent", static: false, private: true, access: { has: obj => #thumbTopPercent in obj, get: obj => obj.#thumbTopPercent, set: (obj, value) => { obj.#thumbTopPercent = value; } }, metadata: _metadata }, _private_thumbTopPercent_initializers, _private_thumbTopPercent_extraInitializers);
|
|
225
|
+
__esDecorate(this, _private_thumbLeftPercent_descriptor = { get: __setFunctionName(function () { return this.#thumbLeftPercent_accessor_storage; }, "#thumbLeftPercent", "get"), set: __setFunctionName(function (value) { this.#thumbLeftPercent_accessor_storage = value; }, "#thumbLeftPercent", "set") }, _private_thumbLeftPercent_decorators, { kind: "accessor", name: "#thumbLeftPercent", static: false, private: true, access: { has: obj => #thumbLeftPercent in obj, get: obj => obj.#thumbLeftPercent, set: (obj, value) => { obj.#thumbLeftPercent = value; } }, metadata: _metadata }, _private_thumbLeftPercent_initializers, _private_thumbLeftPercent_extraInitializers);
|
|
226
|
+
__esDecorate(this, _private_isAtTop_descriptor = { get: __setFunctionName(function () { return this.#isAtTop_accessor_storage; }, "#isAtTop", "get"), set: __setFunctionName(function (value) { this.#isAtTop_accessor_storage = value; }, "#isAtTop", "set") }, _private_isAtTop_decorators, { kind: "accessor", name: "#isAtTop", static: false, private: true, access: { has: obj => #isAtTop in obj, get: obj => obj.#isAtTop, set: (obj, value) => { obj.#isAtTop = value; } }, metadata: _metadata }, _private_isAtTop_initializers, _private_isAtTop_extraInitializers);
|
|
227
|
+
if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
211
228
|
}
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
229
|
+
static tagName = "dui-scroll-area";
|
|
230
|
+
static styles = [base, styles];
|
|
231
|
+
#orientation_accessor_storage = __runInitializers(this, _orientation_initializers, "vertical");
|
|
232
|
+
/** Scroll direction(s). */
|
|
233
|
+
get orientation() { return this.#orientation_accessor_storage; }
|
|
234
|
+
set orientation(value) { this.#orientation_accessor_storage = value; }
|
|
235
|
+
#fade_accessor_storage = (__runInitializers(this, _orientation_extraInitializers), __runInitializers(this, _fade_initializers, false));
|
|
236
|
+
/** Show a fade overlay at the top when scrolled. */
|
|
237
|
+
get fade() { return this.#fade_accessor_storage; }
|
|
238
|
+
set fade(value) { this.#fade_accessor_storage = value; }
|
|
239
|
+
#maxHeight_accessor_storage = (__runInitializers(this, _fade_extraInitializers), __runInitializers(this, _maxHeight_initializers, undefined));
|
|
240
|
+
/** Optional max-height constraint (CSS value). */
|
|
241
|
+
get maxHeight() { return this.#maxHeight_accessor_storage; }
|
|
242
|
+
set maxHeight(value) { this.#maxHeight_accessor_storage = value; }
|
|
243
|
+
willUpdate(changed) {
|
|
244
|
+
if (changed.has("maxHeight")) {
|
|
245
|
+
if (this.maxHeight)
|
|
246
|
+
this.style.setProperty("--scroll-area-max-height", this.maxHeight);
|
|
247
|
+
else
|
|
248
|
+
this.style.removeProperty("--scroll-area-max-height");
|
|
249
|
+
}
|
|
223
250
|
}
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
return this
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
return
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
this
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
251
|
+
#hasOverflowX_accessor_storage = (__runInitializers(this, _maxHeight_extraInitializers), __runInitializers(this, _private_hasOverflowX_initializers, false));
|
|
252
|
+
// --- Internal state ---
|
|
253
|
+
get #hasOverflowX() { return _private_hasOverflowX_descriptor.get.call(this); }
|
|
254
|
+
set #hasOverflowX(value) { return _private_hasOverflowX_descriptor.set.call(this, value); }
|
|
255
|
+
#hasOverflowY_accessor_storage = (__runInitializers(this, _private_hasOverflowX_extraInitializers), __runInitializers(this, _private_hasOverflowY_initializers, false));
|
|
256
|
+
get #hasOverflowY() { return _private_hasOverflowY_descriptor.get.call(this); }
|
|
257
|
+
set #hasOverflowY(value) { return _private_hasOverflowY_descriptor.set.call(this, value); }
|
|
258
|
+
#hovering_accessor_storage = (__runInitializers(this, _private_hasOverflowY_extraInitializers), __runInitializers(this, _private_hovering_initializers, false));
|
|
259
|
+
get #hovering() { return _private_hovering_descriptor.get.call(this); }
|
|
260
|
+
set #hovering(value) { return _private_hovering_descriptor.set.call(this, value); }
|
|
261
|
+
#scrolling_accessor_storage = (__runInitializers(this, _private_hovering_extraInitializers), __runInitializers(this, _private_scrolling_initializers, false));
|
|
262
|
+
get #scrolling() { return _private_scrolling_descriptor.get.call(this); }
|
|
263
|
+
set #scrolling(value) { return _private_scrolling_descriptor.set.call(this, value); }
|
|
264
|
+
#thumbHeightPercent_accessor_storage = (__runInitializers(this, _private_scrolling_extraInitializers), __runInitializers(this, _private_thumbHeightPercent_initializers, 0));
|
|
265
|
+
get #thumbHeightPercent() { return _private_thumbHeightPercent_descriptor.get.call(this); }
|
|
266
|
+
set #thumbHeightPercent(value) { return _private_thumbHeightPercent_descriptor.set.call(this, value); }
|
|
267
|
+
#thumbWidthPercent_accessor_storage = (__runInitializers(this, _private_thumbHeightPercent_extraInitializers), __runInitializers(this, _private_thumbWidthPercent_initializers, 0));
|
|
268
|
+
get #thumbWidthPercent() { return _private_thumbWidthPercent_descriptor.get.call(this); }
|
|
269
|
+
set #thumbWidthPercent(value) { return _private_thumbWidthPercent_descriptor.set.call(this, value); }
|
|
270
|
+
#thumbTopPercent_accessor_storage = (__runInitializers(this, _private_thumbWidthPercent_extraInitializers), __runInitializers(this, _private_thumbTopPercent_initializers, 0));
|
|
271
|
+
get #thumbTopPercent() { return _private_thumbTopPercent_descriptor.get.call(this); }
|
|
272
|
+
set #thumbTopPercent(value) { return _private_thumbTopPercent_descriptor.set.call(this, value); }
|
|
273
|
+
#thumbLeftPercent_accessor_storage = (__runInitializers(this, _private_thumbTopPercent_extraInitializers), __runInitializers(this, _private_thumbLeftPercent_initializers, 0));
|
|
274
|
+
get #thumbLeftPercent() { return _private_thumbLeftPercent_descriptor.get.call(this); }
|
|
275
|
+
set #thumbLeftPercent(value) { return _private_thumbLeftPercent_descriptor.set.call(this, value); }
|
|
276
|
+
#isAtTop_accessor_storage = (__runInitializers(this, _private_thumbLeftPercent_extraInitializers), __runInitializers(this, _private_isAtTop_initializers, true));
|
|
277
|
+
get #isAtTop() { return _private_isAtTop_descriptor.get.call(this); }
|
|
278
|
+
set #isAtTop(value) { return _private_isAtTop_descriptor.set.call(this, value); }
|
|
279
|
+
static #SCROLL_BOTTOM_TOLERANCE = 1;
|
|
280
|
+
#isAtBottom = (__runInitializers(this, _private_isAtTop_extraInitializers), true);
|
|
281
|
+
#prevScrollTop = 0;
|
|
282
|
+
#scrollEndTimer;
|
|
283
|
+
#resizeObserver;
|
|
284
|
+
#dragging;
|
|
285
|
+
#dragStartPointer = 0;
|
|
286
|
+
#dragStartScroll = 0;
|
|
287
|
+
// --- Lifecycle ---
|
|
288
|
+
connectedCallback() {
|
|
289
|
+
super.connectedCallback();
|
|
290
|
+
this.addEventListener("pointerenter", this.#onPointerEnter);
|
|
291
|
+
this.addEventListener("pointerleave", this.#onPointerLeave);
|
|
257
292
|
}
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
this.#
|
|
264
|
-
maxScrollTop > 0
|
|
265
|
-
? (vp.scrollTop / maxScrollTop) * (100 - this.#thumbHeightPercent)
|
|
266
|
-
: 0;
|
|
293
|
+
disconnectedCallback() {
|
|
294
|
+
super.disconnectedCallback();
|
|
295
|
+
this.removeEventListener("pointerenter", this.#onPointerEnter);
|
|
296
|
+
this.removeEventListener("pointerleave", this.#onPointerLeave);
|
|
297
|
+
this.#resizeObserver?.disconnect();
|
|
298
|
+
clearTimeout(this.#scrollEndTimer);
|
|
267
299
|
}
|
|
268
|
-
|
|
269
|
-
const
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
300
|
+
firstUpdated() {
|
|
301
|
+
const viewport = this.#viewport;
|
|
302
|
+
if (!viewport)
|
|
303
|
+
return;
|
|
304
|
+
this.#resizeObserver = new ResizeObserver(() => this.#measure());
|
|
305
|
+
this.#resizeObserver.observe(viewport);
|
|
306
|
+
const slot = viewport.querySelector("slot");
|
|
307
|
+
if (slot) {
|
|
308
|
+
const observe = () => {
|
|
309
|
+
for (const node of slot.assignedElements()) {
|
|
310
|
+
this.#resizeObserver.observe(node);
|
|
311
|
+
}
|
|
312
|
+
};
|
|
313
|
+
slot.addEventListener("slotchange", () => {
|
|
314
|
+
observe();
|
|
315
|
+
requestAnimationFrame(() => this.#measure());
|
|
316
|
+
});
|
|
317
|
+
observe();
|
|
318
|
+
}
|
|
319
|
+
this.#measure();
|
|
274
320
|
}
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
this.#isAtTop = vp.scrollTop <= 0;
|
|
286
|
-
this.#isAtBottom =
|
|
287
|
-
vp.scrollTop + vp.clientHeight >=
|
|
288
|
-
vp.scrollHeight - _a.#SCROLL_BOTTOM_TOLERANCE;
|
|
289
|
-
if (scrolledUp && wasAtBottom && !this.#isAtBottom) {
|
|
290
|
-
this.dispatchEvent(new Event("scrolled-from-bottom", { bubbles: true, composed: true }));
|
|
321
|
+
// --- Public methods ---
|
|
322
|
+
/** Scroll the viewport to the bottom. */
|
|
323
|
+
async scrollToBottom() {
|
|
324
|
+
await this.updateComplete;
|
|
325
|
+
const viewport = this.#viewport;
|
|
326
|
+
if (viewport) {
|
|
327
|
+
viewport.scrollTop = viewport.scrollHeight;
|
|
328
|
+
this.#isAtBottom = true;
|
|
329
|
+
this.#prevScrollTop = viewport.scrollTop;
|
|
330
|
+
}
|
|
291
331
|
}
|
|
292
|
-
|
|
293
|
-
|
|
332
|
+
/** Whether the viewport is scrolled to the top. */
|
|
333
|
+
get isAtTop() {
|
|
334
|
+
return this.#isAtTop;
|
|
294
335
|
}
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
this.#scrolling = false;
|
|
299
|
-
}, 1000);
|
|
300
|
-
};
|
|
301
|
-
#onPointerEnter = () => {
|
|
302
|
-
this.#hovering = true;
|
|
303
|
-
this.#measure();
|
|
304
|
-
};
|
|
305
|
-
#onPointerLeave = () => {
|
|
306
|
-
this.#hovering = false;
|
|
307
|
-
};
|
|
308
|
-
// --- Track click (jump to position) ---
|
|
309
|
-
#onTrackPointerDown = (orientation, event) => {
|
|
310
|
-
event.preventDefault();
|
|
311
|
-
event.stopPropagation();
|
|
312
|
-
const vp = this.#viewport;
|
|
313
|
-
if (!vp)
|
|
314
|
-
return;
|
|
315
|
-
if (orientation === "vertical") {
|
|
316
|
-
const track = this.shadowRoot?.querySelector('.Scrollbar[data-orientation="vertical"]');
|
|
317
|
-
if (!track)
|
|
318
|
-
return;
|
|
319
|
-
const rect = track.getBoundingClientRect();
|
|
320
|
-
const fraction = (event.clientY - rect.top) / rect.height;
|
|
321
|
-
vp.scrollTop = fraction * (vp.scrollHeight - vp.clientHeight);
|
|
336
|
+
/** Whether the viewport is scrolled to the bottom. */
|
|
337
|
+
get isAtBottom() {
|
|
338
|
+
return this.#isAtBottom;
|
|
322
339
|
}
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
return;
|
|
327
|
-
const rect = track.getBoundingClientRect();
|
|
328
|
-
const fraction = (event.clientX - rect.left) / rect.width;
|
|
329
|
-
vp.scrollLeft = fraction * (vp.scrollWidth - vp.clientWidth);
|
|
340
|
+
// --- Getters ---
|
|
341
|
+
get #viewport() {
|
|
342
|
+
return this.shadowRoot?.querySelector(".Viewport") ?? null;
|
|
330
343
|
}
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
#onThumbPointerDown = (orientation, event) => {
|
|
334
|
-
event.preventDefault();
|
|
335
|
-
event.stopPropagation();
|
|
336
|
-
const vp = this.#viewport;
|
|
337
|
-
if (!vp)
|
|
338
|
-
return;
|
|
339
|
-
this.#dragging = orientation;
|
|
340
|
-
if (orientation === "vertical") {
|
|
341
|
-
this.#dragStartPointer = event.clientY;
|
|
342
|
-
this.#dragStartScroll = vp.scrollTop;
|
|
344
|
+
get #showVertical() {
|
|
345
|
+
return this.orientation === "vertical" || this.orientation === "both";
|
|
343
346
|
}
|
|
344
|
-
|
|
345
|
-
this
|
|
346
|
-
this.#dragStartScroll = vp.scrollLeft;
|
|
347
|
+
get #showHorizontal() {
|
|
348
|
+
return this.orientation === "horizontal" || this.orientation === "both";
|
|
347
349
|
}
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
const vp = this.#viewport;
|
|
353
|
-
if (!vp || !this.#dragging)
|
|
354
|
-
return;
|
|
355
|
-
if (this.#dragging === "vertical") {
|
|
356
|
-
const track = this.shadowRoot?.querySelector('.Scrollbar[data-orientation="vertical"]');
|
|
357
|
-
if (!track)
|
|
350
|
+
// --- Measurement ---
|
|
351
|
+
#measure = () => {
|
|
352
|
+
const vp = this.#viewport;
|
|
353
|
+
if (!vp)
|
|
358
354
|
return;
|
|
359
|
-
const
|
|
360
|
-
const
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
355
|
+
const hasOverflowY = vp.scrollHeight > vp.clientHeight;
|
|
356
|
+
const hasOverflowX = vp.scrollWidth > vp.clientWidth;
|
|
357
|
+
this.#hasOverflowY = hasOverflowY;
|
|
358
|
+
this.#hasOverflowX = hasOverflowX;
|
|
359
|
+
if (hasOverflowY) {
|
|
360
|
+
this.#thumbHeightPercent = (vp.clientHeight / vp.scrollHeight) * 100;
|
|
361
|
+
}
|
|
362
|
+
if (hasOverflowX) {
|
|
363
|
+
this.#thumbWidthPercent = (vp.clientWidth / vp.scrollWidth) * 100;
|
|
364
|
+
}
|
|
365
|
+
this.#updateThumbPosition(vp);
|
|
366
|
+
};
|
|
367
|
+
#updateThumbPosition = (vp) => {
|
|
368
|
+
if (this.#hasOverflowY) {
|
|
369
|
+
const maxScrollTop = vp.scrollHeight - vp.clientHeight;
|
|
370
|
+
this.#thumbTopPercent =
|
|
371
|
+
maxScrollTop > 0
|
|
372
|
+
? (vp.scrollTop / maxScrollTop) * (100 - this.#thumbHeightPercent)
|
|
373
|
+
: 0;
|
|
374
|
+
}
|
|
375
|
+
if (this.#hasOverflowX) {
|
|
376
|
+
const maxScrollLeft = vp.scrollWidth - vp.clientWidth;
|
|
377
|
+
this.#thumbLeftPercent =
|
|
378
|
+
maxScrollLeft > 0
|
|
379
|
+
? (vp.scrollLeft / maxScrollLeft) * (100 - this.#thumbWidthPercent)
|
|
380
|
+
: 0;
|
|
381
|
+
}
|
|
382
|
+
};
|
|
383
|
+
// --- Event handlers ---
|
|
384
|
+
#onScroll = () => {
|
|
385
|
+
const vp = this.#viewport;
|
|
386
|
+
if (!vp)
|
|
368
387
|
return;
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
const
|
|
372
|
-
vp.
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
388
|
+
this.#scrolling = true;
|
|
389
|
+
this.#updateThumbPosition(vp);
|
|
390
|
+
const wasAtBottom = this.#isAtBottom;
|
|
391
|
+
const scrolledUp = vp.scrollTop < this.#prevScrollTop;
|
|
392
|
+
this.#isAtTop = vp.scrollTop <= 0;
|
|
393
|
+
this.#isAtBottom =
|
|
394
|
+
vp.scrollTop + vp.clientHeight >=
|
|
395
|
+
vp.scrollHeight - DuiScrollArea.#SCROLL_BOTTOM_TOLERANCE;
|
|
396
|
+
if (scrolledUp && wasAtBottom && !this.#isAtBottom) {
|
|
397
|
+
this.dispatchEvent(new Event("scrolled-from-bottom", { bubbles: true, composed: true }));
|
|
398
|
+
}
|
|
399
|
+
else if (!wasAtBottom && this.#isAtBottom) {
|
|
400
|
+
this.dispatchEvent(new Event("scrolled-to-bottom", { bubbles: true, composed: true }));
|
|
401
|
+
}
|
|
402
|
+
this.#prevScrollTop = vp.scrollTop;
|
|
403
|
+
clearTimeout(this.#scrollEndTimer);
|
|
404
|
+
this.#scrollEndTimer = setTimeout(() => {
|
|
405
|
+
this.#scrolling = false;
|
|
406
|
+
}, 1000);
|
|
407
|
+
};
|
|
408
|
+
#onPointerEnter = () => {
|
|
409
|
+
this.#hovering = true;
|
|
410
|
+
this.#measure();
|
|
411
|
+
};
|
|
412
|
+
#onPointerLeave = () => {
|
|
413
|
+
this.#hovering = false;
|
|
414
|
+
};
|
|
415
|
+
// --- Track click (jump to position) ---
|
|
416
|
+
#onTrackPointerDown = (orientation, event) => {
|
|
417
|
+
event.preventDefault();
|
|
418
|
+
event.stopPropagation();
|
|
419
|
+
const vp = this.#viewport;
|
|
420
|
+
if (!vp)
|
|
421
|
+
return;
|
|
422
|
+
if (orientation === "vertical") {
|
|
423
|
+
const track = this.shadowRoot?.querySelector('.Scrollbar[data-orientation="vertical"]');
|
|
424
|
+
if (!track)
|
|
425
|
+
return;
|
|
426
|
+
const rect = track.getBoundingClientRect();
|
|
427
|
+
const fraction = (event.clientY - rect.top) / rect.height;
|
|
428
|
+
vp.scrollTop = fraction * (vp.scrollHeight - vp.clientHeight);
|
|
429
|
+
}
|
|
430
|
+
else {
|
|
431
|
+
const track = this.shadowRoot?.querySelector('.Scrollbar[data-orientation="horizontal"]');
|
|
432
|
+
if (!track)
|
|
433
|
+
return;
|
|
434
|
+
const rect = track.getBoundingClientRect();
|
|
435
|
+
const fraction = (event.clientX - rect.left) / rect.width;
|
|
436
|
+
vp.scrollLeft = fraction * (vp.scrollWidth - vp.clientWidth);
|
|
437
|
+
}
|
|
438
|
+
};
|
|
439
|
+
// --- Thumb drag ---
|
|
440
|
+
#onThumbPointerDown = (orientation, event) => {
|
|
441
|
+
event.preventDefault();
|
|
442
|
+
event.stopPropagation();
|
|
443
|
+
const vp = this.#viewport;
|
|
444
|
+
if (!vp)
|
|
445
|
+
return;
|
|
446
|
+
this.#dragging = orientation;
|
|
447
|
+
if (orientation === "vertical") {
|
|
448
|
+
this.#dragStartPointer = event.clientY;
|
|
449
|
+
this.#dragStartScroll = vp.scrollTop;
|
|
450
|
+
}
|
|
451
|
+
else {
|
|
452
|
+
this.#dragStartPointer = event.clientX;
|
|
453
|
+
this.#dragStartScroll = vp.scrollLeft;
|
|
454
|
+
}
|
|
455
|
+
document.addEventListener("pointermove", this.#onDragMove);
|
|
456
|
+
document.addEventListener("pointerup", this.#onDragEnd);
|
|
457
|
+
};
|
|
458
|
+
#onDragMove = (event) => {
|
|
459
|
+
const vp = this.#viewport;
|
|
460
|
+
if (!vp || !this.#dragging)
|
|
461
|
+
return;
|
|
462
|
+
if (this.#dragging === "vertical") {
|
|
463
|
+
const track = this.shadowRoot?.querySelector('.Scrollbar[data-orientation="vertical"]');
|
|
464
|
+
if (!track)
|
|
465
|
+
return;
|
|
466
|
+
const delta = event.clientY - this.#dragStartPointer;
|
|
467
|
+
const trackHeight = track.clientHeight;
|
|
468
|
+
const scrollRange = vp.scrollHeight - vp.clientHeight;
|
|
469
|
+
vp.scrollTop =
|
|
470
|
+
this.#dragStartScroll + (delta / trackHeight) * scrollRange;
|
|
471
|
+
}
|
|
472
|
+
else {
|
|
473
|
+
const track = this.shadowRoot?.querySelector('.Scrollbar[data-orientation="horizontal"]');
|
|
474
|
+
if (!track)
|
|
475
|
+
return;
|
|
476
|
+
const delta = event.clientX - this.#dragStartPointer;
|
|
477
|
+
const trackWidth = track.clientWidth;
|
|
478
|
+
const scrollRange = vp.scrollWidth - vp.clientWidth;
|
|
479
|
+
vp.scrollLeft =
|
|
480
|
+
this.#dragStartScroll + (delta / trackWidth) * scrollRange;
|
|
481
|
+
}
|
|
482
|
+
};
|
|
483
|
+
#onDragEnd = () => {
|
|
484
|
+
this.#dragging = undefined;
|
|
485
|
+
document.removeEventListener("pointermove", this.#onDragMove);
|
|
486
|
+
document.removeEventListener("pointerup", this.#onDragEnd);
|
|
487
|
+
};
|
|
488
|
+
// --- Render ---
|
|
489
|
+
#renderVerticalScrollbar() {
|
|
490
|
+
if (!this.#showVertical || !this.#hasOverflowY)
|
|
491
|
+
return nothing;
|
|
492
|
+
return html `
|
|
386
493
|
<div
|
|
387
494
|
class="Scrollbar"
|
|
388
495
|
part="scrollbar-vertical"
|
|
@@ -396,16 +503,16 @@ export class DuiScrollArea extends LitElement {
|
|
|
396
503
|
part="thumb-vertical"
|
|
397
504
|
data-orientation="vertical"
|
|
398
505
|
style="height: ${this.#thumbHeightPercent}%; top: ${this
|
|
399
|
-
|
|
506
|
+
.#thumbTopPercent}%; position: absolute;"
|
|
400
507
|
@pointerdown="${(e) => this.#onThumbPointerDown("vertical", e)}"
|
|
401
508
|
></div>
|
|
402
509
|
</div>
|
|
403
510
|
`;
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
511
|
+
}
|
|
512
|
+
#renderHorizontalScrollbar() {
|
|
513
|
+
if (!this.#showHorizontal || !this.#hasOverflowX)
|
|
514
|
+
return nothing;
|
|
515
|
+
return html `
|
|
409
516
|
<div
|
|
410
517
|
class="Scrollbar"
|
|
411
518
|
part="scrollbar-horizontal"
|
|
@@ -419,14 +526,14 @@ export class DuiScrollArea extends LitElement {
|
|
|
419
526
|
part="thumb-horizontal"
|
|
420
527
|
data-orientation="horizontal"
|
|
421
528
|
style="width: ${this.#thumbWidthPercent}%; left: ${this
|
|
422
|
-
|
|
529
|
+
.#thumbLeftPercent}%; position: absolute;"
|
|
423
530
|
@pointerdown="${(e) => this.#onThumbPointerDown("horizontal", e)}"
|
|
424
531
|
></div>
|
|
425
532
|
</div>
|
|
426
533
|
`;
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
534
|
+
}
|
|
535
|
+
render() {
|
|
536
|
+
return html `
|
|
430
537
|
<div
|
|
431
538
|
class="ScrollArea"
|
|
432
539
|
part="root"
|
|
@@ -435,26 +542,18 @@ export class DuiScrollArea extends LitElement {
|
|
|
435
542
|
?data-scrolling="${this.#scrolling}"
|
|
436
543
|
>
|
|
437
544
|
${this.fade
|
|
438
|
-
|
|
545
|
+
? html `<div
|
|
439
546
|
class="ScrollFade"
|
|
440
547
|
?data-scrolled="${!this.#isAtTop}"
|
|
441
548
|
></div>`
|
|
442
|
-
|
|
549
|
+
: nothing}
|
|
443
550
|
<div class="Viewport" part="viewport" @scroll="${this.#onScroll}">
|
|
444
551
|
<slot></slot>
|
|
445
552
|
</div>
|
|
446
553
|
${this.#renderVerticalScrollbar()} ${this.#renderHorizontalScrollbar()}
|
|
447
554
|
</div>
|
|
448
555
|
`;
|
|
449
|
-
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
property({ reflect: true })
|
|
454
|
-
], DuiScrollArea.prototype, "orientation", null);
|
|
455
|
-
__decorate([
|
|
456
|
-
property({ type: Boolean, reflect: true })
|
|
457
|
-
], DuiScrollArea.prototype, "fade", null);
|
|
458
|
-
__decorate([
|
|
459
|
-
property({ attribute: "max-height" })
|
|
460
|
-
], DuiScrollArea.prototype, "maxHeight", null);
|
|
556
|
+
}
|
|
557
|
+
};
|
|
558
|
+
})();
|
|
559
|
+
export { DuiScrollArea };
|