@koobiq/components 20.0.0 → 20.2.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/accordion/_accordion-theme.scss +1 -1
- package/accordion/accordion-tokens.scss +1 -0
- package/accordion/{accordion-trigger.component.scss → accordion-trigger.scss} +4 -18
- package/accordion/{accordion.component.scss → accordion.scss} +12 -5
- package/accordion/index.d.ts +215 -119
- package/actions-panel/index.d.ts +1 -0
- package/alert/_alert-theme.scss +14 -4
- package/alert/alert-tokens.scss +4 -4
- package/alert/alert.component.scss +24 -13
- package/alert/index.d.ts +63 -29
- package/app-switcher/app-switcher-dropdown-app.scss +2 -0
- package/autocomplete/autocomplete.scss +2 -1
- package/autocomplete/index.d.ts +35 -29
- package/badge/index.d.ts +2 -3
- package/breadcrumbs/breadcrumbs.scss +4 -0
- package/breadcrumbs/index.d.ts +2 -1
- package/button/button-group.scss +42 -2
- package/button-toggle/button-toggle.scss +23 -0
- package/button-toggle/index.d.ts +3 -1
- package/checkbox/checkbox.scss +5 -4
- package/clamped-text/index.d.ts +4 -2
- package/core/index.d.ts +515 -21
- package/core/styles/_core.scss +2 -0
- package/core/styles/common/_animation.scss +35 -24
- package/core/styles/common/_connected-overlay.scss +36 -0
- package/core/styles/common/_select.scss +7 -2
- package/core/styles/theming/_components-theming.scss +1 -1
- package/core/styles/theming/_scrollbar-theme.scss +4 -0
- package/datepicker/_datepicker-theme.scss +1 -1
- package/datepicker/datepicker-toggle.scss +3 -3
- package/dl/index.d.ts +1 -0
- package/dropdown/dropdown-item.scss +16 -0
- package/dropdown/dropdown-tokens.scss +2 -1
- package/dropdown/dropdown.scss +11 -2
- package/dropdown/index.d.ts +73 -6
- package/fesm2022/koobiq-components-accordion.mjs +406 -303
- package/fesm2022/koobiq-components-accordion.mjs.map +1 -1
- package/fesm2022/koobiq-components-actions-panel.mjs +15 -6
- package/fesm2022/koobiq-components-actions-panel.mjs.map +1 -1
- package/fesm2022/koobiq-components-alert.mjs +88 -48
- package/fesm2022/koobiq-components-alert.mjs.map +1 -1
- package/fesm2022/koobiq-components-app-switcher.mjs +7 -7
- package/fesm2022/koobiq-components-app-switcher.mjs.map +1 -1
- package/fesm2022/koobiq-components-autocomplete.mjs +37 -23
- package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
- package/fesm2022/koobiq-components-badge.mjs +5 -4
- package/fesm2022/koobiq-components-badge.mjs.map +1 -1
- package/fesm2022/koobiq-components-breadcrumbs.mjs +6 -4
- package/fesm2022/koobiq-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/koobiq-components-button-toggle.mjs +9 -6
- package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-button.mjs +4 -4
- package/fesm2022/koobiq-components-button.mjs.map +1 -1
- package/fesm2022/koobiq-components-checkbox.mjs +2 -2
- package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
- package/fesm2022/koobiq-components-clamped-text.mjs +9 -0
- package/fesm2022/koobiq-components-clamped-text.mjs.map +1 -1
- package/fesm2022/koobiq-components-code-block.mjs +5 -1
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-core.mjs +544 -113
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs +13 -10
- package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-dl.mjs +3 -2
- package/fesm2022/koobiq-components-dl.mjs.map +1 -1
- package/fesm2022/koobiq-components-dropdown.mjs +105 -31
- package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-file-upload.mjs +33 -22
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
- package/fesm2022/koobiq-components-filter-bar.mjs +1169 -782
- package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-flag.mjs +66 -0
- package/fesm2022/koobiq-components-flag.mjs.map +1 -0
- package/fesm2022/koobiq-components-form-field.mjs +6 -6
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-icon.mjs +16 -7
- package/fesm2022/koobiq-components-icon.mjs.map +1 -1
- package/fesm2022/koobiq-components-inline-edit.mjs +30 -7
- package/fesm2022/koobiq-components-inline-edit.mjs.map +1 -1
- package/fesm2022/koobiq-components-list.mjs +39 -20
- package/fesm2022/koobiq-components-list.mjs.map +1 -1
- package/fesm2022/koobiq-components-loader-overlay.mjs +2 -2
- package/fesm2022/koobiq-components-loader-overlay.mjs.map +1 -1
- package/fesm2022/koobiq-components-modal.mjs +9 -5
- package/fesm2022/koobiq-components-modal.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar.mjs +123 -27
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-notification-center.mjs +193 -19
- package/fesm2022/koobiq-components-notification-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-overflow-items.mjs +12 -4
- package/fesm2022/koobiq-components-overflow-items.mjs.map +1 -1
- package/fesm2022/koobiq-components-popover.mjs +9 -4
- package/fesm2022/koobiq-components-popover.mjs.map +1 -1
- package/fesm2022/koobiq-components-progress-bar.mjs +2 -2
- package/fesm2022/koobiq-components-progress-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-progress-spinner.mjs +2 -2
- package/fesm2022/koobiq-components-progress-spinner.mjs.map +1 -1
- package/fesm2022/koobiq-components-radio.mjs +3 -7
- package/fesm2022/koobiq-components-radio.mjs.map +1 -1
- package/fesm2022/koobiq-components-search-expandable.mjs +43 -8
- package/fesm2022/koobiq-components-search-expandable.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +72 -59
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidebar.mjs +4 -0
- package/fesm2022/koobiq-components-sidebar.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidepanel.mjs +3 -3
- package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
- package/fesm2022/koobiq-components-skeleton.mjs +2 -2
- package/fesm2022/koobiq-components-skeleton.mjs.map +1 -1
- package/fesm2022/koobiq-components-split-button.mjs +5 -12
- package/fesm2022/koobiq-components-split-button.mjs.map +1 -1
- package/fesm2022/koobiq-components-splitter.mjs +6 -2
- package/fesm2022/koobiq-components-splitter.mjs.map +1 -1
- package/fesm2022/koobiq-components-table.mjs +8 -6
- package/fesm2022/koobiq-components-table.mjs.map +1 -1
- package/fesm2022/koobiq-components-tabs.mjs +42 -18
- package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
- package/fesm2022/koobiq-components-tags.mjs +8 -1
- package/fesm2022/koobiq-components-tags.mjs.map +1 -1
- package/fesm2022/koobiq-components-textarea.mjs +7 -14
- package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
- package/fesm2022/koobiq-components-time-range.mjs +4 -4
- package/fesm2022/koobiq-components-time-range.mjs.map +1 -1
- package/fesm2022/koobiq-components-timepicker.mjs +3 -4
- package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-timezone.mjs +9 -5
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
- package/fesm2022/koobiq-components-title.mjs +132 -14
- package/fesm2022/koobiq-components-title.mjs.map +1 -1
- package/fesm2022/koobiq-components-toast.mjs +1 -1
- package/fesm2022/koobiq-components-toast.mjs.map +1 -1
- package/fesm2022/koobiq-components-toggle.mjs +2 -2
- package/fesm2022/koobiq-components-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-tooltip.mjs +168 -8
- package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree-select.mjs +79 -38
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +67 -41
- package/fesm2022/koobiq-components-tree.mjs.map +1 -1
- package/fesm2022/koobiq-components-username.mjs +16 -3
- package/fesm2022/koobiq-components-username.mjs.map +1 -1
- package/file-upload/file-upload-tokens.scss +1 -0
- package/file-upload/index.d.ts +10 -7
- package/filter-bar/_filter-bar-theme.scss +82 -0
- package/filter-bar/filter-bar-tokens.scss +9 -0
- package/filter-bar/filter-bar.scss +10 -4
- package/filter-bar/filter-refresher.scss +1 -1
- package/filter-bar/filters.scss +25 -20
- package/filter-bar/index.d.ts +764 -336
- package/filter-bar/pipes/base-pipe.scss +12 -44
- package/filter-bar/pipes/pipe-date.scss +20 -14
- package/filter-bar/pipes/pipe-input.scss +10 -0
- package/filter-bar/pipes/pipe-multi-tree-select.scss +5 -3
- package/filter-bar/pipes/pipe-multiselect.scss +5 -3
- package/filter-bar/pipes/pipe-readonly.scss +4 -13
- package/filter-bar/pipes/pipe-select.scss +3 -1
- package/filter-bar/pipes/pipe-tree-select.scss +3 -1
- package/flag/flag.scss +53 -0
- package/flag/index.d.ts +44 -0
- package/icon/icon-button.scss +3 -1
- package/icon/icon-item-tokens.scss +1 -1
- package/icon/index.d.ts +15 -2
- package/inline-edit/index.d.ts +5 -0
- package/inline-edit/inline-edit.scss +7 -7
- package/link/link-tokens.scss +2 -2
- package/list/index.d.ts +11 -2
- package/loader-overlay/loader-overlay-tokens.scss +1 -1
- package/modal/_modal-animation.scss +6 -6
- package/modal/_modal-theme.scss +5 -0
- package/modal/index.d.ts +3 -1
- package/modal/modal.scss +15 -0
- package/navbar/_navbar-item_vertical.scss +7 -5
- package/navbar/index.d.ts +39 -4
- package/navbar/navbar-brand.scss +17 -7
- package/navbar/navbar-item.scss +9 -0
- package/notification-center/_notification-center-theme.scss +2 -1
- package/notification-center/index.d.ts +89 -3
- package/notification-center/notification-center.scss +42 -4
- package/notification-center/notification-item.scss +3 -2
- package/overflow-items/index.d.ts +1 -0
- package/package.json +7 -3
- package/prebuilt-themes/dark-theme.css +1 -1
- package/prebuilt-themes/light-theme.css +1 -1
- package/prebuilt-themes/theme.css +1 -1
- package/progress-bar/progress-bar.scss +4 -0
- package/progress-spinner/progress-spinner.scss +5 -1
- package/radio/index.d.ts +1 -5
- package/radio/radio.scss +18 -4
- package/schematics/collection.json +15 -0
- package/schematics/migrations/alert-signals/README.md +64 -0
- package/schematics/migrations/alert-signals/data.js +70 -0
- package/schematics/migrations/alert-signals/index.js +350 -0
- package/schematics/migrations/alert-signals/schema.json +20 -0
- package/schematics/migrations/autocomplete-panel-width-auto/README.md +68 -0
- package/schematics/migrations/autocomplete-panel-width-auto/index.js +70 -0
- package/schematics/migrations/autocomplete-panel-width-auto/schema.json +15 -0
- package/schematics/migrations/filter-bar-signals/README.md +66 -0
- package/schematics/migrations/filter-bar-signals/data.js +72 -0
- package/schematics/migrations/filter-bar-signals/index.js +316 -0
- package/schematics/migrations/filter-bar-signals/schema.json +20 -0
- package/schematics/migrations.json +15 -0
- package/schematics/ng-add/index.js +1 -1
- package/schematics/utils/angular-parsing.js +11 -2
- package/search-expandable/index.d.ts +3 -0
- package/select/index.d.ts +59 -24
- package/sidebar/index.d.ts +1 -0
- package/skeleton/skeleton.scss +4 -0
- package/split-button/_split-button-theme.scss +2 -2
- package/splitter/_splitter-theme.scss +2 -2
- package/splitter/index.d.ts +1 -0
- package/table/_table-theme.scss +4 -0
- package/table/index.d.ts +3 -2
- package/tabs/_tabs-common.scss +60 -31
- package/tabs/_tabs-theme.scss +12 -0
- package/tabs/index.d.ts +4 -2
- package/tabs/tab-header.scss +15 -0
- package/tabs/tab-nav-bar.scss +4 -0
- package/tabs/tabs-tokens.scss +2 -1
- package/textarea/index.d.ts +0 -1
- package/time-range/time-range.scss +0 -8
- package/timepicker/timepicker.scss +2 -2
- package/timezone/index.d.ts +2 -3
- package/title/index.d.ts +92 -2
- package/tooltip/index.d.ts +124 -7
- package/tree/_tree-theme.scss +2 -7
- package/tree/index.d.ts +19 -4
- package/tree/toggle.scss +5 -0
- package/tree/tree-option.scss +0 -4
- package/tree-select/_tree-select-theme.scss +1 -1
- package/tree-select/index.d.ts +53 -22
- package/username/index.d.ts +20 -2
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Directive, contentChild, input,
|
|
2
|
+
import { Directive, contentChild, input, booleanAttribute, output, computed, effect, ViewEncapsulation, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
3
3
|
import { KbqButton } from '@koobiq/components/button';
|
|
4
4
|
import { KbqComponentColors } from '@koobiq/components/core';
|
|
5
5
|
import { KbqIconItem, KbqIcon } from '@koobiq/components/icon';
|
|
6
|
-
import { A11yModule } from '@angular/cdk/a11y';
|
|
7
|
-
import { PlatformModule } from '@angular/cdk/platform';
|
|
8
6
|
|
|
7
|
+
/** Visual style of an alert. */
|
|
9
8
|
var KbqAlertStyles;
|
|
10
9
|
(function (KbqAlertStyles) {
|
|
10
|
+
/** Neutral background; the status is conveyed by the icon color only. */
|
|
11
11
|
KbqAlertStyles["Default"] = "default";
|
|
12
|
+
/** Colored background matching the status — use to draw attention when a default alert gets lost on screen. */
|
|
12
13
|
KbqAlertStyles["Colored"] = "colored";
|
|
13
14
|
})(KbqAlertStyles || (KbqAlertStyles = {}));
|
|
15
|
+
/** Status conveyed by an alert. Drives the background (colored style) and the auto-tinted status icon. */
|
|
14
16
|
var KbqAlertColors;
|
|
15
17
|
(function (KbqAlertColors) {
|
|
16
18
|
KbqAlertColors["Error"] = "error";
|
|
@@ -18,9 +20,17 @@ var KbqAlertColors;
|
|
|
18
20
|
KbqAlertColors["Success"] = "success";
|
|
19
21
|
KbqAlertColors["Info"] = "info";
|
|
20
22
|
})(KbqAlertColors || (KbqAlertColors = {}));
|
|
23
|
+
/** Maps an alert status to the projected status icon's color. `Info` has no icon color of its own, so it uses `Contrast`. */
|
|
24
|
+
const alertIconColors = {
|
|
25
|
+
[KbqAlertColors.Error]: KbqComponentColors.Error,
|
|
26
|
+
[KbqAlertColors.Warning]: KbqComponentColors.Warning,
|
|
27
|
+
[KbqAlertColors.Success]: KbqComponentColors.Success,
|
|
28
|
+
[KbqAlertColors.Info]: KbqComponentColors.Contrast
|
|
29
|
+
};
|
|
30
|
+
/** Marks the projected alert heading. */
|
|
21
31
|
class KbqAlertTitle {
|
|
22
32
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqAlertTitle, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
23
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.25", type: KbqAlertTitle, isStandalone: true, selector: "[kbq-alert-title]", host: { classAttribute: "kbq-alert__title" }, ngImport: i0 }); }
|
|
33
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.25", type: KbqAlertTitle, isStandalone: true, selector: "[kbq-alert-title]", host: { classAttribute: "kbq-alert__title" }, exportAs: ["kbqAlertTitle"], ngImport: i0 }); }
|
|
24
34
|
}
|
|
25
35
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqAlertTitle, decorators: [{
|
|
26
36
|
type: Directive,
|
|
@@ -28,12 +38,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
28
38
|
selector: '[kbq-alert-title]',
|
|
29
39
|
host: {
|
|
30
40
|
class: 'kbq-alert__title'
|
|
31
|
-
}
|
|
41
|
+
},
|
|
42
|
+
exportAs: 'kbqAlertTitle'
|
|
32
43
|
}]
|
|
33
44
|
}] });
|
|
45
|
+
/** Marks the projected close control (place it on a native `<button>` with an accessible name). */
|
|
34
46
|
class KbqAlertCloseButton {
|
|
35
47
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqAlertCloseButton, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
36
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.25", type: KbqAlertCloseButton, isStandalone: true, selector: "[kbq-alert-close-button]", host: { classAttribute: "kbq-alert-close-button" }, ngImport: i0 }); }
|
|
48
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.25", type: KbqAlertCloseButton, isStandalone: true, selector: "[kbq-alert-close-button]", host: { classAttribute: "kbq-alert-close-button" }, exportAs: ["kbqAlertCloseButton"], ngImport: i0 }); }
|
|
37
49
|
}
|
|
38
50
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqAlertCloseButton, decorators: [{
|
|
39
51
|
type: Directive,
|
|
@@ -41,12 +53,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
41
53
|
selector: '[kbq-alert-close-button]',
|
|
42
54
|
host: {
|
|
43
55
|
class: 'kbq-alert-close-button'
|
|
44
|
-
}
|
|
56
|
+
},
|
|
57
|
+
exportAs: 'kbqAlertCloseButton'
|
|
45
58
|
}]
|
|
46
59
|
}] });
|
|
60
|
+
/** Marks a projected action control (link or button) shown in the alert's button stack. */
|
|
47
61
|
class KbqAlertControl {
|
|
48
62
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqAlertControl, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
49
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.25", type: KbqAlertControl, isStandalone: true, selector: "[kbq-alert-control]", host: { classAttribute: "kbq-alert-control" }, ngImport: i0 }); }
|
|
63
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.25", type: KbqAlertControl, isStandalone: true, selector: "[kbq-alert-control]", host: { classAttribute: "kbq-alert-control" }, exportAs: ["kbqAlertControl"], ngImport: i0 }); }
|
|
50
64
|
}
|
|
51
65
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqAlertControl, decorators: [{
|
|
52
66
|
type: Directive,
|
|
@@ -54,76 +68,102 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
54
68
|
selector: '[kbq-alert-control]',
|
|
55
69
|
host: {
|
|
56
70
|
class: 'kbq-alert-control'
|
|
57
|
-
}
|
|
71
|
+
},
|
|
72
|
+
exportAs: 'kbqAlertControl'
|
|
58
73
|
}]
|
|
59
74
|
}] });
|
|
75
|
+
/**
|
|
76
|
+
* Shows important information on a page. Can carry a hint, signal a status change, or indicate a problem.
|
|
77
|
+
*
|
|
78
|
+
* ```html
|
|
79
|
+
* <kbq-alert [alertColor]="'error'" [alertStyle]="'colored'">Something went wrong</kbq-alert>
|
|
80
|
+
* ```
|
|
81
|
+
*
|
|
82
|
+
* For a dynamically inserted alert, add `role="alert"` (or `aria-live`) on the host so assistive
|
|
83
|
+
* technology announces it — see the component guide.
|
|
84
|
+
*/
|
|
60
85
|
class KbqAlert {
|
|
61
86
|
constructor() {
|
|
62
|
-
|
|
63
|
-
this.
|
|
87
|
+
/** @docs-private */
|
|
88
|
+
this.iconItem = contentChild(KbqIconItem, ...(ngDevMode ? [{ debugName: "iconItem", descendants: false }] : [{ descendants: false }]));
|
|
89
|
+
/** @docs-private */
|
|
90
|
+
this.icon = contentChild(KbqIcon, ...(ngDevMode ? [{ debugName: "icon", descendants: false }] : [{ descendants: false }]));
|
|
91
|
+
// NB: `button` must keep the default `descendants: true` — it does not gate a projection slot, it
|
|
92
|
+
// reports whether the already-projected `[kbq-alert-control]` slot contains a button (which can sit
|
|
93
|
+
// inside a wrapper element), and drives the `_has-button` button-stack padding.
|
|
94
|
+
/** @docs-private */
|
|
64
95
|
this.button = contentChild(KbqButton, ...(ngDevMode ? [{ debugName: "button" }] : []));
|
|
65
|
-
|
|
66
|
-
this.
|
|
67
|
-
|
|
68
|
-
this.
|
|
96
|
+
/** @docs-private */
|
|
97
|
+
this.title = contentChild(KbqAlertTitle, ...(ngDevMode ? [{ debugName: "title", descendants: false }] : [{ descendants: false }]));
|
|
98
|
+
/** @docs-private */
|
|
99
|
+
this.control = contentChild(KbqAlertControl, ...(ngDevMode ? [{ debugName: "control", descendants: false }] : [{ descendants: false }]));
|
|
100
|
+
/** @docs-private */
|
|
101
|
+
this.closeButton = contentChild(KbqAlertCloseButton, ...(ngDevMode ? [{ debugName: "closeButton", descendants: false }] : [{ descendants: false }]));
|
|
102
|
+
/** Whether the alert uses the denser compact size. */
|
|
103
|
+
this.compact = input(false, ...(ngDevMode ? [{ debugName: "compact", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
104
|
+
/** Visual style — neutral `default` or the attention-drawing `colored` background. */
|
|
69
105
|
this.alertStyle = input(KbqAlertStyles.Default, ...(ngDevMode ? [{ debugName: "alertStyle" }] : []));
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
106
|
+
/**
|
|
107
|
+
* Status of the alert. Drives the background in the `colored` style and auto-tints an uncolored
|
|
108
|
+
* projected status icon to the matching color (`info` icons become `contrast`).
|
|
109
|
+
* @default 'info'
|
|
110
|
+
*/
|
|
111
|
+
this.alertColor = input(KbqAlertColors.Info, ...(ngDevMode ? [{ debugName: "alertColor", transform: (value) => value || KbqAlertColors.Info }] : [{
|
|
112
|
+
transform: (value) => value || KbqAlertColors.Info
|
|
113
|
+
}]));
|
|
114
|
+
/** Emitted when the projected close control is activated. The consumer is responsible for hiding the alert. */
|
|
115
|
+
this.closed = output();
|
|
116
|
+
/** @docs-private */
|
|
117
|
+
this.alertColorClass = computed(() => `kbq-alert_${this.alertColor()}`, ...(ngDevMode ? [{ debugName: "alertColorClass" }] : []));
|
|
118
|
+
/** @docs-private */
|
|
119
|
+
this.isColored = computed(() => this.alertStyle() === KbqAlertStyles.Colored, ...(ngDevMode ? [{ debugName: "isColored" }] : []));
|
|
120
|
+
/** The projected status icon, whichever slot it came from. @docs-private */
|
|
121
|
+
this.projectedIcon = computed(() => this.icon() || this.iconItem(), ...(ngDevMode ? [{ debugName: "projectedIcon" }] : []));
|
|
122
|
+
/** Last color this component auto-assigned to the icon; lets us correct color on change without ignoring consumer's color. */
|
|
123
|
+
this.lastAutoColor = null;
|
|
124
|
+
// Keep the uncolored projected icon in sync with the alert status, reacting to both a later
|
|
125
|
+
// `alertColor` change and a late-arriving icon. Only re-tint an icon we own — one that is still
|
|
126
|
+
// `Empty` or still carries the color we last set — so an explicit consumer `[color]` is respected.
|
|
127
|
+
effect(() => {
|
|
128
|
+
const icon = this.projectedIcon();
|
|
129
|
+
const nextColor = alertIconColors[this.alertColor()];
|
|
130
|
+
if (icon && (icon.color === KbqComponentColors.Empty || icon.color === this.lastAutoColor)) {
|
|
131
|
+
icon.color = nextColor;
|
|
132
|
+
this.lastAutoColor = nextColor;
|
|
133
|
+
}
|
|
134
|
+
});
|
|
88
135
|
}
|
|
89
136
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqAlert, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
90
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: KbqAlert, isStandalone: true, selector: "kbq-alert", inputs: { compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, alertStyle: { classPropertyName: "alertStyle", publicName: "alertStyle", isSignal: true, isRequired: false, transformFunction: null }, alertColor: { classPropertyName: "alertColor", publicName: "alertColor", isSignal: false, isRequired: false, transformFunction: null } }, host: { properties: { "class": "alertColor", "class.kbq-alert_normal": "!compact()", "class.kbq-alert_compact": "compact()", "class.kbq-alert_default": "!isColored", "class.kbq-alert_colored": "isColored", "class.kbq-alert_dismissible": "closeButton()" }, classAttribute: "kbq-alert" }, queries: [{ propertyName: "iconItem", first: true, predicate: KbqIconItem, descendants: true, isSignal: true }, { propertyName: "icon", first: true, predicate: KbqIcon, descendants: true, isSignal: true }, { propertyName: "button", first: true, predicate: KbqButton, descendants: true, isSignal: true }, { propertyName: "title", first: true, predicate: KbqAlertTitle, descendants: true, isSignal: true }, { propertyName: "control", first: true, predicate: KbqAlertControl, descendants: true, isSignal: true }, { propertyName: "closeButton", first: true, predicate: KbqAlertCloseButton, descendants: true, isSignal: true }], ngImport: i0, template: "@if (iconItem() || icon()) {\n <div class=\"kbq-alert__icon\" [class.kbq-alert__icon_title]=\"title()\">\n <ng-content select=\"[kbq-icon-item],[kbq-icon]\" />\n </div>\n}\n\n<div class=\"kbq-alert__content\" [class.kbq-alert__content_title]=\"title()\">\n <ng-content select=\"[kbq-alert-title]\" />\n\n <div class=\"kbq-alert__text\">\n <ng-content />\n </div>\n\n @if (control()) {\n <div class=\"kbq-alert__button-stack\" [class.kbq-alert__button-stack_has-button]=\"button()\">\n <ng-content select=\"[kbq-alert-control]\" />\n </div>\n }\n</div>\n\n<div class=\"kbq-alert__close-button\" [hidden]=\"!closeButton()\">\n <ng-content select=\"[kbq-alert-close-button]\" />\n</div>\n", styles: [".kbq-alert{display:flex;box-sizing:border-box}.kbq-alert .kbq-alert__content_title{margin-bottom:var(--kbq-size-xxs)}.kbq-alert__content{display:flex;flex-direction:column;flex:1;justify-content:center}.kbq-alert.kbq-alert_normal{border-radius:var(--kbq-alert-size-normal-container-border-radius);padding:var(--kbq-alert-size-normal-container-padding-top) var(--kbq-alert-size-normal-container-padding-right) var(--kbq-alert-size-normal-container-padding-bottom) var(--kbq-alert-size-normal-container-padding-left)}.kbq-alert.kbq-alert_normal .kbq-alert__icon{margin:var(--kbq-alert-size-normal-no-title-icon-margin-top) var(--kbq-alert-size-normal-icon-margin-right) var(--kbq-alert-size-normal-icon-margin-bottom) var(--kbq-alert-size-normal-icon-margin-left)}.kbq-alert.kbq-alert_normal .kbq-alert__icon.kbq-alert__icon_title{margin-top:var(--kbq-alert-size-normal-icon-margin-top);padding-top:var(--kbq-alert-size-normal-no-title-icon-padding-top)}.kbq-alert.kbq-alert_normal .kbq-alert__icon{display:inline-flex;align-items:flex-start}.kbq-alert.kbq-alert_normal .kbq-alert__content{padding:var(--kbq-alert-size-normal-content-padding-top) var(--kbq-alert-size-normal-content-padding-right) var(--kbq-alert-size-normal-content-padding-bottom) var(--kbq-alert-size-normal-content-padding-left)}.kbq-alert.kbq-alert_normal .kbq-alert__title{margin-bottom:var(--kbq-alert-size-normal-title-margin-bottom)}.kbq-alert.kbq-alert_normal .kbq-alert__button-stack{padding-top:var(--kbq-alert-size-normal-button-stack-padding-top);padding-bottom:var(--kbq-alert-size-normal-button-stack-padding-bottom)}.kbq-alert.kbq-alert_normal .kbq-alert__button-stack_has-button{padding-top:12px}.kbq-alert.kbq-alert_normal .kbq-alert__close-button{margin-top:var(--kbq-alert-size-normal-close-button-margin-top);margin-left:var(--kbq-alert-size-normal-close-button-margin-left)}.kbq-alert.kbq-alert_normal .kbq-alert__close-button .kbq-icon-button{--kbq-icon-button-size-normal-horizontal-padding: 4px;--kbq-icon-button-size-normal-vertical-padding: 4px}.kbq-alert.kbq-alert_compact{border-radius:var(--kbq-alert-size-compact-container-border-radius);padding:var(--kbq-alert-size-compact-container-padding-top) var(--kbq-alert-size-compact-container-padding-right) var(--kbq-alert-size-compact-container-padding-bottom) var(--kbq-alert-size-compact-container-padding-left)}.kbq-alert.kbq-alert_compact .kbq-alert__icon{margin-top:var(--kbq-alert-size-compact-no-title-icon-margin-top);margin-right:var(--kbq-alert-size-compact-icon-margin-right);padding-top:var(--kbq-alert-size-compact-no-title-icon-padding-top)}.kbq-alert.kbq-alert_compact .kbq-alert__icon.kbq-alert__icon_title{margin-top:var(--kbq-alert-size-compact-icon-margin-top);padding-top:var(--kbq-alert-size-compact-icon-padding-top)}.kbq-alert.kbq-alert_compact .kbq-alert__icon{display:inline-flex;align-items:flex-start}.kbq-alert.kbq-alert_compact .kbq-alert__content{padding:var(--kbq-alert-size-compact-content-padding-top) var(--kbq-alert-size-compact-content-padding-right) var(--kbq-alert-size-compact-content-padding-bottom) var(--kbq-alert-size-compact-content-padding-left)}.kbq-alert.kbq-alert_compact .kbq-alert__title{margin-bottom:var(--kbq-alert-size-compact-title-margin-bottom)}.kbq-alert.kbq-alert_compact .kbq-alert__button-stack{padding-top:var(--kbq-alert-size-compact-button-stack-padding-top);padding-bottom:var(--kbq-alert-size-compact-button-stack-padding-bottom)}.kbq-alert.kbq-alert_compact .kbq-alert__button-stack_has-button{padding-top:12px}.kbq-alert.kbq-alert_compact .kbq-alert__close-button{margin-top:var(--kbq-alert-size-compact-close-button-margin-top);margin-left:var(--kbq-alert-size-compact-close-button-margin-left)}.kbq-alert.kbq-alert_compact .kbq-alert__close-button .kbq-icon-button{--kbq-icon-button-size-normal-horizontal-padding: 4px;--kbq-icon-button-size-normal-vertical-padding: 4px}.kbq-alert__close:focus{outline:none}.kbq-alert.kbq-alert_default.kbq-alert_error{background:var(--kbq-alert-default-error-container-background)}.kbq-alert.kbq-alert_default.kbq-alert_error .kbq-alert__title{color:var(--kbq-alert-default-error-container-title)}.kbq-alert.kbq-alert_default.kbq-alert_error .kbq-alert__text{color:var(--kbq-alert-default-error-container-text)}.kbq-alert.kbq-alert_default.kbq-alert_warning{background:var(--kbq-alert-default-warning-container-background)}.kbq-alert.kbq-alert_default.kbq-alert_warning .kbq-alert__title{color:var(--kbq-alert-default-warning-container-title)}.kbq-alert.kbq-alert_default.kbq-alert_warning .kbq-alert__text{color:var(--kbq-alert-default-warning-container-text)}.kbq-alert.kbq-alert_default.kbq-alert_success{background:var(--kbq-alert-default-success-container-background)}.kbq-alert.kbq-alert_default.kbq-alert_success .kbq-alert__title{color:var(--kbq-alert-default-success-container-title)}.kbq-alert.kbq-alert_default.kbq-alert_success .kbq-alert__text{color:var(--kbq-alert-default-success-container-text)}.kbq-alert.kbq-alert_default.kbq-alert_info{background:var(--kbq-alert-default-info-container-background)}.kbq-alert.kbq-alert_default.kbq-alert_info .kbq-alert__title{color:var(--kbq-alert-default-info-container-title)}.kbq-alert.kbq-alert_default.kbq-alert_info .kbq-alert__text{color:var(--kbq-alert-default-info-container-text)}.kbq-alert.kbq-alert_colored.kbq-alert_error{background:var(--kbq-alert-colored-error-container-background)}.kbq-alert.kbq-alert_colored.kbq-alert_error .kbq-alert__title{color:var(--kbq-alert-colored-error-container-title)}.kbq-alert.kbq-alert_colored.kbq-alert_error .kbq-alert__text{color:var(--kbq-alert-colored-error-container-text)}.kbq-alert.kbq-alert_colored.kbq-alert_warning{background:var(--kbq-alert-colored-warning-container-background)}.kbq-alert.kbq-alert_colored.kbq-alert_warning .kbq-alert__title{color:var(--kbq-alert-colored-warning-container-title)}.kbq-alert.kbq-alert_colored.kbq-alert_warning .kbq-alert__text{color:var(--kbq-alert-colored-warning-container-text)}.kbq-alert.kbq-alert_colored.kbq-alert_success{background:var(--kbq-alert-colored-success-container-background)}.kbq-alert.kbq-alert_colored.kbq-alert_success .kbq-alert__title{color:var(--kbq-alert-colored-success-container-title)}.kbq-alert.kbq-alert_colored.kbq-alert_success .kbq-alert__text{color:var(--kbq-alert-colored-success-container-text)}.kbq-alert.kbq-alert_colored.kbq-alert_info{background:var(--kbq-alert-colored-info-container-background)}.kbq-alert.kbq-alert_colored.kbq-alert_info .kbq-alert__title{color:var(--kbq-alert-colored-info-container-title)}.kbq-alert.kbq-alert_colored.kbq-alert_info .kbq-alert__text{color:var(--kbq-alert-colored-info-container-text)}.kbq-alert{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}.kbq-alert .kbq-alert__title{font-size:var(--kbq-typography-subheading-font-size);font-style:var(--kbq-typography-subheading-font-style);font-weight:var(--kbq-typography-subheading-font-weight);line-height:var(--kbq-typography-subheading-line-height);font-family:var(--kbq-typography-subheading-font-family);text-transform:var(--kbq-typography-subheading-text-transform);font-feature-settings:var(--kbq-typography-subheading-font-feature-settings);letter-spacing:var(--kbq-typography-subheading-letter-spacing)}.kbq-alert.kbq-alert_compact .kbq-alert__title{font-size:var(--kbq-typography-text-big-strong-font-size);font-style:var(--kbq-typography-text-big-strong-font-style);font-weight:var(--kbq-typography-text-big-strong-font-weight);line-height:var(--kbq-typography-text-big-strong-line-height);font-family:var(--kbq-typography-text-big-strong-font-family);text-transform:var(--kbq-typography-text-big-strong-text-transform);font-feature-settings:var(--kbq-typography-text-big-strong-font-feature-settings);letter-spacing:var(--kbq-typography-text-big-strong-letter-spacing)}\n", ":where(.kbq-alert){--kbq-alert-size-normal-container-border-radius: var(--kbq-size-m);--kbq-alert-size-normal-container-padding-top: 0;--kbq-alert-size-normal-container-padding-right: var(--kbq-size-s);--kbq-alert-size-normal-container-padding-bottom: 0;--kbq-alert-size-normal-container-padding-left: var(--kbq-size-s);--kbq-alert-size-normal-content-padding-top: var(--kbq-size-l);--kbq-alert-size-normal-content-padding-right: var(--kbq-size-s);--kbq-alert-size-normal-content-padding-bottom: var(--kbq-size-l);--kbq-alert-size-normal-content-padding-left: var(--kbq-size-m);--kbq-alert-size-normal-icon-margin-top: var(--kbq-size-l);--kbq-alert-size-normal-icon-margin-right: 0;--kbq-alert-size-normal-icon-margin-bottom: var(--kbq-size-l);--kbq-alert-size-normal-icon-margin-left: var(--kbq-size-m);--kbq-alert-size-normal-icon-padding-top: var(--kbq-size-xxs);--kbq-alert-size-normal-title-margin-bottom: var(--kbq-size-xxs);--kbq-alert-size-normal-close-button-margin-top: 10px;--kbq-alert-size-normal-close-button-margin-left: var(--kbq-size-3xs);--kbq-alert-size-normal-button-stack-padding-top: var(--kbq-size-s);--kbq-alert-size-normal-button-stack-padding-bottom: var(--kbq-size-3xs);--kbq-alert-size-normal-no-title-icon-margin-top: var(--kbq-size-l);--kbq-alert-size-normal-no-title-icon-padding-top: var(--kbq-size-3xs);--kbq-alert-size-compact-container-border-radius: var(--kbq-size-m);--kbq-alert-size-compact-container-padding-top: 0;--kbq-alert-size-compact-container-padding-right: var(--kbq-size-s);--kbq-alert-size-compact-container-padding-bottom: 0;--kbq-alert-size-compact-container-padding-left: var(--kbq-size-l);--kbq-alert-size-compact-content-padding-top: var(--kbq-size-m);--kbq-alert-size-compact-content-padding-right: var(--kbq-size-s);--kbq-alert-size-compact-content-padding-bottom: var(--kbq-size-m);--kbq-alert-size-compact-content-padding-left: 0;--kbq-alert-size-compact-icon-margin-top: var(--kbq-size-m);--kbq-alert-size-compact-icon-margin-right: var(--kbq-size-s);--kbq-alert-size-compact-icon-padding-top: var(--kbq-size-xxs);--kbq-alert-size-compact-title-margin-bottom: var(--kbq-size-3xs);--kbq-alert-size-compact-close-button-margin-top: 10px;--kbq-alert-size-compact-close-button-margin-left: var(--kbq-size-3xs);--kbq-alert-size-compact-button-stack-padding-top: var(--kbq-size-s);--kbq-alert-size-compact-button-stack-padding-bottom: var(--kbq-size-3xs);--kbq-alert-size-compact-no-title-icon-margin-top: var(--kbq-size-m);--kbq-alert-size-compact-no-title-icon-padding-top: var(--kbq-size-3xs);--kbq-alert-default-error-container-background: var(--kbq-background-contrast-fade);--kbq-alert-default-error-container-title: var(--kbq-foreground-contrast);--kbq-alert-default-error-container-text: var(--kbq-foreground-contrast);--kbq-alert-default-warning-container-background: var(--kbq-background-contrast-fade);--kbq-alert-default-warning-container-title: var(--kbq-foreground-contrast);--kbq-alert-default-warning-container-text: var(--kbq-foreground-contrast);--kbq-alert-default-success-container-background: var(--kbq-background-contrast-fade);--kbq-alert-default-success-container-title: var(--kbq-foreground-contrast);--kbq-alert-default-success-container-text: var(--kbq-foreground-contrast);--kbq-alert-default-info-container-background: var(--kbq-background-contrast-fade);--kbq-alert-default-info-container-title: var(--kbq-foreground-contrast);--kbq-alert-default-info-container-text: var(--kbq-foreground-contrast);--kbq-alert-colored-error-container-background: var(--kbq-background-error-less);--kbq-alert-colored-error-container-title: var(--kbq-foreground-contrast);--kbq-alert-colored-error-container-text: var(--kbq-foreground-contrast);--kbq-alert-colored-warning-container-background: var(--kbq-background-warning-less);--kbq-alert-colored-warning-container-title: var(--kbq-foreground-contrast);--kbq-alert-colored-warning-container-text: var(--kbq-foreground-contrast);--kbq-alert-colored-success-container-background: var(--kbq-background-success-less);--kbq-alert-colored-success-container-title: var(--kbq-foreground-contrast);--kbq-alert-colored-success-container-text: var(--kbq-foreground-contrast);--kbq-alert-colored-info-container-background: var(--kbq-background-theme-less);--kbq-alert-colored-info-container-title: var(--kbq-foreground-contrast);--kbq-alert-colored-info-container-text: var(--kbq-foreground-contrast)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
137
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: KbqAlert, isStandalone: true, selector: "kbq-alert", inputs: { compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, alertStyle: { classPropertyName: "alertStyle", publicName: "alertStyle", isSignal: true, isRequired: false, transformFunction: null }, alertColor: { classPropertyName: "alertColor", publicName: "alertColor", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, host: { properties: { "class": "alertColorClass()", "class.kbq-alert_normal": "!compact()", "class.kbq-alert_compact": "compact()", "class.kbq-alert_default": "!isColored()", "class.kbq-alert_colored": "isColored()", "class.kbq-alert_dismissible": "closeButton()" }, classAttribute: "kbq-alert" }, queries: [{ propertyName: "iconItem", first: true, predicate: KbqIconItem, isSignal: true }, { propertyName: "icon", first: true, predicate: KbqIcon, isSignal: true }, { propertyName: "button", first: true, predicate: KbqButton, descendants: true, isSignal: true }, { propertyName: "title", first: true, predicate: KbqAlertTitle, isSignal: true }, { propertyName: "control", first: true, predicate: KbqAlertControl, isSignal: true }, { propertyName: "closeButton", first: true, predicate: KbqAlertCloseButton, isSignal: true }], exportAs: ["kbqAlert"], ngImport: i0, template: "@if (projectedIcon()) {\n <div class=\"kbq-alert__icon\" [class.kbq-alert__icon_title]=\"title()\">\n <ng-content select=\"[kbq-icon-item],[kbq-icon]\" />\n </div>\n}\n\n<div class=\"kbq-alert__content\" [class.kbq-alert__content_title]=\"title()\">\n <ng-content select=\"[kbq-alert-title]\" />\n\n <div class=\"kbq-alert__text\">\n <ng-content />\n </div>\n\n @if (control()) {\n <div class=\"kbq-alert__button-stack\" [class.kbq-alert__button-stack_has-button]=\"button()\">\n <ng-content select=\"[kbq-alert-control]\" />\n </div>\n }\n</div>\n\n@if (closeButton()) {\n <div class=\"kbq-alert__close-button\" (click)=\"closed.emit()\">\n <ng-content select=\"[kbq-alert-close-button]\" />\n </div>\n}\n", styles: [".kbq-alert{display:flex;box-sizing:border-box}.kbq-alert .kbq-alert__content_title{margin-bottom:var(--kbq-size-xxs)}.kbq-alert__icon{display:inline-flex;align-items:flex-start}.kbq-alert__content{display:flex;flex-direction:column;flex:1;justify-content:center}.kbq-alert.kbq-alert_normal{border-radius:var(--kbq-alert-size-normal-container-border-radius);padding:var(--kbq-alert-size-normal-container-padding-top) var(--kbq-alert-size-normal-container-padding-right) var(--kbq-alert-size-normal-container-padding-bottom) var(--kbq-alert-size-normal-container-padding-left)}.kbq-alert.kbq-alert_normal .kbq-alert__icon{margin:var(--kbq-alert-size-normal-no-title-icon-margin-top) var(--kbq-alert-size-normal-icon-margin-right) var(--kbq-alert-size-normal-icon-margin-bottom) var(--kbq-alert-size-normal-icon-margin-left);padding-top:var(--kbq-alert-size-normal-no-title-icon-padding-top)}.kbq-alert.kbq-alert_normal .kbq-alert__icon.kbq-alert__icon_title{margin-top:var(--kbq-alert-size-normal-icon-margin-top);padding-top:var(--kbq-alert-size-normal-icon-padding-top)}.kbq-alert.kbq-alert_normal .kbq-alert__content{padding:var(--kbq-alert-size-normal-content-padding-top) var(--kbq-alert-size-normal-content-padding-right) var(--kbq-alert-size-normal-content-padding-bottom) var(--kbq-alert-size-normal-content-padding-left)}.kbq-alert.kbq-alert_normal .kbq-alert__title{margin-bottom:var(--kbq-alert-size-normal-title-margin-bottom)}.kbq-alert.kbq-alert_normal .kbq-alert__button-stack{display:flex;flex-wrap:wrap;align-items:center;gap:var(--kbq-size-m);padding-top:var(--kbq-alert-size-normal-button-stack-padding-top);padding-bottom:var(--kbq-alert-size-normal-button-stack-padding-bottom)}.kbq-alert.kbq-alert_normal .kbq-alert__button-stack_has-button{padding-top:var(--kbq-size-m)}.kbq-alert.kbq-alert_normal .kbq-alert__close-button{margin-top:var(--kbq-alert-size-normal-close-button-margin-top);margin-left:var(--kbq-alert-size-normal-close-button-margin-left)}.kbq-alert.kbq-alert_normal .kbq-alert__close-button .kbq-icon-button{--kbq-icon-button-size-normal-horizontal-padding: var(--kbq-size-xxs);--kbq-icon-button-size-normal-vertical-padding: var(--kbq-size-xxs)}.kbq-alert.kbq-alert_compact{border-radius:var(--kbq-alert-size-compact-container-border-radius);padding:var(--kbq-alert-size-compact-container-padding-top) var(--kbq-alert-size-compact-container-padding-right) var(--kbq-alert-size-compact-container-padding-bottom) var(--kbq-alert-size-compact-container-padding-left)}.kbq-alert.kbq-alert_compact .kbq-alert__icon{margin-top:var(--kbq-alert-size-compact-no-title-icon-margin-top);margin-right:var(--kbq-alert-size-compact-icon-margin-right);padding-top:var(--kbq-alert-size-compact-no-title-icon-padding-top)}.kbq-alert.kbq-alert_compact .kbq-alert__icon.kbq-alert__icon_title{margin-top:var(--kbq-alert-size-compact-icon-margin-top);padding-top:var(--kbq-alert-size-compact-icon-padding-top)}.kbq-alert.kbq-alert_compact .kbq-alert__content{padding:var(--kbq-alert-size-compact-content-padding-top) var(--kbq-alert-size-compact-content-padding-right) var(--kbq-alert-size-compact-content-padding-bottom) var(--kbq-alert-size-compact-content-padding-left)}.kbq-alert.kbq-alert_compact .kbq-alert__title{margin-bottom:var(--kbq-alert-size-compact-title-margin-bottom)}.kbq-alert.kbq-alert_compact .kbq-alert__button-stack{display:flex;flex-wrap:wrap;align-items:center;gap:var(--kbq-size-m);padding-top:var(--kbq-alert-size-compact-button-stack-padding-top);padding-bottom:var(--kbq-alert-size-compact-button-stack-padding-bottom)}.kbq-alert.kbq-alert_compact .kbq-alert__button-stack_has-button{padding-top:var(--kbq-size-m)}.kbq-alert.kbq-alert_compact .kbq-alert__close-button{margin-top:var(--kbq-alert-size-compact-close-button-margin-top);margin-left:var(--kbq-alert-size-compact-close-button-margin-left)}.kbq-alert.kbq-alert_compact .kbq-alert__close-button .kbq-icon-button{--kbq-icon-button-size-normal-horizontal-padding: var(--kbq-size-xxs);--kbq-icon-button-size-normal-vertical-padding: var(--kbq-size-xxs)}.kbq-alert.kbq-alert_default.kbq-alert_error{background:var(--kbq-alert-default-error-container-background)}.kbq-alert.kbq-alert_default.kbq-alert_error .kbq-alert__title{color:var(--kbq-alert-default-error-container-title)}.kbq-alert.kbq-alert_default.kbq-alert_error .kbq-alert__text{color:var(--kbq-alert-default-error-container-text)}.kbq-alert.kbq-alert_default.kbq-alert_warning{background:var(--kbq-alert-default-warning-container-background)}.kbq-alert.kbq-alert_default.kbq-alert_warning .kbq-alert__title{color:var(--kbq-alert-default-warning-container-title)}.kbq-alert.kbq-alert_default.kbq-alert_warning .kbq-alert__text{color:var(--kbq-alert-default-warning-container-text)}.kbq-alert.kbq-alert_default.kbq-alert_success{background:var(--kbq-alert-default-success-container-background)}.kbq-alert.kbq-alert_default.kbq-alert_success .kbq-alert__title{color:var(--kbq-alert-default-success-container-title)}.kbq-alert.kbq-alert_default.kbq-alert_success .kbq-alert__text{color:var(--kbq-alert-default-success-container-text)}.kbq-alert.kbq-alert_default.kbq-alert_info{background:var(--kbq-alert-default-info-container-background)}.kbq-alert.kbq-alert_default.kbq-alert_info .kbq-alert__title{color:var(--kbq-alert-default-info-container-title)}.kbq-alert.kbq-alert_default.kbq-alert_info .kbq-alert__text{color:var(--kbq-alert-default-info-container-text)}.kbq-alert.kbq-alert_default .kbq-alert__icon>.kbq-icon:not(.kbq-icon-item,.kbq-icon-button){--kbq-icon-warning-color: var(--kbq-foreground-warning);--kbq-icon-success-color: var(--kbq-foreground-success)}.kbq-alert.kbq-alert_colored.kbq-alert_error{background:var(--kbq-alert-colored-error-container-background)}.kbq-alert.kbq-alert_colored.kbq-alert_error .kbq-alert__title{color:var(--kbq-alert-colored-error-container-title)}.kbq-alert.kbq-alert_colored.kbq-alert_error .kbq-alert__text{color:var(--kbq-alert-colored-error-container-text)}.kbq-alert.kbq-alert_colored.kbq-alert_warning{background:var(--kbq-alert-colored-warning-container-background)}.kbq-alert.kbq-alert_colored.kbq-alert_warning .kbq-alert__title{color:var(--kbq-alert-colored-warning-container-title)}.kbq-alert.kbq-alert_colored.kbq-alert_warning .kbq-alert__text{color:var(--kbq-alert-colored-warning-container-text)}.kbq-alert.kbq-alert_colored.kbq-alert_success{background:var(--kbq-alert-colored-success-container-background)}.kbq-alert.kbq-alert_colored.kbq-alert_success .kbq-alert__title{color:var(--kbq-alert-colored-success-container-title)}.kbq-alert.kbq-alert_colored.kbq-alert_success .kbq-alert__text{color:var(--kbq-alert-colored-success-container-text)}.kbq-alert.kbq-alert_colored.kbq-alert_info{background:var(--kbq-alert-colored-info-container-background)}.kbq-alert.kbq-alert_colored.kbq-alert_info .kbq-alert__title{color:var(--kbq-alert-colored-info-container-title)}.kbq-alert.kbq-alert_colored.kbq-alert_info .kbq-alert__text{color:var(--kbq-alert-colored-info-container-text)}.kbq-alert{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}.kbq-alert .kbq-alert__title{font-size:var(--kbq-typography-subheading-font-size);font-style:var(--kbq-typography-subheading-font-style);font-weight:var(--kbq-typography-subheading-font-weight);line-height:var(--kbq-typography-subheading-line-height);font-family:var(--kbq-typography-subheading-font-family);text-transform:var(--kbq-typography-subheading-text-transform);font-feature-settings:var(--kbq-typography-subheading-font-feature-settings);letter-spacing:var(--kbq-typography-subheading-letter-spacing)}.kbq-alert.kbq-alert_compact .kbq-alert__title{font-size:var(--kbq-typography-text-big-strong-font-size);font-style:var(--kbq-typography-text-big-strong-font-style);font-weight:var(--kbq-typography-text-big-strong-font-weight);line-height:var(--kbq-typography-text-big-strong-line-height);font-family:var(--kbq-typography-text-big-strong-font-family);text-transform:var(--kbq-typography-text-big-strong-text-transform);font-feature-settings:var(--kbq-typography-text-big-strong-font-feature-settings);letter-spacing:var(--kbq-typography-text-big-strong-letter-spacing)}\n", ":where(.kbq-alert){--kbq-alert-size-normal-container-border-radius: var(--kbq-size-m);--kbq-alert-size-normal-container-padding-top: 0;--kbq-alert-size-normal-container-padding-right: var(--kbq-size-s);--kbq-alert-size-normal-container-padding-bottom: 0;--kbq-alert-size-normal-container-padding-left: var(--kbq-size-s);--kbq-alert-size-normal-content-padding-top: var(--kbq-size-l);--kbq-alert-size-normal-content-padding-right: var(--kbq-size-s);--kbq-alert-size-normal-content-padding-bottom: var(--kbq-size-l);--kbq-alert-size-normal-content-padding-left: var(--kbq-size-m);--kbq-alert-size-normal-icon-margin-top: var(--kbq-size-l);--kbq-alert-size-normal-icon-margin-right: 0;--kbq-alert-size-normal-icon-margin-bottom: var(--kbq-size-l);--kbq-alert-size-normal-icon-margin-left: var(--kbq-size-m);--kbq-alert-size-normal-icon-padding-top: var(--kbq-size-xxs);--kbq-alert-size-normal-title-margin-bottom: var(--kbq-size-xxs);--kbq-alert-size-normal-close-button-margin-top: 10px;--kbq-alert-size-normal-close-button-margin-left: var(--kbq-size-3xs);--kbq-alert-size-normal-button-stack-padding-top: var(--kbq-size-s);--kbq-alert-size-normal-button-stack-padding-bottom: var(--kbq-size-3xs);--kbq-alert-size-normal-no-title-icon-margin-top: var(--kbq-size-l);--kbq-alert-size-normal-no-title-icon-padding-top: var(--kbq-size-3xs);--kbq-alert-size-compact-container-border-radius: var(--kbq-size-m);--kbq-alert-size-compact-container-padding-top: 0;--kbq-alert-size-compact-container-padding-right: var(--kbq-size-s);--kbq-alert-size-compact-container-padding-bottom: 0;--kbq-alert-size-compact-container-padding-left: var(--kbq-size-l);--kbq-alert-size-compact-content-padding-top: var(--kbq-size-m);--kbq-alert-size-compact-content-padding-right: var(--kbq-size-s);--kbq-alert-size-compact-content-padding-bottom: var(--kbq-size-m);--kbq-alert-size-compact-content-padding-left: 0;--kbq-alert-size-compact-icon-margin-top: var(--kbq-size-m);--kbq-alert-size-compact-icon-margin-right: var(--kbq-size-s);--kbq-alert-size-compact-icon-padding-top: var(--kbq-size-xxs);--kbq-alert-size-compact-title-margin-bottom: var(--kbq-size-3xs);--kbq-alert-size-compact-close-button-margin-top: 10px;--kbq-alert-size-compact-close-button-margin-left: var(--kbq-size-3xs);--kbq-alert-size-compact-button-stack-padding-top: var(--kbq-size-s);--kbq-alert-size-compact-button-stack-padding-bottom: var(--kbq-size-3xs);--kbq-alert-size-compact-no-title-icon-margin-top: var(--kbq-size-m);--kbq-alert-size-compact-no-title-icon-padding-top: var(--kbq-size-3xs);--kbq-alert-default-error-container-background: var(--kbq-background-contrast-less);--kbq-alert-default-error-container-title: var(--kbq-foreground-contrast);--kbq-alert-default-error-container-text: var(--kbq-foreground-contrast);--kbq-alert-default-warning-container-background: var(--kbq-background-contrast-less);--kbq-alert-default-warning-container-title: var(--kbq-foreground-contrast);--kbq-alert-default-warning-container-text: var(--kbq-foreground-contrast);--kbq-alert-default-success-container-background: var(--kbq-background-contrast-less);--kbq-alert-default-success-container-title: var(--kbq-foreground-contrast);--kbq-alert-default-success-container-text: var(--kbq-foreground-contrast);--kbq-alert-default-info-container-background: var(--kbq-background-contrast-less);--kbq-alert-default-info-container-title: var(--kbq-foreground-contrast);--kbq-alert-default-info-container-text: var(--kbq-foreground-contrast);--kbq-alert-colored-error-container-background: var(--kbq-background-error-less);--kbq-alert-colored-error-container-title: var(--kbq-foreground-contrast);--kbq-alert-colored-error-container-text: var(--kbq-foreground-contrast);--kbq-alert-colored-warning-container-background: var(--kbq-background-warning-less);--kbq-alert-colored-warning-container-title: var(--kbq-foreground-contrast);--kbq-alert-colored-warning-container-text: var(--kbq-foreground-contrast);--kbq-alert-colored-success-container-background: var(--kbq-background-success-less);--kbq-alert-colored-success-container-title: var(--kbq-foreground-contrast);--kbq-alert-colored-success-container-text: var(--kbq-foreground-contrast);--kbq-alert-colored-info-container-background: var(--kbq-background-theme-less);--kbq-alert-colored-info-container-title: var(--kbq-foreground-contrast);--kbq-alert-colored-info-container-text: var(--kbq-foreground-contrast)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
91
138
|
}
|
|
92
139
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqAlert, decorators: [{
|
|
93
140
|
type: Component,
|
|
94
141
|
args: [{ selector: 'kbq-alert', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
95
142
|
class: 'kbq-alert',
|
|
96
|
-
'[class]': '
|
|
143
|
+
'[class]': 'alertColorClass()',
|
|
97
144
|
'[class.kbq-alert_normal]': '!compact()',
|
|
98
145
|
'[class.kbq-alert_compact]': 'compact()',
|
|
99
|
-
'[class.kbq-alert_default]': '!isColored',
|
|
100
|
-
'[class.kbq-alert_colored]': 'isColored',
|
|
146
|
+
'[class.kbq-alert_default]': '!isColored()',
|
|
147
|
+
'[class.kbq-alert_colored]': 'isColored()',
|
|
101
148
|
'[class.kbq-alert_dismissible]': 'closeButton()'
|
|
102
|
-
}, template: "@if (iconItem() || icon()) {\n <div class=\"kbq-alert__icon\" [class.kbq-alert__icon_title]=\"title()\">\n <ng-content select=\"[kbq-icon-item],[kbq-icon]\" />\n </div>\n}\n\n<div class=\"kbq-alert__content\" [class.kbq-alert__content_title]=\"title()\">\n <ng-content select=\"[kbq-alert-title]\" />\n\n <div class=\"kbq-alert__text\">\n <ng-content />\n </div>\n\n @if (control()) {\n <div class=\"kbq-alert__button-stack\" [class.kbq-alert__button-stack_has-button]=\"button()\">\n <ng-content select=\"[kbq-alert-control]\" />\n </div>\n }\n</div>\n\n<div class=\"kbq-alert__close-button\" [hidden]=\"!closeButton()\">\n <ng-content select=\"[kbq-alert-close-button]\" />\n</div>\n", styles: [".kbq-alert{display:flex;box-sizing:border-box}.kbq-alert .kbq-alert__content_title{margin-bottom:var(--kbq-size-xxs)}.kbq-alert__content{display:flex;flex-direction:column;flex:1;justify-content:center}.kbq-alert.kbq-alert_normal{border-radius:var(--kbq-alert-size-normal-container-border-radius);padding:var(--kbq-alert-size-normal-container-padding-top) var(--kbq-alert-size-normal-container-padding-right) var(--kbq-alert-size-normal-container-padding-bottom) var(--kbq-alert-size-normal-container-padding-left)}.kbq-alert.kbq-alert_normal .kbq-alert__icon{margin:var(--kbq-alert-size-normal-no-title-icon-margin-top) var(--kbq-alert-size-normal-icon-margin-right) var(--kbq-alert-size-normal-icon-margin-bottom) var(--kbq-alert-size-normal-icon-margin-left)}.kbq-alert.kbq-alert_normal .kbq-alert__icon.kbq-alert__icon_title{margin-top:var(--kbq-alert-size-normal-icon-margin-top);padding-top:var(--kbq-alert-size-normal-no-title-icon-padding-top)}.kbq-alert.kbq-alert_normal .kbq-alert__icon{display:inline-flex;align-items:flex-start}.kbq-alert.kbq-alert_normal .kbq-alert__content{padding:var(--kbq-alert-size-normal-content-padding-top) var(--kbq-alert-size-normal-content-padding-right) var(--kbq-alert-size-normal-content-padding-bottom) var(--kbq-alert-size-normal-content-padding-left)}.kbq-alert.kbq-alert_normal .kbq-alert__title{margin-bottom:var(--kbq-alert-size-normal-title-margin-bottom)}.kbq-alert.kbq-alert_normal .kbq-alert__button-stack{padding-top:var(--kbq-alert-size-normal-button-stack-padding-top);padding-bottom:var(--kbq-alert-size-normal-button-stack-padding-bottom)}.kbq-alert.kbq-alert_normal .kbq-alert__button-stack_has-button{padding-top:12px}.kbq-alert.kbq-alert_normal .kbq-alert__close-button{margin-top:var(--kbq-alert-size-normal-close-button-margin-top);margin-left:var(--kbq-alert-size-normal-close-button-margin-left)}.kbq-alert.kbq-alert_normal .kbq-alert__close-button .kbq-icon-button{--kbq-icon-button-size-normal-horizontal-padding: 4px;--kbq-icon-button-size-normal-vertical-padding: 4px}.kbq-alert.kbq-alert_compact{border-radius:var(--kbq-alert-size-compact-container-border-radius);padding:var(--kbq-alert-size-compact-container-padding-top) var(--kbq-alert-size-compact-container-padding-right) var(--kbq-alert-size-compact-container-padding-bottom) var(--kbq-alert-size-compact-container-padding-left)}.kbq-alert.kbq-alert_compact .kbq-alert__icon{margin-top:var(--kbq-alert-size-compact-no-title-icon-margin-top);margin-right:var(--kbq-alert-size-compact-icon-margin-right);padding-top:var(--kbq-alert-size-compact-no-title-icon-padding-top)}.kbq-alert.kbq-alert_compact .kbq-alert__icon.kbq-alert__icon_title{margin-top:var(--kbq-alert-size-compact-icon-margin-top);padding-top:var(--kbq-alert-size-compact-icon-padding-top)}.kbq-alert.kbq-alert_compact .kbq-alert__icon{display:inline-flex;align-items:flex-start}.kbq-alert.kbq-alert_compact .kbq-alert__content{padding:var(--kbq-alert-size-compact-content-padding-top) var(--kbq-alert-size-compact-content-padding-right) var(--kbq-alert-size-compact-content-padding-bottom) var(--kbq-alert-size-compact-content-padding-left)}.kbq-alert.kbq-alert_compact .kbq-alert__title{margin-bottom:var(--kbq-alert-size-compact-title-margin-bottom)}.kbq-alert.kbq-alert_compact .kbq-alert__button-stack{padding-top:var(--kbq-alert-size-compact-button-stack-padding-top);padding-bottom:var(--kbq-alert-size-compact-button-stack-padding-bottom)}.kbq-alert.kbq-alert_compact .kbq-alert__button-stack_has-button{padding-top:12px}.kbq-alert.kbq-alert_compact .kbq-alert__close-button{margin-top:var(--kbq-alert-size-compact-close-button-margin-top);margin-left:var(--kbq-alert-size-compact-close-button-margin-left)}.kbq-alert.kbq-alert_compact .kbq-alert__close-button .kbq-icon-button{--kbq-icon-button-size-normal-horizontal-padding: 4px;--kbq-icon-button-size-normal-vertical-padding: 4px}.kbq-alert__close:focus{outline:none}.kbq-alert.kbq-alert_default.kbq-alert_error{background:var(--kbq-alert-default-error-container-background)}.kbq-alert.kbq-alert_default.kbq-alert_error .kbq-alert__title{color:var(--kbq-alert-default-error-container-title)}.kbq-alert.kbq-alert_default.kbq-alert_error .kbq-alert__text{color:var(--kbq-alert-default-error-container-text)}.kbq-alert.kbq-alert_default.kbq-alert_warning{background:var(--kbq-alert-default-warning-container-background)}.kbq-alert.kbq-alert_default.kbq-alert_warning .kbq-alert__title{color:var(--kbq-alert-default-warning-container-title)}.kbq-alert.kbq-alert_default.kbq-alert_warning .kbq-alert__text{color:var(--kbq-alert-default-warning-container-text)}.kbq-alert.kbq-alert_default.kbq-alert_success{background:var(--kbq-alert-default-success-container-background)}.kbq-alert.kbq-alert_default.kbq-alert_success .kbq-alert__title{color:var(--kbq-alert-default-success-container-title)}.kbq-alert.kbq-alert_default.kbq-alert_success .kbq-alert__text{color:var(--kbq-alert-default-success-container-text)}.kbq-alert.kbq-alert_default.kbq-alert_info{background:var(--kbq-alert-default-info-container-background)}.kbq-alert.kbq-alert_default.kbq-alert_info .kbq-alert__title{color:var(--kbq-alert-default-info-container-title)}.kbq-alert.kbq-alert_default.kbq-alert_info .kbq-alert__text{color:var(--kbq-alert-default-info-container-text)}.kbq-alert.kbq-alert_colored.kbq-alert_error{background:var(--kbq-alert-colored-error-container-background)}.kbq-alert.kbq-alert_colored.kbq-alert_error .kbq-alert__title{color:var(--kbq-alert-colored-error-container-title)}.kbq-alert.kbq-alert_colored.kbq-alert_error .kbq-alert__text{color:var(--kbq-alert-colored-error-container-text)}.kbq-alert.kbq-alert_colored.kbq-alert_warning{background:var(--kbq-alert-colored-warning-container-background)}.kbq-alert.kbq-alert_colored.kbq-alert_warning .kbq-alert__title{color:var(--kbq-alert-colored-warning-container-title)}.kbq-alert.kbq-alert_colored.kbq-alert_warning .kbq-alert__text{color:var(--kbq-alert-colored-warning-container-text)}.kbq-alert.kbq-alert_colored.kbq-alert_success{background:var(--kbq-alert-colored-success-container-background)}.kbq-alert.kbq-alert_colored.kbq-alert_success .kbq-alert__title{color:var(--kbq-alert-colored-success-container-title)}.kbq-alert.kbq-alert_colored.kbq-alert_success .kbq-alert__text{color:var(--kbq-alert-colored-success-container-text)}.kbq-alert.kbq-alert_colored.kbq-alert_info{background:var(--kbq-alert-colored-info-container-background)}.kbq-alert.kbq-alert_colored.kbq-alert_info .kbq-alert__title{color:var(--kbq-alert-colored-info-container-title)}.kbq-alert.kbq-alert_colored.kbq-alert_info .kbq-alert__text{color:var(--kbq-alert-colored-info-container-text)}.kbq-alert{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}.kbq-alert .kbq-alert__title{font-size:var(--kbq-typography-subheading-font-size);font-style:var(--kbq-typography-subheading-font-style);font-weight:var(--kbq-typography-subheading-font-weight);line-height:var(--kbq-typography-subheading-line-height);font-family:var(--kbq-typography-subheading-font-family);text-transform:var(--kbq-typography-subheading-text-transform);font-feature-settings:var(--kbq-typography-subheading-font-feature-settings);letter-spacing:var(--kbq-typography-subheading-letter-spacing)}.kbq-alert.kbq-alert_compact .kbq-alert__title{font-size:var(--kbq-typography-text-big-strong-font-size);font-style:var(--kbq-typography-text-big-strong-font-style);font-weight:var(--kbq-typography-text-big-strong-font-weight);line-height:var(--kbq-typography-text-big-strong-line-height);font-family:var(--kbq-typography-text-big-strong-font-family);text-transform:var(--kbq-typography-text-big-strong-text-transform);font-feature-settings:var(--kbq-typography-text-big-strong-font-feature-settings);letter-spacing:var(--kbq-typography-text-big-strong-letter-spacing)}\n", ":where(.kbq-alert){--kbq-alert-size-normal-container-border-radius: var(--kbq-size-m);--kbq-alert-size-normal-container-padding-top: 0;--kbq-alert-size-normal-container-padding-right: var(--kbq-size-s);--kbq-alert-size-normal-container-padding-bottom: 0;--kbq-alert-size-normal-container-padding-left: var(--kbq-size-s);--kbq-alert-size-normal-content-padding-top: var(--kbq-size-l);--kbq-alert-size-normal-content-padding-right: var(--kbq-size-s);--kbq-alert-size-normal-content-padding-bottom: var(--kbq-size-l);--kbq-alert-size-normal-content-padding-left: var(--kbq-size-m);--kbq-alert-size-normal-icon-margin-top: var(--kbq-size-l);--kbq-alert-size-normal-icon-margin-right: 0;--kbq-alert-size-normal-icon-margin-bottom: var(--kbq-size-l);--kbq-alert-size-normal-icon-margin-left: var(--kbq-size-m);--kbq-alert-size-normal-icon-padding-top: var(--kbq-size-xxs);--kbq-alert-size-normal-title-margin-bottom: var(--kbq-size-xxs);--kbq-alert-size-normal-close-button-margin-top: 10px;--kbq-alert-size-normal-close-button-margin-left: var(--kbq-size-3xs);--kbq-alert-size-normal-button-stack-padding-top: var(--kbq-size-s);--kbq-alert-size-normal-button-stack-padding-bottom: var(--kbq-size-3xs);--kbq-alert-size-normal-no-title-icon-margin-top: var(--kbq-size-l);--kbq-alert-size-normal-no-title-icon-padding-top: var(--kbq-size-3xs);--kbq-alert-size-compact-container-border-radius: var(--kbq-size-m);--kbq-alert-size-compact-container-padding-top: 0;--kbq-alert-size-compact-container-padding-right: var(--kbq-size-s);--kbq-alert-size-compact-container-padding-bottom: 0;--kbq-alert-size-compact-container-padding-left: var(--kbq-size-l);--kbq-alert-size-compact-content-padding-top: var(--kbq-size-m);--kbq-alert-size-compact-content-padding-right: var(--kbq-size-s);--kbq-alert-size-compact-content-padding-bottom: var(--kbq-size-m);--kbq-alert-size-compact-content-padding-left: 0;--kbq-alert-size-compact-icon-margin-top: var(--kbq-size-m);--kbq-alert-size-compact-icon-margin-right: var(--kbq-size-s);--kbq-alert-size-compact-icon-padding-top: var(--kbq-size-xxs);--kbq-alert-size-compact-title-margin-bottom: var(--kbq-size-3xs);--kbq-alert-size-compact-close-button-margin-top: 10px;--kbq-alert-size-compact-close-button-margin-left: var(--kbq-size-3xs);--kbq-alert-size-compact-button-stack-padding-top: var(--kbq-size-s);--kbq-alert-size-compact-button-stack-padding-bottom: var(--kbq-size-3xs);--kbq-alert-size-compact-no-title-icon-margin-top: var(--kbq-size-m);--kbq-alert-size-compact-no-title-icon-padding-top: var(--kbq-size-3xs);--kbq-alert-default-error-container-background: var(--kbq-background-contrast-fade);--kbq-alert-default-error-container-title: var(--kbq-foreground-contrast);--kbq-alert-default-error-container-text: var(--kbq-foreground-contrast);--kbq-alert-default-warning-container-background: var(--kbq-background-contrast-fade);--kbq-alert-default-warning-container-title: var(--kbq-foreground-contrast);--kbq-alert-default-warning-container-text: var(--kbq-foreground-contrast);--kbq-alert-default-success-container-background: var(--kbq-background-contrast-fade);--kbq-alert-default-success-container-title: var(--kbq-foreground-contrast);--kbq-alert-default-success-container-text: var(--kbq-foreground-contrast);--kbq-alert-default-info-container-background: var(--kbq-background-contrast-fade);--kbq-alert-default-info-container-title: var(--kbq-foreground-contrast);--kbq-alert-default-info-container-text: var(--kbq-foreground-contrast);--kbq-alert-colored-error-container-background: var(--kbq-background-error-less);--kbq-alert-colored-error-container-title: var(--kbq-foreground-contrast);--kbq-alert-colored-error-container-text: var(--kbq-foreground-contrast);--kbq-alert-colored-warning-container-background: var(--kbq-background-warning-less);--kbq-alert-colored-warning-container-title: var(--kbq-foreground-contrast);--kbq-alert-colored-warning-container-text: var(--kbq-foreground-contrast);--kbq-alert-colored-success-container-background: var(--kbq-background-success-less);--kbq-alert-colored-success-container-title: var(--kbq-foreground-contrast);--kbq-alert-colored-success-container-text: var(--kbq-foreground-contrast);--kbq-alert-colored-info-container-background: var(--kbq-background-theme-less);--kbq-alert-colored-info-container-title: var(--kbq-foreground-contrast);--kbq-alert-colored-info-container-text: var(--kbq-foreground-contrast)}\n"] }]
|
|
103
|
-
}], propDecorators: { iconItem: [{ type: i0.ContentChild, args: [i0.forwardRef(() => KbqIconItem), { isSignal: true }] }], icon: [{ type: i0.ContentChild, args: [i0.forwardRef(() => KbqIcon), { isSignal: true }] }], button: [{ type: i0.ContentChild, args: [i0.forwardRef(() => KbqButton), { isSignal: true }] }], title: [{ type: i0.ContentChild, args: [i0.forwardRef(() => KbqAlertTitle), { isSignal: true }] }], control: [{ type: i0.ContentChild, args: [i0.forwardRef(() => KbqAlertControl), { isSignal: true }] }], closeButton: [{ type: i0.ContentChild, args: [i0.forwardRef(() => KbqAlertCloseButton), { isSignal: true }] }], compact: [{ type: i0.Input, args: [{ isSignal: true, alias: "compact", required: false }] }], alertStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "alertStyle", required: false }] }], alertColor: [{
|
|
104
|
-
type: Input
|
|
105
|
-
}] } });
|
|
149
|
+
}, exportAs: 'kbqAlert', template: "@if (projectedIcon()) {\n <div class=\"kbq-alert__icon\" [class.kbq-alert__icon_title]=\"title()\">\n <ng-content select=\"[kbq-icon-item],[kbq-icon]\" />\n </div>\n}\n\n<div class=\"kbq-alert__content\" [class.kbq-alert__content_title]=\"title()\">\n <ng-content select=\"[kbq-alert-title]\" />\n\n <div class=\"kbq-alert__text\">\n <ng-content />\n </div>\n\n @if (control()) {\n <div class=\"kbq-alert__button-stack\" [class.kbq-alert__button-stack_has-button]=\"button()\">\n <ng-content select=\"[kbq-alert-control]\" />\n </div>\n }\n</div>\n\n@if (closeButton()) {\n <div class=\"kbq-alert__close-button\" (click)=\"closed.emit()\">\n <ng-content select=\"[kbq-alert-close-button]\" />\n </div>\n}\n", styles: [".kbq-alert{display:flex;box-sizing:border-box}.kbq-alert .kbq-alert__content_title{margin-bottom:var(--kbq-size-xxs)}.kbq-alert__icon{display:inline-flex;align-items:flex-start}.kbq-alert__content{display:flex;flex-direction:column;flex:1;justify-content:center}.kbq-alert.kbq-alert_normal{border-radius:var(--kbq-alert-size-normal-container-border-radius);padding:var(--kbq-alert-size-normal-container-padding-top) var(--kbq-alert-size-normal-container-padding-right) var(--kbq-alert-size-normal-container-padding-bottom) var(--kbq-alert-size-normal-container-padding-left)}.kbq-alert.kbq-alert_normal .kbq-alert__icon{margin:var(--kbq-alert-size-normal-no-title-icon-margin-top) var(--kbq-alert-size-normal-icon-margin-right) var(--kbq-alert-size-normal-icon-margin-bottom) var(--kbq-alert-size-normal-icon-margin-left);padding-top:var(--kbq-alert-size-normal-no-title-icon-padding-top)}.kbq-alert.kbq-alert_normal .kbq-alert__icon.kbq-alert__icon_title{margin-top:var(--kbq-alert-size-normal-icon-margin-top);padding-top:var(--kbq-alert-size-normal-icon-padding-top)}.kbq-alert.kbq-alert_normal .kbq-alert__content{padding:var(--kbq-alert-size-normal-content-padding-top) var(--kbq-alert-size-normal-content-padding-right) var(--kbq-alert-size-normal-content-padding-bottom) var(--kbq-alert-size-normal-content-padding-left)}.kbq-alert.kbq-alert_normal .kbq-alert__title{margin-bottom:var(--kbq-alert-size-normal-title-margin-bottom)}.kbq-alert.kbq-alert_normal .kbq-alert__button-stack{display:flex;flex-wrap:wrap;align-items:center;gap:var(--kbq-size-m);padding-top:var(--kbq-alert-size-normal-button-stack-padding-top);padding-bottom:var(--kbq-alert-size-normal-button-stack-padding-bottom)}.kbq-alert.kbq-alert_normal .kbq-alert__button-stack_has-button{padding-top:var(--kbq-size-m)}.kbq-alert.kbq-alert_normal .kbq-alert__close-button{margin-top:var(--kbq-alert-size-normal-close-button-margin-top);margin-left:var(--kbq-alert-size-normal-close-button-margin-left)}.kbq-alert.kbq-alert_normal .kbq-alert__close-button .kbq-icon-button{--kbq-icon-button-size-normal-horizontal-padding: var(--kbq-size-xxs);--kbq-icon-button-size-normal-vertical-padding: var(--kbq-size-xxs)}.kbq-alert.kbq-alert_compact{border-radius:var(--kbq-alert-size-compact-container-border-radius);padding:var(--kbq-alert-size-compact-container-padding-top) var(--kbq-alert-size-compact-container-padding-right) var(--kbq-alert-size-compact-container-padding-bottom) var(--kbq-alert-size-compact-container-padding-left)}.kbq-alert.kbq-alert_compact .kbq-alert__icon{margin-top:var(--kbq-alert-size-compact-no-title-icon-margin-top);margin-right:var(--kbq-alert-size-compact-icon-margin-right);padding-top:var(--kbq-alert-size-compact-no-title-icon-padding-top)}.kbq-alert.kbq-alert_compact .kbq-alert__icon.kbq-alert__icon_title{margin-top:var(--kbq-alert-size-compact-icon-margin-top);padding-top:var(--kbq-alert-size-compact-icon-padding-top)}.kbq-alert.kbq-alert_compact .kbq-alert__content{padding:var(--kbq-alert-size-compact-content-padding-top) var(--kbq-alert-size-compact-content-padding-right) var(--kbq-alert-size-compact-content-padding-bottom) var(--kbq-alert-size-compact-content-padding-left)}.kbq-alert.kbq-alert_compact .kbq-alert__title{margin-bottom:var(--kbq-alert-size-compact-title-margin-bottom)}.kbq-alert.kbq-alert_compact .kbq-alert__button-stack{display:flex;flex-wrap:wrap;align-items:center;gap:var(--kbq-size-m);padding-top:var(--kbq-alert-size-compact-button-stack-padding-top);padding-bottom:var(--kbq-alert-size-compact-button-stack-padding-bottom)}.kbq-alert.kbq-alert_compact .kbq-alert__button-stack_has-button{padding-top:var(--kbq-size-m)}.kbq-alert.kbq-alert_compact .kbq-alert__close-button{margin-top:var(--kbq-alert-size-compact-close-button-margin-top);margin-left:var(--kbq-alert-size-compact-close-button-margin-left)}.kbq-alert.kbq-alert_compact .kbq-alert__close-button .kbq-icon-button{--kbq-icon-button-size-normal-horizontal-padding: var(--kbq-size-xxs);--kbq-icon-button-size-normal-vertical-padding: var(--kbq-size-xxs)}.kbq-alert.kbq-alert_default.kbq-alert_error{background:var(--kbq-alert-default-error-container-background)}.kbq-alert.kbq-alert_default.kbq-alert_error .kbq-alert__title{color:var(--kbq-alert-default-error-container-title)}.kbq-alert.kbq-alert_default.kbq-alert_error .kbq-alert__text{color:var(--kbq-alert-default-error-container-text)}.kbq-alert.kbq-alert_default.kbq-alert_warning{background:var(--kbq-alert-default-warning-container-background)}.kbq-alert.kbq-alert_default.kbq-alert_warning .kbq-alert__title{color:var(--kbq-alert-default-warning-container-title)}.kbq-alert.kbq-alert_default.kbq-alert_warning .kbq-alert__text{color:var(--kbq-alert-default-warning-container-text)}.kbq-alert.kbq-alert_default.kbq-alert_success{background:var(--kbq-alert-default-success-container-background)}.kbq-alert.kbq-alert_default.kbq-alert_success .kbq-alert__title{color:var(--kbq-alert-default-success-container-title)}.kbq-alert.kbq-alert_default.kbq-alert_success .kbq-alert__text{color:var(--kbq-alert-default-success-container-text)}.kbq-alert.kbq-alert_default.kbq-alert_info{background:var(--kbq-alert-default-info-container-background)}.kbq-alert.kbq-alert_default.kbq-alert_info .kbq-alert__title{color:var(--kbq-alert-default-info-container-title)}.kbq-alert.kbq-alert_default.kbq-alert_info .kbq-alert__text{color:var(--kbq-alert-default-info-container-text)}.kbq-alert.kbq-alert_default .kbq-alert__icon>.kbq-icon:not(.kbq-icon-item,.kbq-icon-button){--kbq-icon-warning-color: var(--kbq-foreground-warning);--kbq-icon-success-color: var(--kbq-foreground-success)}.kbq-alert.kbq-alert_colored.kbq-alert_error{background:var(--kbq-alert-colored-error-container-background)}.kbq-alert.kbq-alert_colored.kbq-alert_error .kbq-alert__title{color:var(--kbq-alert-colored-error-container-title)}.kbq-alert.kbq-alert_colored.kbq-alert_error .kbq-alert__text{color:var(--kbq-alert-colored-error-container-text)}.kbq-alert.kbq-alert_colored.kbq-alert_warning{background:var(--kbq-alert-colored-warning-container-background)}.kbq-alert.kbq-alert_colored.kbq-alert_warning .kbq-alert__title{color:var(--kbq-alert-colored-warning-container-title)}.kbq-alert.kbq-alert_colored.kbq-alert_warning .kbq-alert__text{color:var(--kbq-alert-colored-warning-container-text)}.kbq-alert.kbq-alert_colored.kbq-alert_success{background:var(--kbq-alert-colored-success-container-background)}.kbq-alert.kbq-alert_colored.kbq-alert_success .kbq-alert__title{color:var(--kbq-alert-colored-success-container-title)}.kbq-alert.kbq-alert_colored.kbq-alert_success .kbq-alert__text{color:var(--kbq-alert-colored-success-container-text)}.kbq-alert.kbq-alert_colored.kbq-alert_info{background:var(--kbq-alert-colored-info-container-background)}.kbq-alert.kbq-alert_colored.kbq-alert_info .kbq-alert__title{color:var(--kbq-alert-colored-info-container-title)}.kbq-alert.kbq-alert_colored.kbq-alert_info .kbq-alert__text{color:var(--kbq-alert-colored-info-container-text)}.kbq-alert{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}.kbq-alert .kbq-alert__title{font-size:var(--kbq-typography-subheading-font-size);font-style:var(--kbq-typography-subheading-font-style);font-weight:var(--kbq-typography-subheading-font-weight);line-height:var(--kbq-typography-subheading-line-height);font-family:var(--kbq-typography-subheading-font-family);text-transform:var(--kbq-typography-subheading-text-transform);font-feature-settings:var(--kbq-typography-subheading-font-feature-settings);letter-spacing:var(--kbq-typography-subheading-letter-spacing)}.kbq-alert.kbq-alert_compact .kbq-alert__title{font-size:var(--kbq-typography-text-big-strong-font-size);font-style:var(--kbq-typography-text-big-strong-font-style);font-weight:var(--kbq-typography-text-big-strong-font-weight);line-height:var(--kbq-typography-text-big-strong-line-height);font-family:var(--kbq-typography-text-big-strong-font-family);text-transform:var(--kbq-typography-text-big-strong-text-transform);font-feature-settings:var(--kbq-typography-text-big-strong-font-feature-settings);letter-spacing:var(--kbq-typography-text-big-strong-letter-spacing)}\n", ":where(.kbq-alert){--kbq-alert-size-normal-container-border-radius: var(--kbq-size-m);--kbq-alert-size-normal-container-padding-top: 0;--kbq-alert-size-normal-container-padding-right: var(--kbq-size-s);--kbq-alert-size-normal-container-padding-bottom: 0;--kbq-alert-size-normal-container-padding-left: var(--kbq-size-s);--kbq-alert-size-normal-content-padding-top: var(--kbq-size-l);--kbq-alert-size-normal-content-padding-right: var(--kbq-size-s);--kbq-alert-size-normal-content-padding-bottom: var(--kbq-size-l);--kbq-alert-size-normal-content-padding-left: var(--kbq-size-m);--kbq-alert-size-normal-icon-margin-top: var(--kbq-size-l);--kbq-alert-size-normal-icon-margin-right: 0;--kbq-alert-size-normal-icon-margin-bottom: var(--kbq-size-l);--kbq-alert-size-normal-icon-margin-left: var(--kbq-size-m);--kbq-alert-size-normal-icon-padding-top: var(--kbq-size-xxs);--kbq-alert-size-normal-title-margin-bottom: var(--kbq-size-xxs);--kbq-alert-size-normal-close-button-margin-top: 10px;--kbq-alert-size-normal-close-button-margin-left: var(--kbq-size-3xs);--kbq-alert-size-normal-button-stack-padding-top: var(--kbq-size-s);--kbq-alert-size-normal-button-stack-padding-bottom: var(--kbq-size-3xs);--kbq-alert-size-normal-no-title-icon-margin-top: var(--kbq-size-l);--kbq-alert-size-normal-no-title-icon-padding-top: var(--kbq-size-3xs);--kbq-alert-size-compact-container-border-radius: var(--kbq-size-m);--kbq-alert-size-compact-container-padding-top: 0;--kbq-alert-size-compact-container-padding-right: var(--kbq-size-s);--kbq-alert-size-compact-container-padding-bottom: 0;--kbq-alert-size-compact-container-padding-left: var(--kbq-size-l);--kbq-alert-size-compact-content-padding-top: var(--kbq-size-m);--kbq-alert-size-compact-content-padding-right: var(--kbq-size-s);--kbq-alert-size-compact-content-padding-bottom: var(--kbq-size-m);--kbq-alert-size-compact-content-padding-left: 0;--kbq-alert-size-compact-icon-margin-top: var(--kbq-size-m);--kbq-alert-size-compact-icon-margin-right: var(--kbq-size-s);--kbq-alert-size-compact-icon-padding-top: var(--kbq-size-xxs);--kbq-alert-size-compact-title-margin-bottom: var(--kbq-size-3xs);--kbq-alert-size-compact-close-button-margin-top: 10px;--kbq-alert-size-compact-close-button-margin-left: var(--kbq-size-3xs);--kbq-alert-size-compact-button-stack-padding-top: var(--kbq-size-s);--kbq-alert-size-compact-button-stack-padding-bottom: var(--kbq-size-3xs);--kbq-alert-size-compact-no-title-icon-margin-top: var(--kbq-size-m);--kbq-alert-size-compact-no-title-icon-padding-top: var(--kbq-size-3xs);--kbq-alert-default-error-container-background: var(--kbq-background-contrast-less);--kbq-alert-default-error-container-title: var(--kbq-foreground-contrast);--kbq-alert-default-error-container-text: var(--kbq-foreground-contrast);--kbq-alert-default-warning-container-background: var(--kbq-background-contrast-less);--kbq-alert-default-warning-container-title: var(--kbq-foreground-contrast);--kbq-alert-default-warning-container-text: var(--kbq-foreground-contrast);--kbq-alert-default-success-container-background: var(--kbq-background-contrast-less);--kbq-alert-default-success-container-title: var(--kbq-foreground-contrast);--kbq-alert-default-success-container-text: var(--kbq-foreground-contrast);--kbq-alert-default-info-container-background: var(--kbq-background-contrast-less);--kbq-alert-default-info-container-title: var(--kbq-foreground-contrast);--kbq-alert-default-info-container-text: var(--kbq-foreground-contrast);--kbq-alert-colored-error-container-background: var(--kbq-background-error-less);--kbq-alert-colored-error-container-title: var(--kbq-foreground-contrast);--kbq-alert-colored-error-container-text: var(--kbq-foreground-contrast);--kbq-alert-colored-warning-container-background: var(--kbq-background-warning-less);--kbq-alert-colored-warning-container-title: var(--kbq-foreground-contrast);--kbq-alert-colored-warning-container-text: var(--kbq-foreground-contrast);--kbq-alert-colored-success-container-background: var(--kbq-background-success-less);--kbq-alert-colored-success-container-title: var(--kbq-foreground-contrast);--kbq-alert-colored-success-container-text: var(--kbq-foreground-contrast);--kbq-alert-colored-info-container-background: var(--kbq-background-theme-less);--kbq-alert-colored-info-container-title: var(--kbq-foreground-contrast);--kbq-alert-colored-info-container-text: var(--kbq-foreground-contrast)}\n"] }]
|
|
150
|
+
}], ctorParameters: () => [], propDecorators: { iconItem: [{ type: i0.ContentChild, args: [i0.forwardRef(() => KbqIconItem), { ...{ descendants: false }, isSignal: true }] }], icon: [{ type: i0.ContentChild, args: [i0.forwardRef(() => KbqIcon), { ...{ descendants: false }, isSignal: true }] }], button: [{ type: i0.ContentChild, args: [i0.forwardRef(() => KbqButton), { isSignal: true }] }], title: [{ type: i0.ContentChild, args: [i0.forwardRef(() => KbqAlertTitle), { ...{ descendants: false }, isSignal: true }] }], control: [{ type: i0.ContentChild, args: [i0.forwardRef(() => KbqAlertControl), { ...{ descendants: false }, isSignal: true }] }], closeButton: [{ type: i0.ContentChild, args: [i0.forwardRef(() => KbqAlertCloseButton), { ...{ descendants: false }, isSignal: true }] }], compact: [{ type: i0.Input, args: [{ isSignal: true, alias: "compact", required: false }] }], alertStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "alertStyle", required: false }] }], alertColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "alertColor", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }] } });
|
|
106
151
|
|
|
107
152
|
class KbqAlertModule {
|
|
108
153
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqAlertModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
109
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.25", ngImport: i0, type: KbqAlertModule, imports: [
|
|
110
|
-
PlatformModule,
|
|
111
|
-
KbqAlert,
|
|
154
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.25", ngImport: i0, type: KbqAlertModule, imports: [KbqAlert,
|
|
112
155
|
KbqAlertTitle,
|
|
113
156
|
KbqAlertCloseButton,
|
|
114
157
|
KbqAlertControl], exports: [KbqAlert,
|
|
115
158
|
KbqAlertTitle,
|
|
116
159
|
KbqAlertCloseButton,
|
|
117
160
|
KbqAlertControl] }); }
|
|
118
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqAlertModule
|
|
119
|
-
PlatformModule] }); }
|
|
161
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqAlertModule }); }
|
|
120
162
|
}
|
|
121
163
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqAlertModule, decorators: [{
|
|
122
164
|
type: NgModule,
|
|
123
165
|
args: [{
|
|
124
166
|
imports: [
|
|
125
|
-
A11yModule,
|
|
126
|
-
PlatformModule,
|
|
127
167
|
KbqAlert,
|
|
128
168
|
KbqAlertTitle,
|
|
129
169
|
KbqAlertCloseButton,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"koobiq-components-alert.mjs","sources":["../../../packages/components/alert/alert.component.ts","../../../packages/components/alert/alert.component.html","../../../packages/components/alert/alert.module.ts","../../../packages/components/alert/koobiq-components-alert.ts"],"sourcesContent":["import {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n Directive,\n Input,\n ViewEncapsulation,\n contentChild,\n input\n} from '@angular/core';\nimport { KbqButton } from '@koobiq/components/button';\nimport { KbqComponentColors } from '@koobiq/components/core';\nimport { KbqIcon, KbqIconItem } from '@koobiq/components/icon';\n\nexport enum KbqAlertStyles {\n Default = 'default',\n Colored = 'colored'\n}\n\nexport enum KbqAlertColors {\n Error = 'error',\n Warning = 'warning',\n Success = 'success',\n Info = 'info'\n}\n\n@Directive({\n selector: '[kbq-alert-title]',\n host: {\n class: 'kbq-alert__title'\n }\n})\nexport class KbqAlertTitle {}\n\n@Directive({\n selector: '[kbq-alert-close-button]',\n host: {\n class: 'kbq-alert-close-button'\n }\n})\nexport class KbqAlertCloseButton {}\n\n@Directive({\n selector: '[kbq-alert-control]',\n host: {\n class: 'kbq-alert-control'\n }\n})\nexport class KbqAlertControl {}\n\n@Component({\n selector: 'kbq-alert',\n templateUrl: './alert.component.html',\n styleUrls: ['alert.component.scss', 'alert-tokens.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'kbq-alert',\n '[class]': 'alertColor',\n '[class.kbq-alert_normal]': '!compact()',\n '[class.kbq-alert_compact]': 'compact()',\n '[class.kbq-alert_default]': '!isColored',\n '[class.kbq-alert_colored]': 'isColored',\n '[class.kbq-alert_dismissible]': 'closeButton()'\n }\n})\nexport class KbqAlert implements AfterContentInit {\n readonly iconItem = contentChild(KbqIconItem);\n readonly icon = contentChild(KbqIcon);\n readonly button = contentChild(KbqButton);\n readonly title = contentChild(KbqAlertTitle);\n readonly control = contentChild(KbqAlertControl);\n readonly closeButton = contentChild(KbqAlertCloseButton);\n\n readonly compact = input<boolean>(false);\n readonly alertStyle = input<KbqAlertStyles | string>(KbqAlertStyles.Default);\n\n // TODO: Skipped for migration because:\n // Accessor inputs cannot be migrated as they are too complex.\n @Input()\n get alertColor(): string {\n return `kbq-alert_${this._alertColor}`;\n }\n\n set alertColor(value: string | KbqAlertColors) {\n this._alertColor = value || KbqAlertColors.Info;\n }\n\n private _alertColor: string | KbqAlertColors = KbqAlertColors.Info;\n\n get isColored(): boolean {\n return this.alertStyle() === KbqAlertStyles.Colored;\n }\n\n ngAfterContentInit(): void {\n const icon = this.icon() || this.iconItem();\n\n if (icon?.color === KbqComponentColors.Empty) {\n icon.color = this._alertColor === KbqAlertColors.Info ? KbqComponentColors.Contrast : this._alertColor;\n }\n }\n}\n","@if (iconItem() || icon()) {\n <div class=\"kbq-alert__icon\" [class.kbq-alert__icon_title]=\"title()\">\n <ng-content select=\"[kbq-icon-item],[kbq-icon]\" />\n </div>\n}\n\n<div class=\"kbq-alert__content\" [class.kbq-alert__content_title]=\"title()\">\n <ng-content select=\"[kbq-alert-title]\" />\n\n <div class=\"kbq-alert__text\">\n <ng-content />\n </div>\n\n @if (control()) {\n <div class=\"kbq-alert__button-stack\" [class.kbq-alert__button-stack_has-button]=\"button()\">\n <ng-content select=\"[kbq-alert-control]\" />\n </div>\n }\n</div>\n\n<div class=\"kbq-alert__close-button\" [hidden]=\"!closeButton()\">\n <ng-content select=\"[kbq-alert-close-button]\" />\n</div>\n","import { A11yModule } from '@angular/cdk/a11y';\nimport { PlatformModule } from '@angular/cdk/platform';\nimport { NgModule } from '@angular/core';\nimport { KbqAlert, KbqAlertCloseButton, KbqAlertControl, KbqAlertTitle } from './alert.component';\n\n@NgModule({\n imports: [\n A11yModule,\n PlatformModule,\n KbqAlert,\n KbqAlertTitle,\n KbqAlertCloseButton,\n KbqAlertControl\n ],\n exports: [\n KbqAlert,\n KbqAlertTitle,\n KbqAlertCloseButton,\n KbqAlertControl\n ]\n})\nexport class KbqAlertModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;IAcY;AAAZ,CAAA,UAAY,cAAc,EAAA;AACtB,IAAA,cAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,cAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACvB,CAAC,EAHW,cAAc,KAAd,cAAc,GAAA,EAAA,CAAA,CAAA;IAKd;AAAZ,CAAA,UAAY,cAAc,EAAA;AACtB,IAAA,cAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,cAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,cAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,cAAA,CAAA,MAAA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AAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,YAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,CAAA;sBAOtD;;;ME1DQ,cAAc,CAAA;kIAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAd,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YAdnB,UAAU;YACV,cAAc;YACd,QAAQ;YACR,aAAa;YACb,mBAAmB;AACnB,YAAA,eAAe,aAGf,QAAQ;YACR,aAAa;YACb,mBAAmB;YACnB,eAAe,CAAA,EAAA,CAAA,CAAA;AAGV,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YAdnB,UAAU;YACV,cAAc,CAAA,EAAA,CAAA,CAAA;;4FAaT,cAAc,EAAA,UAAA,EAAA,CAAA;kBAhB1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,UAAU;wBACV,cAAc;wBACd,QAAQ;wBACR,aAAa;wBACb,mBAAmB;wBACnB;AACH,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,QAAQ;wBACR,aAAa;wBACb,mBAAmB;wBACnB;AACH;AACJ,iBAAA;;;ACpBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"koobiq-components-alert.mjs","sources":["../../../packages/components/alert/alert.component.ts","../../../packages/components/alert/alert.component.html","../../../packages/components/alert/alert.module.ts","../../../packages/components/alert/koobiq-components-alert.ts"],"sourcesContent":["import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n Directive,\n effect,\n input,\n output,\n ViewEncapsulation\n} from '@angular/core';\nimport { KbqButton } from '@koobiq/components/button';\nimport { KbqComponentColors, KbqEnumValues } from '@koobiq/components/core';\nimport { KbqIcon, KbqIconItem } from '@koobiq/components/icon';\n\n/** Visual style of an alert. */\nexport enum KbqAlertStyles {\n /** Neutral background; the status is conveyed by the icon color only. */\n Default = 'default',\n /** Colored background matching the status — use to draw attention when a default alert gets lost on screen. */\n Colored = 'colored'\n}\n\n/** Status conveyed by an alert. Drives the background (colored style) and the auto-tinted status icon. */\nexport enum KbqAlertColors {\n Error = 'error',\n Warning = 'warning',\n Success = 'success',\n Info = 'info'\n}\n\n/** Maps an alert status to the projected status icon's color. `Info` has no icon color of its own, so it uses `Contrast`. */\nconst alertIconColors: Record<KbqEnumValues<KbqAlertColors>, KbqComponentColors> = {\n [KbqAlertColors.Error]: KbqComponentColors.Error,\n [KbqAlertColors.Warning]: KbqComponentColors.Warning,\n [KbqAlertColors.Success]: KbqComponentColors.Success,\n [KbqAlertColors.Info]: KbqComponentColors.Contrast\n};\n\n/** Marks the projected alert heading. */\n@Directive({\n selector: '[kbq-alert-title]',\n host: {\n class: 'kbq-alert__title'\n },\n exportAs: 'kbqAlertTitle'\n})\nexport class KbqAlertTitle {}\n\n/** Marks the projected close control (place it on a native `<button>` with an accessible name). */\n@Directive({\n selector: '[kbq-alert-close-button]',\n host: {\n class: 'kbq-alert-close-button'\n },\n exportAs: 'kbqAlertCloseButton'\n})\nexport class KbqAlertCloseButton {}\n\n/** Marks a projected action control (link or button) shown in the alert's button stack. */\n@Directive({\n selector: '[kbq-alert-control]',\n host: {\n class: 'kbq-alert-control'\n },\n exportAs: 'kbqAlertControl'\n})\nexport class KbqAlertControl {}\n\n/**\n * Shows important information on a page. Can carry a hint, signal a status change, or indicate a problem.\n *\n * ```html\n * <kbq-alert [alertColor]=\"'error'\" [alertStyle]=\"'colored'\">Something went wrong</kbq-alert>\n * ```\n *\n * For a dynamically inserted alert, add `role=\"alert\"` (or `aria-live`) on the host so assistive\n * technology announces it — see the component guide.\n */\n@Component({\n selector: 'kbq-alert',\n templateUrl: './alert.component.html',\n styleUrls: ['alert.component.scss', 'alert-tokens.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'kbq-alert',\n '[class]': 'alertColorClass()',\n '[class.kbq-alert_normal]': '!compact()',\n '[class.kbq-alert_compact]': 'compact()',\n '[class.kbq-alert_default]': '!isColored()',\n '[class.kbq-alert_colored]': 'isColored()',\n '[class.kbq-alert_dismissible]': 'closeButton()'\n },\n exportAs: 'kbqAlert'\n})\nexport class KbqAlert {\n /** @docs-private */\n protected readonly iconItem = contentChild(KbqIconItem, { descendants: false });\n /** @docs-private */\n protected readonly icon = contentChild(KbqIcon, { descendants: false });\n // NB: `button` must keep the default `descendants: true` — it does not gate a projection slot, it\n // reports whether the already-projected `[kbq-alert-control]` slot contains a button (which can sit\n // inside a wrapper element), and drives the `_has-button` button-stack padding.\n /** @docs-private */\n protected readonly button = contentChild(KbqButton);\n /** @docs-private */\n protected readonly title = contentChild(KbqAlertTitle, { descendants: false });\n /** @docs-private */\n protected readonly control = contentChild(KbqAlertControl, { descendants: false });\n /** @docs-private */\n protected readonly closeButton = contentChild(KbqAlertCloseButton, { descendants: false });\n\n /** Whether the alert uses the denser compact size. */\n readonly compact = input(false, { transform: booleanAttribute });\n\n /** Visual style — neutral `default` or the attention-drawing `colored` background. */\n readonly alertStyle = input<KbqEnumValues<KbqAlertStyles>>(KbqAlertStyles.Default);\n\n /**\n * Status of the alert. Drives the background in the `colored` style and auto-tints an uncolored\n * projected status icon to the matching color (`info` icons become `contrast`).\n * @default 'info'\n */\n readonly alertColor = input(KbqAlertColors.Info, {\n transform: (value: KbqEnumValues<KbqAlertColors> | null | undefined): KbqEnumValues<KbqAlertColors> =>\n value || KbqAlertColors.Info\n });\n\n /** Emitted when the projected close control is activated. The consumer is responsible for hiding the alert. */\n readonly closed = output<void>();\n\n /** @docs-private */\n protected readonly alertColorClass = computed(() => `kbq-alert_${this.alertColor()}`);\n /** @docs-private */\n protected readonly isColored = computed(() => this.alertStyle() === KbqAlertStyles.Colored);\n /** The projected status icon, whichever slot it came from. @docs-private */\n protected readonly projectedIcon = computed(() => this.icon() || this.iconItem());\n\n /** Last color this component auto-assigned to the icon; lets us correct color on change without ignoring consumer's color. */\n private lastAutoColor: KbqComponentColors | null = null;\n\n constructor() {\n // Keep the uncolored projected icon in sync with the alert status, reacting to both a later\n // `alertColor` change and a late-arriving icon. Only re-tint an icon we own — one that is still\n // `Empty` or still carries the color we last set — so an explicit consumer `[color]` is respected.\n effect(() => {\n const icon = this.projectedIcon();\n const nextColor = alertIconColors[this.alertColor()];\n\n if (icon && (icon.color === KbqComponentColors.Empty || icon.color === this.lastAutoColor)) {\n icon.color = nextColor;\n this.lastAutoColor = nextColor;\n }\n });\n }\n}\n","@if (projectedIcon()) {\n <div class=\"kbq-alert__icon\" [class.kbq-alert__icon_title]=\"title()\">\n <ng-content select=\"[kbq-icon-item],[kbq-icon]\" />\n </div>\n}\n\n<div class=\"kbq-alert__content\" [class.kbq-alert__content_title]=\"title()\">\n <ng-content select=\"[kbq-alert-title]\" />\n\n <div class=\"kbq-alert__text\">\n <ng-content />\n </div>\n\n @if (control()) {\n <div class=\"kbq-alert__button-stack\" [class.kbq-alert__button-stack_has-button]=\"button()\">\n <ng-content select=\"[kbq-alert-control]\" />\n </div>\n }\n</div>\n\n@if (closeButton()) {\n <div class=\"kbq-alert__close-button\" (click)=\"closed.emit()\">\n <ng-content select=\"[kbq-alert-close-button]\" />\n </div>\n}\n","import { NgModule } from '@angular/core';\nimport { KbqAlert, KbqAlertCloseButton, KbqAlertControl, KbqAlertTitle } from './alert.component';\n\n@NgModule({\n imports: [\n KbqAlert,\n KbqAlertTitle,\n KbqAlertCloseButton,\n KbqAlertControl\n ],\n exports: [\n KbqAlert,\n KbqAlertTitle,\n KbqAlertCloseButton,\n KbqAlertControl\n ]\n})\nexport class KbqAlertModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAgBA;IACY;AAAZ,CAAA,UAAY,cAAc,EAAA;;AAEtB,IAAA,cAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;;AAEnB,IAAA,cAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACvB,CAAC,EALW,cAAc,KAAd,cAAc,GAAA,EAAA,CAAA,CAAA;AAO1B;IACY;AAAZ,CAAA,UAAY,cAAc,EAAA;AACtB,IAAA,cAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,cAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,cAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,cAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACjB,CAAC,EALW,cAAc,KAAd,cAAc,GAAA,EAAA,CAAA,CAAA;AAO1B;AACA,MAAM,eAAe,GAA8D;AAC/E,IAAA,CAAC,cAAc,CAAC,KAAK,GAAG,kBAAkB,CAAC,KAAK;AAChD,IAAA,CAAC,cAAc,CAAC,OAAO,GAAG,kBAAkB,CAAC,OAAO;AACpD,IAAA,CAAC,cAAc,CAAC,OAAO,GAAG,kBAAkB,CAAC,OAAO;AACpD,IAAA,CAAC,cAAc,CAAC,IAAI,GAAG,kBAAkB,CAAC;CAC7C;AAED;MAQa,aAAa,CAAA;kIAAb,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;sHAAb,aAAa,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,kBAAA,EAAA,EAAA,QAAA,EAAA,CAAA,eAAA,CAAA,EA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