@commercetools/nimbus 0.0.0-canary-20250903194502 → 0.0.0-canary-20250904053156

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 (253) hide show
  1. package/dist/chunks/{DatePicker-BthC1bZ_.es.js → DatePicker-B1Unwe6C.es.js} +2 -2
  2. package/dist/chunks/{DatePicker-BthC1bZ_.es.js.map → DatePicker-B1Unwe6C.es.js.map} +1 -1
  3. package/dist/chunks/{DatePicker-BdV6ICAm.cjs.js → DatePicker-_aG-c1ms.cjs.js} +2 -2
  4. package/dist/chunks/{DatePicker-BdV6ICAm.cjs.js.map → DatePicker-_aG-c1ms.cjs.js.map} +1 -1
  5. package/dist/chunks/{Dialog-BeQ6Z6l2.es.js → Dialog-C9HXv1rP.es.js} +68 -67
  6. package/dist/chunks/{Dialog-BeQ6Z6l2.es.js.map → Dialog-C9HXv1rP.es.js.map} +1 -1
  7. package/dist/chunks/Dialog-DZm5Sj40.cjs.js +2 -0
  8. package/dist/chunks/{Dialog-CYa26HlL.cjs.js.map → Dialog-DZm5Sj40.cjs.js.map} +1 -1
  9. package/dist/chunks/Header-CZkkXWBA.es.js +58 -0
  10. package/dist/chunks/Header-CZkkXWBA.es.js.map +1 -0
  11. package/dist/chunks/Header-D24AtheW.cjs.js +2 -0
  12. package/dist/chunks/Header-D24AtheW.cjs.js.map +1 -0
  13. package/dist/chunks/{ListBox-DF3NHeEX.es.js → ListBox-DWMnhpDd.es.js} +46 -45
  14. package/dist/chunks/{ListBox-DF3NHeEX.es.js.map → ListBox-DWMnhpDd.es.js.map} +1 -1
  15. package/dist/chunks/ListBox-Dnuz2Daa.cjs.js +2 -0
  16. package/dist/chunks/{ListBox-CikEmFBx.cjs.js.map → ListBox-Dnuz2Daa.cjs.js.map} +1 -1
  17. package/dist/chunks/SelectionManager-CtwcAiw4.es.js +1267 -0
  18. package/dist/chunks/SelectionManager-CtwcAiw4.es.js.map +1 -0
  19. package/dist/chunks/SelectionManager-x0j8UpyW.cjs.js +2 -0
  20. package/dist/chunks/SelectionManager-x0j8UpyW.cjs.js.map +1 -0
  21. package/dist/chunks/Separator-BCuq0iz5.es.js +734 -0
  22. package/dist/chunks/Separator-BCuq0iz5.es.js.map +1 -0
  23. package/dist/chunks/Separator-CcMEmnGS.cjs.js +18 -0
  24. package/dist/chunks/Separator-CcMEmnGS.cjs.js.map +1 -0
  25. package/dist/chunks/{alert-BhoRNIWA.cjs.js → alert-Ce4-sHmy.cjs.js} +2 -2
  26. package/dist/chunks/{alert-BhoRNIWA.cjs.js.map → alert-Ce4-sHmy.cjs.js.map} +1 -1
  27. package/dist/chunks/{alert-D-ddqYG4.es.js → alert-fGOiy9nj.es.js} +2 -2
  28. package/dist/chunks/{alert-D-ddqYG4.es.js.map → alert-fGOiy9nj.es.js.map} +1 -1
  29. package/dist/chunks/{button-CRUdodZm.es.js → button-DEgBQobR.es.js} +2 -2
  30. package/dist/chunks/{button-CRUdodZm.es.js.map → button-DEgBQobR.es.js.map} +1 -1
  31. package/dist/chunks/{button-CU8FW_Pl.cjs.js → button-DJYITnqc.cjs.js} +2 -2
  32. package/dist/chunks/{button-CU8FW_Pl.cjs.js.map → button-DJYITnqc.cjs.js.map} +1 -1
  33. package/dist/chunks/{calendar-DJKWldpV.cjs.js → calendar-BdL5nJXs.cjs.js} +2 -2
  34. package/dist/chunks/{calendar-DJKWldpV.cjs.js.map → calendar-BdL5nJXs.cjs.js.map} +1 -1
  35. package/dist/chunks/{calendar-DzwFtg1t.es.js → calendar-Csq6ml4F.es.js} +4 -4
  36. package/dist/chunks/{calendar-DzwFtg1t.es.js.map → calendar-Csq6ml4F.es.js.map} +1 -1
  37. package/dist/chunks/{checkbox-GmYxVrZx.es.js → checkbox-BFQXCWuz.es.js} +2 -2
  38. package/dist/chunks/{checkbox-GmYxVrZx.es.js.map → checkbox-BFQXCWuz.es.js.map} +1 -1
  39. package/dist/chunks/{checkbox-6nLo9Jy2.cjs.js → checkbox-D-x7pyAC.cjs.js} +2 -2
  40. package/dist/chunks/{checkbox-6nLo9Jy2.cjs.js.map → checkbox-D-x7pyAC.cjs.js.map} +1 -1
  41. package/dist/chunks/{combobox-gIwba2QG.es.js → combobox-DXzhNwE_.es.js} +128 -127
  42. package/dist/chunks/{combobox-gIwba2QG.es.js.map → combobox-DXzhNwE_.es.js.map} +1 -1
  43. package/dist/chunks/combobox-Zdlr1WyV.cjs.js +2 -0
  44. package/dist/chunks/{combobox-DtPDxCo3.cjs.js.map → combobox-Zdlr1WyV.cjs.js.map} +1 -1
  45. package/dist/chunks/data-table-DjXI7oCC.cjs.js +2 -0
  46. package/dist/chunks/{data-table-Cpk3q34E.cjs.js.map → data-table-DjXI7oCC.cjs.js.map} +1 -1
  47. package/dist/chunks/{data-table-mXLxUWQz.es.js → data-table-M8ZE7bUF.es.js} +38 -37
  48. package/dist/chunks/{data-table-mXLxUWQz.es.js.map → data-table-M8ZE7bUF.es.js.map} +1 -1
  49. package/dist/chunks/{date-input-D5unoyMt.es.js → date-input-BGa-cgj-.es.js} +3 -3
  50. package/dist/chunks/{date-input-D5unoyMt.es.js.map → date-input-BGa-cgj-.es.js.map} +1 -1
  51. package/dist/chunks/{date-input-DJ_aFB9i.cjs.js → date-input-C4NM5AFC.cjs.js} +2 -2
  52. package/dist/chunks/{date-input-DJ_aFB9i.cjs.js.map → date-input-C4NM5AFC.cjs.js.map} +1 -1
  53. package/dist/chunks/{date-picker-f3TylaP5.cjs.js → date-picker-ChoImuv_.cjs.js} +2 -2
  54. package/dist/chunks/{date-picker-f3TylaP5.cjs.js.map → date-picker-ChoImuv_.cjs.js.map} +1 -1
  55. package/dist/chunks/{date-picker-CMqAI1lp.es.js → date-picker-S6C2mWMs.es.js} +9 -9
  56. package/dist/chunks/{date-picker-CMqAI1lp.es.js.map → date-picker-S6C2mWMs.es.js.map} +1 -1
  57. package/dist/chunks/{date-range-picker-Dtji64Q9.es.js → date-range-picker-DL00UKjF.es.js} +9 -9
  58. package/dist/chunks/{date-range-picker-Dtji64Q9.es.js.map → date-range-picker-DL00UKjF.es.js.map} +1 -1
  59. package/dist/chunks/{date-range-picker-CxsPpWyX.cjs.js → date-range-picker-DLEQGtgO.cjs.js} +2 -2
  60. package/dist/chunks/{date-range-picker-CxsPpWyX.cjs.js.map → date-range-picker-DLEQGtgO.cjs.js.map} +1 -1
  61. package/dist/chunks/divider-BdtT_f-U.es.js +50 -0
  62. package/dist/chunks/divider-BdtT_f-U.es.js.map +1 -0
  63. package/dist/chunks/divider-o2LVtQJm.cjs.js +2 -0
  64. package/dist/chunks/divider-o2LVtQJm.cjs.js.map +1 -0
  65. package/dist/chunks/{extractStyleProps-vA4cNUoc.es.js → extractStyleProps-CFQKiz8b.es.js} +2 -2
  66. package/dist/chunks/{extractStyleProps-vA4cNUoc.es.js.map → extractStyleProps-CFQKiz8b.es.js.map} +1 -1
  67. package/dist/chunks/{extractStyleProps-CZpHKp1I.cjs.js → extractStyleProps-bWKBkEco.cjs.js} +2 -2
  68. package/dist/chunks/{extractStyleProps-CZpHKp1I.cjs.js.map → extractStyleProps-bWKBkEco.cjs.js.map} +1 -1
  69. package/dist/chunks/{form-field-DxcGAb23.cjs.js → form-field-D1lcT5f5.cjs.js} +2 -2
  70. package/dist/chunks/{form-field-DxcGAb23.cjs.js.map → form-field-D1lcT5f5.cjs.js.map} +1 -1
  71. package/dist/chunks/{form-field-Dtcfgzyo.es.js → form-field-DDTIZj9s.es.js} +3 -3
  72. package/dist/chunks/{form-field-Dtcfgzyo.es.js.map → form-field-DDTIZj9s.es.js.map} +1 -1
  73. package/dist/chunks/{icon-button-Cc0MkBbk.cjs.js → icon-button-CPXhdrQY.cjs.js} +2 -2
  74. package/dist/chunks/{icon-button-Cc0MkBbk.cjs.js.map → icon-button-CPXhdrQY.cjs.js.map} +1 -1
  75. package/dist/chunks/{icon-button-C20Gw8gQ.es.js → icon-button-DPtCLr1A.es.js} +2 -2
  76. package/dist/chunks/{icon-button-C20Gw8gQ.es.js.map → icon-button-DPtCLr1A.es.js.map} +1 -1
  77. package/dist/chunks/{icon-toggle-button-D-C99Q0s.cjs.js → icon-toggle-button-BG-F1KE7.cjs.js} +2 -2
  78. package/dist/chunks/{icon-toggle-button-D-C99Q0s.cjs.js.map → icon-toggle-button-BG-F1KE7.cjs.js.map} +1 -1
  79. package/dist/chunks/{icon-toggle-button-CgHQMDs3.es.js → icon-toggle-button-BItuQ_Lh.es.js} +2 -2
  80. package/dist/chunks/{icon-toggle-button-CgHQMDs3.es.js.map → icon-toggle-button-BItuQ_Lh.es.js.map} +1 -1
  81. package/dist/chunks/{index-C8Yrk__l.cjs.js → index-B3DGNvyC.cjs.js} +3 -3
  82. package/dist/chunks/{index-C8Yrk__l.cjs.js.map → index-B3DGNvyC.cjs.js.map} +1 -1
  83. package/dist/chunks/{index-jAeaCpRm.es.js → index-BDXHumM1.es.js} +8 -9
  84. package/dist/chunks/{index-jAeaCpRm.es.js.map → index-BDXHumM1.es.js.map} +1 -1
  85. package/dist/chunks/menu-DxXsyeUG.cjs.js +2 -0
  86. package/dist/chunks/menu-DxXsyeUG.cjs.js.map +1 -0
  87. package/dist/chunks/menu-aLEA43vB.es.js +150 -0
  88. package/dist/chunks/menu-aLEA43vB.es.js.map +1 -0
  89. package/dist/chunks/{multiline-text-input-BGnvpB1r.es.js → multiline-text-input-sr-8f5JV.es.js} +2 -2
  90. package/dist/chunks/{multiline-text-input-BGnvpB1r.es.js.map → multiline-text-input-sr-8f5JV.es.js.map} +1 -1
  91. package/dist/chunks/{multiline-text-input-sXIlwrvT.cjs.js → multiline-text-input-z1pACPVX.cjs.js} +2 -2
  92. package/dist/chunks/{multiline-text-input-sXIlwrvT.cjs.js.map → multiline-text-input-z1pACPVX.cjs.js.map} +1 -1
  93. package/dist/chunks/{nimbus-provider-D3DvYEDv.cjs.js → nimbus-provider-ClSAgdoD.cjs.js} +2 -2
  94. package/dist/chunks/{nimbus-provider-D3DvYEDv.cjs.js.map → nimbus-provider-ClSAgdoD.cjs.js.map} +1 -1
  95. package/dist/chunks/{nimbus-provider-CybdU89B.es.js → nimbus-provider-DaWtjnp-.es.js} +2 -2
  96. package/dist/chunks/{nimbus-provider-CybdU89B.es.js.map → nimbus-provider-DaWtjnp-.es.js.map} +1 -1
  97. package/dist/chunks/{number-input-CPnA0dO-.cjs.js → number-input-BszmEIip.cjs.js} +2 -2
  98. package/dist/chunks/{number-input-CPnA0dO-.cjs.js.map → number-input-BszmEIip.cjs.js.map} +1 -1
  99. package/dist/chunks/{number-input-CzObpfFa.es.js → number-input-D4DKdybl.es.js} +3 -3
  100. package/dist/chunks/{number-input-CzObpfFa.es.js.map → number-input-D4DKdybl.es.js.map} +1 -1
  101. package/dist/chunks/{password-input-C_rdTND7.es.js → password-input-7AyAmLgJ.es.js} +3 -3
  102. package/dist/chunks/{password-input-C_rdTND7.es.js.map → password-input-7AyAmLgJ.es.js.map} +1 -1
  103. package/dist/chunks/{password-input-BqhrDjyW.cjs.js → password-input-BtvFF-4B.cjs.js} +2 -2
  104. package/dist/chunks/{password-input-BqhrDjyW.cjs.js.map → password-input-BtvFF-4B.cjs.js.map} +1 -1
  105. package/dist/chunks/{progress-bar-CrS1rODC.cjs.js → progress-bar-Dz8r8vuu.cjs.js} +2 -2
  106. package/dist/chunks/{progress-bar-CrS1rODC.cjs.js.map → progress-bar-Dz8r8vuu.cjs.js.map} +1 -1
  107. package/dist/chunks/{progress-bar-pPWJ1Sn8.es.js → progress-bar-Wka_eryr.es.js} +2 -2
  108. package/dist/chunks/{progress-bar-pPWJ1Sn8.es.js.map → progress-bar-Wka_eryr.es.js.map} +1 -1
  109. package/dist/chunks/{radio-input-OpbQD2zP.es.js → radio-input-B0qTg-Fb.es.js} +3 -3
  110. package/dist/chunks/{radio-input-OpbQD2zP.es.js.map → radio-input-B0qTg-Fb.es.js.map} +1 -1
  111. package/dist/chunks/{radio-input-BTEXrXaF.cjs.js → radio-input-D_pe6uBJ.cjs.js} +2 -2
  112. package/dist/chunks/{radio-input-BTEXrXaF.cjs.js.map → radio-input-D_pe6uBJ.cjs.js.map} +1 -1
  113. package/dist/chunks/{range-calendar-BOP_J_5a.es.js → range-calendar-CoAszOTq.es.js} +4 -4
  114. package/dist/chunks/{range-calendar-BOP_J_5a.es.js.map → range-calendar-CoAszOTq.es.js.map} +1 -1
  115. package/dist/chunks/{range-calendar-CFotnBzs.cjs.js → range-calendar-T1Wlvm-Z.cjs.js} +2 -2
  116. package/dist/chunks/{range-calendar-CFotnBzs.cjs.js.map → range-calendar-T1Wlvm-Z.cjs.js.map} +1 -1
  117. package/dist/chunks/{rich-text-input-CYlc7Ozc.es.js → rich-text-input-9MdutxJr.es.js} +7 -7
  118. package/dist/chunks/{rich-text-input-CYlc7Ozc.es.js.map → rich-text-input-9MdutxJr.es.js.map} +1 -1
  119. package/dist/chunks/{rich-text-input-C5lp1D-D.cjs.js → rich-text-input-D36fnIHb.cjs.js} +2 -2
  120. package/dist/chunks/{rich-text-input-C5lp1D-D.cjs.js.map → rich-text-input-D36fnIHb.cjs.js.map} +1 -1
  121. package/dist/chunks/select-DFNyky2d.cjs.js +2 -0
  122. package/dist/chunks/{select-Coyt1pJN.cjs.js.map → select-DFNyky2d.cjs.js.map} +1 -1
  123. package/dist/chunks/{select-CAeD_ZuZ.es.js → select-Dz2O_cFR.es.js} +36 -35
  124. package/dist/chunks/{select-CAeD_ZuZ.es.js.map → select-Dz2O_cFR.es.js.map} +1 -1
  125. package/dist/chunks/{split-button-BYrr5vRr.cjs.js → split-button-BIMKDmUe.cjs.js} +2 -2
  126. package/dist/chunks/split-button-BIMKDmUe.cjs.js.map +1 -0
  127. package/dist/chunks/{split-button-j2bgcP59.es.js → split-button-C5Op1s7Z.es.js} +5 -5
  128. package/dist/chunks/split-button-C5Op1s7Z.es.js.map +1 -0
  129. package/dist/chunks/{switch-BgNpbn2e.cjs.js → switch-BToNhl42.cjs.js} +2 -2
  130. package/dist/chunks/{switch-BgNpbn2e.cjs.js.map → switch-BToNhl42.cjs.js.map} +1 -1
  131. package/dist/chunks/{switch-Cid4U3m8.es.js → switch-Poa2k7a5.es.js} +3 -3
  132. package/dist/chunks/{switch-Cid4U3m8.es.js.map → switch-Poa2k7a5.es.js.map} +1 -1
  133. package/dist/chunks/{tag-group-CeNHz5QQ.es.js → tag-group-BCNooINR.es.js} +44 -43
  134. package/dist/chunks/{tag-group-CeNHz5QQ.es.js.map → tag-group-BCNooINR.es.js.map} +1 -1
  135. package/dist/chunks/tag-group-DzXa9m7w.cjs.js +2 -0
  136. package/dist/chunks/{tag-group-B3YSTBpb.cjs.js.map → tag-group-DzXa9m7w.cjs.js.map} +1 -1
  137. package/dist/chunks/{text-input-C2y4O13I.cjs.js → text-input-5jfm2V1Y.cjs.js} +2 -2
  138. package/dist/chunks/{text-input-C2y4O13I.cjs.js.map → text-input-5jfm2V1Y.cjs.js.map} +1 -1
  139. package/dist/chunks/{text-input-TZXg0lEQ.es.js → text-input-Dqx8GVHm.es.js} +3 -3
  140. package/dist/chunks/{text-input-TZXg0lEQ.es.js.map → text-input-Dqx8GVHm.es.js.map} +1 -1
  141. package/dist/chunks/{time-input-cHUvGWDc.cjs.js → time-input-B_PIpe-Z.cjs.js} +2 -2
  142. package/dist/chunks/{time-input-cHUvGWDc.cjs.js.map → time-input-B_PIpe-Z.cjs.js.map} +1 -1
  143. package/dist/chunks/{time-input-CI_HoOGU.es.js → time-input-DxKFrUee.es.js} +2 -2
  144. package/dist/chunks/{time-input-CI_HoOGU.es.js.map → time-input-DxKFrUee.es.js.map} +1 -1
  145. package/dist/chunks/{toggle-button-a0gCembi.es.js → toggle-button-C1bAVGF3.es.js} +3 -3
  146. package/dist/chunks/{toggle-button-a0gCembi.es.js.map → toggle-button-C1bAVGF3.es.js.map} +1 -1
  147. package/dist/chunks/{toggle-button-C9ezVsSp.cjs.js → toggle-button-Cg00z4JT.cjs.js} +2 -2
  148. package/dist/chunks/{toggle-button-C9ezVsSp.cjs.js.map → toggle-button-Cg00z4JT.cjs.js.map} +1 -1
  149. package/dist/chunks/{toolbar-CLGq6IO7.cjs.js → toolbar-ClUkHnY4.cjs.js} +2 -2
  150. package/dist/chunks/{toolbar-CLGq6IO7.cjs.js.map → toolbar-ClUkHnY4.cjs.js.map} +1 -1
  151. package/dist/chunks/{toolbar-hpBfKrTl.es.js → toolbar-Oxkd8pfI.es.js} +3 -3
  152. package/dist/chunks/{toolbar-hpBfKrTl.es.js.map → toolbar-Oxkd8pfI.es.js.map} +1 -1
  153. package/dist/chunks/{useSingleSelectListState-F2WkLZRg.cjs.js → useSingleSelectListState-C_48GoKf.cjs.js} +2 -2
  154. package/dist/chunks/{useSingleSelectListState-F2WkLZRg.cjs.js.map → useSingleSelectListState-C_48GoKf.cjs.js.map} +1 -1
  155. package/dist/chunks/{useSingleSelectListState-D1rjgMv_.es.js → useSingleSelectListState-DZavH1SN.es.js} +2 -2
  156. package/dist/chunks/{useSingleSelectListState-D1rjgMv_.es.js.map → useSingleSelectListState-DZavH1SN.es.js.map} +1 -1
  157. package/dist/components/alert.cjs +1 -1
  158. package/dist/components/alert.es.js +1 -1
  159. package/dist/components/button.cjs +1 -1
  160. package/dist/components/button.es.js +1 -1
  161. package/dist/components/calendar.cjs +1 -1
  162. package/dist/components/calendar.es.js +1 -1
  163. package/dist/components/checkbox.cjs +1 -1
  164. package/dist/components/checkbox.es.js +1 -1
  165. package/dist/components/combobox.cjs +1 -1
  166. package/dist/components/combobox.es.js +1 -1
  167. package/dist/components/components.cjs +1 -1
  168. package/dist/components/components.es.js +46 -47
  169. package/dist/components/data-table.cjs +1 -1
  170. package/dist/components/data-table.es.js +1 -1
  171. package/dist/components/date-input.cjs +1 -1
  172. package/dist/components/date-input.es.js +1 -1
  173. package/dist/components/date-picker.cjs +1 -1
  174. package/dist/components/date-picker.es.js +1 -1
  175. package/dist/components/date-range-picker.cjs +1 -1
  176. package/dist/components/date-range-picker.es.js +1 -1
  177. package/dist/components/divider.cjs +1 -1
  178. package/dist/components/divider.es.js +1 -1
  179. package/dist/components/form-field.cjs +1 -1
  180. package/dist/components/form-field.es.js +1 -1
  181. package/dist/components/icon-button.cjs +1 -1
  182. package/dist/components/icon-button.es.js +1 -1
  183. package/dist/components/icon-toggle-button.cjs +1 -1
  184. package/dist/components/icon-toggle-button.es.js +1 -1
  185. package/dist/components/multiline-text-input.cjs +1 -1
  186. package/dist/components/multiline-text-input.es.js +1 -1
  187. package/dist/components/nimbus-provider.cjs +1 -1
  188. package/dist/components/nimbus-provider.es.js +1 -1
  189. package/dist/components/number-input.cjs +1 -1
  190. package/dist/components/number-input.es.js +1 -1
  191. package/dist/components/password-input.cjs +1 -1
  192. package/dist/components/password-input.es.js +1 -1
  193. package/dist/components/popover.cjs +1 -1
  194. package/dist/components/popover.es.js +1 -1
  195. package/dist/components/progress-bar.cjs +1 -1
  196. package/dist/components/progress-bar.es.js +1 -1
  197. package/dist/components/radio-input.cjs +1 -1
  198. package/dist/components/radio-input.es.js +1 -1
  199. package/dist/components/range-calendar.cjs +1 -1
  200. package/dist/components/range-calendar.es.js +1 -1
  201. package/dist/components/rich-text-input.cjs +1 -1
  202. package/dist/components/rich-text-input.es.js +1 -1
  203. package/dist/components/select.cjs +1 -1
  204. package/dist/components/select.es.js +1 -1
  205. package/dist/components/split-button.cjs +1 -1
  206. package/dist/components/split-button.es.js +1 -1
  207. package/dist/components/switch.cjs +1 -1
  208. package/dist/components/switch.es.js +1 -1
  209. package/dist/components/tag-group.cjs +1 -1
  210. package/dist/components/tag-group.es.js +1 -1
  211. package/dist/components/text-input.cjs +1 -1
  212. package/dist/components/text-input.es.js +1 -1
  213. package/dist/components/time-input.cjs +1 -1
  214. package/dist/components/time-input.es.js +1 -1
  215. package/dist/components/toggle-button.cjs +1 -1
  216. package/dist/components/toggle-button.es.js +1 -1
  217. package/dist/components/toolbar.cjs +1 -1
  218. package/dist/components/toolbar.es.js +1 -1
  219. package/dist/components.d.ts +5 -20
  220. package/dist/divider.d.ts +2 -2
  221. package/dist/index.cjs +1 -1
  222. package/dist/index.d.ts +5 -20
  223. package/dist/index.es.js +99 -100
  224. package/dist/split-button.d.ts +2 -2
  225. package/package.json +5 -5
  226. package/dist/chunks/Dialog-CYa26HlL.cjs.js +0 -2
  227. package/dist/chunks/ListBox-CikEmFBx.cjs.js +0 -2
  228. package/dist/chunks/SelectionManager-CLyu96pU.es.js +0 -1946
  229. package/dist/chunks/SelectionManager-CLyu96pU.es.js.map +0 -1
  230. package/dist/chunks/SelectionManager-Mrwf4SFv.cjs.js +0 -18
  231. package/dist/chunks/SelectionManager-Mrwf4SFv.cjs.js.map +0 -1
  232. package/dist/chunks/Separator-3-E2tRbk.es.js +0 -92
  233. package/dist/chunks/Separator-3-E2tRbk.es.js.map +0 -1
  234. package/dist/chunks/Separator-CAOg-vqY.cjs.js +0 -2
  235. package/dist/chunks/Separator-CAOg-vqY.cjs.js.map +0 -1
  236. package/dist/chunks/combobox-DtPDxCo3.cjs.js +0 -2
  237. package/dist/chunks/data-table-Cpk3q34E.cjs.js +0 -2
  238. package/dist/chunks/divider--BAm3ca4.es.js +0 -53
  239. package/dist/chunks/divider--BAm3ca4.es.js.map +0 -1
  240. package/dist/chunks/divider-BuizjeAj.cjs.js +0 -2
  241. package/dist/chunks/divider-BuizjeAj.cjs.js.map +0 -1
  242. package/dist/chunks/menu-8g9Hn1nm.es.js +0 -157
  243. package/dist/chunks/menu-8g9Hn1nm.es.js.map +0 -1
  244. package/dist/chunks/menu-Bm1u-R6o.cjs.js +0 -2
  245. package/dist/chunks/menu-Bm1u-R6o.cjs.js.map +0 -1
  246. package/dist/chunks/select-Coyt1pJN.cjs.js +0 -2
  247. package/dist/chunks/split-button-BYrr5vRr.cjs.js.map +0 -1
  248. package/dist/chunks/split-button-j2bgcP59.es.js.map +0 -1
  249. package/dist/chunks/tag-group-B3YSTBpb.cjs.js +0 -2
  250. package/dist/chunks/useSeparator-B-OtWwE7.cjs.js +0 -2
  251. package/dist/chunks/useSeparator-B-OtWwE7.cjs.js.map +0 -1
  252. package/dist/chunks/useSeparator-Dg70ACBm.es.js +0 -19
  253. package/dist/chunks/useSeparator-Dg70ACBm.es.js.map +0 -1
