@kirbydesign/designsystem 10.3.1 → 10.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/calendar/calendar.component.d.ts.map +1 -1
- package/checkbox/checkbox.component.d.ts +5 -3
- package/checkbox/checkbox.component.d.ts.map +1 -1
- package/config/index.d.ts +6 -0
- package/config/kirbydesign-designsystem-config.d.ts.map +1 -0
- package/config/provide-kirby.d.ts +27 -0
- package/config/provide-kirby.d.ts.map +1 -0
- package/config/public_api.d.ts +2 -0
- package/config/public_api.d.ts.map +1 -0
- package/dropdown/dropdown.module.d.ts +2 -1
- package/dropdown/dropdown.module.d.ts.map +1 -1
- package/fesm2022/kirbydesign-designsystem-accordion.mjs +12 -12
- package/fesm2022/kirbydesign-designsystem-action-group.mjs +4 -4
- package/fesm2022/kirbydesign-designsystem-avatar.mjs +4 -4
- package/fesm2022/kirbydesign-designsystem-badge.mjs +4 -4
- package/fesm2022/kirbydesign-designsystem-button.mjs +4 -4
- package/fesm2022/kirbydesign-designsystem-calendar.mjs +8 -7
- package/fesm2022/kirbydesign-designsystem-calendar.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-card.mjs +18 -18
- package/fesm2022/kirbydesign-designsystem-card.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-chart.mjs +23 -23
- package/fesm2022/kirbydesign-designsystem-checkbox.mjs +13 -8
- package/fesm2022/kirbydesign-designsystem-checkbox.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-config.mjs +37 -0
- package/fesm2022/kirbydesign-designsystem-config.mjs.map +1 -0
- package/fesm2022/kirbydesign-designsystem-data-table.mjs +8 -8
- package/fesm2022/kirbydesign-designsystem-divider.mjs +4 -4
- package/fesm2022/kirbydesign-designsystem-dropdown.mjs +18 -15
- package/fesm2022/kirbydesign-designsystem-dropdown.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-empty-state.mjs +9 -9
- package/fesm2022/kirbydesign-designsystem-empty-state.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-fab-sheet.mjs +5 -5
- package/fesm2022/kirbydesign-designsystem-flag.mjs +4 -4
- package/fesm2022/kirbydesign-designsystem-form-field.mjs +143 -70
- package/fesm2022/kirbydesign-designsystem-form-field.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-header.mjs +21 -21
- package/fesm2022/kirbydesign-designsystem-header.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-helpers.mjs +9 -9
- package/fesm2022/kirbydesign-designsystem-icon.mjs +11 -12
- package/fesm2022/kirbydesign-designsystem-icon.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-item-group.mjs +4 -4
- package/fesm2022/kirbydesign-designsystem-item-sliding.mjs +4 -4
- package/fesm2022/kirbydesign-designsystem-item.mjs +11 -11
- package/fesm2022/kirbydesign-designsystem-kirby-app.mjs +8 -8
- package/fesm2022/kirbydesign-designsystem-list.mjs +41 -41
- package/fesm2022/kirbydesign-designsystem-loading-overlay.mjs +7 -7
- package/fesm2022/kirbydesign-designsystem-menu.mjs +5 -5
- package/fesm2022/kirbydesign-designsystem-modal.mjs +45 -47
- package/fesm2022/kirbydesign-designsystem-modal.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-page.mjs +86 -47
- package/fesm2022/kirbydesign-designsystem-page.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-popover.mjs +4 -4
- package/fesm2022/kirbydesign-designsystem-progress-circle.mjs +7 -7
- package/fesm2022/kirbydesign-designsystem-radio.mjs +36 -18
- package/fesm2022/kirbydesign-designsystem-radio.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-range.mjs +4 -4
- package/fesm2022/kirbydesign-designsystem-reorder-list.mjs +4 -4
- package/fesm2022/kirbydesign-designsystem-router-outlet.mjs +8 -8
- package/fesm2022/kirbydesign-designsystem-section-header.mjs +4 -4
- package/fesm2022/kirbydesign-designsystem-shared-floating.mjs +4 -4
- package/fesm2022/kirbydesign-designsystem-shared-portal.mjs +4 -4
- package/fesm2022/kirbydesign-designsystem-shared.mjs +65 -23
- package/fesm2022/kirbydesign-designsystem-shared.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-slide-button.mjs +4 -4
- package/fesm2022/kirbydesign-designsystem-slide.mjs +14 -14
- package/fesm2022/kirbydesign-designsystem-spinner.mjs +8 -8
- package/fesm2022/kirbydesign-designsystem-tab-navigation.mjs +11 -11
- package/fesm2022/kirbydesign-designsystem-tabs.mjs +14 -14
- package/fesm2022/kirbydesign-designsystem-testing-base.mjs +287 -287
- package/fesm2022/kirbydesign-designsystem-testing-jasmine.mjs +4 -4
- package/fesm2022/kirbydesign-designsystem-testing-jest.mjs +4 -4
- package/fesm2022/kirbydesign-designsystem-testing.mjs +4 -4
- package/fesm2022/kirbydesign-designsystem-toast.mjs +6 -6
- package/fesm2022/kirbydesign-designsystem-toggle-button.mjs +77 -9
- package/fesm2022/kirbydesign-designsystem-toggle-button.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-toggle.mjs +50 -19
- package/fesm2022/kirbydesign-designsystem-toggle.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-types.mjs +3 -3
- package/fesm2022/kirbydesign-designsystem.mjs +84 -26
- package/fesm2022/kirbydesign-designsystem.mjs.map +1 -1
- package/form-field/form-field.component.d.ts +21 -6
- package/form-field/form-field.component.d.ts.map +1 -1
- package/form-field/input/input.component.d.ts +11 -7
- package/form-field/input/input.component.d.ts.map +1 -1
- package/form-field/textarea/textarea.component.d.ts +8 -4
- package/form-field/textarea/textarea.component.d.ts.map +1 -1
- package/icon/kirby-icon-settings.d.ts.map +1 -1
- package/lib/components/segmented-control/segmented-control.component.d.ts +35 -1
- package/lib/components/segmented-control/segmented-control.component.d.ts.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/kirby.module.d.ts +45 -48
- package/lib/kirby.module.d.ts.map +1 -1
- package/modal/modal/modal-component/modal.component.d.ts.map +1 -1
- package/package.json +40 -40
- package/page/page.component.d.ts +9 -2
- package/page/page.component.d.ts.map +1 -1
- package/radio/radio-group/radio-group.component.d.ts +13 -5
- package/radio/radio-group/radio-group.component.d.ts.map +1 -1
- package/readme.md +1 -1
- package/shared/controls/label-helpers.d.ts +13 -0
- package/shared/controls/label-helpers.d.ts.map +1 -1
- package/shared/fit-heading/fit-heading.directive.d.ts +1 -1
- package/shared/fit-heading/fit-heading.directive.d.ts.map +1 -1
- package/shared/translation/translation.interface.d.ts +1 -0
- package/shared/translation/translation.interface.d.ts.map +1 -1
- package/shared/translation/translation.service.d.ts.map +1 -1
- package/shared/translation/translations/da.d.ts.map +1 -1
- package/shared/translation/translations/de.d.ts +3 -0
- package/shared/translation/translations/de.d.ts.map +1 -0
- package/shared/translation/translations/en.d.ts.map +1 -1
- package/toggle/toggle.component.d.ts +13 -6
- package/toggle/toggle.component.d.ts.map +1 -1
- package/toggle-button/toggle-button.component.d.ts +35 -1
- package/toggle-button/toggle-button.component.d.ts.map +1 -1
- package/types/form-field-control.d.ts +6 -0
- package/types/form-field-control.d.ts.map +1 -0
- package/types/public_api.d.ts +1 -0
- package/types/public_api.d.ts.map +1 -1
- package/fesm2022/kirbydesign-designsystem-kirby-ionic-module.mjs +0 -30
- package/fesm2022/kirbydesign-designsystem-kirby-ionic-module.mjs.map +0 -1
- package/kirby-ionic-module/index.d.ts +0 -6
- package/kirby-ionic-module/kirby-ionic.module.d.ts +0 -7
- package/kirby-ionic-module/kirby-ionic.module.d.ts.map +0 -1
- package/kirby-ionic-module/kirbydesign-designsystem-kirby-ionic-module.d.ts.map +0 -1
- package/kirby-ionic-module/public_api.d.ts +0 -2
- package/kirby-ionic-module/public_api.d.ts.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, ElementRef,
|
|
2
|
+
import { Injectable, ElementRef, Input, HostBinding, Directive, LOCALE_ID, Inject } from '@angular/core';
|
|
3
3
|
import * as i2 from '@kirbydesign/designsystem/helpers';
|
|
4
4
|
import { ColorHelper, DesignTokenHelper, LineClampHelper } from '@kirbydesign/designsystem/helpers';
|
|
5
5
|
|
|
@@ -11,10 +11,10 @@ class ResizeObserverFactory {
|
|
|
11
11
|
create(callback) {
|
|
12
12
|
return typeof ResizeObserver === 'undefined' ? null : new ResizeObserver(callback);
|
|
13
13
|
}
|
|
14
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
15
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
|
14
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: ResizeObserverFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
15
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: ResizeObserverFactory, providedIn: 'root' }); }
|
|
16
16
|
}
|
|
17
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
17
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: ResizeObserverFactory, decorators: [{
|
|
18
18
|
type: Injectable,
|
|
19
19
|
args: [{ providedIn: 'root' }]
|
|
20
20
|
}] });
|
|
@@ -57,10 +57,10 @@ class ResizeObserverService {
|
|
|
57
57
|
}
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
61
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
|
60
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: ResizeObserverService, deps: [{ token: ResizeObserverFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
61
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: ResizeObserverService, providedIn: 'root' }); }
|
|
62
62
|
}
|
|
63
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
63
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: ResizeObserverService, decorators: [{
|
|
64
64
|
type: Injectable,
|
|
65
65
|
args: [{ providedIn: 'root' }]
|
|
66
66
|
}], ctorParameters: () => [{ type: ResizeObserverFactory }] });
|
|
@@ -128,10 +128,10 @@ class ThemeColorDirective {
|
|
|
128
128
|
this._isBrightnessLight = colorBrightness === 'light';
|
|
129
129
|
this._isBrightnessDark = colorBrightness === 'dark';
|
|
130
130
|
}
|
|
131
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
132
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.
|
|
131
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: ThemeColorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
132
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.5", type: ThemeColorDirective, isStandalone: true, selector: "kirby-avatar[themeColor],\n kirby-card[themeColor],\n kirby-icon[themeColor],\n kirby-progress-circle-ring[themeColor],\n kirby-modal-footer[themeColor],\n kirby-empty-state[themeColor]", inputs: { themeColor: "themeColor" }, host: { properties: { "class.default": "this.isDefault", "class.primary": "this.isPrimary", "class.secondary": "this.isSecondary", "class.tertiary": "this.isTertiary", "class.success": "this.isSuccess", "class.warning": "this.isWarning", "class.danger": "this.isDanger", "class.light": "this.isLight", "class.medium": "this.isMedium", "class.dark": "this.isDark", "class.white": "this.isWhite", "class.kirby-color-brightness-white": "this.isBrightnessWhite", "class.kirby-color-brightness-light": "this.isBrightnessLight", "class.kirby-color-brightness-dark": "this.isBrightnessDark" } }, ngImport: i0 }); }
|
|
133
133
|
}
|
|
134
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
134
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: ThemeColorDirective, decorators: [{
|
|
135
135
|
type: Directive,
|
|
136
136
|
args: [{
|
|
137
137
|
standalone: true,
|
|
@@ -207,10 +207,10 @@ class ComponentLoaderDirective {
|
|
|
207
207
|
}
|
|
208
208
|
componentRef.instance.data = this.configuration.data;
|
|
209
209
|
}
|
|
210
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
211
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.
|
|
210
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: ComponentLoaderDirective, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.ViewContainerRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
211
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.5", type: ComponentLoaderDirective, isStandalone: true, selector: "[kirbyLoadComponent]", inputs: { configuration: ["kirbyLoadComponent", "configuration"], cssClass: "cssClass" }, ngImport: i0 }); }
|
|
212
212
|
}
|
|
213
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
213
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: ComponentLoaderDirective, decorators: [{
|
|
214
214
|
type: Directive,
|
|
215
215
|
args: [{
|
|
216
216
|
selector: '[kirbyLoadComponent]',
|
|
@@ -283,7 +283,7 @@ class FitHeadingDirective {
|
|
|
283
283
|
this.isScalingHeader = true;
|
|
284
284
|
if (!this.hostElementClone) {
|
|
285
285
|
this.hostElementClone = this.generateHostElementClone();
|
|
286
|
-
this.renderer.appendChild(this.elementRef.nativeElement
|
|
286
|
+
this.renderer.appendChild(this.elementRef.nativeElement, this.hostElementClone);
|
|
287
287
|
}
|
|
288
288
|
this.renderer.setStyle(this.hostElementClone, 'width', `${this.elementRef.nativeElement.clientWidth}px`);
|
|
289
289
|
const fallbackSize = this.headingSizes[this.headingSizes.length - 1];
|
|
@@ -308,14 +308,14 @@ class FitHeadingDirective {
|
|
|
308
308
|
this.renderer.setStyle(el, 'font-size', size.fontSize);
|
|
309
309
|
this.renderer.setStyle(el, 'line-height', size.lineHeight);
|
|
310
310
|
}
|
|
311
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
312
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.
|
|
311
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: FitHeadingDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: ResizeObserverService }, { token: i2.LineClampHelper }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
312
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.5", type: FitHeadingDirective, isStandalone: true, selector: "h1[kirbyFitHeading],h2[kirbyFitHeading],h3[kirbyFitHeading],[kirbyFitHeading]", inputs: { config: ["kirbyFitHeading", "config"] }, providers: [LineClampHelper], ngImport: i0 }); }
|
|
313
313
|
}
|
|
314
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
314
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: FitHeadingDirective, decorators: [{
|
|
315
315
|
type: Directive,
|
|
316
316
|
args: [{
|
|
317
317
|
standalone: true,
|
|
318
|
-
selector: `h1[kirbyFitHeading],h2[kirbyFitHeading],h3[kirbyFitHeading]`,
|
|
318
|
+
selector: `h1[kirbyFitHeading],h2[kirbyFitHeading],h3[kirbyFitHeading],[kirbyFitHeading]`,
|
|
319
319
|
providers: [LineClampHelper],
|
|
320
320
|
}]
|
|
321
321
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: ResizeObserverService }, { type: i2.LineClampHelper }], propDecorators: { config: [{
|
|
@@ -345,6 +345,34 @@ function inheritAriaLabelText(element) {
|
|
|
345
345
|
return value;
|
|
346
346
|
}
|
|
347
347
|
}
|
|
348
|
+
/**
|
|
349
|
+
* Forwards specified attributes from a source element to a target element.
|
|
350
|
+
*
|
|
351
|
+
* @param sourceElement - The HTML element from which attributes will be removed from.
|
|
352
|
+
* @param attributes - An array of attribute names to inherit from the source element.
|
|
353
|
+
* @param renderer - An instance of Angular's Renderer2.
|
|
354
|
+
* @param targetElement - (Optional) The HTML element to which the attributes should be applied.
|
|
355
|
+
* If not provided, the attributes will only be removed from the source element.
|
|
356
|
+
*
|
|
357
|
+
* @returns A record of the inherited attributes and their values. If no attributes are inherited, an empty object is returned.
|
|
358
|
+
*/
|
|
359
|
+
function forwardAttributes(sourceElement, attributes, renderer, targetElement) {
|
|
360
|
+
const inheritedAttributes = {};
|
|
361
|
+
if (!sourceElement || !attributes || attributes.length === 0) {
|
|
362
|
+
return inheritedAttributes;
|
|
363
|
+
}
|
|
364
|
+
attributes.forEach((attribute) => {
|
|
365
|
+
if (sourceElement.hasAttribute(attribute)) {
|
|
366
|
+
const value = sourceElement.getAttribute(attribute);
|
|
367
|
+
inheritedAttributes[attribute] = value;
|
|
368
|
+
if (targetElement) {
|
|
369
|
+
renderer.setAttribute(targetElement, attribute, value);
|
|
370
|
+
}
|
|
371
|
+
renderer.removeAttribute(sourceElement, attribute);
|
|
372
|
+
}
|
|
373
|
+
});
|
|
374
|
+
return inheritedAttributes;
|
|
375
|
+
}
|
|
348
376
|
|
|
349
377
|
const da = {
|
|
350
378
|
$code: 'da',
|
|
@@ -355,6 +383,7 @@ const da = {
|
|
|
355
383
|
previousMonth: 'Forrige måned',
|
|
356
384
|
previousSlide: 'Forrige slide',
|
|
357
385
|
selectYear: 'Vælg år',
|
|
386
|
+
readMore: 'Læs mere',
|
|
358
387
|
};
|
|
359
388
|
|
|
360
389
|
const en = {
|
|
@@ -366,13 +395,26 @@ const en = {
|
|
|
366
395
|
previousMonth: 'Previous month',
|
|
367
396
|
previousSlide: 'Previous slide',
|
|
368
397
|
selectYear: 'Select year',
|
|
398
|
+
readMore: 'Read more',
|
|
399
|
+
};
|
|
400
|
+
|
|
401
|
+
const de = {
|
|
402
|
+
$code: 'de',
|
|
403
|
+
back: 'Zurück',
|
|
404
|
+
close: 'Schließen',
|
|
405
|
+
nextMonth: 'Nächsten Monat',
|
|
406
|
+
nextSlide: 'Zur nächsten Folie',
|
|
407
|
+
previousMonth: 'Letzten Monat',
|
|
408
|
+
previousSlide: 'Zur vorherigen Folie',
|
|
409
|
+
selectYear: 'Jahr auswählen',
|
|
410
|
+
readMore: 'Mehr lesen',
|
|
369
411
|
};
|
|
370
412
|
|
|
371
413
|
class TranslationService {
|
|
372
414
|
constructor(localeId) {
|
|
373
415
|
this.localeId = localeId;
|
|
374
416
|
this.activeTranslation = en;
|
|
375
|
-
this.translations = { da, en };
|
|
417
|
+
this.translations = { da, en, de };
|
|
376
418
|
this.setActiveTranslation(localeId);
|
|
377
419
|
}
|
|
378
420
|
setActiveTranslation(localeId) {
|
|
@@ -387,10 +429,10 @@ class TranslationService {
|
|
|
387
429
|
get(key) {
|
|
388
430
|
return this.activeTranslation[key];
|
|
389
431
|
}
|
|
390
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
391
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
|
432
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: TranslationService, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
433
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: TranslationService, providedIn: 'root' }); }
|
|
392
434
|
}
|
|
393
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
435
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: TranslationService, decorators: [{
|
|
394
436
|
type: Injectable,
|
|
395
437
|
args: [{
|
|
396
438
|
providedIn: 'root',
|
|
@@ -404,5 +446,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
|
|
|
404
446
|
* Generated bundle index. Do not edit.
|
|
405
447
|
*/
|
|
406
448
|
|
|
407
|
-
export { ComponentLoaderDirective, FitHeadingDirective, ResizeObserverFactory, ResizeObserverService, ThemeColorDirective, TranslationService, findItemLabel, inheritAriaLabelText, setAccessibleLabel };
|
|
449
|
+
export { ComponentLoaderDirective, FitHeadingDirective, ResizeObserverFactory, ResizeObserverService, ThemeColorDirective, TranslationService, findItemLabel, forwardAttributes, inheritAriaLabelText, setAccessibleLabel };
|
|
408
450
|
//# sourceMappingURL=kirbydesign-designsystem-shared.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kirbydesign-designsystem-shared.mjs","sources":["../../shared/src/resize-observer/resize-observer.factory.ts","../../shared/src/resize-observer/resize-observer.service.ts","../../shared/src/theme-color/theme-color.directive.ts","../../shared/src/component-loader.directive.ts","../../shared/src/fit-heading/fit-heading.directive.ts","../../shared/src/controls/label-helpers.ts","../../shared/src/translation/translations/da.ts","../../shared/src/translation/translations/en.ts","../../shared/src/translation/translation.service.ts","../../shared/src/kirbydesign-designsystem-shared.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n/**\n * Factory that creates a new ResizeObserver and allows us to stub it out in unit tests.\n * @docs-private\n */\n@Injectable({ providedIn: 'root' })\nexport class ResizeObserverFactory {\n create(callback: ResizeObserverCallback): ResizeObserver | null {\n return typeof ResizeObserver === 'undefined' ? null : new ResizeObserver(callback);\n }\n}\n","import { ElementRef, Injectable, OnDestroy } from '@angular/core';\nimport { ResizeObserverFactory } from './resize-observer.factory';\n\n@Injectable({ providedIn: 'root' })\nexport class ResizeObserverService implements OnDestroy {\n // IMPORTANT: Keeps track of the existing ResizeObserver so it can be reused for performance.\n // See: https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/z6ienONUb5A/F5-VcUZtBAAJ\n private observer: ResizeObserver | null;\n private observedElements = new WeakMap<Element, (entry: ResizeObserverEntry) => void>();\n\n constructor(private _resizeObserverFactory: ResizeObserverFactory) {\n this.observer = this._resizeObserverFactory.create((entries) => this.handleResize(entries));\n }\n\n observe(\n elementOrRef: Element | ElementRef<Element>,\n action: (entry: ResizeObserverEntry) => void\n ): void {\n const element = elementOrRef instanceof ElementRef ? elementOrRef.nativeElement : elementOrRef;\n if (!this.observedElements.has(element)) {\n if (this.observer) {\n this.observer.observe(element);\n }\n this.observedElements.set(element, action);\n }\n }\n\n ngOnDestroy() {\n if (this.observer) {\n this.observer.disconnect();\n }\n this.observedElements = null;\n }\n\n unobserve(elementOrRef: Element | ElementRef<Element>) {\n const element = elementOrRef instanceof ElementRef ? elementOrRef.nativeElement : elementOrRef;\n if (this.observedElements.has(element)) {\n if (this.observer) {\n this.observer.unobserve(element);\n }\n this.observedElements.delete(element);\n }\n }\n\n private handleResize(entries: ResizeObserverEntry[]) {\n entries.forEach((entry) => {\n const action = this.observedElements.get(entry.target);\n if (action) {\n action(entry);\n }\n });\n }\n}\n","import { Directive, HostBinding, Input } from '@angular/core';\n\nimport { ColorHelper } from '@kirbydesign/designsystem/helpers';\nimport { ThemeColor } from '@kirbydesign/core';\n\n@Directive({\n standalone: true,\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: `kirby-avatar[themeColor],\n kirby-card[themeColor],\n kirby-icon[themeColor],\n kirby-progress-circle-ring[themeColor],\n kirby-modal-footer[themeColor],\n kirby-empty-state[themeColor]`,\n})\nexport class ThemeColorDirective {\n private _isDefault = true;\n @HostBinding('class.default')\n get isDefault() {\n return this._isDefault;\n }\n\n private _isPrimary: boolean;\n @HostBinding('class.primary')\n get isPrimary() {\n return this._isPrimary;\n }\n\n private _isSecondary: boolean;\n @HostBinding('class.secondary')\n get isSecondary() {\n return this._isSecondary;\n }\n\n private _isTertiary: boolean;\n @HostBinding('class.tertiary')\n get isTertiary() {\n return this._isTertiary;\n }\n\n private _isSuccess: boolean;\n @HostBinding('class.success')\n get isSuccess() {\n return this._isSuccess;\n }\n\n private _isWarning: boolean;\n @HostBinding('class.warning')\n get isWarning() {\n return this._isWarning;\n }\n\n private _isDanger: boolean;\n @HostBinding('class.danger')\n get isDanger() {\n return this._isDanger;\n }\n\n private _isLight: boolean;\n @HostBinding('class.light')\n get isLight() {\n return this._isLight;\n }\n\n private _isMedium: boolean;\n @HostBinding('class.medium')\n get isMedium() {\n return this._isMedium;\n }\n\n private _isDark: boolean;\n @HostBinding('class.dark')\n get isDark() {\n return this._isDark;\n }\n\n private _isWhite: boolean;\n @HostBinding('class.white')\n get isWhite() {\n return this._isWhite;\n }\n\n private _isBrightnessWhite: boolean;\n @HostBinding('class.kirby-color-brightness-white')\n get isBrightnessWhite() {\n return this._isBrightnessWhite;\n }\n\n private _isBrightnessLight: boolean;\n @HostBinding('class.kirby-color-brightness-light')\n get isBrightnessLight() {\n return this._isBrightnessLight;\n }\n\n private _isBrightnessDark: boolean;\n @HostBinding('class.kirby-color-brightness-dark')\n get isBrightnessDark() {\n return this._isBrightnessDark;\n }\n\n @Input() set themeColor(value: ThemeColor) {\n this._isDefault = !value;\n this._isPrimary = value === 'primary';\n this._isSecondary = value === 'secondary';\n this._isTertiary = value === 'tertiary';\n this._isSuccess = value === 'success';\n this._isWarning = value === 'warning';\n this._isDanger = value === 'danger';\n this._isLight = value === 'light';\n this._isMedium = value === 'medium';\n this._isDark = value === 'dark';\n this._isWhite = value === 'white';\n const colorBrightness = ColorHelper.getColorBrightness(value);\n this._isBrightnessWhite = colorBrightness === 'white';\n this._isBrightnessLight = colorBrightness === 'light';\n this._isBrightnessDark = colorBrightness === 'dark';\n }\n}\n","import {\n ComponentFactoryResolver,\n Directive,\n Input,\n OnInit,\n Renderer2,\n ViewContainerRef,\n} from '@angular/core';\n\nimport { ComponentConfiguration } from './component-configuration';\nimport { DynamicComponent } from './dynamic-component';\n\n@Directive({\n selector: '[kirbyLoadComponent]',\n standalone: true,\n})\nexport class ComponentLoaderDirective implements OnInit {\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('kirbyLoadComponent') configuration: ComponentConfiguration;\n @Input() cssClass: string;\n\n constructor(\n private componentFactoryResolver: ComponentFactoryResolver,\n private viewContainerRef: ViewContainerRef,\n private renderer: Renderer2\n ) {}\n\n ngOnInit() {\n this.loadCard();\n }\n\n loadCard() {\n const componentFactory = this.componentFactoryResolver.resolveComponentFactory(\n this.configuration.component\n );\n this.viewContainerRef.clear();\n const componentRef = this.viewContainerRef.createComponent(componentFactory);\n if (componentRef && componentRef.location && componentRef.location.nativeElement) {\n this.renderer.addClass(componentRef.location.nativeElement, this.cssClass);\n }\n (<DynamicComponent>componentRef.instance).data = this.configuration.data;\n }\n}\n","import { Directive, ElementRef, Input, OnDestroy, OnInit, Renderer2 } from '@angular/core';\n\nimport { DesignTokenHelper } from '@kirbydesign/designsystem/helpers';\nimport { LineClampHelper } from '@kirbydesign/designsystem/helpers';\nimport { ResizeObserverService } from '../resize-observer/resize-observer.service';\n\nconst fontSize = DesignTokenHelper.fontSize;\nconst lineHeight = DesignTokenHelper.lineHeight;\n\ninterface HeadingSize {\n name: string;\n fontSize: string;\n lineHeight: string;\n}\n\nexport interface FitHeadingConfig {\n maxLines: number;\n}\n\n@Directive({\n standalone: true,\n selector: `h1[kirbyFitHeading],h2[kirbyFitHeading],h3[kirbyFitHeading]`,\n providers: [LineClampHelper],\n})\nexport class FitHeadingDirective implements OnInit, OnDestroy {\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('kirbyFitHeading') config?: FitHeadingConfig;\n\n private isObservingHostElement: boolean;\n private hostElementClone: Element;\n private isScalingHeader: boolean; // used to prevent resizeObserver to trigger on font scaling by this.scaleHeader()\n\n private headingSizes: HeadingSize[] = [\n {\n name: 'h1',\n fontSize: fontSize('xl'),\n lineHeight: lineHeight('xl'),\n },\n {\n name: 'h2',\n fontSize: fontSize('l'),\n lineHeight: lineHeight('l'),\n },\n {\n name: 'h3',\n fontSize: fontSize('m'),\n lineHeight: lineHeight('m'),\n },\n ];\n\n constructor(\n private elementRef: ElementRef,\n private renderer: Renderer2,\n private resizeObserverService: ResizeObserverService,\n private lineClampHelper: LineClampHelper\n ) {}\n\n ngOnInit(): void {\n if (this.config && this.config.maxLines) {\n this.lineClampHelper.setMaxLines(this.elementRef.nativeElement, this.config.maxLines);\n this.observeResize();\n this.isObservingHostElement = true;\n }\n }\n\n ngOnDestroy(): void {\n if (this.isObservingHostElement) {\n this.resizeObserverService.unobserve(this.elementRef);\n if (this.hostElementClone) {\n this.renderer.removeChild(this.elementRef.nativeElement, this.hostElementClone);\n }\n }\n }\n\n private observeResize(): void {\n this.resizeObserverService.observe(this.elementRef, () => {\n /**\n * setTimeout is used here to avoid repeated size changes\n * while the first size change is still ongoing.\n * This would result in the ResizeObserver being called again,\n * giving 'ResizeObserver loop limit exceeded' types of errors.\n */\n setTimeout(() => {\n this.scaleHeader();\n }, 0);\n });\n }\n\n private scaleHeader(): void {\n if (this.isScalingHeader) return;\n\n this.isScalingHeader = true;\n\n if (!this.hostElementClone) {\n this.hostElementClone = this.generateHostElementClone();\n this.renderer.appendChild(this.elementRef.nativeElement.parentElement, this.hostElementClone);\n }\n\n this.renderer.setStyle(\n this.hostElementClone,\n 'width',\n `${this.elementRef.nativeElement.clientWidth}px`\n );\n\n const fallbackSize = this.headingSizes[this.headingSizes.length - 1];\n const fittedSize = this.headingSizes.find(this.canFitHeading.bind(this)) || fallbackSize;\n\n this.setSize(this.elementRef.nativeElement, fittedSize);\n this.lineClampHelper.setLineHeight(this.elementRef.nativeElement, fittedSize.lineHeight);\n this.isScalingHeader = false;\n }\n\n private canFitHeading(size: HeadingSize) {\n this.setSize(this.hostElementClone, size);\n const lines = this.hostElementClone.clientHeight / parseInt(size.lineHeight);\n return lines <= this.config.maxLines;\n }\n\n private generateHostElementClone(): Element {\n const clone = this.elementRef.nativeElement.cloneNode(true);\n this.renderer.setStyle(clone, 'position', 'absolute');\n this.renderer.setStyle(clone, 'visibility', 'hidden');\n this.lineClampHelper.removeLineClamp(clone);\n return clone;\n }\n\n private setSize(el: Element, size: HeadingSize): void {\n this.renderer.setStyle(el, 'font-size', size.fontSize);\n this.renderer.setStyle(el, 'line-height', size.lineHeight);\n }\n}\n","export function findItemLabel(element: HTMLElement): HTMLElement {\n const itemEl = element.closest('kirby-item');\n if (itemEl) {\n return itemEl.querySelector('kirby-label');\n }\n\n return null;\n}\n\nexport function setAccessibleLabel(element: HTMLElement): string {\n const label = findItemLabel(element);\n if (label) {\n label.setAttribute('aria-hidden', 'true');\n return label.textContent;\n }\n}\n\nexport function inheritAriaLabelText(element: HTMLElement): string {\n const attribute = 'aria-label';\n if (element.hasAttribute(attribute)) {\n const value = element.getAttribute(attribute);\n element.removeAttribute(attribute);\n return value;\n }\n}\n","import { Translation } from '../translation.interface';\n\nexport const da: Translation = {\n $code: 'da',\n back: 'Tilbage',\n close: 'Luk',\n nextMonth: 'Næste måned',\n nextSlide: 'Næste slide',\n previousMonth: 'Forrige måned',\n previousSlide: 'Forrige slide',\n selectYear: 'Vælg år',\n};\n","import { Translation } from '../translation.interface';\n\nexport const en: Translation = {\n $code: 'en',\n back: 'Back',\n close: 'Close',\n nextMonth: 'Next month',\n nextSlide: 'Next slide',\n previousMonth: 'Previous month',\n previousSlide: 'Previous slide',\n selectYear: 'Select year',\n};\n","import { Injectable } from '@angular/core';\nimport { Inject, LOCALE_ID } from '@angular/core';\nimport { da } from './translations/da';\nimport { en } from './translations/en';\nimport { Translation } from './translation.interface';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TranslationService {\n private activeTranslation: Translation = en;\n private translations: { [key: string]: Translation } = { da, en };\n\n constructor(@Inject(LOCALE_ID) private localeId: string) {\n this.setActiveTranslation(localeId);\n }\n\n private setActiveTranslation(localeId: string): string {\n const baseLocaleId = localeId.split('-')[0];\n const translation = this.translations[baseLocaleId];\n\n if (!translation) {\n console.warn(\n `[Kirby] Internal component translations were not found for locale \"${this.localeId}\", falling back to ${this.get('$code')}`\n );\n return;\n }\n\n this.activeTranslation = translation;\n }\n\n get(key: keyof Translation): string {\n return this.activeTranslation[key];\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1.ResizeObserverFactory","i1.ResizeObserverService"],"mappings":";;;;;AACA;;;AAGG;MAEU,qBAAqB,CAAA;AAChC,IAAA,MAAM,CAAC,QAAgC,EAAA;AACrC,QAAA,OAAO,OAAO,cAAc,KAAK,WAAW,GAAG,IAAI,GAAG,IAAI,cAAc,CAAC,QAAQ,CAAC;;iIAFzE,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAr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AA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,kBAIT,SAAS,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAJlB,uBAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,cAFjB,MAAM,EAAA,CAAA,CAAA;;2FAEP,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAH9B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;0BAKc,MAAM;2BAAC,SAAS;;;ACb/B;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"kirbydesign-designsystem-shared.mjs","sources":["../../shared/src/resize-observer/resize-observer.factory.ts","../../shared/src/resize-observer/resize-observer.service.ts","../../shared/src/theme-color/theme-color.directive.ts","../../shared/src/component-loader.directive.ts","../../shared/src/fit-heading/fit-heading.directive.ts","../../shared/src/controls/label-helpers.ts","../../shared/src/translation/translations/da.ts","../../shared/src/translation/translations/en.ts","../../shared/src/translation/translations/de.ts","../../shared/src/translation/translation.service.ts","../../shared/src/kirbydesign-designsystem-shared.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n/**\n * Factory that creates a new ResizeObserver and allows us to stub it out in unit tests.\n * @docs-private\n */\n@Injectable({ providedIn: 'root' })\nexport class ResizeObserverFactory {\n create(callback: ResizeObserverCallback): ResizeObserver | null {\n return typeof ResizeObserver === 'undefined' ? null : new ResizeObserver(callback);\n }\n}\n","import { ElementRef, Injectable, OnDestroy } from '@angular/core';\nimport { ResizeObserverFactory } from './resize-observer.factory';\n\n@Injectable({ providedIn: 'root' })\nexport class ResizeObserverService implements OnDestroy {\n // IMPORTANT: Keeps track of the existing ResizeObserver so it can be reused for performance.\n // See: https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/z6ienONUb5A/F5-VcUZtBAAJ\n private observer: ResizeObserver | null;\n private observedElements = new WeakMap<Element, (entry: ResizeObserverEntry) => void>();\n\n constructor(private _resizeObserverFactory: ResizeObserverFactory) {\n this.observer = this._resizeObserverFactory.create((entries) => this.handleResize(entries));\n }\n\n observe(\n elementOrRef: Element | ElementRef<Element>,\n action: (entry: ResizeObserverEntry) => void\n ): void {\n const element = elementOrRef instanceof ElementRef ? elementOrRef.nativeElement : elementOrRef;\n if (!this.observedElements.has(element)) {\n if (this.observer) {\n this.observer.observe(element);\n }\n this.observedElements.set(element, action);\n }\n }\n\n ngOnDestroy() {\n if (this.observer) {\n this.observer.disconnect();\n }\n this.observedElements = null;\n }\n\n unobserve(elementOrRef: Element | ElementRef<Element>) {\n const element = elementOrRef instanceof ElementRef ? elementOrRef.nativeElement : elementOrRef;\n if (this.observedElements.has(element)) {\n if (this.observer) {\n this.observer.unobserve(element);\n }\n this.observedElements.delete(element);\n }\n }\n\n private handleResize(entries: ResizeObserverEntry[]) {\n entries.forEach((entry) => {\n const action = this.observedElements.get(entry.target);\n if (action) {\n action(entry);\n }\n });\n }\n}\n","import { Directive, HostBinding, Input } from '@angular/core';\n\nimport { ColorHelper } from '@kirbydesign/designsystem/helpers';\nimport { ThemeColor } from '@kirbydesign/core';\n\n@Directive({\n standalone: true,\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: `kirby-avatar[themeColor],\n kirby-card[themeColor],\n kirby-icon[themeColor],\n kirby-progress-circle-ring[themeColor],\n kirby-modal-footer[themeColor],\n kirby-empty-state[themeColor]`,\n})\nexport class ThemeColorDirective {\n private _isDefault = true;\n @HostBinding('class.default')\n get isDefault() {\n return this._isDefault;\n }\n\n private _isPrimary: boolean;\n @HostBinding('class.primary')\n get isPrimary() {\n return this._isPrimary;\n }\n\n private _isSecondary: boolean;\n @HostBinding('class.secondary')\n get isSecondary() {\n return this._isSecondary;\n }\n\n private _isTertiary: boolean;\n @HostBinding('class.tertiary')\n get isTertiary() {\n return this._isTertiary;\n }\n\n private _isSuccess: boolean;\n @HostBinding('class.success')\n get isSuccess() {\n return this._isSuccess;\n }\n\n private _isWarning: boolean;\n @HostBinding('class.warning')\n get isWarning() {\n return this._isWarning;\n }\n\n private _isDanger: boolean;\n @HostBinding('class.danger')\n get isDanger() {\n return this._isDanger;\n }\n\n private _isLight: boolean;\n @HostBinding('class.light')\n get isLight() {\n return this._isLight;\n }\n\n private _isMedium: boolean;\n @HostBinding('class.medium')\n get isMedium() {\n return this._isMedium;\n }\n\n private _isDark: boolean;\n @HostBinding('class.dark')\n get isDark() {\n return this._isDark;\n }\n\n private _isWhite: boolean;\n @HostBinding('class.white')\n get isWhite() {\n return this._isWhite;\n }\n\n private _isBrightnessWhite: boolean;\n @HostBinding('class.kirby-color-brightness-white')\n get isBrightnessWhite() {\n return this._isBrightnessWhite;\n }\n\n private _isBrightnessLight: boolean;\n @HostBinding('class.kirby-color-brightness-light')\n get isBrightnessLight() {\n return this._isBrightnessLight;\n }\n\n private _isBrightnessDark: boolean;\n @HostBinding('class.kirby-color-brightness-dark')\n get isBrightnessDark() {\n return this._isBrightnessDark;\n }\n\n @Input() set themeColor(value: ThemeColor) {\n this._isDefault = !value;\n this._isPrimary = value === 'primary';\n this._isSecondary = value === 'secondary';\n this._isTertiary = value === 'tertiary';\n this._isSuccess = value === 'success';\n this._isWarning = value === 'warning';\n this._isDanger = value === 'danger';\n this._isLight = value === 'light';\n this._isMedium = value === 'medium';\n this._isDark = value === 'dark';\n this._isWhite = value === 'white';\n const colorBrightness = ColorHelper.getColorBrightness(value);\n this._isBrightnessWhite = colorBrightness === 'white';\n this._isBrightnessLight = colorBrightness === 'light';\n this._isBrightnessDark = colorBrightness === 'dark';\n }\n}\n","import {\n ComponentFactoryResolver,\n Directive,\n Input,\n OnInit,\n Renderer2,\n ViewContainerRef,\n} from '@angular/core';\n\nimport { ComponentConfiguration } from './component-configuration';\nimport { DynamicComponent } from './dynamic-component';\n\n@Directive({\n selector: '[kirbyLoadComponent]',\n standalone: true,\n})\nexport class ComponentLoaderDirective implements OnInit {\n // eslint-disable-next-line @angular-eslint/no-input-rename\n @Input('kirbyLoadComponent') configuration: ComponentConfiguration;\n @Input() cssClass: string;\n\n constructor(\n private componentFactoryResolver: ComponentFactoryResolver,\n private viewContainerRef: ViewContainerRef,\n private renderer: Renderer2\n ) {}\n\n ngOnInit() {\n this.loadCard();\n }\n\n loadCard() {\n const componentFactory = this.componentFactoryResolver.resolveComponentFactory(\n this.configuration.component\n );\n this.viewContainerRef.clear();\n const componentRef = this.viewContainerRef.createComponent(componentFactory);\n if (componentRef && componentRef.location && componentRef.location.nativeElement) {\n this.renderer.addClass(componentRef.location.nativeElement, this.cssClass);\n }\n (<DynamicComponent>componentRef.instance).data = this.configuration.data;\n }\n}\n","import { Directive, ElementRef, Input, OnDestroy, OnInit, Renderer2 } from '@angular/core';\n\nimport { DesignTokenHelper } from '@kirbydesign/designsystem/helpers';\nimport { LineClampHelper } from '@kirbydesign/designsystem/helpers';\nimport { ResizeObserverService } from '../resize-observer/resize-observer.service';\n\nconst fontSize = DesignTokenHelper.fontSize;\nconst lineHeight = DesignTokenHelper.lineHeight;\n\ninterface HeadingSize {\n name: string;\n fontSize: string;\n lineHeight: string;\n}\n\nexport interface FitHeadingConfig {\n maxLines: number;\n}\n\n@Directive({\n standalone: true,\n selector: `h1[kirbyFitHeading],h2[kirbyFitHeading],h3[kirbyFitHeading],[kirbyFitHeading]`,\n providers: [LineClampHelper],\n})\nexport class FitHeadingDirective implements OnInit, OnDestroy {\n @Input('kirbyFitHeading') config?: FitHeadingConfig;\n\n private isObservingHostElement: boolean;\n private hostElementClone: Element;\n private isScalingHeader: boolean; // used to prevent resizeObserver to trigger on font scaling by this.scaleHeader()\n\n private headingSizes: HeadingSize[] = [\n {\n name: 'h1',\n fontSize: fontSize('xl'),\n lineHeight: lineHeight('xl'),\n },\n {\n name: 'h2',\n fontSize: fontSize('l'),\n lineHeight: lineHeight('l'),\n },\n {\n name: 'h3',\n fontSize: fontSize('m'),\n lineHeight: lineHeight('m'),\n },\n ];\n\n constructor(\n private elementRef: ElementRef,\n private renderer: Renderer2,\n private resizeObserverService: ResizeObserverService,\n private lineClampHelper: LineClampHelper\n ) {}\n\n ngOnInit(): void {\n if (this.config && this.config.maxLines) {\n this.lineClampHelper.setMaxLines(this.elementRef.nativeElement, this.config.maxLines);\n this.observeResize();\n this.isObservingHostElement = true;\n }\n }\n\n ngOnDestroy(): void {\n if (this.isObservingHostElement) {\n this.resizeObserverService.unobserve(this.elementRef);\n if (this.hostElementClone) {\n this.renderer.removeChild(this.elementRef.nativeElement, this.hostElementClone);\n }\n }\n }\n\n private observeResize(): void {\n this.resizeObserverService.observe(this.elementRef, () => {\n /**\n * setTimeout is used here to avoid repeated size changes\n * while the first size change is still ongoing.\n * This would result in the ResizeObserver being called again,\n * giving 'ResizeObserver loop limit exceeded' types of errors.\n */\n setTimeout(() => {\n this.scaleHeader();\n }, 0);\n });\n }\n\n private scaleHeader(): void {\n if (this.isScalingHeader) return;\n\n this.isScalingHeader = true;\n\n if (!this.hostElementClone) {\n this.hostElementClone = this.generateHostElementClone();\n this.renderer.appendChild(this.elementRef.nativeElement, this.hostElementClone);\n }\n\n this.renderer.setStyle(\n this.hostElementClone,\n 'width',\n `${this.elementRef.nativeElement.clientWidth}px`\n );\n\n const fallbackSize = this.headingSizes[this.headingSizes.length - 1];\n const fittedSize = this.headingSizes.find(this.canFitHeading.bind(this)) || fallbackSize;\n\n this.setSize(this.elementRef.nativeElement, fittedSize);\n this.lineClampHelper.setLineHeight(this.elementRef.nativeElement, fittedSize.lineHeight);\n this.isScalingHeader = false;\n }\n\n private canFitHeading(size: HeadingSize) {\n this.setSize(this.hostElementClone, size);\n const lines = this.hostElementClone.clientHeight / parseInt(size.lineHeight);\n return lines <= this.config.maxLines;\n }\n\n private generateHostElementClone(): Element {\n const clone = this.elementRef.nativeElement.cloneNode(true);\n this.renderer.setStyle(clone, 'position', 'absolute');\n this.renderer.setStyle(clone, 'visibility', 'hidden');\n this.lineClampHelper.removeLineClamp(clone);\n return clone;\n }\n\n private setSize(el: Element, size: HeadingSize): void {\n this.renderer.setStyle(el, 'font-size', size.fontSize);\n this.renderer.setStyle(el, 'line-height', size.lineHeight);\n }\n}\n","import { Renderer2 } from '@angular/core';\n\nexport function findItemLabel(element: HTMLElement): HTMLElement {\n const itemEl = element.closest('kirby-item');\n if (itemEl) {\n return itemEl.querySelector('kirby-label');\n }\n\n return null;\n}\n\nexport function setAccessibleLabel(element: HTMLElement): string {\n const label = findItemLabel(element);\n if (label) {\n label.setAttribute('aria-hidden', 'true');\n return label.textContent;\n }\n}\n\nexport function inheritAriaLabelText(element: HTMLElement): string {\n const attribute = 'aria-label';\n if (element.hasAttribute(attribute)) {\n const value = element.getAttribute(attribute);\n element.removeAttribute(attribute);\n return value;\n }\n}\n\n/**\n * Forwards specified attributes from a source element to a target element.\n *\n * @param sourceElement - The HTML element from which attributes will be removed from.\n * @param attributes - An array of attribute names to inherit from the source element.\n * @param renderer - An instance of Angular's Renderer2.\n * @param targetElement - (Optional) The HTML element to which the attributes should be applied.\n * If not provided, the attributes will only be removed from the source element.\n *\n * @returns A record of the inherited attributes and their values. If no attributes are inherited, an empty object is returned.\n */\nexport function forwardAttributes(\n sourceElement: HTMLElement,\n attributes: string[],\n renderer: Renderer2,\n targetElement?: HTMLElement\n): Record<string, any> {\n const inheritedAttributes: Record<string, any> = {};\n\n if (!sourceElement || !attributes || attributes.length === 0) {\n return inheritedAttributes;\n }\n\n attributes.forEach((attribute) => {\n if (sourceElement.hasAttribute(attribute)) {\n const value = sourceElement.getAttribute(attribute);\n inheritedAttributes[attribute] = value;\n\n if (targetElement) {\n renderer.setAttribute(targetElement, attribute, value);\n }\n\n renderer.removeAttribute(sourceElement, attribute);\n }\n });\n\n return inheritedAttributes;\n}\n","import { Translation } from '../translation.interface';\n\nexport const da: Translation = {\n $code: 'da',\n back: 'Tilbage',\n close: 'Luk',\n nextMonth: 'Næste måned',\n nextSlide: 'Næste slide',\n previousMonth: 'Forrige måned',\n previousSlide: 'Forrige slide',\n selectYear: 'Vælg år',\n readMore: 'Læs mere',\n};\n","import { Translation } from '../translation.interface';\n\nexport const en: Translation = {\n $code: 'en',\n back: 'Back',\n close: 'Close',\n nextMonth: 'Next month',\n nextSlide: 'Next slide',\n previousMonth: 'Previous month',\n previousSlide: 'Previous slide',\n selectYear: 'Select year',\n readMore: 'Read more',\n};\n","import { Translation } from '../translation.interface';\n\nexport const de: Translation = {\n $code: 'de',\n back: 'Zurück',\n close: 'Schließen',\n nextMonth: 'Nächsten Monat',\n nextSlide: 'Zur nächsten Folie',\n previousMonth: 'Letzten Monat',\n previousSlide: 'Zur vorherigen Folie',\n selectYear: 'Jahr auswählen',\n readMore: 'Mehr lesen',\n};\n","import { Injectable } from '@angular/core';\nimport { Inject, LOCALE_ID } from '@angular/core';\nimport { da } from './translations/da';\nimport { en } from './translations/en';\nimport { de } from './translations/de';\nimport { Translation } from './translation.interface';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TranslationService {\n private activeTranslation: Translation = en;\n private translations: { [key: string]: Translation } = { da, en, de };\n\n constructor(@Inject(LOCALE_ID) private localeId: string) {\n this.setActiveTranslation(localeId);\n }\n\n private setActiveTranslation(localeId: string): string {\n const baseLocaleId = localeId.split('-')[0];\n const translation = this.translations[baseLocaleId];\n\n if (!translation) {\n console.warn(\n `[Kirby] Internal component translations were not found for locale \"${this.localeId}\", falling back to ${this.get('$code')}`\n );\n return;\n }\n\n this.activeTranslation = translation;\n }\n\n get(key: keyof Translation): string {\n return this.activeTranslation[key];\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1.ResizeObserverFactory","i1.ResizeObserverService"],"mappings":";;;;;AACA;;;AAGG;MAEU,qBAA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,iBAAiB,CAAC,GAAG,CAAC;;AAvBzB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,kBAIT,SAAS,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAJlB,uBAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,cAFjB,MAAM,EAAA,CAAA,CAAA;;2FAEP,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAH9B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;0BAKc,MAAM;2BAAC,SAAS;;;ACd/B;;AAEG;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i1 from '@angular/common';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { EventEmitter,
|
|
4
|
+
import { EventEmitter, HostListener, Output, Input, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
5
5
|
|
|
6
6
|
class SlideButtonComponent {
|
|
7
7
|
get value() {
|
|
@@ -73,10 +73,10 @@ class SlideButtonComponent {
|
|
|
73
73
|
this.slideDone.emit();
|
|
74
74
|
this.isSlideDone = true;
|
|
75
75
|
}
|
|
76
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
77
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.
|
|
76
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SlideButtonComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
77
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: SlideButtonComponent, isStandalone: true, selector: "kirby-slide-button", inputs: { text: "text", expand: "expand" }, outputs: { slideDone: "slideDone", slidingPercentageChanged: "slidingPercentageChanged" }, host: { listeners: { "keyup.arrowup": "onSliderMouseup($event)", "keyup.arrowdown": "onSliderMouseup($event)", "keyup.arrowleft": "onSliderMouseup($event)", "keyup.arrowright": "onSliderMouseup($event)", "keyup.pageup": "onSliderMouseup($event)", "keyup.pagedown": "onSliderMouseup($event)", "keyup.home": "onSliderMouseup($event)", "keyup.end": "onSliderMouseup($event)", "keydown.arrowup": "onKeyDownEvents($event)", "keydown.arrowdown": "onKeyDownEvents($event)", "keydown.arrowleft": "onKeyDownEvents($event)", "keydown.arrowright": "onKeyDownEvents($event)", "keydown.pageup": "onSliderMousedown($event)", "keydown.pagedown": "onSliderMousedown($event)", "keydown.home": "onSliderMousedown($event)", "keydown.end": "onSliderMousedown($event)" } }, ngImport: i0, template: "<div class=\"slide-button-container\" [ngClass]=\"{ 'slide-done': isSlideDone }\" [inert]=\"isSlideDone\">\n <input\n type=\"range\"\n (mouseup)=\"onSliderMouseup()\"\n (touchend)=\"onSliderMouseup()\"\n (input)=\"onSliderValueChange($event.target.value)\"\n (mousedown)=\"onSliderMousedown()\"\n (touchstart)=\"onSliderMousedown()\"\n class=\"slide-button\"\n [value]=\"value\"\n max=\"100\"\n [step]=\"step\"\n />\n <p class=\"slide-button-text slide-{{ pctInTens }}-pct\">{{ text }}</p>\n</div>\n", styles: [":host{position:relative;display:inline-block;width:256px;-webkit-user-select:none;user-select:none}:host[expand=block]{display:block;width:100%}:host .slide-button-container{width:100%;display:flex;justify-content:center;align-items:center;color:var(--kirby-primary-contrast);background-color:var(--kirby-primary);height:56px;border-radius:26px}:host .slide-10-pct{opacity:.9}:host .slide-20-pct{opacity:.8}:host .slide-30-pct{opacity:.7}:host .slide-40-pct{opacity:.6}:host .slide-50-pct{opacity:.5}:host .slide-60-pct{opacity:.4}:host .slide-70-pct{opacity:.3}:host .slide-80-pct{opacity:.2}:host .slide-90-pct{opacity:.1}:host .slide-100-pct{opacity:0}:host .slide-button-text{position:absolute;font-size:16px;margin:0;line-height:1;z-index:1;width:100%;text-align:center;padding:0 26px 0 56px;pointer-events:none}:host .slide-button{outline:none;width:100%;height:100%;-webkit-appearance:none;appearance:none;background:transparent;z-index:2;pointer-events:none}@media (hover: hover){:host .slide-button::-webkit-slider-thumb:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer;background-color:#ebebeb}}:host .slide-button::-webkit-slider-thumb:active,:host .slide-button::-webkit-slider-thumb .interaction-state-active{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black);background-color:#e0e0e0}:host .slide-button::-webkit-slider-thumb{transition:all 80ms linear 0ms;-webkit-appearance:none;appearance:none;border-radius:50%;background-color:var(--kirby-white);background-image:url(/assets/kirby/icons/svg/arrow-more.svg);background-repeat:no-repeat;background-position:center;background-size:24px;width:52px;height:52px;border:none;pointer-events:all}@media (hover: hover){:host .slide-button::-moz-range-thumb:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer;background-color:#ebebeb}}:host .slide-button::-moz-range-thumb:active,:host .slide-button::-moz-range-thumb .interaction-state-active{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black);background-color:#e0e0e0}:host .slide-button::-moz-range-thumb{transition:all 80ms linear 0ms;-webkit-appearance:none;appearance:none;border-radius:50%;background-color:var(--kirby-white);background-image:url(/assets/kirby/icons/svg/arrow-more.svg);background-repeat:no-repeat;background-position:center;background-size:24px;width:52px;height:52px;border:none;pointer-events:all}:host .slide-button:focus-visible::-webkit-slider-thumb{transition:all 80ms linear 0ms;box-shadow:0 0 0 2px var(--kirby-background-color),0 0 0 4px #4d90fe}:host .slide-done{transition:all .3s ease-in-out;opacity:0;height:0;transform:scale(0);pointer-events:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
78
78
|
}
|
|
79
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
79
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SlideButtonComponent, decorators: [{
|
|
80
80
|
type: Component,
|
|
81
81
|
args: [{ imports: [CommonModule], selector: 'kirby-slide-button', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"slide-button-container\" [ngClass]=\"{ 'slide-done': isSlideDone }\" [inert]=\"isSlideDone\">\n <input\n type=\"range\"\n (mouseup)=\"onSliderMouseup()\"\n (touchend)=\"onSliderMouseup()\"\n (input)=\"onSliderValueChange($event.target.value)\"\n (mousedown)=\"onSliderMousedown()\"\n (touchstart)=\"onSliderMousedown()\"\n class=\"slide-button\"\n [value]=\"value\"\n max=\"100\"\n [step]=\"step\"\n />\n <p class=\"slide-button-text slide-{{ pctInTens }}-pct\">{{ text }}</p>\n</div>\n", styles: [":host{position:relative;display:inline-block;width:256px;-webkit-user-select:none;user-select:none}:host[expand=block]{display:block;width:100%}:host .slide-button-container{width:100%;display:flex;justify-content:center;align-items:center;color:var(--kirby-primary-contrast);background-color:var(--kirby-primary);height:56px;border-radius:26px}:host .slide-10-pct{opacity:.9}:host .slide-20-pct{opacity:.8}:host .slide-30-pct{opacity:.7}:host .slide-40-pct{opacity:.6}:host .slide-50-pct{opacity:.5}:host .slide-60-pct{opacity:.4}:host .slide-70-pct{opacity:.3}:host .slide-80-pct{opacity:.2}:host .slide-90-pct{opacity:.1}:host .slide-100-pct{opacity:0}:host .slide-button-text{position:absolute;font-size:16px;margin:0;line-height:1;z-index:1;width:100%;text-align:center;padding:0 26px 0 56px;pointer-events:none}:host .slide-button{outline:none;width:100%;height:100%;-webkit-appearance:none;appearance:none;background:transparent;z-index:2;pointer-events:none}@media (hover: hover){:host .slide-button::-webkit-slider-thumb:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer;background-color:#ebebeb}}:host .slide-button::-webkit-slider-thumb:active,:host .slide-button::-webkit-slider-thumb .interaction-state-active{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black);background-color:#e0e0e0}:host .slide-button::-webkit-slider-thumb{transition:all 80ms linear 0ms;-webkit-appearance:none;appearance:none;border-radius:50%;background-color:var(--kirby-white);background-image:url(/assets/kirby/icons/svg/arrow-more.svg);background-repeat:no-repeat;background-position:center;background-size:24px;width:52px;height:52px;border:none;pointer-events:all}@media (hover: hover){:host .slide-button::-moz-range-thumb:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer;background-color:#ebebeb}}:host .slide-button::-moz-range-thumb:active,:host .slide-button::-moz-range-thumb .interaction-state-active{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black);background-color:#e0e0e0}:host .slide-button::-moz-range-thumb{transition:all 80ms linear 0ms;-webkit-appearance:none;appearance:none;border-radius:50%;background-color:var(--kirby-white);background-image:url(/assets/kirby/icons/svg/arrow-more.svg);background-repeat:no-repeat;background-position:center;background-size:24px;width:52px;height:52px;border:none;pointer-events:all}:host .slide-button:focus-visible::-webkit-slider-thumb{transition:all 80ms linear 0ms;box-shadow:0 0 0 2px var(--kirby-background-color),0 0 0 4px #4d90fe}:host .slide-done{transition:all .3s ease-in-out;opacity:0;height:0;transform:scale(0);pointer-events:none}\n"] }]
|
|
82
82
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { text: [{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Directive, EventEmitter, TemplateRef,
|
|
2
|
+
import { Directive, EventEmitter, TemplateRef, Output, Input, ContentChild, ViewChild, ChangeDetectionStrategy, Component, CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
|
|
3
3
|
import { register } from 'swiper/element/bundle';
|
|
4
4
|
import * as i1 from '@kirbydesign/designsystem/helpers';
|
|
5
5
|
import { UniqueIdGenerator, DesignTokenHelper } from '@kirbydesign/designsystem/helpers';
|
|
@@ -12,10 +12,10 @@ import * as i5 from '@kirbydesign/designsystem/icon';
|
|
|
12
12
|
import { IconModule } from '@kirbydesign/designsystem/icon';
|
|
13
13
|
|
|
14
14
|
class SlideDirective {
|
|
15
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
16
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.
|
|
15
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SlideDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
16
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.5", type: SlideDirective, isStandalone: false, selector: "[kirbySlide]", ngImport: i0 }); }
|
|
17
17
|
}
|
|
18
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
18
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SlideDirective, decorators: [{
|
|
19
19
|
type: Directive,
|
|
20
20
|
args: [{
|
|
21
21
|
selector: '[kirbySlide]',
|
|
@@ -101,10 +101,10 @@ class SlidesComponent {
|
|
|
101
101
|
getNoControlsConfig() {
|
|
102
102
|
return { ...this.getDefaultConfig(), pagination: false, navigation: false };
|
|
103
103
|
}
|
|
104
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
105
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.
|
|
104
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SlidesComponent, deps: [{ token: i1.PlatformService }, { token: i0.ChangeDetectorRef }, { token: i2.TranslationService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
105
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: SlidesComponent, isStandalone: false, selector: "kirby-slides", inputs: { slidesOptions: "slidesOptions", title: "title", slides: "slides", showNavigation: "showNavigation" }, outputs: { slideChange: "slideChange" }, queries: [{ propertyName: "slideTemplate", first: true, predicate: SlideDirective, descendants: true, read: TemplateRef, static: true }], viewQueries: [{ propertyName: "swiperContainer", first: true, predicate: ["swiperContainer"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"navigation\" *ngIf=\"showNavigation || title !== undefined\">\n <span class=\"kirby-text-medium\">{{ title }}</span>\n\n <div\n class=\"navigation-inner\"\n *ngIf=\"\n showNavigation &&\n (!slidesOptions ||\n slidesOptions?.navigation === undefined ||\n slidesOptions?.pagination === undefined)\n \"\n >\n <div\n class=\"pagination\"\n [ngClass]=\"_paginationId\"\n *ngIf=\"!slidesOptions || slidesOptions?.pagination === undefined\"\n ></div>\n <div\n class=\"buttons\"\n *ngIf=\"!_isTouch && (!slidesOptions || slidesOptions?.navigation === undefined)\"\n >\n <button\n kirby-button\n attentionLevel=\"3\"\n class=\"nav-prev swiper-button-prev\"\n [ngClass]=\"_prevButtonId\"\n size=\"xs\"\n >\n <kirby-icon name=\"arrow-back\"></kirby-icon>\n </button>\n\n <button\n kirby-button\n attentionLevel=\"3\"\n class=\"nav-next swiper-button-next\"\n [ngClass]=\"_nextButtonId\"\n size=\"xs\"\n >\n <kirby-icon name=\"arrow-more\"></kirby-icon>\n </button>\n\n <ng-content select=\"button[kirby-button]\"></ng-content>\n </div>\n </div>\n</div>\n\n<!-- We need to prevent Swiper from initialization by setting init=\"false\" until we pass all required parameters\n https://swiperjs.com/element#parameters-as-props -->\n<swiper-container init=\"false\" #swiperContainer>\n <swiper-slide *ngFor=\"let slide of slides; let i = index\">\n <ng-container\n *ngTemplateOutlet=\"slideTemplate; context: { $implicit: slide, index: i }\"\n ></ng-container>\n </swiper-slide>\n</swiper-container>\n", styles: [":host{--swiper-navigation-sides-offset: 0;--swiper-pagination-bullet-width: 10px;--swiper-pagination-bullet-height: 6px;--swiper-pagination-bullet-border-radius: 3px;--swiper-pagination-bullet-horizontal-gap: 4px;--swiper-pagination-color: var(--kirby-black);--swiper-pagination-bullet-inactive-color: var(--kirby-black);--swiper-pagination-bullet-inactive-opacity: .2}:host .navigation{display:flex;justify-content:space-between;align-items:center;margin-block:0 16px;margin-inline:16px}:host .navigation-inner{display:flex;align-items:center}:host .pagination{display:flex;align-items:center;width:auto;margin-inline-end:16px}:host .pagination ::ng-deep .swiper-pagination-bullet:last-of-type{margin-inline-end:0}:host .buttons{display:none;z-index:2}@media (min-width: 768px){:host .buttons{display:block}}:host .buttons .swiper-button-prev{margin-block:0;margin-inline-start:0}:host .buttons .swiper-button-next{margin-block:0;margin-inline-end:0}:host .buttons ::ng-deep>button[kirby-button]{margin-inline:8px 0}:host .swiper-button-lock{display:none}:host swiper-container{padding-block:24px;margin-block:-24px}@media (max-width: 767px){:host swiper-container{padding-inline:16px;margin-inline:calc(-1 * var(--padding-start)) calc(-1 * var(--padding-end))}:host .navigation,:host .pagination{margin-inline-end:0}}:host .swiper-button-next.swiper-button-disabled,:host .swiper-button-prev.swiper-button-disabled{opacity:1}:host swiper-slide:has([slideStretchHeight]){height:auto}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i4.ButtonComponent, selector: "button[kirby-button],Button[kirby-button],a[kirby-button]", inputs: ["attentionLevel", "noDecoration", "themeColor", "expand", "isFloating", "size", "showIconOnly"] }, { kind: "component", type: i5.IconComponent, selector: "kirby-icon", inputs: ["size", "name"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
106
106
|
}
|
|
107
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
107
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SlidesComponent, decorators: [{
|
|
108
108
|
type: Component,
|
|
109
109
|
args: [{ selector: 'kirby-slides', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div class=\"navigation\" *ngIf=\"showNavigation || title !== undefined\">\n <span class=\"kirby-text-medium\">{{ title }}</span>\n\n <div\n class=\"navigation-inner\"\n *ngIf=\"\n showNavigation &&\n (!slidesOptions ||\n slidesOptions?.navigation === undefined ||\n slidesOptions?.pagination === undefined)\n \"\n >\n <div\n class=\"pagination\"\n [ngClass]=\"_paginationId\"\n *ngIf=\"!slidesOptions || slidesOptions?.pagination === undefined\"\n ></div>\n <div\n class=\"buttons\"\n *ngIf=\"!_isTouch && (!slidesOptions || slidesOptions?.navigation === undefined)\"\n >\n <button\n kirby-button\n attentionLevel=\"3\"\n class=\"nav-prev swiper-button-prev\"\n [ngClass]=\"_prevButtonId\"\n size=\"xs\"\n >\n <kirby-icon name=\"arrow-back\"></kirby-icon>\n </button>\n\n <button\n kirby-button\n attentionLevel=\"3\"\n class=\"nav-next swiper-button-next\"\n [ngClass]=\"_nextButtonId\"\n size=\"xs\"\n >\n <kirby-icon name=\"arrow-more\"></kirby-icon>\n </button>\n\n <ng-content select=\"button[kirby-button]\"></ng-content>\n </div>\n </div>\n</div>\n\n<!-- We need to prevent Swiper from initialization by setting init=\"false\" until we pass all required parameters\n https://swiperjs.com/element#parameters-as-props -->\n<swiper-container init=\"false\" #swiperContainer>\n <swiper-slide *ngFor=\"let slide of slides; let i = index\">\n <ng-container\n *ngTemplateOutlet=\"slideTemplate; context: { $implicit: slide, index: i }\"\n ></ng-container>\n </swiper-slide>\n</swiper-container>\n", styles: [":host{--swiper-navigation-sides-offset: 0;--swiper-pagination-bullet-width: 10px;--swiper-pagination-bullet-height: 6px;--swiper-pagination-bullet-border-radius: 3px;--swiper-pagination-bullet-horizontal-gap: 4px;--swiper-pagination-color: var(--kirby-black);--swiper-pagination-bullet-inactive-color: var(--kirby-black);--swiper-pagination-bullet-inactive-opacity: .2}:host .navigation{display:flex;justify-content:space-between;align-items:center;margin-block:0 16px;margin-inline:16px}:host .navigation-inner{display:flex;align-items:center}:host .pagination{display:flex;align-items:center;width:auto;margin-inline-end:16px}:host .pagination ::ng-deep .swiper-pagination-bullet:last-of-type{margin-inline-end:0}:host .buttons{display:none;z-index:2}@media (min-width: 768px){:host .buttons{display:block}}:host .buttons .swiper-button-prev{margin-block:0;margin-inline-start:0}:host .buttons .swiper-button-next{margin-block:0;margin-inline-end:0}:host .buttons ::ng-deep>button[kirby-button]{margin-inline:8px 0}:host .swiper-button-lock{display:none}:host swiper-container{padding-block:24px;margin-block:-24px}@media (max-width: 767px){:host swiper-container{padding-inline:16px;margin-inline:calc(-1 * var(--padding-start)) calc(-1 * var(--padding-end))}:host .navigation,:host .pagination{margin-inline-end:0}}:host .swiper-button-next.swiper-button-disabled,:host .swiper-button-prev.swiper-button-disabled{opacity:1}:host swiper-slide:has([slideStretchHeight]){height:auto}\n"] }]
|
|
110
110
|
}], ctorParameters: () => [{ type: i1.PlatformService }, { type: i0.ChangeDetectorRef }, { type: i2.TranslationService }], propDecorators: { swiperContainer: [{
|
|
@@ -131,10 +131,10 @@ class SlideStretchHeightDirective {
|
|
|
131
131
|
this.renderer = renderer;
|
|
132
132
|
this.renderer.setStyle(this.elementRef.nativeElement, 'height', '100%');
|
|
133
133
|
}
|
|
134
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
135
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.
|
|
134
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SlideStretchHeightDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
135
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.5", type: SlideStretchHeightDirective, isStandalone: false, selector: "[slideStretchHeight]", ngImport: i0 }); }
|
|
136
136
|
}
|
|
137
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
137
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SlideStretchHeightDirective, decorators: [{
|
|
138
138
|
type: Directive,
|
|
139
139
|
args: [{
|
|
140
140
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -145,11 +145,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
|
|
|
145
145
|
|
|
146
146
|
const declarations = [SlidesComponent, SlideDirective, SlideStretchHeightDirective];
|
|
147
147
|
class SlideModule {
|
|
148
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
149
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.
|
|
150
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.
|
|
148
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SlideModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
149
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.5", ngImport: i0, type: SlideModule, declarations: [SlidesComponent, SlideDirective, SlideStretchHeightDirective], imports: [CommonModule, ButtonComponent, IconModule], exports: [SlidesComponent, SlideDirective, SlideStretchHeightDirective] }); }
|
|
150
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SlideModule, imports: [CommonModule, ButtonComponent, IconModule] }); }
|
|
151
151
|
}
|
|
152
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
152
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SlideModule, decorators: [{
|
|
153
153
|
type: NgModule,
|
|
154
154
|
args: [{
|
|
155
155
|
declarations: [...declarations],
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
4
|
|
|
5
5
|
class SpinnerComponent {
|
|
6
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
7
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.
|
|
6
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: SpinnerComponent, isStandalone: false, selector: "kirby-spinner", ngImport: i0, template: "<div class=\"spinner\">\n <div class=\"inner-circle\"></div>\n <div class=\"outer-circle\"></div>\n</div>\n", styles: [".spinner{overflow:hidden;width:32px;height:32px;position:relative;margin:0 auto}.inner-circle,.outer-circle{width:100%;height:100%;border-radius:50%;background-color:var(--kirby-primary);opacity:.6;position:absolute;top:0;left:0;animation:sk-bounce 2s infinite ease-in-out}.outer-circle{animation-delay:-1s}@keyframes sk-bounce{0%,to{transform:scale(0)}50%{transform:scale(1)}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
8
8
|
}
|
|
9
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
9
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SpinnerComponent, decorators: [{
|
|
10
10
|
type: Component,
|
|
11
11
|
args: [{ selector: 'kirby-spinner', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div class=\"spinner\">\n <div class=\"inner-circle\"></div>\n <div class=\"outer-circle\"></div>\n</div>\n", styles: [".spinner{overflow:hidden;width:32px;height:32px;position:relative;margin:0 auto}.inner-circle,.outer-circle{width:100%;height:100%;border-radius:50%;background-color:var(--kirby-primary);opacity:.6;position:absolute;top:0;left:0;animation:sk-bounce 2s infinite ease-in-out}.outer-circle{animation-delay:-1s}@keyframes sk-bounce{0%,to{transform:scale(0)}50%{transform:scale(1)}}\n"] }]
|
|
12
12
|
}] });
|
|
13
13
|
|
|
14
14
|
class SpinnerModule {
|
|
15
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
16
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.
|
|
17
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.
|
|
15
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SpinnerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
16
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.5", ngImport: i0, type: SpinnerModule, declarations: [SpinnerComponent], imports: [CommonModule], exports: [SpinnerComponent] }); }
|
|
17
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SpinnerModule, imports: [CommonModule] }); }
|
|
18
18
|
}
|
|
19
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: SpinnerModule, decorators: [{
|
|
20
20
|
type: NgModule,
|
|
21
21
|
args: [{
|
|
22
22
|
declarations: [SpinnerComponent],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { Input, ChangeDetectionStrategy, Component, EventEmitter, ElementRef, HostListener, Output, ContentChildren, ViewChild, NgModule } from '@angular/core';
|
|
3
3
|
import * as i1 from '@kirbydesign/designsystem/types';
|
|
4
4
|
import * as i2 from '@kirbydesign/designsystem/dropdown';
|
|
5
5
|
import { CommonModule } from '@angular/common';
|
|
@@ -10,10 +10,10 @@ class TabNavigationItemComponent {
|
|
|
10
10
|
this.truncate = true;
|
|
11
11
|
/* */
|
|
12
12
|
}
|
|
13
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
14
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.
|
|
13
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: TabNavigationItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
14
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: TabNavigationItemComponent, isStandalone: false, selector: "kirby-tab-navigation-item", inputs: { label: "label", truncate: "truncate" }, ngImport: i0, template: "<button role=\"tab\" #tabButton>\n <span attr.data-text=\"{{ label }}\" [class.truncate]=\"truncate\">{{ label }}</span>\n <ng-content></ng-content>\n</button>\n", styles: [":host{position:relative;padding-bottom:2px}:host button[role=tab]{background:transparent;color:inherit;font:inherit;cursor:pointer;display:inline-flex;flex-direction:row;align-items:center;justify-content:center;vertical-align:middle;white-space:nowrap;-webkit-user-select:none;user-select:none;text-decoration:none;margin:0;width:auto;border:none;outline:none;color:var(--kirby-black);box-sizing:border-box;padding:16px;font-size:16px;line-height:24px;gap:4px}:host button[role=tab]:focus,:host button[role=tab]:hover{font-weight:700}:host button[role=tab][aria-selected=true]{font-weight:700}:host button[role=tab][aria-selected=true]:before{content:\"\";width:100%;background-color:var(--kirby-dark);position:absolute;border-radius:1px;height:2px;bottom:0;z-index:2}span[data-text].truncate{max-width:100px;overflow:hidden;text-overflow:ellipsis}span[data-text]:before{display:block;content:attr(data-text);font-weight:700;height:0;overflow:hidden;visibility:hidden}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
15
15
|
}
|
|
16
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
16
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: TabNavigationItemComponent, decorators: [{
|
|
17
17
|
type: Component,
|
|
18
18
|
args: [{ selector: 'kirby-tab-navigation-item', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<button role=\"tab\" #tabButton>\n <span attr.data-text=\"{{ label }}\" [class.truncate]=\"truncate\">{{ label }}</span>\n <ng-content></ng-content>\n</button>\n", styles: [":host{position:relative;padding-bottom:2px}:host button[role=tab]{background:transparent;color:inherit;font:inherit;cursor:pointer;display:inline-flex;flex-direction:row;align-items:center;justify-content:center;vertical-align:middle;white-space:nowrap;-webkit-user-select:none;user-select:none;text-decoration:none;margin:0;width:auto;border:none;outline:none;color:var(--kirby-black);box-sizing:border-box;padding:16px;font-size:16px;line-height:24px;gap:4px}:host button[role=tab]:focus,:host button[role=tab]:hover{font-weight:700}:host button[role=tab][aria-selected=true]{font-weight:700}:host button[role=tab][aria-selected=true]:before{content:\"\";width:100%;background-color:var(--kirby-dark);position:absolute;border-radius:1px;height:2px;bottom:0;z-index:2}span[data-text].truncate{max-width:100px;overflow:hidden;text-overflow:ellipsis}span[data-text]:before{display:block;content:attr(data-text);font-weight:700;height:0;overflow:hidden;visibility:hidden}\n"] }]
|
|
19
19
|
}], ctorParameters: () => [], propDecorators: { label: [{
|
|
@@ -115,10 +115,10 @@ class TabNavigationComponent {
|
|
|
115
115
|
this.setTabElements();
|
|
116
116
|
});
|
|
117
117
|
}
|
|
118
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
119
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.
|
|
118
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: TabNavigationComponent, deps: [{ token: i1.WindowRef }, { token: i2.KeyboardHandlerService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
119
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.5", type: TabNavigationComponent, isStandalone: false, selector: "kirby-tab-navigation", inputs: { selectedIndex: "selectedIndex" }, outputs: { selectedIndexChange: "selectedIndexChange" }, host: { listeners: { "click": "onItemSelect($event)", "keydown.enter": "onItemSelect($event)", "keydown.home": "onKeydown($event)", "keydown.end": "onKeydown($event)", "keydown.arrowright": "onKeydown($event)", "keydown.arrowleft": "onKeydown($event)" } }, queries: [{ propertyName: "tabs", predicate: TabNavigationItemComponent, read: ElementRef }], viewQueries: [{ propertyName: "tabBar", first: true, predicate: ["tabBar"], descendants: true }], ngImport: i0, template: "<div role=\"tablist\" #tabBar>\n <ng-content></ng-content>\n</div>\n", styles: [":host{display:block;position:relative}@media (max-width: 767px){:host{inline-size:100dvi;margin-inline:calc(-1 * var(--padding-start)) calc(-1 * var(--padding-end))}}:host:before{content:\"\";background-color:var(--kirby-medium);position:absolute;height:1px;bottom:0;z-index:1;left:0;width:100%}div[role=tablist]{position:relative;margin:0 auto;display:flex;align-items:center;justify-content:left;flex-wrap:nowrap;overflow-x:scroll;column-gap:12px;-webkit-overflow-scrolling:auto;scrollbar-width:none}div[role=tablist]::-webkit-scrollbar{display:none}@media (max-width: 767px){div[role=tablist]{padding-inline:var(--padding-start) var(--padding-end)}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
120
120
|
}
|
|
121
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
121
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: TabNavigationComponent, decorators: [{
|
|
122
122
|
type: Component,
|
|
123
123
|
args: [{ selector: 'kirby-tab-navigation', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div role=\"tablist\" #tabBar>\n <ng-content></ng-content>\n</div>\n", styles: [":host{display:block;position:relative}@media (max-width: 767px){:host{inline-size:100dvi;margin-inline:calc(-1 * var(--padding-start)) calc(-1 * var(--padding-end))}}:host:before{content:\"\";background-color:var(--kirby-medium);position:absolute;height:1px;bottom:0;z-index:1;left:0;width:100%}div[role=tablist]{position:relative;margin:0 auto;display:flex;align-items:center;justify-content:left;flex-wrap:nowrap;overflow-x:scroll;column-gap:12px;-webkit-overflow-scrolling:auto;scrollbar-width:none}div[role=tablist]::-webkit-scrollbar{display:none}@media (max-width: 767px){div[role=tablist]{padding-inline:var(--padding-start) var(--padding-end)}}\n"] }]
|
|
124
124
|
}], ctorParameters: () => [{ type: i1.WindowRef }, { type: i2.KeyboardHandlerService }], propDecorators: { tabBar: [{
|
|
@@ -152,11 +152,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImpor
|
|
|
152
152
|
}] } });
|
|
153
153
|
|
|
154
154
|
class TabNavigationModule {
|
|
155
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
156
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.
|
|
157
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.
|
|
155
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: TabNavigationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
156
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.5", ngImport: i0, type: TabNavigationModule, declarations: [TabNavigationComponent, TabNavigationItemComponent], imports: [CommonModule], exports: [TabNavigationComponent, TabNavigationItemComponent] }); }
|
|
157
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: TabNavigationModule, imports: [CommonModule] }); }
|
|
158
158
|
}
|
|
159
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
159
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: TabNavigationModule, decorators: [{
|
|
160
160
|
type: NgModule,
|
|
161
161
|
args: [{
|
|
162
162
|
imports: [CommonModule],
|