@commercetools/nimbus 0.0.0-canary-20250826133439 → 0.0.0-canary-20250827101922

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 (277) hide show
  1. package/dist/accordion.d.ts +9 -0
  2. package/dist/alert.d.ts +9 -0
  3. package/dist/avatar.d.ts +9 -0
  4. package/dist/badge.d.ts +9 -0
  5. package/dist/box.d.ts +9 -0
  6. package/dist/button.d.ts +9 -0
  7. package/dist/calendar.d.ts +9 -0
  8. package/dist/card.d.ts +9 -0
  9. package/dist/checkbox.d.ts +9 -0
  10. package/dist/chunks/{alert-BhMfbMnN.cjs.js → alert-BZUgI30X.cjs.js} +2 -2
  11. package/dist/chunks/{alert-BhMfbMnN.cjs.js.map → alert-BZUgI30X.cjs.js.map} +1 -1
  12. package/dist/chunks/{alert-BvT6yjas.es.js → alert-BxQlH4k1.es.js} +2 -2
  13. package/dist/chunks/{alert-BvT6yjas.es.js.map → alert-BxQlH4k1.es.js.map} +1 -1
  14. package/dist/chunks/{button-Bg73nQk3.es.js → button-B4HX0fM_.es.js} +2 -2
  15. package/dist/chunks/{button-Bg73nQk3.es.js.map → button-B4HX0fM_.es.js.map} +1 -1
  16. package/dist/chunks/{button-BiBXrCVh.cjs.js → button-qv44IWcR.cjs.js} +2 -2
  17. package/dist/chunks/{button-BiBXrCVh.cjs.js.map → button-qv44IWcR.cjs.js.map} +1 -1
  18. package/dist/chunks/{calendar-Co4TTkzj.es.js → calendar-DABzfMco.es.js} +4 -4
  19. package/dist/chunks/{calendar-Co4TTkzj.es.js.map → calendar-DABzfMco.es.js.map} +1 -1
  20. package/dist/chunks/{calendar-BydrcPp3.cjs.js → calendar-v3st4EyG.cjs.js} +2 -2
  21. package/dist/chunks/{calendar-BydrcPp3.cjs.js.map → calendar-v3st4EyG.cjs.js.map} +1 -1
  22. package/dist/chunks/{checkbox-8eIhS2f6.cjs.js → checkbox-BN-_eQB9.cjs.js} +2 -2
  23. package/dist/chunks/{checkbox-8eIhS2f6.cjs.js.map → checkbox-BN-_eQB9.cjs.js.map} +1 -1
  24. package/dist/chunks/{checkbox-B2yJgtOJ.es.js → checkbox-VN2y-Prn.es.js} +2 -2
  25. package/dist/chunks/{checkbox-B2yJgtOJ.es.js.map → checkbox-VN2y-Prn.es.js.map} +1 -1
  26. package/dist/chunks/{combobox-CFH0OaAM.cjs.js → combobox-Ah0GQqSW.cjs.js} +2 -2
  27. package/dist/chunks/{combobox-CFH0OaAM.cjs.js.map → combobox-Ah0GQqSW.cjs.js.map} +1 -1
  28. package/dist/chunks/{combobox-CkVqkKdA.es.js → combobox-D_IGHRck.es.js} +5 -5
  29. package/dist/chunks/{combobox-CkVqkKdA.es.js.map → combobox-D_IGHRck.es.js.map} +1 -1
  30. package/dist/chunks/data-table-COrv-ddO.cjs.js +2 -0
  31. package/dist/chunks/{data-table-DIXPr3ke.cjs.js.map → data-table-COrv-ddO.cjs.js.map} +1 -1
  32. package/dist/chunks/{data-table-cBq9JXG7.es.js → data-table-DbhVtDHQ.es.js} +677 -676
  33. package/dist/chunks/{data-table-cBq9JXG7.es.js.map → data-table-DbhVtDHQ.es.js.map} +1 -1
  34. package/dist/chunks/{date-input-BSacD65z.es.js → date-input-BOKez7n5.es.js} +3 -3
  35. package/dist/chunks/{date-input-BSacD65z.es.js.map → date-input-BOKez7n5.es.js.map} +1 -1
  36. package/dist/chunks/{date-input-DwxNrZ3r.cjs.js → date-input-C6zs_WLw.cjs.js} +2 -2
  37. package/dist/chunks/{date-input-DwxNrZ3r.cjs.js.map → date-input-C6zs_WLw.cjs.js.map} +1 -1
  38. package/dist/chunks/{date-picker-Bx2J-sPg.es.js → date-picker-Bpi1PgR2.es.js} +7 -7
  39. package/dist/chunks/{date-picker-Bx2J-sPg.es.js.map → date-picker-Bpi1PgR2.es.js.map} +1 -1
  40. package/dist/chunks/{date-picker-UEQeFHA8.cjs.js → date-picker-DNROhe7B.cjs.js} +2 -2
  41. package/dist/chunks/{date-picker-UEQeFHA8.cjs.js.map → date-picker-DNROhe7B.cjs.js.map} +1 -1
  42. package/dist/chunks/{date-range-picker-DvaRIy3T.es.js → date-range-picker-CXKG84tw.es.js} +7 -7
  43. package/dist/chunks/{date-range-picker-DvaRIy3T.es.js.map → date-range-picker-CXKG84tw.es.js.map} +1 -1
  44. package/dist/chunks/{date-range-picker-Dx1nE1Br.cjs.js → date-range-picker-tyjYdQx1.cjs.js} +2 -2
  45. package/dist/chunks/{date-range-picker-Dx1nE1Br.cjs.js.map → date-range-picker-tyjYdQx1.cjs.js.map} +1 -1
  46. package/dist/chunks/{extractStyleProps-BEa9kwlY.es.js → extractStyleProps-DX5GBd9K.es.js} +2 -2
  47. package/dist/chunks/{extractStyleProps-BEa9kwlY.es.js.map → extractStyleProps-DX5GBd9K.es.js.map} +1 -1
  48. package/dist/chunks/{extractStyleProps-wjyId_vK.cjs.js → extractStyleProps-yFm0qaXg.cjs.js} +2 -2
  49. package/dist/chunks/{extractStyleProps-wjyId_vK.cjs.js.map → extractStyleProps-yFm0qaXg.cjs.js.map} +1 -1
  50. package/dist/chunks/{form-field-Do0NhI0D.es.js → form-field-DePRnFqm.es.js} +2 -2
  51. package/dist/chunks/{form-field-Do0NhI0D.es.js.map → form-field-DePRnFqm.es.js.map} +1 -1
  52. package/dist/chunks/{form-field-DiW_0hSy.cjs.js → form-field-JpzG70WX.cjs.js} +2 -2
  53. package/dist/chunks/{form-field-DiW_0hSy.cjs.js.map → form-field-JpzG70WX.cjs.js.map} +1 -1
  54. package/dist/chunks/{icon-button-BBkPfAM3.cjs.js → icon-button-CCrfnUUB.cjs.js} +2 -2
  55. package/dist/chunks/{icon-button-BBkPfAM3.cjs.js.map → icon-button-CCrfnUUB.cjs.js.map} +1 -1
  56. package/dist/chunks/{icon-button-D2qU4Eun.es.js → icon-button-O_dSWgZr.es.js} +2 -2
  57. package/dist/chunks/{icon-button-D2qU4Eun.es.js.map → icon-button-O_dSWgZr.es.js.map} +1 -1
  58. package/dist/chunks/{icon-toggle-button-L_kYjNhI.cjs.js → icon-toggle-button-D5Uji9qU.cjs.js} +2 -2
  59. package/dist/chunks/{icon-toggle-button-L_kYjNhI.cjs.js.map → icon-toggle-button-D5Uji9qU.cjs.js.map} +1 -1
  60. package/dist/chunks/{icon-toggle-button-wjYSiFhl.es.js → icon-toggle-button-sFqCJEvI.es.js} +2 -2
  61. package/dist/chunks/{icon-toggle-button-wjYSiFhl.es.js.map → icon-toggle-button-sFqCJEvI.es.js.map} +1 -1
  62. package/dist/chunks/index-COhQ_99G.cjs.js +4 -0
  63. package/dist/chunks/index-COhQ_99G.cjs.js.map +1 -0
  64. package/dist/chunks/{index-BDmBxsjm.es.js → index-DRWeBbu8.es.js} +31 -61
  65. package/dist/chunks/index-DRWeBbu8.es.js.map +1 -0
  66. package/dist/chunks/menu-BX993uzm.cjs.js +2 -0
  67. package/dist/chunks/menu-BX993uzm.cjs.js.map +1 -0
  68. package/dist/chunks/menu-DbKjf1RS.es.js +157 -0
  69. package/dist/chunks/menu-DbKjf1RS.es.js.map +1 -0
  70. package/dist/chunks/{multiline-text-input-MJPDSw2d.es.js → multiline-text-input-BvJxZ-xz.es.js} +2 -2
  71. package/dist/chunks/{multiline-text-input-MJPDSw2d.es.js.map → multiline-text-input-BvJxZ-xz.es.js.map} +1 -1
  72. package/dist/chunks/{multiline-text-input-BXpftZg5.cjs.js → multiline-text-input-mIiDJ-o1.cjs.js} +2 -2
  73. package/dist/chunks/{multiline-text-input-BXpftZg5.cjs.js.map → multiline-text-input-mIiDJ-o1.cjs.js.map} +1 -1
  74. package/dist/chunks/{nimbus-provider-DEQVQ5ZH.es.js → nimbus-provider-C68IpiXi.es.js} +2 -2
  75. package/dist/chunks/{nimbus-provider-DEQVQ5ZH.es.js.map → nimbus-provider-C68IpiXi.es.js.map} +1 -1
  76. package/dist/chunks/{nimbus-provider-DCCIMVE_.cjs.js → nimbus-provider-Yka95N38.cjs.js} +2 -2
  77. package/dist/chunks/{nimbus-provider-DCCIMVE_.cjs.js.map → nimbus-provider-Yka95N38.cjs.js.map} +1 -1
  78. package/dist/chunks/{number-input-DsQqe_99.cjs.js → number-input-BN6xiOXG.cjs.js} +2 -2
  79. package/dist/chunks/{number-input-DsQqe_99.cjs.js.map → number-input-BN6xiOXG.cjs.js.map} +1 -1
  80. package/dist/chunks/{number-input-CFa5dE3r.es.js → number-input-DFmXNyz2.es.js} +3 -3
  81. package/dist/chunks/{number-input-CFa5dE3r.es.js.map → number-input-DFmXNyz2.es.js.map} +1 -1
  82. package/dist/chunks/{password-input-BT594v5p.es.js → password-input-BtbZYHE8.es.js} +3 -3
  83. package/dist/chunks/{password-input-BT594v5p.es.js.map → password-input-BtbZYHE8.es.js.map} +1 -1
  84. package/dist/chunks/{password-input-D1LSzb9p.cjs.js → password-input-CGsQktks.cjs.js} +2 -2
  85. package/dist/chunks/{password-input-D1LSzb9p.cjs.js.map → password-input-CGsQktks.cjs.js.map} +1 -1
  86. package/dist/chunks/{progress-bar-DM8YmshZ.es.js → progress-bar-CDRI279T.es.js} +2 -2
  87. package/dist/chunks/{progress-bar-DM8YmshZ.es.js.map → progress-bar-CDRI279T.es.js.map} +1 -1
  88. package/dist/chunks/{progress-bar-QjY92GQn.cjs.js → progress-bar-nQCcdv_4.cjs.js} +2 -2
  89. package/dist/chunks/{progress-bar-QjY92GQn.cjs.js.map → progress-bar-nQCcdv_4.cjs.js.map} +1 -1
  90. package/dist/chunks/{radio-input-DRDeKoG2.es.js → radio-input-CE_kist9.es.js} +3 -3
  91. package/dist/chunks/{radio-input-DRDeKoG2.es.js.map → radio-input-CE_kist9.es.js.map} +1 -1
  92. package/dist/chunks/{radio-input-BOjuwflu.cjs.js → radio-input-CWRnpcxm.cjs.js} +2 -2
  93. package/dist/chunks/{radio-input-BOjuwflu.cjs.js.map → radio-input-CWRnpcxm.cjs.js.map} +1 -1
  94. package/dist/chunks/{range-calendar-Cup7ahCy.es.js → range-calendar-BNAIdxfK.es.js} +4 -4
  95. package/dist/chunks/{range-calendar-Cup7ahCy.es.js.map → range-calendar-BNAIdxfK.es.js.map} +1 -1
  96. package/dist/chunks/{range-calendar-C_x3yqnL.cjs.js → range-calendar-BW4gqU35.cjs.js} +2 -2
  97. package/dist/chunks/{range-calendar-C_x3yqnL.cjs.js.map → range-calendar-BW4gqU35.cjs.js.map} +1 -1
  98. package/dist/chunks/rich-text-input-D3xrDvLR.es.js +691 -0
  99. package/dist/chunks/rich-text-input-D3xrDvLR.es.js.map +1 -0
  100. package/dist/chunks/rich-text-input-iDEygf74.cjs.js +2 -0
  101. package/dist/chunks/rich-text-input-iDEygf74.cjs.js.map +1 -0
  102. package/dist/chunks/{select-BnN5zaBu.cjs.js → select-DihySN1w.cjs.js} +2 -2
  103. package/dist/chunks/{select-BnN5zaBu.cjs.js.map → select-DihySN1w.cjs.js.map} +1 -1
  104. package/dist/chunks/{select-Cr0CSahh.es.js → select-wby2GRxc.es.js} +16 -16
  105. package/dist/chunks/{select-Cr0CSahh.es.js.map → select-wby2GRxc.es.js.map} +1 -1
  106. package/dist/chunks/slate-helpers-BwRHJO4o.es.js +6919 -0
  107. package/dist/chunks/slate-helpers-BwRHJO4o.es.js.map +1 -0
  108. package/dist/chunks/slate-helpers-CMAwCMk0.cjs.js +24 -0
  109. package/dist/chunks/slate-helpers-CMAwCMk0.cjs.js.map +1 -0
  110. package/dist/chunks/split-button-CcVa5yVH.es.js +103 -0
  111. package/dist/chunks/split-button-CcVa5yVH.es.js.map +1 -0
  112. package/dist/chunks/split-button-RydlGh27.cjs.js +2 -0
  113. package/dist/chunks/split-button-RydlGh27.cjs.js.map +1 -0
  114. package/dist/chunks/{switch-DUiPm-aC.cjs.js → switch-D3w3xQ7Z.cjs.js} +2 -2
  115. package/dist/chunks/{switch-DUiPm-aC.cjs.js.map → switch-D3w3xQ7Z.cjs.js.map} +1 -1
  116. package/dist/chunks/{switch-BOvBbCnU.es.js → switch-DZBU6Cbk.es.js} +3 -3
  117. package/dist/chunks/{switch-BOvBbCnU.es.js.map → switch-DZBU6Cbk.es.js.map} +1 -1
  118. package/dist/chunks/{tag-group-wXtwUUis.cjs.js → tag-group-Cwcr_VDp.cjs.js} +2 -2
  119. package/dist/chunks/{tag-group-wXtwUUis.cjs.js.map → tag-group-Cwcr_VDp.cjs.js.map} +1 -1
  120. package/dist/chunks/{tag-group-C_oBSbrz.es.js → tag-group-DQ0jVbpR.es.js} +2 -2
  121. package/dist/chunks/{tag-group-C_oBSbrz.es.js.map → tag-group-DQ0jVbpR.es.js.map} +1 -1
  122. package/dist/chunks/{text-input-B7XCw3SS.es.js → text-input-DlNFZk9-.es.js} +3 -3
  123. package/dist/chunks/{text-input-B7XCw3SS.es.js.map → text-input-DlNFZk9-.es.js.map} +1 -1
  124. package/dist/chunks/{text-input-CCX8LUl1.cjs.js → text-input-i2bZeQZZ.cjs.js} +2 -2
  125. package/dist/chunks/{text-input-CCX8LUl1.cjs.js.map → text-input-i2bZeQZZ.cjs.js.map} +1 -1
  126. package/dist/chunks/{time-input-DiFCm9qO.es.js → time-input-BORpKwS7.es.js} +2 -2
  127. package/dist/chunks/{time-input-DiFCm9qO.es.js.map → time-input-BORpKwS7.es.js.map} +1 -1
  128. package/dist/chunks/{time-input-DQaDOtuT.cjs.js → time-input-Cc8RFGmz.cjs.js} +2 -2
  129. package/dist/chunks/{time-input-DQaDOtuT.cjs.js.map → time-input-Cc8RFGmz.cjs.js.map} +1 -1
  130. package/dist/chunks/{toggle-button-BpG_UgsK.es.js → toggle-button-C7BBLnfL.es.js} +9 -9
  131. package/dist/chunks/{toggle-button-BpG_UgsK.es.js.map → toggle-button-C7BBLnfL.es.js.map} +1 -1
  132. package/dist/chunks/{toggle-button-C9XUBlNB.cjs.js → toggle-button-DZpRqlmW.cjs.js} +2 -2
  133. package/dist/chunks/{toggle-button-C9XUBlNB.cjs.js.map → toggle-button-DZpRqlmW.cjs.js.map} +1 -1
  134. package/dist/chunks/{toolbar-D2CqoZzL.es.js → toolbar-CD5Nrn7W.es.js} +3 -3
  135. package/dist/chunks/{toolbar-D2CqoZzL.es.js.map → toolbar-CD5Nrn7W.es.js.map} +1 -1
  136. package/dist/chunks/{toolbar-BxIQI626.cjs.js → toolbar-Dbq_EngE.cjs.js} +2 -2
  137. package/dist/chunks/{toolbar-BxIQI626.cjs.js.map → toolbar-Dbq_EngE.cjs.js.map} +1 -1
  138. package/dist/chunks/use-formatting-state-Denpy3Zo.cjs.js +2 -0
  139. package/dist/chunks/use-formatting-state-Denpy3Zo.cjs.js.map +1 -0
  140. package/dist/chunks/use-formatting-state-RJvSR-Zg.es.js +247 -0
  141. package/dist/chunks/use-formatting-state-RJvSR-Zg.es.js.map +1 -0
  142. package/dist/code.d.ts +9 -0
  143. package/dist/combobox.d.ts +9 -0
  144. package/dist/components/alert.cjs +1 -1
  145. package/dist/components/alert.es.js +1 -1
  146. package/dist/components/button.cjs +1 -1
  147. package/dist/components/button.es.js +1 -1
  148. package/dist/components/calendar.cjs +1 -1
  149. package/dist/components/calendar.es.js +1 -1
  150. package/dist/components/checkbox.cjs +1 -1
  151. package/dist/components/checkbox.es.js +1 -1
  152. package/dist/components/combobox.cjs +1 -1
  153. package/dist/components/combobox.es.js +1 -1
  154. package/dist/components/components.cjs +1 -1
  155. package/dist/components/components.es.js +89 -86
  156. package/dist/components/components.es.js.map +1 -1
  157. package/dist/components/constants.cjs +2 -0
  158. package/dist/components/constants.cjs.map +1 -0
  159. package/dist/components/constants.es.js +125 -0
  160. package/dist/components/constants.es.js.map +1 -0
  161. package/dist/components/data-table.cjs +1 -1
  162. package/dist/components/data-table.es.js +1 -1
  163. package/dist/components/date-input.cjs +1 -1
  164. package/dist/components/date-input.es.js +1 -1
  165. package/dist/components/date-picker.cjs +1 -1
  166. package/dist/components/date-picker.es.js +1 -1
  167. package/dist/components/date-range-picker.cjs +1 -1
  168. package/dist/components/date-range-picker.es.js +1 -1
  169. package/dist/components/form-field.cjs +1 -1
  170. package/dist/components/form-field.es.js +1 -1
  171. package/dist/components/hooks.cjs +2 -0
  172. package/dist/components/hooks.cjs.map +1 -0
  173. package/dist/components/hooks.es.js +8 -0
  174. package/dist/components/hooks.es.js.map +1 -0
  175. package/dist/components/icon-button.cjs +1 -1
  176. package/dist/components/icon-button.es.js +1 -1
  177. package/dist/components/icon-toggle-button.cjs +1 -1
  178. package/dist/components/icon-toggle-button.es.js +1 -1
  179. package/dist/components/multiline-text-input.cjs +1 -1
  180. package/dist/components/multiline-text-input.es.js +1 -1
  181. package/dist/components/nimbus-provider.cjs +1 -1
  182. package/dist/components/nimbus-provider.es.js +1 -1
  183. package/dist/components/number-input.cjs +1 -1
  184. package/dist/components/number-input.es.js +1 -1
  185. package/dist/components/password-input.cjs +1 -1
  186. package/dist/components/password-input.es.js +1 -1
  187. package/dist/components/progress-bar.cjs +1 -1
  188. package/dist/components/progress-bar.es.js +1 -1
  189. package/dist/components/radio-input.cjs +1 -1
  190. package/dist/components/radio-input.es.js +1 -1
  191. package/dist/components/range-calendar.cjs +1 -1
  192. package/dist/components/range-calendar.es.js +1 -1
  193. package/dist/components/rich-text-input.cjs +2 -0
  194. package/dist/components/rich-text-input.cjs.map +1 -0
  195. package/dist/components/rich-text-input.es.js +5 -0
  196. package/dist/components/rich-text-input.es.js.map +1 -0
  197. package/dist/components/select.cjs +1 -1
  198. package/dist/components/select.es.js +1 -1
  199. package/dist/components/split-button.cjs +1 -1
  200. package/dist/components/split-button.es.js +1 -1
  201. package/dist/components/switch.cjs +1 -1
  202. package/dist/components/switch.es.js +1 -1
  203. package/dist/components/tag-group.cjs +1 -1
  204. package/dist/components/tag-group.es.js +1 -1
  205. package/dist/components/text-input.cjs +1 -1
  206. package/dist/components/text-input.es.js +1 -1
  207. package/dist/components/time-input.cjs +1 -1
  208. package/dist/components/time-input.es.js +1 -1
  209. package/dist/components/toggle-button.cjs +1 -1
  210. package/dist/components/toggle-button.es.js +1 -1
  211. package/dist/components/toolbar.cjs +1 -1
  212. package/dist/components/toolbar.es.js +1 -1
  213. package/dist/components/utils.cjs +2 -0
  214. package/dist/components/utils.cjs.map +1 -0
  215. package/dist/components/utils.es.js +76 -0
  216. package/dist/components/utils.es.js.map +1 -0
  217. package/dist/components.d.ts +76 -1
  218. package/dist/constants.d.ts +129 -0
  219. package/dist/data-table.d.ts +10 -0
  220. package/dist/date-input.d.ts +9 -0
  221. package/dist/date-picker.d.ts +9 -0
  222. package/dist/date-range-picker.d.ts +9 -0
  223. package/dist/dialog.d.ts +9 -0
  224. package/dist/divider.d.ts +9 -0
  225. package/dist/flex.d.ts +9 -0
  226. package/dist/form-field.d.ts +9 -0
  227. package/dist/grid.d.ts +9 -0
  228. package/dist/group.d.ts +9 -0
  229. package/dist/heading.d.ts +9 -0
  230. package/dist/hooks.d.ts +60 -0
  231. package/dist/icon-button.d.ts +9 -0
  232. package/dist/icon-toggle-button.d.ts +9 -0
  233. package/dist/icon.d.ts +9 -0
  234. package/dist/image.d.ts +9 -0
  235. package/dist/index.cjs +1 -1
  236. package/dist/index.cjs.map +1 -1
  237. package/dist/index.d.ts +115 -58
  238. package/dist/index.es.js +193 -192
  239. package/dist/kbd.d.ts +9 -0
  240. package/dist/link.d.ts +9 -0
  241. package/dist/list.d.ts +9 -0
  242. package/dist/loading-spinner.d.ts +9 -0
  243. package/dist/multiline-text-input.d.ts +9 -0
  244. package/dist/nimbus-provider.d.ts +9 -0
  245. package/dist/number-input.d.ts +9 -0
  246. package/dist/password-input.d.ts +9 -0
  247. package/dist/popover.d.ts +9 -0
  248. package/dist/progress-bar.d.ts +9 -0
  249. package/dist/radio-input.d.ts +9 -0
  250. package/dist/range-calendar.d.ts +9 -0
  251. package/dist/rich-text-input.d.ts +79 -0
  252. package/dist/select.d.ts +9 -0
  253. package/dist/setup-jsdom-polyfills.d.ts +9 -0
  254. package/dist/simple-grid.d.ts +9 -0
  255. package/dist/split-button.d.ts +9 -0
  256. package/dist/stack.d.ts +9 -0
  257. package/dist/switch.d.ts +9 -0
  258. package/dist/table.d.ts +9 -0
  259. package/dist/tag-group.d.ts +9 -0
  260. package/dist/text-input.d.ts +9 -0
  261. package/dist/text.d.ts +9 -0
  262. package/dist/time-input.d.ts +9 -0
  263. package/dist/toggle-button-group.d.ts +9 -0
  264. package/dist/toggle-button.d.ts +9 -0
  265. package/dist/toolbar.d.ts +13 -1
  266. package/dist/tooltip.d.ts +9 -0
  267. package/dist/utils.d.ts +164 -0
  268. package/dist/visually-hidden.d.ts +9 -0
  269. package/package.json +16 -8
  270. package/dist/chunks/data-table-DIXPr3ke.cjs.js +0 -2
  271. package/dist/chunks/index-BDmBxsjm.es.js.map +0 -1
  272. package/dist/chunks/index-XyB4gGC8.cjs.js +0 -4
  273. package/dist/chunks/index-XyB4gGC8.cjs.js.map +0 -1
  274. package/dist/chunks/split-button-DhYWuU3x.es.js +0 -262
  275. package/dist/chunks/split-button-DhYWuU3x.es.js.map +0 -1
  276. package/dist/chunks/split-button-DrujRAqS.cjs.js +0 -2
  277. package/dist/chunks/split-button-DrujRAqS.cjs.js.map +0 -1
