@basis-ng/primitives 0.0.1-alpha.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/core/components/alert/alert.component.d.ts +20 -0
- package/core/components/attached-box/attached-box.component.d.ts +125 -0
- package/core/components/attached-box/types/alignment.type.d.ts +1 -0
- package/core/components/attached-box/types/direction.type.d.ts +1 -0
- package/core/components/attached-box/types/position.type.d.ts +1 -0
- package/core/components/badge/badge.component.d.ts +9 -0
- package/core/components/bottom-sheet/bottom-sheet.component.d.ts +60 -0
- package/core/components/button/button.component.d.ts +17 -0
- package/core/components/button-group/button-group.component.d.ts +9 -0
- package/core/components/checkbox/checkbox.component.d.ts +26 -0
- package/core/components/color-picker/color-picker.component.d.ts +61 -0
- package/core/components/icon/icon.component.d.ts +29 -0
- package/core/components/input/input.component.d.ts +78 -0
- package/core/components/input-group/input-group.component.d.ts +13 -0
- package/core/components/menu/menu.component.d.ts +14 -0
- package/core/components/menu/shared/components/menu-item/menu-item.component.d.ts +9 -0
- package/core/components/menu/shared/components/menu-item-checkbox/menu-item-checkbox.component.d.ts +9 -0
- package/core/components/menu/shared/components/menu-item-radio/menu-item-radio.component.d.ts +9 -0
- package/core/components/menu/shared/components/menu-label/menu-label.component.d.ts +8 -0
- package/core/components/menu/shared/directives/menu-trigger.directive.d.ts +14 -0
- package/core/components/range/range.component.d.ts +26 -0
- package/core/components/search/search.component.d.ts +121 -0
- package/core/components/select/select.component.d.ts +48 -0
- package/core/components/side-sheet/side-sheet.component.d.ts +46 -0
- package/core/components/spinner/spinner.component.d.ts +9 -0
- package/core/components/switch/switch.component.d.ts +35 -0
- package/core/components/table/components/row/components/row-item/row-item.component.d.ts +12 -0
- package/core/components/table/components/row/row.component.d.ts +9 -0
- package/core/components/table/table.component.d.ts +5 -0
- package/core/components/tabs/components/tab/tab.component.d.ts +25 -0
- package/core/components/tabs/tabs.component.d.ts +60 -0
- package/core/components/textarea/textarea.component.d.ts +48 -0
- package/core/components/tooltip/tooltip.component.d.ts +36 -0
- package/core/components/tree/shared/components/tree-node/tree-node.component.d.ts +43 -0
- package/core/components/tree/tree.component.d.ts +56 -0
- package/core/directives/in-viewport.directive.d.ts +13 -0
- package/core/services/in-viewport.service.d.ts +23 -0
- package/core/services/responsive.service.d.ts +47 -0
- package/core/services/theme.service.d.ts +44 -0
- package/fesm2022/basis-ng-primitives.mjs +2415 -0
- package/fesm2022/basis-ng-primitives.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/package.json +26 -0
- package/public-api.d.ts +40 -0
- package/shared/components/label/label.component.d.ts +34 -0
- package/shared/components/option/option.component.d.ts +10 -0
- package/shared/directives/lazy-content.directive.d.ts +7 -0
- package/shared/services/utils.service.d.ts +16 -0
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { Option } from '../../../public-api';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class Search {
|
|
4
|
+
/**
|
|
5
|
+
* The label associated with the search component.
|
|
6
|
+
*/
|
|
7
|
+
readonly label: import("@angular/core").InputSignal<string | undefined>;
|
|
8
|
+
/**
|
|
9
|
+
* The maximum width of the search component.
|
|
10
|
+
*/
|
|
11
|
+
readonly maxWidth: import("@angular/core").InputSignal<string>;
|
|
12
|
+
/**
|
|
13
|
+
* The placeholder of the text field.
|
|
14
|
+
*/
|
|
15
|
+
readonly placeholder: import("@angular/core").InputSignal<string>;
|
|
16
|
+
/**
|
|
17
|
+
* Indicates whether the search component is searching.
|
|
18
|
+
*/
|
|
19
|
+
readonly searching: import("@angular/core").ModelSignal<boolean>;
|
|
20
|
+
/**
|
|
21
|
+
* Indicates whether the search component is in an invalid state.
|
|
22
|
+
*/
|
|
23
|
+
readonly invalid: import("@angular/core").ModelSignal<boolean>;
|
|
24
|
+
/**
|
|
25
|
+
* Indicates whether the search component is disabled.
|
|
26
|
+
*/
|
|
27
|
+
readonly disabled: import("@angular/core").ModelSignal<boolean>;
|
|
28
|
+
/**
|
|
29
|
+
* The value of the selected option.
|
|
30
|
+
*/
|
|
31
|
+
readonly selectedValue: import("@angular/core").ModelSignal<string | null>;
|
|
32
|
+
/**
|
|
33
|
+
* The search value.
|
|
34
|
+
*/
|
|
35
|
+
readonly searchValue: import("@angular/core").ModelSignal<string>;
|
|
36
|
+
/**
|
|
37
|
+
* Emits the value of the search component when the value changes.
|
|
38
|
+
*/
|
|
39
|
+
searchChange: import("@angular/core").OutputEmitterRef<string>;
|
|
40
|
+
/**
|
|
41
|
+
* Emits when the search component is focused.
|
|
42
|
+
*/
|
|
43
|
+
readonly focused: import("@angular/core").WritableSignal<boolean>;
|
|
44
|
+
/**
|
|
45
|
+
* Indicates whether the options dropdown is open.
|
|
46
|
+
*/
|
|
47
|
+
readonly isOpen: import("@angular/core").WritableSignal<boolean>;
|
|
48
|
+
/**
|
|
49
|
+
* The options available for selection.
|
|
50
|
+
*/
|
|
51
|
+
readonly options: import("@angular/core").Signal<readonly Option[]>;
|
|
52
|
+
/**
|
|
53
|
+
* Indicates whether the search component has no options.
|
|
54
|
+
*/
|
|
55
|
+
readonly noOptions: import("@angular/core").Signal<boolean>;
|
|
56
|
+
/**
|
|
57
|
+
* Reference to the select element within the component
|
|
58
|
+
* @private
|
|
59
|
+
*/
|
|
60
|
+
private readonly select;
|
|
61
|
+
/**
|
|
62
|
+
* Reference to the renderer
|
|
63
|
+
* @private
|
|
64
|
+
*/
|
|
65
|
+
private readonly renderer;
|
|
66
|
+
/**
|
|
67
|
+
* The icon name to display.
|
|
68
|
+
*/
|
|
69
|
+
readonly selectIconName: import("@angular/core").Signal<"LoaderCircle" | "X" | "ChevronDown">;
|
|
70
|
+
/**
|
|
71
|
+
* The icon size to display.
|
|
72
|
+
*/
|
|
73
|
+
readonly selectIconSize: import("@angular/core").Signal<20 | 17 | 18>;
|
|
74
|
+
/**
|
|
75
|
+
* The debounce time for the search input.
|
|
76
|
+
*/
|
|
77
|
+
readonly debounceTime: import("@angular/core").InputSignal<number>;
|
|
78
|
+
/**
|
|
79
|
+
* Reference to the UtilsService
|
|
80
|
+
* @private
|
|
81
|
+
*/
|
|
82
|
+
private readonly utilsService;
|
|
83
|
+
/**
|
|
84
|
+
* Initializes the search component.
|
|
85
|
+
*/
|
|
86
|
+
constructor();
|
|
87
|
+
/**
|
|
88
|
+
* Renders the options within the select element.
|
|
89
|
+
* @private
|
|
90
|
+
*/
|
|
91
|
+
private renderOptions;
|
|
92
|
+
/**
|
|
93
|
+
* Handles the change event of the input text.
|
|
94
|
+
*/
|
|
95
|
+
onInputValueChange(event: any): void;
|
|
96
|
+
/**
|
|
97
|
+
* Resets the search component.
|
|
98
|
+
*/
|
|
99
|
+
reset(): void;
|
|
100
|
+
/**
|
|
101
|
+
* Handles the selection change event from the native select element.
|
|
102
|
+
* @param event The selection change event.
|
|
103
|
+
*/
|
|
104
|
+
onSelectValueChange(event: Event): void;
|
|
105
|
+
/**
|
|
106
|
+
* Handles click events outside the select component to close the options dropdown.
|
|
107
|
+
* @param event The mouse click event.
|
|
108
|
+
*/
|
|
109
|
+
protected onOutsideClick(event: MouseEvent): void;
|
|
110
|
+
/**
|
|
111
|
+
* Handles keyboard events to open or close the options dropdown.
|
|
112
|
+
* @param event The keyboard event.
|
|
113
|
+
*/
|
|
114
|
+
onKeyDown(event: KeyboardEvent): void;
|
|
115
|
+
/**
|
|
116
|
+
* Handles the icon click event.
|
|
117
|
+
*/
|
|
118
|
+
handleIconClick(): void;
|
|
119
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Search, never>;
|
|
120
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Search, "r-search", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "maxWidth": { "alias": "maxWidth"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "searching": { "alias": "searching"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "selectedValue": { "alias": "selectedValue"; "required": false; "isSignal": true; }; "searchValue": { "alias": "searchValue"; "required": false; "isSignal": true; }; "debounceTime": { "alias": "debounceTime"; "required": false; "isSignal": true; }; }, { "searching": "searchingChange"; "invalid": "invalidChange"; "disabled": "disabledChange"; "selectedValue": "selectedValueChange"; "searchValue": "searchValueChange"; "searchChange": "searchChange"; }, ["options"], ["*"], true, never>;
|
|
121
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { AfterViewInit, ElementRef, Renderer2 } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class Select implements AfterViewInit {
|
|
4
|
+
/**
|
|
5
|
+
* The value of the input.
|
|
6
|
+
*/
|
|
7
|
+
readonly value: import("@angular/core").WritableSignal<string | null>;
|
|
8
|
+
/**
|
|
9
|
+
* Whether the input is invalid.
|
|
10
|
+
*/
|
|
11
|
+
readonly invalid: import("@angular/core").ModelSignal<boolean>;
|
|
12
|
+
/**
|
|
13
|
+
* Whether the input is disabled.
|
|
14
|
+
*/
|
|
15
|
+
readonly disabled: import("@angular/core").ModelSignal<boolean>;
|
|
16
|
+
/**
|
|
17
|
+
* The maximum width of the input.
|
|
18
|
+
*/
|
|
19
|
+
readonly maxWidth: import("@angular/core").InputSignal<string>;
|
|
20
|
+
/**
|
|
21
|
+
* Event emitted when the value changes.
|
|
22
|
+
*/
|
|
23
|
+
valueChange: import("@angular/core").OutputEmitterRef<string | null>;
|
|
24
|
+
/**
|
|
25
|
+
* Reference to the input element.
|
|
26
|
+
*/
|
|
27
|
+
readonly el: ElementRef<HTMLSelectElement>;
|
|
28
|
+
/**
|
|
29
|
+
* Indicates whether the options dropdown is open.
|
|
30
|
+
*/
|
|
31
|
+
readonly isOpen: import("@angular/core").WritableSignal<boolean>;
|
|
32
|
+
/**
|
|
33
|
+
* Reference to the renderer
|
|
34
|
+
* @private
|
|
35
|
+
*/
|
|
36
|
+
readonly renderer: Renderer2;
|
|
37
|
+
/**
|
|
38
|
+
* After the view has been initialized, set the value of the select.
|
|
39
|
+
*/
|
|
40
|
+
ngAfterViewInit(): void;
|
|
41
|
+
/**
|
|
42
|
+
* Handles the select change event.
|
|
43
|
+
* @param value - The value of the select.
|
|
44
|
+
*/
|
|
45
|
+
change(value: string): void;
|
|
46
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Select, never>;
|
|
47
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Select, "select[r-select]", never, { "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "maxWidth": { "alias": "maxWidth"; "required": false; "isSignal": true; }; }, { "invalid": "invalidChange"; "disabled": "disabledChange"; "valueChange": "valueChange"; }, never, ["*"], true, never>;
|
|
48
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* A sliding sheet component that can be positioned on either side of the screen.
|
|
4
|
+
* The sheet slides in from the left or right edge and includes an overlay backdrop.
|
|
5
|
+
*
|
|
6
|
+
* @selector r-side-sheet
|
|
7
|
+
*/
|
|
8
|
+
export declare class SideSheet {
|
|
9
|
+
/**
|
|
10
|
+
* Indicates whether the side sheet is open.
|
|
11
|
+
*/
|
|
12
|
+
readonly isOpen: import("@angular/core").ModelSignal<boolean>;
|
|
13
|
+
/**
|
|
14
|
+
* Specifies the side of the screen where the sheet is positioned.
|
|
15
|
+
* Can be either 'left' or 'right'.
|
|
16
|
+
*/
|
|
17
|
+
readonly side: import("@angular/core").InputSignal<"left" | "right">;
|
|
18
|
+
/**
|
|
19
|
+
* Specifies the width of the side sheet.
|
|
20
|
+
*/
|
|
21
|
+
readonly width: import("@angular/core").InputSignal<string>;
|
|
22
|
+
/**
|
|
23
|
+
* Computes whether the side sheet is positioned on the left side.
|
|
24
|
+
*/
|
|
25
|
+
readonly isLeft: import("@angular/core").Signal<boolean>;
|
|
26
|
+
/**
|
|
27
|
+
* Computes whether the side sheet is positioned on the right side.
|
|
28
|
+
*/
|
|
29
|
+
readonly isRight: import("@angular/core").Signal<boolean>;
|
|
30
|
+
/**
|
|
31
|
+
* Event emitted when the side sheet is closed.
|
|
32
|
+
*/
|
|
33
|
+
closeSheet: import("@angular/core").OutputEmitterRef<void>;
|
|
34
|
+
/**
|
|
35
|
+
* Reference to the host element of the side sheet.
|
|
36
|
+
*/
|
|
37
|
+
private readonly el;
|
|
38
|
+
/**
|
|
39
|
+
* Closes the side sheet when clicking outside of it.
|
|
40
|
+
*
|
|
41
|
+
* @param event - The click event.
|
|
42
|
+
*/
|
|
43
|
+
closeOnOutsideClick(event: Event): void;
|
|
44
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SideSheet, never>;
|
|
45
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SideSheet, "r-side-sheet", never, { "isOpen": { "alias": "isOpen"; "required": false; "isSignal": true; }; "side": { "alias": "side"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; }, { "isOpen": "isOpenChange"; "closeSheet": "closeSheet"; }, never, ["*"], true, never>;
|
|
46
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class Spinner {
|
|
3
|
+
readonly active: import("@angular/core").InputSignal<boolean>;
|
|
4
|
+
readonly color: import("@angular/core").InputSignal<string>;
|
|
5
|
+
readonly backgroundColor: import("@angular/core").InputSignal<string>;
|
|
6
|
+
readonly size: import("@angular/core").InputSignal<number>;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Spinner, never>;
|
|
8
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Spinner, "r-spinner", never, { "active": { "alias": "active"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "backgroundColor": { "alias": "backgroundColor"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { AfterViewInit, ElementRef } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class Switch implements AfterViewInit {
|
|
4
|
+
/**
|
|
5
|
+
* Value of the switch.
|
|
6
|
+
*/
|
|
7
|
+
readonly value: import("@angular/core").ModelSignal<boolean>;
|
|
8
|
+
/**
|
|
9
|
+
* The size of the switch.
|
|
10
|
+
*/
|
|
11
|
+
readonly size: import("@angular/core").InputSignal<"default" | "large">;
|
|
12
|
+
/**
|
|
13
|
+
* Reference to the switch element.
|
|
14
|
+
*/
|
|
15
|
+
el: ElementRef<any>;
|
|
16
|
+
/**
|
|
17
|
+
* Event emitted when the value changes.
|
|
18
|
+
*/
|
|
19
|
+
valueChange: import("@angular/core").OutputEmitterRef<boolean>;
|
|
20
|
+
/**
|
|
21
|
+
* Initializes the switch value after the view is initialized.
|
|
22
|
+
*/
|
|
23
|
+
ngAfterViewInit(): void;
|
|
24
|
+
/**
|
|
25
|
+
* Toggles the value of the switch.
|
|
26
|
+
*/
|
|
27
|
+
toggleValue(): void;
|
|
28
|
+
/**
|
|
29
|
+
* Sets the value of the switch.
|
|
30
|
+
* @param newValue - The new value to set.
|
|
31
|
+
*/
|
|
32
|
+
setValue(newValue: boolean): void;
|
|
33
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Switch, never>;
|
|
34
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Switch, "input[r-switch]", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "valueChange": "valueChange"; }, never, never, true, never>;
|
|
35
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class RowItem {
|
|
3
|
+
readonly widthPx: import("@angular/core").InputSignal<number | undefined>;
|
|
4
|
+
readonly alignedLeft: import("@angular/core").InputSignal<boolean>;
|
|
5
|
+
readonly isHeader: import("@angular/core").InputSignal<boolean>;
|
|
6
|
+
readonly style: import("@angular/core").Signal<{
|
|
7
|
+
width: string;
|
|
8
|
+
justifyContent: string;
|
|
9
|
+
}>;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RowItem, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RowItem, "r-row-item", never, { "widthPx": { "alias": "widthPx"; "required": false; "isSignal": true; }; "alignedLeft": { "alias": "alignedLeft"; "required": false; "isSignal": true; }; "isHeader": { "alias": "isHeader"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class Row {
|
|
3
|
+
readonly header: import("@angular/core").InputSignal<boolean>;
|
|
4
|
+
readonly subheader: import("@angular/core").InputSignal<boolean>;
|
|
5
|
+
readonly clickable: import("@angular/core").InputSignal<boolean>;
|
|
6
|
+
readonly highlighted: import("@angular/core").InputSignal<boolean>;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Row, never>;
|
|
8
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Row, "r-row", never, { "header": { "alias": "header"; "required": false; "isSignal": true; }; "subheader": { "alias": "subheader"; "required": false; "isSignal": true; }; "clickable": { "alias": "clickable"; "required": false; "isSignal": true; }; "highlighted": { "alias": "highlighted"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class Tab {
|
|
4
|
+
el: ElementRef;
|
|
5
|
+
readonly value: import("@angular/core").InputSignal<string>;
|
|
6
|
+
readonly disabled: import("@angular/core").InputSignal<boolean>;
|
|
7
|
+
readonly selected: import("@angular/core").WritableSignal<boolean>;
|
|
8
|
+
readonly highlighted: import("@angular/core").WritableSignal<boolean>;
|
|
9
|
+
selectEmitter: import("@angular/core").OutputEmitterRef<Tab>;
|
|
10
|
+
constructor(el: ElementRef);
|
|
11
|
+
/**
|
|
12
|
+
* Emit the select event when the tab is selected.
|
|
13
|
+
*/
|
|
14
|
+
onSelect(): void;
|
|
15
|
+
/**
|
|
16
|
+
* Highlight the tab on mouse enter if it is not disabled and not in keyboard-active mode.
|
|
17
|
+
*/
|
|
18
|
+
onMouseEnter(): void;
|
|
19
|
+
/**
|
|
20
|
+
* Remove the highlight from the tab on mouse leave if it is not disabled and not in keyboard-active mode.
|
|
21
|
+
*/
|
|
22
|
+
onMouseLeave(): void;
|
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Tab, never>;
|
|
24
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Tab, "r-tab", never, { "value": { "alias": "value"; "required": true; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "selectEmitter": "selectEmitter"; }, never, ["*"], true, never>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Tab } from './components/tab/tab.component';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class Tabs {
|
|
4
|
+
readonly tabs: import("@angular/core").Signal<readonly Tab[]>;
|
|
5
|
+
readonly selectedIndex: import("@angular/core").WritableSignal<number>;
|
|
6
|
+
readonly selectedValue: import("@angular/core").ModelSignal<string | null>;
|
|
7
|
+
readonly highlightedIndex: import("@angular/core").WritableSignal<number>;
|
|
8
|
+
changesEmitter: import("@angular/core").OutputEmitterRef<string>;
|
|
9
|
+
lastSelectedValue: string | null;
|
|
10
|
+
constructor();
|
|
11
|
+
/**
|
|
12
|
+
* Handle the selection of a tab.
|
|
13
|
+
*/
|
|
14
|
+
handleTabSelection(): void;
|
|
15
|
+
/**
|
|
16
|
+
* Select a tab.
|
|
17
|
+
* @param {Tab} tab - The tab to select.
|
|
18
|
+
* @param {number} index - The index of the tab.
|
|
19
|
+
*/
|
|
20
|
+
selectTab(tab: Tab, index: number): void;
|
|
21
|
+
/**
|
|
22
|
+
* Highlight a tab.
|
|
23
|
+
* @param {number} index - The index of the tab to highlight.
|
|
24
|
+
*/
|
|
25
|
+
highlightTab(index: number): void;
|
|
26
|
+
/**
|
|
27
|
+
* Handle the states of the tabs.
|
|
28
|
+
*/
|
|
29
|
+
handleTabStates(): void;
|
|
30
|
+
/**
|
|
31
|
+
* Handle the external selected value.
|
|
32
|
+
*/
|
|
33
|
+
handleExternalSelectedValue(): void;
|
|
34
|
+
/**
|
|
35
|
+
* Scroll to the selected tab.
|
|
36
|
+
*/
|
|
37
|
+
handleScrollToSelectedTab(): void;
|
|
38
|
+
/**
|
|
39
|
+
* Handle keyboard events for navigation and selection.
|
|
40
|
+
* @param {KeyboardEvent} event - The keyboard event.
|
|
41
|
+
*/
|
|
42
|
+
handleKeyboard(event: KeyboardEvent): void;
|
|
43
|
+
/**
|
|
44
|
+
* Focus on the next or previous tab.
|
|
45
|
+
* @param {'next' | 'previous'} direction - The direction to move the focus.
|
|
46
|
+
*/
|
|
47
|
+
focusOption(direction: 'next' | 'previous'): void;
|
|
48
|
+
/**
|
|
49
|
+
* Select the currently focused tab.
|
|
50
|
+
*/
|
|
51
|
+
selectFocusedTab(): void;
|
|
52
|
+
/**
|
|
53
|
+
* Scroll to a specific tab.
|
|
54
|
+
* @param {number} index - The index of the tab to scroll to.
|
|
55
|
+
* @param {string} behavior - The scroll behavior ('instant' or 'smooth').
|
|
56
|
+
*/
|
|
57
|
+
scrollToTab(index: number, behavior: string): void;
|
|
58
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Tabs, never>;
|
|
59
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Tabs, "r-tabs", never, { "selectedValue": { "alias": "selectedValue"; "required": false; "isSignal": true; }; }, { "selectedValue": "selectedValueChange"; "changesEmitter": "changesEmitter"; }, ["tabs"], ["*"], true, never>;
|
|
60
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ElementRef } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class Textarea {
|
|
4
|
+
/**
|
|
5
|
+
* The placeholder text for the textarea.
|
|
6
|
+
*/
|
|
7
|
+
readonly placeholder: import("@angular/core").InputSignal<string>;
|
|
8
|
+
/**
|
|
9
|
+
* The value of the textarea.
|
|
10
|
+
*/
|
|
11
|
+
readonly value: import("@angular/core").WritableSignal<string | null>;
|
|
12
|
+
/**
|
|
13
|
+
* The number of rows for the textarea.
|
|
14
|
+
*/
|
|
15
|
+
readonly rows: import("@angular/core").InputSignal<number>;
|
|
16
|
+
/**
|
|
17
|
+
* The number of columns for the textarea.
|
|
18
|
+
*/
|
|
19
|
+
readonly cols: import("@angular/core").InputSignal<number>;
|
|
20
|
+
/**
|
|
21
|
+
* Whether the textarea is invalid.
|
|
22
|
+
*/
|
|
23
|
+
readonly invalid: import("@angular/core").ModelSignal<boolean>;
|
|
24
|
+
/**
|
|
25
|
+
* Whether the textarea is disabled.
|
|
26
|
+
*/
|
|
27
|
+
readonly disabled: import("@angular/core").ModelSignal<boolean>;
|
|
28
|
+
/**
|
|
29
|
+
* Whether the textarea is focused.
|
|
30
|
+
* This will be used by the Label component.
|
|
31
|
+
*/
|
|
32
|
+
readonly focused: import("@angular/core").WritableSignal<boolean>;
|
|
33
|
+
/**
|
|
34
|
+
* Event emitted when the value changes.
|
|
35
|
+
*/
|
|
36
|
+
valueChange: import("@angular/core").OutputEmitterRef<string | null>;
|
|
37
|
+
/**
|
|
38
|
+
* Reference to the textarea element.
|
|
39
|
+
*/
|
|
40
|
+
readonly el: ElementRef<HTMLTextAreaElement>;
|
|
41
|
+
/**
|
|
42
|
+
* Handles the input event.
|
|
43
|
+
* @param event The input event.
|
|
44
|
+
*/
|
|
45
|
+
onInput(event: Event): void;
|
|
46
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Textarea, never>;
|
|
47
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Textarea, "textarea[r-textarea]", never, { "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "rows": { "alias": "rows"; "required": false; "isSignal": true; }; "cols": { "alias": "cols"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "invalid": "invalidChange"; "disabled": "disabledChange"; "valueChange": "valueChange"; }, never, never, true, never>;
|
|
48
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Position } from '../attached-box/types/position.type';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* TooltipComponent is a reusable UI component that displays a tooltip
|
|
5
|
+
* with customizable position, gap, variant, and size.
|
|
6
|
+
*/
|
|
7
|
+
export declare class TooltipComponent {
|
|
8
|
+
/**
|
|
9
|
+
* The position of the tooltip relative to its trigger element.
|
|
10
|
+
* Defaults to 'top-center'.
|
|
11
|
+
*/
|
|
12
|
+
readonly position: import("@angular/core").InputSignal<Position>;
|
|
13
|
+
/**
|
|
14
|
+
* The gap (in pixels) between the tooltip and its trigger element.
|
|
15
|
+
* Defaults to 8.
|
|
16
|
+
*/
|
|
17
|
+
readonly gap: import("@angular/core").InputSignal<number>;
|
|
18
|
+
/**
|
|
19
|
+
* The visual variant of the tooltip. Options include:
|
|
20
|
+
* - 'primary'
|
|
21
|
+
* - 'secondary'
|
|
22
|
+
* - 'ghost'
|
|
23
|
+
* - 'outlined'
|
|
24
|
+
* Defaults to 'primary'.
|
|
25
|
+
*/
|
|
26
|
+
readonly variant: import("@angular/core").InputSignal<"primary" | "secondary" | "ghost" | "outlined">;
|
|
27
|
+
/**
|
|
28
|
+
* The size of the tooltip. Options include:
|
|
29
|
+
* - 'small'
|
|
30
|
+
* - 'default'
|
|
31
|
+
* Defaults to 'default'.
|
|
32
|
+
*/
|
|
33
|
+
readonly size: import("@angular/core").InputSignal<"small" | "default">;
|
|
34
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TooltipComponent, never>;
|
|
35
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TooltipComponent, "r-tooltip", never, { "position": { "alias": "position"; "required": false; "isSignal": true; }; "gap": { "alias": "gap"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, ["*", "[r-tooltip-content]"], true, never>;
|
|
36
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { CdkDrag } from '@angular/cdk/drag-drop';
|
|
2
|
+
import { OnInit } from '@angular/core';
|
|
3
|
+
import { Tree } from '../../../tree.component';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "@angular/cdk/drag-drop";
|
|
6
|
+
/**
|
|
7
|
+
* Represents a tree node component that can be extended, collapsed,
|
|
8
|
+
* and optionally supports drag-and-drop functionality.
|
|
9
|
+
*/
|
|
10
|
+
export declare class TreeNode implements OnInit {
|
|
11
|
+
/**
|
|
12
|
+
* Indicates whether the node is extended (expanded).
|
|
13
|
+
*/
|
|
14
|
+
readonly extended: import("@angular/core").ModelSignal<boolean>;
|
|
15
|
+
/**
|
|
16
|
+
* Reference to the `CdkDrag` directive for drag-and-drop functionality.
|
|
17
|
+
*/
|
|
18
|
+
protected node: CdkDrag<any>;
|
|
19
|
+
/**
|
|
20
|
+
* Reference to a nested `Tree` component, if present.
|
|
21
|
+
*/
|
|
22
|
+
readonly nestedTree: import("@angular/core").Signal<Tree | undefined>;
|
|
23
|
+
/**
|
|
24
|
+
* Emits an event when the node is closed.
|
|
25
|
+
*/
|
|
26
|
+
closeEmitter: import("@angular/core").OutputEmitterRef<void>;
|
|
27
|
+
/**
|
|
28
|
+
* Lifecycle hook that is called after the component is initialized.
|
|
29
|
+
*/
|
|
30
|
+
ngOnInit(): void;
|
|
31
|
+
/**
|
|
32
|
+
* Updates the disabled state of the node.
|
|
33
|
+
* @param disabled - Whether the node should be disabled.
|
|
34
|
+
*/
|
|
35
|
+
handleNodeDisability(disabled: boolean): void;
|
|
36
|
+
/**
|
|
37
|
+
* Toggles the extended (expanded) state of the node.
|
|
38
|
+
* Emits a close event if the node is collapsed and contains a nested tree.
|
|
39
|
+
*/
|
|
40
|
+
handleExtension(): void;
|
|
41
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TreeNode, never>;
|
|
42
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TreeNode, "r-tree-node", never, { "extended": { "alias": "extended"; "required": false; "isSignal": true; }; }, { "extended": "extendedChange"; "closeEmitter": "closeEmitter"; }, ["nestedTree"], ["*", "r-tree"], true, [{ directive: typeof i1.CdkDrag; inputs: { "cdkDragDisabled": "disabled"; }; outputs: {}; }]>;
|
|
43
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
2
|
+
import { OnInit } from '@angular/core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@angular/cdk/drag-drop";
|
|
5
|
+
/**
|
|
6
|
+
* Represents a tree component that supports drag-and-drop functionality
|
|
7
|
+
* and manages nested tree nodes.
|
|
8
|
+
*/
|
|
9
|
+
export declare class Tree implements OnInit {
|
|
10
|
+
/**
|
|
11
|
+
* The ID of the tree component.
|
|
12
|
+
*/
|
|
13
|
+
readonly maxWidth: import("@angular/core").InputSignal<string>;
|
|
14
|
+
/**
|
|
15
|
+
* Determines whether the tree is draggable.
|
|
16
|
+
*/
|
|
17
|
+
readonly draggable: import("@angular/core").InputSignal<boolean>;
|
|
18
|
+
/**
|
|
19
|
+
* Reference to the `CdkDropList` directive used for drag-and-drop.
|
|
20
|
+
*/
|
|
21
|
+
private tree;
|
|
22
|
+
/**
|
|
23
|
+
* Collection of nested `TreeNode` components.
|
|
24
|
+
*/
|
|
25
|
+
private readonly nestedNodes;
|
|
26
|
+
/**
|
|
27
|
+
* Determines whether to close nodes recursively.
|
|
28
|
+
*/
|
|
29
|
+
readonly closeRecursively: import("@angular/core").InputSignal<boolean>;
|
|
30
|
+
/**
|
|
31
|
+
* Emits an event when a drop occurs in the tree.
|
|
32
|
+
*/
|
|
33
|
+
dropEmitter: import("@angular/core").OutputEmitterRef<CdkDragDrop<string[], string[], any>>;
|
|
34
|
+
/**
|
|
35
|
+
* Initializes the `Tree` component and sets up reactive effects.
|
|
36
|
+
*/
|
|
37
|
+
constructor();
|
|
38
|
+
/**
|
|
39
|
+
* Lifecycle hook that is called after the component is initialized.
|
|
40
|
+
*/
|
|
41
|
+
ngOnInit(): void;
|
|
42
|
+
/**
|
|
43
|
+
* Updates the disabled state of the tree and its nested nodes.
|
|
44
|
+
*/
|
|
45
|
+
private handleTreeDisability;
|
|
46
|
+
/**
|
|
47
|
+
* Sets up recursive closing behavior for nested nodes.
|
|
48
|
+
*/
|
|
49
|
+
handleCloseRecursively(): void;
|
|
50
|
+
/**
|
|
51
|
+
* Closes all nested nodes recursively.
|
|
52
|
+
*/
|
|
53
|
+
closeNestedNodes(): void;
|
|
54
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Tree, never>;
|
|
55
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Tree, "r-tree", never, { "maxWidth": { "alias": "maxWidth"; "required": false; "isSignal": true; }; "draggable": { "alias": "draggable"; "required": false; "isSignal": true; }; "closeRecursively": { "alias": "closeRecursively"; "required": false; "isSignal": true; }; }, { "dropEmitter": "dropEmitter"; }, ["nestedNodes"], ["*"], true, [{ directive: typeof i1.CdkDropList; inputs: { "id": "id"; "cdkDropListConnectedTo": "connectedTo"; }; outputs: { "cdkDropListDropped": "cdkDropListDropped"; }; }, { directive: typeof i1.CdkDropListGroup; inputs: {}; outputs: {}; }]>;
|
|
56
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ElementRef, OnDestroy } from '@angular/core';
|
|
2
|
+
import { InViewportService } from '../services/in-viewport.service';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class InViewportDirective implements OnDestroy {
|
|
5
|
+
readonly inViewportId: import("@angular/core").InputSignal<string>;
|
|
6
|
+
readonly inViewportInitialVisibility: import("@angular/core").InputSignal<boolean>;
|
|
7
|
+
el: ElementRef<any>;
|
|
8
|
+
inViewportService: InViewportService;
|
|
9
|
+
constructor();
|
|
10
|
+
ngOnDestroy(): void;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InViewportDirective, never>;
|
|
12
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<InViewportDirective, "[r-in-viewport]", never, { "inViewportId": { "alias": "inViewportId"; "required": true; "isSignal": true; }; "inViewportInitialVisibility": { "alias": "inViewportInitialVisibility"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class InViewportService {
|
|
3
|
+
readonly elements: import("@angular/core").WritableSignal<Record<string, boolean>>;
|
|
4
|
+
observer: IntersectionObserver;
|
|
5
|
+
/**
|
|
6
|
+
* Register an element to be tracked by the service.
|
|
7
|
+
* @param {string} id - The id of the element to register.
|
|
8
|
+
*/
|
|
9
|
+
registerElement(id: string, nativeElement: HTMLElement, initialVisibility: boolean): void;
|
|
10
|
+
/**
|
|
11
|
+
* Unregister an element from being tracked by the service.
|
|
12
|
+
* @param {string} id - The id of the element to unregister.
|
|
13
|
+
*/
|
|
14
|
+
unregisterElement(id: string): void;
|
|
15
|
+
/**
|
|
16
|
+
* Update the visibility of an element.
|
|
17
|
+
* @param {string} id - The id of the element to update.
|
|
18
|
+
* @param {boolean} isVisible - The new visibility state of the element.
|
|
19
|
+
*/
|
|
20
|
+
updateElementVisibility(id: string, isVisible: boolean): void;
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InViewportService, never>;
|
|
22
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<InViewportService>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* Interface that defines the breakpoints for different device types
|
|
4
|
+
*/
|
|
5
|
+
export interface DeviceBreakpoints {
|
|
6
|
+
/** Maximum width for mobile devices in pixels */
|
|
7
|
+
mobile: number;
|
|
8
|
+
/** Maximum width for tablet devices in pixels */
|
|
9
|
+
tablet: number;
|
|
10
|
+
/** Maximum width for desktop devices in pixels */
|
|
11
|
+
desktop: number;
|
|
12
|
+
}
|
|
13
|
+
/** Available device types */
|
|
14
|
+
export type DeviceType = 'mobile' | 'tablet' | 'desktop';
|
|
15
|
+
/**
|
|
16
|
+
* Service that handles responsive design functionality
|
|
17
|
+
* Detects current device type based on window width and configurable breakpoints
|
|
18
|
+
*/
|
|
19
|
+
export declare class ResponsiveService {
|
|
20
|
+
/** Signal that holds the breakpoint configuration */
|
|
21
|
+
private readonly breakpoints;
|
|
22
|
+
/** Signal that holds the current window width */
|
|
23
|
+
private readonly windowWidth;
|
|
24
|
+
/**
|
|
25
|
+
* Computed signal that returns the current device type based on window width
|
|
26
|
+
* @returns The current device type ('mobile', 'tablet', or 'desktop')
|
|
27
|
+
*/
|
|
28
|
+
readonly currentDevice: import("@angular/core").Signal<DeviceType>;
|
|
29
|
+
constructor();
|
|
30
|
+
/**
|
|
31
|
+
* Initializes the window width signal with the current window inner width
|
|
32
|
+
* Only called in browser environment
|
|
33
|
+
*/
|
|
34
|
+
private initializeWindowWidth;
|
|
35
|
+
/**
|
|
36
|
+
* Sets up the resize event listener to update window width
|
|
37
|
+
* Only called in browser environment
|
|
38
|
+
*/
|
|
39
|
+
private setupResizeListener;
|
|
40
|
+
/**
|
|
41
|
+
* Updates the breakpoint configuration
|
|
42
|
+
* @param newBreakpoints - Partial breakpoint configuration to update
|
|
43
|
+
*/
|
|
44
|
+
updateBreakpoints(newBreakpoints: Partial<DeviceBreakpoints>): void;
|
|
45
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ResponsiveService, never>;
|
|
46
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ResponsiveService>;
|
|
47
|
+
}
|