@ks-digital/designsystem-angular 0.0.1-alpha.24 → 0.0.1-alpha.27
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/README.md +3 -3
- package/{dist/fesm2022 → fesm2022}/ks-digital-designsystem-angular.mjs +165 -159
- package/fesm2022/ks-digital-designsystem-angular.mjs.map +1 -0
- package/{dist/index.d.ts → index.d.ts} +15 -15
- package/package.json +15 -29
- package/dist/README.md +0 -55
- package/dist/fesm2022/ks-digital-designsystem-angular.mjs.map +0 -1
|
@@ -16,19 +16,19 @@ class CommonInputs {
|
|
|
16
16
|
* Changes size for descendant Designsystemet components. Select from predefined sizes.
|
|
17
17
|
* @attribute data-size
|
|
18
18
|
*/
|
|
19
|
-
dataSize = input(undefined, { alias: 'data-size' });
|
|
19
|
+
dataSize = input(undefined, ...(ngDevMode ? [{ debugName: "dataSize", alias: 'data-size' }] : [{ alias: 'data-size' }]));
|
|
20
20
|
/**
|
|
21
21
|
* Changes color for descendant Designsystemet components.
|
|
22
22
|
* Select from predefined colors and colors defined using theme.designsystemet.no.
|
|
23
23
|
* @attribute data-color
|
|
24
24
|
*/
|
|
25
|
-
dataColor = input(undefined, { alias: 'data-color' });
|
|
26
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
27
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.
|
|
25
|
+
dataColor = input(undefined, ...(ngDevMode ? [{ debugName: "dataColor", alias: 'data-color' }] : [{ alias: 'data-color' }]));
|
|
26
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: CommonInputs, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
27
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.9", type: CommonInputs, isStandalone: true, inputs: { dataSize: { classPropertyName: "dataSize", publicName: "data-size", isSignal: true, isRequired: false, transformFunction: null }, dataColor: { classPropertyName: "dataColor", publicName: "data-color", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
|
|
28
28
|
}
|
|
29
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
29
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: CommonInputs, decorators: [{
|
|
30
30
|
type: Directive
|
|
31
|
-
}] });
|
|
31
|
+
}], propDecorators: { dataSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "data-size", required: false }] }], dataColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "data-color", required: false }] }] } });
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* Alerts are used to inform users about important information, warnings, errors, or success.
|
|
@@ -38,11 +38,11 @@ class Alert {
|
|
|
38
38
|
* The color variant of the alert.
|
|
39
39
|
*/
|
|
40
40
|
/* eslint-disable-next-line @angular-eslint/no-input-rename */
|
|
41
|
-
dataColor = input(undefined, { alias: 'data-color' });
|
|
42
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
43
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.
|
|
41
|
+
dataColor = input(undefined, ...(ngDevMode ? [{ debugName: "dataColor", alias: 'data-color' }] : [{ alias: 'data-color' }]));
|
|
42
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Alert, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
43
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.9", type: Alert, isStandalone: true, selector: "ksd-alert", inputs: { dataColor: { classPropertyName: "dataColor", publicName: "data-color", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "ds-alert" }, hostDirectives: [{ directive: CommonInputs, inputs: ["data-size", "data-size"] }], ngImport: i0, template: ` <ng-content />`, isInline: true, styles: [":host{--dsc-alert-icon-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M128,24A104,104,0,1,0,232,128A104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z'/%3E%3C/svg%3E\")}:host[data-color=warning]{--dsc-alert-icon-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M120,136V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0ZM232,91.55v72.9a15.86,15.86,0,0,1-4.69,11.31l-51.55,51.55A15.86,15.86,0,0,1,164.45,232H91.55a15.86,15.86,0,0,1-11.31-4.69L28.69,175.76A15.86,15.86,0,0,1,24,164.45V91.55a15.86,15.86,0,0,1,4.69-11.31L80.24,28.69A15.86,15.86,0,0,1,91.55,24h72.9a15.86,15.86,0,0,1,11.31,4.69l51.55,51.55A15.86,15.86,0,0,1,232,91.55Zm-16,0L164.45,40H91.55L40,91.55v72.9L91.55,216h72.9L216,164.45ZM128,160a12,12,0,1,0,12,12A12,12,0,0,0,128,160Z'/%3E%3C/svg%3E\")}:host[data-color=success]{--dsc-alert-icon-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z'%3E%3C/path%3E%3C/svg%3E\")}:host[data-color=danger]{--dsc-alert-icon-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M165.66,101.66,139.31,128l26.35,26.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z'%3E%3C/path%3E%3C/svg%3E\")}\n"] });
|
|
44
44
|
}
|
|
45
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
45
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Alert, decorators: [{
|
|
46
46
|
type: Component,
|
|
47
47
|
args: [{ selector: 'ksd-alert', template: ` <ng-content />`, host: {
|
|
48
48
|
class: 'ds-alert',
|
|
@@ -52,31 +52,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
52
52
|
inputs: ['data-size'],
|
|
53
53
|
},
|
|
54
54
|
], styles: [":host{--dsc-alert-icon-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M128,24A104,104,0,1,0,232,128A104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z'/%3E%3C/svg%3E\")}:host[data-color=warning]{--dsc-alert-icon-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M120,136V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0ZM232,91.55v72.9a15.86,15.86,0,0,1-4.69,11.31l-51.55,51.55A15.86,15.86,0,0,1,164.45,232H91.55a15.86,15.86,0,0,1-11.31-4.69L28.69,175.76A15.86,15.86,0,0,1,24,164.45V91.55a15.86,15.86,0,0,1,4.69-11.31L80.24,28.69A15.86,15.86,0,0,1,91.55,24h72.9a15.86,15.86,0,0,1,11.31,4.69l51.55,51.55A15.86,15.86,0,0,1,232,91.55Zm-16,0L164.45,40H91.55L40,91.55v72.9L91.55,216h72.9L216,164.45ZM128,160a12,12,0,1,0,12,12A12,12,0,0,0,128,160Z'/%3E%3C/svg%3E\")}:host[data-color=success]{--dsc-alert-icon-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z'%3E%3C/path%3E%3C/svg%3E\")}:host[data-color=danger]{--dsc-alert-icon-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M165.66,101.66,139.31,128l26.35,26.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z'%3E%3C/path%3E%3C/svg%3E\")}\n"] }]
|
|
55
|
-
}] });
|
|
55
|
+
}], propDecorators: { dataColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "data-color", required: false }] }] } });
|
|
56
56
|
|
|
57
57
|
/* eslint-disable @angular-eslint/no-input-rename */
|
|
58
58
|
class Spinner {
|
|
59
59
|
/**
|
|
60
60
|
* Aria-label for the spinner
|
|
61
61
|
*/
|
|
62
|
-
ariaLabel = input(undefined, { alias: 'aria-label' });
|
|
62
|
+
ariaLabel = input(undefined, ...(ngDevMode ? [{ debugName: "ariaLabel", alias: 'aria-label' }] : [{ alias: 'aria-label' }]));
|
|
63
63
|
/**
|
|
64
64
|
* Aria-label for the spinner
|
|
65
65
|
*/
|
|
66
|
-
dataSize = input(undefined, { alias: 'data-size' });
|
|
66
|
+
dataSize = input(undefined, ...(ngDevMode ? [{ debugName: "dataSize", alias: 'data-size' }] : [{ alias: 'data-size' }]));
|
|
67
67
|
/**
|
|
68
68
|
* Aria-label for the spinner
|
|
69
69
|
*/
|
|
70
|
-
dataColor = input(undefined, { alias: 'data-color' });
|
|
70
|
+
dataColor = input(undefined, ...(ngDevMode ? [{ debugName: "dataColor", alias: 'data-color' }] : [{ alias: 'data-color' }]));
|
|
71
71
|
/**
|
|
72
72
|
* Aria-hidden for the spinner
|
|
73
73
|
*/
|
|
74
|
-
ariaHidden = input(undefined, {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
static
|
|
74
|
+
ariaHidden = input(undefined, ...(ngDevMode ? [{ debugName: "ariaHidden", transform: booleanAttribute,
|
|
75
|
+
alias: 'aria-hidden' }] : [{
|
|
76
|
+
transform: booleanAttribute,
|
|
77
|
+
alias: 'aria-hidden',
|
|
78
|
+
}]));
|
|
79
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Spinner, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
80
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.9", type: Spinner, isStandalone: true, selector: "ksd-spinner", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, dataSize: { classPropertyName: "dataSize", publicName: "data-size", isSignal: true, isRequired: false, transformFunction: null }, dataColor: { classPropertyName: "dataColor", publicName: "data-color", isSignal: true, isRequired: false, transformFunction: null }, ariaHidden: { classPropertyName: "ariaHidden", publicName: "aria-hidden", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
80
81
|
<svg
|
|
81
82
|
class="ds-spinner"
|
|
82
83
|
role="img"
|
|
@@ -103,7 +104,7 @@ class Spinner {
|
|
|
103
104
|
</svg>
|
|
104
105
|
`, isInline: true, styles: [":host{display:contents}\n"] });
|
|
105
106
|
}
|
|
106
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
107
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Spinner, decorators: [{
|
|
107
108
|
type: Component,
|
|
108
109
|
args: [{ selector: 'ksd-spinner', template: `
|
|
109
110
|
<svg
|
|
@@ -131,38 +132,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
131
132
|
/>
|
|
132
133
|
</svg>
|
|
133
134
|
`, styles: [":host{display:contents}\n"] }]
|
|
134
|
-
}] });
|
|
135
|
+
}], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], dataSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "data-size", required: false }] }], dataColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "data-color", required: false }] }], ariaHidden: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-hidden", required: false }] }] } });
|
|
135
136
|
|
|
136
137
|
class Button {
|
|
137
138
|
/**
|
|
138
139
|
* Specify which variant to use
|
|
139
140
|
* @default 'primary'
|
|
140
141
|
*/
|
|
141
|
-
variant = input('primary');
|
|
142
|
+
variant = input('primary', ...(ngDevMode ? [{ debugName: "variant" }] : []));
|
|
142
143
|
/**
|
|
143
144
|
* Toggle loading state.
|
|
144
145
|
* Pass an element if you want to display a custom loader.
|
|
145
146
|
*
|
|
146
147
|
* @default false
|
|
147
148
|
*/
|
|
148
|
-
loading = input(false, { transform: booleanAttribute });
|
|
149
|
+
loading = input(false, ...(ngDevMode ? [{ debugName: "loading", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
149
150
|
/**
|
|
150
151
|
* Disables element
|
|
151
152
|
*/
|
|
152
|
-
disabled = input(false, { transform: booleanAttribute });
|
|
153
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
153
154
|
/**
|
|
154
155
|
* If this is a button with only an icon
|
|
155
156
|
*/
|
|
156
|
-
icon = input(false, { transform: booleanAttribute });
|
|
157
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
158
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
157
|
+
icon = input(false, ...(ngDevMode ? [{ debugName: "icon", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
158
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Button, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
159
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: Button, isStandalone: true, selector: "button[ksd-button], a[ksd-button]", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "button" }, properties: { "attr.data-variant": "variant()", "attr.data-icon": "icon() || null", "attr.disabled": "disabled() ? true : null", "attr.aria-busy": "loading() ? true : null" }, classAttribute: "ds-button" }, hostDirectives: [{ directive: CommonInputs, inputs: ["data-size", "data-size", "data-color", "data-color"] }], ngImport: i0, template: `
|
|
159
160
|
@if (loading()) {
|
|
160
161
|
<ksd-spinner aria-hidden="true" />
|
|
161
162
|
}
|
|
162
163
|
<ng-content />
|
|
163
164
|
`, isInline: true, styles: [":host ::ng-deep>*{display:inline-flex}\n"], dependencies: [{ kind: "component", type: Spinner, selector: "ksd-spinner", inputs: ["aria-label", "data-size", "data-color", "aria-hidden"] }] });
|
|
164
165
|
}
|
|
165
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
166
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Button, decorators: [{
|
|
166
167
|
type: Component,
|
|
167
168
|
args: [{ selector: 'button[ksd-button], a[ksd-button]', hostDirectives: [
|
|
168
169
|
{
|
|
@@ -182,14 +183,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
182
183
|
}
|
|
183
184
|
<ng-content />
|
|
184
185
|
`, styles: [":host ::ng-deep>*{display:inline-flex}\n"] }]
|
|
185
|
-
}] });
|
|
186
|
+
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }] } });
|
|
186
187
|
|
|
187
188
|
class Card {
|
|
188
189
|
/**
|
|
189
190
|
* Change the background color of the card
|
|
190
191
|
* @default 'default'
|
|
191
192
|
*/
|
|
192
|
-
variant = input('default');
|
|
193
|
+
variant = input('default', ...(ngDevMode ? [{ debugName: "variant" }] : []));
|
|
193
194
|
elementRef = inject(ElementRef);
|
|
194
195
|
projectedLink() {
|
|
195
196
|
const el = this.elementRef.nativeElement;
|
|
@@ -206,10 +207,10 @@ class Card {
|
|
|
206
207
|
link.click();
|
|
207
208
|
}
|
|
208
209
|
};
|
|
209
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
210
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.
|
|
210
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Card, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
211
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.9", type: Card, isStandalone: true, selector: "[ksd-card]", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "handleClick($event)" }, properties: { "attr.data-variant": "variant()" }, classAttribute: "ds-card" }, hostDirectives: [{ directive: CommonInputs, inputs: ["data-size", "data-size", "data-color", "data-color"] }], ngImport: i0, template: ` <ng-content /> `, isInline: true });
|
|
211
212
|
}
|
|
212
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
213
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Card, decorators: [{
|
|
213
214
|
type: Component,
|
|
214
215
|
args: [{
|
|
215
216
|
selector: '[ksd-card]',
|
|
@@ -226,13 +227,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
226
227
|
'(click)': 'handleClick($event)',
|
|
227
228
|
},
|
|
228
229
|
}]
|
|
229
|
-
}] });
|
|
230
|
+
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }] } });
|
|
230
231
|
|
|
231
232
|
class CardBlock {
|
|
232
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
233
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
233
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: CardBlock, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
234
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: CardBlock, isStandalone: true, selector: "[ksd-card-block]", host: { classAttribute: "ds-card__block" }, ngImport: i0, template: `<ng-content />`, isInline: true });
|
|
234
235
|
}
|
|
235
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
236
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: CardBlock, decorators: [{
|
|
236
237
|
type: Component,
|
|
237
238
|
args: [{
|
|
238
239
|
selector: '[ksd-card-block]',
|
|
@@ -244,27 +245,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
244
245
|
}] });
|
|
245
246
|
|
|
246
247
|
class Details {
|
|
247
|
-
dataSize = input(undefined, {
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
248
|
+
dataSize = input(undefined, ...(ngDevMode ? [{ debugName: "dataSize",
|
|
249
|
+
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
250
|
+
alias: 'data-size' }] : [{
|
|
251
|
+
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
252
|
+
alias: 'data-size',
|
|
253
|
+
}]));
|
|
254
|
+
dataColor = input(undefined, ...(ngDevMode ? [{ debugName: "dataColor",
|
|
255
|
+
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
256
|
+
alias: 'data-color' }] : [{
|
|
257
|
+
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
258
|
+
alias: 'data-color',
|
|
259
|
+
}]));
|
|
260
|
+
variant = input('default', ...(ngDevMode ? [{ debugName: "variant" }] : []));
|
|
261
|
+
defaultOpen = input(false, ...(ngDevMode ? [{ debugName: "defaultOpen" }] : []));
|
|
262
|
+
open = input(undefined, ...(ngDevMode ? [{ debugName: "open" }] : []));
|
|
258
263
|
toggled = output();
|
|
259
|
-
detailsRef = viewChild('detailsRef');
|
|
264
|
+
detailsRef = viewChild('detailsRef', ...(ngDevMode ? [{ debugName: "detailsRef" }] : []));
|
|
260
265
|
onToggle(event) {
|
|
261
266
|
const details = this.detailsRef()?.nativeElement;
|
|
262
267
|
if (details && details.open !== this.open()) {
|
|
263
268
|
this.toggled.emit(event);
|
|
264
269
|
}
|
|
265
270
|
}
|
|
266
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
267
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.
|
|
271
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Details, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
272
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.9", type: Details, isStandalone: true, selector: "ksd-details", inputs: { dataSize: { classPropertyName: "dataSize", publicName: "data-size", isSignal: true, isRequired: false, transformFunction: null }, dataColor: { classPropertyName: "dataColor", publicName: "data-color", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, defaultOpen: { classPropertyName: "defaultOpen", publicName: "defaultOpen", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { toggled: "toggled" }, viewQueries: [{ propertyName: "detailsRef", first: true, predicate: ["detailsRef"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
268
273
|
<u-details
|
|
269
274
|
#detailsRef
|
|
270
275
|
class="ds-details"
|
|
@@ -283,7 +288,7 @@ class Details {
|
|
|
283
288
|
</u-details>
|
|
284
289
|
`, isInline: true, styles: [".ds-card>:host(:last-of-type)>.ds-details{border-bottom:0}.ds-card>:host(:first-of-type)>.ds-details{border-top:0}:host(:not(:first-of-type))>.ds-details{border-top:0;margin-top:0}\n"] });
|
|
285
290
|
}
|
|
286
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
291
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Details, decorators: [{
|
|
287
292
|
type: Component,
|
|
288
293
|
args: [{ selector: 'ksd-details', schemas: [CUSTOM_ELEMENTS_SCHEMA], template: `
|
|
289
294
|
<u-details
|
|
@@ -303,13 +308,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
303
308
|
</div>
|
|
304
309
|
</u-details>
|
|
305
310
|
`, styles: [".ds-card>:host(:last-of-type)>.ds-details{border-bottom:0}.ds-card>:host(:first-of-type)>.ds-details{border-top:0}:host(:not(:first-of-type))>.ds-details{border-top:0;margin-top:0}\n"] }]
|
|
306
|
-
}] });
|
|
311
|
+
}], propDecorators: { dataSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "data-size", required: false }] }], dataColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "data-color", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], defaultOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultOpen", required: false }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }], toggled: [{ type: i0.Output, args: ["toggled"] }], detailsRef: [{ type: i0.ViewChild, args: ['detailsRef', { isSignal: true }] }] } });
|
|
307
312
|
|
|
308
313
|
class DetailsContent {
|
|
309
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
310
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
314
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: DetailsContent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
315
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: DetailsContent, isStandalone: true, selector: "ksd-details-content", ngImport: i0, template: `<ng-content />`, isInline: true });
|
|
311
316
|
}
|
|
312
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
317
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: DetailsContent, decorators: [{
|
|
313
318
|
type: Component,
|
|
314
319
|
args: [{
|
|
315
320
|
selector: 'ksd-details-content',
|
|
@@ -318,10 +323,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
318
323
|
}] });
|
|
319
324
|
|
|
320
325
|
class DetailsSummary {
|
|
321
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
322
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
326
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: DetailsSummary, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
327
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: DetailsSummary, isStandalone: true, selector: "ksd-details-summary", ngImport: i0, template: `<ng-content />`, isInline: true });
|
|
323
328
|
}
|
|
324
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
329
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: DetailsSummary, decorators: [{
|
|
325
330
|
type: Component,
|
|
326
331
|
args: [{
|
|
327
332
|
selector: 'ksd-details-summary',
|
|
@@ -333,19 +338,19 @@ class FieldState {
|
|
|
333
338
|
/**
|
|
334
339
|
* Whether the field counter has exceeded its limit
|
|
335
340
|
*/
|
|
336
|
-
hasExceededCounter = signal(false);
|
|
341
|
+
hasExceededCounter = signal(false, ...(ngDevMode ? [{ debugName: "hasExceededCounter" }] : []));
|
|
337
342
|
/**
|
|
338
343
|
* Whether the field has errors projected from the outside
|
|
339
344
|
*/
|
|
340
|
-
hasProjectedErrors = signal(false);
|
|
345
|
+
hasProjectedErrors = signal(false, ...(ngDevMode ? [{ debugName: "hasProjectedErrors" }] : []));
|
|
341
346
|
/**
|
|
342
347
|
* Whether the field has any errors associated with it
|
|
343
348
|
*/
|
|
344
|
-
hasError = computed(() => this.hasExceededCounter() || this.hasProjectedErrors());
|
|
345
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
346
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
349
|
+
hasError = computed(() => this.hasExceededCounter() || this.hasProjectedErrors(), ...(ngDevMode ? [{ debugName: "hasError" }] : []));
|
|
350
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: FieldState, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
351
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: FieldState });
|
|
347
352
|
}
|
|
348
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
353
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: FieldState, decorators: [{
|
|
349
354
|
type: Injectable
|
|
350
355
|
}] });
|
|
351
356
|
|
|
@@ -353,36 +358,37 @@ class Input {
|
|
|
353
358
|
/**
|
|
354
359
|
* The value of the input
|
|
355
360
|
*/
|
|
356
|
-
value = signal('');
|
|
361
|
+
value = signal('', ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
357
362
|
/**
|
|
358
363
|
* Whether the input is readonly
|
|
359
364
|
*/
|
|
360
|
-
readonly = input(false, { transform: booleanAttribute });
|
|
365
|
+
readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
361
366
|
/**
|
|
362
367
|
* Disables element
|
|
363
368
|
*/
|
|
364
|
-
disabled = input(false, { transform: booleanAttribute });
|
|
369
|
+
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
365
370
|
/**
|
|
366
371
|
* Whether the element is invalid.
|
|
367
372
|
*/
|
|
368
|
-
ariaInvalid = input(false, {
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
373
|
+
ariaInvalid = input(false, ...(ngDevMode ? [{ debugName: "ariaInvalid", transform: booleanAttribute,
|
|
374
|
+
alias: 'aria-invalid' }] : [{
|
|
375
|
+
transform: booleanAttribute,
|
|
376
|
+
alias: 'aria-invalid',
|
|
377
|
+
}]));
|
|
372
378
|
/**
|
|
373
379
|
* Displays a character counter. pass a number to set a limit.
|
|
374
380
|
*/
|
|
375
|
-
counter = input(0, { transform: numberAttribute });
|
|
381
|
+
counter = input(0, ...(ngDevMode ? [{ debugName: "counter", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
376
382
|
fieldState = inject(FieldState, { optional: true });
|
|
377
383
|
onClick(event) {
|
|
378
384
|
if (this.readonly()) {
|
|
379
385
|
event.preventDefault();
|
|
380
386
|
}
|
|
381
387
|
}
|
|
382
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
383
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.
|
|
388
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Input, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
389
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.9", type: Input, isStandalone: true, selector: "input[ksd-input], textarea[ksd-input], select[ksd-input]", inputs: { readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, ariaInvalid: { classPropertyName: "ariaInvalid", publicName: "aria-invalid", isSignal: true, isRequired: false, transformFunction: null }, counter: { classPropertyName: "counter", publicName: "counter", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "onClick($event)", "input": "value.set($event.target.value)" }, properties: { "attr.readonly": "readonly() ? true : null", "attr.disabled": "disabled() ? true : null", "attr.aria-invalid": "ariaInvalid() ? true : (fieldState?.hasError() ? true: null)" }, classAttribute: "ds-input" }, hostDirectives: [{ directive: CommonInputs, inputs: ["data-size", "data-size", "data-color", "data-color"] }], ngImport: i0 });
|
|
384
390
|
}
|
|
385
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
391
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Input, decorators: [{
|
|
386
392
|
type: Directive,
|
|
387
393
|
args: [{
|
|
388
394
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -402,16 +408,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
402
408
|
'(input)': 'value.set($event.target.value)',
|
|
403
409
|
},
|
|
404
410
|
}]
|
|
405
|
-
}] });
|
|
411
|
+
}], propDecorators: { readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], ariaInvalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-invalid", required: false }] }], counter: [{ type: i0.Input, args: [{ isSignal: true, alias: "counter", required: false }] }] } });
|
|
406
412
|
|
|
407
413
|
class Label {
|
|
408
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
409
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
414
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Label, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
415
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: Label, isStandalone: true, selector: "ksd-label", hostDirectives: [{ directive: CommonInputs, inputs: ["data-size", "data-size", "data-color", "data-color"] }], ngImport: i0, template: `
|
|
410
416
|
<!-- eslint-disable @angular-eslint/template/label-has-associated-control -- Fieldobserver handles binding the label to the input -->
|
|
411
417
|
<label class="ds-label"><ng-content /></label>
|
|
412
418
|
`, isInline: true });
|
|
413
419
|
}
|
|
414
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
420
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Label, decorators: [{
|
|
415
421
|
type: Component,
|
|
416
422
|
args: [{
|
|
417
423
|
selector: 'ksd-label',
|
|
@@ -429,10 +435,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
429
435
|
}] });
|
|
430
436
|
|
|
431
437
|
class ValidationMessage {
|
|
432
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
433
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.
|
|
438
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ValidationMessage, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
439
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.9", type: ValidationMessage, isStandalone: true, selector: "[ksd-validation-message]", host: { attributes: { "data-field": "validation" }, classAttribute: "ds-validation-message" }, ngImport: i0 });
|
|
434
440
|
}
|
|
435
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
441
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ValidationMessage, decorators: [{
|
|
436
442
|
type: Directive,
|
|
437
443
|
args: [{
|
|
438
444
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -449,23 +455,23 @@ class FieldCounter {
|
|
|
449
455
|
* The maximum allowed characters.
|
|
450
456
|
*
|
|
451
457
|
**/
|
|
452
|
-
limit = input.required();
|
|
458
|
+
limit = input.required(...(ngDevMode ? [{ debugName: "limit" }] : []));
|
|
453
459
|
/**
|
|
454
460
|
* How many characters have been typed.
|
|
455
461
|
*
|
|
456
462
|
**/
|
|
457
|
-
count = input.required();
|
|
458
|
-
remainder = computed(() => this.limit() - this.count());
|
|
459
|
-
excessCount = computed(() => Math.abs(this.remainder()));
|
|
460
|
-
hasExceededLimit = computed(() => this.count() > this.limit());
|
|
463
|
+
count = input.required(...(ngDevMode ? [{ debugName: "count" }] : []));
|
|
464
|
+
remainder = computed(() => this.limit() - this.count(), ...(ngDevMode ? [{ debugName: "remainder" }] : []));
|
|
465
|
+
excessCount = computed(() => Math.abs(this.remainder()), ...(ngDevMode ? [{ debugName: "excessCount" }] : []));
|
|
466
|
+
hasExceededLimit = computed(() => this.count() > this.limit(), ...(ngDevMode ? [{ debugName: "hasExceededLimit" }] : []));
|
|
461
467
|
fieldState = inject(FieldState);
|
|
462
468
|
constructor() {
|
|
463
469
|
effect(() => {
|
|
464
470
|
this.fieldState.hasExceededCounter.set(this.hasExceededLimit());
|
|
465
471
|
});
|
|
466
472
|
}
|
|
467
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
468
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
473
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: FieldCounter, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
474
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: FieldCounter, isStandalone: true, selector: "ksd-field-counter", inputs: { limit: { classPropertyName: "limit", publicName: "limit", isSignal: true, isRequired: true, transformFunction: null }, count: { classPropertyName: "count", publicName: "count", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
|
|
469
475
|
<div data-field="description" class="ds-sr-only" aria-live="polite">
|
|
470
476
|
@if (hasExceededLimit()) {
|
|
471
477
|
{{ excessCount() }} tegn for mye
|
|
@@ -478,7 +484,7 @@ class FieldCounter {
|
|
|
478
484
|
}
|
|
479
485
|
`, isInline: true, styles: [":host>*{margin-top:var(--dsc-field-content-spacing)}\n"], dependencies: [{ kind: "directive", type: ValidationMessage, selector: "[ksd-validation-message]" }] });
|
|
480
486
|
}
|
|
481
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
487
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: FieldCounter, decorators: [{
|
|
482
488
|
type: Component,
|
|
483
489
|
args: [{ selector: 'ksd-field-counter', imports: [ValidationMessage], template: `
|
|
484
490
|
<div data-field="description" class="ds-sr-only" aria-live="polite">
|
|
@@ -492,7 +498,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
492
498
|
<p data-field="validation">{{ remainder() }} tegn igjen</p>
|
|
493
499
|
}
|
|
494
500
|
`, styles: [":host>*{margin-top:var(--dsc-field-content-spacing)}\n"] }]
|
|
495
|
-
}], ctorParameters: () => [] });
|
|
501
|
+
}], ctorParameters: () => [], propDecorators: { limit: [{ type: i0.Input, args: [{ isSignal: true, alias: "limit", required: true }] }], count: [{ type: i0.Input, args: [{ isSignal: true, alias: "count", required: true }] }] } });
|
|
496
502
|
|
|
497
503
|
/**
|
|
498
504
|
* Lifted from Designsystemet core repo.
|
|
@@ -613,15 +619,15 @@ class Field {
|
|
|
613
619
|
* Position of toggle inputs (radio, checkbox, switch) in field
|
|
614
620
|
* @default start
|
|
615
621
|
*/
|
|
616
|
-
position = input('start');
|
|
622
|
+
position = input('start', ...(ngDevMode ? [{ debugName: "position" }] : []));
|
|
617
623
|
fieldState = inject(FieldState);
|
|
618
|
-
input = contentChild(Input);
|
|
619
|
-
label = contentChild(Label);
|
|
620
|
-
projectedErrors = contentChildren(ValidationMessage);
|
|
624
|
+
input = contentChild(Input, ...(ngDevMode ? [{ debugName: "input" }] : []));
|
|
625
|
+
label = contentChild(Label, ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
626
|
+
projectedErrors = contentChildren(ValidationMessage, ...(ngDevMode ? [{ debugName: "projectedErrors" }] : []));
|
|
621
627
|
el = inject(ElementRef);
|
|
622
|
-
count = computed(() => this.input()?.value().length);
|
|
623
|
-
limit = computed(() => this.input()?.counter());
|
|
624
|
-
hasCounter = computed(() => this.limit());
|
|
628
|
+
count = computed(() => this.input()?.value().length, ...(ngDevMode ? [{ debugName: "count" }] : []));
|
|
629
|
+
limit = computed(() => this.input()?.counter(), ...(ngDevMode ? [{ debugName: "limit" }] : []));
|
|
630
|
+
hasCounter = computed(() => this.limit(), ...(ngDevMode ? [{ debugName: "hasCounter" }] : []));
|
|
625
631
|
constructor() {
|
|
626
632
|
afterNextRender(() => {
|
|
627
633
|
fieldObserver(this.el.nativeElement);
|
|
@@ -630,15 +636,15 @@ class Field {
|
|
|
630
636
|
this.fieldState.hasProjectedErrors.set(this.projectedErrors().length > 0);
|
|
631
637
|
});
|
|
632
638
|
}
|
|
633
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
634
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
639
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Field, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
640
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: Field, isStandalone: true, selector: "ksd-field", inputs: { position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.dataPosition": "position()" }, classAttribute: "ds-field" }, providers: [FieldState], queries: [{ propertyName: "input", first: true, predicate: Input, descendants: true, isSignal: true }, { propertyName: "label", first: true, predicate: Label, descendants: true, isSignal: true }, { propertyName: "projectedErrors", predicate: ValidationMessage, isSignal: true }], hostDirectives: [{ directive: CommonInputs, inputs: ["data-size", "data-size", "data-color", "data-color"] }], ngImport: i0, template: `
|
|
635
641
|
<ng-content />
|
|
636
642
|
@if (hasCounter()) {
|
|
637
643
|
<ksd-field-counter [limit]="limit() ?? 0" [count]="count() ?? 0" />
|
|
638
644
|
}
|
|
639
645
|
`, isInline: true, dependencies: [{ kind: "component", type: FieldCounter, selector: "ksd-field-counter", inputs: ["limit", "count"] }] });
|
|
640
646
|
}
|
|
641
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
647
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Field, decorators: [{
|
|
642
648
|
type: Component,
|
|
643
649
|
args: [{
|
|
644
650
|
selector: 'ksd-field',
|
|
@@ -661,13 +667,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
661
667
|
imports: [FieldCounter],
|
|
662
668
|
providers: [FieldState],
|
|
663
669
|
}]
|
|
664
|
-
}], ctorParameters: () => [] });
|
|
670
|
+
}], ctorParameters: () => [], propDecorators: { position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], input: [{ type: i0.ContentChild, args: [i0.forwardRef(() => Input), { isSignal: true }] }], label: [{ type: i0.ContentChild, args: [i0.forwardRef(() => Label), { isSignal: true }] }], projectedErrors: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => ValidationMessage), { isSignal: true }] }] } });
|
|
665
671
|
|
|
666
672
|
class FieldDescription {
|
|
667
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
668
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
673
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: FieldDescription, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
674
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: FieldDescription, isStandalone: true, selector: "[ksd-field-description]", host: { attributes: { "data-field": "description" } }, ngImport: i0, template: `<ng-content />`, isInline: true });
|
|
669
675
|
}
|
|
670
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
676
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: FieldDescription, decorators: [{
|
|
671
677
|
type: Component,
|
|
672
678
|
args: [{
|
|
673
679
|
selector: '[ksd-field-description]',
|
|
@@ -679,10 +685,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
679
685
|
}] });
|
|
680
686
|
|
|
681
687
|
class FieldError {
|
|
682
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
683
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
688
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: FieldError, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
689
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: FieldError, isStandalone: true, selector: "[ksd-error]", hostDirectives: [{ directive: ValidationMessage }], ngImport: i0, template: `<ng-content />`, isInline: true });
|
|
684
690
|
}
|
|
685
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
691
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: FieldError, decorators: [{
|
|
686
692
|
type: Component,
|
|
687
693
|
args: [{
|
|
688
694
|
selector: '[ksd-error]',
|
|
@@ -696,10 +702,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
696
702
|
}] });
|
|
697
703
|
|
|
698
704
|
class Fieldset {
|
|
699
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
700
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
705
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Fieldset, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
706
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: Fieldset, isStandalone: true, selector: "fieldset[ksd-fieldset]", host: { attributes: { "role": "fieldset" }, classAttribute: "ds-fieldset" }, ngImport: i0, template: ` <ng-content /> `, isInline: true });
|
|
701
707
|
}
|
|
702
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
708
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Fieldset, decorators: [{
|
|
703
709
|
type: Component,
|
|
704
710
|
args: [{
|
|
705
711
|
selector: 'fieldset[ksd-fieldset]',
|
|
@@ -712,10 +718,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
712
718
|
}] });
|
|
713
719
|
|
|
714
720
|
class FieldsetDescription {
|
|
715
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
716
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
721
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: FieldsetDescription, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
722
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: FieldsetDescription, isStandalone: true, selector: "p[ksd-fieldset-description]", ngImport: i0, template: `<ng-content />`, isInline: true });
|
|
717
723
|
}
|
|
718
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
724
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: FieldsetDescription, decorators: [{
|
|
719
725
|
type: Component,
|
|
720
726
|
args: [{
|
|
721
727
|
selector: 'p[ksd-fieldset-description]',
|
|
@@ -725,10 +731,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
725
731
|
}] });
|
|
726
732
|
|
|
727
733
|
class FieldsetLegend {
|
|
728
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
729
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
734
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: FieldsetLegend, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
735
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: FieldsetLegend, isStandalone: true, selector: "legend[ksd-fieldset-legend]", host: { attributes: { "role": "legend" }, classAttribute: "ds-label" }, ngImport: i0, template: ` <ng-content /> `, isInline: true });
|
|
730
736
|
}
|
|
731
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
737
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: FieldsetLegend, decorators: [{
|
|
732
738
|
type: Component,
|
|
733
739
|
args: [{
|
|
734
740
|
selector: 'legend[ksd-fieldset-legend]',
|
|
@@ -741,10 +747,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
741
747
|
}] });
|
|
742
748
|
|
|
743
749
|
class Paragraph {
|
|
744
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
745
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
750
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Paragraph, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
751
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: Paragraph, isStandalone: true, selector: "p[ksd-paragraph]", host: { classAttribute: "ds-paragraph" }, ngImport: i0, template: `<ng-content />`, isInline: true });
|
|
746
752
|
}
|
|
747
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
753
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Paragraph, decorators: [{
|
|
748
754
|
type: Component,
|
|
749
755
|
args: [{
|
|
750
756
|
selector: 'p[ksd-paragraph]',
|
|
@@ -758,25 +764,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
758
764
|
/* eslint-disable @angular-eslint/no-input-rename */
|
|
759
765
|
class Popover {
|
|
760
766
|
// use popoverId instead of id since id will be put on the angular element and not the popover-div
|
|
761
|
-
popoverId = input.required();
|
|
762
|
-
placement = input('top');
|
|
763
|
-
autoPlacement = input(true, { transform: booleanAttribute });
|
|
767
|
+
popoverId = input.required(...(ngDevMode ? [{ debugName: "popoverId" }] : []));
|
|
768
|
+
placement = input('top', ...(ngDevMode ? [{ debugName: "placement" }] : []));
|
|
769
|
+
autoPlacement = input(true, ...(ngDevMode ? [{ debugName: "autoPlacement", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
764
770
|
// for controlled component
|
|
765
|
-
open = input(undefined, { transform: booleanAttribute });
|
|
771
|
+
open = input(undefined, ...(ngDevMode ? [{ debugName: "open", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
766
772
|
/*
|
|
767
773
|
the naming here is different from Designsystemet
|
|
768
774
|
since we need to use outputs for onOpen and onClose
|
|
769
775
|
*/
|
|
770
776
|
triggeredClose = output();
|
|
771
777
|
triggeredOpen = output();
|
|
772
|
-
internalOpen = signal(false);
|
|
773
|
-
controlledOpen = computed(() => this.open() ?? this.internalOpen());
|
|
774
|
-
variant = input('default');
|
|
775
|
-
dataSize = input('md', { alias: 'data-size' });
|
|
776
|
-
dataColor = input('neutral', {
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
popoverRef = viewChild('myPopover');
|
|
778
|
+
internalOpen = signal(false, ...(ngDevMode ? [{ debugName: "internalOpen" }] : []));
|
|
779
|
+
controlledOpen = computed(() => this.open() ?? this.internalOpen(), ...(ngDevMode ? [{ debugName: "controlledOpen" }] : []));
|
|
780
|
+
variant = input('default', ...(ngDevMode ? [{ debugName: "variant" }] : []));
|
|
781
|
+
dataSize = input('md', ...(ngDevMode ? [{ debugName: "dataSize", alias: 'data-size' }] : [{ alias: 'data-size' }]));
|
|
782
|
+
dataColor = input('neutral', ...(ngDevMode ? [{ debugName: "dataColor", alias: 'data-color' }] : [{
|
|
783
|
+
alias: 'data-color',
|
|
784
|
+
}]));
|
|
785
|
+
popoverRef = viewChild('myPopover', ...(ngDevMode ? [{ debugName: "popoverRef" }] : []));
|
|
780
786
|
// enable controlled component
|
|
781
787
|
controlledComponent = effect((onCleanup) => {
|
|
782
788
|
const popover = this.popoverRef()?.nativeElement;
|
|
@@ -808,7 +814,7 @@ class Popover {
|
|
|
808
814
|
document.removeEventListener('click', handleClick, true);
|
|
809
815
|
document.removeEventListener('keydown', handleKeydown);
|
|
810
816
|
});
|
|
811
|
-
}, {});
|
|
817
|
+
}, ...(ngDevMode ? [{ debugName: "controlledComponent" }] : [{}]));
|
|
812
818
|
positionPopover = effect(() => {
|
|
813
819
|
const popover = this.popoverRef()?.nativeElement;
|
|
814
820
|
const trigger = document.querySelector(`[popovertarget="${this.popoverId()}"]`);
|
|
@@ -834,7 +840,7 @@ class Popover {
|
|
|
834
840
|
});
|
|
835
841
|
});
|
|
836
842
|
}
|
|
837
|
-
}, {});
|
|
843
|
+
}, ...(ngDevMode ? [{ debugName: "positionPopover" }] : [{}]));
|
|
838
844
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
839
845
|
arrowPseudoElement = {
|
|
840
846
|
name: 'ArrowPseudoElement',
|
|
@@ -868,8 +874,8 @@ class Popover {
|
|
|
868
874
|
return data;
|
|
869
875
|
},
|
|
870
876
|
};
|
|
871
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
872
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
877
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Popover, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
878
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: Popover, isStandalone: true, selector: "ksd-popover", inputs: { popoverId: { classPropertyName: "popoverId", publicName: "popoverId", isSignal: true, isRequired: true, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null }, autoPlacement: { classPropertyName: "autoPlacement", publicName: "autoPlacement", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, dataSize: { classPropertyName: "dataSize", publicName: "data-size", isSignal: true, isRequired: false, transformFunction: null }, dataColor: { classPropertyName: "dataColor", publicName: "data-color", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { triggeredClose: "triggeredClose", triggeredOpen: "triggeredOpen" }, viewQueries: [{ propertyName: "popoverRef", first: true, predicate: ["myPopover"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
873
879
|
<div
|
|
874
880
|
#myPopover
|
|
875
881
|
popover="manual"
|
|
@@ -886,7 +892,7 @@ class Popover {
|
|
|
886
892
|
</div>
|
|
887
893
|
`, isInline: true });
|
|
888
894
|
}
|
|
889
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
895
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Popover, decorators: [{
|
|
890
896
|
type: Component,
|
|
891
897
|
args: [{
|
|
892
898
|
selector: 'ksd-popover',
|
|
@@ -908,7 +914,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
908
914
|
`,
|
|
909
915
|
imports: [],
|
|
910
916
|
}]
|
|
911
|
-
}] });
|
|
917
|
+
}], propDecorators: { popoverId: [{ type: i0.Input, args: [{ isSignal: true, alias: "popoverId", required: true }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], autoPlacement: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoPlacement", required: false }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }], triggeredClose: [{ type: i0.Output, args: ["triggeredClose"] }], triggeredOpen: [{ type: i0.Output, args: ["triggeredOpen"] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], dataSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "data-size", required: false }] }], dataColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "data-color", required: false }] }], popoverRef: [{ type: i0.ViewChild, args: ['myPopover', { isSignal: true }] }] } });
|
|
912
918
|
|
|
913
919
|
const logIfDevMode = ({ component, message, }) => {
|
|
914
920
|
if (isDevMode()) {
|
|
@@ -922,10 +928,10 @@ const logIfDevMode = ({ component, message, }) => {
|
|
|
922
928
|
* Used within Search to provide a search input.
|
|
923
929
|
*/
|
|
924
930
|
class SearchInput {
|
|
925
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
926
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.
|
|
931
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: SearchInput, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
932
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.9", type: SearchInput, isStandalone: true, selector: "input[ksd-search-input]", host: { attributes: { "type": "search", "placeholder": "" }, classAttribute: "ds-input" }, ngImport: i0 });
|
|
927
933
|
}
|
|
928
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
934
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: SearchInput, decorators: [{
|
|
929
935
|
type: Directive,
|
|
930
936
|
args: [{
|
|
931
937
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -953,7 +959,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
953
959
|
* </div>
|
|
954
960
|
*/
|
|
955
961
|
class Search {
|
|
956
|
-
input = contentChild(SearchInput);
|
|
962
|
+
input = contentChild(SearchInput, ...(ngDevMode ? [{ debugName: "input" }] : []));
|
|
957
963
|
constructor() {
|
|
958
964
|
afterNextRender(() => {
|
|
959
965
|
if (!this.input()) {
|
|
@@ -964,14 +970,14 @@ class Search {
|
|
|
964
970
|
}
|
|
965
971
|
});
|
|
966
972
|
}
|
|
967
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
968
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.
|
|
973
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Search, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
974
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.9", type: Search, isStandalone: true, selector: "ksd-search", host: { classAttribute: "ds-search" }, queries: [{ propertyName: "input", first: true, predicate: SearchInput, descendants: true, isSignal: true }], hostDirectives: [{ directive: CommonInputs, inputs: ["data-size", "data-size", "data-color", "data-color"] }], ngImport: i0, template: `
|
|
969
975
|
<ng-content select="[ksd-search-input]" />
|
|
970
976
|
<ng-content select="[ksd-search-clear]" />
|
|
971
977
|
<ng-content select="[ksd-search-button]" />
|
|
972
978
|
`, isInline: true });
|
|
973
979
|
}
|
|
974
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
980
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: Search, decorators: [{
|
|
975
981
|
type: Component,
|
|
976
982
|
args: [{
|
|
977
983
|
selector: 'ksd-search',
|
|
@@ -990,7 +996,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
990
996
|
},
|
|
991
997
|
],
|
|
992
998
|
}]
|
|
993
|
-
}], ctorParameters: () => [] });
|
|
999
|
+
}], ctorParameters: () => [], propDecorators: { input: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SearchInput), { isSignal: true }] }] } });
|
|
994
1000
|
|
|
995
1001
|
/**
|
|
996
1002
|
* Search button
|
|
@@ -1007,15 +1013,15 @@ class SearchButton {
|
|
|
1007
1013
|
*
|
|
1008
1014
|
* @default 'primary'
|
|
1009
1015
|
*/
|
|
1010
|
-
variant = input('primary');
|
|
1016
|
+
variant = input('primary', ...(ngDevMode ? [{ debugName: "variant" }] : []));
|
|
1011
1017
|
/**
|
|
1012
1018
|
* Aria label for the button
|
|
1013
1019
|
*/
|
|
1014
|
-
ariaLabel = input('', { alias: 'aria-label' });
|
|
1015
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
1016
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.
|
|
1020
|
+
ariaLabel = input('', ...(ngDevMode ? [{ debugName: "ariaLabel", alias: 'aria-label' }] : [{ alias: 'aria-label' }]));
|
|
1021
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: SearchButton, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1022
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.9", type: SearchButton, isStandalone: true, selector: "button[ksd-search-button]", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "submit" }, properties: { "attr.aria-label": "this.ariaLabel()", "attr.data-variant": "this.variant()" }, classAttribute: "ds-button" }, ngImport: i0 });
|
|
1017
1023
|
}
|
|
1018
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
1024
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: SearchButton, decorators: [{
|
|
1019
1025
|
type: Directive,
|
|
1020
1026
|
args: [{
|
|
1021
1027
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -1028,7 +1034,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
1028
1034
|
'[attr.data-variant]': 'this.variant()',
|
|
1029
1035
|
},
|
|
1030
1036
|
}]
|
|
1031
|
-
}] });
|
|
1037
|
+
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }] } });
|
|
1032
1038
|
|
|
1033
1039
|
/**
|
|
1034
1040
|
* Search clear button
|
|
@@ -1046,7 +1052,7 @@ class SearchClear {
|
|
|
1046
1052
|
* Aria label for the button
|
|
1047
1053
|
* @default 'Tøm'
|
|
1048
1054
|
*/
|
|
1049
|
-
ariaLabel = input('Tøm', { alias: 'aria-label' });
|
|
1055
|
+
ariaLabel = input('Tøm', ...(ngDevMode ? [{ debugName: "ariaLabel", alias: 'aria-label' }] : [{ alias: 'aria-label' }]));
|
|
1050
1056
|
/**
|
|
1051
1057
|
* Output to notify controlled forms that input should be cleared
|
|
1052
1058
|
*/
|
|
@@ -1067,10 +1073,10 @@ class SearchClear {
|
|
|
1067
1073
|
this.clearInput.emit();
|
|
1068
1074
|
inputElement.focus();
|
|
1069
1075
|
}
|
|
1070
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
1071
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.
|
|
1076
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: SearchClear, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1077
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.9", type: SearchClear, isStandalone: true, selector: "button[ksd-search-clear]", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clearInput: "clearInput" }, host: { attributes: { "type": "reset" }, listeners: { "click": "handleClear($event)" }, properties: { "attr.data-variant": "'tertiary'", "attr.aria-label": "this.ariaLabel()" }, classAttribute: "ds-button" }, ngImport: i0 });
|
|
1072
1078
|
}
|
|
1073
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
1079
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: SearchClear, decorators: [{
|
|
1074
1080
|
type: Directive,
|
|
1075
1081
|
args: [{
|
|
1076
1082
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -1084,7 +1090,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
1084
1090
|
'(click)': 'handleClear($event)',
|
|
1085
1091
|
},
|
|
1086
1092
|
}]
|
|
1087
|
-
}] });
|
|
1093
|
+
}], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], clearInput: [{ type: i0.Output, args: ["clearInput"] }] } });
|
|
1088
1094
|
|
|
1089
1095
|
/**
|
|
1090
1096
|
* Generated bundle index. Do not edit.
|