@kirbydesign/designsystem 11.4.1 → 11.5.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/fesm2022/kirbydesign-designsystem-accordion.mjs +11 -11
- package/fesm2022/kirbydesign-designsystem-accordion.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-action-group.mjs +3 -3
- package/fesm2022/kirbydesign-designsystem-action-group.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-avatar.mjs +3 -3
- package/fesm2022/kirbydesign-designsystem-avatar.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-badge.mjs +3 -3
- package/fesm2022/kirbydesign-designsystem-badge.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-button.mjs +4 -4
- package/fesm2022/kirbydesign-designsystem-button.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-calendar.mjs +3 -3
- package/fesm2022/kirbydesign-designsystem-calendar.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-card.mjs +17 -17
- package/fesm2022/kirbydesign-designsystem-card.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-chart.mjs +22 -22
- package/fesm2022/kirbydesign-designsystem-chart.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-checkbox.mjs +5 -5
- package/fesm2022/kirbydesign-designsystem-checkbox.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-data-table.mjs +7 -7
- package/fesm2022/kirbydesign-designsystem-data-table.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-divider.mjs +3 -3
- package/fesm2022/kirbydesign-designsystem-divider.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-dropdown.mjs +12 -12
- package/fesm2022/kirbydesign-designsystem-dropdown.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-empty-state.mjs +7 -7
- package/fesm2022/kirbydesign-designsystem-empty-state.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-fab-sheet.mjs +4 -4
- package/fesm2022/kirbydesign-designsystem-fab-sheet.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-flag.mjs +3 -3
- package/fesm2022/kirbydesign-designsystem-flag.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-form-field.mjs +132 -113
- package/fesm2022/kirbydesign-designsystem-form-field.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-header.mjs +20 -20
- package/fesm2022/kirbydesign-designsystem-header.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-helpers.mjs +73 -10
- package/fesm2022/kirbydesign-designsystem-helpers.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-icon.mjs +10 -10
- package/fesm2022/kirbydesign-designsystem-icon.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-item-group.mjs +3 -3
- package/fesm2022/kirbydesign-designsystem-item-group.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-item-sliding.mjs +3 -3
- package/fesm2022/kirbydesign-designsystem-item-sliding.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-item.mjs +21 -13
- package/fesm2022/kirbydesign-designsystem-item.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-kirby-app.mjs +7 -7
- package/fesm2022/kirbydesign-designsystem-kirby-app.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-list.mjs +40 -40
- package/fesm2022/kirbydesign-designsystem-list.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-loading-overlay.mjs +6 -6
- package/fesm2022/kirbydesign-designsystem-loading-overlay.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-menu.mjs +16 -9
- package/fesm2022/kirbydesign-designsystem-menu.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-modal.mjs +51 -51
- package/fesm2022/kirbydesign-designsystem-modal.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-page.mjs +41 -41
- package/fesm2022/kirbydesign-designsystem-page.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-popover.mjs +3 -3
- package/fesm2022/kirbydesign-designsystem-popover.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-progress-circle.mjs +6 -6
- package/fesm2022/kirbydesign-designsystem-progress-circle.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-radio.mjs +11 -11
- package/fesm2022/kirbydesign-designsystem-radio.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-range.mjs +5 -5
- package/fesm2022/kirbydesign-designsystem-range.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-reorder-list.mjs +4 -4
- package/fesm2022/kirbydesign-designsystem-reorder-list.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-router-outlet.mjs +7 -7
- package/fesm2022/kirbydesign-designsystem-router-outlet.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-section-header.mjs +3 -3
- package/fesm2022/kirbydesign-designsystem-section-header.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-shared-floating.mjs +4 -4
- package/fesm2022/kirbydesign-designsystem-shared-floating.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-shared-portal.mjs +3 -3
- package/fesm2022/kirbydesign-designsystem-shared-portal.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-shared.mjs +18 -18
- package/fesm2022/kirbydesign-designsystem-shared.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-slide-button.mjs +4 -4
- package/fesm2022/kirbydesign-designsystem-slide-button.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-slide.mjs +14 -14
- package/fesm2022/kirbydesign-designsystem-slide.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-spinner.mjs +7 -7
- package/fesm2022/kirbydesign-designsystem-spinner.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-tab-navigation.mjs +11 -11
- package/fesm2022/kirbydesign-designsystem-tab-navigation.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-tabs.mjs +15 -15
- package/fesm2022/kirbydesign-designsystem-tabs.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-testing-base.mjs +294 -287
- package/fesm2022/kirbydesign-designsystem-testing-base.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-testing-jasmine.mjs +4 -4
- package/fesm2022/kirbydesign-designsystem-testing-jasmine.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-testing-jest.mjs +4 -4
- package/fesm2022/kirbydesign-designsystem-testing-jest.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-testing.mjs +4 -4
- package/fesm2022/kirbydesign-designsystem-testing.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-toast.mjs +6 -6
- package/fesm2022/kirbydesign-designsystem-toast.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-toggle-button.mjs +7 -7
- package/fesm2022/kirbydesign-designsystem-toggle-button.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-toggle.mjs +5 -5
- package/fesm2022/kirbydesign-designsystem-toggle.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-types.mjs +3 -3
- package/fesm2022/kirbydesign-designsystem-types.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem.mjs +15 -15
- package/fesm2022/kirbydesign-designsystem.mjs.map +1 -1
- package/package.json +63 -63
- package/{accordion/index.d.ts → types/kirbydesign-designsystem-accordion.d.ts} +1 -1
- package/types/kirbydesign-designsystem-accordion.d.ts.map +1 -0
- package/{action-group/index.d.ts → types/kirbydesign-designsystem-action-group.d.ts} +1 -1
- package/types/kirbydesign-designsystem-action-group.d.ts.map +1 -0
- package/{avatar/index.d.ts → types/kirbydesign-designsystem-avatar.d.ts} +2 -2
- package/types/kirbydesign-designsystem-avatar.d.ts.map +1 -0
- package/{badge/index.d.ts → types/kirbydesign-designsystem-badge.d.ts} +1 -1
- package/types/kirbydesign-designsystem-badge.d.ts.map +1 -0
- package/{button/index.d.ts → types/kirbydesign-designsystem-button.d.ts} +2 -2
- package/types/kirbydesign-designsystem-button.d.ts.map +1 -0
- package/{calendar/index.d.ts → types/kirbydesign-designsystem-calendar.d.ts} +1 -1
- package/types/kirbydesign-designsystem-calendar.d.ts.map +1 -0
- package/{card/index.d.ts → types/kirbydesign-designsystem-card.d.ts} +2 -2
- package/types/kirbydesign-designsystem-card.d.ts.map +1 -0
- package/{chart/index.d.ts → types/kirbydesign-designsystem-chart.d.ts} +1 -1
- package/types/kirbydesign-designsystem-chart.d.ts.map +1 -0
- package/{checkbox/index.d.ts → types/kirbydesign-designsystem-checkbox.d.ts} +1 -1
- package/types/kirbydesign-designsystem-checkbox.d.ts.map +1 -0
- package/{config/index.d.ts → types/kirbydesign-designsystem-config.d.ts} +1 -1
- package/types/kirbydesign-designsystem-config.d.ts.map +1 -0
- package/{data-table/index.d.ts → types/kirbydesign-designsystem-data-table.d.ts} +1 -1
- package/types/kirbydesign-designsystem-data-table.d.ts.map +1 -0
- package/{divider/index.d.ts → types/kirbydesign-designsystem-divider.d.ts} +1 -1
- package/types/kirbydesign-designsystem-divider.d.ts.map +1 -0
- package/{dropdown/index.d.ts → types/kirbydesign-designsystem-dropdown.d.ts} +1 -1
- package/types/kirbydesign-designsystem-dropdown.d.ts.map +1 -0
- package/{empty-state/index.d.ts → types/kirbydesign-designsystem-empty-state.d.ts} +1 -1
- package/types/kirbydesign-designsystem-empty-state.d.ts.map +1 -0
- package/{fab-sheet/index.d.ts → types/kirbydesign-designsystem-fab-sheet.d.ts} +1 -1
- package/types/kirbydesign-designsystem-fab-sheet.d.ts.map +1 -0
- package/{flag/index.d.ts → types/kirbydesign-designsystem-flag.d.ts} +1 -1
- package/types/kirbydesign-designsystem-flag.d.ts.map +1 -0
- package/{form-field/index.d.ts → types/kirbydesign-designsystem-form-field.d.ts} +21 -24
- package/types/kirbydesign-designsystem-form-field.d.ts.map +1 -0
- package/{header/index.d.ts → types/kirbydesign-designsystem-header.d.ts} +1 -1
- package/types/kirbydesign-designsystem-header.d.ts.map +1 -0
- package/{helpers/scss/index.d.ts → types/kirbydesign-designsystem-helpers-scss.d.ts} +1 -1
- package/types/kirbydesign-designsystem-helpers-scss.d.ts.map +1 -0
- package/{helpers/index.d.ts → types/kirbydesign-designsystem-helpers.d.ts} +81 -13
- package/types/kirbydesign-designsystem-helpers.d.ts.map +1 -0
- package/{icon/index.d.ts → types/kirbydesign-designsystem-icon.d.ts} +1 -1
- package/types/kirbydesign-designsystem-icon.d.ts.map +1 -0
- package/{item-group/index.d.ts → types/kirbydesign-designsystem-item-group.d.ts} +1 -1
- package/types/kirbydesign-designsystem-item-group.d.ts.map +1 -0
- package/{item-sliding/index.d.ts → types/kirbydesign-designsystem-item-sliding.d.ts} +1 -1
- package/types/kirbydesign-designsystem-item-sliding.d.ts.map +1 -0
- package/{item/index.d.ts → types/kirbydesign-designsystem-item.d.ts} +7 -4
- package/types/kirbydesign-designsystem-item.d.ts.map +1 -0
- package/{kirby-app/index.d.ts → types/kirbydesign-designsystem-kirby-app.d.ts} +1 -1
- package/types/kirbydesign-designsystem-kirby-app.d.ts.map +1 -0
- package/{list/index.d.ts → types/kirbydesign-designsystem-list.d.ts} +1 -1
- package/types/kirbydesign-designsystem-list.d.ts.map +1 -0
- package/{loading-overlay/index.d.ts → types/kirbydesign-designsystem-loading-overlay.d.ts} +1 -1
- package/types/kirbydesign-designsystem-loading-overlay.d.ts.map +1 -0
- package/{menu/index.d.ts → types/kirbydesign-designsystem-menu.d.ts} +5 -4
- package/types/kirbydesign-designsystem-menu.d.ts.map +1 -0
- package/{modal/index.d.ts → types/kirbydesign-designsystem-modal.d.ts} +2 -2
- package/types/kirbydesign-designsystem-modal.d.ts.map +1 -0
- package/{page/index.d.ts → types/kirbydesign-designsystem-page.d.ts} +1 -1
- package/types/kirbydesign-designsystem-page.d.ts.map +1 -0
- package/{popover/index.d.ts → types/kirbydesign-designsystem-popover.d.ts} +1 -1
- package/types/kirbydesign-designsystem-popover.d.ts.map +1 -0
- package/{progress-circle/index.d.ts → types/kirbydesign-designsystem-progress-circle.d.ts} +1 -1
- package/types/kirbydesign-designsystem-progress-circle.d.ts.map +1 -0
- package/{radio/index.d.ts → types/kirbydesign-designsystem-radio.d.ts} +1 -1
- package/types/kirbydesign-designsystem-radio.d.ts.map +1 -0
- package/{range/index.d.ts → types/kirbydesign-designsystem-range.d.ts} +1 -1
- package/types/kirbydesign-designsystem-range.d.ts.map +1 -0
- package/{reorder-list/index.d.ts → types/kirbydesign-designsystem-reorder-list.d.ts} +1 -1
- package/types/kirbydesign-designsystem-reorder-list.d.ts.map +1 -0
- package/{router-outlet/index.d.ts → types/kirbydesign-designsystem-router-outlet.d.ts} +1 -1
- package/types/kirbydesign-designsystem-router-outlet.d.ts.map +1 -0
- package/{section-header/index.d.ts → types/kirbydesign-designsystem-section-header.d.ts} +1 -1
- package/types/kirbydesign-designsystem-section-header.d.ts.map +1 -0
- package/{shared/floating/index.d.ts → types/kirbydesign-designsystem-shared-floating.d.ts} +1 -1
- package/types/kirbydesign-designsystem-shared-floating.d.ts.map +1 -0
- package/{shared/portal/index.d.ts → types/kirbydesign-designsystem-shared-portal.d.ts} +1 -1
- package/types/kirbydesign-designsystem-shared-portal.d.ts.map +1 -0
- package/{shared/index.d.ts → types/kirbydesign-designsystem-shared.d.ts} +1 -1
- package/types/kirbydesign-designsystem-shared.d.ts.map +1 -0
- package/{slide-button/index.d.ts → types/kirbydesign-designsystem-slide-button.d.ts} +1 -1
- package/types/kirbydesign-designsystem-slide-button.d.ts.map +1 -0
- package/{slide/index.d.ts → types/kirbydesign-designsystem-slide.d.ts} +1 -1
- package/types/kirbydesign-designsystem-slide.d.ts.map +1 -0
- package/{spinner/index.d.ts → types/kirbydesign-designsystem-spinner.d.ts} +1 -1
- package/types/kirbydesign-designsystem-spinner.d.ts.map +1 -0
- package/{tab-navigation/index.d.ts → types/kirbydesign-designsystem-tab-navigation.d.ts} +1 -1
- package/types/kirbydesign-designsystem-tab-navigation.d.ts.map +1 -0
- package/{tabs/index.d.ts → types/kirbydesign-designsystem-tabs.d.ts} +1 -1
- package/types/kirbydesign-designsystem-tabs.d.ts.map +1 -0
- package/{testing-base/index.d.ts → types/kirbydesign-designsystem-testing-base.d.ts} +5 -3
- package/types/kirbydesign-designsystem-testing-base.d.ts.map +1 -0
- package/{testing-jasmine/index.d.ts → types/kirbydesign-designsystem-testing-jasmine.d.ts} +1 -1
- package/types/kirbydesign-designsystem-testing-jasmine.d.ts.map +1 -0
- package/{testing-jest/index.d.ts → types/kirbydesign-designsystem-testing-jest.d.ts} +1 -1
- package/types/kirbydesign-designsystem-testing-jest.d.ts.map +1 -0
- package/{testing/index.d.ts → types/kirbydesign-designsystem-testing.d.ts} +1 -1
- package/types/kirbydesign-designsystem-testing.d.ts.map +1 -0
- package/{toast/index.d.ts → types/kirbydesign-designsystem-toast.d.ts} +1 -1
- package/types/kirbydesign-designsystem-toast.d.ts.map +1 -0
- package/{toggle-button/index.d.ts → types/kirbydesign-designsystem-toggle-button.d.ts} +1 -1
- package/types/kirbydesign-designsystem-toggle-button.d.ts.map +1 -0
- package/{toggle/index.d.ts → types/kirbydesign-designsystem-toggle.d.ts} +1 -1
- package/types/kirbydesign-designsystem-toggle.d.ts.map +1 -0
- package/types/{index.d.ts → kirbydesign-designsystem-types.d.ts} +1 -1
- package/types/kirbydesign-designsystem-types.d.ts.map +1 -0
- package/{index.d.ts → types/kirbydesign-designsystem.d.ts} +1 -1
- package/types/kirbydesign-designsystem.d.ts.map +1 -0
- package/accordion/index.d.ts.map +0 -1
- package/action-group/index.d.ts.map +0 -1
- package/avatar/index.d.ts.map +0 -1
- package/badge/index.d.ts.map +0 -1
- package/button/index.d.ts.map +0 -1
- package/calendar/index.d.ts.map +0 -1
- package/card/index.d.ts.map +0 -1
- package/chart/index.d.ts.map +0 -1
- package/checkbox/index.d.ts.map +0 -1
- package/config/index.d.ts.map +0 -1
- package/data-table/index.d.ts.map +0 -1
- package/divider/index.d.ts.map +0 -1
- package/dropdown/index.d.ts.map +0 -1
- package/empty-state/index.d.ts.map +0 -1
- package/fab-sheet/index.d.ts.map +0 -1
- package/flag/index.d.ts.map +0 -1
- package/form-field/index.d.ts.map +0 -1
- package/header/index.d.ts.map +0 -1
- package/helpers/index.d.ts.map +0 -1
- package/helpers/scss/index.d.ts.map +0 -1
- package/icon/index.d.ts.map +0 -1
- package/index.d.ts.map +0 -1
- package/item/index.d.ts.map +0 -1
- package/item-group/index.d.ts.map +0 -1
- package/item-sliding/index.d.ts.map +0 -1
- package/kirby-app/index.d.ts.map +0 -1
- package/list/index.d.ts.map +0 -1
- package/loading-overlay/index.d.ts.map +0 -1
- package/menu/index.d.ts.map +0 -1
- package/modal/index.d.ts.map +0 -1
- package/page/index.d.ts.map +0 -1
- package/popover/index.d.ts.map +0 -1
- package/progress-circle/index.d.ts.map +0 -1
- package/radio/index.d.ts.map +0 -1
- package/range/index.d.ts.map +0 -1
- package/reorder-list/index.d.ts.map +0 -1
- package/router-outlet/index.d.ts.map +0 -1
- package/section-header/index.d.ts.map +0 -1
- package/shared/floating/index.d.ts.map +0 -1
- package/shared/index.d.ts.map +0 -1
- package/shared/portal/index.d.ts.map +0 -1
- package/slide/index.d.ts.map +0 -1
- package/slide-button/index.d.ts.map +0 -1
- package/spinner/index.d.ts.map +0 -1
- package/tab-navigation/index.d.ts.map +0 -1
- package/tabs/index.d.ts.map +0 -1
- package/testing/index.d.ts.map +0 -1
- package/testing-base/index.d.ts.map +0 -1
- package/testing-jasmine/index.d.ts.map +0 -1
- package/testing-jest/index.d.ts.map +0 -1
- package/toast/index.d.ts.map +0 -1
- package/toggle/index.d.ts.map +0 -1
- package/toggle-button/index.d.ts.map +0 -1
- package/types/index.d.ts.map +0 -1
|
@@ -47,8 +47,8 @@ class AccordionItemComponent {
|
|
|
47
47
|
this.isExpanded = !this.isExpanded && !this.isDisabled;
|
|
48
48
|
this.toggle.emit(this.isExpanded);
|
|
49
49
|
}
|
|
50
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
51
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
50
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AccordionItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
51
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.6", type: AccordionItemComponent, isStandalone: true, selector: "kirby-accordion-item", inputs: { title: "title", isExpanded: "isExpanded", isDisabled: "isDisabled", disabledTitle: "disabledTitle", hasPadding: "hasPadding", headingLevel: "headingLevel" }, outputs: { toggle: "toggle" }, host: { properties: { "class.has-list": "this.hasList" } }, queries: [{ propertyName: "listChildren", predicate: ListComponent }], usesOnChanges: true, ngImport: i0, template: "<div class=\"content-layer\">\n <div [attr.aria-level]=\"headingLevel\" [attr.role]=\"headingLevel ? 'heading' : null\">\n <button\n type=\"button\"\n class=\"header\"\n [attr.aria-expanded]=\"isExpanded\"\n [attr.aria-controls]=\"_contentId\"\n [id]=\"_titleId\"\n [disabled]=\"isDisabled\"\n (click)=\"_onToggleExpanded($event)\"\n >\n <span class=\"state-layer\" aria-hidden=\"true\"></span>\n <div class=\"title\" [class.bold]=\"isExpanded\">{{ getTitle() }}</div>\n <kirby-icon name=\"arrow-down\"></kirby-icon>\n </button>\n </div>\n <div\n class=\"content\"\n role=\"region\"\n [attr.aria-labelledby]=\"_titleId\"\n [id]=\"_contentId\"\n [@isExpanded]=\"!!isExpanded\"\n >\n <div class=\"content-body\" [class.padding]=\"hasPadding\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n", styles: [":host{--state-layer-opacity: 0;--state-layer-background-color: var(--kirby-black);position:relative}:host .content-layer{position:relative;z-index:var(--content-layer-z-index, 1)}:host .state-layer{position:absolute;inset:0;overflow:hidden;pointer-events:none;border-radius:inherit;z-index:2}:host .state-layer:before{transition:all 80ms linear 0ms;content:\"\";position:absolute;pointer-events:none;inset:0;border-radius:inherit;opacity:var(--state-layer-opacity, 0);background-color:var(--state-layer-background-color, var(--kirby-black))}:host{display:block;border-top:1px solid var(--kirby-medium);border-bottom:1px solid var(--kirby-medium);box-sizing:border-box}:host(.has-list){--kirby-item-background: transparent}@media(hover:hover)and (pointer:fine){.header{outline:0}.header:focus-visible{box-shadow:none;--state-layer-opacity: .04;--state-layer-background-color: var(--kirby-black)}}@media(hover:hover){.header:hover{--state-layer-opacity: .04;--state-layer-background-color: var(--kirby-black);cursor:pointer}}.header:active,.header.interaction-state-active{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black)}.header{display:flex;align-items:center;gap:8px;height:56px;padding-left:16px;padding-right:16px;-webkit-user-select:none;user-select:none;width:100%;border:none;outline:none;background:none;box-shadow:none;font-family:var(--kirby-font-family);text-align:start}.title{flex-grow:2;display:flex;font-size:16px}.kirby-icon{transition:transform .2s}.content{overflow:hidden;cursor:default}.content-body.padding{padding:0 16px 16px}button[disabled]{pointer-events:none}button[disabled] .kirby-icon{color:var(--kirby-semi-dark)}button[disabled] .title{color:var(--kirby-text-color-semi-dark)}button{color:var(--kirby-black)}button[aria-expanded=true] .title{font-weight:700}button[aria-expanded=true] .kirby-icon{transform:rotate(180deg)}:host-context(kirby-accordion):not(:first-child){border-top:none}:host-context(kirby-card){border-color:var(--kirby-background-color)}:host-context(kirby-card):first-child{border-top:none}:host-context(kirby-card):last-child{border-bottom:none}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "kirby-icon", inputs: ["size", "name"] }], animations: [
|
|
52
52
|
trigger('isExpanded', [
|
|
53
53
|
state('true', style({ height: '*', visibility: 'visible' })),
|
|
54
54
|
state('false', style({ height: '0px', visibility: 'hidden' })),
|
|
@@ -56,7 +56,7 @@ class AccordionItemComponent {
|
|
|
56
56
|
]),
|
|
57
57
|
], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
58
58
|
}
|
|
59
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
59
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AccordionItemComponent, decorators: [{
|
|
60
60
|
type: Component,
|
|
61
61
|
args: [{ selector: 'kirby-accordion-item', changeDetection: ChangeDetectionStrategy.OnPush, animations: [
|
|
62
62
|
trigger('isExpanded', [
|
|
@@ -64,7 +64,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
64
64
|
state('false', style({ height: '0px', visibility: 'hidden' })),
|
|
65
65
|
transition('true <=> false', animate('0.2s')),
|
|
66
66
|
]),
|
|
67
|
-
], imports: [IconComponent], template: "<div class=\"content-layer\">\n <div [attr.aria-level]=\"headingLevel\" [attr.role]=\"headingLevel ? 'heading' : null\">\n <button\n type=\"button\"\n class=\"header\"\n [attr.aria-expanded]=\"isExpanded\"\n [attr.aria-controls]=\"_contentId\"\n [id]=\"_titleId\"\n [disabled]=\"isDisabled\"\n (click)=\"_onToggleExpanded($event)\"\n >\n <span class=\"state-layer\" aria-hidden=\"true\"></span>\n <div class=\"title\" [class.bold]=\"isExpanded\">{{ getTitle() }}</div>\n <kirby-icon name=\"arrow-down\"></kirby-icon>\n </button>\n </div>\n <div\n class=\"content\"\n role=\"region\"\n [attr.aria-labelledby]=\"_titleId\"\n [id]=\"_contentId\"\n [@isExpanded]=\"!!isExpanded\"\n >\n <div class=\"content-body\" [class.padding]=\"hasPadding\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n", styles: [":host{--state-layer-opacity: 0;--state-layer-background-color: var(--kirby-black);position:relative}:host .content-layer{position:relative;z-index:var(--content-layer-z-index, 1)}:host .state-layer{position:absolute;inset:0;overflow:hidden;pointer-events:none;border-radius:inherit;z-index:2}:host .state-layer:before{transition:all 80ms linear 0ms;content:\"\";position:absolute;pointer-events:none;inset:0;border-radius:inherit;opacity:var(--state-layer-opacity, 0);background-color:var(--state-layer-background-color, var(--kirby-black))}:host{display:block;border-top:1px solid var(--kirby-medium);border-bottom:1px solid var(--kirby-medium);box-sizing:border-box}:host(.has-list){--kirby-item-background: transparent}@media
|
|
67
|
+
], imports: [IconComponent], template: "<div class=\"content-layer\">\n <div [attr.aria-level]=\"headingLevel\" [attr.role]=\"headingLevel ? 'heading' : null\">\n <button\n type=\"button\"\n class=\"header\"\n [attr.aria-expanded]=\"isExpanded\"\n [attr.aria-controls]=\"_contentId\"\n [id]=\"_titleId\"\n [disabled]=\"isDisabled\"\n (click)=\"_onToggleExpanded($event)\"\n >\n <span class=\"state-layer\" aria-hidden=\"true\"></span>\n <div class=\"title\" [class.bold]=\"isExpanded\">{{ getTitle() }}</div>\n <kirby-icon name=\"arrow-down\"></kirby-icon>\n </button>\n </div>\n <div\n class=\"content\"\n role=\"region\"\n [attr.aria-labelledby]=\"_titleId\"\n [id]=\"_contentId\"\n [@isExpanded]=\"!!isExpanded\"\n >\n <div class=\"content-body\" [class.padding]=\"hasPadding\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n", styles: [":host{--state-layer-opacity: 0;--state-layer-background-color: var(--kirby-black);position:relative}:host .content-layer{position:relative;z-index:var(--content-layer-z-index, 1)}:host .state-layer{position:absolute;inset:0;overflow:hidden;pointer-events:none;border-radius:inherit;z-index:2}:host .state-layer:before{transition:all 80ms linear 0ms;content:\"\";position:absolute;pointer-events:none;inset:0;border-radius:inherit;opacity:var(--state-layer-opacity, 0);background-color:var(--state-layer-background-color, var(--kirby-black))}:host{display:block;border-top:1px solid var(--kirby-medium);border-bottom:1px solid var(--kirby-medium);box-sizing:border-box}:host(.has-list){--kirby-item-background: transparent}@media(hover:hover)and (pointer:fine){.header{outline:0}.header:focus-visible{box-shadow:none;--state-layer-opacity: .04;--state-layer-background-color: var(--kirby-black)}}@media(hover:hover){.header:hover{--state-layer-opacity: .04;--state-layer-background-color: var(--kirby-black);cursor:pointer}}.header:active,.header.interaction-state-active{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black)}.header{display:flex;align-items:center;gap:8px;height:56px;padding-left:16px;padding-right:16px;-webkit-user-select:none;user-select:none;width:100%;border:none;outline:none;background:none;box-shadow:none;font-family:var(--kirby-font-family);text-align:start}.title{flex-grow:2;display:flex;font-size:16px}.kirby-icon{transition:transform .2s}.content{overflow:hidden;cursor:default}.content-body.padding{padding:0 16px 16px}button[disabled]{pointer-events:none}button[disabled] .kirby-icon{color:var(--kirby-semi-dark)}button[disabled] .title{color:var(--kirby-text-color-semi-dark)}button{color:var(--kirby-black)}button[aria-expanded=true] .title{font-weight:700}button[aria-expanded=true] .kirby-icon{transform:rotate(180deg)}:host-context(kirby-accordion):not(:first-child){border-top:none}:host-context(kirby-card){border-color:var(--kirby-background-color)}:host-context(kirby-card):first-child{border-top:none}:host-context(kirby-card):last-child{border-bottom:none}\n"] }]
|
|
68
68
|
}], propDecorators: { hasList: [{
|
|
69
69
|
type: HostBinding,
|
|
70
70
|
args: ['class.has-list']
|
|
@@ -100,10 +100,10 @@ class AccordionDirective {
|
|
|
100
100
|
});
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
104
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
103
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AccordionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
104
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.6", type: AccordionDirective, isStandalone: true, selector: "[kirbyAccordion], kirby-accordion", inputs: { headingLevel: "headingLevel" }, queries: [{ propertyName: "accordionItems", predicate: AccordionItemComponent }], exportAs: ["kirby-accordion"], ngImport: i0 }); }
|
|
105
105
|
}
|
|
106
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
106
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AccordionDirective, decorators: [{
|
|
107
107
|
type: Directive,
|
|
108
108
|
args: [{
|
|
109
109
|
selector: '[kirbyAccordion], kirby-accordion',
|
|
@@ -118,11 +118,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
118
118
|
|
|
119
119
|
const imports = [AccordionDirective, AccordionItemComponent];
|
|
120
120
|
class AccordionModule {
|
|
121
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
122
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
123
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
121
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AccordionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
122
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.6", ngImport: i0, type: AccordionModule, imports: [IconModule, AccordionDirective, AccordionItemComponent], exports: [AccordionDirective, AccordionItemComponent] }); }
|
|
123
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AccordionModule, imports: [IconModule, AccordionItemComponent] }); }
|
|
124
124
|
}
|
|
125
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
125
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AccordionModule, decorators: [{
|
|
126
126
|
type: NgModule,
|
|
127
127
|
args: [{
|
|
128
128
|
imports: [IconModule, ...imports],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kirbydesign-designsystem-accordion.mjs","sources":["../../accordion/src/accordion-item.component.ts","../../accordion/src/accordion-item.component.html","../../accordion/src/accordion.directive.ts","../../accordion/src/accordion.module.ts","../../accordion/src/kirbydesign-designsystem-accordion.ts"],"sourcesContent":["import { animate, state, style, transition, trigger } from '@angular/animations';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n EventEmitter,\n HostBinding,\n Input,\n OnChanges,\n Output,\n QueryList,\n} from '@angular/core';\nimport { ListComponent } from '@kirbydesign/designsystem/list';\nimport { IconComponent } from '@kirbydesign/designsystem/icon';\n\n// Counter for generating unique element ids\nlet uniqueId = 0;\n\n@Component({\n selector: 'kirby-accordion-item',\n templateUrl: './accordion-item.component.html',\n styleUrls: ['./accordion-item.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [\n trigger('isExpanded', [\n state('true', style({ height: '*', visibility: 'visible' })),\n state('false', style({ height: '0px', visibility: 'hidden' })),\n transition('true <=> false', animate('0.2s')),\n ]),\n ],\n imports: [IconComponent],\n})\nexport class AccordionItemComponent implements OnChanges, AfterContentInit {\n @HostBinding('class.has-list') hasList: boolean = false;\n @Input() title: string;\n @Input() isExpanded: boolean = false;\n @Input() isDisabled: boolean = false;\n @Input() disabledTitle: string;\n @Input() hasPadding: boolean = true;\n @Input() headingLevel: 1 | 2 | 3 | 4 | 5 | 6;\n @Output() toggle: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n @ContentChildren(ListComponent) listChildren: QueryList<ListComponent>;\n\n ngAfterContentInit(): void {\n if (this.listChildren.length > 0) {\n this.hasPadding = false;\n this.hasList = true;\n this.listChildren.forEach((child) => {\n child.shape = 'none';\n });\n }\n }\n\n ngOnChanges(): void {\n if (this.isDisabled) {\n this.isExpanded = false;\n }\n }\n\n getTitle() {\n if (this.isDisabled && !!this.disabledTitle) {\n return this.disabledTitle;\n } else {\n return this.title;\n }\n }\n\n _onToggleExpanded(event: UIEvent) {\n event.preventDefault();\n if (this.isDisabled) return;\n\n this.isExpanded = !this.isExpanded && !this.isDisabled;\n this.toggle.emit(this.isExpanded);\n }\n\n // IDs used for a11y labelling\n _titleId = `kirby-accordion-item-title-${++uniqueId}`;\n _contentId = `kirby-accordion-item-content-${uniqueId}`;\n}\n","<div class=\"content-layer\">\n <div [attr.aria-level]=\"headingLevel\" [attr.role]=\"headingLevel ? 'heading' : null\">\n <button\n type=\"button\"\n class=\"header\"\n [attr.aria-expanded]=\"isExpanded\"\n [attr.aria-controls]=\"_contentId\"\n [id]=\"_titleId\"\n [disabled]=\"isDisabled\"\n (click)=\"_onToggleExpanded($event)\"\n >\n <span class=\"state-layer\" aria-hidden=\"true\"></span>\n <div class=\"title\" [class.bold]=\"isExpanded\">{{ getTitle() }}</div>\n <kirby-icon name=\"arrow-down\"></kirby-icon>\n </button>\n </div>\n <div\n class=\"content\"\n role=\"region\"\n [attr.aria-labelledby]=\"_titleId\"\n [id]=\"_contentId\"\n [@isExpanded]=\"!!isExpanded\"\n >\n <div class=\"content-body\" [class.padding]=\"hasPadding\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n","import { AfterContentInit, ContentChildren, Directive, Input, QueryList } from '@angular/core';\n\nimport { startWith } from 'rxjs';\nimport { AccordionItemComponent } from './accordion-item.component';\n\n@Directive({\n selector: '[kirbyAccordion], kirby-accordion',\n exportAs: 'kirby-accordion',\n})\nexport class AccordionDirective implements AfterContentInit {\n @Input() headingLevel: 1 | 2 | 3 | 4 | 5 | 6;\n @ContentChildren(AccordionItemComponent) accordionItems: QueryList<AccordionItemComponent>;\n\n ngAfterContentInit(): void {\n this.accordionItems.changes.pipe(startWith(0)).subscribe(() => {\n this.setHeadingLevels();\n });\n }\n\n private setHeadingLevels(): void {\n if (this.accordionItems.length > 0 && this.headingLevel) {\n this.accordionItems.forEach((child) => {\n child.headingLevel = this.headingLevel;\n });\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { IconModule } from '@kirbydesign/designsystem/icon';\n\nimport { AccordionItemComponent } from './accordion-item.component';\nimport { AccordionDirective } from './accordion.directive';\n\nconst imports = [AccordionDirective, AccordionItemComponent];\n\n@NgModule({\n imports: [IconModule, ...imports],\n exports: [...imports],\n})\nexport class AccordionModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;AAgBA;AACA,IAAI,QAAQ,GAAG,CAAC;MAgBH,sBAAsB,CAAA;AAdnC,IAAA,WAAA,GAAA;QAeiC,IAAA,CAAA,OAAO,GAAY,KAAK;QAE9C,IAAA,CAAA,UAAU,GAAY,KAAK;QAC3B,IAAA,CAAA,UAAU,GAAY,KAAK;QAE3B,IAAA,CAAA,UAAU,GAAY,IAAI;AAEzB,QAAA,IAAA,CAAA,MAAM,GAA0B,IAAI,YAAY,EAAW;;AAqCrE,QAAA,IAAA,CAAA,QAAQ,GAAG,CAAA,2BAAA,EAA8B,EAAE,QAAQ,EAAE;AACrD,QAAA,IAAA,CAAA,UAAU,GAAG,CAAA,6BAAA,EAAgC,QAAQ,CAAA,CAAE;AACxD,IAAA;IAnCC,kBAAkB,GAAA;QAChB,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE;AAChC,YAAA,IAAI,CAAC,UAAU,GAAG,KAAK;AACvB,YAAA,IAAI,CAAC,OAAO,GAAG,IAAI;YACnB,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,KAAK,KAAI;AAClC,gBAAA,KAAK,CAAC,KAAK,GAAG,MAAM;AACtB,YAAA,CAAC,CAAC;QACJ;IACF;IAEA,WAAW,GAAA;AACT,QAAA,IAAI,IAAI,CAAC,UAAU,EAAE;AACnB,YAAA,IAAI,CAAC,UAAU,GAAG,KAAK;QACzB;IACF;IAEA,QAAQ,GAAA;QACN,IAAI,IAAI,CAAC,UAAU,IAAI,CAAC,CAAC,IAAI,CAAC,aAAa,EAAE;YAC3C,OAAO,IAAI,CAAC,aAAa;QAC3B;aAAO;YACL,OAAO,IAAI,CAAC,KAAK;QACnB;IACF;AAEA,IAAA,iBAAiB,CAAC,KAAc,EAAA;QAC9B,KAAK,CAAC,cAAc,EAAE;QACtB,IAAI,IAAI,CAAC,UAAU;YAAE;AAErB,QAAA,IAAI,CAAC,UAAU,GAAG,CAAC,IAAI,CAAC,UAAU,IAAI,CAAC,IAAI,CAAC,UAAU;QACtD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC;IACnC;
|
|
1
|
+
{"version":3,"file":"kirbydesign-designsystem-accordion.mjs","sources":["../../accordion/src/accordion-item.component.ts","../../accordion/src/accordion-item.component.html","../../accordion/src/accordion.directive.ts","../../accordion/src/accordion.module.ts","../../accordion/src/kirbydesign-designsystem-accordion.ts"],"sourcesContent":["import { animate, state, style, transition, trigger } from '@angular/animations';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n EventEmitter,\n HostBinding,\n Input,\n OnChanges,\n Output,\n QueryList,\n} from '@angular/core';\nimport { ListComponent } from '@kirbydesign/designsystem/list';\nimport { IconComponent } from '@kirbydesign/designsystem/icon';\n\n// Counter for generating unique element ids\nlet uniqueId = 0;\n\n@Component({\n selector: 'kirby-accordion-item',\n templateUrl: './accordion-item.component.html',\n styleUrls: ['./accordion-item.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [\n trigger('isExpanded', [\n state('true', style({ height: '*', visibility: 'visible' })),\n state('false', style({ height: '0px', visibility: 'hidden' })),\n transition('true <=> false', animate('0.2s')),\n ]),\n ],\n imports: [IconComponent],\n})\nexport class AccordionItemComponent implements OnChanges, AfterContentInit {\n @HostBinding('class.has-list') hasList: boolean = false;\n @Input() title: string;\n @Input() isExpanded: boolean = false;\n @Input() isDisabled: boolean = false;\n @Input() disabledTitle: string;\n @Input() hasPadding: boolean = true;\n @Input() headingLevel: 1 | 2 | 3 | 4 | 5 | 6;\n @Output() toggle: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n @ContentChildren(ListComponent) listChildren: QueryList<ListComponent>;\n\n ngAfterContentInit(): void {\n if (this.listChildren.length > 0) {\n this.hasPadding = false;\n this.hasList = true;\n this.listChildren.forEach((child) => {\n child.shape = 'none';\n });\n }\n }\n\n ngOnChanges(): void {\n if (this.isDisabled) {\n this.isExpanded = false;\n }\n }\n\n getTitle() {\n if (this.isDisabled && !!this.disabledTitle) {\n return this.disabledTitle;\n } else {\n return this.title;\n }\n }\n\n _onToggleExpanded(event: UIEvent) {\n event.preventDefault();\n if (this.isDisabled) return;\n\n this.isExpanded = !this.isExpanded && !this.isDisabled;\n this.toggle.emit(this.isExpanded);\n }\n\n // IDs used for a11y labelling\n _titleId = `kirby-accordion-item-title-${++uniqueId}`;\n _contentId = `kirby-accordion-item-content-${uniqueId}`;\n}\n","<div class=\"content-layer\">\n <div [attr.aria-level]=\"headingLevel\" [attr.role]=\"headingLevel ? 'heading' : null\">\n <button\n type=\"button\"\n class=\"header\"\n [attr.aria-expanded]=\"isExpanded\"\n [attr.aria-controls]=\"_contentId\"\n [id]=\"_titleId\"\n [disabled]=\"isDisabled\"\n (click)=\"_onToggleExpanded($event)\"\n >\n <span class=\"state-layer\" aria-hidden=\"true\"></span>\n <div class=\"title\" [class.bold]=\"isExpanded\">{{ getTitle() }}</div>\n <kirby-icon name=\"arrow-down\"></kirby-icon>\n </button>\n </div>\n <div\n class=\"content\"\n role=\"region\"\n [attr.aria-labelledby]=\"_titleId\"\n [id]=\"_contentId\"\n [@isExpanded]=\"!!isExpanded\"\n >\n <div class=\"content-body\" [class.padding]=\"hasPadding\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n","import { AfterContentInit, ContentChildren, Directive, Input, QueryList } from '@angular/core';\n\nimport { startWith } from 'rxjs';\nimport { AccordionItemComponent } from './accordion-item.component';\n\n@Directive({\n selector: '[kirbyAccordion], kirby-accordion',\n exportAs: 'kirby-accordion',\n})\nexport class AccordionDirective implements AfterContentInit {\n @Input() headingLevel: 1 | 2 | 3 | 4 | 5 | 6;\n @ContentChildren(AccordionItemComponent) accordionItems: QueryList<AccordionItemComponent>;\n\n ngAfterContentInit(): void {\n this.accordionItems.changes.pipe(startWith(0)).subscribe(() => {\n this.setHeadingLevels();\n });\n }\n\n private setHeadingLevels(): void {\n if (this.accordionItems.length > 0 && this.headingLevel) {\n this.accordionItems.forEach((child) => {\n child.headingLevel = this.headingLevel;\n });\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { IconModule } from '@kirbydesign/designsystem/icon';\n\nimport { AccordionItemComponent } from './accordion-item.component';\nimport { AccordionDirective } from './accordion.directive';\n\nconst imports = [AccordionDirective, AccordionItemComponent];\n\n@NgModule({\n imports: [IconModule, ...imports],\n exports: [...imports],\n})\nexport class AccordionModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;AAgBA;AACA,IAAI,QAAQ,GAAG,CAAC;MAgBH,sBAAsB,CAAA;AAdnC,IAAA,WAAA,GAAA;QAeiC,IAAA,CAAA,OAAO,GAAY,KAAK;QAE9C,IAAA,CAAA,UAAU,GAAY,KAAK;QAC3B,IAAA,CAAA,UAAU,GAAY,KAAK;QAE3B,IAAA,CAAA,UAAU,GAAY,IAAI;AAEzB,QAAA,IAAA,CAAA,MAAM,GAA0B,IAAI,YAAY,EAAW;;AAqCrE,QAAA,IAAA,CAAA,QAAQ,GAAG,CAAA,2BAAA,EAA8B,EAAE,QAAQ,EAAE;AACrD,QAAA,IAAA,CAAA,UAAU,GAAG,CAAA,6BAAA,EAAgC,QAAQ,CAAA,CAAE;AACxD,IAAA;IAnCC,kBAAkB,GAAA;QAChB,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE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AA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;kIAAf,eAAe,EAAA,OAAA,EAAA,CAHhB,UAAU,EAHL,kBAAkB,EAAE,sBAAsB,CAAA,EAAA,OAAA,EAAA,CAA1C,kBAAkB,EAAE,sBAAsB,CAAA,EAAA,CAAA,CAAA;kIAM9C,eAAe,EAAA,OAAA,EAAA,CAHhB,UAAU,EAHe,sBAAsB,CAAA,EAAA,CAAA,CAAA;;2FAM9C,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,GAAG,OAAO,CAAC;AACjC,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACtB,iBAAA;;;ACXD;;AAEG;;;;"}
|
|
@@ -92,10 +92,10 @@ class ActionGroupComponent {
|
|
|
92
92
|
text: button.textContent.trim(),
|
|
93
93
|
}));
|
|
94
94
|
}
|
|
95
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
96
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
95
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ActionGroupComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: ACTIONGROUP_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
96
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: ActionGroupComponent, isStandalone: true, selector: "kirby-action-group", inputs: { visibleActions: "visibleActions", align: "align" }, host: { properties: { "class.is-collapsed": "this._isCollapsed", "class": "this._align" } }, queries: [{ propertyName: "buttonElements", predicate: ButtonComponent, read: ElementRef }, { propertyName: "buttons", predicate: ButtonComponent }], viewQueries: [{ propertyName: "hiddenLayer", first: true, predicate: ["hiddenLayer"], descendants: true, read: ElementRef, static: true }, { propertyName: "menuElement", first: true, predicate: MenuComponent, descendants: true, read: ElementRef, static: true }], usesOnChanges: true, ngImport: i0, template: "<ng-content select=\"button[kirby-button]\"></ng-content>\n\n<kirby-menu [placement]=\"'bottom-end'\">\n @for (action of _collapsedActions; track action.text) {\n <kirby-item\n [selectable]=\"true\"\n [disabled]=\"action.button?.disabled\"\n (click)=\"onActionSelect(action)\"\n >\n {{ action.text }}\n </kirby-item>\n }\n</kirby-menu>\n\n<div class=\"hidden-layer\" #hiddenLayer></div>\n", styles: [":host{display:flex;position:relative;gap:8px}:host(.align-end){justify-content:flex-end}:host(.align-end) .hidden-layer{order:-1}.hidden-layer{display:none;visibility:hidden}kirby-menu{display:none;z-index:1}:host(.is-collapsed) kirby-menu{display:inline-block}\n"], dependencies: [{ kind: "component", type: ItemComponent, selector: "kirby-item", inputs: ["disabled", "selected", "disclosure", "selectable", "reorderable", "size", "href", "rotateIcon"] }, { kind: "component", type: MenuComponent, selector: "kirby-menu", inputs: ["isDisabled", "buttonSize", "placement", "attentionLevel", "triggers", "DOMPortalOutlet", "portalOutletConfig", "autoPlacement", "closeOnSelect", "closeOnEscapeKey", "closeOnBackdrop", "shift", "minWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
97
97
|
}
|
|
98
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
98
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ActionGroupComponent, decorators: [{
|
|
99
99
|
type: Component,
|
|
100
100
|
args: [{ selector: 'kirby-action-group', imports: [ItemComponent, MenuComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content select=\"button[kirby-button]\"></ng-content>\n\n<kirby-menu [placement]=\"'bottom-end'\">\n @for (action of _collapsedActions; track action.text) {\n <kirby-item\n [selectable]=\"true\"\n [disabled]=\"action.button?.disabled\"\n (click)=\"onActionSelect(action)\"\n >\n {{ action.text }}\n </kirby-item>\n }\n</kirby-menu>\n\n<div class=\"hidden-layer\" #hiddenLayer></div>\n", styles: [":host{display:flex;position:relative;gap:8px}:host(.align-end){justify-content:flex-end}:host(.align-end) .hidden-layer{order:-1}.hidden-layer{display:none;visibility:hidden}kirby-menu{display:none;z-index:1}:host(.is-collapsed) kirby-menu{display:inline-block}\n"] }]
|
|
101
101
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: undefined, decorators: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kirbydesign-designsystem-action-group.mjs","sources":["../../action-group/src/action-group.component.ts","../../action-group/src/action-group.component.html","../../action-group/src/kirbydesign-designsystem-action-group.ts"],"sourcesContent":["import {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n ElementRef,\n HostBinding,\n Inject,\n InjectionToken,\n Input,\n OnChanges,\n Optional,\n QueryList,\n Renderer2,\n SimpleChanges,\n ViewChild,\n} from '@angular/core';\nimport { ButtonComponent } from '@kirbydesign/designsystem/button';\nimport { ItemComponent } from '@kirbydesign/designsystem/item';\nimport { MenuComponent } from '@kirbydesign/designsystem/menu';\n\nexport type ActionGroupConfig = {\n isCondensed?: boolean;\n defaultVisibleActions?: number;\n maxVisibleActions?: number;\n};\nexport const ACTIONGROUP_CONFIG = new InjectionToken<ActionGroupConfig>('action-group.config');\n\ntype CollapsedAction = { button: HTMLButtonElement; text: string };\n\n@Component({\n selector: 'kirby-action-group',\n imports: [ItemComponent, MenuComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './action-group.component.html',\n styleUrls: ['./action-group.component.scss'],\n})\nexport class ActionGroupComponent implements AfterContentInit, OnChanges {\n @Input() visibleActions?: number;\n\n @Input()\n align: 'start' | 'end' = 'end';\n\n @ContentChildren(ButtonComponent, { read: ElementRef }) private buttonElements?: QueryList<\n ElementRef<HTMLButtonElement>\n >;\n @ContentChildren(ButtonComponent) private buttons?: QueryList<ButtonComponent>;\n @ViewChild('hiddenLayer', { read: ElementRef, static: true })\n private hiddenLayer!: ElementRef<HTMLElement>;\n\n @ViewChild(MenuComponent, { read: ElementRef, static: true })\n private menuElement!: ElementRef<HTMLElement>;\n\n @HostBinding('class.is-collapsed')\n _isCollapsed: boolean;\n _collapsedActions: CollapsedAction[] = [];\n\n @HostBinding('class')\n get _align() {\n return 'align-' + this.align;\n }\n\n private collapseThreshold = 2;\n\n constructor(\n private elementRef: ElementRef<HTMLElement>,\n private renderer: Renderer2,\n @Optional() @Inject(ACTIONGROUP_CONFIG) private config: ActionGroupConfig\n ) {}\n\n ngAfterContentInit(): void {\n // Ensure we collapse according to visibleActions if lower than our default threshold (2).\n // I.e. if there are 2 buttons and visibleActions = 1 we'll collapse the 2nd button into the menu:\n if (this.visibleActions < this.collapseThreshold) {\n this.collapseThreshold = this.visibleActions;\n }\n\n this.initializeFromConfig();\n\n if (this.visibleActions !== undefined) {\n this.initializeCollapsing();\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.visibleActions && !changes.visibleActions.firstChange) {\n const satifiesMaxVisibleActions =\n this.config?.maxVisibleActions === undefined ||\n this.config?.maxVisibleActions === null ||\n changes.visibleActions.currentValue <= this.config?.maxVisibleActions;\n if (satifiesMaxVisibleActions) {\n this.initializeCollapsing();\n }\n }\n }\n\n onActionSelect(action: CollapsedAction) {\n const event = new PointerEvent('click', {\n bubbles: true,\n cancelable: true,\n view: window,\n });\n\n action.button.dispatchEvent(event);\n }\n\n private initializeFromConfig() {\n if (!this.config) return;\n\n if (this.visibleActions === undefined && this.config.defaultVisibleActions !== undefined) {\n this.visibleActions = this.config.defaultVisibleActions;\n }\n\n if (this.config.maxVisibleActions !== undefined) {\n // Don't overwrite visibleActions value if configured lower than maxVisibleActions:\n if (!(this.visibleActions < this.config.maxVisibleActions)) {\n this.visibleActions = this.config.maxVisibleActions;\n }\n }\n\n if (this.config.isCondensed) {\n this.buttons?.forEach((button) => (button.showIconOnly = true));\n }\n }\n\n private initializeCollapsing() {\n if (this.buttonElements.length <= this.collapseThreshold) return;\n\n this.moveButtons();\n this.populateMenu();\n this.toggleMenu();\n }\n\n private moveButtons() {\n const buttonsToShow = [...this.buttonElements]\n .slice(0, this.visibleActions)\n .filter((btn) => btn.nativeElement.parentElement === this.hiddenLayer.nativeElement);\n buttonsToShow.forEach((button) => {\n this.renderer.insertBefore(\n this.elementRef.nativeElement,\n button.nativeElement,\n this.menuElement.nativeElement\n );\n });\n\n const buttonsToHide = [...this.buttonElements].slice(this.visibleActions);\n buttonsToHide.forEach((button) => {\n this.renderer.appendChild(this.hiddenLayer.nativeElement, button.nativeElement);\n });\n }\n\n private toggleMenu() {\n const hasHiddenButtons = this.hiddenLayer.nativeElement.childElementCount > 0;\n this._isCollapsed = hasHiddenButtons;\n }\n\n private populateMenu() {\n const hiddenButtons = Array.from(\n this.hiddenLayer.nativeElement.children\n ) as HTMLButtonElement[];\n\n this._collapsedActions = hiddenButtons.map((button) => ({\n button,\n text: button.textContent.trim(),\n }));\n }\n}\n","<ng-content select=\"button[kirby-button]\"></ng-content>\n\n<kirby-menu [placement]=\"'bottom-end'\">\n @for (action of _collapsedActions; track action.text) {\n <kirby-item\n [selectable]=\"true\"\n [disabled]=\"action.button?.disabled\"\n (click)=\"onActionSelect(action)\"\n >\n {{ action.text }}\n </kirby-item>\n }\n</kirby-menu>\n\n<div class=\"hidden-layer\" #hiddenLayer></div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;MA0Ba,kBAAkB,GAAG,IAAI,cAAc,CAAoB,qBAAqB;MAWhF,oBAAoB,CAAA;AAoB/B,IAAA,IACI,MAAM,GAAA;AACR,QAAA,OAAO,QAAQ,GAAG,IAAI,CAAC,KAAK;IAC9B;AAIA,IAAA,WAAA,CACU,UAA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AEA;;sBAGA,eAAe;AAAC,gBAAA,IAAA,EAAA,CAAA,eAAe,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE;;sBAGrD,eAAe;uBAAC,eAAe;;sBAC/B,SAAS;uBAAC,aAAa,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE;;sBAG3D,SAAS;uBAAC,aAAa,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE;;sBAG3D,WAAW;uBAAC,oBAAoB;;sBAIhC,WAAW;uBAAC,OAAO;;;AEzDtB;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"kirbydesign-designsystem-action-group.mjs","sources":["../../action-group/src/action-group.component.ts","../../action-group/src/action-group.component.html","../../action-group/src/kirbydesign-designsystem-action-group.ts"],"sourcesContent":["import {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n ElementRef,\n HostBinding,\n Inject,\n InjectionToken,\n Input,\n OnChanges,\n Optional,\n QueryList,\n Renderer2,\n SimpleChanges,\n ViewChild,\n} from '@angular/core';\nimport { ButtonComponent } from '@kirbydesign/designsystem/button';\nimport { ItemComponent } from '@kirbydesign/designsystem/item';\nimport { MenuComponent } from '@kirbydesign/designsystem/menu';\n\nexport type ActionGroupConfig = {\n isCondensed?: boolean;\n defaultVisibleActions?: number;\n maxVisibleActions?: number;\n};\nexport const ACTIONGROUP_CONFIG = new InjectionToken<ActionGroupConfig>('action-group.config');\n\ntype CollapsedAction = { button: HTMLButtonElement; text: string };\n\n@Component({\n selector: 'kirby-action-group',\n imports: [ItemComponent, MenuComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './action-group.component.html',\n styleUrls: ['./action-group.component.scss'],\n})\nexport class ActionGroupComponent implements AfterContentInit, OnChanges {\n @Input() visibleActions?: number;\n\n @Input()\n align: 'start' | 'end' = 'end';\n\n @ContentChildren(ButtonComponent, { read: ElementRef }) private buttonElements?: QueryList<\n ElementRef<HTMLButtonElement>\n >;\n @ContentChildren(ButtonComponent) private buttons?: QueryList<ButtonComponent>;\n @ViewChild('hiddenLayer', { read: ElementRef, static: true })\n private hiddenLayer!: ElementRef<HTMLElement>;\n\n @ViewChild(MenuComponent, { read: ElementRef, static: true })\n private menuElement!: ElementRef<HTMLElement>;\n\n @HostBinding('class.is-collapsed')\n _isCollapsed: boolean;\n _collapsedActions: CollapsedAction[] = [];\n\n @HostBinding('class')\n get _align() {\n return 'align-' + this.align;\n }\n\n private collapseThreshold = 2;\n\n constructor(\n private elementRef: ElementRef<HTMLElement>,\n private renderer: Renderer2,\n @Optional() @Inject(ACTIONGROUP_CONFIG) private config: ActionGroupConfig\n ) {}\n\n ngAfterContentInit(): void {\n // Ensure we collapse according to visibleActions if lower than our default threshold (2).\n // I.e. if there are 2 buttons and visibleActions = 1 we'll collapse the 2nd button into the menu:\n if (this.visibleActions < this.collapseThreshold) {\n this.collapseThreshold = this.visibleActions;\n }\n\n this.initializeFromConfig();\n\n if (this.visibleActions !== undefined) {\n this.initializeCollapsing();\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.visibleActions && !changes.visibleActions.firstChange) {\n const satifiesMaxVisibleActions =\n this.config?.maxVisibleActions === undefined ||\n this.config?.maxVisibleActions === null ||\n changes.visibleActions.currentValue <= this.config?.maxVisibleActions;\n if (satifiesMaxVisibleActions) {\n this.initializeCollapsing();\n }\n }\n }\n\n onActionSelect(action: CollapsedAction) {\n const event = new PointerEvent('click', {\n bubbles: true,\n cancelable: true,\n view: window,\n });\n\n action.button.dispatchEvent(event);\n }\n\n private initializeFromConfig() {\n if (!this.config) return;\n\n if (this.visibleActions === undefined && this.config.defaultVisibleActions !== undefined) {\n this.visibleActions = this.config.defaultVisibleActions;\n }\n\n if (this.config.maxVisibleActions !== undefined) {\n // Don't overwrite visibleActions value if configured lower than maxVisibleActions:\n if (!(this.visibleActions < this.config.maxVisibleActions)) {\n this.visibleActions = this.config.maxVisibleActions;\n }\n }\n\n if (this.config.isCondensed) {\n this.buttons?.forEach((button) => (button.showIconOnly = true));\n }\n }\n\n private initializeCollapsing() {\n if (this.buttonElements.length <= this.collapseThreshold) return;\n\n this.moveButtons();\n this.populateMenu();\n this.toggleMenu();\n }\n\n private moveButtons() {\n const buttonsToShow = [...this.buttonElements]\n .slice(0, this.visibleActions)\n .filter((btn) => btn.nativeElement.parentElement === this.hiddenLayer.nativeElement);\n buttonsToShow.forEach((button) => {\n this.renderer.insertBefore(\n this.elementRef.nativeElement,\n button.nativeElement,\n this.menuElement.nativeElement\n );\n });\n\n const buttonsToHide = [...this.buttonElements].slice(this.visibleActions);\n buttonsToHide.forEach((button) => {\n this.renderer.appendChild(this.hiddenLayer.nativeElement, button.nativeElement);\n });\n }\n\n private toggleMenu() {\n const hasHiddenButtons = this.hiddenLayer.nativeElement.childElementCount > 0;\n this._isCollapsed = hasHiddenButtons;\n }\n\n private populateMenu() {\n const hiddenButtons = Array.from(\n this.hiddenLayer.nativeElement.children\n ) as HTMLButtonElement[];\n\n this._collapsedActions = hiddenButtons.map((button) => ({\n button,\n text: button.textContent.trim(),\n }));\n }\n}\n","<ng-content select=\"button[kirby-button]\"></ng-content>\n\n<kirby-menu [placement]=\"'bottom-end'\">\n @for (action of _collapsedActions; track action.text) {\n <kirby-item\n [selectable]=\"true\"\n [disabled]=\"action.button?.disabled\"\n (click)=\"onActionSelect(action)\"\n >\n {{ action.text }}\n </kirby-item>\n }\n</kirby-menu>\n\n<div class=\"hidden-layer\" #hiddenLayer></div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;MA0Ba,kBAAkB,GAAG,IAAI,cAAc,CAAoB,qBAAqB;MAWhF,oBAAoB,CAAA;AAoB/B,IAAA,IACI,MAAM,GAAA;AACR,QAAA,OAAO,QAAQ,GAAG,IAAI,CAAC,KAAK;IAC9B;AAIA,IAAA,WAAA,CACU,UAAmC,EACnC,QAAmB,EACqB,MAAy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AAA,IAAA,EAAA,CAAA,eAAe,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE;;sBAGrD,eAAe;uBAAC,eAAe;;sBAC/B,SAAS;uBAAC,aAAa,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE;;sBAG3D,SAAS;uBAAC,aAAa,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE;;sBAG3D,WAAW;uBAAC,oBAAoB;;sBAIhC,WAAW;uBAAC,OAAO;;;AEzDtB;;AAEG;;;;"}
|
|
@@ -21,10 +21,10 @@ class AvatarComponent {
|
|
|
21
21
|
onImageError($event) {
|
|
22
22
|
this.imageError.emit($event);
|
|
23
23
|
}
|
|
24
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
25
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
24
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AvatarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
25
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: AvatarComponent, isStandalone: true, selector: "kirby-avatar", inputs: { imageSrc: "imageSrc", imageLoading: "imageLoading", altText: "altText", stroke: "stroke", text: "text", overlay: "overlay", size: "size", themeColor: "themeColor" }, outputs: { imageError: "imageError" }, host: { properties: { "class": "this._cssClass" } }, ngImport: i0, template: "<div class=\"avatar\" [ngClass]=\"{ overlay: overlay, stroke: stroke }\">\n @if (imageSrc) {\n <img\n [src]=\"imageSrc\"\n [attr.alt]=\"altText\"\n [attr.loading]=\"imageLoading\"\n (error)=\"onImageError($event)\"\n />\n }\n @if (!text) {\n <ng-content select=\"kirby-icon\"></ng-content>\n }\n @if (text) {\n <span class=\"avatar-text\">{{ text }}</span>\n }\n</div>\n<ng-content select=\"kirby-badge\"></ng-content>\n", styles: [":host{--kirby-badge-position: absolute;--kirby-badge-right: -2px;--kirby-badge-top: -2px;--kirby-badge-z-index: 2;position:relative}.avatar{width:40px;height:40px;border-radius:50%;overflow:hidden;position:relative;z-index:1;display:flex;justify-content:center;align-items:center;background-color:var(--kirby-white);color:var(--kirby-light-contrast);--kirby-icon-font-size: 24px}.avatar.stroke{border:1px solid var(--kirby-semi-light)}.avatar.overlay:before{content:\"\";background-color:var(--kirby-black);opacity:.05;width:100%;height:100%;position:absolute;top:0;left:0}.avatar img{object-fit:cover;max-width:100%;height:100%;width:100%}:host(.xs) .avatar{width:32px;height:32px;border-radius:8px}:host(.xs) .avatar .avatar-text{font-size:14px}:host-context(kirby-progress-circle.sm) .avatar,:host(.sm) .avatar{width:40px;height:40px}:host-context(kirby-progress-circle.sm) .avatar .avatar-text,:host(.sm) .avatar .avatar-text{font-size:14px}:host-context(kirby-progress-circle.md),:host(.md){--kirby-badge-right: 0px;--kirby-badge-top: 0px}:host-context(kirby-progress-circle.md) .avatar,:host(.md) .avatar{width:56px;height:56px;--kirby-icon-font-size: 32px}:host-context(kirby-progress-circle.md) .avatar .avatar-text,:host(.md) .avatar .avatar-text{font-size:18px}:host-context(kirby-progress-circle.lg),:host(.lg){--kirby-badge-right: 6px;--kirby-badge-top: 6px}:host-context(kirby-progress-circle.lg) .avatar,:host(.lg) .avatar{width:96px;height:96px;--kirby-icon-font-size: 56px}:host-context(kirby-progress-circle.lg) .avatar .avatar-text,:host(.lg) .avatar .avatar-text{font-size:32px}:host-context(kirby-item)[slot=start]{margin-inline-end:12px}:host-context(kirby-item)[slot=start].xs{margin-inline-end:16px}:host(.primary) .avatar{background-color:var(--kirby-primary);color:var(--kirby-primary-contrast)}:host(.secondary) .avatar{background-color:var(--kirby-secondary);color:var(--kirby-secondary-contrast)}:host(.tertiary) .avatar{background-color:var(--kirby-tertiary);color:var(--kirby-tertiary-contrast)}:host(.success) .avatar{background-color:var(--kirby-success);color:var(--kirby-success-contrast)}:host(.warning) .avatar{background-color:var(--kirby-warning);color:var(--kirby-warning-contrast)}:host(.danger) .avatar{background-color:var(--kirby-danger);color:var(--kirby-danger-contrast)}:host(.white-overlay) .avatar{background-color:var(--kirby-white-overlay);color:var(--kirby-white-overlay-contrast)}:host(.light) .avatar{background-color:var(--kirby-light);color:var(--kirby-light-contrast)}:host(.medium) .avatar{background-color:var(--kirby-medium);color:var(--kirby-medium-contrast)}:host(.dark) .avatar{background-color:var(--kirby-dark);color:var(--kirby-dark-contrast)}:host(.dark-overlay) .avatar{background-color:var(--kirby-dark-overlay);color:var(--kirby-dark-overlay-contrast)}:host(.white) .avatar{background-color:var(--kirby-white);color:var(--kirby-white-contrast)}:host(.semi-light) .avatar{background-color:var(--kirby-semi-light);color:var(--kirby-semi-light-contrast)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
26
26
|
}
|
|
27
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
27
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AvatarComponent, decorators: [{
|
|
28
28
|
type: Component,
|
|
29
29
|
args: [{ imports: [CommonModule], selector: 'kirby-avatar', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"avatar\" [ngClass]=\"{ overlay: overlay, stroke: stroke }\">\n @if (imageSrc) {\n <img\n [src]=\"imageSrc\"\n [attr.alt]=\"altText\"\n [attr.loading]=\"imageLoading\"\n (error)=\"onImageError($event)\"\n />\n }\n @if (!text) {\n <ng-content select=\"kirby-icon\"></ng-content>\n }\n @if (text) {\n <span class=\"avatar-text\">{{ text }}</span>\n }\n</div>\n<ng-content select=\"kirby-badge\"></ng-content>\n", styles: [":host{--kirby-badge-position: absolute;--kirby-badge-right: -2px;--kirby-badge-top: -2px;--kirby-badge-z-index: 2;position:relative}.avatar{width:40px;height:40px;border-radius:50%;overflow:hidden;position:relative;z-index:1;display:flex;justify-content:center;align-items:center;background-color:var(--kirby-white);color:var(--kirby-light-contrast);--kirby-icon-font-size: 24px}.avatar.stroke{border:1px solid var(--kirby-semi-light)}.avatar.overlay:before{content:\"\";background-color:var(--kirby-black);opacity:.05;width:100%;height:100%;position:absolute;top:0;left:0}.avatar img{object-fit:cover;max-width:100%;height:100%;width:100%}:host(.xs) .avatar{width:32px;height:32px;border-radius:8px}:host(.xs) .avatar .avatar-text{font-size:14px}:host-context(kirby-progress-circle.sm) .avatar,:host(.sm) .avatar{width:40px;height:40px}:host-context(kirby-progress-circle.sm) .avatar .avatar-text,:host(.sm) .avatar .avatar-text{font-size:14px}:host-context(kirby-progress-circle.md),:host(.md){--kirby-badge-right: 0px;--kirby-badge-top: 0px}:host-context(kirby-progress-circle.md) .avatar,:host(.md) .avatar{width:56px;height:56px;--kirby-icon-font-size: 32px}:host-context(kirby-progress-circle.md) .avatar .avatar-text,:host(.md) .avatar .avatar-text{font-size:18px}:host-context(kirby-progress-circle.lg),:host(.lg){--kirby-badge-right: 6px;--kirby-badge-top: 6px}:host-context(kirby-progress-circle.lg) .avatar,:host(.lg) .avatar{width:96px;height:96px;--kirby-icon-font-size: 56px}:host-context(kirby-progress-circle.lg) .avatar .avatar-text,:host(.lg) .avatar .avatar-text{font-size:32px}:host-context(kirby-item)[slot=start]{margin-inline-end:12px}:host-context(kirby-item)[slot=start].xs{margin-inline-end:16px}:host(.primary) .avatar{background-color:var(--kirby-primary);color:var(--kirby-primary-contrast)}:host(.secondary) .avatar{background-color:var(--kirby-secondary);color:var(--kirby-secondary-contrast)}:host(.tertiary) .avatar{background-color:var(--kirby-tertiary);color:var(--kirby-tertiary-contrast)}:host(.success) .avatar{background-color:var(--kirby-success);color:var(--kirby-success-contrast)}:host(.warning) .avatar{background-color:var(--kirby-warning);color:var(--kirby-warning-contrast)}:host(.danger) .avatar{background-color:var(--kirby-danger);color:var(--kirby-danger-contrast)}:host(.white-overlay) .avatar{background-color:var(--kirby-white-overlay);color:var(--kirby-white-overlay-contrast)}:host(.light) .avatar{background-color:var(--kirby-light);color:var(--kirby-light-contrast)}:host(.medium) .avatar{background-color:var(--kirby-medium);color:var(--kirby-medium-contrast)}:host(.dark) .avatar{background-color:var(--kirby-dark);color:var(--kirby-dark-contrast)}:host(.dark-overlay) .avatar{background-color:var(--kirby-dark-overlay);color:var(--kirby-dark-overlay-contrast)}:host(.white) .avatar{background-color:var(--kirby-white);color:var(--kirby-white-contrast)}:host(.semi-light) .avatar{background-color:var(--kirby-semi-light);color:var(--kirby-semi-light-contrast)}\n"] }]
|
|
30
30
|
}], propDecorators: { imageSrc: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kirbydesign-designsystem-avatar.mjs","sources":["../../avatar/src/avatar.component.ts","../../avatar/src/avatar.component.html","../../avatar/src/kirbydesign-designsystem-avatar.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n HostBinding,\n Input,\n Output,\n} from '@angular/core';\n\nimport { BrandColor, NotificationColor } from '@kirbydesign/core';\n\nexport enum AvatarSize {\n XS = 'xs',\n SM = 'sm',\n MD = 'md',\n LG = 'lg',\n}\n\n@Component({\n imports: [CommonModule],\n selector: 'kirby-avatar',\n templateUrl: './avatar.component.html',\n styleUrls: ['./avatar.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AvatarComponent {\n @Input() imageSrc: string;\n @Input() imageLoading: 'eager' | 'lazy' | undefined;\n @Input() altText: string;\n @Input() stroke: boolean;\n @Input() text: string;\n @Input() overlay: boolean;\n @Input() size: AvatarSize | `${AvatarSize}` = AvatarSize.SM;\n @Input()\n themeColor: NotificationColor | BrandColor | 'medium' | 'white' | 'dark' | 'light' | 'semi-light';\n @Output()\n imageError: EventEmitter<ErrorEvent> = new EventEmitter();\n\n @HostBinding('class')\n get _cssClass() {\n return [this.themeColor, this.size].filter((cssClass) => !!cssClass);\n }\n\n onImageError($event: ErrorEvent) {\n this.imageError.emit($event);\n }\n}\n","<div class=\"avatar\" [ngClass]=\"{ overlay: overlay, stroke: stroke }\">\n @if (imageSrc) {\n <img\n [src]=\"imageSrc\"\n [attr.alt]=\"altText\"\n [attr.loading]=\"imageLoading\"\n (error)=\"onImageError($event)\"\n />\n }\n @if (!text) {\n <ng-content select=\"kirby-icon\"></ng-content>\n }\n @if (text) {\n <span class=\"avatar-text\">{{ text }}</span>\n }\n</div>\n<ng-content select=\"kirby-badge\"></ng-content>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;IAYY;AAAZ,CAAA,UAAY,UAAU,EAAA;AACpB,IAAA,UAAA,CAAA,IAAA,CAAA,GAAA,IAAS;AACT,IAAA,UAAA,CAAA,IAAA,CAAA,GAAA,IAAS;AACT,IAAA,UAAA,CAAA,IAAA,CAAA,GAAA,IAAS;AACT,IAAA,UAAA,CAAA,IAAA,CAAA,GAAA,IAAS;AACX,CAAC,EALW,UAAU,KAAV,UAAU,GAAA,EAAA,CAAA,CAAA;MAcT,eAAe,CAAA;AAP5B,IAAA,WAAA,GAAA;AAcW,QAAA,IAAA,CAAA,IAAI,GAAiC,UAAU,CAAC,EAAE;AAI3D,QAAA,IAAA,CAAA,UAAU,GAA6B,IAAI,YAAY,EAAE;AAU1D,IAAA;AARC,IAAA,IACI,SAAS,GAAA;QACX,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ,CAAC;IACtE;AAEA,IAAA,YAAY,CAAC,MAAkB,EAAA;AAC7B,QAAA,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC;IAC9B;
|
|
1
|
+
{"version":3,"file":"kirbydesign-designsystem-avatar.mjs","sources":["../../avatar/src/avatar.component.ts","../../avatar/src/avatar.component.html","../../avatar/src/kirbydesign-designsystem-avatar.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n HostBinding,\n Input,\n Output,\n} from '@angular/core';\n\nimport { BrandColor, NotificationColor } from '@kirbydesign/core';\n\nexport enum AvatarSize {\n XS = 'xs',\n SM = 'sm',\n MD = 'md',\n LG = 'lg',\n}\n\n@Component({\n imports: [CommonModule],\n selector: 'kirby-avatar',\n templateUrl: './avatar.component.html',\n styleUrls: ['./avatar.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AvatarComponent {\n @Input() imageSrc: string;\n @Input() imageLoading: 'eager' | 'lazy' | undefined;\n @Input() altText: string;\n @Input() stroke: boolean;\n @Input() text: string;\n @Input() overlay: boolean;\n @Input() size: AvatarSize | `${AvatarSize}` = AvatarSize.SM;\n @Input()\n themeColor: NotificationColor | BrandColor | 'medium' | 'white' | 'dark' | 'light' | 'semi-light';\n @Output()\n imageError: EventEmitter<ErrorEvent> = new EventEmitter();\n\n @HostBinding('class')\n get _cssClass() {\n return [this.themeColor, this.size].filter((cssClass) => !!cssClass);\n }\n\n onImageError($event: ErrorEvent) {\n this.imageError.emit($event);\n }\n}\n","<div class=\"avatar\" [ngClass]=\"{ overlay: overlay, stroke: stroke }\">\n @if (imageSrc) {\n <img\n [src]=\"imageSrc\"\n [attr.alt]=\"altText\"\n [attr.loading]=\"imageLoading\"\n (error)=\"onImageError($event)\"\n />\n }\n @if (!text) {\n <ng-content select=\"kirby-icon\"></ng-content>\n }\n @if (text) {\n <span class=\"avatar-text\">{{ text }}</span>\n }\n</div>\n<ng-content select=\"kirby-badge\"></ng-content>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;IAYY;AAAZ,CAAA,UA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AAA,EC1B5B,4cAiBA,EAAA,MAAA,EAAA,CAAA,g9FAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDGY,YAAY,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAMX,eAAe,EAAA,UAAA,EAAA,CAAA;kBAP3B,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAC,YAAY,CAAC,EAAA,QAAA,EACb,cAAc,EAAA,eAAA,EAGP,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,4cAAA,EAAA,MAAA,EAAA,CAAA,g9FAAA,CAAA,EAAA;;sBAG9C;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBAEA;;sBAGA,WAAW;uBAAC,OAAO;;;AEvCtB;;AAEG;;;;"}
|
|
@@ -20,10 +20,10 @@ class BadgeComponent {
|
|
|
20
20
|
console.warn(KIRBY_BADGE_TEXT_PROPERTY_DEPRECATION_WARNING);
|
|
21
21
|
this._text = value;
|
|
22
22
|
}
|
|
23
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
24
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
23
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
24
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: BadgeComponent, isStandalone: true, selector: "kirby-badge", inputs: { text: "text", size: "size" }, host: { properties: { "class": "this.size" } }, hostDirectives: [{ directive: i1.ThemeColorDirective, inputs: ["themeColor", "themeColor"] }], ngImport: i0, template: "<ion-badge>\n @if (size === 'sm') {\n <span></span>\n }\n @if (!text && size === 'md') {\n <ng-content></ng-content>\n }\n @if (text && size === 'md') {\n {{ text }}\n }\n</ion-badge>\n", styles: [":host{position:var(--kirby-badge-position, relative);left:var(--kirby-badge-left, auto);right:var(--kirby-badge-right, auto);top:var(--kirby-badge-top, auto);z-index:var(--kirby-badge-z-index, auto);font-size:10px;line-height:1}:host ion-badge{--background: var(--kirby-badge-background-color, var(--kirby-white));--color: var(--kirby-badge-color, var(--kirby-white-contrast));box-sizing:border-box;border-radius:8px;font-size:inherit;position:relative;box-shadow:var(--kirby-badge-elevation, none)}:host ion-badge ::ng-deep>kirby-icon{--kirby-icon-font-size: 16px;position:absolute;top:0;left:0}:host.success ion-badge{--color: var(--kirby-success-contrast)}:host.success.sm ion-badge{--background: var(--kirby-success-shade)}:host.success.md ion-badge{--background: var(--kirby-success-tint)}:host.warning ion-badge{--color: var(--kirby-warning-contrast)}:host.warning.sm ion-badge{--background: var(--kirby-warning-shade)}:host.warning.md ion-badge{--background: var(--kirby-warning)}:host.danger ion-badge{--color: var(--kirby-text-color-white)}:host.danger.sm ion-badge{--background: var(--kirby-danger)}:host.danger.md ion-badge{--background: var(--kirby-danger-shade)}:host.danger.md ion-badge:has(kirby-icon){--background: var(--kirby-danger)}:host(.sm) ion-badge{padding:initial;min-height:initial;min-width:initial;height:8px;width:8px}:host(.md) ion-badge{--padding-top: 3px;--padding-end: 5px;--padding-bottom: 3px;--padding-start: 5px;min-width:16px;min-height:16px}:host(.default) ion-badge,:host(.white) ion-badge{--kirby-badge-elevation: 0 20px 30px -15px rgb(28 28 28 / 30%), 0 0 5px 0 rgb(28 28 28 / 12%)}\n"], dependencies: [{ kind: "component", type: IonBadge, selector: "ion-badge", inputs: ["color", "mode"] }] }); }
|
|
25
25
|
}
|
|
26
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BadgeComponent, decorators: [{
|
|
27
27
|
type: Component,
|
|
28
28
|
args: [{ selector: 'kirby-badge', imports: [IonBadge], hostDirectives: [{ directive: ThemeColorDirective, inputs: ['themeColor'] }], template: "<ion-badge>\n @if (size === 'sm') {\n <span></span>\n }\n @if (!text && size === 'md') {\n <ng-content></ng-content>\n }\n @if (text && size === 'md') {\n {{ text }}\n }\n</ion-badge>\n", styles: [":host{position:var(--kirby-badge-position, relative);left:var(--kirby-badge-left, auto);right:var(--kirby-badge-right, auto);top:var(--kirby-badge-top, auto);z-index:var(--kirby-badge-z-index, auto);font-size:10px;line-height:1}:host ion-badge{--background: var(--kirby-badge-background-color, var(--kirby-white));--color: var(--kirby-badge-color, var(--kirby-white-contrast));box-sizing:border-box;border-radius:8px;font-size:inherit;position:relative;box-shadow:var(--kirby-badge-elevation, none)}:host ion-badge ::ng-deep>kirby-icon{--kirby-icon-font-size: 16px;position:absolute;top:0;left:0}:host.success ion-badge{--color: var(--kirby-success-contrast)}:host.success.sm ion-badge{--background: var(--kirby-success-shade)}:host.success.md ion-badge{--background: var(--kirby-success-tint)}:host.warning ion-badge{--color: var(--kirby-warning-contrast)}:host.warning.sm ion-badge{--background: var(--kirby-warning-shade)}:host.warning.md ion-badge{--background: var(--kirby-warning)}:host.danger ion-badge{--color: var(--kirby-text-color-white)}:host.danger.sm ion-badge{--background: var(--kirby-danger)}:host.danger.md ion-badge{--background: var(--kirby-danger-shade)}:host.danger.md ion-badge:has(kirby-icon){--background: var(--kirby-danger)}:host(.sm) ion-badge{padding:initial;min-height:initial;min-width:initial;height:8px;width:8px}:host(.md) ion-badge{--padding-top: 3px;--padding-end: 5px;--padding-bottom: 3px;--padding-start: 5px;min-width:16px;min-height:16px}:host(.default) ion-badge,:host(.white) ion-badge{--kirby-badge-elevation: 0 20px 30px -15px rgb(28 28 28 / 30%), 0 0 5px 0 rgb(28 28 28 / 12%)}\n"] }]
|
|
29
29
|
}], propDecorators: { text: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kirbydesign-designsystem-badge.mjs","sources":["../../badge/src/badge.component.ts","../../badge/src/badge.component.html","../../badge/src/kirbydesign-designsystem-badge.ts"],"sourcesContent":["import { Component, HostBinding, Input } from '@angular/core';\nimport { ThemeColorDirective } from '@kirbydesign/designsystem/shared';\nimport { IonBadge } from '@ionic/angular/standalone';\n\nexport type BadgeSize = 'sm' | 'md';\n\nconst KIRBY_BADGE_TEXT_PROPERTY_DEPRECATION_WARNING =\n '[Kirby Badge] The `text` property has been deprecated. Please set the text of the Badge between the opening and closing tag.';\n\n@Component({\n selector: 'kirby-badge',\n templateUrl: './badge.component.html',\n styleUrls: ['./badge.component.scss'],\n imports: [IonBadge],\n hostDirectives: [{ directive: ThemeColorDirective, inputs: ['themeColor'] }],\n})\nexport class BadgeComponent {\n private _text: string;\n get text(): string {\n return this._text;\n }\n /**\n * @deprecated The 'text' property has been deprecated.\n * Please set the text of the Badge between the opening and closing tag.\n */\n @Input() set text(value: string) {\n console.warn(KIRBY_BADGE_TEXT_PROPERTY_DEPRECATION_WARNING);\n this._text = value;\n }\n\n @HostBinding('class')\n @Input()\n size: BadgeSize = 'md';\n}\n","<ion-badge>\n @if (size === 'sm') {\n <span></span>\n }\n @if (!text && size === 'md') {\n <ng-content></ng-content>\n }\n @if (text && size === 'md') {\n {{ text }}\n }\n</ion-badge>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;AAMA,MAAM,6CAA6C,GACjD,8HAA8H;MASnH,cAAc,CAAA;AAP3B,IAAA,WAAA,GAAA;QAuBE,IAAA,CAAA,IAAI,GAAc,IAAI;AACvB,IAAA;AAfC,IAAA,IAAI,IAAI,GAAA;QACN,OAAO,IAAI,CAAC,KAAK;IACnB;AACA;;;AAGG;IACH,IAAa,IAAI,CAAC,KAAa,EAAA;AAC7B,QAAA,OAAO,CAAC,IAAI,CAAC,6CAA6C,CAAC;AAC3D,QAAA,IAAI,CAAC,KAAK,GAAG,KAAK;IACpB;
|
|
1
|
+
{"version":3,"file":"kirbydesign-designsystem-badge.mjs","sources":["../../badge/src/badge.component.ts","../../badge/src/badge.component.html","../../badge/src/kirbydesign-designsystem-badge.ts"],"sourcesContent":["import { Component, HostBinding, Input } from '@angular/core';\nimport { ThemeColorDirective } from '@kirbydesign/designsystem/shared';\nimport { IonBadge } from '@ionic/angular/standalone';\n\nexport type BadgeSize = 'sm' | 'md';\n\nconst KIRBY_BADGE_TEXT_PROPERTY_DEPRECATION_WARNING =\n '[Kirby Badge] The `text` property has been deprecated. Please set the text of the Badge between the opening and closing tag.';\n\n@Component({\n selector: 'kirby-badge',\n templateUrl: './badge.component.html',\n styleUrls: ['./badge.component.scss'],\n imports: [IonBadge],\n hostDirectives: [{ directive: ThemeColorDirective, inputs: ['themeColor'] }],\n})\nexport class BadgeComponent {\n private _text: string;\n get text(): string {\n return this._text;\n }\n /**\n * @deprecated The 'text' property has been deprecated.\n * Please set the text of the Badge between the opening and closing tag.\n */\n @Input() set text(value: string) {\n console.warn(KIRBY_BADGE_TEXT_PROPERTY_DEPRECATION_WARNING);\n this._text = value;\n }\n\n @HostBinding('class')\n @Input()\n size: BadgeSize = 'md';\n}\n","<ion-badge>\n @if (size === 'sm') {\n <span></span>\n }\n @if (!text && size === 'md') {\n <ng-content></ng-content>\n }\n @if (text && size === 'md') {\n {{ text }}\n }\n</ion-badge>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;AAMA,MAAM,6CAA6C,GACjD,8HAA8H;MASnH,cAAc,CAAA;AAP3B,IAAA,WAAA,GAAA;QAuBE,IAAA,CAAA,IAAI,GAAc,IA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;;sBAKA,WAAW;uBAAC,OAAO;;sBACnB;;;AE/BH;;AAEG;;;;"}
|
|
@@ -122,12 +122,12 @@ class ButtonComponent {
|
|
|
122
122
|
ngOnDestroy() {
|
|
123
123
|
this.disposeEventListeners.forEach((unlistenEvent) => unlistenEvent());
|
|
124
124
|
}
|
|
125
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
126
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: ButtonComponent, isStandalone: true, selector: "button[kirby-button],Button[kirby-button],a[kirby-button]", inputs: { attentionLevel: "attentionLevel", noDecoration: "noDecoration", themeColor: "themeColor", expand: "expand", isFloating: "isFloating", size: "size", showIconOnly: "showIconOnly" }, host: { properties: { "class.no-decoration": "this.noDecoration", "class.floating": "this.isButtonFloating", "class.icon-only": "this.isIconOnly", "class.icon-left": "this.isIconLeft", "class.icon-right": "this.isIconRight", "class": "this._cssClass" } }, queries: [{ propertyName: "iconElementRef", first: true, predicate: IconComponent, descendants: true, read: ElementRef }], ngImport: i0, template: "<ng-container>\n <span class=\"state-layer\" aria-hidden=\"true\"></span>\n <span class=\"content-layer\"><ng-content></ng-content></span>\n</ng-container>\n<!--\n TODO: Fix globally exposed .state-layer and .content-layer\n \n See: https://github.com/kirbydesign/designsystem/issues/2101\n-->\n", styles: [":host{--kirby-button-padding-left: 24px;--kirby-button-padding-right: 24px;flex-shrink:0}:host{position:relative}:host:after{content:\"\";position:absolute;min-height:44px;min-width:44px;width:100%;height:100%;transform:translate(-50%,-50%);left:50%;top:50%}@media (hover: hover) and (pointer: fine){:host:focus{transition:all 80ms linear 0ms;box-shadow:0 0 0 2px var(--kirby-background-color),0 0 0 4px #4d90fe}:host:focus:not(:focus-visible){box-shadow:0 0 0 0 transparent}:host:focus-visible{transition:all 80ms linear 0ms;box-shadow:0 0 0 2px var(--kirby-background-color),0 0 0 4px #4d90fe}}:host{--state-layer-opacity: 0;--state-layer-background-color: var(--kirby-black);position:relative}:host .content-layer{position:relative;z-index:var(--content-layer-z-index, 1)}:host .state-layer{position:absolute;inset:0;overflow:hidden;pointer-events:none;border-radius:inherit;z-index:2}:host .state-layer:before{transition:all 80ms linear 0ms;content:\"\";position:absolute;pointer-events:none;inset:0;border-radius:inherit;opacity:var(--state-layer-opacity, 0);background-color:var(--state-layer-background-color, var(--kirby-black))}@media (hover: hover){:host:hover{--state-layer-opacity: .04;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host:active,:host.interaction-state-active{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black)}:host .content-layer{display:inherit;width:inherit;flex-direction:inherit;align-items:inherit;justify-content:inherit;padding-inline:var(--kirby-button-padding-left) var(--kirby-button-padding-right)}:host{font-family:var(--kirby-font-family);background-color:var(--kirby-button-background-color, initial);color:var(--kirby-button-color, inherit);border-radius:999px;box-sizing:border-box;display:inline-flex;flex-direction:row;align-items:center;justify-content:center;-webkit-user-select:none;user-select:none;vertical-align:middle;white-space:nowrap;font-size:14px;height:40px;min-width:88px;padding:0;margin:4px;line-height:20px;outline:none;border:none}:host.no-margin{margin:0}:host.icon-left{--kirby-icon-margin-right: 8px;--kirby-button-padding-left: 12px;--kirby-button-padding-right: 16px;padding:0}:host.icon-right{--kirby-icon-margin-left: 8px;--kirby-button-padding-left: 16px;--kirby-button-padding-right: 12px;padding:0}:host.icon-only{--kirby-button-padding-left: 0;--kirby-button-padding-right: 0;width:40px;padding:0;min-width:unset}:host.icon-only .content-layer ::ng-deep>:not(kirby-icon){position:absolute;scale:0}:host.xs{position:relative}:host.xs:after{content:\"\";position:absolute;min-height:32px;min-width:32px;width:100%;height:100%;transform:translate(-50%,-50%);left:50%;top:50%}:host.xs{font-size:12px;height:24px;min-width:44px}:host.xs:not(.icon-only){--kirby-button-padding-left: 12px;--kirby-button-padding-right: 12px}:host.xs.icon-only{--kirby-icon-font-size: 16px;width:24px;min-width:unset}:host.xs.icon-left{--kirby-button-padding-left: 8px;--kirby-icon-margin-right: 4px}:host.xs.icon-right{--kirby-button-padding-right: 8px;--kirby-icon-margin-left: 4px}:host.xs.icon-left,:host.xs.icon-right{--kirby-icon-font-size: 16px;min-width:44px}:host.sm{font-size:12px;height:32px;min-width:44px}:host.sm:not(.icon-only){--kirby-button-padding-left: 16px;--kirby-button-padding-right: 16px}:host.sm.icon-only{--kirby-icon-font-size: 16px;width:32px;min-width:unset}:host.sm.icon-left{--kirby-button-padding-left: 12px}:host.sm.icon-right{--kirby-button-padding-right: 12px}:host.sm.icon-left,:host.sm.icon-right{--kirby-icon-font-size: 16px;min-width:88px}:host.lg{font-size:16px;height:48px;min-width:220px}:host.lg.icon-only{width:48px;min-width:unset}:host.no-decoration{--kirby-button-background-color: transparent;--kirby-button-color: var(--kirby-black)}@media (hover: hover){:host.no-decoration:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host.no-decoration:active,:host.no-decoration.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host.attention-level1{--kirby-button-background-color: var(--kirby-primary);--kirby-button-color: var(--kirby-primary-contrast)}:host.attention-level1.destructive{--kirby-button-background-color: var(--kirby-danger);--kirby-button-color: var(--kirby-danger-contrast)}:host.attention-level2{--kirby-button-background-color: var(--kirby-black);--kirby-button-color: var(--kirby-black-contrast)}@media (hover: hover){:host.attention-level2:hover{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black-contrast);cursor:pointer}}:host.attention-level2:active,:host.attention-level2.interaction-state-active{--state-layer-opacity: .2;--state-layer-background-color: var(--kirby-black-contrast)}:host.attention-level3{--kirby-button-background-color: var(--kirby-inputs-background-color);--kirby-button-color: var(--kirby-inputs-color)}@media (hover: hover){:host.attention-level3:hover{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host.attention-level3:active,:host.attention-level3.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host.attention-level3 .state-layer{box-shadow:var(--kirby-inputs-elevation)}:host[expand=block]{width:100%}:host:disabled,:host[aria-disabled=true]{color:var(--kirby-semi-dark-shade);border-color:transparent;pointer-events:none}:host:disabled:not(.no-decoration),:host[aria-disabled=true]:not(.no-decoration){background-color:var(--kirby-semi-light)}:host.floating{width:64px!important;height:64px!important;min-width:unset}:host.floating:not(:disabled){box-shadow:0 20px 30px -15px #1c1c1c4d,0 0 5px #1c1c1c14}:host(a){text-decoration:none}:host-context(.kirby-color-brightness-dark).no-decoration{--kirby-button-color: var(--kirby-white)}@media (hover: hover){:host-context(.kirby-color-brightness-dark).no-decoration:hover{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black-contrast);cursor:pointer}}:host-context(.kirby-color-brightness-dark).no-decoration:active,:host-context(.kirby-color-brightness-dark).no-decoration.interaction-state-active{--state-layer-opacity: .2;--state-layer-background-color: var(--kirby-black-contrast)}:host-context(.kirby-color-brightness-dark).attention-level2{--kirby-button-background-color: var(--kirby-white);--kirby-button-color: var(--kirby-white-contrast)}@media (hover: hover){:host-context(.kirby-color-brightness-dark).attention-level2:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host-context(.kirby-color-brightness-dark).attention-level2:active,:host-context(.kirby-color-brightness-dark).attention-level2.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}@media (hover: hover){:host-context(.kirby-color-brightness-dark).attention-level3:hover{--state-layer-opacity: .04;--state-layer-background-color: var(--kirby-black-contrast);cursor:pointer}}:host-context(.kirby-color-brightness-dark).attention-level3:active,:host-context(.kirby-color-brightness-dark).attention-level3.interaction-state-active{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black-contrast)}:host-context(kirby-item)[slot=end]{margin-inline:16px 0}:host-context(kirby-dropdown){justify-content:space-between}:host-context(ion-toolbar ion-buttons.legacy-actions){font-size:14px;height:40px}:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only{width:40px}:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.no-decoration,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level1,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level2,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level3{--kirby-button-background-color: var(--kirby-inputs-background-color);--kirby-button-color: var(--kirby-inputs-color)}@media (hover: hover){:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.no-decoration:hover,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level1:hover,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level2:hover,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level3:hover{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.no-decoration:active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.no-decoration.interaction-state-active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level1:active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level1.interaction-state-active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level2:active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level2.interaction-state-active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level3:active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level3.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host-context(.page-title kirby-page-actions).no-decoration,:host-context(.page-title kirby-page-actions).attention-level1,:host-context(.page-title kirby-page-actions).attention-level2,:host-context(.page-title kirby-page-actions).attention-level3{--kirby-button-background-color: var(--kirby-inputs-background-color);--kirby-button-color: var(--kirby-inputs-color)}@media (hover: hover){:host-context(.page-title kirby-page-actions).no-decoration:hover,:host-context(.page-title kirby-page-actions).attention-level1:hover,:host-context(.page-title kirby-page-actions).attention-level2:hover,:host-context(.page-title kirby-page-actions).attention-level3:hover{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host-context(.page-title kirby-page-actions).no-decoration:active,:host-context(.page-title kirby-page-actions).no-decoration.interaction-state-active,:host-context(.page-title kirby-page-actions).attention-level1:active,:host-context(.page-title kirby-page-actions).attention-level1.interaction-state-active,:host-context(.page-title kirby-page-actions).attention-level2:active,:host-context(.page-title kirby-page-actions).attention-level2.interaction-state-active,:host-context(.page-title kirby-page-actions).attention-level3:active,:host-context(.page-title kirby-page-actions).attention-level3.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host-context(kirby-empty-state .content){font-size:16px;height:48px;min-width:220px}:host-context(kirby-empty-state .content).icon-only{width:48px;min-width:unset}:host-context(kirby-toggle-button).success{--kirby-button-background-color: var(--kirby-success);--kirby-button-color: var(--kirby-success-contrast)}@media (hover: hover){:host-context(kirby-toggle-button).success:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host-context(kirby-toggle-button).success:active,:host-context(kirby-toggle-button).success.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host-context(kirby-toggle-button).warning{--kirby-button-background-color: var(--kirby-warning);--kirby-button-color: var(--kirby-warning-contrast)}@media (hover: hover){:host-context(kirby-toggle-button).warning:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host-context(kirby-toggle-button).warning:active,:host-context(kirby-toggle-button).warning.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host-context(kirby-toggle-button).danger{--kirby-button-background-color: var(--kirby-danger);--kirby-button-color: var(--kirby-danger-contrast)}@media (hover: hover){:host-context(kirby-toggle-button).danger:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host-context(kirby-toggle-button).danger:active,:host-context(kirby-toggle-button).danger.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host-context(kirby-page-actions),:host-context(kirby-action-group),:host-context(.kirby-modal ion-header ion-toolbar ion-buttons){margin:0}:host-context(kirby-modal-footer){margin-top:0;margin-bottom:0}:host-context(kirby-modal-footer):first-child{margin-left:0}:host-context(kirby-modal-footer):last-child{margin-right:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
125
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ButtonComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
126
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.6", type: ButtonComponent, isStandalone: true, selector: "button[kirby-button],Button[kirby-button],a[kirby-button]", inputs: { attentionLevel: "attentionLevel", noDecoration: "noDecoration", themeColor: "themeColor", expand: "expand", isFloating: "isFloating", size: "size", showIconOnly: "showIconOnly" }, host: { properties: { "class.no-decoration": "this.noDecoration", "class.floating": "this.isButtonFloating", "class.icon-only": "this.isIconOnly", "class.icon-left": "this.isIconLeft", "class.icon-right": "this.isIconRight", "class": "this._cssClass" } }, queries: [{ propertyName: "iconElementRef", first: true, predicate: IconComponent, descendants: true, read: ElementRef }], ngImport: i0, template: "<ng-container>\n <span class=\"state-layer\" aria-hidden=\"true\"></span>\n <span class=\"content-layer\"><ng-content></ng-content></span>\n</ng-container>\n<!--\n TODO: Fix globally exposed .state-layer and .content-layer\n \n See: https://github.com/kirbydesign/designsystem/issues/2101\n-->\n", styles: [":host{--kirby-button-padding-left: 24px;--kirby-button-padding-right: 24px;flex-shrink:0}:host{position:relative}:host:after{content:\"\";position:absolute;min-height:44px;min-width:44px;width:100%;height:100%;transform:translate(-50%,-50%);left:50%;top:50%}@media(hover:hover)and (pointer:fine){:host:focus{transition:all 80ms linear 0ms;box-shadow:0 0 0 2px var(--kirby-background-color),0 0 0 4px #4d90fe}:host:focus:not(:focus-visible){box-shadow:0 0 0 0 transparent}:host:focus-visible{transition:all 80ms linear 0ms;box-shadow:0 0 0 2px var(--kirby-background-color),0 0 0 4px #4d90fe}}:host{--state-layer-opacity: 0;--state-layer-background-color: var(--kirby-black);position:relative}:host .content-layer{position:relative;z-index:var(--content-layer-z-index, 1)}:host .state-layer{position:absolute;inset:0;overflow:hidden;pointer-events:none;border-radius:inherit;z-index:2}:host .state-layer:before{transition:all 80ms linear 0ms;content:\"\";position:absolute;pointer-events:none;inset:0;border-radius:inherit;opacity:var(--state-layer-opacity, 0);background-color:var(--state-layer-background-color, var(--kirby-black))}@media(hover:hover){:host:hover{--state-layer-opacity: .04;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host:active,:host.interaction-state-active{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black)}:host .content-layer{display:inherit;width:inherit;flex-direction:inherit;align-items:inherit;justify-content:inherit;padding-inline:var(--kirby-button-padding-left) var(--kirby-button-padding-right)}:host{font-family:var(--kirby-font-family);background-color:var(--kirby-button-background-color, initial);color:var(--kirby-button-color, inherit);border-radius:999px;box-sizing:border-box;display:inline-flex;flex-direction:row;align-items:center;justify-content:center;-webkit-user-select:none;user-select:none;vertical-align:middle;white-space:nowrap;font-size:14px;height:40px;min-width:88px;padding:0;margin:4px;line-height:20px;outline:none;border:none}:host.no-margin{margin:0}:host.icon-left{--kirby-icon-margin-right: 8px;--kirby-button-padding-left: 12px;--kirby-button-padding-right: 16px;padding:0}:host.icon-right{--kirby-icon-margin-left: 8px;--kirby-button-padding-left: 16px;--kirby-button-padding-right: 12px;padding:0}:host.icon-only{--kirby-button-padding-left: 0;--kirby-button-padding-right: 0;width:40px;padding:0;min-width:unset}:host.icon-only .content-layer ::ng-deep>:not(kirby-icon){position:absolute;scale:0}:host.xs{position:relative}:host.xs:after{content:\"\";position:absolute;min-height:32px;min-width:32px;width:100%;height:100%;transform:translate(-50%,-50%);left:50%;top:50%}:host.xs{font-size:12px;height:24px;min-width:44px}:host.xs:not(.icon-only){--kirby-button-padding-left: 12px;--kirby-button-padding-right: 12px}:host.xs.icon-only{--kirby-icon-font-size: 16px;width:24px;min-width:unset}:host.xs.icon-left{--kirby-button-padding-left: 8px;--kirby-icon-margin-right: 4px}:host.xs.icon-right{--kirby-button-padding-right: 8px;--kirby-icon-margin-left: 4px}:host.xs.icon-left,:host.xs.icon-right{--kirby-icon-font-size: 16px;min-width:44px}:host.sm{font-size:12px;height:32px;min-width:44px}:host.sm:not(.icon-only){--kirby-button-padding-left: 16px;--kirby-button-padding-right: 16px}:host.sm.icon-only{--kirby-icon-font-size: 16px;width:32px;min-width:unset}:host.sm.icon-left{--kirby-button-padding-left: 12px}:host.sm.icon-right{--kirby-button-padding-right: 12px}:host.sm.icon-left,:host.sm.icon-right{--kirby-icon-font-size: 16px;min-width:88px}:host.lg{font-size:16px;height:48px;min-width:220px}:host.lg.icon-only{width:48px;min-width:unset}:host.no-decoration{--kirby-button-background-color: transparent;--kirby-button-color: var(--kirby-black)}@media(hover:hover){:host.no-decoration:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host.no-decoration:active,:host.no-decoration.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host.attention-level1{--kirby-button-background-color: var(--kirby-primary);--kirby-button-color: var(--kirby-primary-contrast)}:host.attention-level1.destructive{--kirby-button-background-color: var(--kirby-danger);--kirby-button-color: var(--kirby-danger-contrast)}:host.attention-level2{--kirby-button-background-color: var(--kirby-black);--kirby-button-color: var(--kirby-black-contrast)}@media(hover:hover){:host.attention-level2:hover{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black-contrast);cursor:pointer}}:host.attention-level2:active,:host.attention-level2.interaction-state-active{--state-layer-opacity: .2;--state-layer-background-color: var(--kirby-black-contrast)}:host.attention-level3{--kirby-button-background-color: var(--kirby-inputs-background-color);--kirby-button-color: var(--kirby-inputs-color)}@media(hover:hover){:host.attention-level3:hover{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host.attention-level3:active,:host.attention-level3.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host.attention-level3 .state-layer{box-shadow:var(--kirby-inputs-elevation)}:host[expand=block]{width:100%}:host:disabled,:host[aria-disabled=true]{color:var(--kirby-semi-dark-shade);border-color:transparent;pointer-events:none}:host:disabled:not(.no-decoration),:host[aria-disabled=true]:not(.no-decoration){background-color:var(--kirby-semi-light)}:host.floating{width:64px!important;height:64px!important;min-width:unset}:host.floating:not(:disabled){box-shadow:0 20px 30px -15px #1c1c1c4d,0 0 5px #1c1c1c14}:host(a){text-decoration:none}:host-context(.kirby-color-brightness-dark).no-decoration{--kirby-button-color: var(--kirby-white)}@media(hover:hover){:host-context(.kirby-color-brightness-dark).no-decoration:hover{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black-contrast);cursor:pointer}}:host-context(.kirby-color-brightness-dark).no-decoration:active,:host-context(.kirby-color-brightness-dark).no-decoration.interaction-state-active{--state-layer-opacity: .2;--state-layer-background-color: var(--kirby-black-contrast)}:host-context(.kirby-color-brightness-dark).attention-level2{--kirby-button-background-color: var(--kirby-white);--kirby-button-color: var(--kirby-white-contrast)}@media(hover:hover){:host-context(.kirby-color-brightness-dark).attention-level2:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host-context(.kirby-color-brightness-dark).attention-level2:active,:host-context(.kirby-color-brightness-dark).attention-level2.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}@media(hover:hover){:host-context(.kirby-color-brightness-dark).attention-level3:hover{--state-layer-opacity: .04;--state-layer-background-color: var(--kirby-black-contrast);cursor:pointer}}:host-context(.kirby-color-brightness-dark).attention-level3:active,:host-context(.kirby-color-brightness-dark).attention-level3.interaction-state-active{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black-contrast)}:host-context(kirby-item)[slot=end]{margin-inline:16px 0}:host-context(kirby-dropdown){justify-content:space-between}:host-context(ion-toolbar ion-buttons.legacy-actions){font-size:14px;height:40px}:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only{width:40px}:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.no-decoration,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level1,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level2,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level3{--kirby-button-background-color: var(--kirby-inputs-background-color);--kirby-button-color: var(--kirby-inputs-color)}@media(hover:hover){:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.no-decoration:hover,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level1:hover,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level2:hover,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level3:hover{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.no-decoration:active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.no-decoration.interaction-state-active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level1:active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level1.interaction-state-active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level2:active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level2.interaction-state-active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level3:active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level3.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host-context(.page-title kirby-page-actions).no-decoration,:host-context(.page-title kirby-page-actions).attention-level1,:host-context(.page-title kirby-page-actions).attention-level2,:host-context(.page-title kirby-page-actions).attention-level3{--kirby-button-background-color: var(--kirby-inputs-background-color);--kirby-button-color: var(--kirby-inputs-color)}@media(hover:hover){:host-context(.page-title kirby-page-actions).no-decoration:hover,:host-context(.page-title kirby-page-actions).attention-level1:hover,:host-context(.page-title kirby-page-actions).attention-level2:hover,:host-context(.page-title kirby-page-actions).attention-level3:hover{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host-context(.page-title kirby-page-actions).no-decoration:active,:host-context(.page-title kirby-page-actions).no-decoration.interaction-state-active,:host-context(.page-title kirby-page-actions).attention-level1:active,:host-context(.page-title kirby-page-actions).attention-level1.interaction-state-active,:host-context(.page-title kirby-page-actions).attention-level2:active,:host-context(.page-title kirby-page-actions).attention-level2.interaction-state-active,:host-context(.page-title kirby-page-actions).attention-level3:active,:host-context(.page-title kirby-page-actions).attention-level3.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host-context(kirby-empty-state .content){font-size:16px;height:48px;min-width:220px}:host-context(kirby-empty-state .content).icon-only{width:48px;min-width:unset}:host-context(kirby-toggle-button).success{--kirby-button-background-color: var(--kirby-success);--kirby-button-color: var(--kirby-success-contrast)}@media(hover:hover){:host-context(kirby-toggle-button).success:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host-context(kirby-toggle-button).success:active,:host-context(kirby-toggle-button).success.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host-context(kirby-toggle-button).warning{--kirby-button-background-color: var(--kirby-warning);--kirby-button-color: var(--kirby-warning-contrast)}@media(hover:hover){:host-context(kirby-toggle-button).warning:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host-context(kirby-toggle-button).warning:active,:host-context(kirby-toggle-button).warning.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host-context(kirby-toggle-button).danger{--kirby-button-background-color: var(--kirby-danger);--kirby-button-color: var(--kirby-danger-contrast)}@media(hover:hover){:host-context(kirby-toggle-button).danger:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host-context(kirby-toggle-button).danger:active,:host-context(kirby-toggle-button).danger.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host-context(kirby-page-actions),:host-context(kirby-action-group),:host-context(.kirby-modal ion-header ion-toolbar ion-buttons){margin:0}:host-context(kirby-modal-footer){margin-top:0;margin-bottom:0}:host-context(kirby-modal-footer):first-child{margin-left:0}:host-context(kirby-modal-footer):last-child{margin-right:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
127
127
|
}
|
|
128
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
128
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
129
129
|
type: Component,
|
|
130
|
-
args: [{ selector: 'button[kirby-button],Button[kirby-button],a[kirby-button]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container>\n <span class=\"state-layer\" aria-hidden=\"true\"></span>\n <span class=\"content-layer\"><ng-content></ng-content></span>\n</ng-container>\n<!--\n TODO: Fix globally exposed .state-layer and .content-layer\n \n See: https://github.com/kirbydesign/designsystem/issues/2101\n-->\n", styles: [":host{--kirby-button-padding-left: 24px;--kirby-button-padding-right: 24px;flex-shrink:0}:host{position:relative}:host:after{content:\"\";position:absolute;min-height:44px;min-width:44px;width:100%;height:100%;transform:translate(-50%,-50%);left:50%;top:50%}@media (hover: hover) and (pointer: fine){:host:focus{transition:all 80ms linear 0ms;box-shadow:0 0 0 2px var(--kirby-background-color),0 0 0 4px #4d90fe}:host:focus:not(:focus-visible){box-shadow:0 0 0 0 transparent}:host:focus-visible{transition:all 80ms linear 0ms;box-shadow:0 0 0 2px var(--kirby-background-color),0 0 0 4px #4d90fe}}:host{--state-layer-opacity: 0;--state-layer-background-color: var(--kirby-black);position:relative}:host .content-layer{position:relative;z-index:var(--content-layer-z-index, 1)}:host .state-layer{position:absolute;inset:0;overflow:hidden;pointer-events:none;border-radius:inherit;z-index:2}:host .state-layer:before{transition:all 80ms linear 0ms;content:\"\";position:absolute;pointer-events:none;inset:0;border-radius:inherit;opacity:var(--state-layer-opacity, 0);background-color:var(--state-layer-background-color, var(--kirby-black))}@media (hover: hover){:host:hover{--state-layer-opacity: .04;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host:active,:host.interaction-state-active{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black)}:host .content-layer{display:inherit;width:inherit;flex-direction:inherit;align-items:inherit;justify-content:inherit;padding-inline:var(--kirby-button-padding-left) var(--kirby-button-padding-right)}:host{font-family:var(--kirby-font-family);background-color:var(--kirby-button-background-color, initial);color:var(--kirby-button-color, inherit);border-radius:999px;box-sizing:border-box;display:inline-flex;flex-direction:row;align-items:center;justify-content:center;-webkit-user-select:none;user-select:none;vertical-align:middle;white-space:nowrap;font-size:14px;height:40px;min-width:88px;padding:0;margin:4px;line-height:20px;outline:none;border:none}:host.no-margin{margin:0}:host.icon-left{--kirby-icon-margin-right: 8px;--kirby-button-padding-left: 12px;--kirby-button-padding-right: 16px;padding:0}:host.icon-right{--kirby-icon-margin-left: 8px;--kirby-button-padding-left: 16px;--kirby-button-padding-right: 12px;padding:0}:host.icon-only{--kirby-button-padding-left: 0;--kirby-button-padding-right: 0;width:40px;padding:0;min-width:unset}:host.icon-only .content-layer ::ng-deep>:not(kirby-icon){position:absolute;scale:0}:host.xs{position:relative}:host.xs:after{content:\"\";position:absolute;min-height:32px;min-width:32px;width:100%;height:100%;transform:translate(-50%,-50%);left:50%;top:50%}:host.xs{font-size:12px;height:24px;min-width:44px}:host.xs:not(.icon-only){--kirby-button-padding-left: 12px;--kirby-button-padding-right: 12px}:host.xs.icon-only{--kirby-icon-font-size: 16px;width:24px;min-width:unset}:host.xs.icon-left{--kirby-button-padding-left: 8px;--kirby-icon-margin-right: 4px}:host.xs.icon-right{--kirby-button-padding-right: 8px;--kirby-icon-margin-left: 4px}:host.xs.icon-left,:host.xs.icon-right{--kirby-icon-font-size: 16px;min-width:44px}:host.sm{font-size:12px;height:32px;min-width:44px}:host.sm:not(.icon-only){--kirby-button-padding-left: 16px;--kirby-button-padding-right: 16px}:host.sm.icon-only{--kirby-icon-font-size: 16px;width:32px;min-width:unset}:host.sm.icon-left{--kirby-button-padding-left: 12px}:host.sm.icon-right{--kirby-button-padding-right: 12px}:host.sm.icon-left,:host.sm.icon-right{--kirby-icon-font-size: 16px;min-width:88px}:host.lg{font-size:16px;height:48px;min-width:220px}:host.lg.icon-only{width:48px;min-width:unset}:host.no-decoration{--kirby-button-background-color: transparent;--kirby-button-color: var(--kirby-black)}@media (hover: hover){:host.no-decoration:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host.no-decoration:active,:host.no-decoration.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host.attention-level1{--kirby-button-background-color: var(--kirby-primary);--kirby-button-color: var(--kirby-primary-contrast)}:host.attention-level1.destructive{--kirby-button-background-color: var(--kirby-danger);--kirby-button-color: var(--kirby-danger-contrast)}:host.attention-level2{--kirby-button-background-color: var(--kirby-black);--kirby-button-color: var(--kirby-black-contrast)}@media (hover: hover){:host.attention-level2:hover{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black-contrast);cursor:pointer}}:host.attention-level2:active,:host.attention-level2.interaction-state-active{--state-layer-opacity: .2;--state-layer-background-color: var(--kirby-black-contrast)}:host.attention-level3{--kirby-button-background-color: var(--kirby-inputs-background-color);--kirby-button-color: var(--kirby-inputs-color)}@media (hover: hover){:host.attention-level3:hover{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host.attention-level3:active,:host.attention-level3.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host.attention-level3 .state-layer{box-shadow:var(--kirby-inputs-elevation)}:host[expand=block]{width:100%}:host:disabled,:host[aria-disabled=true]{color:var(--kirby-semi-dark-shade);border-color:transparent;pointer-events:none}:host:disabled:not(.no-decoration),:host[aria-disabled=true]:not(.no-decoration){background-color:var(--kirby-semi-light)}:host.floating{width:64px!important;height:64px!important;min-width:unset}:host.floating:not(:disabled){box-shadow:0 20px 30px -15px #1c1c1c4d,0 0 5px #1c1c1c14}:host(a){text-decoration:none}:host-context(.kirby-color-brightness-dark).no-decoration{--kirby-button-color: var(--kirby-white)}@media (hover: hover){:host-context(.kirby-color-brightness-dark).no-decoration:hover{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black-contrast);cursor:pointer}}:host-context(.kirby-color-brightness-dark).no-decoration:active,:host-context(.kirby-color-brightness-dark).no-decoration.interaction-state-active{--state-layer-opacity: .2;--state-layer-background-color: var(--kirby-black-contrast)}:host-context(.kirby-color-brightness-dark).attention-level2{--kirby-button-background-color: var(--kirby-white);--kirby-button-color: var(--kirby-white-contrast)}@media (hover: hover){:host-context(.kirby-color-brightness-dark).attention-level2:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host-context(.kirby-color-brightness-dark).attention-level2:active,:host-context(.kirby-color-brightness-dark).attention-level2.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}@media (hover: hover){:host-context(.kirby-color-brightness-dark).attention-level3:hover{--state-layer-opacity: .04;--state-layer-background-color: var(--kirby-black-contrast);cursor:pointer}}:host-context(.kirby-color-brightness-dark).attention-level3:active,:host-context(.kirby-color-brightness-dark).attention-level3.interaction-state-active{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black-contrast)}:host-context(kirby-item)[slot=end]{margin-inline:16px 0}:host-context(kirby-dropdown){justify-content:space-between}:host-context(ion-toolbar ion-buttons.legacy-actions){font-size:14px;height:40px}:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only{width:40px}:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.no-decoration,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level1,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level2,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level3{--kirby-button-background-color: var(--kirby-inputs-background-color);--kirby-button-color: var(--kirby-inputs-color)}@media (hover: hover){:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.no-decoration:hover,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level1:hover,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level2:hover,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level3:hover{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.no-decoration:active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.no-decoration.interaction-state-active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level1:active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level1.interaction-state-active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level2:active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level2.interaction-state-active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level3:active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level3.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host-context(.page-title kirby-page-actions).no-decoration,:host-context(.page-title kirby-page-actions).attention-level1,:host-context(.page-title kirby-page-actions).attention-level2,:host-context(.page-title kirby-page-actions).attention-level3{--kirby-button-background-color: var(--kirby-inputs-background-color);--kirby-button-color: var(--kirby-inputs-color)}@media (hover: hover){:host-context(.page-title kirby-page-actions).no-decoration:hover,:host-context(.page-title kirby-page-actions).attention-level1:hover,:host-context(.page-title kirby-page-actions).attention-level2:hover,:host-context(.page-title kirby-page-actions).attention-level3:hover{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host-context(.page-title kirby-page-actions).no-decoration:active,:host-context(.page-title kirby-page-actions).no-decoration.interaction-state-active,:host-context(.page-title kirby-page-actions).attention-level1:active,:host-context(.page-title kirby-page-actions).attention-level1.interaction-state-active,:host-context(.page-title kirby-page-actions).attention-level2:active,:host-context(.page-title kirby-page-actions).attention-level2.interaction-state-active,:host-context(.page-title kirby-page-actions).attention-level3:active,:host-context(.page-title kirby-page-actions).attention-level3.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host-context(kirby-empty-state .content){font-size:16px;height:48px;min-width:220px}:host-context(kirby-empty-state .content).icon-only{width:48px;min-width:unset}:host-context(kirby-toggle-button).success{--kirby-button-background-color: var(--kirby-success);--kirby-button-color: var(--kirby-success-contrast)}@media (hover: hover){:host-context(kirby-toggle-button).success:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host-context(kirby-toggle-button).success:active,:host-context(kirby-toggle-button).success.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host-context(kirby-toggle-button).warning{--kirby-button-background-color: var(--kirby-warning);--kirby-button-color: var(--kirby-warning-contrast)}@media (hover: hover){:host-context(kirby-toggle-button).warning:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host-context(kirby-toggle-button).warning:active,:host-context(kirby-toggle-button).warning.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host-context(kirby-toggle-button).danger{--kirby-button-background-color: var(--kirby-danger);--kirby-button-color: var(--kirby-danger-contrast)}@media (hover: hover){:host-context(kirby-toggle-button).danger:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host-context(kirby-toggle-button).danger:active,:host-context(kirby-toggle-button).danger.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host-context(kirby-page-actions),:host-context(kirby-action-group),:host-context(.kirby-modal ion-header ion-toolbar ion-buttons){margin:0}:host-context(kirby-modal-footer){margin-top:0;margin-bottom:0}:host-context(kirby-modal-footer):first-child{margin-left:0}:host-context(kirby-modal-footer):last-child{margin-right:0}\n"] }]
|
|
130
|
+
args: [{ selector: 'button[kirby-button],Button[kirby-button],a[kirby-button]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container>\n <span class=\"state-layer\" aria-hidden=\"true\"></span>\n <span class=\"content-layer\"><ng-content></ng-content></span>\n</ng-container>\n<!--\n TODO: Fix globally exposed .state-layer and .content-layer\n \n See: https://github.com/kirbydesign/designsystem/issues/2101\n-->\n", styles: [":host{--kirby-button-padding-left: 24px;--kirby-button-padding-right: 24px;flex-shrink:0}:host{position:relative}:host:after{content:\"\";position:absolute;min-height:44px;min-width:44px;width:100%;height:100%;transform:translate(-50%,-50%);left:50%;top:50%}@media(hover:hover)and (pointer:fine){:host:focus{transition:all 80ms linear 0ms;box-shadow:0 0 0 2px var(--kirby-background-color),0 0 0 4px #4d90fe}:host:focus:not(:focus-visible){box-shadow:0 0 0 0 transparent}:host:focus-visible{transition:all 80ms linear 0ms;box-shadow:0 0 0 2px var(--kirby-background-color),0 0 0 4px #4d90fe}}:host{--state-layer-opacity: 0;--state-layer-background-color: var(--kirby-black);position:relative}:host .content-layer{position:relative;z-index:var(--content-layer-z-index, 1)}:host .state-layer{position:absolute;inset:0;overflow:hidden;pointer-events:none;border-radius:inherit;z-index:2}:host .state-layer:before{transition:all 80ms linear 0ms;content:\"\";position:absolute;pointer-events:none;inset:0;border-radius:inherit;opacity:var(--state-layer-opacity, 0);background-color:var(--state-layer-background-color, var(--kirby-black))}@media(hover:hover){:host:hover{--state-layer-opacity: .04;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host:active,:host.interaction-state-active{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black)}:host .content-layer{display:inherit;width:inherit;flex-direction:inherit;align-items:inherit;justify-content:inherit;padding-inline:var(--kirby-button-padding-left) var(--kirby-button-padding-right)}:host{font-family:var(--kirby-font-family);background-color:var(--kirby-button-background-color, initial);color:var(--kirby-button-color, inherit);border-radius:999px;box-sizing:border-box;display:inline-flex;flex-direction:row;align-items:center;justify-content:center;-webkit-user-select:none;user-select:none;vertical-align:middle;white-space:nowrap;font-size:14px;height:40px;min-width:88px;padding:0;margin:4px;line-height:20px;outline:none;border:none}:host.no-margin{margin:0}:host.icon-left{--kirby-icon-margin-right: 8px;--kirby-button-padding-left: 12px;--kirby-button-padding-right: 16px;padding:0}:host.icon-right{--kirby-icon-margin-left: 8px;--kirby-button-padding-left: 16px;--kirby-button-padding-right: 12px;padding:0}:host.icon-only{--kirby-button-padding-left: 0;--kirby-button-padding-right: 0;width:40px;padding:0;min-width:unset}:host.icon-only .content-layer ::ng-deep>:not(kirby-icon){position:absolute;scale:0}:host.xs{position:relative}:host.xs:after{content:\"\";position:absolute;min-height:32px;min-width:32px;width:100%;height:100%;transform:translate(-50%,-50%);left:50%;top:50%}:host.xs{font-size:12px;height:24px;min-width:44px}:host.xs:not(.icon-only){--kirby-button-padding-left: 12px;--kirby-button-padding-right: 12px}:host.xs.icon-only{--kirby-icon-font-size: 16px;width:24px;min-width:unset}:host.xs.icon-left{--kirby-button-padding-left: 8px;--kirby-icon-margin-right: 4px}:host.xs.icon-right{--kirby-button-padding-right: 8px;--kirby-icon-margin-left: 4px}:host.xs.icon-left,:host.xs.icon-right{--kirby-icon-font-size: 16px;min-width:44px}:host.sm{font-size:12px;height:32px;min-width:44px}:host.sm:not(.icon-only){--kirby-button-padding-left: 16px;--kirby-button-padding-right: 16px}:host.sm.icon-only{--kirby-icon-font-size: 16px;width:32px;min-width:unset}:host.sm.icon-left{--kirby-button-padding-left: 12px}:host.sm.icon-right{--kirby-button-padding-right: 12px}:host.sm.icon-left,:host.sm.icon-right{--kirby-icon-font-size: 16px;min-width:88px}:host.lg{font-size:16px;height:48px;min-width:220px}:host.lg.icon-only{width:48px;min-width:unset}:host.no-decoration{--kirby-button-background-color: transparent;--kirby-button-color: var(--kirby-black)}@media(hover:hover){:host.no-decoration:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host.no-decoration:active,:host.no-decoration.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host.attention-level1{--kirby-button-background-color: var(--kirby-primary);--kirby-button-color: var(--kirby-primary-contrast)}:host.attention-level1.destructive{--kirby-button-background-color: var(--kirby-danger);--kirby-button-color: var(--kirby-danger-contrast)}:host.attention-level2{--kirby-button-background-color: var(--kirby-black);--kirby-button-color: var(--kirby-black-contrast)}@media(hover:hover){:host.attention-level2:hover{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black-contrast);cursor:pointer}}:host.attention-level2:active,:host.attention-level2.interaction-state-active{--state-layer-opacity: .2;--state-layer-background-color: var(--kirby-black-contrast)}:host.attention-level3{--kirby-button-background-color: var(--kirby-inputs-background-color);--kirby-button-color: var(--kirby-inputs-color)}@media(hover:hover){:host.attention-level3:hover{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host.attention-level3:active,:host.attention-level3.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host.attention-level3 .state-layer{box-shadow:var(--kirby-inputs-elevation)}:host[expand=block]{width:100%}:host:disabled,:host[aria-disabled=true]{color:var(--kirby-semi-dark-shade);border-color:transparent;pointer-events:none}:host:disabled:not(.no-decoration),:host[aria-disabled=true]:not(.no-decoration){background-color:var(--kirby-semi-light)}:host.floating{width:64px!important;height:64px!important;min-width:unset}:host.floating:not(:disabled){box-shadow:0 20px 30px -15px #1c1c1c4d,0 0 5px #1c1c1c14}:host(a){text-decoration:none}:host-context(.kirby-color-brightness-dark).no-decoration{--kirby-button-color: var(--kirby-white)}@media(hover:hover){:host-context(.kirby-color-brightness-dark).no-decoration:hover{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black-contrast);cursor:pointer}}:host-context(.kirby-color-brightness-dark).no-decoration:active,:host-context(.kirby-color-brightness-dark).no-decoration.interaction-state-active{--state-layer-opacity: .2;--state-layer-background-color: var(--kirby-black-contrast)}:host-context(.kirby-color-brightness-dark).attention-level2{--kirby-button-background-color: var(--kirby-white);--kirby-button-color: var(--kirby-white-contrast)}@media(hover:hover){:host-context(.kirby-color-brightness-dark).attention-level2:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host-context(.kirby-color-brightness-dark).attention-level2:active,:host-context(.kirby-color-brightness-dark).attention-level2.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}@media(hover:hover){:host-context(.kirby-color-brightness-dark).attention-level3:hover{--state-layer-opacity: .04;--state-layer-background-color: var(--kirby-black-contrast);cursor:pointer}}:host-context(.kirby-color-brightness-dark).attention-level3:active,:host-context(.kirby-color-brightness-dark).attention-level3.interaction-state-active{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black-contrast)}:host-context(kirby-item)[slot=end]{margin-inline:16px 0}:host-context(kirby-dropdown){justify-content:space-between}:host-context(ion-toolbar ion-buttons.legacy-actions){font-size:14px;height:40px}:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only{width:40px}:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.no-decoration,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level1,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level2,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level3{--kirby-button-background-color: var(--kirby-inputs-background-color);--kirby-button-color: var(--kirby-inputs-color)}@media(hover:hover){:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.no-decoration:hover,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level1:hover,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level2:hover,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level3:hover{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.no-decoration:active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.no-decoration.interaction-state-active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level1:active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level1.interaction-state-active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level2:active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level2.interaction-state-active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level3:active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level3.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host-context(.page-title kirby-page-actions).no-decoration,:host-context(.page-title kirby-page-actions).attention-level1,:host-context(.page-title kirby-page-actions).attention-level2,:host-context(.page-title kirby-page-actions).attention-level3{--kirby-button-background-color: var(--kirby-inputs-background-color);--kirby-button-color: var(--kirby-inputs-color)}@media(hover:hover){:host-context(.page-title kirby-page-actions).no-decoration:hover,:host-context(.page-title kirby-page-actions).attention-level1:hover,:host-context(.page-title kirby-page-actions).attention-level2:hover,:host-context(.page-title kirby-page-actions).attention-level3:hover{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host-context(.page-title kirby-page-actions).no-decoration:active,:host-context(.page-title kirby-page-actions).no-decoration.interaction-state-active,:host-context(.page-title kirby-page-actions).attention-level1:active,:host-context(.page-title kirby-page-actions).attention-level1.interaction-state-active,:host-context(.page-title kirby-page-actions).attention-level2:active,:host-context(.page-title kirby-page-actions).attention-level2.interaction-state-active,:host-context(.page-title kirby-page-actions).attention-level3:active,:host-context(.page-title kirby-page-actions).attention-level3.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host-context(kirby-empty-state .content){font-size:16px;height:48px;min-width:220px}:host-context(kirby-empty-state .content).icon-only{width:48px;min-width:unset}:host-context(kirby-toggle-button).success{--kirby-button-background-color: var(--kirby-success);--kirby-button-color: var(--kirby-success-contrast)}@media(hover:hover){:host-context(kirby-toggle-button).success:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host-context(kirby-toggle-button).success:active,:host-context(kirby-toggle-button).success.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host-context(kirby-toggle-button).warning{--kirby-button-background-color: var(--kirby-warning);--kirby-button-color: var(--kirby-warning-contrast)}@media(hover:hover){:host-context(kirby-toggle-button).warning:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host-context(kirby-toggle-button).warning:active,:host-context(kirby-toggle-button).warning.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host-context(kirby-toggle-button).danger{--kirby-button-background-color: var(--kirby-danger);--kirby-button-color: var(--kirby-danger-contrast)}@media(hover:hover){:host-context(kirby-toggle-button).danger:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host-context(kirby-toggle-button).danger:active,:host-context(kirby-toggle-button).danger.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host-context(kirby-page-actions),:host-context(kirby-action-group),:host-context(.kirby-modal ion-header ion-toolbar ion-buttons){margin:0}:host-context(kirby-modal-footer){margin-top:0;margin-bottom:0}:host-context(kirby-modal-footer):first-child{margin-left:0}:host-context(kirby-modal-footer):last-child{margin-right:0}\n"] }]
|
|
131
131
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { attentionLevel: [{
|
|
132
132
|
type: Input
|
|
133
133
|
}], noDecoration: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kirbydesign-designsystem-button.mjs","sources":["../../button/src/button.component.ts","../../button/src/button.component.html","../../button/src/kirbydesign-designsystem-button.ts"],"sourcesContent":["import {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n ElementRef,\n HostBinding,\n Input,\n OnDestroy,\n OnInit,\n Renderer2,\n} from '@angular/core';\n\nimport { NotificationColor } from '@kirbydesign/core';\nimport { EventListenerDisposeFn } from '@kirbydesign/designsystem/types';\n\nimport { IconComponent } from '@kirbydesign/designsystem/icon';\n\nexport enum ButtonSize {\n XS = 'xs',\n SM = 'sm',\n MD = 'md',\n LG = 'lg',\n}\n\nexport type AttentionLevel = '1' | '2' | '3';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'button[kirby-button],Button[kirby-button],a[kirby-button]',\n templateUrl: './button.component.html',\n styleUrls: ['./button.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ButtonComponent implements AfterContentInit, OnDestroy, OnInit {\n @Input() attentionLevel: AttentionLevel;\n\n @HostBinding('class.no-decoration')\n @Input()\n noDecoration = false;\n\n @HostBinding('class.floating')\n public get isButtonFloating(): boolean {\n return this.isFloating;\n }\n\n @HostBinding('class.icon-only')\n public get isIconOnly(): boolean {\n return !!this.iconElementRef && this.showIconOnly;\n }\n private _isIconLeft = false;\n @HostBinding('class.icon-left')\n public get isIconLeft() {\n return this._isIconLeft && !this.showIconOnly;\n }\n private _isIconRight = false;\n @HostBinding('class.icon-right')\n public get isIconRight() {\n return this._isIconRight && !this.showIconOnly;\n }\n\n @HostBinding('class')\n get _cssClass() {\n const attentionLevel = this.getAttentionLevelCssClass();\n return [this.themeColor, this.size, attentionLevel].filter((cssClass) => !!cssClass);\n }\n\n private getAttentionLevelCssClass() {\n if (this.noDecoration) return;\n const attentionLevelDefault: AttentionLevel = '1';\n return `attention-level${this.attentionLevel || attentionLevelDefault}`;\n }\n\n @Input()\n themeColor: NotificationColor;\n @Input() expand: 'full' | 'block';\n @Input() isFloating: boolean = false;\n @Input()\n size: ButtonSize | `${ButtonSize}` = ButtonSize.MD;\n\n private _showIconOnly: boolean = false;\n get showIconOnly() {\n return this._showIconOnly;\n }\n @Input() set showIconOnly(value: boolean) {\n if (value) {\n // If the button text is supplied as plain text (i.e. as a text node not within an element tag),\n // we need to wrap it in an element to be able to target and hide it with css:\n this.wrapTextNode(this.iconElementRef?.nativeElement);\n }\n this._showIconOnly = value;\n }\n\n @ContentChild(IconComponent, { read: ElementRef })\n iconElementRef?: ElementRef<HTMLElement>;\n\n private disposeEventListeners: EventListenerDisposeFn[] = [];\n\n constructor(\n private elementRef: ElementRef<HTMLElement>,\n private renderer: Renderer2\n ) {}\n\n ngOnInit(): void {\n this.setupEventListenerForAriaDisabledHandling();\n }\n\n setupEventListenerForAriaDisabledHandling() {\n // Prevent event bubbling for aria-disabled buttons using a native event listener.\n // HostListener cannot block event bubbling, see: https://github.com/angular/angular/issues/9587\n ['click', 'keydown.enter', 'keydown.space'].forEach((evt) => {\n const disposeEventListener = this.renderer.listen(\n this.elementRef.nativeElement,\n evt,\n this.blockEventIfAriaDisabled.bind(this),\n { capture: true }\n );\n this.disposeEventListeners.push(disposeEventListener);\n });\n }\n\n private wrapTextNode(iconElement?: HTMLElement) {\n if (!iconElement) {\n return;\n }\n\n const ifTextNode = (node?: ChildNode): ChildNode | undefined => {\n return node?.nodeType === Node.TEXT_NODE ? node : undefined;\n };\n\n const textNode = ifTextNode(iconElement.previousSibling) || ifTextNode(iconElement.nextSibling);\n if (textNode) {\n const placement = textNode === iconElement.previousSibling ? 'before' : 'after';\n const textWrapper = this.renderer.createElement('span');\n const parent = textNode.parentNode;\n this.renderer.removeChild(textNode.parentNode, textNode);\n this.renderer.appendChild(textWrapper, textNode);\n if (placement === 'before') {\n this.renderer.insertBefore(parent, textWrapper, iconElement);\n } else if (placement === 'after') {\n this.renderer.appendChild(parent, textWrapper);\n }\n }\n }\n\n ngAfterContentInit(): void {\n const iconElement = this.iconElementRef?.nativeElement;\n\n if (iconElement === undefined) {\n // Nothing to do here when there's no icon:\n return;\n }\n\n // Ensure buttons with icon is always shown as icon only inside the toolbar:\n if (this.elementRef.nativeElement.closest('ion-toolbar')) {\n this._showIconOnly = true;\n }\n\n if (this.showIconOnly) {\n // If the button text is supplied as plain text (i.e. as a text node not within an element tag),\n // we need to wrap it in an element to be able to target and hide it with css:\n this.wrapTextNode(iconElement);\n }\n\n const hasText = !!this.elementRef.nativeElement.textContent;\n if (!hasText) {\n // Button doesn't contain any text, make it round:\n this._showIconOnly = true;\n }\n\n if (hasText && !this.showIconOnly) {\n this._isIconLeft =\n this.elementRef.nativeElement.querySelector('.content-layer').firstChild === iconElement;\n this._isIconRight = !this._isIconLeft;\n }\n }\n\n private blockEventIfAriaDisabled(event: Event) {\n if (this.elementRef.nativeElement.ariaDisabled === 'true') {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n }\n\n ngOnDestroy() {\n this.disposeEventListeners.forEach((unlistenEvent) => unlistenEvent());\n }\n}\n","<ng-container>\n <span class=\"state-layer\" aria-hidden=\"true\"></span>\n <span class=\"content-layer\"><ng-content></ng-content></span>\n</ng-container>\n<!--\n TODO: Fix globally exposed .state-layer and .content-layer\n \n See: https://github.com/kirbydesign/designsystem/issues/2101\n-->\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;IAkBY;AAAZ,CAAA,UAAY,UAAU,EAAA;AACpB,IAAA,UAAA,CAAA,IAAA,CAAA,GAAA,IAAS;AACT,IAAA,UAAA,CAAA,IAAA,CAAA,GAAA,IAAS;AACT,IAAA,UAAA,CAAA,IAAA,CAAA,GAAA,IAAS;AACT,IAAA,UAAA,CAAA,IAAA,CAAA,GAAA,IAAS;AACX,CAAC,EALW,UAAU,KAAV,UAAU,GAAA,EAAA,CAAA,CAAA;MAgBT,eAAe,CAAA;AAO1B,IAAA,IACW,gBAAgB,GAAA;QACzB,OAAO,IAAI,CAAC,UAAU;IACxB;AAEA,IAAA,IACW,UAAU,GAAA;QACnB,OAAO,CAAC,CAAC,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,YAAY;IACnD;AAEA,IAAA,IACW,UAAU,GAAA;QACnB,OAAO,IAAI,CAAC,WAAW,IAAI,CAAC,IAAI,CAAC,YAAY;IAC/C;A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,CAAA,EAAA;;sBAG9C;;sBAEA,WAAW;uBAAC,qBAAqB;;sBACjC;;sBAGA,WAAW;uBAAC,gBAAgB;;sBAK5B,WAAW;uBAAC,iBAAiB;;sBAK7B,WAAW;uBAAC,iBAAiB;;sBAK7B,WAAW;uBAAC,kBAAkB;;sBAK9B,WAAW;uBAAC,OAAO;;sBAYnB;;sBAEA;;sBACA;;sBACA;;sBAOA;;sBASA,YAAY;AAAC,gBAAA,IAAA,EAAA,CAAA,aAAa,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE;;;AE7FnD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"kirbydesign-designsystem-button.mjs","sources":["../../button/src/button.component.ts","../../button/src/button.component.html","../../button/src/kirbydesign-designsystem-button.ts"],"sourcesContent":["import {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n ElementRef,\n HostBinding,\n Input,\n OnDestroy,\n OnInit,\n Renderer2,\n} from '@angular/core';\n\nimport { NotificationColor } from '@kirbydesign/core';\nimport { EventListenerDisposeFn } from '@kirbydesign/designsystem/types';\n\nimport { IconComponent } from '@kirbydesign/designsystem/icon';\n\nexport enum ButtonSize {\n XS = 'xs',\n SM = 'sm',\n MD = 'md',\n LG = 'lg',\n}\n\nexport type AttentionLevel = '1' | '2' | '3';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'button[kirby-button],Button[kirby-button],a[kirby-button]',\n templateUrl: './button.component.html',\n styleUrls: ['./button.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ButtonComponent implements AfterContentInit, OnDestroy, OnInit {\n @Input() attentionLevel: AttentionLevel;\n\n @HostBinding('class.no-decoration')\n @Input()\n noDecoration = false;\n\n @HostBinding('class.floating')\n public get isButtonFloating(): boolean {\n return this.isFloating;\n }\n\n @HostBinding('class.icon-only')\n public get isIconOnly(): boolean {\n return !!this.iconElementRef && this.showIconOnly;\n }\n private _isIconLeft = false;\n @HostBinding('class.icon-left')\n public get isIconLeft() {\n return this._isIconLeft && !this.showIconOnly;\n }\n private _isIconRight = false;\n @HostBinding('class.icon-right')\n public get isIconRight() {\n return this._isIconRight && !this.showIconOnly;\n }\n\n @HostBinding('class')\n get _cssClass() {\n const attentionLevel = this.getAttentionLevelCssClass();\n return [this.themeColor, this.size, attentionLevel].filter((cssClass) => !!cssClass);\n }\n\n private getAttentionLevelCssClass() {\n if (this.noDecoration) return;\n const attentionLevelDefault: AttentionLevel = '1';\n return `attention-level${this.attentionLevel || attentionLevelDefault}`;\n }\n\n @Input()\n themeColor: NotificationColor;\n @Input() expand: 'full' | 'block';\n @Input() isFloating: boolean = false;\n @Input()\n size: ButtonSize | `${ButtonSize}` = ButtonSize.MD;\n\n private _showIconOnly: boolean = false;\n get showIconOnly() {\n return this._showIconOnly;\n }\n @Input() set showIconOnly(value: boolean) {\n if (value) {\n // If the button text is supplied as plain text (i.e. as a text node not within an element tag),\n // we need to wrap it in an element to be able to target and hide it with css:\n this.wrapTextNode(this.iconElementRef?.nativeElement);\n }\n this._showIconOnly = value;\n }\n\n @ContentChild(IconComponent, { read: ElementRef })\n iconElementRef?: ElementRef<HTMLElement>;\n\n private disposeEventListeners: EventListenerDisposeFn[] = [];\n\n constructor(\n private elementRef: ElementRef<HTMLElement>,\n private renderer: Renderer2\n ) {}\n\n ngOnInit(): void {\n this.setupEventListenerForAriaDisabledHandling();\n }\n\n setupEventListenerForAriaDisabledHandling() {\n // Prevent event bubbling for aria-disabled buttons using a native event listener.\n // HostListener cannot block event bubbling, see: https://github.com/angular/angular/issues/9587\n ['click', 'keydown.enter', 'keydown.space'].forEach((evt) => {\n const disposeEventListener = this.renderer.listen(\n this.elementRef.nativeElement,\n evt,\n this.blockEventIfAriaDisabled.bind(this),\n { capture: true }\n );\n this.disposeEventListeners.push(disposeEventListener);\n });\n }\n\n private wrapTextNode(iconElement?: HTMLElement) {\n if (!iconElement) {\n return;\n }\n\n const ifTextNode = (node?: ChildNode): ChildNode | undefined => {\n return node?.nodeType === Node.TEXT_NODE ? node : undefined;\n };\n\n const textNode = ifTextNode(iconElement.previousSibling) || ifTextNode(iconElement.nextSibling);\n if (textNode) {\n const placement = textNode === iconElement.previousSibling ? 'before' : 'after';\n const textWrapper = this.renderer.createElement('span');\n const parent = textNode.parentNode;\n this.renderer.removeChild(textNode.parentNode, textNode);\n this.renderer.appendChild(textWrapper, textNode);\n if (placement === 'before') {\n this.renderer.insertBefore(parent, textWrapper, iconElement);\n } else if (placement === 'after') {\n this.renderer.appendChild(parent, textWrapper);\n }\n }\n }\n\n ngAfterContentInit(): void {\n const iconElement = this.iconElementRef?.nativeElement;\n\n if (iconElement === undefined) {\n // Nothing to do here when there's no icon:\n return;\n }\n\n // Ensure buttons with icon is always shown as icon only inside the toolbar:\n if (this.elementRef.nativeElement.closest('ion-toolbar')) {\n this._showIconOnly = true;\n }\n\n if (this.showIconOnly) {\n // If the button text is supplied as plain text (i.e. as a text node not within an element tag),\n // we need to wrap it in an element to be able to target and hide it with css:\n this.wrapTextNode(iconElement);\n }\n\n const hasText = !!this.elementRef.nativeElement.textContent;\n if (!hasText) {\n // Button doesn't contain any text, make it round:\n this._showIconOnly = true;\n }\n\n if (hasText && !this.showIconOnly) {\n this._isIconLeft =\n this.elementRef.nativeElement.querySelector('.content-layer').firstChild === iconElement;\n this._isIconRight = !this._isIconLeft;\n }\n }\n\n private blockEventIfAriaDisabled(event: Event) {\n if (this.elementRef.nativeElement.ariaDisabled === 'true') {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n }\n\n ngOnDestroy() {\n this.disposeEventListeners.forEach((unlistenEvent) => unlistenEvent());\n }\n}\n","<ng-container>\n <span class=\"state-layer\" aria-hidden=\"true\"></span>\n <span class=\"content-layer\"><ng-content></ng-content></span>\n</ng-container>\n<!--\n TODO: Fix globally exposed .state-layer and .content-layer\n \n See: https://github.com/kirbydesign/designsystem/issues/2101\n-->\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"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