@commercetools/nimbus 0.0.0-canary-20250919154858 → 0.0.0-canary-20250922152719

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 (257) hide show
  1. package/dist/accordion.d.ts +2 -2
  2. package/dist/chunks/{accordion-CyaEB05t.es.js → accordion-CSSdv9jZ.es.js} +2 -2
  3. package/dist/chunks/{accordion-CyaEB05t.es.js.map → accordion-CSSdv9jZ.es.js.map} +1 -1
  4. package/dist/chunks/{accordion-CVM_3Y8u.cjs.js → accordion-xYvGyXy-.cjs.js} +2 -2
  5. package/dist/chunks/{accordion-CVM_3Y8u.cjs.js.map → accordion-xYvGyXy-.cjs.js.map} +1 -1
  6. package/dist/chunks/{alert-CQzbVGQM.es.js → alert-BRDuEo75.es.js} +2 -2
  7. package/dist/chunks/{alert-CQzbVGQM.es.js.map → alert-BRDuEo75.es.js.map} +1 -1
  8. package/dist/chunks/{alert-B1X_ycTY.cjs.js → alert-CWTCM8-i.cjs.js} +2 -2
  9. package/dist/chunks/{alert-B1X_ycTY.cjs.js.map → alert-CWTCM8-i.cjs.js.map} +1 -1
  10. package/dist/chunks/{button-DnZz51Rh.es.js → button-DRMpnb-1.es.js} +2 -2
  11. package/dist/chunks/{button-DnZz51Rh.es.js.map → button-DRMpnb-1.es.js.map} +1 -1
  12. package/dist/chunks/{button-RUSyHGQV.cjs.js → button-Dbf1b0F4.cjs.js} +2 -2
  13. package/dist/chunks/{button-RUSyHGQV.cjs.js.map → button-Dbf1b0F4.cjs.js.map} +1 -1
  14. package/dist/chunks/{calendar-DhN7hRLB.cjs.js → calendar-CrTvsDQH.cjs.js} +2 -2
  15. package/dist/chunks/{calendar-DhN7hRLB.cjs.js.map → calendar-CrTvsDQH.cjs.js.map} +1 -1
  16. package/dist/chunks/{calendar-CrxxYJd-.es.js → calendar-DnQnMOcs.es.js} +4 -4
  17. package/dist/chunks/{calendar-CrxxYJd-.es.js.map → calendar-DnQnMOcs.es.js.map} +1 -1
  18. package/dist/chunks/{checkbox-CAvlAkX5.cjs.js → checkbox-Bv0NXUyX.cjs.js} +2 -2
  19. package/dist/chunks/{checkbox-CAvlAkX5.cjs.js.map → checkbox-Bv0NXUyX.cjs.js.map} +1 -1
  20. package/dist/chunks/{checkbox-BxRZ9dqc.es.js → checkbox-CdSHDZgM.es.js} +2 -2
  21. package/dist/chunks/{checkbox-BxRZ9dqc.es.js.map → checkbox-CdSHDZgM.es.js.map} +1 -1
  22. package/dist/chunks/combobox-C9pPDZQn.cjs.js +2 -0
  23. package/dist/chunks/combobox-C9pPDZQn.cjs.js.map +1 -0
  24. package/dist/chunks/{combobox-Bjv3GWGo.es.js → combobox-Dmn2vxIz.es.js} +991 -970
  25. package/dist/chunks/combobox-Dmn2vxIz.es.js.map +1 -0
  26. package/dist/chunks/{data-table-9C4ViaHW.es.js → data-table-CBr4TLyH.es.js} +6 -6
  27. package/dist/chunks/{data-table-9C4ViaHW.es.js.map → data-table-CBr4TLyH.es.js.map} +1 -1
  28. package/dist/chunks/{data-table-BoRy4kuE.cjs.js → data-table-DIsDZ5JZ.cjs.js} +2 -2
  29. package/dist/chunks/{data-table-BoRy4kuE.cjs.js.map → data-table-DIsDZ5JZ.cjs.js.map} +1 -1
  30. package/dist/chunks/date-input-CoAPdZTG.es.js +21 -0
  31. package/dist/chunks/date-input-CoAPdZTG.es.js.map +1 -0
  32. package/dist/chunks/date-input-DYC1t1e-.cjs.js +2 -0
  33. package/dist/chunks/date-input-DYC1t1e-.cjs.js.map +1 -0
  34. package/dist/chunks/date-picker-BVrTKhZ_.es.js +219 -0
  35. package/dist/chunks/date-picker-BVrTKhZ_.es.js.map +1 -0
  36. package/dist/chunks/date-picker-_7Gh_ROw.cjs.js +2 -0
  37. package/dist/chunks/date-picker-_7Gh_ROw.cjs.js.map +1 -0
  38. package/dist/chunks/{date-range-picker-CsUWSzSC.es.js → date-range-picker-D55giMLZ.es.js} +88 -91
  39. package/dist/chunks/date-range-picker-D55giMLZ.es.js.map +1 -0
  40. package/dist/chunks/date-range-picker-D7pPpSEj.cjs.js +2 -0
  41. package/dist/chunks/date-range-picker-D7pPpSEj.cjs.js.map +1 -0
  42. package/dist/chunks/{extractStyleProps-dSQoSYg8.cjs.js → extractStyleProps-CgqRiEwd.cjs.js} +2 -2
  43. package/dist/chunks/{extractStyleProps-dSQoSYg8.cjs.js.map → extractStyleProps-CgqRiEwd.cjs.js.map} +1 -1
  44. package/dist/chunks/{extractStyleProps-lz7NzsNX.es.js → extractStyleProps-DkXeCUuq.es.js} +2 -2
  45. package/dist/chunks/{extractStyleProps-lz7NzsNX.es.js.map → extractStyleProps-DkXeCUuq.es.js.map} +1 -1
  46. package/dist/chunks/{form-field-CPPobl2Z.es.js → form-field-DMs36b56.es.js} +2 -2
  47. package/dist/chunks/{form-field-CPPobl2Z.es.js.map → form-field-DMs36b56.es.js.map} +1 -1
  48. package/dist/chunks/{form-field-BoGSJF6d.cjs.js → form-field-cwK6KNEG.cjs.js} +2 -2
  49. package/dist/chunks/{form-field-BoGSJF6d.cjs.js.map → form-field-cwK6KNEG.cjs.js.map} +1 -1
  50. package/dist/chunks/{icon-button-CiBtEF0y.cjs.js → icon-button-0GLW7WtL.cjs.js} +2 -2
  51. package/dist/chunks/{icon-button-CiBtEF0y.cjs.js.map → icon-button-0GLW7WtL.cjs.js.map} +1 -1
  52. package/dist/chunks/{icon-button-N3Uzjv8o.es.js → icon-button-C_i4ydsN.es.js} +2 -2
  53. package/dist/chunks/{icon-button-N3Uzjv8o.es.js.map → icon-button-C_i4ydsN.es.js.map} +1 -1
  54. package/dist/chunks/{icon-toggle-button-BcrMgO27.es.js → icon-toggle-button-f03QyjEE.es.js} +2 -2
  55. package/dist/chunks/{icon-toggle-button-BcrMgO27.es.js.map → icon-toggle-button-f03QyjEE.es.js.map} +1 -1
  56. package/dist/chunks/{icon-toggle-button-DeiQ7jmM.cjs.js → icon-toggle-button-tJAqRjak.cjs.js} +2 -2
  57. package/dist/chunks/{icon-toggle-button-DeiQ7jmM.cjs.js.map → icon-toggle-button-tJAqRjak.cjs.js.map} +1 -1
  58. package/dist/chunks/{index-DwjTNyza.es.js → index-CRta5Y1_.es.js} +426 -300
  59. package/dist/chunks/index-CRta5Y1_.es.js.map +1 -0
  60. package/dist/chunks/index-DX8-EG6B.cjs.js +4 -0
  61. package/dist/chunks/index-DX8-EG6B.cjs.js.map +1 -0
  62. package/dist/chunks/{menu-vAP73jq6.es.js → menu-D5UbPSbm.es.js} +3 -3
  63. package/dist/chunks/{menu-vAP73jq6.es.js.map → menu-D5UbPSbm.es.js.map} +1 -1
  64. package/dist/chunks/{menu-n9jU7SCA.cjs.js → menu-cYj3HcOe.cjs.js} +2 -2
  65. package/dist/chunks/{menu-n9jU7SCA.cjs.js.map → menu-cYj3HcOe.cjs.js.map} +1 -1
  66. package/dist/chunks/{money-input-Dkl0TJ-w.es.js → money-input-CtG9FJDJ.es.js} +4 -4
  67. package/dist/chunks/{money-input-Dkl0TJ-w.es.js.map → money-input-CtG9FJDJ.es.js.map} +1 -1
  68. package/dist/chunks/{money-input-CZkI0cQZ.cjs.js → money-input-DXpiO23i.cjs.js} +2 -2
  69. package/dist/chunks/{money-input-CZkI0cQZ.cjs.js.map → money-input-DXpiO23i.cjs.js.map} +1 -1
  70. package/dist/chunks/multiline-text-input-DZaLPY2Z.es.js +193 -0
  71. package/dist/chunks/multiline-text-input-DZaLPY2Z.es.js.map +1 -0
  72. package/dist/chunks/multiline-text-input-XW9WrmJi.cjs.js +12 -0
  73. package/dist/chunks/multiline-text-input-XW9WrmJi.cjs.js.map +1 -0
  74. package/dist/chunks/{nimbus-provider-DQ1CPSp4.cjs.js → nimbus-provider--E4ETLbz.cjs.js} +2 -2
  75. package/dist/chunks/{nimbus-provider-DQ1CPSp4.cjs.js.map → nimbus-provider--E4ETLbz.cjs.js.map} +1 -1
  76. package/dist/chunks/{nimbus-provider-CH5x7sz1.es.js → nimbus-provider-BE3QFNWW.es.js} +2 -2
  77. package/dist/chunks/{nimbus-provider-CH5x7sz1.es.js.map → nimbus-provider-BE3QFNWW.es.js.map} +1 -1
  78. package/dist/chunks/number-input-C-suceSs.cjs.js +2 -0
  79. package/dist/chunks/{number-input-BCyiGbGY.cjs.js.map → number-input-C-suceSs.cjs.js.map} +1 -1
  80. package/dist/chunks/{number-input-CjBiCFF6.es.js → number-input-COfobs8H.es.js} +347 -339
  81. package/dist/chunks/{number-input-CjBiCFF6.es.js.map → number-input-COfobs8H.es.js.map} +1 -1
  82. package/dist/chunks/{pagination-CwZAtcMm.cjs.js → pagination-BM1xkmu9.cjs.js} +2 -2
  83. package/dist/chunks/{pagination-CwZAtcMm.cjs.js.map → pagination-BM1xkmu9.cjs.js.map} +1 -1
  84. package/dist/chunks/{pagination-BYCMJoWX.es.js → pagination-C5bOKHnF.es.js} +4 -4
  85. package/dist/chunks/{pagination-BYCMJoWX.es.js.map → pagination-C5bOKHnF.es.js.map} +1 -1
  86. package/dist/chunks/password-input-BXIl-f4z.es.js +54 -0
  87. package/dist/chunks/password-input-BXIl-f4z.es.js.map +1 -0
  88. package/dist/chunks/password-input-Br-DbsF2.cjs.js +2 -0
  89. package/dist/chunks/password-input-Br-DbsF2.cjs.js.map +1 -0
  90. package/dist/chunks/{progress-bar-DhG9TG8r.es.js → progress-bar-8RZO_7Pa.es.js} +2 -2
  91. package/dist/chunks/{progress-bar-DhG9TG8r.es.js.map → progress-bar-8RZO_7Pa.es.js.map} +1 -1
  92. package/dist/chunks/{progress-bar-C9ElCIQE.cjs.js → progress-bar-CGfPZTdv.cjs.js} +2 -2
  93. package/dist/chunks/{progress-bar-C9ElCIQE.cjs.js.map → progress-bar-CGfPZTdv.cjs.js.map} +1 -1
  94. package/dist/chunks/{radio-input-CV2Am_Ol.es.js → radio-input-CBsoUt1S.es.js} +3 -3
  95. package/dist/chunks/{radio-input-CV2Am_Ol.es.js.map → radio-input-CBsoUt1S.es.js.map} +1 -1
  96. package/dist/chunks/{radio-input-A7KxF_yz.cjs.js → radio-input-D7oHngVQ.cjs.js} +2 -2
  97. package/dist/chunks/{radio-input-A7KxF_yz.cjs.js.map → radio-input-D7oHngVQ.cjs.js.map} +1 -1
  98. package/dist/chunks/{range-calendar-Dyt9IoJ_.cjs.js → range-calendar-CWkeoOzl.cjs.js} +2 -2
  99. package/dist/chunks/{range-calendar-Dyt9IoJ_.cjs.js.map → range-calendar-CWkeoOzl.cjs.js.map} +1 -1
  100. package/dist/chunks/{range-calendar-BpFwP2wF.es.js → range-calendar-ZSiCkuoX.es.js} +4 -4
  101. package/dist/chunks/{range-calendar-BpFwP2wF.es.js.map → range-calendar-ZSiCkuoX.es.js.map} +1 -1
  102. package/dist/chunks/{rich-text-input-sQtbxyfd.cjs.js → rich-text-input-CxWC-yrf.cjs.js} +2 -2
  103. package/dist/chunks/{rich-text-input-sQtbxyfd.cjs.js.map → rich-text-input-CxWC-yrf.cjs.js.map} +1 -1
  104. package/dist/chunks/{rich-text-input-BBVWAH5I.es.js → rich-text-input-YYPcexom.es.js} +7 -7
  105. package/dist/chunks/{rich-text-input-BBVWAH5I.es.js.map → rich-text-input-YYPcexom.es.js.map} +1 -1
  106. package/dist/chunks/{select-BvwErOqX.es.js → select-Bj9NNlBG.es.js} +156 -146
  107. package/dist/chunks/{select-BvwErOqX.es.js.map → select-Bj9NNlBG.es.js.map} +1 -1
  108. package/dist/chunks/select-DA6mGi-n.cjs.js +2 -0
  109. package/dist/chunks/{select-BL0Jeztf.cjs.js.map → select-DA6mGi-n.cjs.js.map} +1 -1
  110. package/dist/chunks/{separator-BRUFpi9l.es.js → separator-BBcK9ROS.es.js} +2 -2
  111. package/dist/chunks/{separator-BRUFpi9l.es.js.map → separator-BBcK9ROS.es.js.map} +1 -1
  112. package/dist/chunks/{separator-DKPbB_lK.cjs.js → separator-CoMx0Mmv.cjs.js} +2 -2
  113. package/dist/chunks/{separator-DKPbB_lK.cjs.js.map → separator-CoMx0Mmv.cjs.js.map} +1 -1
  114. package/dist/chunks/{split-button-B4SnFetQ.es.js → split-button-C5RRpvG-.es.js} +5 -5
  115. package/dist/chunks/{split-button-B4SnFetQ.es.js.map → split-button-C5RRpvG-.es.js.map} +1 -1
  116. package/dist/chunks/{split-button-Cs4jynee.cjs.js → split-button-DS-OCnNN.cjs.js} +2 -2
  117. package/dist/chunks/{split-button-Cs4jynee.cjs.js.map → split-button-DS-OCnNN.cjs.js.map} +1 -1
  118. package/dist/chunks/{switch-CssXPh09.es.js → switch-CaNbdCzT.es.js} +3 -3
  119. package/dist/chunks/{switch-CssXPh09.es.js.map → switch-CaNbdCzT.es.js.map} +1 -1
  120. package/dist/chunks/{switch-DAVy_DYC.cjs.js → switch-uAVIHIFM.cjs.js} +2 -2
  121. package/dist/chunks/{switch-DAVy_DYC.cjs.js.map → switch-uAVIHIFM.cjs.js.map} +1 -1
  122. package/dist/chunks/{tag-group-BJ33FcVi.cjs.js → tag-group-BfVRqsqw.cjs.js} +2 -2
  123. package/dist/chunks/{tag-group-BJ33FcVi.cjs.js.map → tag-group-BfVRqsqw.cjs.js.map} +1 -1
  124. package/dist/chunks/{tag-group-JeqOcMyb.es.js → tag-group-Bs6sb_ky.es.js} +2 -2
  125. package/dist/chunks/{tag-group-JeqOcMyb.es.js.map → tag-group-Bs6sb_ky.es.js.map} +1 -1
  126. package/dist/chunks/text-input-Bm5P6cG3.es.js +48 -0
  127. package/dist/chunks/text-input-Bm5P6cG3.es.js.map +1 -0
  128. package/dist/chunks/text-input-DgYI0-uU.cjs.js +2 -0
  129. package/dist/chunks/text-input-DgYI0-uU.cjs.js.map +1 -0
  130. package/dist/chunks/time-input-BVrf5gCi.es.js +179 -0
  131. package/dist/chunks/time-input-BVrf5gCi.es.js.map +1 -0
  132. package/dist/chunks/time-input-DOacr-Lo.cjs.js +2 -0
  133. package/dist/chunks/time-input-DOacr-Lo.cjs.js.map +1 -0
  134. package/dist/chunks/{toggle-button-DSp3s7cp.es.js → toggle-button-Bg4ygY7u.es.js} +3 -3
  135. package/dist/chunks/{toggle-button-DSp3s7cp.es.js.map → toggle-button-Bg4ygY7u.es.js.map} +1 -1
  136. package/dist/chunks/{toggle-button-BCDj-UQB.cjs.js → toggle-button-CoA46qg6.cjs.js} +2 -2
  137. package/dist/chunks/{toggle-button-BCDj-UQB.cjs.js.map → toggle-button-CoA46qg6.cjs.js.map} +1 -1
  138. package/dist/chunks/{toolbar-_QcKjeZY.es.js → toolbar-BZFjOgau.es.js} +3 -3
  139. package/dist/chunks/{toolbar-_QcKjeZY.es.js.map → toolbar-BZFjOgau.es.js.map} +1 -1
  140. package/dist/chunks/{toolbar-DSpz9u4Z.cjs.js → toolbar-CRak3D0J.cjs.js} +2 -2
  141. package/dist/chunks/{toolbar-DSpz9u4Z.cjs.js.map → toolbar-CRak3D0J.cjs.js.map} +1 -1
  142. package/dist/combobox.d.ts +26 -1
  143. package/dist/components/accordion.cjs +1 -1
  144. package/dist/components/accordion.es.js +1 -1
  145. package/dist/components/alert.cjs +1 -1
  146. package/dist/components/alert.es.js +1 -1
  147. package/dist/components/button.cjs +1 -1
  148. package/dist/components/button.es.js +1 -1
  149. package/dist/components/calendar.cjs +1 -1
  150. package/dist/components/calendar.es.js +1 -1
  151. package/dist/components/checkbox.cjs +1 -1
  152. package/dist/components/checkbox.es.js +1 -1
  153. package/dist/components/combobox.cjs +1 -1
  154. package/dist/components/combobox.es.js +1 -1
  155. package/dist/components/components.cjs +1 -1
  156. package/dist/components/components.es.js +33 -33
  157. package/dist/components/data-table.cjs +1 -1
  158. package/dist/components/data-table.es.js +1 -1
  159. package/dist/components/date-input.cjs +1 -1
  160. package/dist/components/date-input.es.js +1 -1
  161. package/dist/components/date-picker.cjs +1 -1
  162. package/dist/components/date-picker.es.js +1 -1
  163. package/dist/components/date-range-picker.cjs +1 -1
  164. package/dist/components/date-range-picker.es.js +1 -1
  165. package/dist/components/form-field.cjs +1 -1
  166. package/dist/components/form-field.es.js +1 -1
  167. package/dist/components/icon-button.cjs +1 -1
  168. package/dist/components/icon-button.es.js +1 -1
  169. package/dist/components/icon-toggle-button.cjs +1 -1
  170. package/dist/components/icon-toggle-button.es.js +1 -1
  171. package/dist/components/money-input.cjs +1 -1
  172. package/dist/components/money-input.es.js +1 -1
  173. package/dist/components/multiline-text-input.cjs +1 -1
  174. package/dist/components/multiline-text-input.es.js +1 -1
  175. package/dist/components/nimbus-provider.cjs +1 -1
  176. package/dist/components/nimbus-provider.es.js +1 -1
  177. package/dist/components/number-input.cjs +1 -1
  178. package/dist/components/number-input.es.js +1 -1
  179. package/dist/components/pagination.cjs +1 -1
  180. package/dist/components/pagination.es.js +1 -1
  181. package/dist/components/password-input.cjs +1 -1
  182. package/dist/components/password-input.es.js +1 -1
  183. package/dist/components/progress-bar.cjs +1 -1
  184. package/dist/components/progress-bar.es.js +1 -1
  185. package/dist/components/radio-input.cjs +1 -1
  186. package/dist/components/radio-input.es.js +1 -1
  187. package/dist/components/range-calendar.cjs +1 -1
  188. package/dist/components/range-calendar.es.js +1 -1
  189. package/dist/components/rich-text-input.cjs +1 -1
  190. package/dist/components/rich-text-input.es.js +1 -1
  191. package/dist/components/select.cjs +1 -1
  192. package/dist/components/select.es.js +1 -1
  193. package/dist/components/separator.cjs +1 -1
  194. package/dist/components/separator.es.js +1 -1
  195. package/dist/components/split-button.cjs +1 -1
  196. package/dist/components/split-button.es.js +1 -1
  197. package/dist/components/switch.cjs +1 -1
  198. package/dist/components/switch.es.js +1 -1
  199. package/dist/components/tag-group.cjs +1 -1
  200. package/dist/components/tag-group.es.js +1 -1
  201. package/dist/components/text-input.cjs +1 -1
  202. package/dist/components/text-input.es.js +1 -1
  203. package/dist/components/time-input.cjs +1 -1
  204. package/dist/components/time-input.es.js +1 -1
  205. package/dist/components/toggle-button.cjs +1 -1
  206. package/dist/components/toggle-button.es.js +1 -1
  207. package/dist/components/toolbar.cjs +1 -1
  208. package/dist/components/toolbar.es.js +1 -1
  209. package/dist/components.d.ts +302 -114
  210. package/dist/data-table.d.ts +6 -6
  211. package/dist/date-input.d.ts +43 -10
  212. package/dist/date-picker.d.ts +46 -31
  213. package/dist/index.cjs +1 -1
  214. package/dist/index.d.ts +316 -128
  215. package/dist/index.es.js +36 -36
  216. package/dist/multiline-text-input.d.ts +49 -9
  217. package/dist/number-input.d.ts +50 -31
  218. package/dist/password-input.d.ts +59 -25
  219. package/dist/select.d.ts +19 -2
  220. package/dist/text-input.d.ts +53 -21
  221. package/dist/time-input.d.ts +48 -12
  222. package/package.json +5 -5
  223. package/dist/chunks/combobox-Bjv3GWGo.es.js.map +0 -1
  224. package/dist/chunks/combobox-DFEUqaQv.cjs.js +0 -2
  225. package/dist/chunks/combobox-DFEUqaQv.cjs.js.map +0 -1
  226. package/dist/chunks/date-input-BfX4o6R4.es.js +0 -16
  227. package/dist/chunks/date-input-BfX4o6R4.es.js.map +0 -1
  228. package/dist/chunks/date-input-sKLgo0X8.cjs.js +0 -2
  229. package/dist/chunks/date-input-sKLgo0X8.cjs.js.map +0 -1
  230. package/dist/chunks/date-picker-BviqgxDx.es.js +0 -222
  231. package/dist/chunks/date-picker-BviqgxDx.es.js.map +0 -1
  232. package/dist/chunks/date-picker-STd_oI72.cjs.js +0 -2
  233. package/dist/chunks/date-picker-STd_oI72.cjs.js.map +0 -1
  234. package/dist/chunks/date-range-picker-CsUWSzSC.es.js.map +0 -1
  235. package/dist/chunks/date-range-picker-cA84RzN7.cjs.js +0 -2
  236. package/dist/chunks/date-range-picker-cA84RzN7.cjs.js.map +0 -1
  237. package/dist/chunks/index-DebuynT7.cjs.js +0 -4
  238. package/dist/chunks/index-DebuynT7.cjs.js.map +0 -1
  239. package/dist/chunks/index-DwjTNyza.es.js.map +0 -1
  240. package/dist/chunks/multiline-text-input-B9RhT0Oy.es.js +0 -118
  241. package/dist/chunks/multiline-text-input-B9RhT0Oy.es.js.map +0 -1
  242. package/dist/chunks/multiline-text-input-BGT_-xyA.cjs.js +0 -12
  243. package/dist/chunks/multiline-text-input-BGT_-xyA.cjs.js.map +0 -1
  244. package/dist/chunks/number-input-BCyiGbGY.cjs.js +0 -2
  245. package/dist/chunks/password-input-BkTbfljJ.cjs.js +0 -2
  246. package/dist/chunks/password-input-BkTbfljJ.cjs.js.map +0 -1
  247. package/dist/chunks/password-input-BlU2h_8U.es.js +0 -67
  248. package/dist/chunks/password-input-BlU2h_8U.es.js.map +0 -1
  249. package/dist/chunks/select-BL0Jeztf.cjs.js +0 -2
  250. package/dist/chunks/text-input-Bu4lGoBD.es.js +0 -18
  251. package/dist/chunks/text-input-Bu4lGoBD.es.js.map +0 -1
  252. package/dist/chunks/text-input-DtMgT0KI.cjs.js +0 -2
  253. package/dist/chunks/text-input-DtMgT0KI.cjs.js.map +0 -1
  254. package/dist/chunks/time-input-D8D26IcA.es.js +0 -130
  255. package/dist/chunks/time-input-D8D26IcA.es.js.map +0 -1
  256. package/dist/chunks/time-input-D9Xmy3YQ.cjs.js +0 -2
  257. package/dist/chunks/time-input-D9Xmy3YQ.cjs.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"accordion-CVM_3Y8u.cjs.js","sources":["../../../../node_modules/.pnpm/@react-aria+disclosure@3.0.8_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@react-aria/disclosure/dist/useDisclosure.mjs","../../../../node_modules/.pnpm/@react-stately+disclosure@3.0.7_react@19.1.0/node_modules/@react-stately/disclosure/dist/useDisclosureState.mjs","../../../../node_modules/.pnpm/@react-stately+disclosure@3.0.7_react@19.1.0/node_modules/@react-stately/disclosure/dist/useDisclosureGroupState.mjs","../../../../node_modules/.pnpm/react-aria-components@1.12.1_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-aria-components/dist/Disclosure.mjs","../../src/components/accordion/accordion.slots.tsx","../../src/components/accordion/components/accordion-root.tsx","../../src/components/accordion/components/accordion-header.tsx","../../src/components/accordion/components/accordion-content.tsx","../../src/components/accordion/components/accordion-item.tsx","../../src/components/accordion/accordion.tsx"],"sourcesContent":["import {flushSync as $6wN6e$flushSync} from \"react-dom\";\nimport {useRef as $6wN6e$useRef, useCallback as $6wN6e$useCallback, useEffect as $6wN6e$useEffect} from \"react\";\nimport {useId as $6wN6e$useId, useEvent as $6wN6e$useEvent, useLayoutEffect as $6wN6e$useLayoutEffect} from \"@react-aria/utils\";\nimport {useIsSSR as $6wN6e$useIsSSR} from \"@react-aria/ssr\";\n\n/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the 'License');\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\nfunction $5e910fae8e128ead$export$6e3e27031a30522f(props, state, ref) {\n let { isDisabled: isDisabled } = props;\n let triggerId = (0, $6wN6e$useId)();\n let panelId = (0, $6wN6e$useId)();\n let isSSR = (0, $6wN6e$useIsSSR)();\n let supportsBeforeMatch = !isSSR && 'onbeforematch' in document.body;\n let raf = (0, $6wN6e$useRef)(null);\n let handleBeforeMatch = (0, $6wN6e$useCallback)(()=>{\n // Wait a frame to revert browser's removal of hidden attribute\n raf.current = requestAnimationFrame(()=>{\n if (ref.current) ref.current.setAttribute('hidden', 'until-found');\n });\n // Force sync state update\n (0, $6wN6e$flushSync)(()=>{\n state.toggle();\n });\n }, [\n ref,\n state\n ]);\n // @ts-ignore https://github.com/facebook/react/pull/24741\n (0, $6wN6e$useEvent)(ref, 'beforematch', supportsBeforeMatch ? handleBeforeMatch : null);\n (0, $6wN6e$useLayoutEffect)(()=>{\n // Cancel any pending RAF to prevent stale updates\n if (raf.current) cancelAnimationFrame(raf.current);\n // Until React supports hidden=\"until-found\": https://github.com/facebook/react/pull/24741\n if (supportsBeforeMatch && ref.current && !isDisabled) {\n if (state.isExpanded) ref.current.removeAttribute('hidden');\n else ref.current.setAttribute('hidden', 'until-found');\n }\n }, [\n isDisabled,\n ref,\n state.isExpanded,\n supportsBeforeMatch\n ]);\n (0, $6wN6e$useEffect)(()=>{\n return ()=>{\n if (raf.current) cancelAnimationFrame(raf.current);\n };\n }, []);\n return {\n buttonProps: {\n id: triggerId,\n 'aria-expanded': state.isExpanded,\n 'aria-controls': panelId,\n onPress: (e)=>{\n if (!isDisabled && e.pointerType !== 'keyboard') state.toggle();\n },\n isDisabled: isDisabled,\n onPressStart (e) {\n if (e.pointerType === 'keyboard' && !isDisabled) state.toggle();\n }\n },\n panelProps: {\n id: panelId,\n // This can be overridden at the panel element level.\n role: 'group',\n 'aria-labelledby': triggerId,\n 'aria-hidden': !state.isExpanded,\n hidden: supportsBeforeMatch ? true : !state.isExpanded\n }\n };\n}\n\n\nexport {$5e910fae8e128ead$export$6e3e27031a30522f as useDisclosure};\n//# sourceMappingURL=useDisclosure.module.js.map\n","import {useCallback as $acGV5$useCallback} from \"react\";\nimport {useControlledState as $acGV5$useControlledState} from \"@react-stately/utils\";\n\n/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\nfunction $bf996d45f4a36925$export$3fcbf6e4407997e0(props) {\n let [isExpanded, setExpanded] = (0, $acGV5$useControlledState)(props.isExpanded, props.defaultExpanded || false, props.onExpandedChange);\n const expand = (0, $acGV5$useCallback)(()=>{\n setExpanded(true);\n }, [\n setExpanded\n ]);\n const collapse = (0, $acGV5$useCallback)(()=>{\n setExpanded(false);\n }, [\n setExpanded\n ]);\n const toggle = (0, $acGV5$useCallback)(()=>{\n setExpanded(!isExpanded);\n }, [\n setExpanded,\n isExpanded\n ]);\n return {\n isExpanded: isExpanded,\n setExpanded: setExpanded,\n expand: expand,\n collapse: collapse,\n toggle: toggle\n };\n}\n\n\nexport {$bf996d45f4a36925$export$3fcbf6e4407997e0 as useDisclosureState};\n//# sourceMappingURL=useDisclosureState.module.js.map\n","import {useControlledState as $j4gLc$useControlledState} from \"@react-stately/utils\";\nimport {useMemo as $j4gLc$useMemo, useEffect as $j4gLc$useEffect} from \"react\";\n\n/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\nfunction $9385b3affbdec831$export$f36461af0ef4707d(props) {\n let { allowsMultipleExpanded: allowsMultipleExpanded = false, isDisabled: isDisabled = false } = props;\n let [expandedKeys, setExpandedKeys] = (0, $j4gLc$useControlledState)((0, $j4gLc$useMemo)(()=>props.expandedKeys ? new Set(props.expandedKeys) : undefined, [\n props.expandedKeys\n ]), (0, $j4gLc$useMemo)(()=>props.defaultExpandedKeys ? new Set(props.defaultExpandedKeys) : new Set(), [\n props.defaultExpandedKeys\n ]), props.onExpandedChange);\n (0, $j4gLc$useEffect)(()=>{\n // Ensure only one item is expanded if allowsMultipleExpanded is false.\n if (!allowsMultipleExpanded && expandedKeys.size > 1) {\n let firstKey = expandedKeys.values().next().value;\n if (firstKey != null) setExpandedKeys(new Set([\n firstKey\n ]));\n }\n });\n return {\n allowsMultipleExpanded: allowsMultipleExpanded,\n isDisabled: isDisabled,\n expandedKeys: expandedKeys,\n setExpandedKeys: setExpandedKeys,\n toggleKey (key) {\n let keys;\n if (allowsMultipleExpanded) {\n keys = new Set(expandedKeys);\n if (keys.has(key)) keys.delete(key);\n else keys.add(key);\n } else keys = new Set(expandedKeys.has(key) ? [] : [\n key\n ]);\n setExpandedKeys(keys);\n }\n };\n}\n\n\nexport {$9385b3affbdec831$export$f36461af0ef4707d as useDisclosureGroupState};\n//# sourceMappingURL=useDisclosureGroupState.module.js.map\n","import {ButtonContext as $d2b4bc8c273e7be6$export$24d547caef80ccd1} from \"./Button.mjs\";\nimport {DEFAULT_SLOT as $64fa3d84918910a7$export$c62b8e45d58ddad9, Provider as $64fa3d84918910a7$export$2881499e37b75b9a, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3} from \"./utils.mjs\";\nimport {useDisclosure as $hI1OT$useDisclosure, useFocusRing as $hI1OT$useFocusRing} from \"react-aria\";\nimport {useDisclosureGroupState as $hI1OT$useDisclosureGroupState, useDisclosureState as $hI1OT$useDisclosureState} from \"react-stately\";\nimport {filterDOMProps as $hI1OT$filterDOMProps, useId as $hI1OT$useId, mergeProps as $hI1OT$mergeProps, mergeRefs as $hI1OT$mergeRefs} from \"@react-aria/utils\";\nimport $hI1OT$react, {createContext as $hI1OT$createContext, forwardRef as $hI1OT$forwardRef, useContext as $hI1OT$useContext} from \"react\";\n\n/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\n\n\nconst $28f4fd908f0de97f$export$1d40e3e0cc4d5de = /*#__PURE__*/ (0, $hI1OT$createContext)(null);\nconst $28f4fd908f0de97f$export$944aceb4f8c89f10 = /*#__PURE__*/ (0, $hI1OT$forwardRef)(function DisclosureGroup(props, ref) {\n let state = (0, $hI1OT$useDisclosureGroupState)(props);\n let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({\n ...props,\n defaultClassName: 'react-aria-DisclosureGroup',\n values: {\n isDisabled: state.isDisabled,\n state: state\n }\n });\n let domProps = (0, $hI1OT$filterDOMProps)(props, {\n global: true\n });\n return /*#__PURE__*/ (0, $hI1OT$react).createElement(\"div\", {\n ...domProps,\n ...renderProps,\n ref: ref,\n \"data-disabled\": props.isDisabled || undefined\n }, /*#__PURE__*/ (0, $hI1OT$react).createElement($28f4fd908f0de97f$export$1d40e3e0cc4d5de.Provider, {\n value: state\n }, renderProps.children));\n});\nconst $28f4fd908f0de97f$export$d665dd135a51b28a = /*#__PURE__*/ (0, $hI1OT$createContext)(null);\nconst $28f4fd908f0de97f$export$dab3ea4a6ef094da = /*#__PURE__*/ (0, $hI1OT$createContext)(null);\nconst $28f4fd908f0de97f$var$InternalDisclosureContext = /*#__PURE__*/ (0, $hI1OT$createContext)(null);\nconst $28f4fd908f0de97f$export$74a362b31437ec83 = /*#__PURE__*/ (0, $hI1OT$forwardRef)(function Disclosure(props, ref) {\n [props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $28f4fd908f0de97f$export$d665dd135a51b28a);\n let groupState = (0, $hI1OT$useContext)($28f4fd908f0de97f$export$1d40e3e0cc4d5de);\n let { id: id, ...otherProps } = props;\n // Generate an id if one wasn't provided.\n // (can't pass id into useId since it can also be a number)\n let defaultId = (0, $hI1OT$useId)();\n id || (id = defaultId);\n let isExpanded = groupState ? groupState.expandedKeys.has(id) : props.isExpanded;\n let state = (0, $hI1OT$useDisclosureState)({\n ...props,\n isExpanded: isExpanded,\n onExpandedChange (isExpanded) {\n var _props_onExpandedChange;\n if (groupState) groupState.toggleKey(id);\n (_props_onExpandedChange = props.onExpandedChange) === null || _props_onExpandedChange === void 0 ? void 0 : _props_onExpandedChange.call(props, isExpanded);\n }\n });\n let panelRef = (0, $hI1OT$react).useRef(null);\n let isDisabled = props.isDisabled || (groupState === null || groupState === void 0 ? void 0 : groupState.isDisabled) || false;\n let { buttonProps: buttonProps, panelProps: panelProps } = (0, $hI1OT$useDisclosure)({\n ...props,\n isExpanded: isExpanded,\n isDisabled: isDisabled\n }, state, panelRef);\n let { isFocusVisible: isFocusVisibleWithin, focusProps: focusWithinProps } = (0, $hI1OT$useFocusRing)({\n within: true\n });\n let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({\n ...props,\n id: undefined,\n defaultClassName: 'react-aria-Disclosure',\n values: {\n isExpanded: state.isExpanded,\n isDisabled: isDisabled,\n isFocusVisibleWithin: isFocusVisibleWithin,\n state: state\n }\n });\n let domProps = (0, $hI1OT$filterDOMProps)(otherProps, {\n global: true\n });\n return /*#__PURE__*/ (0, $hI1OT$react).createElement((0, $64fa3d84918910a7$export$2881499e37b75b9a), {\n values: [\n [\n (0, $d2b4bc8c273e7be6$export$24d547caef80ccd1),\n {\n slots: {\n [(0, $64fa3d84918910a7$export$c62b8e45d58ddad9)]: {},\n trigger: buttonProps\n }\n }\n ],\n [\n $28f4fd908f0de97f$var$InternalDisclosureContext,\n {\n panelProps: panelProps,\n panelRef: panelRef\n }\n ],\n [\n $28f4fd908f0de97f$export$dab3ea4a6ef094da,\n state\n ]\n ]\n }, /*#__PURE__*/ (0, $hI1OT$react).createElement(\"div\", {\n ...(0, $hI1OT$mergeProps)(domProps, renderProps, focusWithinProps),\n ref: ref,\n \"data-expanded\": state.isExpanded || undefined,\n \"data-disabled\": isDisabled || undefined,\n \"data-focus-visible-within\": isFocusVisibleWithin || undefined\n }, renderProps.children));\n});\nconst $28f4fd908f0de97f$export$feabaa331e1d464c = /*#__PURE__*/ (0, $hI1OT$forwardRef)(function DisclosurePanel(props, ref) {\n let { role: role = 'group' } = props;\n let { panelProps: panelProps, panelRef: panelRef } = (0, $hI1OT$useContext)($28f4fd908f0de97f$var$InternalDisclosureContext);\n let { isFocusVisible: isFocusVisibleWithin, focusProps: focusWithinProps } = (0, $hI1OT$useFocusRing)({\n within: true\n });\n let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({\n ...props,\n defaultClassName: 'react-aria-DisclosurePanel',\n values: {\n isFocusVisibleWithin: isFocusVisibleWithin\n }\n });\n let DOMProps = (0, $hI1OT$filterDOMProps)(props, {\n global: true\n });\n return /*#__PURE__*/ (0, $hI1OT$react).createElement(\"div\", {\n ...(0, $hI1OT$mergeProps)(DOMProps, renderProps, panelProps, focusWithinProps),\n ref: (0, $hI1OT$mergeRefs)(ref, panelRef),\n role: role,\n \"data-focus-visible-within\": isFocusVisibleWithin || undefined\n }, /*#__PURE__*/ (0, $hI1OT$react).createElement((0, $64fa3d84918910a7$export$2881499e37b75b9a), {\n values: [\n [\n (0, $d2b4bc8c273e7be6$export$24d547caef80ccd1),\n null\n ]\n ]\n }, props.children));\n});\n\n\nexport {$28f4fd908f0de97f$export$1d40e3e0cc4d5de as DisclosureGroupStateContext, $28f4fd908f0de97f$export$944aceb4f8c89f10 as DisclosureGroup, $28f4fd908f0de97f$export$d665dd135a51b28a as DisclosureContext, $28f4fd908f0de97f$export$dab3ea4a6ef094da as DisclosureStateContext, $28f4fd908f0de97f$export$74a362b31437ec83 as Disclosure, $28f4fd908f0de97f$export$feabaa331e1d464c as DisclosurePanel};\n//# sourceMappingURL=Disclosure.module.js.map\n","import {\n createSlotRecipeContext,\n type HTMLChakraProps,\n type RecipeVariantProps,\n} from \"@chakra-ui/react/styled-system\";\nimport { accordionSlotRecipe } from \"./accordion.recipe\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"accordion\",\n});\n\nexport type AccordionRootSlotProps = HTMLChakraProps<\n \"div\",\n RecipeVariantProps<typeof accordionSlotRecipe>\n>;\n\nexport const AccordionRootSlot = withProvider<\n HTMLDivElement,\n AccordionRootSlotProps\n>(\"div\", \"root\");\n\nexport const AccordionDisclosureSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"disclosure\");\n\nexport const AccordionTriggerSlot = withContext<\n HTMLButtonElement,\n HTMLChakraProps<\"button\">\n>(\"button\", \"trigger\");\n\nexport const AccordionPanelSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"panel\");\n\nexport const AccordionTitleSlot = withContext<\n HTMLButtonElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"accordionTitle\");\n\nexport const AccordionHeaderRightContentSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"headerContentRight\");\n","import { AccordionRootSlot } from \"../accordion.slots\";\nimport { useSlotRecipe } from \"@chakra-ui/react/styled-system\";\nimport { DisclosureGroup as RaDisclosureGroup } from \"react-aria-components\";\nimport type { AccordionRootProps } from \"../accordion.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\n\n/**\n * # Accordion\n *\n * Displays an Accordion.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/navigation/accordion}\n */\nexport const AccordionRoot = (props: AccordionRootProps) => {\n const { ref, ...restProps } = props;\n const recipe = useSlotRecipe({ key: \"accordion\" });\n const [recipeProps, restRecipeProps] = recipe.splitVariantProps(restProps);\n const [styleProps, raProps] = extractStyleProps(restRecipeProps);\n\n return (\n <AccordionRootSlot ref={ref} {...recipeProps} {...styleProps} asChild>\n <RaDisclosureGroup {...raProps} />\n </AccordionRootSlot>\n );\n};\n","import React, { useMemo } from \"react\";\nimport {\n AccordionTriggerSlot,\n AccordionTitleSlot,\n AccordionHeaderRightContentSlot,\n} from \"../accordion.slots\";\nimport { Flex } from \"@/components\";\nimport { KeyboardArrowRight } from \"@commercetools/nimbus-icons\";\nimport { Button as RaButton } from \"react-aria-components\";\nimport type { AccordionHeaderProps } from \"../accordion.types\";\n\nexport const AccordionHeader = ({\n children,\n ref,\n ...props\n}: AccordionHeaderProps) => {\n // Extract HeaderRightContent if present\n const headerContent = useMemo(() => {\n const main: React.ReactNode[] = [];\n const rightContent: React.ReactNode[] = [];\n\n React.Children.forEach(children, (child) => {\n if (\n React.isValidElement(child) &&\n child.type === AccordionHeaderRightContentSlot\n ) {\n rightContent.push(child);\n } else {\n main.push(child);\n }\n });\n\n return { main, rightContent };\n }, [children]);\n\n return (\n <Flex\n justifyContent=\"space-between\"\n alignItems=\"center\"\n borderBottom=\"solid-25\"\n borderColor=\"neutral.4\"\n >\n <AccordionTriggerSlot ref={ref} slot=\"trigger\" asChild>\n <RaButton {...props}>\n <KeyboardArrowRight />\n <AccordionTitleSlot>{headerContent.main}</AccordionTitleSlot>\n </RaButton>\n </AccordionTriggerSlot>\n {headerContent.rightContent.length > 0 && (\n <AccordionHeaderRightContentSlot>\n {headerContent.rightContent}\n </AccordionHeaderRightContentSlot>\n )}\n </Flex>\n );\n};\n","import { AccordionPanelSlot } from \"../accordion.slots\";\nimport { DisclosurePanel as RaDisclosurePanel } from \"react-aria-components\";\nimport type { AccordionContentProps } from \"../accordion.types\";\n\n// Create Content component\nexport const AccordionContent = ({\n children,\n ref,\n ...props\n}: AccordionContentProps) => {\n return (\n <AccordionPanelSlot ref={ref} asChild>\n <RaDisclosurePanel {...props}>{children}</RaDisclosurePanel>\n </AccordionPanelSlot>\n );\n};\n","import { AccordionDisclosureSlot } from \"../accordion.slots\";\nimport { Disclosure as RaDisclosure } from \"react-aria-components\";\nimport type { AccordionItemProps } from \"../accordion.types\";\n\nexport const AccordionItem = ({\n children,\n value,\n ref,\n ...props\n}: AccordionItemProps) => {\n const disclosureProps = {\n ...props,\n id: value, // React Aria uses id for the key\n };\n\n return (\n <AccordionDisclosureSlot data-value={value} ref={ref} asChild>\n <RaDisclosure {...disclosureProps}>{children}</RaDisclosure>\n </AccordionDisclosureSlot>\n );\n};\n","import { AccordionHeaderRightContentSlot } from \"./accordion.slots\";\nimport { AccordionRoot } from \"./components/accordion-root\";\nimport { AccordionHeader } from \"./components/accordion-header\";\nimport { AccordionContent } from \"./components/accordion-content\";\nimport { AccordionItem } from \"./components/accordion-item\";\n\n// Create the Accordion namespace object as an object literal\nexport const Accordion = {\n Root: AccordionRoot,\n Item: AccordionItem,\n Header: AccordionHeader,\n Content: AccordionContent,\n HeaderRightContent: AccordionHeaderRightContentSlot,\n};\n\nexport {\n AccordionRoot as _AccordionRoot,\n AccordionItem as _AccordionItem,\n AccordionHeader as _AccordionHeader,\n AccordionContent as _AccordionContent,\n AccordionHeaderRightContentSlot as _AccordionHeaderRightContent,\n};\n"],"names":["$5e910fae8e128ead$export$6e3e27031a30522f","props","state","ref","isDisabled","triggerId","$6wN6e$useId","panelId","supportsBeforeMatch","$6wN6e$useIsSSR","raf","$6wN6e$useRef","handleBeforeMatch","$6wN6e$useCallback","$6wN6e$flushSync","$6wN6e$useEvent","$6wN6e$useLayoutEffect","$6wN6e$useEffect","e","$bf996d45f4a36925$export$3fcbf6e4407997e0","isExpanded","setExpanded","$acGV5$useControlledState","expand","$acGV5$useCallback","collapse","toggle","$9385b3affbdec831$export$f36461af0ef4707d","allowsMultipleExpanded","expandedKeys","setExpandedKeys","$j4gLc$useControlledState","$j4gLc$useMemo","$j4gLc$useEffect","firstKey","key","keys","$28f4fd908f0de97f$export$1d40e3e0cc4d5de","$hI1OT$createContext","$28f4fd908f0de97f$export$944aceb4f8c89f10","$hI1OT$forwardRef","$hI1OT$useDisclosureGroupState","renderProps","$64fa3d84918910a7$export$4d86445c2cf5e3","domProps","$hI1OT$filterDOMProps","$hI1OT$react","$28f4fd908f0de97f$export$d665dd135a51b28a","$28f4fd908f0de97f$export$dab3ea4a6ef094da","$28f4fd908f0de97f$var$InternalDisclosureContext","$28f4fd908f0de97f$export$74a362b31437ec83","$64fa3d84918910a7$export$29f1550f4b0d4415","groupState","$hI1OT$useContext","id","otherProps","defaultId","$hI1OT$useId","$hI1OT$useDisclosureState","_props_onExpandedChange","panelRef","buttonProps","panelProps","$hI1OT$useDisclosure","isFocusVisibleWithin","focusWithinProps","$hI1OT$useFocusRing","$64fa3d84918910a7$export$2881499e37b75b9a","$d2b4bc8c273e7be6$export$24d547caef80ccd1","$64fa3d84918910a7$export$c62b8e45d58ddad9","$hI1OT$mergeProps","$28f4fd908f0de97f$export$feabaa331e1d464c","role","DOMProps","$hI1OT$mergeRefs","withProvider","withContext","createSlotRecipeContext","AccordionRootSlot","AccordionDisclosureSlot","AccordionTriggerSlot","AccordionPanelSlot","AccordionTitleSlot","AccordionHeaderRightContentSlot","AccordionRoot","restProps","recipe","useSlotRecipe","recipeProps","restRecipeProps","styleProps","raProps","extractStyleProps","jsx","RaDisclosureGroup","AccordionHeader","children","headerContent","useMemo","main","rightContent","React","child","jsxs","Flex","RaButton","KeyboardArrowRight","AccordionContent","RaDisclosurePanel","AccordionItem","value","disclosureProps","RaDisclosure","Accordion"],"mappings":"ylBAmBA,SAASA,EAA0CC,EAAOC,EAAOC,EAAK,CAClE,GAAI,CAAE,WAAYC,CAAU,EAAKH,EAC7BI,EAAgBC,4CAAY,EAC5BC,EAAcD,4CAAY,EAE1BE,EAAsB,CADVC,4CAAe,GACK,kBAAmB,SAAS,KAC5DC,EAAUC,EAAAA,OAAe,IAAI,EAC7BC,EAAwBC,EAAAA,YAAoB,IAAI,CAEhDH,EAAI,QAAU,sBAAsB,IAAI,CAChCP,EAAI,SAASA,EAAI,QAAQ,aAAa,SAAU,aAAa,CACrE,CAAC,EAEGW,EAAAA,UAAkB,IAAI,CACtBZ,EAAM,OAAM,CAChB,CAAC,CACL,EAAG,CACCC,EACAD,CACR,CAAK,EAED,OAAIa,EAAAA,0CAAiBZ,EAAK,cAAeK,EAAsBI,EAAoB,IAAI,EACnFI,EAAAA,0CAAwB,IAAI,CAExBN,EAAI,SAAS,qBAAqBA,EAAI,OAAO,EAE7CF,GAAuBL,EAAI,SAAW,CAACC,IACnCF,EAAM,WAAYC,EAAI,QAAQ,gBAAgB,QAAQ,EACrDA,EAAI,QAAQ,aAAa,SAAU,aAAa,EAE7D,EAAG,CACCC,EACAD,EACAD,EAAM,WACNM,CACR,CAAK,EACGS,EAAAA,UAAkB,IACX,I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AC1C,CAAA,CACF,EACCA,EAAc,aAAa,OAAS,GACnCJ,EAAAA,IAACV,EAAA,CACE,WAAc,YAAA,CACjB,CAAA,CAAA,CAAA,CAIR,EClDawB,EAAmB,CAAC,CAC/B,SAAAX,EACA,IAAA7F,EACA,GAAGF,CACL,IAEI4F,EAAAA,IAACZ,GAAA,CAAmB,IAAA9E,EAAU,QAAO,GACnC,eAACyG,EAAA,CAAmB,GAAG3G,EAAQ,SAAA+F,CAAA,CAAS,CAAA,CAC1C,ECTSa,EAAgB,CAAC,CAC5B,SAAAb,EACA,MAAAc,EACA,IAAA3G,EACA,GAAGF,CACL,IAA0B,CACxB,MAAM8G,EAAkB,CACtB,GAAG9G,EACH,GAAI6G,CAAA,EAGN,OACEjB,EAAAA,IAACd,EAAA,CAAwB,aAAY+B,EAAO,IAAA3G,EAAU,QAAO,GAC3D,SAAA0F,EAAAA,IAACmB,EAAA,CAAc,GAAGD,EAAkB,SAAAf,CAAA,CAAS,EAC/C,CAEJ,ECbaiB,GAAY,CACvB,KAAM7B,EACN,KAAMyB,EACN,OAAQd,EACR,QAASY,EACT,mBAAoBxB,CACtB","x_google_ignoreList":[0,1,2,3]}
