angular-material
Advanced tools
Comparing version 0.8.1 to 0.8.2
@@ -1,1 +0,1 @@ | ||
{ "name": "angular-material", "version": "0.8.1-master-fee482d", "dependencies": { "angular": "1.3.x", "angular-animate": "1.3.x", "angular-aria": "1.3.x" }, "main": [ "angular-material.js", "angular-material.css" ] } | ||
{ "name": "angular-material", "version": "0.8.2", "dependencies": { "angular": "1.3.x", "angular-animate": "1.3.x", "angular-aria": "1.3.x" }, "main": [ "angular-material.js", "angular-material.css" ] } |
@@ -5,3 +5,3 @@ /*! | ||
* @license MIT | ||
* v0.8.1-master-fee482d | ||
* v0.8.2 | ||
*/ | ||
@@ -32,3 +32,3 @@ goog.provide('ng.material.components.autocomplete'); | ||
function MdAutocompleteCtrl ($scope, $element, $timeout, $q, $mdUtil, $mdConstant) { | ||
function MdAutocompleteCtrl ($scope, $element, $q, $mdUtil, $mdConstant) { | ||
@@ -61,2 +61,3 @@ //-- private variables | ||
self.fetch = $mdUtil.debounce(fetchResults); | ||
self.messages = []; | ||
@@ -82,3 +83,3 @@ return init(); | ||
var locals = {}; | ||
if (self.itemName) locals[self.itemName] = $scope.selectedItem; | ||
if (self.itemName) locals[self.itemName] = item; | ||
return locals; | ||
@@ -88,28 +89,37 @@ } | ||
function configureWatchers () { | ||
$scope.$watch('searchText', function (searchText) { | ||
self.index = -1; | ||
if (!searchText || searchText.length < Math.max(parseInt($scope.minLength, 10), 1)) { | ||
self.loading = false; | ||
self.matches = []; | ||
self.hidden = shouldHide(); | ||
return; | ||
} | ||
var term = searchText.toLowerCase(); | ||
if (promise && promise.cancel) { | ||
promise.cancel(); | ||
promise = null; | ||
} | ||
if (!$scope.noCache && cache[term]) { | ||
self.matches = cache[term]; | ||
} else { | ||
self.fetch(searchText); | ||
} | ||
self.hidden = shouldHide(); | ||
if ($scope.textChange) $scope.textChange(getItemScope($scope.selectedItem)); | ||
var wait = parseInt($scope.delay, 10) || 0; | ||
$scope.$watch('searchText', wait | ||
? $mdUtil.debounce(handleSearchText, wait) | ||
: handleSearchText); | ||
$scope.$watch('selectedItem', function (selectedItem, previousSelectedItem) { | ||
if ($scope.itemChange && selectedItem !== previousSelectedItem) | ||
$scope.itemChange(getItemScope(selectedItem)); | ||
}); | ||
$scope.$watch('selectedItem', function (selectedItem) { | ||
if ($scope.itemChange) $scope.itemChange(getItemScope(selectedItem)); | ||
}); | ||
} | ||
function handleSearchText (searchText, previousSearchText) { | ||
self.index = -1; | ||
if (!searchText || searchText.length < Math.max(parseInt($scope.minLength, 10), 1)) { | ||
self.loading = false; | ||
self.matches = []; | ||
self.hidden = shouldHide(); | ||
updateMessages(); | ||
return; | ||
} | ||
var term = searchText.toLowerCase(); | ||
if (promise && promise.cancel) { | ||
promise.cancel(); | ||
promise = null; | ||
} | ||
if (!$scope.noCache && cache[term]) { | ||
self.matches = cache[term]; | ||
updateMessages(); | ||
} else { | ||
self.fetch(searchText); | ||
} | ||
self.hidden = shouldHide(); | ||
if ($scope.textChange && searchText !== previousSearchText) | ||
$scope.textChange(getItemScope($scope.selectedItem)); | ||
} | ||
function fetchResults (searchText) { | ||
@@ -131,5 +141,21 @@ var items = $scope.$parent.$eval(itemExpr), | ||
self.hidden = shouldHide(); | ||
updateMessages(); | ||
} | ||
} | ||
function updateMessages () { | ||
if (self.hidden) return; | ||
switch (self.matches.length) { | ||
case 0: return self.messages.splice(0); | ||
case 1: return self.messages.push({ display: 'There is 1 match available.' }); | ||
default: return self.messages.push({ display: 'There are ' | ||
+ self.matches.length | ||
+ ' matches available.' }); | ||
} | ||
} | ||
function updateSelectionMessage () { | ||
self.messages.push({ display: getCurrentDisplayValue() }); | ||
} | ||
function blur () { | ||
@@ -146,2 +172,3 @@ self.hidden = true; | ||
updateScroll(); | ||
updateSelectionMessage(); | ||
break; | ||
@@ -153,2 +180,3 @@ case $mdConstant.KEY_CODE.UP_ARROW: | ||
updateScroll(); | ||
updateSelectionMessage(); | ||
break; | ||
@@ -209,3 +237,3 @@ case $mdConstant.KEY_CODE.ENTER: | ||
} | ||
MdAutocompleteCtrl.$inject = ["$scope", "$element", "$timeout", "$q", "$mdUtil", "$mdConstant"]; | ||
MdAutocompleteCtrl.$inject = ["$scope", "$element", "$q", "$mdUtil", "$mdConstant"]; | ||
})(); | ||
@@ -238,2 +266,3 @@ | ||
* @param {number=} md-min-length Specifies the minimum length of text before autocomplete will make suggestions | ||
* @param {number=} md-delay Specifies the amount of time (in milliseconds) to wait before looking for results | ||
* | ||
@@ -271,6 +300,8 @@ * @usage | ||
ng-click="$mdAutocompleteCtrl.clear()">\ | ||
<md-icon md-svg-icon="cancel"></md-icon>\ | ||
<span class="visually-hidden">Clear</span>\ | ||
</button>\ | ||
<md-progress-linear ng-if="$mdAutocompleteCtrl.loading" md-mode="indeterminate"></md-progress-linear>\ | ||
<md-icon md-svg-icon="cancel"></md-icon>\ | ||
<span class="visually-hidden">Clear</span>\ | ||
</button>\ | ||
<md-progress-linear\ | ||
ng-if="$mdAutocompleteCtrl.loading"\ | ||
md-mode="indeterminate"></md-progress-linear>\ | ||
</md-autocomplete-wrap>\ | ||
@@ -290,5 +321,3 @@ <ul role="presentation">\ | ||
aria-live="assertive">\ | ||
<p ng-if="$mdAutocompleteCtrl.index === -1 && $mdAutocompleteCtrl.matches.length === 1">There is 1 match available.</p>\ | ||
<p ng-if="$mdAutocompleteCtrl.index === -1 && $mdAutocompleteCtrl.matches.length > 1">There are {{$mdAutocompleteCtrl.matches.length}} matches available.</p>\ | ||
<p ng-if="$mdAutocompleteCtrl.index >= 0">{{ $mdAutocompleteCtrl.getCurrentDisplayValue() }}</p>\ | ||
<p ng-repeat="message in $mdAutocompleteCtrl.messages">{{message.display}}</p>\ | ||
</aria-status>', | ||
@@ -308,3 +337,4 @@ transclude: true, | ||
isDisabled: '=ngDisabled', | ||
minLength: '=mdMinLength' | ||
minLength: '=mdMinLength', | ||
delay: '=mdDelay' | ||
} | ||
@@ -323,8 +353,9 @@ }; | ||
var term = $element.attr('md-highlight-text'), | ||
text = $interpolate($element.text())($scope); | ||
$scope.$watch(term, function (term) { | ||
var regex = new RegExp('^' + sanitize(term), 'i'), | ||
html = text.replace(regex, '<span class="highlight">$&</span>'); | ||
$element.html(html); | ||
}); | ||
text = $interpolate($element.text())($scope), | ||
watcher = $scope.$watch(term, function (term) { | ||
var regex = new RegExp('^' + sanitize(term), 'i'), | ||
html = text.replace(regex, '<span class="highlight">$&</span>'); | ||
$element.html(html); | ||
}); | ||
$element.on('$destroy', function () { watcher(); }); | ||
@@ -331,0 +362,0 @@ function sanitize (term) { |
@@ -5,3 +5,3 @@ /*! | ||
* @license MIT | ||
* v0.8.1-master-fee482d | ||
* v0.8.2 | ||
*/ | ||
@@ -8,0 +8,0 @@ goog.provide('ng.material.components.backdrop'); |
@@ -5,3 +5,3 @@ /*! | ||
* @license MIT | ||
* v0.8.1-master-fee482d | ||
* v0.8.2 | ||
*/ | ||
@@ -8,0 +8,0 @@ goog.provide('ng.material.components.bottomSheet'); |
@@ -5,3 +5,3 @@ /*! | ||
* @license MIT | ||
* v0.8.1-master-fee482d | ||
* v0.8.2 | ||
*/ | ||
@@ -64,3 +64,3 @@ goog.provide('ng.material.components.button'); | ||
return { | ||
restrict: 'E', | ||
restrict: 'EA', | ||
replace: true, | ||
@@ -67,0 +67,0 @@ transclude: true, |
@@ -5,3 +5,3 @@ /*! | ||
* @license MIT | ||
* v0.8.1-master-fee482d | ||
* v0.8.2 | ||
*/ | ||
@@ -8,0 +8,0 @@ goog.provide('ng.material.components.card'); |
@@ -5,3 +5,3 @@ /*! | ||
* @license MIT | ||
* v0.8.1-master-fee482d | ||
* v0.8.2 | ||
*/ | ||
@@ -8,0 +8,0 @@ goog.provide('ng.material.components.checkbox'); |
@@ -5,3 +5,3 @@ /*! | ||
* @license MIT | ||
* v0.8.1-master-fee482d | ||
* v0.8.2 | ||
*/ | ||
@@ -8,0 +8,0 @@ goog.provide('ng.material.components.content'); |
@@ -1,1 +0,1 @@ | ||
angular.module("material.core").constant("$MD_THEME_CSS", "md-autocomplete { background: '{{background-50}}'; } md-autocomplete button md-icon path { fill: '{{background-600}}'; } md-autocomplete button:after { background: '{{background-600-0.3}}'; } md-autocomplete ul { background: '{{background-50}}'; } md-autocomplete ul li { border-top: 1px solid '{{background-400}}'; color: '{{background-900}}'; } md-autocomplete ul li .highlight { color: '{{background-600}}'; } md-autocomplete ul li:hover, md-autocomplete ul li.selected { background: '{{background-200}}'; }md-backdrop.md-opaque.md-THEME_NAME-theme { background-color: '{{foreground-4-0.5}}'; }md-bottom-sheet.md-THEME_NAME-theme { background-color: '{{background-50}}'; border-top-color: '{{background-300}}'; } md-bottom-sheet.md-THEME_NAME-theme.md-list md-item { color: '{{foreground-1}}'; } md-bottom-sheet.md-THEME_NAME-theme .md-subheader { background-color: '{{background-50}}'; } md-bottom-sheet.md-THEME_NAME-theme .md-subheader { color: '{{foreground-1}}'; }md-toolbar .md-button.md-THEME_NAME-theme.md-fab { background-color: white; }.md-button.md-THEME_NAME-theme { border-radius: 3px; } .md-button.md-THEME_NAME-theme:not([disabled]):hover, .md-button.md-THEME_NAME-theme:not([disabled]):focus { background-color: '{{background-500-0.2}}'; } .md-button.md-THEME_NAME-theme.md-primary { color: '{{primary-color}}'; } .md-button.md-THEME_NAME-theme.md-primary.md-raised, .md-button.md-THEME_NAME-theme.md-primary.md-fab { color: '{{primary-contrast}}'; background-color: '{{primary-color}}'; } .md-button.md-THEME_NAME-theme.md-primary.md-raised:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-primary.md-raised:not([disabled]):focus, .md-button.md-THEME_NAME-theme.md-primary.md-fab:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-primary.md-fab:not([disabled]):focus { background-color: '{{primary-600}}'; } .md-button.md-THEME_NAME-theme.md-fab { border-radius: 50%; background-color: '{{accent-color}}'; color: '{{accent-contrast}}'; } .md-button.md-THEME_NAME-theme.md-fab:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-fab:not([disabled]):focus { background-color: '{{accent-A700}}'; } .md-button.md-THEME_NAME-theme.md-raised { color: '{{background-contrast}}'; background-color: '{{background-50}}'; } .md-button.md-THEME_NAME-theme.md-raised:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-raised:not([disabled]):focus { background-color: '{{background-200}}'; } .md-button.md-THEME_NAME-theme.md-warn { color: '{{warn-color}}'; } .md-button.md-THEME_NAME-theme.md-warn.md-raised, .md-button.md-THEME_NAME-theme.md-warn.md-fab { color: '{{warn-contrast}}'; background-color: '{{warn-color}}'; } .md-button.md-THEME_NAME-theme.md-warn.md-raised:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-warn.md-raised:not([disabled]):focus, .md-button.md-THEME_NAME-theme.md-warn.md-fab:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-warn.md-fab:not([disabled]):focus { background-color: '{{warn-700}}'; } .md-button.md-THEME_NAME-theme.md-accent { color: '{{accent-color}}'; } .md-button.md-THEME_NAME-theme.md-accent.md-raised, .md-button.md-THEME_NAME-theme.md-accent.md-fab { color: '{{accent-contrast}}'; background-color: '{{accent-color}}'; } .md-button.md-THEME_NAME-theme.md-accent.md-raised:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-accent.md-raised:not([disabled]):focus, .md-button.md-THEME_NAME-theme.md-accent.md-fab:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-accent.md-fab:not([disabled]):focus { background-color: '{{accent-700}}'; } .md-button.md-THEME_NAME-theme[disabled], .md-button.md-THEME_NAME-theme.md-raised[disabled], .md-button.md-THEME_NAME-theme.md-fab[disabled] { color: '{{foreground-3}}'; background-color: transparent; cursor: not-allowed; }md-card.md-THEME_NAME-theme { border-radius: 2px; } md-card.md-THEME_NAME-theme .md-card-image { border-radius: 2px 2px 0 0; }md-checkbox.md-THEME_NAME-theme .md-ripple { color: '{{accent-600}}'; }md-checkbox.md-THEME_NAME-theme.md-checked .md-ripple { color: '{{background-600}}'; }md-checkbox.md-THEME_NAME-theme .md-icon { border-color: '{{foreground-2}}'; }md-checkbox.md-THEME_NAME-theme.md-checked .md-icon { background-color: '{{accent-color-0.87}}'; }md-checkbox.md-THEME_NAME-theme.md-checked .md-icon:after { border-color: '{{background-200}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary .md-ripple { color: '{{primary-600}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-ripple { color: '{{background-600}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary .md-icon { border-color: '{{foreground-2}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-icon { background-color: '{{primary-color-0.87}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-icon:after { border-color: '{{background-200}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn .md-ripple { color: '{{warn-600}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn .md-icon { border-color: '{{foreground-2}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-icon { background-color: '{{warn-color-0.87}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-icon:after { border-color: '{{background-200}}'; }md-checkbox.md-THEME_NAME-theme[disabled] .md-icon { border-color: '{{foreground-3}}'; }md-checkbox.md-THEME_NAME-theme[disabled].md-checked .md-icon { background-color: '{{foreground-3}}'; }md-content.md-THEME_NAME-theme { background-color: '{{background-hue-3}}'; }md-dialog.md-THEME_NAME-theme { border-radius: 4px; background-color: '{{background-hue-3}}'; } md-dialog.md-THEME_NAME-theme.md-content-overflow .md-actions { border-top-color: '{{foreground-4}}'; }md-divider.md-THEME_NAME-theme { border-top-color: '{{foreground-4}}'; }md-icon.md-THEME_NAME-theme.md-primary { color: '{{primary-color}}'; }md-icon.md-THEME_NAME-theme.md-accent { color: '{{accent-color}}'; }md-icon.md-THEME_NAME-theme.md-warn { color: '{{warn-color}}'; }md-icon.md-THEME_NAME-theme.md-danger { color: '{{danger-color}}'; }md-input-container.md-THEME_NAME-theme .md-input { color: '{{foreground-1}}'; border-color: '{{foreground-4}}'; text-shadow: '{{foreground-shadow}}'; } md-input-container.md-THEME_NAME-theme .md-input::-webkit-input-placeholder, md-input-container.md-THEME_NAME-theme .md-input::-moz-placeholder, md-input-container.md-THEME_NAME-theme .md-input:-moz-placeholder, md-input-container.md-THEME_NAME-theme .md-input:-ms-input-placeholder { color: '{{foreground-3}}'; }md-input-container.md-THEME_NAME-theme label, md-input-container.md-THEME_NAME-theme .md-placeholder { text-shadow: '{{foreground-shadow}}'; color: '{{foreground-3}}'; }md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-has-value label { color: '{{foreground-2}}'; }md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused .md-input { border-color: '{{primary-500}}'; }md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused label { color: '{{primary-500}}'; }md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-accent .md-input { border-color: '{{accent-500}}'; }md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-accent label { color: '{{accent-500}}'; }md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-warn .md-input { border-color: '{{warn-500}}'; }md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-warn label { color: '{{warn-500}}'; }md-input-container.md-THEME_NAME-theme.md-input-invalid .md-input { border-color: '{{warn-500}}'; }md-input-container.md-THEME_NAME-theme.md-input-invalid label { color: '{{warn-500}}'; }md-input-container.md-THEME_NAME-theme.md-input-invalid ng-message, md-input-container.md-THEME_NAME-theme.md-input-invalid data-ng-message, md-input-container.md-THEME_NAME-theme.md-input-invalid x-ng-message, md-input-container.md-THEME_NAME-theme.md-input-invalid [ng-message], md-input-container.md-THEME_NAME-theme.md-input-invalid [data-ng-message], md-input-container.md-THEME_NAME-theme.md-input-invalid [x-ng-message], md-input-container.md-THEME_NAME-theme.md-input-invalid .md-char-counter { color: '{{warn-500}}'; }md-input-container.md-THEME_NAME-theme .md-input[disabled], [disabled] md-input-container.md-THEME_NAME-theme .md-input { border-bottom-color: transparent; color: '{{foreground-3}}'; background-image: linear-gradient(to right, '{{foreground-4}}' 0%, '{{foreground-4}}' 33%, transparent 0%); background-image: -ms-linear-gradient(left, transparent 0%, '{{foreground-4}}' 100%); }md-progress-circular.md-THEME_NAME-theme { background-color: transparent; } md-progress-circular.md-THEME_NAME-theme .md-inner .md-gap { border-top-color: '{{primary-color}}'; border-bottom-color: '{{primary-color}}'; } md-progress-circular.md-THEME_NAME-theme .md-inner .md-left .md-half-circle, md-progress-circular.md-THEME_NAME-theme .md-inner .md-right .md-half-circle { border-top-color: '{{primary-color}}'; } md-progress-circular.md-THEME_NAME-theme .md-inner .md-right .md-half-circle { border-right-color: '{{primary-color}}'; } md-progress-circular.md-THEME_NAME-theme .md-inner .md-left .md-half-circle { border-left-color: '{{primary-color}}'; } md-progress-circular.md-THEME_NAME-theme.md-warn .md-inner .md-gap { border-top-color: '{{warn-color}}'; border-bottom-color: '{{warn-color}}'; } md-progress-circular.md-THEME_NAME-theme.md-warn .md-inner .md-left .md-half-circle, md-progress-circular.md-THEME_NAME-theme.md-warn .md-inner .md-right .md-half-circle { border-top-color: '{{warn-color}}'; } md-progress-circular.md-THEME_NAME-theme.md-warn .md-inner .md-right .md-half-circle { border-right-color: '{{warn-color}}'; } md-progress-circular.md-THEME_NAME-theme.md-warn .md-inner .md-left .md-half-circle { border-left-color: '{{warn-color}}'; } md-progress-circular.md-THEME_NAME-theme.md-accent .md-inner .md-gap { border-top-color: '{{accent-color}}'; border-bottom-color: '{{accent-color}}'; } md-progress-circular.md-THEME_NAME-theme.md-accent .md-inner .md-left .md-half-circle, md-progress-circular.md-THEME_NAME-theme.md-accent .md-inner .md-right .md-half-circle { border-top-color: '{{accent-color}}'; } md-progress-circular.md-THEME_NAME-theme.md-accent .md-inner .md-right .md-half-circle { border-right-color: '{{accent-color}}'; } md-progress-circular.md-THEME_NAME-theme.md-accent .md-inner .md-left .md-half-circle { border-left-color: '{{accent-color}}'; }md-progress-linear.md-THEME_NAME-theme .md-container { background-color: '{{primary-100}}'; }md-progress-linear.md-THEME_NAME-theme .md-bar { background-color: '{{primary-color}}'; }md-progress-linear.md-THEME_NAME-theme.md-warn .md-container { background-color: '{{warn-100}}'; }md-progress-linear.md-THEME_NAME-theme.md-warn .md-bar { background-color: '{{warn-color}}'; }md-progress-linear.md-THEME_NAME-theme.md-accent .md-container { background-color: '{{accent-100}}'; }md-progress-linear.md-THEME_NAME-theme.md-accent .md-bar { background-color: '{{accent-color}}'; }md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-warn .md-bar1 { background-color: '{{warn-100}}'; }md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-warn .md-dashed:before { background: radial-gradient('{{warn-100}}' 0%, '{{warn-100}}' 16%, transparent 42%); }md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-accent .md-bar1 { background-color: '{{accent-100}}'; }md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-accent .md-dashed:before { background: radial-gradient('{{accent-100}}' 0%, '{{accent-100}}' 16%, transparent 42%); }md-radio-button.md-THEME_NAME-theme .md-off { border-color: '{{foreground-2}}'; }md-radio-button.md-THEME_NAME-theme .md-on { background-color: '{{accent-color-0.87}}'; }md-radio-button.md-THEME_NAME-theme.md-checked .md-off { border-color: '{{accent-color-0.87}}'; }md-radio-button.md-THEME_NAME-theme.md-checked .md-ink-ripple { color: '{{accent-color-0.87}}'; }md-radio-button.md-THEME_NAME-theme .md-container .md-ripple { color: '{{accent-600}}'; }md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary .md-on { background-color: '{{primary-color-0.87}}'; }md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-off { border-color: '{{primary-color-0.87}}'; }md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-ink-ripple { color: '{{primary-color-0.87}}'; }md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary .md-container .md-ripple { color: '{{primary-600}}'; }md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn .md-on { background-color: '{{warn-color-0.87}}'; }md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-off { border-color: '{{warn-color-0.87}}'; }md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-ink-ripple { color: '{{warn-color-0.87}}'; }md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn .md-container .md-ripple { color: '{{warn-600}}'; }md-radio-button.md-THEME_NAME-theme[disabled] .md-container .md-off { border-color: '{{foreground-3}}'; }md-radio-button.md-THEME_NAME-theme[disabled] .md-container .md-on { border-color: '{{foreground-3}}'; }md-radio-group.md-THEME_NAME-theme:focus:not(:empty) { border-color: '{{foreground-1}}'; }md-select.md-THEME_NAME-theme:not([disabled]):focus .md-select-label { border-bottom-color: '{{primary-color}}'; color: '{{ foreground-1 }}'; } md-select.md-THEME_NAME-theme:not([disabled]):focus .md-select-label.md-placeholder { color: '{{ foreground-1 }}'; }md-select.md-THEME_NAME-theme:not([disabled]):focus.md-accent .md-select-label { border-bottom-color: '{{accent-color}}'; }md-select.md-THEME_NAME-theme:not([disabled]):focus.md-warn .md-select-label { border-bottom-color: '{{warn-color}}'; }md-select.md-THEME_NAME-theme[disabled] .md-select-label { color: '{{foreground-3}}'; } md-select.md-THEME_NAME-theme[disabled] .md-select-label.md-placeholder { color: '{{foreground-3}}'; }md-select.md-THEME_NAME-theme .md-select-label { border-bottom-color: '{{foreground-4}}'; } md-select.md-THEME_NAME-theme .md-select-label.md-placeholder { color: '{{foreground-2}}'; }md-select-menu.md-THEME_NAME-theme md-optgroup { color: '{{foreground-2}}'; } md-select-menu.md-THEME_NAME-theme md-optgroup md-option { color: '{{foreground-1}}'; }md-select-menu.md-THEME_NAME-theme md-option[selected] { background-color: '{{primary-50}}'; } md-select-menu.md-THEME_NAME-theme md-option[selected]:focus { background-color: '{{primary-100}}'; } md-select-menu.md-THEME_NAME-theme md-option[selected].md-accent { background-color: '{{accent-50}}'; } md-select-menu.md-THEME_NAME-theme md-option[selected].md-accent:focus { background-color: '{{accent-100}}'; }md-select-menu.md-THEME_NAME-theme md-option:focus:not([selected]) { background: '{{background-200}}'; }md-sidenav.md-THEME_NAME-theme { background-color: '{{background-hue-3}}'; }md-slider.md-THEME_NAME-theme .md-track { background-color: '{{foreground-3}}'; }md-slider.md-THEME_NAME-theme .md-track-ticks { background-color: '{{foreground-4}}'; }md-slider.md-THEME_NAME-theme .md-focus-thumb { background-color: '{{foreground-2}}'; }md-slider.md-THEME_NAME-theme .md-focus-ring { border-color: '{{foreground-4}}'; }md-slider.md-THEME_NAME-theme .md-disabled-thumb { border-color: '{{background-hue-3}}'; }md-slider.md-THEME_NAME-theme.md-min .md-thumb:after { background-color: '{{background-hue-3}}'; }md-slider.md-THEME_NAME-theme .md-track.md-track-fill { background-color: '{{accent-color}}'; }md-slider.md-THEME_NAME-theme .md-thumb:after { border-color: '{{accent-color}}'; background-color: '{{accent-color}}'; }md-slider.md-THEME_NAME-theme .md-sign { background-color: '{{accent-color}}'; } md-slider.md-THEME_NAME-theme .md-sign:after { border-top-color: '{{accent-color}}'; }md-slider.md-THEME_NAME-theme .md-thumb-text { color: '{{accent-contrast}}'; }md-slider.md-THEME_NAME-theme.md-warn .md-track.md-track-fill { background-color: '{{warn-color}}'; }md-slider.md-THEME_NAME-theme.md-warn .md-thumb:after { border-color: '{{warn-color}}'; background-color: '{{warn-color}}'; }md-slider.md-THEME_NAME-theme.md-warn .md-sign { background-color: '{{warn-color}}'; } md-slider.md-THEME_NAME-theme.md-warn .md-sign:after { border-top-color: '{{warn-color}}'; }md-slider.md-THEME_NAME-theme.md-warn .md-thumb-text { color: '{{warn-contrast}}'; }md-slider.md-THEME_NAME-theme.md-primary .md-track.md-track-fill { background-color: '{{primary-color}}'; }md-slider.md-THEME_NAME-theme.md-primary .md-thumb:after { border-color: '{{primary-color}}'; background-color: '{{primary-color}}'; }md-slider.md-THEME_NAME-theme.md-primary .md-sign { background-color: '{{primary-color}}'; } md-slider.md-THEME_NAME-theme.md-primary .md-sign:after { border-top-color: '{{primary-color}}'; }md-slider.md-THEME_NAME-theme.md-primary .md-thumb-text { color: '{{primary-contrast}}'; }md-slider.md-THEME_NAME-theme[disabled] .md-thumb:after { border-color: '{{foreground-3}}'; }md-slider.md-THEME_NAME-theme[disabled]:not(.md-min) .md-thumb:after { background-color: '{{foreground-3}}'; }.md-subheader.md-THEME_NAME-theme { color: '{{ foreground-2-0.23 }}'; background-color: '{{background-hue-3}}'; } .md-subheader.md-THEME_NAME-theme.md-primary { color: '{{primary-color}}'; } .md-subheader.md-THEME_NAME-theme.md-accent { color: '{{accent-color}}'; } .md-subheader.md-THEME_NAME-theme.md-warn { color: '{{warn-color}}'; }md-switch.md-THEME_NAME-theme .md-thumb { background-color: '{{background-50}}'; }md-switch.md-THEME_NAME-theme .md-bar { background-color: '{{background-500}}'; }md-switch.md-THEME_NAME-theme.md-checked .md-thumb { background-color: '{{accent-color}}'; }md-switch.md-THEME_NAME-theme.md-checked .md-bar { background-color: '{{accent-color-0.5}}'; }md-switch.md-THEME_NAME-theme.md-checked.md-primary .md-thumb { background-color: '{{primary-color}}'; }md-switch.md-THEME_NAME-theme.md-checked.md-primary .md-bar { background-color: '{{primary-color-0.5}}'; }md-switch.md-THEME_NAME-theme.md-checked.md-warn .md-thumb { background-color: '{{warn-color}}'; }md-switch.md-THEME_NAME-theme.md-checked.md-warn .md-bar { background-color: '{{warn-color-0.5}}'; }md-switch.md-THEME_NAME-theme[disabled] .md-thumb { background-color: '{{background-400}}'; }md-switch.md-THEME_NAME-theme[disabled] .md-bar { background-color: '{{foreground-4}}'; }md-switch.md-THEME_NAME-theme:focus .md-label:not(:empty) { border-color: '{{foreground-1}}'; border-style: dotted; }md-tabs.md-THEME_NAME-theme .md-header { background-color: transparent; }md-tabs.md-THEME_NAME-theme .md-paginator md-icon { color: '{{primary-color}}'; }md-tabs.md-THEME_NAME-theme.md-accent .md-header { background-color: '{{accent-color}}'; }md-tabs.md-THEME_NAME-theme.md-accent md-tab:not([disabled]) { color: '{{accent-100}}'; } md-tabs.md-THEME_NAME-theme.md-accent md-tab:not([disabled]).active { color: '{{accent-contrast}}'; }md-tabs.md-THEME_NAME-theme.md-primary .md-header { background-color: '{{primary-color}}'; }md-tabs.md-THEME_NAME-theme.md-primary md-tab:not([disabled]) { color: '{{primary-100}}'; } md-tabs.md-THEME_NAME-theme.md-primary md-tab:not([disabled]).active { color: '{{primary-contrast}}'; }md-tabs.md-THEME_NAME-theme.md-primary md-tab { color: '{{primary-100}}'; } md-tabs.md-THEME_NAME-theme.md-primary md-tab[disabled] { color: '{{foreground-3}}'; } md-tabs.md-THEME_NAME-theme.md-primary md-tab:focus { color: '{{primary-contrast}}'; background-color: '{{primary-contrast-0.1}}'; } md-tabs.md-THEME_NAME-theme.md-primary md-tab.active { color: '{{primary-contrast}}'; } md-tabs.md-THEME_NAME-theme.md-primary md-tab .md-ripple-container { color: '{{primary-contrast}}'; }md-tabs.md-THEME_NAME-theme.md-warn .md-header { background-color: '{{warn-color}}'; }md-tabs.md-THEME_NAME-theme.md-warn md-tab:not([disabled]) { color: '{{warn-100}}'; } md-tabs.md-THEME_NAME-theme.md-warn md-tab:not([disabled]).active { color: '{{warn-contrast}}'; }md-tabs.md-THEME_NAME-theme md-tabs-ink-bar { color: '{{accent-color}}'; background: '{{accent-color}}'; }md-tabs.md-THEME_NAME-theme md-tab { color: '{{foreground-2}}'; } md-tabs.md-THEME_NAME-theme md-tab[disabled] { color: '{{foreground-3}}'; } md-tabs.md-THEME_NAME-theme md-tab:focus { color: '{{foreground-1}}'; } md-tabs.md-THEME_NAME-theme md-tab.active { color: '{{primary-color}}'; } md-tabs.md-THEME_NAME-theme md-tab .md-ripple-container { color: '{{accent-100}}'; }md-input-group.md-THEME_NAME-theme input, md-input-group.md-THEME_NAME-theme textarea { text-shadow: '{{foreground-shadow}}'; } md-input-group.md-THEME_NAME-theme input::-webkit-input-placeholder, md-input-group.md-THEME_NAME-theme input::-moz-placeholder, md-input-group.md-THEME_NAME-theme input:-moz-placeholder, md-input-group.md-THEME_NAME-theme input:-ms-input-placeholder, md-input-group.md-THEME_NAME-theme textarea::-webkit-input-placeholder, md-input-group.md-THEME_NAME-theme textarea::-moz-placeholder, md-input-group.md-THEME_NAME-theme textarea:-moz-placeholder, md-input-group.md-THEME_NAME-theme textarea:-ms-input-placeholder { color: '{{foreground-3}}'; }md-input-group.md-THEME_NAME-theme label { text-shadow: '{{foreground-shadow}}'; color: '{{foreground-3}}'; }md-input-group.md-THEME_NAME-theme input, md-input-group.md-THEME_NAME-theme textarea { color: '{{foreground-1}}'; border-color: '{{foreground-4}}'; }md-input-group.md-THEME_NAME-theme.md-input-focused input, md-input-group.md-THEME_NAME-theme.md-input-focused textarea { border-color: '{{primary-500}}'; }md-input-group.md-THEME_NAME-theme.md-input-focused label { color: '{{primary-500}}'; }md-input-group.md-THEME_NAME-theme.md-input-focused.md-accent input, md-input-group.md-THEME_NAME-theme.md-input-focused.md-accent textarea { border-color: '{{accent-500}}'; }md-input-group.md-THEME_NAME-theme.md-input-focused.md-accent label { color: '{{accent-500}}'; }md-input-group.md-THEME_NAME-theme.md-input-has-value:not(.md-input-focused) label { color: '{{foreground-2}}'; }md-input-group.md-THEME_NAME-theme .md-input[disabled] { border-bottom-color: '{{foreground-4}}'; color: '{{foreground-3}}'; }md-toast.md-THEME_NAME-theme { background-color: '{{foreground-1}}'; color: '{{background-50}}'; } md-toast.md-THEME_NAME-theme .md-button { color: '{{background-50}}'; } md-toast.md-THEME_NAME-theme .md-button.md-highlight { color: '{{primary-A200}}'; } md-toast.md-THEME_NAME-theme .md-button.md-highlight.md-accent { color: '{{accent-A200}}'; } md-toast.md-THEME_NAME-theme .md-button.md-highlight.md-warn { color: '{{warn-A200}}'; }md-toolbar.md-THEME_NAME-theme { background-color: '{{primary-color}}'; color: '{{primary-contrast}}'; } md-toolbar.md-THEME_NAME-theme .md-button { color: '{{primary-contrast}}'; } md-toolbar.md-THEME_NAME-theme.md-accent { background-color: '{{accent-color}}'; color: '{{accent-contrast}}'; } md-toolbar.md-THEME_NAME-theme.md-warn { background-color: '{{warn-color}}'; color: '{{warn-contrast}}'; }md-tooltip.md-THEME_NAME-theme { color: '{{background-A100}}'; } md-tooltip.md-THEME_NAME-theme .md-background { background-color: '{{foreground-2}}'; }"); | ||
angular.module("material.core").constant("$MD_THEME_CSS", "md-autocomplete { background: '{{background-50}}'; } md-autocomplete button md-icon path { fill: '{{background-600}}'; } md-autocomplete button:after { background: '{{background-600-0.3}}'; } md-autocomplete ul { background: '{{background-50}}'; } md-autocomplete ul li { border-top: 1px solid '{{background-400}}'; color: '{{background-900}}'; } md-autocomplete ul li .highlight { color: '{{background-600}}'; } md-autocomplete ul li:hover, md-autocomplete ul li.selected { background: '{{background-200}}'; }md-backdrop.md-opaque.md-THEME_NAME-theme { background-color: '{{foreground-4-0.5}}'; }md-bottom-sheet.md-THEME_NAME-theme { background-color: '{{background-50}}'; border-top-color: '{{background-300}}'; } md-bottom-sheet.md-THEME_NAME-theme.md-list md-item { color: '{{foreground-1}}'; } md-bottom-sheet.md-THEME_NAME-theme .md-subheader { background-color: '{{background-50}}'; } md-bottom-sheet.md-THEME_NAME-theme .md-subheader { color: '{{foreground-1}}'; }md-card.md-THEME_NAME-theme { border-radius: 2px; } md-card.md-THEME_NAME-theme .md-card-image { border-radius: 2px 2px 0 0; }md-toolbar .md-button.md-THEME_NAME-theme.md-fab { background-color: white; }.md-button.md-THEME_NAME-theme { border-radius: 3px; } .md-button.md-THEME_NAME-theme:not([disabled]):hover, .md-button.md-THEME_NAME-theme:not([disabled]):focus { background-color: '{{background-500-0.2}}'; } .md-button.md-THEME_NAME-theme.md-primary { color: '{{primary-color}}'; } .md-button.md-THEME_NAME-theme.md-primary.md-raised, .md-button.md-THEME_NAME-theme.md-primary.md-fab { color: '{{primary-contrast}}'; background-color: '{{primary-color}}'; } .md-button.md-THEME_NAME-theme.md-primary.md-raised:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-primary.md-raised:not([disabled]):focus, .md-button.md-THEME_NAME-theme.md-primary.md-fab:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-primary.md-fab:not([disabled]):focus { background-color: '{{primary-600}}'; } .md-button.md-THEME_NAME-theme.md-fab { border-radius: 50%; background-color: '{{accent-color}}'; color: '{{accent-contrast}}'; } .md-button.md-THEME_NAME-theme.md-fab:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-fab:not([disabled]):focus { background-color: '{{accent-A700}}'; } .md-button.md-THEME_NAME-theme.md-raised { color: '{{background-contrast}}'; background-color: '{{background-50}}'; } .md-button.md-THEME_NAME-theme.md-raised:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-raised:not([disabled]):focus { background-color: '{{background-200}}'; } .md-button.md-THEME_NAME-theme.md-warn { color: '{{warn-color}}'; } .md-button.md-THEME_NAME-theme.md-warn.md-raised, .md-button.md-THEME_NAME-theme.md-warn.md-fab { color: '{{warn-contrast}}'; background-color: '{{warn-color}}'; } .md-button.md-THEME_NAME-theme.md-warn.md-raised:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-warn.md-raised:not([disabled]):focus, .md-button.md-THEME_NAME-theme.md-warn.md-fab:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-warn.md-fab:not([disabled]):focus { background-color: '{{warn-700}}'; } .md-button.md-THEME_NAME-theme.md-accent { color: '{{accent-color}}'; } .md-button.md-THEME_NAME-theme.md-accent.md-raised, .md-button.md-THEME_NAME-theme.md-accent.md-fab { color: '{{accent-contrast}}'; background-color: '{{accent-color}}'; } .md-button.md-THEME_NAME-theme.md-accent.md-raised:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-accent.md-raised:not([disabled]):focus, .md-button.md-THEME_NAME-theme.md-accent.md-fab:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-accent.md-fab:not([disabled]):focus { background-color: '{{accent-700}}'; } .md-button.md-THEME_NAME-theme[disabled], .md-button.md-THEME_NAME-theme.md-raised[disabled], .md-button.md-THEME_NAME-theme.md-fab[disabled] { color: '{{foreground-3}}'; background-color: transparent; cursor: not-allowed; }md-checkbox.md-THEME_NAME-theme .md-ripple { color: '{{accent-600}}'; }md-checkbox.md-THEME_NAME-theme.md-checked .md-ripple { color: '{{background-600}}'; }md-checkbox.md-THEME_NAME-theme .md-icon { border-color: '{{foreground-2}}'; }md-checkbox.md-THEME_NAME-theme.md-checked .md-icon { background-color: '{{accent-color-0.87}}'; }md-checkbox.md-THEME_NAME-theme.md-checked .md-icon:after { border-color: '{{background-200}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary .md-ripple { color: '{{primary-600}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-ripple { color: '{{background-600}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary .md-icon { border-color: '{{foreground-2}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-icon { background-color: '{{primary-color-0.87}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-icon:after { border-color: '{{background-200}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn .md-ripple { color: '{{warn-600}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn .md-icon { border-color: '{{foreground-2}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-icon { background-color: '{{warn-color-0.87}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-icon:after { border-color: '{{background-200}}'; }md-checkbox.md-THEME_NAME-theme[disabled] .md-icon { border-color: '{{foreground-3}}'; }md-checkbox.md-THEME_NAME-theme[disabled].md-checked .md-icon { background-color: '{{foreground-3}}'; }md-content.md-THEME_NAME-theme { background-color: '{{background-hue-3}}'; }md-dialog.md-THEME_NAME-theme { border-radius: 4px; background-color: '{{background-hue-3}}'; } md-dialog.md-THEME_NAME-theme.md-content-overflow .md-actions { border-top-color: '{{foreground-4}}'; }md-divider.md-THEME_NAME-theme { border-top-color: '{{foreground-4}}'; }md-icon.md-THEME_NAME-theme.md-primary { color: '{{primary-color}}'; }md-icon.md-THEME_NAME-theme.md-accent { color: '{{accent-color}}'; }md-icon.md-THEME_NAME-theme.md-warn { color: '{{warn-color}}'; }md-icon.md-THEME_NAME-theme.md-danger { color: '{{danger-color}}'; }md-input-container.md-THEME_NAME-theme .md-input { color: '{{foreground-1}}'; border-color: '{{foreground-4}}'; text-shadow: '{{foreground-shadow}}'; } md-input-container.md-THEME_NAME-theme .md-input::-webkit-input-placeholder, md-input-container.md-THEME_NAME-theme .md-input::-moz-placeholder, md-input-container.md-THEME_NAME-theme .md-input:-moz-placeholder, md-input-container.md-THEME_NAME-theme .md-input:-ms-input-placeholder { color: '{{foreground-3}}'; }md-input-container.md-THEME_NAME-theme label, md-input-container.md-THEME_NAME-theme .md-placeholder { text-shadow: '{{foreground-shadow}}'; color: '{{foreground-3}}'; }md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-has-value label { color: '{{foreground-2}}'; }md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused .md-input { border-color: '{{primary-500}}'; }md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused label { color: '{{primary-500}}'; }md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-accent .md-input { border-color: '{{accent-500}}'; }md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-accent label { color: '{{accent-500}}'; }md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-warn .md-input { border-color: '{{warn-500}}'; }md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-warn label { color: '{{warn-500}}'; }md-input-container.md-THEME_NAME-theme.md-input-invalid .md-input { border-color: '{{warn-500}}'; }md-input-container.md-THEME_NAME-theme.md-input-invalid label { color: '{{warn-500}}'; }md-input-container.md-THEME_NAME-theme.md-input-invalid ng-message, md-input-container.md-THEME_NAME-theme.md-input-invalid data-ng-message, md-input-container.md-THEME_NAME-theme.md-input-invalid x-ng-message, md-input-container.md-THEME_NAME-theme.md-input-invalid [ng-message], md-input-container.md-THEME_NAME-theme.md-input-invalid [data-ng-message], md-input-container.md-THEME_NAME-theme.md-input-invalid [x-ng-message], md-input-container.md-THEME_NAME-theme.md-input-invalid .md-char-counter { color: '{{warn-500}}'; }md-input-container.md-THEME_NAME-theme .md-input[disabled], [disabled] md-input-container.md-THEME_NAME-theme .md-input { border-bottom-color: transparent; color: '{{foreground-3}}'; background-image: linear-gradient(to right, '{{foreground-4}}' 0%, '{{foreground-4}}' 33%, transparent 0%); background-image: -ms-linear-gradient(left, transparent 0%, '{{foreground-4}}' 100%); }md-progress-circular.md-THEME_NAME-theme { background-color: transparent; } md-progress-circular.md-THEME_NAME-theme .md-inner .md-gap { border-top-color: '{{primary-color}}'; border-bottom-color: '{{primary-color}}'; } md-progress-circular.md-THEME_NAME-theme .md-inner .md-left .md-half-circle, md-progress-circular.md-THEME_NAME-theme .md-inner .md-right .md-half-circle { border-top-color: '{{primary-color}}'; } md-progress-circular.md-THEME_NAME-theme .md-inner .md-right .md-half-circle { border-right-color: '{{primary-color}}'; } md-progress-circular.md-THEME_NAME-theme .md-inner .md-left .md-half-circle { border-left-color: '{{primary-color}}'; } md-progress-circular.md-THEME_NAME-theme.md-warn .md-inner .md-gap { border-top-color: '{{warn-color}}'; border-bottom-color: '{{warn-color}}'; } md-progress-circular.md-THEME_NAME-theme.md-warn .md-inner .md-left .md-half-circle, md-progress-circular.md-THEME_NAME-theme.md-warn .md-inner .md-right .md-half-circle { border-top-color: '{{warn-color}}'; } md-progress-circular.md-THEME_NAME-theme.md-warn .md-inner .md-right .md-half-circle { border-right-color: '{{warn-color}}'; } md-progress-circular.md-THEME_NAME-theme.md-warn .md-inner .md-left .md-half-circle { border-left-color: '{{warn-color}}'; } md-progress-circular.md-THEME_NAME-theme.md-accent .md-inner .md-gap { border-top-color: '{{accent-color}}'; border-bottom-color: '{{accent-color}}'; } md-progress-circular.md-THEME_NAME-theme.md-accent .md-inner .md-left .md-half-circle, md-progress-circular.md-THEME_NAME-theme.md-accent .md-inner .md-right .md-half-circle { border-top-color: '{{accent-color}}'; } md-progress-circular.md-THEME_NAME-theme.md-accent .md-inner .md-right .md-half-circle { border-right-color: '{{accent-color}}'; } md-progress-circular.md-THEME_NAME-theme.md-accent .md-inner .md-left .md-half-circle { border-left-color: '{{accent-color}}'; }md-progress-linear.md-THEME_NAME-theme .md-container { background-color: '{{primary-100}}'; }md-progress-linear.md-THEME_NAME-theme .md-bar { background-color: '{{primary-color}}'; }md-progress-linear.md-THEME_NAME-theme.md-warn .md-container { background-color: '{{warn-100}}'; }md-progress-linear.md-THEME_NAME-theme.md-warn .md-bar { background-color: '{{warn-color}}'; }md-progress-linear.md-THEME_NAME-theme.md-accent .md-container { background-color: '{{accent-100}}'; }md-progress-linear.md-THEME_NAME-theme.md-accent .md-bar { background-color: '{{accent-color}}'; }md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-warn .md-bar1 { background-color: '{{warn-100}}'; }md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-warn .md-dashed:before { background: radial-gradient('{{warn-100}}' 0%, '{{warn-100}}' 16%, transparent 42%); }md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-accent .md-bar1 { background-color: '{{accent-100}}'; }md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-accent .md-dashed:before { background: radial-gradient('{{accent-100}}' 0%, '{{accent-100}}' 16%, transparent 42%); }md-radio-button.md-THEME_NAME-theme .md-off { border-color: '{{foreground-2}}'; }md-radio-button.md-THEME_NAME-theme .md-on { background-color: '{{accent-color-0.87}}'; }md-radio-button.md-THEME_NAME-theme.md-checked .md-off { border-color: '{{accent-color-0.87}}'; }md-radio-button.md-THEME_NAME-theme.md-checked .md-ink-ripple { color: '{{accent-color-0.87}}'; }md-radio-button.md-THEME_NAME-theme .md-container .md-ripple { color: '{{accent-600}}'; }md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary .md-on { background-color: '{{primary-color-0.87}}'; }md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-off { border-color: '{{primary-color-0.87}}'; }md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-ink-ripple { color: '{{primary-color-0.87}}'; }md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary .md-container .md-ripple { color: '{{primary-600}}'; }md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn .md-on { background-color: '{{warn-color-0.87}}'; }md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-off { border-color: '{{warn-color-0.87}}'; }md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-ink-ripple { color: '{{warn-color-0.87}}'; }md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn .md-container .md-ripple { color: '{{warn-600}}'; }md-radio-button.md-THEME_NAME-theme[disabled] .md-container .md-off { border-color: '{{foreground-3}}'; }md-radio-button.md-THEME_NAME-theme[disabled] .md-container .md-on { border-color: '{{foreground-3}}'; }md-radio-group.md-THEME_NAME-theme:focus:not(:empty) { border-color: '{{foreground-1}}'; }md-select.md-THEME_NAME-theme:not([disabled]):focus .md-select-label { border-bottom-color: '{{primary-color}}'; color: '{{ foreground-1 }}'; } md-select.md-THEME_NAME-theme:not([disabled]):focus .md-select-label.md-placeholder { color: '{{ foreground-1 }}'; }md-select.md-THEME_NAME-theme:not([disabled]):focus.md-accent .md-select-label { border-bottom-color: '{{accent-color}}'; }md-select.md-THEME_NAME-theme:not([disabled]):focus.md-warn .md-select-label { border-bottom-color: '{{warn-color}}'; }md-select.md-THEME_NAME-theme[disabled] .md-select-label { color: '{{foreground-3}}'; } md-select.md-THEME_NAME-theme[disabled] .md-select-label.md-placeholder { color: '{{foreground-3}}'; }md-select.md-THEME_NAME-theme .md-select-label { border-bottom-color: '{{foreground-4}}'; } md-select.md-THEME_NAME-theme .md-select-label.md-placeholder { color: '{{foreground-2}}'; }md-select-menu.md-THEME_NAME-theme md-optgroup { color: '{{foreground-2}}'; } md-select-menu.md-THEME_NAME-theme md-optgroup md-option { color: '{{foreground-1}}'; }md-select-menu.md-THEME_NAME-theme md-option[selected] { background-color: '{{primary-50}}'; } md-select-menu.md-THEME_NAME-theme md-option[selected]:focus { background-color: '{{primary-100}}'; } md-select-menu.md-THEME_NAME-theme md-option[selected].md-accent { background-color: '{{accent-50}}'; } md-select-menu.md-THEME_NAME-theme md-option[selected].md-accent:focus { background-color: '{{accent-100}}'; }md-select-menu.md-THEME_NAME-theme md-option:focus:not([selected]) { background: '{{background-200}}'; }md-sidenav.md-THEME_NAME-theme { background-color: '{{background-hue-3}}'; }md-slider.md-THEME_NAME-theme .md-track { background-color: '{{foreground-3}}'; }md-slider.md-THEME_NAME-theme .md-track-ticks { background-color: '{{foreground-4}}'; }md-slider.md-THEME_NAME-theme .md-focus-thumb { background-color: '{{foreground-2}}'; }md-slider.md-THEME_NAME-theme .md-focus-ring { border-color: '{{foreground-4}}'; }md-slider.md-THEME_NAME-theme .md-disabled-thumb { border-color: '{{background-hue-3}}'; }md-slider.md-THEME_NAME-theme.md-min .md-thumb:after { background-color: '{{background-hue-3}}'; }md-slider.md-THEME_NAME-theme .md-track.md-track-fill { background-color: '{{accent-color}}'; }md-slider.md-THEME_NAME-theme .md-thumb:after { border-color: '{{accent-color}}'; background-color: '{{accent-color}}'; }md-slider.md-THEME_NAME-theme .md-sign { background-color: '{{accent-color}}'; } md-slider.md-THEME_NAME-theme .md-sign:after { border-top-color: '{{accent-color}}'; }md-slider.md-THEME_NAME-theme .md-thumb-text { color: '{{accent-contrast}}'; }md-slider.md-THEME_NAME-theme.md-warn .md-track.md-track-fill { background-color: '{{warn-color}}'; }md-slider.md-THEME_NAME-theme.md-warn .md-thumb:after { border-color: '{{warn-color}}'; background-color: '{{warn-color}}'; }md-slider.md-THEME_NAME-theme.md-warn .md-sign { background-color: '{{warn-color}}'; } md-slider.md-THEME_NAME-theme.md-warn .md-sign:after { border-top-color: '{{warn-color}}'; }md-slider.md-THEME_NAME-theme.md-warn .md-thumb-text { color: '{{warn-contrast}}'; }md-slider.md-THEME_NAME-theme.md-primary .md-track.md-track-fill { background-color: '{{primary-color}}'; }md-slider.md-THEME_NAME-theme.md-primary .md-thumb:after { border-color: '{{primary-color}}'; background-color: '{{primary-color}}'; }md-slider.md-THEME_NAME-theme.md-primary .md-sign { background-color: '{{primary-color}}'; } md-slider.md-THEME_NAME-theme.md-primary .md-sign:after { border-top-color: '{{primary-color}}'; }md-slider.md-THEME_NAME-theme.md-primary .md-thumb-text { color: '{{primary-contrast}}'; }md-slider.md-THEME_NAME-theme[disabled] .md-thumb:after { border-color: '{{foreground-3}}'; }md-slider.md-THEME_NAME-theme[disabled]:not(.md-min) .md-thumb:after { background-color: '{{foreground-3}}'; }.md-subheader.md-THEME_NAME-theme { color: '{{ foreground-2-0.23 }}'; background-color: '{{background-hue-3}}'; } .md-subheader.md-THEME_NAME-theme.md-primary { color: '{{primary-color}}'; } .md-subheader.md-THEME_NAME-theme.md-accent { color: '{{accent-color}}'; } .md-subheader.md-THEME_NAME-theme.md-warn { color: '{{warn-color}}'; }md-switch.md-THEME_NAME-theme .md-thumb { background-color: '{{background-50}}'; }md-switch.md-THEME_NAME-theme .md-bar { background-color: '{{background-500}}'; }md-switch.md-THEME_NAME-theme.md-checked .md-thumb { background-color: '{{accent-color}}'; }md-switch.md-THEME_NAME-theme.md-checked .md-bar { background-color: '{{accent-color-0.5}}'; }md-switch.md-THEME_NAME-theme.md-checked.md-primary .md-thumb { background-color: '{{primary-color}}'; }md-switch.md-THEME_NAME-theme.md-checked.md-primary .md-bar { background-color: '{{primary-color-0.5}}'; }md-switch.md-THEME_NAME-theme.md-checked.md-warn .md-thumb { background-color: '{{warn-color}}'; }md-switch.md-THEME_NAME-theme.md-checked.md-warn .md-bar { background-color: '{{warn-color-0.5}}'; }md-switch.md-THEME_NAME-theme[disabled] .md-thumb { background-color: '{{background-400}}'; }md-switch.md-THEME_NAME-theme[disabled] .md-bar { background-color: '{{foreground-4}}'; }md-switch.md-THEME_NAME-theme:focus .md-label:not(:empty) { border-color: '{{foreground-1}}'; border-style: dotted; }md-tabs.md-THEME_NAME-theme .md-header { background-color: transparent; }md-tabs.md-THEME_NAME-theme .md-paginator md-icon { color: '{{primary-color}}'; }md-tabs.md-THEME_NAME-theme.md-accent .md-header { background-color: '{{accent-color}}'; }md-tabs.md-THEME_NAME-theme.md-accent md-tab:not([disabled]) { color: '{{accent-100}}'; } md-tabs.md-THEME_NAME-theme.md-accent md-tab:not([disabled]).active { color: '{{accent-contrast}}'; }md-tabs.md-THEME_NAME-theme.md-primary .md-header { background-color: '{{primary-color}}'; }md-tabs.md-THEME_NAME-theme.md-primary md-tab:not([disabled]) { color: '{{primary-100}}'; } md-tabs.md-THEME_NAME-theme.md-primary md-tab:not([disabled]).active { color: '{{primary-contrast}}'; }md-tabs.md-THEME_NAME-theme.md-primary md-tab { color: '{{primary-100}}'; } md-tabs.md-THEME_NAME-theme.md-primary md-tab[disabled] { color: '{{foreground-3}}'; } md-tabs.md-THEME_NAME-theme.md-primary md-tab:focus { color: '{{primary-contrast}}'; background-color: '{{primary-contrast-0.1}}'; } md-tabs.md-THEME_NAME-theme.md-primary md-tab.active { color: '{{primary-contrast}}'; } md-tabs.md-THEME_NAME-theme.md-primary md-tab .md-ripple-container { color: '{{primary-contrast}}'; }md-tabs.md-THEME_NAME-theme.md-warn .md-header { background-color: '{{warn-color}}'; }md-tabs.md-THEME_NAME-theme.md-warn md-tab:not([disabled]) { color: '{{warn-100}}'; } md-tabs.md-THEME_NAME-theme.md-warn md-tab:not([disabled]).active { color: '{{warn-contrast}}'; }md-tabs.md-THEME_NAME-theme md-tabs-ink-bar { color: '{{accent-color}}'; background: '{{accent-color}}'; }md-tabs.md-THEME_NAME-theme md-tab { color: '{{foreground-2}}'; } md-tabs.md-THEME_NAME-theme md-tab[disabled] { color: '{{foreground-3}}'; } md-tabs.md-THEME_NAME-theme md-tab:focus { color: '{{foreground-1}}'; } md-tabs.md-THEME_NAME-theme md-tab.active { color: '{{primary-color}}'; } md-tabs.md-THEME_NAME-theme md-tab .md-ripple-container { color: '{{accent-100}}'; }md-input-group.md-THEME_NAME-theme input, md-input-group.md-THEME_NAME-theme textarea { text-shadow: '{{foreground-shadow}}'; } md-input-group.md-THEME_NAME-theme input::-webkit-input-placeholder, md-input-group.md-THEME_NAME-theme input::-moz-placeholder, md-input-group.md-THEME_NAME-theme input:-moz-placeholder, md-input-group.md-THEME_NAME-theme input:-ms-input-placeholder, md-input-group.md-THEME_NAME-theme textarea::-webkit-input-placeholder, md-input-group.md-THEME_NAME-theme textarea::-moz-placeholder, md-input-group.md-THEME_NAME-theme textarea:-moz-placeholder, md-input-group.md-THEME_NAME-theme textarea:-ms-input-placeholder { color: '{{foreground-3}}'; }md-input-group.md-THEME_NAME-theme label { text-shadow: '{{foreground-shadow}}'; color: '{{foreground-3}}'; }md-input-group.md-THEME_NAME-theme input, md-input-group.md-THEME_NAME-theme textarea { color: '{{foreground-1}}'; border-color: '{{foreground-4}}'; }md-input-group.md-THEME_NAME-theme.md-input-focused input, md-input-group.md-THEME_NAME-theme.md-input-focused textarea { border-color: '{{primary-500}}'; }md-input-group.md-THEME_NAME-theme.md-input-focused label { color: '{{primary-500}}'; }md-input-group.md-THEME_NAME-theme.md-input-focused.md-accent input, md-input-group.md-THEME_NAME-theme.md-input-focused.md-accent textarea { border-color: '{{accent-500}}'; }md-input-group.md-THEME_NAME-theme.md-input-focused.md-accent label { color: '{{accent-500}}'; }md-input-group.md-THEME_NAME-theme.md-input-has-value:not(.md-input-focused) label { color: '{{foreground-2}}'; }md-input-group.md-THEME_NAME-theme .md-input[disabled] { border-bottom-color: '{{foreground-4}}'; color: '{{foreground-3}}'; }md-toast.md-THEME_NAME-theme { background-color: '{{foreground-1}}'; color: '{{background-50}}'; } md-toast.md-THEME_NAME-theme .md-button { color: '{{background-50}}'; } md-toast.md-THEME_NAME-theme .md-button.md-highlight { color: '{{primary-A200}}'; } md-toast.md-THEME_NAME-theme .md-button.md-highlight.md-accent { color: '{{accent-A200}}'; } md-toast.md-THEME_NAME-theme .md-button.md-highlight.md-warn { color: '{{warn-A200}}'; }md-toolbar.md-THEME_NAME-theme { background-color: '{{primary-color}}'; color: '{{primary-contrast}}'; } md-toolbar.md-THEME_NAME-theme .md-button { color: '{{primary-contrast}}'; } md-toolbar.md-THEME_NAME-theme.md-accent { background-color: '{{accent-color}}'; color: '{{accent-contrast}}'; } md-toolbar.md-THEME_NAME-theme.md-warn { background-color: '{{warn-color}}'; color: '{{warn-contrast}}'; }md-tooltip.md-THEME_NAME-theme { color: '{{background-A100}}'; } md-tooltip.md-THEME_NAME-theme .md-background { background-color: '{{foreground-2}}'; }"); |
@@ -5,3 +5,3 @@ /*! | ||
* @license MIT | ||
* v0.8.1-master-fee482d | ||
* v0.8.2 | ||
*/ | ||
@@ -8,0 +8,0 @@ goog.provide('ng.material.components.dialog'); |
@@ -5,3 +5,3 @@ /*! | ||
* @license MIT | ||
* v0.8.1-master-fee482d | ||
* v0.8.2 | ||
*/ | ||
@@ -8,0 +8,0 @@ goog.provide('ng.material.components.divider'); |
@@ -5,3 +5,3 @@ /*! | ||
* @license MIT | ||
* v0.8.1-master-fee482d | ||
* v0.8.2 | ||
*/ | ||
@@ -8,0 +8,0 @@ goog.provide('ng.material.components.gridList'); |
@@ -5,3 +5,3 @@ /*! | ||
* @license MIT | ||
* v0.8.1-master-fee482d | ||
* v0.8.2 | ||
*/ | ||
@@ -8,0 +8,0 @@ goog.provide('ng.material.components.icon'); |
@@ -5,3 +5,3 @@ /*! | ||
* @license MIT | ||
* v0.8.1-master-fee482d | ||
* v0.8.2 | ||
*/ | ||
@@ -183,4 +183,5 @@ goog.provide('ng.material.components.input'); | ||
var touched = false; | ||
var isErrorGetter = containerCtrl.isErrorGetter || function() { | ||
return ngModelCtrl.$invalid && ngModelCtrl.$touched; | ||
return ngModelCtrl.$invalid && (touched || ngModelCtrl.$touched); | ||
}; | ||
@@ -197,9 +198,5 @@ scope.$watch(isErrorGetter, containerCtrl.setInvalid); | ||
.on('focus', function(ev) { | ||
touched = true; | ||
containerCtrl.setFocused(true); | ||
// Error text should not appear before user interaction with the field. | ||
// So we need to check on focus also | ||
ngModelCtrl.$setTouched(); | ||
if ( isErrorGetter() ) containerCtrl.setInvalid(true); | ||
scope.$evalAsync(); | ||
}) | ||
@@ -206,0 +203,0 @@ .on('blur', function(ev) { |
@@ -5,3 +5,3 @@ /*! | ||
* @license MIT | ||
* v0.8.1-master-fee482d | ||
* v0.8.2 | ||
*/ | ||
@@ -8,0 +8,0 @@ goog.provide('ng.material.components.list'); |
@@ -5,3 +5,3 @@ /*! | ||
* @license MIT | ||
* v0.8.1-master-fee482d | ||
* v0.8.2 | ||
*/ | ||
@@ -8,0 +8,0 @@ goog.provide('ng.material.components.progressCircular'); |
@@ -5,3 +5,3 @@ /*! | ||
* @license MIT | ||
* v0.8.1-master-fee482d | ||
* v0.8.2 | ||
*/ | ||
@@ -8,0 +8,0 @@ goog.provide('ng.material.components.progressLinear'); |
@@ -5,3 +5,3 @@ /*! | ||
* @license MIT | ||
* v0.8.1-master-fee482d | ||
* v0.8.2 | ||
*/ | ||
@@ -203,3 +203,3 @@ goog.provide('ng.material.components.radioButton'); | ||
* @param {string=} name Property name of the form under which the control is published. | ||
* @param {string=} ariaLabel Adds label to radio button for accessibility. | ||
* @param {string=} aria-label Adds label to radio button for accessibility. | ||
* Defaults to radio button's text. If no text content is available, a warning will be logged. | ||
@@ -206,0 +206,0 @@ * |
@@ -5,3 +5,3 @@ /*! | ||
* @license MIT | ||
* v0.8.1-master-fee482d | ||
* v0.8.2 | ||
*/ | ||
@@ -85,4 +85,5 @@ goog.provide('ng.material.components.select'); | ||
restrict: 'E', | ||
require: '?ngModel', | ||
compile: compile | ||
require: ['mdSelect', 'ngModel'], | ||
compile: compile, | ||
controller: function() { } // empty placeholder controller to be initialized in link | ||
}; | ||
@@ -100,3 +101,2 @@ | ||
labelEl.addClass('md-select-label'); | ||
labelEl.addClass(intStart + attr.ngModel + ' !== undefined ? \'\' : \'md-placeholder\'' + intEnd); | ||
labelEl.attr('id', 'select_label_' + $mdUtil.nextUid()); | ||
@@ -132,9 +132,33 @@ | ||
return function postLink(scope, element, attr, ngModel) { | ||
return function postLink(scope, element, attr, ctrls) { | ||
var isOpen; | ||
var mdSelectCtrl = ctrls[0]; | ||
var ngModel = ctrls[1]; | ||
var labelEl = element.find('md-select-label'); | ||
var customLabel = labelEl.text().length !== 0; | ||
if (!customLabel) labelEl = labelEl.children().eq(0); | ||
setInitialLabelValue(); | ||
var selectContainer, selectScope; | ||
createSelect(); | ||
var originalRender = ngModel.$render; | ||
ngModel.$render = function() { | ||
originalRender(); | ||
if (selectContainer) { | ||
var selectMenuCtrl = selectContainer.find('md-select-menu').controller('mdSelectMenu'); | ||
mdSelectCtrl.setLabelText(selectMenuCtrl.selectedLabels()); | ||
} | ||
}; | ||
mdSelectCtrl.setLabelText = function(text) { | ||
if (customLabel) return; // Assume that user is handling it on their own | ||
mdSelectCtrl.setIsPlaceholder(!text); | ||
var newText = text || attr.placeholder; | ||
var target = customLabel ? labelEl : labelEl.children().eq(0); | ||
target.text(newText); | ||
}; | ||
mdSelectCtrl.setIsPlaceholder = function(val) { | ||
val ? labelEl.addClass('md-placeholder') : labelEl.removeClass('md-placeholder'); | ||
}; | ||
attr.$observe('disabled', function(disabled) { | ||
@@ -167,30 +191,21 @@ if (disabled !== undefined) { | ||
if (isOpen) { | ||
$mdSelect.cancel(); | ||
$mdSelect.cancel().then(function() { | ||
selectContainer.remove(); | ||
}); | ||
} else { | ||
selectContainer.remove(); | ||
} | ||
}); | ||
// Create a fake select to find out the label value | ||
function setInitialLabelValue() { | ||
if ($parse(attr.ngModel)(scope)) { | ||
var fakeSelectEl = angular.element(selectTemplate).find('md-select-menu'); | ||
fakeSelectEl.data('$ngModelController', ngModel); | ||
var fakeSelectScope = scope.$new(); | ||
fakeSelectEl = $compile(fakeSelectEl)(fakeSelectScope); | ||
var fakeSelectCtrl = fakeSelectEl.controller('mdSelectMenu'); | ||
fakeSelectScope.$$postDigest(function() { | ||
ngModel.$render(); | ||
setLabelText(fakeSelectCtrl.selectedLabels()); | ||
fakeSelectEl.scope().$destroy(); | ||
}); | ||
} else { | ||
setLabelText(); | ||
} | ||
function createSelect() { | ||
selectContainer = angular.element(selectTemplate.clone()); | ||
var selectEl = selectContainer.find('md-select-menu'); | ||
selectEl.data('$ngModelController', ngModel); | ||
selectEl.data('$mdSelectController', mdSelectCtrl); | ||
selectScope = scope.$new(); | ||
selectContainer = $compile(selectContainer)(selectScope); | ||
} | ||
function setLabelText(text) { | ||
if (customLabel) return; // Assume that user is handling it on their own | ||
var newText = text || attr.placeholder; | ||
labelEl.html(newText); | ||
} | ||
function openOnKeypress(e) { | ||
@@ -207,12 +222,11 @@ var allowedCodes = [32, 13, 38, 40]; | ||
scope.$evalAsync(function() { | ||
var selectEl = selectTemplate.clone(); | ||
selectEl.find('md-select-menu').data('$ngModelController', ngModel); | ||
isOpen = true; | ||
$mdSelect.show({ | ||
scope: scope.$new(), | ||
element: selectEl, | ||
scope: selectScope, | ||
preserveScope: true, | ||
skipCompile: true, | ||
element: selectContainer, | ||
target: element[0], | ||
hasBackdrop: true, | ||
loadingAsync: attr.mdOnOpen ? scope.$eval(attr.mdOnOpen) : false, | ||
setLabelText: setLabelText | ||
}).then(function(selectedText) { | ||
@@ -224,3 +238,2 @@ isOpen = false; | ||
}; | ||
} | ||
@@ -547,2 +560,3 @@ } | ||
angular.extend(opts, { | ||
isRemoved: false, | ||
target: angular.element(opts.target), //make sure it's not a naked dom node | ||
@@ -554,7 +568,9 @@ parent: angular.element(opts.parent), | ||
}); | ||
var optionNodes = []; | ||
configureAria(); | ||
element.removeClass('md-leave'); | ||
var optionNodes = opts.selectEl[0].getElementsByTagName('md-option'); | ||
if (opts.loadingAsync && opts.loadingAsync.then) { | ||
@@ -569,3 +585,2 @@ opts.loadingAsync.then(function() { | ||
animateSelect(scope, element, opts); | ||
optionNodes = nodesToArray(opts.selectEl[0].getElementsByTagName('md-option')); | ||
}); | ||
@@ -582,3 +597,2 @@ }); | ||
} | ||
// Only activate click listeners after a short time to stop accidental double taps/clicks | ||
@@ -600,3 +614,2 @@ // from clicking the wrong item | ||
animateSelect(scope, element, opts); | ||
optionNodes = nodesToArray(element[0].querySelectorAll('md-option')); | ||
}); | ||
@@ -626,7 +639,18 @@ }); | ||
// Escape to close | ||
opts.selectEl.on('keydown', function(e) { | ||
switch (e.keyCode) { | ||
opts.selectEl.on('keydown', function(ev) { | ||
switch (ev.keyCode) { | ||
case $mdConstant.KEY_CODE.SPACE: | ||
case $mdConstant.KEY_CODE.ENTER: | ||
var option = $mdUtil.getClosest(ev.target, 'md-option'); | ||
if (option) { | ||
opts.selectEl.triggerHandler({ | ||
type: 'click', | ||
target: option | ||
}); | ||
ev.preventDefault(); | ||
} | ||
break; | ||
case $mdConstant.KEY_CODE.TAB: | ||
case $mdConstant.KEY_CODE.ESCAPE: | ||
e.preventDefault(); | ||
ev.preventDefault(); | ||
opts.restoreFocus = true; | ||
@@ -638,4 +662,4 @@ scope.$apply($mdSelect.cancel); | ||
// Cycling of options, and closing on enter | ||
opts.selectEl.on('keydown', function(e) { | ||
switch (e.keyCode) { | ||
opts.selectEl.on('keydown', function(ev) { | ||
switch (ev.keyCode) { | ||
case $mdConstant.KEY_CODE.UP_ARROW: return focusPrevOption(); | ||
@@ -646,23 +670,21 @@ case $mdConstant.KEY_CODE.DOWN_ARROW: return focusNextOption(); | ||
function focusNextOption() { | ||
var index; | ||
if ((index = optionNodes.indexOf(opts.focusedNode)) == -1) { | ||
// We lost the previously focused element, reset to middle | ||
index = Math.floor( (optionNodes.length - 1) / 2 ); | ||
} else { | ||
if (index < optionNodes.length - 1) ++index; | ||
function focusOption(direction) { | ||
var optionsArray = nodesToArray(optionNodes); | ||
var index = optionsArray.indexOf(opts.focusedNode); | ||
if (index === -1) { | ||
// We lost the previously focused element, reset to first option | ||
index = 0; | ||
} else if (direction === 'next' && index < optionsArray.length - 1) { | ||
index++; | ||
} else if (direction === 'prev' && index > 0) { | ||
index--; | ||
} | ||
opts.focusedNode = optionNodes[index]; | ||
optionNodes[index].focus(); | ||
var newOption = opts.focusedNode = optionsArray[index]; | ||
newOption && newOption.focus(); | ||
} | ||
function focusNextOption() { | ||
focusOption('next'); | ||
} | ||
function focusPrevOption() { | ||
var index; | ||
if ((index = optionNodes.indexOf(opts.focusedNode)) == -1) { | ||
// We lost the previously focused element, reset to middle | ||
index = Math.floor( (optionNodes.length - 1) / 2 ); | ||
} else { | ||
if (index > 0) --index; | ||
} | ||
opts.focusedNode = optionNodes[index]; | ||
optionNodes[index].focus(); | ||
focusOption('prev'); | ||
} | ||
@@ -690,3 +712,4 @@ | ||
opts.isRemoved = true; | ||
element.addClass('md-leave').removeClass('md-clickable'); | ||
element.addClass('md-leave') | ||
.removeClass('md-clickable'); | ||
opts.target.attr('aria-expanded', 'false'); | ||
@@ -700,6 +723,10 @@ | ||
opts.setLabelText && opts.setLabelText(opts.selectEl.controller('mdSelectMenu').selectedLabels()); | ||
var mdSelect = opts.selectEl.controller('mdSelect'); | ||
if (mdSelect) { | ||
mdSelect.setLabelText(opts.selectEl.controller('mdSelectMenu').selectedLabels()); | ||
} | ||
return $mdUtil.transitionEndPromise(element).then(function() { | ||
element.remove(); | ||
element.removeClass('md-active'); | ||
opts.parent[0].removeChild(element[0]); // use browser to avoid $destroy event | ||
opts.backdrop && opts.backdrop.remove(); | ||
@@ -734,3 +761,3 @@ if (opts.restoreFocus) opts.target.focus(); | ||
selectedNode = selectNode.querySelector('md-option[selected]'), | ||
optionNodes = nodesToArray(selectNode.getElementsByTagName('md-option')), | ||
optionNodes = selectNode.getElementsByTagName('md-option'), | ||
optgroupNodes = selectNode.getElementsByTagName('md-optgroup'); | ||
@@ -742,9 +769,9 @@ | ||
centeredNode = selectedNode; | ||
// If there are option groups, center around the first option | ||
// If there are option groups, center around the first option group | ||
} else if (optgroupNodes.length) { | ||
centeredNode = optgroupNodes[0]; | ||
// Otherwise, center around the first optionNode | ||
} else if (optionNodes.length){ | ||
centeredNode = optionNodes[0]; | ||
// Otherwise, lets center on the middle optionNode | ||
} else if (optionNodes.length){ | ||
centeredNode = optionNodes[Math.floor(optionNodes.length / 2 )]; | ||
// In case there are no options, center on whatevers in there... (such as a progress indicator) | ||
// In case there are no options, center on whatever's in there... (eg progress indicator) | ||
} else { | ||
@@ -776,3 +803,6 @@ centeredNode = contentNode.firstElementChild || contentNode; | ||
var focusedNode = centeredNode || optionNodes[0]; | ||
var focusedNode = centeredNode; | ||
if ((focusedNode.tagName || '').toUpperCase() === 'MD-OPTGROUP') { | ||
focusedNode = optionNodes[0] || contentNode.firstElementChild || contentNode; | ||
} | ||
if (focusedNode) { | ||
@@ -813,5 +843,8 @@ opts.focusedNode = focusedNode; | ||
centeredRect.top + contentNode.scrollTop; | ||
transformOrigin = (centeredRect.left + targetRect.width / 2) + 'px ' + | ||
(centeredRect.top + centeredRect.height / 2 - contentNode.scrollTop) + 'px 0px'; | ||
containerNode.style['min-width'] = targetRect.width + centeredRect.paddingLeft + centeredRect.paddingRight + 'px'; | ||
containerNode.style['min-width'] = targetRect.width + centeredRect.paddingLeft + | ||
centeredRect.paddingRight + 'px'; | ||
} | ||
@@ -818,0 +851,0 @@ |
@@ -5,3 +5,3 @@ /*! | ||
* @license MIT | ||
* v0.8.1-master-fee482d | ||
* v0.8.2 | ||
*/ | ||
@@ -8,0 +8,0 @@ goog.provide('ng.material.components.sidenav'); |
@@ -5,3 +5,3 @@ /*! | ||
* @license MIT | ||
* v0.8.1-master-fee482d | ||
* v0.8.2 | ||
*/ | ||
@@ -8,0 +8,0 @@ goog.provide('ng.material.components.slider'); |
@@ -5,3 +5,3 @@ /*! | ||
* @license MIT | ||
* v0.8.1-master-fee482d | ||
* v0.8.2 | ||
*/ | ||
@@ -8,0 +8,0 @@ goog.provide('ng.material.components.sticky'); |
@@ -5,3 +5,3 @@ /*! | ||
* @license MIT | ||
* v0.8.1-master-fee482d | ||
* v0.8.2 | ||
*/ | ||
@@ -8,0 +8,0 @@ goog.provide('ng.material.components.subheader'); |
@@ -5,3 +5,3 @@ /*! | ||
* @license MIT | ||
* v0.8.1-master-fee482d | ||
* v0.8.2 | ||
*/ | ||
@@ -8,0 +8,0 @@ goog.provide('ng.material.components.swipe'); |
@@ -5,3 +5,3 @@ /*! | ||
* @license MIT | ||
* v0.8.1-master-fee482d | ||
* v0.8.2 | ||
*/ | ||
@@ -8,0 +8,0 @@ goog.provide('ng.material.components.switch'); |
@@ -5,3 +5,3 @@ /*! | ||
* @license MIT | ||
* v0.8.1-master-fee482d | ||
* v0.8.2 | ||
*/ | ||
@@ -8,0 +8,0 @@ goog.provide('ng.material.components.tabs'); |
@@ -5,3 +5,3 @@ /*! | ||
* @license MIT | ||
* v0.8.1-master-fee482d | ||
* v0.8.2 | ||
*/ | ||
@@ -8,0 +8,0 @@ goog.provide('ng.material.components.textField'); |
@@ -5,3 +5,3 @@ /*! | ||
* @license MIT | ||
* v0.8.1-master-fee482d | ||
* v0.8.2 | ||
*/ | ||
@@ -8,0 +8,0 @@ goog.provide('ng.material.components.toast'); |
@@ -5,3 +5,3 @@ /*! | ||
* @license MIT | ||
* v0.8.1-master-fee482d | ||
* v0.8.2 | ||
*/ | ||
@@ -8,0 +8,0 @@ goog.provide('ng.material.components.toolbar'); |
@@ -5,3 +5,3 @@ /*! | ||
* @license MIT | ||
* v0.8.1-master-fee482d | ||
* v0.8.2 | ||
*/ | ||
@@ -161,21 +161,10 @@ goog.provide('ng.material.components.tooltip'); | ||
var parentRect = $mdUtil.offsetRect(parent, tooltipParent); | ||
var newPosition = getPosition(direction); | ||
// Default to bottom position if possible | ||
var tipDirection = 'bottom'; | ||
var newPosition = { | ||
left: parentRect.left + parentRect.width / 2 - tipRect.width / 2, | ||
top: parentRect.top + parentRect.height | ||
}; | ||
// If element bleeds over left/right of the window, place it on the edge of the window. | ||
newPosition.left = Math.min( | ||
newPosition.left, | ||
tooltipParent.prop('scrollWidth') - tipRect.width - TOOLTIP_WINDOW_EDGE_SPACE | ||
); | ||
newPosition.left = Math.max(newPosition.left, TOOLTIP_WINDOW_EDGE_SPACE); | ||
// If element bleeds over the bottom of the window, place it above the parent. | ||
if (newPosition.top + tipRect.height > tooltipParent.prop('scrollHeight')) { | ||
newPosition.top = parentRect.top - tipRect.height; | ||
tipDirection = 'top'; | ||
// If the user provided a direction, just nudge the tooltip onto the screen | ||
// Otherwise, recalculate based on 'top' since default is 'bottom' | ||
if (direction) { | ||
newPosition = fitInParent(newPosition); | ||
} else if (newPosition.top > tooltipParent.prop('scrollHeight') - tipRect.height - TOOLTIP_WINDOW_EDGE_SPACE) { | ||
newPosition = fitInParent(getPosition('top')); | ||
} | ||
@@ -203,8 +192,8 @@ | ||
function fitOnScreen (pos) { | ||
var newPosition = {}; | ||
newPosition.left = Math.min( pos.left, tooltipParent.prop('scrollWidth') - tipRect.width - TOOLTIP_WINDOW_EDGE_SPACE ); | ||
newPosition.left = Math.max( pos.left, TOOLTIP_WINDOW_EDGE_SPACE ); | ||
newPosition.top = Math.min( pos.top, tooltipParent.prop('scrollHeight') - tipRect.height - TOOLTIP_WINDOW_EDGE_SPACE ); | ||
newPosition.top = Math.max( pos.top, TOOLTIP_WINDOW_EDGE_SPACE ); | ||
function fitInParent (pos) { | ||
var newPosition = { left: pos.left, top: pos.top }; | ||
newPosition.left = Math.min( newPosition.left, tooltipParent.prop('scrollWidth') - tipRect.width - TOOLTIP_WINDOW_EDGE_SPACE ); | ||
newPosition.left = Math.max( newPosition.left, TOOLTIP_WINDOW_EDGE_SPACE ); | ||
newPosition.top = Math.min( newPosition.top, tooltipParent.prop('scrollHeight') - tipRect.height - TOOLTIP_WINDOW_EDGE_SPACE ); | ||
newPosition.top = Math.max( newPosition.top, TOOLTIP_WINDOW_EDGE_SPACE ); | ||
return newPosition; | ||
@@ -211,0 +200,0 @@ } |
@@ -5,3 +5,3 @@ /*! | ||
* @license MIT | ||
* v0.8.1-master-fee482d | ||
* v0.8.2 | ||
*/ | ||
@@ -8,0 +8,0 @@ goog.provide('ng.material.components.whiteframe'); |
@@ -5,3 +5,3 @@ /*! | ||
* @license MIT | ||
* v0.8.1-master-fee482d | ||
* v0.8.2 | ||
*/ | ||
@@ -29,3 +29,3 @@ (function () { | ||
function MdAutocompleteCtrl ($scope, $element, $timeout, $q, $mdUtil, $mdConstant) { | ||
function MdAutocompleteCtrl ($scope, $element, $q, $mdUtil, $mdConstant) { | ||
@@ -58,2 +58,3 @@ //-- private variables | ||
self.fetch = $mdUtil.debounce(fetchResults); | ||
self.messages = []; | ||
@@ -79,3 +80,3 @@ return init(); | ||
var locals = {}; | ||
if (self.itemName) locals[self.itemName] = $scope.selectedItem; | ||
if (self.itemName) locals[self.itemName] = item; | ||
return locals; | ||
@@ -85,28 +86,37 @@ } | ||
function configureWatchers () { | ||
$scope.$watch('searchText', function (searchText) { | ||
self.index = -1; | ||
if (!searchText || searchText.length < Math.max(parseInt($scope.minLength, 10), 1)) { | ||
self.loading = false; | ||
self.matches = []; | ||
self.hidden = shouldHide(); | ||
return; | ||
} | ||
var term = searchText.toLowerCase(); | ||
if (promise && promise.cancel) { | ||
promise.cancel(); | ||
promise = null; | ||
} | ||
if (!$scope.noCache && cache[term]) { | ||
self.matches = cache[term]; | ||
} else { | ||
self.fetch(searchText); | ||
} | ||
self.hidden = shouldHide(); | ||
if ($scope.textChange) $scope.textChange(getItemScope($scope.selectedItem)); | ||
var wait = parseInt($scope.delay, 10) || 0; | ||
$scope.$watch('searchText', wait | ||
? $mdUtil.debounce(handleSearchText, wait) | ||
: handleSearchText); | ||
$scope.$watch('selectedItem', function (selectedItem, previousSelectedItem) { | ||
if ($scope.itemChange && selectedItem !== previousSelectedItem) | ||
$scope.itemChange(getItemScope(selectedItem)); | ||
}); | ||
$scope.$watch('selectedItem', function (selectedItem) { | ||
if ($scope.itemChange) $scope.itemChange(getItemScope(selectedItem)); | ||
}); | ||
} | ||
function handleSearchText (searchText, previousSearchText) { | ||
self.index = -1; | ||
if (!searchText || searchText.length < Math.max(parseInt($scope.minLength, 10), 1)) { | ||
self.loading = false; | ||
self.matches = []; | ||
self.hidden = shouldHide(); | ||
updateMessages(); | ||
return; | ||
} | ||
var term = searchText.toLowerCase(); | ||
if (promise && promise.cancel) { | ||
promise.cancel(); | ||
promise = null; | ||
} | ||
if (!$scope.noCache && cache[term]) { | ||
self.matches = cache[term]; | ||
updateMessages(); | ||
} else { | ||
self.fetch(searchText); | ||
} | ||
self.hidden = shouldHide(); | ||
if ($scope.textChange && searchText !== previousSearchText) | ||
$scope.textChange(getItemScope($scope.selectedItem)); | ||
} | ||
function fetchResults (searchText) { | ||
@@ -128,5 +138,21 @@ var items = $scope.$parent.$eval(itemExpr), | ||
self.hidden = shouldHide(); | ||
updateMessages(); | ||
} | ||
} | ||
function updateMessages () { | ||
if (self.hidden) return; | ||
switch (self.matches.length) { | ||
case 0: return self.messages.splice(0); | ||
case 1: return self.messages.push({ display: 'There is 1 match available.' }); | ||
default: return self.messages.push({ display: 'There are ' | ||
+ self.matches.length | ||
+ ' matches available.' }); | ||
} | ||
} | ||
function updateSelectionMessage () { | ||
self.messages.push({ display: getCurrentDisplayValue() }); | ||
} | ||
function blur () { | ||
@@ -143,2 +169,3 @@ self.hidden = true; | ||
updateScroll(); | ||
updateSelectionMessage(); | ||
break; | ||
@@ -150,2 +177,3 @@ case $mdConstant.KEY_CODE.UP_ARROW: | ||
updateScroll(); | ||
updateSelectionMessage(); | ||
break; | ||
@@ -206,3 +234,3 @@ case $mdConstant.KEY_CODE.ENTER: | ||
} | ||
MdAutocompleteCtrl.$inject = ["$scope", "$element", "$timeout", "$q", "$mdUtil", "$mdConstant"]; | ||
MdAutocompleteCtrl.$inject = ["$scope", "$element", "$q", "$mdUtil", "$mdConstant"]; | ||
})(); | ||
@@ -235,2 +263,3 @@ | ||
* @param {number=} md-min-length Specifies the minimum length of text before autocomplete will make suggestions | ||
* @param {number=} md-delay Specifies the amount of time (in milliseconds) to wait before looking for results | ||
* | ||
@@ -268,6 +297,8 @@ * @usage | ||
ng-click="$mdAutocompleteCtrl.clear()">\ | ||
<md-icon md-svg-icon="cancel"></md-icon>\ | ||
<span class="visually-hidden">Clear</span>\ | ||
</button>\ | ||
<md-progress-linear ng-if="$mdAutocompleteCtrl.loading" md-mode="indeterminate"></md-progress-linear>\ | ||
<md-icon md-svg-icon="cancel"></md-icon>\ | ||
<span class="visually-hidden">Clear</span>\ | ||
</button>\ | ||
<md-progress-linear\ | ||
ng-if="$mdAutocompleteCtrl.loading"\ | ||
md-mode="indeterminate"></md-progress-linear>\ | ||
</md-autocomplete-wrap>\ | ||
@@ -287,5 +318,3 @@ <ul role="presentation">\ | ||
aria-live="assertive">\ | ||
<p ng-if="$mdAutocompleteCtrl.index === -1 && $mdAutocompleteCtrl.matches.length === 1">There is 1 match available.</p>\ | ||
<p ng-if="$mdAutocompleteCtrl.index === -1 && $mdAutocompleteCtrl.matches.length > 1">There are {{$mdAutocompleteCtrl.matches.length}} matches available.</p>\ | ||
<p ng-if="$mdAutocompleteCtrl.index >= 0">{{ $mdAutocompleteCtrl.getCurrentDisplayValue() }}</p>\ | ||
<p ng-repeat="message in $mdAutocompleteCtrl.messages">{{message.display}}</p>\ | ||
</aria-status>', | ||
@@ -305,3 +334,4 @@ transclude: true, | ||
isDisabled: '=ngDisabled', | ||
minLength: '=mdMinLength' | ||
minLength: '=mdMinLength', | ||
delay: '=mdDelay' | ||
} | ||
@@ -320,8 +350,9 @@ }; | ||
var term = $element.attr('md-highlight-text'), | ||
text = $interpolate($element.text())($scope); | ||
$scope.$watch(term, function (term) { | ||
var regex = new RegExp('^' + sanitize(term), 'i'), | ||
html = text.replace(regex, '<span class="highlight">$&</span>'); | ||
$element.html(html); | ||
}); | ||
text = $interpolate($element.text())($scope), | ||
watcher = $scope.$watch(term, function (term) { | ||
var regex = new RegExp('^' + sanitize(term), 'i'), | ||
html = text.replace(regex, '<span class="highlight">$&</span>'); | ||
$element.html(html); | ||
}); | ||
$element.on('$destroy', function () { watcher(); }); | ||
@@ -328,0 +359,0 @@ function sanitize (term) { |
@@ -5,4 +5,4 @@ /*! | ||
* @license MIT | ||
* v0.8.1-master-fee482d | ||
* v0.8.2 | ||
*/ | ||
!function(){"use strict";angular.module("material.components.autocomplete",["material.core","material.components.icon"])}(),function(){"use strict";function e(e,t,n,a,l,i){function o(){m(),c()}function c(){var e=angular.element(T.ul),t=angular.element(T.input),n=e.attr("id")||"ul_"+l.nextUid();e.attr("id",n),t.attr("aria-owns",n)}function r(t){if(t){var n={};return $.itemName&&(n[$.itemName]=e.selectedItem),n}}function m(){e.$watch("searchText",function(t){if($.index=-1,!t||t.length<Math.max(parseInt(e.minLength,10),1))return $.loading=!1,$.matches=[],$.hidden=h(),void 0;var n=t.toLowerCase();b&&b.cancel&&(b.cancel(),b=null),!e.noCache&&E[n]?$.matches=E[n]:$.fetch(t),$.hidden=h(),e.textChange&&e.textChange(r(e.selectedItem))}),e.$watch("selectedItem",function(t){e.itemChange&&e.itemChange(r(t))})}function d(t){function n(n){E[i]=n,t===e.searchText&&(b=null,$.loading=!1,$.matches=n,$.hidden=h())}var l=e.$parent.$eval(v),i=t.toLowerCase();angular.isArray(l)?n(l):($.loading=!0,b=a.when(l).then(n))}function u(){$.hidden=!0}function s(e){switch(e.keyCode){case i.KEY_CODE.DOWN_ARROW:if($.loading)return;e.preventDefault(),$.index=Math.min($.index+1,$.matches.length-1),C();break;case i.KEY_CODE.UP_ARROW:if($.loading)return;e.preventDefault(),$.index=Math.max(0,$.index-1),C();break;case i.KEY_CODE.ENTER:if($.loading||$.index<0)return;e.preventDefault(),f($.index);break;case i.KEY_CODE.ESCAPE:$.matches=[],$.hidden=!0,$.index=-1;break;case i.KEY_CODE.TAB:}}function p(){e.searchText="",f(-1),T.input.focus()}function h(){return 1===$.matches.length&&e.searchText===x($.matches[0])}function g(){return x($.matches[$.index])}function x(t){return t&&e.itemText?e.itemText(r(t)):t}function f(t){e.selectedItem=$.matches[t],e.searchText=x(e.selectedItem)||e.searchText,$.hidden=!0,$.index=-1,$.matches=[]}function C(){var e=41*$.index,t=e+41,n=225.5;e<T.ul.scrollTop?T.ul.scrollTop=e:t>T.ul.scrollTop+n&&(T.ul.scrollTop=t-n)}var $=this,A=e.itemsExpr.split(/ in /i),v=A[1],T={main:t[0],ul:t[0].getElementsByTagName("ul")[0],input:t[0].getElementsByTagName("input")[0]},b=null,E={};return $.scope=e,$.parent=e.$parent,$.itemName=A[0],$.matches=[],$.loading=!1,$.hidden=!0,$.index=0,$.keydown=s,$.blur=u,$.clear=p,$.select=f,$.getCurrentDisplayValue=g,$.fetch=l.debounce(d),o()}angular.module("material.components.autocomplete").controller("MdAutocompleteCtrl",e),e.$inject=["$scope","$element","$timeout","$q","$mdUtil","$mdConstant"]}(),function(){"use strict";function e(){return{template:' <md-autocomplete-wrap role="listbox"> <input type="text" ng-disabled="isDisabled" ng-model="searchText" ng-keydown="$mdAutocompleteCtrl.keydown($event)" ng-blur="$mdAutocompleteCtrl.blur()" placeholder="{{placeholder}}" aria-label="{{placeholder}}" aria-autocomplete="list" aria-haspopup="true" aria-activedescendant="" aria-expanded="{{!$mdAutocompleteCtrl.hidden}}"/> <button type="button" ng-if="searchText" ng-click="$mdAutocompleteCtrl.clear()"> <md-icon md-svg-icon="cancel"></md-icon> <span class="visually-hidden">Clear</span> </button> <md-progress-linear ng-if="$mdAutocompleteCtrl.loading" md-mode="indeterminate"></md-progress-linear> </md-autocomplete-wrap> <ul role="presentation"> <li ng-repeat="(index, item) in $mdAutocompleteCtrl.matches" ng-class="{ selected: index === $mdAutocompleteCtrl.index }" ng-show="searchText && !$mdAutocompleteCtrl.hidden" ng-click="$mdAutocompleteCtrl.select(index)" ng-transclude md-autocomplete-list-item="$mdAutocompleteCtrl.itemName"> </li> </ul> <aria-status class="visually-hidden" role="status" aria-live="assertive"> <p ng-if="$mdAutocompleteCtrl.index === -1 && $mdAutocompleteCtrl.matches.length === 1">There is 1 match available.</p> <p ng-if="$mdAutocompleteCtrl.index === -1 && $mdAutocompleteCtrl.matches.length > 1">There are {{$mdAutocompleteCtrl.matches.length}} matches available.</p> <p ng-if="$mdAutocompleteCtrl.index >= 0">{{ $mdAutocompleteCtrl.getCurrentDisplayValue() }}</p> </aria-status>',transclude:!0,controller:"MdAutocompleteCtrl",controllerAs:"$mdAutocompleteCtrl",scope:{searchText:"=mdSearchText",selectedItem:"=mdSelectedItem",itemsExpr:"@mdItems",itemText:"&mdItemText",placeholder:"@placeholder",noCache:"=mdNoCache",itemChange:"&mdSelectedItemChange",textChange:"&mdSearchTextChange",isDisabled:"=ngDisabled",minLength:"=mdMinLength"}}}angular.module("material.components.autocomplete").directive("mdAutocomplete",e)}(),function(){"use strict";function e(e,t,n){function a(e){return e?e.replace(/[\*\[\]\(\)\{\}\\\^\$]/g,"\\$&"):e}var l=t.attr("md-highlight-text"),i=n(t.text())(e);e.$watch(l,function(e){var n=new RegExp("^"+a(e),"i"),l=i.replace(n,'<span class="highlight">$&</span>');t.html(l)})}angular.module("material.components.autocomplete").controller("MdHighlightCtrl",e),e.$inject=["$scope","$element","$interpolate"]}(),function(){"use strict";function e(){return{terminal:!0,scope:!1,controller:"MdHighlightCtrl"}}angular.module("material.components.autocomplete").directive("mdHighlightText",e)}(),function(){"use strict";function e(e,t){function n(n,a,l,i){var o=i.parent.$new(!1,i.parent),c=i.scope.$eval(l.mdAutocompleteListItem);o[c]=n.item,e(a.contents())(o),a.attr({role:"option",id:"item_"+t.nextUid()})}return{require:"^?mdAutocomplete",terminal:!0,link:n,scope:!1}}angular.module("material.components.autocomplete").directive("mdAutocompleteListItem",e),e.$inject=["$compile","$mdUtil"]}(); | ||
!function(){"use strict";angular.module("material.components.autocomplete",["material.core","material.components.icon"])}(),function(){"use strict";function e(e,t,n,a,l){function i(){r(),o()}function o(){var e=angular.element(y.ul),t=angular.element(y.input),n=e.attr("id")||"ul_"+a.nextUid();e.attr("id",n),t.attr("aria-owns",n)}function c(e){if(e){var t={};return T.itemName&&(t[T.itemName]=e),t}}function r(){var t=parseInt(e.delay,10)||0;e.$watch("searchText",t?a.debounce(s,t):s),e.$watch("selectedItem",function(t,n){e.itemChange&&t!==n&&e.itemChange(c(t))})}function s(t,n){if(T.index=-1,!t||t.length<Math.max(parseInt(e.minLength,10),1))return T.loading=!1,T.matches=[],T.hidden=f(),d(),void 0;var a=t.toLowerCase();E&&E.cancel&&(E.cancel(),E=null),!e.noCache&&w[a]?(T.matches=w[a],d()):T.fetch(t),T.hidden=f(),e.textChange&&t!==n&&e.textChange(c(e.selectedItem))}function m(t){function a(n){w[i]=n,t===e.searchText&&(E=null,T.loading=!1,T.matches=n,T.hidden=f(),d())}var l=e.$parent.$eval(b),i=t.toLowerCase();angular.isArray(l)?a(l):(T.loading=!0,E=n.when(l).then(a))}function d(){if(!T.hidden)switch(T.matches.length){case 0:return T.messages.splice(0);case 1:return T.messages.push({display:"There is 1 match available."});default:return T.messages.push({display:"There are "+T.matches.length+" matches available."})}}function u(){T.messages.push({display:x()})}function p(){T.hidden=!0}function h(e){switch(e.keyCode){case l.KEY_CODE.DOWN_ARROW:if(T.loading)return;e.preventDefault(),T.index=Math.min(T.index+1,T.matches.length-1),v(),u();break;case l.KEY_CODE.UP_ARROW:if(T.loading)return;e.preventDefault(),T.index=Math.max(0,T.index-1),v(),u();break;case l.KEY_CODE.ENTER:if(T.loading||T.index<0)return;e.preventDefault(),$(T.index);break;case l.KEY_CODE.ESCAPE:T.matches=[],T.hidden=!0,T.index=-1;break;case l.KEY_CODE.TAB:}}function g(){e.searchText="",$(-1),y.input.focus()}function f(){return 1===T.matches.length&&e.searchText===C(T.matches[0])}function x(){return C(T.matches[T.index])}function C(t){return t&&e.itemText?e.itemText(c(t)):t}function $(t){e.selectedItem=T.matches[t],e.searchText=C(e.selectedItem)||e.searchText,T.hidden=!0,T.index=-1,T.matches=[]}function v(){var e=41*T.index,t=e+41,n=225.5;e<y.ul.scrollTop?y.ul.scrollTop=e:t>y.ul.scrollTop+n&&(y.ul.scrollTop=t-n)}var T=this,A=e.itemsExpr.split(/ in /i),b=A[1],y={main:t[0],ul:t[0].getElementsByTagName("ul")[0],input:t[0].getElementsByTagName("input")[0]},E=null,w={};return T.scope=e,T.parent=e.$parent,T.itemName=A[0],T.matches=[],T.loading=!1,T.hidden=!0,T.index=0,T.keydown=h,T.blur=p,T.clear=g,T.select=$,T.getCurrentDisplayValue=x,T.fetch=a.debounce(m),T.messages=[],i()}angular.module("material.components.autocomplete").controller("MdAutocompleteCtrl",e),e.$inject=["$scope","$element","$q","$mdUtil","$mdConstant"]}(),function(){"use strict";function e(){return{template:' <md-autocomplete-wrap role="listbox"> <input type="text" ng-disabled="isDisabled" ng-model="searchText" ng-keydown="$mdAutocompleteCtrl.keydown($event)" ng-blur="$mdAutocompleteCtrl.blur()" placeholder="{{placeholder}}" aria-label="{{placeholder}}" aria-autocomplete="list" aria-haspopup="true" aria-activedescendant="" aria-expanded="{{!$mdAutocompleteCtrl.hidden}}"/> <button type="button" ng-if="searchText" ng-click="$mdAutocompleteCtrl.clear()"> <md-icon md-svg-icon="cancel"></md-icon> <span class="visually-hidden">Clear</span> </button> <md-progress-linear ng-if="$mdAutocompleteCtrl.loading" md-mode="indeterminate"></md-progress-linear> </md-autocomplete-wrap> <ul role="presentation"> <li ng-repeat="(index, item) in $mdAutocompleteCtrl.matches" ng-class="{ selected: index === $mdAutocompleteCtrl.index }" ng-show="searchText && !$mdAutocompleteCtrl.hidden" ng-click="$mdAutocompleteCtrl.select(index)" ng-transclude md-autocomplete-list-item="$mdAutocompleteCtrl.itemName"> </li> </ul> <aria-status class="visually-hidden" role="status" aria-live="assertive"> <p ng-repeat="message in $mdAutocompleteCtrl.messages">{{message.display}}</p> </aria-status>',transclude:!0,controller:"MdAutocompleteCtrl",controllerAs:"$mdAutocompleteCtrl",scope:{searchText:"=mdSearchText",selectedItem:"=mdSelectedItem",itemsExpr:"@mdItems",itemText:"&mdItemText",placeholder:"@placeholder",noCache:"=mdNoCache",itemChange:"&mdSelectedItemChange",textChange:"&mdSearchTextChange",isDisabled:"=ngDisabled",minLength:"=mdMinLength",delay:"=mdDelay"}}}angular.module("material.components.autocomplete").directive("mdAutocomplete",e)}(),function(){"use strict";function e(e,t,n){function a(e){return e?e.replace(/[\*\[\]\(\)\{\}\\\^\$]/g,"\\$&"):e}var l=t.attr("md-highlight-text"),i=n(t.text())(e),o=e.$watch(l,function(e){var n=new RegExp("^"+a(e),"i"),l=i.replace(n,'<span class="highlight">$&</span>');t.html(l)});t.on("$destroy",function(){o()})}angular.module("material.components.autocomplete").controller("MdHighlightCtrl",e),e.$inject=["$scope","$element","$interpolate"]}(),function(){"use strict";function e(){return{terminal:!0,scope:!1,controller:"MdHighlightCtrl"}}angular.module("material.components.autocomplete").directive("mdHighlightText",e)}(),function(){"use strict";function e(e,t){function n(n,a,l,i){var o=i.parent.$new(!1,i.parent),c=i.scope.$eval(l.mdAutocompleteListItem);o[c]=n.item,e(a.contents())(o),a.attr({role:"option",id:"item_"+t.nextUid()})}return{require:"^?mdAutocomplete",terminal:!0,link:n,scope:!1}}angular.module("material.components.autocomplete").directive("mdAutocompleteListItem",e),e.$inject=["$compile","$mdUtil"]}(); |
{ | ||
"name": "angular-material-autocomplete", | ||
"version": "0.8.1-master-fee482d", | ||
"version": "0.8.2", | ||
"dependencies": { | ||
"angular-material-core": "0.8.1-master-fee482d", | ||
"angular-material-icon": "0.8.1-master-fee482d" | ||
"angular-material-core": "0.8.2", | ||
"angular-material-icon": "0.8.2" | ||
} | ||
} |
{ | ||
"name": "angular-material", | ||
"version": "0.8.1", | ||
"main":"", | ||
"homepage": "https://material.angularjs.org", | ||
"version": "0.8.2", | ||
"main": "index.js", | ||
"repository": { | ||
@@ -28,5 +29,3 @@ "type": "git", | ||
"url": "https://github.com/angular/material/issues" | ||
}, | ||
"homepage": "https://material.angularjs.org", | ||
"main": "angular-material.js" | ||
} | ||
} |
@@ -7,3 +7,3 @@ This repo is for distribution on `npm` and `bower`. The source for this module is in the | ||
You can install this package locally either with `npm` or with `bower`. | ||
You can install this package locally either with `npm`, `bower`, or `jspm`. | ||
@@ -16,7 +16,3 @@ ### npm | ||
Note that this package is not in CommonJS format, so doing `require('angular-material')` | ||
will return `undefined`. If you're using | ||
[Browserify](https://github.com/substack/node-browserify), you can use | ||
[exposify](https://github.com/thlorenz/exposify) to have `require('angular-material')` | ||
return the `angular-material` global. | ||
Now you can use `require('angular-material')` when installing with npm or jsmp and using Browserify or Webpack. | ||
@@ -23,0 +19,0 @@ ### bower |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
302
0
2423502
50097
166