@commercetools/nimbus 0.0.0-canary-20251024075337 → 0.0.0-canary-20251024090130

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 (308) hide show
  1. package/dist/chunks/{Button-CafJrK0a.es.js → Button-C4ud7YxN.es.js} +3 -3
  2. package/dist/chunks/{Button-CafJrK0a.es.js.map → Button-C4ud7YxN.es.js.map} +1 -1
  3. package/dist/chunks/{DateField-BjKTTWs5.es.js → DateField-oXtVK-_5.es.js} +6 -6
  4. package/dist/chunks/{DateField-BjKTTWs5.es.js.map → DateField-oXtVK-_5.es.js.map} +1 -1
  5. package/dist/chunks/{DatePicker-BrgxRTyS.es.js → DatePicker-DrWdEOUQ.es.js} +40 -40
  6. package/dist/chunks/{DatePicker-BrgxRTyS.es.js.map → DatePicker-DrWdEOUQ.es.js.map} +1 -1
  7. package/dist/chunks/{Dialog-Cx5MzP6O.es.js → Dialog-C3sNnu1k.es.js} +5 -5
  8. package/dist/chunks/{Dialog-Cx5MzP6O.es.js.map → Dialog-C3sNnu1k.es.js.map} +1 -1
  9. package/dist/chunks/{Group-Bd9Zcn-V.es.js → Group-CiDvtaeM.es.js} +2 -2
  10. package/dist/chunks/{Group-Bd9Zcn-V.es.js.map → Group-CiDvtaeM.es.js.map} +1 -1
  11. package/dist/chunks/{Header-D6CYH5C_.es.js → Header-BxizMPpp.es.js} +2 -2
  12. package/dist/chunks/{Header-D6CYH5C_.es.js.map → Header-BxizMPpp.es.js.map} +1 -1
  13. package/dist/chunks/{Heading-DPlDZAaf.es.js → Heading-CAI_WTdS.es.js} +14 -14
  14. package/dist/chunks/{Heading-DPlDZAaf.es.js.map → Heading-CAI_WTdS.es.js.map} +1 -1
  15. package/dist/chunks/{Input-EnWCwj65.es.js → Input-De-sfAtq.es.js} +2 -2
  16. package/dist/chunks/{Input-EnWCwj65.es.js.map → Input-De-sfAtq.es.js.map} +1 -1
  17. package/dist/chunks/{Label-7OK510ha.es.js → Label-BS7NIWvY.es.js} +2 -2
  18. package/dist/chunks/{Label-7OK510ha.es.js.map → Label-BS7NIWvY.es.js.map} +1 -1
  19. package/dist/chunks/{ListBox-C4BToxCj.es.js → ListBox-BfRQSQ3P.es.js} +4 -4
  20. package/dist/chunks/{ListBox-C4BToxCj.es.js.map → ListBox-BfRQSQ3P.es.js.map} +1 -1
  21. package/dist/chunks/{Modal-DowTFCAo.es.js → Modal-BTJk-mW-.es.js} +3 -3
  22. package/dist/chunks/{Modal-DowTFCAo.es.js.map → Modal-BTJk-mW-.es.js.map} +1 -1
  23. package/dist/chunks/{ProgressBar-DA797ATA.es.js → ProgressBar-Dl4ZrjfX.es.js} +3 -3
  24. package/dist/chunks/{ProgressBar-DA797ATA.es.js.map → ProgressBar-Dl4ZrjfX.es.js.map} +1 -1
  25. package/dist/chunks/{Separator-B0kvBk7k.es.js → Separator-BOfmJd-0.es.js} +2 -2
  26. package/dist/chunks/{Separator-B0kvBk7k.es.js.map → Separator-BOfmJd-0.es.js.map} +1 -1
  27. package/dist/chunks/{TextArea-B__-6Fht.es.js → TextArea-DR4R6vJD.es.js} +2 -2
  28. package/dist/chunks/{TextArea-B__-6Fht.es.js.map → TextArea-DR4R6vJD.es.js.map} +1 -1
  29. package/dist/chunks/{ToggleButton-wAaapRtE.es.js → ToggleButton-DMoUAyoo.es.js} +2 -2
  30. package/dist/chunks/{ToggleButton-wAaapRtE.es.js.map → ToggleButton-DMoUAyoo.es.js.map} +1 -1
  31. package/dist/chunks/{accordion-BMztnndo.es.js → accordion-DyTTsrDh.es.js} +4 -4
  32. package/dist/chunks/{accordion-BMztnndo.es.js.map → accordion-DyTTsrDh.es.js.map} +1 -1
  33. package/dist/chunks/{alert-DEy9gf3U.es.js → alert-DCm-d72j.es.js} +2 -2
  34. package/dist/chunks/{alert-DEy9gf3U.es.js.map → alert-DCm-d72j.es.js.map} +1 -1
  35. package/dist/chunks/avatar-BNhECwD5.cjs.js +2 -0
  36. package/dist/chunks/avatar-BNhECwD5.cjs.js.map +1 -0
  37. package/dist/chunks/avatar-DFibCsCs.es.js +47 -0
  38. package/dist/chunks/avatar-DFibCsCs.es.js.map +1 -0
  39. package/dist/chunks/{button-B4vE-tAz.es.js → button-Ccof5UcQ.es.js} +4 -4
  40. package/dist/chunks/{button-B4vE-tAz.es.js.map → button-Ccof5UcQ.es.js.map} +1 -1
  41. package/dist/chunks/calendar-CcA9vDZ_.es.js +209 -0
  42. package/dist/chunks/calendar-CcA9vDZ_.es.js.map +1 -0
  43. package/dist/chunks/calendar-Dm2LIuao.cjs.js +2 -0
  44. package/dist/chunks/calendar-Dm2LIuao.cjs.js.map +1 -0
  45. package/dist/chunks/{checkbox-B-1U4AKF.es.js → checkbox-CFDf2T7S.es.js} +3 -3
  46. package/dist/chunks/{checkbox-B-1U4AKF.es.js.map → checkbox-CFDf2T7S.es.js.map} +1 -1
  47. package/dist/chunks/{collapsible-motion-CeEspYkc.es.js → collapsible-motion-DmWoSXyS.es.js} +3 -3
  48. package/dist/chunks/{collapsible-motion-CeEspYkc.es.js.map → collapsible-motion-DmWoSXyS.es.js.map} +1 -1
  49. package/dist/chunks/combobox-BuuiDfjq.cjs.js +2 -0
  50. package/dist/chunks/combobox-BuuiDfjq.cjs.js.map +1 -0
  51. package/dist/chunks/{combobox-0cCAwg3W.es.js → combobox-C1DerhP1.es.js} +1064 -1032
  52. package/dist/chunks/combobox-C1DerhP1.es.js.map +1 -0
  53. package/dist/chunks/{data-table-BxITOPnx.es.js → data-table-BuGUlgQU.es.js} +1169 -1116
  54. package/dist/chunks/data-table-BuGUlgQU.es.js.map +1 -0
  55. package/dist/chunks/data-table-CyNImBEZ.cjs.js +2 -0
  56. package/dist/chunks/data-table-CyNImBEZ.cjs.js.map +1 -0
  57. package/dist/chunks/{date-input-D70l0IsY.es.js → date-input-B_T7Az3-.es.js} +4 -4
  58. package/dist/chunks/{date-input-D70l0IsY.es.js.map → date-input-B_T7Az3-.es.js.map} +1 -1
  59. package/dist/chunks/{date-picker-Dk3QgvCN.cjs.js → date-picker-BEDlqfYN.cjs.js} +2 -2
  60. package/dist/chunks/date-picker-BEDlqfYN.cjs.js.map +1 -0
  61. package/dist/chunks/{date-picker-FvaPPqXZ.es.js → date-picker-DcDxaZ6Y.es.js} +14 -14
  62. package/dist/chunks/date-picker-DcDxaZ6Y.es.js.map +1 -0
  63. package/dist/chunks/date-range-picker-C5G8uDlJ.es.js +358 -0
  64. package/dist/chunks/date-range-picker-C5G8uDlJ.es.js.map +1 -0
  65. package/dist/chunks/date-range-picker-vr0DE_0V.cjs.js +2 -0
  66. package/dist/chunks/date-range-picker-vr0DE_0V.cjs.js.map +1 -0
  67. package/dist/chunks/{dialog-Bsg1kLnV.es.js → dialog-C9OHxEA2.es.js} +2 -2
  68. package/dist/chunks/{dialog-Bsg1kLnV.es.js.map → dialog-C9OHxEA2.es.js.map} +1 -1
  69. package/dist/chunks/{dialog.title-BmLccUat.es.js → dialog.title-CGSRn_GL.es.js} +7 -7
  70. package/dist/chunks/{dialog.title-BmLccUat.es.js.map → dialog.title-CGSRn_GL.es.js.map} +1 -1
  71. package/dist/chunks/{draggable-list-CadviYoN.es.js → draggable-list-5SfJXtEK.es.js} +10 -10
  72. package/dist/chunks/{draggable-list-CadviYoN.es.js.map → draggable-list-5SfJXtEK.es.js.map} +1 -1
  73. package/dist/chunks/{drawer-BsHkmwKB.es.js → drawer-LRm6SeM-.es.js} +8 -8
  74. package/dist/chunks/{drawer-BsHkmwKB.es.js.map → drawer-LRm6SeM-.es.js.map} +1 -1
  75. package/dist/chunks/{extract-style-props-CTU5PJnh.es.js → extract-style-props-CZpdYA8m.es.js} +2 -2
  76. package/dist/chunks/{extract-style-props-CTU5PJnh.es.js.map → extract-style-props-CZpdYA8m.es.js.map} +1 -1
  77. package/dist/chunks/{form-field-CH7MhZMM.es.js → form-field-B6PqLujT.es.js} +3 -3
  78. package/dist/chunks/{form-field-CH7MhZMM.es.js.map → form-field-B6PqLujT.es.js.map} +1 -1
  79. package/dist/chunks/{group-DDgNGiAB.es.js → group-BLPsc2Lf.es.js} +2 -2
  80. package/dist/chunks/{group-DDgNGiAB.es.js.map → group-BLPsc2Lf.es.js.map} +1 -1
  81. package/dist/chunks/{heading-DwvFL6nk.es.js → heading-14HwlWvH.es.js} +2 -2
  82. package/dist/chunks/{heading-DwvFL6nk.es.js.map → heading-14HwlWvH.es.js.map} +1 -1
  83. package/dist/chunks/{icon-button-CNauu_zf.es.js → icon-button-g4dZUH5O.es.js} +2 -2
  84. package/dist/chunks/{icon-button-CNauu_zf.es.js.map → icon-button-g4dZUH5O.es.js.map} +1 -1
  85. package/dist/chunks/{icon-toggle-button-D5ic1FhD.es.js → icon-toggle-button-DBGgxBWR.es.js} +2 -2
  86. package/dist/chunks/{icon-toggle-button-D5ic1FhD.es.js.map → icon-toggle-button-DBGgxBWR.es.js.map} +1 -1
  87. package/dist/chunks/{index-jNM4sRnI.es.js → index-CaeeOiBp.es.js} +3 -3
  88. package/dist/chunks/{index-jNM4sRnI.es.js.map → index-CaeeOiBp.es.js.map} +1 -1
  89. package/dist/chunks/{kbd-C6IVVksK.es.js → kbd-Cy3jFCSc.es.js} +2 -2
  90. package/dist/chunks/{kbd-C6IVVksK.es.js.map → kbd-Cy3jFCSc.es.js.map} +1 -1
  91. package/dist/chunks/loading-spinner-ByHGBHzt.es.js.map +1 -1
  92. package/dist/chunks/loading-spinner-DsKcjJ2b.cjs.js.map +1 -1
  93. package/dist/chunks/{localized-field-u03KZc2G.cjs.js → localized-field-BffTavHV.cjs.js} +2 -2
  94. package/dist/chunks/localized-field-BffTavHV.cjs.js.map +1 -0
  95. package/dist/chunks/{localized-field-D4HBEdq0.es.js → localized-field-CHV3AGQ-.es.js} +10 -10
  96. package/dist/chunks/localized-field-CHV3AGQ-.es.js.map +1 -0
  97. package/dist/chunks/{menu-CvowvbXh.es.js → menu-B5r0vnY6.es.js} +5 -5
  98. package/dist/chunks/{menu-CvowvbXh.es.js.map → menu-B5r0vnY6.es.js.map} +1 -1
  99. package/dist/chunks/{money-input-DHiEn7XA.es.js → money-input-Con6I5Ej.es.js} +7 -7
  100. package/dist/chunks/money-input-Con6I5Ej.es.js.map +1 -0
  101. package/dist/chunks/money-input-qNQdmjtx.cjs.js.map +1 -1
  102. package/dist/chunks/{multiline-text-input-BD_Pe10q.es.js → multiline-text-input-Cta4bg2-.es.js} +4 -4
  103. package/dist/chunks/{multiline-text-input-BD_Pe10q.es.js.map → multiline-text-input-Cta4bg2-.es.js.map} +1 -1
  104. package/dist/chunks/{nimbus-provider-DD5Om-MD.es.js → nimbus-provider-BtTUZMKb.es.js} +2 -2
  105. package/dist/chunks/{nimbus-provider-DD5Om-MD.es.js.map → nimbus-provider-BtTUZMKb.es.js.map} +1 -1
  106. package/dist/chunks/{number-input-DO5bD82a.es.js → number-input-BClKrTYK.es.js} +5 -5
  107. package/dist/chunks/{number-input-DO5bD82a.es.js.map → number-input-BClKrTYK.es.js.map} +1 -1
  108. package/dist/chunks/number-input-BUdRuDBZ.cjs.js.map +1 -1
  109. package/dist/chunks/pagination-BL1y2lAx.cjs.js +2 -0
  110. package/dist/chunks/pagination-BL1y2lAx.cjs.js.map +1 -0
  111. package/dist/chunks/pagination-BqjffQ1Z.es.js +210 -0
  112. package/dist/chunks/pagination-BqjffQ1Z.es.js.map +1 -0
  113. package/dist/chunks/{password-input-D4vhdbQW.es.js → password-input-DoWjkkoL.es.js} +4 -4
  114. package/dist/chunks/password-input-DoWjkkoL.es.js.map +1 -0
  115. package/dist/chunks/password-input-Dtu0_JiV.cjs.js.map +1 -1
  116. package/dist/chunks/{popover-qy-Vw0qP.es.js → popover-Dtxly24d.es.js} +2 -2
  117. package/dist/chunks/{popover-qy-Vw0qP.es.js.map → popover-Dtxly24d.es.js.map} +1 -1
  118. package/dist/chunks/{progress-bar-h8RUoyYt.es.js → progress-bar-oCdd2qvN.es.js} +4 -4
  119. package/dist/chunks/{progress-bar-h8RUoyYt.es.js.map → progress-bar-oCdd2qvN.es.js.map} +1 -1
  120. package/dist/chunks/{radio-input-qdrHc_fC.es.js → radio-input-eA3VvPwV.es.js} +5 -5
  121. package/dist/chunks/{radio-input-qdrHc_fC.es.js.map → radio-input-eA3VvPwV.es.js.map} +1 -1
  122. package/dist/chunks/range-calendar-BXMVhACe.cjs.js +2 -0
  123. package/dist/chunks/range-calendar-BXMVhACe.cjs.js.map +1 -0
  124. package/dist/chunks/range-calendar-BnB1F7_i.es.js +209 -0
  125. package/dist/chunks/range-calendar-BnB1F7_i.es.js.map +1 -0
  126. package/dist/chunks/rich-text-input-BebV_CaK.es.js +1200 -0
  127. package/dist/chunks/rich-text-input-BebV_CaK.es.js.map +1 -0
  128. package/dist/chunks/rich-text-input-D6WXRxiJ.cjs.js +10 -0
  129. package/dist/chunks/rich-text-input-D6WXRxiJ.cjs.js.map +1 -0
  130. package/dist/chunks/scoped-search-input-B5wDEKhF.es.js +143 -0
  131. package/dist/chunks/scoped-search-input-B5wDEKhF.es.js.map +1 -0
  132. package/dist/chunks/scoped-search-input-C3Vuxp-X.cjs.js +2 -0
  133. package/dist/chunks/scoped-search-input-C3Vuxp-X.cjs.js.map +1 -0
  134. package/dist/chunks/{search-input-CD_OQQwA.es.js → search-input-CmmBtmQf.es.js} +9 -9
  135. package/dist/chunks/{search-input-CD_OQQwA.es.js.map → search-input-CmmBtmQf.es.js.map} +1 -1
  136. package/dist/chunks/search-input-D4ISfjCg.cjs.js.map +1 -1
  137. package/dist/chunks/select-DLnPgZGL.cjs.js.map +1 -1
  138. package/dist/chunks/{select-Dny1auOH.es.js → select-DYkIoOqo.es.js} +10 -10
  139. package/dist/chunks/{select-Dny1auOH.es.js.map → select-DYkIoOqo.es.js.map} +1 -1
  140. package/dist/chunks/{separator-CCqidzEw.es.js → separator-D2824IwZ.es.js} +4 -4
  141. package/dist/chunks/{separator-CCqidzEw.es.js.map → separator-D2824IwZ.es.js.map} +1 -1
  142. package/dist/chunks/split-button-D4fKtZU6.cjs.js +2 -0
  143. package/dist/chunks/split-button-D4fKtZU6.cjs.js.map +1 -0
  144. package/dist/chunks/split-button-P5JM5TIs.es.js +106 -0
  145. package/dist/chunks/split-button-P5JM5TIs.es.js.map +1 -0
  146. package/dist/chunks/{switch-BRRuFpzu.es.js → switch-jX2Q8faO.es.js} +3 -3
  147. package/dist/chunks/{switch-BRRuFpzu.es.js.map → switch-jX2Q8faO.es.js.map} +1 -1
  148. package/dist/chunks/{tabs-BXoJTX6z.es.js → tabs-Bcs39h4J.es.js} +3 -3
  149. package/dist/chunks/{tabs-BXoJTX6z.es.js.map → tabs-Bcs39h4J.es.js.map} +1 -1
  150. package/dist/chunks/tag-group-Dx690E8r.cjs.js +2 -0
  151. package/dist/chunks/tag-group-Dx690E8r.cjs.js.map +1 -0
  152. package/dist/chunks/{tag-group-CDx2BCfu.es.js → tag-group-k_jEVQhv.es.js} +120 -110
  153. package/dist/chunks/tag-group-k_jEVQhv.es.js.map +1 -0
  154. package/dist/chunks/{text-BufUKCee.es.js → text-5xQLnEG4.es.js} +2 -2
  155. package/dist/chunks/{text-BufUKCee.es.js.map → text-5xQLnEG4.es.js.map} +1 -1
  156. package/dist/chunks/{text-input-CJNTJbW0.es.js → text-input-D8mfBGrA.es.js} +4 -4
  157. package/dist/chunks/{text-input-CJNTJbW0.es.js.map → text-input-D8mfBGrA.es.js.map} +1 -1
  158. package/dist/chunks/{time-input-CHA4irr4.es.js → time-input-9W94XJTY.es.js} +4 -4
  159. package/dist/chunks/{time-input-CHA4irr4.es.js.map → time-input-9W94XJTY.es.js.map} +1 -1
  160. package/dist/chunks/{toggle-button-C_WSvD7l.es.js → toggle-button-D1v2OtiG.es.js} +4 -4
  161. package/dist/chunks/{toggle-button-C_WSvD7l.es.js.map → toggle-button-D1v2OtiG.es.js.map} +1 -1
  162. package/dist/chunks/{toggle-button-group-CF1NxUIC.es.js → toggle-button-group-Bla1fe1z.es.js} +2 -2
  163. package/dist/chunks/{toggle-button-group-CF1NxUIC.es.js.map → toggle-button-group-Bla1fe1z.es.js.map} +1 -1
  164. package/dist/chunks/{toolbar-CdR1MLqf.es.js → toolbar-DpBQgamV.es.js} +4 -4
  165. package/dist/chunks/{toolbar-CdR1MLqf.es.js.map → toolbar-DpBQgamV.es.js.map} +1 -1
  166. package/dist/chunks/{tooltip-B6mt46EB.es.js → tooltip-BX45xCJd.es.js} +2 -2
  167. package/dist/chunks/{tooltip-B6mt46EB.es.js.map → tooltip-BX45xCJd.es.js.map} +1 -1
  168. package/dist/chunks/{useDateFormatter-BqUHVksS.es.js → useDateFormatter-DOSckBIG.es.js} +6 -6
  169. package/dist/chunks/{useDateFormatter-BqUHVksS.es.js.map → useDateFormatter-DOSckBIG.es.js.map} +1 -1
  170. package/dist/chunks/{useGridListItem-Cr6HZ3kJ.es.js → useGridListItem-Th8ivSlM.es.js} +2 -2
  171. package/dist/chunks/{useGridListItem-Cr6HZ3kJ.es.js.map → useGridListItem-Th8ivSlM.es.js.map} +1 -1
  172. package/dist/chunks/{utils-DF3YB901.es.js → utils-DDFsiM-7.es.js} +3 -3
  173. package/dist/chunks/{utils-DF3YB901.es.js.map → utils-DDFsiM-7.es.js.map} +1 -1
  174. package/dist/components/accordion.es.js +1 -1
  175. package/dist/components/alert.es.js +1 -1
  176. package/dist/components/avatar/avatar.i18n.d.ts +7 -0
  177. package/dist/components/avatar.cjs +1 -1
  178. package/dist/components/avatar.es.js +1 -1
  179. package/dist/components/button.es.js +1 -1
  180. package/dist/components/calendar/calendar.i18n.d.ts +22 -0
  181. package/dist/components/calendar.cjs +1 -1
  182. package/dist/components/calendar.es.js +1 -1
  183. package/dist/components/checkbox.es.js +1 -1
  184. package/dist/components/collapsible-motion.es.js +1 -1
  185. package/dist/components/combobox/combobox.i18n.d.ts +32 -0
  186. package/dist/components/combobox.cjs +1 -1
  187. package/dist/components/combobox.es.js +1 -1
  188. package/dist/components/components.es.js +1 -1
  189. package/dist/components/data-table/data-table.i18n.d.ts +37 -0
  190. package/dist/components/data-table.cjs +1 -1
  191. package/dist/components/data-table.es.js +1 -1
  192. package/dist/components/date-input.es.js +1 -1
  193. package/dist/components/date-picker/date-picker.i18n.d.ts +1 -2
  194. package/dist/components/date-picker.cjs +1 -1
  195. package/dist/components/date-picker.es.js +1 -1
  196. package/dist/components/date-range-picker/date-range-picker.i18n.d.ts +67 -0
  197. package/dist/components/date-range-picker.cjs +1 -1
  198. package/dist/components/date-range-picker.es.js +1 -1
  199. package/dist/components/dialog.es.js +1 -1
  200. package/dist/components/draggable-list.es.js +1 -1
  201. package/dist/components/drawer.es.js +1 -1
  202. package/dist/components/form-field.es.js +1 -1
  203. package/dist/components/group.es.js +1 -1
  204. package/dist/components/heading.es.js +1 -1
  205. package/dist/components/icon-button.es.js +1 -1
  206. package/dist/components/icon-toggle-button.es.js +1 -1
  207. package/dist/components/kbd.es.js +1 -1
  208. package/dist/components/loading-spinner/loading-spinner.i18n.d.ts +1 -2
  209. package/dist/components/localized-field/localized-field.i18n.d.ts +1 -2
  210. package/dist/components/localized-field.cjs +1 -1
  211. package/dist/components/localized-field.es.js +1 -1
  212. package/dist/components/money-input/money-input.i18n.d.ts +1 -2
  213. package/dist/components/money-input.es.js +1 -1
  214. package/dist/components/multiline-text-input.es.js +1 -1
  215. package/dist/components/nimbus-provider.es.js +1 -1
  216. package/dist/components/number-input/number-input.i18n.d.ts +1 -2
  217. package/dist/components/number-input.es.js +1 -1
  218. package/dist/components/pagination/pagination.i18n.d.ts +42 -0
  219. package/dist/components/pagination.cjs +1 -1
  220. package/dist/components/pagination.es.js +1 -1
  221. package/dist/components/password-input/password-input.i18n.d.ts +1 -2
  222. package/dist/components/password-input.es.js +1 -1
  223. package/dist/components/popover.es.js +1 -1
  224. package/dist/components/progress-bar.es.js +1 -1
  225. package/dist/components/radio-input.es.js +1 -1
  226. package/dist/components/range-calendar/range-calendar.i18n.d.ts +22 -0
  227. package/dist/components/range-calendar.cjs +1 -1
  228. package/dist/components/range-calendar.es.js +1 -1
  229. package/dist/components/rich-text-input/constants/text-styles.d.ts +6 -1
  230. package/dist/components/rich-text-input/hooks/use-toolbar-state.d.ts +4 -2
  231. package/dist/components/rich-text-input/rich-text-input.i18n.d.ts +122 -0
  232. package/dist/components/rich-text-input/utils/index.d.ts +0 -1
  233. package/dist/components/rich-text-input.cjs +1 -1
  234. package/dist/components/rich-text-input.es.js +1 -1
  235. package/dist/components/scoped-search-input/scoped-search-input.i18n.d.ts +1 -12
  236. package/dist/components/scoped-search-input.cjs +1 -1
  237. package/dist/components/scoped-search-input.es.js +1 -1
  238. package/dist/components/search-input/search-input.i18n.d.ts +1 -2
  239. package/dist/components/search-input.es.js +1 -1
  240. package/dist/components/select/select.i18n.d.ts +1 -2
  241. package/dist/components/select.es.js +1 -1
  242. package/dist/components/separator.es.js +1 -1
  243. package/dist/components/split-button/split-button.i18n.d.ts +7 -0
  244. package/dist/components/split-button.cjs +1 -1
  245. package/dist/components/split-button.es.js +1 -1
  246. package/dist/components/switch.es.js +1 -1
  247. package/dist/components/tabs.es.js +1 -1
  248. package/dist/components/tag-group/tag-group.i18n.d.ts +7 -0
  249. package/dist/components/tag-group.cjs +1 -1
  250. package/dist/components/tag-group.es.js +1 -1
  251. package/dist/components/text-input.es.js +1 -1
  252. package/dist/components/text.es.js +1 -1
  253. package/dist/components/time-input.es.js +1 -1
  254. package/dist/components/toggle-button-group.es.js +1 -1
  255. package/dist/components/toggle-button.es.js +1 -1
  256. package/dist/components/toolbar.es.js +1 -1
  257. package/dist/components/tooltip.es.js +1 -1
  258. package/dist/index.cjs +1 -1
  259. package/dist/index.es.js +51 -51
  260. package/package.json +5 -5
  261. package/dist/chunks/avatar-BGM-BDJa.cjs.js +0 -2
  262. package/dist/chunks/avatar-BGM-BDJa.cjs.js.map +0 -1
  263. package/dist/chunks/avatar-CTiSGVoD.es.js +0 -40
  264. package/dist/chunks/avatar-CTiSGVoD.es.js.map +0 -1
  265. package/dist/chunks/calendar-57M9FKqt.cjs.js +0 -2
  266. package/dist/chunks/calendar-57M9FKqt.cjs.js.map +0 -1
  267. package/dist/chunks/calendar-Kwoe0bYZ.es.js +0 -187
  268. package/dist/chunks/calendar-Kwoe0bYZ.es.js.map +0 -1
  269. package/dist/chunks/combobox-0cCAwg3W.es.js.map +0 -1
  270. package/dist/chunks/combobox-CKozWtj7.cjs.js +0 -2
  271. package/dist/chunks/combobox-CKozWtj7.cjs.js.map +0 -1
  272. package/dist/chunks/data-table-BxITOPnx.es.js.map +0 -1
  273. package/dist/chunks/data-table-Depm8_y5.cjs.js +0 -2
  274. package/dist/chunks/data-table-Depm8_y5.cjs.js.map +0 -1
  275. package/dist/chunks/date-picker-Dk3QgvCN.cjs.js.map +0 -1
  276. package/dist/chunks/date-picker-FvaPPqXZ.es.js.map +0 -1
  277. package/dist/chunks/date-range-picker-CMWsBL9j.cjs.js +0 -2
  278. package/dist/chunks/date-range-picker-CMWsBL9j.cjs.js.map +0 -1
  279. package/dist/chunks/date-range-picker-vH5DixcB.es.js +0 -281
  280. package/dist/chunks/date-range-picker-vH5DixcB.es.js.map +0 -1
  281. package/dist/chunks/localized-field-D4HBEdq0.es.js.map +0 -1
  282. package/dist/chunks/localized-field-u03KZc2G.cjs.js.map +0 -1
  283. package/dist/chunks/money-input-DHiEn7XA.es.js.map +0 -1
  284. package/dist/chunks/pagination-CjUoltTe.es.js +0 -160
  285. package/dist/chunks/pagination-CjUoltTe.es.js.map +0 -1
  286. package/dist/chunks/pagination-CnPACrJ5.cjs.js +0 -2
  287. package/dist/chunks/pagination-CnPACrJ5.cjs.js.map +0 -1
  288. package/dist/chunks/password-input-D4vhdbQW.es.js.map +0 -1
  289. package/dist/chunks/range-calendar-BjuErXNK.es.js +0 -187
  290. package/dist/chunks/range-calendar-BjuErXNK.es.js.map +0 -1
  291. package/dist/chunks/range-calendar-Cjqu4SXg.cjs.js +0 -2
  292. package/dist/chunks/range-calendar-Cjqu4SXg.cjs.js.map +0 -1
  293. package/dist/chunks/rich-text-input-B41QcSHY.cjs.js +0 -10
  294. package/dist/chunks/rich-text-input-B41QcSHY.cjs.js.map +0 -1
  295. package/dist/chunks/rich-text-input-BGVyDm30.es.js +0 -1074
  296. package/dist/chunks/rich-text-input-BGVyDm30.es.js.map +0 -1
  297. package/dist/chunks/scoped-search-input-CO9xtMOE.es.js +0 -153
  298. package/dist/chunks/scoped-search-input-CO9xtMOE.es.js.map +0 -1
  299. package/dist/chunks/scoped-search-input-COM1I724.cjs.js +0 -2
  300. package/dist/chunks/scoped-search-input-COM1I724.cjs.js.map +0 -1
  301. package/dist/chunks/split-button-C8BsVNhR.cjs.js +0 -2
  302. package/dist/chunks/split-button-C8BsVNhR.cjs.js.map +0 -1
  303. package/dist/chunks/split-button-YwopMYuE.es.js +0 -100
  304. package/dist/chunks/split-button-YwopMYuE.es.js.map +0 -1
  305. package/dist/chunks/tag-group-Beqgbttp.cjs.js +0 -2
  306. package/dist/chunks/tag-group-Beqgbttp.cjs.js.map +0 -1
  307. package/dist/chunks/tag-group-CDx2BCfu.es.js.map +0 -1
  308. package/dist/components/rich-text-input/utils/text-style-utils.d.ts +0 -33
