@ks-digital/designsystem-angular 0.0.1-alpha.6 → 0.0.1-alpha.61

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 (100) hide show
  1. package/README.md +23 -11
  2. package/__internals/README.md +3 -0
  3. package/alert/README.md +3 -0
  4. package/breadcrumbs/README.md +3 -0
  5. package/button/README.md +3 -0
  6. package/card/README.md +3 -0
  7. package/details/README.md +3 -0
  8. package/dialog/README.md +3 -0
  9. package/dropdown/README.md +3 -0
  10. package/error-summary/README.md +3 -0
  11. package/fesm2022/ks-digital-designsystem-angular-__internals.mjs +82 -0
  12. package/fesm2022/ks-digital-designsystem-angular-__internals.mjs.map +1 -0
  13. package/fesm2022/ks-digital-designsystem-angular-alert.mjs +40 -0
  14. package/fesm2022/ks-digital-designsystem-angular-alert.mjs.map +1 -0
  15. package/fesm2022/ks-digital-designsystem-angular-breadcrumbs.mjs +51 -0
  16. package/fesm2022/ks-digital-designsystem-angular-breadcrumbs.mjs.map +1 -0
  17. package/fesm2022/ks-digital-designsystem-angular-button.mjs +75 -0
  18. package/fesm2022/ks-digital-designsystem-angular-button.mjs.map +1 -0
  19. package/fesm2022/ks-digital-designsystem-angular-card.mjs +86 -0
  20. package/fesm2022/ks-digital-designsystem-angular-card.mjs.map +1 -0
  21. package/fesm2022/ks-digital-designsystem-angular-chip.mjs +43 -0
  22. package/fesm2022/ks-digital-designsystem-angular-chip.mjs.map +1 -0
  23. package/fesm2022/ks-digital-designsystem-angular-details.mjs +64 -0
  24. package/fesm2022/ks-digital-designsystem-angular-details.mjs.map +1 -0
  25. package/fesm2022/ks-digital-designsystem-angular-dialog.mjs +48 -0
  26. package/fesm2022/ks-digital-designsystem-angular-dialog.mjs.map +1 -0
  27. package/fesm2022/ks-digital-designsystem-angular-dropdown.mjs +46 -0
  28. package/fesm2022/ks-digital-designsystem-angular-dropdown.mjs.map +1 -0
  29. package/fesm2022/ks-digital-designsystem-angular-error-summary.mjs +49 -0
  30. package/fesm2022/ks-digital-designsystem-angular-error-summary.mjs.map +1 -0
  31. package/fesm2022/ks-digital-designsystem-angular-forms.mjs +227 -0
  32. package/fesm2022/ks-digital-designsystem-angular-forms.mjs.map +1 -0
  33. package/fesm2022/ks-digital-designsystem-angular-heading.mjs +40 -0
  34. package/fesm2022/ks-digital-designsystem-angular-heading.mjs.map +1 -0
  35. package/fesm2022/ks-digital-designsystem-angular-link.mjs +31 -0
  36. package/fesm2022/ks-digital-designsystem-angular-link.mjs.map +1 -0
  37. package/fesm2022/ks-digital-designsystem-angular-pagination.mjs +143 -0
  38. package/fesm2022/ks-digital-designsystem-angular-pagination.mjs.map +1 -0
  39. package/fesm2022/ks-digital-designsystem-angular-paragraph.mjs +25 -0
  40. package/fesm2022/ks-digital-designsystem-angular-paragraph.mjs.map +1 -0
  41. package/fesm2022/ks-digital-designsystem-angular-popover.mjs +46 -0
  42. package/fesm2022/ks-digital-designsystem-angular-popover.mjs.map +1 -0
  43. package/fesm2022/ks-digital-designsystem-angular-search.mjs +183 -0
  44. package/fesm2022/ks-digital-designsystem-angular-search.mjs.map +1 -0
  45. package/fesm2022/ks-digital-designsystem-angular-spinner.mjs +87 -0
  46. package/fesm2022/ks-digital-designsystem-angular-spinner.mjs.map +1 -0
  47. package/fesm2022/ks-digital-designsystem-angular-suggestion.mjs +281 -0
  48. package/fesm2022/ks-digital-designsystem-angular-suggestion.mjs.map +1 -0
  49. package/fesm2022/ks-digital-designsystem-angular-table.mjs +105 -0
  50. package/fesm2022/ks-digital-designsystem-angular-table.mjs.map +1 -0
  51. package/fesm2022/ks-digital-designsystem-angular-tabs.mjs +148 -0
  52. package/fesm2022/ks-digital-designsystem-angular-tabs.mjs.map +1 -0
  53. package/fesm2022/ks-digital-designsystem-angular-tag.mjs +38 -0
  54. package/fesm2022/ks-digital-designsystem-angular-tag.mjs.map +1 -0
  55. package/fesm2022/ks-digital-designsystem-angular-validation-message.mjs +25 -0
  56. package/fesm2022/ks-digital-designsystem-angular-validation-message.mjs.map +1 -0
  57. package/fesm2022/ks-digital-designsystem-angular.mjs +7 -0
  58. package/fesm2022/ks-digital-designsystem-angular.mjs.map +1 -0
  59. package/forms/README.md +3 -0
  60. package/heading/README.md +3 -0
  61. package/link/README.md +3 -0
  62. package/package.json +108 -26
  63. package/pagination/README.md +3 -0
  64. package/paragraph/README.md +3 -0
  65. package/popover/README.md +3 -0
  66. package/search/README.md +3 -0
  67. package/spinner/README.md +3 -0
  68. package/suggestion/README.md +3 -0
  69. package/table/README.md +3 -0
  70. package/tabs/README.md +3 -0
  71. package/tag/README.md +3 -0
  72. package/types/ks-digital-designsystem-angular-__internals.d.ts +50 -0
  73. package/types/ks-digital-designsystem-angular-alert.d.ts +12 -0
  74. package/types/ks-digital-designsystem-angular-breadcrumbs.d.ts +13 -0
  75. package/types/ks-digital-designsystem-angular-button.d.ts +32 -0
  76. package/types/ks-digital-designsystem-angular-card.d.ts +24 -0
  77. package/types/ks-digital-designsystem-angular-chip.d.ts +15 -0
  78. package/types/ks-digital-designsystem-angular-details.d.ts +20 -0
  79. package/types/ks-digital-designsystem-angular-dialog.d.ts +18 -0
  80. package/types/ks-digital-designsystem-angular-dropdown.d.ts +13 -0
  81. package/types/ks-digital-designsystem-angular-error-summary.d.ts +14 -0
  82. package/types/ks-digital-designsystem-angular-forms.d.ts +81 -0
  83. package/types/ks-digital-designsystem-angular-heading.d.ts +19 -0
  84. package/types/ks-digital-designsystem-angular-link.d.ts +9 -0
  85. package/types/ks-digital-designsystem-angular-pagination.d.ts +58 -0
  86. package/types/ks-digital-designsystem-angular-paragraph.d.ts +8 -0
  87. package/types/ks-digital-designsystem-angular-popover.d.ts +13 -0
  88. package/types/ks-digital-designsystem-angular-search.d.ts +84 -0
  89. package/types/ks-digital-designsystem-angular-spinner.d.ts +22 -0
  90. package/types/ks-digital-designsystem-angular-suggestion.d.ts +97 -0
  91. package/types/ks-digital-designsystem-angular-table.d.ts +43 -0
  92. package/types/ks-digital-designsystem-angular-tabs.d.ts +65 -0
  93. package/types/ks-digital-designsystem-angular-tag.d.ts +15 -0
  94. package/types/ks-digital-designsystem-angular-validation-message.d.ts +8 -0
  95. package/types/ks-digital-designsystem-angular.d.ts +2 -0
  96. package/validation-message/README.md +3 -0
  97. package/dist/README.md +0 -43
  98. package/dist/fesm2022/ks-digital-designsystem-angular.mjs +0 -195
  99. package/dist/fesm2022/ks-digital-designsystem-angular.mjs.map +0 -1
  100. package/dist/index.d.ts +0 -75
