Skip to content

Commit

Permalink
chore: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
waterplea committed Dec 13, 2024
1 parent a436137 commit f6318bd
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
9 changes: 5 additions & 4 deletions projects/core/styles/theme/appearance/textfield.less
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
outline-offset: -1px;
border: none;

&::before,
&::after {
// TODO: Remove tuiWrapper hack in v5
&:not([tuiWrapper])::before,
&:not([tuiWrapper])::after {
.transition(color);

color: var(--tui-text-tertiary);
Expand All @@ -22,8 +23,8 @@
.appearance-hover({
--t-shadow: 0 0.125rem 0.3125rem rgba(0, 0, 0, 0.16);

&:before,
&:after {
&:not([tuiWrapper]):before,
&:not([tuiWrapper]):after {
color: var(--tui-text-secondary);
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
import {takeUntilDestroyed, toObservable, toSignal} from '@angular/core/rxjs-interop';
import {FormsModule} from '@angular/forms';
import {MaskitoDirective} from '@maskito/angular';
import type {MaskitoOptions} from '@maskito/core';
import {type MaskitoOptions, maskitoTransform} from '@maskito/core';
import {maskitoInitialCalibrationPlugin} from '@maskito/core';
import {maskitoGetCountryFromNumber, maskitoPhoneOptionsGenerator} from '@maskito/phone';
import {tuiAsControl, TuiControl} from '@taiga-ui/cdk/classes';
Expand Down Expand Up @@ -92,7 +92,7 @@ const NOT_FORM_CONTROL_SYMBOLS = /[^+\d]/g;
'[attr.inputmode]': 'open() ? "none" : "numeric"',
'[attr.readonly]': 'readOnly() || null',
'[disabled]': 'disabled()',
'[value]': 'value() || el.value',
'[value]': 'masked()',
'(blur)': 'onTouched()',
'(input)': 'onInput()',
'(click)': 'open.set(false)',
Expand Down Expand Up @@ -120,6 +120,11 @@ export class TuiInputPhoneInternational extends TuiControl<string> {
computed(() => this.computeMask(this.code(), this.metadata())),
);

protected readonly masked = computed(
() =>
maskitoTransform(this.value(), this.mask() || {mask: /.*/}) || this.el.value,
);

protected readonly filtered = computed(() =>
this.countries()
.map((iso) => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ tui-textfield[data-size='l'] {
z-index: 1;
background: var(--tui-background-elevation-3);
padding: 0.375rem 0.375rem 0;

input {
.tui-prevent-ios-scroll();
}
}

tui-dropdown-mobile {
Expand Down

0 comments on commit f6318bd

Please sign in to comment.