@koobiq/components 18.7.0 → 18.8.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/esm2022/accordion/accordion-trigger.component.mjs +5 -17
- package/esm2022/alert/alert.component.mjs +3 -3
- package/esm2022/autocomplete/autocomplete-trigger.directive.mjs +4 -3
- package/esm2022/autocomplete/autocomplete.component.mjs +3 -3
- package/esm2022/button/button.component.mjs +3 -3
- package/esm2022/button-toggle/button-toggle.component.mjs +3 -9
- package/esm2022/checkbox/checkbox.mjs +3 -3
- package/esm2022/code-block/code-block.component.mjs +3 -3
- package/esm2022/core/option/optgroup.mjs +3 -3
- package/esm2022/core/option/option.mjs +3 -3
- package/esm2022/core/version.mjs +2 -2
- package/esm2022/datepicker/calendar-body.component.mjs +3 -3
- package/esm2022/datepicker/calendar-header.component.mjs +3 -3
- package/esm2022/datepicker/datepicker-toggle.component.mjs +3 -3
- package/esm2022/datepicker/datepicker.component.mjs +3 -2
- package/esm2022/datepicker/month-view.component.mjs +3 -3
- package/esm2022/dropdown/dropdown-item.component.mjs +3 -3
- package/esm2022/file-upload/multiple-file-upload.component.mjs +3 -3
- package/esm2022/file-upload/single-file-upload.component.mjs +3 -3
- package/esm2022/form-field/cleaner.mjs +3 -9
- package/esm2022/form-field/form-field.mjs +3 -3
- package/esm2022/form-field/password-hint.mjs +3 -11
- package/esm2022/list/list-selection.component.mjs +5 -13
- package/esm2022/loader-overlay/loader-overlay.component.mjs +3 -3
- package/esm2022/markdown/markdown.component.mjs +5 -19
- package/esm2022/modal/modal.component.mjs +5 -4
- package/esm2022/modal/modal.directive.mjs +5 -17
- package/esm2022/navbar/navbar-item.component.mjs +3 -3
- package/esm2022/navbar/vertical-navbar.component.mjs +3 -11
- package/esm2022/popover/popover-confirm.component.mjs +3 -3
- package/esm2022/popover/popover.component.mjs +3 -3
- package/esm2022/progress-bar/progress-bar.component.mjs +3 -3
- package/esm2022/progress-spinner/progress-spinner.component.mjs +3 -3
- package/esm2022/radio/radio.component.mjs +3 -3
- package/esm2022/select/select.component.mjs +3 -3
- package/esm2022/sidepanel/sidepanel-container.component.mjs +3 -3
- package/esm2022/sidepanel/sidepanel-directives.mjs +7 -29
- package/esm2022/tabs/paginated-tab-header.mjs +32 -30
- package/esm2022/tabs/public-api.mjs +8 -8
- package/esm2022/tabs/tab-body.component.mjs +3 -3
- package/esm2022/tabs/tab-group.component.mjs +34 -52
- package/esm2022/tabs/tab-header.component.mjs +17 -35
- package/esm2022/tabs/tab-nav-bar.mjs +292 -0
- package/esm2022/tabs/tab.component.mjs +6 -5
- package/esm2022/tabs/tabs.module.mjs +39 -45
- package/esm2022/tags/tag.component.mjs +3 -3
- package/esm2022/timezone/timezone-option.component.mjs +3 -3
- package/esm2022/timezone/timezone-select.component.mjs +3 -3
- package/esm2022/toast/toast.component.mjs +3 -3
- package/esm2022/toggle/toggle.component.mjs +3 -3
- package/esm2022/tooltip/tooltip.component.mjs +3 -3
- package/esm2022/tree/tree-option.component.mjs +3 -3
- package/esm2022/tree-select/tree-select.component.mjs +5 -4
- package/fesm2022/koobiq-components-accordion.mjs +4 -16
- package/fesm2022/koobiq-components-accordion.mjs.map +1 -1
- package/fesm2022/koobiq-components-alert.mjs +2 -2
- package/fesm2022/koobiq-components-alert.mjs.map +1 -1
- package/fesm2022/koobiq-components-autocomplete.mjs +5 -4
- package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
- package/fesm2022/koobiq-components-button-toggle.mjs +2 -8
- package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-button.mjs +2 -2
- 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-code-block.mjs +2 -2
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-core.mjs +5 -5
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs +10 -9
- package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-dropdown.mjs +2 -2
- package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-file-upload.mjs +4 -4
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
- package/fesm2022/koobiq-components-form-field.mjs +6 -20
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-list.mjs +4 -12
- 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-markdown.mjs +4 -18
- package/fesm2022/koobiq-components-markdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-modal.mjs +8 -19
- package/fesm2022/koobiq-components-modal.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar.mjs +4 -12
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-popover.mjs +4 -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 +2 -2
- package/fesm2022/koobiq-components-radio.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +2 -2
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidepanel.mjs +8 -30
- package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
- package/fesm2022/koobiq-components-tabs.mjs +349 -208
- package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
- package/fesm2022/koobiq-components-tags.mjs +2 -2
- package/fesm2022/koobiq-components-tags.mjs.map +1 -1
- package/fesm2022/koobiq-components-timezone.mjs +4 -4
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
- package/fesm2022/koobiq-components-toast.mjs +2 -2
- 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 +2 -2
- package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree-select.mjs +4 -3
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +2 -2
- package/fesm2022/koobiq-components-tree.mjs.map +1 -1
- package/package.json +5 -5
- package/prebuilt-themes/dark-theme.css +1 -1
- package/prebuilt-themes/light-theme.css +1 -1
- package/prebuilt-themes/theme.css +1 -1
- package/schematics/migrations/css-selectors/index.js +4 -3
- package/schematics/migrations/deprecated-icons/index.js +4 -3
- package/schematics/migrations/new-icons-pack/index.js +3 -2
- package/schematics/ng-add/index.js +6 -5
- package/schematics/utils/messages.js +13 -0
- package/schematics/utils/package-config.js +58 -7
- package/tabs/_tabs-common.scss +27 -5
- package/tabs/_tabs-theme.scss +6 -16
- package/tabs/paginated-tab-header.d.ts +23 -21
- package/tabs/public-api.d.ts +7 -7
- package/tabs/tab-group.component.d.ts +21 -24
- package/tabs/tab-group.scss +27 -29
- package/tabs/tab-header.component.d.ts +13 -19
- package/tabs/tab-header.scss +5 -27
- package/tabs/tab-link.scss +14 -0
- package/tabs/tab-nav-bar.d.ts +92 -0
- package/tabs/tab-nav-bar.scss +36 -0
- package/tabs/tab.component.d.ts +1 -0
- package/tabs/tabs.module.d.ts +12 -12
- package/esm2022/tabs/tab-nav-bar/index.mjs +0 -2
- package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +0 -119
- package/tabs/README.md +0 -0
- package/tabs/tab-nav-bar/index.d.ts +0 -1
- package/tabs/tab-nav-bar/tab-nav-bar.d.ts +0 -42
- package/tabs/tab-nav-bar/tab-nav-bar.scss +0 -35
|
@@ -2,6 +2,7 @@ import * as i3 from '@angular/cdk/a11y';
|
|
|
2
2
|
import { A11yModule, FocusTrapFactory, ConfigurableFocusTrapFactory } from '@angular/cdk/a11y';
|
|
3
3
|
import * as i1 from '@angular/cdk/overlay';
|
|
4
4
|
import { OverlayRef, OverlayModule } from '@angular/cdk/overlay';
|
|
5
|
+
import { _getFocusedElementPierceShadowDom } from '@angular/cdk/platform';
|
|
5
6
|
import * as i7 from '@angular/common';
|
|
6
7
|
import { DOCUMENT, NgTemplateOutlet, NgStyle, NgClass } from '@angular/common';
|
|
7
8
|
import * as i0 from '@angular/core';
|
|
@@ -302,7 +303,7 @@ class KbqModalComponent extends KbqModalRef {
|
|
|
302
303
|
this.isBottomOverflow = scrollTop + offsetHeight < scrollHeight;
|
|
303
304
|
}
|
|
304
305
|
open() {
|
|
305
|
-
this.focusedElementBeforeOpen =
|
|
306
|
+
this.focusedElementBeforeOpen = _getFocusedElementPierceShadowDom();
|
|
306
307
|
this.previouslyFocusedElementOrigin = this.focusMonitor['_lastFocusOrigin'];
|
|
307
308
|
this.focusMonitor
|
|
308
309
|
.monitor(this.modalContainer, true)
|
|
@@ -574,13 +575,13 @@ class KbqModalComponent extends KbqModalRef {
|
|
|
574
575
|
}
|
|
575
576
|
}
|
|
576
577
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: KbqModalComponent, deps: [{ token: i1.Overlay }, { token: i0.Renderer2 }, { token: i0.ComponentFactoryResolver }, { token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: KbqModalControlService }, { token: i0.ChangeDetectorRef }, { token: i3.FocusMonitor }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
577
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.6", type: KbqModalComponent, selector: "kbq-modal", inputs: { kbqModalType: "kbqModalType", kbqComponent: "kbqComponent", kbqContent: "kbqContent", kbqComponentParams: "kbqComponentParams", kbqFooter: "kbqFooter", kbqVisible: "kbqVisible", kbqWidth: "kbqWidth", kbqSize: "kbqSize", kbqWrapClassName: "kbqWrapClassName", kbqClassName: "kbqClassName", kbqStyle: "kbqStyle", kbqTitle: "kbqTitle", kbqCloseByESC: "kbqCloseByESC", kbqClosable: "kbqClosable", kbqMask: "kbqMask", kbqMaskClosable: "kbqMaskClosable", kbqMaskStyle: "kbqMaskStyle", kbqBodyStyle: "kbqBodyStyle", kbqOkText: "kbqOkText", kbqOkType: "kbqOkType", kbqRestoreFocus: "kbqRestoreFocus", kbqOkLoading: "kbqOkLoading", kbqOnOk: "kbqOnOk", kbqCancelText: "kbqCancelText", kbqCancelLoading: "kbqCancelLoading", kbqOnCancel: "kbqOnCancel", kbqGetContainer: "kbqGetContainer" }, outputs: { kbqVisibleChange: "kbqVisibleChange", kbqAfterOpen: "kbqAfterOpen", kbqAfterClose: "kbqAfterClose", kbqOnOk: "kbqOnOk", kbqOnCancel: "kbqOnCancel" }, host: { listeners: { "keydown": "onKeyDown($event)" } }, viewQueries: [{ propertyName: "modalContainer", first: true, predicate: ["modalContainer"], descendants: true, static: true }, { propertyName: "bodyContainer", first: true, predicate: ["bodyContainer"], descendants: true, read: ViewContainerRef }, { propertyName: "modalBody", first: true, predicate: ["modalBody"], descendants: true }, { propertyName: "autoFocusedButtons", predicate: ["autoFocusedButton"], descendants: true, read: ElementRef }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<!-- Compatible: the <ng-content> can appear only once -->\n<ng-template #tplOriginContent>\n <ng-content />\n</ng-template>\n\n<div>\n @if (kbqMask) {\n <div\n class=\"kbq-modal-mask\"\n [class.kbq-modal-mask-hidden]=\"hidden\"\n [ngClass]=\"maskAnimationClassMap\"\n [ngStyle]=\"kbqMaskStyle\"\n ></div>\n }\n\n <div\n tabindex=\"-1\"\n class=\"kbq-modal-wrap {{ kbqWrapClassName }}\"\n [style.display]=\"hidden ? 'none' : ''\"\n (mousedown)=\"onClickMask($event)\"\n >\n <div\n #modalContainer\n class=\"kbq-modal {{ kbqClassName }} kbq-modal_{{ kbqSize }}\"\n [class.kbq-modal_no-footer]=\"!kbqFooter\"\n [ngClass]=\"modalAnimationClassMap\"\n [ngStyle]=\"kbqStyle\"\n [style.transform-origin]=\"transformOrigin\"\n [style.width]=\"kbqWidth | toCssUnit\"\n >\n <div\n cdkTrapFocus\n class=\"kbq-modal-content\"\n >\n @switch (true) {\n @case (isModalType('default')) {\n <ng-container [ngTemplateOutlet]=\"tplContentDefault\" />\n }\n @case (isModalType('confirm')) {\n <ng-container [ngTemplateOutlet]=\"tplContentConfirm\" />\n }\n @case (isModalType('custom')) {\n <ng-container [ngTemplateOutlet]=\"tplContentCustom\" />\n }\n }\n </div>\n </div>\n </div>\n</div>\n\n<ng-template #tplContentCustom>\n <ng-container #bodyContainer />\n</ng-template>\n\n<!-- [Predefined] Default Modal Content -->\n<ng-template #tplContentDefault>\n @if (kbqTitle) {\n <div\n kbq-title\n class=\"kbq-modal-header\"\n [class.kbq-modal-body_top-overflow]=\"isTopOverflow\"\n >\n <div class=\"kbq-modal-title\">\n @switch (true) {\n @case (isTemplateRef(kbqTitle)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqTitle)\" />\n }\n @case (isNonEmptyString(kbqTitle)) {\n <div [innerHTML]=\"kbqTitle\"></div>\n }\n }\n </div>\n @if (kbqClosable) {\n <button\n kbq-button\n class=\"kbq-modal-close kbq-button_transparent\"\n [color]=\"'contrast'\"\n (click)=\"onClickCloseBtn()\"\n >\n <i\n kbq-icon=\"kbq-xmark_16\"\n [color]=\"componentColors.Contrast\"\n ></i>\n </button>\n }\n </div>\n }\n <div\n #modalBody\n class=\"kbq-modal-body kbq-scrollbar\"\n [ngStyle]=\"kbqBodyStyle\"\n (scroll)=\"checkOverflow()\"\n >\n <ng-container #bodyContainer>\n @if (!isComponent(kbqContent)) {\n @switch (true) {\n @case (isTemplateRef(kbqContent)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqContent)\" />\n }\n @case (isNonEmptyString(kbqContent)) {\n <div [innerHTML]=\"kbqContent\"></div>\n }\n @default {\n <ng-container [ngTemplateOutlet]=\"tplOriginContent\" />\n }\n }\n }\n </ng-container>\n </div>\n @if (kbqFooter || kbqOkText || kbqCancelText) {\n <div\n class=\"kbq-modal-footer\"\n [class.kbq-modal-body_bottom-overflow]=\"isBottomOverflow\"\n >\n @switch (true) {\n @case (isTemplateRef(kbqFooter)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqFooter)\" />\n }\n @case (isNonEmptyString(kbqFooter)) {\n <div [innerHTML]=\"kbqFooter\"></div>\n }\n @case (isModalButtons(kbqFooter)) {\n @for (button of $any(kbqFooter); track button) {\n @if (getButtonCallableProp(button, 'show')) {\n <button\n kbq-button\n [attr.autofocus]=\"button.autoFocus\"\n [attr.kbq-modal-main-action]=\"button.kbqModalMainAction\"\n [class.kbq-progress]=\"getButtonCallableProp(button, 'loading')\"\n [color]=\"button.type\"\n [disabled]=\"getButtonCallableProp(button, 'disabled')\"\n (click)=\"onButtonClick(button)\"\n >\n {{ button.label }}\n </button>\n }\n }\n }\n @default {\n @if (kbqOkText) {\n <button\n kbq-button\n [attr.autofocus]=\"true\"\n [color]=\"componentColors.Contrast\"\n (click)=\"onClickOkCancel('ok')\"\n >\n {{ okText }}\n </button>\n }\n @if (kbqCancelText) {\n <button\n kbq-button\n (click)=\"onClickOkCancel('cancel')\"\n >\n {{ cancelText }}\n </button>\n }\n }\n }\n </div>\n }\n</ng-template>\n<!-- /[Predefined] Default Modal Content -->\n\n<!-- [Predefined] Confirm Modal Content -->\n<ng-template #tplContentConfirm>\n <div\n class=\"kbq-modal-body\"\n [ngStyle]=\"kbqBodyStyle\"\n >\n <ng-container #bodyContainer>\n @if (!isComponent(kbqContent)) {\n @switch (true) {\n @case (isTemplateRef(kbqContent)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqContent)\" />\n }\n @case (isNonEmptyString(kbqContent)) {\n <div [innerHTML]=\"kbqContent\"></div>\n }\n @default {\n <ng-container [ngTemplateOutlet]=\"tplOriginContent\" />\n }\n }\n }\n </ng-container>\n </div>\n @if (kbqOkText || kbqCancelText) {\n <div class=\"kbq-confirm-footer\">\n @if (kbqOkText) {\n <button\n kbq-button\n [attr.autofocus]=\"true\"\n [color]=\"kbqOkType\"\n (click)=\"onClickOkCancel('ok')\"\n >\n {{ okText }}\n </button>\n }\n @if (kbqCancelText) {\n <button\n kbq-button\n (click)=\"onClickOkCancel('cancel')\"\n >\n {{ cancelText }}\n </button>\n }\n </div>\n }\n</ng-template>\n<!-- /[Predefined] Confirm Modal Content -->\n", styles: [".kbq-confirm .kbq-modal-close{display:none}.kbq-confirm .kbq-confirm-footer{display:flex;gap:var(--kbq-modal-size-footer-content-gap-horizontal)}.kbq-modal{box-sizing:border-box;position:relative;top:48px;border-radius:var(--kbq-modal-size-border-radius);width:auto;margin:0 auto;list-style:none}.kbq-modal.zoom-enter,.kbq-modal.zoom-appear{animation-duration:.3s;transform:none;opacity:0}.kbq-modal.kbq-modal_small{width:var(--kbq-modal-size-small-width)}.kbq-modal.kbq-modal_medium{width:var(--kbq-modal-size-medium-width)}.kbq-modal.kbq-modal_large{width:var(--kbq-modal-size-large-width)}.kbq-modal .kbq-modal-close{position:absolute;top:16px;right:8px}.kbq-modal-wrap{position:fixed;inset:0;overflow:auto;-webkit-overflow-scrolling:touch;outline:0}.kbq-modal-content{position:relative;border-radius:var(--kbq-modal-size-border-radius);background-clip:padding-box}.kbq-modal-header{display:flex;align-items:center;justify-content:space-between;padding:var(--kbq-modal-size-header-padding-vertical) var(--kbq-modal-size-header-padding-right) var(--kbq-modal-size-header-padding-vertical) var(--kbq-modal-size-header-padding-left)}.kbq-modal-header+.kbq-modal-body{padding-top:var(--kbq-modal-size-content-padding-top)}.kbq-modal-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.kbq-modal-body{display:block;overflow-y:auto;max-height:calc(100vh - 260px);padding:var(--kbq-modal-size-content-padding-top-without-header) var(--kbq-modal-size-content-padding-horizontal) var(--kbq-modal-size-content-padding-bottom) var(--kbq-modal-size-content-padding-horizontal);word-wrap:break-word}.kbq-modal-body>*{position:relative}.kbq-modal-footer,.kbq-confirm-footer{display:flex;align-items:center;padding:var(--kbq-modal-size-footer-padding-vertical) var(--kbq-modal-size-footer-padding-horizontal);gap:var(--kbq-modal-size-footer-content-gap-horizontal)}.kbq-modal-mask{position:fixed;inset:0;height:100%}.kbq-modal-mask.kbq-modal-mask-hidden{display:none}.kbq-modal-open{overflow:hidden}.kbq-modal{background:var(--kbq-modal-container-background);box-shadow:var(--kbq-modal-container-shadow)}.kbq-modal .kbq-modal-header .kbq-modal-title{color:var(--kbq-modal-header-text-color)}.kbq-modal .kbq-modal-header .kbq-modal-close{color:var(--kbq-modal-close-button-color)}.kbq-modal .kbq-modal-content{color:var(--kbq-modal-content-text-color)}.kbq-modal .kbq-modal-header.kbq-modal-body_top-overflow{box-shadow:var(--kbq-shadow-overflow-normal-bottom)}.kbq-modal .kbq-modal-footer.kbq-modal-body_bottom-overflow{box-shadow:var(--kbq-shadow-overflow-normal-top)}.kbq-modal-mask{background-color:var(--kbq-modal-overlay-background)}.kbq-modal-title{font-size:var(--kbq-typography-title-font-size);font-weight:var(--kbq-typography-title-font-weight);line-height:var(--kbq-typography-title-line-height);font-family:var(--kbq-typography-title-font-family);text-transform:var(--kbq-typography-title-text-transform);font-feature-settings:var(--kbq-typography-title-font-feature-settings);letter-spacing:var(--kbq-typography-title-letter-spacing)}.kbq-modal-body{font-size:var(--kbq-typography-text-normal-font-size);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)}\n", ".kbq-modal{--kbq-modal-size-small-width: 400px;--kbq-modal-size-medium-width: 640px;--kbq-modal-size-large-width: 960px;--kbq-modal-size-border-radius: var(--kbq-size-s);--kbq-modal-size-header-padding-vertical: var(--kbq-size-l);--kbq-modal-size-header-padding-left: var(--kbq-size-xxl);--kbq-modal-size-header-padding-right: var(--kbq-size-5xl);--kbq-modal-size-close-button-margin-left: var(--kbq-size-s);--kbq-modal-size-content-padding-horizontal: var(--kbq-size-xxl);--kbq-modal-size-content-padding-top: 0;--kbq-modal-size-content-padding-bottom: var(--kbq-size-s);--kbq-modal-size-content-padding-top-without-header: var(--kbq-size-xxl);--kbq-modal-size-content-padding-bottom-without-footer: var(--kbq-size-4xl);--kbq-modal-size-footer-padding-horizontal: var(--kbq-size-xxl);--kbq-modal-size-footer-padding-vertical: var(--kbq-size-xl);--kbq-modal-size-footer-content-gap-horizontal: var(--kbq-size-l)}:where(.kbq-light,.theme-light,.kbq-theme-light){--kbq-modal-overlay-background: var(--kbq-background-overlay);--kbq-modal-container-background: var(--kbq-background-card);--kbq-modal-container-shadow: var(--kbq-shadow-overlay);--kbq-modal-close-button-color: var(--kbq-icon-contrast);--kbq-modal-header-text-color: var(--kbq-foreground-contrast);--kbq-modal-content-text-color: var(--kbq-foreground-contrast)}:where(.kbq-dark,.theme-dark,.kbq-theme-dark){--kbq-modal-overlay-background: var(--kbq-background-overlay);--kbq-modal-container-background: var(--kbq-background-card);--kbq-modal-container-shadow: var(--kbq-shadow-overlay);--kbq-modal-close-button-color: var(--kbq-icon-contrast);--kbq-modal-header-text-color: var(--kbq-foreground-contrast);--kbq-modal-content-text-color: var(--kbq-foreground-contrast)}\n"], dependencies: [{ kind: "directive", type: i3.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "component", type: i4.KbqButton, selector: "[kbq-button]", inputs: ["color", "tabIndex", "kbqStyle", "disabled"] }, { kind: "directive", type: i4.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "component", type: i5.KbqIcon, selector: "[kbq-icon]", inputs: ["color", "small", "autoColor"] }, { kind: "directive", type: i6.KbqTitleDirective, selector: "[kbq-title]", exportAs: ["kbqTitle"] }, { kind: "directive", type: i7.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i7.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i7.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: CssUnitPipe, name: "toCssUnit" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
578
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.6", type: KbqModalComponent, selector: "kbq-modal", inputs: { kbqModalType: "kbqModalType", kbqComponent: "kbqComponent", kbqContent: "kbqContent", kbqComponentParams: "kbqComponentParams", kbqFooter: "kbqFooter", kbqVisible: "kbqVisible", kbqWidth: "kbqWidth", kbqSize: "kbqSize", kbqWrapClassName: "kbqWrapClassName", kbqClassName: "kbqClassName", kbqStyle: "kbqStyle", kbqTitle: "kbqTitle", kbqCloseByESC: "kbqCloseByESC", kbqClosable: "kbqClosable", kbqMask: "kbqMask", kbqMaskClosable: "kbqMaskClosable", kbqMaskStyle: "kbqMaskStyle", kbqBodyStyle: "kbqBodyStyle", kbqOkText: "kbqOkText", kbqOkType: "kbqOkType", kbqRestoreFocus: "kbqRestoreFocus", kbqOkLoading: "kbqOkLoading", kbqOnOk: "kbqOnOk", kbqCancelText: "kbqCancelText", kbqCancelLoading: "kbqCancelLoading", kbqOnCancel: "kbqOnCancel", kbqGetContainer: "kbqGetContainer" }, outputs: { kbqVisibleChange: "kbqVisibleChange", kbqAfterOpen: "kbqAfterOpen", kbqAfterClose: "kbqAfterClose", kbqOnOk: "kbqOnOk", kbqOnCancel: "kbqOnCancel" }, host: { listeners: { "keydown": "onKeyDown($event)" } }, viewQueries: [{ propertyName: "modalContainer", first: true, predicate: ["modalContainer"], descendants: true, static: true }, { propertyName: "bodyContainer", first: true, predicate: ["bodyContainer"], descendants: true, read: ViewContainerRef }, { propertyName: "modalBody", first: true, predicate: ["modalBody"], descendants: true }, { propertyName: "autoFocusedButtons", predicate: ["autoFocusedButton"], descendants: true, read: ElementRef }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<!-- Compatible: the <ng-content> can appear only once -->\n<ng-template #tplOriginContent>\n <ng-content />\n</ng-template>\n\n<div>\n @if (kbqMask) {\n <div\n class=\"kbq-modal-mask\"\n [class.kbq-modal-mask-hidden]=\"hidden\"\n [ngClass]=\"maskAnimationClassMap\"\n [ngStyle]=\"kbqMaskStyle\"\n ></div>\n }\n\n <div\n tabindex=\"-1\"\n class=\"kbq-modal-wrap {{ kbqWrapClassName }}\"\n [style.display]=\"hidden ? 'none' : ''\"\n (mousedown)=\"onClickMask($event)\"\n >\n <div\n #modalContainer\n class=\"kbq-modal {{ kbqClassName }} kbq-modal_{{ kbqSize }}\"\n [class.kbq-modal_no-footer]=\"!kbqFooter\"\n [ngClass]=\"modalAnimationClassMap\"\n [ngStyle]=\"kbqStyle\"\n [style.transform-origin]=\"transformOrigin\"\n [style.width]=\"kbqWidth | toCssUnit\"\n >\n <div cdkTrapFocus class=\"kbq-modal-content\">\n @switch (true) {\n @case (isModalType('default')) {\n <ng-container [ngTemplateOutlet]=\"tplContentDefault\" />\n }\n @case (isModalType('confirm')) {\n <ng-container [ngTemplateOutlet]=\"tplContentConfirm\" />\n }\n @case (isModalType('custom')) {\n <ng-container [ngTemplateOutlet]=\"tplContentCustom\" />\n }\n }\n </div>\n </div>\n </div>\n</div>\n\n<ng-template #tplContentCustom>\n <ng-container #bodyContainer />\n</ng-template>\n\n<!-- [Predefined] Default Modal Content -->\n<ng-template #tplContentDefault>\n @if (kbqTitle) {\n <div kbq-title class=\"kbq-modal-header\" [class.kbq-modal-body_top-overflow]=\"isTopOverflow\">\n <div class=\"kbq-modal-title\">\n @switch (true) {\n @case (isTemplateRef(kbqTitle)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqTitle)\" />\n }\n @case (isNonEmptyString(kbqTitle)) {\n <div [innerHTML]=\"kbqTitle\"></div>\n }\n }\n </div>\n @if (kbqClosable) {\n <button\n kbq-button\n class=\"kbq-modal-close kbq-button_transparent\"\n [color]=\"'contrast'\"\n (click)=\"onClickCloseBtn()\"\n >\n <i kbq-icon=\"kbq-xmark_16\" [color]=\"componentColors.Contrast\"></i>\n </button>\n }\n </div>\n }\n <div #modalBody class=\"kbq-modal-body kbq-scrollbar\" [ngStyle]=\"kbqBodyStyle\" (scroll)=\"checkOverflow()\">\n <ng-container #bodyContainer>\n @if (!isComponent(kbqContent)) {\n @switch (true) {\n @case (isTemplateRef(kbqContent)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqContent)\" />\n }\n @case (isNonEmptyString(kbqContent)) {\n <div [innerHTML]=\"kbqContent\"></div>\n }\n @default {\n <ng-container [ngTemplateOutlet]=\"tplOriginContent\" />\n }\n }\n }\n </ng-container>\n </div>\n @if (kbqFooter || kbqOkText || kbqCancelText) {\n <div class=\"kbq-modal-footer\" [class.kbq-modal-body_bottom-overflow]=\"isBottomOverflow\">\n @switch (true) {\n @case (isTemplateRef(kbqFooter)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqFooter)\" />\n }\n @case (isNonEmptyString(kbqFooter)) {\n <div [innerHTML]=\"kbqFooter\"></div>\n }\n @case (isModalButtons(kbqFooter)) {\n @for (button of $any(kbqFooter); track button) {\n @if (getButtonCallableProp(button, 'show')) {\n <button\n kbq-button\n [attr.autofocus]=\"button.autoFocus\"\n [attr.kbq-modal-main-action]=\"button.kbqModalMainAction\"\n [class.kbq-progress]=\"getButtonCallableProp(button, 'loading')\"\n [color]=\"button.type\"\n [disabled]=\"getButtonCallableProp(button, 'disabled')\"\n (click)=\"onButtonClick(button)\"\n >\n {{ button.label }}\n </button>\n }\n }\n }\n @default {\n @if (kbqOkText) {\n <button\n kbq-button\n [attr.autofocus]=\"true\"\n [color]=\"componentColors.Contrast\"\n (click)=\"onClickOkCancel('ok')\"\n >\n {{ okText }}\n </button>\n }\n @if (kbqCancelText) {\n <button kbq-button (click)=\"onClickOkCancel('cancel')\">\n {{ cancelText }}\n </button>\n }\n }\n }\n </div>\n }\n</ng-template>\n<!-- /[Predefined] Default Modal Content -->\n\n<!-- [Predefined] Confirm Modal Content -->\n<ng-template #tplContentConfirm>\n <div class=\"kbq-modal-body\" [ngStyle]=\"kbqBodyStyle\">\n <ng-container #bodyContainer>\n @if (!isComponent(kbqContent)) {\n @switch (true) {\n @case (isTemplateRef(kbqContent)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqContent)\" />\n }\n @case (isNonEmptyString(kbqContent)) {\n <div [innerHTML]=\"kbqContent\"></div>\n }\n @default {\n <ng-container [ngTemplateOutlet]=\"tplOriginContent\" />\n }\n }\n }\n </ng-container>\n </div>\n @if (kbqOkText || kbqCancelText) {\n <div class=\"kbq-confirm-footer\">\n @if (kbqOkText) {\n <button kbq-button [attr.autofocus]=\"true\" [color]=\"kbqOkType\" (click)=\"onClickOkCancel('ok')\">\n {{ okText }}\n </button>\n }\n @if (kbqCancelText) {\n <button kbq-button (click)=\"onClickOkCancel('cancel')\">\n {{ cancelText }}\n </button>\n }\n </div>\n }\n</ng-template>\n<!-- /[Predefined] Confirm Modal Content -->\n", styles: [".kbq-confirm .kbq-modal-close{display:none}.kbq-confirm .kbq-confirm-footer{display:flex;gap:var(--kbq-modal-size-footer-content-gap-horizontal)}.kbq-modal{box-sizing:border-box;position:relative;top:48px;border-radius:var(--kbq-modal-size-border-radius);width:auto;margin:0 auto;list-style:none}.kbq-modal.zoom-enter,.kbq-modal.zoom-appear{animation-duration:.3s;transform:none;opacity:0}.kbq-modal.kbq-modal_small{width:var(--kbq-modal-size-small-width)}.kbq-modal.kbq-modal_medium{width:var(--kbq-modal-size-medium-width)}.kbq-modal.kbq-modal_large{width:var(--kbq-modal-size-large-width)}.kbq-modal .kbq-modal-close{position:absolute;top:16px;right:8px}.kbq-modal-wrap{position:fixed;inset:0;overflow:auto;-webkit-overflow-scrolling:touch;outline:0}.kbq-modal-content{position:relative;border-radius:var(--kbq-modal-size-border-radius);background-clip:padding-box}.kbq-modal-header{display:flex;align-items:center;justify-content:space-between;padding:var(--kbq-modal-size-header-padding-vertical) var(--kbq-modal-size-header-padding-right) var(--kbq-modal-size-header-padding-vertical) var(--kbq-modal-size-header-padding-left)}.kbq-modal-header+.kbq-modal-body{padding-top:var(--kbq-modal-size-content-padding-top)}.kbq-modal-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.kbq-modal-body{display:block;overflow-y:auto;max-height:calc(100vh - 260px);padding:var(--kbq-modal-size-content-padding-top-without-header) var(--kbq-modal-size-content-padding-horizontal) var(--kbq-modal-size-content-padding-bottom) var(--kbq-modal-size-content-padding-horizontal);word-wrap:break-word}.kbq-modal-body>*{position:relative}.kbq-modal-footer,.kbq-confirm-footer{display:flex;align-items:center;padding:var(--kbq-modal-size-footer-padding-vertical) var(--kbq-modal-size-footer-padding-horizontal);gap:var(--kbq-modal-size-footer-content-gap-horizontal)}.kbq-modal-mask{position:fixed;inset:0;height:100%}.kbq-modal-mask.kbq-modal-mask-hidden{display:none}.kbq-modal-open{overflow:hidden}.kbq-modal{background:var(--kbq-modal-container-background);box-shadow:var(--kbq-modal-container-shadow)}.kbq-modal .kbq-modal-header .kbq-modal-title{color:var(--kbq-modal-header-text-color)}.kbq-modal .kbq-modal-header .kbq-modal-close{color:var(--kbq-modal-close-button-color)}.kbq-modal .kbq-modal-content{color:var(--kbq-modal-content-text-color)}.kbq-modal .kbq-modal-header.kbq-modal-body_top-overflow{box-shadow:var(--kbq-shadow-overflow-normal-bottom)}.kbq-modal .kbq-modal-footer.kbq-modal-body_bottom-overflow{box-shadow:var(--kbq-shadow-overflow-normal-top)}.kbq-modal-mask{background-color:var(--kbq-modal-overlay-background)}.kbq-modal-title{font-size:var(--kbq-typography-title-font-size);font-weight:var(--kbq-typography-title-font-weight);line-height:var(--kbq-typography-title-line-height);font-family:var(--kbq-typography-title-font-family);text-transform:var(--kbq-typography-title-text-transform);font-feature-settings:var(--kbq-typography-title-font-feature-settings);letter-spacing:var(--kbq-typography-title-letter-spacing)}.kbq-modal-body{font-size:var(--kbq-typography-text-normal-font-size);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)}\n", ".kbq-modal{--kbq-modal-size-small-width: 400px;--kbq-modal-size-medium-width: 640px;--kbq-modal-size-large-width: 960px;--kbq-modal-size-border-radius: var(--kbq-size-s);--kbq-modal-size-header-padding-vertical: var(--kbq-size-l);--kbq-modal-size-header-padding-left: var(--kbq-size-xxl);--kbq-modal-size-header-padding-right: var(--kbq-size-5xl);--kbq-modal-size-close-button-margin-left: var(--kbq-size-s);--kbq-modal-size-content-padding-horizontal: var(--kbq-size-xxl);--kbq-modal-size-content-padding-top: 0;--kbq-modal-size-content-padding-bottom: var(--kbq-size-s);--kbq-modal-size-content-padding-top-without-header: var(--kbq-size-xxl);--kbq-modal-size-content-padding-bottom-without-footer: var(--kbq-size-4xl);--kbq-modal-size-footer-padding-horizontal: var(--kbq-size-xxl);--kbq-modal-size-footer-padding-vertical: var(--kbq-size-xl);--kbq-modal-size-footer-content-gap-horizontal: var(--kbq-size-l)}:where(.kbq-light,.theme-light,.kbq-theme-light){--kbq-modal-overlay-background: var(--kbq-background-overlay);--kbq-modal-container-background: var(--kbq-background-card);--kbq-modal-container-shadow: var(--kbq-shadow-overlay);--kbq-modal-close-button-color: var(--kbq-icon-contrast);--kbq-modal-header-text-color: var(--kbq-foreground-contrast);--kbq-modal-content-text-color: var(--kbq-foreground-contrast)}:where(.kbq-dark,.theme-dark,.kbq-theme-dark){--kbq-modal-overlay-background: var(--kbq-background-overlay);--kbq-modal-container-background: var(--kbq-background-card);--kbq-modal-container-shadow: var(--kbq-shadow-overlay);--kbq-modal-close-button-color: var(--kbq-icon-contrast);--kbq-modal-header-text-color: var(--kbq-foreground-contrast);--kbq-modal-content-text-color: var(--kbq-foreground-contrast)}\n"], dependencies: [{ kind: "directive", type: i3.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "component", type: i4.KbqButton, selector: "[kbq-button]", inputs: ["color", "tabIndex", "kbqStyle", "disabled"] }, { kind: "directive", type: i4.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "component", type: i5.KbqIcon, selector: "[kbq-icon]", inputs: ["color", "small", "autoColor"] }, { kind: "directive", type: i6.KbqTitleDirective, selector: "[kbq-title]", exportAs: ["kbqTitle"] }, { kind: "directive", type: i7.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i7.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i7.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: CssUnitPipe, name: "toCssUnit" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
578
579
|
}
|
|
579
580
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: KbqModalComponent, decorators: [{
|
|
580
581
|
type: Component,
|
|
581
582
|
args: [{ selector: 'kbq-modal', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
582
583
|
'(keydown)': 'onKeyDown($event)'
|
|
583
|
-
}, template: "<!-- Compatible: the <ng-content> can appear only once -->\n<ng-template #tplOriginContent>\n <ng-content />\n</ng-template>\n\n<div>\n @if (kbqMask) {\n <div\n class=\"kbq-modal-mask\"\n [class.kbq-modal-mask-hidden]=\"hidden\"\n [ngClass]=\"maskAnimationClassMap\"\n [ngStyle]=\"kbqMaskStyle\"\n ></div>\n }\n\n <div\n tabindex=\"-1\"\n class=\"kbq-modal-wrap {{ kbqWrapClassName }}\"\n [style.display]=\"hidden ? 'none' : ''\"\n (mousedown)=\"onClickMask($event)\"\n >\n <div\n #modalContainer\n class=\"kbq-modal {{ kbqClassName }} kbq-modal_{{ kbqSize }}\"\n [class.kbq-modal_no-footer]=\"!kbqFooter\"\n [ngClass]=\"modalAnimationClassMap\"\n [ngStyle]=\"kbqStyle\"\n [style.transform-origin]=\"transformOrigin\"\n [style.width]=\"kbqWidth | toCssUnit\"\n >\n <div\n cdkTrapFocus\n class=\"kbq-modal-content\"\n >\n @switch (true) {\n @case (isModalType('default')) {\n <ng-container [ngTemplateOutlet]=\"tplContentDefault\" />\n }\n @case (isModalType('confirm')) {\n <ng-container [ngTemplateOutlet]=\"tplContentConfirm\" />\n }\n @case (isModalType('custom')) {\n <ng-container [ngTemplateOutlet]=\"tplContentCustom\" />\n }\n }\n </div>\n </div>\n </div>\n</div>\n\n<ng-template #tplContentCustom>\n <ng-container #bodyContainer />\n</ng-template>\n\n<!-- [Predefined] Default Modal Content -->\n<ng-template #tplContentDefault>\n @if (kbqTitle) {\n <div\n kbq-title\n class=\"kbq-modal-header\"\n [class.kbq-modal-body_top-overflow]=\"isTopOverflow\"\n >\n <div class=\"kbq-modal-title\">\n @switch (true) {\n @case (isTemplateRef(kbqTitle)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqTitle)\" />\n }\n @case (isNonEmptyString(kbqTitle)) {\n <div [innerHTML]=\"kbqTitle\"></div>\n }\n }\n </div>\n @if (kbqClosable) {\n <button\n kbq-button\n class=\"kbq-modal-close kbq-button_transparent\"\n [color]=\"'contrast'\"\n (click)=\"onClickCloseBtn()\"\n >\n <i\n kbq-icon=\"kbq-xmark_16\"\n [color]=\"componentColors.Contrast\"\n ></i>\n </button>\n }\n </div>\n }\n <div\n #modalBody\n class=\"kbq-modal-body kbq-scrollbar\"\n [ngStyle]=\"kbqBodyStyle\"\n (scroll)=\"checkOverflow()\"\n >\n <ng-container #bodyContainer>\n @if (!isComponent(kbqContent)) {\n @switch (true) {\n @case (isTemplateRef(kbqContent)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqContent)\" />\n }\n @case (isNonEmptyString(kbqContent)) {\n <div [innerHTML]=\"kbqContent\"></div>\n }\n @default {\n <ng-container [ngTemplateOutlet]=\"tplOriginContent\" />\n }\n }\n }\n </ng-container>\n </div>\n @if (kbqFooter || kbqOkText || kbqCancelText) {\n <div\n class=\"kbq-modal-footer\"\n [class.kbq-modal-body_bottom-overflow]=\"isBottomOverflow\"\n >\n @switch (true) {\n @case (isTemplateRef(kbqFooter)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqFooter)\" />\n }\n @case (isNonEmptyString(kbqFooter)) {\n <div [innerHTML]=\"kbqFooter\"></div>\n }\n @case (isModalButtons(kbqFooter)) {\n @for (button of $any(kbqFooter); track button) {\n @if (getButtonCallableProp(button, 'show')) {\n <button\n kbq-button\n [attr.autofocus]=\"button.autoFocus\"\n [attr.kbq-modal-main-action]=\"button.kbqModalMainAction\"\n [class.kbq-progress]=\"getButtonCallableProp(button, 'loading')\"\n [color]=\"button.type\"\n [disabled]=\"getButtonCallableProp(button, 'disabled')\"\n (click)=\"onButtonClick(button)\"\n >\n {{ button.label }}\n </button>\n }\n }\n }\n @default {\n @if (kbqOkText) {\n <button\n kbq-button\n [attr.autofocus]=\"true\"\n [color]=\"componentColors.Contrast\"\n (click)=\"onClickOkCancel('ok')\"\n >\n {{ okText }}\n </button>\n }\n @if (kbqCancelText) {\n <button\n kbq-button\n (click)=\"onClickOkCancel('cancel')\"\n >\n {{ cancelText }}\n </button>\n }\n }\n }\n </div>\n }\n</ng-template>\n<!-- /[Predefined] Default Modal Content -->\n\n<!-- [Predefined] Confirm Modal Content -->\n<ng-template #tplContentConfirm>\n <div\n class=\"kbq-modal-body\"\n [ngStyle]=\"kbqBodyStyle\"\n >\n <ng-container #bodyContainer>\n @if (!isComponent(kbqContent)) {\n @switch (true) {\n @case (isTemplateRef(kbqContent)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqContent)\" />\n }\n @case (isNonEmptyString(kbqContent)) {\n <div [innerHTML]=\"kbqContent\"></div>\n }\n @default {\n <ng-container [ngTemplateOutlet]=\"tplOriginContent\" />\n }\n }\n }\n </ng-container>\n </div>\n @if (kbqOkText || kbqCancelText) {\n <div class=\"kbq-confirm-footer\">\n @if (kbqOkText) {\n <button\n kbq-button\n [attr.autofocus]=\"true\"\n [color]=\"kbqOkType\"\n (click)=\"onClickOkCancel('ok')\"\n >\n {{ okText }}\n </button>\n }\n @if (kbqCancelText) {\n <button\n kbq-button\n (click)=\"onClickOkCancel('cancel')\"\n >\n {{ cancelText }}\n </button>\n }\n </div>\n }\n</ng-template>\n<!-- /[Predefined] Confirm Modal Content -->\n", styles: [".kbq-confirm .kbq-modal-close{display:none}.kbq-confirm .kbq-confirm-footer{display:flex;gap:var(--kbq-modal-size-footer-content-gap-horizontal)}.kbq-modal{box-sizing:border-box;position:relative;top:48px;border-radius:var(--kbq-modal-size-border-radius);width:auto;margin:0 auto;list-style:none}.kbq-modal.zoom-enter,.kbq-modal.zoom-appear{animation-duration:.3s;transform:none;opacity:0}.kbq-modal.kbq-modal_small{width:var(--kbq-modal-size-small-width)}.kbq-modal.kbq-modal_medium{width:var(--kbq-modal-size-medium-width)}.kbq-modal.kbq-modal_large{width:var(--kbq-modal-size-large-width)}.kbq-modal .kbq-modal-close{position:absolute;top:16px;right:8px}.kbq-modal-wrap{position:fixed;inset:0;overflow:auto;-webkit-overflow-scrolling:touch;outline:0}.kbq-modal-content{position:relative;border-radius:var(--kbq-modal-size-border-radius);background-clip:padding-box}.kbq-modal-header{display:flex;align-items:center;justify-content:space-between;padding:var(--kbq-modal-size-header-padding-vertical) var(--kbq-modal-size-header-padding-right) var(--kbq-modal-size-header-padding-vertical) var(--kbq-modal-size-header-padding-left)}.kbq-modal-header+.kbq-modal-body{padding-top:var(--kbq-modal-size-content-padding-top)}.kbq-modal-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.kbq-modal-body{display:block;overflow-y:auto;max-height:calc(100vh - 260px);padding:var(--kbq-modal-size-content-padding-top-without-header) var(--kbq-modal-size-content-padding-horizontal) var(--kbq-modal-size-content-padding-bottom) var(--kbq-modal-size-content-padding-horizontal);word-wrap:break-word}.kbq-modal-body>*{position:relative}.kbq-modal-footer,.kbq-confirm-footer{display:flex;align-items:center;padding:var(--kbq-modal-size-footer-padding-vertical) var(--kbq-modal-size-footer-padding-horizontal);gap:var(--kbq-modal-size-footer-content-gap-horizontal)}.kbq-modal-mask{position:fixed;inset:0;height:100%}.kbq-modal-mask.kbq-modal-mask-hidden{display:none}.kbq-modal-open{overflow:hidden}.kbq-modal{background:var(--kbq-modal-container-background);box-shadow:var(--kbq-modal-container-shadow)}.kbq-modal .kbq-modal-header .kbq-modal-title{color:var(--kbq-modal-header-text-color)}.kbq-modal .kbq-modal-header .kbq-modal-close{color:var(--kbq-modal-close-button-color)}.kbq-modal .kbq-modal-content{color:var(--kbq-modal-content-text-color)}.kbq-modal .kbq-modal-header.kbq-modal-body_top-overflow{box-shadow:var(--kbq-shadow-overflow-normal-bottom)}.kbq-modal .kbq-modal-footer.kbq-modal-body_bottom-overflow{box-shadow:var(--kbq-shadow-overflow-normal-top)}.kbq-modal-mask{background-color:var(--kbq-modal-overlay-background)}.kbq-modal-title{font-size:var(--kbq-typography-title-font-size);font-weight:var(--kbq-typography-title-font-weight);line-height:var(--kbq-typography-title-line-height);font-family:var(--kbq-typography-title-font-family);text-transform:var(--kbq-typography-title-text-transform);font-feature-settings:var(--kbq-typography-title-font-feature-settings);letter-spacing:var(--kbq-typography-title-letter-spacing)}.kbq-modal-body{font-size:var(--kbq-typography-text-normal-font-size);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)}\n", ".kbq-modal{--kbq-modal-size-small-width: 400px;--kbq-modal-size-medium-width: 640px;--kbq-modal-size-large-width: 960px;--kbq-modal-size-border-radius: var(--kbq-size-s);--kbq-modal-size-header-padding-vertical: var(--kbq-size-l);--kbq-modal-size-header-padding-left: var(--kbq-size-xxl);--kbq-modal-size-header-padding-right: var(--kbq-size-5xl);--kbq-modal-size-close-button-margin-left: var(--kbq-size-s);--kbq-modal-size-content-padding-horizontal: var(--kbq-size-xxl);--kbq-modal-size-content-padding-top: 0;--kbq-modal-size-content-padding-bottom: var(--kbq-size-s);--kbq-modal-size-content-padding-top-without-header: var(--kbq-size-xxl);--kbq-modal-size-content-padding-bottom-without-footer: var(--kbq-size-4xl);--kbq-modal-size-footer-padding-horizontal: var(--kbq-size-xxl);--kbq-modal-size-footer-padding-vertical: var(--kbq-size-xl);--kbq-modal-size-footer-content-gap-horizontal: var(--kbq-size-l)}:where(.kbq-light,.theme-light,.kbq-theme-light){--kbq-modal-overlay-background: var(--kbq-background-overlay);--kbq-modal-container-background: var(--kbq-background-card);--kbq-modal-container-shadow: var(--kbq-shadow-overlay);--kbq-modal-close-button-color: var(--kbq-icon-contrast);--kbq-modal-header-text-color: var(--kbq-foreground-contrast);--kbq-modal-content-text-color: var(--kbq-foreground-contrast)}:where(.kbq-dark,.theme-dark,.kbq-theme-dark){--kbq-modal-overlay-background: var(--kbq-background-overlay);--kbq-modal-container-background: var(--kbq-background-card);--kbq-modal-container-shadow: var(--kbq-shadow-overlay);--kbq-modal-close-button-color: var(--kbq-icon-contrast);--kbq-modal-header-text-color: var(--kbq-foreground-contrast);--kbq-modal-content-text-color: var(--kbq-foreground-contrast)}\n"] }]
|
|
584
|
+
}, template: "<!-- Compatible: the <ng-content> can appear only once -->\n<ng-template #tplOriginContent>\n <ng-content />\n</ng-template>\n\n<div>\n @if (kbqMask) {\n <div\n class=\"kbq-modal-mask\"\n [class.kbq-modal-mask-hidden]=\"hidden\"\n [ngClass]=\"maskAnimationClassMap\"\n [ngStyle]=\"kbqMaskStyle\"\n ></div>\n }\n\n <div\n tabindex=\"-1\"\n class=\"kbq-modal-wrap {{ kbqWrapClassName }}\"\n [style.display]=\"hidden ? 'none' : ''\"\n (mousedown)=\"onClickMask($event)\"\n >\n <div\n #modalContainer\n class=\"kbq-modal {{ kbqClassName }} kbq-modal_{{ kbqSize }}\"\n [class.kbq-modal_no-footer]=\"!kbqFooter\"\n [ngClass]=\"modalAnimationClassMap\"\n [ngStyle]=\"kbqStyle\"\n [style.transform-origin]=\"transformOrigin\"\n [style.width]=\"kbqWidth | toCssUnit\"\n >\n <div cdkTrapFocus class=\"kbq-modal-content\">\n @switch (true) {\n @case (isModalType('default')) {\n <ng-container [ngTemplateOutlet]=\"tplContentDefault\" />\n }\n @case (isModalType('confirm')) {\n <ng-container [ngTemplateOutlet]=\"tplContentConfirm\" />\n }\n @case (isModalType('custom')) {\n <ng-container [ngTemplateOutlet]=\"tplContentCustom\" />\n }\n }\n </div>\n </div>\n </div>\n</div>\n\n<ng-template #tplContentCustom>\n <ng-container #bodyContainer />\n</ng-template>\n\n<!-- [Predefined] Default Modal Content -->\n<ng-template #tplContentDefault>\n @if (kbqTitle) {\n <div kbq-title class=\"kbq-modal-header\" [class.kbq-modal-body_top-overflow]=\"isTopOverflow\">\n <div class=\"kbq-modal-title\">\n @switch (true) {\n @case (isTemplateRef(kbqTitle)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqTitle)\" />\n }\n @case (isNonEmptyString(kbqTitle)) {\n <div [innerHTML]=\"kbqTitle\"></div>\n }\n }\n </div>\n @if (kbqClosable) {\n <button\n kbq-button\n class=\"kbq-modal-close kbq-button_transparent\"\n [color]=\"'contrast'\"\n (click)=\"onClickCloseBtn()\"\n >\n <i kbq-icon=\"kbq-xmark_16\" [color]=\"componentColors.Contrast\"></i>\n </button>\n }\n </div>\n }\n <div #modalBody class=\"kbq-modal-body kbq-scrollbar\" [ngStyle]=\"kbqBodyStyle\" (scroll)=\"checkOverflow()\">\n <ng-container #bodyContainer>\n @if (!isComponent(kbqContent)) {\n @switch (true) {\n @case (isTemplateRef(kbqContent)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqContent)\" />\n }\n @case (isNonEmptyString(kbqContent)) {\n <div [innerHTML]=\"kbqContent\"></div>\n }\n @default {\n <ng-container [ngTemplateOutlet]=\"tplOriginContent\" />\n }\n }\n }\n </ng-container>\n </div>\n @if (kbqFooter || kbqOkText || kbqCancelText) {\n <div class=\"kbq-modal-footer\" [class.kbq-modal-body_bottom-overflow]=\"isBottomOverflow\">\n @switch (true) {\n @case (isTemplateRef(kbqFooter)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqFooter)\" />\n }\n @case (isNonEmptyString(kbqFooter)) {\n <div [innerHTML]=\"kbqFooter\"></div>\n }\n @case (isModalButtons(kbqFooter)) {\n @for (button of $any(kbqFooter); track button) {\n @if (getButtonCallableProp(button, 'show')) {\n <button\n kbq-button\n [attr.autofocus]=\"button.autoFocus\"\n [attr.kbq-modal-main-action]=\"button.kbqModalMainAction\"\n [class.kbq-progress]=\"getButtonCallableProp(button, 'loading')\"\n [color]=\"button.type\"\n [disabled]=\"getButtonCallableProp(button, 'disabled')\"\n (click)=\"onButtonClick(button)\"\n >\n {{ button.label }}\n </button>\n }\n }\n }\n @default {\n @if (kbqOkText) {\n <button\n kbq-button\n [attr.autofocus]=\"true\"\n [color]=\"componentColors.Contrast\"\n (click)=\"onClickOkCancel('ok')\"\n >\n {{ okText }}\n </button>\n }\n @if (kbqCancelText) {\n <button kbq-button (click)=\"onClickOkCancel('cancel')\">\n {{ cancelText }}\n </button>\n }\n }\n }\n </div>\n }\n</ng-template>\n<!-- /[Predefined] Default Modal Content -->\n\n<!-- [Predefined] Confirm Modal Content -->\n<ng-template #tplContentConfirm>\n <div class=\"kbq-modal-body\" [ngStyle]=\"kbqBodyStyle\">\n <ng-container #bodyContainer>\n @if (!isComponent(kbqContent)) {\n @switch (true) {\n @case (isTemplateRef(kbqContent)) {\n <ng-container [ngTemplateOutlet]=\"$any(kbqContent)\" />\n }\n @case (isNonEmptyString(kbqContent)) {\n <div [innerHTML]=\"kbqContent\"></div>\n }\n @default {\n <ng-container [ngTemplateOutlet]=\"tplOriginContent\" />\n }\n }\n }\n </ng-container>\n </div>\n @if (kbqOkText || kbqCancelText) {\n <div class=\"kbq-confirm-footer\">\n @if (kbqOkText) {\n <button kbq-button [attr.autofocus]=\"true\" [color]=\"kbqOkType\" (click)=\"onClickOkCancel('ok')\">\n {{ okText }}\n </button>\n }\n @if (kbqCancelText) {\n <button kbq-button (click)=\"onClickOkCancel('cancel')\">\n {{ cancelText }}\n </button>\n }\n </div>\n }\n</ng-template>\n<!-- /[Predefined] Confirm Modal Content -->\n", styles: [".kbq-confirm .kbq-modal-close{display:none}.kbq-confirm .kbq-confirm-footer{display:flex;gap:var(--kbq-modal-size-footer-content-gap-horizontal)}.kbq-modal{box-sizing:border-box;position:relative;top:48px;border-radius:var(--kbq-modal-size-border-radius);width:auto;margin:0 auto;list-style:none}.kbq-modal.zoom-enter,.kbq-modal.zoom-appear{animation-duration:.3s;transform:none;opacity:0}.kbq-modal.kbq-modal_small{width:var(--kbq-modal-size-small-width)}.kbq-modal.kbq-modal_medium{width:var(--kbq-modal-size-medium-width)}.kbq-modal.kbq-modal_large{width:var(--kbq-modal-size-large-width)}.kbq-modal .kbq-modal-close{position:absolute;top:16px;right:8px}.kbq-modal-wrap{position:fixed;inset:0;overflow:auto;-webkit-overflow-scrolling:touch;outline:0}.kbq-modal-content{position:relative;border-radius:var(--kbq-modal-size-border-radius);background-clip:padding-box}.kbq-modal-header{display:flex;align-items:center;justify-content:space-between;padding:var(--kbq-modal-size-header-padding-vertical) var(--kbq-modal-size-header-padding-right) var(--kbq-modal-size-header-padding-vertical) var(--kbq-modal-size-header-padding-left)}.kbq-modal-header+.kbq-modal-body{padding-top:var(--kbq-modal-size-content-padding-top)}.kbq-modal-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.kbq-modal-body{display:block;overflow-y:auto;max-height:calc(100vh - 260px);padding:var(--kbq-modal-size-content-padding-top-without-header) var(--kbq-modal-size-content-padding-horizontal) var(--kbq-modal-size-content-padding-bottom) var(--kbq-modal-size-content-padding-horizontal);word-wrap:break-word}.kbq-modal-body>*{position:relative}.kbq-modal-footer,.kbq-confirm-footer{display:flex;align-items:center;padding:var(--kbq-modal-size-footer-padding-vertical) var(--kbq-modal-size-footer-padding-horizontal);gap:var(--kbq-modal-size-footer-content-gap-horizontal)}.kbq-modal-mask{position:fixed;inset:0;height:100%}.kbq-modal-mask.kbq-modal-mask-hidden{display:none}.kbq-modal-open{overflow:hidden}.kbq-modal{background:var(--kbq-modal-container-background);box-shadow:var(--kbq-modal-container-shadow)}.kbq-modal .kbq-modal-header .kbq-modal-title{color:var(--kbq-modal-header-text-color)}.kbq-modal .kbq-modal-header .kbq-modal-close{color:var(--kbq-modal-close-button-color)}.kbq-modal .kbq-modal-content{color:var(--kbq-modal-content-text-color)}.kbq-modal .kbq-modal-header.kbq-modal-body_top-overflow{box-shadow:var(--kbq-shadow-overflow-normal-bottom)}.kbq-modal .kbq-modal-footer.kbq-modal-body_bottom-overflow{box-shadow:var(--kbq-shadow-overflow-normal-top)}.kbq-modal-mask{background-color:var(--kbq-modal-overlay-background)}.kbq-modal-title{font-size:var(--kbq-typography-title-font-size);font-weight:var(--kbq-typography-title-font-weight);line-height:var(--kbq-typography-title-line-height);font-family:var(--kbq-typography-title-font-family);text-transform:var(--kbq-typography-title-text-transform);font-feature-settings:var(--kbq-typography-title-font-feature-settings);letter-spacing:var(--kbq-typography-title-letter-spacing)}.kbq-modal-body{font-size:var(--kbq-typography-text-normal-font-size);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)}\n", ".kbq-modal{--kbq-modal-size-small-width: 400px;--kbq-modal-size-medium-width: 640px;--kbq-modal-size-large-width: 960px;--kbq-modal-size-border-radius: var(--kbq-size-s);--kbq-modal-size-header-padding-vertical: var(--kbq-size-l);--kbq-modal-size-header-padding-left: var(--kbq-size-xxl);--kbq-modal-size-header-padding-right: var(--kbq-size-5xl);--kbq-modal-size-close-button-margin-left: var(--kbq-size-s);--kbq-modal-size-content-padding-horizontal: var(--kbq-size-xxl);--kbq-modal-size-content-padding-top: 0;--kbq-modal-size-content-padding-bottom: var(--kbq-size-s);--kbq-modal-size-content-padding-top-without-header: var(--kbq-size-xxl);--kbq-modal-size-content-padding-bottom-without-footer: var(--kbq-size-4xl);--kbq-modal-size-footer-padding-horizontal: var(--kbq-size-xxl);--kbq-modal-size-footer-padding-vertical: var(--kbq-size-xl);--kbq-modal-size-footer-content-gap-horizontal: var(--kbq-size-l)}:where(.kbq-light,.theme-light,.kbq-theme-light){--kbq-modal-overlay-background: var(--kbq-background-overlay);--kbq-modal-container-background: var(--kbq-background-card);--kbq-modal-container-shadow: var(--kbq-shadow-overlay);--kbq-modal-close-button-color: var(--kbq-icon-contrast);--kbq-modal-header-text-color: var(--kbq-foreground-contrast);--kbq-modal-content-text-color: var(--kbq-foreground-contrast)}:where(.kbq-dark,.theme-dark,.kbq-theme-dark){--kbq-modal-overlay-background: var(--kbq-background-overlay);--kbq-modal-container-background: var(--kbq-background-card);--kbq-modal-container-shadow: var(--kbq-shadow-overlay);--kbq-modal-close-button-color: var(--kbq-icon-contrast);--kbq-modal-header-text-color: var(--kbq-foreground-contrast);--kbq-modal-content-text-color: var(--kbq-foreground-contrast)}\n"] }]
|
|
584
585
|
}], ctorParameters: () => [{ type: i1.Overlay }, { type: i0.Renderer2 }, { type: i0.ComponentFactoryResolver }, { type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: KbqModalControlService }, { type: i0.ChangeDetectorRef }, { type: i3.FocusMonitor }, { type: undefined, decorators: [{
|
|
585
586
|
type: Inject,
|
|
586
587
|
args: [DOCUMENT]
|
|
@@ -675,10 +676,7 @@ class KbqModalTitle {
|
|
|
675
676
|
}
|
|
676
677
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: KbqModalTitle, deps: [{ token: KbqModalComponent }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
677
678
|
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.6", type: KbqModalTitle, selector: "[kbq-modal-title], kbq-modal-title, [kbqModalTitle]", host: { properties: { "class.kbq-modal-header_closable": "modal.kbqClosable" }, classAttribute: "kbq-modal-header" }, ngImport: i0, template: `
|
|
678
|
-
<div
|
|
679
|
-
class="kbq-modal-title"
|
|
680
|
-
kbq-title
|
|
681
|
-
>
|
|
679
|
+
<div class="kbq-modal-title" kbq-title>
|
|
682
680
|
<ng-content />
|
|
683
681
|
</div>
|
|
684
682
|
|
|
@@ -689,10 +687,7 @@ class KbqModalTitle {
|
|
|
689
687
|
(click)="modal.onClickCloseBtn()"
|
|
690
688
|
kbq-button
|
|
691
689
|
>
|
|
692
|
-
<i
|
|
693
|
-
[color]="modal.componentColors.Contrast"
|
|
694
|
-
kbq-icon="kbq-xmark_16"
|
|
695
|
-
></i>
|
|
690
|
+
<i [color]="modal.componentColors.Contrast" kbq-icon="kbq-xmark_16"></i>
|
|
696
691
|
</button>
|
|
697
692
|
}
|
|
698
693
|
`, isInline: true, dependencies: [{ kind: "component", type: i4.KbqButton, selector: "[kbq-button]", inputs: ["color", "tabIndex", "kbqStyle", "disabled"] }, { kind: "directive", type: i4.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "component", type: i5.KbqIcon, selector: "[kbq-icon]", inputs: ["color", "small", "autoColor"] }, { kind: "directive", type: i6.KbqTitleDirective, selector: "[kbq-title]", exportAs: ["kbqTitle"] }] }); }
|
|
@@ -702,10 +697,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImpor
|
|
|
702
697
|
args: [{
|
|
703
698
|
selector: `[kbq-modal-title], kbq-modal-title, [kbqModalTitle]`,
|
|
704
699
|
template: `
|
|
705
|
-
<div
|
|
706
|
-
class="kbq-modal-title"
|
|
707
|
-
kbq-title
|
|
708
|
-
>
|
|
700
|
+
<div class="kbq-modal-title" kbq-title>
|
|
709
701
|
<ng-content />
|
|
710
702
|
</div>
|
|
711
703
|
|
|
@@ -716,10 +708,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImpor
|
|
|
716
708
|
(click)="modal.onClickCloseBtn()"
|
|
717
709
|
kbq-button
|
|
718
710
|
>
|
|
719
|
-
<i
|
|
720
|
-
[color]="modal.componentColors.Contrast"
|
|
721
|
-
kbq-icon="kbq-xmark_16"
|
|
722
|
-
></i>
|
|
711
|
+
<i [color]="modal.componentColors.Contrast" kbq-icon="kbq-xmark_16"></i>
|
|
723
712
|
</button>
|
|
724
713
|
}
|
|
725
714
|
`,
|