@libs-ui/components-scroll-overlay 0.1.1-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.
@@ -0,0 +1,464 @@
1
+ import * as i0 from '@angular/core';
2
+ import { computed, signal, input, output, inject, ElementRef, Renderer2, effect, untracked, Directive, Component } from '@angular/core';
3
+ import { getDragEventByElement, checkMouseOverInContainer } from '@libs-ui/utils';
4
+ import { Subscription, Subject, fromEvent, tap, takeUntil, switchMap, interval } from 'rxjs';
5
+ import * as i1 from '@angular/common';
6
+ import { CommonModule } from '@angular/common';
7
+
8
+ /* eslint-disable @typescript-eslint/no-explicit-any */
9
+ class LibsUiComponentsScrollOverlayDirective {
10
+ // #region PROPERTY
11
+ styles = computed(() => `
12
+ .scrollbar-track{
13
+ background-color:${this.scrollbarColor()};
14
+ }
15
+ .scrollbar-track:hover{
16
+ background-color:${this.scrollbarHoverColor()};
17
+ }
18
+ .scrollbar-track-X {
19
+ width:100%;
20
+ position: absolute;
21
+ bottom: 0;
22
+ left: 0;
23
+ visibility: hidden;
24
+ cursor: pointer;
25
+ opacity: 0;
26
+ z-index: 1;
27
+ transition: opacity 0.3s ease, visibility 0.3s ease;
28
+ }
29
+
30
+ .scrollbar-track-Y {
31
+ height:100%;
32
+ position: absolute;
33
+ top: 0;
34
+ right: 0;
35
+ visibility: hidden;
36
+ cursor: pointer;
37
+ opacity: 0;
38
+ z-index: 1;
39
+ transition: opacity 0.3s ease, visibility 0.3s ease;
40
+ }
41
+
42
+ .scrollbar-thumb{
43
+ background-color:${this.scrollThumbColor()};
44
+ }
45
+ .scrollbar-thumb:hover{
46
+ background-color:${this.scrollThumbHoverColor()};
47
+ }
48
+
49
+ .scrollbar-thumb-X {
50
+ height: calc(100% - ${this.scrollbarPadding() * 2}px);
51
+ bottom: ${this.scrollbarPadding()}px;
52
+ border-radius: 4px;
53
+ cursor: grabbing;
54
+ transition: background-color 0.3s;
55
+ position: absolute;
56
+ }
57
+
58
+ .scrollbar-thumb-Y {
59
+ width: calc(100% - ${this.scrollbarPadding() * 2}px);
60
+ right: ${this.scrollbarPadding()}px;
61
+ border-radius: 4px;
62
+ cursor: grabbing;
63
+ transition: background-color 0.3s;
64
+ position: absolute;
65
+ }
66
+ `, {});
67
+ isScrollThumb = signal(false);
68
+ keepDisplayThumb = signal(false);
69
+ subsX = new Subscription();
70
+ subsY = new Subscription();
71
+ scrollbarWidth = computed(() => this.options()?.scrollbarWidth ?? 10); // Chiều rộng thanh cuộn
72
+ scrollbarPadding = computed(() => this.options()?.scrollbarPadding ?? 2); // Chiều rộng thanh cuộn
73
+ scrollbarColor = computed(() => this.options()?.scrollbarColor ?? '');
74
+ scrollbarHoverColor = computed(() => this.options()?.scrollbarColor ?? '#CDD0D640');
75
+ scrollThumbColor = computed(() => this.options()?.scrollThumbColor ?? '#CDD0D6');
76
+ scrollThumbHoverColor = computed(() => this.options()?.scrollThumbHoverColor ?? '#9CA2AD');
77
+ divContainer = document.createElement('div');
78
+ trackX = document.createElement('div');
79
+ thumbX = document.createElement('div');
80
+ trackY = document.createElement('div');
81
+ thumbY = document.createElement('div');
82
+ onDestroy = new Subject();
83
+ // #region INPUT
84
+ debugMode = input(false);
85
+ ignoreInit = input(false);
86
+ classContainer = input('', { transform: (value) => value ?? '' });
87
+ options = input(Object.assign({}));
88
+ elementCheckScrollX = input();
89
+ elementCheckScrollY = input();
90
+ elementScroll = input();
91
+ // #region OUTPUT
92
+ outScroll = output();
93
+ outScrollX = output();
94
+ outScrollY = output();
95
+ outScrollTop = output();
96
+ outScrollBottom = output();
97
+ // #region INJECT
98
+ element = inject(ElementRef);
99
+ render2 = inject(Renderer2);
100
+ constructor() {
101
+ effect(() => {
102
+ if (this.ignoreInit()) {
103
+ return;
104
+ }
105
+ const options = this.options();
106
+ this.divContainer.className = '';
107
+ this.classContainer()
108
+ ?.split(' ')
109
+ .forEach((className) => {
110
+ if (!className) {
111
+ return;
112
+ }
113
+ this.divContainer.classList.add(className);
114
+ });
115
+ untracked(() => {
116
+ this.Element.classList.toggle('overflow-hidden', options?.scrollX === 'hidden' && options?.scrollY === 'hidden');
117
+ if (options?.scrollX !== 'hidden') {
118
+ this.subsX.unsubscribe();
119
+ this.trackX.className = '';
120
+ this.thumbX.className = '';
121
+ this.trackX.style.height = `${this.scrollbarWidth()}px`;
122
+ this.createScrollbar('X', this.trackX, this.thumbX);
123
+ this.bindEventsScrollBar('X', this.trackX);
124
+ this.handlerDragAndDropThumb('X');
125
+ this.handlerClickTrack('X');
126
+ }
127
+ if (options?.scrollY !== 'hidden') {
128
+ this.trackY.className = '';
129
+ this.thumbY.className = '';
130
+ this.trackY.style.width = `${this.scrollbarWidth()}px`;
131
+ this.subsY.unsubscribe();
132
+ this.createScrollbar('Y', this.trackY, this.thumbY);
133
+ this.bindEventsScrollBar('Y', this.trackY);
134
+ this.handlerDragAndDropThumb('Y');
135
+ this.handlerClickTrack('Y');
136
+ }
137
+ });
138
+ });
139
+ }
140
+ // #region FUNCTIONS
141
+ get Element() {
142
+ return this.elementScroll() || this.element.nativeElement;
143
+ }
144
+ createScrollbar(scrollDirection, trackEl, thumbEl) {
145
+ const idStyleTag = '#id-style-tag-custom-scroll-overlay';
146
+ const styleElCustomScrollOverlay = document.getElementById(idStyleTag);
147
+ if (!styleElCustomScrollOverlay) {
148
+ const styleEl = document.createElement('style');
149
+ styleEl.setAttribute('id', idStyleTag);
150
+ styleEl.innerHTML = this.styles();
151
+ document.head.append(styleEl);
152
+ }
153
+ const stylesProperty = {
154
+ 'box-sizing': 'border-box',
155
+ 'scrollbar-width': 'none',
156
+ 'scrollbar-color': 'transparent transparent',
157
+ overflow: 'hidden',
158
+ 'overflow-x': `${this.options()?.scrollX || 'scroll'}`,
159
+ 'overflow-y': `${this.options()?.scrollY || 'scroll'}`,
160
+ };
161
+ Object.keys(stylesProperty).forEach((key) => {
162
+ this.render2.setStyle(this.Element, key, stylesProperty[key], 1);
163
+ });
164
+ trackEl.classList.add(`scrollbar-track`);
165
+ trackEl.classList.add(`scrollbar-track-${scrollDirection}`);
166
+ thumbEl.classList.add(`scrollbar-thumb`);
167
+ thumbEl.classList.add(`scrollbar-thumb-${scrollDirection}`);
168
+ trackEl.appendChild(thumbEl);
169
+ if (this.Element.className) {
170
+ this.Element.className.split(' ').forEach((className) => {
171
+ if (className &&
172
+ (['w-full', 'w-screen', 'h-full', 'h-screen', 'shrink-0'].includes(className) || className.includes('min-h-') || className.includes('min-w-') || /^(!?)(h|w)-\[[0-9]+px\]$/.test(className)) &&
173
+ !this.divContainer.classList.contains(className)) {
174
+ this.divContainer.classList.add(className);
175
+ }
176
+ });
177
+ if (!this.Element.className.includes('min-h-')) {
178
+ this.divContainer.classList.add('min-h-0');
179
+ }
180
+ if (!this.Element.className.includes('min-w-')) {
181
+ this.divContainer.classList.add('min-w-0');
182
+ }
183
+ }
184
+ this.divContainer.appendChild(trackEl);
185
+ if (!this.divContainer.style.position) {
186
+ this.Element.parentElement?.insertBefore(this.divContainer, this.Element);
187
+ this.divContainer.style.position = 'relative';
188
+ }
189
+ this.divContainer.append(this.Element);
190
+ this.updateScrollbarSize(scrollDirection);
191
+ }
192
+ bindEventsScrollBar(scrollDirection, trackEl) {
193
+ let scrollLeft = this.Element.scrollLeft;
194
+ let scrollTop = this.Element.scrollTop;
195
+ const subs = fromEvent(this.Element, 'scroll')
196
+ .pipe(tap((event) => {
197
+ const target = this.Element;
198
+ this.outScroll.emit(event);
199
+ if (scrollDirection === 'X') {
200
+ if (target.scrollLeft && target.scrollLeft + target.offsetWidth >= target.scrollWidth) {
201
+ target.scrollLeft = target.scrollWidth - target.offsetWidth - (target.offsetWidth - target.clientWidth);
202
+ }
203
+ if (target.scrollLeft !== scrollLeft) {
204
+ this.outScrollX.emit(event);
205
+ }
206
+ scrollLeft = target.scrollLeft;
207
+ this.updateScrollbarPosition(scrollDirection);
208
+ return;
209
+ }
210
+ if (target.scrollTop === scrollTop) {
211
+ return;
212
+ }
213
+ this.updateScrollbarPosition(scrollDirection);
214
+ scrollTop = target.scrollTop;
215
+ this.outScrollY.emit(event);
216
+ if (target.scrollTop === 0) {
217
+ return this.outScrollTop.emit(event);
218
+ }
219
+ if (target.scrollHeight <= target.scrollTop + target.offsetHeight + 3) {
220
+ return this.outScrollBottom.emit(event);
221
+ }
222
+ }), takeUntil(this.onDestroy))
223
+ .subscribe();
224
+ subs.add(fromEvent(document, 'resize')
225
+ .pipe(tap(this.updateScrollbarSize.bind(this, scrollDirection)), takeUntil(this.onDestroy))
226
+ .subscribe());
227
+ const mouseLeave = fromEvent(this.divContainer, 'mouseleave');
228
+ const mouseenter = fromEvent(this.divContainer, 'mouseenter');
229
+ subs.add(mouseenter
230
+ .pipe(tap(() => {
231
+ if ((scrollDirection === 'X' && !this.options()?.scrollXOpacity0) || (scrollDirection === 'Y' && !this.options()?.scrollYOpacity0)) {
232
+ trackEl.style.visibility = 'visible';
233
+ trackEl.style.opacity = '1';
234
+ }
235
+ this.updateScrollbarSize(scrollDirection);
236
+ }), switchMap(() => interval(1000).pipe(takeUntil(mouseLeave))), tap(this.updateScrollbarSize.bind(this, scrollDirection)), takeUntil(this.onDestroy))
237
+ .subscribe());
238
+ subs.add(mouseLeave
239
+ .pipe(tap(() => {
240
+ if (this.keepDisplayThumb()) {
241
+ return;
242
+ }
243
+ trackEl.style.visibility = 'hidden';
244
+ trackEl.style.opacity = '0';
245
+ }), takeUntil(this.onDestroy))
246
+ .subscribe());
247
+ if (scrollDirection === 'X') {
248
+ this.subsX = subs;
249
+ return;
250
+ }
251
+ if (scrollDirection === 'Y') {
252
+ this.subsY = subs;
253
+ return;
254
+ }
255
+ }
256
+ handlerClickTrack(scrollDirection) {
257
+ const elementTrack = scrollDirection === 'X' ? this.trackX : this.trackY;
258
+ const elementThumb = scrollDirection === 'X' ? this.thumbX : this.thumbY;
259
+ const subs = scrollDirection === 'X' ? this.subsX : this.subsY;
260
+ subs.add(fromEvent(elementTrack, 'click').subscribe((e) => {
261
+ if (this.isScrollThumb()) {
262
+ return;
263
+ }
264
+ if ((scrollDirection === 'X' && e.clientX < elementThumb.getBoundingClientRect().left) || (scrollDirection === 'Y' && e.clientY < elementThumb.getBoundingClientRect().top)) {
265
+ this.updateScrollPositionByUserAction(scrollDirection, e, 'smooth', 0);
266
+ return;
267
+ }
268
+ if (scrollDirection === 'X') {
269
+ this.updateScrollPositionByUserAction(scrollDirection, e, 'smooth', -1 * elementThumb.getBoundingClientRect().width);
270
+ return;
271
+ }
272
+ this.updateScrollPositionByUserAction(scrollDirection, e, 'smooth', -1 * elementThumb.getBoundingClientRect().height);
273
+ }));
274
+ }
275
+ handlerDragAndDropThumb(scrollDirection) {
276
+ const elementTrack = scrollDirection === 'X' ? this.trackX : this.trackY;
277
+ const elementThumb = scrollDirection === 'X' ? this.thumbX : this.thumbY;
278
+ const subs = scrollDirection === 'X' ? this.subsX : this.subsY;
279
+ let lengthThumbToPointClick = 0;
280
+ subs.add(getDragEventByElement({
281
+ elementMouseDown: elementThumb,
282
+ functionMouseDown: (mouseEvent) => {
283
+ this.isScrollThumb.set(true);
284
+ this.keepDisplayThumb.set(true);
285
+ if (scrollDirection === 'X') {
286
+ lengthThumbToPointClick = elementThumb.getBoundingClientRect().left - mouseEvent.clientX;
287
+ return;
288
+ }
289
+ lengthThumbToPointClick = elementThumb.getBoundingClientRect().top - mouseEvent.clientY;
290
+ },
291
+ functionMouseUp: (mouseEvent) => {
292
+ this.keepDisplayThumb.set(false);
293
+ lengthThumbToPointClick = 0;
294
+ if (!checkMouseOverInContainer(mouseEvent, this.Element)) {
295
+ elementTrack.style.visibility = 'hidden';
296
+ elementTrack.style.opacity = '0';
297
+ }
298
+ setTimeout(() => {
299
+ this.isScrollThumb.set(false);
300
+ }, 250);
301
+ },
302
+ onDestroy: this.onDestroy,
303
+ }).subscribe((mouseEvent) => {
304
+ this.updateScrollPositionByUserAction(scrollDirection, mouseEvent, 'auto', lengthThumbToPointClick);
305
+ }));
306
+ }
307
+ updateScrollPositionByUserAction(scrollDirection, e, behavior, lengthThumbToPointClick = 0) {
308
+ e.stopPropagation();
309
+ if (scrollDirection === 'X') {
310
+ const containerWidth = this.Element.offsetWidth;
311
+ const contentWidth = (this.elementCheckScrollX() || this.Element).scrollWidth;
312
+ const thumbPosition = e.clientX - this.Element.getBoundingClientRect().left + lengthThumbToPointClick;
313
+ const scrollLeft = (thumbPosition / (containerWidth - this.thumbX.offsetWidth)) * (contentWidth - containerWidth);
314
+ this.Element.scroll({ left: scrollLeft, behavior });
315
+ return;
316
+ }
317
+ const containerHeight = this.Element.offsetHeight;
318
+ const contentHeight = (this.elementCheckScrollY() || this.Element).scrollHeight;
319
+ const thumbPosition = e.clientY - this.Element.getBoundingClientRect().top + lengthThumbToPointClick;
320
+ const scrollTop = (thumbPosition / (containerHeight - this.thumbY.offsetHeight)) * (contentHeight - containerHeight);
321
+ this.Element.scroll({ top: scrollTop, behavior });
322
+ }
323
+ updateScrollbarSize(scrollDirection) {
324
+ if (scrollDirection === 'X') {
325
+ const containerWidth = this.Element.offsetWidth;
326
+ const contentWidth = (this.elementCheckScrollX() || this.Element).scrollWidth;
327
+ const thumbWidth = (containerWidth / contentWidth) * containerWidth;
328
+ this.thumbX.style.width = `${Math.max(20, thumbWidth)}px`;
329
+ this.trackX.style.display = 'none';
330
+ if (contentWidth > containerWidth) {
331
+ this.trackX.style.display = 'block';
332
+ }
333
+ this.updateScrollbarPosition(scrollDirection);
334
+ return;
335
+ }
336
+ const containerHeight = this.Element.offsetHeight;
337
+ const contentHeight = (this.elementCheckScrollY() || this.Element).scrollHeight;
338
+ const thumbHeight = (containerHeight / contentHeight) * containerHeight;
339
+ this.thumbY.style.height = `${Math.max(20, thumbHeight)}px`;
340
+ this.trackY.style.display = 'none';
341
+ if (contentHeight > containerHeight) {
342
+ this.trackY.style.display = 'block';
343
+ }
344
+ this.updateScrollbarPosition('Y');
345
+ }
346
+ updateScrollbarPosition(scrollDirection) {
347
+ if (scrollDirection === 'X') {
348
+ const containerWidth = this.Element.offsetWidth;
349
+ const contentWidth = (this.elementCheckScrollX() || this.Element).scrollWidth;
350
+ const scrollLeft = this.Element.scrollLeft;
351
+ const thumbPosition = (scrollLeft / (contentWidth - containerWidth)) * (containerWidth - this.thumbX.offsetWidth);
352
+ this.thumbX.style.left = `${thumbPosition}px`;
353
+ return;
354
+ }
355
+ const containerHeight = this.Element.offsetHeight;
356
+ const contentHeight = (this.elementCheckScrollY() || this.Element).scrollHeight;
357
+ const scrollTop = this.Element.scrollTop;
358
+ const thumbPosition = (scrollTop / (contentHeight - containerHeight)) * (containerHeight - this.thumbY.offsetHeight);
359
+ this.thumbY.style.top = `${thumbPosition}px`;
360
+ }
361
+ ngOnDestroy() {
362
+ this.divContainer.remove();
363
+ this.subsX.unsubscribe();
364
+ this.subsY.unsubscribe();
365
+ this.onDestroy.next();
366
+ this.onDestroy.complete();
367
+ }
368
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsScrollOverlayDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
369
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.14", type: LibsUiComponentsScrollOverlayDirective, isStandalone: true, selector: "[LibsUiComponentsScrollOverlayDirective]", inputs: { debugMode: { classPropertyName: "debugMode", publicName: "debugMode", isSignal: true, isRequired: false, transformFunction: null }, ignoreInit: { classPropertyName: "ignoreInit", publicName: "ignoreInit", isSignal: true, isRequired: false, transformFunction: null }, classContainer: { classPropertyName: "classContainer", publicName: "classContainer", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, elementCheckScrollX: { classPropertyName: "elementCheckScrollX", publicName: "elementCheckScrollX", isSignal: true, isRequired: false, transformFunction: null }, elementCheckScrollY: { classPropertyName: "elementCheckScrollY", publicName: "elementCheckScrollY", isSignal: true, isRequired: false, transformFunction: null }, elementScroll: { classPropertyName: "elementScroll", publicName: "elementScroll", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { outScroll: "outScroll", outScrollX: "outScrollX", outScrollY: "outScrollY", outScrollTop: "outScrollTop", outScrollBottom: "outScrollBottom" }, ngImport: i0 });
370
+ }
371
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsScrollOverlayDirective, decorators: [{
372
+ type: Directive,
373
+ args: [{
374
+ // eslint-disable-next-line @angular-eslint/directive-selector
375
+ selector: '[LibsUiComponentsScrollOverlayDirective]',
376
+ standalone: true,
377
+ }]
378
+ }], ctorParameters: () => [] });
379
+
380
+ class LibsUiComponentsScrollOverlayDemoComponent {
381
+ // Demo text content: generate 5000 words for vertical scrolling
382
+ longContent = signal(Array.from({ length: 5000 }, (_, i) => `Lorem${i + 1}`).join(' '));
383
+ // Demo horizontal content: generate 5000 words for horizontal scrolling
384
+ longHorizontalContent = signal(Array.from({ length: 5000 }, (_, i) => `Word${i + 1}`).join(' '));
385
+ // Scenario selection
386
+ scenarioOptions = ['default', 'customStyle', 'autoHide', 'horizontal'];
387
+ selectedScenario = 'default';
388
+ // Options signals
389
+ customStyleOptions = signal({ scrollbarWidth: 12, scrollbarColor: '#f3f4f6', scrollbarHoverColor: '#e5e7eb', scrollThumbColor: '#3b82f6', scrollThumbHoverColor: '#2563eb', scrollbarPadding: 4 });
390
+ autoHideOptions = signal({ scrollYOpacity0: true, scrollbarWidth: 8, scrollbarColor: 'transparent', scrollThumbColor: '#9ca3af', scrollThumbHoverColor: '#6b7280' });
391
+ horizontalOptions = signal({ scrollX: 'scroll', scrollY: 'hidden', scrollbarWidth: 8, scrollbarColor: '#f3f4f6', scrollThumbColor: '#3b82f6' });
392
+ // Scroll event log
393
+ lastEvent = signal('No events yet');
394
+ // Helpers
395
+ get options() {
396
+ switch (this.selectedScenario) {
397
+ case 'customStyle':
398
+ return this.customStyleOptions();
399
+ case 'autoHide':
400
+ return this.autoHideOptions();
401
+ case 'horizontal':
402
+ return this.horizontalOptions();
403
+ default:
404
+ return undefined;
405
+ }
406
+ }
407
+ get content() {
408
+ return this.selectedScenario === 'horizontal' ? this.longHorizontalContent() : this.longContent();
409
+ }
410
+ // Event handlers
411
+ onScroll() {
412
+ this.lastEvent.set('Scroll event fired');
413
+ }
414
+ onScrollTop() {
415
+ this.lastEvent.set('Reached top');
416
+ }
417
+ onScrollBottom() {
418
+ this.lastEvent.set('Reached bottom');
419
+ }
420
+ // API docs
421
+ inputsDoc = [
422
+ { name: 'options', type: 'IScrollOverlayOptions', default: 'undefined', description: 'Cấu hình tuỳ chỉnh scrollbar' },
423
+ { name: 'debugMode', type: 'boolean', default: 'false', description: 'Bật chế độ debug' },
424
+ { name: 'notShowScrollBarX', type: 'boolean', default: 'false', description: 'Ẩn scrollbar ngang' },
425
+ { name: 'notShowScrollBarY', type: 'boolean', default: 'false', description: 'Ẩn scrollbar dọc' },
426
+ ];
427
+ outputsDoc = [
428
+ { name: 'outScroll', type: 'Event', description: 'Bắn ra khi scroll bất kỳ' },
429
+ { name: 'outScrollTop', type: 'Event', description: 'Bắn ra khi scroll đến top' },
430
+ { name: 'outScrollBottom', type: 'Event', description: 'Bắn ra khi scroll đến bottom' },
431
+ ];
432
+ optionsDoc = [
433
+ { name: 'scrollbarWidth', type: 'number', default: 'undefined', description: 'Chiều rộng scrollbar (px)' },
434
+ { name: 'scrollbarColor', type: 'string', default: 'undefined', description: 'Màu track scrollbar' },
435
+ { name: 'scrollbarHoverColor', type: 'string', default: 'undefined', description: 'Màu track khi hover' },
436
+ { name: 'scrollThumbColor', type: 'string', default: 'undefined', description: 'Màu thumb' },
437
+ { name: 'scrollThumbHoverColor', type: 'string', default: 'undefined', description: 'Màu thumb khi hover' },
438
+ { name: 'scrollbarPadding', type: 'number', default: 'undefined', description: 'Padding scrollbar' },
439
+ { name: 'scrollX', type: `'hidden' | 'scroll'`, default: 'undefined', description: 'Kiểu scroll X' },
440
+ { name: 'scrollXOpacity0', type: 'boolean', default: 'undefined', description: 'Ẩn track X khi không hover' },
441
+ { name: 'scrollY', type: `'hidden' | 'scroll'`, default: 'undefined', description: 'Kiểu scroll Y' },
442
+ { name: 'scrollYOpacity0', type: 'boolean', default: 'undefined', description: 'Ẩn track Y khi không hover' },
443
+ ];
444
+ interfacesDoc = [{ name: 'IScrollOverlayOptions', type: 'interface', description: 'Các tuỳ chọn cấu hình scroll-overlay' }];
445
+ // Installation commands
446
+ installCommandNpm = 'npm install @libs-ui/components-scroll-overlay';
447
+ installCommandYarn = 'yarn add @libs-ui/components-scroll-overlay';
448
+ copyToClipboard(text) {
449
+ navigator.clipboard.writeText(text).then(() => console.log('Copied:', text));
450
+ }
451
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsScrollOverlayDemoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
452
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: LibsUiComponentsScrollOverlayDemoComponent, isStandalone: true, selector: "lib-scroll-overlay-demo", ngImport: i0, template: "<div class=\"max-w-6xl mx-auto p-5 font-sans text-gray-800\">\n <header class=\"text-center py-10 bg-white rounded-lg mb-8 shadow-sm\">\n <h1 class=\"text-4xl font-bold mb-2\">Demo Scroll Overlay</h1>\n <p class=\"text-xl text-gray-500\">&#64;libs-ui/components-scroll-overlay</p>\n </header>\n\n <main>\n <!-- Gi\u1EDBi thi\u1EC7u -->\n <section class=\"bg-white rounded-lg p-8 mb-8 shadow-sm\">\n <h2 class=\"text-2xl font-bold mb-5 pb-3 border-b border-gray-200\">Gi\u1EDBi thi\u1EC7u</h2>\n <p>\n <code>scroll-overlay</code>\n l\u00E0 m\u1ED9t directive gi\u00FAp tu\u1EF3 bi\u1EBFn scrollbar tr\u00EAn b\u1EA5t k\u1EF3 ph\u1EA7n t\u1EED n\u00E0o trong Angular, h\u1ED7 tr\u1EE3 tu\u1EF3 ch\u1EC9nh m\u00E0u, k\u00EDch th\u01B0\u1EDBc, \u1EA9n/hi\u1EC7n v\u00E0 s\u1EF1 ki\u1EC7n scroll.\n </p>\n </section>\n\n <!-- C\u00E0i \u0111\u1EB7t -->\n <section class=\"bg-white rounded-lg p-8 mb-8 shadow-sm\">\n <h2 class=\"text-2xl font-bold mb-5 pb-3 border-b border-gray-200\">C\u00E0i \u0111\u1EB7t</h2>\n <div class=\"flex items-center bg-gray-100 p-4 rounded-lg mb-4\">\n <pre class=\"flex-1 text-sm overflow-x-auto\"><code>{{ installCommandNpm }}</code></pre>\n <button\n class=\"ml-4 px-3 py-1 bg-blue-500 text-white rounded hover:bg-blue-600\"\n (click)=\"copyToClipboard(installCommandNpm)\">\n Sao ch\u00E9p\n </button>\n </div>\n <div class=\"flex items-center bg-gray-100 p-4 rounded-lg\">\n <pre class=\"flex-1 text-sm overflow-x-auto\"><code>{{ installCommandYarn }}</code></pre>\n <button\n class=\"ml-4 px-3 py-1 bg-blue-500 text-white rounded hover:bg-blue-600\"\n (click)=\"copyToClipboard(installCommandYarn)\">\n Sao ch\u00E9p\n </button>\n </div>\n </section>\n\n <!-- Demo Tr\u1EF1c ti\u1EBFp -->\n <section class=\"bg-white rounded-lg p-8 mb-8 shadow-sm\">\n <h2 class=\"text-2xl font-bold mb-5 pb-3 border-b border-gray-200\">Demo Tr\u1EF1c ti\u1EBFp</h2>\n <div class=\"grid grid-cols-4 gap-4 mb-6\">\n <button\n *ngFor=\"let sc of scenarioOptions\"\n (click)=\"selectedScenario = sc\"\n class=\"px-3 py-1 border rounded\"\n [class.bg-blue-500]=\"selectedScenario === sc\"\n [class.text-white]=\"selectedScenario === sc\">\n {{ sc }}\n </button>\n </div>\n <div class=\"p-4 bg-gray-50 rounded-lg h-[300px]\">\n <div\n LibsUiComponentsScrollOverlayDirective\n [options]=\"options\"\n (outScroll)=\"onScroll()\"\n (outScrollTop)=\"onScrollTop()\"\n (outScrollBottom)=\"onScrollBottom()\"\n class=\"w-full h-full\">\n <div\n class=\"p-2\"\n [innerText]=\"content\"\n [class.whitespace-pre-wrap]=\"selectedScenario !== 'horizontal'\"\n [class.whitespace-nowrap]=\"selectedScenario === 'horizontal'\"></div>\n </div>\n </div>\n <p class=\"mt-4 text-gray-700\">S\u1EF1 ki\u1EC7n: {{ lastEvent() }}</p>\n </section>\n\n <!-- C\u00E1ch s\u1EED d\u1EE5ng -->\n <section class=\"bg-white rounded-lg p-8 mb-8 shadow-sm\">\n <h2 class=\"text-2xl font-bold mb-5 pb-3 border-b border-gray-200\">C\u00E1ch s\u1EED d\u1EE5ng</h2>\n <pre class=\"bg-gray-100 p-4 rounded-lg overflow-auto text-sm\">\n <code ngNonBindable>&lt;div LibsUiComponentsScrollOverlayDirective [options]=\"&#123; scrollbarWidth:12, scrollThumbColor:'#3b82f6' &#125;\" style=\"width:300px;height:200px;overflow:auto;\"&gt;\n N\u1ED9i dung d\u00E0i...\n&lt;/div&gt;</code>\n </pre>\n </section>\n\n <!-- API Reference -->\n <section class=\"bg-white rounded-lg p-8 mb-8 shadow-sm\">\n <h2 class=\"text-2xl font-bold mb-5 pb-3 border-b border-gray-200\">API Reference</h2>\n <h3 class=\"text-xl font-semibold mb-3\">Inputs</h3>\n <table class=\"min-w-full bg-white border border-gray-200 mb-6\">\n <thead>\n <tr>\n <th class=\"py-2 px-4 border-b bg-gray-100\">T\u00EAn</th>\n <th class=\"py-2 px-4 border-b bg-gray-100\">Ki\u1EC3u</th>\n <th class=\"py-2 px-4 border-b bg-gray-100\">M\u1EB7c \u0111\u1ECBnh</th>\n <th class=\"py-2 px-4 border-b bg-gray-100\">M\u00F4 t\u1EA3</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let input of inputsDoc\">\n <td class=\"py-2 px-4 border-b\">\n <code>{{ input.name }}</code>\n </td>\n <td class=\"py-2 px-4 border-b\">\n <code>{{ input.type }}</code>\n </td>\n <td class=\"py-2 px-4 border-b\">{{ input.default }}</td>\n <td class=\"py-2 px-4 border-b\">{{ input.description }}</td>\n </tr>\n </tbody>\n </table>\n <h3 class=\"text-xl font-semibold mb-3\">Outputs</h3>\n <table class=\"min-w-full bg-white border border-gray-200 mb-6\">\n <thead>\n <tr>\n <th class=\"py-2 px-4 border-b bg-gray-100\">T\u00EAn</th>\n <th class=\"py-2 px-4 border-b bg-gray-100\">Ki\u1EC3u</th>\n <th class=\"py-2 px-4 border-b bg-gray-100\">M\u00F4 t\u1EA3</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let output of outputsDoc\">\n <td class=\"py-2 px-4 border-b\">\n <code>{{ output.name }}</code>\n </td>\n <td class=\"py-2 px-4 border-b\">\n <code>{{ output.type }}</code>\n </td>\n <td class=\"py-2 px-4 border-b\">{{ output.description }}</td>\n </tr>\n </tbody>\n </table>\n <h3 class=\"text-xl font-semibold mb-3\">Options</h3>\n <table class=\"min-w-full bg-white border border-gray-200 mb-6\">\n <thead>\n <tr>\n <th class=\"py-2 px-4 border-b bg-gray-100\">Thu\u1ED9c t\u00EDnh</th>\n <th class=\"py-2 px-4 border-b bg-gray-100\">Ki\u1EC3u</th>\n <th class=\"py-2 px-4 border-b bg-gray-100\">M\u1EB7c \u0111\u1ECBnh</th>\n <th class=\"py-2 px-4 border-b bg-gray-100\">M\u00F4 t\u1EA3</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let opt of optionsDoc\">\n <td class=\"py-2 px-4 border-b\">\n <code>{{ opt.name }}</code>\n </td>\n <td class=\"py-2 px-4 border-b\">\n <code>{{ opt.type }}</code>\n </td>\n <td class=\"py-2 px-4 border-b\">{{ opt.default }}</td>\n <td class=\"py-2 px-4 border-b\">{{ opt.description }}</td>\n </tr>\n </tbody>\n </table>\n <h3 class=\"text-xl font-semibold mb-3\">Interfaces</h3>\n <div class=\"space-y-6\">\n <div\n *ngFor=\"let intf of interfacesDoc\"\n class=\"bg-gray-50 p-6 rounded-lg\">\n <h4 class=\"font-semibold mb-2\">{{ intf.name }}</h4>\n <pre class=\"bg-gray-100 p-4 rounded-lg overflow-auto text-sm mb-3\"><code>{{ intf.type }}</code></pre>\n <p>{{ intf.description }}</p>\n </div>\n </div>\n </section>\n </main>\n</div>\n", styles: ["@charset \"UTF-8\";.demo-container{padding:24px;font-family:system-ui,-apple-system,sans-serif;max-width:1200px;margin:0 auto}.demo-intro{margin-bottom:32px}.demo-intro h3{color:#333;margin-bottom:16px}.demo-intro ul{list-style:none;padding:0}.demo-intro ul li{margin-bottom:8px;padding-left:20px;position:relative}.demo-intro ul li:before{content:\"\\2022\";position:absolute;left:0;color:#3b82f6}.demo-features{margin-bottom:32px}.demo-features h3{color:#333;margin-bottom:16px}.features-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:16px}.feature-item{background:#f8fafc;padding:16px;border-radius:8px;border:1px solid #e2e8f0}.feature-item h4{color:#1e40af;margin:0 0 8px}.feature-item p{margin:0;color:#64748b}.demo-api{margin-bottom:48px}.demo-api h3{color:#333;margin-bottom:24px}.api-section{margin-bottom:32px}.api-section h4{color:#1e40af;margin-bottom:16px}.api-table{overflow-x:auto}.api-table table{width:100%;border-collapse:collapse;background:#fff;border-radius:8px;border:1px solid #e2e8f0}.api-table table th,.api-table table td{padding:12px 16px;text-align:left;border-bottom:1px solid #e2e8f0}.api-table table th{background:#f8fafc;font-weight:600;color:#1e40af}.api-table table td{color:#64748b}.api-table table td:first-child{font-family:Fira Code,monospace;color:#334155}.api-table table td:nth-child(2){font-family:Fira Code,monospace;color:#3b82f6}.api-table table tr:last-child td{border-bottom:none}.demo-section{margin-bottom:48px}.demo-section h3{color:#333;margin-bottom:16px}.demo-description{margin-bottom:16px}.demo-description p{color:#64748b;margin-bottom:12px}.demo-description pre{background:#f8fafc;padding:16px;border-radius:8px;border:1px solid #e2e8f0;overflow-x:auto}.demo-description pre code{font-family:Fira Code,monospace;font-size:14px;color:#334155}.demo-box{display:flex;gap:16px;align-items:flex-start}.event-log{padding:16px;background:#f5f5f5;border-radius:4px;min-width:200px}.event-log p{margin:0;font-size:14px;color:#666}.demo-notes{margin-top:48px;padding:24px;background:#f8fafc;border-radius:8px;border:1px solid #e2e8f0}.demo-notes h3{color:#333;margin-bottom:16px}.demo-notes ul{list-style:none;padding:0;margin:0}.demo-notes ul li{color:#64748b;margin-bottom:12px;padding-left:24px;position:relative}.demo-notes ul li:before{content:\"\\2192\";position:absolute;left:0;color:#3b82f6}.demo-notes ul li:last-child{margin-bottom:0}.interface-description{margin-bottom:24px}.interface-description p{color:#64748b;margin-bottom:16px}.interface-description pre{background:#f8fafc;padding:16px;border-radius:8px;border:1px solid #e2e8f0;overflow-x:auto}.interface-description pre code{font-family:Fira Code,monospace;font-size:14px;color:#334155;line-height:1.6}.interface-usage{margin-bottom:24px}.interface-usage h5{color:#1e40af;margin-bottom:12px;font-size:16px}.interface-usage pre{background:#f8fafc;padding:16px;border-radius:8px;border:1px solid #e2e8f0;overflow-x:auto}.interface-usage pre code{font-family:Fira Code,monospace;font-size:14px;color:#334155;line-height:1.6}.interface-usage pre code .comment{color:#64748b}.interface-notes{background:#f8fafc;padding:16px;border-radius:8px;border:1px solid #e2e8f0}.interface-notes h5{color:#1e40af;margin-bottom:12px;font-size:16px}.interface-notes ul{list-style:none;padding:0;margin:0}.interface-notes ul li{color:#64748b;margin-bottom:8px;padding-left:20px;position:relative}.interface-notes ul li:before{content:\"\\2022\";position:absolute;left:0;color:#3b82f6}.interface-notes ul li:last-child{margin-bottom:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: LibsUiComponentsScrollOverlayDirective, selector: "[LibsUiComponentsScrollOverlayDirective]", inputs: ["debugMode", "ignoreInit", "classContainer", "options", "elementCheckScrollX", "elementCheckScrollY", "elementScroll"], outputs: ["outScroll", "outScrollX", "outScrollY", "outScrollTop", "outScrollBottom"] }] });
453
+ }
454
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsScrollOverlayDemoComponent, decorators: [{
455
+ type: Component,
456
+ args: [{ selector: 'lib-scroll-overlay-demo', standalone: true, imports: [CommonModule, LibsUiComponentsScrollOverlayDirective], template: "<div class=\"max-w-6xl mx-auto p-5 font-sans text-gray-800\">\n <header class=\"text-center py-10 bg-white rounded-lg mb-8 shadow-sm\">\n <h1 class=\"text-4xl font-bold mb-2\">Demo Scroll Overlay</h1>\n <p class=\"text-xl text-gray-500\">&#64;libs-ui/components-scroll-overlay</p>\n </header>\n\n <main>\n <!-- Gi\u1EDBi thi\u1EC7u -->\n <section class=\"bg-white rounded-lg p-8 mb-8 shadow-sm\">\n <h2 class=\"text-2xl font-bold mb-5 pb-3 border-b border-gray-200\">Gi\u1EDBi thi\u1EC7u</h2>\n <p>\n <code>scroll-overlay</code>\n l\u00E0 m\u1ED9t directive gi\u00FAp tu\u1EF3 bi\u1EBFn scrollbar tr\u00EAn b\u1EA5t k\u1EF3 ph\u1EA7n t\u1EED n\u00E0o trong Angular, h\u1ED7 tr\u1EE3 tu\u1EF3 ch\u1EC9nh m\u00E0u, k\u00EDch th\u01B0\u1EDBc, \u1EA9n/hi\u1EC7n v\u00E0 s\u1EF1 ki\u1EC7n scroll.\n </p>\n </section>\n\n <!-- C\u00E0i \u0111\u1EB7t -->\n <section class=\"bg-white rounded-lg p-8 mb-8 shadow-sm\">\n <h2 class=\"text-2xl font-bold mb-5 pb-3 border-b border-gray-200\">C\u00E0i \u0111\u1EB7t</h2>\n <div class=\"flex items-center bg-gray-100 p-4 rounded-lg mb-4\">\n <pre class=\"flex-1 text-sm overflow-x-auto\"><code>{{ installCommandNpm }}</code></pre>\n <button\n class=\"ml-4 px-3 py-1 bg-blue-500 text-white rounded hover:bg-blue-600\"\n (click)=\"copyToClipboard(installCommandNpm)\">\n Sao ch\u00E9p\n </button>\n </div>\n <div class=\"flex items-center bg-gray-100 p-4 rounded-lg\">\n <pre class=\"flex-1 text-sm overflow-x-auto\"><code>{{ installCommandYarn }}</code></pre>\n <button\n class=\"ml-4 px-3 py-1 bg-blue-500 text-white rounded hover:bg-blue-600\"\n (click)=\"copyToClipboard(installCommandYarn)\">\n Sao ch\u00E9p\n </button>\n </div>\n </section>\n\n <!-- Demo Tr\u1EF1c ti\u1EBFp -->\n <section class=\"bg-white rounded-lg p-8 mb-8 shadow-sm\">\n <h2 class=\"text-2xl font-bold mb-5 pb-3 border-b border-gray-200\">Demo Tr\u1EF1c ti\u1EBFp</h2>\n <div class=\"grid grid-cols-4 gap-4 mb-6\">\n <button\n *ngFor=\"let sc of scenarioOptions\"\n (click)=\"selectedScenario = sc\"\n class=\"px-3 py-1 border rounded\"\n [class.bg-blue-500]=\"selectedScenario === sc\"\n [class.text-white]=\"selectedScenario === sc\">\n {{ sc }}\n </button>\n </div>\n <div class=\"p-4 bg-gray-50 rounded-lg h-[300px]\">\n <div\n LibsUiComponentsScrollOverlayDirective\n [options]=\"options\"\n (outScroll)=\"onScroll()\"\n (outScrollTop)=\"onScrollTop()\"\n (outScrollBottom)=\"onScrollBottom()\"\n class=\"w-full h-full\">\n <div\n class=\"p-2\"\n [innerText]=\"content\"\n [class.whitespace-pre-wrap]=\"selectedScenario !== 'horizontal'\"\n [class.whitespace-nowrap]=\"selectedScenario === 'horizontal'\"></div>\n </div>\n </div>\n <p class=\"mt-4 text-gray-700\">S\u1EF1 ki\u1EC7n: {{ lastEvent() }}</p>\n </section>\n\n <!-- C\u00E1ch s\u1EED d\u1EE5ng -->\n <section class=\"bg-white rounded-lg p-8 mb-8 shadow-sm\">\n <h2 class=\"text-2xl font-bold mb-5 pb-3 border-b border-gray-200\">C\u00E1ch s\u1EED d\u1EE5ng</h2>\n <pre class=\"bg-gray-100 p-4 rounded-lg overflow-auto text-sm\">\n <code ngNonBindable>&lt;div LibsUiComponentsScrollOverlayDirective [options]=\"&#123; scrollbarWidth:12, scrollThumbColor:'#3b82f6' &#125;\" style=\"width:300px;height:200px;overflow:auto;\"&gt;\n N\u1ED9i dung d\u00E0i...\n&lt;/div&gt;</code>\n </pre>\n </section>\n\n <!-- API Reference -->\n <section class=\"bg-white rounded-lg p-8 mb-8 shadow-sm\">\n <h2 class=\"text-2xl font-bold mb-5 pb-3 border-b border-gray-200\">API Reference</h2>\n <h3 class=\"text-xl font-semibold mb-3\">Inputs</h3>\n <table class=\"min-w-full bg-white border border-gray-200 mb-6\">\n <thead>\n <tr>\n <th class=\"py-2 px-4 border-b bg-gray-100\">T\u00EAn</th>\n <th class=\"py-2 px-4 border-b bg-gray-100\">Ki\u1EC3u</th>\n <th class=\"py-2 px-4 border-b bg-gray-100\">M\u1EB7c \u0111\u1ECBnh</th>\n <th class=\"py-2 px-4 border-b bg-gray-100\">M\u00F4 t\u1EA3</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let input of inputsDoc\">\n <td class=\"py-2 px-4 border-b\">\n <code>{{ input.name }}</code>\n </td>\n <td class=\"py-2 px-4 border-b\">\n <code>{{ input.type }}</code>\n </td>\n <td class=\"py-2 px-4 border-b\">{{ input.default }}</td>\n <td class=\"py-2 px-4 border-b\">{{ input.description }}</td>\n </tr>\n </tbody>\n </table>\n <h3 class=\"text-xl font-semibold mb-3\">Outputs</h3>\n <table class=\"min-w-full bg-white border border-gray-200 mb-6\">\n <thead>\n <tr>\n <th class=\"py-2 px-4 border-b bg-gray-100\">T\u00EAn</th>\n <th class=\"py-2 px-4 border-b bg-gray-100\">Ki\u1EC3u</th>\n <th class=\"py-2 px-4 border-b bg-gray-100\">M\u00F4 t\u1EA3</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let output of outputsDoc\">\n <td class=\"py-2 px-4 border-b\">\n <code>{{ output.name }}</code>\n </td>\n <td class=\"py-2 px-4 border-b\">\n <code>{{ output.type }}</code>\n </td>\n <td class=\"py-2 px-4 border-b\">{{ output.description }}</td>\n </tr>\n </tbody>\n </table>\n <h3 class=\"text-xl font-semibold mb-3\">Options</h3>\n <table class=\"min-w-full bg-white border border-gray-200 mb-6\">\n <thead>\n <tr>\n <th class=\"py-2 px-4 border-b bg-gray-100\">Thu\u1ED9c t\u00EDnh</th>\n <th class=\"py-2 px-4 border-b bg-gray-100\">Ki\u1EC3u</th>\n <th class=\"py-2 px-4 border-b bg-gray-100\">M\u1EB7c \u0111\u1ECBnh</th>\n <th class=\"py-2 px-4 border-b bg-gray-100\">M\u00F4 t\u1EA3</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let opt of optionsDoc\">\n <td class=\"py-2 px-4 border-b\">\n <code>{{ opt.name }}</code>\n </td>\n <td class=\"py-2 px-4 border-b\">\n <code>{{ opt.type }}</code>\n </td>\n <td class=\"py-2 px-4 border-b\">{{ opt.default }}</td>\n <td class=\"py-2 px-4 border-b\">{{ opt.description }}</td>\n </tr>\n </tbody>\n </table>\n <h3 class=\"text-xl font-semibold mb-3\">Interfaces</h3>\n <div class=\"space-y-6\">\n <div\n *ngFor=\"let intf of interfacesDoc\"\n class=\"bg-gray-50 p-6 rounded-lg\">\n <h4 class=\"font-semibold mb-2\">{{ intf.name }}</h4>\n <pre class=\"bg-gray-100 p-4 rounded-lg overflow-auto text-sm mb-3\"><code>{{ intf.type }}</code></pre>\n <p>{{ intf.description }}</p>\n </div>\n </div>\n </section>\n </main>\n</div>\n", styles: ["@charset \"UTF-8\";.demo-container{padding:24px;font-family:system-ui,-apple-system,sans-serif;max-width:1200px;margin:0 auto}.demo-intro{margin-bottom:32px}.demo-intro h3{color:#333;margin-bottom:16px}.demo-intro ul{list-style:none;padding:0}.demo-intro ul li{margin-bottom:8px;padding-left:20px;position:relative}.demo-intro ul li:before{content:\"\\2022\";position:absolute;left:0;color:#3b82f6}.demo-features{margin-bottom:32px}.demo-features h3{color:#333;margin-bottom:16px}.features-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:16px}.feature-item{background:#f8fafc;padding:16px;border-radius:8px;border:1px solid #e2e8f0}.feature-item h4{color:#1e40af;margin:0 0 8px}.feature-item p{margin:0;color:#64748b}.demo-api{margin-bottom:48px}.demo-api h3{color:#333;margin-bottom:24px}.api-section{margin-bottom:32px}.api-section h4{color:#1e40af;margin-bottom:16px}.api-table{overflow-x:auto}.api-table table{width:100%;border-collapse:collapse;background:#fff;border-radius:8px;border:1px solid #e2e8f0}.api-table table th,.api-table table td{padding:12px 16px;text-align:left;border-bottom:1px solid #e2e8f0}.api-table table th{background:#f8fafc;font-weight:600;color:#1e40af}.api-table table td{color:#64748b}.api-table table td:first-child{font-family:Fira Code,monospace;color:#334155}.api-table table td:nth-child(2){font-family:Fira Code,monospace;color:#3b82f6}.api-table table tr:last-child td{border-bottom:none}.demo-section{margin-bottom:48px}.demo-section h3{color:#333;margin-bottom:16px}.demo-description{margin-bottom:16px}.demo-description p{color:#64748b;margin-bottom:12px}.demo-description pre{background:#f8fafc;padding:16px;border-radius:8px;border:1px solid #e2e8f0;overflow-x:auto}.demo-description pre code{font-family:Fira Code,monospace;font-size:14px;color:#334155}.demo-box{display:flex;gap:16px;align-items:flex-start}.event-log{padding:16px;background:#f5f5f5;border-radius:4px;min-width:200px}.event-log p{margin:0;font-size:14px;color:#666}.demo-notes{margin-top:48px;padding:24px;background:#f8fafc;border-radius:8px;border:1px solid #e2e8f0}.demo-notes h3{color:#333;margin-bottom:16px}.demo-notes ul{list-style:none;padding:0;margin:0}.demo-notes ul li{color:#64748b;margin-bottom:12px;padding-left:24px;position:relative}.demo-notes ul li:before{content:\"\\2192\";position:absolute;left:0;color:#3b82f6}.demo-notes ul li:last-child{margin-bottom:0}.interface-description{margin-bottom:24px}.interface-description p{color:#64748b;margin-bottom:16px}.interface-description pre{background:#f8fafc;padding:16px;border-radius:8px;border:1px solid #e2e8f0;overflow-x:auto}.interface-description pre code{font-family:Fira Code,monospace;font-size:14px;color:#334155;line-height:1.6}.interface-usage{margin-bottom:24px}.interface-usage h5{color:#1e40af;margin-bottom:12px;font-size:16px}.interface-usage pre{background:#f8fafc;padding:16px;border-radius:8px;border:1px solid #e2e8f0;overflow-x:auto}.interface-usage pre code{font-family:Fira Code,monospace;font-size:14px;color:#334155;line-height:1.6}.interface-usage pre code .comment{color:#64748b}.interface-notes{background:#f8fafc;padding:16px;border-radius:8px;border:1px solid #e2e8f0}.interface-notes h5{color:#1e40af;margin-bottom:12px;font-size:16px}.interface-notes ul{list-style:none;padding:0;margin:0}.interface-notes ul li{color:#64748b;margin-bottom:8px;padding-left:20px;position:relative}.interface-notes ul li:before{content:\"\\2022\";position:absolute;left:0;color:#3b82f6}.interface-notes ul li:last-child{margin-bottom:0}\n"] }]
457
+ }] });
458
+
459
+ /**
460
+ * Generated bundle index. Do not edit.
461
+ */
462
+
463
+ export { LibsUiComponentsScrollOverlayDemoComponent, LibsUiComponentsScrollOverlayDirective };
464
+ //# sourceMappingURL=libs-ui-components-scroll-overlay.mjs.map