@aveonline/ui-react 1.14.7 → 1.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -79,7 +79,7 @@ export interface IField {
79
79
  /**
80
80
  * Types input custom
81
81
  */
82
- variant?: 'currency' | 'custom' | '';
82
+ variant?: 'currency' | 'custom' | '' | 'mask';
83
83
  /**
84
84
  * All props for custom input
85
85
  */
@@ -78,5 +78,31 @@ declare type IFieldCustom = {
78
78
  * Transform the raw value form the input before parsing
79
79
  */
80
80
  transformRawValue?: (rawValue: string) => string;
81
+ /**
82
+ * All props for custom with mask
83
+ */
84
+ mask?: IFieldCustomMask;
85
+ };
86
+ declare type IFieldCustomMask = {
87
+ charactersLength?: number;
88
+ /**
89
+ * Mask string. Format characters are:
90
+ * * `9`: `0-9`
91
+ * * `a`: `A-Z, a-z`
92
+ * * `\*`: `A-Z, a-z, 0-9`
93
+ *
94
+ * Any character can be escaped with backslash, which usually will appear as double backslash in JS strings.
95
+ * For example, German phone mask with unremoveable prefix +49 will look like `mask="+4\\9 99 999 99"` or `mask={"+4\\\\9 99 999 99"}`
96
+ */
97
+ mask?: string | RegExp;
98
+ /**
99
+ * Character to cover unfilled editable parts of mask. Default character is "_". If set to null, unfilled parts will be empty, like in ordinary input.
100
+ */
101
+ maskChar?: string | null | undefined;
102
+ maskPlaceholder?: string;
103
+ /**
104
+ * Show mask even in empty input without focus.
105
+ */
106
+ alwaysShowMask?: boolean | undefined;
81
107
  };
82
- export type { IFieldCustom };
108
+ export type { IFieldCustom, IFieldCustomMask };