@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
@@ -1 +1 @@
1
- {"version":3,"file":"radio-input-eA3VvPwV.es.js","sources":["../../../../node_modules/.pnpm/@react-aria+radio@3.12.2_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@react-aria/radio/dist/utils.mjs","../../../../node_modules/.pnpm/@react-aria+radio@3.12.2_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@react-aria/radio/dist/useRadio.mjs","../../../../node_modules/.pnpm/@react-aria+radio@3.12.2_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@react-aria/radio/dist/useRadioGroup.mjs","../../../../node_modules/.pnpm/@react-stately+radio@3.11.2_react@19.2.0/node_modules/@react-stately/radio/dist/useRadioGroupState.mjs","../../../../node_modules/.pnpm/react-aria-components@1.13.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/dist/RadioGroup.mjs","../../src/components/radio-input/radio-input.slots.tsx","../../src/components/radio-input/components/radio-input.root.tsx","../../src/components/radio-input/components/radio-input.option.tsx","../../src/components/radio-input/radio-input.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ const $884aeceb3d67f00f$export$37b65e5b5444d35c = new WeakMap();\n\n\nexport {$884aeceb3d67f00f$export$37b65e5b5444d35c as radioGroupData};\n//# sourceMappingURL=utils.module.js.map\n","import {radioGroupData as $884aeceb3d67f00f$export$37b65e5b5444d35c} from \"./utils.mjs\";\nimport {mergeProps as $5jJ3f$mergeProps, filterDOMProps as $5jJ3f$filterDOMProps, useFormReset as $5jJ3f$useFormReset} from \"@react-aria/utils\";\nimport {useMemo as $5jJ3f$useMemo} from \"react\";\nimport {usePress as $5jJ3f$usePress, useFocusable as $5jJ3f$useFocusable} from \"@react-aria/interactions\";\nimport {useFormValidation as $5jJ3f$useFormValidation} from \"@react-aria/form\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\n\nfunction $0d5c49892c1215da$export$37b0961d2f4751e2(props, state, ref) {\n let { value: value, children: children, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, onPressStart: onPressStart, onPressEnd: onPressEnd, onPressChange: onPressChange, onPress: onPress, onPressUp: onPressUp, onClick: onClick } = props;\n const isDisabled = props.isDisabled || state.isDisabled;\n let hasChildren = children != null;\n let hasAriaLabel = ariaLabel != null || ariaLabelledby != null;\n if (!hasChildren && !hasAriaLabel && process.env.NODE_ENV !== 'production') console.warn('If you do not provide children, you must specify an aria-label for accessibility');\n let checked = state.selectedValue === value;\n let onChange = (e)=>{\n e.stopPropagation();\n state.setSelectedValue(value);\n };\n // Handle press state for keyboard interactions and cases where labelProps is not used.\n let { pressProps: pressProps, isPressed: isPressed } = (0, $5jJ3f$usePress)({\n onPressStart: onPressStart,\n onPressEnd: onPressEnd,\n onPressChange: onPressChange,\n onPress: onPress,\n onPressUp: onPressUp,\n onClick: onClick,\n isDisabled: isDisabled\n });\n // Handle press state on the label.\n let { pressProps: labelProps, isPressed: isLabelPressed } = (0, $5jJ3f$usePress)({\n onPressStart: onPressStart,\n onPressEnd: onPressEnd,\n onPressChange: onPressChange,\n onPressUp: onPressUp,\n onClick: onClick,\n isDisabled: isDisabled,\n onPress (e) {\n var _ref_current;\n onPress === null || onPress === void 0 ? void 0 : onPress(e);\n state.setSelectedValue(value);\n (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.focus();\n }\n });\n let { focusableProps: focusableProps } = (0, $5jJ3f$useFocusable)((0, $5jJ3f$mergeProps)(props, {\n onFocus: ()=>state.setLastFocusedValue(value)\n }), ref);\n let interactions = (0, $5jJ3f$mergeProps)(pressProps, focusableProps);\n let domProps = (0, $5jJ3f$filterDOMProps)(props, {\n labelable: true\n });\n let tabIndex = -1;\n if (state.selectedValue != null) {\n if (state.selectedValue === value) tabIndex = 0;\n } else if (state.lastFocusedValue === value || state.lastFocusedValue == null) tabIndex = 0;\n if (isDisabled) tabIndex = undefined;\n let { name: name, form: form, descriptionId: descriptionId, errorMessageId: errorMessageId, validationBehavior: validationBehavior } = (0, $884aeceb3d67f00f$export$37b65e5b5444d35c).get(state);\n (0, $5jJ3f$useFormReset)(ref, state.defaultSelectedValue, state.setSelectedValue);\n (0, $5jJ3f$useFormValidation)({\n validationBehavior: validationBehavior\n }, state, ref);\n return {\n labelProps: (0, $5jJ3f$mergeProps)(labelProps, (0, $5jJ3f$useMemo)(()=>({\n onClick: (e)=>e.preventDefault(),\n // Prevent label from being focused when mouse down on it.\n // Note, this does not prevent the input from being focused in the `click` event.\n onMouseDown: (e)=>e.preventDefault()\n }), [])),\n inputProps: (0, $5jJ3f$mergeProps)(domProps, {\n ...interactions,\n type: 'radio',\n name: name,\n form: form,\n tabIndex: tabIndex,\n disabled: isDisabled,\n required: state.isRequired && validationBehavior === 'native',\n checked: checked,\n value: value,\n onChange: onChange,\n 'aria-describedby': [\n props['aria-describedby'],\n state.isInvalid ? errorMessageId : null,\n descriptionId\n ].filter(Boolean).join(' ') || undefined\n }),\n isDisabled: isDisabled,\n isSelected: checked,\n isPressed: isPressed || isLabelPressed\n };\n}\n\n\nexport {$0d5c49892c1215da$export$37b0961d2f4751e2 as useRadio};\n//# sourceMappingURL=useRadio.module.js.map\n","import {radioGroupData as $884aeceb3d67f00f$export$37b65e5b5444d35c} from \"./utils.mjs\";\nimport {filterDOMProps as $czmJy$filterDOMProps, getOwnerWindow as $czmJy$getOwnerWindow, useId as $czmJy$useId, mergeProps as $czmJy$mergeProps} from \"@react-aria/utils\";\nimport {getFocusableTreeWalker as $czmJy$getFocusableTreeWalker} from \"@react-aria/focus\";\nimport {useField as $czmJy$useField} from \"@react-aria/label\";\nimport {useFocusWithin as $czmJy$useFocusWithin} from \"@react-aria/interactions\";\nimport {useLocale as $czmJy$useLocale} from \"@react-aria/i18n\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\n\n\nfunction $430f30ed08ec25fa$export$62b9571f283ff5c2(props, state) {\n let { name: name, form: form, isReadOnly: isReadOnly, isRequired: isRequired, isDisabled: isDisabled, orientation: orientation = 'vertical', validationBehavior: validationBehavior = 'aria' } = props;\n let { direction: direction } = (0, $czmJy$useLocale)();\n let { isInvalid: isInvalid, validationErrors: validationErrors, validationDetails: validationDetails } = state.displayValidation;\n let { labelProps: labelProps, fieldProps: fieldProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps } = (0, $czmJy$useField)({\n ...props,\n // Radio group is not an HTML input element so it\n // shouldn't be labeled by a <label> element.\n labelElementType: 'span',\n isInvalid: state.isInvalid,\n errorMessage: props.errorMessage || validationErrors\n });\n let domProps = (0, $czmJy$filterDOMProps)(props, {\n labelable: true\n });\n // When the radio group loses focus, reset the focusable radio to null if\n // there is no selection. This allows tabbing into the group from either\n // direction to go to the first or last radio.\n let { focusWithinProps: focusWithinProps } = (0, $czmJy$useFocusWithin)({\n onBlurWithin (e) {\n var _props_onBlur;\n (_props_onBlur = props.onBlur) === null || _props_onBlur === void 0 ? void 0 : _props_onBlur.call(props, e);\n if (!state.selectedValue) state.setLastFocusedValue(null);\n },\n onFocusWithin: props.onFocus,\n onFocusWithinChange: props.onFocusChange\n });\n let onKeyDown = (e)=>{\n let nextDir;\n switch(e.key){\n case 'ArrowRight':\n if (direction === 'rtl' && orientation !== 'vertical') nextDir = 'prev';\n else nextDir = 'next';\n break;\n case 'ArrowLeft':\n if (direction === 'rtl' && orientation !== 'vertical') nextDir = 'next';\n else nextDir = 'prev';\n break;\n case 'ArrowDown':\n nextDir = 'next';\n break;\n case 'ArrowUp':\n nextDir = 'prev';\n break;\n default:\n return;\n }\n e.preventDefault();\n let walker = (0, $czmJy$getFocusableTreeWalker)(e.currentTarget, {\n from: e.target,\n accept: (node)=>node instanceof (0, $czmJy$getOwnerWindow)(node).HTMLInputElement && node.type === 'radio'\n });\n let nextElem;\n if (nextDir === 'next') {\n nextElem = walker.nextNode();\n if (!nextElem) {\n walker.currentNode = e.currentTarget;\n nextElem = walker.firstChild();\n }\n } else {\n nextElem = walker.previousNode();\n if (!nextElem) {\n walker.currentNode = e.currentTarget;\n nextElem = walker.lastChild();\n }\n }\n if (nextElem) {\n // Call focus on nextElem so that keyboard navigation scrolls the radio into view\n nextElem.focus();\n state.setSelectedValue(nextElem.value);\n }\n };\n let groupName = (0, $czmJy$useId)(name);\n (0, $884aeceb3d67f00f$export$37b65e5b5444d35c).set(state, {\n name: groupName,\n form: form,\n descriptionId: descriptionProps.id,\n errorMessageId: errorMessageProps.id,\n validationBehavior: validationBehavior\n });\n return {\n radioGroupProps: (0, $czmJy$mergeProps)(domProps, {\n // https://www.w3.org/TR/wai-aria-1.2/#radiogroup\n role: 'radiogroup',\n onKeyDown: onKeyDown,\n 'aria-invalid': state.isInvalid || undefined,\n 'aria-errormessage': props['aria-errormessage'],\n 'aria-readonly': isReadOnly || undefined,\n 'aria-required': isRequired || undefined,\n 'aria-disabled': isDisabled || undefined,\n 'aria-orientation': orientation,\n ...fieldProps,\n ...focusWithinProps\n }),\n labelProps: labelProps,\n descriptionProps: descriptionProps,\n errorMessageProps: errorMessageProps,\n isInvalid: isInvalid,\n validationErrors: validationErrors,\n validationDetails: validationDetails\n };\n}\n\n\nexport {$430f30ed08ec25fa$export$62b9571f283ff5c2 as useRadioGroup};\n//# sourceMappingURL=useRadioGroup.module.js.map\n","import {useFormValidationState as $l55kx$useFormValidationState} from \"@react-stately/form\";\nimport {useControlledState as $l55kx$useControlledState} from \"@react-stately/utils\";\nimport {useMemo as $l55kx$useMemo, useState as $l55kx$useState} from \"react\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\nlet $a54cdc5c1942b639$var$instance = Math.round(Math.random() * 10000000000);\nlet $a54cdc5c1942b639$var$i = 0;\nfunction $a54cdc5c1942b639$export$bca9d026f8e704eb(props) {\n // Preserved here for backward compatibility. React Aria now generates the name instead of stately.\n let name = (0, $l55kx$useMemo)(()=>props.name || `radio-group-${$a54cdc5c1942b639$var$instance}-${++$a54cdc5c1942b639$var$i}`, [\n props.name\n ]);\n var _props_defaultValue;\n let [selectedValue, setSelected] = (0, $l55kx$useControlledState)(props.value, (_props_defaultValue = props.defaultValue) !== null && _props_defaultValue !== void 0 ? _props_defaultValue : null, props.onChange);\n let [initialValue] = (0, $l55kx$useState)(selectedValue);\n let [lastFocusedValue, setLastFocusedValue] = (0, $l55kx$useState)(null);\n let validation = (0, $l55kx$useFormValidationState)({\n ...props,\n value: selectedValue\n });\n let setSelectedValue = (value)=>{\n if (!props.isReadOnly && !props.isDisabled) {\n setSelected(value);\n validation.commitValidation();\n }\n };\n let isInvalid = validation.displayValidation.isInvalid;\n var _props_defaultValue1;\n return {\n ...validation,\n name: name,\n selectedValue: selectedValue,\n defaultSelectedValue: props.value !== undefined ? initialValue : (_props_defaultValue1 = props.defaultValue) !== null && _props_defaultValue1 !== void 0 ? _props_defaultValue1 : null,\n setSelectedValue: setSelectedValue,\n lastFocusedValue: lastFocusedValue,\n setLastFocusedValue: setLastFocusedValue,\n isDisabled: props.isDisabled || false,\n isReadOnly: props.isReadOnly || false,\n isRequired: props.isRequired || false,\n validationState: props.validationState || (isInvalid ? 'invalid' : null),\n isInvalid: isInvalid\n };\n}\n\n\nexport {$a54cdc5c1942b639$export$bca9d026f8e704eb as useRadioGroupState};\n//# sourceMappingURL=useRadioGroupState.module.js.map\n","import {Provider as $64fa3d84918910a7$export$2881499e37b75b9a, removeDataAttributes as $64fa3d84918910a7$export$ef03459518577ad4, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3, useSlot as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, useSlottedContext as $64fa3d84918910a7$export$fabf2dc03a41866e} from \"./utils.mjs\";\nimport {FieldErrorContext as $ee014567cb39d3f0$export$ff05c3ac10437e03} from \"./FieldError.mjs\";\nimport {FormContext as $d3e0e05bdfcf66bd$export$c24727297075ec6a} from \"./Form.mjs\";\nimport {LabelContext as $01b77f81d0f07f68$export$75b6ee27786ba447} from \"./Label.mjs\";\nimport {SelectionIndicatorContext as $1d5b8b8664671ef2$export$c9549807523555e0} from \"./SelectionIndicator.mjs\";\nimport {SharedElementTransition as $c8a5a149f625efcf$export$758399f318e6385a} from \"./SharedElementTransition.mjs\";\nimport {TextContext as $514c0188e459b4c0$export$9afb8bc826b033ea} from \"./Text.mjs\";\nimport {useRadioGroup as $3sixo$useRadioGroup, useRadio as $3sixo$useRadio, useFocusRing as $3sixo$useFocusRing, useHover as $3sixo$useHover, VisuallyHidden as $3sixo$VisuallyHidden} from \"react-aria\";\nimport {filterDOMProps as $3sixo$filterDOMProps, mergeProps as $3sixo$mergeProps, useObjectRef as $3sixo$useObjectRef, mergeRefs as $3sixo$mergeRefs} from \"@react-aria/utils\";\nimport {useRadioGroupState as $3sixo$useRadioGroupState} from \"react-stately\";\nimport $3sixo$react, {createContext as $3sixo$createContext, forwardRef as $3sixo$forwardRef, useMemo as $3sixo$useMemo} from \"react\";\n\n/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\n\n\n\n\n\n\n\nconst $b6c3ddc6086f204d$export$a79eda4ff50e30b6 = /*#__PURE__*/ (0, $3sixo$createContext)(null);\nconst $b6c3ddc6086f204d$export$b118023277d4a5c3 = /*#__PURE__*/ (0, $3sixo$createContext)(null);\nconst $b6c3ddc6086f204d$export$29d84393af70866c = /*#__PURE__*/ (0, $3sixo$createContext)(null);\nconst $b6c3ddc6086f204d$export$a98f0dcb43a68a25 = /*#__PURE__*/ (0, $3sixo$forwardRef)(function RadioGroup(props, ref) {\n [props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $b6c3ddc6086f204d$export$a79eda4ff50e30b6);\n let { validationBehavior: formValidationBehavior } = (0, $64fa3d84918910a7$export$fabf2dc03a41866e)((0, $d3e0e05bdfcf66bd$export$c24727297075ec6a)) || {};\n var _props_validationBehavior, _ref;\n let validationBehavior = (_ref = (_props_validationBehavior = props.validationBehavior) !== null && _props_validationBehavior !== void 0 ? _props_validationBehavior : formValidationBehavior) !== null && _ref !== void 0 ? _ref : 'native';\n let state = (0, $3sixo$useRadioGroupState)({\n ...props,\n validationBehavior: validationBehavior\n });\n let [labelRef, label] = (0, $64fa3d84918910a7$export$9d4c57ee4c6ffdd8)(!props['aria-label'] && !props['aria-labelledby']);\n let { radioGroupProps: radioGroupProps, labelProps: labelProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps, ...validation } = (0, $3sixo$useRadioGroup)({\n ...props,\n label: label,\n validationBehavior: validationBehavior\n }, state);\n let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({\n ...props,\n values: {\n orientation: props.orientation || 'vertical',\n isDisabled: state.isDisabled,\n isReadOnly: state.isReadOnly,\n isRequired: state.isRequired,\n isInvalid: state.isInvalid,\n state: state\n },\n defaultClassName: 'react-aria-RadioGroup'\n });\n let DOMProps = (0, $3sixo$filterDOMProps)(props, {\n global: true\n });\n return /*#__PURE__*/ (0, $3sixo$react).createElement(\"div\", {\n ...(0, $3sixo$mergeProps)(DOMProps, renderProps, radioGroupProps),\n ref: ref,\n slot: props.slot || undefined,\n \"data-orientation\": props.orientation || 'vertical',\n \"data-invalid\": state.isInvalid || undefined,\n \"data-disabled\": state.isDisabled || undefined,\n \"data-readonly\": state.isReadOnly || undefined,\n \"data-required\": state.isRequired || undefined\n }, /*#__PURE__*/ (0, $3sixo$react).createElement((0, $64fa3d84918910a7$export$2881499e37b75b9a), {\n values: [\n [\n $b6c3ddc6086f204d$export$29d84393af70866c,\n state\n ],\n [\n (0, $01b77f81d0f07f68$export$75b6ee27786ba447),\n {\n ...labelProps,\n ref: labelRef,\n elementType: 'span'\n }\n ],\n [\n (0, $514c0188e459b4c0$export$9afb8bc826b033ea),\n {\n slots: {\n description: descriptionProps,\n errorMessage: errorMessageProps\n }\n }\n ],\n [\n (0, $ee014567cb39d3f0$export$ff05c3ac10437e03),\n validation\n ]\n ]\n }, /*#__PURE__*/ (0, $3sixo$react).createElement((0, $c8a5a149f625efcf$export$758399f318e6385a), null, renderProps.children)));\n});\nconst $b6c3ddc6086f204d$export$d7b12c4107be0d61 = /*#__PURE__*/ (0, $3sixo$forwardRef)(function Radio(props, ref) {\n let { inputRef: userProvidedInputRef = null, ...otherProps } = props;\n [props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(otherProps, ref, $b6c3ddc6086f204d$export$b118023277d4a5c3);\n let state = (0, $3sixo$react).useContext($b6c3ddc6086f204d$export$29d84393af70866c);\n let inputRef = (0, $3sixo$useObjectRef)((0, $3sixo$useMemo)(()=>(0, $3sixo$mergeRefs)(userProvidedInputRef, props.inputRef !== undefined ? props.inputRef : null), [\n userProvidedInputRef,\n props.inputRef\n ]));\n let { labelProps: labelProps, inputProps: inputProps, isSelected: isSelected, isDisabled: isDisabled, isPressed: isPressed } = (0, $3sixo$useRadio)({\n ...(0, $64fa3d84918910a7$export$ef03459518577ad4)(props),\n // ReactNode type doesn't allow function children.\n children: typeof props.children === 'function' ? true : props.children\n }, state, inputRef);\n let { isFocused: isFocused, isFocusVisible: isFocusVisible, focusProps: focusProps } = (0, $3sixo$useFocusRing)();\n let interactionDisabled = isDisabled || state.isReadOnly;\n let { hoverProps: hoverProps, isHovered: isHovered } = (0, $3sixo$useHover)({\n ...props,\n isDisabled: interactionDisabled\n });\n let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({\n ...props,\n defaultClassName: 'react-aria-Radio',\n values: {\n isSelected: isSelected,\n isPressed: isPressed,\n isHovered: isHovered,\n isFocused: isFocused,\n isFocusVisible: isFocusVisible,\n isDisabled: isDisabled,\n isReadOnly: state.isReadOnly,\n isInvalid: state.isInvalid,\n isRequired: state.isRequired\n }\n });\n let DOMProps = (0, $3sixo$filterDOMProps)(props, {\n global: true\n });\n delete DOMProps.id;\n delete DOMProps.onClick;\n return /*#__PURE__*/ (0, $3sixo$react).createElement(\"label\", {\n ...(0, $3sixo$mergeProps)(DOMProps, labelProps, hoverProps, renderProps),\n ref: ref,\n \"data-selected\": isSelected || undefined,\n \"data-pressed\": isPressed || undefined,\n \"data-hovered\": isHovered || undefined,\n \"data-focused\": isFocused || undefined,\n \"data-focus-visible\": isFocusVisible || undefined,\n \"data-disabled\": isDisabled || undefined,\n \"data-readonly\": state.isReadOnly || undefined,\n \"data-invalid\": state.isInvalid || undefined,\n \"data-required\": state.isRequired || undefined\n }, /*#__PURE__*/ (0, $3sixo$react).createElement((0, $3sixo$VisuallyHidden), {\n elementType: \"span\"\n }, /*#__PURE__*/ (0, $3sixo$react).createElement(\"input\", {\n ...(0, $3sixo$mergeProps)(inputProps, focusProps),\n ref: inputRef\n })), /*#__PURE__*/ (0, $3sixo$react).createElement((0, $1d5b8b8664671ef2$export$c9549807523555e0).Provider, {\n value: {\n isSelected: isSelected\n }\n }, renderProps.children));\n});\n\n\nexport {$b6c3ddc6086f204d$export$a79eda4ff50e30b6 as RadioGroupContext, $b6c3ddc6086f204d$export$b118023277d4a5c3 as RadioContext, $b6c3ddc6086f204d$export$29d84393af70866c as RadioGroupStateContext, $b6c3ddc6086f204d$export$a98f0dcb43a68a25 as RadioGroup, $b6c3ddc6086f204d$export$d7b12c4107be0d61 as Radio};\n//# sourceMappingURL=RadioGroup.module.js.map\n","import { createSlotRecipeContext } from \"@chakra-ui/react\";\nimport type {\n RadioInputOptionSlotProps,\n RadioInputRootSlotProps,\n} from \"./radio-input.types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"radioInput\",\n});\n\nexport const RadioInputRootSlot = withProvider<\n HTMLDivElement,\n RadioInputRootSlotProps\n>(\"div\", \"root\");\n\nexport const RadioInputOptionSlot = withContext<\n HTMLSpanElement,\n RadioInputOptionSlotProps\n>(\"span\", \"option\");\n","import { useSlotRecipe } from \"@chakra-ui/react/styled-system\";\nimport { radioInputSlotRecipe } from \"../radio-input.recipe\";\nimport { RadioGroup as RaRadioGroup } from \"react-aria-components\";\nimport { extractStyleProps } from \"@/utils\";\nimport type { RadioInputRootProps } from \"../radio-input.types\";\nimport { RadioInputRootSlot } from \"../radio-input.slots\";\n\n/**\n * # RadioInput\n *\n * A set of closely related, mutually exclusive or complementary actions that are important enough to be displayed directly in the interface for quick access.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/radio-input}\n */\nexport const RadioInputRoot = (props: RadioInputRootProps) => {\n const recipe = useSlotRecipe({ recipe: radioInputSlotRecipe });\n const [recipeProps, restRecipeProps] = recipe.splitVariantProps(props);\n const [styleProps, restProps] = extractStyleProps(restRecipeProps);\n\n return (\n <RadioInputRootSlot {...recipeProps} {...styleProps} asChild>\n <RaRadioGroup {...restProps}>{props.children}</RaRadioGroup>\n </RadioInputRootSlot>\n );\n};\n\nRadioInputRoot.displayName = \"RadioInputRoot\";\n","import { Radio as RaRadio } from \"react-aria-components\";\nimport {\n RadioButtonChecked,\n RadioButtonUnchecked,\n} from \"@commercetools/nimbus-icons\";\nimport { extractStyleProps } from \"@/utils\";\nimport type { RadioInputOptionProps } from \"../radio-input.types\";\nimport { RadioInputOptionSlot } from \"../radio-input.slots\";\nimport { useFocusRing } from \"react-aria\";\n\nexport const RadioInputOption = ({\n children,\n value,\n ...rest\n}: RadioInputOptionProps) => {\n const [styleProps, restProps] = extractStyleProps(rest);\n const { isFocused, focusProps } = useFocusRing();\n\n return (\n <RadioInputOptionSlot\n {...styleProps}\n {...focusProps}\n data-focus={isFocused || undefined}\n asChild\n >\n <RaRadio value={value} {...restProps}>\n {(renderProps) => {\n const content =\n typeof children === \"function\"\n ? children({\n ...renderProps,\n })\n : children;\n return (\n <>\n {renderProps.isSelected ? (\n <RadioButtonChecked />\n ) : (\n <RadioButtonUnchecked />\n )}\n {content}\n </>\n );\n }}\n </RaRadio>\n </RadioInputOptionSlot>\n );\n};\n\nRadioInputOption.displayName = \"RadioInputOption\";\n","import { RadioInputRoot as _RadioInputRoot } from \"./components/radio-input.root\";\nimport { RadioInputOption as _RadioInputOption } from \"./components/radio-input.option\";\n\nexport const RadioInput = {\n Root: _RadioInputRoot,\n Option: _RadioInputOption,\n};\n\nexport { _RadioInputRoot, _RadioInputOption };\n"],"names":["$884aeceb3d67f00f$export$37b65e5b5444d35c","$0d5c49892c1215da$export$37b0961d2f4751e2","props","state","ref","value","children","ariaLabel","ariaLabelledby","onPressStart","onPressEnd","onPressChange","onPress","onPressUp","onClick","isDisabled","hasChildren","hasAriaLabel","checked","onChange","e","pressProps","isPressed","$5jJ3f$usePress","labelProps","isLabelPressed","_ref_current","focusableProps","$5jJ3f$useFocusable","$5jJ3f$mergeProps","interactions","domProps","$5jJ3f$filterDOMProps","tabIndex","name","form","descriptionId","errorMessageId","validationBehavior","$5jJ3f$useFormReset","$5jJ3f$useFormValidation","$5jJ3f$useMemo","$430f30ed08ec25fa$export$62b9571f283ff5c2","isReadOnly","isRequired","orientation","direction","$czmJy$useLocale","isInvalid","validationErrors","validationDetails","fieldProps","descriptionProps","errorMessageProps","$czmJy$useField","$czmJy$filterDOMProps","focusWithinProps","$czmJy$useFocusWithin","_props_onBlur","onKeyDown","nextDir","walker","$czmJy$getFocusableTreeWalker","node","$czmJy$getOwnerWindow","nextElem","groupName","$czmJy$useId","$czmJy$mergeProps","$a54cdc5c1942b639$var$instance","$a54cdc5c1942b639$var$i","$a54cdc5c1942b639$export$bca9d026f8e704eb","$l55kx$useMemo","_props_defaultValue","selectedValue","setSelected","$l55kx$useControlledState","initialValue","$l55kx$useState","lastFocusedValue","setLastFocusedValue","validation","$l55kx$useFormValidationState","setSelectedValue","_props_defaultValue1","$b6c3ddc6086f204d$export$a79eda4ff50e30b6","$3sixo$createContext","$b6c3ddc6086f204d$export$b118023277d4a5c3","$b6c3ddc6086f204d$export$29d84393af70866c","$b6c3ddc6086f204d$export$a98f0dcb43a68a25","$3sixo$forwardRef","$64fa3d84918910a7$export$29f1550f4b0d4415","formValidationBehavior","$64fa3d84918910a7$export$fabf2dc03a41866e","$d3e0e05bdfcf66bd$export$c24727297075ec6a","_props_validationBehavior","_ref","$3sixo$useRadioGroupState","labelRef","label","$64fa3d84918910a7$export$9d4c57ee4c6ffdd8","radioGroupProps","$3sixo$useRadioGroup","renderProps","$64fa3d84918910a7$export$4d86445c2cf5e3","DOMProps","$3sixo$filterDOMProps","$3sixo$react","$3sixo$mergeProps","$64fa3d84918910a7$export$2881499e37b75b9a","$01b77f81d0f07f68$export$75b6ee27786ba447","$514c0188e459b4c0$export$9afb8bc826b033ea","$ee014567cb39d3f0$export$ff05c3ac10437e03","$c8a5a149f625efcf$export$758399f318e6385a","$b6c3ddc6086f204d$export$d7b12c4107be0d61","userProvidedInputRef","otherProps","inputRef","$3sixo$useObjectRef","$3sixo$useMemo","$3sixo$mergeRefs","inputProps","isSelected","$3sixo$useRadio","$64fa3d84918910a7$export$ef03459518577ad4","isFocused","isFocusVisible","focusProps","$3sixo$useFocusRing","interactionDisabled","hoverProps","isHovered","$3sixo$useHover","$3sixo$VisuallyHidden","$1d5b8b8664671ef2$export$c9549807523555e0","withProvider","withContext","createSlotRecipeContext","RadioInputRootSlot","RadioInputOptionSlot","RadioInputRoot","recipe","useSlotRecipe","radioInputSlotRecipe","recipeProps","restRecipeProps","styleProps","restProps","extractStyleProps","jsx","RaRadioGroup","RadioInputOption","rest","useFocusRing","RaRadio","content","jsxs","Fragment","RadioButtonChecked","RadioButtonUnchecked","RadioInput","_RadioInputRoot","_RadioInputOption"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUI,MAAMA,IAA4C,oBAAI,QAAO;ACWjE,SAASC,GAA0CC,GAAOC,GAAOC,GAAK;AAClE,MAAI,EAAE,OAAOC,GAAO,UAAUC,GAAU,cAAcC,GAAW,mBAAmBC,GAAgB,cAAcC,GAAc,YAAYC,GAAY,eAAeC,GAAe,SAASC,GAAS,WAAWC,GAAW,SAASC,EAAO,IA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3,4]}
1
+ {"version":3,"file":"radio-input-Celcqnqn.es.js","sources":["../../../../node_modules/.pnpm/@react-aria+radio@3.12.2_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@react-aria/radio/dist/utils.mjs","../../../../node_modules/.pnpm/@react-aria+radio@3.12.2_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@react-aria/radio/dist/useRadio.mjs","../../../../node_modules/.pnpm/@react-aria+radio@3.12.2_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@react-aria/radio/dist/useRadioGroup.mjs","../../../../node_modules/.pnpm/@react-stately+radio@3.11.2_react@19.2.0/node_modules/@react-stately/radio/dist/useRadioGroupState.mjs","../../../../node_modules/.pnpm/react-aria-components@1.13.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/react-aria-components/dist/RadioGroup.mjs","../../src/components/radio-input/radio-input.slots.tsx","../../src/components/radio-input/components/radio-input.root.tsx","../../src/components/radio-input/components/radio-input.option.tsx","../../src/components/radio-input/radio-input.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ const $884aeceb3d67f00f$export$37b65e5b5444d35c = new WeakMap();\n\n\nexport {$884aeceb3d67f00f$export$37b65e5b5444d35c as radioGroupData};\n//# sourceMappingURL=utils.module.js.map\n","import {radioGroupData as $884aeceb3d67f00f$export$37b65e5b5444d35c} from \"./utils.mjs\";\nimport {mergeProps as $5jJ3f$mergeProps, filterDOMProps as $5jJ3f$filterDOMProps, useFormReset as $5jJ3f$useFormReset} from \"@react-aria/utils\";\nimport {useMemo as $5jJ3f$useMemo} from \"react\";\nimport {usePress as $5jJ3f$usePress, useFocusable as $5jJ3f$useFocusable} from \"@react-aria/interactions\";\nimport {useFormValidation as $5jJ3f$useFormValidation} from \"@react-aria/form\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\n\nfunction $0d5c49892c1215da$export$37b0961d2f4751e2(props, state, ref) {\n let { value: value, children: children, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, onPressStart: onPressStart, onPressEnd: onPressEnd, onPressChange: onPressChange, onPress: onPress, onPressUp: onPressUp, onClick: onClick } = props;\n const isDisabled = props.isDisabled || state.isDisabled;\n let hasChildren = children != null;\n let hasAriaLabel = ariaLabel != null || ariaLabelledby != null;\n if (!hasChildren && !hasAriaLabel && process.env.NODE_ENV !== 'production') console.warn('If you do not provide children, you must specify an aria-label for accessibility');\n let checked = state.selectedValue === value;\n let onChange = (e)=>{\n e.stopPropagation();\n state.setSelectedValue(value);\n };\n // Handle press state for keyboard interactions and cases where labelProps is not used.\n let { pressProps: pressProps, isPressed: isPressed } = (0, $5jJ3f$usePress)({\n onPressStart: onPressStart,\n onPressEnd: onPressEnd,\n onPressChange: onPressChange,\n onPress: onPress,\n onPressUp: onPressUp,\n onClick: onClick,\n isDisabled: isDisabled\n });\n // Handle press state on the label.\n let { pressProps: labelProps, isPressed: isLabelPressed } = (0, $5jJ3f$usePress)({\n onPressStart: onPressStart,\n onPressEnd: onPressEnd,\n onPressChange: onPressChange,\n onPressUp: onPressUp,\n onClick: onClick,\n isDisabled: isDisabled,\n onPress (e) {\n var _ref_current;\n onPress === null || onPress === void 0 ? void 0 : onPress(e);\n state.setSelectedValue(value);\n (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.focus();\n }\n });\n let { focusableProps: focusableProps } = (0, $5jJ3f$useFocusable)((0, $5jJ3f$mergeProps)(props, {\n onFocus: ()=>state.setLastFocusedValue(value)\n }), ref);\n let interactions = (0, $5jJ3f$mergeProps)(pressProps, focusableProps);\n let domProps = (0, $5jJ3f$filterDOMProps)(props, {\n labelable: true\n });\n let tabIndex = -1;\n if (state.selectedValue != null) {\n if (state.selectedValue === value) tabIndex = 0;\n } else if (state.lastFocusedValue === value || state.lastFocusedValue == null) tabIndex = 0;\n if (isDisabled) tabIndex = undefined;\n let { name: name, form: form, descriptionId: descriptionId, errorMessageId: errorMessageId, validationBehavior: validationBehavior } = (0, $884aeceb3d67f00f$export$37b65e5b5444d35c).get(state);\n (0, $5jJ3f$useFormReset)(ref, state.defaultSelectedValue, state.setSelectedValue);\n (0, $5jJ3f$useFormValidation)({\n validationBehavior: validationBehavior\n }, state, ref);\n return {\n labelProps: (0, $5jJ3f$mergeProps)(labelProps, (0, $5jJ3f$useMemo)(()=>({\n onClick: (e)=>e.preventDefault(),\n // Prevent label from being focused when mouse down on it.\n // Note, this does not prevent the input from being focused in the `click` event.\n onMouseDown: (e)=>e.preventDefault()\n }), [])),\n inputProps: (0, $5jJ3f$mergeProps)(domProps, {\n ...interactions,\n type: 'radio',\n name: name,\n form: form,\n tabIndex: tabIndex,\n disabled: isDisabled,\n required: state.isRequired && validationBehavior === 'native',\n checked: checked,\n value: value,\n onChange: onChange,\n 'aria-describedby': [\n props['aria-describedby'],\n state.isInvalid ? errorMessageId : null,\n descriptionId\n ].filter(Boolean).join(' ') || undefined\n }),\n isDisabled: isDisabled,\n isSelected: checked,\n isPressed: isPressed || isLabelPressed\n };\n}\n\n\nexport {$0d5c49892c1215da$export$37b0961d2f4751e2 as useRadio};\n//# sourceMappingURL=useRadio.module.js.map\n","import {radioGroupData as $884aeceb3d67f00f$export$37b65e5b5444d35c} from \"./utils.mjs\";\nimport {filterDOMProps as $czmJy$filterDOMProps, getOwnerWindow as $czmJy$getOwnerWindow, useId as $czmJy$useId, mergeProps as $czmJy$mergeProps} from \"@react-aria/utils\";\nimport {getFocusableTreeWalker as $czmJy$getFocusableTreeWalker} from \"@react-aria/focus\";\nimport {useField as $czmJy$useField} from \"@react-aria/label\";\nimport {useFocusWithin as $czmJy$useFocusWithin} from \"@react-aria/interactions\";\nimport {useLocale as $czmJy$useLocale} from \"@react-aria/i18n\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\n\n\nfunction $430f30ed08ec25fa$export$62b9571f283ff5c2(props, state) {\n let { name: name, form: form, isReadOnly: isReadOnly, isRequired: isRequired, isDisabled: isDisabled, orientation: orientation = 'vertical', validationBehavior: validationBehavior = 'aria' } = props;\n let { direction: direction } = (0, $czmJy$useLocale)();\n let { isInvalid: isInvalid, validationErrors: validationErrors, validationDetails: validationDetails } = state.displayValidation;\n let { labelProps: labelProps, fieldProps: fieldProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps } = (0, $czmJy$useField)({\n ...props,\n // Radio group is not an HTML input element so it\n // shouldn't be labeled by a <label> element.\n labelElementType: 'span',\n isInvalid: state.isInvalid,\n errorMessage: props.errorMessage || validationErrors\n });\n let domProps = (0, $czmJy$filterDOMProps)(props, {\n labelable: true\n });\n // When the radio group loses focus, reset the focusable radio to null if\n // there is no selection. This allows tabbing into the group from either\n // direction to go to the first or last radio.\n let { focusWithinProps: focusWithinProps } = (0, $czmJy$useFocusWithin)({\n onBlurWithin (e) {\n var _props_onBlur;\n (_props_onBlur = props.onBlur) === null || _props_onBlur === void 0 ? void 0 : _props_onBlur.call(props, e);\n if (!state.selectedValue) state.setLastFocusedValue(null);\n },\n onFocusWithin: props.onFocus,\n onFocusWithinChange: props.onFocusChange\n });\n let onKeyDown = (e)=>{\n let nextDir;\n switch(e.key){\n case 'ArrowRight':\n if (direction === 'rtl' && orientation !== 'vertical') nextDir = 'prev';\n else nextDir = 'next';\n break;\n case 'ArrowLeft':\n if (direction === 'rtl' && orientation !== 'vertical') nextDir = 'next';\n else nextDir = 'prev';\n break;\n case 'ArrowDown':\n nextDir = 'next';\n break;\n case 'ArrowUp':\n nextDir = 'prev';\n break;\n default:\n return;\n }\n e.preventDefault();\n let walker = (0, $czmJy$getFocusableTreeWalker)(e.currentTarget, {\n from: e.target,\n accept: (node)=>node instanceof (0, $czmJy$getOwnerWindow)(node).HTMLInputElement && node.type === 'radio'\n });\n let nextElem;\n if (nextDir === 'next') {\n nextElem = walker.nextNode();\n if (!nextElem) {\n walker.currentNode = e.currentTarget;\n nextElem = walker.firstChild();\n }\n } else {\n nextElem = walker.previousNode();\n if (!nextElem) {\n walker.currentNode = e.currentTarget;\n nextElem = walker.lastChild();\n }\n }\n if (nextElem) {\n // Call focus on nextElem so that keyboard navigation scrolls the radio into view\n nextElem.focus();\n state.setSelectedValue(nextElem.value);\n }\n };\n let groupName = (0, $czmJy$useId)(name);\n (0, $884aeceb3d67f00f$export$37b65e5b5444d35c).set(state, {\n name: groupName,\n form: form,\n descriptionId: descriptionProps.id,\n errorMessageId: errorMessageProps.id,\n validationBehavior: validationBehavior\n });\n return {\n radioGroupProps: (0, $czmJy$mergeProps)(domProps, {\n // https://www.w3.org/TR/wai-aria-1.2/#radiogroup\n role: 'radiogroup',\n onKeyDown: onKeyDown,\n 'aria-invalid': state.isInvalid || undefined,\n 'aria-errormessage': props['aria-errormessage'],\n 'aria-readonly': isReadOnly || undefined,\n 'aria-required': isRequired || undefined,\n 'aria-disabled': isDisabled || undefined,\n 'aria-orientation': orientation,\n ...fieldProps,\n ...focusWithinProps\n }),\n labelProps: labelProps,\n descriptionProps: descriptionProps,\n errorMessageProps: errorMessageProps,\n isInvalid: isInvalid,\n validationErrors: validationErrors,\n validationDetails: validationDetails\n };\n}\n\n\nexport {$430f30ed08ec25fa$export$62b9571f283ff5c2 as useRadioGroup};\n//# sourceMappingURL=useRadioGroup.module.js.map\n","import {useFormValidationState as $l55kx$useFormValidationState} from \"@react-stately/form\";\nimport {useControlledState as $l55kx$useControlledState} from \"@react-stately/utils\";\nimport {useMemo as $l55kx$useMemo, useState as $l55kx$useState} from \"react\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\nlet $a54cdc5c1942b639$var$instance = Math.round(Math.random() * 10000000000);\nlet $a54cdc5c1942b639$var$i = 0;\nfunction $a54cdc5c1942b639$export$bca9d026f8e704eb(props) {\n // Preserved here for backward compatibility. React Aria now generates the name instead of stately.\n let name = (0, $l55kx$useMemo)(()=>props.name || `radio-group-${$a54cdc5c1942b639$var$instance}-${++$a54cdc5c1942b639$var$i}`, [\n props.name\n ]);\n var _props_defaultValue;\n let [selectedValue, setSelected] = (0, $l55kx$useControlledState)(props.value, (_props_defaultValue = props.defaultValue) !== null && _props_defaultValue !== void 0 ? _props_defaultValue : null, props.onChange);\n let [initialValue] = (0, $l55kx$useState)(selectedValue);\n let [lastFocusedValue, setLastFocusedValue] = (0, $l55kx$useState)(null);\n let validation = (0, $l55kx$useFormValidationState)({\n ...props,\n value: selectedValue\n });\n let setSelectedValue = (value)=>{\n if (!props.isReadOnly && !props.isDisabled) {\n setSelected(value);\n validation.commitValidation();\n }\n };\n let isInvalid = validation.displayValidation.isInvalid;\n var _props_defaultValue1;\n return {\n ...validation,\n name: name,\n selectedValue: selectedValue,\n defaultSelectedValue: props.value !== undefined ? initialValue : (_props_defaultValue1 = props.defaultValue) !== null && _props_defaultValue1 !== void 0 ? _props_defaultValue1 : null,\n setSelectedValue: setSelectedValue,\n lastFocusedValue: lastFocusedValue,\n setLastFocusedValue: setLastFocusedValue,\n isDisabled: props.isDisabled || false,\n isReadOnly: props.isReadOnly || false,\n isRequired: props.isRequired || false,\n validationState: props.validationState || (isInvalid ? 'invalid' : null),\n isInvalid: isInvalid\n };\n}\n\n\nexport {$a54cdc5c1942b639$export$bca9d026f8e704eb as useRadioGroupState};\n//# sourceMappingURL=useRadioGroupState.module.js.map\n","import {Provider as $64fa3d84918910a7$export$2881499e37b75b9a, removeDataAttributes as $64fa3d84918910a7$export$ef03459518577ad4, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3, useSlot as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, useSlottedContext as $64fa3d84918910a7$export$fabf2dc03a41866e} from \"./utils.mjs\";\nimport {FieldErrorContext as $ee014567cb39d3f0$export$ff05c3ac10437e03} from \"./FieldError.mjs\";\nimport {FormContext as $d3e0e05bdfcf66bd$export$c24727297075ec6a} from \"./Form.mjs\";\nimport {LabelContext as $01b77f81d0f07f68$export$75b6ee27786ba447} from \"./Label.mjs\";\nimport {SelectionIndicatorContext as $1d5b8b8664671ef2$export$c9549807523555e0} from \"./SelectionIndicator.mjs\";\nimport {SharedElementTransition as $c8a5a149f625efcf$export$758399f318e6385a} from \"./SharedElementTransition.mjs\";\nimport {TextContext as $514c0188e459b4c0$export$9afb8bc826b033ea} from \"./Text.mjs\";\nimport {useRadioGroup as $3sixo$useRadioGroup, useRadio as $3sixo$useRadio, useFocusRing as $3sixo$useFocusRing, useHover as $3sixo$useHover, VisuallyHidden as $3sixo$VisuallyHidden} from \"react-aria\";\nimport {filterDOMProps as $3sixo$filterDOMProps, mergeProps as $3sixo$mergeProps, useObjectRef as $3sixo$useObjectRef, mergeRefs as $3sixo$mergeRefs} from \"@react-aria/utils\";\nimport {useRadioGroupState as $3sixo$useRadioGroupState} from \"react-stately\";\nimport $3sixo$react, {createContext as $3sixo$createContext, forwardRef as $3sixo$forwardRef, useMemo as $3sixo$useMemo} from \"react\";\n\n/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\n\n\n\n\n\n\n\nconst $b6c3ddc6086f204d$export$a79eda4ff50e30b6 = /*#__PURE__*/ (0, $3sixo$createContext)(null);\nconst $b6c3ddc6086f204d$export$b118023277d4a5c3 = /*#__PURE__*/ (0, $3sixo$createContext)(null);\nconst $b6c3ddc6086f204d$export$29d84393af70866c = /*#__PURE__*/ (0, $3sixo$createContext)(null);\nconst $b6c3ddc6086f204d$export$a98f0dcb43a68a25 = /*#__PURE__*/ (0, $3sixo$forwardRef)(function RadioGroup(props, ref) {\n [props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $b6c3ddc6086f204d$export$a79eda4ff50e30b6);\n let { validationBehavior: formValidationBehavior } = (0, $64fa3d84918910a7$export$fabf2dc03a41866e)((0, $d3e0e05bdfcf66bd$export$c24727297075ec6a)) || {};\n var _props_validationBehavior, _ref;\n let validationBehavior = (_ref = (_props_validationBehavior = props.validationBehavior) !== null && _props_validationBehavior !== void 0 ? _props_validationBehavior : formValidationBehavior) !== null && _ref !== void 0 ? _ref : 'native';\n let state = (0, $3sixo$useRadioGroupState)({\n ...props,\n validationBehavior: validationBehavior\n });\n let [labelRef, label] = (0, $64fa3d84918910a7$export$9d4c57ee4c6ffdd8)(!props['aria-label'] && !props['aria-labelledby']);\n let { radioGroupProps: radioGroupProps, labelProps: labelProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps, ...validation } = (0, $3sixo$useRadioGroup)({\n ...props,\n label: label,\n validationBehavior: validationBehavior\n }, state);\n let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({\n ...props,\n values: {\n orientation: props.orientation || 'vertical',\n isDisabled: state.isDisabled,\n isReadOnly: state.isReadOnly,\n isRequired: state.isRequired,\n isInvalid: state.isInvalid,\n state: state\n },\n defaultClassName: 'react-aria-RadioGroup'\n });\n let DOMProps = (0, $3sixo$filterDOMProps)(props, {\n global: true\n });\n return /*#__PURE__*/ (0, $3sixo$react).createElement(\"div\", {\n ...(0, $3sixo$mergeProps)(DOMProps, renderProps, radioGroupProps),\n ref: ref,\n slot: props.slot || undefined,\n \"data-orientation\": props.orientation || 'vertical',\n \"data-invalid\": state.isInvalid || undefined,\n \"data-disabled\": state.isDisabled || undefined,\n \"data-readonly\": state.isReadOnly || undefined,\n \"data-required\": state.isRequired || undefined\n }, /*#__PURE__*/ (0, $3sixo$react).createElement((0, $64fa3d84918910a7$export$2881499e37b75b9a), {\n values: [\n [\n $b6c3ddc6086f204d$export$29d84393af70866c,\n state\n ],\n [\n (0, $01b77f81d0f07f68$export$75b6ee27786ba447),\n {\n ...labelProps,\n ref: labelRef,\n elementType: 'span'\n }\n ],\n [\n (0, $514c0188e459b4c0$export$9afb8bc826b033ea),\n {\n slots: {\n description: descriptionProps,\n errorMessage: errorMessageProps\n }\n }\n ],\n [\n (0, $ee014567cb39d3f0$export$ff05c3ac10437e03),\n validation\n ]\n ]\n }, /*#__PURE__*/ (0, $3sixo$react).createElement((0, $c8a5a149f625efcf$export$758399f318e6385a), null, renderProps.children)));\n});\nconst $b6c3ddc6086f204d$export$d7b12c4107be0d61 = /*#__PURE__*/ (0, $3sixo$forwardRef)(function Radio(props, ref) {\n let { inputRef: userProvidedInputRef = null, ...otherProps } = props;\n [props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(otherProps, ref, $b6c3ddc6086f204d$export$b118023277d4a5c3);\n let state = (0, $3sixo$react).useContext($b6c3ddc6086f204d$export$29d84393af70866c);\n let inputRef = (0, $3sixo$useObjectRef)((0, $3sixo$useMemo)(()=>(0, $3sixo$mergeRefs)(userProvidedInputRef, props.inputRef !== undefined ? props.inputRef : null), [\n userProvidedInputRef,\n props.inputRef\n ]));\n let { labelProps: labelProps, inputProps: inputProps, isSelected: isSelected, isDisabled: isDisabled, isPressed: isPressed } = (0, $3sixo$useRadio)({\n ...(0, $64fa3d84918910a7$export$ef03459518577ad4)(props),\n // ReactNode type doesn't allow function children.\n children: typeof props.children === 'function' ? true : props.children\n }, state, inputRef);\n let { isFocused: isFocused, isFocusVisible: isFocusVisible, focusProps: focusProps } = (0, $3sixo$useFocusRing)();\n let interactionDisabled = isDisabled || state.isReadOnly;\n let { hoverProps: hoverProps, isHovered: isHovered } = (0, $3sixo$useHover)({\n ...props,\n isDisabled: interactionDisabled\n });\n let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({\n ...props,\n defaultClassName: 'react-aria-Radio',\n values: {\n isSelected: isSelected,\n isPressed: isPressed,\n isHovered: isHovered,\n isFocused: isFocused,\n isFocusVisible: isFocusVisible,\n isDisabled: isDisabled,\n isReadOnly: state.isReadOnly,\n isInvalid: state.isInvalid,\n isRequired: state.isRequired\n }\n });\n let DOMProps = (0, $3sixo$filterDOMProps)(props, {\n global: true\n });\n delete DOMProps.id;\n delete DOMProps.onClick;\n return /*#__PURE__*/ (0, $3sixo$react).createElement(\"label\", {\n ...(0, $3sixo$mergeProps)(DOMProps, labelProps, hoverProps, renderProps),\n ref: ref,\n \"data-selected\": isSelected || undefined,\n \"data-pressed\": isPressed || undefined,\n \"data-hovered\": isHovered || undefined,\n \"data-focused\": isFocused || undefined,\n \"data-focus-visible\": isFocusVisible || undefined,\n \"data-disabled\": isDisabled || undefined,\n \"data-readonly\": state.isReadOnly || undefined,\n \"data-invalid\": state.isInvalid || undefined,\n \"data-required\": state.isRequired || undefined\n }, /*#__PURE__*/ (0, $3sixo$react).createElement((0, $3sixo$VisuallyHidden), {\n elementType: \"span\"\n }, /*#__PURE__*/ (0, $3sixo$react).createElement(\"input\", {\n ...(0, $3sixo$mergeProps)(inputProps, focusProps),\n ref: inputRef\n })), /*#__PURE__*/ (0, $3sixo$react).createElement((0, $1d5b8b8664671ef2$export$c9549807523555e0).Provider, {\n value: {\n isSelected: isSelected\n }\n }, renderProps.children));\n});\n\n\nexport {$b6c3ddc6086f204d$export$a79eda4ff50e30b6 as RadioGroupContext, $b6c3ddc6086f204d$export$b118023277d4a5c3 as RadioContext, $b6c3ddc6086f204d$export$29d84393af70866c as RadioGroupStateContext, $b6c3ddc6086f204d$export$a98f0dcb43a68a25 as RadioGroup, $b6c3ddc6086f204d$export$d7b12c4107be0d61 as Radio};\n//# sourceMappingURL=RadioGroup.module.js.map\n","import { createSlotRecipeContext } from \"@chakra-ui/react\";\nimport type {\n RadioInputOptionSlotProps,\n RadioInputRootSlotProps,\n} from \"./radio-input.types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"radioInput\",\n});\n\nexport const RadioInputRootSlot = withProvider<\n HTMLDivElement,\n RadioInputRootSlotProps\n>(\"div\", \"root\");\n\nexport const RadioInputOptionSlot = withContext<\n HTMLSpanElement,\n RadioInputOptionSlotProps\n>(\"span\", \"option\");\n","import { useSlotRecipe } from \"@chakra-ui/react/styled-system\";\nimport { radioInputSlotRecipe } from \"../radio-input.recipe\";\nimport { RadioGroup as RaRadioGroup } from \"react-aria-components\";\nimport { extractStyleProps } from \"@/utils\";\nimport type { RadioInputRootProps } from \"../radio-input.types\";\nimport { RadioInputRootSlot } from \"../radio-input.slots\";\n\n/**\n * # RadioInput\n *\n * A set of closely related, mutually exclusive or complementary actions that are important enough to be displayed directly in the interface for quick access.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/radio-input}\n */\nexport const RadioInputRoot = (props: RadioInputRootProps) => {\n const recipe = useSlotRecipe({ recipe: radioInputSlotRecipe });\n const [recipeProps, restRecipeProps] = recipe.splitVariantProps(props);\n const [styleProps, restProps] = extractStyleProps(restRecipeProps);\n\n return (\n <RadioInputRootSlot {...recipeProps} {...styleProps} asChild>\n <RaRadioGroup {...restProps}>{props.children}</RaRadioGroup>\n </RadioInputRootSlot>\n );\n};\n\nRadioInputRoot.displayName = \"RadioInputRoot\";\n","import { Radio as RaRadio } from \"react-aria-components\";\nimport {\n RadioButtonChecked,\n RadioButtonUnchecked,\n} from \"@commercetools/nimbus-icons\";\nimport { extractStyleProps } from \"@/utils\";\nimport type { RadioInputOptionProps } from \"../radio-input.types\";\nimport { RadioInputOptionSlot } from \"../radio-input.slots\";\nimport { useFocusRing } from \"react-aria\";\n\nexport const RadioInputOption = ({\n children,\n value,\n ...rest\n}: RadioInputOptionProps) => {\n const [styleProps, restProps] = extractStyleProps(rest);\n const { isFocused, focusProps } = useFocusRing();\n\n return (\n <RadioInputOptionSlot\n {...styleProps}\n {...focusProps}\n data-focus={isFocused || undefined}\n asChild\n >\n <RaRadio value={value} {...restProps}>\n {(renderProps) => {\n const content =\n typeof children === \"function\"\n ? children({\n ...renderProps,\n })\n : children;\n return (\n <>\n {renderProps.isSelected ? (\n <RadioButtonChecked />\n ) : (\n <RadioButtonUnchecked />\n )}\n {content}\n </>\n );\n }}\n </RaRadio>\n </RadioInputOptionSlot>\n );\n};\n\nRadioInputOption.displayName = \"RadioInputOption\";\n","import { RadioInputRoot as _RadioInputRoot } from \"./components/radio-input.root\";\nimport { RadioInputOption as _RadioInputOption } from \"./components/radio-input.option\";\n\nexport const RadioInput = {\n Root: _RadioInputRoot,\n Option: _RadioInputOption,\n};\n\nexport { _RadioInputRoot, _RadioInputOption };\n"],"names":["$884aeceb3d67f00f$export$37b65e5b5444d35c","$0d5c49892c1215da$export$37b0961d2f4751e2","props","state","ref","value","children","ariaLabel","ariaLabelledby","onPressStart","onPressEnd","onPressChange","onPress","onPressUp","onClick","isDisabled","hasChildren","hasAriaLabel","checked","onChange","e","pressProps","isPressed","$5jJ3f$usePress","labelProps","isLabelPressed","_ref_current","focusableProps","$5jJ3f$useFocusable","$5jJ3f$mergeProps","interactions","domProps","$5jJ3f$filterDOMProps","tabIndex","name","form","descriptionId","errorMessageId","validationBehavior","$5jJ3f$useFormReset","$5jJ3f$useFormValidation","$5jJ3f$useMemo","$430f30ed08ec25fa$export$62b9571f283ff5c2","isReadOnly","isRequired","orientation","direction","$czmJy$useLocale","isInvalid","validationErrors","validationDetails","fieldProps","descriptionProps","errorMessageProps","$czmJy$useField","$czmJy$filterDOMProps","focusWithinProps","$czmJy$useFocusWithin","_props_onBlur","onKeyDown","nextDir","walker","$czmJy$getFocusableTreeWalker","node","$czmJy$getOwnerWindow","nextElem","groupName","$czmJy$useId","$czmJy$mergeProps","$a54cdc5c1942b639$var$instance","$a54cdc5c1942b639$var$i","$a54cdc5c1942b639$export$bca9d026f8e704eb","$l55kx$useMemo","_props_defaultValue","selectedValue","setSelected","$l55kx$useControlledState","initialValue","$l55kx$useState","lastFocusedValue","setLastFocusedValue","validation","$l55kx$useFormValidationState","setSelectedValue","_props_defaultValue1","$b6c3ddc6086f204d$export$a79eda4ff50e30b6","$3sixo$createContext","$b6c3ddc6086f204d$export$b118023277d4a5c3","$b6c3ddc6086f204d$export$29d84393af70866c","$b6c3ddc6086f204d$export$a98f0dcb43a68a25","$3sixo$forwardRef","$64fa3d84918910a7$export$29f1550f4b0d4415","formValidationBehavior","$64fa3d84918910a7$export$fabf2dc03a41866e","$d3e0e05bdfcf66bd$export$c24727297075ec6a","_props_validationBehavior","_ref","$3sixo$useRadioGroupState","labelRef","label","$64fa3d84918910a7$export$9d4c57ee4c6ffdd8","radioGroupProps","$3sixo$useRadioGroup","renderProps","$64fa3d84918910a7$export$4d86445c2cf5e3","DOMProps","$3sixo$filterDOMProps","$3sixo$react","$3sixo$mergeProps","$64fa3d84918910a7$export$2881499e37b75b9a","$01b77f81d0f07f68$export$75b6ee27786ba447","$514c0188e459b4c0$export$9afb8bc826b033ea","$ee014567cb39d3f0$export$ff05c3ac10437e03","$c8a5a149f625efcf$export$758399f318e6385a","$b6c3ddc6086f204d$export$d7b12c4107be0d61","userProvidedInputRef","otherProps","inputRef","$3sixo$useObjectRef","$3sixo$useMemo","$3sixo$mergeRefs","inputProps","isSelected","$3sixo$useRadio","$64fa3d84918910a7$export$ef03459518577ad4","isFocused","isFocusVisible","focusProps","$3sixo$useFocusRing","interactionDisabled","hoverProps","isHovered","$3sixo$useHover","$3sixo$VisuallyHidden","$1d5b8b8664671ef2$export$c9549807523555e0","withProvider","withContext","createSlotRecipeContext","RadioInputRootSlot","RadioInputOptionSlot","RadioInputRoot","recipe","useSlotRecipe","radioInputSlotRecipe","recipeProps","restRecipeProps","styleProps","restProps","extractStyleProps","jsx","RaRadioGroup","RadioInputOption","rest","useFocusRing","RaRadio","content","jsxs","Fragment","RadioButtonChecked","RadioButtonUnchecked","RadioInput","_RadioInputRoot","_RadioInputOption"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUI,MAAMA,IAA4C,oBAAI,QAAO;ACWjE,SAASC,GAA0CC,GAAOC,GAAOC,GAAK;AAClE,MAAI,EAAE,OAAOC,GAAO,UAAUC,GAAU,cAAcC,GAAW,mBAAmBC,GAAgB,cAAcC,GAAc,YAAYC,GAAY,eAAeC,GAAe,SAASC,GAAS,WAAWC,GAAW,SAASC,EAAO,IAAKZ;AACnP,QAAMa,IAAab,EAAM,cAAcC,EAAM;AAC7C,MAAIa,IAAcV,KAAY,MAC1BW,IAAeV,KAAa,QAAQC,KAAkB;AAC1D,EAAI,CAACQ,KAAe,CAACC,KAAgB,QAAQ,I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AkB3I,CAAK,GAC/D,CAACgJ,GAAYC,CAAS,IAAIC,EAAkBH,CAAe;AAEjE,SACE,gBAAAI,EAACX,IAAA,EAAoB,GAAGM,GAAc,GAAGE,GAAY,SAAO,IAC1D,UAAA,gBAAAG,EAACC,IAAA,EAAc,GAAGH,GAAY,UAAAjJ,EAAM,UAAS,GAC/C;AAEJ;AAEA0I,EAAe,cAAc;AChBtB,MAAMW,IAAmB,CAAC;AAAA,EAC/B,UAAAjJ;AAAA,EACA,OAAAD;AAAA,EACA,GAAGmJ;AACL,MAA6B;AAC3B,QAAM,CAACN,GAAYC,CAAS,IAAIC,EAAkBI,CAAI,GAChD,EAAE,WAAA3B,GAAW,YAAAE,EAAA,IAAe0B,EAAA;AAElC,SACE,gBAAAJ;AAAA,IAACV;AAAA,IAAA;AAAA,MACE,GAAGO;AAAA,MACH,GAAGnB;AAAA,MACJ,cAAYF,KAAa;AAAA,MACzB,SAAO;AAAA,MAEP,4BAAC6B,IAAA,EAAQ,OAAArJ,GAAe,GAAG8I,GACxB,WAAC5C,MAAgB;AAChB,cAAMoD,IACJ,OAAOrJ,KAAa,aAChBA,EAAS;AAAA,UACP,GAAGiG;AAAA,QAAA,CACJ,IACDjG;AACN,eACE,gBAAAsJ,EAAAC,GAAA,EACG,UAAA;AAAA,UAAAtD,EAAY,aACX,gBAAA8C,EAACS,IAAA,CAAA,CAAmB,sBAEnBC,IAAA,EAAqB;AAAA,UAEvBJ;AAAA,QAAA,GACH;AAAA,MAEJ,EAAA,CACF;AAAA,IAAA;AAAA,EAAA;AAGN;AAEAJ,EAAiB,cAAc;AC9CxB,MAAMS,KAAa;AAAA,EACxB,MAAMC;AAAAA,EACN,QAAQC;AACV;","x_google_ignoreList":[0,1,2,3,4]}
@@ -10,11 +10,11 @@ import { KeyboardArrowLeft as x, KeyboardArrowRight as $ } from "@commercetools/
10
10
  import { Flex as z } from "@chakra-ui/react/flex";
11
11
  import { S as v } from "./stack-CoNreM7B.es.js";
12
12
  import { V as k } from "./visually-hidden-CkxAz94w.es.js";
13
- import { I as h } from "./icon-button-g4dZUH5O.es.js";
13
+ import { I as h } from "./icon-button-CKfDmEjG.es.js";
14
14
  import { T as C } from "./text-5xQLnEG4.es.js";
15
- import { r as V } from "./index-CaeeOiBp.es.js";
15
+ import { r as V } from "./index-DlmEj62V.es.js";
16
16
  import { useRecipe as K } from "@chakra-ui/react/styled-system";
17
- import { e as W } from "./extract-style-props-CZpdYA8m.es.js";
17
+ import { e as W } from "./extract-style-props-CTVOvGhe.es.js";
18
18
  import { $ as y } from "./Button-C4ud7YxN.es.js";
19
19
  import { $ as R } from "./Text-DOcU1ycg.es.js";
20
20
  import { defineMessages as _, useIntl as q } from "react-intl";
@@ -206,4 +206,4 @@ const { withProvider: E, withContext: s } = /* @__PURE__ */ A({
206
206
  export {
207
207
  we as R
208
208
  };
209
- //# sourceMappingURL=range-calendar-BnB1F7_i.es.js.map
209
+ //# sourceMappingURL=range-calendar-5eLEbNtN.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"range-calendar-BnB1F7_i.es.js","sources":["../../src/components/range-calendar/range-calendar.slots.tsx","../../src/components/range-calendar/components/range-calendar.grids.tsx","../../src/components/range-calendar/components/range-calendar.header.tsx","../../src/components/range-calendar/range-calendar.i18n.ts","../../src/components/range-calendar/components/range-calendar.custom-context.tsx","../../src/components/range-calendar/range-calendar.tsx"],"sourcesContent":["import { createSlotRecipeContext } from \"@chakra-ui/react\";\nimport type { SlotComponent } from \"@/type-utils\";\nimport type {\n RangeCalendarRootSlotProps,\n RangeCalendarHeaderSlotProps,\n RangeCalendarGridsSlotProps,\n RangeCalendarMonthTitleSlotProps,\n RangeCalendarGridSlotProps,\n RangeCalendarGridHeaderSlotProps,\n RangeCalendarHeaderCellSlotProps,\n RangeCalendarGridBodySlotProps,\n RangeCalendarCellSlotProps,\n} from \"./range-calendar.types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"rangeCalendar\",\n});\n\nexport const RangeCalendarRootSlot: SlotComponent<\n HTMLDivElement,\n RangeCalendarRootSlotProps\n> = withProvider<HTMLDivElement, RangeCalendarRootSlotProps>(\"div\", \"root\");\n\nexport const RangeCalendarHeaderSlot = withContext<\n HTMLDivElement,\n RangeCalendarHeaderSlotProps\n>(\"div\", \"header\");\n\nexport const RangeCalendarGridsSlot = withContext<\n HTMLDivElement,\n RangeCalendarGridsSlotProps\n>(\"div\", \"grids\");\n\nexport const RangeCalendarMonthTitleSlot = withContext<\n HTMLDivElement,\n RangeCalendarMonthTitleSlotProps\n>(\"div\", \"monthTitle\");\n\nexport const RangeCalendarGridSlot = withContext<\n HTMLTableElement,\n RangeCalendarGridSlotProps\n>(\"table\", \"grid\");\n\nexport const RangeCalendarGridHeaderSlot = withContext<\n HTMLTableSectionElement,\n RangeCalendarGridHeaderSlotProps\n>(\"thead\", \"gridHeader\");\n\nexport const RangeCalendarHeaderCellSlot = withContext<\n HTMLTableCellElement,\n RangeCalendarHeaderCellSlotProps\n>(\"th\", \"headerCell\");\n\nexport const RangeCalendarGridBodySlot = withContext<\n HTMLTableSectionElement,\n RangeCalendarGridBodySlotProps\n>(\"tbody\", \"gridBody\");\n\nexport const RangeCalendarCellSlot = withContext<\n HTMLTableCellElement,\n RangeCalendarCellSlotProps\n>(\"td\", \"bodyCell\");\n","import { useContext } from \"react\";\nimport { today, getLocalTimeZone } from \"@internationalized/date\";\nimport {\n CalendarGrid as RaCalendarGrid,\n CalendarGridBody as RaCalendarGridBody,\n CalendarGridHeader as RaCalendarGridHeader,\n CalendarHeaderCell as RaCalendarHeaderCell,\n CalendarCell as RaCalendarCell,\n useSlottedContext,\n RangeCalendarContext,\n RangeCalendarStateContext,\n useLocale,\n} from \"react-aria-components\";\nimport { Box } from \"@/components\";\n\nimport {\n RangeCalendarCellSlot,\n RangeCalendarGridBodySlot,\n RangeCalendarGridHeaderSlot,\n RangeCalendarGridsSlot,\n RangeCalendarGridSlot,\n RangeCalendarHeaderCellSlot,\n RangeCalendarMonthTitleSlot,\n} from \"../range-calendar.slots\";\n\nexport const RangeCalendarGrids = () => {\n const { locale } = useLocale();\n const context = useSlottedContext(RangeCalendarContext);\n\n const calendarState = useContext(RangeCalendarStateContext)!;\n const visibleMonthsCount = context?.visibleDuration?.months || 1;\n const todayDate = today(getLocalTimeZone());\n const showMonthTitles = visibleMonthsCount > 1;\n\n return (\n <RangeCalendarGridsSlot>\n {Array.from({ length: visibleMonthsCount }, (_, index) => {\n const gridDate = calendarState.visibleRange.start.add({\n months: index,\n });\n const monthName = new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(gridDate.toDate(getLocalTimeZone()));\n\n return (\n <Box\n key={monthName}\n width={visibleMonthsCount == 1 ? \"full\" : \"auto\"}\n >\n {showMonthTitles && (\n <RangeCalendarMonthTitleSlot>\n {monthName}\n </RangeCalendarMonthTitleSlot>\n )}\n <RangeCalendarGridSlot asChild>\n <RaCalendarGrid offset={{ months: index }} weekdayStyle=\"short\">\n <RangeCalendarGridHeaderSlot asChild>\n <RaCalendarGridHeader>\n {(day) => (\n <RangeCalendarHeaderCellSlot asChild>\n <RaCalendarHeaderCell>{day}</RaCalendarHeaderCell>\n </RangeCalendarHeaderCellSlot>\n )}\n </RaCalendarGridHeader>\n </RangeCalendarGridHeaderSlot>\n <RangeCalendarGridBodySlot asChild>\n <RaCalendarGridBody>\n {(date) => {\n const isToday = date.compare(todayDate) === 0;\n return (\n <RangeCalendarCellSlot asChild data-today={isToday}>\n <RaCalendarCell date={date} />\n </RangeCalendarCellSlot>\n );\n }}\n </RaCalendarGridBody>\n </RangeCalendarGridBodySlot>\n </RaCalendarGrid>\n </RangeCalendarGridSlot>\n </Box>\n );\n })}\n </RangeCalendarGridsSlot>\n );\n};\n","import {\n RangeCalendarContext,\n Heading,\n useSlottedContext,\n} from \"react-aria-components\";\nimport {\n Box,\n Flex,\n IconButton,\n Stack,\n Text,\n VisuallyHidden,\n} from \"@/components\";\nimport {\n KeyboardArrowLeft,\n KeyboardArrowRight,\n} from \"@commercetools/nimbus-icons\";\nimport { RangeCalendarHeaderSlot } from \"../range-calendar.slots\";\n\nexport const RangeCalendarHeader = () => {\n const rangeCalendarProps = useSlottedContext(RangeCalendarContext);\n\n // Needed to decide whether to show a single month or a range\n const visibleDurationMonths =\n rangeCalendarProps?.visibleDuration?.months || 1;\n const showRangeLabel = visibleDurationMonths > 1;\n\n return (\n <RangeCalendarHeaderSlot>\n <Flex>\n <Stack direction=\"row\" alignItems=\"center\">\n {/** solely for screen readers, if not present, a11y issues are raised */}\n <VisuallyHidden>\n <Heading />\n </VisuallyHidden>\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot={showRangeLabel ? \"previous\" : \"previous-month\"}\n size=\"xs\"\n variant=\"ghost\"\n tone=\"primary\"\n >\n <KeyboardArrowLeft />\n </IconButton>\n <Text\n textStyle=\"sm\"\n fontWeight=\"500\"\n color=\"neutral.11\"\n width={showRangeLabel ? \"4000\" : \"2000\"}\n textAlign=\"center\"\n aria-hidden=\"true\"\n slot={showRangeLabel ? \"monthRange\" : \"month\"}\n />\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot={showRangeLabel ? \"next\" : \"next-month\"}\n size=\"xs\"\n variant=\"ghost\"\n tone=\"primary\"\n >\n <KeyboardArrowRight />\n </IconButton>\n </Stack>\n <Box flexGrow=\"1\" />\n <Stack direction=\"row\" alignItems=\"center\">\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot=\"previous-year\"\n size=\"xs\"\n variant=\"ghost\"\n tone=\"primary\"\n >\n <KeyboardArrowLeft />\n </IconButton>\n <Text\n textStyle=\"sm\"\n fontWeight=\"500\"\n color=\"neutral.11\"\n width=\"1400\"\n textAlign=\"center\"\n aria-hidden=\"true\"\n slot=\"year\"\n />\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton slot=\"next-year\" size=\"xs\" variant=\"ghost\" tone=\"primary\">\n <KeyboardArrowRight />\n </IconButton>\n </Stack>\n </Flex>\n </RangeCalendarHeaderSlot>\n );\n};\n","import { defineMessages } from \"react-intl\";\n\nexport const messages = defineMessages({\n nextMonth: {\n id: \"Nimbus.RangeCalendar.nextMonth\",\n description: \"aria-label for next month navigation button\",\n defaultMessage: \"Next month\",\n },\n previousMonth: {\n id: \"Nimbus.RangeCalendar.previousMonth\",\n description: \"aria-label for previous month navigation button\",\n defaultMessage: \"Previous month\",\n },\n nextYear: {\n id: \"Nimbus.RangeCalendar.nextYear\",\n description: \"aria-label for next year navigation button\",\n defaultMessage: \"Next year\",\n },\n previousYear: {\n id: \"Nimbus.RangeCalendar.previousYear\",\n description: \"aria-label for previous year navigation button\",\n defaultMessage: \"Previous year\",\n },\n});\n","import { getLocalTimeZone } from \"@internationalized/date\";\nimport { useContext } from \"react\";\nimport {\n Provider,\n ButtonContext,\n RangeCalendarStateContext,\n TextContext,\n useLocale,\n} from \"react-aria-components\";\nimport { useIntl } from \"react-intl\";\nimport { messages } from \"../range-calendar.i18n\";\n\nexport const RangeCalendarCustomContext = ({\n children,\n}: {\n children: React.ReactNode;\n}) => {\n const intl = useIntl();\n const { locale } = useLocale();\n const buttonContext = useContext(ButtonContext)!;\n const textContext = useContext(TextContext)!;\n const calendarState = useContext(RangeCalendarStateContext)!;\n\n /**\n * Button slots\n * ================================\n */\n const buttonSlots = {\n \"next-month\": {\n onPress: () => calendarState.focusNextSection(),\n \"aria-label\": intl.formatMessage(messages.nextMonth),\n },\n \"previous-month\": {\n onPress: () => calendarState.focusPreviousSection(),\n \"aria-label\": intl.formatMessage(messages.previousMonth),\n },\n \"next-year\": {\n onPress: () => calendarState.focusNextSection(true),\n \"aria-label\": intl.formatMessage(messages.nextYear),\n },\n \"previous-year\": {\n onPress: () => calendarState.focusPreviousSection(true),\n \"aria-label\": intl.formatMessage(messages.previousYear),\n },\n };\n\n /**\n * Text slots\n * ================================\n */\n const monthLabel = new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.focusedDate.toDate(getLocalTimeZone()));\n\n const monthRangeLabel = [\n new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.visibleRange.start.toDate(getLocalTimeZone())),\n new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.visibleRange.end.toDate(getLocalTimeZone())),\n ].join(\" - \");\n\n const yearLabel = new Intl.DateTimeFormat(locale, {\n year: \"numeric\",\n }).format(calendarState.focusedDate.toDate(getLocalTimeZone()));\n\n const textSlots = {\n month: { children: monthLabel },\n monthRange: { children: monthRangeLabel },\n year: { children: yearLabel },\n };\n\n return (\n <Provider\n values={[\n [\n ButtonContext,\n {\n ...buttonContext,\n slots: {\n ...(buttonContext &&\n typeof buttonContext === \"object\" &&\n \"slots\" in buttonContext\n ? buttonContext.slots\n : {}),\n ...buttonSlots,\n },\n },\n ],\n [\n TextContext,\n {\n ...textContext,\n slots: {\n ...(textContext &&\n typeof textContext === \"object\" &&\n \"slots\" in textContext\n ? textContext.slots\n : {}),\n ...textSlots,\n },\n },\n ],\n ]}\n >\n {children}\n </Provider>\n );\n};\n","import type { RangeCalendarProps } from \"./range-calendar.types\";\nimport type { DateValue } from \"@internationalized/date\";\n\nimport { RangeCalendar as RaRangeCalendar } from \"react-aria-components\";\n\nimport { RangeCalendarRootSlot } from \"./range-calendar.slots\";\nimport { RangeCalendarGrids } from \"./components/range-calendar.grids\";\nimport { RangeCalendarHeader } from \"./components/range-calendar.header\";\nimport { rangeCalendarSlotRecipe } from \"./range-calendar.recipe\";\nimport { useRecipe } from \"@chakra-ui/react/styled-system\";\nimport { extractStyleProps } from \"@/utils\";\nimport { RangeCalendarCustomContext } from \"./components/range-calendar.custom-context\";\n\nexport const RangeCalendar = (props: RangeCalendarProps<DateValue>) => {\n const recipe = useRecipe({ recipe: rangeCalendarSlotRecipe });\n const [recipeProps, remainingProps] = recipe.splitVariantProps(props);\n const [styleProps, otherProps] = extractStyleProps(remainingProps);\n\n return (\n <RangeCalendarRootSlot {...recipeProps} {...styleProps} asChild>\n <RaRangeCalendar {...otherProps}>\n <RangeCalendarCustomContext>\n <RangeCalendarHeader />\n <RangeCalendarGrids />\n </RangeCalendarCustomContext>\n </RaRangeCalendar>\n </RangeCalendarRootSlot>\n );\n};\n"],"names":["withProvider","withContext","createSlotRecipeContext","RangeCalendarRootSlot","RangeCalendarHeaderSlot","RangeCalendarGridsSlot","RangeCalendarMonthTitleSlot","RangeCalendarGridSlot","RangeCalendarGridHeaderSlot","RangeCalendarHeaderCellSlot","RangeCalendarGridBodySlot","RangeCalendarCellSlot","RangeCalendarGrids","locale","useLocale","context","useSlottedContext","RangeCalendarContext","calendarState","useContext","RangeCalendarStateContext","visibleMonthsCount","todayDate","today","getLocalTimeZone","showMonthTitles","jsx","_","index","gridDate","monthName","jsxs","Box","RaCalendarGrid","RaCalendarGridHeader","day","RaCalendarHeaderCell","RaCalendarGridBody","date","isToday","RaCalendarCell","RangeCalendarHeader","showRangeLabel","Flex","Stack","VisuallyHidden","Heading","IconButton","KeyboardArrowLeft","Text","KeyboardArrowRight","messages","defineMessages","RangeCalendarCustomContext","children","intl","useIntl","buttonContext","ButtonContext","textContext","TextContext","buttonSlots","monthLabel","monthRangeLabel","yearLabel","textSlots","Provider","RangeCalendar","props","recipe","useRecipe","rangeCalendarSlotRecipe","recipeProps","remainingProps","styleProps","otherProps","extractStyleProps","RaRangeCalendar"],"mappings":";;;;;;;;;;;;;;;;;;;;AAcA,MAAM,EAAE,cAAAA,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,KAAK;AACP,CAAC,GAEYC,IAGT,gBAAAH,EAAyD,OAAO,MAAM,GAE7DI,IAA0B,gBAAAH,EAGrC,OAAO,QAAQ,GAEJI,IAAyB,gBAAAJ,EAGpC,OAAO,OAAO,GAEHK,IAA8B,gBAAAL,EAGzC,OAAO,YAAY,GAERM,IAAwB,gBAAAN,EAGnC,SAAS,MAAM,GAEJO,IAA8B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ChB,OAAO,EAAE,UAAUH,EAAA;AAAA,IACnB,YAAY,EAAE,UAAUC,EAAA;AAAA,IACxB,MAAM,EAAE,UAAUC,EAAA;AAAA,EAAU;AAG9B,SACE,gBAAAtC;AAAA,IAACwC;AAAAA,IAAA;AAAA,MACC,QAAQ;AAAA,QACN;AAAA,UACER;AAAAA,UACA;AAAA,YACE,GAAGD;AAAA,YACH,OAAO;AAAA,cACL,GAAIA,KACJ,OAAOA,KAAkB,YACzB,WAAWA,IACPA,EAAc,QACd,CAAA;AAAA,cACJ,GAAGI;AAAA,YAAA;AAAA,UACL;AAAA,QACF;AAAA,QAEF;AAAA,UACED;AAAAA,UACA;AAAA,YACE,GAAGD;AAAA,YACH,OAAO;AAAA,cACL,GAAIA,KACJ,OAAOA,KAAgB,YACvB,WAAWA,IACPA,EAAY,QACZ,CAAA;AAAA,cACJ,GAAGM;AAAA,YAAA;AAAA,UACL;AAAA,QACF;AAAA,MACF;AAAA,MAGD,UAAAX;AAAA,IAAA;AAAA,EAAA;AAGP,GChGaa,KAAgB,CAACC,MAAyC;AACrE,QAAMC,IAASC,EAAU,EAAE,QAAQC,GAAyB,GACtD,CAACC,GAAaC,CAAc,IAAIJ,EAAO,kBAAkBD,CAAK,GAC9D,CAACM,GAAYC,CAAU,IAAIC,EAAkBH,CAAc;AAEjE,SACE,gBAAA/C,EAACvB,GAAA,EAAuB,GAAGqE,GAAc,GAAGE,GAAY,SAAO,IAC7D,UAAA,gBAAAhD,EAACmD,GAAA,EAAiB,GAAGF,GACnB,4BAACtB,IAAA,EACC,UAAA;AAAA,IAAA,gBAAA3B,EAACe,IAAA,EAAoB;AAAA,sBACpB7B,IAAA,CAAA,CAAmB;AAAA,EAAA,EAAA,CACtB,GACF,GACF;AAEJ;"}
1
+ {"version":3,"file":"range-calendar-5eLEbNtN.es.js","sources":["../../src/components/range-calendar/range-calendar.slots.tsx","../../src/components/range-calendar/components/range-calendar.grids.tsx","../../src/components/range-calendar/components/range-calendar.header.tsx","../../src/components/range-calendar/range-calendar.i18n.ts","../../src/components/range-calendar/components/range-calendar.custom-context.tsx","../../src/components/range-calendar/range-calendar.tsx"],"sourcesContent":["import { createSlotRecipeContext } from \"@chakra-ui/react\";\nimport type { SlotComponent } from \"@/type-utils\";\nimport type {\n RangeCalendarRootSlotProps,\n RangeCalendarHeaderSlotProps,\n RangeCalendarGridsSlotProps,\n RangeCalendarMonthTitleSlotProps,\n RangeCalendarGridSlotProps,\n RangeCalendarGridHeaderSlotProps,\n RangeCalendarHeaderCellSlotProps,\n RangeCalendarGridBodySlotProps,\n RangeCalendarCellSlotProps,\n} from \"./range-calendar.types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"rangeCalendar\",\n});\n\nexport const RangeCalendarRootSlot: SlotComponent<\n HTMLDivElement,\n RangeCalendarRootSlotProps\n> = withProvider<HTMLDivElement, RangeCalendarRootSlotProps>(\"div\", \"root\");\n\nexport const RangeCalendarHeaderSlot = withContext<\n HTMLDivElement,\n RangeCalendarHeaderSlotProps\n>(\"div\", \"header\");\n\nexport const RangeCalendarGridsSlot = withContext<\n HTMLDivElement,\n RangeCalendarGridsSlotProps\n>(\"div\", \"grids\");\n\nexport const RangeCalendarMonthTitleSlot = withContext<\n HTMLDivElement,\n RangeCalendarMonthTitleSlotProps\n>(\"div\", \"monthTitle\");\n\nexport const RangeCalendarGridSlot = withContext<\n HTMLTableElement,\n RangeCalendarGridSlotProps\n>(\"table\", \"grid\");\n\nexport const RangeCalendarGridHeaderSlot = withContext<\n HTMLTableSectionElement,\n RangeCalendarGridHeaderSlotProps\n>(\"thead\", \"gridHeader\");\n\nexport const RangeCalendarHeaderCellSlot = withContext<\n HTMLTableCellElement,\n RangeCalendarHeaderCellSlotProps\n>(\"th\", \"headerCell\");\n\nexport const RangeCalendarGridBodySlot = withContext<\n HTMLTableSectionElement,\n RangeCalendarGridBodySlotProps\n>(\"tbody\", \"gridBody\");\n\nexport const RangeCalendarCellSlot = withContext<\n HTMLTableCellElement,\n RangeCalendarCellSlotProps\n>(\"td\", \"bodyCell\");\n","import { useContext } from \"react\";\nimport { today, getLocalTimeZone } from \"@internationalized/date\";\nimport {\n CalendarGrid as RaCalendarGrid,\n CalendarGridBody as RaCalendarGridBody,\n CalendarGridHeader as RaCalendarGridHeader,\n CalendarHeaderCell as RaCalendarHeaderCell,\n CalendarCell as RaCalendarCell,\n useSlottedContext,\n RangeCalendarContext,\n RangeCalendarStateContext,\n useLocale,\n} from \"react-aria-components\";\nimport { Box } from \"@/components\";\n\nimport {\n RangeCalendarCellSlot,\n RangeCalendarGridBodySlot,\n RangeCalendarGridHeaderSlot,\n RangeCalendarGridsSlot,\n RangeCalendarGridSlot,\n RangeCalendarHeaderCellSlot,\n RangeCalendarMonthTitleSlot,\n} from \"../range-calendar.slots\";\n\nexport const RangeCalendarGrids = () => {\n const { locale } = useLocale();\n const context = useSlottedContext(RangeCalendarContext);\n\n const calendarState = useContext(RangeCalendarStateContext)!;\n const visibleMonthsCount = context?.visibleDuration?.months || 1;\n const todayDate = today(getLocalTimeZone());\n const showMonthTitles = visibleMonthsCount > 1;\n\n return (\n <RangeCalendarGridsSlot>\n {Array.from({ length: visibleMonthsCount }, (_, index) => {\n const gridDate = calendarState.visibleRange.start.add({\n months: index,\n });\n const monthName = new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(gridDate.toDate(getLocalTimeZone()));\n\n return (\n <Box\n key={monthName}\n width={visibleMonthsCount == 1 ? \"full\" : \"auto\"}\n >\n {showMonthTitles && (\n <RangeCalendarMonthTitleSlot>\n {monthName}\n </RangeCalendarMonthTitleSlot>\n )}\n <RangeCalendarGridSlot asChild>\n <RaCalendarGrid offset={{ months: index }} weekdayStyle=\"short\">\n <RangeCalendarGridHeaderSlot asChild>\n <RaCalendarGridHeader>\n {(day) => (\n <RangeCalendarHeaderCellSlot asChild>\n <RaCalendarHeaderCell>{day}</RaCalendarHeaderCell>\n </RangeCalendarHeaderCellSlot>\n )}\n </RaCalendarGridHeader>\n </RangeCalendarGridHeaderSlot>\n <RangeCalendarGridBodySlot asChild>\n <RaCalendarGridBody>\n {(date) => {\n const isToday = date.compare(todayDate) === 0;\n return (\n <RangeCalendarCellSlot asChild data-today={isToday}>\n <RaCalendarCell date={date} />\n </RangeCalendarCellSlot>\n );\n }}\n </RaCalendarGridBody>\n </RangeCalendarGridBodySlot>\n </RaCalendarGrid>\n </RangeCalendarGridSlot>\n </Box>\n );\n })}\n </RangeCalendarGridsSlot>\n );\n};\n","import {\n RangeCalendarContext,\n Heading,\n useSlottedContext,\n} from \"react-aria-components\";\nimport {\n Box,\n Flex,\n IconButton,\n Stack,\n Text,\n VisuallyHidden,\n} from \"@/components\";\nimport {\n KeyboardArrowLeft,\n KeyboardArrowRight,\n} from \"@commercetools/nimbus-icons\";\nimport { RangeCalendarHeaderSlot } from \"../range-calendar.slots\";\n\nexport const RangeCalendarHeader = () => {\n const rangeCalendarProps = useSlottedContext(RangeCalendarContext);\n\n // Needed to decide whether to show a single month or a range\n const visibleDurationMonths =\n rangeCalendarProps?.visibleDuration?.months || 1;\n const showRangeLabel = visibleDurationMonths > 1;\n\n return (\n <RangeCalendarHeaderSlot>\n <Flex>\n <Stack direction=\"row\" alignItems=\"center\">\n {/** solely for screen readers, if not present, a11y issues are raised */}\n <VisuallyHidden>\n <Heading />\n </VisuallyHidden>\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot={showRangeLabel ? \"previous\" : \"previous-month\"}\n size=\"xs\"\n variant=\"ghost\"\n tone=\"primary\"\n >\n <KeyboardArrowLeft />\n </IconButton>\n <Text\n textStyle=\"sm\"\n fontWeight=\"500\"\n color=\"neutral.11\"\n width={showRangeLabel ? \"4000\" : \"2000\"}\n textAlign=\"center\"\n aria-hidden=\"true\"\n slot={showRangeLabel ? \"monthRange\" : \"month\"}\n />\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot={showRangeLabel ? \"next\" : \"next-month\"}\n size=\"xs\"\n variant=\"ghost\"\n tone=\"primary\"\n >\n <KeyboardArrowRight />\n </IconButton>\n </Stack>\n <Box flexGrow=\"1\" />\n <Stack direction=\"row\" alignItems=\"center\">\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot=\"previous-year\"\n size=\"xs\"\n variant=\"ghost\"\n tone=\"primary\"\n >\n <KeyboardArrowLeft />\n </IconButton>\n <Text\n textStyle=\"sm\"\n fontWeight=\"500\"\n color=\"neutral.11\"\n width=\"1400\"\n textAlign=\"center\"\n aria-hidden=\"true\"\n slot=\"year\"\n />\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton slot=\"next-year\" size=\"xs\" variant=\"ghost\" tone=\"primary\">\n <KeyboardArrowRight />\n </IconButton>\n </Stack>\n </Flex>\n </RangeCalendarHeaderSlot>\n );\n};\n","import { defineMessages } from \"react-intl\";\n\nexport const messages = defineMessages({\n nextMonth: {\n id: \"Nimbus.RangeCalendar.nextMonth\",\n description: \"aria-label for next month navigation button\",\n defaultMessage: \"Next month\",\n },\n previousMonth: {\n id: \"Nimbus.RangeCalendar.previousMonth\",\n description: \"aria-label for previous month navigation button\",\n defaultMessage: \"Previous month\",\n },\n nextYear: {\n id: \"Nimbus.RangeCalendar.nextYear\",\n description: \"aria-label for next year navigation button\",\n defaultMessage: \"Next year\",\n },\n previousYear: {\n id: \"Nimbus.RangeCalendar.previousYear\",\n description: \"aria-label for previous year navigation button\",\n defaultMessage: \"Previous year\",\n },\n});\n","import { getLocalTimeZone } from \"@internationalized/date\";\nimport { useContext } from \"react\";\nimport {\n Provider,\n ButtonContext,\n RangeCalendarStateContext,\n TextContext,\n useLocale,\n} from \"react-aria-components\";\nimport { useIntl } from \"react-intl\";\nimport { messages } from \"../range-calendar.i18n\";\n\nexport const RangeCalendarCustomContext = ({\n children,\n}: {\n children: React.ReactNode;\n}) => {\n const intl = useIntl();\n const { locale } = useLocale();\n const buttonContext = useContext(ButtonContext)!;\n const textContext = useContext(TextContext)!;\n const calendarState = useContext(RangeCalendarStateContext)!;\n\n /**\n * Button slots\n * ================================\n */\n const buttonSlots = {\n \"next-month\": {\n onPress: () => calendarState.focusNextSection(),\n \"aria-label\": intl.formatMessage(messages.nextMonth),\n },\n \"previous-month\": {\n onPress: () => calendarState.focusPreviousSection(),\n \"aria-label\": intl.formatMessage(messages.previousMonth),\n },\n \"next-year\": {\n onPress: () => calendarState.focusNextSection(true),\n \"aria-label\": intl.formatMessage(messages.nextYear),\n },\n \"previous-year\": {\n onPress: () => calendarState.focusPreviousSection(true),\n \"aria-label\": intl.formatMessage(messages.previousYear),\n },\n };\n\n /**\n * Text slots\n * ================================\n */\n const monthLabel = new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.focusedDate.toDate(getLocalTimeZone()));\n\n const monthRangeLabel = [\n new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.visibleRange.start.toDate(getLocalTimeZone())),\n new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.visibleRange.end.toDate(getLocalTimeZone())),\n ].join(\" - \");\n\n const yearLabel = new Intl.DateTimeFormat(locale, {\n year: \"numeric\",\n }).format(calendarState.focusedDate.toDate(getLocalTimeZone()));\n\n const textSlots = {\n month: { children: monthLabel },\n monthRange: { children: monthRangeLabel },\n year: { children: yearLabel },\n };\n\n return (\n <Provider\n values={[\n [\n ButtonContext,\n {\n ...buttonContext,\n slots: {\n ...(buttonContext &&\n typeof buttonContext === \"object\" &&\n \"slots\" in buttonContext\n ? buttonContext.slots\n : {}),\n ...buttonSlots,\n },\n },\n ],\n [\n TextContext,\n {\n ...textContext,\n slots: {\n ...(textContext &&\n typeof textContext === \"object\" &&\n \"slots\" in textContext\n ? textContext.slots\n : {}),\n ...textSlots,\n },\n },\n ],\n ]}\n >\n {children}\n </Provider>\n );\n};\n","import type { RangeCalendarProps } from \"./range-calendar.types\";\nimport type { DateValue } from \"@internationalized/date\";\n\nimport { RangeCalendar as RaRangeCalendar } from \"react-aria-components\";\n\nimport { RangeCalendarRootSlot } from \"./range-calendar.slots\";\nimport { RangeCalendarGrids } from \"./components/range-calendar.grids\";\nimport { RangeCalendarHeader } from \"./components/range-calendar.header\";\nimport { rangeCalendarSlotRecipe } from \"./range-calendar.recipe\";\nimport { useRecipe } from \"@chakra-ui/react/styled-system\";\nimport { extractStyleProps } from \"@/utils\";\nimport { RangeCalendarCustomContext } from \"./components/range-calendar.custom-context\";\n\nexport const RangeCalendar = (props: RangeCalendarProps<DateValue>) => {\n const recipe = useRecipe({ recipe: rangeCalendarSlotRecipe });\n const [recipeProps, remainingProps] = recipe.splitVariantProps(props);\n const [styleProps, otherProps] = extractStyleProps(remainingProps);\n\n return (\n <RangeCalendarRootSlot {...recipeProps} {...styleProps} asChild>\n <RaRangeCalendar {...otherProps}>\n <RangeCalendarCustomContext>\n <RangeCalendarHeader />\n <RangeCalendarGrids />\n </RangeCalendarCustomContext>\n </RaRangeCalendar>\n </RangeCalendarRootSlot>\n );\n};\n"],"names":["withProvider","withContext","createSlotRecipeContext","RangeCalendarRootSlot","RangeCalendarHeaderSlot","RangeCalendarGridsSlot","RangeCalendarMonthTitleSlot","RangeCalendarGridSlot","RangeCalendarGridHeaderSlot","RangeCalendarHeaderCellSlot","RangeCalendarGridBodySlot","RangeCalendarCellSlot","RangeCalendarGrids","locale","useLocale","context","useSlottedContext","RangeCalendarContext","calendarState","useContext","RangeCalendarStateContext","visibleMonthsCount","todayDate","today","getLocalTimeZone","showMonthTitles","jsx","_","index","gridDate","monthName","jsxs","Box","RaCalendarGrid","RaCalendarGridHeader","day","RaCalendarHeaderCell","RaCalendarGridBody","date","isToday","RaCalendarCell","RangeCalendarHeader","showRangeLabel","Flex","Stack","VisuallyHidden","Heading","IconButton","KeyboardArrowLeft","Text","KeyboardArrowRight","messages","defineMessages","RangeCalendarCustomContext","children","intl","useIntl","buttonContext","ButtonContext","textContext","TextContext","buttonSlots","monthLabel","monthRangeLabel","yearLabel","textSlots","Provider","RangeCalendar","props","recipe","useRecipe","rangeCalendarSlotRecipe","recipeProps","remainingProps","styleProps","otherProps","extractStyleProps","RaRangeCalendar"],"mappings":";;;;;;;;;;;;;;;;;;;;AAcA,MAAM,EAAE,cAAAA,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,KAAK;AACP,CAAC,GAEYC,IAGT,gBAAAH,EAAyD,OAAO,MAAM,GAE7DI,IAA0B,gBAAAH,EAGrC,OAAO,QAAQ,GAEJI,IAAyB,gBAAAJ,EAGpC,OAAO,OAAO,GAEHK,IAA8B,gBAAAL,EAGzC,OAAO,YAAY,GAERM,IAAwB,gBAAAN,EAGnC,SAAS,MAAM,GAEJO,IAA8B,gBAAAP,EAGzC,SAAS,YAAY,GAEVQ,KAA8B,gBAAAR,EAGzC,MAAM,YAAY,GAEPS,KAA4B,gBAAAT,EAGvC,SAAS,UAAU,GAERU,KAAwB,gBAAAV,EAGnC,MAAM,UAAU,GCpCLW,KAAqB,MAAM;AACtC,QAAM,EAAE,QAAAC,EAAA,IAAWC,EAAA,GACbC,IAAUC,EAAkBC,CAAoB,GAEhDC,IAAgBC,EAAWC,CAAyB,GACpDC,IAAqBN,GAAS,iBAAiB,UAAU,GACzDO,IAAYC,EAAMC,GAAkB,GACpCC,IAAkBJ,IAAqB;AAE7C,SACE,gBAAAK,EAACrB,GAAA,EACE,UAAA,MAAM,KAAK,EAAE,QAAQgB,EAAA,GAAsB,CAACM,GAAGC,MAAU;AACxD,UAAMC,IAAWX,EAAc,aAAa,MAAM,IAAI;AAAA,MACpD,QAAQU;AAAA,IAAA,CACT,GACKE,IAAY,IAAI,KAAK,eAAejB,GAAQ;AAAA,MAChD,OAAO;AAAA,IAAA,CACR,EAAE,OAAOgB,EAAS,OAAOL,EAAA,CAAkB,CAAC;AAE7C,WACE,gBAAAO;AAAA,MAACC;AAAA,MAAA;AAAA,QAEC,OAAOX,KAAsB,IAAI,SAAS;AAAA,Q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GAC9D,CAACM,GAAYC,CAAU,IAAIC,EAAkBH,CAAc;AAEjE,SACE,gBAAA/C,EAACvB,GAAA,EAAuB,GAAGqE,GAAc,GAAGE,GAAY,SAAO,IAC7D,UAAA,gBAAAhD,EAACmD,GAAA,EAAiB,GAAGF,GACnB,4BAACtB,IAAA,EACC,UAAA;AAAA,IAAA,gBAAA3B,EAACe,IAAA,EAAoB;AAAA,sBACpB7B,IAAA,CAAA,CAAmB;AAAA,EAAA,EAAA,CACtB,GACF,GACF;AAEJ;"}
@@ -1,2 +1,2 @@
1
- "use strict";const e=require("react/jsx-runtime"),r=require("./Heading-kcnZ-PKv.cjs.js"),M=require("@chakra-ui/react"),$=require("react"),c=require("./useDateFormatter-WCaFojul.cjs.js"),p=require("./utils-DVb3jcp5.cjs.js"),R=require("./context-CyT9C4U4.cjs.js"),S=require("./box-CWni3A32.cjs.js"),u=require("@commercetools/nimbus-icons"),D=require("@chakra-ui/react/flex"),C=require("./stack-CIN13EDn.cjs.js"),P=require("./visually-hidden-BjtXUoFK.cjs.js"),h=require("./icon-button-B28VUff9.cjs.js"),y=require("./text-BtRhIklG.cjs.js"),I=require("./index-CxLKWOES.cjs.js"),T=require("@chakra-ui/react/styled-system"),B=require("./extract-style-props-IfUYxPJV.cjs.js"),j=require("./Button-DLCecw8f.cjs.js"),v=require("./Text-BWSfeB9p.cjs.js"),q=require("react-intl"),{withProvider:N,withContext:i}=M.createSlotRecipeContext({key:"rangeCalendar"}),H=N("div","root"),A=i("div","header"),F=i("div","grids"),G=i("div","monthTitle"),L=i("table","grid"),Y=i("thead","gridHeader"),k=i("th","headerCell"),z=i("tbody","gridBody"),K=i("td","bodyCell"),V=()=>{const{locale:d}=R.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),n=p.$64fa3d84918910a7$export$fabf2dc03a41866e(r.$dfd62f934fc76fed$export$233dd9682e1ad64b),t=$.useContext(r.$dfd62f934fc76fed$export$5e0fc348c00f87a0),o=n?.visibleDuration?.months||1,s=c.$14e0f24ef4ac5c92$export$d0bdf45af03a6ea3(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2()),a=o>1;return e.jsx(F,{children:Array.from({length:o},(m,f)=>{const g=t.visibleRange.start.add({months:f}),x=new Intl.DateTimeFormat(d,{month:"long"}).format(g.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2()));return e.jsxs(S.Box,{width:o==1?"full":"auto",children:[a&&e.jsx(G,{children:x}),e.jsx(L,{asChild:!0,children:e.jsxs(r.$dfd62f934fc76fed$export$5bd780d491cfc46c,{offset:{months:f},weekdayStyle:"short",children:[e.jsx(Y,{asChild:!0,children:e.jsx(r.$dfd62f934fc76fed$export$22e2d15eaa4d2377,{children:l=>e.jsx(k,{asChild:!0,children:e.jsx(r.$dfd62f934fc76fed$export$ad2135cac3a11b3d,{children:l})})})}),e.jsx(z,{asChild:!0,children:e.jsx(r.$dfd62f934fc76fed$export$e11f8ba65d857bff,{children:l=>{const w=l.compare(s)===0;return e.jsx(K,{asChild:!0,"data-today":w,children:e.jsx(r.$dfd62f934fc76fed$export$5d847498420df57b,{date:l})})}})})]})})]},x)})})},W=()=>{const t=(p.$64fa3d84918910a7$export$fabf2dc03a41866e(r.$dfd62f934fc76fed$export$233dd9682e1ad64b)?.visibleDuration?.months||1)>1;return e.jsx(A,{children:e.jsxs(D.Flex,{children:[e.jsxs(C.Stack,{direction:"row",alignItems:"center",children:[e.jsx(P.VisuallyHidden,{children:e.jsx(r.$5cb03073d3f54797$export$a8a3e93435678ff9,{})}),e.jsx(h.IconButton,{slot:t?"previous":"previous-month",size:"xs",variant:"ghost",tone:"primary",children:e.jsx(u.KeyboardArrowLeft,{})}),e.jsx(y.Text,{textStyle:"sm",fontWeight:"500",color:"neutral.11",width:t?"4000":"2000",textAlign:"center","aria-hidden":"true",slot:t?"monthRange":"month"}),e.jsx(h.IconButton,{slot:t?"next":"next-month",size:"xs",variant:"ghost",tone:"primary",children:e.jsx(u.KeyboardArrowRight,{})})]}),e.jsx(S.Box,{flexGrow:"1"}),e.jsxs(C.Stack,{direction:"row",alignItems:"center",children:[e.jsx(h.IconButton,{slot:"previous-year",size:"xs",variant:"ghost",tone:"primary",children:e.jsx(u.KeyboardArrowLeft,{})}),e.jsx(y.Text,{textStyle:"sm",fontWeight:"500",color:"neutral.11",width:"1400",textAlign:"center","aria-hidden":"true",slot:"year"}),e.jsx(h.IconButton,{slot:"next-year",size:"xs",variant:"ghost",tone:"primary",children:e.jsx(u.KeyboardArrowRight,{})})]})]})})},b=q.defineMessages({nextMonth:{id:"Nimbus.RangeCalendar.nextMonth",description:"aria-label for next month navigation button",defaultMessage:"Next month"},previousMonth:{id:"Nimbus.RangeCalendar.previousMonth",description:"aria-label for previous month navigation button",defaultMessage:"Previous month"},nextYear:{id:"Nimbus.RangeCalendar.nextYear",description:"aria-label for next year navigation button",defaultMessage:"Next year"},previousYear:{id:"Nimbus.RangeCalendar.previousYear",description:"aria-label for previous year navigation button",defaultMessage:"Previous year"}}),_=({children:d})=>{const n=q.useIntl(),{locale:t}=R.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),o=$.useContext(j.$d2b4bc8c273e7be6$export$24d547caef80ccd1),s=$.useContext(v.$514c0188e459b4c0$export$9afb8bc826b033ea),a=$.useContext(r.$dfd62f934fc76fed$export$5e0fc348c00f87a0),m={"next-month":{onPress:()=>a.focusNextSection(),"aria-label":n.formatMessage(b.nextMonth)},"previous-month":{onPress:()=>a.focusPreviousSection(),"aria-label":n.formatMessage(b.previousMonth)},"next-year":{onPress:()=>a.focusNextSection(!0),"aria-label":n.formatMessage(b.nextYear)},"previous-year":{onPress:()=>a.focusPreviousSection(!0),"aria-label":n.formatMessage(b.previousYear)}},f=new Intl.DateTimeFormat(t,{month:"long"}).format(a.focusedDate.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2())),g=[new Intl.DateTimeFormat(t,{month:"long"}).format(a.visibleRange.start.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2())),new Intl.DateTimeFormat(t,{month:"long"}).format(a.visibleRange.end.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2()))].join(" - "),x=new Intl.DateTimeFormat(t,{year:"numeric"}).format(a.focusedDate.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2())),l={month:{children:f},monthRange:{children:g},year:{children:x}};return e.jsx(p.$64fa3d84918910a7$export$2881499e37b75b9a,{values:[[j.$d2b4bc8c273e7be6$export$24d547caef80ccd1,{...o,slots:{...o&&typeof o=="object"&&"slots"in o?o.slots:{},...m}}],[v.$514c0188e459b4c0$export$9afb8bc826b033ea,{...s,slots:{...s&&typeof s=="object"&&"slots"in s?s.slots:{},...l}}]],children:d})},E=d=>{const n=T.useRecipe({recipe:I.rangeCalendarSlotRecipe}),[t,o]=n.splitVariantProps(d),[s,a]=B.extractStyleProps(o);return e.jsx(H,{...t,...s,asChild:!0,children:e.jsx(r.$dfd62f934fc76fed$export$a4f5c8b89d277a8d,{...a,children:e.jsxs(_,{children:[e.jsx(W,{}),e.jsx(V,{})]})})})};exports.RangeCalendar=E;
2
- //# sourceMappingURL=range-calendar-BXMVhACe.cjs.js.map
1
+ "use strict";const e=require("react/jsx-runtime"),r=require("./Heading-kcnZ-PKv.cjs.js"),M=require("@chakra-ui/react"),$=require("react"),c=require("./useDateFormatter-WCaFojul.cjs.js"),p=require("./utils-DVb3jcp5.cjs.js"),R=require("./context-CyT9C4U4.cjs.js"),S=require("./box-CWni3A32.cjs.js"),u=require("@commercetools/nimbus-icons"),D=require("@chakra-ui/react/flex"),C=require("./stack-CIN13EDn.cjs.js"),P=require("./visually-hidden-BjtXUoFK.cjs.js"),h=require("./icon-button-CCOl3BcF.cjs.js"),y=require("./text-BtRhIklG.cjs.js"),I=require("./index-hUcMzBfs.cjs.js"),T=require("@chakra-ui/react/styled-system"),B=require("./extract-style-props-0H1Ajy_s.cjs.js"),j=require("./Button-DLCecw8f.cjs.js"),v=require("./Text-BWSfeB9p.cjs.js"),q=require("react-intl"),{withProvider:N,withContext:i}=M.createSlotRecipeContext({key:"rangeCalendar"}),H=N("div","root"),A=i("div","header"),F=i("div","grids"),G=i("div","monthTitle"),L=i("table","grid"),Y=i("thead","gridHeader"),k=i("th","headerCell"),z=i("tbody","gridBody"),K=i("td","bodyCell"),V=()=>{const{locale:d}=R.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),n=p.$64fa3d84918910a7$export$fabf2dc03a41866e(r.$dfd62f934fc76fed$export$233dd9682e1ad64b),t=$.useContext(r.$dfd62f934fc76fed$export$5e0fc348c00f87a0),o=n?.visibleDuration?.months||1,s=c.$14e0f24ef4ac5c92$export$d0bdf45af03a6ea3(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2()),a=o>1;return e.jsx(F,{children:Array.from({length:o},(m,f)=>{const g=t.visibleRange.start.add({months:f}),x=new Intl.DateTimeFormat(d,{month:"long"}).format(g.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2()));return e.jsxs(S.Box,{width:o==1?"full":"auto",children:[a&&e.jsx(G,{children:x}),e.jsx(L,{asChild:!0,children:e.jsxs(r.$dfd62f934fc76fed$export$5bd780d491cfc46c,{offset:{months:f},weekdayStyle:"short",children:[e.jsx(Y,{asChild:!0,children:e.jsx(r.$dfd62f934fc76fed$export$22e2d15eaa4d2377,{children:l=>e.jsx(k,{asChild:!0,children:e.jsx(r.$dfd62f934fc76fed$export$ad2135cac3a11b3d,{children:l})})})}),e.jsx(z,{asChild:!0,children:e.jsx(r.$dfd62f934fc76fed$export$e11f8ba65d857bff,{children:l=>{const w=l.compare(s)===0;return e.jsx(K,{asChild:!0,"data-today":w,children:e.jsx(r.$dfd62f934fc76fed$export$5d847498420df57b,{date:l})})}})})]})})]},x)})})},W=()=>{const t=(p.$64fa3d84918910a7$export$fabf2dc03a41866e(r.$dfd62f934fc76fed$export$233dd9682e1ad64b)?.visibleDuration?.months||1)>1;return e.jsx(A,{children:e.jsxs(D.Flex,{children:[e.jsxs(C.Stack,{direction:"row",alignItems:"center",children:[e.jsx(P.VisuallyHidden,{children:e.jsx(r.$5cb03073d3f54797$export$a8a3e93435678ff9,{})}),e.jsx(h.IconButton,{slot:t?"previous":"previous-month",size:"xs",variant:"ghost",tone:"primary",children:e.jsx(u.KeyboardArrowLeft,{})}),e.jsx(y.Text,{textStyle:"sm",fontWeight:"500",color:"neutral.11",width:t?"4000":"2000",textAlign:"center","aria-hidden":"true",slot:t?"monthRange":"month"}),e.jsx(h.IconButton,{slot:t?"next":"next-month",size:"xs",variant:"ghost",tone:"primary",children:e.jsx(u.KeyboardArrowRight,{})})]}),e.jsx(S.Box,{flexGrow:"1"}),e.jsxs(C.Stack,{direction:"row",alignItems:"center",children:[e.jsx(h.IconButton,{slot:"previous-year",size:"xs",variant:"ghost",tone:"primary",children:e.jsx(u.KeyboardArrowLeft,{})}),e.jsx(y.Text,{textStyle:"sm",fontWeight:"500",color:"neutral.11",width:"1400",textAlign:"center","aria-hidden":"true",slot:"year"}),e.jsx(h.IconButton,{slot:"next-year",size:"xs",variant:"ghost",tone:"primary",children:e.jsx(u.KeyboardArrowRight,{})})]})]})})},b=q.defineMessages({nextMonth:{id:"Nimbus.RangeCalendar.nextMonth",description:"aria-label for next month navigation button",defaultMessage:"Next month"},previousMonth:{id:"Nimbus.RangeCalendar.previousMonth",description:"aria-label for previous month navigation button",defaultMessage:"Previous month"},nextYear:{id:"Nimbus.RangeCalendar.nextYear",description:"aria-label for next year navigation button",defaultMessage:"Next year"},previousYear:{id:"Nimbus.RangeCalendar.previousYear",description:"aria-label for previous year navigation button",defaultMessage:"Previous year"}}),_=({children:d})=>{const n=q.useIntl(),{locale:t}=R.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),o=$.useContext(j.$d2b4bc8c273e7be6$export$24d547caef80ccd1),s=$.useContext(v.$514c0188e459b4c0$export$9afb8bc826b033ea),a=$.useContext(r.$dfd62f934fc76fed$export$5e0fc348c00f87a0),m={"next-month":{onPress:()=>a.focusNextSection(),"aria-label":n.formatMessage(b.nextMonth)},"previous-month":{onPress:()=>a.focusPreviousSection(),"aria-label":n.formatMessage(b.previousMonth)},"next-year":{onPress:()=>a.focusNextSection(!0),"aria-label":n.formatMessage(b.nextYear)},"previous-year":{onPress:()=>a.focusPreviousSection(!0),"aria-label":n.formatMessage(b.previousYear)}},f=new Intl.DateTimeFormat(t,{month:"long"}).format(a.focusedDate.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2())),g=[new Intl.DateTimeFormat(t,{month:"long"}).format(a.visibleRange.start.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2())),new Intl.DateTimeFormat(t,{month:"long"}).format(a.visibleRange.end.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2()))].join(" - "),x=new Intl.DateTimeFormat(t,{year:"numeric"}).format(a.focusedDate.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2())),l={month:{children:f},monthRange:{children:g},year:{children:x}};return e.jsx(p.$64fa3d84918910a7$export$2881499e37b75b9a,{values:[[j.$d2b4bc8c273e7be6$export$24d547caef80ccd1,{...o,slots:{...o&&typeof o=="object"&&"slots"in o?o.slots:{},...m}}],[v.$514c0188e459b4c0$export$9afb8bc826b033ea,{...s,slots:{...s&&typeof s=="object"&&"slots"in s?s.slots:{},...l}}]],children:d})},E=d=>{const n=T.useRecipe({recipe:I.rangeCalendarSlotRecipe}),[t,o]=n.splitVariantProps(d),[s,a]=B.extractStyleProps(o);return e.jsx(H,{...t,...s,asChild:!0,children:e.jsx(r.$dfd62f934fc76fed$export$a4f5c8b89d277a8d,{...a,children:e.jsxs(_,{children:[e.jsx(W,{}),e.jsx(V,{})]})})})};exports.RangeCalendar=E;
2
+ //# sourceMappingURL=range-calendar-DzpS87jK.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"range-calendar-BXMVhACe.cjs.js","sources":["../../src/components/range-calendar/range-calendar.slots.tsx","../../src/components/range-calendar/components/range-calendar.grids.tsx","../../src/components/range-calendar/components/range-calendar.header.tsx","../../src/components/range-calendar/range-calendar.i18n.ts","../../src/components/range-calendar/components/range-calendar.custom-context.tsx","../../src/components/range-calendar/range-calendar.tsx"],"sourcesContent":["import { createSlotRecipeContext } from \"@chakra-ui/react\";\nimport type { SlotComponent } from \"@/type-utils\";\nimport type {\n RangeCalendarRootSlotProps,\n RangeCalendarHeaderSlotProps,\n RangeCalendarGridsSlotProps,\n RangeCalendarMonthTitleSlotProps,\n RangeCalendarGridSlotProps,\n RangeCalendarGridHeaderSlotProps,\n RangeCalendarHeaderCellSlotProps,\n RangeCalendarGridBodySlotProps,\n RangeCalendarCellSlotProps,\n} from \"./range-calendar.types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"rangeCalendar\",\n});\n\nexport const RangeCalendarRootSlot: SlotComponent<\n HTMLDivElement,\n RangeCalendarRootSlotProps\n> = withProvider<HTMLDivElement, RangeCalendarRootSlotProps>(\"div\", \"root\");\n\nexport const RangeCalendarHeaderSlot = withContext<\n HTMLDivElement,\n RangeCalendarHeaderSlotProps\n>(\"div\", \"header\");\n\nexport const RangeCalendarGridsSlot = withContext<\n HTMLDivElement,\n RangeCalendarGridsSlotProps\n>(\"div\", \"grids\");\n\nexport const RangeCalendarMonthTitleSlot = withContext<\n HTMLDivElement,\n RangeCalendarMonthTitleSlotProps\n>(\"div\", \"monthTitle\");\n\nexport const RangeCalendarGridSlot = withContext<\n HTMLTableElement,\n RangeCalendarGridSlotProps\n>(\"table\", \"grid\");\n\nexport const RangeCalendarGridHeaderSlot = withContext<\n HTMLTableSectionElement,\n RangeCalendarGridHeaderSlotProps\n>(\"thead\", \"gridHeader\");\n\nexport const RangeCalendarHeaderCellSlot = withContext<\n HTMLTableCellElement,\n RangeCalendarHeaderCellSlotProps\n>(\"th\", \"headerCell\");\n\nexport const RangeCalendarGridBodySlot = withContext<\n HTMLTableSectionElement,\n RangeCalendarGridBodySlotProps\n>(\"tbody\", \"gridBody\");\n\nexport const RangeCalendarCellSlot = withContext<\n HTMLTableCellElement,\n RangeCalendarCellSlotProps\n>(\"td\", \"bodyCell\");\n","import { useContext } from \"react\";\nimport { today, getLocalTimeZone } from \"@internationalized/date\";\nimport {\n CalendarGrid as RaCalendarGrid,\n CalendarGridBody as RaCalendarGridBody,\n CalendarGridHeader as RaCalendarGridHeader,\n CalendarHeaderCell as RaCalendarHeaderCell,\n CalendarCell as RaCalendarCell,\n useSlottedContext,\n RangeCalendarContext,\n RangeCalendarStateContext,\n useLocale,\n} from \"react-aria-components\";\nimport { Box } from \"@/components\";\n\nimport {\n RangeCalendarCellSlot,\n RangeCalendarGridBodySlot,\n RangeCalendarGridHeaderSlot,\n RangeCalendarGridsSlot,\n RangeCalendarGridSlot,\n RangeCalendarHeaderCellSlot,\n RangeCalendarMonthTitleSlot,\n} from \"../range-calendar.slots\";\n\nexport const RangeCalendarGrids = () => {\n const { locale } = useLocale();\n const context = useSlottedContext(RangeCalendarContext);\n\n const calendarState = useContext(RangeCalendarStateContext)!;\n const visibleMonthsCount = context?.visibleDuration?.months || 1;\n const todayDate = today(getLocalTimeZone());\n const showMonthTitles = visibleMonthsCount > 1;\n\n return (\n <RangeCalendarGridsSlot>\n {Array.from({ length: visibleMonthsCount }, (_, index) => {\n const gridDate = calendarState.visibleRange.start.add({\n months: index,\n });\n const monthName = new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(gridDate.toDate(getLocalTimeZone()));\n\n return (\n <Box\n key={monthName}\n width={visibleMonthsCount == 1 ? \"full\" : \"auto\"}\n >\n {showMonthTitles && (\n <RangeCalendarMonthTitleSlot>\n {monthName}\n </RangeCalendarMonthTitleSlot>\n )}\n <RangeCalendarGridSlot asChild>\n <RaCalendarGrid offset={{ months: index }} weekdayStyle=\"short\">\n <RangeCalendarGridHeaderSlot asChild>\n <RaCalendarGridHeader>\n {(day) => (\n <RangeCalendarHeaderCellSlot asChild>\n <RaCalendarHeaderCell>{day}</RaCalendarHeaderCell>\n </RangeCalendarHeaderCellSlot>\n )}\n </RaCalendarGridHeader>\n </RangeCalendarGridHeaderSlot>\n <RangeCalendarGridBodySlot asChild>\n <RaCalendarGridBody>\n {(date) => {\n const isToday = date.compare(todayDate) === 0;\n return (\n <RangeCalendarCellSlot asChild data-today={isToday}>\n <RaCalendarCell date={date} />\n </RangeCalendarCellSlot>\n );\n }}\n </RaCalendarGridBody>\n </RangeCalendarGridBodySlot>\n </RaCalendarGrid>\n </RangeCalendarGridSlot>\n </Box>\n );\n })}\n </RangeCalendarGridsSlot>\n );\n};\n","import {\n RangeCalendarContext,\n Heading,\n useSlottedContext,\n} from \"react-aria-components\";\nimport {\n Box,\n Flex,\n IconButton,\n Stack,\n Text,\n VisuallyHidden,\n} from \"@/components\";\nimport {\n KeyboardArrowLeft,\n KeyboardArrowRight,\n} from \"@commercetools/nimbus-icons\";\nimport { RangeCalendarHeaderSlot } from \"../range-calendar.slots\";\n\nexport const RangeCalendarHeader = () => {\n const rangeCalendarProps = useSlottedContext(RangeCalendarContext);\n\n // Needed to decide whether to show a single month or a range\n const visibleDurationMonths =\n rangeCalendarProps?.visibleDuration?.months || 1;\n const showRangeLabel = visibleDurationMonths > 1;\n\n return (\n <RangeCalendarHeaderSlot>\n <Flex>\n <Stack direction=\"row\" alignItems=\"center\">\n {/** solely for screen readers, if not present, a11y issues are raised */}\n <VisuallyHidden>\n <Heading />\n </VisuallyHidden>\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot={showRangeLabel ? \"previous\" : \"previous-month\"}\n size=\"xs\"\n variant=\"ghost\"\n tone=\"primary\"\n >\n <KeyboardArrowLeft />\n </IconButton>\n <Text\n textStyle=\"sm\"\n fontWeight=\"500\"\n color=\"neutral.11\"\n width={showRangeLabel ? \"4000\" : \"2000\"}\n textAlign=\"center\"\n aria-hidden=\"true\"\n slot={showRangeLabel ? \"monthRange\" : \"month\"}\n />\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot={showRangeLabel ? \"next\" : \"next-month\"}\n size=\"xs\"\n variant=\"ghost\"\n tone=\"primary\"\n >\n <KeyboardArrowRight />\n </IconButton>\n </Stack>\n <Box flexGrow=\"1\" />\n <Stack direction=\"row\" alignItems=\"center\">\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot=\"previous-year\"\n size=\"xs\"\n variant=\"ghost\"\n tone=\"primary\"\n >\n <KeyboardArrowLeft />\n </IconButton>\n <Text\n textStyle=\"sm\"\n fontWeight=\"500\"\n color=\"neutral.11\"\n width=\"1400\"\n textAlign=\"center\"\n aria-hidden=\"true\"\n slot=\"year\"\n />\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton slot=\"next-year\" size=\"xs\" variant=\"ghost\" tone=\"primary\">\n <KeyboardArrowRight />\n </IconButton>\n </Stack>\n </Flex>\n </RangeCalendarHeaderSlot>\n );\n};\n","import { defineMessages } from \"react-intl\";\n\nexport const messages = defineMessages({\n nextMonth: {\n id: \"Nimbus.RangeCalendar.nextMonth\",\n description: \"aria-label for next month navigation button\",\n defaultMessage: \"Next month\",\n },\n previousMonth: {\n id: \"Nimbus.RangeCalendar.previousMonth\",\n description: \"aria-label for previous month navigation button\",\n defaultMessage: \"Previous month\",\n },\n nextYear: {\n id: \"Nimbus.RangeCalendar.nextYear\",\n description: \"aria-label for next year navigation button\",\n defaultMessage: \"Next year\",\n },\n previousYear: {\n id: \"Nimbus.RangeCalendar.previousYear\",\n description: \"aria-label for previous year navigation button\",\n defaultMessage: \"Previous year\",\n },\n});\n","import { getLocalTimeZone } from \"@internationalized/date\";\nimport { useContext } from \"react\";\nimport {\n Provider,\n ButtonContext,\n RangeCalendarStateContext,\n TextContext,\n useLocale,\n} from \"react-aria-components\";\nimport { useIntl } from \"react-intl\";\nimport { messages } from \"../range-calendar.i18n\";\n\nexport const RangeCalendarCustomContext = ({\n children,\n}: {\n children: React.ReactNode;\n}) => {\n const intl = useIntl();\n const { locale } = useLocale();\n const buttonContext = useContext(ButtonContext)!;\n const textContext = useContext(TextContext)!;\n const calendarState = useContext(RangeCalendarStateContext)!;\n\n /**\n * Button slots\n * ================================\n */\n const buttonSlots = {\n \"next-month\": {\n onPress: () => calendarState.focusNextSection(),\n \"aria-label\": intl.formatMessage(messages.nextMonth),\n },\n \"previous-month\": {\n onPress: () => calendarState.focusPreviousSection(),\n \"aria-label\": intl.formatMessage(messages.previousMonth),\n },\n \"next-year\": {\n onPress: () => calendarState.focusNextSection(true),\n \"aria-label\": intl.formatMessage(messages.nextYear),\n },\n \"previous-year\": {\n onPress: () => calendarState.focusPreviousSection(true),\n \"aria-label\": intl.formatMessage(messages.previousYear),\n },\n };\n\n /**\n * Text slots\n * ================================\n */\n const monthLabel = new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.focusedDate.toDate(getLocalTimeZone()));\n\n const monthRangeLabel = [\n new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.visibleRange.start.toDate(getLocalTimeZone())),\n new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.visibleRange.end.toDate(getLocalTimeZone())),\n ].join(\" - \");\n\n const yearLabel = new Intl.DateTimeFormat(locale, {\n year: \"numeric\",\n }).format(calendarState.focusedDate.toDate(getLocalTimeZone()));\n\n const textSlots = {\n month: { children: monthLabel },\n monthRange: { children: monthRangeLabel },\n year: { children: yearLabel },\n };\n\n return (\n <Provider\n values={[\n [\n ButtonContext,\n {\n ...buttonContext,\n slots: {\n ...(buttonContext &&\n typeof buttonContext === \"object\" &&\n \"slots\" in buttonContext\n ? buttonContext.slots\n : {}),\n ...buttonSlots,\n },\n },\n ],\n [\n TextContext,\n {\n ...textContext,\n slots: {\n ...(textContext &&\n typeof textContext === \"object\" &&\n \"slots\" in textContext\n ? textContext.slots\n : {}),\n ...textSlots,\n },\n },\n ],\n ]}\n >\n {children}\n </Provider>\n );\n};\n","import type { RangeCalendarProps } from \"./range-calendar.types\";\nimport type { DateValue } from \"@internationalized/date\";\n\nimport { RangeCalendar as RaRangeCalendar } from \"react-aria-components\";\n\nimport { RangeCalendarRootSlot } from \"./range-calendar.slots\";\nimport { RangeCalendarGrids } from \"./components/range-calendar.grids\";\nimport { RangeCalendarHeader } from \"./components/range-calendar.header\";\nimport { rangeCalendarSlotRecipe } from \"./range-calendar.recipe\";\nimport { useRecipe } from \"@chakra-ui/react/styled-system\";\nimport { extractStyleProps } from \"@/utils\";\nimport { RangeCalendarCustomContext } from \"./components/range-calendar.custom-context\";\n\nexport const RangeCalendar = (props: RangeCalendarProps<DateValue>) => {\n const recipe = useRecipe({ recipe: rangeCalendarSlotRecipe });\n const [recipeProps, remainingProps] = recipe.splitVariantProps(props);\n const [styleProps, otherProps] = extractStyleProps(remainingProps);\n\n return (\n <RangeCalendarRootSlot {...recipeProps} {...styleProps} asChild>\n <RaRangeCalendar {...otherProps}>\n <RangeCalendarCustomContext>\n <RangeCalendarHeader />\n <RangeCalendarGrids />\n </RangeCalendarCustomContext>\n </RaRangeCalendar>\n </RangeCalendarRootSlot>\n );\n};\n"],"names":["withProvider","withContext","createSlotRecipeContext","RangeCalendarRootSlot","RangeCalendarHeaderSlot","RangeCalendarGridsSlot","RangeCalendarMonthTitleSlot","RangeCalendarGridSlot","RangeCalendarGridHeaderSlot","RangeCalendarHeaderCellSlot","RangeCalendarGridBodySlot","RangeCalendarCellSlot","RangeCalendarGrids","locale","useLocale","context","useSlottedContext","RangeCalendarContext","calendarState","useContext","RangeCalendarStateContext","visibleMonthsCount","todayDate","today","getLocalTimeZone","showMonthTitles","jsx","_","index","gridDate","monthName","jsxs","Box","RaCalendarGrid","RaCalendarGridHeader","day","RaCalendarHeaderCell","RaCalendarGridBody","date","isToday","RaCalendarCell","RangeCalendarHeader","showRangeLabel","Flex","Stack","VisuallyHidden","Heading","IconButton","KeyboardArrowLeft","Text","KeyboardArrowRight","messages","defineMessages","RangeCalendarCustomContext","children","intl","useIntl","buttonContext","ButtonContext","textContext","TextContext","buttonSlots","monthLabel","monthRangeLabel","yearLabel","textSlots","Provider","RangeCalendar","props","recipe","useRecipe","rangeCalendarSlotRecipe","recipeProps","remainingProps","styleProps","otherProps","extractStyleProps","RaRangeCalendar"],"mappings":"8vBAcM,CAAE,aAAAA,EAAc,YAAAC,CAAA,EAAgBC,0BAAwB,CAC5D,IAAK,eACP,CAAC,EAEYC,EAGTH,EAAyD,MAAO,MAAM,EAE7DI,EAA0BH,EAGrC,MAAO,QAAQ,EAEJI,EAAyBJ,EAGpC,MAAO,OAAO,EAEHK,EAA8BL,EAGzC,MAAO,YAAY,EAERM,EAAwBN,EAGnC,QAAS,MAAM,EAEJO,EAA8BP,EAGzC,QAAS,YAAY,EAEVQ,EAA8BR,EAGzC,KAAM,YAAY,EAEPS,EAA4BT,EAGvC,QAAS,UAAU,EAERU,EAAwBV,EAGnC,KAAM,UAAU,ECpCLW,EAAqB,IAAM,CACtC,KAAM,CAAE,OAAAC,CAAA,EAAWC,4CAAA,EACbC,EAAUC,EAAAA,0CAAkBC,2CAAoB,EAEhDC,EAAgBC,EAAAA,WAAWC,2CAAyB,EACpDC,EAAqBN,GAAS,iBAAiB,QAAU,EACzDO,EAAYC,4CAAMC,EAAAA,2CAAkB,EACpCC,EAAkBJ,EAAqB,EAE7C,OACEK,MAACrB,EAAA,CACE,SAAA,MAAM,KAAK,CAAE,OAAQgB,CAAA,EAAsB,CAACM,EAAGC,IAAU,CACxD,MAAMC,EAAWX,EAAc,aAAa,MAAM,IAAI,CACpD,OAAQU,CAAA,CACT,EACKE,EAAY,IAAI,KAAK,eAAejB,EAAQ,CAChD,MAAO,MAAA,CACR,EAAE,OAAOgB,EAAS,OAAOL,EAAAA,0CAAA,CAAkB,CAAC,EAE7C,OACEO,EAAAA,KAACC,EAAAA,IAAA,CAEC,MAAOX,GAAsB,EAAI,OAAS,OAEzC,SAAA,CAAAI,GACCC,EAAAA,IAACpB,GACE,SAAAwB,CAAA,CACH,EAEFJ,EAAAA,IAACnB,E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AAA,CACC,OAAQ,CACN,CACER,EAAAA,0CACA,CACE,GAAGD,EACH,MAAO,CACL,GAAIA,GACJ,OAAOA,GAAkB,UACzB,UAAWA,EACPA,EAAc,MACd,CAAA,EACJ,GAAGI,CAAA,CACL,CACF,EAEF,CACED,EAAAA,0CACA,CACE,GAAGD,EACH,MAAO,CACL,GAAIA,GACJ,OAAOA,GAAgB,UACvB,UAAWA,EACPA,EAAY,MACZ,CAAA,EACJ,GAAGM,CAAA,CACL,CACF,CACF,EAGD,SAAAX,CAAA,CAAA,CAGP,EChGaa,EAAiBC,GAAyC,CACrE,MAAMC,EAASC,EAAAA,UAAU,CAAE,OAAQC,EAAAA,wBAAyB,EACtD,CAACC,EAAaC,CAAc,EAAIJ,EAAO,kBAAkBD,CAAK,EAC9D,CAACM,EAAYC,CAAU,EAAIC,EAAAA,kBAAkBH,CAAc,EAEjE,OACE/C,EAAAA,IAACvB,EAAA,CAAuB,GAAGqE,EAAc,GAAGE,EAAY,QAAO,GAC7D,SAAAhD,EAAAA,IAACmD,EAAAA,0CAAA,CAAiB,GAAGF,EACnB,gBAACtB,EAAA,CACC,SAAA,CAAA3B,EAAAA,IAACe,EAAA,EAAoB,QACpB7B,EAAA,CAAA,CAAmB,CAAA,CAAA,CACtB,EACF,EACF,CAEJ"}
1
+ {"version":3,"file":"range-calendar-DzpS87jK.cjs.js","sources":["../../src/components/range-calendar/range-calendar.slots.tsx","../../src/components/range-calendar/components/range-calendar.grids.tsx","../../src/components/range-calendar/components/range-calendar.header.tsx","../../src/components/range-calendar/range-calendar.i18n.ts","../../src/components/range-calendar/components/range-calendar.custom-context.tsx","../../src/components/range-calendar/range-calendar.tsx"],"sourcesContent":["import { createSlotRecipeContext } from \"@chakra-ui/react\";\nimport type { SlotComponent } from \"@/type-utils\";\nimport type {\n RangeCalendarRootSlotProps,\n RangeCalendarHeaderSlotProps,\n RangeCalendarGridsSlotProps,\n RangeCalendarMonthTitleSlotProps,\n RangeCalendarGridSlotProps,\n RangeCalendarGridHeaderSlotProps,\n RangeCalendarHeaderCellSlotProps,\n RangeCalendarGridBodySlotProps,\n RangeCalendarCellSlotProps,\n} from \"./range-calendar.types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"rangeCalendar\",\n});\n\nexport const RangeCalendarRootSlot: SlotComponent<\n HTMLDivElement,\n RangeCalendarRootSlotProps\n> = withProvider<HTMLDivElement, RangeCalendarRootSlotProps>(\"div\", \"root\");\n\nexport const RangeCalendarHeaderSlot = withContext<\n HTMLDivElement,\n RangeCalendarHeaderSlotProps\n>(\"div\", \"header\");\n\nexport const RangeCalendarGridsSlot = withContext<\n HTMLDivElement,\n RangeCalendarGridsSlotProps\n>(\"div\", \"grids\");\n\nexport const RangeCalendarMonthTitleSlot = withContext<\n HTMLDivElement,\n RangeCalendarMonthTitleSlotProps\n>(\"div\", \"monthTitle\");\n\nexport const RangeCalendarGridSlot = withContext<\n HTMLTableElement,\n RangeCalendarGridSlotProps\n>(\"table\", \"grid\");\n\nexport const RangeCalendarGridHeaderSlot = withContext<\n HTMLTableSectionElement,\n RangeCalendarGridHeaderSlotProps\n>(\"thead\", \"gridHeader\");\n\nexport const RangeCalendarHeaderCellSlot = withContext<\n HTMLTableCellElement,\n RangeCalendarHeaderCellSlotProps\n>(\"th\", \"headerCell\");\n\nexport const RangeCalendarGridBodySlot = withContext<\n HTMLTableSectionElement,\n RangeCalendarGridBodySlotProps\n>(\"tbody\", \"gridBody\");\n\nexport const RangeCalendarCellSlot = withContext<\n HTMLTableCellElement,\n RangeCalendarCellSlotProps\n>(\"td\", \"bodyCell\");\n","import { useContext } from \"react\";\nimport { today, getLocalTimeZone } from \"@internationalized/date\";\nimport {\n CalendarGrid as RaCalendarGrid,\n CalendarGridBody as RaCalendarGridBody,\n CalendarGridHeader as RaCalendarGridHeader,\n CalendarHeaderCell as RaCalendarHeaderCell,\n CalendarCell as RaCalendarCell,\n useSlottedContext,\n RangeCalendarContext,\n RangeCalendarStateContext,\n useLocale,\n} from \"react-aria-components\";\nimport { Box } from \"@/components\";\n\nimport {\n RangeCalendarCellSlot,\n RangeCalendarGridBodySlot,\n RangeCalendarGridHeaderSlot,\n RangeCalendarGridsSlot,\n RangeCalendarGridSlot,\n RangeCalendarHeaderCellSlot,\n RangeCalendarMonthTitleSlot,\n} from \"../range-calendar.slots\";\n\nexport const RangeCalendarGrids = () => {\n const { locale } = useLocale();\n const context = useSlottedContext(RangeCalendarContext);\n\n const calendarState = useContext(RangeCalendarStateContext)!;\n const visibleMonthsCount = context?.visibleDuration?.months || 1;\n const todayDate = today(getLocalTimeZone());\n const showMonthTitles = visibleMonthsCount > 1;\n\n return (\n <RangeCalendarGridsSlot>\n {Array.from({ length: visibleMonthsCount }, (_, index) => {\n const gridDate = calendarState.visibleRange.start.add({\n months: index,\n });\n const monthName = new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(gridDate.toDate(getLocalTimeZone()));\n\n return (\n <Box\n key={monthName}\n width={visibleMonthsCount == 1 ? \"full\" : \"auto\"}\n >\n {showMonthTitles && (\n <RangeCalendarMonthTitleSlot>\n {monthName}\n </RangeCalendarMonthTitleSlot>\n )}\n <RangeCalendarGridSlot asChild>\n <RaCalendarGrid offset={{ months: index }} weekdayStyle=\"short\">\n <RangeCalendarGridHeaderSlot asChild>\n <RaCalendarGridHeader>\n {(day) => (\n <RangeCalendarHeaderCellSlot asChild>\n <RaCalendarHeaderCell>{day}</RaCalendarHeaderCell>\n </RangeCalendarHeaderCellSlot>\n )}\n </RaCalendarGridHeader>\n </RangeCalendarGridHeaderSlot>\n <RangeCalendarGridBodySlot asChild>\n <RaCalendarGridBody>\n {(date) => {\n const isToday = date.compare(todayDate) === 0;\n return (\n <RangeCalendarCellSlot asChild data-today={isToday}>\n <RaCalendarCell date={date} />\n </RangeCalendarCellSlot>\n );\n }}\n </RaCalendarGridBody>\n </RangeCalendarGridBodySlot>\n </RaCalendarGrid>\n </RangeCalendarGridSlot>\n </Box>\n );\n })}\n </RangeCalendarGridsSlot>\n );\n};\n","import {\n RangeCalendarContext,\n Heading,\n useSlottedContext,\n} from \"react-aria-components\";\nimport {\n Box,\n Flex,\n IconButton,\n Stack,\n Text,\n VisuallyHidden,\n} from \"@/components\";\nimport {\n KeyboardArrowLeft,\n KeyboardArrowRight,\n} from \"@commercetools/nimbus-icons\";\nimport { RangeCalendarHeaderSlot } from \"../range-calendar.slots\";\n\nexport const RangeCalendarHeader = () => {\n const rangeCalendarProps = useSlottedContext(RangeCalendarContext);\n\n // Needed to decide whether to show a single month or a range\n const visibleDurationMonths =\n rangeCalendarProps?.visibleDuration?.months || 1;\n const showRangeLabel = visibleDurationMonths > 1;\n\n return (\n <RangeCalendarHeaderSlot>\n <Flex>\n <Stack direction=\"row\" alignItems=\"center\">\n {/** solely for screen readers, if not present, a11y issues are raised */}\n <VisuallyHidden>\n <Heading />\n </VisuallyHidden>\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot={showRangeLabel ? \"previous\" : \"previous-month\"}\n size=\"xs\"\n variant=\"ghost\"\n tone=\"primary\"\n >\n <KeyboardArrowLeft />\n </IconButton>\n <Text\n textStyle=\"sm\"\n fontWeight=\"500\"\n color=\"neutral.11\"\n width={showRangeLabel ? \"4000\" : \"2000\"}\n textAlign=\"center\"\n aria-hidden=\"true\"\n slot={showRangeLabel ? \"monthRange\" : \"month\"}\n />\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot={showRangeLabel ? \"next\" : \"next-month\"}\n size=\"xs\"\n variant=\"ghost\"\n tone=\"primary\"\n >\n <KeyboardArrowRight />\n </IconButton>\n </Stack>\n <Box flexGrow=\"1\" />\n <Stack direction=\"row\" alignItems=\"center\">\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot=\"previous-year\"\n size=\"xs\"\n variant=\"ghost\"\n tone=\"primary\"\n >\n <KeyboardArrowLeft />\n </IconButton>\n <Text\n textStyle=\"sm\"\n fontWeight=\"500\"\n color=\"neutral.11\"\n width=\"1400\"\n textAlign=\"center\"\n aria-hidden=\"true\"\n slot=\"year\"\n />\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton slot=\"next-year\" size=\"xs\" variant=\"ghost\" tone=\"primary\">\n <KeyboardArrowRight />\n </IconButton>\n </Stack>\n </Flex>\n </RangeCalendarHeaderSlot>\n );\n};\n","import { defineMessages } from \"react-intl\";\n\nexport const messages = defineMessages({\n nextMonth: {\n id: \"Nimbus.RangeCalendar.nextMonth\",\n description: \"aria-label for next month navigation button\",\n defaultMessage: \"Next month\",\n },\n previousMonth: {\n id: \"Nimbus.RangeCalendar.previousMonth\",\n description: \"aria-label for previous month navigation button\",\n defaultMessage: \"Previous month\",\n },\n nextYear: {\n id: \"Nimbus.RangeCalendar.nextYear\",\n description: \"aria-label for next year navigation button\",\n defaultMessage: \"Next year\",\n },\n previousYear: {\n id: \"Nimbus.RangeCalendar.previousYear\",\n description: \"aria-label for previous year navigation button\",\n defaultMessage: \"Previous year\",\n },\n});\n","import { getLocalTimeZone } from \"@internationalized/date\";\nimport { useContext } from \"react\";\nimport {\n Provider,\n ButtonContext,\n RangeCalendarStateContext,\n TextContext,\n useLocale,\n} from \"react-aria-components\";\nimport { useIntl } from \"react-intl\";\nimport { messages } from \"../range-calendar.i18n\";\n\nexport const RangeCalendarCustomContext = ({\n children,\n}: {\n children: React.ReactNode;\n}) => {\n const intl = useIntl();\n const { locale } = useLocale();\n const buttonContext = useContext(ButtonContext)!;\n const textContext = useContext(TextContext)!;\n const calendarState = useContext(RangeCalendarStateContext)!;\n\n /**\n * Button slots\n * ================================\n */\n const buttonSlots = {\n \"next-month\": {\n onPress: () => calendarState.focusNextSection(),\n \"aria-label\": intl.formatMessage(messages.nextMonth),\n },\n \"previous-month\": {\n onPress: () => calendarState.focusPreviousSection(),\n \"aria-label\": intl.formatMessage(messages.previousMonth),\n },\n \"next-year\": {\n onPress: () => calendarState.focusNextSection(true),\n \"aria-label\": intl.formatMessage(messages.nextYear),\n },\n \"previous-year\": {\n onPress: () => calendarState.focusPreviousSection(true),\n \"aria-label\": intl.formatMessage(messages.previousYear),\n },\n };\n\n /**\n * Text slots\n * ================================\n */\n const monthLabel = new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.focusedDate.toDate(getLocalTimeZone()));\n\n const monthRangeLabel = [\n new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.visibleRange.start.toDate(getLocalTimeZone())),\n new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.visibleRange.end.toDate(getLocalTimeZone())),\n ].join(\" - \");\n\n const yearLabel = new Intl.DateTimeFormat(locale, {\n year: \"numeric\",\n }).format(calendarState.focusedDate.toDate(getLocalTimeZone()));\n\n const textSlots = {\n month: { children: monthLabel },\n monthRange: { children: monthRangeLabel },\n year: { children: yearLabel },\n };\n\n return (\n <Provider\n values={[\n [\n ButtonContext,\n {\n ...buttonContext,\n slots: {\n ...(buttonContext &&\n typeof buttonContext === \"object\" &&\n \"slots\" in buttonContext\n ? buttonContext.slots\n : {}),\n ...buttonSlots,\n },\n },\n ],\n [\n TextContext,\n {\n ...textContext,\n slots: {\n ...(textContext &&\n typeof textContext === \"object\" &&\n \"slots\" in textContext\n ? textContext.slots\n : {}),\n ...textSlots,\n },\n },\n ],\n ]}\n >\n {children}\n </Provider>\n );\n};\n","import type { RangeCalendarProps } from \"./range-calendar.types\";\nimport type { DateValue } from \"@internationalized/date\";\n\nimport { RangeCalendar as RaRangeCalendar } from \"react-aria-components\";\n\nimport { RangeCalendarRootSlot } from \"./range-calendar.slots\";\nimport { RangeCalendarGrids } from \"./components/range-calendar.grids\";\nimport { RangeCalendarHeader } from \"./components/range-calendar.header\";\nimport { rangeCalendarSlotRecipe } from \"./range-calendar.recipe\";\nimport { useRecipe } from \"@chakra-ui/react/styled-system\";\nimport { extractStyleProps } from \"@/utils\";\nimport { RangeCalendarCustomContext } from \"./components/range-calendar.custom-context\";\n\nexport const RangeCalendar = (props: RangeCalendarProps<DateValue>) => {\n const recipe = useRecipe({ recipe: rangeCalendarSlotRecipe });\n const [recipeProps, remainingProps] = recipe.splitVariantProps(props);\n const [styleProps, otherProps] = extractStyleProps(remainingProps);\n\n return (\n <RangeCalendarRootSlot {...recipeProps} {...styleProps} asChild>\n <RaRangeCalendar {...otherProps}>\n <RangeCalendarCustomContext>\n <RangeCalendarHeader />\n <RangeCalendarGrids />\n </RangeCalendarCustomContext>\n </RaRangeCalendar>\n </RangeCalendarRootSlot>\n );\n};\n"],"names":["withProvider","withContext","createSlotRecipeContext","RangeCalendarRootSlot","RangeCalendarHeaderSlot","RangeCalendarGridsSlot","RangeCalendarMonthTitleSlot","RangeCalendarGridSlot","RangeCalendarGridHeaderSlot","RangeCalendarHeaderCellSlot","RangeCalendarGridBodySlot","RangeCalendarCellSlot","RangeCalendarGrids","locale","useLocale","context","useSlottedContext","RangeCalendarContext","calendarState","useContext","RangeCalendarStateContext","visibleMonthsCount","todayDate","today","getLocalTimeZone","showMonthTitles","jsx","_","index","gridDate","monthName","jsxs","Box","RaCalendarGrid","RaCalendarGridHeader","day","RaCalendarHeaderCell","RaCalendarGridBody","date","isToday","RaCalendarCell","RangeCalendarHeader","showRangeLabel","Flex","Stack","VisuallyHidden","Heading","IconButton","KeyboardArrowLeft","Text","KeyboardArrowRight","messages","defineMessages","RangeCalendarCustomContext","children","intl","useIntl","buttonContext","ButtonContext","textContext","TextContext","buttonSlots","monthLabel","monthRangeLabel","yearLabel","textSlots","Provider","RangeCalendar","props","recipe","useRecipe","rangeCalendarSlotRecipe","recipeProps","remainingProps","styleProps","otherProps","extractStyleProps","RaRangeCalendar"],"mappings":"8vBAcM,CAAE,aAAAA,EAAc,YAAAC,CAAA,EAAgBC,0BAAwB,CAC5D,IAAK,eACP,CAAC,EAEYC,EAGTH,EAAyD,MAAO,MAAM,EAE7DI,EAA0BH,EAGrC,MAAO,QAAQ,EAEJI,EAAy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GD,SAAAX,CAAA,CAAA,CAGP,EChGaa,EAAiBC,GAAyC,CACrE,MAAMC,EAASC,EAAAA,UAAU,CAAE,OAAQC,EAAAA,wBAAyB,EACtD,CAACC,EAAaC,CAAc,EAAIJ,EAAO,kBAAkBD,CAAK,EAC9D,CAACM,EAAYC,CAAU,EAAIC,EAAAA,kBAAkBH,CAAc,EAEjE,OACE/C,EAAAA,IAACvB,EAAA,CAAuB,GAAGqE,EAAc,GAAGE,EAAY,QAAO,GAC7D,SAAAhD,EAAAA,IAACmD,EAAAA,0CAAA,CAAiB,GAAGF,EACnB,gBAACtB,EAAA,CACC,SAAA,CAAA3B,EAAAA,IAACe,EAAA,EAAoB,QACpB7B,EAAA,CAAA,CAAmB,CAAA,CAAA,CACtB,EACF,EACF,CAEJ"}
@@ -1,4 +1,4 @@
1
- "use strict";const s=require("react/jsx-runtime"),f=require("react"),te=require("@chakra-ui/react"),we=require("./extract-style-props-IfUYxPJV.cjs.js"),c=require("slate"),I=require("slate-react"),Ee=require("slate-history"),Ie=require("./useObjectRef-4v2MxSjQ.cjs.js"),re=require("react-intl"),ne=require("./group-Cjq5lNQD.cjs.js"),w=require("@commercetools/nimbus-icons"),E=require("./menu-DK0AShnF.cjs.js"),b=require("./tooltip-Aar_qzmT.cjs.js"),Z=require("./icon-button-B28VUff9.cjs.js"),O=require("./box-CWni3A32.cjs.js"),A=require("./text-BtRhIklG.cjs.js"),Ce=require("./toolbar-BHdgjOW4.cjs.js"),oe=require("./separator-Vxu9fPdc.cjs.js"),ie=require("./toggle-button-group-BQczQ6D_.cjs.js"),$=require("./icon-toggle-button-DPOco2hU.cjs.js"),V=require("./visually-hidden-BjtXUoFK.cjs.js"),ve=require("./index-CxLKWOES.cjs.js");function se(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}const{withProvider:Ne,withContext:ge}=te.createSlotRecipeContext({key:"richTextInput"}),Ae=Ne("div","root"),De=ge("div","toolbar"),Fe=ge("div","editable");/*!
1
+ "use strict";const s=require("react/jsx-runtime"),f=require("react"),te=require("@chakra-ui/react"),we=require("./extract-style-props-0H1Ajy_s.cjs.js"),c=require("slate"),I=require("slate-react"),Ee=require("slate-history"),Ie=require("./useObjectRef-4v2MxSjQ.cjs.js"),re=require("react-intl"),ne=require("./group-Cjq5lNQD.cjs.js"),w=require("@commercetools/nimbus-icons"),E=require("./menu-CbD9H5r5.cjs.js"),b=require("./tooltip-Aar_qzmT.cjs.js"),Z=require("./icon-button-CCOl3BcF.cjs.js"),O=require("./box-CWni3A32.cjs.js"),A=require("./text-BtRhIklG.cjs.js"),Ce=require("./toolbar-BnFBy7d8.cjs.js"),oe=require("./separator-CZmCrqww.cjs.js"),ie=require("./toggle-button-group-BQczQ6D_.cjs.js"),$=require("./icon-toggle-button-CpvcaoHY.cjs.js"),V=require("./visually-hidden-BjtXUoFK.cjs.js"),ve=require("./index-hUcMzBfs.cjs.js");function se(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}const{withProvider:Ne,withContext:ge}=te.createSlotRecipeContext({key:"richTextInput"}),Ae=Ne("div","root"),De=ge("div","toolbar"),Fe=ge("div","editable");/*!
2
2
  * escape-html
3
3
  * Copyright(c) 2012-2013 TJ Holowaychuk
4
4
  * Copyright(c) 2015 Andreas Lubbe
@@ -7,4 +7,4 @@
7
7
  */var Y,ae;function He(){if(ae)return Y;ae=1;var t=/["'&<>]/;Y=e;function e(r){var o=""+r,n=t.exec(o);if(!n)return o;var l,d="",p=0,h=0;for(p=n.index;p<o.length;p++){switch(o.charCodeAt(p)){case 34:l="&quot;";break;case 38:l="&amp;";break;case 39:l="&#39;";break;case 60:l="&lt;";break;case 62:l="&gt;";break;default:continue}h!==p&&(d+=o.substring(h,p)),h=p+1,d+=l}return h!==p?d+o.substring(h,p):d}return Y}var Le=He();const U=se(Le),le={"mod+b":"bold","mod+i":"italic","mod+u":"underline","mod+`":"code"},G={placeholder:"Start typing...",isDisabled:!1,isReadOnly:!1,autoFocus:!1},ce={blockquote:"block-quote",p:"paragraph",pre:"code",h1:"heading-one",h2:"heading-two",h3:"heading-three",h4:"heading-four",h5:"heading-five",ul:"bulleted-list",ol:"numbered-list",li:"list-item",a:"link"},ue={strong:"bold",b:"bold",em:"italic",i:"italic",u:"underline",code:"code",sup:"superscript",sub:"subscript",del:"strikethrough",s:"strikethrough"},W={STRIKETHROUGH:"strikethrough",CODE:"code",SUPERSCRIPT:"superscript",SUBSCRIPT:"subscript"},Ke=[W.STRIKETHROUGH,W.CODE],qe=[W.SUPERSCRIPT,W.SUBSCRIPT],u=re.defineMessages({textFormatting:{id:"Nimbus.RichTextInput.textFormatting",description:"aria-label for the text formatting toolbar",defaultMessage:"Text formatting"},textStyleMenu:{id:"Nimbus.RichTextInput.textStyleMenu",description:"aria-label for the text style menu trigger button",defaultMessage:"Text style menu"},textStyle:{id:"Nimbus.RichTextInput.textStyle",description:"tooltip text for the text style menu",defaultMessage:"Text style"},bold:{id:"Nimbus.RichTextInput.bold",description:"aria-label and tooltip for the bold formatting button",defaultMessage:"Bold"},italic:{id:"Nimbus.RichTextInput.italic",description:"aria-label and tooltip for the italic formatting button",defaultMessage:"Italic"},underline:{id:"Nimbus.RichTextInput.underline",description:"aria-label and tooltip for the underline formatting button",defaultMessage:"Underline"},listFormatting:{id:"Nimbus.RichTextInput.listFormatting",description:"aria-label for the list formatting toggle group",defaultMessage:"List formatting"},bulletedList:{id:"Nimbus.RichTextInput.bulletedList",description:"aria-label for the bulleted list button",defaultMessage:"Bulleted list"},numberedList:{id:"Nimbus.RichTextInput.numberedList",description:"aria-label for the numbered list button",defaultMessage:"Numbered list"},undo:{id:"Nimbus.RichTextInput.undo",description:"aria-label and tooltip for the undo button",defaultMessage:"Undo"},redo:{id:"Nimbus.RichTextInput.redo",description:"aria-label and tooltip for the redo button",defaultMessage:"Redo"},moreFormattingOptions:{id:"Nimbus.RichTextInput.moreFormattingOptions",description:"aria-label for the more formatting options menu button",defaultMessage:"More formatting options"},moreStyles:{id:"Nimbus.RichTextInput.moreStyles",description:"tooltip text for the more formatting options menu",defaultMessage:"More styles"},strikethrough:{id:"Nimbus.RichTextInput.strikethrough",description:"label for the strikethrough menu item",defaultMessage:"Strikethrough"},code:{id:"Nimbus.RichTextInput.code",description:"label for the code formatting menu item",defaultMessage:"Code"},superscript:{id:"Nimbus.RichTextInput.superscript",description:"label for the superscript formatting menu item",defaultMessage:"Superscript"},subscript:{id:"Nimbus.RichTextInput.subscript",description:"label for the subscript formatting menu item",defaultMessage:"Subscript"},paragraph:{id:"Nimbus.RichTextInput.paragraph",description:"label for paragraph text style",defaultMessage:"Paragraph"},headingOne:{id:"Nimbus.RichTextInput.headingOne",description:"label for heading 1 text style",defaultMessage:"Heading 1"},headingTwo:{id:"Nimbus.RichTextInput.headingTwo",description:"label for heading 2 text style",defaultMessage:"Heading 2"},headingThree:{id:"Nimbus.RichTextInput.headingThree",description:"label for heading 3 text style",defaultMessage:"Heading 3"},headingFour:{id:"Nimbus.RichTextInput.headingFour",description:"label for heading 4 text style",defaultMessage:"Heading 4"},headingFive:{id:"Nimbus.RichTextInput.headingFive",description:"label for heading 5 text style",defaultMessage:"Heading 5"},quote:{id:"Nimbus.RichTextInput.quote",description:"label for block quote text style",defaultMessage:"Quote"}}),Oe=t=>[{id:"paragraph",label:t.formatMessage(u.paragraph),props:{textStyle:"md",fontWeight:"500"}},{id:"heading-one",label:t.formatMessage(u.headingOne),props:{textStyle:"2xl",fontWeight:"500"}},{id:"heading-two",label:t.formatMessage(u.headingTwo),props:{textStyle:"xl",fontWeight:"500"}},{id:"heading-three",label:t.formatMessage(u.headingThree),props:{textStyle:"lg",fontWeight:"500"}},{id:"heading-four",label:t.formatMessage(u.headingFour),props:{textStyle:"md",fontWeight:"500"}},{id:"heading-five",label:t.formatMessage(u.headingFive),props:{textStyle:"xs",fontWeight:"500"}},{id:"block-quote",label:t.formatMessage(u.quote),props:{textStyle:"md",fontWeight:"400"}}],Be=["heading-one","heading-two","heading-three","heading-four","heading-five","block-quote"],me=`​
8
8
  `,H=()=>[{type:"paragraph",children:[{text:""}]}],Pe=t=>t.map(xe).join(""),xe=t=>{if(c.Text.isText(t)){const o=t;let n=U(o.text);return o.bold&&(n=`<strong>${n}</strong>`),o.code&&(n=`<code>${n}</code>`),o.italic&&(n=`<em>${n}</em>`),o.underline&&(n=`<u>${n}</u>`),o.superscript&&(n=`<sup>${n}</sup>`),o.subscript&&(n=`<sub>${n}</sub>`),o.strikethrough&&(n=`<del>${n}</del>`),n=n.replace(new RegExp(me,"g"),"<br>"),n}const e=t.children.map(xe).join(""),r=t;switch(r.type){case"block-quote":return`<blockquote>${e}</blockquote>`;case"paragraph":return`<p>${e}</p>`;case"code":return`<pre><code>${e}</code></pre>`;case"bulleted-list":return`<ul>${e}</ul>`;case"numbered-list":return`<ol>${e}</ol>`;case"list-item":return`<li>${e}</li>`;case"heading-one":return`<h1>${e}</h1>`;case"heading-two":return`<h2>${e}</h2>`;case"heading-three":return`<h3>${e}</h3>`;case"heading-four":return`<h4>${e}</h4>`;case"heading-five":return`<h5>${e}</h5>`;case"link":{let o="";if(r.url){const l=Ve(r.url);o=` href="${U(l)}"`}let n="";if(r.htmlAttributes&&typeof r.htmlAttributes=="object")for(const[l,d]of Object.entries(r.htmlAttributes))l.toLowerCase().startsWith("on")||(n+=` ${U(l)}="${U(String(d))}"`);return`<a${o}${n}>${e}</a>`}default:return e}},ee=t=>{if(!t||t.trim()==="")return H();try{if(t.includes("<p>")||t.includes("<h")||t.includes("<div>")||t.includes("<blockquote>")||t.includes("<ul>")||t.includes("<ol>")){const r=new DOMParser().parseFromString(t,"text/html").body,o=Array.from(r.childNodes).map(be).filter(Boolean);return Te(o)}else return[{type:"paragraph",children:[{text:t}]}]}catch(e){return console.warn("Failed to parse HTML:",e),H()}},be=t=>{if(t.nodeType===Node.TEXT_NODE)return(t.textContent||"").replace(/<br\s*\/?>/gi,me);if(t.nodeType!==Node.ELEMENT_NODE)return null;const e=t,r=e.tagName.toLowerCase(),o=Array.from(e.childNodes).map(be).filter(Boolean);if(r in ce){const l=ce[r],d={type:l,children:[]};if(l==="link"){const p=e.getAttribute("href");p&&(d.url=p);const h={};Array.from(e.attributes).forEach(m=>{m.name!=="href"&&!m.name.toLowerCase().startsWith("on")&&(h[m.name]=m.value)}),Object.keys(h).length>0&&(d.htmlAttributes=h)}return d.children=$e(o),d}if(r in ue){const l=ue[r];return{text:Q(o),[l]:!0}}return r==="span"?{text:Q(o)}:{text:Q(o)}},$e=t=>{const e=[];for(const r of t)typeof r=="string"?r.trim()&&e.push({text:r}):(r&&c.Text.isText(r)||r&&c.Element.isElement(r))&&e.push(r);return e.length===0&&e.push({text:""}),e},ye=t=>t.children.map(e=>c.Text.isText(e)?e.text:c.Element.isElement(e)?ye(e):"").join(""),Q=t=>t.filter(Boolean).map(e=>typeof e=="string"?e:e&&typeof e=="object"&&"text"in e?e.text:e&&typeof e=="object"&&"children"in e?ye(e):String(e||"")).join(""),Ve=t=>{const e=String(t).trim().toLowerCase();return e.startsWith("javascript:")||e.startsWith("data:")||e.startsWith("vbscript:")?"#":String(t)},Te=t=>!Array.isArray(t)||t.length===0?H():t.map(e=>c.Element.isElement(e)?!e.children||e.children.length===0?{...e,children:[{text:""}]}:e:{type:"paragraph",children:[{text:String(e)}]}),de=t=>{try{const e=new URL(t);return e.protocol==="http:"||e.protocol==="https:"}catch{return!1}},pe=["bulleted-list","numbered-list"],_e=["bold","code","italic","underline","superscript","subscript","strikethrough"],_=t=>_e.includes(t),ze=(t,e)=>_(e)?t[e]===!0:!1,D=(t,e)=>{const{selection:r}=t;if(!r||c.Range.isCollapsed(r)){const o=c.Editor.marks(t);if(o&&_(e))return o[e]===!0;if(!r&&t.children.length>0){const n=t.children[0];if(n.children&&n.children.length>0){const l=n.children[0];if(c.Text.isText(l)&&_(e))return l[e]===!0}}return!1}try{const o=Array.from(c.Editor.nodes(t,{at:r,match:n=>c.Text.isText(n)}));if(o.length===0){const n=c.Editor.marks(t);return!n||!_(e)?!1:n[e]===!0}return o.every(([n])=>ze(n,e))}catch{const o=c.Editor.marks(t);return!o||!_(e)?!1:o[e]===!0}},q=(t,e)=>{const{selection:r}=t;if(r){const[o]=Array.from(c.Editor.nodes(t,{at:c.Editor.unhangRange(t,r),match:n=>!c.Editor.isEditor(n)&&c.Element.isElement(n)&&n.type===e}));return!!o}return t.children.length>0?t.children[0].type===e:!1},F=(t,e)=>{D(t,e)?c.Editor.removeMark(t,e):c.Editor.addMark(t,e,!0)},J=(t,e)=>{const r=q(t,e),o=pe.includes(e);c.Transforms.unwrapNodes(t,{match:l=>!c.Editor.isEditor(l)&&c.Element.isElement(l)&&pe.includes(l.type),split:!0});let n;if(r?n={type:"paragraph"}:o?n={type:"list-item"}:n={type:e},c.Transforms.setNodes(t,n),!r&&o){const l={type:e,children:[]};c.Transforms.wrapNodes(t,l)}},Ue=t=>{I.ReactEditor.focus(t)},Ge=(t,e)=>{const r=ee(e);c.Transforms.delete(t,{at:{anchor:c.Editor.start(t,[]),focus:c.Editor.end(t,[])}}),c.Transforms.insertNodes(t,r),c.Transforms.select(t,c.Editor.start(t,[]))},We=t=>{const{insertData:e,insertText:r,isInline:o}=t;return t.isInline=n=>n.type==="link"?!0:o(n),t.insertText=n=>{n&&de(n)?he(t,n):r(n)},t.insertData=n=>{const l=n.getData("text/plain");l&&de(l)?he(t,l):e(n)},t},Xe=t=>{c.Transforms.unwrapNodes(t,{match:e=>!c.Editor.isEditor(e)&&c.Element.isElement(e)&&e.type==="link"})},he=(t,e)=>{q(t,"link")&&Xe(t);const{selection:r}=t,o=r&&c.Range.isCollapsed(r),n={type:"link",url:e,children:o?[{text:e}]:[]};o?c.Transforms.insertNodes(t,n):(c.Transforms.wrapNodes(t,n,{split:!0}),c.Transforms.collapse(t,{edge:"end"}))},Ye=({attributes:t,children:e,element:r})=>{const o=r,n={textAlign:o.align};switch(o.type){case"block-quote":return s.jsx("blockquote",{style:n,...t,children:e});case"bulleted-list":return s.jsx("ul",{style:n,...t,children:e});case"heading-one":return s.jsx("h1",{style:n,...t,children:e});case"heading-two":return s.jsx("h2",{style:n,...t,children:e});case"heading-three":return s.jsx("h3",{style:n,...t,children:e});case"heading-four":return s.jsx("h4",{style:n,...t,children:e});case"heading-five":return s.jsx("h5",{style:n,...t,children:e});case"list-item":return s.jsx("li",{style:n,...t,children:e});case"numbered-list":return s.jsx("ol",{style:n,...t,children:e});case"link":return s.jsx("a",{...t,href:o.url,rel:"noopener noreferrer",style:n,children:e});default:return s.jsx("p",{style:n,...t,children:e})}},Qe=({attributes:t,children:e,leaf:r})=>{const o=r;return o.bold&&(e=s.jsx("strong",{children:e})),o.code&&(e=s.jsx("code",{children:e})),o.italic&&(e=s.jsx("em",{children:e})),o.underline&&(e=s.jsx("u",{children:e})),o.strikethrough&&(e=s.jsx("del",{children:e})),o.superscript&&(e=s.jsx("sup",{children:e})),o.subscript&&(e=s.jsx("sub",{children:e})),s.jsx("span",{...t,children:e})},Je={placeholderCharacter:`​
9
9
  `};var k={},fe;function Ze(){if(fe)return k;fe=1,Object.defineProperty(k,"__esModule",{value:!0});for(var t=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),e={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},r={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:t?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},o={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},n=1;n<20;n++)o["f"+n]=111+n;function l(a,i,y){i&&!("byKey"in i)&&(y=i,i=null),Array.isArray(a)||(a=[a]);var T=a.map(function(N){return h(N,i)}),M=function(C){return T.some(function(v){return m(v,C)})},L=y==null?M:M(y);return L}function d(a,i){return l(a,i)}function p(a,i){return l(a,{byKey:!0},i)}function h(a,i){var y=i&&i.byKey,T={};a=a.replace("++","+add");var M=a.split("+"),L=M.length;for(var N in e)T[e[N]]=!1;var C=!0,v=!1,x=void 0;try{for(var B=M[Symbol.iterator](),z;!(C=(z=B.next()).done);C=!0){var R=z.value,X=R.endsWith("?")&&R.length>1;X&&(R=R.slice(0,-1));var P=g(R),S=e[P];if(R.length>1&&!S&&!r[R]&&!o[P])throw new TypeError('Unknown modifier: "'+R+'"');(L===1||!S)&&(y?T.key=P:T.which=j(R)),S&&(T[S]=X?null:!0)}}catch(K){v=!0,x=K}finally{try{!C&&B.return&&B.return()}finally{if(v)throw x}}return T}function m(a,i){for(var y in a){var T=a[y],M=void 0;if(T!=null&&(y==="key"&&i.key!=null?M=i.key.toLowerCase():y==="which"?M=T===91&&i.which===93?91:i.which:M=i[y],!(M==null&&T===!1)&&M!==T))return!1}return!0}function j(a){a=g(a);var i=o[a]||a.toUpperCase().charCodeAt(0);return i}function g(a){return a=a.toLowerCase(),a=r[a]||a,a}return k.default=l,k.isHotkey=l,k.isCodeHotkey=d,k.isKeyHotkey=p,k.parseHotkey=h,k.compareHotkey=m,k.toKeyCode=j,k.toKeyName=g,k}var et=Ze();const tt=se(et),rt=({editor:t})=>({handleKeyDown:f.useCallback(r=>{if((r.metaKey||r.ctrlKey)&&r.key==="z"){r.preventDefault(),r.shiftKey?t.redo():t.undo();return}for(const o in le)if(tt(o,r)){r.preventDefault();const n=le[o];F(t,n);return}if(r.shiftKey&&r.key==="Enter"){r.preventDefault(),t.insertText(Je.placeholderCharacter);return}},[t])}),Me=function({ref:e,value:r,onChange:o,onFocus:n,onBlur:l,placeholder:d=G.placeholder,isDisabled:p=G.isDisabled,isReadOnly:h=G.isReadOnly,autoFocus:m=G.autoFocus,toolbar:j}){const g=f.useRef(null),a=Ie.$df56164dff5785e2$export$4338b53315abf666(te.mergeRefs(g,e)),i=f.useMemo(()=>{const x=c.createEditor();return We(Ee.withHistory(I.withReact(x)))},[]),{handleKeyDown:y}=rt({editor:i}),T=f.useCallback(x=>{n&&n(x)},[n]),M=f.useCallback(x=>{l&&l(x)},[l]);f.useImperativeHandle(a,()=>({focus:()=>Ue(i),resetValue:x=>Ge(i,x)}),[i]);const L=f.useCallback(x=>s.jsx(Ye,{...x}),[]),N=f.useCallback(x=>s.jsx(Qe,{...x}),[]),C=H(),v=Array.isArray(r)&&r.length>0?r:C;return s.jsxs(I.Slate,{editor:i,value:v,onChange:o,children:[j&&s.jsx(De,{children:j}),s.jsx(Fe,{asChild:!0,children:s.jsx(I.Editable,{renderElement:L,renderLeaf:N,placeholder:d,autoFocus:m,readOnly:h||p,onKeyDown:y,onFocus:T,onBlur:M,"aria-label":"Rich text editor",role:"textbox","aria-multiline":"true"})})]})};Me.displayName="RichTextEditor";const je=t=>f.useCallback(e=>()=>{const{selection:r}=t;e(),r&&!t.selection&&c.Transforms.select(t,r),I.ReactEditor.isFocused(t)||I.ReactEditor.focus(t)},[t]),st=({withPreservedSelection:t,textStyles:e})=>{const r=I.useSlate(),o=f.useMemo(()=>Be.find(a=>q(r,a))||"paragraph",[r.selection,r.children]),n=e.find(a=>a.id===o),l=n?.label||"",d=f.useCallback(a=>{t(()=>{J(r,a)})()},[r,t]),p=f.useCallback(a=>{t(()=>{const i=Array.from(a)[0],y=q(r,"bulleted-list")?"bulleted-list":q(r,"numbered-list")?"numbered-list":null;i?J(r,i):y&&J(r,y)})()},[r,t]),h=f.useMemo(()=>{const a=[];return D(r,"bold")&&a.push("bold"),D(r,"italic")&&a.push("italic"),D(r,"underline")&&a.push("underline"),new Set(a)},[r.selection,r.children,c.Editor.marks(r)]),m=f.useMemo(()=>{const a=[];return q(r,"bulleted-list")&&a.push("bulleted-list"),q(r,"numbered-list")&&a.push("numbered-list"),new Set(a)},[r.selection,r.children]),j=f.useMemo(()=>r.history&&r.history.undos.length>0,[r.selection,r.children]),g=f.useMemo(()=>r.history&&r.history.redos.length>0,[r.selection,r.children]);return{currentTextStyle:o,selectedTextStyle:n,selectedTextStyleLabel:l,handleTextStyleChange:d,handleListToggle:p,selectedFormatKeys:h,selectedListKeys:m,hasUndos:j,hasRedos:g}},nt=({withPreservedSelection:t})=>{const e=I.useSlate(),r=f.useMemo(()=>{const d=[];return Ke.forEach(p=>{D(e,p)&&d.push(p)}),new Set(d)},[e.selection,e.children,c.Editor.marks(e)]),o=f.useMemo(()=>{const d=[];return qe.forEach(p=>{D(e,p)&&d.push(p)}),new Set(d)},[e.selection,e.children,c.Editor.marks(e)]),n=f.useMemo(()=>new Set([...Array.from(r),...Array.from(o)]),[r,o]),l=f.useCallback(d=>{if(d==="all")return;const p=Array.from(d),h=Array.from(n),m=p.filter(g=>!h.includes(g)),j=h.filter(g=>!p.includes(g));[...m,...j].forEach(g=>{g==="superscript"||g==="subscript"?t(()=>{const a=D(e,"superscript")?"superscript":D(e,"subscript")?"subscript":null;m.includes(g)&&a&&a!==g&&F(e,a),F(e,g)})():t(()=>F(e,g))()})},[e,n,t]);return{selectedKeys:r,selectedScriptKeys:o,allSelectedKeys:n,handleAllSelectionChange:l}},ot=({isDisabled:t=!1})=>{const e=re.useIntl(),r=I.useSlate(),o=je(r),{allSelectedKeys:n,handleAllSelectionChange:l}=nt({withPreservedSelection:o});return s.jsxs(E.Menu.Root,{selectionMode:"multiple",selectedKeys:n,onSelectionChange:l,children:[s.jsxs(b.Tooltip.Root,{delay:0,closeDelay:0,children:[s.jsx(E.Menu.Trigger,{asChild:!0,children:s.jsx(Z.IconButton,{size:"xs",variant:"ghost","aria-label":e.formatMessage(u.moreFormattingOptions),isDisabled:t,onMouseDown:d=>d.preventDefault(),children:s.jsx(w.MoreHoriz,{})})}),s.jsx(b.Tooltip.Content,{placement:"top",children:e.formatMessage(u.moreStyles)})]}),s.jsxs(E.Menu.Content,{children:[s.jsx(E.Menu.Item,{id:"strikethrough",children:s.jsxs(O.Box,{slot:"label",display:"flex",alignItems:"center",gap:"200",children:[s.jsx(w.FormatStrikethrough,{}),s.jsx(A.Text,{textStyle:"sm",children:e.formatMessage(u.strikethrough)})]})}),s.jsx(E.Menu.Item,{id:"code",children:s.jsxs(O.Box,{slot:"label",display:"flex",alignItems:"center",gap:"200",children:[s.jsx(w.Code,{}),s.jsx(A.Text,{textStyle:"sm",children:e.formatMessage(u.code)})]})}),s.jsx(E.Menu.Item,{id:"superscript",children:s.jsxs(O.Box,{slot:"label",display:"flex",alignItems:"center",gap:"200",children:[s.jsx(A.Text,{children:"X²"}),s.jsx(A.Text,{textStyle:"sm",children:e.formatMessage(u.superscript)})]})}),s.jsx(E.Menu.Item,{id:"subscript",children:s.jsxs(O.Box,{slot:"label",display:"flex",alignItems:"center",gap:"200",children:[s.jsx(A.Text,{children:"X₂"}),s.jsx(A.Text,{textStyle:"sm",children:e.formatMessage(u.subscript)})]})})]})]})},Se=({isDisabled:t=!1})=>{const e=re.useIntl(),r=I.useSlate(),o=je(r),n=Oe(e),{currentTextStyle:l,selectedTextStyleLabel:d,handleTextStyleChange:p,handleListToggle:h,selectedFormatKeys:m,selectedListKeys:j,hasUndos:g,hasRedos:a}=st({withPreservedSelection:o,textStyles:n});return s.jsxs(Ce.Toolbar,{orientation:"horizontal","aria-label":e.formatMessage(u.textFormatting),width:"full",overflow:"hidden",size:"xs",children:[s.jsx(ne.Group,{children:s.jsxs(E.Menu.Root,{onAction:i=>p(String(i)),children:[s.jsxs(b.Tooltip.Root,{delay:0,closeDelay:0,children:[s.jsx(E.Menu.Trigger,{height:"800",width:"4000",bg:"primary.1",borderRadius:"200",_hover:{bg:"primary.2"},isDisabled:t,onMouseDown:i=>i.preventDefault(),"aria-label":e.formatMessage(u.textStyleMenu),children:s.jsxs(O.Box,{display:"flex",alignItems:"center",gap:"200",px:"200",children:[s.jsx(O.Box,{display:"flex",alignItems:"center",gap:"200",flexGrow:"1",children:s.jsx(A.Text,{my:"auto",textStyle:"sm",fontWeight:"500",children:d})}),s.jsx(w.KeyboardArrowDown,{})]})}),s.jsx(b.Tooltip.Content,{placement:"top",children:e.formatMessage(u.textStyle)})]}),s.jsx(E.Menu.Content,{children:n.map(i=>s.jsx(E.Menu.Item,{id:i.id,...l===i.id&&{"data-state":"checked"},children:s.jsx(A.Text,{...i.props,children:i.label})},i.id))})]})}),s.jsx(oe.Separator,{orientation:"vertical"}),s.jsxs(ie.ToggleButtonGroup.Root,{selectionMode:"multiple",selectedKeys:m,isDisabled:t,children:[s.jsxs(b.Tooltip.Root,{delay:0,closeDelay:0,children:[s.jsxs($.IconToggleButton,{id:"bold",size:"xs",variant:"ghost","aria-label":e.formatMessage(u.bold),isDisabled:t,onMouseDown:i=>i.preventDefault(),onPress:o(()=>F(r,"bold")),children:[s.jsx(w.FormatBold,{}),s.jsx(V.VisuallyHidden,{children:e.formatMessage(u.bold)})]}),s.jsx(b.Tooltip.Content,{placement:"top",children:e.formatMessage(u.bold)})]}),s.jsxs(b.Tooltip.Root,{delay:0,closeDelay:0,children:[s.jsxs($.IconToggleButton,{id:"italic",size:"xs",variant:"ghost","aria-label":e.formatMessage(u.italic),isDisabled:t,onMouseDown:i=>i.preventDefault(),onPress:o(()=>F(r,"italic")),children:[s.jsx(w.FormatItalic,{}),s.jsx(V.VisuallyHidden,{children:e.formatMessage(u.italic)})]}),s.jsx(b.Tooltip.Content,{placement:"top",children:e.formatMessage(u.italic)})]}),s.jsxs(b.Tooltip.Root,{delay:0,closeDelay:0,children:[s.jsxs($.IconToggleButton,{id:"underline",size:"xs",variant:"ghost","aria-label":e.formatMessage(u.underline),isDisabled:t,onMouseDown:i=>i.preventDefault(),onPress:o(()=>F(r,"underline")),children:[s.jsx(w.FormatUnderlined,{}),s.jsx(V.VisuallyHidden,{children:e.formatMessage(u.underline)})]}),s.jsx(b.Tooltip.Content,{placement:"top",children:e.formatMessage(u.underline)})]})]}),s.jsx(ot,{isDisabled:t}),s.jsx(oe.Separator,{orientation:"vertical"}),s.jsxs(ie.ToggleButtonGroup.Root,{selectionMode:"single",selectedKeys:j,onSelectionChange:h,"aria-label":e.formatMessage(u.listFormatting),isDisabled:t,children:[s.jsxs(b.Tooltip.Root,{delay:0,closeDelay:0,children:[s.jsx($.IconToggleButton,{id:"bulleted-list",size:"xs",variant:"ghost","aria-label":e.formatMessage(u.bulletedList),isDisabled:t,onMouseDown:i=>i.preventDefault(),children:s.jsx(w.FormatListBulleted,{})}),s.jsx(b.Tooltip.Content,{placement:"top",children:e.formatMessage(u.bulletedList)})]}),s.jsxs(b.Tooltip.Root,{delay:0,closeDelay:0,children:[s.jsx($.IconToggleButton,{id:"numbered-list",size:"xs",variant:"ghost","aria-label":e.formatMessage(u.numberedList),isDisabled:t,onMouseDown:i=>i.preventDefault(),children:s.jsx(w.FormatListNumbered,{})}),s.jsx(b.Tooltip.Content,{placement:"top",children:e.formatMessage(u.numberedList)})]})]}),s.jsx(O.Box,{flexGrow:"1"}),s.jsxs(ne.Group,{children:[s.jsxs(b.Tooltip.Root,{delay:0,closeDelay:0,children:[s.jsxs(Z.IconButton,{size:"xs",variant:"ghost","aria-label":e.formatMessage(u.undo),isDisabled:!g||t,onPress:o(()=>r.undo()),onMouseDown:i=>i.preventDefault(),children:[s.jsx(w.Undo,{}),s.jsx(V.VisuallyHidden,{children:e.formatMessage(u.undo)})]}),s.jsx(b.Tooltip.Content,{placement:"top",children:e.formatMessage(u.undo)})]}),s.jsxs(b.Tooltip.Root,{delay:0,closeDelay:0,children:[s.jsxs(Z.IconButton,{size:"xs",variant:"ghost","aria-label":e.formatMessage(u.redo),isDisabled:!a||t,onPress:o(()=>r.redo()),onMouseDown:i=>i.preventDefault(),children:[s.jsx(w.Redo,{}),s.jsx(V.VisuallyHidden,{children:e.formatMessage(u.redo)})]}),s.jsx(b.Tooltip.Content,{placement:"top",children:e.formatMessage(u.redo)})]})]})]})};Se.displayName="RichTextToolbar";const Re=t=>{const{ref:e,value:r,defaultValue:o,onChange:n,onFocus:l,onBlur:d,placeholder:p="",isDisabled:h=!1,isReadOnly:m=!1,isInvalid:j=!1,autoFocus:g=!1,...a}=t,i=te.useSlotRecipe({recipe:ve.richTextInputRecipe}),[y,T]=i.splitVariantProps({...a}),[M,L]=we.extractStyleProps(T),N={"data-disabled":h?"true":void 0,"data-invalid":j?"true":void 0,"data-readonly":m?"true":void 0},[C,v]=f.useState(()=>{const S=r??o??"";try{return S?ee(S):H()}catch(K){return console.warn("Failed to parse initial HTML, using empty value:",K),H()}}),[x,B]=f.useState(()=>r??o??""),z=f.useRef(null);f.useEffect(()=>{if(r!==void 0&&r!==x){const S=r?ee(r):H();v(S),B(r)}},[r,x]);const R=f.useCallback(S=>{const K=Pe(S),ke=K!==x;v(S),B(K),ke&&n&&n(K)},[x,n]),P=Te(C);return s.jsx(Ae,{role:"group",...y,...M,...L,...N,ref:e,children:s.jsx(Me,{ref:z,value:P,onChange:R,onFocus:l,onBlur:d,placeholder:p,isDisabled:h,isReadOnly:m,autoFocus:g,toolbar:m?null:s.jsx(Se,{isDisabled:h})})})};Re.displayName="RichTextInput";exports.RichTextInput=Re;exports.getDefaultExportFromCjs=se;
10
- //# sourceMappingURL=rich-text-input-D6WXRxiJ.cjs.js.map
10
+ //# sourceMappingURL=rich-text-input-CHik-cF7.cjs.js.map