-
Notifications
You must be signed in to change notification settings - Fork 463
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(kit):
TuiInputPhoneInternational
has separator customization (#…
- Loading branch information
1 parent
4385076
commit 7939bc5
Showing
6 changed files
with
89 additions
and
8 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
projects/demo/src/modules/components/input-phone-international/examples/5/index.html
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,7 @@ | ||
<tui-input-phone-international | ||
[countries]="countries" | ||
[(countryIsoCode)]="countryIsoCode" | ||
[(ngModel)]="value" | ||
> | ||
Type your number | ||
</tui-input-phone-international> |
32 changes: 32 additions & 0 deletions
32
projects/demo/src/modules/components/input-phone-international/examples/5/index.ts
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,32 @@ | ||
import {Component} from '@angular/core'; | ||
import {FormsModule} from '@angular/forms'; | ||
import {changeDetection} from '@demo/emulate/change-detection'; | ||
import {encapsulation} from '@demo/emulate/encapsulation'; | ||
import type {TuiCountryIsoCode} from '@taiga-ui/i18n'; | ||
import { | ||
TuiInputPhoneInternational, | ||
tuiInputPhoneInternationalOptionsProvider, | ||
} from '@taiga-ui/kit'; | ||
import {getCountries} from 'libphonenumber-js'; | ||
import {defer} from 'rxjs'; | ||
|
||
@Component({ | ||
standalone: true, | ||
imports: [FormsModule, TuiInputPhoneInternational], | ||
templateUrl: './index.html', | ||
encapsulation, | ||
changeDetection, | ||
providers: [ | ||
tuiInputPhoneInternationalOptionsProvider({ | ||
metadata: defer(async () => | ||
import('libphonenumber-js/max/metadata').then((m) => m.default), | ||
), | ||
separator: ' ', | ||
}), | ||
], | ||
}) | ||
export default class Example { | ||
protected readonly countries = getCountries(); | ||
protected countryIsoCode: TuiCountryIsoCode = 'FR'; | ||
protected value = ''; | ||
} |
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
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