Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit eb2f2f8

Browse files
rschmuklerajoslin
authored andcommitted
refactor(): switch to md-prefixed attributes for non-html5 attrs
Closes #657. BREAKING CHANGE: All non-html5-standard component attributes are now prefixed with `md-`. Migration instructions: * **button**: - `<md-button noink>` to `<md-button md-no-ink>` * **divider**: - `<md-divider inset>` to `<md-divider md-inset>` * **linearProgress*: - `<md-linear-progress secondary-value="someValue">` to `<md-linear-progress md-buffer-value="someValue">` - `<md-linear-progress mode="query">` to `<md-linear-progress md-mode="query">`. * **circularProgress**: - `<md-circular-progress mode="query">` to `<md-circular-progress md-mode="query">`. - `<md-circular-progress diameter="60">` to `<md-circular-progress md-diameter="60">`. * **sidenav**: - `<md-sidenav is-open="isOpen">` to `<md-sidenav md-is-open="isOpen">` - `<md-sidenav is-locked-open="isLockedOpen">` to `<md-sidenav md-is-locked-open="isLockedOpen>` - `<md-sidenav component-id="my-sidenav">` to `<md-sidenav md-component-id="my-sidenav>` * **tabs**: - `<md-tabs md-selected="selectedIndex">` to `<md-tabs md-md-selected="selectedIndex">` - `<md-tabs on-select="doSomething()">` to `<md-tabs md-on-select="doSomething()">` - `<md-tabs on-deselect="doSomething()">` to `<md-tabs md-on-deselect="doSomething()">` - `<md-tabs><md-tab active="tabIsActive"></md-tab></md-tabs>` to `<md-tabs><md-tab md-active="tabIsActive"></md-tab></md-tabs>` * **textFloat**: - `<md-text-float fid="someId">` to `<md-text-float md-fid="someId">`
1 parent 2451f2e commit eb2f2f8

43 files changed

Lines changed: 172 additions & 173 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/config/template/index.template.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
<md-sidenav layout="vertical"
1818
class="md-sidenav-left md-whiteframe-z2"
19-
component-id="left"
20-
is-locked-open="$media('md')">
19+
md-component-id="left"
20+
md-is-locked-open="$media('md')">
2121

2222
<md-toolbar class="md-medium-tall">
2323
<h1 class="md-toolbar-tools" style="padding-top:25px;">

