@commercetools/nimbus 0.0.0-canary-20250812202252 → 0.0.0-canary-20250813190648

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 (619) hide show
  1. package/dist/accordion.d.ts +2 -2
  2. package/dist/alert.d.ts +5 -5
  3. package/dist/avatar.d.ts +4 -4
  4. package/dist/badge.d.ts +4 -4
  5. package/dist/box.d.ts +1 -1
  6. package/dist/button.d.ts +3 -3
  7. package/dist/calendar.d.ts +2 -2
  8. package/dist/card.d.ts +4 -4
  9. package/dist/checkbox.d.ts +2 -2
  10. package/dist/chunks/{accordion-xfgQQjFK.es.js → accordion-CqRxcnoE.es.js} +19 -17
  11. package/dist/chunks/accordion-CqRxcnoE.es.js.map +1 -0
  12. package/dist/chunks/accordion-DJNATyjS.cjs.js +2 -0
  13. package/dist/chunks/accordion-DJNATyjS.cjs.js.map +1 -0
  14. package/dist/chunks/alert-BffSjlyM.cjs.js +2 -0
  15. package/dist/chunks/alert-BffSjlyM.cjs.js.map +1 -0
  16. package/dist/chunks/{alert-BkF91mJ0.es.js → alert-Ctgl9RlR.es.js} +26 -25
  17. package/dist/chunks/alert-Ctgl9RlR.es.js.map +1 -0
  18. package/dist/chunks/{avatar-DgvfEdwK.es.js → avatar-DDCMu1RQ.es.js} +11 -10
  19. package/dist/chunks/avatar-DDCMu1RQ.es.js.map +1 -0
  20. package/dist/chunks/avatar-Dps7PI8I.cjs.js +2 -0
  21. package/dist/chunks/avatar-Dps7PI8I.cjs.js.map +1 -0
  22. package/dist/chunks/avatar.recipe-CQivdbFs.cjs.js +2 -0
  23. package/dist/chunks/avatar.recipe-CQivdbFs.cjs.js.map +1 -0
  24. package/dist/chunks/{avatar.recipe-BSmmqvwQ.es.js → avatar.recipe-CxXQlkH6.es.js} +2 -2
  25. package/dist/chunks/avatar.recipe-CxXQlkH6.es.js.map +1 -0
  26. package/dist/chunks/{badge-DVDR3-fy.es.js → badge-CmLLB9Kf.es.js} +9 -7
  27. package/dist/chunks/badge-CmLLB9Kf.es.js.map +1 -0
  28. package/dist/chunks/badge-Do9L64AE.cjs.js +2 -0
  29. package/dist/chunks/badge-Do9L64AE.cjs.js.map +1 -0
  30. package/dist/chunks/box-BOsRGQEm.cjs.js +2 -0
  31. package/dist/chunks/box-BOsRGQEm.cjs.js.map +1 -0
  32. package/dist/chunks/box-Cd4iddEV.es.js +13 -0
  33. package/dist/chunks/box-Cd4iddEV.es.js.map +1 -0
  34. package/dist/chunks/button--WwulbmL.cjs.js +2 -0
  35. package/dist/chunks/button--WwulbmL.cjs.js.map +1 -0
  36. package/dist/chunks/button-D0vEDRkY.es.js +57 -0
  37. package/dist/chunks/button-D0vEDRkY.es.js.map +1 -0
  38. package/dist/chunks/button.recipe-ClPhJ93N.cjs.js +2 -0
  39. package/dist/chunks/button.recipe-ClPhJ93N.cjs.js.map +1 -0
  40. package/dist/chunks/{button.recipe-DzOS_Bqm.es.js → button.recipe-D9e9Gh9L.es.js} +2 -2
  41. package/dist/chunks/button.recipe-D9e9Gh9L.es.js.map +1 -0
  42. package/dist/chunks/calendar-BU6VJNGi.cjs.js +2 -0
  43. package/dist/chunks/calendar-BU6VJNGi.cjs.js.map +1 -0
  44. package/dist/chunks/{calendar-B4nCYXn4.es.js → calendar-BxI6atN6.es.js} +20 -18
  45. package/dist/chunks/calendar-BxI6atN6.es.js.map +1 -0
  46. package/dist/chunks/card-C7xJPUxQ.cjs.js +2 -0
  47. package/dist/chunks/card-C7xJPUxQ.cjs.js.map +1 -0
  48. package/dist/chunks/{card-CvY06qIE.es.js → card-OJ-C7GGY.es.js} +24 -23
  49. package/dist/chunks/card-OJ-C7GGY.es.js.map +1 -0
  50. package/dist/chunks/checkbox-BBesM-2s.cjs.js +2 -0
  51. package/dist/chunks/checkbox-BBesM-2s.cjs.js.map +1 -0
  52. package/dist/chunks/{checkbox-yo64B6Gz.es.js → checkbox-uHIP3eGd.es.js} +15 -14
  53. package/dist/chunks/checkbox-uHIP3eGd.es.js.map +1 -0
  54. package/dist/chunks/code-7P3tH99x.cjs.js +2 -0
  55. package/dist/chunks/code-7P3tH99x.cjs.js.map +1 -0
  56. package/dist/chunks/code-C44qm68X.es.js +8 -0
  57. package/dist/chunks/code-C44qm68X.es.js.map +1 -0
  58. package/dist/chunks/{combobox-DWSsUEVz.es.js → combobox-BinlFC76.es.js} +110 -108
  59. package/dist/chunks/{combobox-DWSsUEVz.es.js.map → combobox-BinlFC76.es.js.map} +1 -1
  60. package/dist/chunks/combobox-J_QFtJde.cjs.js +2 -0
  61. package/dist/chunks/{combobox-D5lDtav9.cjs.js.map → combobox-J_QFtJde.cjs.js.map} +1 -1
  62. package/dist/chunks/config-Mt8_uyhI.cjs.js +2 -0
  63. package/dist/chunks/config-Mt8_uyhI.cjs.js.map +1 -0
  64. package/dist/chunks/config-ufbQ08Vi.es.js +6 -0
  65. package/dist/chunks/config-ufbQ08Vi.es.js.map +1 -0
  66. package/dist/chunks/create-recipe-context-BfiKn3k_.cjs.js +2 -0
  67. package/dist/chunks/create-recipe-context-BfiKn3k_.cjs.js.map +1 -0
  68. package/dist/chunks/create-recipe-context-c0qjq1fz.es.js +62 -0
  69. package/dist/chunks/create-recipe-context-c0qjq1fz.es.js.map +1 -0
  70. package/dist/chunks/create-slot-recipe-context-7JMdJHPF.cjs.js +2 -0
  71. package/dist/chunks/create-slot-recipe-context-7JMdJHPF.cjs.js.map +1 -0
  72. package/dist/chunks/create-slot-recipe-context-Cv3lncUO.es.js +104 -0
  73. package/dist/chunks/create-slot-recipe-context-Cv3lncUO.es.js.map +1 -0
  74. package/dist/chunks/date-input-BxN-H9P6.es.js +17 -0
  75. package/dist/chunks/date-input-BxN-H9P6.es.js.map +1 -0
  76. package/dist/chunks/date-input-CM4AIKke.cjs.js +2 -0
  77. package/dist/chunks/date-input-CM4AIKke.cjs.js.map +1 -0
  78. package/dist/chunks/{date-picker-CrV9TJ_O.es.js → date-picker-Anq88Byq.es.js} +39 -38
  79. package/dist/chunks/date-picker-Anq88Byq.es.js.map +1 -0
  80. package/dist/chunks/date-picker-mVAaj9Pj.cjs.js +2 -0
  81. package/dist/chunks/date-picker-mVAaj9Pj.cjs.js.map +1 -0
  82. package/dist/chunks/{date-range-picker-ByLVQAiA.es.js → date-range-picker-CZTsX2-y.es.js} +14 -13
  83. package/dist/chunks/date-range-picker-CZTsX2-y.es.js.map +1 -0
  84. package/dist/chunks/date-range-picker-CgL8fH17.cjs.js +2 -0
  85. package/dist/chunks/date-range-picker-CgL8fH17.cjs.js.map +1 -0
  86. package/dist/chunks/dialog-7iIFtc75.cjs.js +2 -0
  87. package/dist/chunks/dialog-7iIFtc75.cjs.js.map +1 -0
  88. package/dist/chunks/dialog-CbMKp4zh.es.js +1874 -0
  89. package/dist/chunks/dialog-CbMKp4zh.es.js.map +1 -0
  90. package/dist/chunks/{divider-m0ZtHIMJ.es.js → divider-CVqryFNj.es.js} +4 -2
  91. package/dist/chunks/divider-CVqryFNj.es.js.map +1 -0
  92. package/dist/chunks/divider-D8xdfux3.cjs.js +2 -0
  93. package/dist/chunks/divider-D8xdfux3.cjs.js.map +1 -0
  94. package/dist/chunks/empty-B5_AO6Pg.cjs.js +2 -0
  95. package/dist/chunks/empty-B5_AO6Pg.cjs.js.map +1 -0
  96. package/dist/chunks/empty-D7ZFmvo6.es.js +8 -0
  97. package/dist/chunks/empty-D7ZFmvo6.es.js.map +1 -0
  98. package/dist/chunks/extractStyleProps-B7kwDyYx.es.js +11 -0
  99. package/dist/chunks/extractStyleProps-B7kwDyYx.es.js.map +1 -0
  100. package/dist/chunks/extractStyleProps-Br2UMow5.cjs.js +2 -0
  101. package/dist/chunks/extractStyleProps-Br2UMow5.cjs.js.map +1 -0
  102. package/dist/chunks/factory-BpGQXckI.es.js +266 -0
  103. package/dist/chunks/factory-BpGQXckI.es.js.map +1 -0
  104. package/dist/chunks/factory-DNbWS0Ob.cjs.js +3 -0
  105. package/dist/chunks/factory-DNbWS0Ob.cjs.js.map +1 -0
  106. package/dist/chunks/flex-DgabwPpo.es.js +40 -0
  107. package/dist/chunks/flex-DgabwPpo.es.js.map +1 -0
  108. package/dist/chunks/flex-DgsstZZT.cjs.js +2 -0
  109. package/dist/chunks/flex-DgsstZZT.cjs.js.map +1 -0
  110. package/dist/chunks/{form-field-CBFyTAo8.cjs.js → form-field-BFeTiFeX.cjs.js} +3 -3
  111. package/dist/chunks/form-field-BFeTiFeX.cjs.js.map +1 -0
  112. package/dist/chunks/{form-field-C9PpQYF0.es.js → form-field-CRWPeZsB.es.js} +31 -30
  113. package/dist/chunks/form-field-CRWPeZsB.es.js.map +1 -0
  114. package/dist/chunks/grid-D2EDS3Nw.cjs.js +2 -0
  115. package/dist/chunks/grid-D2EDS3Nw.cjs.js.map +1 -0
  116. package/dist/chunks/grid-item-BHKNxWuU.es.js +75 -0
  117. package/dist/chunks/grid-item-BHKNxWuU.es.js.map +1 -0
  118. package/dist/chunks/grid-item-Bwt35oD8.cjs.js +2 -0
  119. package/dist/chunks/grid-item-Bwt35oD8.cjs.js.map +1 -0
  120. package/dist/chunks/grid-ksgCqjX_.es.js +14 -0
  121. package/dist/chunks/grid-ksgCqjX_.es.js.map +1 -0
  122. package/dist/chunks/heading-C9DC5cG8.es.js +8 -0
  123. package/dist/chunks/heading-C9DC5cG8.es.js.map +1 -0
  124. package/dist/chunks/heading-CbGsyynP.cjs.js +2 -0
  125. package/dist/chunks/heading-CbGsyynP.cjs.js.map +1 -0
  126. package/dist/chunks/{icon-BFNYuilh.es.js → icon-BSGub7AG.es.js} +10 -9
  127. package/dist/chunks/icon-BSGub7AG.es.js.map +1 -0
  128. package/dist/chunks/icon-H-rP9kq5.cjs.js +2 -0
  129. package/dist/chunks/icon-H-rP9kq5.cjs.js.map +1 -0
  130. package/dist/chunks/{icon-button-BEaNe4rE.cjs.js → icon-button-C-Orugq3.cjs.js} +2 -2
  131. package/dist/chunks/{icon-button-BEaNe4rE.cjs.js.map → icon-button-C-Orugq3.cjs.js.map} +1 -1
  132. package/dist/chunks/{icon-button-DqkVeZCx.es.js → icon-button-CJHH2Msr.es.js} +2 -2
  133. package/dist/chunks/{icon-button-DqkVeZCx.es.js.map → icon-button-CJHH2Msr.es.js.map} +1 -1
  134. package/dist/chunks/{icon-toggle-button-CuzGWc2s.es.js → icon-toggle-button-BeyRptXX.es.js} +2 -2
  135. package/dist/chunks/{icon-toggle-button-CuzGWc2s.es.js.map → icon-toggle-button-BeyRptXX.es.js.map} +1 -1
  136. package/dist/chunks/{icon-toggle-button-CvLwJfJE.cjs.js → icon-toggle-button-BvmRCp0M.cjs.js} +2 -2
  137. package/dist/chunks/{icon-toggle-button-CvLwJfJE.cjs.js.map → icon-toggle-button-BvmRCp0M.cjs.js.map} +1 -1
  138. package/dist/chunks/image-B-WEdENT.cjs.js +2 -0
  139. package/dist/chunks/image-B-WEdENT.cjs.js.map +1 -0
  140. package/dist/chunks/image-BVUCjLWP.es.js +22 -0
  141. package/dist/chunks/image-BVUCjLWP.es.js.map +1 -0
  142. package/dist/chunks/image-BwlmPt3P.es.js +8 -0
  143. package/dist/chunks/image-BwlmPt3P.es.js.map +1 -0
  144. package/dist/chunks/image-CIQlu9WX.cjs.js +2 -0
  145. package/dist/chunks/image-CIQlu9WX.cjs.js.map +1 -0
  146. package/dist/chunks/index-DdQ9V6B1.es.js +3370 -0
  147. package/dist/chunks/index-DdQ9V6B1.es.js.map +1 -0
  148. package/dist/chunks/index-LEpCeLVL.cjs.js +4 -0
  149. package/dist/chunks/index-LEpCeLVL.cjs.js.map +1 -0
  150. package/dist/chunks/kbd-CJWAjmm3.es.js +16 -0
  151. package/dist/chunks/kbd-CJWAjmm3.es.js.map +1 -0
  152. package/dist/chunks/kbd-D4NGKYuV.cjs.js +2 -0
  153. package/dist/chunks/kbd-D4NGKYuV.cjs.js.map +1 -0
  154. package/dist/chunks/kbd.recipe-9kxAU5ro.cjs.js +2 -0
  155. package/dist/chunks/kbd.recipe-9kxAU5ro.cjs.js.map +1 -0
  156. package/dist/chunks/{kbd.recipe-BONVaPQN.es.js → kbd.recipe-BTW0MQqx.es.js} +2 -2
  157. package/dist/chunks/kbd.recipe-BTW0MQqx.es.js.map +1 -0
  158. package/dist/chunks/link-DioynlqV.cjs.js +2 -0
  159. package/dist/chunks/link-DioynlqV.cjs.js.map +1 -0
  160. package/dist/chunks/{link-BS1jRPrC.es.js → link-WoVkNCsH.es.js} +6 -5
  161. package/dist/chunks/link-WoVkNCsH.es.js.map +1 -0
  162. package/dist/chunks/{link.recipe-Ba2by0OG.es.js → link.recipe-BRnFQ5bP.es.js} +2 -2
  163. package/dist/chunks/link.recipe-BRnFQ5bP.es.js.map +1 -0
  164. package/dist/chunks/link.recipe-BfCxtKjL.cjs.js +2 -0
  165. package/dist/chunks/link.recipe-BfCxtKjL.cjs.js.map +1 -0
  166. package/dist/chunks/list-BaX7-sRB.cjs.js +2 -0
  167. package/dist/chunks/list-BaX7-sRB.cjs.js.map +1 -0
  168. package/dist/chunks/list-BhODpevn.es.js +23 -0
  169. package/dist/chunks/list-BhODpevn.es.js.map +1 -0
  170. package/dist/chunks/{loading-spinner-DwN-yshK.es.js → loading-spinner-CLsuIMu8.es.js} +7 -6
  171. package/dist/chunks/loading-spinner-CLsuIMu8.es.js.map +1 -0
  172. package/dist/chunks/loading-spinner-DJg5GzG_.cjs.js +2 -0
  173. package/dist/chunks/loading-spinner-DJg5GzG_.cjs.js.map +1 -0
  174. package/dist/chunks/{menu-BpACcVBO.es.js → menu-B83imnEP.es.js} +15 -15
  175. package/dist/chunks/menu-B83imnEP.es.js.map +1 -0
  176. package/dist/chunks/menu-CJYawkvo.cjs.js +2 -0
  177. package/dist/chunks/menu-CJYawkvo.cjs.js.map +1 -0
  178. package/dist/chunks/{multiline-text-input-sSdbj6tb.es.js → multiline-text-input-CqgvtbhN.es.js} +15 -12
  179. package/dist/chunks/multiline-text-input-CqgvtbhN.es.js.map +1 -0
  180. package/dist/chunks/multiline-text-input-Dqg0eKRI.cjs.js +12 -0
  181. package/dist/chunks/multiline-text-input-Dqg0eKRI.cjs.js.map +1 -0
  182. package/dist/chunks/namespace-BXD5i_90.cjs.js +2 -0
  183. package/dist/chunks/namespace-BXD5i_90.cjs.js.map +1 -0
  184. package/dist/chunks/namespace-BmDr3F-d.es.js +74 -0
  185. package/dist/chunks/namespace-BmDr3F-d.es.js.map +1 -0
  186. package/dist/chunks/nimbus-provider--BLRh-Uv.cjs.js +2 -0
  187. package/dist/chunks/nimbus-provider--BLRh-Uv.cjs.js.map +1 -0
  188. package/dist/chunks/nimbus-provider-C2CEn-eC.es.js +101 -0
  189. package/dist/chunks/nimbus-provider-C2CEn-eC.es.js.map +1 -0
  190. package/dist/chunks/{number-input-DzwHfylo.es.js → number-input-CTJ6er_k.es.js} +12 -11
  191. package/dist/chunks/{number-input-DzwHfylo.es.js.map → number-input-CTJ6er_k.es.js.map} +1 -1
  192. package/dist/chunks/number-input-DBjXTpXm.cjs.js +2 -0
  193. package/dist/chunks/{number-input-BU6yMXV8.cjs.js.map → number-input-DBjXTpXm.cjs.js.map} +1 -1
  194. package/dist/chunks/{password-input-DpINXGwE.cjs.js → password-input-B8sRYG6_.cjs.js} +2 -2
  195. package/dist/chunks/{password-input-DpINXGwE.cjs.js.map → password-input-B8sRYG6_.cjs.js.map} +1 -1
  196. package/dist/chunks/{password-input-DdJ9gDUr.es.js → password-input-cW7vrwPv.es.js} +5 -5
  197. package/dist/chunks/{password-input-DdJ9gDUr.es.js.map → password-input-cW7vrwPv.es.js.map} +1 -1
  198. package/dist/chunks/progress-bar-B7jPo_Tr.cjs.js +2 -0
  199. package/dist/chunks/progress-bar-B7jPo_Tr.cjs.js.map +1 -0
  200. package/dist/chunks/{progress-bar-CCyJEPoU.es.js → progress-bar-NxgV8zFn.es.js} +20 -18
  201. package/dist/chunks/progress-bar-NxgV8zFn.es.js.map +1 -0
  202. package/dist/chunks/provider-CUesptNK.cjs.js +16 -0
  203. package/dist/chunks/provider-CUesptNK.cjs.js.map +1 -0
  204. package/dist/chunks/provider-D5u1b72_.es.js +989 -0
  205. package/dist/chunks/provider-D5u1b72_.es.js.map +1 -0
  206. package/dist/chunks/{radio-input-CCm7Xqcz.es.js → radio-input-CUyRuKg2.es.js} +40 -40
  207. package/dist/chunks/{radio-input-CCm7Xqcz.es.js.map → radio-input-CUyRuKg2.es.js.map} +1 -1
  208. package/dist/chunks/radio-input-CkWvEex9.cjs.js +2 -0
  209. package/dist/chunks/{radio-input-BLVHJidw.cjs.js.map → radio-input-CkWvEex9.cjs.js.map} +1 -1
  210. package/dist/chunks/range-calendar-BtViOWLD.cjs.js +2 -0
  211. package/dist/chunks/range-calendar-BtViOWLD.cjs.js.map +1 -0
  212. package/dist/chunks/{range-calendar-C-qR1QHT.es.js → range-calendar-D2MlUnBw.es.js} +22 -20
  213. package/dist/chunks/range-calendar-D2MlUnBw.es.js.map +1 -0
  214. package/dist/chunks/select-0SJSIvQi.cjs.js +2 -0
  215. package/dist/chunks/{select-BZ2fZDHJ.cjs.js.map → select-0SJSIvQi.cjs.js.map} +1 -1
  216. package/dist/chunks/{select-Cx0Yiwr-.es.js → select-D1P8VLDI.es.js} +67 -65
  217. package/dist/chunks/{select-Cx0Yiwr-.es.js.map → select-D1P8VLDI.es.js.map} +1 -1
  218. package/dist/chunks/simple-grid-BYgtLdTo.cjs.js +2 -0
  219. package/dist/chunks/simple-grid-BYgtLdTo.cjs.js.map +1 -0
  220. package/dist/chunks/simple-grid-QwCuXJDe.es.js +38 -0
  221. package/dist/chunks/simple-grid-QwCuXJDe.es.js.map +1 -0
  222. package/dist/chunks/stack-CFOuBCxS.es.js +89 -0
  223. package/dist/chunks/stack-CFOuBCxS.es.js.map +1 -0
  224. package/dist/chunks/stack-CSKcZxll.cjs.js +2 -0
  225. package/dist/chunks/stack-CSKcZxll.cjs.js.map +1 -0
  226. package/dist/chunks/switch-3KIpk4ks.cjs.js +2 -0
  227. package/dist/chunks/switch-3KIpk4ks.cjs.js.map +1 -0
  228. package/dist/chunks/{switch-BriJIKqx.es.js → switch-DRsQP8Z7.es.js} +10 -9
  229. package/dist/chunks/switch-DRsQP8Z7.es.js.map +1 -0
  230. package/dist/chunks/tag-group-2RUxMfVr.cjs.js +2 -0
  231. package/dist/chunks/{tag-group-D7GNkec5.cjs.js.map → tag-group-2RUxMfVr.cjs.js.map} +1 -1
  232. package/dist/chunks/{tag-group-8CojIACI.es.js → tag-group-BjRA3GJh.es.js} +46 -46
  233. package/dist/chunks/{tag-group-8CojIACI.es.js.map → tag-group-BjRA3GJh.es.js.map} +1 -1
  234. package/dist/chunks/text-input-CDZWoQpD.es.js +19 -0
  235. package/dist/chunks/text-input-CDZWoQpD.es.js.map +1 -0
  236. package/dist/chunks/text-input-_x_TUbxj.cjs.js +2 -0
  237. package/dist/chunks/text-input-_x_TUbxj.cjs.js.map +1 -0
  238. package/dist/chunks/text-tO5nXPfT.cjs.js +2 -0
  239. package/dist/chunks/text-tO5nXPfT.cjs.js.map +1 -0
  240. package/dist/chunks/text-uojQ1XH5.es.js +26 -0
  241. package/dist/chunks/text-uojQ1XH5.es.js.map +1 -0
  242. package/dist/chunks/time-input-CAI-K0L0.cjs.js +2 -0
  243. package/dist/chunks/time-input-CAI-K0L0.cjs.js.map +1 -0
  244. package/dist/chunks/{time-input-pPM_sx2J.es.js → time-input-DgGtoKk8.es.js} +8 -6
  245. package/dist/chunks/time-input-DgGtoKk8.es.js.map +1 -0
  246. package/dist/chunks/toggle-button-BFYCOJoj.cjs.js +2 -0
  247. package/dist/chunks/toggle-button-BFYCOJoj.cjs.js.map +1 -0
  248. package/dist/chunks/{toggle-button-group-BQfaNSZf.es.js → toggle-button-group-Cs4SQjtM.es.js} +15 -14
  249. package/dist/chunks/toggle-button-group-Cs4SQjtM.es.js.map +1 -0
  250. package/dist/chunks/toggle-button-group-DLVSXDvN.cjs.js +2 -0
  251. package/dist/chunks/toggle-button-group-DLVSXDvN.cjs.js.map +1 -0
  252. package/dist/chunks/toggle-button-l1Pb1Miz.es.js +30 -0
  253. package/dist/chunks/toggle-button-l1Pb1Miz.es.js.map +1 -0
  254. package/dist/chunks/{toolbar-DZrjQLFq.es.js → toolbar-Dd7Gl-f7.es.js} +3 -3
  255. package/dist/chunks/{toolbar-DZrjQLFq.es.js.map → toolbar-Dd7Gl-f7.es.js.map} +1 -1
  256. package/dist/chunks/toolbar-m0KbmT1E.cjs.js +2 -0
  257. package/dist/chunks/{toolbar-O-t4_xhL.cjs.js.map → toolbar-m0KbmT1E.cjs.js.map} +1 -1
  258. package/dist/chunks/tooltip-BuQb6UvD.cjs.js +2 -0
  259. package/dist/chunks/{tooltip-DwXtfA_x.cjs.js.map → tooltip-BuQb6UvD.cjs.js.map} +1 -1
  260. package/dist/chunks/{tooltip-Bi0556u1.es.js → tooltip-Cobyf8Kh.es.js} +4 -4
  261. package/dist/chunks/{tooltip-Bi0556u1.es.js.map → tooltip-Cobyf8Kh.es.js.map} +1 -1
  262. package/dist/chunks/{tooltip.recipe-B9-7OFCi.es.js → tooltip.recipe-DsVUEki2.es.js} +2 -2
  263. package/dist/chunks/tooltip.recipe-DsVUEki2.es.js.map +1 -0
  264. package/dist/chunks/tooltip.recipe-VqGdDqQD.cjs.js +2 -0
  265. package/dist/chunks/tooltip.recipe-VqGdDqQD.cjs.js.map +1 -0
  266. package/dist/chunks/use-recipe-CJAjTxPP.cjs.js +2 -0
  267. package/dist/chunks/use-recipe-CJAjTxPP.cjs.js.map +1 -0
  268. package/dist/chunks/use-recipe-dUXCQYfa.es.js +13 -0
  269. package/dist/chunks/use-recipe-dUXCQYfa.es.js.map +1 -0
  270. package/dist/chunks/walk-object-BGye4E3_.cjs.js +2 -0
  271. package/dist/chunks/walk-object-BGye4E3_.cjs.js.map +1 -0
  272. package/dist/chunks/walk-object-D9P1kanu.es.js +27 -0
  273. package/dist/chunks/walk-object-D9P1kanu.es.js.map +1 -0
  274. package/dist/combobox.d.ts +3 -3
  275. package/dist/components/accordion.cjs +1 -1
  276. package/dist/components/accordion.es.js +1 -1
  277. package/dist/components/alert.cjs +1 -1
  278. package/dist/components/alert.es.js +1 -1
  279. package/dist/components/avatar.cjs +1 -1
  280. package/dist/components/avatar.es.js +1 -1
  281. package/dist/components/badge.cjs +1 -1
  282. package/dist/components/badge.es.js +1 -1
  283. package/dist/components/box.cjs +1 -1
  284. package/dist/components/box.es.js +1 -1
  285. package/dist/components/button.cjs +1 -1
  286. package/dist/components/button.es.js +1 -1
  287. package/dist/components/calendar.cjs +1 -1
  288. package/dist/components/calendar.es.js +1 -1
  289. package/dist/components/card.cjs +1 -1
  290. package/dist/components/card.es.js +1 -1
  291. package/dist/components/checkbox.cjs +1 -1
  292. package/dist/components/checkbox.es.js +1 -1
  293. package/dist/components/code.cjs +1 -1
  294. package/dist/components/code.es.js +1 -1
  295. package/dist/components/combobox.cjs +1 -1
  296. package/dist/components/combobox.es.js +1 -1
  297. package/dist/components/components.cjs +1 -1
  298. package/dist/components/components.es.js +72 -70
  299. package/dist/components/components.es.js.map +1 -1
  300. package/dist/components/date-input.cjs +1 -1
  301. package/dist/components/date-input.es.js +1 -1
  302. package/dist/components/date-picker.cjs +1 -1
  303. package/dist/components/date-picker.es.js +1 -1
  304. package/dist/components/date-range-picker.cjs +1 -1
  305. package/dist/components/date-range-picker.es.js +1 -1
  306. package/dist/components/dialog.cjs +1 -1
  307. package/dist/components/dialog.es.js +1 -1
  308. package/dist/components/divider.cjs +1 -1
  309. package/dist/components/divider.es.js +1 -1
  310. package/dist/components/flex.cjs +1 -1
  311. package/dist/components/flex.es.js +1 -1
  312. package/dist/components/form-field.cjs +1 -1
  313. package/dist/components/form-field.es.js +1 -1
  314. package/dist/components/grid.cjs +1 -1
  315. package/dist/components/grid.es.js +1 -1
  316. package/dist/components/heading.cjs +1 -1
  317. package/dist/components/heading.es.js +2 -2
  318. package/dist/components/icon-button.cjs +1 -1
  319. package/dist/components/icon-button.es.js +1 -1
  320. package/dist/components/icon-toggle-button.cjs +1 -1
  321. package/dist/components/icon-toggle-button.es.js +1 -1
  322. package/dist/components/icon.cjs +1 -1
  323. package/dist/components/icon.es.js +1 -1
  324. package/dist/components/image.cjs +1 -1
  325. package/dist/components/image.es.js +1 -1
  326. package/dist/components/kbd.cjs +1 -1
  327. package/dist/components/kbd.es.js +1 -1
  328. package/dist/components/link.cjs +1 -1
  329. package/dist/components/link.es.js +1 -1
  330. package/dist/components/list.cjs +1 -1
  331. package/dist/components/list.es.js +1 -1
  332. package/dist/components/loading-spinner.cjs +1 -1
  333. package/dist/components/loading-spinner.es.js +1 -1
  334. package/dist/components/multiline-text-input.cjs +1 -1
  335. package/dist/components/multiline-text-input.es.js +1 -1
  336. package/dist/components/nimbus-provider.cjs +1 -1
  337. package/dist/components/nimbus-provider.es.js +1 -1
  338. package/dist/components/number-input.cjs +1 -1
  339. package/dist/components/number-input.es.js +1 -1
  340. package/dist/components/password-input.cjs +1 -1
  341. package/dist/components/password-input.es.js +1 -1
  342. package/dist/components/progress-bar.cjs +1 -1
  343. package/dist/components/progress-bar.es.js +1 -1
  344. package/dist/components/radio-input.cjs +1 -1
  345. package/dist/components/radio-input.es.js +1 -1
  346. package/dist/components/range-calendar.cjs +1 -1
  347. package/dist/components/range-calendar.es.js +1 -1
  348. package/dist/components/select.cjs +1 -1
  349. package/dist/components/select.es.js +1 -1
  350. package/dist/components/simple-grid.cjs +1 -1
  351. package/dist/components/simple-grid.es.js +1 -1
  352. package/dist/components/stack.cjs +1 -1
  353. package/dist/components/stack.es.js +1 -1
  354. package/dist/components/switch.cjs +1 -1
  355. package/dist/components/switch.es.js +1 -1
  356. package/dist/components/table.cjs +1 -1
  357. package/dist/components/table.es.js +2 -2
  358. package/dist/components/tag-group.cjs +1 -1
  359. package/dist/components/tag-group.es.js +1 -1
  360. package/dist/components/text-input.cjs +1 -1
  361. package/dist/components/text-input.es.js +1 -1
  362. package/dist/components/text.cjs +1 -1
  363. package/dist/components/text.es.js +1 -1
  364. package/dist/components/time-input.cjs +1 -1
  365. package/dist/components/time-input.es.js +1 -1
  366. package/dist/components/toggle-button-group.cjs +1 -1
  367. package/dist/components/toggle-button-group.es.js +1 -1
  368. package/dist/components/toggle-button.cjs +1 -1
  369. package/dist/components/toggle-button.es.js +1 -1
  370. package/dist/components/toolbar.cjs +1 -1
  371. package/dist/components/toolbar.es.js +1 -1
  372. package/dist/components/tooltip.cjs +1 -1
  373. package/dist/components/tooltip.es.js +1 -1
  374. package/dist/components.d.ts +24 -20
  375. package/dist/date-input.d.ts +4 -4
  376. package/dist/date-picker.d.ts +4 -4
  377. package/dist/date-range-picker.d.ts +4 -4
  378. package/dist/dialog.d.ts +1 -1
  379. package/dist/divider.d.ts +4 -4
  380. package/dist/flex.d.ts +1 -1
  381. package/dist/form-field.d.ts +3 -3
  382. package/dist/grid.d.ts +1 -1
  383. package/dist/heading.d.ts +1 -1
  384. package/dist/icon-button.d.ts +3 -3
  385. package/dist/icon-toggle-button.d.ts +3 -3
  386. package/dist/icon.d.ts +4 -4
  387. package/dist/image.d.ts +1 -1
  388. package/dist/index.cjs +1 -1
  389. package/dist/index.cjs.map +1 -1
  390. package/dist/index.d.ts +24 -20
  391. package/dist/index.es.js +124 -121
  392. package/dist/index.es.js.map +1 -1
  393. package/dist/kbd.d.ts +1 -1
  394. package/dist/link.d.ts +4 -4
  395. package/dist/list.d.ts +1 -1
  396. package/dist/loading-spinner.d.ts +4 -4
  397. package/dist/multiline-text-input.d.ts +3 -3
  398. package/dist/number-input.d.ts +3 -3
  399. package/dist/password-input.d.ts +3 -3
  400. package/dist/progress-bar.d.ts +4 -4
  401. package/dist/radio-input.d.ts +3 -3
  402. package/dist/range-calendar.d.ts +2 -2
  403. package/dist/select.d.ts +2 -2
  404. package/dist/simple-grid.d.ts +1 -1
  405. package/dist/stack.d.ts +1 -1
  406. package/dist/switch.d.ts +2 -2
  407. package/dist/table.d.ts +1 -1
  408. package/dist/tag-group.d.ts +3 -3
  409. package/dist/text-input.d.ts +3 -3
  410. package/dist/text.d.ts +1 -1
  411. package/dist/time-input.d.ts +4 -4
  412. package/dist/toggle-button-group.d.ts +3 -3
  413. package/dist/toggle-button.d.ts +3 -3
  414. package/dist/tooltip.d.ts +4 -4
  415. package/package.json +5 -5
  416. package/dist/chunks/accordion-Bn6CnY0Y.cjs.js +0 -2
  417. package/dist/chunks/accordion-Bn6CnY0Y.cjs.js.map +0 -1
  418. package/dist/chunks/accordion-xfgQQjFK.es.js.map +0 -1
  419. package/dist/chunks/alert-BkF91mJ0.es.js.map +0 -1
  420. package/dist/chunks/alert-CQLVvNDD.cjs.js +0 -2
  421. package/dist/chunks/alert-CQLVvNDD.cjs.js.map +0 -1
  422. package/dist/chunks/avatar-BLun8TXk.cjs.js +0 -2
  423. package/dist/chunks/avatar-BLun8TXk.cjs.js.map +0 -1
  424. package/dist/chunks/avatar-DgvfEdwK.es.js.map +0 -1
  425. package/dist/chunks/avatar.recipe-BSmmqvwQ.es.js.map +0 -1
  426. package/dist/chunks/avatar.recipe-aGNBZhVF.cjs.js +0 -2
  427. package/dist/chunks/avatar.recipe-aGNBZhVF.cjs.js.map +0 -1
  428. package/dist/chunks/badge-CFwI3HLf.cjs.js +0 -2
  429. package/dist/chunks/badge-CFwI3HLf.cjs.js.map +0 -1
  430. package/dist/chunks/badge-DVDR3-fy.es.js.map +0 -1
  431. package/dist/chunks/box-DD4jYgS7.es.js +0 -11
  432. package/dist/chunks/box-DD4jYgS7.es.js.map +0 -1
  433. package/dist/chunks/box-FU6tRPFs.cjs.js +0 -2
  434. package/dist/chunks/box-FU6tRPFs.cjs.js.map +0 -1
  435. package/dist/chunks/button-BBwNbl7S.cjs.js +0 -2
  436. package/dist/chunks/button-BBwNbl7S.cjs.js.map +0 -1
  437. package/dist/chunks/button-BTpQweka.es.js +0 -55
  438. package/dist/chunks/button-BTpQweka.es.js.map +0 -1
  439. package/dist/chunks/button.recipe-DHk13lGU.cjs.js +0 -2
  440. package/dist/chunks/button.recipe-DHk13lGU.cjs.js.map +0 -1
  441. package/dist/chunks/button.recipe-DzOS_Bqm.es.js.map +0 -1
  442. package/dist/chunks/calendar-B4nCYXn4.es.js.map +0 -1
  443. package/dist/chunks/calendar-CKVscUm-.cjs.js +0 -2
  444. package/dist/chunks/calendar-CKVscUm-.cjs.js.map +0 -1
  445. package/dist/chunks/calendar.recipe-B2sMokBn.es.js +0 -101
  446. package/dist/chunks/calendar.recipe-B2sMokBn.es.js.map +0 -1
  447. package/dist/chunks/calendar.recipe-gUaUNltl.cjs.js +0 -2
  448. package/dist/chunks/calendar.recipe-gUaUNltl.cjs.js.map +0 -1
  449. package/dist/chunks/card-B9z3AknN.cjs.js +0 -2
  450. package/dist/chunks/card-B9z3AknN.cjs.js.map +0 -1
  451. package/dist/chunks/card-CvY06qIE.es.js.map +0 -1
  452. package/dist/chunks/checkbox-DywApPQh.cjs.js +0 -2
  453. package/dist/chunks/checkbox-DywApPQh.cjs.js.map +0 -1
  454. package/dist/chunks/checkbox-yo64B6Gz.es.js.map +0 -1
  455. package/dist/chunks/code-CI8aUhmu.es.js +0 -6
  456. package/dist/chunks/code-CI8aUhmu.es.js.map +0 -1
  457. package/dist/chunks/code-Dg4Larbo.cjs.js +0 -2
  458. package/dist/chunks/code-Dg4Larbo.cjs.js.map +0 -1
  459. package/dist/chunks/combobox-D5lDtav9.cjs.js +0 -2
  460. package/dist/chunks/combobox.recipe-CJl9E8AK.cjs.js +0 -2
  461. package/dist/chunks/combobox.recipe-CJl9E8AK.cjs.js.map +0 -1
  462. package/dist/chunks/combobox.recipe-DfgnwaPj.es.js +0 -380
  463. package/dist/chunks/combobox.recipe-DfgnwaPj.es.js.map +0 -1
  464. package/dist/chunks/date-input-4hsVHJJo.es.js +0 -16
  465. package/dist/chunks/date-input-4hsVHJJo.es.js.map +0 -1
  466. package/dist/chunks/date-input-CGy4NHpW.cjs.js +0 -2
  467. package/dist/chunks/date-input-CGy4NHpW.cjs.js.map +0 -1
  468. package/dist/chunks/date-input.recipe-BGVIdrvQ.cjs.js +0 -2
  469. package/dist/chunks/date-input.recipe-BGVIdrvQ.cjs.js.map +0 -1
  470. package/dist/chunks/date-input.recipe-DENfjb1Z.es.js +0 -127
  471. package/dist/chunks/date-input.recipe-DENfjb1Z.es.js.map +0 -1
  472. package/dist/chunks/date-picker-BSOum_Vm.cjs.js +0 -2
  473. package/dist/chunks/date-picker-BSOum_Vm.cjs.js.map +0 -1
  474. package/dist/chunks/date-picker-CrV9TJ_O.es.js.map +0 -1
  475. package/dist/chunks/date-picker.recipe-5Avb06qp.cjs.js +0 -2
  476. package/dist/chunks/date-picker.recipe-5Avb06qp.cjs.js.map +0 -1
  477. package/dist/chunks/date-picker.recipe-Dy6NmKHA.es.js +0 -82
  478. package/dist/chunks/date-picker.recipe-Dy6NmKHA.es.js.map +0 -1
  479. package/dist/chunks/date-range-picker-Bvgghg-M.cjs.js +0 -2
  480. package/dist/chunks/date-range-picker-Bvgghg-M.cjs.js.map +0 -1
  481. package/dist/chunks/date-range-picker-ByLVQAiA.es.js.map +0 -1
  482. package/dist/chunks/date-range-picker.recipe-BARriKKl.cjs.js +0 -2
  483. package/dist/chunks/date-range-picker.recipe-BARriKKl.cjs.js.map +0 -1
  484. package/dist/chunks/date-range-picker.recipe-CuI7inaU.es.js +0 -124
  485. package/dist/chunks/date-range-picker.recipe-CuI7inaU.es.js.map +0 -1
  486. package/dist/chunks/dialog-C1HRMUcF.es.js +0 -33
  487. package/dist/chunks/dialog-C1HRMUcF.es.js.map +0 -1
  488. package/dist/chunks/dialog-amEwvIoM.cjs.js +0 -2
  489. package/dist/chunks/dialog-amEwvIoM.cjs.js.map +0 -1
  490. package/dist/chunks/divider-D3ah61jw.cjs.js +0 -2
  491. package/dist/chunks/divider-D3ah61jw.cjs.js.map +0 -1
  492. package/dist/chunks/divider-m0ZtHIMJ.es.js.map +0 -1
  493. package/dist/chunks/emotion-is-prop-valid.esm-Bb7Ou5_X.cjs.js +0 -2
  494. package/dist/chunks/emotion-is-prop-valid.esm-Bb7Ou5_X.cjs.js.map +0 -1
  495. package/dist/chunks/emotion-is-prop-valid.esm-qvxbqhmq.es.js +0 -16
  496. package/dist/chunks/emotion-is-prop-valid.esm-qvxbqhmq.es.js.map +0 -1
  497. package/dist/chunks/extractStyleProps-CxgBrz3O.es.js +0 -11
  498. package/dist/chunks/extractStyleProps-CxgBrz3O.es.js.map +0 -1
  499. package/dist/chunks/extractStyleProps-lyk7D-zN.cjs.js +0 -2
  500. package/dist/chunks/extractStyleProps-lyk7D-zN.cjs.js.map +0 -1
  501. package/dist/chunks/form-field-C9PpQYF0.es.js.map +0 -1
  502. package/dist/chunks/form-field-CBFyTAo8.cjs.js.map +0 -1
  503. package/dist/chunks/grid-CugcJxRP.es.js +0 -14
  504. package/dist/chunks/grid-CugcJxRP.es.js.map +0 -1
  505. package/dist/chunks/grid-xr2A-OqD.cjs.js +0 -2
  506. package/dist/chunks/grid-xr2A-OqD.cjs.js.map +0 -1
  507. package/dist/chunks/icon-BFNYuilh.es.js.map +0 -1
  508. package/dist/chunks/icon-D50i-dqv.cjs.js +0 -2
  509. package/dist/chunks/icon-D50i-dqv.cjs.js.map +0 -1
  510. package/dist/chunks/image-DCirAAnr.cjs.js +0 -2
  511. package/dist/chunks/image-DCirAAnr.cjs.js.map +0 -1
  512. package/dist/chunks/image-rXPA3shk.es.js +0 -8
  513. package/dist/chunks/image-rXPA3shk.es.js.map +0 -1
  514. package/dist/chunks/kbd-Bkhw9E6L.cjs.js +0 -2
  515. package/dist/chunks/kbd-Bkhw9E6L.cjs.js.map +0 -1
  516. package/dist/chunks/kbd-Gxvodc1U.es.js +0 -15
  517. package/dist/chunks/kbd-Gxvodc1U.es.js.map +0 -1
  518. package/dist/chunks/kbd.recipe-BONVaPQN.es.js.map +0 -1
  519. package/dist/chunks/kbd.recipe-UlkJJrC8.cjs.js +0 -2
  520. package/dist/chunks/kbd.recipe-UlkJJrC8.cjs.js.map +0 -1
  521. package/dist/chunks/link-BS1jRPrC.es.js.map +0 -1
  522. package/dist/chunks/link-COqOFX5Z.cjs.js +0 -2
  523. package/dist/chunks/link-COqOFX5Z.cjs.js.map +0 -1
  524. package/dist/chunks/link.recipe-Ba2by0OG.es.js.map +0 -1
  525. package/dist/chunks/link.recipe-CG3leGAx.cjs.js +0 -2
  526. package/dist/chunks/link.recipe-CG3leGAx.cjs.js.map +0 -1
  527. package/dist/chunks/list-8yfreyzi.cjs.js +0 -2
  528. package/dist/chunks/list-8yfreyzi.cjs.js.map +0 -1
  529. package/dist/chunks/list-B21joBrq.es.js +0 -13
  530. package/dist/chunks/list-B21joBrq.es.js.map +0 -1
  531. package/dist/chunks/loading-spinner-BQd4UVQs.cjs.js +0 -2
  532. package/dist/chunks/loading-spinner-BQd4UVQs.cjs.js.map +0 -1
  533. package/dist/chunks/loading-spinner-DwN-yshK.es.js.map +0 -1
  534. package/dist/chunks/menu-BpACcVBO.es.js.map +0 -1
  535. package/dist/chunks/menu-CTiF7BX_.cjs.js +0 -2
  536. package/dist/chunks/menu-CTiF7BX_.cjs.js.map +0 -1
  537. package/dist/chunks/multiline-text-input-BCHcfgz9.cjs.js +0 -12
  538. package/dist/chunks/multiline-text-input-BCHcfgz9.cjs.js.map +0 -1
  539. package/dist/chunks/multiline-text-input-sSdbj6tb.es.js.map +0 -1
  540. package/dist/chunks/nimbus-provider-Bf7NgBYl.cjs.js +0 -4
  541. package/dist/chunks/nimbus-provider-Bf7NgBYl.cjs.js.map +0 -1
  542. package/dist/chunks/nimbus-provider-DiytQtCG.es.js +0 -1829
  543. package/dist/chunks/nimbus-provider-DiytQtCG.es.js.map +0 -1
  544. package/dist/chunks/number-input-BU6yMXV8.cjs.js +0 -2
  545. package/dist/chunks/number-input.recipe-B1kAID71.cjs.js +0 -2
  546. package/dist/chunks/number-input.recipe-B1kAID71.cjs.js.map +0 -1
  547. package/dist/chunks/number-input.recipe-CYgMvPKy.es.js +0 -210
  548. package/dist/chunks/number-input.recipe-CYgMvPKy.es.js.map +0 -1
  549. package/dist/chunks/progress-bar-CCyJEPoU.es.js.map +0 -1
  550. package/dist/chunks/progress-bar-pMjw8h4h.cjs.js +0 -2
  551. package/dist/chunks/progress-bar-pMjw8h4h.cjs.js.map +0 -1
  552. package/dist/chunks/radio-input-BLVHJidw.cjs.js +0 -2
  553. package/dist/chunks/radio-input.recipe-CM9R2ilP.es.js +0 -75
  554. package/dist/chunks/radio-input.recipe-CM9R2ilP.es.js.map +0 -1
  555. package/dist/chunks/radio-input.recipe-DdXB4lqs.cjs.js +0 -2
  556. package/dist/chunks/radio-input.recipe-DdXB4lqs.cjs.js.map +0 -1
  557. package/dist/chunks/range-calendar-13GVqWSL.cjs.js +0 -2
  558. package/dist/chunks/range-calendar-13GVqWSL.cjs.js.map +0 -1
  559. package/dist/chunks/range-calendar-C-qR1QHT.es.js.map +0 -1
  560. package/dist/chunks/range-calendar.recipe-D7Qn7AJr.es.js +0 -129
  561. package/dist/chunks/range-calendar.recipe-D7Qn7AJr.es.js.map +0 -1
  562. package/dist/chunks/range-calendar.recipe-H7PsZQwO.cjs.js +0 -2
  563. package/dist/chunks/range-calendar.recipe-H7PsZQwO.cjs.js.map +0 -1
  564. package/dist/chunks/select-BZ2fZDHJ.cjs.js +0 -2
  565. package/dist/chunks/select.recipe-B7-wzxnS.es.js +0 -204
  566. package/dist/chunks/select.recipe-B7-wzxnS.es.js.map +0 -1
  567. package/dist/chunks/select.recipe-DhuuNbSx.cjs.js +0 -2
  568. package/dist/chunks/select.recipe-DhuuNbSx.cjs.js.map +0 -1
  569. package/dist/chunks/simple-grid-CFOP9g2P.es.js +0 -14
  570. package/dist/chunks/simple-grid-CFOP9g2P.es.js.map +0 -1
  571. package/dist/chunks/simple-grid-CHgTayx6.cjs.js +0 -2
  572. package/dist/chunks/simple-grid-CHgTayx6.cjs.js.map +0 -1
  573. package/dist/chunks/stack-__ugxVHD.es.js +0 -11
  574. package/dist/chunks/stack-__ugxVHD.es.js.map +0 -1
  575. package/dist/chunks/stack-wFUhYQQb.cjs.js +0 -2
  576. package/dist/chunks/stack-wFUhYQQb.cjs.js.map +0 -1
  577. package/dist/chunks/switch-BriJIKqx.es.js.map +0 -1
  578. package/dist/chunks/switch-GFsEXE6w.cjs.js +0 -2
  579. package/dist/chunks/switch-GFsEXE6w.cjs.js.map +0 -1
  580. package/dist/chunks/switch.recipe-CWOjEnIy.es.js +0 -100
  581. package/dist/chunks/switch.recipe-CWOjEnIy.es.js.map +0 -1
  582. package/dist/chunks/switch.recipe-DHopLj_g.cjs.js +0 -2
  583. package/dist/chunks/switch.recipe-DHopLj_g.cjs.js.map +0 -1
  584. package/dist/chunks/tag-group-D7GNkec5.cjs.js +0 -2
  585. package/dist/chunks/text--fhvW47o.cjs.js +0 -2
  586. package/dist/chunks/text--fhvW47o.cjs.js.map +0 -1
  587. package/dist/chunks/text-CFsPSPPs.es.js +0 -24
  588. package/dist/chunks/text-CFsPSPPs.es.js.map +0 -1
  589. package/dist/chunks/text-input-Dg1LSvlo.es.js +0 -17
  590. package/dist/chunks/text-input-Dg1LSvlo.es.js.map +0 -1
  591. package/dist/chunks/text-input-DzIZYD16.cjs.js +0 -2
  592. package/dist/chunks/text-input-DzIZYD16.cjs.js.map +0 -1
  593. package/dist/chunks/text-input.recipe-BoPfTFYK.cjs.js +0 -2
  594. package/dist/chunks/text-input.recipe-BoPfTFYK.cjs.js.map +0 -1
  595. package/dist/chunks/text-input.recipe-C5rrWDU0.es.js +0 -65
  596. package/dist/chunks/text-input.recipe-C5rrWDU0.es.js.map +0 -1
  597. package/dist/chunks/time-input-ByUOjN2R.cjs.js +0 -2
  598. package/dist/chunks/time-input-ByUOjN2R.cjs.js.map +0 -1
  599. package/dist/chunks/time-input-pPM_sx2J.es.js.map +0 -1
  600. package/dist/chunks/toggle-button-BcbQQcBy.cjs.js +0 -2
  601. package/dist/chunks/toggle-button-BcbQQcBy.cjs.js.map +0 -1
  602. package/dist/chunks/toggle-button-DhnBl8Gb.es.js +0 -29
  603. package/dist/chunks/toggle-button-DhnBl8Gb.es.js.map +0 -1
  604. package/dist/chunks/toggle-button-group-BQfaNSZf.es.js.map +0 -1
  605. package/dist/chunks/toggle-button-group-C5nvmHRc.cjs.js +0 -2
  606. package/dist/chunks/toggle-button-group-C5nvmHRc.cjs.js.map +0 -1
  607. package/dist/chunks/toggle-button.recipe-COtV4niJ.es.js +0 -64
  608. package/dist/chunks/toggle-button.recipe-COtV4niJ.es.js.map +0 -1
  609. package/dist/chunks/toggle-button.recipe-Cz4g2WY9.cjs.js +0 -2
  610. package/dist/chunks/toggle-button.recipe-Cz4g2WY9.cjs.js.map +0 -1
  611. package/dist/chunks/toolbar-O-t4_xhL.cjs.js +0 -2
  612. package/dist/chunks/toolbar.recipe-4zTJxMys.cjs.js +0 -2
  613. package/dist/chunks/toolbar.recipe-4zTJxMys.cjs.js.map +0 -1
  614. package/dist/chunks/toolbar.recipe-DQHsyTVO.es.js +0 -56
  615. package/dist/chunks/toolbar.recipe-DQHsyTVO.es.js.map +0 -1
  616. package/dist/chunks/tooltip-DwXtfA_x.cjs.js +0 -2
  617. package/dist/chunks/tooltip.recipe-B9-7OFCi.es.js.map +0 -1
  618. package/dist/chunks/tooltip.recipe-CkNOA8Sg.cjs.js +0 -2
  619. package/dist/chunks/tooltip.recipe-CkNOA8Sg.cjs.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date-picker-mVAaj9Pj.cjs.js","sources":["../../src/components/date-picker/date-picker.slots.tsx","../../src/components/date-picker/components/date-picker.time-input.tsx","../../src/components/date-picker/components/date-picker.custom-context.tsx","../../src/components/date-picker/date-picker.tsx"],"sourcesContent":["import {\n type HTMLChakraProps,\n type RecipeProps,\n type UnstyledProp,\n createSlotRecipeContext,\n} from \"@chakra-ui/react/styled-system\";\n\nimport { datePickerSlotRecipe } from \"./date-picker.recipe\";\n\n/**\n * Base recipe props interface that combines Chakra UI's recipe props\n * with the unstyled prop option for the div element.\n */\ninterface DatePickerRecipeProps extends RecipeProps<\"div\">, 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 */\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface DatePickerRootProps\n extends HTMLChakraProps<\"div\", DatePickerRecipeProps> {}\n\n// Correctly destructure from createSlotRecipeContext based on project examples\nconst { withProvider, withContext } = createSlotRecipeContext({\n recipe: datePickerSlotRecipe,\n});\n\n/**\n * Root component that provides the styling context for the DatePicker component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const DatePickerRootSlot = withProvider<\n HTMLDivElement,\n DatePickerRootProps\n>(\"div\", \"root\");\n\n/**\n * Slot component for the input group containing the DateInput and trigger button.\n */\nexport const DatePickerGroupSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"group\");\n\n/**\n * Slot component for the trigger button that opens the calendar popover.\n */\nexport const DatePickerTriggerSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"trigger\");\n\n/**\n * Slot component for the popover container.\n */\nexport const DatePickerPopoverSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"popover\");\n\n/**\n * Slot component for the calendar container within the popover.\n */\nexport const DatePickerCalendarSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"calendar\");\n\n/**\n * Slot component for the calendar header.\n */\nexport const DatePickerCalendarHeaderSlot = withContext<\n HTMLElement,\n HTMLChakraProps<\"header\">\n>(\"header\", \"calendarHeader\");\n\n/**\n * Slot component for the calendar grid.\n */\nexport const DatePickerCalendarGridSlot = withContext<\n HTMLTableElement,\n HTMLChakraProps<\"table\">\n>(\"table\", \"calendarGrid\");\n\n/**\n * Slot component for individual calendar cells.\n */\nexport const DatePickerCalendarCellSlot = withContext<\n HTMLTableCellElement,\n HTMLChakraProps<\"td\">\n>(\"td\", \"calendarCell\");\n","import { Flex, Text, TimeInput } from \"@/components\";\nimport { useContext, useRef, useEffect } from \"react\";\nimport { useLocale } from \"react-aria\";\nimport { DatePickerStateContext } from \"react-aria-components\";\nimport type { DatePickerTimeInputProps } from \"../date-picker.types\";\n\nexport const DatePickerTimeInput = ({\n hideTimeZone,\n hourCycle,\n}: DatePickerTimeInputProps) => {\n const { locale } = useLocale();\n const datePickerState = useContext(DatePickerStateContext);\n const { granularity, dateValue } = datePickerState!;\n const timeInputRef = useRef<HTMLDivElement>(null);\n const previousDateRef = useRef(dateValue);\n\n // do not show up to the party if you're not invited\n if (granularity === \"day\") {\n return null;\n }\n\n // Focus the time input when date changes (user selects a date from calendar)\n useEffect(() => {\n // Check if date changed\n let timeoutId: NodeJS.Timeout | undefined;\n\n if (dateValue && previousDateRef.current?.compare(dateValue) !== 0) {\n // Only auto-focus if no time input segment currently has focus\n // This prevents stealing focus during user interaction with time segments\n const container = timeInputRef.current;\n const activeElement = document.activeElement;\n const hasTimeSegmentFocus =\n container?.contains(activeElement) &&\n activeElement?.getAttribute(\"role\") === \"spinbutton\";\n\n if (!hasTimeSegmentFocus) {\n // Small delay to ensure the DOM is ready\n timeoutId = setTimeout(() => {\n // Find the first focusable segment within the time input container\n if (container) {\n const firstSegment = container.querySelector(\n '[role=\"spinbutton\"]'\n ) as HTMLElement;\n firstSegment?.focus();\n }\n }, 50);\n }\n }\n\n previousDateRef.current = dateValue;\n\n // Cleanup timeout on effect re-run or unmount to prevent memory leaks\n return () => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n };\n }, [dateValue]);\n\n return (\n <Flex\n ref={timeInputRef}\n borderTop=\"solid-25\"\n borderColor=\"neutral.3\"\n py=\"300\"\n px=\"400\"\n alignItems=\"center\"\n justifyContent=\"center\"\n gap=\"200\"\n >\n {/* TODO: translate hardcoded string */}\n <Text textStyle=\"xs\" fontWeight=\"500\" color=\"neutral.12\">\n Start time\n </Text>\n <TimeInput\n slot=\"timeInput\"\n locale={locale}\n variant=\"ghost\"\n size=\"sm\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n </Flex>\n );\n};\n","import { useContext } from \"react\";\nimport {\n Provider,\n ButtonContext,\n DatePickerStateContext,\n TimeFieldContext,\n useSlottedContext,\n} from \"react-aria-components\";\nimport type { PressEvent, TimeValue } from \"react-aria\";\n\nexport const DatePickerCustomContext = ({\n children,\n}: {\n children: React.ReactNode;\n}) => {\n const buttonContext = useSlottedContext(ButtonContext) || {};\n const datePickerState = useContext(DatePickerStateContext);\n const noInputValue = datePickerState?.dateValue === null;\n\n const { timeValue, setTimeValue, granularity } = datePickerState!;\n\n // Try to get disabled state from the button context\n const isDatePickerDisabled = buttonContext?.isDisabled;\n\n // Generate default aria-label based on granularity if not provided\n const getDefaultTimeInputAriaLabel = () => {\n switch (granularity) {\n case \"hour\":\n return \"Enter time (hour)\";\n case \"minute\":\n return \"Enter time (hour and minute)\";\n case \"second\":\n return \"Enter time (hour, minute, and second)\";\n default:\n return \"Enter time\";\n }\n };\n\n /**\n * Button slots\n * ================================\n */\n const buttonSlots = {\n /** toggles the calendar popover */\n calendarToggle: {\n ...buttonContext,\n onPress: (event: PressEvent) => {\n // Ensure any active input (e.g., date picker segment) loses focus\n // because blurring the input will close the popover if it's open (or was just opened)\n const activeElement = document?.activeElement as HTMLElement | null;\n\n if (activeElement) {\n activeElement.blur();\n }\n\n buttonContext.onPress?.(event);\n },\n },\n /** Clear button that displays when there's a value in each segment - hidden from both visual and screen readers when there's no value */\n clear: {\n onPress: () => datePickerState?.setValue(null),\n \"aria-label\": \"Clear input value\",\n isDisabled: isDatePickerDisabled,\n // Hide the button when there's no value\n style: noInputValue ? { display: \"none\" } : undefined,\n \"aria-hidden\": noInputValue ? true : undefined,\n },\n };\n\n /**\n * TimeInput slots\n * ================================\n */\n\n const timeInputSlots = {\n timeInput: {\n value: timeValue,\n onChange: (value: TimeValue | null) => {\n if (value !== null) {\n setTimeValue(value);\n }\n },\n granularity: granularity === \"day\" ? undefined : granularity,\n \"aria-label\": getDefaultTimeInputAriaLabel(),\n },\n };\n\n return (\n <Provider\n values={[\n [\n ButtonContext,\n {\n slots: buttonSlots,\n },\n ],\n [TimeFieldContext, { slots: timeInputSlots }],\n ]}\n >\n {children}\n </Provider>\n );\n};\n","import {\n DatePickerRootSlot,\n DatePickerGroupSlot,\n DatePickerTriggerSlot,\n DatePickerPopoverSlot,\n DatePickerCalendarSlot,\n} from \"./date-picker.slots\";\n\nimport { CalendarMonth, Close } from \"@commercetools/nimbus-icons\";\n\nimport {\n DatePicker as ReactAriaDatePicker,\n Group,\n Popover,\n Dialog,\n} from \"react-aria-components\";\nimport { useSlotRecipe } from \"@chakra-ui/react/styled-system\";\nimport { datePickerSlotRecipe } from \"./date-picker.recipe\";\nimport type { DatePickerProps } from \"./date-picker.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\nimport { DateInput, Calendar, IconButton } from \"@/components\";\nimport { DatePickerTimeInput } from \"./components/date-picker.time-input\";\nimport { DatePickerCustomContext } from \"./components/date-picker.custom-context\";\n\n/**\n * # DatePicker\n *\n * a UI component for users to enter or select a specific calendar date.\n *\n * @see {@link https://nimbus-documentation.vercel.app/components/inputs/datepicker}\n */\nexport const DatePicker = (props: DatePickerProps) => {\n const {\n size = \"md\",\n variant,\n granularity = \"day\",\n hideTimeZone,\n hourCycle,\n } = props;\n const recipe = useSlotRecipe({ recipe: datePickerSlotRecipe });\n const [recipeProps, remainingProps] = recipe.splitVariantProps(props);\n const [styleProps, otherProps] = extractStyleProps(remainingProps);\n\n // the size of the buttons overlaying the input\n const overlayButtonSize = size === \"md\" ? \"xs\" : \"2xs\";\n\n // When granularity is \"day\", use the prop value (defaults to true if not provided)\n // For other granularities (time-based), force to false so users can set both date and time\n const shouldCloseOnSelect =\n granularity === \"day\" ? props.shouldCloseOnSelect : false;\n\n return (\n <DatePickerRootSlot {...recipeProps} {...styleProps} asChild>\n <ReactAriaDatePicker\n {...otherProps}\n shouldCloseOnSelect={shouldCloseOnSelect}\n >\n <DatePickerCustomContext>\n <DatePickerGroupSlot asChild>\n <Group>\n <DateInput\n size={size}\n variant={variant}\n width=\"full\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n <DatePickerTriggerSlot>\n {/* @ts-expect-error react aria is adding the aria-label prop */}\n <IconButton\n tone=\"primary\"\n variant=\"ghost\"\n size={overlayButtonSize}\n slot=\"clear\"\n >\n <Close />\n </IconButton>\n {/* @ts-expect-error react aria is adding the aria-label prop */}\n <IconButton\n tone=\"primary\"\n variant=\"ghost\"\n size={overlayButtonSize}\n slot=\"calendarToggle\"\n >\n <CalendarMonth />\n </IconButton>\n </DatePickerTriggerSlot>\n </Group>\n </DatePickerGroupSlot>\n <DatePickerPopoverSlot asChild>\n <Popover placement=\"bottom end\">\n <Dialog>\n <DatePickerCalendarSlot>\n <Calendar />\n </DatePickerCalendarSlot>\n <DatePickerTimeInput\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n </Dialog>\n </Popover>\n </DatePickerPopoverSlot>\n </DatePickerCustomContext>\n </ReactAriaDatePicker>\n </DatePickerRootSlot>\n );\n};\n\nDatePicker.displayName = \"DatePicker\";\n"],"names":["withProvider","withContext","createSlotRecipeContext","datePickerSlotRecipe","DatePickerRootSlot","DatePickerGroupSlot","DatePickerTriggerSlot","DatePickerPopoverSlot","DatePickerCalendarSlot","DatePickerTimeInput","hideTimeZone","hourCycle","locale","useLocale","datePickerState","useContext","DatePickerStateContext","granularity","dateValue","timeInputRef","useRef","previousDateRef","useEffect","timeoutId","container","activeElement","jsxs","Flex","jsx","Text","TimeInput","DatePickerCustomContext","children","buttonContext","useSlottedContext","ButtonContext","noInputValue","timeValue","setTimeValue","isDatePickerDisabled","getDefaultTimeInputAriaLabel","buttonSlots","event","timeInputSlots","value","Provider","TimeFieldContext","DatePicker","props","size","variant","recipe","useSlotRecipe","recipeProps","remainingProps","styleProps","otherProps","extractStyleProps","overlayButtonSize","shouldCloseOnSelect","ReactAriaDatePicker","Group","DateInput","IconButton","Close","CalendarMonth","Popover","Dialog","Calendar"],"mappings":"6vBAyBM,CAA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AAAC,EACA,UAAAC,CAAA,CAAA,CACF,CAAA,CACF,EACF,CAAA,CACF,CAAA,CAAA,CACF,CAAA,CAAA,EAEJ,CAEJ,EAEAoC,EAAW,YAAc"}
