@salesforce/design-system-react 11.0.0-alpha.6 → 11.0.0-alpha.8

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 (427) hide show
  1. package/dist/cjs/components/accordion/panel.cjs +1 -1
  2. package/dist/cjs/components/accordion/panel.cjs.map +1 -1
  3. package/dist/cjs/components/badge/index.cjs +1 -1
  4. package/dist/cjs/components/badge/index.cjs.map +1 -1
  5. package/dist/cjs/components/builder-header/check-props.cjs +2 -0
  6. package/dist/cjs/components/builder-header/check-props.cjs.map +1 -0
  7. package/dist/cjs/components/builder-header/component.cjs +2 -0
  8. package/dist/cjs/components/builder-header/component.cjs.map +1 -0
  9. package/dist/cjs/components/builder-header/toolbar.cjs +1 -1
  10. package/dist/cjs/components/builder-header/toolbar.cjs.map +1 -1
  11. package/dist/cjs/components/carousel/check-props.cjs +2 -0
  12. package/dist/cjs/components/carousel/check-props.cjs.map +1 -0
  13. package/dist/cjs/components/carousel/component.cjs +2 -0
  14. package/dist/cjs/components/carousel/component.cjs.map +1 -0
  15. package/dist/cjs/components/carousel/index.cjs +1 -1
  16. package/dist/cjs/components/carousel/index.cjs.map +1 -1
  17. package/dist/cjs/components/carousel/private/carousel-item.cjs +1 -1
  18. package/dist/cjs/components/carousel/private/carousel-item.cjs.map +1 -1
  19. package/dist/cjs/components/checkbox/check-props.cjs +2 -0
  20. package/dist/cjs/components/checkbox/check-props.cjs.map +1 -0
  21. package/dist/cjs/components/checkbox/component.cjs +2 -0
  22. package/dist/cjs/components/checkbox/component.cjs.map +1 -0
  23. package/dist/cjs/components/checkbox/index.cjs +1 -1
  24. package/dist/cjs/components/checkbox/index.cjs.map +1 -1
  25. package/dist/cjs/components/color-picker/color-picker.cjs +1 -1
  26. package/dist/cjs/components/color-picker/color-picker.cjs.map +1 -1
  27. package/dist/cjs/components/combobox/check-props.cjs +1 -1
  28. package/dist/cjs/components/combobox/check-props.cjs.map +1 -1
  29. package/dist/cjs/components/combobox/combobox.cjs +1 -1
  30. package/dist/cjs/components/combobox/combobox.cjs.map +1 -1
  31. package/dist/cjs/components/combobox/index.cjs.map +1 -1
  32. package/dist/cjs/components/combobox/private/menu.cjs +1 -1
  33. package/dist/cjs/components/combobox/private/menu.cjs.map +1 -1
  34. package/dist/cjs/components/dynamic-icon/index.cjs +1 -1
  35. package/dist/cjs/components/dynamic-icon/index.cjs.map +1 -1
  36. package/dist/cjs/components/filter/filter.cjs +1 -1
  37. package/dist/cjs/components/filter/filter.cjs.map +1 -1
  38. package/dist/cjs/components/input/index.cjs +1 -1
  39. package/dist/cjs/components/input/index.cjs.map +1 -1
  40. package/dist/cjs/components/menu-dropdown/check-props.cjs +1 -1
  41. package/dist/cjs/components/menu-dropdown/check-props.cjs.map +1 -1
  42. package/dist/cjs/components/menu-dropdown/index.cjs.map +1 -1
  43. package/dist/cjs/components/menu-dropdown/menu-dropdown.cjs +1 -1
  44. package/dist/cjs/components/menu-dropdown/menu-dropdown.cjs.map +1 -1
  45. package/dist/cjs/components/modal/check-props.cjs +2 -0
  46. package/dist/cjs/components/modal/check-props.cjs.map +1 -0
  47. package/dist/cjs/components/modal/component.cjs +2 -0
  48. package/dist/cjs/components/modal/component.cjs.map +1 -0
  49. package/dist/cjs/components/modal/index.cjs +1 -1
  50. package/dist/cjs/components/modal/index.cjs.map +1 -1
  51. package/dist/cjs/components/page-header/check-props.cjs +2 -0
  52. package/dist/cjs/components/page-header/check-props.cjs.map +1 -0
  53. package/dist/cjs/components/page-header/component.cjs +2 -0
  54. package/dist/cjs/components/page-header/component.cjs.map +1 -0
  55. package/dist/cjs/components/page-header/index.cjs +1 -1
  56. package/dist/cjs/components/page-header/index.cjs.map +1 -1
  57. package/dist/cjs/components/page-header/private/base/index.cjs +1 -1
  58. package/dist/cjs/components/page-header/private/base/index.cjs.map +1 -1
  59. package/dist/cjs/components/page-header/private/controls.cjs +1 -1
  60. package/dist/cjs/components/page-header/private/controls.cjs.map +1 -1
  61. package/dist/cjs/components/page-header/private/object-home/index.cjs +1 -1
  62. package/dist/cjs/components/page-header/private/object-home/index.cjs.map +1 -1
  63. package/dist/cjs/components/page-header/private/record-home/index.cjs +1 -1
  64. package/dist/cjs/components/page-header/private/record-home/index.cjs.map +1 -1
  65. package/dist/cjs/components/page-header/private/related-list/index.cjs +1 -1
  66. package/dist/cjs/components/page-header/private/related-list/index.cjs.map +1 -1
  67. package/dist/cjs/components/popover/component.cjs +2 -0
  68. package/dist/cjs/components/popover/component.cjs.map +1 -0
  69. package/dist/cjs/components/popover/edit-dialog.cjs +1 -1
  70. package/dist/cjs/components/popover/edit-dialog.cjs.map +1 -1
  71. package/dist/cjs/components/popover/popover.cjs +1 -1
  72. package/dist/cjs/components/popover/popover.cjs.map +1 -1
  73. package/dist/cjs/components/progress-indicator/check-props.cjs +1 -1
  74. package/dist/cjs/components/progress-indicator/check-props.cjs.map +1 -1
  75. package/dist/cjs/components/progress-indicator/component.cjs +2 -0
  76. package/dist/cjs/components/progress-indicator/component.cjs.map +1 -0
  77. package/dist/cjs/components/progress-indicator/index.cjs +1 -1
  78. package/dist/cjs/components/progress-indicator/index.cjs.map +1 -1
  79. package/dist/cjs/components/progress-indicator/private/step-vertical.cjs +1 -1
  80. package/dist/cjs/components/progress-indicator/private/step-vertical.cjs.map +1 -1
  81. package/dist/cjs/components/radio/check-props.cjs +2 -0
  82. package/dist/cjs/components/radio/check-props.cjs.map +1 -0
  83. package/dist/cjs/components/radio/component.cjs +2 -0
  84. package/dist/cjs/components/radio/component.cjs.map +1 -0
  85. package/dist/cjs/components/radio/index.cjs +1 -1
  86. package/dist/cjs/components/radio/index.cjs.map +1 -1
  87. package/dist/cjs/components/setup-assistant/check-props.cjs +1 -1
  88. package/dist/cjs/components/setup-assistant/check-props.cjs.map +1 -1
  89. package/dist/cjs/components/setup-assistant/step.cjs +1 -1
  90. package/dist/cjs/components/setup-assistant/step.cjs.map +1 -1
  91. package/dist/cjs/components/simple-data-table/check-props.cjs +1 -1
  92. package/dist/cjs/components/simple-data-table/check-props.cjs.map +1 -1
  93. package/dist/cjs/components/simple-data-table/index.cjs +1 -1
  94. package/dist/cjs/components/simple-data-table/index.cjs.map +1 -1
  95. package/dist/cjs/components/slider/check-props.cjs +2 -0
  96. package/dist/cjs/components/slider/check-props.cjs.map +1 -0
  97. package/dist/cjs/components/slider/component.cjs +2 -0
  98. package/dist/cjs/components/slider/component.cjs.map +1 -0
  99. package/dist/cjs/components/slider/index.cjs +1 -1
  100. package/dist/cjs/components/slider/index.cjs.map +1 -1
  101. package/dist/cjs/components/spinner/check-props.cjs +2 -0
  102. package/dist/cjs/components/spinner/check-props.cjs.map +1 -0
  103. package/dist/cjs/components/spinner/component.cjs +2 -0
  104. package/dist/cjs/components/spinner/component.cjs.map +1 -0
  105. package/dist/cjs/components/spinner/index.cjs +1 -1
  106. package/dist/cjs/components/spinner/index.cjs.map +1 -1
  107. package/dist/cjs/components/split-view/check-props.cjs +1 -1
  108. package/dist/cjs/components/split-view/check-props.cjs.map +1 -1
  109. package/dist/cjs/components/split-view/index.cjs +1 -1
  110. package/dist/cjs/components/split-view/index.cjs.map +1 -1
  111. package/dist/cjs/components/split-view/listbox-check-props.cjs +2 -0
  112. package/dist/cjs/components/split-view/listbox-check-props.cjs.map +1 -0
  113. package/dist/cjs/components/split-view/listbox.cjs +1 -1
  114. package/dist/cjs/components/split-view/listbox.cjs.map +1 -1
  115. package/dist/cjs/components/split-view/private/list-item-content.cjs +1 -1
  116. package/dist/cjs/components/split-view/private/list-item-content.cjs.map +1 -1
  117. package/dist/cjs/components/split-view/private/list-item-with-content.cjs +1 -1
  118. package/dist/cjs/components/split-view/private/list-item-with-content.cjs.map +1 -1
  119. package/dist/cjs/components/split-view/private/toggle-button.cjs +1 -1
  120. package/dist/cjs/components/split-view/private/toggle-button.cjs.map +1 -1
  121. package/dist/cjs/components/tabs/panel.cjs.map +1 -1
  122. package/dist/cjs/components/textarea/check-props.cjs +1 -1
  123. package/dist/cjs/components/textarea/check-props.cjs.map +1 -1
  124. package/dist/cjs/components/textarea/index.cjs +1 -1
  125. package/dist/cjs/components/textarea/index.cjs.map +1 -1
  126. package/dist/cjs/components/tree/check-props.cjs +1 -1
  127. package/dist/cjs/components/tree/check-props.cjs.map +1 -1
  128. package/dist/cjs/components/tree/component.cjs +2 -0
  129. package/dist/cjs/components/tree/component.cjs.map +1 -0
  130. package/dist/cjs/components/tree/tree.cjs +1 -1
  131. package/dist/cjs/components/tree/tree.cjs.map +1 -1
  132. package/dist/cjs/components/trial-bar/check-props.cjs +2 -0
  133. package/dist/cjs/components/trial-bar/check-props.cjs.map +1 -0
  134. package/dist/cjs/components/trial-bar/component.cjs +2 -0
  135. package/dist/cjs/components/trial-bar/component.cjs.map +1 -0
  136. package/dist/cjs/components/trial-bar/index.cjs +1 -1
  137. package/dist/cjs/components/trial-bar/index.cjs.map +1 -1
  138. package/dist/cjs/components/utilities/menu-list/index.cjs +1 -1
  139. package/dist/cjs/components/utilities/menu-list/index.cjs.map +1 -1
  140. package/dist/cjs/components/utilities/menu-list/item.cjs +1 -1
  141. package/dist/cjs/components/utilities/menu-list/item.cjs.map +1 -1
  142. package/dist/cjs/components/utilities/utility-icon/index.cjs +1 -1
  143. package/dist/cjs/components/utilities/utility-icon/index.cjs.map +1 -1
  144. package/dist/cjs/components/vertical-navigation/index.cjs +1 -1
  145. package/dist/cjs/components/vertical-navigation/index.cjs.map +1 -1
  146. package/dist/cjs/components/vertical-navigation/private/item.cjs +1 -1
  147. package/dist/cjs/components/vertical-navigation/private/item.cjs.map +1 -1
  148. package/dist/cjs/components/welcome-mat/check-props.cjs +2 -0
  149. package/dist/cjs/components/welcome-mat/check-props.cjs.map +1 -0
  150. package/dist/cjs/components/welcome-mat/component.cjs +2 -0
  151. package/dist/cjs/components/welcome-mat/component.cjs.map +1 -0
  152. package/dist/cjs/components/welcome-mat/index.cjs +1 -1
  153. package/dist/cjs/components/welcome-mat/index.cjs.map +1 -1
  154. package/dist/cjs/components/welcome-mat/info-badge.cjs +1 -1
  155. package/dist/cjs/components/welcome-mat/info-badge.cjs.map +1 -1
  156. package/dist/cjs/utilities/warning/deprecated-property-value.cjs +2 -0
  157. package/dist/cjs/utilities/warning/deprecated-property-value.cjs.map +1 -0
  158. package/dist/es/components/accordion/panel.js +1 -1
  159. package/dist/es/components/accordion/panel.js.map +1 -1
  160. package/dist/es/components/badge/index.js +6 -5
  161. package/dist/es/components/badge/index.js.map +1 -1
  162. package/dist/es/components/builder-header/check-props.js +13 -0
  163. package/dist/es/components/builder-header/check-props.js.map +1 -0
  164. package/dist/es/components/builder-header/component.js +65 -0
  165. package/dist/es/components/builder-header/component.js.map +1 -0
  166. package/dist/es/components/builder-header/toolbar.js +18 -13
  167. package/dist/es/components/builder-header/toolbar.js.map +1 -1
  168. package/dist/es/components/carousel/check-props.js +13 -0
  169. package/dist/es/components/carousel/check-props.js.map +1 -0
  170. package/dist/es/components/carousel/component.js +27 -0
  171. package/dist/es/components/carousel/component.js.map +1 -0
  172. package/dist/es/components/carousel/index.js +121 -109
  173. package/dist/es/components/carousel/index.js.map +1 -1
  174. package/dist/es/components/carousel/private/carousel-item.js +1 -2
  175. package/dist/es/components/carousel/private/carousel-item.js.map +1 -1
  176. package/dist/es/components/checkbox/check-props.js +14 -0
  177. package/dist/es/components/checkbox/check-props.js.map +1 -0
  178. package/dist/es/components/checkbox/component.js +35 -0
  179. package/dist/es/components/checkbox/component.js.map +1 -0
  180. package/dist/es/components/checkbox/index.js +124 -112
  181. package/dist/es/components/checkbox/index.js.map +1 -1
  182. package/dist/es/components/color-picker/color-picker.js +1 -1
  183. package/dist/es/components/color-picker/color-picker.js.map +1 -1
  184. package/dist/es/components/combobox/check-props.js +1 -1
  185. package/dist/es/components/combobox/check-props.js.map +1 -1
  186. package/dist/es/components/combobox/combobox.js +210 -202
  187. package/dist/es/components/combobox/combobox.js.map +1 -1
  188. package/dist/es/components/combobox/index.js.map +1 -1
  189. package/dist/es/components/combobox/private/menu.js +5 -7
  190. package/dist/es/components/combobox/private/menu.js.map +1 -1
  191. package/dist/es/components/dynamic-icon/index.js +1 -1
  192. package/dist/es/components/dynamic-icon/index.js.map +1 -1
  193. package/dist/es/components/filter/filter.js +1 -1
  194. package/dist/es/components/filter/filter.js.map +1 -1
  195. package/dist/es/components/input/index.js +138 -136
  196. package/dist/es/components/input/index.js.map +1 -1
  197. package/dist/es/components/menu-dropdown/check-props.js +1 -1
  198. package/dist/es/components/menu-dropdown/check-props.js.map +1 -1
  199. package/dist/es/components/menu-dropdown/index.js.map +1 -1
  200. package/dist/es/components/menu-dropdown/menu-dropdown.js +192 -185
  201. package/dist/es/components/menu-dropdown/menu-dropdown.js.map +1 -1
  202. package/dist/es/components/modal/check-props.js +22 -0
  203. package/dist/es/components/modal/check-props.js.map +1 -0
  204. package/dist/es/components/modal/component.js +35 -0
  205. package/dist/es/components/modal/component.js.map +1 -0
  206. package/dist/es/components/modal/index.js +118 -104
  207. package/dist/es/components/modal/index.js.map +1 -1
  208. package/dist/es/components/page-header/check-props.js +31 -0
  209. package/dist/es/components/page-header/check-props.js.map +1 -0
  210. package/dist/es/components/page-header/component.js +35 -0
  211. package/dist/es/components/page-header/component.js.map +1 -0
  212. package/dist/es/components/page-header/index.js +56 -38
  213. package/dist/es/components/page-header/index.js.map +1 -1
  214. package/dist/es/components/page-header/private/base/index.js +1 -1
  215. package/dist/es/components/page-header/private/base/index.js.map +1 -1
  216. package/dist/es/components/page-header/private/controls.js +1 -1
  217. package/dist/es/components/page-header/private/controls.js.map +1 -1
  218. package/dist/es/components/page-header/private/object-home/index.js +4 -4
  219. package/dist/es/components/page-header/private/object-home/index.js.map +1 -1
  220. package/dist/es/components/page-header/private/record-home/index.js +1 -1
  221. package/dist/es/components/page-header/private/record-home/index.js.map +1 -1
  222. package/dist/es/components/page-header/private/related-list/index.js +2 -2
  223. package/dist/es/components/page-header/private/related-list/index.js.map +1 -1
  224. package/dist/es/components/popover/component.js +59 -0
  225. package/dist/es/components/popover/component.js.map +1 -0
  226. package/dist/es/components/popover/edit-dialog.js +1 -1
  227. package/dist/es/components/popover/edit-dialog.js.map +1 -1
  228. package/dist/es/components/popover/popover.js +247 -203
  229. package/dist/es/components/popover/popover.js.map +1 -1
  230. package/dist/es/components/progress-indicator/check-props.js +11 -8
  231. package/dist/es/components/progress-indicator/check-props.js.map +1 -1
  232. package/dist/es/components/progress-indicator/component.js +35 -0
  233. package/dist/es/components/progress-indicator/component.js.map +1 -0
  234. package/dist/es/components/progress-indicator/index.js +74 -71
  235. package/dist/es/components/progress-indicator/index.js.map +1 -1
  236. package/dist/es/components/progress-indicator/private/step-vertical.js +23 -20
  237. package/dist/es/components/progress-indicator/private/step-vertical.js.map +1 -1
  238. package/dist/es/components/radio/check-props.js +13 -0
  239. package/dist/es/components/radio/check-props.js.map +1 -0
  240. package/dist/es/components/radio/component.js +24 -0
  241. package/dist/es/components/radio/component.js.map +1 -0
  242. package/dist/es/components/radio/index.js +94 -80
  243. package/dist/es/components/radio/index.js.map +1 -1
  244. package/dist/es/components/setup-assistant/check-props.js +12 -7
  245. package/dist/es/components/setup-assistant/check-props.js.map +1 -1
  246. package/dist/es/components/setup-assistant/step.js +7 -7
  247. package/dist/es/components/setup-assistant/step.js.map +1 -1
  248. package/dist/es/components/simple-data-table/check-props.js +1 -1
  249. package/dist/es/components/simple-data-table/check-props.js.map +1 -1
  250. package/dist/es/components/simple-data-table/index.js +17 -10
  251. package/dist/es/components/simple-data-table/index.js.map +1 -1
  252. package/dist/es/components/slider/check-props.js +17 -0
  253. package/dist/es/components/slider/check-props.js.map +1 -0
  254. package/dist/es/components/slider/component.js +35 -0
  255. package/dist/es/components/slider/component.js.map +1 -0
  256. package/dist/es/components/slider/index.js +73 -54
  257. package/dist/es/components/slider/index.js.map +1 -1
  258. package/dist/es/components/spinner/check-props.js +13 -0
  259. package/dist/es/components/spinner/check-props.js.map +1 -0
  260. package/dist/es/components/spinner/component.js +17 -0
  261. package/dist/es/components/spinner/component.js.map +1 -0
  262. package/dist/es/components/spinner/index.js +43 -29
  263. package/dist/es/components/spinner/index.js.map +1 -1
  264. package/dist/es/components/split-view/check-props.js +2 -2
  265. package/dist/es/components/split-view/check-props.js.map +1 -1
  266. package/dist/es/components/split-view/index.js +8 -5
  267. package/dist/es/components/split-view/index.js.map +1 -1
  268. package/dist/es/components/split-view/listbox-check-props.js +13 -0
  269. package/dist/es/components/split-view/listbox-check-props.js.map +1 -0
  270. package/dist/es/components/split-view/listbox.js +41 -35
  271. package/dist/es/components/split-view/listbox.js.map +1 -1
  272. package/dist/es/components/split-view/private/list-item-content.js +1 -1
  273. package/dist/es/components/split-view/private/list-item-content.js.map +1 -1
  274. package/dist/es/components/split-view/private/list-item-with-content.js +6 -1
  275. package/dist/es/components/split-view/private/list-item-with-content.js.map +1 -1
  276. package/dist/es/components/split-view/private/toggle-button.js +2 -2
  277. package/dist/es/components/split-view/private/toggle-button.js.map +1 -1
  278. package/dist/es/components/tabs/panel.js.map +1 -1
  279. package/dist/es/components/textarea/check-props.js +11 -10
  280. package/dist/es/components/textarea/check-props.js.map +1 -1
  281. package/dist/es/components/textarea/index.js +59 -47
  282. package/dist/es/components/textarea/index.js.map +1 -1
  283. package/dist/es/components/tree/check-props.js +10 -9
  284. package/dist/es/components/tree/check-props.js.map +1 -1
  285. package/dist/es/components/tree/component.js +25 -0
  286. package/dist/es/components/tree/component.js.map +1 -0
  287. package/dist/es/components/tree/tree.js +83 -75
  288. package/dist/es/components/tree/tree.js.map +1 -1
  289. package/dist/es/components/trial-bar/check-props.js +13 -0
  290. package/dist/es/components/trial-bar/check-props.js.map +1 -0
  291. package/dist/es/components/trial-bar/component.js +24 -0
  292. package/dist/es/components/trial-bar/component.js.map +1 -0
  293. package/dist/es/components/trial-bar/index.js +27 -21
  294. package/dist/es/components/trial-bar/index.js.map +1 -1
  295. package/dist/es/components/utilities/menu-list/index.js +1 -0
  296. package/dist/es/components/utilities/menu-list/index.js.map +1 -1
  297. package/dist/es/components/utilities/menu-list/item.js +5 -3
  298. package/dist/es/components/utilities/menu-list/item.js.map +1 -1
  299. package/dist/es/components/utilities/utility-icon/index.js +2 -1
  300. package/dist/es/components/utilities/utility-icon/index.js.map +1 -1
  301. package/dist/es/components/vertical-navigation/index.js +17 -16
  302. package/dist/es/components/vertical-navigation/index.js.map +1 -1
  303. package/dist/es/components/vertical-navigation/private/item.js +1 -1
  304. package/dist/es/components/vertical-navigation/private/item.js.map +1 -1
  305. package/dist/es/components/welcome-mat/check-props.js +13 -0
  306. package/dist/es/components/welcome-mat/check-props.js.map +1 -0
  307. package/dist/es/components/welcome-mat/component.js +46 -0
  308. package/dist/es/components/welcome-mat/component.js.map +1 -0
  309. package/dist/es/components/welcome-mat/index.js +64 -57
  310. package/dist/es/components/welcome-mat/index.js.map +1 -1
  311. package/dist/es/components/welcome-mat/info-badge.js +19 -11
  312. package/dist/es/components/welcome-mat/info-badge.js.map +1 -1
  313. package/dist/es/utilities/warning/deprecated-property-value.js +18 -0
  314. package/dist/es/utilities/warning/deprecated-property-value.js.map +1 -0
  315. package/dist/types/components/accordion/panel.d.ts.map +1 -1
  316. package/dist/types/components/badge/index.d.ts +4 -2
  317. package/dist/types/components/badge/index.d.ts.map +1 -1
  318. package/dist/types/components/builder-header/check-props.d.ts +3 -0
  319. package/dist/types/components/builder-header/check-props.d.ts.map +1 -0
  320. package/dist/types/components/builder-header/toolbar.d.ts +6 -4
  321. package/dist/types/components/builder-header/toolbar.d.ts.map +1 -1
  322. package/dist/types/components/carousel/check-props.d.ts +3 -0
  323. package/dist/types/components/carousel/check-props.d.ts.map +1 -0
  324. package/dist/types/components/carousel/index.d.ts +9 -7
  325. package/dist/types/components/carousel/index.d.ts.map +1 -1
  326. package/dist/types/components/carousel/private/carousel-item.d.ts +4 -4
  327. package/dist/types/components/carousel/private/carousel-item.d.ts.map +1 -1
  328. package/dist/types/components/checkbox/check-props.d.ts +1 -0
  329. package/dist/types/components/checkbox/check-props.d.ts.map +1 -1
  330. package/dist/types/components/checkbox/index.d.ts +9 -3
  331. package/dist/types/components/checkbox/index.d.ts.map +1 -1
  332. package/dist/types/components/color-picker/color-picker.d.ts.map +1 -1
  333. package/dist/types/components/combobox/check-props.d.ts.map +1 -1
  334. package/dist/types/components/combobox/combobox.d.ts +29 -15
  335. package/dist/types/components/combobox/combobox.d.ts.map +1 -1
  336. package/dist/types/components/combobox/index.d.ts +1 -1
  337. package/dist/types/components/combobox/index.d.ts.map +1 -1
  338. package/dist/types/components/combobox/private/menu.d.ts +11 -6
  339. package/dist/types/components/combobox/private/menu.d.ts.map +1 -1
  340. package/dist/types/components/dynamic-icon/index.d.ts.map +1 -1
  341. package/dist/types/components/input/index.d.ts.map +1 -1
  342. package/dist/types/components/menu-dropdown/check-props.d.ts.map +1 -1
  343. package/dist/types/components/menu-dropdown/index.d.ts +1 -1
  344. package/dist/types/components/menu-dropdown/index.d.ts.map +1 -1
  345. package/dist/types/components/menu-dropdown/menu-dropdown.d.ts +22 -3
  346. package/dist/types/components/menu-dropdown/menu-dropdown.d.ts.map +1 -1
  347. package/dist/types/components/modal/check-props.d.ts +3 -0
  348. package/dist/types/components/modal/check-props.d.ts.map +1 -0
  349. package/dist/types/components/modal/index.d.ts +21 -13
  350. package/dist/types/components/modal/index.d.ts.map +1 -1
  351. package/dist/types/components/page-header/check-props.d.ts.map +1 -1
  352. package/dist/types/components/page-header/index.d.ts +15 -4
  353. package/dist/types/components/page-header/index.d.ts.map +1 -1
  354. package/dist/types/components/page-header/private/base/index.d.ts.map +1 -1
  355. package/dist/types/components/page-header/private/controls.d.ts +4 -4
  356. package/dist/types/components/page-header/private/controls.d.ts.map +1 -1
  357. package/dist/types/components/page-header/private/object-home/index.d.ts.map +1 -1
  358. package/dist/types/components/page-header/private/record-home/index.d.ts.map +1 -1
  359. package/dist/types/components/page-header/private/types.d.ts +6 -6
  360. package/dist/types/components/page-header/private/types.d.ts.map +1 -1
  361. package/dist/types/components/popover/popover.d.ts +24 -14
  362. package/dist/types/components/popover/popover.d.ts.map +1 -1
  363. package/dist/types/components/progress-indicator/check-props.d.ts.map +1 -1
  364. package/dist/types/components/progress-indicator/index.d.ts +7 -1
  365. package/dist/types/components/progress-indicator/index.d.ts.map +1 -1
  366. package/dist/types/components/progress-indicator/private/step-vertical.d.ts +4 -7
  367. package/dist/types/components/progress-indicator/private/step-vertical.d.ts.map +1 -1
  368. package/dist/types/components/radio/check-props.d.ts +1 -0
  369. package/dist/types/components/radio/check-props.d.ts.map +1 -1
  370. package/dist/types/components/radio/index.d.ts +10 -4
  371. package/dist/types/components/radio/index.d.ts.map +1 -1
  372. package/dist/types/components/setup-assistant/check-props.d.ts.map +1 -1
  373. package/dist/types/components/setup-assistant/step.d.ts +12 -6
  374. package/dist/types/components/setup-assistant/step.d.ts.map +1 -1
  375. package/dist/types/components/simple-data-table/check-props.d.ts.map +1 -1
  376. package/dist/types/components/simple-data-table/index.d.ts.map +1 -1
  377. package/dist/types/components/simple-data-table/types.d.ts +21 -8
  378. package/dist/types/components/simple-data-table/types.d.ts.map +1 -1
  379. package/dist/types/components/slider/check-props.d.ts +3 -0
  380. package/dist/types/components/slider/check-props.d.ts.map +1 -0
  381. package/dist/types/components/slider/index.d.ts +33 -10
  382. package/dist/types/components/slider/index.d.ts.map +1 -1
  383. package/dist/types/components/spinner/check-props.d.ts +3 -0
  384. package/dist/types/components/spinner/check-props.d.ts.map +1 -0
  385. package/dist/types/components/spinner/index.d.ts +18 -9
  386. package/dist/types/components/spinner/index.d.ts.map +1 -1
  387. package/dist/types/components/split-view/check-props.d.ts.map +1 -1
  388. package/dist/types/components/split-view/index.d.ts +9 -5
  389. package/dist/types/components/split-view/index.d.ts.map +1 -1
  390. package/dist/types/components/split-view/listbox-check-props.d.ts +3 -0
  391. package/dist/types/components/split-view/listbox-check-props.d.ts.map +1 -0
  392. package/dist/types/components/split-view/listbox.d.ts +19 -3
  393. package/dist/types/components/split-view/listbox.d.ts.map +1 -1
  394. package/dist/types/components/split-view/private/list-item-with-content.d.ts +10 -1
  395. package/dist/types/components/split-view/private/list-item-with-content.d.ts.map +1 -1
  396. package/dist/types/components/split-view/private/toggle-button.d.ts +3 -3
  397. package/dist/types/components/split-view/private/toggle-button.d.ts.map +1 -1
  398. package/dist/types/components/tabs/panel.d.ts +5 -1
  399. package/dist/types/components/tabs/panel.d.ts.map +1 -1
  400. package/dist/types/components/textarea/check-props.d.ts.map +1 -1
  401. package/dist/types/components/textarea/index.d.ts +23 -3
  402. package/dist/types/components/textarea/index.d.ts.map +1 -1
  403. package/dist/types/components/tree/check-props.d.ts.map +1 -1
  404. package/dist/types/components/tree/index.d.ts +1 -1
  405. package/dist/types/components/tree/index.d.ts.map +1 -1
  406. package/dist/types/components/tree/tree.d.ts +20 -8
  407. package/dist/types/components/tree/tree.d.ts.map +1 -1
  408. package/dist/types/components/tree/types.d.ts +7 -1
  409. package/dist/types/components/tree/types.d.ts.map +1 -1
  410. package/dist/types/components/trial-bar/check-props.d.ts +3 -0
  411. package/dist/types/components/trial-bar/check-props.d.ts.map +1 -0
  412. package/dist/types/components/trial-bar/index.d.ts +15 -7
  413. package/dist/types/components/trial-bar/index.d.ts.map +1 -1
  414. package/dist/types/components/utilities/menu-list/index.d.ts +5 -1
  415. package/dist/types/components/utilities/menu-list/index.d.ts.map +1 -1
  416. package/dist/types/components/utilities/menu-list/item.d.ts +3 -1
  417. package/dist/types/components/utilities/menu-list/item.d.ts.map +1 -1
  418. package/dist/types/components/utilities/utility-icon/index.d.ts.map +1 -1
  419. package/dist/types/components/vertical-navigation/index.d.ts +7 -7
  420. package/dist/types/components/vertical-navigation/index.d.ts.map +1 -1
  421. package/dist/types/components/welcome-mat/check-props.d.ts +3 -0
  422. package/dist/types/components/welcome-mat/check-props.d.ts.map +1 -0
  423. package/dist/types/components/welcome-mat/index.d.ts +13 -8
  424. package/dist/types/components/welcome-mat/index.d.ts.map +1 -1
  425. package/dist/types/components/welcome-mat/info-badge.d.ts +7 -3
  426. package/dist/types/components/welcome-mat/info-badge.d.ts.map +1 -1
  427. package/package.json +5 -3