@@ -0,0 +1,281 @@
1
+ import * as i0 from '@angular/core';
2
+ import { viewChild, ChangeDetectionStrategy, Component, input, CUSTOM_ELEMENTS_SCHEMA, contentChildren, contentChild, booleanAttribute, model, computed, afterNextRender, effect } from '@angular/core';
3
+ import '@digdir/designsystemet-web';
4
+ import * as i1 from '@ks-digital/designsystem-angular/__internals';
5
+ import { HostSize, HostColor } from '@ks-digital/designsystem-angular/__internals';
6
+ import { NgTemplateOutlet } from '@angular/common';
7
+
8
+ class SuggestionListEmpty {
9
+ /**
10
+ * Hack to get the content from parent component so that we can
11
+ * keep the dom structure needed without additional host elements
12
+ */
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 });
16
+ }
17
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SuggestionListEmpty, decorators: [{
18
+ type: Component,
19
+ args: [{
20
+ selector: 'ksd-suggestion-list-empty',
21
+ changeDetection: ChangeDetectionStrategy.OnPush,
22
+ template: ` <ng-template #tpl><ng-content /></ng-template> `,
23
+ }]
24
+ }], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['tpl', { isSignal: true }] }] } });
25
+
26
+ class SuggestionListOption {
27
+ /**
28
+ * Hack to get the content from parent component so that we can
29
+ * keep the dom structure needed without additional host elements
30
+ */
31
+ templateRef = viewChild('tpl', ...(ngDevMode ? [{ debugName: "templateRef" }] : /* istanbul ignore next */ []));
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 });
35
+ }
36
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SuggestionListOption, decorators: [{
37
+ type: Component,
38
+ args: [{
39
+ selector: 'ksd-suggestion-list-option',
40
+ changeDetection: ChangeDetectionStrategy.OnPush,
41
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
42
+ imports: [],
43
+ template: ` <ng-template #tpl><ng-content /></ng-template> `,
44
+ }]
45
+ }], propDecorators: { templateRef: [{ type: i0.ViewChild, args: ['tpl', { isSignal: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }] } });
46
+
47
+ class SuggestionList {
48
+ /**
49
+ * Screen reader announcement template for singular result count.
50
+ *
51
+ * @default '%d forslag'
52
+ */
53
+ singular = input('%d forslag', ...(ngDevMode ? [{ debugName: "singular" }] : /* istanbul ignore next */ []));
54
+ /**
55
+ * Screen reader announcement template for plural result count.
56
+ *
57
+ * @default '%d forslag'
58
+ */
59
+ plural = input('%d forslag', ...(ngDevMode ? [{ debugName: "plural" }] : /* istanbul ignore next */ []));
60
+ options = contentChildren(SuggestionListOption, { ...(ngDevMode ? { debugName: "options" } : /* istanbul ignore next */ {}), descendants: true });
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.0.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: contents;" }, queries: [{ propertyName: "options", predicate: SuggestionListOption, descendants: true, isSignal: true }, { propertyName: "empty", first: true, predicate: SuggestionListEmpty, descendants: true, isSignal: true }], ngImport: i0, template: `
64
+ <u-datalist
65
+ data-nofilter
66
+ [attr.data-sr-singular]="singular()"
67
+ [attr.data-sr-plural]="plural()"
68
+ >
69
+ @for (option of options(); track option) {
70
+ <u-option [value]="option.value()">
71
+ <ng-container *ngTemplateOutlet="option.templateRef()" />
72
+ </u-option>
73
+ }
74
+ @if (empty()?.templateRef()) {
75
+ <u-option data-empty value="" hidden>
76
+ <ng-container *ngTemplateOutlet="empty()?.templateRef()" />
77
+ </u-option>
78
+ }
79
+ </u-datalist>
80
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
81
+ }
82
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SuggestionList, decorators: [{
83
+ type: Component,
84
+ args: [{
85
+ selector: 'ksd-suggestion-list',
86
+ changeDetection: ChangeDetectionStrategy.OnPush,
87
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
88
+ imports: [NgTemplateOutlet],
89
+ host: {
90
+ style: 'display: contents;',
91
+ },
92
+ template: `
93
+ <u-datalist
94
+ data-nofilter
95
+ [attr.data-sr-singular]="singular()"
96
+ [attr.data-sr-plural]="plural()"
97
+ >
98
+ @for (option of options(); track option) {
99
+ <u-option [value]="option.value()">
100
+ <ng-container *ngTemplateOutlet="option.templateRef()" />
101
+ </u-option>
102
+ }
103
+ @if (empty()?.templateRef()) {
104
+ <u-option data-empty value="" hidden>
105
+ <ng-container *ngTemplateOutlet="empty()?.templateRef()" />
106
+ </u-option>
107
+ }
108
+ </u-datalist>
109
+ `,
110
+ }]
111
+ }], propDecorators: { singular: [{ type: i0.Input, args: [{ isSignal: true, alias: "singular", required: false }] }], plural: [{ type: i0.Input, args: [{ isSignal: true, alias: "plural", required: false }] }], options: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SuggestionListOption), { ...{
112
+ descendants: true,
113
+ }, isSignal: true }] }], empty: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SuggestionListEmpty), { isSignal: true }] }] } });
114
+
115
+ const sanitizeItems = (values) => !values ? [] : Array.isArray(values) ? values : [values];
116
+ const toItem = (data) => ({
117
+ label: data.textContent?.trim() || data.value,
118
+ value: data.value,
119
+ });
120
+ const nextSelected = (data, previous, multiple) => {
121
+ const item = toItem(data);
122
+ if (!multiple) {
123
+ return data.isConnected ? undefined : item;
124
+ }
125
+ const prevItems = sanitizeItems(previous);
126
+ return data.isConnected
127
+ ? prevItems.filter(({ value }) => value !== item.value)
128
+ : [...prevItems, item];
129
+ };
130
+
131
+ const defaultFilter = ({ label, input }) => label.toLowerCase().includes(input.value.trim().toLowerCase());
132
+ class Suggestion {
133
+ /**
134
+ * Allows the user to select multiple items
135
+ *
136
+ * @default false
137
+ */
138
+ multiple = input(false, { ...(ngDevMode ? { debugName: "multiple" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
139
+ /**
140
+ * Allows the user to create new items
141
+ *
142
+ * @default false
143
+ */
144
+ creatable = input(false, { ...(ngDevMode ? { debugName: "creatable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
145
+ /**
146
+ * Filter options; boolean or a custom callback.
147
+ *
148
+ * @default true
149
+ */
150
+ filter = input(true, ...(ngDevMode ? [{ debugName: "filter" }] : /* istanbul ignore next */ []));
151
+ /**
152
+ * Model for the selected item(s).
153
+ *
154
+ * @default undefined
155
+ */
156
+ selected = model(undefined, ...(ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []));
157
+ selectedArray = computed(() => sanitizeItems(this.selected()), ...(ngDevMode ? [{ debugName: "selectedArray" }] : /* istanbul ignore next */ []));
158
+ suggestionElement = viewChild('suggestionElement', ...(ngDevMode ? [{ debugName: "suggestionElement" }] : /* istanbul ignore next */ []));
159
+ suggestionList = contentChild(SuggestionList, ...(ngDevMode ? [{ debugName: "suggestionList" }] : /* istanbul ignore next */ []));
160
+ constructor() {
161
+ afterNextRender(() => this.syncOptions(null));
162
+ effect(() => {
163
+ this.suggestionList()?.options();
164
+ queueMicrotask(() => this.syncOptions(null));
165
+ });
166
+ }
167
+ onSelect(event) {
168
+ const customEvent = event;
169
+ customEvent.preventDefault();
170
+ const data = customEvent.detail;
171
+ if (!data)
172
+ return;
173
+ this.selected.set(nextSelected(data, this.selected(), this.multiple()));
174
+ }
175
+ onKeyDown(event) {
176
+ const keyboardEvent = event;
177
+ if (keyboardEvent.key !== 'Escape')
178
+ return;
179
+ event.preventDefault();
180
+ }
181
+ onInput(event) {
182
+ const inputElement = event.target;
183
+ setTimeout(() => this.syncOptions(inputElement));
184
+ }
185
+ syncOptions(inputElement) {
186
+ const suggestionElement = this.suggestionElement()?.nativeElement;
187
+ if (!suggestionElement)
188
+ return;
189
+ const input = inputElement ?? suggestionElement.querySelector('input');
190
+ const options = Array.from(suggestionElement.querySelectorAll('u-option:not([data-empty])'));
191
+ const filter = this.filter();
192
+ const filterFn = filter === true ? defaultFilter : filter;
193
+ if (filterFn && input) {
194
+ let index = 0;
195
+ for (const option of options) {
196
+ option.disabled = !filterFn({
197
+ index,
198
+ input,
199
+ label: option.label,
200
+ optionElement: option,
201
+ text: option.text,
202
+ value: option.value,
203
+ });
204
+ index++;
205
+ }
206
+ }
207
+ else {
208
+ for (const option of options) {
209
+ option.disabled = false;
210
+ }
211
+ }
212
+ const visibleOptions = options.filter((option) => !option.disabled && !option.hidden);
213
+ const emptyOption = suggestionElement.querySelector('u-option[data-empty]');
214
+ if (!emptyOption)
215
+ return;
216
+ if (visibleOptions.length === 0) {
217
+ emptyOption.removeAttribute('hidden');
218
+ return;
219
+ }
220
+ emptyOption.setAttribute('hidden', '');
221
+ }
222
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Suggestion, deps: [], target: i0.ɵɵFactoryTarget.Component });
223
+ 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: `
224
+ <ds-suggestion
225
+ #suggestionElement
226
+ class="ds-suggestion"
227
+ [attr.data-multiple]="multiple() || undefined"
228
+ [attr.data-creatable]="creatable() || undefined"
229
+ (comboboxbeforeselect)="onSelect($event)"
230
+ (input)="onInput($event)"
231
+ (keydown)="onKeyDown($event)"
232
+ >
233
+ @for (option of selectedArray(); track option.value) {
234
+ <data [attr.value]="option.value">{{ option.label }}</data>
235
+ }
236
+ <ng-content />
237
+ </ds-suggestion>
238
+ `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
239
+ }
240
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Suggestion, decorators: [{
241
+ type: Component,
242
+ args: [{
243
+ selector: 'ksd-suggestion',
244
+ changeDetection: ChangeDetectionStrategy.OnPush,
245
+ hostDirectives: [
246
+ {
247
+ directive: HostSize,
248
+ inputs: ['data-size'],
249
+ },
250
+ {
251
+ directive: HostColor,
252
+ inputs: ['data-color'],
253
+ },
254
+ ],
255
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
256
+ host: {},
257
+ template: `
258
+ <ds-suggestion
259
+ #suggestionElement
260
+ class="ds-suggestion"
261
+ [attr.data-multiple]="multiple() || undefined"
262
+ [attr.data-creatable]="creatable() || undefined"
263
+ (comboboxbeforeselect)="onSelect($event)"
264
+ (input)="onInput($event)"
265
+ (keydown)="onKeyDown($event)"
266
+ >
267
+ @for (option of selectedArray(); track option.value) {
268
+ <data [attr.value]="option.value">{{ option.label }}</data>
269
+ }
270
+ <ng-content />
271
+ </ds-suggestion>
272
+ `,
273
+ }]
274
+ }], 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 }] }] } });
275
+
276
+ /**
277
+ * Generated bundle index. Do not edit.
278
+ */
279
+
280
+ export { Suggestion, SuggestionList, SuggestionListEmpty, SuggestionListOption };
281
+ //# sourceMappingURL=ks-digital-designsystem-angular-suggestion.mjs.map
@@ -0,0 +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 { NgTemplateOutlet } from '@angular/common'\nimport {\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 imports: [NgTemplateOutlet],\n host: {\n style: 'display: contents;',\n },\n template: `\n <u-datalist\n data-nofilter\n [attr.data-sr-singular]=\"singular()\"\n [attr.data-sr-plural]=\"plural()\"\n >\n @for (option of options(); track option) {\n <u-option [value]=\"option.value()\">\n <ng-container *ngTemplateOutlet=\"option.templateRef()\" />\n </u-option>\n }\n @if (empty()?.templateRef()) {\n <u-option data-empty value=\"\" hidden>\n <ng-container *ngTemplateOutlet=\"empty()?.templateRef()\" />\n </u-option>\n }\n </u-datalist>\n `,\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 protected 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 {\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 host: {},\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 </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 private 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,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,CAAC,QAAQ,2EAAU;uGAPrB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAApB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA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,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,+FACT,cAAc,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AC9F/D;;AAEG;;;;"}
@@ -0,0 +1,105 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, booleanAttribute, ChangeDetectionStrategy, Component, output } from '@angular/core';
3
+ import { NgTemplateOutlet } from '@angular/common';
4
+
5
+ class Table {
6
+ /**
7
+ * Will give the table a hover effect on rows
8
+ * @default false
9
+ */
10
+ hover = input(false, { ...(ngDevMode ? { debugName: "hover" } : /* istanbul ignore next */ {}), alias: 'data-hover',
11
+ transform: booleanAttribute });
12
+ /**
13
+ * Will give the table a rounded border
14
+ * @default false
15
+ */
16
+ border = input(false, { ...(ngDevMode ? { debugName: "border" } : /* istanbul ignore next */ {}), alias: 'data-border',
17
+ transform: booleanAttribute });
18
+ /**
19
+ * Will make the table header sticky
20
+ * @default false
21
+ */
22
+ stickyHeader = input(false, { ...(ngDevMode ? { debugName: "stickyHeader" } : /* istanbul ignore next */ {}), alias: 'data-sticky-header',
23
+ transform: booleanAttribute });
24
+ /**
25
+ * Will give the table zebra striping
26
+ * @default false
27
+ */
28
+ zebra = input(false, { ...(ngDevMode ? { debugName: "zebra" } : /* istanbul ignore next */ {}), alias: 'data-zebra',
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 });
32
+ }
33
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Table, decorators: [{
34
+ type: Component,
35
+ args: [{
36
+ selector: 'table[ksd-table]',
37
+ changeDetection: ChangeDetectionStrategy.OnPush,
38
+ template: `<ng-content />`,
39
+ host: {
40
+ class: 'ds-table',
41
+ '[attr.data-hover]': 'hover() || undefined',
42
+ '[attr.data-border]': 'border() || undefined',
43
+ '[attr.data-sticky-header]': 'stickyHeader() || undefined',
44
+ '[attr.data-zebra]': 'zebra() || undefined',
45
+ },
46
+ }]
47
+ }], propDecorators: { hover: [{ type: i0.Input, args: [{ isSignal: true, alias: "data-hover", required: false }] }], border: [{ type: i0.Input, args: [{ isSignal: true, alias: "data-border", required: false }] }], stickyHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "data-sticky-header", required: false }] }], zebra: [{ type: i0.Input, args: [{ isSignal: true, alias: "data-zebra", required: false }] }] } });
48
+
49
+ class TableHeaderCell {
50
+ /**
51
+ * If 'none' | 'ascending' | 'descending' will add a button to the header cell and change aria-sort and icon
52
+ * @default undefined
53
+ */
54
+ sort = input(undefined, { ...(ngDevMode ? { debugName: "sort" } : /* istanbul ignore next */ {}), alias: 'aria-sort' });
55
+ /**
56
+ * Emitted when the sort button is clicked
57
+ * @emits void
58
+ */
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: `
62
+ @if (sort()) {
63
+ <button
64
+ type="button"
65
+ (click)="sortChange.emit(); $event.stopPropagation()"
66
+ >
67
+ <ng-container *ngTemplateOutlet="headerTitle"></ng-container>
68
+ </button>
69
+ } @else {
70
+ <ng-container *ngTemplateOutlet="headerTitle"></ng-container>
71
+ }
72
+
73
+ <ng-template #headerTitle>
74
+ <ng-content />
75
+ </ng-template>
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
+ }
78
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TableHeaderCell, decorators: [{
79
+ type: Component,
80
+ args: [{ selector: 'th[ksd-header-cell]', changeDetection: ChangeDetectionStrategy.OnPush, template: `
81
+ @if (sort()) {
82
+ <button
83
+ type="button"
84
+ (click)="sortChange.emit(); $event.stopPropagation()"
85
+ >
86
+ <ng-container *ngTemplateOutlet="headerTitle"></ng-container>
87
+ </button>
88
+ } @else {
89
+ <ng-container *ngTemplateOutlet="headerTitle"></ng-container>
90
+ }
91
+
92
+ <ng-template #headerTitle>
93
+ <ng-content />
94
+ </ng-template>
95
+ `, imports: [NgTemplateOutlet], host: {
96
+ '[attr.aria-sort]': 'sort()',
97
+ }, styles: ["button{padding:var(--dsc-table-padding)}\n"] }]
98
+ }], propDecorators: { sort: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-sort", required: false }] }], sortChange: [{ type: i0.Output, args: ["sortChange"] }] } });
99
+
100
+ /**
101
+ * Generated bundle index. Do not edit.
102
+ */
103
+
104
+ export { Table, TableHeaderCell };
105
+ //# sourceMappingURL=ks-digital-designsystem-angular-table.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ks-digital-designsystem-angular-table.mjs","sources":["../../../../packages/angular/table/src/table.ts","../../../../packages/angular/table/src/table-header-cell.ts","../../../../packages/angular/table/src/ks-digital-designsystem-angular-table.ts"],"sourcesContent":["import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n input,\n} from '@angular/core'\n\n@Component({\n selector: 'table[ksd-table]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `<ng-content />`,\n host: {\n class: 'ds-table',\n '[attr.data-hover]': 'hover() || undefined',\n '[attr.data-border]': 'border() || undefined',\n '[attr.data-sticky-header]': 'stickyHeader() || undefined',\n '[attr.data-zebra]': 'zebra() || undefined',\n },\n})\nexport class Table {\n /**\n * Will give the table a hover effect on rows\n * @default false\n */\n readonly hover = input(false, {\n alias: 'data-hover',\n transform: booleanAttribute,\n })\n /**\n * Will give the table a rounded border\n * @default false\n */\n readonly border = input(false, {\n alias: 'data-border',\n transform: booleanAttribute,\n })\n /**\n * Will make the table header sticky\n * @default false\n */\n readonly stickyHeader = input(false, {\n alias: 'data-sticky-header',\n transform: booleanAttribute,\n })\n /**\n * Will give the table zebra striping\n * @default false\n */\n readonly zebra = input(false, {\n alias: 'data-zebra',\n transform: booleanAttribute,\n })\n}\n","import { NgTemplateOutlet } from '@angular/common'\nimport {\n ChangeDetectionStrategy,\n Component,\n input,\n output,\n} from '@angular/core'\n@Component({\n selector: 'th[ksd-header-cell]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n @if (sort()) {\n <button\n type=\"button\"\n (click)=\"sortChange.emit(); $event.stopPropagation()\"\n >\n <ng-container *ngTemplateOutlet=\"headerTitle\"></ng-container>\n </button>\n } @else {\n <ng-container *ngTemplateOutlet=\"headerTitle\"></ng-container>\n }\n\n <ng-template #headerTitle>\n <ng-content />\n </ng-template>\n `,\n imports: [NgTemplateOutlet],\n host: {\n '[attr.aria-sort]': 'sort()',\n },\n styles: `\n button {\n padding: var(--dsc-table-padding);\n }\n `,\n})\nexport class TableHeaderCell {\n /**\n * If 'none' | 'ascending' | 'descending' will add a button to the header cell and change aria-sort and icon\n * @default undefined\n */\n readonly sort = input<'none' | 'ascending' | 'descending'>(undefined, {\n alias: 'aria-sort',\n })\n /**\n * Emitted when the sort button is clicked\n * @emits void\n */\n readonly sortChange = output()\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAmBa,KAAK,CAAA;AAChB;;;AAGG;AACM,IAAA,KAAK,GAAG,KAAK,CAAC,KAAK,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,OAAA,EAAA,8BAAA,EAAA,CAAA,EAC1B,KAAK,EAAE,YAAY;QACnB,SAAS,EAAE,gBAAgB,EAAA,CAC3B;AACF;;;AAGG;AACM,IAAA,MAAM,GAAG,KAAK,CAAC,KAAK,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,QAAA,EAAA,8BAAA,EAAA,CAAA,EAC3B,KAAK,EAAE,aAAa;QACpB,SAAS,EAAE,gBAAgB,EAAA,CAC3B;AACF;;;AAGG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CAAC,gBAAgB,CAAC,EAAA,IAAA,EACrB;AACJ,wBAAA,kBAAkB,EAAE,QAAQ;AAC7B,qBAAA,EAAA,MAAA,EAAA,CAAA,4CAAA,CAAA,EAAA;;;AC7BH;;AAEG;;;;"}
@@ -0,0 +1,148 @@
1
+ import { NgTemplateOutlet } from '@angular/common';
2
+ import * as i0 from '@angular/core';
3
+ import { input, output, viewChild, ChangeDetectionStrategy, CUSTOM_ELEMENTS_SCHEMA, Component, contentChildren } from '@angular/core';
4
+ import '@digdir/designsystemet-web';
5
+ import * as i1 from '@ks-digital/designsystem-angular/__internals';
6
+ import { HostSize, HostColor } from '@ks-digital/designsystem-angular/__internals';
7
+
8
+ class TabsTab {
9
+ /**
10
+ * Stable identifier for this tab.
11
+ *
12
+ * Recommended for logic such as analytics, routing and persisted state.
13
+ *
14
+ * If omitted, `tabClicked` emits `tabId: undefined`.
15
+ */
16
+ tabId = input(...(ngDevMode ? [undefined, { debugName: "tabId" }] : /* istanbul ignore next */ []));
17
+ /**
18
+ * Emits tab click details when this tab is clicked.
19
+ */
20
+ tabClicked = output();
21
+ /**
22
+ * Hack to get the content of the tab from outside so that we can
23
+ * keep the dom structure needed without additional host elements
24
+ */
25
+ templateRef = viewChild('tpl', ...(ngDevMode ? [{ debugName: "templateRef" }] : /* istanbul ignore next */ []));
26
+ /* Exposed function so Tabs can emit tab click events */
27
+ emitTabClicked(event) {
28
+ this.tabClicked.emit(event);
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 });
32
+ }
33
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TabsTab, decorators: [{
34
+ type: Component,
35
+ args: [{
36
+ selector: `ksd-tabs-tab`,
37
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
38
+ template: ` <ng-template #tpl><ng-content /></ng-template> `,
39
+ changeDetection: ChangeDetectionStrategy.OnPush,
40
+ imports: [],
41
+ hostDirectives: [
42
+ {
43
+ directive: HostSize,
44
+ inputs: ['data-size'],
45
+ },
46
+ {
47
+ directive: HostColor,
48
+ inputs: ['data-color'],
49
+ },
50
+ ],
51
+ }]
52
+ }], propDecorators: { tabId: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabId", required: false }] }], tabClicked: [{ type: i0.Output, args: ["tabClicked"] }], templateRef: [{ type: i0.ViewChild, args: ['tpl', { isSignal: true }] }] } });
53
+
54
+ class Tabs {
55
+ /**
56
+ * Emits tab click details when any tab is clicked.
57
+ */
58
+ tabClicked = output();
59
+ tabs = contentChildren(TabsTab, { ...(ngDevMode ? { debugName: "tabs" } : /* istanbul ignore next */ {}), descendants: true });
60
+ onTabClick(index, tab) {
61
+ const event = {
62
+ index,
63
+ tabId: tab.tabId(),
64
+ };
65
+ this.tabClicked.emit(event);
66
+ tab.emitTabClicked(event);
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: `
70
+ <ds-tabs class="ds-tabs">
71
+ <ds-tablist>
72
+ @for (tab of tabs(); track tab; let index = $index) {
73
+ <ds-tab (click)="onTabClick(index, tab)">
74
+ <ng-container *ngTemplateOutlet="tab.templateRef()" />
75
+ </ds-tab>
76
+ }
77
+ </ds-tablist>
78
+ <ng-content select="ksd-tabs-panel" />
79
+ </ds-tabs>
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
+ }
82
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Tabs, decorators: [{
83
+ type: Component,
84
+ args: [{ selector: `ksd-tabs`, imports: [NgTemplateOutlet], schemas: [CUSTOM_ELEMENTS_SCHEMA], template: `
85
+ <ds-tabs class="ds-tabs">
86
+ <ds-tablist>
87
+ @for (tab of tabs(); track tab; let index = $index) {
88
+ <ds-tab (click)="onTabClick(index, tab)">
89
+ <ng-container *ngTemplateOutlet="tab.templateRef()" />
90
+ </ds-tab>
91
+ }
92
+ </ds-tablist>
93
+ <ng-content select="ksd-tabs-panel" />
94
+ </ds-tabs>
95
+ `, changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [
96
+ {
97
+ directive: HostSize,
98
+ inputs: ['data-size'],
99
+ },
100
+ {
101
+ directive: HostColor,
102
+ inputs: ['data-color'],
103
+ },
104
+ ], 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"] }]
105
+ }], propDecorators: { tabClicked: [{ type: i0.Output, args: ["tabClicked"] }], tabs: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => TabsTab), { ...{ descendants: true }, isSignal: true }] }] } });
106
+
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 });
110
+ }
111
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TabsList, decorators: [{
112
+ type: Component,
113
+ args: [{
114
+ selector: `ksd-tabs-list`,
115
+ template: `<ng-content /> `,
116
+ changeDetection: ChangeDetectionStrategy.OnPush,
117
+ }]
118
+ }] });
119
+
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: `
123
+ <ds-tabpanel>
124
+ <ng-content />
125
+ </ds-tabpanel>
126
+ `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
127
+ }
128
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: TabsPanel, decorators: [{
129
+ type: Component,
130
+ args: [{
131
+ selector: `ksd-tabs-panel`,
132
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
133
+ template: `
134
+ <ds-tabpanel>
135
+ <ng-content />
136
+ </ds-tabpanel>
137
+ `,
138
+ host: {},
139
+ changeDetection: ChangeDetectionStrategy.OnPush,
140
+ }]
141
+ }] });
142
+
143
+ /**
144
+ * Generated bundle index. Do not edit.
145
+ */
146
+
147
+ export { Tabs, TabsList, TabsPanel, TabsTab };
148
+ //# sourceMappingURL=ks-digital-designsystem-angular-tabs.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ks-digital-designsystem-angular-tabs.mjs","sources":["../../../../packages/angular/tabs/src/tabs-tab.ts","../../../../packages/angular/tabs/src/tabs.ts","../../../../packages/angular/tabs/src/tabs-list.ts","../../../../packages/angular/tabs/src/tabs-panel.ts","../../../../packages/angular/tabs/src/ks-digital-designsystem-angular-tabs.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n CUSTOM_ELEMENTS_SCHEMA,\n input,\n output,\n TemplateRef,\n viewChild,\n} from '@angular/core'\nimport {\n HostColor,\n HostSize,\n} from '@ks-digital/designsystem-angular/__internals'\n\n/**\n * Payload emitted from `tabClicked` on both `ksd-tabs` and `ksd-tabs-tab`.\n */\nexport interface TabClickEvent {\n /**\n * Zero-based index of the clicked tab in its current render order.\n */\n index: number\n\n /**\n * Consumer-provided stable tab identifier from `tabId`.\n *\n * `undefined` when `tabId` is not provided.\n */\n tabId: string | undefined\n}\n\n@Component({\n selector: `ksd-tabs-tab`,\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n template: ` <ng-template #tpl><ng-content /></ng-template> `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [],\n hostDirectives: [\n {\n directive: HostSize,\n inputs: ['data-size'],\n },\n {\n directive: HostColor,\n inputs: ['data-color'],\n },\n ],\n})\nexport class TabsTab {\n /**\n * Stable identifier for this tab.\n *\n * Recommended for logic such as analytics, routing and persisted state.\n *\n * If omitted, `tabClicked` emits `tabId: undefined`.\n */\n readonly tabId = input<string>()\n\n /**\n * Emits tab click details when this tab is clicked.\n */\n readonly tabClicked = output<TabClickEvent>()\n\n /**\n * Hack to get the content of the tab from outside so that we can\n * keep the dom structure needed without additional host elements\n */\n templateRef = viewChild<TemplateRef<unknown>>('tpl')\n\n /* Exposed function so Tabs can emit tab click events */\n emitTabClicked(event: TabClickEvent) {\n this.tabClicked.emit(event)\n }\n}\n","import { NgTemplateOutlet } from '@angular/common'\nimport {\n ChangeDetectionStrategy,\n Component,\n contentChildren,\n CUSTOM_ELEMENTS_SCHEMA,\n output,\n} from '@angular/core'\nimport '@digdir/designsystemet-web'\nimport {\n HostColor,\n HostSize,\n} from '@ks-digital/designsystem-angular/__internals'\nimport { TabClickEvent, TabsTab } from './tabs-tab'\n\n@Component({\n selector: `ksd-tabs`,\n imports: [NgTemplateOutlet],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n template: `\n <ds-tabs class=\"ds-tabs\">\n <ds-tablist>\n @for (tab of tabs(); track tab; let index = $index) {\n <ds-tab (click)=\"onTabClick(index, tab)\">\n <ng-container *ngTemplateOutlet=\"tab.templateRef()\" />\n </ds-tab>\n }\n </ds-tablist>\n <ng-content select=\"ksd-tabs-panel\" />\n </ds-tabs>\n `,\n styles: `\n :host\n ::ng-deep\n :is(.ds-tabs [role='tab'], .ds-tabs ds-tab, .ds-tabs u-tab)\n > :where(ng-icon, svg, img) {\n font-size: calc(1em * 1.25);\n width: 1em;\n height: 1em;\n }\n `,\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})\nexport class Tabs {\n /**\n * Emits tab click details when any tab is clicked.\n */\n readonly tabClicked = output<TabClickEvent>()\n\n readonly tabs = contentChildren(TabsTab, { descendants: true })\n\n protected onTabClick(index: number, tab: TabsTab) {\n const event: TabClickEvent = {\n index,\n tabId: tab.tabId(),\n }\n\n this.tabClicked.emit(event)\n tab.emitTabClicked(event)\n }\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core'\n\n@Component({\n selector: `ksd-tabs-list`,\n template: `<ng-content /> `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TabsList {}\n","import {\n ChangeDetectionStrategy,\n Component,\n CUSTOM_ELEMENTS_SCHEMA,\n} from '@angular/core'\n\n@Component({\n selector: `ksd-tabs-panel`,\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n template: `\n <ds-tabpanel>\n <ng-content />\n </ds-tabpanel>\n `,\n host: {},\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TabsPanel {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAgDa,OAAO,CAAA;AAClB;;;;;;AAMG;IACM,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAU;AAEhC;;AAEG;IACM,UAAU,GAAG,MAAM,EAAiB;AAE7C;;;AAGG;AACH,IAAA,WAAW,GAAG,SAAS,CAAuB,KAAK,kFAAC;;AAGpD,IAAA,cAAc,CAAC,KAAoB,EAAA;AACjC,QAAA,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC;IAC7B;uGAxBW,OAAO,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAP,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,OAAO,4fAdR,CAAA,gDAAA,CAAkD,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAcjD,OAAO,EAAA,UAAA,EAAA,CAAA;kBAjBnB,SAAS;AAAC,YA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