@@ -1,18 +1,19 @@
1
1
  import { jsxs as m, jsx as n } from "react/jsx-runtime";
2
- import { createSlotRecipeContext as V, Flex as x, useSlotRecipe as E } from "@chakra-ui/react";
3
- import { d as T } from "./date-range-picker.recipe-CuI7inaU.es.js";
2
+ import { f as T } from "./index-DdQ9V6B1.es.js";
3
+ import { c as V, u as E } from "./create-slot-recipe-context-Cv3lncUO.es.js";
4
4
  import { Close as w, CalendarMonth as z } from "@commercetools/nimbus-icons";
5
- import { b as I, c as W } from "./DatePicker-Dq_xeLpu.es.js";
6
- import { $ as j, a as F } from "./Dialog-C-E93N6e.es.js";
5
+ import { b as I, c as F } from "./DatePicker-Dq_xeLpu.es.js";
6
+ import { $ as W, a as j } from "./Dialog-C-E93N6e.es.js";
7
7
  import { $ as A } from "./Group-DoX3X7aY.es.js";
8
- import { e as B } from "./extractStyleProps-CxgBrz3O.es.js";
9
- import { I as y } from "./icon-button-DqkVeZCx.es.js";
10
- import { T as S } from "./text-CFsPSPPs.es.js";
11
- import { D as C } from "./date-input-4hsVHJJo.es.js";
12
- import { R as G } from "./range-calendar-C-qR1QHT.es.js";
13
- import { T as D } from "./time-input-pPM_sx2J.es.js";
8
+ import { e as B } from "./extractStyleProps-B7kwDyYx.es.js";
9
+ import { I as y } from "./icon-button-CJHH2Msr.es.js";
10
+ import { T as S } from "./text-uojQ1XH5.es.js";
11
+ import { D as C } from "./date-input-BxN-H9P6.es.js";
12
+ import { R as G } from "./range-calendar-D2MlUnBw.es.js";
13
+ import { T as D } from "./time-input-DgGtoKk8.es.js";
14
14
  import { useContext as k, useRef as P, useEffect as O } from "react";
