@scion/components 19.3.0 → 20.0.0
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/dimension/index.d.ts +79 -3
- package/fesm2022/scion-components-dimension.mjs +5 -38
- package/fesm2022/scion-components-dimension.mjs.map +1 -1
- package/fesm2022/scion-components-sashbox.mjs +18 -85
- package/fesm2022/scion-components-sashbox.mjs.map +1 -1
- package/fesm2022/scion-components-splitter.mjs +6 -44
- package/fesm2022/scion-components-splitter.mjs.map +1 -1
- package/fesm2022/scion-components-throbber.mjs +17 -48
- package/fesm2022/scion-components-throbber.mjs.map +1 -1
- package/fesm2022/scion-components-viewport.mjs +16 -57
- package/fesm2022/scion-components-viewport.mjs.map +1 -1
- package/index.d.ts +2 -5
- package/package.json +6 -5
- package/sashbox/index.d.ts +169 -3
- package/splitter/index.d.ts +101 -3
- package/throbber/index.d.ts +45 -3
- package/viewport/index.d.ts +316 -3
- package/dimension/bounding-client-rect.signal.d.ts +0 -23
- package/dimension/dimension.d.ts +0 -10
- package/dimension/dimension.directive.d.ts +0 -25
- package/dimension/dimension.module.d.ts +0 -14
- package/dimension/dimension.signal.d.ts +0 -19
- package/dimension/public_api.d.ts +0 -5
- package/public-api.d.ts +0 -4
- package/sashbox/element-ref.directive.d.ts +0 -9
- package/sashbox/public_api.d.ts +0 -3
- package/sashbox/sash/sash.component.d.ts +0 -31
- package/sashbox/sash.directive.d.ts +0 -70
- package/sashbox/sashbox-accessor.d.ts +0 -10
- package/sashbox/sashbox.component.d.ts +0 -110
- package/sashbox/sashbox.module.d.ts +0 -31
- package/splitter/public_api.d.ts +0 -2
- package/splitter/splitter.component.d.ts +0 -99
- package/splitter/splitter.module.d.ts +0 -18
- package/throbber/ellipsis-throbber/ellipsis-throbber.component.d.ts +0 -10
- package/throbber/public_api.d.ts +0 -2
- package/throbber/ripple-throbber/ripple-throbber.component.d.ts +0 -10
- package/throbber/roller-throbber/roller-throbber.component.d.ts +0 -10
- package/throbber/spinner-throbber/spinner-throbber.component.d.ts +0 -11
- package/throbber/throbber.component.d.ts +0 -44
- package/throbber/throbber.module.d.ts +0 -12
- package/viewport/native-scrollbar-track-size-provider.service.d.ts +0 -30
- package/viewport/public_api.d.ts +0 -4
- package/viewport/scrollable.directive.d.ts +0 -38
- package/viewport/scrollbar/scrollbar.component.d.ts +0 -86
- package/viewport/viewport.component.d.ts +0 -162
- package/viewport/viewport.module.d.ts +0 -14
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
/**
|
|
3
|
-
* Makes the host element natively scrollable and hides native scrollbars by default, unless native scrollbars
|
|
4
|
-
* already sit on top of the viewport (e.g. in OS X).
|
|
5
|
-
*
|
|
6
|
-
* Because there is no cross-browser API to hide scrollbars without losing native scroll support, we set 'overflow'
|
|
7
|
-
* to 'scroll' but shift the native scrollbars out of the visible viewport area. The shift offset is computed upfront.
|
|
8
|
-
*
|
|
9
|
-
* This directive expects its host element to be the only child in document flow in its parent DOM element. It makes the host element
|
|
10
|
-
* fill up the entire space (width and height set to 100%). The parent element must have its CSS `overflow` property set to `hidden`
|
|
11
|
-
* to hide the pushed out native scrollbars.
|
|
12
|
-
*/
|
|
13
|
-
export declare class SciScrollableDirective {
|
|
14
|
-
/**
|
|
15
|
-
* Controls whether to display native scrollbars.
|
|
16
|
-
* Has no effect if the native scrollbar sits on top of the content, e.g. in OS X.
|
|
17
|
-
*/
|
|
18
|
-
readonly displayNativeScrollbar: import("@angular/core").InputSignal<boolean>;
|
|
19
|
-
private readonly _host;
|
|
20
|
-
private readonly _renderer;
|
|
21
|
-
private readonly _nativeScrollbarTrackSizeProvider;
|
|
22
|
-
constructor();
|
|
23
|
-
/**
|
|
24
|
-
* Controls the display of the native scrollbar based on this directive's configuration.
|
|
25
|
-
*/
|
|
26
|
-
private controlDisplayOfNativeScrollbar;
|
|
27
|
-
/**
|
|
28
|
-
* Uses the native scrollbars when content overflows.
|
|
29
|
-
*/
|
|
30
|
-
private useNativeScrollbars;
|
|
31
|
-
/**
|
|
32
|
-
* Shifts the native scrollbars out of the visible viewport area.
|
|
33
|
-
*/
|
|
34
|
-
private shiftNativeScrollbars;
|
|
35
|
-
private setStyle;
|
|
36
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SciScrollableDirective, never>;
|
|
37
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<SciScrollableDirective, "[sciScrollable]", never, { "displayNativeScrollbar": { "alias": "sciScrollableDisplayNativeScrollbar"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
38
|
-
}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
/**
|
|
3
|
-
* Renders a vertical or horizontal scrollbar.
|
|
4
|
-
*
|
|
5
|
-
* The scrollbar features the following functionality:
|
|
6
|
-
* - allows to move the thumb by mouse or touch
|
|
7
|
-
* - enlarges the thumb if the mouse pointer is near the thumb
|
|
8
|
-
* - allows paging on mousedown on the scroll track
|
|
9
|
-
*
|
|
10
|
-
* ### Styling:
|
|
11
|
-
*
|
|
12
|
-
* To customize the default look of SCION components or support different themes, configure the `@scion/components` SCSS module in `styles.scss`.
|
|
13
|
-
* To style a specific `sci-scrollbar` component, the following CSS variables can be set directly on the component.
|
|
14
|
-
*
|
|
15
|
-
* - sci-scrollbar-color: Sets the color of the scrollbar.
|
|
16
|
-
*
|
|
17
|
-
* Example:
|
|
18
|
-
*
|
|
19
|
-
* ```css
|
|
20
|
-
*
|
|
21
|
-
* sci-scrollbar {
|
|
22
|
-
* --sci-scrollbar-color: blue;
|
|
23
|
-
* }
|
|
24
|
-
* ```
|
|
25
|
-
*/
|
|
26
|
-
export declare class SciScrollbarComponent {
|
|
27
|
-
/**
|
|
28
|
-
* Specifies the direction of the scrollbar. Defaults to a vertical scrollbar.
|
|
29
|
-
*/
|
|
30
|
-
readonly direction: import("@angular/core").InputSignal<"vscroll" | "hscroll">;
|
|
31
|
-
/**
|
|
32
|
-
* The viewport to provide scrollbars for.
|
|
33
|
-
*/
|
|
34
|
-
readonly viewport: import("@angular/core").InputSignal<HTMLElement>;
|
|
35
|
-
private readonly _host;
|
|
36
|
-
private readonly _document;
|
|
37
|
-
private readonly _zone;
|
|
38
|
-
private readonly _destroyRef;
|
|
39
|
-
private readonly _thumbElement;
|
|
40
|
-
private readonly _vertical;
|
|
41
|
-
private _lastDragPosition;
|
|
42
|
-
private _overflow;
|
|
43
|
-
private _thumbSizeFr;
|
|
44
|
-
private _thumbPositionFr;
|
|
45
|
-
protected get vertical(): boolean;
|
|
46
|
-
protected get horizontal(): boolean;
|
|
47
|
-
protected get scrolling(): boolean;
|
|
48
|
-
constructor();
|
|
49
|
-
/**
|
|
50
|
-
* Computes the scroll position and updates CSS variables to render the scroll position in the UI.
|
|
51
|
-
*/
|
|
52
|
-
private renderScrollPosition;
|
|
53
|
-
protected onTouchStart(event: TouchEvent): void;
|
|
54
|
-
protected onTouchMove(event: TouchEvent): void;
|
|
55
|
-
protected onTouchEnd(event: TouchEvent): void;
|
|
56
|
-
protected onMouseDown(mousedownEvent: MouseEvent): void;
|
|
57
|
-
protected onScrollTrackMouseDown(event: MouseEvent, direction: 'up' | 'down'): void;
|
|
58
|
-
/**
|
|
59
|
-
* Renders the current scroll position when the viewport is scrolled.
|
|
60
|
-
*/
|
|
61
|
-
private installScrollPositionRenderer;
|
|
62
|
-
/**
|
|
63
|
-
* Projects the given scrollbar scroll pixels into viewport scroll pixels.
|
|
64
|
-
*/
|
|
65
|
-
private toViewportPanPx;
|
|
66
|
-
/**
|
|
67
|
-
* Moves the viewport client by the specified numbers of pixels.
|
|
68
|
-
*/
|
|
69
|
-
private moveViewportClient;
|
|
70
|
-
/**
|
|
71
|
-
* Indicates if the content overflows.
|
|
72
|
-
*/
|
|
73
|
-
get overflow(): boolean;
|
|
74
|
-
/**
|
|
75
|
-
* Scrolls continuously while holding the mouse pressed, or until the mouse leaves the scrolltrack.
|
|
76
|
-
*/
|
|
77
|
-
private scrollWhileMouseDown;
|
|
78
|
-
private setCssVariable;
|
|
79
|
-
private get viewportSize();
|
|
80
|
-
private get viewportClientSize();
|
|
81
|
-
private get scrollPosition();
|
|
82
|
-
private get thumbSize();
|
|
83
|
-
private get trackSize();
|
|
84
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SciScrollbarComponent, never>;
|
|
85
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SciScrollbarComponent, "sci-scrollbar", never, { "direction": { "alias": "direction"; "required": false; "isSignal": true; }; "viewport": { "alias": "viewport"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
86
|
-
}
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
import { ElementRef } from '@angular/core';
|
|
2
|
-
import { SciNativeScrollbarTrackSizeProvider } from './native-scrollbar-track-size-provider.service';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
/**
|
|
5
|
-
* Represents a viewport with slotted content (`<ng-content>`) used as scrollable content. By default, content is added to a CSS grid layout.
|
|
6
|
-
*
|
|
7
|
-
* The viewport component displays scrollbars when its content overflows. Scrollbars are displayed on top of the content, not next to it.
|
|
8
|
-
* The component uses the native scrollbars of the operating system if they are already sitting on top, or falls back and renders scrollbars on top otherwise.
|
|
9
|
-
* The viewport remains natively scrollable with the native scrollbars shifted out of the viewport's visible area. Consequently, the viewport keeps supporting
|
|
10
|
-
* native scrolling features such as touch gestures, scroll speed acceleration, or scrolling near the viewport edges during drag-and-drop operations.
|
|
11
|
-
*
|
|
12
|
-
* ```html
|
|
13
|
-
* <sci-viewport>
|
|
14
|
-
* your content
|
|
15
|
-
* </sci-viewport>
|
|
16
|
-
* ```
|
|
17
|
-
*
|
|
18
|
-
* ## Adding the viewport to a layout
|
|
19
|
-
*
|
|
20
|
-
* Typically, you would add the viewport component to a flexible layout, filling the remaining space vertically and horizontally, such as a flexbox container
|
|
21
|
-
* with the viewport's `flex` CSS property set to either `flex: auto` or `flex: 1 1 0`.
|
|
22
|
-
*
|
|
23
|
-
* The viewport is sized according to its content width and height. It grows to absorb any free space, thus overflowing its content only when encountering
|
|
24
|
-
* a layout constraint. Depending on the layout, different steps may be necessary to prevent the viewport from growing to infinity.
|
|
25
|
-
*
|
|
26
|
-
* - If practical, give the viewport a fixed size or a maximum size.
|
|
27
|
-
* - If you add the viewport to a flexbox layout, make sure that it cannot exceed the available space. Instead, the viewport should fill the remaining space,
|
|
28
|
-
* vertically and horizontally. Be aware that, by default, a flex item does not shrink below its minimum content size. To change this, set the viewport's
|
|
29
|
-
* `flex-basis` to `0` (instead of `auto`), or use the CSS shorthand property `flex: 1 1 0`. The `flex-basis` defines the default size of a flex item before
|
|
30
|
-
* the remaining extra space is distributed. If the viewport does not appear after setting this property, check its parent elements' content sizes.
|
|
31
|
-
* As an alternative to setting `flex: 1 1 0`, change the setting to `flex: auto` and hide the overflow in the parent element, as follows: `overflow: hidden`.
|
|
32
|
-
* Another approach would be to set the minimum height of all parents to `0`, as follows: `min-height: 0`.
|
|
33
|
-
*
|
|
34
|
-
* For the complete documentation on the flex layout and its features, refer to https://developer.mozilla.org/en-US/docs/Web/CSS/flex.
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* ## Layouting the viewport's slotted content
|
|
38
|
-
*
|
|
39
|
-
* By default, the viewport's content is added to a CSS grid container with a single column, filling remaining space vertically and horizontally.
|
|
40
|
-
* Using the `::part(content)` pseudo element selector, you can configure the grid container or apply a different layout, such as a flex or flow layout.
|
|
41
|
-
*
|
|
42
|
-
* #### Example of adding slotted content to a CSS flex container
|
|
43
|
-
* ```css
|
|
44
|
-
* sci-viewport::part(content) {
|
|
45
|
-
* display: flex;
|
|
46
|
-
* flex-direction: column;
|
|
47
|
-
* }
|
|
48
|
-
* ```
|
|
49
|
-
*
|
|
50
|
-
* #### Example of configuring CSS grid container with two columns
|
|
51
|
-
* ```css
|
|
52
|
-
* sci-viewport::part(content) {
|
|
53
|
-
* grid-template-columns: 1fr 1fr;
|
|
54
|
-
* gap: 1em;
|
|
55
|
-
* }
|
|
56
|
-
* ```
|
|
57
|
-
*
|
|
58
|
-
* ## Styling
|
|
59
|
-
*
|
|
60
|
-
* To customize the default look of SCION components or support different themes, configure the `@scion/components` SCSS module in `styles.scss`.
|
|
61
|
-
* To style a specific `sci-viewport` component, the following CSS variables can be set directly on the component.
|
|
62
|
-
*
|
|
63
|
-
* - sci-viewport-scrollbar-color: Sets the color of the scrollbar.
|
|
64
|
-
*
|
|
65
|
-
* ```css
|
|
66
|
-
* sci-viewport {
|
|
67
|
-
* --sci-viewport-scrollbar-color: blue;
|
|
68
|
-
* }
|
|
69
|
-
* ```
|
|
70
|
-
*/
|
|
71
|
-
export declare class SciViewportComponent {
|
|
72
|
-
/**
|
|
73
|
-
* Controls if to use the native scrollbar or a scrollbar that sits on top of the viewport. Defaults to `on-top`.
|
|
74
|
-
*/
|
|
75
|
-
readonly scrollbarStyle: import("@angular/core").InputSignal<ScrollbarStyle>;
|
|
76
|
-
/**
|
|
77
|
-
* Emits when the viewport is scrolled. The event is emitted outside the Angular zone to avoid unnecessary change detection cycles.
|
|
78
|
-
*/
|
|
79
|
-
readonly scroll: import("@angular/core").OutputEmitterRef<Event>;
|
|
80
|
-
private readonly _host;
|
|
81
|
-
private readonly _viewport;
|
|
82
|
-
private readonly _viewportClient;
|
|
83
|
-
protected readonly nativeScrollbarTrackSizeProvider: SciNativeScrollbarTrackSizeProvider;
|
|
84
|
-
constructor();
|
|
85
|
-
focus(): void;
|
|
86
|
-
/**
|
|
87
|
-
* Returns the number of pixels that the viewport client is scrolled vertically.
|
|
88
|
-
*
|
|
89
|
-
* @see Element.scrollTop
|
|
90
|
-
*/
|
|
91
|
-
get scrollTop(): number;
|
|
92
|
-
/**
|
|
93
|
-
* Sets the number of pixels that the viewport client is scrolled vertically.
|
|
94
|
-
*
|
|
95
|
-
* @see Element.scrollTop
|
|
96
|
-
*/
|
|
97
|
-
set scrollTop(scrollTop: number);
|
|
98
|
-
/**
|
|
99
|
-
* Returns the number of pixels that the viewport client is scrolled horizontally.
|
|
100
|
-
*
|
|
101
|
-
* @see Element.scrollLeft
|
|
102
|
-
*/
|
|
103
|
-
get scrollLeft(): number;
|
|
104
|
-
/**
|
|
105
|
-
* Sets the number of pixels that the viewport client is scrolled horizontally.
|
|
106
|
-
*
|
|
107
|
-
* @see Element.scrollLeft
|
|
108
|
-
*/
|
|
109
|
-
set scrollLeft(scrollLeft: number);
|
|
110
|
-
/**
|
|
111
|
-
* Returns the height of the viewport client.
|
|
112
|
-
*
|
|
113
|
-
* @see Element.scrollHeight
|
|
114
|
-
*/
|
|
115
|
-
get scrollHeight(): number;
|
|
116
|
-
/**
|
|
117
|
-
* Returns the width of the viewport client.
|
|
118
|
-
*
|
|
119
|
-
* @see Element.scrollWidth
|
|
120
|
-
*/
|
|
121
|
-
get scrollWidth(): number;
|
|
122
|
-
/**
|
|
123
|
-
* Returns the viewport {HTMLElement}.
|
|
124
|
-
*/
|
|
125
|
-
get viewportElement(): HTMLElement;
|
|
126
|
-
/**
|
|
127
|
-
* Returns the viewport client {HTMLElement}.
|
|
128
|
-
*/
|
|
129
|
-
get viewportClientElement(): HTMLElement;
|
|
130
|
-
/**
|
|
131
|
-
* Checks if the specified element is scrolled into the viewport.
|
|
132
|
-
*
|
|
133
|
-
* @param element - the element to be checked
|
|
134
|
-
* @param fit - control if the element must fully or partially fit into the viewport
|
|
135
|
-
* @return `true` if the element is scrolled into the viewport, or `false` otherwise.
|
|
136
|
-
*/
|
|
137
|
-
isElementInView(element: ElementRef<HTMLElement> | HTMLElement, fit: 'full' | 'partial'): boolean;
|
|
138
|
-
/**
|
|
139
|
-
* Scrolls the specified element into the viewport.
|
|
140
|
-
*
|
|
141
|
-
* @param element - the element to scroll into the viewport
|
|
142
|
-
* @param offset - the gap between the element and the viewport
|
|
143
|
-
*/
|
|
144
|
-
scrollIntoView(element: ElementRef<HTMLElement> | HTMLElement, offset?: number): void;
|
|
145
|
-
/**
|
|
146
|
-
* Computes the distance of the element to the viewport's left or top border.
|
|
147
|
-
*
|
|
148
|
-
* @return distance of the element to the viewport's left or top border, or `null` if not contained
|
|
149
|
-
* in the viewport or the element or any ancestor has the `display` property set to `none`.
|
|
150
|
-
*/
|
|
151
|
-
computeOffset(element: ElementRef<HTMLElement> | HTMLElement, border: 'left' | 'top'): number | null;
|
|
152
|
-
/**
|
|
153
|
-
* Emits when the scroll position changes.
|
|
154
|
-
*/
|
|
155
|
-
private installScrollEmitter;
|
|
156
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SciViewportComponent, never>;
|
|
157
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SciViewportComponent, "sci-viewport", never, { "scrollbarStyle": { "alias": "scrollbarStyle"; "required": false; "isSignal": true; }; }, { "scroll": "scroll"; }, never, never, true, never>;
|
|
158
|
-
}
|
|
159
|
-
/**
|
|
160
|
-
* Represents a scrollbar style.
|
|
161
|
-
*/
|
|
162
|
-
export type ScrollbarStyle = 'native' | 'on-top' | 'hidden';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./viewport.component";
|
|
3
|
-
import * as i2 from "./scrollbar/scrollbar.component";
|
|
4
|
-
import * as i3 from "./scrollable.directive";
|
|
5
|
-
/**
|
|
6
|
-
* Provides a viewport component with scrollbars that sit on top of the viewport client.
|
|
7
|
-
*
|
|
8
|
-
* @deprecated since version 19.0.0; Import standalone components and directive instead; API will be removed in a future release.
|
|
9
|
-
*/
|
|
10
|
-
export declare class SciViewportModule {
|
|
11
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SciViewportModule, never>;
|
|
12
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<SciViewportModule, never, [typeof i1.SciViewportComponent, typeof i2.SciScrollbarComponent, typeof i3.SciScrollableDirective], [typeof i1.SciViewportComponent, typeof i2.SciScrollbarComponent, typeof i3.SciScrollableDirective]>;
|
|
13
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<SciViewportModule>;
|
|
14
|
-
}
|