@materializecss/materialize 2.0.3-alpha → 2.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/README.md +1 -1
  2. package/dist/css/materialize.css +345 -236
  3. package/dist/css/materialize.min.css +2 -2
  4. package/dist/js/materialize.js +518 -1979
  5. package/dist/js/materialize.min.js +2 -2
  6. package/dist/js/materialize.min.js.map +1 -1
  7. package/dist/src/buttons.d.ts.map +1 -1
  8. package/dist/src/cards.d.ts.map +1 -1
  9. package/dist/src/collapsible.d.ts +1 -0
  10. package/dist/src/collapsible.d.ts.map +1 -1
  11. package/dist/src/dropdown.d.ts.map +1 -1
  12. package/dist/src/global.d.ts.map +1 -1
  13. package/dist/src/materialbox.d.ts +14 -10
  14. package/dist/src/materialbox.d.ts.map +1 -1
  15. package/dist/src/modal.d.ts.map +1 -1
  16. package/dist/src/range.d.ts.map +1 -1
  17. package/dist/src/scrollspy.d.ts.map +1 -1
  18. package/dist/src/sidenav.d.ts +25 -25
  19. package/dist/src/sidenav.d.ts.map +1 -1
  20. package/dist/src/slider.d.ts +12 -12
  21. package/dist/src/slider.d.ts.map +1 -1
  22. package/dist/src/tabs.d.ts +1 -1
  23. package/dist/src/tabs.d.ts.map +1 -1
  24. package/dist/src/toasts.d.ts +7 -2
  25. package/dist/src/toasts.d.ts.map +1 -1
  26. package/dist/src/tooltip.d.ts +8 -2
  27. package/dist/src/tooltip.d.ts.map +1 -1
  28. package/package.json +14 -13
  29. package/sass/components/_buttons.scss +158 -73
  30. package/sass/components/_chips.scss +75 -28
  31. package/sass/components/_collapsible.scss +14 -2
  32. package/sass/components/_global.scss +6 -94
  33. package/sass/components/_materialbox.scss +2 -2
  34. package/sass/components/_modal.scss +0 -1
  35. package/sass/components/_preloader.scss +85 -0
  36. package/sass/components/_tooltip.scss +18 -8
  37. package/sass/components/_variables.scss +5 -4
  38. package/sass/components/forms/_range.scss +1 -1
  39. package/sass/components/forms/_switches.scss +44 -14
  40. package/Gruntfile.js +0 -480
  41. package/src/autocomplete.ts +0 -553
  42. package/src/bounding.ts +0 -6
  43. package/src/buttons.ts +0 -260
  44. package/src/cards.ts +0 -53
  45. package/src/carousel.ts +0 -676
  46. package/src/characterCounter.ts +0 -117
  47. package/src/chips.ts +0 -439
  48. package/src/collapsible.ts +0 -249
  49. package/src/component.ts +0 -120
  50. package/src/datepicker.ts +0 -1076
  51. package/src/dropdown.ts +0 -644
  52. package/src/edges.ts +0 -6
  53. package/src/forms.ts +0 -132
  54. package/src/global.ts +0 -114
  55. package/src/index.ts +0 -26
  56. package/src/materialbox.ts +0 -404
  57. package/src/modal.ts +0 -341
  58. package/src/parallax.ts +0 -149
  59. package/src/pushpin.ts +0 -165
  60. package/src/range.ts +0 -198
  61. package/src/scrollspy.ts +0 -263
  62. package/src/select.ts +0 -484
  63. package/src/sidenav.ts +0 -543
  64. package/src/slider.ts +0 -474
  65. package/src/tabs.ts +0 -347
  66. package/src/tapTarget.ts +0 -273
  67. package/src/timepicker.ts +0 -832
  68. package/src/toasts.ts +0 -290
  69. package/src/tooltip.ts +0 -346
  70. package/src/utils.ts +0 -271
  71. package/src/waves.ts +0 -70