15
15
  import { $ as q } from "./context-D3RF-nTI.es.js";
16
+ import { F as x } from "./flex-DgabwPpo.es.js";
16
17
  import { $ as R } from "./Button-D19EX1Wq.es.js";
17
18
  import { c as H, d as L } from "./utils-CEdpnSRC.es.js";
18
19
  import { d as M } from "./DateField-D-4susha.es.js";
@@ -198,7 +199,7 @@ const { withProvider: N, withContext: $ } = /* @__PURE__ */ V({
198
199
  }, _ = (o) => {
199
200
  const { granularity: i = "day", hideTimeZone: e, hourCycle: s } = o, p = E({ recipe: T }), [r, f] = p.splitVariantProps(o), [c, d] = B(f), { size: u = "md" } = r, l = u === "md" ? "xs" : "2xs", h = i === "day" ? o.shouldCloseOnSelect : !1;
200
201
  return /* @__PURE__ */ n(J, { ...r, ...c, asChild: !0, children: /* @__PURE__ */ n(
201
- W,
202
+ F,
202
203
  {
203
204
  ...d,
204
205
  shouldCloseOnSelect: h,
@@ -261,7 +262,7 @@ const { withProvider: N, withContext: $ } = /* @__PURE__ */ V({
261
262
  )
262
263
  ] })
263
264
  ] }) }),
