@commercetools/nimbus 0.0.0-canary-20251114180837 → 0.0.0-canary-20251117192621

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 (305) hide show
  1. package/dist/chunks/{accordion-CuCgqCiz.es.js → accordion-DAFrUxX1.es.js} +2 -2
  2. package/dist/chunks/{accordion-CuCgqCiz.es.js.map → accordion-DAFrUxX1.es.js.map} +1 -1
  3. package/dist/chunks/{accordion-CmBc5FZz.cjs.js → accordion-TN04eDfa.cjs.js} +2 -2
  4. package/dist/chunks/{accordion-CmBc5FZz.cjs.js.map → accordion-TN04eDfa.cjs.js.map} +1 -1
  5. package/dist/chunks/{accordion.content-DrpfmC95.cjs.js → accordion.content-B5C2Y2X0.cjs.js} +2 -2
  6. package/dist/chunks/{accordion.content-DrpfmC95.cjs.js.map → accordion.content-B5C2Y2X0.cjs.js.map} +1 -1
  7. package/dist/chunks/{accordion.content-BGhRS1NJ.es.js → accordion.content-D9kaKLWK.es.js} +2 -2
  8. package/dist/chunks/{accordion.content-BGhRS1NJ.es.js.map → accordion.content-D9kaKLWK.es.js.map} +1 -1
  9. package/dist/chunks/{alert-CZKJ3EP0.cjs.js → alert-CcAcZBXJ.cjs.js} +2 -2
  10. package/dist/chunks/{alert-CZKJ3EP0.cjs.js.map → alert-CcAcZBXJ.cjs.js.map} +1 -1
  11. package/dist/chunks/{alert-LbnS1dP2.es.js → alert-D2sljJ4R.es.js} +2 -2
  12. package/dist/chunks/{alert-LbnS1dP2.es.js.map → alert-D2sljJ4R.es.js.map} +1 -1
  13. package/dist/chunks/{button-DJfJbR79.cjs.js → button-CiMXitpB.cjs.js} +2 -2
  14. package/dist/chunks/{button-DJfJbR79.cjs.js.map → button-CiMXitpB.cjs.js.map} +1 -1
  15. package/dist/chunks/{button-B-HwwyoH.es.js → button-CwWI3sF7.es.js} +2 -2
  16. package/dist/chunks/{button-B-HwwyoH.es.js.map → button-CwWI3sF7.es.js.map} +1 -1
  17. package/dist/chunks/{calendar-Bb6B4lhK.es.js → calendar-B3-rc5oo.es.js} +3 -3
  18. package/dist/chunks/{calendar-Bb6B4lhK.es.js.map → calendar-B3-rc5oo.es.js.map} +1 -1
  19. package/dist/chunks/{calendar-BldoyNwv.cjs.js → calendar-WMI90FYI.cjs.js} +2 -2
  20. package/dist/chunks/{calendar-BldoyNwv.cjs.js.map → calendar-WMI90FYI.cjs.js.map} +1 -1
  21. package/dist/chunks/{card-DcQGCa4h.es.js → card-BPskk-lY.es.js} +2 -2
  22. package/dist/chunks/{card-DcQGCa4h.es.js.map → card-BPskk-lY.es.js.map} +1 -1
  23. package/dist/chunks/{card-DQLSXEjD.cjs.js → card-CcdTqUdo.cjs.js} +2 -2
  24. package/dist/chunks/{card-DQLSXEjD.cjs.js.map → card-CcdTqUdo.cjs.js.map} +1 -1
  25. package/dist/chunks/{checkbox-DF7r2CZt.es.js → checkbox-CG5_Ighb.es.js} +2 -2
  26. package/dist/chunks/{checkbox-DF7r2CZt.es.js.map → checkbox-CG5_Ighb.es.js.map} +1 -1
  27. package/dist/chunks/{checkbox-C2jLK8Hr.cjs.js → checkbox-zzPPJ5W8.cjs.js} +2 -2
  28. package/dist/chunks/{checkbox-C2jLK8Hr.cjs.js.map → checkbox-zzPPJ5W8.cjs.js.map} +1 -1
  29. package/dist/chunks/{collapsible-motion-CyzOODhp.cjs.js → collapsible-motion-Cx3dS8PM.cjs.js} +2 -2
  30. package/dist/chunks/{collapsible-motion-CyzOODhp.cjs.js.map → collapsible-motion-Cx3dS8PM.cjs.js.map} +1 -1
  31. package/dist/chunks/{collapsible-motion-CHCJ3j7B.es.js → collapsible-motion-DazrXQJb.es.js} +2 -2
  32. package/dist/chunks/{collapsible-motion-CHCJ3j7B.es.js.map → collapsible-motion-DazrXQJb.es.js.map} +1 -1
  33. package/dist/chunks/{combobox-DVtRJBek.cjs.js → combobox-D8XvCUrM.cjs.js} +2 -2
  34. package/dist/chunks/{combobox-DVtRJBek.cjs.js.map → combobox-D8XvCUrM.cjs.js.map} +1 -1
  35. package/dist/chunks/{combobox-vWOhBwub.es.js → combobox-jtL6xW5J.es.js} +5 -5
  36. package/dist/chunks/{combobox-vWOhBwub.es.js.map → combobox-jtL6xW5J.es.js.map} +1 -1
  37. package/dist/chunks/{data-table-DR4Tl3-U.es.js → data-table-Ci9Ryv3s.es.js} +12 -12
  38. package/dist/chunks/{data-table-DR4Tl3-U.es.js.map → data-table-Ci9Ryv3s.es.js.map} +1 -1
  39. package/dist/chunks/{data-table-HDA9KnTl.cjs.js → data-table-DeEOr5eo.cjs.js} +2 -2
  40. package/dist/chunks/{data-table-HDA9KnTl.cjs.js.map → data-table-DeEOr5eo.cjs.js.map} +1 -1
  41. package/dist/chunks/{date-input-ZBqTaLQs.cjs.js → date-input-CjKvH-p5.cjs.js} +2 -2
  42. package/dist/chunks/{date-input-ZBqTaLQs.cjs.js.map → date-input-CjKvH-p5.cjs.js.map} +1 -1
  43. package/dist/chunks/{date-input-O-3mm_Bd.es.js → date-input-DIptUDLU.es.js} +3 -3
  44. package/dist/chunks/{date-input-O-3mm_Bd.es.js.map → date-input-DIptUDLU.es.js.map} +1 -1
  45. package/dist/chunks/{date-picker-Brz-lHyB.es.js → date-picker-DoEOZkKG.es.js} +7 -7
  46. package/dist/chunks/{date-picker-Brz-lHyB.es.js.map → date-picker-DoEOZkKG.es.js.map} +1 -1
  47. package/dist/chunks/{date-picker-Bi8pdq_U.cjs.js → date-picker-UIYTQ6lB.cjs.js} +2 -2
  48. package/dist/chunks/{date-picker-Bi8pdq_U.cjs.js.map → date-picker-UIYTQ6lB.cjs.js.map} +1 -1
  49. package/dist/chunks/{date-range-picker-CA_OHnx4.cjs.js → date-range-picker-B1ckLfN9.cjs.js} +2 -2
  50. package/dist/chunks/{date-range-picker-CA_OHnx4.cjs.js.map → date-range-picker-B1ckLfN9.cjs.js.map} +1 -1
  51. package/dist/chunks/{date-range-picker-BhNOq8_2.es.js → date-range-picker-C1PfoScS.es.js} +7 -7
  52. package/dist/chunks/{date-range-picker-BhNOq8_2.es.js.map → date-range-picker-C1PfoScS.es.js.map} +1 -1
  53. package/dist/chunks/{date-range-picker-field-DIB-P1tu.cjs.js → date-range-picker-field-Bymwtut3.cjs.js} +2 -2
  54. package/dist/chunks/{date-range-picker-field-DIB-P1tu.cjs.js.map → date-range-picker-field-Bymwtut3.cjs.js.map} +1 -1
  55. package/dist/chunks/{date-range-picker-field-DLMqTuJz.es.js → date-range-picker-field-CgcT1Q8h.es.js} +3 -3
  56. package/dist/chunks/{date-range-picker-field-DLMqTuJz.es.js.map → date-range-picker-field-CgcT1Q8h.es.js.map} +1 -1
  57. package/dist/chunks/{dialog-SzBPgpkl.cjs.js → dialog-Ck8N8gU2.cjs.js} +2 -2
  58. package/dist/chunks/{dialog-SzBPgpkl.cjs.js.map → dialog-Ck8N8gU2.cjs.js.map} +1 -1
  59. package/dist/chunks/{dialog-V1CRSUkp.es.js → dialog-DEpTIn4h.es.js} +3 -3
  60. package/dist/chunks/{dialog-V1CRSUkp.es.js.map → dialog-DEpTIn4h.es.js.map} +1 -1
  61. package/dist/chunks/{draggable-list-CPHoZ6Xb.es.js → draggable-list-CoGETMIo.es.js} +5 -5
  62. package/dist/chunks/{draggable-list-CPHoZ6Xb.es.js.map → draggable-list-CoGETMIo.es.js.map} +1 -1
  63. package/dist/chunks/{draggable-list-DVf80rRS.cjs.js → draggable-list-D0avWP4H.cjs.js} +2 -2
  64. package/dist/chunks/{draggable-list-DVf80rRS.cjs.js.map → draggable-list-D0avWP4H.cjs.js.map} +1 -1
  65. package/dist/chunks/{drawer-D-uF25gn.es.js → drawer-DB6Sm1ai.es.js} +4 -4
  66. package/dist/chunks/{drawer-D-uF25gn.es.js.map → drawer-DB6Sm1ai.es.js.map} +1 -1
  67. package/dist/chunks/{drawer-Bd9AUiyM.cjs.js → drawer-numzF4gC.cjs.js} +2 -2
  68. package/dist/chunks/{drawer-Bd9AUiyM.cjs.js.map → drawer-numzF4gC.cjs.js.map} +1 -1
  69. package/dist/chunks/{extract-style-props-Dw-EpoTk.es.js → extract-style-props-CTYox-n4.es.js} +2 -2
  70. package/dist/chunks/{extract-style-props-Dw-EpoTk.es.js.map → extract-style-props-CTYox-n4.es.js.map} +1 -1
  71. package/dist/chunks/{extract-style-props-Dqfn9Nf9.cjs.js → extract-style-props-Dp-cKlvK.cjs.js} +2 -2
  72. package/dist/chunks/{extract-style-props-Dqfn9Nf9.cjs.js.map → extract-style-props-Dp-cKlvK.cjs.js.map} +1 -1
  73. package/dist/chunks/{form-field-DWuoS2nw.es.js → form-field-BAeMilUp.es.js} +2 -2
  74. package/dist/chunks/{form-field-DWuoS2nw.es.js.map → form-field-BAeMilUp.es.js.map} +1 -1
  75. package/dist/chunks/{form-field-Bthi8nxY.cjs.js → form-field-vna9HwvE.cjs.js} +2 -2
  76. package/dist/chunks/{form-field-Bthi8nxY.cjs.js.map → form-field-vna9HwvE.cjs.js.map} +1 -1
  77. package/dist/chunks/{icon-button-Bue0uAF7.es.js → icon-button-BxBVKJ1v.es.js} +2 -2
  78. package/dist/chunks/{icon-button-Bue0uAF7.es.js.map → icon-button-BxBVKJ1v.es.js.map} +1 -1
  79. package/dist/chunks/{icon-button-C-iRgq4t.cjs.js → icon-button-mdaiwgqz.cjs.js} +2 -2
  80. package/dist/chunks/{icon-button-C-iRgq4t.cjs.js.map → icon-button-mdaiwgqz.cjs.js.map} +1 -1
  81. package/dist/chunks/{icon-toggle-button-DEuZjBan.cjs.js → icon-toggle-button-C9xlEbeo.cjs.js} +2 -2
  82. package/dist/chunks/{icon-toggle-button-DEuZjBan.cjs.js.map → icon-toggle-button-C9xlEbeo.cjs.js.map} +1 -1
  83. package/dist/chunks/{icon-toggle-button-ByN_lsJX.es.js → icon-toggle-button-DqIpgfD5.es.js} +2 -2
  84. package/dist/chunks/{icon-toggle-button-ByN_lsJX.es.js.map → icon-toggle-button-DqIpgfD5.es.js.map} +1 -1
  85. package/dist/chunks/{index-CQgD7Eq4.cjs.js → index-BNOrhWlg.cjs.js} +2 -2
  86. package/dist/chunks/{index-CQgD7Eq4.cjs.js.map → index-BNOrhWlg.cjs.js.map} +1 -1
  87. package/dist/chunks/{index-CIWPalKw.es.js → index-DqCS7nev.es.js} +28 -18
  88. package/dist/chunks/{index-CIWPalKw.es.js.map → index-DqCS7nev.es.js.map} +1 -1
  89. package/dist/chunks/{localized-field-GPoE_PKq.cjs.js → localized-field-B2FWCzSb.cjs.js} +2 -2
  90. package/dist/chunks/{localized-field-GPoE_PKq.cjs.js.map → localized-field-B2FWCzSb.cjs.js.map} +1 -1
  91. package/dist/chunks/{localized-field-Bm6UgANx.es.js → localized-field-yR0Cmzhd.es.js} +8 -8
  92. package/dist/chunks/{localized-field-Bm6UgANx.es.js.map → localized-field-yR0Cmzhd.es.js.map} +1 -1
  93. package/dist/chunks/{menu-BBXEbU_Z.cjs.js → menu-CKQ0yh2S.cjs.js} +2 -2
  94. package/dist/chunks/{menu-BBXEbU_Z.cjs.js.map → menu-CKQ0yh2S.cjs.js.map} +1 -1
  95. package/dist/chunks/{menu-LvyVCoN3.es.js → menu-ScVmMJes.es.js} +2 -2
  96. package/dist/chunks/{menu-LvyVCoN3.es.js.map → menu-ScVmMJes.es.js.map} +1 -1
  97. package/dist/chunks/{money-input-Cij-Casb.es.js → money-input-Ba3qEeMp.es.js} +5 -5
  98. package/dist/chunks/{money-input-Cij-Casb.es.js.map → money-input-Ba3qEeMp.es.js.map} +1 -1
  99. package/dist/chunks/{money-input-CJ8qHBqD.cjs.js → money-input-YyVwGf_o.cjs.js} +2 -2
  100. package/dist/chunks/{money-input-CJ8qHBqD.cjs.js.map → money-input-YyVwGf_o.cjs.js.map} +1 -1
  101. package/dist/chunks/money-input-field-BZPMbQEk.es.js +51 -0
  102. package/dist/chunks/money-input-field-BZPMbQEk.es.js.map +1 -0
  103. package/dist/chunks/money-input-field-Cs5mt0CZ.cjs.js +2 -0
  104. package/dist/chunks/money-input-field-Cs5mt0CZ.cjs.js.map +1 -0
  105. package/dist/chunks/{multiline-text-input-BF6C-lyR.cjs.js → multiline-text-input-DIn_yZJx.cjs.js} +2 -2
  106. package/dist/chunks/{multiline-text-input-BF6C-lyR.cjs.js.map → multiline-text-input-DIn_yZJx.cjs.js.map} +1 -1
  107. package/dist/chunks/{multiline-text-input-CwOg_juH.es.js → multiline-text-input-Dp7vtKqe.es.js} +3 -3
  108. package/dist/chunks/{multiline-text-input-CwOg_juH.es.js.map → multiline-text-input-Dp7vtKqe.es.js.map} +1 -1
  109. package/dist/chunks/{nimbus-provider-DHuxlHSl.cjs.js → nimbus-provider-BI1kd0Em.cjs.js} +2 -2
  110. package/dist/chunks/{nimbus-provider-DHuxlHSl.cjs.js.map → nimbus-provider-BI1kd0Em.cjs.js.map} +1 -1
  111. package/dist/chunks/{nimbus-provider-BHsatRAO.es.js → nimbus-provider-XROFKaT0.es.js} +2 -2
  112. package/dist/chunks/{nimbus-provider-BHsatRAO.es.js.map → nimbus-provider-XROFKaT0.es.js.map} +1 -1
  113. package/dist/chunks/{number-input-C9TFPuTT.cjs.js → number-input-DFKBicfs.cjs.js} +2 -2
  114. package/dist/chunks/{number-input-C9TFPuTT.cjs.js.map → number-input-DFKBicfs.cjs.js.map} +1 -1
  115. package/dist/chunks/{number-input-C2-jq1IR.es.js → number-input-T1AqE1QB.es.js} +3 -3
  116. package/dist/chunks/{number-input-C2-jq1IR.es.js.map → number-input-T1AqE1QB.es.js.map} +1 -1
  117. package/dist/chunks/{pagination-BCoTBc8J.es.js → pagination-B5NrEre1.es.js} +4 -4
  118. package/dist/chunks/{pagination-BCoTBc8J.es.js.map → pagination-B5NrEre1.es.js.map} +1 -1
  119. package/dist/chunks/{pagination-D7box6kC.cjs.js → pagination-B8nAa9hn.cjs.js} +2 -2
  120. package/dist/chunks/{pagination-D7box6kC.cjs.js.map → pagination-B8nAa9hn.cjs.js.map} +1 -1
  121. package/dist/chunks/{password-input-CIe4ICPn.es.js → password-input-Bx2S1pki.es.js} +3 -3
  122. package/dist/chunks/{password-input-CIe4ICPn.es.js.map → password-input-Bx2S1pki.es.js.map} +1 -1
  123. package/dist/chunks/{password-input-BftRhns3.cjs.js → password-input-CYu6BjN6.cjs.js} +2 -2
  124. package/dist/chunks/{password-input-BftRhns3.cjs.js.map → password-input-CYu6BjN6.cjs.js.map} +1 -1
  125. package/dist/chunks/{progress-bar-BzZo3KCV.cjs.js → progress-bar-TkuC5Xw1.cjs.js} +2 -2
  126. package/dist/chunks/{progress-bar-BzZo3KCV.cjs.js.map → progress-bar-TkuC5Xw1.cjs.js.map} +1 -1
  127. package/dist/chunks/{progress-bar-BuIIuAQL.es.js → progress-bar-bodVbysK.es.js} +2 -2
  128. package/dist/chunks/{progress-bar-BuIIuAQL.es.js.map → progress-bar-bodVbysK.es.js.map} +1 -1
  129. package/dist/chunks/{radio-input-CPB-j3PK.cjs.js → radio-input-D9lSDGzt.cjs.js} +2 -2
  130. package/dist/chunks/{radio-input-CPB-j3PK.cjs.js.map → radio-input-D9lSDGzt.cjs.js.map} +1 -1
  131. package/dist/chunks/{radio-input-DCU-O_vO.es.js → radio-input-hYqN1o_x.es.js} +3 -3
  132. package/dist/chunks/{radio-input-DCU-O_vO.es.js.map → radio-input-hYqN1o_x.es.js.map} +1 -1
  133. package/dist/chunks/{range-calendar-C3ZJL7Ix.cjs.js → range-calendar-D2nVoByV.cjs.js} +2 -2
  134. package/dist/chunks/{range-calendar-C3ZJL7Ix.cjs.js.map → range-calendar-D2nVoByV.cjs.js.map} +1 -1
  135. package/dist/chunks/{range-calendar-Cg44dqRP.es.js → range-calendar-lDGLtuIz.es.js} +4 -4
  136. package/dist/chunks/{range-calendar-Cg44dqRP.es.js.map → range-calendar-lDGLtuIz.es.js.map} +1 -1
  137. package/dist/chunks/{rich-text-input-iS9XnPhW.cjs.js → rich-text-input-5yMKVX7g.cjs.js} +2 -2
  138. package/dist/chunks/{rich-text-input-iS9XnPhW.cjs.js.map → rich-text-input-5yMKVX7g.cjs.js.map} +1 -1
  139. package/dist/chunks/{rich-text-input-BgwADitC.es.js → rich-text-input-Dpi-W6wq.es.js} +8 -8
  140. package/dist/chunks/{rich-text-input-BgwADitC.es.js.map → rich-text-input-Dpi-W6wq.es.js.map} +1 -1
  141. package/dist/chunks/{scoped-search-input-D30_MxPB.cjs.js → scoped-search-input-BL9iN7Mp.cjs.js} +2 -2
  142. package/dist/chunks/{scoped-search-input-D30_MxPB.cjs.js.map → scoped-search-input-BL9iN7Mp.cjs.js.map} +1 -1
  143. package/dist/chunks/{scoped-search-input-BtkT54x9.es.js → scoped-search-input-Bp1jLkCA.es.js} +5 -5
  144. package/dist/chunks/{scoped-search-input-BtkT54x9.es.js.map → scoped-search-input-Bp1jLkCA.es.js.map} +1 -1
  145. package/dist/chunks/{search-input-CrBZbcQZ.es.js → search-input-BXupHEqO.es.js} +4 -4
  146. package/dist/chunks/{search-input-CrBZbcQZ.es.js.map → search-input-BXupHEqO.es.js.map} +1 -1
  147. package/dist/chunks/{search-input-Dj3m-KLQ.cjs.js → search-input-dKX_4ugG.cjs.js} +2 -2
  148. package/dist/chunks/{search-input-Dj3m-KLQ.cjs.js.map → search-input-dKX_4ugG.cjs.js.map} +1 -1
  149. package/dist/chunks/{select-XGBo5PBD.es.js → select-Bhx4gNRZ.es.js} +4 -4
  150. package/dist/chunks/{select-XGBo5PBD.es.js.map → select-Bhx4gNRZ.es.js.map} +1 -1
  151. package/dist/chunks/{select-CkRjvqXr.cjs.js → select-CfCMvQJi.cjs.js} +2 -2
  152. package/dist/chunks/{select-CkRjvqXr.cjs.js.map → select-CfCMvQJi.cjs.js.map} +1 -1
  153. package/dist/chunks/{separator-BQymxgX_.es.js → separator-CZ6iL0Ll.es.js} +3 -3
  154. package/dist/chunks/{separator-BQymxgX_.es.js.map → separator-CZ6iL0Ll.es.js.map} +1 -1
  155. package/dist/chunks/{separator-CiwjAZuL.cjs.js → separator-Dp5nAz4k.cjs.js} +2 -2
  156. package/dist/chunks/{separator-CiwjAZuL.cjs.js.map → separator-Dp5nAz4k.cjs.js.map} +1 -1
  157. package/dist/chunks/{split-button-gkxt0_VW.es.js → split-button--SGK_sio.es.js} +4 -4
  158. package/dist/chunks/{split-button-gkxt0_VW.es.js.map → split-button--SGK_sio.es.js.map} +1 -1
  159. package/dist/chunks/{split-button-PGDf6wKn.cjs.js → split-button-PbdceUhb.cjs.js} +2 -2
  160. package/dist/chunks/{split-button-PGDf6wKn.cjs.js.map → split-button-PbdceUhb.cjs.js.map} +1 -1
  161. package/dist/chunks/{switch-CH7ekeqD.es.js → switch-BsYRqPk7.es.js} +3 -3
  162. package/dist/chunks/{switch-CH7ekeqD.es.js.map → switch-BsYRqPk7.es.js.map} +1 -1
  163. package/dist/chunks/{switch-y2P6JONU.cjs.js → switch-DSLTpaeK.cjs.js} +2 -2
  164. package/dist/chunks/{switch-y2P6JONU.cjs.js.map → switch-DSLTpaeK.cjs.js.map} +1 -1
  165. package/dist/chunks/{tabs-BrVChFEQ.cjs.js → tabs-Dxr13-u_.cjs.js} +2 -2
  166. package/dist/chunks/{tabs-BrVChFEQ.cjs.js.map → tabs-Dxr13-u_.cjs.js.map} +1 -1
  167. package/dist/chunks/{tabs-8wzb3Sqa.es.js → tabs-Esbum0x8.es.js} +2 -2
  168. package/dist/chunks/{tabs-8wzb3Sqa.es.js.map → tabs-Esbum0x8.es.js.map} +1 -1
  169. package/dist/chunks/{tag-group-CNNPXQLp.es.js → tag-group-BcXH0x9e.es.js} +2 -2
  170. package/dist/chunks/{tag-group-CNNPXQLp.es.js.map → tag-group-BcXH0x9e.es.js.map} +1 -1
  171. package/dist/chunks/{tag-group-Dxnc423b.cjs.js → tag-group-DCX9BlwH.cjs.js} +2 -2
  172. package/dist/chunks/{tag-group-Dxnc423b.cjs.js.map → tag-group-DCX9BlwH.cjs.js.map} +1 -1
  173. package/dist/chunks/{text-input-BgK1BBgk.es.js → text-input-1zF7EYGS.es.js} +3 -3
  174. package/dist/chunks/{text-input-BgK1BBgk.es.js.map → text-input-1zF7EYGS.es.js.map} +1 -1
  175. package/dist/chunks/{text-input-CYH5CGtT.cjs.js → text-input-BAKLnWid.cjs.js} +2 -2
  176. package/dist/chunks/{text-input-CYH5CGtT.cjs.js.map → text-input-BAKLnWid.cjs.js.map} +1 -1
  177. package/dist/chunks/text-input-field-C2dDzL42.cjs.js +2 -0
  178. package/dist/chunks/text-input-field-C2dDzL42.cjs.js.map +1 -0
  179. package/dist/chunks/text-input-field-DjwfB1sU.es.js +58 -0
  180. package/dist/chunks/text-input-field-DjwfB1sU.es.js.map +1 -0
  181. package/dist/chunks/{time-input-D_YoEUNs.cjs.js → time-input-BjqwOln1.cjs.js} +2 -2
  182. package/dist/chunks/{time-input-D_YoEUNs.cjs.js.map → time-input-BjqwOln1.cjs.js.map} +1 -1
  183. package/dist/chunks/{time-input-BGwNRFQB.es.js → time-input-DCgkD2K7.es.js} +3 -3
  184. package/dist/chunks/{time-input-BGwNRFQB.es.js.map → time-input-DCgkD2K7.es.js.map} +1 -1
  185. package/dist/chunks/{toggle-button-C4oKd_qE.cjs.js → toggle-button-BRdsa79h.cjs.js} +2 -2
  186. package/dist/chunks/{toggle-button-C4oKd_qE.cjs.js.map → toggle-button-BRdsa79h.cjs.js.map} +1 -1
  187. package/dist/chunks/{toggle-button-CRleEA31.es.js → toggle-button-ugWmifHz.es.js} +3 -3
  188. package/dist/chunks/{toggle-button-CRleEA31.es.js.map → toggle-button-ugWmifHz.es.js.map} +1 -1
  189. package/dist/chunks/{toolbar-fIaKJUtg.es.js → toolbar-Dh8s_4IU.es.js} +3 -3
  190. package/dist/chunks/{toolbar-fIaKJUtg.es.js.map → toolbar-Dh8s_4IU.es.js.map} +1 -1
  191. package/dist/chunks/{toolbar-51RGYDa7.cjs.js → toolbar-ypsXnjfh.cjs.js} +2 -2
  192. package/dist/chunks/{toolbar-51RGYDa7.cjs.js.map → toolbar-ypsXnjfh.cjs.js.map} +1 -1
  193. package/dist/components/accordion.cjs +1 -1
  194. package/dist/components/accordion.es.js +2 -2
  195. package/dist/components/alert.cjs +1 -1
  196. package/dist/components/alert.es.js +1 -1
  197. package/dist/components/button.cjs +1 -1
  198. package/dist/components/button.es.js +1 -1
  199. package/dist/components/calendar.cjs +1 -1
  200. package/dist/components/calendar.es.js +1 -1
  201. package/dist/components/card.cjs +1 -1
  202. package/dist/components/card.es.js +1 -1
  203. package/dist/components/checkbox.cjs +1 -1
  204. package/dist/components/checkbox.es.js +1 -1
  205. package/dist/components/collapsible-motion.cjs +1 -1
  206. package/dist/components/collapsible-motion.es.js +1 -1
  207. package/dist/components/combobox.cjs +1 -1
  208. package/dist/components/combobox.es.js +1 -1
  209. package/dist/components/components.cjs +1 -1
  210. package/dist/components/components.es.js +1 -1
  211. package/dist/components/data-table.cjs +1 -1
  212. package/dist/components/data-table.es.js +1 -1
  213. package/dist/components/date-input.cjs +1 -1
  214. package/dist/components/date-input.es.js +1 -1
  215. package/dist/components/date-picker.cjs +1 -1
  216. package/dist/components/date-picker.es.js +1 -1
  217. package/dist/components/date-range-picker-field.cjs +1 -1
  218. package/dist/components/date-range-picker-field.es.js +1 -1
  219. package/dist/components/date-range-picker.cjs +1 -1
  220. package/dist/components/date-range-picker.es.js +1 -1
  221. package/dist/components/dialog.cjs +1 -1
  222. package/dist/components/dialog.es.js +1 -1
  223. package/dist/components/draggable-list.cjs +1 -1
  224. package/dist/components/draggable-list.es.js +1 -1
  225. package/dist/components/drawer.cjs +1 -1
  226. package/dist/components/drawer.es.js +1 -1
  227. package/dist/components/fields.cjs +1 -1
  228. package/dist/components/fields.es.js +6 -4
  229. package/dist/components/fields.es.js.map +1 -1
  230. package/dist/components/form-field.cjs +1 -1
  231. package/dist/components/form-field.es.js +1 -1
  232. package/dist/components/icon-button.cjs +1 -1
  233. package/dist/components/icon-button.es.js +1 -1
  234. package/dist/components/icon-toggle-button.cjs +1 -1
  235. package/dist/components/icon-toggle-button.es.js +1 -1
  236. package/dist/components/localized-field.cjs +1 -1
  237. package/dist/components/localized-field.es.js +1 -1
  238. package/dist/components/money-input-field.cjs +2 -0
  239. package/dist/components/money-input-field.cjs.map +1 -0
  240. package/dist/components/money-input-field.es.js +5 -0
  241. package/dist/components/money-input-field.es.js.map +1 -0
  242. package/dist/components/money-input.cjs +1 -1
  243. package/dist/components/money-input.es.js +1 -1
  244. package/dist/components/multiline-text-input.cjs +1 -1
  245. package/dist/components/multiline-text-input.es.js +1 -1
  246. package/dist/components/nimbus-provider.cjs +1 -1
  247. package/dist/components/nimbus-provider.es.js +1 -1
  248. package/dist/components/number-input.cjs +1 -1
  249. package/dist/components/number-input.es.js +1 -1
  250. package/dist/components/pagination.cjs +1 -1
  251. package/dist/components/pagination.es.js +1 -1
  252. package/dist/components/password-input.cjs +1 -1
  253. package/dist/components/password-input.es.js +1 -1
  254. package/dist/components/patterns.cjs +1 -1
  255. package/dist/components/patterns.es.js +6 -4
  256. package/dist/components/patterns.es.js.map +1 -1
  257. package/dist/components/progress-bar.cjs +1 -1
  258. package/dist/components/progress-bar.es.js +1 -1
  259. package/dist/components/radio-input.cjs +1 -1
  260. package/dist/components/radio-input.es.js +1 -1
  261. package/dist/components/range-calendar.cjs +1 -1
  262. package/dist/components/range-calendar.es.js +1 -1
  263. package/dist/components/rich-text-input.cjs +1 -1
  264. package/dist/components/rich-text-input.es.js +1 -1
  265. package/dist/components/scoped-search-input.cjs +1 -1
  266. package/dist/components/scoped-search-input.es.js +1 -1
  267. package/dist/components/search-input.cjs +1 -1
  268. package/dist/components/search-input.es.js +1 -1
  269. package/dist/components/select.cjs +1 -1
  270. package/dist/components/select.es.js +1 -1
  271. package/dist/components/separator.cjs +1 -1
  272. package/dist/components/separator.es.js +1 -1
  273. package/dist/components/split-button.cjs +1 -1
  274. package/dist/components/split-button.es.js +1 -1
  275. package/dist/components/switch.cjs +1 -1
  276. package/dist/components/switch.es.js +1 -1
  277. package/dist/components/tabs.cjs +1 -1
  278. package/dist/components/tabs.es.js +1 -1
  279. package/dist/components/tag-group.cjs +1 -1
  280. package/dist/components/tag-group.es.js +1 -1
  281. package/dist/components/text-input-field.cjs +1 -1
  282. package/dist/components/text-input-field.es.js +1 -1
  283. package/dist/components/text-input.cjs +1 -1
  284. package/dist/components/text-input.es.js +1 -1
  285. package/dist/components/time-input.cjs +1 -1
  286. package/dist/components/time-input.es.js +1 -1
  287. package/dist/components/toggle-button.cjs +1 -1
  288. package/dist/components/toggle-button.es.js +1 -1
  289. package/dist/components/toolbar.cjs +1 -1
  290. package/dist/components/toolbar.es.js +1 -1
  291. package/dist/index.cjs +1 -1
  292. package/dist/index.cjs.map +1 -1
  293. package/dist/index.es.js +212 -210
  294. package/dist/index.es.js.map +1 -1
  295. package/dist/patterns/fields/index.d.ts +1 -0
  296. package/dist/patterns/fields/money-input-field/index.d.ts +2 -0
  297. package/dist/patterns/fields/money-input-field/money-input-field.d.ts +32 -0
  298. package/dist/patterns/fields/money-input-field/money-input-field.types.d.ts +56 -0
  299. package/dist/patterns/fields/text-input-field/text-input-field.d.ts +1 -1
  300. package/dist/patterns/fields/text-input-field/text-input-field.types.d.ts +5 -0
  301. package/package.json +5 -5
  302. package/dist/chunks/text-input-field-CS9fak25.cjs.js +0 -2
  303. package/dist/chunks/text-input-field-CS9fak25.cjs.js.map +0 -1
  304. package/dist/chunks/text-input-field-uLd_xpGl.es.js +0 -55
  305. package/dist/chunks/text-input-field-uLd_xpGl.es.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"range-calendar-C3ZJL7Ix.cjs.js","sources":["../../src/components/range-calendar/range-calendar.slots.tsx","../../src/components/range-calendar/range-calendar.i18n.ts","../../src/components/range-calendar/components/range-calendar.custom-context.tsx","../../src/components/range-calendar/components/range-calendar.header.tsx","../../src/components/range-calendar/components/range-calendar.grids.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 { 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 {\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\n/**\n * RangeCalendarHeader - Header component for the RangeCalendar\n *\n * Displays navigation controls for month and year selection with proper\n * internationalization and accessibility support.\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 colorPalette=\"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 colorPalette=\"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 colorPalette=\"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\n slot=\"next-year\"\n size=\"xs\"\n variant=\"ghost\"\n colorPalette=\"primary\"\n >\n <KeyboardArrowRight />\n </IconButton>\n </Stack>\n </Flex>\n </RangeCalendarHeaderSlot>\n );\n};\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\n/**\n * RangeCalendarGrids - Grid container component for the RangeCalendar\n *\n * Renders calendar grids for one or more months with proper date cells,\n * weekday headers, and internationalization support.\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 type { RangeCalendarProps } from \"./range-calendar.types\";\nimport type { DateValue } from \"@internationalized/date\";\nimport { RangeCalendar as RaRangeCalendar } from \"react-aria-components\";\nimport { RangeCalendarRootSlot } from \"./range-calendar.slots\";\nimport {\n RangeCalendarCustomContext,\n RangeCalendarHeader,\n RangeCalendarGrids,\n} from \"./components\";\nimport { rangeCalendarSlotRecipe } from \"./range-calendar.recipe\";\nimport { useRecipe } from \"@chakra-ui/react/styled-system\";\nimport { extractStyleProps } from \"@/utils\";\n\n/**\n * RangeCalendar\n * ============================================================\n * Calendar component that displays a grid of days in one or more months\n * and allows users to select a range of dates. Built with React Aria\n * Components for accessibility and WCAG 2.1 AA compliance.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/rangecalendar}\n *\n * @supportsStylePropsx\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\nRangeCalendar.displayName = \"RangeCalendar\";\n"],"names":["withProvider","withContext","createSlotRecipeContext","RangeCalendarRootSlot","RangeCalendarHeaderSlot","RangeCalendarGridsSlot","RangeCalendarMonthTitleSlot","RangeCalendarGridSlot","RangeCalendarGridHeaderSlot","RangeCalendarHeaderCellSlot","RangeCalendarGridBodySlot","RangeCalendarCellSlot","messages","defineMessages","RangeCalendarCustomContext","children","intl","useIntl","locale","useLocale","buttonContext","useContext","ButtonContext","textContext","TextContext","calendarState","RangeCalendarStateContext","buttonSlots","monthLabel","getLocalTimeZone","monthRangeLabel","yearLabel","textSlots","jsx","Provider","RangeCalendarHeader","showRangeLabel","useSlottedContext","RangeCalendarContext","jsxs","Flex","Stack","VisuallyHidden","Heading","IconButton","KeyboardArrowLeft","Text","KeyboardArrowRight","Box","RangeCalendarGrids","context","visibleMonthsCount","todayDate","today","showMonthTitles","_","index","gridDate","monthName","RaCalendarGrid","RaCalendarGridHeader","day","RaCalendarHeaderCell","RaCalendarGridBody","date","isToday","RaCalendarCell","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,EC3DLW,EAAWC,EAAAA,eAAe,CACrC,UAAW,CACT,GAAI,iCACJ,YAAa,8CACb,eAAgB,YAAA,EAElB,cAAe,CACb,GAAI,qCACJ,YAAa,kDACb,eAAgB,gBAAA,EAElB,SAAU,CACR,GAAI,gCACJ,YAAa,6CACb,eAAgB,WAAA,EAElB,aAAc,CACZ,GAAI,oCACJ,YAAa,iDACb,eAAgB,eAAA,CAEpB,CAAC,ECXYC,EAA6B,CAAC,CACzC,SAAAC,CACF,IAEM,CACJ,MAAMC,EAAOC,EAAAA,QAAA,EACP,CAAE,OAAAC,CAAA,EAAWC,4CAAA,EACbC,EAAgBC,EAAAA,WAAWC,2CAAa,EACxCC,EAAcF,EAAAA,WAAWG,2CAAW,EACpCC,EAAgBJ,EAAAA,WAAWK,2CAAyB,EAMpDC,EAAc,CAClB,aAAc,CACZ,QAAS,IAAMF,EAAc,iBAAA,EAC7B,aAAcT,EAAK,cAA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CAAA,CAAsB,SAAAD,CAAA,CAAI,EAC7B,EAEJ,CAAA,CACF,QACCnD,EAAA,CAA0B,QAAO,GAChC,SAAAuB,EAAAA,IAAC8B,4CAAA,CACE,SAACC,GAAS,CACT,MAAMC,EAAUD,EAAK,QAAQZ,CAAS,IAAM,EAC5C,OACEnB,EAAAA,IAACtB,GAAsB,QAAO,GAAC,aAAYsD,EACzC,SAAAhC,EAAAA,IAACiC,EAAAA,0CAAA,CAAe,KAAAF,CAAA,CAAY,CAAA,CAC9B,CAEJ,EACF,CAAA,CACF,CAAA,CAAA,CACF,CAAA,CACF,CAAA,CAAA,EAhCKN,CAAA,CAmCX,CAAC,CAAA,CACH,CAEJ,EClEaS,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,OACExC,EAAAA,IAAC9B,EAAA,CAAuB,GAAGqE,EAAc,GAAGE,EAAY,QAAO,GAC7D,SAAAzC,EAAAA,IAAC4C,EAAAA,0CAAA,CAAiB,GAAGF,EACnB,gBAAC7D,EAAA,CACC,SAAA,CAAAmB,EAAAA,IAACE,EAAA,EAAoB,QACpBc,EAAA,CAAA,CAAmB,CAAA,CAAA,CACtB,EACF,EACF,CAEJ,EAEAkB,EAAc,YAAc"}