package/Gruntfile.js DELETED
@@ -1,480 +0,0 @@
1
- const path = require('path');
2
- const sass = require('sass');
3
- const webpackConfig = require('./webpack.config.js');
4
-
5
- module.exports = function(grunt) {
6
- // configure the tasks
7
- const config = {
8
- jasmine: {
9
- components: {
10
- src: ['bin/materialize.js'],
11
- options: {
12
- vendor: ['node_modules/jquery/dist/jquery.min.js'],
13
- styles: 'bin/materialize.css',
14
- specs: 'tests/spec/**/*Spec.js',
15
- helpers: 'tests/spec/helper.js',
16
- keepRunner: true,
17
- version: '3.8.0',
18
- page: {
19
- viewportSize: {
20
- width: 1400,
21
- height: 735
22
- }
23
- },
24
- sandboxArgs: {
25
- args: ['--headless', '--no-sandbox']
26
- }
27
- }
28
- }
29
- },
30
-
31
- sass: {
32
- // Global options
33
- options: {
34
- implementation: sass
35
- },
36
- // Task
37
- expanded: {
38
- // Target options
39
- options: {
40
- outputStyle: 'expanded',
41
- sourcemap: false
42
- },
43
- files: {
44
- 'dist/css/materialize.css': 'sass/materialize.scss'
45
- }
46
- },
47
-
48
- min: {
49
- options: {
50
- outputStyle: 'compressed',
51
- sourcemap: false
52
- },
53
- files: {
54
- 'dist/css/materialize.min.css': 'sass/materialize.scss'
55
- }
56
- },
57
-
58
- // Compile ghpages css
59
- gh: {
60
- options: {
61
- outputStyle: 'compressed',
62
- sourcemap: false
63
- },
64
- files: {
65
- 'docs/css/ghpages-materialize.css': 'sass/ghpages-materialize.scss'
66
- }
67
- },
68
-
69
- // Compile bin css
70
- bin: {
71
- options: {
72
- outputStyle: 'expanded',
73
- sourcemap: false
74
- },
75
- files: {
76
- 'bin/materialize.css': 'sass/materialize.scss'
77
- }
78
- }
79
- },
80
-
81
- postcss: {
82
- options: {
83
- processors: [
84
- require('autoprefixer')({
85
- browsers: [
86
- 'last 2 versions',
87
- 'Chrome >= 30',
88
- 'Firefox >= 30',
89
- 'ie >= 10',
90
- 'Safari >= 8'
91
- ]
92
- })
93
- ]
94
- },
95
- expanded: {
96
- src: 'dist/css/materialize.css'
97
- },
98
- min: {
99
- src: 'dist/css/materialize.min.css'
100
- },
101
- gh: {
102
- src: 'docs/css/ghpages-materialize.css'
103
- },
104
- bin: {
105
- src: 'bin/materialize.css'
106
- }
107
- },
108
-
109
- webpack: {
110
- options: {
111
- /*stats: !process.env.NODE_ENV || process.env.NODE_ENV === "development",*/
112
- },
113
-
114
- dev: Object.assign({}, webpackConfig, {
115
- mode: 'development'
116
- }),
117
-
118
- dev_watch: Object.assign({}, webpackConfig, {
119
- mode: 'development',
120
- watch: true,
121
- }),
122
-
123
- dev_dist: Object.assign({}, webpackConfig, {
124
- mode: 'development',
125
- devtool: false,
126
- optimization: {
127
- minimize: false
128
- },
129
- output: {
130
- filename: 'materialize.js',
131
- path: path.resolve(__dirname, 'dist/js'),
132
- libraryTarget: 'umd',
133
- globalObject: 'this'
134
- }
135
- }),
136
-
137
- prod_min: Object.assign({}, webpackConfig, {
138
- mode: 'production',
139
- devtool: 'source-map',
140
- optimization: {
141
- minimize: true
142
- },
143
- output: {
144
- filename: 'materialize.min.js',
145
- path: path.resolve(__dirname, 'dist/js'),
146
- libraryTarget: 'umd',
147
- globalObject: 'this'
148
- }
149
- }),
150
- },
151
-
152
- browserSync: {
153
- bsFiles: ['bin/*', 'css/ghpages-materialize.css', '!**/node_modules/**/*'],
154
- options: {
155
- server: {
156
- baseDir: './docs/' // make server from root dir
157
- },
158
- port: 8000,
159
- ui: {
160
- port: 8080,
161
- weinre: {
162
- port: 9090
163
- }
164
- },
165
- open: false
166
- }
167
- },
168
-
169
- compress: {
170
- main: {
171
- options: {
172
- archive: 'bin/materialize.zip',
173
- level: 6
174
- },
175
- files: [
176
- { expand: true, cwd: 'dist/', src: ['**/*'], dest: 'materialize/' },
177
- { expand: true, cwd: './', src: ['LICENSE', 'README.md'], dest: 'materialize/' }
178
- ]
179
- },
180
-
181
- src: {
182
- options: {
183
- archive: 'bin/materialize-src.zip',
184
- level: 6
185
- },
186
- files: [
187
- { expand: true, cwd: 'sass/', src: ['materialize.scss'], dest: 'materialize-src/sass/' },
188
- { expand: true, cwd: 'sass/', src: ['components/**/*'], dest: 'materialize-src/sass/' },
189
- { expand: true, cwd: 'src/', src: ['**/*'], dest: 'materialize-src/ts/' },
190
- { expand: true, cwd: 'dist/js/', src: ['**/*'], dest: 'materialize-src/js/bin/' },
191
- { expand: true, cwd: './', src: ['LICENSE', 'README.md'], dest: 'materialize-src/' }
192
- ]
193
- },
194
-
195
- starter_template: {
196
- options: {
197
- archive: 'templates/starter-template.zip',
198
- level: 6
199
- },
200
- files: [
201
- { expand: true, cwd: 'dist/', src: ['**/*'], dest: 'starter-template/' },
202
- {
203
- expand: true,
204
- cwd: 'templates/starter-template/',
205
- src: ['index.html', 'LICENSE'],
206
- dest: 'starter-template/'
207
- },
208
- {
209
- expand: true,
210
- cwd: 'templates/starter-template/css',
211
- src: ['style.css'],
212
- dest: 'starter-template/css'
213
- },
214
- {
215
- expand: true,
216
- cwd: 'templates/starter-template/js',
217
- src: ['init.js'],
218
- dest: 'starter-template/js'
219
- }
220
- ]
221
- },
222
-
223
- parallax_template: {
224
- options: {
225
- archive: 'templates/parallax-template.zip',
226
- level: 6
227
- },
228
- files: [
229
- { expand: true, cwd: 'dist/', src: ['**/*'], dest: 'parallax-template/' },
230
- {
231
- expand: true,
232
- cwd: 'templates/parallax-template/',
233
- src: ['index.html', 'LICENSE', 'background1.jpg', 'background2.jpg', 'background3.jpg'],
234
- dest: 'parallax-template/'
235
- },
236
- {
237
- expand: true,
238
- cwd: 'templates/parallax-template/css',
239
- src: ['style.css'],
240
- dest: 'parallax-template/css'
241
- },
242
- {
243
- expand: true,
244
- cwd: 'templates/parallax-template/js',
245
- src: ['init.js'],
246
- dest: 'parallax-template/js'
247
- }
248
- ]
249
- }
250
- },
251
-
252
- pug: {
253
- compile: {
254
- options: {
255
- pretty: true,
256
- data: {
257
- debug: false
258
- }
259
- },
260
- files: [{
261
- expand: true,
262
- cwd: 'pug/',
263
- src: ['*.pug', '!**/pug/includes/*.*'],
264
- dest: 'docs/',
265
- rename: function (dest, src) {
266
- return dest + src.split('.', 2)[0] + '.html';
267
- }
268
- }]
269
- }
270
- },
271
-
272
- watch: {
273
- pug: {
274
- files: ['pug/**/*'],
275
- tasks: ['pug_compile'],
276
- options: {
277
- interrupt: false,
278
- spawn: false
279
- }
280
- },
281
- copydocs: {
282
- files: ['bin/*.js'],
283
- tasks: ['copy:docs_js'],
284
- options: {
285
- interrupt: false,
286
- spawn: false
287
- }
288
- },
289
- sass: {
290
- files: ['sass/**/*'],
291
- tasks: ['sass_compile'],
292
- options: {
293
- interrupt: false,
294
- spawn: false
295
- }
296
- }
297
- },
298
-
299
- concurrent: {
300
- options: {
301
- logConcurrentOutput: true,
302
- limit: 10
303
- },
304
- monitor: {
305
- tasks: [
306
- 'webpack:dev_watch',
307
- 'pug_compile',
308
- 'sass_compile',
309
- 'watch:pug',
310
- 'watch:sass',
311
- 'watch:copydocs',
312
- 'server'
313
- ]
314
- }
315
- },
316
-
317
- // Replace text to update the version string
318
- replace: {
319
- version: {
320
- src: ['bower.json', 'package.js', 'pug/**/*.html', 'pug/includes/_navbar.pug', 'src/global.ts'],
321
- overwrite: true,
322
- replacements: [
323
- {
324
- from: grunt.option('oldver'),
325
- to: grunt.option('newver')
326
- }
327
- ]
328
- },
329
- package_json: {
330
- src: ['package.json'],
331
- overwrite: true,
332
- replacements: [
333
- {
334
- from: '"version": "' + grunt.option('oldver'),
335
- to: '"version": "' + grunt.option('newver')
336
- }
337
- ]
338
- },
339
- docs: {
340
- src: ['.gitignore'],
341
- overwrite: true,
342
- replacements: [
343
- {
344
- from: '/docs/*.html',
345
- to: ''
346
- }
347
- ]
348
- }
349
- },
350
-
351
- // Create Version Header for files
352
- usebanner: {
353
- release: {
354
- options: {
355
- position: 'top',
356
- banner:
357
- '/*!\n * Materialize v' +
358
- grunt.option('newver') +
359
- ' (https://materializecss.github.io/materialize)\n * Copyright 2014-' +
360
- new Date().getFullYear() +
361
- ' Materialize\n * MIT License (https://raw.githubusercontent.com/materializecss/materialize/master/LICENSE)\n */',
362
- linebreak: true
363
- },
364
- files: {
365
- src: ['dist/css/*.css', 'dist/js/*.js']
366
- }
367
- }
368
- },
369
-
370
- rename: {
371
- rename_src: {
372
- src: 'bin/materialize-src.zip',
373
- dest: 'bin/materialize-src-v' + grunt.option('newver') + '.zip',
374
- options: {
375
- ignore: true
376
- }
377
- },
378
- rename_compiled: {
379
- src: 'bin/materialize.zip',
380
- dest: 'bin/materialize-v' + grunt.option('newver') + '.zip',
381
- options: {
382
- ignore: true
383
- }
384
- }
385
- },
386
-
387
- connect: {
388
- server: {
389
- options: {
390
- port: 9001,
391
- protocol: 'http',
392
- middleware: function(connect, options, middlewares) {
393
- middlewares.unshift(function(req, res, next) {
394
- res.setHeader('Access-Control-Allow-Origin', '*');
395
- res.setHeader('Access-Control-Allow-Credentials', true);
396
- res.setHeader(
397
- 'Access-Control-Allow-Headers',
398
- 'Origin, X-Requested-With, Content-Type, Accept'
399
- );
400
- res.setHeader('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE,OPTIONS');
401
- next();
402
- });
403
- return middlewares;
404
- }
405
- }
406
- }
407
- },
408
-
409
- copy: {
410
- docs_js: {
411
- files: [{ src: 'bin/materialize.js', dest: 'docs/js/materialize.js' }]
412
- },
413
- docs_templates: {
414
- files: [{ src: 'templates/**', dest: 'docs/' }]
415
- }
416
- }
417
- };
418
-
419
- grunt.initConfig(config);
420
-
421
- // load tasks
422
- grunt.loadNpmTasks('grunt-contrib-watch');
423
- grunt.loadNpmTasks('grunt-sass');
424
- grunt.loadNpmTasks('grunt-contrib-compress');
425
- grunt.loadNpmTasks('grunt-contrib-pug');
426
- grunt.loadNpmTasks('grunt-concurrent');
427
- grunt.loadNpmTasks('grunt-text-replace');
428
- grunt.loadNpmTasks('grunt-banner');
429
- grunt.loadNpmTasks('grunt-rename-util');
430
- grunt.loadNpmTasks('grunt-browser-sync');
431
- grunt.loadNpmTasks('grunt-contrib-jasmine');
432
- grunt.loadNpmTasks('grunt-postcss');
433
- grunt.loadNpmTasks('grunt-webpack');
434
- grunt.loadNpmTasks('grunt-contrib-connect');
435
- grunt.loadNpmTasks('grunt-contrib-copy');
436
-
437
- // define tasks
438
- grunt.registerTask('release', [
439
- 'replace:version', // before webpack
440
- 'sass:expanded',
441
- 'sass:min',
442
- 'postcss:expanded',
443
- 'postcss:min',
444
- 'webpack:dev_dist',
445
- 'webpack:prod_min',
446
- 'usebanner:release',
447
- 'compress:main',
448
- 'compress:src',
449
- 'compress:starter_template',
450
- 'compress:parallax_template',
451
- 'replace:version', // again because of cdn
452
- 'replace:package_json',
453
- 'rename:rename_src',
454
- 'rename:rename_compiled',
455
- ]);
456
- grunt.registerTask('pug_compile', ['pug']);
457
- grunt.registerTask('js_compile', ['webpack:dev', 'copy:docs_js']);
458
- grunt.registerTask('sass_compile', ['sass:gh', 'sass:bin', 'postcss:gh', 'postcss:bin']);
459
- grunt.registerTask('server', ['browserSync']);
460
- grunt.registerTask('monitor', ['concurrent:monitor']); // DEV
461
- grunt.registerTask('test', ['js_compile', 'sass_compile', 'connect', 'jasmine']);
462
- grunt.registerTask('jas_test', ['connect', 'jasmine']);
463
- grunt.registerTask('test_repeat', function() {
464
- const tasks = ['connect'];
465
- const n = 30;
466
- for (let i = 0; i < n; i++) {
467
- tasks.push('jasmine');
468
- }
469
- grunt.task.run(tasks);
470
- });
471
- grunt.registerTask('docs', [
472
- 'js_compile',
473
- 'copy:docs_js',
474
- 'copy:docs_templates',
475
- 'sass:gh',
476
- 'postcss:gh',
477
- 'pug',
478
- 'replace:docs'
479
- ]);
480
- };