@commercetools/nimbus 2.2.0 → 2.3.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 (345) hide show
  1. package/dist/chunks/{accordion-Dh0RVlNx.es.js → accordion-Cwy8ywRo.es.js} +2 -2
  2. package/dist/chunks/{accordion-Dh0RVlNx.es.js.map → accordion-Cwy8ywRo.es.js.map} +1 -1
  3. package/dist/chunks/{accordion-CVpg-FdJ.cjs.js → accordion-DvftRW7J.cjs.js} +2 -2
  4. package/dist/chunks/{accordion-CVpg-FdJ.cjs.js.map → accordion-DvftRW7J.cjs.js.map} +1 -1
  5. package/dist/chunks/{accordion.content-Cqet9SQ-.cjs.js → accordion.content-DBBMLq5x.cjs.js} +2 -2
  6. package/dist/chunks/{accordion.content-Cqet9SQ-.cjs.js.map → accordion.content-DBBMLq5x.cjs.js.map} +1 -1
  7. package/dist/chunks/{accordion.content-GGayEeqD.es.js → accordion.content-DR_1dtdK.es.js} +2 -2
  8. package/dist/chunks/{accordion.content-GGayEeqD.es.js.map → accordion.content-DR_1dtdK.es.js.map} +1 -1
  9. package/dist/chunks/{alert-pPmN9CXZ.cjs.js → alert-D5SDMEKA.cjs.js} +2 -2
  10. package/dist/chunks/{alert-pPmN9CXZ.cjs.js.map → alert-D5SDMEKA.cjs.js.map} +1 -1
  11. package/dist/chunks/{alert-DCgWOaY2.es.js → alert-WiLa3ap4.es.js} +2 -2
  12. package/dist/chunks/{alert-DCgWOaY2.es.js.map → alert-WiLa3ap4.es.js.map} +1 -1
  13. package/dist/chunks/{button-BR4fvcmi.cjs.js → button-Bz1hc0LL.cjs.js} +2 -2
  14. package/dist/chunks/{button-BR4fvcmi.cjs.js.map → button-Bz1hc0LL.cjs.js.map} +1 -1
  15. package/dist/chunks/{button-BEJnxXsL.es.js → button-CANeXX_D.es.js} +2 -2
  16. package/dist/chunks/{button-BEJnxXsL.es.js.map → button-CANeXX_D.es.js.map} +1 -1
  17. package/dist/chunks/{calendar-lSoXK-yt.es.js → calendar-Bnw0u0vz.es.js} +3 -3
  18. package/dist/chunks/{calendar-lSoXK-yt.es.js.map → calendar-Bnw0u0vz.es.js.map} +1 -1
  19. package/dist/chunks/{calendar-B01Vti5k.cjs.js → calendar-D0OrT88Y.cjs.js} +2 -2
  20. package/dist/chunks/{calendar-B01Vti5k.cjs.js.map → calendar-D0OrT88Y.cjs.js.map} +1 -1
  21. package/dist/chunks/{card-q5i119kB.es.js → card-BHw7lWYe.es.js} +2 -2
  22. package/dist/chunks/{card-q5i119kB.es.js.map → card-BHw7lWYe.es.js.map} +1 -1
  23. package/dist/chunks/{card-Bk3xHlo2.cjs.js → card-CgBcH7Zm.cjs.js} +2 -2
  24. package/dist/chunks/{card-Bk3xHlo2.cjs.js.map → card-CgBcH7Zm.cjs.js.map} +1 -1
  25. package/dist/chunks/{checkbox-BJANm94D.cjs.js → checkbox-BYBGaSV9.cjs.js} +2 -2
  26. package/dist/chunks/{checkbox-BJANm94D.cjs.js.map → checkbox-BYBGaSV9.cjs.js.map} +1 -1
  27. package/dist/chunks/{checkbox-CputcCVr.es.js → checkbox-UATxAVti.es.js} +2 -2
  28. package/dist/chunks/{checkbox-CputcCVr.es.js.map → checkbox-UATxAVti.es.js.map} +1 -1
  29. package/dist/chunks/{collapsible-motion-DvtUDuxb.es.js → collapsible-motion-BsyuKtxS.es.js} +2 -2
  30. package/dist/chunks/{collapsible-motion-DvtUDuxb.es.js.map → collapsible-motion-BsyuKtxS.es.js.map} +1 -1
  31. package/dist/chunks/{collapsible-motion-Biq0QGUr.cjs.js → collapsible-motion-Cj6ESwsR.cjs.js} +2 -2
  32. package/dist/chunks/{collapsible-motion-Biq0QGUr.cjs.js.map → collapsible-motion-Cj6ESwsR.cjs.js.map} +1 -1
  33. package/dist/chunks/{combobox-vjauyzlS.es.js → combobox-B30crY-T.es.js} +356 -344
  34. package/dist/chunks/combobox-B30crY-T.es.js.map +1 -0
  35. package/dist/chunks/combobox-D_L2EmTy.cjs.js +2 -0
  36. package/dist/chunks/combobox-D_L2EmTy.cjs.js.map +1 -0
  37. package/dist/chunks/{data-table-DA4SdIgU.es.js → data-table-B7orK0Y6.es.js} +953 -933
  38. package/dist/chunks/{data-table-DA4SdIgU.es.js.map → data-table-B7orK0Y6.es.js.map} +1 -1
  39. package/dist/chunks/data-table-Cg75JPdu.cjs.js +2 -0
  40. package/dist/chunks/{data-table-CBZLbe9h.cjs.js.map → data-table-Cg75JPdu.cjs.js.map} +1 -1
  41. package/dist/chunks/{date-input-DkYcGwBy.cjs.js → date-input-BL7owE4Q.cjs.js} +2 -2
  42. package/dist/chunks/{date-input-DkYcGwBy.cjs.js.map → date-input-BL7owE4Q.cjs.js.map} +1 -1
  43. package/dist/chunks/{date-input-Cd9q4qBj.es.js → date-input-Ba6r9wMb.es.js} +3 -3
  44. package/dist/chunks/{date-input-Cd9q4qBj.es.js.map → date-input-Ba6r9wMb.es.js.map} +1 -1
  45. package/dist/chunks/{date-picker-DQ5IZcRe.cjs.js → date-picker-Bm6DjFOx.cjs.js} +2 -2
  46. package/dist/chunks/{date-picker-DQ5IZcRe.cjs.js.map → date-picker-Bm6DjFOx.cjs.js.map} +1 -1
  47. package/dist/chunks/{date-picker-B8VVNXU3.es.js → date-picker-DwQ1WWNP.es.js} +7 -7
  48. package/dist/chunks/{date-picker-B8VVNXU3.es.js.map → date-picker-DwQ1WWNP.es.js.map} +1 -1
  49. package/dist/chunks/{date-range-picker-CO2HH0mY.cjs.js → date-range-picker-DaSUwkke.cjs.js} +2 -2
  50. package/dist/chunks/{date-range-picker-CO2HH0mY.cjs.js.map → date-range-picker-DaSUwkke.cjs.js.map} +1 -1
  51. package/dist/chunks/{date-range-picker-BnbKgO1E.es.js → date-range-picker-dw7c9idV.es.js} +7 -7
  52. package/dist/chunks/{date-range-picker-BnbKgO1E.es.js.map → date-range-picker-dw7c9idV.es.js.map} +1 -1
  53. package/dist/chunks/{date-range-picker-field-BuI6eLMY.es.js → date-range-picker-field-D-kCkHEF.es.js} +3 -3
  54. package/dist/chunks/{date-range-picker-field-BuI6eLMY.es.js.map → date-range-picker-field-D-kCkHEF.es.js.map} +1 -1
  55. package/dist/chunks/{date-range-picker-field-DcIo1YzI.cjs.js → date-range-picker-field-J2b1-A1l.cjs.js} +2 -2
  56. package/dist/chunks/{date-range-picker-field-DcIo1YzI.cjs.js.map → date-range-picker-field-J2b1-A1l.cjs.js.map} +1 -1
  57. package/dist/chunks/{dialog-gyrFT8w0.cjs.js → dialog-ByHd6RlA.cjs.js} +2 -2
  58. package/dist/chunks/{dialog-gyrFT8w0.cjs.js.map → dialog-ByHd6RlA.cjs.js.map} +1 -1
  59. package/dist/chunks/{dialog-DuS3dXVi.es.js → dialog-vnnSNnUC.es.js} +3 -3
  60. package/dist/chunks/{dialog-DuS3dXVi.es.js.map → dialog-vnnSNnUC.es.js.map} +1 -1
  61. package/dist/chunks/{draggable-list-fvTG-VYt.cjs.js → draggable-list-CGpLzk-D.cjs.js} +2 -2
  62. package/dist/chunks/{draggable-list-fvTG-VYt.cjs.js.map → draggable-list-CGpLzk-D.cjs.js.map} +1 -1
  63. package/dist/chunks/{draggable-list-z7a7tu_F.es.js → draggable-list-DR-559Qk.es.js} +5 -5
  64. package/dist/chunks/{draggable-list-z7a7tu_F.es.js.map → draggable-list-DR-559Qk.es.js.map} +1 -1
  65. package/dist/chunks/{drawer-BPcEUbUt.es.js → drawer-CasegOAE.es.js} +49 -49
  66. package/dist/chunks/drawer-CasegOAE.es.js.map +1 -0
  67. package/dist/chunks/drawer-CmxHDgtW.cjs.js +2 -0
  68. package/dist/chunks/drawer-CmxHDgtW.cjs.js.map +1 -0
  69. package/dist/chunks/{extract-style-props-B4hqila-.cjs.js → extract-style-props-BvvBKXOu.cjs.js} +2 -2
  70. package/dist/chunks/{extract-style-props-B4hqila-.cjs.js.map → extract-style-props-BvvBKXOu.cjs.js.map} +1 -1
  71. package/dist/chunks/{extract-style-props-BdibuNZ7.es.js → extract-style-props-CM4QZGaE.es.js} +2 -2
  72. package/dist/chunks/{extract-style-props-BdibuNZ7.es.js.map → extract-style-props-CM4QZGaE.es.js.map} +1 -1
  73. package/dist/chunks/{form-field-FdRNl2bZ.cjs.js → form-field-52--hhlj.cjs.js} +2 -2
  74. package/dist/chunks/{form-field-FdRNl2bZ.cjs.js.map → form-field-52--hhlj.cjs.js.map} +1 -1
  75. package/dist/chunks/{form-field-BfDU18h3.es.js → form-field-DCWDyNJx.es.js} +2 -2
  76. package/dist/chunks/{form-field-BfDU18h3.es.js.map → form-field-DCWDyNJx.es.js.map} +1 -1
  77. package/dist/chunks/{icon-button-CeB8_Yyr.cjs.js → icon-button-5pYAEokc.cjs.js} +2 -2
  78. package/dist/chunks/{icon-button-CeB8_Yyr.cjs.js.map → icon-button-5pYAEokc.cjs.js.map} +1 -1
  79. package/dist/chunks/{icon-button-CosIm3oY.es.js → icon-button-DhHKxd27.es.js} +2 -2
  80. package/dist/chunks/{icon-button-CosIm3oY.es.js.map → icon-button-DhHKxd27.es.js.map} +1 -1
  81. package/dist/chunks/{icon-toggle-button-C4Tnlt4t.cjs.js → icon-toggle-button-BsQzSrKe.cjs.js} +2 -2
  82. package/dist/chunks/{icon-toggle-button-C4Tnlt4t.cjs.js.map → icon-toggle-button-BsQzSrKe.cjs.js.map} +1 -1
  83. package/dist/chunks/{icon-toggle-button-8fX8JAXp.es.js → icon-toggle-button-C7HZUXh5.es.js} +2 -2
  84. package/dist/chunks/{icon-toggle-button-8fX8JAXp.es.js.map → icon-toggle-button-C7HZUXh5.es.js.map} +1 -1
  85. package/dist/chunks/{index-CVXB9mwf.cjs.js → index-CBRmb4jF.cjs.js} +2 -2
  86. package/dist/chunks/index-CBRmb4jF.cjs.js.map +1 -0
  87. package/dist/chunks/{index-C2qW4ynb.es.js → index-D3KlpJA5.es.js} +3 -3
  88. package/dist/chunks/index-D3KlpJA5.es.js.map +1 -0
  89. package/dist/chunks/{localized-field-D78l88ux.cjs.js → localized-field-BJTWKclB.cjs.js} +2 -2
  90. package/dist/chunks/{localized-field-D78l88ux.cjs.js.map → localized-field-BJTWKclB.cjs.js.map} +1 -1
  91. package/dist/chunks/{localized-field-DdeHzXdh.es.js → localized-field-CHXN7Zf1.es.js} +8 -8
  92. package/dist/chunks/{localized-field-DdeHzXdh.es.js.map → localized-field-CHXN7Zf1.es.js.map} +1 -1
  93. package/dist/chunks/{menu-Dno8yFDE.cjs.js → menu-Cu7gIVGQ.cjs.js} +2 -2
  94. package/dist/chunks/{menu-Dno8yFDE.cjs.js.map → menu-Cu7gIVGQ.cjs.js.map} +1 -1
  95. package/dist/chunks/{menu-Zlnps1eW.es.js → menu-SxqgiwJf.es.js} +2 -2
  96. package/dist/chunks/{menu-Zlnps1eW.es.js.map → menu-SxqgiwJf.es.js.map} +1 -1
  97. package/dist/chunks/{money-input-D65vrUj4.es.js → money-input-B5kFhLR0.es.js} +15 -15
  98. package/dist/chunks/{money-input-D65vrUj4.es.js.map → money-input-B5kFhLR0.es.js.map} +1 -1
  99. package/dist/chunks/{money-input-C9eVmgeL.cjs.js → money-input-CBKb1D73.cjs.js} +2 -2
  100. package/dist/chunks/{money-input-C9eVmgeL.cjs.js.map → money-input-CBKb1D73.cjs.js.map} +1 -1
  101. package/dist/chunks/{money-input-field-CSnaaDk-.es.js → money-input-field-0vXOOTvx.es.js} +3 -3
  102. package/dist/chunks/{money-input-field-CSnaaDk-.es.js.map → money-input-field-0vXOOTvx.es.js.map} +1 -1
  103. package/dist/chunks/{money-input-field-BGZ_9HKh.cjs.js → money-input-field-DjpKPCGo.cjs.js} +2 -2
  104. package/dist/chunks/{money-input-field-BGZ_9HKh.cjs.js.map → money-input-field-DjpKPCGo.cjs.js.map} +1 -1
  105. package/dist/chunks/{multiline-text-input-CULLuZBp.cjs.js → multiline-text-input-DN9yF7Di.cjs.js} +2 -2
  106. package/dist/chunks/{multiline-text-input-CULLuZBp.cjs.js.map → multiline-text-input-DN9yF7Di.cjs.js.map} +1 -1
  107. package/dist/chunks/{multiline-text-input-CrDTYrM3.es.js → multiline-text-input-DkruVK6m.es.js} +3 -3
  108. package/dist/chunks/{multiline-text-input-CrDTYrM3.es.js.map → multiline-text-input-DkruVK6m.es.js.map} +1 -1
  109. package/dist/chunks/{multiline-text-input-field-BX-w2v1Y.cjs.js → multiline-text-input-field-QLmo_I6Q.cjs.js} +2 -2
  110. package/dist/chunks/{multiline-text-input-field-BX-w2v1Y.cjs.js.map → multiline-text-input-field-QLmo_I6Q.cjs.js.map} +1 -1
  111. package/dist/chunks/{multiline-text-input-field-C6UTl_c8.es.js → multiline-text-input-field-ipwTTNg6.es.js} +3 -3
  112. package/dist/chunks/{multiline-text-input-field-C6UTl_c8.es.js.map → multiline-text-input-field-ipwTTNg6.es.js.map} +1 -1
  113. package/dist/chunks/{nimbus-provider-S02SpkpM.es.js → nimbus-provider-4H3HucGg.es.js} +2 -2
  114. package/dist/chunks/{nimbus-provider-S02SpkpM.es.js.map → nimbus-provider-4H3HucGg.es.js.map} +1 -1
  115. package/dist/chunks/{nimbus-provider-Dnu5ohMR.cjs.js → nimbus-provider-CbD64J_V.cjs.js} +2 -2
  116. package/dist/chunks/{nimbus-provider-Dnu5ohMR.cjs.js.map → nimbus-provider-CbD64J_V.cjs.js.map} +1 -1
  117. package/dist/chunks/{number-input-CR1hdy-B.cjs.js → number-input-B29DJ2_U.cjs.js} +2 -2
  118. package/dist/chunks/{number-input-CR1hdy-B.cjs.js.map → number-input-B29DJ2_U.cjs.js.map} +1 -1
  119. package/dist/chunks/{number-input-Dp13Mn-8.es.js → number-input-BVTqEzzS.es.js} +3 -3
  120. package/dist/chunks/{number-input-Dp13Mn-8.es.js.map → number-input-BVTqEzzS.es.js.map} +1 -1
  121. package/dist/chunks/{number-input-field-BDNpAP6t.cjs.js → number-input-field-DHBy_GKG.cjs.js} +2 -2
  122. package/dist/chunks/{number-input-field-BDNpAP6t.cjs.js.map → number-input-field-DHBy_GKG.cjs.js.map} +1 -1
  123. package/dist/chunks/{number-input-field-C90uFO4e.es.js → number-input-field-DenXeCQQ.es.js} +3 -3
  124. package/dist/chunks/{number-input-field-C90uFO4e.es.js.map → number-input-field-DenXeCQQ.es.js.map} +1 -1
  125. package/dist/chunks/{pagination-BlrGdyD5.es.js → pagination-BjUXs0hd.es.js} +4 -4
  126. package/dist/chunks/{pagination-BlrGdyD5.es.js.map → pagination-BjUXs0hd.es.js.map} +1 -1
  127. package/dist/chunks/{pagination-BIxlGft7.cjs.js → pagination-D8Tn2HGh.cjs.js} +2 -2
  128. package/dist/chunks/{pagination-BIxlGft7.cjs.js.map → pagination-D8Tn2HGh.cjs.js.map} +1 -1
  129. package/dist/chunks/{password-input-BVbQ42NG.cjs.js → password-input-DQM-caak.cjs.js} +2 -2
  130. package/dist/chunks/{password-input-BVbQ42NG.cjs.js.map → password-input-DQM-caak.cjs.js.map} +1 -1
  131. package/dist/chunks/{password-input-field-XXaNUALk.es.js → password-input-field-CNLpabCL.es.js} +3 -3
  132. package/dist/chunks/{password-input-field-XXaNUALk.es.js.map → password-input-field-CNLpabCL.es.js.map} +1 -1
  133. package/dist/chunks/{password-input-field-B5lWzWAQ.cjs.js → password-input-field-CgQEW15R.cjs.js} +2 -2
  134. package/dist/chunks/{password-input-field-B5lWzWAQ.cjs.js.map → password-input-field-CgQEW15R.cjs.js.map} +1 -1
  135. package/dist/chunks/{password-input-8bkpGOIX.es.js → password-input-vu3kFdzW.es.js} +3 -3
  136. package/dist/chunks/{password-input-8bkpGOIX.es.js.map → password-input-vu3kFdzW.es.js.map} +1 -1
  137. package/dist/chunks/{progress-bar-dRKyuT1-.cjs.js → progress-bar-CMRmoNou.cjs.js} +2 -2
  138. package/dist/chunks/{progress-bar-dRKyuT1-.cjs.js.map → progress-bar-CMRmoNou.cjs.js.map} +1 -1
  139. package/dist/chunks/{progress-bar-C2ZnGdLv.es.js → progress-bar-D99U1mF3.es.js} +2 -2
  140. package/dist/chunks/{progress-bar-C2ZnGdLv.es.js.map → progress-bar-D99U1mF3.es.js.map} +1 -1
  141. package/dist/chunks/{radio-input-BecbxXcF.cjs.js → radio-input-B91hQHjX.cjs.js} +2 -2
  142. package/dist/chunks/{radio-input-BecbxXcF.cjs.js.map → radio-input-B91hQHjX.cjs.js.map} +1 -1
  143. package/dist/chunks/{radio-input-DV-hhL4S.es.js → radio-input-S4OwAttR.es.js} +3 -3
  144. package/dist/chunks/{radio-input-DV-hhL4S.es.js.map → radio-input-S4OwAttR.es.js.map} +1 -1
  145. package/dist/chunks/{range-calendar-CEIaa08T.es.js → range-calendar-qoiJRxsH.es.js} +4 -4
  146. package/dist/chunks/{range-calendar-CEIaa08T.es.js.map → range-calendar-qoiJRxsH.es.js.map} +1 -1
  147. package/dist/chunks/{range-calendar-Dq5Gtsb6.cjs.js → range-calendar-tLrCZyTQ.cjs.js} +2 -2
  148. package/dist/chunks/{range-calendar-Dq5Gtsb6.cjs.js.map → range-calendar-tLrCZyTQ.cjs.js.map} +1 -1
  149. package/dist/chunks/{rich-text-input-CRGUa5d2.es.js → rich-text-input-COjV3y9x.es.js} +8 -8
  150. package/dist/chunks/{rich-text-input-CRGUa5d2.es.js.map → rich-text-input-COjV3y9x.es.js.map} +1 -1
  151. package/dist/chunks/{rich-text-input-Dml5F7pU.cjs.js → rich-text-input-Cx9u2DDm.cjs.js} +2 -2
  152. package/dist/chunks/{rich-text-input-Dml5F7pU.cjs.js.map → rich-text-input-Cx9u2DDm.cjs.js.map} +1 -1
  153. package/dist/chunks/scoped-search-input-DYOcOZ0t.cjs.js +2 -0
  154. package/dist/chunks/scoped-search-input-DYOcOZ0t.cjs.js.map +1 -0
  155. package/dist/chunks/scoped-search-input-Qf2F3cu-.es.js +151 -0
  156. package/dist/chunks/scoped-search-input-Qf2F3cu-.es.js.map +1 -0
  157. package/dist/chunks/{search-input-BDUJ48BC.es.js → search-input-Ba7KSi4m.es.js} +4 -4
  158. package/dist/chunks/{search-input-BDUJ48BC.es.js.map → search-input-Ba7KSi4m.es.js.map} +1 -1
  159. package/dist/chunks/{search-input-BNXlpYtP.cjs.js → search-input-DrTdsAJB.cjs.js} +2 -2
  160. package/dist/chunks/{search-input-BNXlpYtP.cjs.js.map → search-input-DrTdsAJB.cjs.js.map} +1 -1
  161. package/dist/chunks/{search-input-field-v60x1oiw.cjs.js → search-input-field-Dan6FtWD.cjs.js} +2 -2
  162. package/dist/chunks/{search-input-field-v60x1oiw.cjs.js.map → search-input-field-Dan6FtWD.cjs.js.map} +1 -1
  163. package/dist/chunks/{search-input-field-CEemw2P1.es.js → search-input-field-G080Ti8W.es.js} +3 -3
  164. package/dist/chunks/{search-input-field-CEemw2P1.es.js.map → search-input-field-G080Ti8W.es.js.map} +1 -1
  165. package/dist/chunks/{select-D9yYDW0d.es.js → select-B3w10lhg.es.js} +4 -4
  166. package/dist/chunks/{select-D9yYDW0d.es.js.map → select-B3w10lhg.es.js.map} +1 -1
  167. package/dist/chunks/{select-Dq_6o0BB.cjs.js → select-DzHoPh1S.cjs.js} +2 -2
  168. package/dist/chunks/{select-Dq_6o0BB.cjs.js.map → select-DzHoPh1S.cjs.js.map} +1 -1
  169. package/dist/chunks/{separator-u_4por07.cjs.js → separator-D0uGdP2M.cjs.js} +2 -2
  170. package/dist/chunks/{separator-u_4por07.cjs.js.map → separator-D0uGdP2M.cjs.js.map} +1 -1
  171. package/dist/chunks/{separator-BJ9k_D4l.es.js → separator-DX_ZJMkp.es.js} +3 -3
  172. package/dist/chunks/{separator-BJ9k_D4l.es.js.map → separator-DX_ZJMkp.es.js.map} +1 -1
  173. package/dist/chunks/{split-button-C94SY3qF.es.js → split-button-BGDUOZcq.es.js} +4 -4
  174. package/dist/chunks/{split-button-C94SY3qF.es.js.map → split-button-BGDUOZcq.es.js.map} +1 -1
  175. package/dist/chunks/{split-button-B4gVhpP9.cjs.js → split-button-Cu7MwPgo.cjs.js} +2 -2
  176. package/dist/chunks/{split-button-B4gVhpP9.cjs.js.map → split-button-Cu7MwPgo.cjs.js.map} +1 -1
  177. package/dist/chunks/{switch-Nn1Fbk5O.es.js → switch-GD8BjCPZ.es.js} +3 -3
  178. package/dist/chunks/{switch-Nn1Fbk5O.es.js.map → switch-GD8BjCPZ.es.js.map} +1 -1
  179. package/dist/chunks/{switch-CsiG41ZR.cjs.js → switch-dDLFRsag.cjs.js} +2 -2
  180. package/dist/chunks/{switch-CsiG41ZR.cjs.js.map → switch-dDLFRsag.cjs.js.map} +1 -1
  181. package/dist/chunks/{tabs-D0OPeQ_J.es.js → tabs-Dh_AK8jc.es.js} +38 -33
  182. package/dist/chunks/{tabs-D0OPeQ_J.es.js.map → tabs-Dh_AK8jc.es.js.map} +1 -1
  183. package/dist/chunks/tabs-Dxwwd4jH.cjs.js +2 -0
  184. package/dist/chunks/{tabs-iV08OTqG.cjs.js.map → tabs-Dxwwd4jH.cjs.js.map} +1 -1
  185. package/dist/chunks/{tag-group-BE8d6xcP.es.js → tag-group-CMfyCIc3.es.js} +2 -2
  186. package/dist/chunks/{tag-group-BE8d6xcP.es.js.map → tag-group-CMfyCIc3.es.js.map} +1 -1
  187. package/dist/chunks/{tag-group-BI8_32rM.cjs.js → tag-group-rbUwxsaP.cjs.js} +2 -2
  188. package/dist/chunks/{tag-group-BI8_32rM.cjs.js.map → tag-group-rbUwxsaP.cjs.js.map} +1 -1
  189. package/dist/chunks/{text-input-CCiZeQad.es.js → text-input-UaixbZjE.es.js} +3 -3
  190. package/dist/chunks/{text-input-CCiZeQad.es.js.map → text-input-UaixbZjE.es.js.map} +1 -1
  191. package/dist/chunks/{text-input-field-Cmht3hDK.cjs.js → text-input-field-C_Ykb6V3.cjs.js} +2 -2
  192. package/dist/chunks/{text-input-field-Cmht3hDK.cjs.js.map → text-input-field-C_Ykb6V3.cjs.js.map} +1 -1
  193. package/dist/chunks/{text-input-field-6Cj35cYL.es.js → text-input-field-ChGQsEAJ.es.js} +3 -3
  194. package/dist/chunks/{text-input-field-6Cj35cYL.es.js.map → text-input-field-ChGQsEAJ.es.js.map} +1 -1
  195. package/dist/chunks/{text-input-BlxK2Naj.cjs.js → text-input-n7jUFat6.cjs.js} +2 -2
  196. package/dist/chunks/{text-input-BlxK2Naj.cjs.js.map → text-input-n7jUFat6.cjs.js.map} +1 -1
  197. package/dist/chunks/{time-input-9Q5vV4UD.cjs.js → time-input-G64QnJLm.cjs.js} +2 -2
  198. package/dist/chunks/{time-input-9Q5vV4UD.cjs.js.map → time-input-G64QnJLm.cjs.js.map} +1 -1
  199. package/dist/chunks/{time-input-CCuIFoY2.es.js → time-input-T4jAE9kM.es.js} +3 -3
  200. package/dist/chunks/{time-input-CCuIFoY2.es.js.map → time-input-T4jAE9kM.es.js.map} +1 -1
  201. package/dist/chunks/{toggle-button-UcXy5q2C.es.js → toggle-button-J0Vys1xC.es.js} +3 -3
  202. package/dist/chunks/{toggle-button-UcXy5q2C.es.js.map → toggle-button-J0Vys1xC.es.js.map} +1 -1
  203. package/dist/chunks/{toggle-button-L7i1XaWg.cjs.js → toggle-button-aX7Gr-Ib.cjs.js} +2 -2
  204. package/dist/chunks/{toggle-button-L7i1XaWg.cjs.js.map → toggle-button-aX7Gr-Ib.cjs.js.map} +1 -1
  205. package/dist/chunks/{toolbar-D4fLFiSb.cjs.js → toolbar-Bw9mLuBU.cjs.js} +2 -2
  206. package/dist/chunks/{toolbar-D4fLFiSb.cjs.js.map → toolbar-Bw9mLuBU.cjs.js.map} +1 -1
  207. package/dist/chunks/{toolbar-C7-6gqba.es.js → toolbar-QZSD0kko.es.js} +3 -3
  208. package/dist/chunks/{toolbar-C7-6gqba.es.js.map → toolbar-QZSD0kko.es.js.map} +1 -1
  209. package/dist/components/accordion.cjs +1 -1
  210. package/dist/components/accordion.es.js +2 -2
  211. package/dist/components/alert.cjs +1 -1
  212. package/dist/components/alert.es.js +1 -1
  213. package/dist/components/button.cjs +1 -1
  214. package/dist/components/button.es.js +1 -1
  215. package/dist/components/calendar.cjs +1 -1
  216. package/dist/components/calendar.es.js +1 -1
  217. package/dist/components/card.cjs +1 -1
  218. package/dist/components/card.es.js +1 -1
  219. package/dist/components/checkbox.cjs +1 -1
  220. package/dist/components/checkbox.es.js +1 -1
  221. package/dist/components/collapsible-motion.cjs +1 -1
  222. package/dist/components/collapsible-motion.es.js +1 -1
  223. package/dist/components/combobox.cjs +1 -1
  224. package/dist/components/combobox.es.js +1 -1
  225. package/dist/components/components.cjs +1 -1
  226. package/dist/components/components.es.js +1 -1
  227. package/dist/components/data-table/components/data-table.body.d.ts +1 -1
  228. package/dist/components/data-table/components/data-table.header.d.ts +1 -1
  229. package/dist/components/data-table/components/data-table.table.d.ts +1 -1
  230. package/dist/components/data-table/data-table.d.ts +3 -3
  231. package/dist/components/data-table/data-table.i18n.d.ts +5 -0
  232. package/dist/components/data-table/data-table.messages.d.ts +1 -1
  233. package/dist/components/data-table/intl/de.d.ts +1 -0
  234. package/dist/components/data-table/intl/en.d.ts +1 -0
  235. package/dist/components/data-table/intl/es.d.ts +1 -0
  236. package/dist/components/data-table/intl/fr-FR.d.ts +1 -0
  237. package/dist/components/data-table/intl/pt-BR.d.ts +1 -0
  238. package/dist/components/data-table.cjs +1 -1
  239. package/dist/components/data-table.es.js +1 -1
  240. package/dist/components/date-input.cjs +1 -1
  241. package/dist/components/date-input.es.js +1 -1
  242. package/dist/components/date-picker.cjs +1 -1
  243. package/dist/components/date-picker.es.js +1 -1
  244. package/dist/components/date-range-picker-field.cjs +1 -1
  245. package/dist/components/date-range-picker-field.es.js +1 -1
  246. package/dist/components/date-range-picker.cjs +1 -1
  247. package/dist/components/date-range-picker.es.js +1 -1
  248. package/dist/components/dialog.cjs +1 -1
  249. package/dist/components/dialog.es.js +1 -1
  250. package/dist/components/draggable-list.cjs +1 -1
  251. package/dist/components/draggable-list.es.js +1 -1
  252. package/dist/components/drawer.cjs +1 -1
  253. package/dist/components/drawer.es.js +1 -1
  254. package/dist/components/fields.cjs +1 -1
  255. package/dist/components/fields.es.js +7 -7
  256. package/dist/components/form-field.cjs +1 -1
  257. package/dist/components/form-field.es.js +1 -1
  258. package/dist/components/icon-button.cjs +1 -1
  259. package/dist/components/icon-button.es.js +1 -1
  260. package/dist/components/icon-toggle-button.cjs +1 -1
  261. package/dist/components/icon-toggle-button.es.js +1 -1
  262. package/dist/components/localized-field.cjs +1 -1
  263. package/dist/components/localized-field.es.js +1 -1
  264. package/dist/components/money-input-field.cjs +1 -1
  265. package/dist/components/money-input-field.es.js +1 -1
  266. package/dist/components/money-input.cjs +1 -1
  267. package/dist/components/money-input.es.js +1 -1
  268. package/dist/components/multiline-text-input-field.cjs +1 -1
  269. package/dist/components/multiline-text-input-field.es.js +1 -1
  270. package/dist/components/multiline-text-input.cjs +1 -1
  271. package/dist/components/multiline-text-input.es.js +1 -1
  272. package/dist/components/nimbus-provider.cjs +1 -1
  273. package/dist/components/nimbus-provider.es.js +1 -1
  274. package/dist/components/number-input-field.cjs +1 -1
  275. package/dist/components/number-input-field.es.js +1 -1
  276. package/dist/components/number-input.cjs +1 -1
  277. package/dist/components/number-input.es.js +1 -1
  278. package/dist/components/pagination.cjs +1 -1
  279. package/dist/components/pagination.es.js +1 -1
  280. package/dist/components/password-input-field.cjs +1 -1
  281. package/dist/components/password-input-field.es.js +1 -1
  282. package/dist/components/password-input.cjs +1 -1
  283. package/dist/components/password-input.es.js +1 -1
  284. package/dist/components/patterns.cjs +1 -1
  285. package/dist/components/patterns.es.js +7 -7
  286. package/dist/components/progress-bar.cjs +1 -1
  287. package/dist/components/progress-bar.es.js +1 -1
  288. package/dist/components/radio-input.cjs +1 -1
  289. package/dist/components/radio-input.es.js +1 -1
  290. package/dist/components/range-calendar.cjs +1 -1
  291. package/dist/components/range-calendar.es.js +1 -1
  292. package/dist/components/rich-text-input.cjs +1 -1
  293. package/dist/components/rich-text-input.es.js +1 -1
  294. package/dist/components/scoped-search-input.cjs +1 -1
  295. package/dist/components/scoped-search-input.es.js +1 -1
  296. package/dist/components/search-input-field.cjs +1 -1
  297. package/dist/components/search-input-field.es.js +1 -1
  298. package/dist/components/search-input.cjs +1 -1
  299. package/dist/components/search-input.es.js +1 -1
  300. package/dist/components/select.cjs +1 -1
  301. package/dist/components/select.es.js +1 -1
  302. package/dist/components/separator.cjs +1 -1
  303. package/dist/components/separator.es.js +1 -1
  304. package/dist/components/split-button.cjs +1 -1
  305. package/dist/components/split-button.es.js +1 -1
  306. package/dist/components/switch.cjs +1 -1
  307. package/dist/components/switch.es.js +1 -1
  308. package/dist/components/tabs/components/tabs.root.d.ts +1 -1
  309. package/dist/components/tabs/tabs.d.ts +1 -1
  310. package/dist/components/tabs/tabs.types.d.ts +5 -0
  311. package/dist/components/tabs.cjs +1 -1
  312. package/dist/components/tabs.es.js +1 -1
  313. package/dist/components/tag-group.cjs +1 -1
  314. package/dist/components/tag-group.es.js +1 -1
  315. package/dist/components/text-input-field.cjs +1 -1
  316. package/dist/components/text-input-field.es.js +1 -1
  317. package/dist/components/text-input.cjs +1 -1
  318. package/dist/components/text-input.es.js +1 -1
  319. package/dist/components/time-input.cjs +1 -1
  320. package/dist/components/time-input.es.js +1 -1
  321. package/dist/components/toggle-button.cjs +1 -1
  322. package/dist/components/toggle-button.es.js +1 -1
  323. package/dist/components/toolbar.cjs +1 -1
  324. package/dist/components/toolbar.es.js +1 -1
  325. package/dist/index.cjs +1 -1
  326. package/dist/index.es.js +53 -53
  327. package/dist/setup-jsdom-polyfills.cjs +1 -1
  328. package/dist/setup-jsdom-polyfills.cjs.map +1 -1
  329. package/dist/setup-jsdom-polyfills.es.js +17 -0
  330. package/dist/setup-jsdom-polyfills.es.js.map +1 -1
  331. package/package.json +5 -5
  332. package/dist/chunks/combobox-B7ck7gxL.cjs.js +0 -2
  333. package/dist/chunks/combobox-B7ck7gxL.cjs.js.map +0 -1
  334. package/dist/chunks/combobox-vjauyzlS.es.js.map +0 -1
  335. package/dist/chunks/data-table-CBZLbe9h.cjs.js +0 -2
  336. package/dist/chunks/drawer-BPcEUbUt.es.js.map +0 -1
  337. package/dist/chunks/drawer-DbSJSCl_.cjs.js +0 -2
  338. package/dist/chunks/drawer-DbSJSCl_.cjs.js.map +0 -1
  339. package/dist/chunks/index-C2qW4ynb.es.js.map +0 -1
  340. package/dist/chunks/index-CVXB9mwf.cjs.js.map +0 -1
  341. package/dist/chunks/scoped-search-input-CSpFefUJ.es.js +0 -147
  342. package/dist/chunks/scoped-search-input-CSpFefUJ.es.js.map +0 -1
  343. package/dist/chunks/scoped-search-input-DKCK7idN.cjs.js +0 -2
  344. package/dist/chunks/scoped-search-input-DKCK7idN.cjs.js.map +0 -1
  345. package/dist/chunks/tabs-iV08OTqG.cjs.js +0 -2
