@ks-digital/designsystem-angular 0.0.1-alpha.53 → 0.0.1-alpha.57
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/dialog/README.md +3 -0
- package/fesm2022/ks-digital-designsystem-angular-__internals.mjs +12 -12
- package/fesm2022/ks-digital-designsystem-angular-__internals.mjs.map +1 -1
- package/fesm2022/ks-digital-designsystem-angular-alert.mjs +3 -3
- package/fesm2022/ks-digital-designsystem-angular-breadcrumbs.mjs +6 -14
- package/fesm2022/ks-digital-designsystem-angular-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ks-digital-designsystem-angular-button.mjs +15 -12
- package/fesm2022/ks-digital-designsystem-angular-button.mjs.map +1 -1
- package/fesm2022/ks-digital-designsystem-angular-card.mjs +7 -7
- package/fesm2022/ks-digital-designsystem-angular-card.mjs.map +1 -1
- package/fesm2022/ks-digital-designsystem-angular-chip.mjs +4 -4
- package/fesm2022/ks-digital-designsystem-angular-chip.mjs.map +1 -1
- package/fesm2022/ks-digital-designsystem-angular-details.mjs +10 -10
- package/fesm2022/ks-digital-designsystem-angular-details.mjs.map +1 -1
- package/fesm2022/ks-digital-designsystem-angular-dialog.mjs +48 -0
- package/fesm2022/ks-digital-designsystem-angular-dialog.mjs.map +1 -0
- package/fesm2022/ks-digital-designsystem-angular-error-summary.mjs +5 -5
- package/fesm2022/ks-digital-designsystem-angular-error-summary.mjs.map +1 -1
- package/fesm2022/ks-digital-designsystem-angular-forms.mjs +51 -33
- package/fesm2022/ks-digital-designsystem-angular-forms.mjs.map +1 -1
- package/fesm2022/ks-digital-designsystem-angular-heading.mjs +5 -5
- package/fesm2022/ks-digital-designsystem-angular-heading.mjs.map +1 -1
- package/fesm2022/ks-digital-designsystem-angular-link.mjs +3 -3
- package/fesm2022/ks-digital-designsystem-angular-pagination.mjs +12 -12
- package/fesm2022/ks-digital-designsystem-angular-pagination.mjs.map +1 -1
- package/fesm2022/ks-digital-designsystem-angular-paragraph.mjs +3 -3
- package/fesm2022/ks-digital-designsystem-angular-popover.mjs +7 -7
- package/fesm2022/ks-digital-designsystem-angular-popover.mjs.map +1 -1
- package/fesm2022/ks-digital-designsystem-angular-search.mjs +16 -16
- package/fesm2022/ks-digital-designsystem-angular-search.mjs.map +1 -1
- package/fesm2022/ks-digital-designsystem-angular-spinner.mjs +6 -6
- package/fesm2022/ks-digital-designsystem-angular-spinner.mjs.map +1 -1
- package/fesm2022/ks-digital-designsystem-angular-suggestion.mjs +26 -26
- package/fesm2022/ks-digital-designsystem-angular-suggestion.mjs.map +1 -1
- package/fesm2022/ks-digital-designsystem-angular-table.mjs +11 -11
- package/fesm2022/ks-digital-designsystem-angular-table.mjs.map +1 -1
- package/fesm2022/ks-digital-designsystem-angular-tabs.mjs +15 -15
- package/fesm2022/ks-digital-designsystem-angular-tabs.mjs.map +1 -1
- package/fesm2022/ks-digital-designsystem-angular-tag.mjs +4 -4
- package/fesm2022/ks-digital-designsystem-angular-tag.mjs.map +1 -1
- package/fesm2022/ks-digital-designsystem-angular-validation-message.mjs +3 -3
- package/package.json +8 -4
- package/types/ks-digital-designsystem-angular-__internals.d.ts +2 -3
- package/types/ks-digital-designsystem-angular-button.d.ts +4 -2
- package/types/ks-digital-designsystem-angular-dialog.d.ts +18 -0
- package/types/ks-digital-designsystem-angular-forms.d.ts +13 -3
|
@@ -11,18 +11,32 @@ import { ValidationMessage } from '@ks-digital/designsystem-angular/validation-m
|
|
|
11
11
|
*/
|
|
12
12
|
class Field {
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* Preferred position input for toggle inputs (radio, checkbox, switch) in field.
|
|
15
15
|
* @default start
|
|
16
16
|
*/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
dataPosition = input(undefined, { ...(ngDevMode ? { debugName: "dataPosition" } : /* istanbul ignore next */ {}), alias: 'data-position' });
|
|
18
|
+
/**
|
|
19
|
+
* Legacy position input kept for backward compatibility.
|
|
20
|
+
* @deprecated Use data-position instead.
|
|
21
|
+
* @default start
|
|
22
|
+
*/
|
|
23
|
+
position = input(undefined, ...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
|
|
24
|
+
/**
|
|
25
|
+
* Variant forwarded to ds-field.
|
|
26
|
+
*/
|
|
27
|
+
dataVariant = input(undefined, { ...(ngDevMode ? { debugName: "dataVariant" } : /* istanbul ignore next */ {}), alias: 'data-variant' });
|
|
28
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Field, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
29
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: Field, isStandalone: true, selector: "ksd-field", inputs: { dataPosition: { classPropertyName: "dataPosition", publicName: "data-position", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, dataVariant: { classPropertyName: "dataVariant", publicName: "data-variant", isSignal: true, isRequired: false, transformFunction: null } }, hostDirectives: [{ directive: i1.HostSize, inputs: ["data-size", "data-size"] }, { directive: i1.HostColor, inputs: ["data-color", "data-color"] }], ngImport: i0, template: `
|
|
30
|
+
<ds-field
|
|
31
|
+
class="ds-field"
|
|
32
|
+
[attr.data-position]="dataPosition() ?? position() ?? 'start'"
|
|
33
|
+
[attr.data-variant]="dataVariant()"
|
|
34
|
+
>
|
|
21
35
|
<ng-content />
|
|
22
36
|
</ds-field>
|
|
23
37
|
`, isInline: true, styles: [":host{display:grid}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
24
38
|
}
|
|
25
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
39
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Field, decorators: [{
|
|
26
40
|
type: Component,
|
|
27
41
|
args: [{ selector: 'ksd-field', changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [
|
|
28
42
|
{
|
|
@@ -34,17 +48,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
34
48
|
inputs: ['data-color'],
|
|
35
49
|
},
|
|
36
50
|
], template: `
|
|
37
|
-
<ds-field
|
|
51
|
+
<ds-field
|
|
52
|
+
class="ds-field"
|
|
53
|
+
[attr.data-position]="dataPosition() ?? position() ?? 'start'"
|
|
54
|
+
[attr.data-variant]="dataVariant()"
|
|
55
|
+
>
|
|
38
56
|
<ng-content />
|
|
39
57
|
</ds-field>
|
|
40
58
|
`, schemas: [CUSTOM_ELEMENTS_SCHEMA], styles: [":host{display:grid}\n"] }]
|
|
41
|
-
}], propDecorators: { position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }] } });
|
|
59
|
+
}], propDecorators: { dataPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "data-position", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], dataVariant: [{ type: i0.Input, args: [{ isSignal: true, alias: "data-variant", required: false }] }] } });
|
|
42
60
|
|
|
43
61
|
class FieldDescription {
|
|
44
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
45
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.
|
|
62
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: FieldDescription, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
63
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: FieldDescription, isStandalone: true, selector: "[ksd-field-description]", host: { attributes: { "data-field": "description" } }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
46
64
|
}
|
|
47
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
65
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: FieldDescription, decorators: [{
|
|
48
66
|
type: Component,
|
|
49
67
|
args: [{
|
|
50
68
|
selector: '[ksd-field-description]',
|
|
@@ -57,10 +75,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
57
75
|
}] });
|
|
58
76
|
|
|
59
77
|
class FieldError {
|
|
60
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
61
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.
|
|
78
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: FieldError, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
79
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: FieldError, isStandalone: true, selector: "[ksd-error]", hostDirectives: [{ directive: i1$1.ValidationMessage }], ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
62
80
|
}
|
|
63
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
81
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: FieldError, decorators: [{
|
|
64
82
|
type: Component,
|
|
65
83
|
args: [{
|
|
66
84
|
selector: '[ksd-error]',
|
|
@@ -75,10 +93,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
75
93
|
}] });
|
|
76
94
|
|
|
77
95
|
class Fieldset {
|
|
78
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
79
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.
|
|
96
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Fieldset, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
97
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: Fieldset, isStandalone: true, selector: "fieldset[ksd-fieldset]", host: { classAttribute: "ds-fieldset" }, ngImport: i0, template: ` <ng-content /> `, isInline: true, styles: [":host>::ng-deep ksd-field+ksd-field{margin-block-start:var(--ds-size-4)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
80
98
|
}
|
|
81
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
99
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Fieldset, decorators: [{
|
|
82
100
|
type: Component,
|
|
83
101
|
args: [{ selector: 'fieldset[ksd-fieldset]', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
84
102
|
class: 'ds-fieldset',
|
|
@@ -86,10 +104,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
86
104
|
}] });
|
|
87
105
|
|
|
88
106
|
class FieldsetDescription {
|
|
89
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
90
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.
|
|
107
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: FieldsetDescription, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
108
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: FieldsetDescription, isStandalone: true, selector: "p[ksd-fieldset-description]", ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
91
109
|
}
|
|
92
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
110
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: FieldsetDescription, decorators: [{
|
|
93
111
|
type: Component,
|
|
94
112
|
args: [{
|
|
95
113
|
selector: 'p[ksd-fieldset-description]',
|
|
@@ -100,10 +118,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
100
118
|
}] });
|
|
101
119
|
|
|
102
120
|
class FieldsetLegend {
|
|
103
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
104
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.
|
|
121
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: FieldsetLegend, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
122
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: FieldsetLegend, isStandalone: true, selector: "legend[ksd-fieldset-legend]", host: { classAttribute: "ds-label" }, ngImport: i0, template: ` <ng-content /> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
105
123
|
}
|
|
106
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
124
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: FieldsetLegend, decorators: [{
|
|
107
125
|
type: Component,
|
|
108
126
|
args: [{
|
|
109
127
|
selector: 'legend[ksd-fieldset-legend]',
|
|
@@ -119,19 +137,19 @@ class Input {
|
|
|
119
137
|
/**
|
|
120
138
|
* The value of the input
|
|
121
139
|
*/
|
|
122
|
-
value = signal('', ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
140
|
+
value = signal('', ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
123
141
|
/**
|
|
124
142
|
* Whether the input is readonly
|
|
125
143
|
*/
|
|
126
|
-
readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : {}), transform: booleanAttribute });
|
|
144
|
+
readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
127
145
|
/**
|
|
128
146
|
* Disables element
|
|
129
147
|
*/
|
|
130
|
-
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : {}), transform: booleanAttribute });
|
|
148
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
131
149
|
/**
|
|
132
150
|
* Whether the element is invalid.
|
|
133
151
|
*/
|
|
134
|
-
ariaInvalid = input(false, { ...(ngDevMode ? { debugName: "ariaInvalid" } : {}), transform: booleanAttribute,
|
|
152
|
+
ariaInvalid = input(false, { ...(ngDevMode ? { debugName: "ariaInvalid" } : /* istanbul ignore next */ {}), transform: booleanAttribute,
|
|
135
153
|
alias: 'aria-invalid' });
|
|
136
154
|
onClick(event) {
|
|
137
155
|
if (this.readonly()) {
|
|
@@ -143,10 +161,10 @@ class Input {
|
|
|
143
161
|
const val = target?.value;
|
|
144
162
|
this.value.set(val ?? '');
|
|
145
163
|
}
|
|
146
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
147
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.
|
|
164
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Input, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
165
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.8", 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 } }, host: { listeners: { "click": "onClick($event)", "input": "onInput($event)" }, properties: { "attr.readonly": "readonly() ? true : null", "attr.disabled": "disabled() ? true : null", "attr.aria-invalid": "ariaInvalid() ? true : null" }, classAttribute: "ds-input" }, hostDirectives: [{ directive: i1.HostSize, inputs: ["data-size", "data-size"] }, { directive: i1.HostColor, inputs: ["data-color", "data-color"] }], ngImport: i0 });
|
|
148
166
|
}
|
|
149
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
167
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Input, decorators: [{
|
|
150
168
|
type: Directive,
|
|
151
169
|
args: [{
|
|
152
170
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -173,13 +191,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
173
191
|
}], 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 }] }] } });
|
|
174
192
|
|
|
175
193
|
class Label {
|
|
176
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
177
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.
|
|
194
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Label, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
195
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: Label, isStandalone: true, selector: "ksd-label", hostDirectives: [{ directive: i1.HostSize, inputs: ["data-size", "data-size"] }, { directive: i1.HostColor, inputs: ["data-color", "data-color"] }], ngImport: i0, template: `
|
|
178
196
|
<!-- eslint-disable @angular-eslint/template/label-has-associated-control -- Fieldobserver handles binding the label to the input -->
|
|
179
197
|
<label class="ds-label"><ng-content /></label>
|
|
180
198
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
181
199
|
}
|
|
182
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
200
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Label, decorators: [{
|
|
183
201
|
type: Component,
|
|
184
202
|
args: [{
|
|
185
203
|
selector: 'ksd-label',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ks-digital-designsystem-angular-forms.mjs","sources":["../../../../packages/angular/forms/src/field/field.ts","../../../../packages/angular/forms/src/field/field-description.ts","../../../../packages/angular/forms/src/field/field-error.ts","../../../../packages/angular/forms/src/fieldset/fieldset.ts","../../../../packages/angular/forms/src/fieldset/fieldset-description.ts","../../../../packages/angular/forms/src/fieldset/fieldset-legend.ts","../../../../packages/angular/forms/src/input/input.ts","../../../../packages/angular/forms/src/label/label.ts","../../../../packages/angular/forms/src/ks-digital-designsystem-angular-forms.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n CUSTOM_ELEMENTS_SCHEMA,\n input,\n} from '@angular/core'\nimport '@digdir/designsystemet-web'\nimport {\n HostColor,\n HostSize,\n} from '@ks-digital/designsystem-angular/__internals'\n\n/**\n * Use the Field component to connect inputs and labels\n */\n@Component({\n selector: 'ksd-field',\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [\n {\n directive: HostSize,\n inputs: ['data-size'],\n },\n {\n directive: HostColor,\n inputs: ['data-color'],\n },\n ],\n template: `\n <ds-field class=\"ds-field\" [attr.data-position]=\"position()\">\n <ng-content />\n </ds-field>\n `,\n styles: `\n :host {\n display: grid;\n }\n `,\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n})\nexport class Field {\n /**\n * Position of toggle inputs (radio, checkbox, switch) in field\n * @default start\n */\n position = input<'start' | 'end'>('start')\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core'\n\n@Component({\n selector: '[ksd-field-description]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'data-field': 'description',\n },\n template: `<ng-content />`,\n})\nexport class FieldDescription {}\n","import { ChangeDetectionStrategy, Component } from '@angular/core'\nimport { ValidationMessage } from '@ks-digital/designsystem-angular/validation-message'\n\n@Component({\n selector: '[ksd-error]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `<ng-content />`,\n hostDirectives: [\n {\n directive: ValidationMessage,\n },\n ],\n})\nexport class FieldError {}\n","import {\n ChangeDetectionStrategy,\n Component,\n CUSTOM_ELEMENTS_SCHEMA,\n} from '@angular/core'\nimport '@digdir/designsystemet-web'\n\n@Component({\n selector: 'fieldset[ksd-fieldset]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'ds-fieldset',\n },\n template: ` <ng-content /> `,\n styles: `\n :host > ::ng-deep ksd-field + ksd-field {\n margin-block-start: var(--ds-size-4);\n }\n `,\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n})\nexport class Fieldset {}\n","import { ChangeDetectionStrategy, Component } from '@angular/core'\n\n@Component({\n selector: 'p[ksd-fieldset-description]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `<ng-content />`,\n host: {},\n})\nexport class FieldsetDescription {}\n","import { ChangeDetectionStrategy, Component } from '@angular/core'\n\n@Component({\n selector: 'legend[ksd-fieldset-legend]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'ds-label',\n },\n template: ` <ng-content /> `,\n})\nexport class FieldsetLegend {}\n","import { booleanAttribute, Directive, input, signal } from '@angular/core'\nimport {\n HostColor,\n HostSize,\n} from '@ks-digital/designsystem-angular/__internals'\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'input[ksd-input], textarea[ksd-input], select[ksd-input]',\n hostDirectives: [\n {\n directive: HostSize,\n inputs: ['data-size'],\n },\n {\n directive: HostColor,\n inputs: ['data-color'],\n },\n ],\n host: {\n class: 'ds-input',\n '[attr.readonly]': 'readonly() ? true : null',\n '[attr.disabled]': 'disabled() ? true : null',\n '[attr.aria-invalid]': 'ariaInvalid() ? true : null',\n '(click)': 'onClick($event)',\n '(input)': 'onInput($event)',\n },\n})\nexport class Input {\n /**\n * The value of the input\n */\n value = signal<string | undefined>('')\n\n /**\n * Whether the input is readonly\n */\n readonly readonly = input(false, { transform: booleanAttribute })\n\n /**\n * Disables element\n */\n readonly disabled = input(false, { transform: booleanAttribute })\n\n /**\n * Whether the element is invalid.\n */\n readonly ariaInvalid = input(false, {\n transform: booleanAttribute,\n alias: 'aria-invalid',\n })\n\n onClick(event: Event) {\n if (this.readonly()) {\n event.preventDefault()\n }\n }\n\n onInput(event: Event) {\n const target = event.target as\n | HTMLInputElement\n | HTMLTextAreaElement\n | HTMLSelectElement\n | null\n const val = target?.value\n this.value.set(val ?? '')\n }\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core'\nimport {\n HostColor,\n HostSize,\n} from '@ks-digital/designsystem-angular/__internals'\n\n@Component({\n selector: 'ksd-label',\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [\n {\n directive: HostSize,\n inputs: ['data-size'],\n },\n {\n directive: HostColor,\n inputs: ['data-color'],\n },\n ],\n template: `\n <!-- eslint-disable @angular-eslint/template/label-has-associated-control -- Fieldobserver handles binding the label to the input -->\n <label class=\"ds-label\"><ng-content /></label>\n `,\n})\nexport class Label {}\n","/**\n * Generated bundle index. Do not edit.\n */\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AAAL,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAK,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,QAAA,EAAA,MAAA,EAAA,CAAA,WAAA,EAAA,WAAA,CAAA,EAAA,EAAA,EAAA,SAAA,EAAA,EAAA,CAAA,SAAA,EAAA,MAAA,EAAA,CAAA,YAAA,EAAA,YAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EALN;;;AAGT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAEU,KAAK,EAAA,UAAA,EAAA,CAAA;kBAlBjB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,WAAW;oBACrB,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,cAAc,EAAE;AACd,wBAAA;AACE,4BAAA,SAAS,EAAE,QAAQ;4BACnB,MAAM,EAAE,CAAC,WAAW,CAAC;AACtB,yBAAA;AACD,wBAAA;AACE,4BAAA,SAAS,EAAE,SAAS;4BACpB,MAAM,EAAE,CAAC,YAAY,CAAC;AACvB,yBAAA;AACF,qBAAA;AACD,oBAAA,QAAQ,EAAE;;;AAGT,EAAA,CAAA;AACF,iBAAA;;;ACvBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ks-digital-designsystem-angular-forms.mjs","sources":["../../../../packages/angular/forms/src/field/field.ts","../../../../packages/angular/forms/src/field/field-description.ts","../../../../packages/angular/forms/src/field/field-error.ts","../../../../packages/angular/forms/src/fieldset/fieldset.ts","../../../../packages/angular/forms/src/fieldset/fieldset-description.ts","../../../../packages/angular/forms/src/fieldset/fieldset-legend.ts","../../../../packages/angular/forms/src/input/input.ts","../../../../packages/angular/forms/src/label/label.ts","../../../../packages/angular/forms/src/ks-digital-designsystem-angular-forms.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n CUSTOM_ELEMENTS_SCHEMA,\n input,\n} from '@angular/core'\nimport '@digdir/designsystemet-web'\nimport {\n HostColor,\n HostSize,\n} from '@ks-digital/designsystem-angular/__internals'\n\n/**\n * Use the Field component to connect inputs and labels\n */\n@Component({\n selector: 'ksd-field',\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [\n {\n directive: HostSize,\n inputs: ['data-size'],\n },\n {\n directive: HostColor,\n inputs: ['data-color'],\n },\n ],\n template: `\n <ds-field\n class=\"ds-field\"\n [attr.data-position]=\"dataPosition() ?? position() ?? 'start'\"\n [attr.data-variant]=\"dataVariant()\"\n >\n <ng-content />\n </ds-field>\n `,\n styles: `\n :host {\n display: grid;\n }\n `,\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n})\nexport class Field {\n /**\n * Preferred position input for toggle inputs (radio, checkbox, switch) in field.\n * @default start\n */\n dataPosition = input<'start' | 'end' | undefined>(undefined, {\n alias: 'data-position',\n })\n\n /**\n * Legacy position input kept for backward compatibility.\n * @deprecated Use data-position instead.\n * @default start\n */\n position = input<'start' | 'end' | undefined>(undefined)\n\n /**\n * Variant forwarded to ds-field.\n */\n dataVariant = input<'outline' | undefined>(undefined, {\n alias: 'data-variant',\n })\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core'\n\n@Component({\n selector: '[ksd-field-description]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'data-field': 'description',\n },\n template: `<ng-content />`,\n})\nexport class FieldDescription {}\n","import { ChangeDetectionStrategy, Component } from '@angular/core'\nimport { ValidationMessage } from '@ks-digital/designsystem-angular/validation-message'\n\n@Component({\n selector: '[ksd-error]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `<ng-content />`,\n hostDirectives: [\n {\n directive: ValidationMessage,\n },\n ],\n})\nexport class FieldError {}\n","import {\n ChangeDetectionStrategy,\n Component,\n CUSTOM_ELEMENTS_SCHEMA,\n} from '@angular/core'\nimport '@digdir/designsystemet-web'\n\n@Component({\n selector: 'fieldset[ksd-fieldset]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'ds-fieldset',\n },\n template: ` <ng-content /> `,\n styles: `\n :host > ::ng-deep ksd-field + ksd-field {\n margin-block-start: var(--ds-size-4);\n }\n `,\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n})\nexport class Fieldset {}\n","import { ChangeDetectionStrategy, Component } from '@angular/core'\n\n@Component({\n selector: 'p[ksd-fieldset-description]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `<ng-content />`,\n host: {},\n})\nexport class FieldsetDescription {}\n","import { ChangeDetectionStrategy, Component } from '@angular/core'\n\n@Component({\n selector: 'legend[ksd-fieldset-legend]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'ds-label',\n },\n template: ` <ng-content /> `,\n})\nexport class FieldsetLegend {}\n","import { booleanAttribute, Directive, input, signal } from '@angular/core'\nimport {\n HostColor,\n HostSize,\n} from '@ks-digital/designsystem-angular/__internals'\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'input[ksd-input], textarea[ksd-input], select[ksd-input]',\n hostDirectives: [\n {\n directive: HostSize,\n inputs: ['data-size'],\n },\n {\n directive: HostColor,\n inputs: ['data-color'],\n },\n ],\n host: {\n class: 'ds-input',\n '[attr.readonly]': 'readonly() ? true : null',\n '[attr.disabled]': 'disabled() ? true : null',\n '[attr.aria-invalid]': 'ariaInvalid() ? true : null',\n '(click)': 'onClick($event)',\n '(input)': 'onInput($event)',\n },\n})\nexport class Input {\n /**\n * The value of the input\n */\n value = signal<string | undefined>('')\n\n /**\n * Whether the input is readonly\n */\n readonly readonly = input(false, { transform: booleanAttribute })\n\n /**\n * Disables element\n */\n readonly disabled = input(false, { transform: booleanAttribute })\n\n /**\n * Whether the element is invalid.\n */\n readonly ariaInvalid = input(false, {\n transform: booleanAttribute,\n alias: 'aria-invalid',\n })\n\n onClick(event: Event) {\n if (this.readonly()) {\n event.preventDefault()\n }\n }\n\n onInput(event: Event) {\n const target = event.target as\n | HTMLInputElement\n | HTMLTextAreaElement\n | HTMLSelectElement\n | null\n const val = target?.value\n this.value.set(val ?? '')\n }\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core'\nimport {\n HostColor,\n HostSize,\n} from '@ks-digital/designsystem-angular/__internals'\n\n@Component({\n selector: 'ksd-label',\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [\n {\n directive: HostSize,\n inputs: ['data-size'],\n },\n {\n directive: HostColor,\n inputs: ['data-color'],\n },\n ],\n template: `\n <!-- eslint-disable @angular-eslint/template/label-has-associated-control -- Fieldobserver handles binding the label to the input -->\n <label class=\"ds-label\"><ng-content /></label>\n `,\n})\nexport class Label {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAYA;;AAEG;MA8BU,KAAK,CAAA;AAChB;;;AAGG;IACH,YAAY,GAAG,KAAK,CAA8B,SAAS,oFACzD,KAAK,EAAE,eAAe,EAAA,CACtB;AAEF;;;;AAIG;AACH,IAAA,QAAQ,GAAG,KAAK,CAA8B,SAAS,+EAAC;AAExD;;AAEG;IACH,WAAW,GAAG,KAAK,CAAwB,SAAS,mFAClD,KAAK,EAAE,cAAc,EAAA,CACrB;uGArBS,KAAK,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAL,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAK,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,WAAA,EAAA,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AA,EAAA,KAAK,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,QAAA,EAAA,MAAA,EAAA,CAAA,WAAA,EAAA,WAAA,CAAA,EAAA,EAAA,EAAA,SAAA,EAAA,EAAA,CAAA,SAAA,EAAA,MAAA,EAAA,CAAA,YAAA,EAAA,YAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EALN;;;AAGT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAEU,KAAK,EAAA,UAAA,EAAA,CAAA;kBAlBjB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,WAAW;oBACrB,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,cAAc,EAAE;AACd,wBAAA;AACE,4BAAA,SAAS,EAAE,QAAQ;4BACnB,MAAM,EAAE,CAAC,WAAW,CAAC;AACtB,yBAAA;AACD,wBAAA;AACE,4BAAA,SAAS,EAAE,SAAS;4BACpB,MAAM,EAAE,CAAC,YAAY,CAAC;AACvB,yBAAA;AACF,qBAAA;AACD,oBAAA,QAAQ,EAAE;;;AAGT,EAAA,CAAA;AACF,iBAAA;;;ACvBD;;AAEG;;;;"}
|
|
@@ -2,12 +2,12 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { signal, input, Directive } from '@angular/core';
|
|
3
3
|
|
|
4
4
|
class Heading {
|
|
5
|
-
id = signal(undefined, ...(ngDevMode ? [{ debugName: "id" }] : []));
|
|
5
|
+
id = signal(undefined, ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
6
6
|
/**
|
|
7
7
|
* Changes text sizing
|
|
8
8
|
* @default 'md'
|
|
9
9
|
*/
|
|
10
|
-
dataSize = input(undefined, { ...(ngDevMode ? { debugName: "dataSize" } : {}), alias: 'data-size' });
|
|
10
|
+
dataSize = input(undefined, { ...(ngDevMode ? { debugName: "dataSize" } : /* istanbul ignore next */ {}), alias: 'data-size' });
|
|
11
11
|
/**
|
|
12
12
|
* Set the id of the heading
|
|
13
13
|
* @param id
|
|
@@ -15,10 +15,10 @@ class Heading {
|
|
|
15
15
|
setId(id) {
|
|
16
16
|
this.id.set(id);
|
|
17
17
|
}
|
|
18
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
19
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.
|
|
18
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Heading, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
19
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.8", type: Heading, isStandalone: true, selector: "h1[ksd-heading], h2[ksd-heading], h3[ksd-heading], h4[ksd-heading], h5[ksd-heading], h6[ksd-heading]", inputs: { dataSize: { classPropertyName: "dataSize", publicName: "data-size", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-size": "dataSize() || null", "attr.id": "id() || null" }, classAttribute: "ds-heading" }, ngImport: i0 });
|
|
20
20
|
}
|
|
21
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Heading, decorators: [{
|
|
22
22
|
type: Directive,
|
|
23
23
|
args: [{
|
|
24
24
|
selector:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ks-digital-designsystem-angular-heading.mjs","sources":["../../../../packages/angular/heading/src/heading.ts","../../../../packages/angular/heading/src/ks-digital-designsystem-angular-heading.ts"],"sourcesContent":["import { Directive, input, signal } from '@angular/core'\n\n@Directive({\n selector:\n // eslint-disable-next-line @angular-eslint/directive-selector\n 'h1[ksd-heading], h2[ksd-heading], h3[ksd-heading], h4[ksd-heading], h5[ksd-heading], h6[ksd-heading]',\n host: {\n class: 'ds-heading',\n '[attr.data-size]': 'dataSize() || null',\n '[attr.id]': 'id() || null',\n },\n})\nexport class Heading {\n public id = signal<string | undefined>(undefined)\n /**\n * Changes text sizing\n * @default 'md'\n */\n readonly dataSize = input<'2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'>(\n undefined,\n {\n alias: 'data-size',\n },\n )\n\n /**\n * Set the id of the heading\n * @param id\n */\n setId(id: string) {\n this.id.set(id)\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAYa,OAAO,CAAA;AACX,IAAA,EAAE,GAAG,MAAM,CAAqB,SAAS,
|
|
1
|
+
{"version":3,"file":"ks-digital-designsystem-angular-heading.mjs","sources":["../../../../packages/angular/heading/src/heading.ts","../../../../packages/angular/heading/src/ks-digital-designsystem-angular-heading.ts"],"sourcesContent":["import { Directive, input, signal } from '@angular/core'\n\n@Directive({\n selector:\n // eslint-disable-next-line @angular-eslint/directive-selector\n 'h1[ksd-heading], h2[ksd-heading], h3[ksd-heading], h4[ksd-heading], h5[ksd-heading], h6[ksd-heading]',\n host: {\n class: 'ds-heading',\n '[attr.data-size]': 'dataSize() || null',\n '[attr.id]': 'id() || null',\n },\n})\nexport class Heading {\n public id = signal<string | undefined>(undefined)\n /**\n * Changes text sizing\n * @default 'md'\n */\n readonly dataSize = input<'2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'>(\n undefined,\n {\n alias: 'data-size',\n },\n )\n\n /**\n * Set the id of the heading\n * @param id\n */\n setId(id: string) {\n this.id.set(id)\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAYa,OAAO,CAAA;AACX,IAAA,EAAE,GAAG,MAAM,CAAqB,SAAS,yEAAC;AACjD;;;AAGG;IACM,QAAQ,GAAG,KAAK,CACvB,SAAS,gFAEP,KAAK,EAAE,WAAW,EAAA,CAErB;AAED;;;AAGG;AACH,IAAA,KAAK,CAAC,EAAU,EAAA;AACd,QAAA,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC;IACjB;uGAnBW,OAAO,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAP,OAAO,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,sGAAA,EAAA,MAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,WAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,gBAAA,EAAA,oBAAA,EAAA,SAAA,EAAA,cAAA,EAAA,EAAA,cAAA,EAAA,YAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAP,OAAO,EAAA,UAAA,EAAA,CAAA;kBAVnB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;oBACT,QAAQ;;oBAEN,sGAAsG;AACxG,oBAAA,IAAI,EAAE;AACJ,wBAAA,KAAK,EAAE,YAAY;AACnB,wBAAA,kBAAkB,EAAE,oBAAoB;AACxC,wBAAA,WAAW,EAAE,cAAc;AAC5B,qBAAA;AACF,iBAAA;;;ACXD;;AAEG;;;;"}
|
|
@@ -4,10 +4,10 @@ import * as i1 from '@ks-digital/designsystem-angular/__internals';
|
|
|
4
4
|
import { HostSize, HostColor } from '@ks-digital/designsystem-angular/__internals';
|
|
5
5
|
|
|
6
6
|
class Link {
|
|
7
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
8
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.
|
|
7
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Link, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: Link, isStandalone: true, selector: "a[ksd-link]", host: { classAttribute: "ds-link" }, hostDirectives: [{ directive: i1.HostSize, inputs: ["data-size", "data-size"] }, { directive: i1.HostColor, inputs: ["data-color", "data-color"] }], ngImport: i0, template: ` <ng-content /> `, isInline: true, styles: [":host:has(>span)>:is(ng-icon){margin-inline:var(--ds-size-1);margin-inline-start:0}:host ng-icon{display:inline-flex;vertical-align:middle;font-size:var(--ng-icon-size, 1.3em)}:host svg{width:1em;height:1em}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
9
9
|
}
|
|
10
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
10
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Link, decorators: [{
|
|
11
11
|
type: Component,
|
|
12
12
|
args: [{ selector: 'a[ksd-link]', changeDetection: ChangeDetectionStrategy.OnPush, template: ` <ng-content /> `, hostDirectives: [
|
|
13
13
|
{
|
|
@@ -8,23 +8,23 @@ class Pagination {
|
|
|
8
8
|
/**
|
|
9
9
|
* The current page
|
|
10
10
|
*/
|
|
11
|
-
current = input.required({ ...(ngDevMode ? { debugName: "current" } : {}), transform: numberAttribute });
|
|
11
|
+
current = input.required({ ...(ngDevMode ? { debugName: "current" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
12
12
|
/**
|
|
13
13
|
* The total number of pages
|
|
14
14
|
*/
|
|
15
|
-
total = input.required({ ...(ngDevMode ? { debugName: "total" } : {}), transform: numberAttribute });
|
|
15
|
+
total = input.required({ ...(ngDevMode ? { debugName: "total" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
16
16
|
/**
|
|
17
17
|
* Sets the screen reader label for the pagination
|
|
18
18
|
*/
|
|
19
|
-
ariaLabel = input('Bla i sider', { ...(ngDevMode ? { debugName: "ariaLabel" } : {}), alias: 'aria-label' });
|
|
19
|
+
ariaLabel = input('Bla i sider', { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: 'aria-label' });
|
|
20
20
|
/**
|
|
21
21
|
* How many pages to show. Default is 7
|
|
22
22
|
*/
|
|
23
|
-
show = input(7, { ...(ngDevMode ? { debugName: "show" } : {}), transform: numberAttribute });
|
|
23
|
+
show = input(7, { ...(ngDevMode ? { debugName: "show" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
24
24
|
/**
|
|
25
25
|
* E.g if "?page=%d" all the links will set href to "?page=1", "?page=2".
|
|
26
26
|
*/
|
|
27
|
-
href = input(...(ngDevMode ? [undefined, { debugName: "href" }] : []));
|
|
27
|
+
href = input(...(ngDevMode ? [undefined, { debugName: "href" }] : /* istanbul ignore next */ []));
|
|
28
28
|
/**
|
|
29
29
|
* Emits the page number when a page is clicked
|
|
30
30
|
*/
|
|
@@ -47,7 +47,7 @@ class Pagination {
|
|
|
47
47
|
prev: result.prev,
|
|
48
48
|
next: result.next,
|
|
49
49
|
};
|
|
50
|
-
}, ...(ngDevMode ? [{ debugName: "pages" }] : []));
|
|
50
|
+
}, ...(ngDevMode ? [{ debugName: "pages" }] : /* istanbul ignore next */ []));
|
|
51
51
|
onClick(e) {
|
|
52
52
|
const target = e.target.closest('[aria-label]');
|
|
53
53
|
if (!target)
|
|
@@ -61,8 +61,8 @@ class Pagination {
|
|
|
61
61
|
this.pageClicked.emit(page);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
65
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.
|
|
64
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Pagination, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
65
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: Pagination, isStandalone: true, selector: "ksd-pagination", inputs: { current: { classPropertyName: "current", publicName: "current", isSignal: true, isRequired: true, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: true, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, show: { classPropertyName: "show", publicName: "show", isSignal: true, isRequired: false, transformFunction: null }, href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageClicked: "pageClicked" }, hostDirectives: [{ directive: i1.HostSize, inputs: ["data-size", "data-size"] }, { directive: i1.HostColor, inputs: ["data-color", "data-color"] }], ngImport: i0, template: `
|
|
66
66
|
<ds-pagination
|
|
67
67
|
class="ds-pagination"
|
|
68
68
|
[attr.data-current]="current()"
|
|
@@ -75,7 +75,7 @@ class Pagination {
|
|
|
75
75
|
</ds-pagination>
|
|
76
76
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
77
77
|
}
|
|
78
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
78
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Pagination, decorators: [{
|
|
79
79
|
type: Component,
|
|
80
80
|
args: [{
|
|
81
81
|
selector: 'ksd-pagination',
|
|
@@ -122,10 +122,10 @@ class PaginationButton {
|
|
|
122
122
|
const isCurrent = this.el.nativeElement.getAttribute('aria-current') === 'true';
|
|
123
123
|
this.el.nativeElement.setAttribute('data-variant', isCurrent ? 'primary' : 'tertiary');
|
|
124
124
|
}
|
|
125
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
126
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.
|
|
125
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: PaginationButton, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
126
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.8", type: PaginationButton, isStandalone: true, selector: "[ksdPaginationButton]", host: { classAttribute: "ds-button" }, ngImport: i0 });
|
|
127
127
|
}
|
|
128
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
128
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: PaginationButton, decorators: [{
|
|
129
129
|
type: Directive,
|
|
130
130
|
args: [{
|
|
131
131
|
selector: '[ksdPaginationButton]',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ks-digital-designsystem-angular-pagination.mjs","sources":["../../../../packages/angular/pagination/src/pagination.ts","../../../../packages/angular/pagination/src/pagination.button.ts","../../../../packages/angular/pagination/src/ks-digital-designsystem-angular-pagination.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n CUSTOM_ELEMENTS_SCHEMA,\n input,\n numberAttribute,\n output,\n} from '@angular/core'\nimport { pagination } from '@digdir/designsystemet-web'\nimport {\n HostColor,\n HostSize,\n} from '@ks-digital/designsystem-angular/__internals'\n\nexport interface PaginationPage {\n page: number\n current: boolean\n key: string\n}\n\nexport interface PaginationPages {\n pages: PaginationPage[]\n prev: number\n next: number\n}\n\n@Component({\n selector: 'ksd-pagination',\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <ds-pagination\n class=\"ds-pagination\"\n [attr.data-current]=\"current()\"\n [attr.data-total]=\"total()\"\n [attr.data-href]=\"href()\"\n [attr.aria-label]=\"ariaLabel()\"\n (click)=\"onClick($event)\"\n >\n <ng-content />\n </ds-pagination>\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 Pagination {\n /**\n * The current page\n */\n readonly current = input.required<number, string | number>({\n transform: numberAttribute,\n })\n\n /**\n * The total number of pages\n */\n readonly total = input.required<number, string | number>({\n transform: numberAttribute,\n })\n\n /**\n * Sets the screen reader label for the pagination\n */\n readonly ariaLabel = input<string>('Bla i sider', { alias: 'aria-label' })\n\n /**\n * How many pages to show. Default is 7\n */\n readonly show = input(7, { transform: numberAttribute })\n\n /**\n * E.g if \"?page=%d\" all the links will set href to \"?page=1\", \"?page=2\".\n */\n readonly href = input<string>()\n\n /**\n * Emits the page number when a page is clicked\n */\n readonly pageClicked = output<number>()\n\n /**\n * Exposes pagination data for consumer use\n */\n readonly pages = computed<PaginationPages>(() => {\n const result = pagination({\n current: this.current(),\n total: this.total(),\n show: this.show(),\n })\n return {\n pages: result.pages.map((p) => ({\n page: p.page,\n current: p.current === 'page',\n key: p.key,\n })),\n prev: result.prev,\n next: result.next,\n }\n })\n\n protected onClick(e: Event) {\n const target = (e.target as HTMLElement).closest('[aria-label]')\n if (!target) return\n\n const label = target.getAttribute('aria-label')\n if (!label) return\n\n const page = Number(label)\n if (!isNaN(page) && page !== this.current()) {\n e.preventDefault()\n this.pageClicked.emit(page)\n }\n }\n}\n","import { DestroyRef, Directive, ElementRef, inject } from '@angular/core'\n\n@Directive({\n selector: '[ksdPaginationButton]',\n host: {\n class: 'ds-button',\n },\n})\nexport class PaginationButton {\n private el = inject<ElementRef<HTMLElement>>(ElementRef)\n private destroyRef = inject(DestroyRef)\n\n constructor() {\n const observer = new MutationObserver(() => this.updateVariant())\n observer.observe(this.el.nativeElement, {\n attributes: true,\n attributeFilter: ['aria-current'],\n })\n this.updateVariant()\n\n this.destroyRef.onDestroy(() => observer.disconnect())\n }\n\n private updateVariant() {\n const isCurrent =\n this.el.nativeElement.getAttribute('aria-current') === 'true'\n this.el.nativeElement.setAttribute(\n 'data-variant',\n isCurrent ? 'primary' : 'tertiary',\n )\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAsDa,UAAU,CAAA;AACrB;;AAEG;IACM,OAAO,GAAG,KAAK,CAAC,QAAQ,
|
|
1
|
+
{"version":3,"file":"ks-digital-designsystem-angular-pagination.mjs","sources":["../../../../packages/angular/pagination/src/pagination.ts","../../../../packages/angular/pagination/src/pagination.button.ts","../../../../packages/angular/pagination/src/ks-digital-designsystem-angular-pagination.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n CUSTOM_ELEMENTS_SCHEMA,\n input,\n numberAttribute,\n output,\n} from '@angular/core'\nimport { pagination } from '@digdir/designsystemet-web'\nimport {\n HostColor,\n HostSize,\n} from '@ks-digital/designsystem-angular/__internals'\n\nexport interface PaginationPage {\n page: number\n current: boolean\n key: string\n}\n\nexport interface PaginationPages {\n pages: PaginationPage[]\n prev: number\n next: number\n}\n\n@Component({\n selector: 'ksd-pagination',\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <ds-pagination\n class=\"ds-pagination\"\n [attr.data-current]=\"current()\"\n [attr.data-total]=\"total()\"\n [attr.data-href]=\"href()\"\n [attr.aria-label]=\"ariaLabel()\"\n (click)=\"onClick($event)\"\n >\n <ng-content />\n </ds-pagination>\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 Pagination {\n /**\n * The current page\n */\n readonly current = input.required<number, string | number>({\n transform: numberAttribute,\n })\n\n /**\n * The total number of pages\n */\n readonly total = input.required<number, string | number>({\n transform: numberAttribute,\n })\n\n /**\n * Sets the screen reader label for the pagination\n */\n readonly ariaLabel = input<string>('Bla i sider', { alias: 'aria-label' })\n\n /**\n * How many pages to show. Default is 7\n */\n readonly show = input(7, { transform: numberAttribute })\n\n /**\n * E.g if \"?page=%d\" all the links will set href to \"?page=1\", \"?page=2\".\n */\n readonly href = input<string>()\n\n /**\n * Emits the page number when a page is clicked\n */\n readonly pageClicked = output<number>()\n\n /**\n * Exposes pagination data for consumer use\n */\n readonly pages = computed<PaginationPages>(() => {\n const result = pagination({\n current: this.current(),\n total: this.total(),\n show: this.show(),\n })\n return {\n pages: result.pages.map((p) => ({\n page: p.page,\n current: p.current === 'page',\n key: p.key,\n })),\n prev: result.prev,\n next: result.next,\n }\n })\n\n protected onClick(e: Event) {\n const target = (e.target as HTMLElement).closest('[aria-label]')\n if (!target) return\n\n const label = target.getAttribute('aria-label')\n if (!label) return\n\n const page = Number(label)\n if (!isNaN(page) && page !== this.current()) {\n e.preventDefault()\n this.pageClicked.emit(page)\n }\n }\n}\n","import { DestroyRef, Directive, ElementRef, inject } from '@angular/core'\n\n@Directive({\n selector: '[ksdPaginationButton]',\n host: {\n class: 'ds-button',\n },\n})\nexport class PaginationButton {\n private el = inject<ElementRef<HTMLElement>>(ElementRef)\n private destroyRef = inject(DestroyRef)\n\n constructor() {\n const observer = new MutationObserver(() => this.updateVariant())\n observer.observe(this.el.nativeElement, {\n attributes: true,\n attributeFilter: ['aria-current'],\n })\n this.updateVariant()\n\n this.destroyRef.onDestroy(() => observer.disconnect())\n }\n\n private updateVariant() {\n const isCurrent =\n this.el.nativeElement.getAttribute('aria-current') === 'true'\n this.el.nativeElement.setAttribute(\n 'data-variant',\n isCurrent ? 'primary' : 'tertiary',\n )\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAsDa,UAAU,CAAA;AACrB;;AAEG;IACM,OAAO,GAAG,KAAK,CAAC,QAAQ,8EAC/B,SAAS,EAAE,eAAe,EAAA,CAC1B;AAEF;;AAEG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C,aAAa,EAAE,CAAC;QACjE,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,aAAa,EAAE;AACtC,YAAA,UAAU,EAAE,IAAI;YAChB,eAAe,EAAE,CAAC,cAAc,CAAC;AAClC,SAAA,CAAC;QACF,IAAI,CAAC,aAAa,EAAE;AAEpB,QAAA,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,MAAM,QAAQ,CAAC,UAAU,EAAE,CAAC;IACxD;IAEQ,aAAa,GAAA;AACnB,QAAA,MAAM,SAAS,GACb,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,YAAY,CAAC,cAAc,CAAC,KAAK,MAAM;AAC/D,QAAA,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,YAAY,CAChC,cAAc,EACd,SAAS,GAAG,SAAS,GAAG,UAAU,CACnC;IACH;uGAtBW,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAhB,gBAAgB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,WAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAN5B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,uBAAuB;AACjC,oBAAA,IAAI,EAAE;AACJ,wBAAA,KAAK,EAAE,WAAW;AACnB,qBAAA;AACF,iBAAA;;;ACPD;;AAEG;;;;"}
|
|
@@ -2,10 +2,10 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
3
|
|
|
4
4
|
class Paragraph {
|
|
5
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
6
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.
|
|
5
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Paragraph, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: Paragraph, isStandalone: true, selector: "p[ksd-paragraph]", host: { classAttribute: "ds-paragraph" }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
7
7
|
}
|
|
8
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
8
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Paragraph, decorators: [{
|
|
9
9
|
type: Component,
|
|
10
10
|
args: [{
|
|
11
11
|
selector: 'p[ksd-paragraph]',
|
|
@@ -5,15 +5,15 @@ import * as i1 from '@ks-digital/designsystem-angular/__internals';
|
|
|
5
5
|
import { HostSize, HostColor } from '@ks-digital/designsystem-angular/__internals';
|
|
6
6
|
|
|
7
7
|
class Popover {
|
|
8
|
-
autoPlacement = input(true, { ...(ngDevMode ? { debugName: "autoPlacement" } : {}), transform: booleanAttribute });
|
|
9
|
-
variant = input('default', { ...(ngDevMode ? { debugName: "variant" } : {}), alias: 'data-variant' });
|
|
8
|
+
autoPlacement = input(true, { ...(ngDevMode ? { debugName: "autoPlacement" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
9
|
+
variant = input('default', { ...(ngDevMode ? { debugName: "variant" } : /* istanbul ignore next */ {}), alias: 'data-variant' });
|
|
10
10
|
// Todo: replace with centralized types
|
|
11
|
-
placement = input('top', { ...(ngDevMode ? { debugName: "placement" } : {}), alias: 'data-placement' });
|
|
12
|
-
popover = input('auto', { ...(ngDevMode ? { debugName: "popover" } : {}), alias: 'popover' });
|
|
13
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
14
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.
|
|
11
|
+
placement = input('top', { ...(ngDevMode ? { debugName: "placement" } : /* istanbul ignore next */ {}), alias: 'data-placement' });
|
|
12
|
+
popover = input('auto', { ...(ngDevMode ? { debugName: "popover" } : /* istanbul ignore next */ {}), alias: 'popover' });
|
|
13
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Popover, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
14
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.8", type: Popover, isStandalone: true, selector: "[ksd-popover]", inputs: { autoPlacement: { classPropertyName: "autoPlacement", publicName: "autoPlacement", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "data-variant", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "data-placement", isSignal: true, isRequired: false, transformFunction: null }, popover: { classPropertyName: "popover", publicName: "popover", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-variant": "variant()", "attr.data-placement": "placement()", "attr.data-autoplacement": "autoPlacement()", "attr.popover": "popover()" }, classAttribute: "ds-popover" }, hostDirectives: [{ directive: i1.HostSize, inputs: ["data-size", "data-size"] }, { directive: i1.HostColor, inputs: ["data-color", "data-color"] }], ngImport: i0 });
|
|
15
15
|
}
|
|
16
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
16
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Popover, decorators: [{
|
|
17
17
|
type: Directive,
|
|
18
18
|
args: [{
|
|
19
19
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ks-digital-designsystem-angular-popover.mjs","sources":["../../../../packages/angular/popover/src/popover.ts","../../../../packages/angular/popover/src/ks-digital-designsystem-angular-popover.ts"],"sourcesContent":["import { booleanAttribute, Directive, input } from '@angular/core'\nimport '@digdir/designsystemet-web'\nimport {\n HostColor,\n HostSize,\n} from '@ks-digital/designsystem-angular/__internals'\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[ksd-popover]',\n hostDirectives: [\n {\n directive: HostSize,\n inputs: ['data-size'],\n },\n {\n directive: HostColor,\n inputs: ['data-color'],\n },\n ],\n host: {\n class: 'ds-popover',\n '[attr.data-variant]': 'variant()',\n '[attr.data-placement]': 'placement()',\n '[attr.data-autoplacement]': 'autoPlacement()',\n '[attr.popover]': 'popover()',\n },\n})\nexport class Popover {\n readonly autoPlacement = input(true, { transform: booleanAttribute })\n readonly variant = input<'tinted' | 'default'>('default', {\n alias: 'data-variant',\n })\n\n // Todo: replace with centralized types\n readonly placement = input<\n | 'bottom'\n | 'bottom-end'\n | 'bottom-start'\n | 'left'\n | 'left-end'\n | 'left-start'\n | 'right'\n | 'right-end'\n | 'right-start'\n | 'top'\n | 'top-end'\n | 'top-start'\n >('top', { alias: 'data-placement' })\n\n readonly popover = input<'auto' | 'manual'>('auto', { alias: 'popover' })\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MA4Ba,OAAO,CAAA;IACT,aAAa,GAAG,KAAK,CAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"ks-digital-designsystem-angular-popover.mjs","sources":["../../../../packages/angular/popover/src/popover.ts","../../../../packages/angular/popover/src/ks-digital-designsystem-angular-popover.ts"],"sourcesContent":["import { booleanAttribute, Directive, input } from '@angular/core'\nimport '@digdir/designsystemet-web'\nimport {\n HostColor,\n HostSize,\n} from '@ks-digital/designsystem-angular/__internals'\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[ksd-popover]',\n hostDirectives: [\n {\n directive: HostSize,\n inputs: ['data-size'],\n },\n {\n directive: HostColor,\n inputs: ['data-color'],\n },\n ],\n host: {\n class: 'ds-popover',\n '[attr.data-variant]': 'variant()',\n '[attr.data-placement]': 'placement()',\n '[attr.data-autoplacement]': 'autoPlacement()',\n '[attr.popover]': 'popover()',\n },\n})\nexport class Popover {\n readonly autoPlacement = input(true, { transform: booleanAttribute })\n readonly variant = input<'tinted' | 'default'>('default', {\n alias: 'data-variant',\n })\n\n // Todo: replace with centralized types\n readonly placement = input<\n | 'bottom'\n | 'bottom-end'\n | 'bottom-start'\n | 'left'\n | 'left-end'\n | 'left-start'\n | 'right'\n | 'right-end'\n | 'right-start'\n | 'top'\n | 'top-end'\n | 'top-start'\n >('top', { alias: 'data-placement' })\n\n readonly popover = input<'auto' | 'manual'>('auto', { alias: 'popover' })\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MA4Ba,OAAO,CAAA;IACT,aAAa,GAAG,KAAK,CAAC,IAAI,qFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;IAC5D,OAAO,GAAG,KAAK,CAAuB,SAAS,+EACtD,KAAK,EAAE,cAAc,EAAA,CACrB;;IAGO,SAAS,GAAG,KAAK,CAaxB,KAAK,iFAAI,KAAK,EAAE,gBAAgB,EAAA,CAAG;IAE5B,OAAO,GAAG,KAAK,CAAoB,MAAM,+EAAI,KAAK,EAAE,SAAS,EAAA,CAAG;uGAtB9D,OAAO,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAP,OAAO,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,EAAA,aAAA,EAAA,EAAA,iBAAA,EAAA,eAAA,EAAA,UAAA,EAAA,eAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iB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