@agorapulse/ui-components 17.1.8 → 17.2.1
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/agorapulse-ui-components-17.2.1.tgz +0 -0
- package/esm2022/autocomplete/autocomplete.component.mjs +5 -5
- package/esm2022/button/button.component.mjs +3 -3
- package/esm2022/checkbox/checkbox.component.mjs +5 -5
- package/esm2022/datepicker/datepicker.component.mjs +5 -5
- package/esm2022/form-message/form-message.component.mjs +6 -6
- package/esm2022/icon-button/icon-button.component.mjs +3 -3
- package/esm2022/infobox/infobox.component.mjs +9 -9
- package/esm2022/input-group/input-group.component.mjs +2 -2
- package/esm2022/input-search/input-search.component.mjs +5 -5
- package/esm2022/labels/label.component.mjs +3 -3
- package/esm2022/legacy/input/input.component.mjs +6 -6
- package/esm2022/legacy/select/select.component.mjs +5 -5
- package/esm2022/legacy/textarea/textarea.component.mjs +5 -5
- package/esm2022/media-display-overlay/media-display-overlay-dialog.component.mjs +5 -5
- package/esm2022/neo-datepicker/neo-datepicker.component.mjs +3 -3
- package/esm2022/paginator/paginator.component.mjs +5 -5
- package/esm2022/password-input/password-input.component.mjs +3 -3
- package/esm2022/phone-number-input/phone-number-input.component.mjs +2 -2
- package/esm2022/select/dropdown-item-multiple-one-line/dropdown-item-multiple-one-line.component.mjs +3 -3
- package/esm2022/select/dropdown-item-multiple-two-lines/dropdown-item-multiple-two-lines.component.mjs +3 -3
- package/esm2022/select/dropdown-item-single-one-line/dropdown-item-single-one-line.component.mjs +6 -3
- package/esm2022/select/dropdown-item-single-two-lines/dropdown-item-single-two-lines.component.mjs +3 -3
- package/esm2022/select/dropdown-search-form/dropdown-search-form.component.mjs +3 -3
- package/esm2022/select/select-base.directive.mjs +3 -3
- package/esm2022/select/select-label-multiple/select-label-multiple.component.mjs +3 -3
- package/esm2022/select/select-label-single/select-label-single.component.mjs +6 -3
- package/esm2022/snackbars-thread/component/snackbars-thread.component.mjs +5 -5
- package/esm2022/snackbars-thread/utils/const/snackbars-thread.const.mjs +4 -4
- package/esm2022/social-button/social-button.component.mjs +3 -3
- package/esm2022/split-button/split-button.component.mjs +6 -6
- package/esm2022/stepper/stepper.component.mjs +3 -3
- package/esm2022/tag/tag.component.mjs +3 -3
- package/esm2022/toggle/toggle.component.mjs +3 -3
- package/fesm2022/agorapulse-ui-components-autocomplete.mjs +4 -4
- package/fesm2022/agorapulse-ui-components-autocomplete.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-button.mjs +2 -2
- package/fesm2022/agorapulse-ui-components-button.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-checkbox.mjs +4 -4
- package/fesm2022/agorapulse-ui-components-checkbox.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-datepicker.mjs +4 -4
- package/fesm2022/agorapulse-ui-components-datepicker.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-form-message.mjs +5 -5
- package/fesm2022/agorapulse-ui-components-form-message.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-icon-button.mjs +2 -2
- package/fesm2022/agorapulse-ui-components-icon-button.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-infobox.mjs +8 -8
- package/fesm2022/agorapulse-ui-components-infobox.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-input-group.mjs +2 -2
- package/fesm2022/agorapulse-ui-components-input-group.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-input-search.mjs +4 -4
- package/fesm2022/agorapulse-ui-components-input-search.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-labels.mjs +2 -2
- package/fesm2022/agorapulse-ui-components-labels.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-legacy-input.mjs +5 -5
- package/fesm2022/agorapulse-ui-components-legacy-input.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-legacy-select.mjs +4 -4
- package/fesm2022/agorapulse-ui-components-legacy-select.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-legacy-textarea.mjs +4 -4
- package/fesm2022/agorapulse-ui-components-legacy-textarea.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-media-display-overlay.mjs +4 -4
- package/fesm2022/agorapulse-ui-components-media-display-overlay.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-neo-datepicker.mjs +2 -2
- package/fesm2022/agorapulse-ui-components-neo-datepicker.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-paginator.mjs +4 -4
- package/fesm2022/agorapulse-ui-components-paginator.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-password-input.mjs +2 -2
- package/fesm2022/agorapulse-ui-components-password-input.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-phone-number-input.mjs +1 -1
- package/fesm2022/agorapulse-ui-components-phone-number-input.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-select.mjs +22 -16
- package/fesm2022/agorapulse-ui-components-select.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-snackbars-thread.mjs +7 -7
- package/fesm2022/agorapulse-ui-components-snackbars-thread.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-social-button.mjs +2 -2
- package/fesm2022/agorapulse-ui-components-social-button.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-split-button.mjs +5 -5
- package/fesm2022/agorapulse-ui-components-split-button.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-stepper.mjs +2 -2
- package/fesm2022/agorapulse-ui-components-stepper.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-tag.mjs +2 -2
- package/fesm2022/agorapulse-ui-components-tag.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-toggle.mjs +2 -2
- package/fesm2022/agorapulse-ui-components-toggle.mjs.map +1 -1
- package/form-message/form-message.component.d.ts +1 -1
- package/package.json +7 -7
- package/select/dropdown-item-single-one-line/dropdown-item-single-one-line.component.d.ts +2 -1
- package/select/select-label-single/select-label-single.component.d.ts +2 -1
- package/snackbars-thread/component/snackbars-thread.component.d.ts +1 -1
- package/agorapulse-ui-components-17.1.8.tgz +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ButtonComponent } from '@agorapulse/ui-components/button';
|
|
2
|
-
import { SymbolRegistry,
|
|
2
|
+
import { SymbolRegistry, apInfoFill, apErrorFill, apWarningFill, apRemoveCircle, apRoundedCheckFill, apClose, apDeleteNoCircle, SymbolComponent } from '@agorapulse/ui-symbol';
|
|
3
3
|
import { NgClass } from '@angular/common';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
5
|
import { inject, ElementRef, EventEmitter, booleanAttribute, Component, ChangeDetectionStrategy, ViewEncapsulation, HostBinding, Input, Output } from '@angular/core';
|
|
@@ -29,13 +29,13 @@ class InfoboxComponent {
|
|
|
29
29
|
displayDirection = 'horizontal';
|
|
30
30
|
defaultButtonId = '';
|
|
31
31
|
symbolIds = {
|
|
32
|
-
info: '
|
|
33
|
-
warning: '
|
|
34
|
-
error: '
|
|
35
|
-
success: '
|
|
32
|
+
info: 'info_fill',
|
|
33
|
+
warning: 'warning_fill',
|
|
34
|
+
error: 'error_fill',
|
|
35
|
+
success: 'rounded-check_fill',
|
|
36
36
|
};
|
|
37
37
|
constructor() {
|
|
38
|
-
this.symbolRegistry.registerSymbols([
|
|
38
|
+
this.symbolRegistry.registerSymbols([apInfoFill, apErrorFill, apWarningFill, apRemoveCircle, apRoundedCheckFill, apClose, apDeleteNoCircle]);
|
|
39
39
|
this.defaultButtonId = `infobox-button-${++nextUniqueId}`;
|
|
40
40
|
}
|
|
41
41
|
onClickButton() {
|
|
@@ -46,11 +46,11 @@ class InfoboxComponent {
|
|
|
46
46
|
this.closed.emit();
|
|
47
47
|
}
|
|
48
48
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: InfoboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
49
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.3", type: InfoboxComponent, isStandalone: true, selector: "ap-infobox", inputs: { buttonId: "buttonId", buttonLabel: "buttonLabel", buttonDataTrack: "buttonDataTrack", closable: ["closable", "closable", booleanAttribute], title: "title", type: "type", width: "width" }, outputs: { buttonClicked: "buttonClicked", closed: "closed" }, host: { properties: { "class.full-width": "this.fullWidth" } }, ngImport: i0, template: "<div\n class=\"main\"\n [class.info]=\"type === 'info'\"\n [class.warning]=\"type === 'warning'\"\n [class.error]=\"type === 'error'\"\n [class.success]=\"type === 'success'\"\n [class.has-title]=\"!!title\">\n <div class=\"status-banner\"></div>\n <div class=\"wrapper\">\n <div class=\"symbol-content\">\n <div class=\"symbol-wrapper\">\n <ap-symbol\n class=\"status\"\n size=\"
|
|
49
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.3", type: InfoboxComponent, isStandalone: true, selector: "ap-infobox", inputs: { buttonId: "buttonId", buttonLabel: "buttonLabel", buttonDataTrack: "buttonDataTrack", closable: ["closable", "closable", booleanAttribute], title: "title", type: "type", width: "width" }, outputs: { buttonClicked: "buttonClicked", closed: "closed" }, host: { properties: { "class.full-width": "this.fullWidth" } }, ngImport: i0, template: "<div\n class=\"main\"\n [class.info]=\"type === 'info'\"\n [class.warning]=\"type === 'warning'\"\n [class.error]=\"type === 'error'\"\n [class.success]=\"type === 'success'\"\n [class.has-title]=\"!!title\">\n <div class=\"status-banner\"></div>\n <div class=\"wrapper\">\n <div class=\"symbol-content\">\n <div class=\"symbol-wrapper\">\n <ap-symbol\n class=\"status\"\n size=\"sm\"\n [symbolId]=\"symbolIds[type]\" />\n </div>\n <div class=\"content\">\n <div class=\"texts\">\n @if (title) {\n <span class=\"title\">\n {{ title }}\n </span>\n }\n <span class=\"text\">\n <ng-content />\n </span>\n </div>\n @if (buttonLabel) {\n <ap-button\n name=\"infobox-button\"\n [id]=\"buttonId ?? defaultButtonId\"\n [attr.data-track]=\"buttonDataTrack\"\n [config]=\"{\n style: 'stroked',\n color: 'grey'\n }\"\n (click)=\"onClickButton()\">\n {{ buttonLabel }}\n </ap-button>\n }\n </div>\n </div>\n @if (closable) {\n <button\n class=\"closable-button\"\n (click)=\"onCloseInfobox()\">\n <ap-symbol\n aria-label=\"close-snackbar\"\n symbolId=\"delete-no-circle\"\n size=\"xs\"/>\n </button>\n }\n </div>\n</div>\n", styles: ["ap-infobox{--comp-icon-size: 20px;container:infobox/inline-size;display:block;width:100%;max-width:100%}ap-infobox .main{display:flex;font-size:var(--ref-font-size-sm);line-height:var(--ref-font-line-height-sm);align-items:center;color:var(--ref-color-grey-100);padding:var(--comp-infobox-padding-top) var(--comp-infobox-padding-right) var(--comp-infobox-padding-bottom) var(--comp-infobox-padding-left);border-radius:var(--comp-infobox-border-radius);overflow:hidden;font-family:var(--comp-infobox-text-title-font-family);box-sizing:border-box;position:relative;gap:var(--comp-infobox-button-margin-left)}ap-infobox .main .status-banner{position:absolute;left:0;top:0;width:4px;height:100%}ap-infobox .main ap-symbol{align-self:center}ap-infobox .main .symbol-wrapper{margin-top:1px}ap-infobox .main.has-title .symbol-wrapper{margin-top:var(--ref-spacing-xxxs)}ap-infobox .main button.closable-button{border:none;background-color:transparent;height:var(--comp-icon-size);width:var(--comp-icon-size);border-radius:100%;display:flex;align-items:center;justify-content:center;cursor:pointer}ap-infobox .main button.closable-button svg{margin:0;color:var(--ref-color-grey-60)}ap-infobox .main button.closable-button:hover{background-color:#3445631a}ap-infobox .main button.closable-button:hover svg{color:var(--ref-color-grey-80)}ap-infobox .main button.closable-button:active{background-color:#34456333}ap-infobox .main button.closable-button:active svg{color:var(--ref-color-grey-100)}ap-infobox .main .wrapper{display:flex;justify-content:space-between;width:100%;align-items:flex-start;gap:var(--ref-spacing-xxs)}ap-infobox .main .wrapper .symbol-content{display:flex;gap:var(--ref-spacing-xs);align-items:flex-start;flex:1}ap-infobox .main .wrapper .symbol-content .content{display:flex;flex-direction:column;align-items:flex-start;flex:1;justify-content:space-between;gap:var(--ref-spacing-xxs)}ap-infobox .main .wrapper .symbol-content .content ap-button button{width:unset}ap-infobox .main .wrapper .symbol-content .content .texts{display:flex;flex-direction:column;overflow-wrap:anywhere}ap-infobox .main .wrapper .symbol-content .content .texts .title{font-weight:var(--comp-infobox-text-title-weight);font-family:var(--comp-infobox-text-title-font-family);font-size:var(--comp-infobox-text-title-size);line-height:var(--comp-infobox-text-title-line-height)}ap-infobox .main.info{background-color:var(--comp-infobox-info-background-color)}ap-infobox .main.info ap-symbol.status{align-self:baseline;color:var(--comp-infobox-info-icon-color)}ap-infobox .main.info .status-banner{background-color:var(--comp-infobox-info-border-left-color)}ap-infobox .main.warning{background-color:var(--comp-infobox-warning-background-color)}ap-infobox .main.warning ap-symbol.status{color:var(--comp-infobox-warning-icon-color)}ap-infobox .main.warning .status-banner{background-color:var(--comp-infobox-warning-border-left-color)}ap-infobox .main.error{background-color:var(--comp-infobox-error-background-color)}ap-infobox .main.error ap-symbol.status{color:var(--comp-infobox-error-icon-color)}ap-infobox .main.error .status-banner{background-color:var(--comp-infobox-error-border-left-color)}ap-infobox .main.success{background-color:var(--comp-infobox-success-background-color)}ap-infobox .main.success ap-symbol.status{color:var(--comp-infobox-success-icon-color)}ap-infobox .main.success .status-banner{background-color:var(--comp-infobox-success-border-left-color)}@container infobox (min-width: 588px){.main .wrapper{align-items:center!important}.main .wrapper .symbol-wrapper{margin-top:0!important}.main .wrapper .symbol-content{align-items:center!important}.main .wrapper .symbol-content .content{flex-direction:row!important;align-items:center!important}}\n"], dependencies: [{ kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["color", "symbolId", "size"] }, { kind: "component", type: ButtonComponent, selector: "ap-button", inputs: ["ariaLabel", "disabled", "name", "form", "config", "loading", "locked", "menuTrigger", "symbolPosition", "ionicModalEnabled"], outputs: ["menuOpened", "menuClosed", "click", "focus", "blur"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
50
50
|
}
|
|
51
51
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: InfoboxComponent, decorators: [{
|
|
52
52
|
type: Component,
|
|
53
|
-
args: [{ selector: 'ap-infobox', standalone: true, imports: [SymbolComponent, NgClass, ButtonComponent], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div\n class=\"main\"\n [class.info]=\"type === 'info'\"\n [class.warning]=\"type === 'warning'\"\n [class.error]=\"type === 'error'\"\n [class.success]=\"type === 'success'\"\n [class.has-title]=\"!!title\">\n <div class=\"status-banner\"></div>\n <div class=\"wrapper\">\n <div class=\"symbol-content\">\n <div class=\"symbol-wrapper\">\n <ap-symbol\n class=\"status\"\n size=\"
|
|
53
|
+
args: [{ selector: 'ap-infobox', standalone: true, imports: [SymbolComponent, NgClass, ButtonComponent], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div\n class=\"main\"\n [class.info]=\"type === 'info'\"\n [class.warning]=\"type === 'warning'\"\n [class.error]=\"type === 'error'\"\n [class.success]=\"type === 'success'\"\n [class.has-title]=\"!!title\">\n <div class=\"status-banner\"></div>\n <div class=\"wrapper\">\n <div class=\"symbol-content\">\n <div class=\"symbol-wrapper\">\n <ap-symbol\n class=\"status\"\n size=\"sm\"\n [symbolId]=\"symbolIds[type]\" />\n </div>\n <div class=\"content\">\n <div class=\"texts\">\n @if (title) {\n <span class=\"title\">\n {{ title }}\n </span>\n }\n <span class=\"text\">\n <ng-content />\n </span>\n </div>\n @if (buttonLabel) {\n <ap-button\n name=\"infobox-button\"\n [id]=\"buttonId ?? defaultButtonId\"\n [attr.data-track]=\"buttonDataTrack\"\n [config]=\"{\n style: 'stroked',\n color: 'grey'\n }\"\n (click)=\"onClickButton()\">\n {{ buttonLabel }}\n </ap-button>\n }\n </div>\n </div>\n @if (closable) {\n <button\n class=\"closable-button\"\n (click)=\"onCloseInfobox()\">\n <ap-symbol\n aria-label=\"close-snackbar\"\n symbolId=\"delete-no-circle\"\n size=\"xs\"/>\n </button>\n }\n </div>\n</div>\n", styles: ["ap-infobox{--comp-icon-size: 20px;container:infobox/inline-size;display:block;width:100%;max-width:100%}ap-infobox .main{display:flex;font-size:var(--ref-font-size-sm);line-height:var(--ref-font-line-height-sm);align-items:center;color:var(--ref-color-grey-100);padding:var(--comp-infobox-padding-top) var(--comp-infobox-padding-right) var(--comp-infobox-padding-bottom) var(--comp-infobox-padding-left);border-radius:var(--comp-infobox-border-radius);overflow:hidden;font-family:var(--comp-infobox-text-title-font-family);box-sizing:border-box;position:relative;gap:var(--comp-infobox-button-margin-left)}ap-infobox .main .status-banner{position:absolute;left:0;top:0;width:4px;height:100%}ap-infobox .main ap-symbol{align-self:center}ap-infobox .main .symbol-wrapper{margin-top:1px}ap-infobox .main.has-title .symbol-wrapper{margin-top:var(--ref-spacing-xxxs)}ap-infobox .main button.closable-button{border:none;background-color:transparent;height:var(--comp-icon-size);width:var(--comp-icon-size);border-radius:100%;display:flex;align-items:center;justify-content:center;cursor:pointer}ap-infobox .main button.closable-button svg{margin:0;color:var(--ref-color-grey-60)}ap-infobox .main button.closable-button:hover{background-color:#3445631a}ap-infobox .main button.closable-button:hover svg{color:var(--ref-color-grey-80)}ap-infobox .main button.closable-button:active{background-color:#34456333}ap-infobox .main button.closable-button:active svg{color:var(--ref-color-grey-100)}ap-infobox .main .wrapper{display:flex;justify-content:space-between;width:100%;align-items:flex-start;gap:var(--ref-spacing-xxs)}ap-infobox .main .wrapper .symbol-content{display:flex;gap:var(--ref-spacing-xs);align-items:flex-start;flex:1}ap-infobox .main .wrapper .symbol-content .content{display:flex;flex-direction:column;align-items:flex-start;flex:1;justify-content:space-between;gap:var(--ref-spacing-xxs)}ap-infobox .main .wrapper .symbol-content .content ap-button button{width:unset}ap-infobox .main .wrapper .symbol-content .content .texts{display:flex;flex-direction:column;overflow-wrap:anywhere}ap-infobox .main .wrapper .symbol-content .content .texts .title{font-weight:var(--comp-infobox-text-title-weight);font-family:var(--comp-infobox-text-title-font-family);font-size:var(--comp-infobox-text-title-size);line-height:var(--comp-infobox-text-title-line-height)}ap-infobox .main.info{background-color:var(--comp-infobox-info-background-color)}ap-infobox .main.info ap-symbol.status{align-self:baseline;color:var(--comp-infobox-info-icon-color)}ap-infobox .main.info .status-banner{background-color:var(--comp-infobox-info-border-left-color)}ap-infobox .main.warning{background-color:var(--comp-infobox-warning-background-color)}ap-infobox .main.warning ap-symbol.status{color:var(--comp-infobox-warning-icon-color)}ap-infobox .main.warning .status-banner{background-color:var(--comp-infobox-warning-border-left-color)}ap-infobox .main.error{background-color:var(--comp-infobox-error-background-color)}ap-infobox .main.error ap-symbol.status{color:var(--comp-infobox-error-icon-color)}ap-infobox .main.error .status-banner{background-color:var(--comp-infobox-error-border-left-color)}ap-infobox .main.success{background-color:var(--comp-infobox-success-background-color)}ap-infobox .main.success ap-symbol.status{color:var(--comp-infobox-success-icon-color)}ap-infobox .main.success .status-banner{background-color:var(--comp-infobox-success-border-left-color)}@container infobox (min-width: 588px){.main .wrapper{align-items:center!important}.main .wrapper .symbol-wrapper{margin-top:0!important}.main .wrapper .symbol-content{align-items:center!important}.main .wrapper .symbol-content .content{flex-direction:row!important;align-items:center!important}}\n"] }]
|
|
54
54
|
}], ctorParameters: () => [], propDecorators: { fullWidth: [{
|
|
55
55
|
type: HostBinding,
|
|
56
56
|
args: ['class.full-width']
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agorapulse-ui-components-infobox.mjs","sources":["../../../libs/ui-components/infobox/src/infobox.component.ts","../../../libs/ui-components/infobox/src/infobox.component.html","../../../libs/ui-components/infobox/src/agorapulse-ui-components-infobox.ts"],"sourcesContent":["import { ButtonComponent } from '@agorapulse/ui-components/button';\nimport {\n SymbolComponent,\n SymbolRegistry,\n agorapulseSymbol,\n
|
|
1
|
+
{"version":3,"file":"agorapulse-ui-components-infobox.mjs","sources":["../../../libs/ui-components/infobox/src/infobox.component.ts","../../../libs/ui-components/infobox/src/infobox.component.html","../../../libs/ui-components/infobox/src/agorapulse-ui-components-infobox.ts"],"sourcesContent":["import { ButtonComponent } from '@agorapulse/ui-components/button';\nimport {\n SymbolComponent,\n SymbolRegistry,\n agorapulseSymbol,\n apErrorFill,\n apRoundedCheckFill,\n apClose,\n apInfoFill,\n apRemoveCircle,\n apWarningFill,\n apDeleteNoCircle,\n} from '@agorapulse/ui-symbol';\nimport { NgClass } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n HostBinding,\n Input,\n Output,\n ViewEncapsulation,\n booleanAttribute,\n inject,\n} from '@angular/core';\nexport type InfoboxDirection = 'column' | 'row';\nexport type InfoboxWidth = 'fit' | 'full-width';\n\n// Increasing integer for generating unique ids for infobox components.\nlet nextUniqueId = 0;\n\n@Component({\n selector: 'ap-infobox',\n templateUrl: './infobox.component.html',\n styleUrls: ['./infobox.component.scss'],\n standalone: true,\n imports: [SymbolComponent, NgClass, ButtonComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class InfoboxComponent {\n private readonly symbolRegistry = inject(SymbolRegistry);\n private readonly elementRef = inject(ElementRef);\n\n @HostBinding('class.full-width') fullWidth: boolean = false;\n\n @Input() buttonId: string | null = null;\n @Input() buttonLabel: string | undefined = undefined;\n @Input() buttonDataTrack: string | null = null;\n @Input({\n transform: booleanAttribute,\n })\n closable = false;\n @Input() title?: string;\n @Input() type: 'info' | 'warning' | 'error' | 'success' = 'info';\n\n @Input() set width(width: InfoboxWidth) {\n this._width = width;\n this.fullWidth = width === 'full-width';\n }\n get width(): InfoboxWidth {\n return this._width;\n }\n private _width: InfoboxWidth = 'fit';\n\n @Output() buttonClicked = new EventEmitter<void>();\n @Output() closed = new EventEmitter<void>();\n\n displayDirection: 'horizontal' | 'vertical' = 'horizontal';\n defaultButtonId: string = '';\n\n\n readonly symbolIds: { [k: string]: agorapulseSymbol } = {\n info: 'info_fill',\n warning: 'warning_fill',\n error: 'error_fill',\n success: 'rounded-check_fill',\n };\n\n constructor() {\n this.symbolRegistry.registerSymbols([apInfoFill, apErrorFill, apWarningFill, apRemoveCircle, apRoundedCheckFill, apClose, apDeleteNoCircle]);\n this.defaultButtonId = `infobox-button-${++nextUniqueId}`\n }\n\n onClickButton(): void {\n this.buttonClicked.emit();\n }\n\n onCloseInfobox(): void {\n this.elementRef.nativeElement.remove();\n this.closed.emit();\n }\n}\n","<div\n class=\"main\"\n [class.info]=\"type === 'info'\"\n [class.warning]=\"type === 'warning'\"\n [class.error]=\"type === 'error'\"\n [class.success]=\"type === 'success'\"\n [class.has-title]=\"!!title\">\n <div class=\"status-banner\"></div>\n <div class=\"wrapper\">\n <div class=\"symbol-content\">\n <div class=\"symbol-wrapper\">\n <ap-symbol\n class=\"status\"\n size=\"sm\"\n [symbolId]=\"symbolIds[type]\" />\n </div>\n <div class=\"content\">\n <div class=\"texts\">\n @if (title) {\n <span class=\"title\">\n {{ title }}\n </span>\n }\n <span class=\"text\">\n <ng-content />\n </span>\n </div>\n @if (buttonLabel) {\n <ap-button\n name=\"infobox-button\"\n [id]=\"buttonId ?? defaultButtonId\"\n [attr.data-track]=\"buttonDataTrack\"\n [config]=\"{\n style: 'stroked',\n color: 'grey'\n }\"\n (click)=\"onClickButton()\">\n {{ buttonLabel }}\n </ap-button>\n }\n </div>\n </div>\n @if (closable) {\n <button\n class=\"closable-button\"\n (click)=\"onCloseInfobox()\">\n <ap-symbol\n aria-label=\"close-snackbar\"\n symbolId=\"delete-no-circle\"\n size=\"xs\"/>\n </button>\n }\n </div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;AA6BA;AACA,IAAI,YAAY,GAAG,CAAC,CAAC;MAWR,gBAAgB,CAAA;AACR,IAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC;AACxC,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;IAEhB,SAAS,GAA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eAAe,CAAC,mBACnC,uBAAuB,CAAC,MAAM,EAChC,aAAA,EAAA,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAAA,w1DAAA,EAAA,MAAA,EAAA,CAAA,krHAAA,CAAA,EAAA,CAAA;wDAMJ,SAAS,EAAA,CAAA;sBAAzC,WAAW;uBAAC,kBAAkB,CAAA;gBAEtB,QAAQ,EAAA,CAAA;sBAAhB,KAAK;gBACG,WAAW,EAAA,CAAA;sBAAnB,KAAK;gBACG,eAAe,EAAA,CAAA;sBAAvB,KAAK;gBAIN,QAAQ,EAAA,CAAA;sBAHP,KAAK;AAAC,gBAAA,IAAA,EAAA,CAAA;AACH,wBAAA,SAAS,EAAE,gBAAgB;AAC9B,qBAAA,CAAA;gBAEQ,KAAK,EAAA,CAAA;sBAAb,KAAK;gBACG,IAAI,EAAA,CAAA;sBAAZ,KAAK;gBAEO,KAAK,EAAA,CAAA;sBAAjB,KAAK;gBASI,aAAa,EAAA,CAAA;sBAAtB,MAAM;gBACG,MAAM,EAAA,CAAA;sBAAf,MAAM;;;AEnEX;;AAEG;;;;"}
|
|
@@ -4,11 +4,11 @@ import { Component, ChangeDetectionStrategy, ViewEncapsulation, Input } from '@a
|
|
|
4
4
|
class InputGroupComponent {
|
|
5
5
|
symbolPosition = 'left';
|
|
6
6
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: InputGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: InputGroupComponent, isStandalone: true, selector: "ap-input-group", inputs: { symbolPosition: "symbolPosition" }, ngImport: i0, template: "<div\n class=\"ap-input-group\"\n [class.inverse]=\"symbolPosition === 'right'\">\n <ng-content select=\"ap-input-prefix\" />\n <ng-content select=\"ap-symbol\" />\n <ng-content />\n</div>\n", styles: ["ap-input-group.valid .ap-input-group{border-color:var(--comp-input-border-success-color)}ap-input-group.invalid .ap-input-group{border-color:var(--comp-input-border-error-color)}ap-input-group .ap-input-group{width:100%;display:inline-flex;align-items:center;height:var(--comp-input-height);border:1px solid var(--comp-input-border-default-color);box-sizing:border-box;border-radius:var(--comp-input-border-radius);overflow:hidden;background-color:var(--comp-input-fill-color);gap:var(--ref-spacing-xxs);padding:0 var(--ref-spacing-xs)}ap-input-group .ap-input-group:has(input[disabled]){background-color:var(--comp-input-fill-disabled-color);color:var(--comp-input-text-disabled-color)}ap-input-group .ap-input-group:has(input.valid){border-color:var(--comp-input-border-success-color)}ap-input-group .ap-input-group:has(input.invalid),ap-input-group .ap-input-group:has(input.ng-invalid.ng-dirty.ng-touched){border-color:var(--comp-input-border-error-color)}ap-input-group .ap-input-group:hover:not(.disabled):not(:has(input[disabled])){border-color:var(--comp-input-border-hover-color)}ap-input-group .ap-input-group:focus-within:not(.disabled):not(:has(input[disabled])){border-color:var(--comp-input-border-focused-color)}ap-input-group .ap-input-group:focus-visible:not(.disabled):not(:has(input[disabled])){outline:none}ap-input-group .ap-input-group:active:not(.disabled):not(:has(input[disabled])){border-color:var(--comp-input-border-focused-color)}ap-input-group .ap-input-group.disabled{background-color:var(--comp-input-fill-disabled-color);color:var(--comp-input-text-disabled-color)}ap-input-group .ap-input-group.inverse{flex-direction:row-reverse}ap-input-group .ap-input-group input.ap-input{flex:1;padding-left:0;padding-right:0}ap-input-group .ap-input-group input.ap-input.valid:not([disabled]):not(:focus):not(:hover){border:none}ap-input-group .ap-input-group input.ap-input.invalid:not([disabled]):not(:focus):not(:hover),ap-input-group .ap-input-group input.ap-input.ng-invalid.ng-dirty.ng-touched:not([disabled]):not(:focus):not(:hover){border:none}ap-input-group .ap-input-group ap-symbol{
|
|
7
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: InputGroupComponent, isStandalone: true, selector: "ap-input-group", inputs: { symbolPosition: "symbolPosition" }, ngImport: i0, template: "<div\n class=\"ap-input-group\"\n [class.inverse]=\"symbolPosition === 'right'\">\n <ng-content select=\"ap-input-prefix\" />\n <ng-content select=\"ap-symbol\" />\n <ng-content />\n</div>\n", styles: ["ap-input-group.valid .ap-input-group{border-color:var(--comp-input-border-success-color)}ap-input-group.invalid .ap-input-group{border-color:var(--comp-input-border-error-color)}ap-input-group .ap-input-group{width:100%;display:inline-flex;align-items:center;height:var(--comp-input-height);border:1px solid var(--comp-input-border-default-color);box-sizing:border-box;border-radius:var(--comp-input-border-radius);overflow:hidden;background-color:var(--comp-input-fill-color);gap:var(--ref-spacing-xxs);padding:0 var(--ref-spacing-xs)}ap-input-group .ap-input-group:has(input[disabled]){background-color:var(--comp-input-fill-disabled-color);color:var(--comp-input-text-disabled-color)}ap-input-group .ap-input-group:has(input.valid){border-color:var(--comp-input-border-success-color)}ap-input-group .ap-input-group:has(input.invalid),ap-input-group .ap-input-group:has(input.ng-invalid.ng-dirty.ng-touched){border-color:var(--comp-input-border-error-color)}ap-input-group .ap-input-group:hover:not(.disabled):not(:has(input[disabled])){border-color:var(--comp-input-border-hover-color)}ap-input-group .ap-input-group:focus-within:not(.disabled):not(:has(input[disabled])){border-color:var(--comp-input-border-focused-color)}ap-input-group .ap-input-group:focus-visible:not(.disabled):not(:has(input[disabled])){outline:none}ap-input-group .ap-input-group:active:not(.disabled):not(:has(input[disabled])){border-color:var(--comp-input-border-focused-color)}ap-input-group .ap-input-group.disabled{background-color:var(--comp-input-fill-disabled-color);color:var(--comp-input-text-disabled-color)}ap-input-group .ap-input-group.inverse{flex-direction:row-reverse}ap-input-group .ap-input-group input.ap-input{flex:1;padding-left:0;padding-right:0}ap-input-group .ap-input-group input.ap-input.valid:not([disabled]):not(:focus):not(:hover){border:none}ap-input-group .ap-input-group input.ap-input.invalid:not([disabled]):not(:focus):not(:hover),ap-input-group .ap-input-group input.ap-input.ng-invalid.ng-dirty.ng-touched:not([disabled]):not(:focus):not(:hover){border:none}ap-input-group .ap-input-group ap-symbol{max-height:var(--comp-input-icon-size);max-width:var(--comp-input-icon-size);color:var(--comp-input-icon-color);pointer-events:none;box-sizing:content-box}ap-input-group .ap-input-group ap-symbol:hover{cursor:text}ap-input-group .ap-input-group .ap-input{border:none;outline:none}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
8
8
|
}
|
|
9
9
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: InputGroupComponent, decorators: [{
|
|
10
10
|
type: Component,
|
|
11
|
-
args: [{ selector: 'ap-input-group', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div\n class=\"ap-input-group\"\n [class.inverse]=\"symbolPosition === 'right'\">\n <ng-content select=\"ap-input-prefix\" />\n <ng-content select=\"ap-symbol\" />\n <ng-content />\n</div>\n", styles: ["ap-input-group.valid .ap-input-group{border-color:var(--comp-input-border-success-color)}ap-input-group.invalid .ap-input-group{border-color:var(--comp-input-border-error-color)}ap-input-group .ap-input-group{width:100%;display:inline-flex;align-items:center;height:var(--comp-input-height);border:1px solid var(--comp-input-border-default-color);box-sizing:border-box;border-radius:var(--comp-input-border-radius);overflow:hidden;background-color:var(--comp-input-fill-color);gap:var(--ref-spacing-xxs);padding:0 var(--ref-spacing-xs)}ap-input-group .ap-input-group:has(input[disabled]){background-color:var(--comp-input-fill-disabled-color);color:var(--comp-input-text-disabled-color)}ap-input-group .ap-input-group:has(input.valid){border-color:var(--comp-input-border-success-color)}ap-input-group .ap-input-group:has(input.invalid),ap-input-group .ap-input-group:has(input.ng-invalid.ng-dirty.ng-touched){border-color:var(--comp-input-border-error-color)}ap-input-group .ap-input-group:hover:not(.disabled):not(:has(input[disabled])){border-color:var(--comp-input-border-hover-color)}ap-input-group .ap-input-group:focus-within:not(.disabled):not(:has(input[disabled])){border-color:var(--comp-input-border-focused-color)}ap-input-group .ap-input-group:focus-visible:not(.disabled):not(:has(input[disabled])){outline:none}ap-input-group .ap-input-group:active:not(.disabled):not(:has(input[disabled])){border-color:var(--comp-input-border-focused-color)}ap-input-group .ap-input-group.disabled{background-color:var(--comp-input-fill-disabled-color);color:var(--comp-input-text-disabled-color)}ap-input-group .ap-input-group.inverse{flex-direction:row-reverse}ap-input-group .ap-input-group input.ap-input{flex:1;padding-left:0;padding-right:0}ap-input-group .ap-input-group input.ap-input.valid:not([disabled]):not(:focus):not(:hover){border:none}ap-input-group .ap-input-group input.ap-input.invalid:not([disabled]):not(:focus):not(:hover),ap-input-group .ap-input-group input.ap-input.ng-invalid.ng-dirty.ng-touched:not([disabled]):not(:focus):not(:hover){border:none}ap-input-group .ap-input-group ap-symbol{
|
|
11
|
+
args: [{ selector: 'ap-input-group', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div\n class=\"ap-input-group\"\n [class.inverse]=\"symbolPosition === 'right'\">\n <ng-content select=\"ap-input-prefix\" />\n <ng-content select=\"ap-symbol\" />\n <ng-content />\n</div>\n", styles: ["ap-input-group.valid .ap-input-group{border-color:var(--comp-input-border-success-color)}ap-input-group.invalid .ap-input-group{border-color:var(--comp-input-border-error-color)}ap-input-group .ap-input-group{width:100%;display:inline-flex;align-items:center;height:var(--comp-input-height);border:1px solid var(--comp-input-border-default-color);box-sizing:border-box;border-radius:var(--comp-input-border-radius);overflow:hidden;background-color:var(--comp-input-fill-color);gap:var(--ref-spacing-xxs);padding:0 var(--ref-spacing-xs)}ap-input-group .ap-input-group:has(input[disabled]){background-color:var(--comp-input-fill-disabled-color);color:var(--comp-input-text-disabled-color)}ap-input-group .ap-input-group:has(input.valid){border-color:var(--comp-input-border-success-color)}ap-input-group .ap-input-group:has(input.invalid),ap-input-group .ap-input-group:has(input.ng-invalid.ng-dirty.ng-touched){border-color:var(--comp-input-border-error-color)}ap-input-group .ap-input-group:hover:not(.disabled):not(:has(input[disabled])){border-color:var(--comp-input-border-hover-color)}ap-input-group .ap-input-group:focus-within:not(.disabled):not(:has(input[disabled])){border-color:var(--comp-input-border-focused-color)}ap-input-group .ap-input-group:focus-visible:not(.disabled):not(:has(input[disabled])){outline:none}ap-input-group .ap-input-group:active:not(.disabled):not(:has(input[disabled])){border-color:var(--comp-input-border-focused-color)}ap-input-group .ap-input-group.disabled{background-color:var(--comp-input-fill-disabled-color);color:var(--comp-input-text-disabled-color)}ap-input-group .ap-input-group.inverse{flex-direction:row-reverse}ap-input-group .ap-input-group input.ap-input{flex:1;padding-left:0;padding-right:0}ap-input-group .ap-input-group input.ap-input.valid:not([disabled]):not(:focus):not(:hover){border:none}ap-input-group .ap-input-group input.ap-input.invalid:not([disabled]):not(:focus):not(:hover),ap-input-group .ap-input-group input.ap-input.ng-invalid.ng-dirty.ng-touched:not([disabled]):not(:focus):not(:hover){border:none}ap-input-group .ap-input-group ap-symbol{max-height:var(--comp-input-icon-size);max-width:var(--comp-input-icon-size);color:var(--comp-input-icon-color);pointer-events:none;box-sizing:content-box}ap-input-group .ap-input-group ap-symbol:hover{cursor:text}ap-input-group .ap-input-group .ap-input{border:none;outline:none}\n"] }]
|
|
12
12
|
}], propDecorators: { symbolPosition: [{
|
|
13
13
|
type: Input
|
|
14
14
|
}] } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agorapulse-ui-components-input-group.mjs","sources":["../../../libs/ui-components/input-group/src/input-group.component.ts","../../../libs/ui-components/input-group/src/input-group.component.html","../../../libs/ui-components/input-group/src/input-prefix/input-prefix.component.ts","../../../libs/ui-components/input-group/src/input-prefix/input-prefix.component.html","../../../libs/ui-components/input-group/src/agorapulse-ui-components-input-group.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'ap-input-group',\n templateUrl: './input-group.component.html',\n styleUrls: ['./input-group.component.scss'],\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class InputGroupComponent {\n @Input() symbolPosition: 'left' | 'right' = 'left';\n}\n","<div\n class=\"ap-input-group\"\n [class.inverse]=\"symbolPosition === 'right'\">\n <ng-content select=\"ap-input-prefix\" />\n <ng-content select=\"ap-symbol\" />\n <ng-content />\n</div>\n","import {ChangeDetectionStrategy, Component, ViewEncapsulation} from '@angular/core';\n\n@Component({\n selector: 'ap-input-prefix',\n templateUrl: './input-prefix.component.html',\n styleUrls: ['./input-prefix.component.scss'],\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class InputPrefixComponent {\n}\n","<ng-content/>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;MAUa,mBAAmB,CAAA;IACnB,cAAc,GAAqB,MAAM,CAAC;uGAD1C,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAnB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,mBAAmB,wHCVhC,+MAOA,EAAA,MAAA,EAAA,CAAA,
|
|
1
|
+
{"version":3,"file":"agorapulse-ui-components-input-group.mjs","sources":["../../../libs/ui-components/input-group/src/input-group.component.ts","../../../libs/ui-components/input-group/src/input-group.component.html","../../../libs/ui-components/input-group/src/input-prefix/input-prefix.component.ts","../../../libs/ui-components/input-group/src/input-prefix/input-prefix.component.html","../../../libs/ui-components/input-group/src/agorapulse-ui-components-input-group.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'ap-input-group',\n templateUrl: './input-group.component.html',\n styleUrls: ['./input-group.component.scss'],\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class InputGroupComponent {\n @Input() symbolPosition: 'left' | 'right' = 'left';\n}\n","<div\n class=\"ap-input-group\"\n [class.inverse]=\"symbolPosition === 'right'\">\n <ng-content select=\"ap-input-prefix\" />\n <ng-content select=\"ap-symbol\" />\n <ng-content />\n</div>\n","import {ChangeDetectionStrategy, Component, ViewEncapsulation} from '@angular/core';\n\n@Component({\n selector: 'ap-input-prefix',\n templateUrl: './input-prefix.component.html',\n styleUrls: ['./input-prefix.component.scss'],\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class InputPrefixComponent {\n}\n","<ng-content/>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;MAUa,mBAAmB,CAAA;IACnB,cAAc,GAAqB,MAAM,CAAC;uGAD1C,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAnB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,mBAAmB,wHCVhC,+MAOA,EAAA,MAAA,EAAA,CAAA,g2EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FDGa,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAR/B,SAAS;+BACI,gBAAgB,EAAA,UAAA,EAGd,IAAI,EACC,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAAA,+MAAA,EAAA,MAAA,EAAA,CAAA,g2EAAA,CAAA,EAAA,CAAA;8BAG5B,cAAc,EAAA,CAAA;sBAAtB,KAAK;;;MEDG,oBAAoB,CAAA;uGAApB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAApB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,oBAAoB,2ECVjC,iBACA,EAAA,MAAA,EAAA,CAAA,kWAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FDSa,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBARhC,SAAS;+BACI,iBAAiB,EAAA,UAAA,EAGf,IAAI,EACC,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,CAAA,kWAAA,CAAA,EAAA,CAAA;;;AERzC;;AAEG;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InputDirective } from '@agorapulse/ui-components/input';
|
|
2
2
|
import { InputGroupComponent } from '@agorapulse/ui-components/input-group';
|
|
3
|
-
import { SymbolRegistry,
|
|
3
|
+
import { SymbolRegistry, apSearch, apDeleteNoCircle, SymbolComponent } from '@agorapulse/ui-symbol';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
5
|
import { input, output, viewChild, signal, computed, inject, forwardRef, Component, ChangeDetectionStrategy, ViewEncapsulation } from '@angular/core';
|
|
6
6
|
import * as i1 from '@angular/forms';
|
|
@@ -23,7 +23,7 @@ class InputSearchComponent {
|
|
|
23
23
|
onChanged = () => { };
|
|
24
24
|
symbolRegistry = inject(SymbolRegistry);
|
|
25
25
|
constructor() {
|
|
26
|
-
this.symbolRegistry.registerSymbols([
|
|
26
|
+
this.symbolRegistry.registerSymbols([apSearch, apDeleteNoCircle]);
|
|
27
27
|
}
|
|
28
28
|
registerOnChange(fn) {
|
|
29
29
|
this.onChanged = fn;
|
|
@@ -63,7 +63,7 @@ class InputSearchComponent {
|
|
|
63
63
|
useExisting: forwardRef(() => InputSearchComponent),
|
|
64
64
|
multi: true,
|
|
65
65
|
},
|
|
66
|
-
], viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["input"], descendants: true, isSignal: true }], ngImport: i0, template: "<ap-input-group>\n <ap-symbol symbolId=\"search
|
|
66
|
+
], viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["input"], descendants: true, isSignal: true }], ngImport: i0, template: "<ap-input-group>\n <ap-symbol symbolId=\"search\" />\n <input\n #input\n apInput\n [id]=\"inputId()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [ngModel]=\"value()\"\n (blur)=\"onBlurHandle($event)\"\n (focus)=\"onFocusHandle($event)\"\n (keyup)=\"onKeyup($event)\"\n (ngModelChange)=\"onValueChange($event)\" />\n @if (clearable() && value()) {\n <div\n class=\"close\"\n tabindex=\"0\"\n (click)=\"onClear()\"\n (keyup)=\"onClear()\">\n <ap-symbol\n aria-label=\"close-snackbar\"\n symbolId=\"delete-no-circle\"\n size=\"xs\"\n />\n </div>\n }\n</ap-input-group>\n", styles: ["ap-input-search ap-input-group .ap-input-group .close{height:20px;width:20px;display:flex;justify-content:center;align-items:center;border-radius:50%}ap-input-search ap-input-group .ap-input-group .close ap-symbol{color:var(--ref-color-grey-100);align-self:center}ap-input-search ap-input-group .ap-input-group .close:hover{background:#3445631a;border-radius:50%;cursor:pointer}\n"], dependencies: [{ kind: "component", type: InputGroupComponent, selector: "ap-input-group", inputs: ["symbolPosition"] }, { kind: "directive", type: InputDirective, selector: "[apInput]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["color", "symbolId", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
67
67
|
}
|
|
68
68
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: InputSearchComponent, decorators: [{
|
|
69
69
|
type: Component,
|
|
@@ -73,7 +73,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImpor
|
|
|
73
73
|
useExisting: forwardRef(() => InputSearchComponent),
|
|
74
74
|
multi: true,
|
|
75
75
|
},
|
|
76
|
-
], template: "<ap-input-group>\n <ap-symbol symbolId=\"search
|
|
76
|
+
], template: "<ap-input-group>\n <ap-symbol symbolId=\"search\" />\n <input\n #input\n apInput\n [id]=\"inputId()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [ngModel]=\"value()\"\n (blur)=\"onBlurHandle($event)\"\n (focus)=\"onFocusHandle($event)\"\n (keyup)=\"onKeyup($event)\"\n (ngModelChange)=\"onValueChange($event)\" />\n @if (clearable() && value()) {\n <div\n class=\"close\"\n tabindex=\"0\"\n (click)=\"onClear()\"\n (keyup)=\"onClear()\">\n <ap-symbol\n aria-label=\"close-snackbar\"\n symbolId=\"delete-no-circle\"\n size=\"xs\"\n />\n </div>\n }\n</ap-input-group>\n", styles: ["ap-input-search ap-input-group .ap-input-group .close{height:20px;width:20px;display:flex;justify-content:center;align-items:center;border-radius:50%}ap-input-search ap-input-group .ap-input-group .close ap-symbol{color:var(--ref-color-grey-100);align-self:center}ap-input-search ap-input-group .ap-input-group .close:hover{background:#3445631a;border-radius:50%;cursor:pointer}\n"] }]
|
|
77
77
|
}], ctorParameters: () => [] });
|
|
78
78
|
|
|
79
79
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agorapulse-ui-components-input-search.mjs","sources":["../../../libs/ui-components/input-search/src/input-search.component.ts","../../../libs/ui-components/input-search/src/input-search.component.html","../../../libs/ui-components/input-search/src/agorapulse-ui-components-input-search.ts"],"sourcesContent":["import { InputDirective } from '@agorapulse/ui-components/input';\nimport { InputGroupComponent } from '@agorapulse/ui-components/input-group';\nimport { SymbolComponent, SymbolRegistry, apDeleteNoCircle,
|
|
1
|
+
{"version":3,"file":"agorapulse-ui-components-input-search.mjs","sources":["../../../libs/ui-components/input-search/src/input-search.component.ts","../../../libs/ui-components/input-search/src/input-search.component.html","../../../libs/ui-components/input-search/src/agorapulse-ui-components-input-search.ts"],"sourcesContent":["import { InputDirective } from '@agorapulse/ui-components/input';\nimport { InputGroupComponent } from '@agorapulse/ui-components/input-group';\nimport { SymbolComponent, SymbolRegistry, apDeleteNoCircle, apSearch } from '@agorapulse/ui-symbol';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n ViewEncapsulation,\n computed,\n forwardRef,\n inject,\n input,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { ControlValueAccessor, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nlet inputSearchId = 0;\n\n@Component({\n selector: 'ap-input-search',\n templateUrl: './input-search.component.html',\n styleUrls: ['./input-search.component.scss'],\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [InputGroupComponent, InputDirective, FormsModule, SymbolComponent],\n\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => InputSearchComponent),\n multi: true,\n },\n ],\n})\nexport class InputSearchComponent implements ControlValueAccessor {\n id = input<string>('');\n placeholder = input<string>('');\n clearable = input(true);\n\n focus = output<FocusEvent>();\n blur = output<FocusEvent>();\n keyup = output<KeyboardEvent>();\n\n inputElement = viewChild.required<ElementRef>('input');\n\n value = signal<string | null>('');\n defaultInputId = `ap-input-search-${inputSearchId++}`;\n\n inputId = computed(() => this.id() ?? this.defaultInputId);\n\n disabled = signal(false);\n\n onTouched: () => void = () => {};\n\n onChanged: (value: any) => void = () => {};\n\n private symbolRegistry = inject(SymbolRegistry);\n\n constructor() {\n this.symbolRegistry.registerSymbols([apSearch, apDeleteNoCircle]);\n }\n\n registerOnChange(fn: (value: string | null) => void): void {\n this.onChanged = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n onValueChange(value: string | null) {\n this.writeValue(value);\n this.onChanged(value);\n }\n\n focusInput(): void {\n this.inputElement().nativeElement.focus();\n }\n\n writeValue(value: string | null): void {\n this.value.set(value);\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled.set(isDisabled);\n }\n\n onClear(): void {\n this.onValueChange(null);\n }\n\n onFocusHandle($event: FocusEvent): void {\n this.focus.emit($event);\n }\n\n onBlurHandle($event: FocusEvent): void {\n this.blur.emit($event);\n }\n\n onKeyup($event: KeyboardEvent): void {\n this.keyup.emit($event);\n }\n}\n","<ap-input-group>\n <ap-symbol symbolId=\"search\" />\n <input\n #input\n apInput\n [id]=\"inputId()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [ngModel]=\"value()\"\n (blur)=\"onBlurHandle($event)\"\n (focus)=\"onFocusHandle($event)\"\n (keyup)=\"onKeyup($event)\"\n (ngModelChange)=\"onValueChange($event)\" />\n @if (clearable() && value()) {\n <div\n class=\"close\"\n tabindex=\"0\"\n (click)=\"onClear()\"\n (keyup)=\"onClear()\">\n <ap-symbol\n aria-label=\"close-snackbar\"\n symbolId=\"delete-no-circle\"\n size=\"xs\"\n />\n </div>\n }\n</ap-input-group>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;AAkBA,IAAI,aAAa,GAAG,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AA,EAAA,CAAA;kBAjBhC,SAAS;+BACI,iBAAiB,EAAA,UAAA,EAGf,IAAI,EACC,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,iBAAiB,CAAC,IAAI,WAC5B,CAAC,mBAAmB,EAAE,cAAc,EAAE,WAAW,EAAE,eAAe,CAAC,EAEjE,SAAA,EAAA;AACP,wBAAA;AACI,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,0BAA0B,CAAC;AACnD,4BAAA,KAAK,EAAE,IAAI;AACd,yBAAA;AACJ,qBAAA,EAAA,QAAA,EAAA,kyBAAA,EAAA,MAAA,EAAA,CAAA,8XAAA,CAAA,EAAA,CAAA;;;AEnCL;;AAEG;;;;"}
|
|
@@ -38,11 +38,11 @@ class LabelComponent {
|
|
|
38
38
|
this.remove.emit({ content: this.content, $event });
|
|
39
39
|
}
|
|
40
40
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: LabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
41
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.3", type: LabelComponent, isStandalone: true, selector: "ap-label", inputs: { content: "content", selectorWidth: "selectorWidth", removable: ["removable", "removable", booleanAttribute] }, outputs: { remove: "remove" }, ngImport: i0, template: "<div\n class=\"label\"\n [class.removable]=\"removable\"\n [apTooltip]=\"tooltipEnabled ? content : ''\">\n <span class=\"label-content\">{{ content }}</span>\n @if (removable) {\n <button\n type=\"button\"\n class=\"delete-button\"\n (click)=\"onClearLabel($event)\">\n <ap-symbol\n symbolId=\"remove-bold\"\n size=\"
|
|
41
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.3", type: LabelComponent, isStandalone: true, selector: "ap-label", inputs: { content: "content", selectorWidth: "selectorWidth", removable: ["removable", "removable", booleanAttribute] }, outputs: { remove: "remove" }, ngImport: i0, template: "<div\n class=\"label\"\n [class.removable]=\"removable\"\n [apTooltip]=\"tooltipEnabled ? content : ''\">\n <span class=\"label-content\">{{ content }}</span>\n @if (removable) {\n <button\n type=\"button\"\n class=\"delete-button\"\n (click)=\"onClearLabel($event)\">\n <ap-symbol\n symbolId=\"remove-bold\"\n size=\"xs\" />\n </button>\n }\n</div>\n", styles: ["ap-label{display:flex;--button-size: calc(var(--comp-label-height) - 4px);--max-width: 180px}ap-label .label{padding:0 var(--ref-spacing-xxs);color:var(--comp-label-text-color);align-self:center;background:var(--comp-label-background-color);border-radius:var(--comp-label-border-radius);text-wrap:none;display:flex;align-items:center;border:none;padding:0 var(--comp-label-padding-right) 0 var(--comp-label-padding-left);height:var(--comp-label-height);box-sizing:border-box;text-overflow:ellipsis}ap-label .label.removable{gap:var(--comp-label-closable-spacing);padding:0 var(--comp-label-closable-padding-right) 0 var(--ref-spacing-xxs)}ap-label .label .label-content{max-width:var(--max-width);color:var(--comp-label-text-color);display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-family:var(--comp-label-text-style-font-family);font-size:var(--comp-label-text-style-size);line-height:var(--comp-label-text-style-line-height);font-weight:var(--comp-label-text-style-font-weight)}ap-label .label .delete-button{display:flex;align-items:center;justify-content:center;border:none;background:transparent;align-self:center;cursor:pointer;max-width:var(--button-size);width:var(--button-size);height:var(--button-size);max-height:var(--button-size);border-radius:100%}ap-label .label .delete-button ap-symbol{color:var(--ref-color-grey-80)}ap-label .label .delete-button:hover{background-color:#3445631a}ap-label .label .delete-button:hover ap-symbol{color:var(--ref-color-grey-100)}ap-label .label .delete-button:focus{-webkit-box-shadow:0px 0px 0px 1px var(--ref-color-white),0px 0px 0px 3px var(--ref-color-electric-blue-100);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}ap-label .label .delete-button:active{background-color:#34456333}ap-label .label .delete-button:active ap-symbol{color:var(--ref-color-grey-100)}\n"], dependencies: [{ kind: "directive", type: TooltipDirective, selector: "[apTooltip]", inputs: ["apTooltipPosition", "apTooltip", "apTooltipShowDelay", "apTooltipHideDelay", "apTooltipDuration", "apTooltipDisabled", "apTooltipTemplateContext", "apTooltipVirtualScrollElement"] }, { kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["color", "symbolId", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
42
42
|
}
|
|
43
43
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: LabelComponent, decorators: [{
|
|
44
44
|
type: Component,
|
|
45
|
-
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'ap-label', standalone: true, imports: [NgClass, TooltipDirective, SymbolComponent], encapsulation: ViewEncapsulation.None, template: "<div\n class=\"label\"\n [class.removable]=\"removable\"\n [apTooltip]=\"tooltipEnabled ? content : ''\">\n <span class=\"label-content\">{{ content }}</span>\n @if (removable) {\n <button\n type=\"button\"\n class=\"delete-button\"\n (click)=\"onClearLabel($event)\">\n <ap-symbol\n symbolId=\"remove-bold\"\n size=\"
|
|
45
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'ap-label', standalone: true, imports: [NgClass, TooltipDirective, SymbolComponent], encapsulation: ViewEncapsulation.None, template: "<div\n class=\"label\"\n [class.removable]=\"removable\"\n [apTooltip]=\"tooltipEnabled ? content : ''\">\n <span class=\"label-content\">{{ content }}</span>\n @if (removable) {\n <button\n type=\"button\"\n class=\"delete-button\"\n (click)=\"onClearLabel($event)\">\n <ap-symbol\n symbolId=\"remove-bold\"\n size=\"xs\" />\n </button>\n }\n</div>\n", styles: ["ap-label{display:flex;--button-size: calc(var(--comp-label-height) - 4px);--max-width: 180px}ap-label .label{padding:0 var(--ref-spacing-xxs);color:var(--comp-label-text-color);align-self:center;background:var(--comp-label-background-color);border-radius:var(--comp-label-border-radius);text-wrap:none;display:flex;align-items:center;border:none;padding:0 var(--comp-label-padding-right) 0 var(--comp-label-padding-left);height:var(--comp-label-height);box-sizing:border-box;text-overflow:ellipsis}ap-label .label.removable{gap:var(--comp-label-closable-spacing);padding:0 var(--comp-label-closable-padding-right) 0 var(--ref-spacing-xxs)}ap-label .label .label-content{max-width:var(--max-width);color:var(--comp-label-text-color);display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-family:var(--comp-label-text-style-font-family);font-size:var(--comp-label-text-style-size);line-height:var(--comp-label-text-style-line-height);font-weight:var(--comp-label-text-style-font-weight)}ap-label .label .delete-button{display:flex;align-items:center;justify-content:center;border:none;background:transparent;align-self:center;cursor:pointer;max-width:var(--button-size);width:var(--button-size);height:var(--button-size);max-height:var(--button-size);border-radius:100%}ap-label .label .delete-button ap-symbol{color:var(--ref-color-grey-80)}ap-label .label .delete-button:hover{background-color:#3445631a}ap-label .label .delete-button:hover ap-symbol{color:var(--ref-color-grey-100)}ap-label .label .delete-button:focus{-webkit-box-shadow:0px 0px 0px 1px var(--ref-color-white),0px 0px 0px 3px var(--ref-color-electric-blue-100);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}ap-label .label .delete-button:active{background-color:#34456333}ap-label .label .delete-button:active ap-symbol{color:var(--ref-color-grey-100)}\n"] }]
|
|
46
46
|
}], ctorParameters: () => [], propDecorators: { content: [{
|
|
47
47
|
type: Input,
|
|
48
48
|
args: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agorapulse-ui-components-labels.mjs","sources":["../../../libs/ui-components/labels/src/label.component.ts","../../../libs/ui-components/labels/src/label.component.html","../../../libs/ui-components/labels/src/label-list.component.ts","../../../libs/ui-components/labels/src/label-list.component.html","../../../libs/ui-components/labels/src/agorapulse-ui-components-labels.ts"],"sourcesContent":["import { TooltipDirective } from '@agorapulse/ui-components/tooltip';\nimport { apRemoveBold, SymbolComponent, SymbolRegistry } from '@agorapulse/ui-symbol';\nimport { NgClass } from '@angular/common';\nimport {\n AfterViewInit,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n inject,\n Input,\n NgZone,\n OnDestroy,\n Output,\n ViewEncapsulation,\n} from '@angular/core';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'ap-label',\n standalone: true,\n templateUrl: './label.component.html',\n imports: [NgClass, TooltipDirective, SymbolComponent],\n styleUrls: ['./label.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class LabelComponent implements AfterViewInit, OnDestroy {\n private elementRef: ElementRef = inject(ElementRef);\n private symbolRegistry: SymbolRegistry = inject(SymbolRegistry);\n private zone: NgZone = inject(NgZone);\n\n @Input({\n required: true,\n })\n content!: string;\n @Input() selectorWidth: number = 0; //Width of the selector input, if applicable\n @Input({ transform: booleanAttribute }) removable: boolean = false;\n\n @Output() remove = new EventEmitter<{ content: string; $event: MouseEvent }>();\n\n private observer: ResizeObserver | undefined = undefined;\n tooltipEnabled: boolean = false;\n\n constructor() {\n this.symbolRegistry.registerSymbols([apRemoveBold]);\n }\n\n ngAfterViewInit(): void {\n this.observer = new ResizeObserver(entries => {\n this.zone.run(() => {\n const containerWidth =\n this.elementRef.nativeElement.clientWidth > 0 ? this.elementRef.nativeElement.clientWidth : this.selectorWidth;\n if (containerWidth > 0) {\n this.tooltipEnabled = entries[0].target.scrollWidth > containerWidth;\n }\n });\n });\n this.observer.observe(this.elementRef.nativeElement.getElementsByClassName('label-content')[0]);\n }\n\n ngOnDestroy() {\n this.observer?.unobserve(this.elementRef.nativeElement.children[0]);\n }\n\n onClearLabel($event: MouseEvent) {\n this.elementRef.nativeElement.remove();\n this.remove.emit({ content: this.content, $event });\n }\n}\n","<div\n class=\"label\"\n [class.removable]=\"removable\"\n [apTooltip]=\"tooltipEnabled ? content : ''\">\n <span class=\"label-content\">{{ content }}</span>\n @if (removable) {\n <button\n type=\"button\"\n class=\"delete-button\"\n (click)=\"onClearLabel($event)\">\n <ap-symbol\n symbolId=\"remove-bold\"\n size=\"pico\" />\n </button>\n }\n</div>\n","import { TextMeasurementService } from '@agorapulse/ui-components/text-measurement';\n\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n Output,\n SimpleChanges,\n} from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { LabelComponent } from './label.component';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'ap-label-list',\n templateUrl: './label-list.component.html',\n styleUrls: ['./label-list.component.scss'],\n standalone: true,\n imports: [LabelComponent],\n})\nexport class LabelListComponent implements AfterContentInit, OnChanges, OnDestroy {\n @Input() labels: string[] = [];\n @Input() removeLabelsEnabled: boolean = false;\n @Input() responsive: boolean = false;\n @Input() seeLessTranslation: string = 'See less';\n @Input() hiddenLabelsTranslation: string = 'labels';\n @Output() removeLabel = new EventEmitter<string>();\n\n badgeWidth: number = 0;\n expanded: boolean = false;\n howManyItemsLeft = 0;\n responsiveLabels: string[] = [];\n\n private observer: ResizeObserver;\n private width$ = new BehaviorSubject<number>(0);\n\n constructor(\n private changeDetectorRef: ChangeDetectorRef,\n private elementRef: ElementRef,\n private textMeasurementService: TextMeasurementService,\n private zone: NgZone\n ) {\n this.observer = new ResizeObserver(entries => {\n this.zone.run(() => {\n this.width$.next(entries[0].contentRect.width);\n });\n });\n }\n\n ngAfterContentInit(): void {\n if (this.responsive) {\n this.generateResponsiveLabels(this.elementRef.nativeElement.getElementsByClassName('labels-list')[0].offsetWidth);\n\n this.observer.observe(this.elementRef.nativeElement.getElementsByClassName('labels-list')[0]);\n this.width$.subscribe(width => {\n this.generateResponsiveLabels(width);\n });\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.labels.currentValue && this.responsive) {\n this.generateResponsiveLabels(this.elementRef.nativeElement.getElementsByClassName('labels-list')[0].offsetWidth);\n }\n }\n\n ngOnDestroy() {\n this.observer.unobserve(this.elementRef.nativeElement.getElementsByClassName('labels-list')[0]);\n }\n\n onExpand() {\n this.expanded = !this.expanded;\n }\n\n onRemoveLabel({ content }: { content: string }): void {\n this.removeLabel.emit(content);\n }\n\n onResize() {\n this.generateResponsiveLabels(this.elementRef.nativeElement.children[0].offsetWidth);\n }\n\n public trackByLabelContent(_: number, entry: string) {\n return entry;\n }\n\n private generateResponsiveLabels(width: number) {\n let seeMoreElementWidth = this.textMeasurementService.calculateTextWidth('+'.concat(this.labels.length.toString()), 14, 'Averta');\n seeMoreElementWidth += 1 + 8 + 8 + 1; // border-left + padding-left + padding-right + border-right\n let elementWidth = width - 16 - 16; // width - padding-left - padding-right\n elementWidth -= seeMoreElementWidth;\n let currentIndex = 0;\n for (let index = 0; index < this.labels.length; index++) {\n let textWidth = this.textMeasurementService.calculateTextWidth(this.labels[index], 14, 'Averta');\n textWidth += 1 + 8 + (this.removeLabelsEnabled ? 25 : 8) + 1 + 4; // border-left + padding-left + padding-right + border-right + label spacing\n elementWidth -= textWidth;\n if (elementWidth <= 0) {\n break;\n }\n currentIndex = index;\n }\n if (currentIndex + 1 === this.labels.length) {\n this.expanded = false;\n }\n this.howManyItemsLeft = this.labels.length - (currentIndex + 1);\n this.badgeWidth =\n this.howManyItemsLeft > 0 && currentIndex === 0\n ? this.textMeasurementService.calculateTextWidth('+' + this.howManyItemsLeft, 14, 'Averta') + 22\n : 0;\n this.responsiveLabels = this.labels.slice(0, currentIndex + 1);\n this.changeDetectorRef.markForCheck();\n }\n}\n","<div\n class=\"labels-list\"\n (window:resize)=\"onResize()\">\n @if (responsive) {\n @for (label of expanded ? labels : responsiveLabels; track label) {\n <ap-label\n [content]=\"label\"\n [style.max-width]=\"!expanded ? 'calc(100% - ' + badgeWidth + 'px)' : '100%'\"\n [removable]=\"removeLabelsEnabled\"\n (remove)=\"onRemoveLabel($event)\" />\n }\n @if (!expanded && responsiveLabels.length !== labels.length && howManyItemsLeft > 0) {\n <a\n class=\"standalone\"\n role=\"button\"\n (click)=\"onExpand()\">\n +{{ howManyItemsLeft }} {{ hiddenLabelsTranslation }}\n </a>\n }\n @if (expanded) {\n <a\n class=\"standalone\"\n role=\"button\"\n (click)=\"onExpand()\">\n {{ seeLessTranslation }}\n </a>\n }\n } @else {\n @for (label of labels; track trackByLabelContent($index, label)) {\n <ap-label\n [content]=\"label\"\n [removable]=\"removeLabelsEnabled\"\n (remove)=\"onRemoveLabel($event)\" />\n }\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;MA2Ba,cAAc,CAAA;AACf,IAAA,UAAU,GAAe,MAAM,CAAC,UAAU,CAAC,CAAC;AAC5C,IAAA,cAAc,GAAmB,MAAM,CAAC,cAAc,CAAC,CAAC;AACxD,IAAA,IAAI,GAAW,MAAM,CAAC,MAAM,CAAC,CAAC;AAKtC,IAAA,OAAO,CAAU;AACR,IAAA,aAAa,GAAW,CAAC,CAAC;IACK,SAAS,GAAY,KAAK,CAAC;AAEzD,IAAA,MAAM,GAAG,IAAI,YAAY,EAA2C,CAAC;IAEvE,QAAQ,GAA+B,SAAS,CAAC;IACzD,cAAc,GAAY,KAAK,CAAC;AAEhC,IAAA,WAAA,GAAA;QACI,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC;KACvD;IAED,eAAe,GAAA;QACX,IAAI,CAAC,QAAQ,GAAG,IAAI,cAAc,CAAC,OAAO,IAAG;AACzC,YAAA,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,MAAK;gBACf,MAAM,cAAc,GAChB,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,WAAW,GAAG,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,WAAW,GAAG,IAAI,CAAC,aAAa,CAAC;AACnH,gBAAA,IAAI,cAAc,GAAG,CAAC,EAAE;AACpB,oBAAA,IAAI,CAAC,cAAc,GAAG,O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,KAAK;gBACI,WAAW,EAAA,CAAA;sBAApB,MAAM;;;AEjCX;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"agorapulse-ui-components-labels.mjs","sources":["../../../libs/ui-components/labels/src/label.component.ts","../../../libs/ui-components/labels/src/label.component.html","../../../libs/ui-components/labels/src/label-list.component.ts","../../../libs/ui-components/labels/src/label-list.component.html","../../../libs/ui-components/labels/src/agorapulse-ui-components-labels.ts"],"sourcesContent":["import { TooltipDirective } from '@agorapulse/ui-components/tooltip';\nimport { apRemoveBold, SymbolComponent, SymbolRegistry } from '@agorapulse/ui-symbol';\nimport { NgClass } from '@angular/common';\nimport {\n AfterViewInit,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n inject,\n Input,\n NgZone,\n OnDestroy,\n Output,\n ViewEncapsulation,\n} from '@angular/core';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'ap-label',\n standalone: true,\n templateUrl: './label.component.html',\n imports: [NgClass, TooltipDirective, SymbolComponent],\n styleUrls: ['./label.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class LabelComponent implements AfterViewInit, OnDestroy {\n private elementRef: ElementRef = inject(ElementRef);\n private symbolRegistry: SymbolRegistry = inject(SymbolRegistry);\n private zone: NgZone = inject(NgZone);\n\n @Input({\n required: true,\n })\n content!: string;\n @Input() selectorWidth: number = 0; //Width of the selector input, if applicable\n @Input({ transform: booleanAttribute }) removable: boolean = false;\n\n @Output() remove = new EventEmitter<{ content: string; $event: MouseEvent }>();\n\n private observer: ResizeObserver | undefined = undefined;\n tooltipEnabled: boolean = false;\n\n constructor() {\n this.symbolRegistry.registerSymbols([apRemoveBold]);\n }\n\n ngAfterViewInit(): void {\n this.observer = new ResizeObserver(entries => {\n this.zone.run(() => {\n const containerWidth =\n this.elementRef.nativeElement.clientWidth > 0 ? this.elementRef.nativeElement.clientWidth : this.selectorWidth;\n if (containerWidth > 0) {\n this.tooltipEnabled = entries[0].target.scrollWidth > containerWidth;\n }\n });\n });\n this.observer.observe(this.elementRef.nativeElement.getElementsByClassName('label-content')[0]);\n }\n\n ngOnDestroy() {\n this.observer?.unobserve(this.elementRef.nativeElement.children[0]);\n }\n\n onClearLabel($event: MouseEvent) {\n this.elementRef.nativeElement.remove();\n this.remove.emit({ content: this.content, $event });\n }\n}\n","<div\n class=\"label\"\n [class.removable]=\"removable\"\n [apTooltip]=\"tooltipEnabled ? content : ''\">\n <span class=\"label-content\">{{ content }}</span>\n @if (removable) {\n <button\n type=\"button\"\n class=\"delete-button\"\n (click)=\"onClearLabel($event)\">\n <ap-symbol\n symbolId=\"remove-bold\"\n size=\"xs\" />\n </button>\n }\n</div>\n","import { TextMeasurementService } from '@agorapulse/ui-components/text-measurement';\n\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n Output,\n SimpleChanges,\n} from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { LabelComponent } from './label.component';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'ap-label-list',\n templateUrl: './label-list.component.html',\n styleUrls: ['./label-list.component.scss'],\n standalone: true,\n imports: [LabelComponent],\n})\nexport class LabelListComponent implements AfterContentInit, OnChanges, OnDestroy {\n @Input() labels: string[] = [];\n @Input() removeLabelsEnabled: boolean = false;\n @Input() responsive: boolean = false;\n @Input() seeLessTranslation: string = 'See less';\n @Input() hiddenLabelsTranslation: string = 'labels';\n @Output() removeLabel = new EventEmitter<string>();\n\n badgeWidth: number = 0;\n expanded: boolean = false;\n howManyItemsLeft = 0;\n responsiveLabels: string[] = [];\n\n private observer: ResizeObserver;\n private width$ = new BehaviorSubject<number>(0);\n\n constructor(\n private changeDetectorRef: ChangeDetectorRef,\n private elementRef: ElementRef,\n private textMeasurementService: TextMeasurementService,\n private zone: NgZone\n ) {\n this.observer = new ResizeObserver(entries => {\n this.zone.run(() => {\n this.width$.next(entries[0].contentRect.width);\n });\n });\n }\n\n ngAfterContentInit(): void {\n if (this.responsive) {\n this.generateResponsiveLabels(this.elementRef.nativeElement.getElementsByClassName('labels-list')[0].offsetWidth);\n\n this.observer.observe(this.elementRef.nativeElement.getElementsByClassName('labels-list')[0]);\n this.width$.subscribe(width => {\n this.generateResponsiveLabels(width);\n });\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.labels.currentValue && this.responsive) {\n this.generateResponsiveLabels(this.elementRef.nativeElement.getElementsByClassName('labels-list')[0].offsetWidth);\n }\n }\n\n ngOnDestroy() {\n this.observer.unobserve(this.elementRef.nativeElement.getElementsByClassName('labels-list')[0]);\n }\n\n onExpand() {\n this.expanded = !this.expanded;\n }\n\n onRemoveLabel({ content }: { content: string }): void {\n this.removeLabel.emit(content);\n }\n\n onResize() {\n this.generateResponsiveLabels(this.elementRef.nativeElement.children[0].offsetWidth);\n }\n\n public trackByLabelContent(_: number, entry: string) {\n return entry;\n }\n\n private generateResponsiveLabels(width: number) {\n let seeMoreElementWidth = this.textMeasurementService.calculateTextWidth('+'.concat(this.labels.length.toString()), 14, 'Averta');\n seeMoreElementWidth += 1 + 8 + 8 + 1; // border-left + padding-left + padding-right + border-right\n let elementWidth = width - 16 - 16; // width - padding-left - padding-right\n elementWidth -= seeMoreElementWidth;\n let currentIndex = 0;\n for (let index = 0; index < this.labels.length; index++) {\n let textWidth = this.textMeasurementService.calculateTextWidth(this.labels[index], 14, 'Averta');\n textWidth += 1 + 8 + (this.removeLabelsEnabled ? 25 : 8) + 1 + 4; // border-left + padding-left + padding-right + border-right + label spacing\n elementWidth -= textWidth;\n if (elementWidth <= 0) {\n break;\n }\n currentIndex = index;\n }\n if (currentIndex + 1 === this.labels.length) {\n this.expanded = false;\n }\n this.howManyItemsLeft = this.labels.length - (currentIndex + 1);\n this.badgeWidth =\n this.howManyItemsLeft > 0 && currentIndex === 0\n ? this.textMeasurementService.calculateTextWidth('+' + this.howManyItemsLeft, 14, 'Averta') + 22\n : 0;\n this.responsiveLabels = this.labels.slice(0, currentIndex + 1);\n this.changeDetectorRef.markForCheck();\n }\n}\n","<div\n class=\"labels-list\"\n (window:resize)=\"onResize()\">\n @if (responsive) {\n @for (label of expanded ? labels : responsiveLabels; track label) {\n <ap-label\n [content]=\"label\"\n [style.max-width]=\"!expanded ? 'calc(100% - ' + badgeWidth + 'px)' : '100%'\"\n [removable]=\"removeLabelsEnabled\"\n (remove)=\"onRemoveLabel($event)\" />\n }\n @if (!expanded && responsiveLabels.length !== labels.length && howManyItemsLeft > 0) {\n <a\n class=\"standalone\"\n role=\"button\"\n (click)=\"onExpand()\">\n +{{ howManyItemsLeft }} {{ hiddenLabelsTranslation }}\n </a>\n }\n @if (expanded) {\n <a\n class=\"standalone\"\n role=\"button\"\n (click)=\"onExpand()\">\n {{ seeLessTranslation }}\n </a>\n }\n } @else {\n @for (label of labels; track trackByLabelContent($index, label)) {\n <ap-label\n [content]=\"label\"\n [removable]=\"removeLabelsEnabled\"\n (remove)=\"onRemoveLabel($event)\" />\n }\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;MA2Ba,cAAc,CAAA;AACf,IAAA,UAAU,GAAe,MAAM,CAAC,UAAU,CAAC,CAAC;AAC5C,IAAA,cAAc,GAAmB,MAAM,CAAC,cAAc,CAAC,CAAC;AACxD,IAAA,IAAI,GAAW,MAAM,CAAC,MAAM,CAAC,CAAC;AAKtC,IAAA,OAAO,CAAU;AACR,IAAA,aAAa,GAAW,CAAC,CAAC;IACK,SAAS,GAAY,KAAK,CAAC;AAEzD,IAAA,MAAM,GAAG,IAAI,YAAY,EAA2C,CAAC;IAEvE,QAAQ,GAA+B,SAAS,CAAC;IACzD,cAAc,GAAY,KAAK,CAAC;AAEhC,IAAA,WAAA,GAAA;QACI,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC,YAAY,C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AA,CAAA;kBAR9B,SAAS;sCACW,uBAAuB,CAAC,MAAM,EACrC,QAAA,EAAA,eAAe,cAGb,IAAI,EAAA,OAAA,EACP,CAAC,cAAc,CAAC,EAAA,QAAA,EAAA,kwCAAA,EAAA,MAAA,EAAA,CAAA,o3LAAA,CAAA,EAAA,CAAA;yKAGhB,MAAM,EAAA,CAAA;sBAAd,KAAK;gBACG,mBAAmB,EAAA,CAAA;sBAA3B,KAAK;gBACG,UAAU,EAAA,CAAA;sBAAlB,KAAK;gBACG,kBAAkB,EAAA,CAAA;sBAA1B,KAAK;gBACG,uBAAuB,EAAA,CAAA;sBAA/B,KAAK;gBACI,WAAW,EAAA,CAAA;sBAApB,MAAM;;;AEjCX;;AAEG;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SymbolRegistry,
|
|
1
|
+
import { SymbolRegistry, apErrorFill, apRoundedCheckFill, apClose, apSearch, SymbolComponent } from '@agorapulse/ui-symbol';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { forwardRef, inject, ElementRef, EventEmitter, signal, booleanAttribute, Component, ChangeDetectionStrategy, ViewEncapsulation, ContentChildren, ViewChild, Input, Output } from '@angular/core';
|
|
4
4
|
import * as i1 from '@angular/forms';
|
|
@@ -9,7 +9,7 @@ const AP_INPUT_CONTROL_VALUE_ACCESSOR = {
|
|
|
9
9
|
useExisting: forwardRef(() => InputComponent),
|
|
10
10
|
multi: true,
|
|
11
11
|
};
|
|
12
|
-
const SEARCH_SYMBOL_ID = 'search
|
|
12
|
+
const SEARCH_SYMBOL_ID = 'search';
|
|
13
13
|
/**
|
|
14
14
|
* @deprecated use native input with directive apInput, ap-input-group and ap-form-field instead
|
|
15
15
|
*/
|
|
@@ -57,7 +57,7 @@ class InputComponent {
|
|
|
57
57
|
}
|
|
58
58
|
this.hostDataTest.set(this.elementRef.nativeElement.getAttribute('data-test'));
|
|
59
59
|
this.elementRef.nativeElement.removeAttribute('data-test');
|
|
60
|
-
this.symbolRegistry.registerSymbols([
|
|
60
|
+
this.symbolRegistry.registerSymbols([apErrorFill, apRoundedCheckFill, apClose, apSearch]);
|
|
61
61
|
}
|
|
62
62
|
// Sometimes attributes like the id, or the data-test are dynamic and can change between the constructor and the initialization.
|
|
63
63
|
// In order to have the last attributes value we check if it changes, and if it does, we run a mark for check to update the view.
|
|
@@ -119,7 +119,7 @@ class InputComponent {
|
|
|
119
119
|
useExisting: InputComponent,
|
|
120
120
|
multi: true,
|
|
121
121
|
},
|
|
122
|
-
], queries: [{ propertyName: "symbols", predicate: SymbolComponent }], viewQueries: [{ propertyName: "symbolWrapper", first: true, predicate: ["symbol"], descendants: true }, { propertyName: "inputElement", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "@if (label) {\n <label [for]=\"inputId\">\n <span>\n {{ label }}\n </span>\n @if (description) {\n <span class=\"description\">\n {{ description }}\n </span>\n }\n </label>\n}\n\n<div\n tabindex=\"0\"\n class=\"input-wrapper\"\n [class.inverse]=\"symbolPosition === 'left'\"\n [class.with-icon]=\"symbolId\"\n [class.with-prefix]=\"prefix\"\n [class.with-suffix]=\"suffix\"\n [class.with-error]=\"errorMessage\"\n [class.with-success]=\"successMessage\"\n [class.disabled]=\"disabled\"\n [attr.aria-label]=\"ariaLabel || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy || null\"\n [attr.aria-describedby]=\"ariaDescribedBy || null\"\n [attr.aria-disabled]=\"disabled?.toString()\"\n (click)=\"focusInput()\"\n (keydown.enter)=\"focusInput()\">\n @if (prefix) {\n <div class=\"prefix\">\n <span>\n {{ prefix }}\n </span>\n <span class=\"divider\"></span>\n </div>\n }\n <div class=\"content\">\n <input\n #input\n [type]=\"inputType\"\n [disabled]=\"disabled\"\n [placeholder]=\"placeholder\"\n [id]=\"inputId ?? ''\"\n [attr.data-test]=\"hostDataTest() ? hostDataTest() : name\"\n [(ngModel)]=\"value\"\n (blur)=\"onBlurHandle($event)\"\n (focus)=\"onFocusHandle($event)\"\n (keyup)=\"onKeyup($event)\"\n (ngModelChange)=\"onValueChange()\" />\n @if (clearable) {\n <button\n type=\"button\"\n class=\"clear-button\"\n (click)=\"onClear()\">\n <ap-symbol symbolId=\"close\" />\n </button>\n }\n </div>\n @if (suffix) {\n <div class=\"suffix\">\n <span class=\"divider\"></span>\n <span>\n {{ suffix }}\n </span>\n </div>\n }\n @if (symbolId) {\n <ap-symbol\n size=\"micro\"\n [symbolId]=\"symbolId\" />\n }\n</div>\n\n@if (errorMessage) {\n <div class=\"form-message error\">\n <ap-symbol\n symbolId=\"alert-circle\"\n size=\"micro\" />\n <span>\n {{ errorMessage }}\n </span>\n </div>\n}\n\n@if (successMessage) {\n <div class=\"form-message success\">\n <ap-symbol\n symbolId=\"check-circle\"\n size=\"micro\" />\n <span>\n {{ successMessage }}\n </span>\n </div>\n}\n", styles: ["ap-input{display:flex;flex-direction:column;gap:var(--comp-input-spacing-horizontal);--border-width: 1px}ap-input.full-width{width:100%}ap-input.full-width .input-wrapper{min-width:100%}ap-input label{display:flex;flex-direction:column;gap:var(--comp-forms-label-spacing-vertical);font-size:var(--comp-forms-label-size);font-weight:var(--comp-forms-label-font-weight);line-height:var(--comp-forms-label-line-height);font-family:var(--comp-forms-label-font-family);color:var(--comp-forms-label-text-color)}ap-input label .description{font-size:var(--comp-forms-label-description-text-size);font-weight:var(--comp-forms-label-description-text-font-weight);line-height:var(--comp-forms-label-description-text-line-height);font-family:var(--comp-forms-label-description-text-font-family);color:var(--comp-forms-label-description-text-color)}ap-input .input-wrapper{display:flex;align-items:center;position:relative;min-width:var(--comp-input-width-default);height:var(--comp-input-height);border:var(--border-width) solid var(--comp-input-border-default-color);box-sizing:border-box;border-radius:var(--comp-input-border-radius);overflow:hidden;background-color:var(--comp-input-fill-color)}ap-input .input-wrapper:hover:not(.disabled){border-color:var(--comp-input-border-hover-color)}ap-input .input-wrapper:focus-within:not(.disabled){border-color:var(--comp-input-border-focused-color)}ap-input .input-wrapper:focus-visible:not(.disabled){outline:none}ap-input .input-wrapper:active:not(.disabled){border-color:var(--comp-input-border-focused-color)}ap-input .input-wrapper.disabled{background-color:var(--comp-input-fill-disabled-color);color:var(--comp-input-text-disabled-color)}ap-input .input-wrapper .content{display:flex;gap:var(--comp-input-spacing-horizontal);flex:1;align-items:center}ap-input .input-wrapper .content input{border:none;outline:none;box-sizing:border-box;min-height:34px;max-height:34px;padding:0 var(--comp-input-padding-horizontal);flex:1;font-size:var(--comp-input-text-size);font-weight:var(--comp-input-text-font-weight);line-height:var(--comp-input-text-line-height);font-family:var(--comp-input-text-font-family);color:var(--comp-input-text-default-color);min-width:0}ap-input .input-wrapper .content input::placeholder{color:var(--comp-input-text-placeholder-color)}ap-input .input-wrapper .content input:disabled{cursor:not-allowed;pointer-events:none;background:var(--comp-input-fill-disabled-color);color:var(--comp-input-text-disabled-color)}ap-input .input-wrapper .content input:disabled:placeholder{color:var(--comp-input-text-placeholder-color)}ap-input .input-wrapper .content input[type=search]::-webkit-search-decoration,ap-input .input-wrapper .content input[type=search]::-webkit-search-cancel-button,ap-input .input-wrapper .content input[type=search]::-webkit-search-results-button,ap-input .input-wrapper .content input[type=search]::-webkit-search-results-decoration{display:none}ap-input .input-wrapper .content .counter{font-size:var(--comp-input-text-counter-size);font-weight:var(--comp-input-text-counter-font-weight);line-height:var(--comp-input-text-counter-line-height);font-family:var(--comp-input-text-counter-font-family);color:var(--comp-input-text-counter-color);padding-right:var(--comp-input-spacing-horizontal)}ap-input .input-wrapper .content .clear-button{display:flex;align-items:center;justify-content:center;border:none;margin:0;padding:0 var(--comp-input-spacing-horizontal) 0 0;background-color:transparent}ap-input .input-wrapper .content .clear-button:hover{cursor:pointer}ap-input .input-wrapper .content .clear-button ap-symbol{padding:0}ap-input .input-wrapper .prefix,ap-input .input-wrapper .suffix{height:100%;display:flex;justify-content:center;align-items:center;font-size:var(--sys-text-style-body-size);font-weight:var(--sys-text-style-body-weight);line-height:var(--sys-text-style-body-line-height);font-family:var(--ref-font-family);color:var(--ref-color-grey-100)}ap-input .input-wrapper .prefix .divider,ap-input .input-wrapper .suffix .divider{height:18px;width:var(--border-width);background:var(--ref-color-grey-10)}ap-input .input-wrapper ap-symbol{height:var(--comp-input-icon-size);width:var(--comp-input-icon-size);min-height:var(--comp-input-icon-size);min-width:var(--comp-input-icon-size);max-height:var(--comp-input-icon-size);max-width:var(--comp-input-icon-size);color:var(--comp-input-icon-color);padding-right:var(--comp-input-padding-horizontal);pointer-events:none;box-sizing:content-box}ap-input .input-wrapper ap-symbol:hover{cursor:text}ap-input .input-wrapper.inverse{flex-direction:row-reverse}ap-input .input-wrapper.inverse.with-icon input{padding-left:0}ap-input .input-wrapper.inverse.with-icon ap-symbol{padding-right:var(--comp-input-spacing-horizontal);padding-left:var(--comp-input-padding-horizontal)}ap-input .input-wrapper.with-icon input{padding-right:var(--ref-spacing-xxxs)}ap-input .input-wrapper.with-prefix input{padding-left:var(--ref-spacing-xxs)}ap-input .input-wrapper.with-prefix .prefix{padding-left:var(--comp-input-padding-horizontal);gap:var(--ref-spacing-xxs)}ap-input .input-wrapper.with-suffix input{padding-right:var(--ref-spacing-xxs)}ap-input .input-wrapper.with-suffix .suffix{padding-right:var(--comp-input-padding-horizontal);gap:var(--ref-spacing-xxs)}ap-input .input-wrapper.with-counter input{padding-right:0}ap-input .input-wrapper.with-error{border-color:var(--comp-input-border-error-color)}ap-input .input-wrapper.with-success{border-color:var(--comp-input-border-success-color)}.form-message{font-size:var(--comp-forms-status-text-size);font-weight:var(--comp-forms-status-text-font-weight);line-height:var(--comp-forms-status-text-line-height);font-family:var(--comp-forms-status-text-font-family);margin:0;display:flex;gap:var(--ref-spacing-xxxs)}.form-message.error{color:var(--comp-forms-status-text-error-color)}.form-message.error ap-symbol{color:var(--comp-forms-status-icon-error-color)}.form-message.success{color:var(--comp-forms-status-text-success-color)}.form-message.success ap-symbol{color:var(--comp-forms-status-icon-success-color)}form.ng-submitted ap-input.ng-valid .input-wrapper{border-color:var(--comp-input-border-success-color)}form.ng-submitted ap-input.ng-invalid .input-wrapper{border-color:var(--comp-input-border-error-color)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["color", "symbolId", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
122
|
+
], queries: [{ propertyName: "symbols", predicate: SymbolComponent }], viewQueries: [{ propertyName: "symbolWrapper", first: true, predicate: ["symbol"], descendants: true }, { propertyName: "inputElement", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "@if (label) {\n <label [for]=\"inputId\">\n <span>\n {{ label }}\n </span>\n @if (description) {\n <span class=\"description\">\n {{ description }}\n </span>\n }\n </label>\n}\n\n<div\n tabindex=\"0\"\n class=\"input-wrapper\"\n [class.inverse]=\"symbolPosition === 'left'\"\n [class.with-icon]=\"symbolId\"\n [class.with-prefix]=\"prefix\"\n [class.with-suffix]=\"suffix\"\n [class.with-error]=\"errorMessage\"\n [class.with-success]=\"successMessage\"\n [class.disabled]=\"disabled\"\n [attr.aria-label]=\"ariaLabel || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy || null\"\n [attr.aria-describedby]=\"ariaDescribedBy || null\"\n [attr.aria-disabled]=\"disabled?.toString()\"\n (click)=\"focusInput()\"\n (keydown.enter)=\"focusInput()\">\n @if (prefix) {\n <div class=\"prefix\">\n <span>\n {{ prefix }}\n </span>\n <span class=\"divider\"></span>\n </div>\n }\n <div class=\"content\">\n <input\n #input\n [type]=\"inputType\"\n [disabled]=\"disabled\"\n [placeholder]=\"placeholder\"\n [id]=\"inputId ?? ''\"\n [attr.data-test]=\"hostDataTest() ? hostDataTest() : name\"\n [(ngModel)]=\"value\"\n (blur)=\"onBlurHandle($event)\"\n (focus)=\"onFocusHandle($event)\"\n (keyup)=\"onKeyup($event)\"\n (ngModelChange)=\"onValueChange()\" />\n @if (clearable) {\n <button\n type=\"button\"\n class=\"clear-button\"\n (click)=\"onClear()\">\n <ap-symbol symbolId=\"close\" />\n </button>\n }\n </div>\n @if (suffix) {\n <div class=\"suffix\">\n <span class=\"divider\"></span>\n <span>\n {{ suffix }}\n </span>\n </div>\n }\n @if (symbolId) {\n <ap-symbol\n size=\"sm\"\n [symbolId]=\"symbolId\" />\n }\n</div>\n\n@if (errorMessage) {\n <div class=\"form-message error\">\n <ap-symbol\n symbolId=\"error_fill\"\n size=\"sm\" />\n <span>\n {{ errorMessage }}\n </span>\n </div>\n}\n\n@if (successMessage) {\n <div class=\"form-message success\">\n <ap-symbol\n symbolId=\"rounded-check_fill\"\n size=\"sm\" />\n <span>\n {{ successMessage }}\n </span>\n </div>\n}\n", styles: ["ap-input{display:flex;flex-direction:column;gap:var(--comp-input-spacing-horizontal);--border-width: 1px}ap-input.full-width{width:100%}ap-input.full-width .input-wrapper{min-width:100%}ap-input label{display:flex;flex-direction:column;gap:var(--comp-forms-label-spacing-vertical);font-size:var(--comp-forms-label-size);font-weight:var(--comp-forms-label-font-weight);line-height:var(--comp-forms-label-line-height);font-family:var(--comp-forms-label-font-family);color:var(--comp-forms-label-text-color)}ap-input label .description{font-size:var(--comp-forms-label-description-text-size);font-weight:var(--comp-forms-label-description-text-font-weight);line-height:var(--comp-forms-label-description-text-line-height);font-family:var(--comp-forms-label-description-text-font-family);color:var(--comp-forms-label-description-text-color)}ap-input .input-wrapper{display:flex;align-items:center;position:relative;min-width:var(--comp-input-width-default);height:var(--comp-input-height);border:var(--border-width) solid var(--comp-input-border-default-color);box-sizing:border-box;border-radius:var(--comp-input-border-radius);overflow:hidden;background-color:var(--comp-input-fill-color)}ap-input .input-wrapper:hover:not(.disabled){border-color:var(--comp-input-border-hover-color)}ap-input .input-wrapper:focus-within:not(.disabled){border-color:var(--comp-input-border-focused-color)}ap-input .input-wrapper:focus-visible:not(.disabled){outline:none}ap-input .input-wrapper:active:not(.disabled){border-color:var(--comp-input-border-focused-color)}ap-input .input-wrapper.disabled{background-color:var(--comp-input-fill-disabled-color);color:var(--comp-input-text-disabled-color)}ap-input .input-wrapper .content{display:flex;gap:var(--comp-input-spacing-horizontal);flex:1;align-items:center}ap-input .input-wrapper .content input{border:none;outline:none;box-sizing:border-box;min-height:34px;max-height:34px;padding:0 var(--comp-input-padding-horizontal);flex:1;font-size:var(--comp-input-text-size);font-weight:var(--comp-input-text-font-weight);line-height:var(--comp-input-text-line-height);font-family:var(--comp-input-text-font-family);color:var(--comp-input-text-default-color);min-width:0}ap-input .input-wrapper .content input::placeholder{color:var(--comp-input-text-placeholder-color)}ap-input .input-wrapper .content input:disabled{cursor:not-allowed;pointer-events:none;background:var(--comp-input-fill-disabled-color);color:var(--comp-input-text-disabled-color)}ap-input .input-wrapper .content input:disabled:placeholder{color:var(--comp-input-text-placeholder-color)}ap-input .input-wrapper .content input[type=search]::-webkit-search-decoration,ap-input .input-wrapper .content input[type=search]::-webkit-search-cancel-button,ap-input .input-wrapper .content input[type=search]::-webkit-search-results-button,ap-input .input-wrapper .content input[type=search]::-webkit-search-results-decoration{display:none}ap-input .input-wrapper .content .counter{font-size:var(--comp-input-text-counter-size);font-weight:var(--comp-input-text-counter-font-weight);line-height:var(--comp-input-text-counter-line-height);font-family:var(--comp-input-text-counter-font-family);color:var(--comp-input-text-counter-color);padding-right:var(--comp-input-spacing-horizontal)}ap-input .input-wrapper .content .clear-button{display:flex;align-items:center;justify-content:center;border:none;margin:0;padding:0 var(--comp-input-spacing-horizontal) 0 0;background-color:transparent}ap-input .input-wrapper .content .clear-button:hover{cursor:pointer}ap-input .input-wrapper .content .clear-button ap-symbol{padding:0}ap-input .input-wrapper .prefix,ap-input .input-wrapper .suffix{height:100%;display:flex;justify-content:center;align-items:center;font-size:var(--sys-text-style-body-size);font-weight:var(--sys-text-style-body-weight);line-height:var(--sys-text-style-body-line-height);font-family:var(--ref-font-family);color:var(--ref-color-grey-100)}ap-input .input-wrapper .prefix .divider,ap-input .input-wrapper .suffix .divider{height:18px;width:var(--border-width);background:var(--ref-color-grey-10)}ap-input .input-wrapper ap-symbol{height:var(--comp-input-icon-size);width:var(--comp-input-icon-size);min-height:var(--comp-input-icon-size);min-width:var(--comp-input-icon-size);max-height:var(--comp-input-icon-size);max-width:var(--comp-input-icon-size);color:var(--comp-input-icon-color);padding-right:var(--comp-input-padding-horizontal);pointer-events:none;box-sizing:content-box}ap-input .input-wrapper ap-symbol:hover{cursor:text}ap-input .input-wrapper.inverse{flex-direction:row-reverse}ap-input .input-wrapper.inverse.with-icon input{padding-left:0}ap-input .input-wrapper.inverse.with-icon ap-symbol{padding-right:var(--comp-input-spacing-horizontal);padding-left:var(--comp-input-padding-horizontal)}ap-input .input-wrapper.with-icon input{padding-right:var(--ref-spacing-xxxs)}ap-input .input-wrapper.with-prefix input{padding-left:var(--ref-spacing-xxs)}ap-input .input-wrapper.with-prefix .prefix{padding-left:var(--comp-input-padding-horizontal);gap:var(--ref-spacing-xxs)}ap-input .input-wrapper.with-suffix input{padding-right:var(--ref-spacing-xxs)}ap-input .input-wrapper.with-suffix .suffix{padding-right:var(--comp-input-padding-horizontal);gap:var(--ref-spacing-xxs)}ap-input .input-wrapper.with-counter input{padding-right:0}ap-input .input-wrapper.with-error{border-color:var(--comp-input-border-error-color)}ap-input .input-wrapper.with-success{border-color:var(--comp-input-border-success-color)}.form-message{font-size:var(--comp-forms-status-text-size);font-weight:var(--comp-forms-status-text-font-weight);line-height:var(--comp-forms-status-text-line-height);font-family:var(--comp-forms-status-text-font-family);margin:0;display:flex;gap:var(--ref-spacing-xxxs)}.form-message.error{color:var(--comp-forms-status-text-error-color)}.form-message.error ap-symbol{color:var(--comp-forms-status-icon-error-color)}.form-message.success{color:var(--comp-forms-status-text-success-color)}.form-message.success ap-symbol{color:var(--comp-forms-status-icon-success-color)}form.ng-submitted ap-input.ng-valid .input-wrapper{border-color:var(--comp-input-border-success-color)}form.ng-submitted ap-input.ng-invalid .input-wrapper{border-color:var(--comp-input-border-error-color)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["color", "symbolId", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
123
123
|
}
|
|
124
124
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: InputComponent, decorators: [{
|
|
125
125
|
type: Component,
|
|
@@ -130,7 +130,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImpor
|
|
|
130
130
|
useExisting: InputComponent,
|
|
131
131
|
multi: true,
|
|
132
132
|
},
|
|
133
|
-
], encapsulation: ViewEncapsulation.None, template: "@if (label) {\n <label [for]=\"inputId\">\n <span>\n {{ label }}\n </span>\n @if (description) {\n <span class=\"description\">\n {{ description }}\n </span>\n }\n </label>\n}\n\n<div\n tabindex=\"0\"\n class=\"input-wrapper\"\n [class.inverse]=\"symbolPosition === 'left'\"\n [class.with-icon]=\"symbolId\"\n [class.with-prefix]=\"prefix\"\n [class.with-suffix]=\"suffix\"\n [class.with-error]=\"errorMessage\"\n [class.with-success]=\"successMessage\"\n [class.disabled]=\"disabled\"\n [attr.aria-label]=\"ariaLabel || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy || null\"\n [attr.aria-describedby]=\"ariaDescribedBy || null\"\n [attr.aria-disabled]=\"disabled?.toString()\"\n (click)=\"focusInput()\"\n (keydown.enter)=\"focusInput()\">\n @if (prefix) {\n <div class=\"prefix\">\n <span>\n {{ prefix }}\n </span>\n <span class=\"divider\"></span>\n </div>\n }\n <div class=\"content\">\n <input\n #input\n [type]=\"inputType\"\n [disabled]=\"disabled\"\n [placeholder]=\"placeholder\"\n [id]=\"inputId ?? ''\"\n [attr.data-test]=\"hostDataTest() ? hostDataTest() : name\"\n [(ngModel)]=\"value\"\n (blur)=\"onBlurHandle($event)\"\n (focus)=\"onFocusHandle($event)\"\n (keyup)=\"onKeyup($event)\"\n (ngModelChange)=\"onValueChange()\" />\n @if (clearable) {\n <button\n type=\"button\"\n class=\"clear-button\"\n (click)=\"onClear()\">\n <ap-symbol symbolId=\"close\" />\n </button>\n }\n </div>\n @if (suffix) {\n <div class=\"suffix\">\n <span class=\"divider\"></span>\n <span>\n {{ suffix }}\n </span>\n </div>\n }\n @if (symbolId) {\n <ap-symbol\n size=\"
|
|
133
|
+
], encapsulation: ViewEncapsulation.None, template: "@if (label) {\n <label [for]=\"inputId\">\n <span>\n {{ label }}\n </span>\n @if (description) {\n <span class=\"description\">\n {{ description }}\n </span>\n }\n </label>\n}\n\n<div\n tabindex=\"0\"\n class=\"input-wrapper\"\n [class.inverse]=\"symbolPosition === 'left'\"\n [class.with-icon]=\"symbolId\"\n [class.with-prefix]=\"prefix\"\n [class.with-suffix]=\"suffix\"\n [class.with-error]=\"errorMessage\"\n [class.with-success]=\"successMessage\"\n [class.disabled]=\"disabled\"\n [attr.aria-label]=\"ariaLabel || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy || null\"\n [attr.aria-describedby]=\"ariaDescribedBy || null\"\n [attr.aria-disabled]=\"disabled?.toString()\"\n (click)=\"focusInput()\"\n (keydown.enter)=\"focusInput()\">\n @if (prefix) {\n <div class=\"prefix\">\n <span>\n {{ prefix }}\n </span>\n <span class=\"divider\"></span>\n </div>\n }\n <div class=\"content\">\n <input\n #input\n [type]=\"inputType\"\n [disabled]=\"disabled\"\n [placeholder]=\"placeholder\"\n [id]=\"inputId ?? ''\"\n [attr.data-test]=\"hostDataTest() ? hostDataTest() : name\"\n [(ngModel)]=\"value\"\n (blur)=\"onBlurHandle($event)\"\n (focus)=\"onFocusHandle($event)\"\n (keyup)=\"onKeyup($event)\"\n (ngModelChange)=\"onValueChange()\" />\n @if (clearable) {\n <button\n type=\"button\"\n class=\"clear-button\"\n (click)=\"onClear()\">\n <ap-symbol symbolId=\"close\" />\n </button>\n }\n </div>\n @if (suffix) {\n <div class=\"suffix\">\n <span class=\"divider\"></span>\n <span>\n {{ suffix }}\n </span>\n </div>\n }\n @if (symbolId) {\n <ap-symbol\n size=\"sm\"\n [symbolId]=\"symbolId\" />\n }\n</div>\n\n@if (errorMessage) {\n <div class=\"form-message error\">\n <ap-symbol\n symbolId=\"error_fill\"\n size=\"sm\" />\n <span>\n {{ errorMessage }}\n </span>\n </div>\n}\n\n@if (successMessage) {\n <div class=\"form-message success\">\n <ap-symbol\n symbolId=\"rounded-check_fill\"\n size=\"sm\" />\n <span>\n {{ successMessage }}\n </span>\n </div>\n}\n", styles: ["ap-input{display:flex;flex-direction:column;gap:var(--comp-input-spacing-horizontal);--border-width: 1px}ap-input.full-width{width:100%}ap-input.full-width .input-wrapper{min-width:100%}ap-input label{display:flex;flex-direction:column;gap:var(--comp-forms-label-spacing-vertical);font-size:var(--comp-forms-label-size);font-weight:var(--comp-forms-label-font-weight);line-height:var(--comp-forms-label-line-height);font-family:var(--comp-forms-label-font-family);color:var(--comp-forms-label-text-color)}ap-input label .description{font-size:var(--comp-forms-label-description-text-size);font-weight:var(--comp-forms-label-description-text-font-weight);line-height:var(--comp-forms-label-description-text-line-height);font-family:var(--comp-forms-label-description-text-font-family);color:var(--comp-forms-label-description-text-color)}ap-input .input-wrapper{display:flex;align-items:center;position:relative;min-width:var(--comp-input-width-default);height:var(--comp-input-height);border:var(--border-width) solid var(--comp-input-border-default-color);box-sizing:border-box;border-radius:var(--comp-input-border-radius);overflow:hidden;background-color:var(--comp-input-fill-color)}ap-input .input-wrapper:hover:not(.disabled){border-color:var(--comp-input-border-hover-color)}ap-input .input-wrapper:focus-within:not(.disabled){border-color:var(--comp-input-border-focused-color)}ap-input .input-wrapper:focus-visible:not(.disabled){outline:none}ap-input .input-wrapper:active:not(.disabled){border-color:var(--comp-input-border-focused-color)}ap-input .input-wrapper.disabled{background-color:var(--comp-input-fill-disabled-color);color:var(--comp-input-text-disabled-color)}ap-input .input-wrapper .content{display:flex;gap:var(--comp-input-spacing-horizontal);flex:1;align-items:center}ap-input .input-wrapper .content input{border:none;outline:none;box-sizing:border-box;min-height:34px;max-height:34px;padding:0 var(--comp-input-padding-horizontal);flex:1;font-size:var(--comp-input-text-size);font-weight:var(--comp-input-text-font-weight);line-height:var(--comp-input-text-line-height);font-family:var(--comp-input-text-font-family);color:var(--comp-input-text-default-color);min-width:0}ap-input .input-wrapper .content input::placeholder{color:var(--comp-input-text-placeholder-color)}ap-input .input-wrapper .content input:disabled{cursor:not-allowed;pointer-events:none;background:var(--comp-input-fill-disabled-color);color:var(--comp-input-text-disabled-color)}ap-input .input-wrapper .content input:disabled:placeholder{color:var(--comp-input-text-placeholder-color)}ap-input .input-wrapper .content input[type=search]::-webkit-search-decoration,ap-input .input-wrapper .content input[type=search]::-webkit-search-cancel-button,ap-input .input-wrapper .content input[type=search]::-webkit-search-results-button,ap-input .input-wrapper .content input[type=search]::-webkit-search-results-decoration{display:none}ap-input .input-wrapper .content .counter{font-size:var(--comp-input-text-counter-size);font-weight:var(--comp-input-text-counter-font-weight);line-height:var(--comp-input-text-counter-line-height);font-family:var(--comp-input-text-counter-font-family);color:var(--comp-input-text-counter-color);padding-right:var(--comp-input-spacing-horizontal)}ap-input .input-wrapper .content .clear-button{display:flex;align-items:center;justify-content:center;border:none;margin:0;padding:0 var(--comp-input-spacing-horizontal) 0 0;background-color:transparent}ap-input .input-wrapper .content .clear-button:hover{cursor:pointer}ap-input .input-wrapper .content .clear-button ap-symbol{padding:0}ap-input .input-wrapper .prefix,ap-input .input-wrapper .suffix{height:100%;display:flex;justify-content:center;align-items:center;font-size:var(--sys-text-style-body-size);font-weight:var(--sys-text-style-body-weight);line-height:var(--sys-text-style-body-line-height);font-family:var(--ref-font-family);color:var(--ref-color-grey-100)}ap-input .input-wrapper .prefix .divider,ap-input .input-wrapper .suffix .divider{height:18px;width:var(--border-width);background:var(--ref-color-grey-10)}ap-input .input-wrapper ap-symbol{height:var(--comp-input-icon-size);width:var(--comp-input-icon-size);min-height:var(--comp-input-icon-size);min-width:var(--comp-input-icon-size);max-height:var(--comp-input-icon-size);max-width:var(--comp-input-icon-size);color:var(--comp-input-icon-color);padding-right:var(--comp-input-padding-horizontal);pointer-events:none;box-sizing:content-box}ap-input .input-wrapper ap-symbol:hover{cursor:text}ap-input .input-wrapper.inverse{flex-direction:row-reverse}ap-input .input-wrapper.inverse.with-icon input{padding-left:0}ap-input .input-wrapper.inverse.with-icon ap-symbol{padding-right:var(--comp-input-spacing-horizontal);padding-left:var(--comp-input-padding-horizontal)}ap-input .input-wrapper.with-icon input{padding-right:var(--ref-spacing-xxxs)}ap-input .input-wrapper.with-prefix input{padding-left:var(--ref-spacing-xxs)}ap-input .input-wrapper.with-prefix .prefix{padding-left:var(--comp-input-padding-horizontal);gap:var(--ref-spacing-xxs)}ap-input .input-wrapper.with-suffix input{padding-right:var(--ref-spacing-xxs)}ap-input .input-wrapper.with-suffix .suffix{padding-right:var(--comp-input-padding-horizontal);gap:var(--ref-spacing-xxs)}ap-input .input-wrapper.with-counter input{padding-right:0}ap-input .input-wrapper.with-error{border-color:var(--comp-input-border-error-color)}ap-input .input-wrapper.with-success{border-color:var(--comp-input-border-success-color)}.form-message{font-size:var(--comp-forms-status-text-size);font-weight:var(--comp-forms-status-text-font-weight);line-height:var(--comp-forms-status-text-line-height);font-family:var(--comp-forms-status-text-font-family);margin:0;display:flex;gap:var(--ref-spacing-xxxs)}.form-message.error{color:var(--comp-forms-status-text-error-color)}.form-message.error ap-symbol{color:var(--comp-forms-status-icon-error-color)}.form-message.success{color:var(--comp-forms-status-text-success-color)}.form-message.success ap-symbol{color:var(--comp-forms-status-icon-success-color)}form.ng-submitted ap-input.ng-valid .input-wrapper{border-color:var(--comp-input-border-success-color)}form.ng-submitted ap-input.ng-invalid .input-wrapper{border-color:var(--comp-input-border-error-color)}\n"] }]
|
|
134
134
|
}], propDecorators: { symbols: [{
|
|
135
135
|
type: ContentChildren,
|
|
136
136
|
args: [SymbolComponent]
|