├── src ├── components │ ├── icon │ │ ├── README.md │ │ ├── icon.spec.js │ │ ├── module.json │ │ ├── demo1 │ │ │ ├── script.js │ │ │ └── index.html │ │ ├── _icon.scss │ │ └── icon.js │ ├── content │ │ ├── content.spec.js │ │ ├── README.md │ │ ├── demo1 │ │ │ └── script.js │ │ ├── module.json │ │ ├── _content.scss │ │ └── content.js │ ├── form │ │ ├── README.md │ │ ├── module.json │ │ ├── demo1 │ │ │ ├── script.js │ │ │ └── index.html │ │ ├── _form.scss │ │ ├── form.spec.js │ │ └── form.js │ ├── whiteframe │ │ ├── README.md │ │ ├── whiteframe.js │ │ ├── demo1 │ │ │ ├── style.css │ │ │ └── index.html │ │ ├── module.json │ │ └── _whiteframe.scss │ ├── tabs │ │ ├── demos │ │ │ ├── demo5 │ │ │ │ ├── angular.tmpl.html │ │ │ │ ├── material.tmpl.html │ │ │ │ ├── polymer.tmpl.html │ │ │ │ ├── index.html │ │ │ │ ├── script.js │ │ │ │ └── style.css │ │ │ ├── demo3 │ │ │ │ ├── style.css │ │ │ │ ├── index.html │ │ │ │ └── script.js │ │ │ ├── demo4 │ │ │ │ ├── style.css │ │ │ │ ├── script.js │ │ │ │ └── index.html │ │ │ ├── demo2 │ │ │ │ ├── script.js │ │ │ │ └── index.html │ │ │ └── demo1 │ │ │ │ ├── script.js │ │ │ │ └── index.html │ │ ├── README.md │ │ ├── module.json │ │ ├── tabs.spec.js │ │ ├── _tabs.scss │ │ └── util │ │ │ └── digestConnector.js │ ├── checkbox │ │ ├── demo1 │ │ │ ├── style.css │ │ │ ├── script.js │ │ │ └── index.html │ │ ├── README.md │ │ ├── module.json │ │ ├── _checkbox.scss │ │ └── checkbox.js │ ├── slider │ │ ├── demo1 │ │ │ ├── style.css │ │ │ ├── script.js │ │ │ └── index.html │ │ ├── README.md │ │ ├── slider.spec.js │ │ ├── module.json │ │ ├── slider.js │ │ └── _slider.scss │ ├── card │ │ ├── README.md │ │ ├── demo1 │ │ │ ├── style.css │ │ │ ├── script.js │ │ │ └── index.html │ │ ├── card.spec.js │ │ ├── module.json │ │ ├── _card.scss │ │ └── card.js │ ├── radioButton │ │ ├── demo1 │ │ │ ├── style.css │ │ │ ├── script.js │ │ │ └── index.html │ │ ├── README.md │ │ ├── module.json │ │ └── _radio-button.scss │ ├── buttons │ │ ├── README.md │ │ ├── demo1 │ │ │ ├── script.js │ │ │ └── style.css │ │ ├── module.json │ │ └── buttons.js │ ├── dialog │ │ ├── demo1 │ │ │ ├── style.css │ │ │ ├── index.html │ │ │ ├── script.js │ │ │ └── my-dialog.tmpl.html │ │ ├── README.md │ │ ├── module.json │ │ └── _dialog.scss │ ├── toolbar │ │ ├── README.md │ │ ├── toolbar.spec.js │ │ ├── demo2 │ │ │ ├── style.css │ │ │ ├── script.js │ │ │ └── index.html │ │ ├── module.json │ │ ├── demo1 │ │ │ ├── script.js │ │ │ └── index.html │ │ └── _toolbar.scss │ ├── list │ │ ├── README.md │ │ ├── demo1 │ │ │ ├── style.css │ │ │ ├── index.html │ │ │ └── script.js │ │ ├── module.json │ │ ├── list.spec.js │ │ ├── _list.scss │ │ └── list.js │ ├── sidenav │ │ ├── README.md │ │ ├── module.json │ │ ├── demo1 │ │ │ ├── script.js │ │ │ └── index.html │ │ ├── _sidenav.scss │ │ └── sidenav.spec.js │ ├── toast │ │ ├── README.md │ │ ├── demo1 │ │ │ ├── toast-template.html │ │ │ ├── index.html │ │ │ └── script.js │ │ ├── module.json │ │ ├── _toast.scss │ │ └── toast.spec.js │ ├── divider │ │ └── _divider.scss │ ├── animate │ │ ├── _effects.scss │ │ └── noEffect.js │ └── backdrop │ │ └── _backdrop.scss ├── theme │ ├── _theme.scss │ ├── _fonts.scss │ └── _utils.scss ├── base │ ├── _table.scss │ ├── _structure.scss │ └── utils.js ├── main.scss └── services │ ├── registry │ ├── registry.spec.js │ └── registry.js │ ├── attrBind │ └── attrBind.js │ └── compiler │ └── compiler.spec.js ├── .jshintrc ├── docs ├── templates │ ├── demo │ │ ├── template.file │ │ └── template.index.html │ ├── template.json │ ├── component.template.html │ ├── ngdoc │ │ ├── api │ │ │ ├── type.template.html │ │ │ ├── function.template.html │ │ │ ├── provider.template.html │ │ │ ├── service.template.html │ │ │ ├── input.template.html │ │ │ ├── object.template.html │ │ │ ├── componentGroup.template.html │ │ │ ├── filter.template.html │ │ │ ├── api.template.html │ │ │ ├── directive.template.html │ │ │ └── module.template.html │ │ ├── base.template.html │ │ ├── lib │ │ │ ├── returns.template.html │ │ │ ├── this.template.html │ │ │ ├── properties.template.html │ │ │ ├── params.template.html │ │ │ ├── methods.template.html │ │ │ ├── events.template.html │ │ │ └── macros.html │ │ └── overview.template.html │ ├── components-data.template.js │ └── readme.template.html ├── app │ ├── favicon.ico │ ├── img │ │ ├── bg9.jpg │ │ ├── angular.png │ │ ├── docArrow.png │ │ ├── list │ │ │ └── 60.jpeg │ │ ├── washedout.png │ │ ├── bgWhitePaper.jpg │ │ ├── testimonials │ │ │ ├── quote.png │ │ │ ├── logo-bradgreen@2x.png │ │ │ ├── logo-maxlynch@2x.png │ │ │ ├── logo-bradgreen@2x.fw.png │ │ │ ├── logo-maxlynch@2x.fw.png │ │ │ ├── testimonial-holly@2x.png │ │ │ ├── testimonial-james@2x.png │ │ │ ├── logo-thomasburleson@2x.png │ │ │ └── testimonial-hampton@2x.png │ │ └── icons │ │ │ ├── separator.svg │ │ │ ├── ic_play_arrow_24px.svg │ │ │ ├── ic_chevron_right_24px.svg │ │ │ ├── ic_arrow_back_24px.svg │ │ │ ├── ic_menu_24px.svg │ │ │ ├── ic_label_24px.svg │ │ │ ├── ic_photo_24px.svg │ │ │ ├── ic_insert_drive_file_24px.svg │ │ │ ├── ic_launch_24px.svg │ │ │ ├── ic_comment_24px.svg │ │ │ ├── ic_refresh_24px.svg │ │ │ ├── ic_more_vert_24px.svg │ │ │ ├── ic_visibility_24px.svg │ │ │ ├── ic_access_time_24px.svg │ │ │ └── ic_people_24px.svg │ ├── demo │ │ └── layout │ │ │ ├── flex-cell.html │ │ │ ├── horizontal-vertical-layout.html │ │ │ ├── full-width-header-menu-footer.html │ │ │ ├── layout-order.html │ │ │ ├── utility-attributes.html │ │ │ ├── layout-padding-percents.html │ │ │ ├── keylines.html │ │ │ ├── layout-padding.html │ │ │ └── layout-padding-offsets.html │ ├── template │ │ ├── home.tmpl.html │ │ ├── view-source.tmpl.html │ │ ├── layout-options.tmpl.html │ │ └── layout-container.tmpl.html │ ├── js │ │ └── highlight-angular.js │ └── css │ │ └── highlightjs-github.css ├── tag-defs │ └── index.js ├── README.md ├── index.js ├── processors │ └── jsdoc.js └── file-readers │ └── json.js ├── .gitmodules ├── .gitignore ├── .travis.yml ├── watch-hook.sh ├── scripts ├── npm.sh └── release.sh ├── start-hook.sh ├── bower.json ├── config ├── karma.conf.js └── build.config.js ├── package.json ├── LICENSE └── README.md /src/components/icon/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/components/content/content.spec.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/components/form/README.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/components/whiteframe/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "expr": true 3 | } 4 | -------------------------------------------------------------------------------- /docs/templates/demo/template.file: -------------------------------------------------------------------------------- 1 | {$ doc.content $} 2 | -------------------------------------------------------------------------------- /docs/templates/template.json: -------------------------------------------------------------------------------- 1 | {$ doc.content | json $} 2 | -------------------------------------------------------------------------------- /docs/templates/component.template.html: -------------------------------------------------------------------------------- 1 | {{currentComponent.name}} 2 | -------------------------------------------------------------------------------- /src/components/tabs/demos/demo5/angular.tmpl.html: -------------------------------------------------------------------------------- 1 |

Angular

2 | -------------------------------------------------------------------------------- /src/components/tabs/demos/demo5/material.tmpl.html: -------------------------------------------------------------------------------- 1 |

Material

2 | -------------------------------------------------------------------------------- /src/components/tabs/demos/demo5/polymer.tmpl.html: -------------------------------------------------------------------------------- 1 |

Polymer

2 | -------------------------------------------------------------------------------- /src/components/checkbox/demo1/style.css: -------------------------------------------------------------------------------- 1 | 2 | body { 3 | padding: 20px; 4 | } 5 | -------------------------------------------------------------------------------- /src/components/slider/demo1/style.css: -------------------------------------------------------------------------------- 1 | 2 | body { 3 | padding: 20px; 4 | } 5 | -------------------------------------------------------------------------------- /docs/templates/ngdoc/api/type.template.html: -------------------------------------------------------------------------------- 1 | {% extends "api/object.template.html" %} 2 | -------------------------------------------------------------------------------- /src/components/card/README.md: -------------------------------------------------------------------------------- 1 | Cards, created with the `` directive. 2 | -------------------------------------------------------------------------------- /src/components/card/demo1/style.css: -------------------------------------------------------------------------------- 1 | 2 | material-card { 3 | min-height: 150px; 4 | } -------------------------------------------------------------------------------- /src/components/radioButton/demo1/style.css: -------------------------------------------------------------------------------- 1 | 2 | body { 3 | padding: 20px; 4 | } 5 | -------------------------------------------------------------------------------- /docs/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/material/master/docs/app/favicon.ico -------------------------------------------------------------------------------- /docs/app/img/bg9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/material/master/docs/app/img/bg9.jpg -------------------------------------------------------------------------------- /docs/templates/ngdoc/api/function.template.html: -------------------------------------------------------------------------------- 1 | {% extends "api/object.template.html" %} 2 | -------------------------------------------------------------------------------- /src/components/buttons/README.md: -------------------------------------------------------------------------------- 1 | Buttons, created with the `` directive. 2 | -------------------------------------------------------------------------------- /src/components/card/card.spec.js: -------------------------------------------------------------------------------- 1 | describe('materialCard directive', function() { 2 | }); 3 | -------------------------------------------------------------------------------- /src/components/icon/icon.spec.js: -------------------------------------------------------------------------------- 1 | describe('materialIcon directive', function() { 2 | }); 3 | -------------------------------------------------------------------------------- /src/components/dialog/demo1/style.css: -------------------------------------------------------------------------------- 1 | .full { 2 | width: 100%; 3 | height: 100%; 4 | } 5 | -------------------------------------------------------------------------------- /src/components/toolbar/README.md: -------------------------------------------------------------------------------- 1 | Toolbars, created using the `` directive. 2 | -------------------------------------------------------------------------------- /src/components/whiteframe/whiteframe.js: -------------------------------------------------------------------------------- 1 | angular.module('material.components.whiteframe', []); 2 | -------------------------------------------------------------------------------- /docs/app/img/angular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/material/master/docs/app/img/angular.png -------------------------------------------------------------------------------- /docs/app/img/docArrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/material/master/docs/app/img/docArrow.png -------------------------------------------------------------------------------- /docs/app/img/list/60.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/material/master/docs/app/img/list/60.jpeg -------------------------------------------------------------------------------- /src/components/checkbox/README.md: -------------------------------------------------------------------------------- 1 | Checkboxes, created with the `` directive. 2 | -------------------------------------------------------------------------------- /src/components/toolbar/toolbar.spec.js: -------------------------------------------------------------------------------- 1 | describe('materialToolbar directive', function() { 2 | }); 3 | -------------------------------------------------------------------------------- /docs/app/img/washedout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/material/master/docs/app/img/washedout.png -------------------------------------------------------------------------------- /src/components/dialog/README.md: -------------------------------------------------------------------------------- 1 | Provides a dialog overlay, opened using the `$materialDialog` service. 2 | -------------------------------------------------------------------------------- /src/components/slider/README.md: -------------------------------------------------------------------------------- 1 | Simple range sliders, created using the `` directive. 2 | -------------------------------------------------------------------------------- /docs/app/img/bgWhitePaper.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/material/master/docs/app/img/bgWhitePaper.jpg -------------------------------------------------------------------------------- /docs/templates/components-data.template.js: -------------------------------------------------------------------------------- 1 | DocsApp 2 | .constant('COMPONENTS', {$ doc.components | json $}) 3 | -------------------------------------------------------------------------------- /src/theme/_theme.scss: -------------------------------------------------------------------------------- 1 | @import "colors"; 2 | @import "fonts"; 3 | @import "variables"; 4 | @import "utils"; 5 | -------------------------------------------------------------------------------- /src/components/list/README.md: -------------------------------------------------------------------------------- 1 | Lists, created using the `` parent with `` children. 2 | -------------------------------------------------------------------------------- /src/components/sidenav/README.md: -------------------------------------------------------------------------------- 1 | Left and right side navigation, created using the `` directive. 2 | -------------------------------------------------------------------------------- /docs/app/img/testimonials/quote.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/material/master/docs/app/img/testimonials/quote.png -------------------------------------------------------------------------------- /docs/templates/ngdoc/base.template.html: -------------------------------------------------------------------------------- 1 |
2 | {% block content %} 3 | {% endblock %} 4 |
5 | -------------------------------------------------------------------------------- /src/components/content/README.md: -------------------------------------------------------------------------------- 1 | A simple container for scrollable content, using the `` directive. 2 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "material-icons"] 2 | path = material-icons 3 | url = https://github.com/angular/material-icons.git 4 | -------------------------------------------------------------------------------- /docs/tag-defs/index.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | { 3 | name: 'order' 4 | }, 5 | { 6 | name: 'paramType' 7 | } 8 | ]; 9 | -------------------------------------------------------------------------------- /docs/templates/ngdoc/lib/returns.template.html: -------------------------------------------------------------------------------- 1 | {% if doc.returns -%} 2 |

Returns

