├── .gitignore
├── .npmignore
├── README.md
├── build
├── generateToc.coffee
├── index.coffee
├── index.js
├── materialize.config.scss
└── webpack.config.coffee
├── dev
├── babel-import.vue
├── card.vue
├── collapsible.vue
├── dropdown.vue
├── fixed-action-button.vue
├── forms
│ ├── checkbox.vue
│ ├── input-field.vue
│ ├── radio.vue
│ ├── select.vue
│ └── switch.vue
├── icon.vue
├── material-box.vue
├── materialize.config.scss
├── modal.vue
├── parallax.vue
├── pushpin.vue
├── scrollfire.vue
├── scrollspy.vue
├── side-nav.vue
├── toaster.vue
├── tooltip.vue
├── waves.vue
└── webpack.config.coffee
├── fonts
└── roboto
│ ├── Roboto-Bold.ttf
│ ├── Roboto-Bold.woff
│ ├── Roboto-Bold.woff2
│ ├── Roboto-Light.ttf
│ ├── Roboto-Light.woff
│ ├── Roboto-Light.woff2
│ ├── Roboto-Medium.ttf
│ ├── Roboto-Medium.woff
│ ├── Roboto-Medium.woff2
│ ├── Roboto-Regular.ttf
│ ├── Roboto-Regular.woff
│ ├── Roboto-Regular.woff2
│ ├── Roboto-Thin.ttf
│ ├── Roboto-Thin.woff
│ └── Roboto-Thin.woff2
├── karma.conf.coffee
├── package.json
├── sass
├── _color.scss
├── _colorProcessor.scss
└── _forms.scss
├── src
├── card.coffee
├── collapsible-item.coffee
├── collapsible.coffee
├── dropdown.coffee
├── fixed-action-button.coffee
├── icon.coffee
├── input-field.vue
├── material-box.coffee
├── modal.coffee
├── overlay.coffee
├── parallax.coffee
├── pushpin.coffee
├── scrollfire.coffee
├── scrollspy-item.coffee
├── scrollspy.coffee
├── select-option.coffee
├── select.coffee
├── side-nav.coffee
├── switch.coffee
├── toast.vue
├── toaster.coffee
├── tooltip.coffee
└── waves.coffee
└── test
├── card.coffee
├── collapsible.coffee
├── dropdown.coffee
├── fixed-action-button.coffee
├── input-field.coffee
├── material-box.coffee
├── modal.coffee
├── parallax.coffee
├── pushpin.coffee
├── scrollfire.coffee
├── scrollspy.coffee
├── side-nav.coffee
├── switch.coffee
├── toaster.coffee
├── tooltip.coffee
└── waves.coffee
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | *.sublime-project
3 | *.sublime-workspace
4 | npm-debug.log
5 | static
6 | *.js
7 | !build/index.js
8 | .vscode
9 |
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | *.sublime-project
3 | *.sublime-workspace
4 | npm-debug.log
5 | static
6 | dev/index.js
7 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # DEPRECATED see [cerijs](https://github.com/cerijs) and [ceri-materialize](https://github.com/ceri-comps/ceri-materialize)
2 |
3 | # vue-materialize
4 |
5 | [materializeCss](http://materializecss.com/) styles for [vue-comps](https://github.com/vue-comps).
6 |
7 | ### [Demo](https://paulpflug.github.io/vue-materialize)
8 |
9 | # Features
10 |
11 | - No `jQuery` dependency
12 | - `Velocity.js` for animations
13 | - `vue-touch` for touch compability
14 | - Easy style modification
15 | - Only load what you need ([webpack code splitting](https://webpack.github.io/docs/code-splitting.html))
16 |
17 | ### What is missing:
18 |
19 | - carousel
20 | - range & slider
21 | - file-input
22 | - tabs
23 | - date-picker
24 |
25 | # Install
26 |
27 | ```sh
28 | npm install --save-dev vue-materialize
29 | ## When using with webpack (recommended)
30 | # webpack
31 | npm install --save-dev webpack
32 | # style loaders
33 | npm install --save-dev style-loader css-loader sass-loader url-loader file-loader vue-style-loader
34 | # node-sass
35 | npm install --save-dev node-sass
36 | ```
37 | or include `build/bundle.js` (comes with npm install - 159kb - includes `Velocity.js`)
38 |
39 |
40 | ### Import syntax
41 | commonJS allows to require a single js file:
42 | ```coffee
43 | components:
44 | "fab": require("vue-materialize/fixed-action-button") # loads the fixed-action-button.js in the vue-materialize folder
45 | ```
46 |
47 | This is not possible with the es6 import/export.
48 | You can still use it like this:
49 | ```js
50 | import {fixedActionButton} from "vue-materialize"
51 | components: {
52 | "fab": fixedActionButton
53 | }
54 | ```
55 | However, webpack will add ALL components to your bundle this way.
56 |
57 | Webpack 2 comes with tree-shaking to remove all unused components again.
58 | So if you really want to use the import syntax please migrate to webpack 2.
59 |
60 | # Table of contents
61 |
62 |
63 |
64 | - [Style](#style)
65 | * [Webpack config](#webpack-config-top)
66 | * [configure SCSS](#configure-scss-top)
67 | - [Icons](#icons-top)
68 | - [JS](#js)
69 | * [card](#card-top)
70 | * [collapsible](#collapsible-top)
71 | * [dropdown](#dropdown-top)
72 | * [fixed-action-button](#fixed-action-button-top)
73 | * [material-box](#material-box-top)
74 | * [modal](#modal-top)
75 | * [parallax](#parallax-top)
76 | * [pushpin](#pushpin-top)
77 | * [scrollfire](#scrollfire-top)
78 | * [scrollspy](#scrollspy-top)
79 | * [side-nav](#side-nav-top)
80 | * [toaster](#toaster-top)
81 | * [tooltip](#tooltip-top)
82 | * [waves](#waves-top)
83 | - [forms](#forms)
84 | * [radio](#radio-top)
85 | * [checkbox](#checkbox-top)
86 | * [switch](#switch-top)
87 | * [input-field](#input-field-top)
88 | * [Select](#select-top)
89 | - [Changelog](#changelog)
90 | - [License](#license)
91 |
92 |
93 |
94 | ## Style
95 |
96 | For the usage of the css only components see the very good [materialize-css documentation](http://materializecss.com/).
97 |
98 | For style personalisation see the sass variable definitions in the original [repo](https://github.com/Dogfalo/materialize/blob/master/sass/components/_variables.scss).
99 |
100 |
101 |
102 | ### Webpack config [top^](#table-of-contents)
103 | ```coffee
104 | loaders: [
105 | { test: /\.woff(\d*)\??(\d*)$/, loader: "url-loader?limit=10000&mimetype=application/font-woff" }
106 | { test: /\.ttf\??(\d*)$/, loader: "file-loader" }
107 | { test: /\.eot\??(\d*)$/, loader: "file-loader" }
108 | { test: /\.svg\??(\d*)$/, loader: "file-loader" }
109 | { test: /\.scss$/, loader: "style!css!sass?sourceMap"}
110 | ]
111 | ```
112 | ### configure SCSS [top^](#table-of-contents)
113 | create a file, for example `materialize.config.scss`
114 | ```scss
115 | @charset "UTF-8";
116 |
117 | @import "~materialize-css/sass/components/mixins";
118 |
119 | // all colors:
120 | // @import "~materialize-css/sass/components/color";
121 |
122 | // BEGIN: only specific colors
123 | @import "~vue-materialize/sass/color";
124 | // include colors you need
125 | @include do("include-color","black", "base");
126 | @include do("include-color","white", "base");
127 | @import "~vue-materialize/sass/colorProcessor";
128 | // END: only specific colors
129 |
130 | @import "~materialize-css/sass/components/variables";
131 | @import "~materialize-css/sass/components/normalize";
132 | @import "~materialize-css/sass/components/typography";
133 | @import "~materialize-css/sass/components/global";
134 |
135 | // modify variables here
136 | // all available sass variables:
137 | // https://github.com/Dogfalo/materialize/blob/master/sass/components/_variables.scss
138 | // e.g. $dropdown-bg-color: black;
139 |
140 | // css only, no JS needed for these
141 | // activate only what you need
142 | $roboto-font-path: "~materialize-css/fonts/roboto/";
143 | @import "~materialize-css/sass/components/roboto";
144 | @import "~materialize-css/sass/components/icons-material-design"; // icons are no long included in materializeCSS
145 | @import "~materialize-css/sass/components/buttons";
146 | @import "~materialize-css/sass/components/grid";
147 | @import "~materialize-css/sass/components/navbar";
148 | @import "~materialize-css/sass/components/preloader";
149 | @import "~vue-materialize/sass/forms";
150 |
151 | // css for js modules
152 | // activate only what you need
153 | @import "~materialize-css/sass/components/cards";
154 | @import "~materialize-css/sass/components/sideNav";
155 | @import "~materialize-css/sass/components/dropdown";
156 | @import "~materialize-css/sass/components/modal";
157 | @import "~materialize-css/sass/components/collapsible";
158 | @import "~materialize-css/sass/components/table_of_contents"; // scrollspy
159 | @import "~materialize-css/sass/components/forms/input-fields";
160 | // ----- no js but need to be after input-fields
161 | @import "~materialize-css/sass/components/forms/checkboxes";
162 | @import "~materialize-css/sass/components/forms/radio-buttons";
163 | // -----
164 | @import "~materialize-css/sass/components/forms/switches";
165 | @import "~materialize-css/sass/components/forms/select"; // need to be after input-fields
166 | @import "~materialize-css/sass/components/toast";
167 | @import "~materialize-css/sass/components/tooltip";
168 |
169 | // NOT implemented yet:
170 | // @import "~materialize-css/sass/components/tabs";
171 | // @import "~materialize-css/sass/components/slider";
172 | // @import "~materialize-css/sass/components/date_picker/default";
173 | // @import "~materialize-css/sass/components/date_picker/default.date";
174 | // @import "~materialize-css/sass/components/date_picker/default.time";
175 | // @import "~materialize-css/sass/components/forms/file-input";
176 | // @import "~materialize-css/sass/components/forms/range";
177 | ```
178 |
179 | Require it like this:
180 | ```js
181 | require("./materialize.config.scss")
182 | or
183 | import "./materialize.config.scss"
184 | ```
185 |
186 | ## Icons [top^](#table-of-contents)
187 |
188 | No icons are included in the bundle.
189 |
190 | You can either take the [Google Material Design Icons](https://design.google.com/icons/) as a font and use them the materializeCSS way:
191 | ```html
192 | add
193 | ```
194 | or use `vue-icons`:
195 |
196 | #### vue-icons
197 | If you use webpack, you could use [vue-icons](git://github.com/vue-comps/vue-icons), this will allow you to load only the icons you need.
198 | Additional dependencies:
199 | ```sh
200 | npm install --save-dev callback-loader vue-icons@1
201 | ```
202 | Additional webpack config:
203 | ```coffee
204 | module:
205 | postLoaders: [
206 | { test: /vue-icons/, loader: "callback-loader"}
207 | ]
208 | callbackLoader:
209 | require("vue-icons/icon-loader")(["material-add"]) # add all the icons you need
210 | ```
211 | ##### Usage
212 | ```coffee
213 | components:
214 | "icon": require("vue-materialize/icon")
215 | ```
216 | ```html
217 | Some Content Significantly more Content body 1 body 2 some fixed text
233 | Title (click me)
234 |
header1
258 | header21
262 |
487 |
488 |
489 |
490 | ```
491 | [demo](https://paulpflug.github.io/vue-materialize/#!/forms/radio) - [source for demo](dev/forms/radio.vue) - [doc: radio](http://vuejs.org/guide/forms.html#Radio)
492 | ### checkbox [top^](#table-of-contents)
493 | ```html
494 |
495 |
496 |
497 |
498 |
499 |
500 | ```
501 | [demo](https://paulpflug.github.io/vue-materialize/#!/forms/checkbox) - [source for demo](dev/forms/checkbox.vue) - [doc: checkbox](http://vuejs.org/guide/forms.html#Checkbox)
502 |
503 | ### switch [top^](#table-of-contents)
504 | ```coffee
505 | components:
506 | "switch": require("vue-materialize/switch")
507 | # or with bundle.js
508 | "switch": window.vueMaterialize.switch
509 | ```
510 | ```html
511 |