@commercetools/nimbus 0.0.12-rc3 → 0.0.12-rc4

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 (469) hide show
  1. package/dist/chunks/accordion-EDJoghXQ.cjs.js +2 -0
  2. package/dist/chunks/{accordion-Be--VNW6.cjs.js.map → accordion-EDJoghXQ.cjs.js.map} +1 -1
  3. package/dist/chunks/{accordion-Drl_Y6QC.es.js → accordion-UL4pfC2d.es.js} +24 -24
  4. package/dist/chunks/{accordion-Drl_Y6QC.es.js.map → accordion-UL4pfC2d.es.js.map} +1 -1
  5. package/dist/chunks/alert-BhoRNIWA.cjs.js +2 -0
  6. package/dist/chunks/{alert-CsJON6h-.cjs.js.map → alert-BhoRNIWA.cjs.js.map} +1 -1
  7. package/dist/chunks/{alert-9-Hp2KQ4.es.js → alert-D-ddqYG4.es.js} +25 -26
  8. package/dist/chunks/{alert-9-Hp2KQ4.es.js.map → alert-D-ddqYG4.es.js.map} +1 -1
  9. package/dist/chunks/{avatar-DXWmY247.es.js → avatar-Bu12OMzz.es.js} +6 -6
  10. package/dist/chunks/{avatar-DXWmY247.es.js.map → avatar-Bu12OMzz.es.js.map} +1 -1
  11. package/dist/chunks/avatar-C2KIWewd.cjs.js +2 -0
  12. package/dist/chunks/{avatar-DEAravTR.cjs.js.map → avatar-C2KIWewd.cjs.js.map} +1 -1
  13. package/dist/chunks/avatar.recipe-D3--Rkmb.cjs.js +2 -0
  14. package/dist/chunks/{avatar.recipe-CQivdbFs.cjs.js.map → avatar.recipe-D3--Rkmb.cjs.js.map} +1 -1
  15. package/dist/chunks/{avatar.recipe-CxXQlkH6.es.js → avatar.recipe-DfyPWbFZ.es.js} +2 -2
  16. package/dist/chunks/{avatar.recipe-CxXQlkH6.es.js.map → avatar.recipe-DfyPWbFZ.es.js.map} +1 -1
  17. package/dist/chunks/{badge-Cg7jASs5.es.js → badge-BJd-Q81M.es.js} +5 -6
  18. package/dist/chunks/{badge-Cg7jASs5.es.js.map → badge-BJd-Q81M.es.js.map} +1 -1
  19. package/dist/chunks/badge-CCrBksXu.cjs.js +2 -0
  20. package/dist/chunks/{badge-BjhZ-byo.cjs.js.map → badge-CCrBksXu.cjs.js.map} +1 -1
  21. package/dist/chunks/box-CWni3A32.cjs.js +2 -0
  22. package/dist/chunks/box-CWni3A32.cjs.js.map +1 -0
  23. package/dist/chunks/box-DuBoAZvq.es.js +12 -0
  24. package/dist/chunks/box-DuBoAZvq.es.js.map +1 -0
  25. package/dist/chunks/{button-DNPDogwN.es.js → button-CRUdodZm.es.js} +14 -14
  26. package/dist/chunks/{button-DNPDogwN.es.js.map → button-CRUdodZm.es.js.map} +1 -1
  27. package/dist/chunks/button-CU8FW_Pl.cjs.js +2 -0
  28. package/dist/chunks/{button-CihUSHJo.cjs.js.map → button-CU8FW_Pl.cjs.js.map} +1 -1
  29. package/dist/chunks/button.recipe-Cqkj3VMo.cjs.js +2 -0
  30. package/dist/chunks/{button.recipe-ClPhJ93N.cjs.js.map → button.recipe-Cqkj3VMo.cjs.js.map} +1 -1
  31. package/dist/chunks/{button.recipe-D9e9Gh9L.es.js → button.recipe-NdTb5f8M.es.js} +2 -2
  32. package/dist/chunks/{button.recipe-D9e9Gh9L.es.js.map → button.recipe-NdTb5f8M.es.js.map} +1 -1
  33. package/dist/chunks/calendar-DJKWldpV.cjs.js +2 -0
  34. package/dist/chunks/{calendar-C-YasyPe.cjs.js.map → calendar-DJKWldpV.cjs.js.map} +1 -1
  35. package/dist/chunks/{calendar-DGKSCKht.es.js → calendar-DzwFtg1t.es.js} +19 -20
  36. package/dist/chunks/{calendar-DGKSCKht.es.js.map → calendar-DzwFtg1t.es.js.map} +1 -1
  37. package/dist/chunks/{card-DX8r4prk.es.js → card-BfUdf1Fy.es.js} +23 -24
  38. package/dist/chunks/{card-DX8r4prk.es.js.map → card-BfUdf1Fy.es.js.map} +1 -1
  39. package/dist/chunks/card-DeWTV05B.cjs.js +2 -0
  40. package/dist/chunks/{card-DgvP36g1.cjs.js.map → card-DeWTV05B.cjs.js.map} +1 -1
  41. package/dist/chunks/checkbox-6nLo9Jy2.cjs.js +2 -0
  42. package/dist/chunks/{checkbox-6DkVAh4W.cjs.js.map → checkbox-6nLo9Jy2.cjs.js.map} +1 -1
  43. package/dist/chunks/{checkbox-BnfwQBT0.es.js → checkbox-GmYxVrZx.es.js} +32 -32
  44. package/dist/chunks/{checkbox-BnfwQBT0.es.js.map → checkbox-GmYxVrZx.es.js.map} +1 -1
  45. package/dist/chunks/code-Dl7u63Zn.es.js +6 -0
  46. package/dist/chunks/code-Dl7u63Zn.es.js.map +1 -0
  47. package/dist/chunks/code-q31e3vT2.cjs.js +2 -0
  48. package/dist/chunks/code-q31e3vT2.cjs.js.map +1 -0
  49. package/dist/chunks/combobox-DtPDxCo3.cjs.js +2 -0
  50. package/dist/chunks/{combobox-CLGVlx_7.cjs.js.map → combobox-DtPDxCo3.cjs.js.map} +1 -1
  51. package/dist/chunks/{combobox-BS6TWlhm.es.js → combobox-gIwba2QG.es.js} +68 -68
  52. package/dist/chunks/{combobox-BS6TWlhm.es.js.map → combobox-gIwba2QG.es.js.map} +1 -1
  53. package/dist/chunks/data-table-Cpk3q34E.cjs.js +2 -0
  54. package/dist/chunks/data-table-Cpk3q34E.cjs.js.map +1 -0
  55. package/dist/chunks/{data-table-BmhYF5gH.es.js → data-table-mXLxUWQz.es.js} +1204 -1281
  56. package/dist/chunks/data-table-mXLxUWQz.es.js.map +1 -0
  57. package/dist/chunks/date-input-D5unoyMt.es.js +16 -0
  58. package/dist/chunks/{date-input-BR6daiWa.es.js.map → date-input-D5unoyMt.es.js.map} +1 -1
  59. package/dist/chunks/date-input-DJ_aFB9i.cjs.js +2 -0
  60. package/dist/chunks/{date-input-VXO92NPV.cjs.js.map → date-input-DJ_aFB9i.cjs.js.map} +1 -1
  61. package/dist/chunks/{date-picker-DqvZ_FI0.es.js → date-picker-CMqAI1lp.es.js} +25 -25
  62. package/dist/chunks/{date-picker-DqvZ_FI0.es.js.map → date-picker-CMqAI1lp.es.js.map} +1 -1
  63. package/dist/chunks/date-picker-f3TylaP5.cjs.js +2 -0
  64. package/dist/chunks/{date-picker-DNaxpmgh.cjs.js.map → date-picker-f3TylaP5.cjs.js.map} +1 -1
  65. package/dist/chunks/date-range-picker-CxsPpWyX.cjs.js +2 -0
  66. package/dist/chunks/{date-range-picker-B5s-AFSY.cjs.js.map → date-range-picker-CxsPpWyX.cjs.js.map} +1 -1
  67. package/dist/chunks/{date-range-picker-Dh-F7d4e.es.js → date-range-picker-Dtji64Q9.es.js} +14 -14
  68. package/dist/chunks/{date-range-picker-Dh-F7d4e.es.js.map → date-range-picker-Dtji64Q9.es.js.map} +1 -1
  69. package/dist/chunks/dialog-CVa-E9-A.cjs.js +2 -0
  70. package/dist/chunks/dialog-CVa-E9-A.cjs.js.map +1 -0
  71. package/dist/chunks/dialog-DTSuKnyk.es.js +34 -0
  72. package/dist/chunks/dialog-DTSuKnyk.es.js.map +1 -0
  73. package/dist/chunks/{divider-Cjs3ESH7.es.js → divider--BAm3ca4.es.js} +7 -8
  74. package/dist/chunks/{divider-Cjs3ESH7.es.js.map → divider--BAm3ca4.es.js.map} +1 -1
  75. package/dist/chunks/divider-BuizjeAj.cjs.js +2 -0
  76. package/dist/chunks/{divider-DU351gdE.cjs.js.map → divider-BuizjeAj.cjs.js.map} +1 -1
  77. package/dist/chunks/emotion-is-prop-valid.esm-Bb7Ou5_X.cjs.js +2 -0
  78. package/dist/chunks/emotion-is-prop-valid.esm-Bb7Ou5_X.cjs.js.map +1 -0
  79. package/dist/chunks/emotion-is-prop-valid.esm-qvxbqhmq.es.js +16 -0
  80. package/dist/chunks/emotion-is-prop-valid.esm-qvxbqhmq.es.js.map +1 -0
  81. package/dist/chunks/{extractStyleProps-BsLft3q1.cjs.js → extractStyleProps-CZpHKp1I.cjs.js} +2 -2
  82. package/dist/chunks/{extractStyleProps-BsLft3q1.cjs.js.map → extractStyleProps-CZpHKp1I.cjs.js.map} +1 -1
  83. package/dist/chunks/{extractStyleProps-D6vCCKog.es.js → extractStyleProps-vA4cNUoc.es.js} +2 -2
  84. package/dist/chunks/{extractStyleProps-D6vCCKog.es.js.map → extractStyleProps-vA4cNUoc.es.js.map} +1 -1
  85. package/dist/chunks/{form-field-hq4IMj9f.es.js → form-field-Dtcfgzyo.es.js} +30 -31
  86. package/dist/chunks/{form-field-hq4IMj9f.es.js.map → form-field-Dtcfgzyo.es.js.map} +1 -1
  87. package/dist/chunks/{form-field-BjT4m4AE.cjs.js → form-field-DxcGAb23.cjs.js} +3 -3
  88. package/dist/chunks/{form-field-BjT4m4AE.cjs.js.map → form-field-DxcGAb23.cjs.js.map} +1 -1
  89. package/dist/chunks/grid-Chuw1xje.cjs.js +2 -0
  90. package/dist/chunks/{grid-CXpKN2OR.cjs.js.map → grid-Chuw1xje.cjs.js.map} +1 -1
  91. package/dist/chunks/grid-De8qjf98.es.js +14 -0
  92. package/dist/chunks/{grid-B3Ggy_FW.es.js.map → grid-De8qjf98.es.js.map} +1 -1
  93. package/dist/chunks/{icon-BDsjJ4Zi.es.js → icon-BoRbJStV.es.js} +9 -10
  94. package/dist/chunks/{icon-BDsjJ4Zi.es.js.map → icon-BoRbJStV.es.js.map} +1 -1
  95. package/dist/chunks/icon-Cny8ZtnX.cjs.js +2 -0
  96. package/dist/chunks/{icon-DHoLo7_S.cjs.js.map → icon-Cny8ZtnX.cjs.js.map} +1 -1
  97. package/dist/chunks/{icon-button-EonZGbth.es.js → icon-button-C20Gw8gQ.es.js} +2 -2
  98. package/dist/chunks/{icon-button-EonZGbth.es.js.map → icon-button-C20Gw8gQ.es.js.map} +1 -1
  99. package/dist/chunks/{icon-button-DOo2GUqd.cjs.js → icon-button-Cc0MkBbk.cjs.js} +2 -2
  100. package/dist/chunks/{icon-button-DOo2GUqd.cjs.js.map → icon-button-Cc0MkBbk.cjs.js.map} +1 -1
  101. package/dist/chunks/{icon-toggle-button-CcEARpnu.es.js → icon-toggle-button-CgHQMDs3.es.js} +2 -2
  102. package/dist/chunks/{icon-toggle-button-CcEARpnu.es.js.map → icon-toggle-button-CgHQMDs3.es.js.map} +1 -1
  103. package/dist/chunks/{icon-toggle-button-DmYB27yi.cjs.js → icon-toggle-button-D-C99Q0s.cjs.js} +2 -2
  104. package/dist/chunks/{icon-toggle-button-DmYB27yi.cjs.js.map → icon-toggle-button-D-C99Q0s.cjs.js.map} +1 -1
  105. package/dist/chunks/image-CGOYoc2s.cjs.js +2 -0
  106. package/dist/chunks/{image-bt28epM5.cjs.js.map → image-CGOYoc2s.cjs.js.map} +1 -1
  107. package/dist/chunks/image-DRigLU80.es.js +8 -0
  108. package/dist/chunks/{image-MeWmLoV0.es.js.map → image-DRigLU80.es.js.map} +1 -1
  109. package/dist/chunks/index-C8Yrk__l.cjs.js +4 -0
  110. package/dist/chunks/{index-BsmdMT4w.cjs.js.map → index-C8Yrk__l.cjs.js.map} +1 -1
  111. package/dist/chunks/{index-Dvel3Oj5.es.js → index-jAeaCpRm.es.js} +7 -7
  112. package/dist/chunks/{index-Dvel3Oj5.es.js.map → index-jAeaCpRm.es.js.map} +1 -1
  113. package/dist/chunks/kbd-BXN9aXRE.es.js +17 -0
  114. package/dist/chunks/{kbd-Bc97Bwq3.es.js.map → kbd-BXN9aXRE.es.js.map} +1 -1
  115. package/dist/chunks/kbd-DFeaXiKY.cjs.js +2 -0
  116. package/dist/chunks/{kbd-BlZ2RGfa.cjs.js.map → kbd-DFeaXiKY.cjs.js.map} +1 -1
  117. package/dist/chunks/{kbd.recipe-BTW0MQqx.es.js → kbd.recipe-DXiyvrAP.es.js} +2 -2
  118. package/dist/chunks/{kbd.recipe-BTW0MQqx.es.js.map → kbd.recipe-DXiyvrAP.es.js.map} +1 -1
  119. package/dist/chunks/kbd.recipe-DjQgeTG_.cjs.js +2 -0
  120. package/dist/chunks/{kbd.recipe-9kxAU5ro.cjs.js.map → kbd.recipe-DjQgeTG_.cjs.js.map} +1 -1
  121. package/dist/chunks/{link-DjzrPyx3.es.js → link-CFK97sc0.es.js} +4 -4
  122. package/dist/chunks/{link-DjzrPyx3.es.js.map → link-CFK97sc0.es.js.map} +1 -1
  123. package/dist/chunks/link-DWa1zIUJ.cjs.js +2 -0
  124. package/dist/chunks/{link-DzUonoQg.cjs.js.map → link-DWa1zIUJ.cjs.js.map} +1 -1
  125. package/dist/chunks/link.recipe-Co4-fl4U.cjs.js +2 -0
  126. package/dist/chunks/{link.recipe-BfCxtKjL.cjs.js.map → link.recipe-Co4-fl4U.cjs.js.map} +1 -1
  127. package/dist/chunks/{link.recipe-BRnFQ5bP.es.js → link.recipe-pXiGIJtI.es.js} +2 -2
  128. package/dist/chunks/{link.recipe-BRnFQ5bP.es.js.map → link.recipe-pXiGIJtI.es.js.map} +1 -1
  129. package/dist/chunks/list-DJC9BmoC.cjs.js +2 -0
  130. package/dist/chunks/list-DJC9BmoC.cjs.js.map +1 -0
  131. package/dist/chunks/list-Nz5KjWzs.es.js +13 -0
  132. package/dist/chunks/list-Nz5KjWzs.es.js.map +1 -0
  133. package/dist/chunks/{loading-spinner-DuBf2cIy.es.js → loading-spinner-CvggCl-H.es.js} +6 -7
  134. package/dist/chunks/{loading-spinner-DuBf2cIy.es.js.map → loading-spinner-CvggCl-H.es.js.map} +1 -1
  135. package/dist/chunks/loading-spinner-DdYXuYkg.cjs.js +2 -0
  136. package/dist/chunks/{loading-spinner-VVQyl725.cjs.js.map → loading-spinner-DdYXuYkg.cjs.js.map} +1 -1
  137. package/dist/chunks/{menu-CKJfYhIU.es.js → menu-8g9Hn1nm.es.js} +14 -14
  138. package/dist/chunks/{menu-CKJfYhIU.es.js.map → menu-8g9Hn1nm.es.js.map} +1 -1
  139. package/dist/chunks/menu-Bm1u-R6o.cjs.js +2 -0
  140. package/dist/chunks/{menu-C8il9--K.cjs.js.map → menu-Bm1u-R6o.cjs.js.map} +1 -1
  141. package/dist/chunks/{multiline-text-input-DoHeA-kt.es.js → multiline-text-input-BGnvpB1r.es.js} +12 -14
  142. package/dist/chunks/{multiline-text-input-DoHeA-kt.es.js.map → multiline-text-input-BGnvpB1r.es.js.map} +1 -1
  143. package/dist/chunks/multiline-text-input-sXIlwrvT.cjs.js +12 -0
  144. package/dist/chunks/{multiline-text-input-D28clI-o.cjs.js.map → multiline-text-input-sXIlwrvT.cjs.js.map} +1 -1
  145. package/dist/chunks/{nimbus-provider-DKRUbH11.es.js → nimbus-provider-CybdU89B.es.js} +4 -4
  146. package/dist/chunks/{nimbus-provider-DKRUbH11.es.js.map → nimbus-provider-CybdU89B.es.js.map} +1 -1
  147. package/dist/chunks/nimbus-provider-D3DvYEDv.cjs.js +2 -0
  148. package/dist/chunks/{nimbus-provider-BlfO5_bi.cjs.js.map → nimbus-provider-D3DvYEDv.cjs.js.map} +1 -1
  149. package/dist/chunks/number-input-CPnA0dO-.cjs.js +2 -0
  150. package/dist/chunks/{number-input-CCEiz-4P.cjs.js.map → number-input-CPnA0dO-.cjs.js.map} +1 -1
  151. package/dist/chunks/{number-input-BEn83Z9q.es.js → number-input-CzObpfFa.es.js} +11 -11
  152. package/dist/chunks/{number-input-BEn83Z9q.es.js.map → number-input-CzObpfFa.es.js.map} +1 -1
  153. package/dist/chunks/{password-input-DY4slQHQ.cjs.js → password-input-BqhrDjyW.cjs.js} +2 -2
  154. package/dist/chunks/{password-input-DY4slQHQ.cjs.js.map → password-input-BqhrDjyW.cjs.js.map} +1 -1
  155. package/dist/chunks/{password-input-BGPsQ2R9.es.js → password-input-C_rdTND7.es.js} +5 -5
  156. package/dist/chunks/{password-input-BGPsQ2R9.es.js.map → password-input-C_rdTND7.es.js.map} +1 -1
  157. package/dist/chunks/progress-bar-CrS1rODC.cjs.js +2 -0
  158. package/dist/chunks/{progress-bar-0RRIR4ef.cjs.js.map → progress-bar-CrS1rODC.cjs.js.map} +1 -1
  159. package/dist/chunks/{progress-bar-BsuOolTl.es.js → progress-bar-pPWJ1Sn8.es.js} +19 -19
  160. package/dist/chunks/{progress-bar-BsuOolTl.es.js.map → progress-bar-pPWJ1Sn8.es.js.map} +1 -1
  161. package/dist/chunks/radio-input-BTEXrXaF.cjs.js +2 -0
  162. package/dist/chunks/{radio-input-B40xSi6r.cjs.js.map → radio-input-BTEXrXaF.cjs.js.map} +1 -1
  163. package/dist/chunks/{radio-input-CDYvzPq7.es.js → radio-input-OpbQD2zP.es.js} +42 -42
  164. package/dist/chunks/{radio-input-CDYvzPq7.es.js.map → radio-input-OpbQD2zP.es.js.map} +1 -1
  165. package/dist/chunks/{range-calendar-DxPBRKpW.es.js → range-calendar-BOP_J_5a.es.js} +21 -22
  166. package/dist/chunks/{range-calendar-DxPBRKpW.es.js.map → range-calendar-BOP_J_5a.es.js.map} +1 -1
  167. package/dist/chunks/range-calendar-CFotnBzs.cjs.js +2 -0
  168. package/dist/chunks/{range-calendar-BiNek1C7.cjs.js.map → range-calendar-CFotnBzs.cjs.js.map} +1 -1
  169. package/dist/chunks/{rich-text-input-gNWvLb4m.cjs.js → rich-text-input-CItP9BzJ.cjs.js} +2 -2
  170. package/dist/chunks/{rich-text-input-gNWvLb4m.cjs.js.map → rich-text-input-CItP9BzJ.cjs.js.map} +1 -1
  171. package/dist/chunks/{rich-text-input-B6OYMXXr.es.js → rich-text-input-CgrxAPHc.es.js} +11 -11
  172. package/dist/chunks/{rich-text-input-B6OYMXXr.es.js.map → rich-text-input-CgrxAPHc.es.js.map} +1 -1
  173. package/dist/chunks/{select-X7n0xTYd.es.js → select-CAeD_ZuZ.es.js} +67 -68
  174. package/dist/chunks/{select-X7n0xTYd.es.js.map → select-CAeD_ZuZ.es.js.map} +1 -1
  175. package/dist/chunks/select-Coyt1pJN.cjs.js +2 -0
  176. package/dist/chunks/{select-BuXA5VgT.cjs.js.map → select-Coyt1pJN.cjs.js.map} +1 -1
  177. package/dist/chunks/simple-grid-Cd2MJxSX.cjs.js +2 -0
  178. package/dist/chunks/simple-grid-Cd2MJxSX.cjs.js.map +1 -0
  179. package/dist/chunks/simple-grid-DU5v66TG.es.js +15 -0
  180. package/dist/chunks/simple-grid-DU5v66TG.es.js.map +1 -0
  181. package/dist/chunks/{split-button-CgQYMeH7.cjs.js → split-button-BYrr5vRr.cjs.js} +2 -2
  182. package/dist/chunks/{split-button-CgQYMeH7.cjs.js.map → split-button-BYrr5vRr.cjs.js.map} +1 -1
  183. package/dist/chunks/{split-button-BWXYRDuQ.es.js → split-button-j2bgcP59.es.js} +5 -5
  184. package/dist/chunks/{split-button-BWXYRDuQ.es.js.map → split-button-j2bgcP59.es.js.map} +1 -1
  185. package/dist/chunks/stack-CIN13EDn.cjs.js +2 -0
  186. package/dist/chunks/stack-CIN13EDn.cjs.js.map +1 -0
  187. package/dist/chunks/stack-CoNreM7B.es.js +11 -0
  188. package/dist/chunks/stack-CoNreM7B.es.js.map +1 -0
  189. package/dist/chunks/switch-BgNpbn2e.cjs.js +2 -0
  190. package/dist/chunks/{switch-BQXiI02l.cjs.js.map → switch-BgNpbn2e.cjs.js.map} +1 -1
  191. package/dist/chunks/{switch-rkewogOb.es.js → switch-Cid4U3m8.es.js} +8 -8
  192. package/dist/chunks/{switch-rkewogOb.es.js.map → switch-Cid4U3m8.es.js.map} +1 -1
  193. package/dist/chunks/tag-group-B3YSTBpb.cjs.js +2 -0
  194. package/dist/chunks/{tag-group-DwTq8DeA.cjs.js.map → tag-group-B3YSTBpb.cjs.js.map} +1 -1
  195. package/dist/chunks/{tag-group-DqTm8v26.es.js → tag-group-CeNHz5QQ.es.js} +50 -50
  196. package/dist/chunks/{tag-group-DqTm8v26.es.js.map → tag-group-CeNHz5QQ.es.js.map} +1 -1
  197. package/dist/chunks/text-CCW9kDT_.cjs.js +2 -0
  198. package/dist/chunks/text-CCW9kDT_.cjs.js.map +1 -0
  199. package/dist/chunks/text-DfQpupDi.es.js +24 -0
  200. package/dist/chunks/text-DfQpupDi.es.js.map +1 -0
  201. package/dist/chunks/text-input-C2y4O13I.cjs.js +2 -0
  202. package/dist/chunks/{text-input-DJUpcp3k.cjs.js.map → text-input-C2y4O13I.cjs.js.map} +1 -1
  203. package/dist/chunks/text-input-TZXg0lEQ.es.js +18 -0
  204. package/dist/chunks/{text-input-Dinn4J2V.es.js.map → text-input-TZXg0lEQ.es.js.map} +1 -1
  205. package/dist/chunks/{time-input-Us0JugnD.es.js → time-input-CI_HoOGU.es.js} +6 -8
  206. package/dist/chunks/{time-input-Us0JugnD.es.js.map → time-input-CI_HoOGU.es.js.map} +1 -1
  207. package/dist/chunks/time-input-cHUvGWDc.cjs.js +2 -0
  208. package/dist/chunks/{time-input-B5oRiIpu.cjs.js.map → time-input-cHUvGWDc.cjs.js.map} +1 -1
  209. package/dist/chunks/toggle-button-C9ezVsSp.cjs.js +2 -0
  210. package/dist/chunks/{toggle-button-C_7Evcn3.cjs.js.map → toggle-button-C9ezVsSp.cjs.js.map} +1 -1
  211. package/dist/chunks/toggle-button-a0gCembi.es.js +29 -0
  212. package/dist/chunks/{toggle-button-RS4Z6UNN.es.js.map → toggle-button-a0gCembi.es.js.map} +1 -1
  213. package/dist/chunks/toggle-button-group-DX134q7m.cjs.js +2 -0
  214. package/dist/chunks/{toggle-button-group-LddoXszz.cjs.js.map → toggle-button-group-DX134q7m.cjs.js.map} +1 -1
  215. package/dist/chunks/{toggle-button-group-DHMnBWSg.es.js → toggle-button-group-jRdpdYyd.es.js} +14 -15
  216. package/dist/chunks/{toggle-button-group-DHMnBWSg.es.js.map → toggle-button-group-jRdpdYyd.es.js.map} +1 -1
  217. package/dist/chunks/{toolbar-BUYkQMPz.cjs.js → toolbar-CLGq6IO7.cjs.js} +2 -2
  218. package/dist/chunks/{toolbar-BUYkQMPz.cjs.js.map → toolbar-CLGq6IO7.cjs.js.map} +1 -1
  219. package/dist/chunks/{toolbar-DI1eQG-1.es.js → toolbar-hpBfKrTl.es.js} +3 -3
  220. package/dist/chunks/{toolbar-DI1eQG-1.es.js.map → toolbar-hpBfKrTl.es.js.map} +1 -1
  221. package/dist/chunks/{tooltip-CTvNYvui.es.js → tooltip-B1YdruCE.es.js} +4 -4
  222. package/dist/chunks/{tooltip-CTvNYvui.es.js.map → tooltip-B1YdruCE.es.js.map} +1 -1
  223. package/dist/chunks/tooltip-g8-hEdZp.cjs.js +2 -0
  224. package/dist/chunks/{tooltip-CIAEV4_B.cjs.js.map → tooltip-g8-hEdZp.cjs.js.map} +1 -1
  225. package/dist/chunks/{tooltip.recipe-DsVUEki2.es.js → tooltip.recipe-Cqi_tgR5.es.js} +2 -2
  226. package/dist/chunks/{tooltip.recipe-DsVUEki2.es.js.map → tooltip.recipe-Cqi_tgR5.es.js.map} +1 -1
  227. package/dist/chunks/tooltip.recipe-dx7DAJbZ.cjs.js +2 -0
  228. package/dist/chunks/{tooltip.recipe-VqGdDqQD.cjs.js.map → tooltip.recipe-dx7DAJbZ.cjs.js.map} +1 -1
  229. package/dist/components/accordion.cjs +1 -1
  230. package/dist/components/accordion.es.js +1 -1
  231. package/dist/components/alert.cjs +1 -1
  232. package/dist/components/alert.es.js +1 -1
  233. package/dist/components/avatar.cjs +1 -1
  234. package/dist/components/avatar.es.js +1 -1
  235. package/dist/components/badge.cjs +1 -1
  236. package/dist/components/badge.es.js +1 -1
  237. package/dist/components/box.cjs +1 -1
  238. package/dist/components/box.es.js +1 -1
  239. package/dist/components/button.cjs +1 -1
  240. package/dist/components/button.es.js +1 -1
  241. package/dist/components/calendar.cjs +1 -1
  242. package/dist/components/calendar.es.js +1 -1
  243. package/dist/components/card.cjs +1 -1
  244. package/dist/components/card.es.js +1 -1
  245. package/dist/components/checkbox.cjs +1 -1
  246. package/dist/components/checkbox.es.js +1 -1
  247. package/dist/components/code.cjs +1 -1
  248. package/dist/components/code.es.js +1 -1
  249. package/dist/components/combobox.cjs +1 -1
  250. package/dist/components/combobox.es.js +1 -1
  251. package/dist/components/components.cjs +1 -1
  252. package/dist/components/components.es.js +60 -60
  253. package/dist/components/data-table.cjs +1 -1
  254. package/dist/components/data-table.es.js +1 -1
  255. package/dist/components/date-input.cjs +1 -1
  256. package/dist/components/date-input.es.js +1 -1
  257. package/dist/components/date-picker.cjs +1 -1
  258. package/dist/components/date-picker.es.js +1 -1
  259. package/dist/components/date-range-picker.cjs +1 -1
  260. package/dist/components/date-range-picker.es.js +1 -1
  261. package/dist/components/dialog.cjs +1 -1
  262. package/dist/components/dialog.es.js +1 -1
  263. package/dist/components/divider.cjs +1 -1
  264. package/dist/components/divider.es.js +1 -1
  265. package/dist/components/flex.cjs +1 -1
  266. package/dist/components/flex.es.js +1 -1
  267. package/dist/components/form-field.cjs +1 -1
  268. package/dist/components/form-field.es.js +1 -1
  269. package/dist/components/grid.cjs +1 -1
  270. package/dist/components/grid.es.js +1 -1
  271. package/dist/components/heading.cjs +1 -1
  272. package/dist/components/heading.es.js +2 -2
  273. package/dist/components/icon-button.cjs +1 -1
  274. package/dist/components/icon-button.es.js +1 -1
  275. package/dist/components/icon-toggle-button.cjs +1 -1
  276. package/dist/components/icon-toggle-button.es.js +1 -1
  277. package/dist/components/icon.cjs +1 -1
  278. package/dist/components/icon.es.js +1 -1
  279. package/dist/components/image.cjs +1 -1
  280. package/dist/components/image.es.js +1 -1
  281. package/dist/components/kbd.cjs +1 -1
  282. package/dist/components/kbd.es.js +1 -1
  283. package/dist/components/link.cjs +1 -1
  284. package/dist/components/link.es.js +1 -1
  285. package/dist/components/list.cjs +1 -1
  286. package/dist/components/list.es.js +1 -1
  287. package/dist/components/loading-spinner.cjs +1 -1
  288. package/dist/components/loading-spinner.es.js +1 -1
  289. package/dist/components/multiline-text-input.cjs +1 -1
  290. package/dist/components/multiline-text-input.es.js +1 -1
  291. package/dist/components/nimbus-provider.cjs +1 -1
  292. package/dist/components/nimbus-provider.es.js +1 -1
  293. package/dist/components/number-input.cjs +1 -1
  294. package/dist/components/number-input.es.js +1 -1
  295. package/dist/components/password-input.cjs +1 -1
  296. package/dist/components/password-input.es.js +1 -1
  297. package/dist/components/popover.cjs +1 -1
  298. package/dist/components/popover.cjs.map +1 -1
  299. package/dist/components/popover.es.js +11 -12
  300. package/dist/components/popover.es.js.map +1 -1
  301. package/dist/components/progress-bar.cjs +1 -1
  302. package/dist/components/progress-bar.es.js +1 -1
  303. package/dist/components/radio-input.cjs +1 -1
  304. package/dist/components/radio-input.es.js +1 -1
  305. package/dist/components/range-calendar.cjs +1 -1
  306. package/dist/components/range-calendar.es.js +1 -1
  307. package/dist/components/rich-text-input.cjs +1 -1
  308. package/dist/components/rich-text-input.es.js +1 -1
  309. package/dist/components/select.cjs +1 -1
  310. package/dist/components/select.es.js +1 -1
  311. package/dist/components/simple-grid.cjs +1 -1
  312. package/dist/components/simple-grid.es.js +1 -1
  313. package/dist/components/split-button.cjs +1 -1
  314. package/dist/components/split-button.es.js +1 -1
  315. package/dist/components/stack.cjs +1 -1
  316. package/dist/components/stack.es.js +1 -1
  317. package/dist/components/switch.cjs +1 -1
  318. package/dist/components/switch.es.js +1 -1
  319. package/dist/components/table.cjs +1 -1
  320. package/dist/components/table.es.js +2 -2
  321. package/dist/components/tag-group.cjs +1 -1
  322. package/dist/components/tag-group.es.js +1 -1
  323. package/dist/components/text-input.cjs +1 -1
  324. package/dist/components/text-input.es.js +1 -1
  325. package/dist/components/text.cjs +1 -1
  326. package/dist/components/text.es.js +1 -1
  327. package/dist/components/time-input.cjs +1 -1
  328. package/dist/components/time-input.es.js +1 -1
  329. package/dist/components/toggle-button-group.cjs +1 -1
  330. package/dist/components/toggle-button-group.es.js +1 -1
  331. package/dist/components/toggle-button.cjs +1 -1
  332. package/dist/components/toggle-button.es.js +1 -1
  333. package/dist/components/toolbar.cjs +1 -1
  334. package/dist/components/toolbar.es.js +1 -1
  335. package/dist/components/tooltip.cjs +1 -1
  336. package/dist/components/tooltip.es.js +1 -1
  337. package/dist/index.cjs +1 -1
  338. package/dist/index.cjs.map +1 -1
  339. package/dist/index.es.js +54 -54
  340. package/package.json +3 -3
  341. package/dist/chunks/accordion-Be--VNW6.cjs.js +0 -2
  342. package/dist/chunks/alert-CsJON6h-.cjs.js +0 -2
  343. package/dist/chunks/avatar-DEAravTR.cjs.js +0 -2
  344. package/dist/chunks/avatar.recipe-CQivdbFs.cjs.js +0 -2
  345. package/dist/chunks/badge-BjhZ-byo.cjs.js +0 -2
  346. package/dist/chunks/box-BK_2R49p.es.js +0 -13
  347. package/dist/chunks/box-BK_2R49p.es.js.map +0 -1
  348. package/dist/chunks/box-BwCVnAwb.cjs.js +0 -2
  349. package/dist/chunks/box-BwCVnAwb.cjs.js.map +0 -1
  350. package/dist/chunks/button-CihUSHJo.cjs.js +0 -2
  351. package/dist/chunks/button.recipe-ClPhJ93N.cjs.js +0 -2
  352. package/dist/chunks/calendar-C-YasyPe.cjs.js +0 -2
  353. package/dist/chunks/card-DgvP36g1.cjs.js +0 -2
  354. package/dist/chunks/checkbox-6DkVAh4W.cjs.js +0 -2
  355. package/dist/chunks/code-C3WbF6Qh.cjs.js +0 -2
  356. package/dist/chunks/code-C3WbF6Qh.cjs.js.map +0 -1
  357. package/dist/chunks/code-DM_AtVy-.es.js +0 -8
  358. package/dist/chunks/code-DM_AtVy-.es.js.map +0 -1
  359. package/dist/chunks/combobox-CLGVlx_7.cjs.js +0 -2
  360. package/dist/chunks/config-Mt8_uyhI.cjs.js +0 -2
  361. package/dist/chunks/config-Mt8_uyhI.cjs.js.map +0 -1
  362. package/dist/chunks/config-ufbQ08Vi.es.js +0 -6
  363. package/dist/chunks/config-ufbQ08Vi.es.js.map +0 -1
  364. package/dist/chunks/create-recipe-context-CrNaylZN.es.js +0 -62
  365. package/dist/chunks/create-recipe-context-CrNaylZN.es.js.map +0 -1
  366. package/dist/chunks/create-recipe-context-bXYFTZLs.cjs.js +0 -2
  367. package/dist/chunks/create-recipe-context-bXYFTZLs.cjs.js.map +0 -1
  368. package/dist/chunks/create-slot-recipe-context--T0CaFjW.es.js +0 -104
  369. package/dist/chunks/create-slot-recipe-context--T0CaFjW.es.js.map +0 -1
  370. package/dist/chunks/create-slot-recipe-context-CimocFDH.cjs.js +0 -2
  371. package/dist/chunks/create-slot-recipe-context-CimocFDH.cjs.js.map +0 -1
  372. package/dist/chunks/data-table-B8hn0UVI.cjs.js +0 -2
  373. package/dist/chunks/data-table-B8hn0UVI.cjs.js.map +0 -1
  374. package/dist/chunks/data-table-BmhYF5gH.es.js.map +0 -1
  375. package/dist/chunks/date-input-BR6daiWa.es.js +0 -17
  376. package/dist/chunks/date-input-VXO92NPV.cjs.js +0 -2
  377. package/dist/chunks/date-picker-DNaxpmgh.cjs.js +0 -2
  378. package/dist/chunks/date-range-picker-B5s-AFSY.cjs.js +0 -2
  379. package/dist/chunks/dialog-BQa_NWSr.cjs.js +0 -2
  380. package/dist/chunks/dialog-BQa_NWSr.cjs.js.map +0 -1
  381. package/dist/chunks/dialog-D4u5so0e.es.js +0 -1912
  382. package/dist/chunks/dialog-D4u5so0e.es.js.map +0 -1
  383. package/dist/chunks/divider-DU351gdE.cjs.js +0 -2
  384. package/dist/chunks/empty-B5_AO6Pg.cjs.js +0 -2
  385. package/dist/chunks/empty-B5_AO6Pg.cjs.js.map +0 -1
  386. package/dist/chunks/empty-D7ZFmvo6.es.js +0 -8
  387. package/dist/chunks/empty-D7ZFmvo6.es.js.map +0 -1
  388. package/dist/chunks/factory-CVGqU9CD.cjs.js +0 -3
  389. package/dist/chunks/factory-CVGqU9CD.cjs.js.map +0 -1
  390. package/dist/chunks/factory-DmIX2puY.es.js +0 -269
  391. package/dist/chunks/factory-DmIX2puY.es.js.map +0 -1
  392. package/dist/chunks/flex-BFC_f5BH.es.js +0 -40
  393. package/dist/chunks/flex-BFC_f5BH.es.js.map +0 -1
  394. package/dist/chunks/flex-yqydM5z_.cjs.js +0 -2
  395. package/dist/chunks/flex-yqydM5z_.cjs.js.map +0 -1
  396. package/dist/chunks/grid-B3Ggy_FW.es.js +0 -14
  397. package/dist/chunks/grid-CXpKN2OR.cjs.js +0 -2
  398. package/dist/chunks/grid-item-CGwfSnm7.cjs.js +0 -2
  399. package/dist/chunks/grid-item-CGwfSnm7.cjs.js.map +0 -1
  400. package/dist/chunks/grid-item-DuAynDd1.es.js +0 -78
  401. package/dist/chunks/grid-item-DuAynDd1.es.js.map +0 -1
  402. package/dist/chunks/icon-DHoLo7_S.cjs.js +0 -2
  403. package/dist/chunks/image-B3ISQSVL.cjs.js +0 -2
  404. package/dist/chunks/image-B3ISQSVL.cjs.js.map +0 -1
  405. package/dist/chunks/image-CwcCZREa.es.js +0 -22
  406. package/dist/chunks/image-CwcCZREa.es.js.map +0 -1
  407. package/dist/chunks/image-MeWmLoV0.es.js +0 -8
  408. package/dist/chunks/image-bt28epM5.cjs.js +0 -2
  409. package/dist/chunks/index-46Tt2Ww4.es.js +0 -8
  410. package/dist/chunks/index-46Tt2Ww4.es.js.map +0 -1
  411. package/dist/chunks/index-BYEAMD8A.cjs.js +0 -2
  412. package/dist/chunks/index-BYEAMD8A.cjs.js.map +0 -1
  413. package/dist/chunks/index-BsmdMT4w.cjs.js +0 -4
  414. package/dist/chunks/kbd-Bc97Bwq3.es.js +0 -16
  415. package/dist/chunks/kbd-BlZ2RGfa.cjs.js +0 -2
  416. package/dist/chunks/kbd.recipe-9kxAU5ro.cjs.js +0 -2
  417. package/dist/chunks/link-DzUonoQg.cjs.js +0 -2
  418. package/dist/chunks/link.recipe-BfCxtKjL.cjs.js +0 -2
  419. package/dist/chunks/list-BTkkDy6B.es.js +0 -23
  420. package/dist/chunks/list-BTkkDy6B.es.js.map +0 -1
  421. package/dist/chunks/list-DokC0Ks-.cjs.js +0 -2
  422. package/dist/chunks/list-DokC0Ks-.cjs.js.map +0 -1
  423. package/dist/chunks/loading-spinner-VVQyl725.cjs.js +0 -2
  424. package/dist/chunks/menu-C8il9--K.cjs.js +0 -2
  425. package/dist/chunks/multiline-text-input-D28clI-o.cjs.js +0 -12
  426. package/dist/chunks/namespace---Td8pR2.es.js +0 -74
  427. package/dist/chunks/namespace---Td8pR2.es.js.map +0 -1
  428. package/dist/chunks/namespace-CpLmDcCq.cjs.js +0 -2
  429. package/dist/chunks/namespace-CpLmDcCq.cjs.js.map +0 -1
  430. package/dist/chunks/nimbus-provider-BlfO5_bi.cjs.js +0 -2
  431. package/dist/chunks/number-input-CCEiz-4P.cjs.js +0 -2
  432. package/dist/chunks/progress-bar-0RRIR4ef.cjs.js +0 -2
  433. package/dist/chunks/provider-CHFgwvsP.es.js +0 -989
  434. package/dist/chunks/provider-CHFgwvsP.es.js.map +0 -1
  435. package/dist/chunks/provider-DFlBEH6q.cjs.js +0 -16
  436. package/dist/chunks/provider-DFlBEH6q.cjs.js.map +0 -1
  437. package/dist/chunks/radio-input-B40xSi6r.cjs.js +0 -2
  438. package/dist/chunks/range-calendar-BiNek1C7.cjs.js +0 -2
  439. package/dist/chunks/select-BuXA5VgT.cjs.js +0 -2
  440. package/dist/chunks/simple-grid-B7BgfVAS.cjs.js +0 -2
  441. package/dist/chunks/simple-grid-B7BgfVAS.cjs.js.map +0 -1
  442. package/dist/chunks/simple-grid-C6GRMtip.es.js +0 -38
  443. package/dist/chunks/simple-grid-C6GRMtip.es.js.map +0 -1
  444. package/dist/chunks/stack-BG0j9HvT.cjs.js +0 -2
  445. package/dist/chunks/stack-BG0j9HvT.cjs.js.map +0 -1
  446. package/dist/chunks/stack-QzuqKTKb.es.js +0 -89
  447. package/dist/chunks/stack-QzuqKTKb.es.js.map +0 -1
  448. package/dist/chunks/switch-BQXiI02l.cjs.js +0 -2
  449. package/dist/chunks/tag-group-DwTq8DeA.cjs.js +0 -2
  450. package/dist/chunks/text-DSjt3Sqv.es.js +0 -26
  451. package/dist/chunks/text-DSjt3Sqv.es.js.map +0 -1
  452. package/dist/chunks/text-Dg1sFCuC.cjs.js +0 -2
  453. package/dist/chunks/text-Dg1sFCuC.cjs.js.map +0 -1
  454. package/dist/chunks/text-input-DJUpcp3k.cjs.js +0 -2
  455. package/dist/chunks/text-input-Dinn4J2V.es.js +0 -19
  456. package/dist/chunks/time-input-B5oRiIpu.cjs.js +0 -2
  457. package/dist/chunks/toggle-button-C_7Evcn3.cjs.js +0 -2
  458. package/dist/chunks/toggle-button-RS4Z6UNN.es.js +0 -30
  459. package/dist/chunks/toggle-button-group-LddoXszz.cjs.js +0 -2
  460. package/dist/chunks/tooltip-CIAEV4_B.cjs.js +0 -2
  461. package/dist/chunks/tooltip.recipe-VqGdDqQD.cjs.js +0 -2
  462. package/dist/chunks/use-recipe-DuU8En0C.es.js +0 -13
  463. package/dist/chunks/use-recipe-DuU8En0C.es.js.map +0 -1
  464. package/dist/chunks/use-recipe-pbWWLWIq.cjs.js +0 -2
  465. package/dist/chunks/use-recipe-pbWWLWIq.cjs.js.map +0 -1
  466. package/dist/chunks/walk-object-CPVtf-bb.cjs.js +0 -2
  467. package/dist/chunks/walk-object-CPVtf-bb.cjs.js.map +0 -1
  468. package/dist/chunks/walk-object-Dpb8i9wi.es.js +0 -27
  469. package/dist/chunks/walk-object-Dpb8i9wi.es.js.map +0 -1