1
+ {"version":3,"file":"range-calendar-D2nVoByV.cjs.js","sources":["../../src/components/range-calendar/range-calendar.slots.tsx","../../src/components/range-calendar/range-calendar.i18n.ts","../../src/components/range-calendar/components/range-calendar.custom-context.tsx","../../src/components/range-calendar/components/range-calendar.header.tsx","../../src/components/range-calendar/components/range-calendar.grids.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 { 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 {\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\n/**\n * RangeCalendarHeader - Header component for the RangeCalendar\n *\n * Displays navigation controls for month and year selection with proper\n * internationalization and accessibility support.\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 colorPalette=\"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 colorPalette=\"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 colorPalette=\"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\n slot=\"next-year\"\n size=\"xs\"\n variant=\"ghost\"\n colorPalette=\"primary\"\n >\n <KeyboardArrowRight />\n </IconButton>\n </Stack>\n </Flex>\n </RangeCalendarHeaderSlot>\n );\n};\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\n/**\n * RangeCalendarGrids - Grid container component for the RangeCalendar\n *\n * Renders calendar grids for one or more months with proper date cells,\n * weekday headers, and internationalization support.\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 type { RangeCalendarProps } from \"./range-calendar.types\";\nimport type { DateValue } from \"@internationalized/date\";\nimport { RangeCalendar as RaRangeCalendar } from \"react-aria-components\";\nimport { RangeCalendarRootSlot } from \"./range-calendar.slots\";\nimport {\n RangeCalendarCustomContext,\n RangeCalendarHeader,\n RangeCalendarGrids,\n} from \"./components\";\nimport { rangeCalendarSlotRecipe } from \"./range-calendar.recipe\";\nimport { useRecipe } from \"@chakra-ui/react/styled-system\";\nimport { extractStyleProps } from \"@/utils\";\n\n/**\n * RangeCalendar\n * ============================================================\n * Calendar component that displays a grid of days in one or more months\n * and allows users to select a range of dates. Built with React Aria\n * Components for accessibility and WCAG 2.1 AA compliance.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/rangecalendar}\n *\n * @supportsStylePropsx\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\nRangeCalendar.displayName = \"RangeCalendar\";\n"],"names":["withProvider","withContext","createSlotRecipeContext","RangeCalendarRootSlot","RangeCalendarHeaderSlot","RangeCalendarGridsSlot","RangeCalendarMonthTitleSlot","RangeCalendarGridSlot","RangeCalendarGridHeaderSlot","RangeCalendarHeaderCellSlot","RangeCalendarGridBodySlot","RangeCalendarCellSlot","messages","defineMessages","RangeCalendarCustomContext","children","intl","useIntl","locale","useLocale","buttonContext","useContext","ButtonContext","textContext","TextContext","calendarState","RangeCalendarStateContext","buttonSlots","monthLabel","getLocalTimeZone","monthRangeLabel","yearLabel","textSlots","jsx","Provider","RangeCalendarHeader","showRangeLabel","useSlottedContext","RangeCalendarContext","jsxs","Flex","Stack","VisuallyHidden","Heading","IconButton","KeyboardArrowLeft","Text","KeyboardArrowRight","Box","RangeCalendarGrids","context","visibleMonthsCount","todayDate","today","showMonthTitles","_","index","gridDate","monthName","RaCalendarGrid","RaCalendarGridHeader","day","RaCalendarHeaderCell","RaCalendarGridBody","date","isToday","RaCalendarCell","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,EC3DLW,EAAWC,EAAAA,eAAe,CACrC,UAAW,CACT,GAAI,iCACJ,YAAa,8CACb,eAAgB,YAAA,EAElB,cAAe,CACb,GAAI,qCACJ,YAAa,kDACb,eAAgB,gBAAA,EAElB,SAAU,CACR,GAAI,gCACJ,YAAa,6CACb,eAAgB,WAAA,EAElB,aAAc,CACZ,GAAI,oCACJ,YAAa,iDACb,eAAgB,eAAA,CAEpB,CAAC,ECXYC,EAA6B,CAAC,CACzC,SAAAC,CACF,IAEM,CACJ,MAAMC,EAAOC,EAAAA,QAAA,EACP,CAAE,OAAAC,CAAA,EAAWC,4CAAA,EACbC,EAAgBC,EAAAA,WAAWC,2CAAa,EACxCC,EAAcF,EAAAA,WAAWG,2CAAW,EACpCC,EAAgBJ,EAAAA,WAAWK,2CAAyB,EAMpDC,EAAc,CAClB,aAAc,CACZ,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AA4B,QAAO,GAClC,SAAAwB,EAAAA,IAAC6B,EAAAA,0CAAA,CAAsB,SAAAD,CAAA,CAAI,EAC7B,EAEJ,CAAA,CACF,QACCnD,EAAA,CAA0B,QAAO,GAChC,SAAAuB,EAAAA,IAAC8B,4CAAA,CACE,SAACC,GAAS,CACT,MAAMC,EAAUD,EAAK,QAAQZ,CAAS,IAAM,EAC5C,OACEnB,EAAAA,IAACtB,GAAsB,QAAO,GAAC,aAAYsD,EACzC,SAAAhC,EAAAA,IAACiC,EAAAA,0CAAA,CAAe,KAAAF,CAAA,CAAY,CAAA,CAC9B,CAEJ,EACF,CAAA,CACF,CAAA,CAAA,CACF,CAAA,CACF,CAAA,CAAA,EAhCKN,CAAA,CAmCX,CAAC,CAAA,CACH,CAEJ,EClEaS,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,OACExC,EAAAA,IAAC9B,EAAA,CAAuB,GAAGqE,EAAc,GAAGE,EAAY,QAAO,GAC7D,SAAAzC,EAAAA,IAAC4C,EAAAA,0CAAA,CAAiB,GAAGF,EACnB,gBAAC7D,EAAA,CACC,SAAA,CAAAmB,EAAAA,IAACE,EAAA,EAAoB,QACpBc,EAAA,CAAA,CAAmB,CAAA,CAAA,CACtB,EACF,EACF,CAEJ,EAEAkB,EAAc,YAAc"}
@@ -1,9 +1,9 @@
1
1
  import { jsx as e, jsxs as c } from "react/jsx-runtime";
2
2
  import { b as S, c as I, $ as P, d as N, e as F, f as G, g as H, h as Y, i as j } from "./Heading-D804NNml.es.js";
3
3
  import { createSlotRecipeContext as A } from "@chakra-ui/react";
4
- import { r as B } from "./index-CIWPalKw.es.js";
4
+ import { r as B } from "./index-DqCS7nev.es.js";
5
5
  import { useRecipe as L } from "@chakra-ui/react/styled-system";
6
- import { e as z } from "./extract-style-props-Dw-EpoTk.es.js";
6
+ import { e as z } from "./extract-style-props-CTYox-n4.es.js";
7
7
  import { c as d, d as k } from "./useDateFormatter-CO08GpLe.es.js";
8
8
  import { useContext as u } from "react";
9
9
  import { $ as x } from "./Button-CmpJG0ec.es.js";
@@ -15,7 +15,7 @@ import { KeyboardArrowLeft as C, KeyboardArrowRight as v } from "@commercetools/
15
15
  import { Flex as _ } from "@chakra-ui/react/flex";
16
16
  import { S as y } from "./stack-CoNreM7B.es.js";
17
17
  import { V as q } from "./visually-hidden-m5QY9YV7.es.js";
18
- import { I as h } from "./icon-button-Bue0uAF7.es.js";
18
+ import { I as h } from "./icon-button-BxBVKJ1v.es.js";
19
19
  import { T as R } from "./text-DvqDjbwb.es.js";
20
20
  import { B as D } from "./box-DuBoAZvq.es.js";
21
21
  const { withProvider: E, withContext: s } = /* @__PURE__ */ A({
@@ -216,4 +216,4 @@ se.displayName = "RangeCalendar";
216
216
  export {
217
217
  se as R
218
218
  };
219
- //# sourceMappingURL=range-calendar-Cg44dqRP.es.js.map
219
+ //# sourceMappingURL=range-calendar-lDGLtuIz.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"range-calendar-Cg44dqRP.es.js","sources":["../../src/components/range-calendar/range-calendar.slots.tsx","../../src/components/range-calendar/range-calendar.i18n.ts","../../src/components/range-calendar/components/range-calendar.custom-context.tsx","../../src/components/range-calendar/components/range-calendar.header.tsx","../../src/components/range-calendar/components/range-calendar.grids.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 { 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 {\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\n/**\n * RangeCalendarHeader - Header component for the RangeCalendar\n *\n * Displays navigation controls for month and year selection with proper\n * internationalization and accessibility support.\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 colorPalette=\"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 colorPalette=\"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 colorPalette=\"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\n slot=\"next-year\"\n size=\"xs\"\n variant=\"ghost\"\n colorPalette=\"primary\"\n >\n <KeyboardArrowRight />\n </IconButton>\n </Stack>\n </Flex>\n </RangeCalendarHeaderSlot>\n );\n};\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\n/**\n * RangeCalendarGrids - Grid container component for the RangeCalendar\n *\n * Renders calendar grids for one or more months with proper date cells,\n * weekday headers, and internationalization support.\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 type { RangeCalendarProps } from \"./range-calendar.types\";\nimport type { DateValue } from \"@internationalized/date\";\nimport { RangeCalendar as RaRangeCalendar } from \"react-aria-components\";\nimport { RangeCalendarRootSlot } from \"./range-calendar.slots\";\nimport {\n RangeCalendarCustomContext,\n RangeCalendarHeader,\n RangeCalendarGrids,\n} from \"./components\";\nimport { rangeCalendarSlotRecipe } from \"./range-calendar.recipe\";\nimport { useRecipe } from \"@chakra-ui/react/styled-system\";\nimport { extractStyleProps } from \"@/utils\";\n\n/**\n * RangeCalendar\n * ============================================================\n * Calendar component that displays a grid of days in one or more months\n * and allows users to select a range of dates. Built with React Aria\n * Components for accessibility and WCAG 2.1 AA compliance.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/rangecalendar}\n *\n * @supportsStylePropsx\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\nRangeCalendar.displayName = \"RangeCalendar\";\n"],"names":["withProvider","withContext","createSlotRecipeContext","RangeCalendarRootSlot","RangeCalendarHeaderSlot","RangeCalendarGridsSlot","RangeCalendarMonthTitleSlot","RangeCalendarGridSlot","RangeCalendarGridHeaderSlot","RangeCalendarHeaderCellSlot","RangeCalendarGridBodySlot","RangeCalendarCellSlot","messages","defineMessages","RangeCalendarCustomContext","children","intl","useIntl","locale","useLocale","buttonContext","useContext","ButtonContext","textContext","TextContext","calendarState","RangeCalendarStateContext","buttonSlots","monthLabel","getLocalTimeZone","monthRangeLabel","yearLabel","textSlots","jsx","Provider","RangeCalendarHeader","showRangeLabel","useSlottedContext","RangeCalendarContext","jsxs","Flex","Stack","VisuallyHidden","Heading","IconButton","KeyboardArrowLeft","Text","KeyboardArrowRight","Box","RangeCalendarGrids","context","visibleMonthsCount","todayDate","today","showMonthTitles","_","index","gridDate","monthName","RaCalendarGrid","RaCalendarGridHeader","day","RaCalendarHeaderCell","RaCalendarGridBody","date","isToday","RaCalendarCell","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,GC3DLW,IAAW,gBAAAC,EAAe;AAAA,EACrC,WAAW;AAAA,IACT,IAAI;AAAA,IACJ,aAAa;AAAA,IACb,gBAAgB;AAAA,EAAA;AAAA,EAElB,eAAe;AAAA,IACb,IAAI;AAAA,IACJ,aAAa;AAAA,IACb,gBAAgB;AAAA,EAAA;AAAA,EAElB,UAAU;AAAA,IACR,IAAI;AAAA,IACJ,aAAa;AAAA,IACb,gBAAgB;AAAA,EAAA;AAAA,EAElB,cAAc;AAAA,IACZ,IAAI;AAAA,IACJ,aAAa;AAAA,IACb,gBAAgB;AAAA,EAAA;AAEpB,CAAC,GCXYC,KAA6B,CAAC;AAAA,EACzC,UAAAC;AACF,MAEM;AACJ,QAAMC,IAAOC,EAAA,GACP,EAAE,QAAAC,EAAA,IAAWC,EAAA,GACbC,IAAgBC,EAAWC,CAAa,GACxCC,IAAcF,EAAWG,CAAW,GACpCC,IAAgBJ,EAAWK,CAAyB,GAMpDC,IAAc;AAAA,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AaC,CAAc,IAAIJ,EAAO,kBAAkBD,CAAK,GAC9D,CAACM,GAAYC,CAAU,IAAIC,EAAkBH,CAAc;AAEjE,SACE,gBAAAxC,EAAC9B,GAAA,EAAuB,GAAGqE,GAAc,GAAGE,GAAY,SAAO,IAC7D,UAAA,gBAAAzC,EAAC4C,GAAA,EAAiB,GAAGF,GACnB,4BAAC7D,IAAA,EACC,UAAA;AAAA,IAAA,gBAAAmB,EAACE,IAAA,EAAoB;AAAA,sBACpBc,IAAA,CAAA,CAAmB;AAAA,EAAA,EAAA,CACtB,GACF,GACF;AAEJ;AAEAkB,GAAc,cAAc;"}
1
+ {"version":3,"file":"range-calendar-lDGLtuIz.es.js","sources":["../../src/components/range-calendar/range-calendar.slots.tsx","../../src/components/range-calendar/range-calendar.i18n.ts","../../src/components/range-calendar/components/range-calendar.custom-context.tsx","../../src/components/range-calendar/components/range-calendar.header.tsx","../../src/components/range-calendar/components/range-calendar.grids.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 { 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 {\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\n/**\n * RangeCalendarHeader - Header component for the RangeCalendar\n *\n * Displays navigation controls for month and year selection with proper\n * internationalization and accessibility support.\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 colorPalette=\"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 colorPalette=\"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 colorPalette=\"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\n slot=\"next-year\"\n size=\"xs\"\n variant=\"ghost\"\n colorPalette=\"primary\"\n >\n <KeyboardArrowRight />\n </IconButton>\n </Stack>\n </Flex>\n </RangeCalendarHeaderSlot>\n );\n};\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\n/**\n * RangeCalendarGrids - Grid container component for the RangeCalendar\n *\n * Renders calendar grids for one or more months with proper date cells,\n * weekday headers, and internationalization support.\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 type { RangeCalendarProps } from \"./range-calendar.types\";\nimport type { DateValue } from \"@internationalized/date\";\nimport { RangeCalendar as RaRangeCalendar } from \"react-aria-components\";\nimport { RangeCalendarRootSlot } from \"./range-calendar.slots\";\nimport {\n RangeCalendarCustomContext,\n RangeCalendarHeader,\n RangeCalendarGrids,\n} from \"./components\";\nimport { rangeCalendarSlotRecipe } from \"./range-calendar.recipe\";\nimport { useRecipe } from \"@chakra-ui/react/styled-system\";\nimport { extractStyleProps } from \"@/utils\";\n\n/**\n * RangeCalendar\n * ============================================================\n * Calendar component that displays a grid of days in one or more months\n * and allows users to select a range of dates. Built with React Aria\n * Components for accessibility and WCAG 2.1 AA compliance.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/rangecalendar}\n *\n * @supportsStylePropsx\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\nRangeCalendar.displayName = \"RangeCalendar\";\n"],"names":["withProvider","withContext","createSlotRecipeContext","RangeCalendarRootSlot","RangeCalendarHeaderSlot","RangeCalendarGridsSlot","RangeCalendarMonthTitleSlot","RangeCalendarGridSlot","RangeCalendarGridHeaderSlot","RangeCalendarHeaderCellSlot","RangeCalendarGridBodySlot","RangeCalendarCellSlot","messages","defineMessages","RangeCalendarCustomContext","children","intl","useIntl","locale","useLocale","buttonContext","useContext","ButtonContext","textContext","TextContext","calendarState","RangeCalendarStateContext","buttonSlots","monthLabel","getLocalTimeZone","monthRangeLabel","yearLabel","textSlots","jsx","Provider","RangeCalendarHeader","showRangeLabel","useSlottedContext","RangeCalendarContext","jsxs","Flex","Stack","VisuallyHidden","Heading","IconButton","KeyboardArrowLeft","Text","KeyboardArrowRight","Box","RangeCalendarGrids","context","visibleMonthsCount","todayDate","today","showMonthTitles","_","index","gridDate","monthName","RaCalendarGrid","RaCalendarGridHeader","day","RaCalendarHeaderCell","RaCalendarGridBody","date","isToday","RaCalendarCell","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,IAAy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,GACF,GACF;AAEJ;AAEAkB,GAAc,cAAc;"}
@@ -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-Dqfn9Nf9.cjs.js"),Ee=require("./index-CQgD7Eq4.cjs.js"),c=require("slate"),I=require("slate-react"),Ie=require("slate-history"),Ce=require("./useObjectRef-4v2MxSjQ.cjs.js"),re=require("react-intl"),$=require("./icon-toggle-button-DEuZjBan.cjs.js"),ne=require("./group-Cjq5lNQD.cjs.js"),w=require("@commercetools/nimbus-icons"),E=require("./menu-BBXEbU_Z.cjs.js"),b=require("./tooltip-Bv-QlJ1O.cjs.js"),Z=require("./icon-button-C-iRgq4t.cjs.js"),O=require("./box-CWni3A32.cjs.js"),A=require("./text-BtRhIklG.cjs.js"),ve=require("./toolbar-51RGYDa7.cjs.js"),oe=require("./separator-CiwjAZuL.cjs.js"),ie=require("./toggle-button-group-Lfn3zYmC.cjs.js"),V=require("./visually-hidden-BjtXUoFK.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"),me=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]),ae={"mod+b":"bold","mod+i":"italic","mod+u":"underline","mod+`":"code"},U={placeholder:"Start typing...",isDisabled:!1,isReadOnly:!1,autoFocus:!1},le={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"},ce={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"},He=[W.STRIKETHROUGH,W.CODE],Le=[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"}}),Ke=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"}}],qe=["heading-one","heading-two","heading-three","heading-four","heading-five","block-quote"];/*!
1
+ "use strict";const s=require("react/jsx-runtime"),f=require("react"),te=require("@chakra-ui/react"),we=require("./extract-style-props-Dp-cKlvK.cjs.js"),Ee=require("./index-BNOrhWlg.cjs.js"),c=require("slate"),I=require("slate-react"),Ie=require("slate-history"),Ce=require("./useObjectRef-4v2MxSjQ.cjs.js"),re=require("react-intl"),$=require("./icon-toggle-button-C9xlEbeo.cjs.js"),ne=require("./group-Cjq5lNQD.cjs.js"),w=require("@commercetools/nimbus-icons"),E=require("./menu-CKQ0yh2S.cjs.js"),b=require("./tooltip-Bv-QlJ1O.cjs.js"),Z=require("./icon-button-mdaiwgqz.cjs.js"),O=require("./box-CWni3A32.cjs.js"),A=require("./text-BtRhIklG.cjs.js"),ve=require("./toolbar-ypsXnjfh.cjs.js"),oe=require("./separator-Dp5nAz4k.cjs.js"),ie=require("./toggle-button-group-Lfn3zYmC.cjs.js"),V=require("./visually-hidden-BjtXUoFK.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"),me=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]),ae={"mod+b":"bold","mod+i":"italic","mod+u":"underline","mod+`":"code"},U={placeholder:"Start typing...",isDisabled:!1,isReadOnly:!1,autoFocus:!1},le={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"},ce={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"},He=[W.STRIKETHROUGH,W.CODE],Le=[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"}}),Ke=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"}}],qe=["heading-one","heading-two","heading-three","heading-four","heading-five","block-quote"];/*!
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,ue;function Oe(){if(ue)return Y;ue=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 Be=Oe();const G=se(Be),xe=`​
8
8
  `,H=()=>[{type:"paragraph",children:[{text:""}]}],Pe=t=>t.map(be).join(""),be=t=>{if(c.Text.isText(t)){const o=t;let n=G(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(xe,"g"),"<br>"),n}const e=t.children.map(be).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="${G(l)}"`}let n="";if(r.htmlAttributes&&typeof r.htmlAttributes=="object")for(const[l,d]of Object.entries(r.htmlAttributes))l.toLowerCase().startsWith("on")||(n+=` ${G(l)}="${G(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(ye).filter(Boolean);return Me(o)}else return[{type:"paragraph",children:[{text:t}]}]}catch(e){return console.warn("Failed to parse HTML:",e),H()}},ye=t=>{if(t.nodeType===Node.TEXT_NODE)return(t.textContent||"").replace(/<br\s*\/?>/gi,xe);if(t.nodeType!==Node.ELEMENT_NODE)return null;const e=t,r=e.tagName.toLowerCase(),o=Array.from(e.childNodes).map(ye).filter(Boolean);if(r in le){const l=le[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 ce){const l=ce[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},Te=t=>t.children.map(e=>c.Text.isText(e)?e.text:c.Element.isElement(e)?Te(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?Te(e):String(e||"")).join(""),Ve=t=>{const e=String(t).trim().toLowerCase();return e.startsWith("javascript:")||e.startsWith("data:")||e.startsWith("vbscript:")?"#":String(t)},Me=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
  `},Ze=({withPreservedSelection:t})=>{const e=I.useSlate(),r=f.useMemo(()=>{const d=[];return He.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 Le.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}},et=({isDisabled:t=!1})=>{const e=re.useIntl(),r=I.useSlate(),o=me(r),{allSelectedKeys:n,handleAllSelectionChange:l}=Ze({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)})]})})]})]})};var k={},fe;function tt(){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 rt=tt();const st=se(rt),nt=({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 ae)if(st(o,r)){r.preventDefault();const n=ae[o];F(t,n);return}if(r.shiftKey&&r.key==="Enter"){r.preventDefault(),t.insertText(Je.placeholderCharacter);return}},[t])}),je=function({ref:e,value:r,onChange:o,onFocus:n,onBlur:l,placeholder:d=U.placeholder,isDisabled:p=U.isDisabled,isReadOnly:h=U.isReadOnly,autoFocus:m=U.autoFocus,toolbar:j}){const g=f.useRef(null),a=Ce.$df56164dff5785e2$export$4338b53315abf666(te.mergeRefs(g,e)),i=f.useMemo(()=>{const x=c.createEditor();return We(Ie.withHistory(I.withReact(x)))},[]),{handleKeyDown:y}=nt({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"})})]})};je.displayName="RichTextEditor";const ot=({withPreservedSelection:t,textStyles:e})=>{const r=I.useSlate(),o=f.useMemo(()=>qe.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}},Se=({isDisabled:t=!1})=>{const e=re.useIntl(),r=I.useSlate(),o=me(r),n=Ke(e),{currentTextStyle:l,selectedTextStyleLabel:d,handleTextStyleChange:p,handleListToggle:h,selectedFormatKeys:m,selectedListKeys:j,hasUndos:g,hasRedos:a}=ot({withPreservedSelection:o,textStyles:n});return s.jsxs(ve.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(et,{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:Ee.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=Me(C);return s.jsx(Ae,{role:"group",...y,...M,...L,...N,ref:e,children:s.jsx(je,{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-iS9XnPhW.cjs.js.map
10
+ //# sourceMappingURL=rich-text-input-5yMKVX7g.cjs.js.map