Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release #7

Merged
merged 6 commits into from
Jun 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10,786 changes: 10,786 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

74 changes: 37 additions & 37 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "ng-material-angular-select",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
Expand All @@ -13,45 +14,44 @@
"package": "npm run build-select && npm run npm-pack",
"gh-pages": "ng build --prod ng-material-angular-select && npx angular-cli-ghpages --dir=dist/ng-material-angular-select"
},
"private": true,
"dependencies": {
"@angular/animations": "~7.2.0",
"@angular/common": "~7.2.0",
"@angular/compiler": "~7.2.0",
"@angular/core": "~7.2.0",
"@angular/forms": "~7.2.0",
"@angular/platform-browser": "~7.2.0",
"@angular/platform-browser-dynamic": "~7.2.0",
"@angular/router": "~7.2.0",
"core-js": "^2.5.4",
"material-design-lite": "^1.3.0",
"rxjs": "~6.3.3",
"tslib": "^1.9.0",
"zone.js": "~0.8.26"
"@angular/animations": "8.0.0",
"@angular/common": "8.0.0",
"@angular/compiler": "8.0.0",
"@angular/core": "8.0.0",
"@angular/forms": "8.0.0",
"@angular/platform-browser": "8.0.0",
"@angular/platform-browser-dynamic": "8.0.0",
"@angular/router": "8.0.0",
"core-js": "2.6.9",
"material-design-lite": "1.3.0",
"rxjs": "6.5.2",
"zone.js": "0.9.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.13.0",
"@angular-devkit/build-ng-packagr": "~0.13.0",
"@angular/cli": "~7.3.8",
"@angular/compiler-cli": "~7.2.0",
"@angular/language-service": "~7.2.0",
"@types/jasmine": "~2.8.8",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",
"codelyzer": "~4.5.0",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.0.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~1.1.2",
"karma-jasmine-html-reporter": "^0.2.2",
"ng-packagr": "^4.2.0",
"protractor": "~5.4.0",
"ts-node": "~7.0.0",
"tsickle": ">=0.34.0",
"tslib": "^1.9.0",
"tslint": "~5.11.0",
"typescript": "~3.2.2"
"@angular-devkit/build-angular": "0.800.1",
"@angular-devkit/build-ng-packagr": "0.800.1",
"@angular/cli": "8.0.1",
"@angular/compiler-cli": "8.0.0",
"@angular/language-service": "8.0.0",
"@types/jasmine": "3.3.13",
"@types/jasminewd2": "2.0.6",
"@types/material-design-lite": "1.1.15",
"@types/node": "12.0.4",
"codelyzer": "5.1.0",
"jasmine-core": "3.4.0",
"jasmine-spec-reporter": "4.2.1",
"karma": "4.1.0",
"karma-chrome-launcher": "2.2.0",
"karma-coverage-istanbul-reporter": "2.0.5",
"karma-jasmine": "2.0.1",
"karma-jasmine-html-reporter": "1.4.2",
"ng-packagr": "5.2.0",
"protractor": "5.4.2",
"ts-node": "8.2.0",
"tsickle": "0.35.0",
"tslib": "1.9.3",
"tslint": "5.17.0",
"typescript": "3.4.5"
}
}
3 changes: 0 additions & 3 deletions projects/material-angular-select/ng-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,4 @@
"lib": {
"entryFile": "src/public_api.ts"
},
"whitelistedNonPeerDependencies": [
"material-design-lite"
]
}
14 changes: 3 additions & 11 deletions projects/material-angular-select/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
{
"name": "material-angular-select",
"version": "1.0.0",
"version": "1.1.0",
"description": "Angular select for material-design-lite",
"keywords": [
"material",
"mdl",
"getmdl",
"select",
"getmdl-select",
"dropdown",
"getmdl-dropdown",
"angular",
"ng",
"material-angular-select"
Expand All @@ -25,11 +21,7 @@
},
"homepage": "https://github.com/CreativeIT/material-angular-select",
"peerDependencies": {
"@angular/common": "^7.2.0",
"@angular/core": "^7.2.0",
"material-design-lite": "1.3.0"
},
"dependencies": {
"material-design-lite": "1.3.0"
"@angular/common": "8.0.0",
"@angular/core": "8.0.0"
}
}
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
<div #dropdown class="mdl-textfield mdl-js-textfield material-angular-select"
<div #dropdown class="mas-textfield mas-js-textfield material-angular-select"
[class.is-focused]="isFocused"
[class.mdl-textfield--floating-label]="isFloatingLabel"
[class.material-angular-select__fix-height]="fixHeight">
[class.mas-textfield--floating-label]="isFloatingLabel"
[class.material-angular-select__fix-height]="fixHeight"
(blur)="onTouched()">
<input #input
(click)="onInputClick($event)"
(keyup)="menuKeyDown($event)"
(keydown)="keyDownTab($event)"
(mouseenter)="isKeyNavigation = false;"
class="mdl-textfield__input" type="text"
[id]="id" tabindex="0" readonly
class="mas-textfield__input" type="text"
[id]="inputId" tabindex="0" [readOnly]="!typeahead"
[value]="(disabled)? '' : currentValue[keys.title]"
[disabled]="disabled"/>
<input #hiddenInput tabindex="-1" type="hidden" [name]="name" [value]="(disabled) ? '': currentValue[keys.value]"/>
<label class="mdl-textfield__label" [for]="id">{{ label }}</label>
<ul #menu class="mdl-menu mdl-menu--bottom-left mdl-js-menu">
<li #li *ngFor="let item of dataArray; index as i;" [attr.data-val]="item[keys.value]" class="mdl-menu__item"
<label class="mas-textfield__label" [for]="inputId">{{ label }}</label>
<ul #menu class="mas-menu mas-menu--bottom-left mas-js-menu">
<li #li *ngFor="let item of selectedDataArray; index as i;" [attr.data-val]="item[keys.value]" class="mas-menu__item"
(click)="setSelectedItem(item)"
[ngClass]="{'is-item-hover': i === arrowkeyLocation && isKeyNavigation }"
tabindex="-1">
{{ item[keys.title] }}
</li>
</ul>
<label [for]="id" (click)="onInputClick($event)" *ngIf="arrow">
<i #arrow class="mdl-icon-toggle__label material-icons">arrow_drop_down</i>
<label [for]="inputId" (click)="onInputClick($event)" *ngIf="arrow">
<div #arrow class="mas-icon-toggle__label arrow-drop-down"></div>
</label>
</div>
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
@import '~material-design-lite/src/variables';
@import 'mdl/typography';

@import 'mdl/menu';
@import 'mdl/textfield';

$getmdl-select-bg-color: $default-item-hover-bg-color !default;
$getmdl-select-text-color: $text-color-primary !default;
Expand All @@ -9,20 +12,20 @@ $getmdl-select-height: 288px !default;
$getmdl-select-scrollbar-thumb: #666 !default;
$getmdl-select-scrollbar-track: #999 !default;

material-angular-select {
material-angular-select, material-angular-select-typeahead {
display: block;
outline: none;
width: 100%;

.mdl-textfield__input {
.mas-textfield__input {
cursor: pointer;

&:focus {
outline: none;
}
}

.mdl-textfield__label::after {
.mas-textfield__label::after {
bottom: 22px;
}

Expand All @@ -31,17 +34,26 @@ material-angular-select {
margin-bottom: 0;
}

.mdl-icon-toggle__label {
.mas-icon-toggle__label {
float: right;
margin-top: -30px;
color: $getmdl-select-text-color;
margin-top: -20px;
transform: rotate(0);
transition: transform 0.3s;

&.arrow-drop-down {
width: 0;
height: 0;
box-sizing: content-box;
transform-origin: 50% 25%;
border: .3em solid transparent;
border-top-color: $getmdl-select-text-color;
cursor: pointer;
}
}

&.is-focused {
.mdl-icon-toggle__label {
color: $getmdl-select-label-color;
.mas-textfield.is-focused {
.mas-icon-toggle__label {
border-top-color: $getmdl-select-label-color;
transform: rotate(180deg);
}
}
Expand All @@ -50,23 +62,23 @@ material-angular-select {
background-color: $getmdl-select-bg-color;
}

.mdl-menu__container {
.mas-menu__container {
width: 100% !important;
margin-top: 2px;

.mdl-menu {
.mas-menu {
width: 100%;

.mdl-menu__item {
.mas-menu__item {
font-size: 16px;
}
}
}

&.is-focused,
&.is-dirty,
&.has-placeholder {
.mdl-textfield__label {
.mas-textfield.is-focused,
.mas-textfield.is-dirty,
.mas-textfield.has-placeholder {
.mas-textfield__label {
color: $getmdl-select-label-color;
}
}
Expand All @@ -88,12 +100,12 @@ material-angular-select {
}

.material-angular-select__fix-height {
.mdl-menu__container .mdl-menu {
.mas-menu__container .mas-menu {
overflow-y: auto;
max-height: $getmdl-select-height !important;
}

.mdl-menu.mdl-menu--top-left {
.mas-menu.mas-menu--top-left {
bottom: auto;
top: 0;
}
Expand Down
Loading