@ks-digital/designsystem-angular 0.0.1-alpha.74 → 0.0.1-alpha.76

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/.npmignore +25 -0
  2. package/fesm2022/ks-digital-designsystem-angular-__internals.mjs +148 -78
  3. package/fesm2022/ks-digital-designsystem-angular-__internals.mjs.map +1 -1
  4. package/fesm2022/ks-digital-designsystem-angular-alert.mjs +59 -33
  5. package/fesm2022/ks-digital-designsystem-angular-alert.mjs.map +1 -1
  6. package/fesm2022/ks-digital-designsystem-angular-breadcrumbs.mjs +79 -43
  7. package/fesm2022/ks-digital-designsystem-angular-breadcrumbs.mjs.map +1 -1
  8. package/fesm2022/ks-digital-designsystem-angular-button.mjs +187 -61
  9. package/fesm2022/ks-digital-designsystem-angular-button.mjs.map +1 -1
  10. package/fesm2022/ks-digital-designsystem-angular-card.mjs +136 -86
  11. package/fesm2022/ks-digital-designsystem-angular-card.mjs.map +1 -1
  12. package/fesm2022/ks-digital-designsystem-angular-chip.mjs +76 -42
  13. package/fesm2022/ks-digital-designsystem-angular-chip.mjs.map +1 -1
  14. package/fesm2022/ks-digital-designsystem-angular-details.mjs +148 -64
  15. package/fesm2022/ks-digital-designsystem-angular-details.mjs.map +1 -1
  16. package/fesm2022/ks-digital-designsystem-angular-dialog.mjs +106 -48
  17. package/fesm2022/ks-digital-designsystem-angular-dialog.mjs.map +1 -1
  18. package/fesm2022/ks-digital-designsystem-angular-dropdown.mjs +147 -45
  19. package/fesm2022/ks-digital-designsystem-angular-dropdown.mjs.map +1 -1
  20. package/fesm2022/ks-digital-designsystem-angular-error-summary.mjs +83 -48
  21. package/fesm2022/ks-digital-designsystem-angular-error-summary.mjs.map +1 -1
  22. package/fesm2022/ks-digital-designsystem-angular-forms.mjs +495 -210
  23. package/fesm2022/ks-digital-designsystem-angular-forms.mjs.map +1 -1
  24. package/fesm2022/ks-digital-designsystem-angular-heading.mjs +69 -39
  25. package/fesm2022/ks-digital-designsystem-angular-heading.mjs.map +1 -1
  26. package/fesm2022/ks-digital-designsystem-angular-link.mjs +59 -30
  27. package/fesm2022/ks-digital-designsystem-angular-link.mjs.map +1 -1
  28. package/fesm2022/ks-digital-designsystem-angular-pagination.mjs +324 -157
  29. package/fesm2022/ks-digital-designsystem-angular-pagination.mjs.map +1 -1
  30. package/fesm2022/ks-digital-designsystem-angular-paragraph.mjs +41 -24
  31. package/fesm2022/ks-digital-designsystem-angular-paragraph.mjs.map +1 -1
  32. package/fesm2022/ks-digital-designsystem-angular-popover.mjs +147 -45
  33. package/fesm2022/ks-digital-designsystem-angular-popover.mjs.map +1 -1
  34. package/fesm2022/ks-digital-designsystem-angular-search.mjs +266 -144
  35. package/fesm2022/ks-digital-designsystem-angular-search.mjs.map +1 -1
  36. package/fesm2022/ks-digital-designsystem-angular-skeleton.mjs +78 -34
  37. package/fesm2022/ks-digital-designsystem-angular-skeleton.mjs.map +1 -1
  38. package/fesm2022/ks-digital-designsystem-angular-spinner.mjs +132 -53
  39. package/fesm2022/ks-digital-designsystem-angular-spinner.mjs.map +1 -1
  40. package/fesm2022/ks-digital-designsystem-angular-suggestion.mjs +561 -297
  41. package/fesm2022/ks-digital-designsystem-angular-suggestion.mjs.map +1 -1
  42. package/fesm2022/ks-digital-designsystem-angular-table.mjs +219 -76
  43. package/fesm2022/ks-digital-designsystem-angular-table.mjs.map +1 -1
  44. package/fesm2022/ks-digital-designsystem-angular-tabs.mjs +269 -120
  45. package/fesm2022/ks-digital-designsystem-angular-tabs.mjs.map +1 -1
  46. package/fesm2022/ks-digital-designsystem-angular-tag.mjs +84 -37
  47. package/fesm2022/ks-digital-designsystem-angular-tag.mjs.map +1 -1
  48. package/fesm2022/ks-digital-designsystem-angular-validation-message.mjs +42 -24
  49. package/fesm2022/ks-digital-designsystem-angular-validation-message.mjs.map +1 -1
  50. package/fesm2022/ks-digital-designsystem-angular.mjs +1 -6
  51. package/fesm2022/ks-digital-designsystem-angular.mjs.map +1 -1
  52. package/package.json +6 -5
  53. package/types/ks-digital-designsystem-angular-__internals.d.ts +51 -37
  54. package/types/ks-digital-designsystem-angular-alert.d.ts +18 -9
  55. package/types/ks-digital-designsystem-angular-breadcrumbs.d.ts +29 -13
  56. package/types/ks-digital-designsystem-angular-button.d.ts +67 -32
  57. package/types/ks-digital-designsystem-angular-card.d.ts +38 -23
  58. package/types/ks-digital-designsystem-angular-chip.d.ts +30 -15
  59. package/types/ks-digital-designsystem-angular-details.d.ts +32 -18
  60. package/types/ks-digital-designsystem-angular-dialog.d.ts +40 -18
  61. package/types/ks-digital-designsystem-angular-dropdown.d.ts +44 -13
  62. package/types/ks-digital-designsystem-angular-error-summary.d.ts +17 -14
  63. package/types/ks-digital-designsystem-angular-forms.d.ts +136 -71
  64. package/types/ks-digital-designsystem-angular-heading.d.ts +22 -19
  65. package/types/ks-digital-designsystem-angular-link.d.ts +18 -9
  66. package/types/ks-digital-designsystem-angular-pagination.d.ts +131 -75
  67. package/types/ks-digital-designsystem-angular-paragraph.d.ts +5 -8
  68. package/types/ks-digital-designsystem-angular-popover.d.ts +44 -13
  69. package/types/ks-digital-designsystem-angular-search.d.ts +62 -38
  70. package/types/ks-digital-designsystem-angular-skeleton.d.ts +18 -15
  71. package/types/ks-digital-designsystem-angular-spinner.d.ts +42 -23
  72. package/types/ks-digital-designsystem-angular-suggestion.d.ts +182 -116
  73. package/types/ks-digital-designsystem-angular-table.d.ts +67 -42
  74. package/types/ks-digital-designsystem-angular-tabs.d.ts +85 -56
  75. package/types/ks-digital-designsystem-angular-tag.d.ts +30 -15
  76. package/types/ks-digital-designsystem-angular-validation-message.d.ts +5 -8
  77. package/types/ks-digital-designsystem-angular.d.ts +2 -2
