@radix-ng/primitives 1.0.5 → 1.0.7
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/aspect-ratio/README.md +1 -1
- package/fesm2022/radix-ng-primitives-accordion.mjs +40 -27
- package/fesm2022/radix-ng-primitives-accordion.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-alert-dialog.mjs +34 -34
- package/fesm2022/radix-ng-primitives-arrow.mjs +3 -3
- package/fesm2022/radix-ng-primitives-aspect-ratio.mjs +11 -35
- package/fesm2022/radix-ng-primitives-aspect-ratio.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-autocomplete.mjs +175 -125
- package/fesm2022/radix-ng-primitives-autocomplete.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-avatar.mjs +92 -35
- package/fesm2022/radix-ng-primitives-avatar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-button.mjs +11 -7
- package/fesm2022/radix-ng-primitives-button.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-calendar.mjs +140 -90
- package/fesm2022/radix-ng-primitives-calendar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-checkbox.mjs +63 -46
- package/fesm2022/radix-ng-primitives-checkbox.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-collapsible.mjs +37 -25
- package/fesm2022/radix-ng-primitives-collapsible.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-combobox.mjs +278 -177
- package/fesm2022/radix-ng-primitives-combobox.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-composite.mjs +50 -33
- package/fesm2022/radix-ng-primitives-composite.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-config.mjs +7 -5
- package/fesm2022/radix-ng-primitives-config.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-context-menu.mjs +48 -22
- package/fesm2022/radix-ng-primitives-context-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-core.mjs +44 -28
- package/fesm2022/radix-ng-primitives-core.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-cropper.mjs +73 -45
- package/fesm2022/radix-ng-primitives-cropper.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-date-field.mjs +70 -40
- package/fesm2022/radix-ng-primitives-date-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-dialog.mjs +93 -67
- package/fesm2022/radix-ng-primitives-dialog.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-direction-provider.mjs +5 -4
- package/fesm2022/radix-ng-primitives-direction-provider.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-dismissable-layer.mjs +20 -16
- package/fesm2022/radix-ng-primitives-dismissable-layer.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-drawer.mjs +107 -81
- package/fesm2022/radix-ng-primitives-drawer.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-editable.mjs +53 -39
- package/fesm2022/radix-ng-primitives-editable.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-field.mjs +76 -50
- package/fesm2022/radix-ng-primitives-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-fieldset.mjs +8 -7
- package/fesm2022/radix-ng-primitives-fieldset.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-floating-focus-manager.mjs +77 -40
- package/fesm2022/radix-ng-primitives-floating-focus-manager.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-focus-guards.mjs +3 -3
- package/fesm2022/radix-ng-primitives-focus-scope.mjs +7 -5
- package/fesm2022/radix-ng-primitives-focus-scope.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-form.mjs +26 -17
- package/fesm2022/radix-ng-primitives-form.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-input.mjs +41 -22
- package/fesm2022/radix-ng-primitives-input.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-label.mjs +11 -8
- package/fesm2022/radix-ng-primitives-label.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-menu.mjs +274 -154
- package/fesm2022/radix-ng-primitives-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-menubar.mjs +35 -17
- package/fesm2022/radix-ng-primitives-menubar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-meter.mjs +41 -30
- package/fesm2022/radix-ng-primitives-meter.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-navigation-menu.mjs +220 -183
- package/fesm2022/radix-ng-primitives-navigation-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-number-field.mjs +93 -61
- package/fesm2022/radix-ng-primitives-number-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-pagination.mjs +48 -38
- package/fesm2022/radix-ng-primitives-pagination.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-popover.mjs +150 -107
- package/fesm2022/radix-ng-primitives-popover.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-popper.mjs +79 -47
- package/fesm2022/radix-ng-primitives-popper.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-portal.mjs +20 -13
- package/fesm2022/radix-ng-primitives-portal.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-presence.mjs +3 -3
- package/fesm2022/radix-ng-primitives-preview-card.mjs +119 -74
- package/fesm2022/radix-ng-primitives-preview-card.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-progress.mjs +73 -46
- package/fesm2022/radix-ng-primitives-progress.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-radio.mjs +58 -40
- package/fesm2022/radix-ng-primitives-radio.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-scroll-area.mjs +57 -41
- package/fesm2022/radix-ng-primitives-scroll-area.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-select.mjs +595 -102
- package/fesm2022/radix-ng-primitives-select.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-separator.mjs +11 -15
- package/fesm2022/radix-ng-primitives-separator.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-slider.mjs +101 -64
- package/fesm2022/radix-ng-primitives-slider.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-stepper.mjs +53 -39
- package/fesm2022/radix-ng-primitives-stepper.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-switch.mjs +25 -20
- package/fesm2022/radix-ng-primitives-switch.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-tabs.mjs +76 -51
- package/fesm2022/radix-ng-primitives-tabs.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-time-field.mjs +72 -41
- package/fesm2022/radix-ng-primitives-time-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toast.mjs +75 -56
- package/fesm2022/radix-ng-primitives-toast.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toggle-group.mjs +39 -23
- package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toggle.mjs +36 -36
- package/fesm2022/radix-ng-primitives-toggle.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toolbar.mjs +52 -31
- package/fesm2022/radix-ng-primitives-toolbar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-tooltip.mjs +118 -63
- package/fesm2022/radix-ng-primitives-tooltip.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-visually-hidden.mjs +31 -20
- package/fesm2022/radix-ng-primitives-visually-hidden.mjs.map +1 -1
- package/package.json +2 -2
- package/types/radix-ng-primitives-accordion.d.ts +1 -0
- package/types/radix-ng-primitives-aspect-ratio.d.ts +10 -23
- package/types/radix-ng-primitives-autocomplete.d.ts +3 -1
- package/types/radix-ng-primitives-avatar.d.ts +51 -25
- package/types/radix-ng-primitives-checkbox.d.ts +26 -98
- package/types/radix-ng-primitives-combobox.d.ts +28 -9
- package/types/radix-ng-primitives-context-menu.d.ts +2 -0
- package/types/radix-ng-primitives-dialog.d.ts +6 -3
- package/types/radix-ng-primitives-field.d.ts +33 -207
- package/types/radix-ng-primitives-floating-focus-manager.d.ts +11 -0
- package/types/radix-ng-primitives-form.d.ts +24 -33
- package/types/radix-ng-primitives-label.d.ts +3 -2
- package/types/radix-ng-primitives-menu.d.ts +47 -15
- package/types/radix-ng-primitives-menubar.d.ts +6 -1
- package/types/radix-ng-primitives-navigation-menu.d.ts +8 -6
- package/types/radix-ng-primitives-number-field.d.ts +1 -1
- package/types/radix-ng-primitives-popover.d.ts +12 -4
- package/types/radix-ng-primitives-preview-card.d.ts +18 -5
- package/types/radix-ng-primitives-progress.d.ts +59 -121
- package/types/radix-ng-primitives-radio.d.ts +0 -1
- package/types/radix-ng-primitives-select.d.ts +186 -391
- package/types/radix-ng-primitives-separator.d.ts +0 -7
- package/types/radix-ng-primitives-toggle-group.d.ts +7 -3
- package/types/radix-ng-primitives-toggle.d.ts +8 -8
- package/types/radix-ng-primitives-toolbar.d.ts +2 -0
- package/types/radix-ng-primitives-tooltip.d.ts +17 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { inject, DestroyRef, input, booleanAttribute, computed, signal, ElementRef, Directive, PLATFORM_ID, CSP_NONCE, effect, afterNextRender, NgModule } from '@angular/core';
|
|
3
|
-
import { clamp, createContext } from '@radix-ng/primitives/core';
|
|
3
|
+
import { clamp, createContext, injectId } from '@radix-ng/primitives/core';
|
|
4
4
|
import { injectDirection } from '@radix-ng/primitives/direction-provider';
|
|
5
5
|
import { isPlatformBrowser } from '@angular/common';
|
|
6
6
|
|
|
@@ -114,7 +114,6 @@ const rootContext = () => {
|
|
|
114
114
|
handlePointerUp: (e) => root.handlePointerUp(e)
|
|
115
115
|
};
|
|
116
116
|
};
|
|
117
|
-
let idCounter = 0;
|
|
118
117
|
/**
|
|
119
118
|
* Groups all parts of the scroll area.
|
|
120
119
|
* Renders a `<div>` element.
|
|
@@ -124,7 +123,7 @@ let idCounter = 0;
|
|
|
124
123
|
class RdxScrollAreaRoot {
|
|
125
124
|
constructor() {
|
|
126
125
|
this.destroyRef = inject(DestroyRef);
|
|
127
|
-
this.rootId =
|
|
126
|
+
this.rootId = injectId('rdx-scroll-area-');
|
|
128
127
|
/** Text direction of the scroll area. Affects horizontal (RTL) scroll math. */
|
|
129
128
|
this.dirInput = input(undefined, { ...(ngDevMode ? { debugName: "dirInput" } : /* istanbul ignore next */ {}), alias: 'dir' });
|
|
130
129
|
this.direction = injectDirection(this.dirInput);
|
|
@@ -132,18 +131,29 @@ class RdxScrollAreaRoot {
|
|
|
132
131
|
* The threshold in pixels that must be passed before the overflow edge attributes are applied.
|
|
133
132
|
* Accepts a single number for all edges or an object to configure them individually.
|
|
134
133
|
*/
|
|
135
|
-
this.overflowEdgeThreshold = input(0,
|
|
134
|
+
this.overflowEdgeThreshold = input(0, /* @ts-ignore */
|
|
135
|
+
...(ngDevMode ? [{ debugName: "overflowEdgeThreshold" }] : /* istanbul ignore next */ []));
|
|
136
136
|
this.disableStyleElements = input(false, { ...(ngDevMode ? { debugName: "disableStyleElements" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
137
|
-
this.normalizedThreshold = computed(() => normalizeOverflowEdgeThreshold(this.overflowEdgeThreshold()),
|
|
138
|
-
|
|
139
|
-
this.
|
|
140
|
-
|
|
141
|
-
this.
|
|
142
|
-
|
|
143
|
-
this.
|
|
144
|
-
|
|
145
|
-
this.
|
|
146
|
-
|
|
137
|
+
this.normalizedThreshold = computed(() => normalizeOverflowEdgeThreshold(this.overflowEdgeThreshold()), /* @ts-ignore */
|
|
138
|
+
...(ngDevMode ? [{ debugName: "normalizedThreshold" }] : /* istanbul ignore next */ []));
|
|
139
|
+
this.hovering = signal(false, /* @ts-ignore */
|
|
140
|
+
...(ngDevMode ? [{ debugName: "hovering" }] : /* istanbul ignore next */ []));
|
|
141
|
+
this.scrollingX = signal(false, /* @ts-ignore */
|
|
142
|
+
...(ngDevMode ? [{ debugName: "scrollingX" }] : /* istanbul ignore next */ []));
|
|
143
|
+
this.scrollingY = signal(false, /* @ts-ignore */
|
|
144
|
+
...(ngDevMode ? [{ debugName: "scrollingY" }] : /* istanbul ignore next */ []));
|
|
145
|
+
this.touchModality = signal(false, /* @ts-ignore */
|
|
146
|
+
...(ngDevMode ? [{ debugName: "touchModality" }] : /* istanbul ignore next */ []));
|
|
147
|
+
this.hasMeasuredScrollbar = signal(false, /* @ts-ignore */
|
|
148
|
+
...(ngDevMode ? [{ debugName: "hasMeasuredScrollbar" }] : /* istanbul ignore next */ []));
|
|
149
|
+
this.cornerSize = signal(DEFAULT_SIZE, /* @ts-ignore */
|
|
150
|
+
...(ngDevMode ? [{ debugName: "cornerSize" }] : /* istanbul ignore next */ []));
|
|
151
|
+
this.thumbSize = signal(DEFAULT_SIZE, /* @ts-ignore */
|
|
152
|
+
...(ngDevMode ? [{ debugName: "thumbSize" }] : /* istanbul ignore next */ []));
|
|
153
|
+
this.hiddenState = signal(DEFAULT_HIDDEN_STATE, /* @ts-ignore */
|
|
154
|
+
...(ngDevMode ? [{ debugName: "hiddenState" }] : /* istanbul ignore next */ []));
|
|
155
|
+
this.overflowEdges = signal(DEFAULT_OVERFLOW_EDGES, /* @ts-ignore */
|
|
156
|
+
...(ngDevMode ? [{ debugName: "overflowEdges" }] : /* istanbul ignore next */ []));
|
|
147
157
|
this.rootRef = { current: inject(ElementRef).nativeElement };
|
|
148
158
|
this.viewportRef = { current: null };
|
|
149
159
|
this.scrollbarYRef = { current: null };
|
|
@@ -299,10 +309,10 @@ class RdxScrollAreaRoot {
|
|
|
299
309
|
this.hovering.set(!!root && !!target && root.contains(target));
|
|
300
310
|
}
|
|
301
311
|
}
|
|
302
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
303
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
312
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxScrollAreaRoot, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
313
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxScrollAreaRoot, isStandalone: true, selector: "[rdxScrollAreaRoot]", inputs: { dirInput: { classPropertyName: "dirInput", publicName: "dir", isSignal: true, isRequired: false, transformFunction: null }, overflowEdgeThreshold: { classPropertyName: "overflowEdgeThreshold", publicName: "overflowEdgeThreshold", isSignal: true, isRequired: false, transformFunction: null }, disableStyleElements: { classPropertyName: "disableStyleElements", publicName: "disableStyleElements", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "presentation" }, listeners: { "pointerenter": "onPointerEnterOrMove($event)", "pointermove": "onPointerEnterOrMove($event)", "pointerdown": "onTouchModalityChange($event)", "pointerleave": "hovering.set(false)" }, properties: { "style.position": "\"relative\"", "style.--scroll-area-corner-height": "cornerSize().height + \"px\"", "style.--scroll-area-corner-width": "cornerSize().width + \"px\"", "attr.data-scrolling": "(scrollingX() || scrollingY()) ? \"\" : undefined", "attr.data-has-overflow-x": "!hiddenState().x ? \"\" : undefined", "attr.data-has-overflow-y": "!hiddenState().y ? \"\" : undefined", "attr.data-overflow-x-start": "overflowEdges().xStart ? \"\" : undefined", "attr.data-overflow-x-end": "overflowEdges().xEnd ? \"\" : undefined", "attr.data-overflow-y-start": "overflowEdges().yStart ? \"\" : undefined", "attr.data-overflow-y-end": "overflowEdges().yEnd ? \"\" : undefined" } }, providers: [provideScrollAreaRootContext(rootContext)], exportAs: ["rdxScrollAreaRoot"], ngImport: i0 }); }
|
|
304
314
|
}
|
|
305
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
315
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxScrollAreaRoot, decorators: [{
|
|
306
316
|
type: Directive,
|
|
307
317
|
args: [{
|
|
308
318
|
selector: '[rdxScrollAreaRoot]',
|
|
@@ -558,10 +568,10 @@ class RdxScrollAreaViewport {
|
|
|
558
568
|
}, 0);
|
|
559
569
|
this.destroyRef.onDestroy(() => resizeObserver.disconnect());
|
|
560
570
|
}
|
|
561
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
562
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
571
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxScrollAreaViewport, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
572
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxScrollAreaViewport, isStandalone: true, selector: "[rdxScrollAreaViewport]", host: { attributes: { "role": "presentation" }, listeners: { "scroll": "onScroll()", "wheel": "onUserInteraction()", "touchmove": "onUserInteraction()", "pointermove": "onUserInteraction()", "pointerenter": "onUserInteraction()", "keydown": "onUserInteraction()" }, properties: { "style.overflow": "\"scroll\"", "attr.tabindex": "(rootContext.hiddenState().x && rootContext.hiddenState().y) ? -1 : 0", "attr.data-id": "rootContext.rootId + \"-viewport\"", "attr.data-scrolling": "(rootContext.scrollingX() || rootContext.scrollingY()) ? \"\" : undefined", "attr.data-has-overflow-x": "!rootContext.hiddenState().x ? \"\" : undefined", "attr.data-has-overflow-y": "!rootContext.hiddenState().y ? \"\" : undefined", "attr.data-overflow-x-start": "rootContext.overflowEdges().xStart ? \"\" : undefined", "attr.data-overflow-x-end": "rootContext.overflowEdges().xEnd ? \"\" : undefined", "attr.data-overflow-y-start": "rootContext.overflowEdges().yStart ? \"\" : undefined", "attr.data-overflow-y-end": "rootContext.overflowEdges().yEnd ? \"\" : undefined" } }, providers: [provideScrollAreaViewportContext(viewportContext)], exportAs: ["rdxScrollAreaViewport"], ngImport: i0 }); }
|
|
563
573
|
}
|
|
564
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
574
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxScrollAreaViewport, decorators: [{
|
|
565
575
|
type: Directive,
|
|
566
576
|
args: [{
|
|
567
577
|
selector: '[rdxScrollAreaViewport]',
|
|
@@ -630,10 +640,10 @@ class RdxScrollAreaContent {
|
|
|
630
640
|
this.destroyRef.onDestroy(() => resizeObserver.disconnect());
|
|
631
641
|
});
|
|
632
642
|
}
|
|
633
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
634
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
643
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxScrollAreaContent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
644
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxScrollAreaContent, isStandalone: true, selector: "[rdxScrollAreaContent]", host: { attributes: { "role": "presentation" }, properties: { "style.min-width": "\"fit-content\"", "attr.data-scrolling": "(rootContext.scrollingX() || rootContext.scrollingY()) ? \"\" : undefined", "attr.data-has-overflow-x": "!rootContext.hiddenState().x ? \"\" : undefined", "attr.data-has-overflow-y": "!rootContext.hiddenState().y ? \"\" : undefined", "attr.data-overflow-x-start": "rootContext.overflowEdges().xStart ? \"\" : undefined", "attr.data-overflow-x-end": "rootContext.overflowEdges().xEnd ? \"\" : undefined", "attr.data-overflow-y-start": "rootContext.overflowEdges().yStart ? \"\" : undefined", "attr.data-overflow-y-end": "rootContext.overflowEdges().yEnd ? \"\" : undefined" } }, exportAs: ["rdxScrollAreaContent"], ngImport: i0 }); }
|
|
635
645
|
}
|
|
636
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
646
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxScrollAreaContent, decorators: [{
|
|
637
647
|
type: Directive,
|
|
638
648
|
args: [{
|
|
639
649
|
selector: '[rdxScrollAreaContent]',
|
|
@@ -670,10 +680,10 @@ class RdxScrollAreaCorner {
|
|
|
670
680
|
}
|
|
671
681
|
});
|
|
672
682
|
}
|
|
673
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
674
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
683
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxScrollAreaCorner, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
684
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxScrollAreaCorner, isStandalone: true, selector: "[rdxScrollAreaCorner]", host: { properties: { "style.position": "\"absolute\"", "style.bottom": "\"0\"", "style.inset-inline-end": "\"0\"", "style.width": "rootContext.cornerSize().width + \"px\"", "style.height": "rootContext.cornerSize().height + \"px\"", "style.display": "rootContext.hiddenState().corner ? \"none\" : null" } }, exportAs: ["rdxScrollAreaCorner"], ngImport: i0 }); }
|
|
675
685
|
}
|
|
676
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
686
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxScrollAreaCorner, decorators: [{
|
|
677
687
|
type: Directive,
|
|
678
688
|
args: [{
|
|
679
689
|
selector: '[rdxScrollAreaCorner]',
|
|
@@ -705,13 +715,18 @@ class RdxScrollAreaScrollbar {
|
|
|
705
715
|
this.rootContext = injectScrollAreaRootContext();
|
|
706
716
|
this.element = inject(ElementRef).nativeElement;
|
|
707
717
|
/** Whether the scrollbar controls vertical or horizontal scroll. */
|
|
708
|
-
this.orientation = input('vertical',
|
|
718
|
+
this.orientation = input('vertical', /* @ts-ignore */
|
|
719
|
+
...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
709
720
|
/** Whether to keep the element rendered when the viewport isn't scrollable. */
|
|
710
721
|
this.keepMounted = input(false, { ...(ngDevMode ? { debugName: "keepMounted" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
711
|
-
this.scrolling = computed(() => this.orientation() === 'horizontal' ? this.rootContext.scrollingX() : this.rootContext.scrollingY(),
|
|
712
|
-
|
|
713
|
-
this.
|
|
714
|
-
|
|
722
|
+
this.scrolling = computed(() => this.orientation() === 'horizontal' ? this.rootContext.scrollingX() : this.rootContext.scrollingY(), /* @ts-ignore */
|
|
723
|
+
...(ngDevMode ? [{ debugName: "scrolling" }] : /* istanbul ignore next */ []));
|
|
724
|
+
this.isHidden = computed(() => this.orientation() === 'vertical' ? this.rootContext.hiddenState().y : this.rootContext.hiddenState().x, /* @ts-ignore */
|
|
725
|
+
...(ngDevMode ? [{ debugName: "isHidden" }] : /* istanbul ignore next */ []));
|
|
726
|
+
this.shouldRender = computed(() => this.keepMounted() || !this.isHidden(), /* @ts-ignore */
|
|
727
|
+
...(ngDevMode ? [{ debugName: "shouldRender" }] : /* istanbul ignore next */ []));
|
|
728
|
+
this.hideTrackUntilMeasured = computed(() => !this.rootContext.hasMeasuredScrollbar() && !this.keepMounted(), /* @ts-ignore */
|
|
729
|
+
...(ngDevMode ? [{ debugName: "hideTrackUntilMeasured" }] : /* istanbul ignore next */ []));
|
|
715
730
|
// Register this element as the vertical or horizontal scrollbar ref.
|
|
716
731
|
// Runs as an effect so the bound `orientation` input is available.
|
|
717
732
|
effect((onCleanup) => {
|
|
@@ -814,10 +829,10 @@ class RdxScrollAreaScrollbar {
|
|
|
814
829
|
this.rootContext.handleScroll({ x: viewportEl.scrollLeft, y: viewportEl.scrollTop });
|
|
815
830
|
this.rootContext.handlePointerDown(event);
|
|
816
831
|
}
|
|
817
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
818
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
832
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxScrollAreaScrollbar, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
833
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxScrollAreaScrollbar, isStandalone: true, selector: "[rdxScrollAreaScrollbar]", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, keepMounted: { classPropertyName: "keepMounted", publicName: "keepMounted", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "pointerdown": "onPointerDown($event)", "pointerup": "rootContext.handlePointerUp($event)", "pointercancel": "rootContext.handlePointerUp($event)", "wheel": "onWheel($event)" }, properties: { "attr.data-id": "rootContext.rootId + \"-scrollbar\"", "attr.data-orientation": "orientation()", "attr.data-hovering": "rootContext.hovering() ? \"\" : undefined", "attr.data-scrolling": "scrolling() ? \"\" : undefined", "attr.data-has-overflow-x": "!rootContext.hiddenState().x ? \"\" : undefined", "attr.data-has-overflow-y": "!rootContext.hiddenState().y ? \"\" : undefined", "attr.data-overflow-x-start": "rootContext.overflowEdges().xStart ? \"\" : undefined", "attr.data-overflow-x-end": "rootContext.overflowEdges().xEnd ? \"\" : undefined", "attr.data-overflow-y-start": "rootContext.overflowEdges().yStart ? \"\" : undefined", "attr.data-overflow-y-end": "rootContext.overflowEdges().yEnd ? \"\" : undefined", "style.position": "\"absolute\"", "style.touch-action": "\"none\"", "style.user-select": "\"none\"", "style.display": "shouldRender() ? null : \"none\"", "style.visibility": "hideTrackUntilMeasured() ? \"hidden\" : null", "style.top": "orientation() === \"vertical\" ? \"0\" : null", "style.bottom": "orientation() === \"vertical\" ? \"var(--scroll-area-corner-height)\" : \"0\"", "style.inset-inline-start": "orientation() === \"horizontal\" ? \"0\" : null", "style.inset-inline-end": "orientation() === \"vertical\" ? \"0\" : \"var(--scroll-area-corner-width)\"", "style.--scroll-area-thumb-height": "orientation() === \"vertical\" ? rootContext.thumbSize().height + \"px\" : null", "style.--scroll-area-thumb-width": "orientation() === \"horizontal\" ? rootContext.thumbSize().width + \"px\" : null" } }, providers: [provideScrollAreaScrollbarContext(scrollbarContext)], exportAs: ["rdxScrollAreaScrollbar"], ngImport: i0 }); }
|
|
819
834
|
}
|
|
820
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
835
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxScrollAreaScrollbar, decorators: [{
|
|
821
836
|
type: Directive,
|
|
822
837
|
args: [{
|
|
823
838
|
selector: '[rdxScrollAreaScrollbar]',
|
|
@@ -895,16 +910,17 @@ class RdxScrollAreaThumb {
|
|
|
895
910
|
}
|
|
896
911
|
this.rootContext.handlePointerUp(event);
|
|
897
912
|
}
|
|
898
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
899
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
913
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxScrollAreaThumb, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
914
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxScrollAreaThumb, isStandalone: true, selector: "[rdxScrollAreaThumb]", host: { listeners: { "pointerdown": "rootContext.handlePointerDown($event)", "pointermove": "rootContext.handlePointerMove($event)", "pointerup": "endDrag($event)", "pointercancel": "endDrag($event)" }, properties: { "attr.data-orientation": "scrollbarContext.orientation()", "attr.data-scrolling": "(scrollbarContext.orientation() === \"horizontal\" ? rootContext.scrollingX() : rootContext.scrollingY()) ? \"\" : undefined", "style.visibility": "rootContext.hasMeasuredScrollbar() ? null : \"hidden\"", "style.height": "scrollbarContext.orientation() === \"vertical\" ? \"var(--scroll-area-thumb-height)\" : null", "style.width": "scrollbarContext.orientation() === \"horizontal\" ? \"var(--scroll-area-thumb-width)\" : null" } }, exportAs: ["rdxScrollAreaThumb"], ngImport: i0 }); }
|
|
900
915
|
}
|
|
901
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
916
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxScrollAreaThumb, decorators: [{
|
|
902
917
|
type: Directive,
|
|
903
918
|
args: [{
|
|
904
919
|
selector: '[rdxScrollAreaThumb]',
|
|
905
920
|
exportAs: 'rdxScrollAreaThumb',
|
|
906
921
|
host: {
|
|
907
922
|
'[attr.data-orientation]': 'scrollbarContext.orientation()',
|
|
923
|
+
'[attr.data-scrolling]': '(scrollbarContext.orientation() === "horizontal" ? rootContext.scrollingX() : rootContext.scrollingY()) ? "" : undefined',
|
|
908
924
|
'[style.visibility]': 'rootContext.hasMeasuredScrollbar() ? null : "hidden"',
|
|
909
925
|
'[style.height]': 'scrollbarContext.orientation() === "vertical" ? "var(--scroll-area-thumb-height)" : null',
|
|
910
926
|
'[style.width]': 'scrollbarContext.orientation() === "horizontal" ? "var(--scroll-area-thumb-width)" : null',
|
|
@@ -925,8 +941,8 @@ const _imports = [
|
|
|
925
941
|
RdxScrollAreaCorner
|
|
926
942
|
];
|
|
927
943
|
class RdxScrollAreaModule {
|
|
928
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
929
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
944
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxScrollAreaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
945
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.2", ngImport: i0, type: RdxScrollAreaModule, imports: [RdxScrollAreaRoot,
|
|
930
946
|
RdxScrollAreaViewport,
|
|
931
947
|
RdxScrollAreaContent,
|
|
932
948
|
RdxScrollAreaScrollbar,
|
|
@@ -937,9 +953,9 @@ class RdxScrollAreaModule {
|
|
|
937
953
|
RdxScrollAreaScrollbar,
|
|
938
954
|
RdxScrollAreaThumb,
|
|
939
955
|
RdxScrollAreaCorner] }); }
|
|
940
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
956
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxScrollAreaModule }); }
|
|
941
957
|
}
|
|
942
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
958
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxScrollAreaModule, decorators: [{
|
|
943
959
|
type: NgModule,
|
|
944
960
|
args: [{
|
|
945
961
|
imports: [..._imports],
|