@ks-digital/designsystem-angular 0.0.1-alpha.42 → 0.0.1-alpha.43

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 (33) hide show
  1. package/fesm2022/ks-digital-designsystem-angular-__internals.mjs +0 -1
  2. package/fesm2022/ks-digital-designsystem-angular-__internals.mjs.map +1 -1
  3. package/fesm2022/ks-digital-designsystem-angular-breadcrumbs.mjs +30 -8
  4. package/fesm2022/ks-digital-designsystem-angular-breadcrumbs.mjs.map +1 -1
  5. package/fesm2022/ks-digital-designsystem-angular-button.mjs +0 -1
  6. package/fesm2022/ks-digital-designsystem-angular-button.mjs.map +1 -1
  7. package/fesm2022/ks-digital-designsystem-angular-card.mjs +34 -23
  8. package/fesm2022/ks-digital-designsystem-angular-card.mjs.map +1 -1
  9. package/fesm2022/ks-digital-designsystem-angular-chip.mjs +0 -1
  10. package/fesm2022/ks-digital-designsystem-angular-chip.mjs.map +1 -1
  11. package/fesm2022/ks-digital-designsystem-angular-details.mjs +16 -49
  12. package/fesm2022/ks-digital-designsystem-angular-details.mjs.map +1 -1
  13. package/fesm2022/ks-digital-designsystem-angular-forms.mjs +75 -291
  14. package/fesm2022/ks-digital-designsystem-angular-forms.mjs.map +1 -1
  15. package/fesm2022/ks-digital-designsystem-angular-heading.mjs +0 -1
  16. package/fesm2022/ks-digital-designsystem-angular-heading.mjs.map +1 -1
  17. package/fesm2022/ks-digital-designsystem-angular-pagination.mjs +114 -7
  18. package/fesm2022/ks-digital-designsystem-angular-pagination.mjs.map +1 -1
  19. package/fesm2022/ks-digital-designsystem-angular-popover.mjs +13 -117
  20. package/fesm2022/ks-digital-designsystem-angular-popover.mjs.map +1 -1
  21. package/fesm2022/ks-digital-designsystem-angular-search.mjs +0 -3
  22. package/fesm2022/ks-digital-designsystem-angular-search.mjs.map +1 -1
  23. package/fesm2022/ks-digital-designsystem-angular-spinner.mjs +0 -1
  24. package/fesm2022/ks-digital-designsystem-angular-spinner.mjs.map +1 -1
  25. package/fesm2022/ks-digital-designsystem-angular-tag.mjs +0 -1
  26. package/fesm2022/ks-digital-designsystem-angular-tag.mjs.map +1 -1
  27. package/package.json +2 -3
  28. package/types/ks-digital-designsystem-angular-breadcrumbs.d.ts +5 -1
  29. package/types/ks-digital-designsystem-angular-card.d.ts +6 -4
  30. package/types/ks-digital-designsystem-angular-details.d.ts +2 -7
  31. package/types/ks-digital-designsystem-angular-forms.d.ts +3 -33
  32. package/types/ks-digital-designsystem-angular-pagination.d.ts +53 -4
  33. package/types/ks-digital-designsystem-angular-popover.d.ts +2 -12
@@ -1,253 +1,11 @@
1
1
  import * as i0 from '@angular/core';
2
- import { signal, input, booleanAttribute, numberAttribute, inject, Directive, computed, Injectable, effect, Component, contentChild, forwardRef, contentChildren, ElementRef, afterNextRender } from '@angular/core';
2
+ import { input, CUSTOM_ELEMENTS_SCHEMA, Component, ChangeDetectionStrategy, signal, booleanAttribute, Directive } from '@angular/core';
3
+ import '@digdir/designsystemet-web';
3
4
  import * as i1 from '@ks-digital/designsystem-angular/__internals';
4
5
  import { HostSize, HostColor } from '@ks-digital/designsystem-angular/__internals';
5
6
  import * as i1$1 from '@ks-digital/designsystem-angular/validation-message';
6
7
  import { ValidationMessage } from '@ks-digital/designsystem-angular/validation-message';
7
8
 
