@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
@@ -162,3 +162,12 @@ export declare type DisclosureItemProps = AccordionItemProps & {
162
162
  };
163
163
 
164
164
  export { }
165
+
166
+
167
+ declare module "slate" {
168
+ interface CustomTypes {
169
+ Editor: BaseEditor & ReactEditor & HistoryEditor;
170
+ Element: CustomElement;
171
+ Text: CustomText;
172
+ }
173
+ }
package/dist/alert.d.ts CHANGED
@@ -173,3 +173,12 @@ declare interface TextProps extends Omit<TextProps_2, "slot"> {
173
173
  }
174
174
 
175
175
  export { }
176
+
177
+
178
+ declare module "slate" {
179
+ interface CustomTypes {
180
+ Editor: BaseEditor & ReactEditor & HistoryEditor;
181
+ Element: CustomElement;
182
+ Text: CustomText;
183
+ }
184
+ }
package/dist/avatar.d.ts CHANGED
@@ -68,3 +68,12 @@ declare interface AvatarRootProps extends HTMLChakraProps<"div", AvatarRecipePro
68
68
  declare type FunctionalAvatarProps = AvatarRootProps & AvatarComponentProps;
69
69
 
70
70
  export { }
71
+
72
+
73
+ declare module "slate" {
74
+ interface CustomTypes {
75
+ Editor: BaseEditor & ReactEditor & HistoryEditor;
76
+ Element: CustomElement;
77
+ Text: CustomText;
78
+ }
79
+ }
package/dist/badge.d.ts CHANGED
@@ -94,3 +94,12 @@ declare type BadgeVariantProps = BadgeRootProps & RecipeVariantProps<typeof badg
94
94
  };
95
95
 
96
96
  export { }
97
+
98
+
99
+ declare module "slate" {
100
+ interface CustomTypes {
101
+ Editor: BaseEditor & ReactEditor & HistoryEditor;
102
+ Element: CustomElement;
103
+ Text: CustomText;
104
+ }
105
+ }
package/dist/box.d.ts CHANGED
@@ -19,3 +19,12 @@ export declare interface BoxProps extends HTMLChakraProps<"div"> {
19
19
  }
20
20
 
21
21
  export { }
22
+
23
+
24
+ declare module "slate" {
25
+ interface CustomTypes {
26
+ Editor: BaseEditor & ReactEditor & HistoryEditor;
27
+ Element: CustomElement;
28
+ Text: CustomText;
29
+ }
30
+ }
package/dist/button.d.ts CHANGED
@@ -43,3 +43,12 @@ declare type FunctionalButtonProps = AriaButtonProps & Omit<ButtonRootProps, key
43
43
  };
44
44
 
45
45
  export { }
46
+
47
+
48
+ declare module "slate" {
49
+ interface CustomTypes {
50
+ Editor: BaseEditor & ReactEditor & HistoryEditor;
51
+ Element: CustomElement;
52
+ Text: CustomText;
53
+ }
54
+ }
@@ -31,3 +31,12 @@ declare const calendarSlotRecipe: SlotRecipeDefinition<"grid" | "header" | "root
31
31
  declare type ExcludedProps = "as" | "asChild" | "style" | "createCalendar";
32
32
 
33
33
  export { }
34
+
35
+
36
+ declare module "slate" {
37
+ interface CustomTypes {
38
+ Editor: BaseEditor & ReactEditor & HistoryEditor;
39
+ Element: CustomElement;
40
+ Text: CustomText;
41
+ }
42
+ }
package/dist/card.d.ts CHANGED
@@ -139,3 +139,12 @@ declare type CardVariantProps = CardRootProps & RecipeVariantProps<typeof cardRe
139
139
  };
140
140
 
141
141
  export { }
142
+
143
+
144
+ declare module "slate" {
145
+ interface CustomTypes {
146
+ Editor: BaseEditor & ReactEditor & HistoryEditor;
147
+ Element: CustomElement;
148
+ Text: CustomText;
149
+ }
150
+ }
@@ -67,3 +67,12 @@ zIndex: number;
67
67
  declare type CheckboxVariantProps = CheckboxRootProps & RecipeVariantProps<typeof checkboxSlotRecipe> & CheckboxProps_2;
68
68
 
69
69
  export { }
