diff --git a/src/lib/input/autosize.ts b/src/lib/input/autosize.ts index 3e06a6df104f..f6bb2aacfc6a 100644 --- a/src/lib/input/autosize.ts +++ b/src/lib/input/autosize.ts @@ -15,27 +15,21 @@ import {Directive, ElementRef, Input, OnInit} from '@angular/core'; }, }) export class MdTextareaAutosize implements OnInit { - /** Minimum number of rows for this textarea. */ + /** @deprecated Use mdAutosizeMinRows */ @Input() minRows: number; - get mdAutosizeMinRows(): number { - return this.minRows; - } - - @Input() set mdAutosizeMinRows(value: number) { - this.minRows = value; - } + /** Minimum number of rows for this textarea. */ + @Input() + get mdAutosizeMinRows(): number { return this.minRows; } + set mdAutosizeMinRows(value: number) { this.minRows = value; } - /** Maximum number of rows for this textarea. */ + /** @deprecated Use mdAutosizeMaxRows */ @Input() maxRows: number; - get mdAutosizeMaxRows(): number { - return this.maxRows; - } - - @Input() set mdAutosizeMaxRows(value: number) { - this.maxRows = value; - } + /** Minimum number of rows for this textarea. */ + @Input() + get mdAutosizeMaxRows(): number { return this.maxRows; } + set mdAutosizeMaxRows(value: number) { this.maxRows = value; } /** Cached height of a textarea with a single row. */ private _cachedLineHeight: number; diff --git a/src/lib/input/input-container.ts b/src/lib/input/input-container.ts index 8661b2719d1b..7df88b4de348 100644 --- a/src/lib/input/input-container.ts +++ b/src/lib/input/input-container.ts @@ -58,7 +58,7 @@ let nextUniqueId = 0; export class MdPlaceholder {} -/** The hint directive, used to tag content as hint labels (going under the input). */ +/** Hint text to be shown underneath the input. */ @Directive({ selector: 'md-hint, mat-hint', host: { @@ -75,7 +75,7 @@ export class MdHint { @Input() id: string = `md-input-hint-${nextUniqueId++}`; } -/** Directive, used to display a single error message under the input. */ +/** Single error message to be shown underneath the input. */ @Directive({ selector: 'md-error, mat-error', host: { @@ -84,21 +84,21 @@ export class MdHint { }) export class MdErrorDirective { } -/** The input prefix. */ +/** Prefix to be placed the the front of the input. */ @Directive({ selector: '[mdPrefix], [matPrefix], [md-prefix]' }) export class MdPrefix {} -/** The input suffix. */ +/** Suffix to be placed at the end of the input. */ @Directive({ selector: '[mdSuffix], [matSuffix], [md-suffix]' }) export class MdSuffix {} -/** The input directive, used to mark the input that `MdInputContainer` is wrapping. */ +/** Marker for the input element that `MdInputContainer` is wrapping. */ @Directive({ selector: `input[mdInput], textarea[mdInput], input[matInput], textarea[matInput]`, host: { @@ -252,8 +252,7 @@ export class MdInputDirective { /** - * Component that represents a text input. It encapsulates the HTMLElement and - * improve on its behaviour, along with styling it according to the Material Design. + * Container for text inputs that applies Material Design styling and behavior. */ @Component({ moduleId: module.id, diff --git a/src/lib/radio/radio.md b/src/lib/radio/radio.md index 776f7c758a0a..cdb711acea72 100644 --- a/src/lib/radio/radio.md +++ b/src/lib/radio/radio.md @@ -1,9 +1,9 @@ -`` provides the same functionality as a native `` enhanced with +`` provides the same functionality as a native `` enhanced with Material Design styling and animations. -All radio buttons with the same `name` comprise a set from which only one may be selected at a time. +All radio-buttons with the same `name` comprise a set from which only one may be selected at a time. ### Radio-button label The radio-button label is provided as the content to the `` element. The label can be @@ -18,7 +18,7 @@ specify an appropriate label. ### Radio groups Radio-buttons should typically be placed inside of an `` unless the DOM structure -would make that impossible (e.g., radio buttons inside of table cells). The radio-group has a +would make that impossible (e.g., radio-buttons inside of table cells). The radio-group has a `value` property that reflects the currently selected radio-button inside of the group. Individual radio-buttons inside of a radio-group will inherit the `name` of the group. diff --git a/tools/dgeni/templates/class.template.html b/tools/dgeni/templates/class.template.html index b40c52021b82..5ad1b3979f36 100644 --- a/tools/dgeni/templates/class.template.html +++ b/tools/dgeni/templates/class.template.html @@ -1,4 +1,6 @@ -

{$ class.name $}

+

+ {$ class.name $} +

{$ class.description $}

{%- if class.directiveExportAs -%} diff --git a/tools/dgeni/templates/componentGroup.template.html b/tools/dgeni/templates/componentGroup.template.html index 40405c649f3b..287b980f0c7c 100644 --- a/tools/dgeni/templates/componentGroup.template.html +++ b/tools/dgeni/templates/componentGroup.template.html @@ -19,30 +19,36 @@ {% include 'class.template.html' %} {% endmacro %} -

{$ doc.name $}

-

- Module: {$ doc.ngModule.name $} -

- - -{%- if doc.services.length -%} -

Services

- {% for service in doc.services %} - {$ class(service) $} - {% endfor %} -{%- endif -%} - - -{%- if doc.directives.length -%} -

Directives

- {% for directive in doc.directives %} - {$ class(directive) $} - {% endfor %} -{%- endif -%} - -{%- if doc.additionalClasses.length -%} -

Additional classes

- {% for other in doc.additionalClasses %} - {$ class(other) $} - {% endfor %} -{%- endif -%} +
+

+ API reference for Angular Material {$ doc.name $} +

+ +

+ + import {{$ doc.ngModule.name $}} from '@angular/material'; + +

+ + {%- if doc.services.length -%} +

Services

+ {% for service in doc.services %} + {$ class(service) $} + {% endfor %} + {%- endif -%} + + + {%- if doc.directives.length -%} +

Directives

+ {% for directive in doc.directives %} + {$ class(directive) $} + {% endfor %} + {%- endif -%} + + {%- if doc.additionalClasses.length -%} +

Additional classes

+ {% for other in doc.additionalClasses %} + {$ class(other) $} + {% endfor %} + {%- endif -%} +
diff --git a/tools/dgeni/templates/method-list.template.html b/tools/dgeni/templates/method-list.template.html index f48d604f880b..04c5ea51de62 100644 --- a/tools/dgeni/templates/method-list.template.html +++ b/tools/dgeni/templates/method-list.template.html @@ -1,5 +1,5 @@ {%- if methodList.length -%} -

Methods

+
Methods
{% for m in methodList %} {$ method(m) $} {% endfor %} diff --git a/tools/dgeni/templates/property-list.template.html b/tools/dgeni/templates/property-list.template.html index d22b7e60aa59..0a54b03a629d 100644 --- a/tools/dgeni/templates/property-list.template.html +++ b/tools/dgeni/templates/property-list.template.html @@ -1,5 +1,5 @@ {%- if propertyList.length -%} -

Properties

+
Properties
diff --git a/tools/gulp/tasks/docs.ts b/tools/gulp/tasks/docs.ts index 00b0a40bf274..efc95961d346 100644 --- a/tools/gulp/tasks/docs.ts +++ b/tools/gulp/tasks/docs.ts @@ -41,7 +41,9 @@ const MARKDOWN_TAGS_TO_CLASS_ALIAS = [ 'td', 'th', 'tr', - 'ul' + 'ul', + 'pre', + 'code', ]; task('docs', ['markdown-docs', 'highlight-docs', 'api-docs', 'minify-html-docs']); @@ -95,12 +97,12 @@ task('minify-html-docs', ['api-docs'], () => { function transformMarkdownFiles(buffer: Buffer, file: any): string { let content = buffer.toString('utf-8'); - /* Replace comments with HTML elements. */ + // Replace comments with HTML elements. content = content.replace(EXAMPLE_PATTERN, (match: string, name: string) => `
` ); - /* Replaces the URL in anchor elements inside of compiled markdown files. */ + // Replace the URL in anchor elements inside of compiled markdown files. content = content.replace(LINK_PATTERN, (match: string, head: string, link: string) => // The head is the first match of the RegExp and is necessary to ensure that the RegExp matches // an anchor element. The head will be then used to re-create the existing anchor element. @@ -108,7 +110,8 @@ function transformMarkdownFiles(buffer: Buffer, file: any): string { `${head} href="${fixMarkdownDocLinks(link, file.path)}"` ); - return content; + // Finally, wrap the entire generated in a doc in a div with a specific class. + return `
${content}
`; } /** Fixes paths in the markdown files to work in the material-docs-io. */
Name