8
- class Input {
9
- /**
10
- * The value of the input
11
- */
12
- value = signal('', ...(ngDevMode ? [{ debugName: "value" }] : []));
13
- /**
14
- * Whether the input is readonly
15
- */
16
- readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : {}), transform: booleanAttribute });
17
- /**
18
- * Disables element
19
- */
20
- disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : {}), transform: booleanAttribute });
21
- /**
22
- * Whether the element is invalid.
23
- */
24
- ariaInvalid = input(false, { ...(ngDevMode ? { debugName: "ariaInvalid" } : {}), transform: booleanAttribute,
25
- alias: 'aria-invalid' });
26
- /**
27
- * Displays a character counter. pass a number to set a limit.
28
- */
29
- counter = input(0, { ...(ngDevMode ? { debugName: "counter" } : {}), transform: numberAttribute });
30
- fieldState = inject(FieldState, { optional: true });
31
- onClick(event) {
32
- if (this.readonly()) {
33
- event.preventDefault();
34
- }
35
- }
36
- onInput(event) {
37
- const target = event.target;
38
- const val = target?.value;
39
- this.value.set(val ?? '');
40
- }
41
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: Input, deps: [], target: i0.ɵɵFactoryTarget.Directive });
42
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.6", type: Input, isStandalone: true, selector: "input[ksd-input], textarea[ksd-input], select[ksd-input]", inputs: { readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, ariaInvalid: { classPropertyName: "ariaInvalid", publicName: "aria-invalid", isSignal: true, isRequired: false, transformFunction: null }, counter: { classPropertyName: "counter", publicName: "counter", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "onClick($event)", "input": "onInput($event)" }, properties: { "attr.readonly": "readonly() ? true : null", "attr.disabled": "disabled() ? true : null", "attr.aria-invalid": "ariaInvalid() ? true : (fieldState?.hasError() ? true: null)" }, classAttribute: "ds-input" }, hostDirectives: [{ directive: i1.HostSize, inputs: ["data-size", "data-size"] }, { directive: i1.HostColor, inputs: ["data-color", "data-color"] }], ngImport: i0 });
43
- }
44
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: Input, decorators: [{
45
- type: Directive,
46
- args: [{
47
- // eslint-disable-next-line @angular-eslint/directive-selector
48
- selector: 'input[ksd-input], textarea[ksd-input], select[ksd-input]',
49
- hostDirectives: [
50
- {
51
- directive: HostSize,
52
- inputs: ['data-size'],
53
- },
54
- {
55
- directive: HostColor,
56
- inputs: ['data-color'],
57
- },
58
- ],
59
- host: {
60
- class: 'ds-input',
61
- '[attr.readonly]': 'readonly() ? true : null',
62
- '[attr.disabled]': 'disabled() ? true : null',
63
- '[attr.aria-invalid]': 'ariaInvalid() ? true : (fieldState?.hasError() ? true: null)',
64
- '(click)': 'onClick($event)',
65
- '(input)': 'onInput($event)',
66
- },
67
- }]
68
- }], propDecorators: { readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], ariaInvalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-invalid", required: false }] }], counter: [{ type: i0.Input, args: [{ isSignal: true, alias: "counter", required: false }] }] } });
69
-
70
- class FieldState {
71
- /**
72
- * Whether the field counter has exceeded its limit
73
- */
74
- hasExceededCounter = signal(false, ...(ngDevMode ? [{ debugName: "hasExceededCounter" }] : []));
75
- /**
76
- * Whether the field has errors projected from the outside
77
- */
78
- hasProjectedErrors = signal(false, ...(ngDevMode ? [{ debugName: "hasProjectedErrors" }] : []));
79
- /**
80
- * Whether the field has any errors associated with it
81
- */
82
- hasError = computed(() => this.hasExceededCounter() || this.hasProjectedErrors(), ...(ngDevMode ? [{ debugName: "hasError" }] : []));
83
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: FieldState, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
84
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: FieldState });
85
- }
86
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: FieldState, decorators: [{
87
- type: Injectable
88
- }] });
89
-
90
- class FieldCounter {
91
- /**
92
- * The maximum allowed characters.
93
- *
94
- **/
95
- limit = input.required(...(ngDevMode ? [{ debugName: "limit" }] : []));
96
- /**
97
- * How many characters have been typed.
98
- *
99
- **/
100
- count = input.required(...(ngDevMode ? [{ debugName: "count" }] : []));
101
- remainder = computed(() => this.limit() - this.count(), ...(ngDevMode ? [{ debugName: "remainder" }] : []));
102
- excessCount = computed(() => Math.abs(this.remainder()), ...(ngDevMode ? [{ debugName: "excessCount" }] : []));
103
- hasExceededLimit = computed(() => this.count() > this.limit(), ...(ngDevMode ? [{ debugName: "hasExceededLimit" }] : []));
104
- fieldState = inject(FieldState);
105
- constructor() {
106
- effect(() => {
107
- this.fieldState.hasExceededCounter.set(this.hasExceededLimit());
108
- });
109
- }
110
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: FieldCounter, deps: [], target: i0.ɵɵFactoryTarget.Component });
111
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: FieldCounter, isStandalone: true, selector: "ksd-field-counter", inputs: { limit: { classPropertyName: "limit", publicName: "limit", isSignal: true, isRequired: true, transformFunction: null }, count: { classPropertyName: "count", publicName: "count", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
112
- <div data-field="description" class="ds-sr-only" aria-live="polite">
113
- @if (hasExceededLimit()) {
114
- {{ excessCount() }} tegn for mye
115
- }
116
- </div>
117
- @if (hasExceededLimit()) {
118
- <p ksd-validation-message>{{ excessCount() }} tegn for mye</p>
119
- } @else {
120
- <p data-field="validation">{{ remainder() }} tegn igjen</p>
121
- }
122
- `, isInline: true, styles: [":host>*{margin-top:var(--dsc-field-content-spacing)}\n"], dependencies: [{ kind: "directive", type: ValidationMessage, selector: "[ksd-validation-message]" }] });
123
- }
124
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: FieldCounter, decorators: [{
125
- type: Component,
126
- args: [{ selector: 'ksd-field-counter', imports: [ValidationMessage], template: `
127
- <div data-field="description" class="ds-sr-only" aria-live="polite">
128
- @if (hasExceededLimit()) {
129
- {{ excessCount() }} tegn for mye
130
- }
131
- </div>
132
- @if (hasExceededLimit()) {
133
- <p ksd-validation-message>{{ excessCount() }} tegn for mye</p>
134
- } @else {
135
- <p data-field="validation">{{ remainder() }} tegn igjen</p>
136
- }
137
- `, styles: [":host>*{margin-top:var(--dsc-field-content-spacing)}\n"] }]
138
- }], ctorParameters: () => [], propDecorators: { limit: [{ type: i0.Input, args: [{ isSignal: true, alias: "limit", required: true }] }], count: [{ type: i0.Input, args: [{ isSignal: true, alias: "count", required: true }] }] } });
139
-
140
- /**
141
- * Lifted from Designsystemet core repo.
142
- * Takes care of binding ids, labels and aria-describedby attributes
143
- *
144
- * @param fieldElement - The field element to observe
145
- * @returns A function to disconnect the observer
146
- * */
147
- function fieldObserver(fieldElement) {
148
- if (!fieldElement)
149
- return;
150
- const elements = new Map();
151
- const typeCounter = new Map(); // Track count for each data-field type
152
- const uuid = `:${Date.now().toString(36)}${Math.random().toString(36).slice(2, 5)}`;
153
- let input = null;
154
- let describedby = '';
155
- const process = (mutations) => {
156
- const changed = [];
157
- const removed = [];
158
- // Merge MutationRecords
159
- for (const mutation of mutations) {
160
- if (mutation.attributeName)
161
- changed.push(mutation.target ?? fieldElement);
162
- // @ts-expect-error - addedNodes is not typed
163
- changed.push(...(mutation.addedNodes || []));
164
- removed.push(...(mutation.removedNodes || []));
165
- }
166
- // Register elements
167
- for (const el of changed) {
168
- if (!isElement(el))
169
- continue;
170
- if (isLabel(el))
171
- elements.set(el, el.htmlFor);
172
- else if (el.hasAttribute('data-field'))
173
- elements.set(el, el.id);
174
- else if (isInputLike(el)) {
175
- input = el;
176
- describedby = el.getAttribute('aria-describedby') || '';
177
- }
178
- }
179
- // Reset removed elements
180
- for (const el of removed) {
181
- if (!isElement(el))
182
- continue;
183
- if (input === el)
184
- input = null;
185
- if (elements.has(el)) {
186
- setAttr(el, isLabel(el) ? 'for' : 'id', elements.get(el));
187
- elements.delete(el);
188
- }
189
- }
190
- // Connect elements
191
- const describedbyIds = [describedby]; // Keep original aria-describedby
192
- const inputId = input?.id || uuid;
193
- // Reset type counters since we reprocess all elements
194
- typeCounter.clear();
195
- for (const [el, value] of elements) {
196
- const descriptionType = el.getAttribute('data-field');
197
- let id;
198
- if (descriptionType) {
199
- // Increment type counter for this type
200
- const count = (typeCounter.get(descriptionType) || 0) + 1;
201
- typeCounter.set(descriptionType, count);
202
- id = `${inputId}:${descriptionType}:${count}`;
203
- }
204
- else {
205
- id = inputId;
206
- }
207
- if (!value)
208
- setAttr(el, isLabel(el) ? 'for' : 'id', id); // Ensure we have a value
209
- if (descriptionType === 'validation')
210
- describedbyIds.unshift(el.id); // Validations to the front
211
- else if (descriptionType)
212
- describedbyIds.push(el.id); // Other descriptions to the back
213
- }
214
- setAttr(input, 'id', inputId);
215
- setAttr(input, 'aria-describedby', describedbyIds.join(' ').trim());
216
- };
217
- const observer = createOptimizedMutationObserver(process);
218
- observer.observe(fieldElement, {
219
- attributeFilter: ['id', 'for', 'aria-describedby'],
220
- attributes: true,
221
- childList: true,
222
- subtree: true,
223
- });
224
- process([{ addedNodes: fieldElement.querySelectorAll('*') }]); // Initial setup
225
- observer.takeRecords(); // Clear initial setup queue
226
- return () => observer.disconnect();
227
- }
228
- // Utilities
229
- const isElement = (node) => node instanceof Element;
230
- const isLabel = (node) => node instanceof HTMLLabelElement;
231
- const isInputLike = (node) => node instanceof HTMLElement &&
232
- 'validity' in node &&
233
- !(node instanceof HTMLButtonElement); // Matches input, textarea, select and form accosiated custom elements
234
- const setAttr = (el, name, value) => value ? el?.setAttribute(name, value) : el?.removeAttribute(name);
235
- // Speed up MutationObserver by debouncing, clearing internal queue after changes and only running when page is visible
236
- function createOptimizedMutationObserver(callback) {
237
- const queue = [];
238
- const observer = new MutationObserver((mutations) => {
239
- if (!queue.length)
240
- requestAnimationFrame(process);
241
- queue.push(...mutations);
242
- });
243
- const process = () => {
244
- callback(queue, observer);
245
- queue.length = 0; // Reset queue
246
- observer.takeRecords(); // Clear queue due to DOM changes in callback
247
- };
248
- return observer;
249
- }
250
-
251
9
  /**
252
10
  * Use the Field component to connect inputs and labels
253
11
  */
@@ -257,34 +15,16 @@ class Field {
257
15
  * @default start
258
16
  */
259
17
  position = input('start', ...(ngDevMode ? [{ debugName: "position" }] : []));
260
- fieldState = inject(FieldState);
261
- input = contentChild(forwardRef(() => Input), ...(ngDevMode ? [{ debugName: "input" }] : []));
262
- projectedErrors = contentChildren(ValidationMessage, ...(ngDevMode ? [{ debugName: "projectedErrors" }] : []));
263
- el = inject(ElementRef);
264
- count = computed(() => this.input()?.value().length, ...(ngDevMode ? [{ debugName: "count" }] : []));
265
- limit = computed(() => this.input()?.counter(), ...(ngDevMode ? [{ debugName: "limit" }] : []));
266
- hasCounter = computed(() => this.limit(), ...(ngDevMode ? [{ debugName: "hasCounter" }] : []));
267
- constructor() {
268
- afterNextRender(() => {
269
- fieldObserver(this.el.nativeElement);
270
- });
271
- effect(() => {
272
- this.fieldState.hasProjectedErrors.set(this.projectedErrors().length > 0);
273
- });
274
- }
275
18
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: Field, deps: [], target: i0.ɵɵFactoryTarget.Component });
276
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: Field, isStandalone: true, selector: "ksd-field", inputs: { position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.dataPosition": "position()" }, classAttribute: "ds-field" }, providers: [FieldState], queries: [{ propertyName: "input", first: true, predicate: i0.forwardRef(() => Input), descendants: true, isSignal: true }, { propertyName: "projectedErrors", predicate: ValidationMessage, isSignal: true }], hostDirectives: [{ directive: i1.HostSize, inputs: ["data-size", "data-size"] }, { directive: i1.HostColor, inputs: ["data-color", "data-color"] }], ngImport: i0, template: `
277
- <ng-content />
278
- @if (hasCounter()) {
279
- <ksd-field-counter [limit]="limit() ?? 0" [count]="count() ?? 0" />
280
- }
281
- `, isInline: true, dependencies: [{ kind: "component", type: FieldCounter, selector: "ksd-field-counter", inputs: ["limit", "count"] }] });
19
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.6", type: Field, isStandalone: true, selector: "ksd-field", inputs: { position: { classPropertyName: "position", publicName: "position", 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: `
20
+ <ds-field class="ds-field" [attr.data-position]="position()">
21
+ <ng-content />
22
+ </ds-field>
23
+ `, isInline: true, styles: [":host{display:grid}\n"] });
282
24
  }
283
25
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: Field, decorators: [{
284
26
  type: Component,
285
- args: [{
286
- selector: 'ksd-field',
287
- hostDirectives: [
27
+ args: [{ selector: 'ksd-field', hostDirectives: [
288
28
  {
289
29
  directive: HostSize,
290
30
  inputs: ['data-size'],
@@ -293,21 +33,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
293
33
  directive: HostColor,
294
34
  inputs: ['data-color'],
295
35
  },
296
- ],
297
- host: {
298
- class: 'ds-field',
299
- '[attr.dataPosition]': 'position()',
300
- },
301
- template: `
302
- <ng-content />
303
- @if (hasCounter()) {
304
- <ksd-field-counter [limit]="limit() ?? 0" [count]="count() ?? 0" />
305
- }
306
- `,
307
- imports: [FieldCounter],
308
- providers: [FieldState],
309
- }]
310
- }], ctorParameters: () => [], propDecorators: { position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], input: [{ type: i0.ContentChild, args: [forwardRef(() => Input), { isSignal: true }] }], projectedErrors: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => ValidationMessage), { isSignal: true }] }] } });
36
+ ], template: `
37
+ <ds-field class="ds-field" [attr.data-position]="position()">
38
+ <ng-content />
39
+ </ds-field>
40
+ `, schemas: [CUSTOM_ELEMENTS_SCHEMA], styles: [":host{display:grid}\n"] }]
41
+ }], propDecorators: { position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }] } });
311
42
 
312
43
  class FieldDescription {
313
44
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: FieldDescription, deps: [], target: i0.ɵɵFactoryTarget.Component });
@@ -343,17 +74,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
343
74
 
344
75
  class Fieldset {
345
76
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: Fieldset, deps: [], target: i0.ɵɵFactoryTarget.Component });
346
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.6", type: Fieldset, isStandalone: true, selector: "fieldset[ksd-fieldset]", host: { classAttribute: "ds-fieldset" }, ngImport: i0, template: ` <ng-content /> `, isInline: true });
77
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.6", 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(--dsc-fieldset-gap)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
347
78
  }
348
79
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: Fieldset, decorators: [{
349
80
  type: Component,
350
- args: [{
351
- selector: 'fieldset[ksd-fieldset]',
352
- host: {
81
+ args: [{ selector: 'fieldset[ksd-fieldset]', changeDetection: ChangeDetectionStrategy.OnPush, host: {
353
82
  class: 'ds-fieldset',
354
- },
355
- template: ` <ng-content /> `,
356
- }]
83
+ }, template: ` <ng-content /> `, schemas: [CUSTOM_ELEMENTS_SCHEMA], styles: [":host>::ng-deep ksd-field+ksd-field{margin-block-start:var(--dsc-fieldset-gap)}\n"] }]
357
84
  }] });
358
85
 
359
86
  class FieldsetDescription {
@@ -384,6 +111,63 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
384
111
  }]
385
112
  }] });
386
113
 
114
+ class Input {
115
+ /**
116
+ * The value of the input
117
+ */
118
+ value = signal('', ...(ngDevMode ? [{ debugName: "value" }] : []));
119
+ /**
120
+ * Whether the input is readonly
121
+ */
122
+ readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : {}), transform: booleanAttribute });
123
+ /**
124
+ * Disables element
125
+ */
126
+ disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : {}), transform: booleanAttribute });
127
+ /**
128
+ * Whether the element is invalid.
129
+ */
130
+ ariaInvalid = input(false, { ...(ngDevMode ? { debugName: "ariaInvalid" } : {}), transform: booleanAttribute,
131
+ alias: 'aria-invalid' });
132
+ onClick(event) {
133
+ if (this.readonly()) {
134
+ event.preventDefault();
135
+ }
136
+ }
137
+ onInput(event) {
138
+ const target = event.target;
139
+ const val = target?.value;
140
+ this.value.set(val ?? '');
141
+ }
142
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: Input, deps: [], target: i0.ɵɵFactoryTarget.Directive });
143
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.6", 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 });
144
+ }
145
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: Input, decorators: [{
146
+ type: Directive,
147
+ args: [{
148
+ // eslint-disable-next-line @angular-eslint/directive-selector
149
+ selector: 'input[ksd-input], textarea[ksd-input], select[ksd-input]',
150
+ hostDirectives: [
151
+ {
152
+ directive: HostSize,
153
+ inputs: ['data-size'],
154
+ },
155
+ {
156
+ directive: HostColor,
157
+ inputs: ['data-color'],
158
+ },
159
+ ],
160
+ host: {
161
+ class: 'ds-input',
162
+ '[attr.readonly]': 'readonly() ? true : null',
163
+ '[attr.disabled]': 'disabled() ? true : null',
164
+ '[attr.aria-invalid]': 'ariaInvalid() ? true : null',
165
+ '(click)': 'onClick($event)',
166
+ '(input)': 'onInput($event)',
167
+ },
168
+ }]
169
+ }], 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 }] }] } });
170
+
387
171
  class Label {
388
172
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: Label, deps: [], target: i0.ɵɵFactoryTarget.Component });
389
173
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.6", 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: `
@@ -416,5 +200,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
416
200
  * Generated bundle index. Do not edit.
417
201
  */
418
202
 
419
- export { Field, FieldDescription, FieldError, FieldState, Fieldset, FieldsetDescription, FieldsetLegend, Input, Label };
203
+ export { Field, FieldDescription, FieldError, Fieldset, FieldsetDescription, FieldsetLegend, Input, Label };
420
204
  //# sourceMappingURL=ks-digital-designsystem-angular-forms.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ks-digital-designsystem-angular-forms.mjs","sources":["../../../../packages/angular/forms/src/input/input.ts","../../../../packages/angular/forms/src/field/field-state.ts","../../../../packages/angular/forms/src/field/field-counter.ts","../../../../packages/angular/forms/src/field/field-observer.ts","../../../../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/label/label.ts","../../../../packages/angular/forms/src/ks-digital-designsystem-angular-forms.ts"],"sourcesContent":["import {\n booleanAttribute,\n Directive,\n inject,\n input,\n numberAttribute,\n signal,\n} from '@angular/core'\nimport {\n HostColor,\n HostSize,\n} from '@ks-digital/designsystem-angular/__internals'\nimport { FieldState } from '../field'\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]':\n 'ariaInvalid() ? true : (fieldState?.hasError() ? 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 /**\n * Displays a character counter. pass a number to set a limit.\n */\n counter = input(0, { transform: numberAttribute })\n\n protected fieldState = inject(FieldState, { optional: true })\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 { computed, Injectable, signal } from '@angular/core'\n\n@Injectable()\nexport class FieldState {\n /**\n * Whether the field counter has exceeded its limit\n */\n hasExceededCounter = signal(false)\n\n /**\n * Whether the field has errors projected from the outside\n */\n hasProjectedErrors = signal(false)\n\n /**\n * Whether the field has any errors associated with it\n */\n hasError = computed(\n () => this.hasExceededCounter() || this.hasProjectedErrors(),\n )\n}\n","import { Component, computed, effect, inject, input } from '@angular/core'\nimport { ValidationMessage } from '@ks-digital/designsystem-angular/validation-message'\nimport { FieldState } from './field-state'\n\n@Component({\n selector: 'ksd-field-counter',\n imports: [ValidationMessage],\n template: `\n <div data-field=\"description\" class=\"ds-sr-only\" aria-live=\"polite\">\n @if (hasExceededLimit()) {\n {{ excessCount() }} tegn for mye\n }\n </div>\n @if (hasExceededLimit()) {\n <p ksd-validation-message>{{ excessCount() }} tegn for mye</p>\n } @else {\n <p data-field=\"validation\">{{ remainder() }} tegn igjen</p>\n }\n `,\n\n /**\n * Apply custom styles here to get correct spacing because\n * the rendered host element from Angular is getting in the way\n */\n styles: `\n :host > * {\n margin-top: var(--dsc-field-content-spacing);\n }\n `,\n})\nexport class FieldCounter {\n /**\n * The maximum allowed characters.\n *\n **/\n readonly limit = input.required<number>()\n\n /**\n * How many characters have been typed.\n *\n **/\n readonly count = input.required<number>()\n protected readonly remainder = computed(() => this.limit() - this.count())\n protected readonly excessCount = computed(() => Math.abs(this.remainder()))\n protected readonly hasExceededLimit = computed(\n () => this.count() > this.limit(),\n )\n\n private fieldState = inject(FieldState)\n\n constructor() {\n effect(() => {\n this.fieldState.hasExceededCounter.set(this.hasExceededLimit())\n })\n }\n}\n","/**\n * Lifted from Designsystemet core repo.\n * Takes care of binding ids, labels and aria-describedby attributes\n *\n * @param fieldElement - The field element to observe\n * @returns A function to disconnect the observer\n * */\nexport function fieldObserver(fieldElement: HTMLElement | null) {\n if (!fieldElement) return\n\n const elements = new Map<Element, string | null>()\n const typeCounter = new Map<string, number>() // Track count for each data-field type\n const uuid = `:${Date.now().toString(36)}${Math.random().toString(36).slice(2, 5)}`\n let input: Element | null = null\n let describedby = ''\n\n const process = (mutations: Partial<MutationRecord>[]) => {\n const changed: Node[] = []\n const removed: Node[] = []\n\n // Merge MutationRecords\n for (const mutation of mutations) {\n if (mutation.attributeName) changed.push(mutation.target ?? fieldElement)\n // @ts-expect-error - addedNodes is not typed\n changed.push(...(mutation.addedNodes || []))\n removed.push(...(mutation.removedNodes || []))\n }\n\n // Register elements\n for (const el of changed) {\n if (!isElement(el)) continue\n\n if (isLabel(el)) elements.set(el, el.htmlFor)\n else if (el.hasAttribute('data-field')) elements.set(el, el.id)\n else if (isInputLike(el)) {\n input = el\n describedby = el.getAttribute('aria-describedby') || ''\n }\n }\n\n // Reset removed elements\n for (const el of removed) {\n if (!isElement(el)) continue\n\n if (input === el) input = null\n if (elements.has(el)) {\n setAttr(el, isLabel(el) ? 'for' : 'id', elements.get(el))\n elements.delete(el)\n }\n }\n\n // Connect elements\n const describedbyIds = [describedby] // Keep original aria-describedby\n const inputId = input?.id || uuid\n\n // Reset type counters since we reprocess all elements\n typeCounter.clear()\n\n for (const [el, value] of elements) {\n const descriptionType = el.getAttribute('data-field')\n let id: string\n\n if (descriptionType) {\n // Increment type counter for this type\n const count = (typeCounter.get(descriptionType) || 0) + 1\n typeCounter.set(descriptionType, count)\n id = `${inputId}:${descriptionType}:${count}`\n } else {\n id = inputId\n }\n\n if (!value) setAttr(el, isLabel(el) ? 'for' : 'id', id) // Ensure we have a value\n if (descriptionType === 'validation')\n describedbyIds.unshift(el.id) // Validations to the front\n else if (descriptionType) describedbyIds.push(el.id) // Other descriptions to the back\n }\n\n setAttr(input, 'id', inputId)\n setAttr(input, 'aria-describedby', describedbyIds.join(' ').trim())\n }\n\n const observer = createOptimizedMutationObserver(process)\n observer.observe(fieldElement, {\n attributeFilter: ['id', 'for', 'aria-describedby'],\n attributes: true,\n childList: true,\n subtree: true,\n })\n\n process([{ addedNodes: fieldElement.querySelectorAll('*') }]) // Initial setup\n observer.takeRecords() // Clear initial setup queue\n return () => observer.disconnect()\n}\n\n// Utilities\nexport const isElement = (node: Node) => node instanceof Element\nexport const isLabel = (node: Node) => node instanceof HTMLLabelElement\nexport const isInputLike = (node: unknown): node is HTMLInputElement =>\n node instanceof HTMLElement &&\n 'validity' in node &&\n !(node instanceof HTMLButtonElement) // Matches input, textarea, select and form accosiated custom elements\n\nconst setAttr = (el: Element | null, name: string, value?: string | null) =>\n value ? el?.setAttribute(name, value) : el?.removeAttribute(name)\n\n// Speed up MutationObserver by debouncing, clearing internal queue after changes and only running when page is visible\nfunction createOptimizedMutationObserver(callback: MutationCallback) {\n const queue: MutationRecord[] = []\n const observer = new MutationObserver((mutations) => {\n if (!queue.length) requestAnimationFrame(process)\n queue.push(...mutations)\n })\n\n const process = () => {\n callback(queue, observer)\n queue.length = 0 // Reset queue\n observer.takeRecords() // Clear queue due to DOM changes in callback\n }\n\n return observer\n}\n","import {\n afterNextRender,\n Component,\n computed,\n contentChild,\n contentChildren,\n effect,\n ElementRef,\n forwardRef,\n inject,\n input,\n} from '@angular/core'\nimport {\n HostColor,\n HostSize,\n} from '@ks-digital/designsystem-angular/__internals'\nimport { ValidationMessage } from '@ks-digital/designsystem-angular/validation-message'\nimport { Input } from '../input'\nimport { FieldCounter } from './field-counter'\nimport { fieldObserver } from './field-observer'\nimport { FieldState } from './field-state'\n\n/**\n * Use the Field component to connect inputs and labels\n */\n@Component({\n selector: 'ksd-field',\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-field',\n '[attr.dataPosition]': 'position()',\n },\n template: `\n <ng-content />\n @if (hasCounter()) {\n <ksd-field-counter [limit]=\"limit() ?? 0\" [count]=\"count() ?? 0\" />\n }\n `,\n imports: [FieldCounter],\n providers: [FieldState],\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 private readonly fieldState = inject(FieldState)\n private readonly input = contentChild(forwardRef(() => Input))\n private readonly projectedErrors = contentChildren(ValidationMessage)\n\n private readonly el = inject(ElementRef)\n protected readonly count = computed(() => this.input()?.value().length)\n protected readonly limit = computed(() => this.input()?.counter())\n protected readonly hasCounter = computed(() => this.limit())\n\n constructor() {\n afterNextRender(() => {\n fieldObserver(this.el.nativeElement)\n })\n\n effect(() => {\n this.fieldState.hasProjectedErrors.set(this.projectedErrors().length > 0)\n })\n }\n}\n","import { Component } from '@angular/core'\n\n@Component({\n selector: '[ksd-field-description]',\n host: {\n 'data-field': 'description',\n },\n template: `<ng-content />`,\n})\nexport class FieldDescription {}\n","import { Component } from '@angular/core'\nimport { ValidationMessage } from '@ks-digital/designsystem-angular/validation-message'\n\n@Component({\n selector: '[ksd-error]',\n template: `<ng-content />`,\n hostDirectives: [\n {\n directive: ValidationMessage,\n },\n ],\n})\nexport class FieldError {}\n","import { Component } from '@angular/core'\n\n@Component({\n selector: 'fieldset[ksd-fieldset]',\n host: {\n class: 'ds-fieldset',\n },\n template: ` <ng-content /> `,\n})\nexport class Fieldset {}\n","import { Component } from '@angular/core'\n\n@Component({\n selector: 'p[ksd-fieldset-description]',\n template: `<ng-content />`,\n host: {},\n})\nexport class FieldsetDescription {}\n","import { Component } from '@angular/core'\n\n@Component({\n selector: 'legend[ksd-fieldset-legend]',\n host: {\n class: 'ds-label',\n },\n template: ` <ng-content /> `,\n})\nexport class FieldsetLegend {}\n","import { Component } from '@angular/core'\nimport {\n HostColor,\n HostSize,\n} from '@ks-digital/designsystem-angular/__internals'\n\n@Component({\n selector: 'ksd-label',\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":";;;;;;;MAqCa,KAAK,CAAA;AAChB;;AAEG;AACH,IAAA,KAAK,GAAG,MAAM,CAAqB,EAAE,iDAAC;AAEtC;;AAEG;IACM,QAAQ,GAAG,KAAK,CAAC,KAAK,qDAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAEjE;;AAEG;IACM,QAAQ,GAAG,KAAK,CAAC,KAAK,qDAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAEjE;;AAEG;AACM,IAAA,WAAW,GAAG,KAAK,CAAC,KAAK,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,aAAA,EAAA,GAAA,EAAA,CAAA,EAChC,SAAS,EAAE,gBAAgB;QAC3B,KAAK,EAAE,cAAc,EAAA,CACrB;AAEF;;AAEG;IACH,OAAO,GAAG,KAAK,CAAC,CAAC,oDAAI,SAAS,EAAE,eAAe,EAAA,CAAG;IAExC,UAAU,GAAG,MAAM,CAAC,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAE7D,IAAA,OAAO,CAAC,KAAY,EAAA;AAClB,QAAA,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAE;YACnB,KAAK,CAAC,cAAc,EAAE;QACxB;IACF;AAEA,IAAA,OAAO,CAAC,KAAY,EAAA;AAClB,QAAA,MAAM,MAAM,GAAG,KAAK,CAAC,MAIb;AACR,QA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AA,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,CAAA;;2FAEU,KAAK,EAAA,UAAA,EAAA,CAAA;kBAjBjB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,WAAW;AACrB,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;;;ACtBD;;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 { Component, CUSTOM_ELEMENTS_SCHEMA, input } 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 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 { Component } from '@angular/core'\n\n@Component({\n selector: '[ksd-field-description]',\n host: {\n 'data-field': 'description',\n },\n template: `<ng-content />`,\n})\nexport class FieldDescription {}\n","import { Component } from '@angular/core'\nimport { ValidationMessage } from '@ks-digital/designsystem-angular/validation-message'\n\n@Component({\n selector: '[ksd-error]',\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(--dsc-fieldset-gap);\n }\n `,\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n})\nexport class Fieldset {}\n","import { Component } from '@angular/core'\n\n@Component({\n selector: 'p[ksd-fieldset-description]',\n template: `<ng-content />`,\n host: {},\n})\nexport class FieldsetDescription {}\n","import { Component } from '@angular/core'\n\n@Component({\n selector: 'legend[ksd-fieldset-legend]',\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 { Component } from '@angular/core'\nimport {\n HostColor,\n HostSize,\n} from '@ks-digital/designsystem-angular/__internals'\n\n@Component({\n selector: 'ksd-label',\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":";;;;;;;;AAOA;;AAEG;MAyBU,KAAK,CAAA;AAChB;;;AAGG;AACH,IAAA,QAAQ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,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,WAAW;AACrB,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;;;ACtBD;;AAEG;;;;"}
@@ -1,7 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { signal, input, Directive } from '@angular/core';
3
3
 
4
- /* eslint-disable @angular-eslint/no-input-rename */
5
4
  class Heading {
6
5
  id = signal(undefined, ...(ngDevMode ? [{ debugName: "id" }] : []));
7
6
  /**
@@ -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":["/* eslint-disable @angular-eslint/no-input-rename */\nimport { 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":";;;AAAA;MAaa,OAAO,CAAA;AACX,IAAA,EAAE,GAAG,MAAM,CAAqB,SAAS,8CAAC;AACjD;;;AAGG;IACM,QAAQ,GAAG,KAAK,CACvB,SAAS,qDAEP,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;;;ACZD;;AAEG;;;;"}
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,8CAAC;AACjD;;;AAGG;IACM,QAAQ,GAAG,KAAK,CACvB,SAAS,qDAEP,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;;;;"}