@commercetools/nimbus 0.0.0-canary-20250903150359 → 0.0.0-canary-20250904053156

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 (276) hide show
  1. package/dist/chunks/{DatePicker-BthC1bZ_.es.js → DatePicker-B1Unwe6C.es.js} +2 -2
  2. package/dist/chunks/{DatePicker-BthC1bZ_.es.js.map → DatePicker-B1Unwe6C.es.js.map} +1 -1
  3. package/dist/chunks/{DatePicker-BdV6ICAm.cjs.js → DatePicker-_aG-c1ms.cjs.js} +2 -2
  4. package/dist/chunks/{DatePicker-BdV6ICAm.cjs.js.map → DatePicker-_aG-c1ms.cjs.js.map} +1 -1
  5. package/dist/chunks/{Dialog-BeQ6Z6l2.es.js → Dialog-C9HXv1rP.es.js} +68 -67
  6. package/dist/chunks/{Dialog-BeQ6Z6l2.es.js.map → Dialog-C9HXv1rP.es.js.map} +1 -1
  7. package/dist/chunks/Dialog-DZm5Sj40.cjs.js +2 -0
  8. package/dist/chunks/{Dialog-CYa26HlL.cjs.js.map → Dialog-DZm5Sj40.cjs.js.map} +1 -1
  9. package/dist/chunks/Header-CZkkXWBA.es.js +58 -0
  10. package/dist/chunks/Header-CZkkXWBA.es.js.map +1 -0
  11. package/dist/chunks/Header-D24AtheW.cjs.js +2 -0
  12. package/dist/chunks/Header-D24AtheW.cjs.js.map +1 -0
  13. package/dist/chunks/{ListBox-DF3NHeEX.es.js → ListBox-DWMnhpDd.es.js} +46 -45
  14. package/dist/chunks/{ListBox-DF3NHeEX.es.js.map → ListBox-DWMnhpDd.es.js.map} +1 -1
  15. package/dist/chunks/ListBox-Dnuz2Daa.cjs.js +2 -0
  16. package/dist/chunks/{ListBox-CikEmFBx.cjs.js.map → ListBox-Dnuz2Daa.cjs.js.map} +1 -1
  17. package/dist/chunks/SelectionManager-CtwcAiw4.es.js +1267 -0
  18. package/dist/chunks/SelectionManager-CtwcAiw4.es.js.map +1 -0
  19. package/dist/chunks/SelectionManager-x0j8UpyW.cjs.js +2 -0
  20. package/dist/chunks/SelectionManager-x0j8UpyW.cjs.js.map +1 -0
  21. package/dist/chunks/Separator-BCuq0iz5.es.js +734 -0
  22. package/dist/chunks/Separator-BCuq0iz5.es.js.map +1 -0
  23. package/dist/chunks/Separator-CcMEmnGS.cjs.js +18 -0
  24. package/dist/chunks/Separator-CcMEmnGS.cjs.js.map +1 -0
  25. package/dist/chunks/{alert-BhoRNIWA.cjs.js → alert-Ce4-sHmy.cjs.js} +2 -2
  26. package/dist/chunks/{alert-BhoRNIWA.cjs.js.map → alert-Ce4-sHmy.cjs.js.map} +1 -1
  27. package/dist/chunks/{alert-D-ddqYG4.es.js → alert-fGOiy9nj.es.js} +2 -2
  28. package/dist/chunks/{alert-D-ddqYG4.es.js.map → alert-fGOiy9nj.es.js.map} +1 -1
  29. package/dist/chunks/{button-CRUdodZm.es.js → button-DEgBQobR.es.js} +2 -2
  30. package/dist/chunks/{button-CRUdodZm.es.js.map → button-DEgBQobR.es.js.map} +1 -1
  31. package/dist/chunks/{button-CU8FW_Pl.cjs.js → button-DJYITnqc.cjs.js} +2 -2
  32. package/dist/chunks/{button-CU8FW_Pl.cjs.js.map → button-DJYITnqc.cjs.js.map} +1 -1
  33. package/dist/chunks/{calendar-DJKWldpV.cjs.js → calendar-BdL5nJXs.cjs.js} +2 -2
  34. package/dist/chunks/{calendar-DJKWldpV.cjs.js.map → calendar-BdL5nJXs.cjs.js.map} +1 -1
  35. package/dist/chunks/{calendar-DzwFtg1t.es.js → calendar-Csq6ml4F.es.js} +4 -4
  36. package/dist/chunks/{calendar-DzwFtg1t.es.js.map → calendar-Csq6ml4F.es.js.map} +1 -1
  37. package/dist/chunks/{checkbox-GmYxVrZx.es.js → checkbox-BFQXCWuz.es.js} +2 -2
  38. package/dist/chunks/{checkbox-GmYxVrZx.es.js.map → checkbox-BFQXCWuz.es.js.map} +1 -1
  39. package/dist/chunks/{checkbox-6nLo9Jy2.cjs.js → checkbox-D-x7pyAC.cjs.js} +2 -2
  40. package/dist/chunks/{checkbox-6nLo9Jy2.cjs.js.map → checkbox-D-x7pyAC.cjs.js.map} +1 -1
  41. package/dist/chunks/{combobox-gIwba2QG.es.js → combobox-DXzhNwE_.es.js} +128 -127
  42. package/dist/chunks/{combobox-gIwba2QG.es.js.map → combobox-DXzhNwE_.es.js.map} +1 -1
  43. package/dist/chunks/combobox-Zdlr1WyV.cjs.js +2 -0
  44. package/dist/chunks/{combobox-DtPDxCo3.cjs.js.map → combobox-Zdlr1WyV.cjs.js.map} +1 -1
  45. package/dist/chunks/data-table-DjXI7oCC.cjs.js +2 -0
  46. package/dist/chunks/{data-table-Cpk3q34E.cjs.js.map → data-table-DjXI7oCC.cjs.js.map} +1 -1
  47. package/dist/chunks/{data-table-mXLxUWQz.es.js → data-table-M8ZE7bUF.es.js} +38 -37
  48. package/dist/chunks/{data-table-mXLxUWQz.es.js.map → data-table-M8ZE7bUF.es.js.map} +1 -1
  49. package/dist/chunks/{date-input-D5unoyMt.es.js → date-input-BGa-cgj-.es.js} +3 -3
  50. package/dist/chunks/{date-input-D5unoyMt.es.js.map → date-input-BGa-cgj-.es.js.map} +1 -1
  51. package/dist/chunks/{date-input-DJ_aFB9i.cjs.js → date-input-C4NM5AFC.cjs.js} +2 -2
  52. package/dist/chunks/{date-input-DJ_aFB9i.cjs.js.map → date-input-C4NM5AFC.cjs.js.map} +1 -1
  53. package/dist/chunks/{date-picker-f3TylaP5.cjs.js → date-picker-ChoImuv_.cjs.js} +2 -2
  54. package/dist/chunks/{date-picker-f3TylaP5.cjs.js.map → date-picker-ChoImuv_.cjs.js.map} +1 -1
  55. package/dist/chunks/{date-picker-CMqAI1lp.es.js → date-picker-S6C2mWMs.es.js} +9 -9
  56. package/dist/chunks/{date-picker-CMqAI1lp.es.js.map → date-picker-S6C2mWMs.es.js.map} +1 -1
  57. package/dist/chunks/{date-range-picker-Dtji64Q9.es.js → date-range-picker-DL00UKjF.es.js} +9 -9
  58. package/dist/chunks/{date-range-picker-Dtji64Q9.es.js.map → date-range-picker-DL00UKjF.es.js.map} +1 -1
  59. package/dist/chunks/{date-range-picker-CxsPpWyX.cjs.js → date-range-picker-DLEQGtgO.cjs.js} +2 -2
  60. package/dist/chunks/{date-range-picker-CxsPpWyX.cjs.js.map → date-range-picker-DLEQGtgO.cjs.js.map} +1 -1
  61. package/dist/chunks/divider-BdtT_f-U.es.js +50 -0
  62. package/dist/chunks/divider-BdtT_f-U.es.js.map +1 -0
  63. package/dist/chunks/divider-o2LVtQJm.cjs.js +2 -0
  64. package/dist/chunks/divider-o2LVtQJm.cjs.js.map +1 -0
  65. package/dist/chunks/{extractStyleProps-vA4cNUoc.es.js → extractStyleProps-CFQKiz8b.es.js} +2 -2
  66. package/dist/chunks/{extractStyleProps-vA4cNUoc.es.js.map → extractStyleProps-CFQKiz8b.es.js.map} +1 -1
  67. package/dist/chunks/{extractStyleProps-CZpHKp1I.cjs.js → extractStyleProps-bWKBkEco.cjs.js} +2 -2
  68. package/dist/chunks/{extractStyleProps-CZpHKp1I.cjs.js.map → extractStyleProps-bWKBkEco.cjs.js.map} +1 -1
  69. package/dist/chunks/{form-field-DxcGAb23.cjs.js → form-field-D1lcT5f5.cjs.js} +2 -2
  70. package/dist/chunks/{form-field-DxcGAb23.cjs.js.map → form-field-D1lcT5f5.cjs.js.map} +1 -1
  71. package/dist/chunks/{form-field-Dtcfgzyo.es.js → form-field-DDTIZj9s.es.js} +3 -3
  72. package/dist/chunks/{form-field-Dtcfgzyo.es.js.map → form-field-DDTIZj9s.es.js.map} +1 -1
  73. package/dist/chunks/{icon-button-Cc0MkBbk.cjs.js → icon-button-CPXhdrQY.cjs.js} +2 -2
  74. package/dist/chunks/{icon-button-Cc0MkBbk.cjs.js.map → icon-button-CPXhdrQY.cjs.js.map} +1 -1
  75. package/dist/chunks/{icon-button-C20Gw8gQ.es.js → icon-button-DPtCLr1A.es.js} +2 -2
  76. package/dist/chunks/{icon-button-C20Gw8gQ.es.js.map → icon-button-DPtCLr1A.es.js.map} +1 -1
  77. package/dist/chunks/{icon-toggle-button-D-C99Q0s.cjs.js → icon-toggle-button-BG-F1KE7.cjs.js} +2 -2
  78. package/dist/chunks/{icon-toggle-button-D-C99Q0s.cjs.js.map → icon-toggle-button-BG-F1KE7.cjs.js.map} +1 -1
  79. package/dist/chunks/{icon-toggle-button-CgHQMDs3.es.js → icon-toggle-button-BItuQ_Lh.es.js} +2 -2
  80. package/dist/chunks/{icon-toggle-button-CgHQMDs3.es.js.map → icon-toggle-button-BItuQ_Lh.es.js.map} +1 -1
  81. package/dist/chunks/{index-C8Yrk__l.cjs.js → index-B3DGNvyC.cjs.js} +3 -3
  82. package/dist/chunks/{index-C8Yrk__l.cjs.js.map → index-B3DGNvyC.cjs.js.map} +1 -1
  83. package/dist/chunks/{index-jAeaCpRm.es.js → index-BDXHumM1.es.js} +8 -9
  84. package/dist/chunks/{index-jAeaCpRm.es.js.map → index-BDXHumM1.es.js.map} +1 -1
  85. package/dist/chunks/menu-DxXsyeUG.cjs.js +2 -0
  86. package/dist/chunks/menu-DxXsyeUG.cjs.js.map +1 -0
  87. package/dist/chunks/menu-aLEA43vB.es.js +150 -0
  88. package/dist/chunks/menu-aLEA43vB.es.js.map +1 -0
  89. package/dist/chunks/{multiline-text-input-BGnvpB1r.es.js → multiline-text-input-sr-8f5JV.es.js} +2 -2
  90. package/dist/chunks/{multiline-text-input-BGnvpB1r.es.js.map → multiline-text-input-sr-8f5JV.es.js.map} +1 -1
  91. package/dist/chunks/{multiline-text-input-sXIlwrvT.cjs.js → multiline-text-input-z1pACPVX.cjs.js} +2 -2
  92. package/dist/chunks/{multiline-text-input-sXIlwrvT.cjs.js.map → multiline-text-input-z1pACPVX.cjs.js.map} +1 -1
  93. package/dist/chunks/{nimbus-provider-D3DvYEDv.cjs.js → nimbus-provider-ClSAgdoD.cjs.js} +2 -2
  94. package/dist/chunks/{nimbus-provider-D3DvYEDv.cjs.js.map → nimbus-provider-ClSAgdoD.cjs.js.map} +1 -1
  95. package/dist/chunks/{nimbus-provider-CybdU89B.es.js → nimbus-provider-DaWtjnp-.es.js} +2 -2
  96. package/dist/chunks/{nimbus-provider-CybdU89B.es.js.map → nimbus-provider-DaWtjnp-.es.js.map} +1 -1
  97. package/dist/chunks/{number-input-CPnA0dO-.cjs.js → number-input-BszmEIip.cjs.js} +2 -2
  98. package/dist/chunks/{number-input-CPnA0dO-.cjs.js.map → number-input-BszmEIip.cjs.js.map} +1 -1
  99. package/dist/chunks/{number-input-CzObpfFa.es.js → number-input-D4DKdybl.es.js} +3 -3
  100. package/dist/chunks/{number-input-CzObpfFa.es.js.map → number-input-D4DKdybl.es.js.map} +1 -1
  101. package/dist/chunks/{password-input-C_rdTND7.es.js → password-input-7AyAmLgJ.es.js} +3 -3
  102. package/dist/chunks/{password-input-C_rdTND7.es.js.map → password-input-7AyAmLgJ.es.js.map} +1 -1
  103. package/dist/chunks/{password-input-BqhrDjyW.cjs.js → password-input-BtvFF-4B.cjs.js} +2 -2
  104. package/dist/chunks/{password-input-BqhrDjyW.cjs.js.map → password-input-BtvFF-4B.cjs.js.map} +1 -1
  105. package/dist/chunks/{progress-bar-CrS1rODC.cjs.js → progress-bar-Dz8r8vuu.cjs.js} +2 -2
  106. package/dist/chunks/{progress-bar-CrS1rODC.cjs.js.map → progress-bar-Dz8r8vuu.cjs.js.map} +1 -1
  107. package/dist/chunks/{progress-bar-pPWJ1Sn8.es.js → progress-bar-Wka_eryr.es.js} +2 -2
  108. package/dist/chunks/{progress-bar-pPWJ1Sn8.es.js.map → progress-bar-Wka_eryr.es.js.map} +1 -1
  109. package/dist/chunks/{radio-input-OpbQD2zP.es.js → radio-input-B0qTg-Fb.es.js} +3 -3
  110. package/dist/chunks/{radio-input-OpbQD2zP.es.js.map → radio-input-B0qTg-Fb.es.js.map} +1 -1
  111. package/dist/chunks/{radio-input-BTEXrXaF.cjs.js → radio-input-D_pe6uBJ.cjs.js} +2 -2
  112. package/dist/chunks/{radio-input-BTEXrXaF.cjs.js.map → radio-input-D_pe6uBJ.cjs.js.map} +1 -1
  113. package/dist/chunks/{range-calendar-BOP_J_5a.es.js → range-calendar-CoAszOTq.es.js} +4 -4
  114. package/dist/chunks/{range-calendar-BOP_J_5a.es.js.map → range-calendar-CoAszOTq.es.js.map} +1 -1
  115. package/dist/chunks/{range-calendar-CFotnBzs.cjs.js → range-calendar-T1Wlvm-Z.cjs.js} +2 -2
  116. package/dist/chunks/{range-calendar-CFotnBzs.cjs.js.map → range-calendar-T1Wlvm-Z.cjs.js.map} +1 -1
  117. package/dist/chunks/{rich-text-input-CgrxAPHc.es.js → rich-text-input-9MdutxJr.es.js} +190 -177
  118. package/dist/chunks/rich-text-input-9MdutxJr.es.js.map +1 -0
  119. package/dist/chunks/rich-text-input-D36fnIHb.cjs.js +7 -0
  120. package/dist/chunks/rich-text-input-D36fnIHb.cjs.js.map +1 -0
  121. package/dist/chunks/select-DFNyky2d.cjs.js +2 -0
  122. package/dist/chunks/{select-Coyt1pJN.cjs.js.map → select-DFNyky2d.cjs.js.map} +1 -1
  123. package/dist/chunks/{select-CAeD_ZuZ.es.js → select-Dz2O_cFR.es.js} +36 -35
  124. package/dist/chunks/{select-CAeD_ZuZ.es.js.map → select-Dz2O_cFR.es.js.map} +1 -1
  125. package/dist/chunks/slate-helpers-CcSj-DBm.cjs.js +24 -0
  126. package/dist/chunks/slate-helpers-CcSj-DBm.cjs.js.map +1 -0
  127. package/dist/chunks/slate-helpers-DsTiLoO8.es.js +9042 -0
  128. package/dist/chunks/slate-helpers-DsTiLoO8.es.js.map +1 -0
  129. package/dist/chunks/{split-button-BYrr5vRr.cjs.js → split-button-BIMKDmUe.cjs.js} +2 -2
  130. package/dist/chunks/split-button-BIMKDmUe.cjs.js.map +1 -0
  131. package/dist/chunks/{split-button-j2bgcP59.es.js → split-button-C5Op1s7Z.es.js} +5 -5
  132. package/dist/chunks/split-button-C5Op1s7Z.es.js.map +1 -0
  133. package/dist/chunks/{switch-BgNpbn2e.cjs.js → switch-BToNhl42.cjs.js} +2 -2
  134. package/dist/chunks/{switch-BgNpbn2e.cjs.js.map → switch-BToNhl42.cjs.js.map} +1 -1
  135. package/dist/chunks/{switch-Cid4U3m8.es.js → switch-Poa2k7a5.es.js} +3 -3
  136. package/dist/chunks/{switch-Cid4U3m8.es.js.map → switch-Poa2k7a5.es.js.map} +1 -1
  137. package/dist/chunks/{tag-group-CeNHz5QQ.es.js → tag-group-BCNooINR.es.js} +44 -43
  138. package/dist/chunks/{tag-group-CeNHz5QQ.es.js.map → tag-group-BCNooINR.es.js.map} +1 -1
  139. package/dist/chunks/tag-group-DzXa9m7w.cjs.js +2 -0
  140. package/dist/chunks/{tag-group-B3YSTBpb.cjs.js.map → tag-group-DzXa9m7w.cjs.js.map} +1 -1
  141. package/dist/chunks/{text-input-C2y4O13I.cjs.js → text-input-5jfm2V1Y.cjs.js} +2 -2
  142. package/dist/chunks/{text-input-C2y4O13I.cjs.js.map → text-input-5jfm2V1Y.cjs.js.map} +1 -1
  143. package/dist/chunks/{text-input-TZXg0lEQ.es.js → text-input-Dqx8GVHm.es.js} +3 -3
  144. package/dist/chunks/{text-input-TZXg0lEQ.es.js.map → text-input-Dqx8GVHm.es.js.map} +1 -1
  145. package/dist/chunks/{time-input-cHUvGWDc.cjs.js → time-input-B_PIpe-Z.cjs.js} +2 -2
  146. package/dist/chunks/{time-input-cHUvGWDc.cjs.js.map → time-input-B_PIpe-Z.cjs.js.map} +1 -1
  147. package/dist/chunks/{time-input-CI_HoOGU.es.js → time-input-DxKFrUee.es.js} +2 -2
  148. package/dist/chunks/{time-input-CI_HoOGU.es.js.map → time-input-DxKFrUee.es.js.map} +1 -1
  149. package/dist/chunks/{toggle-button-a0gCembi.es.js → toggle-button-C1bAVGF3.es.js} +3 -3
  150. package/dist/chunks/{toggle-button-a0gCembi.es.js.map → toggle-button-C1bAVGF3.es.js.map} +1 -1
  151. package/dist/chunks/{toggle-button-C9ezVsSp.cjs.js → toggle-button-Cg00z4JT.cjs.js} +2 -2
  152. package/dist/chunks/{toggle-button-C9ezVsSp.cjs.js.map → toggle-button-Cg00z4JT.cjs.js.map} +1 -1
  153. package/dist/chunks/{toolbar-CLGq6IO7.cjs.js → toolbar-ClUkHnY4.cjs.js} +2 -2
  154. package/dist/chunks/{toolbar-CLGq6IO7.cjs.js.map → toolbar-ClUkHnY4.cjs.js.map} +1 -1
  155. package/dist/chunks/{toolbar-hpBfKrTl.es.js → toolbar-Oxkd8pfI.es.js} +3 -3
  156. package/dist/chunks/{toolbar-hpBfKrTl.es.js.map → toolbar-Oxkd8pfI.es.js.map} +1 -1
  157. package/dist/chunks/use-formatting-state-B26nE9CO.es.js +113 -0
  158. package/dist/chunks/use-formatting-state-B26nE9CO.es.js.map +1 -0
  159. package/dist/chunks/use-formatting-state-D7zenGZW.cjs.js +2 -0
  160. package/dist/chunks/use-formatting-state-D7zenGZW.cjs.js.map +1 -0
  161. package/dist/chunks/{useSingleSelectListState-F2WkLZRg.cjs.js → useSingleSelectListState-C_48GoKf.cjs.js} +2 -2
  162. package/dist/chunks/{useSingleSelectListState-F2WkLZRg.cjs.js.map → useSingleSelectListState-C_48GoKf.cjs.js.map} +1 -1
  163. package/dist/chunks/{useSingleSelectListState-D1rjgMv_.es.js → useSingleSelectListState-DZavH1SN.es.js} +2 -2
  164. package/dist/chunks/{useSingleSelectListState-D1rjgMv_.es.js.map → useSingleSelectListState-DZavH1SN.es.js.map} +1 -1
  165. package/dist/components/alert.cjs +1 -1
  166. package/dist/components/alert.es.js +1 -1
  167. package/dist/components/button.cjs +1 -1
  168. package/dist/components/button.es.js +1 -1
  169. package/dist/components/calendar.cjs +1 -1
  170. package/dist/components/calendar.es.js +1 -1
  171. package/dist/components/checkbox.cjs +1 -1
  172. package/dist/components/checkbox.es.js +1 -1
  173. package/dist/components/combobox.cjs +1 -1
  174. package/dist/components/combobox.es.js +1 -1
  175. package/dist/components/components.cjs +1 -1
  176. package/dist/components/components.es.js +46 -47
  177. package/dist/components/data-table.cjs +1 -1
  178. package/dist/components/data-table.es.js +1 -1
  179. package/dist/components/date-input.cjs +1 -1
  180. package/dist/components/date-input.es.js +1 -1
  181. package/dist/components/date-picker.cjs +1 -1
  182. package/dist/components/date-picker.es.js +1 -1
  183. package/dist/components/date-range-picker.cjs +1 -1
  184. package/dist/components/date-range-picker.es.js +1 -1
  185. package/dist/components/divider.cjs +1 -1
  186. package/dist/components/divider.es.js +1 -1
  187. package/dist/components/form-field.cjs +1 -1
  188. package/dist/components/form-field.es.js +1 -1
  189. package/dist/components/hooks.cjs +1 -1
  190. package/dist/components/hooks.es.js +1 -1
  191. package/dist/components/icon-button.cjs +1 -1
  192. package/dist/components/icon-button.es.js +1 -1
  193. package/dist/components/icon-toggle-button.cjs +1 -1
  194. package/dist/components/icon-toggle-button.es.js +1 -1
  195. package/dist/components/multiline-text-input.cjs +1 -1
  196. package/dist/components/multiline-text-input.es.js +1 -1
  197. package/dist/components/nimbus-provider.cjs +1 -1
  198. package/dist/components/nimbus-provider.es.js +1 -1
  199. package/dist/components/number-input.cjs +1 -1
  200. package/dist/components/number-input.es.js +1 -1
  201. package/dist/components/password-input.cjs +1 -1
  202. package/dist/components/password-input.es.js +1 -1
  203. package/dist/components/popover.cjs +1 -1
  204. package/dist/components/popover.es.js +1 -1
  205. package/dist/components/progress-bar.cjs +1 -1
  206. package/dist/components/progress-bar.es.js +1 -1
  207. package/dist/components/radio-input.cjs +1 -1
  208. package/dist/components/radio-input.es.js +1 -1
  209. package/dist/components/range-calendar.cjs +1 -1
  210. package/dist/components/range-calendar.es.js +1 -1
  211. package/dist/components/rich-text-input.cjs +1 -1
  212. package/dist/components/rich-text-input.es.js +1 -1
  213. package/dist/components/select.cjs +1 -1
  214. package/dist/components/select.es.js +1 -1
  215. package/dist/components/split-button.cjs +1 -1
  216. package/dist/components/split-button.es.js +1 -1
  217. package/dist/components/switch.cjs +1 -1
  218. package/dist/components/switch.es.js +1 -1
  219. package/dist/components/tag-group.cjs +1 -1
  220. package/dist/components/tag-group.es.js +1 -1
  221. package/dist/components/text-input.cjs +1 -1
  222. package/dist/components/text-input.es.js +1 -1
  223. package/dist/components/time-input.cjs +1 -1
  224. package/dist/components/time-input.es.js +1 -1
  225. package/dist/components/toggle-button.cjs +1 -1
  226. package/dist/components/toggle-button.es.js +1 -1
  227. package/dist/components/toolbar.cjs +1 -1
  228. package/dist/components/toolbar.es.js +1 -1
  229. package/dist/components/utils.cjs +1 -1
  230. package/dist/components/utils.es.js +2 -2
  231. package/dist/components.d.ts +5 -20
  232. package/dist/divider.d.ts +2 -2
  233. package/dist/index.cjs +1 -1
  234. package/dist/index.d.ts +5 -20
  235. package/dist/index.es.js +100 -101
  236. package/dist/split-button.d.ts +2 -2
  237. package/package.json +8 -8
  238. package/dist/chunks/Dialog-CYa26HlL.cjs.js +0 -2
  239. package/dist/chunks/ListBox-CikEmFBx.cjs.js +0 -2
  240. package/dist/chunks/SelectionManager-CLyu96pU.es.js +0 -1946
  241. package/dist/chunks/SelectionManager-CLyu96pU.es.js.map +0 -1
  242. package/dist/chunks/SelectionManager-Mrwf4SFv.cjs.js +0 -18
  243. package/dist/chunks/SelectionManager-Mrwf4SFv.cjs.js.map +0 -1
  244. package/dist/chunks/Separator-3-E2tRbk.es.js +0 -92
  245. package/dist/chunks/Separator-3-E2tRbk.es.js.map +0 -1
  246. package/dist/chunks/Separator-CAOg-vqY.cjs.js +0 -2
  247. package/dist/chunks/Separator-CAOg-vqY.cjs.js.map +0 -1
  248. package/dist/chunks/combobox-DtPDxCo3.cjs.js +0 -2
  249. package/dist/chunks/data-table-Cpk3q34E.cjs.js +0 -2
  250. package/dist/chunks/divider--BAm3ca4.es.js +0 -53
  251. package/dist/chunks/divider--BAm3ca4.es.js.map +0 -1
  252. package/dist/chunks/divider-BuizjeAj.cjs.js +0 -2
  253. package/dist/chunks/divider-BuizjeAj.cjs.js.map +0 -1
  254. package/dist/chunks/menu-8g9Hn1nm.es.js +0 -157
  255. package/dist/chunks/menu-8g9Hn1nm.es.js.map +0 -1
  256. package/dist/chunks/menu-Bm1u-R6o.cjs.js +0 -2
  257. package/dist/chunks/menu-Bm1u-R6o.cjs.js.map +0 -1
  258. package/dist/chunks/rich-text-input-CItP9BzJ.cjs.js +0 -2
  259. package/dist/chunks/rich-text-input-CItP9BzJ.cjs.js.map +0 -1
  260. package/dist/chunks/rich-text-input-CgrxAPHc.es.js.map +0 -1
  261. package/dist/chunks/select-Coyt1pJN.cjs.js +0 -2
  262. package/dist/chunks/slate-helpers-BN_9Hky2.cjs.js +0 -24
  263. package/dist/chunks/slate-helpers-BN_9Hky2.cjs.js.map +0 -1
  264. package/dist/chunks/slate-helpers-DunxggA8.es.js +0 -6919
  265. package/dist/chunks/slate-helpers-DunxggA8.es.js.map +0 -1
  266. package/dist/chunks/split-button-BYrr5vRr.cjs.js.map +0 -1
  267. package/dist/chunks/split-button-j2bgcP59.es.js.map +0 -1
  268. package/dist/chunks/tag-group-B3YSTBpb.cjs.js +0 -2
  269. package/dist/chunks/use-formatting-state-DVcnyVBl.cjs.js +0 -2
  270. package/dist/chunks/use-formatting-state-DVcnyVBl.cjs.js.map +0 -1
  271. package/dist/chunks/use-formatting-state-DdKYccZs.es.js +0 -247
  272. package/dist/chunks/use-formatting-state-DdKYccZs.es.js.map +0 -1
  273. package/dist/chunks/useSeparator-B-OtWwE7.cjs.js +0 -2
  274. package/dist/chunks/useSeparator-B-OtWwE7.cjs.js.map +0 -1
  275. package/dist/chunks/useSeparator-Dg70ACBm.es.js +0 -19
  276. package/dist/chunks/useSeparator-Dg70ACBm.es.js.map +0 -1