1
+ {"version":3,"file":"accordion-xYvGyXy-.cjs.js","sources":["../../../../node_modules/.pnpm/@react-aria+disclosure@3.0.8_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@react-aria/disclosure/dist/useDisclosure.mjs","../../../../node_modules/.pnpm/@react-stately+disclosure@3.0.7_react@19.1.0/node_modules/@react-stately/disclosure/dist/useDisclosureState.mjs","../../../../node_modules/.pnpm/@react-stately+disclosure@3.0.7_react@19.1.0/node_modules/@react-stately/disclosure/dist/useDisclosureGroupState.mjs","../../../../node_modules/.pnpm/react-aria-components@1.12.1_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/react-aria-components/dist/Disclosure.mjs","../../src/components/accordion/accordion.slots.tsx","../../src/components/accordion/components/accordion-root.tsx","../../src/components/accordion/components/accordion-header.tsx","../../src/components/accordion/components/accordion-content.tsx","../../src/components/accordion/components/accordion-item.tsx","../../src/components/accordion/accordion.tsx"],"sourcesContent":["import {flushSync as $6wN6e$flushSync} from \"react-dom\";\nimport {useRef as $6wN6e$useRef, useCallback as $6wN6e$useCallback, useEffect as $6wN6e$useEffect} from \"react\";\nimport {useId as $6wN6e$useId, useEvent as $6wN6e$useEvent, useLayoutEffect as $6wN6e$useLayoutEffect} from \"@react-aria/utils\";\nimport {useIsSSR as $6wN6e$useIsSSR} from \"@react-aria/ssr\";\n\n/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the 'License');\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\nfunction $5e910fae8e128ead$export$6e3e27031a30522f(props, state, ref) {\n let { isDisabled: isDisabled } = props;\n let triggerId = (0, $6wN6e$useId)();\n let panelId = (0, $6wN6e$useId)();\n let isSSR = (0, $6wN6e$useIsSSR)();\n let supportsBeforeMatch = !isSSR && 'onbeforematch' in document.body;\n let raf = (0, $6wN6e$useRef)(null);\n let handleBeforeMatch = (0, $6wN6e$useCallback)(()=>{\n // Wait a frame to revert browser's removal of hidden attribute\n raf.current = requestAnimationFrame(()=>{\n if (ref.current) ref.current.setAttribute('hidden', 'until-found');\n });\n // Force sync state update\n (0, $6wN6e$flushSync)(()=>{\n state.toggle();\n });\n }, [\n ref,\n state\n ]);\n // @ts-ignore https://github.com/facebook/react/pull/24741\n (0, $6wN6e$useEvent)(ref, 'beforematch', supportsBeforeMatch ? handleBeforeMatch : null);\n (0, $6wN6e$useLayoutEffect)(()=>{\n // Cancel any pending RAF to prevent stale updates\n if (raf.current) cancelAnimationFrame(raf.current);\n // Until React supports hidden=\"until-found\": https://github.com/facebook/react/pull/24741\n if (supportsBeforeMatch && ref.current && !isDisabled) {\n if (state.isExpanded) ref.current.removeAttribute('hidden');\n else ref.current.setAttribute('hidden', 'until-found');\n }\n }, [\n isDisabled,\n ref,\n state.isExpanded,\n supportsBeforeMatch\n ]);\n (0, $6wN6e$useEffect)(()=>{\n return ()=>{\n if (raf.current) cancelAnimationFrame(raf.current);\n };\n }, []);\n return {\n buttonProps: {\n id: triggerId,\n 'aria-expanded': state.isExpanded,\n 'aria-controls': panelId,\n onPress: (e)=>{\n if (!isDisabled && e.pointerType !== 'keyboard') state.toggle();\n },\n isDisabled: isDisabled,\n onPressStart (e) {\n if (e.pointerType === 'keyboard' && !isDisabled) state.toggle();\n }\n },\n panelProps: {\n id: panelId,\n // This can be overridden at the panel element level.\n role: 'group',\n 'aria-labelledby': triggerId,\n 'aria-hidden': !state.isExpanded,\n hidden: supportsBeforeMatch ? true : !state.isExpanded\n }\n };\n}\n\n\nexport {$5e910fae8e128ead$export$6e3e27031a30522f as useDisclosure};\n//# sourceMappingURL=useDisclosure.module.js.map\n","import {useCallback as $acGV5$useCallback} from \"react\";\nimport {useControlledState as $acGV5$useControlledState} from \"@react-stately/utils\";\n\n/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\nfunction $bf996d45f4a36925$export$3fcbf6e4407997e0(props) {\n let [isExpanded, setExpanded] = (0, $acGV5$useControlledState)(props.isExpanded, props.defaultExpanded || false, props.onExpandedChange);\n const expand = (0, $acGV5$useCallback)(()=>{\n setExpanded(true);\n }, [\n setExpanded\n ]);\n const collapse = (0, $acGV5$useCallback)(()=>{\n setExpanded(false);\n }, [\n setExpanded\n ]);\n const toggle = (0, $acGV5$useCallback)(()=>{\n setExpanded(!isExpanded);\n }, [\n setExpanded,\n isExpanded\n ]);\n return {\n isExpanded: isExpanded,\n setExpanded: setExpanded,\n expand: expand,\n collapse: collapse,\n toggle: toggle\n };\n}\n\n\nexport {$bf996d45f4a36925$export$3fcbf6e4407997e0 as useDisclosureState};\n//# sourceMappingURL=useDisclosureState.module.js.map\n","import {useControlledState as $j4gLc$useControlledState} from \"@react-stately/utils\";\nimport {useMemo as $j4gLc$useMemo, useEffect as $j4gLc$useEffect} from \"react\";\n\n/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\nfunction $9385b3affbdec831$export$f36461af0ef4707d(props) {\n let { allowsMultipleExpanded: allowsMultipleExpanded = false, isDisabled: isDisabled = false } = props;\n let [expandedKeys, setExpandedKeys] = (0, $j4gLc$useControlledState)((0, $j4gLc$useMemo)(()=>props.expandedKeys ? new Set(props.expandedKeys) : undefined, [\n props.expandedKeys\n ]), (0, $j4gLc$useMemo)(()=>props.defaultExpandedKeys ? new Set(props.defaultExpandedKeys) : new Set(), [\n props.defaultExpandedKeys\n ]), props.onExpandedChange);\n (0, $j4gLc$useEffect)(()=>{\n // Ensure only one item is expanded if allowsMultipleExpanded is false.\n if (!allowsMultipleExpanded && expandedKeys.size > 1) {\n let firstKey = expandedKeys.values().next().value;\n if (firstKey != null) setExpandedKeys(new Set([\n firstKey\n ]));\n }\n });\n return {\n allowsMultipleExpanded: allowsMultipleExpanded,\n isDisabled: isDisabled,\n expandedKeys: expandedKeys,\n setExpandedKeys: setExpandedKeys,\n toggleKey (key) {\n let keys;\n if (allowsMultipleExpanded) {\n keys = new Set(expandedKeys);\n if (keys.has(key)) keys.delete(key);\n else keys.add(key);\n } else keys = new Set(expandedKeys.has(key) ? [] : [\n key\n ]);\n setExpandedKeys(keys);\n }\n };\n}\n\n\nexport {$9385b3affbdec831$export$f36461af0ef4707d as useDisclosureGroupState};\n//# sourceMappingURL=useDisclosureGroupState.module.js.map\n","import {ButtonContext as $d2b4bc8c273e7be6$export$24d547caef80ccd1} from \"./Button.mjs\";\nimport {DEFAULT_SLOT as $64fa3d84918910a7$export$c62b8e45d58ddad9, Provider as $64fa3d84918910a7$export$2881499e37b75b9a, useContextProps as $64fa3d84918910a7$export$29f1550f4b0d4415, useRenderProps as $64fa3d84918910a7$export$4d86445c2cf5e3} from \"./utils.mjs\";\nimport {useDisclosure as $hI1OT$useDisclosure, useFocusRing as $hI1OT$useFocusRing} from \"react-aria\";\nimport {useDisclosureGroupState as $hI1OT$useDisclosureGroupState, useDisclosureState as $hI1OT$useDisclosureState} from \"react-stately\";\nimport {filterDOMProps as $hI1OT$filterDOMProps, useId as $hI1OT$useId, mergeProps as $hI1OT$mergeProps, mergeRefs as $hI1OT$mergeRefs} from \"@react-aria/utils\";\nimport $hI1OT$react, {createContext as $hI1OT$createContext, forwardRef as $hI1OT$forwardRef, useContext as $hI1OT$useContext} from \"react\";\n\n/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\n\n\nconst $28f4fd908f0de97f$export$1d40e3e0cc4d5de = /*#__PURE__*/ (0, $hI1OT$createContext)(null);\nconst $28f4fd908f0de97f$export$944aceb4f8c89f10 = /*#__PURE__*/ (0, $hI1OT$forwardRef)(function DisclosureGroup(props, ref) {\n let state = (0, $hI1OT$useDisclosureGroupState)(props);\n let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({\n ...props,\n defaultClassName: 'react-aria-DisclosureGroup',\n values: {\n isDisabled: state.isDisabled,\n state: state\n }\n });\n let domProps = (0, $hI1OT$filterDOMProps)(props, {\n global: true\n });\n return /*#__PURE__*/ (0, $hI1OT$react).createElement(\"div\", {\n ...domProps,\n ...renderProps,\n ref: ref,\n \"data-disabled\": props.isDisabled || undefined\n }, /*#__PURE__*/ (0, $hI1OT$react).createElement($28f4fd908f0de97f$export$1d40e3e0cc4d5de.Provider, {\n value: state\n }, renderProps.children));\n});\nconst $28f4fd908f0de97f$export$d665dd135a51b28a = /*#__PURE__*/ (0, $hI1OT$createContext)(null);\nconst $28f4fd908f0de97f$export$dab3ea4a6ef094da = /*#__PURE__*/ (0, $hI1OT$createContext)(null);\nconst $28f4fd908f0de97f$var$InternalDisclosureContext = /*#__PURE__*/ (0, $hI1OT$createContext)(null);\nconst $28f4fd908f0de97f$export$74a362b31437ec83 = /*#__PURE__*/ (0, $hI1OT$forwardRef)(function Disclosure(props, ref) {\n [props, ref] = (0, $64fa3d84918910a7$export$29f1550f4b0d4415)(props, ref, $28f4fd908f0de97f$export$d665dd135a51b28a);\n let groupState = (0, $hI1OT$useContext)($28f4fd908f0de97f$export$1d40e3e0cc4d5de);\n let { id: id, ...otherProps } = props;\n // Generate an id if one wasn't provided.\n // (can't pass id into useId since it can also be a number)\n let defaultId = (0, $hI1OT$useId)();\n id || (id = defaultId);\n let isExpanded = groupState ? groupState.expandedKeys.has(id) : props.isExpanded;\n let state = (0, $hI1OT$useDisclosureState)({\n ...props,\n isExpanded: isExpanded,\n onExpandedChange (isExpanded) {\n var _props_onExpandedChange;\n if (groupState) groupState.toggleKey(id);\n (_props_onExpandedChange = props.onExpandedChange) === null || _props_onExpandedChange === void 0 ? void 0 : _props_onExpandedChange.call(props, isExpanded);\n }\n });\n let panelRef = (0, $hI1OT$react).useRef(null);\n let isDisabled = props.isDisabled || (groupState === null || groupState === void 0 ? void 0 : groupState.isDisabled) || false;\n let { buttonProps: buttonProps, panelProps: panelProps } = (0, $hI1OT$useDisclosure)({\n ...props,\n isExpanded: isExpanded,\n isDisabled: isDisabled\n }, state, panelRef);\n let { isFocusVisible: isFocusVisibleWithin, focusProps: focusWithinProps } = (0, $hI1OT$useFocusRing)({\n within: true\n });\n let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({\n ...props,\n id: undefined,\n defaultClassName: 'react-aria-Disclosure',\n values: {\n isExpanded: state.isExpanded,\n isDisabled: isDisabled,\n isFocusVisibleWithin: isFocusVisibleWithin,\n state: state\n }\n });\n let domProps = (0, $hI1OT$filterDOMProps)(otherProps, {\n global: true\n });\n return /*#__PURE__*/ (0, $hI1OT$react).createElement((0, $64fa3d84918910a7$export$2881499e37b75b9a), {\n values: [\n [\n (0, $d2b4bc8c273e7be6$export$24d547caef80ccd1),\n {\n slots: {\n [(0, $64fa3d84918910a7$export$c62b8e45d58ddad9)]: {},\n trigger: buttonProps\n }\n }\n ],\n [\n $28f4fd908f0de97f$var$InternalDisclosureContext,\n {\n panelProps: panelProps,\n panelRef: panelRef\n }\n ],\n [\n $28f4fd908f0de97f$export$dab3ea4a6ef094da,\n state\n ]\n ]\n }, /*#__PURE__*/ (0, $hI1OT$react).createElement(\"div\", {\n ...(0, $hI1OT$mergeProps)(domProps, renderProps, focusWithinProps),\n ref: ref,\n \"data-expanded\": state.isExpanded || undefined,\n \"data-disabled\": isDisabled || undefined,\n \"data-focus-visible-within\": isFocusVisibleWithin || undefined\n }, renderProps.children));\n});\nconst $28f4fd908f0de97f$export$feabaa331e1d464c = /*#__PURE__*/ (0, $hI1OT$forwardRef)(function DisclosurePanel(props, ref) {\n let { role: role = 'group' } = props;\n let { panelProps: panelProps, panelRef: panelRef } = (0, $hI1OT$useContext)($28f4fd908f0de97f$var$InternalDisclosureContext);\n let { isFocusVisible: isFocusVisibleWithin, focusProps: focusWithinProps } = (0, $hI1OT$useFocusRing)({\n within: true\n });\n let renderProps = (0, $64fa3d84918910a7$export$4d86445c2cf5e3)({\n ...props,\n defaultClassName: 'react-aria-DisclosurePanel',\n values: {\n isFocusVisibleWithin: isFocusVisibleWithin\n }\n });\n let DOMProps = (0, $hI1OT$filterDOMProps)(props, {\n global: true\n });\n return /*#__PURE__*/ (0, $hI1OT$react).createElement(\"div\", {\n ...(0, $hI1OT$mergeProps)(DOMProps, renderProps, panelProps, focusWithinProps),\n ref: (0, $hI1OT$mergeRefs)(ref, panelRef),\n role: role,\n \"data-focus-visible-within\": isFocusVisibleWithin || undefined\n }, /*#__PURE__*/ (0, $hI1OT$react).createElement((0, $64fa3d84918910a7$export$2881499e37b75b9a), {\n values: [\n [\n (0, $d2b4bc8c273e7be6$export$24d547caef80ccd1),\n null\n ]\n ]\n }, props.children));\n});\n\n\nexport {$28f4fd908f0de97f$export$1d40e3e0cc4d5de as DisclosureGroupStateContext, $28f4fd908f0de97f$export$944aceb4f8c89f10 as DisclosureGroup, $28f4fd908f0de97f$export$d665dd135a51b28a as DisclosureContext, $28f4fd908f0de97f$export$dab3ea4a6ef094da as DisclosureStateContext, $28f4fd908f0de97f$export$74a362b31437ec83 as Disclosure, $28f4fd908f0de97f$export$feabaa331e1d464c as DisclosurePanel};\n//# sourceMappingURL=Disclosure.module.js.map\n","import {\n createSlotRecipeContext,\n type HTMLChakraProps,\n type RecipeVariantProps,\n} from \"@chakra-ui/react/styled-system\";\nimport { accordionSlotRecipe } from \"./accordion.recipe\";\n\nconst { withProvider, withContext } = createSlotRecipeContext({\n key: \"accordion\",\n});\n\nexport type AccordionRootSlotProps = HTMLChakraProps<\n \"div\",\n RecipeVariantProps<typeof accordionSlotRecipe>\n>;\n\nexport const AccordionRootSlot = withProvider<\n HTMLDivElement,\n AccordionRootSlotProps\n>(\"div\", \"root\");\n\nexport const AccordionDisclosureSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"disclosure\");\n\nexport const AccordionTriggerSlot = withContext<\n HTMLButtonElement,\n HTMLChakraProps<\"button\">\n>(\"button\", \"trigger\");\n\nexport const AccordionPanelSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"panel\");\n\nexport const AccordionTitleSlot = withContext<\n HTMLButtonElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"accordionTitle\");\n\nexport const AccordionHeaderRightContentSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"headerContentRight\");\n","import { AccordionRootSlot } from \"../accordion.slots\";\nimport { useSlotRecipe } from \"@chakra-ui/react/styled-system\";\nimport { DisclosureGroup as RaDisclosureGroup } from \"react-aria-components\";\nimport type { AccordionRootProps } from \"../accordion.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\n\n/**\n * # Accordion\n *\n * Displays an Accordion.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/navigation/accordion}\n */\nexport const AccordionRoot = (props: AccordionRootProps) => {\n const { ref, ...restProps } = props;\n const recipe = useSlotRecipe({ key: \"accordion\" });\n const [recipeProps, restRecipeProps] = recipe.splitVariantProps(restProps);\n const [styleProps, raProps] = extractStyleProps(restRecipeProps);\n\n return (\n <AccordionRootSlot ref={ref} {...recipeProps} {...styleProps} asChild>\n <RaDisclosureGroup {...raProps} />\n </AccordionRootSlot>\n );\n};\n","import React, { useMemo } from \"react\";\nimport {\n AccordionTriggerSlot,\n AccordionTitleSlot,\n AccordionHeaderRightContentSlot,\n} from \"../accordion.slots\";\nimport { Flex } from \"@/components\";\nimport { KeyboardArrowRight } from \"@commercetools/nimbus-icons\";\nimport { Button as RaButton } from \"react-aria-components\";\nimport type { AccordionHeaderProps } from \"../accordion.types\";\n\nexport const AccordionHeader = ({\n children,\n ref,\n ...props\n}: AccordionHeaderProps) => {\n // Extract HeaderRightContent if present\n const headerContent = useMemo(() => {\n const main: React.ReactNode[] = [];\n const rightContent: React.ReactNode[] = [];\n\n React.Children.forEach(children, (child) => {\n if (\n React.isValidElement(child) &&\n child.type === AccordionHeaderRightContentSlot\n ) {\n rightContent.push(child);\n } else {\n main.push(child);\n }\n });\n\n return { main, rightContent };\n }, [children]);\n\n return (\n <Flex\n justifyContent=\"space-between\"\n alignItems=\"center\"\n borderBottom=\"solid-25\"\n borderColor=\"neutral.4\"\n >\n <AccordionTriggerSlot ref={ref} slot=\"trigger\" asChild>\n <RaButton {...props}>\n <KeyboardArrowRight />\n <AccordionTitleSlot>{headerContent.main}</AccordionTitleSlot>\n </RaButton>\n </AccordionTriggerSlot>\n {headerContent.rightContent.length > 0 && (\n <AccordionHeaderRightContentSlot>\n {headerContent.rightContent}\n </AccordionHeaderRightContentSlot>\n )}\n </Flex>\n );\n};\n","import { AccordionPanelSlot } from \"../accordion.slots\";\nimport { DisclosurePanel as RaDisclosurePanel } from \"react-aria-components\";\nimport type { AccordionContentProps } from \"../accordion.types\";\n\n// Create Content component\nexport const AccordionContent = ({\n children,\n ref,\n ...props\n}: AccordionContentProps) => {\n return (\n <AccordionPanelSlot ref={ref} asChild>\n <RaDisclosurePanel {...props}>{children}</RaDisclosurePanel>\n </AccordionPanelSlot>\n );\n};\n","import { AccordionDisclosureSlot } from \"../accordion.slots\";\nimport { Disclosure as RaDisclosure } from \"react-aria-components\";\nimport type { AccordionItemProps } from \"../accordion.types\";\n\nexport const AccordionItem = ({\n children,\n value,\n ref,\n ...props\n}: AccordionItemProps) => {\n const disclosureProps = {\n ...props,\n id: value, // React Aria uses id for the key\n };\n\n return (\n <AccordionDisclosureSlot data-value={value} ref={ref} asChild>\n <RaDisclosure {...disclosureProps}>{children}</RaDisclosure>\n </AccordionDisclosureSlot>\n );\n};\n","import { AccordionHeaderRightContentSlot } from \"./accordion.slots\";\nimport { AccordionRoot } from \"./components/accordion-root\";\nimport { AccordionHeader } from \"./components/accordion-header\";\nimport { AccordionContent } from \"./components/accordion-content\";\nimport { AccordionItem } from \"./components/accordion-item\";\n\n// Create the Accordion namespace object as an object literal\nexport const Accordion = {\n Root: AccordionRoot,\n Item: AccordionItem,\n Header: AccordionHeader,\n Content: AccordionContent,\n HeaderRightContent: AccordionHeaderRightContentSlot,\n};\n\nexport {\n AccordionRoot as _AccordionRoot,\n AccordionItem as _AccordionItem,\n AccordionHeader as _AccordionHeader,\n AccordionContent as _AccordionContent,\n AccordionHeaderRightContentSlot as _AccordionHeaderRightContent,\n};\n"],"names":["$5e910fae8e128ead$export$6e3e27031a30522f","props","state","ref","isDisabled","triggerId","$6wN6e$useId","panelId","supportsBeforeMatch","$6wN6e$useIsSSR","raf","$6wN6e$useRef","handleBeforeMatch","$6wN6e$useCallback","$6wN6e$flushSync","$6wN6e$useEvent","$6wN6e$useLayoutEffect","$6wN6e$useEffect","e","$bf996d45f4a36925$export$3fcbf6e4407997e0","isExpanded","setExpanded","$acGV5$useControlledState","expand","$acGV5$useCallback","collapse","toggle","$9385b3affbdec831$export$f36461af0ef4707d","allowsMultipleExpanded","expandedKeys","setExpandedKeys","$j4gLc$useControlledState","$j4gLc$useMemo","$j4gLc$useEffect","firstKey","key","keys","$28f4fd908f0de97f$export$1d40e3e0cc4d5de","$hI1OT$createContext","$28f4fd908f0de97f$export$944aceb4f8c89f10","$hI1OT$forwardRef","$hI1OT$useDisclosureGroupState","renderProps","$64fa3d84918910a7$export$4d86445c2cf5e3","domProps","$hI1OT$filterDOMProps","$hI1OT$react","$28f4fd908f0de97f$export$d665dd135a51b28a","$28f4fd908f0de97f$export$dab3ea4a6ef094da","$28f4fd908f0de97f$var$InternalDisclosureContext","$28f4fd908f0de97f$export$74a362b31437ec83","$64fa3d84918910a7$export$29f1550f4b0d4415","groupState","$hI1OT$useContext","id","otherProps","defaultId","$hI1OT$useId","$hI1OT$useDisclosureState","_props_onExpandedChange","panelRef","buttonProps","panelProps","$hI1OT$useDisclosure","isFocusVisibleWithin","focusWithinProps","$hI1OT$useFocusRing","$64fa3d84918910a7$export$2881499e37b75b9a","$d2b4bc8c273e7be6$export$24d547caef80ccd1","$64fa3d84918910a7$export$c62b8e45d58ddad9","$hI1OT$mergeProps","$28f4fd908f0de97f$export$feabaa331e1d464c","role","DOMProps","$hI1OT$mergeRefs","withProvider","withContext","createSlotRecipeContext","AccordionRootSlot","AccordionDisclosureSlot","AccordionTriggerSlot","AccordionPanelSlot","AccordionTitleSlot","AccordionHeaderRightContentSlot","AccordionRoot","restProps","recipe","useSlotRecipe","recipeProps","restRecipeProps","styleProps","raProps","extractStyleProps","jsx","RaDisclosureGroup","AccordionHeader","children","headerContent","useMemo","main","rightContent","React","child","jsxs","Flex","RaButton","KeyboardArrowRight","AccordionContent","RaDisclosurePanel","AccordionItem","value","disclosureProps","RaDisclosure","Accordion"],"mappings":"ylBAmBA,SAASA,EAA0CC,EAAOC,EAAOC,EAAK,CAClE,GAAI,CAAE,WAAYC,CAAU,EAAKH,EAC7BI,EAAgBC,4CAAY,EAC5BC,EAAcD,4CAAY,EAE1BE,EAAsB,CADVC,4CAAe,GACK,kBAAmB,SAAS,KAC5DC,EAAUC,EAAAA,OAAe,IAAI,EAC7BC,EAAwBC,EAAAA,YAAoB,IAAI,CAEhDH,EAAI,QAAU,sBAAsB,IAAI,CAChCP,EAAI,SAASA,EAAI,QAAQ,aAAa,SAAU,aAAa,CACrE,CAAC,EAEGW,EAAAA,UAAkB,IAAI,CACtBZ,EAAM,OAAM,CAChB,CAAC,CACL,EAAG,CACCC,EACAD,CACR,CAAK,EAED,OAAIa,EAAAA,0CAAiBZ,EAAK,cAAeK,EAAsBI,EAAoB,IAAI,EACnFI,EAAAA,0CAAwB,IAAI,CAExBN,EAAI,SAAS,qBAAqBA,EAAI,OAAO,EAE7CF,GAAuBL,EAAI,SAAW,CAACC,IACnCF,EAAM,WAAYC,EAAI,QAAQ,gBAAgB,QA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,SAAA,CAAA4F,EAAAA,IAACa,EAAAA,mBAAA,EAAmB,EACpBb,EAAAA,IAACX,GAAA,CAAoB,SAAAe,EAAc,IAAA,CAAK,CAAA,CAAA,CAC1C,CAAA,CACF,EACCA,EAAc,aAAa,OAAS,GACnCJ,EAAAA,IAACV,EAAA,CACE,WAAc,YAAA,CACjB,CAAA,CAAA,CAAA,CAIR,EClDawB,EAAmB,CAAC,CAC/B,SAAAX,EACA,IAAA7F,EACA,GAAGF,CACL,IAEI4F,EAAAA,IAACZ,GAAA,CAAmB,IAAA9E,EAAU,QAAO,GACnC,eAACyG,EAAA,CAAmB,GAAG3G,EAAQ,SAAA+F,CAAA,CAAS,CAAA,CAC1C,ECTSa,EAAgB,CAAC,CAC5B,SAAAb,EACA,MAAAc,EACA,IAAA3G,EACA,GAAGF,CACL,IAA0B,CACxB,MAAM8G,EAAkB,CACtB,GAAG9G,EACH,GAAI6G,CAAA,EAGN,OACEjB,EAAAA,IAACd,EAAA,CAAwB,aAAY+B,EAAO,IAAA3G,EAAU,QAAO,GAC3D,SAAA0F,EAAAA,IAACmB,EAAA,CAAc,GAAGD,EAAkB,SAAAf,CAAA,CAAS,EAC/C,CAEJ,ECbaiB,GAAY,CACvB,KAAM7B,EACN,KAAMyB,EACN,OAAQd,EACR,QAASY,EACT,mBAAoBxB,CACtB","x_google_ignoreList":[0,1,2,3]}
@@ -4,7 +4,7 @@ import { defineSlotRecipe as w, createSlotRecipeContext as R } from "@chakra-ui/
4
4
  import { B as I } from "./box-DuBoAZvq.es.js";