3 | {$ typeInfo(doc.returns) $} 4 | {%- endif %} -------------------------------------------------------------------------------- /src/components/icon/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "module": "material.components.icon", 3 | "name": "Icon", 4 | "demos": { 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/components/whiteframe/demo1/style.css: -------------------------------------------------------------------------------- 1 | material-whiteframe { 2 | background: #fff; 3 | margin: 20px; 4 | padding: 20px; 5 | } 6 | -------------------------------------------------------------------------------- /src/components/card/demo1/script.js: -------------------------------------------------------------------------------- 1 | 2 | angular.module('app', ['ngMaterial']) 3 | 4 | .controller('AppCtrl', function($scope) { 5 | 6 | }); -------------------------------------------------------------------------------- /src/components/toast/README.md: -------------------------------------------------------------------------------- 1 | Toasts are notifications that can be created on any part of the screen using the `$materialToast` service. 2 | -------------------------------------------------------------------------------- /docs/app/img/testimonials/logo-bradgreen@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/material/master/docs/app/img/testimonials/logo-bradgreen@2x.png -------------------------------------------------------------------------------- /docs/app/img/testimonials/logo-maxlynch@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/material/master/docs/app/img/testimonials/logo-maxlynch@2x.png -------------------------------------------------------------------------------- /src/components/content/demo1/script.js: -------------------------------------------------------------------------------- 1 | 2 | angular.module('app', ['ngMaterial']) 3 | 4 | .controller('AppCtrl', function($scope) { 5 | 6 | }) 7 | -------------------------------------------------------------------------------- /src/components/icon/demo1/script.js: -------------------------------------------------------------------------------- 1 | angular.module('app', ['ngMaterial']) 2 | 3 | .controller('AppCtrl', ['$scope', function($scope) { 4 | }]); 5 | -------------------------------------------------------------------------------- /src/components/radioButton/README.md: -------------------------------------------------------------------------------- 1 | Radio buttons, created using the `` parent with `` children. 2 | -------------------------------------------------------------------------------- /docs/app/img/testimonials/logo-bradgreen@2x.fw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/material/master/docs/app/img/testimonials/logo-bradgreen@2x.fw.png -------------------------------------------------------------------------------- /docs/app/img/testimonials/logo-maxlynch@2x.fw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/material/master/docs/app/img/testimonials/logo-maxlynch@2x.fw.png -------------------------------------------------------------------------------- /docs/app/img/testimonials/testimonial-holly@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/material/master/docs/app/img/testimonials/testimonial-holly@2x.png -------------------------------------------------------------------------------- /docs/app/img/testimonials/testimonial-james@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/material/master/docs/app/img/testimonials/testimonial-james@2x.png -------------------------------------------------------------------------------- /src/components/buttons/demo1/script.js: -------------------------------------------------------------------------------- 1 | 2 | angular.module('app', ['ngMaterial']) 3 | 4 | .controller('AppCtrl', function($scope) { 5 | 6 | }); 7 | -------------------------------------------------------------------------------- /src/components/divider/_divider.scss: -------------------------------------------------------------------------------- 1 | material-divider { 2 | display: block; 3 | border-bottom: 1px solid #d2d2d2; 4 | margin-top: 5px; 5 | } 6 | -------------------------------------------------------------------------------- /src/components/toolbar/demo2/style.css: -------------------------------------------------------------------------------- 1 | .face { 2 | width: 48px; 3 | margin: 16px; 4 | border-radius: 48px; 5 | border: 1px solid #ddd; 6 | } 7 | -------------------------------------------------------------------------------- /docs/app/img/testimonials/logo-thomasburleson@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/material/master/docs/app/img/testimonials/logo-thomasburleson@2x.png -------------------------------------------------------------------------------- /docs/app/img/testimonials/testimonial-hampton@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/siddii/material/master/docs/app/img/testimonials/testimonial-hampton@2x.png -------------------------------------------------------------------------------- /docs/templates/ngdoc/lib/this.template.html: -------------------------------------------------------------------------------- 1 | {% if doc.this %} 2 |

Method's {% code %}this{% endcode %}

3 | {$ doc.this | marked $} 4 | {% endif %} -------------------------------------------------------------------------------- /src/components/list/demo1/style.css: -------------------------------------------------------------------------------- 1 | 2 | .face { 3 | border-radius: 30px; 4 | border: 1px solid #ddd; 5 | width: 48px; 6 | margin: 16px; 7 | } 8 | -------------------------------------------------------------------------------- /docs/templates/ngdoc/overview.template.html: -------------------------------------------------------------------------------- 1 | {% extends "base.template.html" %} 2 | 3 | {% block content %} 4 | {$ doc.description | marked $} 5 | {% endblock %} -------------------------------------------------------------------------------- /src/components/slider/slider.spec.js: -------------------------------------------------------------------------------- 1 | 2 | describe('materialSlider', function() { 3 | 4 | beforeEach(module('material.components.slider')); 5 | 6 | 7 | }); 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | *.sw* 3 | .DS_STORE 4 | .sass-cache/ 5 | bower_components 6 | node_modules 7 | dist 8 | 9 | /.idea/ 10 | /components 11 | /vendor 12 | 13 | .polymer-qp 14 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - '0.10' 4 | 5 | before_script: 6 | - npm install -g bower 7 | - bower install 8 | 9 | script: 10 | - gulp karma --browsers=PhantomJS 11 | -------------------------------------------------------------------------------- /src/components/toast/demo1/toast-template.html: -------------------------------------------------------------------------------- 1 | 2 | Hello there! 3 | 4 | Close 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/components/tabs/demos/demo3/style.css: -------------------------------------------------------------------------------- 1 | .logo { 2 | padding: 10px; 3 | height: 36px; 4 | width: 100%; 5 | } 6 | 7 | .centered { 8 | margin-top: -5px; 9 | padding-left: 48% 10 | } 11 | -------------------------------------------------------------------------------- /watch-hook.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd "$(dirname "$0")" 4 | 5 | # 6 | # spawns the hook, and restarts it if it goes down 7 | # 8 | # See: https://github.com/nodejitsu/forever 9 | # 10 | forever start -c bash start-hook.sh 11 | -------------------------------------------------------------------------------- /src/components/card/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "module": "material.components.card", 3 | "name": "Card", 4 | "demos": { 5 | "demo1": { 6 | "name": "Card Basic Usage", 7 | "files": ["demo1/*"] 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/components/form/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "module": "material.components.form", 3 | "name": "Form", 4 | "demos": { 5 | "demo1": { 6 | "name": "Form Basic Usage", 7 | "files": ["demo1/*"] 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/components/buttons/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "module": "material.components.button", 3 | "name": "Buttons", 4 | "demos": { 5 | "demo1": { 6 | "name": "Basic Buttons", 7 | "files": ["demo1/*"] 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/components/checkbox/demo1/script.js: -------------------------------------------------------------------------------- 1 | 2 | angular.module('app', ['ngMaterial']) 3 | 4 | .controller('AppCtrl', function($scope) { 5 | 6 | $scope.data = {}; 7 | $scope.data.cb1 = true; 8 | $scope.data.cb2 = false; 9 | 10 | }); -------------------------------------------------------------------------------- /src/components/dialog/demo1/index.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | Open a Dialog 4 | 5 |
6 | -------------------------------------------------------------------------------- /src/components/list/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "module": "material.components.list", 3 | "name": "Lists", 4 | "demos": { 5 | "demo1": { 6 | "name": "List Basic Usage", 7 | "files": ["demo1/*"] 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/components/toast/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "module": "material.components.toast", 3 | "name": "Toast", 4 | "demos": { 5 | "demo1": { 6 | "name": "Toast Basic Usage", 7 | "files": ["demo1/*"] 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/components/dialog/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "module": "material.components.dialog", 3 | "name": "Dialog", 4 | "demos": { 5 | "demo1": { 6 | "name": "Dialog Basic Usage", 7 | "files": ["demo1/*"] 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/components/slider/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "module": "material.components.slider", 3 | "name": "Slider", 4 | "demos": { 5 | "demo1": { 6 | "name": "Slider Basic Usage", 7 | "files": ["demo1/*"] 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/components/content/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "module": "material.components.content", 3 | "name": "Content", 4 | "demos": { 5 | "demo1": { 6 | "name": "Content Basic Usage", 7 | "files": ["demo1/*"] 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/components/slider/demo1/script.js: -------------------------------------------------------------------------------- 1 | 2 | angular.module('app', ['ngMaterial']) 3 | 4 | .controller('AppCtrl', function($scope) { 5 | 6 | $scope.data = { 7 | slider1: 0, 8 | slider2: 50, 9 | slider3: 8, 10 | } 11 | 12 | }); 13 | -------------------------------------------------------------------------------- /src/components/checkbox/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "module": "material.components.checkbox", 3 | "name": "Checkbox", 4 | "demos": { 5 | "demo1": { 6 | "name": "Checkbox Basic Usage", 7 | "files": ["demo1/*"] 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/components/whiteframe/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "module": "material.components.whiteframe", 3 | "name": "Whiteframe", 4 | "demos": { 5 | "demo1": { 6 | "name": "Whiteframe Basic Usage", 7 | "files": ["demo1/*"] 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/components/radioButton/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "module": "material.components.radioButton", 3 | "name": "Radio Button", 4 | "demos": { 5 | "demo1": { 6 | "name": "Radio Button Basic Usage", 7 | "files": ["demo1/*"] 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/components/sidenav/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "module": "material.components.sidenav", 3 | "name": "Side Navigation", 4 | "demos": { 5 | "demo1": { 6 | "name": "Side Navigation Basic Usage", 7 | "files": ["demo1/*"] 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /docs/templates/ngdoc/api/provider.template.html: -------------------------------------------------------------------------------- 1 | {% extends "api/object.template.html" %} 2 | 3 | {% block related_components %} 4 | {% if doc.serviceDoc -%} 5 |
  • 6 | - {$ doc.serviceDoc.name $} 7 |
  • 8 | {%- endif %} 9 | {% endblock %} 10 | -------------------------------------------------------------------------------- /docs/templates/ngdoc/api/service.template.html: -------------------------------------------------------------------------------- 1 | {% extends "api/object.template.html" %} 2 | 3 | {% block related_components %} 4 | {% if doc.providerDoc -%} 5 |
  • 6 | - {$ doc.providerDoc.name $} 7 |
  • 8 | {%- endif %} 9 | {% endblock %} 10 | -------------------------------------------------------------------------------- /scripts/npm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ARG_DEFS=( 4 | "--registry-name=(.*)" 5 | ) 6 | 7 | function prepare { 8 | cd ../ 9 | 10 | NPM_DIR=$PWD/dist/npm-$REGISTRY_NAME 11 | 12 | rm -rf $NPM_DIR 13 | mkdir -p $NPM_DIR 14 | } 15 | 16 | function publish { 17 | } 18 | 19 | source $(dirname $0)/utils.inc 20 | -------------------------------------------------------------------------------- /start-hook.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd "$(dirname "$0")" 4 | 5 | # 6 | # starts a hookshot server that will `git pull` whenever 7 | # GitHub pings us 8 | # 9 | # See: https://github.com/Coreh/hookshot 10 | # 11 | hookshot -p 9010 "git fetch && git reset --hard origin/master && npm install && bower install && gulp docs --release" 12 | -------------------------------------------------------------------------------- /docs/templates/ngdoc/lib/properties.template.html: -------------------------------------------------------------------------------- 1 | {%- if doc.properties %} 2 |

    Properties

    3 |
      4 | {%- for property in doc.properties %} 5 |
    • 6 |

      {$ property.name | code $}

      7 | {$ typeInfo(property) $} 8 |
    • 9 | {% endfor -%} 10 |
    11 | {%- endif -%} 12 | -------------------------------------------------------------------------------- /src/components/toolbar/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "module": "material.components.toolbar", 3 | "name": "Toolbar", 4 | "demos": { 5 | "demo1": { 6 | "name": "Toolbar Basic Usage", 7 | "files": ["demo1/*"] 8 | }, 9 | "demo2": { 10 | "name": "Scroll Shrinking Toolbar", 11 | "files": ["demo2/*"] 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/components/icon/_icon.scss: -------------------------------------------------------------------------------- 1 | 2 | material-icon { 3 | position: relative; 4 | vertical-align: middle; 5 | background-repeat: no-repeat no-repeat; 6 | pointer-events: none; 7 | } 8 | svg, object { 9 | fill: currentColor; 10 | color-fill: currentColor; 11 | } 12 | 13 | material-class-icon { 14 | // display: block; 15 | // margin: 0 auto; 16 | } 17 | -------------------------------------------------------------------------------- /src/components/animate/_effects.scss: -------------------------------------------------------------------------------- 1 | material-ink-bar { 2 | height: 2px; 3 | background: #ffff85; 4 | position: absolute; 5 | margin-top: -2px; 6 | } 7 | 8 | 9 | 10 | canvas.material-ink-ripple { 11 | pointer-events: none; 12 | position: absolute; 13 | top: 0; 14 | left: 0; 15 | } 16 | material-tabs .material-ink-ripple { 17 | color: #f0f495; 18 | } 19 | -------------------------------------------------------------------------------- /src/components/tabs/demos/demo4/style.css: -------------------------------------------------------------------------------- 1 | .tabs-content .material-view { 2 | background-color: blanchedalmond; 3 | } 4 | 5 | div.infoBar input { 6 | display: inline-block; 7 | } 8 | 9 | div.infoBar { 10 | margin-left: 20px; 11 | height: 75px; 12 | font-size: .8em; 13 | } 14 | 15 | 16 | material-tabs .tabs-content { 17 | height: 200px; 18 | } 19 | -------------------------------------------------------------------------------- /docs/templates/ngdoc/lib/params.template.html: -------------------------------------------------------------------------------- 1 | {%- if doc.params %} 2 |
    3 |

    4 | {% if doc.paramType %} 5 | {$ doc.paramType $} 6 | {% elif doc.docType == 'directive' %} 7 | Attributes 8 | {% else %} 9 | Arguments 10 | {% endif %} 11 |

    12 | {$ paramTable(doc.params) $} 13 |
    14 | {%- endif -%} 15 | -------------------------------------------------------------------------------- /src/components/tabs/README.md: -------------------------------------------------------------------------------- 1 | Tabs, created with the `` directive provide *tabbed* navigation with different styles. 2 | 3 | The Tabs component consists of clickable tabs that are aligned horizontally side-by-side. Features include for supports static or dynamic tab creation, a programmatic Tab API, responsive designs, and dynamic transitions through different tab contents. 4 | 5 | -------------------------------------------------------------------------------- /docs/templates/ngdoc/api/input.template.html: -------------------------------------------------------------------------------- 1 | {% include "lib/macros.html" -%} 2 | {% extends "api/directive.template.html" %} 3 | 4 | {% block usage %} 5 | {% code %} 6 | 10 | {% endcode %} 11 | {% endblock %} 12 | -------------------------------------------------------------------------------- /src/components/list/list.spec.js: -------------------------------------------------------------------------------- 1 | describe('materialList directive', function() { 2 | function setup(attrs) { 3 | module('material.components.list'); 4 | var el; 5 | inject(function($compile, $rootScope) { 6 | el = $compile('')($rootScope.$new()); 7 | $rootScope.$apply(); 8 | }); 9 | return el; 10 | } 11 | }); 12 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "material-design", 3 | "version": "0.0.0", 4 | "private": "true", 5 | "dependencies": { 6 | "angular": "^1.3.x", 7 | "angular-animate": "^1.3.x" 8 | }, 9 | "devDependencies": { 10 | "angular-mocks": "^1.3.x", 11 | "angular-route": "1.3.x", 12 | "angularytics": "^0.3.0", 13 | "normalize.scss": "https://github.com/kristerkari/normalize.scss.git" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/base/_table.scss: -------------------------------------------------------------------------------- 1 | 2 | table { 3 | margin-bottom: 20px; 4 | max-width: 100%; 5 | width: 100%; 6 | border-spacing: 0; 7 | border-collapse: collapse; 8 | background-color: transparent; 9 | } 10 | 11 | td, 12 | th { 13 | padding: $baseline-grid ($baseline-grid * 2); 14 | border-top: 1px solid #ddd; 15 | vertical-align: top; 16 | } 17 | 18 | th { 19 | border-bottom: 2px solid #ddd; 20 | vertical-align: bottom; 21 | } 22 | -------------------------------------------------------------------------------- /src/components/toolbar/demo1/script.js: -------------------------------------------------------------------------------- 1 | 2 | angular.module('app', ['ngMaterial']) 3 | 4 | .controller('AppCtrl', function($scope) { 5 | 6 | }) 7 | 8 | .directive('svgIcon', function() { 9 | return { 10 | restrict: 'E', 11 | replace: true, 12 | template: '' 13 | } 14 | }); -------------------------------------------------------------------------------- /src/components/card/_card.scss: -------------------------------------------------------------------------------- 1 | material-card { 2 | display: block; 3 | 4 | box-shadow: $card-box-shadow; 5 | 6 | padding: $card-padding; 7 | margin: $card-margin; 8 | 9 | border-radius: $card-border-radius; 10 | 11 | .material-card-image { 12 | min-width: 100%; 13 | @include calc(width, "100% + #{$card-padding}*2"); 14 | margin-left: -10px; 15 | margin-top: -10px; 16 | border-radius: $card-border-radius $card-border-radius 0 0; 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/components/dialog/demo1/script.js: -------------------------------------------------------------------------------- 1 | angular.module('app', ['ngMaterial']) 2 | 3 | .controller('AppCtrl', function($scope, $materialDialog) { 4 | 5 | $scope.dialog = function(e) { 6 | $materialDialog({ 7 | templateUrl: 'my-dialog.tmpl.html', 8 | targetEvent: e, 9 | controller: ['$scope', '$hideDialog', function($scope, $hideDialog) { 10 | $scope.close = function() { 11 | $hideDialog(); 12 | }; 13 | }] 14 | }); 15 | }; 16 | 17 | }); 18 | -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | Documentation 2 | ------------- 3 | 4 | Uses [dgeni](http://github.com/angular/dgeni), the wonderful documentation generator built by [@petebacondarwin](https://github.com/petebacondarwin). 5 | 6 | To view docs: 7 | 8 | 1. `gulp docs`, which builds the docs to `dist/docs` 9 | 2. `cd dist/docs` and start an http server (e.g. `python -m SimpleHTTPServer`) 10 | 3. Navigate to the server, and enjoy (e.g. http://localhost:8000) 11 | 12 | Run `gulp watch` to watch and rebuild docs on every save. 13 | -------------------------------------------------------------------------------- /src/components/tabs/demos/demo5/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
    4 | 5 |
    6 | 7 | 8 | 10 | 11 | 12 | 13 | 14 | 15 |
    16 | 17 |
    18 | -------------------------------------------------------------------------------- /src/components/content/_content.scss: -------------------------------------------------------------------------------- 1 | material-content, 2 | .material-content { 3 | display: block; 4 | 5 | overflow: auto; 6 | -webkit-overflow-scrolling: touch; 7 | 8 | &[scroll-y] { 9 | overflow-y: auto; 10 | overflow-x: hidden; 11 | } 12 | &[scroll-x] { 13 | overflow-x: auto; 14 | overflow-y: hidden; 15 | } 16 | &[scroll-xy] { 17 | } 18 | 19 | &.material-content-padding { 20 | padding: 20px; 21 | } 22 | 23 | > .material-content { 24 | height: 100%; 25 | width: 100%; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/components/checkbox/demo1/index.html: -------------------------------------------------------------------------------- 1 | 2 |
    3 | 4 | 5 | Checkbox 1: {{ data.cb1 }} 6 | 7 | 8 | 9 | Checkbox 2: {{ data.cb2 }} 10 | 11 | 12 | 13 | Checkbox (Disabled) 14 | 15 | 16 | 17 | Checkbox (No Ink) 18 | 19 | 20 |
    21 | -------------------------------------------------------------------------------- /src/components/form/demo1/script.js: -------------------------------------------------------------------------------- 1 | 2 | angular.module('app', ['ngMaterial']) 3 | 4 | .controller('AppCtrl', function($scope) { 5 | $scope.data = {}; 6 | }) 7 | 8 | .directive('ig', function() { 9 | return { 10 | restrict: 'E', 11 | replace: true, 12 | scope: { 13 | fid: '@' 14 | }, 15 | template: 16 | '' + 17 | '' + 18 | '' + 19 | '' 20 | }; 21 | }); 22 | -------------------------------------------------------------------------------- /src/components/tabs/demos/demo3/index.html: -------------------------------------------------------------------------------- 1 | 2 |
    3 | 4 | 5 | 10 | 11 | {{tab.title}} 12 | 13 | 14 | 15 |
    16 | -------------------------------------------------------------------------------- /src/components/backdrop/_backdrop.scss: -------------------------------------------------------------------------------- 1 | material-backdrop { 2 | z-index: $z-index-backdrop; 3 | background-color: rgba(0,0,0,0); 4 | 5 | position: absolute; 6 | left: 0; 7 | top: 0; 8 | right: 0; 9 | bottom: 0; 10 | 11 | &.opaque { 12 | background-color: rgba(0,0,0,0.4); 13 | } 14 | 15 | @include transition(all 0.2s ease-out); 16 | 17 | &.ng-enter { 18 | @include transition-delay(0.1s); 19 | } 20 | &.ng-enter, 21 | &.ng-leave.ng-leave-active { 22 | opacity: 0; 23 | } 24 | &.ng-leave, 25 | &.ng-enter.ng-enter-active { 26 | opacity: 1; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/components/buttons/demo1/style.css: -------------------------------------------------------------------------------- 1 | 2 | /** From vulcanized demo **/ 3 | 4 | section { 5 | background: #f7f7f7; 6 | border-radius: 3px; 7 | text-align: center; 8 | margin: 1em; 9 | position: relative !important; 10 | padding-bottom: 10px; 11 | } 12 | material-content { 13 | margin-right: 7px; 14 | } 15 | section material-button, 16 | section .material-button { 17 | display: block; 18 | width: 10em; 19 | margin: 1em; 20 | line-height: 25px; 21 | } 22 | .label { 23 | position: absolute; 24 | bottom: 5px; 25 | left: 7px; 26 | color: #ccc; 27 | font-size: 14px; 28 | } 29 | 30 | -------------------------------------------------------------------------------- /src/components/slider/demo1/index.html: -------------------------------------------------------------------------------- 1 | 2 |
    3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |

    Slider 1: {{ data.slider1 }}

    17 |

    Slider 2: {{ data.slider2 }}

    18 |

    Slider 3: {{ data.slider3 }}

    19 | 20 |
    21 | -------------------------------------------------------------------------------- /docs/app/img/icons/separator.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/components/toolbar/demo2/script.js: -------------------------------------------------------------------------------- 1 | var app = angular.module('myApp', ['ngMaterial']); 2 | 3 | app.controller('AppCtrl', function($scope) { 4 | var item = { 5 | face: '/img/list/60.jpeg', 6 | what: 'Brunch this weekend?', 7 | who: 'Min Li Chan', 8 | notes: "I'll be in your neighborhood doing errands." 9 | }; 10 | $scope.todos = []; 11 | for (var i = 0; i < 15; i++) { 12 | $scope.todos.push({ 13 | face: '/img/list/60.jpeg', 14 | what: "Brunch this weekend?", 15 | who: "Min Li Chan", 16 | notes: "I'll be in your neighborhood doing errands." 17 | }); 18 | } 19 | }); 20 | -------------------------------------------------------------------------------- /src/components/list/demo1/index.html: -------------------------------------------------------------------------------- 1 | 2 |
    3 | 4 | 5 | 6 | 7 | 8 |
    9 | 10 |
    11 |
    12 |

    {{item.what}}

    13 |

    {{item.who}}

    14 |

    15 | {{item.notes}} 16 |

    17 |
    18 |
    19 | 20 |
    21 | 22 |
    23 |
    24 | -------------------------------------------------------------------------------- /src/components/radioButton/demo1/script.js: -------------------------------------------------------------------------------- 1 | 2 | angular.module('app', ['ngMaterial']) 3 | 4 | .controller('AppCtrl', function($scope) { 5 | 6 | $scope.data = { 7 | group1 : '2', 8 | group2 : '6' 9 | }; 10 | 11 | $scope.radioData = [ 12 | { label: 'Label 4', value: '4' }, 13 | { label: 'Label 5', value: '5' }, 14 | { label: 'Label 6', value: '6' } 15 | ]; 16 | 17 | $scope.addItem = function() { 18 | var r = Math.ceil(Math.random() * 1000); 19 | $scope.radioData.push({ label: 'Label ' + r, value: r }); 20 | }; 21 | 22 | $scope.removeItem = function() { 23 | $scope.radioData.pop(); 24 | }; 25 | 26 | }); 27 | -------------------------------------------------------------------------------- /src/components/tabs/demos/demo2/script.js: -------------------------------------------------------------------------------- 1 | 2 | angular.module('app', ['ngMaterial'] ) 3 | .controller('AppCtrl', function( $scope ) { 4 | var tabs = [ 5 | { title: 'Polymer', active: true, disabled: false, content:"Polymer practices are great!" }, 6 | { title: 'Material', active: false, disabled: true , content:"Material Design practices are better!" }, 7 | { title: 'Angular', active: false, disabled: true , content:"AngularJS practices are the best!" }, 8 | { title: 'NodeJS' , active: false, disabled: false, content:"NodeJS practices are amazing!" } 9 | ]; 10 | 11 | $scope.selectedIndex = 0; 12 | $scope.twoDisabled = true; 13 | 14 | }); 15 | -------------------------------------------------------------------------------- /src/components/tabs/demos/demo3/script.js: -------------------------------------------------------------------------------- 1 | 2 | angular.module('app', ['ngMaterial'] ) 3 | .controller('AppCtrl', function( $scope ) { 4 | var tabs = [ 5 | { title: 'Polymer', active: true, disabled: false, content:"Polymer practices are great!" }, 6 | { title: 'Material', active: false, disabled: true , content:"Material Design practices are better!" }, 7 | { title: 'Angular', active: false, disabled: true , content:"AngularJS practices are the best!" }, 8 | { title: 'NodeJS' , active: false, disabled: false, content:"NodeJS practices are amazing!" } 9 | ]; 10 | 11 | $scope.activeIndex = 1; 12 | $scope.tabs = [].concat(tabs); 13 | 14 | }); 15 | -------------------------------------------------------------------------------- /src/components/toast/demo1/index.html: -------------------------------------------------------------------------------- 1 | 2 |
    3 |
    4 | 5 | Simple Toast 6 | 7 | 9 | Advanced Toast 10 | 11 |
    12 | 13 |
    14 | Toast Position: "{{getToastPosition()}}" 15 |
    16 | 18 | {{name}} 19 | 20 |
    21 |
    22 | -------------------------------------------------------------------------------- /docs/app/demo/layout/flex-cell.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Flex Cell 6 | 7 | 8 | 9 | 10 |
    11 | 12 |
    Uno
    13 | 14 |
    Dos [flex]
    15 | 16 |
    Tres
    17 | 18 |
    19 | 20 |
    21 | 22 |
    Uno
    23 | 24 |
    Dos [flex]
    25 | 26 |
    Tres
    27 | 28 |
    29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/base/_structure.scss: -------------------------------------------------------------------------------- 1 | *, 2 | *:before, 3 | *:after { 4 | @include box-sizing(border-box); 5 | } 6 | 7 | html, body { 8 | height: 100%; 9 | color: $font-color-base; 10 | font-family: $font-family; 11 | -webkit-tap-highlight-color: rgba(0,0,0,0); 12 | -webkit-touch-callout: none; 13 | text-rendering: optimizeLegibility; 14 | -webkit-font-smoothing: antialiased; 15 | 16 | h3 { 17 | display: block; 18 | @include margin-selectors(); 19 | font-size: 1.17em; 20 | font-weight: bold; 21 | } 22 | } 23 | 24 | body { 25 | margin: 0; 26 | padding: 0px; 27 | } 28 | 29 | .inset { 30 | padding: 10px; 31 | } 32 | 33 | button { 34 | font-family: $font-family; 35 | } 36 | -------------------------------------------------------------------------------- /src/components/sidenav/demo1/script.js: -------------------------------------------------------------------------------- 1 | 2 | angular.module('app', ['ngMaterial']) 3 | 4 | .controller('AppCtrl', function($scope, $timeout, $materialSidenav) { 5 | $scope.toggleLeft = function() { 6 | $materialSidenav('left').toggle(); 7 | }; 8 | $scope.toggleRight = function() { 9 | $materialSidenav('right').toggle(); 10 | }; 11 | }) 12 | 13 | .controller('LeftCtrl', function($scope, $timeout, $materialSidenav) { 14 | $scope.close = function() { 15 | $materialSidenav('left').close(); 16 | }; 17 | }) 18 | 19 | .controller('RightCtrl', function($scope, $timeout, $materialSidenav) { 20 | $scope.close = function() { 21 | $materialSidenav('right').close(); 22 | }; 23 | }); 24 | -------------------------------------------------------------------------------- /docs/templates/ngdoc/lib/methods.template.html: -------------------------------------------------------------------------------- 1 | {%- if doc.methods %} 2 |

    Methods

    3 |
      4 | {%- for method in doc.methods %} 5 |
    • 6 |

      {$ functionSyntax(method) $}

      7 |
      {$ method.description | marked $}
      8 | 9 | {% if method.params %} 10 |

      Parameters

      11 | {$ paramTable(method.params) $} 12 | {% endif %} 13 | 14 | {% if method.this %} 15 |

      Method's {% code %}this{% endcode %}

      16 | {$ method.this | marked $} 17 | {% endif %} 18 | 19 | {% if method.returns %} 20 |

      Returns

      21 | {$ typeInfo(method.returns) $} 22 | {% endif %} 23 | 24 |
    • 25 | {% endfor -%} 26 |
    27 | {%- endif -%} 28 | -------------------------------------------------------------------------------- /docs/app/demo/layout/horizontal-vertical-layout.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Horizontal/Vertical Layouts 6 | 7 | 8 | 9 | 10 |
    11 | 12 |
    Uno
    13 | 14 |
    Dos
    15 | 16 |
    17 | 18 |
    19 | 20 |
    Uno
    21 | 22 |
    Dos
    23 | 24 |
    25 | 26 |
    27 | 28 |
    Uno
    29 | 30 |
    Dos
    31 | 32 |
    33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /docs/templates/ngdoc/api/object.template.html: -------------------------------------------------------------------------------- 1 | {% include "lib/macros.html" %} 2 | {% extends "api/api.template.html" %} 3 | 4 | {% block additional %} 5 | 6 | {% if doc.params or doc.returns or doc.this or doc.kind == 'function' -%} 7 |

    Usage

    8 | {% if doc.usage %} 9 | {$ doc.usage | marked $} 10 | {% else %} 11 | {$ functionSyntax(doc) $} 12 | {% endif %} 13 | 14 | {% include "lib/params.template.html" %} 15 | {% include "lib/this.template.html" %} 16 | {% include "lib/returns.template.html" %} 17 | {%- endif %} 18 | 19 | {% include "lib/methods.template.html" %} 20 | {% include "lib/events.template.html" %} 21 | {% include "lib/properties.template.html" %} 22 | 23 | {% endblock %} 24 | -------------------------------------------------------------------------------- /docs/templates/ngdoc/lib/events.template.html: -------------------------------------------------------------------------------- 1 | {%- if doc.events %} 2 |

    Events

    3 |
      4 | {%- for event in doc.events %} 5 |
    • 6 |

      {$ event.name $}

      7 |
      {$ event.description | marked $}
      8 | {%- if event.eventType == 'listen' %} 9 |
      10 |

      Listen on: {$ event.eventTarget $}

      11 |
      12 | {%- else %} 13 |
      14 |

      Type:

      15 |
      {$ event.eventType $}
      16 |
      17 |
      18 |

      Target:

      19 |
      {$ event.eventTarget $}
      20 |
      21 | {% endif -%} 22 |
    • 23 | {% endfor -%} 24 |
    25 | {% endif -%} 26 | -------------------------------------------------------------------------------- /src/components/tabs/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "module": "material.components.tabs", 3 | "name": "Tabs", 4 | "js": ["tabs.js", "util/*.js"], 5 | "demos": { 6 | "demo1": { 7 | "name": "Testimonials (tabs on bottom):", 8 | "files": ["demos/demo1/*"] 9 | }, 10 | "demo2": { 11 | "name": "Static Tabs, external content, noInk:", 12 | "files": ["demos/demo2/*"] 13 | }, 14 | "demo4": { 15 | "name": "Dynamic Tabs (with internal views):", 16 | "files": ["demos/demo4/*"] 17 | }, 18 | "demo3": { 19 | "name": "Dynamic Tabs (buttons only):", 20 | "files": ["demos/demo3/*"] 21 | }, 22 | "demo5": { 23 | "name": "Dynamic Tabs (buttons only) with $location & routing: ", 24 | "files": ["demos/demo5/*"] 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /docs/app/demo/layout/full-width-header-menu-footer.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Full Width, Header, Menu, Footer 6 | 7 | 8 | 9 | 10 |
    11 | Header 12 |
    13 | 14 |
    15 | 16 | 20 | 21 |
    22 | Main [flex] 23 |
    24 | 25 |
    26 | 27 |
    28 | Footer 29 |
    30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /src/components/icon/demo1/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
    4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
    14 | -------------------------------------------------------------------------------- /docs/templates/ngdoc/api/componentGroup.template.html: -------------------------------------------------------------------------------- 1 | {% block content %} 2 |

    3 | {%- if doc.title -%} 4 | {$ doc.title $} 5 | {%- elif doc.module -%} 6 | {$ doc.groupType | title $} components in {$ doc.module | code $} 7 | {%- else -%} 8 | Pages 9 | {%- endif -%} 10 |

    11 | 12 | {$ doc.description | marked $} 13 | 14 |
    15 |
    16 | 17 | 18 | 19 | 20 | 21 | {% for page in doc.components %} 22 | 23 | 24 | 25 | 26 | {% endfor %} 27 |
    NameDescription
    {$ page.id | link(page.name, page) $}{$ page.description | firstParagraph | marked $}
    28 |
    29 |
    30 | 31 | {% endblock %} -------------------------------------------------------------------------------- /src/components/tabs/demos/demo1/script.js: -------------------------------------------------------------------------------- 1 | angular.module( 'app', [ 'ngMaterial' ] ) 2 | 3 | .controller('AppCtrl', function( $scope, $timeout ) { 4 | var scrollID; 5 | 6 | $scope.selected = 0; 7 | $scope.enableAutoScroll = suspendAutoScroll; 8 | 9 | autoScrollTabs(); 10 | 11 | /** 12 | * Auto select next tab every 4 secs... 13 | */ 14 | function autoScrollTabs() { 15 | scrollID = $timeout(function(){ 16 | $scope.selected = ($scope.selected + 1)%3; 17 | autoScrollTabs(); 18 | },4000); 19 | } 20 | 21 | /** 22 | * Suspend auto scrolling while mouse is over the footer 23 | * area. 24 | */ 25 | function suspendAutoScroll(enabled) { 26 | if ( !enabled ) { 27 | $timeout.cancel( scrollID ); 28 | } else { 29 | autoScrollTabs(); 30 | } 31 | } 32 | 33 | }); 34 | -------------------------------------------------------------------------------- /src/main.scss: -------------------------------------------------------------------------------- 1 | @import "../bower_components/normalize.scss/normalize.scss", 2 | 3 | // Theme 4 | "theme/theme", 5 | 6 | // Base 7 | "base/mixins", 8 | "base/structure", 9 | "base/table", 10 | "base/layout", 11 | 12 | 13 | // Components 14 | "components/animate/effects", 15 | "components/backdrop/backdrop", 16 | "components/content/content", 17 | "components/icon/icon", 18 | "components/buttons/buttons", 19 | "components/dialog/dialog", 20 | "components/divider/divider", 21 | "components/checkbox/checkbox", 22 | "components/card/card", 23 | "components/radioButton/radio-button", 24 | "components/sidenav/sidenav", 25 | "components/form/form", 26 | "components/slider/slider", 27 | "components/toast/toast", 28 | "components/toolbar/toolbar", 29 | "components/tabs/tabs", 30 | "components/list/list", 31 | "components/whiteframe/whiteframe"; 32 | -------------------------------------------------------------------------------- /src/components/whiteframe/_whiteframe.scss: -------------------------------------------------------------------------------- 1 | material-whiteframe { 2 | } 3 | 4 | .material-whiteframe-z1 { 5 | @extend material-whiteframe; 6 | 7 | z-index: $whiteframe-zindex-z1; 8 | box-shadow: $whiteframe-shadow-z1; 9 | } 10 | .material-whiteframe-z2 { 11 | @extend material-whiteframe; 12 | 13 | z-index: $whiteframe-zindex-z2; 14 | box-shadow: $whiteframe-shadow-z2; 15 | } 16 | .material-whiteframe-z3 { 17 | @extend material-whiteframe; 18 | 19 | z-index: $whiteframe-zindex-z3; 20 | box-shadow: $whiteframe-shadow-z3; 21 | } 22 | .material-whiteframe-z4 { 23 | @extend material-whiteframe; 24 | 25 | z-index: $whiteframe-zindex-z4; 26 | box-shadow: $whiteframe-shadow-z4; 27 | } 28 | .material-whiteframe-z5 { 29 | @extend material-whiteframe; 30 | 31 | z-index: $whiteframe-zindex-z5; 32 | box-shadow: $whiteframe-shadow-z5; 33 | } 34 | -------------------------------------------------------------------------------- /docs/app/demo/layout/layout-order.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Layout Order 6 | 7 | 8 | 9 | 10 |
    11 | 12 |
    13 |
    Uno
    14 |
    15 | 16 |
    17 |
    Dos
    18 |
    19 | 20 |
    21 |
    Tres
    22 |
    23 | 24 |
    25 |
    Cuatro
    26 |
    27 | 28 |
    29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/components/toolbar/demo2/index.html: -------------------------------------------------------------------------------- 1 |
    2 | 3 | 4 |
    5 | My App Title 6 |
    7 |
    8 | 9 | 10 | 11 | 12 | 13 | 14 |
    15 | 16 |
    17 |
    18 |

    {{item.what}}

    19 |

    {{item.who}}

    20 |

    21 | {{item.notes}} 22 |

    23 |
    24 |
    25 | 26 |
    27 | 28 |
    29 | 30 |
    31 | -------------------------------------------------------------------------------- /docs/templates/ngdoc/api/filter.template.html: -------------------------------------------------------------------------------- 1 | {% include "lib/macros.html" -%} 2 | {% extends "api/api.template.html" %} 3 | 4 | {% block additional %} 5 |

    In HTML Template Binding

    6 | {% if doc.usage %} 7 | {$ doc.usage | code $} 8 | {% else %} 9 | {% code -%} 10 | {{ {$ doc.name $}_expression | {$ doc.name $} 11 | {%- for param in doc.params %}{% if not loop.first %} : {$ param.name $}{% endif %}{% endfor -%} 12 | }} 13 | {%- endcode %} 14 | {% endif %} 15 | 16 |

    In JavaScript

    17 | {% code -%} 18 | {%- set sep = joiner(', ') -%} 19 | $filter('{$ doc.name $}')({% for param in doc.params %}{$ sep() $}{$ param.name $}{% endfor -%}) 20 | {%- endcode %} 21 | 22 | {% include "lib/params.template.html" %} 23 | {% include "lib/this.template.html" %} 24 | {% include "lib/returns.template.html" %} 25 | {% endblock %} 26 | -------------------------------------------------------------------------------- /docs/app/template/home.tmpl.html: -------------------------------------------------------------------------------- 1 |
    2 | 3 |

    4 | Material Design is a specification for a unified system of visual, motion, and interaction design that adapts across different devices. 5 |

    6 |

    7 | The material design project for Angular is a complementary effort to the Polymer project's paper elements collection. Our goal is to provide a set of AngularJS-native UI elements that implement the material design system. This demo is a work in progress. 8 |

    9 |

    10 | For more, see our repository on GitHub 11 |

    12 |
    13 |
    14 | -------------------------------------------------------------------------------- /docs/app/template/view-source.tmpl.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | {{file.viewType}} 8 | 9 | 10 | 11 |
    12 |
    13 | 16 | 17 |
    18 |
    19 | 20 |
    21 | 22 | Done 23 | 24 |
    25 |
    26 | -------------------------------------------------------------------------------- /docs/templates/demo/template.index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | {% for file in doc.js %} 11 | {% endfor %} 12 | {% for file in doc.css %} 13 | {% endfor %} 14 | 15 | 16 | {$ doc.content $} 17 | 18 | 19 | -------------------------------------------------------------------------------- /docs/app/demo/layout/utility-attributes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Layout Padding 6 | 7 | 8 | 9 | 10 | 11 | I'm a <span>, but now a block element ;) 12 | 13 | 14 |
    15 | I'm a <div>, but now an inline-block element :P 16 |
    17 | 18 |

    19 | I'm hidden by default, but shown when the small media query is active! 20 |

    21 | 22 |

    23 | I'm shown by default, but hidden when the large media query is active! 24 |

    25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /docs/app/img/icons/ic_play_arrow_24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /docs/app/img/icons/ic_chevron_right_24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /docs/app/img/icons/ic_arrow_back_24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /docs/app/img/icons/ic_menu_24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/components/whiteframe/demo1/index.html: -------------------------------------------------------------------------------- 1 |
    2 | 3 | 4 | .material-whiteframe-z1 5 | 6 | 7 | 8 | .material-whiteframe-z2 9 | 10 | 11 | 12 | .material-whiteframe-z3 13 | 14 | 15 | 16 | .material-whiteframe-z4 17 | 18 | 19 | 20 | .material-whiteframe-z5 21 | 22 | 23 |
    24 | -------------------------------------------------------------------------------- /docs/app/img/icons/ic_label_24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /docs/app/img/icons/ic_photo_24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /docs/app/img/icons/ic_insert_drive_file_24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/app/img/icons/ic_launch_24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /docs/app/img/icons/ic_comment_24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/components/icon/icon.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @ngdoc module 3 | * @name material.components.icon 4 | * @description 5 | * Icon 6 | */ 7 | angular.module('material.components.icon', []) 8 | .directive('materialIcon', [ 9 | materialIconDirective 10 | ]); 11 | 12 | /** 13 | * @ngdoc directive 14 | * @name materialIcon 15 | * @module material.components.icon 16 | * 17 | * @restrict E 18 | * 19 | * @description 20 | * The `` directive is an element useful for SVG icons 21 | * 22 | * @usage 23 | * 24 | * 25 | * 26 | * 27 | * 28 | */ 29 | function materialIconDirective() { 30 | return { 31 | restrict: 'E', 32 | template: '', 33 | compile: function(element, attr) { 34 | var object = angular.element(element[0].children[0]); 35 | if(angular.isDefined(attr.icon)) { 36 | object.attr('data', attr.icon); 37 | } 38 | } 39 | }; 40 | } 41 | -------------------------------------------------------------------------------- /src/components/radioButton/demo1/index.html: -------------------------------------------------------------------------------- 1 | 2 |
    3 | 4 |

    5 | Add 6 | Remove 7 |

    8 | 9 | 10 | 11 | 12 | Label 1 13 | 14 | 15 | 16 | Label 2 17 | 18 | 19 | 20 | Label 3 21 | 22 | 23 | 24 | 25 |

    Group 1 Selected: {{ data.group1 }}

    26 | 27 | 28 | 29 | 30 | {{ d.label }} 31 | 32 | 33 | 34 | 35 |

    Group 2 Selected: {{ data.group2 }}

    36 | 37 | 38 | 39 |
    40 | -------------------------------------------------------------------------------- /docs/app/img/icons/ic_refresh_24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /docs/templates/ngdoc/api/api.template.html: -------------------------------------------------------------------------------- 1 | {% extends "base.template.html" %} 2 | 3 | {% block content %} 4 | 5 | {% block header %} 6 |
    7 | {% block related_components %}{% endblock %} 8 |
    9 | 10 | {% endblock %} 11 | 12 |
    13 |
    14 | 15 | {% block description %} 16 |
    17 | {$ doc.description | marked $} 18 |
    19 | {% endblock %} 20 | 21 |
    22 | {% block dependencies %} 23 | {%- if doc.requires %} 24 |

    Dependencies

    25 |
      26 | {% for require in doc.requires %}
    • {$ require | link $}
    • {% endfor %} 27 |
    28 | {% endif -%} 29 | {% endblock %} 30 | 31 | {% block additional %} 32 | {% endblock %} 33 | 34 | {% block examples %} 35 | {%- if doc.examples %} 36 |

    Example

    37 | {%- for example in doc.examples -%} 38 | {$ example | marked $} 39 | {%- endfor -%} 40 | {% endif -%} 41 | {% endblock %} 42 |
    43 | 44 | {% endblock %} 45 | -------------------------------------------------------------------------------- /docs/app/img/icons/ic_more_vert_24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /docs/app/img/icons/ic_visibility_24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /config/karma.conf.js: -------------------------------------------------------------------------------- 1 | var buildConfig = require('./build.config.js'); 2 | 3 | module.exports = { 4 | basePath: __dirname + '/..', 5 | frameworks: ['jasmine'], 6 | files: [ 7 | 'bower_components/angular/angular.js', 8 | 'bower_components/angular-animate/angular-animate.js', 9 | 'bower_components/angular-mocks/angular-mocks.js', 10 | 'config/lib/angular-animate-sequence/angular-animate-sequence.js', 11 | 'config/lib/angular-animate-sequence/angular-animate-stylers.js' 12 | ] 13 | .concat(buildConfig.paths.js) 14 | .concat(buildConfig.paths.test), 15 | 16 | port: 9876, 17 | reporters: ['progress'], 18 | colors: true, 19 | 20 | singleRun: false, 21 | 22 | // Start these browsers, currently available: 23 | // - Chrome 24 | // - ChromeCanary 25 | // - Firefox 26 | // - Opera (has to be installed with `npm install karma-opera-launcher`) 27 | // - Safari (only Mac; has to be installed with `npm install karma-safari-launcher`) 28 | // - PhantomJS 29 | // - IE (only Windows; has to be installed with `npm install karma-ie-launcher`) 30 | browsers: ['Chrome'] 31 | }; 32 | -------------------------------------------------------------------------------- /src/components/form/demo1/index.html: -------------------------------------------------------------------------------- 1 | 2 |
    3 | 4 | 5 |
    6 | 7 | 8 |
    9 |
    10 | 11 | 12 |
    13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
    22 |
    23 | 24 |
    25 | -------------------------------------------------------------------------------- /src/services/registry/registry.spec.js: -------------------------------------------------------------------------------- 1 | describe('$materialComponentRegistry Service', function() { 2 | beforeEach(module('material.services.registry')); 3 | 4 | it('should print error on no handle', inject(function($materialComponentRegistry, $log) { 5 | spyOn($log, 'error'); 6 | $materialComponentRegistry.notFoundError('badHandle'); 7 | expect($log.error).toHaveBeenCalled(); 8 | })); 9 | 10 | it('Should register handle', inject(function($materialComponentRegistry) { 11 | $materialComponentRegistry.register({needle: true}, 'test'); 12 | var instance = $materialComponentRegistry.get('test'); 13 | expect(instance).toBeTruthy(); 14 | expect(instance.needle).not.toBe(undefined); 15 | expect($materialComponentRegistry.getInstances().length).toBe(1); 16 | })); 17 | 18 | it('Should deregister', inject(function($materialComponentRegistry) { 19 | var deregister = $materialComponentRegistry.register({needle: true}, 'test'); 20 | expect($materialComponentRegistry.getInstances().length).toBe(1); 21 | deregister(); 22 | expect($materialComponentRegistry.getInstances().length).toBe(0); 23 | })); 24 | 25 | }); 26 | -------------------------------------------------------------------------------- /src/components/toast/demo1/script.js: -------------------------------------------------------------------------------- 1 | 2 | angular.module('app', ['ngMaterial']) 3 | 4 | .controller('AppCtrl', function($scope, $materialToast, $animate) { 5 | 6 | $scope.toastPosition = { 7 | bottom: true, 8 | top: false, 9 | left: true, 10 | right: false, 11 | fit: false 12 | }; 13 | 14 | $scope.getToastPosition = function() { 15 | return Object.keys($scope.toastPosition) 16 | .filter(function(pos) { return $scope.toastPosition[pos]; }) 17 | .join(' '); 18 | }; 19 | 20 | $scope.complexToastIt = function() { 21 | $materialToast({ 22 | controller: 'ToastCtrl', 23 | templateUrl: 'toast-template.html', 24 | duration: 5000, 25 | position: $scope.getToastPosition() 26 | }); 27 | }; 28 | 29 | $scope.toastIt = function() { 30 | $materialToast({ 31 | template: 'Hello, ' + Math.random() + '', 32 | duration: 2000, 33 | position: $scope.getToastPosition() 34 | }); 35 | }; 36 | 37 | }) 38 | 39 | .controller('ToastCtrl', function($scope, $hideToast) { 40 | $scope.closeToast = function() { 41 | $hideToast(); 42 | }; 43 | }); 44 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "material-design", 3 | "version": "0.0.1", 4 | "repository": { 5 | "url": "git://github.com/angular/material.git" 6 | }, 7 | "devDependencies": { 8 | "canonical-path": "0.0.2", 9 | "conventional-changelog": "0.0.9", 10 | "dgeni": "~0.3.0", 11 | "dgeni-packages": "~0.9.2", 12 | "event-stream": "^3.1.5", 13 | "glob": "~4.0.2", 14 | "gulp": "^3.6.2", 15 | "gulp-concat": "^2.2.0", 16 | "gulp-footer": "^1.0.4", 17 | "gulp-header": "^1.0.2", 18 | "gulp-if": "^1.2.0", 19 | "gulp-jshint": "^1.5.5", 20 | "gulp-minify-css": "^0.3.4", 21 | "gulp-rename": "^1.2.0", 22 | "gulp-replace": "^0.3.0", 23 | "gulp-sass": "^0.7.1", 24 | "gulp-strip-debug": "^0.3.0", 25 | "gulp-template": "^0.1.1", 26 | "gulp-uglify": "^0.3.0", 27 | "gulp-uncss": "^0.4.5", 28 | "gulp-util": "^2.2.14", 29 | "jshint-summary": "^0.3.0", 30 | "karma": "^0.12.16", 31 | "karma-chrome-launcher": "^0.1.3", 32 | "karma-jasmine": "^0.1.5", 33 | "karma-phantomjs-launcher": "~0.1.4", 34 | "lodash": "^2.4.1", 35 | "minimist": "^0.1.0", 36 | "esprima": "^1.2.2" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2010-2014 Google, Inc. http://angularjs.org 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /src/components/card/card.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @ngdoc module 3 | * @name material.components.card 4 | * 5 | * @description 6 | * Card components. 7 | */ 8 | angular.module('material.components.card', [ 9 | ]) 10 | .directive('materialCard', [ 11 | materialCardDirective 12 | ]); 13 | 14 | /** 15 | * @ngdoc directive 16 | * @name materialCard 17 | * @module material.components.card 18 | * 19 | * @restrict E 20 | * 21 | * @description 22 | * The `` directive is a container element used within `` containers. 23 | * 24 | * @usage 25 | * 26 | * 27 | * 28 | *

    Paracosm

    29 | *

    30 | * The titles of Washed Out's breakthrough song and the first single from Paracosm share the 31 | * two most important words in Ernest Greene's musical language: feel it. It's a simple request, as well... 32 | *

    33 | *
    34 | *
    35 | * 36 | */ 37 | function materialCardDirective() { 38 | return { 39 | restrict: 'E', 40 | link: function($scope, $element, $attr) { 41 | } 42 | }; 43 | } 44 | -------------------------------------------------------------------------------- /src/components/content/content.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @ngdoc module 3 | * @name material.components.content 4 | * 5 | * @description 6 | * Scrollable content 7 | */ 8 | angular.module('material.components.content', [ 9 | 'material.services.registry' 10 | ]) 11 | .directive('materialContent', [ 12 | materialContentDirective 13 | ]); 14 | 15 | /** 16 | * @ngdoc directive 17 | * @name materialContent 18 | * @module material.components.content 19 | * 20 | * @restrict E 21 | * 22 | * @description 23 | * The `` directive is a container element useful for scrollable content 24 | * 25 | * @usage 26 | * 27 | * 28 | * Lorem ipsum dolor sit amet, ne quod novum mei. 29 | * 30 | * 31 | * 32 | */ 33 | function materialContentDirective() { 34 | return { 35 | restrict: 'E', 36 | transclude: true, 37 | template: '
    ', 38 | controller: angular.noop, 39 | link: function($scope, $element, $attr) { 40 | $scope.$broadcast('$materialContentLoaded', $element); 41 | } 42 | }; 43 | } 44 | -------------------------------------------------------------------------------- /src/components/tabs/tabs.spec.js: -------------------------------------------------------------------------------- 1 | describe('materialTabs directive', function() { 2 | 3 | beforeEach(module('material.components.tabs')); 4 | 5 | 6 | describe('controller', function(){ 7 | 8 | function setup( attrs ) 9 | { 10 | var el; 11 | inject(function($compile, $rootScope) { 12 | el = $compile('')($rootScope); 13 | $rootScope.$apply(); 14 | }); 15 | return el; 16 | } 17 | 18 | it('should create a controller.', function(){ 19 | var el = setup(); 20 | var controller = el.controller('materialTabs'); 21 | 22 | expect(controller).not.toBe(undefined); 23 | expect(controller.$$tabs().length).toBe(0); 24 | expect(controller.noink).toBeFalsy(); 25 | expect(controller.nobar).toBeFalsy(); 26 | 27 | }); 28 | 29 | xit('should pass down "nobar" to hide the
    ', function() 30 | { 31 | var tabs = setup(''), 32 | selectionBar = tabs.children(0)[2], 33 | el = angular.element(selectionBar ) 34 | 35 | expect( el.hasClass('ng-hide') ).toBeTruthy(); 36 | }); 37 | 38 | }) 39 | 40 | }); 41 | -------------------------------------------------------------------------------- /docs/app/img/icons/ic_access_time_24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /scripts/release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ARG_DEFS=( 4 | "--version=(.*)" 5 | ) 6 | 7 | function run { 8 | cd ../ 9 | 10 | if [[ "$GH_TOKEN" == "" ]]; then 11 | echo "ERROR: Environment variable GH_TOKEN needed to push a release." 12 | echo "Please set GH_TOKEN to a valid github push token for angular/material," 13 | echo "then try again." 14 | exit 1 15 | fi 16 | 17 | echo "-- Building release..." 18 | gulp build --release 19 | 20 | echo "-- Cloning bower-material to dist..." 21 | rm -rf dist/bower-material 22 | git clone https://angular:$GH_TOKEN@github.com/angular/bower-material \ 23 | dist/bower-material 24 | 25 | echo "-- Copying in build files..." 26 | cp dist/angular-material* dist/bower-material 27 | cd dist/bower-material 28 | 29 | echo "-- Committing and tagging..." 30 | replaceJsonProp "bower.json" "version" "$VERSION" 31 | git add -A 32 | 33 | git commit -am "release: version $VERSION" 34 | git tag -f v$VERSION 35 | 36 | echo "-- Pushing to bower material..." 37 | git push -q origin master 38 | git push -q origin v$VERSION 39 | 40 | echo "-- Version $VERSION pushed successfully to bower-material!" 41 | } 42 | 43 | source $(dirname $0)/utils.inc 44 | -------------------------------------------------------------------------------- /src/components/list/_list.scss: -------------------------------------------------------------------------------- 1 | material-list { 2 | } 3 | 4 | material-item { 5 | @include flex-display(); 6 | @include flex-align-items(center); 7 | @include flex-direction(row); 8 | @include box-sizing(border-box); 9 | 10 | position: relative; 11 | 12 | padding: $item-padding-top $item-padding-right $item-padding-bottom $item-padding-left; 13 | } 14 | 15 | /** 16 | * The left tile for a list item. 17 | */ 18 | .material-tile-left { 19 | min-width: 56px; 20 | } 21 | 22 | /** 23 | * The center content tile for a list item. 24 | */ 25 | .material-tile-content { 26 | @include flex(1); 27 | 28 | padding: 15px 0 15px 0; 29 | 30 | border-bottom: 1px solid #eee; 31 | text-overflow: ellipsis; 32 | 33 | h2 { 34 | margin: $list-h2-margin; 35 | font-weight: $list-h2-font-weight; 36 | font-size: $list-h2-font-size; 37 | } 38 | h3 { 39 | margin: $list-h3-margin; 40 | font-weight: $list-h3-font-weight; 41 | font-size: $list-h3-font-size; 42 | } 43 | p { 44 | margin: $list-p-margin; 45 | font-size: $list-p-font-size; 46 | } 47 | } 48 | 49 | /** 50 | * The right tile for a list item. 51 | */ 52 | .material-tile-right { 53 | padding-right: $item-padding-right; 54 | } 55 | -------------------------------------------------------------------------------- /src/components/dialog/_dialog.scss: -------------------------------------------------------------------------------- 1 | .material-dialog-container { 2 | 3 | @include flex-display(); 4 | @include flex-justify-content(center); 5 | @include flex-align-items(center); 6 | position: absolute; 7 | left: 0; 8 | top: 0; 9 | bottom: 0; 10 | right: 0; 11 | z-index: $z-index-dialog; 12 | 13 | &.active { 14 | @include transition(all 0.2s cubic-bezier(0.4, 0, 0.2, 1)); 15 | @include transform('translate3d(0,0,0) scale(1.0)'); 16 | opacity: 1; 17 | } 18 | 19 | material-dialog { 20 | 21 | // TODO: Calculate height properly 22 | min-width: 240px; 23 | max-width: 80%; 24 | max-height: 80%; 25 | margin:auto; 26 | 27 | background-color: #fff; 28 | border-radius: 4px; 29 | 30 | box-shadow: $whiteframe-shadow-z5; 31 | 32 | @include flex-display(); 33 | @include flex-direction(column); 34 | 35 | .dialog-content { 36 | @include flex-order(1); 37 | padding: 24px; 38 | overflow: auto; 39 | } 40 | .dialog-actions { 41 | @include flex-order(2); 42 | @include box-sizing(border-box); 43 | @include flex-display(); 44 | @include flex-justify-content(flex-end); 45 | padding: 8px 16px; 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /docs/app/img/icons/ic_people_24px.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/components/sidenav/_sidenav.scss: -------------------------------------------------------------------------------- 1 | material-sidenav { 2 | position: absolute; 3 | 4 | // In general, width of sidenav is Screen Width - App Bar Height 5 | // See spec for max-widths 6 | width: 100%; 7 | height: 100%; 8 | 9 | max-width: 304px; 10 | min-width: 304px; 11 | 12 | box-shadow: $sidenav-shadow; 13 | 14 | background-color: white; 15 | 16 | -webkit-transition: all 0.3s ease-in-out; 17 | transition: all 0.3s ease-in-out; 18 | 19 | @extend .material-sidenav-left; 20 | } 21 | 22 | .material-sidenav-left { 23 | left: 0; 24 | top: 0; 25 | @include transform-translate3d(-100%, 0, 0); 26 | 27 | &.open { 28 | @include transform-translate3d(0%, 0, 0); 29 | z-index: $z-index-sidenav; 30 | } 31 | } 32 | 33 | .material-sidenav-right { 34 | left: 100%; 35 | top: 0; 36 | @include transform-translate3d(100%, 0, 0); 37 | 38 | &.open { 39 | @include transform-translate3d(-100%, 0, 0); 40 | z-index: $z-index-sidenav; 41 | } 42 | } 43 | 44 | @media (min-width: $layout-breakpoint-md) { 45 | material-sidenav { 46 | position: static; 47 | @include transform(translate3d(0,0,0) !important); 48 | } 49 | 50 | .material-sidenav-backdrop { 51 | display: none !important; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/components/toolbar/_toolbar.scss: -------------------------------------------------------------------------------- 1 | material-toolbar { 2 | @include flex-display(); 3 | @include flex-direction(column); 4 | 5 | position: relative; 6 | z-index: 2; 7 | 8 | font-size: 1.3em; 9 | min-height: $baseline-grid * 8; 10 | width: 100%; 11 | 12 | &.material-tall { 13 | height: $toolbar-tall-height; 14 | } 15 | 16 | &.material-medium-tall { 17 | height: $toolbar-medium-tall-height; 18 | 19 | .material-toolbar-tools { 20 | height: 48px; 21 | } 22 | } 23 | 24 | .material-indent { 25 | margin-left: $toolbar-indent-margin; 26 | } 27 | } 28 | 29 | .material-toolbar-tools { 30 | @include flex-display(); 31 | @include flex-align-items(center); 32 | @include flex-direction(row); 33 | 34 | width: 100%; 35 | height: $toolbar-tools-height; 36 | font-size: inherit; 37 | font-weight: normal; 38 | padding: 0 10px; 39 | margin: 0; 40 | 41 | > * { 42 | font-size: inherit; 43 | margin: 0 8px; 44 | } 45 | h2, h3 { 46 | font-weight: normal; 47 | } 48 | a { 49 | color: inherit; 50 | text-decoration: none; 51 | } 52 | 53 | material-button { 54 | font-size: 16px; 55 | } 56 | } 57 | 58 | // .material-toolbar-tools-middle { 59 | // position: absolute; 60 | // top: calc(33.3333333333336%); 61 | // left: 0; 62 | // right: 0; 63 | // } 64 | -------------------------------------------------------------------------------- /docs/app/demo/layout/layout-padding-percents.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Layout Padding Percents 6 | 7 | 8 | 9 | 10 |
    11 | 12 |
    13 |
    Uno [flex="33"]
    14 |
    15 | 16 |
    17 |
    Dos [flex]
    18 |
    19 | 20 |
    21 | 22 |
    23 | 24 |
    25 |
    Uno [flex="66"]
    26 |
    27 | 28 |
    29 |
    Dos [flex]
    30 |
    31 | 32 |
    33 | 34 |
    35 | 36 |
    37 |
    Uno [flex]
    38 |
    39 | 40 |
    41 |
    Dos [flex]
    42 |
    43 | 44 |
    45 |
    Tres [flex]
    46 |
    47 | 48 |
    49 | 50 |
    51 | 52 |
    53 |
    Uno [flex][flex-sm="33"][flex-md="66"]
    54 |
    55 | 56 |
    57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /src/components/animate/noEffect.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | 3 | angular.module('material.animations') 4 | 5 | /** 6 | * noink/nobar/nostretch directive: make any element that has one of 7 | * these attributes be given a controller, so that other directives can 8 | * `require:` these and see if there is a `no` parent attribute. 9 | * 10 | * @usage 11 | * 12 | * 13 | * 14 | * 15 | * 16 | * 17 | * 18 | * 19 | * myApp.directive('detectNo', function() { 20 | * return { 21 | * require: ['^?noink', ^?nobar'], 22 | * link: function(scope, element, attr, ctrls) { 23 | * var noinkCtrl = ctrls[0]; 24 | * var nobarCtrl = ctrls[1]; 25 | * if (noInkCtrl) { 26 | * alert("the noink flag has been specified on an ancestor!"); 27 | * } 28 | * if (nobarCtrl) { 29 | * alert("the nobar flag has been specified on an ancestor!"); 30 | * } 31 | * } 32 | * }; 33 | * }); 34 | * 35 | */ 36 | .directive({ 37 | noink: attrNoDirective(), 38 | nobar: attrNoDirective(), 39 | nostretch: attrNoDirective(), 40 | }); 41 | 42 | function attrNoDirective() { 43 | return function() { 44 | return { 45 | controller: angular.noop 46 | }; 47 | }; 48 | } 49 | 50 | })(); 51 | -------------------------------------------------------------------------------- /src/components/card/demo1/index.html: -------------------------------------------------------------------------------- 1 | 2 |
    3 | 4 | 5 | 6 | 7 | 8 |

    Paracosm

    9 |

    10 | The titles of Washed Out's breakthrough song and the first single from Paracosm share the 11 | two most important words in Ernest Greene's musical language: feel it. It's a simple request, as well... 12 |

    13 |
    14 | 15 | 16 | 17 |

    Paracosm

    18 |

    19 | The titles of Washed Out's breakthrough song and the first single from Paracosm share the 20 | two most important words in Ernest Greene's musical language: feel it. It's a simple request, as well... 21 |

    22 |
    23 | 24 | 25 | 26 |

    Paracosm

    27 |

    28 | The titles of Washed Out's breakthrough song and the first single from Paracosm share the 29 | two most important words in Ernest Greene's musical language: feel it. It's a simple request, as well... 30 |

    31 |
    32 | 33 |
    34 |
    35 | -------------------------------------------------------------------------------- /src/components/list/demo1/script.js: -------------------------------------------------------------------------------- 1 | 2 | angular.module('app', ['ngMaterial']) 3 | 4 | .controller('AppCtrl', function($scope) { 5 | $scope.todos = [ 6 | { 7 | face : '/img/list/60.jpeg', 8 | what: 'Brunch this weekend?', 9 | who: 'Min Li Chan', 10 | when: '3:08PM', 11 | notes: " I'll be in your neighborhood doing errands" 12 | }, 13 | { 14 | face : '/img/list/60.jpeg', 15 | what: 'Brunch this weekend?', 16 | who: 'Min Li Chan', 17 | when: '3:08PM', 18 | notes: " I'll be in your neighborhood doing errands" 19 | }, 20 | { 21 | face : '/img/list/60.jpeg', 22 | what: 'Brunch this weekend?', 23 | who: 'Min Li Chan', 24 | when: '3:08PM', 25 | notes: " I'll be in your neighborhood doing errands" 26 | }, 27 | { 28 | face : '/img/list/60.jpeg', 29 | what: 'Brunch this weekend?', 30 | who: 'Min Li Chan', 31 | when: '3:08PM', 32 | notes: " I'll be in your neighborhood doing errands" 33 | }, 34 | { 35 | face : '/img/list/60.jpeg', 36 | what: 'Brunch this weekend?', 37 | who: 'Min Li Chan', 38 | when: '3:08PM', 39 | notes: " I'll be in your neighborhood doing errands" 40 | }, 41 | ] 42 | 43 | }); 44 | 45 | -------------------------------------------------------------------------------- /src/base/utils.js: -------------------------------------------------------------------------------- 1 | var Util = { 2 | /** 3 | * Checks to see if the element or its parents are disabled. 4 | * @param element DOM element to start scanning for `disabled` attribute 5 | * @param limit Number of parent levels that should be scanned; defaults to 4 6 | * @returns {*} Boolean 7 | */ 8 | isDisabled : function isDisabled(element, limit) { 9 | return Util.ancestorHasAttribute( element, 'disabled', limit ); 10 | }, 11 | /** 12 | * Checks if the specified element has an ancestor (ancestor being parent, grandparent, etc) 13 | * with the given attribute defined. 14 | * 15 | * Also pass in an optional `limit` (levels of ancestry to scan), default 8. 16 | */ 17 | ancestorHasAttribute: function ancestorHasAttribute(element, attrName, limit) { 18 | limit = limit || 4; 19 | var current = element; 20 | while (limit-- && current.length) { 21 | if (current[0].hasAttribute && current[0].hasAttribute(attrName)) { 22 | return true; 23 | } 24 | current = current.parent(); 25 | } 26 | return false; 27 | }, 28 | 29 | /** 30 | * Checks if two elements have the same parent 31 | */ 32 | elementIsSibling: function elementIsSibling(element, otherElement) { 33 | return element.parent().length && 34 | (element.parent()[0] === otherElement.parent()[0]); 35 | } 36 | }; 37 | 38 | -------------------------------------------------------------------------------- /docs/app/demo/layout/keylines.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Vertical Keylines 6 | 7 | 35 | 36 | 37 | 38 |
    39 | 12:30 40 |
    41 | 42 |
    43 | 44 | 45 |
    46 | 47 |
    48 |

    Keylines and Padding Base

    49 |
    50 | 51 |
    52 | content 53 |
    54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /docs/app/demo/layout/layout-padding.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Layout Padding 6 | 7 | 8 | 9 | 10 |
    11 | 12 |
    13 |
    Uno [flex]
    14 |
    15 | 16 |
    17 |
    Dos [flex]
    18 |
    19 | 20 |
    21 |
    Tres [flex]
    22 |
    23 | 24 |
    25 |
    Cuatro [flex]
    26 |
    27 | 28 |
    29 | 30 |
    31 | 32 |
    33 |
    Uno [flex]
    34 |
    35 | 36 |
    37 |
    Dos [flex]
    38 |
    39 | 40 |
    41 |
    Tres [flex]
    42 |
    43 | 44 |
    45 |
    Cuatro [flex]
    46 |
    47 | 48 |
    49 | 50 |
    51 | 52 |
    53 |
    Uno [flex]
    54 |
    55 | 56 |
    57 |
    Dos [flex]
    58 |
    59 | 60 |
    61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /src/components/tabs/demos/demo5/script.js: -------------------------------------------------------------------------------- 1 | 2 | angular.module('app', ['ngMaterial', 'ngRoute']) 3 | 4 | .config(function($routeProvider) { 5 | $routeProvider 6 | .when('/material', { 7 | templateUrl: 'material.tmpl.html', 8 | controller: 'MaterialTabCtrl' 9 | }) 10 | .when('/angular', { 11 | templateUrl: 'angular.tmpl.html', 12 | controller: 'AngularTabCtrl' 13 | }) 14 | .when('/polymer', { 15 | templateUrl: 'polymer.tmpl.html', 16 | controller: 'PolymerTabCtrl' 17 | }) 18 | .otherwise({ 19 | redirectTo: '/material' 20 | }); 21 | }) 22 | 23 | .controller('AppCtrl', function($scope, $location) { 24 | var tabs = $scope.tabs = [ 25 | { path: '/material', label: 'Material Design' }, 26 | { path: '/angular', label: 'Use Angular' }, 27 | { path: '/polymer', label: 'Use Polymer' }, 28 | ]; 29 | 30 | $scope.selectedTabIndex = 0; 31 | $scope.$watch('selectedTabIndex', watchSelectedTab); 32 | 33 | function watchSelectedTab(index, oldIndex) { 34 | console.log('selecting from', oldIndex, 'to', index); 35 | $scope.reverse = index < oldIndex; 36 | $location.path(tabs[index].path); 37 | } 38 | 39 | }) 40 | 41 | .controller('MaterialTabCtrl', function($scope) { 42 | }) 43 | 44 | .controller('AngularTabCtrl', function($scope) { 45 | }) 46 | 47 | .controller('PolymerTabCtrl', function($scope) { 48 | }); 49 | -------------------------------------------------------------------------------- /src/components/dialog/demo1/my-dialog.tmpl.html: -------------------------------------------------------------------------------- 1 | 2 |
    3 |

    A banana is an edible fruit produced by several kinds of large herbaceous flowering plants in the genus Musa. (In some countries, bananas used for cooking may be called plantains.) The fruit is variable in size, color and firmness, but is usually elongated and curved, with soft flesh rich in starch covered with a rind which may be green, yellow, red, purple, or brown when ripe. The fruits grow in clusters hanging from the top of the plant. Almost all modern edible parthenocarpic (seedless) bananas come from two wild species - acuminata and Musa balbisiana. The scientific names of most cultivated bananas are Musa acuminata + Musa balbisiana, and Musa + paradisiaca for the hybrid Musa acuminata balbisiana, depending on their genomic constitution. The old scientific name Musa sapientum is no longer used. 4 | 5 |

    Musa species are native to tropical Indomalaya and Australia, and are likely to have been first domesticated in Papua New Guinea. They are grown in at least 107 countries, primarily for their fruit, and to a lesser extent to make fiber, banana wine and banana beer and as ornamental plants.

    6 |
    7 |
    8 | 9 | Okay 10 | 11 |
    12 |
    13 | -------------------------------------------------------------------------------- /src/components/tabs/demos/demo2/index.html: -------------------------------------------------------------------------------- 1 | 2 |
    3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
    12 |
    13 | View for Item #1
    14 | Selection index = 0 15 |
    16 |
    17 | View for Item #2
    18 | Selection index = 1 19 |
    20 |
    21 | View for Item #3
    22 | Selection index = 2 23 |
    24 |
    25 | View for Item #4
    26 | Selection index = 3 27 |
    28 |
    29 | 30 | Tab #2 is 31 | 32 | Disabled 33 | 34 | (will auto-deselect if active) 35 | 36 | 37 |
    38 | -------------------------------------------------------------------------------- /docs/app/demo/layout/layout-padding-offsets.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Layout Padding Offsets 6 | 7 | 8 | 9 | 10 |
    11 | 12 |
    13 |
    Uno [flex][offset-sm="25"]
    14 |
    15 | 16 |
    17 |
    Dos [flex]
    18 |
    19 | 20 |
    21 |
    Tres [flex]
    22 |
    23 | 24 |
    25 | 26 |
    27 | 28 |
    29 |
    Uno [flex]
    30 |
    31 | 32 |
    33 |
    Dos [flex][flex-md="50"][offset-md="25"]
    34 |
    35 | 36 |
    37 | 38 |
    39 | 40 |
    41 |
    Uno [flex="50"][offset="25"]
    42 |
    43 | 44 |
    45 | 46 |
    47 | 48 |
    49 |
    Uno [flex]
    50 |
    51 | 52 |
    53 |
    Dos [flex][flex-lg="25"]
    54 |
    55 | 56 |
    57 | 58 |
    59 | 60 |
    61 |
    Uno [flex]
    62 |
    63 | 64 |
    65 |
    Dos [flex="50"]
    66 |
    67 | 68 |
    69 |
    Tres [flex]
    70 |
    71 | 72 |
    73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /src/components/list/list.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @ngdoc module 3 | * @name material.components.list 4 | * @description 5 | * List module 6 | */ 7 | angular.module('material.components.list', []) 8 | 9 | .directive('materialList', [ 10 | materialListDirective 11 | ]) 12 | .directive('materialItem', [ 13 | materialItemDirective 14 | ]); 15 | 16 | /** 17 | * @ngdoc directive 18 | * @name materialList 19 | * @module material.components.list 20 | * 21 | * @restrict E 22 | * 23 | * @description 24 | * The `` directive is a list container for 1..n `` tags. 25 | * 26 | * @usage 27 | * 28 | * 29 | * 30 | * 31 | *
    32 | *

    {{item.what}}

    33 | *

    {{item.who}}

    34 | *

    35 | * {{item.notes}} 36 | *

    37 | *
    38 | * 39 | *
    40 | *
    41 | *
    42 | * 43 | */ 44 | function materialListDirective() { 45 | return { 46 | restrict: 'E', 47 | link: function($scope, $element, $attr) { 48 | } 49 | }; 50 | } 51 | 52 | /** 53 | * @ngdoc directive 54 | * @name materialItem 55 | * @module material.components.list 56 | * 57 | * @restrict E 58 | * 59 | * @description 60 | * The `` directive is a container intended for row items in a `` container. 61 | * 62 | * @usage 63 | * 64 | * 65 | * 66 | * Item content in list 67 | * 68 | * 69 | * 70 | * 71 | */ 72 | function materialItemDirective() { 73 | return { 74 | restrict: 'E', 75 | link: function($scope, $element, $attr) { 76 | } 77 | }; 78 | } 79 | -------------------------------------------------------------------------------- /src/components/checkbox/_checkbox.scss: -------------------------------------------------------------------------------- 1 | 2 | material-checkbox { 3 | display: block; 4 | margin: 15px; 5 | white-space: nowrap; 6 | cursor: pointer; 7 | 8 | input { 9 | display: none; 10 | } 11 | 12 | .material-container { 13 | position: relative; 14 | top: 4px; 15 | display: inline-block; 16 | width: $checkbox-width; 17 | height: $checkbox-height; 18 | cursor: pointer; 19 | 20 | material-ripple { 21 | position: absolute; 22 | top: -20px; 23 | left: -20px; 24 | display: block; 25 | width: 56px; 26 | height: 56px; 27 | } 28 | 29 | .material-ink-ripple { 30 | color: #0f9d58; 31 | } 32 | 33 | } 34 | 35 | &.material-checked .material-ink-ripple { 36 | color: #5a5f5a; 37 | } 38 | 39 | .circle { 40 | border-radius: 50%; 41 | } 42 | 43 | // unchecked 44 | .material-icon { 45 | @include transition(240ms); 46 | position: absolute; 47 | top: 0; 48 | left: 0; 49 | width: $checkbox-width; 50 | height: $checkbox-height; 51 | border: 2px solid #6D6D6D; 52 | border-radius: 2px; 53 | } 54 | 55 | // checked 56 | &.material-checked .material-icon { 57 | border-color: #4CAF50; 58 | background: #4CAF50; 59 | } 60 | 61 | &.material-checked .material-icon:after { 62 | @include transform-rotate(45deg); 63 | position: absolute; 64 | left: 4px; 65 | display: table; 66 | width: 6px; 67 | height: 12px; 68 | border: 2px solid $color-grey-200; 69 | border-top: 0; 70 | border-left: 0; 71 | content: ' '; 72 | } 73 | 74 | .material-label { 75 | position: relative; 76 | display: inline-block; 77 | margin-left: 10px; 78 | vertical-align: middle; 79 | white-space: normal; 80 | pointer-events: none; 81 | } 82 | 83 | } 84 | -------------------------------------------------------------------------------- /src/components/form/_form.scss: -------------------------------------------------------------------------------- 1 | form { 2 | } 3 | 4 | label { 5 | display: block; 6 | font-size: $input-font-size; 7 | } 8 | 9 | textarea, 10 | input[type="text"], 11 | input[type="password"], 12 | input[type="datetime"], 13 | input[type="datetime-local"], 14 | input[type="date"], 15 | input[type="month"], 16 | input[type="time"], 17 | input[type="week"], 18 | input[type="number"], 19 | input[type="email"], 20 | input[type="url"], 21 | input[type="search"], 22 | input[type="tel"], 23 | input[type="color"] { 24 | display: block; 25 | border-width: 0 0 1px 0; 26 | line-height: $input-line-height; 27 | font-size: $input-font-size; 28 | 29 | &:focus { 30 | outline: 0; 31 | } 32 | } 33 | 34 | input, textarea { 35 | @include input-placeholder($input-placeholder-color); 36 | background: none; 37 | } 38 | 39 | material-input-group, 40 | .material-input-group { 41 | margin: $input-group-margin; 42 | 43 | position: relative; 44 | 45 | input, textarea { 46 | @include transition($input-label-transition); 47 | 48 | color: $input-color; 49 | } 50 | 51 | &.material-input-group-inverted { 52 | input { 53 | color: $input-color-inverted; 54 | } 55 | } 56 | 57 | label { 58 | -webkit-font-smoothing: antialiased; 59 | z-index: 1; 60 | 61 | @include transform-translate3d(0, $input-line-height, 0); 62 | @include transform-origin(left, center); 63 | @include transition($input-label-transition); 64 | 65 | color: $input-placeholder-color; 66 | 67 | &:hover { 68 | cursor: text; 69 | } 70 | } 71 | 72 | &.material-input-focused, &.material-input-has-value { 73 | 74 | input { 75 | border-bottom-width: 2px; 76 | } 77 | 78 | label { 79 | @include transform-translate3d-scale(0, 0, 0, $input-focused-scale); 80 | } 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /src/components/radioButton/_radio-button.scss: -------------------------------------------------------------------------------- 1 | 2 | material-radio-button { 3 | display: block; 4 | margin: 15px; 5 | white-space: nowrap; 6 | cursor: pointer; 7 | 8 | input { 9 | display: none; 10 | } 11 | 12 | .material-container { 13 | position: relative; 14 | top: 4px; 15 | display: inline-block; 16 | width: $radio-width; 17 | height: $radio-width; 18 | cursor: pointer; 19 | 20 | .material-ink-ripple { 21 | color: #0f9d58; 22 | } 23 | 24 | material-ripple { 25 | display: block; 26 | position: absolute; 27 | width: 56px; 28 | height: 56px; 29 | top: -20px; 30 | left: -20px; 31 | } 32 | } 33 | 34 | 35 | .material-off { 36 | position: absolute; 37 | top: 0px; 38 | left: 0px; 39 | width: $radio-width; 40 | height: $radio-width; 41 | border: solid 2px; 42 | border-color: #5a5a5a; 43 | border-radius: 50%; 44 | } 45 | 46 | .material-on { 47 | position: absolute; 48 | top: 0; 49 | left: 0; 50 | width: $radio-width; 51 | height: $radio-width; 52 | border-radius: 50%; 53 | background-color: #0f9d58; 54 | transition: -webkit-transform ease 0.28s; 55 | transition: transform ease 0.28s; 56 | -webkit-transform: scale(0); 57 | transform: scale(0); 58 | } 59 | 60 | &.material-checked .material-on { 61 | -webkit-transform: scale(1.1); 62 | transform: scale(1.1); 63 | } 64 | 65 | &.material-checked .material-ink-ripple { 66 | color: #119957; 67 | } 68 | 69 | .material-label { 70 | position: relative; 71 | display: inline-block; 72 | margin-left: 10px; 73 | vertical-align: middle; 74 | white-space: normal; 75 | pointer-events: none; 76 | } 77 | 78 | .circle { 79 | border-radius: 50%; 80 | } 81 | 82 | } 83 | -------------------------------------------------------------------------------- /src/components/form/form.spec.js: -------------------------------------------------------------------------------- 1 | describe('materialInputGroup directive', function() { 2 | beforeEach(module('material.components.form')); 3 | 4 | function setup(inputAttrs) { 5 | var el; 6 | inject(function($compile, $rootScope) { 7 | el = $compile('
    ' + 8 | '' + 9 | '' + 10 | '
    ')($rootScope.$new()); 11 | $rootScope.$apply(); 12 | }); 13 | return el; 14 | } 15 | it('should set input class for focus & blur', function() { 16 | var el = setup(); 17 | var input = el.find('input'); 18 | input.triggerHandler('focus'); 19 | expect(el.hasClass('material-input-focused')).toBe(true); 20 | input.triggerHandler('blur'); 21 | expect(el.hasClass('material-input-focused')).toBe(false); 22 | }); 23 | 24 | it('should set input class for input event', function() { 25 | var el = setup(); 26 | var input = el.find('input'); 27 | input.val('cat'); 28 | input.triggerHandler('input'); 29 | expect(el.hasClass('material-input-has-value')).toBe(true); 30 | input.val(''); 31 | input.triggerHandler('input'); 32 | expect(el.hasClass('material-input-has-value')).toBe(false); 33 | }); 34 | 35 | it('should set input class for ngModel render', function() { 36 | var el = setup('ng-model="something"'); 37 | var input = el.find('input'); 38 | expect(el.hasClass('material-input-has-value')).toBe(false); 39 | input.scope().$apply('something = "123"'); 40 | expect(el.hasClass('material-input-has-value')).toBe(true); 41 | input.scope().$apply('something = ""'); 42 | expect(el.hasClass('material-input-has-value')).toBe(false); 43 | }); 44 | }); 45 | -------------------------------------------------------------------------------- /docs/templates/readme.template.html: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | {$ doc.content | marked $} 4 |
    5 |
    6 | 7 |
    10 | 11 | 12 |
    13 | {{demo.name}} 14 | 15 | 17 | Show Demo Source 18 | 19 |
    20 |
    21 | 22 | 23 | 27 | 28 | 29 | 30 | 31 |
    32 |
    33 | 36 | 37 |
    38 |
    39 |
    40 | 41 |
    42 | 46 |
    47 | 48 |
    49 |
    50 | 51 |
    52 | 53 | -------------------------------------------------------------------------------- /src/components/tabs/_tabs.scss: -------------------------------------------------------------------------------- 1 | 2 | material-tabs { 3 | display: block; 4 | width: 100%; 5 | font-weight: 500; 6 | font-size: 14px; 7 | 8 | .tabs-header { 9 | width: 100%; 10 | overflow: hidden; 11 | position: relative; 12 | @include box-sizing(border-box); 13 | 14 | .tabs-header-items { 15 | @include flex-display(); 16 | @include box-sizing(border-box); 17 | overflow: hidden; 18 | background-color: #4285F4; 19 | white-space: nowrap; 20 | align-items: stretch; 21 | font-size: 14px; 22 | font-weight: 500; 23 | text-transform: uppercase; 24 | } 25 | } 26 | 27 | .tabs-content { 28 | overflow: hidden; 29 | width: 100%; 30 | } 31 | 32 | material-ink-bar { 33 | left: 0; 34 | bottom: 0; 35 | @include box-sizing(border-box); 36 | &.animate { 37 | @include transition(all 350ms linear); 38 | } 39 | } 40 | } 41 | 42 | material-tab { 43 | @include flex(1); 44 | @include flex-display(); 45 | @include box-sizing(border-box); 46 | @include flex-align-items(center); 47 | @include flex-justify-content(center); 48 | position: relative; 49 | z-index: 0; 50 | overflow: hidden; 51 | line-height: 40px; 52 | text-align: center; 53 | cursor: pointer; 54 | 55 | @include not-selectable(); 56 | 57 | material-tab-label { 58 | @include flex(1); 59 | z-index: 100; 60 | 61 | color: #9FC1FB; 62 | 63 | color: rgba(255,255,255,0.6); 64 | opacity: 1; 65 | 66 | &.active { 67 | color: white; 68 | } 69 | 70 | &.disabled { 71 | color: #6a6a6a; 72 | opacity: 0.5; 73 | 74 | &:hover { 75 | cursor: default; 76 | } 77 | } 78 | 79 | } 80 | 81 | } 82 | 83 | shadow { 84 | box-shadow: 0px 3px 2px rgba(0, 0, 0, 0.2); 85 | } 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /docs/templates/ngdoc/api/directive.template.html: -------------------------------------------------------------------------------- 1 | {% include "lib/macros.html" -%} 2 | {% extends "api/api.template.html" %} 3 | 4 | {% block additional %} 5 | 6 | {% block usage %} 7 |
    8 |

    Usage

    9 | {% if doc.usage %} 10 | {$ doc.usage | marked $} 11 | {% else %} 12 |
      13 | {% if doc.restrict.element %} 14 |
    • as element: 15 | {% code %} 16 | <{$ doc.name | dashCase $} 17 | {%- for param in doc.params %} 18 | {$ directiveParam(param.alias or param.name, param.type, '="', '"') $} 19 | {%- endfor %}> 20 | ... 21 | 22 | {% endcode %} 23 |
    • 24 | {% endif -%} 25 | 26 | {%- if doc.restrict.attribute -%} 27 |
    • as attribute: 28 | {% code %} 29 | <{$ doc.element $} 30 | {%- for param in doc.params %} 31 | {$ directiveParam(param.name, param.type, '="', '"') $} 32 | {%- endfor %}> 33 | ... 34 | 35 | {% endcode %} 36 |
    • 37 | {% endif -%} 38 | 39 | {%- if doc.restrict.cssClass -%} 40 |
    • as CSS class: 41 | {% code %} 42 | {% set sep = joiner(' ') %} 43 | <{$ doc.element $} class=" 44 | {%- for param in doc.params -%} 45 | {$ sep() $}{$ directiveParam(param.name, param.type, ': ', ';') $} 46 | {%- endfor %}"> ... 47 | {% endcode %} 48 |
    • 49 | {% endif -%} 50 | 51 | {%- endif %} 52 |
    53 | {% endblock -%} 54 | 55 | {%- if doc.animations %} 56 |

    Animations

    57 | {$ doc.animations | marked $} 58 | {$ 'module:ngAnimate.$animate' | link('Click here', doc) $} to learn more about the steps involved in the animation. 59 | {%- endif -%} 60 | 61 | {% include "lib/params.template.html" %} 62 | {% include "lib/events.template.html" %} 63 | {% endblock %} 64 | -------------------------------------------------------------------------------- /src/components/tabs/demos/demo5/style.css: -------------------------------------------------------------------------------- 1 | .tabs-view { 2 | position: absolute; 3 | top: 149px; 4 | bottom: 0; 5 | right: 0; 6 | left: 0; 7 | animation-duration: 0.35s; 8 | animation-timing-function: ease-in-out; 9 | -webkit-animation-duration: 0.35s; 10 | -webkit-animation-timing-function: ease-in-out; 11 | } 12 | 13 | .tabs-view.ng-enter { 14 | animation-name: slideFromRight; 15 | -webkit-animation-name: slideFromRight; 16 | } 17 | .tabs-view.reverse.ng-enter { 18 | animation-name: slideFromLeft; 19 | -webkit-animation-name: slideFromLeft; 20 | } 21 | .tabs-view.ng-leave { 22 | animation-name: slideToLeft; 23 | -webkit-animation-name: slideToLeft; 24 | } 25 | .tabs-view.reverse.ng-leave { 26 | animation-name: slideToRight; 27 | -webkit-animation-name: slideToRight; 28 | } 29 | 30 | @keyframes slideFromRight { 31 | 0% { transform: translateX(100%); } 32 | 100% { transform: translateX(0); } 33 | } 34 | @keyframes slideFromLeft { 35 | 0% { transform: translateX(-100%); } 36 | 100% { transform: translateX(0); } 37 | } 38 | @keyframes slideToRight { 39 | 0% { transform: translateX(0); } 40 | 100% { transform: translateX(100%); } 41 | } 42 | @keyframes slideToLeft { 43 | 0% { transform: translateX(0); } 44 | 100% { transform: translateX(-100%); } 45 | } 46 | 47 | @-webkit-keyframes slideFromRight { 48 | 0% { -webkit-transform: translateX(100%); } 49 | 100% { -webkit-transform: translateX(0); } 50 | } 51 | @-webkit-keyframes slideFromLeft { 52 | 0% { -webkit-transform: translateX(-100%); } 53 | 100% { -webkit-transform: translateX(0); } 54 | } 55 | @-webkit-keyframes slideToRight { 56 | 0% { -webkit-transform: translateX(0); } 57 | 100% { -webkit-transform: translateX(100%); } 58 | } 59 | @-webkit-keyframes slideToLeft { 60 | 0% { -webkit-transform: translateX(0); } 61 | 100% { -webkit-transform: translateX(-100%); } 62 | } 63 | 64 | 65 | ng-view { 66 | padding-left: 40px; 67 | } 68 | 69 | ng-view.tabs-view { 70 | margin-left: 20px; 71 | margin-right: 20px; 72 | margin-bottom: 20px; 73 | top: 60px; 74 | height:200px; 75 | } 76 | -------------------------------------------------------------------------------- /docs/index.js: -------------------------------------------------------------------------------- 1 | var _ = require('lodash'); 2 | var path = require('canonical-path'); 3 | var buildConfig = require('../config/build.config'); 4 | 5 | var projectPath = path.resolve(__dirname, '..'); 6 | var packagePath = __dirname; 7 | 8 | module.exports = function(config) { 9 | 10 | require('dgeni-packages/ngdoc')(config); 11 | 12 | config.merge('rendering.nunjucks.config.tags', { 13 | variableStart: '{$', 14 | variableEnd: '$}', 15 | blockStart: '{%', 16 | blockEnd: '%}' 17 | }); 18 | 19 | config.set('buildConfig', buildConfig); 20 | config.set('rendering.outputFolder', path.join(projectPath, buildConfig.docsDist)); 21 | config.set('rendering.contentsFolder', path.join(config.rendering.outputFolder, 'generated')); 22 | 23 | config.set('rendering.templateFolders', [ 24 | path.resolve(packagePath, 'templates'), 25 | path.resolve(packagePath, 'templates/ngdoc'), 26 | path.resolve(packagePath, 'templates/ngdoc/api'), 27 | path.resolve(packagePath, 'templates/ngdoc/lib'), 28 | ]); 29 | 30 | config.append('processing.tagDefinitions', require('./tag-defs')); 31 | 32 | config.set('processing.componentsGenerate', { 33 | componentOutputFolder: 'generated/${component.id}', 34 | docSubFolder: '${doc.docType}/${doc.id || doc.name}' 35 | }); 36 | 37 | config.set('basePath', projectPath); 38 | config.set('logging.level', 'info'); 39 | 40 | config.set('source.fileReaders', [ 41 | require('./file-readers/json') 42 | ]); 43 | config.set('source.projectPath', projectPath); 44 | config.set('source.repository', buildConfig.repository); 45 | config.set('source.files', ['src/components/*/module.json']); 46 | 47 | config.append('processing.processors', [ 48 | require('./processors/jsdoc'), 49 | require('./processors/components-generate'), 50 | ]); 51 | 52 | //Remove some of the default ngdoc processors, we won't use them 53 | _(config.get('processing.processors')) 54 | .remove(require('dgeni-packages/ngdoc/processors/component-groups-generate')) 55 | .remove(require('dgeni-packages/ngdoc/processors/compute-path')); 56 | 57 | return config; 58 | }; 59 | -------------------------------------------------------------------------------- /src/components/toast/_toast.scss: -------------------------------------------------------------------------------- 1 | 2 | material-toast { 3 | @include flex-display(); 4 | @include box-sizing(border-box); 5 | @include flex-align-items(center); 6 | 7 | background: #323232; 8 | color: #f1f1f1; 9 | min-height: 48px; 10 | min-width: 288px; 11 | padding-left: 24px; 12 | padding-right: 24px; 13 | height: 24px; 14 | 15 | box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26); 16 | border-radius: 2px; 17 | font-size: 14px; 18 | cursor: default; 19 | 20 | position: fixed; 21 | max-width: 879px; 22 | max-height: 40px; 23 | 24 | bottom: 12px; 25 | 26 | material-button { 27 | color: white; 28 | } 29 | 30 | &.capsule { 31 | border-radius: 24px; 32 | } 33 | 34 | &.bottom { 35 | bottom: 12px; 36 | } 37 | &.top { 38 | top: 12px; 39 | } 40 | &.left { 41 | left: 12px; 42 | } 43 | &.right { 44 | right: 12px; 45 | } 46 | 47 | &.fit { 48 | left: 0; 49 | right: 0; 50 | width: 100%; 51 | max-width: 100%; 52 | min-width: 0; 53 | border-radius: 0; 54 | &.bottom { 55 | bottom: 0; 56 | } 57 | &.top { 58 | top: 0; 59 | } 60 | } 61 | 62 | opacity: 1; 63 | transform: translate(0, 0); 64 | -webkit-transform: translate(0, 0); 65 | transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out; 66 | -webkit-transition: -webkit-transform 0.2s ease-in-out, opacity 0.2s ease-in-out; 67 | 68 | &.ng-enter { 69 | // Take slightly longer to enter 70 | -webkit-transition-duration: 0.35s; 71 | transition-duration: 0.35s; 72 | opacity: 0; 73 | &.ng-enter-active { 74 | opacity: 1; 75 | } 76 | } 77 | &.ng-leave.ng-leave-active { 78 | opacity: 0; 79 | &.bottom { 80 | -webkit-transform: translate(0, 100%); 81 | transform: translate(0, 100%); 82 | } 83 | &.top { 84 | -webkit-transform: translate(0, -100%); 85 | transform: translate(0, -100%); 86 | } 87 | } 88 | } 89 | 90 | .toast-action { 91 | line-height: 19px; 92 | color: #eeff41; 93 | padding-left: 24px; 94 | cursor: pointer; 95 | text-transform: uppercase; 96 | float: right; 97 | } 98 | -------------------------------------------------------------------------------- /src/services/registry/registry.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @ngdoc overview 3 | * @name material.services.registry 4 | * 5 | * @description 6 | * A component registry system for accessing various component instances in an app. 7 | */ 8 | angular.module('material.services.registry', [ 9 | ]) 10 | .factory('$materialComponentRegistry', [ 11 | '$log', 12 | materialComponentRegistry 13 | ]); 14 | 15 | /** 16 | * @ngdoc service 17 | * @name material.services.registry.service:$materialComponentRegistry 18 | * 19 | * @description 20 | * $materialComponentRegistry enables the user to interact with multiple instances of 21 | * certain complex components in a running app. 22 | */ 23 | function materialComponentRegistry($log) { 24 | var instances = []; 25 | 26 | return { 27 | /** 28 | * Used to print an error when an instance for a handle isn't found. 29 | */ 30 | notFoundError: function(handle) { 31 | $log.error('No instance found for handle', handle); 32 | }, 33 | /** 34 | * Return all registered instances as an array. 35 | */ 36 | getInstances: function() { 37 | return instances; 38 | }, 39 | 40 | /** 41 | * Get a registered instance. 42 | * @param handle the String handle to look up for a registered instance. 43 | */ 44 | get: function(handle) { 45 | var i, j, instance; 46 | for(i = 0, j = instances.length; i < j; i++) { 47 | instance = instances[i]; 48 | if(instance.$$materialHandle === handle) { 49 | return instance; 50 | } 51 | } 52 | return null; 53 | }, 54 | 55 | /** 56 | * Register an instance. 57 | * @param instance the instance to register 58 | * @param handle the handle to identify the instance under. 59 | */ 60 | register: function(instance, handle) { 61 | instance.$$materialHandle = handle; 62 | instances.push(instance); 63 | 64 | return function deregister() { 65 | var index = instances.indexOf(instance); 66 | if (index !== -1) { 67 | instances.splice(index, 1); 68 | } 69 | }; 70 | }, 71 | } 72 | } 73 | 74 | -------------------------------------------------------------------------------- /src/components/tabs/demos/demo4/script.js: -------------------------------------------------------------------------------- 1 | angular.module('app', ['ngMaterial']) 2 | .controller('AppCtrl', function ($scope, $interpolate) { 3 | var tabs = [ 4 | { title: 'Polymer', active: true, disabled: false, content: "Polymer practices are great!" }, 5 | { title: 'Material', active: false, disabled: false, content: "Material Design practices are better!" }, 6 | { title: 'Angular', active: false, disabled: true, content: "AngularJS practices are the best!" }, 7 | { title: 'NodeJS', active: false, disabled: false, content: "NodeJS practices are amazing!" } 8 | ]; 9 | 10 | $scope.tabs = tabs; 11 | $scope.predicate = "title"; 12 | $scope.reversed = true; 13 | $scope.selectedIndex = 2; 14 | $scope.allowDisable = true; 15 | 16 | $scope.onTabSelected = onTabSelected; 17 | $scope.announceSelected = announceSelected; 18 | $scope.announceDeselected = announceDeselected; 19 | 20 | $scope.addTab = function (title, view) { 21 | view = view || title + " Content View"; 22 | tabs.push({ title: title, content: view, active: false, disabled: false}); 23 | }; 24 | 25 | $scope.removeTab = function (tab) { 26 | for (var j = 0; j < tabs.length; j++) { 27 | if (tab.title == tabs[j].title) { 28 | $scope.tabs.splice(j, 1); 29 | break; 30 | } 31 | } 32 | } 33 | 34 | $scope.submit = function ($event) { 35 | if ($event.which !== 13) return; 36 | if ($scope.tTitle != "") { 37 | $scope.addTab($scope.tTitle, $scope.tContent); 38 | } 39 | } 40 | 41 | // ********************************************************** 42 | // Private Methods 43 | // ********************************************************** 44 | 45 | function onTabSelected(tab) { 46 | $scope.selectedIndex = this.$index; 47 | 48 | $scope.announceSelected(tab); 49 | } 50 | 51 | function announceDeselected(tab) { 52 | $scope.farewell = $interpolate("Goodbye {{title}}!")(tab); 53 | } 54 | 55 | function announceSelected(tab) { 56 | $scope.greeting = $interpolate("Hello {{title}}!")(tab); 57 | } 58 | 59 | }); 60 | 61 | -------------------------------------------------------------------------------- /src/components/tabs/demos/demo4/index.html: -------------------------------------------------------------------------------- 1 | 2 |
    3 | 4 | 5 | 6 | 7 | 12 | {{tab.content}} 13 | Remove Tab 15 | 16 | 17 | 18 | 19 | 20 |
    21 | 22 | 23 | 24 | Active Tab Index: {{selectedIndex}} 25 | 26 | 27 | 28 | Disable Tab #2? 29 | 30 | 31 | 32 | 33 | Reversed Order? 34 | 35 | 36 | 37 | 38 | 39 |
    Add Another Tab
    40 | 41 |
    42 |
    43 | Title: 44 | 45 |
    46 |
    47 | Content: 48 | 49 |
    50 | 51 | Add New Tab 52 | 53 |
    54 | 55 |
    56 |
    57 | -------------------------------------------------------------------------------- /src/theme/_fonts.scss: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'RobotoDraft'; 3 | font-style: normal; 4 | font-weight: 100; 5 | src: local('RobotoDraft Thin'), local('RobotoDraft-Thin'), url(//fonts.gstatic.com/s/robotodraft/v1/hope9NW9iJ5hh8P5PM_EAyeJLMOzE6CCkidNEpZOseY.woff) format('woff'); 6 | } 7 | @font-face { 8 | font-family: 'RobotoDraft'; 9 | font-style: normal; 10 | font-weight: 300; 11 | src: local('RobotoDraft Light'), local('RobotoDraft-Light'), url(//fonts.gstatic.com/s/robotodraft/v1/u0_CMoUf3y3-4Ss4ci-VwR_xHqYgAV9Bl_ZQbYUxnQU.woff) format('woff'); 12 | } 13 | @font-face { 14 | font-family: 'RobotoDraft'; 15 | font-style: normal; 16 | font-weight: 400; 17 | src: local('RobotoDraft'), local('RobotoDraft-Regular'), url(//fonts.gstatic.com/s/robotodraft/v1/0xES5Sl_v6oyT7dAKuoni4bN6UDyHWBl620a-IRfuBk.woff) format('woff'); 18 | } 19 | @font-face { 20 | font-family: 'RobotoDraft'; 21 | font-style: normal; 22 | font-weight: 500; 23 | src: local('RobotoDraft Medium'), local('RobotoDraft-Medium'), url(//fonts.gstatic.com/s/robotodraft/v1/u0_CMoUf3y3-4Ss4ci-VwSqHEX2q--o2so14pIEl08w.woff) format('woff'); 24 | } 25 | @font-face { 26 | font-family: 'RobotoDraft'; 27 | font-style: normal; 28 | font-weight: 700; 29 | src: local('RobotoDraft Bold'), local('RobotoDraft-Bold'), url(//fonts.gstatic.com/s/robotodraft/v1/u0_CMoUf3y3-4Ss4ci-VwTqR_3kx9_hJXbbyU8S6IN0.woff) format('woff'); 30 | } 31 | @font-face { 32 | font-family: 'RobotoDraft'; 33 | font-style: normal; 34 | font-weight: 900; 35 | src: local('RobotoDraft Black'), local('RobotoDraft-Black'), url(//fonts.gstatic.com/s/robotodraft/v1/u0_CMoUf3y3-4Ss4ci-VwUExzZ44ka2Lr5i-x5aWr0E.woff) format('woff'); 36 | } 37 | @font-face { 38 | font-family: 'RobotoDraft'; 39 | font-style: italic; 40 | font-weight: 400; 41 | src: local('RobotoDraft Italic'), local('RobotoDraft-Italic'), url(//fonts.gstatic.com/s/robotodraft/v1/er-TIW55l9KWsTS1x9bTftkZXW4sYc4BjuAIFc1SXII.woff) format('woff'); 42 | } 43 | @font-face { 44 | font-family: 'RobotoDraft'; 45 | font-style: italic; 46 | font-weight: 700; 47 | src: local('RobotoDraft Bold Italic'), local('RobotoDraft-BoldItalic'), url(//fonts.gstatic.com/s/robotodraft/v1/5SAvdU0uYYlH8OURAykt5wRV2F9RPTaqyJ4QibDfkzM.woff) format('woff'); 48 | } 49 | -------------------------------------------------------------------------------- /src/components/tabs/util/digestConnector.js: -------------------------------------------------------------------------------- 1 | /* 2 | * This function() provides scope-relative features to disconnect and reconnect to the $digest() processes 3 | * NOTE: this is essentially a reversible $destroy() for scopes. 4 | * 5 | * Detaching the scope would mean: 6 | * 7 | * Detaching the scope from the scope's current parent so that watchers no 8 | * longer fire when the scope's current parent's $digest is called 9 | * 10 | * On re-attaching to a DOM element (as a child): 11 | * 12 | * It would be attached as he child scope of the DOM element. This is useful 13 | * for optimizations such as not running watchers on hidden DOM (that could be detached). 14 | * 15 | * @see https://github.com/angular/angular.js/issues/5301 16 | * 17 | */ 18 | function addDigestConnector (scope) { 19 | var disconnect = function () { 20 | if (this.$root === this) { 21 | return; // we can't disconnect the root node; 22 | } 23 | var parent = this.$parent; 24 | this.$$disconnected = true; 25 | // See Scope.$destroy 26 | if (parent.$$childHead === this) { 27 | parent.$$childHead = this.$$nextSibling; 28 | } 29 | if (parent.$$childTail === this) { 30 | parent.$$childTail = this.$$prevSibling; 31 | } 32 | if (this.$$prevSibling) { 33 | this.$$prevSibling.$$nextSibling = this.$$nextSibling; 34 | } 35 | if (this.$$nextSibling) { 36 | this.$$nextSibling.$$prevSibling = this.$$prevSibling; 37 | } 38 | this.$$nextSibling = this.$$prevSibling = null; 39 | }; 40 | var reconnect = function () { 41 | if (this.$root === this) { 42 | return; // we can't disconnect the root node; 43 | } 44 | var child = this; 45 | if (!child.$$disconnected) { 46 | return; 47 | } 48 | var parent = child.$parent; 49 | child.$$disconnected = false; 50 | // See Scope.$new for this logic... 51 | child.$$prevSibling = parent.$$childTail; 52 | if (parent.$$childHead) { 53 | parent.$$childTail.$$nextSibling = child; 54 | parent.$$childTail = child; 55 | } else { 56 | parent.$$childHead = parent.$$childTail = child; 57 | } 58 | }; 59 | 60 | scope.$disconnect = angular.bind( scope, disconnect ); 61 | scope.$reconnect = angular.bind( scope, reconnect ); 62 | 63 | return scope; 64 | } 65 | -------------------------------------------------------------------------------- /docs/app/js/highlight-angular.js: -------------------------------------------------------------------------------- 1 | DocsApp 2 | 3 | .directive('hljs', ['$compile', function($compile) { 4 | return { 5 | restrict: 'E', 6 | compile: function(element, attr) { 7 | var code; 8 | //No attribute? code is the content 9 | if (!attr.code) { 10 | code = element.html(); 11 | element.empty(); 12 | } 13 | 14 | return function(scope, element, attr) { 15 | var contentParent = angular.element('
    '); 16 | var codeElement = contentParent.find('code'); 17 | 18 | // Attribute? code is the evaluation 19 | if (attr.code) { 20 | code = scope.$eval(attr.code); 21 | } 22 | var highlightedCode = hljs.highlight(attr.language || attr.lang, code.trim()); 23 | highlightedCode.value = highlightedCode.value.replace(/=""<\/span>/gi, ''); 24 | codeElement.append(highlightedCode.value).addClass('highlight'); 25 | 26 | element.append(contentParent); 27 | }; 28 | } 29 | }; 30 | }]) 31 | 32 | .directive('codeView', function() { 33 | return { 34 | restrict: 'C', 35 | link: function(scope, element) { 36 | var code = element.eq(0).clone(); 37 | code.children().removeAttr('class'); 38 | 39 | var highlightedCode = hljs.highlight('html', code[0].innerHTML); 40 | 41 | highlightedCode.value = highlightedCode.value.replace(/=""<\/span>/gi, ''); 42 | 43 | element.prepend('
    ' + highlightedCode.value + '
    '); 44 | element.find('code').addClass('highlight'); 45 | } 46 | }; 47 | }) 48 | 49 | .directive('iframeCodeView', function() { 50 | return { 51 | restrict: 'E', 52 | link: function(scope, element) { 53 | var iFrame = element[0].firstElementChild; 54 | if(iFrame && iFrame.src) { 55 | var links = angular.element( 56 | '

    Full View \ 57 | View Source

    ' 58 | ); 59 | element.append(links); 60 | } 61 | } 62 | }; 63 | }); 64 | -------------------------------------------------------------------------------- /src/components/toolbar/demo1/index.html: -------------------------------------------------------------------------------- 1 | 2 |
    3 | 4 | 5 | 6 | 7 |

    8 | Toolbar: light-theme (default) 9 |

    10 |
    11 | 12 |
    13 | 14 | 15 |

    16 | Toolbar: dark-theme 17 |

    18 |
    19 | 20 |
    21 | 22 | 23 |

    24 | Toolbar: tall 25 |

    26 |
    27 | 28 |
    29 | 30 | 31 | 32 |

    33 | Toolbar: tall with actions pin to the bottom 34 |

    35 |
    36 | 37 |
    38 | 39 | 40 |

    41 | 42 | 43 | 44 |

    45 | 46 |

    47 | Toolbar: medium tall with label aligns to the bottom 48 |

    49 |
    50 | 51 |
    52 | 53 | 54 |

    55 | 56 | 57 | 58 |

    59 |

    60 | Toolbar: label aligns to the middle 61 |

    62 | 63 |

    64 |
    Some stuff aligns to the bottom
    65 |

    66 |
    67 | 68 |
    69 |
    70 | -------------------------------------------------------------------------------- /docs/app/css/highlightjs-github.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | github.com style (c) Vasily Polovnyov 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; padding: 0.5em; 9 | color: #333; 10 | background: #f8f8f8 11 | } 12 | 13 | .hljs-comment, 14 | .hljs-template_comment, 15 | .diff .hljs-header, 16 | .hljs-javadoc { 17 | color: #998; 18 | font-style: italic 19 | } 20 | 21 | .hljs-keyword, 22 | .css .rule .hljs-keyword, 23 | .hljs-winutils, 24 | .javascript .hljs-title, 25 | .nginx .hljs-title, 26 | .hljs-subst, 27 | .hljs-request, 28 | .hljs-status { 29 | color: #333; 30 | font-weight: bold 31 | } 32 | 33 | .hljs-number, 34 | .hljs-hexcolor, 35 | .ruby .hljs-constant { 36 | color: #099; 37 | } 38 | 39 | .hljs-string, 40 | .hljs-tag .hljs-value, 41 | .hljs-phpdoc, 42 | .tex .hljs-formula { 43 | color: #d14 44 | } 45 | 46 | .hljs-title, 47 | .hljs-id, 48 | .coffeescript .hljs-params, 49 | .scss .hljs-preprocessor { 50 | color: #900; 51 | font-weight: bold 52 | } 53 | 54 | .javascript .hljs-title, 55 | .lisp .hljs-title, 56 | .clojure .hljs-title, 57 | .hljs-subst { 58 | font-weight: normal 59 | } 60 | 61 | .hljs-class .hljs-title, 62 | .haskell .hljs-type, 63 | .vhdl .hljs-literal, 64 | .tex .hljs-command { 65 | color: #458; 66 | font-weight: bold 67 | } 68 | 69 | .hljs-tag, 70 | .hljs-tag .hljs-title, 71 | .hljs-rules .hljs-property, 72 | .django .hljs-tag .hljs-keyword { 73 | color: #000080; 74 | font-weight: normal 75 | } 76 | 77 | .hljs-attribute, 78 | .hljs-variable, 79 | .lisp .hljs-body { 80 | color: #008080 81 | } 82 | 83 | .hljs-regexp { 84 | color: #009926 85 | } 86 | 87 | .hljs-symbol, 88 | .ruby .hljs-symbol .hljs-string, 89 | .lisp .hljs-keyword, 90 | .tex .hljs-special, 91 | .hljs-prompt { 92 | color: #990073 93 | } 94 | 95 | .hljs-built_in, 96 | .lisp .hljs-title, 97 | .clojure .hljs-built_in { 98 | color: #0086b3 99 | } 100 | 101 | .hljs-preprocessor, 102 | .hljs-pragma, 103 | .hljs-pi, 104 | .hljs-doctype, 105 | .hljs-shebang, 106 | .hljs-cdata { 107 | color: #999; 108 | font-weight: bold 109 | } 110 | 111 | .hljs-deletion { 112 | background: #fdd 113 | } 114 | 115 | .hljs-addition { 116 | background: #dfd 117 | } 118 | 119 | .diff .hljs-change { 120 | background: #0086b3 121 | } 122 | 123 | .hljs-chunk { 124 | color: #aaa 125 | } 126 | -------------------------------------------------------------------------------- /docs/templates/ngdoc/api/module.template.html: -------------------------------------------------------------------------------- 1 | {% extends "base.template.html" %} 2 | 3 | {% block content %} 4 |

    5 | {% if doc.title %}{$ doc.title | marked $}{% else %}{$ doc.name | code $}{% endif %} 6 |

    7 | 8 | {$ doc.description | marked $} 9 | 10 | {% if doc.name != 'ng' and doc.name != 'auto' %} 11 |

    Installation

    12 | 13 |

    First include {$ doc.packageFile | code $} in your HTML:

    14 | 15 | {% code %} 16 |