carbon-components-angular 2.49.9 → 2.49.10
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/bundle/carbon-angular.umd.js +1 -1
- package/bundle/carbon-angular.umd.js.map +1 -1
- package/docs/documentation/components/SelectionTile.html +73 -14
- package/docs/documentation/coverage.html +3 -3
- package/docs/documentation/graph/dependencies.dot +6 -2
- package/docs/documentation/js/search/search_index.js +2 -2
- package/docs/documentation/modules/DropdownModule/dependencies.svg +93 -67
- package/docs/documentation/modules/DropdownModule.html +93 -67
- package/docs/documentation/modules/NumberModule/dependencies.svg +56 -30
- package/docs/documentation/modules/NumberModule.html +56 -30
- package/docs/storybook/iframe.html +3 -3
- package/docs/storybook/{main.3b9cf83b70e4a8de04a0.bundle.js → main.917d6425a713aa6e08c7.bundle.js} +13 -1
- package/docs/storybook/main.917d6425a713aa6e08c7.bundle.js.map +1 -0
- package/docs/storybook/{runtime~main.3b9cf83b70e4a8de04a0.bundle.js → runtime~main.917d6425a713aa6e08c7.bundle.js} +1 -1
- package/docs/storybook/{runtime~main.3b9cf83b70e4a8de04a0.bundle.js.map → runtime~main.917d6425a713aa6e08c7.bundle.js.map} +1 -1
- package/docs/storybook/{vendors~main.3b9cf83b70e4a8de04a0.bundle.js → vendors~main.917d6425a713aa6e08c7.bundle.js} +1 -1
- package/docs/storybook/{vendors~main.3b9cf83b70e4a8de04a0.bundle.js.map → vendors~main.917d6425a713aa6e08c7.bundle.js.map} +1 -1
- package/package.json +1 -1
- package/tiles/selection-tile.component.d.ts +1 -0
- package/tiles/selection-tile.component.js +9 -2
- package/tiles/selection-tile.component.js.map +1 -1
- package/tiles/selection-tile.component.metadata.json +1 -1
- package/tiles/selection-tile.component.ngfactory.js +4 -1
- package/tiles/selection-tile.component.ngsummary.json +1 -1
- package/docs/storybook/main.3b9cf83b70e4a8de04a0.bundle.js.map +0 -1
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
import { Component, Input, Output, EventEmitter, ViewChild } from "@angular/core";
|
|
21
|
+
import { Component, Input, Output, EventEmitter, ViewChild, HostListener } from "@angular/core";
|
|
22
22
|
import { I18n } from "./../i18n/i18n.module";
|
|
23
23
|
var SelectionTile = /** @class */ (function () {
|
|
24
24
|
function SelectionTile(i18n) {
|
|
@@ -62,6 +62,12 @@ var SelectionTile = /** @class */ (function () {
|
|
|
62
62
|
enumerable: true,
|
|
63
63
|
configurable: true
|
|
64
64
|
});
|
|
65
|
+
SelectionTile.prototype.keyboardInput = function (event) {
|
|
66
|
+
if (event.key === "Enter" || event.key === "Spacebar" || event.key === " ") {
|
|
67
|
+
this.selected = !this.selected;
|
|
68
|
+
this.change.emit();
|
|
69
|
+
}
|
|
70
|
+
};
|
|
65
71
|
SelectionTile.prototype.onChange = function (event) {
|
|
66
72
|
this.change.emit(event);
|
|
67
73
|
};
|
|
@@ -81,7 +87,8 @@ var SelectionTile = /** @class */ (function () {
|
|
|
81
87
|
selected: [{ type: Input }],
|
|
82
88
|
value: [{ type: Input }],
|
|
83
89
|
change: [{ type: Output }],
|
|
84
|
-
input: [{ type: ViewChild, args: ["input",] }]
|
|
90
|
+
input: [{ type: ViewChild, args: ["input",] }],
|
|
91
|
+
keyboardInput: [{ type: HostListener, args: ["keydown", ["$event"],] }]
|
|
85
92
|
};
|
|
86
93
|
return SelectionTile;
|
|
87
94
|
}());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selection-tile.component.js","sourceRoot":"","sources":["../src/tiles/selection-tile.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,SAAS,EACT,KAAK,EACL,MAAM,EACN,YAAY,EACZ,SAAS,EACT,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAE7C;IAsEC,uBAAmB,IAAU;QAAV,SAAI,GAAJ,IAAI,CAAM;QAtC7B;;WA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;aAKrB;YACC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;gBAAE,OAAO;aAAE;YAC5B,OAAO,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,OAAO,CAAC;QACzC,CAAC;QAZD;;;WAGG;aACH,UAAsB,KAAc;YACnC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;gBAAE,OAAO;aAAE;YAC5B,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;QACxD,CAAC;;;OAAA;IAgCD,qCAAa,GADb,UACc,KAAK;QAClB,IAAI,KAAK,CAAC,GAAG,KAAK,OAAO,IAAI,KAAK,CAAC,GAAG,KAAK,UAAU,IAAI,KAAK,CAAC,GAAG,KAAK,GAAG,EAAE;YAC3E,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;YAC/B,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;SACnB;IACF,CAAC;IAED,gCAAQ,GAAR,UAAS,KAAK;QACb,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACzB,CAAC;IArDM,uBAAS,GAAG,CAAC,CAAC;;gBA/BrB,SAAS,SAAC;oBACV,QAAQ,EAAE,oBAAoB;oBAC9B,QAAQ,EAAE,o4BA0BT;iBACD;;;;gBA/BQ,IAAI;;;qBAqCX,KAAK;2BAKL,KAAK;wBAYL,KAAK;yBAIL,MAAM;wBAYN,SAAS,SAAC,OAAO;gCAMjB,YAAY,SAAC,SAAS,EAAE,CAAC,QAAQ,CAAC;;IAWpC,oBAAC;CAAA,AArFD,IAqFC;SAvDY,aAAa","sourcesContent":["import {\n\tComponent,\n\tInput,\n\tOutput,\n\tEventEmitter,\n\tViewChild,\n\tHostListener\n} from \"@angular/core\";\nimport { NG_VALUE_ACCESSOR } from \"@angular/forms\";\nimport { I18n } from \"./../i18n/i18n.module\";\n\n@Component({\n\tselector: \"ibm-selection-tile\",\n\ttemplate: `\n\t\t<label\n\t\t\tclass=\"bx--tile bx--tile--selectable\"\n\t\t\ttabindex=\"0\"\n\t\t\t[for]=\"id\"\n\t\t\t[ngClass]=\"{'bx--tile--is-selected' : selected}\"\n\t\t\t[attr.aria-label]=\"i18n.get('TILES.TILE') | async\">\n\t\t\t<input\n\t\t\t\t#input\n\t\t\t\ttabindex=\"-1\"\n\t\t\t\tclass=\"bx--tile-input\"\n\t\t\t\t[id]=\"id\"\n\t\t\t\t[type]=\"(multiple ? 'checkbox': 'radio')\"\n\t\t\t\t[value]=\"value\"\n\t\t\t\t[name]=\"name\"\n\t\t\t\t(change)=\"onChange($event)\"/>\n\t\t\t<div class=\"bx--tile__checkmark\">\n\t\t\t\t<svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\">\n\t\t\t\t\t<path d=\"M8 16A8 8 0 1 1 8 0a8 8 0 0 1 0 16zm3.646-10.854L6.75 10.043 4.354 7.646l-.708.708 3.104 3.103 5.604-5.603-.708-.708z\"\n\t\t\t\t\t\tfill-rule=\"evenodd\"/>\n\t\t\t\t</svg>\n\t\t\t</div>\n\t\t\t<div class=\"bx--tile-content\">\n\t\t\t\t<ng-content></ng-content>\n\t\t\t</div>\n\t\t</label>\n\t`\n})\nexport class SelectionTile {\n\tstatic tileCount = 0;\n\t/**\n\t * The unique id for the input.\n\t */\n\t@Input() id = `tile-${SelectionTile.tileCount}`;\n\t/**\n\t * Updating the state of the input to match the state of the parameter passed in.\n\t * Set to `true` if this tile should be selected.\n\t */\n\t@Input() set selected(value: boolean) {\n\t\tif (!this.input) { return; }\n\t\tthis.input.nativeElement.checked = value ? true : null;\n\t}\n\n\tget selected() {\n\t\tif (!this.input) { return; }\n\t\treturn this.input.nativeElement.checked;\n\t}\n\t/**\n\t * The value for the tile. Returned via `ngModel` or `selected` event on the containing `TileGroup`.\n\t */\n\t@Input() value: string;\n\t/**\n\t * Internal event used to notify the containing `TileGroup` of changes.\n\t */\n\t@Output() change: EventEmitter<Event> = new EventEmitter();\n\n\t/**\n\t * Set by the containing `TileGroup`. Used for the `name` property on the input.\n\t */\n\tname = \"tile-group-unbound\";\n\t/**\n\t * Defines whether or not the `SelectionTile` supports selecting multiple tiles as opposed to single\n\t * tile selection.\n\t */\n\tmultiple = false;\n\n\t@ViewChild(\"input\") input;\n\n\tconstructor(public i18n: I18n) {\n\t\tSelectionTile.tileCount++;\n\t}\n\n\t@HostListener(\"keydown\", [\"$event\"])\n\tkeyboardInput(event) {\n\t\tif (event.key === \"Enter\" || event.key === \"Spacebar\" || event.key === \" \") {\n\t\t\tthis.selected = !this.selected;\n\t\t\tthis.change.emit();\n\t\t}\n\t}\n\n\tonChange(event) {\n\t\tthis.change.emit(event);\n\t}\n}\n\n\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"SelectionTile":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":
|
|
1
|
+
[{"__symbolic":"module","version":4,"metadata":{"SelectionTile":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":11,"character":1},"arguments":[{"selector":"ibm-selection-tile","template":"\n\t\t<label\n\t\t\tclass=\"bx--tile bx--tile--selectable\"\n\t\t\ttabindex=\"0\"\n\t\t\t[for]=\"id\"\n\t\t\t[ngClass]=\"{'bx--tile--is-selected' : selected}\"\n\t\t\t[attr.aria-label]=\"i18n.get('TILES.TILE') | async\">\n\t\t\t<input\n\t\t\t\t#input\n\t\t\t\ttabindex=\"-1\"\n\t\t\t\tclass=\"bx--tile-input\"\n\t\t\t\t[id]=\"id\"\n\t\t\t\t[type]=\"(multiple ? 'checkbox': 'radio')\"\n\t\t\t\t[value]=\"value\"\n\t\t\t\t[name]=\"name\"\n\t\t\t\t(change)=\"onChange($event)\"/>\n\t\t\t<div class=\"bx--tile__checkmark\">\n\t\t\t\t<svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\">\n\t\t\t\t\t<path d=\"M8 16A8 8 0 1 1 8 0a8 8 0 0 1 0 16zm3.646-10.854L6.75 10.043 4.354 7.646l-.708.708 3.104 3.103 5.604-5.603-.708-.708z\"\n\t\t\t\t\t\tfill-rule=\"evenodd\"/>\n\t\t\t\t</svg>\n\t\t\t</div>\n\t\t\t<div class=\"bx--tile-content\">\n\t\t\t\t<ng-content></ng-content>\n\t\t\t</div>\n\t\t</label>\n\t"}]}],"members":{"id":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":46,"character":2}}]}],"selected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":51,"character":2}}]}],"value":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":63,"character":2}}]}],"change":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":67,"character":2}}]}],"input":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":79,"character":2},"arguments":["input"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./../i18n/i18n.module","name":"I18n","line":81,"character":26}]}],"keyboardInput":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":85,"character":2},"arguments":["keydown",["$event"]]}]}],"onChange":[{"__symbolic":"method"}]},"statics":{"tileCount":0}}}}]
|
|
@@ -35,7 +35,10 @@ export function View_SelectionTile_0(_l) { return i0.ɵvid(0, [i0.ɵqud(40265318
|
|
|
35
35
|
var pd_0 = (_co.onChange($event) !== false);
|
|
36
36
|
ad = (pd_0 && ad);
|
|
37
37
|
} return ad; }, null, null)), (_l()(), i0.ɵeld(6, 0, null, null, 2, "div", [["class", "bx--tile__checkmark"]], null, null, null, null, null)), (_l()(), i0.ɵeld(7, 0, null, null, 1, ":svg:svg", [["height", "16"], ["viewBox", "0 0 16 16"], ["width", "16"]], null, null, null, null, null)), (_l()(), i0.ɵeld(8, 0, null, null, 0, ":svg:path", [["d", "M8 16A8 8 0 1 1 8 0a8 8 0 0 1 0 16zm3.646-10.854L6.75 10.043 4.354 7.646l-.708.708 3.104 3.103 5.604-5.603-.708-.708z"], ["fill-rule", "evenodd"]], null, null, null, null, null)), (_l()(), i0.ɵeld(9, 0, null, null, 1, "div", [["class", "bx--tile-content"]], null, null, null, null, null)), i0.ɵncd(null, 0)], function (_ck, _v) { var _co = _v.component; var currVal_2 = "bx--tile bx--tile--selectable"; var currVal_3 = _ck(_v, 3, 0, _co.selected); _ck(_v, 2, 0, currVal_2, currVal_3); }, function (_ck, _v) { var _co = _v.component; var currVal_0 = _co.id; var currVal_1 = i0.ɵunv(_v, 1, 1, i0.ɵnov(_v, 4).transform(_co.i18n.get("TILES.TILE"))); _ck(_v, 1, 0, currVal_0, currVal_1); var currVal_4 = _co.id; var currVal_5 = (_co.multiple ? "checkbox" : "radio"); var currVal_6 = _co.value; var currVal_7 = _co.name; _ck(_v, 5, 0, currVal_4, currVal_5, currVal_6, currVal_7); }); }
|
|
38
|
-
export function View_SelectionTile_Host_0(_l) { return i0.ɵvid(0, [(_l()(), i0.ɵeld(0, 0, null, null, 1, "ibm-selection-tile", [], null, null,
|
|
38
|
+
export function View_SelectionTile_Host_0(_l) { return i0.ɵvid(0, [(_l()(), i0.ɵeld(0, 0, null, null, 1, "ibm-selection-tile", [], null, [[null, "keydown"]], function (_v, en, $event) { var ad = true; if (("keydown" === en)) {
|
|
39
|
+
var pd_0 = (i0.ɵnov(_v, 1).keyboardInput($event) !== false);
|
|
40
|
+
ad = (pd_0 && ad);
|
|
41
|
+
} return ad; }, View_SelectionTile_0, RenderType_SelectionTile)), i0.ɵdid(1, 49152, null, 0, i2.SelectionTile, [i3.I18n], null, null)], null, null); }
|
|
39
42
|
var SelectionTileNgFactory = i0.ɵccf("ibm-selection-tile", i2.SelectionTile, View_SelectionTile_Host_0, { id: "id", selected: "selected", value: "value" }, { change: "change" }, ["*"]);
|
|
40
43
|
export { SelectionTileNgFactory as SelectionTileNgFactory };
|
|
41
44
|
//# sourceMappingURL=selection-tile.component.ngfactory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"moduleName":null,"summaries":[{"symbol":{"__symbol":0,"members":[]},"metadata":{"__symbolic":"class","members":{"id":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"selected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"value":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"change":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":2,"members":[]}}]}],"input":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":3,"members":[]},"arguments":["input"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbol":4,"members":[]}]}],"onChange":[{"__symbolic":"method"}]},"statics":{"tileCount":0}},"type":{"summaryKind":1,"type":{"reference":{"__symbol":0,"members":[]},"diDeps":[{"isAttribute":false,"isHost":false,"isSelf":false,"isSkipSelf":false,"isOptional":false,"token":{"identifier":{"reference":{"__symbol":
|
|
1
|
+
{"moduleName":null,"summaries":[{"symbol":{"__symbol":0,"members":[]},"metadata":{"__symbolic":"class","members":{"id":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"selected":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"value":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":1,"members":[]}}]}],"change":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":2,"members":[]}}]}],"input":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbol":3,"members":[]},"arguments":["input"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbol":4,"members":[]}]}],"keyboardInput":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbol":5,"members":[]},"arguments":["keydown",["$event"]]}]}],"onChange":[{"__symbolic":"method"}]},"statics":{"tileCount":0}},"type":{"summaryKind":1,"type":{"reference":{"__symbol":0,"members":[]},"diDeps":[{"isAttribute":false,"isHost":false,"isSelf":false,"isSkipSelf":false,"isOptional":false,"token":{"identifier":{"reference":{"__symbol":6,"members":[]}}}}],"lifecycleHooks":[]},"isComponent":true,"selector":"ibm-selection-tile","exportAs":null,"inputs":{"id":"id","selected":"selected","value":"value"},"outputs":{"change":"change"},"hostListeners":{"keydown":"keyboardInput($event)"},"hostProperties":{},"hostAttributes":{},"providers":[],"viewProviders":[],"queries":[],"guards":{},"viewQueries":[{"selectors":[{"value":"input"}],"first":true,"descendants":true,"propertyName":"input","read":null}],"entryComponents":[],"changeDetection":1,"template":{"ngContentSelectors":["*"],"encapsulation":2},"componentViewType":{"__symbol":7,"members":[]},"rendererType":{"__symbol":8,"members":[]},"componentFactory":{"__symbol":9,"members":[]}}}],"symbols":[{"__symbol":0,"name":"SelectionTile","filePath":"./selection-tile.component"},{"__symbol":1,"name":"Input","filePath":"@angular/core"},{"__symbol":2,"name":"Output","filePath":"@angular/core"},{"__symbol":3,"name":"ViewChild","filePath":"@angular/core"},{"__symbol":4,"name":"I18n","filePath":"../i18n/i18n.module"},{"__symbol":5,"name":"HostListener","filePath":"@angular/core"},{"__symbol":6,"name":"I18n","filePath":"../i18n/i18n.service"},{"__symbol":7,"name":"View_SelectionTile_0","filePath":"./selection-tile.component.ngfactory"},{"__symbol":8,"name":"RenderType_SelectionTile","filePath":"./selection-tile.component.ngfactory"},{"__symbol":9,"name":"SelectionTileNgFactory","filePath":"./selection-tile.component.ngfactory"}]}
|