5
5
  import { S as y } from "./stack-CoNreM7B.es.js";
6
6
  import { CheckCircleOutline as E, WarningAmber as S, Info as $, ErrorOutline as M, Clear as k } from "@commercetools/nimbus-icons";
7
- import { I as j } from "./icon-button-N3Uzjv8o.es.js";
7
+ import { I as j } from "./icon-button-C_i4ydsN.es.js";
8
8
  import { defineMessages as O, useIntl as W } from "react-intl";
9
9
  const z = /* @__PURE__ */ w({
10
10
  slots: ["root", "title", "description", "icon", "actions", "dismissButton"],
@@ -190,4 +190,4 @@ export {
190
190
  D as d,
191
191
  h as e
192
192
  };
193
- //# sourceMappingURL=alert-CQzbVGQM.es.js.map
193
+ //# sourceMappingURL=alert-BRDuEo75.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"alert-CQzbVGQM.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/alert.i18n.ts","../../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 { defineMessages } from \"react-intl\";\n\nexport const messages = defineMessages({\n dismiss: {\n id: \"Nimbus.Alert.dismiss\",\n description: \"aria-label for dismiss button in alert\",\n defaultMessage: \"Dismiss\",\n },\n});\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\";\nimport { useIntl } from \"react-intl\";\nimport { messages } from \"../alert.i18n\";\n\nexport const AlertDismissButton = ({\n children,\n ...props\n}: AlertDismissButtonProps) => {\n const context = useContext(AlertContext);\n const intl = useIntl();\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <AlertDismissButtonSlot>\n <IconButton\n aria-label={intl.formatMessage(messages.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","messages","defineMessages","intl","useIntl","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;AAA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A,GAAGF;AACL,MAA+B;AAC7B,QAAMoB,IAAUC,EAAWvB,CAAY,GACjC+B,IAAOC,EAAA;AAEb,SAAAR,EAAU,MAAM;AACd,QAAIF,GAAS;AACX,YAAMG,sBACHQ,GAAA,EACC,UAAA,gBAAAhB;AAAA,QAACiB;AAAA,QAAA;AAAA,UACC,cAAYH,EAAK,cAAcF,EAAS,OAAO;AAAA,UAC9C,GAAG3B;AAAA,UACJ,SAAQ;AAAA,UACR,MAAK;AAAA,UAEL,UAAA,gBAAAe,EAACkB,GAAA,EAAM,MAAK,MAAA,CAAM;AAAA,QAAA;AAAA,MAAA,GAEtB;AAGF,aAAAb,EAAQ,WAAWG,CAAW,GAGvB,MAAMH,EAAQ,WAAW,IAAI;AAAA,IACtC;AAAA,EACF,GAAG,CAAClB,GAAUF,CAAK,CAAC,GAEb;AACT;AAEAT,EAAmB,cAAc;AC9B1B,MAAM2C,KAAQ;AAAA,EACnB,MAAMhD;AAAA,EACN,OAAOC;AAAA,EACP,aAAaC;AAAA,EACb,SAASE;AAAA,EACT,eAAeC;AACjB;"}
1
+ {"version":3,"file":"alert-BRDuEo75.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/alert.i18n.ts","../../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 { defineMessages } from \"react-intl\";\n\nexport const messages = defineMessages({\n dismiss: {\n id: \"Nimbus.Alert.dismiss\",\n description: \"aria-label for dismiss button in alert\",\n defaultMessage: \"Dismiss\",\n },\n});\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\";\nimport { useIntl } from \"react-intl\";\nimport { messages } from \"../alert.i18n\";\n\nexport const AlertDismissButton = ({\n children,\n ...props\n}: AlertDismissButtonProps) => {\n const context = useContext(AlertContext);\n const intl = useIntl();\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <AlertDismissButtonSlot>\n <IconButton\n aria-label={intl.formatMessage(messages.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","messages","defineMessages","intl","useIntl","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;AAAA,MAAQ;AAAA,MAEhC,UAAU;AAAA,QACR,MAAM,EAAE,cAAc,WAAA;AAAA,MAAW;AAAA,IACnC;AAAA,IAGF,SAAS;AAAA,MACP,MAAM,CAAA;AAAA,MACN,UAAU;AAAA,QACR,MAAM;AAAA,UACJ,QAAQ;AAAA,UACR,aAAa;AAAA,UACb,iBAAiB;AAAA,UACjB,SAAS;AAAA,UACT,cAAc;AAAA,QAAA;AAAA,MAChB;AAAA,IACF;AAA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"),v=require("@chakra-ui/react/styled-system"),N=require("./box-CWni3A32.cjs.js"),R=require("./stack-CIN13EDn.cjs.js"),r=require("@commercetools/nimbus-icons"),B=require("./icon-button-CiBtEF0y.cjs.js"),j=require("react-intl"),T=v.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}=v.createSlotRecipeContext({recipe:T}),q=E("div","root"),w=l("div","title"),y=l("div","description"),I=l("div","icon"),S=l("div","actions"),$=l("div","dismissButton"),k=s=>{switch(s){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=o.createContext(void 0),u=s=>{const{ref:i,children:t,...n}=s,[a,f]=o.useState(null),[h,p]=o.useState(null),[b,g]=o.useState(null),[C,D]=o.useState(null),P=o.useMemo(()=>({setTitle:f,setDescription:p,setActions:g,setDismiss:D}),[f,p,g,D]);return e.jsx(c.Provider,{value:P,children:e.jsxs(q,{ref:i,...n,role:"alert",children:[e.jsx(I,{alignItems:"flex-start",children:k(n.tone)}),e.jsxs(R.Stack,{flex:"1",gap:"200",children:[e.jsxs(N.Box,{children:[a,h]}),b]}),C,t]})})};u.displayName="Alert.Root";const d=({children:s,...i})=>{const t=o.useContext(c);return o.useEffect(()=>{if(t){const n=e.jsx(w,{...i,fontWeight:"600",children:s});return t.setTitle(n),()=>t.setTitle(null)}},[s,i]),null};d.displayName="Alert.Title";const m=({children:s,...i})=>{const t=o.useContext(c);return o.useEffect(()=>{if(t){const n=e.jsx(y,{...i,children:s});return t.setDescription(n),()=>t.setDescription(null)}},[s,i]),null};m.displayName="Alert.Description";const x=({children:s,...i})=>{const t=o.useContext(c);return o.useEffect(()=>{if(t){const n=e.jsx(S,{...i,children:s});return t.setActions(n),()=>t.setActions(null)}},[s,i]),null};x.displayName="Alert.Actions";const M=j.defineMessages({dismiss:{id:"Nimbus.Alert.dismiss",description:"aria-label for dismiss button in alert",defaultMessage:"Dismiss"}}),A=({children:s,...i})=>{const t=o.useContext(c),n=j.useIntl();return o.useEffect(()=>{if(t){const a=e.jsx($,{children:e.jsx(B.IconButton,{"aria-label":n.formatMessage(M.dismiss),...i,variant:"ghost",size:"2xs",children:e.jsx(r.Clear,{role:"img"})})});return t.setDismiss(a),()=>t.setDismiss(null)}},[s,i]),null};A.displayName="Alert.DismissButton";const O={Root:u,Title:d,Description:m,Actions:x,DismissButton:A};exports.Alert=O;exports.AlertActions=x;exports.AlertDescription=m;exports.AlertDismissButton=A;exports.AlertRoot=u;exports.AlertTitle=d;
2
- //# sourceMappingURL=alert-B1X_ycTY.cjs.js.map
1
+ "use strict";const e=require("react/jsx-runtime"),o=require("react"),v=require("@chakra-ui/react/styled-system"),N=require("./box-CWni3A32.cjs.js"),R=require("./stack-CIN13EDn.cjs.js"),r=require("@commercetools/nimbus-icons"),B=require("./icon-button-0GLW7WtL.cjs.js"),j=require("react-intl"),T=v.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}=v.createSlotRecipeContext({recipe:T}),q=E("div","root"),w=l("div","title"),y=l("div","description"),I=l("div","icon"),S=l("div","actions"),$=l("div","dismissButton"),k=s=>{switch(s){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=o.createContext(void 0),u=s=>{const{ref:i,children:t,...n}=s,[a,f]=o.useState(null),[h,p]=o.useState(null),[b,g]=o.useState(null),[C,D]=o.useState(null),P=o.useMemo(()=>({setTitle:f,setDescription:p,setActions:g,setDismiss:D}),[f,p,g,D]);return e.jsx(c.Provider,{value:P,children:e.jsxs(q,{ref:i,...n,role:"alert",children:[e.jsx(I,{alignItems:"flex-start",children:k(n.tone)}),e.jsxs(R.Stack,{flex:"1",gap:"200",children:[e.jsxs(N.Box,{children:[a,h]}),b]}),C,t]})})};u.displayName="Alert.Root";const d=({children:s,...i})=>{const t=o.useContext(c);return o.useEffect(()=>{if(t){const n=e.jsx(w,{...i,fontWeight:"600",children:s});return t.setTitle(n),()=>t.setTitle(null)}},[s,i]),null};d.displayName="Alert.Title";const m=({children:s,...i})=>{const t=o.useContext(c);return o.useEffect(()=>{if(t){const n=e.jsx(y,{...i,children:s});return t.setDescription(n),()=>t.setDescription(null)}},[s,i]),null};m.displayName="Alert.Description";const x=({children:s,...i})=>{const t=o.useContext(c);return o.useEffect(()=>{if(t){const n=e.jsx(S,{...i,children:s});return t.setActions(n),()=>t.setActions(null)}},[s,i]),null};x.displayName="Alert.Actions";const M=j.defineMessages({dismiss:{id:"Nimbus.Alert.dismiss",description:"aria-label for dismiss button in alert",defaultMessage:"Dismiss"}}),A=({children:s,...i})=>{const t=o.useContext(c),n=j.useIntl();return o.useEffect(()=>{if(t){const a=e.jsx($,{children:e.jsx(B.IconButton,{"aria-label":n.formatMessage(M.dismiss),...i,variant:"ghost",size:"2xs",children:e.jsx(r.Clear,{role:"img"})})});return t.setDismiss(a),()=>t.setDismiss(null)}},[s,i]),null};A.displayName="Alert.DismissButton";const O={Root:u,Title:d,Description:m,Actions:x,DismissButton:A};exports.Alert=O;exports.AlertActions=x;exports.AlertDescription=m;exports.AlertDismissButton=A;exports.AlertRoot=u;exports.AlertTitle=d;
2
+ //# sourceMappingURL=alert-CWTCM8-i.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"alert-B1X_ycTY.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/alert.i18n.ts","../../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 { defineMessages } from \"react-intl\";\n\nexport const messages = defineMessages({\n dismiss: {\n id: \"Nimbus.Alert.dismiss\",\n description: \"aria-label for dismiss button in alert\",\n defaultMessage: \"Dismiss\",\n },\n});\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\";\nimport { useIntl } from \"react-intl\";\nimport { messages } from \"../alert.i18n\";\n\nexport const AlertDismissButton = ({\n children,\n ...props\n}: AlertDismissButtonProps) => {\n const context = useContext(AlertContext);\n const intl = useIntl();\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <AlertDismissButtonSlot>\n <IconButton\n aria-label={intl.formatMessage(messages.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","messages","defineMessages","intl","useIntl","AlertDismissButtonSlot","IconButton","Clear","Alert"],"mappings":"qSAKaA,EAAcC,EAAAA,iBAAiB,CAC1C,MAAO,CAAC,OAAQ,QAAS,cAAe,OAAQ,UAAW,eAAe,EAE1E,UAAW,eAGX,KAAM,CAC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AQ,WAAW,IAAI,CACtC,CACF,EAAG,CAAClB,EAAUF,CAAK,CAAC,EAEb,IACT,EAEAT,EAAmB,YAAc,sBC9B1B,MAAM2C,EAAQ,CACnB,KAAMhD,EACN,MAAOC,EACP,YAAaC,EACb,QAASE,EACT,cAAeC,CACjB"}
1
+ {"version":3,"file":"alert-CWTCM8-i.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/alert.i18n.ts","../../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 { defineMessages } from \"react-intl\";\n\nexport const messages = defineMessages({\n dismiss: {\n id: \"Nimbus.Alert.dismiss\",\n description: \"aria-label for dismiss button in alert\",\n defaultMessage: \"Dismiss\",\n },\n});\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\";\nimport { useIntl } from \"react-intl\";\nimport { messages } from \"../alert.i18n\";\n\nexport const AlertDismissButton = ({\n children,\n ...props\n}: AlertDismissButtonProps) => {\n const context = useContext(AlertContext);\n const intl = useIntl();\n\n useEffect(() => {\n if (context) {\n const slotElement = (\n <AlertDismissButtonSlot>\n <IconButton\n aria-label={intl.formatMessage(messages.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","messages","defineMessages","intl","useIntl","AlertDismissButtonSlot","IconButton","Clear","Alert"],"mappings":"qSAKaA,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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N,MAAOC,EACP,YAAaC,EACb,QAASE,EACT,cAAeC,CACjB"}
@@ -6,7 +6,7 @@ import { mergeRefs as u } from "@chakra-ui/react";
6
6
  import { createRecipeContext as x } from "@chakra-ui/react/styled-system";
7
7
  import { b as P } from "./button.recipe-NdTb5f8M.es.js";
8
8
  import { i as R } from "./emotion-is-prop-valid.esm-BUuA3iy8.es.js";
9
- import { s as h } from "./index-DwjTNyza.es.js";
9
+ import { s as h } from "./index-CRta5Y1_.es.js";
10
10
  import { $ as y } from "./useObjectRef-CaJ5pgjX.es.js";
11
11
  import { $ as B } from "./mergeProps-B_9syxhT.es.js";
12
12
  import { $ as v } from "./useButton-DAeSjgg9.es.js";
@@ -56,4 +56,4 @@ D.displayName = "Button";
56
56
  export {
57
57
  D as B
58
58
  };
59
- //# sourceMappingURL=button-DnZz51Rh.es.js.map
59
+ //# sourceMappingURL=button-DRMpnb-1.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"button-DnZz51Rh.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 const componentProps = 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\n return (\n <ButtonRoot\n ref={ref}\n {...componentProps}\n aria-disabled={componentProps.isDisabled || undefined}\n data-disabled={componentProps.isDisabled || undefined}\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","componentProps","mergeProps","jsx"],"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,GAGIS,IAAiBC,EAAWP,GAAcI,GAAa;AAAA,IAC3D,IAAAb;AAAA,IACA,SAAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,MAAMQ,EAAa,QAAQ;AAAA,EAAA,CAC5B;AAED,SACE,gBAAAQ;AAAA,IAAC1B;AAAA,IAAA;AAAA,MACC,KAAAe;AAAA,MACC,GAAGS;AAAA,MACJ,iBAAeA,EAAe,cAAc;AAAA,MAC5C,iBAAeA,EAAe,cAAc;AAAA,MAE3C,UAAAb;AAAA,IAAA;AAAA,EAAA;AAGP;AAGAL,EAAO,cAAc;"}
1
+ {"version":3,"file":"button-DRMpnb-1.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 const componentProps = 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\n return (\n <ButtonRoot\n ref={ref}\n {...componentProps}\n aria-disabled={componentProps.isDisabled || undefined}\n data-disabled={componentProps.isDisabled || undefined}\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","componentProps","mergeProps","jsx"],"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,GAGIS,IAAiBC,EAAWP,GAAcI,GAAa;AAAA,IAC3D,IAAAb;AAAA,IACA,SAAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,MAAMQ,EAAa,QAAQ;AAAA,EAAA,CAC5B;AAED,SACE,gBAAAQ;AAAA,IAAC1B;AAAA,IAAA;AAAA,MACC,KAAAe;AAAA,MACC,GAAGS;AAAA,MACJ,iBAAeA,EAAe,cAAc;AAAA,MAC5C,iBAAeA,EAAe,cAAc;AAAA,MAE3C,UAAAb;AAAA,IAAA;AAAA,EAAA;AAGP;AAGAL,EAAO,cAAc;"}
@@ -1,2 +1,2 @@
1
- "use strict";const b=require("react/jsx-runtime"),p=require("react"),$=require("./Button-BtJHe9xY.cjs.js"),q=require("./utils-BHdR5Nww.cjs.js"),x=require("@chakra-ui/react"),m=require("@chakra-ui/react/styled-system"),P=require("./button.recipe-Cqkj3VMo.cjs.js"),R=require("./emotion-is-prop-valid.esm-ux_11lix.cjs.js"),y=require("./index-DebuynT7.cjs.js"),B=require("./useObjectRef-dXOJdONs.cjs.js"),h=require("./mergeProps-BA5Cwf5w.cjs.js"),j=require("./useButton-BgBfaV_L.cjs.js"),{withContext:v}=m.createRecipeContext({recipe:P.buttonRecipe}),w=v("button",{defaultProps:{type:"button"},shouldForwardProp(e,o){const t=!o?.includes(e)&&!y.system.isValidProperty(e);return R.isPropValid(e)&&t&&!e.includes("onPress")}}),i=e=>{const{ref:o,as:t,asChild:c,children:u,...d}=e,a=p.useRef(null),s=B.$df56164dff5785e2$export$4338b53315abf666(x.mergeRefs(a,o)),[r]=q.$64fa3d84918910a7$export$29f1550f4b0d4415(d,s,$.$d2b4bc8c273e7be6$export$24d547caef80ccd1),l=t||(c?"a":"button"),{buttonProps:f}=j.$701a24aa0da5b062$export$ea18c227d4417cc3({...r,elementType:l},s),n=h.$3ef42575df84b30b$export$9d1611c77c2fe928(r,f,{as:t,asChild:c,slot:r.slot||void 0});return b.jsx(w,{ref:s,...n,"aria-disabled":n.isDisabled||void 0,"data-disabled":n.isDisabled||void 0,children:u})};i.displayName="Button";exports.Button=i;
2
- //# sourceMappingURL=button-RUSyHGQV.cjs.js.map
1
+ "use strict";const b=require("react/jsx-runtime"),p=require("react"),$=require("./Button-BtJHe9xY.cjs.js"),q=require("./utils-BHdR5Nww.cjs.js"),x=require("@chakra-ui/react"),m=require("@chakra-ui/react/styled-system"),P=require("./button.recipe-Cqkj3VMo.cjs.js"),R=require("./emotion-is-prop-valid.esm-ux_11lix.cjs.js"),y=require("./index-DX8-EG6B.cjs.js"),B=require("./useObjectRef-dXOJdONs.cjs.js"),h=require("./mergeProps-BA5Cwf5w.cjs.js"),j=require("./useButton-BgBfaV_L.cjs.js"),{withContext:v}=m.createRecipeContext({recipe:P.buttonRecipe}),w=v("button",{defaultProps:{type:"button"},shouldForwardProp(e,o){const t=!o?.includes(e)&&!y.system.isValidProperty(e);return R.isPropValid(e)&&t&&!e.includes("onPress")}}),i=e=>{const{ref:o,as:t,asChild:c,children:u,...d}=e,a=p.useRef(null),s=B.$df56164dff5785e2$export$4338b53315abf666(x.mergeRefs(a,o)),[r]=q.$64fa3d84918910a7$export$29f1550f4b0d4415(d,s,$.$d2b4bc8c273e7be6$export$24d547caef80ccd1),l=t||(c?"a":"button"),{buttonProps:f}=j.$701a24aa0da5b062$export$ea18c227d4417cc3({...r,elementType:l},s),n=h.$3ef42575df84b30b$export$9d1611c77c2fe928(r,f,{as:t,asChild:c,slot:r.slot||void 0});return b.jsx(w,{ref:s,...n,"aria-disabled":n.isDisabled||void 0,"data-disabled":n.isDisabled||void 0,children:u})};i.displayName="Button";exports.Button=i;
2
+ //# sourceMappingURL=button-Dbf1b0F4.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"button-RUSyHGQV.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 const componentProps = 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\n return (\n <ButtonRoot\n ref={ref}\n {...componentProps}\n aria-disabled={componentProps.isDisabled || undefined}\n data-disabled={componentProps.isDisabled || undefined}\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","componentProps","mergeProps","jsx"],"mappings":"oeA2BM,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,EAGIS,EAAiBC,EAAAA,0CAAWP,EAAcI,EAAa,CAC3D,GAAAb,EACA,QAAAC,EAMA,KAAMQ,EAAa,MAAQ,MAAA,CAC5B,EAED,OACEQ,EAAAA,IAAC1B,EAAA,CACC,IAAAe,EACC,GAAGS,EACJ,gBAAeA,EAAe,YAAc,OAC5C,gBAAeA,EAAe,YAAc,OAE3C,SAAAb,CAAA,CAAA,CAGP,EAGAL,EAAO,YAAc"}
1
+ {"version":3,"file":"button-Dbf1b0F4.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 const componentProps = 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\n return (\n <ButtonRoot\n ref={ref}\n {...componentProps}\n aria-disabled={componentProps.isDisabled || undefined}\n data-disabled={componentProps.isDisabled || undefined}\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","componentProps","mergeProps","jsx"],"mappings":"oeA2BM,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,EAGIS,EAAiBC,EAAAA,0CAAWP,EAAcI,EAAa,CAC3D,GAAAb,EACA,QAAAC,EAMA,KAAMQ,EAAa,MAAQ,MAAA,CAC5B,EAED,OACEQ,EAAAA,IAAC1B,EAAA,CACC,IAAAe,EACC,GAAGS,EACJ,gBAAeA,EAAe,YAAc,OAC5C,gBAAeA,EAAe,YAAc,OAE3C,SAAAb,CAAA,CAAA,CAGP,EAGAL,EAAO,YAAc"}
@@ -1,2 +1,2 @@
1
- "use strict";const e=require("react/jsx-runtime"),a=require("./Heading-BaW6t55l.cjs.js"),v=require("@chakra-ui/react/styled-system"),u=require("react"),c=require("./useDateFormatter-CS19Cch2.cjs.js"),m=require("./utils-BHdR5Nww.cjs.js"),S=require("./box-CWni3A32.cjs.js"),w=require("./context-OoV8SSWX.cjs.js"),h=require("./icon-button-CiBtEF0y.cjs.js"),j=require("./text-CCW9kDT_.cjs.js"),y=require("./stack-CIN13EDn.cjs.js"),q=require("./visually-hidden-Bh-G5QHv.cjs.js"),$=require("@commercetools/nimbus-icons"),P=require("@chakra-ui/react/flex"),R=require("./index-DebuynT7.cjs.js"),I=require("./extractStyleProps-dSQoSYg8.cjs.js"),C=require("./Button-BtJHe9xY.cjs.js"),g=require("./Text-BWSfeB9p.cjs.js"),{withProvider:T,withContext:s}=v.createSlotRecipeContext({key:"calendar"}),B=T("div","root"),H=s("div","header"),A=s("div","grids"),F=s("div","monthTitle"),G=s("table","grid"),L=s("thead","gridHeader"),k=s("th","headerCell"),M=s("tbody","gridBody"),N=s("td","bodyCell"),z=()=>{const{locale:d}=w.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),n=m.$64fa3d84918910a7$export$fabf2dc03a41866e(a.$dfd62f934fc76fed$export$3b805cea1f178355),t=u.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(A,{children:Array.from({length:r},(p,l)=>{const b=t.visibleRange.start.add({months:l}),f=new Intl.DateTimeFormat(d,{month:"long"}).format(b.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2()));return e.jsxs(S.Box,{width:r==1?"full":"auto",children:[i&&e.jsx(F,{children:f}),e.jsx(G,{asChild:!0,children:e.jsxs(a.$dfd62f934fc76fed$export$5bd780d491cfc46c,{offset:{months:l},weekdayStyle:"short",children:[e.jsx(L,{asChild:!0,children:e.jsx(a.$dfd62f934fc76fed$export$22e2d15eaa4d2377,{children:x=>e.jsx(k,{asChild:!0,children:e.jsx(a.$dfd62f934fc76fed$export$ad2135cac3a11b3d,{children:x})})})}),e.jsx(M,{asChild:!0,children:e.jsx(a.$dfd62f934fc76fed$export$e11f8ba65d857bff,{children:x=>{const D=x.compare(o)===0;return e.jsx(N,{asChild:!0,"data-today":D,children:e.jsx(a.$dfd62f934fc76fed$export$5d847498420df57b,{date:x})})}})})]})})]},f)})})},K=()=>{const t=(m.$64fa3d84918910a7$export$fabf2dc03a41866e(a.$dfd62f934fc76fed$export$3b805cea1f178355)?.visibleDuration?.months||1)>1;return e.jsx(H,{children:e.jsxs(P.Flex,{children:[e.jsxs(y.Stack,{direction:"row",alignItems:"center",children:[e.jsx(q.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($.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($.KeyboardArrowRight,{})})]}),e.jsx(S.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($.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($.KeyboardArrowRight,{})})]})]})})},V=({children:d})=>{const{locale:n}=w.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),t=u.useContext(C.$d2b4bc8c273e7be6$export$24d547caef80ccd1),r=u.useContext(g.$514c0188e459b4c0$export$9afb8bc826b033ea),o=u.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"}},p=new Intl.DateTimeFormat(n,{month:"long"}).format(o.focusedDate.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2())),l=[new Intl.DateTimeFormat(n,{month:"long"}).format(o.visibleRange.start.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2())),new Intl.DateTimeFormat(n,{month:"long"}).format(o.visibleRange.end.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2()))].join(" - "),b=new Intl.DateTimeFormat(n,{year:"numeric"}).format(o.focusedDate.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2())),f={month:{children:p},monthRange:{children:l},year:{children:b}};return e.jsx(m.$64fa3d84918910a7$export$2881499e37b75b9a,{values:[[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})},W=d=>{const n=v.useRecipe({recipe:R.calendarSlotRecipe}),[t,r]=n.splitVariantProps(d),[o,i]=I.extractStyleProps(r);return e.jsx(B,{...t,...o,asChild:!0,children:e.jsx(a.$dfd62f934fc76fed$export$e1aef45b828286de,{...i,children:e.jsxs(V,{children:[e.jsx(K,{}),e.jsx(z,{})]})})})};exports.Calendar=W;
2
- //# sourceMappingURL=calendar-DhN7hRLB.cjs.js.map
1
+ "use strict";const e=require("react/jsx-runtime"),a=require("./Heading-BaW6t55l.cjs.js"),v=require("@chakra-ui/react/styled-system"),u=require("react"),c=require("./useDateFormatter-CS19Cch2.cjs.js"),m=require("./utils-BHdR5Nww.cjs.js"),S=require("./box-CWni3A32.cjs.js"),w=require("./context-OoV8SSWX.cjs.js"),h=require("./icon-button-0GLW7WtL.cjs.js"),j=require("./text-CCW9kDT_.cjs.js"),y=require("./stack-CIN13EDn.cjs.js"),q=require("./visually-hidden-Bh-G5QHv.cjs.js"),$=require("@commercetools/nimbus-icons"),P=require("@chakra-ui/react/flex"),R=require("./index-DX8-EG6B.cjs.js"),I=require("./extractStyleProps-CgqRiEwd.cjs.js"),C=require("./Button-BtJHe9xY.cjs.js"),g=require("./Text-BWSfeB9p.cjs.js"),{withProvider:T,withContext:s}=v.createSlotRecipeContext({key:"calendar"}),B=T("div","root"),H=s("div","header"),A=s("div","grids"),F=s("div","monthTitle"),G=s("table","grid"),L=s("thead","gridHeader"),k=s("th","headerCell"),M=s("tbody","gridBody"),N=s("td","bodyCell"),z=()=>{const{locale:d}=w.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),n=m.$64fa3d84918910a7$export$fabf2dc03a41866e(a.$dfd62f934fc76fed$export$3b805cea1f178355),t=u.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(A,{children:Array.from({length:r},(p,l)=>{const b=t.visibleRange.start.add({months:l}),f=new Intl.DateTimeFormat(d,{month:"long"}).format(b.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2()));return e.jsxs(S.Box,{width:r==1?"full":"auto",children:[i&&e.jsx(F,{children:f}),e.jsx(G,{asChild:!0,children:e.jsxs(a.$dfd62f934fc76fed$export$5bd780d491cfc46c,{offset:{months:l},weekdayStyle:"short",children:[e.jsx(L,{asChild:!0,children:e.jsx(a.$dfd62f934fc76fed$export$22e2d15eaa4d2377,{children:x=>e.jsx(k,{asChild:!0,children:e.jsx(a.$dfd62f934fc76fed$export$ad2135cac3a11b3d,{children:x})})})}),e.jsx(M,{asChild:!0,children:e.jsx(a.$dfd62f934fc76fed$export$e11f8ba65d857bff,{children:x=>{const D=x.compare(o)===0;return e.jsx(N,{asChild:!0,"data-today":D,children:e.jsx(a.$dfd62f934fc76fed$export$5d847498420df57b,{date:x})})}})})]})})]},f)})})},K=()=>{const t=(m.$64fa3d84918910a7$export$fabf2dc03a41866e(a.$dfd62f934fc76fed$export$3b805cea1f178355)?.visibleDuration?.months||1)>1;return e.jsx(H,{children:e.jsxs(P.Flex,{children:[e.jsxs(y.Stack,{direction:"row",alignItems:"center",children:[e.jsx(q.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($.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($.KeyboardArrowRight,{})})]}),e.jsx(S.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($.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($.KeyboardArrowRight,{})})]})]})})},V=({children:d})=>{const{locale:n}=w.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),t=u.useContext(C.$d2b4bc8c273e7be6$export$24d547caef80ccd1),r=u.useContext(g.$514c0188e459b4c0$export$9afb8bc826b033ea),o=u.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"}},p=new Intl.DateTimeFormat(n,{month:"long"}).format(o.focusedDate.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2())),l=[new Intl.DateTimeFormat(n,{month:"long"}).format(o.visibleRange.start.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2())),new Intl.DateTimeFormat(n,{month:"long"}).format(o.visibleRange.end.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2()))].join(" - "),b=new Intl.DateTimeFormat(n,{year:"numeric"}).format(o.focusedDate.toDate(c.$14e0f24ef4ac5c92$export$aa8b41735afcabd2())),f={month:{children:p},monthRange:{children:l},year:{children:b}};return e.jsx(m.$64fa3d84918910a7$export$2881499e37b75b9a,{values:[[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})},W=d=>{const n=v.useRecipe({recipe:R.calendarSlotRecipe}),[t,r]=n.splitVariantProps(d),[o,i]=I.extractStyleProps(r);return e.jsx(B,{...t,...o,asChild:!0,children:e.jsx(a.$dfd62f934fc76fed$export$e1aef45b828286de,{...i,children:e.jsxs(V,{children:[e.jsx(K,{}),e.jsx(z,{})]})})})};exports.Calendar=W;
2
+ //# sourceMappingURL=calendar-CrTvsDQH.cjs.js.map