carbon-components-angular 5.33.0 → 5.34.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/docs/documentation/components/Dropdown.html +157 -110
- package/docs/documentation/coverage.html +3 -3
- package/docs/documentation/js/search/search_index.js +2 -2
- package/docs/documentation/modules/ComboBoxModule/dependencies.svg +4 -4
- package/docs/documentation/modules/ComboBoxModule.html +4 -4
- package/docs/documentation/modules/ContentSwitcherModule/dependencies.svg +4 -4
- package/docs/documentation/modules/ContentSwitcherModule.html +4 -4
- package/docs/documentation/modules/DatePickerInputModule/dependencies.svg +41 -37
- package/docs/documentation/modules/DatePickerInputModule.html +41 -37
- package/docs/documentation/modules/DatePickerModule/dependencies.svg +38 -38
- package/docs/documentation/modules/DatePickerModule.html +38 -38
- package/docs/documentation/modules/GridModule/dependencies.svg +60 -60
- package/docs/documentation/modules/GridModule.html +60 -60
- package/docs/documentation/modules/LoadingModule/dependencies.svg +4 -4
- package/docs/documentation/modules/LoadingModule.html +4 -4
- package/docs/documentation/modules/NFormsModule/dependencies.svg +4 -4
- package/docs/documentation/modules/NFormsModule.html +4 -4
- package/docs/documentation/modules/NumberModule/dependencies.svg +4 -4
- package/docs/documentation/modules/NumberModule.html +4 -4
- package/docs/documentation/modules/ProgressIndicatorModule/dependencies.svg +4 -4
- package/docs/documentation/modules/ProgressIndicatorModule.html +4 -4
- package/docs/documentation/modules/RadioModule/dependencies.svg +4 -4
- package/docs/documentation/modules/RadioModule.html +4 -4
- package/docs/documentation/modules/SelectModule/dependencies.svg +58 -58
- package/docs/documentation/modules/SelectModule.html +58 -58
- package/docs/documentation/modules/SliderModule/dependencies.svg +4 -4
- package/docs/documentation/modules/SliderModule.html +4 -4
- package/docs/documentation/modules/TableModule/dependencies.svg +216 -216
- package/docs/documentation/modules/TableModule.html +216 -216
- package/docs/documentation/modules/TabsModule/dependencies.svg +69 -69
- package/docs/documentation/modules/TabsModule.html +69 -69
- package/docs/documentation/modules/TilesModule/dependencies.svg +4 -4
- package/docs/documentation/modules/TilesModule.html +4 -4
- package/docs/documentation/modules/TimePickerModule/dependencies.svg +41 -37
- package/docs/documentation/modules/TimePickerModule.html +41 -37
- package/docs/documentation/modules/TimePickerSelectModule/dependencies.svg +4 -4
- package/docs/documentation/modules/TimePickerSelectModule.html +4 -4
- package/docs/documentation/modules/ToggleModule/dependencies.svg +45 -41
- package/docs/documentation/modules/ToggleModule.html +45 -41
- package/docs/documentation/modules/ToggletipModule/dependencies.svg +4 -4
- package/docs/documentation/modules/ToggletipModule.html +4 -4
- package/docs/documentation/modules/TooltipModule/dependencies.svg +28 -28
- package/docs/documentation/modules/TooltipModule.html +28 -28
- package/docs/documentation/modules/TreeviewModule/dependencies.svg +31 -31
- package/docs/documentation/modules/TreeviewModule.html +31 -31
- package/docs/documentation/modules/UIShellModule/dependencies.svg +4 -4
- package/docs/documentation/modules/UIShellModule.html +4 -4
- package/docs/documentation.json +96 -85
- package/docs/storybook/3224.c0834124.iframe.bundle.js +1 -0
- package/docs/storybook/{dropdown-dropdown-stories.eb5b6694.iframe.bundle.js → dropdown-dropdown-stories.c20a8aa6.iframe.bundle.js} +1 -1
- package/docs/storybook/iframe.html +2 -2
- package/docs/storybook/{main.f6f7b65b.iframe.bundle.js → main.c7fa1279.iframe.bundle.js} +1 -1
- package/docs/storybook/project.json +1 -1
- package/docs/storybook/{runtime~main.b455b6c9.iframe.bundle.js → runtime~main.c0aac812.iframe.bundle.js} +1 -1
- package/dropdown/dropdown.component.d.ts +5 -1
- package/esm2020/dropdown/dropdown.component.mjs +17 -4
- package/fesm2015/carbon-components-angular-dropdown.mjs +16 -3
- package/fesm2015/carbon-components-angular-dropdown.mjs.map +1 -1
- package/fesm2020/carbon-components-angular-dropdown.mjs +16 -3
- package/fesm2020/carbon-components-angular-dropdown.mjs.map +1 -1
- package/package.json +1 -1
- package/docs/storybook/3224.2942835b.iframe.bundle.js +0 -1
|
@@ -302,6 +302,10 @@ class Dropdown {
|
|
|
302
302
|
* Set to `true` to disable the dropdown.
|
|
303
303
|
*/
|
|
304
304
|
this.disabled = false;
|
|
305
|
+
/**
|
|
306
|
+
* Set to `true` for a readonly state.
|
|
307
|
+
*/
|
|
308
|
+
this.readonly = false;
|
|
305
309
|
/**
|
|
306
310
|
* Set to `true` for a loading dropdown.
|
|
307
311
|
*/
|
|
@@ -537,6 +541,9 @@ class Dropdown {
|
|
|
537
541
|
* Adds keyboard functionality for navigation, selection and closing of the `Dropdown`.
|
|
538
542
|
*/
|
|
539
543
|
onKeyDown(event) {
|
|
544
|
+
if (this.readonly) {
|
|
545
|
+
return;
|
|
546
|
+
}
|
|
540
547
|
if ((event.key === "Escape") && !this.menuIsClosed) {
|
|
541
548
|
event.stopImmediatePropagation(); // don't unintentionally close other widgets that listen for Escape
|
|
542
549
|
}
|
|
@@ -813,7 +820,7 @@ class Dropdown {
|
|
|
813
820
|
}
|
|
814
821
|
Dropdown.dropdownCount = 0;
|
|
815
822
|
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 });
|
|
816
|
-
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", 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: [
|
|
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: [
|
|
817
824
|
{
|
|
818
825
|
provide: NG_VALUE_ACCESSOR,
|
|
819
826
|
useExisting: Dropdown,
|
|
@@ -842,6 +849,7 @@ Dropdown.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.
|
|
|
842
849
|
'cds--list-box--inline': inline,
|
|
843
850
|
'cds--skeleton': skeleton,
|
|
844
851
|
'cds--dropdown--disabled cds--list-box--disabled': disabled,
|
|
852
|
+
'cds--dropdown--readonly': readonly,
|
|
845
853
|
'cds--dropdown--invalid': invalid,
|
|
846
854
|
'cds--dropdown--warning cds--list-box--warning': warn,
|
|
847
855
|
'cds--dropdown--sm cds--list-box--sm': size === 'sm',
|
|
@@ -857,8 +865,9 @@ Dropdown.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.
|
|
|
857
865
|
[ngClass]="{'a': !menuIsClosed}"
|
|
858
866
|
[attr.aria-expanded]="!menuIsClosed"
|
|
859
867
|
[attr.aria-disabled]="disabled"
|
|
868
|
+
[attr.aria-readonly]="readonly"
|
|
860
869
|
aria-haspopup="listbox"
|
|
861
|
-
(click)="disabled ? $event.stopPropagation() : toggleMenu()"
|
|
870
|
+
(click)="disabled || readonly ? $event.stopPropagation() : toggleMenu()"
|
|
862
871
|
(blur)="onBlur()"
|
|
863
872
|
[attr.disabled]="disabled ? true : null">
|
|
864
873
|
<div
|
|
@@ -963,6 +972,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
963
972
|
'cds--list-box--inline': inline,
|
|
964
973
|
'cds--skeleton': skeleton,
|
|
965
974
|
'cds--dropdown--disabled cds--list-box--disabled': disabled,
|
|
975
|
+
'cds--dropdown--readonly': readonly,
|
|
966
976
|
'cds--dropdown--invalid': invalid,
|
|
967
977
|
'cds--dropdown--warning cds--list-box--warning': warn,
|
|
968
978
|
'cds--dropdown--sm cds--list-box--sm': size === 'sm',
|
|
@@ -978,8 +988,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
978
988
|
[ngClass]="{'a': !menuIsClosed}"
|
|
979
989
|
[attr.aria-expanded]="!menuIsClosed"
|
|
980
990
|
[attr.aria-disabled]="disabled"
|
|
991
|
+
[attr.aria-readonly]="readonly"
|
|
981
992
|
aria-haspopup="listbox"
|
|
982
|
-
(click)="disabled ? $event.stopPropagation() : toggleMenu()"
|
|
993
|
+
(click)="disabled || readonly ? $event.stopPropagation() : toggleMenu()"
|
|
983
994
|
(blur)="onBlur()"
|
|
984
995
|
[attr.disabled]="disabled ? true : null">
|
|
985
996
|
<div
|
|
@@ -1087,6 +1098,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
1087
1098
|
type: Input
|
|
1088
1099
|
}], disabled: [{
|
|
1089
1100
|
type: Input
|
|
1101
|
+
}], readonly: [{
|
|
1102
|
+
type: Input
|
|
1090
1103
|
}], skeleton: [{
|
|
1091
1104
|
type: Input
|
|
1092
1105
|
}], inline: [{
|