@ks-digital/designsystem-angular 0.0.1-alpha.68 → 0.0.1-alpha.69

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 (27) hide show
  1. package/fesm2022/ks-digital-designsystem-angular-__internals.mjs +9 -9
  2. package/fesm2022/ks-digital-designsystem-angular-alert.mjs +3 -3
  3. package/fesm2022/ks-digital-designsystem-angular-breadcrumbs.mjs +3 -3
  4. package/fesm2022/ks-digital-designsystem-angular-button.mjs +3 -3
  5. package/fesm2022/ks-digital-designsystem-angular-card.mjs +6 -6
  6. package/fesm2022/ks-digital-designsystem-angular-chip.mjs +3 -3
  7. package/fesm2022/ks-digital-designsystem-angular-details.mjs +9 -9
  8. package/fesm2022/ks-digital-designsystem-angular-dialog.mjs +3 -3
  9. package/fesm2022/ks-digital-designsystem-angular-dropdown.mjs +3 -3
  10. package/fesm2022/ks-digital-designsystem-angular-error-summary.mjs +3 -3
  11. package/fesm2022/ks-digital-designsystem-angular-forms.mjs +24 -24
  12. package/fesm2022/ks-digital-designsystem-angular-heading.mjs +3 -3
  13. package/fesm2022/ks-digital-designsystem-angular-link.mjs +3 -3
  14. package/fesm2022/ks-digital-designsystem-angular-pagination.mjs +6 -6
  15. package/fesm2022/ks-digital-designsystem-angular-paragraph.mjs +3 -3
  16. package/fesm2022/ks-digital-designsystem-angular-popover.mjs +3 -3
  17. package/fesm2022/ks-digital-designsystem-angular-search.mjs +12 -12
  18. package/fesm2022/ks-digital-designsystem-angular-skeleton.mjs +3 -3
  19. package/fesm2022/ks-digital-designsystem-angular-spinner.mjs +3 -3
  20. package/fesm2022/ks-digital-designsystem-angular-suggestion.mjs +142 -42
  21. package/fesm2022/ks-digital-designsystem-angular-suggestion.mjs.map +1 -1
  22. package/fesm2022/ks-digital-designsystem-angular-table.mjs +6 -6
  23. package/fesm2022/ks-digital-designsystem-angular-tabs.mjs +12 -12
  24. package/fesm2022/ks-digital-designsystem-angular-tag.mjs +3 -3
  25. package/fesm2022/ks-digital-designsystem-angular-validation-message.mjs +3 -3
  26. package/package.json +3 -2
  27. package/types/ks-digital-designsystem-angular-suggestion.d.ts +42 -7
@@ -14,10 +14,10 @@ class Skeleton {
14
14
  dataText = computed(() => {
15
15
  return this.isText() ? '-' : null;
16
16
  }, ...(ngDevMode ? [{ debugName: "dataText" }] : /* istanbul ignore next */ []));
17
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Skeleton, deps: [], target: i0.ɵɵFactoryTarget.Component });
18
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: Skeleton, isStandalone: true, selector: "ksd-skeleton", inputs: { variant: { classPropertyName: "variant", publicName: "data-variant", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "aria-hidden": "true" }, properties: { "attr.data-variant": "variant()", "attr.data-text": "dataText()" }, classAttribute: "ds-skeleton" }, ngImport: i0, template: ` <ng-content />`, isInline: true, styles: [":host{display:block}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
17
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: Skeleton, deps: [], target: i0.ɵɵFactoryTarget.Component });
18
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.8", type: Skeleton, isStandalone: true, selector: "ksd-skeleton", inputs: { variant: { classPropertyName: "variant", publicName: "data-variant", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "aria-hidden": "true" }, properties: { "attr.data-variant": "variant()", "attr.data-text": "dataText()" }, classAttribute: "ds-skeleton" }, ngImport: i0, template: ` <ng-content />`, isInline: true, styles: [":host{display:block}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
19
19
  }