70
+
71
+
72
+ declare module "slate" {
73
+ interface CustomTypes {
74
+ Editor: BaseEditor & ReactEditor & HistoryEditor;
75
+ Element: CustomElement;
76
+ Text: CustomText;
77
+ }
78
+ }
@@ -1,2 +1,2 @@
1
- "use strict";const e=require("react/jsx-runtime"),s=require("react"),P=require("./config-Mt8_uyhI.cjs.js"),R=require("./create-slot-recipe-context-HIF51Igr.cjs.js"),b=require("./box-BPfqlznQ.cjs.js"),B=require("./stack-B6PqFPMh.cjs.js"),r=require("@commercetools/nimbus-icons"),N=require("./icon-button-BBkPfAM3.cjs.js"),T=P.defineSlotRecipe({slots:["root","title","description","icon","actions","dismissButton"],className:"nimbus-alert",base:{root:{display:"inline-flex",flexDirection:"row",gap:"200",width:"100%"},icon:{marginTop:"50","& svg":{width:"500",height:"500",color:"colorPalette.11"}},title:{color:"colorPalette.11"},description:{color:"colorPalette.11"}},variants:{tone:{critical:{root:{colorPalette:"critical"}},info:{root:{colorPalette:"info"}},warning:{root:{colorPalette:"amber"}},positive:{root:{colorPalette:"positive"}}},variant:{flat:{},outlined:{root:{border:"solid-25",borderColor:"colorPalette.5",backgroundColor:"colorPalette.2",padding:"200",borderRadius:"200"}}}}}),{withProvider:E,withContext:l}=R.createSlotRecipeContext({recipe:T}),q=E("div","root"),w=l("div","title"),S=l("div","description"),y=l("div","icon"),I=l("div","actions"),$=l("div","dismissButton"),k=o=>{switch(o){case"critical":return e.jsx(r.ErrorOutline,{});case"info":return e.jsx(r.Info,{});case"warning":return e.jsx(r.WarningAmber,{});case"positive":return e.jsx(r.CheckCircleOutline,{});default:return null}},c=s.createContext(void 0),a=o=>{const{ref:i,children:t,...n}=o,[v,m]=s.useState(null),[g,f]=s.useState(null),[j,p]=s.useState(null),[h,D]=s.useState(null),C=s.useMemo(()=>({setTitle:m,setDescription:f,setActions:p,setDismiss:D}),[m,f,p,D]);return e.jsx(c.Provider,{value:C,children:e.jsxs(q,{ref:i,...n,role:"alert",children:[e.jsx(y,{alignItems:"flex-start",children:k(n.tone)}),e.jsxs(B.Stack,{flex:"1",gap:"200",children:[e.jsxs(b.Box,{children:[v,g]}),j]}),h,t]})})};a.displayName="Alert.Root";const u=({children:o,...i})=>{const t=s.useContext(c);return s.useEffect(()=>{if(t){const n=e.jsx(w,{...i,fontWeight:"600",children:o});return t.setTitle(n),()=>t.setTitle(null)}},[o,i]),null};u.displayName="Alert.Title";const d=({children:o,...i})=>{const t=s.useContext(c);return s.useEffect(()=>{if(t){const n=e.jsx(S,{...i,children:o});return t.setDescription(n),()=>t.setDescription(null)}},[o,i]),null};d.displayName="Alert.Description";const x=({children:o,...i})=>{const t=s.useContext(c);return s.useEffect(()=>{if(t){const n=e.jsx(I,{...i,children:o});return t.setActions(n),()=>t.setActions(null)}},[o,i]),null};x.displayName="Alert.Actions";const A=({children:o,...i})=>{const t=s.useContext(c);return s.useEffect(()=>{if(t){const n=e.jsx($,{children:e.jsx(N.IconButton,{"aria-label":"Dismiss",...i,variant:"ghost",size:"2xs",children:e.jsx(r.Clear,{role:"img"})})});return t.setDismiss(n),()=>t.setDismiss(null)}},[o,i]),null};A.displayName="Alert.DismissButton";const O={Root:a,Title:u,Description:d,Actions:x,DismissButton:A};exports.Alert=O;exports.AlertActions=x;exports.AlertDescription=d;exports.AlertDismissButton=A;exports.AlertRoot=a;exports.AlertTitle=u;
2
- //# sourceMappingURL=alert-BhMfbMnN.cjs.js.map
1
+ "use strict";const e=require("react/jsx-runtime"),s=require("react"),P=require("./config-Mt8_uyhI.cjs.js"),R=require("./create-slot-recipe-context-HIF51Igr.cjs.js"),b=require("./box-BPfqlznQ.cjs.js"),B=require("./stack-B6PqFPMh.cjs.js"),r=require("@commercetools/nimbus-icons"),N=require("./icon-button-CCrfnUUB.cjs.js"),T=P.defineSlotRecipe({slots:["root","title","description","icon","actions","dismissButton"],className:"nimbus-alert",base:{root:{display:"inline-flex",flexDirection:"row",gap:"200",width:"100%"},icon:{marginTop:"50","& svg":{width:"500",height:"500",color:"colorPalette.11"}},title:{color:"colorPalette.11"},description:{color:"colorPalette.11"}},variants:{tone:{critical:{root:{colorPalette:"critical"}},info:{root:{colorPalette:"info"}},warning:{root:{colorPalette:"amber"}},positive:{root:{colorPalette:"positive"}}},variant:{flat:{},outlined:{root:{border:"solid-25",borderColor:"colorPalette.5",backgroundColor:"colorPalette.2",padding:"200",borderRadius:"200"}}}}}),{withProvider:E,withContext:l}=R.createSlotRecipeContext({recipe:T}),q=E("div","root"),w=l("div","title"),S=l("div","description"),y=l("div","icon"),I=l("div","actions"),$=l("div","dismissButton"),k=o=>{switch(o){case"critical":return e.jsx(r.ErrorOutline,{});case"info":return e.jsx(r.Info,{});case"warning":return e.jsx(r.WarningAmber,{});case"positive":return e.jsx(r.CheckCircleOutline,{});default:return null}},c=s.createContext(void 0),a=o=>{const{ref:i,children:t,...n}=o,[v,m]=s.useState(null),[g,f]=s.useState(null),[j,p]=s.useState(null),[h,D]=s.useState(null),C=s.useMemo(()=>({setTitle:m,setDescription:f,setActions:p,setDismiss:D}),[m,f,p,D]);return e.jsx(c.Provider,{value:C,children:e.jsxs(q,{ref:i,...n,role:"alert",children:[e.jsx(y,{alignItems:"flex-start",children:k(n.tone)}),e.jsxs(B.Stack,{flex:"1",gap:"200",children:[e.jsxs(b.Box,{children:[v,g]}),j]}),h,t]})})};a.displayName="Alert.Root";const u=({children:o,...i})=>{const t=s.useContext(c);return s.useEffect(()=>{if(t){const n=e.jsx(w,{...i,fontWeight:"600",children:o});return t.setTitle(n),()=>t.setTitle(null)}},[o,i]),null};u.displayName="Alert.Title";const d=({children:o,...i})=>{const t=s.useContext(c);return s.useEffect(()=>{if(t){const n=e.jsx(S,{...i,children:o});return t.setDescription(n),()=>t.setDescription(null)}},[o,i]),null};d.displayName="Alert.Description";const x=({children:o,...i})=>{const t=s.useContext(c);return s.useEffect(()=>{if(t){const n=e.jsx(I,{...i,children:o});return t.setActions(n),()=>t.setActions(null)}},[o,i]),null};x.displayName="Alert.Actions";const A=({children:o,...i})=>{const t=s.useContext(c);return s.useEffect(()=>{if(t){const n=e.jsx($,{children:e.jsx(N.IconButton,{"aria-label":"Dismiss",...i,variant:"ghost",size:"2xs",children:e.jsx(r.Clear,{role:"img"})})});return t.setDismiss(n),()=>t.setDismiss(null)}},[o,i]),null};A.displayName="Alert.DismissButton";const O={Root:a,Title:u,Description:d,Actions:x,DismissButton:A};exports.Alert=O;exports.AlertActions=x;exports.AlertDescription=d;exports.AlertDismissButton=A;exports.AlertRoot=a;exports.AlertTitle=u;
2
+ //# sourceMappingURL=alert-BZUgI30X.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"alert-BhMfbMnN.cjs.js","sources":["../../src/components/alert/alert.recipe.tsx","../../src/components/alert/alert.slots.tsx","../../src/components/alert/components/alert.root.tsx","../../src/components/alert/components/alert.title.tsx","../../src/components/alert/components/alert.description.tsx","../../src/components/alert/components/alert.actions.tsx","../../src/components/alert/components/alert.dismiss-button.tsx","../../src/components/alert/alert.tsx"],"sourcesContent":["import { defineSlotRecipe } from \"@chakra-ui/react/styled-system\";\n/**\n * Recipe configuration for the Alert component.\n * Defines the styling variants and base styles using Chakra UI's recipe system.\n */\nexport const alertRecipe = defineSlotRecipe({\n slots: [\"root\", \"title\", \"description\", \"icon\", \"actions\", \"dismissButton\"],\n // Unique class name prefix for the component\n className: \"nimbus-alert\",\n\n // Base styles applied to all instances of the component\n base: {\n root: {\n display: \"inline-flex\",\n flexDirection: \"row\",\n gap: \"200\",\n width: \"100%\",\n },\n icon: {\n marginTop: \"50\",\n \"& svg\": {\n width: \"500\",\n height: \"500\",\n color: \"colorPalette.11\",\n },\n },\n title: {\n color: \"colorPalette.11\",\n },\n description: {\n color: \"colorPalette.11\",\n },\n },\n\n variants: {\n tone: {\n critical: {\n root: { colorPalette: \"critical\" },\n },\n info: {\n root: { colorPalette: \"info\" },\n },\n warning: {\n root: { colorPalette: \"amber\" },\n },\n positive: {\n root: { colorPalette: \"positive\" },\n },\n },\n\n variant: {\n flat: {},\n outlined: {\n root: {\n border: \"solid-25\",\n borderColor: \"colorPalette.5\",\n backgroundColor: \"colorPalette.2\",\n padding: \"200\",\n borderRadius: \"200\",\n },\n },\n },\n },\n});\n","import { createSlotRecipeContext } from \"@chakra-ui/react/styled-system\";\nimport { alertRecipe } from \"./alert.recipe\";\nimport type {\n AlertActionsProps,\n AlertDescriptionProps,\n AlertDismissButtonProps,\n AlertIconProps,\n AlertRootProps,\n AlertTitleProps,\n} from \"./alert.types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n recipe: alertRecipe,\n});\n\nexport const AlertRoot = withProvider<HTMLDivElement, AlertRootProps>(\n \"div\",\n \"root\"\n);\n\nexport const AlertTitle = withContext<HTMLDivElement, AlertTitleProps>(\n \"div\",\n \"title\"\n);\n\nexport const AlertDescription = withContext<\n HTMLDivElement,\n AlertDescriptionProps\n>(\"div\", \"description\");\n\nexport const AlertIcon = withContext<HTMLDivElement, AlertIconProps>(\n \"div\",\n \"icon\"\n);\n\nexport const AlertActions = withContext<HTMLDivElement, AlertActionsProps>(\n \"div\",\n \"actions\"\n);\n\n// This is a div wrapper for layout placement - note that we expect it to receive `IconButton` props, but we use a `div`.\n// We then forward the consumer props to the interior `IconButton` component.\nexport const AlertDismissButton = withContext<\n HTMLDivElement,\n AlertDismissButtonProps\n>(\"div\", \"dismissButton\");\n","import { createContext, useMemo, useState, type ReactNode } from \"react\";\nimport { AlertRoot as AlertRootSlot, AlertIcon } from \"../alert.slots\";\nimport type { AlertProps, AlertRootComponent } from \"../alert.types\";\nimport { Box } from \"../../box\";\nimport { Stack } from \"../../stack\";\nimport {\n CheckCircleOutline,\n ErrorOutline,\n Info,\n WarningAmber,\n} from \"@commercetools/nimbus-icons\";\n\nconst getIconFromTone = (tone: AlertProps[\"tone\"]) => {\n switch (tone) {\n case \"critical\":\n return <ErrorOutline />;\n case \"info\":\n return <Info />;\n case \"warning\":\n return <WarningAmber />;\n case \"positive\":\n return <CheckCircleOutline />;\n default:\n return null;\n }\n};\n\ntype AlertContextValue = {\n setTitle: (title: ReactNode) => void;\n setDescription: (description: ReactNode) => void;\n setActions: (actions: ReactNode) => void;\n setDismiss: (dismiss: ReactNode) => void;\n};\n\nexport const AlertContext = createContext<AlertContextValue | undefined>(\n undefined\n);\n\n/**\n * # Alert\n *\n * Provides feedback to the user about the status of an action or system event\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/feedback/alert}\n */\nexport const AlertRoot: AlertRootComponent = (props) => {\n const { ref, children, ...restProps } = props;\n const [titleNode, setTitle] = useState<ReactNode>(null);\n const [descriptionNode, setDescription] = useState<ReactNode>(null);\n const [actionsNode, setActions] = useState<ReactNode>(null);\n const [dismissNode, setDismiss] = useState<ReactNode>(null);\n\n // Memoize the context value so we don't cause unnecessary re-renders\n const contextValue = useMemo(\n () => ({\n setTitle,\n setDescription,\n setActions,\n setDismiss,\n }),\n [setTitle, setDescription, setActions, setDismiss]\n );\n\n return (\n <AlertContext.Provider value={contextValue}>\n <AlertRootSlot ref={ref} {...restProps} role=\"alert\">\n <AlertIcon alignItems=\"flex-start\">\n {getIconFromTone(restProps.tone)}\n </AlertIcon>\n <Stack flex=\"1\" gap=\"200\">\n <Box>\n {titleNode}\n {descriptionNode}\n </Box>\n {actionsNode}\n </Stack>\n {dismissNode}\n\n {children}\n </AlertRootSlot>\n </AlertContext.Provider>\n );\n};\n\nAlertRoot.displayName = \"Alert.Root\";\n","import { useContext, useEffect } from \"react\";\nimport { AlertTitle as AlertTitleSlot } from \"../alert.slots\";\nimport type { AlertTitleProps } from \"../alert.types\";\nimport { AlertContext } from \"./alert.root\";\n\nexport const AlertTitle = ({ children, ...props }: AlertTitleProps) => {\n const context = useContext(AlertContext);\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <AlertTitleSlot {...props} fontWeight=\"600\">\n {children}\n </AlertTitleSlot>\n );\n // Register it with the parent\n context.setTitle(slotElement);\n\n // On unmount, remove it\n return () => context.setTitle(null);\n }\n }, [children, props]);\n\n return null;\n};\n\nAlertTitle.displayName = \"Alert.Title\";\n","import { useContext, useEffect } from \"react\";\nimport { AlertDescription as AlertDescriptionSlot } from \"../alert.slots\";\nimport type { AlertDescriptionProps } from \"../alert.types\";\nimport { AlertContext } from \"./alert.root\";\n\nexport const AlertDescription = ({\n children,\n ...props\n}: AlertDescriptionProps) => {\n const context = useContext(AlertContext);\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <AlertDescriptionSlot {...props}>{children}</AlertDescriptionSlot>\n );\n // Register it with the parent\n context.setDescription(slotElement);\n\n // On unmount, remove it\n return () => context.setDescription(null);\n }\n }, [children, props]);\n\n return null;\n};\n\nAlertDescription.displayName = \"Alert.Description\";\n","import { useContext, useEffect } from \"react\";\nimport { AlertActions as AlertActionsSlot } from \"../alert.slots\";\nimport type { AlertActionsProps } from \"../alert.types\";\nimport { AlertContext } from \"./alert.root\";\n\nexport const AlertActions = ({ children, ...props }: AlertActionsProps) => {\n const context = useContext(AlertContext);\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <AlertActionsSlot {...props}>{children}</AlertActionsSlot>\n );\n // Register it with the parent\n context.setActions(slotElement);\n\n // On unmount, remove it\n return () => context.setActions(null);\n }\n }, [children, props]);\n\n return null;\n};\n\nAlertActions.displayName = \"Alert.Actions\";\n","import { useContext, useEffect } from \"react\";\nimport { AlertDismissButton as AlertDismissButtonSlot } from \"../alert.slots\";\nimport type { AlertDismissButtonProps } from \"../alert.types\";\nimport { Clear } from \"@commercetools/nimbus-icons\";\nimport { IconButton } from \"../../icon-button\";\nimport { AlertContext } from \"./alert.root\";\n\nexport const AlertDismissButton = ({\n children,\n ...props\n}: AlertDismissButtonProps) => {\n const context = useContext(AlertContext);\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <AlertDismissButtonSlot>\n <IconButton\n aria-label=\"Dismiss\"\n {...props}\n variant=\"ghost\"\n size=\"2xs\"\n >\n <Clear role=\"img\" />\n </IconButton>\n </AlertDismissButtonSlot>\n );\n // Register it with the parent\n context.setDismiss(slotElement);\n\n // On unmount, remove it\n return () => context.setDismiss(null);\n }\n }, [children, props]);\n\n return null;\n};\n\nAlertDismissButton.displayName = \"Alert.DismissButton\";\n","import { AlertTitle } from \"./components/alert.title\";\nimport { AlertDescription } from \"./components/alert.description\";\nimport { AlertActions } from \"./components/alert.actions\";\nimport { AlertDismissButton } from \"./components/alert.dismiss-button\";\nimport { AlertRoot } from \"./components/alert.root\";\n\n/**\n * Alert\n * ============================================================\n * Provides feedback to the user about the status of an action or system event\n */\nexport const Alert = {\n Root: AlertRoot,\n Title: AlertTitle,\n Description: AlertDescription,\n Actions: AlertActions,\n DismissButton: AlertDismissButton,\n};\n\n// exports for internal use by react-docgen\nexport {\n AlertRoot as _AlertRoot,\n AlertTitle as _AlertTitle,\n AlertDescription as _AlertDescription,\n AlertActions as _AlertActions,\n AlertDismissButton as _AlertDismissButton,\n};\n"],"names":["alertRecipe","defineSlotRecipe","withProvider","withContext","createSlotRecipeContext","AlertRoot","AlertTitle","AlertDescription","AlertIcon","AlertActions","AlertDismissButton","getIconFromTone","tone","ErrorOutline","Info","WarningAmber","CheckCircleOutline","AlertContext","createContext","props","ref","children","restProps","titleNode","setTitle","useState","descriptionNode","setDescription","actionsNode","setActions","dismissNode","setDismiss","contextValue","useMemo","jsx","jsxs","AlertRootSlot","Stack","Box","context","useContext","useEffect","slotElement","AlertTitleSlot","AlertDescriptionSlot","AlertActionsSlot","AlertDismissButtonSlot","IconButton","Clear","Alert"],"mappings":"iUAKaA,EAAcC,EAAAA,iBAAiB,CAC1C,MAAO,CAAC,OAAQ,QAAS,cAAe,OAAQ,UAAW,eAAe,EAE1E,UAAW,eAGX,KAAM,CACJ,KAAM,CACJ,QAAS,cACT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"}
1
+ {"version":3,"file":"alert-BZUgI30X.cjs.js","sources":["../../src/components/alert/alert.recipe.tsx","../../src/components/alert/alert.slots.tsx","../../src/components/alert/components/alert.root.tsx","../../src/components/alert/components/alert.title.tsx","../../src/components/alert/components/alert.description.tsx","../../src/components/alert/components/alert.actions.tsx","../../src/components/alert/components/alert.dismiss-button.tsx","../../src/components/alert/alert.tsx"],"sourcesContent":["import { defineSlotRecipe } from \"@chakra-ui/react/styled-system\";\n/**\n * Recipe configuration for the Alert component.\n * Defines the styling variants and base styles using Chakra UI's recipe system.\n */\nexport const alertRecipe = defineSlotRecipe({\n slots: [\"root\", \"title\", \"description\", \"icon\", \"actions\", \"dismissButton\"],\n // Unique class name prefix for the component\n className: \"nimbus-alert\",\n\n // Base styles applied to all instances of the component\n base: {\n root: {\n display: \"inline-flex\",\n flexDirection: \"row\",\n gap: \"200\",\n width: \"100%\",\n },\n icon: {\n marginTop: \"50\",\n \"& svg\": {\n width: \"500\",\n height: \"500\",\n color: \"colorPalette.11\",\n },\n },\n title: {\n color: \"colorPalette.11\",\n },\n description: {\n color: \"colorPalette.11\",\n },\n },\n\n variants: {\n tone: {\n critical: {\n root: { colorPalette: \"critical\" },\n },\n info: {\n root: { colorPalette: \"info\" },\n },\n warning: {\n root: { colorPalette: \"amber\" },\n },\n positive: {\n root: { colorPalette: \"positive\" },\n },\n },\n\n variant: {\n flat: {},\n outlined: {\n root: {\n border: \"solid-25\",\n borderColor: \"colorPalette.5\",\n backgroundColor: \"colorPalette.2\",\n padding: \"200\",\n borderRadius: \"200\",\n },\n },\n },\n },\n});\n","import { createSlotRecipeContext } from \"@chakra-ui/react/styled-system\";\nimport { alertRecipe } from \"./alert.recipe\";\nimport type {\n AlertActionsProps,\n AlertDescriptionProps,\n AlertDismissButtonProps,\n AlertIconProps,\n AlertRootProps,\n AlertTitleProps,\n} from \"./alert.types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n recipe: alertRecipe,\n});\n\nexport const AlertRoot = withProvider<HTMLDivElement, AlertRootProps>(\n \"div\",\n \"root\"\n);\n\nexport const AlertTitle = withContext<HTMLDivElement, AlertTitleProps>(\n \"div\",\n \"title\"\n);\n\nexport const AlertDescription = withContext<\n HTMLDivElement,\n AlertDescriptionProps\n>(\"div\", \"description\");\n\nexport const AlertIcon = withContext<HTMLDivElement, AlertIconProps>(\n \"div\",\n \"icon\"\n);\n\nexport const AlertActions = withContext<HTMLDivElement, AlertActionsProps>(\n \"div\",\n \"actions\"\n);\n\n// This is a div wrapper for layout placement - note that we expect it to receive `IconButton` props, but we use a `div`.\n// We then forward the consumer props to the interior `IconButton` component.\nexport const AlertDismissButton = withContext<\n HTMLDivElement,\n AlertDismissButtonProps\n>(\"div\", \"dismissButton\");\n","import { createContext, useMemo, useState, type ReactNode } from \"react\";\nimport { AlertRoot as AlertRootSlot, AlertIcon } from \"../alert.slots\";\nimport type { AlertProps, AlertRootComponent } from \"../alert.types\";\nimport { Box } from \"../../box\";\nimport { Stack } from \"../../stack\";\nimport {\n CheckCircleOutline,\n ErrorOutline,\n Info,\n WarningAmber,\n} from \"@commercetools/nimbus-icons\";\n\nconst getIconFromTone = (tone: AlertProps[\"tone\"]) => {\n switch (tone) {\n case \"critical\":\n return <ErrorOutline />;\n case \"info\":\n return <Info />;\n case \"warning\":\n return <WarningAmber />;\n case \"positive\":\n return <CheckCircleOutline />;\n default:\n return null;\n }\n};\n\ntype AlertContextValue = {\n setTitle: (title: ReactNode) => void;\n setDescription: (description: ReactNode) => void;\n setActions: (actions: ReactNode) => void;\n setDismiss: (dismiss: ReactNode) => void;\n};\n\nexport const AlertContext = createContext<AlertContextValue | undefined>(\n undefined\n);\n\n/**\n * # Alert\n *\n * Provides feedback to the user about the status of an action or system event\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/feedback/alert}\n */\nexport const AlertRoot: AlertRootComponent = (props) => {\n const { ref, children, ...restProps } = props;\n const [titleNode, setTitle] = useState<ReactNode>(null);\n const [descriptionNode, setDescription] = useState<ReactNode>(null);\n const [actionsNode, setActions] = useState<ReactNode>(null);\n const [dismissNode, setDismiss] = useState<ReactNode>(null);\n\n // Memoize the context value so we don't cause unnecessary re-renders\n const contextValue = useMemo(\n () => ({\n setTitle,\n setDescription,\n setActions,\n setDismiss,\n }),\n [setTitle, setDescription, setActions, setDismiss]\n );\n\n return (\n <AlertContext.Provider value={contextValue}>\n <AlertRootSlot ref={ref} {...restProps} role=\"alert\">\n <AlertIcon alignItems=\"flex-start\">\n {getIconFromTone(restProps.tone)}\n </AlertIcon>\n <Stack flex=\"1\" gap=\"200\">\n <Box>\n {titleNode}\n {descriptionNode}\n </Box>\n {actionsNode}\n </Stack>\n {dismissNode}\n\n {children}\n </AlertRootSlot>\n </AlertContext.Provider>\n );\n};\n\nAlertRoot.displayName = \"Alert.Root\";\n","import { useContext, useEffect } from \"react\";\nimport { AlertTitle as AlertTitleSlot } from \"../alert.slots\";\nimport type { AlertTitleProps } from \"../alert.types\";\nimport { AlertContext } from \"./alert.root\";\n\nexport const AlertTitle = ({ children, ...props }: AlertTitleProps) => {\n const context = useContext(AlertContext);\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <AlertTitleSlot {...props} fontWeight=\"600\">\n {children}\n </AlertTitleSlot>\n );\n // Register it with the parent\n context.setTitle(slotElement);\n\n // On unmount, remove it\n return () => context.setTitle(null);\n }\n }, [children, props]);\n\n return null;\n};\n\nAlertTitle.displayName = \"Alert.Title\";\n","import { useContext, useEffect } from \"react\";\nimport { AlertDescription as AlertDescriptionSlot } from \"../alert.slots\";\nimport type { AlertDescriptionProps } from \"../alert.types\";\nimport { AlertContext } from \"./alert.root\";\n\nexport const AlertDescription = ({\n children,\n ...props\n}: AlertDescriptionProps) => {\n const context = useContext(AlertContext);\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <AlertDescriptionSlot {...props}>{children}</AlertDescriptionSlot>\n );\n // Register it with the parent\n context.setDescription(slotElement);\n\n // On unmount, remove it\n return () => context.setDescription(null);\n }\n }, [children, props]);\n\n return null;\n};\n\nAlertDescription.displayName = \"Alert.Description\";\n","import { useContext, useEffect } from \"react\";\nimport { AlertActions as AlertActionsSlot } from \"../alert.slots\";\nimport type { AlertActionsProps } from \"../alert.types\";\nimport { AlertContext } from \"./alert.root\";\n\nexport const AlertActions = ({ children, ...props }: AlertActionsProps) => {\n const context = useContext(AlertContext);\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <AlertActionsSlot {...props}>{children}</AlertActionsSlot>\n );\n // Register it with the parent\n context.setActions(slotElement);\n\n // On unmount, remove it\n return () => context.setActions(null);\n }\n }, [children, props]);\n\n return null;\n};\n\nAlertActions.displayName = \"Alert.Actions\";\n","import { useContext, useEffect } from \"react\";\nimport { AlertDismissButton as AlertDismissButtonSlot } from \"../alert.slots\";\nimport type { AlertDismissButtonProps } from \"../alert.types\";\nimport { Clear } from \"@commercetools/nimbus-icons\";\nimport { IconButton } from \"../../icon-button\";\nimport { AlertContext } from \"./alert.root\";\n\nexport const AlertDismissButton = ({\n children,\n ...props\n}: AlertDismissButtonProps) => {\n const context = useContext(AlertContext);\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <AlertDismissButtonSlot>\n <IconButton\n aria-label=\"Dismiss\"\n {...props}\n variant=\"ghost\"\n size=\"2xs\"\n >\n <Clear role=\"img\" />\n </IconButton>\n </AlertDismissButtonSlot>\n );\n // Register it with the parent\n context.setDismiss(slotElement);\n\n // On unmount, remove it\n return () => context.setDismiss(null);\n }\n }, [children, props]);\n\n return null;\n};\n\nAlertDismissButton.displayName = \"Alert.DismissButton\";\n","import { AlertTitle } from \"./components/alert.title\";\nimport { AlertDescription } from \"./components/alert.description\";\nimport { AlertActions } from \"./components/alert.actions\";\nimport { AlertDismissButton } from \"./components/alert.dismiss-button\";\nimport { AlertRoot } from \"./components/alert.root\";\n\n/**\n * Alert\n * ============================================================\n * Provides feedback to the user about the status of an action or system event\n */\nexport const Alert = {\n Root: AlertRoot,\n Title: AlertTitle,\n Description: AlertDescription,\n Actions: AlertActions,\n DismissButton: AlertDismissButton,\n};\n\n// exports for internal use by react-docgen\nexport {\n AlertRoot as _AlertRoot,\n AlertTitle as _AlertTitle,\n AlertDescription as _AlertDescription,\n AlertActions as _AlertActions,\n AlertDismissButton as _AlertDismissButton,\n};\n"],"names":["alertRecipe","defineSlotRecipe","withProvider","withContext","createSlotRecipeContext","AlertRoot","AlertTitle","AlertDescription","AlertIcon","AlertActions","AlertDismissButton","getIconFromTone","tone","ErrorOutline","Info","WarningAmber","CheckCircleOutline","AlertContext","createContext","props","ref","children","restProps","titleNode","setTitle","useState","descriptionNode","setDescription","actionsNode","setActions","dismissNode","setDismiss","contextValue","useMemo","jsx","jsxs","AlertRootSlot","Stack","Box","context","useContext","useEffect","slotElement","AlertTitleSlot","AlertDescriptionSlot","AlertActionsSlot","AlertDismissButtonSlot","IconButton","Clear","Alert"],"mappings":"iUAKaA,EAAcC,EAAAA,iBAAiB,CAC1C,MAAO,CAAC,OAAQ,QAAS,cAAe,OAAQ,UAAW,eAAe,EAE1E,UAAW,eAGX,KAAM,CACJ,KAAM,CACJ,QAAS,cACT,cAAe,MACf,IAAK,MACL,MAAO,MAAA,EAET,KAAM,CACJ,UAAW,KACX,QAAS,CACP,MAAO,MACP,OAAQ,MACR,MAAO,iBAAA,CACT,EAEF,MAAO,CACL,MAAO,iBAAA,EAET,YAAa,CACX,MAAO,iBAAA,CACT,EAGF,SAAU,CACR,KAAM,CACJ,SAAU,CACR,KAAM,CAAE,aAAc,UAAA,CAAW,EAEnC,KAAM,CACJ,KAAM,CAAE,aAAc,MAAA,CAAO,EAE/B,QAAS,CACP,KAAM,CAAE,aAAc,OAAA,CAAQ,EAEhC,SAAU,CACR,KAAM,CAAE,aAAc,UAAA,CAAW,CACnC,EAGF,QAAS,CACP,KAAM,CAAA,EACN,SAAU,CACR,KAAM,CACJ,OAAQ,WACR,YAAa,iBACb,gBAAiB,iBACjB,QAAS,MACT,aAAc,KAAA,CAChB,CACF,CACF,CAEJ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AMH,EAAQ,WAAW,IAAI,CACtC,CACF,EAAG,CAAClB,EAAUF,CAAK,CAAC,EAEb,IACT,EAEAV,EAAa,YAAc,gBCjBpB,MAAMC,EAAqB,CAAC,CACjC,SAAAW,EACA,GAAGF,CACL,IAA+B,CAC7B,MAAMoB,EAAUC,EAAAA,WAAWvB,CAAY,EAEvCwB,OAAAA,EAAAA,UAAU,IAAM,CACd,GAAIF,EAAS,CACX,MAAMG,QACHI,EAAA,CACC,SAAAZ,EAAAA,IAACa,EAAAA,WAAA,CACC,aAAW,UACV,GAAG5B,EACJ,QAAQ,QACR,KAAK,MAEL,SAAAe,EAAAA,IAACc,EAAAA,MAAA,CAAM,KAAK,KAAA,CAAM,CAAA,CAAA,EAEtB,EAGF,OAAAT,EAAQ,WAAWG,CAAW,EAGvB,IAAMH,EAAQ,WAAW,IAAI,CACtC,CACF,EAAG,CAAClB,EAAUF,CAAK,CAAC,EAEb,IACT,EAEAT,EAAmB,YAAc,sBC3B1B,MAAMuC,EAAQ,CACnB,KAAM5C,EACN,MAAOC,EACP,YAAaC,EACb,QAASE,EACT,cAAeC,CACjB"}
@@ -5,7 +5,7 @@ import { c as R } from "./create-slot-recipe-context-DBNItnlK.es.js";
5
5
  import { B as y } from "./box-C8731OYq.es.js";
