Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
release: version 1.1.20-master-8c159aa
Browse files Browse the repository at this point in the history
  • Loading branch information
Splaktar committed Aug 16, 2019
1 parent 8e71260 commit 727b50d
Show file tree
Hide file tree
Showing 503 changed files with 2,132 additions and 2,075 deletions.
2 changes: 1 addition & 1 deletion angular-material-mocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ angular.module('ngMaterial-mock', [

/**
* AngularJS Material dynamically generates Style tags
* based on themes and palletes; for each ng-app.
* based on themes and palettes; for each ng-app.
*
* For testing, we want to disable generation and
* <style> DOM injections. So we clear the huge THEME
Expand Down
10 changes: 5 additions & 5 deletions angular-material.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* AngularJS Material Design
* https://github.com/angular/material
* @license MIT
* v1.1.20-master-e9e4647
* v1.1.20-master-8c159aa
*/
html, body {
height: 100%;
Expand Down Expand Up @@ -467,7 +467,7 @@ md-autocomplete {
@media screen and (-ms-high-contrast: active) {
md-autocomplete input {
border: 1px solid #fff; }
md-autocomplete li:focus {
md-autocomplete .md-autocomplete-suggestion:focus {
color: #fff; } }

.md-virtual-repeat-container.md-autocomplete-suggestions-container,
Expand Down Expand Up @@ -496,7 +496,7 @@ md-autocomplete {
margin: 0;
list-style: none;
padding: 0; }
.md-autocomplete-suggestions li {
.md-autocomplete-suggestions .md-autocomplete-suggestion {
font-size: 14px;
overflow: hidden;
padding: 0 15px;
Expand All @@ -506,9 +506,9 @@ md-autocomplete {
margin: 0;
white-space: nowrap;
text-overflow: ellipsis; }
.md-autocomplete-suggestions li:focus {
.md-autocomplete-suggestions .md-autocomplete-suggestion:focus {
outline: none; }
.md-autocomplete-suggestions li:not(.md-not-found-wrapper) {
.md-autocomplete-suggestions .md-autocomplete-suggestion:not(.md-not-found-wrapper) {
cursor: pointer; }

@media screen and (-ms-high-contrast: active) {
Expand Down
123 changes: 71 additions & 52 deletions angular-material.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions angular-material.min.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions angular-material.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-material",
"version": "1.1.20-master-e9e4647",
"version": "1.1.20-master-8c159aa",
"license": "MIT",
"ignore": [],
"dependencies": {
Expand Down
12 changes: 6 additions & 6 deletions modules/closure/autocomplete/autocomplete-default-theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* AngularJS Material Design
* https://github.com/angular/material
* @license MIT
* v1.1.20-master-e9e4647
* v1.1.20-master-8c159aa
*/
md-autocomplete.md-THEME_NAME-theme {
background: '{{background-hue-1}}'; }
Expand Down Expand Up @@ -36,10 +36,10 @@ md-autocomplete.md-THEME_NAME-theme {
.md-autocomplete-suggestions-container.md-THEME_NAME-theme,
.md-autocomplete-standard-list-container.md-THEME_NAME-theme {
background: '{{background-hue-1}}'; }
.md-autocomplete-suggestions-container.md-THEME_NAME-theme li,
.md-autocomplete-standard-list-container.md-THEME_NAME-theme li {
.md-autocomplete-suggestions-container.md-THEME_NAME-theme .md-autocomplete-suggestion,
.md-autocomplete-standard-list-container.md-THEME_NAME-theme .md-autocomplete-suggestion {
color: '{{foreground-1}}'; }
.md-autocomplete-suggestions-container.md-THEME_NAME-theme li:hover, .md-autocomplete-suggestions-container.md-THEME_NAME-theme li#selected_option,
.md-autocomplete-standard-list-container.md-THEME_NAME-theme li:hover,
.md-autocomplete-standard-list-container.md-THEME_NAME-theme li#selected_option {
.md-autocomplete-suggestions-container.md-THEME_NAME-theme .md-autocomplete-suggestion:hover, .md-autocomplete-suggestions-container.md-THEME_NAME-theme .md-autocomplete-suggestion.selected,
.md-autocomplete-standard-list-container.md-THEME_NAME-theme .md-autocomplete-suggestion:hover,
.md-autocomplete-standard-list-container.md-THEME_NAME-theme .md-autocomplete-suggestion.selected {
background: '{{background-500-0.18}}'; }

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions modules/closure/autocomplete/autocomplete.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* AngularJS Material Design
* https://github.com/angular/material
* @license MIT
* v1.1.20-master-e9e4647
* v1.1.20-master-8c159aa
*/
md-autocomplete {
border-radius: 2px;
Expand Down Expand Up @@ -144,7 +144,7 @@ md-autocomplete {
@media screen and (-ms-high-contrast: active) {
md-autocomplete input {
border: 1px solid #fff; }
md-autocomplete li:focus {
md-autocomplete .md-autocomplete-suggestion:focus {
color: #fff; } }

.md-virtual-repeat-container.md-autocomplete-suggestions-container,
Expand Down Expand Up @@ -173,7 +173,7 @@ md-autocomplete {
margin: 0;
list-style: none;
padding: 0; }
.md-autocomplete-suggestions li {
.md-autocomplete-suggestions .md-autocomplete-suggestion {
font-size: 14px;
overflow: hidden;
padding: 0 15px;
Expand All @@ -183,9 +183,9 @@ md-autocomplete {
margin: 0;
white-space: nowrap;
text-overflow: ellipsis; }
.md-autocomplete-suggestions li:focus {
.md-autocomplete-suggestions .md-autocomplete-suggestion:focus {
outline: none; }
.md-autocomplete-suggestions li:not(.md-not-found-wrapper) {
.md-autocomplete-suggestions .md-autocomplete-suggestion:not(.md-not-found-wrapper) {
cursor: pointer; }

@media screen and (-ms-high-contrast: active) {
Expand Down
115 changes: 67 additions & 48 deletions modules/closure/autocomplete/autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* AngularJS Material Design
* https://github.com/angular/material
* @license MIT
* v1.1.20-master-e9e4647
* v1.1.20-master-8c159aa
*/
goog.provide('ngmaterial.components.autocomplete');
goog.require('ngmaterial.components.icon');
Expand Down Expand Up @@ -64,35 +64,36 @@ function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $mdTheming,
defineProperty('hidden', handleHiddenChange, true);

// Public Exported Variables
ctrl.scope = $scope;
ctrl.parent = $scope.$parent;
ctrl.itemName = itemParts[ 0 ];
ctrl.matches = [];
ctrl.loading = false;
ctrl.hidden = true;
ctrl.index = null;
ctrl.id = $mdUtil.nextUid();
ctrl.scope = $scope;
ctrl.parent = $scope.$parent;
ctrl.itemName = itemParts[0];
ctrl.matches = [];
ctrl.loading = false;
ctrl.hidden = true;
ctrl.index = -1;
ctrl.activeOption = null;
ctrl.id = $mdUtil.nextUid();
ctrl.isDisabled = null;
ctrl.isRequired = null;
ctrl.isReadonly = null;
ctrl.hasNotFound = false;
ctrl.selectedMessage = $scope.selectedMessage || 'selected';

// Public Exported Methods
ctrl.keydown = keydown;
ctrl.blur = blur;
ctrl.focus = focus;
ctrl.clear = clearValue;
ctrl.select = select;
ctrl.listEnter = onListEnter;
ctrl.listLeave = onListLeave;
ctrl.mouseUp = onMouseup;
ctrl.getCurrentDisplayValue = getCurrentDisplayValue;
ctrl.registerSelectedItemWatcher = registerSelectedItemWatcher;
ctrl.keydown = keydown;
ctrl.blur = blur;
ctrl.focus = focus;
ctrl.clear = clearValue;
ctrl.select = select;
ctrl.listEnter = onListEnter;
ctrl.listLeave = onListLeave;
ctrl.mouseUp = onMouseup;
ctrl.getCurrentDisplayValue = getCurrentDisplayValue;
ctrl.registerSelectedItemWatcher = registerSelectedItemWatcher;
ctrl.unregisterSelectedItemWatcher = unregisterSelectedItemWatcher;
ctrl.notFoundVisible = notFoundVisible;
ctrl.loadingIsVisible = loadingIsVisible;
ctrl.positionDropdown = positionDropdown;
ctrl.notFoundVisible = notFoundVisible;
ctrl.loadingIsVisible = loadingIsVisible;
ctrl.positionDropdown = positionDropdown;

/**
* Report types to be used for the $mdLiveAnnouncer
Expand Down Expand Up @@ -263,6 +264,22 @@ function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $mdTheming,
elements.input.focus();
}

/**
* Update the activeOption based on the selected item in the listbox.
* The activeOption is used in the template to set the aria-activedescendant attribute, which
* enables screen readers to properly handle visual focus within the listbox and announce the
* item's place in the list. I.e. "List item 3 of 50". Anytime that `ctrl.index` changes, this
* function needs to be called to update the activeOption.
*/
function updateActiveOption() {
var selectedOption = elements.scroller.querySelector('.selected');
if (selectedOption) {
ctrl.activeOption = selectedOption.id;
} else {
ctrl.activeOption = null;
}
}

/**
* Sets up any watchers used by autocomplete
*/
Expand Down Expand Up @@ -390,6 +407,7 @@ function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $mdTheming,
$mdUtil.disableScrollAround(elements.ul);
enableWrapScroll = disableElementScrollEvents(angular.element(elements.wrap));
ctrl.documentElement.on('click', handleClickOutside);
$mdUtil.nextTick(updateActiveOption);
}
} else if (hidden && !oldHidden) {
ctrl.documentElement.off('click', handleClickOutside);
Expand Down Expand Up @@ -533,8 +551,8 @@ function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $mdTheming,

/**
* Handles changes to the searchText property.
* @param searchText
* @param previousSearchText
* @param {string} searchText
* @param {string} previousSearchText
*/
function handleSearchText (searchText, previousSearchText) {
ctrl.index = getDefaultIndex();
Expand Down Expand Up @@ -618,17 +636,17 @@ function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $mdTheming,
if (ctrl.loading || hasSelection()) return;
event.stopPropagation();
event.preventDefault();
ctrl.index = Math.min(ctrl.index + 1, ctrl.matches.length - 1);
ctrl.index = Math.min(ctrl.index + 1, ctrl.matches.length - 1);
$mdUtil.nextTick(updateActiveOption);
updateScroll();
reportMessages(false, ReportType.Selected);
break;
case $mdConstant.KEY_CODE.UP_ARROW:
if (ctrl.loading || hasSelection()) return;
event.stopPropagation();
event.preventDefault();
ctrl.index = ctrl.index < 0 ? ctrl.matches.length - 1 : Math.max(0, ctrl.index - 1);
ctrl.index = ctrl.index < 0 ? ctrl.matches.length - 1 : Math.max(0, ctrl.index - 1);
$mdUtil.nextTick(updateActiveOption);
updateScroll();
reportMessages(false, ReportType.Selected);
break;
case $mdConstant.KEY_CODE.TAB:
// If we hit tab, assume that we've left the list so it will close
Expand Down Expand Up @@ -892,7 +910,8 @@ function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $mdTheming,
*/
function clearSelectedItem () {
// Reset our variables
ctrl.index = 0;
ctrl.index = -1;
$mdUtil.nextTick(updateActiveOption);
ctrl.matches = [];
}

Expand Down Expand Up @@ -1542,9 +1561,9 @@ function MdAutocomplete ($$mdSvgRegistry) {
ng-mouseleave="$mdAutocompleteCtrl.listLeave()"\
ng-mouseup="$mdAutocompleteCtrl.mouseUp()"\
role="listbox">\
<li ' + getRepeatType(attr.mdMode) + ' ="item in $mdAutocompleteCtrl.matches"\
<li class="md-autocomplete-suggestion" ' + getRepeatType(attr.mdMode) + ' ="item in $mdAutocompleteCtrl.matches"\
ng-class="{ selected: $index === $mdAutocompleteCtrl.index }"\
ng-attr-id="{{$index === $mdAutocompleteCtrl.index ? \'selected_option\' : undefined}}"\
ng-attr-id="{{\'md-option-\' + $mdAutocompleteCtrl.id + \'-\' + $index}}"\
ng-click="$mdAutocompleteCtrl.select($index)"\
role="option"\
aria-setsize="{{$mdAutocompleteCtrl.matches.length}}"\
Expand Down Expand Up @@ -1621,10 +1640,10 @@ function MdAutocomplete ($$mdSvgRegistry) {
return '\
<md-input-container ng-if="floatingLabel">\
<label>{{floatingLabel}}</label>\
<input type="search"\
<input type="text"\
' + (tabindex != null ? 'tabindex="' + tabindex + '"' : '') + '\
id="{{ inputId || \'fl-input-\' + $mdAutocompleteCtrl.id }}"\
name="{{inputName}}"\
id="{{inputId || \'fl-input-\' + $mdAutocompleteCtrl.id}}"\
name="{{inputName || \'fl-input-\' + $mdAutocompleteCtrl.id }}"\
ng-class="::inputClass"\
autocomplete="off"\
ng-required="$mdAutocompleteCtrl.isRequired"\
Expand All @@ -1638,20 +1657,20 @@ function MdAutocomplete ($$mdSvgRegistry) {
ng-blur="$mdAutocompleteCtrl.blur($event)"\
ng-focus="$mdAutocompleteCtrl.focus($event)"\
aria-label="{{floatingLabel}}"\
aria-autocomplete="list"\
role="combobox"\
aria-haspopup="true"\
ng-attr-aria-autocomplete="{{$mdAutocompleteCtrl.isDisabled ? undefined : \'list\'}}"\
ng-attr-role="{{$mdAutocompleteCtrl.isDisabled ? undefined : \'combobox\'}}"\
aria-haspopup="{{!$mdAutocompleteCtrl.isDisabled}}"\
aria-expanded="{{!$mdAutocompleteCtrl.hidden}}"\
aria-owns="ul-{{$mdAutocompleteCtrl.id}}"\
ng-attr-aria-activedescendant="{{$mdAutocompleteCtrl.index >= 0 ? \'selected_option\' : undefined}}">\
ng-attr-aria-owns="{{$mdAutocompleteCtrl.hidden || $mdAutocompleteCtrl.isDisabled ? undefined : \'ul-\' + $mdAutocompleteCtrl.id}}"\
ng-attr-aria-activedescendant="{{!$mdAutocompleteCtrl.hidden && $mdAutocompleteCtrl.activeOption ? $mdAutocompleteCtrl.activeOption : undefined}}">\
<div md-autocomplete-parent-scope md-autocomplete-replace>' + leftover + '</div>\
</md-input-container>';
} else {
return '\
<input type="search"\
<input type="text"\
' + (tabindex != null ? 'tabindex="' + tabindex + '"' : '') + '\
id="{{ inputId || \'input-\' + $mdAutocompleteCtrl.id }}"\
name="{{inputName}}"\
id="{{inputId || \'input-\' + $mdAutocompleteCtrl.id}}"\
name="{{inputName || \'input-\' + $mdAutocompleteCtrl.id }}"\
ng-class="::inputClass"\
ng-if="!floatingLabel"\
autocomplete="off"\
Expand All @@ -1666,12 +1685,12 @@ function MdAutocomplete ($$mdSvgRegistry) {
ng-focus="$mdAutocompleteCtrl.focus($event)"\
placeholder="{{placeholder}}"\
aria-label="{{placeholder}}"\
aria-autocomplete="list"\
role="combobox"\
aria-haspopup="true"\
ng-attr-aria-autocomplete="{{$mdAutocompleteCtrl.isDisabled ? undefined : \'list\'}}"\
ng-attr-role="{{$mdAutocompleteCtrl.isDisabled ? undefined : \'combobox\'}}"\
aria-haspopup="{{!$mdAutocompleteCtrl.isDisabled}}"\
aria-expanded="{{!$mdAutocompleteCtrl.hidden}}"\
aria-owns="ul-{{$mdAutocompleteCtrl.id}}"\
ng-attr-aria-activedescendant="{{$mdAutocompleteCtrl.index >= 0 ? \'selected_option\' : undefined}}">';
ng-attr-aria-owns="{{$mdAutocompleteCtrl.hidden || $mdAutocompleteCtrl.isDisabled ? undefined : \'ul-\' + $mdAutocompleteCtrl.id}}"\
ng-attr-aria-activedescendant="{{!$mdAutocompleteCtrl.hidden && $mdAutocompleteCtrl.activeOption ? $mdAutocompleteCtrl.activeOption : undefined}}">';
}
}

Expand All @@ -1680,7 +1699,7 @@ function MdAutocomplete ($$mdSvgRegistry) {
'<button ' +
'type="button" ' +
'aria-label="Clear Input" ' +
'tabindex="-1" ' +
'tabindex="0" ' +
'ng-if="clearButton && $mdAutocompleteCtrl.scope.searchText" ' +
'ng-click="$mdAutocompleteCtrl.clear($event)">' +
'<md-icon md-svg-src="' + $$mdSvgRegistry.mdClose + '"></md-icon>' +
Expand Down
Loading

0 comments on commit 727b50d

Please sign in to comment.