@commercetools/nimbus 2.9.0 → 2.9.1

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 (351) hide show
  1. package/dist/chunks/{accordion-BScTN0pM.cjs.js → accordion-BwakRCIn.cjs.js} +2 -2
  2. package/dist/chunks/{accordion-BScTN0pM.cjs.js.map → accordion-BwakRCIn.cjs.js.map} +1 -1
  3. package/dist/chunks/{accordion-DJNZyfL7.es.js → accordion-C-_YQL7c.es.js} +2 -2
  4. package/dist/chunks/{accordion-DJNZyfL7.es.js.map → accordion-C-_YQL7c.es.js.map} +1 -1
  5. package/dist/chunks/{accordion.content-CbWvTo-e.cjs.js → accordion.content-BBJezL4-.cjs.js} +2 -2
  6. package/dist/chunks/{accordion.content-CbWvTo-e.cjs.js.map → accordion.content-BBJezL4-.cjs.js.map} +1 -1
  7. package/dist/chunks/{accordion.content-Df8zRXv1.es.js → accordion.content-CZDni7Eh.es.js} +2 -2
  8. package/dist/chunks/{accordion.content-Df8zRXv1.es.js.map → accordion.content-CZDni7Eh.es.js.map} +1 -1
  9. package/dist/chunks/{alert-TZJpmSZi.es.js → alert-Cq9lnRoX.es.js} +2 -2
  10. package/dist/chunks/{alert-TZJpmSZi.es.js.map → alert-Cq9lnRoX.es.js.map} +1 -1
  11. package/dist/chunks/{alert-Bf1eVQu0.cjs.js → alert-DDLTGVRZ.cjs.js} +2 -2
  12. package/dist/chunks/{alert-Bf1eVQu0.cjs.js.map → alert-DDLTGVRZ.cjs.js.map} +1 -1
  13. package/dist/chunks/{button-CAzKhQhT.cjs.js → button-DJX_lPnW.cjs.js} +2 -2
  14. package/dist/chunks/{button-CAzKhQhT.cjs.js.map → button-DJX_lPnW.cjs.js.map} +1 -1
  15. package/dist/chunks/{button-C4KD0BhM.es.js → button-DXIjvvTs.es.js} +2 -2
  16. package/dist/chunks/{button-C4KD0BhM.es.js.map → button-DXIjvvTs.es.js.map} +1 -1
  17. package/dist/chunks/{calendar-C8d8whAA.cjs.js → calendar-CH8P_-BX.cjs.js} +2 -2
  18. package/dist/chunks/{calendar-C8d8whAA.cjs.js.map → calendar-CH8P_-BX.cjs.js.map} +1 -1
  19. package/dist/chunks/{calendar-BUMjfnCM.es.js → calendar-LmmwixJX.es.js} +3 -3
  20. package/dist/chunks/{calendar-BUMjfnCM.es.js.map → calendar-LmmwixJX.es.js.map} +1 -1
  21. package/dist/chunks/{card-CJhECjUb.es.js → card-BbHHaxYz.es.js} +2 -2
  22. package/dist/chunks/{card-CJhECjUb.es.js.map → card-BbHHaxYz.es.js.map} +1 -1
  23. package/dist/chunks/{card-C6XmGdIp.cjs.js → card-Ch9VNY_a.cjs.js} +2 -2
  24. package/dist/chunks/{card-C6XmGdIp.cjs.js.map → card-Ch9VNY_a.cjs.js.map} +1 -1
  25. package/dist/chunks/{checkbox-DRxunzAe.es.js → checkbox-BxWAwNQU.es.js} +2 -2
  26. package/dist/chunks/{checkbox-DRxunzAe.es.js.map → checkbox-BxWAwNQU.es.js.map} +1 -1
  27. package/dist/chunks/{checkbox-1lqXPqlH.cjs.js → checkbox-DAV6MCao.cjs.js} +2 -2
  28. package/dist/chunks/{checkbox-1lqXPqlH.cjs.js.map → checkbox-DAV6MCao.cjs.js.map} +1 -1
  29. package/dist/chunks/{collapsible-motion-Dd4U5qdn.es.js → collapsible-motion-AIoK9G2N.es.js} +2 -2
  30. package/dist/chunks/{collapsible-motion-Dd4U5qdn.es.js.map → collapsible-motion-AIoK9G2N.es.js.map} +1 -1
  31. package/dist/chunks/{collapsible-motion-5siO08MB.cjs.js → collapsible-motion-D2LhZm44.cjs.js} +2 -2
  32. package/dist/chunks/{collapsible-motion-5siO08MB.cjs.js.map → collapsible-motion-D2LhZm44.cjs.js.map} +1 -1
  33. package/dist/chunks/{combobox-BWSQAYPQ.es.js → combobox-Cmdt02Xe.es.js} +4 -4
  34. package/dist/chunks/{combobox-BWSQAYPQ.es.js.map → combobox-Cmdt02Xe.es.js.map} +1 -1
  35. package/dist/chunks/{combobox-D3kJCGUw.cjs.js → combobox-DLBPqKDP.cjs.js} +2 -2
  36. package/dist/chunks/{combobox-D3kJCGUw.cjs.js.map → combobox-DLBPqKDP.cjs.js.map} +1 -1
  37. package/dist/chunks/{data-table-8L4TOSCO.es.js → data-table--JsJDlIu.es.js} +12 -12
  38. package/dist/chunks/{data-table-8L4TOSCO.es.js.map → data-table--JsJDlIu.es.js.map} +1 -1
  39. package/dist/chunks/{data-table-BMAW6iyx.cjs.js → data-table-C8d2rMr6.cjs.js} +2 -2
  40. package/dist/chunks/{data-table-BMAW6iyx.cjs.js.map → data-table-C8d2rMr6.cjs.js.map} +1 -1
  41. package/dist/chunks/{date-input-CN9SKsEo.cjs.js → date-input-BQc0l8mE.cjs.js} +2 -2
  42. package/dist/chunks/{date-input-CN9SKsEo.cjs.js.map → date-input-BQc0l8mE.cjs.js.map} +1 -1
  43. package/dist/chunks/{date-input-DbihYBK7.es.js → date-input-CAEzCHiF.es.js} +3 -3
  44. package/dist/chunks/{date-input-DbihYBK7.es.js.map → date-input-CAEzCHiF.es.js.map} +1 -1
  45. package/dist/chunks/{date-picker-BrwUBLzY.cjs.js → date-picker-ByrTp_Rw.cjs.js} +2 -2
  46. package/dist/chunks/{date-picker-BrwUBLzY.cjs.js.map → date-picker-ByrTp_Rw.cjs.js.map} +1 -1
  47. package/dist/chunks/{date-picker-C6PSx6wa.es.js → date-picker-rd_nVZmF.es.js} +7 -7
  48. package/dist/chunks/{date-picker-C6PSx6wa.es.js.map → date-picker-rd_nVZmF.es.js.map} +1 -1
  49. package/dist/chunks/{date-range-picker-DF3rmWAx.cjs.js → date-range-picker-CAGxvvrV.cjs.js} +2 -2
  50. package/dist/chunks/{date-range-picker-DF3rmWAx.cjs.js.map → date-range-picker-CAGxvvrV.cjs.js.map} +1 -1
  51. package/dist/chunks/{date-range-picker-NCpnIadb.es.js → date-range-picker-DxOz9XVi.es.js} +7 -7
  52. package/dist/chunks/{date-range-picker-NCpnIadb.es.js.map → date-range-picker-DxOz9XVi.es.js.map} +1 -1
  53. package/dist/chunks/{date-range-picker-field-DnEPJBTf.cjs.js → date-range-picker-field-B74g7riR.cjs.js} +2 -2
  54. package/dist/chunks/{date-range-picker-field-DnEPJBTf.cjs.js.map → date-range-picker-field-B74g7riR.cjs.js.map} +1 -1
  55. package/dist/chunks/{date-range-picker-field-4OMHZSww.es.js → date-range-picker-field-BDiOUnmn.es.js} +3 -3
  56. package/dist/chunks/{date-range-picker-field-4OMHZSww.es.js.map → date-range-picker-field-BDiOUnmn.es.js.map} +1 -1
  57. package/dist/chunks/{dialog-7MIk-7Ft.es.js → dialog-C3z6Kirn.es.js} +3 -3
  58. package/dist/chunks/{dialog-7MIk-7Ft.es.js.map → dialog-C3z6Kirn.es.js.map} +1 -1
  59. package/dist/chunks/{dialog-uwBRMvUN.cjs.js → dialog-DL7O7cV3.cjs.js} +2 -2
  60. package/dist/chunks/{dialog-uwBRMvUN.cjs.js.map → dialog-DL7O7cV3.cjs.js.map} +1 -1
  61. package/dist/chunks/{draggable-list-2ZEDpAqd.es.js → draggable-list-BAl7xvk5.es.js} +5 -5
  62. package/dist/chunks/{draggable-list-2ZEDpAqd.es.js.map → draggable-list-BAl7xvk5.es.js.map} +1 -1
  63. package/dist/chunks/{draggable-list-9vFa6LUC.cjs.js → draggable-list-CRGsrAk4.cjs.js} +2 -2
  64. package/dist/chunks/{draggable-list-9vFa6LUC.cjs.js.map → draggable-list-CRGsrAk4.cjs.js.map} +1 -1
  65. package/dist/chunks/{drawer-DlAHFB8k.cjs.js → drawer-B0Zbi6sB.cjs.js} +2 -2
  66. package/dist/chunks/{drawer-DlAHFB8k.cjs.js.map → drawer-B0Zbi6sB.cjs.js.map} +1 -1
  67. package/dist/chunks/{drawer-CesM9R4I.es.js → drawer-D2wUbDn7.es.js} +4 -4
  68. package/dist/chunks/{drawer-CesM9R4I.es.js.map → drawer-D2wUbDn7.es.js.map} +1 -1
  69. package/dist/chunks/{extract-style-props-DD3XZzbq.es.js → extract-style-props-BtirWJSO.es.js} +2 -2
  70. package/dist/chunks/{extract-style-props-DD3XZzbq.es.js.map → extract-style-props-BtirWJSO.es.js.map} +1 -1
  71. package/dist/chunks/{extract-style-props-7Kq9mybq.cjs.js → extract-style-props-CidMHCzx.cjs.js} +2 -2
  72. package/dist/chunks/{extract-style-props-7Kq9mybq.cjs.js.map → extract-style-props-CidMHCzx.cjs.js.map} +1 -1
  73. package/dist/chunks/form-field--e_9psca.cjs.js +2 -0
  74. package/dist/chunks/form-field--e_9psca.cjs.js.map +1 -0
  75. package/dist/chunks/{form-field-BcNFX196.es.js → form-field-B5MTPG5J.es.js} +107 -112
  76. package/dist/chunks/form-field-B5MTPG5J.es.js.map +1 -0
  77. package/dist/chunks/{icon-button-BV_okpOb.cjs.js → icon-button-B-yfUEQl.cjs.js} +2 -2
  78. package/dist/chunks/{icon-button-BV_okpOb.cjs.js.map → icon-button-B-yfUEQl.cjs.js.map} +1 -1
  79. package/dist/chunks/{icon-button-CwI7ZK2q.es.js → icon-button-CsfjzFu5.es.js} +2 -2
  80. package/dist/chunks/{icon-button-CwI7ZK2q.es.js.map → icon-button-CsfjzFu5.es.js.map} +1 -1
  81. package/dist/chunks/{icon-toggle-button-zsbPyHd7.cjs.js → icon-toggle-button-Bg8u0Y6z.cjs.js} +2 -2
  82. package/dist/chunks/{icon-toggle-button-zsbPyHd7.cjs.js.map → icon-toggle-button-Bg8u0Y6z.cjs.js.map} +1 -1
  83. package/dist/chunks/{icon-toggle-button-DusSXhr7.es.js → icon-toggle-button-D88M7O7u.es.js} +2 -2
  84. package/dist/chunks/{icon-toggle-button-DusSXhr7.es.js.map → icon-toggle-button-D88M7O7u.es.js.map} +1 -1
  85. package/dist/chunks/{index-D8ffoMG1.cjs.js → index-P2sPTZVQ.cjs.js} +2 -2
  86. package/dist/chunks/index-P2sPTZVQ.cjs.js.map +1 -0
  87. package/dist/chunks/{index-CbPHv6Ml.es.js → index-RkJ27InK.es.js} +5 -3
  88. package/dist/chunks/index-RkJ27InK.es.js.map +1 -0
  89. package/dist/chunks/{list-CftBWdp5.cjs.js → list-DJWmJm0u.cjs.js} +2 -2
  90. package/dist/chunks/{list-CftBWdp5.cjs.js.map → list-DJWmJm0u.cjs.js.map} +1 -1
  91. package/dist/chunks/{list-BFURlArt.es.js → list-IEZDjRJJ.es.js} +2 -2
  92. package/dist/chunks/{list-BFURlArt.es.js.map → list-IEZDjRJJ.es.js.map} +1 -1
  93. package/dist/chunks/{localized-field-CQ_ejsDF.es.js → localized-field-B1kgb4OI.es.js} +8 -8
  94. package/dist/chunks/{localized-field-CQ_ejsDF.es.js.map → localized-field-B1kgb4OI.es.js.map} +1 -1
  95. package/dist/chunks/{localized-field-C24LwqjD.cjs.js → localized-field-BecRbjT7.cjs.js} +2 -2
  96. package/dist/chunks/{localized-field-C24LwqjD.cjs.js.map → localized-field-BecRbjT7.cjs.js.map} +1 -1
  97. package/dist/chunks/{menu-CgG__utb.es.js → menu-B74NTzak.es.js} +2 -2
  98. package/dist/chunks/{menu-CgG__utb.es.js.map → menu-B74NTzak.es.js.map} +1 -1
  99. package/dist/chunks/{menu-DdPHozye.cjs.js → menu-D-1juZPP.cjs.js} +2 -2
  100. package/dist/chunks/{menu-DdPHozye.cjs.js.map → menu-D-1juZPP.cjs.js.map} +1 -1
  101. package/dist/chunks/{money-input-B3rZIIip.cjs.js → money-input-BRhRkDWj.cjs.js} +2 -2
  102. package/dist/chunks/{money-input-B3rZIIip.cjs.js.map → money-input-BRhRkDWj.cjs.js.map} +1 -1
  103. package/dist/chunks/{money-input-BVSUW0mV.es.js → money-input-Cug0wQqR.es.js} +5 -5
  104. package/dist/chunks/{money-input-BVSUW0mV.es.js.map → money-input-Cug0wQqR.es.js.map} +1 -1
  105. package/dist/chunks/{money-input-field-m1j1DLSq.cjs.js → money-input-field-D-BXukz8.cjs.js} +2 -2
  106. package/dist/chunks/{money-input-field-m1j1DLSq.cjs.js.map → money-input-field-D-BXukz8.cjs.js.map} +1 -1
  107. package/dist/chunks/{money-input-field-wTLEvYtD.es.js → money-input-field-rEEb2CMi.es.js} +3 -3
  108. package/dist/chunks/{money-input-field-wTLEvYtD.es.js.map → money-input-field-rEEb2CMi.es.js.map} +1 -1
  109. package/dist/chunks/{multiline-text-input-C3FdwmZc.cjs.js → multiline-text-input-CsSsluTl.cjs.js} +2 -2
  110. package/dist/chunks/{multiline-text-input-C3FdwmZc.cjs.js.map → multiline-text-input-CsSsluTl.cjs.js.map} +1 -1
  111. package/dist/chunks/{multiline-text-input-AHuJMS1C.es.js → multiline-text-input-Detn1n1o.es.js} +3 -3
  112. package/dist/chunks/{multiline-text-input-AHuJMS1C.es.js.map → multiline-text-input-Detn1n1o.es.js.map} +1 -1
  113. package/dist/chunks/{multiline-text-input-field-CIaHBNTp.cjs.js → multiline-text-input-field-C3HUTzQ-.cjs.js} +2 -2
  114. package/dist/chunks/{multiline-text-input-field-CIaHBNTp.cjs.js.map → multiline-text-input-field-C3HUTzQ-.cjs.js.map} +1 -1
  115. package/dist/chunks/{multiline-text-input-field-Cn3WyOO9.es.js → multiline-text-input-field-Cm6-CItu.es.js} +3 -3
  116. package/dist/chunks/{multiline-text-input-field-Cn3WyOO9.es.js.map → multiline-text-input-field-Cm6-CItu.es.js.map} +1 -1
  117. package/dist/chunks/{nimbus-provider-DZt7Dxqv.es.js → nimbus-provider-CojoQhlb.es.js} +3 -3
  118. package/dist/chunks/{nimbus-provider-DZt7Dxqv.es.js.map → nimbus-provider-CojoQhlb.es.js.map} +1 -1
  119. package/dist/chunks/{nimbus-provider-CdfH64_b.cjs.js → nimbus-provider-DxWk6R7d.cjs.js} +2 -2
  120. package/dist/chunks/{nimbus-provider-CdfH64_b.cjs.js.map → nimbus-provider-DxWk6R7d.cjs.js.map} +1 -1
  121. package/dist/chunks/{number-input-5fI6bo_C.es.js → number-input-CLQFjFkr.es.js} +3 -3
  122. package/dist/chunks/{number-input-5fI6bo_C.es.js.map → number-input-CLQFjFkr.es.js.map} +1 -1
  123. package/dist/chunks/{number-input-CCHDH_Ql.cjs.js → number-input-CSByUbOI.cjs.js} +2 -2
  124. package/dist/chunks/{number-input-CCHDH_Ql.cjs.js.map → number-input-CSByUbOI.cjs.js.map} +1 -1
  125. package/dist/chunks/{number-input-field-Dv5zCbln.es.js → number-input-field-CaaoTp8-.es.js} +3 -3
  126. package/dist/chunks/{number-input-field-Dv5zCbln.es.js.map → number-input-field-CaaoTp8-.es.js.map} +1 -1
  127. package/dist/chunks/{number-input-field-BEsVOIbM.cjs.js → number-input-field-CqNKEsDn.cjs.js} +2 -2
  128. package/dist/chunks/{number-input-field-BEsVOIbM.cjs.js.map → number-input-field-CqNKEsDn.cjs.js.map} +1 -1
  129. package/dist/chunks/{pagination-CoOO13j7.es.js → pagination-C0C6zhSW.es.js} +4 -4
  130. package/dist/chunks/{pagination-CoOO13j7.es.js.map → pagination-C0C6zhSW.es.js.map} +1 -1
  131. package/dist/chunks/{pagination-BpNjPrUa.cjs.js → pagination-Cjxc2nEn.cjs.js} +2 -2
  132. package/dist/chunks/{pagination-BpNjPrUa.cjs.js.map → pagination-Cjxc2nEn.cjs.js.map} +1 -1
  133. package/dist/chunks/{password-input-C1yj2l-t.cjs.js → password-input-DQTA3fE3.cjs.js} +2 -2
  134. package/dist/chunks/{password-input-C1yj2l-t.cjs.js.map → password-input-DQTA3fE3.cjs.js.map} +1 -1
  135. package/dist/chunks/{password-input-oUqWPfJ5.es.js → password-input-Ywp-3QnF.es.js} +3 -3
  136. package/dist/chunks/{password-input-oUqWPfJ5.es.js.map → password-input-Ywp-3QnF.es.js.map} +1 -1
  137. package/dist/chunks/{password-input-field-CxkrPIuf.cjs.js → password-input-field-54xe-x37.cjs.js} +2 -2
  138. package/dist/chunks/{password-input-field-CxkrPIuf.cjs.js.map → password-input-field-54xe-x37.cjs.js.map} +1 -1
  139. package/dist/chunks/{password-input-field-BqcNoRR_.es.js → password-input-field-BtY9xbk4.es.js} +3 -3
  140. package/dist/chunks/{password-input-field-BqcNoRR_.es.js.map → password-input-field-BtY9xbk4.es.js.map} +1 -1
  141. package/dist/chunks/{progress-bar-B8Z0iZIg.cjs.js → progress-bar-CgDUGgVa.cjs.js} +2 -2
  142. package/dist/chunks/{progress-bar-B8Z0iZIg.cjs.js.map → progress-bar-CgDUGgVa.cjs.js.map} +1 -1
  143. package/dist/chunks/{progress-bar-DF06rCPA.es.js → progress-bar-DilKPVGE.es.js} +2 -2
  144. package/dist/chunks/{progress-bar-DF06rCPA.es.js.map → progress-bar-DilKPVGE.es.js.map} +1 -1
  145. package/dist/chunks/{radio-input-DeQk883P.cjs.js → radio-input-DINDV994.cjs.js} +2 -2
  146. package/dist/chunks/{radio-input-DeQk883P.cjs.js.map → radio-input-DINDV994.cjs.js.map} +1 -1
  147. package/dist/chunks/{radio-input-C18hFGFa.es.js → radio-input-HXIV8OYv.es.js} +3 -3
  148. package/dist/chunks/{radio-input-C18hFGFa.es.js.map → radio-input-HXIV8OYv.es.js.map} +1 -1
  149. package/dist/chunks/{range-calendar-xyzRk9tN.cjs.js → range-calendar-5gXFI3rg.cjs.js} +2 -2
  150. package/dist/chunks/{range-calendar-xyzRk9tN.cjs.js.map → range-calendar-5gXFI3rg.cjs.js.map} +1 -1
  151. package/dist/chunks/{range-calendar-BOkdgYw0.es.js → range-calendar-DgQpgoGc.es.js} +4 -4
  152. package/dist/chunks/{range-calendar-BOkdgYw0.es.js.map → range-calendar-DgQpgoGc.es.js.map} +1 -1
  153. package/dist/chunks/{rich-text-input-DLgk2NgC.es.js → rich-text-input-BaDQaxfn.es.js} +8 -8
  154. package/dist/chunks/{rich-text-input-DLgk2NgC.es.js.map → rich-text-input-BaDQaxfn.es.js.map} +1 -1
  155. package/dist/chunks/{rich-text-input-kk9rtBb2.cjs.js → rich-text-input-IpGXnBKy.cjs.js} +2 -2
  156. package/dist/chunks/{rich-text-input-kk9rtBb2.cjs.js.map → rich-text-input-IpGXnBKy.cjs.js.map} +1 -1
  157. package/dist/chunks/{scoped-search-input-BQwOQwaP.cjs.js → scoped-search-input-Cjrky6tJ.cjs.js} +2 -2
  158. package/dist/chunks/{scoped-search-input-BQwOQwaP.cjs.js.map → scoped-search-input-Cjrky6tJ.cjs.js.map} +1 -1
  159. package/dist/chunks/{scoped-search-input-QljA__zn.es.js → scoped-search-input-eZUvYoDK.es.js} +5 -5
  160. package/dist/chunks/{scoped-search-input-QljA__zn.es.js.map → scoped-search-input-eZUvYoDK.es.js.map} +1 -1
  161. package/dist/chunks/{search-input-CDRgTQeG.cjs.js → search-input-BU2fUnJT.cjs.js} +2 -2
  162. package/dist/chunks/{search-input-CDRgTQeG.cjs.js.map → search-input-BU2fUnJT.cjs.js.map} +1 -1
  163. package/dist/chunks/{search-input-CbKzOt2W.es.js → search-input-DnxYNGTT.es.js} +4 -4
  164. package/dist/chunks/{search-input-CbKzOt2W.es.js.map → search-input-DnxYNGTT.es.js.map} +1 -1
  165. package/dist/chunks/{search-input-field-BAK_Q8D3.cjs.js → search-input-field-BT402Xul.cjs.js} +2 -2
  166. package/dist/chunks/{search-input-field-BAK_Q8D3.cjs.js.map → search-input-field-BT402Xul.cjs.js.map} +1 -1
  167. package/dist/chunks/{search-input-field-DkQiv4oU.es.js → search-input-field-DrdaFmoJ.es.js} +3 -3
  168. package/dist/chunks/{search-input-field-DkQiv4oU.es.js.map → search-input-field-DrdaFmoJ.es.js.map} +1 -1
  169. package/dist/chunks/{select-BBTH3cVj.es.js → select-CnGjAwu_.es.js} +121 -120
  170. package/dist/chunks/{select-BBTH3cVj.es.js.map → select-CnGjAwu_.es.js.map} +1 -1
  171. package/dist/chunks/{select-DKYKaxPB.cjs.js → select-CzjgmQe5.cjs.js} +2 -2
  172. package/dist/chunks/{select-DKYKaxPB.cjs.js.map → select-CzjgmQe5.cjs.js.map} +1 -1
  173. package/dist/chunks/{separator-nbzofauL.es.js → separator-C_2Z6v9B.es.js} +3 -3
  174. package/dist/chunks/{separator-nbzofauL.es.js.map → separator-C_2Z6v9B.es.js.map} +1 -1
  175. package/dist/chunks/{separator-BCgD1L7m.cjs.js → separator-NMLMQH7M.cjs.js} +2 -2
  176. package/dist/chunks/{separator-BCgD1L7m.cjs.js.map → separator-NMLMQH7M.cjs.js.map} +1 -1
  177. package/dist/chunks/{split-button-BxATaqTd.cjs.js → split-button-DHUSeGWy.cjs.js} +2 -2
  178. package/dist/chunks/{split-button-BxATaqTd.cjs.js.map → split-button-DHUSeGWy.cjs.js.map} +1 -1
  179. package/dist/chunks/{split-button-BU-qVsoU.es.js → split-button-rREKAwlx.es.js} +4 -4
  180. package/dist/chunks/{split-button-BU-qVsoU.es.js.map → split-button-rREKAwlx.es.js.map} +1 -1
  181. package/dist/chunks/{steps-hFnqvgs5.cjs.js → steps-CRv1fVZk.cjs.js} +2 -2
  182. package/dist/chunks/{steps-hFnqvgs5.cjs.js.map → steps-CRv1fVZk.cjs.js.map} +1 -1
  183. package/dist/chunks/{steps-D4PGBn9S.es.js → steps-CyV83SJa.es.js} +2 -2
  184. package/dist/chunks/{steps-D4PGBn9S.es.js.map → steps-CyV83SJa.es.js.map} +1 -1
  185. package/dist/chunks/{switch-DBI4STeG.cjs.js → switch-DBwKE_ko.cjs.js} +2 -2
  186. package/dist/chunks/{switch-DBI4STeG.cjs.js.map → switch-DBwKE_ko.cjs.js.map} +1 -1
  187. package/dist/chunks/{switch-dLnIGxMu.es.js → switch-DQRh6tor.es.js} +3 -3
  188. package/dist/chunks/{switch-dLnIGxMu.es.js.map → switch-DQRh6tor.es.js.map} +1 -1
  189. package/dist/chunks/{table-I9vNdwDu.cjs.js → table-B_BansB3.cjs.js} +2 -2
  190. package/dist/chunks/{table-I9vNdwDu.cjs.js.map → table-B_BansB3.cjs.js.map} +1 -1
  191. package/dist/chunks/{table-BQ9EfDVA.es.js → table-DjkenPCz.es.js} +2 -2
  192. package/dist/chunks/{table-BQ9EfDVA.es.js.map → table-DjkenPCz.es.js.map} +1 -1
  193. package/dist/chunks/{tabs-Vvz4_UY5.es.js → tabs-C91cWaUm.es.js} +2 -2
  194. package/dist/chunks/{tabs-Vvz4_UY5.es.js.map → tabs-C91cWaUm.es.js.map} +1 -1
  195. package/dist/chunks/{tabs-Ce76FEWP.cjs.js → tabs-CF30UUYO.cjs.js} +2 -2
  196. package/dist/chunks/{tabs-Ce76FEWP.cjs.js.map → tabs-CF30UUYO.cjs.js.map} +1 -1
  197. package/dist/chunks/{tag-group-BqWFD-bc.es.js → tag-group-BKD3mqCz.es.js} +2 -2
  198. package/dist/chunks/{tag-group-BqWFD-bc.es.js.map → tag-group-BKD3mqCz.es.js.map} +1 -1
  199. package/dist/chunks/{tag-group-jRz5HeHG.cjs.js → tag-group-BRZbhZLs.cjs.js} +2 -2
  200. package/dist/chunks/{tag-group-jRz5HeHG.cjs.js.map → tag-group-BRZbhZLs.cjs.js.map} +1 -1
  201. package/dist/chunks/{text-input-D5kp2Woq.cjs.js → text-input-4hJwmKMr.cjs.js} +2 -2
  202. package/dist/chunks/{text-input-D5kp2Woq.cjs.js.map → text-input-4hJwmKMr.cjs.js.map} +1 -1
  203. package/dist/chunks/{text-input-D4Res1fI.es.js → text-input-BF-iYc24.es.js} +3 -3
  204. package/dist/chunks/{text-input-D4Res1fI.es.js.map → text-input-BF-iYc24.es.js.map} +1 -1
  205. package/dist/chunks/{text-input-field-BeQQ0J5G.es.js → text-input-field-BvWZkBpU.es.js} +3 -3
  206. package/dist/chunks/{text-input-field-BeQQ0J5G.es.js.map → text-input-field-BvWZkBpU.es.js.map} +1 -1
  207. package/dist/chunks/{text-input-field-t6s8Tn-I.cjs.js → text-input-field-l36en4as.cjs.js} +2 -2
  208. package/dist/chunks/{text-input-field-t6s8Tn-I.cjs.js.map → text-input-field-l36en4as.cjs.js.map} +1 -1
  209. package/dist/chunks/{time-input-JLSumOe-.es.js → time-input-DGV0Tcii.es.js} +3 -3
  210. package/dist/chunks/{time-input-JLSumOe-.es.js.map → time-input-DGV0Tcii.es.js.map} +1 -1
  211. package/dist/chunks/{time-input-3SGaEjmk.cjs.js → time-input-lTLnPfWp.cjs.js} +2 -2
  212. package/dist/chunks/{time-input-3SGaEjmk.cjs.js.map → time-input-lTLnPfWp.cjs.js.map} +1 -1
  213. package/dist/chunks/{toast.outlet-CGE1xY7p.es.js → toast.outlet-BrMQc1Xs.es.js} +3 -3
  214. package/dist/chunks/{toast.outlet-CGE1xY7p.es.js.map → toast.outlet-BrMQc1Xs.es.js.map} +1 -1
  215. package/dist/chunks/{toast.outlet-Cg1OtgY0.cjs.js → toast.outlet-CXA8ZElR.cjs.js} +2 -2
  216. package/dist/chunks/{toast.outlet-Cg1OtgY0.cjs.js.map → toast.outlet-CXA8ZElR.cjs.js.map} +1 -1
  217. package/dist/chunks/{toggle-button-DW5INNYc.cjs.js → toggle-button-9HIOPYPG.cjs.js} +2 -2
  218. package/dist/chunks/{toggle-button-DW5INNYc.cjs.js.map → toggle-button-9HIOPYPG.cjs.js.map} +1 -1
  219. package/dist/chunks/{toggle-button-Bc3b0Mdz.es.js → toggle-button-YjU1LD3Z.es.js} +3 -3
  220. package/dist/chunks/{toggle-button-Bc3b0Mdz.es.js.map → toggle-button-YjU1LD3Z.es.js.map} +1 -1
  221. package/dist/chunks/{toolbar-CV2NCv0p.es.js → toolbar-BoDdhKeP.es.js} +3 -3
  222. package/dist/chunks/{toolbar-CV2NCv0p.es.js.map → toolbar-BoDdhKeP.es.js.map} +1 -1
  223. package/dist/chunks/{toolbar-DIEmU_vh.cjs.js → toolbar-Ut-7K_-k.cjs.js} +2 -2
  224. package/dist/chunks/{toolbar-DIEmU_vh.cjs.js.map → toolbar-Ut-7K_-k.cjs.js.map} +1 -1
  225. package/dist/components/accordion.cjs +1 -1
  226. package/dist/components/accordion.es.js +2 -2
  227. package/dist/components/alert.cjs +1 -1
  228. package/dist/components/alert.es.js +1 -1
  229. package/dist/components/button.cjs +1 -1
  230. package/dist/components/button.es.js +1 -1
  231. package/dist/components/calendar.cjs +1 -1
  232. package/dist/components/calendar.es.js +1 -1
  233. package/dist/components/card.cjs +1 -1
  234. package/dist/components/card.es.js +1 -1
  235. package/dist/components/checkbox.cjs +1 -1
  236. package/dist/components/checkbox.es.js +1 -1
  237. package/dist/components/collapsible-motion.cjs +1 -1
  238. package/dist/components/collapsible-motion.es.js +1 -1
  239. package/dist/components/combobox.cjs +1 -1
  240. package/dist/components/combobox.es.js +1 -1
  241. package/dist/components/components.cjs +1 -1
  242. package/dist/components/components.es.js +1 -1
  243. package/dist/components/data-table.cjs +1 -1
  244. package/dist/components/data-table.es.js +1 -1
  245. package/dist/components/date-input.cjs +1 -1
  246. package/dist/components/date-input.es.js +1 -1
  247. package/dist/components/date-picker.cjs +1 -1
  248. package/dist/components/date-picker.es.js +1 -1
  249. package/dist/components/date-range-picker-field.cjs +1 -1
  250. package/dist/components/date-range-picker-field.es.js +1 -1
  251. package/dist/components/date-range-picker.cjs +1 -1
  252. package/dist/components/date-range-picker.es.js +1 -1
  253. package/dist/components/dialog.cjs +1 -1
  254. package/dist/components/dialog.es.js +1 -1
  255. package/dist/components/draggable-list.cjs +1 -1
  256. package/dist/components/draggable-list.es.js +1 -1
  257. package/dist/components/drawer.cjs +1 -1
  258. package/dist/components/drawer.es.js +1 -1
  259. package/dist/components/fields.cjs +1 -1
  260. package/dist/components/fields.es.js +7 -7
  261. package/dist/components/form-field/components/form-field.context.d.ts +3 -3
  262. package/dist/components/form-field/components/form-field.input.d.ts +5 -1
  263. package/dist/components/form-field/form-field.d.ts +1 -1
  264. package/dist/components/form-field.cjs +1 -1
  265. package/dist/components/form-field.es.js +1 -1
  266. package/dist/components/icon-button.cjs +1 -1
  267. package/dist/components/icon-button.es.js +1 -1
  268. package/dist/components/icon-toggle-button.cjs +1 -1
  269. package/dist/components/icon-toggle-button.es.js +1 -1
  270. package/dist/components/list.cjs +1 -1
  271. package/dist/components/list.es.js +1 -1
  272. package/dist/components/localized-field/utils/test-data.d.ts +62 -0
  273. package/dist/components/localized-field.cjs +1 -1
  274. package/dist/components/localized-field.es.js +1 -1
  275. package/dist/components/money-input-field.cjs +1 -1
  276. package/dist/components/money-input-field.es.js +1 -1
  277. package/dist/components/money-input.cjs +1 -1
  278. package/dist/components/money-input.es.js +1 -1
  279. package/dist/components/multiline-text-input-field.cjs +1 -1
  280. package/dist/components/multiline-text-input-field.es.js +1 -1
  281. package/dist/components/multiline-text-input.cjs +1 -1
  282. package/dist/components/multiline-text-input.es.js +1 -1
  283. package/dist/components/nimbus-provider.cjs +1 -1
  284. package/dist/components/nimbus-provider.es.js +1 -1
  285. package/dist/components/number-input-field.cjs +1 -1
  286. package/dist/components/number-input-field.es.js +1 -1
  287. package/dist/components/number-input.cjs +1 -1
  288. package/dist/components/number-input.es.js +1 -1
  289. package/dist/components/pagination.cjs +1 -1
  290. package/dist/components/pagination.es.js +1 -1
  291. package/dist/components/password-input-field.cjs +1 -1
  292. package/dist/components/password-input-field.es.js +1 -1
  293. package/dist/components/password-input.cjs +1 -1
  294. package/dist/components/password-input.es.js +1 -1
  295. package/dist/components/patterns.cjs +1 -1
  296. package/dist/components/patterns.es.js +7 -7
  297. package/dist/components/progress-bar.cjs +1 -1
  298. package/dist/components/progress-bar.es.js +1 -1
  299. package/dist/components/radio-input.cjs +1 -1
  300. package/dist/components/radio-input.es.js +1 -1
  301. package/dist/components/range-calendar.cjs +1 -1
  302. package/dist/components/range-calendar.es.js +1 -1
  303. package/dist/components/rich-text-input.cjs +1 -1
  304. package/dist/components/rich-text-input.es.js +1 -1
  305. package/dist/components/scoped-search-input.cjs +1 -1
  306. package/dist/components/scoped-search-input.es.js +1 -1
  307. package/dist/components/search-input-field.cjs +1 -1
  308. package/dist/components/search-input-field.es.js +1 -1
  309. package/dist/components/search-input.cjs +1 -1
  310. package/dist/components/search-input.es.js +1 -1
  311. package/dist/components/select/components/select.clear-button.d.ts +3 -1
  312. package/dist/components/select.cjs +1 -1
  313. package/dist/components/select.es.js +1 -1
  314. package/dist/components/separator.cjs +1 -1
  315. package/dist/components/separator.es.js +1 -1
  316. package/dist/components/split-button.cjs +1 -1
  317. package/dist/components/split-button.es.js +1 -1
  318. package/dist/components/steps.cjs +1 -1
  319. package/dist/components/steps.es.js +1 -1
  320. package/dist/components/switch.cjs +1 -1
  321. package/dist/components/switch.es.js +1 -1
  322. package/dist/components/table.cjs +1 -1
  323. package/dist/components/table.es.js +1 -1
  324. package/dist/components/tabs.cjs +1 -1
  325. package/dist/components/tabs.es.js +1 -1
  326. package/dist/components/tag-group.cjs +1 -1
  327. package/dist/components/tag-group.es.js +1 -1
  328. package/dist/components/text-input-field.cjs +1 -1
  329. package/dist/components/text-input-field.es.js +1 -1
  330. package/dist/components/text-input.cjs +1 -1
  331. package/dist/components/text-input.es.js +1 -1
  332. package/dist/components/time-input.cjs +1 -1
  333. package/dist/components/time-input.es.js +1 -1
  334. package/dist/components/toast.cjs +1 -1
  335. package/dist/components/toast.es.js +1 -1
  336. package/dist/components/toggle-button.cjs +1 -1
  337. package/dist/components/toggle-button.es.js +1 -1
  338. package/dist/components/toolbar.cjs +1 -1
  339. package/dist/components/toolbar.es.js +1 -1
  340. package/dist/components/utils.cjs +1 -1
  341. package/dist/components/utils.cjs.map +1 -1
  342. package/dist/components/utils.es.js +1 -1
  343. package/dist/components/utils.es.js.map +1 -1
  344. package/dist/index.cjs +1 -1
  345. package/dist/index.es.js +57 -57
  346. package/package.json +7 -7
  347. package/dist/chunks/form-field-BcNFX196.es.js.map +0 -1
  348. package/dist/chunks/form-field-TY4tZsBZ.cjs.js +0 -2
  349. package/dist/chunks/form-field-TY4tZsBZ.cjs.js.map +0 -1
  350. package/dist/chunks/index-CbPHv6Ml.es.js.map +0 -1
  351. package/dist/chunks/index-D8ffoMG1.cjs.js.map +0 -1
