carbon-components-angular 5.54.1 → 5.56.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/combobox/combobox.component.d.ts +7 -2
- package/docs/documentation/components/ComboBox.html +294 -211
- package/docs/documentation/components/Dropdown.html +504 -152
- package/docs/documentation/coverage.html +6 -6
- package/docs/documentation/js/search/search_index.js +2 -2
- package/docs/documentation/modules/TilesModule/dependencies.svg +91 -91
- package/docs/documentation/modules/TilesModule.html +91 -91
- package/docs/documentation/modules/TimePickerSelectModule/dependencies.svg +4 -4
- package/docs/documentation/modules/TimePickerSelectModule.html +4 -4
- package/docs/documentation/modules/ToggleModule/dependencies.svg +19 -19
- package/docs/documentation/modules/ToggleModule.html +19 -19
- package/docs/documentation/modules/ToggletipModule/dependencies.svg +37 -37
- package/docs/documentation/modules/ToggletipModule.html +37 -37
- package/docs/documentation/modules/TooltipModule/dependencies.svg +28 -28
- package/docs/documentation/modules/TooltipModule.html +28 -28
- package/docs/documentation/modules/TreeviewModule/dependencies.svg +7 -7
- package/docs/documentation/modules/TreeviewModule.html +7 -7
- package/docs/documentation/modules/UIShellModule/dependencies.svg +4 -4
- package/docs/documentation/modules/UIShellModule.html +4 -4
- package/docs/documentation.json +454 -280
- package/docs/storybook/3224.9896492c.iframe.bundle.js +1 -0
- package/docs/storybook/combobox-combobox-stories.6da5780e.iframe.bundle.js +1 -0
- package/docs/storybook/{dropdown-dropdown-stories.03c37214.iframe.bundle.js → dropdown-dropdown-stories.0a8f052e.iframe.bundle.js} +1 -1
- package/docs/storybook/iframe.html +2 -2
- package/docs/storybook/index.json +1 -1
- package/docs/storybook/main.848bbb16.iframe.bundle.js +1 -0
- package/docs/storybook/main.css +886 -187
- package/docs/storybook/project.json +1 -1
- package/docs/storybook/{runtime~main.ba940694.iframe.bundle.js → runtime~main.e82ba84b.iframe.bundle.js} +1 -1
- package/docs/storybook/stories.json +1 -1
- package/dropdown/dropdown.component.d.ts +12 -3
- package/esm2020/combobox/combobox.component.mjs +38 -14
- package/esm2020/dropdown/dropdown.component.mjs +79 -37
- package/fesm2015/carbon-components-angular-combobox.mjs +37 -13
- package/fesm2015/carbon-components-angular-combobox.mjs.map +1 -1
- package/fesm2015/carbon-components-angular-dropdown.mjs +79 -37
- package/fesm2015/carbon-components-angular-dropdown.mjs.map +1 -1
- package/fesm2020/carbon-components-angular-combobox.mjs +37 -13
- package/fesm2020/carbon-components-angular-combobox.mjs.map +1 -1
- package/fesm2020/carbon-components-angular-dropdown.mjs +79 -37
- package/fesm2020/carbon-components-angular-dropdown.mjs.map +1 -1
- package/package.json +1 -1
- package/docs/storybook/3224.c0834124.iframe.bundle.js +0 -1
- package/docs/storybook/IBMPlexMono-Italic-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexMono-Italic-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexMono-Italic-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexMono-Italic-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexMono-Italic-Pi.woff +0 -0
- package/docs/storybook/IBMPlexMono-Light-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexMono-Light-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexMono-Light-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexMono-Light-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexMono-Light-Pi.woff +0 -0
- package/docs/storybook/IBMPlexMono-LightItalic-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexMono-LightItalic-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexMono-LightItalic-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexMono-LightItalic-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexMono-LightItalic-Pi.woff +0 -0
- package/docs/storybook/IBMPlexMono-Regular-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexMono-Regular-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexMono-Regular-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexMono-Regular-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexMono-Regular-Pi.woff +0 -0
- package/docs/storybook/IBMPlexMono-SemiBold-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexMono-SemiBold-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexMono-SemiBold-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexMono-SemiBold-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexMono-SemiBold-Pi.woff +0 -0
- package/docs/storybook/IBMPlexMono-SemiBoldItalic-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexMono-SemiBoldItalic-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexMono-SemiBoldItalic-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexMono-SemiBoldItalic-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexMono-SemiBoldItalic-Pi.woff +0 -0
- package/docs/storybook/IBMPlexSans-Italic-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexSans-Italic-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexSans-Italic-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexSans-Italic-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexSans-Italic-Pi.woff +0 -0
- package/docs/storybook/IBMPlexSans-Light-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexSans-Light-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexSans-Light-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexSans-Light-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexSans-Light-Pi.woff +0 -0
- package/docs/storybook/IBMPlexSans-LightItalic-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexSans-LightItalic-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexSans-LightItalic-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexSans-LightItalic-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexSans-LightItalic-Pi.woff +0 -0
- package/docs/storybook/IBMPlexSans-Regular-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexSans-Regular-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexSans-Regular-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexSans-Regular-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexSans-Regular-Pi.woff +0 -0
- package/docs/storybook/IBMPlexSans-SemiBold-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexSans-SemiBold-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexSans-SemiBold-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexSans-SemiBold-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexSans-SemiBold-Pi.woff +0 -0
- package/docs/storybook/IBMPlexSans-SemiBoldItalic-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexSans-SemiBoldItalic-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexSans-SemiBoldItalic-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexSans-SemiBoldItalic-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexSans-SemiBoldItalic-Pi.woff +0 -0
- package/docs/storybook/IBMPlexSerif-Italic-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexSerif-Italic-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexSerif-Italic-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexSerif-Italic-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexSerif-Italic-Pi.woff +0 -0
- package/docs/storybook/IBMPlexSerif-Light-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexSerif-Light-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexSerif-Light-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexSerif-Light-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexSerif-Light-Pi.woff +0 -0
- package/docs/storybook/IBMPlexSerif-LightItalic-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexSerif-LightItalic-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexSerif-LightItalic-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexSerif-LightItalic-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexSerif-LightItalic-Pi.woff +0 -0
- package/docs/storybook/IBMPlexSerif-Regular-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexSerif-Regular-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexSerif-Regular-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexSerif-Regular-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexSerif-Regular-Pi.woff +0 -0
- package/docs/storybook/IBMPlexSerif-SemiBold-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexSerif-SemiBold-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexSerif-SemiBold-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexSerif-SemiBold-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexSerif-SemiBold-Pi.woff +0 -0
- package/docs/storybook/IBMPlexSerif-SemiBoldItalic-Cyrillic.woff +0 -0
- package/docs/storybook/IBMPlexSerif-SemiBoldItalic-Latin1.woff +0 -0
- package/docs/storybook/IBMPlexSerif-SemiBoldItalic-Latin2.woff +0 -0
- package/docs/storybook/IBMPlexSerif-SemiBoldItalic-Latin3.woff +0 -0
- package/docs/storybook/IBMPlexSerif-SemiBoldItalic-Pi.woff +0 -0
- package/docs/storybook/combobox-combobox-stories.632a96c1.iframe.bundle.js +0 -1
- package/docs/storybook/main.41f2a733.iframe.bundle.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Directive, Input, Output, Injectable, EventEmitter, TemplateRef, Component, ContentChild, ViewChild,
|
|
2
|
+
import { Directive, Input, Output, Injectable, EventEmitter, TemplateRef, Component, HostBinding, ContentChild, ViewChild, HostListener, ViewChildren, NgModule } from '@angular/core';
|
|
3
3
|
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
|
4
4
|
import { Subscription, of, fromEvent, isObservable, Observable } from 'rxjs';
|
|
5
5
|
import * as i2 from 'carbon-components-angular/utils';
|
|
@@ -360,6 +360,11 @@ class Dropdown {
|
|
|
360
360
|
*/
|
|
361
361
|
this.close = new EventEmitter();
|
|
362
362
|
this.hostClass = true;
|
|
363
|
+
this.hostWrapperClass = true;
|
|
364
|
+
/**
|
|
365
|
+
* Experimental: enable fluid state
|
|
366
|
+
*/
|
|
367
|
+
this.fluid = false;
|
|
363
368
|
/**
|
|
364
369
|
* Set to `true` if the dropdown is closed (not expanded).
|
|
365
370
|
*/
|
|
@@ -376,6 +381,7 @@ class Dropdown {
|
|
|
376
381
|
this.keyboardNav = this._keyboardNav.bind(this);
|
|
377
382
|
this.visibilitySubscription = new Subscription();
|
|
378
383
|
this.onTouchedCallback = this._noop;
|
|
384
|
+
this._isFocused = false;
|
|
379
385
|
// primarily used to capture and propagate input to `writeValue` before the content is available
|
|
380
386
|
this._writtenValue = [];
|
|
381
387
|
/**
|
|
@@ -383,6 +389,12 @@ class Dropdown {
|
|
|
383
389
|
*/
|
|
384
390
|
this.propagateChange = (_) => { };
|
|
385
391
|
}
|
|
392
|
+
get fluidInvalidClass() {
|
|
393
|
+
return this.invalid && this.fluid;
|
|
394
|
+
}
|
|
395
|
+
get fluidFocusClass() {
|
|
396
|
+
return this.fluid && this._isFocused && this.menuIsClosed;
|
|
397
|
+
}
|
|
386
398
|
get writtenValue() {
|
|
387
399
|
return this._writtenValue;
|
|
388
400
|
}
|
|
@@ -808,6 +820,12 @@ class Dropdown {
|
|
|
808
820
|
isTemplate(value) {
|
|
809
821
|
return value instanceof TemplateRef;
|
|
810
822
|
}
|
|
823
|
+
handleFocus(event) {
|
|
824
|
+
this._isFocused = event.type === "focus";
|
|
825
|
+
if (event.type === "blur") {
|
|
826
|
+
this.onBlur();
|
|
827
|
+
}
|
|
828
|
+
}
|
|
811
829
|
/**
|
|
812
830
|
* Controls when it's needed to apply the selection feedback
|
|
813
831
|
*/
|
|
@@ -820,7 +838,7 @@ class Dropdown {
|
|
|
820
838
|
}
|
|
821
839
|
Dropdown.dropdownCount = 0;
|
|
822
840
|
Dropdown.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: Dropdown, deps: [{ token: i0.ElementRef }, { token: i1$1.I18n }, { token: DropdownService }, { token: i2.ElementService }], target: i0.ɵɵFactoryTarget.Component });
|
|
823
|
-
Dropdown.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: Dropdown, selector: "cds-dropdown, ibm-dropdown", inputs: { id: "id", label: "label", hideLabel: "hideLabel", helperText: "helperText", placeholder: "placeholder", displayValue: "displayValue", clearText: "clearText", size: "size", type: "type", theme: "theme", disabled: "disabled", readonly: "readonly", skeleton: "skeleton", inline: "inline", disableArrowKeys: "disableArrowKeys", invalid: "invalid", invalidText: "invalidText", warn: "warn", warnText: "warnText", appendInline: "appendInline", scrollableContainer: "scrollableContainer", itemValueKey: "itemValueKey", selectionFeedback: "selectionFeedback", menuButtonLabel: "menuButtonLabel", selectedLabel: "selectedLabel", dropUp: "dropUp" }, outputs: { selected: "selected", onClose: "onClose", close: "close" }, host: { listeners: { "keydown": "onKeyDown($event)" }, properties: { "class.cds--dropdown__wrapper": "this.hostClass" } }, providers: [
|
|
841
|
+
Dropdown.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: Dropdown, selector: "cds-dropdown, ibm-dropdown", inputs: { id: "id", label: "label", hideLabel: "hideLabel", helperText: "helperText", placeholder: "placeholder", displayValue: "displayValue", clearText: "clearText", size: "size", type: "type", theme: "theme", disabled: "disabled", readonly: "readonly", skeleton: "skeleton", inline: "inline", disableArrowKeys: "disableArrowKeys", invalid: "invalid", invalidText: "invalidText", warn: "warn", warnText: "warnText", appendInline: "appendInline", scrollableContainer: "scrollableContainer", itemValueKey: "itemValueKey", selectionFeedback: "selectionFeedback", menuButtonLabel: "menuButtonLabel", selectedLabel: "selectedLabel", dropUp: "dropUp", fluid: "fluid" }, outputs: { selected: "selected", onClose: "onClose", close: "close" }, host: { listeners: { "keydown": "onKeyDown($event)" }, properties: { "class.cds--list-box__wrapper--fluid--invalid": "this.fluidInvalidClass", "class.cds--list-box__wrapper--fluid--focus": "this.fluidFocusClass", "class.cds--dropdown__wrapper": "this.hostClass", "class.cds--list-box__wrapper": "this.hostWrapperClass", "class.cds--list-box__wrapper--fluid": "this.fluid" } }, providers: [
|
|
824
842
|
{
|
|
825
843
|
provide: NG_VALUE_ACCESSOR,
|
|
826
844
|
useExisting: Dropdown,
|
|
@@ -841,7 +859,7 @@ Dropdown.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.
|
|
|
841
859
|
<div
|
|
842
860
|
class="cds--list-box"
|
|
843
861
|
[ngClass]="{
|
|
844
|
-
'cds--dropdown': type !== 'multi',
|
|
862
|
+
'cds--dropdown': type !== 'multi' && !(skeleton && fluid),
|
|
845
863
|
'cds--multiselect': type === 'multi',
|
|
846
864
|
'cds--multi-select--selected': type === 'multi' && getSelectedCount() > 0,
|
|
847
865
|
'cds--dropdown--light': theme === 'light',
|
|
@@ -855,8 +873,11 @@ Dropdown.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.
|
|
|
855
873
|
'cds--dropdown--sm cds--list-box--sm': size === 'sm',
|
|
856
874
|
'cds--dropdown--md cds--list-box--md': size === 'md',
|
|
857
875
|
'cds--dropdown--lg cds--list-box--lg': size === 'lg',
|
|
858
|
-
'cds--list-box--expanded': !menuIsClosed
|
|
859
|
-
|
|
876
|
+
'cds--list-box--expanded': !menuIsClosed,
|
|
877
|
+
'cds--list-box--invalid': invalid
|
|
878
|
+
}"
|
|
879
|
+
[attr.data-invalid]="invalid ? true : null">
|
|
880
|
+
<div *ngIf="skeleton && fluid" class="cds--list-box__label"></div>
|
|
860
881
|
<button
|
|
861
882
|
#dropdownButton
|
|
862
883
|
[id]="id"
|
|
@@ -868,7 +889,8 @@ Dropdown.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.
|
|
|
868
889
|
[attr.aria-readonly]="readonly"
|
|
869
890
|
aria-haspopup="listbox"
|
|
870
891
|
(click)="disabled || readonly ? $event.stopPropagation() : toggleMenu()"
|
|
871
|
-
(
|
|
892
|
+
(focus)="fluid ? handleFocus($event) : null"
|
|
893
|
+
(blur)="fluid ? handleFocus($event) : onBlur()"
|
|
872
894
|
[attr.disabled]="disabled ? true : null">
|
|
873
895
|
<div
|
|
874
896
|
(click)="clearSelected()"
|
|
@@ -897,18 +919,6 @@ Dropdown.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.
|
|
|
897
919
|
[ngTemplateOutletContext]="getRenderTemplateContext()"
|
|
898
920
|
[ngTemplateOutlet]="displayValue">
|
|
899
921
|
</ng-template>
|
|
900
|
-
<svg
|
|
901
|
-
*ngIf="invalid"
|
|
902
|
-
class="cds--dropdown__invalid-icon"
|
|
903
|
-
cdsIcon="warning--filled"
|
|
904
|
-
size="16">
|
|
905
|
-
</svg>
|
|
906
|
-
<svg
|
|
907
|
-
*ngIf="!invalid && warn"
|
|
908
|
-
cdsIcon="warning--alt--filled"
|
|
909
|
-
size="16"
|
|
910
|
-
class="cds--list-box__invalid-icon cds--list-box__invalid-icon--warning">
|
|
911
|
-
</svg>
|
|
912
922
|
<span class="cds--list-box__menu-icon">
|
|
913
923
|
<svg
|
|
914
924
|
*ngIf="!skeleton"
|
|
@@ -919,6 +929,18 @@ Dropdown.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.
|
|
|
919
929
|
</svg>
|
|
920
930
|
</span>
|
|
921
931
|
</button>
|
|
932
|
+
<svg
|
|
933
|
+
*ngIf="invalid"
|
|
934
|
+
class="cds--list-box__invalid-icon"
|
|
935
|
+
cdsIcon="warning--filled"
|
|
936
|
+
size="16">
|
|
937
|
+
</svg>
|
|
938
|
+
<svg
|
|
939
|
+
*ngIf="!invalid && warn"
|
|
940
|
+
cdsIcon="warning--alt--filled"
|
|
941
|
+
size="16"
|
|
942
|
+
class="cds--list-box__invalid-icon cds--list-box__invalid-icon--warning">
|
|
943
|
+
</svg>
|
|
922
944
|
<div
|
|
923
945
|
#dropdownMenu
|
|
924
946
|
[ngClass]="{
|
|
@@ -927,8 +949,9 @@ Dropdown.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.
|
|
|
927
949
|
<ng-content *ngIf="!menuIsClosed"></ng-content>
|
|
928
950
|
</div>
|
|
929
951
|
</div>
|
|
952
|
+
<hr *ngIf="fluid" class="cds--list-box__divider" />
|
|
930
953
|
<div
|
|
931
|
-
*ngIf="helperText && !invalid && !warn && !skeleton"
|
|
954
|
+
*ngIf="helperText && !invalid && !warn && !skeleton && !fluid"
|
|
932
955
|
class="cds--form__helper-text"
|
|
933
956
|
[ngClass]="{
|
|
934
957
|
'cds--form__helper-text--disabled': disabled
|
|
@@ -964,7 +987,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
964
987
|
<div
|
|
965
988
|
class="cds--list-box"
|
|
966
989
|
[ngClass]="{
|
|
967
|
-
'cds--dropdown': type !== 'multi',
|
|
990
|
+
'cds--dropdown': type !== 'multi' && !(skeleton && fluid),
|
|
968
991
|
'cds--multiselect': type === 'multi',
|
|
969
992
|
'cds--multi-select--selected': type === 'multi' && getSelectedCount() > 0,
|
|
970
993
|
'cds--dropdown--light': theme === 'light',
|
|
@@ -978,8 +1001,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
978
1001
|
'cds--dropdown--sm cds--list-box--sm': size === 'sm',
|
|
979
1002
|
'cds--dropdown--md cds--list-box--md': size === 'md',
|
|
980
1003
|
'cds--dropdown--lg cds--list-box--lg': size === 'lg',
|
|
981
|
-
'cds--list-box--expanded': !menuIsClosed
|
|
982
|
-
|
|
1004
|
+
'cds--list-box--expanded': !menuIsClosed,
|
|
1005
|
+
'cds--list-box--invalid': invalid
|
|
1006
|
+
}"
|
|
1007
|
+
[attr.data-invalid]="invalid ? true : null">
|
|
1008
|
+
<div *ngIf="skeleton && fluid" class="cds--list-box__label"></div>
|
|
983
1009
|
<button
|
|
984
1010
|
#dropdownButton
|
|
985
1011
|
[id]="id"
|
|
@@ -991,7 +1017,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
991
1017
|
[attr.aria-readonly]="readonly"
|
|
992
1018
|
aria-haspopup="listbox"
|
|
993
1019
|
(click)="disabled || readonly ? $event.stopPropagation() : toggleMenu()"
|
|
994
|
-
(
|
|
1020
|
+
(focus)="fluid ? handleFocus($event) : null"
|
|
1021
|
+
(blur)="fluid ? handleFocus($event) : onBlur()"
|
|
995
1022
|
[attr.disabled]="disabled ? true : null">
|
|
996
1023
|
<div
|
|
997
1024
|
(click)="clearSelected()"
|
|
@@ -1020,18 +1047,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
1020
1047
|
[ngTemplateOutletContext]="getRenderTemplateContext()"
|
|
1021
1048
|
[ngTemplateOutlet]="displayValue">
|
|
1022
1049
|
</ng-template>
|
|
1023
|
-
<svg
|
|
1024
|
-
*ngIf="invalid"
|
|
1025
|
-
class="cds--dropdown__invalid-icon"
|
|
1026
|
-
cdsIcon="warning--filled"
|
|
1027
|
-
size="16">
|
|
1028
|
-
</svg>
|
|
1029
|
-
<svg
|
|
1030
|
-
*ngIf="!invalid && warn"
|
|
1031
|
-
cdsIcon="warning--alt--filled"
|
|
1032
|
-
size="16"
|
|
1033
|
-
class="cds--list-box__invalid-icon cds--list-box__invalid-icon--warning">
|
|
1034
|
-
</svg>
|
|
1035
1050
|
<span class="cds--list-box__menu-icon">
|
|
1036
1051
|
<svg
|
|
1037
1052
|
*ngIf="!skeleton"
|
|
@@ -1042,6 +1057,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
1042
1057
|
</svg>
|
|
1043
1058
|
</span>
|
|
1044
1059
|
</button>
|
|
1060
|
+
<svg
|
|
1061
|
+
*ngIf="invalid"
|
|
1062
|
+
class="cds--list-box__invalid-icon"
|
|
1063
|
+
cdsIcon="warning--filled"
|
|
1064
|
+
size="16">
|
|
1065
|
+
</svg>
|
|
1066
|
+
<svg
|
|
1067
|
+
*ngIf="!invalid && warn"
|
|
1068
|
+
cdsIcon="warning--alt--filled"
|
|
1069
|
+
size="16"
|
|
1070
|
+
class="cds--list-box__invalid-icon cds--list-box__invalid-icon--warning">
|
|
1071
|
+
</svg>
|
|
1045
1072
|
<div
|
|
1046
1073
|
#dropdownMenu
|
|
1047
1074
|
[ngClass]="{
|
|
@@ -1050,8 +1077,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
1050
1077
|
<ng-content *ngIf="!menuIsClosed"></ng-content>
|
|
1051
1078
|
</div>
|
|
1052
1079
|
</div>
|
|
1080
|
+
<hr *ngIf="fluid" class="cds--list-box__divider" />
|
|
1053
1081
|
<div
|
|
1054
|
-
*ngIf="helperText && !invalid && !warn && !skeleton"
|
|
1082
|
+
*ngIf="helperText && !invalid && !warn && !skeleton && !fluid"
|
|
1055
1083
|
class="cds--form__helper-text"
|
|
1056
1084
|
[ngClass]="{
|
|
1057
1085
|
'cds--form__helper-text--disabled': disabled
|
|
@@ -1076,7 +1104,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
1076
1104
|
}
|
|
1077
1105
|
]
|
|
1078
1106
|
}]
|
|
1079
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.I18n }, { type: DropdownService }, { type: i2.ElementService }]; }, propDecorators: {
|
|
1107
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.I18n }, { type: DropdownService }, { type: i2.ElementService }]; }, propDecorators: { fluidInvalidClass: [{
|
|
1108
|
+
type: HostBinding,
|
|
1109
|
+
args: ["class.cds--list-box__wrapper--fluid--invalid"]
|
|
1110
|
+
}], fluidFocusClass: [{
|
|
1111
|
+
type: HostBinding,
|
|
1112
|
+
args: ["class.cds--list-box__wrapper--fluid--focus"]
|
|
1113
|
+
}], id: [{
|
|
1080
1114
|
type: Input
|
|
1081
1115
|
}], label: [{
|
|
1082
1116
|
type: Input
|
|
@@ -1146,6 +1180,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
1146
1180
|
}], hostClass: [{
|
|
1147
1181
|
type: HostBinding,
|
|
1148
1182
|
args: ["class.cds--dropdown__wrapper"]
|
|
1183
|
+
}], hostWrapperClass: [{
|
|
1184
|
+
type: HostBinding,
|
|
1185
|
+
args: ["class.cds--list-box__wrapper"]
|
|
1186
|
+
}], fluid: [{
|
|
1187
|
+
type: HostBinding,
|
|
1188
|
+
args: ["class.cds--list-box__wrapper--fluid"]
|
|
1189
|
+
}, {
|
|
1190
|
+
type: Input
|
|
1149
1191
|
}], onKeyDown: [{
|
|
1150
1192
|
type: HostListener,
|
|
1151
1193
|
args: ["keydown", ["$event"]]
|