@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/README.md +22 -12
- package/dist/IdentificationInput.d.ts +20 -2
- package/dist/IdentificationInput.d.ts.map +1 -1
- package/dist/index.cjs.js +129 -46
- package/dist/index.d.ts +21 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +128 -48
- package/dist/peruvianIdentification.d.ts.map +1 -1
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -17,17 +17,27 @@ npm install @rubenpazch/identification-input
|
|
|
17
17
|
|
|
18
18
|
## IdentificationInput
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
|
23
|
-
|
|
|
24
|
-
| `
|
|
25
|
-
| `
|
|
26
|
-
| `
|
|
27
|
-
| `
|
|
28
|
-
| `
|
|
29
|
-
| `
|
|
30
|
-
| `
|
|
31
|
-
| `
|
|
20
|
+
El `ref` apunta al campo del número de documento.
|
|
21
|
+
|
|
22
|
+
| Prop | Tipo | Req. | Por defecto | Descripción |
|
|
23
|
+
| ------------------------------ | ------------------------------------------------ | ---- | ----------- | -------------------------------------------------------- |
|
|
24
|
+
| `documentType` | `null \| "dni" \| "ce" \| "passport"` | sí | | |
|
|
25
|
+
| `identificationNumber` | `string` | sí | | |
|
|
26
|
+
| `onDocumentTypeChange` | `(type: PeruIdentificationType \| null) => void` | sí | | |
|
|
27
|
+
| `onIdentificationNumberChange` | `(value: string) => void` | sí | | |
|
|
28
|
+
| `className` | `string` | | `` | |
|
|
29
|
+
| `disabled` | `boolean` | | `false` | |
|
|
30
|
+
| `documentTypeError` | `string` | | | |
|
|
31
|
+
| `id` | `string` | | | Prefijo de los ids de ambos campos. |
|
|
32
|
+
| `identificationNumberError` | `string` | | | |
|
|
33
|
+
| `labels` | `Partial<IdentificationInputLabels>` | | | Textos de la interfaz; por defecto en español. |
|
|
34
|
+
| `name` | `string` | | | `name` del campo de número (el tipo usa `${name}-tipo`). |
|
|
35
|
+
| `required` | `boolean` | | `false` | |
|
|
36
|
+
|
|
37
|
+
## DEFAULT_IDENTIFICATION_LABELS
|
|
38
|
+
|
|
39
|
+
Textos en castellano (los del diccionario `es`). Con `UiLocaleProvider` cambian solos.
|
|
40
|
+
|
|
41
|
+
_Sin props documentadas._
|
|
32
42
|
|
|
33
43
|
<!-- catalogo:fin -->
|
|
@@ -5,7 +5,19 @@ export type IdentificationInputLabels = {
|
|
|
5
5
|
selectDocumentType: string;
|
|
6
6
|
documentTypeHint: string;
|
|
7
7
|
identificationNumber: string;
|
|
8
|
+
/** Nombre, descripción y ayuda de cada tipo de documento. */
|
|
9
|
+
dni: string;
|
|
10
|
+
dniDescription: string;
|
|
11
|
+
dniHint: string;
|
|
12
|
+
ce: string;
|
|
13
|
+
ceDescription: string;
|
|
14
|
+
ceHint: string;
|
|
15
|
+
passport: string;
|
|
16
|
+
passportDescription: string;
|
|
17
|
+
passportHint: string;
|
|
8
18
|
};
|
|
19
|
+
/** Textos en castellano (los del diccionario `es`). Con `UiLocaleProvider` cambian solos. */
|
|
20
|
+
export declare const DEFAULT_IDENTIFICATION_LABELS: IdentificationInputLabels;
|
|
9
21
|
export interface IdentificationInputProps {
|
|
10
22
|
documentType: PeruIdentificationType | null;
|
|
11
23
|
onDocumentTypeChange: (type: PeruIdentificationType | null) => void;
|
|
@@ -15,9 +27,15 @@ export interface IdentificationInputProps {
|
|
|
15
27
|
identificationNumberError?: string;
|
|
16
28
|
required?: boolean;
|
|
17
29
|
disabled?: boolean;
|
|
18
|
-
|
|
30
|
+
/** Textos de la interfaz; por defecto en español. */
|
|
31
|
+
labels?: Partial<IdentificationInputLabels>;
|
|
32
|
+
/** Prefijo de los ids de ambos campos. */
|
|
33
|
+
id?: string;
|
|
34
|
+
/** `name` del campo de número (el tipo usa `${name}-tipo`). */
|
|
35
|
+
name?: string;
|
|
19
36
|
className?: string;
|
|
20
37
|
}
|
|
21
|
-
|
|
38
|
+
/** El `ref` apunta al campo del número de documento. */
|
|
39
|
+
declare const IdentificationInput: React.ForwardRefExoticComponent<IdentificationInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
22
40
|
export default IdentificationInput;
|
|
23
41
|
//# sourceMappingURL=IdentificationInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdentificationInput.d.ts","sourceRoot":"","sources":["../src/IdentificationInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"IdentificationInput.d.ts","sourceRoot":"","sources":["../src/IdentificationInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EACL,sBAAsB,EAIvB,MAAM,0BAA0B,CAAC;AAElC,MAAM,MAAM,yBAAyB,GAAG;IACtC,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,6DAA6D;IAC7D,GAAG,EAAE,MAAM,CAAC;IACZ,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,6FAA6F;AAC7F,eAAO,MAAM,6BAA6B,EAAE,yBACV,CAAC;AAEnC,MAAM,WAAW,wBAAwB;IACvC,YAAY,EAAE,sBAAsB,GAAG,IAAI,CAAC;IAC5C,oBAAoB,EAAE,CAAC,IAAI,EAAE,sBAAsB,GAAG,IAAI,KAAK,IAAI,CAAC;IACpE,oBAAoB,EAAE,MAAM,CAAC;IAC7B,4B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