@@ -1,34 +1,68 @@
1
- import * as i0 from '@angular/core';
2
- import { input, CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, Component, signal, booleanAttribute, Directive } from '@angular/core';
3
- import '@digdir/designsystemet-web/ds-field';
4
- import * as i1 from '@ks-digital/designsystem-angular/__internals';
5
- import { HostSize, HostColor } from '@ks-digital/designsystem-angular/__internals';
6
- import * as i1$1 from '@ks-digital/designsystem-angular/validation-message';
7
- import { ValidationMessage } from '@ks-digital/designsystem-angular/validation-message';
8
- import '@digdir/designsystemet-web/fieldset';
9
- import '@digdir/designsystemet-web/readonly';
10
-
11
- /**
12
- * Use the Field component to connect inputs and labels
13
- */
14
- class Field {
15
- /**
16
- * Preferred position input for toggle inputs (radio, checkbox, switch) in field.
17
- * @default start
18
- */
19
- dataPosition = input(undefined, { ...(ngDevMode ? { debugName: "dataPosition" } : /* istanbul ignore next */ {}), alias: 'data-position' });
20
- /**
21
- * Legacy position input kept for backward compatibility.
22
- * @deprecated Use data-position instead.
23
- * @default start
24
- */
25
- position = input(undefined, ...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
26
- /**
27
- * Variant forwarded to ds-field.
28
- */
29
- dataVariant = input(undefined, { ...(ngDevMode ? { debugName: "dataVariant" } : /* istanbul ignore next */ {}), alias: 'data-variant' });
30
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Field, deps: [], target: i0.ɵɵFactoryTarget.Component });
31
- 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: `
1
+ import * as i0 from "@angular/core";
2
+ import { CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, Component, Directive, booleanAttribute, input, signal } from "@angular/core";
3
+ import "@digdir/designsystemet-web/ds-field";
4
+ import * as i1$1 from "@ks-digital/designsystem-angular/__internals";
5
+ import { HostColor, HostSize } from "@ks-digital/designsystem-angular/__internals";
6
+ import * as i1 from "@ks-digital/designsystem-angular/validation-message";
7
+ import { ValidationMessage } from "@ks-digital/designsystem-angular/validation-message";
8
+ import "@digdir/designsystemet-web/fieldset";
9
+ import "@digdir/designsystemet-web/readonly";
10
+ var Field = class Field {
11
+ dataPosition = input(void 0, {
12
+ ...ngDevMode ? { debugName: "dataPosition" } : /* istanbul ignore next */ {},
13
+ alias: "data-position"
14
+ });
15
+ position = input(void 0, ...ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []);
16
+ dataVariant = input(void 0, {
17
+ ...ngDevMode ? { debugName: "dataVariant" } : /* istanbul ignore next */ {},
18
+ alias: "data-variant"
19
+ });
20
+ static ɵfac = i0.ɵɵngDeclareFactory({
21
+ minVersion: "12.0.0",
22
+ version: "22.2.0",
23
+ ngImport: i0,
24
+ type: Field,
25
+ deps: [],
26
+ target: i0.ɵɵFactoryTarget.Component
27
+ });
28
+ static ɵcmp = i0.ɵɵngDeclareComponent({
29
+ minVersion: "17.1.0",
30
+ version: "22.2.0",
31
+ type: Field,
32
+ isStandalone: true,
33
+ selector: "ksd-field",
34
+ inputs: {
35
+ dataPosition: {
36
+ classPropertyName: "dataPosition",
37
+ publicName: "data-position",
38
+ isSignal: true,
39
+ isRequired: false,
40
+ transformFunction: null
41
+ },
42
+ position: {
43
+ classPropertyName: "position",
44
+ publicName: "position",
45
+ isSignal: true,
46
+ isRequired: false,
47
+ transformFunction: null
48
+ },
49
+ dataVariant: {
50
+ classPropertyName: "dataVariant",
51
+ publicName: "data-variant",
52
+ isSignal: true,
53
+ isRequired: false,
54
+ transformFunction: null
55
+ }
56
+ },
57
+ hostDirectives: [{
58
+ directive: i1$1.HostSize,
59
+ inputs: ["data-size", "data-size"]
60
+ }, {
61
+ directive: i1$1.HostColor,
62
+ inputs: ["data-color", "data-color"]
63
+ }],
64
+ ngImport: i0,
65
+ template: `
32
66
  <ds-field
