@vtex/country-forms 1.0.1 → 1.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.
Files changed (117) hide show
  1. package/CHANGELOG.md +45 -1
  2. package/README.md +2 -1
  3. package/dist/{BRA-PMVV6KOM.js → BRA-CWGYPPBD.js} +43 -27
  4. package/dist/BRA-CWGYPPBD.js.map +1 -0
  5. package/dist/{BRA-PCJDRSEF.mjs → BRA-JUHEOV7J.mjs} +3 -3
  6. package/dist/{BRA-PCJDRSEF.mjs.map → BRA-JUHEOV7J.mjs.map} +1 -1
  7. package/dist/{BRA-ZBZXE5II.mjs → BRA-R2DBJTZ2.mjs} +43 -27
  8. package/dist/BRA-R2DBJTZ2.mjs.map +1 -0
  9. package/dist/{BRA-WGCSNRCO.js → BRA-VIVRV7X7.js} +3 -3
  10. package/dist/{BRA-WGCSNRCO.js.map → BRA-VIVRV7X7.js.map} +1 -1
  11. package/dist/CAN-RDQPFPZU.mjs +127 -0
  12. package/dist/CAN-RDQPFPZU.mjs.map +1 -0
  13. package/dist/CAN-ZJQJFUW4.js +129 -0
  14. package/dist/CAN-ZJQJFUW4.js.map +1 -0
  15. package/dist/MEX-6CJCALY3.js +125 -0
  16. package/dist/MEX-6CJCALY3.js.map +1 -0
  17. package/dist/MEX-ZQL7ZS3G.mjs +123 -0
  18. package/dist/MEX-ZQL7ZS3G.mjs.map +1 -0
  19. package/dist/USA-2QW25XAI.mjs +128 -0
  20. package/dist/USA-2QW25XAI.mjs.map +1 -0
  21. package/dist/USA-MWP4SDGW.js +130 -0
  22. package/dist/USA-MWP4SDGW.js.map +1 -0
  23. package/dist/{bra-PZBWBUGB.js → bra-DQO5W7HB.js} +23 -31
  24. package/dist/bra-DQO5W7HB.js.map +1 -0
  25. package/dist/{bra-ZDFUVAXT.mjs → bra-MJUXI46I.mjs} +16 -27
  26. package/dist/bra-MJUXI46I.mjs.map +1 -0
  27. package/dist/can-3MOZIOGB.js +65 -0
  28. package/dist/can-3MOZIOGB.js.map +1 -0
  29. package/dist/can-DKTB2M6I.mjs +41 -0
  30. package/dist/can-DKTB2M6I.mjs.map +1 -0
  31. package/dist/can-LLWX4LC2.js +48 -0
  32. package/dist/can-LLWX4LC2.js.map +1 -0
  33. package/dist/can-OONXPDKH.mjs +59 -0
  34. package/dist/can-OONXPDKH.mjs.map +1 -0
  35. package/dist/chunk-B2XPLIJU.mjs +19 -0
  36. package/dist/chunk-B2XPLIJU.mjs.map +1 -0
  37. package/dist/{chunk-HKDTDE53.js → chunk-CFX5EF4R.js} +2 -2
  38. package/dist/{chunk-HKDTDE53.js.map → chunk-CFX5EF4R.js.map} +1 -1
  39. package/dist/{chunk-IVJED4TG.mjs → chunk-KWESVZKV.mjs} +2 -2
  40. package/dist/{chunk-IVJED4TG.mjs.map → chunk-KWESVZKV.mjs.map} +1 -1
  41. package/dist/chunk-ZQQPNXLP.js +21 -0
  42. package/dist/chunk-ZQQPNXLP.js.map +1 -0
  43. package/dist/common-E4IN3G46.mjs +4 -0
  44. package/dist/common-E4IN3G46.mjs.map +1 -0
  45. package/dist/common-LFDTUEMM.js +13 -0
  46. package/dist/common-LFDTUEMM.js.map +1 -0
  47. package/dist/{en-US-67K5REMQ.mjs → en-US-KHII5INO.mjs} +29 -14
  48. package/dist/en-US-KHII5INO.mjs.map +1 -0
  49. package/dist/{en-US-DXYSM6Q2.js → en-US-RCNO3BZC.js} +29 -14
  50. package/dist/en-US-RCNO3BZC.js.map +1 -0
  51. package/dist/{es-MX-UL5OL7HT.js → es-MX-IGOEW2P4.js} +28 -13
  52. package/dist/es-MX-IGOEW2P4.js.map +1 -0
  53. package/dist/{es-MX-2R6G2ZLS.mjs → es-MX-R24GRBU5.mjs} +28 -13
  54. package/dist/es-MX-R24GRBU5.mjs.map +1 -0
  55. package/dist/{fr-FR-GGR2M6TJ.mjs → fr-FR-N4WJAN23.mjs} +29 -14
  56. package/dist/fr-FR-N4WJAN23.mjs.map +1 -0
  57. package/dist/{fr-FR-LWA6B3MW.js → fr-FR-WZBI6O4O.js} +29 -14
  58. package/dist/fr-FR-WZBI6O4O.js.map +1 -0
  59. package/dist/index.d.mts +227 -11
  60. package/dist/index.d.ts +227 -11
  61. package/dist/index.js +127 -43
  62. package/dist/index.js.map +1 -1
  63. package/dist/index.mjs +122 -44
  64. package/dist/index.mjs.map +1 -1
  65. package/dist/mex-AMEX6IHY.mjs +108 -0
  66. package/dist/mex-AMEX6IHY.mjs.map +1 -0
  67. package/dist/mex-DYWVMWB6.js +38 -0
  68. package/dist/mex-DYWVMWB6.js.map +1 -0
  69. package/dist/mex-VX3Y5I6I.mjs +33 -0
  70. package/dist/mex-VX3Y5I6I.mjs.map +1 -0
  71. package/dist/mex-Y56WV2L7.js +114 -0
  72. package/dist/mex-Y56WV2L7.js.map +1 -0
  73. package/dist/{pt-BR-KH6RW3HM.mjs → pt-BR-PIBP3JHL.mjs} +31 -13
  74. package/dist/pt-BR-PIBP3JHL.mjs.map +1 -0
  75. package/dist/{pt-BR-WVTTIEAH.js → pt-BR-ZDM55ITO.js} +31 -13
  76. package/dist/pt-BR-ZDM55ITO.js.map +1 -0
  77. package/dist/usa-AC7YPVS3.mjs +52 -0
  78. package/dist/usa-AC7YPVS3.mjs.map +1 -0
  79. package/dist/usa-B6NCCTF6.js +61 -0
  80. package/dist/usa-B6NCCTF6.js.map +1 -0
  81. package/dist/usa-LOOP7MRM.mjs +55 -0
  82. package/dist/usa-LOOP7MRM.mjs.map +1 -0
  83. package/dist/usa-OQ44AFEI.js +61 -0
  84. package/dist/usa-OQ44AFEI.js.map +1 -0
  85. package/package.json +1 -1
  86. package/dist/BRA-PMVV6KOM.js.map +0 -1
  87. package/dist/BRA-ZBZXE5II.mjs.map +0 -1
  88. package/dist/bra-PZBWBUGB.js.map +0 -1
  89. package/dist/bra-ZDFUVAXT.mjs.map +0 -1
  90. package/dist/can-7TMYDEJF.mjs +0 -17
  91. package/dist/can-7TMYDEJF.mjs.map +0 -1
  92. package/dist/can-B5ME2ZFN.js +0 -20
  93. package/dist/can-B5ME2ZFN.js.map +0 -1
  94. package/dist/can-BUKTOPLB.js +0 -21
  95. package/dist/can-BUKTOPLB.js.map +0 -1
  96. package/dist/can-SHRLPUU5.mjs +0 -19
  97. package/dist/can-SHRLPUU5.mjs.map +0 -1
  98. package/dist/en-US-67K5REMQ.mjs.map +0 -1
  99. package/dist/en-US-DXYSM6Q2.js.map +0 -1
  100. package/dist/es-MX-2R6G2ZLS.mjs.map +0 -1
  101. package/dist/es-MX-UL5OL7HT.js.map +0 -1
  102. package/dist/fr-FR-GGR2M6TJ.mjs.map +0 -1
  103. package/dist/fr-FR-LWA6B3MW.js.map +0 -1
  104. package/dist/mex-I3LUVYVC.mjs +0 -19
  105. package/dist/mex-I3LUVYVC.mjs.map +0 -1
  106. package/dist/mex-QT4CJZDD.js +0 -21
  107. package/dist/mex-QT4CJZDD.js.map +0 -1
  108. package/dist/pt-BR-KH6RW3HM.mjs.map +0 -1
  109. package/dist/pt-BR-WVTTIEAH.js.map +0 -1
  110. package/dist/usa-6PGU5UHS.mjs +0 -18
  111. package/dist/usa-6PGU5UHS.mjs.map +0 -1
  112. package/dist/usa-I7DK2CTL.mjs +0 -18
  113. package/dist/usa-I7DK2CTL.mjs.map +0 -1
  114. package/dist/usa-LFLDXKPA.js +0 -20
  115. package/dist/usa-LFLDXKPA.js.map +0 -1
  116. package/dist/usa-LXT6WW64.js +0 -21
  117. package/dist/usa-LXT6WW64.js.map +0 -1