6
6
  import { S as E } from "./stack-CBx-c8hI.es.js";
7
7
  import { CheckCircleOutline as I, WarningAmber as S, Info as $, ErrorOutline as k, Clear as j } from "@commercetools/nimbus-icons";
8
- import { I as O } from "./icon-button-D2qU4Eun.es.js";
8
+ import { I as O } from "./icon-button-O_dSWgZr.es.js";
9
9
  const W = /* @__PURE__ */ w({
10
10
  slots: ["root", "title", "description", "icon", "actions", "dismissButton"],
11
11
  // Unique class name prefix for the component
@@ -184,4 +184,4 @@ export {
184
184
  D as d,
185
185
  g as e
186
186
  };
187
- //# sourceMappingURL=alert-BvT6yjas.es.js.map
187
+ //# sourceMappingURL=alert-BxQlH4k1.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"alert-BvT6yjas.es.js","sources":["../../src/components/alert/alert.recipe.tsx","../../src/components/alert/alert.slots.tsx","../../src/components/alert/components/alert.root.tsx","../../src/components/alert/components/alert.title.tsx","../../src/components/alert/components/alert.description.tsx","../../src/components/alert/components/alert.actions.tsx","../../src/components/alert/components/alert.dismiss-button.tsx","../../src/components/alert/alert.tsx"],"sourcesContent":["import { defineSlotRecipe } from \"@chakra-ui/react/styled-system\";\n/**\n * Recipe configuration for the Alert component.\n * Defines the styling variants and base styles using Chakra UI's recipe system.\n */\nexport const alertRecipe = defineSlotRecipe({\n slots: [\"root\", \"title\", \"description\", \"icon\", \"actions\", \"dismissButton\"],\n // Unique class name prefix for the component\n className: \"nimbus-alert\",\n\n // Base styles applied to all instances of the component\n base: {\n root: {\n display: \"inline-flex\",\n flexDirection: \"row\",\n gap: \"200\",\n width: \"100%\",\n },\n icon: {\n marginTop: \"50\",\n \"& svg\": {\n width: \"500\",\n height: \"500\",\n color: \"colorPalette.11\",\n },\n },\n title: {\n color: \"colorPalette.11\",\n },\n description: {\n color: \"colorPalette.11\",\n },\n },\n\n variants: {\n tone: {\n critical: {\n root: { colorPalette: \"critical\" },\n },\n info: {\n root: { colorPalette: \"info\" },\n },\n warning: {\n root: { colorPalette: \"amber\" },\n },\n positive: {\n root: { colorPalette: \"positive\" },\n },\n },\n\n variant: {\n flat: {},\n outlined: {\n root: {\n border: \"solid-25\",\n borderColor: \"colorPalette.5\",\n backgroundColor: \"colorPalette.2\",\n padding: \"200\",\n borderRadius: \"200\",\n },\n },\n },\n },\n});\n","import { createSlotRecipeContext } from \"@chakra-ui/react/styled-system\";\nimport { alertRecipe } from \"./alert.recipe\";\nimport type {\n AlertActionsProps,\n AlertDescriptionProps,\n AlertDismissButtonProps,\n AlertIconProps,\n AlertRootProps,\n AlertTitleProps,\n} from \"./alert.types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n recipe: alertRecipe,\n});\n\nexport const AlertRoot = withProvider<HTMLDivElement, AlertRootProps>(\n \"div\",\n \"root\"\n);\n\nexport const AlertTitle = withContext<HTMLDivElement, AlertTitleProps>(\n \"div\",\n \"title\"\n);\n\nexport const AlertDescription = withContext<\n HTMLDivElement,\n AlertDescriptionProps\n>(\"div\", \"description\");\n\nexport const AlertIcon = withContext<HTMLDivElement, AlertIconProps>(\n \"div\",\n \"icon\"\n);\n\nexport const AlertActions = withContext<HTMLDivElement, AlertActionsProps>(\n \"div\",\n \"actions\"\n);\n\n// This is a div wrapper for layout placement - note that we expect it to receive `IconButton` props, but we use a `div`.\n// We then forward the consumer props to the interior `IconButton` component.\nexport const AlertDismissButton = withContext<\n HTMLDivElement,\n AlertDismissButtonProps\n>(\"div\", \"dismissButton\");\n","import { createContext, useMemo, useState, type ReactNode } from \"react\";\nimport { AlertRoot as AlertRootSlot, AlertIcon } from \"../alert.slots\";\nimport type { AlertProps, AlertRootComponent } from \"../alert.types\";\nimport { Box } from \"../../box\";\nimport { Stack } from \"../../stack\";\nimport {\n CheckCircleOutline,\n ErrorOutline,\n Info,\n WarningAmber,\n} from \"@commercetools/nimbus-icons\";\n\nconst getIconFromTone = (tone: AlertProps[\"tone\"]) => {\n switch (tone) {\n case \"critical\":\n return <ErrorOutline />;\n case \"info\":\n return <Info />;\n case \"warning\":\n return <WarningAmber />;\n case \"positive\":\n return <CheckCircleOutline />;\n default:\n return null;\n }\n};\n\ntype AlertContextValue = {\n setTitle: (title: ReactNode) => void;\n setDescription: (description: ReactNode) => void;\n setActions: (actions: ReactNode) => void;\n setDismiss: (dismiss: ReactNode) => void;\n};\n\nexport const AlertContext = createContext<AlertContextValue | undefined>(\n undefined\n);\n\n/**\n * # Alert\n *\n * Provides feedback to the user about the status of an action or system event\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/feedback/alert}\n */\nexport const AlertRoot: AlertRootComponent = (props) => {\n const { ref, children, ...restProps } = props;\n const [titleNode, setTitle] = useState<ReactNode>(null);\n const [descriptionNode, setDescription] = useState<ReactNode>(null);\n const [actionsNode, setActions] = useState<ReactNode>(null);\n const [dismissNode, setDismiss] = useState<ReactNode>(null);\n\n // Memoize the context value so we don't cause unnecessary re-renders\n const contextValue = useMemo(\n () => ({\n setTitle,\n setDescription,\n setActions,\n setDismiss,\n }),\n [setTitle, setDescription, setActions, setDismiss]\n );\n\n return (\n <AlertContext.Provider value={contextValue}>\n <AlertRootSlot ref={ref} {...restProps} role=\"alert\">\n <AlertIcon alignItems=\"flex-start\">\n {getIconFromTone(restProps.tone)}\n </AlertIcon>\n <Stack flex=\"1\" gap=\"200\">\n <Box>\n {titleNode}\n {descriptionNode}\n </Box>\n {actionsNode}\n </Stack>\n {dismissNode}\n\n {children}\n </AlertRootSlot>\n </AlertContext.Provider>\n );\n};\n\nAlertRoot.displayName = \"Alert.Root\";\n","import { useContext, useEffect } from \"react\";\nimport { AlertTitle as AlertTitleSlot } from \"../alert.slots\";\nimport type { AlertTitleProps } from \"../alert.types\";\nimport { AlertContext } from \"./alert.root\";\n\nexport const AlertTitle = ({ children, ...props }: AlertTitleProps) => {\n const context = useContext(AlertContext);\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <AlertTitleSlot {...props} fontWeight=\"600\">\n {children}\n </AlertTitleSlot>\n );\n // Register it with the parent\n context.setTitle(slotElement);\n\n // On unmount, remove it\n return () => context.setTitle(null);\n }\n }, [children, props]);\n\n return null;\n};\n\nAlertTitle.displayName = \"Alert.Title\";\n","import { useContext, useEffect } from \"react\";\nimport { AlertDescription as AlertDescriptionSlot } from \"../alert.slots\";\nimport type { AlertDescriptionProps } from \"../alert.types\";\nimport { AlertContext } from \"./alert.root\";\n\nexport const AlertDescription = ({\n children,\n ...props\n}: AlertDescriptionProps) => {\n const context = useContext(AlertContext);\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <AlertDescriptionSlot {...props}>{children}</AlertDescriptionSlot>\n );\n // Register it with the parent\n context.setDescription(slotElement);\n\n // On unmount, remove it\n return () => context.setDescription(null);\n }\n }, [children, props]);\n\n return null;\n};\n\nAlertDescription.displayName = \"Alert.Description\";\n","import { useContext, useEffect } from \"react\";\nimport { AlertActions as AlertActionsSlot } from \"../alert.slots\";\nimport type { AlertActionsProps } from \"../alert.types\";\nimport { AlertContext } from \"./alert.root\";\n\nexport const AlertActions = ({ children, ...props }: AlertActionsProps) => {\n const context = useContext(AlertContext);\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <AlertActionsSlot {...props}>{children}</AlertActionsSlot>\n );\n // Register it with the parent\n context.setActions(slotElement);\n\n // On unmount, remove it\n return () => context.setActions(null);\n }\n }, [children, props]);\n\n return null;\n};\n\nAlertActions.displayName = \"Alert.Actions\";\n","import { useContext, useEffect } from \"react\";\nimport { AlertDismissButton as AlertDismissButtonSlot } from \"../alert.slots\";\nimport type { AlertDismissButtonProps } from \"../alert.types\";\nimport { Clear } from \"@commercetools/nimbus-icons\";\nimport { IconButton } from \"../../icon-button\";\nimport { AlertContext } from \"./alert.root\";\n\nexport const AlertDismissButton = ({\n children,\n ...props\n}: AlertDismissButtonProps) => {\n const context = useContext(AlertContext);\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <AlertDismissButtonSlot>\n <IconButton\n aria-label=\"Dismiss\"\n {...props}\n variant=\"ghost\"\n size=\"2xs\"\n >\n <Clear role=\"img\" />\n </IconButton>\n </AlertDismissButtonSlot>\n );\n // Register it with the parent\n context.setDismiss(slotElement);\n\n // On unmount, remove it\n return () => context.setDismiss(null);\n }\n }, [children, props]);\n\n return null;\n};\n\nAlertDismissButton.displayName = \"Alert.DismissButton\";\n","import { AlertTitle } from \"./components/alert.title\";\nimport { AlertDescription } from \"./components/alert.description\";\nimport { AlertActions } from \"./components/alert.actions\";\nimport { AlertDismissButton } from \"./components/alert.dismiss-button\";\nimport { AlertRoot } from \"./components/alert.root\";\n\n/**\n * Alert\n * ============================================================\n * Provides feedback to the user about the status of an action or system event\n */\nexport const Alert = {\n Root: AlertRoot,\n Title: AlertTitle,\n Description: AlertDescription,\n Actions: AlertActions,\n DismissButton: AlertDismissButton,\n};\n\n// exports for internal use by react-docgen\nexport {\n AlertRoot as _AlertRoot,\n AlertTitle as _AlertTitle,\n AlertDescription as _AlertDescription,\n AlertActions as _AlertActions,\n AlertDismissButton as _AlertDismissButton,\n};\n"],"names":["alertRecipe","defineSlotRecipe","withProvider","withContext","createSlotRecipeContext","AlertRoot","AlertTitle","AlertDescription","AlertIcon","AlertActions","AlertDismissButton","getIconFromTone","tone","ErrorOutline","Info","WarningAmber","CheckCircleOutline","AlertContext","createContext","props","ref","children","restProps","titleNode","setTitle","useState","descriptionNode","setDescription","actionsNode","setActions","dismissNode","setDismiss","contextValue","useMemo","jsx","jsxs","AlertRootSlot","Stack","Box","context","useContext","useEffect","slotElement","AlertTitleSlot","AlertDescriptionSlot","AlertActionsSlot","AlertDismissButtonSlot","IconButton","Clear","Alert"],"mappings":";;;;;;;;AAKO,MAAMA,IAAc,gBAAAC,EAAiB;AAAA,EAC1C,OAAO,CAAC,QAAQ,SAAS,eAAe,QAAQ,WAAW,eAAe;AAAA;AAAA,EAE1E,WAAW;AAAA;AAAA,EAGX,MAAM;AAAA,IACJ,MAAM;AAAA,MACJ,SAAS;AAAA,MACT,eAAe;AAAA,MACf,KAAK;AAAA,MACL,OAAO;AAAA,IAAA;AAAA,IAET,MAAM;AAAA,MACJ,WAAW;AAAA,MACX,SAAS;AAAA,QACP,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,OAAO;AAAA,MAAA;AAAA,IACT;AAAA,IAEF,OAAO;AAAA,MACL,OAAO;AAAA,IAAA;AAAA,IAET,aAAa;AAAA,MACX,OAAO;AAAA,IAAA;AAAA,EACT;AAAA,EAGF,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,UAAU;AAAA,QACR,MAAM,EAAE,cAAc,WAAA;AAAA,MAAW;AAAA,MAEnC,MAAM;AAAA,QACJ,MAAM,EAAE,cAAc,OAAA;AAAA,MAAO;AAAA,MAE/B,SAAS;AAAA,QACP,MAAM,EAAE,cAAc,QAAA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AAAA,EACP,aAAaC;AAAA,EACb,SAASE;AAAA,EACT,eAAeC;AACjB;"}
1
+ {"version":3,"file":"alert-BxQlH4k1.es.js","sources":["../../src/components/alert/alert.recipe.tsx","../../src/components/alert/alert.slots.tsx","../../src/components/alert/components/alert.root.tsx","../../src/components/alert/components/alert.title.tsx","../../src/components/alert/components/alert.description.tsx","../../src/components/alert/components/alert.actions.tsx","../../src/components/alert/components/alert.dismiss-button.tsx","../../src/components/alert/alert.tsx"],"sourcesContent":["import { defineSlotRecipe } from \"@chakra-ui/react/styled-system\";\n/**\n * Recipe configuration for the Alert component.\n * Defines the styling variants and base styles using Chakra UI's recipe system.\n */\nexport const alertRecipe = defineSlotRecipe({\n slots: [\"root\", \"title\", \"description\", \"icon\", \"actions\", \"dismissButton\"],\n // Unique class name prefix for the component\n className: \"nimbus-alert\",\n\n // Base styles applied to all instances of the component\n base: {\n root: {\n display: \"inline-flex\",\n flexDirection: \"row\",\n gap: \"200\",\n width: \"100%\",\n },\n icon: {\n marginTop: \"50\",\n \"& svg\": {\n width: \"500\",\n height: \"500\",\n color: \"colorPalette.11\",\n },\n },\n title: {\n color: \"colorPalette.11\",\n },\n description: {\n color: \"colorPalette.11\",\n },\n },\n\n variants: {\n tone: {\n critical: {\n root: { colorPalette: \"critical\" },\n },\n info: {\n root: { colorPalette: \"info\" },\n },\n warning: {\n root: { colorPalette: \"amber\" },\n },\n positive: {\n root: { colorPalette: \"positive\" },\n },\n },\n\n variant: {\n flat: {},\n outlined: {\n root: {\n border: \"solid-25\",\n borderColor: \"colorPalette.5\",\n backgroundColor: \"colorPalette.2\",\n padding: \"200\",\n borderRadius: \"200\",\n },\n },\n },\n },\n});\n","import { createSlotRecipeContext } from \"@chakra-ui/react/styled-system\";\nimport { alertRecipe } from \"./alert.recipe\";\nimport type {\n AlertActionsProps,\n AlertDescriptionProps,\n AlertDismissButtonProps,\n AlertIconProps,\n AlertRootProps,\n AlertTitleProps,\n} from \"./alert.types\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n recipe: alertRecipe,\n});\n\nexport const AlertRoot = withProvider<HTMLDivElement, AlertRootProps>(\n \"div\",\n \"root\"\n);\n\nexport const AlertTitle = withContext<HTMLDivElement, AlertTitleProps>(\n \"div\",\n \"title\"\n);\n\nexport const AlertDescription = withContext<\n HTMLDivElement,\n AlertDescriptionProps\n>(\"div\", \"description\");\n\nexport const AlertIcon = withContext<HTMLDivElement, AlertIconProps>(\n \"div\",\n \"icon\"\n);\n\nexport const AlertActions = withContext<HTMLDivElement, AlertActionsProps>(\n \"div\",\n \"actions\"\n);\n\n// This is a div wrapper for layout placement - note that we expect it to receive `IconButton` props, but we use a `div`.\n// We then forward the consumer props to the interior `IconButton` component.\nexport const AlertDismissButton = withContext<\n HTMLDivElement,\n AlertDismissButtonProps\n>(\"div\", \"dismissButton\");\n","import { createContext, useMemo, useState, type ReactNode } from \"react\";\nimport { AlertRoot as AlertRootSlot, AlertIcon } from \"../alert.slots\";\nimport type { AlertProps, AlertRootComponent } from \"../alert.types\";\nimport { Box } from \"../../box\";\nimport { Stack } from \"../../stack\";\nimport {\n CheckCircleOutline,\n ErrorOutline,\n Info,\n WarningAmber,\n} from \"@commercetools/nimbus-icons\";\n\nconst getIconFromTone = (tone: AlertProps[\"tone\"]) => {\n switch (tone) {\n case \"critical\":\n return <ErrorOutline />;\n case \"info\":\n return <Info />;\n case \"warning\":\n return <WarningAmber />;\n case \"positive\":\n return <CheckCircleOutline />;\n default:\n return null;\n }\n};\n\ntype AlertContextValue = {\n setTitle: (title: ReactNode) => void;\n setDescription: (description: ReactNode) => void;\n setActions: (actions: ReactNode) => void;\n setDismiss: (dismiss: ReactNode) => void;\n};\n\nexport const AlertContext = createContext<AlertContextValue | undefined>(\n undefined\n);\n\n/**\n * # Alert\n *\n * Provides feedback to the user about the status of an action or system event\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/feedback/alert}\n */\nexport const AlertRoot: AlertRootComponent = (props) => {\n const { ref, children, ...restProps } = props;\n const [titleNode, setTitle] = useState<ReactNode>(null);\n const [descriptionNode, setDescription] = useState<ReactNode>(null);\n const [actionsNode, setActions] = useState<ReactNode>(null);\n const [dismissNode, setDismiss] = useState<ReactNode>(null);\n\n // Memoize the context value so we don't cause unnecessary re-renders\n const contextValue = useMemo(\n () => ({\n setTitle,\n setDescription,\n setActions,\n setDismiss,\n }),\n [setTitle, setDescription, setActions, setDismiss]\n );\n\n return (\n <AlertContext.Provider value={contextValue}>\n <AlertRootSlot ref={ref} {...restProps} role=\"alert\">\n <AlertIcon alignItems=\"flex-start\">\n {getIconFromTone(restProps.tone)}\n </AlertIcon>\n <Stack flex=\"1\" gap=\"200\">\n <Box>\n {titleNode}\n {descriptionNode}\n </Box>\n {actionsNode}\n </Stack>\n {dismissNode}\n\n {children}\n </AlertRootSlot>\n </AlertContext.Provider>\n );\n};\n\nAlertRoot.displayName = \"Alert.Root\";\n","import { useContext, useEffect } from \"react\";\nimport { AlertTitle as AlertTitleSlot } from \"../alert.slots\";\nimport type { AlertTitleProps } from \"../alert.types\";\nimport { AlertContext } from \"./alert.root\";\n\nexport const AlertTitle = ({ children, ...props }: AlertTitleProps) => {\n const context = useContext(AlertContext);\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <AlertTitleSlot {...props} fontWeight=\"600\">\n {children}\n </AlertTitleSlot>\n );\n // Register it with the parent\n context.setTitle(slotElement);\n\n // On unmount, remove it\n return () => context.setTitle(null);\n }\n }, [children, props]);\n\n return null;\n};\n\nAlertTitle.displayName = \"Alert.Title\";\n","import { useContext, useEffect } from \"react\";\nimport { AlertDescription as AlertDescriptionSlot } from \"../alert.slots\";\nimport type { AlertDescriptionProps } from \"../alert.types\";\nimport { AlertContext } from \"./alert.root\";\n\nexport const AlertDescription = ({\n children,\n ...props\n}: AlertDescriptionProps) => {\n const context = useContext(AlertContext);\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <AlertDescriptionSlot {...props}>{children}</AlertDescriptionSlot>\n );\n // Register it with the parent\n context.setDescription(slotElement);\n\n // On unmount, remove it\n return () => context.setDescription(null);\n }\n }, [children, props]);\n\n return null;\n};\n\nAlertDescription.displayName = \"Alert.Description\";\n","import { useContext, useEffect } from \"react\";\nimport { AlertActions as AlertActionsSlot } from \"../alert.slots\";\nimport type { AlertActionsProps } from \"../alert.types\";\nimport { AlertContext } from \"./alert.root\";\n\nexport const AlertActions = ({ children, ...props }: AlertActionsProps) => {\n const context = useContext(AlertContext);\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <AlertActionsSlot {...props}>{children}</AlertActionsSlot>\n );\n // Register it with the parent\n context.setActions(slotElement);\n\n // On unmount, remove it\n return () => context.setActions(null);\n }\n }, [children, props]);\n\n return null;\n};\n\nAlertActions.displayName = \"Alert.Actions\";\n","import { useContext, useEffect } from \"react\";\nimport { AlertDismissButton as AlertDismissButtonSlot } from \"../alert.slots\";\nimport type { AlertDismissButtonProps } from \"../alert.types\";\nimport { Clear } from \"@commercetools/nimbus-icons\";\nimport { IconButton } from \"../../icon-button\";\nimport { AlertContext } from \"./alert.root\";\n\nexport const AlertDismissButton = ({\n children,\n ...props\n}: AlertDismissButtonProps) => {\n const context = useContext(AlertContext);\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <AlertDismissButtonSlot>\n <IconButton\n aria-label=\"Dismiss\"\n {...props}\n variant=\"ghost\"\n size=\"2xs\"\n >\n <Clear role=\"img\" />\n </IconButton>\n </AlertDismissButtonSlot>\n );\n // Register it with the parent\n context.setDismiss(slotElement);\n\n // On unmount, remove it\n return () => context.setDismiss(null);\n }\n }, [children, props]);\n\n return null;\n};\n\nAlertDismissButton.displayName = \"Alert.DismissButton\";\n","import { AlertTitle } from \"./components/alert.title\";\nimport { AlertDescription } from \"./components/alert.description\";\nimport { AlertActions } from \"./components/alert.actions\";\nimport { AlertDismissButton } from \"./components/alert.dismiss-button\";\nimport { AlertRoot } from \"./components/alert.root\";\n\n/**\n * Alert\n * ============================================================\n * Provides feedback to the user about the status of an action or system event\n */\nexport const Alert = {\n Root: AlertRoot,\n Title: AlertTitle,\n Description: AlertDescription,\n Actions: AlertActions,\n DismissButton: AlertDismissButton,\n};\n\n// exports for internal use by react-docgen\nexport {\n AlertRoot as _AlertRoot,\n AlertTitle as _AlertTitle,\n AlertDescription as _AlertDescription,\n AlertActions as _AlertActions,\n AlertDismissButton as _AlertDismissButton,\n};\n"],"names":["alertRecipe","defineSlotRecipe","withProvider","withContext","createSlotRecipeContext","AlertRoot","AlertTitle","AlertDescription","AlertIcon","AlertActions","AlertDismissButton","getIconFromTone","tone","ErrorOutline","Info","WarningAmber","CheckCircleOutline","AlertContext","createContext","props","ref","children","restProps","titleNode","setTitle","useState","descriptionNode","setDescription","actionsNode","setActions","dismissNode","setDismiss","contextValue","useMemo","jsx","jsxs","AlertRootSlot","Stack","Box","context","useContext","useEffect","slotElement","AlertTitleSlot","AlertDescriptionSlot","AlertActionsSlot","AlertDismissButtonSlot","IconButton","Clear","Alert"],"mappings":";;;;;;;;AAKO,MAAMA,IAAc,gBAAAC,EAAiB;AAAA,EAC1C,OAAO,CAAC,QAAQ,SAAS,eAAe,QAAQ,WAAW,eAAe;AAAA;AAAA,EAE1E,WAAW;AAAA;AAAA,EAGX,MAAM;AAAA,IACJ,MAAM;AAAA,MACJ,SAAS;AAAA,MACT,eAAe;AAAA,MACf,KAAK;AAAA,MACL,OAAO;AAAA,IAAA;AAAA,IAET,MAAM;AAAA,MACJ,WAAW;AAAA,MACX,SAAS;AAAA,QACP,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,OAAO;AAAA,MAAA;AAAA,IACT;AAAA,IAEF,OAAO;AAAA,MACL,OAAO;AAAA,IAAA;AAAA,IAET,aAAa;AAAA,MACX,OAAO;AAAA,IAAA;AAAA,EACT;AAAA,EAGF,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,UAAU;AAAA,QACR,MAAM,EAAE,cAAc,WAAA;AAAA,MAAW;AAAA,MAEnC,MAAM;AAAA,QACJ,MAAM,EA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EAT,EAAmB,cAAc;AC3B1B,MAAMuC,KAAQ;AAAA,EACnB,MAAM5C;AAAA,EACN,OAAOC;AAAA,EACP,aAAaC;AAAA,EACb,SAASE;AAAA,EACT,eAAeC;AACjB;"}
@@ -5,7 +5,7 @@ import { $ as b } from "./utils-BkdW_cdL.es.js";
5
5
  import { mergeRefs as l } from "@chakra-ui/react";
6
6
  import { b as u } from "./button.recipe-D9e9Gh9L.es.js";
7
7
  import { b as x } from "./factory-BpxiKxSs.es.js";
8
- import { s as P } from "./index-BDmBxsjm.es.js";
8
+ import { s as P } from "./index-DRWeBbu8.es.js";
9
9
  import { c as R } from "./create-recipe-context-i2odau3L.es.js";
10
10
  import { $ as h } from "./useObjectRef-CaJ5pgjX.es.js";
11
11
  import { $ as y } from "./mergeProps-B_9syxhT.es.js";
@@ -54,4 +54,4 @@ V.displayName = "Button";
54
54
  export {
55
55
  V as B
56
56
  };
57
- //# sourceMappingURL=button-Bg73nQk3.es.js.map
57
+ //# sourceMappingURL=button-B4HX0fM_.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"button-Bg73nQk3.es.js","sources":["../../src/components/button/button.slots.tsx","../../src/components/button/button.tsx"],"sourcesContent":["import {\n type HTMLChakraProps,\n type RecipeProps,\n type UnstyledProp,\n createRecipeContext,\n} from \"@chakra-ui/react/styled-system\";\nimport { buttonRecipe } from \"./button.recipe\";\nimport shouldForwardProp from \"@emotion/is-prop-valid\";\nimport { system } from \"@/theme\";\n\n/**\n * Base recipe props interface that combines Chakra UI's recipe props\n * with the unstyled prop option for the button element.\n */\ninterface ButtonRecipeProps extends RecipeProps<\"button\">, UnstyledProp {}\n\n/**\n * Root props interface that extends Chakra's HTML props with our recipe props.\n * This creates a complete set of props for the root element, combining\n * HTML attributes, Chakra's styling system, and our custom recipe props.\n */\nexport interface ButtonRootProps\n extends Omit<HTMLChakraProps<\"button\", ButtonRecipeProps>, \"slot\"> {\n // insure that the `ButtonRoot` component doesn't give a type error\n slot?: string | null | undefined;\n}\n\nconst { withContext } = createRecipeContext({\n recipe: buttonRecipe,\n});\n\n/**\n * Root component that provides the styling context for the Button component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const ButtonRoot = withContext<HTMLButtonElement, ButtonRootProps>(\n \"button\",\n {\n defaultProps: {\n type: \"button\",\n },\n /** make sure the `onPress` properties won't end up as attribute on the rendered DOM element */\n shouldForwardProp(prop, variantKeys) {\n const chakraSfp =\n !variantKeys?.includes(prop) && !system.isValidProperty(prop);\n return shouldForwardProp(prop) && chakraSfp && !prop.includes(\"onPress\");\n },\n }\n);\n","import { useRef } from \"react\";\nimport { useButton, useObjectRef, mergeProps } from \"react-aria\";\nimport { ButtonContext, useContextProps } from \"react-aria-components\";\nimport { mergeRefs } from \"@chakra-ui/react\";\nimport { ButtonRoot } from \"./button.slots.tsx\";\nimport type { ButtonProps } from \"./button.types.ts\";\n\n/**\n * # Button\n *\n * Displays a Button.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/button}\n */\nexport const Button = (props: ButtonProps) => {\n const { ref: forwardedRef, as, asChild, children, ...rest } = props;\n\n // create a local ref (because the consumer may not provide a forwardedRef)\n const localRef = useRef<HTMLButtonElement>(null);\n // merge the local ref with a potentially forwarded ref\n const ref = useObjectRef(mergeRefs(localRef, forwardedRef));\n\n // Consume context props based on slot (this enables slot-aware behavior)\n const [contextProps] = useContextProps(rest, ref, ButtonContext);\n\n // if asChild is set, for react-aria to add the button-role, the elementType\n // has to be manually set to something else than button\n\n const elementType = as || (asChild ? \"a\" : \"button\") || \"button\";\n\n const { buttonProps } = useButton(\n {\n ...contextProps,\n elementType,\n },\n ref\n );\n\n return (\n <ButtonRoot\n {...mergeProps(contextProps, buttonProps, {\n as,\n asChild,\n /**\n * In case `slot` was null, the `useContextProps` hook already\n * processed it at this point, so it's safe to not attach it\n * to the DOM element\n */\n slot: contextProps.slot || undefined,\n })}\n ref={ref}\n >\n {children}\n </ButtonRoot>\n );\n};\n\n// Manually assign a displayName for debugging purposes\nButton.displayName = \"Button\";\n"],"names":["withContext","createRecipeContext","buttonRecipe","ButtonRoot","prop","variantKeys","chakraSfp","system","shouldForwardProp","Button","props","forwardedRef","as","asChild","children","rest","localRef","useRef","ref","useObjectRef","mergeRefs","contextProps","useContextProps","ButtonContext","elementType","buttonProps","useButton","jsx","mergeProps"],"mappings":";;;;;;;;;;;;AA2BA,MAAM,EAAE,aAAAA,EAAA,IAAgB,gBAAAC,EAAoB;AAAA,EAC1C,QAAQC;AACV,CAAC,GAMYC,IAAa,gBAAAH;AAAA,EACxB;AAAA,EACA;AAAA,IACE,cAAc;AAAA,MACZ,MAAM;AAAA,IAAA;AAAA;AAAA,IAGR,kBAAkBI,GAAMC,GAAa;AACnC,YAAMC,IACJ,CAACD,GAAa,SAASD,CAAI,KAAK,CAACG,EAAO,gBAAgBH,CAAI;AAC9D,aAAOI,EAAkBJ,CAAI,KAAKE,KAAa,CAACF,EAAK,SAAS,SAAS;AAAA,IACzE;AAAA,EAAA;AAEJ,GClCaK,IAAS,CAACC,MAAuB;AAC5C,QAAM,EAAE,KAAKC,GAAc,IAAAC,GAAI,SAAAC,GAAS,UAAAC,GAAU,GAAGC,MAASL,GAGxDM,IAAWC,EAA0B,IAAI,GAEzCC,IAAMC,EAAaC,EAAUJ,GAAUL,CAAY,CAAC,GAGpD,CAACU,CAAY,IAAIC,EAAgBP,GAAMG,GAAKK,CAAa,GAKzDC,IAAcZ,MAAOC,IAAU,MAAM,WAErC,EAAE,aAAAY,MAAgBC;AAAAA,IACtB;AAAA,MACE,GAAGL;AAAA,MACH,aAAAG;AAAA,IAAA;AAAA,IAEFN;AAAA,EAAA;AAGF,SACE,gBAAAS;AAAA,IAACxB;AAAA,IAAA;AAAA,MACE,GAAGyB,EAAWP,GAAcI,GAAa;AAAA,QACxC,IAAAb;AAAA,QACA,SAAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAMA,MAAMQ,EAAa,QAAQ;AAAA,MAAA,CAC5B;AAAA,MACD,KAAAH;AAAA,MAEC,UAAAJ;AAAA,IAAA;AAAA,EAAA;AAGP;AAGAL,EAAO,cAAc;"}
1
+ {"version":3,"file":"button-B4HX0fM_.es.js","sources":["../../src/components/button/button.slots.tsx","../../src/components/button/button.tsx"],"sourcesContent":["import {\n type HTMLChakraProps,\n type RecipeProps,\n type UnstyledProp,\n createRecipeContext,\n} from \"@chakra-ui/react/styled-system\";\nimport { buttonRecipe } from \"./button.recipe\";\nimport shouldForwardProp from \"@emotion/is-prop-valid\";\nimport { system } from \"@/theme\";\n\n/**\n * Base recipe props interface that combines Chakra UI's recipe props\n * with the unstyled prop option for the button element.\n */\ninterface ButtonRecipeProps extends RecipeProps<\"button\">, UnstyledProp {}\n\n/**\n * Root props interface that extends Chakra's HTML props with our recipe props.\n * This creates a complete set of props for the root element, combining\n * HTML attributes, Chakra's styling system, and our custom recipe props.\n */\nexport interface ButtonRootProps\n extends Omit<HTMLChakraProps<\"button\", ButtonRecipeProps>, \"slot\"> {\n // insure that the `ButtonRoot` component doesn't give a type error\n slot?: string | null | undefined;\n}\n\nconst { withContext } = createRecipeContext({\n recipe: buttonRecipe,\n});\n\n/**\n * Root component that provides the styling context for the Button component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const ButtonRoot = withContext<HTMLButtonElement, ButtonRootProps>(\n \"button\",\n {\n defaultProps: {\n type: \"button\",\n },\n /** make sure the `onPress` properties won't end up as attribute on the rendered DOM element */\n shouldForwardProp(prop, variantKeys) {\n const chakraSfp =\n !variantKeys?.includes(prop) && !system.isValidProperty(prop);\n return shouldForwardProp(prop) && chakraSfp && !prop.includes(\"onPress\");\n },\n }\n);\n","import { useRef } from \"react\";\nimport { useButton, useObjectRef, mergeProps } from \"react-aria\";\nimport { ButtonContext, useContextProps } from \"react-aria-components\";\nimport { mergeRefs } from \"@chakra-ui/react\";\nimport { ButtonRoot } from \"./button.slots.tsx\";\nimport type { ButtonProps } from \"./button.types.ts\";\n\n/**\n * # Button\n *\n * Displays a Button.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/button}\n */\nexport const Button = (props: ButtonProps) => {\n const { ref: forwardedRef, as, asChild, children, ...rest } = props;\n\n // create a local ref (because the consumer may not provide a forwardedRef)\n const localRef = useRef<HTMLButtonElement>(null);\n // merge the local ref with a potentially forwarded ref\n const ref = useObjectRef(mergeRefs(localRef, forwardedRef));\n\n // Consume context props based on slot (this enables slot-aware behavior)\n const [contextProps] = useContextProps(rest, ref, ButtonContext);\n\n // if asChild is set, for react-aria to add the button-role, the elementType\n // has to be manually set to something else than button\n\n const elementType = as || (asChild ? \"a\" : \"button\") || \"button\";\n\n const { buttonProps } = useButton(\n {\n ...contextProps,\n elementType,\n },\n ref\n );\n\n return (\n <ButtonRoot\n {...mergeProps(contextProps, buttonProps, {\n as,\n asChild,\n /**\n * In case `slot` was null, the `useContextProps` hook already\n * processed it at this point, so it's safe to not attach it\n * to the DOM element\n */\n slot: contextProps.slot || undefined,\n })}\n ref={ref}\n >\n {children}\n </ButtonRoot>\n );\n};\n\n// Manually assign a displayName for debugging purposes\nButton.displayName = \"Button\";\n"],"names":["withContext","createRecipeContext","buttonRecipe","ButtonRoot","prop","variantKeys","chakraSfp","system","shouldForwardProp","Button","props","forwardedRef","as","asChild","children","rest","localRef","useRef","ref","useObjectRef","mergeRefs","contextProps","useContextProps","ButtonContext","elementType","buttonProps","useButton","jsx","mergeProps"],"mappings":";;;;;;;;;;;;AA2BA,MAAM,EAAE,aAAAA,EAAA,IAAgB,gBAAAC,EAAoB;AAAA,EAC1C,QAAQC;AACV,CAAC,GAMYC,IAAa,gBAAAH;AAAA,EACxB;AAAA,EACA;AAAA,IACE,cAAc;AAAA,MACZ,MAAM;AAAA,IAAA;AAAA;AAAA,IAGR,kBAAkBI,GAAMC,GAAa;AACnC,YAAMC,IACJ,CAACD,GAAa,SAASD,CAAI,KAAK,CAACG,EAAO,gBAAgBH,CAAI;AAC9D,aAAOI,EAAkBJ,CAAI,KAAKE,KAAa,CAACF,EAAK,SAAS,SAAS;AAAA,IACzE;AAAA,EAAA;AAEJ,GClCaK,IAAS,CAACC,MAAuB;AAC5C,QAAM,EAAE,KAAKC,GAAc,IAAAC,GAAI,SAAAC,GAAS,UAAAC,GAAU,GAAGC,MAASL,GAGxDM,IAAWC,EAA0B,IAAI,GAEzCC,IAAMC,EAAaC,EAAUJ,GAAUL,CAAY,CAAC,GAGpD,CAACU,CAAY,IAAIC,EAAgBP,GAAMG,GAAKK,CAAa,GAKzDC,IAAcZ,MAAOC,IAAU,MAAM,WAErC,EAAE,aAAAY,MAAgBC;AAAAA,IACtB;AAAA,MACE,GAAGL;AAAA,MACH,aAAAG;AAAA,IAAA;AAAA,IAEFN;AAAA,EAAA;AAGF,SACE,gBAAAS;AAAA,IAACxB;AAAA,IAAA;AAAA,MACE,GAAGyB,EAAWP,GAAcI,GAAa;AAAA,QACxC,IAAAb;AAAA,QACA,SAAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAMA,MAAMQ,EAAa,QAAQ;AAAA,MAAA,CAC5B;AAAA,MACD,KAAAH;AAAA,MAEC,UAAAJ;AAAA,IAAA;AAAA,EAAA;AAGP;AAGAL,EAAO,cAAc;"}
@@ -1,2 +1,2 @@
1
- "use strict";const l=require("react/jsx-runtime"),b=require("react"),$=require("./Button-DQ_WkLNH.cjs.js"),p=require("./utils-BHdR5Nww.cjs.js"),q=require("@chakra-ui/react"),x=require("./button.recipe-ClPhJ93N.cjs.js"),R=require("./factory-DlCuwIGL.cjs.js"),P=require("./index-XyB4gGC8.cjs.js"),m=require("./create-recipe-context-D0_lCuqq.cjs.js"),y=require("./useObjectRef-dXOJdONs.cjs.js"),B=require("./mergeProps-BA5Cwf5w.cjs.js"),h=require("./useButton-D3BedLtL.cjs.js"),{withContext:C}=m.createRecipeContext({recipe:x.buttonRecipe}),j=C("button",{defaultProps:{type:"button"},shouldForwardProp(e,o){const t=!o?.includes(e)&&!P.system.isValidProperty(e);return R.isPropValid(e)&&t&&!e.includes("onPress")}}),n=e=>{const{ref:o,as:t,asChild:s,children:u,...i}=e,a=b.useRef(null),r=y.$df56164dff5785e2$export$4338b53315abf666(q.mergeRefs(a,o)),[c]=p.$64fa3d84918910a7$export$29f1550f4b0d4415(i,r,$.$d2b4bc8c273e7be6$export$24d547caef80ccd1),d=t||(s?"a":"button"),{buttonProps:f}=h.$701a24aa0da5b062$export$ea18c227d4417cc3({...c,elementType:d},r);return l.jsx(j,{...B.$3ef42575df84b30b$export$9d1611c77c2fe928(c,f,{as:t,asChild:s,slot:c.slot||void 0}),ref:r,children:u})};n.displayName="Button";exports.Button=n;
2
- //# sourceMappingURL=button-BiBXrCVh.cjs.js.map
1
+ "use strict";const l=require("react/jsx-runtime"),b=require("react"),$=require("./Button-DQ_WkLNH.cjs.js"),p=require("./utils-BHdR5Nww.cjs.js"),q=require("@chakra-ui/react"),x=require("./button.recipe-ClPhJ93N.cjs.js"),R=require("./factory-DlCuwIGL.cjs.js"),P=require("./index-COhQ_99G.cjs.js"),m=require("./create-recipe-context-D0_lCuqq.cjs.js"),y=require("./useObjectRef-dXOJdONs.cjs.js"),B=require("./mergeProps-BA5Cwf5w.cjs.js"),h=require("./useButton-D3BedLtL.cjs.js"),{withContext:C}=m.createRecipeContext({recipe:x.buttonRecipe}),j=C("button",{defaultProps:{type:"button"},shouldForwardProp(e,o){const t=!o?.includes(e)&&!P.system.isValidProperty(e);return R.isPropValid(e)&&t&&!e.includes("onPress")}}),n=e=>{const{ref:o,as:t,asChild:s,children:u,...i}=e,a=b.useRef(null),r=y.$df56164dff5785e2$export$4338b53315abf666(q.mergeRefs(a,o)),[c]=p.$64fa3d84918910a7$export$29f1550f4b0d4415(i,r,$.$d2b4bc8c273e7be6$export$24d547caef80ccd1),d=t||(s?"a":"button"),{buttonProps:f}=h.$701a24aa0da5b062$export$ea18c227d4417cc3({...c,elementType:d},r);return l.jsx(j,{...B.$3ef42575df84b30b$export$9d1611c77c2fe928(c,f,{as:t,asChild:s,slot:c.slot||void 0}),ref:r,children:u})};n.displayName="Button";exports.Button=n;
2
+ //# sourceMappingURL=button-qv44IWcR.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"button-BiBXrCVh.cjs.js","sources":["../../src/components/button/button.slots.tsx","../../src/components/button/button.tsx"],"sourcesContent":["import {\n type HTMLChakraProps,\n type RecipeProps,\n type UnstyledProp,\n createRecipeContext,\n} from \"@chakra-ui/react/styled-system\";\nimport { buttonRecipe } from \"./button.recipe\";\nimport shouldForwardProp from \"@emotion/is-prop-valid\";\nimport { system } from \"@/theme\";\n\n/**\n * Base recipe props interface that combines Chakra UI's recipe props\n * with the unstyled prop option for the button element.\n */\ninterface ButtonRecipeProps extends RecipeProps<\"button\">, UnstyledProp {}\n\n/**\n * Root props interface that extends Chakra's HTML props with our recipe props.\n * This creates a complete set of props for the root element, combining\n * HTML attributes, Chakra's styling system, and our custom recipe props.\n */\nexport interface ButtonRootProps\n extends Omit<HTMLChakraProps<\"button\", ButtonRecipeProps>, \"slot\"> {\n // insure that the `ButtonRoot` component doesn't give a type error\n slot?: string | null | undefined;\n}\n\nconst { withContext } = createRecipeContext({\n recipe: buttonRecipe,\n});\n\n/**\n * Root component that provides the styling context for the Button component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const ButtonRoot = withContext<HTMLButtonElement, ButtonRootProps>(\n \"button\",\n {\n defaultProps: {\n type: \"button\",\n },\n /** make sure the `onPress` properties won't end up as attribute on the rendered DOM element */\n shouldForwardProp(prop, variantKeys) {\n const chakraSfp =\n !variantKeys?.includes(prop) && !system.isValidProperty(prop);\n return shouldForwardProp(prop) && chakraSfp && !prop.includes(\"onPress\");\n },\n }\n);\n","import { useRef } from \"react\";\nimport { useButton, useObjectRef, mergeProps } from \"react-aria\";\nimport { ButtonContext, useContextProps } from \"react-aria-components\";\nimport { mergeRefs } from \"@chakra-ui/react\";\nimport { ButtonRoot } from \"./button.slots.tsx\";\nimport type { ButtonProps } from \"./button.types.ts\";\n\n/**\n * # Button\n *\n * Displays a Button.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/button}\n */\nexport const Button = (props: ButtonProps) => {\n const { ref: forwardedRef, as, asChild, children, ...rest } = props;\n\n // create a local ref (because the consumer may not provide a forwardedRef)\n const localRef = useRef<HTMLButtonElement>(null);\n // merge the local ref with a potentially forwarded ref\n const ref = useObjectRef(mergeRefs(localRef, forwardedRef));\n\n // Consume context props based on slot (this enables slot-aware behavior)\n const [contextProps] = useContextProps(rest, ref, ButtonContext);\n\n // if asChild is set, for react-aria to add the button-role, the elementType\n // has to be manually set to something else than button\n\n const elementType = as || (asChild ? \"a\" : \"button\") || \"button\";\n\n const { buttonProps } = useButton(\n {\n ...contextProps,\n elementType,\n },\n ref\n );\n\n return (\n <ButtonRoot\n {...mergeProps(contextProps, buttonProps, {\n as,\n asChild,\n /**\n * In case `slot` was null, the `useContextProps` hook already\n * processed it at this point, so it's safe to not attach it\n * to the DOM element\n */\n slot: contextProps.slot || undefined,\n })}\n ref={ref}\n >\n {children}\n </ButtonRoot>\n );\n};\n\n// Manually assign a displayName for debugging purposes\nButton.displayName = \"Button\";\n"],"names":["withContext","createRecipeContext","buttonRecipe","ButtonRoot","prop","variantKeys","chakraSfp","system","shouldForwardProp","Button","props","forwardedRef","as","asChild","children","rest","localRef","useRef","ref","useObjectRef","mergeRefs","contextProps","useContextProps","ButtonContext","elementType","buttonProps","useButton","jsx","mergeProps"],"mappings":"2dA2BM,CAAE,YAAAA,CAAA,EAAgBC,sBAAoB,CAC1C,OAAQC,EAAAA,YACV,CAAC,EAMYC,EAAaH,EACxB,SACA,CACE,aAAc,CACZ,KAAM,QAAA,EAGR,kBAAkBI,EAAMC,EAAa,CACnC,MAAMC,EACJ,CAACD,GAAa,SAASD,CAAI,GAAK,CAACG,EAAAA,OAAO,gBAAgBH,CAAI,EAC9D,OAAOI,EAAAA,YAAkBJ,CAAI,GAAKE,GAAa,CAACF,EAAK,SAAS,SAAS,CACzE,CAAA,CAEJ,EClCaK,EAAUC,GAAuB,CAC5C,KAAM,CAAE,IAAKC,EAAc,GAAAC,EAAI,QAAAC,EAAS,SAAAC,EAAU,GAAGC,GAASL,EAGxDM,EAAWC,EAAAA,OAA0B,IAAI,EAEzCC,EAAMC,EAAAA,0CAAaC,EAAAA,UAAUJ,EAAUL,CAAY,CAAC,EAGpD,CAACU,CAAY,EAAIC,EAAAA,0CAAgBP,EAAMG,EAAKK,EAAAA,yCAAa,EAKzDC,EAAcZ,IAAOC,EAAU,IAAM,UAErC,CAAE,YAAAY,GAAgBC,EAAAA,0CACtB,CACE,GAAGL,EACH,YAAAG,CAAA,EAEFN,CAAA,EAGF,OACES,EAAAA,IAACxB,EAAA,CACE,GAAGyB,EAAAA,0CAAWP,EAAcI,EAAa,CACxC,GAAAb,EACA,QAAAC,EAMA,KAAMQ,EAAa,MAAQ,MAAA,CAC5B,EACD,IAAAH,EAEC,SAAAJ,CAAA,CAAA,CAGP,EAGAL,EAAO,YAAc"}
1
+ {"version":3,"file":"button-qv44IWcR.cjs.js","sources":["../../src/components/button/button.slots.tsx","../../src/components/button/button.tsx"],"sourcesContent":["import {\n type HTMLChakraProps,\n type RecipeProps,\n type UnstyledProp,\n createRecipeContext,\n} from \"@chakra-ui/react/styled-system\";\nimport { buttonRecipe } from \"./button.recipe\";\nimport shouldForwardProp from \"@emotion/is-prop-valid\";\nimport { system } from \"@/theme\";\n\n/**\n * Base recipe props interface that combines Chakra UI's recipe props\n * with the unstyled prop option for the button element.\n */\ninterface ButtonRecipeProps extends RecipeProps<\"button\">, UnstyledProp {}\n\n/**\n * Root props interface that extends Chakra's HTML props with our recipe props.\n * This creates a complete set of props for the root element, combining\n * HTML attributes, Chakra's styling system, and our custom recipe props.\n */\nexport interface ButtonRootProps\n extends Omit<HTMLChakraProps<\"button\", ButtonRecipeProps>, \"slot\"> {\n // insure that the `ButtonRoot` component doesn't give a type error\n slot?: string | null | undefined;\n}\n\nconst { withContext } = createRecipeContext({\n recipe: buttonRecipe,\n});\n\n/**\n * Root component that provides the styling context for the Button component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const ButtonRoot = withContext<HTMLButtonElement, ButtonRootProps>(\n \"button\",\n {\n defaultProps: {\n type: \"button\",\n },\n /** make sure the `onPress` properties won't end up as attribute on the rendered DOM element */\n shouldForwardProp(prop, variantKeys) {\n const chakraSfp =\n !variantKeys?.includes(prop) && !system.isValidProperty(prop);\n return shouldForwardProp(prop) && chakraSfp && !prop.includes(\"onPress\");\n },\n }\n);\n","import { useRef } from \"react\";\nimport { useButton, useObjectRef, mergeProps } from \"react-aria\";\nimport { ButtonContext, useContextProps } from \"react-aria-components\";\nimport { mergeRefs } from \"@chakra-ui/react\";\nimport { ButtonRoot } from \"./button.slots.tsx\";\nimport type { ButtonProps } from \"./button.types.ts\";\n\n/**\n * # Button\n *\n * Displays a Button.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/button}\n */\nexport const Button = (props: ButtonProps) => {\n const { ref: forwardedRef, as, asChild, children, ...rest } = props;\n\n // create a local ref (because the consumer may not provide a forwardedRef)\n const localRef = useRef<HTMLButtonElement>(null);\n // merge the local ref with a potentially forwarded ref\n const ref = useObjectRef(mergeRefs(localRef, forwardedRef));\n\n // Consume context props based on slot (this enables slot-aware behavior)\n const [contextProps] = useContextProps(rest, ref, ButtonContext);\n\n // if asChild is set, for react-aria to add the button-role, the elementType\n // has to be manually set to something else than button\n\n const elementType = as || (asChild ? \"a\" : \"button\") || \"button\";\n\n const { buttonProps } = useButton(\n {\n ...contextProps,\n elementType,\n },\n ref\n );\n\n return (\n <ButtonRoot\n {...mergeProps(contextProps, buttonProps, {\n as,\n asChild,\n /**\n * In case `slot` was null, the `useContextProps` hook already\n * processed it at this point, so it's safe to not attach it\n * to the DOM element\n */\n slot: contextProps.slot || undefined,\n })}\n ref={ref}\n >\n {children}\n </ButtonRoot>\n );\n};\n\n// Manually assign a displayName for debugging purposes\nButton.displayName = \"Button\";\n"],"names":["withContext","createRecipeContext","buttonRecipe","ButtonRoot","prop","variantKeys","chakraSfp","system","shouldForwardProp","Button","props","forwardedRef","as","asChild","children","rest","localRef","useRef","ref","useObjectRef","mergeRefs","contextProps","useContextProps","ButtonContext","elementType","buttonProps","useButton","jsx","mergeProps"],"mappings":"2dA2BM,CAAE,YAAAA,CAAA,EAAgBC,sBAAoB,CAC1C,OAAQC,EAAAA,YACV,CAAC,EAMYC,EAAaH,EACxB,SACA,CACE,aAAc,CACZ,KAAM,QAAA,EAGR,kBAAkBI,EAAMC,EAAa,CACnC,MAAMC,EACJ,CAACD,GAAa,SAASD,CAAI,GAAK,CAACG,EAAAA,OAAO,gBAAgBH,CAAI,EAC9D,OAAOI,EAAAA,YAAkBJ,CAAI,GAAKE,GAAa,CAACF,EAAK,SAAS,SAAS,CACzE,CAAA,CAEJ,EClCaK,EAAUC,GAAuB,CAC5C,KAAM,CAAE,IAAKC,EAAc,GAAAC,EAAI,QAAAC,EAAS,SAAAC,EAAU,GAAGC,GAASL,EAGxDM,EAAWC,EAAAA,OAA0B,IAAI,EAEzCC,EAAMC,EAAAA,0CAAaC,EAAAA,UAAUJ,EAAUL,CAAY,CAAC,EAGpD,CAACU,CAAY,EAAIC,EAAAA,0CAAgBP,EAAMG,EAAKK,EAAAA,yCAAa,EAKzDC,EAAcZ,IAAOC,EAAU,IAAM,UAErC,CAAE,YAAAY,GAAgBC,EAAAA,0CACtB,CACE,GAAGL,EACH,YAAAG,CAAA,EAEFN,CAAA,EAGF,OACES,EAAAA,IAACxB,EAAA,CACE,GAAGyB,EAAAA,0CAAWP,EAAcI,EAAa,CACxC,GAAAb,EACA,QAAAC,EAMA,KAAMQ,EAAa,MAAQ,MAAA,CAC5B,EACD,IAAAH,EAEC,SAAAJ,CAAA,CAAA,CAGP,EAGAL,EAAO,YAAc"}
@@ -6,14 +6,14 @@ import { $ as M, a as i } from "./useDateFormatter-D9HBAX1w.es.js";
6
6
  import { c as D, d as N } from "./utils-BkdW_cdL.es.js";
7
7
  import { B as P } from "./box-C8731OYq.es.js";
8
8
  import { $ as R } from "./context-Pt-0ojuK.es.js";
9
- import { I as h } from "./icon-button-D2qU4Eun.es.js";
9
+ import { I as h } from "./icon-button-O_dSWgZr.es.js";
10
10
  import { T as u } from "./text-B2wziCK6.es.js";
11
11
  import { S as x } from "./stack-CBx-c8hI.es.js";
12
12
  import { V as z } from "./visually-hidden-vh07nrZa.es.js";
13
13
  import { KeyboardArrowLeft as y, KeyboardArrowRight as C } from "@commercetools/nimbus-icons";
14
14
  import { F as k } from "./flex-B81RbgfK.es.js";
15
- import { g as V } from "./index-BDmBxsjm.es.js";
16
- import { e as K } from "./extractStyleProps-BEa9kwlY.es.js";
15
+ import { h as V } from "./index-DRWeBbu8.es.js";
16
+ import { e as K } from "./extractStyleProps-DX5GBd9K.es.js";
17
17
  import { $ as g } from "./Button-C-yUWwZg.es.js";
18
18
  import { $ as v } from "./Text-DOcU1ycg.es.js";
19
19
  import { u as W } from "./use-recipe-CR4W7Dne.es.js";
@@ -184,4 +184,4 @@ const { withProvider: _, withContext: n } = /* @__PURE__ */ L({
184
184
  export {
185
185
  ve as C
186
186
  };
187
- //# sourceMappingURL=calendar-Co4TTkzj.es.js.map
187
+ //# sourceMappingURL=calendar-DABzfMco.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"calendar-Co4TTkzj.es.js","sources":["../../src/components/calendar/calendar.slots.tsx","../../src/components/calendar/components/calendar.grids.tsx","../../src/components/calendar/components/calendar.header.tsx","../../src/components/calendar/components/calendar.custom-context.tsx","../../src/components/calendar/calendar.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-empty-object-type */\nimport {\n createSlotRecipeContext,\n type HTMLChakraProps,\n type RecipeVariantProps,\n} from \"@chakra-ui/react/styled-system\";\nimport { calendarSlotRecipe } from \"./calendar.recipe\";\nimport type { CalendarProps } from \"react-aria-components\";\nimport type { DateValue } from \"@internationalized/date\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"calendar\",\n});\n\nexport interface CalendarRootSlotProps\n extends HTMLChakraProps<\n \"div\",\n RecipeVariantProps<typeof calendarSlotRecipe> & CalendarProps<DateValue>\n > {}\nexport const CalendarRootSlot = withProvider<\n HTMLDivElement,\n CalendarRootSlotProps\n>(\"div\", \"root\");\n\nexport interface CalendarHeaderSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const CalendarHeaderSlot = withContext<\n HTMLDivElement,\n CalendarHeaderSlotProps\n>(\"div\", \"header\");\n\nexport interface CalendarGridsSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const CalendarGridsSlot = withContext<\n HTMLDivElement,\n CalendarGridsSlotProps\n>(\"div\", \"grids\");\n\nexport interface CalendarMonthTitleSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const CalendarMonthTitleSlot = withContext<\n HTMLDivElement,\n CalendarMonthTitleSlotProps\n>(\"div\", \"monthTitle\");\n\nexport interface CalendarGridSlotProps extends HTMLChakraProps<\"table\"> {}\nexport const CalendarGridSlot = withContext<\n HTMLTableElement,\n CalendarGridSlotProps\n>(\"table\", \"grid\");\n\nexport interface CalendarGridHeaderSlotProps extends HTMLChakraProps<\"thead\"> {}\nexport const CalendarGridHeaderSlot = withContext<\n HTMLTableSectionElement,\n CalendarGridHeaderSlotProps\n>(\"thead\", \"gridHeader\");\n\nexport interface CalendarHeaderCellSlotProps extends HTMLChakraProps<\"th\"> {}\nexport const CalendarHeaderCellSlot = withContext<\n HTMLTableCellElement,\n CalendarHeaderCellSlotProps\n>(\"th\", \"headerCell\");\n\nexport interface CalendarGridBodySlotProps extends HTMLChakraProps<\"tbody\"> {}\nexport const CalendarGridBodySlot = withContext<\n HTMLTableSectionElement,\n CalendarGridBodySlotProps\n>(\"tbody\", \"gridBody\");\n\nexport interface CalendarCellSlotProps extends HTMLChakraProps<\"td\"> {}\nexport const CalendarCellSlot = withContext<\n HTMLTableCellElement,\n CalendarCellSlotProps\n>(\"td\", \"bodyCell\");\n","import { useContext } from \"react\";\nimport { today, getLocalTimeZone } from \"@internationalized/date\";\nimport {\n CalendarGrid as RaCalendarGrid,\n CalendarGridBody as RaCalendarGridBody,\n CalendarGridHeader as RaCalendarGridHeader,\n CalendarHeaderCell as RaCalendarHeaderCell,\n CalendarCell as RaCalendarCell,\n useSlottedContext,\n CalendarContext,\n CalendarStateContext,\n useLocale,\n} from \"react-aria-components\";\n\nimport { Box } from \"@/components\";\n\nimport {\n CalendarCellSlot,\n CalendarGridBodySlot,\n CalendarGridHeaderSlot,\n CalendarGridSlot,\n CalendarGridsSlot,\n CalendarHeaderCellSlot,\n CalendarMonthTitleSlot,\n} from \"../calendar.slots\";\n\nexport const CalendarGrids = () => {\n const { locale } = useLocale();\n const context = useSlottedContext(CalendarContext);\n const calendarState = useContext(CalendarStateContext)!;\n const visibleMonthsCount = context?.visibleDuration?.months || 1;\n const todayDate = today(getLocalTimeZone());\n const showMonthTitles = visibleMonthsCount > 1;\n\n return (\n <CalendarGridsSlot>\n {Array.from({ length: visibleMonthsCount }, (_, index) => {\n const gridDate = calendarState.visibleRange.start.add({\n months: index,\n });\n const monthName = new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(gridDate.toDate(getLocalTimeZone()));\n\n return (\n <Box\n key={monthName}\n width={visibleMonthsCount == 1 ? \"full\" : \"auto\"}\n >\n {showMonthTitles && (\n <CalendarMonthTitleSlot>{monthName}</CalendarMonthTitleSlot>\n )}\n <CalendarGridSlot asChild>\n <RaCalendarGrid offset={{ months: index }} weekdayStyle=\"short\">\n <CalendarGridHeaderSlot asChild>\n <RaCalendarGridHeader>\n {(day) => (\n <CalendarHeaderCellSlot asChild>\n <RaCalendarHeaderCell>{day}</RaCalendarHeaderCell>\n </CalendarHeaderCellSlot>\n )}\n </RaCalendarGridHeader>\n </CalendarGridHeaderSlot>\n <CalendarGridBodySlot asChild>\n <RaCalendarGridBody>\n {(date) => {\n const isToday = date.compare(todayDate) === 0;\n return (\n <CalendarCellSlot asChild data-today={isToday}>\n <RaCalendarCell date={date} />\n </CalendarCellSlot>\n );\n }}\n </RaCalendarGridBody>\n </CalendarGridBodySlot>\n </RaCalendarGrid>\n </CalendarGridSlot>\n </Box>\n );\n })}\n </CalendarGridsSlot>\n );\n};\n","import {\n CalendarContext,\n Heading,\n useSlottedContext,\n} from \"react-aria-components\";\nimport {\n Box,\n Flex,\n IconButton,\n Stack,\n Text,\n VisuallyHidden,\n} from \"@/components\";\nimport {\n KeyboardArrowLeft,\n KeyboardArrowRight,\n} from \"@commercetools/nimbus-icons\";\nimport { CalendarHeaderSlot } from \"../calendar.slots\";\n\nexport const CalendarHeader = () => {\n const calendarProps = useSlottedContext(CalendarContext);\n\n // Needed to decide wether to show a single month or a range\n const visibleDurationMonths = calendarProps?.visibleDuration?.months || 1;\n const showRangeLabel = visibleDurationMonths > 1;\n\n return (\n <CalendarHeaderSlot>\n <Flex>\n <Stack direction=\"row\" alignItems=\"center\">\n {/** solely for screen readers, if not present, a11y issues are raised */}\n <VisuallyHidden>\n <Heading />\n </VisuallyHidden>\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot={showRangeLabel ? \"previous\" : \"previous-month\"}\n size=\"xs\"\n variant=\"ghost\"\n tone=\"primary\"\n >\n <KeyboardArrowLeft />\n </IconButton>\n <Text\n textStyle=\"sm\"\n fontWeight=\"500\"\n color=\"neutral.11\"\n width={showRangeLabel ? \"4000\" : \"2000\"}\n textAlign=\"center\"\n aria-hidden=\"true\"\n slot={showRangeLabel ? \"monthRange\" : \"month\"}\n />\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot={showRangeLabel ? \"next\" : \"next-month\"}\n size=\"xs\"\n variant=\"ghost\"\n tone=\"primary\"\n >\n <KeyboardArrowRight />\n </IconButton>\n </Stack>\n <Box flexGrow=\"1\" />\n <Stack direction=\"row\" alignItems=\"center\">\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot=\"previous-year\"\n size=\"xs\"\n variant=\"ghost\"\n tone=\"primary\"\n >\n <KeyboardArrowLeft />\n </IconButton>\n <Text\n textStyle=\"sm\"\n fontWeight=\"500\"\n color=\"neutral.11\"\n width=\"1400\"\n textAlign=\"center\"\n aria-hidden=\"true\"\n slot=\"year\"\n />\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton slot=\"next-year\" size=\"xs\" variant=\"ghost\" tone=\"primary\">\n <KeyboardArrowRight />\n </IconButton>\n </Stack>\n </Flex>\n </CalendarHeaderSlot>\n );\n};\n","import { getLocalTimeZone } from \"@internationalized/date\";\nimport { useContext } from \"react\";\nimport {\n Provider,\n ButtonContext,\n CalendarStateContext,\n TextContext,\n useLocale,\n} from \"react-aria-components\";\n\nexport const CalendarCustomContext = ({\n children,\n}: {\n children: React.ReactNode;\n}) => {\n const { locale } = useLocale();\n const buttonContext = useContext(ButtonContext)!;\n const textContext = useContext(TextContext)!;\n const calendarState = useContext(CalendarStateContext)!;\n\n /**\n * Button slots\n * ================================\n */\n const buttonSlots = {\n \"next-month\": {\n onPress: () => calendarState.focusNextSection(),\n \"aria-label\": \"Next month\",\n },\n \"previous-month\": {\n onPress: () => calendarState.focusPreviousSection(),\n \"aria-label\": \"Previous month\",\n },\n \"next-year\": {\n onPress: () => calendarState.focusNextSection(true),\n \"aria-label\": \"Next year\",\n },\n \"previous-year\": {\n onPress: () => calendarState.focusPreviousSection(true),\n \"aria-label\": \"Previous year\",\n },\n };\n\n /**\n * Text slots\n * ================================\n */\n const monthLabel = new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.focusedDate.toDate(getLocalTimeZone()));\n\n const monthRangeLabel = [\n new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.visibleRange.start.toDate(getLocalTimeZone())),\n new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.visibleRange.end.toDate(getLocalTimeZone())),\n ].join(\" - \");\n\n const yearLabel = new Intl.DateTimeFormat(locale, {\n year: \"numeric\",\n }).format(calendarState.focusedDate.toDate(getLocalTimeZone()));\n\n const textSlots = {\n month: { children: monthLabel },\n monthRange: { children: monthRangeLabel },\n year: { children: yearLabel },\n };\n\n return (\n <Provider\n values={[\n [\n ButtonContext,\n {\n ...buttonContext,\n slots: {\n ...(buttonContext &&\n typeof buttonContext === \"object\" &&\n \"slots\" in buttonContext\n ? buttonContext.slots\n : {}),\n ...buttonSlots,\n },\n },\n ],\n [\n TextContext,\n {\n ...textContext,\n slots: {\n ...(textContext &&\n typeof textContext === \"object\" &&\n \"slots\" in textContext\n ? textContext.slots\n : {}),\n ...textSlots,\n },\n },\n ],\n ]}\n >\n {children}\n </Provider>\n );\n};\n","import type { CalendarProps } from \"./calendar.types\";\nimport type { DateValue } from \"react-aria\";\n\nimport { Calendar as RaCalendar } from \"react-aria-components\";\n\nimport { CalendarRootSlot } from \"./calendar.slots\";\nimport { CalendarGrids } from \"./components/calendar.grids\";\nimport { CalendarHeader } from \"./components/calendar.header\";\nimport { calendarSlotRecipe } from \"./calendar.recipe\";\nimport { useRecipe } from \"@chakra-ui/react/styled-system\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\nimport { CalendarCustomContext } from \"./components/calendar.custom-context\";\n\n/**\n * # Calendar\n *\n * Calendars display a grid of days in one or more months and allow users to select a single date.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/calendar}\n */\nexport const Calendar = (props: CalendarProps<DateValue>) => {\n const recipe = useRecipe({ recipe: calendarSlotRecipe });\n const [recipeProps, remainingProps] = recipe.splitVariantProps(props);\n const [styleProps, otherProps] = extractStyleProps(remainingProps);\n\n return (\n <CalendarRootSlot {...recipeProps} {...styleProps} asChild>\n <RaCalendar {...otherProps}>\n <CalendarCustomContext>\n <CalendarHeader />\n <CalendarGrids />\n </CalendarCustomContext>\n </RaCalendar>\n </CalendarRootSlot>\n );\n};\n"],"names":["withProvider","withContext","createSlotRecipeContext","CalendarRootSlot","CalendarHeaderSlot","CalendarGridsSlot","CalendarMonthTitleSlot","CalendarGridSlot","CalendarGridHeaderSlot","CalendarHeaderCellSlot","CalendarGridBodySlot","CalendarCellSlot","CalendarGrids","locale","useLocale","context","useSlottedContext","CalendarContext","calendarState","useContext","CalendarStateContext","visibleMonthsCount","todayDate","today","getLocalTimeZone","showMonthTitles","jsx","_","index","gridDate","monthName","jsxs","Box","RaCalendarGrid","RaCalendarGridHeader","day","RaCalendarHeaderCell","RaCalendarGridBody","date","isToday","RaCalendarCell","CalendarHeader","showRangeLabel","Flex","Stack","VisuallyHidden","Heading","IconButton","KeyboardArrowLeft","Text","KeyboardArrowRight","CalendarCustomContext","children","buttonContext","ButtonContext","textContext","TextContext","buttonSlots","monthLabel","monthRangeLabel","yearLabel","textSlots","Provider","Calendar","props","recipe","useRecipe","calendarSlotRecipe","recipeProps","remainingProps","styleProps","otherProps","extractStyleProps","RaCalendar"],"mappings":";;;;;;;;;;;;;;;;;;;AAUA,MAAM,EAAE,cAAAA,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,KAAK;AACP,CAAC,GAOYC,IAAmB,gBAAAH,EAG9B,OAAO,MAAM,GAGFI,IAAqB,gBAAAH,EAGhC,OAAO,QAAQ,GAGJI,IAAoB,gBAAAJ,EAG/B,OAAO,OAAO,GAGHK,IAAyB,gBAAAL,EAGpC,OAAO,YAAY,GAGRM,IAAmB,gBAAAN,EAG9B,SAAS,MAAM,GAGJO,IAAyB,gBAAAP,EAGpC,SAAS,YAAY,GAGVQ,IAAyB,gBAAAR,EAGpC,MAAM,YAAY,GAGPS,IAAuB,gBAAAT,EAGlC,SAAS,UAAU,GAGRU,IAAmB,gBAAAV,EAG9B,MAAM,UAAU,GC5CLW,KAAgB,MAAM;AACjC,QAAM,EAAE,QAAAC,EAAA,IAAWC,EAAA,GACbC,IAAUC,EAAkBC,CAAe,GAC3CC,IAAgBC,EAAWC,CAAoB,GAC/CC,IAAqBN,GAAS,iBAA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AEjE,SACE,gBAAA3C,EAACvB,GAAA,EAAkB,GAAGiE,GAAc,GAAGE,GAAY,SAAO,IACxD,UAAA,gBAAA5C,EAAC+C,GAAA,EAAY,GAAGF,GACd,4BAACpB,IAAA,EACC,UAAA;AAAA,IAAA,gBAAAzB,EAACe,IAAA,EAAe;AAAA,sBACf7B,IAAA,CAAA,CAAc;AAAA,EAAA,EAAA,CACjB,GACF,GACF;AAEJ;"}
1
+ {"version":3,"file":"calendar-DABzfMco.es.js","sources":["../../src/components/calendar/calendar.slots.tsx","../../src/components/calendar/components/calendar.grids.tsx","../../src/components/calendar/components/calendar.header.tsx","../../src/components/calendar/components/calendar.custom-context.tsx","../../src/components/calendar/calendar.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-empty-object-type */\nimport {\n createSlotRecipeContext,\n type HTMLChakraProps,\n type RecipeVariantProps,\n} from \"@chakra-ui/react/styled-system\";\nimport { calendarSlotRecipe } from \"./calendar.recipe\";\nimport type { CalendarProps } from \"react-aria-components\";\nimport type { DateValue } from \"@internationalized/date\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"calendar\",\n});\n\nexport interface CalendarRootSlotProps\n extends HTMLChakraProps<\n \"div\",\n RecipeVariantProps<typeof calendarSlotRecipe> & CalendarProps<DateValue>\n > {}\nexport const CalendarRootSlot = withProvider<\n HTMLDivElement,\n CalendarRootSlotProps\n>(\"div\", \"root\");\n\nexport interface CalendarHeaderSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const CalendarHeaderSlot = withContext<\n HTMLDivElement,\n CalendarHeaderSlotProps\n>(\"div\", \"header\");\n\nexport interface CalendarGridsSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const CalendarGridsSlot = withContext<\n HTMLDivElement,\n CalendarGridsSlotProps\n>(\"div\", \"grids\");\n\nexport interface CalendarMonthTitleSlotProps extends HTMLChakraProps<\"div\"> {}\nexport const CalendarMonthTitleSlot = withContext<\n HTMLDivElement,\n CalendarMonthTitleSlotProps\n>(\"div\", \"monthTitle\");\n\nexport interface CalendarGridSlotProps extends HTMLChakraProps<\"table\"> {}\nexport const CalendarGridSlot = withContext<\n HTMLTableElement,\n CalendarGridSlotProps\n>(\"table\", \"grid\");\n\nexport interface CalendarGridHeaderSlotProps extends HTMLChakraProps<\"thead\"> {}\nexport const CalendarGridHeaderSlot = withContext<\n HTMLTableSectionElement,\n CalendarGridHeaderSlotProps\n>(\"thead\", \"gridHeader\");\n\nexport interface CalendarHeaderCellSlotProps extends HTMLChakraProps<\"th\"> {}\nexport const CalendarHeaderCellSlot = withContext<\n HTMLTableCellElement,\n CalendarHeaderCellSlotProps\n>(\"th\", \"headerCell\");\n\nexport interface CalendarGridBodySlotProps extends HTMLChakraProps<\"tbody\"> {}\nexport const CalendarGridBodySlot = withContext<\n HTMLTableSectionElement,\n CalendarGridBodySlotProps\n>(\"tbody\", \"gridBody\");\n\nexport interface CalendarCellSlotProps extends HTMLChakraProps<\"td\"> {}\nexport const CalendarCellSlot = withContext<\n HTMLTableCellElement,\n CalendarCellSlotProps\n>(\"td\", \"bodyCell\");\n","import { useContext } from \"react\";\nimport { today, getLocalTimeZone } from \"@internationalized/date\";\nimport {\n CalendarGrid as RaCalendarGrid,\n CalendarGridBody as RaCalendarGridBody,\n CalendarGridHeader as RaCalendarGridHeader,\n CalendarHeaderCell as RaCalendarHeaderCell,\n CalendarCell as RaCalendarCell,\n useSlottedContext,\n CalendarContext,\n CalendarStateContext,\n useLocale,\n} from \"react-aria-components\";\n\nimport { Box } from \"@/components\";\n\nimport {\n CalendarCellSlot,\n CalendarGridBodySlot,\n CalendarGridHeaderSlot,\n CalendarGridSlot,\n CalendarGridsSlot,\n CalendarHeaderCellSlot,\n CalendarMonthTitleSlot,\n} from \"../calendar.slots\";\n\nexport const CalendarGrids = () => {\n const { locale } = useLocale();\n const context = useSlottedContext(CalendarContext);\n const calendarState = useContext(CalendarStateContext)!;\n const visibleMonthsCount = context?.visibleDuration?.months || 1;\n const todayDate = today(getLocalTimeZone());\n const showMonthTitles = visibleMonthsCount > 1;\n\n return (\n <CalendarGridsSlot>\n {Array.from({ length: visibleMonthsCount }, (_, index) => {\n const gridDate = calendarState.visibleRange.start.add({\n months: index,\n });\n const monthName = new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(gridDate.toDate(getLocalTimeZone()));\n\n return (\n <Box\n key={monthName}\n width={visibleMonthsCount == 1 ? \"full\" : \"auto\"}\n >\n {showMonthTitles && (\n <CalendarMonthTitleSlot>{monthName}</CalendarMonthTitleSlot>\n )}\n <CalendarGridSlot asChild>\n <RaCalendarGrid offset={{ months: index }} weekdayStyle=\"short\">\n <CalendarGridHeaderSlot asChild>\n <RaCalendarGridHeader>\n {(day) => (\n <CalendarHeaderCellSlot asChild>\n <RaCalendarHeaderCell>{day}</RaCalendarHeaderCell>\n </CalendarHeaderCellSlot>\n )}\n </RaCalendarGridHeader>\n </CalendarGridHeaderSlot>\n <CalendarGridBodySlot asChild>\n <RaCalendarGridBody>\n {(date) => {\n const isToday = date.compare(todayDate) === 0;\n return (\n <CalendarCellSlot asChild data-today={isToday}>\n <RaCalendarCell date={date} />\n </CalendarCellSlot>\n );\n }}\n </RaCalendarGridBody>\n </CalendarGridBodySlot>\n </RaCalendarGrid>\n </CalendarGridSlot>\n </Box>\n );\n })}\n </CalendarGridsSlot>\n );\n};\n","import {\n CalendarContext,\n Heading,\n useSlottedContext,\n} from \"react-aria-components\";\nimport {\n Box,\n Flex,\n IconButton,\n Stack,\n Text,\n VisuallyHidden,\n} from \"@/components\";\nimport {\n KeyboardArrowLeft,\n KeyboardArrowRight,\n} from \"@commercetools/nimbus-icons\";\nimport { CalendarHeaderSlot } from \"../calendar.slots\";\n\nexport const CalendarHeader = () => {\n const calendarProps = useSlottedContext(CalendarContext);\n\n // Needed to decide wether to show a single month or a range\n const visibleDurationMonths = calendarProps?.visibleDuration?.months || 1;\n const showRangeLabel = visibleDurationMonths > 1;\n\n return (\n <CalendarHeaderSlot>\n <Flex>\n <Stack direction=\"row\" alignItems=\"center\">\n {/** solely for screen readers, if not present, a11y issues are raised */}\n <VisuallyHidden>\n <Heading />\n </VisuallyHidden>\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot={showRangeLabel ? \"previous\" : \"previous-month\"}\n size=\"xs\"\n variant=\"ghost\"\n tone=\"primary\"\n >\n <KeyboardArrowLeft />\n </IconButton>\n <Text\n textStyle=\"sm\"\n fontWeight=\"500\"\n color=\"neutral.11\"\n width={showRangeLabel ? \"4000\" : \"2000\"}\n textAlign=\"center\"\n aria-hidden=\"true\"\n slot={showRangeLabel ? \"monthRange\" : \"month\"}\n />\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot={showRangeLabel ? \"next\" : \"next-month\"}\n size=\"xs\"\n variant=\"ghost\"\n tone=\"primary\"\n >\n <KeyboardArrowRight />\n </IconButton>\n </Stack>\n <Box flexGrow=\"1\" />\n <Stack direction=\"row\" alignItems=\"center\">\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton\n slot=\"previous-year\"\n size=\"xs\"\n variant=\"ghost\"\n tone=\"primary\"\n >\n <KeyboardArrowLeft />\n </IconButton>\n <Text\n textStyle=\"sm\"\n fontWeight=\"500\"\n color=\"neutral.11\"\n width=\"1400\"\n textAlign=\"center\"\n aria-hidden=\"true\"\n slot=\"year\"\n />\n {/* @ts-expect-error - custom-context will add aria-label via the \"slot\" prop */}\n <IconButton slot=\"next-year\" size=\"xs\" variant=\"ghost\" tone=\"primary\">\n <KeyboardArrowRight />\n </IconButton>\n </Stack>\n </Flex>\n </CalendarHeaderSlot>\n );\n};\n","import { getLocalTimeZone } from \"@internationalized/date\";\nimport { useContext } from \"react\";\nimport {\n Provider,\n ButtonContext,\n CalendarStateContext,\n TextContext,\n useLocale,\n} from \"react-aria-components\";\n\nexport const CalendarCustomContext = ({\n children,\n}: {\n children: React.ReactNode;\n}) => {\n const { locale } = useLocale();\n const buttonContext = useContext(ButtonContext)!;\n const textContext = useContext(TextContext)!;\n const calendarState = useContext(CalendarStateContext)!;\n\n /**\n * Button slots\n * ================================\n */\n const buttonSlots = {\n \"next-month\": {\n onPress: () => calendarState.focusNextSection(),\n \"aria-label\": \"Next month\",\n },\n \"previous-month\": {\n onPress: () => calendarState.focusPreviousSection(),\n \"aria-label\": \"Previous month\",\n },\n \"next-year\": {\n onPress: () => calendarState.focusNextSection(true),\n \"aria-label\": \"Next year\",\n },\n \"previous-year\": {\n onPress: () => calendarState.focusPreviousSection(true),\n \"aria-label\": \"Previous year\",\n },\n };\n\n /**\n * Text slots\n * ================================\n */\n const monthLabel = new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.focusedDate.toDate(getLocalTimeZone()));\n\n const monthRangeLabel = [\n new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.visibleRange.start.toDate(getLocalTimeZone())),\n new Intl.DateTimeFormat(locale, {\n month: \"long\",\n }).format(calendarState.visibleRange.end.toDate(getLocalTimeZone())),\n ].join(\" - \");\n\n const yearLabel = new Intl.DateTimeFormat(locale, {\n year: \"numeric\",\n }).format(calendarState.focusedDate.toDate(getLocalTimeZone()));\n\n const textSlots = {\n month: { children: monthLabel },\n monthRange: { children: monthRangeLabel },\n year: { children: yearLabel },\n };\n\n return (\n <Provider\n values={[\n [\n ButtonContext,\n {\n ...buttonContext,\n slots: {\n ...(buttonContext &&\n typeof buttonContext === \"object\" &&\n \"slots\" in buttonContext\n ? buttonContext.slots\n : {}),\n ...buttonSlots,\n },\n },\n ],\n [\n TextContext,\n {\n ...textContext,\n slots: {\n ...(textContext &&\n typeof textContext === \"object\" &&\n \"slots\" in textContext\n ? textContext.slots\n : {}),\n ...textSlots,\n },\n },\n ],\n ]}\n >\n {children}\n </Provider>\n );\n};\n","import type { CalendarProps } from \"./calendar.types\";\nimport type { DateValue } from \"react-aria\";\n\nimport { Calendar as RaCalendar } from \"react-aria-components\";\n\nimport { CalendarRootSlot } from \"./calendar.slots\";\nimport { CalendarGrids } from \"./components/calendar.grids\";\nimport { CalendarHeader } from \"./components/calendar.header\";\nimport { calendarSlotRecipe } from \"./calendar.recipe\";\nimport { useRecipe } from \"@chakra-ui/react/styled-system\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\nimport { CalendarCustomContext } from \"./components/calendar.custom-context\";\n\n/**\n * # Calendar\n *\n * Calendars display a grid of days in one or more months and allow users to select a single date.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/calendar}\n */\nexport const Calendar = (props: CalendarProps<DateValue>) => {\n const recipe = useRecipe({ recipe: calendarSlotRecipe });\n const [recipeProps, remainingProps] = recipe.splitVariantProps(props);\n const [styleProps, otherProps] = extractStyleProps(remainingProps);\n\n return (\n <CalendarRootSlot {...recipeProps} {...styleProps} asChild>\n <RaCalendar {...otherProps}>\n <CalendarCustomContext>\n <CalendarHeader />\n <CalendarGrids />\n </CalendarCustomContext>\n </RaCalendar>\n </CalendarRootSlot>\n );\n};\n"],"names":["withProvider","withContext","createSlotRecipeContext","CalendarRootSlot","CalendarHeaderSlot","CalendarGridsSlot","CalendarMonthTitleSlot","CalendarGridSlot","CalendarGridHeaderSlot","CalendarHeaderCellSlot","CalendarGridBodySlot","CalendarCellSlot","CalendarGrids","locale","useLocale","context","useSlottedContext","CalendarContext","calendarState","useContext","CalendarStateContext","visibleMonthsCount","todayDate","today","getLocalTimeZone","showMonthTitles","jsx","_","index","gridDate","monthName","jsxs","Box","RaCalendarGrid","RaCalendarGridHeader","day","RaCalendarHeaderCell","RaCalendarGridBody","date","isToday","RaCalendarCell","CalendarHeader","showRangeLabel","Flex","Stack","VisuallyHidden","Heading","IconButton","KeyboardArrowLeft","Text","KeyboardArrowRight","CalendarCustomContext","children","buttonContext","ButtonContext","textContext","TextContext","buttonSlots","monthLabel","monthRangeLabel","yearLabel","textSlots","Provider","Calendar","props","recipe","useRecipe","calendarSlotRecipe","recipeProps","remainingProps","styleProps","other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AAlC;AAAA,IAACoC;AAAAA,IAAA;AAAA,MACC,QAAQ;AAAA,QACN;AAAA,UACER;AAAAA,UACA;AAAA,YACE,GAAGD;AAAA,YACH,OAAO;AAAA,cACL,GAAIA,KACJ,OAAOA,KAAkB,YACzB,WAAWA,IACPA,EAAc,QACd,CAAA;AAAA,cACJ,GAAGI;AAAA,YAAA;AAAA,UACL;AAAA,QACF;AAAA,QAEF;AAAA,UACED;AAAAA,UACA;AAAA,YACE,GAAGD;AAAA,YACH,OAAO;AAAA,cACL,GAAIA,KACJ,OAAOA,KAAgB,YACvB,WAAWA,IACPA,EAAY,QACZ,CAAA;AAAA,cACJ,GAAGM;AAAA,YAAA;AAAA,UACL;AAAA,QACF;AAAA,MACF;AAAA,MAGD,UAAAT;AAAA,IAAA;AAAA,EAAA;AAGP,GCtFaW,KAAW,CAACC,MAAoC;AAC3D,QAAMC,IAASC,EAAU,EAAE,QAAQC,GAAoB,GACjD,CAACC,GAAaC,CAAc,IAAIJ,EAAO,kBAAkBD,CAAK,GAC9D,CAACM,GAAYC,CAAU,IAAIC,EAAkBH,CAAc;AAEjE,SACE,gBAAA3C,EAACvB,GAAA,EAAkB,GAAGiE,GAAc,GAAGE,GAAY,SAAO,IACxD,UAAA,gBAAA5C,EAAC+C,GAAA,EAAY,GAAGF,GACd,4BAACpB,IAAA,EACC,UAAA;AAAA,IAAA,gBAAAzB,EAACe,IAAA,EAAe;AAAA,sBACf7B,IAAA,CAAA,CAAc;AAAA,EAAA,EAAA,CACjB,GACF,GACF;AAEJ;"}
@@ -1,2 +1,2 @@
1
- "use strict";const e=require("react/jsx-runtime"),a=require("./Heading-CQJ-3eon.cjs.js"),q=require("./create-slot-recipe-context-HIF51Igr.cjs.js"),$=require("react"),c=require("./useDateFormatter-G9oGkNG5.cjs.js"),p=require("./utils-BHdR5Nww.cjs.js"),v=require("./box-BPfqlznQ.cjs.js"),S=require("./context-D0_cRaDZ.cjs.js"),h=require("./icon-button-BBkPfAM3.cjs.js"),j=require("./text-hUMahKuA.cjs.js"),y=require("./stack-B6PqFPMh.cjs.js"),D=require("./visually-hidden-Uhh-2Y-q.cjs.js"),u=require("@commercetools/nimbus-icons"),P=require("./flex-BhVeeItQ.cjs.js"),R=require("./index-XyB4gGC8.cjs.js"),I=require("./extractStyleProps-wjyId_vK.cjs.js"),C=require("./Button-DQ_WkLNH.cjs.js"),g=require("./Text-BWSfeB9p.cjs.js"),T=require("./use-recipe-BZ_iqCkN.cjs.js"),{withProvider:B,withContext:s}=q.createSlotRecipeContext({key:"calendar"}),H=B("div","root"),A=s("div","header"),F=s("div","grids"),G=s("div","monthTitle"),L=s("table","grid"),k=s("thead","gridHeader"),M=s("th","headerCell"),N=s("tbody","gridBody"),z=s("td","bodyCell"),K=()=>{const{locale:d}=S.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),n=p.$64fa3d84918910a7$export$fabf2dc03a41866e(a.$dfd62f934fc76fed$export$3b805cea1f178355),t=$.useContext(a.$dfd62f934fc76fed$export$9e31dcedda1dadc7),r=n?.visibleDuration?.months||1,o=c.$14e0f24ef4ac5c92$export$d0bdf45af03a6ea3(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2()),i=r>1;return e.jsx(F,{children:Array.from({length:r},(m,l)=>{const b=t.visibleRange.start.add({months:l}),f=new Intl.DateTimeFormat(d,{month:"long"}).format(b.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2()));return e.jsxs(v.Box,{width:r==1?"full":"auto",children:[i&&e.jsx(G,{children:f}),e.jsx(L,{asChild:!0,children:e.jsxs(a.$dfd62f934fc76fed$export$5bd780d491cfc46c,{offset:{months:l},weekdayStyle:"short",children:[e.jsx(k,{asChild:!0,children:e.jsx(a.$dfd62f934fc76fed$export$22e2d15eaa4d2377,{children:x=>e.jsx(M,{asChild:!0,children:e.jsx(a.$dfd62f934fc76fed$export$ad2135cac3a11b3d,{children:x})})})}),e.jsx(N,{asChild:!0,children:e.jsx(a.$dfd62f934fc76fed$export$e11f8ba65d857bff,{children:x=>{const w=x.compare(o)===0;return e.jsx(z,{asChild:!0,"data-today":w,children:e.jsx(a.$dfd62f934fc76fed$export$5d847498420df57b,{date:x})})}})})]})})]},f)})})},V=()=>{const t=(p.$64fa3d84918910a7$export$fabf2dc03a41866e(a.$dfd62f934fc76fed$export$3b805cea1f178355)?.visibleDuration?.months||1)>1;return e.jsx(A,{children:e.jsxs(P.Flex,{children:[e.jsxs(y.Stack,{direction:"row",alignItems:"center",children:[e.jsx(D.VisuallyHidden,{children:e.jsx(a.$5cb03073d3f54797$export$a8a3e93435678ff9,{})}),e.jsx(h.IconButton,{slot:t?"previous":"previous-month",size:"xs",variant:"ghost",tone:"primary",children:e.jsx(u.KeyboardArrowLeft,{})}),e.jsx(j.Text,{textStyle:"sm",fontWeight:"500",color:"neutral.11",width:t?"4000":"2000",textAlign:"center","aria-hidden":"true",slot:t?"monthRange":"month"}),e.jsx(h.IconButton,{slot:t?"next":"next-month",size:"xs",variant:"ghost",tone:"primary",children:e.jsx(u.KeyboardArrowRight,{})})]}),e.jsx(v.Box,{flexGrow:"1"}),e.jsxs(y.Stack,{direction:"row",alignItems:"center",children:[e.jsx(h.IconButton,{slot:"previous-year",size:"xs",variant:"ghost",tone:"primary",children:e.jsx(u.KeyboardArrowLeft,{})}),e.jsx(j.Text,{textStyle:"sm",fontWeight:"500",color:"neutral.11",width:"1400",textAlign:"center","aria-hidden":"true",slot:"year"}),e.jsx(h.IconButton,{slot:"next-year",size:"xs",variant:"ghost",tone:"primary",children:e.jsx(u.KeyboardArrowRight,{})})]})]})})},W=({children:d})=>{const{locale:n}=S.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),t=$.useContext(C.$d2b4bc8c273e7be6$export$24d547caef80ccd1),r=$.useContext(g.$514c0188e459b4c0$export$9afb8bc826b033ea),o=$.useContext(a.$dfd62f934fc76fed$export$9e31dcedda1dadc7),i={"next-month":{onPress:()=>o.focusNextSection(),"aria-label":"Next month"},"previous-month":{onPress:()=>o.focusPreviousSection(),"aria-label":"Previous month"},"next-year":{onPress:()=>o.focusNextSection(!0),"aria-label":"Next year"},"previous-year":{onPress:()=>o.focusPreviousSection(!0),"aria-label":"Previous year"}},m=new Intl.DateTimeFormat(n,{month:"long"}).format(o.focusedDate.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2())),l=[new Intl.DateTimeFormat(n,{month:"long"}).format(o.visibleRange.start.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2())),new Intl.DateTimeFormat(n,{month:"long"}).format(o.visibleRange.end.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2()))].join(" - "),b=new Intl.DateTimeFormat(n,{year:"numeric"}).format(o.focusedDate.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2())),f={month:{children:m},monthRange:{children:l},year:{children:b}};return e.jsx(p.$64fa3d84918910a7$export$2881499e37b75b9a,{values:[[C.$d2b4bc8c273e7be6$export$24d547caef80ccd1,{...t,slots:{...t&&typeof t=="object"&&"slots"in t?t.slots:{},...i}}],[g.$514c0188e459b4c0$export$9afb8bc826b033ea,{...r,slots:{...r&&typeof r=="object"&&"slots"in r?r.slots:{},...f}}]],children:d})},_=d=>{const n=T.useRecipe({recipe:R.calendarSlotRecipe}),[t,r]=n.splitVariantProps(d),[o,i]=I.extractStyleProps(r);return e.jsx(H,{...t,...o,asChild:!0,children:e.jsx(a.$dfd62f934fc76fed$export$e1aef45b828286de,{...i,children:e.jsxs(W,{children:[e.jsx(V,{}),e.jsx(K,{})]})})})};exports.Calendar=_;
2
- //# sourceMappingURL=calendar-BydrcPp3.cjs.js.map
1
+ "use strict";const e=require("react/jsx-runtime"),a=require("./Heading-CQJ-3eon.cjs.js"),q=require("./create-slot-recipe-context-HIF51Igr.cjs.js"),$=require("react"),c=require("./useDateFormatter-G9oGkNG5.cjs.js"),p=require("./utils-BHdR5Nww.cjs.js"),v=require("./box-BPfqlznQ.cjs.js"),S=require("./context-D0_cRaDZ.cjs.js"),h=require("./icon-button-CCrfnUUB.cjs.js"),j=require("./text-hUMahKuA.cjs.js"),y=require("./stack-B6PqFPMh.cjs.js"),D=require("./visually-hidden-Uhh-2Y-q.cjs.js"),u=require("@commercetools/nimbus-icons"),P=require("./flex-BhVeeItQ.cjs.js"),R=require("./index-COhQ_99G.cjs.js"),I=require("./extractStyleProps-yFm0qaXg.cjs.js"),C=require("./Button-DQ_WkLNH.cjs.js"),g=require("./Text-BWSfeB9p.cjs.js"),T=require("./use-recipe-BZ_iqCkN.cjs.js"),{withProvider:B,withContext:s}=q.createSlotRecipeContext({key:"calendar"}),H=B("div","root"),A=s("div","header"),F=s("div","grids"),G=s("div","monthTitle"),L=s("table","grid"),k=s("thead","gridHeader"),M=s("th","headerCell"),N=s("tbody","gridBody"),z=s("td","bodyCell"),K=()=>{const{locale:d}=S.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),n=p.$64fa3d84918910a7$export$fabf2dc03a41866e(a.$dfd62f934fc76fed$export$3b805cea1f178355),t=$.useContext(a.$dfd62f934fc76fed$export$9e31dcedda1dadc7),r=n?.visibleDuration?.months||1,o=c.$14e0f24ef4ac5c92$export$d0bdf45af03a6ea3(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2()),i=r>1;return e.jsx(F,{children:Array.from({length:r},(m,l)=>{const b=t.visibleRange.start.add({months:l}),f=new Intl.DateTimeFormat(d,{month:"long"}).format(b.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2()));return e.jsxs(v.Box,{width:r==1?"full":"auto",children:[i&&e.jsx(G,{children:f}),e.jsx(L,{asChild:!0,children:e.jsxs(a.$dfd62f934fc76fed$export$5bd780d491cfc46c,{offset:{months:l},weekdayStyle:"short",children:[e.jsx(k,{asChild:!0,children:e.jsx(a.$dfd62f934fc76fed$export$22e2d15eaa4d2377,{children:x=>e.jsx(M,{asChild:!0,children:e.jsx(a.$dfd62f934fc76fed$export$ad2135cac3a11b3d,{children:x})})})}),e.jsx(N,{asChild:!0,children:e.jsx(a.$dfd62f934fc76fed$export$e11f8ba65d857bff,{children:x=>{const w=x.compare(o)===0;return e.jsx(z,{asChild:!0,"data-today":w,children:e.jsx(a.$dfd62f934fc76fed$export$5d847498420df57b,{date:x})})}})})]})})]},f)})})},V=()=>{const t=(p.$64fa3d84918910a7$export$fabf2dc03a41866e(a.$dfd62f934fc76fed$export$3b805cea1f178355)?.visibleDuration?.months||1)>1;return e.jsx(A,{children:e.jsxs(P.Flex,{children:[e.jsxs(y.Stack,{direction:"row",alignItems:"center",children:[e.jsx(D.VisuallyHidden,{children:e.jsx(a.$5cb03073d3f54797$export$a8a3e93435678ff9,{})}),e.jsx(h.IconButton,{slot:t?"previous":"previous-month",size:"xs",variant:"ghost",tone:"primary",children:e.jsx(u.KeyboardArrowLeft,{})}),e.jsx(j.Text,{textStyle:"sm",fontWeight:"500",color:"neutral.11",width:t?"4000":"2000",textAlign:"center","aria-hidden":"true",slot:t?"monthRange":"month"}),e.jsx(h.IconButton,{slot:t?"next":"next-month",size:"xs",variant:"ghost",tone:"primary",children:e.jsx(u.KeyboardArrowRight,{})})]}),e.jsx(v.Box,{flexGrow:"1"}),e.jsxs(y.Stack,{direction:"row",alignItems:"center",children:[e.jsx(h.IconButton,{slot:"previous-year",size:"xs",variant:"ghost",tone:"primary",children:e.jsx(u.KeyboardArrowLeft,{})}),e.jsx(j.Text,{textStyle:"sm",fontWeight:"500",color:"neutral.11",width:"1400",textAlign:"center","aria-hidden":"true",slot:"year"}),e.jsx(h.IconButton,{slot:"next-year",size:"xs",variant:"ghost",tone:"primary",children:e.jsx(u.KeyboardArrowRight,{})})]})]})})},W=({children:d})=>{const{locale:n}=S.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),t=$.useContext(C.$d2b4bc8c273e7be6$export$24d547caef80ccd1),r=$.useContext(g.$514c0188e459b4c0$export$9afb8bc826b033ea),o=$.useContext(a.$dfd62f934fc76fed$export$9e31dcedda1dadc7),i={"next-month":{onPress:()=>o.focusNextSection(),"aria-label":"Next month"},"previous-month":{onPress:()=>o.focusPreviousSection(),"aria-label":"Previous month"},"next-year":{onPress:()=>o.focusNextSection(!0),"aria-label":"Next year"},"previous-year":{onPress:()=>o.focusPreviousSection(!0),"aria-label":"Previous year"}},m=new Intl.DateTimeFormat(n,{month:"long"}).format(o.focusedDate.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2())),l=[new Intl.DateTimeFormat(n,{month:"long"}).format(o.visibleRange.start.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2())),new Intl.DateTimeFormat(n,{month:"long"}).format(o.visibleRange.end.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2()))].join(" - "),b=new Intl.DateTimeFormat(n,{year:"numeric"}).format(o.focusedDate.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2())),f={month:{children:m},monthRange:{children:l},year:{children:b}};return e.jsx(p.$64fa3d84918910a7$export$2881499e37b75b9a,{values:[[C.$d2b4bc8c273e7be6$export$24d547caef80ccd1,{...t,slots:{...t&&typeof t=="object"&&"slots"in t?t.slots:{},...i}}],[g.$514c0188e459b4c0$export$9afb8bc826b033ea,{...r,slots:{...r&&typeof r=="object"&&"slots"in r?r.slots:{},...f}}]],children:d})},_=d=>{const n=T.useRecipe({recipe:R.calendarSlotRecipe}),[t,r]=n.splitVariantProps(d),[o,i]=I.extractStyleProps(r);return e.jsx(H,{...t,...o,asChild:!0,children:e.jsx(a.$dfd62f934fc76fed$export$e1aef45b828286de,{...i,children:e.jsxs(W,{children:[e.jsx(V,{}),e.jsx(K,{})]})})})};exports.Calendar=_;
2
+ //# sourceMappingURL=calendar-v3st4EyG.cjs.js.map