@commercetools/nimbus 0.0.0-canary-20251024125521 → 0.0.0-canary-20251024153651

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 (262) hide show
  1. package/dist/chunks/{accordion-D0ulscBP.cjs.js → accordion-BuFuByzN.cjs.js} +2 -2
  2. package/dist/chunks/{accordion-D0ulscBP.cjs.js.map → accordion-BuFuByzN.cjs.js.map} +1 -1
  3. package/dist/chunks/{accordion-DyTTsrDh.es.js → accordion-DlzioxZU.es.js} +2 -2
  4. package/dist/chunks/{accordion-DyTTsrDh.es.js.map → accordion-DlzioxZU.es.js.map} +1 -1
  5. package/dist/chunks/{alert-CC87lB5H.cjs.js → alert-C4LDH-_2.cjs.js} +2 -2
  6. package/dist/chunks/{alert-CC87lB5H.cjs.js.map → alert-C4LDH-_2.cjs.js.map} +1 -1
  7. package/dist/chunks/{alert-DCm-d72j.es.js → alert-D6lQn_oG.es.js} +2 -2
  8. package/dist/chunks/{alert-DCm-d72j.es.js.map → alert-D6lQn_oG.es.js.map} +1 -1
  9. package/dist/chunks/{button-Ccof5UcQ.es.js → button-Do9q1MTT.es.js} +2 -2
  10. package/dist/chunks/{button-Ccof5UcQ.es.js.map → button-Do9q1MTT.es.js.map} +1 -1
  11. package/dist/chunks/{button-CA3VvD2G.cjs.js → button-Y1zC9ASp.cjs.js} +2 -2
  12. package/dist/chunks/{button-CA3VvD2G.cjs.js.map → button-Y1zC9ASp.cjs.js.map} +1 -1
  13. package/dist/chunks/{calendar-CcA9vDZ_.es.js → calendar-BST-T9-q.es.js} +4 -4
  14. package/dist/chunks/{calendar-CcA9vDZ_.es.js.map → calendar-BST-T9-q.es.js.map} +1 -1
  15. package/dist/chunks/{calendar-Dm2LIuao.cjs.js → calendar-y_OY5Ti9.cjs.js} +2 -2
  16. package/dist/chunks/{calendar-Dm2LIuao.cjs.js.map → calendar-y_OY5Ti9.cjs.js.map} +1 -1
  17. package/dist/chunks/{checkbox-CFDf2T7S.es.js → checkbox-CAJEchsf.es.js} +2 -2
  18. package/dist/chunks/{checkbox-CFDf2T7S.es.js.map → checkbox-CAJEchsf.es.js.map} +1 -1
  19. package/dist/chunks/{checkbox-Dzerp7O0.cjs.js → checkbox-Cvk7rALA.cjs.js} +2 -2
  20. package/dist/chunks/{checkbox-Dzerp7O0.cjs.js.map → checkbox-Cvk7rALA.cjs.js.map} +1 -1
  21. package/dist/chunks/{collapsible-motion-DmWoSXyS.es.js → collapsible-motion-CxojZk38.es.js} +2 -2
  22. package/dist/chunks/{collapsible-motion-DmWoSXyS.es.js.map → collapsible-motion-CxojZk38.es.js.map} +1 -1
  23. package/dist/chunks/{collapsible-motion-TeGpQ5f7.cjs.js → collapsible-motion-DSFm8qHI.cjs.js} +2 -2
  24. package/dist/chunks/{collapsible-motion-TeGpQ5f7.cjs.js.map → collapsible-motion-DSFm8qHI.cjs.js.map} +1 -1
  25. package/dist/chunks/{combobox-BuuiDfjq.cjs.js → combobox-B6Srbe3z.cjs.js} +2 -2
  26. package/dist/chunks/{combobox-BuuiDfjq.cjs.js.map → combobox-B6Srbe3z.cjs.js.map} +1 -1
  27. package/dist/chunks/{combobox-C1DerhP1.es.js → combobox-CEzSqHec.es.js} +5 -5
  28. package/dist/chunks/{combobox-C1DerhP1.es.js.map → combobox-CEzSqHec.es.js.map} +1 -1
  29. package/dist/chunks/{data-table-BuGUlgQU.es.js → data-table-Q1jMQV1t.es.js} +5 -5
  30. package/dist/chunks/{data-table-BuGUlgQU.es.js.map → data-table-Q1jMQV1t.es.js.map} +1 -1
  31. package/dist/chunks/{data-table-CyNImBEZ.cjs.js → data-table-t8fG2QIb.cjs.js} +2 -2
  32. package/dist/chunks/{data-table-CyNImBEZ.cjs.js.map → data-table-t8fG2QIb.cjs.js.map} +1 -1
  33. package/dist/chunks/{date-input-B_T7Az3-.es.js → date-input-0qwp6dtK.es.js} +3 -3
  34. package/dist/chunks/{date-input-B_T7Az3-.es.js.map → date-input-0qwp6dtK.es.js.map} +1 -1
  35. package/dist/chunks/{date-input-DTM_24C2.cjs.js → date-input-DGWF2_p-.cjs.js} +2 -2
  36. package/dist/chunks/{date-input-DTM_24C2.cjs.js.map → date-input-DGWF2_p-.cjs.js.map} +1 -1
  37. package/dist/chunks/{date-picker-DcDxaZ6Y.es.js → date-picker-DbZj9za5.es.js} +7 -7
  38. package/dist/chunks/{date-picker-DcDxaZ6Y.es.js.map → date-picker-DbZj9za5.es.js.map} +1 -1
  39. package/dist/chunks/{date-picker-BEDlqfYN.cjs.js → date-picker-c3_UdN-7.cjs.js} +2 -2
  40. package/dist/chunks/{date-picker-BEDlqfYN.cjs.js.map → date-picker-c3_UdN-7.cjs.js.map} +1 -1
  41. package/dist/chunks/{date-range-picker-vr0DE_0V.cjs.js → date-range-picker-BkqUh4hy.cjs.js} +2 -2
  42. package/dist/chunks/{date-range-picker-vr0DE_0V.cjs.js.map → date-range-picker-BkqUh4hy.cjs.js.map} +1 -1
  43. package/dist/chunks/{date-range-picker-C5G8uDlJ.es.js → date-range-picker-DnQK6m0v.es.js} +7 -7
  44. package/dist/chunks/{date-range-picker-C5G8uDlJ.es.js.map → date-range-picker-DnQK6m0v.es.js.map} +1 -1
  45. package/dist/chunks/{dialog-C9OHxEA2.es.js → dialog-CSaCT7B1.es.js} +2 -2
  46. package/dist/chunks/{dialog-C9OHxEA2.es.js.map → dialog-CSaCT7B1.es.js.map} +1 -1
  47. package/dist/chunks/{dialog-siPuFsFT.cjs.js → dialog-D67KSQ-m.cjs.js} +2 -2
  48. package/dist/chunks/{dialog-siPuFsFT.cjs.js.map → dialog-D67KSQ-m.cjs.js.map} +1 -1
  49. package/dist/chunks/{dialog.title-DSIgkWSL.cjs.js → dialog.title-B9lLsARM.cjs.js} +2 -2
  50. package/dist/chunks/{dialog.title-DSIgkWSL.cjs.js.map → dialog.title-B9lLsARM.cjs.js.map} +1 -1
  51. package/dist/chunks/{dialog.title-CGSRn_GL.es.js → dialog.title-Ca6IrsF1.es.js} +3 -3
  52. package/dist/chunks/{dialog.title-CGSRn_GL.es.js.map → dialog.title-Ca6IrsF1.es.js.map} +1 -1
  53. package/dist/chunks/{draggable-list-5SfJXtEK.es.js → draggable-list-DlINx-bm.es.js} +5 -5
  54. package/dist/chunks/{draggable-list-5SfJXtEK.es.js.map → draggable-list-DlINx-bm.es.js.map} +1 -1
  55. package/dist/chunks/{draggable-list-B7Qhle4N.cjs.js → draggable-list-EeNDz0R-.cjs.js} +2 -2
  56. package/dist/chunks/{draggable-list-B7Qhle4N.cjs.js.map → draggable-list-EeNDz0R-.cjs.js.map} +1 -1
  57. package/dist/chunks/{drawer-LRm6SeM-.es.js → drawer-CEcfCY6S.es.js} +4 -4
  58. package/dist/chunks/{drawer-LRm6SeM-.es.js.map → drawer-CEcfCY6S.es.js.map} +1 -1
  59. package/dist/chunks/{drawer-D3PNF9As.cjs.js → drawer-TBV6cxVI.cjs.js} +2 -2
  60. package/dist/chunks/{drawer-D3PNF9As.cjs.js.map → drawer-TBV6cxVI.cjs.js.map} +1 -1
  61. package/dist/chunks/{extract-style-props-IfUYxPJV.cjs.js → extract-style-props-0H1Ajy_s.cjs.js} +2 -2
  62. package/dist/chunks/{extract-style-props-IfUYxPJV.cjs.js.map → extract-style-props-0H1Ajy_s.cjs.js.map} +1 -1
  63. package/dist/chunks/{extract-style-props-CZpdYA8m.es.js → extract-style-props-CTVOvGhe.es.js} +2 -2
  64. package/dist/chunks/{extract-style-props-CZpdYA8m.es.js.map → extract-style-props-CTVOvGhe.es.js.map} +1 -1
  65. package/dist/chunks/{form-field-B6PqLujT.es.js → form-field-BHz1U87W.es.js} +2 -2
  66. package/dist/chunks/{form-field-B6PqLujT.es.js.map → form-field-BHz1U87W.es.js.map} +1 -1
  67. package/dist/chunks/{form-field-B9wlWUcK.cjs.js → form-field-zi8RBlcC.cjs.js} +2 -2
  68. package/dist/chunks/{form-field-B9wlWUcK.cjs.js.map → form-field-zi8RBlcC.cjs.js.map} +1 -1
  69. package/dist/chunks/{icon-button-B28VUff9.cjs.js → icon-button-CCOl3BcF.cjs.js} +2 -2
  70. package/dist/chunks/{icon-button-B28VUff9.cjs.js.map → icon-button-CCOl3BcF.cjs.js.map} +1 -1
  71. package/dist/chunks/{icon-button-g4dZUH5O.es.js → icon-button-CKfDmEjG.es.js} +2 -2
  72. package/dist/chunks/{icon-button-g4dZUH5O.es.js.map → icon-button-CKfDmEjG.es.js.map} +1 -1
  73. package/dist/chunks/{icon-toggle-button-DPOco2hU.cjs.js → icon-toggle-button-CpvcaoHY.cjs.js} +2 -2
  74. package/dist/chunks/{icon-toggle-button-DPOco2hU.cjs.js.map → icon-toggle-button-CpvcaoHY.cjs.js.map} +1 -1
  75. package/dist/chunks/{icon-toggle-button-DBGgxBWR.es.js → icon-toggle-button-_8HGkSiT.es.js} +2 -2
  76. package/dist/chunks/{icon-toggle-button-DBGgxBWR.es.js.map → icon-toggle-button-_8HGkSiT.es.js.map} +1 -1
  77. package/dist/chunks/{index-CaeeOiBp.es.js → index-DlmEj62V.es.js} +11 -9
  78. package/dist/chunks/index-DlmEj62V.es.js.map +1 -0
  79. package/dist/chunks/{index-CxLKWOES.cjs.js → index-hUcMzBfs.cjs.js} +4 -4
  80. package/dist/chunks/{index-CxLKWOES.cjs.js.map → index-hUcMzBfs.cjs.js.map} +1 -1
  81. package/dist/chunks/{localized-field-CHV3AGQ-.es.js → localized-field-DDTDBmhu.es.js} +8 -8
  82. package/dist/chunks/{localized-field-CHV3AGQ-.es.js.map → localized-field-DDTDBmhu.es.js.map} +1 -1
  83. package/dist/chunks/{localized-field-BffTavHV.cjs.js → localized-field-RKyDpn1l.cjs.js} +2 -2
  84. package/dist/chunks/{localized-field-BffTavHV.cjs.js.map → localized-field-RKyDpn1l.cjs.js.map} +1 -1
  85. package/dist/chunks/{menu-B5r0vnY6.es.js → menu-BgYVHme6.es.js} +2 -2
  86. package/dist/chunks/{menu-B5r0vnY6.es.js.map → menu-BgYVHme6.es.js.map} +1 -1
  87. package/dist/chunks/{menu-DK0AShnF.cjs.js → menu-CbD9H5r5.cjs.js} +2 -2
  88. package/dist/chunks/{menu-DK0AShnF.cjs.js.map → menu-CbD9H5r5.cjs.js.map} +1 -1
  89. package/dist/chunks/{money-input-qNQdmjtx.cjs.js → money-input-4o77BLki.cjs.js} +2 -2
  90. package/dist/chunks/{money-input-qNQdmjtx.cjs.js.map → money-input-4o77BLki.cjs.js.map} +1 -1
  91. package/dist/chunks/{money-input-Con6I5Ej.es.js → money-input-KhcM6-nN.es.js} +5 -5
  92. package/dist/chunks/{money-input-Con6I5Ej.es.js.map → money-input-KhcM6-nN.es.js.map} +1 -1
  93. package/dist/chunks/{multiline-text-input-CHM3_4FO.cjs.js → multiline-text-input-CwAS7ll-.cjs.js} +2 -2
  94. package/dist/chunks/{multiline-text-input-CHM3_4FO.cjs.js.map → multiline-text-input-CwAS7ll-.cjs.js.map} +1 -1
  95. package/dist/chunks/{multiline-text-input-Cta4bg2-.es.js → multiline-text-input-DzUNwnJZ.es.js} +3 -3
  96. package/dist/chunks/{multiline-text-input-Cta4bg2-.es.js.map → multiline-text-input-DzUNwnJZ.es.js.map} +1 -1
  97. package/dist/chunks/{nimbus-provider-BtTUZMKb.es.js → nimbus-provider-4pgVp4tp.es.js} +2 -2
  98. package/dist/chunks/{nimbus-provider-BtTUZMKb.es.js.map → nimbus-provider-4pgVp4tp.es.js.map} +1 -1
  99. package/dist/chunks/{nimbus-provider-DNBQi83M.cjs.js → nimbus-provider-CMXp3nO2.cjs.js} +2 -2
  100. package/dist/chunks/{nimbus-provider-DNBQi83M.cjs.js.map → nimbus-provider-CMXp3nO2.cjs.js.map} +1 -1
  101. package/dist/chunks/{number-input-BClKrTYK.es.js → number-input-BL6HQMgY.es.js} +3 -3
  102. package/dist/chunks/{number-input-BClKrTYK.es.js.map → number-input-BL6HQMgY.es.js.map} +1 -1
  103. package/dist/chunks/{number-input-BUdRuDBZ.cjs.js → number-input-C9h9uHwX.cjs.js} +2 -2
  104. package/dist/chunks/{number-input-BUdRuDBZ.cjs.js.map → number-input-C9h9uHwX.cjs.js.map} +1 -1
  105. package/dist/chunks/{pagination-BqjffQ1Z.es.js → pagination-DtyZtvEz.es.js} +4 -4
  106. package/dist/chunks/{pagination-BqjffQ1Z.es.js.map → pagination-DtyZtvEz.es.js.map} +1 -1
  107. package/dist/chunks/{pagination-BL1y2lAx.cjs.js → pagination-kDpMrNVR.cjs.js} +2 -2
  108. package/dist/chunks/{pagination-BL1y2lAx.cjs.js.map → pagination-kDpMrNVR.cjs.js.map} +1 -1
  109. package/dist/chunks/{password-input-Dtu0_JiV.cjs.js → password-input-CvJxldNp.cjs.js} +2 -2
  110. package/dist/chunks/{password-input-Dtu0_JiV.cjs.js.map → password-input-CvJxldNp.cjs.js.map} +1 -1
  111. package/dist/chunks/{password-input-DoWjkkoL.es.js → password-input-ltEgpcBt.es.js} +3 -3
  112. package/dist/chunks/{password-input-DoWjkkoL.es.js.map → password-input-ltEgpcBt.es.js.map} +1 -1
  113. package/dist/chunks/{progress-bar-oCdd2qvN.es.js → progress-bar-BV2WXVWN.es.js} +2 -2
  114. package/dist/chunks/{progress-bar-oCdd2qvN.es.js.map → progress-bar-BV2WXVWN.es.js.map} +1 -1
  115. package/dist/chunks/{progress-bar-BwrjTuCz.cjs.js → progress-bar-Dl6EjYhS.cjs.js} +2 -2
  116. package/dist/chunks/{progress-bar-BwrjTuCz.cjs.js.map → progress-bar-Dl6EjYhS.cjs.js.map} +1 -1
  117. package/dist/chunks/{radio-input-BYDBQDtr.cjs.js → radio-input-BlbRIHvu.cjs.js} +2 -2
  118. package/dist/chunks/{radio-input-BYDBQDtr.cjs.js.map → radio-input-BlbRIHvu.cjs.js.map} +1 -1
  119. package/dist/chunks/{radio-input-eA3VvPwV.es.js → radio-input-Celcqnqn.es.js} +3 -3
  120. package/dist/chunks/{radio-input-eA3VvPwV.es.js.map → radio-input-Celcqnqn.es.js.map} +1 -1
  121. package/dist/chunks/{range-calendar-BnB1F7_i.es.js → range-calendar-5eLEbNtN.es.js} +4 -4
  122. package/dist/chunks/{range-calendar-BnB1F7_i.es.js.map → range-calendar-5eLEbNtN.es.js.map} +1 -1
  123. package/dist/chunks/{range-calendar-BXMVhACe.cjs.js → range-calendar-DzpS87jK.cjs.js} +2 -2
  124. package/dist/chunks/{range-calendar-BXMVhACe.cjs.js.map → range-calendar-DzpS87jK.cjs.js.map} +1 -1
  125. package/dist/chunks/{rich-text-input-D6WXRxiJ.cjs.js → rich-text-input-CHik-cF7.cjs.js} +2 -2
  126. package/dist/chunks/{rich-text-input-D6WXRxiJ.cjs.js.map → rich-text-input-CHik-cF7.cjs.js.map} +1 -1
  127. package/dist/chunks/{rich-text-input-BebV_CaK.es.js → rich-text-input-Dn7NVXwa.es.js} +8 -8
  128. package/dist/chunks/{rich-text-input-BebV_CaK.es.js.map → rich-text-input-Dn7NVXwa.es.js.map} +1 -1
  129. package/dist/chunks/{scoped-search-input-C3Vuxp-X.cjs.js → scoped-search-input-5WNwtpTQ.cjs.js} +2 -2
  130. package/dist/chunks/{scoped-search-input-C3Vuxp-X.cjs.js.map → scoped-search-input-5WNwtpTQ.cjs.js.map} +1 -1
  131. package/dist/chunks/{scoped-search-input-B5wDEKhF.es.js → scoped-search-input-CE0NBlpD.es.js} +5 -5
  132. package/dist/chunks/{scoped-search-input-B5wDEKhF.es.js.map → scoped-search-input-CE0NBlpD.es.js.map} +1 -1
  133. package/dist/chunks/{search-input-D4ISfjCg.cjs.js → search-input-Ba1txC7x.cjs.js} +2 -2
  134. package/dist/chunks/{search-input-D4ISfjCg.cjs.js.map → search-input-Ba1txC7x.cjs.js.map} +1 -1
  135. package/dist/chunks/{search-input-CmmBtmQf.es.js → search-input-BvUR-kV-.es.js} +4 -4
  136. package/dist/chunks/{search-input-CmmBtmQf.es.js.map → search-input-BvUR-kV-.es.js.map} +1 -1
  137. package/dist/chunks/{select-DYkIoOqo.es.js → select-77U13xRz.es.js} +4 -4
  138. package/dist/chunks/{select-DYkIoOqo.es.js.map → select-77U13xRz.es.js.map} +1 -1
  139. package/dist/chunks/{select-DLnPgZGL.cjs.js → select-CYbV47iB.cjs.js} +2 -2
  140. package/dist/chunks/{select-DLnPgZGL.cjs.js.map → select-CYbV47iB.cjs.js.map} +1 -1
  141. package/dist/chunks/{separator-Vxu9fPdc.cjs.js → separator-CZmCrqww.cjs.js} +2 -2
  142. package/dist/chunks/{separator-Vxu9fPdc.cjs.js.map → separator-CZmCrqww.cjs.js.map} +1 -1
  143. package/dist/chunks/{separator-D2824IwZ.es.js → separator-DD-zpQe_.es.js} +3 -3
  144. package/dist/chunks/{separator-D2824IwZ.es.js.map → separator-DD-zpQe_.es.js.map} +1 -1
  145. package/dist/chunks/{split-button-D4fKtZU6.cjs.js → split-button-C_Nuyoam.cjs.js} +2 -2
  146. package/dist/chunks/{split-button-D4fKtZU6.cjs.js.map → split-button-C_Nuyoam.cjs.js.map} +1 -1
  147. package/dist/chunks/{split-button-P5JM5TIs.es.js → split-button-swrptPhp.es.js} +4 -4
  148. package/dist/chunks/{split-button-P5JM5TIs.es.js.map → split-button-swrptPhp.es.js.map} +1 -1
  149. package/dist/chunks/{switch-jX2Q8faO.es.js → switch-CWD7IBTS.es.js} +3 -3
  150. package/dist/chunks/{switch-jX2Q8faO.es.js.map → switch-CWD7IBTS.es.js.map} +1 -1
  151. package/dist/chunks/{switch-Dg4jxYqx.cjs.js → switch-xQjN85iv.cjs.js} +2 -2
  152. package/dist/chunks/{switch-Dg4jxYqx.cjs.js.map → switch-xQjN85iv.cjs.js.map} +1 -1
  153. package/dist/chunks/{tabs-Bcs39h4J.es.js → tabs-DRbsWomF.es.js} +2 -2
  154. package/dist/chunks/{tabs-Bcs39h4J.es.js.map → tabs-DRbsWomF.es.js.map} +1 -1
  155. package/dist/chunks/{tabs-DoJOIjOb.cjs.js → tabs-tf4ACwpB.cjs.js} +2 -2
  156. package/dist/chunks/{tabs-DoJOIjOb.cjs.js.map → tabs-tf4ACwpB.cjs.js.map} +1 -1
  157. package/dist/chunks/{tag-group-k_jEVQhv.es.js → tag-group-Ct9zXgkE.es.js} +2 -2
  158. package/dist/chunks/{tag-group-k_jEVQhv.es.js.map → tag-group-Ct9zXgkE.es.js.map} +1 -1
  159. package/dist/chunks/{tag-group-Dx690E8r.cjs.js → tag-group-DS4ZjMaX.cjs.js} +2 -2
  160. package/dist/chunks/{tag-group-Dx690E8r.cjs.js.map → tag-group-DS4ZjMaX.cjs.js.map} +1 -1
  161. package/dist/chunks/{text-input-D8mfBGrA.es.js → text-input-CYsti7a8.es.js} +3 -3
  162. package/dist/chunks/{text-input-D8mfBGrA.es.js.map → text-input-CYsti7a8.es.js.map} +1 -1
  163. package/dist/chunks/{text-input-BO570MbY.cjs.js → text-input-puPPVhs1.cjs.js} +2 -2
  164. package/dist/chunks/{text-input-BO570MbY.cjs.js.map → text-input-puPPVhs1.cjs.js.map} +1 -1
  165. package/dist/chunks/{time-input-C8BWH8SA.cjs.js → time-input-Bu5Pk9vt.cjs.js} +2 -2
  166. package/dist/chunks/{time-input-C8BWH8SA.cjs.js.map → time-input-Bu5Pk9vt.cjs.js.map} +1 -1
  167. package/dist/chunks/{time-input-9W94XJTY.es.js → time-input-CQND_oup.es.js} +3 -3
  168. package/dist/chunks/{time-input-9W94XJTY.es.js.map → time-input-CQND_oup.es.js.map} +1 -1
  169. package/dist/chunks/{toggle-button-D1v2OtiG.es.js → toggle-button-B7pXF-Kq.es.js} +3 -3
  170. package/dist/chunks/{toggle-button-D1v2OtiG.es.js.map → toggle-button-B7pXF-Kq.es.js.map} +1 -1
  171. package/dist/chunks/{toggle-button-jNsiq27z.cjs.js → toggle-button-gBCYH8cY.cjs.js} +2 -2
  172. package/dist/chunks/{toggle-button-jNsiq27z.cjs.js.map → toggle-button-gBCYH8cY.cjs.js.map} +1 -1
  173. package/dist/chunks/{toolbar-DpBQgamV.es.js → toolbar-AJhM_2WM.es.js} +3 -3
  174. package/dist/chunks/{toolbar-DpBQgamV.es.js.map → toolbar-AJhM_2WM.es.js.map} +1 -1
  175. package/dist/chunks/{toolbar-BHdgjOW4.cjs.js → toolbar-BnFBy7d8.cjs.js} +2 -2
  176. package/dist/chunks/{toolbar-BHdgjOW4.cjs.js.map → toolbar-BnFBy7d8.cjs.js.map} +1 -1
  177. package/dist/components/accordion.cjs +1 -1
  178. package/dist/components/accordion.es.js +1 -1
  179. package/dist/components/alert.cjs +1 -1
  180. package/dist/components/alert.es.js +1 -1
  181. package/dist/components/button.cjs +1 -1
  182. package/dist/components/button.es.js +1 -1
  183. package/dist/components/calendar.cjs +1 -1
  184. package/dist/components/calendar.es.js +1 -1
  185. package/dist/components/checkbox.cjs +1 -1
  186. package/dist/components/checkbox.es.js +1 -1
  187. package/dist/components/collapsible-motion.cjs +1 -1
  188. package/dist/components/collapsible-motion.es.js +1 -1
  189. package/dist/components/combobox.cjs +1 -1
  190. package/dist/components/combobox.es.js +1 -1
  191. package/dist/components/components.cjs +1 -1
  192. package/dist/components/components.es.js +1 -1
  193. package/dist/components/data-table.cjs +1 -1
  194. package/dist/components/data-table.es.js +1 -1
  195. package/dist/components/date-input.cjs +1 -1
  196. package/dist/components/date-input.es.js +1 -1
  197. package/dist/components/date-picker.cjs +1 -1
  198. package/dist/components/date-picker.es.js +1 -1
  199. package/dist/components/date-range-picker.cjs +1 -1
  200. package/dist/components/date-range-picker.es.js +1 -1
  201. package/dist/components/dialog.cjs +1 -1
  202. package/dist/components/dialog.es.js +1 -1
  203. package/dist/components/draggable-list.cjs +1 -1
  204. package/dist/components/draggable-list.es.js +1 -1
  205. package/dist/components/drawer.cjs +1 -1
  206. package/dist/components/drawer.es.js +1 -1
  207. package/dist/components/form-field.cjs +1 -1
  208. package/dist/components/form-field.es.js +1 -1
  209. package/dist/components/icon-button.cjs +1 -1
  210. package/dist/components/icon-button.es.js +1 -1
  211. package/dist/components/icon-toggle-button.cjs +1 -1
  212. package/dist/components/icon-toggle-button.es.js +1 -1
  213. package/dist/components/localized-field.cjs +1 -1
  214. package/dist/components/localized-field.es.js +1 -1
  215. package/dist/components/money-input.cjs +1 -1
  216. package/dist/components/money-input.es.js +1 -1
  217. package/dist/components/multiline-text-input.cjs +1 -1
  218. package/dist/components/multiline-text-input.es.js +1 -1
  219. package/dist/components/nimbus-provider.cjs +1 -1
  220. package/dist/components/nimbus-provider.es.js +1 -1
  221. package/dist/components/number-input.cjs +1 -1
  222. package/dist/components/number-input.es.js +1 -1
  223. package/dist/components/pagination.cjs +1 -1
  224. package/dist/components/pagination.es.js +1 -1
  225. package/dist/components/password-input.cjs +1 -1
  226. package/dist/components/password-input.es.js +1 -1
  227. package/dist/components/progress-bar.cjs +1 -1
  228. package/dist/components/progress-bar.es.js +1 -1
  229. package/dist/components/radio-input.cjs +1 -1
  230. package/dist/components/radio-input.es.js +1 -1
  231. package/dist/components/range-calendar.cjs +1 -1
  232. package/dist/components/range-calendar.es.js +1 -1
  233. package/dist/components/rich-text-input.cjs +1 -1
  234. package/dist/components/rich-text-input.es.js +1 -1
  235. package/dist/components/scoped-search-input.cjs +1 -1
  236. package/dist/components/scoped-search-input.es.js +1 -1
  237. package/dist/components/search-input.cjs +1 -1
  238. package/dist/components/search-input.es.js +1 -1
  239. package/dist/components/select.cjs +1 -1
  240. package/dist/components/select.es.js +1 -1
  241. package/dist/components/separator.cjs +1 -1
  242. package/dist/components/separator.es.js +1 -1
  243. package/dist/components/split-button.cjs +1 -1
  244. package/dist/components/split-button.es.js +1 -1
  245. package/dist/components/switch.cjs +1 -1
  246. package/dist/components/switch.es.js +1 -1
  247. package/dist/components/tabs.cjs +1 -1
  248. package/dist/components/tabs.es.js +1 -1
  249. package/dist/components/tag-group.cjs +1 -1
  250. package/dist/components/tag-group.es.js +1 -1
  251. package/dist/components/text-input.cjs +1 -1
  252. package/dist/components/text-input.es.js +1 -1
  253. package/dist/components/time-input.cjs +1 -1
  254. package/dist/components/time-input.es.js +1 -1
  255. package/dist/components/toggle-button.cjs +1 -1
  256. package/dist/components/toggle-button.es.js +1 -1
  257. package/dist/components/toolbar.cjs +1 -1
  258. package/dist/components/toolbar.es.js +1 -1
  259. package/dist/index.cjs +1 -1
  260. package/dist/index.es.js +44 -44
  261. package/package.json +5 -5
  262. package/dist/chunks/index-CaeeOiBp.es.js.map +0 -1