@@ -1,53 +0,0 @@
1
- import { jsx as c } from "react/jsx-runtime";
2
- import { useRef as d } from "react";
3
- import { mergeRefs as l } from "@chakra-ui/react";
4
- import { defineRecipe as m, createRecipeContext as p } from "@chakra-ui/react/styled-system";
5
- import { $ as h } from "./useObjectRef-CaJ5pgjX.es.js";
6
- import { $ } from "./mergeProps-B_9syxhT.es.js";
7
- import { $ as b } from "./useSeparator-Dg70ACBm.es.js";
8
- const v = /* @__PURE__ */ m({
9
- className: "nimbus-divider",
10
- // Base styles applied to all instances of the component
11
- base: {
12
- border: "0",
13
- flexShrink: "0",
14
- colorPalette: "neutral",
15
- backgroundColor: "colorPalette.6"
16
- },
17
- // Available variants for customizing the component's appearance
18
- variants: {
19
- orientation: {
20
- horizontal: {
21
- width: "100%",
22
- height: "25"
23
- },
24
- vertical: {
25
- width: "25",
26
- height: "100%"
27
- }
28
- }
29
- },
30
- // Default variant values when not explicitly specified
31
- defaultVariants: {
32
- orientation: "horizontal"
33
- }
34
- }), { withContext: x } = /* @__PURE__ */ p({ recipe: v }), R = /* @__PURE__ */ x("div"), u = (r) => {
35
- const { ref: t, as: i, orientation: e = "horizontal", ...o } = r, a = d(null), n = h(l(a, t)), f = i || e === "vertical" ? "div" : "hr", { separatorProps: s } = b({
36
- orientation: e,
37
- ...o
38
- });
39
- return /* @__PURE__ */ c(
40
- R,
41
- {
42
- as: f,
43
- ...$(o, { ref: n, orientation: e }, s, {
44
- "aria-orientation": e
45
- })
46
- }
47
- );
48
- };
49
- u.displayName = "Divider";
50
- export {
51
- u as D
52
- };
53
- //# sourceMappingURL=divider--BAm3ca4.es.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"divider--BAm3ca4.es.js","sources":["../../src/components/divider/divider.recipe.ts","../../src/components/divider/divider.slots.tsx","../../src/components/divider/divider.tsx"],"sourcesContent":["import { defineRecipe } from \"@chakra-ui/react/styled-system\";\n\n/**\n * Recipe configuration for the Divider component.\n * Defines the styling variants and base styles using Chakra UI's recipe system.\n */\nexport const dividerRecipe = defineRecipe({\n className: \"nimbus-divider\",\n\n // Base styles applied to all instances of the component\n base: {\n border: \"0\",\n flexShrink: \"0\",\n colorPalette: \"neutral\",\n backgroundColor: \"colorPalette.6\",\n },\n\n // Available variants for customizing the component's appearance\n variants: {\n orientation: {\n horizontal: {\n width: \"100%\",\n height: \"25\",\n },\n vertical: {\n width: \"25\",\n height: \"100%\",\n },\n },\n },\n\n // Default variant values when not explicitly specified\n defaultVariants: {\n orientation: \"horizontal\",\n },\n});\n","import { createRecipeContext } from \"@chakra-ui/react/styled-system\";\n\nimport { dividerRecipe } from \"./divider.recipe\";\nimport type { DividerRootProps } from \"./divider.types\";\n\nconst { withContext } = createRecipeContext({ recipe: dividerRecipe });\n\nexport const DividerRoot = withContext<HTMLDivElement, DividerRootProps>(\"div\");\n","import { useRef } from \"react\";\nimport { useSeparator, useObjectRef, mergeProps } from \"react-aria\";\nimport { mergeRefs } from \"@chakra-ui/react\";\nimport { DividerRoot } from \"./divider.slots\";\nimport type { DividerProps } from \"./divider.types\";\n\n/**\n * Divider\n * ============================================================\n * A visual separator that divides content sections\n *\n * Features:\n *\n * - allows forwarding refs to the underlying DOM element\n * - accepts all native html 'HTMLDivElement' attributes (including aria- & data-attributes)\n * - supports 'variants', 'orientation', etc. configured in the recipe\n * - allows overriding styles by using style-props\n * - supports 'asChild' and 'as' to modify the underlying html-element (polymorphic)\n * - built with React Aria for accessibility\n */\n\nexport const Divider = (props: DividerProps) => {\n const { ref: forwardedRef, as, orientation = \"horizontal\", ...rest } = props;\n\n const localRef = useRef<HTMLDivElement>(null);\n const ref = useObjectRef(mergeRefs(localRef, forwardedRef));\n\n const elementType = as || orientation === \"vertical\" ? \"div\" : \"hr\";\n\n // Use React Aria's useSeparator hook for accessibility\n const { separatorProps } = useSeparator({\n orientation,\n ...rest,\n });\n\n return (\n <DividerRoot\n as={elementType}\n {...mergeProps(rest, { ref, orientation }, separatorProps, {\n \"aria-orientation\": orientation,\n })}\n />\n );\n};\n\nDivider.displayName = \"Divider\";\n"],"names":["dividerRecipe","defineRecipe","withContext","createRecipeContext","DividerRoot","Divider","props","forwardedRef","as","orientation","rest","localRef","useRef","ref","useObjectRef","mergeRefs","elementType","separatorProps","useSeparator","jsx","mergeProps"],"mappings":";;;;;;;AAMO,MAAMA,IAAgB,gBAAAC,EAAa;AAAA,EACxC,WAAW;AAAA;AAAA,EAGX,MAAM;AAAA,IACJ,QAAQ;AAAA,IACR,YAAY;AAAA,IACZ,cAAc;AAAA,IACd,iBAAiB;AAAA,EAAA;AAAA;AAAA,EAInB,UAAU;AAAA,IACR,aAAa;AAAA,MACX,YAAY;AAAA,QACV,OAAO;AAAA,QACP,QAAQ;AAAA,MAAA;AAAA,MAEV,UAAU;AAAA,QACR,OAAO;AAAA,QACP,QAAQ;AAAA,MAAA;AAAA,IACV;AAAA,EACF;AAAA;AAAA,EAIF,iBAAiB;AAAA,IACf,aAAa;AAAA,EAAA;AAEjB,CAAC,GC9BK,EAAE,aAAAC,EAAA,IAAgB,gBAAAC,EAAoB,EAAE,QAAQH,GAAe,GAExDI,IAAc,gBAAAF,EAA8C,KAAK,GCcjEG,IAAU,CAACC,MAAwB;AAC9C,QAAM,EAAE,KAAKC,GAAc,IAAAC,GAAI,aAAAC,IAAc,cAAc,GAAGC,MAASJ,GAEjEK,IAAWC,EAAuB,IAAI,GACtCC,IAAMC,EAAaC,EAAUJ,GAAUJ,CAAY,CAAC,GAEpDS,IAAcR,KAAMC,MAAgB,aAAa,QAAQ,MAGzD,EAAE,gBAAAQ,EAAA,IAAmBC,EAAa;AAAA,IACtC,aAAAT;AAAA,IACA,GAAGC;AAAA,EAAA,CACJ;AAED,SACE,gBAAAS;AAAA,IAACf;AAAA,IAAA;AAAA,MACC,IAAIY;AAAA,MACH,GAAGI,EAAWV,GAAM,EAAE,KAAAG,GAAK,aAAAJ,EAAA,GAAeQ,GAAgB;AAAA,QACzD,oBAAoBR;AAAA,MAAA,CACrB;AAAA,IAAA;AAAA,EAAA;AAGP;AAEAJ,EAAQ,cAAc;"}
@@ -1,2 +0,0 @@
1
- "use strict";const l=require("react/jsx-runtime"),u=require("react"),p=require("@chakra-ui/react"),r=require("@chakra-ui/react/styled-system"),h=require("./useObjectRef-dXOJdONs.cjs.js"),b=require("./mergeProps-BA5Cwf5w.cjs.js"),v=require("./useSeparator-B-OtWwE7.cjs.js"),R=r.defineRecipe({className:"nimbus-divider",base:{border:"0",flexShrink:"0",colorPalette:"neutral",backgroundColor:"colorPalette.6"},variants:{orientation:{horizontal:{width:"100%",height:"25"},vertical:{width:"25",height:"100%"}}},defaultVariants:{orientation:"horizontal"}}),{withContext:$}=r.createRecipeContext({recipe:R}),m=$("div"),i=o=>{const{ref:n,as:a,orientation:e="horizontal",...t}=o,s=u.useRef(null),c=h.$df56164dff5785e2$export$4338b53315abf666(p.mergeRefs(s,n)),d=a||e==="vertical"?"div":"hr",{separatorProps:f}=v.$f4b273590fab9f93$export$52210f68a14655d0({orientation:e,...t});return l.jsx(m,{as:d,...b.$3ef42575df84b30b$export$9d1611c77c2fe928(t,{ref:c,orientation:e},f,{"aria-orientation":e})})};i.displayName="Divider";exports.Divider=i;
2
- //# sourceMappingURL=divider-BuizjeAj.cjs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"divider-BuizjeAj.cjs.js","sources":["../../src/components/divider/divider.recipe.ts","../../src/components/divider/divider.slots.tsx","../../src/components/divider/divider.tsx"],"sourcesContent":["import { defineRecipe } from \"@chakra-ui/react/styled-system\";\n\n/**\n * Recipe configuration for the Divider component.\n * Defines the styling variants and base styles using Chakra UI's recipe system.\n */\nexport const dividerRecipe = defineRecipe({\n className: \"nimbus-divider\",\n\n // Base styles applied to all instances of the component\n base: {\n border: \"0\",\n flexShrink: \"0\",\n colorPalette: \"neutral\",\n backgroundColor: \"colorPalette.6\",\n },\n\n // Available variants for customizing the component's appearance\n variants: {\n orientation: {\n horizontal: {\n width: \"100%\",\n height: \"25\",\n },\n vertical: {\n width: \"25\",\n height: \"100%\",\n },\n },\n },\n\n // Default variant values when not explicitly specified\n defaultVariants: {\n orientation: \"horizontal\",\n },\n});\n","import { createRecipeContext } from \"@chakra-ui/react/styled-system\";\n\nimport { dividerRecipe } from \"./divider.recipe\";\nimport type { DividerRootProps } from \"./divider.types\";\n\nconst { withContext } = createRecipeContext({ recipe: dividerRecipe });\n\nexport const DividerRoot = withContext<HTMLDivElement, DividerRootProps>(\"div\");\n","import { useRef } from \"react\";\nimport { useSeparator, useObjectRef, mergeProps } from \"react-aria\";\nimport { mergeRefs } from \"@chakra-ui/react\";\nimport { DividerRoot } from \"./divider.slots\";\nimport type { DividerProps } from \"./divider.types\";\n\n/**\n * Divider\n * ============================================================\n * A visual separator that divides content sections\n *\n * Features:\n *\n * - allows forwarding refs to the underlying DOM element\n * - accepts all native html 'HTMLDivElement' attributes (including aria- & data-attributes)\n * - supports 'variants', 'orientation', etc. configured in the recipe\n * - allows overriding styles by using style-props\n * - supports 'asChild' and 'as' to modify the underlying html-element (polymorphic)\n * - built with React Aria for accessibility\n */\n\nexport const Divider = (props: DividerProps) => {\n const { ref: forwardedRef, as, orientation = \"horizontal\", ...rest } = props;\n\n const localRef = useRef<HTMLDivElement>(null);\n const ref = useObjectRef(mergeRefs(localRef, forwardedRef));\n\n const elementType = as || orientation === \"vertical\" ? \"div\" : \"hr\";\n\n // Use React Aria's useSeparator hook for accessibility\n const { separatorProps } = useSeparator({\n orientation,\n ...rest,\n });\n\n return (\n <DividerRoot\n as={elementType}\n {...mergeProps(rest, { ref, orientation }, separatorProps, {\n \"aria-orientation\": orientation,\n })}\n />\n );\n};\n\nDivider.displayName = \"Divider\";\n"],"names":["dividerRecipe","defineRecipe","withContext","createRecipeContext","DividerRoot","Divider","props","forwardedRef","as","orientation","rest","localRef","useRef","ref","useObjectRef","mergeRefs","elementType","separatorProps","useSeparator","jsx","mergeProps"],"mappings":"iRAMaA,EAAgBC,EAAAA,aAAa,CACxC,UAAW,iBAGX,KAAM,CACJ,OAAQ,IACR,WAAY,IACZ,aAAc,UACd,gBAAiB,gBAAA,EAInB,SAAU,CACR,YAAa,CACX,WAAY,CACV,MAAO,OACP,OAAQ,IAAA,EAEV,SAAU,CACR,MAAO,KACP,OAAQ,MAAA,CACV,CACF,EAIF,gBAAiB,CACf,YAAa,YAAA,CAEjB,CAAC,EC9BK,CAAE,YAAAC,CAAA,EAAgBC,EAAAA,oBAAoB,CAAE,OAAQH,EAAe,EAExDI,EAAcF,EAA8C,KAAK,ECcjEG,EAAWC,GAAwB,CAC9C,KAAM,CAAE,IAAKC,EAAc,GAAAC,EAAI,YAAAC,EAAc,aAAc,GAAGC,GAASJ,EAEjEK,EAAWC,EAAAA,OAAuB,IAAI,EACtCC,EAAMC,EAAAA,0CAAaC,EAAAA,UAAUJ,EAAUJ,CAAY,CAAC,EAEpDS,EAAcR,GAAMC,IAAgB,WAAa,MAAQ,KAGzD,CAAE,eAAAQ,CAAA,EAAmBC,4CAAa,CACtC,YAAAT,EACA,GAAGC,CAAA,CACJ,EAED,OACES,EAAAA,IAACf,EAAA,CACC,GAAIY,EACH,GAAGI,EAAAA,0CAAWV,EAAM,CAAE,IAAAG,EAAK,YAAAJ,CAAA,EAAeQ,EAAgB,CACzD,mBAAoBR,CAAA,CACrB,CAAA,CAAA,CAGP,EAEAJ,EAAQ,YAAc"}
@@ -1,157 +0,0 @@
1
- import { jsx as e, jsxs as M, Fragment as K } from "react/jsx-runtime";
2
- import { createSlotRecipeContext as L, useSlotRecipe as j } from "@chakra-ui/react/styled-system";
3
- import { h as E, $ as O, i as k, j as V, k as W, l as q } from "./Dialog-BeQ6Z6l2.es.js";
4
- import { m as z } from "./index-jAeaCpRm.es.js";
5
- import { createContext as f, useContext as A } from "react";
6
- import { a as B } from "./Button-CNBS3n5a.es.js";
7
- import { e as u } from "./extractStyleProps-vA4cNUoc.es.js";
8
- import { ChevronRight as D } from "@commercetools/nimbus-icons";
9
- import { I as G } from "./icon-BoRbJStV.es.js";
10
- import { e as H, d as J } from "./Separator-3-E2tRbk.es.js";
11
- import { n as Q } from "./SelectionManager-CLyu96pU.es.js";
12
- const { withProvider: U, withContext: a } = /* @__PURE__ */ L({
13
- recipe: z
14
- }), X = /* @__PURE__ */ U(
15
- "div",
16
- "root"
17
- ), h = /* @__PURE__ */ a("button", "trigger"), Y = /* @__PURE__ */ a("div", "popover"), Z = /* @__PURE__ */ a("div", "content"), _ = /* @__PURE__ */ a(
18
- "div",
19
- "item"
20
- ), ee = /* @__PURE__ */ a("div", "separator"), te = /* @__PURE__ */ a("div", "section"), oe = /* @__PURE__ */ a("div", "sectionLabel"), S = /* @__PURE__ */ f(void 0), ne = S.Provider, $ = () => A(S), g = (t) => {
21
- const o = j({ key: "menu" }), [r, n] = o.splitVariantProps(t), {
22
- children: s,
23
- trigger: c,
24
- isOpen: i,
25
- defaultOpen: l,
26
- onOpenChange: d,
27
- ...p
28
- } = n;
29
- return /* @__PURE__ */ e(X, { ...r, asChild: !0, children: /* @__PURE__ */ e(E, { ...{
30
- trigger: c,
31
- isOpen: i,
32
- defaultOpen: l,
33
- onOpenChange: d
34
- }, children: /* @__PURE__ */ e(ne, { value: p, children: s }) }) });
35
- };
36
- g.displayName = "Menu.Root";
37
- const P = ({
38
- children: t,
39
- asChild: o,
40
- ref: r,
41
- ...n
42
- }) => {
43
- const [s, c] = u(n);
44
- return o ? /* @__PURE__ */ e(h, { ref: r, asChild: !0, ...s, children: t }) : /* @__PURE__ */ e(h, { asChild: !0, ...s, children: /* @__PURE__ */ e(B, { ref: r, ...c, children: t }) });
45
- };
46
- P.displayName = "Menu.Trigger";
47
- const re = /* @__PURE__ */ f(
48
- void 0
49
- ), x = re.Provider, m = ({
50
- children: t,
51
- placement: o,
52
- ref: r
53
- }) => {
54
- const n = $();
55
- if (!n)
56
- throw new Error("Menu.Content must be used within Menu.Root");
57
- const { placement: s, ...c } = n, i = o || s || "bottom start";
58
- return /* @__PURE__ */ e(x, { value: { selectionMode: c.selectionMode }, children: /* @__PURE__ */ e(Y, { asChild: !0, children: /* @__PURE__ */ e(O, { placement: i, offset: 4, shouldFlip: !0, children: /* @__PURE__ */ e(Z, { asChild: !0, children: /* @__PURE__ */ e(k, { ref: r, shouldFocusWrap: !0, autoFocus: "first", ...c, children: t }) }) }) }) });
59
- };
60
- m.displayName = "Menu.Content";
61
- const C = ({
62
- children: t,
63
- isCritical: o,
64
- ref: r,
65
- ...n
66
- }) => {
67
- const [s, c] = u(n);
68
- return /* @__PURE__ */ e(
69
- _,
70
- {
71
- asChild: !0,
72
- ...s,
73
- "data-critical": o ? "" : void 0,
74
- children: /* @__PURE__ */ e(V, { ref: r, ...c, children: ({ hasSubmenu: i }) => /* @__PURE__ */ M(K, { children: [
75
- t,
76
- i && /* @__PURE__ */ e(G, { slot: "caretIcon", children: /* @__PURE__ */ e(D, {}) })
77
- ] }) })
78
- }
79
- );
80
- };
81
- C.displayName = "Menu.Item";
82
- const v = ({ ref: t, ...o }) => {
83
- const [r, n] = u(o);
84
- return /* @__PURE__ */ e(ee, { asChild: !0, ...r, children: /* @__PURE__ */ e(H, { ref: t, ...n }) });
85
- };
86
- v.displayName = "Menu.Separator";
87
- const y = ({
88
- children: t,
89
- ref: o,
90
- ...r
91
- }) => {
92
- const [n, s] = u(r);
93
- return /* @__PURE__ */ e(oe, { asChild: !0, ...n, children: /* @__PURE__ */ e(J, { ref: o, ...s, children: t }) });
94
- };
95
- y.displayName = "Menu.SectionLabel";
96
- const N = ({
97
- children: t,
98
- ref: o,
99
- label: r,
100
- items: n,
101
- ...s
102
- }) => {
103
- const c = $(), {
104
- selectionMode: i = c?.selectionMode,
105
- selectedKeys: l = c?.selectedKeys,
106
- defaultSelectedKeys: d = c?.defaultSelectedKeys,
107
- onSelectionChange: p = c?.onSelectionChange,
108
- disallowEmptySelection: b = c?.disallowEmptySelection,
109
- ...w
110
- } = s, [I, F] = u(w);
111
- return /* @__PURE__ */ e(x, { value: { selectionMode: i }, children: /* @__PURE__ */ e(te, { asChild: !0, ...I, children: /* @__PURE__ */ M(
112
- W,
113
- {
114
- ref: o,
115
- selectionMode: i,
116
- selectedKeys: l,
117
- defaultSelectedKeys: d,
118
- onSelectionChange: p,
119
- disallowEmptySelection: b,
120
- ...F,
121
- children: [
122
- /* @__PURE__ */ e(y, { children: r }),
123
- n ? /* @__PURE__ */ e(Q, { items: n, children: t }) : t
124
- ]
125
- }
126
- ) }) });
127
- };
128
- N.displayName = "Menu.Section";
129
- const R = ({
130
- children: t,
131
- ...o
132
- }) => /* @__PURE__ */ e(q, { ...o, children: t });
133
- R.displayName = "Menu.SubmenuTrigger";
134
- const T = ({ children: t, ...o }) => /* @__PURE__ */ e(m, { ...o, placement: "end", children: t });
135
- T.displayName = "Menu.Submenu";
136
- const Me = {
137
- Root: g,
138
- Trigger: P,
139
- Content: m,
140
- Item: C,
141
- Separator: v,
142
- Section: N,
143
- Submenu: T,
144
- SubmenuTrigger: R
145
- };
146
- export {
147
- Me as M,
148
- g as a,
149
- P as b,
150
- m as c,
151
- C as d,
152
- v as e,
153
- N as f,
154
- R as g,
155
- T as h
156
- };
157
- //# sourceMappingURL=menu-8g9Hn1nm.es.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"menu-8g9Hn1nm.es.js","sources":["../../src/components/menu/menu.slots.tsx","../../src/components/menu/components/menu.context.tsx","../../src/components/menu/components/menu.root.tsx","../../src/components/menu/components/menu.trigger.tsx","../../src/components/menu/components/menu.section-context.tsx","../../src/components/menu/components/menu.content.tsx","../../src/components/menu/components/menu.item.tsx","../../src/components/menu/components/menu.separator.tsx","../../src/components/menu/components/menu.section-label.tsx","../../src/components/menu/components/menu.section.tsx","../../src/components/menu/components/menu.submenu-trigger.tsx","../../src/components/menu/components/menu.submenu.tsx","../../src/components/menu/menu.tsx"],"sourcesContent":["import {\n createSlotRecipeContext,\n type HTMLChakraProps,\n} from \"@chakra-ui/react/styled-system\";\nimport { menuSlotRecipe } from \"./menu.recipe\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n recipe: menuSlotRecipe,\n});\n\n// Menu Root\nexport type MenuRootSlotProps = HTMLChakraProps<\"div\">;\nexport const MenuRootSlot = withProvider<HTMLDivElement, MenuRootSlotProps>(\n \"div\",\n \"root\"\n);\n\n// Menu Trigger\nexport type MenuTriggerSlotProps = HTMLChakraProps<\"button\">;\nexport const MenuTriggerSlot = withContext<\n HTMLButtonElement,\n MenuTriggerSlotProps\n>(\"button\", \"trigger\");\n\n// Menu Popover\nexport type MenuPopoverSlotProps = HTMLChakraProps<\"div\">;\nexport const MenuPopoverSlot = withContext<\n HTMLDivElement,\n MenuPopoverSlotProps\n>(\"div\", \"popover\");\n\n// Menu Content\nexport type MenuContentSlotProps = HTMLChakraProps<\"div\">;\nexport const MenuContentSlot = withContext<\n HTMLDivElement,\n MenuContentSlotProps\n>(\"div\", \"content\");\n\n// Menu Item\nexport type MenuItemSlotProps = HTMLChakraProps<\"div\">;\nexport const MenuItemSlot = withContext<HTMLDivElement, MenuItemSlotProps>(\n \"div\",\n \"item\"\n);\n\n// Menu Separator\nexport type MenuSeparatorSlotProps = HTMLChakraProps<\"div\">;\nexport const MenuSeparatorSlot = withContext<\n HTMLDivElement,\n MenuSeparatorSlotProps\n>(\"div\", \"separator\");\n\n// Menu Section\nexport type MenuSectionSlotProps = HTMLChakraProps<\"div\">;\nexport const MenuSectionSlot = withContext<\n HTMLDivElement,\n MenuSectionSlotProps\n>(\"div\", \"section\");\n\n// Menu Section Label\nexport type MenuSectionLabelSlotProps = HTMLChakraProps<\"div\">;\nexport const MenuSectionLabelSlot = withContext<\n HTMLDivElement,\n MenuSectionLabelSlotProps\n>(\"div\", \"sectionLabel\");\n\n// Menu Group Label\nexport type MenuSubmenuSlotProps = HTMLChakraProps<\"div\">;\nexport const MenuSubmenuSlot = withContext<\n HTMLDivElement,\n MenuSubmenuSlotProps\n>(\"div\", \"submenu\");\n","import { createContext, useContext } from \"react\";\nimport type { MenuRootProps } from \"./../menu.types\";\nimport type { MenuTriggerProps as RaMenuTriggerProps } from \"react-aria-components\";\n\n// Context should contain all Menu props (excluding MenuTrigger-specific props)\nexport type MenuContextValue = Omit<\n MenuRootProps,\n keyof RaMenuTriggerProps | \"children\" | \"trigger\"\n>;\n\nconst MenuContext = createContext<MenuContextValue | undefined>(undefined);\n\nexport const MenuProvider = MenuContext.Provider;\n\nexport const useMenuContext = () => {\n const context = useContext(MenuContext);\n return context;\n};\n","import { useSlotRecipe } from \"@chakra-ui/react/styled-system\";\nimport { MenuTrigger as RaMenuTrigger } from \"react-aria-components\";\nimport type { MenuRootProps } from \"../menu.types\";\nimport { MenuRootSlot } from \"../menu.slots\";\nimport { MenuProvider } from \"./menu.context\";\n\nexport const MenuRoot = (props: MenuRootProps) => {\n const recipe = useSlotRecipe({ key: \"menu\" });\n const [recipeProps, functionalProps] = recipe.splitVariantProps(props);\n\n // Separate MenuTrigger props from Menu props\n const {\n children,\n trigger,\n isOpen,\n defaultOpen,\n onOpenChange,\n ...menuContextProps\n } = functionalProps;\n\n const menuTriggerProps = {\n trigger,\n isOpen,\n defaultOpen,\n onOpenChange,\n };\n\n return (\n <MenuRootSlot {...recipeProps} asChild>\n <RaMenuTrigger {...menuTriggerProps}>\n <MenuProvider value={menuContextProps}>{children}</MenuProvider>\n </RaMenuTrigger>\n </MenuRootSlot>\n );\n};\n\nMenuRoot.displayName = \"Menu.Root\";\n","import { Button } from \"react-aria-components\";\nimport { MenuTriggerSlot } from \"../menu.slots\";\nimport type { MenuTriggerProps } from \"../menu.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\nimport type { ReactNode } from \"react\";\n\nexport const MenuTrigger = ({\n children,\n asChild,\n ref,\n ...props\n}: MenuTriggerProps) => {\n const [styleProps, restProps] = extractStyleProps(props);\n\n /**\n * The user supplied a Button as the trigger\n */\n if (asChild) {\n // When asChild is true, apply styles to the child element\n return (\n <MenuTriggerSlot ref={ref} asChild {...styleProps}>\n {children as ReactNode}\n </MenuTriggerSlot>\n );\n }\n\n /**\n * The user did not supply a Button as trigger, use an unstyled button\n * to wrap which ever element the user supplied and make it a trigger\n */\n return (\n <MenuTriggerSlot asChild {...styleProps}>\n <Button ref={ref} {...restProps}>\n {children}\n </Button>\n </MenuTriggerSlot>\n );\n};\n\nMenuTrigger.displayName = \"Menu.Trigger\";\n","import { createContext, useContext } from \"react\";\n\nexport interface MenuSectionContextValue {\n selectionMode?: \"single\" | \"multiple\" | \"none\";\n}\n/**\n * Why is a second context (MenuSectionContext) needed?\n *\n * MenuSectionContext enables section-level config for menu items, such as\n * selection mode, which may differ from the global menu context. This allows\n * advanced menus where each section can have its own selection behavior\n * (e.g., one section is single-select, another is multi-select).\n * By scoping context to a section, menu items inherit settings from their\n * nearest section, falling back to the global menu context if not present.\n * This pattern improves flexibility and composability for complex menus,\n * and avoids prop drilling or awkward prop merging.\n */\n\nconst MenuSectionContext = createContext<MenuSectionContextValue | undefined>(\n undefined\n);\n\nexport const MenuSectionProvider = MenuSectionContext.Provider;\n\nexport const useMenuSectionContext = () => {\n return useContext(MenuSectionContext);\n};\n","import { Menu, Popover } from \"react-aria-components\";\nimport { MenuContentSlot, MenuPopoverSlot } from \"../menu.slots\";\nimport type { MenuContentProps } from \"../menu.types\";\nimport { useMenuContext } from \"./menu.context\";\nimport { MenuSectionProvider } from \"./menu.section-context\";\n\nexport const MenuContent = ({\n children,\n placement: placementOverride,\n ref,\n}: MenuContentProps) => {\n const contextProps = useMenuContext();\n\n if (!contextProps) {\n throw new Error(\"Menu.Content must be used within Menu.Root\");\n }\n\n // Separate placement from other props since it's handled by Popover\n const { placement, ...menuProps } = contextProps;\n const finalPlacement = placementOverride || placement || \"bottom start\";\n\n return (\n <MenuSectionProvider value={{ selectionMode: menuProps.selectionMode }}>\n <MenuPopoverSlot asChild>\n <Popover placement={finalPlacement} offset={4} shouldFlip>\n <MenuContentSlot asChild>\n <Menu ref={ref} shouldFocusWrap autoFocus=\"first\" {...menuProps}>\n {children}\n </Menu>\n </MenuContentSlot>\n </Popover>\n </MenuPopoverSlot>\n </MenuSectionProvider>\n );\n};\n\nMenuContent.displayName = \"Menu.Content\";\n","import { MenuItem as RaMenuItem } from \"react-aria-components\";\nimport { MenuItemSlot } from \"../menu.slots\";\nimport type { MenuItemProps } from \"../menu.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\nimport { ChevronRight } from \"@commercetools/nimbus-icons\";\nimport { Icon } from \"@/components/icon\";\n\nexport const MenuItem = ({\n children,\n isCritical,\n ref,\n ...props\n}: MenuItemProps) => {\n const [styleProps, restProps] = extractStyleProps(props);\n\n return (\n <MenuItemSlot\n asChild\n {...styleProps}\n data-critical={isCritical ? \"\" : undefined}\n >\n <RaMenuItem ref={ref} {...restProps}>\n {({ hasSubmenu }) => (\n <>\n {children}\n {hasSubmenu && (\n <Icon slot=\"caretIcon\">\n <ChevronRight />\n </Icon>\n )}\n </>\n )}\n </RaMenuItem>\n </MenuItemSlot>\n );\n};\n\nMenuItem.displayName = \"Menu.Item\";\n","import { Separator } from \"react-aria-components\";\nimport { MenuSeparatorSlot } from \"../menu.slots\";\nimport type { MenuSeparatorProps } from \"../menu.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\n\nexport const MenuSeparator = ({ ref, ...props }: MenuSeparatorProps) => {\n const [styleProps, restProps] = extractStyleProps(props);\n\n return (\n <MenuSeparatorSlot asChild {...styleProps}>\n <Separator ref={ref} {...restProps} />\n </MenuSeparatorSlot>\n );\n};\n\nMenuSeparator.displayName = \"Menu.Separator\";\n","import { Header } from \"react-aria-components\";\nimport { MenuSectionLabelSlot } from \"../menu.slots\";\nimport type { MenuSectionLabelProps } from \"../menu.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\n\n/**\n * Used in MenuSection for rendering the `label` property.\n */\nexport const MenuSectionLabel = ({\n children,\n ref,\n ...props\n}: MenuSectionLabelProps) => {\n const [styleProps, restProps] = extractStyleProps(props);\n\n return (\n <MenuSectionLabelSlot asChild {...styleProps}>\n <Header ref={ref} {...restProps}>\n {children}\n </Header>\n </MenuSectionLabelSlot>\n );\n};\n\nMenuSectionLabel.displayName = \"Menu.SectionLabel\";\n","import {\n MenuSection as RaMenuSection,\n Collection,\n} from \"react-aria-components\";\nimport { MenuSectionSlot } from \"../menu.slots\";\nimport type { MenuSectionProps } from \"../menu.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\nimport { useMenuContext } from \"./menu.context\";\nimport { MenuSectionProvider } from \"./menu.section-context\";\nimport { MenuSectionLabel } from \"./menu.section-label\";\nimport type { ReactNode } from \"react\";\n\nexport const MenuSection = <T extends object = object>({\n children,\n ref,\n label,\n items,\n ...props\n}: MenuSectionProps<T>) => {\n const contextProps = useMenuContext();\n\n // Extract selection-related props before extracting style props\n const {\n selectionMode = contextProps?.selectionMode,\n selectedKeys = contextProps?.selectedKeys,\n defaultSelectedKeys = contextProps?.defaultSelectedKeys,\n onSelectionChange = contextProps?.onSelectionChange,\n disallowEmptySelection = contextProps?.disallowEmptySelection,\n ...restProps\n } = props;\n\n const [styleProps, otherProps] = extractStyleProps(restProps);\n\n return (\n <MenuSectionProvider value={{ selectionMode }}>\n <MenuSectionSlot asChild {...styleProps}>\n <RaMenuSection\n ref={ref}\n selectionMode={selectionMode}\n selectedKeys={selectedKeys}\n defaultSelectedKeys={defaultSelectedKeys}\n onSelectionChange={onSelectionChange}\n disallowEmptySelection={disallowEmptySelection}\n {...otherProps}\n >\n <MenuSectionLabel>{label}</MenuSectionLabel>\n {items ? (\n <Collection items={items}>{children}</Collection>\n ) : (\n (children as ReactNode)\n )}\n </RaMenuSection>\n </MenuSectionSlot>\n </MenuSectionProvider>\n );\n};\n\nMenuSection.displayName = \"Menu.Section\";\n","import { SubmenuTrigger as RaSubmenuTrigger } from \"react-aria-components\";\nimport type { MenuSubmenuTriggerProps } from \"../menu.types\";\n\nexport const MenuSubmenuTrigger = ({\n children,\n ...props\n}: MenuSubmenuTriggerProps) => {\n return <RaSubmenuTrigger {...props}>{children}</RaSubmenuTrigger>;\n};\n\nMenuSubmenuTrigger.displayName = \"Menu.SubmenuTrigger\";\n","import type { MenuSubmenuProps } from \"../menu.types\";\nimport { MenuContent } from \"./menu.content\";\n\nexport const MenuSubmenu = ({ children, ...props }: MenuSubmenuProps) => {\n return (\n <MenuContent {...props} placement=\"end\">\n {children}\n </MenuContent>\n );\n};\n\nMenuSubmenu.displayName = \"Menu.Submenu\";\n","import { MenuRoot } from \"./components/menu.root\";\nimport { MenuTrigger } from \"./components/menu.trigger\";\nimport { MenuContent } from \"./components/menu.content\";\nimport { MenuItem } from \"./components/menu.item\";\nimport { MenuSeparator } from \"./components/menu.separator\";\nimport { MenuSection } from \"./components/menu.section\";\nimport { MenuSubmenuTrigger } from \"./components/menu.submenu-trigger\";\nimport { MenuSubmenu } from \"./components/menu.submenu\";\n\n// Re-export types\nexport type * from \"./menu.types\";\n\nexport const Menu = {\n Root: MenuRoot,\n Trigger: MenuTrigger,\n Content: MenuContent,\n Item: MenuItem,\n Separator: MenuSeparator,\n Section: MenuSection,\n Submenu: MenuSubmenu,\n SubmenuTrigger: MenuSubmenuTrigger,\n};\n\n// Exports for internal use by react-docgen\nexport {\n MenuRoot as _MenuRoot,\n MenuTrigger as _MenuTrigger,\n MenuContent as _MenuContent,\n MenuItem as _MenuItem,\n MenuSeparator as _MenuSeparator,\n MenuSection as _MenuSection,\n MenuSubmenuTrigger as _MenuSubmenuTrigger,\n MenuSubmenu as _MenuSubmenu,\n};\n"],"names":["withProvider","withContext","createSlotRecipeContext","menuSlotRecipe","MenuRootSlot","MenuTriggerSlot","MenuPopoverSlot","MenuContentSlot","MenuItemSlot","MenuSeparatorSlot","MenuSectionSlot","MenuSectionLabelSlot","MenuContext","createContext","MenuProvider","useMenuContext","useContext","MenuRoot","props","recipe","useSlotRecipe","recipeProps","functionalProps","children","trigger","isOpen","defaultOpen","onOpenChange","menuContextProps","jsx","RaMenuTrigger","MenuTrigger","asChild","ref","styleProps","restProps","extractStyleProps","Button","MenuSectionContext","MenuSectionProvider","MenuContent","placementOverride","contextProps","placement","menuProps","finalPlacement","Popover","Menu","MenuItem","isCritical","RaMenuItem","hasSubmenu","jsxs","Fragment","Icon","ChevronRight","MenuSeparator","Separator","MenuSectionLabel","Header","MenuSection","label","items","selectionMode","selectedKeys","defaultSelectedKeys","onSelectionChange","disallowEmptySelection","otherProps","RaMenuSection","Collection","MenuSubmenuTrigger","RaSubmenuTrigger","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,SAASa;AAAA,EACT,gBAAgBF;AAClB;"}
@@ -1,2 +0,0 @@
1
- "use strict";const e=require("react/jsx-runtime"),f=require("@chakra-ui/react/styled-system"),l=require("./Dialog-CYa26HlL.cjs.js"),K=require("./index-C8Yrk__l.cjs.js"),b=require("react"),L=require("./Button-BtJHe9xY.cjs.js"),a=require("./extractStyleProps-CZpHKp1I.cjs.js"),E=require("@commercetools/nimbus-icons"),O=require("./icon-Cny8ZtnX.cjs.js"),v=require("./Separator-CAOg-vqY.cjs.js"),k=require("./SelectionManager-Mrwf4SFv.cjs.js"),{withProvider:B,withContext:u}=f.createSlotRecipeContext({recipe:K.menuSlotRecipe}),D=B("div","root"),C=u("button","trigger"),V=u("div","popover"),W=u("div","content"),z=u("div","item"),A=u("div","separator"),G=u("div","section"),H=u("div","sectionLabel"),R=b.createContext(void 0),J=R.Provider,q=()=>b.useContext(R),m=t=>{const n=f.useSlotRecipe({key:"menu"}),[r,o]=n.splitVariantProps(t),{children:c,trigger:s,isOpen:i,defaultOpen:p,onOpenChange:x,...S}=o,M={trigger:s,isOpen:i,defaultOpen:p,onOpenChange:x};return e.jsx(D,{...r,asChild:!0,children:e.jsx(l.$3674c52c6b3c5bce$export$27d2ad3c5815583e,{...M,children:e.jsx(J,{value:S,children:c})})})};m.displayName="Menu.Root";const h=({children:t,asChild:n,ref:r,...o})=>{const[c,s]=a.extractStyleProps(o);return n?e.jsx(C,{ref:r,asChild:!0,...c,children:t}):e.jsx(C,{asChild:!0,...c,children:e.jsx(L.$d2b4bc8c273e7be6$export$353f5b6fc5456de1,{ref:r,...s,children:t})})};h.displayName="Menu.Trigger";const Q=b.createContext(void 0),T=Q.Provider,d=({children:t,placement:n,ref:r})=>{const o=q();if(!o)throw new Error("Menu.Content must be used within Menu.Root");const{placement:c,...s}=o,i=n||c||"bottom start";return e.jsx(T,{value:{selectionMode:s.selectionMode},children:e.jsx(V,{asChild:!0,children:e.jsx(l.$07b14b47974efb58$export$5b6b19405a83ff9d,{placement:i,offset:4,shouldFlip:!0,children:e.jsx(W,{asChild:!0,children:e.jsx(l.$3674c52c6b3c5bce$export$d9b273488cd8ce6f,{ref:r,shouldFocusWrap:!0,autoFocus:"first",...s,children:t})})})})})};d.displayName="Menu.Content";const P=({children:t,isCritical:n,ref:r,...o})=>{const[c,s]=a.extractStyleProps(o);return e.jsx(z,{asChild:!0,...c,"data-critical":n?"":void 0,children:e.jsx(l.$3674c52c6b3c5bce$export$2ce376c2cc3355c8,{ref:r,...s,children:({hasSubmenu:i})=>e.jsxs(e.Fragment,{children:[t,i&&e.jsx(O.Icon,{slot:"caretIcon",children:e.jsx(E.ChevronRight,{})})]})})})};P.displayName="Menu.Item";const g=({ref:t,...n})=>{const[r,o]=a.extractStyleProps(n);return e.jsx(A,{asChild:!0,...r,children:e.jsx(v.$431f98aba6844401$export$1ff3c3f08ae963c0,{ref:t,...o})})};g.displayName="Menu.Separator";const N=({children:t,ref:n,...r})=>{const[o,c]=a.extractStyleProps(r);return e.jsx(H,{asChild:!0,...o,children:e.jsx(v.$72a5793c14baf454$export$8b251419efc915eb,{ref:n,...c,children:t})})};N.displayName="Menu.SectionLabel";const $=({children:t,ref:n,label:r,items:o,...c})=>{const s=q(),{selectionMode:i=s?.selectionMode,selectedKeys:p=s?.selectedKeys,defaultSelectedKeys:x=s?.defaultSelectedKeys,onSelectionChange:S=s?.onSelectionChange,disallowEmptySelection:M=s?.disallowEmptySelection,...I}=c,[w,F]=a.extractStyleProps(I);return e.jsx(T,{value:{selectionMode:i},children:e.jsx(G,{asChild:!0,...w,children:e.jsxs(l.$3674c52c6b3c5bce$export$4b1545b4f2016d26,{ref:n,selectionMode:i,selectedKeys:p,defaultSelectedKeys:x,onSelectionChange:S,disallowEmptySelection:M,...F,children:[e.jsx(N,{children:r}),o?e.jsx(k.$e1995378a142960e$export$fb8073518f34e6ec,{items:o,children:t}):t]})})})};$.displayName="Menu.Section";const y=({children:t,...n})=>e.jsx(l.$3674c52c6b3c5bce$export$ecabc99eeffab7ca,{...n,children:t});y.displayName="Menu.SubmenuTrigger";const j=({children:t,...n})=>e.jsx(d,{...n,placement:"end",children:t});j.displayName="Menu.Submenu";const U={Root:m,Trigger:h,Content:d,Item:P,Separator:g,Section:$,Submenu:j,SubmenuTrigger:y};exports.Menu=U;exports.MenuContent=d;exports.MenuItem=P;exports.MenuRoot=m;exports.MenuSection=$;exports.MenuSeparator=g;exports.MenuSubmenu=j;exports.MenuSubmenuTrigger=y;exports.MenuTrigger=h;
2
- //# sourceMappingURL=menu-Bm1u-R6o.cjs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"menu-Bm1u-R6o.cjs.js","sources":["../../src/components/menu/menu.slots.tsx","../../src/components/menu/components/menu.context.tsx","../../src/components/menu/components/menu.root.tsx","../../src/components/menu/components/menu.trigger.tsx","../../src/components/menu/components/menu.section-context.tsx","../../src/components/menu/components/menu.content.tsx","../../src/components/menu/components/menu.item.tsx","../../src/components/menu/components/menu.separator.tsx","../../src/components/menu/components/menu.section-label.tsx","../../src/components/menu/components/menu.section.tsx","../../src/components/menu/components/menu.submenu-trigger.tsx","../../src/components/menu/components/menu.submenu.tsx","../../src/components/menu/menu.tsx"],"sourcesContent":["import {\n createSlotRecipeContext,\n type HTMLChakraProps,\n} from \"@chakra-ui/react/styled-system\";\nimport { menuSlotRecipe } from \"./menu.recipe\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n recipe: menuSlotRecipe,\n});\n\n// Menu Root\nexport type MenuRootSlotProps = HTMLChakraProps<\"div\">;\nexport const MenuRootSlot = withProvider<HTMLDivElement, MenuRootSlotProps>(\n \"div\",\n \"root\"\n);\n\n// Menu Trigger\nexport type MenuTriggerSlotProps = HTMLChakraProps<\"button\">;\nexport const MenuTriggerSlot = withContext<\n HTMLButtonElement,\n MenuTriggerSlotProps\n>(\"button\", \"trigger\");\n\n// Menu Popover\nexport type MenuPopoverSlotProps = HTMLChakraProps<\"div\">;\nexport const MenuPopoverSlot = withContext<\n HTMLDivElement,\n MenuPopoverSlotProps\n>(\"div\", \"popover\");\n\n// Menu Content\nexport type MenuContentSlotProps = HTMLChakraProps<\"div\">;\nexport const MenuContentSlot = withContext<\n HTMLDivElement,\n MenuContentSlotProps\n>(\"div\", \"content\");\n\n// Menu Item\nexport type MenuItemSlotProps = HTMLChakraProps<\"div\">;\nexport const MenuItemSlot = withContext<HTMLDivElement, MenuItemSlotProps>(\n \"div\",\n \"item\"\n);\n\n// Menu Separator\nexport type MenuSeparatorSlotProps = HTMLChakraProps<\"div\">;\nexport const MenuSeparatorSlot = withContext<\n HTMLDivElement,\n MenuSeparatorSlotProps\n>(\"div\", \"separator\");\n\n// Menu Section\nexport type MenuSectionSlotProps = HTMLChakraProps<\"div\">;\nexport const MenuSectionSlot = withContext<\n HTMLDivElement,\n MenuSectionSlotProps\n>(\"div\", \"section\");\n\n// Menu Section Label\nexport type MenuSectionLabelSlotProps = HTMLChakraProps<\"div\">;\nexport const MenuSectionLabelSlot = withContext<\n HTMLDivElement,\n MenuSectionLabelSlotProps\n>(\"div\", \"sectionLabel\");\n\n// Menu Group Label\nexport type MenuSubmenuSlotProps = HTMLChakraProps<\"div\">;\nexport const MenuSubmenuSlot = withContext<\n HTMLDivElement,\n MenuSubmenuSlotProps\n>(\"div\", \"submenu\");\n","import { createContext, useContext } from \"react\";\nimport type { MenuRootProps } from \"./../menu.types\";\nimport type { MenuTriggerProps as RaMenuTriggerProps } from \"react-aria-components\";\n\n// Context should contain all Menu props (excluding MenuTrigger-specific props)\nexport type MenuContextValue = Omit<\n MenuRootProps,\n keyof RaMenuTriggerProps | \"children\" | \"trigger\"\n>;\n\nconst MenuContext = createContext<MenuContextValue | undefined>(undefined);\n\nexport const MenuProvider = MenuContext.Provider;\n\nexport const useMenuContext = () => {\n const context = useContext(MenuContext);\n return context;\n};\n","import { useSlotRecipe } from \"@chakra-ui/react/styled-system\";\nimport { MenuTrigger as RaMenuTrigger } from \"react-aria-components\";\nimport type { MenuRootProps } from \"../menu.types\";\nimport { MenuRootSlot } from \"../menu.slots\";\nimport { MenuProvider } from \"./menu.context\";\n\nexport const MenuRoot = (props: MenuRootProps) => {\n const recipe = useSlotRecipe({ key: \"menu\" });\n const [recipeProps, functionalProps] = recipe.splitVariantProps(props);\n\n // Separate MenuTrigger props from Menu props\n const {\n children,\n trigger,\n isOpen,\n defaultOpen,\n onOpenChange,\n ...menuContextProps\n } = functionalProps;\n\n const menuTriggerProps = {\n trigger,\n isOpen,\n defaultOpen,\n onOpenChange,\n };\n\n return (\n <MenuRootSlot {...recipeProps} asChild>\n <RaMenuTrigger {...menuTriggerProps}>\n <MenuProvider value={menuContextProps}>{children}</MenuProvider>\n </RaMenuTrigger>\n </MenuRootSlot>\n );\n};\n\nMenuRoot.displayName = \"Menu.Root\";\n","import { Button } from \"react-aria-components\";\nimport { MenuTriggerSlot } from \"../menu.slots\";\nimport type { MenuTriggerProps } from \"../menu.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\nimport type { ReactNode } from \"react\";\n\nexport const MenuTrigger = ({\n children,\n asChild,\n ref,\n ...props\n}: MenuTriggerProps) => {\n const [styleProps, restProps] = extractStyleProps(props);\n\n /**\n * The user supplied a Button as the trigger\n */\n if (asChild) {\n // When asChild is true, apply styles to the child element\n return (\n <MenuTriggerSlot ref={ref} asChild {...styleProps}>\n {children as ReactNode}\n </MenuTriggerSlot>\n );\n }\n\n /**\n * The user did not supply a Button as trigger, use an unstyled button\n * to wrap which ever element the user supplied and make it a trigger\n */\n return (\n <MenuTriggerSlot asChild {...styleProps}>\n <Button ref={ref} {...restProps}>\n {children}\n </Button>\n </MenuTriggerSlot>\n );\n};\n\nMenuTrigger.displayName = \"Menu.Trigger\";\n","import { createContext, useContext } from \"react\";\n\nexport interface MenuSectionContextValue {\n selectionMode?: \"single\" | \"multiple\" | \"none\";\n}\n/**\n * Why is a second context (MenuSectionContext) needed?\n *\n * MenuSectionContext enables section-level config for menu items, such as\n * selection mode, which may differ from the global menu context. This allows\n * advanced menus where each section can have its own selection behavior\n * (e.g., one section is single-select, another is multi-select).\n * By scoping context to a section, menu items inherit settings from their\n * nearest section, falling back to the global menu context if not present.\n * This pattern improves flexibility and composability for complex menus,\n * and avoids prop drilling or awkward prop merging.\n */\n\nconst MenuSectionContext = createContext<MenuSectionContextValue | undefined>(\n undefined\n);\n\nexport const MenuSectionProvider = MenuSectionContext.Provider;\n\nexport const useMenuSectionContext = () => {\n return useContext(MenuSectionContext);\n};\n","import { Menu, Popover } from \"react-aria-components\";\nimport { MenuContentSlot, MenuPopoverSlot } from \"../menu.slots\";\nimport type { MenuContentProps } from \"../menu.types\";\nimport { useMenuContext } from \"./menu.context\";\nimport { MenuSectionProvider } from \"./menu.section-context\";\n\nexport const MenuContent = ({\n children,\n placement: placementOverride,\n ref,\n}: MenuContentProps) => {\n const contextProps = useMenuContext();\n\n if (!contextProps) {\n throw new Error(\"Menu.Content must be used within Menu.Root\");\n }\n\n // Separate placement from other props since it's handled by Popover\n const { placement, ...menuProps } = contextProps;\n const finalPlacement = placementOverride || placement || \"bottom start\";\n\n return (\n <MenuSectionProvider value={{ selectionMode: menuProps.selectionMode }}>\n <MenuPopoverSlot asChild>\n <Popover placement={finalPlacement} offset={4} shouldFlip>\n <MenuContentSlot asChild>\n <Menu ref={ref} shouldFocusWrap autoFocus=\"first\" {...menuProps}>\n {children}\n </Menu>\n </MenuContentSlot>\n </Popover>\n </MenuPopoverSlot>\n </MenuSectionProvider>\n );\n};\n\nMenuContent.displayName = \"Menu.Content\";\n","import { MenuItem as RaMenuItem } from \"react-aria-components\";\nimport { MenuItemSlot } from \"../menu.slots\";\nimport type { MenuItemProps } from \"../menu.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\nimport { ChevronRight } from \"@commercetools/nimbus-icons\";\nimport { Icon } from \"@/components/icon\";\n\nexport const MenuItem = ({\n children,\n isCritical,\n ref,\n ...props\n}: MenuItemProps) => {\n const [styleProps, restProps] = extractStyleProps(props);\n\n return (\n <MenuItemSlot\n asChild\n {...styleProps}\n data-critical={isCritical ? \"\" : undefined}\n >\n <RaMenuItem ref={ref} {...restProps}>\n {({ hasSubmenu }) => (\n <>\n {children}\n {hasSubmenu && (\n <Icon slot=\"caretIcon\">\n <ChevronRight />\n </Icon>\n )}\n </>\n )}\n </RaMenuItem>\n </MenuItemSlot>\n );\n};\n\nMenuItem.displayName = \"Menu.Item\";\n","import { Separator } from \"react-aria-components\";\nimport { MenuSeparatorSlot } from \"../menu.slots\";\nimport type { MenuSeparatorProps } from \"../menu.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\n\nexport const MenuSeparator = ({ ref, ...props }: MenuSeparatorProps) => {\n const [styleProps, restProps] = extractStyleProps(props);\n\n return (\n <MenuSeparatorSlot asChild {...styleProps}>\n <Separator ref={ref} {...restProps} />\n </MenuSeparatorSlot>\n );\n};\n\nMenuSeparator.displayName = \"Menu.Separator\";\n","import { Header } from \"react-aria-components\";\nimport { MenuSectionLabelSlot } from \"../menu.slots\";\nimport type { MenuSectionLabelProps } from \"../menu.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\n\n/**\n * Used in MenuSection for rendering the `label` property.\n */\nexport const MenuSectionLabel = ({\n children,\n ref,\n ...props\n}: MenuSectionLabelProps) => {\n const [styleProps, restProps] = extractStyleProps(props);\n\n return (\n <MenuSectionLabelSlot asChild {...styleProps}>\n <Header ref={ref} {...restProps}>\n {children}\n </Header>\n </MenuSectionLabelSlot>\n );\n};\n\nMenuSectionLabel.displayName = \"Menu.SectionLabel\";\n","import {\n MenuSection as RaMenuSection,\n Collection,\n} from \"react-aria-components\";\nimport { MenuSectionSlot } from \"../menu.slots\";\nimport type { MenuSectionProps } from \"../menu.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\nimport { useMenuContext } from \"./menu.context\";\nimport { MenuSectionProvider } from \"./menu.section-context\";\nimport { MenuSectionLabel } from \"./menu.section-label\";\nimport type { ReactNode } from \"react\";\n\nexport const MenuSection = <T extends object = object>({\n children,\n ref,\n label,\n items,\n ...props\n}: MenuSectionProps<T>) => {\n const contextProps = useMenuContext();\n\n // Extract selection-related props before extracting style props\n const {\n selectionMode = contextProps?.selectionMode,\n selectedKeys = contextProps?.selectedKeys,\n defaultSelectedKeys = contextProps?.defaultSelectedKeys,\n onSelectionChange = contextProps?.onSelectionChange,\n disallowEmptySelection = contextProps?.disallowEmptySelection,\n ...restProps\n } = props;\n\n const [styleProps, otherProps] = extractStyleProps(restProps);\n\n return (\n <MenuSectionProvider value={{ selectionMode }}>\n <MenuSectionSlot asChild {...styleProps}>\n <RaMenuSection\n ref={ref}\n selectionMode={selectionMode}\n selectedKeys={selectedKeys}\n defaultSelectedKeys={defaultSelectedKeys}\n onSelectionChange={onSelectionChange}\n disallowEmptySelection={disallowEmptySelection}\n {...otherProps}\n >\n <MenuSectionLabel>{label}</MenuSectionLabel>\n {items ? (\n <Collection items={items}>{children}</Collection>\n ) : (\n (children as ReactNode)\n )}\n </RaMenuSection>\n </MenuSectionSlot>\n </MenuSectionProvider>\n );\n};\n\nMenuSection.displayName = \"Menu.Section\";\n","import { SubmenuTrigger as RaSubmenuTrigger } from \"react-aria-components\";\nimport type { MenuSubmenuTriggerProps } from \"../menu.types\";\n\nexport const MenuSubmenuTrigger = ({\n children,\n ...props\n}: MenuSubmenuTriggerProps) => {\n return <RaSubmenuTrigger {...props}>{children}</RaSubmenuTrigger>;\n};\n\nMenuSubmenuTrigger.displayName = \"Menu.SubmenuTrigger\";\n","import type { MenuSubmenuProps } from \"../menu.types\";\nimport { MenuContent } from \"./menu.content\";\n\nexport const MenuSubmenu = ({ children, ...props }: MenuSubmenuProps) => {\n return (\n <MenuContent {...props} placement=\"end\">\n {children}\n </MenuContent>\n );\n};\n\nMenuSubmenu.displayName = \"Menu.Submenu\";\n","import { MenuRoot } from \"./components/menu.root\";\nimport { MenuTrigger } from \"./components/menu.trigger\";\nimport { MenuContent } from \"./components/menu.content\";\nimport { MenuItem } from \"./components/menu.item\";\nimport { MenuSeparator } from \"./components/menu.separator\";\nimport { MenuSection } from \"./components/menu.section\";\nimport { MenuSubmenuTrigger } from \"./components/menu.submenu-trigger\";\nimport { MenuSubmenu } from \"./components/menu.submenu\";\n\n// Re-export types\nexport type * from \"./menu.types\";\n\nexport const Menu = {\n Root: MenuRoot,\n Trigger: MenuTrigger,\n Content: MenuContent,\n Item: MenuItem,\n Separator: MenuSeparator,\n Section: MenuSection,\n Submenu: MenuSubmenu,\n SubmenuTrigger: MenuSubmenuTrigger,\n};\n\n// Exports for internal use by react-docgen\nexport {\n MenuRoot as _MenuRoot,\n MenuTrigger as _MenuTrigger,\n MenuContent as _MenuContent,\n MenuItem as _MenuItem,\n MenuSeparator as _MenuSeparator,\n MenuSection as _MenuSection,\n MenuSubmenuTrigger as _MenuSubmenuTrigger,\n MenuSubmenu as _MenuSubmenu,\n};\n"],"names":["withProvider","withContext","createSlotRecipeContext","menuSlotRecipe","MenuRootSlot","MenuTriggerSlot","MenuPopoverSlot","MenuContentSlot","MenuItemSlot","MenuSeparatorSlot","MenuSectionSlot","MenuSectionLabelSlot","MenuContext","createContext","MenuProvider","useMenuContext","useContext","MenuRoot","props","recipe","useSlotRecipe","recipeProps","functionalProps","children","trigger","isOpen","defaultOpen","onOpenChange","menuContextProps","menuTriggerProps","jsx","RaMenuTrigger","MenuTrigger","asChild","ref","styleProps","restProps","extractStyleProps","Button","MenuSectionContext","MenuSectionProvider","MenuContent","placementOverride","contextProps","placement","menuProps","finalPlacement","Popover","Menu","MenuItem","isCritical","RaMenuItem","hasSubmenu","jsxs","Fragment","Icon","ChevronRight","MenuSeparator","Separator","MenuSectionLabel","Header","MenuSection","label","items","selectionMode","selectedKeys","defaultSelectedKeys","onSelectionChange","disallowEmptySelection","otherProps","RaMenuSection","Collection","MenuSubmenuTrigger","RaSubmenuTrigger","MenuSubmenu"],"mappings":"ybAMM,CAAE,aAAAA,EAAc,YAAAC,CAAA,EAAgBC,0BAAwB,CAC5D,OAAQC,EAAAA,cAC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3B,SAAAkB,EAAAA,KAACiB,EAAAA,0CAAA,CACC,IAAApC,EACA,cAAA8B,EACA,aAAAC,EACA,oBAAAC,EACA,kBAAAC,EACA,uBAAAC,EACC,GAAGC,EAEJ,SAAA,CAAAvC,EAAAA,IAAC6B,GAAkB,SAAAG,CAAA,CAAM,EACxBC,EACCjC,EAAAA,IAACyC,EAAAA,0CAAA,CAAW,MAAAR,EAAe,SAAAxC,EAAS,EAEnCA,CAAA,CAAA,CAAA,EAGP,CAAA,CACF,CAEJ,EAEAsC,EAAY,YAAc,eCtDnB,MAAMW,EAAqB,CAAC,CACjC,SAAAjD,EACA,GAAGL,CACL,IACSY,EAAAA,IAAC2C,EAAAA,0CAAA,CAAkB,GAAGvD,EAAQ,SAAAK,CAAA,CAAS,EAGhDiD,EAAmB,YAAc,sBCP1B,MAAME,EAAc,CAAC,CAAE,SAAAnD,EAAU,GAAGL,WAEtCuB,EAAA,CAAa,GAAGvB,EAAO,UAAU,MAC/B,SAAAK,EACH,EAIJmD,EAAY,YAAc,eCCnB,MAAM1B,EAAO,CAClB,KAAM/B,EACN,QAASe,EACT,QAASS,EACT,KAAMQ,EACN,UAAWQ,EACX,QAASI,EACT,QAASa,EACT,eAAgBF,CAClB"}
@@ -1,2 +0,0 @@
1
- "use strict";const e=require("react/jsx-runtime"),p=require("react"),k=require("@chakra-ui/react"),oe=require("./extractStyleProps-CZpHKp1I.cjs.js"),n=require("./slate-helpers-BN_9Hky2.cjs.js"),D=require("./use-formatting-state-DVcnyVBl.cjs.js"),I=require("../components/constants.cjs"),b=require("./box-CWni3A32.cjs.js"),N=require("./divider-BuizjeAj.cjs.js"),U=require("./group-Buy-O6Mr.cjs.js"),O=require("./icon-button-Cc0MkBbk.cjs.js"),w=require("./icon-toggle-button-D-C99Q0s.cjs.js"),v=require("./text-CCW9kDT_.cjs.js"),d=require("./tooltip-g8-hEdZp.cjs.js"),M=require("./visually-hidden-Bh-G5QHv.cjs.js"),_=require("./toggle-button-group-DX134q7m.cjs.js"),re=require("./toolbar-CLGq6IO7.cjs.js"),f=require("@commercetools/nimbus-icons"),y=require("./menu-Bm1u-R6o.cjs.js"),G=k.defineSlotRecipe({slots:["root","toolbar","editable"],className:"nimbus-rich-text-input",base:{root:{display:"flex",flexDirection:"column",position:"relative",width:"full",borderRadius:"200",borderWidth:"{sizes.25}",colorPalette:"slate",borderColor:"colorPalette.7",backgroundColor:"colorPalette.contrast","&[data-invalid='true']":{borderWidth:"{sizes.50}",borderColor:"critical.7"}},toolbar:{boxShadow:"1","[data-disabled='true'] &":{opacity:"0.5"}},editable:{padding:"400",minHeight:"inherit",outline:"none","[data-disabled='true'] &":{cursor:"not-allowed",opacity:"0.5"},"& p":{textStyle:"md",fontWeight:"500"},"& h1":{textStyle:"2xl",fontWeight:"500"},"& h2":{textStyle:"xl",fontWeight:"500"},"& h3":{textStyle:"lg",fontWeight:"500"},"& h4":{textStyle:"md",fontWeight:"500"},"& h5":{textStyle:"xs",fontWeight:"500"},"& blockquote":{textStyle:"md",fontWeight:"400",borderLeftWidth:"{sizes.100}",paddingLeft:"400"},"& ul":{paddingLeft:"600",listStyleType:"disc"},"& ol":{paddingLeft:"600",listStyleType:"decimal"},"& code":{padding:"100",fontFamily:"mono"},"& pre":{padding:"300",borderRadius:"200",overflow:"auto","& code":{padding:"0"}},"& a":{color:"primary.11",textDecoration:"underline",cursor:"pointer",_hover:{textDecoration:"none"}},"& strong":{fontWeight:"700"},"& em":{fontStyle:"italic"},"& u":{textDecoration:"underline"},"& del":{textDecoration:"line-through"},"& sup":{fontSize:"75%",verticalAlign:"super",lineHeight:"0"},"& sub":{fontSize:"75%",verticalAlign:"sub",lineHeight:"0"}}},variants:{}}),{withProvider:ne,withContext:K}=k.createSlotRecipeContext({recipe:G}),ie=ne("div","root"),se=K("div","toolbar"),le=K("div","editable");var ae={isHistory(t){return n.isPlainObject(t)&&Array.isArray(t.redos)&&Array.isArray(t.undos)&&(t.redos.length===0||n.Operation.isOperationList(t.redos[0].operations))&&(t.undos.length===0||n.Operation.isOperationList(t.undos[0].operations))}},z=new WeakMap,S=new WeakMap,C=new WeakMap,m={isHistoryEditor(t){return ae.isHistory(t.history)&&n.Editor.isEditor(t)},isMerging(t){return S.get(t)},isSplittingOnce(t){return C.get(t)},setSplittingOnce(t,o){C.set(t,o)},isSaving(t){return z.get(t)},redo(t){t.redo()},undo(t){t.undo()},withMerging(t,o){var i=m.isMerging(t);S.set(t,!0),o(),S.set(t,i)},withNewBatch(t,o){var i=m.isMerging(t);S.set(t,!0),C.set(t,!0),o(),S.set(t,i),C.delete(t)},withoutMerging(t,o){var i=m.isMerging(t);S.set(t,!1),o(),S.set(t,i)},withoutSaving(t,o){var i=m.isSaving(t);z.set(t,!1);try{o()}finally{z.set(t,i)}}},de=t=>{var o=t,{apply:i}=o;return o.history={undos:[],redos:[]},o.redo=()=>{var{history:l}=o,{redos:s}=l;if(s.length>0){var a=s[s.length-1];a.selectionBefore&&n.Transforms.setSelection(o,a.selectionBefore),m.withoutSaving(o,()=>{n.Editor.withoutNormalizing(o,()=>{for(var c of a.operations)o.apply(c)})}),l.redos.pop(),o.writeHistory("undos",a)}},o.undo=()=>{var{history:l}=o,{undos:s}=l;if(s.length>0){var a=s[s.length-1];m.withoutSaving(o,()=>{n.Editor.withoutNormalizing(o,()=>{var c=a.operations.map(n.Operation.inverse).reverse();for(var u of c)o.apply(u);a.selectionBefore&&n.Transforms.setSelection(o,a.selectionBefore)})}),o.writeHistory("redos",a),l.undos.pop()}},o.apply=l=>{var{operations:s,history:a}=o,{undos:c}=a,u=c[c.length-1],j=u&&u.operations[u.operations.length-1],g=m.isSaving(o),h=m.isMerging(o);if(g==null&&(g=ue(l)),g){if(h==null&&(u==null?h=!1:s.length!==0?h=!0:h=ce(l,j)),m.isSplittingOnce(o)&&(h=!1,m.setSplittingOnce(o,void 0)),u&&h)u.operations.push(l);else{var r={operations:[l],selectionBefore:o.selection};o.writeHistory("undos",r)}for(;c.length>100;)c.shift();a.redos=[]}i(l)},o.writeHistory=(l,s)=>{o.history[l].push(s)},o},ce=(t,o)=>!!(o&&t.type==="insert_text"&&o.type==="insert_text"&&t.offset===o.offset+o.text.length&&n.Path.equals(t.path,o.path)||o&&t.type==="remove_text"&&o.type==="remove_text"&&t.offset+t.text.length===o.offset&&n.Path.equals(t.path,o.path)),ue=(t,o)=>t.type!=="set_selection";const X=p.forwardRef((t,o)=>{const{value:i,onChange:l,onFocus:s,onBlur:a,placeholder:c=I.EDITOR_DEFAULTS.placeholder,isDisabled:u=I.EDITOR_DEFAULTS.isDisabled,isReadOnly:j=I.EDITOR_DEFAULTS.isReadOnly,autoFocus:g=I.EDITOR_DEFAULTS.autoFocus,toolbar:h}=t,r=p.useMemo(()=>{const x=n.createEditor();return n.withLinks(de(n.withReact(x)))},[]),{handleKeyDown:E}=D.useKeyboardShortcuts({editor:r}),H=p.useCallback(x=>{s&&s(x)},[s]),L=p.useCallback(x=>{a&&a(x)},[a]);p.useImperativeHandle(o,()=>({focus:()=>n.focusEditor(r),resetValue:x=>n.resetEditor(r,x)}),[r]);const P=p.useCallback(x=>e.jsx(n.Element$1,{...x}),[]),F=p.useCallback(x=>e.jsx(n.Leaf,{...x}),[]),q=n.createEmptyValue(),V=Array.isArray(i)&&i.length>0?i:q;return e.jsxs(n.Slate,{editor:r,value:V,onChange:l,children:[h&&e.jsx(se,{children:h}),e.jsx(le,{asChild:!0,children:e.jsx(n.Editable,{renderElement:P,renderLeaf:F,placeholder:c,autoFocus:g,readOnly:j||u,onKeyDown:E,onFocus:H,onBlur:L,"aria-label":"Rich text editor",role:"textbox","aria-multiline":"true"})})]})});X.displayName="RichTextEditor";const he=({isDisabled:t=!1})=>{const o=n.useSlate(),i=D.usePreservedSelection(o),{allSelectedKeys:l,handleAllSelectionChange:s}=D.useFormattingState({withPreservedSelection:i});return e.jsxs(y.Menu.Root,{selectionMode:"multiple",selectedKeys:l,onSelectionChange:s,children:[e.jsxs(d.Tooltip.Root,{delay:0,closeDelay:0,children:[e.jsx(y.Menu.Trigger,{asChild:!0,children:e.jsx(O.IconButton,{size:"xs",variant:"ghost","aria-label":"More formatting options",isDisabled:t,onMouseDown:a=>a.preventDefault(),children:e.jsx(f.MoreHoriz,{})})}),e.jsx(d.Tooltip.Content,{placement:"top",children:"More styles"})]}),e.jsxs(y.Menu.Content,{children:[e.jsx(y.Menu.Item,{id:"strikethrough",children:e.jsxs(b.Box,{slot:"label",display:"flex",alignItems:"center",gap:"200",children:[e.jsx(f.FormatStrikethrough,{}),e.jsx(v.Text,{textStyle:"sm",children:"Strikethrough"})]})}),e.jsx(y.Menu.Item,{id:"code",children:e.jsxs(b.Box,{slot:"label",display:"flex",alignItems:"center",gap:"200",children:[e.jsx(f.Code,{}),e.jsx(v.Text,{textStyle:"sm",children:"Code"})]})}),e.jsx(y.Menu.Item,{id:"superscript",children:e.jsxs(b.Box,{slot:"label",display:"flex",alignItems:"center",gap:"200",children:[e.jsx(v.Text,{children:"X²"}),e.jsx(v.Text,{textStyle:"sm",children:"Superscript"})]})}),e.jsx(y.Menu.Item,{id:"subscript",children:e.jsxs(b.Box,{slot:"label",display:"flex",alignItems:"center",gap:"200",children:[e.jsx(v.Text,{children:"X₂"}),e.jsx(v.Text,{textStyle:"sm",children:"Subscript"})]})})]})]})},$=({isDisabled:t=!1})=>{const o=n.useSlate(),i=D.usePreservedSelection(o),{currentTextStyle:l,selectedTextStyleLabel:s,handleTextStyleChange:a,handleListToggle:c,selectedFormatKeys:u,selectedListKeys:j,hasUndos:g,hasRedos:h}=D.useToolbarState({withPreservedSelection:i});return e.jsxs(re.Toolbar,{orientation:"horizontal","aria-label":"Text formatting",width:"full",overflow:"hidden",size:"xs",children:[e.jsx(U.Group,{children:e.jsxs(y.Menu.Root,{onAction:r=>a(String(r)),children:[e.jsxs(d.Tooltip.Root,{delay:0,closeDelay:0,children:[e.jsx(y.Menu.Trigger,{height:"800",width:"4000",bg:"primary.1",borderRadius:"200",_hover:{bg:"primary.2"},isDisabled:t,onMouseDown:r=>r.preventDefault(),"aria-label":"Text style menu",children:e.jsxs(b.Box,{display:"flex",alignItems:"center",gap:"200",px:"200",children:[e.jsx(b.Box,{display:"flex",alignItems:"center",gap:"200",flexGrow:"1",children:e.jsx(v.Text,{my:"auto",textStyle:"sm",fontWeight:"500",children:s})}),e.jsx(f.KeyboardArrowDown,{})]})}),e.jsx(d.Tooltip.Content,{placement:"top",children:"Text style"})]}),e.jsx(y.Menu.Content,{children:I.textStyles.map(r=>e.jsx(y.Menu.Item,{id:r.id,...l===r.id&&{"data-state":"checked"},children:e.jsx(v.Text,{...r.props,children:r.label})},r.id))})]})}),e.jsx(N.Divider,{orientation:"vertical"}),e.jsxs(_.ToggleButtonGroup.Root,{selectionMode:"multiple",selectedKeys:u,isDisabled:t,children:[e.jsxs(d.Tooltip.Root,{delay:0,closeDelay:0,children:[e.jsxs(w.IconToggleButton,{id:"bold",size:"xs",variant:"ghost","aria-label":"Bold",isDisabled:t,onMouseDown:r=>r.preventDefault(),onPress:i(()=>n.toggleMark(o,"bold")),children:[e.jsx(f.FormatBold,{}),e.jsx(M.VisuallyHidden,{children:"Bold"})]}),e.jsx(d.Tooltip.Content,{placement:"top",children:"Bold"})]}),e.jsxs(d.Tooltip.Root,{delay:0,closeDelay:0,children:[e.jsxs(w.IconToggleButton,{id:"italic",size:"xs",variant:"ghost","aria-label":"Italic",isDisabled:t,onMouseDown:r=>r.preventDefault(),onPress:i(()=>n.toggleMark(o,"italic")),children:[e.jsx(f.FormatItalic,{}),e.jsx(M.VisuallyHidden,{children:"Italic"})]}),e.jsx(d.Tooltip.Content,{placement:"top",children:"Italic"})]}),e.jsxs(d.Tooltip.Root,{delay:0,closeDelay:0,children:[e.jsxs(w.IconToggleButton,{id:"underline",size:"xs",variant:"ghost","aria-label":"Underline",isDisabled:t,onMouseDown:r=>r.preventDefault(),onPress:i(()=>n.toggleMark(o,"underline")),children:[e.jsx(f.FormatUnderlined,{}),e.jsx(M.VisuallyHidden,{children:"Underline"})]}),e.jsx(d.Tooltip.Content,{placement:"top",children:"Underline"})]})]}),e.jsx(he,{isDisabled:t}),e.jsx(N.Divider,{orientation:"vertical"}),e.jsxs(_.ToggleButtonGroup.Root,{selectionMode:"single",selectedKeys:j,onSelectionChange:c,"aria-label":"List formatting",isDisabled:t,children:[e.jsxs(d.Tooltip.Root,{delay:0,closeDelay:0,children:[e.jsx(w.IconToggleButton,{id:"bulleted-list",size:"xs",variant:"ghost","aria-label":"Bulleted List",isDisabled:t,onMouseDown:r=>r.preventDefault(),children:e.jsx(f.FormatListBulleted,{})}),e.jsx(d.Tooltip.Content,{placement:"top",children:"Bulleted list"})]}),e.jsxs(d.Tooltip.Root,{delay:0,closeDelay:0,children:[e.jsx(w.IconToggleButton,{id:"numbered-list",size:"xs",variant:"ghost","aria-label":"Numbered List",isDisabled:t,onMouseDown:r=>r.preventDefault(),children:e.jsx(f.FormatListNumbered,{})}),e.jsx(d.Tooltip.Content,{placement:"top",children:"Numbered list"})]})]}),e.jsx(b.Box,{flexGrow:"1"}),e.jsxs(U.Group,{children:[e.jsxs(d.Tooltip.Root,{delay:0,closeDelay:0,children:[e.jsxs(O.IconButton,{size:"xs",variant:"ghost","aria-label":"Undo",isDisabled:!g||t,onPress:i(()=>o.undo()),onMouseDown:r=>r.preventDefault(),children:[e.jsx(f.Undo,{}),e.jsx(M.VisuallyHidden,{children:"Undo"})]}),e.jsx(d.Tooltip.Content,{placement:"top",children:"Undo"})]}),e.jsxs(d.Tooltip.Root,{delay:0,closeDelay:0,children:[e.jsxs(O.IconButton,{size:"xs",variant:"ghost","aria-label":"Redo",isDisabled:!h||t,onPress:i(()=>o.redo()),onMouseDown:r=>r.preventDefault(),children:[e.jsx(f.Redo,{}),e.jsx(M.VisuallyHidden,{children:"Redo"})]}),e.jsx(d.Tooltip.Content,{placement:"top",children:"Redo"})]})]})]})};$.displayName="RichTextToolbar";const J=t=>{const{ref:o,value:i,defaultValue:l,onChange:s,onFocus:a,onBlur:c,placeholder:u="",isDisabled:j=!1,isReadOnly:g=!1,isInvalid:h=!1,autoFocus:r=!1,...E}=t,H=k.useSlotRecipe({recipe:G}),[L,P]=H.splitVariantProps({...E}),[F,q]=oe.extractStyleProps(P),V={"data-disabled":j?"true":void 0,"data-invalid":h?"true":void 0,"data-readonly":g?"true":void 0},[x,A]=p.useState(()=>{const T=i??l??"";try{return T?n.fromHTML(T):n.createEmptyValue()}catch(R){return console.warn("Failed to parse initial HTML, using empty value:",R),n.createEmptyValue()}}),[B,W]=p.useState(()=>i??l??""),Q=p.useRef(null);p.useEffect(()=>{if(i!==void 0&&i!==B){const T=i?n.fromHTML(i):n.createEmptyValue();A(T),W(i)}},[i,B]);const Y=p.useCallback(T=>{const R=n.toHTML(T),te=R!==B;A(T),W(R),te&&s&&s(R)},[B,s]),Z=x,ee=n.validSlateStateAdapter(Z);return e.jsx(ie,{...L,...F,...q,...V,ref:o,children:e.jsx(X,{ref:Q,value:ee,onChange:Y,onFocus:a,onBlur:c,placeholder:u,isDisabled:j,isReadOnly:g,autoFocus:r,toolbar:g?null:e.jsx($,{isDisabled:j})})})};J.displayName="RichTextInput";exports.RichTextInput=J;
2
- //# sourceMappingURL=rich-text-input-CItP9BzJ.cjs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rich-text-input-CItP9BzJ.cjs.js","sources":["../../src/components/rich-text-input/rich-text-input.recipe.tsx","../../src/components/rich-text-input/rich-text-input.slots.tsx","../../../../node_modules/.pnpm/slate-history@0.113.1_slate@0.75.0/node_modules/slate-history/dist/index.es.js","../../src/components/rich-text-input/components/rich-text-editor.tsx","../../src/components/rich-text-input/components/formatting-menu.tsx","../../src/components/rich-text-input/components/rich-text-toolbar.tsx","../../src/components/rich-text-input/rich-text-input.tsx"],"sourcesContent":["import { defineSlotRecipe } from \"@chakra-ui/react\";\n\nexport const richTextInputRecipe = defineSlotRecipe({\n slots: [\"root\", \"toolbar\", \"editable\"],\n className: \"nimbus-rich-text-input\",\n base: {\n root: {\n display: \"flex\",\n flexDirection: \"column\",\n position: \"relative\",\n width: \"full\",\n borderRadius: \"200\",\n borderWidth: \"{sizes.25}\",\n colorPalette: \"slate\",\n borderColor: \"colorPalette.7\",\n backgroundColor: \"colorPalette.contrast\",\n\n // Invalid state styling\n \"&[data-invalid='true']\": {\n borderWidth: \"{sizes.50}\",\n borderColor: \"critical.7\",\n },\n },\n toolbar: {\n boxShadow: \"1\",\n\n // Disabled state styling for toolbar\n \"[data-disabled='true'] &\": {\n opacity: \"0.5\",\n },\n },\n editable: {\n padding: \"400\",\n minHeight: \"inherit\",\n outline: \"none\",\n\n // Disabled state styling for editable\n \"[data-disabled='true'] &\": {\n cursor: \"not-allowed\",\n opacity: \"0.5\",\n },\n\n // Styling for user-facing editor text\n \"& p\": {\n textStyle: \"md\",\n fontWeight: \"500\",\n },\n \"& h1\": {\n textStyle: \"2xl\",\n fontWeight: \"500\",\n },\n \"& h2\": {\n textStyle: \"xl\",\n fontWeight: \"500\",\n },\n \"& h3\": {\n textStyle: \"lg\",\n fontWeight: \"500\",\n },\n \"& h4\": {\n textStyle: \"md\",\n fontWeight: \"500\",\n },\n \"& h5\": {\n textStyle: \"xs\",\n fontWeight: \"500\",\n },\n \"& blockquote\": {\n textStyle: \"md\",\n fontWeight: \"400\",\n borderLeftWidth: \"{sizes.100}\",\n paddingLeft: \"400\",\n },\n \"& ul\": {\n paddingLeft: \"600\",\n listStyleType: \"disc\",\n },\n \"& ol\": {\n paddingLeft: \"600\",\n listStyleType: \"decimal\",\n },\n \"& code\": {\n padding: \"100\",\n fontFamily: \"mono\",\n },\n \"& pre\": {\n padding: \"300\",\n borderRadius: \"200\",\n overflow: \"auto\",\n \"& code\": {\n padding: \"0\",\n },\n },\n \"& a\": {\n color: \"primary.11\",\n textDecoration: \"underline\",\n cursor: \"pointer\",\n _hover: {\n textDecoration: \"none\",\n },\n },\n \"& strong\": {\n fontWeight: \"700\",\n },\n \"& em\": {\n fontStyle: \"italic\",\n },\n \"& u\": {\n textDecoration: \"underline\",\n },\n \"& del\": {\n textDecoration: \"line-through\",\n },\n \"& sup\": {\n fontSize: \"75%\",\n verticalAlign: \"super\",\n lineHeight: \"0\",\n },\n \"& sub\": {\n fontSize: \"75%\",\n verticalAlign: \"sub\",\n lineHeight: \"0\",\n },\n },\n },\n variants: {},\n});\n","import {\n type HTMLChakraProps,\n type RecipeVariantProps,\n type UnstyledProp,\n createSlotRecipeContext,\n} from \"@chakra-ui/react\";\nimport { richTextInputRecipe } from \"./rich-text-input.recipe\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n recipe: richTextInputRecipe,\n});\n\n// Root slot\nexport type RichTextInputRootSlotProps = HTMLChakraProps<\n \"div\",\n RecipeVariantProps<typeof richTextInputRecipe> & UnstyledProp\n>;\n\nexport const RichTextInputRootSlot = withProvider<\n HTMLDivElement,\n RichTextInputRootSlotProps\n>(\"div\", \"root\");\n\n// Toolbar slot\nexport type RichTextInputToolbarSlotProps = HTMLChakraProps<\"div\">;\n\nexport const RichTextInputToolbarSlot = withContext<\n HTMLDivElement,\n RichTextInputToolbarSlotProps\n>(\"div\", \"toolbar\");\n\n// Editable slot\nexport type RichTextInputEditableSlotProps = HTMLChakraProps<\"div\">;\nexport const RichTextInputEditableSlot = withContext<\n HTMLDivElement,\n RichTextInputEditableSlotProps\n>(\"div\", \"editable\");\n","import { isPlainObject } from 'is-plain-object';\nimport { Operation, Editor, Transforms, Path } from 'slate';\n\n// eslint-disable-next-line no-redeclare\nvar History = {\n /**\n * Check if a value is a `History` object.\n */\n isHistory(value) {\n return isPlainObject(value) && Array.isArray(value.redos) && Array.isArray(value.undos) && (value.redos.length === 0 || Operation.isOperationList(value.redos[0].operations)) && (value.undos.length === 0 || Operation.isOperationList(value.undos[0].operations));\n }\n};\n\n/**\n * Weakmaps for attaching state to the editor.\n */\nvar HISTORY = new WeakMap();\nvar SAVING = new WeakMap();\nvar MERGING = new WeakMap();\nvar SPLITTING_ONCE = new WeakMap();\n// eslint-disable-next-line no-redeclare\nvar HistoryEditor = {\n /**\n * Check if a value is a `HistoryEditor` object.\n */\n isHistoryEditor(value) {\n return History.isHistory(value.history) && Editor.isEditor(value);\n },\n /**\n * Get the merge flag's current value.\n */\n isMerging(editor) {\n return MERGING.get(editor);\n },\n /**\n * Get the splitting once flag's current value.\n */\n isSplittingOnce(editor) {\n return SPLITTING_ONCE.get(editor);\n },\n setSplittingOnce(editor, value) {\n SPLITTING_ONCE.set(editor, value);\n },\n /**\n * Get the saving flag's current value.\n */\n isSaving(editor) {\n return SAVING.get(editor);\n },\n /**\n * Redo to the previous saved state.\n */\n redo(editor) {\n editor.redo();\n },\n /**\n * Undo to the previous saved state.\n */\n undo(editor) {\n editor.undo();\n },\n /**\n * Apply a series of changes inside a synchronous `fn`, These operations will\n * be merged into the previous history.\n */\n withMerging(editor, fn) {\n var prev = HistoryEditor.isMerging(editor);\n MERGING.set(editor, true);\n fn();\n MERGING.set(editor, prev);\n },\n /**\n * Apply a series of changes inside a synchronous `fn`, ensuring that the first\n * operation starts a new batch in the history. Subsequent operations will be\n * merged as usual.\n */\n withNewBatch(editor, fn) {\n var prev = HistoryEditor.isMerging(editor);\n MERGING.set(editor, true);\n SPLITTING_ONCE.set(editor, true);\n fn();\n MERGING.set(editor, prev);\n SPLITTING_ONCE.delete(editor);\n },\n /**\n * Apply a series of changes inside a synchronous `fn`, without merging any of\n * the new operations into previous save point in the history.\n */\n withoutMerging(editor, fn) {\n var prev = HistoryEditor.isMerging(editor);\n MERGING.set(editor, false);\n fn();\n MERGING.set(editor, prev);\n },\n /**\n * Apply a series of changes inside a synchronous `fn`, without saving any of\n * their operations into the history.\n */\n withoutSaving(editor, fn) {\n var prev = HistoryEditor.isSaving(editor);\n SAVING.set(editor, false);\n try {\n fn();\n } finally {\n SAVING.set(editor, prev);\n }\n }\n};\n\n/**\n * The `withHistory` plugin keeps track of the operation history of a Slate\n * editor as operations are applied to it, using undo and redo stacks.\n *\n * If you are using TypeScript, you must extend Slate's CustomTypes to use\n * this plugin.\n *\n * See https://docs.slatejs.org/concepts/11-typescript to learn how.\n */\nvar withHistory = editor => {\n var e = editor;\n var {\n apply\n } = e;\n e.history = {\n undos: [],\n redos: []\n };\n e.redo = () => {\n var {\n history\n } = e;\n var {\n redos\n } = history;\n if (redos.length > 0) {\n var batch = redos[redos.length - 1];\n if (batch.selectionBefore) {\n Transforms.setSelection(e, batch.selectionBefore);\n }\n HistoryEditor.withoutSaving(e, () => {\n Editor.withoutNormalizing(e, () => {\n for (var op of batch.operations) {\n e.apply(op);\n }\n });\n });\n history.redos.pop();\n e.writeHistory('undos', batch);\n }\n };\n e.undo = () => {\n var {\n history\n } = e;\n var {\n undos\n } = history;\n if (undos.length > 0) {\n var batch = undos[undos.length - 1];\n HistoryEditor.withoutSaving(e, () => {\n Editor.withoutNormalizing(e, () => {\n var inverseOps = batch.operations.map(Operation.inverse).reverse();\n for (var op of inverseOps) {\n e.apply(op);\n }\n if (batch.selectionBefore) {\n Transforms.setSelection(e, batch.selectionBefore);\n }\n });\n });\n e.writeHistory('redos', batch);\n history.undos.pop();\n }\n };\n e.apply = op => {\n var {\n operations,\n history\n } = e;\n var {\n undos\n } = history;\n var lastBatch = undos[undos.length - 1];\n var lastOp = lastBatch && lastBatch.operations[lastBatch.operations.length - 1];\n var save = HistoryEditor.isSaving(e);\n var merge = HistoryEditor.isMerging(e);\n if (save == null) {\n save = shouldSave(op);\n }\n if (save) {\n if (merge == null) {\n if (lastBatch == null) {\n merge = false;\n } else if (operations.length !== 0) {\n merge = true;\n } else {\n merge = shouldMerge(op, lastOp);\n }\n }\n if (HistoryEditor.isSplittingOnce(e)) {\n merge = false;\n HistoryEditor.setSplittingOnce(e, undefined);\n }\n if (lastBatch && merge) {\n lastBatch.operations.push(op);\n } else {\n var batch = {\n operations: [op],\n selectionBefore: e.selection\n };\n e.writeHistory('undos', batch);\n }\n while (undos.length > 100) {\n undos.shift();\n }\n history.redos = [];\n }\n apply(op);\n };\n e.writeHistory = (stack, batch) => {\n e.history[stack].push(batch);\n };\n return e;\n};\n/**\n * Check whether to merge an operation into the previous operation.\n */\nvar shouldMerge = (op, prev) => {\n if (prev && op.type === 'insert_text' && prev.type === 'insert_text' && op.offset === prev.offset + prev.text.length && Path.equals(op.path, prev.path)) {\n return true;\n }\n if (prev && op.type === 'remove_text' && prev.type === 'remove_text' && op.offset + op.text.length === prev.offset && Path.equals(op.path, prev.path)) {\n return true;\n }\n return false;\n};\n/**\n * Check whether an operation needs to be saved to the history.\n */\nvar shouldSave = (op, prev) => {\n if (op.type === 'set_selection') {\n return false;\n }\n return true;\n};\n\nexport { HISTORY, History, HistoryEditor, MERGING, SAVING, SPLITTING_ONCE, withHistory };\n//# sourceMappingURL=index.es.js.map\n","import {\n useMemo,\n useCallback,\n useImperativeHandle,\n forwardRef,\n type ForwardedRef,\n type FocusEventHandler,\n type ReactNode,\n} from \"react\";\nimport { createEditor, type Descendant } from \"slate\";\nimport { Slate, Editable, withReact } from \"slate-react\";\nimport { withHistory } from \"slate-history\";\nimport {\n RichTextInputEditableSlot,\n RichTextInputToolbarSlot,\n} from \"../rich-text-input.slots\";\nimport {\n Element,\n Leaf,\n withLinks,\n focusEditor,\n resetEditor,\n} from \"../utils/slate-helpers\";\nimport { createEmptyValue } from \"../utils/html-serialization\";\nimport { useKeyboardShortcuts } from \"../hooks/use-keyboard-shortcuts\";\nimport { EDITOR_DEFAULTS } from \"../constants\";\n\nexport interface RichTextEditorProps {\n value?: Descendant[];\n onChange: (value: Descendant[]) => void;\n onFocus?: FocusEventHandler<HTMLDivElement>;\n onBlur?: FocusEventHandler<HTMLDivElement>;\n placeholder?: string;\n isDisabled?: boolean;\n isReadOnly?: boolean;\n autoFocus?: boolean;\n toolbar?: ReactNode;\n}\n\nexport interface RichTextEditorRef {\n focus: () => void;\n resetValue: (html: string) => void;\n}\n\nexport const RichTextEditor = forwardRef<\n RichTextEditorRef,\n RichTextEditorProps\n>((props, forwardedRef: ForwardedRef<RichTextEditorRef>) => {\n const {\n value,\n onChange,\n onFocus,\n onBlur,\n placeholder = EDITOR_DEFAULTS.placeholder,\n isDisabled = EDITOR_DEFAULTS.isDisabled,\n isReadOnly = EDITOR_DEFAULTS.isReadOnly,\n autoFocus = EDITOR_DEFAULTS.autoFocus,\n toolbar,\n } = props;\n\n // Create editor with plugins\n const editor = useMemo(() => {\n const baseEditor = createEditor();\n return withLinks(withHistory(withReact(baseEditor)));\n }, []);\n\n // Handle keyboard shortcuts using hook\n const { handleKeyDown } = useKeyboardShortcuts({ editor });\n\n // Handle focus\n const handleFocus = useCallback(\n (event: React.FocusEvent<HTMLDivElement>) => {\n if (onFocus) {\n onFocus(event);\n }\n },\n [onFocus]\n );\n\n // Handle blur\n const handleBlur = useCallback(\n (event: React.FocusEvent<HTMLDivElement>) => {\n if (onBlur) {\n onBlur(event);\n }\n },\n [onBlur]\n );\n\n // Expose methods through ref\n useImperativeHandle(\n forwardedRef,\n () => ({\n focus: () => focusEditor(editor),\n resetValue: (html: string) => resetEditor(editor, html),\n }),\n [editor]\n );\n\n // Render element\n const renderElement = useCallback(\n (props: Parameters<typeof Element>[0]) => <Element {...props} />,\n []\n );\n\n // Render leaf\n const renderLeaf = useCallback(\n (props: Parameters<typeof Leaf>[0]) => <Leaf {...props} />,\n []\n );\n\n // Ensure we always have a valid value\n const defaultValue = createEmptyValue();\n const safeInitialValue =\n Array.isArray(value) && value.length > 0 ? value : defaultValue;\n\n return (\n <Slate editor={editor} value={safeInitialValue} onChange={onChange}>\n {toolbar && (\n <RichTextInputToolbarSlot>{toolbar}</RichTextInputToolbarSlot>\n )}\n <RichTextInputEditableSlot asChild>\n <Editable\n renderElement={renderElement}\n renderLeaf={renderLeaf}\n placeholder={placeholder}\n autoFocus={autoFocus}\n readOnly={isReadOnly || isDisabled}\n onKeyDown={handleKeyDown}\n onFocus={handleFocus}\n onBlur={handleBlur}\n aria-label=\"Rich text editor\"\n role=\"textbox\"\n aria-multiline=\"true\"\n />\n </RichTextInputEditableSlot>\n </Slate>\n );\n});\n\nRichTextEditor.displayName = \"RichTextEditor\";\n","import { useSlate } from \"slate-react\";\nimport { Menu, IconButton, Text, Box, Tooltip } from \"@/components\";\nimport {\n MoreHoriz,\n FormatStrikethrough,\n Code,\n} from \"@commercetools/nimbus-icons\";\nimport { usePreservedSelection } from \"../hooks/use-preserved-selection\";\nimport { useFormattingState } from \"../hooks/use-formatting-state\";\n\nexport interface FormattingMenuProps {\n isDisabled?: boolean;\n}\n\nexport const FormattingMenu = ({ isDisabled = false }: FormattingMenuProps) => {\n const editor = useSlate();\n const withPreservedSelection = usePreservedSelection(editor);\n\n // Use the formatting state hook for all state management\n const { allSelectedKeys, handleAllSelectionChange } = useFormattingState({\n withPreservedSelection,\n });\n\n return (\n <Menu.Root\n selectionMode=\"multiple\"\n selectedKeys={allSelectedKeys}\n onSelectionChange={handleAllSelectionChange}\n >\n <Tooltip.Root delay={0} closeDelay={0}>\n <Menu.Trigger asChild>\n <IconButton\n size=\"xs\"\n variant=\"ghost\"\n aria-label=\"More formatting options\"\n isDisabled={isDisabled}\n onMouseDown={(event) => event.preventDefault()}\n >\n <MoreHoriz />\n </IconButton>\n </Menu.Trigger>\n <Tooltip.Content placement=\"top\">More styles</Tooltip.Content>\n </Tooltip.Root>\n <Menu.Content>\n <Menu.Item id=\"strikethrough\">\n <Box slot=\"label\" display=\"flex\" alignItems=\"center\" gap=\"200\">\n <FormatStrikethrough />\n <Text textStyle=\"sm\">Strikethrough</Text>\n </Box>\n </Menu.Item>\n <Menu.Item id=\"code\">\n <Box slot=\"label\" display=\"flex\" alignItems=\"center\" gap=\"200\">\n <Code />\n <Text textStyle=\"sm\">Code</Text>\n </Box>\n </Menu.Item>\n <Menu.Item id=\"superscript\">\n <Box slot=\"label\" display=\"flex\" alignItems=\"center\" gap=\"200\">\n <Text>X²</Text>\n <Text textStyle=\"sm\">Superscript</Text>\n </Box>\n </Menu.Item>\n <Menu.Item id=\"subscript\">\n <Box slot=\"label\" display=\"flex\" alignItems=\"center\" gap=\"200\">\n <Text>X₂</Text>\n <Text textStyle=\"sm\">Subscript</Text>\n </Box>\n </Menu.Item>\n </Menu.Content>\n </Menu.Root>\n );\n};\n","import { useSlate } from \"slate-react\";\nimport {\n Toolbar,\n Menu,\n VisuallyHidden,\n Divider,\n ToggleButtonGroup,\n IconToggleButton,\n IconButton,\n Text,\n Box,\n Tooltip,\n} from \"@/components\";\nimport { Group } from \"@/components/group\";\nimport {\n FormatBold,\n FormatItalic,\n FormatUnderlined,\n FormatListBulleted,\n FormatListNumbered,\n KeyboardArrowDown,\n Undo,\n Redo,\n} from \"@commercetools/nimbus-icons\";\nimport { toggleMark } from \"../utils/slate-helpers\";\nimport { usePreservedSelection } from \"../hooks/use-preserved-selection\";\nimport { useToolbarState } from \"../hooks/use-toolbar-state\";\nimport { textStyles } from \"../constants\";\nimport { FormattingMenu } from \"./formatting-menu\";\n\nexport interface RichTextToolbarProps {\n isDisabled?: boolean;\n}\n\nexport const RichTextToolbar = ({\n isDisabled = false,\n}: RichTextToolbarProps) => {\n const editor = useSlate();\n const withPreservedSelection = usePreservedSelection(editor);\n\n // Use the toolbar state hook for all state management\n const {\n currentTextStyle,\n selectedTextStyleLabel,\n handleTextStyleChange,\n handleListToggle,\n selectedFormatKeys,\n selectedListKeys,\n hasUndos,\n hasRedos,\n } = useToolbarState({ withPreservedSelection });\n\n return (\n <Toolbar\n orientation=\"horizontal\"\n aria-label=\"Text formatting\"\n width=\"full\"\n overflow=\"hidden\"\n size=\"xs\"\n >\n {/* Text Style Menu */}\n <Group>\n <Menu.Root\n onAction={(styleId) => handleTextStyleChange(String(styleId))}\n >\n <Tooltip.Root delay={0} closeDelay={0}>\n {/* Menu trigger styles mimic the Select component */}\n <Menu.Trigger\n height=\"800\"\n width=\"4000\"\n bg=\"primary.1\"\n borderRadius=\"200\"\n _hover={{ bg: \"primary.2\" }}\n isDisabled={isDisabled}\n onMouseDown={(event) => event.preventDefault()}\n aria-label=\"Text style menu\"\n >\n <Box display=\"flex\" alignItems=\"center\" gap=\"200\" px=\"200\">\n <Box display=\"flex\" alignItems=\"center\" gap=\"200\" flexGrow=\"1\">\n <Text my=\"auto\" textStyle=\"sm\" fontWeight=\"500\">\n {selectedTextStyleLabel}\n </Text>\n </Box>\n <KeyboardArrowDown />\n </Box>\n </Menu.Trigger>\n <Tooltip.Content placement=\"top\">Text style</Tooltip.Content>\n </Tooltip.Root>\n <Menu.Content>\n {textStyles.map((style) => (\n <Menu.Item\n key={style.id}\n id={style.id}\n {...(currentTextStyle === style.id && {\n \"data-state\": \"checked\",\n })}\n >\n <Text {...style.props}>{style.label}</Text>\n </Menu.Item>\n ))}\n </Menu.Content>\n </Menu.Root>\n </Group>\n\n <Divider orientation=\"vertical\" />\n\n {/* Text Formatting Toggles */}\n <ToggleButtonGroup.Root\n selectionMode=\"multiple\"\n selectedKeys={selectedFormatKeys}\n isDisabled={isDisabled}\n >\n <Tooltip.Root delay={0} closeDelay={0}>\n <IconToggleButton\n id=\"bold\"\n size=\"xs\"\n variant=\"ghost\"\n aria-label=\"Bold\"\n isDisabled={isDisabled}\n onMouseDown={(event) => event.preventDefault()}\n onPress={withPreservedSelection(() => toggleMark(editor, \"bold\"))}\n >\n <FormatBold />\n <VisuallyHidden>Bold</VisuallyHidden>\n </IconToggleButton>\n <Tooltip.Content placement=\"top\">Bold</Tooltip.Content>\n </Tooltip.Root>\n <Tooltip.Root delay={0} closeDelay={0}>\n <IconToggleButton\n id=\"italic\"\n size=\"xs\"\n variant=\"ghost\"\n aria-label=\"Italic\"\n isDisabled={isDisabled}\n onMouseDown={(event) => event.preventDefault()}\n onPress={withPreservedSelection(() => toggleMark(editor, \"italic\"))}\n >\n <FormatItalic />\n <VisuallyHidden>Italic</VisuallyHidden>\n </IconToggleButton>\n <Tooltip.Content placement=\"top\">Italic</Tooltip.Content>\n </Tooltip.Root>\n <Tooltip.Root delay={0} closeDelay={0}>\n <IconToggleButton\n id=\"underline\"\n size=\"xs\"\n variant=\"ghost\"\n aria-label=\"Underline\"\n isDisabled={isDisabled}\n onMouseDown={(event) => event.preventDefault()}\n onPress={withPreservedSelection(() =>\n toggleMark(editor, \"underline\")\n )}\n >\n <FormatUnderlined />\n <VisuallyHidden>Underline</VisuallyHidden>\n </IconToggleButton>\n <Tooltip.Content placement=\"top\">Underline</Tooltip.Content>\n </Tooltip.Root>\n </ToggleButtonGroup.Root>\n\n {/* Formatting Menu for additional options */}\n <FormattingMenu isDisabled={isDisabled} />\n\n <Divider orientation=\"vertical\" />\n\n {/* Lists & Indentation */}\n <ToggleButtonGroup.Root\n selectionMode=\"single\"\n selectedKeys={selectedListKeys}\n onSelectionChange={handleListToggle}\n aria-label=\"List formatting\"\n isDisabled={isDisabled}\n >\n <Tooltip.Root delay={0} closeDelay={0}>\n <IconToggleButton\n id=\"bulleted-list\"\n size=\"xs\"\n variant=\"ghost\"\n aria-label=\"Bulleted List\"\n isDisabled={isDisabled}\n onMouseDown={(event) => event.preventDefault()}\n >\n <FormatListBulleted />\n </IconToggleButton>\n <Tooltip.Content placement=\"top\">Bulleted list</Tooltip.Content>\n </Tooltip.Root>\n <Tooltip.Root delay={0} closeDelay={0}>\n <IconToggleButton\n id=\"numbered-list\"\n size=\"xs\"\n variant=\"ghost\"\n aria-label=\"Numbered List\"\n isDisabled={isDisabled}\n onMouseDown={(event) => event.preventDefault()}\n >\n <FormatListNumbered />\n </IconToggleButton>\n <Tooltip.Content placement=\"top\">Numbered list</Tooltip.Content>\n </Tooltip.Root>\n </ToggleButtonGroup.Root>\n\n {/* Spacer to push undo/redo buttons to the right */}\n <Box flexGrow=\"1\" />\n\n <Group>\n <Tooltip.Root delay={0} closeDelay={0}>\n <IconButton\n size=\"xs\"\n variant=\"ghost\"\n aria-label=\"Undo\"\n isDisabled={!hasUndos || isDisabled}\n onPress={withPreservedSelection(() => editor.undo())}\n onMouseDown={(event) => event.preventDefault()}\n >\n <Undo />\n <VisuallyHidden>Undo</VisuallyHidden>\n </IconButton>\n <Tooltip.Content placement=\"top\">Undo</Tooltip.Content>\n </Tooltip.Root>\n <Tooltip.Root delay={0} closeDelay={0}>\n <IconButton\n size=\"xs\"\n variant=\"ghost\"\n aria-label=\"Redo\"\n isDisabled={!hasRedos || isDisabled}\n onPress={withPreservedSelection(() => editor.redo())}\n onMouseDown={(event) => event.preventDefault()}\n >\n <Redo />\n <VisuallyHidden>Redo</VisuallyHidden>\n </IconButton>\n <Tooltip.Content placement=\"top\">Redo</Tooltip.Content>\n </Tooltip.Root>\n </Group>\n </Toolbar>\n );\n};\n\nRichTextToolbar.displayName = \"RichTextToolbar\";\n","import { useState, useCallback, useRef, useEffect } from \"react\";\nimport { useSlotRecipe } from \"@chakra-ui/react\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\nimport { RichTextInputRootSlot } from \"./rich-text-input.slots\";\nimport {\n RichTextEditor,\n type RichTextEditorRef,\n} from \"./components/rich-text-editor\";\nimport { RichTextToolbar } from \"./components/rich-text-toolbar\";\nimport type { RichTextInputProps } from \"./rich-text-input.types\";\nimport {\n toHTML,\n fromHTML,\n createEmptyValue,\n validSlateStateAdapter,\n} from \"./utils\";\nimport { richTextInputRecipe } from \"./rich-text-input.recipe\";\n\n/**\n RichTextInput - A rich text input component with formatting capabilities.\n */\nexport const RichTextInput = (props: RichTextInputProps) => {\n const {\n ref: forwardedRef,\n value,\n defaultValue,\n onChange,\n onFocus,\n onBlur,\n placeholder = \"\",\n isDisabled = false,\n isReadOnly = false,\n isInvalid = false,\n autoFocus = false,\n ...restProps\n } = props;\n\n const recipe = useSlotRecipe({ recipe: richTextInputRecipe });\n const [recipeProps, remainingProps] = recipe.splitVariantProps({\n // Only semantic variants go here (none currently defined)\n ...restProps,\n });\n const [styleProps, functionalProps] = extractStyleProps(remainingProps);\n\n // Data attributes for state-based styling\n const dataAttributes = {\n \"data-disabled\": isDisabled ? \"true\" : undefined,\n \"data-invalid\": isInvalid ? \"true\" : undefined,\n \"data-readonly\": isReadOnly ? \"true\" : undefined,\n };\n\n // Internal state management\n const [internalValue, setInternalValue] = useState(() => {\n const initialHtml = value ?? defaultValue ?? \"\";\n try {\n return initialHtml ? fromHTML(initialHtml) : createEmptyValue();\n } catch (error) {\n console.warn(\"Failed to parse initial HTML, using empty value:\", error);\n return createEmptyValue();\n }\n });\n\n const [serializedValue, setSerializedValue] = useState(() => {\n return value ?? defaultValue ?? \"\";\n });\n\n const editorRef = useRef<RichTextEditorRef>(null);\n\n // Handle controlled value changes\n useEffect(() => {\n if (value !== undefined && value !== serializedValue) {\n const newSlateValue = value ? fromHTML(value) : createEmptyValue();\n setInternalValue(newSlateValue);\n setSerializedValue(value);\n }\n }, [value, serializedValue]);\n\n const handleChange = useCallback(\n (slateValue: ReturnType<typeof createEmptyValue>) => {\n const newHtml = toHTML(slateValue);\n const hasSerializedValueChanged = newHtml !== serializedValue;\n\n setInternalValue(slateValue);\n setSerializedValue(newHtml);\n\n // Only call onChange if the serialized HTML actually changed\n if (hasSerializedValueChanged && onChange) {\n onChange(newHtml);\n }\n },\n [serializedValue, onChange]\n );\n\n const currentValue = internalValue;\n\n // Safety check: ensure we always have a valid Slate value\n const safeValue = validSlateStateAdapter(currentValue);\n\n return (\n <RichTextInputRootSlot\n {...recipeProps}\n {...styleProps}\n {...functionalProps}\n {...dataAttributes}\n ref={forwardedRef}\n >\n <RichTextEditor\n ref={editorRef}\n value={safeValue}\n onChange={handleChange}\n onFocus={onFocus}\n onBlur={onBlur}\n placeholder={placeholder}\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n autoFocus={autoFocus}\n toolbar={\n !isReadOnly ? <RichTextToolbar isDisabled={isDisabled} /> : null\n }\n />\n </RichTextInputRootSlot>\n );\n};\n\nRichTextInput.displayName = \"RichTextInput\";\n"],"names":["richTextInputRecipe","defineSlotRecipe","withProvider","withContext","createSlotRecipeContext","RichTextInputRootSlot","RichTextInputToolbarSlot","RichTextInputEditableSlot","History","value","isPlainObject","Operation","SAVING","MERGING","SPLITTING_ONCE","HistoryEditor","Editor","editor","fn","prev","withHistory","e","apply","history","redos","batch","Transforms","op","undos","inverseOps","operations","lastBatch","lastOp","save","merge","shouldSave","shouldMerge","stack","Path","RichTextEditor","forwardRef","props","forwardedRef","onChange","onFocus","onBlur","placeholder","EDITOR_DEFAULTS","isDisabled","isReadOnly","autoFocus","toolbar","useMemo","baseEditor","createEditor","withLinks","withReact","handleKeyDown","useKeyboardShortcuts","handleFocus","useCallback","event","handleBlur","useImperativeHandle","focusEditor","html","resetEditor","renderElement","jsx","Element","renderLeaf","Leaf","defaultValue","createEmptyValue","safeInitialValue","jsxs","Slate","Editable","FormattingMenu","useSlate","withPreservedSelection","usePreservedSelection","allSelectedKeys","handleAllSelectionChange","useFormattingState","Menu","Tooltip","IconButton","MoreHoriz","Box","FormatStrikethrough","Text","Code","RichTextToolbar","currentTextStyle","selectedTextStyleLabel","handleTextStyleChange","handleListToggle","selectedFormatKeys","selectedListKeys","hasUndos","hasRedos","useToolbarState","Toolbar","Group","styleId","KeyboardArrowDown","textStyles","style","Divider","ToggleButtonGroup","IconToggleButton","toggleMark","FormatBold","VisuallyHidden","FormatItalic","FormatUnderlined","FormatListBulleted","FormatListNumbered","Undo","Redo","RichTextInput","isInvalid","restProps","recipe","useSlotRecipe","recipeProps","remainingProps","styleProps","functionalProps","extractStyleProps","dataAttributes","internalValue","setInternalValue","useState","initialHtml","fromHTML","error","serializedValue","setSerializedValue","editorRef","useRef","useEffect","newSlateValue","handleChange","slateValue","newHtml","toHTML","hasSerializedValueChanged","currentValue","safeValue","validSlateStateAdapter"],"mappings":"6wBAEaA,EAAsBC,EAAAA,iBAAiB,CAClD,MAAO,CAAC,OAAQ,UAAW,UAAU,EACrC,UAAW,yBACX,KAAM,CACJ,KAAM,CACJ,QAAS,OACT,cAAe,SACf,SAAU,WACV,MAAO,OACP,aAAc,MACd,YAAa,aACb,aAAc,QACd,YAAa,iBACb,gBAAiB,wBAGjB,yBAA0B,CACxB,YAAa,aACb,YAAa,YAAA,CACf,EAEF,QAAS,CACP,UAAW,IAG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