@@ -1 +1 @@
1
- {"version":3,"file":"combobox.cjs","names":[],"sources":["../../../../components/combobox/combobox.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport React, {\n\tuseState,\n\tuseRef,\n\tuseCallback,\n\tuseEffect,\n\tuseContext,\n\ttype ReactNode,\n\ttype ReactElement,\n} from 'react';\n\nimport assign from 'lodash.assign';\nimport find from 'lodash.find';\nimport reject from 'lodash.reject';\nimport { dequal as isEqual } from 'dequal';\nimport findIndex from 'lodash.findindex';\nimport isFunction from 'lodash.isfunction';\n\nimport classNames from 'classnames';\n\nimport Button from '../button';\nimport Dialog from '../utilities/dialog';\nimport InnerInput from '../input/private/inner-input';\nimport InputIcon from '../icon/input-icon';\nimport Menu, {\n\ttype ComboboxOption,\n\ttype ComboboxItemOption,\n\ttype ComboboxActionOption,\n\ttype ComboboxDeselectOption,\n} from './private/menu';\nimport Label from '../forms/private/label';\nimport Popover from '../popover';\nimport SelectedListBox from '../pill-container/private/selected-listbox';\n\nimport FieldLevelHelpTooltip from '../tooltip/private/field-level-help-tooltip';\nimport KEYS from '../../utilities/key-code';\nimport KeyBuffer from '../../utilities/key-buffer';\nimport keyLetterMenuItemSelect from '../../utilities/key-letter-menu-item-select';\nimport mapKeyEventCallbacks from '../../utilities/key-callbacks';\nimport menuItemSelectScroll from '../../utilities/menu-item-select-scroll';\n\nimport checkProps from './check-props';\n\nimport { COMBOBOX } from '../../utilities/constants';\nimport type { SelectedListBoxOption } from '../pill-container/private/selected-listbox';\nimport generateId from '../../utilities/generate-id';\nimport componentDoc from './component.json';\nimport { IconSettingsContext } from '../icon-settings';\n\nlet currentOpenDropdown: { handleClose: () => void } | undefined;\nconst documentDefined = typeof document !== 'undefined';\n\n// ===== Types =====\n\nexport interface ComboboxAssistiveText {\n\tlabel?: string;\n\tloadingMenuItems?: string;\n\toptionSelectedInMenu?: string;\n\tpopoverLabel?: string;\n\tremoveSingleSelectedOption?: string;\n\tremovePill?: string;\n\tselectedListboxLabel?: string;\n}\n\nexport interface ComboboxLabels {\n\tdeselectOption?: string;\n\tlabel?: ReactNode | string;\n\tcancelButton?: string;\n\tdoneButton?: string;\n\tmultipleOptionsSelected?: string;\n\tnoOptionsFound?: ReactNode | string;\n\tplaceholder?: string;\n\tplaceholderReadOnly?: string;\n\tremovePillTitle?: string;\n\toptionDisabledTooltipLabel?: string;\n\tinputIconTitle?: string;\n}\n\nexport interface ComboboxEvents {\n\tonBlur?: (event: React.FocusEvent) => void;\n\tonChange?: (\n\t\tevent: React.ChangeEvent<HTMLInputElement>,\n\t\tdata: { value: string }\n\t) => void;\n\tonClose?: (\n\t\tevent: React.SyntheticEvent | undefined,\n\t\tdata: Record<string, unknown>\n\t) => void;\n\tonFocus?: (event: React.FocusEvent, data: Record<string, unknown>) => void;\n\tonOpen?: (\n\t\tevent: React.SyntheticEvent | undefined,\n\t\tdata: Record<string, unknown>\n\t) => void;\n\tonRequestClose?: (\n\t\tevent: React.SyntheticEvent,\n\t\tdata: Record<string, unknown>\n\t) => void;\n\tonRequestOpen?: () => void;\n\tonRequestRemoveSelectedOption?: (\n\t\tevent: React.SyntheticEvent,\n\t\tdata: { selection: ComboboxOption[] }\n\t) => void;\n\tonSelect?: (\n\t\tevent: React.SyntheticEvent,\n\t\tdata: { selection: ComboboxOption[] }\n\t) => void;\n\t/** Fires when an `optionsSearchEntity` or `optionsAddItem` row is chosen by\n\t * click or Enter. `value` is the current input text. */\n\tonSelectActionItem?: (\n\t\tevent: React.MouseEvent | React.KeyboardEvent,\n\t\tdata: { option: ComboboxActionItem; value: string }\n\t) => void;\n\tonSubmit?: (event: React.KeyboardEvent, data: { value: string }) => void;\n}\n\n/**\n * An action row in the menu: `optionsSearchEntity` items render above the\n * options, `optionsAddItem` items below them. Choosing one (click or Enter)\n * calls `events.onSelectActionItem` and closes the menu. Action rows are\n * commands, not records, so they never fire `onSelect` or enter the selection.\n */\nexport interface ComboboxActionItem {\n\tid?: string;\n\ticon?: ReactNode;\n\tlabel?: string | ((searchTerm: string) => ReactNode);\n\tdisabled?: boolean;\n\t/** @deprecated Use `events.onSelectActionItem`. If both are set, both are\n\t * called, this one first. */\n\tonClick?: (\n\t\tevent: React.MouseEvent | React.KeyboardEvent,\n\t\tdata: { option: ComboboxActionItem }\n\t) => void;\n}\n\n// A menu row built from a `ComboboxActionItem`. The original item is stored\n// under a module-private symbol, so consumer data in `options` (which may come\n// from untyped JS and carry arbitrary keys) can't impersonate one.\nconst ACTION_ITEM = Symbol('actionItem');\n\ntype ActionItemRow = ComboboxActionOption & {\n\t[ACTION_ITEM]: ComboboxActionItem;\n};\n\nconst isActionItemRow = (option: ComboboxOption): option is ActionItemRow =>\n\tACTION_ITEM in option;\n\nconst toActionItemRow = (\n\titem: ComboboxActionItem,\n\ttype: ActionItemRow['type']\n): ActionItemRow => ({\n\tid: item.id || '',\n\ticon: item.icon,\n\tlabel: item.label,\n\tdisabled: item.disabled,\n\ttype,\n\t[ACTION_ITEM]: item,\n});\n\ninterface ComboboxBaseProps {\n\t/** aria-describedby attribute */\n\t'aria-describedby'?: string;\n\t/** CSS classes for combobox container */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** CSS classes for top level container */\n\tclassNameContainer?: string | string[] | Record<string, boolean>;\n\t/** CSS classes for dropdown menu */\n\tclassNameMenu?: string | string[] | Record<string, boolean>;\n\t/** CSS classes for menu sub header */\n\tclassNameMenuSubHeader?: string | string[] | Record<string, boolean>;\n\t/** Default input value for uncontrolled usage */\n\tdefaultValue?: string;\n\t/** Whether component is disabled */\n\tdisabled?: boolean;\n\t/** Entity combobox for grouped comboboxes */\n\tentityCombobox?: ReactNode;\n\t/** Error text to display */\n\terrorText?: string;\n\t/** Event callbacks */\n\tevents?: ComboboxEvents;\n\t/** Field level help tooltip */\n\tfieldLevelHelpTooltip?: ReactNode;\n\t/** Whether to show deselect option */\n\thasDeselect?: boolean;\n\t/** Whether to show input spinner */\n\thasInputSpinner?: boolean;\n\t/** Whether to show menu spinner */\n\thasMenuSpinner?: boolean;\n\t/** Whether to use static alignment */\n\thasStaticAlignment?: boolean;\n\t/** HTML id */\n\tid?: string;\n\t/** Sets dialog width inheritance */\n\tinheritWidthOf?: 'target' | 'menu' | 'none';\n\t/** Custom input component */\n\tinput?: ReactElement;\n\t/** Callback to get input ref */\n\tinputRef?: (ref: HTMLInputElement | null) => void;\n\t/** Whether the dropdown is open (controlled) */\n\tisOpen?: boolean;\n\t/** Text labels */\n\tlabels?: ComboboxLabels;\n\t/** Menu item visible length */\n\tmenuItemVisibleLength?: 5 | 7 | 10;\n\t/** Menu max width */\n\tmenuMaxWidth?: string;\n\t/** Menu position */\n\tmenuPosition?: 'absolute' | 'overflowBoundaryElement' | 'relative';\n\t/** Whether multiple selection is allowed */\n\tmultiple?: boolean;\n\t/** Custom menu item renderer */\n\tonRenderMenuItem?: React.ComponentType<{\n\t\tassistiveText?: ComboboxAssistiveText;\n\t\tselected: boolean;\n\t\t/** Custom renderers only receive selectable rows */\n\t\toption: ComboboxItemOption | ComboboxDeselectOption;\n\t}>;\n\t/** Action items shown below the options, such as \"New Account\" */\n\toptionsAddItem?: ComboboxActionItem[];\n\t/** Action items shown above the options, such as \"Search in Accounts\" */\n\toptionsSearchEntity?: ComboboxActionItem[];\n\t/** Whether only predefined options are allowed */\n\tpredefinedOptionsOnly?: boolean;\n\t/** Whether field is required */\n\trequired?: boolean;\n\t/** Selected options */\n\tselection: ComboboxOption[];\n\t/** Callback to get selected listbox ref */\n\tselectedListboxRef?: (ref: HTMLUListElement | null) => void;\n\t/** Whether single input is disabled */\n\tsingleInputDisabled?: boolean;\n\t/** Tooltip for disabled menu items */\n\ttooltipMenuItemDisabled?: ReactElement;\n\t/** Input value (controlled) */\n\tvalue?: string;\n\t/** @deprecated Use menuItem instead */\n\tmenuItem?: React.ComponentType<{\n\t\tassistiveText?: ComboboxAssistiveText;\n\t\tselected: boolean;\n\t\t/** Custom renderers only receive selectable rows */\n\t\toption: ComboboxItemOption | ComboboxDeselectOption;\n\t}>;\n}\n\n/**\n * `variant` decides where the menu content comes from: `options` for the\n * listbox variants, or a custom `popover` dialog.\n */\nexport type ComboboxVariantProps =\n\t| {\n\t\t\t/** Listbox variants. Defaults to `base`. */\n\t\t\tvariant?: 'base' | 'inline-listbox' | 'readonly';\n\t\t\t/** Assistive text for accessibility */\n\t\t\tassistiveText?: ComboboxAssistiveText;\n\t\t\t/** Menu options */\n\t\t\toptions: ComboboxOption[];\n\t\t\tpopover?: never;\n\t }\n\t| {\n\t\t\t/** Custom dialog content instead of a listbox */\n\t\t\tvariant: 'popover';\n\t\t\t/** Assistive text for accessibility. `popoverLabel` labels the dialog. */\n\t\t\tassistiveText: ComboboxAssistiveText & { popoverLabel: string };\n\t\t\toptions?: never;\n\t\t\t/** Popover component rendered as the dialog */\n\t\t\tpopover: ReactElement;\n\t };\n\nexport type ComboboxProps = ComboboxBaseProps & ComboboxVariantProps;\n\n// ===== Default Props =====\n\nconst defaultAssistiveText: Required<ComboboxAssistiveText> = {\n\tlabel: '',\n\tloadingMenuItems: 'Loading',\n\toptionSelectedInMenu: 'Current Selection:',\n\tpopoverLabel: '',\n\tremoveSingleSelectedOption: 'Remove selected option',\n\tremovePill: ', Press delete or backspace to remove',\n\tselectedListboxLabel: 'Selected Options:',\n};\n\nconst defaultLabels: Required<ComboboxLabels> = {\n\tdeselectOption: 'None',\n\tlabel: '',\n\tcancelButton: 'Cancel',\n\tdoneButton: 'Done',\n\tmultipleOptionsSelected: '',\n\tnoOptionsFound: 'No matches found.',\n\tplaceholder: '',\n\tplaceholderReadOnly: 'Select an Option',\n\tremovePillTitle: 'Remove',\n\toptionDisabledTooltipLabel: 'This option is disabled.',\n\tinputIconTitle: '',\n};\n\nconst defaultEvents: ComboboxEvents = {};\n\n// ===== Component =====\n\nconst Combobox: React.FC<ComboboxProps> = (props) => {\n\tconst {\n\t\tassistiveText: assistiveTextProp = {},\n\t\t'aria-describedby': ariaDescribedby,\n\t\tclassName,\n\t\tclassNameContainer,\n\t\tclassNameMenu,\n\t\tclassNameMenuSubHeader,\n\t\tdefaultValue,\n\t\tdisabled,\n\t\tentityCombobox,\n\t\terrorText,\n\t\tevents: eventsProp = {},\n\t\tfieldLevelHelpTooltip,\n\t\thasDeselect,\n\t\thasInputSpinner,\n\t\thasMenuSpinner,\n\t\thasStaticAlignment,\n\t\tid: idProp,\n\t\tinheritWidthOf = 'target',\n\t\tinput,\n\t\tinputRef: inputRefCallback,\n\t\tisOpen: isOpenProp,\n\t\tlabels: labelsProp = {},\n\t\tmenuItemVisibleLength,\n\t\tmenuMaxWidth,\n\t\tmenuPosition = 'absolute',\n\t\tmultiple,\n\t\tonRenderMenuItem,\n\t\toptions = [],\n\t\toptionsAddItem = [],\n\t\toptionsSearchEntity = [],\n\t\tpopover,\n\t\tpredefinedOptionsOnly,\n\t\trequired = false,\n\t\tselection = [],\n\t\tselectedListboxRef: selectedListboxRefCallback,\n\t\tsingleInputDisabled = false,\n\t\ttooltipMenuItemDisabled,\n\t\tvalue,\n\t\tvariant = 'base',\n\t\tmenuItem,\n\t} = props;\n\n\t// Merge with defaults\n\tconst assistiveText = assign({}, defaultAssistiveText, assistiveTextProp);\n\tconst labels = assign({}, defaultLabels, labelsProp);\n\tconst events = assign({}, defaultEvents, eventsProp);\n\n\t// Context\n\tconst iconSettingsContext = useContext(IconSettingsContext);\n\n\t// Refs\n\tconst inputRef = useRef<HTMLInputElement | null>(null);\n\tconst menuRef = useRef<HTMLUListElement | null>(null);\n\tconst selectedListboxRef = useRef<HTMLUListElement | null>(null);\n\tconst activeSelectedOptionRef = useRef<HTMLElement | null>(null);\n\tconst buttonRef = useRef<HTMLButtonElement | null>(null);\n\tconst menuKeyBuffer = useRef(new KeyBuffer());\n\n\t// Generated IDs\n\tconst generatedId = useRef(generateId());\n\tconst generatedErrorId = useRef(generateId());\n\tconst getId = useCallback(() => idProp || generatedId.current, [idProp]);\n\tconst deselectId = `${getId()}-deselect`;\n\n\t// State\n\tconst [activeOption, setActiveOption] = useState<ComboboxOption | undefined>(\n\t\tundefined\n\t);\n\tconst [activeOptionIndex, setActiveOptionIndex] = useState(-1);\n\tconst [activeSelectedOption, setActiveSelectedOption] = useState<\n\t\tComboboxOption | undefined\n\t>(selection?.[0]);\n\tconst [activeSelectedOptionIndex, setActiveSelectedOptionIndex] = useState(0);\n\tconst [listboxHasFocus, setListboxHasFocus] = useState(false);\n\tconst [isOpenState, setIsOpenState] = useState(\n\t\ttypeof isOpenProp === 'boolean' ? isOpenProp : false\n\t);\n\tconst [inputRendered, setInputRendered] = useState(false);\n\n\t// Check props on mount\n\tuseEffect(() => {\n\t\tcheckProps(\n\t\t\tCOMBOBOX,\n\t\t\tprops as unknown as Record<string, unknown>,\n\t\t\tcomponentDoc\n\t\t);\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, []);\n\n\t// Derived state\n\tconst getIsOpen = useCallback(() => {\n\t\treturn !!(typeof isOpenProp === 'boolean' ? isOpenProp : isOpenState);\n\t}, [isOpenProp, isOpenState]);\n\n\tconst getIsActiveOption = useCallback(() => {\n\t\treturn activeOption && activeOptionIndex !== -1;\n\t}, [activeOption, activeOptionIndex]);\n\n\tconst getErrorId = useCallback(() => {\n\t\treturn ariaDescribedby || (errorText && generatedErrorId.current);\n\t}, [ariaDescribedby, errorText]);\n\n\t// Build options list\n\tconst getOptions = useCallback(() => {\n\t\tconst deselectOption: ComboboxOption = {\n\t\t\tid: deselectId,\n\t\t\tlabel: labels.deselectOption,\n\t\t\tvalue: '',\n\t\t\ttype: 'deselect',\n\t\t};\n\n\t\tconst localOptionsSearchEntity = optionsSearchEntity.map((item) =>\n\t\t\ttoActionItemRow(item, 'header')\n\t\t);\n\n\t\tconst localOptionsAddItem = optionsAddItem.map((item) =>\n\t\t\ttoActionItemRow(item, 'footer')\n\t\t);\n\n\t\treturn [\n\t\t\t...(localOptionsSearchEntity.length > 0 ? localOptionsSearchEntity : []),\n\t\t\t...(hasDeselect ? [deselectOption] : []),\n\t\t\t...(options && options.length > 0 ? options : []),\n\t\t\t...(localOptionsAddItem.length > 0 ? localOptionsAddItem : []),\n\t\t];\n\t}, [\n\t\tdeselectId,\n\t\tlabels.deselectOption,\n\t\toptionsSearchEntity,\n\t\toptionsAddItem,\n\t\thasDeselect,\n\t\toptions,\n\t]);\n\n\tconst isSelected = useCallback(\n\t\t({\n\t\t\tselection: sel,\n\t\t\toption,\n\t\t}: {\n\t\t\tselection: ComboboxOption[];\n\t\t\toption: ComboboxOption;\n\t\t}) => {\n\t\t\treturn !!find(sel, option);\n\t\t},\n\t\t[]\n\t);\n\n\t// Get new active option index (for navigation)\n\tconst getNewActiveOptionIndex = useCallback(\n\t\t({\n\t\t\tactiveOptionIndex: currentIndex,\n\t\t\toffset,\n\t\t\toptions: opts,\n\t\t}: {\n\t\t\tactiveOptionIndex: number;\n\t\t\toffset: number;\n\t\t\toptions: ComboboxOption[];\n\t\t}) => {\n\t\t\tconst nextIndex = currentIndex + offset;\n\t\t\tconst skipIndex =\n\t\t\t\topts.length > nextIndex &&\n\t\t\t\tnextIndex >= 0 &&\n\t\t\t\topts[nextIndex].type === 'separator';\n\t\t\tconst newIndex = skipIndex ? nextIndex + offset : nextIndex;\n\t\t\tconst hasNewIndex = opts.length > nextIndex && nextIndex >= 0;\n\t\t\treturn hasNewIndex ? newIndex : currentIndex;\n\t\t},\n\t\t[]\n\t);\n\n\t// ===== Event Handlers =====\n\n\tconst handleClose = useCallback(\n\t\t(event?: React.SyntheticEvent, { trigger }: { trigger?: string } = {}) => {\n\t\t\tconst isOpen = getIsOpen();\n\n\t\t\tif (isOpen) {\n\t\t\t\tif (\n\t\t\t\t\tcurrentOpenDropdown &&\n\t\t\t\t\tcurrentOpenDropdown.handleClose === handleClose\n\t\t\t\t) {\n\t\t\t\t\tcurrentOpenDropdown = undefined;\n\t\t\t\t}\n\n\t\t\t\tsetActiveOption(undefined);\n\t\t\t\tsetActiveOptionIndex(-1);\n\t\t\t\tsetIsOpenState(false);\n\n\t\t\t\tif (variant === 'popover' && trigger === 'cancel') {\n\t\t\t\t\tconst popoverProps = popover?.props as\n\t\t\t\t\t\t| { onClose?: (event: unknown, data: { trigger: string }) => void }\n\t\t\t\t\t\t| undefined;\n\t\t\t\t\tif (popoverProps?.onClose) {\n\t\t\t\t\t\tpopoverProps.onClose(event, { trigger });\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (events.onClose) {\n\t\t\t\t\tevents.onClose(event, {});\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t[getIsOpen, variant, popover, events]\n\t);\n\n\tconst handleOpen = useCallback(\n\t\t(event?: React.SyntheticEvent, data?: Record<string, unknown>) => {\n\t\t\tconst isOpen = getIsOpen();\n\n\t\t\tif (!isOpen) {\n\t\t\t\tif (\n\t\t\t\t\tcurrentOpenDropdown &&\n\t\t\t\t\tisFunction(currentOpenDropdown.handleClose)\n\t\t\t\t) {\n\t\t\t\t\tcurrentOpenDropdown.handleClose();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcurrentOpenDropdown = { handleClose };\n\n\t\t\t\tsetIsOpenState(true);\n\n\t\t\t\tif (events.onOpen) {\n\t\t\t\t\tevents.onOpen(event, data || {});\n\t\t\t\t}\n\n\t\t\t\tif (variant === 'readonly') {\n\t\t\t\t\tconst opts = getOptions();\n\t\t\t\t\tconst idx = findIndex(opts, (item) => isEqual(item, selection[0]));\n\n\t\t\t\t\tsetActiveOptionIndex(idx);\n\t\t\t\t\tsetActiveOption(selection[0]);\n\n\t\t\t\t\tif (menuRef.current !== null) {\n\t\t\t\t\t\tmenuItemSelectScroll({\n\t\t\t\t\t\t\tcontainer: menuRef.current,\n\t\t\t\t\t\t\tfocusedIndex: idx,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t[getIsOpen, handleClose, events, variant, getOptions, selection]\n\t);\n\n\tconst handleRequestClose = useCallback(\n\t\t(event: React.SyntheticEvent, data: Record<string, unknown>) => {\n\t\t\tif (events.onRequestClose) {\n\t\t\t\tevents.onRequestClose(event, data);\n\t\t\t}\n\t\t\tif (getIsOpen()) {\n\t\t\t\thandleClose(event, { trigger: 'cancel' });\n\t\t\t}\n\t\t},\n\t\t[events, getIsOpen, handleClose]\n\t);\n\n\tconst openDialog = useCallback(() => {\n\t\tif (events.onRequestOpen) {\n\t\t\tevents.onRequestOpen();\n\t\t} else {\n\t\t\tsetIsOpenState(true);\n\t\t}\n\t}, [events]);\n\n\tconst requestOpenMenu = useCallback(() => {\n\t\tconst isInlineSingleSelectionAndIsNotSelected =\n\t\t\t!multiple && selection.length === 0 && variant === 'inline-listbox';\n\n\t\tif (\n\t\t\tisInlineSingleSelectionAndIsNotSelected ||\n\t\t\tmultiple ||\n\t\t\tvariant === 'readonly'\n\t\t) {\n\t\t\topenDialog();\n\t\t}\n\t}, [multiple, selection.length, variant, openDialog]);\n\n\tconst handleClickOutside = useCallback(\n\t\t(event: MouseEvent | TouchEvent) => {\n\t\t\thandleRequestClose(event as unknown as React.SyntheticEvent, {});\n\t\t},\n\t\t[handleRequestClose]\n\t);\n\n\tconst handleSelect = useCallback(\n\t\t(\n\t\t\tevent: React.SyntheticEvent,\n\t\t\t{\n\t\t\t\tselection: sel,\n\t\t\t\toption,\n\t\t\t}: { selection: ComboboxOption[]; option: ComboboxOption }\n\t\t) => {\n\t\t\tif (isActionItemRow(option)) {\n\t\t\t\tconst actionItem = option[ACTION_ITEM];\n\t\t\t\tconst actionEvent = event as React.MouseEvent | React.KeyboardEvent;\n\t\t\t\tactionItem.onClick?.(actionEvent, { option: actionItem });\n\t\t\t\tevents.onSelectActionItem?.(actionEvent, {\n\t\t\t\t\toption: actionItem,\n\t\t\t\t\tvalue: inputRef.current?.value ?? '',\n\t\t\t\t});\n\t\t\t\thandleClose();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet newSelection: ComboboxOption[];\n\t\t\tconst selected = isSelected({ selection: sel, option });\n\t\t\tconst singleSelectAndSelectedWasNotClicked = !multiple && !selected;\n\t\t\tconst multiSelectAndSelectedWasNotClicked = multiple && !selected;\n\t\t\tconst deselectWasClicked = option.id === deselectId;\n\n\t\t\tif (deselectWasClicked) {\n\t\t\t\tnewSelection = [];\n\t\t\t} else if (singleSelectAndSelectedWasNotClicked) {\n\t\t\t\tnewSelection = [option];\n\t\t\t} else if (multiSelectAndSelectedWasNotClicked) {\n\t\t\t\tnewSelection = [...selection, option];\n\t\t\t} else {\n\t\t\t\tnewSelection = reject(selection, option);\n\t\t\t}\n\n\t\t\tif (events.onSelect) {\n\t\t\t\tevents.onSelect(event, { selection: newSelection });\n\t\t\t}\n\n\t\t\thandleClose();\n\t\t},\n\t\t[isSelected, multiple, deselectId, selection, events, handleClose]\n\t);\n\n\tconst handleInputBlur = useCallback(\n\t\t(event: React.FocusEvent) => {\n\t\t\tsetTimeout(() => {\n\t\t\t\tconst activeElement = documentDefined ? document.activeElement : null;\n\t\t\t\tif (\n\t\t\t\t\tactiveElement &&\n\t\t\t\t\tactiveElement.tagName === 'DIV' &&\n\t\t\t\t\tactiveElement.id === `${getId()}-listbox`\n\t\t\t\t) {\n\t\t\t\t\tif (inputRef.current) {\n\t\t\t\t\t\tinputRef.current.focus();\n\t\t\t\t\t}\n\t\t\t\t} else if (!popover) {\n\t\t\t\t\thandleClose(event);\n\t\t\t\t}\n\t\t\t}, 200);\n\n\t\t\tif (events.onBlur) {\n\t\t\t\tevents.onBlur(event);\n\t\t\t}\n\t\t},\n\t\t[getId, popover, handleClose, events]\n\t);\n\n\tconst handleInputChange = useCallback(\n\t\t(event: React.ChangeEvent<HTMLInputElement>) => {\n\t\t\trequestOpenMenu();\n\t\t\tif (events.onChange) {\n\t\t\t\tevents.onChange(event, { value: event.target.value });\n\t\t\t}\n\t\t},\n\t\t[requestOpenMenu, events]\n\t);\n\n\tconst handleInputFocus = useCallback(\n\t\t(event: React.FocusEvent) => {\n\t\t\tif (events.onFocus) {\n\t\t\t\tevents.onFocus(event, {});\n\t\t\t}\n\t\t},\n\t\t[events]\n\t);\n\n\tconst handleInputSubmit = useCallback(\n\t\t(event: React.KeyboardEvent) => {\n\t\t\tif (activeOption === undefined && activeOptionIndex === -1) {\n\t\t\t\tif (!isOpenState) {\n\t\t\t\t\tif (!event.shiftKey) {\n\t\t\t\t\t\topenDialog();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\thandleRequestClose(event, {});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (activeOption?.disabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Legacy: `type: 'header' | 'footer'` rows passed directly in `options`\n\t\t\t// keep their pre-v11 Enter behavior of calling `option.onClick`.\n\t\t\tif (\n\t\t\t\tactiveOption &&\n\t\t\t\t!isActionItemRow(activeOption) &&\n\t\t\t\t(activeOption.type === 'header' || activeOption.type === 'footer')\n\t\t\t) {\n\t\t\t\tactiveOption.onClick?.(event as unknown as React.MouseEvent);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (getIsActiveOption()) {\n\t\t\t\thandleSelect(event, {\n\t\t\t\t\toption: activeOption!,\n\t\t\t\t\tselection,\n\t\t\t\t});\n\t\t\t} else if (\n\t\t\t\t!predefinedOptionsOnly &&\n\t\t\t\t(event.target as HTMLInputElement).value !== '' &&\n\t\t\t\tevents.onSubmit\n\t\t\t) {\n\t\t\t\tevents.onSubmit(event, {\n\t\t\t\t\tvalue: (event.target as HTMLInputElement).value,\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\t[\n\t\t\tactiveOption,\n\t\t\tactiveOptionIndex,\n\t\t\tisOpenState,\n\t\t\topenDialog,\n\t\t\thandleRequestClose,\n\t\t\tgetIsActiveOption,\n\t\t\thandleSelect,\n\t\t\tselection,\n\t\t\tpredefinedOptionsOnly,\n\t\t\tevents,\n\t\t]\n\t);\n\n\tconst handleNavigateListboxMenu = useCallback(\n\t\t(\n\t\t\tevent: React.KeyboardEvent,\n\t\t\t{ direction }: { direction: 'next' | 'previous' }\n\t\t) => {\n\t\t\tconst offsets = { next: 1, previous: -1 };\n\t\t\tconst opts = getOptions();\n\t\t\tconst newIndex = getNewActiveOptionIndex({\n\t\t\t\tactiveOptionIndex,\n\t\t\t\toffset: offsets[direction],\n\t\t\t\toptions: opts,\n\t\t\t});\n\n\t\t\tif (getIsOpen() && menuRef.current) {\n\t\t\t\tmenuItemSelectScroll({\n\t\t\t\t\tcontainer: menuRef.current,\n\t\t\t\t\tfocusedIndex: newIndex,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tsetActiveOption(opts[newIndex]);\n\t\t\tsetActiveOptionIndex(newIndex);\n\t\t},\n\t\t[getOptions, getNewActiveOptionIndex, activeOptionIndex, getIsOpen]\n\t);\n\n\tconst handleNavigateSelectedListbox = useCallback(\n\t\t(\n\t\t\tevent: React.SyntheticEvent,\n\t\t\t{ direction }: { direction: 'next' | 'previous' }\n\t\t) => {\n\t\t\tconst offsets = { next: 1, previous: -1 };\n\t\t\tconst isLastOptionAndRightIsPressed =\n\t\t\t\tactiveSelectedOptionIndex + 1 === selection.length &&\n\t\t\t\tdirection === 'next';\n\t\t\tconst isFirstOptionAndLeftIsPressed =\n\t\t\t\tactiveSelectedOptionIndex === 0 && direction === 'previous';\n\n\t\t\tif (isLastOptionAndRightIsPressed) {\n\t\t\t\tsetActiveSelectedOption(selection[0]);\n\t\t\t\tsetActiveSelectedOptionIndex(0);\n\t\t\t\tsetListboxHasFocus(true);\n\t\t\t} else if (isFirstOptionAndLeftIsPressed) {\n\t\t\t\tsetActiveSelectedOption(selection[selection.length - 1]);\n\t\t\t\tsetActiveSelectedOptionIndex(selection.length - 1);\n\t\t\t\tsetListboxHasFocus(true);\n\t\t\t} else {\n\t\t\t\tconst newIndex = getNewActiveOptionIndex({\n\t\t\t\t\tactiveOptionIndex: activeSelectedOptionIndex,\n\t\t\t\t\toffset: offsets[direction],\n\t\t\t\t\toptions: selection,\n\t\t\t\t});\n\t\t\t\tsetActiveSelectedOption(selection[newIndex]);\n\t\t\t\tsetActiveSelectedOptionIndex(newIndex);\n\t\t\t\tsetListboxHasFocus(true);\n\t\t\t}\n\t\t},\n\t\t[activeSelectedOptionIndex, selection, getNewActiveOptionIndex]\n\t);\n\n\tconst handleKeyDownDown = useCallback(\n\t\t(event: React.KeyboardEvent) => {\n\t\t\tif (!event.shiftKey) {\n\t\t\t\topenDialog();\n\t\t\t}\n\n\t\t\tif (variant !== 'popover') {\n\t\t\t\thandleNavigateListboxMenu(event, { direction: 'next' });\n\t\t\t}\n\t\t},\n\t\t[openDialog, variant, handleNavigateListboxMenu]\n\t);\n\n\tconst handleKeyDownUp = useCallback(\n\t\t(event: React.KeyboardEvent) => {\n\t\t\tif (!event.shiftKey && getIsOpen()) {\n\t\t\t\thandleNavigateListboxMenu(event, { direction: 'previous' });\n\t\t\t}\n\t\t},\n\t\t[getIsOpen, handleNavigateListboxMenu]\n\t);\n\n\tconst handleKeyDownTab = useCallback(() => {\n\t\tif (selectedListboxRef.current) {\n\t\t\tsetListboxHasFocus(true);\n\t\t}\n\t}, []);\n\n\tconst handleKeyDownOther = useCallback(\n\t\t(event: React.KeyboardEvent) => {\n\t\t\tconst opts = getOptions();\n\t\t\tconst newActiveOptionIndex = keyLetterMenuItemSelect({\n\t\t\t\tkey: event.key,\n\t\t\t\tkeyBuffer: menuKeyBuffer.current,\n\t\t\t\tkeyCode: event.keyCode,\n\t\t\t\toptions: opts,\n\t\t\t});\n\n\t\t\tif (newActiveOptionIndex !== undefined) {\n\t\t\t\tif (getIsOpen() && menuRef.current) {\n\t\t\t\t\tmenuItemSelectScroll({\n\t\t\t\t\t\tcontainer: menuRef.current,\n\t\t\t\t\t\tfocusedIndex: newActiveOptionIndex,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tsetActiveOption(opts[newActiveOptionIndex]);\n\t\t\t\tsetActiveOptionIndex(newActiveOptionIndex);\n\t\t\t}\n\t\t},\n\t\t[getOptions, getIsOpen]\n\t);\n\n\tconst handleKeyDown = useCallback(\n\t\t(event: React.KeyboardEvent) => {\n\t\t\tconst callbacks: Record<\n\t\t\t\tnumber | string,\n\t\t\t\t| {\n\t\t\t\t\t\tcallback: (e: React.KeyboardEvent) => void;\n\t\t\t\t\t\tstopPropagation?: boolean;\n\t\t\t\t }\n\t\t\t\t| undefined\n\t\t\t> = {\n\t\t\t\t[KEYS.DOWN]: { callback: handleKeyDownDown },\n\t\t\t\t[KEYS.ENTER]: { callback: handleInputSubmit },\n\t\t\t\t[KEYS.ESCAPE]: {\n\t\t\t\t\tcallback: handleClose as (e: React.KeyboardEvent) => void,\n\t\t\t\t},\n\t\t\t\t[KEYS.UP]: { callback: handleKeyDownUp },\n\t\t\t};\n\n\t\t\tif (variant === 'readonly') {\n\t\t\t\tif (selection.length > 2) {\n\t\t\t\t\tcallbacks[KEYS.TAB] = { callback: handleKeyDownTab };\n\t\t\t\t} else {\n\t\t\t\t\tcallbacks[KEYS.TAB] = undefined;\n\t\t\t\t}\n\t\t\t\tcallbacks.other = {\n\t\t\t\t\tcallback: handleKeyDownOther,\n\t\t\t\t\tstopPropagation: false,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst stopPropagation = getIsOpen();\n\n\t\t\tmapKeyEventCallbacks(event, { callbacks, stopPropagation });\n\t\t},\n\t\t[\n\t\t\thandleKeyDownDown,\n\t\t\thandleInputSubmit,\n\t\t\thandleClose,\n\t\t\thandleKeyDownUp,\n\t\t\tvariant,\n\t\t\tselection.length,\n\t\t\thandleKeyDownTab,\n\t\t\thandleKeyDownOther,\n\t\t\tgetIsOpen,\n\t\t]\n\t);\n\n\tconst handleBlurPill = useCallback(() => {\n\t\tsetListboxHasFocus(false);\n\t}, []);\n\n\tconst handlePillFocus = useCallback(\n\t\t(\n\t\t\tevent: React.FocusEvent,\n\t\t\t{ option, index }: { option: ComboboxOption; index: number }\n\t\t) => {\n\t\t\tif (!listboxHasFocus) {\n\t\t\t\tsetActiveSelectedOption(option);\n\t\t\t\tsetActiveSelectedOptionIndex(index);\n\t\t\t\tsetListboxHasFocus(true);\n\t\t\t}\n\t\t},\n\t\t[listboxHasFocus]\n\t);\n\n\tconst handleRemoveSelectedOption = useCallback(\n\t\t(\n\t\t\tevent: React.SyntheticEvent,\n\t\t\t{ option, index }: { option: ComboboxOption; index?: number }\n\t\t) => {\n\t\t\tevent.preventDefault();\n\t\t\tconst onlyOnePillAndInputExists = selection.length === 1;\n\t\t\tconst isReadOnlyAndTwoPillsExists =\n\t\t\t\tselection.length === 2 && variant === 'readonly' && multiple;\n\t\t\tconst lastPillWasRemoved =\n\t\t\t\tindex !== undefined && index + 1 === selection.length;\n\n\t\t\tif (\n\t\t\t\t(onlyOnePillAndInputExists || isReadOnlyAndTwoPillsExists) &&\n\t\t\t\tinputRef.current\n\t\t\t) {\n\t\t\t\tinputRef.current.focus();\n\t\t\t} else if (lastPillWasRemoved && index !== undefined) {\n\t\t\t\tsetActiveSelectedOption(selection[index - 1]);\n\t\t\t\tsetActiveSelectedOptionIndex(index - 1);\n\t\t\t\tsetListboxHasFocus(true);\n\t\t\t} else if (index !== undefined) {\n\t\t\t\tsetActiveSelectedOption(selection[index + 1]);\n\t\t\t\tsetActiveSelectedOptionIndex(index);\n\t\t\t\tsetListboxHasFocus(true);\n\t\t\t}\n\n\t\t\tif (events.onRequestRemoveSelectedOption) {\n\t\t\t\tevents.onRequestRemoveSelectedOption(event, {\n\t\t\t\t\tselection: reject(selection, option),\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\t[selection, variant, multiple, events]\n\t);\n\n\tconst handleRequestFocusSelectedListbox = useCallback(\n\t\t(event: React.SyntheticEvent, { ref }: { ref: HTMLElement | null }) => {\n\t\t\tif (ref) {\n\t\t\t\tactiveSelectedOptionRef.current = ref;\n\t\t\t\tactiveSelectedOptionRef.current.focus();\n\t\t\t}\n\t\t},\n\t\t[]\n\t);\n\n\t// ===== Refs =====\n\n\tconst setInputRefCallback = useCallback(\n\t\t(component: HTMLInputElement | null) => {\n\t\t\tinputRef.current = component;\n\t\t\tif (!inputRendered) {\n\t\t\t\tsetInputRendered(true);\n\t\t\t}\n\t\t\tif (inputRefCallback) {\n\t\t\t\tinputRefCallback(component);\n\t\t\t}\n\t\t},\n\t\t[inputRendered, inputRefCallback]\n\t);\n\n\tconst setSelectedListboxRefCallback = useCallback(\n\t\t(ref: HTMLUListElement | null) => {\n\t\t\tselectedListboxRef.current = ref;\n\t\t\tif (selectedListboxRefCallback) {\n\t\t\t\tselectedListboxRefCallback(ref);\n\t\t\t}\n\t\t},\n\t\t[selectedListboxRefCallback]\n\t);\n\n\tconst setMenuRefCallback = useCallback((ref: HTMLUListElement | null) => {\n\t\tmenuRef.current = ref;\n\t}, []);\n\n\tconst getTargetElement = useCallback(() => inputRef.current, []);\n\n\t// ===== Effects =====\n\n\t// Sync controlled isOpen prop\n\tuseEffect(() => {\n\t\tif (typeof isOpenProp === 'boolean') {\n\t\t\tsetIsOpenState(isOpenProp);\n\t\t\tif (!isOpenProp) {\n\t\t\t\tsetActiveOption(undefined);\n\t\t\t\tsetActiveOptionIndex(-1);\n\t\t\t}\n\t\t}\n\t}, [isOpenProp]);\n\n\t// Handle options change - maintain active highlight\n\tuseEffect(() => {\n\t\tconst opts = getOptions();\n\t\tif (activeOption) {\n\t\t\tconst index = findIndex(opts, (item) => isEqual(item, activeOption));\n\t\t\tif (index !== -1) {\n\t\t\t\tsetActiveOptionIndex(index);\n\t\t\t} else {\n\t\t\t\tsetActiveOption(undefined);\n\t\t\t\tsetActiveOptionIndex(-1);\n\t\t\t}\n\t\t}\n\t}, [options, getOptions, activeOption]);\n\n\t// Handle selection change - keep the active selected option and its roving\n\t// tabindex in sync with `selection`. Besides seeding the initial active\n\t// pill, this clamps the active index when `selection` shrinks. Without the\n\t// clamp, a controlled parent removing a pill through any path other than\n\t// the built-in remove handler could leave the active index pointing past\n\t// the end of `selection`, so no pill receives tabindex=0 and the selected-\n\t// pill listbox becomes unreachable by keyboard (WCAG 2.1.1 / 2.4.3).\n\tuseEffect(() => {\n\t\tif (selection.length === 0) {\n\t\t\tif (activeSelectedOption !== undefined) {\n\t\t\t\tsetActiveSelectedOption(undefined);\n\t\t\t\tsetActiveSelectedOptionIndex(0);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tif (!activeSelectedOption || !selection[activeSelectedOptionIndex]) {\n\t\t\tconst clampedIndex =\n\t\t\t\tactiveSelectedOptionIndex >= selection.length\n\t\t\t\t\t? selection.length - 1\n\t\t\t\t\t: activeSelectedOptionIndex;\n\t\t\tsetActiveSelectedOption(selection[clampedIndex]);\n\t\t\tsetActiveSelectedOptionIndex(clampedIndex);\n\t\t}\n\t}, [selection, activeSelectedOption, activeSelectedOptionIndex]);\n\n\t// Cleanup on unmount\n\tuseEffect(() => {\n\t\treturn () => {\n\t\t\tif (\n\t\t\t\tcurrentOpenDropdown &&\n\t\t\t\tcurrentOpenDropdown.handleClose === handleClose\n\t\t\t) {\n\t\t\t\tcurrentOpenDropdown = undefined;\n\t\t\t}\n\t\t};\n\t}, [handleClose]);\n\n\t// ===== Render Helpers =====\n\n\tconst getCustomPopoverProps = useCallback(\n\t\t(body: ReactNode) => {\n\t\t\tconst popoverBody = (\n\t\t\t\t<div>\n\t\t\t\t\t<div className=\"slds-assistive-text\" id={`${getId()}-label`}>\n\t\t\t\t\t\t{assistiveText.popoverLabel}\n\t\t\t\t\t</div>\n\t\t\t\t\t{body}\n\t\t\t\t</div>\n\t\t\t);\n\n\t\t\tconst popoverFooter = (\n\t\t\t\t<div>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tlabel={labels.cancelButton}\n\t\t\t\t\t\tonClick={(e: React.MouseEvent) => {\n\t\t\t\t\t\t\thandleClose(e, { trigger: 'cancel' });\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tlabel={labels.doneButton}\n\t\t\t\t\t\tvariant=\"brand\"\n\t\t\t\t\t\tonClick={\n\t\t\t\t\t\t\thandleClose as unknown as (\n\t\t\t\t\t\t\t\tevent: React.MouseEvent<HTMLButtonElement>\n\t\t\t\t\t\t\t) => void\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t);\n\n\t\t\tconst defaultPopoverProps: Record<string, unknown> = {\n\t\t\t\tariaLabelledby: `${getId()}-label`,\n\t\t\t\talign: 'bottom',\n\t\t\t\tbody: popoverBody,\n\t\t\t\tclassName: 'slds-popover_full-width',\n\t\t\t\tfooter: popoverFooter,\n\t\t\t\tfooterClassName: 'slds-popover__footer_form',\n\t\t\t\thasNoNubbin: true,\n\t\t\t\tid: getId(),\n\t\t\t\tisOpen: isOpenState,\n\t\t\t\thasNoTriggerStyles: true,\n\t\t\t\tonOpen: handleOpen,\n\t\t\t\tonClose: handleClose,\n\t\t\t\tonRequestClose: handleClose,\n\t\t\t};\n\n\t\t\tconst popoverPropsFromProp = popover?.props as\n\t\t\t\tRecord<string, unknown> | undefined;\n\t\t\tconst popoverProps = assign(\n\t\t\t\tdefaultPopoverProps,\n\t\t\t\tpopoverPropsFromProp || {}\n\t\t\t);\n\t\t\tpopoverProps.body = popoverBody;\n\n\t\t\tdelete popoverProps.children;\n\t\t\treturn popoverProps;\n\t\t},\n\t\t[\n\t\t\tgetId,\n\t\t\tassistiveText.popoverLabel,\n\t\t\tlabels.cancelButton,\n\t\t\tlabels.doneButton,\n\t\t\thandleClose,\n\t\t\tisOpenState,\n\t\t\thandleOpen,\n\t\t\tpopover,\n\t\t]\n\t);\n\n\tconst getDialog = useCallback(\n\t\t({ menuRenderer }: { menuRenderer: ReactNode }) => {\n\t\t\tconst position = menuPosition;\n\n\t\t\tif (!disabled && getIsOpen()) {\n\t\t\t\tconst dialogProps = {\n\t\t\t\t\talign: 'bottom left' as const,\n\t\t\t\t\tcontext: iconSettingsContext,\n\t\t\t\t\thasStaticAlignment,\n\t\t\t\t\tinheritWidthOf,\n\t\t\t\t\tonClose: handleClose,\n\t\t\t\t\tonMouseDown: (event: React.MouseEvent) => {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t},\n\t\t\t\t\tonOpen: handleOpen,\n\t\t\t\t\tonRequestTargetElement: getTargetElement,\n\t\t\t\t\tposition,\n\t\t\t\t\tcontainerProps: {\n\t\t\t\t\t\tid: `${getId()}-listbox`,\n\t\t\t\t\t\trole: 'listbox',\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t\treturn (\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t\t\t<Dialog {...(dialogProps as any)}>{menuRenderer}</Dialog>\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\t[\n\t\t\tmenuPosition,\n\t\t\tdisabled,\n\t\t\tgetIsOpen,\n\t\t\ticonSettingsContext,\n\t\t\thasStaticAlignment,\n\t\t\tinheritWidthOf,\n\t\t\thandleClose,\n\t\t\thandleOpen,\n\t\t\tgetTargetElement,\n\t\t\tgetId,\n\t\t]\n\t);\n\n\tconst renderMenu = useCallback(() => {\n\t\tconst menuVariant: Record<string, 'icon-title-subtitle' | 'checkbox'> = {\n\t\t\tbase: 'icon-title-subtitle',\n\t\t\t'inline-listbox': 'icon-title-subtitle',\n\t\t\treadonly: 'checkbox',\n\t\t};\n\n\t\tconst readonlyItemVisibleLength = variant === 'readonly' ? 5 : null;\n\n\t\treturn (\n\t\t\t<Menu\n\t\t\t\tassistiveText={assistiveText}\n\t\t\t\tactiveOption={activeOption}\n\t\t\t\tactiveOptionIndex={activeOptionIndex}\n\t\t\t\tclassNameMenu={classNameMenu}\n\t\t\t\tclassNameMenuSubHeader={classNameMenuSubHeader}\n\t\t\t\tinheritWidthOf={inheritWidthOf}\n\t\t\t\tinputId={getId()}\n\t\t\t\tinputValue={value}\n\t\t\t\tisSelected={isSelected}\n\t\t\t\titemVisibleLength={menuItemVisibleLength || readonlyItemVisibleLength}\n\t\t\t\tlabels={{ noOptionsFound: labels.noOptionsFound || '' }}\n\t\t\t\thasMenuSpinner={hasMenuSpinner}\n\t\t\t\tmenuPosition={menuPosition}\n\t\t\t\tmenuRef={setMenuRefCallback}\n\t\t\t\tmaxWidth={menuMaxWidth}\n\t\t\t\toptions={getOptions()}\n\t\t\t\tonSelect={\n\t\t\t\t\thandleSelect as (\n\t\t\t\t\t\tevent: React.MouseEvent,\n\t\t\t\t\t\tdata: { option: ComboboxOption; selection?: ComboboxOption[] }\n\t\t\t\t\t) => void\n\t\t\t\t}\n\t\t\t\tonRenderMenuItem={onRenderMenuItem || menuItem}\n\t\t\t\tselection={selection}\n\t\t\t\ttooltipMenuItemDisabled={tooltipMenuItemDisabled}\n\t\t\t\tvariant={menuVariant[variant]}\n\t\t\t/>\n\t\t);\n\t}, [\n\t\tvariant,\n\t\tassistiveText,\n\t\tactiveOption,\n\t\tactiveOptionIndex,\n\t\tclassNameMenu,\n\t\tclassNameMenuSubHeader,\n\t\tinheritWidthOf,\n\t\tgetId,\n\t\tvalue,\n\t\tisSelected,\n\t\tmenuItemVisibleLength,\n\t\tlabels.noOptionsFound,\n\t\thasMenuSpinner,\n\t\tmenuPosition,\n\t\tsetMenuRefCallback,\n\t\tmenuMaxWidth,\n\t\tgetOptions,\n\t\thandleSelect,\n\t\tonRenderMenuItem,\n\t\tmenuItem,\n\t\tselection,\n\t\ttooltipMenuItemDisabled,\n\t]);\n\n\t// User defined props from input\n\tconst userDefinedInputProps = input?.props || {};\n\n\t// ===== Sub-renders =====\n\n\tconst renderBase = () => (\n\t\t<div className=\"slds-form-element__control\">\n\t\t\t<div className=\"slds-combobox_container\">\n\t\t\t\t<div\n\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t'slds-combobox',\n\t\t\t\t\t\t'slds-dropdown-trigger',\n\t\t\t\t\t\t'slds-dropdown-trigger_click',\n\t\t\t\t\t\t'ignore-react-onclickoutside',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'slds-is-open': getIsOpen(),\n\t\t\t\t\t\t\t'slds-has-error': errorText,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tclassName\n\t\t\t\t\t)}\n\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\taria-expanded={getIsOpen()}\n\t\t\t\t\taria-haspopup=\"listbox\"\n\t\t\t\t\taria-owns={getIsOpen() ? `${getId()}-listbox` : undefined}\n\t\t\t\t>\n\t\t\t\t\t<InnerInput\n\t\t\t\t\t\taria-autocomplete=\"list\"\n\t\t\t\t\t\taria-controls={getIsOpen() ? `${getId()}-listbox` : undefined}\n\t\t\t\t\t\taria-activedescendant={\n\t\t\t\t\t\t\tactiveOption\n\t\t\t\t\t\t\t\t? `${getId()}-listbox-option-${activeOption.id}`\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\taria-describedby={getErrorId()}\n\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\tclassName=\"slds-combobox__input\"\n\t\t\t\t\t\tcontainerProps={{\n\t\t\t\t\t\t\tclassName: 'slds-combobox__form-element',\n\t\t\t\t\t\t\trole: 'none',\n\t\t\t\t\t\t}}\n\t\t\t\t\t\thasSpinner={hasInputSpinner}\n\t\t\t\t\t\ticonRight={\n\t\t\t\t\t\t\t<InputIcon\n\t\t\t\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\t\t\t\tname=\"search\"\n\t\t\t\t\t\t\t\ttitle={labels.inputIconTitle}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t}\n\t\t\t\t\t\tid={getId()}\n\t\t\t\t\t\tonFocus={handleInputFocus}\n\t\t\t\t\t\tonBlur={handleInputBlur}\n\t\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\t\tinputRef={setInputRefCallback}\n\t\t\t\t\t\tonClick={() => openDialog()}\n\t\t\t\t\t\tonChange={handleInputChange}\n\t\t\t\t\t\tplaceholder={labels.placeholder}\n\t\t\t\t\t\tdefaultValue={defaultValue}\n\t\t\t\t\t\treadOnly={!!(predefinedOptionsOnly && activeOption)}\n\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\trole=\"textbox\"\n\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\tpredefinedOptionsOnly\n\t\t\t\t\t\t\t\t? (activeOption?.label as string) || value\n\t\t\t\t\t\t\t\t: value\n\t\t\t\t\t\t}\n\t\t\t\t\t\t{...userDefinedInputProps}\n\t\t\t\t\t/>\n\t\t\t\t\t{getDialog({ menuRenderer: renderMenu() })}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<SelectedListBox\n\t\t\t\tactiveOption={activeSelectedOption as SelectedListBoxOption}\n\t\t\t\tactiveOptionIndex={activeSelectedOptionIndex}\n\t\t\t\tassistiveText={\n\t\t\t\t\tassistiveText as unknown as {\n\t\t\t\t\t\tremovePill?: string;\n\t\t\t\t\t\tselectedListboxLabel?: string;\n\t\t\t\t\t\t[key: string]: unknown;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tevents={{\n\t\t\t\t\tonBlurPill: handleBlurPill,\n\t\t\t\t\tonPillFocus: handlePillFocus as (\n\t\t\t\t\t\tevent: React.FocusEvent,\n\t\t\t\t\t\tdata: { index: number; option: SelectedListBoxOption }\n\t\t\t\t\t) => void,\n\t\t\t\t\tonRequestFocus: handleRequestFocusSelectedListbox as (\n\t\t\t\t\t\tevent: unknown,\n\t\t\t\t\t\tdata: { ref: HTMLElement | null }\n\t\t\t\t\t) => void,\n\t\t\t\t\tonRequestFocusOnNextPill: handleNavigateSelectedListbox as (\n\t\t\t\t\t\tevent: React.SyntheticEvent,\n\t\t\t\t\t\tdata: { direction: 'next' | 'previous' }\n\t\t\t\t\t) => void,\n\t\t\t\t\tonRequestFocusOnPreviousPill: handleNavigateSelectedListbox as (\n\t\t\t\t\t\tevent: React.SyntheticEvent,\n\t\t\t\t\t\tdata: { direction: 'next' | 'previous' }\n\t\t\t\t\t) => void,\n\t\t\t\t\tonRequestRemove: handleRemoveSelectedOption as (\n\t\t\t\t\t\tevent:\n\t\t\t\t\t\t\tReact.MouseEvent | React.KeyboardEvent | React.SyntheticEvent,\n\t\t\t\t\t\tdata: { index?: number; option: SelectedListBoxOption }\n\t\t\t\t\t) => void,\n\t\t\t\t}}\n\t\t\t\tid={`${getId()}-selected-listbox`}\n\t\t\t\tlabels={labels}\n\t\t\t\tselectedListboxRef={setSelectedListboxRefCallback}\n\t\t\t\tselection={selection as SelectedListBoxOption[]}\n\t\t\t\tlistboxHasFocus={listboxHasFocus}\n\t\t\t\tmultiselectable={multiple}\n\t\t\t/>\n\t\t\t{errorText && (\n\t\t\t\t<div className=\"slds-has-error\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tid={getErrorId()}\n\t\t\t\t\t\tclassName=\"slds-form-element__help slds-has-error\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{errorText}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n\n\tconst renderInlineMultiple = () => (\n\t\t<div className=\"slds-form-element__control\">\n\t\t\t<div\n\t\t\t\tclassName={classNames('slds-combobox_container', {\n\t\t\t\t\t'slds-has-inline-listbox': selection.length,\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t{selection.length ? (\n\t\t\t\t\t<SelectedListBox\n\t\t\t\t\t\tactiveOption={activeSelectedOption as SelectedListBoxOption}\n\t\t\t\t\t\tactiveOptionIndex={activeSelectedOptionIndex}\n\t\t\t\t\t\tassistiveText={\n\t\t\t\t\t\t\tassistiveText as unknown as {\n\t\t\t\t\t\t\t\tremovePill?: string;\n\t\t\t\t\t\t\t\tselectedListboxLabel?: string;\n\t\t\t\t\t\t\t\t[key: string]: unknown;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcontainerRole=\"listbox\"\n\t\t\t\t\t\tcontainerAriaOrientation=\"horizontal\"\n\t\t\t\t\t\tlistboxRole=\"group\"\n\t\t\t\t\t\tlistboxAriaOrientation={null}\n\t\t\t\t\t\tevents={{\n\t\t\t\t\t\t\tonBlurPill: handleBlurPill,\n\t\t\t\t\t\t\tonPillFocus: handlePillFocus as (\n\t\t\t\t\t\t\t\tevent: React.FocusEvent,\n\t\t\t\t\t\t\t\tdata: { index: number; option: SelectedListBoxOption }\n\t\t\t\t\t\t\t) => void,\n\t\t\t\t\t\t\tonRequestFocus: handleRequestFocusSelectedListbox as (\n\t\t\t\t\t\t\t\tevent: unknown,\n\t\t\t\t\t\t\t\tdata: { ref: HTMLElement | null }\n\t\t\t\t\t\t\t) => void,\n\t\t\t\t\t\t\tonRequestFocusOnNextPill: handleNavigateSelectedListbox as (\n\t\t\t\t\t\t\t\tevent: React.SyntheticEvent,\n\t\t\t\t\t\t\t\tdata: { direction: 'next' | 'previous' }\n\t\t\t\t\t\t\t) => void,\n\t\t\t\t\t\t\tonRequestFocusOnPreviousPill: handleNavigateSelectedListbox as (\n\t\t\t\t\t\t\t\tevent: React.SyntheticEvent,\n\t\t\t\t\t\t\t\tdata: { direction: 'next' | 'previous' }\n\t\t\t\t\t\t\t) => void,\n\t\t\t\t\t\t\tonRequestRemove: handleRemoveSelectedOption as (\n\t\t\t\t\t\t\t\tevent:\n\t\t\t\t\t\t\t\t\tReact.MouseEvent | React.KeyboardEvent | React.SyntheticEvent,\n\t\t\t\t\t\t\t\tdata: { index?: number; option: SelectedListBoxOption }\n\t\t\t\t\t\t\t) => void,\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tid={`${getId()}-selected-listbox`}\n\t\t\t\t\t\tlabels={labels}\n\t\t\t\t\t\tselectedListboxRef={setSelectedListboxRefCallback}\n\t\t\t\t\t\tselection={selection as SelectedListBoxOption[]}\n\t\t\t\t\t\tlistboxHasFocus={listboxHasFocus}\n\t\t\t\t\t\tmultiselectable={multiple}\n\t\t\t\t\t/>\n\t\t\t\t) : null}\n\t\t\t\t<div\n\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t'slds-combobox',\n\t\t\t\t\t\t'slds-dropdown-trigger',\n\t\t\t\t\t\t'slds-dropdown-trigger_click',\n\t\t\t\t\t\t'ignore-react-onclickoutside',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'slds-is-open': getIsOpen(),\n\t\t\t\t\t\t\t'slds-has-error': errorText,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tclassName\n\t\t\t\t\t)}\n\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\taria-expanded={getIsOpen()}\n\t\t\t\t\taria-haspopup=\"listbox\"\n\t\t\t\t>\n\t\t\t\t\t<InnerInput\n\t\t\t\t\t\taria-autocomplete=\"list\"\n\t\t\t\t\t\taria-controls={getIsOpen() ? `${getId()}-listbox` : undefined}\n\t\t\t\t\t\taria-activedescendant={\n\t\t\t\t\t\t\tactiveOption\n\t\t\t\t\t\t\t\t? `${getId()}-listbox-option-${activeOption.id}`\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\taria-describedby={getErrorId()}\n\t\t\t\t\t\tdefaultValue={defaultValue}\n\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\tclassName=\"slds-combobox__input\"\n\t\t\t\t\t\tcontainerProps={{\n\t\t\t\t\t\t\tclassName: 'slds-combobox__form-element',\n\t\t\t\t\t\t\trole: 'none',\n\t\t\t\t\t\t}}\n\t\t\t\t\t\thasSpinner={hasInputSpinner}\n\t\t\t\t\t\ticonRight={\n\t\t\t\t\t\t\t<InputIcon\n\t\t\t\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\t\t\t\tname=\"search\"\n\t\t\t\t\t\t\t\ttitle={labels.inputIconTitle}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t}\n\t\t\t\t\t\tid={getId()}\n\t\t\t\t\t\tonFocus={handleInputFocus}\n\t\t\t\t\t\tonBlur={handleInputBlur}\n\t\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\t\tinputRef={setInputRefCallback}\n\t\t\t\t\t\tonClick={() => openDialog()}\n\t\t\t\t\t\tonChange={handleInputChange}\n\t\t\t\t\t\tplaceholder={labels.placeholder}\n\t\t\t\t\t\treadOnly={!!(predefinedOptionsOnly && activeOption)}\n\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\trole=\"textbox\"\n\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\tpredefinedOptionsOnly\n\t\t\t\t\t\t\t\t? (activeOption?.label as string) || value\n\t\t\t\t\t\t\t\t: value\n\t\t\t\t\t\t}\n\t\t\t\t\t\t{...userDefinedInputProps}\n\t\t\t\t\t/>\n\t\t\t\t\t{getDialog({ menuRenderer: renderMenu() })}\n\t\t\t\t\t{errorText && (\n\t\t\t\t\t\t<div id={getErrorId()} className=\"slds-form-element__help\">\n\t\t\t\t\t\t\t{errorText}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n\n\tconst renderInlineSingle = () => {\n\t\tconst selectedIcon = selection[0]?.icon;\n\t\tconst iconLeft =\n\t\t\tselectedIcon && React.isValidElement(selectedIcon)\n\t\t\t\t? React.cloneElement(selectedIcon, {\n\t\t\t\t\t\tcontainerClassName: 'slds-combobox__input-entity-icon',\n\t\t\t\t\t} as Record<string, unknown>)\n\t\t\t\t: null;\n\n\t\tconst inputValue = selection[0]?.label\n\t\t\t? (selection[0].label as string)\n\t\t\t: value;\n\n\t\treturn (\n\t\t\t<div className=\"slds-form-element__control\">\n\t\t\t\t<div\n\t\t\t\t\tclassName={classNames('slds-combobox_container', {\n\t\t\t\t\t\t'slds-has-inline-listbox': selection.length,\n\t\t\t\t\t})}\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-combobox',\n\t\t\t\t\t\t\t'slds-dropdown-trigger',\n\t\t\t\t\t\t\t'slds-dropdown-trigger_click',\n\t\t\t\t\t\t\t'ignore-react-onclickoutside',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'slds-is-open': getIsOpen(),\n\t\t\t\t\t\t\t\t'slds-has-error': errorText,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tclassName\n\t\t\t\t\t\t)}\n\t\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\t\taria-expanded={getIsOpen()}\n\t\t\t\t\t\taria-haspopup=\"listbox\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<InnerInput\n\t\t\t\t\t\t\tdefaultValue={defaultValue}\n\t\t\t\t\t\t\taria-autocomplete=\"list\"\n\t\t\t\t\t\t\taria-controls={getIsOpen() ? `${getId()}-listbox` : undefined}\n\t\t\t\t\t\t\taria-activedescendant={\n\t\t\t\t\t\t\t\tactiveOption\n\t\t\t\t\t\t\t\t\t? `${getId()}-listbox-option-${activeOption.id}`\n\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\taria-describedby={getErrorId()}\n\t\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\t\tclassName=\"slds-combobox__input\"\n\t\t\t\t\t\t\tcontainerProps={{\n\t\t\t\t\t\t\t\tclassName: 'slds-combobox__form-element',\n\t\t\t\t\t\t\t\trole: 'none',\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tdisabled={singleInputDisabled}\n\t\t\t\t\t\t\thasSpinner={hasInputSpinner}\n\t\t\t\t\t\t\ticonRight={\n\t\t\t\t\t\t\t\tselection.length ? (\n\t\t\t\t\t\t\t\t\t<InputIcon\n\t\t\t\t\t\t\t\t\t\tassistiveText={{\n\t\t\t\t\t\t\t\t\t\t\ticon: assistiveText.removeSingleSelectedOption,\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tbuttonRef={(component: HTMLButtonElement | null) => {\n\t\t\t\t\t\t\t\t\t\t\tbuttonRef.current = component;\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\t\t\t\t\t\ticonPosition=\"right\"\n\t\t\t\t\t\t\t\t\t\tname=\"close\"\n\t\t\t\t\t\t\t\t\t\tonClick={(event: React.MouseEvent) => {\n\t\t\t\t\t\t\t\t\t\t\thandleRemoveSelectedOption(event, {\n\t\t\t\t\t\t\t\t\t\t\t\toption: selection[0],\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<InputIcon category=\"utility\" name=\"search\" />\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ticonLeft={iconLeft}\n\t\t\t\t\t\t\tid={getId()}\n\t\t\t\t\t\t\tonFocus={handleInputFocus}\n\t\t\t\t\t\t\tonBlur={handleInputBlur}\n\t\t\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\t\t\tinputRef={setInputRefCallback}\n\t\t\t\t\t\t\tonClick={() => requestOpenMenu()}\n\t\t\t\t\t\t\tonChange={(event: React.ChangeEvent<HTMLInputElement>) => {\n\t\t\t\t\t\t\t\tif (!selection.length) {\n\t\t\t\t\t\t\t\t\thandleInputChange(event);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tplaceholder={labels.placeholder}\n\t\t\t\t\t\t\treadOnly={\n\t\t\t\t\t\t\t\t!!(predefinedOptionsOnly && activeOption) || !!selection.length\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\t\trole=\"textbox\"\n\t\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\t\tpredefinedOptionsOnly\n\t\t\t\t\t\t\t\t\t? (activeOption?.label as string) || value\n\t\t\t\t\t\t\t\t\t: inputValue\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{...userDefinedInputProps}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{getDialog({ menuRenderer: renderMenu() })}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t{errorText && (\n\t\t\t\t\t<div className=\"slds-has-error\">\n\t\t\t\t\t\t<div id={getErrorId()} className=\"slds-form-element__help\">\n\t\t\t\t\t\t\t{errorText}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t};\n\n\tconst renderPopover = () => {\n\t\tconst popoverPropsFromProp = popover?.props as\n\t\t\t{ body?: ReactNode } | undefined;\n\t\tconst popoverProps = getCustomPopoverProps(popoverPropsFromProp?.body);\n\n\t\treturn (\n\t\t\t<div className=\"slds-form-element__control\">\n\t\t\t\t<div className=\"slds-combobox_container\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-combobox',\n\t\t\t\t\t\t\t'slds-dropdown-trigger',\n\t\t\t\t\t\t\t'slds-dropdown-trigger_click',\n\t\t\t\t\t\t\t'ignore-react-onclickoutside',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'slds-is-open': getIsOpen(),\n\t\t\t\t\t\t\t\t'slds-has-error': errorText,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tclassName\n\t\t\t\t\t\t)}\n\t\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\t\taria-expanded={getIsOpen()}\n\t\t\t\t\t\taria-haspopup=\"dialog\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{/* @ts-expect-error - popoverProps contains body from getCustomPopoverProps */}\n\t\t\t\t\t\t<Popover {...popoverProps}>\n\t\t\t\t\t\t\t<InnerInput\n\t\t\t\t\t\t\t\taria-autocomplete=\"none\"\n\t\t\t\t\t\t\t\taria-controls={getIsOpen() ? `${getId()}-popover` : undefined}\n\t\t\t\t\t\t\t\taria-describedby={getErrorId()}\n\t\t\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\t\t\tclassName=\"slds-combobox__input\"\n\t\t\t\t\t\t\t\tcontainerProps={{\n\t\t\t\t\t\t\t\t\tclassName: 'slds-combobox__form-element',\n\t\t\t\t\t\t\t\t\trole: 'none',\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\ticonRight={\n\t\t\t\t\t\t\t\t\t<InputIcon\n\t\t\t\t\t\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\t\t\t\t\t\tname=\"down\"\n\t\t\t\t\t\t\t\t\t\tvariant=\"combobox\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tid={getId()}\n\t\t\t\t\t\t\t\tonFocus={handleInputFocus}\n\t\t\t\t\t\t\t\tonBlur={handleInputBlur}\n\t\t\t\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\t\t\t\tinputRef={setInputRefCallback}\n\t\t\t\t\t\t\t\tonClick={() => openDialog()}\n\t\t\t\t\t\t\t\tonChange={handleInputChange}\n\t\t\t\t\t\t\t\tplaceholder={labels.placeholder}\n\t\t\t\t\t\t\t\treadOnly\n\t\t\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\t\t\trole=\"textbox\"\n\t\t\t\t\t\t\t\tvalue={value}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Popover>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t{errorText && (\n\t\t\t\t\t<div className=\"slds-has-error\">\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tid={getErrorId()}\n\t\t\t\t\t\t\tclassName=\"slds-form-element__help slds-has-error\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{errorText}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t};\n\n\tconst renderReadOnlyMultiple = () => {\n\t\tconst displayValue =\n\t\t\tselection.length > 1\n\t\t\t\t? labels.multipleOptionsSelected ||\n\t\t\t\t\t`${selection.length} options selected`\n\t\t\t\t: (selection[0]?.label as string) || '';\n\n\t\treturn (\n\t\t\t<div className=\"slds-form-element__control\">\n\t\t\t\t<div className=\"slds-combobox_container\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-combobox',\n\t\t\t\t\t\t\t'slds-dropdown-trigger',\n\t\t\t\t\t\t\t'slds-dropdown-trigger_click',\n\t\t\t\t\t\t\t'ignore-react-onclickoutside',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'slds-is-open': getIsOpen(),\n\t\t\t\t\t\t\t\t'slds-has-error': errorText,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tclassName\n\t\t\t\t\t\t)}\n\t\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\t\taria-expanded={getIsOpen()}\n\t\t\t\t\t\taria-haspopup=\"listbox\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<InnerInput\n\t\t\t\t\t\t\tdefaultValue={defaultValue}\n\t\t\t\t\t\t\taria-autocomplete=\"list\"\n\t\t\t\t\t\t\taria-controls={getIsOpen() ? `${getId()}-listbox` : undefined}\n\t\t\t\t\t\t\taria-activedescendant={\n\t\t\t\t\t\t\t\tactiveOption\n\t\t\t\t\t\t\t\t\t? `${getId()}-listbox-option-${activeOption.id}`\n\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\taria-describedby={getErrorId()}\n\t\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\t\tclassName=\"slds-combobox__input\"\n\t\t\t\t\t\t\tcontainerProps={{\n\t\t\t\t\t\t\t\tclassName: 'slds-combobox__form-element',\n\t\t\t\t\t\t\t\trole: 'none',\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\ticonRight={\n\t\t\t\t\t\t\t\t<InputIcon category=\"utility\" name=\"down\" variant=\"combobox\" />\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tid={getId()}\n\t\t\t\t\t\t\tonFocus={handleInputFocus}\n\t\t\t\t\t\t\tonBlur={handleInputBlur}\n\t\t\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\t\t\tinputRef={setInputRefCallback}\n\t\t\t\t\t\t\tonClick={() => requestOpenMenu()}\n\t\t\t\t\t\t\tonChange={(event: React.ChangeEvent<HTMLInputElement>) => {\n\t\t\t\t\t\t\t\tif (!selection.length) {\n\t\t\t\t\t\t\t\t\thandleInputChange(event);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tplaceholder={labels.placeholderReadOnly}\n\t\t\t\t\t\t\treadOnly\n\t\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\t\trole=\"textbox\"\n\t\t\t\t\t\t\tvalue={displayValue}\n\t\t\t\t\t\t\t{...userDefinedInputProps}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{getDialog({ menuRenderer: renderMenu() })}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<SelectedListBox\n\t\t\t\t\tactiveOption={activeSelectedOption as SelectedListBoxOption}\n\t\t\t\t\tactiveOptionIndex={activeSelectedOptionIndex}\n\t\t\t\t\tassistiveText={\n\t\t\t\t\t\tassistiveText as unknown as {\n\t\t\t\t\t\t\tremovePill?: string;\n\t\t\t\t\t\t\tselectedListboxLabel?: string;\n\t\t\t\t\t\t\t[key: string]: unknown;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tevents={{\n\t\t\t\t\t\tonBlurPill: handleBlurPill,\n\t\t\t\t\t\tonPillFocus: handlePillFocus as (\n\t\t\t\t\t\t\tevent: React.FocusEvent,\n\t\t\t\t\t\t\tdata: { index: number; option: SelectedListBoxOption }\n\t\t\t\t\t\t) => void,\n\t\t\t\t\t\tonRequestFocus: handleRequestFocusSelectedListbox as (\n\t\t\t\t\t\t\tevent: unknown,\n\t\t\t\t\t\t\tdata: { ref: HTMLElement | null }\n\t\t\t\t\t\t) => void,\n\t\t\t\t\t\tonRequestFocusOnNextPill: handleNavigateSelectedListbox as (\n\t\t\t\t\t\t\tevent: React.SyntheticEvent,\n\t\t\t\t\t\t\tdata: { direction: 'next' | 'previous' }\n\t\t\t\t\t\t) => void,\n\t\t\t\t\t\tonRequestFocusOnPreviousPill: handleNavigateSelectedListbox as (\n\t\t\t\t\t\t\tevent: React.SyntheticEvent,\n\t\t\t\t\t\t\tdata: { direction: 'next' | 'previous' }\n\t\t\t\t\t\t) => void,\n\t\t\t\t\t\tonRequestRemove: handleRemoveSelectedOption as (\n\t\t\t\t\t\t\tevent:\n\t\t\t\t\t\t\t\tReact.MouseEvent | React.KeyboardEvent | React.SyntheticEvent,\n\t\t\t\t\t\t\tdata: { index?: number; option: SelectedListBoxOption }\n\t\t\t\t\t\t) => void,\n\t\t\t\t\t}}\n\t\t\t\t\tid={`${getId()}-selected-listbox`}\n\t\t\t\t\tlabels={labels}\n\t\t\t\t\tselectedListboxRef={setSelectedListboxRefCallback}\n\t\t\t\t\tselection={selection as SelectedListBoxOption[]}\n\t\t\t\t\tlistboxHasFocus={listboxHasFocus}\n\t\t\t\t\tvariant={variant}\n\t\t\t\t\trenderAtSelectionLength={2}\n\t\t\t\t\tmultiselectable={multiple}\n\t\t\t\t/>\n\t\t\t\t{errorText && (\n\t\t\t\t\t<div className=\"slds-has-error\">\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tid={getErrorId()}\n\t\t\t\t\t\t\tclassName=\"slds-form-element__help slds-has-error\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{errorText}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t};\n\n\tconst renderReadOnlySingle = () => {\n\t\tconst activeOptionLabel = activeOption?.label as string | undefined;\n\t\tconst selectedOptionLabel = selection[0]?.label as string | undefined;\n\t\tlet inputValue = activeOptionLabel || selectedOptionLabel || '';\n\n\t\tif (selection[0]?.value === '') {\n\t\t\tinputValue = '';\n\t\t}\n\n\t\treturn (\n\t\t\t<div className=\"slds-form-element__control\">\n\t\t\t\t<div className=\"slds-combobox_container\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-combobox',\n\t\t\t\t\t\t\t'slds-dropdown-trigger',\n\t\t\t\t\t\t\t'slds-dropdown-trigger_click',\n\t\t\t\t\t\t\t'ignore-react-onclickoutside',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'slds-is-open': getIsOpen(),\n\t\t\t\t\t\t\t\t'slds-has-error': errorText,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tclassName\n\t\t\t\t\t\t)}\n\t\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\t\taria-expanded={getIsOpen()}\n\t\t\t\t\t\taria-haspopup=\"listbox\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<InnerInput\n\t\t\t\t\t\t\tdefaultValue={defaultValue}\n\t\t\t\t\t\t\taria-autocomplete=\"list\"\n\t\t\t\t\t\t\taria-controls={getIsOpen() ? `${getId()}-listbox` : undefined}\n\t\t\t\t\t\t\taria-activedescendant={\n\t\t\t\t\t\t\t\tactiveOption\n\t\t\t\t\t\t\t\t\t? `${getId()}-listbox-option-${activeOption.id}`\n\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\taria-describedby={getErrorId()}\n\t\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\t\tclassName=\"slds-combobox__input\"\n\t\t\t\t\t\t\tcontainerProps={{\n\t\t\t\t\t\t\t\tclassName: 'slds-combobox__form-element',\n\t\t\t\t\t\t\t\trole: 'none',\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tdisabled={singleInputDisabled}\n\t\t\t\t\t\t\ticonRight={\n\t\t\t\t\t\t\t\t<InputIcon category=\"utility\" name=\"down\" variant=\"combobox\" />\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tid={getId()}\n\t\t\t\t\t\t\tonFocus={handleInputFocus}\n\t\t\t\t\t\t\tonBlur={handleInputBlur}\n\t\t\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\t\t\tinputRef={setInputRefCallback}\n\t\t\t\t\t\t\tonClick={() => requestOpenMenu()}\n\t\t\t\t\t\t\tonChange={(event: React.ChangeEvent<HTMLInputElement>) => {\n\t\t\t\t\t\t\t\tif (!selection.length) {\n\t\t\t\t\t\t\t\t\thandleInputChange(event);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tplaceholder={labels.placeholderReadOnly}\n\t\t\t\t\t\t\treadOnly\n\t\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\t\trole=\"textbox\"\n\t\t\t\t\t\t\tvalue={inputValue}\n\t\t\t\t\t\t\t{...userDefinedInputProps}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{getDialog({ menuRenderer: renderMenu() })}\n\t\t\t\t\t\t{errorText && (\n\t\t\t\t\t\t\t<div id={getErrorId()} className=\"slds-form-element__help\">\n\t\t\t\t\t\t\t\t{errorText}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t};\n\n\t// ===== Main Render =====\n\n\tconst hasRenderedLabel = labels.label || assistiveText?.label;\n\n\tconst subRenders: Record<string, Record<string, () => ReactNode>> = {\n\t\tbase: {\n\t\t\tmultiple: renderBase,\n\t\t\tsingle: renderBase,\n\t\t},\n\t\t'inline-listbox': {\n\t\t\tmultiple: renderInlineMultiple,\n\t\t\tsingle: renderInlineSingle,\n\t\t},\n\t\tpopover: {\n\t\t\tmultiple: renderPopover,\n\t\t\tsingle: renderPopover,\n\t\t},\n\t\treadonly: {\n\t\t\tmultiple: renderReadOnlyMultiple,\n\t\t\tsingle: renderReadOnlySingle,\n\t\t},\n\t};\n\n\tconst multipleOrSingle = multiple ? 'multiple' : 'single';\n\tconst variantRenderer = subRenders[variant]?.[multipleOrSingle];\n\n\tconst mainCombobox = (\n\t\t<div className={classNames('slds-form-element', classNameContainer)}>\n\t\t\t{entityCombobox ? null : (\n\t\t\t\t<Label\n\t\t\t\t\tassistiveText={\n\t\t\t\t\t\tassistiveText as unknown as {\n\t\t\t\t\t\t\tlabel?: string;\n\t\t\t\t\t\t\t[key: string]: unknown;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\thtmlFor={getId()}\n\t\t\t\t\tlabel={labels.label}\n\t\t\t\t\trequired={required}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{fieldLevelHelpTooltip && hasRenderedLabel ? (\n\t\t\t\t<FieldLevelHelpTooltip\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t\t\tfieldLevelHelpTooltip={fieldLevelHelpTooltip as any}\n\t\t\t\t/>\n\t\t\t) : null}\n\t\t\t{variantRenderer ? variantRenderer() : subRenders.base.multiple()}\n\t\t</div>\n\t);\n\n\treturn entityCombobox ? (\n\t\t<div className=\"slds-form-element\">\n\t\t\t<Label\n\t\t\t\tassistiveText={\n\t\t\t\t\tassistiveText as unknown as { label?: string; [key: string]: unknown }\n\t\t\t\t}\n\t\t\t\thtmlFor={getId()}\n\t\t\t\tlabel={labels.label}\n\t\t\t\trequired={required}\n\t\t\t/>\n\t\t\t<div className=\"slds-form-element__control\">\n\t\t\t\t<div className=\"slds-combobox-group\">\n\t\t\t\t\t<div className=\"slds-combobox_object-switcher slds-combobox-addon_start\">\n\t\t\t\t\t\t{entityCombobox}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div className=\"slds-combobox_container slds-combobox-addon_end\">\n\t\t\t\t\t\t{mainCombobox}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t) : (\n\t\tmainCombobox\n\t);\n};\n\nCombobox.displayName = COMBOBOX;\n\nexport default Comb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AA,EAAA,IAAA,CAAC,GAAA,QAAD,CAEE,gBAKD,QAAS,EAAM,EACf,MAAO,EAAO,MACJ,UACV,CAAA,EAED,IAAyB,IACzB,EAAA,EAAA,IAAA,CAAC,GAAA,QAAD,CAEwB,wBACvB,CAAA,EACE,KACH,GAAkB,GAAgB,EAAI,GAAW,KAAK,SAAS,CAC5D,IAGN,OAAO,IACN,EAAA,EAAA,KAAA,CAAC,MAAD,CAAK,UAAU,oBAAf,SAAA,EACC,EAAA,EAAA,IAAA,CAAC,GAAA,QAAD,CAEE,gBAED,QAAS,EAAM,EACf,MAAO,EAAO,MACJ,UACV,CAAA,GACD,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,6BACd,UAAA,EAAA,EAAA,KAAA,CAAC,MAAD,CAAK,UAAU,sBAAf,SAAA,EACC,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,0DACb,SAAA,EACG,CAAA,GAEL,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,kDACb,SAAA,EACG,CAAA,CACD,GACD,CAAA,CACD,CAEL,CAAA,EAAA,EAEF,EAEA,GAAS,YAAc,EAAA"}
1
+ {"version":3,"file":"combobox.cjs","names":[],"sources":["../../../../components/combobox/combobox.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport React, {\n\tuseState,\n\tuseRef,\n\tuseCallback,\n\tuseEffect,\n\tuseContext,\n\ttype ReactNode,\n\ttype ReactElement,\n} from 'react';\n\nimport assign from 'lodash.assign';\nimport find from 'lodash.find';\nimport reject from 'lodash.reject';\nimport { dequal as isEqual } from 'dequal';\nimport findIndex from 'lodash.findindex';\nimport isFunction from 'lodash.isfunction';\n\nimport classNames from 'classnames';\n\nimport Button from '../button';\nimport Dialog from '../utilities/dialog';\nimport InnerInput from '../input/private/inner-input';\nimport InputIcon from '../icon/input-icon';\nimport Menu, {\n\ttype ComboboxOption,\n\ttype ComboboxItemOption,\n\ttype ComboboxActionOption,\n\ttype ComboboxDeselectOption,\n\ttype MenuRenderMenuItemData,\n} from './private/menu';\nimport Label from '../forms/private/label';\nimport Popover from '../popover';\nimport SelectedListBox from '../pill-container/private/selected-listbox';\n\nimport FieldLevelHelpTooltip from '../tooltip/private/field-level-help-tooltip';\nimport KEYS from '../../utilities/key-code';\nimport KeyBuffer from '../../utilities/key-buffer';\nimport keyLetterMenuItemSelect from '../../utilities/key-letter-menu-item-select';\nimport mapKeyEventCallbacks from '../../utilities/key-callbacks';\nimport menuItemSelectScroll from '../../utilities/menu-item-select-scroll';\n\nimport checkProps from './check-props';\n\nimport { COMBOBOX } from '../../utilities/constants';\nimport type { SelectedListBoxOption } from '../pill-container/private/selected-listbox';\nimport generateId from '../../utilities/generate-id';\nimport componentDoc from './component.json';\nimport { IconSettingsContext } from '../icon-settings';\n\nlet currentOpenDropdown: { handleClose: () => void } | undefined;\nconst documentDefined = typeof document !== 'undefined';\n\n// ===== Types =====\n\nexport interface ComboboxAssistiveText {\n\tlabel?: string;\n\tloadingMenuItems?: string;\n\toptionSelectedInMenu?: string;\n\tpopoverLabel?: string;\n\tremoveSingleSelectedOption?: string;\n\tremovePill?: string;\n\tselectedListboxLabel?: string;\n}\n\nexport interface ComboboxLabels {\n\tdeselectOption?: string;\n\tlabel?: ReactNode | string;\n\tcancelButton?: string;\n\tdoneButton?: string;\n\tmultipleOptionsSelected?: string;\n\tnoOptionsFound?: ReactNode | string;\n\tplaceholder?: string;\n\tplaceholderReadOnly?: string;\n\tremovePillTitle?: string;\n\toptionDisabledTooltipLabel?: string;\n\tinputIconTitle?: string;\n}\n\nexport interface ComboboxEvents {\n\tonBlur?: (event: React.FocusEvent) => void;\n\tonChange?: (\n\t\tevent: React.ChangeEvent<HTMLInputElement>,\n\t\tdata: { value: string }\n\t) => void;\n\tonClose?: (\n\t\tevent: React.SyntheticEvent | undefined,\n\t\tdata: Record<string, unknown>\n\t) => void;\n\tonFocus?: (event: React.FocusEvent, data: Record<string, unknown>) => void;\n\tonOpen?: (\n\t\tevent: React.SyntheticEvent | undefined,\n\t\tdata: Record<string, unknown>\n\t) => void;\n\tonRequestClose?: (\n\t\tevent: React.SyntheticEvent,\n\t\tdata: Record<string, unknown>\n\t) => void;\n\tonRequestOpen?: () => void;\n\tonRequestRemoveSelectedOption?: (\n\t\tevent: React.SyntheticEvent,\n\t\tdata: { selection: ComboboxOption[] }\n\t) => void;\n\tonSelect?: (\n\t\tevent: React.SyntheticEvent,\n\t\tdata: { selection: ComboboxOption[] }\n\t) => void;\n\t/** Fires when an `optionsSearchEntity` or `optionsAddItem` row is chosen by\n\t * click or Enter. `value` is the current input text. */\n\tonSelectActionItem?: (\n\t\tevent: React.MouseEvent | React.KeyboardEvent,\n\t\tdata: { option: ComboboxActionItem; value: string }\n\t) => void;\n\tonSubmit?: (event: React.KeyboardEvent, data: { value: string }) => void;\n}\n\n/**\n * An action row in the menu: `optionsSearchEntity` items render above the\n * options, `optionsAddItem` items below them. Choosing one (click or Enter)\n * calls `events.onSelectActionItem` and closes the menu. Action rows are\n * commands, not records, so they never fire `onSelect` or enter the selection.\n */\nexport interface ComboboxActionItem {\n\tid?: string;\n\ticon?: ReactNode;\n\tlabel?: string | ((searchTerm: string) => ReactNode);\n\tdisabled?: boolean;\n\t/** @deprecated Use `events.onSelectActionItem`. If both are set, both are\n\t * called, this one first. */\n\tonClick?: (\n\t\tevent: React.MouseEvent | React.KeyboardEvent,\n\t\tdata: { option: ComboboxActionItem }\n\t) => void;\n}\n\n// A menu row built from a `ComboboxActionItem`. The original item is stored\n// under a module-private symbol, so consumer data in `options` (which may come\n// from untyped JS and carry arbitrary keys) can't impersonate one.\nconst ACTION_ITEM = Symbol('actionItem');\n\ntype ActionItemRow = ComboboxActionOption & {\n\t[ACTION_ITEM]: ComboboxActionItem;\n};\n\nconst isActionItemRow = (option: ComboboxOption): option is ActionItemRow =>\n\tACTION_ITEM in option;\n\nconst toActionItemRow = (\n\titem: ComboboxActionItem,\n\ttype: ActionItemRow['type']\n): ActionItemRow => ({\n\tid: item.id || '',\n\ticon: item.icon,\n\tlabel: item.label,\n\tdisabled: item.disabled,\n\ttype,\n\t[ACTION_ITEM]: item,\n});\n\n/**\n * Argument passed to `renderMenuItem`\n */\nexport interface ComboboxRenderMenuItemData extends MenuRenderMenuItemData {\n\t/** The combobox's assistive text */\n\tassistiveText: ComboboxAssistiveText;\n}\n\n/**\n * Component accepted by the deprecated `onRenderMenuItem` and `menuItem` props\n */\ntype ComboboxLegacyMenuItem = React.ComponentType<{\n\tassistiveText?: ComboboxAssistiveText;\n\tselected: boolean;\n\t/** Custom renderers only receive selectable rows */\n\toption: ComboboxItemOption | ComboboxDeselectOption;\n}>;\n\ninterface ComboboxBaseProps {\n\t/** aria-describedby attribute */\n\t'aria-describedby'?: string;\n\t/** CSS classes for combobox container */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** CSS classes for top level container */\n\tclassNameContainer?: string | string[] | Record<string, boolean>;\n\t/** CSS classes for dropdown menu */\n\tclassNameMenu?: string | string[] | Record<string, boolean>;\n\t/** CSS classes for menu sub header */\n\tclassNameMenuSubHeader?: string | string[] | Record<string, boolean>;\n\t/** Default input value for uncontrolled usage */\n\tdefaultValue?: string;\n\t/** Whether component is disabled */\n\tdisabled?: boolean;\n\t/** Entity combobox for grouped comboboxes */\n\tentityCombobox?: ReactNode;\n\t/** Error text to display */\n\terrorText?: string;\n\t/** Event callbacks */\n\tevents?: ComboboxEvents;\n\t/** Field level help tooltip */\n\tfieldLevelHelpTooltip?: ReactNode;\n\t/** Whether to show deselect option */\n\thasDeselect?: boolean;\n\t/** Whether to show input spinner */\n\thasInputSpinner?: boolean;\n\t/** Whether to show menu spinner */\n\thasMenuSpinner?: boolean;\n\t/** Whether to use static alignment */\n\thasStaticAlignment?: boolean;\n\t/** HTML id */\n\tid?: string;\n\t/** Sets dialog width inheritance */\n\tinheritWidthOf?: 'target' | 'menu' | 'none';\n\t/** Custom input component */\n\tinput?: ReactElement;\n\t/** Callback to get input ref */\n\tinputRef?: (ref: HTMLInputElement | null) => void;\n\t/** Whether the dropdown is open (controlled) */\n\tisOpen?: boolean;\n\t/** Text labels */\n\tlabels?: ComboboxLabels;\n\t/** Menu item visible length */\n\tmenuItemVisibleLength?: 5 | 7 | 10;\n\t/** Menu max width */\n\tmenuMaxWidth?: string;\n\t/** Menu position */\n\tmenuPosition?: 'absolute' | 'overflowBoundaryElement' | 'relative';\n\t/** Whether multiple selection is allowed */\n\tmultiple?: boolean;\n\t/**\n\t * @deprecated Use `renderMenuItem`, which is called as a function with\n\t * `{ assistiveText, isSelected, option }`.\n\t */\n\tonRenderMenuItem?: ComboboxLegacyMenuItem;\n\t/** Action items shown below the options, such as \"New Account\" */\n\toptionsAddItem?: ComboboxActionItem[];\n\t/** Action items shown above the options, such as \"Search in Accounts\" */\n\toptionsSearchEntity?: ComboboxActionItem[];\n\t/** Whether only predefined options are allowed */\n\tpredefinedOptionsOnly?: boolean;\n\t/** Whether field is required */\n\trequired?: boolean;\n\t/** Selected options */\n\tselection: ComboboxOption[];\n\t/** Callback to get selected listbox ref */\n\tselectedListboxRef?: (ref: HTMLUListElement | null) => void;\n\t/** Whether single input is disabled */\n\tsingleInputDisabled?: boolean;\n\t/** Tooltip for disabled menu items */\n\ttooltipMenuItemDisabled?: ReactElement;\n\t/** Input value (controlled) */\n\tvalue?: string;\n\t/**\n\t * Renders each option's content in place of the default label and icon.\n\t * Receives `{ assistiveText, isSelected, option }`.\n\t */\n\trenderMenuItem?: (data: ComboboxRenderMenuItemData) => ReactNode;\n\t/** @deprecated Use `renderMenuItem` instead. */\n\tmenuItem?: ComboboxLegacyMenuItem;\n}\n\n/**\n * `variant` decides where the menu content comes from: `options` for the\n * listbox variants, or a custom `popover` dialog.\n */\nexport type ComboboxVariantProps =\n\t| {\n\t\t\t/** Listbox variants. Defaults to `base`. */\n\t\t\tvariant?: 'base' | 'inline-listbox' | 'readonly';\n\t\t\t/** Assistive text for accessibility */\n\t\t\tassistiveText?: ComboboxAssistiveText;\n\t\t\t/** Menu options */\n\t\t\toptions: ComboboxOption[];\n\t\t\tpopover?: never;\n\t }\n\t| {\n\t\t\t/** Custom dialog content instead of a listbox */\n\t\t\tvariant: 'popover';\n\t\t\t/** Assistive text for accessibility. `popoverLabel` labels the dialog. */\n\t\t\tassistiveText: ComboboxAssistiveText & { popoverLabel: string };\n\t\t\toptions?: never;\n\t\t\t/** Popover component rendered as the dialog */\n\t\t\tpopover: ReactElement;\n\t };\n\nexport type ComboboxProps = ComboboxBaseProps & ComboboxVariantProps;\n\n// ===== Default Props =====\n\nconst defaultAssistiveText: Required<ComboboxAssistiveText> = {\n\tlabel: '',\n\tloadingMenuItems: 'Loading',\n\toptionSelectedInMenu: 'Current Selection:',\n\tpopoverLabel: '',\n\tremoveSingleSelectedOption: 'Remove selected option',\n\tremovePill: ', Press delete or backspace to remove',\n\tselectedListboxLabel: 'Selected Options:',\n};\n\nconst defaultLabels: Required<ComboboxLabels> = {\n\tdeselectOption: 'None',\n\tlabel: '',\n\tcancelButton: 'Cancel',\n\tdoneButton: 'Done',\n\tmultipleOptionsSelected: '',\n\tnoOptionsFound: 'No matches found.',\n\tplaceholder: '',\n\tplaceholderReadOnly: 'Select an Option',\n\tremovePillTitle: 'Remove',\n\toptionDisabledTooltipLabel: 'This option is disabled.',\n\tinputIconTitle: '',\n};\n\nconst defaultEvents: ComboboxEvents = {};\n\n// ===== Component =====\n\nconst Combobox: React.FC<ComboboxProps> = (props) => {\n\tconst {\n\t\tassistiveText: assistiveTextProp = {},\n\t\t'aria-describedby': ariaDescribedby,\n\t\tclassName,\n\t\tclassNameContainer,\n\t\tclassNameMenu,\n\t\tclassNameMenuSubHeader,\n\t\tdefaultValue,\n\t\tdisabled,\n\t\tentityCombobox,\n\t\terrorText,\n\t\tevents: eventsProp = {},\n\t\tfieldLevelHelpTooltip,\n\t\thasDeselect,\n\t\thasInputSpinner,\n\t\thasMenuSpinner,\n\t\thasStaticAlignment,\n\t\tid: idProp,\n\t\tinheritWidthOf = 'target',\n\t\tinput,\n\t\tinputRef: inputRefCallback,\n\t\tisOpen: isOpenProp,\n\t\tlabels: labelsProp = {},\n\t\tmenuItemVisibleLength,\n\t\tmenuMaxWidth,\n\t\tmenuPosition = 'absolute',\n\t\tmultiple,\n\t\tonRenderMenuItem,\n\t\toptions = [],\n\t\toptionsAddItem = [],\n\t\toptionsSearchEntity = [],\n\t\tpopover,\n\t\tpredefinedOptionsOnly,\n\t\trequired = false,\n\t\tselection = [],\n\t\tselectedListboxRef: selectedListboxRefCallback,\n\t\tsingleInputDisabled = false,\n\t\ttooltipMenuItemDisabled,\n\t\tvalue,\n\t\tvariant = 'base',\n\t\trenderMenuItem: renderMenuItemProp,\n\t\tmenuItem,\n\t} = props;\n\n\t// Merge with defaults\n\tconst assistiveText = assign({}, defaultAssistiveText, assistiveTextProp);\n\tconst labels = assign({}, defaultLabels, labelsProp);\n\tconst events = assign({}, defaultEvents, eventsProp);\n\n\t// Context\n\tconst iconSettingsContext = useContext(IconSettingsContext);\n\n\t// Refs\n\tconst inputRef = useRef<HTMLInputElement | null>(null);\n\tconst menuRef = useRef<HTMLUListElement | null>(null);\n\tconst selectedListboxRef = useRef<HTMLUListElement | null>(null);\n\tconst activeSelectedOptionRef = useRef<HTMLElement | null>(null);\n\tconst buttonRef = useRef<HTMLButtonElement | null>(null);\n\tconst menuKeyBuffer = useRef(new KeyBuffer());\n\n\t// Generated IDs\n\tconst generatedId = useRef(generateId());\n\tconst generatedErrorId = useRef(generateId());\n\tconst getId = useCallback(() => idProp || generatedId.current, [idProp]);\n\tconst deselectId = `${getId()}-deselect`;\n\n\t// State\n\tconst [activeOption, setActiveOption] = useState<ComboboxOption | undefined>(\n\t\tundefined\n\t);\n\tconst [activeOptionIndex, setActiveOptionIndex] = useState(-1);\n\tconst [activeSelectedOption, setActiveSelectedOption] = useState<\n\t\tComboboxOption | undefined\n\t>(selection?.[0]);\n\tconst [activeSelectedOptionIndex, setActiveSelectedOptionIndex] = useState(0);\n\tconst [listboxHasFocus, setListboxHasFocus] = useState(false);\n\tconst [isOpenState, setIsOpenState] = useState(\n\t\ttypeof isOpenProp === 'boolean' ? isOpenProp : false\n\t);\n\tconst [inputRendered, setInputRendered] = useState(false);\n\n\t// Check props on mount\n\tuseEffect(() => {\n\t\tcheckProps(\n\t\t\tCOMBOBOX,\n\t\t\tprops as unknown as Record<string, unknown>,\n\t\t\tcomponentDoc\n\t\t);\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, []);\n\n\t// Derived state\n\tconst getIsOpen = useCallback(() => {\n\t\treturn !!(typeof isOpenProp === 'boolean' ? isOpenProp : isOpenState);\n\t}, [isOpenProp, isOpenState]);\n\n\tconst getIsActiveOption = useCallback(() => {\n\t\treturn activeOption && activeOptionIndex !== -1;\n\t}, [activeOption, activeOptionIndex]);\n\n\tconst getErrorId = useCallback(() => {\n\t\treturn ariaDescribedby || (errorText && generatedErrorId.current);\n\t}, [ariaDescribedby, errorText]);\n\n\t// Build options list\n\tconst getOptions = useCallback(() => {\n\t\tconst deselectOption: ComboboxOption = {\n\t\t\tid: deselectId,\n\t\t\tlabel: labels.deselectOption,\n\t\t\tvalue: '',\n\t\t\ttype: 'deselect',\n\t\t};\n\n\t\tconst localOptionsSearchEntity = optionsSearchEntity.map((item) =>\n\t\t\ttoActionItemRow(item, 'header')\n\t\t);\n\n\t\tconst localOptionsAddItem = optionsAddItem.map((item) =>\n\t\t\ttoActionItemRow(item, 'footer')\n\t\t);\n\n\t\treturn [\n\t\t\t...(localOptionsSearchEntity.length > 0 ? localOptionsSearchEntity : []),\n\t\t\t...(hasDeselect ? [deselectOption] : []),\n\t\t\t...(options && options.length > 0 ? options : []),\n\t\t\t...(localOptionsAddItem.length > 0 ? localOptionsAddItem : []),\n\t\t];\n\t}, [\n\t\tdeselectId,\n\t\tlabels.deselectOption,\n\t\toptionsSearchEntity,\n\t\toptionsAddItem,\n\t\thasDeselect,\n\t\toptions,\n\t]);\n\n\tconst isSelected = useCallback(\n\t\t({\n\t\t\tselection: sel,\n\t\t\toption,\n\t\t}: {\n\t\t\tselection: ComboboxOption[];\n\t\t\toption: ComboboxOption;\n\t\t}) => {\n\t\t\treturn !!find(sel, option);\n\t\t},\n\t\t[]\n\t);\n\n\t// Get new active option index (for navigation)\n\tconst getNewActiveOptionIndex = useCallback(\n\t\t({\n\t\t\tactiveOptionIndex: currentIndex,\n\t\t\toffset,\n\t\t\toptions: opts,\n\t\t}: {\n\t\t\tactiveOptionIndex: number;\n\t\t\toffset: number;\n\t\t\toptions: ComboboxOption[];\n\t\t}) => {\n\t\t\tconst nextIndex = currentIndex + offset;\n\t\t\tconst skipIndex =\n\t\t\t\topts.length > nextIndex &&\n\t\t\t\tnextIndex >= 0 &&\n\t\t\t\topts[nextIndex].type === 'separator';\n\t\t\tconst newIndex = skipIndex ? nextIndex + offset : nextIndex;\n\t\t\tconst hasNewIndex = opts.length > nextIndex && nextIndex >= 0;\n\t\t\treturn hasNewIndex ? newIndex : currentIndex;\n\t\t},\n\t\t[]\n\t);\n\n\t// ===== Event Handlers =====\n\n\tconst handleClose = useCallback(\n\t\t(event?: React.SyntheticEvent, { trigger }: { trigger?: string } = {}) => {\n\t\t\tconst isOpen = getIsOpen();\n\n\t\t\tif (isOpen) {\n\t\t\t\tif (\n\t\t\t\t\tcurrentOpenDropdown &&\n\t\t\t\t\tcurrentOpenDropdown.handleClose === handleClose\n\t\t\t\t) {\n\t\t\t\t\tcurrentOpenDropdown = undefined;\n\t\t\t\t}\n\n\t\t\t\tsetActiveOption(undefined);\n\t\t\t\tsetActiveOptionIndex(-1);\n\t\t\t\tsetIsOpenState(false);\n\n\t\t\t\tif (variant === 'popover' && trigger === 'cancel') {\n\t\t\t\t\tconst popoverProps = popover?.props as\n\t\t\t\t\t\t| { onClose?: (event: unknown, data: { trigger: string }) => void }\n\t\t\t\t\t\t| undefined;\n\t\t\t\t\tif (popoverProps?.onClose) {\n\t\t\t\t\t\tpopoverProps.onClose(event, { trigger });\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (events.onClose) {\n\t\t\t\t\tevents.onClose(event, {});\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t[getIsOpen, variant, popover, events]\n\t);\n\n\tconst handleOpen = useCallback(\n\t\t(event?: React.SyntheticEvent, data?: Record<string, unknown>) => {\n\t\t\tconst isOpen = getIsOpen();\n\n\t\t\tif (!isOpen) {\n\t\t\t\tif (\n\t\t\t\t\tcurrentOpenDropdown &&\n\t\t\t\t\tisFunction(currentOpenDropdown.handleClose)\n\t\t\t\t) {\n\t\t\t\t\tcurrentOpenDropdown.handleClose();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcurrentOpenDropdown = { handleClose };\n\n\t\t\t\tsetIsOpenState(true);\n\n\t\t\t\tif (events.onOpen) {\n\t\t\t\t\tevents.onOpen(event, data || {});\n\t\t\t\t}\n\n\t\t\t\tif (variant === 'readonly') {\n\t\t\t\t\tconst opts = getOptions();\n\t\t\t\t\tconst idx = findIndex(opts, (item) => isEqual(item, selection[0]));\n\n\t\t\t\t\tsetActiveOptionIndex(idx);\n\t\t\t\t\tsetActiveOption(selection[0]);\n\n\t\t\t\t\tif (menuRef.current !== null) {\n\t\t\t\t\t\tmenuItemSelectScroll({\n\t\t\t\t\t\t\tcontainer: menuRef.current,\n\t\t\t\t\t\t\tfocusedIndex: idx,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t[getIsOpen, handleClose, events, variant, getOptions, selection]\n\t);\n\n\tconst handleRequestClose = useCallback(\n\t\t(event: React.SyntheticEvent, data: Record<string, unknown>) => {\n\t\t\tif (events.onRequestClose) {\n\t\t\t\tevents.onRequestClose(event, data);\n\t\t\t}\n\t\t\tif (getIsOpen()) {\n\t\t\t\thandleClose(event, { trigger: 'cancel' });\n\t\t\t}\n\t\t},\n\t\t[events, getIsOpen, handleClose]\n\t);\n\n\tconst openDialog = useCallback(() => {\n\t\tif (events.onRequestOpen) {\n\t\t\tevents.onRequestOpen();\n\t\t} else {\n\t\t\tsetIsOpenState(true);\n\t\t}\n\t}, [events]);\n\n\tconst requestOpenMenu = useCallback(() => {\n\t\tconst isInlineSingleSelectionAndIsNotSelected =\n\t\t\t!multiple && selection.length === 0 && variant === 'inline-listbox';\n\n\t\tif (\n\t\t\tisInlineSingleSelectionAndIsNotSelected ||\n\t\t\tmultiple ||\n\t\t\tvariant === 'readonly'\n\t\t) {\n\t\t\topenDialog();\n\t\t}\n\t}, [multiple, selection.length, variant, openDialog]);\n\n\tconst handleClickOutside = useCallback(\n\t\t(event: MouseEvent | TouchEvent) => {\n\t\t\thandleRequestClose(event as unknown as React.SyntheticEvent, {});\n\t\t},\n\t\t[handleRequestClose]\n\t);\n\n\tconst handleSelect = useCallback(\n\t\t(\n\t\t\tevent: React.SyntheticEvent,\n\t\t\t{\n\t\t\t\tselection: sel,\n\t\t\t\toption,\n\t\t\t}: { selection: ComboboxOption[]; option: ComboboxOption }\n\t\t) => {\n\t\t\tif (isActionItemRow(option)) {\n\t\t\t\tconst actionItem = option[ACTION_ITEM];\n\t\t\t\tconst actionEvent = event as React.MouseEvent | React.KeyboardEvent;\n\t\t\t\tactionItem.onClick?.(actionEvent, { option: actionItem });\n\t\t\t\tevents.onSelectActionItem?.(actionEvent, {\n\t\t\t\t\toption: actionItem,\n\t\t\t\t\tvalue: inputRef.current?.value ?? '',\n\t\t\t\t});\n\t\t\t\thandleClose();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet newSelection: ComboboxOption[];\n\t\t\tconst selected = isSelected({ selection: sel, option });\n\t\t\tconst singleSelectAndSelectedWasNotClicked = !multiple && !selected;\n\t\t\tconst multiSelectAndSelectedWasNotClicked = multiple && !selected;\n\t\t\tconst deselectWasClicked = option.id === deselectId;\n\n\t\t\tif (deselectWasClicked) {\n\t\t\t\tnewSelection = [];\n\t\t\t} else if (singleSelectAndSelectedWasNotClicked) {\n\t\t\t\tnewSelection = [option];\n\t\t\t} else if (multiSelectAndSelectedWasNotClicked) {\n\t\t\t\tnewSelection = [...selection, option];\n\t\t\t} else {\n\t\t\t\tnewSelection = reject(selection, option);\n\t\t\t}\n\n\t\t\tif (events.onSelect) {\n\t\t\t\tevents.onSelect(event, { selection: newSelection });\n\t\t\t}\n\n\t\t\thandleClose();\n\t\t},\n\t\t[isSelected, multiple, deselectId, selection, events, handleClose]\n\t);\n\n\tconst handleInputBlur = useCallback(\n\t\t(event: React.FocusEvent) => {\n\t\t\tsetTimeout(() => {\n\t\t\t\tconst activeElement = documentDefined ? document.activeElement : null;\n\t\t\t\tif (\n\t\t\t\t\tactiveElement &&\n\t\t\t\t\tactiveElement.tagName === 'DIV' &&\n\t\t\t\t\tactiveElement.id === `${getId()}-listbox`\n\t\t\t\t) {\n\t\t\t\t\tif (inputRef.current) {\n\t\t\t\t\t\tinputRef.current.focus();\n\t\t\t\t\t}\n\t\t\t\t} else if (!popover) {\n\t\t\t\t\thandleClose(event);\n\t\t\t\t}\n\t\t\t}, 200);\n\n\t\t\tif (events.onBlur) {\n\t\t\t\tevents.onBlur(event);\n\t\t\t}\n\t\t},\n\t\t[getId, popover, handleClose, events]\n\t);\n\n\tconst handleInputChange = useCallback(\n\t\t(event: React.ChangeEvent<HTMLInputElement>) => {\n\t\t\trequestOpenMenu();\n\t\t\tif (events.onChange) {\n\t\t\t\tevents.onChange(event, { value: event.target.value });\n\t\t\t}\n\t\t},\n\t\t[requestOpenMenu, events]\n\t);\n\n\tconst handleInputFocus = useCallback(\n\t\t(event: React.FocusEvent) => {\n\t\t\tif (events.onFocus) {\n\t\t\t\tevents.onFocus(event, {});\n\t\t\t}\n\t\t},\n\t\t[events]\n\t);\n\n\tconst handleInputSubmit = useCallback(\n\t\t(event: React.KeyboardEvent) => {\n\t\t\tif (activeOption === undefined && activeOptionIndex === -1) {\n\t\t\t\tif (!isOpenState) {\n\t\t\t\t\tif (!event.shiftKey) {\n\t\t\t\t\t\topenDialog();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\thandleRequestClose(event, {});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (activeOption?.disabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Legacy: `type: 'header' | 'footer'` rows passed directly in `options`\n\t\t\t// keep their pre-v11 Enter behavior of calling `option.onClick`.\n\t\t\tif (\n\t\t\t\tactiveOption &&\n\t\t\t\t!isActionItemRow(activeOption) &&\n\t\t\t\t(activeOption.type === 'header' || activeOption.type === 'footer')\n\t\t\t) {\n\t\t\t\tactiveOption.onClick?.(event as unknown as React.MouseEvent);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (getIsActiveOption()) {\n\t\t\t\thandleSelect(event, {\n\t\t\t\t\toption: activeOption!,\n\t\t\t\t\tselection,\n\t\t\t\t});\n\t\t\t} else if (\n\t\t\t\t!predefinedOptionsOnly &&\n\t\t\t\t(event.target as HTMLInputElement).value !== '' &&\n\t\t\t\tevents.onSubmit\n\t\t\t) {\n\t\t\t\tevents.onSubmit(event, {\n\t\t\t\t\tvalue: (event.target as HTMLInputElement).value,\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\t[\n\t\t\tactiveOption,\n\t\t\tactiveOptionIndex,\n\t\t\tisOpenState,\n\t\t\topenDialog,\n\t\t\thandleRequestClose,\n\t\t\tgetIsActiveOption,\n\t\t\thandleSelect,\n\t\t\tselection,\n\t\t\tpredefinedOptionsOnly,\n\t\t\tevents,\n\t\t]\n\t);\n\n\tconst handleNavigateListboxMenu = useCallback(\n\t\t(\n\t\t\tevent: React.KeyboardEvent,\n\t\t\t{ direction }: { direction: 'next' | 'previous' }\n\t\t) => {\n\t\t\tconst offsets = { next: 1, previous: -1 };\n\t\t\tconst opts = getOptions();\n\t\t\tconst newIndex = getNewActiveOptionIndex({\n\t\t\t\tactiveOptionIndex,\n\t\t\t\toffset: offsets[direction],\n\t\t\t\toptions: opts,\n\t\t\t});\n\n\t\t\tif (getIsOpen() && menuRef.current) {\n\t\t\t\tmenuItemSelectScroll({\n\t\t\t\t\tcontainer: menuRef.current,\n\t\t\t\t\tfocusedIndex: newIndex,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tsetActiveOption(opts[newIndex]);\n\t\t\tsetActiveOptionIndex(newIndex);\n\t\t},\n\t\t[getOptions, getNewActiveOptionIndex, activeOptionIndex, getIsOpen]\n\t);\n\n\tconst handleNavigateSelectedListbox = useCallback(\n\t\t(\n\t\t\tevent: React.SyntheticEvent,\n\t\t\t{ direction }: { direction: 'next' | 'previous' }\n\t\t) => {\n\t\t\tconst offsets = { next: 1, previous: -1 };\n\t\t\tconst isLastOptionAndRightIsPressed =\n\t\t\t\tactiveSelectedOptionIndex + 1 === selection.length &&\n\t\t\t\tdirection === 'next';\n\t\t\tconst isFirstOptionAndLeftIsPressed =\n\t\t\t\tactiveSelectedOptionIndex === 0 && direction === 'previous';\n\n\t\t\tif (isLastOptionAndRightIsPressed) {\n\t\t\t\tsetActiveSelectedOption(selection[0]);\n\t\t\t\tsetActiveSelectedOptionIndex(0);\n\t\t\t\tsetListboxHasFocus(true);\n\t\t\t} else if (isFirstOptionAndLeftIsPressed) {\n\t\t\t\tsetActiveSelectedOption(selection[selection.length - 1]);\n\t\t\t\tsetActiveSelectedOptionIndex(selection.length - 1);\n\t\t\t\tsetListboxHasFocus(true);\n\t\t\t} else {\n\t\t\t\tconst newIndex = getNewActiveOptionIndex({\n\t\t\t\t\tactiveOptionIndex: activeSelectedOptionIndex,\n\t\t\t\t\toffset: offsets[direction],\n\t\t\t\t\toptions: selection,\n\t\t\t\t});\n\t\t\t\tsetActiveSelectedOption(selection[newIndex]);\n\t\t\t\tsetActiveSelectedOptionIndex(newIndex);\n\t\t\t\tsetListboxHasFocus(true);\n\t\t\t}\n\t\t},\n\t\t[activeSelectedOptionIndex, selection, getNewActiveOptionIndex]\n\t);\n\n\tconst handleKeyDownDown = useCallback(\n\t\t(event: React.KeyboardEvent) => {\n\t\t\tif (!event.shiftKey) {\n\t\t\t\topenDialog();\n\t\t\t}\n\n\t\t\tif (variant !== 'popover') {\n\t\t\t\thandleNavigateListboxMenu(event, { direction: 'next' });\n\t\t\t}\n\t\t},\n\t\t[openDialog, variant, handleNavigateListboxMenu]\n\t);\n\n\tconst handleKeyDownUp = useCallback(\n\t\t(event: React.KeyboardEvent) => {\n\t\t\tif (!event.shiftKey && getIsOpen()) {\n\t\t\t\thandleNavigateListboxMenu(event, { direction: 'previous' });\n\t\t\t}\n\t\t},\n\t\t[getIsOpen, handleNavigateListboxMenu]\n\t);\n\n\tconst handleKeyDownTab = useCallback(() => {\n\t\tif (selectedListboxRef.current) {\n\t\t\tsetListboxHasFocus(true);\n\t\t}\n\t}, []);\n\n\tconst handleKeyDownOther = useCallback(\n\t\t(event: React.KeyboardEvent) => {\n\t\t\tconst opts = getOptions();\n\t\t\tconst newActiveOptionIndex = keyLetterMenuItemSelect({\n\t\t\t\tkey: event.key,\n\t\t\t\tkeyBuffer: menuKeyBuffer.current,\n\t\t\t\tkeyCode: event.keyCode,\n\t\t\t\toptions: opts,\n\t\t\t});\n\n\t\t\tif (newActiveOptionIndex !== undefined) {\n\t\t\t\tif (getIsOpen() && menuRef.current) {\n\t\t\t\t\tmenuItemSelectScroll({\n\t\t\t\t\t\tcontainer: menuRef.current,\n\t\t\t\t\t\tfocusedIndex: newActiveOptionIndex,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tsetActiveOption(opts[newActiveOptionIndex]);\n\t\t\t\tsetActiveOptionIndex(newActiveOptionIndex);\n\t\t\t}\n\t\t},\n\t\t[getOptions, getIsOpen]\n\t);\n\n\tconst handleKeyDown = useCallback(\n\t\t(event: React.KeyboardEvent) => {\n\t\t\tconst callbacks: Record<\n\t\t\t\tnumber | string,\n\t\t\t\t| {\n\t\t\t\t\t\tcallback: (e: React.KeyboardEvent) => void;\n\t\t\t\t\t\tstopPropagation?: boolean;\n\t\t\t\t }\n\t\t\t\t| undefined\n\t\t\t> = {\n\t\t\t\t[KEYS.DOWN]: { callback: handleKeyDownDown },\n\t\t\t\t[KEYS.ENTER]: { callback: handleInputSubmit },\n\t\t\t\t[KEYS.ESCAPE]: {\n\t\t\t\t\tcallback: handleClose as (e: React.KeyboardEvent) => void,\n\t\t\t\t},\n\t\t\t\t[KEYS.UP]: { callback: handleKeyDownUp },\n\t\t\t};\n\n\t\t\tif (variant === 'readonly') {\n\t\t\t\tif (selection.length > 2) {\n\t\t\t\t\tcallbacks[KEYS.TAB] = { callback: handleKeyDownTab };\n\t\t\t\t} else {\n\t\t\t\t\tcallbacks[KEYS.TAB] = undefined;\n\t\t\t\t}\n\t\t\t\tcallbacks.other = {\n\t\t\t\t\tcallback: handleKeyDownOther,\n\t\t\t\t\tstopPropagation: false,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst stopPropagation = getIsOpen();\n\n\t\t\tmapKeyEventCallbacks(event, { callbacks, stopPropagation });\n\t\t},\n\t\t[\n\t\t\thandleKeyDownDown,\n\t\t\thandleInputSubmit,\n\t\t\thandleClose,\n\t\t\thandleKeyDownUp,\n\t\t\tvariant,\n\t\t\tselection.length,\n\t\t\thandleKeyDownTab,\n\t\t\thandleKeyDownOther,\n\t\t\tgetIsOpen,\n\t\t]\n\t);\n\n\tconst handleBlurPill = useCallback(() => {\n\t\tsetListboxHasFocus(false);\n\t}, []);\n\n\tconst handlePillFocus = useCallback(\n\t\t(\n\t\t\tevent: React.FocusEvent,\n\t\t\t{ option, index }: { option: ComboboxOption; index: number }\n\t\t) => {\n\t\t\tif (!listboxHasFocus) {\n\t\t\t\tsetActiveSelectedOption(option);\n\t\t\t\tsetActiveSelectedOptionIndex(index);\n\t\t\t\tsetListboxHasFocus(true);\n\t\t\t}\n\t\t},\n\t\t[listboxHasFocus]\n\t);\n\n\tconst handleRemoveSelectedOption = useCallback(\n\t\t(\n\t\t\tevent: React.SyntheticEvent,\n\t\t\t{ option, index }: { option: ComboboxOption; index?: number }\n\t\t) => {\n\t\t\tevent.preventDefault();\n\t\t\tconst onlyOnePillAndInputExists = selection.length === 1;\n\t\t\tconst isReadOnlyAndTwoPillsExists =\n\t\t\t\tselection.length === 2 && variant === 'readonly' && multiple;\n\t\t\tconst lastPillWasRemoved =\n\t\t\t\tindex !== undefined && index + 1 === selection.length;\n\n\t\t\tif (\n\t\t\t\t(onlyOnePillAndInputExists || isReadOnlyAndTwoPillsExists) &&\n\t\t\t\tinputRef.current\n\t\t\t) {\n\t\t\t\tinputRef.current.focus();\n\t\t\t} else if (lastPillWasRemoved && index !== undefined) {\n\t\t\t\tsetActiveSelectedOption(selection[index - 1]);\n\t\t\t\tsetActiveSelectedOptionIndex(index - 1);\n\t\t\t\tsetListboxHasFocus(true);\n\t\t\t} else if (index !== undefined) {\n\t\t\t\tsetActiveSelectedOption(selection[index + 1]);\n\t\t\t\tsetActiveSelectedOptionIndex(index);\n\t\t\t\tsetListboxHasFocus(true);\n\t\t\t}\n\n\t\t\tif (events.onRequestRemoveSelectedOption) {\n\t\t\t\tevents.onRequestRemoveSelectedOption(event, {\n\t\t\t\t\tselection: reject(selection, option),\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\t[selection, variant, multiple, events]\n\t);\n\n\tconst handleRequestFocusSelectedListbox = useCallback(\n\t\t(event: React.SyntheticEvent, { ref }: { ref: HTMLElement | null }) => {\n\t\t\tif (ref) {\n\t\t\t\tactiveSelectedOptionRef.current = ref;\n\t\t\t\tactiveSelectedOptionRef.current.focus();\n\t\t\t}\n\t\t},\n\t\t[]\n\t);\n\n\t// ===== Refs =====\n\n\tconst setInputRefCallback = useCallback(\n\t\t(component: HTMLInputElement | null) => {\n\t\t\tinputRef.current = component;\n\t\t\tif (!inputRendered) {\n\t\t\t\tsetInputRendered(true);\n\t\t\t}\n\t\t\tif (inputRefCallback) {\n\t\t\t\tinputRefCallback(component);\n\t\t\t}\n\t\t},\n\t\t[inputRendered, inputRefCallback]\n\t);\n\n\tconst setSelectedListboxRefCallback = useCallback(\n\t\t(ref: HTMLUListElement | null) => {\n\t\t\tselectedListboxRef.current = ref;\n\t\t\tif (selectedListboxRefCallback) {\n\t\t\t\tselectedListboxRefCallback(ref);\n\t\t\t}\n\t\t},\n\t\t[selectedListboxRefCallback]\n\t);\n\n\tconst setMenuRefCallback = useCallback((ref: HTMLUListElement | null) => {\n\t\tmenuRef.current = ref;\n\t}, []);\n\n\tconst getTargetElement = useCallback(() => inputRef.current, []);\n\n\t// ===== Effects =====\n\n\t// Sync controlled isOpen prop\n\tuseEffect(() => {\n\t\tif (typeof isOpenProp === 'boolean') {\n\t\t\tsetIsOpenState(isOpenProp);\n\t\t\tif (!isOpenProp) {\n\t\t\t\tsetActiveOption(undefined);\n\t\t\t\tsetActiveOptionIndex(-1);\n\t\t\t}\n\t\t}\n\t}, [isOpenProp]);\n\n\t// Handle options change - maintain active highlight\n\tuseEffect(() => {\n\t\tconst opts = getOptions();\n\t\tif (activeOption) {\n\t\t\tconst index = findIndex(opts, (item) => isEqual(item, activeOption));\n\t\t\tif (index !== -1) {\n\t\t\t\tsetActiveOptionIndex(index);\n\t\t\t} else {\n\t\t\t\tsetActiveOption(undefined);\n\t\t\t\tsetActiveOptionIndex(-1);\n\t\t\t}\n\t\t}\n\t}, [options, getOptions, activeOption]);\n\n\t// Handle selection change - keep the active selected option and its roving\n\t// tabindex in sync with `selection`. Besides seeding the initial active\n\t// pill, this clamps the active index when `selection` shrinks. Without the\n\t// clamp, a controlled parent removing a pill through any path other than\n\t// the built-in remove handler could leave the active index pointing past\n\t// the end of `selection`, so no pill receives tabindex=0 and the selected-\n\t// pill listbox becomes unreachable by keyboard (WCAG 2.1.1 / 2.4.3).\n\tuseEffect(() => {\n\t\tif (selection.length === 0) {\n\t\t\tif (activeSelectedOption !== undefined) {\n\t\t\t\tsetActiveSelectedOption(undefined);\n\t\t\t\tsetActiveSelectedOptionIndex(0);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tif (!activeSelectedOption || !selection[activeSelectedOptionIndex]) {\n\t\t\tconst clampedIndex =\n\t\t\t\tactiveSelectedOptionIndex >= selection.length\n\t\t\t\t\t? selection.length - 1\n\t\t\t\t\t: activeSelectedOptionIndex;\n\t\t\tsetActiveSelectedOption(selection[clampedIndex]);\n\t\t\tsetActiveSelectedOptionIndex(clampedIndex);\n\t\t}\n\t}, [selection, activeSelectedOption, activeSelectedOptionIndex]);\n\n\t// Cleanup on unmount\n\tuseEffect(() => {\n\t\treturn () => {\n\t\t\tif (\n\t\t\t\tcurrentOpenDropdown &&\n\t\t\t\tcurrentOpenDropdown.handleClose === handleClose\n\t\t\t) {\n\t\t\t\tcurrentOpenDropdown = undefined;\n\t\t\t}\n\t\t};\n\t}, [handleClose]);\n\n\t// ===== Render Helpers =====\n\n\tconst getCustomPopoverProps = useCallback(\n\t\t(body: ReactNode) => {\n\t\t\tconst popoverBody = (\n\t\t\t\t<div>\n\t\t\t\t\t<div className=\"slds-assistive-text\" id={`${getId()}-label`}>\n\t\t\t\t\t\t{assistiveText.popoverLabel}\n\t\t\t\t\t</div>\n\t\t\t\t\t{body}\n\t\t\t\t</div>\n\t\t\t);\n\n\t\t\tconst popoverFooter = (\n\t\t\t\t<div>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tlabel={labels.cancelButton}\n\t\t\t\t\t\tonClick={(e: React.MouseEvent) => {\n\t\t\t\t\t\t\thandleClose(e, { trigger: 'cancel' });\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tlabel={labels.doneButton}\n\t\t\t\t\t\tvariant=\"brand\"\n\t\t\t\t\t\tonClick={\n\t\t\t\t\t\t\thandleClose as unknown as (\n\t\t\t\t\t\t\t\tevent: React.MouseEvent<HTMLButtonElement>\n\t\t\t\t\t\t\t) => void\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t);\n\n\t\t\tconst defaultPopoverProps: Record<string, unknown> = {\n\t\t\t\tariaLabelledby: `${getId()}-label`,\n\t\t\t\talign: 'bottom',\n\t\t\t\tbody: popoverBody,\n\t\t\t\tclassNameDialog: 'slds-popover_full-width',\n\t\t\t\tfooter: popoverFooter,\n\t\t\t\tclassNameFooter: 'slds-popover__footer_form',\n\t\t\t\thasNoNubbin: true,\n\t\t\t\tid: getId(),\n\t\t\t\tisOpen: isOpenState,\n\t\t\t\thasNoTriggerStyles: true,\n\t\t\t\tonOpen: handleOpen,\n\t\t\t\tonClose: handleClose,\n\t\t\t\tonRequestClose: handleClose,\n\t\t\t};\n\n\t\t\tconst popoverPropsFromProp = popover?.props as\n\t\t\t\tRecord<string, unknown> | undefined;\n\t\t\tconst popoverProps = assign(\n\t\t\t\tdefaultPopoverProps,\n\t\t\t\tpopoverPropsFromProp || {}\n\t\t\t);\n\t\t\tpopoverProps.body = popoverBody;\n\n\t\t\tdelete popoverProps.children;\n\t\t\treturn popoverProps;\n\t\t},\n\t\t[\n\t\t\tgetId,\n\t\t\tassistiveText.popoverLabel,\n\t\t\tlabels.cancelButton,\n\t\t\tlabels.doneButton,\n\t\t\thandleClose,\n\t\t\tisOpenState,\n\t\t\thandleOpen,\n\t\t\tpopover,\n\t\t]\n\t);\n\n\tconst getDialog = useCallback(\n\t\t({ menuRenderer }: { menuRenderer: ReactNode }) => {\n\t\t\tconst position = menuPosition;\n\n\t\t\tif (!disabled && getIsOpen()) {\n\t\t\t\tconst dialogProps = {\n\t\t\t\t\talign: 'bottom left' as const,\n\t\t\t\t\tcontext: iconSettingsContext,\n\t\t\t\t\thasStaticAlignment,\n\t\t\t\t\tinheritWidthOf,\n\t\t\t\t\tonClose: handleClose,\n\t\t\t\t\tonMouseDown: (event: React.MouseEvent) => {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t},\n\t\t\t\t\tonOpen: handleOpen,\n\t\t\t\t\tonRequestTargetElement: getTargetElement,\n\t\t\t\t\tposition,\n\t\t\t\t\tcontainerProps: {\n\t\t\t\t\t\tid: `${getId()}-listbox`,\n\t\t\t\t\t\trole: 'listbox',\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t\treturn (\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t\t\t<Dialog {...(dialogProps as any)}>{menuRenderer}</Dialog>\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\t[\n\t\t\tmenuPosition,\n\t\t\tdisabled,\n\t\t\tgetIsOpen,\n\t\t\ticonSettingsContext,\n\t\t\thasStaticAlignment,\n\t\t\tinheritWidthOf,\n\t\t\thandleClose,\n\t\t\thandleOpen,\n\t\t\tgetTargetElement,\n\t\t\tgetId,\n\t\t]\n\t);\n\n\t// `onRenderMenuItem` and `menuItem` are deprecated: they take a component instead of a function\n\tconst LegacyMenuItem = onRenderMenuItem || menuItem;\n\tlet renderMenuItem: ((data: MenuRenderMenuItemData) => ReactNode) | undefined;\n\tif (renderMenuItemProp) {\n\t\trenderMenuItem = (data) => renderMenuItemProp({ ...data, assistiveText });\n\t} else if (LegacyMenuItem) {\n\t\trenderMenuItem = ({ isSelected, option }) => (\n\t\t\t<LegacyMenuItem\n\t\t\t\tassistiveText={assistiveText}\n\t\t\t\tselected={isSelected}\n\t\t\t\toption={option}\n\t\t\t/>\n\t\t);\n\t}\n\n\tconst renderMenu = useCallback(() => {\n\t\tconst menuVariant: Record<string, 'icon-title-subtitle' | 'checkbox'> = {\n\t\t\tbase: 'icon-title-subtitle',\n\t\t\t'inline-listbox': 'icon-title-subtitle',\n\t\t\treadonly: 'checkbox',\n\t\t};\n\n\t\tconst readonlyItemVisibleLength = variant === 'readonly' ? 5 : null;\n\n\t\treturn (\n\t\t\t<Menu\n\t\t\t\tassistiveText={assistiveText}\n\t\t\t\tactiveOption={activeOption}\n\t\t\t\tactiveOptionIndex={activeOptionIndex}\n\t\t\t\tclassNameMenu={classNameMenu}\n\t\t\t\tclassNameMenuSubHeader={classNameMenuSubHeader}\n\t\t\t\tinheritWidthOf={inheritWidthOf}\n\t\t\t\tinputId={getId()}\n\t\t\t\tinputValue={value}\n\t\t\t\tisSelected={isSelected}\n\t\t\t\titemVisibleLength={menuItemVisibleLength || readonlyItemVisibleLength}\n\t\t\t\tlabels={{ noOptionsFound: labels.noOptionsFound || '' }}\n\t\t\t\thasMenuSpinner={hasMenuSpinner}\n\t\t\t\tmenuPosition={menuPosition}\n\t\t\t\tmenuRef={setMenuRefCallback}\n\t\t\t\tmaxWidth={menuMaxWidth}\n\t\t\t\toptions={getOptions()}\n\t\t\t\tonSelect={\n\t\t\t\t\thandleSelect as (\n\t\t\t\t\t\tevent: React.MouseEvent,\n\t\t\t\t\t\tdata: { option: ComboboxOption; selection?: ComboboxOption[] }\n\t\t\t\t\t) => void\n\t\t\t\t}\n\t\t\t\trenderMenuItem={renderMenuItem}\n\t\t\t\tselection={selection}\n\t\t\t\ttooltipMenuItemDisabled={tooltipMenuItemDisabled}\n\t\t\t\tvariant={menuVariant[variant]}\n\t\t\t/>\n\t\t);\n\t}, [\n\t\tvariant,\n\t\tassistiveText,\n\t\tactiveOption,\n\t\tactiveOptionIndex,\n\t\tclassNameMenu,\n\t\tclassNameMenuSubHeader,\n\t\tinheritWidthOf,\n\t\tgetId,\n\t\tvalue,\n\t\tisSelected,\n\t\tmenuItemVisibleLength,\n\t\tlabels.noOptionsFound,\n\t\thasMenuSpinner,\n\t\tmenuPosition,\n\t\tsetMenuRefCallback,\n\t\tmenuMaxWidth,\n\t\tgetOptions,\n\t\thandleSelect,\n\t\trenderMenuItem,\n\t\tselection,\n\t\ttooltipMenuItemDisabled,\n\t]);\n\n\t// User defined props from input\n\tconst userDefinedInputProps = input?.props || {};\n\n\t// ===== Sub-renders =====\n\n\tconst renderBase = () => (\n\t\t<div className=\"slds-form-element__control\">\n\t\t\t<div className=\"slds-combobox_container\">\n\t\t\t\t<div\n\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t'slds-combobox',\n\t\t\t\t\t\t'slds-dropdown-trigger',\n\t\t\t\t\t\t'slds-dropdown-trigger_click',\n\t\t\t\t\t\t'ignore-react-onclickoutside',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'slds-is-open': getIsOpen(),\n\t\t\t\t\t\t\t'slds-has-error': errorText,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tclassName\n\t\t\t\t\t)}\n\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\taria-expanded={getIsOpen()}\n\t\t\t\t\taria-haspopup=\"listbox\"\n\t\t\t\t\taria-owns={getIsOpen() ? `${getId()}-listbox` : undefined}\n\t\t\t\t>\n\t\t\t\t\t<InnerInput\n\t\t\t\t\t\taria-autocomplete=\"list\"\n\t\t\t\t\t\taria-controls={getIsOpen() ? `${getId()}-listbox` : undefined}\n\t\t\t\t\t\taria-activedescendant={\n\t\t\t\t\t\t\tactiveOption\n\t\t\t\t\t\t\t\t? `${getId()}-listbox-option-${activeOption.id}`\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\taria-describedby={getErrorId()}\n\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\tclassName=\"slds-combobox__input\"\n\t\t\t\t\t\tcontainerProps={{\n\t\t\t\t\t\t\tclassName: 'slds-combobox__form-element',\n\t\t\t\t\t\t\trole: 'none',\n\t\t\t\t\t\t}}\n\t\t\t\t\t\thasSpinner={hasInputSpinner}\n\t\t\t\t\t\ticonRight={\n\t\t\t\t\t\t\t<InputIcon\n\t\t\t\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\t\t\t\tname=\"search\"\n\t\t\t\t\t\t\t\ttitle={labels.inputIconTitle}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t}\n\t\t\t\t\t\tid={getId()}\n\t\t\t\t\t\tonFocus={handleInputFocus}\n\t\t\t\t\t\tonBlur={handleInputBlur}\n\t\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\t\tinputRef={setInputRefCallback}\n\t\t\t\t\t\tonClick={() => openDialog()}\n\t\t\t\t\t\tonChange={handleInputChange}\n\t\t\t\t\t\tplaceholder={labels.placeholder}\n\t\t\t\t\t\tdefaultValue={defaultValue}\n\t\t\t\t\t\treadOnly={!!(predefinedOptionsOnly && activeOption)}\n\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\trole=\"textbox\"\n\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\tpredefinedOptionsOnly\n\t\t\t\t\t\t\t\t? (activeOption?.label as string) || value\n\t\t\t\t\t\t\t\t: value\n\t\t\t\t\t\t}\n\t\t\t\t\t\t{...userDefinedInputProps}\n\t\t\t\t\t/>\n\t\t\t\t\t{getDialog({ menuRenderer: renderMenu() })}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<SelectedListBox\n\t\t\t\tactiveOption={activeSelectedOption as SelectedListBoxOption}\n\t\t\t\tactiveOptionIndex={activeSelectedOptionIndex}\n\t\t\t\tassistiveText={\n\t\t\t\t\tassistiveText as unknown as {\n\t\t\t\t\t\tremovePill?: string;\n\t\t\t\t\t\tselectedListboxLabel?: string;\n\t\t\t\t\t\t[key: string]: unknown;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tevents={{\n\t\t\t\t\tonBlurPill: handleBlurPill,\n\t\t\t\t\tonPillFocus: handlePillFocus as (\n\t\t\t\t\t\tevent: React.FocusEvent,\n\t\t\t\t\t\tdata: { index: number; option: SelectedListBoxOption }\n\t\t\t\t\t) => void,\n\t\t\t\t\tonRequestFocus: handleRequestFocusSelectedListbox as (\n\t\t\t\t\t\tevent: unknown,\n\t\t\t\t\t\tdata: { ref: HTMLElement | null }\n\t\t\t\t\t) => void,\n\t\t\t\t\tonRequestFocusOnNextPill: handleNavigateSelectedListbox as (\n\t\t\t\t\t\tevent: React.SyntheticEvent,\n\t\t\t\t\t\tdata: { direction: 'next' | 'previous' }\n\t\t\t\t\t) => void,\n\t\t\t\t\tonRequestFocusOnPreviousPill: handleNavigateSelectedListbox as (\n\t\t\t\t\t\tevent: React.SyntheticEvent,\n\t\t\t\t\t\tdata: { direction: 'next' | 'previous' }\n\t\t\t\t\t) => void,\n\t\t\t\t\tonRequestRemove: handleRemoveSelectedOption as (\n\t\t\t\t\t\tevent:\n\t\t\t\t\t\t\tReact.MouseEvent | React.KeyboardEvent | React.SyntheticEvent,\n\t\t\t\t\t\tdata: { index?: number; option: SelectedListBoxOption }\n\t\t\t\t\t) => void,\n\t\t\t\t}}\n\t\t\t\tid={`${getId()}-selected-listbox`}\n\t\t\t\tlabels={labels}\n\t\t\t\tselectedListboxRef={setSelectedListboxRefCallback}\n\t\t\t\tselection={selection as SelectedListBoxOption[]}\n\t\t\t\tlistboxHasFocus={listboxHasFocus}\n\t\t\t\tmultiselectable={multiple}\n\t\t\t/>\n\t\t\t{errorText && (\n\t\t\t\t<div className=\"slds-has-error\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tid={getErrorId()}\n\t\t\t\t\t\tclassName=\"slds-form-element__help slds-has-error\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{errorText}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n\n\tconst renderInlineMultiple = () => (\n\t\t<div className=\"slds-form-element__control\">\n\t\t\t<div\n\t\t\t\tclassName={classNames('slds-combobox_container', {\n\t\t\t\t\t'slds-has-inline-listbox': selection.length,\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t{selection.length ? (\n\t\t\t\t\t<SelectedListBox\n\t\t\t\t\t\tactiveOption={activeSelectedOption as SelectedListBoxOption}\n\t\t\t\t\t\tactiveOptionIndex={activeSelectedOptionIndex}\n\t\t\t\t\t\tassistiveText={\n\t\t\t\t\t\t\tassistiveText as unknown as {\n\t\t\t\t\t\t\t\tremovePill?: string;\n\t\t\t\t\t\t\t\tselectedListboxLabel?: string;\n\t\t\t\t\t\t\t\t[key: string]: unknown;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcontainerRole=\"listbox\"\n\t\t\t\t\t\tcontainerAriaOrientation=\"horizontal\"\n\t\t\t\t\t\tlistboxRole=\"group\"\n\t\t\t\t\t\tlistboxAriaOrientation={null}\n\t\t\t\t\t\tevents={{\n\t\t\t\t\t\t\tonBlurPill: handleBlurPill,\n\t\t\t\t\t\t\tonPillFocus: handlePillFocus as (\n\t\t\t\t\t\t\t\tevent: React.FocusEvent,\n\t\t\t\t\t\t\t\tdata: { index: number; option: SelectedListBoxOption }\n\t\t\t\t\t\t\t) => void,\n\t\t\t\t\t\t\tonRequestFocus: handleRequestFocusSelectedListbox as (\n\t\t\t\t\t\t\t\tevent: unknown,\n\t\t\t\t\t\t\t\tdata: { ref: HTMLElement | null }\n\t\t\t\t\t\t\t) => void,\n\t\t\t\t\t\t\tonRequestFocusOnNextPill: handleNavigateSelectedListbox as (\n\t\t\t\t\t\t\t\tevent: React.SyntheticEvent,\n\t\t\t\t\t\t\t\tdata: { direction: 'next' | 'previous' }\n\t\t\t\t\t\t\t) => void,\n\t\t\t\t\t\t\tonRequestFocusOnPreviousPill: handleNavigateSelectedListbox as (\n\t\t\t\t\t\t\t\tevent: React.SyntheticEvent,\n\t\t\t\t\t\t\t\tdata: { direction: 'next' | 'previous' }\n\t\t\t\t\t\t\t) => void,\n\t\t\t\t\t\t\tonRequestRemove: handleRemoveSelectedOption as (\n\t\t\t\t\t\t\t\tevent:\n\t\t\t\t\t\t\t\t\tReact.MouseEvent | React.KeyboardEvent | React.SyntheticEvent,\n\t\t\t\t\t\t\t\tdata: { index?: number; option: SelectedListBoxOption }\n\t\t\t\t\t\t\t) => void,\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tid={`${getId()}-selected-listbox`}\n\t\t\t\t\t\tlabels={labels}\n\t\t\t\t\t\tselectedListboxRef={setSelectedListboxRefCallback}\n\t\t\t\t\t\tselection={selection as SelectedListBoxOption[]}\n\t\t\t\t\t\tlistboxHasFocus={listboxHasFocus}\n\t\t\t\t\t\tmultiselectable={multiple}\n\t\t\t\t\t/>\n\t\t\t\t) : null}\n\t\t\t\t<div\n\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t'slds-combobox',\n\t\t\t\t\t\t'slds-dropdown-trigger',\n\t\t\t\t\t\t'slds-dropdown-trigger_click',\n\t\t\t\t\t\t'ignore-react-onclickoutside',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'slds-is-open': getIsOpen(),\n\t\t\t\t\t\t\t'slds-has-error': errorText,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tclassName\n\t\t\t\t\t)}\n\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\taria-expanded={getIsOpen()}\n\t\t\t\t\taria-haspopup=\"listbox\"\n\t\t\t\t>\n\t\t\t\t\t<InnerInput\n\t\t\t\t\t\taria-autocomplete=\"list\"\n\t\t\t\t\t\taria-controls={getIsOpen() ? `${getId()}-listbox` : undefined}\n\t\t\t\t\t\taria-activedescendant={\n\t\t\t\t\t\t\tactiveOption\n\t\t\t\t\t\t\t\t? `${getId()}-listbox-option-${activeOption.id}`\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\taria-describedby={getErrorId()}\n\t\t\t\t\t\tdefaultValue={defaultValue}\n\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\tclassName=\"slds-combobox__input\"\n\t\t\t\t\t\tcontainerProps={{\n\t\t\t\t\t\t\tclassName: 'slds-combobox__form-element',\n\t\t\t\t\t\t\trole: 'none',\n\t\t\t\t\t\t}}\n\t\t\t\t\t\thasSpinner={hasInputSpinner}\n\t\t\t\t\t\ticonRight={\n\t\t\t\t\t\t\t<InputIcon\n\t\t\t\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\t\t\t\tname=\"search\"\n\t\t\t\t\t\t\t\ttitle={labels.inputIconTitle}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t}\n\t\t\t\t\t\tid={getId()}\n\t\t\t\t\t\tonFocus={handleInputFocus}\n\t\t\t\t\t\tonBlur={handleInputBlur}\n\t\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\t\tinputRef={setInputRefCallback}\n\t\t\t\t\t\tonClick={() => openDialog()}\n\t\t\t\t\t\tonChange={handleInputChange}\n\t\t\t\t\t\tplaceholder={labels.placeholder}\n\t\t\t\t\t\treadOnly={!!(predefinedOptionsOnly && activeOption)}\n\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\trole=\"textbox\"\n\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\tpredefinedOptionsOnly\n\t\t\t\t\t\t\t\t? (activeOption?.label as string) || value\n\t\t\t\t\t\t\t\t: value\n\t\t\t\t\t\t}\n\t\t\t\t\t\t{...userDefinedInputProps}\n\t\t\t\t\t/>\n\t\t\t\t\t{getDialog({ menuRenderer: renderMenu() })}\n\t\t\t\t\t{errorText && (\n\t\t\t\t\t\t<div id={getErrorId()} className=\"slds-form-element__help\">\n\t\t\t\t\t\t\t{errorText}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n\n\tconst renderInlineSingle = () => {\n\t\tconst selectedIcon = selection[0]?.icon;\n\t\tconst iconLeft =\n\t\t\tselectedIcon && React.isValidElement(selectedIcon)\n\t\t\t\t? React.cloneElement(selectedIcon, {\n\t\t\t\t\t\tcontainerClassName: 'slds-combobox__input-entity-icon',\n\t\t\t\t\t} as Record<string, unknown>)\n\t\t\t\t: null;\n\n\t\tconst inputValue = selection[0]?.label\n\t\t\t? (selection[0].label as string)\n\t\t\t: value;\n\n\t\treturn (\n\t\t\t<div className=\"slds-form-element__control\">\n\t\t\t\t<div\n\t\t\t\t\tclassName={classNames('slds-combobox_container', {\n\t\t\t\t\t\t'slds-has-inline-listbox': selection.length,\n\t\t\t\t\t})}\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-combobox',\n\t\t\t\t\t\t\t'slds-dropdown-trigger',\n\t\t\t\t\t\t\t'slds-dropdown-trigger_click',\n\t\t\t\t\t\t\t'ignore-react-onclickoutside',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'slds-is-open': getIsOpen(),\n\t\t\t\t\t\t\t\t'slds-has-error': errorText,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tclassName\n\t\t\t\t\t\t)}\n\t\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\t\taria-expanded={getIsOpen()}\n\t\t\t\t\t\taria-haspopup=\"listbox\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<InnerInput\n\t\t\t\t\t\t\tdefaultValue={defaultValue}\n\t\t\t\t\t\t\taria-autocomplete=\"list\"\n\t\t\t\t\t\t\taria-controls={getIsOpen() ? `${getId()}-listbox` : undefined}\n\t\t\t\t\t\t\taria-activedescendant={\n\t\t\t\t\t\t\t\tactiveOption\n\t\t\t\t\t\t\t\t\t? `${getId()}-listbox-option-${activeOption.id}`\n\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\taria-describedby={getErrorId()}\n\t\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\t\tclassName=\"slds-combobox__input\"\n\t\t\t\t\t\t\tcontainerProps={{\n\t\t\t\t\t\t\t\tclassName: 'slds-combobox__form-element',\n\t\t\t\t\t\t\t\trole: 'none',\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tdisabled={singleInputDisabled}\n\t\t\t\t\t\t\thasSpinner={hasInputSpinner}\n\t\t\t\t\t\t\ticonRight={\n\t\t\t\t\t\t\t\tselection.length ? (\n\t\t\t\t\t\t\t\t\t<InputIcon\n\t\t\t\t\t\t\t\t\t\tassistiveText={{\n\t\t\t\t\t\t\t\t\t\t\ticon: assistiveText.removeSingleSelectedOption,\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tbuttonRef={(component: HTMLButtonElement | null) => {\n\t\t\t\t\t\t\t\t\t\t\tbuttonRef.current = component;\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\t\t\t\t\t\ticonPosition=\"right\"\n\t\t\t\t\t\t\t\t\t\tname=\"close\"\n\t\t\t\t\t\t\t\t\t\tonClick={(event: React.MouseEvent) => {\n\t\t\t\t\t\t\t\t\t\t\thandleRemoveSelectedOption(event, {\n\t\t\t\t\t\t\t\t\t\t\t\toption: selection[0],\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<InputIcon category=\"utility\" name=\"search\" />\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ticonLeft={iconLeft}\n\t\t\t\t\t\t\tid={getId()}\n\t\t\t\t\t\t\tonFocus={handleInputFocus}\n\t\t\t\t\t\t\tonBlur={handleInputBlur}\n\t\t\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\t\t\tinputRef={setInputRefCallback}\n\t\t\t\t\t\t\tonClick={() => requestOpenMenu()}\n\t\t\t\t\t\t\tonChange={(event: React.ChangeEvent<HTMLInputElement>) => {\n\t\t\t\t\t\t\t\tif (!selection.length) {\n\t\t\t\t\t\t\t\t\thandleInputChange(event);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tplaceholder={labels.placeholder}\n\t\t\t\t\t\t\treadOnly={\n\t\t\t\t\t\t\t\t!!(predefinedOptionsOnly && activeOption) || !!selection.length\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\t\trole=\"textbox\"\n\t\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\t\tpredefinedOptionsOnly\n\t\t\t\t\t\t\t\t\t? (activeOption?.label as string) || value\n\t\t\t\t\t\t\t\t\t: inputValue\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{...userDefinedInputProps}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{getDialog({ menuRenderer: renderMenu() })}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t{errorText && (\n\t\t\t\t\t<div className=\"slds-has-error\">\n\t\t\t\t\t\t<div id={getErrorId()} className=\"slds-form-element__help\">\n\t\t\t\t\t\t\t{errorText}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t};\n\n\tconst renderPopover = () => {\n\t\tconst popoverPropsFromProp = popover?.props as\n\t\t\t{ body?: ReactNode } | undefined;\n\t\tconst popoverProps = getCustomPopoverProps(popoverPropsFromProp?.body);\n\n\t\treturn (\n\t\t\t<div className=\"slds-form-element__control\">\n\t\t\t\t<div className=\"slds-combobox_container\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-combobox',\n\t\t\t\t\t\t\t'slds-dropdown-trigger',\n\t\t\t\t\t\t\t'slds-dropdown-trigger_click',\n\t\t\t\t\t\t\t'ignore-react-onclickoutside',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'slds-is-open': getIsOpen(),\n\t\t\t\t\t\t\t\t'slds-has-error': errorText,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tclassName\n\t\t\t\t\t\t)}\n\t\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\t\taria-expanded={getIsOpen()}\n\t\t\t\t\t\taria-haspopup=\"dialog\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{/* @ts-expect-error - popoverProps contains body from getCustomPopoverProps */}\n\t\t\t\t\t\t<Popover {...popoverProps}>\n\t\t\t\t\t\t\t<InnerInput\n\t\t\t\t\t\t\t\taria-autocomplete=\"none\"\n\t\t\t\t\t\t\t\taria-controls={getIsOpen() ? `${getId()}-popover` : undefined}\n\t\t\t\t\t\t\t\taria-describedby={getErrorId()}\n\t\t\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\t\t\tclassName=\"slds-combobox__input\"\n\t\t\t\t\t\t\t\tcontainerProps={{\n\t\t\t\t\t\t\t\t\tclassName: 'slds-combobox__form-element',\n\t\t\t\t\t\t\t\t\trole: 'none',\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\ticonRight={\n\t\t\t\t\t\t\t\t\t<InputIcon\n\t\t\t\t\t\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\t\t\t\t\t\tname=\"down\"\n\t\t\t\t\t\t\t\t\t\tvariant=\"combobox\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tid={getId()}\n\t\t\t\t\t\t\t\tonFocus={handleInputFocus}\n\t\t\t\t\t\t\t\tonBlur={handleInputBlur}\n\t\t\t\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\t\t\t\tinputRef={setInputRefCallback}\n\t\t\t\t\t\t\t\tonClick={() => openDialog()}\n\t\t\t\t\t\t\t\tonChange={handleInputChange}\n\t\t\t\t\t\t\t\tplaceholder={labels.placeholder}\n\t\t\t\t\t\t\t\treadOnly\n\t\t\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\t\t\trole=\"textbox\"\n\t\t\t\t\t\t\t\tvalue={value}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Popover>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t{errorText && (\n\t\t\t\t\t<div className=\"slds-has-error\">\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tid={getErrorId()}\n\t\t\t\t\t\t\tclassName=\"slds-form-element__help slds-has-error\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{errorText}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t};\n\n\tconst renderReadOnlyMultiple = () => {\n\t\tconst displayValue =\n\t\t\tselection.length > 1\n\t\t\t\t? labels.multipleOptionsSelected ||\n\t\t\t\t\t`${selection.length} options selected`\n\t\t\t\t: (selection[0]?.label as string) || '';\n\n\t\treturn (\n\t\t\t<div className=\"slds-form-element__control\">\n\t\t\t\t<div className=\"slds-combobox_container\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-combobox',\n\t\t\t\t\t\t\t'slds-dropdown-trigger',\n\t\t\t\t\t\t\t'slds-dropdown-trigger_click',\n\t\t\t\t\t\t\t'ignore-react-onclickoutside',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'slds-is-open': getIsOpen(),\n\t\t\t\t\t\t\t\t'slds-has-error': errorText,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tclassName\n\t\t\t\t\t\t)}\n\t\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\t\taria-expanded={getIsOpen()}\n\t\t\t\t\t\taria-haspopup=\"listbox\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<InnerInput\n\t\t\t\t\t\t\tdefaultValue={defaultValue}\n\t\t\t\t\t\t\taria-autocomplete=\"list\"\n\t\t\t\t\t\t\taria-controls={getIsOpen() ? `${getId()}-listbox` : undefined}\n\t\t\t\t\t\t\taria-activedescendant={\n\t\t\t\t\t\t\t\tactiveOption\n\t\t\t\t\t\t\t\t\t? `${getId()}-listbox-option-${activeOption.id}`\n\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\taria-describedby={getErrorId()}\n\t\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\t\tclassName=\"slds-combobox__input\"\n\t\t\t\t\t\t\tcontainerProps={{\n\t\t\t\t\t\t\t\tclassName: 'slds-combobox__form-element',\n\t\t\t\t\t\t\t\trole: 'none',\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\ticonRight={\n\t\t\t\t\t\t\t\t<InputIcon category=\"utility\" name=\"down\" variant=\"combobox\" />\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tid={getId()}\n\t\t\t\t\t\t\tonFocus={handleInputFocus}\n\t\t\t\t\t\t\tonBlur={handleInputBlur}\n\t\t\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\t\t\tinputRef={setInputRefCallback}\n\t\t\t\t\t\t\tonClick={() => requestOpenMenu()}\n\t\t\t\t\t\t\tonChange={(event: React.ChangeEvent<HTMLInputElement>) => {\n\t\t\t\t\t\t\t\tif (!selection.length) {\n\t\t\t\t\t\t\t\t\thandleInputChange(event);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tplaceholder={labels.placeholderReadOnly}\n\t\t\t\t\t\t\treadOnly\n\t\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\t\trole=\"textbox\"\n\t\t\t\t\t\t\tvalue={displayValue}\n\t\t\t\t\t\t\t{...userDefinedInputProps}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{getDialog({ menuRenderer: renderMenu() })}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<SelectedListBox\n\t\t\t\t\tactiveOption={activeSelectedOption as SelectedListBoxOption}\n\t\t\t\t\tactiveOptionIndex={activeSelectedOptionIndex}\n\t\t\t\t\tassistiveText={\n\t\t\t\t\t\tassistiveText as unknown as {\n\t\t\t\t\t\t\tremovePill?: string;\n\t\t\t\t\t\t\tselectedListboxLabel?: string;\n\t\t\t\t\t\t\t[key: string]: unknown;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tevents={{\n\t\t\t\t\t\tonBlurPill: handleBlurPill,\n\t\t\t\t\t\tonPillFocus: handlePillFocus as (\n\t\t\t\t\t\t\tevent: React.FocusEvent,\n\t\t\t\t\t\t\tdata: { index: number; option: SelectedListBoxOption }\n\t\t\t\t\t\t) => void,\n\t\t\t\t\t\tonRequestFocus: handleRequestFocusSelectedListbox as (\n\t\t\t\t\t\t\tevent: unknown,\n\t\t\t\t\t\t\tdata: { ref: HTMLElement | null }\n\t\t\t\t\t\t) => void,\n\t\t\t\t\t\tonRequestFocusOnNextPill: handleNavigateSelectedListbox as (\n\t\t\t\t\t\t\tevent: React.SyntheticEvent,\n\t\t\t\t\t\t\tdata: { direction: 'next' | 'previous' }\n\t\t\t\t\t\t) => void,\n\t\t\t\t\t\tonRequestFocusOnPreviousPill: handleNavigateSelectedListbox as (\n\t\t\t\t\t\t\tevent: React.SyntheticEvent,\n\t\t\t\t\t\t\tdata: { direction: 'next' | 'previous' }\n\t\t\t\t\t\t) => void,\n\t\t\t\t\t\tonRequestRemove: handleRemoveSelectedOption as (\n\t\t\t\t\t\t\tevent:\n\t\t\t\t\t\t\t\tReact.MouseEvent | React.KeyboardEvent | React.SyntheticEvent,\n\t\t\t\t\t\t\tdata: { index?: number; option: SelectedListBoxOption }\n\t\t\t\t\t\t) => void,\n\t\t\t\t\t}}\n\t\t\t\t\tid={`${getId()}-selected-listbox`}\n\t\t\t\t\tlabels={labels}\n\t\t\t\t\tselectedListboxRef={setSelectedListboxRefCallback}\n\t\t\t\t\tselection={selection as SelectedListBoxOption[]}\n\t\t\t\t\tlistboxHasFocus={listboxHasFocus}\n\t\t\t\t\tvariant={variant}\n\t\t\t\t\trenderAtSelectionLength={2}\n\t\t\t\t\tmultiselectable={multiple}\n\t\t\t\t/>\n\t\t\t\t{errorText && (\n\t\t\t\t\t<div className=\"slds-has-error\">\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tid={getErrorId()}\n\t\t\t\t\t\t\tclassName=\"slds-form-element__help slds-has-error\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{errorText}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t};\n\n\tconst renderReadOnlySingle = () => {\n\t\tconst activeOptionLabel = activeOption?.label as string | undefined;\n\t\tconst selectedOptionLabel = selection[0]?.label as string | undefined;\n\t\tlet inputValue = activeOptionLabel || selectedOptionLabel || '';\n\n\t\tif (selection[0]?.value === '') {\n\t\t\tinputValue = '';\n\t\t}\n\n\t\treturn (\n\t\t\t<div className=\"slds-form-element__control\">\n\t\t\t\t<div className=\"slds-combobox_container\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-combobox',\n\t\t\t\t\t\t\t'slds-dropdown-trigger',\n\t\t\t\t\t\t\t'slds-dropdown-trigger_click',\n\t\t\t\t\t\t\t'ignore-react-onclickoutside',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'slds-is-open': getIsOpen(),\n\t\t\t\t\t\t\t\t'slds-has-error': errorText,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tclassName\n\t\t\t\t\t\t)}\n\t\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\t\taria-expanded={getIsOpen()}\n\t\t\t\t\t\taria-haspopup=\"listbox\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<InnerInput\n\t\t\t\t\t\t\tdefaultValue={defaultValue}\n\t\t\t\t\t\t\taria-autocomplete=\"list\"\n\t\t\t\t\t\t\taria-controls={getIsOpen() ? `${getId()}-listbox` : undefined}\n\t\t\t\t\t\t\taria-activedescendant={\n\t\t\t\t\t\t\t\tactiveOption\n\t\t\t\t\t\t\t\t\t? `${getId()}-listbox-option-${activeOption.id}`\n\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\taria-describedby={getErrorId()}\n\t\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\t\tclassName=\"slds-combobox__input\"\n\t\t\t\t\t\t\tcontainerProps={{\n\t\t\t\t\t\t\t\tclassName: 'slds-combobox__form-element',\n\t\t\t\t\t\t\t\trole: 'none',\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tdisabled={singleInputDisabled}\n\t\t\t\t\t\t\ticonRight={\n\t\t\t\t\t\t\t\t<InputIcon category=\"utility\" name=\"down\" variant=\"combobox\" />\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tid={getId()}\n\t\t\t\t\t\t\tonFocus={handleInputFocus}\n\t\t\t\t\t\t\tonBlur={handleInputBlur}\n\t\t\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\t\t\tinputRef={setInputRefCallback}\n\t\t\t\t\t\t\tonClick={() => requestOpenMenu()}\n\t\t\t\t\t\t\tonChange={(event: React.ChangeEvent<HTMLInputElement>) => {\n\t\t\t\t\t\t\t\tif (!selection.length) {\n\t\t\t\t\t\t\t\t\thandleInputChange(event);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tplaceholder={labels.placeholderReadOnly}\n\t\t\t\t\t\t\treadOnly\n\t\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\t\trole=\"textbox\"\n\t\t\t\t\t\t\tvalue={inputValue}\n\t\t\t\t\t\t\t{...userDefinedInputProps}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{getDialog({ menuRenderer: renderMenu() })}\n\t\t\t\t\t\t{errorText && (\n\t\t\t\t\t\t\t<div id={getErrorId()} className=\"slds-form-element__help\">\n\t\t\t\t\t\t\t\t{errorText}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t};\n\n\t// ===== Main Render =====\n\n\tconst hasRenderedLabel = labels.label || assistiveText?.label;\n\n\tconst subRenders: Record<string, Record<string, () => ReactNode>> = {\n\t\tbase: {\n\t\t\tmultiple: renderBase,\n\t\t\tsingle: renderBase,\n\t\t},\n\t\t'inline-listbox': {\n\t\t\tmultiple: renderInlineMultiple,\n\t\t\tsingle: renderInlineSingle,\n\t\t},\n\t\tpopover: {\n\t\t\tmultiple: renderPopover,\n\t\t\tsingle: renderPopover,\n\t\t},\n\t\treadonly: {\n\t\t\tmultiple: renderReadOnlyMultiple,\n\t\t\tsingle: renderReadOnlySingle,\n\t\t},\n\t};\n\n\tconst multipleOrSingle = multiple ? 'multiple' : 'single';\n\tconst variantRenderer = subRenders[variant]?.[multipleOrSingle];\n\n\tconst mainCombobox = (\n\t\t<div className={classNames('slds-form-element', classNameContainer)}>\n\t\t\t{entityCombobox ? null : (\n\t\t\t\t<Label\n\t\t\t\t\tassistiveText={\n\t\t\t\t\t\tassistiveText as unknown as {\n\t\t\t\t\t\t\tlabel?: string;\n\t\t\t\t\t\t\t[key: string]: unknown;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\thtmlFor={getId()}\n\t\t\t\t\tlabel={labels.label}\n\t\t\t\t\trequired={required}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{fieldLevelHelpTooltip && hasRenderedLabel ? (\n\t\t\t\t<FieldLevelHelpTooltip\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t\t\tfieldLevelHelpTooltip={fieldLevelHelpTooltip as any}\n\t\t\t\t/>\n\t\t\t) : null}\n\t\t\t{variantRenderer ? variantRenderer() : subRenders.base.multiple()}\n\t\t</div>\n\t);\n\n\treturn entityCombobox ? (\n\t\t<div className=\"slds-form-element\">\n\t\t\t<Label\n\t\t\t\tassistiveText={\n\t\t\t\t\tassistiveText as unknown as { label?: string; [key: string]: unknown }\n\t\t\t\t}\n\t\t\t\thtmlFor={getId()}\n\t\t\t\tlabel={labels.label}\n\t\t\t\trequired={required}\n\t\t\t/>\n\t\t\t<div className=\"slds-form-element__control\">\n\t\t\t\t<div className=\"slds-combobox-group\">\n\t\t\t\t\t<div className=\"slds-combobox_object-switcher slds-combobox-addon_start\">\n\t\t\t\t\t\t{entityCombobox}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div className=\"slds-combobox_container slds-combobox-addon_end\">\n\t\t\t\t\t\t{mainCombobox}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t) : (\n\t\tmainCombobox\n\t);\n};\n\nCombobox.displayName = COMBOBOX;\n\nexport default Combobox;\n"],"mappings":"4wCAoDA,IAAI,EACE,GAAkB,OAAO,SAAa,IAuFtC,GAAc,OAAO,YAAY,EAMjC,GAAmB,GACxB,MAAe,EAEV,IACL,EACA,KACoB,CACpB,GAAI,EAAK,IAAM,GACf,KAAM,EAAK,KACX,MAAO,EAAK,MACZ,SAAU,EAAK,SACf,QACC,IAAc,CAChB,GAmIM,GAAwD,CAC7D,MAAO,GACP,iBAAkB,UAClB,qBAAsB,qBACtB,aAAc,GACd,2BAA4B,yBAC5B,WAAY,wCACZ,qBAAsB,mBACvB,EAEM,GAA0C,CAC/C,eAAgB,OAChB,MAAO,GACP,aAAc,SACd,WAAY,OACZ,wBAAyB,GACzB,eAAgB,oBAChB,YAAa,GACb,oBAAqB,mBACrB,gBAAiB,SACjB,2BAA4B,2BAC5B,eAAgB,EACjB,EAEM,GAAgC,CAAC,EAIjC,GAAqC,GAAU,CACpD,GAAM,CACL,cAAe,GAAoB,CAAC,EACpC,mBAAoB,GACpB,YACA,sBACA,iBACA,0BACA,eACA,YACA,kBACA,YACA,OAAQ,GAAa,CAAC,EACtB,yBACA,eACA,mBACA,kBACA,sBACA,GAAI,GACJ,kBAAiB,SACjB,SACA,SAAU,GACV,OAAQ,EACR,OAAQ,GAAa,CAAC,EACtB,yBACA,gBACA,gBAAe,WACf,WACA,oBACA,UAAU,CAAC,EACX,kBAAiB,CAAC,EAClB,uBAAsB,CAAC,EACvB,UACA,wBACA,WAAW,GACX,YAAY,CAAC,EACb,mBAAoB,GACpB,uBAAsB,GACtB,2BACA,QACA,UAAU,OACV,eAAgB,GAChB,aACG,EAGE,GAAA,EAAgB,EAAA,QAAA,CAAO,CAAC,EAAG,GAAsB,EAAiB,EAClE,GAAA,EAAS,EAAA,QAAA,CAAO,CAAC,EAAG,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V,OAAQ,EACT,EACA,iBAAkB,CACjB,SAAU,GACV,OAAQ,EACT,EACA,QAAS,CACR,SAAU,GACV,OAAQ,EACT,EACA,SAAU,CACT,SAAU,GACV,OAAQ,EACT,CACD,EAEM,GAAmB,EAAW,WAAa,SAC3C,GAAkB,GAAW,EAAQ,GAAG,IAExC,IACL,EAAA,EAAA,KAAA,CAAC,MAAD,CAAK,WAAA,EAAW,EAAA,QAAA,CAAW,oBAAqB,EAAkB,EAAlE,SAAA,CACE,GAAiB,MACjB,EAAA,EAAA,IAAA,CAAC,GAAA,QAAD,CAEE,gBAKD,QAAS,EAAM,EACf,MAAO,EAAO,MACJ,UACV,CAAA,EAED,IAAyB,IACzB,EAAA,EAAA,IAAA,CAAC,GAAA,QAAD,CAEwB,wBACvB,CAAA,EACE,KACH,GAAkB,GAAgB,EAAI,GAAW,KAAK,SAAS,CAC5D,IAGN,OAAO,IACN,EAAA,EAAA,KAAA,CAAC,MAAD,CAAK,UAAU,oBAAf,SAAA,EACC,EAAA,EAAA,IAAA,CAAC,GAAA,QAAD,CAEE,gBAED,QAAS,EAAM,EACf,MAAO,EAAO,MACJ,UACV,CAAA,GACD,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,6BACd,UAAA,EAAA,EAAA,KAAA,CAAC,MAAD,CAAK,UAAU,sBAAf,SAAA,EACC,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,0DACb,SAAA,EACG,CAAA,GAEL,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,kDACb,SAAA,EACG,CAAA,CACD,GACD,CAAA,CACD,CAEL,CAAA,EAAA,EAEF,EAEA,GAAS,YAAc,EAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":[],"sources":["../../../../components/combobox/index.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport React, { useRef, forwardRef, type ForwardedRef } from 'react';\nimport LanguageDirection from '../utilities/UNSAFE_direction/private/language-direction';\nimport Combobox, { type ComboboxProps } from './combobox';\nimport { useClickOutside } from '../../utilities/hooks/use-click-outside';\n\nexport type {\n\tComboboxProps,\n\tComboboxActionItem,\n\tComboboxAssistiveText,\n\tComboboxLabels,\n\tComboboxEvents,\n} from './combobox';\nexport type {\n\tComboboxOption,\n\tComboboxItemOption,\n\tComboboxSeparatorOption,\n\tComboboxActionOption,\n\tComboboxDeselectOption,\n} from './private/menu';\n\n/**\n * Combobox wrapper that handles click outside detection\n * Replaces react-onclickoutside HOC for React 19 compatibility\n */\nconst ComboboxWithClickOutside = forwardRef<HTMLDivElement, ComboboxProps>(\n\t(props, ref: ForwardedRef<HTMLDivElement>) => {\n\t\tconst containerRef = useRef<HTMLDivElement>(null);\n\t\tconst comboboxRef = useRef<{\n\t\t\thandleClickOutside?: (event: MouseEvent | TouchEvent) => void;\n\t\t}>(null);\n\n\t\t// Use our custom hook to detect clicks outside\n\t\tuseClickOutside(\n\t\t\tcontainerRef,\n\t\t\t(event) => {\n\t\t\t\t// The Combobox component handles click outside via handleRequestClose\n\t\t\t\t// This is triggered when clicking outside the combobox container\n\t\t\t\tif (comboboxRef.current?.handleClickOutside) {\n\t\t\t\t\tcomboboxRef.current.handleClickOutside(event);\n\t\t\t\t}\n\t\t\t},\n\t\t\t{\n\t\t\t\tenabled: true,\n\t\t\t\tignoreClass: 'ignore-react-onclickoutside',\n\t\t\t}\n\t\t);\n\n\t\treturn (\n\t\t\t<div ref={containerRef}>\n\t\t\t\t<Combobox {...props} />\n\t\t\t</div>\n\t\t);\n\t}\n);\n\nComboboxWithClickOutside.displayName = 'ComboboxWithClickOutside';\n\n// Wrap with LanguageDirection for RTL support\nexport default LanguageDirection(\n\tComboboxWithClickOutside\n) as unknown as React.FC<ComboboxProps>;\n"],"mappings":"iYA2BA,IAAM,GAAA,EAA2B,EAAA,WAAA,EAC/B,EAAO,IAAsC,CAC7C,IAAM,GAAA,EAAe,EAAA,OAAA,CAAuB,IAAI,EAC1C,GAAA,EAAc,EAAA,OAAA,CAEjB,IAAI,EAkBP,OAfA,EAAA,QACC,EACC,GAAU,CAGN,EAAY,SAAS,oBACxB,EAAY,QAAQ,mBAAmB,CAAK,CAE9C,EACA,CACC,QAAS,GACT,YAAa,6BACd,CACD,GAGC,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,IAAK,EACT,UAAA,EAAA,EAAA,IAAA,CAAC,EAAA,QAAD,CAAU,GAAI,CAAQ,CAAA,CAClB,CAAA,CAEP,CACD,EAEA,EAAyB,YAAc,2BAGvC,IAAA,EAAe,EAAA,QACd,CACD"}
1
+ {"version":3,"file":"index.cjs","names":[],"sources":["../../../../components/combobox/index.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport React, { useRef, forwardRef, type ForwardedRef } from 'react';\nimport LanguageDirection from '../utilities/UNSAFE_direction/private/language-direction';\nimport Combobox, { type ComboboxProps } from './combobox';\nimport { useClickOutside } from '../../utilities/hooks/use-click-outside';\n\nexport type {\n\tComboboxProps,\n\tComboboxActionItem,\n\tComboboxAssistiveText,\n\tComboboxLabels,\n\tComboboxEvents,\n\tComboboxRenderMenuItemData,\n} from './combobox';\nexport type {\n\tComboboxOption,\n\tComboboxItemOption,\n\tComboboxSeparatorOption,\n\tComboboxActionOption,\n\tComboboxDeselectOption,\n} from './private/menu';\n\n/**\n * Combobox wrapper that handles click outside detection\n * Replaces react-onclickoutside HOC for React 19 compatibility\n */\nconst ComboboxWithClickOutside = forwardRef<HTMLDivElement, ComboboxProps>(\n\t(props, ref: ForwardedRef<HTMLDivElement>) => {\n\t\tconst containerRef = useRef<HTMLDivElement>(null);\n\t\tconst comboboxRef = useRef<{\n\t\t\thandleClickOutside?: (event: MouseEvent | TouchEvent) => void;\n\t\t}>(null);\n\n\t\t// Use our custom hook to detect clicks outside\n\t\tuseClickOutside(\n\t\t\tcontainerRef,\n\t\t\t(event) => {\n\t\t\t\t// The Combobox component handles click outside via handleRequestClose\n\t\t\t\t// This is triggered when clicking outside the combobox container\n\t\t\t\tif (comboboxRef.current?.handleClickOutside) {\n\t\t\t\t\tcomboboxRef.current.handleClickOutside(event);\n\t\t\t\t}\n\t\t\t},\n\t\t\t{\n\t\t\t\tenabled: true,\n\t\t\t\tignoreClass: 'ignore-react-onclickoutside',\n\t\t\t}\n\t\t);\n\n\t\treturn (\n\t\t\t<div ref={containerRef}>\n\t\t\t\t<Combobox {...props} />\n\t\t\t</div>\n\t\t);\n\t}\n);\n\nComboboxWithClickOutside.displayName = 'ComboboxWithClickOutside';\n\n// Wrap with LanguageDirection for RTL support\nexport default LanguageDirection(\n\tComboboxWithClickOutside\n) as unknown as React.FC<ComboboxProps>;\n"],"mappings":"iYA4BA,IAAM,GAAA,EAA2B,EAAA,WAAA,EAC/B,EAAO,IAAsC,CAC7C,IAAM,GAAA,EAAe,EAAA,OAAA,CAAuB,IAAI,EAC1C,GAAA,EAAc,EAAA,OAAA,CAEjB,IAAI,EAkBP,OAfA,EAAA,QACC,EACC,GAAU,CAGN,EAAY,SAAS,oBACxB,EAAY,QAAQ,mBAAmB,CAAK,CAE9C,EACA,CACC,QAAS,GACT,YAAa,6BACd,CACD,GAGC,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,IAAK,EACT,UAAA,EAAA,EAAA,IAAA,CAAC,EAAA,QAAD,CAAU,GAAI,CAAQ,CAAA,CAClB,CAAA,CAEP,CACD,EAEA,EAAyB,YAAc,2BAGvC,IAAA,EAAe,EAAA,QACd,CACD"}
@@ -1,2 +1,2 @@
1
- const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../icon/index.cjs"),n=require("../../spinner/index.cjs");let r=require("react");r=e.__toESM(r,1);let i=require("classnames");i=e.__toESM(i,1);let a=require("react/jsx-runtime"),o=require("dequal");var s=(e,t)=>{if(!e||e.length===0||!t||t.length===0)return e;let n=e.toLowerCase().indexOf(t.toLowerCase());return n>-1?(0,a.jsxs)(r.default.Fragment,{children:[e.substr(0,n),(0,a.jsx)(`span`,{className:`slds-text-title_bold`,children:`${e.substr(n,t.length)}`},`bold`),e.substr(n+t.length)]}):e},c=(e,t)=>e==null||typeof e==`string`?e:e(t),l=e=>!r.default.isValidElement(e)||e.props.size!=null?e:r.default.cloneElement(e,{size:`small`}),u=({activeOption:e,activeOptionIndex:u=-1,assistiveText:d={},classNameMenuSubHeader:f,classNameMenu:p,inheritWidthOf:m,inputId:h,inputValue:g=``,isSelected:_,itemVisibleLength:v,labels:y,hasMenuSpinner:b,maxWidth:x,menuPosition:S,menuRef:C,onRenderMenuItem:w,onSelect:T,options:E,selection:D,tooltipMenuItemDisabled:O,variant:k=`icon-title-subtitle`})=>{let A=m===`menu`?`inherit`:void 0;A=m===`menu`&&x?x:A;let j=E.map((n,p)=>{let m=p===u&&e&&(0,o.dequal)(n.id,e.id),v=_({selection:D,option:n})&&n.type!==`header`&&n.type!==`footer`;if(n.type===`separator`)return n.label?(0,a.jsx)(`li`,{className:`slds-dropdown__header slds-truncate`,title:typeof n.label==`string`?n.label:void 0,role:`separator`,children:(0,a.jsx)(`span`,{className:(0,i.default)(`slds-listbox__option-header`,f),children:typeof n.label==`string`?n.label:n.label?.(g)})},`menu-separator-${n.id}`):(0,a.jsx)(`li`,{className:`slds-has-divider_top-space`,role:`separator`},`menu-separator-${n.id}`);if(n.type===`header`)return(0,a.jsx)(`li`,{role:`presentation`,className:`slds-listbox__item`,children:(0,a.jsxs)(`div`,{onClick:n.disabled?void 0:e=>{T(e,{option:n})},"aria-selected":m,"aria-disabled":n.disabled||void 0,id:`${h}-listbox-option-${n.id}`,className:(0,i.default)(`slds-media slds-listbox__option`,`slds-listbox__option_entity slds-listbox__option_term`,{"slds-has-focus":m}),role:`option`,children:[(0,a.jsx)(`span`,{className:`slds-media__figure slds-listbox__option-icon`,children:l(n.icon)}),(0,a.jsx)(`span`,{className:`slds-media__body`,children:c(n.label,g)})]})},`menu-header-${n.id}}`);if(n.type===`footer`)return(0,a.jsx)(`li`,{role:`presentation`,className:`slds-listbox__item`,children:(0,a.jsxs)(`div`,{"aria-selected":m,"aria-disabled":n.disabled||void 0,onClick:n.disabled?void 0:e=>{T(e,{option:n})},id:`${h}-listbox-option-${n.id}`,className:(0,i.default)(`slds-media slds-listbox__option`,`slds-listbox__option_entity slds-listbox__option_term`,{"slds-has-focus":m}),role:`option`,children:[(0,a.jsx)(`span`,{className:`slds-media__figure slds-listbox__option-icon`,children:l(n.icon)}),(0,a.jsx)(`span`,{className:`slds-media__body`,children:c(n.label,g)})]})},`menu-footer-${n.id}}`);let y={},b=`${h}-listbox-option-help-${n.id}`;n.disabled&&O&&m&&(y[`aria-describedby`]=b),n.disabled&&(y[`aria-disabled`]=!0,y.style={cursor:`default`});let x=typeof n.label==`string`?n.label:void 0,S={"icon-title-subtitle":(0,r.createElement)(`span`,{"aria-selected":m,...y,id:`${h}-listbox-option-${n.id}`,key:`menu-subtitle-${n.id}`,className:(0,i.default)(`slds-media slds-listbox__option`,`slds-listbox__option_entity slds-listbox__option_has-meta`,{"slds-has-focus":m}),onClick:n.disabled?void 0:e=>{T(e,{option:n})},role:`option`},n.icon&&!w?(0,a.jsx)(`span`,{className:`slds-media__figure`,children:l(n.icon)}):null,w?(0,a.jsx)(w,{assistiveText:d,selected:v,option:n}):(0,a.jsxs)(`span`,{className:`slds-media__body`,children:[(0,a.jsx)(`span`,{className:(0,i.default)(`slds-listbox__option-text`,`slds-listbox__option-text_entity`,{"slds-disabled-text":n.disabled}),title:x,children:s(x,g)}),(0,a.jsx)(`span`,{className:(0,i.default)(`slds-listbox__option-meta slds-listbox__option-meta_entity`,{"slds-disabled-text":n.disabled}),title:n.subTitle,children:s(n.subTitle,g)})]})),checkbox:(0,r.createElement)(`span`,{"aria-selected":m,...y,id:`${h}-listbox-option-${n.id}`,key:`menu-checkbox-${n.id}`,className:(0,i.default)(`slds-media slds-listbox__option`,` slds-listbox__option_plain slds-media_small slds-media_center`,{"slds-has-focus":m,"slds-is-selected":v}),onClick:n.disabled?void 0:e=>{T(e,{selection:D,option:n})},role:`option`},(0,a.jsx)(`span`,{className:`slds-media__figure`,children:(0,a.jsx)(t.default,{className:`slds-listbox__icon-selected`,category:`utility`,name:`check`,size:`x-small`})}),(0,a.jsx)(`span`,{className:`slds-media__body`,children:w?(0,a.jsx)(w,{assistiveText:d,selected:v,option:n}):(0,a.jsxs)(`span`,{className:(0,i.default)(`slds-truncate`,{"slds-disabled-text":n.disabled}),title:x,children:[v?(0,a.jsx)(`span`,{className:`slds-assistive-text`,children:d.optionSelectedInMenu}):null,` `,n.type===`deselect`?(0,a.jsx)(`em`,{children:x}):x]})}))},C;if(n.disabled&&O){let{content:e,...t}=O.props,i={align:`top`,content:n.tooltipContent||e,id:b,position:`absolute`,silenceTriggerTabbableWarning:!0,triggerStyle:{width:`100%`},...t};m&&(i.isOpen=!0),C=r.default.cloneElement(O,i,S[k])}else C=S[k];return(0,a.jsx)(`li`,{className:`slds-listbox__item`,role:`presentation`,children:C},`menu-option-${n.id}`)});return(0,a.jsxs)(`ul`,{className:(0,i.default)(`slds-listbox slds-listbox_vertical slds-dropdown slds-dropdown_fluid`,{"slds-dropdown_length-with-icon-5":v===5,"slds-dropdown_length-with-icon-7":v===7,"slds-dropdown_length-with-icon-10":v===10},p),ref:C,role:`presentation`,style:{width:m===`menu`?`auto`:void 0,maxWidth:A,position:S===`relative`?void 0:`relative`},children:[j.length?j:(0,a.jsx)(`li`,{className:`slds-listbox__item slds-listbox__status`,role:`status`,"aria-live":`polite`,children:(0,a.jsx)(`span`,{className:`slds-m-left_x-large slds-p-vertical_medium`,children:y.noOptionsFound})}),b&&(0,a.jsx)(`li`,{role:`presentation`,className:`slds-listbox__item`,children:(0,a.jsx)(`div`,{className:`slds-align_absolute-center slds-p-top_medium`,children:(0,a.jsx)(n.default,{assistiveText:{label:d.loadingMenuItems},hasContainer:!1,isInline:!0,size:`x-small`})})})]})};u.displayName=`Menu`,exports.default=u;
1
+ const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../icon/index.cjs"),n=require("../../spinner/index.cjs");let r=require("react");r=e.__toESM(r,1);let i=require("classnames");i=e.__toESM(i,1);let a=require("react/jsx-runtime"),o=require("dequal");var s=(e,t)=>{if(!e||e.length===0||!t||t.length===0)return e;let n=e.toLowerCase().indexOf(t.toLowerCase());return n>-1?(0,a.jsxs)(r.default.Fragment,{children:[e.substr(0,n),(0,a.jsx)(`span`,{className:`slds-text-title_bold`,children:`${e.substr(n,t.length)}`},`bold`),e.substr(n+t.length)]}):e},c=(e,t)=>e==null||typeof e==`string`?e:e(t),l=e=>!r.default.isValidElement(e)||e.props.size!=null?e:r.default.cloneElement(e,{size:`small`}),u=({activeOption:e,activeOptionIndex:u=-1,assistiveText:d={},classNameMenuSubHeader:f,classNameMenu:p,inheritWidthOf:m,inputId:h,inputValue:g=``,isSelected:_,itemVisibleLength:v,labels:y,hasMenuSpinner:b,maxWidth:x,menuPosition:S,menuRef:C,renderMenuItem:w,onSelect:T,options:E,selection:D,tooltipMenuItemDisabled:O,variant:k=`icon-title-subtitle`})=>{let A=m===`menu`?`inherit`:void 0;A=m===`menu`&&x?x:A;let j=E.map((n,p)=>{let m=p===u&&e&&(0,o.dequal)(n.id,e.id),v=_({selection:D,option:n})&&n.type!==`header`&&n.type!==`footer`;if(n.type===`separator`)return n.label?(0,a.jsx)(`li`,{className:`slds-dropdown__header slds-truncate`,title:typeof n.label==`string`?n.label:void 0,role:`separator`,children:(0,a.jsx)(`span`,{className:(0,i.default)(`slds-listbox__option-header`,f),children:typeof n.label==`string`?n.label:n.label?.(g)})},`menu-separator-${n.id}`):(0,a.jsx)(`li`,{className:`slds-has-divider_top-space`,role:`separator`},`menu-separator-${n.id}`);if(n.type===`header`)return(0,a.jsx)(`li`,{role:`presentation`,className:`slds-listbox__item`,children:(0,a.jsxs)(`div`,{onClick:n.disabled?void 0:e=>{T(e,{option:n})},"aria-selected":m,"aria-disabled":n.disabled||void 0,id:`${h}-listbox-option-${n.id}`,className:(0,i.default)(`slds-media slds-listbox__option`,`slds-listbox__option_entity slds-listbox__option_term`,{"slds-has-focus":m}),role:`option`,children:[(0,a.jsx)(`span`,{className:`slds-media__figure slds-listbox__option-icon`,children:l(n.icon)}),(0,a.jsx)(`span`,{className:`slds-media__body`,children:c(n.label,g)})]})},`menu-header-${n.id}}`);if(n.type===`footer`)return(0,a.jsx)(`li`,{role:`presentation`,className:`slds-listbox__item`,children:(0,a.jsxs)(`div`,{"aria-selected":m,"aria-disabled":n.disabled||void 0,onClick:n.disabled?void 0:e=>{T(e,{option:n})},id:`${h}-listbox-option-${n.id}`,className:(0,i.default)(`slds-media slds-listbox__option`,`slds-listbox__option_entity slds-listbox__option_term`,{"slds-has-focus":m}),role:`option`,children:[(0,a.jsx)(`span`,{className:`slds-media__figure slds-listbox__option-icon`,children:l(n.icon)}),(0,a.jsx)(`span`,{className:`slds-media__body`,children:c(n.label,g)})]})},`menu-footer-${n.id}}`);let y={},b=`${h}-listbox-option-help-${n.id}`;n.disabled&&O&&m&&(y[`aria-describedby`]=b),n.disabled&&(y[`aria-disabled`]=!0,y.style={cursor:`default`});let x=typeof n.label==`string`?n.label:void 0,S={"icon-title-subtitle":(0,r.createElement)(`span`,{"aria-selected":m,...y,id:`${h}-listbox-option-${n.id}`,key:`menu-subtitle-${n.id}`,className:(0,i.default)(`slds-media slds-listbox__option`,`slds-listbox__option_entity slds-listbox__option_has-meta`,{"slds-has-focus":m}),onClick:n.disabled?void 0:e=>{T(e,{option:n})},role:`option`},n.icon&&!w?(0,a.jsx)(`span`,{className:`slds-media__figure`,children:l(n.icon)}):null,w?w({isSelected:v,option:n}):(0,a.jsxs)(`span`,{className:`slds-media__body`,children:[(0,a.jsx)(`span`,{className:(0,i.default)(`slds-listbox__option-text`,`slds-listbox__option-text_entity`,{"slds-disabled-text":n.disabled}),title:x,children:s(x,g)}),(0,a.jsx)(`span`,{className:(0,i.default)(`slds-listbox__option-meta slds-listbox__option-meta_entity`,{"slds-disabled-text":n.disabled}),title:n.subTitle,children:s(n.subTitle,g)})]})),checkbox:(0,r.createElement)(`span`,{"aria-selected":m,...y,id:`${h}-listbox-option-${n.id}`,key:`menu-checkbox-${n.id}`,className:(0,i.default)(`slds-media slds-listbox__option`,` slds-listbox__option_plain slds-media_small slds-media_center`,{"slds-has-focus":m,"slds-is-selected":v}),onClick:n.disabled?void 0:e=>{T(e,{selection:D,option:n})},role:`option`},(0,a.jsx)(`span`,{className:`slds-media__figure`,children:(0,a.jsx)(t.default,{className:`slds-listbox__icon-selected`,category:`utility`,name:`check`,size:`x-small`})}),(0,a.jsx)(`span`,{className:`slds-media__body`,children:w?w({isSelected:v,option:n}):(0,a.jsxs)(`span`,{className:(0,i.default)(`slds-truncate`,{"slds-disabled-text":n.disabled}),title:x,children:[v?(0,a.jsx)(`span`,{className:`slds-assistive-text`,children:d.optionSelectedInMenu}):null,` `,n.type===`deselect`?(0,a.jsx)(`em`,{children:x}):x]})}))},C;if(n.disabled&&O){let{content:e,...t}=O.props,i={align:`top`,content:n.tooltipContent||e,id:b,position:`absolute`,silenceTriggerTabbableWarning:!0,triggerStyle:{width:`100%`},...t};m&&(i.isOpen=!0),C=r.default.cloneElement(O,i,S[k])}else C=S[k];return(0,a.jsx)(`li`,{className:`slds-listbox__item`,role:`presentation`,children:C},`menu-option-${n.id}`)});return(0,a.jsxs)(`ul`,{className:(0,i.default)(`slds-listbox slds-listbox_vertical slds-dropdown slds-dropdown_fluid`,{"slds-dropdown_length-with-icon-5":v===5,"slds-dropdown_length-with-icon-7":v===7,"slds-dropdown_length-with-icon-10":v===10},p),ref:C,role:`presentation`,style:{width:m===`menu`?`auto`:void 0,maxWidth:A,position:S===`relative`?void 0:`relative`},children:[j.length?j:(0,a.jsx)(`li`,{className:`slds-listbox__item slds-listbox__status`,role:`status`,"aria-live":`polite`,children:(0,a.jsx)(`span`,{className:`slds-m-left_x-large slds-p-vertical_medium`,children:y.noOptionsFound})}),b&&(0,a.jsx)(`li`,{role:`presentation`,className:`slds-listbox__item`,children:(0,a.jsx)(`div`,{className:`slds-align_absolute-center slds-p-top_medium`,children:(0,a.jsx)(n.default,{assistiveText:{label:d.loadingMenuItems},hasContainer:!1,isInline:!0,size:`x-small`})})})]})};u.displayName=`Menu`,exports.default=u;
2
2
  //# sourceMappingURL=menu.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"menu.cjs","names":[],"sources":["../../../../../components/combobox/private/menu.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport React, {\n\ttype ReactNode,\n\ttype ReactElement,\n\ttype CSSProperties,\n} from 'react';\nimport { dequal as isEqual } from 'dequal';\nimport classNames from 'classnames';\n\nimport Icon from '../../icon';\nimport Spinner from '../../spinner';\n\ntype ComboboxOptionLabelRenderer = (searchTerm: string) => ReactNode;\n\n/**\n * A selectable option. Group items under a `subheadings` entry from\n * `comboboxAddSubheadings` with `category`.\n */\nexport interface ComboboxItemOption {\n\t/** Structural rows set `type`; selectable items leave it unset. */\n\ttype?: undefined;\n\tid: string;\n\t/** Matches the `id` of a subheading passed to `comboboxAddSubheadings` */\n\tcategory?: string;\n\tlabel?: string;\n\tsubTitle?: string;\n\ttitle?: string;\n\ticon?: ReactNode;\n\tdisabled?: boolean;\n\ttooltipContent?: ReactNode;\n\tvalue?: string;\n\tonClick?: never;\n}\n\n/** A non-interactive group label. Without a `label` it renders as a divider. */\nexport interface ComboboxSeparatorOption {\n\ttype: 'separator';\n\tid: string;\n\tlabel?: string | ComboboxOptionLabelRenderer;\n\tcategory?: never;\n\tsubTitle?: never;\n\ttitle?: never;\n\ticon?: never;\n\tdisabled?: never;\n\ttooltipContent?: never;\n\tvalue?: never;\n\tonClick?: never;\n}\n\ninterface ComboboxActionOptionFields {\n\tid: string;\n\tlabel?: string | ComboboxOptionLabelRenderer;\n\ticon?: ReactNode;\n\tdisabled?: boolean;\n\t/** @deprecated Only called on Enter, for `type: 'header' | 'footer'` rows\n\t * passed directly in `options`. Use `optionsSearchEntity`/`optionsAddItem`\n\t * with `events.onSelectActionItem` instead. */\n\tonClick?: (event: React.MouseEvent) => void;\n\tcategory?: never;\n\tsubTitle?: never;\n\ttitle?: never;\n\ttooltipContent?: never;\n\tvalue?: never;\n}\n\n/**\n * An action row above (`header`) or below (`footer`) the options. Usually\n * created from `optionsSearchEntity` and `optionsAddItem`.\n */\nexport type ComboboxActionOption =\n\t| (ComboboxActionOptionFields & { type: 'header' })\n\t| (ComboboxActionOptionFields & { type: 'footer' });\n\n/** The \"clear selection\" row added by `hasDeselect`. */\nexport interface ComboboxDeselectOption {\n\ttype: 'deselect';\n\tid: string;\n\tlabel?: string;\n\tvalue?: string;\n\tcategory?: never;\n\tsubTitle?: never;\n\ttitle?: never;\n\ticon?: never;\n\tdisabled?: never;\n\ttooltipContent?: never;\n\tonClick?: never;\n}\n\nexport type ComboboxOption =\n\t| ComboboxItemOption\n\t| ComboboxSeparatorOption\n\t| ComboboxActionOption\n\t| ComboboxDeselectOption;\n\nexport interface MenuAssistiveText {\n\tloadingMenuItems?: string;\n\toptionSelectedInMenu?: string;\n}\n\nexport interface MenuLabels {\n\tnoOptionsFound: ReactNode | string;\n}\n\nexport interface MenuProps {\n\t/** Active descendant in menu */\n\tactiveOption?: ComboboxOption;\n\t/** Index of active descendant in menu */\n\tactiveOptionIndex?: number;\n\t/** Assistive text for accessibility */\n\tassistiveText?: MenuAssistiveText;\n\t/** CSS classes to be added to menu sub header span tag */\n\tclassNameMenuSubHeader?: string | string[] | Record<string, boolean>;\n\t/** CSS classes for menu */\n\tclassNameMenu?: string | string[] | Record<string, boolean>;\n\t/** Sets the dialog width */\n\tinheritWidthOf?: 'target' | 'menu' | 'none';\n\t/** Id used for assistive technology */\n\tinputId?: string;\n\t/** Input value for bolding matches */\n\tinputValue?: string;\n\t/** Function to check if option is selected */\n\tisSelected: (params: {\n\t\tselection: ComboboxOption[];\n\t\toption: ComboboxOption;\n\t}) => boolean;\n\t/** Determines the height of the menu */\n\titemVisibleLength?: 5 | 7 | 10 | null;\n\t/** Text labels */\n\tlabels: MenuLabels;\n\t/** Adds loading spinner below the options */\n\thasMenuSpinner?: boolean;\n\t/** Sets a maximum width for menu */\n\tmaxWidth?: string;\n\t/** Menu position */\n\tmenuPosition?: 'absolute' | 'overflowBoundaryElement' | 'relative';\n\t/** Ref for menu element */\n\tmenuRef?:\n\t\tReact.RefCallback<HTMLUListElement> | React.RefObject<HTMLUListElement>;\n\t/** Custom menu item renderer */\n\tonRenderMenuItem?: React.ComponentType<{\n\t\tassistiveText?: MenuAssistiveText;\n\t\tselected: boolean;\n\t\toption: ComboboxItemOption | ComboboxDeselectOption;\n\t}>;\n\t/** Callback when option is selected */\n\tonSelect: (\n\t\tevent: React.MouseEvent,\n\t\tdata: { option: ComboboxOption; selection?: ComboboxOption[] }\n\t) => void;\n\t/** Menu options */\n\toptions: ComboboxOption[];\n\t/** Selected options */\n\tselection: ComboboxOption[];\n\t/** Tooltip for disabled menu items */\n\ttooltipMenuItemDisabled?: ReactElement;\n\t/** Menu variant */\n\tvariant?: 'icon-title-subtitle' | 'checkbox';\n}\n\nconst setBold = (label: string | undefined, searchTerm: string): ReactNode => {\n\tif (!label || label.length === 0 || !searchTerm || searchTerm.length === 0) {\n\t\treturn label;\n\t}\n\tconst position = label.toLowerCase().indexOf(searchTerm.toLowerCase());\n\tif (position > -1) {\n\t\treturn (\n\t\t\t<React.Fragment>\n\t\t\t\t{label.substr(0, position)}\n\t\t\t\t<span key=\"bold\" className=\"slds-text-title_bold\">{`${label.substr(\n\t\t\t\t\tposition,\n\t\t\t\t\tsearchTerm.length\n\t\t\t\t)}`}</span>\n\t\t\t\t{label.substr(position + searchTerm.length)}\n\t\t\t</React.Fragment>\n\t\t);\n\t}\n\treturn label;\n};\n\nconst renderLabel = (\n\tlabelProp: string | ((searchTerm: string) => ReactNode) | undefined,\n\tsearchTerm: string\n): ReactNode => {\n\tif (labelProp == null || typeof labelProp === 'string') {\n\t\treturn labelProp;\n\t}\n\treturn labelProp(searchTerm);\n};\n\n// Entity icons in a combobox listbox option render at \"small\" per SLDS. `Icon`\n// defaults to \"medium\", so an option icon passed without an explicit size shows\n// oversized in the menu (SLDS 2 no longer shrinks it via CSS the way SLDS 1\n// did). Clone the icon to enforce \"small\" unless the consumer set a size\n// themselves. Leaves non-<Icon> nodes untouched.\nconst sizeOptionIcon = (icon: ReactNode): ReactNode => {\n\tif (!React.isValidElement(icon)) {\n\t\treturn icon;\n\t}\n\tconst iconProps = icon.props as { size?: unknown };\n\tif (iconProps.size != null) {\n\t\treturn icon;\n\t}\n\treturn React.cloneElement(icon, { size: 'small' } as Record<string, unknown>);\n};\n\nconst Menu: React.FC<MenuProps> = ({\n\tactiveOption,\n\tactiveOptionIndex = -1,\n\tassistiveText = {},\n\tclassNameMenuSubHeader,\n\tclassNameMenu,\n\tinheritWidthOf,\n\tinputId,\n\tinputValue = '',\n\tisSelected,\n\titemVisibleLength,\n\tlabels,\n\thasMenuSpinner,\n\tmaxWidth,\n\tmenuPosition,\n\tmenuRef,\n\tonRenderMenuItem: MenuItem,\n\tonSelect,\n\toptions,\n\tselection,\n\ttooltipMenuItemDisabled,\n\tvariant = 'icon-title-subtitle',\n}) => {\n\tlet menuMaxWidth: string | undefined =\n\t\tinheritWidthOf === 'menu' ? 'inherit' : undefined;\n\tmenuMaxWidth =\n\t\tinheritWidthOf === 'menu' && maxWidth ? maxWidth : menuMaxWidth;\n\n\tconst menuOptions = options.map((optionData, index) => {\n\t\tconst active =\n\t\t\tindex === activeOptionIndex &&\n\t\t\tactiveOption &&\n\t\t\tisEqual(optionData.id, activeOption.id);\n\t\tconst selected =\n\t\t\tisSelected({\n\t\t\t\tselection,\n\t\t\t\toption: optionData,\n\t\t\t}) &&\n\t\t\toptionData.type !== 'header' &&\n\t\t\toptionData.type !== 'footer';\n\n\t\tif (optionData.type === 'separator') {\n\t\t\treturn optionData.label ? (\n\t\t\t\t<li\n\t\t\t\t\tclassName=\"slds-dropdown__header slds-truncate\"\n\t\t\t\t\ttitle={\n\t\t\t\t\t\ttypeof optionData.label === 'string' ? optionData.label : undefined\n\t\t\t\t\t}\n\t\t\t\t\trole=\"separator\"\n\t\t\t\t\tkey={`menu-separator-${optionData.id}`}\n\t\t\t\t>\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-listbox__option-header',\n\t\t\t\t\t\t\tclassNameMenuSubHeader\n\t\t\t\t\t\t)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{typeof optionData.label === 'string'\n\t\t\t\t\t\t\t? optionData.label\n\t\t\t\t\t\t\t: optionData.label?.(inputValue)}\n\t\t\t\t\t</span>\n\t\t\t\t</li>\n\t\t\t) : (\n\t\t\t\t<li\n\t\t\t\t\tclassName=\"slds-has-divider_top-space\"\n\t\t\t\t\trole=\"separator\"\n\t\t\t\t\tkey={`menu-separator-${optionData.id}`}\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\tif (optionData.type === 'header') {\n\t\t\treturn (\n\t\t\t\t<li\n\t\t\t\t\tkey={`menu-header-${optionData.id}}`}\n\t\t\t\t\trole=\"presentation\"\n\t\t\t\t\tclassName=\"slds-listbox__item\"\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\tonClick={\n\t\t\t\t\t\t\toptionData.disabled\n\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t: (event) => {\n\t\t\t\t\t\t\t\t\t\tonSelect(event, { option: optionData });\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\taria-selected={active}\n\t\t\t\t\t\taria-disabled={optionData.disabled || undefined}\n\t\t\t\t\t\tid={`${inputId}-listbox-option-${optionData.id}`}\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-media slds-listbox__option',\n\t\t\t\t\t\t\t'slds-listbox__option_entity slds-listbox__option_term',\n\t\t\t\t\t\t\t{ 'slds-has-focus': active }\n\t\t\t\t\t\t)}\n\t\t\t\t\t\trole=\"option\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span className=\"slds-media__figure slds-listbox__option-icon\">\n\t\t\t\t\t\t\t{sizeOptionIcon(optionData.icon)}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span className=\"slds-media__body\">\n\t\t\t\t\t\t\t{renderLabel(optionData.label, inputValue)}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\t\t\t);\n\t\t}\n\n\t\tif (optionData.type === 'footer') {\n\t\t\treturn (\n\t\t\t\t<li\n\t\t\t\t\tkey={`menu-footer-${optionData.id}}`}\n\t\t\t\t\trole=\"presentation\"\n\t\t\t\t\tclassName=\"slds-listbox__item\"\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\taria-selected={active}\n\t\t\t\t\t\taria-disabled={optionData.disabled || undefined}\n\t\t\t\t\t\tonClick={\n\t\t\t\t\t\t\toptionData.disabled\n\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t: (event) => {\n\t\t\t\t\t\t\t\t\t\tonSelect(event, { option: optionData });\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tid={`${inputId}-listbox-option-${optionData.id}`}\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-media slds-listbox__option',\n\t\t\t\t\t\t\t'slds-listbox__option_entity slds-listbox__option_term',\n\t\t\t\t\t\t\t{ 'slds-has-focus': active }\n\t\t\t\t\t\t)}\n\t\t\t\t\t\trole=\"option\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span className=\"slds-media__figure slds-listbox__option-icon\">\n\t\t\t\t\t\t\t{sizeOptionIcon(optionData.icon)}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span className=\"slds-media__body\">\n\t\t\t\t\t\t\t{renderLabel(optionData.label, inputValue)}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\t\t\t);\n\t\t}\n\n\t\tconst disabledProps: {\n\t\t\t'aria-describedby'?: string;\n\t\t\t'aria-disabled'?: boolean;\n\t\t\tstyle?: CSSProperties;\n\t\t} = {};\n\t\tconst tooltipId = `${inputId}-listbox-option-help-${optionData.id}`;\n\t\tif (optionData.disabled && tooltipMenuItemDisabled && active) {\n\t\t\tdisabledProps['aria-describedby'] = tooltipId;\n\t\t}\n\t\tif (optionData.disabled) {\n\t\t\tdisabledProps['aria-disabled'] = true;\n\t\t\tdisabledProps.style = { cursor: 'default' };\n\t\t}\n\n\t\tconst labelString =\n\t\t\ttypeof optionData.label === 'string' ? optionData.label : undefined;\n\n\t\tconst menuItem: Record<string, ReactNode> = {\n\t\t\t'icon-title-subtitle': (\n\t\t\t\t<span\n\t\t\t\t\taria-selected={active}\n\t\t\t\t\t{...disabledProps}\n\t\t\t\t\tid={`${inputId}-listbox-option-${optionData.id}`}\n\t\t\t\t\tkey={`menu-subtitle-${optionData.id}`}\n\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t'slds-media slds-listbox__option',\n\t\t\t\t\t\t'slds-listbox__option_entity slds-listbox__option_has-meta',\n\t\t\t\t\t\t{ 'slds-has-focus': active }\n\t\t\t\t\t)}\n\t\t\t\t\tonClick={\n\t\t\t\t\t\toptionData.disabled\n\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t: (event) => {\n\t\t\t\t\t\t\t\t\tonSelect(event, { option: optionData });\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\trole=\"option\"\n\t\t\t\t>\n\t\t\t\t\t{optionData.icon && !MenuItem ? (\n\t\t\t\t\t\t<span className=\"slds-media__figure\">\n\t\t\t\t\t\t\t{sizeOptionIcon(optionData.icon)}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t) : null}\n\t\t\t\t\t{MenuItem ? (\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\tassistiveText={assistiveText}\n\t\t\t\t\t\t\tselected={selected}\n\t\t\t\t\t\t\toption={optionData}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<span className=\"slds-media__body\">\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t\t\t'slds-listbox__option-text',\n\t\t\t\t\t\t\t\t\t'slds-listbox__option-text_entity',\n\t\t\t\t\t\t\t\t\t{ 'slds-disabled-text': optionData.disabled }\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\ttitle={labelString}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{setBold(labelString, inputValue)}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t\t\t'slds-listbox__option-meta slds-listbox__option-meta_entity',\n\t\t\t\t\t\t\t\t\t{ 'slds-disabled-text': optionData.disabled }\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\ttitle={optionData.subTitle}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{setBold(optionData.subTitle, inputValue)}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t)}\n\t\t\t\t</span>\n\t\t\t),\n\t\t\tcheckbox: (\n\t\t\t\t<span\n\t\t\t\t\taria-selected={active}\n\t\t\t\t\t{...disabledProps}\n\t\t\t\t\tid={`${inputId}-listbox-option-${optionData.id}`}\n\t\t\t\t\tkey={`menu-checkbox-${optionData.id}`}\n\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t'slds-media slds-listbox__option',\n\t\t\t\t\t\t' slds-listbox__option_plain slds-media_small slds-media_center',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'slds-has-focus': active,\n\t\t\t\t\t\t\t'slds-is-selected': selected,\n\t\t\t\t\t\t}\n\t\t\t\t\t)}\n\t\t\t\t\tonClick={\n\t\t\t\t\t\toptionData.disabled\n\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t: (event) => {\n\t\t\t\t\t\t\t\t\tonSelect(event, {\n\t\t\t\t\t\t\t\t\t\tselection,\n\t\t\t\t\t\t\t\t\t\toption: optionData,\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\trole=\"option\"\n\t\t\t\t>\n\t\t\t\t\t<span className=\"slds-media__figure\">\n\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\tclassName=\"slds-listbox__icon-selected\"\n\t\t\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\t\t\tname=\"check\"\n\t\t\t\t\t\t\tsize=\"x-small\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</span>\n\t\t\t\t\t<span className=\"slds-media__body\">\n\t\t\t\t\t\t{MenuItem ? (\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tassistiveText={assistiveText}\n\t\t\t\t\t\t\t\tselected={selected}\n\t\t\t\t\t\t\t\toption={optionData}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclassName={classNames('slds-truncate', {\n\t\t\t\t\t\t\t\t\t'slds-disabled-text': optionData.disabled,\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\ttitle={labelString}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{selected ? (\n\t\t\t\t\t\t\t\t\t<span className=\"slds-assistive-text\">\n\t\t\t\t\t\t\t\t\t\t{assistiveText.optionSelectedInMenu}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t) : null}{' '}\n\t\t\t\t\t\t\t\t{optionData.type === 'deselect' ? (\n\t\t\t\t\t\t\t\t\t<em>{labelString}</em>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\tlabelString\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</span>\n\t\t\t\t</span>\n\t\t\t),\n\t\t};\n\n\t\tlet item: ReactNode;\n\t\tif (optionData.disabled && tooltipMenuItemDisabled) {\n\t\t\tconst tooltipPropsFromElement = tooltipMenuItemDisabled.props as {\n\t\t\t\tcontent?: ReactNode;\n\t\t\t\t[key: string]: unknown;\n\t\t\t};\n\t\t\tconst { content, ...userDefinedTooltipProps } = tooltipPropsFromElement;\n\t\t\tconst tooltipProps: Record<string, unknown> = {\n\t\t\t\talign: 'top',\n\t\t\t\tcontent: optionData.tooltipContent || content,\n\t\t\t\tid: tooltipId,\n\t\t\t\tposition: 'absolute',\n\t\t\t\tsilenceTriggerTabbableWarning: true,\n\t\t\t\ttriggerStyle: { width: '100%' },\n\t\t\t\t...userDefinedTooltipProps,\n\t\t\t};\n\t\t\tif (active) {\n\t\t\t\ttooltipProps.isOpen = true;\n\t\t\t}\n\t\t\titem = React.cloneElement(\n\t\t\t\ttooltipMenuItemDisabled,\n\t\t\t\ttooltipProps,\n\t\t\t\tmenuItem[variant]\n\t\t\t);\n\t\t} else {\n\t\t\titem = menuItem[variant];\n\t\t}\n\n\t\treturn (\n\t\t\t<li\n\t\t\t\tclassName=\"slds-listbox__item\"\n\t\t\t\tkey={`menu-option-${optionData.id}`}\n\t\t\t\trole=\"presentation\"\n\t\t\t>\n\t\t\t\t{item}\n\t\t\t</li>\n\t\t);\n\t});\n\n\treturn (\n\t\t<ul\n\t\t\tclassName={classNames(\n\t\t\t\t'slds-listbox slds-listbox_vertical slds-dropdown slds-dropdown_fluid',\n\t\t\t\t{\n\t\t\t\t\t'slds-dropdown_length-with-icon-5': itemVisibleLength === 5,\n\t\t\t\t\t'slds-dropdown_length-with-icon-7': itemVisibleLength === 7,\n\t\t\t\t\t'slds-dropdown_length-with-icon-10': itemVisibleLength === 10,\n\t\t\t\t},\n\t\t\t\tclassNameMenu\n\t\t\t)}\n\t\t\tref={menuRef}\n\t\t\trole=\"presentation\"\n\t\t\tstyle={{\n\t\t\t\twidth: inheritWidthOf === 'menu' ? 'auto' : undefined,\n\t\t\t\tmaxWidth: menuMaxWidth,\n\t\t\t\tposition: menuPosition !== 'relative' ? 'relative' : undefined,\n\t\t\t}}\n\t\t>\n\t\t\t{menuOptions.length ? (\n\t\t\t\tmenuOptions\n\t\t\t) : (\n\t\t\t\t<li\n\t\t\t\t\tclassName=\"slds-listbox__item slds-listbox__status\"\n\t\t\t\t\trole=\"status\"\n\t\t\t\t\taria-live=\"polite\"\n\t\t\t\t>\n\t\t\t\t\t<span className=\"slds-m-left_x-large slds-p-vertical_medium\">\n\t\t\t\t\t\t{labels.noOptionsFound}\n\t\t\t\t\t</span>\n\t\t\t\t</li>\n\t\t\t)}\n\t\t\t{hasMenuSpinner && (\n\t\t\t\t<li role=\"presentation\" className=\"slds-listbox__item\">\n\t\t\t\t\t<div className=\"slds-align_absolute-center slds-p-top_medium\">\n\t\t\t\t\t\t<Spinner\n\t\t\t\t\t\t\tassistiveText={{ label: assistiveText.loadingMenuItems }}\n\t\t\t\t\t\t\thasContainer={false}\n\t\t\t\t\t\t\tisInline\n\t\t\t\t\t\t\tsize=\"x-small\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\t\t\t)}\n\t\t</ul>\n\t);\n};\n\nMenu.displayName = 'Menu';\n\nexport default Menu;\n"],"mappings":"8QAiKA,IAAM,GAAW,EAA2B,IAAkC,CAC7E,GAAI,CAAC,GAAS,EAAM,SAAW,GAAK,CAAC,GAAc,EAAW,SAAW,EACxE,OAAO,EAER,IAAM,EAAW,EAAM,YAAY,CAAC,CAAC,QAAQ,EAAW,YAAY,CAAC,EAarE,OAZI,EAAW,IAEb,EAAA,EAAA,KAAA,CAAC,EAAA,QAAM,SAA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,aAAc,CAAE,MAAO,MAAO,EAC9B,GAAG,CACJ,EACI,IACH,EAAa,OAAS,IAEvB,EAAO,EAAA,QAAM,aACZ,EACA,EACA,EAAS,EACV,CACD,KACC,GAAO,EAAS,GAGjB,OACC,EAAA,EAAA,IAAA,CAAC,KAAD,CACC,UAAU,qBAEV,KAAK,eAEJ,SAAA,CACE,EAJE,eAAe,EAAW,IAI5B,CAEN,CAAC,EAED,OACC,EAAA,EAAA,KAAA,CAAC,KAAD,CACC,WAAA,EAAW,EAAA,QAAA,CACV,uEACA,CACC,mCAAoC,IAAsB,EAC1D,mCAAoC,IAAsB,EAC1D,oCAAqC,IAAsB,EAC5D,EACA,CACD,EACA,IAAK,EACL,KAAK,eACL,MAAO,CACN,MAAO,IAAmB,OAAS,OAAS,IAAA,GAC5C,SAAU,EACV,SAAU,IAAiB,WAA0B,IAAA,GAAb,UACzC,EAhBD,SAAA,CAkBE,EAAY,OACZ,GAEA,EAAA,EAAA,IAAA,CAAC,KAAD,CACC,UAAU,0CACV,KAAK,SACL,YAAU,SAEV,UAAA,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,6CACd,SAAA,EAAO,cACH,CAAA,CACH,CAAA,EAEJ,IACA,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,KAAK,eAAe,UAAU,qBACjC,UAAA,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,+CACd,UAAA,EAAA,EAAA,IAAA,CAAC,EAAA,QAAD,CACC,cAAe,CAAE,MAAO,EAAc,gBAAiB,EACvD,aAAc,GACd,SAAA,GACA,KAAK,SACL,CAAA,CACG,CAAA,CACF,CAAA,CAEF,GAEN,EAEA,EAAK,YAAc"}
1
+ {"version":3,"file":"menu.cjs","names":[],"sources":["../../../../../components/combobox/private/menu.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport React, {\n\ttype ReactNode,\n\ttype ReactElement,\n\ttype CSSProperties,\n} from 'react';\nimport { dequal as isEqual } from 'dequal';\nimport classNames from 'classnames';\n\nimport Icon from '../../icon';\nimport Spinner from '../../spinner';\n\ntype ComboboxOptionLabelRenderer = (searchTerm: string) => ReactNode;\n\n/**\n * A selectable option. Group items under a `subheadings` entry from\n * `comboboxAddSubheadings` with `category`.\n */\nexport interface ComboboxItemOption {\n\t/** Structural rows set `type`; selectable items leave it unset. */\n\ttype?: undefined;\n\tid: string;\n\t/** Matches the `id` of a subheading passed to `comboboxAddSubheadings` */\n\tcategory?: string;\n\tlabel?: string;\n\tsubTitle?: string;\n\ttitle?: string;\n\ticon?: ReactNode;\n\tdisabled?: boolean;\n\ttooltipContent?: ReactNode;\n\tvalue?: string;\n\tonClick?: never;\n}\n\n/** A non-interactive group label. Without a `label` it renders as a divider. */\nexport interface ComboboxSeparatorOption {\n\ttype: 'separator';\n\tid: string;\n\tlabel?: string | ComboboxOptionLabelRenderer;\n\tcategory?: never;\n\tsubTitle?: never;\n\ttitle?: never;\n\ticon?: never;\n\tdisabled?: never;\n\ttooltipContent?: never;\n\tvalue?: never;\n\tonClick?: never;\n}\n\ninterface ComboboxActionOptionFields {\n\tid: string;\n\tlabel?: string | ComboboxOptionLabelRenderer;\n\ticon?: ReactNode;\n\tdisabled?: boolean;\n\t/** @deprecated Only called on Enter, for `type: 'header' | 'footer'` rows\n\t * passed directly in `options`. Use `optionsSearchEntity`/`optionsAddItem`\n\t * with `events.onSelectActionItem` instead. */\n\tonClick?: (event: React.MouseEvent) => void;\n\tcategory?: never;\n\tsubTitle?: never;\n\ttitle?: never;\n\ttooltipContent?: never;\n\tvalue?: never;\n}\n\n/**\n * An action row above (`header`) or below (`footer`) the options. Usually\n * created from `optionsSearchEntity` and `optionsAddItem`.\n */\nexport type ComboboxActionOption =\n\t| (ComboboxActionOptionFields & { type: 'header' })\n\t| (ComboboxActionOptionFields & { type: 'footer' });\n\n/** The \"clear selection\" row added by `hasDeselect`. */\nexport interface ComboboxDeselectOption {\n\ttype: 'deselect';\n\tid: string;\n\tlabel?: string;\n\tvalue?: string;\n\tcategory?: never;\n\tsubTitle?: never;\n\ttitle?: never;\n\ticon?: never;\n\tdisabled?: never;\n\ttooltipContent?: never;\n\tonClick?: never;\n}\n\nexport type ComboboxOption =\n\t| ComboboxItemOption\n\t| ComboboxSeparatorOption\n\t| ComboboxActionOption\n\t| ComboboxDeselectOption;\n\nexport interface MenuAssistiveText {\n\tloadingMenuItems?: string;\n\toptionSelectedInMenu?: string;\n}\n\n/**\n * Argument passed to the menu's `renderMenuItem`\n */\nexport interface MenuRenderMenuItemData {\n\t/** Whether the option is selected */\n\tisSelected: boolean;\n\t/** The option to render. Custom renderers only receive selectable rows */\n\toption: ComboboxItemOption | ComboboxDeselectOption;\n}\n\nexport interface MenuLabels {\n\tnoOptionsFound: ReactNode | string;\n}\n\nexport interface MenuProps {\n\t/** Active descendant in menu */\n\tactiveOption?: ComboboxOption;\n\t/** Index of active descendant in menu */\n\tactiveOptionIndex?: number;\n\t/** Assistive text for accessibility */\n\tassistiveText?: MenuAssistiveText;\n\t/** CSS classes to be added to menu sub header span tag */\n\tclassNameMenuSubHeader?: string | string[] | Record<string, boolean>;\n\t/** CSS classes for menu */\n\tclassNameMenu?: string | string[] | Record<string, boolean>;\n\t/** Sets the dialog width */\n\tinheritWidthOf?: 'target' | 'menu' | 'none';\n\t/** Id used for assistive technology */\n\tinputId?: string;\n\t/** Input value for bolding matches */\n\tinputValue?: string;\n\t/** Function to check if option is selected */\n\tisSelected: (params: {\n\t\tselection: ComboboxOption[];\n\t\toption: ComboboxOption;\n\t}) => boolean;\n\t/** Determines the height of the menu */\n\titemVisibleLength?: 5 | 7 | 10 | null;\n\t/** Text labels */\n\tlabels: MenuLabels;\n\t/** Adds loading spinner below the options */\n\thasMenuSpinner?: boolean;\n\t/** Sets a maximum width for menu */\n\tmaxWidth?: string;\n\t/** Menu position */\n\tmenuPosition?: 'absolute' | 'overflowBoundaryElement' | 'relative';\n\t/** Ref for menu element */\n\tmenuRef?:\n\t\tReact.RefCallback<HTMLUListElement> | React.RefObject<HTMLUListElement>;\n\t/** Renders an option's content in place of the default label and icon */\n\trenderMenuItem?: (data: MenuRenderMenuItemData) => ReactNode;\n\t/** Callback when option is selected */\n\tonSelect: (\n\t\tevent: React.MouseEvent,\n\t\tdata: { option: ComboboxOption; selection?: ComboboxOption[] }\n\t) => void;\n\t/** Menu options */\n\toptions: ComboboxOption[];\n\t/** Selected options */\n\tselection: ComboboxOption[];\n\t/** Tooltip for disabled menu items */\n\ttooltipMenuItemDisabled?: ReactElement;\n\t/** Menu variant */\n\tvariant?: 'icon-title-subtitle' | 'checkbox';\n}\n\nconst setBold = (label: string | undefined, searchTerm: string): ReactNode => {\n\tif (!label || label.length === 0 || !searchTerm || searchTerm.length === 0) {\n\t\treturn label;\n\t}\n\tconst position = label.toLowerCase().indexOf(searchTerm.toLowerCase());\n\tif (position > -1) {\n\t\treturn (\n\t\t\t<React.Fragment>\n\t\t\t\t{label.substr(0, position)}\n\t\t\t\t<span key=\"bold\" className=\"slds-text-title_bold\">{`${label.substr(\n\t\t\t\t\tposition,\n\t\t\t\t\tsearchTerm.length\n\t\t\t\t)}`}</span>\n\t\t\t\t{label.substr(position + searchTerm.length)}\n\t\t\t</React.Fragment>\n\t\t);\n\t}\n\treturn label;\n};\n\nconst renderLabel = (\n\tlabelProp: string | ((searchTerm: string) => ReactNode) | undefined,\n\tsearchTerm: string\n): ReactNode => {\n\tif (labelProp == null || typeof labelProp === 'string') {\n\t\treturn labelProp;\n\t}\n\treturn labelProp(searchTerm);\n};\n\n// Entity icons in a combobox listbox option render at \"small\" per SLDS. `Icon`\n// defaults to \"medium\", so an option icon passed without an explicit size shows\n// oversized in the menu (SLDS 2 no longer shrinks it via CSS the way SLDS 1\n// did). Clone the icon to enforce \"small\" unless the consumer set a size\n// themselves. Leaves non-<Icon> nodes untouched.\nconst sizeOptionIcon = (icon: ReactNode): ReactNode => {\n\tif (!React.isValidElement(icon)) {\n\t\treturn icon;\n\t}\n\tconst iconProps = icon.props as { size?: unknown };\n\tif (iconProps.size != null) {\n\t\treturn icon;\n\t}\n\treturn React.cloneElement(icon, { size: 'small' } as Record<string, unknown>);\n};\n\nconst Menu: React.FC<MenuProps> = ({\n\tactiveOption,\n\tactiveOptionIndex = -1,\n\tassistiveText = {},\n\tclassNameMenuSubHeader,\n\tclassNameMenu,\n\tinheritWidthOf,\n\tinputId,\n\tinputValue = '',\n\tisSelected,\n\titemVisibleLength,\n\tlabels,\n\thasMenuSpinner,\n\tmaxWidth,\n\tmenuPosition,\n\tmenuRef,\n\trenderMenuItem,\n\tonSelect,\n\toptions,\n\tselection,\n\ttooltipMenuItemDisabled,\n\tvariant = 'icon-title-subtitle',\n}) => {\n\tlet menuMaxWidth: string | undefined =\n\t\tinheritWidthOf === 'menu' ? 'inherit' : undefined;\n\tmenuMaxWidth =\n\t\tinheritWidthOf === 'menu' && maxWidth ? maxWidth : menuMaxWidth;\n\n\tconst menuOptions = options.map((optionData, index) => {\n\t\tconst active =\n\t\t\tindex === activeOptionIndex &&\n\t\t\tactiveOption &&\n\t\t\tisEqual(optionData.id, activeOption.id);\n\t\tconst selected =\n\t\t\tisSelected({\n\t\t\t\tselection,\n\t\t\t\toption: optionData,\n\t\t\t}) &&\n\t\t\toptionData.type !== 'header' &&\n\t\t\toptionData.type !== 'footer';\n\n\t\tif (optionData.type === 'separator') {\n\t\t\treturn optionData.label ? (\n\t\t\t\t<li\n\t\t\t\t\tclassName=\"slds-dropdown__header slds-truncate\"\n\t\t\t\t\ttitle={\n\t\t\t\t\t\ttypeof optionData.label === 'string' ? optionData.label : undefined\n\t\t\t\t\t}\n\t\t\t\t\trole=\"separator\"\n\t\t\t\t\tkey={`menu-separator-${optionData.id}`}\n\t\t\t\t>\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-listbox__option-header',\n\t\t\t\t\t\t\tclassNameMenuSubHeader\n\t\t\t\t\t\t)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{typeof optionData.label === 'string'\n\t\t\t\t\t\t\t? optionData.label\n\t\t\t\t\t\t\t: optionData.label?.(inputValue)}\n\t\t\t\t\t</span>\n\t\t\t\t</li>\n\t\t\t) : (\n\t\t\t\t<li\n\t\t\t\t\tclassName=\"slds-has-divider_top-space\"\n\t\t\t\t\trole=\"separator\"\n\t\t\t\t\tkey={`menu-separator-${optionData.id}`}\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\tif (optionData.type === 'header') {\n\t\t\treturn (\n\t\t\t\t<li\n\t\t\t\t\tkey={`menu-header-${optionData.id}}`}\n\t\t\t\t\trole=\"presentation\"\n\t\t\t\t\tclassName=\"slds-listbox__item\"\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\tonClick={\n\t\t\t\t\t\t\toptionData.disabled\n\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t: (event) => {\n\t\t\t\t\t\t\t\t\t\tonSelect(event, { option: optionData });\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\taria-selected={active}\n\t\t\t\t\t\taria-disabled={optionData.disabled || undefined}\n\t\t\t\t\t\tid={`${inputId}-listbox-option-${optionData.id}`}\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-media slds-listbox__option',\n\t\t\t\t\t\t\t'slds-listbox__option_entity slds-listbox__option_term',\n\t\t\t\t\t\t\t{ 'slds-has-focus': active }\n\t\t\t\t\t\t)}\n\t\t\t\t\t\trole=\"option\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span className=\"slds-media__figure slds-listbox__option-icon\">\n\t\t\t\t\t\t\t{sizeOptionIcon(optionData.icon)}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span className=\"slds-media__body\">\n\t\t\t\t\t\t\t{renderLabel(optionData.label, inputValue)}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\t\t\t);\n\t\t}\n\n\t\tif (optionData.type === 'footer') {\n\t\t\treturn (\n\t\t\t\t<li\n\t\t\t\t\tkey={`menu-footer-${optionData.id}}`}\n\t\t\t\t\trole=\"presentation\"\n\t\t\t\t\tclassName=\"slds-listbox__item\"\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\taria-selected={active}\n\t\t\t\t\t\taria-disabled={optionData.disabled || undefined}\n\t\t\t\t\t\tonClick={\n\t\t\t\t\t\t\toptionData.disabled\n\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t: (event) => {\n\t\t\t\t\t\t\t\t\t\tonSelect(event, { option: optionData });\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tid={`${inputId}-listbox-option-${optionData.id}`}\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-media slds-listbox__option',\n\t\t\t\t\t\t\t'slds-listbox__option_entity slds-listbox__option_term',\n\t\t\t\t\t\t\t{ 'slds-has-focus': active }\n\t\t\t\t\t\t)}\n\t\t\t\t\t\trole=\"option\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span className=\"slds-media__figure slds-listbox__option-icon\">\n\t\t\t\t\t\t\t{sizeOptionIcon(optionData.icon)}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span className=\"slds-media__body\">\n\t\t\t\t\t\t\t{renderLabel(optionData.label, inputValue)}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\t\t\t);\n\t\t}\n\n\t\tconst disabledProps: {\n\t\t\t'aria-describedby'?: string;\n\t\t\t'aria-disabled'?: boolean;\n\t\t\tstyle?: CSSProperties;\n\t\t} = {};\n\t\tconst tooltipId = `${inputId}-listbox-option-help-${optionData.id}`;\n\t\tif (optionData.disabled && tooltipMenuItemDisabled && active) {\n\t\t\tdisabledProps['aria-describedby'] = tooltipId;\n\t\t}\n\t\tif (optionData.disabled) {\n\t\t\tdisabledProps['aria-disabled'] = true;\n\t\t\tdisabledProps.style = { cursor: 'default' };\n\t\t}\n\n\t\tconst labelString =\n\t\t\ttypeof optionData.label === 'string' ? optionData.label : undefined;\n\n\t\tconst menuItem: Record<string, ReactNode> = {\n\t\t\t'icon-title-subtitle': (\n\t\t\t\t<span\n\t\t\t\t\taria-selected={active}\n\t\t\t\t\t{...disabledProps}\n\t\t\t\t\tid={`${inputId}-listbox-option-${optionData.id}`}\n\t\t\t\t\tkey={`menu-subtitle-${optionData.id}`}\n\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t'slds-media slds-listbox__option',\n\t\t\t\t\t\t'slds-listbox__option_entity slds-listbox__option_has-meta',\n\t\t\t\t\t\t{ 'slds-has-focus': active }\n\t\t\t\t\t)}\n\t\t\t\t\tonClick={\n\t\t\t\t\t\toptionData.disabled\n\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t: (event) => {\n\t\t\t\t\t\t\t\t\tonSelect(event, { option: optionData });\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\trole=\"option\"\n\t\t\t\t>\n\t\t\t\t\t{optionData.icon && !renderMenuItem ? (\n\t\t\t\t\t\t<span className=\"slds-media__figure\">\n\t\t\t\t\t\t\t{sizeOptionIcon(optionData.icon)}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t) : null}\n\t\t\t\t\t{renderMenuItem ? (\n\t\t\t\t\t\trenderMenuItem({ isSelected: selected, option: optionData })\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<span className=\"slds-media__body\">\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t\t\t'slds-listbox__option-text',\n\t\t\t\t\t\t\t\t\t'slds-listbox__option-text_entity',\n\t\t\t\t\t\t\t\t\t{ 'slds-disabled-text': optionData.disabled }\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\ttitle={labelString}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{setBold(labelString, inputValue)}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t\t\t'slds-listbox__option-meta slds-listbox__option-meta_entity',\n\t\t\t\t\t\t\t\t\t{ 'slds-disabled-text': optionData.disabled }\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\ttitle={optionData.subTitle}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{setBold(optionData.subTitle, inputValue)}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t)}\n\t\t\t\t</span>\n\t\t\t),\n\t\t\tcheckbox: (\n\t\t\t\t<span\n\t\t\t\t\taria-selected={active}\n\t\t\t\t\t{...disabledProps}\n\t\t\t\t\tid={`${inputId}-listbox-option-${optionData.id}`}\n\t\t\t\t\tkey={`menu-checkbox-${optionData.id}`}\n\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t'slds-media slds-listbox__option',\n\t\t\t\t\t\t' slds-listbox__option_plain slds-media_small slds-media_center',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'slds-has-focus': active,\n\t\t\t\t\t\t\t'slds-is-selected': selected,\n\t\t\t\t\t\t}\n\t\t\t\t\t)}\n\t\t\t\t\tonClick={\n\t\t\t\t\t\toptionData.disabled\n\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t: (event) => {\n\t\t\t\t\t\t\t\t\tonSelect(event, {\n\t\t\t\t\t\t\t\t\t\tselection,\n\t\t\t\t\t\t\t\t\t\toption: optionData,\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\trole=\"option\"\n\t\t\t\t>\n\t\t\t\t\t<span className=\"slds-media__figure\">\n\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\tclassName=\"slds-listbox__icon-selected\"\n\t\t\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\t\t\tname=\"check\"\n\t\t\t\t\t\t\tsize=\"x-small\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</span>\n\t\t\t\t\t<span className=\"slds-media__body\">\n\t\t\t\t\t\t{renderMenuItem ? (\n\t\t\t\t\t\t\trenderMenuItem({ isSelected: selected, option: optionData })\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclassName={classNames('slds-truncate', {\n\t\t\t\t\t\t\t\t\t'slds-disabled-text': optionData.disabled,\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\ttitle={labelString}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{selected ? (\n\t\t\t\t\t\t\t\t\t<span className=\"slds-assistive-text\">\n\t\t\t\t\t\t\t\t\t\t{assistiveText.optionSelectedInMenu}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t) : null}{' '}\n\t\t\t\t\t\t\t\t{optionData.type === 'deselect' ? (\n\t\t\t\t\t\t\t\t\t<em>{labelString}</em>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\tlabelString\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</span>\n\t\t\t\t</span>\n\t\t\t),\n\t\t};\n\n\t\tlet item: ReactNode;\n\t\tif (optionData.disabled && tooltipMenuItemDisabled) {\n\t\t\tconst tooltipPropsFromElement = tooltipMenuItemDisabled.props as {\n\t\t\t\tcontent?: ReactNode;\n\t\t\t\t[key: string]: unknown;\n\t\t\t};\n\t\t\tconst { content, ...userDefinedTooltipProps } = tooltipPropsFromElement;\n\t\t\tconst tooltipProps: Record<string, unknown> = {\n\t\t\t\talign: 'top',\n\t\t\t\tcontent: optionData.tooltipContent || content,\n\t\t\t\tid: tooltipId,\n\t\t\t\tposition: 'absolute',\n\t\t\t\tsilenceTriggerTabbableWarning: true,\n\t\t\t\ttriggerStyle: { width: '100%' },\n\t\t\t\t...userDefinedTooltipProps,\n\t\t\t};\n\t\t\tif (active) {\n\t\t\t\ttooltipProps.isOpen = true;\n\t\t\t}\n\t\t\titem = React.cloneElement(\n\t\t\t\ttooltipMenuItemDisabled,\n\t\t\t\ttooltipProps,\n\t\t\t\tmenuItem[variant]\n\t\t\t);\n\t\t} else {\n\t\t\titem = menuItem[variant];\n\t\t}\n\n\t\treturn (\n\t\t\t<li\n\t\t\t\tclassName=\"slds-listbox__item\"\n\t\t\t\tkey={`menu-option-${optionData.id}`}\n\t\t\t\trole=\"presentation\"\n\t\t\t>\n\t\t\t\t{item}\n\t\t\t</li>\n\t\t);\n\t});\n\n\treturn (\n\t\t<ul\n\t\t\tclassName={classNames(\n\t\t\t\t'slds-listbox slds-listbox_vertical slds-dropdown slds-dropdown_fluid',\n\t\t\t\t{\n\t\t\t\t\t'slds-dropdown_length-with-icon-5': itemVisibleLength === 5,\n\t\t\t\t\t'slds-dropdown_length-with-icon-7': itemVisibleLength === 7,\n\t\t\t\t\t'slds-dropdown_length-with-icon-10': itemVisibleLength === 10,\n\t\t\t\t},\n\t\t\t\tclassNameMenu\n\t\t\t)}\n\t\t\tref={menuRef}\n\t\t\trole=\"presentation\"\n\t\t\tstyle={{\n\t\t\t\twidth: inheritWidthOf === 'menu' ? 'auto' : undefined,\n\t\t\t\tmaxWidth: menuMaxWidth,\n\t\t\t\tposition: menuPosition !== 'relative' ? 'relative' : undefined,\n\t\t\t}}\n\t\t>\n\t\t\t{menuOptions.length ? (\n\t\t\t\tmenuOptions\n\t\t\t) : (\n\t\t\t\t<li\n\t\t\t\t\tclassName=\"slds-listbox__item slds-listbox__status\"\n\t\t\t\t\trole=\"status\"\n\t\t\t\t\taria-live=\"polite\"\n\t\t\t\t>\n\t\t\t\t\t<span className=\"slds-m-left_x-large slds-p-vertical_medium\">\n\t\t\t\t\t\t{labels.noOptionsFound}\n\t\t\t\t\t</span>\n\t\t\t\t</li>\n\t\t\t)}\n\t\t\t{hasMenuSpinner && (\n\t\t\t\t<li role=\"presentation\" className=\"slds-listbox__item\">\n\t\t\t\t\t<div className=\"slds-align_absolute-center slds-p-top_medium\">\n\t\t\t\t\t\t<Spinner\n\t\t\t\t\t\t\tassistiveText={{ label: assistiveText.loadingMenuItems }}\n\t\t\t\t\t\t\thasContainer={false}\n\t\t\t\t\t\t\tisInline\n\t\t\t\t\t\t\tsize=\"x-small\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\t\t\t)}\n\t\t</ul>\n\t);\n};\n\nMenu.displayName = 'Menu';\n\nexport default Menu;\n"],"mappings":"8QAuKA,IAAM,GAAW,EAA2B,IAAkC,CAC7E,GAAI,CAAC,GAAS,EAAM,SAAW,GAAK,CAAC,GAAc,EAAW,SAAW,EACxE,OAAO,EAER,IAAM,EAAW,EAAM,YAAY,CAAC,CAAC,QAAQ,EAAW,YAAY,CAAC,EAarE,OAZI,EAAW,IAEb,EAAA,EAAA,KAAA,CAAC,EAAA,QAAM,SAAP,CAAA,SAAA,CACE,EAAM,OAAO,EAAG,CAAQ,GACzB,EAAA,EAAA,IAAA,CAAC,OAAD,CAAiB,UAAU,uBAAwB,SAAA,GAAG,EAAM,OAC3D,EACA,EAAW,MACZ,GAAU,EAHA,MAGA,EACT,EAAM,OAAO,EAAW,EAAW,MAAM,CAC3B,CAAA,CAAA,EAGX,CACR,EAEM,GACL,EACA,IAEI,GAAa,MAAQ,OAAO,GAAc,SACtC,EAED,EAAU,CAAU,EAQtB,EAAkB,GACnB,CAAC,EAAA,QAAM,eAAe,CAAI,GAGZ,EAAK,MACT,MAAQ,KACd,EAED,EAAA,QAAM,aAAa,EAAM,CAAE,KAAM,OAAQ,CAA4B,EAGvE,GAA6B,CAClC,eACA,oBAAoB,GACpB,gBAAgB,CAAC,EACjB,yBACA,gBACA,iBACA,UACA,aAAa,GACb,aACA,oBACA,SACA,iBACA,WACA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