264
- /* @__PURE__ */ n(U, { asChild: !0, children: /* @__PURE__ */ n(j, { placement: "bottom end", children: /* @__PURE__ */ m(F, { children: [
265
+ /* @__PURE__ */ n(U, { asChild: !0, children: /* @__PURE__ */ n(W, { placement: "bottom end", children: /* @__PURE__ */ m(j, { children: [
265
266
  /* @__PURE__ */ n(X, { children: /* @__PURE__ */ n(G, {}) }),
266
267
  /* @__PURE__ */ n(
267
268
  Y,
@@ -279,4 +280,4 @@ _.displayName = "DateRangePicker";
279
280
  export {
280
281
  _ as D
281
282
  };
282
- //# sourceMappingURL=date-range-picker-ByLVQAiA.es.js.map
283
+ //# sourceMappingURL=date-range-picker-CZTsX2-y.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date-range-picker-CZTsX2-y.es.js","sources":["../../src/components/date-range-picker/date-range-picker.slots.tsx","../../src/components/date-range-picker/components/date-range-picker.time-input.tsx","../../src/components/date-range-picker/components/date-range-picker.custom-context.tsx","../../src/components/date-range-picker/date-range-picker.tsx"],"sourcesContent":["import {\n type HTMLChakraProps,\n type RecipeProps,\n type UnstyledProp,\n createSlotRecipeContext,\n} from \"@chakra-ui/react/styled-system\";\n\nimport { dateRangePickerSlotRecipe } from \"./date-range-picker.recipe\";\n\n/**\n * Base recipe props interface that combines Chakra UI's recipe props\n * with the unstyled prop option for the div element.\n */\ninterface DateRangePickerRecipeProps extends RecipeProps<\"div\">, 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 */\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface DateRangePickerRootProps\n extends HTMLChakraProps<\"div\", DateRangePickerRecipeProps> {}\n\n// Correctly destructure from createSlotRecipeContext based on project examples\nconst { withProvider, withContext } = createSlotRecipeContext({\n recipe: dateRangePickerSlotRecipe,\n});\n\n/**\n * Root component that provides the styling context for the DateRangePicker component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const DateRangePickerRootSlot = withProvider<\n HTMLDivElement,\n DateRangePickerRootProps\n>(\"div\", \"root\");\n\n/**\n * Slot component for the input group containing the DateInput and trigger button.\n */\nexport const DateRangePickerGroupSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"group\");\n\n/**\n * Slot component for the trigger button that opens the calendar popover.\n */\nexport const DateRangePickerTriggerSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"trigger\");\n\n/**\n * Slot component for the popover container.\n */\nexport const DateRangePickerPopoverSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"popover\");\n\n/**\n * Slot component for the calendar container within the popover.\n */\nexport const DateRangePickerCalendarSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"calendar\");\n\n/**\n * Slot component for the calendar header.\n */\nexport const DateRangePickerCalendarHeaderSlot = withContext<\n HTMLElement,\n HTMLChakraProps<\"header\">\n>(\"header\", \"calendarHeader\");\n\n/**\n * Slot component for the calendar grid.\n */\nexport const DateRangePickerCalendarGridSlot = withContext<\n HTMLTableElement,\n HTMLChakraProps<\"table\">\n>(\"table\", \"calendarGrid\");\n\n/**\n * Slot component for individual calendar cells.\n */\nexport const DateRangePickerCalendarCellSlot = withContext<\n HTMLTableCellElement,\n HTMLChakraProps<\"td\">\n>(\"td\", \"calendarCell\");\n","import { Flex, Text, TimeInput } from \"@/components\";\nimport { useContext, useRef, useEffect } from \"react\";\nimport { useLocale } from \"react-aria\";\nimport { DateRangePickerStateContext } from \"react-aria-components\";\nimport type { DateRangePickerTimeInputProps } from \"../date-range-picker.types\";\n\nexport const DateRangePickerTimeInput = ({\n hideTimeZone,\n hourCycle,\n}: DateRangePickerTimeInputProps) => {\n const { locale } = useLocale();\n const dateRangePickerState = useContext(DateRangePickerStateContext);\n const { granularity, value } = dateRangePickerState!;\n const timeInputRef = useRef<HTMLDivElement>(null);\n const previousValueRef = useRef(value);\n\n // do not show up to the party if you're not invited\n if (granularity === \"day\") {\n return null;\n }\n\n // Focus the time input when date range changes (user selects dates from calendar)\n useEffect(() => {\n let timeoutId: NodeJS.Timeout | undefined;\n\n // Check if date range changed by comparing start and end dates\n const hasValueChanged =\n (value?.start &&\n previousValueRef.current?.start?.compare(value.start) !== 0) ||\n (value?.end && previousValueRef.current?.end?.compare(value.end) !== 0);\n\n if (hasValueChanged) {\n // Only auto-focus if no time input segment currently has focus\n // This prevents stealing focus during user interaction with time segments\n const container = timeInputRef.current;\n const activeElement = document.activeElement;\n const hasTimeSegmentFocus =\n container?.contains(activeElement) &&\n activeElement?.getAttribute(\"role\") === \"spinbutton\";\n\n if (!hasTimeSegmentFocus) {\n // Small delay to ensure the DOM is ready\n timeoutId = setTimeout(() => {\n // Find the first focusable segment within the time input container\n if (container) {\n const firstSegment = container.querySelector(\n '[role=\"spinbutton\"]'\n ) as HTMLElement;\n\n if (firstSegment) {\n firstSegment.focus();\n }\n }\n }, 50);\n }\n }\n\n previousValueRef.current = value;\n\n // Cleanup timeout on effect re-run or unmount to prevent memory leaks\n return () => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n };\n }, [value]);\n\n return (\n <Flex\n ref={timeInputRef}\n borderTop=\"solid-25\"\n borderColor=\"neutral.3\"\n py=\"300\"\n px=\"400\"\n alignItems=\"center\"\n justifyContent=\"center\"\n gap=\"200\"\n >\n {/* Start DateInput with separate label */}\n <Flex alignItems=\"center\" gap=\"200\">\n {/* TODO: translate hardcoded string */}\n <Text\n textStyle=\"xs\"\n fontWeight=\"500\"\n color=\"neutral.12\"\n minWidth=\"fit-content\"\n >\n Start time\n </Text>\n <TimeInput\n slot=\"startTimeInput\"\n locale={locale}\n variant=\"ghost\"\n size=\"sm\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n </Flex>\n\n {/* End DateInput with separate label */}\n <Flex alignItems=\"center\" gap=\"200\">\n {/* TODO: translate hardcoded string */}\n <Text\n textStyle=\"xs\"\n fontWeight=\"500\"\n color=\"neutral.12\"\n minWidth=\"fit-content\"\n >\n End time\n </Text>\n <TimeInput\n slot=\"endTimeInput\"\n locale={locale}\n variant=\"ghost\"\n size=\"sm\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n </Flex>\n </Flex>\n );\n};\n","import { useContext, type ReactNode } from \"react\";\nimport {\n Provider,\n ButtonContext,\n DateRangePickerStateContext,\n TimeFieldContext,\n useSlottedContext,\n} from \"react-aria-components\";\nimport type { PressEvent, TimeValue } from \"react-aria\";\n\nexport const DateRangePickerCustomContext = ({\n children,\n}: {\n children: ReactNode;\n}) => {\n const buttonContext = useSlottedContext(ButtonContext) || {};\n const dateRangePickerState = useContext(DateRangePickerStateContext);\n\n // Check if all 6 segments (start: day, month, year; end: day, month, year) have values\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const hasCompleteRangeDate = (date: any) =>\n date?.day && date?.month && date?.year;\n\n const incompleteValue =\n !dateRangePickerState?.value ||\n !hasCompleteRangeDate(dateRangePickerState.value.start) ||\n !hasCompleteRangeDate(dateRangePickerState.value.end);\n\n const { granularity } = dateRangePickerState!;\n\n // Extract time values from start and end dates separately\n const startTimeValue =\n dateRangePickerState?.value?.start &&\n \"hour\" in dateRangePickerState.value.start\n ? dateRangePickerState.value.start\n : null;\n const endTimeValue =\n dateRangePickerState?.value?.end && \"hour\" in dateRangePickerState.value.end\n ? dateRangePickerState.value.end\n : null;\n\n // Try to get disabled state from the button context\n const isDateRangePickerDisabled = buttonContext?.isDisabled;\n\n // Generate default aria-label based on granularity if not provided\n const getDefaultTimeInputAriaLabel = (type: \"start\" | \"end\") => {\n const prefix = type === \"start\" ? \"Start\" : \"End\";\n switch (granularity) {\n case \"hour\":\n return `${prefix} time (hour)`;\n case \"minute\":\n return `${prefix} time (hour and minute)`;\n case \"second\":\n return `${prefix} time (hour, minute, and second)`;\n default:\n return `${prefix} time`;\n }\n };\n\n /**\n * Button slots\n * ================================\n */\n const buttonSlots = {\n /** toggles the calendar popover */\n calendarToggle: {\n ...buttonContext,\n onPress: (event: PressEvent) => {\n // Ensure any active input (e.g., date picker segment) loses focus\n // because blurring the input will close the popover if it's open (or was just opened)\n const activeElement = document?.activeElement as HTMLElement | null;\n\n if (activeElement) {\n activeElement.blur();\n }\n\n buttonContext.onPress?.(event);\n },\n },\n /** Clear button that displays when there's a value in each segment - hidden from both visual and screen readers when there's no value */\n clear: {\n // Clear both start and end values\n onPress: () => dateRangePickerState?.setValue(null),\n \"aria-label\": \"Clear input value\",\n isDisabled: isDateRangePickerDisabled,\n // Hide the button when there's no value\n style: incompleteValue ? { display: \"none\" } : undefined,\n \"aria-hidden\": incompleteValue ? true : undefined,\n },\n };\n\n /**\n * TimeInput slots\n * ================================\n */\n\n // Separate time input slots for start and end times\n const timeInputSlots = {\n startTimeInput: {\n value: startTimeValue,\n onChange: (value: TimeValue | null) => {\n if (value !== null && dateRangePickerState?.value?.start) {\n // Update the start date with the new time\n const currentValue = dateRangePickerState.value;\n const startDate = currentValue.start;\n const endDate = currentValue.end;\n if (startDate && endDate) {\n const newStartDate = startDate.set({\n hour: value.hour,\n minute: value.minute || 0,\n second: value.second || 0,\n millisecond: value.millisecond || 0,\n });\n\n dateRangePickerState.setValue({\n start: newStartDate,\n end: endDate,\n });\n }\n }\n },\n granularity: granularity === \"day\" ? undefined : granularity,\n \"aria-label\": getDefaultTimeInputAriaLabel(\"start\"),\n },\n endTimeInput: {\n value: endTimeValue,\n onChange: (value: TimeValue | null) => {\n if (value !== null && dateRangePickerState?.value?.end) {\n // Update the end date with the new time\n const currentValue = dateRangePickerState.value;\n const startDate = currentValue.start;\n const endDate = currentValue.end;\n if (startDate && endDate) {\n const newEndDate = endDate.set({\n hour: value.hour,\n minute: value.minute || 0,\n second: value.second || 0,\n millisecond: value.millisecond || 0,\n });\n\n dateRangePickerState.setValue({\n start: startDate,\n end: newEndDate,\n });\n }\n }\n },\n granularity: granularity === \"day\" ? undefined : granularity,\n \"aria-label\": getDefaultTimeInputAriaLabel(\"end\"),\n },\n };\n\n return (\n <Provider\n values={[\n [\n ButtonContext,\n {\n slots: buttonSlots,\n },\n ],\n [TimeFieldContext, { slots: timeInputSlots }],\n ]}\n >\n {children}\n </Provider>\n );\n};\n","import {\n DateRangePickerRootSlot,\n DateRangePickerGroupSlot,\n DateRangePickerTriggerSlot,\n DateRangePickerPopoverSlot,\n DateRangePickerCalendarSlot,\n} from \"./date-range-picker.slots\";\n\nimport { CalendarMonth, Close } from \"@commercetools/nimbus-icons\";\n\nimport {\n DateRangePicker as ReactAriaDateRangePicker,\n Group,\n Popover,\n Dialog,\n} from \"react-aria-components\";\nimport { useSlotRecipe } from \"@chakra-ui/react/styled-system\";\nimport { dateRangePickerSlotRecipe } from \"./date-range-picker.recipe\";\nimport type { DateRangePickerProps } from \"./date-range-picker.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\nimport { DateInput, RangeCalendar, IconButton, Text } from \"@/components\";\nimport { DateRangePickerTimeInput } from \"./components/date-range-picker.time-input\";\nimport { DateRangePickerCustomContext } from \"./components/date-range-picker.custom-context\";\n\n/**\n * DateRangePicker\n * ============================================================\n * Combines a DateInput with a RangeCalendar popover for date range selection.\n * Users can either type a date range directly or select from the calendar.\n */\nexport const DateRangePicker = (props: DateRangePickerProps) => {\n // Forward hideTimeZone and hourCycle to child components (footer time inputs)\n const { granularity = \"day\", hideTimeZone, hourCycle } = props;\n const recipe = useSlotRecipe({ recipe: dateRangePickerSlotRecipe });\n const [recipeProps, remainingProps] = recipe.splitVariantProps(props);\n\n const [styleProps, otherProps] = extractStyleProps(remainingProps);\n\n // Extract size and variant from recipe props to pass to DateInputs\n const { size = \"md\" } = recipeProps;\n\n // the size of the buttons overlaying the input\n const overlayButtonSize = size === \"md\" ? \"xs\" : \"2xs\";\n\n // When granularity is \"day\", use the prop value (defaults to true if not provided)\n // For other granularities (time-based), force to false so users can set both date and time\n const shouldCloseOnSelect =\n granularity === \"day\" ? props.shouldCloseOnSelect : false;\n\n return (\n <DateRangePickerRootSlot {...recipeProps} {...styleProps} asChild>\n <ReactAriaDateRangePicker\n {...otherProps}\n shouldCloseOnSelect={shouldCloseOnSelect}\n >\n <DateRangePickerCustomContext>\n <DateRangePickerGroupSlot asChild>\n <Group>\n <DateInput\n slot=\"start\"\n size={size}\n variant=\"plain\"\n width=\"auto\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n <Text\n as=\"span\"\n px=\"150\"\n color=\"neutral.11\"\n userSelect=\"none\"\n aria-hidden=\"true\"\n slot={null}\n >\n –\n </Text>\n <DateInput\n slot=\"end\"\n size={size}\n variant=\"plain\"\n width=\"auto\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n <DateRangePickerTriggerSlot>\n {/* @ts-expect-error react aria is adding the aria-label prop */}\n <IconButton\n tone=\"primary\"\n variant=\"ghost\"\n size={overlayButtonSize}\n slot=\"clear\"\n >\n <Close />\n </IconButton>\n {/* @ts-expect-error react aria is adding the aria-label prop */}\n <IconButton\n tone=\"primary\"\n variant=\"ghost\"\n size={overlayButtonSize}\n slot=\"calendarToggle\"\n >\n <CalendarMonth />\n </IconButton>\n </DateRangePickerTriggerSlot>\n </Group>\n </DateRangePickerGroupSlot>\n <DateRangePickerPopoverSlot asChild>\n <Popover placement=\"bottom end\">\n <Dialog>\n <DateRangePickerCalendarSlot>\n <RangeCalendar />\n </DateRangePickerCalendarSlot>\n <DateRangePickerTimeInput\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n </Dialog>\n </Popover>\n </DateRangePickerPopoverSlot>\n </DateRangePickerCustomContext>\n </ReactAriaDateRangePicker>\n </DateRangePickerRootSlot>\n );\n};\n\nDateRangePicker.displayName = \"DateRangePicker\";\n"],"names":["withProvider","withContext","createSlotRecipeContext","dateRangePickerSlotRecipe","DateRangePickerRootSlot","DateRangePickerGroupSlot","DateRangePickerTriggerSlot","DateRangePickerPopoverSlot","DateRangePickerCalendarSlot","DateRangePickerTimeInput","hideTimeZone","hourCycle","locale","useLocale","dateRangePickerState","useContext","DateRangePickerStateContext","granularity","value","timeInputRef","useRef","previousValueRef","useEffect","timeoutId","container","activeElement","firstSegment","jsxs","Flex","jsx","Text","TimeInput","DateRangePickerCustomContext","children","buttonContext","useSlottedContext","ButtonContext","hasCompleteRangeDate","date","incompleteValue","startTimeValue","endTimeValue","isDateRangePickerDisabled","getDefaultTimeInputAriaLabel","type","prefix","buttonSlots","event","timeInputSlots","currentValue","startDate","endDate","newStartDate","newEndDate","Provider","TimeFieldContext","DateRangePicker","props","recipe","useSlotRecipe","recipeProps","remainingProps","styleProps","otherProps","extractStyleProps","size","overlayButtonSize","shouldCloseOnSelect","ReactAriaDateRangePicker","Group","DateInput","IconButton","Close","CalendarMonth","Popover","Dialog","RangeCalendar"],"mappings":";;;;;;;;;;;;;;;;;;;AAyBA,MAAM,EAAE,cAAAA,GAAc,aAAAC,EAAA,IAAgB,gBAAAC,EAAwB;AAAA,EAC5D,QAAQC;AACV,CAAC,GAMYC,IAA0B,gBAAAJ,EAGrC,OAAO,MA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AA,CAAA,CAAM;AAAA,cAAA;AAAA,YAAA;AAAA,YAGT,gBAAA3C;AAAA,cAAC0C;AAAA,cAAA;AAAA,gBACC,MAAK;AAAA,gBACL,SAAQ;AAAA,gBACR,MAAML;AAAA,gBACN,MAAK;AAAA,gBAEL,4BAACO,GAAA,CAAA,CAAc;AAAA,cAAA;AAAA,YAAA;AAAA,UACjB,EAAA,CACF;AAAA,QAAA,EAAA,CACF,EAAA,CACF;AAAA,QACA,gBAAA5C,EAACtB,KAA2B,SAAO,IACjC,4BAACmE,GAAA,EAAQ,WAAU,cACjB,UAAA,gBAAA/C,EAACgD,GAAA,EACC,UAAA;AAAA,UAAA,gBAAA9C,EAACrB,GAAA,EACC,UAAA,gBAAAqB,EAAC+C,GAAA,CAAA,CAAc,GACjB;AAAA,UACA,gBAAA/C;AAAA,YAACpB;AAAA,YAAA;AAAA,cACC,cAAAC;AAAA,cACA,WAAAC;AAAA,YAAA;AAAA,UAAA;AAAA,QACF,EAAA,CACF,GACF,EAAA,CACF;AAAA,MAAA,EAAA,CACF;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;AAEA6C,EAAgB,cAAc;"}
@@ -0,0 +1,2 @@
1
+ "use strict";const e=require("react/jsx-runtime"),q=require("./index-LEpCeLVL.cjs.js"),k=require("./create-slot-recipe-context-7JMdJHPF.cjs.js"),R=require("@commercetools/nimbus-icons"),j=require("./DatePicker-Ch7j_XH3.cjs.js"),P=require("./Dialog-UM6kRwD8.cjs.js"),E=require("./Group-BQlSpW4r.cjs.js"),w=require("./extractStyleProps-Br2UMow5.cjs.js"),C=require("./icon-button-C-Orugq3.cjs.js"),S=require("./text-tO5nXPfT.cjs.js"),D=require("./date-input-CM4AIKke.cjs.js"),z=require("./range-calendar-BtViOWLD.cjs.js"),y=require("./time-input-CAI-K0L0.cjs.js"),f=require("react"),F=require("./context-DURpz5en.cjs.js"),v=require("./flex-DgsstZZT.cjs.js"),I=require("./Button-gAaN5cZZ.cjs.js"),T=require("./utils-sWqo2nmW.cjs.js"),B=require("./DateField-Bd9anPa4.cjs.js"),{withProvider:W,withContext:b}=k.createSlotRecipeContext({recipe:q.dateRangePickerSlotRecipe}),G=W("div","root"),A=b("div","group"),O=b("div","trigger"),H=b("div","popover"),L=b("div","calendar"),M=({hideTimeZone:s,hourCycle:o})=>{const{locale:t}=F.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),i=f.useContext(j.$06d5b8ec9ee5d538$export$80d7ae1f804790be),{granularity:p,value:r}=i,x=f.useRef(null),l=f.useRef(r);return p==="day"?null:(f.useEffect(()=>{let u;if(r?.start&&l.current?.start?.compare(r.start)!==0||r?.end&&l.current?.end?.compare(r.end)!==0){const c=x.current,m=document.activeElement;c?.contains(m)&&m?.getAttribute("role")==="spinbutton"||(u=setTimeout(()=>{if(c){const a=c.querySelector('[role="spinbutton"]');a&&a.focus()}},50))}return l.current=r,()=>{u&&clearTimeout(u)}},[r]),e.jsxs(v.Flex,{ref:x,borderTop:"solid-25",borderColor:"neutral.3",py:"300",px:"400",alignItems:"center",justifyContent:"center",gap:"200",children:[e.jsxs(v.Flex,{alignItems:"center",gap:"200",children:[e.jsx(S.Text,{textStyle:"xs",fontWeight:"500",color:"neutral.12",minWidth:"fit-content",children:"Start time"}),e.jsx(y.TimeInput,{slot:"startTimeInput",locale:t,variant:"ghost",size:"sm",hideTimeZone:s,hourCycle:o})]}),e.jsxs(v.Flex,{alignItems:"center",gap:"200",children:[e.jsx(S.Text,{textStyle:"xs",fontWeight:"500",color:"neutral.12",minWidth:"fit-content",children:"End time"}),e.jsx(y.TimeInput,{slot:"endTimeInput",locale:t,variant:"ghost",size:"sm",hideTimeZone:s,hourCycle:o})]})]}))},N=({children:s})=>{const o=T.$64fa3d84918910a7$export$fabf2dc03a41866e(I.$d2b4bc8c273e7be6$export$24d547caef80ccd1)||{},t=f.useContext(j.$06d5b8ec9ee5d538$export$80d7ae1f804790be),i=n=>n?.day&&n?.month&&n?.year,p=!t?.value||!i(t.value.start)||!i(t.value.end),{granularity:r}=t,x=t?.value?.start&&"hour"in t.value.start?t.value.start:null,l=t?.value?.end&&"hour"in t.value.end?t.value.end:null,u=o?.isDisabled,d=n=>{const a=n==="start"?"Start":"End";switch(r){case"hour":return`${a} time (hour)`;case"minute":return`${a} time (hour and minute)`;case"second":return`${a} time (hour, minute, and second)`;default:return`${a} time`}},c={calendarToggle:{...o,onPress:n=>{const a=document?.activeElement;a&&a.blur(),o.onPress?.(n)}},clear:{onPress:()=>t?.setValue(null),"aria-label":"Clear input value",isDisabled:u,style:p?{display:"none"}:void 0,"aria-hidden":p?!0:void 0}},m={startTimeInput:{value:x,onChange:n=>{if(n!==null&&t?.value?.start){const a=t.value,h=a.start,g=a.end;if(h&&g){const $=h.set({hour:n.hour,minute:n.minute||0,second:n.second||0,millisecond:n.millisecond||0});t.setValue({start:$,end:g})}}},granularity:r==="day"?void 0:r,"aria-label":d("start")},endTimeInput:{value:l,onChange:n=>{if(n!==null&&t?.value?.end){const a=t.value,h=a.start,g=a.end;if(h&&g){const $=g.set({hour:n.hour,minute:n.minute||0,second:n.second||0,millisecond:n.millisecond||0});t.setValue({start:h,end:$})}}},granularity:r==="day"?void 0:r,"aria-label":d("end")}};return e.jsx(T.$64fa3d84918910a7$export$2881499e37b75b9a,{values:[[I.$d2b4bc8c273e7be6$export$24d547caef80ccd1,{slots:c}],[B.$40825cdb76e74f70$export$8e17ddc448e87c1e,{slots:m}]],children:s})},V=s=>{const{granularity:o="day",hideTimeZone:t,hourCycle:i}=s,p=k.useSlotRecipe({recipe:q.dateRangePickerSlotRecipe}),[r,x]=p.splitVariantProps(s),[l,u]=w.extractStyleProps(x),{size:d="md"}=r,c=d==="md"?"xs":"2xs",m=o==="day"?s.shouldCloseOnSelect:!1;return e.jsx(G,{...r,...l,asChild:!0,children:e.jsx(j.$06d5b8ec9ee5d538$export$17334619f3ac2224,{...u,shouldCloseOnSelect:m,children:e.jsxs(N,{children:[e.jsx(A,{asChild:!0,children:e.jsxs(E.$a049562f99e7db0e$export$eb2fcfdbd7ba97d4,{children:[e.jsx(D.DateInput,{slot:"start",size:d,variant:"plain",width:"auto",hideTimeZone:t,hourCycle:i}),e.jsx(S.Text,{as:"span",px:"150",color:"neutral.11",userSelect:"none","aria-hidden":"true",slot:null,children:"–"}),e.jsx(D.DateInput,{slot:"end",size:d,variant:"plain",width:"auto",hideTimeZone:t,hourCycle:i}),e.jsxs(O,{children:[e.jsx(C.IconButton,{tone:"primary",variant:"ghost",size:c,slot:"clear",children:e.jsx(R.Close,{})}),e.jsx(C.IconButton,{tone:"primary",variant:"ghost",size:c,slot:"calendarToggle",children:e.jsx(R.CalendarMonth,{})})]})]})}),e.jsx(H,{asChild:!0,children:e.jsx(P.$07b14b47974efb58$export$5b6b19405a83ff9d,{placement:"bottom end",children:e.jsxs(P.$de32f1b87079253c$export$3ddf2d174ce01153,{children:[e.jsx(L,{children:e.jsx(z.RangeCalendar,{})}),e.jsx(M,{hideTimeZone:t,hourCycle:i})]})})})]})})})};V.displayName="DateRangePicker";exports.DateRangePicker=V;
2
+ //# sourceMappingURL=date-range-picker-CgL8fH17.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date-range-picker-CgL8fH17.cjs.js","sources":["../../src/components/date-range-picker/date-range-picker.slots.tsx","../../src/components/date-range-picker/components/date-range-picker.time-input.tsx","../../src/components/date-range-picker/components/date-range-picker.custom-context.tsx","../../src/components/date-range-picker/date-range-picker.tsx"],"sourcesContent":["import {\n type HTMLChakraProps,\n type RecipeProps,\n type UnstyledProp,\n createSlotRecipeContext,\n} from \"@chakra-ui/react/styled-system\";\n\nimport { dateRangePickerSlotRecipe } from \"./date-range-picker.recipe\";\n\n/**\n * Base recipe props interface that combines Chakra UI's recipe props\n * with the unstyled prop option for the div element.\n */\ninterface DateRangePickerRecipeProps extends RecipeProps<\"div\">, 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 */\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface DateRangePickerRootProps\n extends HTMLChakraProps<\"div\", DateRangePickerRecipeProps> {}\n\n// Correctly destructure from createSlotRecipeContext based on project examples\nconst { withProvider, withContext } = createSlotRecipeContext({\n recipe: dateRangePickerSlotRecipe,\n});\n\n/**\n * Root component that provides the styling context for the DateRangePicker component.\n * Uses Chakra UI's recipe context system for consistent styling across instances.\n */\nexport const DateRangePickerRootSlot = withProvider<\n HTMLDivElement,\n DateRangePickerRootProps\n>(\"div\", \"root\");\n\n/**\n * Slot component for the input group containing the DateInput and trigger button.\n */\nexport const DateRangePickerGroupSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"group\");\n\n/**\n * Slot component for the trigger button that opens the calendar popover.\n */\nexport const DateRangePickerTriggerSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"trigger\");\n\n/**\n * Slot component for the popover container.\n */\nexport const DateRangePickerPopoverSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"popover\");\n\n/**\n * Slot component for the calendar container within the popover.\n */\nexport const DateRangePickerCalendarSlot = withContext<\n HTMLDivElement,\n HTMLChakraProps<\"div\">\n>(\"div\", \"calendar\");\n\n/**\n * Slot component for the calendar header.\n */\nexport const DateRangePickerCalendarHeaderSlot = withContext<\n HTMLElement,\n HTMLChakraProps<\"header\">\n>(\"header\", \"calendarHeader\");\n\n/**\n * Slot component for the calendar grid.\n */\nexport const DateRangePickerCalendarGridSlot = withContext<\n HTMLTableElement,\n HTMLChakraProps<\"table\">\n>(\"table\", \"calendarGrid\");\n\n/**\n * Slot component for individual calendar cells.\n */\nexport const DateRangePickerCalendarCellSlot = withContext<\n HTMLTableCellElement,\n HTMLChakraProps<\"td\">\n>(\"td\", \"calendarCell\");\n","import { Flex, Text, TimeInput } from \"@/components\";\nimport { useContext, useRef, useEffect } from \"react\";\nimport { useLocale } from \"react-aria\";\nimport { DateRangePickerStateContext } from \"react-aria-components\";\nimport type { DateRangePickerTimeInputProps } from \"../date-range-picker.types\";\n\nexport const DateRangePickerTimeInput = ({\n hideTimeZone,\n hourCycle,\n}: DateRangePickerTimeInputProps) => {\n const { locale } = useLocale();\n const dateRangePickerState = useContext(DateRangePickerStateContext);\n const { granularity, value } = dateRangePickerState!;\n const timeInputRef = useRef<HTMLDivElement>(null);\n const previousValueRef = useRef(value);\n\n // do not show up to the party if you're not invited\n if (granularity === \"day\") {\n return null;\n }\n\n // Focus the time input when date range changes (user selects dates from calendar)\n useEffect(() => {\n let timeoutId: NodeJS.Timeout | undefined;\n\n // Check if date range changed by comparing start and end dates\n const hasValueChanged =\n (value?.start &&\n previousValueRef.current?.start?.compare(value.start) !== 0) ||\n (value?.end && previousValueRef.current?.end?.compare(value.end) !== 0);\n\n if (hasValueChanged) {\n // Only auto-focus if no time input segment currently has focus\n // This prevents stealing focus during user interaction with time segments\n const container = timeInputRef.current;\n const activeElement = document.activeElement;\n const hasTimeSegmentFocus =\n container?.contains(activeElement) &&\n activeElement?.getAttribute(\"role\") === \"spinbutton\";\n\n if (!hasTimeSegmentFocus) {\n // Small delay to ensure the DOM is ready\n timeoutId = setTimeout(() => {\n // Find the first focusable segment within the time input container\n if (container) {\n const firstSegment = container.querySelector(\n '[role=\"spinbutton\"]'\n ) as HTMLElement;\n\n if (firstSegment) {\n firstSegment.focus();\n }\n }\n }, 50);\n }\n }\n\n previousValueRef.current = value;\n\n // Cleanup timeout on effect re-run or unmount to prevent memory leaks\n return () => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n };\n }, [value]);\n\n return (\n <Flex\n ref={timeInputRef}\n borderTop=\"solid-25\"\n borderColor=\"neutral.3\"\n py=\"300\"\n px=\"400\"\n alignItems=\"center\"\n justifyContent=\"center\"\n gap=\"200\"\n >\n {/* Start DateInput with separate label */}\n <Flex alignItems=\"center\" gap=\"200\">\n {/* TODO: translate hardcoded string */}\n <Text\n textStyle=\"xs\"\n fontWeight=\"500\"\n color=\"neutral.12\"\n minWidth=\"fit-content\"\n >\n Start time\n </Text>\n <TimeInput\n slot=\"startTimeInput\"\n locale={locale}\n variant=\"ghost\"\n size=\"sm\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n </Flex>\n\n {/* End DateInput with separate label */}\n <Flex alignItems=\"center\" gap=\"200\">\n {/* TODO: translate hardcoded string */}\n <Text\n textStyle=\"xs\"\n fontWeight=\"500\"\n color=\"neutral.12\"\n minWidth=\"fit-content\"\n >\n End time\n </Text>\n <TimeInput\n slot=\"endTimeInput\"\n locale={locale}\n variant=\"ghost\"\n size=\"sm\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n </Flex>\n </Flex>\n );\n};\n","import { useContext, type ReactNode } from \"react\";\nimport {\n Provider,\n ButtonContext,\n DateRangePickerStateContext,\n TimeFieldContext,\n useSlottedContext,\n} from \"react-aria-components\";\nimport type { PressEvent, TimeValue } from \"react-aria\";\n\nexport const DateRangePickerCustomContext = ({\n children,\n}: {\n children: ReactNode;\n}) => {\n const buttonContext = useSlottedContext(ButtonContext) || {};\n const dateRangePickerState = useContext(DateRangePickerStateContext);\n\n // Check if all 6 segments (start: day, month, year; end: day, month, year) have values\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const hasCompleteRangeDate = (date: any) =>\n date?.day && date?.month && date?.year;\n\n const incompleteValue =\n !dateRangePickerState?.value ||\n !hasCompleteRangeDate(dateRangePickerState.value.start) ||\n !hasCompleteRangeDate(dateRangePickerState.value.end);\n\n const { granularity } = dateRangePickerState!;\n\n // Extract time values from start and end dates separately\n const startTimeValue =\n dateRangePickerState?.value?.start &&\n \"hour\" in dateRangePickerState.value.start\n ? dateRangePickerState.value.start\n : null;\n const endTimeValue =\n dateRangePickerState?.value?.end && \"hour\" in dateRangePickerState.value.end\n ? dateRangePickerState.value.end\n : null;\n\n // Try to get disabled state from the button context\n const isDateRangePickerDisabled = buttonContext?.isDisabled;\n\n // Generate default aria-label based on granularity if not provided\n const getDefaultTimeInputAriaLabel = (type: \"start\" | \"end\") => {\n const prefix = type === \"start\" ? \"Start\" : \"End\";\n switch (granularity) {\n case \"hour\":\n return `${prefix} time (hour)`;\n case \"minute\":\n return `${prefix} time (hour and minute)`;\n case \"second\":\n return `${prefix} time (hour, minute, and second)`;\n default:\n return `${prefix} time`;\n }\n };\n\n /**\n * Button slots\n * ================================\n */\n const buttonSlots = {\n /** toggles the calendar popover */\n calendarToggle: {\n ...buttonContext,\n onPress: (event: PressEvent) => {\n // Ensure any active input (e.g., date picker segment) loses focus\n // because blurring the input will close the popover if it's open (or was just opened)\n const activeElement = document?.activeElement as HTMLElement | null;\n\n if (activeElement) {\n activeElement.blur();\n }\n\n buttonContext.onPress?.(event);\n },\n },\n /** Clear button that displays when there's a value in each segment - hidden from both visual and screen readers when there's no value */\n clear: {\n // Clear both start and end values\n onPress: () => dateRangePickerState?.setValue(null),\n \"aria-label\": \"Clear input value\",\n isDisabled: isDateRangePickerDisabled,\n // Hide the button when there's no value\n style: incompleteValue ? { display: \"none\" } : undefined,\n \"aria-hidden\": incompleteValue ? true : undefined,\n },\n };\n\n /**\n * TimeInput slots\n * ================================\n */\n\n // Separate time input slots for start and end times\n const timeInputSlots = {\n startTimeInput: {\n value: startTimeValue,\n onChange: (value: TimeValue | null) => {\n if (value !== null && dateRangePickerState?.value?.start) {\n // Update the start date with the new time\n const currentValue = dateRangePickerState.value;\n const startDate = currentValue.start;\n const endDate = currentValue.end;\n if (startDate && endDate) {\n const newStartDate = startDate.set({\n hour: value.hour,\n minute: value.minute || 0,\n second: value.second || 0,\n millisecond: value.millisecond || 0,\n });\n\n dateRangePickerState.setValue({\n start: newStartDate,\n end: endDate,\n });\n }\n }\n },\n granularity: granularity === \"day\" ? undefined : granularity,\n \"aria-label\": getDefaultTimeInputAriaLabel(\"start\"),\n },\n endTimeInput: {\n value: endTimeValue,\n onChange: (value: TimeValue | null) => {\n if (value !== null && dateRangePickerState?.value?.end) {\n // Update the end date with the new time\n const currentValue = dateRangePickerState.value;\n const startDate = currentValue.start;\n const endDate = currentValue.end;\n if (startDate && endDate) {\n const newEndDate = endDate.set({\n hour: value.hour,\n minute: value.minute || 0,\n second: value.second || 0,\n millisecond: value.millisecond || 0,\n });\n\n dateRangePickerState.setValue({\n start: startDate,\n end: newEndDate,\n });\n }\n }\n },\n granularity: granularity === \"day\" ? undefined : granularity,\n \"aria-label\": getDefaultTimeInputAriaLabel(\"end\"),\n },\n };\n\n return (\n <Provider\n values={[\n [\n ButtonContext,\n {\n slots: buttonSlots,\n },\n ],\n [TimeFieldContext, { slots: timeInputSlots }],\n ]}\n >\n {children}\n </Provider>\n );\n};\n","import {\n DateRangePickerRootSlot,\n DateRangePickerGroupSlot,\n DateRangePickerTriggerSlot,\n DateRangePickerPopoverSlot,\n DateRangePickerCalendarSlot,\n} from \"./date-range-picker.slots\";\n\nimport { CalendarMonth, Close } from \"@commercetools/nimbus-icons\";\n\nimport {\n DateRangePicker as ReactAriaDateRangePicker,\n Group,\n Popover,\n Dialog,\n} from \"react-aria-components\";\nimport { useSlotRecipe } from \"@chakra-ui/react/styled-system\";\nimport { dateRangePickerSlotRecipe } from \"./date-range-picker.recipe\";\nimport type { DateRangePickerProps } from \"./date-range-picker.types\";\nimport { extractStyleProps } from \"@/utils/extractStyleProps\";\nimport { DateInput, RangeCalendar, IconButton, Text } from \"@/components\";\nimport { DateRangePickerTimeInput } from \"./components/date-range-picker.time-input\";\nimport { DateRangePickerCustomContext } from \"./components/date-range-picker.custom-context\";\n\n/**\n * DateRangePicker\n * ============================================================\n * Combines a DateInput with a RangeCalendar popover for date range selection.\n * Users can either type a date range directly or select from the calendar.\n */\nexport const DateRangePicker = (props: DateRangePickerProps) => {\n // Forward hideTimeZone and hourCycle to child components (footer time inputs)\n const { granularity = \"day\", hideTimeZone, hourCycle } = props;\n const recipe = useSlotRecipe({ recipe: dateRangePickerSlotRecipe });\n const [recipeProps, remainingProps] = recipe.splitVariantProps(props);\n\n const [styleProps, otherProps] = extractStyleProps(remainingProps);\n\n // Extract size and variant from recipe props to pass to DateInputs\n const { size = \"md\" } = recipeProps;\n\n // the size of the buttons overlaying the input\n const overlayButtonSize = size === \"md\" ? \"xs\" : \"2xs\";\n\n // When granularity is \"day\", use the prop value (defaults to true if not provided)\n // For other granularities (time-based), force to false so users can set both date and time\n const shouldCloseOnSelect =\n granularity === \"day\" ? props.shouldCloseOnSelect : false;\n\n return (\n <DateRangePickerRootSlot {...recipeProps} {...styleProps} asChild>\n <ReactAriaDateRangePicker\n {...otherProps}\n shouldCloseOnSelect={shouldCloseOnSelect}\n >\n <DateRangePickerCustomContext>\n <DateRangePickerGroupSlot asChild>\n <Group>\n <DateInput\n slot=\"start\"\n size={size}\n variant=\"plain\"\n width=\"auto\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n <Text\n as=\"span\"\n px=\"150\"\n color=\"neutral.11\"\n userSelect=\"none\"\n aria-hidden=\"true\"\n slot={null}\n >\n –\n </Text>\n <DateInput\n slot=\"end\"\n size={size}\n variant=\"plain\"\n width=\"auto\"\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n <DateRangePickerTriggerSlot>\n {/* @ts-expect-error react aria is adding the aria-label prop */}\n <IconButton\n tone=\"primary\"\n variant=\"ghost\"\n size={overlayButtonSize}\n slot=\"clear\"\n >\n <Close />\n </IconButton>\n {/* @ts-expect-error react aria is adding the aria-label prop */}\n <IconButton\n tone=\"primary\"\n variant=\"ghost\"\n size={overlayButtonSize}\n slot=\"calendarToggle\"\n >\n <CalendarMonth />\n </IconButton>\n </DateRangePickerTriggerSlot>\n </Group>\n </DateRangePickerGroupSlot>\n <DateRangePickerPopoverSlot asChild>\n <Popover placement=\"bottom end\">\n <Dialog>\n <DateRangePickerCalendarSlot>\n <RangeCalendar />\n </DateRangePickerCalendarSlot>\n <DateRangePickerTimeInput\n hideTimeZone={hideTimeZone}\n hourCycle={hourCycle}\n />\n </Dialog>\n </Popover>\n </DateRangePickerPopoverSlot>\n </DateRangePickerCustomContext>\n </ReactAriaDateRangePicker>\n </DateRangePickerRootSlot>\n );\n};\n\nDateRangePicker.displayName = \"DateRangePicker\";\n"],"names":["withProvider","withContext","createSlotRecipeContext","dateRangePickerSlotRecipe","DateRangePickerRootSlot","DateRangePickerGroupSlot","DateRangePickerTriggerSlot","DateRangePickerPopoverSlot","DateRangePickerCalendarSlot","DateRangePickerTimeInput","hideTimeZone","hourCycle","locale","useLocale","dateRangePickerState","useContext","DateRangePickerStateContext","granularity","value","timeInputRef","useRef","previousValueRef","useEffect","timeoutId","container","activeElement","firstSegment","jsxs","Flex","jsx","Text","TimeInput","DateRangePickerCustomContext","children","buttonContext","useSlottedContext","ButtonContext","hasCompleteRangeDate","date","incompleteValue","startTimeValue","endTimeValue","isDateRangePickerDisabled","getDefaultTimeInputAriaLabel","type","prefix","buttonSlots","event","timeInputSlots","currentValue","startDate","endDate","newStartDate","newEndDate","Provider","TimeFieldContext","DateRangePicker","props","recipe","useSlotRecipe","recipeProps","remainingProps","styleProps","otherProps","extractStyleProps","size","overlayButtonSize","shouldCloseOnSelect","ReactAriaDateRangePicker","Group","DateInput","IconButton","Close","CalendarMonth","Popover","Dialog","RangeCalendar"],"mappings":"mwBAyBM,CAAE,aAAAA,EAAc,YAAAC,CAAA,EAAgBC,0BAAwB,CAC5D,OAAQC,EAAAA,yBACV,CAAC,EAMYC,EAA0BJ,EAGrC,MAAO,MAAM,EAKFK,EAA2BJ,EAGtC,MAAO,OAAO,EAKHK,EAA6BL,EAGxC,MAAO,SAAS,EAKLM,EAA6BN,EAGxC,MAAO,SAAS,EAKLO,EAA8BP,EAGzC,MAAO,UAAU,EC9DNQ,EAA2B,CAAC,CACvC,aAAAC,EACA,UAAAC,CACF,IAAqC,CACnC,KAAM,CAAE,OAAAC,CAAA,EAAWC,4CAAA,EACbC,EAAuBC,EAAAA,WAAWC,2CAA2B,EA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O,EAAAA,cAAA,CAAA,CAAc,CAAA,CAAA,CACjB,CAAA,CACF,CAAA,CAAA,CACF,CAAA,CACF,EACA5C,EAAAA,IAACtB,GAA2B,QAAO,GACjC,eAACmE,EAAAA,0CAAA,CAAQ,UAAU,aACjB,SAAA/C,EAAAA,KAACgD,EAAAA,0CAAA,CACC,SAAA,CAAA9C,EAAAA,IAACrB,EAAA,CACC,SAAAqB,EAAAA,IAAC+C,EAAAA,cAAA,CAAA,CAAc,EACjB,EACA/C,EAAAA,IAACpB,EAAA,CACC,aAAAC,EACA,UAAAC,CAAA,CAAA,CACF,CAAA,CACF,EACF,CAAA,CACF,CAAA,CAAA,CACF,CAAA,CAAA,EAEJ,CAEJ,EAEA6C,EAAgB,YAAc"}
@@ -0,0 +1,2 @@
1
+ "use strict";const C=require("react/jsx-runtime"),p=require("react"),de=require("react-dom"),Nt=require("./create-slot-recipe-context-7JMdJHPF.cjs.js"),wt=require("./factory-DNbWS0Ob.cjs.js");function Ot(e){return e==null?[]:Array.isArray(e)?e:[e]}var Pt=e=>e!=null&&typeof e=="object",ae=e=>typeof e=="string",X=e=>typeof e=="function",Ct=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),xt=e=>Object.prototype.toString.call(e),We=Function.prototype.toString,Tt=We.call(Object),Dt=e=>{if(!Pt(e)||xt(e)!="[object Object]"||Rt(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const r=Ct(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&We.call(r)==Tt},kt=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,Ft=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,Rt=e=>kt(e)||Ft(e),St=e=>e(),Ee=(...e)=>(...t)=>{e.forEach(function(r){r?.(...t)})};function Ue(e){if(!Dt(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(n=>typeof n=="string"),r={};for(const n of t){const o=e[n];o!==void 0&&(r[n]=Ue(o))}return r}function Ne(...e){const t=e.length===1?e[0]:e[1];(e.length===2?e[0]:!0)&&process.env.NODE_ENV!=="production"&&console.warn(t)}function At(e,t){if(e==null)throw new Error(t())}var Ke=()=>{},fe=e=>typeof e=="object"&&e!==null,It=1,Lt=9,Bt=11,D=e=>fe(e)&&e.nodeType===It&&typeof e.nodeName=="string",xe=e=>fe(e)&&e.nodeType===Lt,Mt=e=>fe(e)&&e===e.window,qe=e=>D(e)?e.localName||"":"#document";function $t(e){return["html","body","#document"].includes(qe(e))}var jt=e=>fe(e)&&e.nodeType!==void 0,Y=e=>jt(e)&&e.nodeType===Bt&&"host"in e,Gt=e=>D(e)&&e.localName==="input",_t=e=>D(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1,Vt=/(textarea|select)/;function Wt(e){if(e==null||!D(e))return!1;try{return Gt(e)&&e.selectionStart!=null||Vt.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch{return!1}}function ce(e,t){if(!e||!t||!D(e)||!D(t))return!1;const r=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(r&&Y(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function $(e){return xe(e)?e:Mt(e)?e.document:e?.ownerDocument??document}function Ut(e){return $(e).documentElement}function pe(e){return Y(e)?pe(e.host):xe(e)?e.defaultView??window:D(e)?e.ownerDocument?.defaultView??window:window}function He(e){let t=e.activeElement;for(;t?.shadowRoot;){const r=t.shadowRoot.activeElement;if(r===t)break;t=r}return t}function Kt(e){if(qe(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Y(e)&&e.host||Ut(e);return Y(t)?t.host:t}var ge=new WeakMap;function ze(e){return ge.has(e)||ge.set(e,pe(e).getComputedStyle(e)),ge.get(e)}var Xe=()=>typeof document<"u";function qt(){return navigator.userAgentData?.platform??navigator.platform}var Te=e=>Xe()&&e.test(qt()),Se=()=>Xe()&&!!navigator.maxTouchPoints,Ht=()=>Te(/^iPhone/i),zt=()=>Te(/^iPad/i)||Ye()&&navigator.maxTouchPoints>1,Xt=()=>Ht()||zt(),Ye=()=>Te(/^Mac/i);function Yt(e){return e.composedPath?.()??e.nativeEvent?.composedPath?.()}function B(e){return Yt(e)?.[0]??e.target}var Zt=e=>e.button===2||Ye()&&e.ctrlKey&&e.button===0,I=(e,t,r,n)=>{const o=typeof e=="function"?e():e;return o?.addEventListener(t,r,n),()=>{o?.removeEventListener(t,r,n)}},Ze=e=>D(e)&&e.tagName==="IFRAME",Jt=e=>!Number.isNaN(parseInt(e.getAttribute("tabindex")||"0",10)),Qt=e=>parseInt(e.getAttribute("tabindex")||"0",10)<0,De="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type",Je=(e,t=!1)=>{if(!e)return[];const r=Array.from(e.querySelectorAll(De));(t==!0||t=="if-empty"&&r.length===0)&&D(e)&&_(e)&&r.unshift(e);const o=r.filter(_);return o.forEach((s,i)=>{if(Ze(s)&&s.contentDocument){const a=s.contentDocument.body;o.splice(i,1,...Je(a))}}),o};function _(e){return!e||e.closest("[inert]")?!1:e.matches(De)&&_t(e)}function Qe(e,t){if(!e)return[];const n=Array.from(e.querySelectorAll(De)).filter(U);return n.forEach((o,s)=>{if(Ze(o)&&o.contentDocument){const i=o.contentDocument.body,a=Qe(i);n.splice(s,1,...a)}}),n.length,n}function U(e){return e!=null&&e.tabIndex>0?!0:_(e)&&!Qt(e)}function J(e){return e.tabIndex<0&&(/^(audio|video|details)$/.test(e.localName)||Wt(e))&&!Jt(e)?0:e.tabIndex}function en(e){const t=new Set;function r(n){const o=globalThis.requestAnimationFrame(n);t.add(()=>globalThis.cancelAnimationFrame(o))}return r(()=>r(e)),function(){t.forEach(o=>o())}}function M(e){let t;const r=globalThis.requestAnimationFrame(()=>{t=e()});return()=>{globalThis.cancelAnimationFrame(r),t?.()}}function we(e){const t=Kt(e);return $t(t)?$(t).body:D(t)&&rn(t)?t:we(t)}var tn=/auto|scroll|overlay|hidden|clip/,nn=new Set(["inline","contents"]);function rn(e){const t=pe(e),{overflow:r,overflowX:n,overflowY:o,display:s}=t.getComputedStyle(e);return tn.test(r+o+n)&&!nn.has(s)}function ue(e,t){if(!e)return Ke;const r=Object.keys(t).reduce((n,o)=>(n[o]=e.style.getPropertyValue(o),n),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,r),e.style.length===0&&e.removeAttribute("style")}}function on(e,t,r){if(!e)return Ke;const n=e.style.getPropertyValue(t);return e.style.setProperty(t,r),()=>{e.style.setProperty(t,n),e.style.length===0&&e.removeAttribute("style")}}var sn=1e3/60;function an(e,t){const r=e();if(D(r)&&r.isConnected)return t(r),()=>{};{const n=setInterval(()=>{const o=e();D(o)&&o.isConnected&&(t(o),clearInterval(n))},sn);return()=>clearInterval(n)}}function cn(e,t){const r=[];return e?.forEach(n=>{const o=an(n,t);r.push(o)}),()=>{r.forEach(n=>n())}}var un=(...e)=>e.map(t=>t?.trim?.()).filter(Boolean).join(" "),ln=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,Ae=e=>{const t={};let r;for(;r=ln.exec(e);)t[r[1]]=r[2];return t},dn=(e,t)=>{if(ae(e)){if(ae(t))return`${e};${t}`;e=Ae(e)}else ae(t)&&(t=Ae(t));return Object.assign({},e??{},t??{})};function j(...e){let t={};for(let r of e){for(let n in t){if(n.startsWith("on")&&typeof t[n]=="function"&&typeof r[n]=="function"){t[n]=Ee(r[n],t[n]);continue}if(n==="className"||n==="class"){t[n]=un(t[n],r[n]);continue}if(n==="style"){t[n]=dn(t[n],r[n]);continue}t[n]=r[n]!==void 0?r[n]:t[n]}for(let n in r)t[n]===void 0&&(t[n]=r[n])}return t}var z=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(z||{}),me="__init__";function fn(e){const t=()=>e.getRootNode?.()??document,r=()=>$(t()),n=()=>r().defaultView??window,o=()=>He(t());return{...e,getRootNode:t,getDoc:r,getWin:n,getActiveElement:o,isActiveElement:a=>a===o(),getById:a=>t().getElementById(a)}}function pn(e){return new Proxy({},{get(t,r){return r==="style"?n=>e({style:n}).style:e}})}var et=typeof globalThis.document<"u"?p.useLayoutEffect:p.useEffect;function le(e){const t=e().value??e().defaultValue,r=e().isEqual??Object.is,[n]=p.useState(t),[o,s]=p.useState(n),i=e().value!==void 0,a=p.useRef(o);a.current=i?e().value:o;const u=p.useRef(a.current);et(()=>{u.current=a.current},[o,e().value]);const c=g=>{const l=u.current,d=X(g)?g(l):g;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:d,prev:l}),i||s(d),r(d,l)||e().onChange?.(d,l)};function f(){return i?e().value:o}return{initial:n,ref:a,get:f,set(g){(e().sync?de.flushSync:St)(()=>c(g))},invoke(g,l){e().onChange?.(g,l)},hash(g){return e().hash?.(g)??String(g)}}}le.cleanup=e=>{p.useEffect(()=>e,[])};le.ref=e=>{const t=p.useRef(e);return{get:()=>t.current,set:r=>{t.current=r}}};function hn(e){const t=p.useRef(e);return{get(r){return t.current[r]},set(r,n){t.current[r]=n}}}var gn=(e,t)=>{const r=p.useRef(!1),n=p.useRef(!1);p.useEffect(()=>{if(r.current&&n.current)return t();n.current=!0},[...(e??[]).map(o=>typeof o=="function"?o():o)]),p.useEffect(()=>(r.current=!0,()=>{r.current=!1}),[])};function tt(e,t={}){const r=p.useMemo(()=>{const{id:h,ids:m,getRootNode:P}=t;return fn({id:h,ids:m,getRootNode:P})},[t]),n=(...h)=>{e.debug&&console.log(...h)},o=e.props?.({props:Ue(t),scope:r})??t,s=mn(o),i=e.context?.({prop:s,bindable:le,scope:r,flush:Ie,getContext(){return u},getComputed(){return S},getRefs(){return b},getEvent(){return d()}}),a=nt(i),u={get(h){return a.current?.[h].ref.current},set(h,m){a.current?.[h].set(m)},initial(h){return a.current?.[h].initial},hash(h){const m=a.current?.[h].get();return a.current?.[h].hash(m)}},c=p.useRef(new Map),f=p.useRef(null),g=p.useRef(null),l=p.useRef({type:""}),d=()=>({...l.current,current(){return l.current},previous(){return g.current}}),v=()=>({...O,matches(...h){return h.includes(O.ref.current)},hasTag(h){return!!e.states[O.ref.current]?.tags?.includes(h)}}),b=hn(e.refs?.({prop:s,context:u})??{}),x=()=>({state:v(),context:u,event:d(),prop:s,send:Re,action:E,guard:w,track:gn,refs:b,computed:S,flush:Ie,scope:r,choose:T}),E=h=>{const m=X(h)?h(x()):h;if(!m)return;const P=m.map(N=>{const F=e.implementations?.actions?.[N];return F||Ne(`[zag-js] No implementation found for action "${JSON.stringify(N)}"`),F});for(const N of P)N?.(x())},w=h=>X(h)?h(x()):e.implementations?.guards?.[h](x()),k=h=>{const m=X(h)?h(x()):h;if(!m)return;const P=m.map(F=>{const G=e.implementations?.effects?.[F];return G||Ne(`[zag-js] No implementation found for effect "${JSON.stringify(F)}"`),G}),N=[];for(const F of P){const G=F?.(x());G&&N.push(G)}return()=>N.forEach(F=>F?.())},T=h=>Ot(h).find(m=>{let P=!m.guard;return ae(m.guard)?P=!!w(m.guard):X(m.guard)&&(P=m.guard(x())),P}),S=h=>{At(e.computed,()=>"[zag-js] No computed object found on machine");const m=e.computed[h];return m({context:u,event:d(),prop:s,refs:b,scope:r,computed:S})},O=le(()=>({defaultValue:e.initialState({prop:s}),onChange(h,m){m&&(c.current.get(m)?.(),c.current.delete(m)),m&&E(e.states[m]?.exit),E(f.current?.actions);const P=k(e.states[h]?.effects);if(P&&c.current.set(h,P),m===me){E(e.entry);const N=k(e.effects);N&&c.current.set(me,N)}E(e.states[h]?.entry)}})),Z=p.useRef(void 0),A=p.useRef(z.NotStarted);et(()=>{queueMicrotask(()=>{const P=A.current===z.Started;A.current=z.Started,n(P?"rehydrating...":"initializing...");const N=Z.current??O.initial;O.invoke(N,P?O.get():me)});const h=c.current,m=O.ref.current;return()=>{n("unmounting..."),Z.current=m,A.current=z.Stopped,h.forEach(P=>P?.()),c.current=new Map,f.current=null,queueMicrotask(()=>{E(e.exit)})}},[]);const he=()=>"ref"in O?O.ref.current:O.get(),Re=h=>{queueMicrotask(()=>{if(A.current!==z.Started)return;g.current=l.current,l.current=h,n("send",h);let m=he();const P=e.states[m].on?.[h.type]??e.on?.[h.type],N=T(P);if(!N)return;f.current=N;const F=N.target??m;n("transition",N);const G=F!==m;G?de.flushSync(()=>O.set(F)):N.reenter&&!G?O.invoke(m,m):E(N.actions??[])})};return e.watch?.(x()),{state:v(),send:Re,context:u,prop:s,scope:r,refs:b,computed:S,event:d(),getStatus:()=>A.current}}function nt(e){const t=p.useRef(e);return t.current=e,t}function mn(e){const t=nt(e);return function(n){return t.current[n]}}function Ie(e){queueMicrotask(()=>{de.flushSync(()=>e())})}var vn=pn(e=>e);function ke(...e){return t=>{const r=[];for(const n of e)if(typeof n=="function"){const o=n(t);typeof o=="function"&&r.push(o)}else n&&(n.current=t);if(r.length)return()=>{for(const n of r)n()}}}function yn(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function ne(e={}){const{name:t,strict:r=!0,hookName:n="useContext",providerName:o="Provider",errorMessage:s,defaultValue:i}=e,a=p.createContext(i);a.displayName=t;function u(){const c=p.useContext(a);if(!c&&r){const f=new Error(s??yn(n,o));throw f.name="ContextError",Error.captureStackTrace?.(f,u),f}return c}return[a.Provider,u,a]}const rt=()=>(e,t)=>t.reduce((r,n)=>{const[o,s]=r,i=n;return s[i]!==void 0&&(o[i]=s[i]),delete s[i],[o,s]},[{},{...e}]),[bn,En]=ne({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),Nn=e=>rt()(e,["lazyMount","unmountOnExit"]);function wn(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}const ve=e=>{const t=p.memo(p.forwardRef((r,n)=>{const{asChild:o,children:s,...i}=r;if(!o)return p.createElement(e,{...i,ref:n},s);const a=p.Children.only(s);if(!p.isValidElement(a))return null;const u=wn(a);return p.cloneElement(a,{...j(i,a.props),ref:n?ke(n,u):u})}));return t.displayName=e.displayName||e.name,t},On=()=>{const e=new Map;return new Proxy(ve,{apply(t,r,n){return ve(n[0])},get(t,r){const n=r;return e.has(n)||e.set(n,ve(n)),e.get(n)}})},K=On();function Pn(e,t){const{state:r,send:n,context:o}=e,s=r.matches("mounted","unmountSuspended");return{skip:!o.get("initial"),present:s,setNode(i){i&&n({type:"NODE.SET",node:i})},unmount(){n({type:"UNMOUNT"})}}}var Cn={props({props:e}){return{...e,present:!!e.present}},initialState({prop:e}){return e("present")?"mounted":"unmounted"},refs(){return{node:null,styles:null}},context({bindable:e}){return{unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}},exit:["clearInitial","cleanupNode"],watch({track:e,action:t,prop:r}){e([()=>r("present")],()=>{t(["setInitial","syncPresence"])})},on:{"NODE.SET":{actions:["setNode","setStyles"]}},states:{mounted:{on:{UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]},"UNMOUNT.SUSPEND":{target:"unmountSuspended"}}},unmountSuspended:{effects:["trackAnimationEvents"],on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]},UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]}}},unmounted:{on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get("initial")||queueMicrotask(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},cleanupNode:({refs:e})=>{e.set("node",null),e.set("styles",null)},invokeOnExitComplete:({prop:e})=>{e("onExitComplete")?.()},setNode:({refs:e,event:t})=>{e.set("node",t.node)},setStyles:({refs:e,event:t})=>{e.set("styles",ze(t.node))},syncPresence:({context:e,refs:t,send:r,prop:n})=>{const o=n("present");if(o)return r({type:"MOUNT",src:"presence.changed"});const s=t.get("node");if(!o&&s?.ownerDocument.visibilityState==="hidden")return r({type:"UNMOUNT",src:"visibilitychange"});M(()=>{const i=re(t.get("styles"));e.set("unmountAnimationName",i),i==="none"||i===e.get("prevAnimationName")||t.get("styles")?.display==="none"||t.get("styles")?.animationDuration==="0s"?r({type:"UNMOUNT",src:"presence.changed"}):r({type:"UNMOUNT.SUSPEND"})})},setPrevAnimationName:({context:e,refs:t})=>{M(()=>{e.set("prevAnimationName",re(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:r})=>{const n=t.get("node");if(!n)return;const o=a=>{(a.composedPath?.()?.[0]??a.target)===n&&e.set("prevAnimationName",re(t.get("styles")))},s=a=>{const u=re(t.get("styles"));B(a)===n&&u===e.get("unmountAnimationName")&&r({type:"UNMOUNT",src:"animationend"})};n.addEventListener("animationstart",o),n.addEventListener("animationcancel",s),n.addEventListener("animationend",s);const i=ue(n,{animationFillMode:"forwards"});return()=>{n.removeEventListener("animationstart",o),n.removeEventListener("animationcancel",s),n.removeEventListener("animationend",s),en(()=>i())}}}}};function re(e){return e?.animationName||"none"}function xn(e,t={}){const{sync:r=!1}=t,n=Tn(e);return p.useCallback((...o)=>r?queueMicrotask(()=>n.current?.(...o)):n.current?.(...o),[r,n])}function Tn(e){const t=p.useRef(e);return t.current=e,t}const ot=(e={})=>{const{lazyMount:t,unmountOnExit:r,present:n,skipAnimationOnMount:o=!1,...s}=e,i=p.useRef(!1),a={...s,present:n,onExitComplete:xn(e.onExitComplete)},u=tt(Cn,a),c=Pn(u);c.present&&(i.current=!0);const f=!c.present&&!i.current&&t||r&&!c.present&&i.current,g=()=>({"data-state":c.skip&&o?void 0:n?"open":"closed",hidden:!c.present});return{ref:c.setNode,getPresenceProps:g,present:c.present,unmounted:f}},[Dn,V]=ne({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),st=p.forwardRef((e,t)=>{const r=V(),n=En(),o=ot({...n,present:r.open}),s=j(r.getBackdropProps(),o.getPresenceProps(),e);return o.unmounted?null:C.jsx(K.div,{...s,ref:ke(o.ref,t)})});st.displayName="DialogBackdrop";const it=p.forwardRef((e,t)=>{const r=V(),n=j(r.getCloseTriggerProps(),e);return C.jsx(K.button,{...n,ref:t})});it.displayName="DialogCloseTrigger";const[kn,Fe]=ne({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),at=p.forwardRef((e,t)=>{const r=V(),n=Fe(),o=j(r.getContentProps(),n.getPresenceProps(),e);return n.unmounted?null:C.jsx(K.div,{...o,ref:ke(n.ref,t)})});at.displayName="DialogContent";const ct=p.forwardRef((e,t)=>{const r=V(),n=j(r.getDescriptionProps(),e);return C.jsx(K.div,{...n,ref:t})});ct.displayName="DialogDescription";const ut=p.forwardRef((e,t)=>{const r=V(),n=j(r.getPositionerProps(),e);return Fe().unmounted?null:C.jsx(K.div,{...n,ref:t})});ut.displayName="DialogPositioner";const Fn=e=>rt()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);var te=(e,t=[])=>({parts:(...r)=>{if(Rn(t))return te(e,r);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...r)=>te(e,[...t,...r]),omit:(...r)=>te(e,t.filter(n=>!r.includes(n))),rename:r=>te(r,t),keys:()=>t,build:()=>[...new Set(t)].reduce((r,n)=>Object.assign(r,{[n]:{selector:[`&[data-scope="${q(e)}"][data-part="${q(n)}"]`,`& [data-scope="${q(e)}"][data-part="${q(n)}"]`].join(", "),attrs:{"data-scope":q(e),"data-part":q(n)}}}),{})}),q=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),Rn=e=>e.length===0,H=new WeakMap,oe=new WeakMap,se={},ye=0,lt=e=>e&&(e.host||lt(e.parentNode)),Sn=(e,t)=>t.map(r=>{if(e.contains(r))return r;const n=lt(r);return n&&e.contains(n)?n:(console.error("[zag-js > ariaHidden] target",r,"in not contained inside",e,". Doing nothing"),null)}).filter(r=>!!r),An=new Set(["script","output","status","next-route-announcer"]),In=e=>An.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),Ln=(e,t)=>{const{parentNode:r,markerName:n,controlAttribute:o}=t,s=Sn(r,Array.isArray(e)?e:[e]);se[n]||(se[n]=new WeakMap);const i=se[n],a=[],u=new Set,c=new Set(s),f=l=>{!l||u.has(l)||(u.add(l),f(l.parentNode))};s.forEach(f);const g=l=>{!l||c.has(l)||Array.prototype.forEach.call(l.children,d=>{if(u.has(d))g(d);else try{if(In(d))return;const b=d.getAttribute(o)==="true",x=(H.get(d)||0)+1,E=(i.get(d)||0)+1;H.set(d,x),i.set(d,E),a.push(d),x===1&&b&&oe.set(d,!0),E===1&&d.setAttribute(n,""),b||d.setAttribute(o,"true")}catch(v){console.error("[zag-js > ariaHidden] cannot operate on ",d,v)}})};return g(r),u.clear(),ye++,()=>{a.forEach(l=>{const d=H.get(l)-1,v=i.get(l)-1;H.set(l,d),i.set(l,v),d||(oe.has(l)||l.removeAttribute(o),oe.delete(l)),v||l.removeAttribute(n)}),ye--,ye||(H=new WeakMap,H=new WeakMap,oe=new WeakMap,se={})}},Bn=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,Mn=(e,t=Bn(e),r="data-aria-hidden")=>{if(t)return Ln(e,{parentNode:t,markerName:r,controlAttribute:"aria-hidden"})},$n=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function jn(e,t={}){const{defer:r=!0}=t,n=r?$n:s=>s(),o=[];return o.push(n(()=>{const i=(typeof e=="function"?e():e).filter(Boolean);i.length!==0&&o.push(Mn(i))})),()=>{o.forEach(s=>s?.())}}function Gn(e){const t={each(r){for(let n=0;n<e.frames?.length;n+=1){const o=e.frames[n];o&&r(o)}},addEventListener(r,n,o){return t.each(s=>{try{s.document.addEventListener(r,n,o)}catch{}}),()=>{try{t.removeEventListener(r,n,o)}catch{}}},removeEventListener(r,n,o){t.each(s=>{try{s.document.removeEventListener(r,n,o)}catch{}})}};return t}function _n(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(r,n,o)=>{try{t?.addEventListener(r,n,o)}catch{}return()=>{try{t?.removeEventListener(r,n,o)}catch{}}},removeEventListener:(r,n,o)=>{try{t?.removeEventListener(r,n,o)}catch{}}}}var Le="pointerdown.outside",Be="focus.outside";function Vn(e){for(const t of e)if(D(t)&&_(t))return!0;return!1}var dt=e=>"clientY"in e;function Wn(e,t){if(!dt(t)||!e)return!1;const r=e.getBoundingClientRect();return r.width===0||r.height===0?!1:r.top<=t.clientY&&t.clientY<=r.top+r.height&&r.left<=t.clientX&&t.clientX<=r.left+r.width}function Un(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function Me(e,t){if(!t||!dt(e))return!1;const r=t.scrollHeight>t.clientHeight,n=r&&e.clientX>t.offsetLeft+t.clientWidth,o=t.scrollWidth>t.clientWidth,s=o&&e.clientY>t.offsetTop+t.clientHeight,i={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(r?16:0),height:t.clientHeight+(o?16:0)},a={x:e.clientX,y:e.clientY};return Un(i,a)?n||s:!1}function Kn(e,t){const{exclude:r,onFocusOutside:n,onPointerDownOutside:o,onInteractOutside:s,defer:i}=t;if(!e)return;const a=$(e),u=pe(e),c=Gn(u),f=_n(u);function g(w,k){if(!D(k)||!k.isConnected||ce(e,k)||Wn(e,w))return!1;const T=a.querySelector(`[aria-controls="${e.id}"]`);if(T){const O=we(T);if(Me(w,O))return!1}const S=we(e);return Me(w,S)?!1:!r?.(k)}const l=new Set,d=Y(e?.getRootNode());function v(w){function k(T){const S=i&&!Se()?M:A=>A(),O=T??w,Z=O?.composedPath?.()??[O?.target];S(()=>{const A=d?Z[0]:B(w);if(!(!e||!g(w,A))){if(o||s){const he=Ee(o,s);e.addEventListener(Le,he,{once:!0})}$e(e,Le,{bubbles:!1,cancelable:!0,detail:{originalEvent:O,contextmenu:Zt(O),focusable:Vn(Z),target:A}})}})}w.pointerType==="touch"?(l.forEach(T=>T()),l.add(I(a,"click",k,{once:!0})),l.add(f.addEventListener("click",k,{once:!0})),l.add(c.addEventListener("click",k,{once:!0}))):k()}const b=new Set,x=setTimeout(()=>{b.add(I(a,"pointerdown",v,!0)),b.add(f.addEventListener("pointerdown",v,!0)),b.add(c.addEventListener("pointerdown",v,!0))},0);function E(w){(i?M:T=>T())(()=>{const T=B(w);if(!(!e||!g(w,T))){if(n||s){const S=Ee(n,s);e.addEventListener(Be,S,{once:!0})}$e(e,Be,{bubbles:!1,cancelable:!0,detail:{originalEvent:w,contextmenu:!1,focusable:_(T),target:T}})}})}return Se()||(b.add(I(a,"focusin",E,!0)),b.add(f.addEventListener("focusin",E,!0)),b.add(c.addEventListener("focusin",E,!0))),()=>{clearTimeout(x),l.forEach(w=>w()),b.forEach(w=>w())}}function qn(e,t){const{defer:r}=t,n=r?M:s=>s(),o=[];return o.push(n(()=>{const s=typeof e=="function"?e():e;o.push(Kn(s,t))})),()=>{o.forEach(s=>s?.())}}function $e(e,t,r){const n=e.ownerDocument.defaultView||window,o=new n.CustomEvent(t,r);return e.dispatchEvent(o)}function Hn(e,t){const r=n=>{n.key==="Escape"&&(n.isComposing||t?.(n))};return I($(e),"keydown",r,{capture:!0})}var R={layers:[],branches:[],count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(e=>e.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){const t=this.indexOf(e),r=this.topMostPointerBlockingLayer()?this.indexOf(this.topMostPointerBlockingLayer()?.node):-1;return t<r},isTopMost(e){return this.layers[this.count()-1]?.node===e},getNestedLayers(e){return Array.from(this.layers).slice(this.indexOf(e)+1)},isInNestedLayer(e,t){return this.getNestedLayers(e).some(r=>ce(r.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>ce(t,e))},add(e){const t=this.layers.push(e);e.node.style.setProperty("--layer-index",`${t}`)},addBranch(e){this.branches.push(e)},remove(e){const t=this.indexOf(e);t<0||(t<this.count()-1&&this.getNestedLayers(e).forEach(n=>n.dismiss()),this.layers.splice(t,1),e.style.removeProperty("--layer-index"))},removeBranch(e){const t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e){this.layers[this.indexOf(e)]?.dismiss()},clear(){this.remove(this.layers[0].node)}},je;function Ge(){R.layers.forEach(({node:e})=>{e.style.pointerEvents=R.isBelowPointerBlockingLayer(e)?"none":"auto"})}function zn(e){e.style.pointerEvents=""}function Xn(e,t){const r=$(e),n=[];if(R.hasPointerBlockingLayer()&&!r.body.hasAttribute("data-inert")&&(je=document.body.style.pointerEvents,queueMicrotask(()=>{r.body.style.pointerEvents="none",r.body.setAttribute("data-inert","")})),t){const o=cn(t,s=>{n.push(ue(s,{pointerEvents:"auto"}))});n.push(o)}return()=>{R.hasPointerBlockingLayer()||(queueMicrotask(()=>{r.body.style.pointerEvents=je,r.body.removeAttribute("data-inert"),r.body.style.length===0&&r.body.removeAttribute("style")}),n.forEach(o=>o()))}}function Yn(e,t){const{warnOnMissingNode:r=!0}=t;if(r&&!e){Ne("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:n,pointerBlocking:o,exclude:s,debug:i}=t,a={dismiss:n,node:e,pointerBlocking:o};R.add(a),Ge();function u(d){const v=B(d.detail.originalEvent);R.isBelowPointerBlockingLayer(e)||R.isInBranch(v)||(t.onPointerDownOutside?.(d),t.onInteractOutside?.(d),!d.defaultPrevented&&(i&&console.log("onPointerDownOutside:",d.detail.originalEvent),n?.()))}function c(d){const v=B(d.detail.originalEvent);R.isInBranch(v)||(t.onFocusOutside?.(d),t.onInteractOutside?.(d),!d.defaultPrevented&&(i&&console.log("onFocusOutside:",d.detail.originalEvent),n?.()))}function f(d){R.isTopMost(e)&&(t.onEscapeKeyDown?.(d),!d.defaultPrevented&&n&&(d.preventDefault(),n()))}function g(d){if(!e)return!1;const v=typeof s=="function"?s():s,b=Array.isArray(v)?v:[v],x=t.persistentElements?.map(E=>E()).filter(D);return x&&b.push(...x),b.some(E=>ce(E,d))||R.isInNestedLayer(e,d)}const l=[o?Xn(e,t.persistentElements):void 0,Hn(e,f),qn(e,{exclude:g,onFocusOutside:c,onPointerDownOutside:u,defer:t.defer})];return()=>{R.remove(e),Ge(),zn(e),l.forEach(d=>d?.())}}function Zn(e,t){const{defer:r}=t,n=r?M:s=>s(),o=[];return o.push(n(()=>{const s=X(e)?e():e;o.push(Yn(s,t))})),()=>{o.forEach(s=>s?.())}}var Jn=Object.defineProperty,Qn=(e,t,r)=>t in e?Jn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,y=(e,t,r)=>Qn(e,typeof t!="symbol"?t+"":t,r),_e={activateTrap(e,t){if(e.length>0){const n=e[e.length-1];n!==t&&n.pause()}const r=e.indexOf(t);r===-1||e.splice(r,1),e.push(t)},deactivateTrap(e,t){const r=e.indexOf(t);r!==-1&&e.splice(r,1),e.length>0&&e[e.length-1].unpause()}},er=[],tr=class{constructor(e,t){y(this,"trapStack"),y(this,"config"),y(this,"doc"),y(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),y(this,"listenerCleanups",[]),y(this,"handleFocus",n=>{const o=B(n),s=this.findContainerIndex(o,n)>=0;if(s||xe(o))s&&(this.state.mostRecentlyFocusedNode=o);else{n.stopImmediatePropagation();let i,a=!0;if(this.state.mostRecentlyFocusedNode)if(J(this.state.mostRecentlyFocusedNode)>0){const u=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:c}=this.state.containerGroups[u];if(c.length>0){const f=c.findIndex(g=>g===this.state.mostRecentlyFocusedNode);f>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?f+1<c.length&&(i=c[f+1],a=!1):f-1>=0&&(i=c[f-1],a=!1))}}else this.state.containerGroups.some(u=>u.tabbableNodes.some(c=>J(c)>0))||(a=!1);else a=!1;a&&(i=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),i?this.tryFocus(i):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),y(this,"handlePointerDown",n=>{const o=B(n);if(!(this.findContainerIndex(o,n)>=0)){if(ee(this.config.clickOutsideDeactivates,n)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}ee(this.config.allowOutsideClick,n)||n.preventDefault()}}),y(this,"handleClick",n=>{const o=B(n);this.findContainerIndex(o,n)>=0||ee(this.config.clickOutsideDeactivates,n)||ee(this.config.allowOutsideClick,n)||(n.preventDefault(),n.stopImmediatePropagation())}),y(this,"handleTabKey",n=>{if(this.config.isKeyForward(n)||this.config.isKeyBackward(n)){this.state.recentNavEvent=n;const o=this.config.isKeyBackward(n),s=this.findNextNavNode({event:n,isBackward:o});if(!s)return;Q(n)&&n.preventDefault(),this.tryFocus(s)}}),y(this,"handleEscapeKey",n=>{nr(n)&&ee(this.config.escapeDeactivates,n)!==!1&&(n.preventDefault(),this.deactivate())}),y(this,"_mutationObserver"),y(this,"setupMutationObserver",()=>{const n=this.doc.defaultView||window;this._mutationObserver=new n.MutationObserver(o=>{o.some(i=>Array.from(i.removedNodes).some(u=>u===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode())})}),y(this,"updateObservedNodes",()=>{this._mutationObserver?.disconnect(),this.state.active&&!this.state.paused&&this.state.containers.map(n=>{this._mutationObserver?.observe(n,{subtree:!0,childList:!0})})}),y(this,"getInitialFocusNode",()=>{let n=this.getNodeForOption("initialFocus",{hasFallback:!0});if(n===!1)return!1;if(n===void 0||n&&!_(n))if(this.findContainerIndex(this.doc.activeElement)>=0)n=this.doc.activeElement;else{const o=this.state.tabbableGroups[0];n=o&&o.firstTabbableNode||this.getNodeForOption("fallbackFocus")}else n===null&&(n=this.getNodeForOption("fallbackFocus"));if(!n)throw new Error("Your focus-trap needs to have at least one focusable element");return n.isConnected||(n=this.getNodeForOption("fallbackFocus")),n}),y(this,"tryFocus",n=>{if(n!==!1&&n!==He(this.doc)){if(!n||!n.focus){this.tryFocus(this.getInitialFocusNode());return}n.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=n,rr(n)&&n.select()}}),y(this,"deactivate",n=>{if(!this.state.active)return this;const o={onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus,...n};clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),_e.deactivateTrap(this.trapStack,this);const s=this.getOption(o,"onDeactivate"),i=this.getOption(o,"onPostDeactivate"),a=this.getOption(o,"checkCanReturnFocus"),u=this.getOption(o,"returnFocus","returnFocusOnDeactivate");s?.();const c=()=>{Ve(()=>{if(u){const f=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(f)}i?.()})};if(u&&a){const f=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return a(f).then(c,c),this}return c(),this}),y(this,"pause",n=>{if(this.state.paused||!this.state.active)return this;const o=this.getOption(n,"onPause"),s=this.getOption(n,"onPostPause");return this.state.paused=!0,o?.(),this.removeListeners(),this.updateObservedNodes(),s?.(),this}),y(this,"unpause",n=>{if(!this.state.paused||!this.state.active)return this;const o=this.getOption(n,"onUnpause"),s=this.getOption(n,"onPostUnpause");return this.state.paused=!1,o?.(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),s?.(),this}),y(this,"updateContainerElements",n=>(this.state.containers=Array.isArray(n)?n.filter(Boolean):[n].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),y(this,"getReturnFocusNode",n=>{const o=this.getNodeForOption("setReturnFocus",{params:[n]});return o||(o===!1?!1:n)}),y(this,"getOption",(n,o,s)=>n&&n[o]!==void 0?n[o]:this.config[s||o]),y(this,"getNodeForOption",(n,{hasFallback:o=!1,params:s=[]}={})=>{let i=this.config[n];if(typeof i=="function"&&(i=i(...s)),i===!0&&(i=void 0),!i){if(i===void 0||i===!1)return i;throw new Error(`\`${n}\` was specified but was not a node, or did not return a node`)}let a=i;if(typeof i=="string"){try{a=this.doc.querySelector(i)}catch(u){throw new Error(`\`${n}\` appears to be an invalid selector; error="${u.message}"`)}if(!a&&!o)throw new Error(`\`${n}\` as selector refers to no known node`)}return a}),y(this,"findNextNavNode",n=>{const{event:o,isBackward:s=!1}=n,i=n.target||B(o);this.updateTabbableNodes();let a=null;if(this.state.tabbableGroups.length>0){const u=this.findContainerIndex(i,o),c=u>=0?this.state.containerGroups[u]:void 0;if(u<0)s?a=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:a=this.state.tabbableGroups[0].firstTabbableNode;else if(s){let f=this.state.tabbableGroups.findIndex(({firstTabbableNode:g})=>i===g);if(f<0&&(c?.container===i||_(i)&&!U(i)&&!c?.nextTabbableNode(i,!1))&&(f=u),f>=0){const g=f===0?this.state.tabbableGroups.length-1:f-1,l=this.state.tabbableGroups[g];a=J(i)>=0?l.lastTabbableNode:l.lastDomTabbableNode}else Q(o)||(a=c?.nextTabbableNode(i,!1))}else{let f=this.state.tabbableGroups.findIndex(({lastTabbableNode:g})=>i===g);if(f<0&&(c?.container===i||_(i)&&!U(i)&&!c?.nextTabbableNode(i))&&(f=u),f>=0){const g=f===this.state.tabbableGroups.length-1?0:f+1,l=this.state.tabbableGroups[g];a=J(i)>=0?l.firstTabbableNode:l.firstDomTabbableNode}else Q(o)||(a=c?.nextTabbableNode(i))}}else a=this.getNodeForOption("fallbackFocus");return a}),this.trapStack=t.trapStack||er;const r={returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward(n){return Q(n)&&!n.shiftKey},isKeyBackward(n){return Q(n)&&n.shiftKey},...t};this.doc=r.document||$(Array.isArray(e)?e[0]:e),this.config=r,this.updateContainerElements(e),this.setupMutationObserver()}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){const r=typeof t?.composedPath=="function"?t.composedPath():void 0;return this.state.containerGroups.findIndex(({container:n,tabbableNodes:o})=>n.contains(e)||r?.includes(n)||o.find(s=>s===e))}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=Qe(e),r=Je(e),n=t.length>0?t[0]:void 0,o=t.length>0?t[t.length-1]:void 0,s=r.find(c=>U(c)),i=r.slice().reverse().find(c=>U(c)),a=!!t.find(c=>J(c)>0);function u(c,f=!0){const g=t.indexOf(c);return g<0?f?r.slice(r.indexOf(c)+1).find(l=>U(l)):r.slice(0,r.indexOf(c)).reverse().find(l=>U(l)):t[g+(f?1:-1)]}return{container:e,tabbableNodes:t,focusableNodes:r,posTabIndexesFound:a,firstTabbableNode:n,lastTabbableNode:o,firstDomTabbableNode:s,lastDomTabbableNode:i,nextTabbableNode:u}}),this.state.tabbableGroups=this.state.containerGroups.filter(e=>e.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find(e=>e.posTabIndexesFound)&&this.state.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}addListeners(){if(this.state.active)return _e.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?Ve(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(I(this.doc,"focusin",this.handleFocus,!0),I(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),I(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),I(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),I(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),I(this.doc,"keydown",this.handleEscapeKey)),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach(e=>e()),this.listenerCleanups=[],this}activate(e){if(this.state.active)return this;const t=this.getOption(e,"onActivate"),r=this.getOption(e,"onPostActivate"),n=this.getOption(e,"checkCanFocusTrap");n||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=this.doc.activeElement||null,t?.();const o=()=>{n&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),r?.()};return n?(n(this.state.containers.concat()).then(o,o),this):(o(),this)}},Q=e=>e.key==="Tab",ee=(e,...t)=>typeof e=="function"?e(...t):e,nr=e=>!e.isComposing&&e.key==="Escape",Ve=e=>setTimeout(e,0),rr=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function or(e,t={}){let r;const n=M(()=>{const o=typeof e=="function"?e():e;if(o){r=new tr(o,{escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:o,...t,document:$(o)});try{r.activate()}catch{}}});return function(){r?.deactivate(),n()}}var be="data-scroll-lock";function sr(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function ir(e){const t=e??document,r=t.defaultView??window,{documentElement:n,body:o}=t;if(o.hasAttribute(be))return;const i=r.innerWidth-n.clientWidth;o.setAttribute(be,"");const a=()=>on(n,"--scrollbar-width",`${i}px`),u=sr(n),c=()=>ue(o,{overflow:"hidden",[u]:`${i}px`}),f=()=>{const{scrollX:l,scrollY:d,visualViewport:v}=r,b=v?.offsetLeft??0,x=v?.offsetTop??0,E=ue(o,{position:"fixed",overflow:"hidden",top:`${-(d-Math.floor(x))}px`,left:`${-(l-Math.floor(b))}px`,right:"0",[u]:`${i}px`});return()=>{E?.(),r.scrollTo({left:l,top:d,behavior:"instant"})}},g=[a(),Xt()?f():c()];return()=>{g.forEach(l=>l?.()),o.removeAttribute(be)}}var ar=te("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),W=ar.build(),ft=e=>e.ids?.positioner??`dialog:${e.id}:positioner`,pt=e=>e.ids?.backdrop??`dialog:${e.id}:backdrop`,Oe=e=>e.ids?.content??`dialog:${e.id}:content`,ht=e=>e.ids?.trigger??`dialog:${e.id}:trigger`,Pe=e=>e.ids?.title??`dialog:${e.id}:title`,Ce=e=>e.ids?.description??`dialog:${e.id}:description`,gt=e=>e.ids?.closeTrigger??`dialog:${e.id}:close`,ie=e=>e.getById(Oe(e)),cr=e=>e.getById(ft(e)),ur=e=>e.getById(pt(e)),lr=e=>e.getById(ht(e)),dr=e=>e.getById(Pe(e)),fr=e=>e.getById(Ce(e)),pr=e=>e.getById(gt(e));function hr(e,t){const{state:r,send:n,context:o,prop:s,scope:i}=e,a=s("aria-label"),u=r.matches("open");return{open:u,setOpen(c){r.matches("open")!==c&&n({type:c?"OPEN":"CLOSE"})},getTriggerProps(){return t.button({...W.trigger.attrs,dir:s("dir"),id:ht(i),"aria-haspopup":"dialog",type:"button","aria-expanded":u,"data-state":u?"open":"closed","aria-controls":Oe(i),onClick(c){c.defaultPrevented||n({type:"TOGGLE"})}})},getBackdropProps(){return t.element({...W.backdrop.attrs,dir:s("dir"),hidden:!u,id:pt(i),"data-state":u?"open":"closed"})},getPositionerProps(){return t.element({...W.positioner.attrs,dir:s("dir"),id:ft(i),style:{pointerEvents:u?void 0:"none"}})},getContentProps(){const c=o.get("rendered");return t.element({...W.content.attrs,dir:s("dir"),role:s("role"),hidden:!u,id:Oe(i),tabIndex:-1,"data-state":u?"open":"closed","aria-modal":!0,"aria-label":a||void 0,"aria-labelledby":a||!c.title?void 0:Pe(i),"aria-describedby":c.description?Ce(i):void 0})},getTitleProps(){return t.element({...W.title.attrs,dir:s("dir"),id:Pe(i)})},getDescriptionProps(){return t.element({...W.description.attrs,dir:s("dir"),id:Ce(i)})},getCloseTriggerProps(){return t.button({...W.closeTrigger.attrs,dir:s("dir"),id:gt(i),type:"button",onClick(c){c.defaultPrevented||(c.stopPropagation(),n({type:"CLOSE"}))}})}}}var gr={props({props:e,scope:t}){const r=e.role==="alertdialog";return{role:"dialog",modal:!0,trapFocus:!0,preventScroll:!0,closeOnInteractOutside:!r,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:r?()=>pr(t):void 0,...e}},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}}))}},watch({track:e,action:t,prop:r}){e([()=>r("open")],()=>{t(["toggleVisibility"])})},states:{open:{entry:["checkRenderedElements","syncZIndex"],effects:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackDismissableElement({scope:e,send:t,prop:r}){return Zn(()=>ie(e),{defer:!0,pointerBlocking:r("modal"),exclude:[lr(e)],onInteractOutside(o){r("onInteractOutside")?.(o),r("closeOnInteractOutside")||o.preventDefault()},persistentElements:r("persistentElements"),onFocusOutside:r("onFocusOutside"),onPointerDownOutside:r("onPointerDownOutside"),onEscapeKeyDown(o){r("onEscapeKeyDown")?.(o),r("closeOnEscape")||o.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return ir(e.getDoc())},trapFocus({scope:e,prop:t}){return!t("trapFocus")||!t("modal")?void 0:or(()=>ie(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:n=>t("finalFocusEl")?.()??n})},hideContentBelow({scope:e,prop:t}){return t("modal")?jn(()=>[ie(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){M(()=>{e.set("rendered",{title:!!dr(t),description:!!fr(t)})})},syncZIndex({scope:e}){M(()=>{const t=ie(e);if(!t)return;const r=ze(t);[cr(e),ur(e)].forEach(o=>{o?.style.setProperty("--z-index",r.zIndex)})})},invokeOnClose({prop:e}){e("onOpenChange")?.({open:!1})},invokeOnOpen({prop:e}){e("onOpenChange")?.({open:!0})},toggleVisibility({prop:e,send:t,event:r}){t({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:r})}}}};const[Lr,mt]=ne({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[Br,mr]=ne({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),vr=e=>{const t=p.useId(),{getRootNode:r}=mt(),{dir:n}=mr(),o={id:t,getRootNode:r,dir:n,...e},s=tt(gr,o);return hr(s,vn)},yr=e=>{const[t,{children:r,...n}]=Fn(e),[o]=Nn(t),s=vr(n),i=ot(j({present:s.open},t));return C.jsx(Dn,{value:s,children:C.jsx(bn,{value:o,children:C.jsx(kn,{value:i,children:r})})})};const vt=p.forwardRef((e,t)=>{const r=V(),n=j(r.getTitleProps(),e);return C.jsx(K.h2,{...n,ref:t})});vt.displayName="DialogTitle";const yt=p.forwardRef((e,t)=>{const r=V(),n=Fe(),o=j({...r.getTriggerProps(),"aria-controls":n.unmounted?void 0:r.getTriggerProps()["aria-controls"]},e);return C.jsx(K.button,{...o,ref:t})});yt.displayName="DialogTrigger";const{withRootProvider:br,withContext:L}=Nt.createSlotRecipeContext({key:"dialog"}),Er=br(yr,{defaultProps:{unmountOnExit:!0,lazyMount:!0}}),Nr=L(yt,"trigger",{forwardAsChild:!0}),bt=L(ut,"positioner",{forwardAsChild:!0}),wr=L(at,"content",{forwardAsChild:!0}),Or=L(ct,"description",{forwardAsChild:!0}),Pr=L(vt,"title",{forwardAsChild:!0}),Cr=L(it,"closeTrigger",{forwardAsChild:!0}),xr=p.forwardRef(function(t,r){const n=V();return C.jsx(wt.chakra.button,{...t,ref:r,onClick:()=>n.setOpen(!1)})}),Et=L(st,"backdrop",{forwardAsChild:!0}),Tr=L("div","body"),Dr=L("div","footer"),kr=L("div","header"),Fr=e=>{const{children:t,disabled:r}=e,[n,o]=p.useState(e.container?.current),s=p.useSyncExternalStore(Sr,()=>!1,()=>!0),{getRootNode:i}=mt();if(p.useEffect(()=>{o(()=>e.container?.current)},[e.container]),s||r)return C.jsx(C.Fragment,{children:t});const a=n??Rr(i);return C.jsx(C.Fragment,{children:p.Children.map(t,u=>de.createPortal(u,a))})},Rr=e=>{const t=e?.(),r=t.getRootNode();return Y(r)?r:$(t).body},Sr=()=>()=>{},Ar=function(t){const{children:r,portalled:n=!0,portalRef:o,backdrop:s=!0,ref:i,...a}=t;return C.jsxs(Fr,{disabled:!n,container:o,children:[s&&C.jsx(Et,{}),C.jsx(bt,{children:C.jsx(wr,{ref:i,...a,asChild:!1,children:r})})]})},Ir={Root:Er,Trigger:Nr,Content:Ar,Backdrop:Et,Positioner:bt,Title:Pr,Description:Or,Body:Tr,Footer:Dr,Header:kr,CloseTrigger:Cr,ActionTrigger:xr};exports.Dialog=Ir;
2
+ //# sourceMappingURL=dialog-7iIFtc75.cjs.js.map