@@ -1,1912 +0,0 @@
1
- import { jsx as C, Fragment as Re, jsxs as xt } from "react/jsx-runtime";
2
- import { useMemo as Dt, useRef as x, useLayoutEffect as kt, useEffect as re, useState as Ne, createContext as Ft, useContext as It, memo as At, forwardRef as _, createElement as St, isValidElement as Lt, Children as ze, cloneElement as Rt, useCallback as Bt, useId as Mt, useSyncExternalStore as $t } from "react";
3
- import { flushSync as De, createPortal as _t } from "react-dom";
4
- import { c as Gt } from "./create-slot-recipe-context--T0CaFjW.es.js";
5
- import { c as Vt } from "./factory-DmIX2puY.es.js";
6
- function Ut(e) {
7
- return e == null ? [] : Array.isArray(e) ? e : [e];
8
- }
9
- var Wt = (e) => e != null && typeof e == "object", le = (e) => typeof e == "string", Y = (e) => typeof e == "function", jt = (e, t) => Object.prototype.hasOwnProperty.call(e, t), Kt = (e) => Object.prototype.toString.call(e), Xe = Function.prototype.toString, qt = /* @__PURE__ */ Xe.call(Object), Ht = (e) => {
10
- if (!Wt(e) || Kt(e) != "[object Object]" || Yt(e)) return !1;
11
- const t = Object.getPrototypeOf(e);
12
- if (t === null) return !0;
13
- const r = jt(t, "constructor") && t.constructor;
14
- return typeof r == "function" && r instanceof r && Xe.call(r) == qt;
15
- }, zt = (e) => typeof e == "object" && e !== null && "$$typeof" in e && "props" in e, Xt = (e) => typeof e == "object" && e !== null && "__v_isVNode" in e, Yt = (e) => zt(e) || Xt(e), Zt = (e) => e(), Pe = (...e) => (...t) => {
16
- e.forEach(function(r) {
17
- r?.(...t);
18
- });
19
- };
20
- function Ye(e) {
21
- if (!Ht(e) || e === void 0) return e;
22
- const t = Reflect.ownKeys(e).filter((n) => typeof n == "string"), r = {};
23
- for (const n of t) {
24
- const o = e[n];
25
- o !== void 0 && (r[n] = Ye(o));
26
- }
27
- return r;
28
- }
29
- function we(...e) {
30
- const t = e.length === 1 ? e[0] : e[1];
31
- (e.length === 2 ? e[0] : !0) && process.env.NODE_ENV !== "production" && console.warn(t);
32
- }
33
- function Jt(e, t) {
34
- if (e == null) throw new Error(t());
35
- }
36
- var Ze = () => {
37
- }, he = (e) => typeof e == "object" && e !== null, Qt = 1, en = 9, tn = 11, D = (e) => he(e) && e.nodeType === Qt && typeof e.nodeName == "string", ke = (e) => he(e) && e.nodeType === en, nn = (e) => he(e) && e === e.window, Je = (e) => D(e) ? e.localName || "" : "#document";
38
- function rn(e) {
39
- return ["html", "body", "#document"].includes(Je(e));
40
- }
41
- var on = (e) => he(e) && e.nodeType !== void 0, Z = (e) => on(e) && e.nodeType === tn && "host" in e, sn = (e) => D(e) && e.localName === "input", an = (e) => D(e) ? e.offsetWidth > 0 || e.offsetHeight > 0 || e.getClientRects().length > 0 : !1, cn = /(textarea|select)/;
42
- function un(e) {
43
- if (e == null || !D(e)) return !1;
44
- try {
45
- return sn(e) && e.selectionStart != null || cn.test(e.localName) || e.isContentEditable || e.getAttribute("contenteditable") === "true" || e.getAttribute("contenteditable") === "";
46
- } catch {
47
- return !1;
48
- }
49
- }
50
- function de(e, t) {
51
- if (!e || !t || !D(e) || !D(t)) return !1;
52
- const r = t.getRootNode?.();
53
- if (e === t || e.contains(t)) return !0;
54
- if (r && Z(r)) {
55
- let n = t;
56
- for (; n; ) {
57
- if (e === n) return !0;
58
- n = n.parentNode || n.host;
59
- }
60
- }
61
- return !1;
62
- }
63
- function R(e) {
64
- return ke(e) ? e : nn(e) ? e.document : e?.ownerDocument ?? document;
65
- }
66
- function ln(e) {
67
- return R(e).documentElement;
68
- }
69
- function oe(e) {
70
- return Z(e) ? oe(e.host) : ke(e) ? e.defaultView ?? window : D(e) ? e.ownerDocument?.defaultView ?? window : window;
71
- }
72
- function Qe(e) {
73
- let t = e.activeElement;
74
- for (; t?.shadowRoot; ) {
75
- const r = t.shadowRoot.activeElement;
76
- if (r === t) break;
77
- t = r;
78
- }
79
- return t;
80
- }
81
- function dn(e) {
82
- if (Je(e) === "html") return e;
83
- const t = e.assignedSlot || e.parentNode || Z(e) && e.host || ln(e);
84
- return Z(t) ? t.host : t;
85
- }
86
- var me = /* @__PURE__ */ new WeakMap();
87
- function et(e) {
88
- return me.has(e) || me.set(e, oe(e).getComputedStyle(e)), me.get(e);
89
- }
90
- var tt = () => typeof document < "u";
91
- function fn() {
92
- return navigator.userAgentData?.platform ?? navigator.platform;
93
- }
94
- var Fe = (e) => tt() && e.test(fn()), Be = () => tt() && !!navigator.maxTouchPoints, pn = () => Fe(/^iPhone/i), hn = () => Fe(/^iPad/i) || nt() && navigator.maxTouchPoints > 1, gn = () => pn() || hn(), nt = () => Fe(/^Mac/i);
95
- function mn(e) {
96
- return e.composedPath?.() ?? e.nativeEvent?.composedPath?.();
97
- }
98
- function M(e) {
99
- return mn(e)?.[0] ?? e.target;
100
- }
101
- var vn = (e) => e.button === 2 || nt() && e.ctrlKey && e.button === 0, L = (e, t, r, n) => {
102
- const o = typeof e == "function" ? e() : e;
103
- return o?.addEventListener(t, r, n), () => {
104
- o?.removeEventListener(t, r, n);
105
- };
106
- }, rt = (e) => D(e) && e.tagName === "IFRAME", yn = (e) => !Number.isNaN(parseInt(e.getAttribute("tabindex") || "0", 10)), bn = (e) => parseInt(e.getAttribute("tabindex") || "0", 10) < 0, Ie = "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", ot = (e, t = !1) => {
107
- if (!e) return [];
108
- const r = Array.from(e.querySelectorAll(Ie));
109
- (t == !0 || t == "if-empty" && r.length === 0) && D(e) && U(e) && r.unshift(e);
110
- const o = r.filter(U);
111
- return o.forEach((s, i) => {
112
- if (rt(s) && s.contentDocument) {
113
- const a = s.contentDocument.body;
114
- o.splice(i, 1, ...ot(a));
115
- }
116
- }), o;
117
- };
118
- function U(e) {
119
- return !e || e.closest("[inert]") ? !1 : e.matches(Ie) && an(e);
120
- }
121
- function st(e, t) {
122
- if (!e) return [];
123
- const n = Array.from(e.querySelectorAll(Ie)).filter(K);
124
- return n.forEach((o, s) => {
125
- if (rt(o) && o.contentDocument) {
126
- const i = o.contentDocument.body, a = st(i);
127
- n.splice(s, 1, ...a);
128
- }
129
- }), n.length, n;
130
- }
131
- function K(e) {
132
- return e != null && e.tabIndex > 0 ? !0 : U(e) && !bn(e);
133
- }
134
- function Q(e) {
135
- return e.tabIndex < 0 && (/^(audio|video|details)$/.test(e.localName) || un(e)) && !yn(e) ? 0 : e.tabIndex;
136
- }
137
- function En(e) {
138
- const t = /* @__PURE__ */ new Set();
139
- function r(n) {
140
- const o = globalThis.requestAnimationFrame(n);
141
- t.add(() => globalThis.cancelAnimationFrame(o));
142
- }
143
- return r(() => r(e)), function() {
144
- t.forEach((o) => o());
145
- };
146
- }
147
- function $(e) {
148
- let t;
149
- const r = globalThis.requestAnimationFrame(() => {
150
- t = e();
151
- });
152
- return () => {
153
- globalThis.cancelAnimationFrame(r), t?.();
154
- };
155
- }
156
- function Oe(e) {
157
- const t = dn(e);
158
- return rn(t) ? R(t).body : D(t) && wn(t) ? t : Oe(t);
159
- }
160
- var Nn = /auto|scroll|overlay|hidden|clip/, Pn = /* @__PURE__ */ new Set(["inline", "contents"]);
161
- function wn(e) {
162
- const t = oe(e), { overflow: r, overflowX: n, overflowY: o, display: s } = t.getComputedStyle(e);
163
- return Nn.test(r + o + n) && !Pn.has(s);
164
- }
165
- function fe(e, t) {
166
- if (!e) return Ze;
167
- const r = Object.keys(t).reduce((n, o) => (n[o] = e.style.getPropertyValue(o), n), {});
168
- return Object.assign(e.style, t), () => {
169
- Object.assign(e.style, r), e.style.length === 0 && e.removeAttribute("style");
170
- };
171
- }
172
- function On(e, t, r) {
173
- if (!e) return Ze;
174
- const n = e.style.getPropertyValue(t);
175
- return e.style.setProperty(t, r), () => {
176
- e.style.setProperty(t, n), e.style.length === 0 && e.removeAttribute("style");
177
- };
178
- }
179
- function Cn(e, t, r) {
180
- const { signal: n } = t;
181
- return [new Promise((i, a) => {
182
- const u = setTimeout(() => {
183
- a(new Error(`Timeout of ${r}ms exceeded`));
184
- }, r);
185
- n.addEventListener("abort", () => {
186
- clearTimeout(u), a(new Error("Promise aborted"));
187
- }), e.then((c) => {
188
- n.aborted || (clearTimeout(u), i(c));
189
- }).catch((c) => {
190
- n.aborted || (clearTimeout(u), a(c));
191
- });
192
- }), () => t.abort()];
193
- }
194
- function Tn(e, t) {
195
- const { timeout: r, rootNode: n } = t, o = oe(n), s = R(n), i = new o.AbortController();
196
- return Cn(
197
- new Promise((a) => {
198
- const u = e();
199
- if (u) {
200
- a(u);
201
- return;
202
- }
203
- const c = new o.MutationObserver(() => {
204
- const d = e();
205
- d && d.isConnected && (c.disconnect(), a(d));
206
- });
207
- c.observe(s.body, {
208
- childList: !0,
209
- subtree: !0
210
- });
211
- }),
212
- i,
213
- r
214
- );
215
- }
216
- var xn = (...e) => e.map((t) => t?.trim?.()).filter(Boolean).join(" "), Dn = /((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g, Me = (e) => {
217
- const t = {};
218
- let r;
219
- for (; r = Dn.exec(e); )
220
- t[r[1]] = r[2];
221
- return t;
222
- }, kn = (e, t) => {
223
- if (le(e)) {
224
- if (le(t)) return `${e};${t}`;
225
- e = Me(e);
226
- } else le(t) && (t = Me(t));
227
- return Object.assign({}, e ?? {}, t ?? {});
228
- };
229
- function G(...e) {
230
- let t = {};
231
- for (let r of e) {
232
- for (let n in t) {
233
- if (n.startsWith("on") && typeof t[n] == "function" && typeof r[n] == "function") {
234
- t[n] = Pe(r[n], t[n]);
235
- continue;
236
- }
237
- if (n === "className" || n === "class") {
238
- t[n] = xn(t[n], r[n]);
239
- continue;
240
- }
241
- if (n === "style") {
242
- t[n] = kn(t[n], r[n]);
243
- continue;
244
- }
245
- t[n] = r[n] !== void 0 ? r[n] : t[n];
246
- }
247
- for (let n in r)
248
- t[n] === void 0 && (t[n] = r[n]);
249
- }
250
- return t;
251
- }
252
- var X = /* @__PURE__ */ ((e) => (e.NotStarted = "Not Started", e.Started = "Started", e.Stopped = "Stopped", e))(X || {}), ve = "__init__";
253
- function Fn(e) {
254
- const t = () => e.getRootNode?.() ?? document, r = () => R(t()), n = () => r().defaultView ?? window, o = () => Qe(t());
255
- return {
256
- ...e,
257
- getRootNode: t,
258
- getDoc: r,
259
- getWin: n,
260
- getActiveElement: o,
261
- isActiveElement: (a) => a === o(),
262
- getById: (a) => t().getElementById(a)
263
- };
264
- }
265
- function In(e) {
266
- return new Proxy({}, {
267
- get(t, r) {
268
- return r === "style" ? (n) => e({ style: n }).style : e;
269
- }
270
- });
271
- }
272
- var it = typeof globalThis.document < "u" ? kt : re;
273
- function pe(e) {
274
- const t = e().value ?? e().defaultValue, r = e().isEqual ?? Object.is, [n] = Ne(t), [o, s] = Ne(n), i = e().value !== void 0, a = x(o);
275
- a.current = i ? e().value : o;
276
- const u = x(a.current);
277
- it(() => {
278
- u.current = a.current;
279
- }, [o, e().value]);
280
- const c = (p) => {
281
- const l = u.current, m = Y(p) ? p(l) : p;
282
- e().debug && console.log(`[bindable > ${e().debug}] setValue`, { next: m, prev: l }), i || s(m), r(m, l) || e().onChange?.(m, l);
283
- };
284
- function d() {
285
- return i ? e().value : o;
286
- }
287
- return {
288
- initial: n,
289
- ref: a,
290
- get: d,
291
- set(p) {
292
- (e().sync ? De : Zt)(() => c(p));
293
- },
294
- invoke(p, l) {
295
- e().onChange?.(p, l);
296
- },
297
- hash(p) {
298
- return e().hash?.(p) ?? String(p);
299
- }
300
- };
301
- }
302
- pe.cleanup = (e) => {
303
- re(() => e, []);
304
- };
305
- pe.ref = (e) => {
306
- const t = x(e);
307
- return {
308
- get: () => t.current,
309
- set: (r) => {
310
- t.current = r;
311
- }
312
- };
313
- };
314
- function An(e) {
315
- const t = x(e);
316
- return {
317
- get(r) {
318
- return t.current[r];
319
- },
320
- set(r, n) {
321
- t.current[r] = n;
322
- }
323
- };
324
- }
325
- var Sn = (e, t) => {
326
- const r = x(!1), n = x(!1);
327
- re(() => {
328
- if (r.current && n.current) return t();
329
- n.current = !0;
330
- }, [...(e ?? []).map((o) => typeof o == "function" ? o() : o)]), re(() => (r.current = !0, () => {
331
- r.current = !1;
332
- }), []);
333
- };
334
- function at(e, t = {}) {
335
- const r = Dt(() => {
336
- const { id: f, ids: g, getRootNode: w } = t;
337
- return Fn({ id: f, ids: g, getRootNode: w });
338
- }, [t]), n = (...f) => {
339
- e.debug && console.log(...f);
340
- }, o = e.props?.({ props: Ye(t), scope: r }) ?? t, s = Ln(o), i = e.context?.({
341
- prop: s,
342
- bindable: pe,
343
- scope: r,
344
- flush: $e,
345
- getContext() {
346
- return u;
347
- },
348
- getComputed() {
349
- return A;
350
- },
351
- getRefs() {
352
- return v;
353
- },
354
- getEvent() {
355
- return m();
356
- }
357
- }), a = ct(i), u = {
358
- get(f) {
359
- return a.current?.[f].ref.current;
360
- },
361
- set(f, g) {
362
- a.current?.[f].set(g);
363
- },
364
- initial(f) {
365
- return a.current?.[f].initial;
366
- },
367
- hash(f) {
368
- const g = a.current?.[f].get();
369
- return a.current?.[f].hash(g);
370
- }
371
- }, c = x(/* @__PURE__ */ new Map()), d = x(null), p = x(null), l = x({ type: "" }), m = () => ({
372
- ...l.current,
373
- current() {
374
- return l.current;
375
- },
376
- previous() {
377
- return p.current;
378
- }
379
- }), h = () => ({
380
- ...P,
381
- matches(...f) {
382
- return f.includes(P.ref.current);
383
- },
384
- hasTag(f) {
385
- return !!e.states[P.ref.current]?.tags?.includes(f);
386
- }
387
- }), v = An(e.refs?.({ prop: s, context: u }) ?? {}), O = () => ({
388
- state: h(),
389
- context: u,
390
- event: m(),
391
- prop: s,
392
- send: Le,
393
- action: N,
394
- guard: y,
395
- track: Sn,
396
- refs: v,
397
- computed: A,
398
- flush: $e,
399
- scope: r,
400
- choose: T
401
- }), N = (f) => {
402
- const g = Y(f) ? f(O()) : f;
403
- if (!g) return;
404
- const w = g.map((E) => {
405
- const F = e.implementations?.actions?.[E];
406
- return F || we(`[zag-js] No implementation found for action "${JSON.stringify(E)}"`), F;
407
- });
408
- for (const E of w)
409
- E?.(O());
410
- }, y = (f) => Y(f) ? f(O()) : e.implementations?.guards?.[f](O()), k = (f) => {
411
- const g = Y(f) ? f(O()) : f;
412
- if (!g) return;
413
- const w = g.map((F) => {
414
- const V = e.implementations?.effects?.[F];
415
- return V || we(`[zag-js] No implementation found for effect "${JSON.stringify(F)}"`), V;
416
- }), E = [];
417
- for (const F of w) {
418
- const V = F?.(O());
419
- V && E.push(V);
420
- }
421
- return () => E.forEach((F) => F?.());
422
- }, T = (f) => Ut(f).find((g) => {
423
- let w = !g.guard;
424
- return le(g.guard) ? w = !!y(g.guard) : Y(g.guard) && (w = g.guard(O())), w;
425
- }), A = (f) => {
426
- Jt(e.computed, () => "[zag-js] No computed object found on machine");
427
- const g = e.computed[f];
428
- return g({
429
- context: u,
430
- event: m(),
431
- prop: s,
432
- refs: v,
433
- scope: r,
434
- computed: A
435
- });
436
- }, P = pe(() => ({
437
- defaultValue: e.initialState({ prop: s }),
438
- onChange(f, g) {
439
- g && (c.current.get(g)?.(), c.current.delete(g)), g && N(e.states[g]?.exit), N(d.current?.actions);
440
- const w = k(e.states[f]?.effects);
441
- if (w && c.current.set(f, w), g === ve) {
442
- N(e.entry);
443
- const E = k(e.effects);
444
- E && c.current.set(ve, E);
445
- }
446
- N(e.states[f]?.entry);
447
- }
448
- })), J = x(void 0), S = x(X.NotStarted);
449
- it(() => {
450
- queueMicrotask(() => {
451
- const w = S.current === X.Started;
452
- S.current = X.Started, n(w ? "rehydrating..." : "initializing...");
453
- const E = J.current ?? P.initial;
454
- P.invoke(E, w ? P.get() : ve);
455
- });
456
- const f = c.current, g = P.ref.current;
457
- return () => {
458
- n("unmounting..."), J.current = g, S.current = X.Stopped, f.forEach((w) => w?.()), c.current = /* @__PURE__ */ new Map(), d.current = null, queueMicrotask(() => {
459
- N(e.exit);
460
- });
461
- };
462
- }, []);
463
- const ge = () => "ref" in P ? P.ref.current : P.get(), Le = (f) => {
464
- queueMicrotask(() => {
465
- if (S.current !== X.Started) return;
466
- p.current = l.current, l.current = f;
467
- let g = ge();
468
- const w = (
469
- // @ts-ignore
470
- e.states[g].on?.[f.type] ?? // @ts-ignore
471
- e.on?.[f.type]
472
- ), E = T(w);
473
- if (!E) return;
474
- d.current = E;
475
- const F = E.target ?? g;
476
- n("transition", f.type, E.target || g, `(${E.actions})`);
477
- const V = F !== g;
478
- V ? De(() => P.set(F)) : E.reenter && !V ? P.invoke(g, g) : N(E.actions ?? []);
479
- });
480
- };
481
- return e.watch?.(O()), {
482
- state: h(),
483
- send: Le,
484
- context: u,
485
- prop: s,
486
- scope: r,
487
- refs: v,
488
- computed: A,
489
- event: m(),
490
- getStatus: () => S.current
491
- };
492
- }
493
- function ct(e) {
494
- const t = x(e);
495
- return t.current = e, t;
496
- }
497
- function Ln(e) {
498
- const t = ct(e);
499
- return function(n) {
500
- return t.current[n];
501
- };
502
- }
503
- function $e(e) {
504
- queueMicrotask(() => {
505
- De(() => e());
506
- });
507
- }
508
- var Rn = /* @__PURE__ */ In((e) => e);
509
- function Ae(...e) {
510
- return (t) => {
511
- const r = [];
512
- for (const n of e)
513
- if (typeof n == "function") {
514
- const o = n(t);
515
- typeof o == "function" && r.push(o);
516
- } else n && (n.current = t);
517
- if (r.length)
518
- return () => {
519
- for (const n of r)
520
- n();
521
- };
522
- };
523
- }
524
- function Bn(e, t) {
525
- return `${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`;
526
- }
527
- function se(e = {}) {
528
- const {
529
- name: t,
530
- strict: r = !0,
531
- hookName: n = "useContext",
532
- providerName: o = "Provider",
533
- errorMessage: s,
534
- defaultValue: i
535
- } = e, a = Ft(i);
536
- a.displayName = t;
537
- function u() {
538
- const c = It(a);
539
- if (!c && r) {
540
- const d = new Error(s ?? Bn(n, o));
541
- throw d.name = "ContextError", Error.captureStackTrace?.(d, u), d;
542
- }
543
- return c;
544
- }
545
- return [a.Provider, u, a];
546
- }
547
- const ut = () => (e, t) => t.reduce(
548
- (r, n) => {
549
- const [o, s] = r, i = n;
550
- return s[i] !== void 0 && (o[i] = s[i]), delete s[i], [o, s];
551
- },
552
- [{}, { ...e }]
553
- ), [Mn, $n] = /* @__PURE__ */ se({
554
- name: "RenderStrategyContext",
555
- hookName: "useRenderStrategyContext",
556
- providerName: "<RenderStrategyPropsProvider />"
557
- }), _n = (e) => ut()(e, ["lazyMount", "unmountOnExit"]);
558
- function Gn(e) {
559
- let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, r = t && "isReactWarning" in t && t.isReactWarning;
560
- 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);
561
- }
562
- const ye = (e) => {
563
- const t = At(
564
- _((r, n) => {
565
- const { asChild: o, children: s, ...i } = r;
566
- if (!o)
567
- return St(e, { ...i, ref: n }, s);
568
- if (!Lt(s))
569
- return null;
570
- const a = ze.only(s), u = Gn(a);
571
- return Rt(a, {
572
- ...G(i, a.props),
573
- ref: n ? Ae(n, u) : u
574
- });
575
- })
576
- );
577
- return t.displayName = e.displayName || e.name, t;
578
- }, Vn = () => {
579
- const e = /* @__PURE__ */ new Map();
580
- return new Proxy(ye, {
581
- apply(t, r, n) {
582
- return ye(n[0]);
583
- },
584
- get(t, r) {
585
- const n = r;
586
- return e.has(n) || e.set(n, ye(n)), e.get(n);
587
- }
588
- });
589
- }, q = /* @__PURE__ */ Vn();
590
- function Un(e, t) {
591
- const { state: r, send: n, context: o } = e, s = r.matches("mounted", "unmountSuspended");
592
- return {
593
- skip: !o.get("initial"),
594
- present: s,
595
- setNode(i) {
596
- i && n({ type: "NODE.SET", node: i });
597
- },
598
- unmount() {
599
- n({ type: "UNMOUNT" });
600
- }
601
- };
602
- }
603
- var Wn = {
604
- props({ props: e }) {
605
- return { ...e, present: !!e.present };
606
- },
607
- initialState({ prop: e }) {
608
- return e("present") ? "mounted" : "unmounted";
609
- },
610
- refs() {
611
- return {
612
- node: null,
613
- styles: null
614
- };
615
- },
616
- context({ bindable: e }) {
617
- return {
618
- unmountAnimationName: e(() => ({ defaultValue: null })),
619
- prevAnimationName: e(() => ({ defaultValue: null })),
620
- present: e(() => ({ defaultValue: !1 })),
621
- initial: e(() => ({
622
- sync: !0,
623
- defaultValue: !1
624
- }))
625
- };
626
- },
627
- exit: ["clearInitial", "cleanupNode"],
628
- watch({ track: e, prop: t, send: r }) {
629
- e([() => t("present")], () => {
630
- r({ type: "PRESENCE.CHANGED" });
631
- });
632
- },
633
- on: {
634
- "NODE.SET": {
635
- actions: ["setupNode"]
636
- },
637
- "PRESENCE.CHANGED": {
638
- actions: ["setInitial", "syncPresence"]
639
- }
640
- },
641
- states: {
642
- mounted: {
643
- on: {
644
- UNMOUNT: {
645
- target: "unmounted",
646
- actions: ["clearPrevAnimationName", "invokeOnExitComplete"]
647
- },
648
- "UNMOUNT.SUSPEND": {
649
- target: "unmountSuspended"
650
- }
651
- }
652
- },
653
- unmountSuspended: {
654
- effects: ["trackAnimationEvents"],
655
- on: {
656
- MOUNT: {
657
- target: "mounted",
658
- actions: ["setPrevAnimationName"]
659
- },
660
- UNMOUNT: {
661
- target: "unmounted",
662
- actions: ["clearPrevAnimationName", "invokeOnExitComplete"]
663
- }
664
- }
665
- },
666
- unmounted: {
667
- on: {
668
- MOUNT: {
669
- target: "mounted",
670
- actions: ["setPrevAnimationName"]
671
- }
672
- }
673
- }
674
- },
675
- implementations: {
676
- actions: {
677
- setInitial: ({ context: e }) => {
678
- e.get("initial") || queueMicrotask(() => {
679
- e.set("initial", !0);
680
- });
681
- },
682
- clearInitial: ({ context: e }) => {
683
- e.set("initial", !1);
684
- },
685
- invokeOnExitComplete: ({ prop: e }) => {
686
- e("onExitComplete")?.();
687
- },
688
- setupNode: ({ refs: e, event: t }) => {
689
- e.get("node") !== t.node && (e.set("node", t.node), e.set("styles", et(t.node)));
690
- },
691
- cleanupNode: ({ refs: e }) => {
692
- e.set("node", null), e.set("styles", null);
693
- },
694
- syncPresence: ({ context: e, refs: t, send: r, prop: n }) => {
695
- const o = n("present");
696
- if (o)
697
- return r({ type: "MOUNT", src: "presence.changed" });
698
- const s = t.get("node");
699
- if (!o && s?.ownerDocument.visibilityState === "hidden")
700
- return r({ type: "UNMOUNT", src: "visibilitychange" });
701
- $(() => {
702
- const i = ie(t.get("styles"));
703
- 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" });
704
- });
705
- },
706
- setPrevAnimationName: ({ context: e, refs: t }) => {
707
- $(() => {
708
- e.set("prevAnimationName", ie(t.get("styles")));
709
- });
710
- },
711
- clearPrevAnimationName: ({ context: e }) => {
712
- e.set("prevAnimationName", null);
713
- }
714
- },
715
- effects: {
716
- trackAnimationEvents: ({ context: e, refs: t, send: r }) => {
717
- const n = t.get("node");
718
- if (!n) return;
719
- const o = (a) => {
720
- (a.composedPath?.()?.[0] ?? a.target) === n && e.set("prevAnimationName", ie(t.get("styles")));
721
- }, s = (a) => {
722
- const u = ie(t.get("styles"));
723
- M(a) === n && u === e.get("unmountAnimationName") && r({ type: "UNMOUNT", src: "animationend" });
724
- };
725
- n.addEventListener("animationstart", o), n.addEventListener("animationcancel", s), n.addEventListener("animationend", s);
726
- const i = fe(n, { animationFillMode: "forwards" });
727
- return () => {
728
- n.removeEventListener("animationstart", o), n.removeEventListener("animationcancel", s), n.removeEventListener("animationend", s), En(() => i());
729
- };
730
- }
731
- }
732
- }
733
- };
734
- function ie(e) {
735
- return e?.animationName || "none";
736
- }
737
- function jn(e, t = {}) {
738
- const { sync: r = !1 } = t, n = Kn(e);
739
- return Bt(
740
- (...o) => r ? queueMicrotask(() => n.current?.(...o)) : n.current?.(...o),
741
- [r, n]
742
- );
743
- }
744
- function Kn(e) {
745
- const t = x(e);
746
- return t.current = e, t;
747
- }
748
- const lt = (e = {}) => {
749
- const { lazyMount: t, unmountOnExit: r, present: n, skipAnimationOnMount: o = !1, ...s } = e, i = x(!1), a = {
750
- ...s,
751
- present: n,
752
- onExitComplete: jn(e.onExitComplete)
753
- }, u = at(Wn, a), c = Un(u);
754
- c.present && (i.current = !0);
755
- const d = !c.present && !i.current && t || r && !c.present && i.current, p = () => ({
756
- "data-state": c.skip && o ? void 0 : n ? "open" : "closed",
757
- hidden: !c.present
758
- });
759
- return {
760
- ref: c.setNode,
761
- getPresenceProps: p,
762
- present: c.present,
763
- unmounted: d
764
- };
765
- }, [qn, W] = /* @__PURE__ */ se({
766
- name: "DialogContext",
767
- hookName: "useDialogContext",
768
- providerName: "<DialogProvider />"
769
- }), dt = /* @__PURE__ */ _((e, t) => {
770
- const r = W(), n = $n(), o = lt({ ...n, present: r.open }), s = G(r.getBackdropProps(), o.getPresenceProps(), e);
771
- return o.unmounted ? null : /* @__PURE__ */ C(q.div, { ...s, ref: Ae(o.ref, t) });
772
- });
773
- dt.displayName = "DialogBackdrop";
774
- const ft = /* @__PURE__ */ _((e, t) => {
775
- const r = W(), n = G(r.getCloseTriggerProps(), e);
776
- return /* @__PURE__ */ C(q.button, { ...n, ref: t });
777
- });
778
- ft.displayName = "DialogCloseTrigger";
779
- const [Hn, Se] = /* @__PURE__ */ se({
780
- name: "PresenceContext",
781
- hookName: "usePresenceContext",
782
- providerName: "<PresenceProvider />"
783
- }), pt = /* @__PURE__ */ _((e, t) => {
784
- const r = W(), n = Se(), o = G(r.getContentProps(), n.getPresenceProps(), e);
785
- return n.unmounted ? null : /* @__PURE__ */ C(q.div, { ...o, ref: Ae(n.ref, t) });
786
- });
787
- pt.displayName = "DialogContent";
788
- const ht = /* @__PURE__ */ _((e, t) => {
789
- const r = W(), n = G(r.getDescriptionProps(), e);
790
- return /* @__PURE__ */ C(q.div, { ...n, ref: t });
791
- });
792
- ht.displayName = "DialogDescription";
793
- const gt = /* @__PURE__ */ _((e, t) => {
794
- const r = W(), n = G(r.getPositionerProps(), e);
795
- return Se().unmounted ? null : /* @__PURE__ */ C(q.div, { ...n, ref: t });
796
- });
797
- gt.displayName = "DialogPositioner";
798
- const zn = (e) => ut()(e, [
799
- "immediate",
800
- "lazyMount",
801
- "onExitComplete",
802
- "present",
803
- "skipAnimationOnMount",
804
- "unmountOnExit"
805
- ]);
806
- var ne = (e, t = []) => ({
807
- parts: (...r) => {
808
- if (Xn(t))
809
- return ne(e, r);
810
- throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?");
811
- },
812
- extendWith: (...r) => ne(e, [...t, ...r]),
813
- omit: (...r) => ne(e, t.filter((n) => !r.includes(n))),
814
- rename: (r) => ne(r, t),
815
- keys: () => t,
816
- build: () => [...new Set(t)].reduce(
817
- (r, n) => Object.assign(r, {
818
- [n]: {
819
- selector: [
820
- `&[data-scope="${H(e)}"][data-part="${H(n)}"]`,
821
- `& [data-scope="${H(e)}"][data-part="${H(n)}"]`
822
- ].join(", "),
823
- attrs: { "data-scope": H(e), "data-part": H(n) }
824
- }
825
- }),
826
- {}
827
- )
828
- }), H = (e) => e.replace(/([A-Z])([A-Z])/g, "$1-$2").replace(/([a-z])([A-Z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase(), Xn = (e) => e.length === 0, z = /* @__PURE__ */ new WeakMap(), ae = /* @__PURE__ */ new WeakMap(), ce = {}, be = 0, mt = (e) => e && (e.host || mt(e.parentNode)), Yn = (e, t) => t.map((r) => {
829
- if (e.contains(r)) return r;
830
- const n = mt(r);
831
- return n && e.contains(n) ? n : (console.error("[zag-js > ariaHidden] target", r, "in not contained inside", e, ". Doing nothing"), null);
832
- }).filter((r) => !!r), Zn = /* @__PURE__ */ new Set(["script", "output", "status", "next-route-announcer"]), Jn = (e) => Zn.has(e.localName) || e.role === "status" || e.hasAttribute("aria-live") ? !0 : e.matches("[data-live-announcer]"), Qn = (e, t) => {
833
- const { parentNode: r, markerName: n, controlAttribute: o } = t, s = Yn(r, Array.isArray(e) ? e : [e]);
834
- ce[n] || (ce[n] = /* @__PURE__ */ new WeakMap());
835
- const i = ce[n], a = [], u = /* @__PURE__ */ new Set(), c = new Set(s), d = (l) => {
836
- !l || u.has(l) || (u.add(l), d(l.parentNode));
837
- };
838
- s.forEach(d);
839
- const p = (l) => {
840
- !l || c.has(l) || Array.prototype.forEach.call(l.children, (m) => {
841
- if (u.has(m))
842
- p(m);
843
- else
844
- try {
845
- if (Jn(m)) return;
846
- const v = m.getAttribute(o) === "true", O = (z.get(m) || 0) + 1, N = (i.get(m) || 0) + 1;
847
- z.set(m, O), i.set(m, N), a.push(m), O === 1 && v && ae.set(m, !0), N === 1 && m.setAttribute(n, ""), v || m.setAttribute(o, "true");
848
- } catch (h) {
849
- console.error("[zag-js > ariaHidden] cannot operate on ", m, h);
850
- }
851
- });
852
- };
853
- return p(r), u.clear(), be++, () => {
854
- a.forEach((l) => {
855
- const m = z.get(l) - 1, h = i.get(l) - 1;
856
- z.set(l, m), i.set(l, h), m || (ae.has(l) || l.removeAttribute(o), ae.delete(l)), h || l.removeAttribute(n);
857
- }), be--, be || (z = /* @__PURE__ */ new WeakMap(), z = /* @__PURE__ */ new WeakMap(), ae = /* @__PURE__ */ new WeakMap(), ce = {});
858
- };
859
- }, er = (e) => (Array.isArray(e) ? e[0] : e).ownerDocument.body, tr = (e, t = er(e), r = "data-aria-hidden") => {
860
- if (t)
861
- return Qn(e, {
862
- parentNode: t,
863
- markerName: r,
864
- controlAttribute: "aria-hidden"
865
- });
866
- }, nr = (e) => {
867
- const t = requestAnimationFrame(() => e());
868
- return () => cancelAnimationFrame(t);
869
- };
870
- function rr(e, t = {}) {
871
- const { defer: r = !0 } = t, n = r ? nr : (s) => s(), o = [];
872
- return o.push(
873
- n(() => {
874
- const i = (typeof e == "function" ? e() : e).filter(Boolean);
875
- i.length !== 0 && o.push(tr(i));
876
- })
877
- ), () => {
878
- o.forEach((s) => s?.());
879
- };
880
- }
881
- function or(e) {
882
- const t = {
883
- each(r) {
884
- for (let n = 0; n < e.frames?.length; n += 1) {
885
- const o = e.frames[n];
886
- o && r(o);
887
- }
888
- },
889
- addEventListener(r, n, o) {
890
- return t.each((s) => {
891
- try {
892
- s.document.addEventListener(r, n, o);
893
- } catch {
894
- }
895
- }), () => {
896
- try {
897
- t.removeEventListener(r, n, o);
898
- } catch {
899
- }
900
- };
901
- },
902
- removeEventListener(r, n, o) {
903
- t.each((s) => {
904
- try {
905
- s.document.removeEventListener(r, n, o);
906
- } catch {
907
- }
908
- });
909
- }
910
- };
911
- return t;
912
- }
913
- function sr(e) {
914
- const t = e.frameElement != null ? e.parent : null;
915
- return {
916
- addEventListener: (r, n, o) => {
917
- try {
918
- t?.addEventListener(r, n, o);
919
- } catch {
920
- }
921
- return () => {
922
- try {
923
- t?.removeEventListener(r, n, o);
924
- } catch {
925
- }
926
- };
927
- },
928
- removeEventListener: (r, n, o) => {
929
- try {
930
- t?.removeEventListener(r, n, o);
931
- } catch {
932
- }
933
- }
934
- };
935
- }
936
- var _e = "pointerdown.outside", Ge = "focus.outside";
937
- function ir(e) {
938
- for (const t of e)
939
- if (D(t) && U(t)) return !0;
940
- return !1;
941
- }
942
- var vt = (e) => "clientY" in e;
943
- function ar(e, t) {
944
- if (!vt(t) || !e) return !1;
945
- const r = e.getBoundingClientRect();
946
- 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;
947
- }
948
- function cr(e, t) {
949
- return e.y <= t.y && t.y <= e.y + e.height && e.x <= t.x && t.x <= e.x + e.width;
950
- }
951
- function Ve(e, t) {
952
- if (!t || !vt(e)) return !1;
953
- 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 = {
954
- x: t.offsetLeft,
955
- y: t.offsetTop,
956
- width: t.clientWidth + (r ? 16 : 0),
957
- height: t.clientHeight + (o ? 16 : 0)
958
- }, a = {
959
- x: e.clientX,
960
- y: e.clientY
961
- };
962
- return cr(i, a) ? n || s : !1;
963
- }
964
- function ur(e, t) {
965
- const { exclude: r, onFocusOutside: n, onPointerDownOutside: o, onInteractOutside: s, defer: i } = t;
966
- if (!e) return;
967
- const a = R(e), u = oe(e), c = or(u), d = sr(u);
968
- function p(y, k) {
969
- if (!D(k) || !k.isConnected || de(e, k) || ar(e, y)) return !1;
970
- const T = a.querySelector(`[aria-controls="${e.id}"]`);
971
- if (T) {
972
- const P = Oe(T);
973
- if (Ve(y, P)) return !1;
974
- }
975
- const A = Oe(e);
976
- return Ve(y, A) ? !1 : !r?.(k);
977
- }
978
- const l = /* @__PURE__ */ new Set(), m = Z(e?.getRootNode());
979
- function h(y) {
980
- function k(T) {
981
- const A = i && !Be() ? $ : (S) => S(), P = T ?? y, J = P?.composedPath?.() ?? [P?.target];
982
- A(() => {
983
- const S = m ? J[0] : M(y);
984
- if (!(!e || !p(y, S))) {
985
- if (o || s) {
986
- const ge = Pe(o, s);
987
- e.addEventListener(_e, ge, { once: !0 });
988
- }
989
- Ue(e, _e, {
990
- bubbles: !1,
991
- cancelable: !0,
992
- detail: {
993
- originalEvent: P,
994
- contextmenu: vn(P),
995
- focusable: ir(J),
996
- target: S
997
- }
998
- });
999
- }
1000
- });
1001
- }
1002
- y.pointerType === "touch" ? (l.forEach((T) => T()), l.add(L(a, "click", k, { once: !0 })), l.add(d.addEventListener("click", k, { once: !0 })), l.add(c.addEventListener("click", k, { once: !0 }))) : k();
1003
- }
1004
- const v = /* @__PURE__ */ new Set(), O = setTimeout(() => {
1005
- v.add(L(a, "pointerdown", h, !0)), v.add(d.addEventListener("pointerdown", h, !0)), v.add(c.addEventListener("pointerdown", h, !0));
1006
- }, 0);
1007
- function N(y) {
1008
- (i ? $ : (T) => T())(() => {
1009
- const T = M(y);
1010
- if (!(!e || !p(y, T))) {
1011
- if (n || s) {
1012
- const A = Pe(n, s);
1013
- e.addEventListener(Ge, A, { once: !0 });
1014
- }
1015
- Ue(e, Ge, {
1016
- bubbles: !1,
1017
- cancelable: !0,
1018
- detail: {
1019
- originalEvent: y,
1020
- contextmenu: !1,
1021
- focusable: U(T),
1022
- target: T
1023
- }
1024
- });
1025
- }
1026
- });
1027
- }
1028
- return Be() || (v.add(L(a, "focusin", N, !0)), v.add(d.addEventListener("focusin", N, !0)), v.add(c.addEventListener("focusin", N, !0))), () => {
1029
- clearTimeout(O), l.forEach((y) => y()), v.forEach((y) => y());
1030
- };
1031
- }
1032
- function lr(e, t) {
1033
- const { defer: r } = t, n = r ? $ : (s) => s(), o = [];
1034
- return o.push(
1035
- n(() => {
1036
- const s = typeof e == "function" ? e() : e;
1037
- o.push(ur(s, t));
1038
- })
1039
- ), () => {
1040
- o.forEach((s) => s?.());
1041
- };
1042
- }
1043
- function Ue(e, t, r) {
1044
- const n = e.ownerDocument.defaultView || window, o = new n.CustomEvent(t, r);
1045
- return e.dispatchEvent(o);
1046
- }
1047
- function dr(e, t) {
1048
- const r = (n) => {
1049
- n.key === "Escape" && (n.isComposing || t?.(n));
1050
- };
1051
- return L(R(e), "keydown", r, { capture: !0 });
1052
- }
1053
- var We = "layer:request-dismiss", I = {
1054
- layers: [],
1055
- branches: [],
1056
- count() {
1057
- return this.layers.length;
1058
- },
1059
- pointerBlockingLayers() {
1060
- return this.layers.filter((e) => e.pointerBlocking);
1061
- },
1062
- topMostPointerBlockingLayer() {
1063
- return [...this.pointerBlockingLayers()].slice(-1)[0];
1064
- },
1065
- hasPointerBlockingLayer() {
1066
- return this.pointerBlockingLayers().length > 0;
1067
- },
1068
- isBelowPointerBlockingLayer(e) {
1069
- const t = this.indexOf(e), r = this.topMostPointerBlockingLayer() ? this.indexOf(this.topMostPointerBlockingLayer()?.node) : -1;
1070
- return t < r;
1071
- },
1072
- isTopMost(e) {
1073
- return this.layers[this.count() - 1]?.node === e;
1074
- },
1075
- getNestedLayers(e) {
1076
- return Array.from(this.layers).slice(this.indexOf(e) + 1);
1077
- },
1078
- isInNestedLayer(e, t) {
1079
- return this.getNestedLayers(e).some((r) => de(r.node, t));
1080
- },
1081
- isInBranch(e) {
1082
- return Array.from(this.branches).some((t) => de(t, e));
1083
- },
1084
- add(e) {
1085
- this.layers.push(e), this.syncLayerIndex();
1086
- },
1087
- addBranch(e) {
1088
- this.branches.push(e);
1089
- },
1090
- remove(e) {
1091
- const t = this.indexOf(e);
1092
- t < 0 || (t < this.count() - 1 && this.getNestedLayers(e).forEach((n) => I.dismiss(n.node, e)), this.layers.splice(t, 1), this.syncLayerIndex());
1093
- },
1094
- removeBranch(e) {
1095
- const t = this.branches.indexOf(e);
1096
- t >= 0 && this.branches.splice(t, 1);
1097
- },
1098
- syncLayerIndex() {
1099
- this.layers.forEach((e, t) => {
1100
- e.node.style.setProperty("--layer-index", `${t}`);
1101
- });
1102
- },
1103
- indexOf(e) {
1104
- return this.layers.findIndex((t) => t.node === e);
1105
- },
1106
- dismiss(e, t) {
1107
- const r = this.indexOf(e);
1108
- if (r === -1) return;
1109
- const n = this.layers[r];
1110
- pr(e, We, (o) => {
1111
- n.requestDismiss?.(o), o.defaultPrevented || n?.dismiss();
1112
- }), fr(e, We, {
1113
- originalLayer: e,
1114
- targetLayer: t,
1115
- originalIndex: r,
1116
- targetIndex: t ? this.indexOf(t) : -1
1117
- }), this.syncLayerIndex();
1118
- },
1119
- clear() {
1120
- this.remove(this.layers[0].node);
1121
- }
1122
- };
1123
- function fr(e, t, r) {
1124
- const n = e.ownerDocument.defaultView || window, o = new n.CustomEvent(t, { cancelable: !0, bubbles: !0, detail: r });
1125
- return e.dispatchEvent(o);
1126
- }
1127
- function pr(e, t, r) {
1128
- e.addEventListener(t, r, { once: !0 });
1129
- }
1130
- var je;
1131
- function Ke() {
1132
- I.layers.forEach(({ node: e }) => {
1133
- e.style.pointerEvents = I.isBelowPointerBlockingLayer(e) ? "none" : "auto";
1134
- });
1135
- }
1136
- function hr(e) {
1137
- e.style.pointerEvents = "";
1138
- }
1139
- function gr(e, t) {
1140
- const r = R(e), n = [];
1141
- return I.hasPointerBlockingLayer() && !r.body.hasAttribute("data-inert") && (je = document.body.style.pointerEvents, queueMicrotask(() => {
1142
- r.body.style.pointerEvents = "none", r.body.setAttribute("data-inert", "");
1143
- })), t?.forEach((o) => {
1144
- const [s, i] = Tn(
1145
- () => {
1146
- const a = o();
1147
- return D(a) ? a : null;
1148
- },
1149
- { timeout: 1e3 }
1150
- );
1151
- s.then((a) => n.push(fe(a, { pointerEvents: "auto" }))), n.push(i);
1152
- }), () => {
1153
- I.hasPointerBlockingLayer() || (queueMicrotask(() => {
1154
- r.body.style.pointerEvents = je, r.body.removeAttribute("data-inert"), r.body.style.length === 0 && r.body.removeAttribute("style");
1155
- }), n.forEach((o) => o()));
1156
- };
1157
- }
1158
- function mr(e, t) {
1159
- const { warnOnMissingNode: r = !0 } = t;
1160
- if (r && !e) {
1161
- we("[@zag-js/dismissable] node is `null` or `undefined`");
1162
- return;
1163
- }
1164
- if (!e)
1165
- return;
1166
- const { onDismiss: n, onRequestDismiss: o, pointerBlocking: s, exclude: i, debug: a } = t, u = { dismiss: n, node: e, pointerBlocking: s, requestDismiss: o };
1167
- I.add(u), Ke();
1168
- function c(h) {
1169
- const v = M(h.detail.originalEvent);
1170
- I.isBelowPointerBlockingLayer(e) || I.isInBranch(v) || (t.onPointerDownOutside?.(h), t.onInteractOutside?.(h), !h.defaultPrevented && (a && console.log("onPointerDownOutside:", h.detail.originalEvent), n?.()));
1171
- }
1172
- function d(h) {
1173
- const v = M(h.detail.originalEvent);
1174
- I.isInBranch(v) || (t.onFocusOutside?.(h), t.onInteractOutside?.(h), !h.defaultPrevented && (a && console.log("onFocusOutside:", h.detail.originalEvent), n?.()));
1175
- }
1176
- function p(h) {
1177
- I.isTopMost(e) && (t.onEscapeKeyDown?.(h), !h.defaultPrevented && n && (h.preventDefault(), n()));
1178
- }
1179
- function l(h) {
1180
- if (!e) return !1;
1181
- const v = typeof i == "function" ? i() : i, O = Array.isArray(v) ? v : [v], N = t.persistentElements?.map((y) => y()).filter(D);
1182
- return N && O.push(...N), O.some((y) => de(y, h)) || I.isInNestedLayer(e, h);
1183
- }
1184
- const m = [
1185
- s ? gr(e, t.persistentElements) : void 0,
1186
- dr(e, p),
1187
- lr(e, { exclude: l, onFocusOutside: d, onPointerDownOutside: c, defer: t.defer })
1188
- ];
1189
- return () => {
1190
- I.remove(e), Ke(), hr(e), m.forEach((h) => h?.());
1191
- };
1192
- }
1193
- function vr(e, t) {
1194
- const { defer: r } = t, n = r ? $ : (s) => s(), o = [];
1195
- return o.push(
1196
- n(() => {
1197
- const s = Y(e) ? e() : e;
1198
- o.push(mr(s, t));
1199
- })
1200
- ), () => {
1201
- o.forEach((s) => s?.());
1202
- };
1203
- }
1204
- var yr = Object.defineProperty, br = (e, t, r) => t in e ? yr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, b = (e, t, r) => br(e, typeof t != "symbol" ? t + "" : t, r), qe = {
1205
- activateTrap(e, t) {
1206
- if (e.length > 0) {
1207
- const n = e[e.length - 1];
1208
- n !== t && n.pause();
1209
- }
1210
- const r = e.indexOf(t);
1211
- r === -1 || e.splice(r, 1), e.push(t);
1212
- },
1213
- deactivateTrap(e, t) {
1214
- const r = e.indexOf(t);
1215
- r !== -1 && e.splice(r, 1), e.length > 0 && e[e.length - 1].unpause();
1216
- }
1217
- }, Er = [], Nr = class {
1218
- constructor(e, t) {
1219
- b(this, "trapStack"), b(this, "config"), b(this, "doc"), b(this, "state", {
1220
- containers: [],
1221
- containerGroups: [],
1222
- tabbableGroups: [],
1223
- nodeFocusedBeforeActivation: null,
1224
- mostRecentlyFocusedNode: null,
1225
- active: !1,
1226
- paused: !1,
1227
- delayInitialFocusTimer: void 0,
1228
- recentNavEvent: void 0
1229
- }), b(this, "listenerCleanups", []), b(this, "handleFocus", (n) => {
1230
- const o = M(n), s = this.findContainerIndex(o, n) >= 0;
1231
- if (s || ke(o))
1232
- s && (this.state.mostRecentlyFocusedNode = o);
1233
- else {
1234
- n.stopImmediatePropagation();
1235
- let i, a = !0;
1236
- if (this.state.mostRecentlyFocusedNode)
1237
- if (Q(this.state.mostRecentlyFocusedNode) > 0) {
1238
- const u = this.findContainerIndex(this.state.mostRecentlyFocusedNode), { tabbableNodes: c } = this.state.containerGroups[u];
1239
- if (c.length > 0) {
1240
- const d = c.findIndex((p) => p === this.state.mostRecentlyFocusedNode);
1241
- d >= 0 && (this.config.isKeyForward(this.state.recentNavEvent) ? d + 1 < c.length && (i = c[d + 1], a = !1) : d - 1 >= 0 && (i = c[d - 1], a = !1));
1242
- }
1243
- } else
1244
- this.state.containerGroups.some((u) => u.tabbableNodes.some((c) => Q(c) > 0)) || (a = !1);
1245
- else
1246
- a = !1;
1247
- a && (i = this.findNextNavNode({
1248
- // move FROM the MRU node, not event-related node (which will be the node that is
1249
- // outside the trap causing the focus escape we're trying to fix)
1250
- target: this.state.mostRecentlyFocusedNode,
1251
- isBackward: this.config.isKeyBackward(this.state.recentNavEvent)
1252
- })), i ? this.tryFocus(i) : this.tryFocus(this.state.mostRecentlyFocusedNode || this.getInitialFocusNode());
1253
- }
1254
- this.state.recentNavEvent = void 0;
1255
- }), b(this, "handlePointerDown", (n) => {
1256
- const o = M(n);
1257
- if (!(this.findContainerIndex(o, n) >= 0)) {
1258
- if (te(this.config.clickOutsideDeactivates, n)) {
1259
- this.deactivate({ returnFocus: this.config.returnFocusOnDeactivate });
1260
- return;
1261
- }
1262
- te(this.config.allowOutsideClick, n) || n.preventDefault();
1263
- }
1264
- }), b(this, "handleClick", (n) => {
1265
- const o = M(n);
1266
- this.findContainerIndex(o, n) >= 0 || te(this.config.clickOutsideDeactivates, n) || te(this.config.allowOutsideClick, n) || (n.preventDefault(), n.stopImmediatePropagation());
1267
- }), b(this, "handleTabKey", (n) => {
1268
- if (this.config.isKeyForward(n) || this.config.isKeyBackward(n)) {
1269
- this.state.recentNavEvent = n;
1270
- const o = this.config.isKeyBackward(n), s = this.findNextNavNode({ event: n, isBackward: o });
1271
- if (!s) return;
1272
- ee(n) && n.preventDefault(), this.tryFocus(s);
1273
- }
1274
- }), b(this, "handleEscapeKey", (n) => {
1275
- Pr(n) && te(this.config.escapeDeactivates, n) !== !1 && (n.preventDefault(), this.deactivate());
1276
- }), b(this, "_mutationObserver"), b(this, "setupMutationObserver", () => {
1277
- const n = this.doc.defaultView || window;
1278
- this._mutationObserver = new n.MutationObserver((o) => {
1279
- o.some((i) => Array.from(i.removedNodes).some((u) => u === this.state.mostRecentlyFocusedNode)) && this.tryFocus(this.getInitialFocusNode());
1280
- });
1281
- }), b(this, "updateObservedNodes", () => {
1282
- this._mutationObserver?.disconnect(), this.state.active && !this.state.paused && this.state.containers.map((n) => {
1283
- this._mutationObserver?.observe(n, { subtree: !0, childList: !0 });
1284
- });
1285
- }), b(this, "getInitialFocusNode", () => {
1286
- let n = this.getNodeForOption("initialFocus", { hasFallback: !0 });
1287
- if (n === !1)
1288
- return !1;
1289
- if (n === void 0 || n && !U(n))
1290
- if (this.findContainerIndex(this.doc.activeElement) >= 0)
1291
- n = this.doc.activeElement;
1292
- else {
1293
- const o = this.state.tabbableGroups[0];
1294
- n = o && o.firstTabbableNode || this.getNodeForOption("fallbackFocus");
1295
- }
1296
- else n === null && (n = this.getNodeForOption("fallbackFocus"));
1297
- if (!n)
1298
- throw new Error("Your focus-trap needs to have at least one focusable element");
1299
- return n.isConnected || (n = this.getNodeForOption("fallbackFocus")), n;
1300
- }), b(this, "tryFocus", (n) => {
1301
- if (n !== !1 && n !== Qe(this.doc)) {
1302
- if (!n || !n.focus) {
1303
- this.tryFocus(this.getInitialFocusNode());
1304
- return;
1305
- }
1306
- n.focus({ preventScroll: !!this.config.preventScroll }), this.state.mostRecentlyFocusedNode = n, wr(n) && n.select();
1307
- }
1308
- }), b(this, "deactivate", (n) => {
1309
- if (!this.state.active) return this;
1310
- const o = {
1311
- onDeactivate: this.config.onDeactivate,
1312
- onPostDeactivate: this.config.onPostDeactivate,
1313
- checkCanReturnFocus: this.config.checkCanReturnFocus,
1314
- ...n
1315
- };
1316
- clearTimeout(this.state.delayInitialFocusTimer), this.state.delayInitialFocusTimer = void 0, this.removeListeners(), this.state.active = !1, this.state.paused = !1, this.updateObservedNodes(), qe.deactivateTrap(this.trapStack, this);
1317
- const s = this.getOption(o, "onDeactivate"), i = this.getOption(o, "onPostDeactivate"), a = this.getOption(o, "checkCanReturnFocus"), u = this.getOption(o, "returnFocus", "returnFocusOnDeactivate");
1318
- s?.();
1319
- const c = () => {
1320
- He(() => {
1321
- if (u) {
1322
- const d = this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);
1323
- this.tryFocus(d);
1324
- }
1325
- i?.();
1326
- });
1327
- };
1328
- if (u && a) {
1329
- const d = this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);
1330
- return a(d).then(c, c), this;
1331
- }
1332
- return c(), this;
1333
- }), b(this, "pause", (n) => {
1334
- if (this.state.paused || !this.state.active)
1335
- return this;
1336
- const o = this.getOption(n, "onPause"), s = this.getOption(n, "onPostPause");
1337
- return this.state.paused = !0, o?.(), this.removeListeners(), this.updateObservedNodes(), s?.(), this;
1338
- }), b(this, "unpause", (n) => {
1339
- if (!this.state.paused || !this.state.active)
1340
- return this;
1341
- const o = this.getOption(n, "onUnpause"), s = this.getOption(n, "onPostUnpause");
1342
- return this.state.paused = !1, o?.(), this.updateTabbableNodes(), this.addListeners(), this.updateObservedNodes(), s?.(), this;
1343
- }), b(this, "updateContainerElements", (n) => (this.state.containers = Array.isArray(n) ? n.filter(Boolean) : [n].filter(Boolean), this.state.active && this.updateTabbableNodes(), this.updateObservedNodes(), this)), b(this, "getReturnFocusNode", (n) => {
1344
- const o = this.getNodeForOption("setReturnFocus", {
1345
- params: [n]
1346
- });
1347
- return o || (o === !1 ? !1 : n);
1348
- }), b(this, "getOption", (n, o, s) => n && n[o] !== void 0 ? n[o] : (
1349
- // @ts-expect-error
1350
- this.config[s || o]
1351
- )), b(this, "getNodeForOption", (n, { hasFallback: o = !1, params: s = [] } = {}) => {
1352
- let i = this.config[n];
1353
- if (typeof i == "function" && (i = i(...s)), i === !0 && (i = void 0), !i) {
1354
- if (i === void 0 || i === !1)
1355
- return i;
1356
- throw new Error(`\`${n}\` was specified but was not a node, or did not return a node`);
1357
- }
1358
- let a = i;
1359
- if (typeof i == "string") {
1360
- try {
1361
- a = this.doc.querySelector(i);
1362
- } catch (u) {
1363
- throw new Error(`\`${n}\` appears to be an invalid selector; error="${u.message}"`);
1364
- }
1365
- if (!a && !o)
1366
- throw new Error(`\`${n}\` as selector refers to no known node`);
1367
- }
1368
- return a;
1369
- }), b(this, "findNextNavNode", (n) => {
1370
- const { event: o, isBackward: s = !1 } = n, i = n.target || M(o);
1371
- this.updateTabbableNodes();
1372
- let a = null;
1373
- if (this.state.tabbableGroups.length > 0) {
1374
- const u = this.findContainerIndex(i, o), c = u >= 0 ? this.state.containerGroups[u] : void 0;
1375
- if (u < 0)
1376
- s ? a = this.state.tabbableGroups[this.state.tabbableGroups.length - 1].lastTabbableNode : a = this.state.tabbableGroups[0].firstTabbableNode;
1377
- else if (s) {
1378
- let d = this.state.tabbableGroups.findIndex(
1379
- ({ firstTabbableNode: p }) => i === p
1380
- );
1381
- if (d < 0 && (c?.container === i || U(i) && !K(i) && !c?.nextTabbableNode(i, !1)) && (d = u), d >= 0) {
1382
- const p = d === 0 ? this.state.tabbableGroups.length - 1 : d - 1, l = this.state.tabbableGroups[p];
1383
- a = Q(i) >= 0 ? l.lastTabbableNode : l.lastDomTabbableNode;
1384
- } else ee(o) || (a = c?.nextTabbableNode(i, !1));
1385
- } else {
1386
- let d = this.state.tabbableGroups.findIndex(
1387
- ({ lastTabbableNode: p }) => i === p
1388
- );
1389
- if (d < 0 && (c?.container === i || U(i) && !K(i) && !c?.nextTabbableNode(i)) && (d = u), d >= 0) {
1390
- const p = d === this.state.tabbableGroups.length - 1 ? 0 : d + 1, l = this.state.tabbableGroups[p];
1391
- a = Q(i) >= 0 ? l.firstTabbableNode : l.firstDomTabbableNode;
1392
- } else ee(o) || (a = c?.nextTabbableNode(i));
1393
- }
1394
- } else
1395
- a = this.getNodeForOption("fallbackFocus");
1396
- return a;
1397
- }), this.trapStack = t.trapStack || Er;
1398
- const r = {
1399
- returnFocusOnDeactivate: !0,
1400
- escapeDeactivates: !0,
1401
- delayInitialFocus: !0,
1402
- isKeyForward(n) {
1403
- return ee(n) && !n.shiftKey;
1404
- },
1405
- isKeyBackward(n) {
1406
- return ee(n) && n.shiftKey;
1407
- },
1408
- ...t
1409
- };
1410
- this.doc = r.document || R(Array.isArray(e) ? e[0] : e), this.config = r, this.updateContainerElements(e), this.setupMutationObserver();
1411
- }
1412
- get active() {
1413
- return this.state.active;
1414
- }
1415
- get paused() {
1416
- return this.state.paused;
1417
- }
1418
- findContainerIndex(e, t) {
1419
- const r = typeof t?.composedPath == "function" ? t.composedPath() : void 0;
1420
- return this.state.containerGroups.findIndex(
1421
- ({ container: n, tabbableNodes: o }) => n.contains(e) || r?.includes(n) || o.find((s) => s === e)
1422
- );
1423
- }
1424
- updateTabbableNodes() {
1425
- if (this.state.containerGroups = this.state.containers.map((e) => {
1426
- const t = st(e), r = ot(e), n = t.length > 0 ? t[0] : void 0, o = t.length > 0 ? t[t.length - 1] : void 0, s = r.find((c) => K(c)), i = r.slice().reverse().find((c) => K(c)), a = !!t.find((c) => Q(c) > 0);
1427
- function u(c, d = !0) {
1428
- const p = t.indexOf(c);
1429
- return p < 0 ? d ? r.slice(r.indexOf(c) + 1).find((l) => K(l)) : r.slice(0, r.indexOf(c)).reverse().find((l) => K(l)) : t[p + (d ? 1 : -1)];
1430
- }
1431
- return {
1432
- container: e,
1433
- tabbableNodes: t,
1434
- focusableNodes: r,
1435
- posTabIndexesFound: a,
1436
- firstTabbableNode: n,
1437
- lastTabbableNode: o,
1438
- firstDomTabbableNode: s,
1439
- lastDomTabbableNode: i,
1440
- nextTabbableNode: u
1441
- };
1442
- }), this.state.tabbableGroups = this.state.containerGroups.filter((e) => e.tabbableNodes.length > 0), this.state.tabbableGroups.length <= 0 && !this.getNodeForOption("fallbackFocus"))
1443
- throw new Error(
1444
- "Your focus-trap must have at least one container with at least one tabbable node in it at all times"
1445
- );
1446
- if (this.state.containerGroups.find((e) => e.posTabIndexesFound) && this.state.containerGroups.length > 1)
1447
- throw new Error(
1448
- "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."
1449
- );
1450
- }
1451
- addListeners() {
1452
- if (this.state.active)
1453
- return qe.activateTrap(this.trapStack, this), this.state.delayInitialFocusTimer = this.config.delayInitialFocus ? He(() => {
1454
- this.tryFocus(this.getInitialFocusNode());
1455
- }) : this.tryFocus(this.getInitialFocusNode()), this.listenerCleanups.push(
1456
- L(this.doc, "focusin", this.handleFocus, !0),
1457
- L(this.doc, "mousedown", this.handlePointerDown, { capture: !0, passive: !1 }),
1458
- L(this.doc, "touchstart", this.handlePointerDown, { capture: !0, passive: !1 }),
1459
- L(this.doc, "click", this.handleClick, { capture: !0, passive: !1 }),
1460
- L(this.doc, "keydown", this.handleTabKey, { capture: !0, passive: !1 }),
1461
- L(this.doc, "keydown", this.handleEscapeKey)
1462
- ), this;
1463
- }
1464
- removeListeners() {
1465
- if (this.state.active)
1466
- return this.listenerCleanups.forEach((e) => e()), this.listenerCleanups = [], this;
1467
- }
1468
- activate(e) {
1469
- if (this.state.active)
1470
- return this;
1471
- const t = this.getOption(e, "onActivate"), r = this.getOption(e, "onPostActivate"), n = this.getOption(e, "checkCanFocusTrap");
1472
- n || this.updateTabbableNodes(), this.state.active = !0, this.state.paused = !1, this.state.nodeFocusedBeforeActivation = this.doc.activeElement || null, t?.();
1473
- const o = () => {
1474
- n && this.updateTabbableNodes(), this.addListeners(), this.updateObservedNodes(), r?.();
1475
- };
1476
- return n ? (n(this.state.containers.concat()).then(o, o), this) : (o(), this);
1477
- }
1478
- }, ee = (e) => e.key === "Tab", te = (e, ...t) => typeof e == "function" ? e(...t) : e, Pr = (e) => !e.isComposing && e.key === "Escape", He = (e) => setTimeout(e, 0), wr = (e) => e.localName === "input" && "select" in e && typeof e.select == "function";
1479
- function Or(e, t = {}) {
1480
- let r;
1481
- const n = $(() => {
1482
- const o = typeof e == "function" ? e() : e;
1483
- if (o) {
1484
- r = new Nr(o, {
1485
- escapeDeactivates: !1,
1486
- allowOutsideClick: !0,
1487
- preventScroll: !0,
1488
- returnFocusOnDeactivate: !0,
1489
- delayInitialFocus: !1,
1490
- fallbackFocus: o,
1491
- ...t,
1492
- document: R(o)
1493
- });
1494
- try {
1495
- r.activate();
1496
- } catch {
1497
- }
1498
- }
1499
- });
1500
- return function() {
1501
- r?.deactivate(), n();
1502
- };
1503
- }
1504
- var Ee = "data-scroll-lock";
1505
- function Cr(e) {
1506
- const t = e.getBoundingClientRect().left;
1507
- return Math.round(t) + e.scrollLeft ? "paddingLeft" : "paddingRight";
1508
- }
1509
- function Tr(e) {
1510
- const t = e ?? document, r = t.defaultView ?? window, { documentElement: n, body: o } = t;
1511
- if (o.hasAttribute(Ee)) return;
1512
- const i = r.innerWidth - n.clientWidth;
1513
- o.setAttribute(Ee, "");
1514
- const a = () => On(n, "--scrollbar-width", `${i}px`), u = Cr(n), c = () => fe(o, {
1515
- overflow: "hidden",
1516
- [u]: `${i}px`
1517
- }), d = () => {
1518
- const { scrollX: l, scrollY: m, visualViewport: h } = r, v = h?.offsetLeft ?? 0, O = h?.offsetTop ?? 0, N = fe(o, {
1519
- position: "fixed",
1520
- overflow: "hidden",
1521
- top: `${-(m - Math.floor(O))}px`,
1522
- left: `${-(l - Math.floor(v))}px`,
1523
- right: "0",
1524
- [u]: `${i}px`
1525
- });
1526
- return () => {
1527
- N?.(), r.scrollTo({ left: l, top: m, behavior: "instant" });
1528
- };
1529
- }, p = [a(), gn() ? d() : c()];
1530
- return () => {
1531
- p.forEach((l) => l?.()), o.removeAttribute(Ee);
1532
- };
1533
- }
1534
- var xr = /* @__PURE__ */ ne("dialog").parts(
1535
- "trigger",
1536
- "backdrop",
1537
- "positioner",
1538
- "content",
1539
- "title",
1540
- "description",
1541
- "closeTrigger"
1542
- ), j = /* @__PURE__ */ xr.build(), yt = (e) => e.ids?.positioner ?? `dialog:${e.id}:positioner`, bt = (e) => e.ids?.backdrop ?? `dialog:${e.id}:backdrop`, Ce = (e) => e.ids?.content ?? `dialog:${e.id}:content`, Et = (e) => e.ids?.trigger ?? `dialog:${e.id}:trigger`, Te = (e) => e.ids?.title ?? `dialog:${e.id}:title`, xe = (e) => e.ids?.description ?? `dialog:${e.id}:description`, Nt = (e) => e.ids?.closeTrigger ?? `dialog:${e.id}:close`, ue = (e) => e.getById(Ce(e)), Dr = (e) => e.getById(yt(e)), kr = (e) => e.getById(bt(e)), Fr = (e) => e.getById(Et(e)), Ir = (e) => e.getById(Te(e)), Ar = (e) => e.getById(xe(e)), Sr = (e) => e.getById(Nt(e));
1543
- function Lr(e, t) {
1544
- const { state: r, send: n, context: o, prop: s, scope: i } = e, a = s("aria-label"), u = r.matches("open");
1545
- return {
1546
- open: u,
1547
- setOpen(c) {
1548
- r.matches("open") !== c && n({ type: c ? "OPEN" : "CLOSE" });
1549
- },
1550
- getTriggerProps() {
1551
- return t.button({
1552
- ...j.trigger.attrs,
1553
- dir: s("dir"),
1554
- id: Et(i),
1555
- "aria-haspopup": "dialog",
1556
- type: "button",
1557
- "aria-expanded": u,
1558
- "data-state": u ? "open" : "closed",
1559
- "aria-controls": Ce(i),
1560
- onClick(c) {
1561
- c.defaultPrevented || n({ type: "TOGGLE" });
1562
- }
1563
- });
1564
- },
1565
- getBackdropProps() {
1566
- return t.element({
1567
- ...j.backdrop.attrs,
1568
- dir: s("dir"),
1569
- hidden: !u,
1570
- id: bt(i),
1571
- "data-state": u ? "open" : "closed"
1572
- });
1573
- },
1574
- getPositionerProps() {
1575
- return t.element({
1576
- ...j.positioner.attrs,
1577
- dir: s("dir"),
1578
- id: yt(i),
1579
- style: {
1580
- pointerEvents: u ? void 0 : "none"
1581
- }
1582
- });
1583
- },
1584
- getContentProps() {
1585
- const c = o.get("rendered");
1586
- return t.element({
1587
- ...j.content.attrs,
1588
- dir: s("dir"),
1589
- role: s("role"),
1590
- hidden: !u,
1591
- id: Ce(i),
1592
- tabIndex: -1,
1593
- "data-state": u ? "open" : "closed",
1594
- "aria-modal": !0,
1595
- "aria-label": a || void 0,
1596
- "aria-labelledby": a || !c.title ? void 0 : Te(i),
1597
- "aria-describedby": c.description ? xe(i) : void 0
1598
- });
1599
- },
1600
- getTitleProps() {
1601
- return t.element({
1602
- ...j.title.attrs,
1603
- dir: s("dir"),
1604
- id: Te(i)
1605
- });
1606
- },
1607
- getDescriptionProps() {
1608
- return t.element({
1609
- ...j.description.attrs,
1610
- dir: s("dir"),
1611
- id: xe(i)
1612
- });
1613
- },
1614
- getCloseTriggerProps() {
1615
- return t.button({
1616
- ...j.closeTrigger.attrs,
1617
- dir: s("dir"),
1618
- id: Nt(i),
1619
- type: "button",
1620
- onClick(c) {
1621
- c.defaultPrevented || (c.stopPropagation(), n({ type: "CLOSE" }));
1622
- }
1623
- });
1624
- }
1625
- };
1626
- }
1627
- var Rr = {
1628
- props({ props: e, scope: t }) {
1629
- const r = e.role === "alertdialog", n = r ? () => Sr(t) : void 0, o = typeof e.modal == "boolean" ? e.modal : !0;
1630
- return {
1631
- role: "dialog",
1632
- modal: o,
1633
- trapFocus: o,
1634
- preventScroll: o,
1635
- closeOnInteractOutside: !r,
1636
- closeOnEscape: !0,
1637
- restoreFocus: !0,
1638
- initialFocusEl: n,
1639
- ...e
1640
- };
1641
- },
1642
- initialState({ prop: e }) {
1643
- return e("open") || e("defaultOpen") ? "open" : "closed";
1644
- },
1645
- context({ bindable: e }) {
1646
- return {
1647
- rendered: e(() => ({
1648
- defaultValue: { title: !0, description: !0 }
1649
- }))
1650
- };
1651
- },
1652
- watch({ track: e, action: t, prop: r }) {
1653
- e([() => r("open")], () => {
1654
- t(["toggleVisibility"]);
1655
- });
1656
- },
1657
- states: {
1658
- open: {
1659
- entry: ["checkRenderedElements", "syncZIndex"],
1660
- effects: ["trackDismissableElement", "trapFocus", "preventScroll", "hideContentBelow"],
1661
- on: {
1662
- "CONTROLLED.CLOSE": {
1663
- target: "closed"
1664
- },
1665
- CLOSE: [
1666
- {
1667
- guard: "isOpenControlled",
1668
- actions: ["invokeOnClose"]
1669
- },
1670
- {
1671
- target: "closed",
1672
- actions: ["invokeOnClose"]
1673
- }
1674
- ],
1675
- TOGGLE: [
1676
- {
1677
- guard: "isOpenControlled",
1678
- actions: ["invokeOnClose"]
1679
- },
1680
- {
1681
- target: "closed",
1682
- actions: ["invokeOnClose"]
1683
- }
1684
- ]
1685
- }
1686
- },
1687
- closed: {
1688
- on: {
1689
- "CONTROLLED.OPEN": {
1690
- target: "open"
1691
- },
1692
- OPEN: [
1693
- {
1694
- guard: "isOpenControlled",
1695
- actions: ["invokeOnOpen"]
1696
- },
1697
- {
1698
- target: "open",
1699
- actions: ["invokeOnOpen"]
1700
- }
1701
- ],
1702
- TOGGLE: [
1703
- {
1704
- guard: "isOpenControlled",
1705
- actions: ["invokeOnOpen"]
1706
- },
1707
- {
1708
- target: "open",
1709
- actions: ["invokeOnOpen"]
1710
- }
1711
- ]
1712
- }
1713
- }
1714
- },
1715
- implementations: {
1716
- guards: {
1717
- isOpenControlled: ({ prop: e }) => e("open") != null
1718
- },
1719
- effects: {
1720
- trackDismissableElement({ scope: e, send: t, prop: r }) {
1721
- return vr(() => ue(e), {
1722
- defer: !0,
1723
- pointerBlocking: r("modal"),
1724
- exclude: [Fr(e)],
1725
- onInteractOutside(o) {
1726
- r("onInteractOutside")?.(o), r("closeOnInteractOutside") || o.preventDefault();
1727
- },
1728
- persistentElements: r("persistentElements"),
1729
- onFocusOutside: r("onFocusOutside"),
1730
- onPointerDownOutside: r("onPointerDownOutside"),
1731
- onRequestDismiss: r("onRequestDismiss"),
1732
- onEscapeKeyDown(o) {
1733
- r("onEscapeKeyDown")?.(o), r("closeOnEscape") || o.preventDefault();
1734
- },
1735
- onDismiss() {
1736
- t({ type: "CLOSE", src: "interact-outside" });
1737
- }
1738
- });
1739
- },
1740
- preventScroll({ scope: e, prop: t }) {
1741
- if (t("preventScroll"))
1742
- return Tr(e.getDoc());
1743
- },
1744
- trapFocus({ scope: e, prop: t }) {
1745
- return t("trapFocus") ? Or(() => ue(e), {
1746
- preventScroll: !0,
1747
- returnFocusOnDeactivate: !!t("restoreFocus"),
1748
- initialFocus: t("initialFocusEl"),
1749
- setReturnFocus: (n) => t("finalFocusEl")?.() ?? n
1750
- }) : void 0;
1751
- },
1752
- hideContentBelow({ scope: e, prop: t }) {
1753
- return t("modal") ? rr(() => [ue(e)], { defer: !0 }) : void 0;
1754
- }
1755
- },
1756
- actions: {
1757
- checkRenderedElements({ context: e, scope: t }) {
1758
- $(() => {
1759
- e.set("rendered", {
1760
- title: !!Ir(t),
1761
- description: !!Ar(t)
1762
- });
1763
- });
1764
- },
1765
- syncZIndex({ scope: e }) {
1766
- $(() => {
1767
- const t = ue(e);
1768
- if (!t) return;
1769
- const r = et(t);
1770
- [Dr(e), kr(e)].forEach((o) => {
1771
- o?.style.setProperty("--z-index", r.zIndex), o?.style.setProperty("--layer-index", r.getPropertyValue("--layer-index"));
1772
- });
1773
- });
1774
- },
1775
- invokeOnClose({ prop: e }) {
1776
- e("onOpenChange")?.({ open: !1 });
1777
- },
1778
- invokeOnOpen({ prop: e }) {
1779
- e("onOpenChange")?.({ open: !0 });
1780
- },
1781
- toggleVisibility({ prop: e, send: t, event: r }) {
1782
- t({
1783
- type: e("open") ? "CONTROLLED.OPEN" : "CONTROLLED.CLOSE",
1784
- previousEvent: r
1785
- });
1786
- }
1787
- }
1788
- }
1789
- };
1790
- const [so, Pt] = /* @__PURE__ */ se({
1791
- name: "EnvironmentContext",
1792
- hookName: "useEnvironmentContext",
1793
- providerName: "<EnvironmentProvider />",
1794
- strict: !1,
1795
- defaultValue: {
1796
- getRootNode: () => document,
1797
- getDocument: () => document,
1798
- getWindow: () => window
1799
- }
1800
- }), [io, Br] = /* @__PURE__ */ se({
1801
- name: "LocaleContext",
1802
- hookName: "useLocaleContext",
1803
- providerName: "<LocaleProvider />",
1804
- strict: !1,
1805
- defaultValue: { dir: "ltr", locale: "en-US" }
1806
- }), Mr = (e) => {
1807
- const t = Mt(), { getRootNode: r } = Pt(), { dir: n } = Br(), o = {
1808
- id: t,
1809
- getRootNode: r,
1810
- dir: n,
1811
- ...e
1812
- }, s = at(Rr, o);
1813
- return Lr(s, Rn);
1814
- }, $r = (e) => {
1815
- const [t, { children: r, ...n }] = zn(e), [o] = _n(t), s = Mr(n), i = lt(G({ present: s.open }, t));
1816
- return /* @__PURE__ */ C(qn, { value: s, children: /* @__PURE__ */ C(Mn, { value: o, children: /* @__PURE__ */ C(Hn, { value: i, children: r }) }) });
1817
- };
1818
- const wt = /* @__PURE__ */ _((e, t) => {
1819
- const r = W(), n = G(r.getTitleProps(), e);
1820
- return /* @__PURE__ */ C(q.h2, { ...n, ref: t });
1821
- });
1822
- wt.displayName = "DialogTitle";
1823
- const Ot = /* @__PURE__ */ _((e, t) => {
1824
- const r = W(), n = Se(), o = G(
1825
- {
1826
- ...r.getTriggerProps(),
1827
- "aria-controls": n.unmounted ? void 0 : r.getTriggerProps()["aria-controls"]
1828
- },
1829
- e
1830
- );
1831
- return /* @__PURE__ */ C(q.button, { ...o, ref: t });
1832
- });
1833
- Ot.displayName = "DialogTrigger";
1834
- const {
1835
- withRootProvider: _r,
1836
- withContext: B
1837
- } = /* @__PURE__ */ Gt({ key: "dialog" }), Gr = /* @__PURE__ */ _r($r, {
1838
- defaultProps: { unmountOnExit: !0, lazyMount: !0 }
1839
- }), Vr = /* @__PURE__ */ B(
1840
- Ot,
1841
- "trigger",
1842
- { forwardAsChild: !0 }
1843
- ), Ct = /* @__PURE__ */ B(gt, "positioner", { forwardAsChild: !0 }), Ur = /* @__PURE__ */ B(
1844
- pt,
1845
- "content",
1846
- { forwardAsChild: !0 }
1847
- ), Wr = /* @__PURE__ */ B(ht, "description", { forwardAsChild: !0 }), jr = /* @__PURE__ */ B(
1848
- wt,
1849
- "title",
1850
- { forwardAsChild: !0 }
1851
- ), Kr = /* @__PURE__ */ B(ft, "closeTrigger", { forwardAsChild: !0 }), qr = /* @__PURE__ */ _(function(t, r) {
1852
- const n = W();
1853
- return /* @__PURE__ */ C(Vt.button, { ...t, ref: r, onClick: () => n.setOpen(!1) });
1854
- }), Tt = /* @__PURE__ */ B(
1855
- dt,
1856
- "backdrop",
1857
- { forwardAsChild: !0 }
1858
- ), Hr = /* @__PURE__ */ B(
1859
- "div",
1860
- "body"
1861
- ), zr = /* @__PURE__ */ B(
1862
- "div",
1863
- "footer"
1864
- ), Xr = /* @__PURE__ */ B(
1865
- "div",
1866
- "header"
1867
- ), Yr = (e) => {
1868
- const { children: t, disabled: r } = e, [n, o] = Ne(e.container?.current), s = $t(
1869
- Jr,
1870
- () => !1,
1871
- () => !0
1872
- ), { getRootNode: i } = Pt();
1873
- if (re(() => {
1874
- o(() => e.container?.current);
1875
- }, [e.container]), s || r) return /* @__PURE__ */ C(Re, { children: t });
1876
- const a = n ?? Zr(i);
1877
- return /* @__PURE__ */ C(Re, { children: ze.map(t, (u) => _t(u, a)) });
1878
- }, Zr = (e) => {
1879
- const t = e?.(), r = t.getRootNode();
1880
- return Z(r) ? r : R(t).body;
1881
- }, Jr = () => () => {
1882
- }, Qr = function(t) {
1883
- const {
1884
- children: r,
1885
- portalled: n = !0,
1886
- portalRef: o,
1887
- backdrop: s = !0,
1888
- ref: i,
1889
- ...a
1890
- } = t;
1891
- return /* @__PURE__ */ xt(Yr, { disabled: !n, container: o, children: [
1892
- s && /* @__PURE__ */ C(Tt, {}),
1893
- /* @__PURE__ */ C(Ct, { children: /* @__PURE__ */ C(Ur, { ref: i, ...a, asChild: !1, children: r }) })
1894
- ] });
1895
- }, ao = {
1896
- Root: Gr,
1897
- Trigger: Vr,
1898
- Content: Qr,
1899
- Backdrop: Tt,
1900
- Positioner: Ct,
1901
- Title: jr,
1902
- Description: Wr,
1903
- Body: Hr,
1904
- Footer: zr,
1905
- Header: Xr,
1906
- CloseTrigger: Kr,
1907
- ActionTrigger: qr
1908
- };
1909
- export {
1910
- ao as D
1911
- };
1912
- //# sourceMappingURL=dialog-D4u5so0e.es.js.map