Skip to content

Commit 7e19332

Browse files
committed
Merge branch 'develop'
* develop: prepare for new release updated template to use new directive methods decreased timeout for hiding keyboard use 'triggerKeys' for all keys remove unused dependencies (injections) populate layout changes immediately added provider methods to set a default layout and to retrieve current layout removed blocking behavior of scroll mask added demo fixed gulp build task (remove mangling), added mdKeyboard.min.css, removed unused files
2 parents 98ba4b0 + 478006f commit 7e19332

14 files changed

+430
-314
lines changed

demo.html

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
<html data-ng-app="keyboardDemoApp">
2+
<head>
3+
<meta charset="utf-8">
4+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
7+
8+
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Material+Icons|Open+Sans:400,300,600,700|Open+Sans+Condensed:300,700">
9+
<link rel="stylesheet" href="node_modules/angular-material/angular-material.min.css">
10+
<link rel="stylesheet" href="dist/mdKeyboard.min.css">
11+
</head>
12+
<body ng-cloak data-ng-controller="keyboardDemoCtrl">
13+
<div layout-padding>
14+
<h1 class="md-headline">Angular Material Keyboard Demo</h1>
15+
<section layout="row">
16+
<md-input-container flex>
17+
<label>Use default keyboard</label>
18+
<input type="text" class="md-input" ng-model="text" use-keyboard>
19+
</md-input-container>
20+
<md-input-container flex>
21+
<label>Use custom keyboard</label>
22+
<input type="number" class="md-input" ng-model="numbers" use-keyboard="Numbers">
23+
</md-input-container>
24+
</section>
25+
</div>
26+
27+
<script src="node_modules/angular/angular.min.js"></script>
28+
<script src="node_modules/angular-aria/angular-aria.min.js"></script>
29+
<script src="node_modules/angular-animate/angular-animate.min.js"></script>
30+
<script src="node_modules/angular-material/angular-material.min.js"></script>
31+
<script src="dist/mdKeyboard.js"></script>
32+
33+
<script>
34+
'use strict';
35+
36+
angular
37+
.module('keyboardDemoApp', [
38+
'ngAnimate',
39+
'ngAria',
40+
'ngMaterial',
41+
'material.components.keyboard'
42+
//'ngMessages',
43+
//'ngSanitize',
44+
])
45+
.config(function ($mdKeyboardProvider) {
46+
// add custom layout for numbers
47+
$mdKeyboardProvider.addLayout('Numbers', {
48+
'name': 'Numbers', 'keys': [
49+
[['7', '7'], ['8', '8'], ['9', '9'], ['Bksp', 'Bksp']],
50+
[['4', '4'], ['5', '5'], ['6', '6'], ['-', '-']],
51+
[['1', '1'], ['2', '2'], ['3', '3'], ['+', '+']],
52+
[['0', '0'], ['Spacer'], [','], ['Enter', 'Enter']]
53+
], 'lang': ['de']
54+
});
55+
56+
// default layout is english
57+
$mdKeyboardProvider.defaultLayout('Deutsch');
58+
})
59+
.controller('keyboardDemoCtrl', function ($scope) {
60+
$scope.text = '';
61+
$scope.numbers = '';
62+
});
63+
</script>
64+
</body>
65+
</html>

dist/keyboard-theme.css

Lines changed: 0 additions & 7 deletions
This file was deleted.

dist/mdKeyboard.css

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ md-keyboard {
2020
md-keyboard.ng-enter-active {
2121
opacity: 1;
2222
display: block;
23-
transform: translate3d(0, 80px, 0) !important; }
23+
transform: translate3d(0, 80px, 0) !important;
24+
transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); }
2425
md-keyboard.ng-leave-active {
2526
transform: translate3d(0, 100%, 0) !important;
2627
transition: all 0.3s cubic-bezier(0.55, 0, 0.55, 0.2); }
@@ -77,6 +78,8 @@ md-keyboard {
7778
width: 100%; }
7879
md-keyboard .layout-row > .flex > span .md-button {
7980
margin: 0; }
81+
md-keyboard ~ .md-scroll-mask {
82+
pointer-events: none; }
8083

8184
@media screen and (-ms-high-contrast: active) {
8285
md-keyboard {

dist/mdKeyboard.js

Lines changed: 166 additions & 139 deletions
Large diffs are not rendered by default.

dist/mdKeyboard.min.css

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/mdKeyboard.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gulpfile.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,20 @@ gulp.task('build', function () {
5858
.pipe(plugins.footer(footer))
5959
.pipe(plugins.embedTemplates())
6060
.pipe(plugins.replace(/[\r\n]+\s*\/\/.*TODO:+.*/gi, ''))
61-
// .pipe(plugins.replace(/angular\s*\.module\('material\.components\.keyboard'\)\n/gi, ''))
6261
.pipe(plugins.ngAnnotate())
6362
.pipe(gulp.dest('./dist/'))
64-
.pipe(plugins.uglify())
63+
.pipe(plugins.uglify({mangle: false}))
6564
.pipe(plugins.concat('mdKeyboard.min.js'))
6665
.pipe(gulp.dest('./dist/'));
6766

6867
gulp
6968
.src('src/css/*.scss')
7069
.pipe(plugins.sass().on('error', plugins.sass.logError))
70+
.pipe(gulp.dest('./dist/'))
71+
.pipe(plugins.concat('mdKeyboard.min.css'))
72+
.pipe(plugins.sourcemaps.init())
73+
.pipe(plugins.cleanCss())
74+
.pipe(plugins.sourcemaps.write())
7175
.pipe(gulp.dest('./dist/'));
7276
});
7377

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"conventional-changelog": "0.0.16",
1717
"gulp": "^3.8.11",
1818
"gulp-angular-embed-templates": "^2.1.2",
19+
"gulp-clean-css": "^2.0.8",
1920
"gulp-concat": "^2.5.2",
2021
"gulp-footer": "^1.0.5",
2122
"gulp-header": "^1.2.2",
@@ -24,6 +25,7 @@
2425
"gulp-ng-annotate": "^2.0.0",
2526
"gulp-replace": "^0.5.4",
2627
"gulp-sass": "^2.2.0",
28+
"gulp-sourcemaps": "^1.6.0",
2729
"gulp-uglify": "^1.1.0",
2830
"jshint-stylish": "^1.0.0"
2931
},
@@ -56,5 +58,5 @@
5658
"test": "echo \"Error: no test specified\" && exit 1",
5759
"build": "gulp build"
5860
},
59-
"version": "0.0.1"
61+
"version": "0.0.3"
6062
}

src/css/keyboard-theme.scss

Lines changed: 0 additions & 12 deletions
This file was deleted.

src/css/mdKeyboard.css

Whitespace-only changes.

src/css/mdKeyboard.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ md-keyboard {
5353
opacity: 1;
5454
display: block;
5555
transform: translate3d(0, $keyboard-hidden-bottom-padding, 0) !important;
56+
transition: $swift-ease-out;
5657
}
5758

5859
&.ng-leave-active {
@@ -145,6 +146,10 @@ md-keyboard {
145146
}
146147
}
147148
}
149+
150+
& ~ .md-scroll-mask {
151+
pointer-events: none;
152+
}
148153
}
149154

150155
// IE only

0 commit comments

Comments
 (0)