@@ -1,2 +1,2 @@
1
- "use strict";const s=require("react/jsx-runtime"),F=require("./normalize-messages-CaDzkuUm.cjs.js"),E=require("./money-input-C9eVmgeL.cjs.js"),v=require("./form-field-FdRNl2bZ.cjs.js"),_=require("react"),ne=require("./Dialog-CSr6lHSd.cjs.js"),xe=require("./CollectionBuilder-DjRx57vm.cjs.js"),I=require("@commercetools/nimbus-icons"),he=require("./popover-Dhg--8YC.cjs.js"),pe=require("@chakra-ui/react"),N=require("./icon-RyFjTAmU.cjs.js"),Fe=require("./rich-text-input-Dml5F7pU.cjs.js"),fe=require("./multiline-text-input-CULLuZBp.cjs.js"),be=require("./text-input-BlxK2Naj.cjs.js"),re=require("./mergeProps-CxnHrnow.cjs.js"),je=require("./useField-lK6K_h1G.cjs.js"),oe=require("./field-errors-aqrV93vp.cjs.js"),D=require("./stack-CIN13EDn.cjs.js"),Le=require("./icon-button-CeB8_Yyr.cjs.js"),te=require("./box-CWni3A32.cjs.js"),ve=require("./button-BR4fvcmi.cjs.js"),Ie={hideCurrencies:"Hide all currencies",hideLanguages:"Hide all languages",infoBoxTriggerAriaLabel:"more info",missingRequiredField:"This field is required. Provide at least one value.",showCurrencies:"Show all currencies",showLanguages:"Show all languages"},Me={hideCurrencies:"Alle Währungen ausblenden",hideLanguages:"Alle Sprachen ausblenden",infoBoxTriggerAriaLabel:"Weitere Informationen",missingRequiredField:"Dies ist ein Pflichtfeld. Bitte geben Sie mindestens einen Wert an.",showCurrencies:"Alle Währungen anzeigen",showLanguages:"Alle Sprachen anzeigen"},qe={hideCurrencies:"Ocultar todas las monedas",hideLanguages:"Ocultar todas las monedas",infoBoxTriggerAriaLabel:"más información",missingRequiredField:"Este valor es necesario. Proporciona al menos un valor.",showCurrencies:"Mostrar todas las monedas",showLanguages:"Mostrar todos los idiomas"},ze={hideCurrencies:"Masquer toutes les devises",hideLanguages:"Masquer toutes les langues",infoBoxTriggerAriaLabel:"Plus d'informations",missingRequiredField:"Ce champ est requis. Indiquez au moins une valeur.",showCurrencies:"Afficher toutes les devises",showLanguages:"Afficher toutes les langues"},Ce={hideCurrencies:"Ocultar todas as ocorrências",hideLanguages:"Ocultar todos os idiomas",infoBoxTriggerAriaLabel:"mais informações",missingRequiredField:"Este campo é obrigatório. Forneça pelo menos um valor.",showCurrencies:"Mostrar todas as ocorrências",showLanguages:"Mostrar todos os idiomas"},ie={en:F.normalizeMessages(Ie),de:F.normalizeMessages(Me),es:F.normalizeMessages(qe),"fr-FR":F.normalizeMessages(ze),"pt-BR":F.normalizeMessages(Ce)},{withProvider:$e,withContext:m}=pe.createSlotRecipeContext({key:"localizedField"}),Se=$e("fieldset","root"),we=m("legend","label"),Ee=m("div","infoDialog"),ke=m("div","fieldsContainer"),Te=m("div","description"),Pe=m("div","error"),ye=m("div","toggleButtonContainer"),Ae=m("div","localeFieldRoot"),Be=m("div","localeFieldLabel"),Re=m("div","localeFieldInput"),He=()=>{const e=F.useLocalizedStringFormatter(ie);return s.jsx(v.FormField.Error,{children:e.format("missingRequiredField")})},f=(e,n)=>e&&n?`${e}.${n}`:void 0,W=e=>e.split("-")[0],Ve=(e,n)=>{const r=W(e),o=n.filter(l=>W(l)===r);return{unrelated:n.filter(l=>W(l)!==r),related:o}},De=(e,n)=>{const{related:r,unrelated:o}=Ve(e,n.filter(t=>t!==e));return[e,...r.sort(),...o.sort()]},We=(e,n)=>{const r=n.filter(o=>o!==e);return[e,...r.sort()]},_e=(e,n)=>e&&Object.keys(e).length>0&&n?Object.keys(e).some(r=>r!==n):!1,Ne=(e,n)=>Array.from(new Set([...e,...Object.keys(n)])).reduce((o,t)=>({...o,[t]:n?.[t]||""}),{}),Oe=e=>e?Object.values(e).every(n=>!n||n?.trim().length===0):!0,Ue=e=>(typeof e!="object"&&console.warn("Nimbus Localized Field - Warning: omitEmptyTranslations must be called with an object"),Object.entries(e).reduce((n,[r,o])=>o&&o.trim().length>0?{...n,[r]:o}:n,{})),Je=e=>e?Object.values(e).some(Boolean):!1;function Qe(e){return e}const Xe=(e,n)=>Object.values(e).map(r=>E.MoneyInput.convertToMoneyValue(r,n)),Ye=(e=[],n)=>e.reduce((r,o)=>{const t=E.MoneyInput.parseMoneyValue(o,n);return{...r,[t.currencyCode]:t}},{}),Ze=(e,n)=>Object.keys(e).filter(o=>E.MoneyInput.isHighPrecision(e[o],n)),Ge=e=>Object.keys(e).filter(r=>E.MoneyInput.isEmpty(e[r])),Ke=({type:e,size:n,localeOrCurrency:r,id:o,name:t,inputValue:l,description:M,warning:x,error:h,onChange:b,onBlur:q,onFocus:z,isRequired:C,isReadOnly:p,isDisabled:j,isInvalid:L,touched:a,...y})=>{let i;switch(e){case"text":default:i=be.TextInput;break;case"multiLine":i=fe.MultilineTextInput;break;case"money":i=E.MoneyInput;break;case"richText":i=Fe.RichTextInput;break}const $=e==="money"?l||{amount:"",currencyCode:r}:l||"",T=_.useCallback(d=>{const A={target:typeof d=="object"?{id:d.target.id,name:d.target.name,locale:void 0,currency:r,value:d.target.value}:{id:o,name:t,locale:r,currency:void 0,value:d}};b(A)},[o,t,r,b]);return s.jsx(Ae,{asChild:!0,children:s.jsxs(v.FormField.Root,{isDisabled:j,isReadOnly:p,isInvalid:(L||!!h)&&a,direction:"row",size:n,id:o,children:[s.jsx(Be,{display:e==="money"?"none":void 0,...j&&{"data-disabled":j},asChild:!0,children:s.jsx(v.FormField.Label,{children:r.toLocaleUpperCase()})}),s.jsx(v.FormField.Input,{children:s.jsx(Re,{"aria-required":C,asChild:!0,children:s.jsx(i,{...y,size:n,value:$,onChange:T,onBlur:d=>q?.(d,r),onFocus:d=>z?.(d,r),isRequired:C,isDisabled:j,isReadOnly:p,isInvalid:(L||!!h)&&a})})}),(M||x&&a)&&s.jsx(v.FormField.Description,{role:x&&a?"status":void 0,color:x&&a?"warning.11":void 0,display:"flex",gap:"100",alignItems:"center",children:x&&a?s.jsxs(s.Fragment,{children:[s.jsx(N.Icon,{colorPalette:"warning",children:s.jsx(I.WarningAmber,{})}),x]}):M}),h&&a&&s.jsx(v.FormField.Error,{children:h})]})})},es=({type:e="text",id:n,name:r,defaultLocaleOrCurrency:o,valuesByLocaleOrCurrency:t,placeholdersByLocaleOrCurrency:l,descriptionsByLocaleOrCurrency:M,warningsByLocaleOrCurrency:x,errorsByLocaleOrCurrency:h,label:b,hint:q,description:z,warning:C,warnings:p,renderWarning:j,error:L,errors:a,renderError:y,touched:i,isRequired:k,isDisabled:$,isReadOnly:T,onChange:d,onBlur:O,onFocus:A,defaultExpanded:ae=!1,displayAllLocalesOrCurrencies:U=!1,size:J,autoFocus:Q,["data-track-component"]:le,["data-testid"]:de,["data-test"]:ce,...ue})=>{const[c,X]=_.useState(U||ae),S=F.useLocalizedStringFormatter(ie),Y=re.$bdb11010cef70236$export$f680877a34711e37(),Z=re.$bdb11010cef70236$export$f680877a34711e37(),B=!!(L||a&&Object.values(a).some(u=>u===!0)),w=!!(C||p&&Object.values(p).some(Boolean)),P=!!(B&&i),{labelProps:G,fieldProps:K,descriptionProps:R,errorMessageProps:H}=je.$2baaea4c71418dea$export$294aa081a6c6f55d({id:n,label:b,description:z,errorMessage:L,isInvalid:P}),V=Object.keys(t),ge=_.useMemo(()=>(e==="money"?We(o,V):De(o,V)).reduce((se,g)=>{const me={localeOrCurrency:g,inputValue:t[g],placeholder:l?.[g],description:M?.[g],warning:x?.[g],error:h?.[g],...g===o&&Q?{autoFocus:Q}:{},isInvalid:P,isRequired:k,isDisabled:$,isReadOnly:T};return c||!c&&g===o?[...se,me]:se},[]),[t,l,M,x,h,o,c,P,k,$,T]),ee=(_e(h,o)||B)&&i;return ee&&!c&&X(!0),s.jsxs(Se,{...ue,...K,"aria-details":q?Z:void 0,type:e,size:J,name:r,children:[b&&s.jsxs(D.Stack,{direction:"row",gap:"0",children:[s.jsxs(we,{...G,children:[b,k&&s.jsx("sup",{"aria-hidden":"true",children:"*"})]}),q&&s.jsxs(ne.$de32f1b87079253c$export$2e1e1122cf0cba88,{children:[s.jsx(Le.IconButton,{id:Z,"aria-label":S.format("infoBoxTriggerAriaLabel"),size:"2xs",colorPalette:"info",variant:"link",children:s.jsx(I.HelpOutline,{})}),s.jsx(he.Popover,{padding:0,children:s.jsx(Ee,{asChild:!0,children:s.jsx(ne.$de32f1b87079253c$export$3ddf2d174ce01153,{children:s.jsx(te.Box,{p:"300",children:q})})})})]})]}),s.jsx(ke,{id:Y,"data-expanded":c,children:s.jsx(xe.$e1995378a142960e$export$fb8073518f34e6ec,{items:ge,children:u=>s.jsx(Ke,{...u,size:J,type:e,onChange:d,onBlur:O,onFocus:A,touched:i,id:f(K.id,u.localeOrCurrency),name:f(r,u.localeOrCurrency),"data-test":f(ce,u.localeOrCurrency),"data-testid":f(de,u.localeOrCurrency),"data-track-component":f(le,u.localeOrCurrency)})})}),!U&&V.length>1&&s.jsx(ye,{children:s.jsxs(ve.Button,{"aria-controls":Y,"aria-describedby":G.id,"aria-expanded":c,onPress:()=>X(!c),isDisabled:$||ee&&c,variant:"ghost",size:"2xs",colorPalette:"primary",children:[s.jsx(te.Box,{as:e==="money"?I.Payments:I.Language,display:"inline-flex",boxSize:"400",verticalAlign:"text-bottom",mr:"100"}),e==="money"?c?S.format("hideCurrencies"):S.format("showCurrencies"):c?S.format("hideLanguages"):S.format("showLanguages")]})}),(z||w&&i)&&s.jsx(Te,{role:w&&i?"status":void 0,color:w&&i?"warning.11":void 0,"aria-labelledby":`${R.id}-warning`,...R,children:w&&i?s.jsxs(s.Fragment,{children:[s.jsx(N.Icon,{colorPalette:"warning",children:s.jsx(I.WarningAmber,{})}),s.jsxs(D.Stack,{gap:"0",id:`${R.id}-warning`,children:[C,p&&w&&s.jsx(oe.FieldErrors,{errors:p,renderError:j,colorPalette:"warning",role:void 0})]})]}):z}),P&&s.jsxs(Pe,{"aria-labelledby":`${H.id}-error`,role:"alert",...H,children:[s.jsx(N.Icon,{children:s.jsx(I.ErrorOutline,{})}),s.jsxs(D.Stack,{gap:"0",id:`${H.id}-error`,children:[L,a&&B&&s.jsx(oe.FieldErrors,{errors:a,renderError:y,role:void 0})]})]})]})},ss=Object.assign(es,{getId:f,getName:f,isTouched:Je,isEmpty:Oe,createLocalizedString:Ne,omitEmptyTranslations:Ue,RequiredValueErrorMessage:He,toFieldErrors:Qe,convertToMoneyValues:Xe,parseMoneyValues:Ye,getHighPrecisionCurrencies:Ze,getEmptyCurrencies:Ge});exports.LocalizedField=ss;
2
- //# sourceMappingURL=localized-field-D78l88ux.cjs.js.map
1
+ "use strict";const s=require("react/jsx-runtime"),F=require("./normalize-messages-CaDzkuUm.cjs.js"),E=require("./money-input-CBKb1D73.cjs.js"),v=require("./form-field-52--hhlj.cjs.js"),_=require("react"),ne=require("./Dialog-CSr6lHSd.cjs.js"),xe=require("./CollectionBuilder-DjRx57vm.cjs.js"),I=require("@commercetools/nimbus-icons"),he=require("./popover-Dhg--8YC.cjs.js"),pe=require("@chakra-ui/react"),N=require("./icon-RyFjTAmU.cjs.js"),Fe=require("./rich-text-input-Cx9u2DDm.cjs.js"),fe=require("./multiline-text-input-DN9yF7Di.cjs.js"),be=require("./text-input-n7jUFat6.cjs.js"),re=require("./mergeProps-CxnHrnow.cjs.js"),je=require("./useField-lK6K_h1G.cjs.js"),oe=require("./field-errors-aqrV93vp.cjs.js"),D=require("./stack-CIN13EDn.cjs.js"),Le=require("./icon-button-5pYAEokc.cjs.js"),te=require("./box-CWni3A32.cjs.js"),ve=require("./button-Bz1hc0LL.cjs.js"),Ie={hideCurrencies:"Hide all currencies",hideLanguages:"Hide all languages",infoBoxTriggerAriaLabel:"more info",missingRequiredField:"This field is required. Provide at least one value.",showCurrencies:"Show all currencies",showLanguages:"Show all languages"},Me={hideCurrencies:"Alle Währungen ausblenden",hideLanguages:"Alle Sprachen ausblenden",infoBoxTriggerAriaLabel:"Weitere Informationen",missingRequiredField:"Dies ist ein Pflichtfeld. Bitte geben Sie mindestens einen Wert an.",showCurrencies:"Alle Währungen anzeigen",showLanguages:"Alle Sprachen anzeigen"},qe={hideCurrencies:"Ocultar todas las monedas",hideLanguages:"Ocultar todas las monedas",infoBoxTriggerAriaLabel:"más información",missingRequiredField:"Este valor es necesario. Proporciona al menos un valor.",showCurrencies:"Mostrar todas las monedas",showLanguages:"Mostrar todos los idiomas"},ze={hideCurrencies:"Masquer toutes les devises",hideLanguages:"Masquer toutes les langues",infoBoxTriggerAriaLabel:"Plus d'informations",missingRequiredField:"Ce champ est requis. Indiquez au moins une valeur.",showCurrencies:"Afficher toutes les devises",showLanguages:"Afficher toutes les langues"},Ce={hideCurrencies:"Ocultar todas as ocorrências",hideLanguages:"Ocultar todos os idiomas",infoBoxTriggerAriaLabel:"mais informações",missingRequiredField:"Este campo é obrigatório. Forneça pelo menos um valor.",showCurrencies:"Mostrar todas as ocorrências",showLanguages:"Mostrar todos os idiomas"},ie={en:F.normalizeMessages(Ie),de:F.normalizeMessages(Me),es:F.normalizeMessages(qe),"fr-FR":F.normalizeMessages(ze),"pt-BR":F.normalizeMessages(Ce)},{withProvider:$e,withContext:m}=pe.createSlotRecipeContext({key:"localizedField"}),Se=$e("fieldset","root"),we=m("legend","label"),Ee=m("div","infoDialog"),ke=m("div","fieldsContainer"),Te=m("div","description"),Pe=m("div","error"),ye=m("div","toggleButtonContainer"),Ae=m("div","localeFieldRoot"),Be=m("div","localeFieldLabel"),Re=m("div","localeFieldInput"),He=()=>{const e=F.useLocalizedStringFormatter(ie);return s.jsx(v.FormField.Error,{children:e.format("missingRequiredField")})},f=(e,n)=>e&&n?`${e}.${n}`:void 0,W=e=>e.split("-")[0],Ve=(e,n)=>{const r=W(e),o=n.filter(l=>W(l)===r);return{unrelated:n.filter(l=>W(l)!==r),related:o}},De=(e,n)=>{const{related:r,unrelated:o}=Ve(e,n.filter(t=>t!==e));return[e,...r.sort(),...o.sort()]},We=(e,n)=>{const r=n.filter(o=>o!==e);return[e,...r.sort()]},_e=(e,n)=>e&&Object.keys(e).length>0&&n?Object.keys(e).some(r=>r!==n):!1,Ne=(e,n)=>Array.from(new Set([...e,...Object.keys(n)])).reduce((o,t)=>({...o,[t]:n?.[t]||""}),{}),Oe=e=>e?Object.values(e).every(n=>!n||n?.trim().length===0):!0,Ue=e=>(typeof e!="object"&&console.warn("Nimbus Localized Field - Warning: omitEmptyTranslations must be called with an object"),Object.entries(e).reduce((n,[r,o])=>o&&o.trim().length>0?{...n,[r]:o}:n,{})),Je=e=>e?Object.values(e).some(Boolean):!1;function Qe(e){return e}const Xe=(e,n)=>Object.values(e).map(r=>E.MoneyInput.convertToMoneyValue(r,n)),Ye=(e=[],n)=>e.reduce((r,o)=>{const t=E.MoneyInput.parseMoneyValue(o,n);return{...r,[t.currencyCode]:t}},{}),Ze=(e,n)=>Object.keys(e).filter(o=>E.MoneyInput.isHighPrecision(e[o],n)),Ge=e=>Object.keys(e).filter(r=>E.MoneyInput.isEmpty(e[r])),Ke=({type:e,size:n,localeOrCurrency:r,id:o,name:t,inputValue:l,description:M,warning:x,error:h,onChange:b,onBlur:q,onFocus:z,isRequired:C,isReadOnly:p,isDisabled:j,isInvalid:L,touched:a,...y})=>{let i;switch(e){case"text":default:i=be.TextInput;break;case"multiLine":i=fe.MultilineTextInput;break;case"money":i=E.MoneyInput;break;case"richText":i=Fe.RichTextInput;break}const $=e==="money"?l||{amount:"",currencyCode:r}:l||"",T=_.useCallback(d=>{const A={target:typeof d=="object"?{id:d.target.id,name:d.target.name,locale:void 0,currency:r,value:d.target.value}:{id:o,name:t,locale:r,currency:void 0,value:d}};b(A)},[o,t,r,b]);return s.jsx(Ae,{asChild:!0,children:s.jsxs(v.FormField.Root,{isDisabled:j,isReadOnly:p,isInvalid:(L||!!h)&&a,direction:"row",size:n,id:o,children:[s.jsx(Be,{display:e==="money"?"none":void 0,...j&&{"data-disabled":j},asChild:!0,children:s.jsx(v.FormField.Label,{children:r.toLocaleUpperCase()})}),s.jsx(v.FormField.Input,{children:s.jsx(Re,{"aria-required":C,asChild:!0,children:s.jsx(i,{...y,size:n,value:$,onChange:T,onBlur:d=>q?.(d,r),onFocus:d=>z?.(d,r),isRequired:C,isDisabled:j,isReadOnly:p,isInvalid:(L||!!h)&&a})})}),(M||x&&a)&&s.jsx(v.FormField.Description,{role:x&&a?"status":void 0,color:x&&a?"warning.11":void 0,display:"flex",gap:"100",alignItems:"center",children:x&&a?s.jsxs(s.Fragment,{children:[s.jsx(N.Icon,{colorPalette:"warning",children:s.jsx(I.WarningAmber,{})}),x]}):M}),h&&a&&s.jsx(v.FormField.Error,{children:h})]})})},es=({type:e="text",id:n,name:r,defaultLocaleOrCurrency:o,valuesByLocaleOrCurrency:t,placeholdersByLocaleOrCurrency:l,descriptionsByLocaleOrCurrency:M,warningsByLocaleOrCurrency:x,errorsByLocaleOrCurrency:h,label:b,hint:q,description:z,warning:C,warnings:p,renderWarning:j,error:L,errors:a,renderError:y,touched:i,isRequired:k,isDisabled:$,isReadOnly:T,onChange:d,onBlur:O,onFocus:A,defaultExpanded:ae=!1,displayAllLocalesOrCurrencies:U=!1,size:J,autoFocus:Q,["data-track-component"]:le,["data-testid"]:de,["data-test"]:ce,...ue})=>{const[c,X]=_.useState(U||ae),S=F.useLocalizedStringFormatter(ie),Y=re.$bdb11010cef70236$export$f680877a34711e37(),Z=re.$bdb11010cef70236$export$f680877a34711e37(),B=!!(L||a&&Object.values(a).some(u=>u===!0)),w=!!(C||p&&Object.values(p).some(Boolean)),P=!!(B&&i),{labelProps:G,fieldProps:K,descriptionProps:R,errorMessageProps:H}=je.$2baaea4c71418dea$export$294aa081a6c6f55d({id:n,label:b,description:z,errorMessage:L,isInvalid:P}),V=Object.keys(t),ge=_.useMemo(()=>(e==="money"?We(o,V):De(o,V)).reduce((se,g)=>{const me={localeOrCurrency:g,inputValue:t[g],placeholder:l?.[g],description:M?.[g],warning:x?.[g],error:h?.[g],...g===o&&Q?{autoFocus:Q}:{},isInvalid:P,isRequired:k,isDisabled:$,isReadOnly:T};return c||!c&&g===o?[...se,me]:se},[]),[t,l,M,x,h,o,c,P,k,$,T]),ee=(_e(h,o)||B)&&i;return ee&&!c&&X(!0),s.jsxs(Se,{...ue,...K,"aria-details":q?Z:void 0,type:e,size:J,name:r,children:[b&&s.jsxs(D.Stack,{direction:"row",gap:"0",children:[s.jsxs(we,{...G,children:[b,k&&s.jsx("sup",{"aria-hidden":"true",children:"*"})]}),q&&s.jsxs(ne.$de32f1b87079253c$export$2e1e1122cf0cba88,{children:[s.jsx(Le.IconButton,{id:Z,"aria-label":S.format("infoBoxTriggerAriaLabel"),size:"2xs",colorPalette:"info",variant:"link",children:s.jsx(I.HelpOutline,{})}),s.jsx(he.Popover,{padding:0,children:s.jsx(Ee,{asChild:!0,children:s.jsx(ne.$de32f1b87079253c$export$3ddf2d174ce01153,{children:s.jsx(te.Box,{p:"300",children:q})})})})]})]}),s.jsx(ke,{id:Y,"data-expanded":c,children:s.jsx(xe.$e1995378a142960e$export$fb8073518f34e6ec,{items:ge,children:u=>s.jsx(Ke,{...u,size:J,type:e,onChange:d,onBlur:O,onFocus:A,touched:i,id:f(K.id,u.localeOrCurrency),name:f(r,u.localeOrCurrency),"data-test":f(ce,u.localeOrCurrency),"data-testid":f(de,u.localeOrCurrency),"data-track-component":f(le,u.localeOrCurrency)})})}),!U&&V.length>1&&s.jsx(ye,{children:s.jsxs(ve.Button,{"aria-controls":Y,"aria-describedby":G.id,"aria-expanded":c,onPress:()=>X(!c),isDisabled:$||ee&&c,variant:"ghost",size:"2xs",colorPalette:"primary",children:[s.jsx(te.Box,{as:e==="money"?I.Payments:I.Language,display:"inline-flex",boxSize:"400",verticalAlign:"text-bottom",mr:"100"}),e==="money"?c?S.format("hideCurrencies"):S.format("showCurrencies"):c?S.format("hideLanguages"):S.format("showLanguages")]})}),(z||w&&i)&&s.jsx(Te,{role:w&&i?"status":void 0,color:w&&i?"warning.11":void 0,"aria-labelledby":`${R.id}-warning`,...R,children:w&&i?s.jsxs(s.Fragment,{children:[s.jsx(N.Icon,{colorPalette:"warning",children:s.jsx(I.WarningAmber,{})}),s.jsxs(D.Stack,{gap:"0",id:`${R.id}-warning`,children:[C,p&&w&&s.jsx(oe.FieldErrors,{errors:p,renderError:j,colorPalette:"warning",role:void 0})]})]}):z}),P&&s.jsxs(Pe,{"aria-labelledby":`${H.id}-error`,role:"alert",...H,children:[s.jsx(N.Icon,{children:s.jsx(I.ErrorOutline,{})}),s.jsxs(D.Stack,{gap:"0",id:`${H.id}-error`,children:[L,a&&B&&s.jsx(oe.FieldErrors,{errors:a,renderError:y,role:void 0})]})]})]})},ss=Object.assign(es,{getId:f,getName:f,isTouched:Je,isEmpty:Oe,createLocalizedString:Ne,omitEmptyTranslations:Ue,RequiredValueErrorMessage:He,toFieldErrors:Qe,convertToMoneyValues:Xe,parseMoneyValues:Ye,getHighPrecisionCurrencies:Ze,getEmptyCurrencies:Ge});exports.LocalizedField=ss;
2
+ //# sourceMappingURL=localized-field-BJTWKclB.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"localized-field-D78l88ux.cjs.js","sources":["../../src/components/localized-field/intl/en.ts","../../src/components/localized-field/intl/de.ts","../../src/components/localized-field/intl/es.ts","../../src/components/localized-field/intl/fr-FR.ts","../../src/components/localized-field/intl/pt-BR.ts","../../src/components/localized-field/localized-field.messages.ts","../../src/components/localized-field/localized-field.slots.tsx","../../src/components/localized-field/utils/localized-field.utils.tsx","../../src/components/localized-field/components/localized-field.locale-field.tsx","../../src/components/localized-field/components/localized-field.root.tsx","../../src/components/localized-field/localized-field.tsx"],"sourcesContent":["/**\n * Pre-compiled en messages for LocalizedField\n * Generated by @internationalized/string-compiler\n * DO NOT EDIT MANUALLY\n */\n\nexport default {\n hideCurrencies: `Hide all currencies`,\n hideLanguages: `Hide all languages`,\n infoBoxTriggerAriaLabel: `more info`,\n missingRequiredField: `This field is required. Provide at least one value.`,\n showCurrencies: `Show all currencies`,\n showLanguages: `Show all languages`,\n};\n","/**\n * Pre-compiled de messages for LocalizedField\n * Generated by @internationalized/string-compiler\n * DO NOT EDIT MANUALLY\n */\n\nexport default {\n hideCurrencies: `Alle Währungen ausblenden`,\n hideLanguages: `Alle Sprachen ausblenden`,\n infoBoxTriggerAriaLabel: `Weitere Informationen`,\n missingRequiredField: `Dies ist ein Pflichtfeld. Bitte geben Sie mindestens einen Wert an.`,\n showCurrencies: `Alle Währungen anzeigen`,\n showLanguages: `Alle Sprachen anzeigen`,\n};\n","/**\n * Pre-compiled es messages for LocalizedField\n * Generated by @internationalized/string-compiler\n * DO NOT EDIT MANUALLY\n */\n\nexport default {\n hideCurrencies: `Ocultar todas las monedas`,\n hideLanguages: `Ocultar todas las monedas`,\n infoBoxTriggerAriaLabel: `más información`,\n missingRequiredField: `Este valor es necesario. Proporciona al menos un valor.`,\n showCurrencies: `Mostrar todas las monedas`,\n showLanguages: `Mostrar todos los idiomas`,\n};\n","/**\n * Pre-compiled fr-FR messages for LocalizedField\n * Generated by @internationalized/string-compiler\n * DO NOT EDIT MANUALLY\n */\n\nexport default {\n hideCurrencies: `Masquer toutes les devises`,\n hideLanguages: `Masquer toutes les langues`,\n infoBoxTriggerAriaLabel: `Plus d'informations`,\n missingRequiredField: `Ce champ est requis. Indiquez au moins une valeur.`,\n showCurrencies: `Afficher toutes les devises`,\n showLanguages: `Afficher toutes les langues`,\n};\n","/**\n * Pre-compiled pt-BR messages for LocalizedField\n * Generated by @internationalized/string-compiler\n * DO NOT EDIT MANUALLY\n */\n\nexport default {\n hideCurrencies: `Ocultar todas as ocorrências`,\n hideLanguages: `Ocultar todos os idiomas`,\n infoBoxTriggerAriaLabel: `mais informações`,\n missingRequiredField: `Este campo é obrigatório. Forneça pelo menos um valor.`,\n showCurrencies: `Mostrar todas as ocorrências`,\n showLanguages: `Mostrar todos os idiomas`,\n};\n","/**\n * Pre-compiled localized messages for LocalizedField component\n *\n * Generated by scripts/generate-dictionaries.ts\n * DO NOT EDIT MANUALLY\n *\n * @see https://react-spectrum.adobe.com/react-aria/internationalization.html\n */\n\nimport {\n type LocalizedString,\n type LocalizedStrings,\n} from \"@internationalized/string\";\nimport { normalizeMessages } from \"../../utils/normalize-messages\";\n\n// Pre-compiled message functions\nimport localizedFieldMessages_en from \"./intl/en\";\nimport localizedFieldMessages_de from \"./intl/de\";\nimport localizedFieldMessages_es from \"./intl/es\";\nimport localizedFieldMessages_fr from \"./intl/fr-FR\";\nimport localizedFieldMessages_pt from \"./intl/pt-BR\";\n\n// Raw LocalizedStrings object for use with useLocalizedStringFormatter hook\nexport const localizedFieldMessagesStrings: LocalizedStrings<\n string,\n LocalizedString\n> = {\n en: normalizeMessages(localizedFieldMessages_en),\n de: normalizeMessages(localizedFieldMessages_de),\n es: normalizeMessages(localizedFieldMessages_es),\n \"fr-FR\": normalizeMessages(localizedFieldMessages_fr),\n \"pt-BR\": normalizeMessages(localizedFieldMessages_pt),\n} as LocalizedStrings<string, LocalizedString>;\n\n/**\n * Available message keys for LocalizedField component\n */\nexport type LocalizedFieldMessageKey =\n | \"hideCurrencies\"\n | \"hideLanguages\"\n | \"infoBoxTriggerAriaLabel\"\n | \"missingRequiredField\"\n | \"showCurrencies\"\n | \"showLanguages\";\n","import { createSlotRecipeContext } from \"@chakra-ui/react\";\nimport type {\n LocalizedFieldRootSlotProps,\n LocalizedFieldLabelSlotProps,\n LocalizedFieldInfoDialogSlotProps,\n LocalizedFieldFieldsContainerSlotProps,\n LocalizedFieldDescriptionSlotProps,\n LocalizedFieldErrorSlotProps,\n LocalizedFieldToggleButtonContainerSlotProps,\n LocalizedFieldLocaleFieldRootSlotProps,\n LocalizedFieldLocaleFieldLabelSlotProps,\n LocalizedFieldLocaleFieldInputSlotProps,\n} from \"./localized-field.types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"localizedField\",\n});\n\n// Root Slot\nexport const LocalizedFieldRootSlot = withProvider<\n HTMLFieldSetElement,\n LocalizedFieldRootSlotProps\n>(\"fieldset\", \"root\");\n\n// Label Slot\nexport const LocalizedFieldLabelSlot = withContext<\n HTMLLabelElement,\n LocalizedFieldLabelSlotProps\n>(\"legend\", \"label\");\n\n// InfoDialog Slot\nexport const LocalizedFieldInfoDialogSlot = withContext<\n HTMLDivElement,\n LocalizedFieldInfoDialogSlotProps\n>(\"div\", \"infoDialog\");\n\n// FieldsContainer Slot\nexport const LocalizedFieldFieldsContainerSlot = withContext<\n HTMLDivElement,\n LocalizedFieldFieldsContainerSlotProps\n>(\"div\", \"fieldsContainer\");\n\n// Description Slot\nexport const LocalizedFieldDescriptionSlot = withContext<\n HTMLDivElement,\n LocalizedFieldDescriptionSlotProps\n>(\"div\", \"description\");\n\n// Error Slot\nexport const LocalizedFieldErrorSlot = withContext<\n HTMLDivElement,\n LocalizedFieldErrorSlotProps\n>(\"div\", \"error\");\n\n// ToggleButtonContainer Slot\nexport const LocalizedFieldToggleButtonContainerSlot = withContext<\n HTMLDivElement,\n LocalizedFieldToggleButtonContainerSlotProps\n>(\"div\", \"toggleButtonContainer\");\n\n// LocaleFieldRoot Slot\nexport const LocalizedFieldLocaleFieldRootSlot = withContext<\n HTMLDivElement,\n LocalizedFieldLocaleFieldRootSlotProps\n>(\"div\", \"localeFieldRoot\");\n\n// FieldLabel Slot\nexport const LocalizedFieldLocaleFieldLabelSlot = withContext<\n HTMLDivElement,\n LocalizedFieldLocaleFieldLabelSlotProps\n>(\"div\", \"localeFieldLabel\");\n\n// FieldInput Slot\nexport const LocalizedFieldLocaleFieldInputSlot = withContext<\n HTMLDivElement,\n LocalizedFieldLocaleFieldInputSlotProps\n>(\"div\", \"localeFieldInput\");\n","import {\n FormField,\n type CurrencyCode,\n type MoneyInputValue,\n type MoneyValue,\n type FieldErrorsData,\n MoneyInput,\n} from \"@/components\";\nimport { useLocalizedStringFormatter } from \"@/hooks\";\nimport { localizedFieldMessagesStrings } from \"../localized-field.messages\";\nimport type { LocalizedString } from \"../localized-field.types\";\n\ntype LanguagesSplitByDefaultLocale = {\n related: string[];\n unrelated: string[];\n};\n\ntype TouchedLocalizedString = { [locale: string]: boolean };\n\ntype CustomFormikErrors<Values> = {\n [K in keyof Values]?: FieldErrorsData;\n};\n\nexport const RequiredValueErrorMessage = () => {\n const msg = useLocalizedStringFormatter(localizedFieldMessagesStrings);\n return (\n <FormField.Error>{msg.format(\"missingRequiredField\")}</FormField.Error>\n );\n};\n\nexport const getLocaleFieldAttribute = (\n fieldGroupAttr?: string,\n locale?: string\n): string | undefined =>\n fieldGroupAttr && locale ? `${fieldGroupAttr}.${locale}` : undefined;\n\n// gets the language tag of a given locale, e.g. `de` in `de-DE`\nexport const getLanguageForLocale = (locale: string): string =>\n locale.split(\"-\")[0];\n\n// splits the locales into two groups:\n// - the 'related' array contains locales with the same language tag as the default locale,\n// e.g. if the default locale is de-DE, related would be ['de-DE', 'de-CH']\n// - the 'unrelated' array contains locales with a different different language tag from the default locale\n//. e.g. if the default locale is de-DE, unrelated would be ['pt-BR', 'en-GB', 'zh-Hans']\nexport const splitLanguages = (\n defaultLocale: string,\n locales: string[]\n): LanguagesSplitByDefaultLocale => {\n const defaultLanguage = getLanguageForLocale(defaultLocale);\n const related = locales.filter(\n (locale) => getLanguageForLocale(locale) === defaultLanguage\n );\n const unrelated = locales.filter(\n (locale) => getLanguageForLocale(locale) !== defaultLanguage\n );\n return {\n unrelated,\n related,\n };\n};\n\n// sorts locales with the following priority:\n// - The selected locale is placed first (e.g pt-BR)\n// - All locales using the same language tag as the selected language\n// follow (e.g. pt, pt-PT). They are sorted alphabetically.\n// - All other locales follow, sorted alphabetically as well\nexport const sortLocalesByDefaultLocaleLanguage = (\n defaultLocale: string,\n allLocales: string[]\n): string[] => {\n const { related, unrelated } = splitLanguages(\n defaultLocale,\n allLocales.filter((locale: string) => locale !== defaultLocale)\n );\n\n return [defaultLocale, ...related.sort(), ...unrelated.sort()];\n};\n\nexport const sortCurrencies = (\n defaultCurrency: CurrencyCode,\n allCurrencies: CurrencyCode[]\n) => {\n const remainingCurrencies = allCurrencies.filter(\n (currency) => currency !== defaultCurrency\n );\n return [defaultCurrency, ...remainingCurrencies.sort()];\n};\n\nexport const getHasInvalidLocalizedFields = <TErrors extends object>(\n errors?: TErrors,\n defaultLocaleOrCurrency?: string\n): boolean => {\n if (errors && Object.keys(errors).length > 0 && defaultLocaleOrCurrency) {\n return Object.keys(errors).some(\n (localeOrCurrency) => localeOrCurrency !== defaultLocaleOrCurrency\n );\n }\n return false;\n};\n\nexport const createLocalizedString = (\n locales: string[],\n existingLocalizedString: LocalizedString\n): LocalizedString => {\n const localesInLocalizedString = Array.from(\n new Set([...locales, ...Object.keys(existingLocalizedString)])\n );\n\n return localesInLocalizedString.reduce<LocalizedString>(\n (localizedString, locale) => ({\n ...localizedString,\n [locale]: existingLocalizedString?.[locale] || \"\",\n }),\n {}\n );\n};\n\n// Note: I prefer `isLocalizedStringEmpty`, but keeping this as `isEmpty` for api consistency with UI Kit\nexport const isEmpty = (localizedString?: LocalizedString): boolean => {\n if (!localizedString) return true;\n return Object.values(localizedString).every(\n (value?: string) => !value || value?.trim().length === 0\n );\n};\n\nexport const omitEmptyTranslations = <Translations extends LocalizedString>(\n localizedString: Translations\n): LocalizedString => {\n // TODO: is it necessary to create a util that enforces a consistent warning/error format, e.g.\n // `<COMPONENT_NAME> - Warning: <WARNING_MESSAGE>`\n if (typeof localizedString !== \"object\") {\n console.warn(\n \"Nimbus Localized Field - Warning: omitEmptyTranslations must be called with an object\"\n );\n }\n\n return Object.entries(localizedString).reduce<LocalizedString>(\n (localizedStringWithoutEmptyTranslations, [locale, value]) => {\n if (value && value.trim().length > 0) {\n return {\n ...localizedStringWithoutEmptyTranslations,\n [locale]: value,\n };\n }\n return localizedStringWithoutEmptyTranslations;\n },\n {}\n );\n};\n\nexport const isTouched = (touched?: TouchedLocalizedString): boolean => {\n if (touched) {\n return Object.values(touched).some(Boolean);\n }\n return false;\n};\n\n/**\n * Use this function to convert the Formik `errors` object type to\n * our custom field errors type.\n * This is primarly useful when using TypeScript.\n */\nexport function toFieldErrors<FormValues>(\n errors: unknown\n): CustomFormikErrors<FormValues> {\n return errors as CustomFormikErrors<FormValues>;\n}\n\nexport const convertToMoneyValues = (\n values: MoneyInputValue[],\n currency: string\n): Array<MoneyValue | null> =>\n Object.values(values).map<MoneyValue | null>((value) => {\n return MoneyInput.convertToMoneyValue(value, currency);\n });\n\nexport const parseMoneyValues = (\n moneyValues: MoneyValue[] = [],\n locale: string\n): Record<CurrencyCode, MoneyInputValue> =>\n moneyValues.reduce<Record<CurrencyCode, MoneyInputValue>>(\n (allValues, moneyValue) => {\n const value = MoneyInput.parseMoneyValue(moneyValue, locale);\n return {\n ...allValues,\n [value.currencyCode]: value,\n };\n },\n {} as Record<CurrencyCode, MoneyInputValue>\n );\n\nexport const getHighPrecisionCurrencies = (\n values: Record<CurrencyCode, MoneyInputValue>,\n locale: string\n): CurrencyCode[] => {\n const typedCurrencyCodes = Object.keys(values) as CurrencyCode[];\n return typedCurrencyCodes.filter((currencyCode) =>\n MoneyInput.isHighPrecision(values[currencyCode], locale)\n );\n};\n\nexport const getEmptyCurrencies = (\n values: Record<CurrencyCode, MoneyInputValue>\n): CurrencyCode[] => {\n const typedCurrencyCodes = Object.keys(values) as CurrencyCode[];\n return typedCurrencyCodes.filter((currencyCode) =>\n MoneyInput.isEmpty(values[currencyCode])\n );\n};\n","import { useCallback } from \"react\";\nimport {\n FormField,\n Icon,\n TextInput,\n MoneyInput,\n type CustomEvent,\n MultilineTextInput,\n RichTextInput,\n type MoneyInputValue,\n type CurrencyCode,\n} from \"@/components\";\nimport { WarningAmber } from \"@commercetools/nimbus-icons\";\nimport {\n LocalizedFieldLocaleFieldRootSlot,\n LocalizedFieldLocaleFieldInputSlot,\n LocalizedFieldLocaleFieldLabelSlot,\n} from \"../localized-field.slots\";\nimport type { LocalizedFieldLocaleFieldProps } from \"../localized-field.types\";\n\n/**\n * LocalizedFieldLocaleField - Individual locale or currency input field\n *\n * Renders a single input field for a specific locale or currency with integrated\n * label, description, warning, and error message display. Supports text, multiline,\n * richText, and money input types.\n *\n * @supportsStyleProps\n */\nexport const LocalizedFieldLocaleField = ({\n type,\n size,\n localeOrCurrency,\n id,\n name,\n inputValue: inputValueFromProps,\n description,\n warning,\n error,\n onChange,\n onBlur,\n onFocus,\n isRequired,\n isReadOnly,\n isDisabled,\n isInvalid,\n touched,\n ...otherProps\n}: LocalizedFieldLocaleFieldProps) => {\n let InputComponent:\n | typeof TextInput\n | typeof MultilineTextInput\n | typeof MoneyInput\n | typeof RichTextInput;\n switch (type) {\n case \"text\":\n default:\n InputComponent = TextInput;\n break;\n case \"multiLine\":\n InputComponent = MultilineTextInput;\n break;\n case \"money\":\n InputComponent = MoneyInput;\n break;\n case \"richText\":\n InputComponent = RichTextInput;\n break;\n }\n\n const getInputValue = () => {\n if (type === \"money\") {\n return inputValueFromProps\n ? (inputValueFromProps as MoneyInputValue)\n : ({ amount: \"\", currencyCode: localeOrCurrency } as MoneyInputValue);\n }\n return inputValueFromProps ? inputValueFromProps : \"\";\n };\n\n const inputValue = getInputValue();\n\n const handleChange = useCallback(\n (value: string | CustomEvent | undefined) => {\n // The `MoneyInput` onChange event value is a custom value,\n // and the `MoneyInput` modifies the input id and name since it is in a `group`,\n // so we need to build a separate return object for the MoneInput to return\n // the expected values\n const isMoneyInputEvent = typeof value === \"object\";\n const changeValue = {\n target: isMoneyInputEvent\n ? {\n id: value.target.id,\n name: value.target.name,\n locale: undefined,\n currency: localeOrCurrency as CurrencyCode,\n value: value.target.value,\n }\n : { id, name, locale: localeOrCurrency, currency: undefined, value },\n };\n onChange(changeValue);\n },\n [id, name, localeOrCurrency, onChange]\n );\n\n return (\n <LocalizedFieldLocaleFieldRootSlot asChild>\n <FormField.Root\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n isInvalid={(isInvalid || !!error) && touched}\n direction=\"row\"\n size={size}\n id={id}\n >\n <LocalizedFieldLocaleFieldLabelSlot\n display={type === \"money\" ? \"none\" : undefined}\n {...(isDisabled && { \"data-disabled\": isDisabled })}\n asChild\n >\n <FormField.Label>\n {localeOrCurrency.toLocaleUpperCase()}\n </FormField.Label>\n </LocalizedFieldLocaleFieldLabelSlot>\n <FormField.Input>\n <LocalizedFieldLocaleFieldInputSlot\n aria-required={isRequired}\n asChild\n >\n <InputComponent\n {...otherProps}\n size={size}\n value={inputValue as string & MoneyInputValue}\n onChange={handleChange}\n onBlur={(e: React.FocusEvent | CustomEvent) =>\n onBlur?.(e, localeOrCurrency)\n }\n onFocus={(e: React.FocusEvent | CustomEvent) =>\n onFocus?.(e, localeOrCurrency)\n }\n isRequired={isRequired}\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n isInvalid={(isInvalid || !!error) && touched}\n />\n </LocalizedFieldLocaleFieldInputSlot>\n </FormField.Input>\n {(description || (warning && touched)) && (\n <FormField.Description\n role={warning && touched ? \"status\" : undefined}\n color={warning && touched ? \"warning.11\" : undefined}\n display=\"flex\"\n gap=\"100\"\n alignItems=\"center\"\n >\n {warning && touched ? (\n <>\n <Icon colorPalette=\"warning\">\n <WarningAmber />\n </Icon>\n {warning}\n </>\n ) : (\n description\n )}\n </FormField.Description>\n )}\n {error && touched && <FormField.Error>{error}</FormField.Error>}\n </FormField.Root>\n </LocalizedFieldLocaleFieldRootSlot>\n );\n};\n","import { useState, useMemo } from \"react\";\nimport {\n Collection as RaCollection,\n Dialog as RaDialog,\n DialogTrigger as RaDialogTrigger,\n} from \"react-aria-components\";\nimport { useField, useId } from \"react-aria\";\nimport {\n ErrorOutline,\n HelpOutline,\n Language,\n Payments,\n WarningAmber,\n} from \"@commercetools/nimbus-icons\";\nimport {\n Box,\n Button,\n FieldErrors,\n Icon,\n IconButton,\n Stack,\n type CurrencyCode,\n} from \"@/components\";\nimport { Popover } from \"../../popover\";\nimport { useLocalizedStringFormatter } from \"@/hooks\";\nimport { localizedFieldMessagesStrings } from \"../localized-field.messages\";\nimport {\n LocalizedFieldRootSlot,\n LocalizedFieldLabelSlot,\n LocalizedFieldInfoDialogSlot,\n LocalizedFieldFieldsContainerSlot,\n LocalizedFieldDescriptionSlot,\n LocalizedFieldErrorSlot,\n LocalizedFieldToggleButtonContainerSlot,\n} from \"../localized-field.slots\";\nimport type {\n LocalizedFieldProps,\n MergedLocaleFieldData,\n LocalizedCurrency,\n} from \"../localized-field.types\";\n\nimport {\n getHasInvalidLocalizedFields,\n getLocaleFieldAttribute,\n sortCurrencies,\n sortLocalesByDefaultLocaleLanguage,\n} from \"../utils/localized-field.utils\";\nimport { LocalizedFieldLocaleField } from \"./localized-field.locale-field\";\n\n/**\n * LocalizedField - Root component for managing localized input fields\n *\n * Provides a fieldset container for multiple locale-specific or currency-specific input fields\n * with expand/collapse functionality and integrated validation display. Supports text, multiline,\n * richText, and money input types.\n *\n * @supportsStyleProps\n */\nexport const LocalizedField = ({\n type = \"text\",\n id,\n name,\n defaultLocaleOrCurrency,\n valuesByLocaleOrCurrency,\n placeholdersByLocaleOrCurrency,\n descriptionsByLocaleOrCurrency,\n warningsByLocaleOrCurrency,\n errorsByLocaleOrCurrency,\n label,\n hint,\n description,\n warning,\n warnings,\n renderWarning,\n error,\n errors,\n renderError,\n touched,\n isRequired,\n isDisabled,\n isReadOnly,\n onChange,\n onBlur,\n onFocus,\n defaultExpanded = false,\n displayAllLocalesOrCurrencies = false,\n size,\n autoFocus,\n [\"data-track-component\"]: dataTrackComponent,\n [\"data-testid\"]: dataTestId,\n [\"data-test\"]: dataTest,\n // DOM & Style props for wrapper container\n ...rest\n}: LocalizedFieldProps) => {\n const [expanded, setExpanded] = useState(\n displayAllLocalesOrCurrencies || defaultExpanded\n );\n\n const msg = useLocalizedStringFormatter(localizedFieldMessagesStrings);\n\n // Used to associate more info dialog with fieldset via `aria-controls`\n const localeFieldsContainerId = useId();\n // Used to associate more info dialog with fieldset via `aria-details`\n const moreDetailsButtonId = useId();\n\n // Either `error` exists, or there are `true` fields in the UI Kit compat `errors` object\n const hasError: boolean = Boolean(\n error || (errors && Object.values(errors).some((error) => error === true))\n );\n\n // Either `warning` exists, or there are `true` fields in the UI Kit compat `warnings` object\n const hasWarning: boolean = Boolean(\n warning || (warnings && Object.values(warnings).some(Boolean))\n );\n\n // FieldGroup is invalid if a non-field-specific error is passed and the group has been touched\n // When FieldGroup is invalid, all fields will display error styling without displaying a field-specific error message\n const isInvalid: boolean = !!(hasError && touched);\n\n const { labelProps, fieldProps, descriptionProps, errorMessageProps } =\n useField({\n id,\n label,\n description,\n errorMessage: error,\n isInvalid,\n });\n\n // Array of locales/currencies to display as input fields\n const localizationKeys: string[] | CurrencyCode[] = Object.keys(\n valuesByLocaleOrCurrency\n );\n\n // Merge all -ByLocaleOrCurrencies data for each field\n const allDataForFields = useMemo(() => {\n const sortedFieldData =\n type === \"money\"\n ? sortCurrencies(\n defaultLocaleOrCurrency as CurrencyCode,\n localizationKeys as CurrencyCode[]\n )\n : sortLocalesByDefaultLocaleLanguage(\n defaultLocaleOrCurrency,\n localizationKeys\n );\n\n return sortedFieldData.reduce(\n (allFieldData: MergedLocaleFieldData[], localizationKey) => {\n const allDataForLocale = {\n localeOrCurrency: localizationKey,\n inputValue:\n type === \"money\"\n ? (valuesByLocaleOrCurrency as LocalizedCurrency)[localizationKey]\n : (valuesByLocaleOrCurrency[localizationKey] as string),\n placeholder: placeholdersByLocaleOrCurrency?.[localizationKey],\n description: descriptionsByLocaleOrCurrency?.[localizationKey],\n warning: warningsByLocaleOrCurrency?.[localizationKey],\n error: errorsByLocaleOrCurrency?.[localizationKey],\n // autoFocus default/first locale field\n ...(localizationKey === defaultLocaleOrCurrency && autoFocus\n ? { autoFocus }\n : {}),\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n };\n if (\n expanded ||\n // Only display defaultLocaleOrInput field if fieldGroup is not expanded\n (!expanded && localizationKey === defaultLocaleOrCurrency)\n ) {\n return [...allFieldData, allDataForLocale];\n }\n return allFieldData;\n },\n []\n );\n }, [\n valuesByLocaleOrCurrency,\n placeholdersByLocaleOrCurrency,\n descriptionsByLocaleOrCurrency,\n warningsByLocaleOrCurrency,\n errorsByLocaleOrCurrency,\n defaultLocaleOrCurrency,\n expanded,\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n ]);\n\n const groupHasInvalidLocalizedFields = getHasInvalidLocalizedFields(\n errorsByLocaleOrCurrency,\n defaultLocaleOrCurrency\n );\n\n const shouldExpandInvalidFields =\n (groupHasInvalidLocalizedFields || hasError) && touched;\n // If there are fields that are invalid, ensure that field group\n // shows all fields so that invalid field is visible\n if (shouldExpandInvalidFields && !expanded) {\n setExpanded(true);\n }\n\n return (\n <LocalizedFieldRootSlot\n {...rest}\n {...fieldProps}\n aria-details={hint ? moreDetailsButtonId : undefined}\n type={type}\n size={size}\n name={name}\n >\n {label && (\n <Stack direction=\"row\" gap=\"0\">\n <LocalizedFieldLabelSlot {...labelProps}>\n {label}\n {isRequired && <sup aria-hidden=\"true\">*</sup>}\n </LocalizedFieldLabelSlot>\n {hint && (\n <RaDialogTrigger>\n <IconButton\n id={moreDetailsButtonId}\n aria-label={msg.format(\"infoBoxTriggerAriaLabel\")}\n size=\"2xs\"\n colorPalette=\"info\"\n variant=\"link\"\n >\n <HelpOutline />\n </IconButton>\n\n <Popover padding={0}>\n <LocalizedFieldInfoDialogSlot asChild>\n <RaDialog>\n <Box p=\"300\">{hint}</Box>\n </RaDialog>\n </LocalizedFieldInfoDialogSlot>\n </Popover>\n </RaDialogTrigger>\n )}\n </Stack>\n )}\n <LocalizedFieldFieldsContainerSlot\n id={localeFieldsContainerId}\n data-expanded={expanded}\n >\n <RaCollection items={allDataForFields}>\n {(item) => {\n return (\n <LocalizedFieldLocaleField\n {...item}\n size={size}\n type={type}\n onChange={onChange}\n onBlur={onBlur}\n onFocus={onFocus}\n touched={touched}\n // Format field attributes to match uikit pattern\n id={getLocaleFieldAttribute(\n fieldProps.id,\n item.localeOrCurrency\n )}\n name={getLocaleFieldAttribute(name, item.localeOrCurrency)}\n data-test={getLocaleFieldAttribute(\n dataTest,\n item.localeOrCurrency\n )}\n data-testid={getLocaleFieldAttribute(\n dataTestId,\n item.localeOrCurrency\n )}\n data-track-component={getLocaleFieldAttribute(\n dataTrackComponent,\n item.localeOrCurrency\n )}\n />\n );\n }}\n </RaCollection>\n </LocalizedFieldFieldsContainerSlot>\n\n {!displayAllLocalesOrCurrencies && localizationKeys.length > 1 && (\n <LocalizedFieldToggleButtonContainerSlot>\n <Button\n aria-controls={localeFieldsContainerId}\n aria-describedby={labelProps.id}\n aria-expanded={expanded}\n onPress={() => setExpanded(!expanded)}\n isDisabled={isDisabled || (shouldExpandInvalidFields && expanded)}\n variant=\"ghost\"\n size=\"2xs\"\n colorPalette=\"primary\"\n >\n <Box\n as={type === \"money\" ? Payments : Language}\n display=\"inline-flex\"\n boxSize=\"400\"\n verticalAlign=\"text-bottom\"\n mr=\"100\"\n />\n {type === \"money\"\n ? expanded\n ? msg.format(\"hideCurrencies\")\n : msg.format(\"showCurrencies\")\n : expanded\n ? msg.format(\"hideLanguages\")\n : msg.format(\"showLanguages\")}\n </Button>\n </LocalizedFieldToggleButtonContainerSlot>\n )}\n {(description || (hasWarning && touched)) && (\n <LocalizedFieldDescriptionSlot\n role={hasWarning && touched ? \"status\" : undefined}\n color={hasWarning && touched ? \"warning.11\" : undefined}\n // In order to associate the warnings from both the warning and legacy warnings props with the fieldset,\n // we must associate, them to this element with aria-labelledby\n aria-labelledby={`${descriptionProps.id}-warning`}\n {...descriptionProps}\n >\n {/** Warnings are for compat with UI Kit localized fields */}\n {hasWarning && touched ? (\n <>\n <Icon colorPalette=\"warning\">\n <WarningAmber />\n </Icon>\n <Stack gap=\"0\" id={`${descriptionProps.id}-warning`}>\n {warning}\n {warnings && hasWarning && (\n <FieldErrors\n errors={warnings}\n renderError={renderWarning}\n colorPalette=\"warning\"\n role={undefined}\n />\n )}\n </Stack>\n </>\n ) : (\n description\n )}\n </LocalizedFieldDescriptionSlot>\n )}\n {isInvalid && (\n <LocalizedFieldErrorSlot\n // In order to associate the errors from both the error and legacy errors props with the fieldset,\n // we must associate them to this element with aria-labelledby.\n aria-labelledby={`${errorMessageProps.id}-error`}\n role=\"alert\"\n {...errorMessageProps}\n >\n <Icon>\n <ErrorOutline />\n </Icon>\n <Stack gap=\"0\" id={`${errorMessageProps.id}-error`}>\n {error}\n {errors && hasError && (\n <FieldErrors\n errors={errors}\n renderError={renderError}\n role={undefined}\n />\n )}\n </Stack>\n </LocalizedFieldErrorSlot>\n )}\n </LocalizedFieldRootSlot>\n );\n};\n","import { LocalizedFieldRoot } from \"./components\";\nimport {\n getLocaleFieldAttribute,\n createLocalizedString,\n isEmpty,\n omitEmptyTranslations,\n isTouched,\n RequiredValueErrorMessage,\n toFieldErrors,\n convertToMoneyValues,\n parseMoneyValues,\n getHighPrecisionCurrencies,\n getEmptyCurrencies,\n} from \"./utils/localized-field.utils\";\n\n/**\n * LocalizedField component with utility methods for managing localized input fields.\n *\n * This component provides a fieldset for managing multiple locale-specific or currency-specific\n * input fields with expand/collapse functionality and integrated validation display.\n *\n * **Utility Methods** (for compatibility with UI Kit):\n * - `getId` / `getName`: Format field attributes with locale suffix\n * - `isTouched`: Check if any locale field has been touched\n * - `isEmpty`: Check if all locale fields are empty\n * - `createLocalizedString`: Create empty localized string object\n * - `omitEmptyTranslations`: Remove empty translations from localized object\n * - `RequiredValueErrorMessage`: Standard error message component\n * - `toFieldErrors`: Convert errors to field error format\n * - `convertToMoneyValues` / `parseMoneyValues`: Money value conversion utilities\n * - `getHighPrecisionCurrencies` / `getEmptyCurrencies`: Currency utilities\n *\n * @example\n * ```tsx\n * <LocalizedField\n * type=\"text\"\n * label=\"Product Name\"\n * defaultLocaleOrCurrency=\"en\"\n * valuesByLocaleOrCurrency={{ en: \"Product\", de: \"Produkt\" }}\n * onChange={(e) => console.log(e.target.locale, e.target.value)}\n * />\n * ```\n */\nexport const LocalizedField = Object.assign(LocalizedFieldRoot, {\n // Add util methods here for compat with uikit - see https://github.com/commercetools/ui-kit/blob/e97e0c7e8f3e9393981bf1949573212d7c571c90/packages/components/inputs/localized-text-input/src/localized-text-input.tsx#L396\n getId: getLocaleFieldAttribute,\n getName: getLocaleFieldAttribute,\n isTouched,\n isEmpty,\n createLocalizedString,\n omitEmptyTranslations,\n RequiredValueErrorMessage,\n toFieldErrors,\n convertToMoneyValues,\n parseMoneyValues,\n getHighPrecisionCurrencies,\n getEmptyCurrencies,\n});\n"],"names":["localizedFieldMessages_en","localizedFieldMessages_de","localizedFieldMessages_es","localizedFieldMessages_fr","localizedFieldMessages_pt","localizedFieldMessagesStrings","normalizeMessages","withProvider","withContext","createSlotRecipeContext","LocalizedFieldRootSlot","LocalizedFieldLabelSlot","LocalizedFieldInfoDialogSlot","LocalizedFieldFieldsContainerSlot","LocalizedFieldDescriptionSlot","LocalizedFieldErrorSlot","LocalizedFieldToggleButtonContainerSlot","LocalizedFieldLocaleFieldRootSlot","LocalizedFieldLocaleFieldLabelSlot","LocalizedFieldLocaleFieldInputSlot","RequiredValueErrorMessage","msg","useLocalizedStringFormatter","FormField","getLocaleFieldAttribute","fieldGroupAttr","locale","getLanguageForLocale","splitLanguages","defaultLocale","locales","defaultLanguage","related","sortLocalesByDefaultLocaleLanguage","allLocales","unrelated","sortCurrencies","defaultCurrency","allCurrencies","remainingCurrencies","currency","getHasInvalidLocalizedFields","errors","defaultLocaleOrCurrency","localeOrCurrency","createLocalizedString","existingLocalizedString","localizedString","isEmpty","value","omitEmptyTranslations","localizedStringWithoutEmptyTranslations","isTouched","touched","toFieldErrors","convertToMoneyValues","values","MoneyInput","parseMoneyValues","moneyValues","allValues","moneyValue","getHighPrecisionCurrencies","currencyCode","getEmptyCurrencies","LocalizedFieldLocaleField","type","size","id","name","inputValueFromProps","description","warning","error","onChange","onBlur","onFocus","isRequired","isReadOnly","isDisabled","isInvalid","otherProps","InputComponent","TextInput","MultilineTextInput","RichTextInput","inputValue","handleChange","useCallback","changeValue","jsx","jsxs","e","Fragment","Icon","WarningAmber","LocalizedField","valuesByLocaleOrCurrency","placeholdersByLocaleOrCurrency","descriptionsByLocaleOrCurrency","warningsByLocaleOrCurrency","errorsByLocaleOrCurrency","label","hint","warnings","renderWarning","renderError","defaultExpanded","displayAllLocalesOrCurrencies","autoFocus","dataTrackComponent","dataTestId","dataTest","rest","expanded","setExpanded","useState","localeFieldsContainerId","useId","moreDetailsButtonId","hasError","hasWarning","labelProps","fieldProps","descriptionProps","errorMessageProps","useField","localizationKeys","allDataForFields","useMemo","allFieldData","localizationKey","allDataForLocale","shouldExpandInvalidFields","Stack","RaDialogTrigger","IconButton","HelpOutline","Popover","RaDialog","Box","RaCollection","item","Button","Payments","Language","FieldErrors","ErrorOutline","LocalizedFieldRoot"],"mappings":"s2BAMAA,GAAe,CACb,eAAgB,sBAChB,cAAe,qBACf,wBAAyB,YACzB,qBAAsB,sDACtB,eAAgB,sBAChB,cAAe,oBACjB,ECPAC,GAAe,CACb,eAAgB,4BAChB,cAAe,2BACf,wBAAyB,wBACzB,qBAAsB,sEACtB,eAAgB,0BAChB,cAAe,wBACjB,ECPAC,GAAe,CACb,eAAgB,4BAChB,cAAe,4BACf,wBAAyB,kBACzB,qBAAsB,0DACtB,eAAgB,4BAChB,cAAe,2BACjB,ECPAC,GAAe,CACb,eAAgB,6BAChB,cAAe,6BACf,wBAAyB,sBACzB,qBAAsB,qDACtB,eAAgB,8BAChB,cAAe,6BACjB,ECPAC,GAAe,CACb,eAAgB,+BAChB,cAAe,2BACf,wBAAyB,mBACzB,qBAAsB,yDACtB,eAAgB,+BAChB,cAAe,0BACjB,ECUaC,GAGT,CACF,GAAIC,EAAAA,kBAAkBN,EAAyB,EAC/C,GAAIM,EAAAA,kBAAkBL,E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oD,GAAoB,CAE9D,MAAO5H,EACP,QAASA,EACT,UAAA4B,GACA,QAAAJ,GACA,sBAAAH,GACA,sBAAAK,GACA,0BAAA9B,GACA,cAAAkC,GACA,qBAAAC,GACA,iBAAAG,GACA,2BAAAI,GACA,mBAAAE,EACF,CAAC"}
1
+ {"version":3,"file":"localized-field-BJTWKclB.cjs.js","sources":["../../src/components/localized-field/intl/en.ts","../../src/components/localized-field/intl/de.ts","../../src/components/localized-field/intl/es.ts","../../src/components/localized-field/intl/fr-FR.ts","../../src/components/localized-field/intl/pt-BR.ts","../../src/components/localized-field/localized-field.messages.ts","../../src/components/localized-field/localized-field.slots.tsx","../../src/components/localized-field/utils/localized-field.utils.tsx","../../src/components/localized-field/components/localized-field.locale-field.tsx","../../src/components/localized-field/components/localized-field.root.tsx","../../src/components/localized-field/localized-field.tsx"],"sourcesContent":["/**\n * Pre-compiled en messages for LocalizedField\n * Generated by @internationalized/string-compiler\n * DO NOT EDIT MANUALLY\n */\n\nexport default {\n hideCurrencies: `Hide all currencies`,\n hideLanguages: `Hide all languages`,\n infoBoxTriggerAriaLabel: `more info`,\n missingRequiredField: `This field is required. Provide at least one value.`,\n showCurrencies: `Show all currencies`,\n showLanguages: `Show all languages`,\n};\n","/**\n * Pre-compiled de messages for LocalizedField\n * Generated by @internationalized/string-compiler\n * DO NOT EDIT MANUALLY\n */\n\nexport default {\n hideCurrencies: `Alle Währungen ausblenden`,\n hideLanguages: `Alle Sprachen ausblenden`,\n infoBoxTriggerAriaLabel: `Weitere Informationen`,\n missingRequiredField: `Dies ist ein Pflichtfeld. Bitte geben Sie mindestens einen Wert an.`,\n showCurrencies: `Alle Währungen anzeigen`,\n showLanguages: `Alle Sprachen anzeigen`,\n};\n","/**\n * Pre-compiled es messages for LocalizedField\n * Generated by @internationalized/string-compiler\n * DO NOT EDIT MANUALLY\n */\n\nexport default {\n hideCurrencies: `Ocultar todas las monedas`,\n hideLanguages: `Ocultar todas las monedas`,\n infoBoxTriggerAriaLabel: `más información`,\n missingRequiredField: `Este valor es necesario. Proporciona al menos un valor.`,\n showCurrencies: `Mostrar todas las monedas`,\n showLanguages: `Mostrar todos los idiomas`,\n};\n","/**\n * Pre-compiled fr-FR messages for LocalizedField\n * Generated by @internationalized/string-compiler\n * DO NOT EDIT MANUALLY\n */\n\nexport default {\n hideCurrencies: `Masquer toutes les devises`,\n hideLanguages: `Masquer toutes les langues`,\n infoBoxTriggerAriaLabel: `Plus d'informations`,\n missingRequiredField: `Ce champ est requis. Indiquez au moins une valeur.`,\n showCurrencies: `Afficher toutes les devises`,\n showLanguages: `Afficher toutes les langues`,\n};\n","/**\n * Pre-compiled pt-BR messages for LocalizedField\n * Generated by @internationalized/string-compiler\n * DO NOT EDIT MANUALLY\n */\n\nexport default {\n hideCurrencies: `Ocultar todas as ocorrências`,\n hideLanguages: `Ocultar todos os idiomas`,\n infoBoxTriggerAriaLabel: `mais informações`,\n missingRequiredField: `Este campo é obrigatório. Forneça pelo menos um valor.`,\n showCurrencies: `Mostrar todas as ocorrências`,\n showLanguages: `Mostrar todos os idiomas`,\n};\n","/**\n * Pre-compiled localized messages for LocalizedField component\n *\n * Generated by scripts/generate-dictionaries.ts\n * DO NOT EDIT MANUALLY\n *\n * @see https://react-spectrum.adobe.com/react-aria/internationalization.html\n */\n\nimport {\n type LocalizedString,\n type LocalizedStrings,\n} from \"@internationalized/string\";\nimport { normalizeMessages } from \"../../utils/normalize-messages\";\n\n// Pre-compiled message functions\nimport localizedFieldMessages_en from \"./intl/en\";\nimport localizedFieldMessages_de from \"./intl/de\";\nimport localizedFieldMessages_es from \"./intl/es\";\nimport localizedFieldMessages_fr from \"./intl/fr-FR\";\nimport localizedFieldMessages_pt from \"./intl/pt-BR\";\n\n// Raw LocalizedStrings object for use with useLocalizedStringFormatter hook\nexport const localizedFieldMessagesStrings: LocalizedStrings<\n string,\n LocalizedString\n> = {\n en: normalizeMessages(localizedFieldMessages_en),\n de: normalizeMessages(localizedFieldMessages_de),\n es: normalizeMessages(localizedFieldMessages_es),\n \"fr-FR\": normalizeMessages(localizedFieldMessages_fr),\n \"pt-BR\": normalizeMessages(localizedFieldMessages_pt),\n} as LocalizedStrings<string, LocalizedString>;\n\n/**\n * Available message keys for LocalizedField component\n */\nexport type LocalizedFieldMessageKey =\n | \"hideCurrencies\"\n | \"hideLanguages\"\n | \"infoBoxTriggerAriaLabel\"\n | \"missingRequiredField\"\n | \"showCurrencies\"\n | \"showLanguages\";\n","import { createSlotRecipeContext } from \"@chakra-ui/react\";\nimport type {\n LocalizedFieldRootSlotProps,\n LocalizedFieldLabelSlotProps,\n LocalizedFieldInfoDialogSlotProps,\n LocalizedFieldFieldsContainerSlotProps,\n LocalizedFieldDescriptionSlotProps,\n LocalizedFieldErrorSlotProps,\n LocalizedFieldToggleButtonContainerSlotProps,\n LocalizedFieldLocaleFieldRootSlotProps,\n LocalizedFieldLocaleFieldLabelSlotProps,\n LocalizedFieldLocaleFieldInputSlotProps,\n} from \"./localized-field.types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"localizedField\",\n});\n\n// Root Slot\nexport const LocalizedFieldRootSlot = withProvider<\n HTMLFieldSetElement,\n LocalizedFieldRootSlotProps\n>(\"fieldset\", \"root\");\n\n// Label Slot\nexport const LocalizedFieldLabelSlot = withContext<\n HTMLLabelElement,\n LocalizedFieldLabelSlotProps\n>(\"legend\", \"label\");\n\n// InfoDialog Slot\nexport const LocalizedFieldInfoDialogSlot = withContext<\n HTMLDivElement,\n LocalizedFieldInfoDialogSlotProps\n>(\"div\", \"infoDialog\");\n\n// FieldsContainer Slot\nexport const LocalizedFieldFieldsContainerSlot = withContext<\n HTMLDivElement,\n LocalizedFieldFieldsContainerSlotProps\n>(\"div\", \"fieldsContainer\");\n\n// Description Slot\nexport const LocalizedFieldDescriptionSlot = withContext<\n HTMLDivElement,\n LocalizedFieldDescriptionSlotProps\n>(\"div\", \"description\");\n\n// Error Slot\nexport const LocalizedFieldErrorSlot = withContext<\n HTMLDivElement,\n LocalizedFieldErrorSlotProps\n>(\"div\", \"error\");\n\n// ToggleButtonContainer Slot\nexport const LocalizedFieldToggleButtonContainerSlot = withContext<\n HTMLDivElement,\n LocalizedFieldToggleButtonContainerSlotProps\n>(\"div\", \"toggleButtonContainer\");\n\n// LocaleFieldRoot Slot\nexport const LocalizedFieldLocaleFieldRootSlot = withContext<\n HTMLDivElement,\n LocalizedFieldLocaleFieldRootSlotProps\n>(\"div\", \"localeFieldRoot\");\n\n// FieldLabel Slot\nexport const LocalizedFieldLocaleFieldLabelSlot = withContext<\n HTMLDivElement,\n LocalizedFieldLocaleFieldLabelSlotProps\n>(\"div\", \"localeFieldLabel\");\n\n// FieldInput Slot\nexport const LocalizedFieldLocaleFieldInputSlot = withContext<\n HTMLDivElement,\n LocalizedFieldLocaleFieldInputSlotProps\n>(\"div\", \"localeFieldInput\");\n","import {\n FormField,\n type CurrencyCode,\n type MoneyInputValue,\n type MoneyValue,\n type FieldErrorsData,\n MoneyInput,\n} from \"@/components\";\nimport { useLocalizedStringFormatter } from \"@/hooks\";\nimport { localizedFieldMessagesStrings } from \"../localized-field.messages\";\nimport type { LocalizedString } from \"../localized-field.types\";\n\ntype LanguagesSplitByDefaultLocale = {\n related: string[];\n unrelated: string[];\n};\n\ntype TouchedLocalizedString = { [locale: string]: boolean };\n\ntype CustomFormikErrors<Values> = {\n [K in keyof Values]?: FieldErrorsData;\n};\n\nexport const RequiredValueErrorMessage = () => {\n const msg = useLocalizedStringFormatter(localizedFieldMessagesStrings);\n return (\n <FormField.Error>{msg.format(\"missingRequiredField\")}</FormField.Error>\n );\n};\n\nexport const getLocaleFieldAttribute = (\n fieldGroupAttr?: string,\n locale?: string\n): string | undefined =>\n fieldGroupAttr && locale ? `${fieldGroupAttr}.${locale}` : undefined;\n\n// gets the language tag of a given locale, e.g. `de` in `de-DE`\nexport const getLanguageForLocale = (locale: string): string =>\n locale.split(\"-\")[0];\n\n// splits the locales into two groups:\n// - the 'related' array contains locales with the same language tag as the default locale,\n// e.g. if the default locale is de-DE, related would be ['de-DE', 'de-CH']\n// - the 'unrelated' array contains locales with a different different language tag from the default locale\n//. e.g. if the default locale is de-DE, unrelated would be ['pt-BR', 'en-GB', 'zh-Hans']\nexport const splitLanguages = (\n defaultLocale: string,\n locales: string[]\n): LanguagesSplitByDefaultLocale => {\n const defaultLanguage = getLanguageForLocale(defaultLocale);\n const related = locales.filter(\n (locale) => getLanguageForLocale(locale) === defaultLanguage\n );\n const unrelated = locales.filter(\n (locale) => getLanguageForLocale(locale) !== defaultLanguage\n );\n return {\n unrelated,\n related,\n };\n};\n\n// sorts locales with the following priority:\n// - The selected locale is placed first (e.g pt-BR)\n// - All locales using the same language tag as the selected language\n// follow (e.g. pt, pt-PT). They are sorted alphabetically.\n// - All other locales follow, sorted alphabetically as well\nexport const sortLocalesByDefaultLocaleLanguage = (\n defaultLocale: string,\n allLocales: string[]\n): string[] => {\n const { related, unrelated } = splitLanguages(\n defaultLocale,\n allLocales.filter((locale: string) => locale !== defaultLocale)\n );\n\n return [defaultLocale, ...related.sort(), ...unrelated.sort()];\n};\n\nexport const sortCurrencies = (\n defaultCurrency: CurrencyCode,\n allCurrencies: CurrencyCode[]\n) => {\n const remainingCurrencies = allCurrencies.filter(\n (currency) => currency !== defaultCurrency\n );\n return [defaultCurrency, ...remainingCurrencies.sort()];\n};\n\nexport const getHasInvalidLocalizedFields = <TErrors extends object>(\n errors?: TErrors,\n defaultLocaleOrCurrency?: string\n): boolean => {\n if (errors && Object.keys(errors).length > 0 && defaultLocaleOrCurrency) {\n return Object.keys(errors).some(\n (localeOrCurrency) => localeOrCurrency !== defaultLocaleOrCurrency\n );\n }\n return false;\n};\n\nexport const createLocalizedString = (\n locales: string[],\n existingLocalizedString: LocalizedString\n): LocalizedString => {\n const localesInLocalizedString = Array.from(\n new Set([...locales, ...Object.keys(existingLocalizedString)])\n );\n\n return localesInLocalizedString.reduce<LocalizedString>(\n (localizedString, locale) => ({\n ...localizedString,\n [locale]: existingLocalizedString?.[locale] || \"\",\n }),\n {}\n );\n};\n\n// Note: I prefer `isLocalizedStringEmpty`, but keeping this as `isEmpty` for api consistency with UI Kit\nexport const isEmpty = (localizedString?: LocalizedString): boolean => {\n if (!localizedString) return true;\n return Object.values(localizedString).every(\n (value?: string) => !value || value?.trim().length === 0\n );\n};\n\nexport const omitEmptyTranslations = <Translations extends LocalizedString>(\n localizedString: Translations\n): LocalizedString => {\n // TODO: is it necessary to create a util that enforces a consistent warning/error format, e.g.\n // `<COMPONENT_NAME> - Warning: <WARNING_MESSAGE>`\n if (typeof localizedString !== \"object\") {\n console.warn(\n \"Nimbus Localized Field - Warning: omitEmptyTranslations must be called with an object\"\n );\n }\n\n return Object.entries(localizedString).reduce<LocalizedString>(\n (localizedStringWithoutEmptyTranslations, [locale, value]) => {\n if (value && value.trim().length > 0) {\n return {\n ...localizedStringWithoutEmptyTranslations,\n [locale]: value,\n };\n }\n return localizedStringWithoutEmptyTranslations;\n },\n {}\n );\n};\n\nexport const isTouched = (touched?: TouchedLocalizedString): boolean => {\n if (touched) {\n return Object.values(touched).some(Boolean);\n }\n return false;\n};\n\n/**\n * Use this function to convert the Formik `errors` object type to\n * our custom field errors type.\n * This is primarly useful when using TypeScript.\n */\nexport function toFieldErrors<FormValues>(\n errors: unknown\n): CustomFormikErrors<FormValues> {\n return errors as CustomFormikErrors<FormValues>;\n}\n\nexport const convertToMoneyValues = (\n values: MoneyInputValue[],\n currency: string\n): Array<MoneyValue | null> =>\n Object.values(values).map<MoneyValue | null>((value) => {\n return MoneyInput.convertToMoneyValue(value, currency);\n });\n\nexport const parseMoneyValues = (\n moneyValues: MoneyValue[] = [],\n locale: string\n): Record<CurrencyCode, MoneyInputValue> =>\n moneyValues.reduce<Record<CurrencyCode, MoneyInputValue>>(\n (allValues, moneyValue) => {\n const value = MoneyInput.parseMoneyValue(moneyValue, locale);\n return {\n ...allValues,\n [value.currencyCode]: value,\n };\n },\n {} as Record<CurrencyCode, MoneyInputValue>\n );\n\nexport const getHighPrecisionCurrencies = (\n values: Record<CurrencyCode, MoneyInputValue>,\n locale: string\n): CurrencyCode[] => {\n const typedCurrencyCodes = Object.keys(values) as CurrencyCode[];\n return typedCurrencyCodes.filter((currencyCode) =>\n MoneyInput.isHighPrecision(values[currencyCode], locale)\n );\n};\n\nexport const getEmptyCurrencies = (\n values: Record<CurrencyCode, MoneyInputValue>\n): CurrencyCode[] => {\n const typedCurrencyCodes = Object.keys(values) as CurrencyCode[];\n return typedCurrencyCodes.filter((currencyCode) =>\n MoneyInput.isEmpty(values[currencyCode])\n );\n};\n","import { useCallback } from \"react\";\nimport {\n FormField,\n Icon,\n TextInput,\n MoneyInput,\n type CustomEvent,\n MultilineTextInput,\n RichTextInput,\n type MoneyInputValue,\n type CurrencyCode,\n} from \"@/components\";\nimport { WarningAmber } from \"@commercetools/nimbus-icons\";\nimport {\n LocalizedFieldLocaleFieldRootSlot,\n LocalizedFieldLocaleFieldInputSlot,\n LocalizedFieldLocaleFieldLabelSlot,\n} from \"../localized-field.slots\";\nimport type { LocalizedFieldLocaleFieldProps } from \"../localized-field.types\";\n\n/**\n * LocalizedFieldLocaleField - Individual locale or currency input field\n *\n * Renders a single input field for a specific locale or currency with integrated\n * label, description, warning, and error message display. Supports text, multiline,\n * richText, and money input types.\n *\n * @supportsStyleProps\n */\nexport const LocalizedFieldLocaleField = ({\n type,\n size,\n localeOrCurrency,\n id,\n name,\n inputValue: inputValueFromProps,\n description,\n warning,\n error,\n onChange,\n onBlur,\n onFocus,\n isRequired,\n isReadOnly,\n isDisabled,\n isInvalid,\n touched,\n ...otherProps\n}: LocalizedFieldLocaleFieldProps) => {\n let InputComponent:\n | typeof TextInput\n | typeof MultilineTextInput\n | typeof MoneyInput\n | typeof RichTextInput;\n switch (type) {\n case \"text\":\n default:\n InputComponent = TextInput;\n break;\n case \"multiLine\":\n InputComponent = MultilineTextInput;\n break;\n case \"money\":\n InputComponent = MoneyInput;\n break;\n case \"richText\":\n InputComponent = RichTextInput;\n break;\n }\n\n const getInputValue = () => {\n if (type === \"money\") {\n return inputValueFromProps\n ? (inputValueFromProps as MoneyInputValue)\n : ({ amount: \"\", currencyCode: localeOrCurrency } as MoneyInputValue);\n }\n return inputValueFromProps ? inputValueFromProps : \"\";\n };\n\n const inputValue = getInputValue();\n\n const handleChange = useCallback(\n (value: string | CustomEvent | undefined) => {\n // The `MoneyInput` onChange event value is a custom value,\n // and the `MoneyInput` modifies the input id and name since it is in a `group`,\n // so we need to build a separate return object for the MoneInput to return\n // the expected values\n const isMoneyInputEvent = typeof value === \"object\";\n const changeValue = {\n target: isMoneyInputEvent\n ? {\n id: value.target.id,\n name: value.target.name,\n locale: undefined,\n currency: localeOrCurrency as CurrencyCode,\n value: value.target.value,\n }\n : { id, name, locale: localeOrCurrency, currency: undefined, value },\n };\n onChange(changeValue);\n },\n [id, name, localeOrCurrency, onChange]\n );\n\n return (\n <LocalizedFieldLocaleFieldRootSlot asChild>\n <FormField.Root\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n isInvalid={(isInvalid || !!error) && touched}\n direction=\"row\"\n size={size}\n id={id}\n >\n <LocalizedFieldLocaleFieldLabelSlot\n display={type === \"money\" ? \"none\" : undefined}\n {...(isDisabled && { \"data-disabled\": isDisabled })}\n asChild\n >\n <FormField.Label>\n {localeOrCurrency.toLocaleUpperCase()}\n </FormField.Label>\n </LocalizedFieldLocaleFieldLabelSlot>\n <FormField.Input>\n <LocalizedFieldLocaleFieldInputSlot\n aria-required={isRequired}\n asChild\n >\n <InputComponent\n {...otherProps}\n size={size}\n value={inputValue as string & MoneyInputValue}\n onChange={handleChange}\n onBlur={(e: React.FocusEvent | CustomEvent) =>\n onBlur?.(e, localeOrCurrency)\n }\n onFocus={(e: React.FocusEvent | CustomEvent) =>\n onFocus?.(e, localeOrCurrency)\n }\n isRequired={isRequired}\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n isInvalid={(isInvalid || !!error) && touched}\n />\n </LocalizedFieldLocaleFieldInputSlot>\n </FormField.Input>\n {(description || (warning && touched)) && (\n <FormField.Description\n role={warning && touched ? \"status\" : undefined}\n color={warning && touched ? \"warning.11\" : undefined}\n display=\"flex\"\n gap=\"100\"\n alignItems=\"center\"\n >\n {warning && touched ? (\n <>\n <Icon colorPalette=\"warning\">\n <WarningAmber />\n </Icon>\n {warning}\n </>\n ) : (\n description\n )}\n </FormField.Description>\n )}\n {error && touched && <FormField.Error>{error}</FormField.Error>}\n </FormField.Root>\n </LocalizedFieldLocaleFieldRootSlot>\n );\n};\n","import { useState, useMemo } from \"react\";\nimport {\n Collection as RaCollection,\n Dialog as RaDialog,\n DialogTrigger as RaDialogTrigger,\n} from \"react-aria-components\";\nimport { useField, useId } from \"react-aria\";\nimport {\n ErrorOutline,\n HelpOutline,\n Language,\n Payments,\n WarningAmber,\n} from \"@commercetools/nimbus-icons\";\nimport {\n Box,\n Button,\n FieldErrors,\n Icon,\n IconButton,\n Stack,\n type CurrencyCode,\n} from \"@/components\";\nimport { Popover } from \"../../popover\";\nimport { useLocalizedStringFormatter } from \"@/hooks\";\nimport { localizedFieldMessagesStrings } from \"../localized-field.messages\";\nimport {\n LocalizedFieldRootSlot,\n LocalizedFieldLabelSlot,\n LocalizedFieldInfoDialogSlot,\n LocalizedFieldFieldsContainerSlot,\n LocalizedFieldDescriptionSlot,\n LocalizedFieldErrorSlot,\n LocalizedFieldToggleButtonContainerSlot,\n} from \"../localized-field.slots\";\nimport type {\n LocalizedFieldProps,\n MergedLocaleFieldData,\n LocalizedCurrency,\n} from \"../localized-field.types\";\n\nimport {\n getHasInvalidLocalizedFields,\n getLocaleFieldAttribute,\n sortCurrencies,\n sortLocalesByDefaultLocaleLanguage,\n} from \"../utils/localized-field.utils\";\nimport { LocalizedFieldLocaleField } from \"./localized-field.locale-field\";\n\n/**\n * LocalizedField - Root component for managing localized input fields\n *\n * Provides a fieldset container for multiple locale-specific or currency-specific input fields\n * with expand/collapse functionality and integrated validation display. Supports text, multiline,\n * richText, and money input types.\n *\n * @supportsStyleProps\n */\nexport const LocalizedField = ({\n type = \"text\",\n id,\n name,\n defaultLocaleOrCurrency,\n valuesByLocaleOrCurrency,\n placeholdersByLocaleOrCurrency,\n descriptionsByLocaleOrCurrency,\n warningsByLocaleOrCurrency,\n errorsByLocaleOrCurrency,\n label,\n hint,\n description,\n warning,\n warnings,\n renderWarning,\n error,\n errors,\n renderError,\n touched,\n isRequired,\n isDisabled,\n isReadOnly,\n onChange,\n onBlur,\n onFocus,\n defaultExpanded = false,\n displayAllLocalesOrCurrencies = false,\n size,\n autoFocus,\n [\"data-track-component\"]: dataTrackComponent,\n [\"data-testid\"]: dataTestId,\n [\"data-test\"]: dataTest,\n // DOM & Style props for wrapper container\n ...rest\n}: LocalizedFieldProps) => {\n const [expanded, setExpanded] = useState(\n displayAllLocalesOrCurrencies || defaultExpanded\n );\n\n const msg = useLocalizedStringFormatter(localizedFieldMessagesStrings);\n\n // Used to associate more info dialog with fieldset via `aria-controls`\n const localeFieldsContainerId = useId();\n // Used to associate more info dialog with fieldset via `aria-details`\n const moreDetailsButtonId = useId();\n\n // Either `error` exists, or there are `true` fields in the UI Kit compat `errors` object\n const hasError: boolean = Boolean(\n error || (errors && Object.values(errors).some((error) => error === true))\n );\n\n // Either `warning` exists, or there are `true` fields in the UI Kit compat `warnings` object\n const hasWarning: boolean = Boolean(\n warning || (warnings && Object.values(warnings).some(Boolean))\n );\n\n // FieldGroup is invalid if a non-field-specific error is passed and the group has been touched\n // When FieldGroup is invalid, all fields will display error styling without displaying a field-specific error message\n const isInvalid: boolean = !!(hasError && touched);\n\n const { labelProps, fieldProps, descriptionProps, errorMessageProps } =\n useField({\n id,\n label,\n description,\n errorMessage: error,\n isInvalid,\n });\n\n // Array of locales/currencies to display as input fields\n const localizationKeys: string[] | CurrencyCode[] = Object.keys(\n valuesByLocaleOrCurrency\n );\n\n // Merge all -ByLocaleOrCurrencies data for each field\n const allDataForFields = useMemo(() => {\n const sortedFieldData =\n type === \"money\"\n ? sortCurrencies(\n defaultLocaleOrCurrency as CurrencyCode,\n localizationKeys as CurrencyCode[]\n )\n : sortLocalesByDefaultLocaleLanguage(\n defaultLocaleOrCurrency,\n localizationKeys\n );\n\n return sortedFieldData.reduce(\n (allFieldData: MergedLocaleFieldData[], localizationKey) => {\n const allDataForLocale = {\n localeOrCurrency: localizationKey,\n inputValue:\n type === \"money\"\n ? (valuesByLocaleOrCurrency as LocalizedCurrency)[localizationKey]\n : (valuesByLocaleOrCurrency[localizationKey] as string),\n placeholder: placeholdersByLocaleOrCurrency?.[localizationKey],\n description: descriptionsByLocaleOrCurrency?.[localizationKey],\n warning: warningsByLocaleOrCurrency?.[localizationKey],\n error: errorsByLocaleOrCurrency?.[localizationKey],\n // autoFocus default/first locale field\n ...(localizationKey === defaultLocaleOrCurrency && autoFocus\n ? { autoFocus }\n : {}),\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n };\n if (\n expanded ||\n // Only display defaultLocaleOrInput field if fieldGroup is not expanded\n (!expanded && localizationKey === defaultLocaleOrCurrency)\n ) {\n return [...allFieldData, allDataForLocale];\n }\n return allFieldData;\n },\n []\n );\n }, [\n valuesByLocaleOrCurrency,\n placeholdersByLocaleOrCurrency,\n descriptionsByLocaleOrCurrency,\n warningsByLocaleOrCurrency,\n errorsByLocaleOrCurrency,\n defaultLocaleOrCurrency,\n expanded,\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n ]);\n\n const groupHasInvalidLocalizedFields = getHasInvalidLocalizedFields(\n errorsByLocaleOrCurrency,\n defaultLocaleOrCurrency\n );\n\n const shouldExpandInvalidFields =\n (groupHasInvalidLocalizedFields || hasError) && touched;\n // If there are fields that are invalid, ensure that field group\n // shows all fields so that invalid field is visible\n if (shouldExpandInvalidFields && !expanded) {\n setExpanded(true);\n }\n\n return (\n <LocalizedFieldRootSlot\n {...rest}\n {...fieldProps}\n aria-details={hint ? moreDetailsButtonId : undefined}\n type={type}\n size={size}\n name={name}\n >\n {label && (\n <Stack direction=\"row\" gap=\"0\">\n <LocalizedFieldLabelSlot {...labelProps}>\n {label}\n {isRequired && <sup aria-hidden=\"true\">*</sup>}\n </LocalizedFieldLabelSlot>\n {hint && (\n <RaDialogTrigger>\n <IconButton\n id={moreDetailsButtonId}\n aria-label={msg.format(\"infoBoxTriggerAriaLabel\")}\n size=\"2xs\"\n colorPalette=\"info\"\n variant=\"link\"\n >\n <HelpOutline />\n </IconButton>\n\n <Popover padding={0}>\n <LocalizedFieldInfoDialogSlot asChild>\n <RaDialog>\n <Box p=\"300\">{hint}</Box>\n </RaDialog>\n </LocalizedFieldInfoDialogSlot>\n </Popover>\n </RaDialogTrigger>\n )}\n </Stack>\n )}\n <LocalizedFieldFieldsContainerSlot\n id={localeFieldsContainerId}\n data-expanded={expanded}\n >\n <RaCollection items={allDataForFields}>\n {(item) => {\n return (\n <LocalizedFieldLocaleField\n {...item}\n size={size}\n type={type}\n onChange={onChange}\n onBlur={onBlur}\n onFocus={onFocus}\n touched={touched}\n // Format field attributes to match uikit pattern\n id={getLocaleFieldAttribute(\n fieldProps.id,\n item.localeOrCurrency\n )}\n name={getLocaleFieldAttribute(name, item.localeOrCurrency)}\n data-test={getLocaleFieldAttribute(\n dataTest,\n item.localeOrCurrency\n )}\n data-testid={getLocaleFieldAttribute(\n dataTestId,\n item.localeOrCurrency\n )}\n data-track-component={getLocaleFieldAttribute(\n dataTrackComponent,\n item.localeOrCurrency\n )}\n />\n );\n }}\n </RaCollection>\n </LocalizedFieldFieldsContainerSlot>\n\n {!displayAllLocalesOrCurrencies && localizationKeys.length > 1 && (\n <LocalizedFieldToggleButtonContainerSlot>\n <Button\n aria-controls={localeFieldsContainerId}\n aria-describedby={labelProps.id}\n aria-expanded={expanded}\n onPress={() => setExpanded(!expanded)}\n isDisabled={isDisabled || (shouldExpandInvalidFields && expanded)}\n variant=\"ghost\"\n size=\"2xs\"\n colorPalette=\"primary\"\n >\n <Box\n as={type === \"money\" ? Payments : Language}\n display=\"inline-flex\"\n boxSize=\"400\"\n verticalAlign=\"text-bottom\"\n mr=\"100\"\n />\n {type === \"money\"\n ? expanded\n ? msg.format(\"hideCurrencies\")\n : msg.format(\"showCurrencies\")\n : expanded\n ? msg.format(\"hideLanguages\")\n : msg.format(\"showLanguages\")}\n </Button>\n </LocalizedFieldToggleButtonContainerSlot>\n )}\n {(description || (hasWarning && touched)) && (\n <LocalizedFieldDescriptionSlot\n role={hasWarning && touched ? \"status\" : undefined}\n color={hasWarning && touched ? \"warning.11\" : undefined}\n // In order to associate the warnings from both the warning and legacy warnings props with the fieldset,\n // we must associate, them to this element with aria-labelledby\n aria-labelledby={`${descriptionProps.id}-warning`}\n {...descriptionProps}\n >\n {/** Warnings are for compat with UI Kit localized fields */}\n {hasWarning && touched ? (\n <>\n <Icon colorPalette=\"warning\">\n <WarningAmber />\n </Icon>\n <Stack gap=\"0\" id={`${descriptionProps.id}-warning`}>\n {warning}\n {warnings && hasWarning && (\n <FieldErrors\n errors={warnings}\n renderError={renderWarning}\n colorPalette=\"warning\"\n role={undefined}\n />\n )}\n </Stack>\n </>\n ) : (\n description\n )}\n </LocalizedFieldDescriptionSlot>\n )}\n {isInvalid && (\n <LocalizedFieldErrorSlot\n // In order to associate the errors from both the error and legacy errors props with the fieldset,\n // we must associate them to this element with aria-labelledby.\n aria-labelledby={`${errorMessageProps.id}-error`}\n role=\"alert\"\n {...errorMessageProps}\n >\n <Icon>\n <ErrorOutline />\n </Icon>\n <Stack gap=\"0\" id={`${errorMessageProps.id}-error`}>\n {error}\n {errors && hasError && (\n <FieldErrors\n errors={errors}\n renderError={renderError}\n role={undefined}\n />\n )}\n </Stack>\n </LocalizedFieldErrorSlot>\n )}\n </LocalizedFieldRootSlot>\n );\n};\n","import { LocalizedFieldRoot } from \"./components\";\nimport {\n getLocaleFieldAttribute,\n createLocalizedString,\n isEmpty,\n omitEmptyTranslations,\n isTouched,\n RequiredValueErrorMessage,\n toFieldErrors,\n convertToMoneyValues,\n parseMoneyValues,\n getHighPrecisionCurrencies,\n getEmptyCurrencies,\n} from \"./utils/localized-field.utils\";\n\n/**\n * LocalizedField component with utility methods for managing localized input fields.\n *\n * This component provides a fieldset for managing multiple locale-specific or currency-specific\n * input fields with expand/collapse functionality and integrated validation display.\n *\n * **Utility Methods** (for compatibility with UI Kit):\n * - `getId` / `getName`: Format field attributes with locale suffix\n * - `isTouched`: Check if any locale field has been touched\n * - `isEmpty`: Check if all locale fields are empty\n * - `createLocalizedString`: Create empty localized string object\n * - `omitEmptyTranslations`: Remove empty translations from localized object\n * - `RequiredValueErrorMessage`: Standard error message component\n * - `toFieldErrors`: Convert errors to field error format\n * - `convertToMoneyValues` / `parseMoneyValues`: Money value conversion utilities\n * - `getHighPrecisionCurrencies` / `getEmptyCurrencies`: Currency utilities\n *\n * @example\n * ```tsx\n * <LocalizedField\n * type=\"text\"\n * label=\"Product Name\"\n * defaultLocaleOrCurrency=\"en\"\n * valuesByLocaleOrCurrency={{ en: \"Product\", de: \"Produkt\" }}\n * onChange={(e) => console.log(e.target.locale, e.target.value)}\n * />\n * ```\n */\nexport const LocalizedField = Object.assign(LocalizedFieldRoot, {\n // Add util methods here for compat with uikit - see https://github.com/commercetools/ui-kit/blob/e97e0c7e8f3e9393981bf1949573212d7c571c90/packages/components/inputs/localized-text-input/src/localized-text-input.tsx#L396\n getId: getLocaleFieldAttribute,\n getName: getLocaleFieldAttribute,\n isTouched,\n isEmpty,\n createLocalizedString,\n omitEmptyTranslations,\n RequiredValueErrorMessage,\n toFieldErrors,\n convertToMoneyValues,\n parseMoneyValues,\n getHighPrecisionCurrencies,\n getEmptyCurrencies,\n});\n"],"names":["localizedFieldMessages_en","localizedFieldMessages_de","localizedFieldMessages_es","localizedFieldMessages_fr","localizedFieldMessages_pt","localizedFieldMessagesStrings","normalizeMessages","withProvider","withContext","createSlotRecipeContext","LocalizedFieldRootSlot","LocalizedFieldLabelSlot","LocalizedFieldInfoDialogSlot","LocalizedFieldFieldsContainerSlot","LocalizedFieldDescriptionSlot","LocalizedFieldErrorSlot","LocalizedFieldToggleButtonContainerSlot","LocalizedFieldLocaleFieldRootSlot","LocalizedFieldLocaleFieldLabelSlot","LocalizedFieldLocaleFieldInputSlot","RequiredValueErrorMessage","msg","useLocalizedStringFormatter","FormField","getLocaleFieldAttribute","fieldGroupAttr","locale","getLanguageForLocale","splitLanguages","defaultLocale","locales","defaultLanguage","related","sortLocalesByDefaultLocaleLanguage","allLocales","unrelated","sortCurrencies","defaultCurrency","allCurrencies","remainingCurrencies","currency","getHasInvalidLocalizedFields","errors","defaultLocaleOrCurrency","localeOrCurrency","createLocalizedString","existingLocalizedString","localizedString","isEmpty","value","omitEmptyTranslations","localizedStringWithoutEmptyTranslations","isTouched","touched","toFieldErrors","convertToMoneyValues","values","MoneyInput","parseMoneyValues","moneyValues","allValues","moneyValue","getHighPrecisionCurrencies","currencyCode","getEmptyCurrencies","LocalizedFieldLocaleField","type","size","id","name","inputValueFromProps","description","warning","error","onChange","onBlur","onFocus","isRequired","isReadOnly","isDisabled","isInvalid","otherProps","InputComponent","TextInput","MultilineTextInput","RichTextInput","inputValue","handleChange","useCallback","changeValue","jsx","jsxs","e","Fragment","Icon","WarningAmber","LocalizedField","valuesByLocaleOrCurrency","placeholdersByLocaleOrCurrency","descriptionsByLocaleOrCurrency","warningsByLocaleOrCurrency","errorsByLocaleOrCurrency","label","hint","warnings","renderWarning","renderError","defaultExpanded","displayAllLocalesOrCurrencies","autoFocus","dataTrackComponent","dataTestId","dataTest","rest","expanded","setExpanded","useState","localeFieldsContainerId","useId","moreDetailsButtonId","hasError","hasWarning","labelProps","fieldProps","descriptionProps","errorMessageProps","useField","localizationKeys","allDataForFields","useMemo","allFieldData","localizationKey","allDataForLocale","shouldExpandInvalidFields","Stack","RaDialogTrigger","IconButton","HelpOutline","Popover","RaDialog","Box","RaCollection","item","Button","Payments","Language","FieldErrors","ErrorOutline","LocalizedFieldRoot"],"mappings":"s2BAMAA,GAAe,CACb,eAAgB,sBAChB,cAAe,qB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b,KAAM,MAAA,CAAA,CACR,CAAA,CAEJ,CAAA,CAAA,CACF,EAEAlC,CAAA,CAAA,EAILS,GACCW,EAAAA,KAAC5E,GAAA,CAGC,kBAAiB,GAAG8G,EAAkB,EAAE,SACxC,KAAK,QACJ,GAAGA,EAEJ,SAAA,CAAAnC,EAAAA,IAACI,EAAAA,KAAA,CACC,SAAAJ,EAAAA,IAACyD,EAAAA,aAAA,CAAA,CAAa,EAChB,EACAxD,EAAAA,KAAC2C,EAAAA,OAAM,IAAI,IAAI,GAAI,GAAGT,EAAkB,EAAE,SACvC,SAAA,CAAApD,EACA/B,GAAU8E,GACT9B,EAAAA,IAACwD,GAAAA,YAAA,CACC,OAAAxG,EACA,YAAAgE,EACA,KAAM,MAAA,CAAA,CACR,CAAA,CAEJ,CAAA,CAAA,CAAA,CACF,CAAA,CAAA,CAIR,ECrUaV,GAAiB,OAAO,OAAOoD,GAAoB,CAE9D,MAAO5H,EACP,QAASA,EACT,UAAA4B,GACA,QAAAJ,GACA,sBAAAH,GACA,sBAAAK,GACA,0BAAA9B,GACA,cAAAkC,GACA,qBAAAC,GACA,iBAAAG,GACA,2BAAAI,GACA,mBAAAE,EACF,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { jsx as r, jsxs as c, Fragment as ie } from "react/jsx-runtime";
2
2
  import { n as E, u as ne } from "./normalize-messages-D5T4I93D.es.js";
3
- import { M as k } from "./money-input-D65vrUj4.es.js";
4
- import { F as I } from "./form-field-BfDU18h3.es.js";
3
+ import { M as k } from "./money-input-B5kFhLR0.es.js";
4
+ import { F as I } from "./form-field-DCWDyNJx.es.js";
5
5
  import { useCallback as fe, useState as he, useMemo as Fe } from "react";
6
6
  import { j as be, k as Le } from "./Dialog-B0BQfdQa.es.js";
7
7
  import { g as ve } from "./CollectionBuilder-BOe312C_.es.js";
@@ -9,16 +9,16 @@ import { WarningAmber as se, HelpOutline as xe, Payments as Ie, Language as Me,
9
9
  import { P as $e } from "./popover-CuA9VugH.es.js";
10
10
  import { createSlotRecipeContext as ze } from "@chakra-ui/react";
11
11
  import { I as _ } from "./icon-DJsVh7VR.es.js";
12
- import { R as Se } from "./rich-text-input-CRGUa5d2.es.js";
13
- import { M as we } from "./multiline-text-input-CrDTYrM3.es.js";
14
- import { T as je } from "./text-input-CCiZeQad.es.js";
12
+ import { R as Se } from "./rich-text-input-COjV3y9x.es.js";
13
+ import { M as we } from "./multiline-text-input-DkruVK6m.es.js";
14
+ import { T as je } from "./text-input-UaixbZjE.es.js";
15
15
  import { a as oe } from "./mergeProps-Dsl8k3Ig.es.js";
16
16
  import { $ as Ee } from "./useField-CHrpmkxe.es.js";
17
17
  import { F as re } from "./field-errors-D1BQvoYg.es.js";
18
18
  import { S as D } from "./stack-CoNreM7B.es.js";
19
- import { I as ke } from "./icon-button-CosIm3oY.es.js";
19
+ import { I as ke } from "./icon-button-DhHKxd27.es.js";
20
20
  import { B as te } from "./box-DuBoAZvq.es.js";
21
- import { B as Pe } from "./button-BEJnxXsL.es.js";
21
+ import { B as Pe } from "./button-CANeXX_D.es.js";
22
22
  const Te = {
23
23
  hideCurrencies: "Hide all currencies",
24
24
  hideLanguages: "Hide all languages",
@@ -480,4 +480,4 @@ const no = (e, o) => Object.values(e).map((t) => k.convertToMoneyValue(t, o)), s
480
480
  export {
481
481
  Ao as L
482
482
  };
483
- //# sourceMappingURL=localized-field-DdeHzXdh.es.js.map
483
+ //# sourceMappingURL=localized-field-CHXN7Zf1.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"localized-field-DdeHzXdh.es.js","sources":["../../src/components/localized-field/intl/en.ts","../../src/components/localized-field/intl/de.ts","../../src/components/localized-field/intl/es.ts","../../src/components/localized-field/intl/fr-FR.ts","../../src/components/localized-field/intl/pt-BR.ts","../../src/components/localized-field/localized-field.messages.ts","../../src/components/localized-field/localized-field.slots.tsx","../../src/components/localized-field/utils/localized-field.utils.tsx","../../src/components/localized-field/components/localized-field.locale-field.tsx","../../src/components/localized-field/components/localized-field.root.tsx","../../src/components/localized-field/localized-field.tsx"],"sourcesContent":["/**\n * Pre-compiled en messages for LocalizedField\n * Generated by @internationalized/string-compiler\n * DO NOT EDIT MANUALLY\n */\n\nexport default {\n hideCurrencies: `Hide all currencies`,\n hideLanguages: `Hide all languages`,\n infoBoxTriggerAriaLabel: `more info`,\n missingRequiredField: `This field is required. Provide at least one value.`,\n showCurrencies: `Show all currencies`,\n showLanguages: `Show all languages`,\n};\n","/**\n * Pre-compiled de messages for LocalizedField\n * Generated by @internationalized/string-compiler\n * DO NOT EDIT MANUALLY\n */\n\nexport default {\n hideCurrencies: `Alle Währungen ausblenden`,\n hideLanguages: `Alle Sprachen ausblenden`,\n infoBoxTriggerAriaLabel: `Weitere Informationen`,\n missingRequiredField: `Dies ist ein Pflichtfeld. Bitte geben Sie mindestens einen Wert an.`,\n showCurrencies: `Alle Währungen anzeigen`,\n showLanguages: `Alle Sprachen anzeigen`,\n};\n","/**\n * Pre-compiled es messages for LocalizedField\n * Generated by @internationalized/string-compiler\n * DO NOT EDIT MANUALLY\n */\n\nexport default {\n hideCurrencies: `Ocultar todas las monedas`,\n hideLanguages: `Ocultar todas las monedas`,\n infoBoxTriggerAriaLabel: `más información`,\n missingRequiredField: `Este valor es necesario. Proporciona al menos un valor.`,\n showCurrencies: `Mostrar todas las monedas`,\n showLanguages: `Mostrar todos los idiomas`,\n};\n","/**\n * Pre-compiled fr-FR messages for LocalizedField\n * Generated by @internationalized/string-compiler\n * DO NOT EDIT MANUALLY\n */\n\nexport default {\n hideCurrencies: `Masquer toutes les devises`,\n hideLanguages: `Masquer toutes les langues`,\n infoBoxTriggerAriaLabel: `Plus d'informations`,\n missingRequiredField: `Ce champ est requis. Indiquez au moins une valeur.`,\n showCurrencies: `Afficher toutes les devises`,\n showLanguages: `Afficher toutes les langues`,\n};\n","/**\n * Pre-compiled pt-BR messages for LocalizedField\n * Generated by @internationalized/string-compiler\n * DO NOT EDIT MANUALLY\n */\n\nexport default {\n hideCurrencies: `Ocultar todas as ocorrências`,\n hideLanguages: `Ocultar todos os idiomas`,\n infoBoxTriggerAriaLabel: `mais informações`,\n missingRequiredField: `Este campo é obrigatório. Forneça pelo menos um valor.`,\n showCurrencies: `Mostrar todas as ocorrências`,\n showLanguages: `Mostrar todos os idiomas`,\n};\n","/**\n * Pre-compiled localized messages for LocalizedField component\n *\n * Generated by scripts/generate-dictionaries.ts\n * DO NOT EDIT MANUALLY\n *\n * @see https://react-spectrum.adobe.com/react-aria/internationalization.html\n */\n\nimport {\n type LocalizedString,\n type LocalizedStrings,\n} from \"@internationalized/string\";\nimport { normalizeMessages } from \"../../utils/normalize-messages\";\n\n// Pre-compiled message functions\nimport localizedFieldMessages_en from \"./intl/en\";\nimport localizedFieldMessages_de from \"./intl/de\";\nimport localizedFieldMessages_es from \"./intl/es\";\nimport localizedFieldMessages_fr from \"./intl/fr-FR\";\nimport localizedFieldMessages_pt from \"./intl/pt-BR\";\n\n// Raw LocalizedStrings object for use with useLocalizedStringFormatter hook\nexport const localizedFieldMessagesStrings: LocalizedStrings<\n string,\n LocalizedString\n> = {\n en: normalizeMessages(localizedFieldMessages_en),\n de: normalizeMessages(localizedFieldMessages_de),\n es: normalizeMessages(localizedFieldMessages_es),\n \"fr-FR\": normalizeMessages(localizedFieldMessages_fr),\n \"pt-BR\": normalizeMessages(localizedFieldMessages_pt),\n} as LocalizedStrings<string, LocalizedString>;\n\n/**\n * Available message keys for LocalizedField component\n */\nexport type LocalizedFieldMessageKey =\n | \"hideCurrencies\"\n | \"hideLanguages\"\n | \"infoBoxTriggerAriaLabel\"\n | \"missingRequiredField\"\n | \"showCurrencies\"\n | \"showLanguages\";\n","import { createSlotRecipeContext } from \"@chakra-ui/react\";\nimport type {\n LocalizedFieldRootSlotProps,\n LocalizedFieldLabelSlotProps,\n LocalizedFieldInfoDialogSlotProps,\n LocalizedFieldFieldsContainerSlotProps,\n LocalizedFieldDescriptionSlotProps,\n LocalizedFieldErrorSlotProps,\n LocalizedFieldToggleButtonContainerSlotProps,\n LocalizedFieldLocaleFieldRootSlotProps,\n LocalizedFieldLocaleFieldLabelSlotProps,\n LocalizedFieldLocaleFieldInputSlotProps,\n} from \"./localized-field.types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"localizedField\",\n});\n\n// Root Slot\nexport const LocalizedFieldRootSlot = withProvider<\n HTMLFieldSetElement,\n LocalizedFieldRootSlotProps\n>(\"fieldset\", \"root\");\n\n// Label Slot\nexport const LocalizedFieldLabelSlot = withContext<\n HTMLLabelElement,\n LocalizedFieldLabelSlotProps\n>(\"legend\", \"label\");\n\n// InfoDialog Slot\nexport const LocalizedFieldInfoDialogSlot = withContext<\n HTMLDivElement,\n LocalizedFieldInfoDialogSlotProps\n>(\"div\", \"infoDialog\");\n\n// FieldsContainer Slot\nexport const LocalizedFieldFieldsContainerSlot = withContext<\n HTMLDivElement,\n LocalizedFieldFieldsContainerSlotProps\n>(\"div\", \"fieldsContainer\");\n\n// Description Slot\nexport const LocalizedFieldDescriptionSlot = withContext<\n HTMLDivElement,\n LocalizedFieldDescriptionSlotProps\n>(\"div\", \"description\");\n\n// Error Slot\nexport const LocalizedFieldErrorSlot = withContext<\n HTMLDivElement,\n LocalizedFieldErrorSlotProps\n>(\"div\", \"error\");\n\n// ToggleButtonContainer Slot\nexport const LocalizedFieldToggleButtonContainerSlot = withContext<\n HTMLDivElement,\n LocalizedFieldToggleButtonContainerSlotProps\n>(\"div\", \"toggleButtonContainer\");\n\n// LocaleFieldRoot Slot\nexport const LocalizedFieldLocaleFieldRootSlot = withContext<\n HTMLDivElement,\n LocalizedFieldLocaleFieldRootSlotProps\n>(\"div\", \"localeFieldRoot\");\n\n// FieldLabel Slot\nexport const LocalizedFieldLocaleFieldLabelSlot = withContext<\n HTMLDivElement,\n LocalizedFieldLocaleFieldLabelSlotProps\n>(\"div\", \"localeFieldLabel\");\n\n// FieldInput Slot\nexport const LocalizedFieldLocaleFieldInputSlot = withContext<\n HTMLDivElement,\n LocalizedFieldLocaleFieldInputSlotProps\n>(\"div\", \"localeFieldInput\");\n","import {\n FormField,\n type CurrencyCode,\n type MoneyInputValue,\n type MoneyValue,\n type FieldErrorsData,\n MoneyInput,\n} from \"@/components\";\nimport { useLocalizedStringFormatter } from \"@/hooks\";\nimport { localizedFieldMessagesStrings } from \"../localized-field.messages\";\nimport type { LocalizedString } from \"../localized-field.types\";\n\ntype LanguagesSplitByDefaultLocale = {\n related: string[];\n unrelated: string[];\n};\n\ntype TouchedLocalizedString = { [locale: string]: boolean };\n\ntype CustomFormikErrors<Values> = {\n [K in keyof Values]?: FieldErrorsData;\n};\n\nexport const RequiredValueErrorMessage = () => {\n const msg = useLocalizedStringFormatter(localizedFieldMessagesStrings);\n return (\n <FormField.Error>{msg.format(\"missingRequiredField\")}</FormField.Error>\n );\n};\n\nexport const getLocaleFieldAttribute = (\n fieldGroupAttr?: string,\n locale?: string\n): string | undefined =>\n fieldGroupAttr && locale ? `${fieldGroupAttr}.${locale}` : undefined;\n\n// gets the language tag of a given locale, e.g. `de` in `de-DE`\nexport const getLanguageForLocale = (locale: string): string =>\n locale.split(\"-\")[0];\n\n// splits the locales into two groups:\n// - the 'related' array contains locales with the same language tag as the default locale,\n// e.g. if the default locale is de-DE, related would be ['de-DE', 'de-CH']\n// - the 'unrelated' array contains locales with a different different language tag from the default locale\n//. e.g. if the default locale is de-DE, unrelated would be ['pt-BR', 'en-GB', 'zh-Hans']\nexport const splitLanguages = (\n defaultLocale: string,\n locales: string[]\n): LanguagesSplitByDefaultLocale => {\n const defaultLanguage = getLanguageForLocale(defaultLocale);\n const related = locales.filter(\n (locale) => getLanguageForLocale(locale) === defaultLanguage\n );\n const unrelated = locales.filter(\n (locale) => getLanguageForLocale(locale) !== defaultLanguage\n );\n return {\n unrelated,\n related,\n };\n};\n\n// sorts locales with the following priority:\n// - The selected locale is placed first (e.g pt-BR)\n// - All locales using the same language tag as the selected language\n// follow (e.g. pt, pt-PT). They are sorted alphabetically.\n// - All other locales follow, sorted alphabetically as well\nexport const sortLocalesByDefaultLocaleLanguage = (\n defaultLocale: string,\n allLocales: string[]\n): string[] => {\n const { related, unrelated } = splitLanguages(\n defaultLocale,\n allLocales.filter((locale: string) => locale !== defaultLocale)\n );\n\n return [defaultLocale, ...related.sort(), ...unrelated.sort()];\n};\n\nexport const sortCurrencies = (\n defaultCurrency: CurrencyCode,\n allCurrencies: CurrencyCode[]\n) => {\n const remainingCurrencies = allCurrencies.filter(\n (currency) => currency !== defaultCurrency\n );\n return [defaultCurrency, ...remainingCurrencies.sort()];\n};\n\nexport const getHasInvalidLocalizedFields = <TErrors extends object>(\n errors?: TErrors,\n defaultLocaleOrCurrency?: string\n): boolean => {\n if (errors && Object.keys(errors).length > 0 && defaultLocaleOrCurrency) {\n return Object.keys(errors).some(\n (localeOrCurrency) => localeOrCurrency !== defaultLocaleOrCurrency\n );\n }\n return false;\n};\n\nexport const createLocalizedString = (\n locales: string[],\n existingLocalizedString: LocalizedString\n): LocalizedString => {\n const localesInLocalizedString = Array.from(\n new Set([...locales, ...Object.keys(existingLocalizedString)])\n );\n\n return localesInLocalizedString.reduce<LocalizedString>(\n (localizedString, locale) => ({\n ...localizedString,\n [locale]: existingLocalizedString?.[locale] || \"\",\n }),\n {}\n );\n};\n\n// Note: I prefer `isLocalizedStringEmpty`, but keeping this as `isEmpty` for api consistency with UI Kit\nexport const isEmpty = (localizedString?: LocalizedString): boolean => {\n if (!localizedString) return true;\n return Object.values(localizedString).every(\n (value?: string) => !value || value?.trim().length === 0\n );\n};\n\nexport const omitEmptyTranslations = <Translations extends LocalizedString>(\n localizedString: Translations\n): LocalizedString => {\n // TODO: is it necessary to create a util that enforces a consistent warning/error format, e.g.\n // `<COMPONENT_NAME> - Warning: <WARNING_MESSAGE>`\n if (typeof localizedString !== \"object\") {\n console.warn(\n \"Nimbus Localized Field - Warning: omitEmptyTranslations must be called with an object\"\n );\n }\n\n return Object.entries(localizedString).reduce<LocalizedString>(\n (localizedStringWithoutEmptyTranslations, [locale, value]) => {\n if (value && value.trim().length > 0) {\n return {\n ...localizedStringWithoutEmptyTranslations,\n [locale]: value,\n };\n }\n return localizedStringWithoutEmptyTranslations;\n },\n {}\n );\n};\n\nexport const isTouched = (touched?: TouchedLocalizedString): boolean => {\n if (touched) {\n return Object.values(touched).some(Boolean);\n }\n return false;\n};\n\n/**\n * Use this function to convert the Formik `errors` object type to\n * our custom field errors type.\n * This is primarly useful when using TypeScript.\n */\nexport function toFieldErrors<FormValues>(\n errors: unknown\n): CustomFormikErrors<FormValues> {\n return errors as CustomFormikErrors<FormValues>;\n}\n\nexport const convertToMoneyValues = (\n values: MoneyInputValue[],\n currency: string\n): Array<MoneyValue | null> =>\n Object.values(values).map<MoneyValue | null>((value) => {\n return MoneyInput.convertToMoneyValue(value, currency);\n });\n\nexport const parseMoneyValues = (\n moneyValues: MoneyValue[] = [],\n locale: string\n): Record<CurrencyCode, MoneyInputValue> =>\n moneyValues.reduce<Record<CurrencyCode, MoneyInputValue>>(\n (allValues, moneyValue) => {\n const value = MoneyInput.parseMoneyValue(moneyValue, locale);\n return {\n ...allValues,\n [value.currencyCode]: value,\n };\n },\n {} as Record<CurrencyCode, MoneyInputValue>\n );\n\nexport const getHighPrecisionCurrencies = (\n values: Record<CurrencyCode, MoneyInputValue>,\n locale: string\n): CurrencyCode[] => {\n const typedCurrencyCodes = Object.keys(values) as CurrencyCode[];\n return typedCurrencyCodes.filter((currencyCode) =>\n MoneyInput.isHighPrecision(values[currencyCode], locale)\n );\n};\n\nexport const getEmptyCurrencies = (\n values: Record<CurrencyCode, MoneyInputValue>\n): CurrencyCode[] => {\n const typedCurrencyCodes = Object.keys(values) as CurrencyCode[];\n return typedCurrencyCodes.filter((currencyCode) =>\n MoneyInput.isEmpty(values[currencyCode])\n );\n};\n","import { useCallback } from \"react\";\nimport {\n FormField,\n Icon,\n TextInput,\n MoneyInput,\n type CustomEvent,\n MultilineTextInput,\n RichTextInput,\n type MoneyInputValue,\n type CurrencyCode,\n} from \"@/components\";\nimport { WarningAmber } from \"@commercetools/nimbus-icons\";\nimport {\n LocalizedFieldLocaleFieldRootSlot,\n LocalizedFieldLocaleFieldInputSlot,\n LocalizedFieldLocaleFieldLabelSlot,\n} from \"../localized-field.slots\";\nimport type { LocalizedFieldLocaleFieldProps } from \"../localized-field.types\";\n\n/**\n * LocalizedFieldLocaleField - Individual locale or currency input field\n *\n * Renders a single input field for a specific locale or currency with integrated\n * label, description, warning, and error message display. Supports text, multiline,\n * richText, and money input types.\n *\n * @supportsStyleProps\n */\nexport const LocalizedFieldLocaleField = ({\n type,\n size,\n localeOrCurrency,\n id,\n name,\n inputValue: inputValueFromProps,\n description,\n warning,\n error,\n onChange,\n onBlur,\n onFocus,\n isRequired,\n isReadOnly,\n isDisabled,\n isInvalid,\n touched,\n ...otherProps\n}: LocalizedFieldLocaleFieldProps) => {\n let InputComponent:\n | typeof TextInput\n | typeof MultilineTextInput\n | typeof MoneyInput\n | typeof RichTextInput;\n switch (type) {\n case \"text\":\n default:\n InputComponent = TextInput;\n break;\n case \"multiLine\":\n InputComponent = MultilineTextInput;\n break;\n case \"money\":\n InputComponent = MoneyInput;\n break;\n case \"richText\":\n InputComponent = RichTextInput;\n break;\n }\n\n const getInputValue = () => {\n if (type === \"money\") {\n return inputValueFromProps\n ? (inputValueFromProps as MoneyInputValue)\n : ({ amount: \"\", currencyCode: localeOrCurrency } as MoneyInputValue);\n }\n return inputValueFromProps ? inputValueFromProps : \"\";\n };\n\n const inputValue = getInputValue();\n\n const handleChange = useCallback(\n (value: string | CustomEvent | undefined) => {\n // The `MoneyInput` onChange event value is a custom value,\n // and the `MoneyInput` modifies the input id and name since it is in a `group`,\n // so we need to build a separate return object for the MoneInput to return\n // the expected values\n const isMoneyInputEvent = typeof value === \"object\";\n const changeValue = {\n target: isMoneyInputEvent\n ? {\n id: value.target.id,\n name: value.target.name,\n locale: undefined,\n currency: localeOrCurrency as CurrencyCode,\n value: value.target.value,\n }\n : { id, name, locale: localeOrCurrency, currency: undefined, value },\n };\n onChange(changeValue);\n },\n [id, name, localeOrCurrency, onChange]\n );\n\n return (\n <LocalizedFieldLocaleFieldRootSlot asChild>\n <FormField.Root\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n isInvalid={(isInvalid || !!error) && touched}\n direction=\"row\"\n size={size}\n id={id}\n >\n <LocalizedFieldLocaleFieldLabelSlot\n display={type === \"money\" ? \"none\" : undefined}\n {...(isDisabled && { \"data-disabled\": isDisabled })}\n asChild\n >\n <FormField.Label>\n {localeOrCurrency.toLocaleUpperCase()}\n </FormField.Label>\n </LocalizedFieldLocaleFieldLabelSlot>\n <FormField.Input>\n <LocalizedFieldLocaleFieldInputSlot\n aria-required={isRequired}\n asChild\n >\n <InputComponent\n {...otherProps}\n size={size}\n value={inputValue as string & MoneyInputValue}\n onChange={handleChange}\n onBlur={(e: React.FocusEvent | CustomEvent) =>\n onBlur?.(e, localeOrCurrency)\n }\n onFocus={(e: React.FocusEvent | CustomEvent) =>\n onFocus?.(e, localeOrCurrency)\n }\n isRequired={isRequired}\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n isInvalid={(isInvalid || !!error) && touched}\n />\n </LocalizedFieldLocaleFieldInputSlot>\n </FormField.Input>\n {(description || (warning && touched)) && (\n <FormField.Description\n role={warning && touched ? \"status\" : undefined}\n color={warning && touched ? \"warning.11\" : undefined}\n display=\"flex\"\n gap=\"100\"\n alignItems=\"center\"\n >\n {warning && touched ? (\n <>\n <Icon colorPalette=\"warning\">\n <WarningAmber />\n </Icon>\n {warning}\n </>\n ) : (\n description\n )}\n </FormField.Description>\n )}\n {error && touched && <FormField.Error>{error}</FormField.Error>}\n </FormField.Root>\n </LocalizedFieldLocaleFieldRootSlot>\n );\n};\n","import { useState, useMemo } from \"react\";\nimport {\n Collection as RaCollection,\n Dialog as RaDialog,\n DialogTrigger as RaDialogTrigger,\n} from \"react-aria-components\";\nimport { useField, useId } from \"react-aria\";\nimport {\n ErrorOutline,\n HelpOutline,\n Language,\n Payments,\n WarningAmber,\n} from \"@commercetools/nimbus-icons\";\nimport {\n Box,\n Button,\n FieldErrors,\n Icon,\n IconButton,\n Stack,\n type CurrencyCode,\n} from \"@/components\";\nimport { Popover } from \"../../popover\";\nimport { useLocalizedStringFormatter } from \"@/hooks\";\nimport { localizedFieldMessagesStrings } from \"../localized-field.messages\";\nimport {\n LocalizedFieldRootSlot,\n LocalizedFieldLabelSlot,\n LocalizedFieldInfoDialogSlot,\n LocalizedFieldFieldsContainerSlot,\n LocalizedFieldDescriptionSlot,\n LocalizedFieldErrorSlot,\n LocalizedFieldToggleButtonContainerSlot,\n} from \"../localized-field.slots\";\nimport type {\n LocalizedFieldProps,\n MergedLocaleFieldData,\n LocalizedCurrency,\n} from \"../localized-field.types\";\n\nimport {\n getHasInvalidLocalizedFields,\n getLocaleFieldAttribute,\n sortCurrencies,\n sortLocalesByDefaultLocaleLanguage,\n} from \"../utils/localized-field.utils\";\nimport { LocalizedFieldLocaleField } from \"./localized-field.locale-field\";\n\n/**\n * LocalizedField - Root component for managing localized input fields\n *\n * Provides a fieldset container for multiple locale-specific or currency-specific input fields\n * with expand/collapse functionality and integrated validation display. Supports text, multiline,\n * richText, and money input types.\n *\n * @supportsStyleProps\n */\nexport const LocalizedField = ({\n type = \"text\",\n id,\n name,\n defaultLocaleOrCurrency,\n valuesByLocaleOrCurrency,\n placeholdersByLocaleOrCurrency,\n descriptionsByLocaleOrCurrency,\n warningsByLocaleOrCurrency,\n errorsByLocaleOrCurrency,\n label,\n hint,\n description,\n warning,\n warnings,\n renderWarning,\n error,\n errors,\n renderError,\n touched,\n isRequired,\n isDisabled,\n isReadOnly,\n onChange,\n onBlur,\n onFocus,\n defaultExpanded = false,\n displayAllLocalesOrCurrencies = false,\n size,\n autoFocus,\n [\"data-track-component\"]: dataTrackComponent,\n [\"data-testid\"]: dataTestId,\n [\"data-test\"]: dataTest,\n // DOM & Style props for wrapper container\n ...rest\n}: LocalizedFieldProps) => {\n const [expanded, setExpanded] = useState(\n displayAllLocalesOrCurrencies || defaultExpanded\n );\n\n const msg = useLocalizedStringFormatter(localizedFieldMessagesStrings);\n\n // Used to associate more info dialog with fieldset via `aria-controls`\n const localeFieldsContainerId = useId();\n // Used to associate more info dialog with fieldset via `aria-details`\n const moreDetailsButtonId = useId();\n\n // Either `error` exists, or there are `true` fields in the UI Kit compat `errors` object\n const hasError: boolean = Boolean(\n error || (errors && Object.values(errors).some((error) => error === true))\n );\n\n // Either `warning` exists, or there are `true` fields in the UI Kit compat `warnings` object\n const hasWarning: boolean = Boolean(\n warning || (warnings && Object.values(warnings).some(Boolean))\n );\n\n // FieldGroup is invalid if a non-field-specific error is passed and the group has been touched\n // When FieldGroup is invalid, all fields will display error styling without displaying a field-specific error message\n const isInvalid: boolean = !!(hasError && touched);\n\n const { labelProps, fieldProps, descriptionProps, errorMessageProps } =\n useField({\n id,\n label,\n description,\n errorMessage: error,\n isInvalid,\n });\n\n // Array of locales/currencies to display as input fields\n const localizationKeys: string[] | CurrencyCode[] = Object.keys(\n valuesByLocaleOrCurrency\n );\n\n // Merge all -ByLocaleOrCurrencies data for each field\n const allDataForFields = useMemo(() => {\n const sortedFieldData =\n type === \"money\"\n ? sortCurrencies(\n defaultLocaleOrCurrency as CurrencyCode,\n localizationKeys as CurrencyCode[]\n )\n : sortLocalesByDefaultLocaleLanguage(\n defaultLocaleOrCurrency,\n localizationKeys\n );\n\n return sortedFieldData.reduce(\n (allFieldData: MergedLocaleFieldData[], localizationKey) => {\n const allDataForLocale = {\n localeOrCurrency: localizationKey,\n inputValue:\n type === \"money\"\n ? (valuesByLocaleOrCurrency as LocalizedCurrency)[localizationKey]\n : (valuesByLocaleOrCurrency[localizationKey] as string),\n placeholder: placeholdersByLocaleOrCurrency?.[localizationKey],\n description: descriptionsByLocaleOrCurrency?.[localizationKey],\n warning: warningsByLocaleOrCurrency?.[localizationKey],\n error: errorsByLocaleOrCurrency?.[localizationKey],\n // autoFocus default/first locale field\n ...(localizationKey === defaultLocaleOrCurrency && autoFocus\n ? { autoFocus }\n : {}),\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n };\n if (\n expanded ||\n // Only display defaultLocaleOrInput field if fieldGroup is not expanded\n (!expanded && localizationKey === defaultLocaleOrCurrency)\n ) {\n return [...allFieldData, allDataForLocale];\n }\n return allFieldData;\n },\n []\n );\n }, [\n valuesByLocaleOrCurrency,\n placeholdersByLocaleOrCurrency,\n descriptionsByLocaleOrCurrency,\n warningsByLocaleOrCurrency,\n errorsByLocaleOrCurrency,\n defaultLocaleOrCurrency,\n expanded,\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n ]);\n\n const groupHasInvalidLocalizedFields = getHasInvalidLocalizedFields(\n errorsByLocaleOrCurrency,\n defaultLocaleOrCurrency\n );\n\n const shouldExpandInvalidFields =\n (groupHasInvalidLocalizedFields || hasError) && touched;\n // If there are fields that are invalid, ensure that field group\n // shows all fields so that invalid field is visible\n if (shouldExpandInvalidFields && !expanded) {\n setExpanded(true);\n }\n\n return (\n <LocalizedFieldRootSlot\n {...rest}\n {...fieldProps}\n aria-details={hint ? moreDetailsButtonId : undefined}\n type={type}\n size={size}\n name={name}\n >\n {label && (\n <Stack direction=\"row\" gap=\"0\">\n <LocalizedFieldLabelSlot {...labelProps}>\n {label}\n {isRequired && <sup aria-hidden=\"true\">*</sup>}\n </LocalizedFieldLabelSlot>\n {hint && (\n <RaDialogTrigger>\n <IconButton\n id={moreDetailsButtonId}\n aria-label={msg.format(\"infoBoxTriggerAriaLabel\")}\n size=\"2xs\"\n colorPalette=\"info\"\n variant=\"link\"\n >\n <HelpOutline />\n </IconButton>\n\n <Popover padding={0}>\n <LocalizedFieldInfoDialogSlot asChild>\n <RaDialog>\n <Box p=\"300\">{hint}</Box>\n </RaDialog>\n </LocalizedFieldInfoDialogSlot>\n </Popover>\n </RaDialogTrigger>\n )}\n </Stack>\n )}\n <LocalizedFieldFieldsContainerSlot\n id={localeFieldsContainerId}\n data-expanded={expanded}\n >\n <RaCollection items={allDataForFields}>\n {(item) => {\n return (\n <LocalizedFieldLocaleField\n {...item}\n size={size}\n type={type}\n onChange={onChange}\n onBlur={onBlur}\n onFocus={onFocus}\n touched={touched}\n // Format field attributes to match uikit pattern\n id={getLocaleFieldAttribute(\n fieldProps.id,\n item.localeOrCurrency\n )}\n name={getLocaleFieldAttribute(name, item.localeOrCurrency)}\n data-test={getLocaleFieldAttribute(\n dataTest,\n item.localeOrCurrency\n )}\n data-testid={getLocaleFieldAttribute(\n dataTestId,\n item.localeOrCurrency\n )}\n data-track-component={getLocaleFieldAttribute(\n dataTrackComponent,\n item.localeOrCurrency\n )}\n />\n );\n }}\n </RaCollection>\n </LocalizedFieldFieldsContainerSlot>\n\n {!displayAllLocalesOrCurrencies && localizationKeys.length > 1 && (\n <LocalizedFieldToggleButtonContainerSlot>\n <Button\n aria-controls={localeFieldsContainerId}\n aria-describedby={labelProps.id}\n aria-expanded={expanded}\n onPress={() => setExpanded(!expanded)}\n isDisabled={isDisabled || (shouldExpandInvalidFields && expanded)}\n variant=\"ghost\"\n size=\"2xs\"\n colorPalette=\"primary\"\n >\n <Box\n as={type === \"money\" ? Payments : Language}\n display=\"inline-flex\"\n boxSize=\"400\"\n verticalAlign=\"text-bottom\"\n mr=\"100\"\n />\n {type === \"money\"\n ? expanded\n ? msg.format(\"hideCurrencies\")\n : msg.format(\"showCurrencies\")\n : expanded\n ? msg.format(\"hideLanguages\")\n : msg.format(\"showLanguages\")}\n </Button>\n </LocalizedFieldToggleButtonContainerSlot>\n )}\n {(description || (hasWarning && touched)) && (\n <LocalizedFieldDescriptionSlot\n role={hasWarning && touched ? \"status\" : undefined}\n color={hasWarning && touched ? \"warning.11\" : undefined}\n // In order to associate the warnings from both the warning and legacy warnings props with the fieldset,\n // we must associate, them to this element with aria-labelledby\n aria-labelledby={`${descriptionProps.id}-warning`}\n {...descriptionProps}\n >\n {/** Warnings are for compat with UI Kit localized fields */}\n {hasWarning && touched ? (\n <>\n <Icon colorPalette=\"warning\">\n <WarningAmber />\n </Icon>\n <Stack gap=\"0\" id={`${descriptionProps.id}-warning`}>\n {warning}\n {warnings && hasWarning && (\n <FieldErrors\n errors={warnings}\n renderError={renderWarning}\n colorPalette=\"warning\"\n role={undefined}\n />\n )}\n </Stack>\n </>\n ) : (\n description\n )}\n </LocalizedFieldDescriptionSlot>\n )}\n {isInvalid && (\n <LocalizedFieldErrorSlot\n // In order to associate the errors from both the error and legacy errors props with the fieldset,\n // we must associate them to this element with aria-labelledby.\n aria-labelledby={`${errorMessageProps.id}-error`}\n role=\"alert\"\n {...errorMessageProps}\n >\n <Icon>\n <ErrorOutline />\n </Icon>\n <Stack gap=\"0\" id={`${errorMessageProps.id}-error`}>\n {error}\n {errors && hasError && (\n <FieldErrors\n errors={errors}\n renderError={renderError}\n role={undefined}\n />\n )}\n </Stack>\n </LocalizedFieldErrorSlot>\n )}\n </LocalizedFieldRootSlot>\n );\n};\n","import { LocalizedFieldRoot } from \"./components\";\nimport {\n getLocaleFieldAttribute,\n createLocalizedString,\n isEmpty,\n omitEmptyTranslations,\n isTouched,\n RequiredValueErrorMessage,\n toFieldErrors,\n convertToMoneyValues,\n parseMoneyValues,\n getHighPrecisionCurrencies,\n getEmptyCurrencies,\n} from \"./utils/localized-field.utils\";\n\n/**\n * LocalizedField component with utility methods for managing localized input fields.\n *\n * This component provides a fieldset for managing multiple locale-specific or currency-specific\n * input fields with expand/collapse functionality and integrated validation display.\n *\n * **Utility Methods** (for compatibility with UI Kit):\n * - `getId` / `getName`: Format field attributes with locale suffix\n * - `isTouched`: Check if any locale field has been touched\n * - `isEmpty`: Check if all locale fields are empty\n * - `createLocalizedString`: Create empty localized string object\n * - `omitEmptyTranslations`: Remove empty translations from localized object\n * - `RequiredValueErrorMessage`: Standard error message component\n * - `toFieldErrors`: Convert errors to field error format\n * - `convertToMoneyValues` / `parseMoneyValues`: Money value conversion utilities\n * - `getHighPrecisionCurrencies` / `getEmptyCurrencies`: Currency utilities\n *\n * @example\n * ```tsx\n * <LocalizedField\n * type=\"text\"\n * label=\"Product Name\"\n * defaultLocaleOrCurrency=\"en\"\n * valuesByLocaleOrCurrency={{ en: \"Product\", de: \"Produkt\" }}\n * onChange={(e) => console.log(e.target.locale, e.target.value)}\n * />\n * ```\n */\nexport const LocalizedField = Object.assign(LocalizedFieldRoot, {\n // Add util methods here for compat with uikit - see https://github.com/commercetools/ui-kit/blob/e97e0c7e8f3e9393981bf1949573212d7c571c90/packages/components/inputs/localized-text-input/src/localized-text-input.tsx#L396\n getId: getLocaleFieldAttribute,\n getName: getLocaleFieldAttribute,\n isTouched,\n isEmpty,\n createLocalizedString,\n omitEmptyTranslations,\n RequiredValueErrorMessage,\n toFieldErrors,\n convertToMoneyValues,\n parseMoneyValues,\n getHighPrecisionCurrencies,\n getEmptyCurrencies,\n});\n"],"names":["localizedFieldMessages_en","localizedFieldMessages_de","localizedFieldMessages_es","localizedFieldMessages_fr","localizedFieldMessages_pt","localizedFieldMessagesStrings","normalizeMessages","withProvider","withContext","createSlotRecipeContext","LocalizedFieldRootSlot","LocalizedFieldLabelSlot","LocalizedFieldInfoDialogSlot","LocalizedFieldFieldsContainerSlot","LocalizedFieldDescriptionSlot","LocalizedFieldErrorSlot","LocalizedFieldToggleButtonContainerSlot","LocalizedFieldLocaleFieldRootSlot","LocalizedFieldLocaleFieldLabelSlot","LocalizedFieldLocaleFieldInputSlot","RequiredValueErrorMessage","msg","useLocalizedStringFormatter","FormField","getLocaleFieldAttribute","fieldGroupAttr","locale","getLanguageForLocale","splitLanguages","defaultLocale","locales","defaultLanguage","related","sortLocalesByDefaultLocaleLanguage","allLocales","unrelated","sortCurrencies","defaultCurrency","allCurrencies","remainingCurrencies","currency","getHasInvalidLocalizedFields","errors","defaultLocaleOrCurrency","localeOrCurrency","createLocalizedString","existingLocalizedString","localizedString","isEmpty","value","omitEmptyTranslations","localizedStringWithoutEmptyTranslations","isTouched","touched","toFieldErrors","convertToMoneyValues","values","MoneyInput","parseMoneyValues","moneyValues","allValues","moneyValue","getHighPrecisionCurrencies","currencyCode","getEmptyCurrencies","LocalizedFieldLocaleField","type","size","id","name","inputValueFromProps","description","warning","error","onChange","onBlur","onFocus","isRequired","isReadOnly","isDisabled","isInvalid","otherProps","InputComponent","TextInput","MultilineTextInput","RichTextInput","inputValue","handleChange","useCallback","changeValue","jsx","jsxs","e","Fragment","Icon","WarningAmber","LocalizedField","valuesByLocaleOrCurrency","placeholdersByLocaleOrCurrency","descriptionsByLocaleOrCurrency","warningsByLocaleOrCurrency","errorsByLocaleOrCurrency","label","hint","warnings","renderWarning","renderError","defaultExpanded","displayAllLocalesOrCurrencies","autoFocus","dataTrackComponent","dataTestId","dataTest","rest","expanded","setExpanded","useState","localeFieldsContainerId","useId","moreDetailsButtonId","hasError","hasWarning","labelProps","fieldProps","descriptionProps","errorMessageProps","useField","localizationKeys","allDataForFields","useMemo","allFieldData","localizationKey","allDataForLocale","shouldExpandInvalidFields","Stack","RaDialogTrigger","IconButton","HelpOutline","Popover","RaDialog","Box","RaCollection","item","Button","Payments","Language","FieldErrors","ErrorOutline","LocalizedFieldRoot"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAMA,MAAAA,KAAe;AAAA,EACb,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,yBAAyB;AAAA,EACzB,sBAAsB;AAAA,EACtB,gBAAgB;AAAA,EAChB,eAAe;AACjB,GCPAC,KAAe;AAAA,EACb,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,yBAAyB;AAAA,EACzB,sBAAsB;AAAA,EACtB,gBAAgB;AAAA,EAChB,eAAe;AACjB,GCPAC,KAAe;AAAA,EACb,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,yBAAyB;AAAA,EACzB,sBAAsB;AAAA,EACtB,gBAAgB;AAAA,EAChB,eAAe;AACjB,GCPAC,KAAe;AAAA,EACb,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,yBAAyB;AAAA,EACzB,sBAAsB;AAAA,EACtB,gBA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,EACT,WAAA4B;AAAA,EACA,SAAAJ;AAAA,EACA,uBAAAH;AAAA,EACA,uBAAAK;AAAA,EACA,2BAAA9B;AAAA,EACA,eAAAkC;AAAA,EACA,sBAAAC;AAAA,EACA,kBAAAG;AAAA,EACA,4BAAAI;AAAA,EACA,oBAAAE;AACF,CAAC;"}
1
+ {"version":3,"file":"localized-field-CHXN7Zf1.es.js","sources":["../../src/components/localized-field/intl/en.ts","../../src/components/localized-field/intl/de.ts","../../src/components/localized-field/intl/es.ts","../../src/components/localized-field/intl/fr-FR.ts","../../src/components/localized-field/intl/pt-BR.ts","../../src/components/localized-field/localized-field.messages.ts","../../src/components/localized-field/localized-field.slots.tsx","../../src/components/localized-field/utils/localized-field.utils.tsx","../../src/components/localized-field/components/localized-field.locale-field.tsx","../../src/components/localized-field/components/localized-field.root.tsx","../../src/components/localized-field/localized-field.tsx"],"sourcesContent":["/**\n * Pre-compiled en messages for LocalizedField\n * Generated by @internationalized/string-compiler\n * DO NOT EDIT MANUALLY\n */\n\nexport default {\n hideCurrencies: `Hide all currencies`,\n hideLanguages: `Hide all languages`,\n infoBoxTriggerAriaLabel: `more info`,\n missingRequiredField: `This field is required. Provide at least one value.`,\n showCurrencies: `Show all currencies`,\n showLanguages: `Show all languages`,\n};\n","/**\n * Pre-compiled de messages for LocalizedField\n * Generated by @internationalized/string-compiler\n * DO NOT EDIT MANUALLY\n */\n\nexport default {\n hideCurrencies: `Alle Währungen ausblenden`,\n hideLanguages: `Alle Sprachen ausblenden`,\n infoBoxTriggerAriaLabel: `Weitere Informationen`,\n missingRequiredField: `Dies ist ein Pflichtfeld. Bitte geben Sie mindestens einen Wert an.`,\n showCurrencies: `Alle Währungen anzeigen`,\n showLanguages: `Alle Sprachen anzeigen`,\n};\n","/**\n * Pre-compiled es messages for LocalizedField\n * Generated by @internationalized/string-compiler\n * DO NOT EDIT MANUALLY\n */\n\nexport default {\n hideCurrencies: `Ocultar todas las monedas`,\n hideLanguages: `Ocultar todas las monedas`,\n infoBoxTriggerAriaLabel: `más información`,\n missingRequiredField: `Este valor es necesario. Proporciona al menos un valor.`,\n showCurrencies: `Mostrar todas las monedas`,\n showLanguages: `Mostrar todos los idiomas`,\n};\n","/**\n * Pre-compiled fr-FR messages for LocalizedField\n * Generated by @internationalized/string-compiler\n * DO NOT EDIT MANUALLY\n */\n\nexport default {\n hideCurrencies: `Masquer toutes les devises`,\n hideLanguages: `Masquer toutes les langues`,\n infoBoxTriggerAriaLabel: `Plus d'informations`,\n missingRequiredField: `Ce champ est requis. Indiquez au moins une valeur.`,\n showCurrencies: `Afficher toutes les devises`,\n showLanguages: `Afficher toutes les langues`,\n};\n","/**\n * Pre-compiled pt-BR messages for LocalizedField\n * Generated by @internationalized/string-compiler\n * DO NOT EDIT MANUALLY\n */\n\nexport default {\n hideCurrencies: `Ocultar todas as ocorrências`,\n hideLanguages: `Ocultar todos os idiomas`,\n infoBoxTriggerAriaLabel: `mais informações`,\n missingRequiredField: `Este campo é obrigatório. Forneça pelo menos um valor.`,\n showCurrencies: `Mostrar todas as ocorrências`,\n showLanguages: `Mostrar todos os idiomas`,\n};\n","/**\n * Pre-compiled localized messages for LocalizedField component\n *\n * Generated by scripts/generate-dictionaries.ts\n * DO NOT EDIT MANUALLY\n *\n * @see https://react-spectrum.adobe.com/react-aria/internationalization.html\n */\n\nimport {\n type LocalizedString,\n type LocalizedStrings,\n} from \"@internationalized/string\";\nimport { normalizeMessages } from \"../../utils/normalize-messages\";\n\n// Pre-compiled message functions\nimport localizedFieldMessages_en from \"./intl/en\";\nimport localizedFieldMessages_de from \"./intl/de\";\nimport localizedFieldMessages_es from \"./intl/es\";\nimport localizedFieldMessages_fr from \"./intl/fr-FR\";\nimport localizedFieldMessages_pt from \"./intl/pt-BR\";\n\n// Raw LocalizedStrings object for use with useLocalizedStringFormatter hook\nexport const localizedFieldMessagesStrings: LocalizedStrings<\n string,\n LocalizedString\n> = {\n en: normalizeMessages(localizedFieldMessages_en),\n de: normalizeMessages(localizedFieldMessages_de),\n es: normalizeMessages(localizedFieldMessages_es),\n \"fr-FR\": normalizeMessages(localizedFieldMessages_fr),\n \"pt-BR\": normalizeMessages(localizedFieldMessages_pt),\n} as LocalizedStrings<string, LocalizedString>;\n\n/**\n * Available message keys for LocalizedField component\n */\nexport type LocalizedFieldMessageKey =\n | \"hideCurrencies\"\n | \"hideLanguages\"\n | \"infoBoxTriggerAriaLabel\"\n | \"missingRequiredField\"\n | \"showCurrencies\"\n | \"showLanguages\";\n","import { createSlotRecipeContext } from \"@chakra-ui/react\";\nimport type {\n LocalizedFieldRootSlotProps,\n LocalizedFieldLabelSlotProps,\n LocalizedFieldInfoDialogSlotProps,\n LocalizedFieldFieldsContainerSlotProps,\n LocalizedFieldDescriptionSlotProps,\n LocalizedFieldErrorSlotProps,\n LocalizedFieldToggleButtonContainerSlotProps,\n LocalizedFieldLocaleFieldRootSlotProps,\n LocalizedFieldLocaleFieldLabelSlotProps,\n LocalizedFieldLocaleFieldInputSlotProps,\n} from \"./localized-field.types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"localizedField\",\n});\n\n// Root Slot\nexport const LocalizedFieldRootSlot = withProvider<\n HTMLFieldSetElement,\n LocalizedFieldRootSlotProps\n>(\"fieldset\", \"root\");\n\n// Label Slot\nexport const LocalizedFieldLabelSlot = withContext<\n HTMLLabelElement,\n LocalizedFieldLabelSlotProps\n>(\"legend\", \"label\");\n\n// InfoDialog Slot\nexport const LocalizedFieldInfoDialogSlot = withContext<\n HTMLDivElement,\n LocalizedFieldInfoDialogSlotProps\n>(\"div\", \"infoDialog\");\n\n// FieldsContainer Slot\nexport const LocalizedFieldFieldsContainerSlot = withContext<\n HTMLDivElement,\n LocalizedFieldFieldsContainerSlotProps\n>(\"div\", \"fieldsContainer\");\n\n// Description Slot\nexport const LocalizedFieldDescriptionSlot = withContext<\n HTMLDivElement,\n LocalizedFieldDescriptionSlotProps\n>(\"div\", \"description\");\n\n// Error Slot\nexport const LocalizedFieldErrorSlot = withContext<\n HTMLDivElement,\n LocalizedFieldErrorSlotProps\n>(\"div\", \"error\");\n\n// ToggleButtonContainer Slot\nexport const LocalizedFieldToggleButtonContainerSlot = withContext<\n HTMLDivElement,\n LocalizedFieldToggleButtonContainerSlotProps\n>(\"div\", \"toggleButtonContainer\");\n\n// LocaleFieldRoot Slot\nexport const LocalizedFieldLocaleFieldRootSlot = withContext<\n HTMLDivElement,\n LocalizedFieldLocaleFieldRootSlotProps\n>(\"div\", \"localeFieldRoot\");\n\n// FieldLabel Slot\nexport const LocalizedFieldLocaleFieldLabelSlot = withContext<\n HTMLDivElement,\n LocalizedFieldLocaleFieldLabelSlotProps\n>(\"div\", \"localeFieldLabel\");\n\n// FieldInput Slot\nexport const LocalizedFieldLocaleFieldInputSlot = withContext<\n HTMLDivElement,\n LocalizedFieldLocaleFieldInputSlotProps\n>(\"div\", \"localeFieldInput\");\n","import {\n FormField,\n type CurrencyCode,\n type MoneyInputValue,\n type MoneyValue,\n type FieldErrorsData,\n MoneyInput,\n} from \"@/components\";\nimport { useLocalizedStringFormatter } from \"@/hooks\";\nimport { localizedFieldMessagesStrings } from \"../localized-field.messages\";\nimport type { LocalizedString } from \"../localized-field.types\";\n\ntype LanguagesSplitByDefaultLocale = {\n related: string[];\n unrelated: string[];\n};\n\ntype TouchedLocalizedString = { [locale: string]: boolean };\n\ntype CustomFormikErrors<Values> = {\n [K in keyof Values]?: FieldErrorsData;\n};\n\nexport const RequiredValueErrorMessage = () => {\n const msg = useLocalizedStringFormatter(localizedFieldMessagesStrings);\n return (\n <FormField.Error>{msg.format(\"missingRequiredField\")}</FormField.Error>\n );\n};\n\nexport const getLocaleFieldAttribute = (\n fieldGroupAttr?: string,\n locale?: string\n): string | undefined =>\n fieldGroupAttr && locale ? `${fieldGroupAttr}.${locale}` : undefined;\n\n// gets the language tag of a given locale, e.g. `de` in `de-DE`\nexport const getLanguageForLocale = (locale: string): string =>\n locale.split(\"-\")[0];\n\n// splits the locales into two groups:\n// - the 'related' array contains locales with the same language tag as the default locale,\n// e.g. if the default locale is de-DE, related would be ['de-DE', 'de-CH']\n// - the 'unrelated' array contains locales with a different different language tag from the default locale\n//. e.g. if the default locale is de-DE, unrelated would be ['pt-BR', 'en-GB', 'zh-Hans']\nexport const splitLanguages = (\n defaultLocale: string,\n locales: string[]\n): LanguagesSplitByDefaultLocale => {\n const defaultLanguage = getLanguageForLocale(defaultLocale);\n const related = locales.filter(\n (locale) => getLanguageForLocale(locale) === defaultLanguage\n );\n const unrelated = locales.filter(\n (locale) => getLanguageForLocale(locale) !== defaultLanguage\n );\n return {\n unrelated,\n related,\n };\n};\n\n// sorts locales with the following priority:\n// - The selected locale is placed first (e.g pt-BR)\n// - All locales using the same language tag as the selected language\n// follow (e.g. pt, pt-PT). They are sorted alphabetically.\n// - All other locales follow, sorted alphabetically as well\nexport const sortLocalesByDefaultLocaleLanguage = (\n defaultLocale: string,\n allLocales: string[]\n): string[] => {\n const { related, unrelated } = splitLanguages(\n defaultLocale,\n allLocales.filter((locale: string) => locale !== defaultLocale)\n );\n\n return [defaultLocale, ...related.sort(), ...unrelated.sort()];\n};\n\nexport const sortCurrencies = (\n defaultCurrency: CurrencyCode,\n allCurrencies: CurrencyCode[]\n) => {\n const remainingCurrencies = allCurrencies.filter(\n (currency) => currency !== defaultCurrency\n );\n return [defaultCurrency, ...remainingCurrencies.sort()];\n};\n\nexport const getHasInvalidLocalizedFields = <TErrors extends object>(\n errors?: TErrors,\n defaultLocaleOrCurrency?: string\n): boolean => {\n if (errors && Object.keys(errors).length > 0 && defaultLocaleOrCurrency) {\n return Object.keys(errors).some(\n (localeOrCurrency) => localeOrCurrency !== defaultLocaleOrCurrency\n );\n }\n return false;\n};\n\nexport const createLocalizedString = (\n locales: string[],\n existingLocalizedString: LocalizedString\n): LocalizedString => {\n const localesInLocalizedString = Array.from(\n new Set([...locales, ...Object.keys(existingLocalizedString)])\n );\n\n return localesInLocalizedString.reduce<LocalizedString>(\n (localizedString, locale) => ({\n ...localizedString,\n [locale]: existingLocalizedString?.[locale] || \"\",\n }),\n {}\n );\n};\n\n// Note: I prefer `isLocalizedStringEmpty`, but keeping this as `isEmpty` for api consistency with UI Kit\nexport const isEmpty = (localizedString?: LocalizedString): boolean => {\n if (!localizedString) return true;\n return Object.values(localizedString).every(\n (value?: string) => !value || value?.trim().length === 0\n );\n};\n\nexport const omitEmptyTranslations = <Translations extends LocalizedString>(\n localizedString: Translations\n): LocalizedString => {\n // TODO: is it necessary to create a util that enforces a consistent warning/error format, e.g.\n // `<COMPONENT_NAME> - Warning: <WARNING_MESSAGE>`\n if (typeof localizedString !== \"object\") {\n console.warn(\n \"Nimbus Localized Field - Warning: omitEmptyTranslations must be called with an object\"\n );\n }\n\n return Object.entries(localizedString).reduce<LocalizedString>(\n (localizedStringWithoutEmptyTranslations, [locale, value]) => {\n if (value && value.trim().length > 0) {\n return {\n ...localizedStringWithoutEmptyTranslations,\n [locale]: value,\n };\n }\n return localizedStringWithoutEmptyTranslations;\n },\n {}\n );\n};\n\nexport const isTouched = (touched?: TouchedLocalizedString): boolean => {\n if (touched) {\n return Object.values(touched).some(Boolean);\n }\n return false;\n};\n\n/**\n * Use this function to convert the Formik `errors` object type to\n * our custom field errors type.\n * This is primarly useful when using TypeScript.\n */\nexport function toFieldErrors<FormValues>(\n errors: unknown\n): CustomFormikErrors<FormValues> {\n return errors as CustomFormikErrors<FormValues>;\n}\n\nexport const convertToMoneyValues = (\n values: MoneyInputValue[],\n currency: string\n): Array<MoneyValue | null> =>\n Object.values(values).map<MoneyValue | null>((value) => {\n return MoneyInput.convertToMoneyValue(value, currency);\n });\n\nexport const parseMoneyValues = (\n moneyValues: MoneyValue[] = [],\n locale: string\n): Record<CurrencyCode, MoneyInputValue> =>\n moneyValues.reduce<Record<CurrencyCode, MoneyInputValue>>(\n (allValues, moneyValue) => {\n const value = MoneyInput.parseMoneyValue(moneyValue, locale);\n return {\n ...allValues,\n [value.currencyCode]: value,\n };\n },\n {} as Record<CurrencyCode, MoneyInputValue>\n );\n\nexport const getHighPrecisionCurrencies = (\n values: Record<CurrencyCode, MoneyInputValue>,\n locale: string\n): CurrencyCode[] => {\n const typedCurrencyCodes = Object.keys(values) as CurrencyCode[];\n return typedCurrencyCodes.filter((currencyCode) =>\n MoneyInput.isHighPrecision(values[currencyCode], locale)\n );\n};\n\nexport const getEmptyCurrencies = (\n values: Record<CurrencyCode, MoneyInputValue>\n): CurrencyCode[] => {\n const typedCurrencyCodes = Object.keys(values) as CurrencyCode[];\n return typedCurrencyCodes.filter((currencyCode) =>\n MoneyInput.isEmpty(values[currencyCode])\n );\n};\n","import { useCallback } from \"react\";\nimport {\n FormField,\n Icon,\n TextInput,\n MoneyInput,\n type CustomEvent,\n MultilineTextInput,\n RichTextInput,\n type MoneyInputValue,\n type CurrencyCode,\n} from \"@/components\";\nimport { WarningAmber } from \"@commercetools/nimbus-icons\";\nimport {\n LocalizedFieldLocaleFieldRootSlot,\n LocalizedFieldLocaleFieldInputSlot,\n LocalizedFieldLocaleFieldLabelSlot,\n} from \"../localized-field.slots\";\nimport type { LocalizedFieldLocaleFieldProps } from \"../localized-field.types\";\n\n/**\n * LocalizedFieldLocaleField - Individual locale or currency input field\n *\n * Renders a single input field for a specific locale or currency with integrated\n * label, description, warning, and error message display. Supports text, multiline,\n * richText, and money input types.\n *\n * @supportsStyleProps\n */\nexport const LocalizedFieldLocaleField = ({\n type,\n size,\n localeOrCurrency,\n id,\n name,\n inputValue: inputValueFromProps,\n description,\n warning,\n error,\n onChange,\n onBlur,\n onFocus,\n isRequired,\n isReadOnly,\n isDisabled,\n isInvalid,\n touched,\n ...otherProps\n}: LocalizedFieldLocaleFieldProps) => {\n let InputComponent:\n | typeof TextInput\n | typeof MultilineTextInput\n | typeof MoneyInput\n | typeof RichTextInput;\n switch (type) {\n case \"text\":\n default:\n InputComponent = TextInput;\n break;\n case \"multiLine\":\n InputComponent = MultilineTextInput;\n break;\n case \"money\":\n InputComponent = MoneyInput;\n break;\n case \"richText\":\n InputComponent = RichTextInput;\n break;\n }\n\n const getInputValue = () => {\n if (type === \"money\") {\n return inputValueFromProps\n ? (inputValueFromProps as MoneyInputValue)\n : ({ amount: \"\", currencyCode: localeOrCurrency } as MoneyInputValue);\n }\n return inputValueFromProps ? inputValueFromProps : \"\";\n };\n\n const inputValue = getInputValue();\n\n const handleChange = useCallback(\n (value: string | CustomEvent | undefined) => {\n // The `MoneyInput` onChange event value is a custom value,\n // and the `MoneyInput` modifies the input id and name since it is in a `group`,\n // so we need to build a separate return object for the MoneInput to return\n // the expected values\n const isMoneyInputEvent = typeof value === \"object\";\n const changeValue = {\n target: isMoneyInputEvent\n ? {\n id: value.target.id,\n name: value.target.name,\n locale: undefined,\n currency: localeOrCurrency as CurrencyCode,\n value: value.target.value,\n }\n : { id, name, locale: localeOrCurrency, currency: undefined, value },\n };\n onChange(changeValue);\n },\n [id, name, localeOrCurrency, onChange]\n );\n\n return (\n <LocalizedFieldLocaleFieldRootSlot asChild>\n <FormField.Root\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n isInvalid={(isInvalid || !!error) && touched}\n direction=\"row\"\n size={size}\n id={id}\n >\n <LocalizedFieldLocaleFieldLabelSlot\n display={type === \"money\" ? \"none\" : undefined}\n {...(isDisabled && { \"data-disabled\": isDisabled })}\n asChild\n >\n <FormField.Label>\n {localeOrCurrency.toLocaleUpperCase()}\n </FormField.Label>\n </LocalizedFieldLocaleFieldLabelSlot>\n <FormField.Input>\n <LocalizedFieldLocaleFieldInputSlot\n aria-required={isRequired}\n asChild\n >\n <InputComponent\n {...otherProps}\n size={size}\n value={inputValue as string & MoneyInputValue}\n onChange={handleChange}\n onBlur={(e: React.FocusEvent | CustomEvent) =>\n onBlur?.(e, localeOrCurrency)\n }\n onFocus={(e: React.FocusEvent | CustomEvent) =>\n onFocus?.(e, localeOrCurrency)\n }\n isRequired={isRequired}\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n isInvalid={(isInvalid || !!error) && touched}\n />\n </LocalizedFieldLocaleFieldInputSlot>\n </FormField.Input>\n {(description || (warning && touched)) && (\n <FormField.Description\n role={warning && touched ? \"status\" : undefined}\n color={warning && touched ? \"warning.11\" : undefined}\n display=\"flex\"\n gap=\"100\"\n alignItems=\"center\"\n >\n {warning && touched ? (\n <>\n <Icon colorPalette=\"warning\">\n <WarningAmber />\n </Icon>\n {warning}\n </>\n ) : (\n description\n )}\n </FormField.Description>\n )}\n {error && touched && <FormField.Error>{error}</FormField.Error>}\n </FormField.Root>\n </LocalizedFieldLocaleFieldRootSlot>\n );\n};\n","import { useState, useMemo } from \"react\";\nimport {\n Collection as RaCollection,\n Dialog as RaDialog,\n DialogTrigger as RaDialogTrigger,\n} from \"react-aria-components\";\nimport { useField, useId } from \"react-aria\";\nimport {\n ErrorOutline,\n HelpOutline,\n Language,\n Payments,\n WarningAmber,\n} from \"@commercetools/nimbus-icons\";\nimport {\n Box,\n Button,\n FieldErrors,\n Icon,\n IconButton,\n Stack,\n type CurrencyCode,\n} from \"@/components\";\nimport { Popover } from \"../../popover\";\nimport { useLocalizedStringFormatter } from \"@/hooks\";\nimport { localizedFieldMessagesStrings } from \"../localized-field.messages\";\nimport {\n LocalizedFieldRootSlot,\n LocalizedFieldLabelSlot,\n LocalizedFieldInfoDialogSlot,\n LocalizedFieldFieldsContainerSlot,\n LocalizedFieldDescriptionSlot,\n LocalizedFieldErrorSlot,\n LocalizedFieldToggleButtonContainerSlot,\n} from \"../localized-field.slots\";\nimport type {\n LocalizedFieldProps,\n MergedLocaleFieldData,\n LocalizedCurrency,\n} from \"../localized-field.types\";\n\nimport {\n getHasInvalidLocalizedFields,\n getLocaleFieldAttribute,\n sortCurrencies,\n sortLocalesByDefaultLocaleLanguage,\n} from \"../utils/localized-field.utils\";\nimport { LocalizedFieldLocaleField } from \"./localized-field.locale-field\";\n\n/**\n * LocalizedField - Root component for managing localized input fields\n *\n * Provides a fieldset container for multiple locale-specific or currency-specific input fields\n * with expand/collapse functionality and integrated validation display. Supports text, multiline,\n * richText, and money input types.\n *\n * @supportsStyleProps\n */\nexport const LocalizedField = ({\n type = \"text\",\n id,\n name,\n defaultLocaleOrCurrency,\n valuesByLocaleOrCurrency,\n placeholdersByLocaleOrCurrency,\n descriptionsByLocaleOrCurrency,\n warningsByLocaleOrCurrency,\n errorsByLocaleOrCurrency,\n label,\n hint,\n description,\n warning,\n warnings,\n renderWarning,\n error,\n errors,\n renderError,\n touched,\n isRequired,\n isDisabled,\n isReadOnly,\n onChange,\n onBlur,\n onFocus,\n defaultExpanded = false,\n displayAllLocalesOrCurrencies = false,\n size,\n autoFocus,\n [\"data-track-component\"]: dataTrackComponent,\n [\"data-testid\"]: dataTestId,\n [\"data-test\"]: dataTest,\n // DOM & Style props for wrapper container\n ...rest\n}: LocalizedFieldProps) => {\n const [expanded, setExpanded] = useState(\n displayAllLocalesOrCurrencies || defaultExpanded\n );\n\n const msg = useLocalizedStringFormatter(localizedFieldMessagesStrings);\n\n // Used to associate more info dialog with fieldset via `aria-controls`\n const localeFieldsContainerId = useId();\n // Used to associate more info dialog with fieldset via `aria-details`\n const moreDetailsButtonId = useId();\n\n // Either `error` exists, or there are `true` fields in the UI Kit compat `errors` object\n const hasError: boolean = Boolean(\n error || (errors && Object.values(errors).some((error) => error === true))\n );\n\n // Either `warning` exists, or there are `true` fields in the UI Kit compat `warnings` object\n const hasWarning: boolean = Boolean(\n warning || (warnings && Object.values(warnings).some(Boolean))\n );\n\n // FieldGroup is invalid if a non-field-specific error is passed and the group has been touched\n // When FieldGroup is invalid, all fields will display error styling without displaying a field-specific error message\n const isInvalid: boolean = !!(hasError && touched);\n\n const { labelProps, fieldProps, descriptionProps, errorMessageProps } =\n useField({\n id,\n label,\n description,\n errorMessage: error,\n isInvalid,\n });\n\n // Array of locales/currencies to display as input fields\n const localizationKeys: string[] | CurrencyCode[] = Object.keys(\n valuesByLocaleOrCurrency\n );\n\n // Merge all -ByLocaleOrCurrencies data for each field\n const allDataForFields = useMemo(() => {\n const sortedFieldData =\n type === \"money\"\n ? sortCurrencies(\n defaultLocaleOrCurrency as CurrencyCode,\n localizationKeys as CurrencyCode[]\n )\n : sortLocalesByDefaultLocaleLanguage(\n defaultLocaleOrCurrency,\n localizationKeys\n );\n\n return sortedFieldData.reduce(\n (allFieldData: MergedLocaleFieldData[], localizationKey) => {\n const allDataForLocale = {\n localeOrCurrency: localizationKey,\n inputValue:\n type === \"money\"\n ? (valuesByLocaleOrCurrency as LocalizedCurrency)[localizationKey]\n : (valuesByLocaleOrCurrency[localizationKey] as string),\n placeholder: placeholdersByLocaleOrCurrency?.[localizationKey],\n description: descriptionsByLocaleOrCurrency?.[localizationKey],\n warning: warningsByLocaleOrCurrency?.[localizationKey],\n error: errorsByLocaleOrCurrency?.[localizationKey],\n // autoFocus default/first locale field\n ...(localizationKey === defaultLocaleOrCurrency && autoFocus\n ? { autoFocus }\n : {}),\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n };\n if (\n expanded ||\n // Only display defaultLocaleOrInput field if fieldGroup is not expanded\n (!expanded && localizationKey === defaultLocaleOrCurrency)\n ) {\n return [...allFieldData, allDataForLocale];\n }\n return allFieldData;\n },\n []\n );\n }, [\n valuesByLocaleOrCurrency,\n placeholdersByLocaleOrCurrency,\n descriptionsByLocaleOrCurrency,\n warningsByLocaleOrCurrency,\n errorsByLocaleOrCurrency,\n defaultLocaleOrCurrency,\n expanded,\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n ]);\n\n const groupHasInvalidLocalizedFields = getHasInvalidLocalizedFields(\n errorsByLocaleOrCurrency,\n defaultLocaleOrCurrency\n );\n\n const shouldExpandInvalidFields =\n (groupHasInvalidLocalizedFields || hasError) && touched;\n // If there are fields that are invalid, ensure that field group\n // shows all fields so that invalid field is visible\n if (shouldExpandInvalidFields && !expanded) {\n setExpanded(true);\n }\n\n return (\n <LocalizedFieldRootSlot\n {...rest}\n {...fieldProps}\n aria-details={hint ? moreDetailsButtonId : undefined}\n type={type}\n size={size}\n name={name}\n >\n {label && (\n <Stack direction=\"row\" gap=\"0\">\n <LocalizedFieldLabelSlot {...labelProps}>\n {label}\n {isRequired && <sup aria-hidden=\"true\">*</sup>}\n </LocalizedFieldLabelSlot>\n {hint && (\n <RaDialogTrigger>\n <IconButton\n id={moreDetailsButtonId}\n aria-label={msg.format(\"infoBoxTriggerAriaLabel\")}\n size=\"2xs\"\n colorPalette=\"info\"\n variant=\"link\"\n >\n <HelpOutline />\n </IconButton>\n\n <Popover padding={0}>\n <LocalizedFieldInfoDialogSlot asChild>\n <RaDialog>\n <Box p=\"300\">{hint}</Box>\n </RaDialog>\n </LocalizedFieldInfoDialogSlot>\n </Popover>\n </RaDialogTrigger>\n )}\n </Stack>\n )}\n <LocalizedFieldFieldsContainerSlot\n id={localeFieldsContainerId}\n data-expanded={expanded}\n >\n <RaCollection items={allDataForFields}>\n {(item) => {\n return (\n <LocalizedFieldLocaleField\n {...item}\n size={size}\n type={type}\n onChange={onChange}\n onBlur={onBlur}\n onFocus={onFocus}\n touched={touched}\n // Format field attributes to match uikit pattern\n id={getLocaleFieldAttribute(\n fieldProps.id,\n item.localeOrCurrency\n )}\n name={getLocaleFieldAttribute(name, item.localeOrCurrency)}\n data-test={getLocaleFieldAttribute(\n dataTest,\n item.localeOrCurrency\n )}\n data-testid={getLocaleFieldAttribute(\n dataTestId,\n item.localeOrCurrency\n )}\n data-track-component={getLocaleFieldAttribute(\n dataTrackComponent,\n item.localeOrCurrency\n )}\n />\n );\n }}\n </RaCollection>\n </LocalizedFieldFieldsContainerSlot>\n\n {!displayAllLocalesOrCurrencies && localizationKeys.length > 1 && (\n <LocalizedFieldToggleButtonContainerSlot>\n <Button\n aria-controls={localeFieldsContainerId}\n aria-describedby={labelProps.id}\n aria-expanded={expanded}\n onPress={() => setExpanded(!expanded)}\n isDisabled={isDisabled || (shouldExpandInvalidFields && expanded)}\n variant=\"ghost\"\n size=\"2xs\"\n colorPalette=\"primary\"\n >\n <Box\n as={type === \"money\" ? Payments : Language}\n display=\"inline-flex\"\n boxSize=\"400\"\n verticalAlign=\"text-bottom\"\n mr=\"100\"\n />\n {type === \"money\"\n ? expanded\n ? msg.format(\"hideCurrencies\")\n : msg.format(\"showCurrencies\")\n : expanded\n ? msg.format(\"hideLanguages\")\n : msg.format(\"showLanguages\")}\n </Button>\n </LocalizedFieldToggleButtonContainerSlot>\n )}\n {(description || (hasWarning && touched)) && (\n <LocalizedFieldDescriptionSlot\n role={hasWarning && touched ? \"status\" : undefined}\n color={hasWarning && touched ? \"warning.11\" : undefined}\n // In order to associate the warnings from both the warning and legacy warnings props with the fieldset,\n // we must associate, them to this element with aria-labelledby\n aria-labelledby={`${descriptionProps.id}-warning`}\n {...descriptionProps}\n >\n {/** Warnings are for compat with UI Kit localized fields */}\n {hasWarning && touched ? (\n <>\n <Icon colorPalette=\"warning\">\n <WarningAmber />\n </Icon>\n <Stack gap=\"0\" id={`${descriptionProps.id}-warning`}>\n {warning}\n {warnings && hasWarning && (\n <FieldErrors\n errors={warnings}\n renderError={renderWarning}\n colorPalette=\"warning\"\n role={undefined}\n />\n )}\n </Stack>\n </>\n ) : (\n description\n )}\n </LocalizedFieldDescriptionSlot>\n )}\n {isInvalid && (\n <LocalizedFieldErrorSlot\n // In order to associate the errors from both the error and legacy errors props with the fieldset,\n // we must associate them to this element with aria-labelledby.\n aria-labelledby={`${errorMessageProps.id}-error`}\n role=\"alert\"\n {...errorMessageProps}\n >\n <Icon>\n <ErrorOutline />\n </Icon>\n <Stack gap=\"0\" id={`${errorMessageProps.id}-error`}>\n {error}\n {errors && hasError && (\n <FieldErrors\n errors={errors}\n renderError={renderError}\n role={undefined}\n />\n )}\n </Stack>\n </LocalizedFieldErrorSlot>\n )}\n </LocalizedFieldRootSlot>\n );\n};\n","import { LocalizedFieldRoot } from \"./components\";\nimport {\n getLocaleFieldAttribute,\n createLocalizedString,\n isEmpty,\n omitEmptyTranslations,\n isTouched,\n RequiredValueErrorMessage,\n toFieldErrors,\n convertToMoneyValues,\n parseMoneyValues,\n getHighPrecisionCurrencies,\n getEmptyCurrencies,\n} from \"./utils/localized-field.utils\";\n\n/**\n * LocalizedField component with utility methods for managing localized input fields.\n *\n * This component provides a fieldset for managing multiple locale-specific or currency-specific\n * input fields with expand/collapse functionality and integrated validation display.\n *\n * **Utility Methods** (for compatibility with UI Kit):\n * - `getId` / `getName`: Format field attributes with locale suffix\n * - `isTouched`: Check if any locale field has been touched\n * - `isEmpty`: Check if all locale fields are empty\n * - `createLocalizedString`: Create empty localized string object\n * - `omitEmptyTranslations`: Remove empty translations from localized object\n * - `RequiredValueErrorMessage`: Standard error message component\n * - `toFieldErrors`: Convert errors to field error format\n * - `convertToMoneyValues` / `parseMoneyValues`: Money value conversion utilities\n * - `getHighPrecisionCurrencies` / `getEmptyCurrencies`: Currency utilities\n *\n * @example\n * ```tsx\n * <LocalizedField\n * type=\"text\"\n * label=\"Product Name\"\n * defaultLocaleOrCurrency=\"en\"\n * valuesByLocaleOrCurrency={{ en: \"Product\", de: \"Produkt\" }}\n * onChange={(e) => console.log(e.target.locale, e.target.value)}\n * />\n * ```\n */\nexport const LocalizedField = Object.assign(LocalizedFieldRoot, {\n // Add util methods here for compat with uikit - see https://github.com/commercetools/ui-kit/blob/e97e0c7e8f3e9393981bf1949573212d7c571c90/packages/components/inputs/localized-text-input/src/localized-text-input.tsx#L396\n getId: getLocaleFieldAttribute,\n getName: getLocaleFieldAttribute,\n isTouched,\n isEmpty,\n createLocalizedString,\n omitEmptyTranslations,\n RequiredValueErrorMessage,\n toFieldErrors,\n convertToMoneyValues,\n parseMoneyValues,\n getHighPrecisionCurrencies,\n getEmptyCurrencies,\n});\n"],"names":["localizedFieldMessages_en","localizedFieldMessages_de","localizedFieldMessages_es","localizedFieldMessages_fr","localizedFieldMessages_pt","localizedFieldMessagesStrings","normalizeMessages","withProvider","withContext","createSlotRecipeContext","LocalizedFieldRootSlot","LocalizedFieldLabelSlot","LocalizedFieldInfoDialogSlot","LocalizedFieldFieldsContainerSlot","LocalizedFieldDescriptionSlot","LocalizedFieldErrorSlot","LocalizedFieldToggleButtonContainerSlot","LocalizedFieldLocaleFieldRootSlot","LocalizedFieldLocaleFieldLabelSlot","LocalizedFieldLocaleFieldInputSlot","RequiredValueErrorMessage","msg","useLocalizedStringFormatter","FormField","getLocaleFieldAttribute","fieldGroupAttr","locale","getLanguageForLocale","splitLanguages","defaultLocale","locales","defaultLanguage","related","sortLocalesByDefaultLocaleLanguage","allLocales","unrelated","sortCurrencies","defaultCurrency","allCurrencies","remainingCurrencies","currency","getHasInvalidLocalizedFields","errors","defaultLocaleOrCurrency","localeOrCurrency","createLocalizedString","existingLocalizedString","localizedString","isEmpty","value","omitEmptyTranslations","localizedStringWithoutEmptyTranslations","isTouched","touched","toFieldErrors","convertToMoneyValues","values","MoneyInput","parseMoneyValues","moneyValues","allValues","moneyValue","getHighPrecisionCurrencies","currencyCode","getEmptyCurrencies","LocalizedFieldLocaleField","type","size","id","name","inputValueFromProps","description","warning","error","onChange","onBlur","onFocus","isRequired","isReadOnly","isDisabled","isInvalid","otherProps","InputComponent","TextInput","MultilineTextInput","RichTextInput","inputValue","handleChange","useCallback","changeValue","jsx","jsxs","e","Fragment","Icon","WarningAmber","LocalizedField","valuesByLocaleOrCurrency","placeholdersByLocaleOrCurrency","descriptionsByLocaleOrCurrency","warningsByLocaleOrCurrency","errorsByLocaleOrCurrency","label","hint","warnings","renderWarning","renderError","defaultExpanded","displayAllLocalesOrCurrencies","autoFocus","dataTrackComponent","dataTestId","dataTest","rest","expanded","setExpanded","useState","localeFieldsContainerId","useId","moreDetailsButtonId","hasError","hasWarning","labelProps","fieldProps","descriptionProps","errorMessageProps","useField","localizationKeys","allDataForFields","useMemo","allFieldData","localizationKey","allDataForLocale","shouldExpandInvalidFields","Stack","RaDialogTrigger","IconButton","HelpOutline","Popover","RaDialog","Box","RaCollection","item","Button","Payments","Language","FieldErrors","ErrorOutline","LocalizedFieldRoot"],"mappings":";;;;;;;;;;;;;;;;;;;;;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