Skip to content

Commit b22506e

Browse files
committed
merge
2 parents 3699abf + a3ced8b commit b22506e

24 files changed

+274
-40
lines changed

.storybook/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"emitDecoratorMetadata": true,
66
"experimentalDecorators": true,
77
"lib": [
8-
"es2015",
8+
"es2016",
99
"dom"
1010
],
1111
"sourceMap": true,

src/accordion/accordion-item.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ export class AccordionItem {
3636

3737
@HostBinding("class.bx--accordion__item") itemClass = true;
3838
@HostBinding("class.bx--accordion__item--active") @Input() expanded = false;
39-
@HostBinding("style.display") @HostBinding("attr.role") itemType = "list-item";
39+
@HostBinding("style.display") itemType = "list-item";
40+
@HostBinding("attr.role") role = "heading";
41+
@HostBinding("attr.aria-level") @Input() ariaLevel = 3;
4042

4143
constructor() {
4244
AccordionItem.accordionItemCount++;

src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ export * from "./radio/radio.module";
2121
export * from "./input/input.module";
2222
export * from "./select/select.module";
2323
export * from "./tiles/tiles.module";
24+
export * from "./progress-indicator/progress-indicator.module";

src/input/input.directive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Directive, HostBinding } from "@angular/core";
55
*
66
* Example:
77
*
8-
* ```hmtl
8+
* ```html
99
* <input ibmText/>
1010
* ```
1111
*

src/input/input.module.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,18 @@ import { CommonModule } from "@angular/common";
66
// imports
77
import { LabelComponent } from "./label.component";
88
import { TextInput } from "./input.directive";
9+
import { TextArea } from "./text-area.directive";
910

1011
@NgModule({
1112
declarations: [
1213
LabelComponent,
13-
TextInput
14+
TextInput,
15+
TextArea
1416
],
1517
exports: [
1618
LabelComponent,
17-
TextInput
19+
TextInput,
20+
TextArea
1821
],
1922
imports: [
2023
CommonModule,

src/input/input.stories.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,8 @@ storiesOf("Input", module).addDecorator(
2222
template: `
2323
<input ibmText placeholder="Optional placeholder text"/>
2424
`
25+
})).add("TextArea", () => ({
26+
template: `
27+
<textarea ibmTextArea placeholder="Optional placeholder text" rows="4" cols="50"></textarea>
28+
`
2529
}));

src/input/text-area.directive.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { Directive, HostBinding } from "@angular/core";
2+
3+
/**
4+
* A directive for applying styling to a textarea element.
5+
*
6+
* Example:
7+
*
8+
* ```html
9+
* <textarea ibmTextArea></textarea>
10+
* ```
11+
*
12+
* See the [vanilla carbon docs](http://www.carbondesignsystem.com/components/text-input/code) for more detail.
13+
*/
14+
@Directive({
15+
selector: "[ibmTextArea]"
16+
})
17+
export class TextArea {
18+
@HostBinding("class.bx--text-area") baseClass = true;
19+
}

src/modal/alert-modal.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ import Modal from "./modal.decorator";
5858
@Component({
5959
selector: "ibm-alert-modal",
6060
template: `
61-
<ibm-modal [modalType]="modalType">
61+
<ibm-modal [modalType]="modalType" [modalLabel]="modalTitle">
6262
<ibm-modal-header (closeSelect)="closeModal()">
6363
<p class="bx--modal-header__label bx--type-delta">{{modalLabel}}</p>
6464
<p class="bx--modal-header__heading bx--type-beta">{{modalTitle}}</p>

src/modal/alert-modal.interface.ts

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
export enum AlertModalType {
2+
default = "default",
3+
danger = "danger"
4+
}
5+
16
export interface AlertModalData {
27
/**
38
* Use of `modalType` is deprecated, use `type` instead
@@ -6,7 +11,7 @@ export interface AlertModalData {
611
/**
712
* type of the modal
813
*/
9-
type?: "default" | "danger";
14+
type?: AlertModalType;
1015
/**
1116
* Use of `modalLabel` is deprecated, use `label` instead
1217
*/
@@ -37,6 +42,15 @@ export interface AlertModalData {
3742
buttons?: Array<ModalButton>;
3843
}
3944

45+
export enum ModalButtonType {
46+
primary = "primary",
47+
secondary = "secondary",
48+
tertiary = "tertiary",
49+
ghost = "ghost",
50+
danger = "danger",
51+
danger_primary = "danger--primary"
52+
}
53+
4054
export interface ModalButton {
4155
/**
4256
* Display value of the button
@@ -45,9 +59,9 @@ export interface ModalButton {
4559
/**
4660
* Button type
4761
*/
48-
type: "primary" | "secondary" | "tertiary" | "ghost" | "danger" | "danger--primary" = "primary";
62+
type: ModalButtonType;
4963
/**
5064
* Callback for the button `click` event
5165
*/
52-
click: function;
66+
click: Function;
5367
}

src/modal/modal-footer.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { Component } from "@angular/core";
88
@Component({
99
selector: "ibm-modal-footer",
1010
template: `
11-
<footer role="contentinfo" class="bx--modal-footer">
11+
<footer class="bx--modal-footer">
1212
<ng-content></ng-content>
1313
</footer>
1414
`

0 commit comments

Comments
 (0)