@@ -2,13 +2,13 @@
2
2
  var bundle = {
3
3
  // ── Address labels ────────────────────────────────────────────────────────
4
4
  "country-forms.address.postalCode.label": "Code postal",
5
- "country-forms.address.street.label": "Rue",
5
+ "country-forms.address.street.label": "Nom de la rue",
6
6
  "country-forms.address.street.placeholder": "Adresse compl\xE8te",
7
7
  "country-forms.address.number.label": "Num\xE9ro",
8
- "country-forms.address.complement.label": "Compl\xE9ment",
8
+ "country-forms.address.complement.label": "Compl\xE9ment (facultatif)",
9
9
  "country-forms.address.neighborhood.label": "Quartier",
10
10
  "country-forms.address.city.label": "Ville",
11
- "country-forms.address.state.label": "\xC9tat / Province",
11
+ "country-forms.address.state.label": "\xC9tat",
12
12
  // ── Address placeholders (per country) ────────────────────────────────────
13
13
  "country-forms.address.postalCode.placeholder.BRA": "ex. 01310-100",
14
14
  "country-forms.address.postalCode.placeholder.USA": "ex. 10001 ou 10001-1234",
@@ -22,6 +22,8 @@ var bundle = {
22
22
  "country-forms.personal-data.contactType.phone": "T\xE9l\xE9phone",
23
23
  "country-forms.personal-data.email.label": "E-mail",
24
24
  "country-forms.personal-data.phone.label": "T\xE9l\xE9phone",
25
+ "country-forms.personal-data.document.label": "Document",
26
+ "country-forms.personal-data.documentType.label": "Type de document",
25
27
  // ── Personal data labels (BRA) ────────────────────────────────────────────
26
28
  "country-forms.personal-data.personType.label": "Type de personne",
27
29
  "country-forms.personal-data.personType.individual": "Personne physique",
@@ -33,22 +35,35 @@ var bundle = {
33
35
  "country-forms.personal-data.cnpj.label": "CNPJ",
34
36
  "country-forms.personal-data.cnpj.placeholder": "ex. 11.222.333/0001-81",
35
37
  "country-forms.personal-data.phone.placeholder.BRA": "ex. (11) 99999-9999",
38
+ // ── Personal data labels (USA) ────────────────────────────────────────────
39
+ "country-forms.personal-data.ssn.label": "Num\xE9ro de s\xE9curit\xE9 sociale (SSN)",
40
+ "country-forms.personal-data.ssn.placeholder": "ex. 123-45-6789",
41
+ "country-forms.personal-data.ein.label": "Num\xE9ro d'identification d'employeur (EIN)",
42
+ "country-forms.personal-data.ein.placeholder": "ex. 12-3456789",
43
+ "country-forms.personal-data.phone.placeholder.USA": "ex. (201) 555-0123",
44
+ // ── Personal data labels (CAN) ────────────────────────────────────────────
45
+ "country-forms.personal-data.sin.label": "Num\xE9ro d'assurance sociale (SIN)",
46
+ "country-forms.personal-data.sin.placeholder": "ex. 046-454-286",
47
+ "country-forms.personal-data.bn.label": "Num\xE9ro d'entreprise (BN)",
48
+ "country-forms.personal-data.bn.placeholder": "ex. 123456789",
49
+ "country-forms.personal-data.phone.placeholder.CAN": "ex. 613-555-0123",
50
+ // ── Personal data labels (MEX) ────────────────────────────────────────────
51
+ "country-forms.personal-data.rfc.label": "RFC (personne physique)",
52
+ "country-forms.personal-data.rfc.placeholder": "ex. XAXX010101000",
53
+ "country-forms.personal-data.rfcCorporate.label": "RFC (personne morale)",
54
+ "country-forms.personal-data.rfcCorporate.placeholder": "ex. ABC010101AB1",
55
+ "country-forms.personal-data.phone.placeholder.MEX": "ex. (55) 1234 5678",
36
56
  // ── Validation messages ───────────────────────────────────────────────────
37
- "country-forms.validation.required": "Ce champ est requis",
38
- "country-forms.validation.invalid": "Valeur invalide",
39
- "country-forms.validation.maxLength": "La valeur d\xE9passe la longueur maximale autoris\xE9e",
57
+ "country-forms.validation.required": "Champ obligatoire. Saisissez votre {fieldName}.",
58
+ "country-forms.validation.invalid": "{fieldName} invalide. Remplissez \xE0 nouveau le champ {fieldName}.",
59
+ "country-forms.validation.maxLength": "{fieldName} doit comporter au plus {maxLength} caract\xE8res",
40
60
  "country-forms.validation.postalCode.BRA": "Entrez un CEP valide (ex. 01310-100)",
41
61
  "country-forms.validation.postalCode.USA": "Entrez un code ZIP valide (ex. 10001)",
42
62
  "country-forms.validation.postalCode.CAN": "Entrez un code postal valide (ex. K1A 0A9)",
43
- "country-forms.validation.postalCode.MEX": "Entrez un C\xF3digo Postal valide (ex. 06600)",
44
- "country-forms.validation.number.BRA": "Entrez un num\xE9ro valide",
45
- "country-forms.validation.email": "Entrez une adresse e-mail valide",
46
- "country-forms.validation.phone": "Entrez un num\xE9ro de t\xE9l\xE9phone valide",
47
- "country-forms.validation.cpf": "Entrez un CPF valide",
48
- "country-forms.validation.cnpj": "Entrez un CNPJ valide"
63
+ "country-forms.validation.postalCode.MEX": "Entrez un C\xF3digo Postal valide (ex. 06600)"
49
64
  };
50
65
  var fr_FR_default = bundle;
51
66
 
52
67
  export { fr_FR_default as default };
53
- //# sourceMappingURL=fr-FR-GGR2M6TJ.mjs.map
54
- //# sourceMappingURL=fr-FR-GGR2M6TJ.mjs.map
68
+ //# sourceMappingURL=fr-FR-N4WJAN23.mjs.map
69
+ //# sourceMappingURL=fr-FR-N4WJAN23.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/i18n/messages/fr-FR.ts"],"names":[],"mappings":";AAKA,IAAM,MAAA,GAAqB;AAAA;AAAA,EAEzB,wCAAA,EAA0C,aAAA;AAAA,EAC1C,oCAAA,EAAsC,eAAA;AAAA,EACtC,0CAAA,EAA4C,qBAAA;AAAA,EAC5C,oCAAA,EAAsC,WAAA;AAAA,EACtC,wCAAA,EAA0C,4BAAA;AAAA,EAC1C,0CAAA,EAA4C,UAAA;AAAA,EAC5C,kCAAA,EAAoC,OAAA;AAAA,EACpC,mCAAA,EAAqC,SAAA;AAAA;AAAA,EAErC,kDAAA,EAAoD,eAAA;AAAA,EACpD,kDAAA,EAAoD,yBAAA;AAAA,EACpD,kDAAA,EAAoD,aAAA;AAAA,EACpD,kDAAA,EAAoD,WAAA;AAAA;AAAA,EAGpD,6CAAA,EAA+C,WAAA;AAAA,EAC/C,4CAAA,EAA8C,KAAA;AAAA,EAC9C,+CAAA,EAAiD,0BAAA;AAAA,EACjD,+CAAA,EAAiD,QAAA;AAAA,EACjD,+CAAA,EAAiD,iBAAA;AAAA,EACjD,yCAAA,EAA2C,QAAA;AAAA,EAC3C,yCAAA,EAA2C,iBAAA;AAAA,EAC3C,4CAAA,EAA8C,UAAA;AAAA,EAC9C,gDAAA,EAAkD,kBAAA;AAAA;AAAA,EAGlD,8CAAA,EAAgD,kBAAA;AAAA,EAChD,mDAAA,EAAqD,mBAAA;AAAA,EACrD,iDAAA,EAAmD,iBAAA;AAAA,EACnD,wDAAA,EAA0D,WAAA;AAAA,EAC1D,sDAAA,EAAwD,gBAAA;AAAA,EACxD,uCAAA,EAAyC,KAAA;AAAA,EACzC,6CAAA,EAA+C,oBAAA;AAAA,EAC/C,wCAAA,EAA0C,MAAA;AAAA,EAC1C,8CAAA,EAAgD,wBAAA;AAAA,EAChD,mDAAA,EAAqD,qBAAA;AAAA;AAAA,EAGrD,uCAAA,EAAyC,2CAAA;AAAA,EACzC,6CAAA,EAA+C,iBAAA;AAAA,EAC/C,uCAAA,EAAyC,8CAAA;AAAA,EACzC,6CAAA,EAA+C,gBAAA;AAAA,EAC/C,mDAAA,EAAqD,oBAAA;AAAA;AAAA,EAGrD,uCAAA,EAAyC,qCAAA;AAAA,EACzC,6CAAA,EAA+C,iBAAA;AAAA,EAC/C,sCAAA,EAAwC,6BAAA;AAAA,EACxC,4CAAA,EAA8C,eAAA;AAAA,EAC9C,mDAAA,EAAqD,kBAAA;AAAA;AAAA,EAGrD,uCAAA,EAAyC,yBAAA;AAAA,EACzC,6CAAA,EAA+C,mBAAA;AAAA,EAC/C,gDAAA,EAAkD,uBAAA;AAAA,EAClD,sDAAA,EAAwD,kBAAA;AAAA,EACxD,mDAAA,EAAqD,oBAAA;AAAA;AAAA,EAGrD,mCAAA,EAAqC,iDAAA;AAAA,EACrC,kCAAA,EAAoC,qEAAA;AAAA,EACpC,oCAAA,EAAsC,8DAAA;AAAA,EACtC,yCAAA,EAA2C,sCAAA;AAAA,EAC3C,yCAAA,EAA2C,uCAAA;AAAA,EAC3C,yCAAA,EAA2C,4CAAA;AAAA,EAC3C,yCAAA,EAA2C;AAC7C,CAAA;AAEA,IAAO,aAAA,GAAQ","file":"fr-FR-N4WJAN23.mjs","sourcesContent":["/**\n * French (fr-FR) i18n bundle.\n */\nimport type { I18nBundle } from '../../types/i18n'\n\nconst bundle: I18nBundle = {\n // ── Address labels ────────────────────────────────────────────────────────\n 'country-forms.address.postalCode.label': 'Code postal',\n 'country-forms.address.street.label': 'Nom de la rue',\n 'country-forms.address.street.placeholder': 'Adresse complète',\n 'country-forms.address.number.label': 'Numéro',\n 'country-forms.address.complement.label': 'Complément (facultatif)',\n 'country-forms.address.neighborhood.label': 'Quartier',\n 'country-forms.address.city.label': 'Ville',\n 'country-forms.address.state.label': 'État',\n // ── Address placeholders (per country) ────────────────────────────────────\n 'country-forms.address.postalCode.placeholder.BRA': 'ex. 01310-100',\n 'country-forms.address.postalCode.placeholder.USA': 'ex. 10001 ou 10001-1234',\n 'country-forms.address.postalCode.placeholder.CAN': 'ex. K1A 0A9',\n 'country-forms.address.postalCode.placeholder.MEX': 'ex. 06600',\n\n // ── Personal data labels (fallback) ─────────────────────────────────────\n 'country-forms.personal-data.firstName.label': 'Prénom',\n 'country-forms.personal-data.lastName.label': 'Nom',\n 'country-forms.personal-data.contactType.label': 'Contact préféré',\n 'country-forms.personal-data.contactType.email': 'E-mail',\n 'country-forms.personal-data.contactType.phone': 'Téléphone',\n 'country-forms.personal-data.email.label': 'E-mail',\n 'country-forms.personal-data.phone.label': 'Téléphone',\n 'country-forms.personal-data.document.label': 'Document',\n 'country-forms.personal-data.documentType.label': 'Type de document',\n\n // ── Personal data labels (BRA) ────────────────────────────────────────────\n 'country-forms.personal-data.personType.label': 'Type de personne',\n 'country-forms.personal-data.personType.individual': 'Personne physique',\n 'country-forms.personal-data.personType.business': 'Personne morale',\n 'country-forms.personal-data.firstName.label.individual': 'Prénom',\n 'country-forms.personal-data.firstName.label.business': 'Raison sociale',\n 'country-forms.personal-data.cpf.label': 'CPF',\n 'country-forms.personal-data.cpf.placeholder': 'ex. 123.456.789-09',\n 'country-forms.personal-data.cnpj.label': 'CNPJ',\n 'country-forms.personal-data.cnpj.placeholder': 'ex. 11.222.333/0001-81',\n 'country-forms.personal-data.phone.placeholder.BRA': 'ex. (11) 99999-9999',\n\n // ── Personal data labels (USA) ────────────────────────────────────────────\n 'country-forms.personal-data.ssn.label': 'Numéro de sécurité sociale (SSN)',\n 'country-forms.personal-data.ssn.placeholder': 'ex. 123-45-6789',\n 'country-forms.personal-data.ein.label': \"Numéro d'identification d'employeur (EIN)\",\n 'country-forms.personal-data.ein.placeholder': 'ex. 12-3456789',\n 'country-forms.personal-data.phone.placeholder.USA': 'ex. (201) 555-0123',\n\n // ── Personal data labels (CAN) ────────────────────────────────────────────\n 'country-forms.personal-data.sin.label': \"Numéro d'assurance sociale (SIN)\",\n 'country-forms.personal-data.sin.placeholder': 'ex. 046-454-286',\n 'country-forms.personal-data.bn.label': \"Numéro d'entreprise (BN)\",\n 'country-forms.personal-data.bn.placeholder': 'ex. 123456789',\n 'country-forms.personal-data.phone.placeholder.CAN': 'ex. 613-555-0123',\n\n // ── Personal data labels (MEX) ────────────────────────────────────────────\n 'country-forms.personal-data.rfc.label': 'RFC (personne physique)',\n 'country-forms.personal-data.rfc.placeholder': 'ex. XAXX010101000',\n 'country-forms.personal-data.rfcCorporate.label': 'RFC (personne morale)',\n 'country-forms.personal-data.rfcCorporate.placeholder': 'ex. ABC010101AB1',\n 'country-forms.personal-data.phone.placeholder.MEX': 'ex. (55) 1234 5678',\n\n // ── Validation messages ───────────────────────────────────────────────────\n 'country-forms.validation.required': 'Champ obligatoire. Saisissez votre {fieldName}.',\n 'country-forms.validation.invalid': '{fieldName} invalide. Remplissez à nouveau le champ {fieldName}.',\n 'country-forms.validation.maxLength': '{fieldName} doit comporter au plus {maxLength} caractères',\n 'country-forms.validation.postalCode.BRA': 'Entrez un CEP valide (ex. 01310-100)',\n 'country-forms.validation.postalCode.USA': 'Entrez un code ZIP valide (ex. 10001)',\n 'country-forms.validation.postalCode.CAN': 'Entrez un code postal valide (ex. K1A 0A9)',\n 'country-forms.validation.postalCode.MEX': 'Entrez un Código Postal valide (ex. 06600)',\n}\n\nexport default bundle\n"]}
@@ -4,13 +4,13 @@
4
4
  var bundle = {
5
5
  // ── Address labels ────────────────────────────────────────────────────────
6
6
  "country-forms.address.postalCode.label": "Code postal",
7
- "country-forms.address.street.label": "Rue",
7
+ "country-forms.address.street.label": "Nom de la rue",
8
8
  "country-forms.address.street.placeholder": "Adresse compl\xE8te",
9
9
  "country-forms.address.number.label": "Num\xE9ro",
10
- "country-forms.address.complement.label": "Compl\xE9ment",
10
+ "country-forms.address.complement.label": "Compl\xE9ment (facultatif)",
11
11
  "country-forms.address.neighborhood.label": "Quartier",
12
12
  "country-forms.address.city.label": "Ville",
13
- "country-forms.address.state.label": "\xC9tat / Province",
13
+ "country-forms.address.state.label": "\xC9tat",
14
14
  // ── Address placeholders (per country) ────────────────────────────────────
15
15
  "country-forms.address.postalCode.placeholder.BRA": "ex. 01310-100",
16
16
  "country-forms.address.postalCode.placeholder.USA": "ex. 10001 ou 10001-1234",
@@ -24,6 +24,8 @@ var bundle = {
24
24
  "country-forms.personal-data.contactType.phone": "T\xE9l\xE9phone",
25
25
  "country-forms.personal-data.email.label": "E-mail",
26
26
  "country-forms.personal-data.phone.label": "T\xE9l\xE9phone",
27
+ "country-forms.personal-data.document.label": "Document",
28
+ "country-forms.personal-data.documentType.label": "Type de document",
27
29
  // ── Personal data labels (BRA) ────────────────────────────────────────────
28
30
  "country-forms.personal-data.personType.label": "Type de personne",
29
31
  "country-forms.personal-data.personType.individual": "Personne physique",
@@ -35,22 +37,35 @@ var bundle = {
35
37
  "country-forms.personal-data.cnpj.label": "CNPJ",
36
38
  "country-forms.personal-data.cnpj.placeholder": "ex. 11.222.333/0001-81",
37
39
  "country-forms.personal-data.phone.placeholder.BRA": "ex. (11) 99999-9999",
40
+ // ── Personal data labels (USA) ────────────────────────────────────────────
41
+ "country-forms.personal-data.ssn.label": "Num\xE9ro de s\xE9curit\xE9 sociale (SSN)",
42
+ "country-forms.personal-data.ssn.placeholder": "ex. 123-45-6789",
43
+ "country-forms.personal-data.ein.label": "Num\xE9ro d'identification d'employeur (EIN)",
44
+ "country-forms.personal-data.ein.placeholder": "ex. 12-3456789",
45
+ "country-forms.personal-data.phone.placeholder.USA": "ex. (201) 555-0123",
46
+ // ── Personal data labels (CAN) ────────────────────────────────────────────
47
+ "country-forms.personal-data.sin.label": "Num\xE9ro d'assurance sociale (SIN)",
48
+ "country-forms.personal-data.sin.placeholder": "ex. 046-454-286",
49
+ "country-forms.personal-data.bn.label": "Num\xE9ro d'entreprise (BN)",
50
+ "country-forms.personal-data.bn.placeholder": "ex. 123456789",
51
+ "country-forms.personal-data.phone.placeholder.CAN": "ex. 613-555-0123",
52
+ // ── Personal data labels (MEX) ────────────────────────────────────────────
53
+ "country-forms.personal-data.rfc.label": "RFC (personne physique)",
54
+ "country-forms.personal-data.rfc.placeholder": "ex. XAXX010101000",
55
+ "country-forms.personal-data.rfcCorporate.label": "RFC (personne morale)",
56
+ "country-forms.personal-data.rfcCorporate.placeholder": "ex. ABC010101AB1",
57
+ "country-forms.personal-data.phone.placeholder.MEX": "ex. (55) 1234 5678",
38
58
  // ── Validation messages ───────────────────────────────────────────────────
39
- "country-forms.validation.required": "Ce champ est requis",
40
- "country-forms.validation.invalid": "Valeur invalide",
41
- "country-forms.validation.maxLength": "La valeur d\xE9passe la longueur maximale autoris\xE9e",
59
+ "country-forms.validation.required": "Champ obligatoire. Saisissez votre {fieldName}.",
60
+ "country-forms.validation.invalid": "{fieldName} invalide. Remplissez \xE0 nouveau le champ {fieldName}.",
61
+ "country-forms.validation.maxLength": "{fieldName} doit comporter au plus {maxLength} caract\xE8res",
42
62
  "country-forms.validation.postalCode.BRA": "Entrez un CEP valide (ex. 01310-100)",
43
63
  "country-forms.validation.postalCode.USA": "Entrez un code ZIP valide (ex. 10001)",
44
64
  "country-forms.validation.postalCode.CAN": "Entrez un code postal valide (ex. K1A 0A9)",
45
- "country-forms.validation.postalCode.MEX": "Entrez un C\xF3digo Postal valide (ex. 06600)",
46
- "country-forms.validation.number.BRA": "Entrez un num\xE9ro valide",
47
- "country-forms.validation.email": "Entrez une adresse e-mail valide",
48
- "country-forms.validation.phone": "Entrez un num\xE9ro de t\xE9l\xE9phone valide",
49
- "country-forms.validation.cpf": "Entrez un CPF valide",
50
- "country-forms.validation.cnpj": "Entrez un CNPJ valide"
65
+ "country-forms.validation.postalCode.MEX": "Entrez un C\xF3digo Postal valide (ex. 06600)"
51
66
  };
52
67
  var fr_FR_default = bundle;
53
68
 
54
69
  module.exports = fr_FR_default;
55
- //# sourceMappingURL=fr-FR-LWA6B3MW.js.map
56
- //# sourceMappingURL=fr-FR-LWA6B3MW.js.map
70
+ //# sourceMappingURL=fr-FR-WZBI6O4O.js.map
71
+ //# sourceMappingURL=fr-FR-WZBI6O4O.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/i18n/messages/fr-FR.ts"],"names":[],"mappings":";;;AAKA,IAAM,MAAA,GAAqB;AAAA;AAAA,EAEzB,wCAAA,EAA0C,aAAA;AAAA,EAC1C,oCAAA,EAAsC,eAAA;AAAA,EACtC,0CAAA,EAA4C,qBAAA;AAAA,EAC5C,oCAAA,EAAsC,WAAA;AAAA,EACtC,wCAAA,EAA0C,4BAAA;AAAA,EAC1C,0CAAA,EAA4C,UAAA;AAAA,EAC5C,kCAAA,EAAoC,OAAA;AAAA,EACpC,mCAAA,EAAqC,SAAA;AAAA;AAAA,EAErC,kDAAA,EAAoD,eAAA;AAAA,EACpD,kDAAA,EAAoD,yBAAA;AAAA,EACpD,kDAAA,EAAoD,aAAA;AAAA,EACpD,kDAAA,EAAoD,WAAA;AAAA;AAAA,EAGpD,6CAAA,EAA+C,WAAA;AAAA,EAC/C,4CAAA,EAA8C,KAAA;AAAA,EAC9C,+CAAA,EAAiD,0BAAA;AAAA,EACjD,+CAAA,EAAiD,QAAA;AAAA,EACjD,+CAAA,EAAiD,iBAAA;AAAA,EACjD,yCAAA,EAA2C,QAAA;AAAA,EAC3C,yCAAA,EAA2C,iBAAA;AAAA,EAC3C,4CAAA,EAA8C,UAAA;AAAA,EAC9C,gDAAA,EAAkD,kBAAA;AAAA;AAAA,EAGlD,8CAAA,EAAgD,kBAAA;AAAA,EAChD,mDAAA,EAAqD,mBAAA;AAAA,EACrD,iDAAA,EAAmD,iBAAA;AAAA,EACnD,wDAAA,EAA0D,WAAA;AAAA,EAC1D,sDAAA,EAAwD,gBAAA;AAAA,EACxD,uCAAA,EAAyC,KAAA;AAAA,EACzC,6CAAA,EAA+C,oBAAA;AAAA,EAC/C,wCAAA,EAA0C,MAAA;AAAA,EAC1C,8CAAA,EAAgD,wBAAA;AAAA,EAChD,mDAAA,EAAqD,qBAAA;AAAA;AAAA,EAGrD,uCAAA,EAAyC,2CAAA;AAAA,EACzC,6CAAA,EAA+C,iBAAA;AAAA,EAC/C,uCAAA,EAAyC,8CAAA;AAAA,EACzC,6CAAA,EAA+C,gBAAA;AAAA,EAC/C,mDAAA,EAAqD,oBAAA;AAAA;AAAA,EAGrD,uCAAA,EAAyC,qCAAA;AAAA,EACzC,6CAAA,EAA+C,iBAAA;AAAA,EAC/C,sCAAA,EAAwC,6BAAA;AAAA,EACxC,4CAAA,EAA8C,eAAA;AAAA,EAC9C,mDAAA,EAAqD,kBAAA;AAAA;AAAA,EAGrD,uCAAA,EAAyC,yBAAA;AAAA,EACzC,6CAAA,EAA+C,mBAAA;AAAA,EAC/C,gDAAA,EAAkD,uBAAA;AAAA,EAClD,sDAAA,EAAwD,kBAAA;AAAA,EACxD,mDAAA,EAAqD,oBAAA;AAAA;AAAA,EAGrD,mCAAA,EAAqC,iDAAA;AAAA,EACrC,kCAAA,EAAoC,qEAAA;AAAA,EACpC,oCAAA,EAAsC,8DAAA;AAAA,EACtC,yCAAA,EAA2C,sCAAA;AAAA,EAC3C,yCAAA,EAA2C,uCAAA;AAAA,EAC3C,yCAAA,EAA2C,4CAAA;AAAA,EAC3C,yCAAA,EAA2C;AAC7C,CAAA;AAEA,IAAO,aAAA,GAAQ","file":"fr-FR-WZBI6O4O.js","sourcesContent":["/**\n * French (fr-FR) i18n bundle.\n */\nimport type { I18nBundle } from '../../types/i18n'\n\nconst bundle: I18nBundle = {\n // ── Address labels ────────────────────────────────────────────────────────\n 'country-forms.address.postalCode.label': 'Code postal',\n 'country-forms.address.street.label': 'Nom de la rue',\n 'country-forms.address.street.placeholder': 'Adresse complète',\n 'country-forms.address.number.label': 'Numéro',\n 'country-forms.address.complement.label': 'Complément (facultatif)',\n 'country-forms.address.neighborhood.label': 'Quartier',\n 'country-forms.address.city.label': 'Ville',\n 'country-forms.address.state.label': 'État',\n // ── Address placeholders (per country) ────────────────────────────────────\n 'country-forms.address.postalCode.placeholder.BRA': 'ex. 01310-100',\n 'country-forms.address.postalCode.placeholder.USA': 'ex. 10001 ou 10001-1234',\n 'country-forms.address.postalCode.placeholder.CAN': 'ex. K1A 0A9',\n 'country-forms.address.postalCode.placeholder.MEX': 'ex. 06600',\n\n // ── Personal data labels (fallback) ─────────────────────────────────────\n 'country-forms.personal-data.firstName.label': 'Prénom',\n 'country-forms.personal-data.lastName.label': 'Nom',\n 'country-forms.personal-data.contactType.label': 'Contact préféré',\n 'country-forms.personal-data.contactType.email': 'E-mail',\n 'country-forms.personal-data.contactType.phone': 'Téléphone',\n 'country-forms.personal-data.email.label': 'E-mail',\n 'country-forms.personal-data.phone.label': 'Téléphone',\n 'country-forms.personal-data.document.label': 'Document',\n 'country-forms.personal-data.documentType.label': 'Type de document',\n\n // ── Personal data labels (BRA) ────────────────────────────────────────────\n 'country-forms.personal-data.personType.label': 'Type de personne',\n 'country-forms.personal-data.personType.individual': 'Personne physique',\n 'country-forms.personal-data.personType.business': 'Personne morale',\n 'country-forms.personal-data.firstName.label.individual': 'Prénom',\n 'country-forms.personal-data.firstName.label.business': 'Raison sociale',\n 'country-forms.personal-data.cpf.label': 'CPF',\n 'country-forms.personal-data.cpf.placeholder': 'ex. 123.456.789-09',\n 'country-forms.personal-data.cnpj.label': 'CNPJ',\n 'country-forms.personal-data.cnpj.placeholder': 'ex. 11.222.333/0001-81',\n 'country-forms.personal-data.phone.placeholder.BRA': 'ex. (11) 99999-9999',\n\n // ── Personal data labels (USA) ────────────────────────────────────────────\n 'country-forms.personal-data.ssn.label': 'Numéro de sécurité sociale (SSN)',\n 'country-forms.personal-data.ssn.placeholder': 'ex. 123-45-6789',\n 'country-forms.personal-data.ein.label': \"Numéro d'identification d'employeur (EIN)\",\n 'country-forms.personal-data.ein.placeholder': 'ex. 12-3456789',\n 'country-forms.personal-data.phone.placeholder.USA': 'ex. (201) 555-0123',\n\n // ── Personal data labels (CAN) ────────────────────────────────────────────\n 'country-forms.personal-data.sin.label': \"Numéro d'assurance sociale (SIN)\",\n 'country-forms.personal-data.sin.placeholder': 'ex. 046-454-286',\n 'country-forms.personal-data.bn.label': \"Numéro d'entreprise (BN)\",\n 'country-forms.personal-data.bn.placeholder': 'ex. 123456789',\n 'country-forms.personal-data.phone.placeholder.CAN': 'ex. 613-555-0123',\n\n // ── Personal data labels (MEX) ────────────────────────────────────────────\n 'country-forms.personal-data.rfc.label': 'RFC (personne physique)',\n 'country-forms.personal-data.rfc.placeholder': 'ex. XAXX010101000',\n 'country-forms.personal-data.rfcCorporate.label': 'RFC (personne morale)',\n 'country-forms.personal-data.rfcCorporate.placeholder': 'ex. ABC010101AB1',\n 'country-forms.personal-data.phone.placeholder.MEX': 'ex. (55) 1234 5678',\n\n // ── Validation messages ───────────────────────────────────────────────────\n 'country-forms.validation.required': 'Champ obligatoire. Saisissez votre {fieldName}.',\n 'country-forms.validation.invalid': '{fieldName} invalide. Remplissez à nouveau le champ {fieldName}.',\n 'country-forms.validation.maxLength': '{fieldName} doit comporter au plus {maxLength} caractères',\n 'country-forms.validation.postalCode.BRA': 'Entrez un CEP valide (ex. 01310-100)',\n 'country-forms.validation.postalCode.USA': 'Entrez un code ZIP valide (ex. 10001)',\n 'country-forms.validation.postalCode.CAN': 'Entrez un code postal valide (ex. K1A 0A9)',\n 'country-forms.validation.postalCode.MEX': 'Entrez un Código Postal valide (ex. 06600)',\n}\n\nexport default bundle\n"]}
package/dist/index.d.mts CHANGED
@@ -188,6 +188,93 @@ interface FieldDefinition {
188
188
  * }
189
189
  */
190
190
  conditionalOptions?: Record<string, SelectOption[] | string>;
191
+ /**
192
+ * Map from a controller field's value to a validator name for this field.
193
+ * Used when a single field validates differently depending on another field's
194
+ * selection — e.g. a `document` field validated as a CPF for individuals and as
195
+ * a CNPJ for businesses.
196
+ *
197
+ * Requires {@link FieldDefinition.dependsOn} to identify the controller field.
198
+ * When a matching key exists for the current controller value, it overrides
199
+ * {@link ValidationRules.customValidator}. Resolve the effective validator with
200
+ * `resolveFieldValidator(field, values)`.
201
+ *
202
+ * @example
203
+ * dependsOn: "personType"
204
+ * conditionalValidator: { individual: "validateCPF", business: "validateCNPJ" }
205
+ *
206
+ * @remarks
207
+ * Declaring this property also opts the field into automatic reset: `setValue`
208
+ * clears the field's value to `''` whenever the controller ({@link FieldDefinition.dependsOn})
209
+ * changes, because the validation domain — and therefore any previously entered
210
+ * value — is no longer guaranteed to be valid (e.g. a CPF is not a valid CNPJ).
211
+ * If a future field needs a conditional validator *without* this reset, add a
212
+ * dedicated opt-out flag rather than relying on the absence of this behavior.
213
+ */
214
+ conditionalValidator?: Record<string, string>;
215
+ /**
216
+ * Map from a controller field's value to a format function name for this field.
217
+ * Same semantics as {@link FieldDefinition.conditionalValidator} but for the mask
218
+ * applied on display. Overrides {@link FieldDefinition.formatRef} when a key
219
+ * matches. Resolve the effective ref with `resolveFieldFormatRef(field, values)`.
220
+ *
221
+ * A missing key falls back to {@link FieldDefinition.formatRef} (or identity when
222
+ * neither is set), so a controller value with no mask is valid.
223
+ *
224
+ * @example
225
+ * dependsOn: "personType"
226
+ * conditionalFormatRef: { individual: "formatCPF", business: "formatCNPJ" }
227
+ */
228
+ conditionalFormatRef?: Record<string, string>;
229
+ /**
230
+ * Map from a controller field's value to an unformat function name for this field.
231
+ * Symmetric to {@link FieldDefinition.conditionalFormatRef}. Overrides
232
+ * {@link FieldDefinition.unformatRef} when a key matches. Resolve the effective ref
233
+ * with `resolveFieldUnformatRef(field, values)`.
234
+ *
235
+ * @example
236
+ * dependsOn: "personType"
237
+ * conditionalUnformatRef: { individual: "unformatCPF", business: "unformatCNPJ" }
238
+ */
239
+ conditionalUnformatRef?: Record<string, string>;
240
+ /**
241
+ * Map from a controller field's value to an {@link InputMode} for this field.
242
+ * Same semantics as {@link FieldDefinition.conditionalValidator} but for the
243
+ * mobile virtual-keyboard hint. Overrides {@link FieldDefinition.inputMode} when
244
+ * a key matches. Resolve the effective value with `resolveFieldInputMode(field, values)`.
245
+ *
246
+ * Useful when a single field expects different input per controller value — e.g.
247
+ * a numeric keyboard for a numeric CPF (individual) but a text keyboard for an
248
+ * alphanumeric CNPJ (business).
249
+ *
250
+ * @example
251
+ * dependsOn: "personType"
252
+ * conditionalInputMode: { individual: "numeric", business: "text" }
253
+ */
254
+ conditionalInputMode?: Record<string, InputMode>;
255
+ /**
256
+ * Name of the sibling field that drives {@link FieldDefinition.derivedValue}.
257
+ *
258
+ * A field with `derivedFrom` is **data-only**: its value is computed automatically
259
+ * from the controller and it is never rendered (excluded from `getVisibleFields`)
260
+ * nor validated. It exists so the form state matches the API payload shape — e.g.
261
+ * a `documentType` field derived from `personType` so submissions carry both
262
+ * `document` and `documentType`.
263
+ *
264
+ * @example "personType"
265
+ */
266
+ derivedFrom?: string;
267
+ /**
268
+ * Map from the {@link FieldDefinition.derivedFrom} controller value to this
269
+ * field's automatically-maintained value. `createFormState` seeds it and
270
+ * `setValue` recomputes it whenever the controller changes. A controller value
271
+ * with no entry resolves to `""`.
272
+ *
273
+ * @example
274
+ * derivedFrom: "personType"
275
+ * derivedValue: { individual: "cpf", business: "cnpj" }
276
+ */
277
+ derivedValue?: Record<string, string>;
191
278
  /**
192
279
  * Declarative visibility condition.
193
280
  * When present, the field is shown and validated only while the condition is `true`.
@@ -214,8 +301,9 @@ interface FieldDefinition {
214
301
  conditionalPlaceholder?: Record<string, string>;
215
302
  /**
216
303
  * Name of the sibling field that drives {@link FieldDefinition.conditionalLabel},
217
- * {@link FieldDefinition.conditionalPlaceholder}, and
218
- * {@link FieldDefinition.conditionalOptions}.
304
+ * {@link FieldDefinition.conditionalPlaceholder}, {@link FieldDefinition.conditionalOptions},
305
+ * {@link FieldDefinition.conditionalValidator}, {@link FieldDefinition.conditionalFormatRef},
306
+ * {@link FieldDefinition.conditionalUnformatRef}, and {@link FieldDefinition.conditionalInputMode}.
219
307
  * Required when any of those properties is set.
220
308
  * @example "personType", "state"
221
309
  */
@@ -375,12 +463,31 @@ type I18nBundle = Record<string, string>;
375
463
  * resolveLabel('country-forms.address.postalCode.label', bundle, overrides)
376
464
  */
377
465
  type I18nOverrides = Record<string, string>;
466
+ /**
467
+ * Interpolation parameters for `resolveLabel`.
468
+ *
469
+ * Each entry replaces every `{key}` placeholder in the resolved message with
470
+ * the provided value. Numeric values are coerced via `String(value)`. Missing
471
+ * placeholders (i.e. a `{key}` appears in the message but no entry exists in
472
+ * `params`) are intentionally left untouched so the gap is visible at runtime.
473
+ *
474
+ * @example
475
+ * resolveLabel(
476
+ * 'country-forms.validation.maxLength',
477
+ * bundle,
478
+ * undefined,
479
+ * { fieldName: 'CEP', maxLength: 9 },
480
+ * )
481
+ * // bundle: "{fieldName} deve ter até {maxLength} caracteres"
482
+ * // → "CEP deve ter até 9 caracteres"
483
+ */
484
+ type I18nParams = Record<string, string | number>;
378
485
 
379
486
  /**
380
487
  * A synchronous field validator function.
381
488
  *
382
489
  * - Returns `true` when the value is valid.
383
- * - Returns an **i18n key** string (e.g. `"country-forms.validation.cpf.invalid"`) when invalid.
490
+ * - Returns an **i18n key** string (e.g. `"country-forms.validation.invalid"`) when invalid.
384
491
  * The engine passes this key to the error map; consumers resolve it via `resolveLabel`.
385
492
  *
386
493
  * Validators must be **pure** and **synchronous**.
@@ -448,9 +555,15 @@ declare function createFormState(schema: FormSchema, defaults?: Partial<FormValu
448
555
  * The updated field is automatically marked as `touched: true`.
449
556
  *
450
557
  * When the changed field is referenced by another field's `dependsOn` and that
451
- * field has `conditionalOptions`, the dependent field's value is automatically
452
- * reset to `''`. This prevents stale values when the controller field changes
453
- * (e.g. selecting a different state clears the previously selected city).
558
+ * field has `conditionalOptions` or `conditionalValidator`, the dependent field's
559
+ * value is automatically reset to `''`. This prevents stale values when the
560
+ * controller field changes — e.g. selecting a different state clears the previously
561
+ * selected city, or switching `personType` clears the `document` whose validator
562
+ * (CPF vs CNPJ) just changed.
563
+ *
564
+ * Derived, data-only fields ({@link FieldDefinition.derivedFrom}) referencing the
565
+ * changed field are recomputed from their `derivedValue` map (e.g. `documentType`
566
+ * follows `personType`).
454
567
  *
455
568
  * Existing errors are preserved so the consumer can decide when to re-validate.
456
569
  * To clear all errors after a change, spread: `{ ...setValue(state, schema, f, v), errors: {} }`.
@@ -668,6 +781,83 @@ declare function unformatValue(ref: string | undefined, value: string): string;
668
781
  */
669
782
  declare function resolveFieldOptions(field: FieldDefinition, values: FormValues): SelectOption[] | null;
670
783
 
784
+ /**
785
+ * @module engine/resolveField
786
+ *
787
+ * Resolvers for fields whose label, placeholder, validator, or mask change based
788
+ * on a sibling controller field (declared via `dependsOn`).
789
+ *
790
+ * These mirror {@link resolveFieldOptions}: each resolver looks up the controller
791
+ * value in the field's conditional map and falls back to the field's static
792
+ * property when no entry matches. They let a single field — e.g. a `document`
793
+ * field — behave as a CPF for individuals and a CNPJ for businesses without the
794
+ * consumer hard-coding the mapping.
795
+ */
796
+
797
+ /**
798
+ * Resolves the effective i18n label **key** for a field given the current values.
799
+ *
800
+ * Resolution order:
801
+ * 1) `conditionalLabel` entry matching `values[dependsOn]`
802
+ * 2) `field.label` fallback
803
+ *
804
+ * @returns The i18n key to pass to `resolveLabel`.
805
+ */
806
+ declare function resolveFieldLabel(field: FieldDefinition, values: FormValues): string;
807
+ /**
808
+ * Resolves the effective i18n placeholder **key** for a field, or `undefined`
809
+ * when the field has neither a conditional nor a static placeholder.
810
+ *
811
+ * Resolution order:
812
+ * 1) `conditionalPlaceholder` entry matching `values[dependsOn]`
813
+ * 2) `field.placeholder` fallback
814
+ */
815
+ declare function resolveFieldPlaceholder(field: FieldDefinition, values: FormValues): string | undefined;
816
+ /**
817
+ * Resolves the effective validator name for a field given the current values.
818
+ *
819
+ * Resolution order:
820
+ * 1) `conditionalValidator` entry matching `values[dependsOn]`
821
+ * 2) `field.validation.customValidator` fallback
822
+ *
823
+ * @returns The validator name to resolve from the rules registry, or `undefined`
824
+ * when the field has no custom validator for the current controller value.
825
+ */
826
+ declare function resolveFieldValidator(field: FieldDefinition, values: FormValues): string | undefined;
827
+ /**
828
+ * Resolves the effective format function name for a field given the current values.
829
+ *
830
+ * Resolution order:
831
+ * 1) `conditionalFormatRef` entry matching `values[dependsOn]`
832
+ * 2) `field.formatRef` fallback
833
+ *
834
+ * Pass the result to `formatValue(ref, raw)`; `undefined` yields identity.
835
+ */
836
+ declare function resolveFieldFormatRef(field: FieldDefinition, values: FormValues): string | undefined;
837
+ /**
838
+ * Resolves the effective unformat function name for a field given the current values.
839
+ *
840
+ * Resolution order:
841
+ * 1) `conditionalUnformatRef` entry matching `values[dependsOn]`
842
+ * 2) `field.unformatRef` fallback
843
+ *
844
+ * Pass the result to `unformatValue(ref, display)`; `undefined` yields identity.
845
+ */
846
+ declare function resolveFieldUnformatRef(field: FieldDefinition, values: FormValues): string | undefined;
847
+ /**
848
+ * Resolves the effective `inputMode` (mobile keyboard hint) for a field given
849
+ * the current values.
850
+ *
851
+ * Resolution order:
852
+ * 1) `conditionalInputMode` entry matching `values[dependsOn]`
853
+ * 2) `field.inputMode` fallback
854
+ *
855
+ * Lets a single field hint a different virtual keyboard per controller value —
856
+ * e.g. a `document` field that is numeric for an individual (CPF) and text for a
857
+ * business (alphanumeric CNPJ).
858
+ */
859
+ declare function resolveFieldInputMode(field: FieldDefinition, values: FormValues): InputMode | undefined;
860
+
671
861
  /**
672
862
  * Dynamic import map for address schemas.
673
863
  * Each country is loaded on demand via `import()` for code-splitting.
@@ -705,7 +895,7 @@ declare const SUPPORTED_ADDRESS_COUNTRIES: readonly string[];
705
895
  *
706
896
  * @example
707
897
  * import { SUPPORTED_PERSONAL_DATA_COUNTRIES } from '@vtex/country-forms'
708
- * // currently supported countries: → ['BRA']
898
+ * // currently supported countries: → ['BRA', 'CAN', 'USA']
709
899
  */
710
900
  declare const SUPPORTED_PERSONAL_DATA_COUNTRIES: readonly string[];
711
901
 
@@ -779,7 +969,10 @@ declare function loadLocale(locale: string): Promise<I18nBundle>;
779
969
  /**
780
970
  * @module i18n/resolveLabel
781
971
  *
782
- * Resolves an i18n key to its display string using a three-level cascade:
972
+ * Resolves an i18n key to its display string using a three-level cascade and,
973
+ * optionally, interpolates `{name}` placeholders found in the resolved string.
974
+ *
975
+ * ## Cascade
783
976
  *
784
977
  * 1. **Consumer override** — `overrides[key]` wins if present.
785
978
  * 2. **Bundle value** — `bundle[key]` from `loadLocale()`.
@@ -789,10 +982,22 @@ declare function loadLocale(locale: string): Promise<I18nBundle>;
789
982
  * This design lets consumers customize individual labels without forking the
790
983
  * library or replacing the entire bundle.
791
984
  *
985
+ * ## Interpolation
986
+ *
987
+ * When `params` is provided, every `{name}` placeholder in the resolved string
988
+ * is replaced with `String(params[name])`. Replacement is **global** — the same
989
+ * placeholder may appear more than once in a message and is replaced everywhere
990
+ * it occurs. Placeholders without a matching `params` entry are left untouched
991
+ * so unfulfilled substitutions remain visible to developers.
992
+ *
993
+ * Interpolation is applied after the cascade, so it works equally for override
994
+ * strings, bundle strings, and the raw-key fallback.
995
+ *
792
996
  * @param key - i18n key (e.g. `"country-forms.address.postalCode.label"`)
793
997
  * @param bundle - Locale bundle loaded via `loadLocale()`
794
998
  * @param overrides - Optional consumer-supplied overrides
795
- * @returns Resolved display string
999
+ * @param params - Optional interpolation parameters for `{name}` placeholders
1000
+ * @returns Resolved (and optionally interpolated) display string
796
1001
  *
797
1002
  * @example
798
1003
  * const bundle = await loadLocale('pt-BR')
@@ -807,9 +1012,20 @@ declare function loadLocale(locale: string): Promise<I18nBundle>;
807
1012
  * @example
808
1013
  * resolveLabel('country-forms.unknown.key', bundle)
809
1014
  * // → "country-forms.unknown.key" (raw key fallback)
1015
+ *
1016
+ * @example
1017
+ * // bundle: { 'country-forms.validation.maxLength':
1018
+ * // '{fieldName} deve ter até {maxLength} caracteres' }
1019
+ * resolveLabel(
1020
+ * 'country-forms.validation.maxLength',
1021
+ * bundle,
1022
+ * undefined,
1023
+ * { fieldName: 'CEP', maxLength: 9 },
1024
+ * )
1025
+ * // → "CEP deve ter até 9 caracteres"
810
1026
  */
811
1027
 
812
- declare function resolveLabel(key: string, bundle: I18nBundle, overrides?: I18nOverrides): string;
1028
+ declare function resolveLabel(key: string, bundle: I18nBundle, overrides?: I18nOverrides, params?: I18nParams): string;
813
1029
 
814
1030
  /**
815
1031
  * BCP 47 locale tags supported by the library's built-in translation bundles.
@@ -830,4 +1046,4 @@ declare const SUPPORTED_LOCALES: readonly ["en-US", "es-MX", "fr-FR", "pt-BR"];
830
1046
  /** Union of BCP 47 tags with dedicated built-in bundles. */
831
1047
  type SupportedLocale = (typeof SUPPORTED_LOCALES)[number];
832
1048
 
833
- export { type ConditionalOperator, type ConditionalVisibility, type FieldDefinition, type FieldType, type FormErrors, type FormSchema, type FormState, type FormType, type FormValues, type FormatFn, type I18nBundle, type I18nOverrides, type InputMode, SUPPORTED_ADDRESS_COUNTRIES, SUPPORTED_LOCALES, SUPPORTED_PERSONAL_DATA_COUNTRIES, type SelectOption, type SupportedLocale, type UnformatFn, type ValidationErrors, type ValidationRules, type ValidatorFn, createFormState, formatValue, getVisibleFields, loadLocale, loadSchema, resolveFieldOptions, resolveLabel, setValue, unformatValue, validate };
1049
+ export { type ConditionalOperator, type ConditionalVisibility, type FieldDefinition, type FieldType, type FormErrors, type FormSchema, type FormState, type FormType, type FormValues, type FormatFn, type I18nBundle, type I18nOverrides, type I18nParams, type InputMode, SUPPORTED_ADDRESS_COUNTRIES, SUPPORTED_LOCALES, SUPPORTED_PERSONAL_DATA_COUNTRIES, type SelectOption, type SupportedLocale, type UnformatFn, type ValidationErrors, type ValidationRules, type ValidatorFn, createFormState, formatValue, getVisibleFields, loadLocale, loadSchema, resolveFieldFormatRef, resolveFieldInputMode, resolveFieldLabel, resolveFieldOptions, resolveFieldPlaceholder, resolveFieldUnformatRef, resolveFieldValidator, resolveLabel, setValue, unformatValue, validate };