src/components/button/button.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ angular.module('material.components.button', [
2626
* If you supply a `href` or `ng-href` attribute, it will become an `<a>` element. Otherwise, it will
2727
* become a `<button>` element.
2828
*
29-
* @param {boolean=} noink If present, disable ripple ink effects.
29+
* @param {boolean=} mdNoInk If present, disable ripple ink effects.
3030
* @param {boolean=} disabled If present, disable selection.
31-
* @param {string=} aria-label Publish the button label used by screen-readers for accessibility. Defaults to the button's text.
31+
* @param {string=} ariaLabel Publish the button label used by screen-readers for accessibility. Defaults to the button's text.
3232
*
3333
* @usage
3434
* <hljs lang="html">

src/components/button/demoBasicUsage/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<section layout="vertical" layout-sm="horizontal" layout-align="center center">
66
<md-button>{{title1}}</md-button>
7-
<md-button noink class="md-primary">Primary (noink)</md-button>
7+
<md-button md-no-ink class="md-primary">Primary (md-noink)</md-button>
88
<md-button ng-disabled="isDisabled" class="md-primary">Disabled</md-button>
99
<md-button class="md-warn" ng-click="isDisabled = !isDisabled">{{title4}}</md-button>
1010
<div class="label">flat</div>

src/components/checkbox/checkbox.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ angular.module('material.components.checkbox', [
2525
* @param {expression=} ngTrueValue The value to which the expression should be set when selected.
2626
* @param {expression=} ngFalseValue The value to which the expression should be set when not selected.
2727
* @param {string=} ngChange Angular expression to be executed when input changes due to user interaction with the input element.
28-
* @param {boolean=} noink Use of attribute indicates use of ripple ink effects
28+
* @param {boolean=} mdNoInk Use of attribute indicates use of ripple ink effects
2929
* @param {boolean=} disabled Use of attribute indicates the switch is disabled: no ink effects and not selectable
3030
* @param {string=} ariaLabel Publish the button label used by screen-readers for accessibility. Defaults to the checkbox's text.
3131
*
@@ -35,7 +35,7 @@ angular.module('material.components.checkbox', [
3535
* Finished ?
3636
* </md-checkbox>
3737
*
38-
* <md-checkbox noink ng-model="hasInk" aria-label="No Ink Effects">
38+
* <md-checkbox md-no-ink ng-model="hasInk" aria-label="No Ink Effects">
3939
* No Ink Effects
4040
* </md-checkbox>
4141
*
@@ -56,7 +56,7 @@ function MdCheckboxDirective(inputDirective, $mdInkRipple, $mdAria, $mdConstant,
5656
transclude: true,
5757
require: '?ngModel',
5858
template:
59-
'<div class="md-container" ink-ripple="checkbox">' +
59+
'<div class="md-container" md-ink-ripple="checkbox">' +
6060
'<div class="md-icon"></div>' +
6161
'</div>' +
6262
'<div ng-transclude class="md-label"></div>',

src/components/checkbox/demoBasicUsage/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
Checkbox (Disabled, Checked)
1818
</md-checkbox>
1919

20-
<md-checkbox noink aria-label="Checkbox No Ink">
20+
<md-checkbox md-no-ink aria-label="Checkbox No Ink">
2121
Checkbox (No Ink)
2222
</md-checkbox>
2323

src/components/divider/_divider.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ md-divider {
33
border-top: 1px solid;
44
margin: 0;
55

6-
&[inset] {
6+
&[md-inset] {
77
margin-left: $baseline-grid * 10;
88
}
99
}

src/components/divider/demoBasicUsage/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ <h4>{{item.who}}</h4>
4444
</p>
4545
</div>
4646
</md-item-content>
47-
<md-divider inset ng-if="!$last"></md-divider>
47+
<md-divider md-inset ng-if="!$last"></md-divider>
4848
</md-item>
4949
</md-list>
5050
</md-content>

src/components/divider/divider.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ function MdDividerController(){}
2222
* @description
2323
* Dividers group and separate content within lists and page layouts using strong visual and spatial distinctions. This divider is a thin rule, lightweight enough to not distract the user from content.
2424
*
25-
* @param {boolean=} inset Add this attribute to activate the inset divider style.
25+
* @param {boolean=} mdInset Add this attribute to activate the inset divider style.
2626
* @usage
2727
* <hljs lang="html">
2828
* <md-divider></md-divider>
2929
*
30-
* <md-divider inset></md-divider>
30+
* <md-divider md-inset></md-divider>
3131
* </hljs>
3232
*
3333
*/

src/components/progressCircular/_progressCircular.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ md-progress-circular {
4848
border-radius: 50%;
4949
}
5050

51-
&[mode=indeterminate] {
51+
&[md-mode=indeterminate] {
5252
.md-wrapper1, .md-wrapper2 {
5353
transform-origin: 50% 50%;
5454
}

src/components/progressCircular/demoBasicUsage/index.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,24 @@
33
<h4 style="margin-top:10px">Determinate</h4>
44
<p>For operations where the percentage of the operation completed can be determined, use a determinate indicator. They give users a quick sense of how long an operation will take.</p>
55
<div layout="vertical" layout-sm="horizontal" layout-align="space-around">
6-
<md-progress-circular mode="determinate" value="{{determinateValue}}"></md-progress-circular>
6+
<md-progress-circular md-mode="determinate" value="{{determinateValue}}"></md-progress-circular>
77
</div>
88

99
<h4>Indeterminate</h4>
1010
<p>For operations where the user is asked to wait a moment while something finishes up, and it’s not necessary to expose what's happening behind the scenes and how long it will take, use an indeterminate indicator.</p>
1111
<div layout="vertical" layout-sm="horizontal" layout-align="space-around">
12-
<md-progress-circular mode="indeterminate"></md-progress-circular>
12+
<md-progress-circular md-mode="indeterminate"></md-progress-circular>
1313
</div>
1414

1515
<h4>Theming</h4>
1616

1717
<div layout="vertical" layout-sm="horizontal" layout-align="space-around">
18-
<md-progress-circular md-theme="red" mode="indeterminate"></md-progress-circular>
19-
<md-progress-circular md-theme="lime" mode="indeterminate"></md-progress-circular>
20-
<md-progress-circular md-theme="orange" mode="indeterminate"></md-progress-circular>
21-
<md-progress-circular md-theme="light-green" mode="indeterminate"></md-progress-circular>
22-
<md-progress-circular md-theme="blue" mode="indeterminate"></md-progress-circular>
23-
<md-progress-circular md-theme="purple" mode="indeterminate"></md-progress-circular>
18+
<md-progress-circular md-theme="red" md-mode="indeterminate"></md-progress-circular>
19+
<md-progress-circular md-theme="lime" md-mode="indeterminate"></md-progress-circular>
20+
<md-progress-circular md-theme="orange" md-mode="indeterminate"></md-progress-circular>
21+
<md-progress-circular md-theme="light-green" md-mode="indeterminate"></md-progress-circular>
22+
<md-progress-circular md-theme="blue" md-mode="indeterminate"></md-progress-circular>
23+
<md-progress-circular md-theme="purple" md-mode="indeterminate"></md-progress-circular>
2424
</div>
2525

2626
</div>

0 commit comments

Comments
 (0)