@@ -1,187 +0,0 @@
1
- import { jsx as e, jsxs as d } from "react/jsx-runtime";
2
- import { $ as R, a as I, b as F, c as G, d as H, e as j, f as S, g as A, h as B } from "./Heading-DPlDZAaf.es.js";
3
- import { createSlotRecipeContext as L } from "@chakra-ui/react";
4
- import { useContext as p } from "react";
5
- import { $ as M, a as i } from "./useDateFormatter-BqUHVksS.es.js";
6
- import { e as w, d as N } from "./utils-DF3YB901.es.js";
7
- import { $ as D } from "./context-DW7UvQ8z.es.js";
8
- import { B as P } from "./box-DuBoAZvq.es.js";
9
- import { KeyboardArrowLeft as u, KeyboardArrowRight as x } from "@commercetools/nimbus-icons";
10
- import { Flex as z } from "@chakra-ui/react/flex";
11
- import { S as g } from "./stack-CoNreM7B.es.js";
12
- import { V as k } from "./visually-hidden-CkxAz94w.es.js";
13
- import { I as h } from "./icon-button-CNauu_zf.es.js";
14
- import { T as C } from "./text-BufUKCee.es.js";
15
- import { r as V } from "./index-jNM4sRnI.es.js";
16
- import { useRecipe as K } from "@chakra-ui/react/styled-system";
17
- import { e as W } from "./extract-style-props-CTU5PJnh.es.js";
18
- import { $ as y } from "./Button-CafJrK0a.es.js";
19
- import { $ as v } from "./Text-DOcU1ycg.es.js";
20
- const { withProvider: _, withContext: n } = /* @__PURE__ */ L({
21
- key: "rangeCalendar"
22
- }), q = /* @__PURE__ */ _("div", "root"), E = /* @__PURE__ */ n("div", "header"), J = /* @__PURE__ */ n("div", "grids"), O = /* @__PURE__ */ n("div", "monthTitle"), Q = /* @__PURE__ */ n("table", "grid"), U = /* @__PURE__ */ n("thead", "gridHeader"), X = /* @__PURE__ */ n("th", "headerCell"), Y = /* @__PURE__ */ n("tbody", "gridBody"), Z = /* @__PURE__ */ n("td", "bodyCell"), ee = () => {
23
- const { locale: s } = D(), a = w(S), t = p(R), r = a?.visibleDuration?.months || 1, o = M(i()), l = r > 1;
24
- return /* @__PURE__ */ e(J, { children: Array.from({ length: r }, (b, c) => {
25
- const $ = t.visibleRange.start.add({
26
- months: c
27
- }), f = new Intl.DateTimeFormat(s, {
28
- month: "long"
29
- }).format($.toDate(i()));
30
- return /* @__PURE__ */ d(
31
- P,
32
- {
33
- width: r == 1 ? "full" : "auto",
34
- children: [
35
- l && /* @__PURE__ */ e(O, { children: f }),
36
- /* @__PURE__ */ e(Q, { asChild: !0, children: /* @__PURE__ */ d(I, { offset: { months: c }, weekdayStyle: "short", children: [
37
- /* @__PURE__ */ e(U, { asChild: !0, children: /* @__PURE__ */ e(F, { children: (m) => /* @__PURE__ */ e(X, { asChild: !0, children: /* @__PURE__ */ e(G, { children: m }) }) }) }),
38
- /* @__PURE__ */ e(Y, { asChild: !0, children: /* @__PURE__ */ e(H, { children: (m) => {
39
- const T = m.compare(o) === 0;
40
- return /* @__PURE__ */ e(Z, { asChild: !0, "data-today": T, children: /* @__PURE__ */ e(j, { date: m }) });
41
- } }) })
42
- ] }) })
43
- ]
44
- },
45
- f
46
- );
47
- }) });
48
- }, te = () => {
49
- const t = (w(S)?.visibleDuration?.months || 1) > 1;
50
- return /* @__PURE__ */ e(E, { children: /* @__PURE__ */ d(z, { children: [
51
- /* @__PURE__ */ d(g, { direction: "row", alignItems: "center", children: [
52
- /* @__PURE__ */ e(k, { children: /* @__PURE__ */ e(A, {}) }),
53
- /* @__PURE__ */ e(
54
- h,
55
- {
56
- slot: t ? "previous" : "previous-month",
57
- size: "xs",
58
- variant: "ghost",
59
- tone: "primary",
60
- children: /* @__PURE__ */ e(u, {})
61
- }
62
- ),
63
- /* @__PURE__ */ e(
64
- C,
65
- {
66
- textStyle: "sm",
67
- fontWeight: "500",
68
- color: "neutral.11",
69
- width: t ? "4000" : "2000",
70
- textAlign: "center",
71
- "aria-hidden": "true",
72
- slot: t ? "monthRange" : "month"
73
- }
74
- ),
75
- /* @__PURE__ */ e(
76
- h,
77
- {
78
- slot: t ? "next" : "next-month",
79
- size: "xs",
80
- variant: "ghost",
81
- tone: "primary",
82
- children: /* @__PURE__ */ e(x, {})
83
- }
84
- )
85
- ] }),
86
- /* @__PURE__ */ e(P, { flexGrow: "1" }),
87
- /* @__PURE__ */ d(g, { direction: "row", alignItems: "center", children: [
88
- /* @__PURE__ */ e(
89
- h,
90
- {
91
- slot: "previous-year",
92
- size: "xs",
93
- variant: "ghost",
94
- tone: "primary",
95
- children: /* @__PURE__ */ e(u, {})
96
- }
97
- ),
98
- /* @__PURE__ */ e(
99
- C,
100
- {
101
- textStyle: "sm",
102
- fontWeight: "500",
103
- color: "neutral.11",
104
- width: "1400",
105
- textAlign: "center",
106
- "aria-hidden": "true",
107
- slot: "year"
108
- }
109
- ),
110
- /* @__PURE__ */ e(h, { slot: "next-year", size: "xs", variant: "ghost", tone: "primary", children: /* @__PURE__ */ e(x, {}) })
111
- ] })
112
- ] }) });
113
- }, oe = ({
114
- children: s
115
- }) => {
116
- const { locale: a } = D(), t = p(y), r = p(v), o = p(R), l = {
117
- "next-month": {
118
- onPress: () => o.focusNextSection(),
119
- "aria-label": "Next month"
120
- },
121
- "previous-month": {
122
- onPress: () => o.focusPreviousSection(),
123
- "aria-label": "Previous month"
124
- },
125
- "next-year": {
126
- onPress: () => o.focusNextSection(!0),
127
- "aria-label": "Next year"
128
- },
129
- "previous-year": {
130
- onPress: () => o.focusPreviousSection(!0),
131
- "aria-label": "Previous year"
132
- }
133
- }, b = new Intl.DateTimeFormat(a, {
134
- month: "long"
135
- }).format(o.focusedDate.toDate(i())), c = [
136
- new Intl.DateTimeFormat(a, {
137
- month: "long"
138
- }).format(o.visibleRange.start.toDate(i())),
139
- new Intl.DateTimeFormat(a, {
140
- month: "long"
141
- }).format(o.visibleRange.end.toDate(i()))
142
- ].join(" - "), $ = new Intl.DateTimeFormat(a, {
143
- year: "numeric"
144
- }).format(o.focusedDate.toDate(i())), f = {
145
- month: { children: b },
146
- monthRange: { children: c },
147
- year: { children: $ }
148
- };
149
- return /* @__PURE__ */ e(
150
- N,
151
- {
152
- values: [
153
- [
154
- y,
155
- {
156
- ...t,
157
- slots: {
158
- ...t && typeof t == "object" && "slots" in t ? t.slots : {},
159
- ...l
160
- }
161
- }
162
- ],
163
- [
164
- v,
165
- {
166
- ...r,
167
- slots: {
168
- ...r && typeof r == "object" && "slots" in r ? r.slots : {},
169
- ...f
170
- }
171
- }
172
- ]
173
- ],
174
- children: s
175
- }
176
- );
177
- }, ve = (s) => {
178
- const a = K({ recipe: V }), [t, r] = a.splitVariantProps(s), [o, l] = W(r);
179
- return /* @__PURE__ */ e(q, { ...t, ...o, asChild: !0, children: /* @__PURE__ */ e(B, { ...l, children: /* @__PURE__ */ d(oe, { children: [
180
- /* @__PURE__ */ e(te, {}),
181
- /* @__PURE__ */ e(ee, {})
182
- ] }) }) });
183
- };
184
- export {
185
- ve as R
186
- };
187
- //# sourceMappingURL=range-calendar-BjuErXNK.es.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"range-calendar-BjuErXNK.es.js","sources":["../../src/components/range-calendar/range-calendar.slots.tsx","../../src/components/range-calendar/components/range-calendar.grids.tsx","../../src/components/range-calendar/components/range-calendar.header.tsx","../../src/components/range-calendar/components/range-calendar.custom-context.tsx","../../src/components/range-calendar/range-calendar.tsx"],"sourcesContent":["import { createSlotRecipeContext } from \"@chakra-ui/react\";\nimport type { SlotComponent } from \"@/type-utils\";\nimport type {\n RangeCalendarRootSlotProps,\n RangeCalendarHeaderSlotProps,\n RangeCalendarGridsSlotProps,\n RangeCalendarMonthTitleSlotProps,\n RangeCalendarGridSlotProps,\n RangeCalendarGridHeaderSlotProps,\n RangeCalendarHeaderCellSlotProps,\n RangeCalendarGridBodySlotProps,\n RangeCalendarCellSlotProps,\n} from \"./range-calendar.types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"rangeCalendar\",\n});\n\nexport const RangeCalendarRootSlot: SlotComponent<\n HTMLDivElement,\n RangeCalendarRootSlotProps\n> = withProvider<HTMLDivElement, RangeCalendarRootSlotProps>(\"div\", \"root\");\n\nexport const RangeCalendarHeaderSlot = withContext<\n HTMLDivElement,\n RangeCalendarHeaderSlotProps\n>(\"div\", \"header\");\n\nexport const RangeCalendarGridsSlot = withContext<\n HTMLDivElement,\n RangeCalendarGridsSlotProps\n>(\"div\", \"grids\");\n\nexport const RangeCalendarMonthTitleSlot = withContext<\n HTMLDivElement,\n RangeCalendarMonthTitleSlotProps\n>(\"div\", \"monthTitle\");\n\nexport const RangeCalendarGridSlot = withContext<\n HTMLTableElement,\n RangeCalendarGridSlotProps\n>(\"table\", \"grid\");\n\nexport const RangeCalendarGridHeaderSlot = withContext<\n HTMLTableSectionElement,\n RangeCalendarGridHeaderSlotProps\n>(\"thead\", \"gridHeader\");\n\nexport const RangeCalendarHeaderCellSlot = withContext<\n HTMLTableCellElement,\n RangeCalendarHeaderCellSlotProps\n>(\"th\", \"headerCell\");\n\nexport const RangeCalendarGridBodySlot = withContext<\n HTMLTableSectionElement,\n RangeCalendarGridBodySlotProps\n>(\"tbody\", \"gridBody\");\n\nexport const RangeCalendarCellSlot = withContext<\n HTMLTableCellElement,\n RangeCalendarCellSlotProps\n>(\"td\", \"bodyCell\");\n","import { useContext } from \"react\";\nimport { today, getLocalTimeZone } from \"@internationalized/date\";\nimport {\n CalendarGrid as RaCalendarGrid,\n CalendarGridBody as RaCalendarGridBody,\n CalendarGridHeader as RaCalendarGridHeader,\n CalendarHeaderCell as RaCalendarHeaderCell,\n CalendarCell as RaCalendarCell,\n useSlottedContext,\n RangeCalendarContext,\n RangeCalendarStateContext,\n useLocale,\n} from \"react-aria-components\";\nimport { Box } from \"@/components\";\n\nimport {\n RangeCalendarCellSlot,\n RangeCalendarGridBodySlot,\n RangeCalendarGridHeaderSlot,\n RangeCalendarGridsSlot,\n RangeCalendarGridSlot,\n RangeCalendarHeaderCellSlot,\n RangeCalendarMonthTitleSlot,\n} from \"../range-calendar.slots\";\n\nexport const RangeCalendarGrids = () => {\n const { locale } = useLocale();\n const context = useSlottedContext(RangeCalendarContext);\n\n const calendarState = useContext(RangeCalendarStateContext)!;\n const visibleMonthsCount = context?.visibleDuration?.months || 1;\n const todayDate = today(getLocalTimeZone());\n const showMonthTitles = visibleMonthsCount > 1;\n\n return (\n <RangeCalendarGridsSlot>\n {Array.from({ length: visibleMonthsCount }, (_, index) => {\n const gridDate = calendarState.visibleRange.start.add({\n months: index,\n });\n const monthName = new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(gridDate.toDate(getLocalTimeZone()));\n\n return (\n <Box\n key={monthName}\n width={visibleMonthsCount == 1 ? \"full\" : \"auto\"}\n >\n {showMonthTitles && (\n <RangeCalendarMonthTitleSlot>\n {monthName}\n </RangeCalendarMonthTitleSlot>\n )}\n <RangeCalendarGridSlot asChild>\n <RaCalendarGrid offset={{ months: index }} weekdayStyle=\"short\">\n <RangeCalendarGridHeaderSlot asChild>\n <RaCalendarGridHeader>\n {(day) => (\n <RangeCalendarHeaderCellSlot asChild>\n <RaCalendarHeaderCell>{day}</RaCalendarHeaderCell>\n </RangeCalendarHeaderCellSlot>\n )}\n </RaCalendarGridHeader>\n </RangeCalendarGridHeaderSlot>\n <RangeCalendarGridBodySlot asChild>\n <RaCalendarGridBody>\n {(date) => {\n const isToday = date.compare(todayDate) === 0;\n return (\n <RangeCalendarCellSlot asChild data-today={isToday}>\n <RaCalendarCell date={date} />\n </RangeCalendarCellSlot>\n );\n }}\n </RaCalendarGridBody>\n </RangeCalendarGridBodySlot>\n </RaCalendarGrid>\n </RangeCalendarGridSlot>\n </Box>\n );\n })}\n </RangeCalendarGridsSlot>\n );\n};\n","import {\n RangeCalendarContext,\n Heading,\n useSlottedContext,\n} from \"react-aria-components\";\nimport {\n Box,\n Flex,\n IconButton,\n Stack,\n Text,\n VisuallyHidden,\n} from \"@/components\";\nimport {\n KeyboardArrowLeft,\n KeyboardArrowRight,\n} from \"@commercetools/nimbus-icons\";\nimport { RangeCalendarHeaderSlot } from \"../range-calendar.slots\";\n\nexport const RangeCalendarHeader = () => {\n const rangeCalendarProps = useSlottedContext(RangeCalendarContext);\n\n // Needed to decide whether to show a single month or a range\n const visibleDurationMonths =\n rangeCalendarProps?.visibleDuration?.months || 1;\n const showRangeLabel = visibleDurationMonths > 1;\n\n return (\n <RangeCalendarHeaderSlot>\n <Flex>\n <Stack direction=\"row\" alignItems=\"center\">\n {/** solely for screen readers, if not present, a11y issues are raised */}\n <VisuallyHidden>\n <Heading />\n </VisuallyHidden>\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot={showRangeLabel ? \"previous\" : \"previous-month\"}\n size=\"xs\"\n variant=\"ghost\"\n tone=\"primary\"\n >\n <KeyboardArrowLeft />\n </IconButton>\n <Text\n textStyle=\"sm\"\n fontWeight=\"500\"\n color=\"neutral.11\"\n width={showRangeLabel ? \"4000\" : \"2000\"}\n textAlign=\"center\"\n aria-hidden=\"true\"\n slot={showRangeLabel ? \"monthRange\" : \"month\"}\n />\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot={showRangeLabel ? \"next\" : \"next-month\"}\n size=\"xs\"\n variant=\"ghost\"\n tone=\"primary\"\n >\n <KeyboardArrowRight />\n </IconButton>\n </Stack>\n <Box flexGrow=\"1\" />\n <Stack direction=\"row\" alignItems=\"center\">\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot=\"previous-year\"\n size=\"xs\"\n variant=\"ghost\"\n tone=\"primary\"\n >\n <KeyboardArrowLeft />\n </IconButton>\n <Text\n textStyle=\"sm\"\n fontWeight=\"500\"\n color=\"neutral.11\"\n width=\"1400\"\n textAlign=\"center\"\n aria-hidden=\"true\"\n slot=\"year\"\n />\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton slot=\"next-year\" size=\"xs\" variant=\"ghost\" tone=\"primary\">\n <KeyboardArrowRight />\n </IconButton>\n </Stack>\n </Flex>\n </RangeCalendarHeaderSlot>\n );\n};\n","import { getLocalTimeZone } from \"@internationalized/date\";\nimport { useContext } from \"react\";\nimport {\n Provider,\n ButtonContext,\n RangeCalendarStateContext,\n TextContext,\n useLocale,\n} from \"react-aria-components\";\n\nexport const RangeCalendarCustomContext = ({\n children,\n}: {\n children: React.ReactNode;\n}) => {\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\": \"Next month\",\n },\n \"previous-month\": {\n onPress: () => calendarState.focusPreviousSection(),\n \"aria-label\": \"Previous month\",\n },\n \"next-year\": {\n onPress: () => calendarState.focusNextSection(true),\n \"aria-label\": \"Next year\",\n },\n \"previous-year\": {\n onPress: () => calendarState.focusPreviousSection(true),\n \"aria-label\": \"Previous year\",\n },\n };\n\n /**\n * Text slots\n * ================================\n */\n const monthLabel = new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.focusedDate.toDate(getLocalTimeZone()));\n\n const monthRangeLabel = [\n new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.visibleRange.start.toDate(getLocalTimeZone())),\n new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.visibleRange.end.toDate(getLocalTimeZone())),\n ].join(\" - \");\n\n const yearLabel = new Intl.DateTimeFormat(locale, {\n year: \"numeric\",\n }).format(calendarState.focusedDate.toDate(getLocalTimeZone()));\n\n const textSlots = {\n month: { children: monthLabel },\n monthRange: { children: monthRangeLabel },\n year: { children: yearLabel },\n };\n\n return (\n <Provider\n values={[\n [\n ButtonContext,\n {\n ...buttonContext,\n slots: {\n ...(buttonContext &&\n typeof buttonContext === \"object\" &&\n \"slots\" in buttonContext\n ? buttonContext.slots\n : {}),\n ...buttonSlots,\n },\n },\n ],\n [\n TextContext,\n {\n ...textContext,\n slots: {\n ...(textContext &&\n typeof textContext === \"object\" &&\n \"slots\" in textContext\n ? textContext.slots\n : {}),\n ...textSlots,\n },\n },\n ],\n ]}\n >\n {children}\n </Provider>\n );\n};\n","import type { RangeCalendarProps } from \"./range-calendar.types\";\nimport type { DateValue } from \"@internationalized/date\";\n\nimport { RangeCalendar as RaRangeCalendar } from \"react-aria-components\";\n\nimport { RangeCalendarRootSlot } from \"./range-calendar.slots\";\nimport { RangeCalendarGrids } from \"./components/range-calendar.grids\";\nimport { RangeCalendarHeader } from \"./components/range-calendar.header\";\nimport { rangeCalendarSlotRecipe } from \"./range-calendar.recipe\";\nimport { useRecipe } from \"@chakra-ui/react/styled-system\";\nimport { extractStyleProps } from \"@/utils\";\nimport { RangeCalendarCustomContext } from \"./components/range-calendar.custom-context\";\n\nexport const RangeCalendar = (props: RangeCalendarProps<DateValue>) => {\n const recipe = useRecipe({ recipe: rangeCalendarSlotRecipe });\n const [recipeProps, remainingProps] = recipe.splitVariantProps(props);\n const [styleProps, otherProps] = extractStyleProps(remainingProps);\n\n return (\n <RangeCalendarRootSlot {...recipeProps} {...styleProps} asChild>\n <RaRangeCalendar {...otherProps}>\n <RangeCalendarCustomContext>\n <RangeCalendarHeader />\n <RangeCalendarGrids />\n </RangeCalendarCustomContext>\n </RaRangeCalendar>\n </RangeCalendarRootSlot>\n );\n};\n"],"names":["withProvider","withContext","createSlotRecipeContext","RangeCalendarRootSlot","RangeCalendarHeaderSlot","RangeCalendarGridsSlot","RangeCalendarMonthTitleSlot","RangeCalendarGridSlot","RangeCalendarGridHeaderSlot","RangeCalendarHeaderCellSlot","RangeCalendarGridBodySlot","RangeCalendarCellSlot","RangeCalendarGrids","locale","useLocale","context","useSlottedContext","RangeCalendarContext","calendarState","useContext","RangeCalendarStateContext","visibleMonthsCount","todayDate","today","getLocalTimeZone","showMonthTitles","jsx","_","index","gridDate","monthName","jsxs","Box","RaCalendarGrid","RaCalendarGridHeader","day","RaCalendarHeaderCell","RaCalendarGridBody","date","isToday","RaCalendarCell","RangeCalendarHeader","showRangeLabel","Flex","Stack","VisuallyHidden","Heading","IconButton","KeyboardArrowLeft","Text","KeyboardArrowRight","RangeCalendarCustomContext","children","buttonContext","ButtonContext","textContext","TextContext","buttonSlots","monthLabel","monthRangeLabel","yearLabel","textSlots","Provider","RangeCalendar","props","recipe","useRecipe","rangeCalendarSlotRecipe","recipeProps","remainingProps","styleProps","otherProps","extractStyleProps","RaRangeCalendar"],"mappings":";;;;;;;;;;;;;;;;;;;AAcA,MAAM,EAAE,cAAAA,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,KAAK;AACP,CAAC,GAEYC,IAGT,gBAAAH,EAAyD,OAAO,MAAM,GAE7DI,IAA0B,gBAAAH,EAGrC,OAAO,QAAQ,GAEJI,IAAyB,gBAAAJ,EAGpC,OAAO,OAAO,GAEHK,IAA8B,gBAAAL,EAGzC,OAAO,YAAY,GAERM,IAAwB,gBAAAN,EAGnC,SAAS,MAAM,GAEJO,IAA8B,gBAAAP,EAGzC,SAAS,YAAY,GAEVQ,IA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A;AAAA,UACL;AAAA,QACF;AAAA,MACF;AAAA,MAGD,UAAAT;AAAA,IAAA;AAAA,EAAA;AAGP,GC7FaW,KAAgB,CAACC,MAAyC;AACrE,QAAMC,IAASC,EAAU,EAAE,QAAQC,GAAyB,GACtD,CAACC,GAAaC,CAAc,IAAIJ,EAAO,kBAAkBD,CAAK,GAC9D,CAACM,GAAYC,CAAU,IAAIC,EAAkBH,CAAc;AAEjE,SACE,gBAAA3C,EAACvB,GAAA,EAAuB,GAAGiE,GAAc,GAAGE,GAAY,SAAO,IAC7D,UAAA,gBAAA5C,EAAC+C,GAAA,EAAiB,GAAGF,GACnB,4BAACpB,IAAA,EACC,UAAA;AAAA,IAAA,gBAAAzB,EAACe,IAAA,EAAoB;AAAA,sBACpB7B,IAAA,CAAA,CAAmB;AAAA,EAAA,EAAA,CACtB,GACF,GACF;AAEJ;"}
@@ -1,2 +0,0 @@
1
- "use strict";const e=require("react/jsx-runtime"),a=require("./Heading-kcnZ-PKv.cjs.js"),w=require("@chakra-ui/react"),u=require("react"),c=require("./useDateFormatter-WCaFojul.cjs.js"),m=require("./utils-DVb3jcp5.cjs.js"),R=require("./context-CyT9C4U4.cjs.js"),v=require("./box-CWni3A32.cjs.js"),h=require("@commercetools/nimbus-icons"),q=require("@chakra-ui/react/flex"),g=require("./stack-CIN13EDn.cjs.js"),D=require("./visually-hidden-BjtXUoFK.cjs.js"),$=require("./icon-button-B28VUff9.cjs.js"),j=require("./text-BtRhIklG.cjs.js"),P=require("./index-CxLKWOES.cjs.js"),I=require("@chakra-ui/react/styled-system"),T=require("./extract-style-props-IfUYxPJV.cjs.js"),y=require("./Button-DLCecw8f.cjs.js"),C=require("./Text-BWSfeB9p.cjs.js"),{withProvider:B,withContext:s}=w.createSlotRecipeContext({key:"rangeCalendar"}),H=B("div","root"),A=s("div","header"),F=s("div","grids"),G=s("div","monthTitle"),L=s("table","grid"),k=s("thead","gridHeader"),M=s("th","headerCell"),N=s("tbody","gridBody"),z=s("td","bodyCell"),K=()=>{const{locale:d}=R.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),n=m.$64fa3d84918910a7$export$fabf2dc03a41866e(a.$dfd62f934fc76fed$export$233dd9682e1ad64b),t=u.useContext(a.$dfd62f934fc76fed$export$5e0fc348c00f87a0),r=n?.visibleDuration?.months||1,o=c.$14e0f24ef4ac5c92$export$d0bdf45af03a6ea3(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2()),i=r>1;return e.jsx(F,{children:Array.from({length:r},(p,l)=>{const b=t.visibleRange.start.add({months:l}),f=new Intl.DateTimeFormat(d,{month:"long"}).format(b.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2()));return e.jsxs(v.Box,{width:r==1?"full":"auto",children:[i&&e.jsx(G,{children:f}),e.jsx(L,{asChild:!0,children:e.jsxs(a.$dfd62f934fc76fed$export$5bd780d491cfc46c,{offset:{months:l},weekdayStyle:"short",children:[e.jsx(k,{asChild:!0,children:e.jsx(a.$dfd62f934fc76fed$export$22e2d15eaa4d2377,{children:x=>e.jsx(M,{asChild:!0,children:e.jsx(a.$dfd62f934fc76fed$export$ad2135cac3a11b3d,{children:x})})})}),e.jsx(N,{asChild:!0,children:e.jsx(a.$dfd62f934fc76fed$export$e11f8ba65d857bff,{children:x=>{const S=x.compare(o)===0;return e.jsx(z,{asChild:!0,"data-today":S,children:e.jsx(a.$dfd62f934fc76fed$export$5d847498420df57b,{date:x})})}})})]})})]},f)})})},V=()=>{const t=(m.$64fa3d84918910a7$export$fabf2dc03a41866e(a.$dfd62f934fc76fed$export$233dd9682e1ad64b)?.visibleDuration?.months||1)>1;return e.jsx(A,{children:e.jsxs(q.Flex,{children:[e.jsxs(g.Stack,{direction:"row",alignItems:"center",children:[e.jsx(D.VisuallyHidden,{children:e.jsx(a.$5cb03073d3f54797$export$a8a3e93435678ff9,{})}),e.jsx($.IconButton,{slot:t?"previous":"previous-month",size:"xs",variant:"ghost",tone:"primary",children:e.jsx(h.KeyboardArrowLeft,{})}),e.jsx(j.Text,{textStyle:"sm",fontWeight:"500",color:"neutral.11",width:t?"4000":"2000",textAlign:"center","aria-hidden":"true",slot:t?"monthRange":"month"}),e.jsx($.IconButton,{slot:t?"next":"next-month",size:"xs",variant:"ghost",tone:"primary",children:e.jsx(h.KeyboardArrowRight,{})})]}),e.jsx(v.Box,{flexGrow:"1"}),e.jsxs(g.Stack,{direction:"row",alignItems:"center",children:[e.jsx($.IconButton,{slot:"previous-year",size:"xs",variant:"ghost",tone:"primary",children:e.jsx(h.KeyboardArrowLeft,{})}),e.jsx(j.Text,{textStyle:"sm",fontWeight:"500",color:"neutral.11",width:"1400",textAlign:"center","aria-hidden":"true",slot:"year"}),e.jsx($.IconButton,{slot:"next-year",size:"xs",variant:"ghost",tone:"primary",children:e.jsx(h.KeyboardArrowRight,{})})]})]})})},W=({children:d})=>{const{locale:n}=R.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),t=u.useContext(y.$d2b4bc8c273e7be6$export$24d547caef80ccd1),r=u.useContext(C.$514c0188e459b4c0$export$9afb8bc826b033ea),o=u.useContext(a.$dfd62f934fc76fed$export$5e0fc348c00f87a0),i={"next-month":{onPress:()=>o.focusNextSection(),"aria-label":"Next month"},"previous-month":{onPress:()=>o.focusPreviousSection(),"aria-label":"Previous month"},"next-year":{onPress:()=>o.focusNextSection(!0),"aria-label":"Next year"},"previous-year":{onPress:()=>o.focusPreviousSection(!0),"aria-label":"Previous year"}},p=new Intl.DateTimeFormat(n,{month:"long"}).format(o.focusedDate.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2())),l=[new Intl.DateTimeFormat(n,{month:"long"}).format(o.visibleRange.start.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2())),new Intl.DateTimeFormat(n,{month:"long"}).format(o.visibleRange.end.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2()))].join(" - "),b=new Intl.DateTimeFormat(n,{year:"numeric"}).format(o.focusedDate.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2())),f={month:{children:p},monthRange:{children:l},year:{children:b}};return e.jsx(m.$64fa3d84918910a7$export$2881499e37b75b9a,{values:[[y.$d2b4bc8c273e7be6$export$24d547caef80ccd1,{...t,slots:{...t&&typeof t=="object"&&"slots"in t?t.slots:{},...i}}],[C.$514c0188e459b4c0$export$9afb8bc826b033ea,{...r,slots:{...r&&typeof r=="object"&&"slots"in r?r.slots:{},...f}}]],children:d})},_=d=>{const n=I.useRecipe({recipe:P.rangeCalendarSlotRecipe}),[t,r]=n.splitVariantProps(d),[o,i]=T.extractStyleProps(r);return e.jsx(H,{...t,...o,asChild:!0,children:e.jsx(a.$dfd62f934fc76fed$export$a4f5c8b89d277a8d,{...i,children:e.jsxs(W,{children:[e.jsx(V,{}),e.jsx(K,{})]})})})};exports.RangeCalendar=_;
2
- //# sourceMappingURL=range-calendar-Cjqu4SXg.cjs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"range-calendar-Cjqu4SXg.cjs.js","sources":["../../src/components/range-calendar/range-calendar.slots.tsx","../../src/components/range-calendar/components/range-calendar.grids.tsx","../../src/components/range-calendar/components/range-calendar.header.tsx","../../src/components/range-calendar/components/range-calendar.custom-context.tsx","../../src/components/range-calendar/range-calendar.tsx"],"sourcesContent":["import { createSlotRecipeContext } from \"@chakra-ui/react\";\nimport type { SlotComponent } from \"@/type-utils\";\nimport type {\n RangeCalendarRootSlotProps,\n RangeCalendarHeaderSlotProps,\n RangeCalendarGridsSlotProps,\n RangeCalendarMonthTitleSlotProps,\n RangeCalendarGridSlotProps,\n RangeCalendarGridHeaderSlotProps,\n RangeCalendarHeaderCellSlotProps,\n RangeCalendarGridBodySlotProps,\n RangeCalendarCellSlotProps,\n} from \"./range-calendar.types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"rangeCalendar\",\n});\n\nexport const RangeCalendarRootSlot: SlotComponent<\n HTMLDivElement,\n RangeCalendarRootSlotProps\n> = withProvider<HTMLDivElement, RangeCalendarRootSlotProps>(\"div\", \"root\");\n\nexport const RangeCalendarHeaderSlot = withContext<\n HTMLDivElement,\n RangeCalendarHeaderSlotProps\n>(\"div\", \"header\");\n\nexport const RangeCalendarGridsSlot = withContext<\n HTMLDivElement,\n RangeCalendarGridsSlotProps\n>(\"div\", \"grids\");\n\nexport const RangeCalendarMonthTitleSlot = withContext<\n HTMLDivElement,\n RangeCalendarMonthTitleSlotProps\n>(\"div\", \"monthTitle\");\n\nexport const RangeCalendarGridSlot = withContext<\n HTMLTableElement,\n RangeCalendarGridSlotProps\n>(\"table\", \"grid\");\n\nexport const RangeCalendarGridHeaderSlot = withContext<\n HTMLTableSectionElement,\n RangeCalendarGridHeaderSlotProps\n>(\"thead\", \"gridHeader\");\n\nexport const RangeCalendarHeaderCellSlot = withContext<\n HTMLTableCellElement,\n RangeCalendarHeaderCellSlotProps\n>(\"th\", \"headerCell\");\n\nexport const RangeCalendarGridBodySlot = withContext<\n HTMLTableSectionElement,\n RangeCalendarGridBodySlotProps\n>(\"tbody\", \"gridBody\");\n\nexport const RangeCalendarCellSlot = withContext<\n HTMLTableCellElement,\n RangeCalendarCellSlotProps\n>(\"td\", \"bodyCell\");\n","import { useContext } from \"react\";\nimport { today, getLocalTimeZone } from \"@internationalized/date\";\nimport {\n CalendarGrid as RaCalendarGrid,\n CalendarGridBody as RaCalendarGridBody,\n CalendarGridHeader as RaCalendarGridHeader,\n CalendarHeaderCell as RaCalendarHeaderCell,\n CalendarCell as RaCalendarCell,\n useSlottedContext,\n RangeCalendarContext,\n RangeCalendarStateContext,\n useLocale,\n} from \"react-aria-components\";\nimport { Box } from \"@/components\";\n\nimport {\n RangeCalendarCellSlot,\n RangeCalendarGridBodySlot,\n RangeCalendarGridHeaderSlot,\n RangeCalendarGridsSlot,\n RangeCalendarGridSlot,\n RangeCalendarHeaderCellSlot,\n RangeCalendarMonthTitleSlot,\n} from \"../range-calendar.slots\";\n\nexport const RangeCalendarGrids = () => {\n const { locale } = useLocale();\n const context = useSlottedContext(RangeCalendarContext);\n\n const calendarState = useContext(RangeCalendarStateContext)!;\n const visibleMonthsCount = context?.visibleDuration?.months || 1;\n const todayDate = today(getLocalTimeZone());\n const showMonthTitles = visibleMonthsCount > 1;\n\n return (\n <RangeCalendarGridsSlot>\n {Array.from({ length: visibleMonthsCount }, (_, index) => {\n const gridDate = calendarState.visibleRange.start.add({\n months: index,\n });\n const monthName = new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(gridDate.toDate(getLocalTimeZone()));\n\n return (\n <Box\n key={monthName}\n width={visibleMonthsCount == 1 ? \"full\" : \"auto\"}\n >\n {showMonthTitles && (\n <RangeCalendarMonthTitleSlot>\n {monthName}\n </RangeCalendarMonthTitleSlot>\n )}\n <RangeCalendarGridSlot asChild>\n <RaCalendarGrid offset={{ months: index }} weekdayStyle=\"short\">\n <RangeCalendarGridHeaderSlot asChild>\n <RaCalendarGridHeader>\n {(day) => (\n <RangeCalendarHeaderCellSlot asChild>\n <RaCalendarHeaderCell>{day}</RaCalendarHeaderCell>\n </RangeCalendarHeaderCellSlot>\n )}\n </RaCalendarGridHeader>\n </RangeCalendarGridHeaderSlot>\n <RangeCalendarGridBodySlot asChild>\n <RaCalendarGridBody>\n {(date) => {\n const isToday = date.compare(todayDate) === 0;\n return (\n <RangeCalendarCellSlot asChild data-today={isToday}>\n <RaCalendarCell date={date} />\n </RangeCalendarCellSlot>\n );\n }}\n </RaCalendarGridBody>\n </RangeCalendarGridBodySlot>\n </RaCalendarGrid>\n </RangeCalendarGridSlot>\n </Box>\n );\n })}\n </RangeCalendarGridsSlot>\n );\n};\n","import {\n RangeCalendarContext,\n Heading,\n useSlottedContext,\n} from \"react-aria-components\";\nimport {\n Box,\n Flex,\n IconButton,\n Stack,\n Text,\n VisuallyHidden,\n} from \"@/components\";\nimport {\n KeyboardArrowLeft,\n KeyboardArrowRight,\n} from \"@commercetools/nimbus-icons\";\nimport { RangeCalendarHeaderSlot } from \"../range-calendar.slots\";\n\nexport const RangeCalendarHeader = () => {\n const rangeCalendarProps = useSlottedContext(RangeCalendarContext);\n\n // Needed to decide whether to show a single month or a range\n const visibleDurationMonths =\n rangeCalendarProps?.visibleDuration?.months || 1;\n const showRangeLabel = visibleDurationMonths > 1;\n\n return (\n <RangeCalendarHeaderSlot>\n <Flex>\n <Stack direction=\"row\" alignItems=\"center\">\n {/** solely for screen readers, if not present, a11y issues are raised */}\n <VisuallyHidden>\n <Heading />\n </VisuallyHidden>\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot={showRangeLabel ? \"previous\" : \"previous-month\"}\n size=\"xs\"\n variant=\"ghost\"\n tone=\"primary\"\n >\n <KeyboardArrowLeft />\n </IconButton>\n <Text\n textStyle=\"sm\"\n fontWeight=\"500\"\n color=\"neutral.11\"\n width={showRangeLabel ? \"4000\" : \"2000\"}\n textAlign=\"center\"\n aria-hidden=\"true\"\n slot={showRangeLabel ? \"monthRange\" : \"month\"}\n />\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot={showRangeLabel ? \"next\" : \"next-month\"}\n size=\"xs\"\n variant=\"ghost\"\n tone=\"primary\"\n >\n <KeyboardArrowRight />\n </IconButton>\n </Stack>\n <Box flexGrow=\"1\" />\n <Stack direction=\"row\" alignItems=\"center\">\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot=\"previous-year\"\n size=\"xs\"\n variant=\"ghost\"\n tone=\"primary\"\n >\n <KeyboardArrowLeft />\n </IconButton>\n <Text\n textStyle=\"sm\"\n fontWeight=\"500\"\n color=\"neutral.11\"\n width=\"1400\"\n textAlign=\"center\"\n aria-hidden=\"true\"\n slot=\"year\"\n />\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton slot=\"next-year\" size=\"xs\" variant=\"ghost\" tone=\"primary\">\n <KeyboardArrowRight />\n </IconButton>\n </Stack>\n </Flex>\n </RangeCalendarHeaderSlot>\n );\n};\n","import { getLocalTimeZone } from \"@internationalized/date\";\nimport { useContext } from \"react\";\nimport {\n Provider,\n ButtonContext,\n RangeCalendarStateContext,\n TextContext,\n useLocale,\n} from \"react-aria-components\";\n\nexport const RangeCalendarCustomContext = ({\n children,\n}: {\n children: React.ReactNode;\n}) => {\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\": \"Next month\",\n },\n \"previous-month\": {\n onPress: () => calendarState.focusPreviousSection(),\n \"aria-label\": \"Previous month\",\n },\n \"next-year\": {\n onPress: () => calendarState.focusNextSection(true),\n \"aria-label\": \"Next year\",\n },\n \"previous-year\": {\n onPress: () => calendarState.focusPreviousSection(true),\n \"aria-label\": \"Previous year\",\n },\n };\n\n /**\n * Text slots\n * ================================\n */\n const monthLabel = new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.focusedDate.toDate(getLocalTimeZone()));\n\n const monthRangeLabel = [\n new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.visibleRange.start.toDate(getLocalTimeZone())),\n new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.visibleRange.end.toDate(getLocalTimeZone())),\n ].join(\" - \");\n\n const yearLabel = new Intl.DateTimeFormat(locale, {\n year: \"numeric\",\n }).format(calendarState.focusedDate.toDate(getLocalTimeZone()));\n\n const textSlots = {\n month: { children: monthLabel },\n monthRange: { children: monthRangeLabel },\n year: { children: yearLabel },\n };\n\n return (\n <Provider\n values={[\n [\n ButtonContext,\n {\n ...buttonContext,\n slots: {\n ...(buttonContext &&\n typeof buttonContext === \"object\" &&\n \"slots\" in buttonContext\n ? buttonContext.slots\n : {}),\n ...buttonSlots,\n },\n },\n ],\n [\n TextContext,\n {\n ...textContext,\n slots: {\n ...(textContext &&\n typeof textContext === \"object\" &&\n \"slots\" in textContext\n ? textContext.slots\n : {}),\n ...textSlots,\n },\n },\n ],\n ]}\n >\n {children}\n </Provider>\n );\n};\n","import type { RangeCalendarProps } from \"./range-calendar.types\";\nimport type { DateValue } from \"@internationalized/date\";\n\nimport { RangeCalendar as RaRangeCalendar } from \"react-aria-components\";\n\nimport { RangeCalendarRootSlot } from \"./range-calendar.slots\";\nimport { RangeCalendarGrids } from \"./components/range-calendar.grids\";\nimport { RangeCalendarHeader } from \"./components/range-calendar.header\";\nimport { rangeCalendarSlotRecipe } from \"./range-calendar.recipe\";\nimport { useRecipe } from \"@chakra-ui/react/styled-system\";\nimport { extractStyleProps } from \"@/utils\";\nimport { RangeCalendarCustomContext } from \"./components/range-calendar.custom-context\";\n\nexport const RangeCalendar = (props: RangeCalendarProps<DateValue>) => {\n const recipe = useRecipe({ recipe: rangeCalendarSlotRecipe });\n const [recipeProps, remainingProps] = recipe.splitVariantProps(props);\n const [styleProps, otherProps] = extractStyleProps(remainingProps);\n\n return (\n <RangeCalendarRootSlot {...recipeProps} {...styleProps} asChild>\n <RaRangeCalendar {...otherProps}>\n <RangeCalendarCustomContext>\n <RangeCalendarHeader />\n <RangeCalendarGrids />\n </RangeCalendarCustomContext>\n </RaRangeCalendar>\n </RangeCalendarRootSlot>\n );\n};\n"],"names":["withProvider","withContext","createSlotRecipeContext","RangeCalendarRootSlot","RangeCalendarHeaderSlot","RangeCalendarGridsSlot","RangeCalendarMonthTitleSlot","RangeCalendarGridSlot","RangeCalendarGridHeaderSlot","RangeCalendarHeaderCellSlot","RangeCalendarGridBodySlot","RangeCalendarCellSlot","RangeCalendarGrids","locale","useLocale","context","useSlottedContext","RangeCalendarContext","calendarState","useContext","RangeCalendarStateContext","visibleMonthsCount","todayDate","today","getLocalTimeZone","showMonthTitles","jsx","_","index","gridDate","monthName","jsxs","Box","RaCalendarGrid","RaCalendarGridHeader","day","RaCalendarHeaderCell","RaCalendarGridBody","date","isToday","RaCalendarCell","RangeCalendarHeader","showRangeLabel","Flex","Stack","VisuallyHidden","Heading","IconButton","KeyboardArrowLeft","Text","KeyboardArrowRight","RangeCalendarCustomContext","children","buttonContext","ButtonContext","textContext","TextContext","buttonSlots","monthLabel","monthRangeLabel","yearLabel","textSlots","Provider","RangeCalendar","props","recipe","useRecipe","rangeCalendarSlotRecipe","recipeProps","remainingProps","styleProps","otherProps","extractStyleProps","RaRangeCalendar"],"mappings":"suBAcM,CAAE,aAAAA,EAAc,YAAAC,CAAA,EAAgBC,0BAAwB,CAC5D,IAAK,eACP,CAAC,EAEYC,EAGTH,EAAyD,MAAO,MAAM,EAE7DI,EAA0BH,EAGrC,MAAO,QAAQ,EAEJI,EAAyBJ,EAGpC,MAAO,OAAO,EAEHK,EAA8BL,EAGzC,MAAO,YAAY,EAERM,EAAwBN,EAGnC,QAAS,MAAM,EAEJO,EAA8BP,EAGzC,QAAS,YAAY,EAEVQ,EAA8BR,EAGzC,KAAM,YAAY,EAEPS,EAA4BT,EAGvC,QAAS,UAAU,EAERU,EAAwBV,EAGnC,KAAM,UAAU,ECpCLW,EAAqB,IAAM,CACtC,KAAM,CAAE,OAAAC,CAAA,EAAWC,4CAAA,EACbC,EAAUC,EAAAA,0CAAkBC,2CAAoB,EAEhDC,EAAgBC,EAAAA,WAAWC,2CAAyB,EACpDC,EAAqBN,GAAS,iBAAiB,QAAU,EACzDO,EAAYC,4CAAMC,EAAAA,2CAAkB,EACpCC,EAAkBJ,EAAqB,EAE7C,OACEK,MAACrB,EAAA,CACE,SAAA,MAAM,KAAK,CAAE,OAAQgB,CAAA,EAAsB,CAACM,EAAGC,IAAU,CACxD,MAAMC,EAAWX,EAAc,aAAa,MAAM,IAAI,CACpD,OAAQU,CAAA,CACT,EACKE,EAAY,IAAI,KAAK,eAAejB,EAAQ,CAChD,MAAO,MAAA,CACR,EAAE,OAAOgB,EAAS,OAAOL,EAAAA,0CAAA,CAAkB,CAAC,EAE7C,OACEO,EAAAA,KAACC,EA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AA,EACJ,GAAGM,CAAA,CACL,CACF,CACF,EAGD,SAAAT,CAAA,CAAA,CAGP,EC7FaW,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,OACE3C,EAAAA,IAACvB,EAAA,CAAuB,GAAGiE,EAAc,GAAGE,EAAY,QAAO,GAC7D,SAAA5C,EAAAA,IAAC+C,EAAAA,0CAAA,CAAiB,GAAGF,EACnB,gBAACpB,EAAA,CACC,SAAA,CAAAzB,EAAAA,IAACe,EAAA,EAAoB,QACpB7B,EAAA,CAAA,CAAmB,CAAA,CAAA,CACtB,EACF,EACF,CAEJ"}
@@ -1,10 +0,0 @@
1
- "use strict";const r=require("react/jsx-runtime"),f=require("react"),ee=require("@chakra-ui/react"),we=require("./extract-style-props-IfUYxPJV.cjs.js"),a=require("slate"),C=require("slate-react"),Re=require("slate-history"),Ce=require("./useObjectRef-4v2MxSjQ.cjs.js"),re=require("./group-Cjq5lNQD.cjs.js"),w=require("@commercetools/nimbus-icons"),R=require("./menu-DK0AShnF.cjs.js"),y=require("./tooltip-Aar_qzmT.cjs.js"),J=require("./icon-button-B28VUff9.cjs.js"),q=require("./box-CWni3A32.cjs.js"),A=require("./text-BtRhIklG.cjs.js"),ve=require("./toolbar-BHdgjOW4.cjs.js"),ne=require("./separator-Vxu9fPdc.cjs.js"),se=require("./toggle-button-group-BQczQ6D_.cjs.js"),P=require("./icon-toggle-button-DPOco2hU.cjs.js"),$=require("./visually-hidden-BjtXUoFK.cjs.js"),Ie=require("./index-CxLKWOES.cjs.js");function te(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}const{withProvider:Me,withContext:pe}=ee.createSlotRecipeContext({key:"richTextInput"}),Ae=Me("div","root"),De=pe("div","toolbar"),He=pe("div","editable");/*!
2
- * escape-html
3
- * Copyright(c) 2012-2013 TJ Holowaychuk
4
- * Copyright(c) 2015 Andreas Lubbe
5
- * Copyright(c) 2015 Tiancheng "Timothy" Gu
6
- * MIT Licensed
7
- */var X,oe;function Ke(){if(oe)return X;oe=1;var t=/["'&<>]/;X=e;function e(n){var o=""+n,s=t.exec(o);if(!s)return o;var i,u="",d=0,p=0;for(d=s.index;d<o.length;d++){switch(o.charCodeAt(d)){case 34:i="&quot;";break;case 38:i="&amp;";break;case 39:i="&#39;";break;case 60:i="&lt;";break;case 62:i="&gt;";break;default:continue}p!==d&&(u+=o.substring(p,d)),p=d+1,u+=i}return p!==d?u+o.substring(p,d):u}return X}var Le=Ke();const _=te(Le),le={"mod+b":"bold","mod+i":"italic","mod+u":"underline","mod+`":"code"},z={placeholder:"Start typing...",isDisabled:!1,isReadOnly:!1,autoFocus:!1},ie={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"},ae={strong:"bold",b:"bold",em:"italic",i:"italic",u:"underline",code:"code",sup:"superscript",sub:"subscript",del:"strikethrough",s:"strikethrough"},G={STRIKETHROUGH:"strikethrough",CODE:"code",SUPERSCRIPT:"superscript",SUBSCRIPT:"subscript"},Be=[G.STRIKETHROUGH,G.CODE],Ne=[G.SUPERSCRIPT,G.SUBSCRIPT],fe=[{id:"paragraph",label:"Paragraph",props:{textStyle:"md",fontWeight:"500"}},{id:"heading-one",label:"Heading 1",props:{textStyle:"2xl",fontWeight:"500"}},{id:"heading-two",label:"Heading 2",props:{textStyle:"xl",fontWeight:"500"}},{id:"heading-three",label:"Heading 3",props:{textStyle:"lg",fontWeight:"500"}},{id:"heading-four",label:"Heading 4",props:{textStyle:"md",fontWeight:"500"}},{id:"heading-five",label:"Heading 5",props:{textStyle:"xs",fontWeight:"500"}},{id:"block-quote",label:"Quote",props:{textStyle:"md",fontWeight:"400"}}],qe=["heading-one","heading-two","heading-three","heading-four","heading-five","block-quote"],xe=`​
8
- `,K=()=>[{type:"paragraph",children:[{text:""}]}],Fe=t=>t.map(ge).join(""),ge=t=>{if(a.Text.isText(t)){const o=t;let s=_(o.text);return o.bold&&(s=`<strong>${s}</strong>`),o.code&&(s=`<code>${s}</code>`),o.italic&&(s=`<em>${s}</em>`),o.underline&&(s=`<u>${s}</u>`),o.superscript&&(s=`<sup>${s}</sup>`),o.subscript&&(s=`<sub>${s}</sub>`),o.strikethrough&&(s=`<del>${s}</del>`),s=s.replace(new RegExp(xe,"g"),"<br>"),s}const e=t.children.map(ge).join(""),n=t;switch(n.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(n.url){const i=Pe(n.url);o=` href="${_(i)}"`}let s="";if(n.htmlAttributes&&typeof n.htmlAttributes=="object")for(const[i,u]of Object.entries(n.htmlAttributes))i.toLowerCase().startsWith("on")||(s+=` ${_(i)}="${_(String(u))}"`);return`<a${o}${s}>${e}</a>`}default:return e}},Z=t=>{if(!t||t.trim()==="")return K();try{if(t.includes("<p>")||t.includes("<h")||t.includes("<div>")||t.includes("<blockquote>")||t.includes("<ul>")||t.includes("<ol>")){const n=new DOMParser().parseFromString(t,"text/html").body,o=Array.from(n.childNodes).map(ye).filter(Boolean);return be(o)}else return[{type:"paragraph",children:[{text:t}]}]}catch(e){return console.warn("Failed to parse HTML:",e),K()}},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,n=e.tagName.toLowerCase(),o=Array.from(e.childNodes).map(ye).filter(Boolean);if(n in ie){const i=ie[n],u={type:i,children:[]};if(i==="link"){const d=e.getAttribute("href");d&&(u.url=d);const p={};Array.from(e.attributes).forEach(x=>{x.name!=="href"&&!x.name.toLowerCase().startsWith("on")&&(p[x.name]=x.value)}),Object.keys(p).length>0&&(u.htmlAttributes=p)}return u.children=Oe(o),u}if(n in ae){const i=ae[n];return{text:Y(o),[i]:!0}}return n==="span"?{text:Y(o)}:{text:Y(o)}},Oe=t=>{const e=[];for(const n of t)typeof n=="string"?n.trim()&&e.push({text:n}):(n&&a.Text.isText(n)||n&&a.Element.isElement(n))&&e.push(n);return e.length===0&&e.push({text:""}),e},me=t=>t.children.map(e=>a.Text.isText(e)?e.text:a.Element.isElement(e)?me(e):"").join(""),Y=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?me(e):String(e||"")).join(""),Pe=t=>{const e=String(t).trim().toLowerCase();return e.startsWith("javascript:")||e.startsWith("data:")||e.startsWith("vbscript:")?"#":String(t)},be=t=>!Array.isArray(t)||t.length===0?K():t.map(e=>a.Element.isElement(e)?!e.children||e.children.length===0?{...e,children:[{text:""}]}:e:{type:"paragraph",children:[{text:String(e)}]}),ce=t=>{try{const e=new URL(t);return e.protocol==="http:"||e.protocol==="https:"}catch{return!1}},ue=["bulleted-list","numbered-list"],$e=["bold","code","italic","underline","superscript","subscript","strikethrough"],U=t=>$e.includes(t),Ue=(t,e)=>U(e)?t[e]===!0:!1,D=(t,e)=>{const{selection:n}=t;if(!n||a.Range.isCollapsed(n)){const o=a.Editor.marks(t);if(o&&U(e))return o[e]===!0;if(!n&&t.children.length>0){const s=t.children[0];if(s.children&&s.children.length>0){const i=s.children[0];if(a.Text.isText(i)&&U(e))return i[e]===!0}}return!1}try{const o=Array.from(a.Editor.nodes(t,{at:n,match:s=>a.Text.isText(s)}));if(o.length===0){const s=a.Editor.marks(t);return!s||!U(e)?!1:s[e]===!0}return o.every(([s])=>Ue(s,e))}catch{const o=a.Editor.marks(t);return!o||!U(e)?!1:o[e]===!0}},N=(t,e)=>{const{selection:n}=t;if(n){const[o]=Array.from(a.Editor.nodes(t,{at:a.Editor.unhangRange(t,n),match:s=>!a.Editor.isEditor(s)&&a.Element.isElement(s)&&s.type===e}));return!!o}return t.children.length>0?t.children[0].type===e:!1},H=(t,e)=>{D(t,e)?a.Editor.removeMark(t,e):a.Editor.addMark(t,e,!0)},Q=(t,e)=>{const n=N(t,e),o=ue.includes(e);a.Transforms.unwrapNodes(t,{match:i=>!a.Editor.isEditor(i)&&a.Element.isElement(i)&&ue.includes(i.type),split:!0});let s;if(n?s={type:"paragraph"}:o?s={type:"list-item"}:s={type:e},a.Transforms.setNodes(t,s),!n&&o){const i={type:e,children:[]};a.Transforms.wrapNodes(t,i)}},Ve=t=>{C.ReactEditor.focus(t)},_e=(t,e)=>{const n=Z(e);a.Transforms.delete(t,{at:{anchor:a.Editor.start(t,[]),focus:a.Editor.end(t,[])}}),a.Transforms.insertNodes(t,n),a.Transforms.select(t,a.Editor.start(t,[]))},ze=t=>{const{insertData:e,insertText:n,isInline:o}=t;return t.isInline=s=>s.type==="link"?!0:o(s),t.insertText=s=>{s&&ce(s)?de(t,s):n(s)},t.insertData=s=>{const i=s.getData("text/plain");i&&ce(i)?de(t,i):e(s)},t},Ge=t=>{a.Transforms.unwrapNodes(t,{match:e=>!a.Editor.isEditor(e)&&a.Element.isElement(e)&&e.type==="link"})},de=(t,e)=>{N(t,"link")&&Ge(t);const{selection:n}=t,o=n&&a.Range.isCollapsed(n),s={type:"link",url:e,children:o?[{text:e}]:[]};o?a.Transforms.insertNodes(t,s):(a.Transforms.wrapNodes(t,s,{split:!0}),a.Transforms.collapse(t,{edge:"end"}))},We=({attributes:t,children:e,element:n})=>{const o=n,s={textAlign:o.align};switch(o.type){case"block-quote":return r.jsx("blockquote",{style:s,...t,children:e});case"bulleted-list":return r.jsx("ul",{style:s,...t,children:e});case"heading-one":return r.jsx("h1",{style:s,...t,children:e});case"heading-two":return r.jsx("h2",{style:s,...t,children:e});case"heading-three":return r.jsx("h3",{style:s,...t,children:e});case"heading-four":return r.jsx("h4",{style:s,...t,children:e});case"heading-five":return r.jsx("h5",{style:s,...t,children:e});case"list-item":return r.jsx("li",{style:s,...t,children:e});case"numbered-list":return r.jsx("ol",{style:s,...t,children:e});case"link":return r.jsx("a",{...t,href:o.url,rel:"noopener noreferrer",style:s,children:e});default:return r.jsx("p",{style:s,...t,children:e})}},Xe=({attributes:t,children:e,leaf:n})=>{const o=n;return o.bold&&(e=r.jsx("strong",{children:e})),o.code&&(e=r.jsx("code",{children:e})),o.italic&&(e=r.jsx("em",{children:e})),o.underline&&(e=r.jsx("u",{children:e})),o.strikethrough&&(e=r.jsx("del",{children:e})),o.superscript&&(e=r.jsx("sup",{children:e})),o.subscript&&(e=r.jsx("sub",{children:e})),r.jsx("span",{...t,children:e})},Ye={placeholderCharacter:`​
9
- `};var E={},he;function Qe(){if(he)return E;he=1,Object.defineProperty(E,"__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"},n={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},s=1;s<20;s++)o["f"+s]=111+s;function i(c,h,T){h&&!("byKey"in h)&&(T=h,h=null),Array.isArray(c)||(c=[c]);var m=c.map(function(M){return p(M,h)}),b=function(v){return m.some(function(I){return x(I,v)})},L=T==null?b:b(T);return L}function u(c,h){return i(c,h)}function d(c,h){return i(c,{byKey:!0},h)}function p(c,h){var T=h&&h.byKey,m={};c=c.replace("++","+add");var b=c.split("+"),L=b.length;for(var M in e)m[e[M]]=!1;var v=!0,I=!1,g=void 0;try{for(var F=b[Symbol.iterator](),V;!(v=(V=F.next()).done);v=!0){var k=V.value,W=k.endsWith("?")&&k.length>1;W&&(k=k.slice(0,-1));var O=l(k),S=e[O];if(k.length>1&&!S&&!n[k]&&!o[O])throw new TypeError('Unknown modifier: "'+k+'"');(L===1||!S)&&(T?m.key=O:m.which=j(k)),S&&(m[S]=W?null:!0)}}catch(B){I=!0,g=B}finally{try{!v&&F.return&&F.return()}finally{if(I)throw g}}return m}function x(c,h){for(var T in c){var m=c[T],b=void 0;if(m!=null&&(T==="key"&&h.key!=null?b=h.key.toLowerCase():T==="which"?b=m===91&&h.which===93?91:h.which:b=h[T],!(b==null&&m===!1)&&b!==m))return!1}return!0}function j(c){c=l(c);var h=o[c]||c.toUpperCase().charCodeAt(0);return h}function l(c){return c=c.toLowerCase(),c=n[c]||c,c}return E.default=i,E.isHotkey=i,E.isCodeHotkey=u,E.isKeyHotkey=d,E.parseHotkey=p,E.compareHotkey=x,E.toKeyCode=j,E.toKeyName=l,E}var Je=Qe();const Ze=te(Je),et=({editor:t})=>({handleKeyDown:f.useCallback(n=>{if((n.metaKey||n.ctrlKey)&&n.key==="z"){n.preventDefault(),n.shiftKey?t.redo():t.undo();return}for(const o in le)if(Ze(o,n)){n.preventDefault();const s=le[o];H(t,s);return}if(n.shiftKey&&n.key==="Enter"){n.preventDefault(),t.insertText(Ye.placeholderCharacter);return}},[t])}),Te=function({ref:e,value:n,onChange:o,onFocus:s,onBlur:i,placeholder:u=z.placeholder,isDisabled:d=z.isDisabled,isReadOnly:p=z.isReadOnly,autoFocus:x=z.autoFocus,toolbar:j}){const l=f.useRef(null),c=Ce.$df56164dff5785e2$export$4338b53315abf666(ee.mergeRefs(l,e)),h=f.useMemo(()=>{const g=a.createEditor();return ze(Re.withHistory(C.withReact(g)))},[]),{handleKeyDown:T}=et({editor:h}),m=f.useCallback(g=>{s&&s(g)},[s]),b=f.useCallback(g=>{i&&i(g)},[i]);f.useImperativeHandle(c,()=>({focus:()=>Ve(h),resetValue:g=>_e(h,g)}),[h]);const L=f.useCallback(g=>r.jsx(We,{...g}),[]),M=f.useCallback(g=>r.jsx(Xe,{...g}),[]),v=K(),I=Array.isArray(n)&&n.length>0?n:v;return r.jsxs(C.Slate,{editor:h,value:I,onChange:o,children:[j&&r.jsx(De,{children:j}),r.jsx(He,{asChild:!0,children:r.jsx(C.Editable,{renderElement:L,renderLeaf:M,placeholder:u,autoFocus:x,readOnly:p||d,onKeyDown:T,onFocus:m,onBlur:b,"aria-label":"Rich text editor",role:"textbox","aria-multiline":"true"})})]})};Te.displayName="RichTextEditor";const je=t=>f.useCallback(e=>()=>{const{selection:n}=t;e(),n&&!t.selection&&a.Transforms.select(t,n),C.ReactEditor.isFocused(t)||C.ReactEditor.focus(t)},[t]),tt=({withPreservedSelection:t})=>{const e=C.useSlate(),n=f.useMemo(()=>qe.find(l=>N(e,l))||"paragraph",[e.selection,e.children]),o=fe.find(l=>l.id===n),s=o?.label||"",i=f.useCallback(l=>{t(()=>{Q(e,l)})()},[e,t]),u=f.useCallback(l=>{t(()=>{const c=Array.from(l)[0],h=N(e,"bulleted-list")?"bulleted-list":N(e,"numbered-list")?"numbered-list":null;c?Q(e,c):h&&Q(e,h)})()},[e,t]),d=f.useMemo(()=>{const l=[];return D(e,"bold")&&l.push("bold"),D(e,"italic")&&l.push("italic"),D(e,"underline")&&l.push("underline"),new Set(l)},[e.selection,e.children,a.Editor.marks(e)]),p=f.useMemo(()=>{const l=[];return N(e,"bulleted-list")&&l.push("bulleted-list"),N(e,"numbered-list")&&l.push("numbered-list"),new Set(l)},[e.selection,e.children]),x=f.useMemo(()=>e.history&&e.history.undos.length>0,[e.selection,e.children]),j=f.useMemo(()=>e.history&&e.history.redos.length>0,[e.selection,e.children]);return{currentTextStyle:n,selectedTextStyle:o,selectedTextStyleLabel:s,handleTextStyleChange:i,handleListToggle:u,selectedFormatKeys:d,selectedListKeys:p,hasUndos:x,hasRedos:j}},rt=({withPreservedSelection:t})=>{const e=C.useSlate(),n=f.useMemo(()=>{const u=[];return Be.forEach(d=>{D(e,d)&&u.push(d)}),new Set(u)},[e.selection,e.children,a.Editor.marks(e)]),o=f.useMemo(()=>{const u=[];return Ne.forEach(d=>{D(e,d)&&u.push(d)}),new Set(u)},[e.selection,e.children,a.Editor.marks(e)]),s=f.useMemo(()=>new Set([...Array.from(n),...Array.from(o)]),[n,o]),i=f.useCallback(u=>{if(u==="all")return;const d=Array.from(u),p=Array.from(s),x=d.filter(l=>!p.includes(l)),j=p.filter(l=>!d.includes(l));[...x,...j].forEach(l=>{l==="superscript"||l==="subscript"?t(()=>{const c=D(e,"superscript")?"superscript":D(e,"subscript")?"subscript":null;x.includes(l)&&c&&c!==l&&H(e,c),H(e,l)})():t(()=>H(e,l))()})},[e,s,t]);return{selectedKeys:n,selectedScriptKeys:o,allSelectedKeys:s,handleAllSelectionChange:i}},nt=({isDisabled:t=!1})=>{const e=C.useSlate(),n=je(e),{allSelectedKeys:o,handleAllSelectionChange:s}=rt({withPreservedSelection:n});return r.jsxs(R.Menu.Root,{selectionMode:"multiple",selectedKeys:o,onSelectionChange:s,children:[r.jsxs(y.Tooltip.Root,{delay:0,closeDelay:0,children:[r.jsx(R.Menu.Trigger,{asChild:!0,children:r.jsx(J.IconButton,{size:"xs",variant:"ghost","aria-label":"More formatting options",isDisabled:t,onMouseDown:i=>i.preventDefault(),children:r.jsx(w.MoreHoriz,{})})}),r.jsx(y.Tooltip.Content,{placement:"top",children:"More styles"})]}),r.jsxs(R.Menu.Content,{children:[r.jsx(R.Menu.Item,{id:"strikethrough",children:r.jsxs(q.Box,{slot:"label",display:"flex",alignItems:"center",gap:"200",children:[r.jsx(w.FormatStrikethrough,{}),r.jsx(A.Text,{textStyle:"sm",children:"Strikethrough"})]})}),r.jsx(R.Menu.Item,{id:"code",children:r.jsxs(q.Box,{slot:"label",display:"flex",alignItems:"center",gap:"200",children:[r.jsx(w.Code,{}),r.jsx(A.Text,{textStyle:"sm",children:"Code"})]})}),r.jsx(R.Menu.Item,{id:"superscript",children:r.jsxs(q.Box,{slot:"label",display:"flex",alignItems:"center",gap:"200",children:[r.jsx(A.Text,{children:"X²"}),r.jsx(A.Text,{textStyle:"sm",children:"Superscript"})]})}),r.jsx(R.Menu.Item,{id:"subscript",children:r.jsxs(q.Box,{slot:"label",display:"flex",alignItems:"center",gap:"200",children:[r.jsx(A.Text,{children:"X₂"}),r.jsx(A.Text,{textStyle:"sm",children:"Subscript"})]})})]})]})},Se=({isDisabled:t=!1})=>{const e=C.useSlate(),n=je(e),{currentTextStyle:o,selectedTextStyleLabel:s,handleTextStyleChange:i,handleListToggle:u,selectedFormatKeys:d,selectedListKeys:p,hasUndos:x,hasRedos:j}=tt({withPreservedSelection:n});return r.jsxs(ve.Toolbar,{orientation:"horizontal","aria-label":"Text formatting",width:"full",overflow:"hidden",size:"xs",children:[r.jsx(re.Group,{children:r.jsxs(R.Menu.Root,{onAction:l=>i(String(l)),children:[r.jsxs(y.Tooltip.Root,{delay:0,closeDelay:0,children:[r.jsx(R.Menu.Trigger,{height:"800",width:"4000",bg:"primary.1",borderRadius:"200",_hover:{bg:"primary.2"},isDisabled:t,onMouseDown:l=>l.preventDefault(),"aria-label":"Text style menu",children:r.jsxs(q.Box,{display:"flex",alignItems:"center",gap:"200",px:"200",children:[r.jsx(q.Box,{display:"flex",alignItems:"center",gap:"200",flexGrow:"1",children:r.jsx(A.Text,{my:"auto",textStyle:"sm",fontWeight:"500",children:s})}),r.jsx(w.KeyboardArrowDown,{})]})}),r.jsx(y.Tooltip.Content,{placement:"top",children:"Text style"})]}),r.jsx(R.Menu.Content,{children:fe.map(l=>r.jsx(R.Menu.Item,{id:l.id,...o===l.id&&{"data-state":"checked"},children:r.jsx(A.Text,{...l.props,children:l.label})},l.id))})]})}),r.jsx(ne.Separator,{orientation:"vertical"}),r.jsxs(se.ToggleButtonGroup.Root,{selectionMode:"multiple",selectedKeys:d,isDisabled:t,children:[r.jsxs(y.Tooltip.Root,{delay:0,closeDelay:0,children:[r.jsxs(P.IconToggleButton,{id:"bold",size:"xs",variant:"ghost","aria-label":"Bold",isDisabled:t,onMouseDown:l=>l.preventDefault(),onPress:n(()=>H(e,"bold")),children:[r.jsx(w.FormatBold,{}),r.jsx($.VisuallyHidden,{children:"Bold"})]}),r.jsx(y.Tooltip.Content,{placement:"top",children:"Bold"})]}),r.jsxs(y.Tooltip.Root,{delay:0,closeDelay:0,children:[r.jsxs(P.IconToggleButton,{id:"italic",size:"xs",variant:"ghost","aria-label":"Italic",isDisabled:t,onMouseDown:l=>l.preventDefault(),onPress:n(()=>H(e,"italic")),children:[r.jsx(w.FormatItalic,{}),r.jsx($.VisuallyHidden,{children:"Italic"})]}),r.jsx(y.Tooltip.Content,{placement:"top",children:"Italic"})]}),r.jsxs(y.Tooltip.Root,{delay:0,closeDelay:0,children:[r.jsxs(P.IconToggleButton,{id:"underline",size:"xs",variant:"ghost","aria-label":"Underline",isDisabled:t,onMouseDown:l=>l.preventDefault(),onPress:n(()=>H(e,"underline")),children:[r.jsx(w.FormatUnderlined,{}),r.jsx($.VisuallyHidden,{children:"Underline"})]}),r.jsx(y.Tooltip.Content,{placement:"top",children:"Underline"})]})]}),r.jsx(nt,{isDisabled:t}),r.jsx(ne.Separator,{orientation:"vertical"}),r.jsxs(se.ToggleButtonGroup.Root,{selectionMode:"single",selectedKeys:p,onSelectionChange:u,"aria-label":"List formatting",isDisabled:t,children:[r.jsxs(y.Tooltip.Root,{delay:0,closeDelay:0,children:[r.jsx(P.IconToggleButton,{id:"bulleted-list",size:"xs",variant:"ghost","aria-label":"Bulleted List",isDisabled:t,onMouseDown:l=>l.preventDefault(),children:r.jsx(w.FormatListBulleted,{})}),r.jsx(y.Tooltip.Content,{placement:"top",children:"Bulleted list"})]}),r.jsxs(y.Tooltip.Root,{delay:0,closeDelay:0,children:[r.jsx(P.IconToggleButton,{id:"numbered-list",size:"xs",variant:"ghost","aria-label":"Numbered List",isDisabled:t,onMouseDown:l=>l.preventDefault(),children:r.jsx(w.FormatListNumbered,{})}),r.jsx(y.Tooltip.Content,{placement:"top",children:"Numbered list"})]})]}),r.jsx(q.Box,{flexGrow:"1"}),r.jsxs(re.Group,{children:[r.jsxs(y.Tooltip.Root,{delay:0,closeDelay:0,children:[r.jsxs(J.IconButton,{size:"xs",variant:"ghost","aria-label":"Undo",isDisabled:!x||t,onPress:n(()=>e.undo()),onMouseDown:l=>l.preventDefault(),children:[r.jsx(w.Undo,{}),r.jsx($.VisuallyHidden,{children:"Undo"})]}),r.jsx(y.Tooltip.Content,{placement:"top",children:"Undo"})]}),r.jsxs(y.Tooltip.Root,{delay:0,closeDelay:0,children:[r.jsxs(J.IconButton,{size:"xs",variant:"ghost","aria-label":"Redo",isDisabled:!j||t,onPress:n(()=>e.redo()),onMouseDown:l=>l.preventDefault(),children:[r.jsx(w.Redo,{}),r.jsx($.VisuallyHidden,{children:"Redo"})]}),r.jsx(y.Tooltip.Content,{placement:"top",children:"Redo"})]})]})]})};Se.displayName="RichTextToolbar";const ke=t=>{const{ref:e,value:n,defaultValue:o,onChange:s,onFocus:i,onBlur:u,placeholder:d="",isDisabled:p=!1,isReadOnly:x=!1,isInvalid:j=!1,autoFocus:l=!1,...c}=t,h=ee.useSlotRecipe({recipe:Ie.richTextInputRecipe}),[T,m]=h.splitVariantProps({...c}),[b,L]=we.extractStyleProps(m),M={"data-disabled":p?"true":void 0,"data-invalid":j?"true":void 0,"data-readonly":x?"true":void 0},[v,I]=f.useState(()=>{const S=n??o??"";try{return S?Z(S):K()}catch(B){return console.warn("Failed to parse initial HTML, using empty value:",B),K()}}),[g,F]=f.useState(()=>n??o??""),V=f.useRef(null);f.useEffect(()=>{if(n!==void 0&&n!==g){const S=n?Z(n):K();I(S),F(n)}},[n,g]);const k=f.useCallback(S=>{const B=Fe(S),Ee=B!==g;I(S),F(B),Ee&&s&&s(B)},[g,s]),O=be(v);return r.jsx(Ae,{role:"group",...T,...b,...L,...M,ref:e,children:r.jsx(Te,{ref:V,value:O,onChange:k,onFocus:i,onBlur:u,placeholder:d,isDisabled:p,isReadOnly:x,autoFocus:l,toolbar:x?null:r.jsx(Se,{isDisabled:p})})})};ke.displayName="RichTextInput";exports.RichTextInput=ke;exports.getDefaultExportFromCjs=te;
10
- //# sourceMappingURL=rich-text-input-B41QcSHY.cjs.js.map