@@ -0,0 +1,691 @@
1
+ import { jsx as o, jsxs as n } from "react/jsx-runtime";
2
+ import { forwardRef as ae, useMemo as se, useCallback as M, useImperativeHandle as de, useState as G, useRef as ce, useEffect as he } from "react";
3
+ import { defineSlotRecipe as ue, createSlotRecipeContext as pe, useSlotRecipe as fe } from "@chakra-ui/react";
4
+ import { e as ge } from "./extractStyleProps-DX5GBd9K.es.js";
5
+ import { h as _, j as W, O as N, P as j, k as me, w as ye, l as ve, r as xe, e as Se, g as be, L as we, m as Re, c as B, n as Te, o as Me, u as Y, b as V, f as q, t as De, v as Ie } from "./slate-helpers-BwRHJO4o.es.js";
6
+ import { a as Ce, u as Z, c as Be, b as Le } from "./use-formatting-state-RJvSR-Zg.es.js";
7
+ import { EDITOR_DEFAULTS as I, textStyles as Pe } from "../components/constants.es.js";
8
+ import { B as b } from "./box-C8731OYq.es.js";
9
+ import { D as X } from "./divider-CpctZ_-U.es.js";
10
+ import { G as J } from "./group-BQeamedA.es.js";
11
+ import { I as k } from "./icon-button-O_dSWgZr.es.js";
12
+ import { I as R } from "./icon-toggle-button-sFqCJEvI.es.js";
13
+ import { T as v } from "./text-B2wziCK6.es.js";
14
+ import { b as d } from "./tooltip-BOK0Uejw.es.js";
15
+ import { V as T } from "./visually-hidden-vh07nrZa.es.js";
16
+ import { T as Q } from "./toggle-button-group-BjQefKya.es.js";
17
+ import { T as ze } from "./toolbar-CD5Nrn7W.es.js";
18
+ import { MoreHoriz as He, FormatStrikethrough as Ee, Code as Fe, KeyboardArrowDown as Oe, FormatBold as Ve, FormatItalic as Ae, FormatUnderlined as We, FormatListBulleted as Ne, FormatListNumbered as ke, Undo as Ke, Redo as Ue } from "@commercetools/nimbus-icons";
19
+ import { M as g } from "./menu-DbKjf1RS.es.js";
20
+ const $ = /* @__PURE__ */ ue({
21
+ slots: ["root", "toolbar", "editable"],
22
+ className: "nimbus-rich-text-input",
23
+ base: {
24
+ root: {
25
+ display: "flex",
26
+ flexDirection: "column",
27
+ position: "relative",
28
+ width: "full",
29
+ borderRadius: "200",
30
+ borderWidth: "{sizes.25}",
31
+ colorPalette: "slate",
32
+ borderColor: "colorPalette.7",
33
+ backgroundColor: "colorPalette.contrast",
34
+ // Invalid state styling
35
+ "&[data-invalid='true']": {
36
+ borderWidth: "{sizes.50}",
37
+ borderColor: "critical.7"
38
+ }
39
+ },
40
+ toolbar: {
41
+ boxShadow: "1",
42
+ // Disabled state styling for toolbar
43
+ "[data-disabled='true'] &": {
44
+ opacity: "0.5"
45
+ }
46
+ },
47
+ editable: {
48
+ padding: "400",
49
+ minHeight: "inherit",
50
+ outline: "none",
51
+ // Disabled state styling for editable
52
+ "[data-disabled='true'] &": {
53
+ cursor: "not-allowed",
54
+ opacity: "0.5"
55
+ },
56
+ // Styling for user-facing editor text
57
+ "& p": {
58
+ textStyle: "md",
59
+ fontWeight: "500"
60
+ },
61
+ "& h1": {
62
+ textStyle: "2xl",
63
+ fontWeight: "500"
64
+ },
65
+ "& h2": {
66
+ textStyle: "xl",
67
+ fontWeight: "500"
68
+ },
69
+ "& h3": {
70
+ textStyle: "lg",
71
+ fontWeight: "500"
72
+ },
73
+ "& h4": {
74
+ textStyle: "md",
75
+ fontWeight: "500"
76
+ },
77
+ "& h5": {
78
+ textStyle: "xs",
79
+ fontWeight: "500"
80
+ },
81
+ "& blockquote": {
82
+ textStyle: "md",
83
+ fontWeight: "400",
84
+ borderLeftWidth: "{sizes.100}",
85
+ paddingLeft: "400"
86
+ },
87
+ "& ul": {
88
+ paddingLeft: "600",
89
+ listStyleType: "disc"
90
+ },
91
+ "& ol": {
92
+ paddingLeft: "600",
93
+ listStyleType: "decimal"
94
+ },
95
+ "& code": {
96
+ padding: "100",
97
+ fontFamily: "mono"
98
+ },
99
+ "& pre": {
100
+ padding: "300",
101
+ borderRadius: "200",
102
+ overflow: "auto",
103
+ "& code": {
104
+ padding: "0"
105
+ }
106
+ },
107
+ "& a": {
108
+ color: "primary.11",
109
+ textDecoration: "underline",
110
+ cursor: "pointer",
111
+ _hover: {
112
+ textDecoration: "none"
113
+ }
114
+ },
115
+ "& strong": {
116
+ fontWeight: "700"
117
+ },
118
+ "& em": {
119
+ fontStyle: "italic"
120
+ },
121
+ "& u": {
122
+ textDecoration: "underline"
123
+ },
124
+ "& del": {
125
+ textDecoration: "line-through"
126
+ },
127
+ "& sup": {
128
+ fontSize: "75%",
129
+ verticalAlign: "super",
130
+ lineHeight: "0"
131
+ },
132
+ "& sub": {
133
+ fontSize: "75%",
134
+ verticalAlign: "sub",
135
+ lineHeight: "0"
136
+ }
137
+ }
138
+ },
139
+ variants: {}
140
+ }), { withProvider: Ge, withContext: ee } = /* @__PURE__ */ pe({
141
+ recipe: $
142
+ }), _e = /* @__PURE__ */ Ge("div", "root"), je = /* @__PURE__ */ ee("div", "toolbar"), qe = /* @__PURE__ */ ee("div", "editable");
143
+ var Xe = {
144
+ /**
145
+ * Check if a value is a `History` object.
146
+ */
147
+ isHistory(e) {
148
+ return me(e) && Array.isArray(e.redos) && Array.isArray(e.undos) && (e.redos.length === 0 || N.isOperationList(e.redos[0].operations)) && (e.undos.length === 0 || N.isOperationList(e.undos[0].operations));
149
+ }
150
+ }, A = /* @__PURE__ */ new WeakMap(), S = /* @__PURE__ */ new WeakMap(), C = /* @__PURE__ */ new WeakMap(), m = {
151
+ /**
152
+ * Check if a value is a `HistoryEditor` object.
153
+ */
154
+ isHistoryEditor(e) {
155
+ return Xe.isHistory(e.history) && W.isEditor(e);
156
+ },
157
+ /**
158
+ * Get the merge flag's current value.
159
+ */
160
+ isMerging(e) {
161
+ return S.get(e);
162
+ },
163
+ /**
164
+ * Get the splitting once flag's current value.
165
+ */
166
+ isSplittingOnce(e) {
167
+ return C.get(e);
168
+ },
169
+ setSplittingOnce(e, t) {
170
+ C.set(e, t);
171
+ },
172
+ /**
173
+ * Get the saving flag's current value.
174
+ */
175
+ isSaving(e) {
176
+ return A.get(e);
177
+ },
178
+ /**
179
+ * Redo to the previous saved state.
180
+ */
181
+ redo(e) {
182
+ e.redo();
183
+ },
184
+ /**
185
+ * Undo to the previous saved state.
186
+ */
187
+ undo(e) {
188
+ e.undo();
189
+ },
190
+ /**
191
+ * Apply a series of changes inside a synchronous `fn`, These operations will
192
+ * be merged into the previous history.
193
+ */
194
+ withMerging(e, t) {
195
+ var i = m.isMerging(e);
196
+ S.set(e, !0), t(), S.set(e, i);
197
+ },
198
+ /**
199
+ * Apply a series of changes inside a synchronous `fn`, ensuring that the first
200
+ * operation starts a new batch in the history. Subsequent operations will be
201
+ * merged as usual.
202
+ */
203
+ withNewBatch(e, t) {
204
+ var i = m.isMerging(e);
205
+ S.set(e, !0), C.set(e, !0), t(), S.set(e, i), C.delete(e);
206
+ },
207
+ /**
208
+ * Apply a series of changes inside a synchronous `fn`, without merging any of
209
+ * the new operations into previous save point in the history.
210
+ */
211
+ withoutMerging(e, t) {
212
+ var i = m.isMerging(e);
213
+ S.set(e, !1), t(), S.set(e, i);
214
+ },
215
+ /**
216
+ * Apply a series of changes inside a synchronous `fn`, without saving any of
217
+ * their operations into the history.
218
+ */
219
+ withoutSaving(e, t) {
220
+ var i = m.isSaving(e);
221
+ A.set(e, !1);
222
+ try {
223
+ t();
224
+ } finally {
225
+ A.set(e, i);
226
+ }
227
+ }
228
+ }, Je = (e) => {
229
+ var t = e, {
230
+ apply: i
231
+ } = t;
232
+ return t.history = {
233
+ undos: [],
234
+ redos: []
235
+ }, t.redo = () => {
236
+ var {
237
+ history: a
238
+ } = t, {
239
+ redos: l
240
+ } = a;
241
+ if (l.length > 0) {
242
+ var s = l[l.length - 1];
243
+ s.selectionBefore && _.setSelection(t, s.selectionBefore), m.withoutSaving(t, () => {
244
+ W.withoutNormalizing(t, () => {
245
+ for (var c of s.operations)
246
+ t.apply(c);
247
+ });
248
+ }), a.redos.pop(), t.writeHistory("undos", s);
249
+ }
250
+ }, t.undo = () => {
251
+ var {
252
+ history: a
253
+ } = t, {
254
+ undos: l
255
+ } = a;
256
+ if (l.length > 0) {
257
+ var s = l[l.length - 1];
258
+ m.withoutSaving(t, () => {
259
+ W.withoutNormalizing(t, () => {
260
+ var c = s.operations.map(N.inverse).reverse();
261
+ for (var h of c)
262
+ t.apply(h);
263
+ s.selectionBefore && _.setSelection(t, s.selectionBefore);
264
+ });
265
+ }), t.writeHistory("redos", s), a.undos.pop();
266
+ }
267
+ }, t.apply = (a) => {
268
+ var {
269
+ operations: l,
270
+ history: s
271
+ } = t, {
272
+ undos: c
273
+ } = s, h = c[c.length - 1], y = h && h.operations[h.operations.length - 1], f = m.isSaving(t), u = m.isMerging(t);
274
+ if (f == null && (f = Ye(a)), f) {
275
+ if (u == null && (h == null ? u = !1 : l.length !== 0 ? u = !0 : u = Qe(a, y)), m.isSplittingOnce(t) && (u = !1, m.setSplittingOnce(t, void 0)), h && u)
276
+ h.operations.push(a);
277
+ else {
278
+ var r = {
279
+ operations: [a],
280
+ selectionBefore: t.selection
281
+ };
282
+ t.writeHistory("undos", r);
283
+ }
284
+ for (; c.length > 100; )
285
+ c.shift();
286
+ s.redos = [];
287
+ }
288
+ i(a);
289
+ }, t.writeHistory = (a, l) => {
290
+ t.history[a].push(l);
291
+ }, t;
292
+ }, Qe = (e, t) => !!(t && e.type === "insert_text" && t.type === "insert_text" && e.offset === t.offset + t.text.length && j.equals(e.path, t.path) || t && e.type === "remove_text" && t.type === "remove_text" && e.offset + e.text.length === t.offset && j.equals(e.path, t.path)), Ye = (e, t) => e.type !== "set_selection";
293
+ const te = /* @__PURE__ */ ae((e, t) => {
294
+ const {
295
+ value: i,
296
+ onChange: a,
297
+ onFocus: l,
298
+ onBlur: s,
299
+ placeholder: c = I.placeholder,
300
+ isDisabled: h = I.isDisabled,
301
+ isReadOnly: y = I.isReadOnly,
302
+ autoFocus: f = I.autoFocus,
303
+ toolbar: u
304
+ } = e, r = se(() => {
305
+ const p = Me();
306
+ return ye(Je(ve(p)));
307
+ }, []), { handleKeyDown: L } = Ce({ editor: r }), P = M(
308
+ (p) => {
309
+ l && l(p);
310
+ },
311
+ [l]
312
+ ), z = M(
313
+ (p) => {
314
+ s && s(p);
315
+ },
316
+ [s]
317
+ );
318
+ de(
319
+ t,
320
+ () => ({
321
+ focus: () => Se(r),
322
+ resetValue: (p) => xe(r, p)
323
+ }),
324
+ [r]
325
+ );
326
+ const H = M(
327
+ (p) => /* @__PURE__ */ o(be, { ...p }),
328
+ []
329
+ ), E = M(
330
+ (p) => /* @__PURE__ */ o(we, { ...p }),
331
+ []
332
+ ), F = B(), O = Array.isArray(i) && i.length > 0 ? i : F;
333
+ return /* @__PURE__ */ n(Re, { editor: r, value: O, onChange: a, children: [
334
+ u && /* @__PURE__ */ o(je, { children: u }),
335
+ /* @__PURE__ */ o(qe, { asChild: !0, children: /* @__PURE__ */ o(
336
+ Te,
337
+ {
338
+ renderElement: H,
339
+ renderLeaf: E,
340
+ placeholder: c,
341
+ autoFocus: f,
342
+ readOnly: y || h,
343
+ onKeyDown: L,
344
+ onFocus: P,
345
+ onBlur: z,
346
+ "aria-label": "Rich text editor",
347
+ role: "textbox",
348
+ "aria-multiline": "true"
349
+ }
350
+ ) })
351
+ ] });
352
+ });
353
+ te.displayName = "RichTextEditor";
354
+ const Ze = ({ isDisabled: e = !1 }) => {
355
+ const t = Y(), i = Z(t), { allSelectedKeys: a, handleAllSelectionChange: l } = Be({
356
+ withPreservedSelection: i
357
+ });
358
+ return /* @__PURE__ */ n(
359
+ g.Root,
360
+ {
361
+ selectionMode: "multiple",
362
+ selectedKeys: a,
363
+ onSelectionChange: l,
364
+ children: [
365
+ /* @__PURE__ */ n(d.Root, { delay: 0, closeDelay: 0, children: [
366
+ /* @__PURE__ */ o(g.Trigger, { asChild: !0, children: /* @__PURE__ */ o(
367
+ k,
368
+ {
369
+ size: "xs",
370
+ variant: "ghost",
371
+ "aria-label": "More formatting options",
372
+ isDisabled: e,
373
+ onMouseDown: (s) => s.preventDefault(),
374
+ children: /* @__PURE__ */ o(He, {})
375
+ }
376
+ ) }),
377
+ /* @__PURE__ */ o(d.Content, { placement: "top", children: "More styles" })
378
+ ] }),
379
+ /* @__PURE__ */ n(g.Content, { children: [
380
+ /* @__PURE__ */ o(g.Item, { id: "strikethrough", children: /* @__PURE__ */ n(b, { slot: "label", display: "flex", alignItems: "center", gap: "200", children: [
381
+ /* @__PURE__ */ o(Ee, {}),
382
+ /* @__PURE__ */ o(v, { textStyle: "sm", children: "Strikethrough" })
383
+ ] }) }),
384
+ /* @__PURE__ */ o(g.Item, { id: "code", children: /* @__PURE__ */ n(b, { slot: "label", display: "flex", alignItems: "center", gap: "200", children: [
385
+ /* @__PURE__ */ o(Fe, {}),
386
+ /* @__PURE__ */ o(v, { textStyle: "sm", children: "Code" })
387
+ ] }) }),
388
+ /* @__PURE__ */ o(g.Item, { id: "superscript", children: /* @__PURE__ */ n(b, { slot: "label", display: "flex", alignItems: "center", gap: "200", children: [
389
+ /* @__PURE__ */ o(v, { children: "X²" }),
390
+ /* @__PURE__ */ o(v, { textStyle: "sm", children: "Superscript" })
391
+ ] }) }),
392
+ /* @__PURE__ */ o(g.Item, { id: "subscript", children: /* @__PURE__ */ n(b, { slot: "label", display: "flex", alignItems: "center", gap: "200", children: [
393
+ /* @__PURE__ */ o(v, { children: "X₂" }),
394
+ /* @__PURE__ */ o(v, { textStyle: "sm", children: "Subscript" })
395
+ ] }) })
396
+ ] })
397
+ ]
398
+ }
399
+ );
400
+ }, oe = ({
401
+ isDisabled: e = !1
402
+ }) => {
403
+ const t = Y(), i = Z(t), {
404
+ currentTextStyle: a,
405
+ selectedTextStyleLabel: l,
406
+ handleTextStyleChange: s,
407
+ handleListToggle: c,
408
+ selectedFormatKeys: h,
409
+ selectedListKeys: y,
410
+ hasUndos: f,
411
+ hasRedos: u
412
+ } = Le({ withPreservedSelection: i });
413
+ return /* @__PURE__ */ n(
414
+ ze,
415
+ {
416
+ orientation: "horizontal",
417
+ "aria-label": "Text formatting",
418
+ width: "full",
419
+ overflow: "hidden",
420
+ size: "xs",
421
+ children: [
422
+ /* @__PURE__ */ o(J, { children: /* @__PURE__ */ n(
423
+ g.Root,
424
+ {
425
+ onAction: (r) => s(String(r)),
426
+ children: [
427
+ /* @__PURE__ */ n(d.Root, { delay: 0, closeDelay: 0, children: [
428
+ /* @__PURE__ */ o(
429
+ g.Trigger,
430
+ {
431
+ height: "800",
432
+ width: "4000",
433
+ bg: "primary.1",
434
+ borderRadius: "200",
435
+ _hover: { bg: "primary.2" },
436
+ isDisabled: e,
437
+ onMouseDown: (r) => r.preventDefault(),
438
+ "aria-label": "Text style menu",
439
+ children: /* @__PURE__ */ n(b, { display: "flex", alignItems: "center", gap: "200", px: "200", children: [
440
+ /* @__PURE__ */ o(b, { display: "flex", alignItems: "center", gap: "200", flexGrow: "1", children: /* @__PURE__ */ o(v, { my: "auto", textStyle: "sm", fontWeight: "500", children: l }) }),
441
+ /* @__PURE__ */ o(Oe, {})
442
+ ] })
443
+ }
444
+ ),
445
+ /* @__PURE__ */ o(d.Content, { placement: "top", children: "Text style" })
446
+ ] }),
447
+ /* @__PURE__ */ o(g.Content, { children: Pe.map((r) => /* @__PURE__ */ o(
448
+ g.Item,
449
+ {
450
+ id: r.id,
451
+ ...a === r.id && {
452
+ "data-state": "checked"
453
+ },
454
+ children: /* @__PURE__ */ o(v, { ...r.props, children: r.label })
455
+ },
456
+ r.id
457
+ )) })
458
+ ]
459
+ }
460
+ ) }),
461
+ /* @__PURE__ */ o(X, { orientation: "vertical" }),
462
+ /* @__PURE__ */ n(
463
+ Q.Root,
464
+ {
465
+ selectionMode: "multiple",
466
+ selectedKeys: h,
467
+ isDisabled: e,
468
+ children: [
469
+ /* @__PURE__ */ n(d.Root, { delay: 0, closeDelay: 0, children: [
470
+ /* @__PURE__ */ n(
471
+ R,
472
+ {
473
+ id: "bold",
474
+ size: "xs",
475
+ variant: "ghost",
476
+ "aria-label": "Bold",
477
+ isDisabled: e,
478
+ onMouseDown: (r) => r.preventDefault(),
479
+ onPress: i(() => V(t, "bold")),
480
+ children: [
481
+ /* @__PURE__ */ o(Ve, {}),
482
+ /* @__PURE__ */ o(T, { children: "Bold" })
483
+ ]
484
+ }
485
+ ),
486
+ /* @__PURE__ */ o(d.Content, { placement: "top", children: "Bold" })
487
+ ] }),
488
+ /* @__PURE__ */ n(d.Root, { delay: 0, closeDelay: 0, children: [
489
+ /* @__PURE__ */ n(
490
+ R,
491
+ {
492
+ id: "italic",
493
+ size: "xs",
494
+ variant: "ghost",
495
+ "aria-label": "Italic",
496
+ isDisabled: e,
497
+ onMouseDown: (r) => r.preventDefault(),
498
+ onPress: i(() => V(t, "italic")),
499
+ children: [
500
+ /* @__PURE__ */ o(Ae, {}),
501
+ /* @__PURE__ */ o(T, { children: "Italic" })
502
+ ]
503
+ }
504
+ ),
505
+ /* @__PURE__ */ o(d.Content, { placement: "top", children: "Italic" })
506
+ ] }),
507
+ /* @__PURE__ */ n(d.Root, { delay: 0, closeDelay: 0, children: [
508
+ /* @__PURE__ */ n(
509
+ R,
510
+ {
511
+ id: "underline",
512
+ size: "xs",
513
+ variant: "ghost",
514
+ "aria-label": "Underline",
515
+ isDisabled: e,
516
+ onMouseDown: (r) => r.preventDefault(),
517
+ onPress: i(
518
+ () => V(t, "underline")
519
+ ),
520
+ children: [
521
+ /* @__PURE__ */ o(We, {}),
522
+ /* @__PURE__ */ o(T, { children: "Underline" })
523
+ ]
524
+ }
525
+ ),
526
+ /* @__PURE__ */ o(d.Content, { placement: "top", children: "Underline" })
527
+ ] })
528
+ ]
529
+ }
530
+ ),
531
+ /* @__PURE__ */ o(Ze, { isDisabled: e }),
532
+ /* @__PURE__ */ o(X, { orientation: "vertical" }),
533
+ /* @__PURE__ */ n(
534
+ Q.Root,
535
+ {
536
+ selectionMode: "single",
537
+ selectedKeys: y,
538
+ onSelectionChange: c,
539
+ "aria-label": "List formatting",
540
+ isDisabled: e,
541
+ children: [
542
+ /* @__PURE__ */ n(d.Root, { delay: 0, closeDelay: 0, children: [
543
+ /* @__PURE__ */ o(
544
+ R,
545
+ {
546
+ id: "bulleted-list",
547
+ size: "xs",
548
+ variant: "ghost",
549
+ "aria-label": "Bulleted List",
550
+ isDisabled: e,
551
+ onMouseDown: (r) => r.preventDefault(),
552
+ children: /* @__PURE__ */ o(Ne, {})
553
+ }
554
+ ),
555
+ /* @__PURE__ */ o(d.Content, { placement: "top", children: "Bulleted list" })
556
+ ] }),
557
+ /* @__PURE__ */ n(d.Root, { delay: 0, closeDelay: 0, children: [
558
+ /* @__PURE__ */ o(
559
+ R,
560
+ {
561
+ id: "numbered-list",
562
+ size: "xs",
563
+ variant: "ghost",
564
+ "aria-label": "Numbered List",
565
+ isDisabled: e,
566
+ onMouseDown: (r) => r.preventDefault(),
567
+ children: /* @__PURE__ */ o(ke, {})
568
+ }
569
+ ),
570
+ /* @__PURE__ */ o(d.Content, { placement: "top", children: "Numbered list" })
571
+ ] })
572
+ ]
573
+ }
574
+ ),
575
+ /* @__PURE__ */ o(b, { flexGrow: "1" }),
576
+ /* @__PURE__ */ n(J, { children: [
577
+ /* @__PURE__ */ n(d.Root, { delay: 0, closeDelay: 0, children: [
578
+ /* @__PURE__ */ n(
579
+ k,
580
+ {
581
+ size: "xs",
582
+ variant: "ghost",
583
+ "aria-label": "Undo",
584
+ isDisabled: !f || e,
585
+ onPress: i(() => t.undo()),
586
+ onMouseDown: (r) => r.preventDefault(),
587
+ children: [
588
+ /* @__PURE__ */ o(Ke, {}),
589
+ /* @__PURE__ */ o(T, { children: "Undo" })
590
+ ]
591
+ }
592
+ ),
593
+ /* @__PURE__ */ o(d.Content, { placement: "top", children: "Undo" })
594
+ ] }),
595
+ /* @__PURE__ */ n(d.Root, { delay: 0, closeDelay: 0, children: [
596
+ /* @__PURE__ */ n(
597
+ k,
598
+ {
599
+ size: "xs",
600
+ variant: "ghost",
601
+ "aria-label": "Redo",
602
+ isDisabled: !u || e,
603
+ onPress: i(() => t.redo()),
604
+ onMouseDown: (r) => r.preventDefault(),
605
+ children: [
606
+ /* @__PURE__ */ o(Ue, {}),
607
+ /* @__PURE__ */ o(T, { children: "Redo" })
608
+ ]
609
+ }
610
+ ),
611
+ /* @__PURE__ */ o(d.Content, { placement: "top", children: "Redo" })
612
+ ] })
613
+ ] })
614
+ ]
615
+ }
616
+ );
617
+ };
618
+ oe.displayName = "RichTextToolbar";
619
+ const $e = (e) => {
620
+ const {
621
+ ref: t,
622
+ value: i,
623
+ defaultValue: a,
624
+ onChange: l,
625
+ onFocus: s,
626
+ onBlur: c,
627
+ placeholder: h = "",
628
+ isDisabled: y = !1,
629
+ isReadOnly: f = !1,
630
+ isInvalid: u = !1,
631
+ autoFocus: r = !1,
632
+ ...L
633
+ } = e, P = fe({ recipe: $ }), [z, H] = P.splitVariantProps({
634
+ // Only semantic variants go here (none currently defined)
635
+ ...L
636
+ }), [E, F] = ge(H), O = {
637
+ "data-disabled": y ? "true" : void 0,
638
+ "data-invalid": u ? "true" : void 0,
639
+ "data-readonly": f ? "true" : void 0
640
+ }, [p, K] = G(() => {
641
+ const x = i ?? a ?? "";
642
+ try {
643
+ return x ? q(x) : B();
644
+ } catch (w) {
645
+ return console.warn("Failed to parse initial HTML, using empty value:", w), B();
646
+ }
647
+ }), [D, U] = G(() => i ?? a ?? ""), re = ce(null);
648
+ he(() => {
649
+ if (i !== void 0 && i !== D) {
650
+ const x = i ? q(i) : B();
651
+ K(x), U(i);
652
+ }
653
+ }, [i, D]);
654
+ const ie = M(
655
+ (x) => {
656
+ const w = De(x), le = w !== D;
657
+ K(x), U(w), le && l && l(w);
658
+ },
659
+ [D, l]
660
+ ), ne = Ie(p);
661
+ return /* @__PURE__ */ o(
662
+ _e,
663
+ {
664
+ ...z,
665
+ ...E,
666
+ ...F,
667
+ ...O,
668
+ ref: t,
669
+ children: /* @__PURE__ */ o(
670
+ te,
671
+ {
672
+ ref: re,
673
+ value: ne,
674
+ onChange: ie,
675
+ onFocus: s,
676
+ onBlur: c,
677
+ placeholder: h,
678
+ isDisabled: y,
679
+ isReadOnly: f,
680
+ autoFocus: r,
681
+ toolbar: f ? null : /* @__PURE__ */ o(oe, { isDisabled: y })
682
+ }
683
+ )
684
+ }
685
+ );
686
+ };
687
+ $e.displayName = "RichTextInput";
688
+ export {
689
+ $e as R
690
+ };
691
+ //# sourceMappingURL=rich-text-input-D3xrDvLR.es.js.map