@rubenpazch/identification-input 2.0.3 → 2.2.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.
package/dist/index.d.ts CHANGED
@@ -7,7 +7,19 @@ type IdentificationInputLabels = {
7
7
  selectDocumentType: string;
8
8
  documentTypeHint: string;
9
9
  identificationNumber: string;
10
+ /** Nombre, descripción y ayuda de cada tipo de documento. */
11
+ dni: string;
12
+ dniDescription: string;
13
+ dniHint: string;
14
+ ce: string;
15
+ ceDescription: string;
16
+ ceHint: string;
17
+ passport: string;
18
+ passportDescription: string;
19
+ passportHint: string;
10
20
  };
21
+ /** Textos en castellano (los del diccionario `es`). Con `UiLocaleProvider` cambian solos. */
22
+ declare const DEFAULT_IDENTIFICATION_LABELS: IdentificationInputLabels;
11
23
  interface IdentificationInputProps {
12
24
  documentType: PeruIdentificationType | null;
13
25
  onDocumentTypeChange: (type: PeruIdentificationType | null) => void;
@@ -17,9 +29,15 @@ interface IdentificationInputProps {
17
29
  identificationNumberError?: string;
18
30
  required?: boolean;
19
31
  disabled?: boolean;
20
- labels: IdentificationInputLabels;
32
+ /** Textos de la interfaz; por defecto en español. */
33
+ labels?: Partial<IdentificationInputLabels>;
34
+ /** Prefijo de los ids de ambos campos. */
35
+ id?: string;
36
+ /** `name` del campo de número (el tipo usa `${name}-tipo`). */
37
+ name?: string;
21
38
  className?: string;
22
39
  }
23
- declare const IdentificationInput: React.FC<IdentificationInputProps>;
40
+ /** El `ref` apunta al campo del número de documento. */
41
+ declare const IdentificationInput: React.ForwardRefExoticComponent<IdentificationInputProps & React.RefAttributes<HTMLInputElement>>;
24
42
 
25
- export { IdentificationInput as default };
43
+ export { DEFAULT_IDENTIFICATION_LABELS, IdentificationInput as default };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC"}