-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(input): add input highlight for ios, fix the highlight size
The input highlight can now be enabled for ios. Fixed wp’s valid/invalid highlighting. The highlight bar now goes on top of the item-inner border so it will resize if there is an icon to the left. BREAKING CHANGES: Fixed typos in the input highlight variables: - `$text-input-md-hightlight-color-valid` -> `$text-input-md-highlight-color-valid` - `$text-input-wp-hightlight-color-valid` -> `$text-input-wp-highlight-color-valid` Modified variables to turn on/off the highlight: ios (defaults to false for all): ``` $text-input-ios-show-focus-highlight: false !default; $text-input-ios-show-valid-highlight: $text-input-ios-show-focus-highlight !default; $text-input-ios-show-invalid-highlight: $text-input-ios-show-focus-highlight !default; ``` md (defaults to true for all): ``` $text-input-md-show-focus-highlight: true !default; $text-input-md-show-valid-highlight: $text-input-md-show-focus-highlight !default; $text-input-md-show-invalid-highlight: $text-input-md-show-focus-highlight !default; ``` wp (defaults to true for all): ``` $text-input-wp-show-focus-highlight: true !default; $text-input-wp-show-valid-highlight: $text-input-wp-show-focus-highlight !default; $text-input-wp-show-invalid-highlight: $text-input-wp-show-focus-highlight !default; ``` fixes #6449 references #5052
- Loading branch information
1 parent
86fd8a4
commit 11a24b9
Showing
6 changed files
with
295 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import { Component } from '@angular/core'; | ||
import { FormBuilder, Validators } from '@angular/common'; | ||
import { ionicBootstrap } from '../../../../../src'; | ||
|
||
|
||
@Component({ | ||
templateUrl: 'main.html' | ||
}) | ||
class E2EPage { | ||
loginForm: any; | ||
|
||
login = { | ||
email: 'help@ionic.io', | ||
username: 'admin', | ||
}; | ||
|
||
submitted: boolean = false; | ||
|
||
constructor(fb: FormBuilder) { | ||
this.loginForm = fb.group({ | ||
email: ["", Validators.compose([ | ||
Validators.required, | ||
this.emailValidator | ||
])], | ||
username: [""], | ||
password: ["", Validators.required], | ||
comments: ["", Validators.required], | ||
inset: ["", Validators.required] | ||
}); | ||
} | ||
|
||
emailValidator(control: any) { | ||
var EMAIL_REGEXP = /^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i; | ||
|
||
if (!EMAIL_REGEXP.test(control.value)) { | ||
return {invalidEmail: true}; | ||
} | ||
} | ||
|
||
submit(ev: UIEvent, value: any) { | ||
console.log("Submitted", value); | ||
this.submitted = true; | ||
} | ||
|
||
} | ||
|
||
@Component({ | ||
template: '<ion-nav [root]="root"></ion-nav>' | ||
}) | ||
class E2EApp { | ||
root = E2EPage; | ||
} | ||
|
||
ionicBootstrap(E2EApp); |
Oops, something went wrong.