@@ -2,14 +2,14 @@ import { jsx as r } from "react/jsx-runtime";
2
2
  import w, { useContext as S, createContext as R } from "react";
3
3
  import { k as v, h as N } from "./Dialog-C3sNnu1k.es.js";
4
4
  import { createSlotRecipeContext as O, useSlotRecipe as H, chakra as B } from "@chakra-ui/react/styled-system";
5
- import { l as m } from "./index-CaeeOiBp.es.js";
5
+ import { l as m } from "./index-DlmEj62V.es.js";
6
6
  import { a as I } from "./Button-C4ud7YxN.es.js";
7
- import { e as g } from "./extract-style-props-CZpdYA8m.es.js";
7
+ import { e as g } from "./extract-style-props-CTVOvGhe.es.js";
8
8
  import { $ as M, a as F } from "./Modal-BTJk-mW-.es.js";
9
9
  import { H as k } from "./heading-14HwlWvH.es.js";
10
10
  import { Close as E } from "@commercetools/nimbus-icons";
11
11
  import { defineMessages as V, useIntl as _ } from "react-intl";
12
- import { I as j } from "./icon-button-g4dZUH5O.es.js";
12
+ import { I as j } from "./icon-button-CKfDmEjG.es.js";
13
13
  const { withProvider: z, withContext: s } = /* @__PURE__ */ O({
14
14
  recipe: m
15
15
  }), A = /* @__PURE__ */ z(
@@ -301,4 +301,4 @@ const we = {
301
301
  export {
302
302
  we as D
303
303
  };
304
- //# sourceMappingURL=drawer-LRm6SeM-.es.js.map
304
+ //# sourceMappingURL=drawer-CEcfCY6S.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"drawer-LRm6SeM-.es.js","sources":["../../src/components/drawer/drawer.slots.tsx","../../src/components/drawer/components/drawer.context.tsx","../../src/components/drawer/components/drawer.root.tsx","../../src/components/drawer/components/drawer.trigger.tsx","../../src/components/drawer/components/drawer.content.tsx","../../src/components/drawer/components/drawer.header.tsx","../../src/components/drawer/components/drawer.body.tsx","../../src/components/drawer/components/drawer.footer.tsx","../../src/components/drawer/components/drawer.title.tsx","../../src/components/drawer/drawer.i18n.ts","../../src/components/drawer/components/drawer.close-trigger.tsx","../../src/components/drawer/drawer.tsx"],"sourcesContent":["import {\n createSlotRecipeContext,\n type HTMLChakraProps,\n} from \"@chakra-ui/react/styled-system\";\nimport { drawerSlotRecipe } from \"./drawer.recipe\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n recipe: drawerSlotRecipe,\n});\n\n// Root slot - provides recipe context + config to all child components\nexport type DrawerRootSlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerRootSlot = withProvider<HTMLDivElement, DrawerRootSlotProps>(\n \"div\",\n \"root\"\n);\n\n// Trigger slot - button that opens the drawer\nexport type DrawerTriggerSlotProps = HTMLChakraProps<\"button\">;\nexport const DrawerTriggerSlot = withContext<\n HTMLButtonElement,\n DrawerTriggerSlotProps\n>(\"button\", \"trigger\");\n\n// Backdrop slot - overlay displayed behind the drawer\nexport type DrawerModalOverlaySlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerModalOverlaySlot = withContext<\n HTMLDivElement,\n DrawerModalOverlaySlotProps\n>(\"div\", \"modalOverlay\");\n\n// modal slot - positions the drawer content\nexport type DrawerModalSlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerModalSlot = withContext<\n HTMLDivElement,\n DrawerModalSlotProps\n>(\"div\", \"modal\");\n\n// Content slot - main drawer container\nexport type DrawerContentSlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerContentSlot = withContext<\n HTMLDivElement,\n DrawerContentSlotProps\n>(\"div\", \"content\");\n\n// Header slot - drawer header section\nexport type DrawerHeaderSlotProps = HTMLChakraProps<\"header\">;\nexport const DrawerHeaderSlot = withContext<HTMLElement, DrawerHeaderSlotProps>(\n \"header\",\n \"header\"\n);\n\n// Body slot - drawer body content\nexport type DrawerBodySlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerBodySlot = withContext<HTMLDivElement, DrawerBodySlotProps>(\n \"div\",\n \"body\"\n);\n\n// Footer slot - drawer footer section with actions\nexport type DrawerFooterSlotProps = HTMLChakraProps<\"footer\">;\nexport const DrawerFooterSlot = withContext<HTMLElement, DrawerFooterSlotProps>(\n \"footer\",\n \"footer\"\n);\n\n// Title slot - accessible drawer title\nexport type DrawerTitleSlotProps = HTMLChakraProps<\"h2\">;\nexport const DrawerTitleSlot = withContext<\n HTMLHeadingElement,\n DrawerTitleSlotProps\n>(\"h2\", \"title\");\n\n// Close trigger slot - div container for positioning close button\nexport type DrawerCloseTriggerSlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerCloseTriggerSlot = withContext<\n HTMLDivElement,\n DrawerCloseTriggerSlotProps\n>(\"div\", \"closeTrigger\");\n","import { createContext, useContext } from \"react\";\nimport type { DrawerRootProps } from \"../drawer.types\";\n\n/**\n * Context value containing drawer configuration passed from Root to child components\n */\nexport type DrawerContextValue = DrawerRootProps;\n\nexport const DrawerContext = createContext<DrawerContextValue | undefined>(\n undefined\n);\n\n/**\n * Hook to access drawer configuration from DrawerContext\n * @returns Drawer configuration from context\n * @throws Error if used outside of Drawer.Root\n */\nexport const useDrawerRootContext = (): DrawerContextValue => {\n const context = useContext(DrawerContext);\n if (!context) {\n throw new Error(\"useDrawerContext must be used within Drawer.Root\");\n }\n return context;\n};\n\n/**\n * Provider component that passes drawer configuration down to child components\n */\nexport const DrawerProvider = ({\n children,\n value,\n}: {\n children: React.ReactNode;\n value: DrawerContextValue;\n}) => {\n return <DrawerContext value={value}>{children}</DrawerContext>;\n};\n","import React from \"react\";\nimport { DialogTrigger as RaDialogTrigger } from \"react-aria-components\";\nimport { useSlotRecipe } from \"@chakra-ui/react/styled-system\";\nimport { DrawerRootSlot } from \"../drawer.slots\";\nimport type { DrawerRootProps } from \"../drawer.types\";\nimport { DrawerProvider } from \"./drawer.context\";\nimport { drawerSlotRecipe } from \"../drawer.recipe\";\n\nexport const DrawerRoot = (props: DrawerRootProps) => {\n const recipe = useSlotRecipe({ recipe: drawerSlotRecipe });\n // Extract recipe props\n const [recipeProps] = recipe.splitVariantProps(props);\n // Extract props that are usable on RaDialogTrigger\n const { children, isOpen, onOpenChange, defaultOpen = false } = props;\n\n const content = <DrawerRootSlot {...recipeProps}>{children}</DrawerRootSlot>;\n\n // Check if any child is a Drawer.Trigger component\n // React Aria's DialogTrigger needs a pressable child, so we only use it when there's a trigger\n const hasDrawerTrigger = React.Children.toArray(children).some((child) => {\n if (React.isValidElement(child) && typeof child.type === \"function\") {\n const displayName = (\n child.type as React.ComponentType & { displayName?: string }\n )?.displayName;\n return (\n displayName === \"DrawerTrigger\" || displayName === \"Drawer.Trigger\"\n );\n }\n return false;\n });\n\n // Share all props (config + variant props) with the Drawer subcomponents\n return (\n <DrawerProvider value={props}>\n {hasDrawerTrigger ? (\n // When there's a Drawer.Trigger, use DialogTrigger for React Aria integration\n <RaDialogTrigger\n isOpen={isOpen}\n onOpenChange={onOpenChange}\n defaultOpen={defaultOpen}\n >\n {content}\n </RaDialogTrigger>\n ) : (\n // When no Drawer.Trigger, skip DialogTrigger to avoid the warning\n content\n )}\n </DrawerProvider>\n );\n};\n\nDrawerRoot.displayName = \"Drawer.Root\";\n","import { Button as RaButton } from \"react-aria-components\";\nimport { DrawerTriggerSlot } from \"../drawer.slots\";\nimport type { DrawerTriggerProps } from \"../drawer.types\";\nimport { extractStyleProps } from \"@/utils\";\nimport { chakra } from \"@chakra-ui/react/styled-system\";\n\nexport const DrawerTrigger = ({\n ref: forwardedRef,\n children,\n asChild,\n ...props\n}: DrawerTriggerProps) => {\n // If asChild is true, wrap children directly in RaButton with asChild\n if (asChild) {\n return (\n <chakra.button ref={forwardedRef} asChild {...props}>\n {children}\n </chakra.button>\n );\n }\n\n const [styleProps, restProps] = extractStyleProps(props);\n\n // Otherwise, wrap with both DrawerTriggerSlot and RaButton\n // Only pass React Aria compatible props to avoid type conflicts\n return (\n <DrawerTriggerSlot {...styleProps} asChild>\n <RaButton ref={forwardedRef} {...restProps}>\n {children}\n </RaButton>\n </DrawerTriggerSlot>\n );\n};\n\nDrawerTrigger.displayName = \"Drawer.Trigger\";\n","import {\n Modal as RaModal,\n ModalOverlay as RaModalOverlay,\n Dialog as RaDialog,\n} from \"react-aria-components\";\nimport {\n DrawerModalOverlaySlot,\n DrawerModalSlot,\n DrawerContentSlot,\n} from \"../drawer.slots\";\nimport type { DrawerContentProps } from \"../drawer.types\";\nimport { extractStyleProps } from \"@/utils\";\nimport { useDrawerRootContext } from \"./drawer.context\";\n\nexport const DrawerContent = (props: DrawerContentProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n // Get recipe configuration from context instead of props\n const {\n defaultOpen,\n isDismissable,\n isKeyboardDismissDisabled,\n shouldCloseOnInteractOutside,\n isOpen,\n onOpenChange,\n } = useDrawerRootContext();\n\n const modalProps = {\n defaultOpen,\n isDismissable,\n isKeyboardDismissDisabled,\n shouldCloseOnInteractOutside,\n isOpen,\n onOpenChange,\n };\n\n const [styleProps] = extractStyleProps(restProps);\n\n return (\n <DrawerModalOverlaySlot asChild>\n <RaModalOverlay {...modalProps}>\n <DrawerModalSlot asChild>\n <RaModal>\n <DrawerContentSlot asChild {...styleProps}>\n <RaDialog ref={forwardedRef}>{children}</RaDialog>\n </DrawerContentSlot>\n </RaModal>\n </DrawerModalSlot>\n </RaModalOverlay>\n </DrawerModalOverlaySlot>\n );\n};\n\nDrawerContent.displayName = \"Drawer.Content\";\n","import { DrawerHeaderSlot } from \"../drawer.slots\";\nimport type { DrawerHeaderProps } from \"../drawer.types\";\n\nexport const DrawerHeader = (props: DrawerHeaderProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n return (\n <DrawerHeaderSlot ref={forwardedRef} {...restProps}>\n {children}\n </DrawerHeaderSlot>\n );\n};\n\nDrawerHeader.displayName = \"Drawer.Header\";\n","import { DrawerBodySlot } from \"../drawer.slots\";\nimport type { DrawerBodyProps } from \"../drawer.types\";\n\nexport const DrawerBody = (props: DrawerBodyProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n const defaultProps = {\n /**\n * Set tabIndex to 0 to allow the body to receive focus,\n * effectively enabling scrolling via keyboard arrow keys.\n */\n tabIndex: 0,\n };\n\n return (\n <DrawerBodySlot ref={forwardedRef} {...defaultProps} {...restProps}>\n {children}\n </DrawerBodySlot>\n );\n};\n\nDrawerBody.displayName = \"Drawer.Body\";\n","import { DrawerFooterSlot } from \"../drawer.slots\";\nimport type { DrawerFooterProps } from \"../drawer.types\";\n\nexport const DrawerFooter = (props: DrawerFooterProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n return (\n <DrawerFooterSlot ref={forwardedRef} {...restProps}>\n {children}\n </DrawerFooterSlot>\n );\n};\n\nDrawerFooter.displayName = \"Drawer.Footer\";\n","import { DrawerTitleSlot } from \"../drawer.slots\";\nimport type { DrawerTitleProps } from \"../drawer.types\";\nimport { Heading } from \"@/components\";\n\nexport const DrawerTitle = (props: DrawerTitleProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n return (\n <DrawerTitleSlot asChild {...restProps}>\n <Heading ref={forwardedRef} slot=\"title\" as=\"h2\" textStyle=\"lg\">\n {children}\n </Heading>\n </DrawerTitleSlot>\n );\n};\n\nDrawerTitle.displayName = \"Drawer.Title\";\n","import { defineMessages } from \"react-intl\";\n\nexport const messages = defineMessages({\n closeTrigger: {\n id: \"Nimbus.Drawer.closeTrigger\",\n description: \"aria-label for the default close trigger button\",\n defaultMessage: \"Close drawer\",\n },\n});\n","import { Close } from \"@commercetools/nimbus-icons\";\nimport { DrawerCloseTriggerSlot } from \"../drawer.slots\";\nimport type { DrawerCloseTriggerProps } from \"../drawer.types\";\nimport { IconButton } from \"@/components\";\nimport { messages } from \"../drawer.i18n\";\nimport { useIntl } from \"react-intl\";\n\nexport const DrawerCloseTrigger = (props: DrawerCloseTriggerProps) => {\n const { ref: forwardedRef, \"aria-label\": ariaLabel, ...restProps } = props;\n const intl = useIntl();\n\n return (\n <DrawerCloseTriggerSlot>\n <IconButton\n ref={forwardedRef}\n slot=\"close\"\n size=\"xs\"\n variant=\"ghost\"\n aria-label={ariaLabel || intl.formatMessage(messages.closeTrigger)}\n {...restProps}\n >\n <Close />\n </IconButton>\n </DrawerCloseTriggerSlot>\n );\n};\n\nDrawerCloseTrigger.displayName = \"Drawer.CloseTrigger\";\n","import { DrawerRoot } from \"./components/drawer.root\";\nimport { DrawerTrigger } from \"./components/drawer.trigger\";\nimport { DrawerContent } from \"./components/drawer.content\";\nimport { DrawerHeader } from \"./components/drawer.header\";\nimport { DrawerBody } from \"./components/drawer.body\";\nimport { DrawerFooter } from \"./components/drawer.footer\";\nimport { DrawerTitle } from \"./components/drawer.title\";\nimport { DrawerCloseTrigger } from \"./components/drawer.close-trigger\";\n\n/**\n * Drawer\n * ============================================================\n * A foundational drawer component for overlays that require user attention.\n * Built for accessibility and WCAG 2.1 AA compliance.\n *\n * Features:\n * - Controlled and uncontrolled modes\n * - Customizable placement, size, and animations\n * - Focus management and keyboard navigation\n * - Click-outside and Escape key dismissal\n * - Portal rendering support\n * - Backdrop overlay with animations\n *\n * @example\n * ```tsx\n * <Drawer.Root>\n * <Drawer.Trigger>Open Drawer</Drawer.Trigger>\n * <Drawer.Content size=\"md\" placement=\"center\">\n * <Drawer.Header>\n * <Drawer.Title>Drawer Title</Drawer.Title>\n * <Drawer.CloseTrigger>×</Drawer.CloseTrigger>\n * </Drawer.Header>\n * <Drawer.Body>\n * Drawer content goes here\n * </Drawer.Body>\n * <Drawer.Footer>\n * <button>Cancel</button>\n * <button>Save</button>\n * </Drawer.Footer>\n * </Drawer.Content>\n * </Drawer.Root>\n * ```\n * @see https://nimbus-documentation.vercel.app/components/feedback/drawer\n */\nexport const Drawer = {\n /**\n * # Drawer.Root\n *\n * The root component that provides context and state management for the drawer.\n * Handles accessibility and keyboard interaction.\n *\n * This component must wrap all drawer parts (Trigger, Content, etc.) and provides\n * the drawer open/close state and variant styling context.\n *\n * @example\n * ```tsx\n * <Drawer.Root>\n * <Drawer.Trigger>Open Drawer</Drawer.Trigger>\n * <Drawer.Content>\n * <Drawer.Header>\n * <Drawer.Title>Drawer Title</Drawer.Title>\n * </Drawer.Header>\n * <Drawer.Body>Drawer content</Drawer.Body>\n * </Drawer.Content>\n * </Drawer.Root>\n * ```\n */\n Root: DrawerRoot,\n /**\n * # Drawer.Trigger\n *\n * The trigger element that opens the drawer when activated.\n * Provides accessibility and keyboard support.\n *\n * @example\n * ```tsx\n * <Drawer.Root>\n * <Drawer.Trigger>Open Drawer</Drawer.Trigger>\n * <Drawer.Content>...</Drawer.Content>\n * </Drawer.Root>\n * ```\n */\n Trigger: DrawerTrigger,\n /**\n * # Drawer.Content\n *\n * The main drawer content container that handles portalling, backdrop,\n * positioning, and content styling.\n *\n * This component creates the drawer overlay, positions the content, and provides\n * accessibility features like focus management and keyboard dismissal.\n *\n * @example\n * ```tsx\n * <Drawer.Root>\n * <Drawer.Trigger>Open Drawer</Drawer.Trigger>\n * <Drawer.Content size=\"md\" placement=\"center\">\n * <Drawer.Header>\n * <Drawer.Title>Title</Drawer.Title>\n * </Drawer.Header>\n * <Drawer.Body>Content</Drawer.Body>\n * <Drawer.Footer>Actions</Drawer.Footer>\n * </Drawer.Content>\n * </Drawer.Root>\n * ```\n */\n Content: DrawerContent,\n /**\n * # Drawer.Header\n *\n * The header section of the drawer content.\n * Typically contains the title and close button.\n *\n * @example\n * ```tsx\n * <Drawer.Content>\n * <Drawer.Header>\n * <Drawer.Title>Drawer Title</Drawer.Title>\n * <Drawer.CloseTrigger />\n * </Drawer.Header>\n * <Drawer.Body>...</Drawer.Body>\n * </Drawer.Content>\n * ```\n */\n Header: DrawerHeader,\n /**\n * # Drawer.Body\n *\n * The main body content section of the drawer.\n * Contains the primary drawer content and handles overflow/scrolling.\n *\n * @example\n * ```tsx\n * <Drawer.Content>\n * <Drawer.Header>...</Drawer.Header>\n * <Drawer.Body>\n * <p>This is the main content of the drawer.</p>\n * </Drawer.Body>\n * <Drawer.Footer>...</Drawer.Footer>\n * </Drawer.Content>\n * ```\n */\n Body: DrawerBody,\n /**\n * # Drawer.Footer\n *\n * The footer section of the drawer, typically containing action buttons.\n * Provides consistent spacing and alignment for drawer actions.\n *\n * @example\n * ```tsx\n * <Drawer.Content>\n * <Drawer.Header>...</Drawer.Header>\n * <Drawer.Body>...</Drawer.Body>\n * <Drawer.Footer>\n * <Button variant=\"outline\">Cancel</Button>\n * <Button>Confirm</Button>\n * </Drawer.Footer>\n * </Drawer.Content>\n * ```\n */\n Footer: DrawerFooter,\n /**\n * # Drawer.Title\n *\n * The accessible title element for the drawer.\n * Provides proper accessibility and screen reader support.\n *\n * @example\n * ```tsx\n * <Drawer.Content>\n * <Drawer.Header>\n * <Drawer.Title>Confirm Action</Drawer.Title>\n * </Drawer.Header>\n * <Drawer.Body>...</Drawer.Body>\n * </Drawer.Content>\n * ```\n */\n Title: DrawerTitle,\n /**\n * # Drawer.CloseTrigger\n *\n * A button that closes the drawer when activated.\n * Displays an IconButton with a close (X) icon by default.\n *\n * The component automatically handles the close behavior,\n * so no additional onPress handler is needed.\n *\n * @example\n * ```tsx\n * <Drawer.Root>\n * <Drawer.Trigger>Open Drawer</Drawer.Trigger>\n * <Drawer.Content>\n * <Drawer.Header>\n * <Drawer.Title>Title</Drawer.Title>\n * <Drawer.CloseTrigger aria-label=\"Close drawer\" />\n * </Drawer.Header>\n * <Drawer.Body>Content</Drawer.Body>\n * </Drawer.Content>\n * </Drawer.Root>\n * ```\n */\n CloseTrigger: DrawerCloseTrigger,\n};\n\n// Internal exports for react-docgen\nexport {\n DrawerRoot as _DrawerRoot,\n DrawerTrigger as _DrawerTrigger,\n DrawerContent as _DrawerContent,\n DrawerHeader as _DrawerHeader,\n DrawerBody as _DrawerBody,\n DrawerFooter as _DrawerFooter,\n DrawerTitle as _DrawerTitle,\n DrawerCloseTrigger as _DrawerCloseTrigger,\n};\n"],"names":["withProvider","withContext","createSlotRecipeContext","drawerSlotRecipe","DrawerRootSlot","DrawerTriggerSlot","DrawerModalOverlaySlot","DrawerModalSlot","DrawerContentSlot","DrawerHeaderSlot","DrawerBodySlot","DrawerFooterSlot","DrawerTitleSlot","DrawerCloseTriggerSlot","DrawerContext","createContext","useDrawerRootContext","context","useContext","DrawerProvider","children","value","jsx","DrawerRoot","props","recipe","useSlotRecipe","recipeProps","isOpen","onOpenChange","defaultOpen","content","hasDrawerTrigger","React","child","displayName","RaDialogTrigger","DrawerTrigger","forwardedRef","asChild","chakra","styleProps","restProps","extractStyleProps","RaButton","DrawerContent","isDismissable","isKeyboardDismissDisabled","shouldCloseOnInteractOutside","modalProps","RaModalOverlay","RaModal","RaDialog","DrawerHeader","DrawerBody","DrawerFooter","DrawerTitle","Heading","messages","defineMessages","DrawerCloseTrigger","ariaLabel","intl","useIntl","IconButton","Close","Drawer"],"mappings":";;;;;;;;;;;;AAMA,MAAM,EAAE,cAAAA,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,QAAQC;AACV,CAAC,GAIYC,IAAiB,gBAAAJ;AAAA,EAC5B;AAAA,EACA;AACF,GAIaK,IAAoB,gBAAAJ,EAG/B,UAAU,SAAS,GAIRK,IAAyB,gBAAAL,EAGpC,OAAO,cAAc,GAIVM,IAAkB,gBAAAN,EAG7B,OAAO,OAAO,GAIHO,IAAoB,gBAAAP,EAG/B,OAAO,SAAS,GAILQ,IAAmB,gBAAAR;AAAA,EAC9B;AAAA,EACA;AACF,GAIaS,IAAiB,gBAAAT;AAAA,EAC5B;AAAA,EACA;AACF,GAIaU,IAAmB,gBAAAV;AAAA,EAC9B;AAAA,EACA;AACF,GAIaW,IAAkB,gBAAAX,EAG7B,MAAM,OAAO,GAIFY,IAAyB,gBAAAZ,EAGpC,OAAO,cAAc,GCtEVa,IAAgB,gBAAAC;AAAA,EAC3B;AACF,GAOaC,IAAuB,MAA0B;AAC5D,QAAMC,IAAUC,EAAWJ,CAAa;AACxC,MAAI,CAACG;AACH,UAAM,IAAI,MAAM,kDAAkD;AAEpE,SAAOA;AACT,GAKa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S;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAuBpB,MAAM3C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAeN,SAASc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAwBT,SAASQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAkBT,QAAQQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAkBR,MAAMC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAmBN,QAAQC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAiBR,OAAOC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAwBP,cAAcI;AAChB;"}
1
+ {"version":3,"file":"drawer-CEcfCY6S.es.js","sources":["../../src/components/drawer/drawer.slots.tsx","../../src/components/drawer/components/drawer.context.tsx","../../src/components/drawer/components/drawer.root.tsx","../../src/components/drawer/components/drawer.trigger.tsx","../../src/components/drawer/components/drawer.content.tsx","../../src/components/drawer/components/drawer.header.tsx","../../src/components/drawer/components/drawer.body.tsx","../../src/components/drawer/components/drawer.footer.tsx","../../src/components/drawer/components/drawer.title.tsx","../../src/components/drawer/drawer.i18n.ts","../../src/components/drawer/components/drawer.close-trigger.tsx","../../src/components/drawer/drawer.tsx"],"sourcesContent":["import {\n createSlotRecipeContext,\n type HTMLChakraProps,\n} from \"@chakra-ui/react/styled-system\";\nimport { drawerSlotRecipe } from \"./drawer.recipe\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n recipe: drawerSlotRecipe,\n});\n\n// Root slot - provides recipe context + config to all child components\nexport type DrawerRootSlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerRootSlot = withProvider<HTMLDivElement, DrawerRootSlotProps>(\n \"div\",\n \"root\"\n);\n\n// Trigger slot - button that opens the drawer\nexport type DrawerTriggerSlotProps = HTMLChakraProps<\"button\">;\nexport const DrawerTriggerSlot = withContext<\n HTMLButtonElement,\n DrawerTriggerSlotProps\n>(\"button\", \"trigger\");\n\n// Backdrop slot - overlay displayed behind the drawer\nexport type DrawerModalOverlaySlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerModalOverlaySlot = withContext<\n HTMLDivElement,\n DrawerModalOverlaySlotProps\n>(\"div\", \"modalOverlay\");\n\n// modal slot - positions the drawer content\nexport type DrawerModalSlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerModalSlot = withContext<\n HTMLDivElement,\n DrawerModalSlotProps\n>(\"div\", \"modal\");\n\n// Content slot - main drawer container\nexport type DrawerContentSlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerContentSlot = withContext<\n HTMLDivElement,\n DrawerContentSlotProps\n>(\"div\", \"content\");\n\n// Header slot - drawer header section\nexport type DrawerHeaderSlotProps = HTMLChakraProps<\"header\">;\nexport const DrawerHeaderSlot = withContext<HTMLElement, DrawerHeaderSlotProps>(\n \"header\",\n \"header\"\n);\n\n// Body slot - drawer body content\nexport type DrawerBodySlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerBodySlot = withContext<HTMLDivElement, DrawerBodySlotProps>(\n \"div\",\n \"body\"\n);\n\n// Footer slot - drawer footer section with actions\nexport type DrawerFooterSlotProps = HTMLChakraProps<\"footer\">;\nexport const DrawerFooterSlot = withContext<HTMLElement, DrawerFooterSlotProps>(\n \"footer\",\n \"footer\"\n);\n\n// Title slot - accessible drawer title\nexport type DrawerTitleSlotProps = HTMLChakraProps<\"h2\">;\nexport const DrawerTitleSlot = withContext<\n HTMLHeadingElement,\n DrawerTitleSlotProps\n>(\"h2\", \"title\");\n\n// Close trigger slot - div container for positioning close button\nexport type DrawerCloseTriggerSlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerCloseTriggerSlot = withContext<\n HTMLDivElement,\n DrawerCloseTriggerSlotProps\n>(\"div\", \"closeTrigger\");\n","import { createContext, useContext } from \"react\";\nimport type { DrawerRootProps } from \"../drawer.types\";\n\n/**\n * Context value containing drawer configuration passed from Root to child components\n */\nexport type DrawerContextValue = DrawerRootProps;\n\nexport const DrawerContext = createContext<DrawerContextValue | undefined>(\n undefined\n);\n\n/**\n * Hook to access drawer configuration from DrawerContext\n * @returns Drawer configuration from context\n * @throws Error if used outside of Drawer.Root\n */\nexport const useDrawerRootContext = (): DrawerContextValue => {\n const context = useContext(DrawerContext);\n if (!context) {\n throw new Error(\"useDrawerContext must be used within Drawer.Root\");\n }\n return context;\n};\n\n/**\n * Provider component that passes drawer configuration down to child components\n */\nexport const DrawerProvider = ({\n children,\n value,\n}: {\n children: React.ReactNode;\n value: DrawerContextValue;\n}) => {\n return <DrawerContext value={value}>{children}</DrawerContext>;\n};\n","import React from \"react\";\nimport { DialogTrigger as RaDialogTrigger } from \"react-aria-components\";\nimport { useSlotRecipe } from \"@chakra-ui/react/styled-system\";\nimport { DrawerRootSlot } from \"../drawer.slots\";\nimport type { DrawerRootProps } from \"../drawer.types\";\nimport { DrawerProvider } from \"./drawer.context\";\nimport { drawerSlotRecipe } from \"../drawer.recipe\";\n\nexport const DrawerRoot = (props: DrawerRootProps) => {\n const recipe = useSlotRecipe({ recipe: drawerSlotRecipe });\n // Extract recipe props\n const [recipeProps] = recipe.splitVariantProps(props);\n // Extract props that are usable on RaDialogTrigger\n const { children, isOpen, onOpenChange, defaultOpen = false } = props;\n\n const content = <DrawerRootSlot {...recipeProps}>{children}</DrawerRootSlot>;\n\n // Check if any child is a Drawer.Trigger component\n // React Aria's DialogTrigger needs a pressable child, so we only use it when there's a trigger\n const hasDrawerTrigger = React.Children.toArray(children).some((child) => {\n if (React.isValidElement(child) && typeof child.type === \"function\") {\n const displayName = (\n child.type as React.ComponentType & { displayName?: string }\n )?.displayName;\n return (\n displayName === \"DrawerTrigger\" || displayName === \"Drawer.Trigger\"\n );\n }\n return false;\n });\n\n // Share all props (config + variant props) with the Drawer subcomponents\n return (\n <DrawerProvider value={props}>\n {hasDrawerTrigger ? (\n // When there's a Drawer.Trigger, use DialogTrigger for React Aria integration\n <RaDialogTrigger\n isOpen={isOpen}\n onOpenChange={onOpenChange}\n defaultOpen={defaultOpen}\n >\n {content}\n </RaDialogTrigger>\n ) : (\n // When no Drawer.Trigger, skip DialogTrigger to avoid the warning\n content\n )}\n </DrawerProvider>\n );\n};\n\nDrawerRoot.displayName = \"Drawer.Root\";\n","import { Button as RaButton } from \"react-aria-components\";\nimport { DrawerTriggerSlot } from \"../drawer.slots\";\nimport type { DrawerTriggerProps } from \"../drawer.types\";\nimport { extractStyleProps } from \"@/utils\";\nimport { chakra } from \"@chakra-ui/react/styled-system\";\n\nexport const DrawerTrigger = ({\n ref: forwardedRef,\n children,\n asChild,\n ...props\n}: DrawerTriggerProps) => {\n // If asChild is true, wrap children directly in RaButton with asChild\n if (asChild) {\n return (\n <chakra.button ref={forwardedRef} asChild {...props}>\n {children}\n </chakra.button>\n );\n }\n\n const [styleProps, restProps] = extractStyleProps(props);\n\n // Otherwise, wrap with both DrawerTriggerSlot and RaButton\n // Only pass React Aria compatible props to avoid type conflicts\n return (\n <DrawerTriggerSlot {...styleProps} asChild>\n <RaButton ref={forwardedRef} {...restProps}>\n {children}\n </RaButton>\n </DrawerTriggerSlot>\n );\n};\n\nDrawerTrigger.displayName = \"Drawer.Trigger\";\n","import {\n Modal as RaModal,\n ModalOverlay as RaModalOverlay,\n Dialog as RaDialog,\n} from \"react-aria-components\";\nimport {\n DrawerModalOverlaySlot,\n DrawerModalSlot,\n DrawerContentSlot,\n} from \"../drawer.slots\";\nimport type { DrawerContentProps } from \"../drawer.types\";\nimport { extractStyleProps } from \"@/utils\";\nimport { useDrawerRootContext } from \"./drawer.context\";\n\nexport const DrawerContent = (props: DrawerContentProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n // Get recipe configuration from context instead of props\n const {\n defaultOpen,\n isDismissable,\n isKeyboardDismissDisabled,\n shouldCloseOnInteractOutside,\n isOpen,\n onOpenChange,\n } = useDrawerRootContext();\n\n const modalProps = {\n defaultOpen,\n isDismissable,\n isKeyboardDismissDisabled,\n shouldCloseOnInteractOutside,\n isOpen,\n onOpenChange,\n };\n\n const [styleProps] = extractStyleProps(restProps);\n\n return (\n <DrawerModalOverlaySlot asChild>\n <RaModalOverlay {...modalProps}>\n <DrawerModalSlot asChild>\n <RaModal>\n <DrawerContentSlot asChild {...styleProps}>\n <RaDialog ref={forwardedRef}>{children}</RaDialog>\n </DrawerContentSlot>\n </RaModal>\n </DrawerModalSlot>\n </RaModalOverlay>\n </DrawerModalOverlaySlot>\n );\n};\n\nDrawerContent.displayName = \"Drawer.Content\";\n","import { DrawerHeaderSlot } from \"../drawer.slots\";\nimport type { DrawerHeaderProps } from \"../drawer.types\";\n\nexport const DrawerHeader = (props: DrawerHeaderProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n return (\n <DrawerHeaderSlot ref={forwardedRef} {...restProps}>\n {children}\n </DrawerHeaderSlot>\n );\n};\n\nDrawerHeader.displayName = \"Drawer.Header\";\n","import { DrawerBodySlot } from \"../drawer.slots\";\nimport type { DrawerBodyProps } from \"../drawer.types\";\n\nexport const DrawerBody = (props: DrawerBodyProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n const defaultProps = {\n /**\n * Set tabIndex to 0 to allow the body to receive focus,\n * effectively enabling scrolling via keyboard arrow keys.\n */\n tabIndex: 0,\n };\n\n return (\n <DrawerBodySlot ref={forwardedRef} {...defaultProps} {...restProps}>\n {children}\n </DrawerBodySlot>\n );\n};\n\nDrawerBody.displayName = \"Drawer.Body\";\n","import { DrawerFooterSlot } from \"../drawer.slots\";\nimport type { DrawerFooterProps } from \"../drawer.types\";\n\nexport const DrawerFooter = (props: DrawerFooterProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n return (\n <DrawerFooterSlot ref={forwardedRef} {...restProps}>\n {children}\n </DrawerFooterSlot>\n );\n};\n\nDrawerFooter.displayName = \"Drawer.Footer\";\n","import { DrawerTitleSlot } from \"../drawer.slots\";\nimport type { DrawerTitleProps } from \"../drawer.types\";\nimport { Heading } from \"@/components\";\n\nexport const DrawerTitle = (props: DrawerTitleProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n return (\n <DrawerTitleSlot asChild {...restProps}>\n <Heading ref={forwardedRef} slot=\"title\" as=\"h2\" textStyle=\"lg\">\n {children}\n </Heading>\n </DrawerTitleSlot>\n );\n};\n\nDrawerTitle.displayName = \"Drawer.Title\";\n","import { defineMessages } from \"react-intl\";\n\nexport const messages = defineMessages({\n closeTrigger: {\n id: \"Nimbus.Drawer.closeTrigger\",\n description: \"aria-label for the default close trigger button\",\n defaultMessage: \"Close drawer\",\n },\n});\n","import { Close } from \"@commercetools/nimbus-icons\";\nimport { DrawerCloseTriggerSlot } from \"../drawer.slots\";\nimport type { DrawerCloseTriggerProps } from \"../drawer.types\";\nimport { IconButton } from \"@/components\";\nimport { messages } from \"../drawer.i18n\";\nimport { useIntl } from \"react-intl\";\n\nexport const DrawerCloseTrigger = (props: DrawerCloseTriggerProps) => {\n const { ref: forwardedRef, \"aria-label\": ariaLabel, ...restProps } = props;\n const intl = useIntl();\n\n return (\n <DrawerCloseTriggerSlot>\n <IconButton\n ref={forwardedRef}\n slot=\"close\"\n size=\"xs\"\n variant=\"ghost\"\n aria-label={ariaLabel || intl.formatMessage(messages.closeTrigger)}\n {...restProps}\n >\n <Close />\n </IconButton>\n </DrawerCloseTriggerSlot>\n );\n};\n\nDrawerCloseTrigger.displayName = \"Drawer.CloseTrigger\";\n","import { DrawerRoot } from \"./components/drawer.root\";\nimport { DrawerTrigger } from \"./components/drawer.trigger\";\nimport { DrawerContent } from \"./components/drawer.content\";\nimport { DrawerHeader } from \"./components/drawer.header\";\nimport { DrawerBody } from \"./components/drawer.body\";\nimport { DrawerFooter } from \"./components/drawer.footer\";\nimport { DrawerTitle } from \"./components/drawer.title\";\nimport { DrawerCloseTrigger } from \"./components/drawer.close-trigger\";\n\n/**\n * Drawer\n * ============================================================\n * A foundational drawer component for overlays that require user attention.\n * Built for accessibility and WCAG 2.1 AA compliance.\n *\n * Features:\n * - Controlled and uncontrolled modes\n * - Customizable placement, size, and animations\n * - Focus management and keyboard navigation\n * - Click-outside and Escape key dismissal\n * - Portal rendering support\n * - Backdrop overlay with animations\n *\n * @example\n * ```tsx\n * <Drawer.Root>\n * <Drawer.Trigger>Open Drawer</Drawer.Trigger>\n * <Drawer.Content size=\"md\" placement=\"center\">\n * <Drawer.Header>\n * <Drawer.Title>Drawer Title</Drawer.Title>\n * <Drawer.CloseTrigger>×</Drawer.CloseTrigger>\n * </Drawer.Header>\n * <Drawer.Body>\n * Drawer content goes here\n * </Drawer.Body>\n * <Drawer.Footer>\n * <button>Cancel</button>\n * <button>Save</button>\n * </Drawer.Footer>\n * </Drawer.Content>\n * </Drawer.Root>\n * ```\n * @see https://nimbus-documentation.vercel.app/components/feedback/drawer\n */\nexport const Drawer = {\n /**\n * # Drawer.Root\n *\n * The root component that provides context and state management for the drawer.\n * Handles accessibility and keyboard interaction.\n *\n * This component must wrap all drawer parts (Trigger, Content, etc.) and provides\n * the drawer open/close state and variant styling context.\n *\n * @example\n * ```tsx\n * <Drawer.Root>\n * <Drawer.Trigger>Open Drawer</Drawer.Trigger>\n * <Drawer.Content>\n * <Drawer.Header>\n * <Drawer.Title>Drawer Title</Drawer.Title>\n * </Drawer.Header>\n * <Drawer.Body>Drawer content</Drawer.Body>\n * </Drawer.Content>\n * </Drawer.Root>\n * ```\n */\n Root: DrawerRoot,\n /**\n * # Drawer.Trigger\n *\n * The trigger element that opens the drawer when activated.\n * Provides accessibility and keyboard support.\n *\n * @example\n * ```tsx\n * <Drawer.Root>\n * <Drawer.Trigger>Open Drawer</Drawer.Trigger>\n * <Drawer.Content>...</Drawer.Content>\n * </Drawer.Root>\n * ```\n */\n Trigger: DrawerTrigger,\n /**\n * # Drawer.Content\n *\n * The main drawer content container that handles portalling, backdrop,\n * positioning, and content styling.\n *\n * This component creates the drawer overlay, positions the content, and provides\n * accessibility features like focus management and keyboard dismissal.\n *\n * @example\n * ```tsx\n * <Drawer.Root>\n * <Drawer.Trigger>Open Drawer</Drawer.Trigger>\n * <Drawer.Content size=\"md\" placement=\"center\">\n * <Drawer.Header>\n * <Drawer.Title>Title</Drawer.Title>\n * </Drawer.Header>\n * <Drawer.Body>Content</Drawer.Body>\n * <Drawer.Footer>Actions</Drawer.Footer>\n * </Drawer.Content>\n * </Drawer.Root>\n * ```\n */\n Content: DrawerContent,\n /**\n * # Drawer.Header\n *\n * The header section of the drawer content.\n * Typically contains the title and close button.\n *\n * @example\n * ```tsx\n * <Drawer.Content>\n * <Drawer.Header>\n * <Drawer.Title>Drawer Title</Drawer.Title>\n * <Drawer.CloseTrigger />\n * </Drawer.Header>\n * <Drawer.Body>...</Drawer.Body>\n * </Drawer.Content>\n * ```\n */\n Header: DrawerHeader,\n /**\n * # Drawer.Body\n *\n * The main body content section of the drawer.\n * Contains the primary drawer content and handles overflow/scrolling.\n *\n * @example\n * ```tsx\n * <Drawer.Content>\n * <Drawer.Header>...</Drawer.Header>\n * <Drawer.Body>\n * <p>This is the main content of the drawer.</p>\n * </Drawer.Body>\n * <Drawer.Footer>...</Drawer.Footer>\n * </Drawer.Content>\n * ```\n */\n Body: DrawerBody,\n /**\n * # Drawer.Footer\n *\n * The footer section of the drawer, typically containing action buttons.\n * Provides consistent spacing and alignment for drawer actions.\n *\n * @example\n * ```tsx\n * <Drawer.Content>\n * <Drawer.Header>...</Drawer.Header>\n * <Drawer.Body>...</Drawer.Body>\n * <Drawer.Footer>\n * <Button variant=\"outline\">Cancel</Button>\n * <Button>Confirm</Button>\n * </Drawer.Footer>\n * </Drawer.Content>\n * ```\n */\n Footer: DrawerFooter,\n /**\n * # Drawer.Title\n *\n * The accessible title element for the drawer.\n * Provides proper accessibility and screen reader support.\n *\n * @example\n * ```tsx\n * <Drawer.Content>\n * <Drawer.Header>\n * <Drawer.Title>Confirm Action</Drawer.Title>\n * </Drawer.Header>\n * <Drawer.Body>...</Drawer.Body>\n * </Drawer.Content>\n * ```\n */\n Title: DrawerTitle,\n /**\n * # Drawer.CloseTrigger\n *\n * A button that closes the drawer when activated.\n * Displays an IconButton with a close (X) icon by default.\n *\n * The component automatically handles the close behavior,\n * so no additional onPress handler is needed.\n *\n * @example\n * ```tsx\n * <Drawer.Root>\n * <Drawer.Trigger>Open Drawer</Drawer.Trigger>\n * <Drawer.Content>\n * <Drawer.Header>\n * <Drawer.Title>Title</Drawer.Title>\n * <Drawer.CloseTrigger aria-label=\"Close drawer\" />\n * </Drawer.Header>\n * <Drawer.Body>Content</Drawer.Body>\n * </Drawer.Content>\n * </Drawer.Root>\n * ```\n */\n CloseTrigger: DrawerCloseTrigger,\n};\n\n// Internal exports for react-docgen\nexport {\n DrawerRoot as _DrawerRoot,\n DrawerTrigger as _DrawerTrigger,\n DrawerContent as _DrawerContent,\n DrawerHeader as _DrawerHeader,\n DrawerBody as _DrawerBody,\n DrawerFooter as _DrawerFooter,\n DrawerTitle as _DrawerTitle,\n DrawerCloseTrigger as _DrawerCloseTrigger,\n};\n"],"names":["withProvider","withContext","createSlotRecipeContext","drawerSlotRecipe","DrawerRootSlot","DrawerTriggerSlot","DrawerModalOverlaySlot","DrawerModalSlot","DrawerContentSlot","DrawerHeaderSlot","DrawerBodySlot","DrawerFooterSlot","DrawerTitleSlot","DrawerCloseTriggerSlot","DrawerContext","createContext","useDrawerRootContext","context","useContext","DrawerProvider","children","value","jsx","DrawerRoot","props","recipe","useSlotRecipe","recipeProps","isOpen","onOpenChange","defaultOpen","content","hasDrawerTrigger","React","child","displayName","RaDialogTrigger","DrawerTrigger","forwardedRef","asChild","chakra","styleProps","restProps","extractStyleProps","RaButton","DrawerContent","isDismissable","isKeyboardDismissDisabled","shouldCloseOnInteractOutside","modalProps","RaModalOverlay","RaModal","RaDialog","DrawerHeader","DrawerBody","DrawerFooter","DrawerTitle","Heading","messages","defineMessages","DrawerCloseTrigger","ariaLabel","intl","useIntl","IconButton","Close","Drawer"],"mappings":";;;;;;;;;;;;AAMA,MAAM,EAAE,cAAAA,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,QAAQC;AACV,CAAC,GAIYC,IAAiB,gBAAAJ;AAAA,EAC5B;AAAA,EACA;AACF,GAIaK,IAAoB,gBAAAJ,EAG/B,UAAU,SAAS,GAIRK,IAAyB,gBAAAL,EAGpC,OAAO,cAAc,GAIVM,IAAkB,gBAAAN,EAG7B,OAAO,OAAO,GAIHO,IAAoB,gBAAAP,EAG/B,OAAO,SAAS,GAILQ,IAAmB,gBAAAR;AAAA,EAC9B;AAAA,EACA;AACF,GAIaS,IAAiB,gBAAAT;AAAA,EAC5B;AAAA,EACA;AACF,GAIaU,IAAmB,gBAAAV;AAAA,EAC9B;AAAA,EACA;AACF,GAIaW,IAAkB,gBAAAX,EAG7B,MAAM,OAAO,GAIFY,IAAyB,gBAAAZ,EAGpC,OAAO,cAAc,GCtEVa,IAAgB,gBAAAC;AAAA,EAC3B;AACF,GAOaC,IAAuB,MAA0B;AAC5D,QAA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"),x=require("./Dialog-DINBl88u.cjs.js"),g=require("@chakra-ui/react/styled-system"),D=require("./index-CxLKWOES.cjs.js"),q=require("./Button-DLCecw8f.cjs.js"),h=require("./extract-style-props-IfUYxPJV.cjs.js"),p=require("./Modal-C9uSJ3BN.cjs.js"),N=require("./heading-DWweWKGQ.cjs.js"),O=require("@commercetools/nimbus-icons"),y=require("react-intl"),B=require("./icon-button-B28VUff9.cjs.js"),{withProvider:I,withContext:n}=g.createSlotRecipeContext({recipe:D.drawerSlotRecipe}),M=I("div","root"),H=n("button","trigger"),F=n("div","modalOverlay"),E=n("div","modal"),V=n("div","content"),k=n("header","header"),z=n("div","body"),A=n("footer","footer"),K=n("h2","title"),L=n("div","closeTrigger"),C=u.createContext(void 0),G=()=>{const e=u.useContext(C);if(!e)throw new Error("useDrawerContext must be used within Drawer.Root");return e},J=({children:e,value:t})=>r.jsx(C,{value:t,children:e}),b=e=>{const t=g.useSlotRecipe({recipe:D.drawerSlotRecipe}),[s]=t.splitVariantProps(e),{children:o,isOpen:a,onOpenChange:i,defaultOpen:f=!1}=e,l=r.jsx(M,{...s,children:o}),w=u.Children.toArray(o).some(c=>{if(u.isValidElement(c)&&typeof c.type=="function"){const d=c.type?.displayName;return d==="DrawerTrigger"||d==="Drawer.Trigger"}return!1});return r.jsx(J,{value:e,children:w?r.jsx(x.$de32f1b87079253c$export$2e1e1122cf0cba88,{isOpen:a,onOpenChange:i,defaultOpen:f,children:l}):l})};b.displayName="Drawer.Root";const m=({ref:e,children:t,asChild:s,...o})=>{if(s)return r.jsx(g.chakra.button,{ref:e,asChild:!0,...o,children:t});const[a,i]=h.extractStyleProps(o);return r.jsx(H,{...a,asChild:!0,children:r.jsx(q.$d2b4bc8c273e7be6$export$353f5b6fc5456de1,{ref:e,...i,children:t})})};m.displayName="Drawer.Trigger";const j=e=>{const{ref:t,children:s,...o}=e,{defaultOpen:a,isDismissable:i,isKeyboardDismissDisabled:f,shouldCloseOnInteractOutside:l,isOpen:w,onOpenChange:c}=G(),d={defaultOpen:a,isDismissable:i,isKeyboardDismissDisabled:f,shouldCloseOnInteractOutside:l,isOpen:w,onOpenChange:c},[v]=h.extractStyleProps(o);return r.jsx(F,{asChild:!0,children:r.jsx(p.$f3f84453ead64de5$export$8948f78d83984c69,{...d,children:r.jsx(E,{asChild:!0,children:r.jsx(p.$f3f84453ead64de5$export$2b77a92f1a5ad772,{children:r.jsx(V,{asChild:!0,...v,children:r.jsx(x.$de32f1b87079253c$export$3ddf2d174ce01153,{ref:t,children:s})})})})})})};j.displayName="Drawer.Content";const S=e=>{const{ref:t,children:s,...o}=e;return r.jsx(k,{ref:t,...o,children:s})};S.displayName="Drawer.Header";const T=e=>{const{ref:t,children:s,...o}=e,a={tabIndex:0};return r.jsx(z,{ref:t,...a,...o,children:s})};T.displayName="Drawer.Body";const P=e=>{const{ref:t,children:s,...o}=e;return r.jsx(A,{ref:t,...o,children:s})};P.displayName="Drawer.Footer";const R=e=>{const{ref:t,children:s,...o}=e;return r.jsx(K,{asChild:!0,...o,children:r.jsx(N.Heading,{ref:t,slot:"title",as:"h2",textStyle:"lg",children:s})})};R.displayName="Drawer.Title";const Q=y.defineMessages({closeTrigger:{id:"Nimbus.Drawer.closeTrigger",description:"aria-label for the default close trigger button",defaultMessage:"Close drawer"}}),$=e=>{const{ref:t,"aria-label":s,...o}=e,a=y.useIntl();return r.jsx(L,{children:r.jsx(B.IconButton,{ref:t,slot:"close",size:"xs",variant:"ghost","aria-label":s||a.formatMessage(Q.closeTrigger),...o,children:r.jsx(O.Close,{})})})};$.displayName="Drawer.CloseTrigger";const U={Root:b,Trigger:m,Content:j,Header:S,Body:T,Footer:P,Title:R,CloseTrigger:$};exports.Drawer=U;
2
- //# sourceMappingURL=drawer-D3PNF9As.cjs.js.map
1
+ "use strict";const r=require("react/jsx-runtime"),u=require("react"),x=require("./Dialog-DINBl88u.cjs.js"),g=require("@chakra-ui/react/styled-system"),D=require("./index-hUcMzBfs.cjs.js"),q=require("./Button-DLCecw8f.cjs.js"),h=require("./extract-style-props-0H1Ajy_s.cjs.js"),p=require("./Modal-C9uSJ3BN.cjs.js"),N=require("./heading-DWweWKGQ.cjs.js"),O=require("@commercetools/nimbus-icons"),y=require("react-intl"),B=require("./icon-button-CCOl3BcF.cjs.js"),{withProvider:I,withContext:n}=g.createSlotRecipeContext({recipe:D.drawerSlotRecipe}),M=I("div","root"),H=n("button","trigger"),F=n("div","modalOverlay"),E=n("div","modal"),V=n("div","content"),k=n("header","header"),z=n("div","body"),A=n("footer","footer"),K=n("h2","title"),L=n("div","closeTrigger"),C=u.createContext(void 0),G=()=>{const e=u.useContext(C);if(!e)throw new Error("useDrawerContext must be used within Drawer.Root");return e},J=({children:e,value:t})=>r.jsx(C,{value:t,children:e}),b=e=>{const t=g.useSlotRecipe({recipe:D.drawerSlotRecipe}),[s]=t.splitVariantProps(e),{children:o,isOpen:a,onOpenChange:i,defaultOpen:f=!1}=e,l=r.jsx(M,{...s,children:o}),w=u.Children.toArray(o).some(c=>{if(u.isValidElement(c)&&typeof c.type=="function"){const d=c.type?.displayName;return d==="DrawerTrigger"||d==="Drawer.Trigger"}return!1});return r.jsx(J,{value:e,children:w?r.jsx(x.$de32f1b87079253c$export$2e1e1122cf0cba88,{isOpen:a,onOpenChange:i,defaultOpen:f,children:l}):l})};b.displayName="Drawer.Root";const m=({ref:e,children:t,asChild:s,...o})=>{if(s)return r.jsx(g.chakra.button,{ref:e,asChild:!0,...o,children:t});const[a,i]=h.extractStyleProps(o);return r.jsx(H,{...a,asChild:!0,children:r.jsx(q.$d2b4bc8c273e7be6$export$353f5b6fc5456de1,{ref:e,...i,children:t})})};m.displayName="Drawer.Trigger";const j=e=>{const{ref:t,children:s,...o}=e,{defaultOpen:a,isDismissable:i,isKeyboardDismissDisabled:f,shouldCloseOnInteractOutside:l,isOpen:w,onOpenChange:c}=G(),d={defaultOpen:a,isDismissable:i,isKeyboardDismissDisabled:f,shouldCloseOnInteractOutside:l,isOpen:w,onOpenChange:c},[v]=h.extractStyleProps(o);return r.jsx(F,{asChild:!0,children:r.jsx(p.$f3f84453ead64de5$export$8948f78d83984c69,{...d,children:r.jsx(E,{asChild:!0,children:r.jsx(p.$f3f84453ead64de5$export$2b77a92f1a5ad772,{children:r.jsx(V,{asChild:!0,...v,children:r.jsx(x.$de32f1b87079253c$export$3ddf2d174ce01153,{ref:t,children:s})})})})})})};j.displayName="Drawer.Content";const S=e=>{const{ref:t,children:s,...o}=e;return r.jsx(k,{ref:t,...o,children:s})};S.displayName="Drawer.Header";const T=e=>{const{ref:t,children:s,...o}=e,a={tabIndex:0};return r.jsx(z,{ref:t,...a,...o,children:s})};T.displayName="Drawer.Body";const P=e=>{const{ref:t,children:s,...o}=e;return r.jsx(A,{ref:t,...o,children:s})};P.displayName="Drawer.Footer";const R=e=>{const{ref:t,children:s,...o}=e;return r.jsx(K,{asChild:!0,...o,children:r.jsx(N.Heading,{ref:t,slot:"title",as:"h2",textStyle:"lg",children:s})})};R.displayName="Drawer.Title";const Q=y.defineMessages({closeTrigger:{id:"Nimbus.Drawer.closeTrigger",description:"aria-label for the default close trigger button",defaultMessage:"Close drawer"}}),$=e=>{const{ref:t,"aria-label":s,...o}=e,a=y.useIntl();return r.jsx(L,{children:r.jsx(B.IconButton,{ref:t,slot:"close",size:"xs",variant:"ghost","aria-label":s||a.formatMessage(Q.closeTrigger),...o,children:r.jsx(O.Close,{})})})};$.displayName="Drawer.CloseTrigger";const U={Root:b,Trigger:m,Content:j,Header:S,Body:T,Footer:P,Title:R,CloseTrigger:$};exports.Drawer=U;
2
+ //# sourceMappingURL=drawer-TBV6cxVI.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"drawer-D3PNF9As.cjs.js","sources":["../../src/components/drawer/drawer.slots.tsx","../../src/components/drawer/components/drawer.context.tsx","../../src/components/drawer/components/drawer.root.tsx","../../src/components/drawer/components/drawer.trigger.tsx","../../src/components/drawer/components/drawer.content.tsx","../../src/components/drawer/components/drawer.header.tsx","../../src/components/drawer/components/drawer.body.tsx","../../src/components/drawer/components/drawer.footer.tsx","../../src/components/drawer/components/drawer.title.tsx","../../src/components/drawer/drawer.i18n.ts","../../src/components/drawer/components/drawer.close-trigger.tsx","../../src/components/drawer/drawer.tsx"],"sourcesContent":["import {\n createSlotRecipeContext,\n type HTMLChakraProps,\n} from \"@chakra-ui/react/styled-system\";\nimport { drawerSlotRecipe } from \"./drawer.recipe\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n recipe: drawerSlotRecipe,\n});\n\n// Root slot - provides recipe context + config to all child components\nexport type DrawerRootSlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerRootSlot = withProvider<HTMLDivElement, DrawerRootSlotProps>(\n \"div\",\n \"root\"\n);\n\n// Trigger slot - button that opens the drawer\nexport type DrawerTriggerSlotProps = HTMLChakraProps<\"button\">;\nexport const DrawerTriggerSlot = withContext<\n HTMLButtonElement,\n DrawerTriggerSlotProps\n>(\"button\", \"trigger\");\n\n// Backdrop slot - overlay displayed behind the drawer\nexport type DrawerModalOverlaySlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerModalOverlaySlot = withContext<\n HTMLDivElement,\n DrawerModalOverlaySlotProps\n>(\"div\", \"modalOverlay\");\n\n// modal slot - positions the drawer content\nexport type DrawerModalSlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerModalSlot = withContext<\n HTMLDivElement,\n DrawerModalSlotProps\n>(\"div\", \"modal\");\n\n// Content slot - main drawer container\nexport type DrawerContentSlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerContentSlot = withContext<\n HTMLDivElement,\n DrawerContentSlotProps\n>(\"div\", \"content\");\n\n// Header slot - drawer header section\nexport type DrawerHeaderSlotProps = HTMLChakraProps<\"header\">;\nexport const DrawerHeaderSlot = withContext<HTMLElement, DrawerHeaderSlotProps>(\n \"header\",\n \"header\"\n);\n\n// Body slot - drawer body content\nexport type DrawerBodySlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerBodySlot = withContext<HTMLDivElement, DrawerBodySlotProps>(\n \"div\",\n \"body\"\n);\n\n// Footer slot - drawer footer section with actions\nexport type DrawerFooterSlotProps = HTMLChakraProps<\"footer\">;\nexport const DrawerFooterSlot = withContext<HTMLElement, DrawerFooterSlotProps>(\n \"footer\",\n \"footer\"\n);\n\n// Title slot - accessible drawer title\nexport type DrawerTitleSlotProps = HTMLChakraProps<\"h2\">;\nexport const DrawerTitleSlot = withContext<\n HTMLHeadingElement,\n DrawerTitleSlotProps\n>(\"h2\", \"title\");\n\n// Close trigger slot - div container for positioning close button\nexport type DrawerCloseTriggerSlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerCloseTriggerSlot = withContext<\n HTMLDivElement,\n DrawerCloseTriggerSlotProps\n>(\"div\", \"closeTrigger\");\n","import { createContext, useContext } from \"react\";\nimport type { DrawerRootProps } from \"../drawer.types\";\n\n/**\n * Context value containing drawer configuration passed from Root to child components\n */\nexport type DrawerContextValue = DrawerRootProps;\n\nexport const DrawerContext = createContext<DrawerContextValue | undefined>(\n undefined\n);\n\n/**\n * Hook to access drawer configuration from DrawerContext\n * @returns Drawer configuration from context\n * @throws Error if used outside of Drawer.Root\n */\nexport const useDrawerRootContext = (): DrawerContextValue => {\n const context = useContext(DrawerContext);\n if (!context) {\n throw new Error(\"useDrawerContext must be used within Drawer.Root\");\n }\n return context;\n};\n\n/**\n * Provider component that passes drawer configuration down to child components\n */\nexport const DrawerProvider = ({\n children,\n value,\n}: {\n children: React.ReactNode;\n value: DrawerContextValue;\n}) => {\n return <DrawerContext value={value}>{children}</DrawerContext>;\n};\n","import React from \"react\";\nimport { DialogTrigger as RaDialogTrigger } from \"react-aria-components\";\nimport { useSlotRecipe } from \"@chakra-ui/react/styled-system\";\nimport { DrawerRootSlot } from \"../drawer.slots\";\nimport type { DrawerRootProps } from \"../drawer.types\";\nimport { DrawerProvider } from \"./drawer.context\";\nimport { drawerSlotRecipe } from \"../drawer.recipe\";\n\nexport const DrawerRoot = (props: DrawerRootProps) => {\n const recipe = useSlotRecipe({ recipe: drawerSlotRecipe });\n // Extract recipe props\n const [recipeProps] = recipe.splitVariantProps(props);\n // Extract props that are usable on RaDialogTrigger\n const { children, isOpen, onOpenChange, defaultOpen = false } = props;\n\n const content = <DrawerRootSlot {...recipeProps}>{children}</DrawerRootSlot>;\n\n // Check if any child is a Drawer.Trigger component\n // React Aria's DialogTrigger needs a pressable child, so we only use it when there's a trigger\n const hasDrawerTrigger = React.Children.toArray(children).some((child) => {\n if (React.isValidElement(child) && typeof child.type === \"function\") {\n const displayName = (\n child.type as React.ComponentType & { displayName?: string }\n )?.displayName;\n return (\n displayName === \"DrawerTrigger\" || displayName === \"Drawer.Trigger\"\n );\n }\n return false;\n });\n\n // Share all props (config + variant props) with the Drawer subcomponents\n return (\n <DrawerProvider value={props}>\n {hasDrawerTrigger ? (\n // When there's a Drawer.Trigger, use DialogTrigger for React Aria integration\n <RaDialogTrigger\n isOpen={isOpen}\n onOpenChange={onOpenChange}\n defaultOpen={defaultOpen}\n >\n {content}\n </RaDialogTrigger>\n ) : (\n // When no Drawer.Trigger, skip DialogTrigger to avoid the warning\n content\n )}\n </DrawerProvider>\n );\n};\n\nDrawerRoot.displayName = \"Drawer.Root\";\n","import { Button as RaButton } from \"react-aria-components\";\nimport { DrawerTriggerSlot } from \"../drawer.slots\";\nimport type { DrawerTriggerProps } from \"../drawer.types\";\nimport { extractStyleProps } from \"@/utils\";\nimport { chakra } from \"@chakra-ui/react/styled-system\";\n\nexport const DrawerTrigger = ({\n ref: forwardedRef,\n children,\n asChild,\n ...props\n}: DrawerTriggerProps) => {\n // If asChild is true, wrap children directly in RaButton with asChild\n if (asChild) {\n return (\n <chakra.button ref={forwardedRef} asChild {...props}>\n {children}\n </chakra.button>\n );\n }\n\n const [styleProps, restProps] = extractStyleProps(props);\n\n // Otherwise, wrap with both DrawerTriggerSlot and RaButton\n // Only pass React Aria compatible props to avoid type conflicts\n return (\n <DrawerTriggerSlot {...styleProps} asChild>\n <RaButton ref={forwardedRef} {...restProps}>\n {children}\n </RaButton>\n </DrawerTriggerSlot>\n );\n};\n\nDrawerTrigger.displayName = \"Drawer.Trigger\";\n","import {\n Modal as RaModal,\n ModalOverlay as RaModalOverlay,\n Dialog as RaDialog,\n} from \"react-aria-components\";\nimport {\n DrawerModalOverlaySlot,\n DrawerModalSlot,\n DrawerContentSlot,\n} from \"../drawer.slots\";\nimport type { DrawerContentProps } from \"../drawer.types\";\nimport { extractStyleProps } from \"@/utils\";\nimport { useDrawerRootContext } from \"./drawer.context\";\n\nexport const DrawerContent = (props: DrawerContentProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n // Get recipe configuration from context instead of props\n const {\n defaultOpen,\n isDismissable,\n isKeyboardDismissDisabled,\n shouldCloseOnInteractOutside,\n isOpen,\n onOpenChange,\n } = useDrawerRootContext();\n\n const modalProps = {\n defaultOpen,\n isDismissable,\n isKeyboardDismissDisabled,\n shouldCloseOnInteractOutside,\n isOpen,\n onOpenChange,\n };\n\n const [styleProps] = extractStyleProps(restProps);\n\n return (\n <DrawerModalOverlaySlot asChild>\n <RaModalOverlay {...modalProps}>\n <DrawerModalSlot asChild>\n <RaModal>\n <DrawerContentSlot asChild {...styleProps}>\n <RaDialog ref={forwardedRef}>{children}</RaDialog>\n </DrawerContentSlot>\n </RaModal>\n </DrawerModalSlot>\n </RaModalOverlay>\n </DrawerModalOverlaySlot>\n );\n};\n\nDrawerContent.displayName = \"Drawer.Content\";\n","import { DrawerHeaderSlot } from \"../drawer.slots\";\nimport type { DrawerHeaderProps } from \"../drawer.types\";\n\nexport const DrawerHeader = (props: DrawerHeaderProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n return (\n <DrawerHeaderSlot ref={forwardedRef} {...restProps}>\n {children}\n </DrawerHeaderSlot>\n );\n};\n\nDrawerHeader.displayName = \"Drawer.Header\";\n","import { DrawerBodySlot } from \"../drawer.slots\";\nimport type { DrawerBodyProps } from \"../drawer.types\";\n\nexport const DrawerBody = (props: DrawerBodyProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n const defaultProps = {\n /**\n * Set tabIndex to 0 to allow the body to receive focus,\n * effectively enabling scrolling via keyboard arrow keys.\n */\n tabIndex: 0,\n };\n\n return (\n <DrawerBodySlot ref={forwardedRef} {...defaultProps} {...restProps}>\n {children}\n </DrawerBodySlot>\n );\n};\n\nDrawerBody.displayName = \"Drawer.Body\";\n","import { DrawerFooterSlot } from \"../drawer.slots\";\nimport type { DrawerFooterProps } from \"../drawer.types\";\n\nexport const DrawerFooter = (props: DrawerFooterProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n return (\n <DrawerFooterSlot ref={forwardedRef} {...restProps}>\n {children}\n </DrawerFooterSlot>\n );\n};\n\nDrawerFooter.displayName = \"Drawer.Footer\";\n","import { DrawerTitleSlot } from \"../drawer.slots\";\nimport type { DrawerTitleProps } from \"../drawer.types\";\nimport { Heading } from \"@/components\";\n\nexport const DrawerTitle = (props: DrawerTitleProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n return (\n <DrawerTitleSlot asChild {...restProps}>\n <Heading ref={forwardedRef} slot=\"title\" as=\"h2\" textStyle=\"lg\">\n {children}\n </Heading>\n </DrawerTitleSlot>\n );\n};\n\nDrawerTitle.displayName = \"Drawer.Title\";\n","import { defineMessages } from \"react-intl\";\n\nexport const messages = defineMessages({\n closeTrigger: {\n id: \"Nimbus.Drawer.closeTrigger\",\n description: \"aria-label for the default close trigger button\",\n defaultMessage: \"Close drawer\",\n },\n});\n","import { Close } from \"@commercetools/nimbus-icons\";\nimport { DrawerCloseTriggerSlot } from \"../drawer.slots\";\nimport type { DrawerCloseTriggerProps } from \"../drawer.types\";\nimport { IconButton } from \"@/components\";\nimport { messages } from \"../drawer.i18n\";\nimport { useIntl } from \"react-intl\";\n\nexport const DrawerCloseTrigger = (props: DrawerCloseTriggerProps) => {\n const { ref: forwardedRef, \"aria-label\": ariaLabel, ...restProps } = props;\n const intl = useIntl();\n\n return (\n <DrawerCloseTriggerSlot>\n <IconButton\n ref={forwardedRef}\n slot=\"close\"\n size=\"xs\"\n variant=\"ghost\"\n aria-label={ariaLabel || intl.formatMessage(messages.closeTrigger)}\n {...restProps}\n >\n <Close />\n </IconButton>\n </DrawerCloseTriggerSlot>\n );\n};\n\nDrawerCloseTrigger.displayName = \"Drawer.CloseTrigger\";\n","import { DrawerRoot } from \"./components/drawer.root\";\nimport { DrawerTrigger } from \"./components/drawer.trigger\";\nimport { DrawerContent } from \"./components/drawer.content\";\nimport { DrawerHeader } from \"./components/drawer.header\";\nimport { DrawerBody } from \"./components/drawer.body\";\nimport { DrawerFooter } from \"./components/drawer.footer\";\nimport { DrawerTitle } from \"./components/drawer.title\";\nimport { DrawerCloseTrigger } from \"./components/drawer.close-trigger\";\n\n/**\n * Drawer\n * ============================================================\n * A foundational drawer component for overlays that require user attention.\n * Built for accessibility and WCAG 2.1 AA compliance.\n *\n * Features:\n * - Controlled and uncontrolled modes\n * - Customizable placement, size, and animations\n * - Focus management and keyboard navigation\n * - Click-outside and Escape key dismissal\n * - Portal rendering support\n * - Backdrop overlay with animations\n *\n * @example\n * ```tsx\n * <Drawer.Root>\n * <Drawer.Trigger>Open Drawer</Drawer.Trigger>\n * <Drawer.Content size=\"md\" placement=\"center\">\n * <Drawer.Header>\n * <Drawer.Title>Drawer Title</Drawer.Title>\n * <Drawer.CloseTrigger>×</Drawer.CloseTrigger>\n * </Drawer.Header>\n * <Drawer.Body>\n * Drawer content goes here\n * </Drawer.Body>\n * <Drawer.Footer>\n * <button>Cancel</button>\n * <button>Save</button>\n * </Drawer.Footer>\n * </Drawer.Content>\n * </Drawer.Root>\n * ```\n * @see https://nimbus-documentation.vercel.app/components/feedback/drawer\n */\nexport const Drawer = {\n /**\n * # Drawer.Root\n *\n * The root component that provides context and state management for the drawer.\n * Handles accessibility and keyboard interaction.\n *\n * This component must wrap all drawer parts (Trigger, Content, etc.) and provides\n * the drawer open/close state and variant styling context.\n *\n * @example\n * ```tsx\n * <Drawer.Root>\n * <Drawer.Trigger>Open Drawer</Drawer.Trigger>\n * <Drawer.Content>\n * <Drawer.Header>\n * <Drawer.Title>Drawer Title</Drawer.Title>\n * </Drawer.Header>\n * <Drawer.Body>Drawer content</Drawer.Body>\n * </Drawer.Content>\n * </Drawer.Root>\n * ```\n */\n Root: DrawerRoot,\n /**\n * # Drawer.Trigger\n *\n * The trigger element that opens the drawer when activated.\n * Provides accessibility and keyboard support.\n *\n * @example\n * ```tsx\n * <Drawer.Root>\n * <Drawer.Trigger>Open Drawer</Drawer.Trigger>\n * <Drawer.Content>...</Drawer.Content>\n * </Drawer.Root>\n * ```\n */\n Trigger: DrawerTrigger,\n /**\n * # Drawer.Content\n *\n * The main drawer content container that handles portalling, backdrop,\n * positioning, and content styling.\n *\n * This component creates the drawer overlay, positions the content, and provides\n * accessibility features like focus management and keyboard dismissal.\n *\n * @example\n * ```tsx\n * <Drawer.Root>\n * <Drawer.Trigger>Open Drawer</Drawer.Trigger>\n * <Drawer.Content size=\"md\" placement=\"center\">\n * <Drawer.Header>\n * <Drawer.Title>Title</Drawer.Title>\n * </Drawer.Header>\n * <Drawer.Body>Content</Drawer.Body>\n * <Drawer.Footer>Actions</Drawer.Footer>\n * </Drawer.Content>\n * </Drawer.Root>\n * ```\n */\n Content: DrawerContent,\n /**\n * # Drawer.Header\n *\n * The header section of the drawer content.\n * Typically contains the title and close button.\n *\n * @example\n * ```tsx\n * <Drawer.Content>\n * <Drawer.Header>\n * <Drawer.Title>Drawer Title</Drawer.Title>\n * <Drawer.CloseTrigger />\n * </Drawer.Header>\n * <Drawer.Body>...</Drawer.Body>\n * </Drawer.Content>\n * ```\n */\n Header: DrawerHeader,\n /**\n * # Drawer.Body\n *\n * The main body content section of the drawer.\n * Contains the primary drawer content and handles overflow/scrolling.\n *\n * @example\n * ```tsx\n * <Drawer.Content>\n * <Drawer.Header>...</Drawer.Header>\n * <Drawer.Body>\n * <p>This is the main content of the drawer.</p>\n * </Drawer.Body>\n * <Drawer.Footer>...</Drawer.Footer>\n * </Drawer.Content>\n * ```\n */\n Body: DrawerBody,\n /**\n * # Drawer.Footer\n *\n * The footer section of the drawer, typically containing action buttons.\n * Provides consistent spacing and alignment for drawer actions.\n *\n * @example\n * ```tsx\n * <Drawer.Content>\n * <Drawer.Header>...</Drawer.Header>\n * <Drawer.Body>...</Drawer.Body>\n * <Drawer.Footer>\n * <Button variant=\"outline\">Cancel</Button>\n * <Button>Confirm</Button>\n * </Drawer.Footer>\n * </Drawer.Content>\n * ```\n */\n Footer: DrawerFooter,\n /**\n * # Drawer.Title\n *\n * The accessible title element for the drawer.\n * Provides proper accessibility and screen reader support.\n *\n * @example\n * ```tsx\n * <Drawer.Content>\n * <Drawer.Header>\n * <Drawer.Title>Confirm Action</Drawer.Title>\n * </Drawer.Header>\n * <Drawer.Body>...</Drawer.Body>\n * </Drawer.Content>\n * ```\n */\n Title: DrawerTitle,\n /**\n * # Drawer.CloseTrigger\n *\n * A button that closes the drawer when activated.\n * Displays an IconButton with a close (X) icon by default.\n *\n * The component automatically handles the close behavior,\n * so no additional onPress handler is needed.\n *\n * @example\n * ```tsx\n * <Drawer.Root>\n * <Drawer.Trigger>Open Drawer</Drawer.Trigger>\n * <Drawer.Content>\n * <Drawer.Header>\n * <Drawer.Title>Title</Drawer.Title>\n * <Drawer.CloseTrigger aria-label=\"Close drawer\" />\n * </Drawer.Header>\n * <Drawer.Body>Content</Drawer.Body>\n * </Drawer.Content>\n * </Drawer.Root>\n * ```\n */\n CloseTrigger: DrawerCloseTrigger,\n};\n\n// Internal exports for react-docgen\nexport {\n DrawerRoot as _DrawerRoot,\n DrawerTrigger as _DrawerTrigger,\n DrawerContent as _DrawerContent,\n DrawerHeader as _DrawerHeader,\n DrawerBody as _DrawerBody,\n DrawerFooter as _DrawerFooter,\n DrawerTitle as _DrawerTitle,\n DrawerCloseTrigger as _DrawerCloseTrigger,\n};\n"],"names":["withProvider","withContext","createSlotRecipeContext","drawerSlotRecipe","DrawerRootSlot","DrawerTriggerSlot","DrawerModalOverlaySlot","DrawerModalSlot","DrawerContentSlot","DrawerHeaderSlot","DrawerBodySlot","DrawerFooterSlot","DrawerTitleSlot","DrawerCloseTriggerSlot","DrawerContext","createContext","useDrawerRootContext","context","useContext","DrawerProvider","children","value","jsx","DrawerRoot","props","recipe","useSlotRecipe","recipeProps","isOpen","onOpenChange","defaultOpen","content","hasDrawerTrigger","React","child","displayName","RaDialogTrigger","DrawerTrigger","forwardedRef","asChild","chakra","styleProps","restProps","extractStyleProps","RaButton","DrawerContent","isDismissable","isKeyboardDismissDisabled","shouldCloseOnInteractOutside","modalProps","RaModalOverlay","RaModal","RaDialog","DrawerHeader","DrawerBody","defaultProps","DrawerFooter","DrawerTitle","Heading","messages","defineMessages","DrawerCloseTrigger","ariaLabel","intl","useIntl","IconButton","Close","Drawer"],"mappings":"6cAMM,CAAE,aAAAA,EAAc,YAAAC,CAAA,EAAgBC,0BAAwB,CAC5D,OAAQC,EAAAA,gBACV,CAAC,EAIYC,EAAiBJ,EAC5B,MACA,MACF,EAIaK,EAAoBJ,EAG/B,SAAU,SAAS,EAIRK,EAAyBL,EAGpC,MAAO,cAAc,EAIVM,EAAkBN,EAG7B,MAAO,OAAO,EAIHO,EAAoBP,EAG/B,MAAO,SAAS,EAILQ,EAAmBR,EAC9B,SACA,QACF,EAIaS,EAAiBT,EAC5B,MACA,MACF,EAIaU,EAAmBV,EAC9B,SACA,QACF,EAIaW,EAAkBX,EAG7B,KAAM,OAAO,EAIFY,EAAyBZ,EAGpC,MAAO,cAAc,ECtEVa,EAAgBC,EAAAA,cAC3B,MACF,EAOaC,EAAuB,IAA0B,CAC5D,MAAMC,EAAUC,EAAAA,WAAWJ,CAAa,EACxC,GAAI,CAACG,EACH,MAAM,IAAI,MAAM,kDAAkD,EAEpE,OAAOA,CACT,EAKaE,EAAiB,CAAC,CAC7B,SAAAC,EACA,MAAAC,CACF,IAISC,EAAAA,IAACR,EAAA,CAAc,MAAAO,EAAe,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,CAAiB,IAAK2B,EAAe,GAAGI,EACtC,SAAAtB,EACH,CAEJ,EAEAoC,EAAa,YAAc,gBCTpB,MAAMC,EAAejC,GAA4B,CACtD,KAAM,CAAE,IAAKc,EAAc,SAAAlB,EAAU,GAAGsB,GAAclB,EAEtD,aACGZ,EAAA,CAAgB,QAAO,GAAE,GAAG8B,EAC3B,SAAApB,EAAAA,IAACoC,UAAA,CAAQ,IAAKpB,EAAc,KAAK,QAAQ,GAAG,KAAK,UAAU,KACxD,SAAAlB,EACH,EACF,CAEJ,EAEAqC,EAAY,YAAc,eCdnB,MAAME,EAAWC,EAAAA,eAAe,CACrC,aAAc,CACZ,GAAI,6BACJ,YAAa,kDACb,eAAgB,cAAA,CAEpB,CAAC,ECDYC,EAAsBrC,GAAmC,CACpE,KAAM,CAAE,IAAKc,EAAc,aAAcwB,EAAW,GAAGpB,GAAclB,EAC/DuC,EAAOC,EAAAA,QAAA,EAEb,aACGnD,EAAA,CACC,SAAAS,EAAAA,IAAC2C,EAAAA,WAAA,CACC,IAAK3B,EACL,KAAK,QACL,KAAK,KACL,QAAQ,QACR,aAAYwB,GAAaC,EAAK,cAAcJ,EAAS,YAAY,EAChE,GAAGjB,EAEJ,eAACwB,EAAAA,MAAA,CAAA,CAAM,CAAA,CAAA,EAEX,CAEJ,EAEAL,EAAmB,YAAc,sBCiB1B,MAAMM,EAAS,CAuBpB,KAAM5C,EAeN,QAASc,EAwBT,QAASQ,EAkBT,OAAQQ,EAkBR,KAAMC,EAmBN,OAAQE,EAiBR,MAAOC,EAwBP,aAAcI,CAChB"}
1
+ {"version":3,"file":"drawer-TBV6cxVI.cjs.js","sources":["../../src/components/drawer/drawer.slots.tsx","../../src/components/drawer/components/drawer.context.tsx","../../src/components/drawer/components/drawer.root.tsx","../../src/components/drawer/components/drawer.trigger.tsx","../../src/components/drawer/components/drawer.content.tsx","../../src/components/drawer/components/drawer.header.tsx","../../src/components/drawer/components/drawer.body.tsx","../../src/components/drawer/components/drawer.footer.tsx","../../src/components/drawer/components/drawer.title.tsx","../../src/components/drawer/drawer.i18n.ts","../../src/components/drawer/components/drawer.close-trigger.tsx","../../src/components/drawer/drawer.tsx"],"sourcesContent":["import {\n createSlotRecipeContext,\n type HTMLChakraProps,\n} from \"@chakra-ui/react/styled-system\";\nimport { drawerSlotRecipe } from \"./drawer.recipe\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n recipe: drawerSlotRecipe,\n});\n\n// Root slot - provides recipe context + config to all child components\nexport type DrawerRootSlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerRootSlot = withProvider<HTMLDivElement, DrawerRootSlotProps>(\n \"div\",\n \"root\"\n);\n\n// Trigger slot - button that opens the drawer\nexport type DrawerTriggerSlotProps = HTMLChakraProps<\"button\">;\nexport const DrawerTriggerSlot = withContext<\n HTMLButtonElement,\n DrawerTriggerSlotProps\n>(\"button\", \"trigger\");\n\n// Backdrop slot - overlay displayed behind the drawer\nexport type DrawerModalOverlaySlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerModalOverlaySlot = withContext<\n HTMLDivElement,\n DrawerModalOverlaySlotProps\n>(\"div\", \"modalOverlay\");\n\n// modal slot - positions the drawer content\nexport type DrawerModalSlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerModalSlot = withContext<\n HTMLDivElement,\n DrawerModalSlotProps\n>(\"div\", \"modal\");\n\n// Content slot - main drawer container\nexport type DrawerContentSlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerContentSlot = withContext<\n HTMLDivElement,\n DrawerContentSlotProps\n>(\"div\", \"content\");\n\n// Header slot - drawer header section\nexport type DrawerHeaderSlotProps = HTMLChakraProps<\"header\">;\nexport const DrawerHeaderSlot = withContext<HTMLElement, DrawerHeaderSlotProps>(\n \"header\",\n \"header\"\n);\n\n// Body slot - drawer body content\nexport type DrawerBodySlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerBodySlot = withContext<HTMLDivElement, DrawerBodySlotProps>(\n \"div\",\n \"body\"\n);\n\n// Footer slot - drawer footer section with actions\nexport type DrawerFooterSlotProps = HTMLChakraProps<\"footer\">;\nexport const DrawerFooterSlot = withContext<HTMLElement, DrawerFooterSlotProps>(\n \"footer\",\n \"footer\"\n);\n\n// Title slot - accessible drawer title\nexport type DrawerTitleSlotProps = HTMLChakraProps<\"h2\">;\nexport const DrawerTitleSlot = withContext<\n HTMLHeadingElement,\n DrawerTitleSlotProps\n>(\"h2\", \"title\");\n\n// Close trigger slot - div container for positioning close button\nexport type DrawerCloseTriggerSlotProps = HTMLChakraProps<\"div\">;\nexport const DrawerCloseTriggerSlot = withContext<\n HTMLDivElement,\n DrawerCloseTriggerSlotProps\n>(\"div\", \"closeTrigger\");\n","import { createContext, useContext } from \"react\";\nimport type { DrawerRootProps } from \"../drawer.types\";\n\n/**\n * Context value containing drawer configuration passed from Root to child components\n */\nexport type DrawerContextValue = DrawerRootProps;\n\nexport const DrawerContext = createContext<DrawerContextValue | undefined>(\n undefined\n);\n\n/**\n * Hook to access drawer configuration from DrawerContext\n * @returns Drawer configuration from context\n * @throws Error if used outside of Drawer.Root\n */\nexport const useDrawerRootContext = (): DrawerContextValue => {\n const context = useContext(DrawerContext);\n if (!context) {\n throw new Error(\"useDrawerContext must be used within Drawer.Root\");\n }\n return context;\n};\n\n/**\n * Provider component that passes drawer configuration down to child components\n */\nexport const DrawerProvider = ({\n children,\n value,\n}: {\n children: React.ReactNode;\n value: DrawerContextValue;\n}) => {\n return <DrawerContext value={value}>{children}</DrawerContext>;\n};\n","import React from \"react\";\nimport { DialogTrigger as RaDialogTrigger } from \"react-aria-components\";\nimport { useSlotRecipe } from \"@chakra-ui/react/styled-system\";\nimport { DrawerRootSlot } from \"../drawer.slots\";\nimport type { DrawerRootProps } from \"../drawer.types\";\nimport { DrawerProvider } from \"./drawer.context\";\nimport { drawerSlotRecipe } from \"../drawer.recipe\";\n\nexport const DrawerRoot = (props: DrawerRootProps) => {\n const recipe = useSlotRecipe({ recipe: drawerSlotRecipe });\n // Extract recipe props\n const [recipeProps] = recipe.splitVariantProps(props);\n // Extract props that are usable on RaDialogTrigger\n const { children, isOpen, onOpenChange, defaultOpen = false } = props;\n\n const content = <DrawerRootSlot {...recipeProps}>{children}</DrawerRootSlot>;\n\n // Check if any child is a Drawer.Trigger component\n // React Aria's DialogTrigger needs a pressable child, so we only use it when there's a trigger\n const hasDrawerTrigger = React.Children.toArray(children).some((child) => {\n if (React.isValidElement(child) && typeof child.type === \"function\") {\n const displayName = (\n child.type as React.ComponentType & { displayName?: string }\n )?.displayName;\n return (\n displayName === \"DrawerTrigger\" || displayName === \"Drawer.Trigger\"\n );\n }\n return false;\n });\n\n // Share all props (config + variant props) with the Drawer subcomponents\n return (\n <DrawerProvider value={props}>\n {hasDrawerTrigger ? (\n // When there's a Drawer.Trigger, use DialogTrigger for React Aria integration\n <RaDialogTrigger\n isOpen={isOpen}\n onOpenChange={onOpenChange}\n defaultOpen={defaultOpen}\n >\n {content}\n </RaDialogTrigger>\n ) : (\n // When no Drawer.Trigger, skip DialogTrigger to avoid the warning\n content\n )}\n </DrawerProvider>\n );\n};\n\nDrawerRoot.displayName = \"Drawer.Root\";\n","import { Button as RaButton } from \"react-aria-components\";\nimport { DrawerTriggerSlot } from \"../drawer.slots\";\nimport type { DrawerTriggerProps } from \"../drawer.types\";\nimport { extractStyleProps } from \"@/utils\";\nimport { chakra } from \"@chakra-ui/react/styled-system\";\n\nexport const DrawerTrigger = ({\n ref: forwardedRef,\n children,\n asChild,\n ...props\n}: DrawerTriggerProps) => {\n // If asChild is true, wrap children directly in RaButton with asChild\n if (asChild) {\n return (\n <chakra.button ref={forwardedRef} asChild {...props}>\n {children}\n </chakra.button>\n );\n }\n\n const [styleProps, restProps] = extractStyleProps(props);\n\n // Otherwise, wrap with both DrawerTriggerSlot and RaButton\n // Only pass React Aria compatible props to avoid type conflicts\n return (\n <DrawerTriggerSlot {...styleProps} asChild>\n <RaButton ref={forwardedRef} {...restProps}>\n {children}\n </RaButton>\n </DrawerTriggerSlot>\n );\n};\n\nDrawerTrigger.displayName = \"Drawer.Trigger\";\n","import {\n Modal as RaModal,\n ModalOverlay as RaModalOverlay,\n Dialog as RaDialog,\n} from \"react-aria-components\";\nimport {\n DrawerModalOverlaySlot,\n DrawerModalSlot,\n DrawerContentSlot,\n} from \"../drawer.slots\";\nimport type { DrawerContentProps } from \"../drawer.types\";\nimport { extractStyleProps } from \"@/utils\";\nimport { useDrawerRootContext } from \"./drawer.context\";\n\nexport const DrawerContent = (props: DrawerContentProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n // Get recipe configuration from context instead of props\n const {\n defaultOpen,\n isDismissable,\n isKeyboardDismissDisabled,\n shouldCloseOnInteractOutside,\n isOpen,\n onOpenChange,\n } = useDrawerRootContext();\n\n const modalProps = {\n defaultOpen,\n isDismissable,\n isKeyboardDismissDisabled,\n shouldCloseOnInteractOutside,\n isOpen,\n onOpenChange,\n };\n\n const [styleProps] = extractStyleProps(restProps);\n\n return (\n <DrawerModalOverlaySlot asChild>\n <RaModalOverlay {...modalProps}>\n <DrawerModalSlot asChild>\n <RaModal>\n <DrawerContentSlot asChild {...styleProps}>\n <RaDialog ref={forwardedRef}>{children}</RaDialog>\n </DrawerContentSlot>\n </RaModal>\n </DrawerModalSlot>\n </RaModalOverlay>\n </DrawerModalOverlaySlot>\n );\n};\n\nDrawerContent.displayName = \"Drawer.Content\";\n","import { DrawerHeaderSlot } from \"../drawer.slots\";\nimport type { DrawerHeaderProps } from \"../drawer.types\";\n\nexport const DrawerHeader = (props: DrawerHeaderProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n return (\n <DrawerHeaderSlot ref={forwardedRef} {...restProps}>\n {children}\n </DrawerHeaderSlot>\n );\n};\n\nDrawerHeader.displayName = \"Drawer.Header\";\n","import { DrawerBodySlot } from \"../drawer.slots\";\nimport type { DrawerBodyProps } from \"../drawer.types\";\n\nexport const DrawerBody = (props: DrawerBodyProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n const defaultProps = {\n /**\n * Set tabIndex to 0 to allow the body to receive focus,\n * effectively enabling scrolling via keyboard arrow keys.\n */\n tabIndex: 0,\n };\n\n return (\n <DrawerBodySlot ref={forwardedRef} {...defaultProps} {...restProps}>\n {children}\n </DrawerBodySlot>\n );\n};\n\nDrawerBody.displayName = \"Drawer.Body\";\n","import { DrawerFooterSlot } from \"../drawer.slots\";\nimport type { DrawerFooterProps } from \"../drawer.types\";\n\nexport const DrawerFooter = (props: DrawerFooterProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n return (\n <DrawerFooterSlot ref={forwardedRef} {...restProps}>\n {children}\n </DrawerFooterSlot>\n );\n};\n\nDrawerFooter.displayName = \"Drawer.Footer\";\n","import { DrawerTitleSlot } from \"../drawer.slots\";\nimport type { DrawerTitleProps } from \"../drawer.types\";\nimport { Heading } from \"@/components\";\n\nexport const DrawerTitle = (props: DrawerTitleProps) => {\n const { ref: forwardedRef, children, ...restProps } = props;\n\n return (\n <DrawerTitleSlot asChild {...restProps}>\n <Heading ref={forwardedRef} slot=\"title\" as=\"h2\" textStyle=\"lg\">\n {children}\n </Heading>\n </DrawerTitleSlot>\n );\n};\n\nDrawerTitle.displayName = \"Drawer.Title\";\n","import { defineMessages } from \"react-intl\";\n\nexport const messages = defineMessages({\n closeTrigger: {\n id: \"Nimbus.Drawer.closeTrigger\",\n description: \"aria-label for the default close trigger button\",\n defaultMessage: \"Close drawer\",\n },\n});\n","import { Close } from \"@commercetools/nimbus-icons\";\nimport { DrawerCloseTriggerSlot } from \"../drawer.slots\";\nimport type { DrawerCloseTriggerProps } from \"../drawer.types\";\nimport { IconButton } from \"@/components\";\nimport { messages } from \"../drawer.i18n\";\nimport { useIntl } from \"react-intl\";\n\nexport const DrawerCloseTrigger = (props: DrawerCloseTriggerProps) => {\n const { ref: forwardedRef, \"aria-label\": ariaLabel, ...restProps } = props;\n const intl = useIntl();\n\n return (\n <DrawerCloseTriggerSlot>\n <IconButton\n ref={forwardedRef}\n slot=\"close\"\n size=\"xs\"\n variant=\"ghost\"\n aria-label={ariaLabel || intl.formatMessage(messages.closeTrigger)}\n {...restProps}\n >\n <Close />\n </IconButton>\n </DrawerCloseTriggerSlot>\n );\n};\n\nDrawerCloseTrigger.displayName = \"Drawer.CloseTrigger\";\n","import { DrawerRoot } from \"./components/drawer.root\";\nimport { DrawerTrigger } from \"./components/drawer.trigger\";\nimport { DrawerContent } from \"./components/drawer.content\";\nimport { DrawerHeader } from \"./components/drawer.header\";\nimport { DrawerBody } from \"./components/drawer.body\";\nimport { DrawerFooter } from \"./components/drawer.footer\";\nimport { DrawerTitle } from \"./components/drawer.title\";\nimport { DrawerCloseTrigger } from \"./components/drawer.close-trigger\";\n\n/**\n * Drawer\n * ============================================================\n * A foundational drawer component for overlays that require user attention.\n * Built for accessibility and WCAG 2.1 AA compliance.\n *\n * Features:\n * - Controlled and uncontrolled modes\n * - Customizable placement, size, and animations\n * - Focus management and keyboard navigation\n * - Click-outside and Escape key dismissal\n * - Portal rendering support\n * - Backdrop overlay with animations\n *\n * @example\n * ```tsx\n * <Drawer.Root>\n * <Drawer.Trigger>Open Drawer</Drawer.Trigger>\n * <Drawer.Content size=\"md\" placement=\"center\">\n * <Drawer.Header>\n * <Drawer.Title>Drawer Title</Drawer.Title>\n * <Drawer.CloseTrigger>×</Drawer.CloseTrigger>\n * </Drawer.Header>\n * <Drawer.Body>\n * Drawer content goes here\n * </Drawer.Body>\n * <Drawer.Footer>\n * <button>Cancel</button>\n * <button>Save</button>\n * </Drawer.Footer>\n * </Drawer.Content>\n * </Drawer.Root>\n * ```\n * @see https://nimbus-documentation.vercel.app/components/feedback/drawer\n */\nexport const Drawer = {\n /**\n * # Drawer.Root\n *\n * The root component that provides context and state management for the drawer.\n * Handles accessibility and keyboard interaction.\n *\n * This component must wrap all drawer parts (Trigger, Content, etc.) and provides\n * the drawer open/close state and variant styling context.\n *\n * @example\n * ```tsx\n * <Drawer.Root>\n * <Drawer.Trigger>Open Drawer</Drawer.Trigger>\n * <Drawer.Content>\n * <Drawer.Header>\n * <Drawer.Title>Drawer Title</Drawer.Title>\n * </Drawer.Header>\n * <Drawer.Body>Drawer content</Drawer.Body>\n * </Drawer.Content>\n * </Drawer.Root>\n * ```\n */\n Root: DrawerRoot,\n /**\n * # Drawer.Trigger\n *\n * The trigger element that opens the drawer when activated.\n * Provides accessibility and keyboard support.\n *\n * @example\n * ```tsx\n * <Drawer.Root>\n * <Drawer.Trigger>Open Drawer</Drawer.Trigger>\n * <Drawer.Content>...</Drawer.Content>\n * </Drawer.Root>\n * ```\n */\n Trigger: DrawerTrigger,\n /**\n * # Drawer.Content\n *\n * The main drawer content container that handles portalling, backdrop,\n * positioning, and content styling.\n *\n * This component creates the drawer overlay, positions the content, and provides\n * accessibility features like focus management and keyboard dismissal.\n *\n * @example\n * ```tsx\n * <Drawer.Root>\n * <Drawer.Trigger>Open Drawer</Drawer.Trigger>\n * <Drawer.Content size=\"md\" placement=\"center\">\n * <Drawer.Header>\n * <Drawer.Title>Title</Drawer.Title>\n * </Drawer.Header>\n * <Drawer.Body>Content</Drawer.Body>\n * <Drawer.Footer>Actions</Drawer.Footer>\n * </Drawer.Content>\n * </Drawer.Root>\n * ```\n */\n Content: DrawerContent,\n /**\n * # Drawer.Header\n *\n * The header section of the drawer content.\n * Typically contains the title and close button.\n *\n * @example\n * ```tsx\n * <Drawer.Content>\n * <Drawer.Header>\n * <Drawer.Title>Drawer Title</Drawer.Title>\n * <Drawer.CloseTrigger />\n * </Drawer.Header>\n * <Drawer.Body>...</Drawer.Body>\n * </Drawer.Content>\n * ```\n */\n Header: DrawerHeader,\n /**\n * # Drawer.Body\n *\n * The main body content section of the drawer.\n * Contains the primary drawer content and handles overflow/scrolling.\n *\n * @example\n * ```tsx\n * <Drawer.Content>\n * <Drawer.Header>...</Drawer.Header>\n * <Drawer.Body>\n * <p>This is the main content of the drawer.</p>\n * </Drawer.Body>\n * <Drawer.Footer>...</Drawer.Footer>\n * </Drawer.Content>\n * ```\n */\n Body: DrawerBody,\n /**\n * # Drawer.Footer\n *\n * The footer section of the drawer, typically containing action buttons.\n * Provides consistent spacing and alignment for drawer actions.\n *\n * @example\n * ```tsx\n * <Drawer.Content>\n * <Drawer.Header>...</Drawer.Header>\n * <Drawer.Body>...</Drawer.Body>\n * <Drawer.Footer>\n * <Button variant=\"outline\">Cancel</Button>\n * <Button>Confirm</Button>\n * </Drawer.Footer>\n * </Drawer.Content>\n * ```\n */\n Footer: DrawerFooter,\n /**\n * # Drawer.Title\n *\n * The accessible title element for the drawer.\n * Provides proper accessibility and screen reader support.\n *\n * @example\n * ```tsx\n * <Drawer.Content>\n * <Drawer.Header>\n * <Drawer.Title>Confirm Action</Drawer.Title>\n * </Drawer.Header>\n * <Drawer.Body>...</Drawer.Body>\n * </Drawer.Content>\n * ```\n */\n Title: DrawerTitle,\n /**\n * # Drawer.CloseTrigger\n *\n * A button that closes the drawer when activated.\n * Displays an IconButton with a close (X) icon by default.\n *\n * The component automatically handles the close behavior,\n * so no additional onPress handler is needed.\n *\n * @example\n * ```tsx\n * <Drawer.Root>\n * <Drawer.Trigger>Open Drawer</Drawer.Trigger>\n * <Drawer.Content>\n * <Drawer.Header>\n * <Drawer.Title>Title</Drawer.Title>\n * <Drawer.CloseTrigger aria-label=\"Close drawer\" />\n * </Drawer.Header>\n * <Drawer.Body>Content</Drawer.Body>\n * </Drawer.Content>\n * </Drawer.Root>\n * ```\n */\n CloseTrigger: DrawerCloseTrigger,\n};\n\n// Internal exports for react-docgen\nexport {\n DrawerRoot as _DrawerRoot,\n DrawerTrigger as _DrawerTrigger,\n DrawerContent as _DrawerContent,\n DrawerHeader as _DrawerHeader,\n DrawerBody as _DrawerBody,\n DrawerFooter as _DrawerFooter,\n DrawerTitle as _DrawerTitle,\n DrawerCloseTrigger as _DrawerCloseTrigger,\n};\n"],"names":["withProvider","withContext","createSlotRecipeContext","drawerSlotRecipe","DrawerRootSlot","DrawerTriggerSlot","DrawerModalOverlaySlot","DrawerModalSlot","DrawerContentSlot","DrawerHeaderSlot","DrawerBodySlot","DrawerFooterSlot","DrawerTitleSlot","DrawerCloseTriggerSlot","DrawerContext","createContext","useDrawerRootContext","context","useContext","DrawerProvider","children","value","jsx","DrawerRoot","props","recipe","useSlotRecipe","recipeProps","isOpen","onOpenChange","defaultOpen","content","hasDrawerTrigger","React","child","displayName","RaDialogTrigger","DrawerTrigger","forwardedRef","asChild","chakra","styleProps","restProps","extractStyleProps","RaButton","DrawerContent","isDismissable","isKeyboardDismissDisabled","shouldCloseOnInteractOutside","modalProps","RaModalOverlay","RaModal","RaDialog","DrawerHeader","DrawerBody","defaultProps","DrawerFooter","DrawerTitle","Heading","messages","defineMessages","DrawerCloseTrigger","ariaLabel","intl","useIntl","IconButton","Close","Drawer"],"mappings":"6cAMM,CAAE,aAAAA,EAAc,YAAAC,CAAA,EAAgBC,0BAAwB,CAC5D,OAAQC,EAAAA,gBACV,CAAC,EAIYC,EAAiBJ,EAC5B,MACA,MACF,EAIaK,EAAoBJ,EAG/B,SAAU,SAAS,EAIRK,EAAyBL,EAGpC,MAAO,cAAc,EAIVM,EAAkBN,EAG7B,MAAO,OAAO,EAIHO,EAAoBP,EAG/B,MAAO,SAAS,EAILQ,EAAmBR,EAC9B,SACA,QACF,EAIaS,EAAiBT,EAC5B,MACA,MACF,EAIaU,EAAmBV,EAC9B,SACA,QACF,EAIaW,EAAkBX,EAG7B,KAAM,OAAO,EAIFY,EAAyBZ,EAGpC,MAAO,cAAc,ECtEVa,EAAgBC,EAAAA,cAC3B,MACF,EAOaC,EAAuB,IAA0B,CAC5D,MAAMC,EAAUC,EAAAA,WAAWJ,CAAa,EACxC,GAAI,CAACG,EACH,MAAM,IAAI,MAAM,kDAAkD,EAEpE,OAAOA,CACT,EAKaE,EAAiB,CAAC,CAC7B,SAAAC,EACA,MAAAC,CACF,IAISC,EAAAA,IAACR,EAAA,CAAc,MAAAO,EAAe,SAAAD,CAAA,CAAS,EC3BnCG,EAAcC,GAA2B,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,EACH,CAEJ,EAEAoC,EAAa,YAAc,gBCTpB,MAAMC,EAAejC,GAA4B,CACtD,KAAM,CAAE,IAAKc,EAAc,SAAAlB,EAAU,GAAGsB,GAAclB,EAEtD,aACGZ,EAAA,CAAgB,QAAO,GAAE,GAAG8B,EAC3B,SAAApB,EAAAA,IAACoC,UAAA,CAAQ,IAAKpB,EAAc,KAAK,QAAQ,GAAG,KAAK,UAAU,KACxD,SAAAlB,EACH,EACF,CAEJ,EAEAqC,EAAY,YAAc,eCdnB,MAAME,EAAWC,EAAAA,eAAe,CACrC,aAAc,CACZ,GAAI,6BACJ,YAAa,kDACb,eAAgB,cAAA,CAEpB,CAAC,ECDYC,EAAsBrC,GAAmC,CACpE,KAAM,CAAE,IAAKc,EAAc,aAAcwB,EAAW,GAAGpB,GAAclB,EAC/DuC,EAAOC,EAAAA,QAAA,EAEb,aACGnD,EAAA,CACC,SAAAS,EAAAA,IAAC2C,EAAAA,WAAA,CACC,IAAK3B,EACL,KAAK,QACL,KAAK,KACL,QAAQ,QACR,aAAYwB,GAAaC,EAAK,cAAcJ,EAAS,YAAY,EAChE,GAAGjB,EAEJ,eAACwB,EAAAA,MAAA,CAAA,CAAM,CAAA,CAAA,EAEX,CAEJ,EAEAL,EAAmB,YAAc,sBCiB1B,MAAMM,EAAS,CAuBpB,KAAM5C,EAeN,QAASc,EAwBT,QAASQ,EAkBT,OAAQQ,EAkBR,KAAMC,EAmBN,OAAQE,EAiBR,MAAOC,EAwBP,aAAcI,CAChB"}
@@ -1,2 +1,2 @@
1
- "use strict";const c=require("./index-CxLKWOES.cjs.js");function o(e){const r={},s={...e};return Object.keys(e).forEach(t=>{Object.prototype.hasOwnProperty.call(e,t)&&c.system.isValidProperty(t)&&(r[t]=e[t],delete s[t])}),[r,s]}exports.extractStyleProps=o;
2
- //# sourceMappingURL=extract-style-props-IfUYxPJV.cjs.js.map
1
+ "use strict";const c=require("./index-hUcMzBfs.cjs.js");function o(e){const r={},s={...e};return Object.keys(e).forEach(t=>{Object.prototype.hasOwnProperty.call(e,t)&&c.system.isValidProperty(t)&&(r[t]=e[t],delete s[t])}),[r,s]}exports.extractStyleProps=o;
2
+ //# sourceMappingURL=extract-style-props-0H1Ajy_s.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"extract-style-props-IfUYxPJV.cjs.js","sources":["../../src/utils/extract-style-props.ts"],"sourcesContent":["import { system } from \"@/theme\";\n\n/**\n * Extracts chakra-ui style-props from an object, separating them from other props\n * @param props The props object to separate\n * @returns A tuple containing [styleProps, otherProps]\n */\nexport function extractStyleProps<T extends object>(\n props: T\n): [Record<string, unknown>, Omit<T, string>] {\n const styleProps: Record<string, unknown> = {};\n const otherProps = { ...props } as Record<string, unknown>;\n\n // Process only own properties\n Object.keys(props).forEach((key) => {\n if (\n Object.prototype.hasOwnProperty.call(props, key) &&\n system.isValidProperty(key)\n ) {\n styleProps[key] = props[key as keyof T];\n delete otherProps[key];\n }\n });\n\n return [styleProps, otherProps as Omit<T, string>];\n}\n"],"names":["extractStyleProps","props","styleProps","otherProps","key","system"],"mappings":"wDAOO,SAASA,EACdC,EAC4C,CAC5C,MAAMC,EAAsC,CAAA,EACtCC,EAAa,CAAE,GAAGF,CAAA,EAGxB,cAAO,KAAKA,CAAK,EAAE,QAASG,GAAQ,CAEhC,OAAO,UAAU,eAAe,KAAKH,EAAOG,CAAG,GAC/CC,EAAAA,OAAO,gBAAgBD,CAAG,IAE1BF,EAAWE,CAAG,EAAIH,EAAMG,CAAc,EACtC,OAAOD,EAAWC,CAAG,EAEzB,CAAC,EAEM,CAACF,EAAYC,CAA6B,CACnD"}
1
+ {"version":3,"file":"extract-style-props-0H1Ajy_s.cjs.js","sources":["../../src/utils/extract-style-props.ts"],"sourcesContent":["import { system } from \"@/theme\";\n\n/**\n * Extracts chakra-ui style-props from an object, separating them from other props\n * @param props The props object to separate\n * @returns A tuple containing [styleProps, otherProps]\n */\nexport function extractStyleProps<T extends object>(\n props: T\n): [Record<string, unknown>, Omit<T, string>] {\n const styleProps: Record<string, unknown> = {};\n const otherProps = { ...props } as Record<string, unknown>;\n\n // Process only own properties\n Object.keys(props).forEach((key) => {\n if (\n Object.prototype.hasOwnProperty.call(props, key) &&\n system.isValidProperty(key)\n ) {\n styleProps[key] = props[key as keyof T];\n delete otherProps[key];\n }\n });\n\n return [styleProps, otherProps as Omit<T, string>];\n}\n"],"names":["extractStyleProps","props","styleProps","otherProps","key","system"],"mappings":"wDAOO,SAASA,EACdC,EAC4C,CAC5C,MAAMC,EAAsC,CAAA,EACtCC,EAAa,CAAE,GAAGF,CAAA,EAGxB,cAAO,KAAKA,CAAK,EAAE,QAASG,GAAQ,CAEhC,OAAO,UAAU,eAAe,KAAKH,EAAOG,CAAG,GAC/CC,EAAAA,OAAO,gBAAgBD,CAAG,IAE1BF,EAAWE,CAAG,EAAIH,EAAMG,CAAc,EACtC,OAAOD,EAAWC,CAAG,EAEzB,CAAC,EAEM,CAACF,EAAYC,CAA6B,CACnD"}
@@ -1,4 +1,4 @@
1
- import { s } from "./index-CaeeOiBp.es.js";
1
+ import { s } from "./index-DlmEj62V.es.js";
2
2
  function a(e) {
3
3
  const r = {}, o = { ...e };
4
4
  return Object.keys(e).forEach((t) => {
@@ -8,4 +8,4 @@ function a(e) {
8
8
  export {
9
9
  a as e
10
10
  };
11
- //# sourceMappingURL=extract-style-props-CZpdYA8m.es.js.map
11
+ //# sourceMappingURL=extract-style-props-CTVOvGhe.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"extract-style-props-CZpdYA8m.es.js","sources":["../../src/utils/extract-style-props.ts"],"sourcesContent":["import { system } from \"@/theme\";\n\n/**\n * Extracts chakra-ui style-props from an object, separating them from other props\n * @param props The props object to separate\n * @returns A tuple containing [styleProps, otherProps]\n */\nexport function extractStyleProps<T extends object>(\n props: T\n): [Record<string, unknown>, Omit<T, string>] {\n const styleProps: Record<string, unknown> = {};\n const otherProps = { ...props } as Record<string, unknown>;\n\n // Process only own properties\n Object.keys(props).forEach((key) => {\n if (\n Object.prototype.hasOwnProperty.call(props, key) &&\n system.isValidProperty(key)\n ) {\n styleProps[key] = props[key as keyof T];\n delete otherProps[key];\n }\n });\n\n return [styleProps, otherProps as Omit<T, string>];\n}\n"],"names":["extractStyleProps","props","styleProps","otherProps","key","system"],"mappings":";AAOO,SAASA,EACdC,GAC4C;AAC5C,QAAMC,IAAsC,CAAA,GACtCC,IAAa,EAAE,GAAGF,EAAA;AAGxB,gBAAO,KAAKA,CAAK,EAAE,QAAQ,CAACG,MAAQ;AAClC,IACE,OAAO,UAAU,eAAe,KAAKH,GAAOG,CAAG,KAC/CC,EAAO,gBAAgBD,CAAG,MAE1BF,EAAWE,CAAG,IAAIH,EAAMG,CAAc,GACtC,OAAOD,EAAWC,CAAG;AAAA,EAEzB,CAAC,GAEM,CAACF,GAAYC,CAA6B;AACnD;"}
1
+ {"version":3,"file":"extract-style-props-CTVOvGhe.es.js","sources":["../../src/utils/extract-style-props.ts"],"sourcesContent":["import { system } from \"@/theme\";\n\n/**\n * Extracts chakra-ui style-props from an object, separating them from other props\n * @param props The props object to separate\n * @returns A tuple containing [styleProps, otherProps]\n */\nexport function extractStyleProps<T extends object>(\n props: T\n): [Record<string, unknown>, Omit<T, string>] {\n const styleProps: Record<string, unknown> = {};\n const otherProps = { ...props } as Record<string, unknown>;\n\n // Process only own properties\n Object.keys(props).forEach((key) => {\n if (\n Object.prototype.hasOwnProperty.call(props, key) &&\n system.isValidProperty(key)\n ) {\n styleProps[key] = props[key as keyof T];\n delete otherProps[key];\n }\n });\n\n return [styleProps, otherProps as Omit<T, string>];\n}\n"],"names":["extractStyleProps","props","styleProps","otherProps","key","system"],"mappings":";AAOO,SAASA,EACdC,GAC4C;AAC5C,QAAMC,IAAsC,CAAA,GACtCC,IAAa,EAAE,GAAGF,EAAA;AAGxB,gBAAO,KAAKA,CAAK,EAAE,QAAQ,CAACG,MAAQ;AAClC,IACE,OAAO,UAAU,eAAe,KAAKH,GAAOG,CAAG,KAC/CC,EAAO,gBAAgBD,CAAG,MAE1BF,EAAWE,CAAG,IAAIH,EAAMG,CAAc,GACtC,OAAOD,EAAWC,CAAG;AAAA,EAEzB,CAAC,GAEM,CAACF,GAAYC,CAA6B;AACnD;"}
@@ -6,7 +6,7 @@ import { HelpOutline as G, ErrorOutline as J } from "@commercetools/nimbus-icons
6
6
  import { $ as K } from "./useObjectRef-CaJ5pgjX.es.js";
7
7
  import { $ as O } from "./useField-WtCRFMK8.es.js";
8
8
  import { B as b } from "./box-DuBoAZvq.es.js";
9
- import { I as Q } from "./icon-button-g4dZUH5O.es.js";
9
+ import { I as Q } from "./icon-button-CKfDmEjG.es.js";
10
10
  const a = /* @__PURE__ */ w({
11
11
  context: {
12
12
  label: null,
@@ -228,4 +228,4 @@ export {
228
228
  ro as e,
229
229
  to as f
230
230
  };
231
- //# sourceMappingURL=form-field-B6PqLujT.es.js.map
231
+ //# sourceMappingURL=form-field-BHz1U87W.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"form-field-B6PqLujT.es.js","sources":["../../src/components/form-field/components/form-field.context.tsx","../../src/components/form-field/form-field.slots.tsx","../../src/components/form-field/components/form-field.root.tsx","../../src/components/form-field/components/form-field.label.tsx","../../src/components/form-field/components/form-field.input.tsx","../../src/components/form-field/components/form-field.description.tsx","../../src/components/form-field/components/form-field.error.tsx","../../src/components/form-field/components/form-field.info-box.tsx","../../src/components/form-field/form-field.tsx"],"sourcesContent":["import { createContext, type ReactNode } from \"react\";\nimport type {\n FormFieldDescriptionSlotProps,\n FormFieldErrorSlotProps,\n FormFieldInputSlotProps,\n FormFieldLabelSlotProps,\n} from \"../form-field.types\";\n\nexport type FormFieldContextPayloadType = {\n label: ReactNode;\n labelSlotProps?: FormFieldLabelSlotProps;\n input: ReactNode;\n inputSlotProps?: FormFieldInputSlotProps;\n description: ReactNode;\n descriptionSlotProps?: FormFieldDescriptionSlotProps;\n error: ReactNode;\n errorSlotProps?: FormFieldErrorSlotProps;\n info: ReactNode;\n isInvalid?: boolean;\n isRequired?: boolean;\n isDisabled?: boolean;\n isReadOnly?: boolean;\n};\n\nexport type FormFieldContextType = {\n context: FormFieldContextPayloadType;\n setContext: React.Dispatch<React.SetStateAction<FormFieldContextPayloadType>>;\n};\n\nexport const FormFieldContext = createContext<FormFieldContextType>({\n context: {\n label: null,\n description: null,\n error: null,\n info: null,\n input: null,\n },\n setContext: () => {},\n});\n","import { createSlotRecipeContext } from \"@chakra-ui/react\";\nimport type {\n FormFieldRootSlotProps,\n FormFieldLabelSlotProps,\n FormFieldInputSlotProps,\n FormFieldDescriptionSlotProps,\n FormFieldErrorSlotProps,\n FormFieldPopoverSlotProps,\n} from \"./form-field.types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"formField\",\n});\n\n// Root slot\nexport const FormFieldRootSlot = withProvider<\n HTMLDivElement,\n FormFieldRootSlotProps\n>(\"div\", \"root\");\n\n// Label Slot\nexport const FormFieldLabelSlot = withContext<\n HTMLDivElement,\n FormFieldLabelSlotProps\n>(\"div\", \"label\");\n\n// Input Slot\nexport const FormFieldInputSlot = withContext<\n HTMLDivElement,\n FormFieldInputSlotProps\n>(\"div\", \"input\");\n\n// Description Slot\nexport const FormFieldDescriptionSlot = withContext<\n HTMLDivElement,\n FormFieldDescriptionSlotProps\n>(\"div\", \"description\");\n\n// Error Slot\nexport const FormFieldErrorSlot = withContext<\n HTMLDivElement,\n FormFieldErrorSlotProps\n>(\"div\", \"error\");\n\n// Error Slot\nexport const FormFieldPopoverSlot = withContext<\n HTMLDivElement,\n FormFieldPopoverSlotProps\n>(\"div\", \"popover\");\n","import {\n Children,\n cloneElement,\n isValidElement,\n useEffect,\n useMemo,\n useState,\n useRef,\n} from \"react\";\nimport type { FormFieldProps } from \"../form-field.types\";\nimport { useField, useObjectRef } from \"react-aria\";\nimport { mergeRefs } from \"@chakra-ui/react\";\nimport {\n FormFieldContext,\n type FormFieldContextPayloadType,\n} from \"./form-field.context\";\nimport {\n FormFieldDescriptionSlot,\n FormFieldErrorSlot,\n FormFieldInputSlot,\n FormFieldLabelSlot,\n FormFieldPopoverSlot,\n FormFieldRootSlot,\n} from \"../form-field.slots\";\nimport { Dialog, DialogTrigger, Popover } from \"react-aria-components\";\nimport { Box, IconButton } from \"@/components\";\nimport { ErrorOutline, HelpOutline } from \"@commercetools/nimbus-icons\";\n\n/**\n * # FormField\n *\n * displays miscellaneous inputs in a FormField context\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/formfield}\n */\nexport const FormFieldRoot = function FormFieldRoot({\n ref: forwardedRef,\n id,\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n children,\n ...props\n}: FormFieldProps) {\n const localRef = useRef<HTMLDivElement>(null);\n const ref = useObjectRef(mergeRefs(localRef, forwardedRef));\n const [context, setContext] = useState<FormFieldContextPayloadType>({\n label: null,\n description: null,\n error: null,\n info: null,\n input: null,\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n });\n\n const useFieldArgs: Parameters<typeof useField>[0] = useMemo(() => {\n const args: Parameters<typeof useField>[0] = {\n id,\n description: context.description,\n errorMessage: context.error,\n };\n\n if (context.label) {\n args.label = context.label;\n } else {\n // Context will always start out null, so we need to stub out some aria attributes\n // FIXME: This is a hack to get the form field to work, but it's not the best solution\n // FIXME: We should find a better way to handle this by redesigning the FormField component's structure\n args[\"aria-label\"] = \"empty-label\";\n args[\"aria-labelledby\"] = \"empty-label\";\n }\n\n return args;\n }, [id, context.description, context.error, context.label]);\n\n const { labelProps, fieldProps, descriptionProps, errorMessageProps } =\n useField(useFieldArgs);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n }));\n }, [isInvalid, isRequired, isDisabled, isReadOnly]);\n\n const inputProps = useMemo(\n () => ({\n ...fieldProps,\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n }),\n [fieldProps, isInvalid, isRequired, isDisabled, isReadOnly]\n );\n\n const contextValue = useMemo(() => ({ context, setContext }), [context]);\n\n return (\n <FormFieldContext.Provider value={contextValue}>\n <FormFieldRootSlot ref={ref} {...props}>\n {context.label && (\n <FormFieldLabelSlot {...context.labelSlotProps}>\n <label {...labelProps}>\n {context.label}\n {isRequired && <sup aria-hidden=\"true\">*</sup>}\n </label>\n {context.info && (\n <DialogTrigger>\n <Box\n as=\"span\"\n display=\"inline-block\"\n position=\"relative\"\n width=\"1ch\"\n height=\"1ch\"\n ml=\"200\"\n >\n <Box\n as=\"span\"\n display=\"inline-flex\"\n position=\"absolute\"\n top=\"50%\"\n right=\"50%\"\n transform=\"translate(50%, -50%)\"\n >\n <IconButton\n aria-label=\"__MORE INFO\"\n size=\"2xs\"\n tone=\"info\"\n variant=\"link\"\n >\n <HelpOutline />\n </IconButton>\n </Box>\n </Box>\n <Popover>\n <FormFieldPopoverSlot asChild>\n <Dialog>\n <Box p=\"300\">{context.info}</Box>\n </Dialog>\n </FormFieldPopoverSlot>\n </Popover>\n </DialogTrigger>\n )}\n </FormFieldLabelSlot>\n )}\n {context.input && (\n <FormFieldInputSlot {...context.inputSlotProps}>\n {Children.map(context.input, (child) => {\n // Important: Check if the child is a valid React element before cloning.\n if (isValidElement(child)) {\n return cloneElement(child, inputProps);\n }\n // If it's not a valid element (e.g., text node, null, undefined), return it as is.\n return child;\n })}\n </FormFieldInputSlot>\n )}\n {context.description && (\n <FormFieldDescriptionSlot\n {...descriptionProps}\n {...context.descriptionSlotProps}\n >\n {context.description}\n </FormFieldDescriptionSlot>\n )}\n {isInvalid && context.error && (\n <FormFieldErrorSlot\n {...errorMessageProps}\n {...context.errorSlotProps}\n >\n <Box\n as={ErrorOutline}\n display=\"inline-flex\"\n boxSize=\"400\"\n verticalAlign=\"text-bottom\"\n mr=\"100\"\n alignSelf=\"center\"\n />\n {context.error}\n </FormFieldErrorSlot>\n )}\n {children}\n </FormFieldRootSlot>\n </FormFieldContext.Provider>\n );\n};\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldLabelSlotProps } from \"../form-field.types\";\n\nexport const FormFieldLabel = ({\n children,\n ...labelSlotProps\n}: FormFieldLabelSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n label: children,\n labelSlotProps,\n }));\n\n // Cleanup: clear label when component unmounts\n return () => {\n setContext((prevContext) => ({\n ...prevContext,\n label: null,\n labelSlotProps: undefined,\n }));\n };\n }, [children, setContext]);\n\n return null;\n};\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldInputSlotProps } from \"../form-field.types\";\n\nexport const FormFieldInput = ({\n children,\n ...inputSlotProps\n}: FormFieldInputSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n input: children,\n inputSlotProps,\n }));\n }, [children, setContext]);\n\n return null;\n};\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldDescriptionSlotProps } from \"../form-field.types\";\n\nexport const FormFieldDescription = ({\n children,\n ...descriptionSlotProps\n}: FormFieldDescriptionSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n description: children,\n descriptionSlotProps,\n }));\n\n // Cleanup: clear description when component unmounts\n return () => {\n setContext((prevContext) => ({\n ...prevContext,\n description: null,\n descriptionSlotProps: undefined,\n }));\n };\n }, [children, setContext]);\n\n return null;\n};\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldErrorSlotProps } from \"../form-field.types\";\n\nexport const FormFieldError = ({\n children,\n ...errorSlotProps\n}: FormFieldErrorSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n error: children,\n errorSlotProps,\n }));\n\n // Cleanup: clear error when component unmounts\n return () => {\n setContext((prevContext) => ({\n ...prevContext,\n error: null,\n errorSlotProps: undefined,\n }));\n };\n }, [children, setContext]);\n\n return null;\n};\n","import { useContext, useEffect, type ReactNode } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\n\ntype FormFieldInfoBoxProps = {\n /**\n * The content to display in the InfoBox\n */\n children: ReactNode;\n};\n\nexport const FormFieldInfoBox = ({ children }: FormFieldInfoBoxProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n info: children,\n }));\n\n // Cleanup: clear info when component unmounts\n return () => {\n setContext((prevContext) => ({\n ...prevContext,\n info: null,\n }));\n };\n }, [children, setContext]);\n\n return null;\n};\n","import { FormFieldRoot } from \"./components/form-field.root\";\nimport { FormFieldLabel } from \"./components/form-field.label\";\nimport { FormFieldInput } from \"./components/form-field.input\";\nimport { FormFieldDescription } from \"./components/form-field.description\";\nimport { FormFieldError } from \"./components/form-field.error\";\nimport { FormFieldInfoBox } from \"./components/form-field.info-box\";\n\nexport const FormField = {\n Root: FormFieldRoot,\n Label: FormFieldLabel,\n Input: FormFieldInput,\n Description: FormFieldDescription,\n Error: FormFieldError,\n InfoBox: FormFieldInfoBox,\n};\n\nexport {\n FormFieldRoot as _FormFieldRoot,\n FormFieldLabel as _FormFieldLabel,\n FormFieldInput as _FormFieldInput,\n FormFieldDescription as _FormFieldDescription,\n FormFieldError as _FormFieldError,\n FormFieldInfoBox as _FormFieldInfoBox,\n};\n"],"names":["FormFieldContext","createContext","withProvider","withContext","createSlotRecipeContext","FormFieldRootSlot","FormFieldLabelSlot","FormFieldInputSlot","FormFieldDescriptionSlot","FormFieldErrorSlot","FormFieldPopoverSlot","FormFieldRoot","forwardedRef","id","isInvalid","isRequired","isDisabled","isReadOnly","children","props","localRef","useRef","ref","useObjectRef","mergeRefs","context","setContext","useState","useFieldArgs","useMemo","args","labelProps","fieldProps","descriptionProps","errorMessageProps","useField","useEffect","prevContext","inputProps","contextValue","jsx","jsxs","DialogTrigger","Box","IconButton","HelpOutline","Popover","Dialog","Children","child","isValidElement","cloneElement","ErrorOutline","FormFieldLabel","labelSlotProps","useContext","FormFieldInput","inputSlotProps","FormFieldDescription","descriptionSlotProps","FormFieldError","errorSlotProps","FormFieldInfoBox","FormField"],"mappings":";;;;;;;;;AA6BO,MAAMA,IAAmB,gBAAAC,EAAoC;AAAA,EAClE,SAAS;AAAA,IACP,OAAO;AAAA,IACP,aAAa;AAAA,IACb,OAAO;AAAA,IACP,MAAM;AAAA,IACN,OAAO;AAAA,EAAA;AAAA,EAET,YAAY,MAAM;AAAA,EAAC;AACrB,CAAC,GC5BK,EAAE,cAAAC,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,KAAK;AACP,CAAC,GAGYC,IAAoB,gBAAAH,EAG/B,OAAO,MAAM,GAGFI,IAAqB,gBAAAH,EAGhC,OAAO,OAAO,GAGHI,IAAqB,gBAAAJ,EAGhC,OAAO,OAAO,GAGHK,IAA2B,gBAAAL,EAGtC,OAAO,aAAa,GAGTM,IAAqB,gBAAAN,EAGhC,OAAO,OAAO,GAGHO,IAAuB,gBAAAP,EAGlC,OAAO,SAAS,GCbLQ,IAAgB,SAAuB;AAAA,EAClD,KAAKC;AAAA,EACL,IAAAC;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,YAAAC;AAAA,EACA,YAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,GAAmB;AACjB,QAAMC,IAAWC,EAAuB,IAAI,GACtCC,IAAMC,EAAaC,EAAUJ,GAAUR,CAAY,CAAC,GACpD,CAACa,GAASC,CAAU,IAAIC,EAAsC;AAAA,IAClE,OAAO;AAAA,IACP,aAAa;AAAA,IACb,OAAO;AAAA,IACP,MAAM;AAAA,IACN,OAAO;AAAA,IACP,WAAAb;AAAA,IACA,YAAAC;AAAA,IACA,YAAAC;AAAA,IACA,YAAAC;AAAA,EAAA,C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AAAA,EACvB,MAAMpD;AAAA,EACN,OAAO0C;AAAA,EACP,OAAOG;AAAA,EACP,aAAaE;AAAA,EACb,OAAOE;AAAA,EACP,SAASE;AACX;"}
1
+ {"version":3,"file":"form-field-BHz1U87W.es.js","sources":["../../src/components/form-field/components/form-field.context.tsx","../../src/components/form-field/form-field.slots.tsx","../../src/components/form-field/components/form-field.root.tsx","../../src/components/form-field/components/form-field.label.tsx","../../src/components/form-field/components/form-field.input.tsx","../../src/components/form-field/components/form-field.description.tsx","../../src/components/form-field/components/form-field.error.tsx","../../src/components/form-field/components/form-field.info-box.tsx","../../src/components/form-field/form-field.tsx"],"sourcesContent":["import { createContext, type ReactNode } from \"react\";\nimport type {\n FormFieldDescriptionSlotProps,\n FormFieldErrorSlotProps,\n FormFieldInputSlotProps,\n FormFieldLabelSlotProps,\n} from \"../form-field.types\";\n\nexport type FormFieldContextPayloadType = {\n label: ReactNode;\n labelSlotProps?: FormFieldLabelSlotProps;\n input: ReactNode;\n inputSlotProps?: FormFieldInputSlotProps;\n description: ReactNode;\n descriptionSlotProps?: FormFieldDescriptionSlotProps;\n error: ReactNode;\n errorSlotProps?: FormFieldErrorSlotProps;\n info: ReactNode;\n isInvalid?: boolean;\n isRequired?: boolean;\n isDisabled?: boolean;\n isReadOnly?: boolean;\n};\n\nexport type FormFieldContextType = {\n context: FormFieldContextPayloadType;\n setContext: React.Dispatch<React.SetStateAction<FormFieldContextPayloadType>>;\n};\n\nexport const FormFieldContext = createContext<FormFieldContextType>({\n context: {\n label: null,\n description: null,\n error: null,\n info: null,\n input: null,\n },\n setContext: () => {},\n});\n","import { createSlotRecipeContext } from \"@chakra-ui/react\";\nimport type {\n FormFieldRootSlotProps,\n FormFieldLabelSlotProps,\n FormFieldInputSlotProps,\n FormFieldDescriptionSlotProps,\n FormFieldErrorSlotProps,\n FormFieldPopoverSlotProps,\n} from \"./form-field.types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"formField\",\n});\n\n// Root slot\nexport const FormFieldRootSlot = withProvider<\n HTMLDivElement,\n FormFieldRootSlotProps\n>(\"div\", \"root\");\n\n// Label Slot\nexport const FormFieldLabelSlot = withContext<\n HTMLDivElement,\n FormFieldLabelSlotProps\n>(\"div\", \"label\");\n\n// Input Slot\nexport const FormFieldInputSlot = withContext<\n HTMLDivElement,\n FormFieldInputSlotProps\n>(\"div\", \"input\");\n\n// Description Slot\nexport const FormFieldDescriptionSlot = withContext<\n HTMLDivElement,\n FormFieldDescriptionSlotProps\n>(\"div\", \"description\");\n\n// Error Slot\nexport const FormFieldErrorSlot = withContext<\n HTMLDivElement,\n FormFieldErrorSlotProps\n>(\"div\", \"error\");\n\n// Error Slot\nexport const FormFieldPopoverSlot = withContext<\n HTMLDivElement,\n FormFieldPopoverSlotProps\n>(\"div\", \"popover\");\n","import {\n Children,\n cloneElement,\n isValidElement,\n useEffect,\n useMemo,\n useState,\n useRef,\n} from \"react\";\nimport type { FormFieldProps } from \"../form-field.types\";\nimport { useField, useObjectRef } from \"react-aria\";\nimport { mergeRefs } from \"@chakra-ui/react\";\nimport {\n FormFieldContext,\n type FormFieldContextPayloadType,\n} from \"./form-field.context\";\nimport {\n FormFieldDescriptionSlot,\n FormFieldErrorSlot,\n FormFieldInputSlot,\n FormFieldLabelSlot,\n FormFieldPopoverSlot,\n FormFieldRootSlot,\n} from \"../form-field.slots\";\nimport { Dialog, DialogTrigger, Popover } from \"react-aria-components\";\nimport { Box, IconButton } from \"@/components\";\nimport { ErrorOutline, HelpOutline } from \"@commercetools/nimbus-icons\";\n\n/**\n * # FormField\n *\n * displays miscellaneous inputs in a FormField context\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/formfield}\n */\nexport const FormFieldRoot = function FormFieldRoot({\n ref: forwardedRef,\n id,\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n children,\n ...props\n}: FormFieldProps) {\n const localRef = useRef<HTMLDivElement>(null);\n const ref = useObjectRef(mergeRefs(localRef, forwardedRef));\n const [context, setContext] = useState<FormFieldContextPayloadType>({\n label: null,\n description: null,\n error: null,\n info: null,\n input: null,\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n });\n\n const useFieldArgs: Parameters<typeof useField>[0] = useMemo(() => {\n const args: Parameters<typeof useField>[0] = {\n id,\n description: context.description,\n errorMessage: context.error,\n };\n\n if (context.label) {\n args.label = context.label;\n } else {\n // Context will always start out null, so we need to stub out some aria attributes\n // FIXME: This is a hack to get the form field to work, but it's not the best solution\n // FIXME: We should find a better way to handle this by redesigning the FormField component's structure\n args[\"aria-label\"] = \"empty-label\";\n args[\"aria-labelledby\"] = \"empty-label\";\n }\n\n return args;\n }, [id, context.description, context.error, context.label]);\n\n const { labelProps, fieldProps, descriptionProps, errorMessageProps } =\n useField(useFieldArgs);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n }));\n }, [isInvalid, isRequired, isDisabled, isReadOnly]);\n\n const inputProps = useMemo(\n () => ({\n ...fieldProps,\n isInvalid,\n isRequired,\n isDisabled,\n isReadOnly,\n }),\n [fieldProps, isInvalid, isRequired, isDisabled, isReadOnly]\n );\n\n const contextValue = useMemo(() => ({ context, setContext }), [context]);\n\n return (\n <FormFieldContext.Provider value={contextValue}>\n <FormFieldRootSlot ref={ref} {...props}>\n {context.label && (\n <FormFieldLabelSlot {...context.labelSlotProps}>\n <label {...labelProps}>\n {context.label}\n {isRequired && <sup aria-hidden=\"true\">*</sup>}\n </label>\n {context.info && (\n <DialogTrigger>\n <Box\n as=\"span\"\n display=\"inline-block\"\n position=\"relative\"\n width=\"1ch\"\n height=\"1ch\"\n ml=\"200\"\n >\n <Box\n as=\"span\"\n display=\"inline-flex\"\n position=\"absolute\"\n top=\"50%\"\n right=\"50%\"\n transform=\"translate(50%, -50%)\"\n >\n <IconButton\n aria-label=\"__MORE INFO\"\n size=\"2xs\"\n tone=\"info\"\n variant=\"link\"\n >\n <HelpOutline />\n </IconButton>\n </Box>\n </Box>\n <Popover>\n <FormFieldPopoverSlot asChild>\n <Dialog>\n <Box p=\"300\">{context.info}</Box>\n </Dialog>\n </FormFieldPopoverSlot>\n </Popover>\n </DialogTrigger>\n )}\n </FormFieldLabelSlot>\n )}\n {context.input && (\n <FormFieldInputSlot {...context.inputSlotProps}>\n {Children.map(context.input, (child) => {\n // Important: Check if the child is a valid React element before cloning.\n if (isValidElement(child)) {\n return cloneElement(child, inputProps);\n }\n // If it's not a valid element (e.g., text node, null, undefined), return it as is.\n return child;\n })}\n </FormFieldInputSlot>\n )}\n {context.description && (\n <FormFieldDescriptionSlot\n {...descriptionProps}\n {...context.descriptionSlotProps}\n >\n {context.description}\n </FormFieldDescriptionSlot>\n )}\n {isInvalid && context.error && (\n <FormFieldErrorSlot\n {...errorMessageProps}\n {...context.errorSlotProps}\n >\n <Box\n as={ErrorOutline}\n display=\"inline-flex\"\n boxSize=\"400\"\n verticalAlign=\"text-bottom\"\n mr=\"100\"\n alignSelf=\"center\"\n />\n {context.error}\n </FormFieldErrorSlot>\n )}\n {children}\n </FormFieldRootSlot>\n </FormFieldContext.Provider>\n );\n};\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldLabelSlotProps } from \"../form-field.types\";\n\nexport const FormFieldLabel = ({\n children,\n ...labelSlotProps\n}: FormFieldLabelSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n label: children,\n labelSlotProps,\n }));\n\n // Cleanup: clear label when component unmounts\n return () => {\n setContext((prevContext) => ({\n ...prevContext,\n label: null,\n labelSlotProps: undefined,\n }));\n };\n }, [children, setContext]);\n\n return null;\n};\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldInputSlotProps } from \"../form-field.types\";\n\nexport const FormFieldInput = ({\n children,\n ...inputSlotProps\n}: FormFieldInputSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n input: children,\n inputSlotProps,\n }));\n }, [children, setContext]);\n\n return null;\n};\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldDescriptionSlotProps } from \"../form-field.types\";\n\nexport const FormFieldDescription = ({\n children,\n ...descriptionSlotProps\n}: FormFieldDescriptionSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n description: children,\n descriptionSlotProps,\n }));\n\n // Cleanup: clear description when component unmounts\n return () => {\n setContext((prevContext) => ({\n ...prevContext,\n description: null,\n descriptionSlotProps: undefined,\n }));\n };\n }, [children, setContext]);\n\n return null;\n};\n","import { useContext, useEffect } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\nimport type { FormFieldErrorSlotProps } from \"../form-field.types\";\n\nexport const FormFieldError = ({\n children,\n ...errorSlotProps\n}: FormFieldErrorSlotProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n error: children,\n errorSlotProps,\n }));\n\n // Cleanup: clear error when component unmounts\n return () => {\n setContext((prevContext) => ({\n ...prevContext,\n error: null,\n errorSlotProps: undefined,\n }));\n };\n }, [children, setContext]);\n\n return null;\n};\n","import { useContext, useEffect, type ReactNode } from \"react\";\nimport { FormFieldContext } from \"./form-field.context\";\n\ntype FormFieldInfoBoxProps = {\n /**\n * The content to display in the InfoBox\n */\n children: ReactNode;\n};\n\nexport const FormFieldInfoBox = ({ children }: FormFieldInfoBoxProps) => {\n const { setContext } = useContext(FormFieldContext);\n\n useEffect(() => {\n setContext((prevContext) => ({\n ...prevContext,\n info: children,\n }));\n\n // Cleanup: clear info when component unmounts\n return () => {\n setContext((prevContext) => ({\n ...prevContext,\n info: null,\n }));\n };\n }, [children, setContext]);\n\n return null;\n};\n","import { FormFieldRoot } from \"./components/form-field.root\";\nimport { FormFieldLabel } from \"./components/form-field.label\";\nimport { FormFieldInput } from \"./components/form-field.input\";\nimport { FormFieldDescription } from \"./components/form-field.description\";\nimport { FormFieldError } from \"./components/form-field.error\";\nimport { FormFieldInfoBox } from \"./components/form-field.info-box\";\n\nexport const FormField = {\n Root: FormFieldRoot,\n Label: FormFieldLabel,\n Input: FormFieldInput,\n Description: FormFieldDescription,\n Error: FormFieldError,\n InfoBox: FormFieldInfoBox,\n};\n\nexport {\n FormFieldRoot as _FormFieldRoot,\n FormFieldLabel as _FormFieldLabel,\n FormFieldInput as _FormFieldInput,\n FormFieldDescription as _FormFieldDescription,\n FormFieldError as _FormFieldError,\n FormFieldInfoBox as _FormFieldInfoBox,\n};\n"],"names":["FormFieldContext","createContext","withProvider","withContext","createSlotRecipeContext","FormFieldRootSlot","FormFieldLabelSlot","FormFieldInputSlot","FormFieldDescriptionSlot","FormFieldErrorSlot","FormFieldPopoverSlot","FormFieldRoot","forwardedRef","id","isInvalid","isRequired","isDisabled","isReadOnly","children","props","localRef","useRef","ref","useObjectRef","mergeRefs","context","setContext","useState","useFieldArgs","useMemo","args","labelProps","fieldProps","descriptionProps","errorMessageProps","useField","useEffect","prevContext","inputProps","contextValue","jsx","jsxs","DialogTrigger","Box","IconButton","HelpOutline","Popover","Dialog","Children","child","isValidElement","cloneElement","ErrorOutline","FormFieldLabel","labelSlotProps","useContext","FormFieldInput","inputSlotProps","FormFieldDescription","descriptionSlotProps","FormFieldError","errorSlotProps","FormFieldInfoBox","FormField"],"mappings":";;;;;;;;;AA6BO,MAAMA,IAAmB,gBAAAC,EAAoC;AAAA,EAClE,SAAS;AAAA,IACP,OAAO;AAAA,IACP,aAAa;AAAA,IACb,OAAO;AAAA,IACP,MAAM;AAAA,IACN,OAAO;AAAA,EAAA;AAAA,EAET,YAAY,MAAM;AAAA,EAAC;AACrB,CAAC,GC5BK,EAAE,cAAAC,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5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AAG2C;AACL,MAA+B;AAC7B,QAAM,EAAE,YAAAnC,EAAA,IAAe6B,EAAWvD,CAAgB;AAElD,SAAAoC,EAAU,OACRV,EAAW,CAACW,OAAiB;AAAA,IAC3B,GAAGA;AAAA,IACH,OAAOnB;AAAA,IACP,gBAAA2C;AAAA,EAAA,EACA,GAGK,MAAM;AACX,IAAAnC,EAAW,CAACW,OAAiB;AAAA,MAC3B,GAAGA;AAAA,MACH,OAAO;AAAA,MACP,gBAAgB;AAAA,IAAA,EAChB;AAAA,EACJ,IACC,CAACnB,GAAUQ,CAAU,CAAC,GAElB;AACT,GClBaoC,KAAmB,CAAC,EAAE,UAAA5C,QAAsC;AACvE,QAAM,EAAE,YAAAQ,EAAA,IAAe6B,EAAWvD,CAAgB;AAElD,SAAAoC,EAAU,OACRV,EAAW,CAACW,OAAiB;AAAA,IAC3B,GAAGA;AAAA,IACH,MAAMnB;AAAA,EAAA,EACN,GAGK,MAAM;AACX,IAAAQ,EAAW,CAACW,OAAiB;AAAA,MAC3B,GAAGA;AAAA,MACH,MAAM;AAAA,IAAA,EACN;AAAA,EACJ,IACC,CAACnB,GAAUQ,CAAU,CAAC,GAElB;AACT,GCtBaqC,KAAY;AAAA,EACvB,MAAMpD;AAAA,EACN,OAAO0C;AAAA,EACP,OAAOG;AAAA,EACP,aAAaE;AAAA,EACb,OAAOE;AAAA,EACP,SAASE;AACX;"}
@@ -1,2 +1,2 @@
1
- "use strict";const n=require("react/jsx-runtime"),r=require("react"),h=require("@chakra-ui/react"),f=require("./Dialog-DINBl88u.cjs.js"),m=require("@commercetools/nimbus-icons"),y=require("./useObjectRef-4v2MxSjQ.cjs.js"),z=require("./useField-lK6K_h1G.cjs.js"),x=require("./box-CWni3A32.cjs.js"),A=require("./icon-button-B28VUff9.cjs.js"),u=r.createContext({context:{label:null,description:null,error:null,info:null,input:null},setContext:()=>{}}),{withProvider:V,withContext:d}=h.createSlotRecipeContext({key:"formField"}),_=V("div","root"),D=d("div","label"),H=d("div","input"),N=d("div","description"),O=d("div","error"),G=d("div","popover"),j=function({ref:s,id:o,isInvalid:t,isRequired:c,isDisabled:p,isReadOnly:a,children:v,...g}){const B=r.useRef(null),M=y.$df56164dff5785e2$export$4338b53315abf666(h.mergeRefs(B,s)),[e,F]=r.useState({label:null,description:null,error:null,info:null,input:null,isInvalid:t,isRequired:c,isDisabled:p,isReadOnly:a}),I=r.useMemo(()=>{const i={id:o,description:e.description,errorMessage:e.error};return e.label?i.label=e.label:(i["aria-label"]="empty-label",i["aria-labelledby"]="empty-label"),i},[o,e.description,e.error,e.label]),{labelProps:q,fieldProps:b,descriptionProps:L,errorMessageProps:R}=z.$2baaea4c71418dea$export$294aa081a6c6f55d(I);r.useEffect(()=>{F(i=>({...i,isInvalid:t,isRequired:c,isDisabled:p,isReadOnly:a}))},[t,c,p,a]);const k=r.useMemo(()=>({...b,isInvalid:t,isRequired:c,isDisabled:p,isReadOnly:a}),[b,t,c,p,a]),w=r.useMemo(()=>({context:e,setContext:F}),[e]);return n.jsx(u.Provider,{value:w,children:n.jsxs(_,{ref:M,...g,children:[e.label&&n.jsxs(D,{...e.labelSlotProps,children:[n.jsxs("label",{...q,children:[e.label,c&&n.jsx("sup",{"aria-hidden":"true",children:"*"})]}),e.info&&n.jsxs(f.$de32f1b87079253c$export$2e1e1122cf0cba88,{children:[n.jsx(x.Box,{as:"span",display:"inline-block",position:"relative",width:"1ch",height:"1ch",ml:"200",children:n.jsx(x.Box,{as:"span",display:"inline-flex",position:"absolute",top:"50%",right:"50%",transform:"translate(50%, -50%)",children:n.jsx(A.IconButton,{"aria-label":"__MORE INFO",size:"2xs",tone:"info",variant:"link",children:n.jsx(m.HelpOutline,{})})})}),n.jsx(f.$07b14b47974efb58$export$5b6b19405a83ff9d,{children:n.jsx(G,{asChild:!0,children:n.jsx(f.$de32f1b87079253c$export$3ddf2d174ce01153,{children:n.jsx(x.Box,{p:"300",children:e.info})})})})]})]}),e.input&&n.jsx(H,{...e.inputSlotProps,children:r.Children.map(e.input,i=>r.isValidElement(i)?r.cloneElement(i,k):i)}),e.description&&n.jsx(N,{...L,...e.descriptionSlotProps,children:e.description}),t&&e.error&&n.jsxs(O,{...R,...e.errorSlotProps,children:[n.jsx(x.Box,{as:m.ErrorOutline,display:"inline-flex",boxSize:"400",verticalAlign:"text-bottom",mr:"100",alignSelf:"center"}),e.error]}),v]})})},C=({children:l,...s})=>{const{setContext:o}=r.useContext(u);return r.useEffect(()=>(o(t=>({...t,label:l,labelSlotProps:s})),()=>{o(t=>({...t,label:null,labelSlotProps:void 0}))}),[l,o]),null},S=({children:l,...s})=>{const{setContext:o}=r.useContext(u);return r.useEffect(()=>{o(t=>({...t,input:l,inputSlotProps:s}))},[l,o]),null},$=({children:l,...s})=>{const{setContext:o}=r.useContext(u);return r.useEffect(()=>(o(t=>({...t,description:l,descriptionSlotProps:s})),()=>{o(t=>({...t,description:null,descriptionSlotProps:void 0}))}),[l,o]),null},P=({children:l,...s})=>{const{setContext:o}=r.useContext(u);return r.useEffect(()=>(o(t=>({...t,error:l,errorSlotProps:s})),()=>{o(t=>({...t,error:null,errorSlotProps:void 0}))}),[l,o]),null},E=({children:l})=>{const{setContext:s}=r.useContext(u);return r.useEffect(()=>(s(o=>({...o,info:l})),()=>{s(o=>({...o,info:null}))}),[l,s]),null},J={Root:j,Label:C,Input:S,Description:$,Error:P,InfoBox:E};exports.FormField=J;exports.FormFieldDescription=$;exports.FormFieldError=P;exports.FormFieldInfoBox=E;exports.FormFieldInput=S;exports.FormFieldLabel=C;exports.FormFieldRoot=j;
2
- //# sourceMappingURL=form-field-B9wlWUcK.cjs.js.map
1
+ "use strict";const n=require("react/jsx-runtime"),r=require("react"),h=require("@chakra-ui/react"),f=require("./Dialog-DINBl88u.cjs.js"),m=require("@commercetools/nimbus-icons"),y=require("./useObjectRef-4v2MxSjQ.cjs.js"),z=require("./useField-lK6K_h1G.cjs.js"),x=require("./box-CWni3A32.cjs.js"),A=require("./icon-button-CCOl3BcF.cjs.js"),u=r.createContext({context:{label:null,description:null,error:null,info:null,input:null},setContext:()=>{}}),{withProvider:V,withContext:d}=h.createSlotRecipeContext({key:"formField"}),_=V("div","root"),D=d("div","label"),H=d("div","input"),N=d("div","description"),O=d("div","error"),G=d("div","popover"),j=function({ref:s,id:o,isInvalid:t,isRequired:c,isDisabled:p,isReadOnly:a,children:v,...g}){const B=r.useRef(null),M=y.$df56164dff5785e2$export$4338b53315abf666(h.mergeRefs(B,s)),[e,F]=r.useState({label:null,description:null,error:null,info:null,input:null,isInvalid:t,isRequired:c,isDisabled:p,isReadOnly:a}),I=r.useMemo(()=>{const i={id:o,description:e.description,errorMessage:e.error};return e.label?i.label=e.label:(i["aria-label"]="empty-label",i["aria-labelledby"]="empty-label"),i},[o,e.description,e.error,e.label]),{labelProps:q,fieldProps:b,descriptionProps:L,errorMessageProps:R}=z.$2baaea4c71418dea$export$294aa081a6c6f55d(I);r.useEffect(()=>{F(i=>({...i,isInvalid:t,isRequired:c,isDisabled:p,isReadOnly:a}))},[t,c,p,a]);const k=r.useMemo(()=>({...b,isInvalid:t,isRequired:c,isDisabled:p,isReadOnly:a}),[b,t,c,p,a]),w=r.useMemo(()=>({context:e,setContext:F}),[e]);return n.jsx(u.Provider,{value:w,children:n.jsxs(_,{ref:M,...g,children:[e.label&&n.jsxs(D,{...e.labelSlotProps,children:[n.jsxs("label",{...q,children:[e.label,c&&n.jsx("sup",{"aria-hidden":"true",children:"*"})]}),e.info&&n.jsxs(f.$de32f1b87079253c$export$2e1e1122cf0cba88,{children:[n.jsx(x.Box,{as:"span",display:"inline-block",position:"relative",width:"1ch",height:"1ch",ml:"200",children:n.jsx(x.Box,{as:"span",display:"inline-flex",position:"absolute",top:"50%",right:"50%",transform:"translate(50%, -50%)",children:n.jsx(A.IconButton,{"aria-label":"__MORE INFO",size:"2xs",tone:"info",variant:"link",children:n.jsx(m.HelpOutline,{})})})}),n.jsx(f.$07b14b47974efb58$export$5b6b19405a83ff9d,{children:n.jsx(G,{asChild:!0,children:n.jsx(f.$de32f1b87079253c$export$3ddf2d174ce01153,{children:n.jsx(x.Box,{p:"300",children:e.info})})})})]})]}),e.input&&n.jsx(H,{...e.inputSlotProps,children:r.Children.map(e.input,i=>r.isValidElement(i)?r.cloneElement(i,k):i)}),e.description&&n.jsx(N,{...L,...e.descriptionSlotProps,children:e.description}),t&&e.error&&n.jsxs(O,{...R,...e.errorSlotProps,children:[n.jsx(x.Box,{as:m.ErrorOutline,display:"inline-flex",boxSize:"400",verticalAlign:"text-bottom",mr:"100",alignSelf:"center"}),e.error]}),v]})})},C=({children:l,...s})=>{const{setContext:o}=r.useContext(u);return r.useEffect(()=>(o(t=>({...t,label:l,labelSlotProps:s})),()=>{o(t=>({...t,label:null,labelSlotProps:void 0}))}),[l,o]),null},S=({children:l,...s})=>{const{setContext:o}=r.useContext(u);return r.useEffect(()=>{o(t=>({...t,input:l,inputSlotProps:s}))},[l,o]),null},$=({children:l,...s})=>{const{setContext:o}=r.useContext(u);return r.useEffect(()=>(o(t=>({...t,description:l,descriptionSlotProps:s})),()=>{o(t=>({...t,description:null,descriptionSlotProps:void 0}))}),[l,o]),null},P=({children:l,...s})=>{const{setContext:o}=r.useContext(u);return r.useEffect(()=>(o(t=>({...t,error:l,errorSlotProps:s})),()=>{o(t=>({...t,error:null,errorSlotProps:void 0}))}),[l,o]),null},E=({children:l})=>{const{setContext:s}=r.useContext(u);return r.useEffect(()=>(s(o=>({...o,info:l})),()=>{s(o=>({...o,info:null}))}),[l,s]),null},J={Root:j,Label:C,Input:S,Description:$,Error:P,InfoBox:E};exports.FormField=J;exports.FormFieldDescription=$;exports.FormFieldError=P;exports.FormFieldInfoBox=E;exports.FormFieldInput=S;exports.FormFieldLabel=C;exports.FormFieldRoot=j;
2
+ //# sourceMappingURL=form-field-zi8RBlcC.cjs.js.map