33
67
  class="ds-field"
34
68
  [attr.data-position]="dataPosition() ?? position() ?? 'start'"
@@ -36,20 +70,30 @@ class Field {
36
70
  >
37
71
  <ng-content />
38
72
  </ds-field>
39
- `, isInline: true, styles: [":host{display:grid}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
40
- }
41
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Field, decorators: [{
42
- type: Component,
43
- args: [{ selector: 'ksd-field', changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [
44
- {
45
- directive: HostSize,
46
- inputs: ['data-size'],
47
- },
48
- {
49
- directive: HostColor,
50
- inputs: ['data-color'],
51
- },
52
- ], template: `
73
+ `,
74
+ isInline: true,
75
+ styles: [":host{display:grid}\n"],
76
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
77
+ });
78
+ };
79
+ i0.ɵɵngDeclareClassMetadata({
80
+ minVersion: "12.0.0",
81
+ version: "22.2.0",
82
+ ngImport: i0,
83
+ type: Field,
84
+ decorators: [{
85
+ type: Component,
86
+ args: [{
87
+ selector: "ksd-field",
88
+ changeDetection: ChangeDetectionStrategy.OnPush,
89
+ hostDirectives: [{
90
+ directive: HostSize,
91
+ inputs: ["data-size"]
92
+ }, {
93
+ directive: HostColor,
94
+ inputs: ["data-color"]
95
+ }],
96
+ template: `
53
97
  <ds-field
54
98
  class="ds-field"
55
99
  [attr.data-position]="dataPosition() ?? position() ?? 'start'"
@@ -57,173 +101,414 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
57
101
  >
58
102
  <ng-content />
59
103
  </ds-field>
60
- `, schemas: [CUSTOM_ELEMENTS_SCHEMA], styles: [":host{display:grid}\n"] }]
61
- }], 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 }] }] } });
62
-
63
- class FieldDescription {
64
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: FieldDescription, deps: [], target: i0.ɵɵFactoryTarget.Component });
65
- 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 });
66
- }
67
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: FieldDescription, decorators: [{
68
- type: Component,
69
- args: [{
70
- selector: '[ksd-field-description]',
71
- changeDetection: ChangeDetectionStrategy.OnPush,
72
- host: {
73
- 'data-field': 'description',
74
- },
75
- template: `<ng-content />`,
76
- }]
77
- }] });
78
-
79
- class FieldError {
80
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: FieldError, deps: [], target: i0.ɵɵFactoryTarget.Component });
81
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: FieldError, isStandalone: true, selector: "ksd-error, [ksd-error]", hostDirectives: [{ directive: i1$1.ValidationMessage }], ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
82
- }
83
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: FieldError, decorators: [{
84
- type: Component,
85
- args: [{
86
- selector: 'ksd-error, [ksd-error]',
87
- changeDetection: ChangeDetectionStrategy.OnPush,
88
- template: `<ng-content />`,
89
- hostDirectives: [
90
- {
91
- directive: ValidationMessage,
92
- },
93
- ],
94
- }]
95
- }] });
96
-
97
- class Fieldset {
98
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Fieldset, deps: [], target: i0.ɵɵFactoryTarget.Component });
99
- 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 });
100
- }
101
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Fieldset, decorators: [{
102
- type: Component,
103
- args: [{ selector: 'fieldset[ksd-fieldset]', changeDetection: ChangeDetectionStrategy.OnPush, host: {
104
- class: 'ds-fieldset',
105
- }, template: ` <ng-content /> `, schemas: [CUSTOM_ELEMENTS_SCHEMA], styles: [":host>::ng-deep ksd-field+ksd-field{margin-block-start:var(--ds-size-4)}\n"] }]
106
- }] });
107
-
108
- class FieldsetDescription {
109
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: FieldsetDescription, deps: [], target: i0.ɵɵFactoryTarget.Component });
110
- 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 });
111
- }
112
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: FieldsetDescription, decorators: [{
113
- type: Component,
114
- args: [{
115
- selector: 'p[ksd-fieldset-description]',
116
- changeDetection: ChangeDetectionStrategy.OnPush,
117
- template: `<ng-content />`,
118
- host: {},
119
- }]
120
- }] });
121
-
122
- class FieldsetLegend {
123
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: FieldsetLegend, deps: [], target: i0.ɵɵFactoryTarget.Component });
124
- 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 });
125
- }
126
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: FieldsetLegend, decorators: [{
127
- type: Component,
128
- args: [{
129
- selector: 'legend[ksd-fieldset-legend]',
130
- changeDetection: ChangeDetectionStrategy.OnPush,
131
- host: {
132
- class: 'ds-label',
133
- },
134
- template: ` <ng-content /> `,
135
- }]
136
- }] });
137
-
138
- class Input {
139
- /**
140
- * The value of the input
141
- */
142
- value = signal('', ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
143
- /**
144
- * Whether the input is readonly
145
- */
146
- readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
147
- /**
148
- * Disables element
149
- */
150
- disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
151
- /**
152
- * Whether the element is invalid.
153
- */
154
- ariaInvalid = input(false, { ...(ngDevMode ? { debugName: "ariaInvalid" } : /* istanbul ignore next */ {}), transform: booleanAttribute,
155
- alias: 'aria-invalid' });
156
- onClick(event) {
157
- if (this.readonly()) {
158
- event.preventDefault();
159
- }
160
- }
161
- onInput(event) {
162
- const target = event.target;
163
- const val = target?.value;
164
- this.value.set(val ?? '');
165
- }
166
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Input, deps: [], target: i0.ɵɵFactoryTarget.Directive });
167
- 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 });
168
- }
169
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Input, decorators: [{
170
- type: Directive,
171
- args: [{
172
- // eslint-disable-next-line @angular-eslint/directive-selector
173
- selector: 'input[ksd-input], textarea[ksd-input], select[ksd-input]',
174
- hostDirectives: [
175
- {
176
- directive: HostSize,
177
- inputs: ['data-size'],
178
- },
179
- {
180
- directive: HostColor,
181
- inputs: ['data-color'],
182
- },
183
- ],
184
- host: {
185
- class: 'ds-input',
186
- '[attr.readonly]': 'readonly() ? true : null',
187
- '[attr.disabled]': 'disabled() ? true : null',
188
- '[attr.aria-invalid]': 'ariaInvalid() ? true : null',
189
- '(click)': 'onClick($event)',
190
- '(input)': 'onInput($event)',
191
- },
192
- }]
193
- }], 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 }] }] } });
194
-
195
- class Label {
196
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Label, deps: [], target: i0.ɵɵFactoryTarget.Component });
197
- 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: `
104
+ `,
105
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
106
+ styles: [":host{display:grid}\n"]
107
+ }]
108
+ }],
109
+ propDecorators: {
110
+ dataPosition: [{
111
+ type: i0.Input,
112
+ args: [{
113
+ isSignal: true,
114
+ alias: "data-position",
115
+ required: false
116
+ }]
117
+ }],
118
+ position: [{
119
+ type: i0.Input,
120
+ args: [{
121
+ isSignal: true,
122
+ alias: "position",
123
+ required: false
124
+ }]
125
+ }],
126
+ dataVariant: [{
127
+ type: i0.Input,
128
+ args: [{
129
+ isSignal: true,
130
+ alias: "data-variant",
131
+ required: false
132
+ }]
133
+ }]
134
+ }
135
+ });
136
+ var FieldDescription = class FieldDescription {
137
+ static ɵfac = i0.ɵɵngDeclareFactory({
138
+ minVersion: "12.0.0",
139
+ version: "22.2.0",
140
+ ngImport: i0,
141
+ type: FieldDescription,
142
+ deps: [],
143
+ target: i0.ɵɵFactoryTarget.Component
144
+ });
145
+ static ɵcmp = i0.ɵɵngDeclareComponent({
146
+ minVersion: "14.0.0",
147
+ version: "22.2.0",
148
+ type: FieldDescription,
149
+ isStandalone: true,
150
+ selector: "[ksd-field-description]",
151
+ host: { attributes: { "data-field": "description" } },
152
+ ngImport: i0,
153
+ template: `<ng-content />`,
154
+ isInline: true,
155
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
156
+ });
157
+ };
158
+ i0.ɵɵngDeclareClassMetadata({
159
+ minVersion: "12.0.0",
160
+ version: "22.2.0",
161
+ ngImport: i0,
162
+ type: FieldDescription,
163
+ decorators: [{
164
+ type: Component,
165
+ args: [{
166
+ selector: "[ksd-field-description]",
167
+ changeDetection: ChangeDetectionStrategy.OnPush,
168
+ host: { "data-field": "description" },
169
+ template: `<ng-content />`
170
+ }]
171
+ }]
172
+ });
173
+ var FieldError = class FieldError {
174
+ static ɵfac = i0.ɵɵngDeclareFactory({
175
+ minVersion: "12.0.0",
176
+ version: "22.2.0",
177
+ ngImport: i0,
178
+ type: FieldError,
179
+ deps: [],
180
+ target: i0.ɵɵFactoryTarget.Component
181
+ });
182
+ static ɵcmp = i0.ɵɵngDeclareComponent({
183
+ minVersion: "14.0.0",
184
+ version: "22.2.0",
185
+ type: FieldError,
186
+ isStandalone: true,
187
+ selector: "ksd-error, [ksd-error]",
188
+ hostDirectives: [{ directive: i1.ValidationMessage }],
189
+ ngImport: i0,
190
+ template: `<ng-content />`,
191
+ isInline: true,
192
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
193
+ });
194
+ };
195
+ i0.ɵɵngDeclareClassMetadata({
196
+ minVersion: "12.0.0",
197
+ version: "22.2.0",
198
+ ngImport: i0,
199
+ type: FieldError,
200
+ decorators: [{
201
+ type: Component,
202
+ args: [{
203
+ selector: "ksd-error, [ksd-error]",
204
+ changeDetection: ChangeDetectionStrategy.OnPush,
205
+ template: `<ng-content />`,
206
+ hostDirectives: [{ directive: ValidationMessage }]
207
+ }]
208
+ }]
209
+ });
210
+ var Fieldset = class Fieldset {
211
+ static ɵfac = i0.ɵɵngDeclareFactory({
212
+ minVersion: "12.0.0",
213
+ version: "22.2.0",
214
+ ngImport: i0,
215
+ type: Fieldset,
216
+ deps: [],
217
+ target: i0.ɵɵFactoryTarget.Component
218
+ });
219
+ static ɵcmp = i0.ɵɵngDeclareComponent({
220
+ minVersion: "14.0.0",
221
+ version: "22.2.0",
222
+ type: Fieldset,
223
+ isStandalone: true,
224
+ selector: "fieldset[ksd-fieldset]",
225
+ host: { classAttribute: "ds-fieldset" },
226
+ ngImport: i0,
227
+ template: ` <ng-content /> `,
228
+ isInline: true,
229
+ styles: [":host>::ng-deep ksd-field+ksd-field{margin-block-start:var(--ds-size-4)}\n"],
230
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
231
+ });
232
+ };
233
+ i0.ɵɵngDeclareClassMetadata({
234
+ minVersion: "12.0.0",
235
+ version: "22.2.0",
236
+ ngImport: i0,
237
+ type: Fieldset,
238
+ decorators: [{
239
+ type: Component,
240
+ args: [{
241
+ selector: "fieldset[ksd-fieldset]",
242
+ changeDetection: ChangeDetectionStrategy.OnPush,
243
+ host: { class: "ds-fieldset" },
244
+ template: ` <ng-content /> `,
245
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
246
+ styles: [":host>::ng-deep ksd-field+ksd-field{margin-block-start:var(--ds-size-4)}\n"]
247
+ }]
248
+ }]
249
+ });
250
+ var FieldsetDescription = class FieldsetDescription {
251
+ static ɵfac = i0.ɵɵngDeclareFactory({
252
+ minVersion: "12.0.0",
253
+ version: "22.2.0",
254
+ ngImport: i0,
255
+ type: FieldsetDescription,
256
+ deps: [],
257
+ target: i0.ɵɵFactoryTarget.Component
258
+ });
259
+ static ɵcmp = i0.ɵɵngDeclareComponent({
260
+ minVersion: "14.0.0",
261
+ version: "22.2.0",
262
+ type: FieldsetDescription,
263
+ isStandalone: true,
264
+ selector: "p[ksd-fieldset-description]",
265
+ ngImport: i0,
266
+ template: `<ng-content />`,
267
+ isInline: true,
268
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
269
+ });
270
+ };
271
+ i0.ɵɵngDeclareClassMetadata({
272
+ minVersion: "12.0.0",
273
+ version: "22.2.0",
274
+ ngImport: i0,
275
+ type: FieldsetDescription,
276
+ decorators: [{
277
+ type: Component,
278
+ args: [{
279
+ selector: "p[ksd-fieldset-description]",
280
+ changeDetection: ChangeDetectionStrategy.OnPush,
281
+ template: `<ng-content />`,
282
+ host: {}
283
+ }]
284
+ }]
285
+ });
286
+ var FieldsetLegend = class FieldsetLegend {
287
+ static ɵfac = i0.ɵɵngDeclareFactory({
288
+ minVersion: "12.0.0",
289
+ version: "22.2.0",
290
+ ngImport: i0,
291
+ type: FieldsetLegend,
292
+ deps: [],
293
+ target: i0.ɵɵFactoryTarget.Component
294
+ });
295
+ static ɵcmp = i0.ɵɵngDeclareComponent({
296
+ minVersion: "14.0.0",
297
+ version: "22.2.0",
298
+ type: FieldsetLegend,
299
+ isStandalone: true,
300
+ selector: "legend[ksd-fieldset-legend]",
301
+ host: { classAttribute: "ds-label" },
302
+ ngImport: i0,
303
+ template: ` <ng-content /> `,
304
+ isInline: true,
305
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
306
+ });
307
+ };
308
+ i0.ɵɵngDeclareClassMetadata({
309
+ minVersion: "12.0.0",
310
+ version: "22.2.0",
311
+ ngImport: i0,
312
+ type: FieldsetLegend,
313
+ decorators: [{
314
+ type: Component,
315
+ args: [{
316
+ selector: "legend[ksd-fieldset-legend]",
317
+ changeDetection: ChangeDetectionStrategy.OnPush,
318
+ host: { class: "ds-label" },
319
+ template: ` <ng-content /> `
320
+ }]
321
+ }]
322
+ });
323
+ var Input = class Input {
324
+ value = signal("", ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
325
+ readonly = input(false, {
326
+ ...ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {},
327
+ transform: booleanAttribute
328
+ });
329
+ disabled = input(false, {
330
+ ...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
331
+ transform: booleanAttribute
332
+ });
333
+ ariaInvalid = input(false, {
334
+ ...ngDevMode ? { debugName: "ariaInvalid" } : /* istanbul ignore next */ {},
335
+ transform: booleanAttribute,
336
+ alias: "aria-invalid"
337
+ });
338
+ onClick(event) {
339
+ if (this.readonly()) event.preventDefault();
340
+ }
341
+ onInput(event) {
342
+ const val = event.target?.value;
343
+ this.value.set(val ?? "");
344
+ }
345
+ static ɵfac = i0.ɵɵngDeclareFactory({
346
+ minVersion: "12.0.0",
347
+ version: "22.2.0",
348
+ ngImport: i0,
349
+ type: Input,
350
+ deps: [],
351
+ target: i0.ɵɵFactoryTarget.Directive
352
+ });
353
+ static ɵdir = i0.ɵɵngDeclareDirective({
354
+ minVersion: "17.1.0",
355
+ version: "22.2.0",
356
+ type: Input,
357
+ isStandalone: true,
358
+ selector: "input[ksd-input], textarea[ksd-input], select[ksd-input]",
359
+ inputs: {
360
+ readonly: {
361
+ classPropertyName: "readonly",
362
+ publicName: "readonly",
363
+ isSignal: true,
364
+ isRequired: false,
365
+ transformFunction: null
366
+ },
367
+ disabled: {
368
+ classPropertyName: "disabled",
369
+ publicName: "disabled",
370
+ isSignal: true,
371
+ isRequired: false,
372
+ transformFunction: null
373
+ },
374
+ ariaInvalid: {
375
+ classPropertyName: "ariaInvalid",
376
+ publicName: "aria-invalid",
377
+ isSignal: true,
378
+ isRequired: false,
379
+ transformFunction: null
380
+ }
381
+ },
382
+ host: {
383
+ listeners: {
384
+ "click": "onClick($event)",
385
+ "input": "onInput($event)"
386
+ },
387
+ properties: {
388
+ "attr.readonly": "readonly() ? true : null",
389
+ "attr.disabled": "disabled() ? true : null",
390
+ "attr.aria-invalid": "ariaInvalid() ? true : null"
391
+ },
392
+ classAttribute: "ds-input"
393
+ },
394
+ hostDirectives: [{
395
+ directive: i1$1.HostSize,
396
+ inputs: ["data-size", "data-size"]
397
+ }, {
398
+ directive: i1$1.HostColor,
399
+ inputs: ["data-color", "data-color"]
400
+ }],
401
+ ngImport: i0
402
+ });
403
+ };
404
+ i0.ɵɵngDeclareClassMetadata({
405
+ minVersion: "12.0.0",
406
+ version: "22.2.0",
407
+ ngImport: i0,
408
+ type: Input,
409
+ decorators: [{
410
+ type: Directive,
411
+ args: [{
412
+ selector: "input[ksd-input], textarea[ksd-input], select[ksd-input]",
413
+ hostDirectives: [{
414
+ directive: HostSize,
415
+ inputs: ["data-size"]
416
+ }, {
417
+ directive: HostColor,
418
+ inputs: ["data-color"]
419
+ }],
420
+ host: {
421
+ class: "ds-input",
422
+ "[attr.readonly]": "readonly() ? true : null",
423
+ "[attr.disabled]": "disabled() ? true : null",
424
+ "[attr.aria-invalid]": "ariaInvalid() ? true : null",
425
+ "(click)": "onClick($event)",
426
+ "(input)": "onInput($event)"
427
+ }
428
+ }]
429
+ }],
430
+ propDecorators: {
431
+ readonly: [{
432
+ type: i0.Input,
433
+ args: [{
434
+ isSignal: true,
435
+ alias: "readonly",
436
+ required: false
437
+ }]
438
+ }],
439
+ disabled: [{
440
+ type: i0.Input,
441
+ args: [{
442
+ isSignal: true,
443
+ alias: "disabled",
444
+ required: false
445
+ }]
446
+ }],
447
+ ariaInvalid: [{
448
+ type: i0.Input,
449
+ args: [{
450
+ isSignal: true,
451
+ alias: "aria-invalid",
452
+ required: false
453
+ }]
454
+ }]
455
+ }
456
+ });
457
+ var Label = class Label {
458
+ static ɵfac = i0.ɵɵngDeclareFactory({
459
+ minVersion: "12.0.0",
460
+ version: "22.2.0",
461
+ ngImport: i0,
462
+ type: Label,
463
+ deps: [],
464
+ target: i0.ɵɵFactoryTarget.Component
465
+ });
466
+ static ɵcmp = i0.ɵɵngDeclareComponent({
467
+ minVersion: "14.0.0",
468
+ version: "22.2.0",
469
+ type: Label,
470
+ isStandalone: true,
471
+ selector: "ksd-label",
472
+ hostDirectives: [{
473
+ directive: i1$1.HostSize,
474
+ inputs: ["data-size", "data-size"]
475
+ }, {
476
+ directive: i1$1.HostColor,
477
+ inputs: ["data-color", "data-color"]
478
+ }],
479
+ ngImport: i0,
480
+ template: `
198
481
  <!-- eslint-disable @angular-eslint/template/label-has-associated-control -- Fieldobserver handles binding the label to the input -->
199
482
  <label class="ds-label"><ng-content /></label>
200
- `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
201
- }
202
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Label, decorators: [{
203
- type: Component,
204
- args: [{
205
- selector: 'ksd-label',
206
- changeDetection: ChangeDetectionStrategy.OnPush,
207
- hostDirectives: [
208
- {
209
- directive: HostSize,
210
- inputs: ['data-size'],
211
- },
212
- {
213
- directive: HostColor,
214
- inputs: ['data-color'],
215
- },
216
- ],
217
- template: `
483
+ `,
484
+ isInline: true,
485
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
486
+ });
487
+ };
488
+ i0.ɵɵngDeclareClassMetadata({
489
+ minVersion: "12.0.0",
490
+ version: "22.2.0",
491
+ ngImport: i0,
492
+ type: Label,
493
+ decorators: [{
494
+ type: Component,
495
+ args: [{
496
+ selector: "ksd-label",
497
+ changeDetection: ChangeDetectionStrategy.OnPush,
498
+ hostDirectives: [{
499
+ directive: HostSize,
500
+ inputs: ["data-size"]
501
+ }, {
502
+ directive: HostColor,
503
+ inputs: ["data-color"]
504
+ }],
505
+ template: `
218
506
  <!-- eslint-disable @angular-eslint/template/label-has-associated-control -- Fieldobserver handles binding the label to the input -->
219
507
  <label class="ds-label"><ng-content /></label>
220
- `,
221
- }]
222
- }] });
223
-
224
- /**
225
- * Generated bundle index. Do not edit.
226
- */
227
-
508
+ `
509
+ }]
510
+ }]
511
+ });
228
512
  export { Field, FieldDescription, FieldError, Fieldset, FieldsetDescription, FieldsetLegend, Input, Label };
229
- //# sourceMappingURL=ks-digital-designsystem-angular-forms.mjs.map
513
+
514
+ //# sourceMappingURL=ks-digital-designsystem-angular-forms.mjs.map