@scbt-ecom/ui 0.110.1 → 0.111.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.
Files changed (21) hide show
  1. package/dist/lib/shared/types/nonNullable.js +2 -0
  2. package/dist/lib/shared/types/nonNullable.js.map +1 -0
  3. package/dist/lib/shared/ui/formElements/uncontrolled/maskInput/MaskInput.js +1 -1
  4. package/dist/lib/shared/ui/formElements/uncontrolled/maskInput/MaskInput.js.map +1 -1
  5. package/dist/lib/shared/ui/formElements/uncontrolled/maskInput/model/constants.js +2 -0
  6. package/dist/lib/shared/ui/formElements/uncontrolled/maskInput/model/constants.js.map +1 -0
  7. package/dist/lib/shared/ui/formElements/uncontrolled/maskInput/model/index.js +2 -0
  8. package/dist/lib/shared/ui/formElements/uncontrolled/maskInput/model/index.js.map +1 -0
  9. package/dist/lib/shared/ui/formElements/uncontrolled/maskInput/model/types.js +2 -0
  10. package/dist/lib/shared/ui/formElements/uncontrolled/maskInput/model/types.js.map +1 -0
  11. package/dist/lib/widgets/model/helpers.js +2 -2
  12. package/dist/lib/widgets/model/helpers.js.map +1 -1
  13. package/dist/stats.html +1 -1
  14. package/dist/types/lib/shared/types/index.d.ts +1 -0
  15. package/dist/types/lib/shared/types/nonNullable.d.ts +1 -0
  16. package/dist/types/lib/shared/ui/formElements/uncontrolled/index.d.ts +1 -1
  17. package/dist/types/lib/shared/ui/formElements/uncontrolled/maskInput/MaskInput.d.ts +5 -3
  18. package/dist/types/lib/shared/ui/formElements/uncontrolled/maskInput/model/constants.d.ts +4 -0
  19. package/dist/types/lib/shared/ui/formElements/uncontrolled/maskInput/model/index.d.ts +3 -0
  20. package/dist/types/lib/shared/ui/formElements/uncontrolled/maskInput/model/types.d.ts +2 -0
  21. package/package.json +1 -1
@@ -1,3 +1,4 @@
1
1
  export type * from './deepPartial';
2
2
  export type * from './keysOf';
3
3
  export type * from './dicriminatedUnion';
4
+ export type * from './nonNullable';
@@ -0,0 +1 @@
1
+ export type NonNullable<T> = T extends null ? never : T;
@@ -50,7 +50,7 @@ export declare const Uncontrolled: {
50
50
  onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
51
51
  };
52
52
  } & {
53
- mask: "datetime" | "email" | "numeric" | "currency" | "decimal" | "integer" | "percentage" | "url" | "ip" | "mac" | "ssn" | "brl-currency" | "cpf" | "cnpj" | (string & {}) | (string[] & {}) | null;
53
+ mask: import('../../../types').NonNullable<import('./maskInput/model').Mask>;
54
54
  externalMaskDefinitions?: Record<string, import('./maskInput/MaskInput').Definition>;
55
55
  } & import('react').RefAttributes<HTMLInputElement>>;
56
56
  CheckboxBase: import('react').ForwardRefExoticComponent<import('@radix-ui/react-checkbox').CheckboxProps & {
@@ -1,4 +1,6 @@
1
1
  import { InputBaseProps } from '../input';
2
+ import { Mask } from './model';
3
+ import { NonNullable } from '../../../../../../shared/types';
2
4
  type Validator = (char: string) => boolean;
3
5
  type Casing = 'upper' | 'lower' | 'title';
4
6
  export type Definition = {
@@ -12,7 +14,7 @@ export type MaskInputProps = InputBaseProps & {
12
14
  /**
13
15
  * маска, по которой будет определяться валидация символов
14
16
  */
15
- mask: 'datetime' | 'email' | 'numeric' | 'currency' | 'decimal' | 'integer' | 'percentage' | 'url' | 'ip' | 'mac' | 'ssn' | 'brl-currency' | 'cpf' | 'cnpj' | (string & {}) | (string[] & {}) | null;
17
+ mask: NonNullable<Mask>;
16
18
  /**
17
19
  * дополнительные валидаторы спец символов в маске
18
20
  */
@@ -29,7 +31,7 @@ export declare const MaskInput: import('react').ForwardRefExoticComponent<Omit<i
29
31
  classes?: import('../input/Input').InputBaseClasses;
30
32
  label: string;
31
33
  invalid?: boolean;
32
- attachmentProps?: import('../../../../types').DeepPartial<import('../../ui').IFieldAttachmentProps>;
34
+ attachmentProps?: import('../../../../../../shared/types').DeepPartial<import('../../ui').IFieldAttachmentProps>;
33
35
  renderValues?: () => React.JSX.Element | null;
34
36
  externalHandlers?: {
35
37
  onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
@@ -41,7 +43,7 @@ export declare const MaskInput: import('react').ForwardRefExoticComponent<Omit<i
41
43
  /**
42
44
  * маска, по которой будет определяться валидация символов
43
45
  */
44
- mask: "datetime" | "email" | "numeric" | "currency" | "decimal" | "integer" | "percentage" | "url" | "ip" | "mac" | "ssn" | "brl-currency" | "cpf" | "cnpj" | (string & {}) | (string[] & {}) | null;
46
+ mask: NonNullable<Mask>;
45
47
  /**
46
48
  * дополнительные валидаторы спец символов в маске
47
49
  */
@@ -0,0 +1,4 @@
1
+ import { Mask } from './types';
2
+ export declare const DEFAULT_PHONE: string[];
3
+ export declare const DEFAULT_CAR: string[];
4
+ export declare const defaultMask: Map<Mask, Mask>;
@@ -0,0 +1,3 @@
1
+ export * from './constants';
2
+ export type * from './types';
3
+ export { defaultDefinitions } from './mask';
@@ -0,0 +1,2 @@
1
+ import { Mask as DefaultMask } from 'use-mask-input';
2
+ export type Mask = DefaultMask | 'phone' | 'car';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scbt-ecom/ui",
3
- "version": "0.110.1",
3
+ "version": "0.111.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {