@ks-digital/designsystem-angular 0.0.1-alpha.75 → 0.0.1-alpha.76
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/.npmignore +25 -0
- package/fesm2022/ks-digital-designsystem-angular-__internals.mjs +148 -78
- package/fesm2022/ks-digital-designsystem-angular-__internals.mjs.map +1 -1
- package/fesm2022/ks-digital-designsystem-angular-alert.mjs +59 -33
- package/fesm2022/ks-digital-designsystem-angular-alert.mjs.map +1 -1
- package/fesm2022/ks-digital-designsystem-angular-breadcrumbs.mjs +79 -43
- package/fesm2022/ks-digital-designsystem-angular-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ks-digital-designsystem-angular-button.mjs +187 -61
- package/fesm2022/ks-digital-designsystem-angular-button.mjs.map +1 -1
- package/fesm2022/ks-digital-designsystem-angular-card.mjs +136 -86
- package/fesm2022/ks-digital-designsystem-angular-card.mjs.map +1 -1
- package/fesm2022/ks-digital-designsystem-angular-chip.mjs +76 -42
- package/fesm2022/ks-digital-designsystem-angular-chip.mjs.map +1 -1
- package/fesm2022/ks-digital-designsystem-angular-details.mjs +148 -64
- package/fesm2022/ks-digital-designsystem-angular-details.mjs.map +1 -1
- package/fesm2022/ks-digital-designsystem-angular-dialog.mjs +106 -48
- package/fesm2022/ks-digital-designsystem-angular-dialog.mjs.map +1 -1
- package/fesm2022/ks-digital-designsystem-angular-dropdown.mjs +147 -45
- package/fesm2022/ks-digital-designsystem-angular-dropdown.mjs.map +1 -1
- package/fesm2022/ks-digital-designsystem-angular-error-summary.mjs +83 -48
- package/fesm2022/ks-digital-designsystem-angular-error-summary.mjs.map +1 -1
- package/fesm2022/ks-digital-designsystem-angular-forms.mjs +495 -210
- package/fesm2022/ks-digital-designsystem-angular-forms.mjs.map +1 -1
- package/fesm2022/ks-digital-designsystem-angular-heading.mjs +69 -39
- package/fesm2022/ks-digital-designsystem-angular-heading.mjs.map +1 -1
- package/fesm2022/ks-digital-designsystem-angular-link.mjs +59 -30
- package/fesm2022/ks-digital-designsystem-angular-link.mjs.map +1 -1
- package/fesm2022/ks-digital-designsystem-angular-pagination.mjs +324 -157
- package/fesm2022/ks-digital-designsystem-angular-pagination.mjs.map +1 -1
- package/fesm2022/ks-digital-designsystem-angular-paragraph.mjs +41 -24
- package/fesm2022/ks-digital-designsystem-angular-paragraph.mjs.map +1 -1
- package/fesm2022/ks-digital-designsystem-angular-popover.mjs +147 -45
- package/fesm2022/ks-digital-designsystem-angular-popover.mjs.map +1 -1
- package/fesm2022/ks-digital-designsystem-angular-search.mjs +266 -144
- package/fesm2022/ks-digital-designsystem-angular-search.mjs.map +1 -1
- package/fesm2022/ks-digital-designsystem-angular-skeleton.mjs +78 -34
- package/fesm2022/ks-digital-designsystem-angular-skeleton.mjs.map +1 -1
- package/fesm2022/ks-digital-designsystem-angular-spinner.mjs +132 -53
- package/fesm2022/ks-digital-designsystem-angular-spinner.mjs.map +1 -1
- package/fesm2022/ks-digital-designsystem-angular-suggestion.mjs +561 -297
- package/fesm2022/ks-digital-designsystem-angular-suggestion.mjs.map +1 -1
- package/fesm2022/ks-digital-designsystem-angular-table.mjs +219 -76
- package/fesm2022/ks-digital-designsystem-angular-table.mjs.map +1 -1
- package/fesm2022/ks-digital-designsystem-angular-tabs.mjs +269 -120
- package/fesm2022/ks-digital-designsystem-angular-tabs.mjs.map +1 -1
- package/fesm2022/ks-digital-designsystem-angular-tag.mjs +84 -37
- package/fesm2022/ks-digital-designsystem-angular-tag.mjs.map +1 -1
- package/fesm2022/ks-digital-designsystem-angular-validation-message.mjs +42 -24
- package/fesm2022/ks-digital-designsystem-angular-validation-message.mjs.map +1 -1
- package/fesm2022/ks-digital-designsystem-angular.mjs +1 -6
- package/fesm2022/ks-digital-designsystem-angular.mjs.map +1 -1
- package/package.json +6 -5
- package/types/ks-digital-designsystem-angular-__internals.d.ts +51 -37
- package/types/ks-digital-designsystem-angular-alert.d.ts +18 -9
- package/types/ks-digital-designsystem-angular-breadcrumbs.d.ts +29 -13
- package/types/ks-digital-designsystem-angular-button.d.ts +67 -32
- package/types/ks-digital-designsystem-angular-card.d.ts +38 -23
- package/types/ks-digital-designsystem-angular-chip.d.ts +30 -15
- package/types/ks-digital-designsystem-angular-details.d.ts +32 -18
- package/types/ks-digital-designsystem-angular-dialog.d.ts +40 -18
- package/types/ks-digital-designsystem-angular-dropdown.d.ts +44 -13
- package/types/ks-digital-designsystem-angular-error-summary.d.ts +17 -14
- package/types/ks-digital-designsystem-angular-forms.d.ts +136 -71
- package/types/ks-digital-designsystem-angular-heading.d.ts +22 -19
- package/types/ks-digital-designsystem-angular-link.d.ts +18 -9
- package/types/ks-digital-designsystem-angular-pagination.d.ts +131 -75
- package/types/ks-digital-designsystem-angular-paragraph.d.ts +5 -8
- package/types/ks-digital-designsystem-angular-popover.d.ts +44 -13
- package/types/ks-digital-designsystem-angular-search.d.ts +62 -38
- package/types/ks-digital-designsystem-angular-skeleton.d.ts +18 -15
- package/types/ks-digital-designsystem-angular-spinner.d.ts +42 -23
- package/types/ks-digital-designsystem-angular-suggestion.d.ts +182 -116
- package/types/ks-digital-designsystem-angular-table.d.ts +67 -42
- package/types/ks-digital-designsystem-angular-tabs.d.ts +85 -56
- package/types/ks-digital-designsystem-angular-tag.d.ts +30 -15
- package/types/ks-digital-designsystem-angular-validation-message.d.ts +5 -8
- package/types/ks-digital-designsystem-angular.d.ts +2 -2
|
@@ -1,13 +1,44 @@
|
|
|
1
|
-
import
|
|
2
|
-
import * as
|
|
3
|
-
|
|
4
|
-
declare class Popover {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import "@digdir/designsystemet-web/popover";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "@ks-digital/designsystem-angular/__internals";
|
|
4
|
+
export declare class Popover {
|
|
5
|
+
readonly autoPlacement: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
6
|
+
readonly variant: import("@angular/core").InputSignal<"tinted" | "default">;
|
|
7
|
+
readonly placement: import("@angular/core").InputSignal<"bottom" | "bottom-end" | "bottom-start" | "left" | "left-end" | "left-start" | "right" | "right-end" | "right-start" | "top" | "top-end" | "top-start">;
|
|
8
|
+
readonly popover: import("@angular/core").InputSignal<"auto" | "manual">;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Popover, never>;
|
|
10
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<Popover, "[ksd-popover]", never, {
|
|
11
|
+
"autoPlacement": {
|
|
12
|
+
"alias": "autoPlacement";
|
|
13
|
+
"required": false;
|
|
14
|
+
"isSignal": true;
|
|
15
|
+
};
|
|
16
|
+
"variant": {
|
|
17
|
+
"alias": "data-variant";
|
|
18
|
+
"required": false;
|
|
19
|
+
"isSignal": true;
|
|
20
|
+
};
|
|
21
|
+
"placement": {
|
|
22
|
+
"alias": "data-placement";
|
|
23
|
+
"required": false;
|
|
24
|
+
"isSignal": true;
|
|
25
|
+
};
|
|
26
|
+
"popover": {
|
|
27
|
+
"alias": "popover";
|
|
28
|
+
"required": false;
|
|
29
|
+
"isSignal": true;
|
|
30
|
+
};
|
|
31
|
+
}, {}, never, never, true, [{
|
|
32
|
+
directive: typeof i1.HostSize;
|
|
33
|
+
inputs: {
|
|
34
|
+
"data-size": "data-size";
|
|
35
|
+
};
|
|
36
|
+
outputs: {};
|
|
37
|
+
}, {
|
|
38
|
+
directive: typeof i1.HostColor;
|
|
39
|
+
inputs: {
|
|
40
|
+
"data-color": "data-color";
|
|
41
|
+
};
|
|
42
|
+
outputs: {};
|
|
43
|
+
}]>;
|
|
44
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import * as
|
|
3
|
-
|
|
1
|
+
import "@digdir/designsystemet-web";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "@ks-digital/designsystem-angular/__internals";
|
|
4
4
|
/**
|
|
5
5
|
* Search Component
|
|
6
6
|
*
|
|
@@ -14,13 +14,24 @@ import * as i1 from '@ks-digital/designsystem-angular/__internals';
|
|
|
14
14
|
* <button ksd-search-button></button>
|
|
15
15
|
* </div>
|
|
16
16
|
*/
|
|
17
|
-
declare class Search {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
export declare class Search {
|
|
18
|
+
private readonly input;
|
|
19
|
+
constructor();
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Search, never>;
|
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Search, "ksd-search", never, {}, {}, ["input"], ["[ksd-search-input]", "[ksd-search-clear]", "[ksd-search-button]"], true, [{
|
|
22
|
+
directive: typeof i1.HostSize;
|
|
23
|
+
inputs: {
|
|
24
|
+
"data-size": "data-size";
|
|
25
|
+
};
|
|
26
|
+
outputs: {};
|
|
27
|
+
}, {
|
|
28
|
+
directive: typeof i1.HostColor;
|
|
29
|
+
inputs: {
|
|
30
|
+
"data-color": "data-color";
|
|
31
|
+
};
|
|
32
|
+
outputs: {};
|
|
33
|
+
}]>;
|
|
22
34
|
}
|
|
23
|
-
|
|
24
35
|
/**
|
|
25
36
|
* Search button
|
|
26
37
|
*
|
|
@@ -30,21 +41,31 @@ declare class Search {
|
|
|
30
41
|
* @param {string} [aria-label] - Aria label for the button
|
|
31
42
|
*
|
|
32
43
|
*/
|
|
33
|
-
declare class SearchButton {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
export declare class SearchButton {
|
|
45
|
+
/**
|
|
46
|
+
* Specify which button variant to use
|
|
47
|
+
*
|
|
48
|
+
* @default 'primary'
|
|
49
|
+
*/
|
|
50
|
+
readonly variant: import("@angular/core").InputSignal<"primary" | "secondary">;
|
|
51
|
+
/**
|
|
52
|
+
* Aria label for the button
|
|
53
|
+
*/
|
|
54
|
+
readonly ariaLabel: import("@angular/core").InputSignal<string>;
|
|
55
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SearchButton, never>;
|
|
56
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SearchButton, "button[ksd-search-button]", never, {
|
|
57
|
+
"variant": {
|
|
58
|
+
"alias": "variant";
|
|
59
|
+
"required": false;
|
|
60
|
+
"isSignal": true;
|
|
61
|
+
};
|
|
62
|
+
"ariaLabel": {
|
|
63
|
+
"alias": "aria-label";
|
|
64
|
+
"required": false;
|
|
65
|
+
"isSignal": true;
|
|
66
|
+
};
|
|
67
|
+
}, {}, never, never, true, never>;
|
|
46
68
|
}
|
|
47
|
-
|
|
48
69
|
/**
|
|
49
70
|
* Search clear button
|
|
50
71
|
*
|
|
@@ -53,24 +74,27 @@ declare class SearchButton {
|
|
|
53
74
|
*
|
|
54
75
|
* @param {string} [aria-label] - Aria label for the button.
|
|
55
76
|
*/
|
|
56
|
-
declare class SearchClear {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
77
|
+
export declare class SearchClear {
|
|
78
|
+
/**
|
|
79
|
+
* Aria label for the button
|
|
80
|
+
* @default 'Tøm'
|
|
81
|
+
*/
|
|
82
|
+
readonly ariaLabel: import("@angular/core").InputSignal<string>;
|
|
83
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SearchClear, never>;
|
|
84
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SearchClear, "button[ksd-search-clear]", never, {
|
|
85
|
+
"ariaLabel": {
|
|
86
|
+
"alias": "aria-label";
|
|
87
|
+
"required": false;
|
|
88
|
+
"isSignal": true;
|
|
89
|
+
};
|
|
90
|
+
}, {}, never, never, true, never>;
|
|
64
91
|
}
|
|
65
|
-
|
|
66
92
|
/**
|
|
67
93
|
* Search input
|
|
68
94
|
*
|
|
69
95
|
* Used within Search to provide a search input.
|
|
70
96
|
*/
|
|
71
|
-
declare class SearchInput {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export { Search, SearchButton, SearchClear, SearchInput };
|
|
97
|
+
export declare class SearchInput {
|
|
98
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SearchInput, never>;
|
|
99
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SearchInput, "input[ksd-search-input]", never, {}, {}, never, never, true, never>;
|
|
100
|
+
}
|
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
3
2
|
/**
|
|
4
3
|
* Skeleton is used to represent a draft of a page while the content loads.
|
|
5
4
|
*/
|
|
6
|
-
declare class Skeleton {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
5
|
+
export declare class Skeleton {
|
|
6
|
+
/**
|
|
7
|
+
* Specify which variant to use
|
|
8
|
+
* @default 'rectangle'
|
|
9
|
+
*/
|
|
10
|
+
readonly variant: import("@angular/core").InputSignal<"rectangle" | "circle" | "text">;
|
|
11
|
+
readonly isText: import("@angular/core").Signal<boolean>;
|
|
12
|
+
readonly dataText: import("@angular/core").Signal<"-" | null>;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Skeleton, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Skeleton, "ksd-skeleton", never, {
|
|
15
|
+
"variant": {
|
|
16
|
+
"alias": "data-variant";
|
|
17
|
+
"required": false;
|
|
18
|
+
"isSignal": true;
|
|
19
|
+
};
|
|
20
|
+
}, {}, never, ["*"], true, never>;
|
|
21
|
+
}
|
|
@@ -1,23 +1,42 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as i1 from
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "@ks-digital/designsystem-angular/__internals";
|
|
3
|
+
export declare class Spinner {
|
|
4
|
+
/**
|
|
5
|
+
* Aria-label for the spinner
|
|
6
|
+
*/
|
|
7
|
+
readonly ariaLabel: import("@angular/core").InputSignal<string | undefined>;
|
|
8
|
+
/**
|
|
9
|
+
* Aria-hidden for the spinner
|
|
10
|
+
*/
|
|
11
|
+
readonly ariaHidden: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
|
|
12
|
+
constructor();
|
|
13
|
+
/**
|
|
14
|
+
* Changes size for descendant Designsystemet components. Select from predefined sizes.
|
|
15
|
+
* @attribute data-size
|
|
16
|
+
*/
|
|
17
|
+
readonly dataSize: import("@angular/core").InputSignal<any>;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Spinner, never>;
|
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Spinner, "ksd-spinner", never, {
|
|
20
|
+
"ariaLabel": {
|
|
21
|
+
"alias": "aria-label";
|
|
22
|
+
"required": false;
|
|
23
|
+
"isSignal": true;
|
|
24
|
+
};
|
|
25
|
+
"ariaHidden": {
|
|
26
|
+
"alias": "aria-hidden";
|
|
27
|
+
"required": false;
|
|
28
|
+
"isSignal": true;
|
|
29
|
+
};
|
|
30
|
+
"dataSize": {
|
|
31
|
+
"alias": "data-size";
|
|
32
|
+
"required": false;
|
|
33
|
+
"isSignal": true;
|
|
34
|
+
};
|
|
35
|
+
}, {}, never, never, true, [{
|
|
36
|
+
directive: typeof i1.HostColor;
|
|
37
|
+
inputs: {
|
|
38
|
+
"data-color": "data-color";
|
|
39
|
+
};
|
|
40
|
+
outputs: {};
|
|
41
|
+
}]>;
|
|
42
|
+
}
|
|
@@ -1,52 +1,65 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import * as i1 from
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SuggestionListEmpty, "ksd-suggestion-list-empty", never, {}, {}, never, ["*"], true, never>;
|
|
1
|
+
import { FormValueControl } from "@angular/forms/signals";
|
|
2
|
+
import "@digdir/designsystemet-web";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import { TemplateRef } from "@angular/core";
|
|
5
|
+
import * as i1 from "@ks-digital/designsystem-angular/__internals";
|
|
6
|
+
export declare class SuggestionListEmpty {
|
|
7
|
+
/**
|
|
8
|
+
* Hack to get the content from parent component so that we can
|
|
9
|
+
* keep the dom structure needed without additional host elements
|
|
10
|
+
*/
|
|
11
|
+
templateRef: import("@angular/core").Signal<TemplateRef<unknown> | undefined>;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SuggestionListEmpty, never>;
|
|
13
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SuggestionListEmpty, "ksd-suggestion-list-empty", never, {}, {}, never, ["*"], true, never>;
|
|
15
14
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
15
|
+
export declare class SuggestionListOption {
|
|
16
|
+
/**
|
|
17
|
+
* Hack to get the content from parent component so that we can
|
|
18
|
+
* keep the dom structure needed without additional host elements
|
|
19
|
+
*/
|
|
20
|
+
templateRef: import("@angular/core").Signal<TemplateRef<unknown> | undefined>;
|
|
21
|
+
value: import("@angular/core").InputSignal<string>;
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SuggestionListOption, never>;
|
|
23
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SuggestionListOption, "ksd-suggestion-list-option", never, {
|
|
24
|
+
"value": {
|
|
25
|
+
"alias": "value";
|
|
26
|
+
"required": true;
|
|
27
|
+
"isSignal": true;
|
|
28
|
+
};
|
|
29
|
+
}, {}, never, ["*"], true, never>;
|
|
26
30
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
31
|
+
export declare class SuggestionList {
|
|
32
|
+
/**
|
|
33
|
+
* Screen reader announcement template for singular result count.
|
|
34
|
+
*
|
|
35
|
+
* @default '%d forslag'
|
|
36
|
+
*/
|
|
37
|
+
readonly singular: import("@angular/core").InputSignal<string>;
|
|
38
|
+
/**
|
|
39
|
+
* Screen reader announcement template for plural result count.
|
|
40
|
+
*
|
|
41
|
+
* @default '%d forslag'
|
|
42
|
+
*/
|
|
43
|
+
readonly plural: import("@angular/core").InputSignal<string>;
|
|
44
|
+
readonly options: import("@angular/core").Signal<readonly SuggestionListOption[]>;
|
|
45
|
+
readonly empty: import("@angular/core").Signal<SuggestionListEmpty | undefined>;
|
|
46
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SuggestionList, never>;
|
|
47
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SuggestionList, "ksd-suggestion-list", never, {
|
|
48
|
+
"singular": {
|
|
49
|
+
"alias": "singular";
|
|
50
|
+
"required": false;
|
|
51
|
+
"isSignal": true;
|
|
52
|
+
};
|
|
53
|
+
"plural": {
|
|
54
|
+
"alias": "plural";
|
|
55
|
+
"required": false;
|
|
56
|
+
"isSignal": true;
|
|
57
|
+
};
|
|
58
|
+
}, {}, ["options", "empty"], never, true, never>;
|
|
45
59
|
}
|
|
46
|
-
|
|
47
60
|
type SuggestionItem = {
|
|
48
|
-
|
|
49
|
-
|
|
61
|
+
label: string;
|
|
62
|
+
value: string;
|
|
50
63
|
};
|
|
51
64
|
/** Value of the `value` model and Angular signal forms. Always primitive. */
|
|
52
65
|
type SuggestionValue = string | string[] | undefined;
|
|
@@ -55,78 +68,131 @@ type SuggestionSelectedInput = SuggestionItem | SuggestionItem[] | string | stri
|
|
|
55
68
|
/** Emitted by `(selectedChange)`. Always resolved items. */
|
|
56
69
|
type SuggestionSelected = SuggestionItem | SuggestionItem[] | undefined;
|
|
57
70
|
type SuggestionFilterArgs = {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
71
|
+
index: number;
|
|
72
|
+
label: string;
|
|
73
|
+
text: string;
|
|
74
|
+
value: string;
|
|
75
|
+
optionElement: HTMLOptionElement;
|
|
76
|
+
input: HTMLInputElement;
|
|
64
77
|
};
|
|
65
78
|
type SuggestionFilter = (args: SuggestionFilterArgs) => boolean;
|
|
66
|
-
|
|
67
79
|
declare const UNSET: unique symbol;
|
|
68
|
-
declare class Suggestion implements FormValueControl<SuggestionValue> {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
80
|
+
export declare class Suggestion implements FormValueControl<SuggestionValue> {
|
|
81
|
+
/**
|
|
82
|
+
* Allows the user to select multiple items
|
|
83
|
+
*
|
|
84
|
+
* @default false
|
|
85
|
+
*/
|
|
86
|
+
multiple: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
87
|
+
/**
|
|
88
|
+
* Allows the user to create new items
|
|
89
|
+
*
|
|
90
|
+
* @default false
|
|
91
|
+
*/
|
|
92
|
+
creatable: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
93
|
+
/**
|
|
94
|
+
* Filter options; boolean or a custom callback.
|
|
95
|
+
*
|
|
96
|
+
* @default true
|
|
97
|
+
*/
|
|
98
|
+
filter: import("@angular/core").InputSignal<boolean | SuggestionFilter>;
|
|
99
|
+
/**
|
|
100
|
+
* Current value, as primitive option values. Bound by Angular signal forms.
|
|
101
|
+
*
|
|
102
|
+
* @default undefined
|
|
103
|
+
*/
|
|
104
|
+
readonly value: import("@angular/core").ModelSignal<SuggestionValue>;
|
|
105
|
+
/**
|
|
106
|
+
* Controlled selection. Accepts items or raw option values.
|
|
107
|
+
*
|
|
108
|
+
* @default undefined
|
|
109
|
+
*/
|
|
110
|
+
readonly selected: import("@angular/core").InputSignal<SuggestionSelectedInput | typeof UNSET>;
|
|
111
|
+
/**
|
|
112
|
+
* Emits the resolved selection whenever the user changes it.
|
|
113
|
+
*/
|
|
114
|
+
readonly selectedChange: import("@angular/core").OutputEmitterRef<SuggestionSelected>;
|
|
115
|
+
/**
|
|
116
|
+
* Form-control dirty state.
|
|
117
|
+
*
|
|
118
|
+
* @default false
|
|
119
|
+
*/
|
|
120
|
+
readonly dirty: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
121
|
+
/**
|
|
122
|
+
* Whether the control has been touched. Bound by Angular signal forms.
|
|
123
|
+
*
|
|
124
|
+
* @default false
|
|
125
|
+
*/
|
|
126
|
+
readonly touched: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
127
|
+
/**
|
|
128
|
+
* Emits when focus leaves the control, marking the bound form field as touched.
|
|
129
|
+
*/
|
|
130
|
+
readonly touch: import("@angular/core").OutputEmitterRef<void>;
|
|
131
|
+
protected selectedArray: import("@angular/core").Signal<import("@ks-digital/designsystem-angular/suggestion").SuggestionItem[]>;
|
|
132
|
+
private readonly suggestionElement;
|
|
133
|
+
private readonly labels;
|
|
134
|
+
private readonly query;
|
|
135
|
+
protected readonly suggestionList: import("@angular/core").Signal<SuggestionList | undefined>;
|
|
136
|
+
constructor();
|
|
137
|
+
protected onSelect(event: Event): void;
|
|
138
|
+
protected onFocusOut(event: FocusEvent): void;
|
|
139
|
+
protected onInput(event: Event): void;
|
|
140
|
+
private setValue;
|
|
141
|
+
private learnLabels;
|
|
142
|
+
private syncOptions;
|
|
143
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<Suggestion, never>;
|
|
144
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Suggestion, "ksd-suggestion", never, {
|
|
145
|
+
"multiple": {
|
|
146
|
+
"alias": "multiple";
|
|
147
|
+
"required": false;
|
|
148
|
+
"isSignal": true;
|
|
149
|
+
};
|
|
150
|
+
"creatable": {
|
|
151
|
+
"alias": "creatable";
|
|
152
|
+
"required": false;
|
|
153
|
+
"isSignal": true;
|
|
154
|
+
};
|
|
155
|
+
"filter": {
|
|
156
|
+
"alias": "filter";
|
|
157
|
+
"required": false;
|
|
158
|
+
"isSignal": true;
|
|
159
|
+
};
|
|
160
|
+
"value": {
|
|
161
|
+
"alias": "value";
|
|
162
|
+
"required": false;
|
|
163
|
+
"isSignal": true;
|
|
164
|
+
};
|
|
165
|
+
"selected": {
|
|
166
|
+
"alias": "selected";
|
|
167
|
+
"required": false;
|
|
168
|
+
"isSignal": true;
|
|
169
|
+
};
|
|
170
|
+
"dirty": {
|
|
171
|
+
"alias": "dirty";
|
|
172
|
+
"required": false;
|
|
173
|
+
"isSignal": true;
|
|
174
|
+
};
|
|
175
|
+
"touched": {
|
|
176
|
+
"alias": "touched";
|
|
177
|
+
"required": false;
|
|
178
|
+
"isSignal": true;
|
|
179
|
+
};
|
|
180
|
+
}, {
|
|
181
|
+
"value": "valueChange";
|
|
182
|
+
"selectedChange": "selectedChange";
|
|
183
|
+
"touch": "touch";
|
|
184
|
+
}, ["suggestionList"], ["*"], true, [{
|
|
185
|
+
directive: typeof i1.HostSize;
|
|
186
|
+
inputs: {
|
|
187
|
+
"data-size": "data-size";
|
|
188
|
+
};
|
|
189
|
+
outputs: {};
|
|
190
|
+
}, {
|
|
191
|
+
directive: typeof i1.HostColor;
|
|
192
|
+
inputs: {
|
|
193
|
+
"data-color": "data-color";
|
|
194
|
+
};
|
|
195
|
+
outputs: {};
|
|
196
|
+
}]>;
|
|
129
197
|
}
|
|
130
|
-
|
|
131
|
-
export { Suggestion, SuggestionList, SuggestionListEmpty, SuggestionListOption };
|
|
132
|
-
export type { SuggestionFilter, SuggestionFilterArgs, SuggestionItem, SuggestionSelected, SuggestionSelectedInput, SuggestionValue };
|
|
198
|
+
export type { SuggestionFilter, SuggestionFilterArgs, SuggestionItem, SuggestionSelected, SuggestionSelectedInput, SuggestionValue };
|