@@ -1,2 +1,2 @@
1
- "use strict";const m=require("react/jsx-runtime"),o=require("react"),bt=require("./Header-Daaf7xDF.cjs.js"),fe=require("./ListBox-CNFNgyJO.cjs.js"),Ge=require("./CollectionBuilder-C_QqJynd.cjs.js"),He=require("@chakra-ui/react/styled-system"),Ee=require("@commercetools/nimbus-icons"),pe=require("./extract-style-props-7Kq9mybq.cjs.js"),xt=require("./popover-FjS43_KY.cjs.js"),Ne=require("./icon-button-BV_okpOb.cjs.js"),ht=require("./loading-spinner-C2hfbSXt.cjs.js"),he=require("./Input-DK3H-e45.cjs.js"),de=require("./tag-group-jRz5HeHG.cjs.js"),vt=require("./RSPContexts-BdKenzIN.cjs.js"),Fe=require("./Button-Cd6tzMBr.cjs.js"),Oe=require("./utils-Dn-IhiTh.cjs.js"),Ct=require("./Group-Fz0VwUdJ.cjs.js"),St=require("./Label-udDCVpjy.cjs.js"),$t=require("./Dialog-BwUsRNPT.cjs.js"),wt=require("./Text-BWSfeB9p.cjs.js"),ue=require("./normalize-messages-DtVffO09.cjs.js"),Kt=require("./useListData-DgCKbwHX.cjs.js"),We=require("./mergeProps-BAXAqyMT.cjs.js"),It=require("./useListState-xpfKx1uw.cjs.js");function Mt(e,t){let r;switch(e.state){case"idle":case"error":switch(t.type){case"loading":case"loadingMore":case"sorting":case"filtering":var l,n;return{...e,filterText:(l=t.filterText)!==null&&l!==void 0?l:e.filterText,state:t.type,items:t.type==="loading"?[]:e.items,sortDescriptor:(n=t.sortDescriptor)!==null&&n!==void 0?n:e.sortDescriptor,abortController:t.abortController};case"update":var s;return{...e,...(s=t.updater)===null||s===void 0?void 0:s.call(t,e)};case"success":case"error":return e;default:throw new Error(`Invalid action "${t.type}" in state "${e.state}"`)}case"loading":case"sorting":case"filtering":switch(t.type){case"success":if(t.abortController!==e.abortController)return e;var a;r=(a=t.selectedKeys)!==null&&a!==void 0?a:e.selectedKeys;var i,d,x;return{...e,filterText:(i=t.filterText)!==null&&i!==void 0?i:e.filterText,state:"idle",items:[...(d=t.items)!==null&&d!==void 0?d:[]],selectedKeys:r==="all"?"all":new Set(r),sortDescriptor:(x=t.sortDescriptor)!==null&&x!==void 0?x:e.sortDescriptor,abortController:void 0,cursor:t.cursor};case"error":return t.abortController!==e.abortController?e:{...e,state:"error",error:t.error,abortController:void 0};case"loading":case"loadingMore":case"sorting":case"filtering":var h;(h=e.abortController)===null||h===void 0||h.abort("aborting current load and starting new one");var f;return{...e,filterText:(f=t.filterText)!==null&&f!==void 0?f:e.filterText,state:t.type,items:t.type==="loading"?[]:e.items,abortController:t.abortController};case"update":var $;return{...e,...($=t.updater)===null||$===void 0?void 0:$.call(t,e)};default:throw new Error(`Invalid action "${t.type}" in state "${e.state}"`)}case"loadingMore":switch(t.type){case"success":var g;r=e.selectedKeys==="all"||t.selectedKeys==="all"?"all":new Set([...e.selectedKeys,...(g=t.selectedKeys)!==null&&g!==void 0?g:[]]);var I,O;return{...e,state:"idle",items:[...e.items,...(I=t.items)!==null&&I!==void 0?I:[]],selectedKeys:r,sortDescriptor:(O=t.sortDescriptor)!==null&&O!==void 0?O:e.sortDescriptor,abortController:void 0,cursor:t.cursor};case"error":return t.abortController!==e.abortController?e:{...e,state:"error",error:t.error};case"loading":case"sorting":case"filtering":var M;(M=e.abortController)===null||M===void 0||M.abort();var b;return{...e,filterText:(b=t.filterText)!==null&&b!==void 0?b:e.filterText,state:t.type,items:t.type==="loading"?[]:e.items,abortController:t.abortController};case"loadingMore":var A;return(A=t.abortController)===null||A===void 0||A.abort(),e;case"update":var w;return{...e,...(w=t.updater)===null||w===void 0?void 0:w.call(t,e)};default:throw new Error(`Invalid action "${t.type}" in state "${e.state}"`)}default:throw new Error(`Invalid state "${e.state}"`)}}function Bt(e){const{load:t,sort:r,initialSelectedKeys:l,initialSortDescriptor:n,getKey:s=f=>f.id||f.key,initialFilterText:a=""}=e;let[i,d]=o.useReducer(Mt,{state:"idle",error:void 0,items:[],selectedKeys:l==="all"?"all":new Set(l),sortDescriptor:n,filterText:a});const x=async(f,$)=>{let g=new AbortController;try{d({...f,abortController:g});var I;let b=(I=f.filterText)!==null&&I!==void 0?I:i.filterText;var O;let A=await $({items:i.items.slice(),selectedKeys:i.selectedKeys,sortDescriptor:(O=f.sortDescriptor)!==null&&O!==void 0?O:i.sortDescriptor,signal:g.signal,cursor:f.type==="loadingMore"?i.cursor:void 0,filterText:b,loadingState:i.state});var M;let w=(M=A.filterText)!==null&&M!==void 0?M:b;d({type:"success",...A,abortController:g}),w&&w!==b&&!g.signal.aborted&&x({type:"filtering",filterText:w},t)}catch(b){d({type:"error",error:b,abortController:g})}};let h=o.useRef(!1);return o.useEffect(()=>{h.current||(x({type:"loading"},t),h.current=!0)},[]),{items:i.items,selectedKeys:i.selectedKeys,sortDescriptor:i.sortDescriptor,isLoading:i.state==="loading"||i.state==="loadingMore"||i.state==="sorting"||i.state==="filtering",loadingState:i.state,error:i.error,filterText:i.filterText,getItem(f){return i.items.find($=>s($)===f)},reload(){x({type:"loading"},t)},loadMore(){i.state==="loading"||i.state==="loadingMore"||i.state==="filtering"||i.cursor==null||x({type:"loadingMore"},t)},sort(f){x({type:"sorting",sortDescriptor:f},r||t)},...Kt.$0d86e9c8f07f9a7b$export$79c0c687a5963b0a({...e,getKey:s,cursor:i.cursor},f=>{d({type:"update",updater:f})}),setFilterText(f){x({type:"filtering",filterText:f},t)}}}const Rt=o.createContext(null);function At(e,t,r,l){var n=this,s=o.useRef(null),a=o.useRef(0),i=o.useRef(0),d=o.useRef(null),x=o.useRef([]),h=o.useRef(),f=o.useRef(),$=o.useRef(e),g=o.useRef(!0),I=o.useRef(),O=o.useRef();$.current=e;var M=typeof window<"u",b=!t&&t!==0&&M;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var A=!!(r=r||{}).leading,w=!("trailing"in r)||!!r.trailing,U=!!r.flushOnExit&&w,J="maxWait"in r,G="debounceOnServer"in r&&!!r.debounceOnServer,Q=J?Math.max(+r.maxWait||0,t):null,re=o.useMemo(function(){var V=function(v){var E=x.current,j=h.current;return x.current=h.current=null,a.current=v,i.current=i.current||v,f.current=$.current.apply(j,E)},X=function(v,E){b&&cancelAnimationFrame(d.current),d.current=b?requestAnimationFrame(v):setTimeout(v,E)},ne=function(v){if(!g.current)return!1;var E=v-s.current;return!s.current||E>=t||E<0||J&&v-a.current>=Q},oe=function(v){return d.current=null,w&&x.current?V(v):(x.current=h.current=null,f.current)},R=function v(){var E=Date.now();if(A&&i.current===a.current&&me(),ne(E))return oe(E);if(g.current){var j=t-(E-s.current),H=J?Math.min(j,Q-(E-a.current)):j;X(v,H)}},me=function(){},Y=function(){if(M||G){var v,E=Date.now(),j=ne(E);if(x.current=[].slice.call(arguments),h.current=n,s.current=E,U&&!I.current&&(I.current=function(){var H;((H=global.document)==null?void 0:H.visibilityState)==="hidden"&&O.current.flush()},(v=global.document)==null||v.addEventListener==null||v.addEventListener("visibilitychange",I.current)),j){if(!d.current&&g.current)return a.current=s.current,X(R,t),A?V(s.current):f.current;if(J)return X(R,t),V(s.current)}return d.current||X(R,t),f.current}};return Y.cancel=function(){var v=d.current;v&&(b?cancelAnimationFrame(d.current):clearTimeout(d.current)),a.current=0,x.current=s.current=h.current=d.current=null},Y.isPending=function(){return!!d.current},Y.flush=function(){return d.current?oe(Date.now()):f.current},Y},[A,J,t,Q,w,U,b,M,G,l]);return O.current=re,o.useEffect(function(){return g.current=!0,function(){var V;U&&O.current.flush(),I.current&&((V=global.document)==null||V.removeEventListener==null||V.removeEventListener("visibilitychange",I.current),I.current=null),g.current=!1}},[U]),re}const{withProvider:Et,withContext:W}=He.createSlotRecipeContext({key:"nimbusCombobox"}),Ft=Et("div","root"),Ot=W("div","trigger"),Lt=W("div","leadingElement"),Tt=W("div","content"),Pt=W("div","tagGroup"),Vt=W("div","input"),jt=W("div","popover"),Dt=W("div","listBox"),zt=W("div","section"),kt=W("div","option"),qt=W("div","optionIndicator"),Nt=W("div","optionContent"),Wt={clearSelection:"Clear selection",options:"Options menu",selectedValues:"Selected values",toggleOptions:"Toggle options"},Gt={clearSelection:"Auswahl löschen",options:"Optionsmenü",selectedValues:"Ausgewählte Werte",toggleOptions:"Optionen anzeigen/ verbergen"},Ht={clearSelection:"Borrar selección",options:"Menú de opciones",selectedValues:"Valores seleccionados",toggleOptions:"Opciones de conmutación"},Ut={clearSelection:"Effacer la sélection",options:"Menu d'options",selectedValues:"Valeurs sélectionnées",toggleOptions:"Basculer les options"},Jt={clearSelection:"Limpar seleção",options:"Menu de opções",selectedValues:"Selecionar valores",toggleOptions:"Alternar opções"},Qt={en:ue.normalizeMessages(Wt),de:ue.normalizeMessages(Gt),es:ue.normalizeMessages(Ht),"fr-FR":ue.normalizeMessages(Ut),"pt-BR":ue.normalizeMessages(Jt)};function Ue(e){if(typeof e=="string"||typeof e=="number")return e;if("id"in e)return e.id;throw new Error("ComboBox - Item must have an 'id' property or provide getKey function")}function Xt(e){if(typeof e=="string")return e;if("name"in e)return String(e.name);if("label"in e)return String(e.label);throw new Error("ComboBox - Item must have 'name' or 'label' property, or provide a getTextValue function")}function Yt(e){return{id:e,name:e}}const Zt=e=>e?e instanceof Set?e:new Set(Array.isArray(e)?e:[e]):new Set,_t=e=>Array.from(e),Le=o.createContext(null),Ie=()=>{const e=o.useContext(Le);if(!e)throw new Error("Nimbus - ComboBox components must be used within ComboBox.Root");return e},Je=e=>{const{name:t,form:r,selectedKeys:l,selectionMode:n,formValue:s,allowsCustomOptions:a,collection:i,inputValue:d}=e,x=o.useMemo(()=>{if(n==="single"){const h=Array.from(l)[0];return h?s==="text"||a?Array.from(i).find($=>$.key===h)?.textValue||d||"":String(h):""}else{const h=Array.from(l);return s==="text"||a?h.map(f=>Array.from(i).find(g=>g.key===f)?.textValue||"").filter(Boolean).join(","):h.join(",")}},[n,l,s,a,i,d]);return t?m.jsx("input",{type:"hidden",name:t,form:typeof r=="string"?r:void 0,value:x}):null};Je.displayName="ComboBoxHiddenInput";function Qe(e){let t;[e,t]=Oe.$64fa3d84918910a7$export$29f1550f4b0d4415(e,null,Rt);const{selectionMode:r="single",size:l="md",getKey:n=Ue,getTextValue:s=Xt,children:a,leadingElement:i,inputValue:d,onInputChange:x,isLoading:h,allowsEmptyMenu:f,renderEmptyState:$,async:g,filter:I,allowsCustomOptions:O=!1,isDisabled:M=!1,isInvalid:b=!1,isRequired:A=!1,isReadOnly:w=!1}=e,U=He.useSlotRecipe({key:"nimbusCombobox"}),[J,G]=U.splitVariantProps(e),[Q,re]=pe.extractStyleProps(G),V=o.useRef(null),X=o.useRef(null),[ne,oe]=o.useState([]),R=Bt({getKey:n,async load({signal:B,filterText:N}){if(!g)return{items:[]};const _=g.minSearchLength??0;if(!N||N.length<_)return{items:[]};try{return{items:await g.load(N,B)}}catch(le){if(le.name==="AbortError")throw le;const C=le;return g.onError?.(C),{items:[]}}}}),[me,Y]=o.useState(d),[v,E]=o.useState(!1),[j,H]=o.useState([]),Me=g?.debounce??300,ve=At(B=>{E(!1),R.setFilterText(B)},Me),Ce=o.useCallback(B=>{Y(B),E(!0),ve(B)},[ve]),z=g?me:d,Se=g?Ce:x,q=g?v||R.loadingState==="loading"||R.loadingState==="loadingMore"||R.loadingState==="filtering":h,ge=g||O?!0:f,$e=o.useCallback(()=>q?z?.length?`loading results for "${z}"`:"loading results":z?.length&&g?.minSearchLength&&z.length>=g.minSearchLength?`no results for "${z}"`:g?.minSearchLength?`enter at least ${g?.minSearchLength} characters`:"type to search",[g?.minSearchLength,q,z]),we=o.useCallback(()=>q?z?.length?`loading results for "${z}"`:"loading results":'hit "enter" to create an option',[q,z]),T=(O?we:g?$e:void 0)??$,Z=o.useMemo(()=>{const B=g?Array.from(R.items):e.items,N=B?Array.from(B):[],_=new Set(N.map(F=>n(F)));let C=[...ne.filter(F=>!_.has(n(F))),...N];if(g&&r==="multiple"&&j.length>0){const F=new Set(C.map(be=>n(be)));C=[...j.filter(be=>!F.has(n(be))),...C]}return C},[g,R.items,e.items,ne,j,r,n]),se=o.useMemo(()=>({selectionMode:r,size:l,getKey:n,getTextValue:s,leadingElement:i,triggerRef:V,inputRef:X,isLoading:q,isDisabled:M,isRequired:A,isInvalid:b,isReadOnly:w}),[r,n,s,i,V,X,q,l,M,A,b,w]),ye=o.useMemo(()=>{if(Z)return Array.from(Z).map(B=>{const N="id"in B,_="textValue"in B;return N&&_?B:{...B,...N?{}:{id:n(B)},..._?{}:{textValue:s(B)}}})},[Z,n,s]),Be=o.useMemo(()=>m.jsx(Le.Provider,{value:se,children:m.jsx(fe.$eed445e0843c11d0$export$7ff8f37d2d81a48d.Provider,{value:{items:ye},children:typeof a=="function"?a({isOpen:!1,isDisabled:M,isInvalid:b,isRequired:A,defaultChildren:null}):a})}),[a,M,b,A,ye,se]);return m.jsx(Oe.$64fa3d84918910a7$export$2881499e37b75b9a,{values:[[Fe.$d2b4bc8c273e7be6$export$24d547caef80ccd1,{}],[he.$3985021b0ad6602f$export$37fb8590cf2c088c,{}],[de.$eaf9e70818b436db$export$5b07b5dd2cbd96e3,{}]],children:m.jsx(Le.Provider,{value:se,children:m.jsx(Ft,{ref:t,...J,...Q,size:l,"data-disabled":M,"data-invalid":b,"data-required":A,"data-readonly":w,"data-open":e.isOpen,role:"group",children:m.jsx(Ge.$e1995378a142960e$export$bf788dd355e3a401,{content:Be,children:B=>m.jsx(er,{...re,size:l,filter:I,selectionMode:r,inputValue:z,onInputChange:Se,getKey:n,getTextValue:s,allowsEmptyMenu:ge,renderEmptyState:T,isDisabled:M,isRequired:A,isInvalid:b,isReadOnly:w,collection:B,allowsCustomOptions:O,asyncConfig:g,onAsyncSelectedItemsChange:g&&r==="multiple"?H:void 0,onAddCustomItem:oe,onAddAsyncSelectedItem:H})})})})})}Qe.displayName="ComboBox.Root";const er=e=>{const t=ue.useLocalizedStringFormatter(Qt),{selectionMode:r="single",items:l,collection:n,getKey:s=Ue,children:a,selectedKeys:i=[],onSelectionChange:d,disabledKeys:x,inputValue:h="",onInputChange:f,filter:$,placeholder:g,menuTrigger:I="input",shouldCloseOnBlur:O=!0,shouldCloseOnSelect:M=!0,isOpen:b,defaultOpen:A=!1,onOpenChange:w,allowsEmptyMenu:U=!1,renderEmptyState:J,allowsCustomOptions:G=!1,isValidNewOption:Q,getNewOptionData:re=Yt,onCreateOption:V,"aria-label":X,"aria-labelledby":ne,"aria-describedby":oe,isDisabled:R=!1,isRequired:me=!1,isInvalid:Y=!1,isReadOnly:v=!1,shouldFocusWrap:E=!0,autoFocus:j=!1,name:H,formValue:Me,validationBehavior:ve="aria",form:Ce,validate:z,isLoading:Se,asyncConfig:q,onAsyncSelectedItemsChange:ge,onAddCustomItem:$e,onAddAsyncSelectedItem:we}=e,{triggerRef:Ke,inputRef:T}=Ie(),Z=We.$bdb11010cef70236$export$f680877a34711e37(),se=We.$bdb11010cef70236$export$f680877a34711e37(),ye=o.useRef(null),Be=o.useRef(null),B=o.useMemo(()=>Zt(i),[i]),N=!!d,[_,le]=o.useState(B),C=N?B:_,F=f!==void 0,Te=()=>{if(h)return h;if(F||r!=="single")return"";const c=Array.from(C);if(c.length===0)return"";const u=c[0];return n.getItem(u)?.textValue??""},[be,ie]=o.useState(Te),P=F?h:be,ee=o.useRef(P),[ot,Pe]=o.useState(A),S=b??ot,[Re,xe]=o.useState(null),L=o.useCallback(c=>{b===void 0&&Pe(c),w?.(c)},[b,w]),st=o.useMemo(()=>{if(P.trim()==="")return n;if(r==="single"){const u=Array.from(C);if(u.length>0){const p=u[0];if(n.getItem(p)?.textValue===P)return n}}if($){const u=Array.from(n),p=Array.from($(u,P)),K=new Set(p.map(te=>te.key));return n.filter?.((te,Ae)=>K.has(Ae.key))??n}const c=P.toLowerCase();return n.filter?.(u=>u.toLowerCase().includes(c))??n},[n,P,$,r,C]),lt=o.useMemo(()=>r==="multiple"?Array.from(C).map(c=>n.getItem(c)?.value).filter(c=>c!==void 0):[],[r,C,n]),[it,ct]=o.useState(null),at=o.useCallback(()=>{const c=b===void 0?!S:!b;b===void 0?Pe(u=>!u):w?.(!b),c&&(T.current?.focus(),xe("first"))},[b,S,w,T]),ut=o.useCallback(c=>{F||ie(c),f?.(c),I==="input"&&c!==ee.current&&L(!0),ee.current=c},[F,f,I,L]),D=o.useCallback((c,u)=>{let p=c==="all"?new Set(Array.from(n).map(k=>k.key)):c;const K=u??C,te=p.size>0&&Array.from(p).every(k=>K.has(k))&&p.size<K.size;if(r==="multiple"&&p.size===1&&!te){const k=Array.from(p)[0],ae=K.has(k),ce=new Set(K);ae?ce.delete(k):ce.add(k),p=ce}const Ae=_t(p);if(d?d(Ae):le(p),q&&r==="multiple"&&ge){const k=Array.from(p).map(ae=>n.getItem(ae)?.value).filter(ae=>ae!==void 0);ge(k)}if(r==="single"){const k=Array.from(p)[0];if(k!==null){const ce=n.getItem(k)?.textValue??"";F||(ie(ce),ee.current=ce),f?.(ce)}M&&L(!1)}},[n,r,C,d,f,M,L,F,q,ge]),y=It.$e72dd72e1c76a225$export$2f645645f7bca764({selectionMode:r,collection:st,selectedKeys:C,onSelectionChange:D,disabledKeys:x}),dt=o.useCallback(()=>{D(new Set),F||(ie(""),ee.current=""),f?.(""),L(!0),requestAnimationFrame(()=>{T.current?.focus()})},[D,F,f,L,T]),Ve=o.useCallback(c=>{$e?.(K=>[...K,c]),q&&r==="multiple"&&we?.(K=>[...K,c]);const u=s(c),p=C;if(r==="single")D(new Set([u]),p);else{const K=new Set(p);K.add(u),D(K,p)}},[$e,q,r,we,s,C,D]),je=o.useCallback(()=>{if(!G)return!1;const c=P.trim();if(!c||Array.from(n).some(K=>K.textValue?.toLowerCase()===c.toLowerCase())||Q&&!Q(c))return!1;const p=re(c);return Ve(p),r==="multiple"?(F||(ie(""),ee.current=""),f?.("")):(F||(ie(c),ee.current=c),f?.(c)),V?.(p),!0},[G,re,Q,P,n,r,f,V,Ve,F,ie,ee]),ft=o.useCallback(c=>{if(R||v)return;const u=C,p=new Set(u);c.forEach(K=>p.delete(K)),D(p,u),p.size===0&&T.current?.focus()},[C,D,R,v,T]),pt=o.useCallback(c=>{switch(c.key){case"ArrowDown":if(c.preventDefault(),!S)L(!0),xe("first");else{const u=y.selectionManager.focusedKey,p=u?y.collection.getKeyAfter(u):y.collection.getFirstKey();y.selectionManager.setFocusedKey(p??y.collection.getFirstKey())}break;case"ArrowUp":if(c.preventDefault(),!S)L(!0),xe("last");else{const u=y.selectionManager.focusedKey,p=u?y.collection.getKeyBefore(u):y.collection.getLastKey();y.selectionManager.setFocusedKey(p??y.collection.getLastKey())}break;case"Enter":if(S&&y.selectionManager.focusedKey){c.preventDefault();const u=y.selectionManager.focusedKey;if(r==="multiple"){const p=new Set(C);p.has(u)?p.delete(u):p.add(u),D(p)}else D(new Set([u])),y.selectionManager.setFocusedKey(null)}else S&&!y.selectionManager.focusedKey&&G&&je()&&c.preventDefault();break;case"Escape":S&&(c.preventDefault(),L(!1),y.selectionManager.setFocusedKey(null));break;case"Home":if(S){c.preventDefault();const u=y.collection.getFirstKey();y.selectionManager.setFocusedKey(u)}break;case"End":if(S){c.preventDefault();const u=y.collection.getLastKey();y.selectionManager.setFocusedKey(u)}break;case"Backspace":if(P===""){const u=Array.from(C);if(u.length>0)if(c.preventDefault(),r==="single")D(new Set);else{const p=new Set(u);p.delete(u[u.length-1]),D(p)}}break}},[S,y.selectionManager,y.collection,D,L,xe,r,P,C,G,je]),mt=o.useCallback(()=>{I==="focus"&&!R&&!v&&L(!0),r==="single"&&P&&T.current&&T.current.select()},[I,R,v,L,r,P,T]),gt=o.useCallback(c=>{if(!O)return;const u=c.currentTarget;setTimeout(()=>{const p=document.activeElement;u.contains(p)||L(!1)},150)},[O,L]),De=o.useRef(null),ze=o.useRef(!1);o.useEffect(()=>{j&&T.current&&!R&&T.current.focus()},[j,R,T]);const ke=o.useRef(S);o.useEffect(()=>{b===void 0&&ke.current!==S&&(ke.current=S,w?.(S))},[S,b,w]),o.useEffect(()=>{if(r!=="single")return;const c=Array.from(y.selectionManager.selectedKeys),u=c.length>0?c[0]:null,p=u!==null?y.collection.getItem(u):null,K=p!==null;if(u===De.current&&(ze.current||u===null)||(De.current=u,ze.current=K,u!==null&&!p))return;const te=p?.textValue??"";F?f?.(te):(ie(te),ee.current=te)},[r,y.selectionManager.selectedKeys,y.collection,F,f]),o.useEffect(()=>{if(S&&Re){const c=Re==="first"?y.collection.getFirstKey():y.collection.getLastKey();y.selectionManager.setFocusedKey(c??null),xe(null)}},[S,Re,y.collection,y.selectionManager]),o.useEffect(()=>{S?y.selectionManager.setFocused(!0):(y.selectionManager.setFocused(!1),y.selectionManager.setFocusedKey(null))},[S,y.selectionManager]);const qe=o.useRef(!1);y.collection.size>0&&(qe.current=!0),o.useEffect(()=>{if(!S||U||Se||!qe.current)return;y.collection.size>0||L(!1)},[S,U,Se,y.collection.size,L,P]),o.useEffect(()=>{const c=Ke.current;if(!c)return;const u=()=>{const K=c.offsetWidth;ct(`${K}px`)};u();const p=new ResizeObserver(u);return p.observe(c),()=>{p.disconnect()}},[Ke]);const yt=[[he.$3985021b0ad6602f$export$37fb8590cf2c088c,{ref:T,role:"combobox","aria-autocomplete":"list","aria-controls":r==="multiple"?`${se} ${Z}`:Z,"aria-expanded":S,"aria-activedescendant":y.selectionManager.focusedKey?`${Z}-option-${y.selectionManager.focusedKey}`:void 0,"aria-describedby":r==="multiple"?`${se} ${oe??""}`:oe,"aria-label":X,"aria-labelledby":ne,value:P,onChange:c=>ut(c.target.value),onKeyDown:pt,onFocus:mt,onBlur:gt,disabled:R,readOnly:v,required:me,"aria-invalid":Y,placeholder:g,name:H,form:Ce,validationbehavior:ve,validate:z}],[de.$eaf9e70818b436db$export$5b07b5dd2cbd96e3,{id:se,"aria-label":t.format("selectedValues"),items:lt,onRemove:ft}],[Fe.$d2b4bc8c273e7be6$export$24d547caef80ccd1,{slots:{toggle:{onPress:at,"aria-label":t.format("toggleOptions"),isDisabled:R||v,isPressed:S},clear:{onPress:dt,"aria-label":t.format("clearSelection"),style:C.size>0?void 0:{display:"none"},isDisabled:R||v||y.selectionManager.selectedKeys.size===0}}}],[$t.$07b14b47974efb58$export$9b9a0cd73afb7ca4,{isOpen:S,onOpenChange:c=>{c||L(!1)},ref:Be,triggerRef:Ke,scrollRef:ye,isNonModal:!0,trigger:"ComboBox",placement:"bottom start",style:{"--nimbus-combobox-trigger-width":it},clearContexts:[St.$01b77f81d0f07f68$export$75b6ee27786ba447,Fe.$d2b4bc8c273e7be6$export$24d547caef80ccd1,he.$3985021b0ad6602f$export$37fb8590cf2c088c,Ct.$a049562f99e7db0e$export$f9c6924e160136d1,wt.$514c0188e459b4c0$export$9afb8bc826b033ea]}],[vt.$4e85f108e88277b8$export$b0d3ecf7112093a7,{shouldUseVirtualFocus:!0}],[fe.$eed445e0843c11d0$export$7ff8f37d2d81a48d,{items:l,id:Z,ref:ye,renderEmptyState:J,shouldFocusWrap:E,"aria-label":t.format("options")}],[fe.$eed445e0843c11d0$export$7c5906fe4f1f2af2,y]];return m.jsxs(Oe.$64fa3d84918910a7$export$2881499e37b75b9a,{values:yt,children:[m.jsx(Je,{name:H,form:Ce,selectedKeys:C,selectionMode:r,formValue:Me,allowsCustomOptions:G,collection:y.collection,inputValue:P}),a]})},Xe=e=>{const[t,r]=pe.extractStyleProps(e),l=o.useContext(he.$3985021b0ad6602f$export$37fb8590cf2c088c),{inputRef:n}=Ie();let s="",a="";l&&typeof l=="object"&&"value"in l&&(s=l.value||"",a=l.placeholder||"");const i=Math.max(s.length||a.length||1,1);return m.jsx(Vt,{asChild:!0,...t,children:m.jsx(he.$3985021b0ad6602f$export$f5b8910cec6cf069,{ref:n,...r,size:i,"data-empty":!(s.length||a.length)})})};Xe.displayName="ComboBox.Input";const tr=({children:e})=>m.jsx(Lt,{children:e}),Ye=e=>{const{selectionMode:t,size:r,getKey:l,getTextValue:n,isDisabled:s,isReadOnly:a}=Ie(),[i,d]=pe.extractStyleProps(e),x=o.useContext(de.$eaf9e70818b436db$export$5b07b5dd2cbd96e3),h=(x&&"items"in x?x.items:void 0)??[];return t!=="multiple"?null:m.jsx(Pt,{...i,...d,asChild:!0,children:m.jsx(de.TagGroup.Root,{size:r,children:m.jsx(de.TagGroup.TagList,{items:h,display:"contents",children:f=>{const $=l(f),g=n(f);return m.jsx(de.TagGroup.Tag,{id:$,textValue:g,isDisabled:s||a,maxW:"100%",children:g})}})})})};Ye.displayName="ComboBox.TagGroup";const Ze=({children:e,...t})=>{const{triggerRef:r,leadingElement:l,inputRef:n,isLoading:s,isDisabled:a}=Ie(),i=d=>{!a&&d.target instanceof HTMLElement&&!d.target.closest("button")&&n.current?.focus()};return m.jsxs(Ot,{ref:r,onClick:i,...t,children:[l&&m.jsx(tr,{children:l}),m.jsxs(Tt,{children:[m.jsx(Ye,{}),m.jsx(Xe,{})]}),m.jsx(Ne.IconButton,{slot:"clear",size:"2xs",variant:"ghost",colorPalette:"primary",children:m.jsx(Ee.Close,{})}),m.jsx(Ne.IconButton,{slot:"toggle",size:"2xs",variant:"ghost",colorPalette:"neutral",excludeFromTabOrder:!0,children:s?m.jsx(ht.LoadingSpinner,{size:"xs",margin:"50"}):m.jsx(Ee.KeyboardArrowDown,{})}),e]})};Ze.displayName="ComboBox.Trigger";const _e=({children:e,ref:t,...r})=>{const[l,n]=pe.extractStyleProps(r);return m.jsx(jt,{asChild:!0,...l,children:m.jsx(xt.Popover,{ref:t,isNonModal:!0,autoFocus:!0,...n,children:e})})};_e.displayName="ComboBox.Popover";function et({children:e,ref:t,...r}){const[l,n]=pe.extractStyleProps(r),s=typeof e=="function"?a=>{const i=e(a),d=a;return o.isValidElement(i)&&(d.id||d.textValue)?o.cloneElement(i,{...i.props,...d.id?{id:d.id}:{},...d.textValue?{textValue:d.textValue}:{}}):i}:e;return m.jsx(Dt,{...l,ref:t,asChild:!0,children:m.jsx(fe.$eed445e0843c11d0$export$41f133550aa26f48,{...n,children:s})})}et.displayName="ComboBox.ListBox";function tt({children:e,ref:t,...r}){const[l,n]=pe.extractStyleProps(r);return m.jsx(kt,{...l,asChild:!0,children:m.jsx(fe.$eed445e0843c11d0$export$a11e76429ed99b4,{ref:t,...n,children:s=>{const a=typeof e=="function"?e({...s}):e;return s.selectionMode==="multiple"?m.jsxs(m.Fragment,{children:[m.jsx(qt,{children:m.jsx("span",{"data-selected":s.isSelected,children:s.isSelected&&m.jsx(Ee.Check,{})})}),m.jsx(Nt,{children:a})]}):m.jsx(m.Fragment,{children:a})}})})}tt.displayName="ComboBox.Option";function rt({children:e,label:t,items:r,ref:l,...n}){if(r&&typeof e!="function")throw new Error('ComboBox.Section: When "items" is provided, "children" must be a function');return m.jsxs(fe.$eed445e0843c11d0$export$dca12b0bb56e4fc,{ref:l,...n,children:[t&&m.jsx(zt,{asChild:!0,children:m.jsx(bt.$72a5793c14baf454$export$8b251419efc915eb,{children:t})}),r?m.jsx(Ge.$e1995378a142960e$export$fb8073518f34e6ec,{items:r,children:s=>typeof e=="function"?e(s):null}):e]})}rt.displayName="ComboBox.Section";function nt(e,t){if(!t.trim())return e;const r=t.toLowerCase(),l=[];for(const n of e)n.textValue.toLowerCase().includes(r)&&l.push(n);return l}function rr(e,t){if(!t.trim())return e;const r=t.toLowerCase(),l=[];for(const n of e)n.textValue.toLowerCase().startsWith(r)&&l.push(n);return l}function nr(e,t){if(!t.trim())return e;const r=[];for(const l of e)l.textValue.includes(t)&&r.push(l);return r}function or(e,t){if(!t.trim())return e;const r=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),l=new RegExp(`\\b${r}`,"i"),n=[];for(const s of e)l.test(s.textValue)&&n.push(s);return n}function sr(e,t){if(!t.trim())return e;const r=t.toLowerCase(),l=[];for(const n of e){const s=n.textValue.toLowerCase();let a=0;for(let i=0;i<s.length&&a<r.length;i++)s[i]===r[a]&&a++;a===r.length&&l.push(n)}return l}function lr(e){return(t,r)=>{if(!r.trim())return t;const l=r.toLowerCase(),n=[];for(const s of t){const a=s.value;if(!a)continue;e.some(d=>{const x=d.split(".").reduce((f,$)=>f&&typeof f=="object"?f[$]:void 0,a);return x==null?!1:String(x).toLowerCase().includes(l)})&&n.push(s)}return n}}function ir(e){return(t,r)=>{if(!r.trim())return t;const l=[];for(const n of t){const s=e(n,r);s>0&&l.push({node:n,score:s})}return l.sort((n,s)=>s.score-n.score),l.map(n=>n.node)}}function cr(e=nt){return(t,r)=>{if(!r.trim())return t;const l=r.split(/\s+/).filter(a=>a.length>0);if(l.length===0)return t;const n=new Set;for(const a of l){const i=e(t,a);for(const d of i)n.add(d.key)}const s=[];for(const a of t)n.has(a.key)&&s.push(a);return s}}function ar(e){return(t,r)=>{if(!r.trim())return t;const l=[];let n=null;const s=[],a=()=>{n&&s.length>0&&(l.push(n),l.push(...s)),s.length=0};for(const i of t)if(i.type==="section")a(),n=i;else{const d=Array.from(e([i],r));d.length>0&&s.push(...d)}return a(),l}}const ur={Root:Qe,Trigger:Ze,Popover:_e,ListBox:et,Option:tt,Section:rt,filters:{filterByText:nt,filterByStartsWith:rr,filterByCaseSensitive:nr,filterByWordBoundary:or,filterByFuzzy:sr,createMultiPropertyFilter:lr,createRankedFilter:ir,createMultiTermFilter:cr,createSectionAwareFilter:ar}};exports.ComboBox=ur;
2
- //# sourceMappingURL=combobox-D3kJCGUw.cjs.js.map
1
+ "use strict";const m=require("react/jsx-runtime"),o=require("react"),bt=require("./Header-Daaf7xDF.cjs.js"),fe=require("./ListBox-CNFNgyJO.cjs.js"),Ge=require("./CollectionBuilder-C_QqJynd.cjs.js"),He=require("@chakra-ui/react/styled-system"),Ee=require("@commercetools/nimbus-icons"),pe=require("./extract-style-props-CidMHCzx.cjs.js"),xt=require("./popover-FjS43_KY.cjs.js"),Ne=require("./icon-button-B-yfUEQl.cjs.js"),ht=require("./loading-spinner-C2hfbSXt.cjs.js"),he=require("./Input-DK3H-e45.cjs.js"),de=require("./tag-group-BRZbhZLs.cjs.js"),vt=require("./RSPContexts-BdKenzIN.cjs.js"),Fe=require("./Button-Cd6tzMBr.cjs.js"),Oe=require("./utils-Dn-IhiTh.cjs.js"),Ct=require("./Group-Fz0VwUdJ.cjs.js"),St=require("./Label-udDCVpjy.cjs.js"),$t=require("./Dialog-BwUsRNPT.cjs.js"),wt=require("./Text-BWSfeB9p.cjs.js"),ue=require("./normalize-messages-DtVffO09.cjs.js"),Kt=require("./useListData-DgCKbwHX.cjs.js"),We=require("./mergeProps-BAXAqyMT.cjs.js"),It=require("./useListState-xpfKx1uw.cjs.js");function Mt(e,t){let r;switch(e.state){case"idle":case"error":switch(t.type){case"loading":case"loadingMore":case"sorting":case"filtering":var l,n;return{...e,filterText:(l=t.filterText)!==null&&l!==void 0?l:e.filterText,state:t.type,items:t.type==="loading"?[]:e.items,sortDescriptor:(n=t.sortDescriptor)!==null&&n!==void 0?n:e.sortDescriptor,abortController:t.abortController};case"update":var s;return{...e,...(s=t.updater)===null||s===void 0?void 0:s.call(t,e)};case"success":case"error":return e;default:throw new Error(`Invalid action "${t.type}" in state "${e.state}"`)}case"loading":case"sorting":case"filtering":switch(t.type){case"success":if(t.abortController!==e.abortController)return e;var a;r=(a=t.selectedKeys)!==null&&a!==void 0?a:e.selectedKeys;var i,d,x;return{...e,filterText:(i=t.filterText)!==null&&i!==void 0?i:e.filterText,state:"idle",items:[...(d=t.items)!==null&&d!==void 0?d:[]],selectedKeys:r==="all"?"all":new Set(r),sortDescriptor:(x=t.sortDescriptor)!==null&&x!==void 0?x:e.sortDescriptor,abortController:void 0,cursor:t.cursor};case"error":return t.abortController!==e.abortController?e:{...e,state:"error",error:t.error,abortController:void 0};case"loading":case"loadingMore":case"sorting":case"filtering":var h;(h=e.abortController)===null||h===void 0||h.abort("aborting current load and starting new one");var f;return{...e,filterText:(f=t.filterText)!==null&&f!==void 0?f:e.filterText,state:t.type,items:t.type==="loading"?[]:e.items,abortController:t.abortController};case"update":var $;return{...e,...($=t.updater)===null||$===void 0?void 0:$.call(t,e)};default:throw new Error(`Invalid action "${t.type}" in state "${e.state}"`)}case"loadingMore":switch(t.type){case"success":var g;r=e.selectedKeys==="all"||t.selectedKeys==="all"?"all":new Set([...e.selectedKeys,...(g=t.selectedKeys)!==null&&g!==void 0?g:[]]);var I,O;return{...e,state:"idle",items:[...e.items,...(I=t.items)!==null&&I!==void 0?I:[]],selectedKeys:r,sortDescriptor:(O=t.sortDescriptor)!==null&&O!==void 0?O:e.sortDescriptor,abortController:void 0,cursor:t.cursor};case"error":return t.abortController!==e.abortController?e:{...e,state:"error",error:t.error};case"loading":case"sorting":case"filtering":var M;(M=e.abortController)===null||M===void 0||M.abort();var b;return{...e,filterText:(b=t.filterText)!==null&&b!==void 0?b:e.filterText,state:t.type,items:t.type==="loading"?[]:e.items,abortController:t.abortController};case"loadingMore":var A;return(A=t.abortController)===null||A===void 0||A.abort(),e;case"update":var w;return{...e,...(w=t.updater)===null||w===void 0?void 0:w.call(t,e)};default:throw new Error(`Invalid action "${t.type}" in state "${e.state}"`)}default:throw new Error(`Invalid state "${e.state}"`)}}function Bt(e){const{load:t,sort:r,initialSelectedKeys:l,initialSortDescriptor:n,getKey:s=f=>f.id||f.key,initialFilterText:a=""}=e;let[i,d]=o.useReducer(Mt,{state:"idle",error:void 0,items:[],selectedKeys:l==="all"?"all":new Set(l),sortDescriptor:n,filterText:a});const x=async(f,$)=>{let g=new AbortController;try{d({...f,abortController:g});var I;let b=(I=f.filterText)!==null&&I!==void 0?I:i.filterText;var O;let A=await $({items:i.items.slice(),selectedKeys:i.selectedKeys,sortDescriptor:(O=f.sortDescriptor)!==null&&O!==void 0?O:i.sortDescriptor,signal:g.signal,cursor:f.type==="loadingMore"?i.cursor:void 0,filterText:b,loadingState:i.state});var M;let w=(M=A.filterText)!==null&&M!==void 0?M:b;d({type:"success",...A,abortController:g}),w&&w!==b&&!g.signal.aborted&&x({type:"filtering",filterText:w},t)}catch(b){d({type:"error",error:b,abortController:g})}};let h=o.useRef(!1);return o.useEffect(()=>{h.current||(x({type:"loading"},t),h.current=!0)},[]),{items:i.items,selectedKeys:i.selectedKeys,sortDescriptor:i.sortDescriptor,isLoading:i.state==="loading"||i.state==="loadingMore"||i.state==="sorting"||i.state==="filtering",loadingState:i.state,error:i.error,filterText:i.filterText,getItem(f){return i.items.find($=>s($)===f)},reload(){x({type:"loading"},t)},loadMore(){i.state==="loading"||i.state==="loadingMore"||i.state==="filtering"||i.cursor==null||x({type:"loadingMore"},t)},sort(f){x({type:"sorting",sortDescriptor:f},r||t)},...Kt.$0d86e9c8f07f9a7b$export$79c0c687a5963b0a({...e,getKey:s,cursor:i.cursor},f=>{d({type:"update",updater:f})}),setFilterText(f){x({type:"filtering",filterText:f},t)}}}const Rt=o.createContext(null);function At(e,t,r,l){var n=this,s=o.useRef(null),a=o.useRef(0),i=o.useRef(0),d=o.useRef(null),x=o.useRef([]),h=o.useRef(),f=o.useRef(),$=o.useRef(e),g=o.useRef(!0),I=o.useRef(),O=o.useRef();$.current=e;var M=typeof window<"u",b=!t&&t!==0&&M;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var A=!!(r=r||{}).leading,w=!("trailing"in r)||!!r.trailing,U=!!r.flushOnExit&&w,J="maxWait"in r,G="debounceOnServer"in r&&!!r.debounceOnServer,Q=J?Math.max(+r.maxWait||0,t):null,re=o.useMemo(function(){var V=function(v){var E=x.current,j=h.current;return x.current=h.current=null,a.current=v,i.current=i.current||v,f.current=$.current.apply(j,E)},X=function(v,E){b&&cancelAnimationFrame(d.current),d.current=b?requestAnimationFrame(v):setTimeout(v,E)},ne=function(v){if(!g.current)return!1;var E=v-s.current;return!s.current||E>=t||E<0||J&&v-a.current>=Q},oe=function(v){return d.current=null,w&&x.current?V(v):(x.current=h.current=null,f.current)},R=function v(){var E=Date.now();if(A&&i.current===a.current&&me(),ne(E))return oe(E);if(g.current){var j=t-(E-s.current),H=J?Math.min(j,Q-(E-a.current)):j;X(v,H)}},me=function(){},Y=function(){if(M||G){var v,E=Date.now(),j=ne(E);if(x.current=[].slice.call(arguments),h.current=n,s.current=E,U&&!I.current&&(I.current=function(){var H;((H=global.document)==null?void 0:H.visibilityState)==="hidden"&&O.current.flush()},(v=global.document)==null||v.addEventListener==null||v.addEventListener("visibilitychange",I.current)),j){if(!d.current&&g.current)return a.current=s.current,X(R,t),A?V(s.current):f.current;if(J)return X(R,t),V(s.current)}return d.current||X(R,t),f.current}};return Y.cancel=function(){var v=d.current;v&&(b?cancelAnimationFrame(d.current):clearTimeout(d.current)),a.current=0,x.current=s.current=h.current=d.current=null},Y.isPending=function(){return!!d.current},Y.flush=function(){return d.current?oe(Date.now()):f.current},Y},[A,J,t,Q,w,U,b,M,G,l]);return O.current=re,o.useEffect(function(){return g.current=!0,function(){var V;U&&O.current.flush(),I.current&&((V=global.document)==null||V.removeEventListener==null||V.removeEventListener("visibilitychange",I.current),I.current=null),g.current=!1}},[U]),re}const{withProvider:Et,withContext:W}=He.createSlotRecipeContext({key:"nimbusCombobox"}),Ft=Et("div","root"),Ot=W("div","trigger"),Lt=W("div","leadingElement"),Tt=W("div","content"),Pt=W("div","tagGroup"),Vt=W("div","input"),jt=W("div","popover"),Dt=W("div","listBox"),zt=W("div","section"),kt=W("div","option"),qt=W("div","optionIndicator"),Nt=W("div","optionContent"),Wt={clearSelection:"Clear selection",options:"Options menu",selectedValues:"Selected values",toggleOptions:"Toggle options"},Gt={clearSelection:"Auswahl löschen",options:"Optionsmenü",selectedValues:"Ausgewählte Werte",toggleOptions:"Optionen anzeigen/ verbergen"},Ht={clearSelection:"Borrar selección",options:"Menú de opciones",selectedValues:"Valores seleccionados",toggleOptions:"Opciones de conmutación"},Ut={clearSelection:"Effacer la sélection",options:"Menu d'options",selectedValues:"Valeurs sélectionnées",toggleOptions:"Basculer les options"},Jt={clearSelection:"Limpar seleção",options:"Menu de opções",selectedValues:"Selecionar valores",toggleOptions:"Alternar opções"},Qt={en:ue.normalizeMessages(Wt),de:ue.normalizeMessages(Gt),es:ue.normalizeMessages(Ht),"fr-FR":ue.normalizeMessages(Ut),"pt-BR":ue.normalizeMessages(Jt)};function Ue(e){if(typeof e=="string"||typeof e=="number")return e;if("id"in e)return e.id;throw new Error("ComboBox - Item must have an 'id' property or provide getKey function")}function Xt(e){if(typeof e=="string")return e;if("name"in e)return String(e.name);if("label"in e)return String(e.label);throw new Error("ComboBox - Item must have 'name' or 'label' property, or provide a getTextValue function")}function Yt(e){return{id:e,name:e}}const Zt=e=>e?e instanceof Set?e:new Set(Array.isArray(e)?e:[e]):new Set,_t=e=>Array.from(e),Le=o.createContext(null),Ie=()=>{const e=o.useContext(Le);if(!e)throw new Error("Nimbus - ComboBox components must be used within ComboBox.Root");return e},Je=e=>{const{name:t,form:r,selectedKeys:l,selectionMode:n,formValue:s,allowsCustomOptions:a,collection:i,inputValue:d}=e,x=o.useMemo(()=>{if(n==="single"){const h=Array.from(l)[0];return h?s==="text"||a?Array.from(i).find($=>$.key===h)?.textValue||d||"":String(h):""}else{const h=Array.from(l);return s==="text"||a?h.map(f=>Array.from(i).find(g=>g.key===f)?.textValue||"").filter(Boolean).join(","):h.join(",")}},[n,l,s,a,i,d]);return t?m.jsx("input",{type:"hidden",name:t,form:typeof r=="string"?r:void 0,value:x}):null};Je.displayName="ComboBoxHiddenInput";function Qe(e){let t;[e,t]=Oe.$64fa3d84918910a7$export$29f1550f4b0d4415(e,null,Rt);const{selectionMode:r="single",size:l="md",getKey:n=Ue,getTextValue:s=Xt,children:a,leadingElement:i,inputValue:d,onInputChange:x,isLoading:h,allowsEmptyMenu:f,renderEmptyState:$,async:g,filter:I,allowsCustomOptions:O=!1,isDisabled:M=!1,isInvalid:b=!1,isRequired:A=!1,isReadOnly:w=!1}=e,U=He.useSlotRecipe({key:"nimbusCombobox"}),[J,G]=U.splitVariantProps(e),[Q,re]=pe.extractStyleProps(G),V=o.useRef(null),X=o.useRef(null),[ne,oe]=o.useState([]),R=Bt({getKey:n,async load({signal:B,filterText:N}){if(!g)return{items:[]};const _=g.minSearchLength??0;if(!N||N.length<_)return{items:[]};try{return{items:await g.load(N,B)}}catch(le){if(le.name==="AbortError")throw le;const C=le;return g.onError?.(C),{items:[]}}}}),[me,Y]=o.useState(d),[v,E]=o.useState(!1),[j,H]=o.useState([]),Me=g?.debounce??300,ve=At(B=>{E(!1),R.setFilterText(B)},Me),Ce=o.useCallback(B=>{Y(B),E(!0),ve(B)},[ve]),z=g?me:d,Se=g?Ce:x,q=g?v||R.loadingState==="loading"||R.loadingState==="loadingMore"||R.loadingState==="filtering":h,ge=g||O?!0:f,$e=o.useCallback(()=>q?z?.length?`loading results for "${z}"`:"loading results":z?.length&&g?.minSearchLength&&z.length>=g.minSearchLength?`no results for "${z}"`:g?.minSearchLength?`enter at least ${g?.minSearchLength} characters`:"type to search",[g?.minSearchLength,q,z]),we=o.useCallback(()=>q?z?.length?`loading results for "${z}"`:"loading results":'hit "enter" to create an option',[q,z]),T=(O?we:g?$e:void 0)??$,Z=o.useMemo(()=>{const B=g?Array.from(R.items):e.items,N=B?Array.from(B):[],_=new Set(N.map(F=>n(F)));let C=[...ne.filter(F=>!_.has(n(F))),...N];if(g&&r==="multiple"&&j.length>0){const F=new Set(C.map(be=>n(be)));C=[...j.filter(be=>!F.has(n(be))),...C]}return C},[g,R.items,e.items,ne,j,r,n]),se=o.useMemo(()=>({selectionMode:r,size:l,getKey:n,getTextValue:s,leadingElement:i,triggerRef:V,inputRef:X,isLoading:q,isDisabled:M,isRequired:A,isInvalid:b,isReadOnly:w}),[r,n,s,i,V,X,q,l,M,A,b,w]),ye=o.useMemo(()=>{if(Z)return Array.from(Z).map(B=>{const N="id"in B,_="textValue"in B;return N&&_?B:{...B,...N?{}:{id:n(B)},..._?{}:{textValue:s(B)}}})},[Z,n,s]),Be=o.useMemo(()=>m.jsx(Le.Provider,{value:se,children:m.jsx(fe.$eed445e0843c11d0$export$7ff8f37d2d81a48d.Provider,{value:{items:ye},children:typeof a=="function"?a({isOpen:!1,isDisabled:M,isInvalid:b,isRequired:A,defaultChildren:null}):a})}),[a,M,b,A,ye,se]);return m.jsx(Oe.$64fa3d84918910a7$export$2881499e37b75b9a,{values:[[Fe.$d2b4bc8c273e7be6$export$24d547caef80ccd1,{}],[he.$3985021b0ad6602f$export$37fb8590cf2c088c,{}],[de.$eaf9e70818b436db$export$5b07b5dd2cbd96e3,{}]],children:m.jsx(Le.Provider,{value:se,children:m.jsx(Ft,{ref:t,...J,...Q,size:l,"data-disabled":M,"data-invalid":b,"data-required":A,"data-readonly":w,"data-open":e.isOpen,role:"group",children:m.jsx(Ge.$e1995378a142960e$export$bf788dd355e3a401,{content:Be,children:B=>m.jsx(er,{...re,size:l,filter:I,selectionMode:r,inputValue:z,onInputChange:Se,getKey:n,getTextValue:s,allowsEmptyMenu:ge,renderEmptyState:T,isDisabled:M,isRequired:A,isInvalid:b,isReadOnly:w,collection:B,allowsCustomOptions:O,asyncConfig:g,onAsyncSelectedItemsChange:g&&r==="multiple"?H:void 0,onAddCustomItem:oe,onAddAsyncSelectedItem:H})})})})})}Qe.displayName="ComboBox.Root";const er=e=>{const t=ue.useLocalizedStringFormatter(Qt),{selectionMode:r="single",items:l,collection:n,getKey:s=Ue,children:a,selectedKeys:i=[],onSelectionChange:d,disabledKeys:x,inputValue:h="",onInputChange:f,filter:$,placeholder:g,menuTrigger:I="input",shouldCloseOnBlur:O=!0,shouldCloseOnSelect:M=!0,isOpen:b,defaultOpen:A=!1,onOpenChange:w,allowsEmptyMenu:U=!1,renderEmptyState:J,allowsCustomOptions:G=!1,isValidNewOption:Q,getNewOptionData:re=Yt,onCreateOption:V,"aria-label":X,"aria-labelledby":ne,"aria-describedby":oe,isDisabled:R=!1,isRequired:me=!1,isInvalid:Y=!1,isReadOnly:v=!1,shouldFocusWrap:E=!0,autoFocus:j=!1,name:H,formValue:Me,validationBehavior:ve="aria",form:Ce,validate:z,isLoading:Se,asyncConfig:q,onAsyncSelectedItemsChange:ge,onAddCustomItem:$e,onAddAsyncSelectedItem:we}=e,{triggerRef:Ke,inputRef:T}=Ie(),Z=We.$bdb11010cef70236$export$f680877a34711e37(),se=We.$bdb11010cef70236$export$f680877a34711e37(),ye=o.useRef(null),Be=o.useRef(null),B=o.useMemo(()=>Zt(i),[i]),N=!!d,[_,le]=o.useState(B),C=N?B:_,F=f!==void 0,Te=()=>{if(h)return h;if(F||r!=="single")return"";const c=Array.from(C);if(c.length===0)return"";const u=c[0];return n.getItem(u)?.textValue??""},[be,ie]=o.useState(Te),P=F?h:be,ee=o.useRef(P),[ot,Pe]=o.useState(A),S=b??ot,[Re,xe]=o.useState(null),L=o.useCallback(c=>{b===void 0&&Pe(c),w?.(c)},[b,w]),st=o.useMemo(()=>{if(P.trim()==="")return n;if(r==="single"){const u=Array.from(C);if(u.length>0){const p=u[0];if(n.getItem(p)?.textValue===P)return n}}if($){const u=Array.from(n),p=Array.from($(u,P)),K=new Set(p.map(te=>te.key));return n.filter?.((te,Ae)=>K.has(Ae.key))??n}const c=P.toLowerCase();return n.filter?.(u=>u.toLowerCase().includes(c))??n},[n,P,$,r,C]),lt=o.useMemo(()=>r==="multiple"?Array.from(C).map(c=>n.getItem(c)?.value).filter(c=>c!==void 0):[],[r,C,n]),[it,ct]=o.useState(null),at=o.useCallback(()=>{const c=b===void 0?!S:!b;b===void 0?Pe(u=>!u):w?.(!b),c&&(T.current?.focus(),xe("first"))},[b,S,w,T]),ut=o.useCallback(c=>{F||ie(c),f?.(c),I==="input"&&c!==ee.current&&L(!0),ee.current=c},[F,f,I,L]),D=o.useCallback((c,u)=>{let p=c==="all"?new Set(Array.from(n).map(k=>k.key)):c;const K=u??C,te=p.size>0&&Array.from(p).every(k=>K.has(k))&&p.size<K.size;if(r==="multiple"&&p.size===1&&!te){const k=Array.from(p)[0],ae=K.has(k),ce=new Set(K);ae?ce.delete(k):ce.add(k),p=ce}const Ae=_t(p);if(d?d(Ae):le(p),q&&r==="multiple"&&ge){const k=Array.from(p).map(ae=>n.getItem(ae)?.value).filter(ae=>ae!==void 0);ge(k)}if(r==="single"){const k=Array.from(p)[0];if(k!==null){const ce=n.getItem(k)?.textValue??"";F||(ie(ce),ee.current=ce),f?.(ce)}M&&L(!1)}},[n,r,C,d,f,M,L,F,q,ge]),y=It.$e72dd72e1c76a225$export$2f645645f7bca764({selectionMode:r,collection:st,selectedKeys:C,onSelectionChange:D,disabledKeys:x}),dt=o.useCallback(()=>{D(new Set),F||(ie(""),ee.current=""),f?.(""),L(!0),requestAnimationFrame(()=>{T.current?.focus()})},[D,F,f,L,T]),Ve=o.useCallback(c=>{$e?.(K=>[...K,c]),q&&r==="multiple"&&we?.(K=>[...K,c]);const u=s(c),p=C;if(r==="single")D(new Set([u]),p);else{const K=new Set(p);K.add(u),D(K,p)}},[$e,q,r,we,s,C,D]),je=o.useCallback(()=>{if(!G)return!1;const c=P.trim();if(!c||Array.from(n).some(K=>K.textValue?.toLowerCase()===c.toLowerCase())||Q&&!Q(c))return!1;const p=re(c);return Ve(p),r==="multiple"?(F||(ie(""),ee.current=""),f?.("")):(F||(ie(c),ee.current=c),f?.(c)),V?.(p),!0},[G,re,Q,P,n,r,f,V,Ve,F,ie,ee]),ft=o.useCallback(c=>{if(R||v)return;const u=C,p=new Set(u);c.forEach(K=>p.delete(K)),D(p,u),p.size===0&&T.current?.focus()},[C,D,R,v,T]),pt=o.useCallback(c=>{switch(c.key){case"ArrowDown":if(c.preventDefault(),!S)L(!0),xe("first");else{const u=y.selectionManager.focusedKey,p=u?y.collection.getKeyAfter(u):y.collection.getFirstKey();y.selectionManager.setFocusedKey(p??y.collection.getFirstKey())}break;case"ArrowUp":if(c.preventDefault(),!S)L(!0),xe("last");else{const u=y.selectionManager.focusedKey,p=u?y.collection.getKeyBefore(u):y.collection.getLastKey();y.selectionManager.setFocusedKey(p??y.collection.getLastKey())}break;case"Enter":if(S&&y.selectionManager.focusedKey){c.preventDefault();const u=y.selectionManager.focusedKey;if(r==="multiple"){const p=new Set(C);p.has(u)?p.delete(u):p.add(u),D(p)}else D(new Set([u])),y.selectionManager.setFocusedKey(null)}else S&&!y.selectionManager.focusedKey&&G&&je()&&c.preventDefault();break;case"Escape":S&&(c.preventDefault(),L(!1),y.selectionManager.setFocusedKey(null));break;case"Home":if(S){c.preventDefault();const u=y.collection.getFirstKey();y.selectionManager.setFocusedKey(u)}break;case"End":if(S){c.preventDefault();const u=y.collection.getLastKey();y.selectionManager.setFocusedKey(u)}break;case"Backspace":if(P===""){const u=Array.from(C);if(u.length>0)if(c.preventDefault(),r==="single")D(new Set);else{const p=new Set(u);p.delete(u[u.length-1]),D(p)}}break}},[S,y.selectionManager,y.collection,D,L,xe,r,P,C,G,je]),mt=o.useCallback(()=>{I==="focus"&&!R&&!v&&L(!0),r==="single"&&P&&T.current&&T.current.select()},[I,R,v,L,r,P,T]),gt=o.useCallback(c=>{if(!O)return;const u=c.currentTarget;setTimeout(()=>{const p=document.activeElement;u.contains(p)||L(!1)},150)},[O,L]),De=o.useRef(null),ze=o.useRef(!1);o.useEffect(()=>{j&&T.current&&!R&&T.current.focus()},[j,R,T]);const ke=o.useRef(S);o.useEffect(()=>{b===void 0&&ke.current!==S&&(ke.current=S,w?.(S))},[S,b,w]),o.useEffect(()=>{if(r!=="single")return;const c=Array.from(y.selectionManager.selectedKeys),u=c.length>0?c[0]:null,p=u!==null?y.collection.getItem(u):null,K=p!==null;if(u===De.current&&(ze.current||u===null)||(De.current=u,ze.current=K,u!==null&&!p))return;const te=p?.textValue??"";F?f?.(te):(ie(te),ee.current=te)},[r,y.selectionManager.selectedKeys,y.collection,F,f]),o.useEffect(()=>{if(S&&Re){const c=Re==="first"?y.collection.getFirstKey():y.collection.getLastKey();y.selectionManager.setFocusedKey(c??null),xe(null)}},[S,Re,y.collection,y.selectionManager]),o.useEffect(()=>{S?y.selectionManager.setFocused(!0):(y.selectionManager.setFocused(!1),y.selectionManager.setFocusedKey(null))},[S,y.selectionManager]);const qe=o.useRef(!1);y.collection.size>0&&(qe.current=!0),o.useEffect(()=>{if(!S||U||Se||!qe.current)return;y.collection.size>0||L(!1)},[S,U,Se,y.collection.size,L,P]),o.useEffect(()=>{const c=Ke.current;if(!c)return;const u=()=>{const K=c.offsetWidth;ct(`${K}px`)};u();const p=new ResizeObserver(u);return p.observe(c),()=>{p.disconnect()}},[Ke]);const yt=[[he.$3985021b0ad6602f$export$37fb8590cf2c088c,{ref:T,role:"combobox","aria-autocomplete":"list","aria-controls":r==="multiple"?`${se} ${Z}`:Z,"aria-expanded":S,"aria-activedescendant":y.selectionManager.focusedKey?`${Z}-option-${y.selectionManager.focusedKey}`:void 0,"aria-describedby":r==="multiple"?`${se} ${oe??""}`:oe,"aria-label":X,"aria-labelledby":ne,value:P,onChange:c=>ut(c.target.value),onKeyDown:pt,onFocus:mt,onBlur:gt,disabled:R,readOnly:v,required:me,"aria-invalid":Y,placeholder:g,name:H,form:Ce,validationbehavior:ve,validate:z}],[de.$eaf9e70818b436db$export$5b07b5dd2cbd96e3,{id:se,"aria-label":t.format("selectedValues"),items:lt,onRemove:ft}],[Fe.$d2b4bc8c273e7be6$export$24d547caef80ccd1,{slots:{toggle:{onPress:at,"aria-label":t.format("toggleOptions"),isDisabled:R||v,isPressed:S},clear:{onPress:dt,"aria-label":t.format("clearSelection"),style:C.size>0?void 0:{display:"none"},isDisabled:R||v||y.selectionManager.selectedKeys.size===0}}}],[$t.$07b14b47974efb58$export$9b9a0cd73afb7ca4,{isOpen:S,onOpenChange:c=>{c||L(!1)},ref:Be,triggerRef:Ke,scrollRef:ye,isNonModal:!0,trigger:"ComboBox",placement:"bottom start",style:{"--nimbus-combobox-trigger-width":it},clearContexts:[St.$01b77f81d0f07f68$export$75b6ee27786ba447,Fe.$d2b4bc8c273e7be6$export$24d547caef80ccd1,he.$3985021b0ad6602f$export$37fb8590cf2c088c,Ct.$a049562f99e7db0e$export$f9c6924e160136d1,wt.$514c0188e459b4c0$export$9afb8bc826b033ea]}],[vt.$4e85f108e88277b8$export$b0d3ecf7112093a7,{shouldUseVirtualFocus:!0}],[fe.$eed445e0843c11d0$export$7ff8f37d2d81a48d,{items:l,id:Z,ref:ye,renderEmptyState:J,shouldFocusWrap:E,"aria-label":t.format("options")}],[fe.$eed445e0843c11d0$export$7c5906fe4f1f2af2,y]];return m.jsxs(Oe.$64fa3d84918910a7$export$2881499e37b75b9a,{values:yt,children:[m.jsx(Je,{name:H,form:Ce,selectedKeys:C,selectionMode:r,formValue:Me,allowsCustomOptions:G,collection:y.collection,inputValue:P}),a]})},Xe=e=>{const[t,r]=pe.extractStyleProps(e),l=o.useContext(he.$3985021b0ad6602f$export$37fb8590cf2c088c),{inputRef:n}=Ie();let s="",a="";l&&typeof l=="object"&&"value"in l&&(s=l.value||"",a=l.placeholder||"");const i=Math.max(s.length||a.length||1,1);return m.jsx(Vt,{asChild:!0,...t,children:m.jsx(he.$3985021b0ad6602f$export$f5b8910cec6cf069,{ref:n,...r,size:i,"data-empty":!(s.length||a.length)})})};Xe.displayName="ComboBox.Input";const tr=({children:e})=>m.jsx(Lt,{children:e}),Ye=e=>{const{selectionMode:t,size:r,getKey:l,getTextValue:n,isDisabled:s,isReadOnly:a}=Ie(),[i,d]=pe.extractStyleProps(e),x=o.useContext(de.$eaf9e70818b436db$export$5b07b5dd2cbd96e3),h=(x&&"items"in x?x.items:void 0)??[];return t!=="multiple"?null:m.jsx(Pt,{...i,...d,asChild:!0,children:m.jsx(de.TagGroup.Root,{size:r,children:m.jsx(de.TagGroup.TagList,{items:h,display:"contents",children:f=>{const $=l(f),g=n(f);return m.jsx(de.TagGroup.Tag,{id:$,textValue:g,isDisabled:s||a,maxW:"100%",children:g})}})})})};Ye.displayName="ComboBox.TagGroup";const Ze=({children:e,...t})=>{const{triggerRef:r,leadingElement:l,inputRef:n,isLoading:s,isDisabled:a}=Ie(),i=d=>{!a&&d.target instanceof HTMLElement&&!d.target.closest("button")&&n.current?.focus()};return m.jsxs(Ot,{ref:r,onClick:i,...t,children:[l&&m.jsx(tr,{children:l}),m.jsxs(Tt,{children:[m.jsx(Ye,{}),m.jsx(Xe,{})]}),m.jsx(Ne.IconButton,{slot:"clear",size:"2xs",variant:"ghost",colorPalette:"primary",children:m.jsx(Ee.Close,{})}),m.jsx(Ne.IconButton,{slot:"toggle",size:"2xs",variant:"ghost",colorPalette:"neutral",excludeFromTabOrder:!0,children:s?m.jsx(ht.LoadingSpinner,{size:"xs",margin:"50"}):m.jsx(Ee.KeyboardArrowDown,{})}),e]})};Ze.displayName="ComboBox.Trigger";const _e=({children:e,ref:t,...r})=>{const[l,n]=pe.extractStyleProps(r);return m.jsx(jt,{asChild:!0,...l,children:m.jsx(xt.Popover,{ref:t,isNonModal:!0,autoFocus:!0,...n,children:e})})};_e.displayName="ComboBox.Popover";function et({children:e,ref:t,...r}){const[l,n]=pe.extractStyleProps(r),s=typeof e=="function"?a=>{const i=e(a),d=a;return o.isValidElement(i)&&(d.id||d.textValue)?o.cloneElement(i,{...i.props,...d.id?{id:d.id}:{},...d.textValue?{textValue:d.textValue}:{}}):i}:e;return m.jsx(Dt,{...l,ref:t,asChild:!0,children:m.jsx(fe.$eed445e0843c11d0$export$41f133550aa26f48,{...n,children:s})})}et.displayName="ComboBox.ListBox";function tt({children:e,ref:t,...r}){const[l,n]=pe.extractStyleProps(r);return m.jsx(kt,{...l,asChild:!0,children:m.jsx(fe.$eed445e0843c11d0$export$a11e76429ed99b4,{ref:t,...n,children:s=>{const a=typeof e=="function"?e({...s}):e;return s.selectionMode==="multiple"?m.jsxs(m.Fragment,{children:[m.jsx(qt,{children:m.jsx("span",{"data-selected":s.isSelected,children:s.isSelected&&m.jsx(Ee.Check,{})})}),m.jsx(Nt,{children:a})]}):m.jsx(m.Fragment,{children:a})}})})}tt.displayName="ComboBox.Option";function rt({children:e,label:t,items:r,ref:l,...n}){if(r&&typeof e!="function")throw new Error('ComboBox.Section: When "items" is provided, "children" must be a function');return m.jsxs(fe.$eed445e0843c11d0$export$dca12b0bb56e4fc,{ref:l,...n,children:[t&&m.jsx(zt,{asChild:!0,children:m.jsx(bt.$72a5793c14baf454$export$8b251419efc915eb,{children:t})}),r?m.jsx(Ge.$e1995378a142960e$export$fb8073518f34e6ec,{items:r,children:s=>typeof e=="function"?e(s):null}):e]})}rt.displayName="ComboBox.Section";function nt(e,t){if(!t.trim())return e;const r=t.toLowerCase(),l=[];for(const n of e)n.textValue.toLowerCase().includes(r)&&l.push(n);return l}function rr(e,t){if(!t.trim())return e;const r=t.toLowerCase(),l=[];for(const n of e)n.textValue.toLowerCase().startsWith(r)&&l.push(n);return l}function nr(e,t){if(!t.trim())return e;const r=[];for(const l of e)l.textValue.includes(t)&&r.push(l);return r}function or(e,t){if(!t.trim())return e;const r=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),l=new RegExp(`\\b${r}`,"i"),n=[];for(const s of e)l.test(s.textValue)&&n.push(s);return n}function sr(e,t){if(!t.trim())return e;const r=t.toLowerCase(),l=[];for(const n of e){const s=n.textValue.toLowerCase();let a=0;for(let i=0;i<s.length&&a<r.length;i++)s[i]===r[a]&&a++;a===r.length&&l.push(n)}return l}function lr(e){return(t,r)=>{if(!r.trim())return t;const l=r.toLowerCase(),n=[];for(const s of t){const a=s.value;if(!a)continue;e.some(d=>{const x=d.split(".").reduce((f,$)=>f&&typeof f=="object"?f[$]:void 0,a);return x==null?!1:String(x).toLowerCase().includes(l)})&&n.push(s)}return n}}function ir(e){return(t,r)=>{if(!r.trim())return t;const l=[];for(const n of t){const s=e(n,r);s>0&&l.push({node:n,score:s})}return l.sort((n,s)=>s.score-n.score),l.map(n=>n.node)}}function cr(e=nt){return(t,r)=>{if(!r.trim())return t;const l=r.split(/\s+/).filter(a=>a.length>0);if(l.length===0)return t;const n=new Set;for(const a of l){const i=e(t,a);for(const d of i)n.add(d.key)}const s=[];for(const a of t)n.has(a.key)&&s.push(a);return s}}function ar(e){return(t,r)=>{if(!r.trim())return t;const l=[];let n=null;const s=[],a=()=>{n&&s.length>0&&(l.push(n),l.push(...s)),s.length=0};for(const i of t)if(i.type==="section")a(),n=i;else{const d=Array.from(e([i],r));d.length>0&&s.push(...d)}return a(),l}}const ur={Root:Qe,Trigger:Ze,Popover:_e,ListBox:et,Option:tt,Section:rt,filters:{filterByText:nt,filterByStartsWith:rr,filterByCaseSensitive:nr,filterByWordBoundary:or,filterByFuzzy:sr,createMultiPropertyFilter:lr,createRankedFilter:ir,createMultiTermFilter:cr,createSectionAwareFilter:ar}};exports.ComboBox=ur;
2
+ //# sourceMappingURL=combobox-DLBPqKDP.cjs.js.map