Skip to content

Commit

Permalink
chore: revert deletion of TUI_PHONE_MASK
Browse files Browse the repository at this point in the history
  • Loading branch information
nsbarsukov committed Feb 5, 2024
1 parent daca59b commit 6c7219a
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions projects/kit/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export * from './date-mode-maskito-adapter';
export * from './date-time-separator';
export * from './group-class-names';
export * from './mask-after-code-regexp';
export * from './masks';
export * from './math';
export * from './max-day-range-length-mapper';
export * from './max-time-values';
Expand Down
27 changes: 27 additions & 0 deletions projects/kit/constants/masks.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import {MaskitoOptions} from '@maskito/core';
import {CHAR_HYPHEN, CHAR_PLUS} from '@taiga-ui/cdk';
import {TUI_DIGIT_REGEXP} from '@taiga-ui/core';

/**
* TODO: move to proprietary package in v4.0
*/
export const TUI_PHONE_MASK: MaskitoOptions = {
mask: [
CHAR_PLUS,
'7',
' ',
TUI_DIGIT_REGEXP,
TUI_DIGIT_REGEXP,
TUI_DIGIT_REGEXP,
' ',
TUI_DIGIT_REGEXP,
TUI_DIGIT_REGEXP,
TUI_DIGIT_REGEXP,
CHAR_HYPHEN,
TUI_DIGIT_REGEXP,
TUI_DIGIT_REGEXP,
CHAR_HYPHEN,
TUI_DIGIT_REGEXP,
TUI_DIGIT_REGEXP,
],
};

0 comments on commit 6c7219a

Please sign in to comment.