@ks-digital/designsystem-angular 0.0.1-alpha.74 → 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,57 +1,86 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import * as i1 from
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, Component, Directive, afterNextRender, contentChild, input } from "@angular/core";
|
|
3
|
+
import "@digdir/designsystemet-web";
|
|
4
|
+
import * as i1 from "@ks-digital/designsystem-angular/__internals";
|
|
5
|
+
import { HostColor, HostSize, logIfDevMode } from "@ks-digital/designsystem-angular/__internals";
|
|
6
|
+
var SearchInput = class SearchInput {
|
|
7
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
8
|
+
minVersion: "12.0.0",
|
|
9
|
+
version: "22.2.0",
|
|
10
|
+
ngImport: i0,
|
|
11
|
+
type: SearchInput,
|
|
12
|
+
deps: [],
|
|
13
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
14
|
+
});
|
|
15
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
16
|
+
minVersion: "14.0.0",
|
|
17
|
+
version: "22.2.0",
|
|
18
|
+
type: SearchInput,
|
|
19
|
+
isStandalone: true,
|
|
20
|
+
selector: "input[ksd-search-input]",
|
|
21
|
+
host: {
|
|
22
|
+
attributes: { "type": "search" },
|
|
23
|
+
classAttribute: "ds-input"
|
|
24
|
+
},
|
|
25
|
+
ngImport: i0
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
29
|
+
minVersion: "12.0.0",
|
|
30
|
+
version: "22.2.0",
|
|
31
|
+
ngImport: i0,
|
|
32
|
+
type: SearchInput,
|
|
33
|
+
decorators: [{
|
|
34
|
+
type: Directive,
|
|
35
|
+
args: [{
|
|
36
|
+
selector: "input[ksd-search-input]",
|
|
37
|
+
host: {
|
|
38
|
+
class: "ds-input",
|
|
39
|
+
type: "search"
|
|
40
|
+
}
|
|
41
|
+
}]
|
|
42
|
+
}]
|
|
43
|
+
});
|
|
44
|
+
var Search = class Search {
|
|
45
|
+
input = contentChild(SearchInput, ...ngDevMode ? [{ debugName: "input" }] : /* istanbul ignore next */ []);
|
|
46
|
+
constructor() {
|
|
47
|
+
afterNextRender(() => {
|
|
48
|
+
if (!this.input()) logIfDevMode({
|
|
49
|
+
component: "Search",
|
|
50
|
+
message: "Missing required elements: ksd-search-input must be provided as child. Check imports and markup."
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
55
|
+
minVersion: "12.0.0",
|
|
56
|
+
version: "22.2.0",
|
|
57
|
+
ngImport: i0,
|
|
58
|
+
type: Search,
|
|
59
|
+
deps: [],
|
|
60
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
61
|
+
});
|
|
62
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
63
|
+
minVersion: "17.0.0",
|
|
64
|
+
version: "22.2.0",
|
|
65
|
+
type: Search,
|
|
66
|
+
isStandalone: true,
|
|
67
|
+
selector: "ksd-search",
|
|
68
|
+
queries: [{
|
|
69
|
+
propertyName: "input",
|
|
70
|
+
first: true,
|
|
71
|
+
predicate: SearchInput,
|
|
72
|
+
descendants: true,
|
|
73
|
+
isSignal: true
|
|
74
|
+
}],
|
|
75
|
+
hostDirectives: [{
|
|
76
|
+
directive: i1.HostSize,
|
|
77
|
+
inputs: ["data-size", "data-size"]
|
|
78
|
+
}, {
|
|
79
|
+
directive: i1.HostColor,
|
|
80
|
+
inputs: ["data-color", "data-color"]
|
|
81
|
+
}],
|
|
82
|
+
ngImport: i0,
|
|
83
|
+
template: `
|
|
55
84
|
@if (true) {
|
|
56
85
|
<ds-suggestion class="ds-search">
|
|
57
86
|
<ng-content select="[ksd-search-input]" />
|
|
@@ -59,11 +88,24 @@ class Search {
|
|
|
59
88
|
<ng-content select="[ksd-search-button]" />
|
|
60
89
|
</ds-suggestion>
|
|
61
90
|
}
|
|
62
|
-
`,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
91
|
+
`,
|
|
92
|
+
isInline: true,
|
|
93
|
+
styles: [":host{display:block}\n"],
|
|
94
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
98
|
+
minVersion: "12.0.0",
|
|
99
|
+
version: "22.2.0",
|
|
100
|
+
ngImport: i0,
|
|
101
|
+
type: Search,
|
|
102
|
+
decorators: [{
|
|
103
|
+
type: Component,
|
|
104
|
+
args: [{
|
|
105
|
+
selector: "ksd-search",
|
|
106
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
107
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
108
|
+
template: `
|
|
67
109
|
@if (true) {
|
|
68
110
|
<ds-suggestion class="ds-search">
|
|
69
111
|
<ng-content select="[ksd-search-input]" />
|
|
@@ -71,89 +113,169 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
71
113
|
<ng-content select="[ksd-search-button]" />
|
|
72
114
|
</ds-suggestion>
|
|
73
115
|
}
|
|
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
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
116
|
+
`,
|
|
117
|
+
hostDirectives: [{
|
|
118
|
+
directive: HostSize,
|
|
119
|
+
inputs: ["data-size"]
|
|
120
|
+
}, {
|
|
121
|
+
directive: HostColor,
|
|
122
|
+
inputs: ["data-color"]
|
|
123
|
+
}],
|
|
124
|
+
styles: [":host{display:block}\n"]
|
|
125
|
+
}]
|
|
126
|
+
}],
|
|
127
|
+
ctorParameters: () => [],
|
|
128
|
+
propDecorators: { input: [{
|
|
129
|
+
type: i0.ContentChild,
|
|
130
|
+
args: [i0.forwardRef(() => SearchInput), { isSignal: true }]
|
|
131
|
+
}] }
|
|
132
|
+
});
|
|
133
|
+
var SearchButton = class SearchButton {
|
|
134
|
+
variant = input("primary", ...ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []);
|
|
135
|
+
ariaLabel = input("", {
|
|
136
|
+
...ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {},
|
|
137
|
+
alias: "aria-label"
|
|
138
|
+
});
|
|
139
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
140
|
+
minVersion: "12.0.0",
|
|
141
|
+
version: "22.2.0",
|
|
142
|
+
ngImport: i0,
|
|
143
|
+
type: SearchButton,
|
|
144
|
+
deps: [],
|
|
145
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
146
|
+
});
|
|
147
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
148
|
+
minVersion: "17.1.0",
|
|
149
|
+
version: "22.2.0",
|
|
150
|
+
type: SearchButton,
|
|
151
|
+
isStandalone: true,
|
|
152
|
+
selector: "button[ksd-search-button]",
|
|
153
|
+
inputs: {
|
|
154
|
+
variant: {
|
|
155
|
+
classPropertyName: "variant",
|
|
156
|
+
publicName: "variant",
|
|
157
|
+
isSignal: true,
|
|
158
|
+
isRequired: false,
|
|
159
|
+
transformFunction: null
|
|
160
|
+
},
|
|
161
|
+
ariaLabel: {
|
|
162
|
+
classPropertyName: "ariaLabel",
|
|
163
|
+
publicName: "aria-label",
|
|
164
|
+
isSignal: true,
|
|
165
|
+
isRequired: false,
|
|
166
|
+
transformFunction: null
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
host: {
|
|
170
|
+
attributes: { "type": "submit" },
|
|
171
|
+
properties: {
|
|
172
|
+
"attr.aria-label": "this.ariaLabel() || null",
|
|
173
|
+
"attr.data-variant": "this.variant()"
|
|
174
|
+
},
|
|
175
|
+
classAttribute: "ds-button"
|
|
176
|
+
},
|
|
177
|
+
ngImport: i0
|
|
178
|
+
});
|
|
179
|
+
};
|
|
180
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
181
|
+
minVersion: "12.0.0",
|
|
182
|
+
version: "22.2.0",
|
|
183
|
+
ngImport: i0,
|
|
184
|
+
type: SearchButton,
|
|
185
|
+
decorators: [{
|
|
186
|
+
type: Directive,
|
|
187
|
+
args: [{
|
|
188
|
+
selector: "button[ksd-search-button]",
|
|
189
|
+
host: {
|
|
190
|
+
class: "ds-button",
|
|
191
|
+
type: "submit",
|
|
192
|
+
"[attr.aria-label]": "this.ariaLabel() || null",
|
|
193
|
+
"[attr.data-variant]": "this.variant()"
|
|
194
|
+
}
|
|
195
|
+
}]
|
|
196
|
+
}],
|
|
197
|
+
propDecorators: {
|
|
198
|
+
variant: [{
|
|
199
|
+
type: i0.Input,
|
|
200
|
+
args: [{
|
|
201
|
+
isSignal: true,
|
|
202
|
+
alias: "variant",
|
|
203
|
+
required: false
|
|
204
|
+
}]
|
|
205
|
+
}],
|
|
206
|
+
ariaLabel: [{
|
|
207
|
+
type: i0.Input,
|
|
208
|
+
args: [{
|
|
209
|
+
isSignal: true,
|
|
210
|
+
alias: "aria-label",
|
|
211
|
+
required: false
|
|
212
|
+
}]
|
|
213
|
+
}]
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
var SearchClear = class SearchClear {
|
|
217
|
+
ariaLabel = input("Tøm", {
|
|
218
|
+
...ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {},
|
|
219
|
+
alias: "aria-label"
|
|
220
|
+
});
|
|
221
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
222
|
+
minVersion: "12.0.0",
|
|
223
|
+
version: "22.2.0",
|
|
224
|
+
ngImport: i0,
|
|
225
|
+
type: SearchClear,
|
|
226
|
+
deps: [],
|
|
227
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
228
|
+
});
|
|
229
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
230
|
+
minVersion: "17.1.0",
|
|
231
|
+
version: "22.2.0",
|
|
232
|
+
type: SearchClear,
|
|
233
|
+
isStandalone: true,
|
|
234
|
+
selector: "button[ksd-search-clear]",
|
|
235
|
+
inputs: { ariaLabel: {
|
|
236
|
+
classPropertyName: "ariaLabel",
|
|
237
|
+
publicName: "aria-label",
|
|
238
|
+
isSignal: true,
|
|
239
|
+
isRequired: false,
|
|
240
|
+
transformFunction: null
|
|
241
|
+
} },
|
|
242
|
+
host: {
|
|
243
|
+
attributes: { "type": "reset" },
|
|
244
|
+
properties: {
|
|
245
|
+
"attr.data-variant": "'tertiary'",
|
|
246
|
+
"attr.aria-label": "this.ariaLabel()"
|
|
247
|
+
},
|
|
248
|
+
classAttribute: "ds-button"
|
|
249
|
+
},
|
|
250
|
+
ngImport: i0
|
|
251
|
+
});
|
|
252
|
+
};
|
|
253
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
254
|
+
minVersion: "12.0.0",
|
|
255
|
+
version: "22.2.0",
|
|
256
|
+
ngImport: i0,
|
|
257
|
+
type: SearchClear,
|
|
258
|
+
decorators: [{
|
|
259
|
+
type: Directive,
|
|
260
|
+
args: [{
|
|
261
|
+
selector: "button[ksd-search-clear]",
|
|
262
|
+
host: {
|
|
263
|
+
class: "ds-button",
|
|
264
|
+
type: "reset",
|
|
265
|
+
"[attr.data-variant]": "'tertiary'",
|
|
266
|
+
"[attr.aria-label]": "this.ariaLabel()"
|
|
267
|
+
}
|
|
268
|
+
}]
|
|
269
|
+
}],
|
|
270
|
+
propDecorators: { ariaLabel: [{
|
|
271
|
+
type: i0.Input,
|
|
272
|
+
args: [{
|
|
273
|
+
isSignal: true,
|
|
274
|
+
alias: "aria-label",
|
|
275
|
+
required: false
|
|
276
|
+
}]
|
|
277
|
+
}] }
|
|
278
|
+
});
|
|
158
279
|
export { Search, SearchButton, SearchClear, SearchInput };
|
|
159
|
-
|
|
280
|
+
|
|
281
|
+
//# sourceMappingURL=ks-digital-designsystem-angular-search.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ks-digital-designsystem-angular-search.mjs","sources":["../../../../packages/angular/search/src/search-input.ts","../../../../packages/angular/search/src/search.ts","../../../../packages/angular/search/src/search-button.ts","../../../../packages/angular/search/src/search-clear.ts"
|
|
1
|
+
{"version":3,"file":"ks-digital-designsystem-angular-search.mjs","names":[],"sources":["../../../../packages/angular/search/src/search-input.ts","../../../../packages/angular/search/src/search.ts","../../../../packages/angular/search/src/search-button.ts","../../../../packages/angular/search/src/search-clear.ts"],"sourcesContent":["import { Directive } from '@angular/core'\n\n/**\n * Search input\n *\n * Used within Search to provide a search input.\n */\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'input[ksd-search-input]',\n host: {\n class: 'ds-input',\n type: 'search',\n },\n})\nexport class SearchInput {}\n","import {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n contentChild,\n CUSTOM_ELEMENTS_SCHEMA,\n} from '@angular/core'\n// Main entrypoint on purpose: u-datalist, which ds-suggestion filtering needs, has no subpath export\nimport '@digdir/designsystemet-web'\nimport {\n HostColor,\n HostSize,\n logIfDevMode,\n} from '@ks-digital/designsystem-angular/__internals'\nimport { SearchInput } from './search-input'\n\n/**\n * Search Component\n *\n * Use to contain the search input and buttons.\n * Only `SearchInput` is required, while `SearchClear` and `SearchButton` are optional.\n *\n * @example\n * <div ksd-search>\n * <input ksd-search-input />\n * <button ksd-search-clear></button>\n * <button ksd-search-button></button>\n * </div>\n */\n@Component({\n selector: 'ksd-search',\n changeDetection: ChangeDetectionStrategy.OnPush,\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n styles: `\n :host {\n display: block;\n }\n `,\n // ds-suggestion hides the clear button while the input is empty, but only reads its\n // children on connect. The @if builds this as an embedded view, so it is inserted\n // with the projected content already in place - do not inline it.\n template: `\n @if (true) {\n <ds-suggestion class=\"ds-search\">\n <ng-content select=\"[ksd-search-input]\" />\n <ng-content select=\"[ksd-search-clear]\" />\n <ng-content select=\"[ksd-search-button]\" />\n </ds-suggestion>\n }\n `,\n hostDirectives: [\n {\n directive: HostSize,\n inputs: ['data-size'],\n },\n {\n directive: HostColor,\n inputs: ['data-color'],\n },\n ],\n})\nexport class Search {\n private readonly input = contentChild(SearchInput)\n\n constructor() {\n afterNextRender(() => {\n if (!this.input()) {\n logIfDevMode({\n component: 'Search',\n message:\n 'Missing required elements: ksd-search-input must be provided as child. Check imports and markup.',\n })\n }\n })\n }\n}\n","import { Directive, input } from '@angular/core'\n\n/**\n * Search button\n *\n * Used within Search to provide a submit button.\n *\n * @param {('primary' | 'secondary')} [variant] - Specify which button variant to use\n * @param {string} [aria-label] - Aria label for the button\n *\n */\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'button[ksd-search-button]',\n host: {\n class: 'ds-button',\n type: 'submit',\n '[attr.aria-label]': 'this.ariaLabel() || null',\n '[attr.data-variant]': 'this.variant()',\n },\n})\nexport class SearchButton {\n /**\n * Specify which button variant to use\n *\n * @default 'primary'\n */\n readonly variant = input<'primary' | 'secondary'>('primary')\n\n /**\n * Aria label for the button\n */\n readonly ariaLabel = input('', { alias: 'aria-label' })\n}\n","import { Directive, input } from '@angular/core'\n\n/**\n * Search clear button\n *\n * Used within Search to provide a clear button.\n * ds-suggestion clears and refocuses the input, and fires an `input` event on it.\n *\n * @param {string} [aria-label] - Aria label for the button.\n */\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'button[ksd-search-clear]',\n host: {\n class: 'ds-button',\n type: 'reset',\n '[attr.data-variant]': \"'tertiary'\",\n '[attr.aria-label]': 'this.ariaLabel()',\n },\n})\nexport class SearchClear {\n /**\n * Aria label for the button\n * @default 'Tøm'\n */\n readonly ariaLabel = input('Tøm', { alias: 'aria-label' })\n}\n"],"mappings":";;;;;AAeA,IAAa,cAAb,MAAa,YAAW;CAAX,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAW,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAX,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,M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|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, computed, input } from "@angular/core";
|
|
3
|
+
var Skeleton = class Skeleton {
|
|
4
|
+
variant = input("rectangle", {
|
|
5
|
+
...ngDevMode ? { debugName: "variant" } : /* istanbul ignore next */ {},
|
|
6
|
+
alias: "data-variant"
|
|
7
|
+
});
|
|
8
|
+
isText = computed(() => this.variant() === "text", ...ngDevMode ? [{ debugName: "isText" }] : /* istanbul ignore next */ []);
|
|
9
|
+
dataText = computed(() => {
|
|
10
|
+
return this.isText() ? "-" : null;
|
|
11
|
+
}, ...ngDevMode ? [{ debugName: "dataText" }] : /* istanbul ignore next */ []);
|
|
12
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
13
|
+
minVersion: "12.0.0",
|
|
14
|
+
version: "22.2.0",
|
|
15
|
+
ngImport: i0,
|
|
16
|
+
type: Skeleton,
|
|
17
|
+
deps: [],
|
|
18
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
19
|
+
});
|
|
20
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
21
|
+
minVersion: "17.1.0",
|
|
22
|
+
version: "22.2.0",
|
|
23
|
+
type: Skeleton,
|
|
24
|
+
isStandalone: true,
|
|
25
|
+
selector: "ksd-skeleton",
|
|
26
|
+
inputs: { variant: {
|
|
27
|
+
classPropertyName: "variant",
|
|
28
|
+
publicName: "data-variant",
|
|
29
|
+
isSignal: true,
|
|
30
|
+
isRequired: false,
|
|
31
|
+
transformFunction: null
|
|
32
|
+
} },
|
|
33
|
+
host: {
|
|
34
|
+
attributes: { "aria-hidden": "true" },
|
|
35
|
+
properties: {
|
|
36
|
+
"attr.data-variant": "variant()",
|
|
37
|
+
"attr.data-text": "dataText()"
|
|
38
|
+
},
|
|
39
|
+
classAttribute: "ds-skeleton"
|
|
40
|
+
},
|
|
41
|
+
ngImport: i0,
|
|
42
|
+
template: ` <ng-content />`,
|
|
43
|
+
isInline: true,
|
|
44
|
+
styles: [":host{display:block}\n"],
|
|
45
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
49
|
+
minVersion: "12.0.0",
|
|
50
|
+
version: "22.2.0",
|
|
51
|
+
ngImport: i0,
|
|
52
|
+
type: Skeleton,
|
|
53
|
+
decorators: [{
|
|
54
|
+
type: Component,
|
|
55
|
+
args: [{
|
|
56
|
+
selector: "ksd-skeleton",
|
|
57
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
58
|
+
template: ` <ng-content />`,
|
|
59
|
+
host: {
|
|
60
|
+
class: "ds-skeleton",
|
|
61
|
+
"[attr.data-variant]": "variant()",
|
|
62
|
+
"[attr.data-text]": "dataText()",
|
|
63
|
+
"aria-hidden": "true"
|
|
64
|
+
},
|
|
65
|
+
styles: [":host{display:block}\n"]
|
|
66
|
+
}]
|
|
67
|
+
}],
|
|
68
|
+
propDecorators: { variant: [{
|
|
69
|
+
type: i0.Input,
|
|
70
|
+
args: [{
|
|
71
|
+
isSignal: true,
|
|
72
|
+
alias: "data-variant",
|
|
73
|
+
required: false
|
|
74
|
+
}]
|
|
75
|
+
}] }
|
|
76
|
+
});
|
|
34
77
|
export { Skeleton };
|
|
35
|
-
|
|
78
|
+
|
|
79
|
+
//# sourceMappingURL=ks-digital-designsystem-angular-skeleton.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ks-digital-designsystem-angular-skeleton.mjs","
|
|
1
|
+
{"version":3,"file":"ks-digital-designsystem-angular-skeleton.mjs","names":[],"sources":["../../../../packages/angular/skeleton/src/skeleton.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n} from '@angular/core'\n\n/**\n * Skeleton is used to represent a draft of a page while the content loads.\n */\n@Component({\n selector: 'ksd-skeleton',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: ` <ng-content />`,\n host: {\n class: 'ds-skeleton',\n '[attr.data-variant]': 'variant()',\n '[attr.data-text]': 'dataText()',\n 'aria-hidden': 'true',\n },\n styles: `\n :host {\n display: block;\n }\n `,\n})\nexport class Skeleton {\n /**\n * Specify which variant to use\n * @default 'rectangle'\n */\n readonly variant = input<'rectangle' | 'circle' | 'text'>('rectangle', {\n alias: 'data-variant',\n })\n\n readonly isText = computed(() => this.variant() === 'text')\n\n readonly dataText = computed(() => {\n return this.isText() ? '-' : null\n })\n}\n"],"mappings":";;AA0BA,IAAa,WAAb,MAAa,SAAQ;CAKV,UAAU,MAAuC,aAAW;EAAA,GAAA,YAAA,EAAA,WAAA,UAAA,+BAAA,CAAA;EACnE,OAAO;CAAc,CAAA;CAGd,SAAS,eAAe,KAAK,QAAO,MAAO,QAAO,GAAA,YAAA,CAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;CAElD,WAAW,eAAc;EAChC,OAAO,KAAK,OAAM,IAAK,MAAM;CAC/B,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAbS,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAQ,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAR,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAQ,cAAA;EAAA,UAAA;EAAA,QAAA,EAAA,SAAA;GAAA,mBAAA;GAAA,YAAA;GAAA,UAAA;GAAA,YAAA;GAAA,mBAAA;EAAA,EAAA;EAAA,MAAA;GAAA,YAAA,EAAA,eAAA,OAAA;GAAA,YAAA;IAAA,qBAAA;IAAA,kBAAA;GAAA;GAA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