20
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Skeleton, decorators: [{
20
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: Skeleton, decorators: [{
21
21
  type: Component,
22
22
  args: [{ selector: 'ksd-skeleton', changeDetection: ChangeDetectionStrategy.OnPush, template: ` <ng-content />`, host: {
23
23
  class: 'ds-skeleton',
@@ -28,8 +28,8 @@ class Spinner {
28
28
  * @attribute data-size
29
29
  */
30
30
  dataSize = input(undefined, { ...(ngDevMode ? { debugName: "dataSize" } : /* istanbul ignore next */ {}), alias: 'data-size' });
31
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Spinner, deps: [], target: i0.ɵɵFactoryTarget.Component });
32
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: Spinner, isStandalone: true, selector: "ksd-spinner", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaHidden: { classPropertyName: "ariaHidden", publicName: "aria-hidden", isSignal: true, isRequired: false, transformFunction: null }, dataSize: { classPropertyName: "dataSize", publicName: "data-size", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.aria-label": "null", "attr.aria-hidden": "null" } }, hostDirectives: [{ directive: i1.HostColor, inputs: ["data-color", "data-color"] }], ngImport: i0, template: `
31
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: Spinner, deps: [], target: i0.ɵɵFactoryTarget.Component });
32
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.8", type: Spinner, isStandalone: true, selector: "ksd-spinner", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaHidden: { classPropertyName: "ariaHidden", publicName: "aria-hidden", isSignal: true, isRequired: false, transformFunction: null }, dataSize: { classPropertyName: "dataSize", publicName: "data-size", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.aria-label": "null", "attr.aria-hidden": "null" } }, hostDirectives: [{ directive: i1.HostColor, inputs: ["data-color", "data-color"] }], ngImport: i0, template: `
33
33
  <svg
34
34
  class="ds-spinner"
35
35
  role="img"
@@ -57,7 +57,7 @@ class Spinner {
57
57
  </svg>
58
58
  `, isInline: true, styles: [":host{display:contents}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
59
59
  }
60
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Spinner, decorators: [{
60
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: Spinner, decorators: [{
61
61
  type: Component,
62
62
  args: [{ selector: 'ksd-spinner', changeDetection: ChangeDetectionStrategy.OnPush, template: `
63
63
  <svg
@@ -1,6 +1,6 @@
1
1
  import { NgTemplateOutlet } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { viewChild, ChangeDetectionStrategy, Component, input, CUSTOM_ELEMENTS_SCHEMA, contentChildren, contentChild, booleanAttribute, model, computed, afterNextRender, effect } from '@angular/core';
3
+ import { viewChild, ChangeDetectionStrategy, Component, input, CUSTOM_ELEMENTS_SCHEMA, contentChildren, contentChild, booleanAttribute, model, output, computed, signal, afterRenderEffect, effect, untracked } from '@angular/core';
4
4
  import '@digdir/designsystemet-web';
5
5
  import * as i1 from '@ks-digital/designsystem-angular/__internals';
6
6
  import { HostSize, HostColor } from '@ks-digital/designsystem-angular/__internals';
@@ -11,10 +11,10 @@ class SuggestionListEmpty {
11
11
  * keep the dom structure needed without additional host elements
12
12
  */
13
13
  templateRef = viewChild('tpl', ...(ngDevMode ? [{ debugName: "templateRef" }] : /* istanbul ignore next */ []));
14
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SuggestionListEmpty, deps: [], target: i0.ɵɵFactoryTarget.Component });
15
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.8", type: SuggestionListEmpty, isStandalone: true, selector: "ksd-suggestion-list-empty", viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["tpl"], descendants: true, isSignal: true }], ngImport: i0, template: ` <ng-template #tpl><ng-content /></ng-template> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
14
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SuggestionListEmpty, deps: [], target: i0.ɵɵFactoryTarget.Component });
15
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.8", type: SuggestionListEmpty, isStandalone: true, selector: "ksd-suggestion-list-empty", viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["tpl"], descendants: true, isSignal: true }], ngImport: i0, template: ` <ng-template #tpl><ng-content /></ng-template> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
16
16
  }
17
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SuggestionListEmpty, decorators: [{
17
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SuggestionListEmpty, decorators: [{
18
18
  type: Component,
19
19
  args: [{
20
20
  selector: 'ksd-suggestion-list-empty',
@@ -30,10 +30,10 @@ class SuggestionListOption {
30
30
  */
31
31
  templateRef = viewChild('tpl', ...(ngDevMode ? [{ debugName: "templateRef" }] : /* istanbul ignore next */ []));
32
32
  value = input.required(...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
33
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SuggestionListOption, deps: [], target: i0.ɵɵFactoryTarget.Component });
34
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.8", type: SuggestionListOption, isStandalone: true, selector: "ksd-suggestion-list-option", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["tpl"], descendants: true, isSignal: true }], ngImport: i0, template: ` <ng-template #tpl><ng-content /></ng-template> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
33
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SuggestionListOption, deps: [], target: i0.ɵɵFactoryTarget.Component });
34
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.8", type: SuggestionListOption, isStandalone: true, selector: "ksd-suggestion-list-option", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["tpl"], descendants: true, isSignal: true }], ngImport: i0, template: ` <ng-template #tpl><ng-content /></ng-template> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
35
35
  }
36
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SuggestionListOption, decorators: [{
36
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SuggestionListOption, decorators: [{
37
37
  type: Component,
38
38
  args: [{
39
39
  selector: 'ksd-suggestion-list-option',
@@ -59,10 +59,10 @@ class SuggestionList {
59
59
  plural = input('%d forslag', ...(ngDevMode ? [{ debugName: "plural" }] : /* istanbul ignore next */ []));
60
60
  options = contentChildren(SuggestionListOption, { ...(ngDevMode ? { debugName: "options" } : /* istanbul ignore next */ {}), descendants: true });
61
61
  empty = contentChild(SuggestionListEmpty, ...(ngDevMode ? [{ debugName: "empty" }] : /* istanbul ignore next */ []));
62
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SuggestionList, deps: [], target: i0.ɵɵFactoryTarget.Component });
63
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.8", type: SuggestionList, isStandalone: true, selector: "ksd-suggestion-list", inputs: { singular: { classPropertyName: "singular", publicName: "singular", isSignal: true, isRequired: false, transformFunction: null }, plural: { classPropertyName: "plural", publicName: "plural", isSignal: true, isRequired: false, transformFunction: null } }, host: { styleAttribute: "display: none;" }, queries: [{ propertyName: "options", predicate: SuggestionListOption, descendants: true, isSignal: true }, { propertyName: "empty", first: true, predicate: SuggestionListEmpty, descendants: true, isSignal: true }], ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
62
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SuggestionList, deps: [], target: i0.ɵɵFactoryTarget.Component });
63
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.8", type: SuggestionList, isStandalone: true, selector: "ksd-suggestion-list", inputs: { singular: { classPropertyName: "singular", publicName: "singular", isSignal: true, isRequired: false, transformFunction: null }, plural: { classPropertyName: "plural", publicName: "plural", isSignal: true, isRequired: false, transformFunction: null } }, host: { styleAttribute: "display: none;" }, queries: [{ propertyName: "options", predicate: SuggestionListOption, descendants: true, isSignal: true }, { propertyName: "empty", first: true, predicate: SuggestionListEmpty, descendants: true, isSignal: true }], ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
64
64
  }
65
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SuggestionList, decorators: [{
65
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SuggestionList, decorators: [{
66
66
  type: Component,
67
67
  args: [{
68
68
  selector: 'ksd-suggestion-list',
@@ -77,23 +77,54 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
77
77
  descendants: true,
78
78
  }, isSignal: true }] }], empty: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SuggestionListEmpty), { isSignal: true }] }] } });
79
79
 
80
- const sanitizeItems = (values) => !values ? [] : Array.isArray(values) ? values : [values];
81
- const toItem = (data) => ({
82
- label: data.textContent?.trim() || data.value,
83
- value: data.value,
84
- });
85
- const nextSelected = (data, previous, multiple) => {
86
- const item = toItem(data);
87
- if (!multiple) {
88
- return data.isConnected ? undefined : item;
80
+ const isSuggestionItem = (value) => typeof value === 'object' &&
81
+ value !== null &&
82
+ 'label' in value &&
83
+ 'value' in value;
84
+ const sanitizeValues = (values) => values == null ? [] : Array.isArray(values) ? values : [values];
85
+ const toValues = (value) => value == null ? [] : Array.isArray(value) ? value : [value];
86
+ /** Extracts the labels carried by any items passed to `[selected]`. */
87
+ const labelEntries = (values) => sanitizeValues(values)
88
+ .filter(isSuggestionItem)
89
+ .map((item) => [item.value, item.label]);
90
+ /** Normalizes anything accepted by `[selected]` into the primitive value model. */
91
+ const toValue = (values) => {
92
+ if (values == null)
93
+ return undefined;
94
+ const primitives = sanitizeValues(values).map((value) => isSuggestionItem(value) ? value.value : value);
95
+ return Array.isArray(values) ? primitives : primitives[0];
96
+ };
97
+ const resolveItems = (value, labels) => toValues(value).map((optionValue) => ({
98
+ label: labels.get(optionValue) ?? optionValue,
99
+ value: optionValue,
100
+ }));
101
+ /** Resolves a primitive value into items, using known labels where available. */
102
+ const toSelected = (value, labels) => {
103
+ if (value == null)
104
+ return undefined;
105
+ const items = resolveItems(value, labels);
106
+ return Array.isArray(value) ? items : items[0];
107
+ };
108
+ const sameValue = (left, right) => {
109
+ if (Array.isArray(left) && Array.isArray(right)) {
110
+ return (left.length === right.length &&
111
+ left.every((value, index) => value === right[index]));
89
112
  }
90
- const prevItems = sanitizeItems(previous);
113
+ return left === right;
114
+ };
115
+ const nextSelected = (data, previous, multiple) => {
116
+ const value = data.value;
117
+ if (!multiple)
118
+ return data.isConnected ? undefined : value;
119
+ const previousValues = toValues(previous);
91
120
  return data.isConnected
92
- ? prevItems.filter(({ value }) => value !== item.value)
93
- : [...prevItems, item];
121
+ ? previousValues.filter((previousValue) => previousValue !== value)
122
+ : [...previousValues, value];
94
123
  };
95
124
 
96
125
  const defaultFilter = ({ label, input }) => label.toLowerCase().includes(input.value.trim().toLowerCase());
126
+ // Distinguishes an unbound `selected` from one explicitly bound to `undefined`.
127
+ const UNSET = Symbol('unset');
97
128
  class Suggestion {
98
129
  /**
99
130
  * Allows the user to select multiple items
@@ -114,19 +145,56 @@ class Suggestion {
114
145
  */
115
146
  filter = input(true, ...(ngDevMode ? [{ debugName: "filter" }] : /* istanbul ignore next */ []));
116
147
  /**
117
- * Model for the selected item(s).
148
+ * Current value, as primitive option values. Bound by Angular signal forms.
118
149
  *
119
150
  * @default undefined
120
151
  */
121
- selected = model(undefined, ...(ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []));
122
- selectedArray = computed(() => sanitizeItems(this.selected()), ...(ngDevMode ? [{ debugName: "selectedArray" }] : /* istanbul ignore next */ []));
152
+ value = model(undefined, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
153
+ /**
154
+ * Controlled selection. Accepts items or raw option values.
155
+ *
156
+ * @default undefined
157
+ */
158
+ selected = input(UNSET, ...(ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []));
159
+ /**
160
+ * Emits the resolved selection whenever the user changes it.
161
+ */
162
+ selectedChange = output();
163
+ /**
164
+ * Form-control dirty state.
165
+ *
166
+ * @default false
167
+ */
168
+ dirty = input(false, { ...(ngDevMode ? { debugName: "dirty" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
169
+ /**
170
+ * Whether the control has been touched. Synced with Angular signal forms.
171
+ *
172
+ * @default false
173
+ */
174
+ touched = model(false, ...(ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []));
175
+ selectedArray = computed(() => resolveItems(this.value(), this.labels()), ...(ngDevMode ? [{ debugName: "selectedArray" }] : /* istanbul ignore next */ []));
123
176
  suggestionElement = viewChild('suggestionElement', ...(ngDevMode ? [{ debugName: "suggestionElement" }] : /* istanbul ignore next */ []));
177
+ labels = signal(new Map(), ...(ngDevMode ? [{ debugName: "labels" }] : /* istanbul ignore next */ []));
178
+ query = signal('', ...(ngDevMode ? [{ debugName: "query" }] : /* istanbul ignore next */ []));
124
179
  suggestionList = contentChild(SuggestionList, ...(ngDevMode ? [{ debugName: "suggestionList" }] : /* istanbul ignore next */ []));
125
180
  constructor() {
126
- afterNextRender(() => this.syncOptions(null));
127
- effect(() => {
181
+ // Runs after render, so projected options are present in the DOM.
182
+ afterRenderEffect(() => {
183
+ this.query();
184
+ this.filter();
128
185
  this.suggestionList()?.options();
129
- queueMicrotask(() => this.syncOptions(null));
186
+ this.syncOptions();
187
+ });
188
+ // Apply the controlled `selected` input, when bound, to the value model.
189
+ effect(() => {
190
+ const selected = this.selected();
191
+ if (selected === UNSET)
192
+ return;
193
+ untracked(() => this.learnLabels(labelEntries(selected)));
194
+ const next = toValue(selected);
195
+ if (sameValue(next, untracked(() => this.value())))
196
+ return;
197
+ untracked(() => this.value.set(next));
130
198
  });
131
199
  }
132
200
  onSelect(event) {
@@ -135,24 +203,56 @@ class Suggestion {
135
203
  const data = customEvent.detail;
136
204
  if (!data)
137
205
  return;
138
- this.selected.set(nextSelected(data, this.selected(), this.multiple()));
206
+ this.learnLabels([[data.value, data.textContent?.trim() || data.value]]);
207
+ this.setValue(nextSelected(data, this.value(), this.multiple()));
139
208
  }
140
- onKeyDown(event) {
141
- const keyboardEvent = event;
142
- if (keyboardEvent.key !== 'Escape')
209
+ onFocusOut(event) {
210
+ const suggestionElement = this.suggestionElement()?.nativeElement;
211
+ const nextTarget = event.relatedTarget;
212
+ // Ignore focus changes within the composite widget; only mark touched
213
+ // when focus leaves the suggestion control entirely.
214
+ if (suggestionElement &&
215
+ nextTarget instanceof Node &&
216
+ suggestionElement.contains(nextTarget)) {
143
217
  return;
144
- event.preventDefault();
218
+ }
219
+ this.touched.set(true);
145
220
  }
146
221
  onInput(event) {
147
222
  const inputElement = event.target;
148
- setTimeout(() => this.syncOptions(inputElement));
223
+ this.query.set(inputElement?.value ?? '');
224
+ }
225
+ setValue(value) {
226
+ if (sameValue(value, this.value()))
227
+ return;
228
+ this.value.set(value);
229
+ this.selectedChange.emit(toSelected(value, this.labels()));
230
+ }
231
+ learnLabels(entries) {
232
+ this.labels.update((current) => {
233
+ let next = null;
234
+ for (const [value, label] of entries) {
235
+ if (current.get(value) === label)
236
+ continue;
237
+ next ??= new Map(current);
238
+ next.set(value, label);
239
+ }
240
+ return next ?? current;
241
+ });
149
242
  }
150
- syncOptions(inputElement) {
243
+ syncOptions() {
151
244
  const suggestionElement = this.suggestionElement()?.nativeElement;
152
245
  if (!suggestionElement)
153
246
  return;
154
- const input = inputElement ?? suggestionElement.querySelector('input');
247
+ const input = suggestionElement.querySelector('input');
155
248
  const options = Array.from(suggestionElement.querySelectorAll('u-option:not([data-empty])'));
249
+ this.learnLabels(options.map((option) => [
250
+ option.value,
251
+ option.label ||
252
+ option.text ||
253
+ option.textContent?.trim() ||
254
+ option.value,
255
+ ]));
156
256
  const filter = this.filter();
157
257
  const filterFn = filter === true ? defaultFilter : filter;
158
258
  if (filterFn && input) {
@@ -184,16 +284,16 @@ class Suggestion {
184
284
  }
185
285
  emptyOption.setAttribute('hidden', '');
186
286
  }
187
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Suggestion, deps: [], target: i0.ɵɵFactoryTarget.Component });
188
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: Suggestion, isStandalone: true, selector: "ksd-suggestion", inputs: { multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, creatable: { classPropertyName: "creatable", publicName: "creatable", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selectedChange" }, queries: [{ propertyName: "suggestionList", first: true, predicate: SuggestionList, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "suggestionElement", first: true, predicate: ["suggestionElement"], descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.HostSize, inputs: ["data-size", "data-size"] }, { directive: i1.HostColor, inputs: ["data-color", "data-color"] }], ngImport: i0, template: `
287
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: Suggestion, deps: [], target: i0.ɵɵFactoryTarget.Component });
288
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: Suggestion, isStandalone: true, selector: "ksd-suggestion", inputs: { multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, creatable: { classPropertyName: "creatable", publicName: "creatable", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, dirty: { classPropertyName: "dirty", publicName: "dirty", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", selectedChange: "selectedChange", touched: "touchedChange" }, queries: [{ propertyName: "suggestionList", first: true, predicate: SuggestionList, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "suggestionElement", first: true, predicate: ["suggestionElement"], descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.HostSize, inputs: ["data-size", "data-size"] }, { directive: i1.HostColor, inputs: ["data-color", "data-color"] }], ngImport: i0, template: `
189
289
  <ds-suggestion
190
290
  #suggestionElement
191
291
  class="ds-suggestion"
192
292
  [attr.data-multiple]="multiple() || undefined"
193
293
  [attr.data-creatable]="creatable() || undefined"
194
294
  (comboboxbeforeselect)="onSelect($event)"
295
+ (focusout)="onFocusOut($event)"
195
296
  (input)="onInput($event)"
196
- (keydown)="onKeyDown($event)"
197
297
  >
198
298
  @for (option of selectedArray(); track option.value) {
199
299
  <data [attr.value]="option.value">{{ option.label }}</data>
@@ -220,7 +320,7 @@ class Suggestion {
220
320
  </ds-suggestion>
221
321
  `, isInline: true, styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
222
322
  }
223
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Suggestion, decorators: [{
323
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: Suggestion, decorators: [{
224
324
  type: Component,
225
325
  args: [{ selector: 'ksd-suggestion', changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [
226
326
  {
@@ -238,8 +338,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
238
338
  [attr.data-multiple]="multiple() || undefined"
239
339
  [attr.data-creatable]="creatable() || undefined"
240
340
  (comboboxbeforeselect)="onSelect($event)"
341
+ (focusout)="onFocusOut($event)"
241
342
  (input)="onInput($event)"
242
- (keydown)="onKeyDown($event)"
243
343
  >
244
344
  @for (option of selectedArray(); track option.value) {
245
345
  <data [attr.value]="option.value">{{ option.label }}</data>
@@ -265,7 +365,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
265
365
  </u-datalist>
266
366
  </ds-suggestion>
267
367
  `, styles: [":host{display:block}\n"] }]
268
- }], ctorParameters: () => [], propDecorators: { multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], creatable: [{ type: i0.Input, args: [{ isSignal: true, alias: "creatable", required: false }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: false }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }, { type: i0.Output, args: ["selectedChange"] }], suggestionElement: [{ type: i0.ViewChild, args: ['suggestionElement', { isSignal: true }] }], suggestionList: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SuggestionList), { isSignal: true }] }] } });
368
+ }], ctorParameters: () => [], propDecorators: { multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], creatable: [{ type: i0.Input, args: [{ isSignal: true, alias: "creatable", required: false }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }], selectedChange: [{ type: i0.Output, args: ["selectedChange"] }], dirty: [{ type: i0.Input, args: [{ isSignal: true, alias: "dirty", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }, { type: i0.Output, args: ["touchedChange"] }], suggestionElement: [{ type: i0.ViewChild, args: ['suggestionElement', { isSignal: true }] }], suggestionList: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SuggestionList), { isSignal: true }] }] } });
269
369
 
270
370
  /**
271
371
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"ks-digital-designsystem-angular-suggestion.mjs","sources":["../../../../packages/angular/suggestion/src/suggestion-list-empty.ts","../../../../packages/angular/suggestion/src/suggestion-list-option.ts","../../../../packages/angular/suggestion/src/suggestion-list.ts","../../../../packages/angular/suggestion/src/suggestion.utils.ts","../../../../packages/angular/suggestion/src/suggestion.ts","../../../../packages/angular/suggestion/src/ks-digital-designsystem-angular-suggestion.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n TemplateRef,\n viewChild,\n} from '@angular/core'\n\n@Component({\n selector: 'ksd-suggestion-list-empty',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: ` <ng-template #tpl><ng-content /></ng-template> `,\n})\nexport class SuggestionListEmpty {\n /**\n * Hack to get the content from parent component so that we can\n * keep the dom structure needed without additional host elements\n */\n templateRef = viewChild<TemplateRef<unknown>>('tpl')\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n CUSTOM_ELEMENTS_SCHEMA,\n input,\n TemplateRef,\n viewChild,\n} from '@angular/core'\n\n@Component({\n selector: 'ksd-suggestion-list-option',\n changeDetection: ChangeDetectionStrategy.OnPush,\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n imports: [],\n template: ` <ng-template #tpl><ng-content /></ng-template> `,\n})\nexport class SuggestionListOption {\n /**\n * Hack to get the content from parent component so that we can\n * keep the dom structure needed without additional host elements\n */\n templateRef = viewChild<TemplateRef<unknown>>('tpl')\n\n value = input.required<string>()\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n contentChild,\n contentChildren,\n CUSTOM_ELEMENTS_SCHEMA,\n input,\n} from '@angular/core'\nimport { SuggestionListEmpty } from './suggestion-list-empty'\nimport { SuggestionListOption } from './suggestion-list-option'\n\n@Component({\n selector: 'ksd-suggestion-list',\n changeDetection: ChangeDetectionStrategy.OnPush,\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n host: {\n style: 'display: none;',\n },\n template: ``,\n})\nexport class SuggestionList {\n /**\n * Screen reader announcement template for singular result count.\n *\n * @default '%d forslag'\n */\n readonly singular = input('%d forslag')\n\n /**\n * Screen reader announcement template for plural result count.\n *\n * @default '%d forslag'\n */\n readonly plural = input('%d forslag')\n\n readonly options = contentChildren(SuggestionListOption, {\n descendants: true,\n })\n\n readonly empty = contentChild(SuggestionListEmpty)\n}\n","import type { SuggestionItem, SuggestionModelValue } from './suggestion.types'\n\nexport const sanitizeItems = (\n values: SuggestionModelValue,\n): SuggestionItem[] =>\n !values ? [] : Array.isArray(values) ? values : [values]\n\nconst toItem = (data: HTMLDataElement): SuggestionItem => ({\n label: data.textContent?.trim() || data.value,\n value: data.value,\n})\n\nexport const nextSelected = (\n data: HTMLDataElement,\n previous: SuggestionModelValue,\n multiple: boolean,\n): SuggestionItem | SuggestionItem[] | undefined => {\n const item = toItem(data)\n\n if (!multiple) {\n return data.isConnected ? undefined : item\n }\n\n const prevItems = sanitizeItems(previous)\n return data.isConnected\n ? prevItems.filter(({ value }) => value !== item.value)\n : [...prevItems, item]\n}\n","import { NgTemplateOutlet } from '@angular/common'\nimport {\n afterNextRender,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n CUSTOM_ELEMENTS_SCHEMA,\n effect,\n ElementRef,\n input,\n model,\n viewChild,\n} from '@angular/core'\nimport '@digdir/designsystemet-web'\nimport {\n HostColor,\n HostSize,\n} from '@ks-digital/designsystem-angular/__internals'\nimport { SuggestionList } from './suggestion-list'\nimport type {\n SuggestionFilter,\n SuggestionFilterArgs,\n SuggestionItem,\n} from './suggestion.types'\nimport { nextSelected, sanitizeItems } from './suggestion.utils'\n\nconst defaultFilter = ({ label, input }: SuggestionFilterArgs) =>\n label.toLowerCase().includes(input.value.trim().toLowerCase())\n\n@Component({\n selector: 'ksd-suggestion',\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 schemas: [CUSTOM_ELEMENTS_SCHEMA],\n imports: [NgTemplateOutlet],\n styles: `\n :host {\n display: block;\n }\n `,\n template: `\n <ds-suggestion\n #suggestionElement\n class=\"ds-suggestion\"\n [attr.data-multiple]=\"multiple() || undefined\"\n [attr.data-creatable]=\"creatable() || undefined\"\n (comboboxbeforeselect)=\"onSelect($event)\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeyDown($event)\"\n >\n @for (option of selectedArray(); track option.value) {\n <data [attr.value]=\"option.value\">{{ option.label }}</data>\n }\n <ng-content />\n <u-datalist\n popover=\"manual\"\n data-is-floating=\"true\"\n data-nofilter\n [attr.data-sr-singular]=\"suggestionList()?.singular()\"\n [attr.data-sr-plural]=\"suggestionList()?.plural()\"\n >\n @for (option of suggestionList()?.options() ?? []; track option) {\n <u-option [value]=\"option.value()\">\n <ng-container *ngTemplateOutlet=\"option.templateRef()\" />\n </u-option>\n }\n @if (suggestionList()?.empty()?.templateRef(); as emptyTpl) {\n <u-option data-empty value=\"\" hidden>\n <ng-container *ngTemplateOutlet=\"emptyTpl\" />\n </u-option>\n }\n </u-datalist>\n </ds-suggestion>\n `,\n})\nexport class Suggestion {\n /**\n * Allows the user to select multiple items\n *\n * @default false\n */\n multiple = input(false, { transform: booleanAttribute })\n\n /**\n * Allows the user to create new items\n *\n * @default false\n */\n creatable = input(false, { transform: booleanAttribute })\n\n /**\n * Filter options; boolean or a custom callback.\n *\n * @default true\n */\n filter = input<boolean | SuggestionFilter>(true)\n\n /**\n * Model for the selected item(s).\n *\n * @default undefined\n */\n selected = model<SuggestionItem | SuggestionItem[] | undefined>(undefined)\n\n protected selectedArray = computed(() => sanitizeItems(this.selected()))\n private readonly suggestionElement =\n viewChild<ElementRef<HTMLElement>>('suggestionElement')\n protected readonly suggestionList = contentChild(SuggestionList)\n\n constructor() {\n afterNextRender(() => this.syncOptions(null))\n\n effect(() => {\n this.suggestionList()?.options()\n queueMicrotask(() => this.syncOptions(null))\n })\n }\n\n protected onSelect(event: Event) {\n const customEvent = event as CustomEvent<HTMLDataElement | undefined>\n customEvent.preventDefault()\n\n const data = customEvent.detail\n if (!data) return\n\n this.selected.set(nextSelected(data, this.selected(), this.multiple()))\n }\n\n protected onKeyDown(event: Event) {\n const keyboardEvent = event as KeyboardEvent\n if (keyboardEvent.key !== 'Escape') return\n\n event.preventDefault()\n }\n\n protected onInput(event: Event) {\n const inputElement = event.target as HTMLInputElement | null\n setTimeout(() => this.syncOptions(inputElement))\n }\n\n private syncOptions(inputElement: HTMLInputElement | null) {\n const suggestionElement = this.suggestionElement()?.nativeElement\n if (!suggestionElement) return\n\n const input =\n inputElement ?? suggestionElement.querySelector<HTMLInputElement>('input')\n\n const options = Array.from(\n suggestionElement.querySelectorAll<HTMLOptionElement>(\n 'u-option:not([data-empty])',\n ),\n )\n\n const filter = this.filter()\n const filterFn = filter === true ? defaultFilter : filter\n\n if (filterFn && input) {\n let index = 0\n for (const option of options) {\n option.disabled = !filterFn({\n index,\n input,\n label: option.label,\n optionElement: option,\n text: option.text,\n value: option.value,\n })\n index++\n }\n } else {\n for (const option of options) {\n option.disabled = false\n }\n }\n\n const visibleOptions = options.filter(\n (option) => !option.disabled && !option.hidden,\n )\n const emptyOption = suggestionElement.querySelector<HTMLOptionElement>(\n 'u-option[data-empty]',\n )\n\n if (!emptyOption) return\n\n if (visibleOptions.length === 0) {\n emptyOption.removeAttribute('hidden')\n return\n }\n\n emptyOption.setAttribute('hidden', '')\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAYa,mBAAmB,CAAA;AAC9B;;;AAGG;AACH,IAAA,WAAW,GAAG,SAAS,CAAuB,KAAK,kFAAC;uGALzC,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAnB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,mBAAmB,yMAFpB,CAAA,gDAAA,CAAkD,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAEjD,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAL/B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,2BAA2B;oBACrC,eAAe,EAAE,u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AAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,UAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,WAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,QAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,UAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,CAAA,EAAA,iBAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,mBAAmB,+FACP,cAAc,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;ACtHjE;;AAEG;;;;"}
1
+ {"version":3,"file":"ks-digital-designsystem-angular-suggestion.mjs","sources":["../../../../packages/angular/suggestion/src/suggestion-list-empty.ts","../../../../packages/angular/suggestion/src/suggestion-list-option.ts","../../../../packages/angular/suggestion/src/suggestion-list.ts","../../../../packages/angular/suggestion/src/suggestion.utils.ts","../../../../packages/angular/suggestion/src/suggestion.ts","../../../../packages/angular/suggestion/src/ks-digital-designsystem-angular-suggestion.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n TemplateRef,\n viewChild,\n} from '@angular/core'\n\n@Component({\n selector: 'ksd-suggestion-list-empty',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: ` <ng-template #tpl><ng-content /></ng-template> `,\n})\nexport class SuggestionListEmpty {\n /**\n * Hack to get the content from parent component so that we can\n * keep the dom structure needed without additional host elements\n */\n templateRef = viewChild<TemplateRef<unknown>>('tpl')\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n CUSTOM_ELEMENTS_SCHEMA,\n input,\n TemplateRef,\n viewChild,\n} from '@angular/core'\n\n@Component({\n selector: 'ksd-suggestion-list-option',\n changeDetection: ChangeDetectionStrategy.OnPush,\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n imports: [],\n template: ` <ng-template #tpl><ng-content /></ng-template> `,\n})\nexport class SuggestionListOption {\n /**\n * Hack to get the content from parent component so that we can\n * keep the dom structure needed without additional host elements\n */\n templateRef = viewChild<TemplateRef<unknown>>('tpl')\n\n value = input.required<string>()\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n contentChild,\n contentChildren,\n CUSTOM_ELEMENTS_SCHEMA,\n input,\n} from '@angular/core'\nimport { SuggestionListEmpty } from './suggestion-list-empty'\nimport { SuggestionListOption } from './suggestion-list-option'\n\n@Component({\n selector: 'ksd-suggestion-list',\n changeDetection: ChangeDetectionStrategy.OnPush,\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n host: {\n style: 'display: none;',\n },\n template: ``,\n})\nexport class SuggestionList {\n /**\n * Screen reader announcement template for singular result count.\n *\n * @default '%d forslag'\n */\n readonly singular = input('%d forslag')\n\n /**\n * Screen reader announcement template for plural result count.\n *\n * @default '%d forslag'\n */\n readonly plural = input('%d forslag')\n\n readonly options = contentChildren(SuggestionListOption, {\n descendants: true,\n })\n\n readonly empty = contentChild(SuggestionListEmpty)\n}\n","import type {\n SuggestionItem,\n SuggestionSelected,\n SuggestionSelectedInput,\n SuggestionValue,\n} from './suggestion.types'\n\nexport const isSuggestionItem = (\n value: SuggestionItem | string | null | undefined,\n): value is SuggestionItem =>\n typeof value === 'object' &&\n value !== null &&\n 'label' in value &&\n 'value' in value\n\nconst sanitizeValues = (\n values: SuggestionSelectedInput,\n): Array<SuggestionItem | string> =>\n values == null ? [] : Array.isArray(values) ? values : [values]\n\nconst toValues = (value: SuggestionValue): string[] =>\n value == null ? [] : Array.isArray(value) ? value : [value]\n\n/** Option labels keyed by option value, learned from options and selections. */\nexport type SuggestionLabels = ReadonlyMap<string, string>\n\n/** Extracts the labels carried by any items passed to `[selected]`. */\nexport const labelEntries = (\n values: SuggestionSelectedInput,\n): Array<[string, string]> =>\n sanitizeValues(values)\n .filter(isSuggestionItem)\n .map((item) => [item.value, item.label])\n\n/** Normalizes anything accepted by `[selected]` into the primitive value model. */\nexport const toValue = (values: SuggestionSelectedInput): SuggestionValue => {\n if (values == null) return undefined\n\n const primitives = sanitizeValues(values).map((value) =>\n isSuggestionItem(value) ? value.value : value,\n )\n\n return Array.isArray(values) ? primitives : primitives[0]\n}\n\nexport const resolveItems = (\n value: SuggestionValue,\n labels: SuggestionLabels,\n): SuggestionItem[] =>\n toValues(value).map((optionValue) => ({\n label: labels.get(optionValue) ?? optionValue,\n value: optionValue,\n }))\n\n/** Resolves a primitive value into items, using known labels where available. */\nexport const toSelected = (\n value: SuggestionValue,\n labels: SuggestionLabels,\n): SuggestionSelected => {\n if (value == null) return undefined\n\n const items = resolveItems(value, labels)\n return Array.isArray(value) ? items : items[0]\n}\n\nexport const sameValue = (left: SuggestionValue, right: SuggestionValue) => {\n if (Array.isArray(left) && Array.isArray(right)) {\n return (\n left.length === right.length &&\n left.every((value, index) => value === right[index])\n )\n }\n\n return left === right\n}\n\nexport const nextSelected = (\n data: HTMLDataElement,\n previous: SuggestionValue,\n multiple: boolean,\n): SuggestionValue => {\n const value = data.value\n\n if (!multiple) return data.isConnected ? undefined : value\n\n const previousValues = toValues(previous)\n\n return data.isConnected\n ? previousValues.filter((previousValue) => previousValue !== value)\n : [...previousValues, value]\n}\n","import { NgTemplateOutlet } from '@angular/common'\nimport {\n afterRenderEffect,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n CUSTOM_ELEMENTS_SCHEMA,\n effect,\n ElementRef,\n input,\n model,\n output,\n signal,\n untracked,\n viewChild,\n} from '@angular/core'\nimport type { FormValueControl } from '@angular/forms/signals'\nimport '@digdir/designsystemet-web'\nimport {\n HostColor,\n HostSize,\n} from '@ks-digital/designsystem-angular/__internals'\nimport { SuggestionList } from './suggestion-list'\nimport type {\n SuggestionFilter,\n SuggestionFilterArgs,\n SuggestionSelected,\n SuggestionSelectedInput,\n SuggestionValue,\n} from './suggestion.types'\nimport type { SuggestionLabels } from './suggestion.utils'\nimport {\n labelEntries,\n nextSelected,\n resolveItems,\n sameValue,\n toSelected,\n toValue,\n} from './suggestion.utils'\n\nconst defaultFilter = ({ label, input }: SuggestionFilterArgs) =>\n label.toLowerCase().includes(input.value.trim().toLowerCase())\n\n// Distinguishes an unbound `selected` from one explicitly bound to `undefined`.\nconst UNSET = Symbol('unset')\n\n@Component({\n selector: 'ksd-suggestion',\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 schemas: [CUSTOM_ELEMENTS_SCHEMA],\n imports: [NgTemplateOutlet],\n styles: `\n :host {\n display: block;\n }\n `,\n template: `\n <ds-suggestion\n #suggestionElement\n class=\"ds-suggestion\"\n [attr.data-multiple]=\"multiple() || undefined\"\n [attr.data-creatable]=\"creatable() || undefined\"\n (comboboxbeforeselect)=\"onSelect($event)\"\n (focusout)=\"onFocusOut($event)\"\n (input)=\"onInput($event)\"\n >\n @for (option of selectedArray(); track option.value) {\n <data [attr.value]=\"option.value\">{{ option.label }}</data>\n }\n <ng-content />\n <u-datalist\n popover=\"manual\"\n data-is-floating=\"true\"\n data-nofilter\n [attr.data-sr-singular]=\"suggestionList()?.singular()\"\n [attr.data-sr-plural]=\"suggestionList()?.plural()\"\n >\n @for (option of suggestionList()?.options() ?? []; track option) {\n <u-option [value]=\"option.value()\">\n <ng-container *ngTemplateOutlet=\"option.templateRef()\" />\n </u-option>\n }\n @if (suggestionList()?.empty()?.templateRef(); as emptyTpl) {\n <u-option data-empty value=\"\" hidden>\n <ng-container *ngTemplateOutlet=\"emptyTpl\" />\n </u-option>\n }\n </u-datalist>\n </ds-suggestion>\n `,\n})\nexport class Suggestion implements FormValueControl<SuggestionValue> {\n /**\n * Allows the user to select multiple items\n *\n * @default false\n */\n multiple = input(false, { transform: booleanAttribute })\n\n /**\n * Allows the user to create new items\n *\n * @default false\n */\n creatable = input(false, { transform: booleanAttribute })\n\n /**\n * Filter options; boolean or a custom callback.\n *\n * @default true\n */\n filter = input<boolean | SuggestionFilter>(true)\n\n /**\n * Current value, as primitive option values. Bound by Angular signal forms.\n *\n * @default undefined\n */\n readonly value = model<SuggestionValue>(undefined)\n\n /**\n * Controlled selection. Accepts items or raw option values.\n *\n * @default undefined\n */\n readonly selected = input<SuggestionSelectedInput | typeof UNSET>(UNSET)\n\n /**\n * Emits the resolved selection whenever the user changes it.\n */\n readonly selectedChange = output<SuggestionSelected>()\n\n /**\n * Form-control dirty state.\n *\n * @default false\n */\n readonly dirty = input(false, { transform: booleanAttribute })\n\n /**\n * Whether the control has been touched. Synced with Angular signal forms.\n *\n * @default false\n */\n readonly touched = model(false)\n\n protected selectedArray = computed(() =>\n resolveItems(this.value(), this.labels()),\n )\n private readonly suggestionElement =\n viewChild<ElementRef<HTMLElement>>('suggestionElement')\n private readonly labels = signal<SuggestionLabels>(new Map())\n private readonly query = signal('')\n protected readonly suggestionList = contentChild(SuggestionList)\n\n constructor() {\n // Runs after render, so projected options are present in the DOM.\n afterRenderEffect(() => {\n this.query()\n this.filter()\n this.suggestionList()?.options()\n this.syncOptions()\n })\n\n // Apply the controlled `selected` input, when bound, to the value model.\n effect(() => {\n const selected = this.selected()\n if (selected === UNSET) return\n\n untracked(() => this.learnLabels(labelEntries(selected)))\n\n const next = toValue(selected)\n if (\n sameValue(\n next,\n untracked(() => this.value()),\n )\n )\n return\n\n untracked(() => this.value.set(next))\n })\n }\n\n protected onSelect(event: Event) {\n const customEvent = event as CustomEvent<HTMLDataElement | undefined>\n customEvent.preventDefault()\n\n const data = customEvent.detail\n if (!data) return\n\n this.learnLabels([[data.value, data.textContent?.trim() || data.value]])\n this.setValue(nextSelected(data, this.value(), this.multiple()))\n }\n\n protected onFocusOut(event: FocusEvent) {\n const suggestionElement = this.suggestionElement()?.nativeElement\n const nextTarget = event.relatedTarget\n\n // Ignore focus changes within the composite widget; only mark touched\n // when focus leaves the suggestion control entirely.\n if (\n suggestionElement &&\n nextTarget instanceof Node &&\n suggestionElement.contains(nextTarget)\n ) {\n return\n }\n\n this.touched.set(true)\n }\n\n protected onInput(event: Event) {\n const inputElement = event.target as HTMLInputElement | null\n this.query.set(inputElement?.value ?? '')\n }\n\n private setValue(value: SuggestionValue) {\n if (sameValue(value, this.value())) return\n\n this.value.set(value)\n this.selectedChange.emit(toSelected(value, this.labels()))\n }\n\n private learnLabels(entries: Iterable<readonly [string, string]>) {\n this.labels.update((current) => {\n let next: Map<string, string> | null = null\n\n for (const [value, label] of entries) {\n if (current.get(value) === label) continue\n\n next ??= new Map(current)\n next.set(value, label)\n }\n\n return next ?? current\n })\n }\n\n private syncOptions() {\n const suggestionElement = this.suggestionElement()?.nativeElement\n if (!suggestionElement) return\n\n const input = suggestionElement.querySelector<HTMLInputElement>('input')\n\n const options = Array.from(\n suggestionElement.querySelectorAll<HTMLOptionElement>(\n 'u-option:not([data-empty])',\n ),\n )\n\n this.learnLabels(\n options.map((option) => [\n option.value,\n option.label ||\n option.text ||\n option.textContent?.trim() ||\n option.value,\n ]),\n )\n\n const filter = this.filter()\n const filterFn = filter === true ? defaultFilter : filter\n\n if (filterFn && input) {\n let index = 0\n for (const option of options) {\n option.disabled = !filterFn({\n index,\n input,\n label: option.label,\n optionElement: option,\n text: option.text,\n value: option.value,\n })\n index++\n }\n } else {\n for (const option of options) {\n option.disabled = false\n }\n }\n\n const visibleOptions = options.filter(\n (option) => !option.disabled && !option.hidden,\n )\n const emptyOption = suggestionElement.querySelector<HTMLOptionElement>(\n 'u-option[data-empty]',\n )\n\n if (!emptyOption) return\n\n if (visibleOptions.length === 0) {\n emptyOption.removeAttribute('hidden')\n return\n }\n\n emptyOption.setAttribute('hidden', '')\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAYa,mBAAmB,CAAA;AAC9B;;;AAGG;AACH,IAAA,WAAW,GAAG,SAAS,CAAuB,KAAK,kFAAC;uGALzC,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAnB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,mBAAmB,yMAFpB,CAAA,gDAAA,CAAkD,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAEjD,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAL/B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,2BAA2B;oBACrC,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,QAAQ,EAAE,CAAA,gDAAA,CAAkD;AAC7D,iBAAA;yEAM+C,KAAK,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;MCDxC,oBAAoB,CAAA;AAC/B;;;AAGG;AACH,IAAA,WAAW,GAAG,SAAS,CAAuB,KAAK,kFAAC;AAEpD,IAAA,KAAK,GAAG,KAAK,CA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EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,CAAA,EAAA,KAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,OAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,SAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,eAAA,CAAA,EAAA,CAAA,EAAA,iBAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,mBAAmB,+FAGP,cAAc,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;ACrKjE;;AAEG;;;;"}
@@ -27,10 +27,10 @@ class Table {
27
27
  */
28
28
  zebra = input(false, { ...(ngDevMode ? { debugName: "zebra" } : /* istanbul ignore next */ {}), alias: 'data-zebra',
29
29
  transform: booleanAttribute });
30
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Table, deps: [], target: i0.ɵɵFactoryTarget.Component });
31
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: Table, isStandalone: true, selector: "table[ksd-table]", inputs: { hover: { classPropertyName: "hover", publicName: "data-hover", isSignal: true, isRequired: false, transformFunction: null }, border: { classPropertyName: "border", publicName: "data-border", isSignal: true, isRequired: false, transformFunction: null }, stickyHeader: { classPropertyName: "stickyHeader", publicName: "data-sticky-header", isSignal: true, isRequired: false, transformFunction: null }, zebra: { classPropertyName: "zebra", publicName: "data-zebra", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-hover": "hover() || undefined", "attr.data-border": "border() || undefined", "attr.data-sticky-header": "stickyHeader() || undefined", "attr.data-zebra": "zebra() || undefined" }, classAttribute: "ds-table" }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
30
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: Table, deps: [], target: i0.ɵɵFactoryTarget.Component });
31
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.8", type: Table, isStandalone: true, selector: "table[ksd-table]", inputs: { hover: { classPropertyName: "hover", publicName: "data-hover", isSignal: true, isRequired: false, transformFunction: null }, border: { classPropertyName: "border", publicName: "data-border", isSignal: true, isRequired: false, transformFunction: null }, stickyHeader: { classPropertyName: "stickyHeader", publicName: "data-sticky-header", isSignal: true, isRequired: false, transformFunction: null }, zebra: { classPropertyName: "zebra", publicName: "data-zebra", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-hover": "hover() || undefined", "attr.data-border": "border() || undefined", "attr.data-sticky-header": "stickyHeader() || undefined", "attr.data-zebra": "zebra() || undefined" }, classAttribute: "ds-table" }, ngImport: i0, template: `<ng-content />`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
32
32
  }
33
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Table, decorators: [{
33
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: Table, decorators: [{
34
34
  type: Component,
35
35
  args: [{
36
36
  selector: 'table[ksd-table]',
@@ -57,8 +57,8 @@ class TableHeaderCell {
57
57
  * @emits void
58
58
  */
59
59
  sortChange = output();
60
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TableHeaderCell, deps: [], target: i0.ɵɵFactoryTarget.Component });
61
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: TableHeaderCell, isStandalone: true, selector: "th[ksd-header-cell]", inputs: { sort: { classPropertyName: "sort", publicName: "aria-sort", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sortChange: "sortChange" }, host: { properties: { "attr.aria-sort": "sort()" } }, ngImport: i0, template: `
60
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: TableHeaderCell, deps: [], target: i0.ɵɵFactoryTarget.Component });
61
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: TableHeaderCell, isStandalone: true, selector: "th[ksd-header-cell]", inputs: { sort: { classPropertyName: "sort", publicName: "aria-sort", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sortChange: "sortChange" }, host: { properties: { "attr.aria-sort": "sort()" } }, ngImport: i0, template: `
62
62
  @if (sort()) {
63
63
  <button
64
64
  type="button"
@@ -75,7 +75,7 @@ class TableHeaderCell {
75
75
  </ng-template>
76
76
  `, isInline: true, styles: ["button{padding:var(--dsc-table-padding)}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
77
77
  }
78
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TableHeaderCell, decorators: [{
78
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: TableHeaderCell, decorators: [{
79
79
  type: Component,
80
80
  args: [{ selector: 'th[ksd-header-cell]', changeDetection: ChangeDetectionStrategy.OnPush, template: `
81
81
  @if (sort()) {
@@ -27,10 +27,10 @@ class TabsTab {
27
27
  emitTabClicked(event) {
28
28
  this.tabClicked.emit(event);
29
29
  }
30
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TabsTab, deps: [], target: i0.ɵɵFactoryTarget.Component });
31
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.8", type: TabsTab, isStandalone: true, selector: "ksd-tabs-tab", inputs: { tabId: { classPropertyName: "tabId", publicName: "tabId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { tabClicked: "tabClicked" }, viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["tpl"], descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.HostSize, inputs: ["data-size", "data-size"] }, { directive: i1.HostColor, inputs: ["data-color", "data-color"] }], ngImport: i0, template: ` <ng-template #tpl><ng-content /></ng-template> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
30
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: TabsTab, deps: [], target: i0.ɵɵFactoryTarget.Component });
31
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.8", type: TabsTab, isStandalone: true, selector: "ksd-tabs-tab", inputs: { tabId: { classPropertyName: "tabId", publicName: "tabId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { tabClicked: "tabClicked" }, viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["tpl"], descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.HostSize, inputs: ["data-size", "data-size"] }, { directive: i1.HostColor, inputs: ["data-color", "data-color"] }], ngImport: i0, template: ` <ng-template #tpl><ng-content /></ng-template> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
32
32
  }
33
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TabsTab, decorators: [{
33
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: TabsTab, decorators: [{
34
34
  type: Component,
35
35
  args: [{
36
36
  selector: `ksd-tabs-tab`,
@@ -65,8 +65,8 @@ class Tabs {
65
65
  this.tabClicked.emit(event);
66
66
  tab.emitTabClicked(event);
67
67
  }
68
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Tabs, deps: [], target: i0.ɵɵFactoryTarget.Component });
69
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: Tabs, isStandalone: true, selector: "ksd-tabs", outputs: { tabClicked: "tabClicked" }, queries: [{ propertyName: "tabs", predicate: TabsTab, descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.HostSize, inputs: ["data-size", "data-size"] }, { directive: i1.HostColor, inputs: ["data-color", "data-color"] }], ngImport: i0, template: `
68
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: Tabs, deps: [], target: i0.ɵɵFactoryTarget.Component });
69
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: Tabs, isStandalone: true, selector: "ksd-tabs", outputs: { tabClicked: "tabClicked" }, queries: [{ propertyName: "tabs", predicate: TabsTab, descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.HostSize, inputs: ["data-size", "data-size"] }, { directive: i1.HostColor, inputs: ["data-color", "data-color"] }], ngImport: i0, template: `
70
70
  <ds-tabs class="ds-tabs">
71
71
  <ds-tablist>
72
72
  @for (tab of tabs(); track tab; let index = $index) {
@@ -79,7 +79,7 @@ class Tabs {
79
79
  </ds-tabs>
80
80
  `, isInline: true, styles: [":host ::ng-deep :is(.ds-tabs [role=tab],.ds-tabs ds-tab,.ds-tabs u-tab)>:where(ng-icon,svg,img){font-size:1.25em;width:1em;height:1em}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
81
81
  }
82
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Tabs, decorators: [{
82
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: Tabs, decorators: [{
83
83
  type: Component,
84
84
  args: [{ selector: `ksd-tabs`, imports: [NgTemplateOutlet], schemas: [CUSTOM_ELEMENTS_SCHEMA], template: `
85
85
  <ds-tabs class="ds-tabs">
@@ -105,10 +105,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
105
105
  }], propDecorators: { tabClicked: [{ type: i0.Output, args: ["tabClicked"] }], tabs: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => TabsTab), { ...{ descendants: true }, isSignal: true }] }] } });
106
106
 
107
107
  class TabsList {
108
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TabsList, deps: [], target: i0.ɵɵFactoryTarget.Component });
109
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: TabsList, isStandalone: true, selector: "ksd-tabs-list", ngImport: i0, template: `<ng-content /> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
108
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: TabsList, deps: [], target: i0.ɵɵFactoryTarget.Component });
109
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.8", type: TabsList, isStandalone: true, selector: "ksd-tabs-list", ngImport: i0, template: `<ng-content /> `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
110
110
  }
111
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TabsList, decorators: [{
111
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: TabsList, decorators: [{
112
112
  type: Component,
113
113
  args: [{
114
114
  selector: `ksd-tabs-list`,
@@ -118,14 +118,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
118
118
  }] });
119
119
 
120
120
  class TabsPanel {
121
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TabsPanel, deps: [], target: i0.ɵɵFactoryTarget.Component });
122
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: TabsPanel, isStandalone: true, selector: "ksd-tabs-panel", ngImport: i0, template: `
121
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: TabsPanel, deps: [], target: i0.ɵɵFactoryTarget.Component });
122
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.8", type: TabsPanel, isStandalone: true, selector: "ksd-tabs-panel", ngImport: i0, template: `
123
123
  <ds-tabpanel>
124
124
  <ng-content />
125
125
  </ds-tabpanel>
126
126
  `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
127
127
  }
128
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TabsPanel, decorators: [{
128
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: TabsPanel, decorators: [{
129
129
  type: Component,
130
130
  args: [{
131
131
  selector: `ksd-tabs-panel`,
@@ -10,10 +10,10 @@ class Tag {
10
10
  * @default 'default'
11
11
  */
12
12
  variant = input('default', { ...(ngDevMode ? { debugName: "variant" } : /* istanbul ignore next */ {}), alias: 'data-variant' });
13
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Tag, deps: [], target: i0.ɵɵFactoryTarget.Component });
14
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: Tag, isStandalone: true, selector: "ksd-tag", inputs: { variant: { classPropertyName: "variant", publicName: "data-variant", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-variant": "variant()" }, classAttribute: "ds-tag" }, 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 ::ng-deep>*{margin-inline-end:var(--ds-size-1)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
13
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: Tag, deps: [], target: i0.ɵɵFactoryTarget.Component });
14
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.8", type: Tag, isStandalone: true, selector: "ksd-tag", inputs: { variant: { classPropertyName: "variant", publicName: "data-variant", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-variant": "variant()" }, classAttribute: "ds-tag" }, 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 ::ng-deep>*{margin-inline-end:var(--ds-size-1)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
15
15
  }
16
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Tag, decorators: [{
16
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: Tag, decorators: [{
17
17
  type: Component,
18
18
  args: [{ selector: 'ksd-tag', changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [
19
19
  {
@@ -2,10 +2,10 @@ import * as i0 from '@angular/core';
2
2
  import { Directive } from '@angular/core';
3
3
 
4
4
  class ValidationMessage {
5
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ValidationMessage, deps: [], target: i0.ɵɵFactoryTarget.Directive });
6
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.8", type: ValidationMessage, isStandalone: true, selector: "[ksd-validation-message]", host: { attributes: { "data-field": "validation" }, classAttribute: "ds-validation-message" }, ngImport: i0 });
5
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ValidationMessage, deps: [], target: i0.ɵɵFactoryTarget.Directive });
6
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: ValidationMessage, isStandalone: true, selector: "[ksd-validation-message]", host: { attributes: { "data-field": "validation" }, classAttribute: "ds-validation-message" }, ngImport: i0 });
7
7
  }
8
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ValidationMessage, decorators: [{
8
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ValidationMessage, decorators: [{
9
9
  type: Directive,
10
10
  args: [{
11
11
  // eslint-disable-next-line @angular-eslint/directive-selector