@@ -0,0 +1,1267 @@
1
+ import L, { useRef as w, useEffect as j, useMemo as W, createContext as Q, isValidElement as Me, cloneElement as Le, useState as oe } from "react";
2
+ import { a as Pe, d as Te } from "./utils-jpfA6kxk.es.js";
3
+ import { c as ye, $ as Y, a as Ie, d as pe, e as Oe } from "./mergeProps-B_9syxhT.es.js";
4
+ import { $ as ae } from "./focusWithoutScrolling-CDw3JYiq.es.js";
5
+ import { $ as Ee, d as ze } from "./openLink-Ctl0AdAy.es.js";
6
+ import { $ as Z } from "./useEvent-YHhqZvpU.es.js";
7
+ import { a as Ve, b as Ue, c as ve, d as ge } from "./scrollIntoView-BYF_8_6g.es.js";
8
+ import { b as He } from "./FocusScope-CNO0fzPs.es.js";
9
+ import { b as be } from "./useFocusVisible-CWDaG0ze.es.js";
10
+ import { $ as fe } from "./focusSafely-DJpphVHF.es.js";
11
+ import { flushSync as We } from "react-dom";
12
+ import { $ as qe } from "./context-R4YUlO9Y.es.js";
13
+ import { b as Ge, g as je } from "./platform-Z5fvtFmM.es.js";
14
+ import { $ as ke } from "./usePress-DHhWHfMz.es.js";
15
+ import { $ as Ye } from "./useGlobalListeners-BOOfV5Wh.es.js";
16
+ import { j as Xe } from "./Separator-BCuq0iz5.es.js";
17
+ import { $ as Ze } from "./useControlledState-u436Wbp1.es.js";
18
+ function me(n, e) {
19
+ const t = w(!0), l = w(null);
20
+ ye(() => (t.current = !0, () => {
21
+ t.current = !1;
22
+ }), []), ye(() => {
23
+ t.current ? t.current = !1 : (!l.current || e.some((i, s) => !Object.is(i, l[s]))) && n(), l.current = e;
24
+ }, e);
25
+ }
26
+ const Je = "react-aria-clear-focus", Qe = "react-aria-focus";
27
+ function H(n) {
28
+ return Ge() ? n.metaKey : n.ctrlKey;
29
+ }
30
+ const Ne = 500;
31
+ function _e(n) {
32
+ let { isDisabled: e, onLongPressStart: t, onLongPressEnd: l, onLongPress: i, threshold: s = Ne, accessibilityDescription: o } = n;
33
+ const f = w(void 0);
34
+ let { addGlobalListener: a, removeGlobalListener: $ } = Ye(), { pressProps: I } = ke({
35
+ isDisabled: e,
36
+ onPressStart(v) {
37
+ if (v.continuePropagation(), (v.pointerType === "mouse" || v.pointerType === "touch") && (t && t({
38
+ ...v,
39
+ type: "longpressstart"
40
+ }), f.current = setTimeout(() => {
41
+ v.target.dispatchEvent(new PointerEvent("pointercancel", {
42
+ bubbles: !0
43
+ })), Pe(v.target).activeElement !== v.target && ae(v.target), i && i({
44
+ ...v,
45
+ type: "longpress"
46
+ }), f.current = void 0;
47
+ }, s), v.pointerType === "touch")) {
48
+ let m = (g) => {
49
+ g.preventDefault();
50
+ };
51
+ a(v.target, "contextmenu", m, {
52
+ once: !0
53
+ }), a(window, "pointerup", () => {
54
+ setTimeout(() => {
55
+ $(v.target, "contextmenu", m);
56
+ }, 30);
57
+ }, {
58
+ once: !0
59
+ });
60
+ }
61
+ },
62
+ onPressEnd(v) {
63
+ f.current && clearTimeout(f.current), l && (v.pointerType === "mouse" || v.pointerType === "touch") && l({
64
+ ...v,
65
+ type: "longpressend"
66
+ });
67
+ }
68
+ }), b = Ve(i && !e ? o : void 0);
69
+ return {
70
+ longPressProps: Y(I, b)
71
+ };
72
+ }
73
+ function Ae(n) {
74
+ let e = tt(Pe(n));
75
+ e !== n && (e && et(e, n), n && Ce(n, e));
76
+ }
77
+ function et(n, e) {
78
+ n.dispatchEvent(new FocusEvent("blur", {
79
+ relatedTarget: e
80
+ })), n.dispatchEvent(new FocusEvent("focusout", {
81
+ bubbles: !0,
82
+ relatedTarget: e
83
+ }));
84
+ }
85
+ function Ce(n, e) {
86
+ n.dispatchEvent(new FocusEvent("focus", {
87
+ relatedTarget: e
88
+ })), n.dispatchEvent(new FocusEvent("focusin", {
89
+ bubbles: !0,
90
+ relatedTarget: e
91
+ }));
92
+ }
93
+ function tt(n) {
94
+ let e = Te(n), t = e?.getAttribute("aria-activedescendant");
95
+ return t && n.getElementById(t) || e;
96
+ }
97
+ function de(n) {
98
+ return je() ? n.altKey : n.ctrlKey;
99
+ }
100
+ function J(n, e) {
101
+ var t, l;
102
+ let i = `[data-key="${CSS.escape(String(e))}"]`, s = (t = n.current) === null || t === void 0 ? void 0 : t.dataset.collection;
103
+ return s && (i = `[data-collection="${CSS.escape(s)}"]${i}`), (l = n.current) === null || l === void 0 ? void 0 : l.querySelector(i);
104
+ }
105
+ const Re = /* @__PURE__ */ new WeakMap();
106
+ function lt(n) {
107
+ let e = Ie();
108
+ return Re.set(n, e), e;
109
+ }
110
+ function it(n) {
111
+ return Re.get(n);
112
+ }
113
+ const nt = 1e3;
114
+ function rt(n) {
115
+ let { keyboardDelegate: e, selectionManager: t, onTypeSelect: l } = n, i = w({
116
+ search: "",
117
+ timeout: void 0
118
+ }).current, s = (o) => {
119
+ let f = st(o.key);
120
+ if (!(!f || o.ctrlKey || o.metaKey || !o.currentTarget.contains(o.target) || i.search.length === 0 && f === " ")) {
121
+ if (f === " " && i.search.trim().length > 0 && (o.preventDefault(), "continuePropagation" in o || o.stopPropagation()), i.search += f, e.getKeyForSearch != null) {
122
+ let a = e.getKeyForSearch(i.search, t.focusedKey);
123
+ a == null && (a = e.getKeyForSearch(i.search)), a != null && (t.setFocusedKey(a), l && l(a));
124
+ }
125
+ clearTimeout(i.timeout), i.timeout = setTimeout(() => {
126
+ i.search = "";
127
+ }, nt);
128
+ }
129
+ };
130
+ return {
131
+ typeSelectProps: {
132
+ // Using a capturing listener to catch the keydown event before
133
+ // other hooks in order to handle the Spacebar event.
134
+ onKeyDownCapture: e.getKeyForSearch ? s : void 0
135
+ }
136
+ };
137
+ }
138
+ function st(n) {
139
+ return n.length === 1 || !/^[A-Z]/i.test(n) ? n : "";
140
+ }
141
+ function At(n) {
142
+ let { selectionManager: e, keyboardDelegate: t, ref: l, autoFocus: i = !1, shouldFocusWrap: s = !1, disallowEmptySelection: o = !1, disallowSelectAll: f = !1, escapeKeyBehavior: a = "clearSelection", selectOnFocus: $ = e.selectionBehavior === "replace", disallowTypeAhead: I = !1, shouldUseVirtualFocus: b, allowsTabNavigation: v = !1, isVirtualized: m, scrollRef: g = l, linkBehavior: E = "action" } = n, { direction: y } = qe(), h = Ee(), S = (c) => {
143
+ var d;
144
+ if (c.altKey && c.key === "Tab" && c.preventDefault(), !(!((d = l.current) === null || d === void 0) && d.contains(c.target))) return;
145
+ const r = (u, V) => {
146
+ if (u != null) {
147
+ if (e.isLink(u) && E === "selection" && $ && !de(c)) {
148
+ We(() => {
149
+ e.setFocusedKey(u, V);
150
+ });
151
+ let U = J(l, u), he = e.getItemProps(u);
152
+ U && h.open(U, c, he.href, he.routerOptions);
153
+ return;
154
+ }
155
+ if (e.setFocusedKey(u, V), e.isLink(u) && E === "override") return;
156
+ c.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(u) : $ && !de(c) && e.replaceSelection(u);
157
+ }
158
+ };
159
+ switch (c.key) {
160
+ case "ArrowDown":
161
+ if (t.getKeyBelow) {
162
+ var K, T, P;
163
+ let u = e.focusedKey != null ? (K = t.getKeyBelow) === null || K === void 0 ? void 0 : K.call(t, e.focusedKey) : (T = t.getFirstKey) === null || T === void 0 ? void 0 : T.call(t);
164
+ u == null && s && (u = (P = t.getFirstKey) === null || P === void 0 ? void 0 : P.call(t, e.focusedKey)), u != null && (c.preventDefault(), r(u));
165
+ }
166
+ break;
167
+ case "ArrowUp":
168
+ if (t.getKeyAbove) {
169
+ var M, z, ee;
170
+ let u = e.focusedKey != null ? (M = t.getKeyAbove) === null || M === void 0 ? void 0 : M.call(t, e.focusedKey) : (z = t.getLastKey) === null || z === void 0 ? void 0 : z.call(t);
171
+ u == null && s && (u = (ee = t.getLastKey) === null || ee === void 0 ? void 0 : ee.call(t, e.focusedKey)), u != null && (c.preventDefault(), r(u));
172
+ }
173
+ break;
174
+ case "ArrowLeft":
175
+ if (t.getKeyLeftOf) {
176
+ var te, le, ie;
177
+ let u = e.focusedKey != null ? (te = t.getKeyLeftOf) === null || te === void 0 ? void 0 : te.call(t, e.focusedKey) : null;
178
+ u == null && s && (u = y === "rtl" ? (le = t.getFirstKey) === null || le === void 0 ? void 0 : le.call(t, e.focusedKey) : (ie = t.getLastKey) === null || ie === void 0 ? void 0 : ie.call(t, e.focusedKey)), u != null && (c.preventDefault(), r(u, y === "rtl" ? "first" : "last"));
179
+ }
180
+ break;
181
+ case "ArrowRight":
182
+ if (t.getKeyRightOf) {
183
+ var ne, re, se;
184
+ let u = e.focusedKey != null ? (ne = t.getKeyRightOf) === null || ne === void 0 ? void 0 : ne.call(t, e.focusedKey) : null;
185
+ u == null && s && (u = y === "rtl" ? (re = t.getLastKey) === null || re === void 0 ? void 0 : re.call(t, e.focusedKey) : (se = t.getFirstKey) === null || se === void 0 ? void 0 : se.call(t, e.focusedKey)), u != null && (c.preventDefault(), r(u, y === "rtl" ? "last" : "first"));
186
+ }
187
+ break;
188
+ case "Home":
189
+ if (t.getFirstKey) {
190
+ if (e.focusedKey === null && c.shiftKey) return;
191
+ c.preventDefault();
192
+ let u = t.getFirstKey(e.focusedKey, H(c));
193
+ e.setFocusedKey(u), u != null && (H(c) && c.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(u) : $ && e.replaceSelection(u));
194
+ }
195
+ break;
196
+ case "End":
197
+ if (t.getLastKey) {
198
+ if (e.focusedKey === null && c.shiftKey) return;
199
+ c.preventDefault();
200
+ let u = t.getLastKey(e.focusedKey, H(c));
201
+ e.setFocusedKey(u), u != null && (H(c) && c.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(u) : $ && e.replaceSelection(u));
202
+ }
203
+ break;
204
+ case "PageDown":
205
+ if (t.getKeyPageBelow && e.focusedKey != null) {
206
+ let u = t.getKeyPageBelow(e.focusedKey);
207
+ u != null && (c.preventDefault(), r(u));
208
+ }
209
+ break;
210
+ case "PageUp":
211
+ if (t.getKeyPageAbove && e.focusedKey != null) {
212
+ let u = t.getKeyPageAbove(e.focusedKey);
213
+ u != null && (c.preventDefault(), r(u));
214
+ }
215
+ break;
216
+ case "a":
217
+ H(c) && e.selectionMode === "multiple" && f !== !0 && (c.preventDefault(), e.selectAll());
218
+ break;
219
+ case "Escape":
220
+ a === "clearSelection" && !o && e.selectedKeys.size !== 0 && (c.stopPropagation(), c.preventDefault(), e.clearSelection());
221
+ break;
222
+ case "Tab":
223
+ if (!v) {
224
+ if (c.shiftKey) l.current.focus();
225
+ else {
226
+ let u = He(l.current, {
227
+ tabbable: !0
228
+ }), V, U;
229
+ do
230
+ U = u.lastChild(), U && (V = U);
231
+ while (U);
232
+ V && !V.contains(document.activeElement) && ae(V);
233
+ }
234
+ break;
235
+ }
236
+ }
237
+ }, p = w({
238
+ top: 0,
239
+ left: 0
240
+ });
241
+ Z(g, "scroll", m ? void 0 : () => {
242
+ var c, d, r, K;
243
+ p.current = {
244
+ top: (r = (c = g.current) === null || c === void 0 ? void 0 : c.scrollTop) !== null && r !== void 0 ? r : 0,
245
+ left: (K = (d = g.current) === null || d === void 0 ? void 0 : d.scrollLeft) !== null && K !== void 0 ? K : 0
246
+ };
247
+ });
248
+ let D = (c) => {
249
+ if (e.isFocused) {
250
+ c.currentTarget.contains(c.target) || e.setFocused(!1);
251
+ return;
252
+ }
253
+ if (c.currentTarget.contains(c.target)) {
254
+ if (e.setFocused(!0), e.focusedKey == null) {
255
+ var d, r;
256
+ let P = (z) => {
257
+ z != null && (e.setFocusedKey(z), $ && !e.isSelected(z) && e.replaceSelection(z));
258
+ }, M = c.relatedTarget;
259
+ var K, T;
260
+ M && c.currentTarget.compareDocumentPosition(M) & Node.DOCUMENT_POSITION_FOLLOWING ? P((K = e.lastSelectedKey) !== null && K !== void 0 ? K : (d = t.getLastKey) === null || d === void 0 ? void 0 : d.call(t)) : P((T = e.firstSelectedKey) !== null && T !== void 0 ? T : (r = t.getFirstKey) === null || r === void 0 ? void 0 : r.call(t));
261
+ } else !m && g.current && (g.current.scrollTop = p.current.top, g.current.scrollLeft = p.current.left);
262
+ if (e.focusedKey != null && g.current) {
263
+ let P = J(l, e.focusedKey);
264
+ P instanceof HTMLElement && (!P.contains(document.activeElement) && !b && ae(P), be() === "keyboard" && ve(P, {
265
+ containingElement: l.current
266
+ }));
267
+ }
268
+ }
269
+ }, k = (c) => {
270
+ c.currentTarget.contains(c.relatedTarget) || e.setFocused(!1);
271
+ }, A = w(!1);
272
+ Z(l, Qe, b ? (c) => {
273
+ let { detail: d } = c;
274
+ c.stopPropagation(), e.setFocused(!0), d?.focusStrategy === "first" && (A.current = !0);
275
+ } : void 0);
276
+ let R = pe(() => {
277
+ var c, d;
278
+ let r = (d = (c = t.getFirstKey) === null || c === void 0 ? void 0 : c.call(t)) !== null && d !== void 0 ? d : null;
279
+ if (r == null) {
280
+ let K = Te();
281
+ Ae(l.current), Ce(K, null), e.collection.size > 0 && (A.current = !1);
282
+ } else
283
+ e.setFocusedKey(r), A.current = !1;
284
+ });
285
+ me(() => {
286
+ A.current && R();
287
+ }, [
288
+ e.collection,
289
+ R
290
+ ]);
291
+ let F = pe(() => {
292
+ e.collection.size > 0 && (A.current = !1);
293
+ });
294
+ me(() => {
295
+ F();
296
+ }, [
297
+ e.focusedKey,
298
+ F
299
+ ]), Z(l, Je, b ? (c) => {
300
+ var d;
301
+ c.stopPropagation(), e.setFocused(!1), !((d = c.detail) === null || d === void 0) && d.clearFocusKey && e.setFocusedKey(null);
302
+ } : void 0);
303
+ const q = w(i), B = w(!1);
304
+ j(() => {
305
+ if (q.current) {
306
+ var c, d;
307
+ let T = null;
308
+ var r;
309
+ i === "first" && (T = (r = (c = t.getFirstKey) === null || c === void 0 ? void 0 : c.call(t)) !== null && r !== void 0 ? r : null);
310
+ var K;
311
+ i === "last" && (T = (K = (d = t.getLastKey) === null || d === void 0 ? void 0 : d.call(t)) !== null && K !== void 0 ? K : null);
312
+ let P = e.selectedKeys;
313
+ if (P.size) {
314
+ for (let M of P) if (e.canSelectItem(M)) {
315
+ T = M;
316
+ break;
317
+ }
318
+ }
319
+ e.setFocused(!0), e.setFocusedKey(T), T == null && !b && l.current && fe(l.current), e.collection.size > 0 && (q.current = !1, B.current = !0);
320
+ }
321
+ });
322
+ let O = w(e.focusedKey), x = w(null);
323
+ j(() => {
324
+ if (e.isFocused && e.focusedKey != null && (e.focusedKey !== O.current || B.current) && g.current && l.current) {
325
+ let c = be(), d = J(l, e.focusedKey);
326
+ if (!(d instanceof HTMLElement))
327
+ return;
328
+ (c === "keyboard" || B.current) && (x.current && cancelAnimationFrame(x.current), x.current = requestAnimationFrame(() => {
329
+ g.current && (Ue(g.current, d), c !== "virtual" && ve(d, {
330
+ containingElement: l.current
331
+ }));
332
+ }));
333
+ }
334
+ !b && e.isFocused && e.focusedKey == null && O.current != null && l.current && fe(l.current), O.current = e.focusedKey, B.current = !1;
335
+ }), j(() => () => {
336
+ x.current && cancelAnimationFrame(x.current);
337
+ }, []), Z(l, "react-aria-focus-scope-restore", (c) => {
338
+ c.preventDefault(), e.setFocused(!0);
339
+ });
340
+ let G = {
341
+ onKeyDown: S,
342
+ onFocus: D,
343
+ onBlur: k,
344
+ onMouseDown(c) {
345
+ g.current === c.target && c.preventDefault();
346
+ }
347
+ }, { typeSelectProps: N } = rt({
348
+ keyboardDelegate: t,
349
+ selectionManager: e
350
+ });
351
+ I || (G = Y(N, G));
352
+ let X;
353
+ b || (X = e.focusedKey == null ? 0 : -1);
354
+ let _ = lt(e.collection);
355
+ return {
356
+ collectionProps: Y(G, {
357
+ tabIndex: X,
358
+ "data-collection": _
359
+ })
360
+ };
361
+ }
362
+ function Ct(n) {
363
+ let { id: e, selectionManager: t, key: l, ref: i, shouldSelectOnPressUp: s, shouldUseVirtualFocus: o, focus: f, isDisabled: a, onAction: $, allowsDifferentPressOrigin: I, linkBehavior: b = "action" } = n, v = Ee();
364
+ e = Ie(e);
365
+ let m = (r) => {
366
+ if (r.pointerType === "keyboard" && de(r)) t.toggleSelection(l);
367
+ else {
368
+ if (t.selectionMode === "none") return;
369
+ if (t.isLink(l)) {
370
+ if (b === "selection" && i.current) {
371
+ let K = t.getItemProps(l);
372
+ v.open(i.current, r, K.href, K.routerOptions), t.setSelectedKeys(t.selectedKeys);
373
+ return;
374
+ } else if (b === "override" || b === "none") return;
375
+ }
376
+ t.selectionMode === "single" ? t.isSelected(l) && !t.disallowEmptySelection ? t.toggleSelection(l) : t.replaceSelection(l) : r && r.shiftKey ? t.extendSelection(l) : t.selectionBehavior === "toggle" || r && (H(r) || r.pointerType === "touch" || r.pointerType === "virtual") ? t.toggleSelection(l) : t.replaceSelection(l);
377
+ }
378
+ };
379
+ j(() => {
380
+ l === t.focusedKey && t.isFocused && (o ? Ae(i.current) : f ? f() : document.activeElement !== i.current && i.current && fe(i.current));
381
+ }, [
382
+ i,
383
+ l,
384
+ t.focusedKey,
385
+ t.childFocusStrategy,
386
+ t.isFocused,
387
+ o
388
+ ]), a = a || t.isDisabled(l);
389
+ let g = {};
390
+ !o && !a ? g = {
391
+ tabIndex: l === t.focusedKey ? 0 : -1,
392
+ onFocus(r) {
393
+ r.target === i.current && t.setFocusedKey(l);
394
+ }
395
+ } : a && (g.onMouseDown = (r) => {
396
+ r.preventDefault();
397
+ });
398
+ let E = t.isLink(l) && b === "override", y = t.isLink(l) && b !== "selection" && b !== "none", h = !a && t.canSelectItem(l) && !E, S = ($ || y) && !a, p = S && (t.selectionBehavior === "replace" ? !h : !h || t.isEmpty), D = S && h && t.selectionBehavior === "replace", k = p || D, A = w(null), R = k && h, F = w(!1), q = w(!1), B = t.getItemProps(l), O = (r) => {
399
+ $ && $(), y && i.current && v.open(i.current, r, B.href, B.routerOptions);
400
+ }, x = {
401
+ ref: i
402
+ };
403
+ if (s ? (x.onPressStart = (r) => {
404
+ A.current = r.pointerType, F.current = R, r.pointerType === "keyboard" && (!k || Ke()) && m(r);
405
+ }, I ? (x.onPressUp = p ? void 0 : (r) => {
406
+ r.pointerType === "mouse" && h && m(r);
407
+ }, x.onPress = p ? O : (r) => {
408
+ r.pointerType !== "keyboard" && r.pointerType !== "mouse" && h && m(r);
409
+ }) : x.onPress = (r) => {
410
+ if (p || D && r.pointerType !== "mouse") {
411
+ if (r.pointerType === "keyboard" && !$e()) return;
412
+ O(r);
413
+ } else r.pointerType !== "keyboard" && h && m(r);
414
+ }) : (x.onPressStart = (r) => {
415
+ A.current = r.pointerType, F.current = R, q.current = p, h && (r.pointerType === "mouse" && !p || r.pointerType === "keyboard" && (!S || Ke())) && m(r);
416
+ }, x.onPress = (r) => {
417
+ (r.pointerType === "touch" || r.pointerType === "pen" || r.pointerType === "virtual" || r.pointerType === "keyboard" && k && $e() || r.pointerType === "mouse" && q.current) && (k ? O(r) : h && m(r));
418
+ }), g["data-collection"] = it(t.collection), g["data-key"] = l, x.preventFocusOnPress = o, o && (x = Y(x, {
419
+ onPressStart(r) {
420
+ r.pointerType !== "touch" && (t.setFocused(!0), t.setFocusedKey(l));
421
+ },
422
+ onPress(r) {
423
+ r.pointerType === "touch" && (t.setFocused(!0), t.setFocusedKey(l));
424
+ }
425
+ })), B)
426
+ for (let r of [
427
+ "onPressStart",
428
+ "onPressEnd",
429
+ "onPressChange",
430
+ "onPress",
431
+ "onPressUp",
432
+ "onClick"
433
+ ]) B[r] && (x[r] = Oe(x[r], B[r]));
434
+ let { pressProps: G, isPressed: N } = ke(x), X = D ? (r) => {
435
+ A.current === "mouse" && (r.stopPropagation(), r.preventDefault(), O(r));
436
+ } : void 0, { longPressProps: _ } = _e({
437
+ isDisabled: !R,
438
+ onLongPress(r) {
439
+ r.pointerType === "touch" && (m(r), t.setSelectionBehavior("toggle"));
440
+ }
441
+ }), c = (r) => {
442
+ A.current === "touch" && F.current && r.preventDefault();
443
+ }, d = b !== "none" && t.isLink(l) ? (r) => {
444
+ ze.isOpening || r.preventDefault();
445
+ } : void 0;
446
+ return {
447
+ itemProps: Y(
448
+ g,
449
+ h || p || o && !a ? G : {},
450
+ R ? _ : {},
451
+ {
452
+ onDoubleClick: X,
453
+ onDragStartCapture: c,
454
+ onClick: d,
455
+ id: e
456
+ },
457
+ // Prevent DOM focus from moving on mouse down when using virtual focus
458
+ o ? {
459
+ onMouseDown: (r) => r.preventDefault()
460
+ } : void 0
461
+ ),
462
+ isPressed: N,
463
+ isSelected: t.isSelected(l),
464
+ isFocused: t.isFocused && t.focusedKey === l,
465
+ isDisabled: a,
466
+ allowsSelection: h,
467
+ hasAction: k
468
+ };
469
+ }
470
+ function $e() {
471
+ let n = window.event;
472
+ return n?.key === "Enter";
473
+ }
474
+ function Ke() {
475
+ let n = window.event;
476
+ return n?.key === " " || n?.code === "Space";
477
+ }
478
+ class Se {
479
+ getItemRect(e) {
480
+ let t = this.ref.current;
481
+ if (!t) return null;
482
+ let l = e != null ? J(this.ref, e) : null;
483
+ if (!l) return null;
484
+ let i = t.getBoundingClientRect(), s = l.getBoundingClientRect();
485
+ return {
486
+ x: s.left - i.left + t.scrollLeft,
487
+ y: s.top - i.top + t.scrollTop,
488
+ width: s.width,
489
+ height: s.height
490
+ };
491
+ }
492
+ getContentSize() {
493
+ let e = this.ref.current;
494
+ var t, l;
495
+ return {
496
+ width: (t = e?.scrollWidth) !== null && t !== void 0 ? t : 0,
497
+ height: (l = e?.scrollHeight) !== null && l !== void 0 ? l : 0
498
+ };
499
+ }
500
+ getVisibleRect() {
501
+ let e = this.ref.current;
502
+ var t, l, i, s;
503
+ return {
504
+ x: (t = e?.scrollLeft) !== null && t !== void 0 ? t : 0,
505
+ y: (l = e?.scrollTop) !== null && l !== void 0 ? l : 0,
506
+ width: (i = e?.offsetWidth) !== null && i !== void 0 ? i : 0,
507
+ height: (s = e?.offsetHeight) !== null && s !== void 0 ? s : 0
508
+ };
509
+ }
510
+ constructor(e) {
511
+ this.ref = e;
512
+ }
513
+ }
514
+ class Rt {
515
+ isDisabled(e) {
516
+ var t;
517
+ return this.disabledBehavior === "all" && (((t = e.props) === null || t === void 0 ? void 0 : t.isDisabled) || this.disabledKeys.has(e.key));
518
+ }
519
+ findNextNonDisabled(e, t) {
520
+ let l = e;
521
+ for (; l != null; ) {
522
+ let i = this.collection.getItem(l);
523
+ if (i?.type === "item" && !this.isDisabled(i)) return l;
524
+ l = t(l);
525
+ }
526
+ return null;
527
+ }
528
+ getNextKey(e) {
529
+ let t = e;
530
+ return t = this.collection.getKeyAfter(t), this.findNextNonDisabled(t, (l) => this.collection.getKeyAfter(l));
531
+ }
532
+ getPreviousKey(e) {
533
+ let t = e;
534
+ return t = this.collection.getKeyBefore(t), this.findNextNonDisabled(t, (l) => this.collection.getKeyBefore(l));
535
+ }
536
+ findKey(e, t, l) {
537
+ let i = e, s = this.layoutDelegate.getItemRect(i);
538
+ if (!s || i == null) return null;
539
+ let o = s;
540
+ do {
541
+ if (i = t(i), i == null) break;
542
+ s = this.layoutDelegate.getItemRect(i);
543
+ } while (s && l(o, s) && i != null);
544
+ return i;
545
+ }
546
+ isSameRow(e, t) {
547
+ return e.y === t.y || e.x !== t.x;
548
+ }
549
+ isSameColumn(e, t) {
550
+ return e.x === t.x || e.y !== t.y;
551
+ }
552
+ getKeyBelow(e) {
553
+ return this.layout === "grid" && this.orientation === "vertical" ? this.findKey(e, (t) => this.getNextKey(t), this.isSameRow) : this.getNextKey(e);
554
+ }
555
+ getKeyAbove(e) {
556
+ return this.layout === "grid" && this.orientation === "vertical" ? this.findKey(e, (t) => this.getPreviousKey(t), this.isSameRow) : this.getPreviousKey(e);
557
+ }
558
+ getNextColumn(e, t) {
559
+ return t ? this.getPreviousKey(e) : this.getNextKey(e);
560
+ }
561
+ getKeyRightOf(e) {
562
+ let t = this.direction === "ltr" ? "getKeyRightOf" : "getKeyLeftOf";
563
+ return this.layoutDelegate[t] ? (e = this.layoutDelegate[t](e), this.findNextNonDisabled(e, (l) => this.layoutDelegate[t](l))) : this.layout === "grid" ? this.orientation === "vertical" ? this.getNextColumn(e, this.direction === "rtl") : this.findKey(e, (l) => this.getNextColumn(l, this.direction === "rtl"), this.isSameColumn) : this.orientation === "horizontal" ? this.getNextColumn(e, this.direction === "rtl") : null;
564
+ }
565
+ getKeyLeftOf(e) {
566
+ let t = this.direction === "ltr" ? "getKeyLeftOf" : "getKeyRightOf";
567
+ return this.layoutDelegate[t] ? (e = this.layoutDelegate[t](e), this.findNextNonDisabled(e, (l) => this.layoutDelegate[t](l))) : this.layout === "grid" ? this.orientation === "vertical" ? this.getNextColumn(e, this.direction === "ltr") : this.findKey(e, (l) => this.getNextColumn(l, this.direction === "ltr"), this.isSameColumn) : this.orientation === "horizontal" ? this.getNextColumn(e, this.direction === "ltr") : null;
568
+ }
569
+ getFirstKey() {
570
+ let e = this.collection.getFirstKey();
571
+ return this.findNextNonDisabled(e, (t) => this.collection.getKeyAfter(t));
572
+ }
573
+ getLastKey() {
574
+ let e = this.collection.getLastKey();
575
+ return this.findNextNonDisabled(e, (t) => this.collection.getKeyBefore(t));
576
+ }
577
+ getKeyPageAbove(e) {
578
+ let t = this.ref.current, l = this.layoutDelegate.getItemRect(e);
579
+ if (!l) return null;
580
+ if (t && !ge(t)) return this.getFirstKey();
581
+ let i = e;
582
+ if (this.orientation === "horizontal") {
583
+ let s = Math.max(0, l.x + l.width - this.layoutDelegate.getVisibleRect().width);
584
+ for (; l && l.x > s && i != null; )
585
+ i = this.getKeyAbove(i), l = i == null ? null : this.layoutDelegate.getItemRect(i);
586
+ } else {
587
+ let s = Math.max(0, l.y + l.height - this.layoutDelegate.getVisibleRect().height);
588
+ for (; l && l.y > s && i != null; )
589
+ i = this.getKeyAbove(i), l = i == null ? null : this.layoutDelegate.getItemRect(i);
590
+ }
591
+ return i ?? this.getFirstKey();
592
+ }
593
+ getKeyPageBelow(e) {
594
+ let t = this.ref.current, l = this.layoutDelegate.getItemRect(e);
595
+ if (!l) return null;
596
+ if (t && !ge(t)) return this.getLastKey();
597
+ let i = e;
598
+ if (this.orientation === "horizontal") {
599
+ let s = Math.min(this.layoutDelegate.getContentSize().width, l.y - l.width + this.layoutDelegate.getVisibleRect().width);
600
+ for (; l && l.x < s && i != null; )
601
+ i = this.getKeyBelow(i), l = i == null ? null : this.layoutDelegate.getItemRect(i);
602
+ } else {
603
+ let s = Math.min(this.layoutDelegate.getContentSize().height, l.y - l.height + this.layoutDelegate.getVisibleRect().height);
604
+ for (; l && l.y < s && i != null; )
605
+ i = this.getKeyBelow(i), l = i == null ? null : this.layoutDelegate.getItemRect(i);
606
+ }
607
+ return i ?? this.getLastKey();
608
+ }
609
+ getKeyForSearch(e, t) {
610
+ if (!this.collator) return null;
611
+ let l = this.collection, i = t || this.getFirstKey();
612
+ for (; i != null; ) {
613
+ let s = l.getItem(i);
614
+ if (!s) return null;
615
+ let o = s.textValue.slice(0, e.length);
616
+ if (s.textValue && this.collator.compare(o, e) === 0) return i;
617
+ i = this.getNextKey(i);
618
+ }
619
+ return null;
620
+ }
621
+ constructor(...e) {
622
+ if (e.length === 1) {
623
+ let t = e[0];
624
+ this.collection = t.collection, this.ref = t.ref, this.collator = t.collator, this.disabledKeys = t.disabledKeys || /* @__PURE__ */ new Set(), this.disabledBehavior = t.disabledBehavior || "all", this.orientation = t.orientation || "vertical", this.direction = t.direction, this.layout = t.layout || "stack", this.layoutDelegate = t.layoutDelegate || new Se(t.ref);
625
+ } else
626
+ this.collection = e[0], this.disabledKeys = e[1], this.ref = e[2], this.collator = e[3], this.layout = "stack", this.orientation = "vertical", this.disabledBehavior = "all", this.layoutDelegate = new Se(this.ref);
627
+ this.layout === "stack" && this.orientation === "vertical" && (this.getKeyLeftOf = void 0, this.getKeyRightOf = void 0);
628
+ }
629
+ }
630
+ class ot {
631
+ build(e, t) {
632
+ return this.context = t, xe(() => this.iterateCollection(e));
633
+ }
634
+ *iterateCollection(e) {
635
+ let { children: t, items: l } = e;
636
+ if (L.isValidElement(t) && t.type === L.Fragment) yield* this.iterateCollection({
637
+ children: t.props.children,
638
+ items: l
639
+ });
640
+ else if (typeof t == "function") {
641
+ if (!l) throw new Error("props.children was a function but props.items is missing");
642
+ let i = 0;
643
+ for (let s of l)
644
+ yield* this.getFullNode({
645
+ value: s,
646
+ index: i
647
+ }, {
648
+ renderer: t
649
+ }), i++;
650
+ } else {
651
+ let i = [];
652
+ L.Children.forEach(t, (o) => {
653
+ o && i.push(o);
654
+ });
655
+ let s = 0;
656
+ for (let o of i) {
657
+ let f = this.getFullNode({
658
+ element: o,
659
+ index: s
660
+ }, {});
661
+ for (let a of f)
662
+ s++, yield a;
663
+ }
664
+ }
665
+ }
666
+ getKey(e, t, l, i) {
667
+ if (e.key != null) return e.key;
668
+ if (t.type === "cell" && t.key != null) return `${i}${t.key}`;
669
+ let s = t.value;
670
+ if (s != null) {
671
+ var o;
672
+ let f = (o = s.key) !== null && o !== void 0 ? o : s.id;
673
+ if (f == null) throw new Error("No key found for item");
674
+ return f;
675
+ }
676
+ return i ? `${i}.${t.index}` : `$.${t.index}`;
677
+ }
678
+ getChildState(e, t) {
679
+ return {
680
+ renderer: t.renderer || e.renderer
681
+ };
682
+ }
683
+ *getFullNode(e, t, l, i) {
684
+ if (L.isValidElement(e.element) && e.element.type === L.Fragment) {
685
+ let y = [];
686
+ L.Children.forEach(e.element.props.children, (S) => {
687
+ y.push(S);
688
+ });
689
+ var s;
690
+ let h = (s = e.index) !== null && s !== void 0 ? s : 0;
691
+ for (const S of y) yield* this.getFullNode({
692
+ element: S,
693
+ index: h++
694
+ }, t, l, i);
695
+ return;
696
+ }
697
+ let o = e.element;
698
+ if (!o && e.value && t && t.renderer) {
699
+ let y = this.cache.get(e.value);
700
+ if (y && (!y.shouldInvalidate || !y.shouldInvalidate(this.context))) {
701
+ y.index = e.index, y.parentKey = i ? i.key : null, yield y;
702
+ return;
703
+ }
704
+ o = t.renderer(e.value);
705
+ }
706
+ if (L.isValidElement(o)) {
707
+ let y = o.type;
708
+ if (typeof y != "function" && typeof y.getCollectionNode != "function") {
709
+ let D = o.type;
710
+ throw new Error(`Unknown element <${D}> in collection.`);
711
+ }
712
+ let h = y.getCollectionNode(o.props, this.context);
713
+ var f;
714
+ let S = (f = e.index) !== null && f !== void 0 ? f : 0, p = h.next();
715
+ for (; !p.done && p.value; ) {
716
+ let D = p.value;
717
+ e.index = S;
718
+ var a;
719
+ let k = (a = D.key) !== null && a !== void 0 ? a : null;
720
+ k == null && (k = D.element ? null : this.getKey(o, e, t, l));
721
+ let R = [
722
+ ...this.getFullNode({
723
+ ...D,
724
+ key: k,
725
+ index: S,
726
+ wrapper: ct(e.wrapper, D.wrapper)
727
+ }, this.getChildState(t, D), l ? `${l}${o.key}` : o.key, i)
728
+ ];
729
+ for (let F of R) {
730
+ var $, I;
731
+ F.value = (I = ($ = D.value) !== null && $ !== void 0 ? $ : e.value) !== null && I !== void 0 ? I : null, F.value && this.cache.set(F.value, F);
732
+ var b;
733
+ if (e.type && F.type !== e.type) throw new Error(`Unsupported type <${ce(F.type)}> in <${ce((b = i?.type) !== null && b !== void 0 ? b : "unknown parent type")}>. Only <${ce(e.type)}> is supported.`);
734
+ S++, yield F;
735
+ }
736
+ p = h.next(R);
737
+ }
738
+ return;
739
+ }
740
+ if (e.key == null || e.type == null) return;
741
+ let v = this;
742
+ var m, g;
743
+ let E = {
744
+ type: e.type,
745
+ props: e.props,
746
+ key: e.key,
747
+ parentKey: i ? i.key : null,
748
+ value: (m = e.value) !== null && m !== void 0 ? m : null,
749
+ level: i ? i.level + 1 : 0,
750
+ index: e.index,
751
+ rendered: e.rendered,
752
+ textValue: (g = e.textValue) !== null && g !== void 0 ? g : "",
753
+ "aria-label": e["aria-label"],
754
+ wrapper: e.wrapper,
755
+ shouldInvalidate: e.shouldInvalidate,
756
+ hasChildNodes: e.hasChildNodes || !1,
757
+ childNodes: xe(function* () {
758
+ if (!e.hasChildNodes || !e.childNodes) return;
759
+ let y = 0;
760
+ for (let h of e.childNodes()) {
761
+ h.key != null && (h.key = `${E.key}${h.key}`);
762
+ let S = v.getFullNode({
763
+ ...h,
764
+ index: y
765
+ }, v.getChildState(t, h), E.key, E);
766
+ for (let p of S)
767
+ y++, yield p;
768
+ }
769
+ })
770
+ };
771
+ yield E;
772
+ }
773
+ constructor() {
774
+ this.cache = /* @__PURE__ */ new WeakMap();
775
+ }
776
+ }
777
+ function xe(n) {
778
+ let e = [], t = null;
779
+ return {
780
+ *[Symbol.iterator]() {
781
+ for (let l of e) yield l;
782
+ t || (t = n());
783
+ for (let l of t)
784
+ e.push(l), yield l;
785
+ }
786
+ };
787
+ }
788
+ function ct(n, e) {
789
+ if (n && e) return (t) => n(e(t));
790
+ if (n) return n;
791
+ if (e) return e;
792
+ }
793
+ function ce(n) {
794
+ return n[0].toUpperCase() + n.slice(1);
795
+ }
796
+ function Bt(n, e, t) {
797
+ let l = W(() => new ot(), []), { children: i, items: s, collection: o } = n;
798
+ return W(() => {
799
+ if (o) return o;
800
+ let a = l.build({
801
+ children: i,
802
+ items: s
803
+ }, t);
804
+ return e(a);
805
+ }, [
806
+ l,
807
+ i,
808
+ s,
809
+ o,
810
+ t,
811
+ e
812
+ ]);
813
+ }
814
+ function ut(n, e) {
815
+ return typeof e.getChildren == "function" ? e.getChildren(n.key) : n.childNodes;
816
+ }
817
+ function at(n) {
818
+ return ft(n, 0);
819
+ }
820
+ function ft(n, e) {
821
+ if (e < 0) return;
822
+ let t = 0;
823
+ for (let l of n) {
824
+ if (t === e) return l;
825
+ t++;
826
+ }
827
+ }
828
+ function Mt(n) {
829
+ let e;
830
+ for (let t of n) e = t;
831
+ return e;
832
+ }
833
+ function ue(n, e, t) {
834
+ if (e.parentKey === t.parentKey) return e.index - t.index;
835
+ let l = [
836
+ ...we(n, e),
837
+ e
838
+ ], i = [
839
+ ...we(n, t),
840
+ t
841
+ ], s = l.slice(0, i.length).findIndex((o, f) => o !== i[f]);
842
+ return s !== -1 ? (e = l[s], t = i[s], e.index - t.index) : l.findIndex((o) => o === t) >= 0 ? 1 : (i.findIndex((o) => o === e) >= 0, -1);
843
+ }
844
+ function we(n, e) {
845
+ let t = [], l = e;
846
+ for (; l?.parentKey != null; )
847
+ l = n.getItem(l.parentKey), l && t.unshift(l);
848
+ return t;
849
+ }
850
+ const Lt = /* @__PURE__ */ Q(null), Ot = /* @__PURE__ */ Q(null), zt = /* @__PURE__ */ Q(null), dt = {
851
+ CollectionRoot({ collection: n, renderDropIndicator: e }) {
852
+ return De(n, null, e);
853
+ },
854
+ CollectionBranch({ collection: n, parent: e, renderDropIndicator: t }) {
855
+ return De(n, e, t);
856
+ }
857
+ };
858
+ function De(n, e, t) {
859
+ return Xe({
860
+ items: e ? n.getChildren(e.key) : n,
861
+ dependencies: [
862
+ t
863
+ ],
864
+ children(l) {
865
+ let i = l.render(l);
866
+ return !t || l.type !== "item" ? i : /* @__PURE__ */ L.createElement(L.Fragment, null, t({
867
+ type: "item",
868
+ key: l.key,
869
+ dropPosition: "before"
870
+ }), i, ht(n, l, t));
871
+ }
872
+ });
873
+ }
874
+ function ht(n, e, t) {
875
+ let l = e.key, i = n.getKeyAfter(l), s = i != null ? n.getItem(i) : null;
876
+ for (; s != null && s.type !== "item"; )
877
+ i = n.getKeyAfter(s.key), s = i != null ? n.getItem(i) : null;
878
+ let o = e.nextKey != null ? n.getItem(e.nextKey) : null;
879
+ for (; o != null && o.type !== "item"; ) o = o.nextKey != null ? n.getItem(o.nextKey) : null;
880
+ let f = [];
881
+ if (o == null) {
882
+ let a = e;
883
+ for (; a && (!s || a.parentKey !== s.parentKey && s.level < a.level); ) {
884
+ let $ = t({
885
+ type: "item",
886
+ key: a.key,
887
+ dropPosition: "after"
888
+ });
889
+ /* @__PURE__ */ Me($) && f.push(/* @__PURE__ */ Le($, {
890
+ key: `${a.key}-after`
891
+ })), a = a.parentKey != null ? n.getItem(a.parentKey) : null;
892
+ }
893
+ }
894
+ return f;
895
+ }
896
+ const Vt = /* @__PURE__ */ Q(dt);
897
+ function Ut(n) {
898
+ return W(() => n != null ? /* @__PURE__ */ new Set([
899
+ n
900
+ ]) : null, [
901
+ n
902
+ ]);
903
+ }
904
+ class C extends Set {
905
+ constructor(e, t, l) {
906
+ super(e), e instanceof C ? (this.anchorKey = t ?? e.anchorKey, this.currentKey = l ?? e.currentKey) : (this.anchorKey = t ?? null, this.currentKey = l ?? null);
907
+ }
908
+ }
909
+ function yt(n, e) {
910
+ if (n.size !== e.size) return !1;
911
+ for (let t of n)
912
+ if (!e.has(t)) return !1;
913
+ return !0;
914
+ }
915
+ function Ht(n) {
916
+ let { selectionMode: e = "none", disallowEmptySelection: t = !1, allowDuplicateSelectionEvents: l, selectionBehavior: i = "toggle", disabledBehavior: s = "all" } = n, o = w(!1), [, f] = oe(!1), a = w(null), $ = w(null), [, I] = oe(null), b = W(() => Fe(n.selectedKeys), [
917
+ n.selectedKeys
918
+ ]), v = W(() => Fe(n.defaultSelectedKeys, new C()), [
919
+ n.defaultSelectedKeys
920
+ ]), [m, g] = Ze(b, v, n.onSelectionChange), E = W(() => n.disabledKeys ? new Set(n.disabledKeys) : /* @__PURE__ */ new Set(), [
921
+ n.disabledKeys
922
+ ]), [y, h] = oe(i);
923
+ i === "replace" && y === "toggle" && typeof m == "object" && m.size === 0 && h("replace");
924
+ let S = w(i);
925
+ return j(() => {
926
+ i !== S.current && (h(i), S.current = i);
927
+ }, [
928
+ i
929
+ ]), {
930
+ selectionMode: e,
931
+ disallowEmptySelection: t,
932
+ selectionBehavior: y,
933
+ setSelectionBehavior: h,
934
+ get isFocused() {
935
+ return o.current;
936
+ },
937
+ setFocused(p) {
938
+ o.current = p, f(p);
939
+ },
940
+ get focusedKey() {
941
+ return a.current;
942
+ },
943
+ get childFocusStrategy() {
944
+ return $.current;
945
+ },
946
+ setFocusedKey(p, D = "first") {
947
+ a.current = p, $.current = D, I(p);
948
+ },
949
+ selectedKeys: m,
950
+ setSelectedKeys(p) {
951
+ (l || !yt(p, m)) && g(p);
952
+ },
953
+ disabledKeys: E,
954
+ disabledBehavior: s
955
+ };
956
+ }
957
+ function Fe(n, e) {
958
+ return n ? n === "all" ? "all" : new C(n) : e;
959
+ }
960
+ class Be {
961
+ /**
962
+ * The type of selection that is allowed in the collection.
963
+ */
964
+ get selectionMode() {
965
+ return this.state.selectionMode;
966
+ }
967
+ /**
968
+ * Whether the collection allows empty selection.
969
+ */
970
+ get disallowEmptySelection() {
971
+ return this.state.disallowEmptySelection;
972
+ }
973
+ /**
974
+ * The selection behavior for the collection.
975
+ */
976
+ get selectionBehavior() {
977
+ return this.state.selectionBehavior;
978
+ }
979
+ /**
980
+ * Sets the selection behavior for the collection.
981
+ */
982
+ setSelectionBehavior(e) {
983
+ this.state.setSelectionBehavior(e);
984
+ }
985
+ /**
986
+ * Whether the collection is currently focused.
987
+ */
988
+ get isFocused() {
989
+ return this.state.isFocused;
990
+ }
991
+ /**
992
+ * Sets whether the collection is focused.
993
+ */
994
+ setFocused(e) {
995
+ this.state.setFocused(e);
996
+ }
997
+ /**
998
+ * The current focused key in the collection.
999
+ */
1000
+ get focusedKey() {
1001
+ return this.state.focusedKey;
1002
+ }
1003
+ /** Whether the first or last child of the focused key should receive focus. */
1004
+ get childFocusStrategy() {
1005
+ return this.state.childFocusStrategy;
1006
+ }
1007
+ /**
1008
+ * Sets the focused key.
1009
+ */
1010
+ setFocusedKey(e, t) {
1011
+ (e == null || this.collection.getItem(e)) && this.state.setFocusedKey(e, t);
1012
+ }
1013
+ /**
1014
+ * The currently selected keys in the collection.
1015
+ */
1016
+ get selectedKeys() {
1017
+ return this.state.selectedKeys === "all" ? new Set(this.getSelectAllKeys()) : this.state.selectedKeys;
1018
+ }
1019
+ /**
1020
+ * The raw selection value for the collection.
1021
+ * Either 'all' for select all, or a set of keys.
1022
+ */
1023
+ get rawSelection() {
1024
+ return this.state.selectedKeys;
1025
+ }
1026
+ /**
1027
+ * Returns whether a key is selected.
1028
+ */
1029
+ isSelected(e) {
1030
+ if (this.state.selectionMode === "none") return !1;
1031
+ let t = this.getKey(e);
1032
+ return t == null ? !1 : this.state.selectedKeys === "all" ? this.canSelectItem(t) : this.state.selectedKeys.has(t);
1033
+ }
1034
+ /**
1035
+ * Whether the selection is empty.
1036
+ */
1037
+ get isEmpty() {
1038
+ return this.state.selectedKeys !== "all" && this.state.selectedKeys.size === 0;
1039
+ }
1040
+ /**
1041
+ * Whether all items in the collection are selected.
1042
+ */
1043
+ get isSelectAll() {
1044
+ if (this.isEmpty) return !1;
1045
+ if (this.state.selectedKeys === "all") return !0;
1046
+ if (this._isSelectAll != null) return this._isSelectAll;
1047
+ let e = this.getSelectAllKeys(), t = this.state.selectedKeys;
1048
+ return this._isSelectAll = e.every((l) => t.has(l)), this._isSelectAll;
1049
+ }
1050
+ get firstSelectedKey() {
1051
+ let e = null;
1052
+ for (let l of this.state.selectedKeys) {
1053
+ let i = this.collection.getItem(l);
1054
+ (!e || i && ue(this.collection, i, e) < 0) && (e = i);
1055
+ }
1056
+ var t;
1057
+ return (t = e?.key) !== null && t !== void 0 ? t : null;
1058
+ }
1059
+ get lastSelectedKey() {
1060
+ let e = null;
1061
+ for (let l of this.state.selectedKeys) {
1062
+ let i = this.collection.getItem(l);
1063
+ (!e || i && ue(this.collection, i, e) > 0) && (e = i);
1064
+ }
1065
+ var t;
1066
+ return (t = e?.key) !== null && t !== void 0 ? t : null;
1067
+ }
1068
+ get disabledKeys() {
1069
+ return this.state.disabledKeys;
1070
+ }
1071
+ get disabledBehavior() {
1072
+ return this.state.disabledBehavior;
1073
+ }
1074
+ /**
1075
+ * Extends the selection to the given key.
1076
+ */
1077
+ extendSelection(e) {
1078
+ if (this.selectionMode === "none") return;
1079
+ if (this.selectionMode === "single") {
1080
+ this.replaceSelection(e);
1081
+ return;
1082
+ }
1083
+ let t = this.getKey(e);
1084
+ if (t == null) return;
1085
+ let l;
1086
+ if (this.state.selectedKeys === "all") l = new C([
1087
+ t
1088
+ ], t, t);
1089
+ else {
1090
+ let o = this.state.selectedKeys;
1091
+ var i;
1092
+ let f = (i = o.anchorKey) !== null && i !== void 0 ? i : t;
1093
+ l = new C(o, f, t);
1094
+ var s;
1095
+ for (let a of this.getKeyRange(f, (s = o.currentKey) !== null && s !== void 0 ? s : t)) l.delete(a);
1096
+ for (let a of this.getKeyRange(t, f)) this.canSelectItem(a) && l.add(a);
1097
+ }
1098
+ this.state.setSelectedKeys(l);
1099
+ }
1100
+ getKeyRange(e, t) {
1101
+ let l = this.collection.getItem(e), i = this.collection.getItem(t);
1102
+ return l && i ? ue(this.collection, l, i) <= 0 ? this.getKeyRangeInternal(e, t) : this.getKeyRangeInternal(t, e) : [];
1103
+ }
1104
+ getKeyRangeInternal(e, t) {
1105
+ var l;
1106
+ if (!((l = this.layoutDelegate) === null || l === void 0) && l.getKeyRange) return this.layoutDelegate.getKeyRange(e, t);
1107
+ let i = [], s = e;
1108
+ for (; s != null; ) {
1109
+ let o = this.collection.getItem(s);
1110
+ if (o && (o.type === "item" || o.type === "cell" && this.allowsCellSelection) && i.push(s), s === t) return i;
1111
+ s = this.collection.getKeyAfter(s);
1112
+ }
1113
+ return [];
1114
+ }
1115
+ getKey(e) {
1116
+ let t = this.collection.getItem(e);
1117
+ if (!t || t.type === "cell" && this.allowsCellSelection) return e;
1118
+ for (; t && t.type !== "item" && t.parentKey != null; ) t = this.collection.getItem(t.parentKey);
1119
+ return !t || t.type !== "item" ? null : t.key;
1120
+ }
1121
+ /**
1122
+ * Toggles whether the given key is selected.
1123
+ */
1124
+ toggleSelection(e) {
1125
+ if (this.selectionMode === "none") return;
1126
+ if (this.selectionMode === "single" && !this.isSelected(e)) {
1127
+ this.replaceSelection(e);
1128
+ return;
1129
+ }
1130
+ let t = this.getKey(e);
1131
+ if (t == null) return;
1132
+ let l = new C(this.state.selectedKeys === "all" ? this.getSelectAllKeys() : this.state.selectedKeys);
1133
+ l.has(t) ? l.delete(t) : this.canSelectItem(t) && (l.add(t), l.anchorKey = t, l.currentKey = t), !(this.disallowEmptySelection && l.size === 0) && this.state.setSelectedKeys(l);
1134
+ }
1135
+ /**
1136
+ * Replaces the selection with only the given key.
1137
+ */
1138
+ replaceSelection(e) {
1139
+ if (this.selectionMode === "none") return;
1140
+ let t = this.getKey(e);
1141
+ if (t == null) return;
1142
+ let l = this.canSelectItem(t) ? new C([
1143
+ t
1144
+ ], t, t) : new C();
1145
+ this.state.setSelectedKeys(l);
1146
+ }
1147
+ /**
1148
+ * Replaces the selection with the given keys.
1149
+ */
1150
+ setSelectedKeys(e) {
1151
+ if (this.selectionMode === "none") return;
1152
+ let t = new C();
1153
+ for (let l of e) {
1154
+ let i = this.getKey(l);
1155
+ if (i != null && (t.add(i), this.selectionMode === "single"))
1156
+ break;
1157
+ }
1158
+ this.state.setSelectedKeys(t);
1159
+ }
1160
+ getSelectAllKeys() {
1161
+ let e = [], t = (l) => {
1162
+ for (; l != null; ) {
1163
+ if (this.canSelectItem(l)) {
1164
+ var i;
1165
+ let o = this.collection.getItem(l);
1166
+ o?.type === "item" && e.push(l);
1167
+ var s;
1168
+ o?.hasChildNodes && (this.allowsCellSelection || o.type !== "item") && t((s = (i = at(ut(o, this.collection))) === null || i === void 0 ? void 0 : i.key) !== null && s !== void 0 ? s : null);
1169
+ }
1170
+ l = this.collection.getKeyAfter(l);
1171
+ }
1172
+ };
1173
+ return t(this.collection.getFirstKey()), e;
1174
+ }
1175
+ /**
1176
+ * Selects all items in the collection.
1177
+ */
1178
+ selectAll() {
1179
+ !this.isSelectAll && this.selectionMode === "multiple" && this.state.setSelectedKeys("all");
1180
+ }
1181
+ /**
1182
+ * Removes all keys from the selection.
1183
+ */
1184
+ clearSelection() {
1185
+ !this.disallowEmptySelection && (this.state.selectedKeys === "all" || this.state.selectedKeys.size > 0) && this.state.setSelectedKeys(new C());
1186
+ }
1187
+ /**
1188
+ * Toggles between select all and an empty selection.
1189
+ */
1190
+ toggleSelectAll() {
1191
+ this.isSelectAll ? this.clearSelection() : this.selectAll();
1192
+ }
1193
+ select(e, t) {
1194
+ this.selectionMode !== "none" && (this.selectionMode === "single" ? this.isSelected(e) && !this.disallowEmptySelection ? this.toggleSelection(e) : this.replaceSelection(e) : this.selectionBehavior === "toggle" || t && (t.pointerType === "touch" || t.pointerType === "virtual") ? this.toggleSelection(e) : this.replaceSelection(e));
1195
+ }
1196
+ /**
1197
+ * Returns whether the current selection is equal to the given selection.
1198
+ */
1199
+ isSelectionEqual(e) {
1200
+ if (e === this.state.selectedKeys) return !0;
1201
+ let t = this.selectedKeys;
1202
+ if (e.size !== t.size) return !1;
1203
+ for (let l of e)
1204
+ if (!t.has(l)) return !1;
1205
+ for (let l of t)
1206
+ if (!e.has(l)) return !1;
1207
+ return !0;
1208
+ }
1209
+ canSelectItem(e) {
1210
+ var t;
1211
+ if (this.state.selectionMode === "none" || this.state.disabledKeys.has(e)) return !1;
1212
+ let l = this.collection.getItem(e);
1213
+ return !(!l || !(l == null || (t = l.props) === null || t === void 0) && t.isDisabled || l.type === "cell" && !this.allowsCellSelection);
1214
+ }
1215
+ isDisabled(e) {
1216
+ var t, l;
1217
+ return this.state.disabledBehavior === "all" && (this.state.disabledKeys.has(e) || !!(!((l = this.collection.getItem(e)) === null || l === void 0 || (t = l.props) === null || t === void 0) && t.isDisabled));
1218
+ }
1219
+ isLink(e) {
1220
+ var t, l;
1221
+ return !!(!((l = this.collection.getItem(e)) === null || l === void 0 || (t = l.props) === null || t === void 0) && t.href);
1222
+ }
1223
+ getItemProps(e) {
1224
+ var t;
1225
+ return (t = this.collection.getItem(e)) === null || t === void 0 ? void 0 : t.props;
1226
+ }
1227
+ withCollection(e) {
1228
+ return new Be(e, this.state, {
1229
+ allowsCellSelection: this.allowsCellSelection,
1230
+ layoutDelegate: this.layoutDelegate || void 0
1231
+ });
1232
+ }
1233
+ constructor(e, t, l) {
1234
+ this.collection = e, this.state = t;
1235
+ var i;
1236
+ this.allowsCellSelection = (i = l?.allowsCellSelection) !== null && i !== void 0 ? i : !1, this._isSelectAll = null, this.layoutDelegate = l?.layoutDelegate || null;
1237
+ }
1238
+ }
1239
+ export {
1240
+ Rt as $,
1241
+ At as a,
1242
+ ut as b,
1243
+ Ct as c,
1244
+ Ht as d,
1245
+ Bt as e,
1246
+ Be as f,
1247
+ Vt as g,
1248
+ Lt as h,
1249
+ zt as i,
1250
+ rt as j,
1251
+ dt as k,
1252
+ Ut as l,
1253
+ Mt as m,
1254
+ at as n,
1255
+ ft as o,
1256
+ Se as p,
1257
+ Ot as q,
1258
+ Ce as r,
1259
+ Qe as s,
1260
+ Ae as t,
1261
+ Je as u,
1262
+ et as v,
1263
+ H as w,
1264
+ tt as x,
1265
+ _e as y
1266
+ };
1267
+ //# sourceMappingURL=SelectionManager-CtwcAiw4.es.js.map