@bikdotai/bik-component-library 0.0.805-beta.18 → 0.0.805-beta.2

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 (313) hide show
  1. package/dist/cjs/components/BikGiftedChat/Bubble/Bubble.js +1 -1
  2. package/dist/cjs/components/BikGiftedChat/Bubble/Bubble.js.map +1 -1
  3. package/dist/cjs/components/BikGiftedChat/GiftedChat/GiftedChat.js +1 -1
  4. package/dist/cjs/components/BikGiftedChat/GiftedChat/GiftedChat.js.map +1 -1
  5. package/dist/cjs/components/BikGiftedChat/GiftedChat/types.js.map +1 -1
  6. package/dist/cjs/components/avatar/Avatar.js +1 -1
  7. package/dist/cjs/components/avatar/Avatar.js.map +1 -1
  8. package/dist/cjs/components/avatar/Avatar.styled.js +3 -3
  9. package/dist/cjs/components/avatar/Avatar.styled.js.map +1 -1
  10. package/dist/cjs/components/avatar/AvatarHelper.js +1 -1
  11. package/dist/cjs/components/avatar/AvatarHelper.js.map +1 -1
  12. package/dist/cjs/components/bik-layout/BikSidebar.js.map +1 -1
  13. package/dist/cjs/components/button/Button.js +1 -1
  14. package/dist/cjs/components/button/Button.js.map +1 -1
  15. package/dist/cjs/components/button/Button.styled.js +1 -1
  16. package/dist/cjs/components/button/Button.styled.js.map +1 -1
  17. package/dist/cjs/components/button/themes.js +1 -1
  18. package/dist/cjs/components/button/themes.js.map +1 -1
  19. package/dist/cjs/components/country-code-picker/CountryCodePicker.js.map +1 -1
  20. package/dist/cjs/components/country-code-picker/CountryPicker.js.map +1 -1
  21. package/dist/cjs/components/dropdown/Dropdown.js +1 -1
  22. package/dist/cjs/components/dropdown/Dropdown.js.map +1 -1
  23. package/dist/cjs/components/dropdown/DropdownPopover/index.js +1 -1
  24. package/dist/cjs/components/dropdown/DropdownPopover/index.js.map +1 -1
  25. package/dist/cjs/components/dropdown/OpenedDropdown/components/OpennedDropdown.js +1 -1
  26. package/dist/cjs/components/dropdown/OpenedDropdown/components/OpennedDropdown.js.map +1 -1
  27. package/dist/cjs/components/dropdown/OpenedDropdown/components/OpennedDropdown.styled.js +5 -6
  28. package/dist/cjs/components/dropdown/OpenedDropdown/components/OpennedDropdown.styled.js.map +1 -1
  29. package/dist/cjs/components/dropdown/OpenedDropdown/components/description/Description.js.map +1 -1
  30. package/dist/cjs/components/dropdown/OpenedDropdown/components/description/Description.styled.js.map +1 -1
  31. package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/FreeFormMenu.js.map +1 -1
  32. package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuItem.js +7 -7
  33. package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuItem.js.map +1 -1
  34. package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuList.js +1 -1
  35. package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuList.js.map +1 -1
  36. package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuList.styled.js +4 -8
  37. package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuList.styled.js.map +1 -1
  38. package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/SelectAllMenu.js.map +1 -1
  39. package/dist/cjs/components/dropdown/OpenedDropdown/components/searchbox/SearchBox.js +1 -1
  40. package/dist/cjs/components/dropdown/OpenedDropdown/components/searchbox/SearchBox.js.map +1 -1
  41. package/dist/cjs/components/dropdown/OpenedDropdown/components/searchbox/SearchZeroState.js +1 -1
  42. package/dist/cjs/components/dropdown/OpenedDropdown/components/searchbox/SearchZeroState.js.map +1 -1
  43. package/dist/cjs/components/dropdown-button/DropdownButton.js +1 -1
  44. package/dist/cjs/components/dropdown-button/DropdownButton.js.map +1 -1
  45. package/dist/cjs/components/dropdown-button/DropdownButton.style.js +6 -10
  46. package/dist/cjs/components/dropdown-button/DropdownButton.style.js.map +1 -1
  47. package/dist/cjs/components/fab-menu/FABMenu.js.map +1 -1
  48. package/dist/cjs/components/feature-announcements/FeatureAnnouncementProvider.js +1 -1
  49. package/dist/cjs/components/feature-announcements/FeatureAnnouncementProvider.js.map +1 -1
  50. package/dist/cjs/components/icon-button/IconButton.js +1 -1
  51. package/dist/cjs/components/icon-button/IconButton.js.map +1 -1
  52. package/dist/cjs/components/icon-button/IconButton.styled.js +3 -3
  53. package/dist/cjs/components/icon-button/IconButton.styled.js.map +1 -1
  54. package/dist/cjs/components/icon-button/theme.js +1 -1
  55. package/dist/cjs/components/icon-button/theme.js.map +1 -1
  56. package/dist/cjs/components/input/Input.js +1 -1
  57. package/dist/cjs/components/input/Input.js.map +1 -1
  58. package/dist/cjs/components/input/Input.styled.js +1 -1
  59. package/dist/cjs/components/input/Input.styled.js.map +1 -1
  60. package/dist/cjs/components/list-item/ListItem.js +1 -1
  61. package/dist/cjs/components/list-item/ListItem.js.map +1 -1
  62. package/dist/cjs/components/list-item/ListItem.styled.js +1 -1
  63. package/dist/cjs/components/list-item/ListItem.styled.js.map +1 -1
  64. package/dist/cjs/components/list-item/themes.js +1 -1
  65. package/dist/cjs/components/list-item/themes.js.map +1 -1
  66. package/dist/cjs/components/multi-level-dropdown/GroupedMenuList.js +1 -1
  67. package/dist/cjs/components/multi-level-dropdown/GroupedMenuList.js.map +1 -1
  68. package/dist/cjs/components/multi-level-dropdown/MenuItem.js +1 -1
  69. package/dist/cjs/components/multi-level-dropdown/MenuItem.js.map +1 -1
  70. package/dist/cjs/components/multi-level-dropdown/MenuList.js +1 -1
  71. package/dist/cjs/components/multi-level-dropdown/MenuList.js.map +1 -1
  72. package/dist/cjs/components/multi-level-dropdown/MultiLevelDropdown.js +1 -1
  73. package/dist/cjs/components/multi-level-dropdown/MultiLevelDropdown.js.map +1 -1
  74. package/dist/cjs/components/multi-level-dropdown/MultiLevelDropdown.styled.js +30 -33
  75. package/dist/cjs/components/multi-level-dropdown/MultiLevelDropdown.styled.js.map +1 -1
  76. package/dist/cjs/components/tag/Tag.js +1 -1
  77. package/dist/cjs/components/tag/Tag.js.map +1 -1
  78. package/dist/cjs/components/tag/Tag.styled.js +1 -1
  79. package/dist/cjs/components/tag/Tag.styled.js.map +1 -1
  80. package/dist/cjs/components/tag/model.js.map +1 -1
  81. package/dist/cjs/components/whats-new/WhatsNew.js +1 -1
  82. package/dist/cjs/components/whats-new/WhatsNew.js.map +1 -1
  83. package/dist/cjs/components/whats-new/WhatsNewButton.js +1 -1
  84. package/dist/cjs/components/whats-new/WhatsNewButton.js.map +1 -1
  85. package/dist/cjs/constants/Theme.js +1 -1
  86. package/dist/cjs/constants/Theme.js.map +1 -1
  87. package/dist/cjs/icons/Arrows/Chevron/ChevronUp.js +1 -1
  88. package/dist/cjs/icons/Arrows/Chevron/ChevronUp.js.map +1 -1
  89. package/dist/cjs/index.js +1 -1
  90. package/dist/cjs/src/components/BikGiftedChat/GiftedChat/types.d.ts +2 -6
  91. package/dist/cjs/src/components/avatar/Avatar.d.ts +2 -3
  92. package/dist/cjs/src/components/avatar/AvatarHelper.d.ts +4 -5
  93. package/dist/cjs/src/components/bik-layout/index.d.ts +0 -2
  94. package/dist/cjs/src/components/button/Button.styled.d.ts +1 -1
  95. package/dist/cjs/src/components/button/model.d.ts +3 -3
  96. package/dist/cjs/src/components/button/themes.d.ts +2 -2
  97. package/dist/cjs/src/components/country-code-picker/CountryCodePicker.d.ts +1 -1
  98. package/dist/cjs/src/components/country-code-picker/CountryPicker.d.ts +1 -1
  99. package/dist/cjs/src/components/dropdown/OpenedDropdown/components/OpennedDropdown.styled.d.ts +1 -1
  100. package/dist/cjs/src/components/dropdown/OpenedDropdown/components/description/Description.d.ts +1 -1
  101. package/dist/cjs/src/components/dropdown/OpenedDropdown/components/description/Description.styled.d.ts +1 -1
  102. package/dist/cjs/src/components/dropdown/OpenedDropdown/components/menu/FreeFormMenu.d.ts +1 -1
  103. package/dist/cjs/src/components/dropdown/OpenedDropdown/components/menu/MenuItem.d.ts +1 -1
  104. package/dist/cjs/src/components/dropdown/OpenedDropdown/components/menu/MenuList.d.ts +1 -1
  105. package/dist/cjs/src/components/dropdown/OpenedDropdown/components/menu/MenuList.styled.d.ts +1 -2
  106. package/dist/cjs/src/components/dropdown/OpenedDropdown/components/menu/SelectAllMenu.d.ts +1 -1
  107. package/dist/cjs/src/components/dropdown/OpenedDropdown/components/searchbox/SearchBox.d.ts +1 -1
  108. package/dist/cjs/src/components/dropdown/OpenedDropdown/components/searchbox/SearchZeroState.d.ts +0 -1
  109. package/dist/cjs/src/components/dropdown/OpenedDropdown/utils/iterationOnOptions.d.ts +0 -2
  110. package/dist/cjs/src/components/dropdown/hooks/useDropdown.d.ts +0 -2
  111. package/dist/cjs/src/components/dropdown/type.d.ts +1 -2
  112. package/dist/cjs/src/components/dropdown-button/DropdownButton.d.ts +1 -3
  113. package/dist/cjs/src/components/dropdown-button/DropdownButton.style.d.ts +2 -9
  114. package/dist/cjs/src/components/fab-menu/FABMenu.d.ts +1 -1
  115. package/dist/cjs/src/components/icon-button/IconButton.styled.d.ts +1 -3
  116. package/dist/cjs/src/components/icon-button/model.d.ts +1 -12
  117. package/dist/cjs/src/components/input/Input.model.d.ts +1 -2
  118. package/dist/cjs/src/components/input/Input.styled.d.ts +1 -16
  119. package/dist/cjs/src/components/list-item/List.model.d.ts +1 -1
  120. package/dist/cjs/src/components/list-item/ListItem.styled.d.ts +1 -1
  121. package/dist/cjs/src/components/list-item/themes.d.ts +2 -2
  122. package/dist/cjs/src/components/multi-level-dropdown/GroupedMenuList.d.ts +0 -1
  123. package/dist/cjs/src/components/multi-level-dropdown/MenuItem.d.ts +0 -1
  124. package/dist/cjs/src/components/multi-level-dropdown/MenuList.d.ts +0 -1
  125. package/dist/cjs/src/components/multi-level-dropdown/MultiLevelDropdown.styled.d.ts +3 -13
  126. package/dist/cjs/src/components/multi-level-dropdown/type.d.ts +0 -1
  127. package/dist/cjs/src/components/tag/Tag.d.ts +1 -1
  128. package/dist/cjs/src/components/tag/Tag.stories.d.ts +5 -5
  129. package/dist/cjs/src/components/tag/Tag.styled.d.ts +1 -3
  130. package/dist/cjs/src/components/tag/model.d.ts +1 -5
  131. package/dist/cjs/src/components/whats-new/WhatsNew.d.ts +0 -2
  132. package/dist/cjs/src/components/whats-new/WhatsNew.types.d.ts +0 -2
  133. package/dist/cjs/src/constants/Theme.d.ts +0 -6
  134. package/dist/cjs/src/icons/Arrows/Chevron/ChevronUp.d.ts +2 -1
  135. package/dist/cjs/src/index.d.ts +0 -1
  136. package/dist/esm/components/BikGiftedChat/Bubble/Bubble.js +1 -1
  137. package/dist/esm/components/BikGiftedChat/Bubble/Bubble.js.map +1 -1
  138. package/dist/esm/components/BikGiftedChat/GiftedChat/GiftedChat.js +1 -1
  139. package/dist/esm/components/BikGiftedChat/GiftedChat/GiftedChat.js.map +1 -1
  140. package/dist/esm/components/BikGiftedChat/GiftedChat/types.js.map +1 -1
  141. package/dist/esm/components/avatar/Avatar.js +1 -1
  142. package/dist/esm/components/avatar/Avatar.js.map +1 -1
  143. package/dist/esm/components/avatar/Avatar.styled.js +6 -6
  144. package/dist/esm/components/avatar/Avatar.styled.js.map +1 -1
  145. package/dist/esm/components/avatar/AvatarHelper.js +1 -1
  146. package/dist/esm/components/avatar/AvatarHelper.js.map +1 -1
  147. package/dist/esm/components/bik-layout/BikSidebar.js.map +1 -1
  148. package/dist/esm/components/button/Button.js +1 -1
  149. package/dist/esm/components/button/Button.js.map +1 -1
  150. package/dist/esm/components/button/Button.styled.js +1 -1
  151. package/dist/esm/components/button/Button.styled.js.map +1 -1
  152. package/dist/esm/components/button/themes.js +1 -1
  153. package/dist/esm/components/button/themes.js.map +1 -1
  154. package/dist/esm/components/country-code-picker/CountryCodePicker.js.map +1 -1
  155. package/dist/esm/components/country-code-picker/CountryPicker.js.map +1 -1
  156. package/dist/esm/components/dropdown/Dropdown.js +1 -1
  157. package/dist/esm/components/dropdown/Dropdown.js.map +1 -1
  158. package/dist/esm/components/dropdown/DropdownPopover/index.js +1 -1
  159. package/dist/esm/components/dropdown/DropdownPopover/index.js.map +1 -1
  160. package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.js +1 -1
  161. package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.js.map +1 -1
  162. package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.styled.js +2 -3
  163. package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.styled.js.map +1 -1
  164. package/dist/esm/components/dropdown/OpenedDropdown/components/description/Description.js.map +1 -1
  165. package/dist/esm/components/dropdown/OpenedDropdown/components/description/Description.styled.js.map +1 -1
  166. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/FreeFormMenu.js.map +1 -1
  167. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuItem.js +1 -1
  168. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuItem.js.map +1 -1
  169. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.js +1 -1
  170. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.js.map +1 -1
  171. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.styled.js +2 -6
  172. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.styled.js.map +1 -1
  173. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/SelectAllMenu.js.map +1 -1
  174. package/dist/esm/components/dropdown/OpenedDropdown/components/searchbox/SearchBox.js +1 -1
  175. package/dist/esm/components/dropdown/OpenedDropdown/components/searchbox/SearchBox.js.map +1 -1
  176. package/dist/esm/components/dropdown/OpenedDropdown/components/searchbox/SearchZeroState.js +1 -1
  177. package/dist/esm/components/dropdown/OpenedDropdown/components/searchbox/SearchZeroState.js.map +1 -1
  178. package/dist/esm/components/dropdown-button/DropdownButton.js +1 -1
  179. package/dist/esm/components/dropdown-button/DropdownButton.js.map +1 -1
  180. package/dist/esm/components/dropdown-button/DropdownButton.style.js +4 -8
  181. package/dist/esm/components/dropdown-button/DropdownButton.style.js.map +1 -1
  182. package/dist/esm/components/fab-menu/FABMenu.js.map +1 -1
  183. package/dist/esm/components/feature-announcements/FeatureAnnouncementProvider.js +1 -1
  184. package/dist/esm/components/feature-announcements/FeatureAnnouncementProvider.js.map +1 -1
  185. package/dist/esm/components/icon-button/IconButton.js +1 -1
  186. package/dist/esm/components/icon-button/IconButton.js.map +1 -1
  187. package/dist/esm/components/icon-button/IconButton.styled.js +1 -1
  188. package/dist/esm/components/icon-button/IconButton.styled.js.map +1 -1
  189. package/dist/esm/components/icon-button/theme.js +1 -1
  190. package/dist/esm/components/icon-button/theme.js.map +1 -1
  191. package/dist/esm/components/input/Input.js +1 -1
  192. package/dist/esm/components/input/Input.js.map +1 -1
  193. package/dist/esm/components/input/Input.styled.js +1 -1
  194. package/dist/esm/components/input/Input.styled.js.map +1 -1
  195. package/dist/esm/components/list-item/ListItem.js +1 -1
  196. package/dist/esm/components/list-item/ListItem.js.map +1 -1
  197. package/dist/esm/components/list-item/ListItem.styled.js +1 -1
  198. package/dist/esm/components/list-item/ListItem.styled.js.map +1 -1
  199. package/dist/esm/components/list-item/themes.js +1 -1
  200. package/dist/esm/components/list-item/themes.js.map +1 -1
  201. package/dist/esm/components/multi-level-dropdown/GroupedMenuList.js +1 -1
  202. package/dist/esm/components/multi-level-dropdown/GroupedMenuList.js.map +1 -1
  203. package/dist/esm/components/multi-level-dropdown/MenuItem.js +1 -1
  204. package/dist/esm/components/multi-level-dropdown/MenuItem.js.map +1 -1
  205. package/dist/esm/components/multi-level-dropdown/MenuList.js +1 -1
  206. package/dist/esm/components/multi-level-dropdown/MenuList.js.map +1 -1
  207. package/dist/esm/components/multi-level-dropdown/MultiLevelDropdown.js +1 -1
  208. package/dist/esm/components/multi-level-dropdown/MultiLevelDropdown.js.map +1 -1
  209. package/dist/esm/components/multi-level-dropdown/MultiLevelDropdown.styled.js +29 -32
  210. package/dist/esm/components/multi-level-dropdown/MultiLevelDropdown.styled.js.map +1 -1
  211. package/dist/esm/components/tag/Tag.js +1 -1
  212. package/dist/esm/components/tag/Tag.js.map +1 -1
  213. package/dist/esm/components/tag/Tag.styled.js +1 -1
  214. package/dist/esm/components/tag/Tag.styled.js.map +1 -1
  215. package/dist/esm/components/tag/model.js.map +1 -1
  216. package/dist/esm/components/whats-new/WhatsNew.js +1 -1
  217. package/dist/esm/components/whats-new/WhatsNew.js.map +1 -1
  218. package/dist/esm/components/whats-new/WhatsNewButton.js +1 -1
  219. package/dist/esm/components/whats-new/WhatsNewButton.js.map +1 -1
  220. package/dist/esm/constants/Theme.js +1 -1
  221. package/dist/esm/constants/Theme.js.map +1 -1
  222. package/dist/esm/icons/Arrows/Chevron/ChevronUp.js +1 -1
  223. package/dist/esm/icons/Arrows/Chevron/ChevronUp.js.map +1 -1
  224. package/dist/esm/index.js +1 -1
  225. package/dist/esm/src/components/BikGiftedChat/GiftedChat/types.d.ts +2 -6
  226. package/dist/esm/src/components/avatar/Avatar.d.ts +2 -3
  227. package/dist/esm/src/components/avatar/AvatarHelper.d.ts +4 -5
  228. package/dist/esm/src/components/bik-layout/index.d.ts +0 -2
  229. package/dist/esm/src/components/button/Button.styled.d.ts +1 -1
  230. package/dist/esm/src/components/button/model.d.ts +3 -3
  231. package/dist/esm/src/components/button/themes.d.ts +2 -2
  232. package/dist/esm/src/components/country-code-picker/CountryCodePicker.d.ts +1 -1
  233. package/dist/esm/src/components/country-code-picker/CountryPicker.d.ts +1 -1
  234. package/dist/esm/src/components/dropdown/OpenedDropdown/components/OpennedDropdown.styled.d.ts +1 -1
  235. package/dist/esm/src/components/dropdown/OpenedDropdown/components/description/Description.d.ts +1 -1
  236. package/dist/esm/src/components/dropdown/OpenedDropdown/components/description/Description.styled.d.ts +1 -1
  237. package/dist/esm/src/components/dropdown/OpenedDropdown/components/menu/FreeFormMenu.d.ts +1 -1
  238. package/dist/esm/src/components/dropdown/OpenedDropdown/components/menu/MenuItem.d.ts +1 -1
  239. package/dist/esm/src/components/dropdown/OpenedDropdown/components/menu/MenuList.d.ts +1 -1
  240. package/dist/esm/src/components/dropdown/OpenedDropdown/components/menu/MenuList.styled.d.ts +1 -2
  241. package/dist/esm/src/components/dropdown/OpenedDropdown/components/menu/SelectAllMenu.d.ts +1 -1
  242. package/dist/esm/src/components/dropdown/OpenedDropdown/components/searchbox/SearchBox.d.ts +1 -1
  243. package/dist/esm/src/components/dropdown/OpenedDropdown/components/searchbox/SearchZeroState.d.ts +0 -1
  244. package/dist/esm/src/components/dropdown/OpenedDropdown/utils/iterationOnOptions.d.ts +0 -2
  245. package/dist/esm/src/components/dropdown/hooks/useDropdown.d.ts +0 -2
  246. package/dist/esm/src/components/dropdown/type.d.ts +1 -2
  247. package/dist/esm/src/components/dropdown-button/DropdownButton.d.ts +1 -3
  248. package/dist/esm/src/components/dropdown-button/DropdownButton.style.d.ts +2 -9
  249. package/dist/esm/src/components/fab-menu/FABMenu.d.ts +1 -1
  250. package/dist/esm/src/components/icon-button/IconButton.styled.d.ts +1 -3
  251. package/dist/esm/src/components/icon-button/model.d.ts +1 -12
  252. package/dist/esm/src/components/input/Input.model.d.ts +1 -2
  253. package/dist/esm/src/components/input/Input.styled.d.ts +1 -16
  254. package/dist/esm/src/components/list-item/List.model.d.ts +1 -1
  255. package/dist/esm/src/components/list-item/ListItem.styled.d.ts +1 -1
  256. package/dist/esm/src/components/list-item/themes.d.ts +2 -2
  257. package/dist/esm/src/components/multi-level-dropdown/GroupedMenuList.d.ts +0 -1
  258. package/dist/esm/src/components/multi-level-dropdown/MenuItem.d.ts +0 -1
  259. package/dist/esm/src/components/multi-level-dropdown/MenuList.d.ts +0 -1
  260. package/dist/esm/src/components/multi-level-dropdown/MultiLevelDropdown.styled.d.ts +3 -13
  261. package/dist/esm/src/components/multi-level-dropdown/type.d.ts +0 -1
  262. package/dist/esm/src/components/tag/Tag.d.ts +1 -1
  263. package/dist/esm/src/components/tag/Tag.stories.d.ts +5 -5
  264. package/dist/esm/src/components/tag/Tag.styled.d.ts +1 -3
  265. package/dist/esm/src/components/tag/model.d.ts +1 -5
  266. package/dist/esm/src/components/whats-new/WhatsNew.d.ts +0 -2
  267. package/dist/esm/src/components/whats-new/WhatsNew.types.d.ts +0 -2
  268. package/dist/esm/src/constants/Theme.d.ts +0 -6
  269. package/dist/esm/src/icons/Arrows/Chevron/ChevronUp.d.ts +2 -1
  270. package/dist/esm/src/index.d.ts +0 -1
  271. package/package.json +2 -1
  272. package/dist/cjs/components/bik-layout/BikSidebarV2/BikSidebarV2.js +0 -2
  273. package/dist/cjs/components/bik-layout/BikSidebarV2/BikSidebarV2.js.map +0 -1
  274. package/dist/cjs/components/bik-layout/BikSidebarV2/SidebarV2Popup.js +0 -2
  275. package/dist/cjs/components/bik-layout/BikSidebarV2/SidebarV2Popup.js.map +0 -1
  276. package/dist/cjs/components/bik-layout/BikSidebarV2/SidebarV2Styles.js +0 -294
  277. package/dist/cjs/components/bik-layout/BikSidebarV2/SidebarV2Styles.js.map +0 -1
  278. package/dist/cjs/components/bik-layout/BikSidebarV2/SimpleSidebarV2.js +0 -2
  279. package/dist/cjs/components/bik-layout/BikSidebarV2/SimpleSidebarV2.js.map +0 -1
  280. package/dist/cjs/components/dual-icon-button/DualIconButton.js +0 -2
  281. package/dist/cjs/components/dual-icon-button/DualIconButton.js.map +0 -1
  282. package/dist/cjs/components/dual-icon-button/DualIconButton.styled.js +0 -26
  283. package/dist/cjs/components/dual-icon-button/DualIconButton.styled.js.map +0 -1
  284. package/dist/cjs/src/components/bik-layout/BikSidebarV2/BikSidebarV2.d.ts +0 -33
  285. package/dist/cjs/src/components/bik-layout/BikSidebarV2/SidebarV2.model.d.ts +0 -27
  286. package/dist/cjs/src/components/bik-layout/BikSidebarV2/SidebarV2Popup.d.ts +0 -13
  287. package/dist/cjs/src/components/bik-layout/BikSidebarV2/SidebarV2Styles.d.ts +0 -44
  288. package/dist/cjs/src/components/bik-layout/BikSidebarV2/SimpleSidebarV2.d.ts +0 -3
  289. package/dist/cjs/src/components/dual-icon-button/DualIconButton.d.ts +0 -3
  290. package/dist/cjs/src/components/dual-icon-button/DualIconButton.styled.d.ts +0 -7
  291. package/dist/cjs/src/components/dual-icon-button/index.d.ts +0 -2
  292. package/dist/cjs/src/components/dual-icon-button/model.d.ts +0 -12
  293. package/dist/esm/components/bik-layout/BikSidebarV2/BikSidebarV2.js +0 -2
  294. package/dist/esm/components/bik-layout/BikSidebarV2/BikSidebarV2.js.map +0 -1
  295. package/dist/esm/components/bik-layout/BikSidebarV2/SidebarV2Popup.js +0 -2
  296. package/dist/esm/components/bik-layout/BikSidebarV2/SidebarV2Popup.js.map +0 -1
  297. package/dist/esm/components/bik-layout/BikSidebarV2/SidebarV2Styles.js +0 -294
  298. package/dist/esm/components/bik-layout/BikSidebarV2/SidebarV2Styles.js.map +0 -1
  299. package/dist/esm/components/bik-layout/BikSidebarV2/SimpleSidebarV2.js +0 -2
  300. package/dist/esm/components/bik-layout/BikSidebarV2/SimpleSidebarV2.js.map +0 -1
  301. package/dist/esm/components/dual-icon-button/DualIconButton.js +0 -2
  302. package/dist/esm/components/dual-icon-button/DualIconButton.js.map +0 -1
  303. package/dist/esm/components/dual-icon-button/DualIconButton.styled.js +0 -26
  304. package/dist/esm/components/dual-icon-button/DualIconButton.styled.js.map +0 -1
  305. package/dist/esm/src/components/bik-layout/BikSidebarV2/BikSidebarV2.d.ts +0 -33
  306. package/dist/esm/src/components/bik-layout/BikSidebarV2/SidebarV2.model.d.ts +0 -27
  307. package/dist/esm/src/components/bik-layout/BikSidebarV2/SidebarV2Popup.d.ts +0 -13
  308. package/dist/esm/src/components/bik-layout/BikSidebarV2/SidebarV2Styles.d.ts +0 -44
  309. package/dist/esm/src/components/bik-layout/BikSidebarV2/SimpleSidebarV2.d.ts +0 -3
  310. package/dist/esm/src/components/dual-icon-button/DualIconButton.d.ts +0 -3
  311. package/dist/esm/src/components/dual-icon-button/DualIconButton.styled.d.ts +0 -7
  312. package/dist/esm/src/components/dual-icon-button/index.d.ts +0 -2
  313. package/dist/esm/src/components/dual-icon-button/model.d.ts +0 -12
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),n=require("react"),o=require("../../constants/Theme.js"),i=require("../../assets/icons/chevronDown.svg.js"),r=require("../input/Input.js"),l=require("../input/context/InputStyleProvider.js"),s=require("./ChipInput.js"),a=require("./DropdownPopover/index.js"),d=require("./OpenedDropdown/utils/iterationOnOptions.js");function c(){}const u=u=>{var p,h,v,g,O,{placeHolder:x,size:w,onSelect:j,defaultOptions:S,disabled:b,noErrorHint:f,placeHolderHeight:I,showPlaceholderWhenSelected:m=!1,inputStyle:y={},inputType:C="default",onDeleteChip:L,truncatedText:H,showLeadingIconInPlaceholder:D=!1,showTrailingIconPlaceholder:P=!1,showLabelsOnMoreHover:T=!1,value:q,showSelected:E=!1}=u,R=e.__rest(u,["placeHolder","size","onSelect","defaultOptions","disabled","noErrorHint","placeHolderHeight","showPlaceholderWhenSelected","inputStyle","inputType","onDeleteChip","truncatedText","showLeadingIconInPlaceholder","showTrailingIconPlaceholder","showLabelsOnMoreHover","value","showSelected"]);const[M,W]=n.useState(!1),[_,k]=n.useState(!1),z=null!=w?w:"default",A=n.useRef(),[F,B]=n.useState(null!=S?S:[]);n.useEffect((()=>{var e;const t=[];null===(e=null==R?void 0:R.options)||void 0===e||e.forEach((e=>{e.options?e.options.forEach((e=>{e.selected&&t.push(Object.assign(Object.assign({},e),{label:e.label}))})):e.selected&&t.push(e)})),B([...t])}),[R.options]),n.useEffect((()=>{S&&B([...S])}),[S]);const N=d.getSelectedOptionsAsText(F),U=m?x:null!==(p=null!=N?N:x)&&void 0!==p?p:"Select an option",V=R.buttonWidth,G=null!==(h=null!=V?V:R.width)&&void 0!==h?h:"100%",J=null!==(v=R.dropdownWidth)&&void 0!==v?v:G;return t.jsx(t.Fragment,{children:t.jsx(l.InputStyleContext.Provider,Object.assign({value:{InputWrapper:Object.assign(Object.assign(Object.assign({height:I||("x-small"===z?24:"small"===z?32:48),width:G},V?{maxWidth:V}:{}),{zIndex:1,cursor:"pointer",padding:"x-small"===z?"4px 8px":"6px 8px",backgroundColor:"3.0"===R.version?M||_?o.COLORS.surface.hovered:o.COLORS.surface.standard:E&&void 0!==q?o.BASE_COLORS.positive[100]:_?o.COLORS.background.inactive:o.COLORS.surface.standard,transition:"background-color 0.3s ease"}),y),input:{minHeight:"100%",maxWidth:"100%",color:E&&void 0!==q?o.COLORS.content.positive:"inherit"}}},{children:t.jsx("div",Object.assign({onMouseEnter:()=>k(!0),onMouseLeave:()=>k(!1),style:R.width?{width:R.width}:void 0},{children:t.jsxs(a.DropdownPopover,Object.assign({"data-test":R["data-test"],ref:A,onSelect:function(e){Array.isArray(e)?B([...e]):B([e]),null==j||j(e)},disabled:b,onDropdownVisbilityChange:e=>W(e)},R,{width:J},{children:["default"==C&&t.jsx(r.Input,{version:R.version,noErrorHint:f,state:b?"disabled":"none",value:void 0===q?U:q,errorMessage:R.error,variant:z,placeholder:null!=x?x:"Select an option",onChangeText:c,leftIcon:D&&(null===(g=F[0])||void 0===g?void 0:g.leadingIcon)?{icon:()=>{var e;return t.jsx(t.Fragment,{children:null===(e=F[0])||void 0===e?void 0:e.leadingIcon})}}:void 0,rightIcon:{icon:()=>{var e;return t.jsxs("div",Object.assign({style:{display:"flex"}},{children:[P&&(null===(e=F[0])||void 0===e?void 0:e.trailingIcon),t.jsx(i.default,{style:{transform:M?"rotate(180deg)":"rotate(0deg)"},onClick:c,width:"x-small"===z?16:"small"===z?20:24,height:"x-small"===z?16:"small"===z?20:24,color:E?o.COLORS.content.positive:o.COLORS.content.primary})]}))}},truncateText:null==H||H}),"chip"==C&&t.jsx(s.default,{placeholder:null!=x?x:"Select options",chips:F,onDeleteChip:e=>{null==L||L(e)},errorMessage:R.error,isDropdownOpened:M,sizeToUse:z,containerStyle:{width:null!==(O=R.width)&&void 0!==O?O:"100%",cursor:"pointer"},showLabelsOnMoreHover:T})]}))}))}))})};u.displayName="Dropdown",exports.Dropdown=u;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),o=require("react"),n=require("../../constants/Theme.js"),i=require("../../assets/icons/chevronDown.svg.js"),l=require("../input/Input.js"),r=require("../input/context/InputStyleProvider.js"),s=require("./ChipInput.js"),a=require("./DropdownPopover/index.js"),d=require("./OpenedDropdown/utils/iterationOnOptions.js");function c(){}const u=u=>{var p,h,v,g,x,{placeHolder:w,size:j,onSelect:O,defaultOptions:f,disabled:b,noErrorHint:S,placeHolderHeight:I,showPlaceholderWhenSelected:m=!1,inputStyle:y={},inputType:C="default",onDeleteChip:H,truncatedText:D,showLeadingIconInPlaceholder:E=!1,showTrailingIconPlaceholder:P=!1,showLabelsOnMoreHover:T=!1,value:q,showSelected:L=!1}=u,M=e.__rest(u,["placeHolder","size","onSelect","defaultOptions","disabled","noErrorHint","placeHolderHeight","showPlaceholderWhenSelected","inputStyle","inputType","onDeleteChip","truncatedText","showLeadingIconInPlaceholder","showTrailingIconPlaceholder","showLabelsOnMoreHover","value","showSelected"]);const[W,_]=o.useState(!1),[R,k]=o.useState(!1),z=null!=j?j:"default",A=o.useRef(),[F,N]=o.useState(null!=f?f:[]);o.useEffect((()=>{var e;const t=[];null===(e=null==M?void 0:M.options)||void 0===e||e.forEach((e=>{e.options?e.options.forEach((e=>{e.selected&&t.push(Object.assign(Object.assign({},e),{label:e.label}))})):e.selected&&t.push(e)})),N([...t])}),[M.options]),o.useEffect((()=>{f&&N([...f])}),[f]);const U=d.getSelectedOptionsAsText(F),V=m?w:null!==(p=null!=U?U:w)&&void 0!==p?p:"Select an option",B=M.buttonWidth,G=null!==(h=null!=B?B:M.width)&&void 0!==h?h:"100%",J=null!==(v=M.dropdownWidth)&&void 0!==v?v:G;return t.jsx(t.Fragment,{children:t.jsx(r.InputStyleContext.Provider,Object.assign({value:{InputWrapper:Object.assign(Object.assign(Object.assign({height:I||("x-small"===z?24:"small"===z?32:48),width:G},B?{maxWidth:B}:{}),{zIndex:1,cursor:"pointer",padding:"x-small"===z?"4px 8px":"6px 8px",backgroundColor:L&&void 0!==q?n.COLORS.background.positive.light:R?"#E0E0E0":"#ffffff",transition:"background-color 0.3s ease"}),y),input:{minHeight:"100%",maxWidth:"100%",color:L&&void 0!==q?n.COLORS.content.positive:"inherit"}}},{children:t.jsx("div",Object.assign({onMouseEnter:()=>k(!0),onMouseLeave:()=>k(!1),style:M.width?{width:M.width}:void 0},{children:t.jsxs(a.DropdownPopover,Object.assign({"data-test":M["data-test"],ref:A,onSelect:function(e){Array.isArray(e)?N([...e]):N([e]),null==O||O(e)},disabled:b,onDropdownVisbilityChange:e=>_(e)},M,{width:J},{children:["default"==C&&t.jsx(l.Input,{version:M.version,noErrorHint:S,state:b?"disabled":"none",value:void 0===q?V:q,errorMessage:M.error,variant:z,placeholder:null!=w?w:"Select an option",onChangeText:c,leftIcon:E&&(null===(g=F[0])||void 0===g?void 0:g.leadingIcon)?{icon:()=>{var e;return t.jsx(t.Fragment,{children:null===(e=F[0])||void 0===e?void 0:e.leadingIcon})}}:void 0,rightIcon:{icon:()=>{var e;return t.jsxs("div",Object.assign({style:{display:"flex"}},{children:[P&&(null===(e=F[0])||void 0===e?void 0:e.trailingIcon),t.jsx(i.default,{style:{transform:W?"rotate(180deg)":"rotate(0deg)"},onClick:c,width:"x-small"===z?16:"small"===z?20:24,height:"x-small"===z?16:"small"===z?20:24,color:L?n.COLORS.content.positive:n.COLORS.content.primary})]}))}},truncateText:null==D||D}),"chip"==C&&t.jsx(s.default,{placeholder:null!=w?w:"Select options",chips:F,onDeleteChip:e=>{null==H||H(e)},errorMessage:M.error,isDropdownOpened:W,sizeToUse:z,containerStyle:{width:null!==(x=M.width)&&void 0!==x?x:"100%",cursor:"pointer"},showLabelsOnMoreHover:T})]}))}))}))})};u.displayName="Dropdown",exports.Dropdown=u;
2
2
  //# sourceMappingURL=Dropdown.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Dropdown.js","sources":["../../../../src/components/dropdown/Dropdown.tsx"],"sourcesContent":["import React, { Ref, useEffect, useRef, useState } from 'react';\nimport { BASE_COLORS, COLORS } from '@src/constants/Theme';\nimport DownIcon from '../../assets/icons/chevronDown.svg';\nimport { Input } from '../input';\nimport { InputStyleContext } from '../input/context/InputStyleProvider';\nimport ChipInput from './ChipInput';\nimport { DropdownPopover } from './DropdownPopover';\nimport { getSelectedOptionsAsText } from './OpenedDropdown/utils/iterationOnOptions';\nimport {\n\tDropdownOption,\n\tGroupedOption,\n\tOpenDropdownProps,\n\tSingleOption,\n} from './type';\n\nexport type DropdownProps = OpenDropdownProps & {\n\tplaceHolder?: string;\n\tsize?: 'default' | 'small' | 'x-small';\n\tdisabled?: boolean;\n\tnoErrorHint?: boolean;\n\tbuttonWidth?: string;\n\tplaceHolderHeight?: string;\n\tshowPlaceholderWhenSelected?: boolean;\n\tinputStyle?: React.CSSProperties;\n\tinputType?: 'chip' | 'default';\n\tonDeleteChip?: (chip: SingleOption) => void;\n\ttruncatedText?: boolean;\n\t'data-test'?: string;\n\tshowLeadingIconInPlaceholder?: boolean;\n\tshowTrailingIconPlaceholder?: boolean;\n\tshowLabelsOnMoreHover?: boolean;\n\tbackgroundColor?: string;\n\tvalue?: string;\n\tshowSelected?: boolean;\n};\n\nfunction noop() {\n\t/** empty */\n}\n\nexport const Dropdown: React.FC<DropdownProps> = ({\n\tplaceHolder,\n\tsize,\n\tonSelect,\n\tdefaultOptions,\n\tdisabled,\n\tnoErrorHint,\n\tplaceHolderHeight,\n\tshowPlaceholderWhenSelected = false,\n\tinputStyle = {},\n\tinputType = 'default',\n\tonDeleteChip,\n\ttruncatedText,\n\tshowLeadingIconInPlaceholder = false,\n\tshowTrailingIconPlaceholder = false,\n\tshowLabelsOnMoreHover = false,\n\tvalue,\n\tshowSelected = false,\n\t...openDropdownProps\n}) => {\n\tconst [isDropdownOpened, setDropdownOpenFlag] = useState(false);\n\tconst [isHovering, setIsHovering] = useState(false);\n\tconst sizeToUse = size ?? 'default';\n\tconst dropdownVisibilityRef = useRef<{\n\t\topenDropdown: boolean;\n\t}>();\n\tconst [selectedOption, setSelectedOption] = useState<DropdownOption[]>(\n\t\tdefaultOptions ?? [],\n\t);\n\tfunction handleSelection(option: DropdownOption | DropdownOption[]) {\n\t\tif (Array.isArray(option)) {\n\t\t\tsetSelectedOption([...option]);\n\t\t} else {\n\t\t\tsetSelectedOption([...[option]]);\n\t\t}\n\t\tonSelect?.(option);\n\t}\n\n\tuseEffect(() => {\n\t\tconst flatSelectedOption: SingleOption[] = [];\n\t\topenDropdownProps?.options?.forEach((option) => {\n\t\t\tif ((option as GroupedOption).options) {\n\t\t\t\t(option as GroupedOption).options.forEach((op) => {\n\t\t\t\t\tif (op.selected) {\n\t\t\t\t\t\tflatSelectedOption.push({\n\t\t\t\t\t\t\t...op,\n\t\t\t\t\t\t\tlabel: op.label,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tif ((option as SingleOption).selected) {\n\t\t\t\t\tflatSelectedOption.push(option as SingleOption);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tsetSelectedOption([...flatSelectedOption]);\n\t}, [openDropdownProps.options]);\n\n\tuseEffect(() => {\n\t\tif (defaultOptions) {\n\t\t\tsetSelectedOption([...defaultOptions]);\n\t\t}\n\t}, [defaultOptions]);\n\n\tconst textVal = getSelectedOptionsAsText(selectedOption);\n\tconst displayText = showPlaceholderWhenSelected\n\t\t? placeHolder\n\t\t: textVal ?? placeHolder ?? 'Select an option';\n\n\tconst configuredMaxWidth = openDropdownProps.buttonWidth;\n\n\t// Shared width for the input wrapper and dropdown popover\n\tconst inputWidth = configuredMaxWidth ?? openDropdownProps.width ?? '100%';\n\n\t// Width passed to dropdown popover — matches input box width\n\tconst dropdownWidth = openDropdownProps.dropdownWidth ?? inputWidth;\n\n\treturn (\n\t\t<>\n\t\t\t<InputStyleContext.Provider\n\t\t\t\tvalue={{\n\t\t\t\t\tInputWrapper: {\n\t\t\t\t\t\theight: placeHolderHeight\n\t\t\t\t\t\t\t? placeHolderHeight\n\t\t\t\t\t\t\t: sizeToUse === 'x-small'\n\t\t\t\t\t\t\t? 24\n\t\t\t\t\t\t\t: sizeToUse === 'small'\n\t\t\t\t\t\t\t? 32\n\t\t\t\t\t\t\t: 48,\n\t\t\t\t\t\twidth: inputWidth,\n\t\t\t\t\t\t...(configuredMaxWidth ? { maxWidth: configuredMaxWidth } : {}),\n\t\t\t\t\t\tzIndex: 1,\n\t\t\t\t\t\tcursor: 'pointer',\n\t\t\t\t\t\tpadding: sizeToUse === 'x-small' ? '4px 8px' : '6px 8px',\n\t\t\t\t\t\tbackgroundColor:\n\t\t\t\t\t\t\topenDropdownProps.version === '3.0'\n\t\t\t\t\t\t\t\t? isDropdownOpened || isHovering\n\t\t\t\t\t\t\t\t\t? COLORS.surface.hovered\n\t\t\t\t\t\t\t\t\t: COLORS.surface.standard\n\t\t\t\t\t\t\t\t: showSelected && value !== undefined\n\t\t\t\t\t\t\t\t? BASE_COLORS.positive['100']\n\t\t\t\t\t\t\t\t: isHovering\n\t\t\t\t\t\t\t\t? COLORS.background.inactive\n\t\t\t\t\t\t\t\t: COLORS.surface.standard,\n\t\t\t\t\t\ttransition: 'background-color 0.3s ease',\n\t\t\t\t\t\t...inputStyle,\n\t\t\t\t\t},\n\t\t\t\t\tinput: {\n\t\t\t\t\t\tminHeight: '100%',\n\t\t\t\t\t\tmaxWidth: '100%',\n\t\t\t\t\t\tcolor:\n\t\t\t\t\t\t\tshowSelected && value !== undefined\n\t\t\t\t\t\t\t\t? COLORS.content.positive\n\t\t\t\t\t\t\t\t: 'inherit',\n\t\t\t\t\t},\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tonMouseEnter={() => setIsHovering(true)}\n\t\t\t\t\tonMouseLeave={() => setIsHovering(false)}\n\t\t\t\t\tstyle={\n\t\t\t\t\t\topenDropdownProps.width\n\t\t\t\t\t\t\t? { width: openDropdownProps.width }\n\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t\t<DropdownPopover\n\t\t\t\t\t\tdata-test={openDropdownProps['data-test']}\n\t\t\t\t\t\tref={\n\t\t\t\t\t\t\tdropdownVisibilityRef as Ref<{\n\t\t\t\t\t\t\t\topenDropdown: boolean;\n\t\t\t\t\t\t\t}>\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonSelect={handleSelection}\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\tonDropdownVisbilityChange={(isOpen) => setDropdownOpenFlag(isOpen)}\n\t\t\t\t\t\t{...openDropdownProps}\n\t\t\t\t\t\twidth={dropdownWidth}\n\t\t\t\t\t>\n\t\t\t\t\t\t{inputType == 'default' && (\n\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\tversion={openDropdownProps.version}\n\t\t\t\t\t\t\t\tnoErrorHint={noErrorHint}\n\t\t\t\t\t\t\t\tstate={disabled ? 'disabled' : 'none'}\n\t\t\t\t\t\t\t\tvalue={value === undefined ? displayText : value}\n\t\t\t\t\t\t\t\terrorMessage={openDropdownProps.error}\n\t\t\t\t\t\t\t\tvariant={sizeToUse}\n\t\t\t\t\t\t\t\tplaceholder={placeHolder ?? 'Select an option'}\n\t\t\t\t\t\t\t\tonChangeText={noop}\n\t\t\t\t\t\t\t\tleftIcon={\n\t\t\t\t\t\t\t\t\tshowLeadingIconInPlaceholder && selectedOption[0]?.leadingIcon\n\t\t\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\t\t\ticon: () => <>{selectedOption[0]?.leadingIcon}</>,\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\trightIcon={{\n\t\t\t\t\t\t\t\t\ticon: () => (\n\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\t\t\tdisplay: 'flex',\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\t\t{showTrailingIconPlaceholder &&\n\t\t\t\t\t\t\t\t\t\t\t\t(selectedOption[0] as SingleOption)?.trailingIcon}\n\t\t\t\t\t\t\t\t\t\t\t<DownIcon\n\t\t\t\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\t\t\t\ttransform: isDropdownOpened\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'rotate(180deg)'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: 'rotate(0deg)',\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={noop}\n\t\t\t\t\t\t\t\t\t\t\t\twidth={\n\t\t\t\t\t\t\t\t\t\t\t\t\tsizeToUse === 'x-small'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 16\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: sizeToUse === 'small'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 20\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: 24\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\theight={\n\t\t\t\t\t\t\t\t\t\t\t\t\tsizeToUse === 'x-small'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 16\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: sizeToUse === 'small'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 20\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: 24\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tcolor={\n\t\t\t\t\t\t\t\t\t\t\t\t\tshowSelected\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? COLORS.content.positive\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: COLORS.content.primary\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</div>\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\ttruncateText={truncatedText ?? true}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{inputType == 'chip' && (\n\t\t\t\t\t\t\t<ChipInput\n\t\t\t\t\t\t\t\tplaceholder={placeHolder ?? 'Select options'}\n\t\t\t\t\t\t\t\tchips={selectedOption as SingleOption[]}\n\t\t\t\t\t\t\t\tonDeleteChip={(chip) => {\n\t\t\t\t\t\t\t\t\tonDeleteChip?.(chip);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\terrorMessage={openDropdownProps.error}\n\t\t\t\t\t\t\t\tisDropdownOpened={isDropdownOpened}\n\t\t\t\t\t\t\t\tsizeToUse={sizeToUse}\n\t\t\t\t\t\t\t\tcontainerStyle={{\n\t\t\t\t\t\t\t\t\twidth: openDropdownProps.width ?? '100%',\n\t\t\t\t\t\t\t\t\tcursor: 'pointer',\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tshowLabelsOnMoreHover={showLabelsOnMoreHover}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</DropdownPopover>\n\t\t\t\t</div>\n\t\t\t</InputStyleContext.Provider>\n\t\t</>\n\t);\n};\n\nDropdown.displayName = 'Dropdown';\n"],"names":["noop","Dropdown","_a","placeHolder","size","onSelect","defaultOptions","disabled","noErrorHint","placeHolderHeight","showPlaceholderWhenSelected","inputStyle","inputType","onDeleteChip","truncatedText","showLeadingIconInPlaceholder","showTrailingIconPlaceholder","showLabelsOnMoreHover","value","showSelected","openDropdownProps","__rest","isDropdownOpened","setDropdownOpenFlag","useState","isHovering","setIsHovering","sizeToUse","dropdownVisibilityRef","useRef","selectedOption","setSelectedOption","useEffect","flatSelectedOption","options","forEach","option","op","selected","push","Object","assign","label","textVal","getSelectedOptionsAsText","displayText","_b","configuredMaxWidth","buttonWidth","inputWidth","_c","width","dropdownWidth","_d","_jsx","InputStyleContext","Provider","InputWrapper","height","maxWidth","zIndex","cursor","padding","backgroundColor","version","COLORS","surface","hovered","standard","undefined","BASE_COLORS","positive","background","inactive","transition","input","minHeight","color","content","children","jsx","onMouseEnter","onMouseLeave","style","_jsxs","jsxs","DropdownPopover","ref","Array","isArray","onDropdownVisbilityChange","isOpen","Input","state","errorMessage","error","variant","placeholder","onChangeText","leftIcon","_e","leadingIcon","icon","_Fragment","rightIcon","display","trailingIcon","DownIcon","transform","onClick","primary","truncateText","ChipInput","chips","chip","containerStyle","_f","displayName"],"mappings":"0cAoCA,SAASA,IACR,CAGYC,MAAAA,EAAqCC,mBAAAC,YACjDA,EAAWC,KACXA,EAAIC,SACJA,EAAQC,eACRA,EAAcC,SACdA,EAAQC,YACRA,EAAWC,kBACXA,EAAiBC,4BACjBA,GAA8B,EAAKC,WACnCA,EAAa,CAAE,EAAAC,UACfA,EAAY,UAASC,aACrBA,EAAYC,cACZA,EAAaC,6BACbA,GAA+B,EAAKC,4BACpCA,GAA8B,EAAKC,sBACnCA,GAAwB,EAAKC,MAC7BA,EAAKC,aACLA,GAAe,KACZC,EAlB8CC,EAAAA,OAAAnB,EAAA,CAAA,cAAA,OAAA,WAAA,iBAAA,WAAA,cAAA,oBAAA,8BAAA,aAAA,YAAA,eAAA,gBAAA,+BAAA,8BAAA,wBAAA,QAAA,iBAoBjD,MAAOoB,EAAkBC,GAAuBC,EAAQA,UAAC,IAClDC,EAAYC,GAAiBF,EAAQA,UAAC,GACvCG,EAAYvB,QAAAA,EAAQ,UACpBwB,EAAwBC,EAAAA,UAGvBC,EAAgBC,GAAqBP,EAAQA,SACnDlB,QAAAA,EAAkB,IAWnB0B,EAAAA,WAAU,WACT,MAAMC,EAAqC,GACjB,QAA1B/B,EAAAkB,aAAiB,EAAjBA,EAAmBc,eAAO,IAAAhC,GAAAA,EAAEiC,SAASC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Ae,UAAqB,IAAA5B,OAAA,EAAAA,EAAAwG,cACtCpD,EAAC0B,IAAA2B,UACA,CAAAxB,MAAO,CACNyB,UAAWtF,EACR,iBACA,gBAEJuF,QAAS7G,EACTmD,MACe,YAAdxB,EACG,GACc,UAAdA,EACA,GACA,GAEJ+B,OACe,YAAd/B,EACG,GACc,UAAdA,EACA,GACA,GAEJkD,MACC1D,EACG8C,SAAOa,QAAQP,SACfN,EAAAA,OAAOa,QAAQgC,aAGf,GAGRC,aAAcjG,SAAAA,IAGF,QAAbF,GACA0C,EAAAA,IAAC0D,EAAAA,QACA,CAAAf,YAAa9F,QAAAA,EAAe,iBAC5B8G,MAAOnF,EACPjB,aAAeqG,IACdrG,SAAAA,EAAeqG,EAAK,EAErBpB,aAAc1E,EAAkB2E,MAChCzE,iBAAkBA,EAClBK,UAAWA,EACXwF,eAAgB,CACfhE,cAAOiE,EAAAhG,EAAkB+B,qBAAS,OAClCU,OAAQ,WAET5C,sBAAuBA,eAM1B,EAILhB,EAASoH,YAAc"}
1
+ {"version":3,"file":"Dropdown.js","sources":["../../../../src/components/dropdown/Dropdown.tsx"],"sourcesContent":["import React, { Ref, useEffect, useRef, useState } from 'react';\nimport { COLORS } from '@src/constants/Theme';\nimport DownIcon from '../../assets/icons/chevronDown.svg';\nimport { Input } from '../input';\nimport { InputStyleContext } from '../input/context/InputStyleProvider';\nimport ChipInput from './ChipInput';\nimport { DropdownPopover } from './DropdownPopover';\nimport { getSelectedOptionsAsText } from './OpenedDropdown/utils/iterationOnOptions';\nimport {\n\tDropdownOption,\n\tGroupedOption,\n\tOpenDropdownProps,\n\tSingleOption,\n} from './type';\n\nexport type DropdownProps = OpenDropdownProps & {\n\tplaceHolder?: string;\n\tsize?: 'default' | 'small' | 'x-small';\n\tdisabled?: boolean;\n\tnoErrorHint?: boolean;\n\tbuttonWidth?: string;\n\tplaceHolderHeight?: string;\n\tshowPlaceholderWhenSelected?: boolean;\n\tinputStyle?: React.CSSProperties;\n\tinputType?: 'chip' | 'default';\n\tonDeleteChip?: (chip: SingleOption) => void;\n\ttruncatedText?: boolean;\n\t'data-test'?: string;\n\tshowLeadingIconInPlaceholder?: boolean;\n\tshowTrailingIconPlaceholder?: boolean;\n\tshowLabelsOnMoreHover?: boolean;\n\tbackgroundColor?: string;\n\tvalue?: string;\n\tshowSelected?: boolean;\n};\n\nfunction noop() {\n\t/** empty */\n}\n\nexport const Dropdown: React.FC<DropdownProps> = ({\n\tplaceHolder,\n\tsize,\n\tonSelect,\n\tdefaultOptions,\n\tdisabled,\n\tnoErrorHint,\n\tplaceHolderHeight,\n\tshowPlaceholderWhenSelected = false,\n\tinputStyle = {},\n\tinputType = 'default',\n\tonDeleteChip,\n\ttruncatedText,\n\tshowLeadingIconInPlaceholder = false,\n\tshowTrailingIconPlaceholder = false,\n\tshowLabelsOnMoreHover = false,\n\tvalue,\n\tshowSelected = false,\n\t...openDropdownProps\n}) => {\n\tconst [isDropdownOpened, setDropdownOpenFlag] = useState(false);\n\tconst [isHovering, setIsHovering] = useState(false);\n\tconst sizeToUse = size ?? 'default';\n\tconst dropdownVisibilityRef = useRef<{\n\t\topenDropdown: boolean;\n\t}>();\n\tconst [selectedOption, setSelectedOption] = useState<DropdownOption[]>(\n\t\tdefaultOptions ?? [],\n\t);\n\tfunction handleSelection(option: DropdownOption | DropdownOption[]) {\n\t\tif (Array.isArray(option)) {\n\t\t\tsetSelectedOption([...option]);\n\t\t} else {\n\t\t\tsetSelectedOption([...[option]]);\n\t\t}\n\t\tonSelect?.(option);\n\t}\n\n\tuseEffect(() => {\n\t\tconst flatSelectedOption: SingleOption[] = [];\n\t\topenDropdownProps?.options?.forEach((option) => {\n\t\t\tif ((option as GroupedOption).options) {\n\t\t\t\t(option as GroupedOption).options.forEach((op) => {\n\t\t\t\t\tif (op.selected) {\n\t\t\t\t\t\tflatSelectedOption.push({\n\t\t\t\t\t\t\t...op,\n\t\t\t\t\t\t\tlabel: op.label,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tif ((option as SingleOption).selected) {\n\t\t\t\t\tflatSelectedOption.push(option as SingleOption);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tsetSelectedOption([...flatSelectedOption]);\n\t}, [openDropdownProps.options]);\n\n\tuseEffect(() => {\n\t\tif (defaultOptions) {\n\t\t\tsetSelectedOption([...defaultOptions]);\n\t\t}\n\t}, [defaultOptions]);\n\n\tconst textVal = getSelectedOptionsAsText(selectedOption);\n\tconst displayText = showPlaceholderWhenSelected\n\t\t? placeHolder\n\t\t: textVal ?? placeHolder ?? 'Select an option';\n\n\tconst configuredMaxWidth = openDropdownProps.buttonWidth;\n\n\t// Shared width for the input wrapper and dropdown popover\n\tconst inputWidth = configuredMaxWidth ?? openDropdownProps.width ?? '100%';\n\n\t// Width passed to dropdown popover — matches input box width\n\tconst dropdownWidth = openDropdownProps.dropdownWidth ?? inputWidth;\n\n\treturn (\n\t\t<>\n\t\t\t<InputStyleContext.Provider\n\t\t\t\tvalue={{\n\t\t\t\t\tInputWrapper: {\n\t\t\t\t\t\theight: placeHolderHeight\n\t\t\t\t\t\t\t? placeHolderHeight\n\t\t\t\t\t\t\t: sizeToUse === 'x-small'\n\t\t\t\t\t\t\t? 24\n\t\t\t\t\t\t\t: sizeToUse === 'small'\n\t\t\t\t\t\t\t? 32\n\t\t\t\t\t\t\t: 48,\n\t\t\t\t\t\twidth: inputWidth,\n\t\t\t\t\t\t...(configuredMaxWidth ? { maxWidth: configuredMaxWidth } : {}),\n\t\t\t\t\t\tzIndex: 1,\n\t\t\t\t\t\tcursor: 'pointer',\n\t\t\t\t\t\tpadding: sizeToUse === 'x-small' ? '4px 8px' : '6px 8px',\n\t\t\t\t\t\tbackgroundColor:\n\t\t\t\t\t\t\tshowSelected && value !== undefined\n\t\t\t\t\t\t\t\t? COLORS.background.positive.light\n\t\t\t\t\t\t\t\t: isHovering\n\t\t\t\t\t\t\t\t? '#E0E0E0'\n\t\t\t\t\t\t\t\t: '#ffffff',\n\t\t\t\t\t\ttransition: 'background-color 0.3s ease',\n\t\t\t\t\t\t...inputStyle,\n\t\t\t\t\t},\n\t\t\t\t\tinput: {\n\t\t\t\t\t\tminHeight: '100%',\n\t\t\t\t\t\tmaxWidth: '100%',\n\t\t\t\t\t\tcolor:\n\t\t\t\t\t\t\tshowSelected && value !== undefined\n\t\t\t\t\t\t\t\t? COLORS.content.positive\n\t\t\t\t\t\t\t\t: 'inherit',\n\t\t\t\t\t},\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tonMouseEnter={() => setIsHovering(true)}\n\t\t\t\t\tonMouseLeave={() => setIsHovering(false)}\n\t\t\t\t\tstyle={\n\t\t\t\t\t\topenDropdownProps.width\n\t\t\t\t\t\t\t? { width: openDropdownProps.width }\n\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t\t<DropdownPopover\n\t\t\t\t\t\tdata-test={openDropdownProps['data-test']}\n\t\t\t\t\t\tref={\n\t\t\t\t\t\t\tdropdownVisibilityRef as Ref<{\n\t\t\t\t\t\t\t\topenDropdown: boolean;\n\t\t\t\t\t\t\t}>\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonSelect={handleSelection}\n\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\tonDropdownVisbilityChange={(isOpen) => setDropdownOpenFlag(isOpen)}\n\t\t\t\t\t\t{...openDropdownProps}\n\t\t\t\t\t\twidth={dropdownWidth}\n\t\t\t\t\t>\n\t\t\t\t\t\t{inputType == 'default' && (\n\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\tversion={openDropdownProps.version}\n\t\t\t\t\t\t\t\tnoErrorHint={noErrorHint}\n\t\t\t\t\t\t\t\tstate={disabled ? 'disabled' : 'none'}\n\t\t\t\t\t\t\t\tvalue={value === undefined ? displayText : value}\n\t\t\t\t\t\t\t\terrorMessage={openDropdownProps.error}\n\t\t\t\t\t\t\t\tvariant={sizeToUse}\n\t\t\t\t\t\t\t\tplaceholder={placeHolder ?? 'Select an option'}\n\t\t\t\t\t\t\t\tonChangeText={noop}\n\t\t\t\t\t\t\t\tleftIcon={\n\t\t\t\t\t\t\t\t\tshowLeadingIconInPlaceholder && selectedOption[0]?.leadingIcon\n\t\t\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\t\t\ticon: () => <>{selectedOption[0]?.leadingIcon}</>,\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\trightIcon={{\n\t\t\t\t\t\t\t\t\ticon: () => (\n\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\t\t\tdisplay: 'flex',\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\t\t{showTrailingIconPlaceholder &&\n\t\t\t\t\t\t\t\t\t\t\t\t(selectedOption[0] as SingleOption)?.trailingIcon}\n\t\t\t\t\t\t\t\t\t\t\t<DownIcon\n\t\t\t\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\t\t\t\ttransform: isDropdownOpened\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 'rotate(180deg)'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: 'rotate(0deg)',\n\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={noop}\n\t\t\t\t\t\t\t\t\t\t\t\twidth={\n\t\t\t\t\t\t\t\t\t\t\t\t\tsizeToUse === 'x-small'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 16\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: sizeToUse === 'small'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 20\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: 24\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\theight={\n\t\t\t\t\t\t\t\t\t\t\t\t\tsizeToUse === 'x-small'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 16\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: sizeToUse === 'small'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? 20\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: 24\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tcolor={\n\t\t\t\t\t\t\t\t\t\t\t\t\tshowSelected\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? COLORS.content.positive\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: COLORS.content.primary\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</div>\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\ttruncateText={truncatedText ?? true}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{inputType == 'chip' && (\n\t\t\t\t\t\t\t<ChipInput\n\t\t\t\t\t\t\t\tplaceholder={placeHolder ?? 'Select options'}\n\t\t\t\t\t\t\t\tchips={selectedOption as SingleOption[]}\n\t\t\t\t\t\t\t\tonDeleteChip={(chip) => {\n\t\t\t\t\t\t\t\t\tonDeleteChip?.(chip);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\terrorMessage={openDropdownProps.error}\n\t\t\t\t\t\t\t\tisDropdownOpened={isDropdownOpened}\n\t\t\t\t\t\t\t\tsizeToUse={sizeToUse}\n\t\t\t\t\t\t\t\tcontainerStyle={{\n\t\t\t\t\t\t\t\t\twidth: openDropdownProps.width ?? '100%',\n\t\t\t\t\t\t\t\t\tcursor: 'pointer',\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tshowLabelsOnMoreHover={showLabelsOnMoreHover}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</DropdownPopover>\n\t\t\t\t</div>\n\t\t\t</InputStyleContext.Provider>\n\t\t</>\n\t);\n};\n\nDropdown.displayName = 'Dropdown';\n"],"names":["noop","Dropdown","_a","placeHolder","size","onSelect","defaultOptions","disabled","noErrorHint","placeHolderHeight","showPlaceholderWhenSelected","inputStyle","inputType","onDeleteChip","truncatedText","showLeadingIconInPlaceholder","showTrailingIconPlaceholder","showLabelsOnMoreHover","value","showSelected","openDropdownProps","__rest","isDropdownOpened","setDropdownOpenFlag","useState","isHovering","setIsHovering","sizeToUse","dropdownVisibilityRef","useRef","selectedOption","setSelectedOption","useEffect","flatSelectedOption","options","forEach","option","op","selected","push","Object","assign","label","textVal","getSelectedOptionsAsText","displayText","_b","configuredMaxWidth","buttonWidth","inputWidth","_c","width","dropdownWidth","_d","_jsx","InputStyleContext","Provider","InputWrapper","height","maxWidth","zIndex","cursor","padding","backgroundColor","undefined","COLORS","background","positive","light","transition","input","minHeight","color","content","children","jsx","onMouseEnter","onMouseLeave","style","_jsxs","jsxs","DropdownPopover","ref","Array","isArray","onDropdownVisbilityChange","isOpen","Input","version","state","errorMessage","error","variant","placeholder","onChangeText","leftIcon","_e","leadingIcon","icon","_Fragment","rightIcon","display","trailingIcon","DownIcon","transform","onClick","primary","truncateText","ChipInput","chips","chip","containerStyle","_f","displayName"],"mappings":"0cAoCA,SAASA,IACR,CAGYC,MAAAA,EAAqCC,mBAAAC,YACjDA,EAAWC,KACXA,EAAIC,SACJA,EAAQC,eACRA,EAAcC,SACdA,EAAQC,YACRA,EAAWC,kBACXA,EAAiBC,4BACjBA,GAA8B,EAAKC,WACnCA,EAAa,CAAE,EAAAC,UACfA,EAAY,UAASC,aACrBA,EAAYC,cACZA,EAAaC,6BACbA,GAA+B,EAAKC,4BACpCA,GAA8B,EA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ACChF,IAAmD,QAAnBiF,EAAAlE,EAAe,UAAI,IAAAkE,OAAA,EAAAA,EAAAC,aAChD,CACAC,KAAMA,KAAK,IAAAhG,EAAC,OAAAoD,EAAAA,IAAG6C,EAAAA,SAAA,CAAAzB,SAAiB,QAAjBxE,EAAA4B,EAAe,UAAE,IAAA5B,OAAA,EAAAA,EAAE+F,aAAe,QAEjDjC,EAEJoC,UAAW,CACVF,KAAMA,WAAM,OACXnB,OACC,MAAAvC,OAAAC,OAAA,CAAAqC,MAAO,CACNuB,QAAS,SACT,CAAA3B,SAAA,CAEA1D,IACqC,QAArCd,EAAC4B,EAAe,UAAqB,IAAA5B,OAAA,EAAAA,EAAAoG,cACtChD,EAACqB,IAAA4B,UACA,CAAAzB,MAAO,CACN0B,UAAWlF,EACR,iBACA,gBAEJmF,QAASzG,EACTmD,MACe,YAAdxB,EACG,GACc,UAAdA,EACA,GACA,GAEJ+B,OACe,YAAd/B,EACG,GACc,UAAdA,EACA,GACA,GAEJ6C,MACCrD,EACG8C,SAAOQ,QAAQN,SACfF,EAAAA,OAAOQ,QAAQiC,aAGf,GAGRC,aAAc7F,SAAAA,IAGF,QAAbF,GACA0C,EAAAA,IAACsD,EAAAA,QACA,CAAAf,YAAa1F,QAAAA,EAAe,iBAC5B0G,MAAO/E,EACPjB,aAAeiG,IACdjG,SAAAA,EAAeiG,EAAK,EAErBpB,aAActE,EAAkBuE,MAChCrE,iBAAkBA,EAClBK,UAAWA,EACXoF,eAAgB,CACf5D,cAAO6D,EAAA5F,EAAkB+B,qBAAS,OAClCU,OAAQ,WAET5C,sBAAuBA,eAM1B,EAILhB,EAASgH,YAAc"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),o=require("react/jsx-runtime"),t=require("react"),r=require("react-popper"),n=require("../../dropShadow/DropShadow.js"),s=require("../../tooltips/Tooltip.js"),i=require("../../../constants/Theme.js"),l=require("../Common.styled.js"),a=require("../OpenedDropdown/components/OpennedDropdown.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const p=d(t).default.forwardRef(((d,p)=>{var{children:c,onDropdownVisbilityChange:u,version:v="1.0",tooltipContent:b,tooltipDirection:j,showTooltipArrow:w,isChildLoading:g,forceOpen:h}=d,O=e.__rest(d,["children","onDropdownVisbilityChange","version","tooltipContent","tooltipDirection","showTooltipArrow","isChildLoading","forceOpen"]);const f=p,[D,x]=t.useState(!1),[S,C]=t.useState(!1),[y,m]=t.useState(null),[q,R]=t.useState(null),E=t.useRef(null),{styles:L,attributes:_}=r.usePopper(y,q,{placement:O.placement,strategy:O.strategy}),M=e=>{var o,t;"2.0"===v&&O.isMultiSelect&&e&&(null===(o=O.onSelect)||void 0===o||o.call(O,[...e])),x(!1),null===(t=null==O?void 0:O.onClose)||void 0===t||t.call(O)};t.useImperativeHandle(f,(()=>({openDropdown:D})),[]),t.useEffect((()=>{(null==f?void 0:f.current)&&(f.current.openDropdown=D)}),[D]),t.useEffect((()=>{null==u||u(D)}),[D]);const T=()=>{var e;return o.jsxs(o.Fragment,{children:[o.jsxs("div",Object.assign({style:Object.assign({position:"relative"},"3.0"===v&&{backgroundColor:D||S?i.COLORS.surface.hovered:i.COLORS.surface.standard,transition:"background-color 0.3s ease",borderRadius:4}),ref:m,onMouseEnter:"3.0"===v?()=>C(!0):void 0,onMouseLeave:"3.0"===v?()=>C(!1):void 0},{children:[o.jsx(l.OverLapAbs,Object.assign({ref:E,allowEvents:O.allowEvents,disabled:O.disabled,onClick:e=>{var o;null===(o=O.onDropdownOpen)||void 0===o||o.call(O),D?(x(!1),e.preventDefault()):O.disabled||x(!0)},isChildLoading:g},{children:O.allowEvents?c:null})),O.allowEvents?null:c]})),(D||h)&&o.jsx(l.OpenDropdownContainer,Object.assign({ref:R,style:Object.assign(Object.assign({},L.popper),{zIndex:null!==(e=O.dropdownZIndex)&&void 0!==e?e:3})},_.popper,{"data-test":O["data-test"]},{children:o.jsx(n.DropShadow,Object.assign({level:"z2",position:"down",style:{borderRadius:"3.0"===v?4:8,boxShadow:"0 2px 8px 0 rgba(0, 0, 0, 0.12)"}},{children:o.jsx(a.OpenedDropdown,Object.assign({},O,{onSelect:e=>{var o;"2.0"===v&&O.isMultiSelect||(null===(o=O.onSelect)||void 0===o||o.call(O,e),x(!1))},onClose:M,version:v,headerRef:E,zeroState:null==O?void 0:O.zeroState,isDraggable:O.isDraggable,onOptionsReorder:O.onOptionsReorder}))}))}))]})};return o.jsx(o.Fragment,{children:D||h||void 0===b?T():o.jsx(s.Tooltip,Object.assign({body:b,placement:j,hideArrow:!w},{children:o.jsx("div",Object.assign({"data-test":O["data-test"]},{children:T()}))}))})}));p.displayName="DropdownPopover",exports.DropdownPopover=p;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),o=require("react/jsx-runtime"),t=require("react"),n=require("react-popper"),r=require("../../dropShadow/DropShadow.js"),l=require("../../tooltips/Tooltip.js"),i=require("../Common.styled.js"),s=require("../OpenedDropdown/components/OpennedDropdown.js");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const d=a(t).default.forwardRef(((a,d)=>{var{children:p,onDropdownVisbilityChange:c,version:u="1.0",tooltipContent:v,tooltipDirection:j,showTooltipArrow:w,isChildLoading:b,forceOpen:g}=a,h=e.__rest(a,["children","onDropdownVisbilityChange","version","tooltipContent","tooltipDirection","showTooltipArrow","isChildLoading","forceOpen"]);const f=d,[O,D]=t.useState(!1),[x,y]=t.useState(null),[S,C]=t.useState(null),m=t.useRef(null),{styles:q,attributes:E}=n.usePopper(x,S,{placement:h.placement,strategy:h.strategy}),R=e=>{var o,t;"2.0"===u&&h.isMultiSelect&&e&&(null===(o=h.onSelect)||void 0===o||o.call(h,[...e])),D(!1),null===(t=null==h?void 0:h.onClose)||void 0===t||t.call(h)};t.useImperativeHandle(f,(()=>({openDropdown:O})),[]),t.useEffect((()=>{(null==f?void 0:f.current)&&(f.current.openDropdown=O)}),[O]),t.useEffect((()=>{null==c||c(O)}),[O]);const _=()=>{var e;return o.jsxs(o.Fragment,{children:[o.jsxs("div",Object.assign({style:{position:"relative"},ref:y},{children:[o.jsx(i.OverLapAbs,Object.assign({ref:m,allowEvents:h.allowEvents,disabled:h.disabled,onClick:e=>{var o;null===(o=h.onDropdownOpen)||void 0===o||o.call(h),O?(D(!1),e.preventDefault()):h.disabled||D(!0)},isChildLoading:b},{children:h.allowEvents?p:null})),h.allowEvents?null:p]})),(O||g)&&o.jsx(i.OpenDropdownContainer,Object.assign({ref:C,style:Object.assign(Object.assign({},q.popper),{zIndex:null!==(e=h.dropdownZIndex)&&void 0!==e?e:3})},E.popper,{"data-test":h["data-test"]},{children:o.jsx(r.DropShadow,Object.assign({level:"z2",position:"down",style:{borderRadius:8}},{children:o.jsx(s.OpenedDropdown,Object.assign({},h,{onSelect:e=>{var o;"2.0"===u&&h.isMultiSelect||(null===(o=h.onSelect)||void 0===o||o.call(h,e),D(!1))},onClose:R,version:u,headerRef:m,zeroState:null==h?void 0:h.zeroState,isDraggable:h.isDraggable,onOptionsReorder:h.onOptionsReorder}))}))}))]})};return o.jsx(o.Fragment,{children:O||g||void 0===v?_():o.jsx(l.Tooltip,Object.assign({body:v,placement:j,hideArrow:!w},{children:o.jsx("div",Object.assign({"data-test":h["data-test"]},{children:_()}))}))})}));d.displayName="DropdownPopover",exports.DropdownPopover=d;
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/components/dropdown/DropdownPopover/index.tsx"],"sourcesContent":["import React, {\n\tLegacyRef,\n\tRef,\n\tuseEffect,\n\tuseImperativeHandle,\n\tuseRef,\n\tuseState,\n} from 'react';\nimport { usePopper } from 'react-popper';\nimport { DropShadow } from '@src/components/dropShadow';\nimport { Placement, Tooltip } from '@src/components/tooltips';\nimport { COLORS } from '@src/constants/Theme';\nimport { OpenDropdownContainer, OverLapAbs } from '../Common.styled';\nimport { OpenedDropdown } from '../OpenedDropdown';\nimport { OpenDropdownProps } from '../type';\n\ntype DropdownProps = OpenDropdownProps & {\n\tisLoading?: boolean;\n\tchildren?: React.ReactNode;\n\tdisabled?: boolean;\n\tonDropdownOpen?: () => void;\n\tonDropdownVisbilityChange?: (isOpen: boolean) => void;\n\ttooltipContent?: string;\n\ttooltipDirection?: Placement;\n\tshowTooltipArrow?: boolean;\n\tallowEvents?: boolean;\n\t'data-test'?: string;\n\tisChildLoading?: boolean;\n\t/**\n\t * If true, forces the dropdown to remain open regardless of user interaction or internal state.\n\t * This prop overrides the internal openDropdown state, ensuring the dropdown stays open.\n\t * Use this prop when you need to programmatically control the dropdown's visibility from a parent component.\n\t */\n\tforceOpen?: boolean;\n};\n\nexport const DropdownPopover = React.forwardRef<\n\t{\n\t\topenDropdown: boolean;\n\t},\n\tDropdownProps\n>(\n\t(\n\t\t{\n\t\t\tchildren,\n\t\t\tonDropdownVisbilityChange,\n\t\t\tversion = '1.0',\n\t\t\ttooltipContent,\n\t\t\ttooltipDirection,\n\t\t\tshowTooltipArrow,\n\t\t\tisChildLoading,\n\t\t\tforceOpen,\n\t\t\t...openDropdownProps\n\t\t},\n\t\tunTypedRef,\n\t) => {\n\t\tconst ref = unTypedRef as React.RefObject<{ openDropdown: boolean }>;\n\t\tconst [openDropdown, setDropdownVisibility] = useState(false);\n\t\tconst [isHovering, setIsHovering] = useState(false);\n\t\tconst [referenceElement, setReferenceElement] = useState(null);\n\t\tconst [popperElement, setPopperElement] = useState(null);\n\t\tconst headerRef = useRef(null);\n\n\t\tconst { styles, attributes } = usePopper(referenceElement, popperElement, {\n\t\t\tplacement: openDropdownProps.placement,\n\t\t\tstrategy: openDropdownProps.strategy,\n\t\t});\n\n\t\tconst onCloseHandle = (data) => {\n\t\t\tif (version === '2.0' && openDropdownProps.isMultiSelect && data) {\n\t\t\t\topenDropdownProps.onSelect?.([...data]);\n\t\t\t}\n\t\t\tsetDropdownVisibility(false);\n\t\t\topenDropdownProps?.onClose?.();\n\t\t};\n\n\t\tuseImperativeHandle(\n\t\t\tref,\n\t\t\t() => {\n\t\t\t\treturn {\n\t\t\t\t\topenDropdown: openDropdown,\n\t\t\t\t};\n\t\t\t},\n\t\t\t[],\n\t\t);\n\n\t\tuseEffect(() => {\n\t\t\tif (ref?.current) ref.current.openDropdown = openDropdown;\n\t\t}, [openDropdown]);\n\n\t\tuseEffect(() => {\n\t\t\tonDropdownVisbilityChange?.(openDropdown);\n\t\t}, [openDropdown]);\n\n\t\tconst dropDownComponent = () => {\n\t\t\treturn (\n\t\t\t\t<>\n\t\t\t\t\t<div\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\tposition: 'relative',\n\t\t\t\t\t\t\t...(version === '3.0' && {\n\t\t\t\t\t\t\t\tbackgroundColor:\n\t\t\t\t\t\t\t\t\topenDropdown || isHovering\n\t\t\t\t\t\t\t\t\t\t? COLORS.surface.hovered\n\t\t\t\t\t\t\t\t\t\t: COLORS.surface.standard,\n\t\t\t\t\t\t\t\ttransition: 'background-color 0.3s ease',\n\t\t\t\t\t\t\t\tborderRadius: 4,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t}}\n\t\t\t\t\t\t/** This assigment is mentioned as per react-popper's docs, so typecasting */\n\t\t\t\t\t\tref={setReferenceElement as LegacyRef<HTMLDivElement>}\n\t\t\t\t\t\tonMouseEnter={\n\t\t\t\t\t\t\tversion === '3.0' ? () => setIsHovering(true) : undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonMouseLeave={\n\t\t\t\t\t\t\tversion === '3.0' ? () => setIsHovering(false) : undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t<OverLapAbs\n\t\t\t\t\t\t\tref={headerRef}\n\t\t\t\t\t\t\tallowEvents={openDropdownProps.allowEvents}\n\t\t\t\t\t\t\tdisabled={openDropdownProps.disabled}\n\t\t\t\t\t\t\tonClick={(e) => {\n\t\t\t\t\t\t\t\topenDropdownProps.onDropdownOpen?.();\n\t\t\t\t\t\t\t\tif (!openDropdown) {\n\t\t\t\t\t\t\t\t\tif (!openDropdownProps.disabled) setDropdownVisibility(true);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tsetDropdownVisibility(false);\n\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tisChildLoading={isChildLoading}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{openDropdownProps.allowEvents ? children : null}\n\t\t\t\t\t\t</OverLapAbs>\n\t\t\t\t\t\t{openDropdownProps.allowEvents ? null : children}\n\t\t\t\t\t</div>\n\t\t\t\t\t{(openDropdown || forceOpen) && (\n\t\t\t\t\t\t<OpenDropdownContainer\n\t\t\t\t\t\t\t/** This assigment is mentioned as per react-popper's docs, so typecasting */\n\t\t\t\t\t\t\tref={setPopperElement as Ref<HTMLDivElement>}\n\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t...styles['popper'],\n\t\t\t\t\t\t\t\tzIndex: openDropdownProps.dropdownZIndex ?? 3,\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t{...attributes['popper']}\n\t\t\t\t\t\t\tdata-test={openDropdownProps['data-test']}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<DropShadow\n\t\t\t\t\t\t\t\tlevel={'z2'}\n\t\t\t\t\t\t\t\tposition={'down'}\n\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\tborderRadius: version === '3.0' ? 4 : 8,\n\t\t\t\t\t\t\t\t\tboxShadow: '0 2px 8px 0 rgba(0, 0, 0, 0.12)',\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<OpenedDropdown\n\t\t\t\t\t\t\t\t\t{...openDropdownProps}\n\t\t\t\t\t\t\t\t\tonSelect={(options) => {\n\t\t\t\t\t\t\t\t\t\tif (version === '2.0' && openDropdownProps.isMultiSelect) {\n\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\topenDropdownProps.onSelect?.(options);\n\t\t\t\t\t\t\t\t\t\t\tsetDropdownVisibility(false);\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\tonClose={onCloseHandle}\n\t\t\t\t\t\t\t\t\tversion={version}\n\t\t\t\t\t\t\t\t\theaderRef={headerRef}\n\t\t\t\t\t\t\t\t\tzeroState={openDropdownProps?.zeroState}\n\t\t\t\t\t\t\t\t\tisDraggable={openDropdownProps.isDraggable}\n\t\t\t\t\t\t\t\t\tonOptionsReorder={openDropdownProps.onOptionsReorder}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</DropShadow>\n\t\t\t\t\t\t</OpenDropdownContainer>\n\t\t\t\t\t)}\n\t\t\t\t</>\n\t\t\t);\n\t\t};\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{!openDropdown && !forceOpen && tooltipContent !== undefined ? (\n\t\t\t\t\t<Tooltip\n\t\t\t\t\t\tbody={tooltipContent}\n\t\t\t\t\t\tplacement={tooltipDirection}\n\t\t\t\t\t\thideArrow={!showTooltipArrow}\n\t\t\t\t\t>\n\t\t\t\t\t\t<div data-test={openDropdownProps['data-test']}>\n\t\t\t\t\t\t\t{dropDownComponent()}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</Tooltip>\n\t\t\t\t) : (\n\t\t\t\t\tdropDownComponent()\n\t\t\t\t)}\n\t\t\t</>\n\t\t);\n\t},\n);\n\nDropdownPopover.displayName = 'DropdownPopover';\n"],"names":["DropdownPopover","React","forwardRef","_a","unTypedRef","children","onDropdownVisbilityChange","version","tooltipContent","tooltipDirection","showTooltipArrow","isChildLoading","forceOpen","openDropdownProps","__rest","ref","openDropdown","setDropdownVisibility","useState","isHovering","setIsHovering","referenceElement","setReferenceElement","popperElement","setPopperElement","headerRef","useRef","styles","attributes","usePopper","placement","strategy","onCloseHandle","data","isMultiSelect","onSelect","call","_b","onClose","useImperativeHandle","useEffect","current","dropDownComponent","_jsxs","_Fragment","jsxs","Object","assign","style","position","backgroundColor","COLORS","surface","hovered","standard","transition","borderRadius","onMouseEnter","undefined","onMouseLeave","_jsx","jsx","OverLapAbs","allowEvents","disabled","onClick","e","onDropdownOpen","preventDefault","OpenDropdownContainer","zIndex","dropdownZIndex","DropShadow","level","boxShadow","OpenedDropdown","options","zeroState","isDraggable","onOptionsReorder","Tooltip","body","hideArrow","displayName"],"mappings":"+dAoCO,MAAMA,OAAkBC,QAAMC,YAMpC,CACCC,EAWAC,SAXAC,SACCA,EAAQC,0BACRA,EAAyBC,QACzBA,EAAU,MAAKC,eACfA,EAAcC,iBACdA,EAAgBC,iBAChBA,EAAgBC,eAChBA,EAAcC,UACdA,KACGC,EATJC,EAAAA,OAAAX,EAAA,CAAA,WAAA,4BAAA,UAAA,iBAAA,mBAAA,mBAAA,iBAAA,cAaA,MAAMY,EAAMX,GACLY,EAAcC,GAAyBC,EAAQA,UAAC,IAChDC,EAAYC,GAAiBF,EAAQA,UAAC,IACtCG,EAAkBC,GAAuBJ,EAAQA,SAAC,OAClDK,EAAeC,GAAoBN,EAAQA,SAAC,MAC7CO,EAAYC,SAAO,OAEnBC,OAAEA,EAAMC,WAAEA,GAAeC,EAASA,UAACR,EAAkBE,EAAe,CACzEO,UAAWjB,EAAkBiB,UAC7BC,SAAUlB,EAAkBkB,WAGvBC,EAAiBC,YACN,QAAZ1B,GAAqBM,EAAkBqB,eAAiBD,IACjC,QAA1B9B,EAAAU,EAAkBsB,gBAAQ,IAAAhC,GAAAA,EAAAiC,KAAAvB,EAAG,IAAIoB,KAElChB,GAAsB,WACtBoB,EAAAxB,aAAiB,EAAjBA,EAAmByB,+BAAW,EAG/BC,EAAmBA,oBAClBxB,GACA,KACQ,CACNC,aAAcA,KAGhB,IAGDwB,EAAAA,WAAU,M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,aAA0B,QAAZjD,EAAoB,EAAI,EACtCmE,UAAW,oCAGZ,CAAArE,SAAAuD,EAAAC,IAACc,EAAcA,eAAA7B,OAAAC,OAAA,CAAA,EACVlC,EAAiB,CACrBsB,SAAWyC,UACM,QAAZrE,GAAqBM,EAAkBqB,gBAGb,QAA7B/B,EAAAU,EAAkBsB,gBAAW,IAAAhC,GAAAA,EAAAiC,KAAAvB,EAAA+D,GAC7B3D,GAAsB,GACtB,EAEFqB,QAASN,EACTzB,QAASA,EACTkB,UAAWA,EACXoD,UAAWhE,aAAA,EAAAA,EAAmBgE,UAC9BC,YAAajE,EAAkBiE,YAC/BC,iBAAkBlE,EAAkBkE,4BAKtC,EAIL,OACCnB,EAAAA,yBACG5C,GAAiBJ,QAAgC8C,IAAnBlD,EAW/BkC,IAVAkB,MAACoB,EAAAA,QAAOlC,OAAAC,OAAA,CACPkC,KAAMzE,EACNsB,UAAWrB,EACXyE,WAAYxE,GAEZ,CAAAL,SAAAuD,EAAAC,IAAA,MAAAf,OAAAC,OAAA,CAAA,YAAgBlC,EAAkB,cAAY,CAAAR,SAC5CqC,WAMF,IAKN1C,EAAgBmF,YAAc"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/components/dropdown/DropdownPopover/index.tsx"],"sourcesContent":["import React, {\n\tLegacyRef,\n\tRef,\n\tuseEffect,\n\tuseImperativeHandle,\n\tuseRef,\n\tuseState,\n} from 'react';\nimport { usePopper } from 'react-popper';\nimport { DropShadow } from '@src/components/dropShadow';\nimport { Placement, Tooltip } from '@src/components/tooltips';\nimport { OpenDropdownContainer, OverLapAbs } from '../Common.styled';\nimport { OpenedDropdown } from '../OpenedDropdown';\nimport { OpenDropdownProps } from '../type';\n\ntype DropdownProps = OpenDropdownProps & {\n\tisLoading?: boolean;\n\tchildren?: React.ReactNode;\n\tdisabled?: boolean;\n\tonDropdownOpen?: () => void;\n\tonDropdownVisbilityChange?: (isOpen: boolean) => void;\n\ttooltipContent?: string;\n\ttooltipDirection?: Placement;\n\tshowTooltipArrow?: boolean;\n\tallowEvents?: boolean;\n\t'data-test'?: string;\n\tisChildLoading?: boolean;\n\t/**\n\t * If true, forces the dropdown to remain open regardless of user interaction or internal state.\n\t * This prop overrides the internal openDropdown state, ensuring the dropdown stays open.\n\t * Use this prop when you need to programmatically control the dropdown's visibility from a parent component.\n\t */\n\tforceOpen?: boolean;\n};\n\nexport const DropdownPopover = React.forwardRef<\n\t{\n\t\topenDropdown: boolean;\n\t},\n\tDropdownProps\n>(\n\t(\n\t\t{\n\t\t\tchildren,\n\t\t\tonDropdownVisbilityChange,\n\t\t\tversion = '1.0',\n\t\t\ttooltipContent,\n\t\t\ttooltipDirection,\n\t\t\tshowTooltipArrow,\n\t\t\tisChildLoading,\n\t\t\tforceOpen,\n\t\t\t...openDropdownProps\n\t\t},\n\t\tunTypedRef,\n\t) => {\n\t\tconst ref = unTypedRef as React.RefObject<{ openDropdown: boolean }>;\n\t\tconst [openDropdown, setDropdownVisibility] = useState(false);\n\t\tconst [referenceElement, setReferenceElement] = useState(null);\n\t\tconst [popperElement, setPopperElement] = useState(null);\n\t\tconst headerRef = useRef(null);\n\n\t\tconst { styles, attributes } = usePopper(referenceElement, popperElement, {\n\t\t\tplacement: openDropdownProps.placement,\n\t\t\tstrategy: openDropdownProps.strategy,\n\t\t});\n\n\t\tconst onCloseHandle = (data) => {\n\t\t\tif (version === '2.0' && openDropdownProps.isMultiSelect && data) {\n\t\t\t\topenDropdownProps.onSelect?.([...data]);\n\t\t\t}\n\t\t\tsetDropdownVisibility(false);\n\t\t\topenDropdownProps?.onClose?.();\n\t\t};\n\n\t\tuseImperativeHandle(\n\t\t\tref,\n\t\t\t() => {\n\t\t\t\treturn {\n\t\t\t\t\topenDropdown: openDropdown,\n\t\t\t\t};\n\t\t\t},\n\t\t\t[],\n\t\t);\n\n\t\tuseEffect(() => {\n\t\t\tif (ref?.current) ref.current.openDropdown = openDropdown;\n\t\t}, [openDropdown]);\n\n\t\tuseEffect(() => {\n\t\t\tonDropdownVisbilityChange?.(openDropdown);\n\t\t}, [openDropdown]);\n\n\t\tconst dropDownComponent = () => {\n\t\t\treturn (\n\t\t\t\t<>\n\t\t\t\t\t<div\n\t\t\t\t\t\tstyle={{ position: 'relative' }}\n\t\t\t\t\t\t/** This assigment is mentioned as per react-popper's docs, so typecasting */\n\t\t\t\t\t\tref={setReferenceElement as LegacyRef<HTMLDivElement>}\n\t\t\t\t\t>\n\t\t\t\t\t\t<OverLapAbs\n\t\t\t\t\t\t\tref={headerRef}\n\t\t\t\t\t\t\tallowEvents={openDropdownProps.allowEvents}\n\t\t\t\t\t\t\tdisabled={openDropdownProps.disabled}\n\t\t\t\t\t\t\tonClick={(e) => {\n\t\t\t\t\t\t\t\topenDropdownProps.onDropdownOpen?.();\n\t\t\t\t\t\t\t\tif (!openDropdown) {\n\t\t\t\t\t\t\t\t\tif (!openDropdownProps.disabled) setDropdownVisibility(true);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tsetDropdownVisibility(false);\n\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tisChildLoading={isChildLoading}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{openDropdownProps.allowEvents ? children : null}\n\t\t\t\t\t\t</OverLapAbs>\n\t\t\t\t\t\t{openDropdownProps.allowEvents ? null : children}\n\t\t\t\t\t</div>\n\t\t\t\t\t{(openDropdown || forceOpen) && (\n\t\t\t\t\t\t<OpenDropdownContainer\n\t\t\t\t\t\t\t/** This assigment is mentioned as per react-popper's docs, so typecasting */\n\t\t\t\t\t\t\tref={setPopperElement as Ref<HTMLDivElement>}\n\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t...styles['popper'],\n\t\t\t\t\t\t\t\tzIndex: openDropdownProps.dropdownZIndex ?? 3,\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t{...attributes['popper']}\n\t\t\t\t\t\t\tdata-test={openDropdownProps['data-test']}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<DropShadow\n\t\t\t\t\t\t\t\tlevel={'z2'}\n\t\t\t\t\t\t\t\tposition={'down'}\n\t\t\t\t\t\t\t\tstyle={{ borderRadius: 8 }}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<OpenedDropdown\n\t\t\t\t\t\t\t\t\t{...openDropdownProps}\n\t\t\t\t\t\t\t\t\tonSelect={(options) => {\n\t\t\t\t\t\t\t\t\t\tif (version === '2.0' && openDropdownProps.isMultiSelect) {\n\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\topenDropdownProps.onSelect?.(options);\n\t\t\t\t\t\t\t\t\t\t\tsetDropdownVisibility(false);\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\tonClose={onCloseHandle}\n\t\t\t\t\t\t\t\t\tversion={version}\n\t\t\t\t\t\t\t\t\theaderRef={headerRef}\n\t\t\t\t\t\t\t\t\tzeroState={openDropdownProps?.zeroState}\n\t\t\t\t\t\t\t\t\tisDraggable={openDropdownProps.isDraggable}\n\t\t\t\t\t\t\t\t\tonOptionsReorder={openDropdownProps.onOptionsReorder}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</DropShadow>\n\t\t\t\t\t\t</OpenDropdownContainer>\n\t\t\t\t\t)}\n\t\t\t\t</>\n\t\t\t);\n\t\t};\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{!openDropdown && !forceOpen && tooltipContent !== undefined ? (\n\t\t\t\t\t<Tooltip\n\t\t\t\t\t\tbody={tooltipContent}\n\t\t\t\t\t\tplacement={tooltipDirection}\n\t\t\t\t\t\thideArrow={!showTooltipArrow}\n\t\t\t\t\t>\n\t\t\t\t\t\t<div data-test={openDropdownProps['data-test']}>\n\t\t\t\t\t\t\t{dropDownComponent()}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</Tooltip>\n\t\t\t\t) : (\n\t\t\t\t\tdropDownComponent()\n\t\t\t\t)}\n\t\t\t</>\n\t\t);\n\t},\n);\n\nDropdownPopover.displayName = 'DropdownPopover';\n"],"names":["DropdownPopover","React","forwardRef","_a","unTypedRef","children","onDropdownVisbilityChange","version","tooltipContent","tooltipDirection","showTooltipArrow","isChildLoading","forceOpen","openDropdownProps","__rest","ref","openDropdown","setDropdownVisibility","useState","referenceElement","setReferenceElement","popperElement","setPopperElement","headerRef","useRef","styles","attributes","usePopper","placement","strategy","onCloseHandle","data","isMultiSelect","onSelect","call","_b","onClose","useImperativeHandle","useEffect","current","dropDownComponent","_jsxs","jsxs","Object","assign","style","position","_jsx","jsx","OverLapAbs","allowEvents","disabled","onClick","e","onDropdownOpen","preventDefault","OpenDropdownContainer","zIndex","dropdownZIndex","DropShadow","level","borderRadius","OpenedDropdown","options","zeroState","isDraggable","onOptionsReorder","undefined","Tooltip","body","hideArrow","displayName"],"mappings":"sbAmCO,MAAMA,OAAkBC,QAAMC,YAMpC,CACCC,EAWAC,SAXAC,SACCA,EAAQC,0BACRA,EAAyBC,QACzBA,EAAU,MAAKC,eACfA,EAAcC,iBACdA,EAAgBC,iBAChBA,EAAgBC,eAChBA,EAAcC,UACdA,KACGC,EATJC,EAAAA,OAAAX,EAAA,CAAA,WAAA,4BAAA,UAAA,iBAAA,mBAAA,mBAAA,iBAAA,cAaA,MAAMY,EAAMX,GACLY,EAAcC,GAAyBC,EAAQA,UAAC,IAChDC,EAAkBC,GAAuBF,EAAQA,SAAC,OAClDG,EAAeC,GAAoBJ,EAAQA,SAAC,MAC7CK,EAAYC,SAAO,OAEnBC,OAAEA,EAAMC,WAAEA,GAAeC,EAASA,UAACR,EAAkBE,EAAe,CACzEO,UAAWf,EAAkBe,UAC7BC,SAAUhB,EAAkBgB,WAGvBC,EAAiBC,YACN,QAAZxB,GAAqBM,EAAkBmB,eAAiBD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xD,SAE1B0C,EAACC,IAAAc,EAAcA,eACVnB,OAAAC,OAAA,CAAA,EAAA/B,EACJ,CAAAoB,SAAW8B,UACM,QAAZxD,GAAqBM,EAAkBmB,gBAGb,QAA7B7B,EAAAU,EAAkBoB,gBAAW,IAAA9B,GAAAA,EAAA+B,KAAArB,EAAAkD,GAC7B9C,GAAsB,GACtB,EAEFmB,QAASN,EACTvB,QAASA,EACTgB,UAAWA,EACXyC,UAAWnD,aAAA,EAAAA,EAAmBmD,UAC9BC,YAAapD,EAAkBoD,YAC/BC,iBAAkBrD,EAAkBqD,4BAKtC,EAIL,OACCnB,EAAAA,yBACG/B,GAAiBJ,QAAgCuD,IAAnB3D,EAW/BgC,IAVAO,MAACqB,EAAAA,QAAOzB,OAAAC,OAAA,CACPyB,KAAM7D,EACNoB,UAAWnB,EACX6D,WAAY5D,GAEZ,CAAAL,SAAA0C,EAAAC,IAAA,MAAAL,OAAAC,OAAA,CAAA,YAAgB/B,EAAkB,cAAY,CAAAR,SAC5CmC,WAMF,IAKNxC,EAAgBuE,YAAc"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../../../assets/icons/errorInfo.svg.js"),n=require("../../../../assets/icons/refresh-purple.svg.js"),o=require("react"),s=require("../../../zeroState/ZeroState.js"),r=require("../../../../hooks/useOutside.js"),i=require("../../../../constants/Theme.js"),l=require("../../hooks/useDropdown.js"),u=require("./description/Description.js"),c=require("./menu/FreeFormMenu.js"),a=require("./menu/MenuList.js"),d=require("./menu/SelectAllMenu.js"),p=require("./multiSelect/MultiSelectDropdownBottomBar.js"),h=require("./OpennedDropdown.styled.js"),f=require("./searchbox/SearchBox.js"),g=require("./searchbox/SearchZeroState.js");const b=304,S=290;exports.OpenedDropdown=v=>{let{options:j,isSearchable:O,isMultiSelect:x,maxSelections:m,width:w,allowFreeForm:C,height:y,onClose:k,onSelect:L,onSearch:D,version:q,skipSorting:E,headerRef:M,hideSelectAll:R,primaryButtonText:I,onInfiniteScroll:T,onMultiSelectClear:F,onDropdownItemClick:A,buttonOptions:B,isSearchLoading:H,isOptionsLoading:Z,optionsErrorState:z,disableSearchOptions:P,disableSearchedOptionExcept:V,useDefaultCursor:W,containerStyle:$={},zeroState:_,isDraggable:K=!1,onOptionsReorder:N,hideClearButton:U=!1,showCheckboxForCustomElement:G=!1}=v;var J;const Q=o.useCallback((e=>{if(!K||!x)return e;const t=[],n=[];return e.forEach((e=>{if(e.options)n.push(e);else{e.selected?t.push(e):n.push(e)}})),[...t,...n]}),[K,x]),[X,Y]=o.useState((()=>Q(j))),ee=o.useRef(X),te=o.useRef(!1),ne=o.useRef(N);o.useEffect((()=>{Y(Q(j))}),[j,Q]),o.useEffect((()=>{ee.current=X}),[X]),o.useEffect((()=>{ne.current=N}),[N]),o.useEffect((()=>()=>{te.current&&ne.current&&ne.current(ee.current)}),[]);const oe=o.useCallback((e=>{Y(e),"2.0"===q?null==N||N(e):te.current=!0}),[N,q]),se=K?X:j,{dropdownOptions:re,search:ie,searchedString:le,searchedOptions:ue,searchError:ce,retrySearch:ae,onApplyHandler:de,selectAllHandler:pe,onMultiSelectClear:he,onFreeFormSelect:fe,onMultiSelectApply:ge,latestDropdownOptionsRef:be,getSelectedOptions:Se,getCurrentSelectionCount:ve}=l.useDropdown(q,se,L,E||K,x,D,P,V,m),[je,Oe]=o.useState(null!=w?w:S),[xe,me]=o.useState(null),[we,Ce]=o.useState(-1),ye=o.useRef(null),ke=o.useRef([]),Le=o.useRef(null);r.useOutside(ye,(()=>{if(me(null),x&&"2.0"===q){const e=Se(be.current);null==k||k(e)}else null==k||k(re)}),[M,ke]),o.useEffect((()=>{const e=setTimeout((()=>{ye.current&&ye.current.focus({preventScroll:!0})}),0);return()=>clearTimeout(e)}),[]);o.useEffect((()=>{const e=e=>{const t=(e=>{const t=[];return e.forEach((e=>{if(e.options)e.options.forEach((e=>{e.disabled||t.push(e)}));else{const n=e;n.disabled||t.push(n)}})),t})(le&&D?ue:re);if(0!==t.length)if("ArrowDown"===e.key)e.preventDefault(),Ce((e=>{const n=e<t.length-1?e+1:0;return setTimeout((()=>{var e;const t=null===(e=Le.current)||void 0===e?void 0:e.querySelector(`[data-option-index="${n}"]`);t&&t.scrollIntoView({block:"nearest",behavior:"smooth"})}),0),n}));else if("ArrowUp"===e.key)e.preventDefault(),Ce((e=>{const n=e>0?e-1:t.length-1;return setTimeout((()=>{var e;const t=null===(e=Le.current)||void 0===e?void 0:e.querySelector(`[data-option-index="${n}"]`);t&&t.scrollIntoView({block:"nearest",behavior:"smooth"})}),0),n}));else if("Enter"===e.key&&we>=0){e.preventDefault();const n=t[we];n&&(de(Object.assign(Object.assign({},n),{selected:!n.selected})),A&&A(n))}},t=ye.current;if(t)return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}}),[we,le,ue,re,D,de,A]);const De=null!=y?y:b,qe="number"==typeof De?O&&x?De-96:O&&!x||!O&&x?De-48:De:De;o.useEffect((()=>{const e=null!=w?w:S;if(null===xe)Oe(e);else if("number"==typeof e)Oe(2*e);else if("string"==typeof e&&e.endsWith("px")){const t=2*parseInt(e.replace("px",""));Oe(t)}}),[xe]);const Ee=[],Me=(e=>{if(!x||!m&&0!==m)return e;const t=ve(re)>=m;return t?e.map((e=>{if(e.options)return Object.assign(Object.assign({},e),{options:e.options.map((e=>Object.assign(Object.assign({},e),{disabled:e.disabled||!e.selected&&t})))});{const n=e;return Object.assign(Object.assign({},n),{disabled:n.disabled||!n.selected&&t})}})):e})((le&&D?ue:re).map((e=>{var t,n;if(le&&!D){if(e.options){const t=Object.assign({},e);return t.options=t.options.filter((e=>{var t;return!!(null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(le.toLowerCase()))&&(Ee.push(!le||e.label===le),!0)})),t.options.length>0?t:null}return(null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(le.toLowerCase()))||(null===(n=e.searchKey)||void 0===n?void 0:n.toLowerCase().includes(le.toLowerCase()))?(Ee.push(!le||e.label===le),e):null}return e})).filter((e=>null!==e))),Re=!!O&&le&&0===Me.length,Ie=!le&&!!Z,Te=!le&&!!z&&!Ie,Fe=!(le||Me.length||Ie||Te),Ae=Ie||Te||Fe,Be=(null==_?void 0:_.title)||"No results found",He=(null==_?void 0:_.subTitle)||"Please try again later or contact us at support@bik.ai if you require further assistance.",Ze=(null==z?void 0:z.title)||"Failed to load options",ze=(null==z?void 0:z.subTitle)||"Something went wrong while fetching the list. Please try again",Pe={buttonText:"Try again",buttonType:"text",size:"small",buttonTextColor:i.COLORS.background.inverseLight,customIconColor:i.COLORS.background.inverseLight,LeadingIcon:n.default},Ve=Object.assign({IconHolderStyle:{background:i.COLORS.background.negative.light},Icon:e.jsx(t.default,{color:i.COLORS.content.negative,width:24,height:24})},z);Ve.actionButton=Object.assign(Object.assign({},Pe),null!==(J=null==z?void 0:z.actionButton)&&void 0!==J?J:{});const We=Ie?void 0:Te?Ve:_;return e.jsxs(h.OpennedDropdownContainer,Object.assign({version:q,ref:ye,tabIndex:-1,style:Object.assign(Object.assign({width:je},$),{outline:"none"})},{children:[e.jsxs("div",Object.assign({style:{width:xe?"50%":"100%",display:"flex",flexDirection:"column",background:"white"}},{children:[!!O&&e.jsx(f.SearchBox,{onSearch:ie,version:q}),Ae?e.jsx("div",Object.assign({style:{height:De,display:"flex",background:i.COLORS.background.base}},{children:e.jsx(s.ZeroState,Object.assign({},null!=We?We:{},{isLoading:Ie,title:Te?Ze:Be,subTitle:Te?ze:He}))})):e.jsxs(h.MenuListContainer,Object.assign({minHeight:De,maxHeight:qe,ref:Le},{children:[!!x&&!Re&&!R&&e.jsx(d.SelectAllMenu,{version:q,options:le&&D?ue:re,onSelect:pe}),!C&&Re&&e.jsx(g.SearchZeroState,{isLoading:H,errorMessage:ce,onRetry:ae,height:qe,searchedString:le,containerWidth:w,version:q}),C&&(Re||!!Ee.length&&Ee.every((e=>!1===e)))&&e.jsx(c.FreeFormMenu,{version:q,isMultiSelect:x,onSelect:fe,searchedString:le}),e.jsx(a.MenuList,{onInfiniteScroll:T,onDropdownItemClick:A,version:q,onSelect:de,showDescription:function(e,t){me(e&&t?{title:e,description:t}:null)},isMultiSelect:x,options:Me,useDefaultCursor:W,ref:ke,focusedIndex:we,isDraggable:K,onOptionsReorder:oe,showCheckboxForCustomElement:G})]})),!!x&&!Ae&&"2.0"!==q&&e.jsx(p.default,{onClear:()=>{he(),null==F||F()},onApply:ge,list:le&&D?ue:re,buttonText:I,buttonOptions:B,hideClearButton:U})]})),!!xe&&e.jsx(u.Description,{title:xe.title,description:xe.description,version:q})]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../../../assets/icons/errorInfo.svg.js"),n=require("../../../../assets/icons/refresh-purple.svg.js"),o=require("react"),s=require("../../../zeroState/ZeroState.js"),r=require("../../../../hooks/useOutside.js"),i=require("../../../../constants/Theme.js"),l=require("../../hooks/useDropdown.js"),u=require("./description/Description.js"),c=require("./menu/FreeFormMenu.js"),a=require("./menu/MenuList.js"),d=require("./menu/SelectAllMenu.js"),p=require("./multiSelect/MultiSelectDropdownBottomBar.js"),h=require("./OpennedDropdown.styled.js"),f=require("./searchbox/SearchBox.js"),g=require("./searchbox/SearchZeroState.js");const b=304,S=290;exports.OpenedDropdown=v=>{let{options:j,isSearchable:O,isMultiSelect:x,maxSelections:m,width:w,allowFreeForm:C,height:y,onClose:k,onSelect:L,onSearch:D,version:q,skipSorting:E,headerRef:M,hideSelectAll:R,primaryButtonText:I,onInfiniteScroll:T,onMultiSelectClear:F,onDropdownItemClick:A,buttonOptions:B,isSearchLoading:H,isOptionsLoading:Z,optionsErrorState:z,disableSearchOptions:P,disableSearchedOptionExcept:V,useDefaultCursor:W,containerStyle:$={},zeroState:_,isDraggable:K=!1,onOptionsReorder:N,hideClearButton:U=!1,showCheckboxForCustomElement:G=!1}=v;var J;const Q=o.useCallback((e=>{if(!K||!x)return e;const t=[],n=[];return e.forEach((e=>{if(e.options)n.push(e);else{e.selected?t.push(e):n.push(e)}})),[...t,...n]}),[K,x]),[X,Y]=o.useState((()=>Q(j))),ee=o.useRef(X),te=o.useRef(!1),ne=o.useRef(N);o.useEffect((()=>{Y(Q(j))}),[j,Q]),o.useEffect((()=>{ee.current=X}),[X]),o.useEffect((()=>{ne.current=N}),[N]),o.useEffect((()=>()=>{te.current&&ne.current&&ne.current(ee.current)}),[]);const oe=o.useCallback((e=>{Y(e),"2.0"===q?null==N||N(e):te.current=!0}),[N,q]),se=K?X:j,{dropdownOptions:re,search:ie,searchedString:le,searchedOptions:ue,searchError:ce,retrySearch:ae,onApplyHandler:de,selectAllHandler:pe,onMultiSelectClear:he,onFreeFormSelect:fe,onMultiSelectApply:ge,latestDropdownOptionsRef:be,getSelectedOptions:Se,getCurrentSelectionCount:ve}=l.useDropdown(q,se,L,E||K,x,D,P,V,m),[je,Oe]=o.useState(null!=w?w:S),[xe,me]=o.useState(null),[we,Ce]=o.useState(-1),ye=o.useRef(null),ke=o.useRef([]),Le=o.useRef(null);r.useOutside(ye,(()=>{if(me(null),x&&"2.0"===q){const e=Se(be.current);null==k||k(e)}else null==k||k(re)}),[M,ke]),o.useEffect((()=>{const e=setTimeout((()=>{ye.current&&ye.current.focus({preventScroll:!0})}),0);return()=>clearTimeout(e)}),[]);o.useEffect((()=>{const e=e=>{const t=(e=>{const t=[];return e.forEach((e=>{if(e.options)e.options.forEach((e=>{e.disabled||t.push(e)}));else{const n=e;n.disabled||t.push(n)}})),t})(le&&D?ue:re);if(0!==t.length)if("ArrowDown"===e.key)e.preventDefault(),Ce((e=>{const n=e<t.length-1?e+1:0;return setTimeout((()=>{var e;const t=null===(e=Le.current)||void 0===e?void 0:e.querySelector(`[data-option-index="${n}"]`);t&&t.scrollIntoView({block:"nearest",behavior:"smooth"})}),0),n}));else if("ArrowUp"===e.key)e.preventDefault(),Ce((e=>{const n=e>0?e-1:t.length-1;return setTimeout((()=>{var e;const t=null===(e=Le.current)||void 0===e?void 0:e.querySelector(`[data-option-index="${n}"]`);t&&t.scrollIntoView({block:"nearest",behavior:"smooth"})}),0),n}));else if("Enter"===e.key&&we>=0){e.preventDefault();const n=t[we];n&&(de(Object.assign(Object.assign({},n),{selected:!n.selected})),A&&A(n))}},t=ye.current;if(t)return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}}),[we,le,ue,re,D,de,A]);const De=null!=y?y:b,qe="number"==typeof De?O&&x?De-96:O&&!x||!O&&x?De-48:De:De;o.useEffect((()=>{const e=null!=w?w:S;if(null===xe)Oe(e);else if("number"==typeof e)Oe(2*e);else if("string"==typeof e&&e.endsWith("px")){const t=2*parseInt(e.replace("px",""));Oe(t)}}),[xe]);const Ee=[],Me=(e=>{if(!x||!m&&0!==m)return e;const t=ve(re)>=m;return t?e.map((e=>{if(e.options)return Object.assign(Object.assign({},e),{options:e.options.map((e=>Object.assign(Object.assign({},e),{disabled:e.disabled||!e.selected&&t})))});{const n=e;return Object.assign(Object.assign({},n),{disabled:n.disabled||!n.selected&&t})}})):e})((le&&D?ue:re).map((e=>{var t,n;if(le&&!D){if(e.options){const t=Object.assign({},e);return t.options=t.options.filter((e=>{var t;return!!(null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(le.toLowerCase()))&&(Ee.push(!le||e.label===le),!0)})),t.options.length>0?t:null}return(null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(le.toLowerCase()))||(null===(n=e.searchKey)||void 0===n?void 0:n.toLowerCase().includes(le.toLowerCase()))?(Ee.push(!le||e.label===le),e):null}return e})).filter((e=>null!==e))),Re=!!O&&le&&0===Me.length,Ie=!le&&!!Z,Te=!le&&!!z&&!Ie,Fe=!(le||Me.length||Ie||Te),Ae=Ie||Te||Fe,Be=(null==_?void 0:_.title)||"No results found",He=(null==_?void 0:_.subTitle)||"Please try again later or contact us at support@bik.ai if you require further assistance.",Ze=(null==z?void 0:z.title)||"Failed to load options",ze=(null==z?void 0:z.subTitle)||"Something went wrong while fetching the list. Please try again",Pe={buttonText:"Try again",buttonType:"text",size:"small",buttonTextColor:i.COLORS.background.inverseLight,customIconColor:i.COLORS.background.inverseLight,LeadingIcon:n.default},Ve=Object.assign({IconHolderStyle:{background:i.COLORS.background.negative.light},Icon:e.jsx(t.default,{color:i.COLORS.content.negative,width:24,height:24})},z);Ve.actionButton=Object.assign(Object.assign({},Pe),null!==(J=null==z?void 0:z.actionButton)&&void 0!==J?J:{});const We=Ie?void 0:Te?Ve:_;return e.jsxs(h.OpennedDropdownContainer,Object.assign({version:q,ref:ye,tabIndex:-1,style:Object.assign(Object.assign({width:je},$),{outline:"none"})},{children:[e.jsxs("div",Object.assign({style:{width:xe?"50%":"100%",display:"flex",flexDirection:"column",background:"white"}},{children:[!!O&&e.jsx(f.SearchBox,{onSearch:ie,version:q}),Ae?e.jsx("div",Object.assign({style:{height:De,display:"flex",background:i.COLORS.background.base}},{children:e.jsx(s.ZeroState,Object.assign({},null!=We?We:{},{isLoading:Ie,title:Te?Ze:Be,subTitle:Te?ze:He}))})):e.jsxs(h.MenuListContainer,Object.assign({minHeight:De,maxHeight:qe,ref:Le},{children:[!!x&&!Re&&!R&&e.jsx(d.SelectAllMenu,{version:q,options:le&&D?ue:re,onSelect:pe}),!C&&Re&&e.jsx(g.SearchZeroState,{isLoading:H,errorMessage:ce,onRetry:ae,height:qe,searchedString:le,containerWidth:w}),C&&(Re||!!Ee.length&&Ee.every((e=>!1===e)))&&e.jsx(c.FreeFormMenu,{version:q,isMultiSelect:x,onSelect:fe,searchedString:le}),e.jsx(a.MenuList,{onInfiniteScroll:T,onDropdownItemClick:A,version:q,onSelect:de,showDescription:function(e,t){me(e&&t?{title:e,description:t}:null)},isMultiSelect:x,options:Me,useDefaultCursor:W,ref:ke,focusedIndex:we,isDraggable:K,onOptionsReorder:oe,showCheckboxForCustomElement:G})]})),!!x&&!Ae&&"2.0"!==q&&e.jsx(p.default,{onClear:()=>{he(),null==F||F()},onApply:ge,list:le&&D?ue:re,buttonText:I,buttonOptions:B,hideClearButton:U})]})),!!xe&&e.jsx(u.Description,{title:xe.title,description:xe.description,version:q})]}))};
2
2
  //# sourceMappingURL=OpennedDropdown.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OpennedDropdown.js","sources":["../../../../../../src/components/dropdown/OpenedDropdown/components/OpennedDropdown.tsx"],"sourcesContent":["import ErrorInfoIcon from '@src/assets/icons/errorInfo.svg';\nimport RetryIcon from '@src/assets/icons/refresh-purple.svg';\nimport React, { useCallback, useEffect, useRef, useState } from 'react';\nimport { ZeroState } from '@src/components/zeroState/ZeroState';\nimport { useOutside } from '@src/hooks/useOutside';\nimport { COLORS } from '@src/constants/Theme';\nimport { useDropdown } from '../../hooks/useDropdown';\nimport {\n\tDropdownOption,\n\tGroupedOption,\n\tMultiSelectOption,\n\tOpenDropdownProps,\n\tSingleOption,\n} from '../../type';\nimport { Description } from './description/Description';\nimport { FreeFormMenu } from './menu/FreeFormMenu';\nimport { MenuList } from './menu/MenuList';\nimport { SelectAllMenu } from './menu/SelectAllMenu';\nimport MultiSelectDropdownBottomBar from './multiSelect/MultiSelectDropdownBottomBar';\nimport {\n\tMenuListContainer,\n\tOpennedDropdownContainer,\n} from './OpennedDropdown.styled';\nimport { SearchBox } from './searchbox/SearchBox';\nimport { SearchZeroState } from './searchbox/SearchZeroState';\n\n/** CONSTANTS */\nconst defaults = {\n\theight: 304,\n\twidth: 290,\n};\n\nexport const OpenedDropdown: React.FC<OpenDropdownProps> = ({\n\toptions,\n\tisSearchable,\n\tisMultiSelect,\n\tmaxSelections,\n\twidth,\n\tallowFreeForm,\n\theight,\n\tonClose,\n\tonSelect,\n\tonSearch,\n\tversion,\n\tskipSorting,\n\theaderRef,\n\thideSelectAll,\n\tprimaryButtonText,\n\tonInfiniteScroll,\n\tonMultiSelectClear: onMultiSelectClearProp,\n\tonDropdownItemClick,\n\tbuttonOptions,\n\tisSearchLoading,\n\tisOptionsLoading,\n\toptionsErrorState,\n\tdisableSearchOptions,\n\tdisableSearchedOptionExcept,\n\tuseDefaultCursor,\n\tcontainerStyle = {},\n\tzeroState = undefined,\n\tisDraggable = false,\n\tonOptionsReorder,\n\thideClearButton = false,\n\tshowCheckboxForCustomElement = false,\n}) => {\n\t// Sort options with selected at top, unselected at bottom, maintaining order within groups\n\tconst sortOptionsWithSelectedOnTop = useCallback(\n\t\t(opts: DropdownOption[]): DropdownOption[] => {\n\t\t\tif (!isDraggable || !isMultiSelect) return opts;\n\n\t\t\tconst selected: DropdownOption[] = [];\n\t\t\tconst unselected: DropdownOption[] = [];\n\n\t\t\topts.forEach((option) => {\n\t\t\t\tif ((option as GroupedOption).options) {\n\t\t\t\t\t// Handle grouped options - maintain grouping\n\t\t\t\t\tunselected.push(option);\n\t\t\t\t} else {\n\t\t\t\t\tconst singleOption = option as SingleOption;\n\t\t\t\t\tif (singleOption.selected) {\n\t\t\t\t\t\tselected.push(option);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tunselected.push(option);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn [...selected, ...unselected];\n\t\t},\n\t\t[isDraggable, isMultiSelect],\n\t);\n\n\tconst [localOptions, setLocalOptions] = useState<DropdownOption[]>(() =>\n\t\tsortOptionsWithSelectedOnTop(options),\n\t);\n\tconst localOptionsRef = useRef<DropdownOption[]>(localOptions);\n\tconst hasReorderedRef = useRef(false);\n\tconst onOptionsReorderRef = useRef(onOptionsReorder);\n\n\tuseEffect(() => {\n\t\tsetLocalOptions(sortOptionsWithSelectedOnTop(options));\n\t}, [options, sortOptionsWithSelectedOnTop]);\n\n\tuseEffect(() => {\n\t\tlocalOptionsRef.current = localOptions;\n\t}, [localOptions]);\n\n\tuseEffect(() => {\n\t\tonOptionsReorderRef.current = onOptionsReorder;\n\t}, [onOptionsReorder]);\n\n\t// Fire onOptionsReorder on unmount (dropdown close from Apply or click-outside)\n\tuseEffect(() => {\n\t\treturn () => {\n\t\t\tif (hasReorderedRef.current && onOptionsReorderRef.current) {\n\t\t\t\tonOptionsReorderRef.current(localOptionsRef.current);\n\t\t\t}\n\t\t};\n\t}, []);\n\n\tconst handleOptionsReorder = useCallback(\n\t\t(reorderedOptions: DropdownOption[]) => {\n\t\t\tsetLocalOptions(reorderedOptions);\n\t\t\t// For version 2.0 (no Apply button), apply reorder immediately\n\t\t\tif (version === '2.0') {\n\t\t\t\tonOptionsReorder?.(reorderedOptions);\n\t\t\t} else {\n\t\t\t\t// For version 1.0, defer until Apply/close (handled by unmount cleanup)\n\t\t\t\thasReorderedRef.current = true;\n\t\t\t}\n\t\t},\n\t\t[onOptionsReorder, version],\n\t);\n\n\tconst optionsToUse = isDraggable ? localOptions : options;\n\tconst {\n\t\tdropdownOptions,\n\t\tsearch,\n\t\tsearchedString,\n\t\tsearchedOptions,\n\t\tsearchError,\n\t\tretrySearch,\n\t\tonApplyHandler,\n\t\tselectAllHandler,\n\t\tonMultiSelectClear,\n\t\tonFreeFormSelect,\n\t\tonMultiSelectApply,\n\t\tlatestDropdownOptionsRef,\n\t\tgetSelectedOptions,\n\t\tgetCurrentSelectionCount,\n\t} = useDropdown(\n\t\tversion,\n\t\toptionsToUse,\n\t\tonSelect,\n\t\tskipSorting || isDraggable,\n\t\tisMultiSelect,\n\t\tonSearch,\n\t\tdisableSearchOptions,\n\t\tdisableSearchedOptionExcept,\n\t\tmaxSelections,\n\t);\n\tconst [widthState, setWidthState] = useState(width ?? defaults.width);\n\tconst [descriptionInfo, setDescription] = useState<{\n\t\ttitle: string;\n\t\tdescription: string;\n\t} | null>(null);\n\tconst [focusedIndex, setFocusedIndex] = useState<number>(-1);\n\tconst ref = useRef<HTMLDivElement>(null);\n\tconst childRefs = useRef([]);\n\tconst menuListRef = useRef<HTMLDivElement>(null);\n\tuseOutside(\n\t\tref,\n\t\t() => {\n\t\t\tsetDescription(null);\n\t\t\tif (isMultiSelect && version === '2.0') {\n\t\t\t\tconst optionsToSend = getSelectedOptions(\n\t\t\t\t\tlatestDropdownOptionsRef.current,\n\t\t\t\t);\n\t\t\t\tonClose?.(optionsToSend);\n\t\t\t} else {\n\t\t\t\tonClose?.(dropdownOptions);\n\t\t\t}\n\t\t},\n\t\t[headerRef, childRefs],\n\t);\n\n\t// Auto-focus dropdown when it opens for keyboard navigation while preventing scroll to maintain popper positioning\n\tuseEffect(() => {\n\t\tconst timer = setTimeout(() => {\n\t\t\tif (ref.current) {\n\t\t\t\tref.current.focus({ preventScroll: true });\n\t\t\t}\n\t\t}, 0);\n\t\treturn () => clearTimeout(timer);\n\t}, []);\n\n\t// Get flattened selectable options\n\tconst getFlattenedOptions = (opts: DropdownOption[]): SingleOption[] => {\n\t\tconst flattened: SingleOption[] = [];\n\t\topts.forEach((option) => {\n\t\t\tif ((option as GroupedOption).options) {\n\t\t\t\tconst groupedOption = option as GroupedOption;\n\t\t\t\tgroupedOption.options.forEach((nestedOption) => {\n\t\t\t\t\tif (!nestedOption.disabled) {\n\t\t\t\t\t\tflattened.push(nestedOption);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tconst singleOption = option as SingleOption;\n\t\t\t\tif (!singleOption.disabled) {\n\t\t\t\t\tflattened.push(singleOption);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn flattened;\n\t};\n\n\t/** Keyboard navigation handler */\n\tuseEffect(() => {\n\t\tconst handleKeyDown = (e: KeyboardEvent) => {\n\t\t\tconst currentOptions =\n\t\t\t\tsearchedString && onSearch ? searchedOptions : dropdownOptions;\n\t\t\tconst flattenedOptions = getFlattenedOptions(currentOptions);\n\n\t\t\tif (flattenedOptions.length === 0) return;\n\n\t\t\tif (e.key === 'ArrowDown') {\n\t\t\t\te.preventDefault();\n\t\t\t\tsetFocusedIndex((prev) => {\n\t\t\t\t\tconst newIndex = prev < flattenedOptions.length - 1 ? prev + 1 : 0;\n\t\t\t\t\t// Scroll to the focused item\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tconst focusedElement = menuListRef.current?.querySelector(\n\t\t\t\t\t\t\t`[data-option-index=\"${newIndex}\"]`,\n\t\t\t\t\t\t) as HTMLElement;\n\t\t\t\t\t\tif (focusedElement) {\n\t\t\t\t\t\t\tfocusedElement.scrollIntoView({\n\t\t\t\t\t\t\t\tblock: 'nearest',\n\t\t\t\t\t\t\t\tbehavior: 'smooth',\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}, 0);\n\t\t\t\t\treturn newIndex;\n\t\t\t\t});\n\t\t\t} else if (e.key === 'ArrowUp') {\n\t\t\t\te.preventDefault();\n\t\t\t\tsetFocusedIndex((prev) => {\n\t\t\t\t\tconst newIndex = prev > 0 ? prev - 1 : flattenedOptions.length - 1;\n\t\t\t\t\t// Scroll to the focused item\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tconst focusedElement = menuListRef.current?.querySelector(\n\t\t\t\t\t\t\t`[data-option-index=\"${newIndex}\"]`,\n\t\t\t\t\t\t) as HTMLElement;\n\t\t\t\t\t\tif (focusedElement) {\n\t\t\t\t\t\t\tfocusedElement.scrollIntoView({\n\t\t\t\t\t\t\t\tblock: 'nearest',\n\t\t\t\t\t\t\t\tbehavior: 'smooth',\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}, 0);\n\t\t\t\t\treturn newIndex;\n\t\t\t\t});\n\t\t\t} else if (e.key === 'Enter' && focusedIndex >= 0) {\n\t\t\t\te.preventDefault();\n\t\t\t\tconst focusedOption = flattenedOptions[focusedIndex];\n\t\t\t\tif (focusedOption) {\n\t\t\t\t\t// onApplyHandler handles the selection state and calls onSelect internally\n\t\t\t\t\tonApplyHandler({\n\t\t\t\t\t\t...focusedOption,\n\t\t\t\t\t\tselected: !focusedOption.selected,\n\t\t\t\t\t});\n\t\t\t\t\t// Also trigger onDropdownItemClick if provided\n\t\t\t\t\tif (onDropdownItemClick) {\n\t\t\t\t\t\tonDropdownItemClick(focusedOption);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tconst dropdownElement = ref.current;\n\t\tif (dropdownElement) {\n\t\t\tdropdownElement.addEventListener('keydown', handleKeyDown);\n\t\t\treturn () => {\n\t\t\t\tdropdownElement.removeEventListener('keydown', handleKeyDown);\n\t\t\t};\n\t\t}\n\t}, [\n\t\tfocusedIndex,\n\t\tsearchedString,\n\t\tsearchedOptions,\n\t\tdropdownOptions,\n\t\tonSearch,\n\t\tonApplyHandler,\n\t\tonDropdownItemClick,\n\t]);\n\n\t// LOCAL CONSTANTS\n\tconst heightToUse = height ?? defaults.height;\n\tconst menuListMaxHeight =\n\t\ttypeof heightToUse === 'number'\n\t\t\t? isSearchable && isMultiSelect\n\t\t\t\t? heightToUse - 96\n\t\t\t\t: (isSearchable && !isMultiSelect) || (!isSearchable && isMultiSelect)\n\t\t\t\t? heightToUse - 48\n\t\t\t\t: heightToUse\n\t\t\t: heightToUse;\n\n\tfunction showDescription(title?: string, description?: string) {\n\t\tif (title && description) {\n\t\t\tsetDescription({\n\t\t\t\ttitle,\n\t\t\t\tdescription,\n\t\t\t});\n\t\t} else {\n\t\t\tsetDescription(null);\n\t\t}\n\t}\n\n\tuseEffect(() => {\n\t\tconst widthToUse = width ?? defaults.width;\n\t\tif (descriptionInfo === null) {\n\t\t\tsetWidthState(widthToUse);\n\t\t} else if (typeof widthToUse === 'number') {\n\t\t\tsetWidthState(widthToUse * 2);\n\t\t} else if (typeof widthToUse === 'string') {\n\t\t\tif (widthToUse.endsWith('px')) {\n\t\t\t\tconst newWidth = parseInt(widthToUse.replace('px', '')) * 2;\n\t\t\t\tsetWidthState(newWidth);\n\t\t\t}\n\t\t}\n\t}, [descriptionInfo]);\n\n\t/**\n\t * This is to show the search result in a stateless way\n\t */\n\n\tconst exactMatchFound: boolean[] = [];\n\n\tconst processOptionsWithMaxSelections = (\n\t\toptionsToProcess: DropdownOption[],\n\t) => {\n\t\tif (!isMultiSelect || (!maxSelections && maxSelections !== 0)) {\n\t\t\treturn optionsToProcess;\n\t\t}\n\n\t\t// Count from the full options list (not the filtered subset) so selections\n\t\t// hidden by a search query are still included in the limit check.\n\t\tconst currentSelectionCount = getCurrentSelectionCount(dropdownOptions);\n\t\tconst maxSelectionsReached = currentSelectionCount >= maxSelections;\n\n\t\tif (!maxSelectionsReached) {\n\t\t\treturn optionsToProcess;\n\t\t}\n\n\t\t// Disable unselected options when max selections is reached\n\t\treturn optionsToProcess.map((option) => {\n\t\t\tif ((option as GroupedOption).options) {\n\t\t\t\treturn {\n\t\t\t\t\t...option,\n\t\t\t\t\toptions: (option as GroupedOption).options.map((nestedOption) => ({\n\t\t\t\t\t\t...nestedOption,\n\t\t\t\t\t\tdisabled:\n\t\t\t\t\t\t\tnestedOption.disabled ||\n\t\t\t\t\t\t\t(!nestedOption.selected && maxSelectionsReached),\n\t\t\t\t\t})),\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tconst singleOption = option as SingleOption;\n\t\t\t\treturn {\n\t\t\t\t\t...singleOption,\n\t\t\t\t\tdisabled:\n\t\t\t\t\t\tsingleOption.disabled ||\n\t\t\t\t\t\t(!singleOption.selected && maxSelectionsReached),\n\t\t\t\t};\n\t\t\t}\n\t\t});\n\t};\n\n\tconst optionsToShow = processOptionsWithMaxSelections(\n\t\t(searchedString && onSearch ? searchedOptions : dropdownOptions)\n\t\t\t.map((option) => {\n\t\t\t\tif (searchedString && !onSearch) {\n\t\t\t\t\tif ((option as GroupedOption).options) {\n\t\t\t\t\t\tconst groupedOption = { ...option } as GroupedOption;\n\t\t\t\t\t\tgroupedOption.options = groupedOption.options.filter((op) => {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\top.label?.toLowerCase().includes(searchedString.toLowerCase())\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\texactMatchFound.push(\n\t\t\t\t\t\t\t\t\t!searchedString || op.label === searchedString,\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\treturn groupedOption.options.length > 0 ? groupedOption : null;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\toption.label\n\t\t\t\t\t\t\t\t?.toLowerCase()\n\t\t\t\t\t\t\t\t.includes(searchedString.toLowerCase()) ||\n\t\t\t\t\t\t\t(option as SingleOption | MultiSelectOption).searchKey\n\t\t\t\t\t\t\t\t?.toLowerCase()\n\t\t\t\t\t\t\t\t.includes(searchedString.toLowerCase())\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\texactMatchFound.push(\n\t\t\t\t\t\t\t\t!searchedString || option.label === searchedString,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\treturn option;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn option;\n\t\t\t})\n\t\t\t.filter((option) => option !== null) as DropdownOption[],\n\t);\n\n\tconst noResultForSearch =\n\t\t!!isSearchable && searchedString && optionsToShow.length === 0;\n\tconst showLoadingState = !searchedString && !!isOptionsLoading;\n\tconst showErrorState =\n\t\t!searchedString && !!optionsErrorState && !showLoadingState;\n\tconst showEmptyState =\n\t\t!searchedString &&\n\t\t!optionsToShow.length &&\n\t\t!showLoadingState &&\n\t\t!showErrorState;\n\tconst showTopLevelZeroState =\n\t\tshowLoadingState || showErrorState || showEmptyState;\n\n\tconst emptyStateTitle = zeroState?.title || 'No results found';\n\tconst emptyStateSubTitle =\n\t\tzeroState?.subTitle ||\n\t\t`Please try again later or contact us at support@bik.ai if you require further assistance.`;\n\tconst errorStateTitle = optionsErrorState?.title || 'Failed to load options';\n\tconst errorStateSubTitle =\n\t\toptionsErrorState?.subTitle ||\n\t\t'Something went wrong while fetching the list. Please try again';\n\tconst defaultErrorActionButton = {\n\t\tbuttonText: 'Try again',\n\t\tbuttonType: 'text' as const,\n\t\tsize: 'small' as const,\n\t\tbuttonTextColor: COLORS.background.inverseLight,\n\t\tcustomIconColor: COLORS.background.inverseLight,\n\t\tLeadingIcon: RetryIcon,\n\t};\n\n\tconst mergedErrorState = {\n\t\tIconHolderStyle: {\n\t\t\tbackground: COLORS.background.negative.light,\n\t\t},\n\t\tIcon: (\n\t\t\t<ErrorInfoIcon color={COLORS.content.negative} width={24} height={24} />\n\t\t),\n\t\t...optionsErrorState,\n\t};\n\tmergedErrorState.actionButton = {\n\t\t...defaultErrorActionButton,\n\t\t...(optionsErrorState?.actionButton ?? {}),\n\t};\n\tconst zeroStateProps = showLoadingState\n\t\t? undefined\n\t\t: showErrorState\n\t\t? mergedErrorState\n\t\t: zeroState;\n\n\treturn (\n\t\t<OpennedDropdownContainer\n\t\t\tversion={version}\n\t\t\tref={ref}\n\t\t\ttabIndex={-1}\n\t\t\tstyle={{\n\t\t\t\t// maxWidth: descriptionInfo ? 800 : 400,\n\t\t\t\twidth: widthState,\n\t\t\t\t...containerStyle,\n\t\t\t\toutline: 'none',\n\t\t\t}}\n\t\t>\n\t\t\t<div\n\t\t\t\tstyle={{\n\t\t\t\t\twidth: descriptionInfo ? '50%' : '100%',\n\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\tflexDirection: 'column',\n\t\t\t\t\tbackground: 'white',\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{!!isSearchable && <SearchBox onSearch={search} version={version} />}\n\n\t\t\t\t{showTopLevelZeroState ? (\n\t\t\t\t\t<div\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\theight: heightToUse,\n\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\tbackground: COLORS.background.base,\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<ZeroState\n\t\t\t\t\t\t\t{...(zeroStateProps ?? {})}\n\t\t\t\t\t\t\tisLoading={showLoadingState}\n\t\t\t\t\t\t\ttitle={showErrorState ? errorStateTitle : emptyStateTitle}\n\t\t\t\t\t\t\tsubTitle={\n\t\t\t\t\t\t\t\tshowErrorState ? errorStateSubTitle : emptyStateSubTitle\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t) : (\n\t\t\t\t\t<MenuListContainer\n\t\t\t\t\t\tminHeight={heightToUse}\n\t\t\t\t\t\tmaxHeight={menuListMaxHeight}\n\t\t\t\t\t\tref={menuListRef}\n\t\t\t\t\t>\n\t\t\t\t\t\t{!!isMultiSelect && !noResultForSearch && !hideSelectAll && (\n\t\t\t\t\t\t\t<SelectAllMenu\n\t\t\t\t\t\t\t\tversion={version}\n\t\t\t\t\t\t\t\toptions={\n\t\t\t\t\t\t\t\t\tsearchedString && onSearch ? searchedOptions : dropdownOptions\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonSelect={selectAllHandler}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{!allowFreeForm && noResultForSearch && (\n\t\t\t\t\t\t\t<SearchZeroState\n\t\t\t\t\t\t\t\tisLoading={isSearchLoading}\n\t\t\t\t\t\t\t\terrorMessage={searchError}\n\t\t\t\t\t\t\t\tonRetry={retrySearch}\n\t\t\t\t\t\t\t\theight={menuListMaxHeight as number}\n\t\t\t\t\t\t\t\tsearchedString={searchedString}\n\t\t\t\t\t\t\t\tcontainerWidth={width}\n\t\t\t\t\t\t\t\tversion={version}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{allowFreeForm &&\n\t\t\t\t\t\t\t(noResultForSearch ||\n\t\t\t\t\t\t\t\t(!!exactMatchFound.length &&\n\t\t\t\t\t\t\t\t\texactMatchFound.every((val) => val === false))) && (\n\t\t\t\t\t\t\t\t<FreeFormMenu\n\t\t\t\t\t\t\t\t\tversion={version}\n\t\t\t\t\t\t\t\t\tisMultiSelect={isMultiSelect}\n\t\t\t\t\t\t\t\t\tonSelect={onFreeFormSelect}\n\t\t\t\t\t\t\t\t\tsearchedString={searchedString}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t<MenuList\n\t\t\t\t\t\t\tonInfiniteScroll={onInfiniteScroll}\n\t\t\t\t\t\t\tonDropdownItemClick={onDropdownItemClick}\n\t\t\t\t\t\t\tversion={version}\n\t\t\t\t\t\t\tonSelect={onApplyHandler}\n\t\t\t\t\t\t\tshowDescription={showDescription}\n\t\t\t\t\t\t\tisMultiSelect={isMultiSelect}\n\t\t\t\t\t\t\toptions={optionsToShow}\n\t\t\t\t\t\t\tuseDefaultCursor={useDefaultCursor}\n\t\t\t\t\t\t\tref={childRefs}\n\t\t\t\t\t\t\tfocusedIndex={focusedIndex}\n\t\t\t\t\t\t\tisDraggable={isDraggable}\n\t\t\t\t\t\t\tonOptionsReorder={handleOptionsReorder}\n\t\t\t\t\t\t\tshowCheckboxForCustomElement={showCheckboxForCustomElement}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</MenuListContainer>\n\t\t\t\t)}\n\t\t\t\t{!!isMultiSelect && !showTopLevelZeroState && version !== '2.0' && (\n\t\t\t\t\t<MultiSelectDropdownBottomBar\n\t\t\t\t\t\tonClear={() => {\n\t\t\t\t\t\t\tonMultiSelectClear();\n\t\t\t\t\t\t\tonMultiSelectClearProp?.();\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tonApply={onMultiSelectApply}\n\t\t\t\t\t\tlist={\n\t\t\t\t\t\t\tsearchedString && onSearch ? searchedOptions : dropdownOptions\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbuttonText={primaryButtonText}\n\t\t\t\t\t\tbuttonOptions={buttonOptions}\n\t\t\t\t\t\thideClearButton={hideClearButton}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t\t{!!descriptionInfo && (\n\t\t\t\t<Description\n\t\t\t\t\ttitle={descriptionInfo.title}\n\t\t\t\t\tdescription={descriptionInfo.description}\n\t\t\t\t\tversion={version}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</OpennedDropdownContainer>\n\t);\n};\n"],"names":["defaults","_ref","options","isSearchable","isMultiSelect","maxSelections","width","allowFreeForm","height","onClose","onSelect","onSearch","version","skipSorting","headerRef","hideSelectAll","primaryButtonText","onInfiniteScroll","onMultiSelectClear","onMultiSelectClearProp","onDropdownItemClick","buttonOptions","isSearchLoading","isOptionsLoading","optionsErrorState","disableSearchOptions","disableSearchedOptionExcept","useDefaultCursor","containerStyle","zeroState","isDraggable","onOptionsReorder","hideClearButton","showCheckboxForCustomElement","sortOptionsWithSelectedOnTop","useCallback","opts","selected","unselected","forEach","option","push","localOptions","setLocalOptions","useState","localOptionsRef","useRef","hasReorderedRef","onOptionsReorderRef","useEffect","current","handleOptionsReorder","reorderedOptions","optionsToUse","dropdownOptions","search","searchedString","searchedOptions","searchError","retrySearch","onApplyHandler","selectAllHandler","onFreeFormSelect","onMultiSelectApply","latestDropdownOptionsRef","getSelectedOptions","getCurrentSelectionCount","useDropdown","widthState","setWidthState","descriptionInfo","setDescription","focusedIndex","setFocusedIndex","ref","childRefs","menuListRef","useOutside","optionsToSend","timer","setTimeout","focus","preventScroll","clearTimeout","handleKeyDown","e","flattenedOptions","flattened","nestedOption","disabled","singleOption","getFlattenedOptions","length","key","preventDefault","prev","newIndex","focusedElement","_a","querySelector","scrollIntoView","block","behavior","focusedOption","Object","assign","dropdownElement","addEventListener","removeEventListener","heightToUse","menuListMaxHeight","widthToUse","endsWith","newWidth","parseInt","replace","exactMatchFound","optionsToShow","optionsToProcess","maxSelectionsReached","map","processOptionsWithMaxSelections","groupedOption","filter","op","label","toLowerCase","includes","_b","searchKey","noResultForSearch","showLoadingState","showErrorState","showEmptyState","showTopLevelZeroState","emptyStateTitle","title","emptyStateSubTitle","subTitle","errorStateTitle","errorStateSubTitle","defaultErrorActionButton","buttonText","buttonType","size","buttonTextColor","COLORS","background","inverseLight","customIconColor","LeadingIcon","RetryIcon","mergedErrorState","IconHolderStyle","negative","light","Icon","_jsx","jsx","ErrorInfoIcon","color","content","actionButton","zeroStateProps","undefined","_jsxs","OpennedDropdownContainer","tabIndex","style","outline","children","jsxs","display","flexDirection","SearchBox","base","ZeroState","isLoading","MenuListContainer","minHeight","maxHeight","SelectAllMenu","SearchZeroState","errorMessage","onRetry","containerWidth","every","val","FreeFormMenu","MenuList","showDescription","description","MultiSelectDropdownBottomBar","onClear","onApply","list","Description"],"mappings":"ouBA2BA,MAAMA,EACG,IADHA,EAEE,2BAGmDC,IAgCtD,IAhCuDC,QAC3DA,EAAOC,aACPA,EAAYC,cACZA,EAAaC,cACbA,EAAaC,MACbA,EAAKC,cACLA,EAAaC,OACbA,EAAMC,QACNA,EAAOC,SACPA,EAAQC,SACRA,EAAQC,QACRA,EAAOC,YACPA,EAAWC,UACXA,EAASC,cACTA,EAAaC,kBACbA,EAAiBC,iBACjBA,EACAC,mBAAoBC,EAAsBC,oBAC1CA,EAAmBC,cACnBA,EAAaC,gBACbA,EAAeC,iBACfA,EAAgBC,kBAChBA,EAAiBC,qBACjBA,EAAoBC,4BACpBA,EAA2BC,iBAC3BA,EAAgBC,eAChBA,EAAiB,CAAE,EAAAC,UACnBA,EAAqBC,YACrBA,GAAc,EAAKC,iBACnBA,EAAgBC,gBAChBA,GAAkB,EAAKC,6BACvBA,GAA+B,GAC/BhC,QAEA,MAAMiC,EAA+BC,EAAWA,aAC9CC,IACA,IAAKN,IAAgB1B,EAAe,OAAOgC,EAE3C,MAAMC,EAA6B,GAC7BC,EAA+B,GAgBrC,OAdAF,EAAKG,SAASC,IACb,GAAKA,EAAyBtC,QAE7BoC,EAAWG,KAAKD,OACV,CACeA,EACJH,SAChBA,EAASI,KAAKD,GAEdF,EAAWG,KAAKD,EAEjB,KAGK,IAAIH,KAAaC,EAAW,GAEpC,CAACR,EAAa1B,KAGRsC,EAAcC,GAAmBC,EAAQA,UAAmB,IAClEV,EAA6BhC,KAExB2C,GAAkBC,SAAyBJ,GAC3CK,GAAkBD,UAAO,G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KAAsBnH,GAC1C8I,EAACC,IAAAuB,iBACAzK,QAASA,EACTV,QACCsD,IAAkB7C,EAAW8C,GAAkBH,GAEhD5C,SAAUmD,MAIVtD,GAAiB2H,IAClB2B,EAAAA,IAACyB,EAAAA,gBAAe,CACfL,UAAW3J,EACXiK,aAAc7H,GACd8H,QAAS7H,GACTnD,OAAQsG,GACRtD,eAAgBA,GAChBiI,eAAgBnL,EAChBM,QAASA,IAGVL,IACC2H,MACGd,GAAgBxB,QAClBwB,GAAgBsE,OAAOC,IAAgB,IAARA,MAChC9B,EAAAA,IAAC+B,EAAAA,aAAY,CACZhL,QAASA,EACTR,cAAeA,EACfM,SAAUoD,GACVN,eAAgBA,KAInBqG,EAACC,IAAA+B,WACA,CAAA5K,iBAAkBA,EAClBG,oBAAqBA,EACrBR,QAASA,EACTF,SAAUkD,GACVkI,gBAxPN,SAAyBtD,EAAgBuD,GAEvCxH,GADGiE,GAASuD,EACG,CACdvD,QACAuD,eAGc,KAEjB,EAgPM3L,cAAeA,EACfF,QAASmH,GACT1F,iBAAkBA,EAClB+C,IAAKC,GACLH,aAAcA,GACd1C,YAAaA,EACbC,iBAAkBoB,GAClBlB,6BAA8BA,UAI9B7B,IAAkBkI,IAAqC,QAAZ1H,GAC7CiJ,EAACC,IAAAkC,UACA,CAAAC,QAASA,KACR/K,KACAC,SAAAA,GAA0B,EAE3B+K,QAASnI,GACToI,KACC3I,IAAkB7C,EAAW8C,GAAkBH,GAEhDwF,WAAY9H,EACZK,cAAeA,EACfW,gBAAiBA,UAIjBsC,IACFuF,EAAAA,IAACuC,EAAAA,YAAW,CACX5D,MAAOlE,GAAgBkE,MACvBuD,YAAazH,GAAgByH,YAC7BnL,QAASA,OAGe"}
1
+ {"version":3,"file":"OpennedDropdown.js","sources":["../../../../../../src/components/dropdown/OpenedDropdown/components/OpennedDropdown.tsx"],"sourcesContent":["import ErrorInfoIcon from '@src/assets/icons/errorInfo.svg';\nimport RetryIcon from '@src/assets/icons/refresh-purple.svg';\nimport React, { useCallback, useEffect, useRef, useState } from 'react';\nimport { ZeroState } from '@src/components/zeroState/ZeroState';\nimport { useOutside } from '@src/hooks/useOutside';\nimport { COLORS } from '@src/constants/Theme';\nimport { useDropdown } from '../../hooks/useDropdown';\nimport {\n\tDropdownOption,\n\tGroupedOption,\n\tMultiSelectOption,\n\tOpenDropdownProps,\n\tSingleOption,\n} from '../../type';\nimport { Description } from './description/Description';\nimport { FreeFormMenu } from './menu/FreeFormMenu';\nimport { MenuList } from './menu/MenuList';\nimport { SelectAllMenu } from './menu/SelectAllMenu';\nimport MultiSelectDropdownBottomBar from './multiSelect/MultiSelectDropdownBottomBar';\nimport {\n\tMenuListContainer,\n\tOpennedDropdownContainer,\n} from './OpennedDropdown.styled';\nimport { SearchBox } from './searchbox/SearchBox';\nimport { SearchZeroState } from './searchbox/SearchZeroState';\n\n/** CONSTANTS */\nconst defaults = {\n\theight: 304,\n\twidth: 290,\n};\n\nexport const OpenedDropdown: React.FC<OpenDropdownProps> = ({\n\toptions,\n\tisSearchable,\n\tisMultiSelect,\n\tmaxSelections,\n\twidth,\n\tallowFreeForm,\n\theight,\n\tonClose,\n\tonSelect,\n\tonSearch,\n\tversion,\n\tskipSorting,\n\theaderRef,\n\thideSelectAll,\n\tprimaryButtonText,\n\tonInfiniteScroll,\n\tonMultiSelectClear: onMultiSelectClearProp,\n\tonDropdownItemClick,\n\tbuttonOptions,\n\tisSearchLoading,\n\tisOptionsLoading,\n\toptionsErrorState,\n\tdisableSearchOptions,\n\tdisableSearchedOptionExcept,\n\tuseDefaultCursor,\n\tcontainerStyle = {},\n\tzeroState = undefined,\n\tisDraggable = false,\n\tonOptionsReorder,\n\thideClearButton = false,\n\tshowCheckboxForCustomElement = false,\n}) => {\n\t// Sort options with selected at top, unselected at bottom, maintaining order within groups\n\tconst sortOptionsWithSelectedOnTop = useCallback(\n\t\t(opts: DropdownOption[]): DropdownOption[] => {\n\t\t\tif (!isDraggable || !isMultiSelect) return opts;\n\n\t\t\tconst selected: DropdownOption[] = [];\n\t\t\tconst unselected: DropdownOption[] = [];\n\n\t\t\topts.forEach((option) => {\n\t\t\t\tif ((option as GroupedOption).options) {\n\t\t\t\t\t// Handle grouped options - maintain grouping\n\t\t\t\t\tunselected.push(option);\n\t\t\t\t} else {\n\t\t\t\t\tconst singleOption = option as SingleOption;\n\t\t\t\t\tif (singleOption.selected) {\n\t\t\t\t\t\tselected.push(option);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tunselected.push(option);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn [...selected, ...unselected];\n\t\t},\n\t\t[isDraggable, isMultiSelect],\n\t);\n\n\tconst [localOptions, setLocalOptions] = useState<DropdownOption[]>(() =>\n\t\tsortOptionsWithSelectedOnTop(options),\n\t);\n\tconst localOptionsRef = useRef<DropdownOption[]>(localOptions);\n\tconst hasReorderedRef = useRef(false);\n\tconst onOptionsReorderRef = useRef(onOptionsReorder);\n\n\tuseEffect(() => {\n\t\tsetLocalOptions(sortOptionsWithSelectedOnTop(options));\n\t}, [options, sortOptionsWithSelectedOnTop]);\n\n\tuseEffect(() => {\n\t\tlocalOptionsRef.current = localOptions;\n\t}, [localOptions]);\n\n\tuseEffect(() => {\n\t\tonOptionsReorderRef.current = onOptionsReorder;\n\t}, [onOptionsReorder]);\n\n\t// Fire onOptionsReorder on unmount (dropdown close from Apply or click-outside)\n\tuseEffect(() => {\n\t\treturn () => {\n\t\t\tif (hasReorderedRef.current && onOptionsReorderRef.current) {\n\t\t\t\tonOptionsReorderRef.current(localOptionsRef.current);\n\t\t\t}\n\t\t};\n\t}, []);\n\n\tconst handleOptionsReorder = useCallback(\n\t\t(reorderedOptions: DropdownOption[]) => {\n\t\t\tsetLocalOptions(reorderedOptions);\n\t\t\t// For version 2.0 (no Apply button), apply reorder immediately\n\t\t\tif (version === '2.0') {\n\t\t\t\tonOptionsReorder?.(reorderedOptions);\n\t\t\t} else {\n\t\t\t\t// For version 1.0, defer until Apply/close (handled by unmount cleanup)\n\t\t\t\thasReorderedRef.current = true;\n\t\t\t}\n\t\t},\n\t\t[onOptionsReorder, version],\n\t);\n\n\tconst optionsToUse = isDraggable ? localOptions : options;\n\tconst {\n\t\tdropdownOptions,\n\t\tsearch,\n\t\tsearchedString,\n\t\tsearchedOptions,\n\t\tsearchError,\n\t\tretrySearch,\n\t\tonApplyHandler,\n\t\tselectAllHandler,\n\t\tonMultiSelectClear,\n\t\tonFreeFormSelect,\n\t\tonMultiSelectApply,\n\t\tlatestDropdownOptionsRef,\n\t\tgetSelectedOptions,\n\t\tgetCurrentSelectionCount,\n\t} = useDropdown(\n\t\tversion,\n\t\toptionsToUse,\n\t\tonSelect,\n\t\tskipSorting || isDraggable,\n\t\tisMultiSelect,\n\t\tonSearch,\n\t\tdisableSearchOptions,\n\t\tdisableSearchedOptionExcept,\n\t\tmaxSelections,\n\t);\n\tconst [widthState, setWidthState] = useState(width ?? defaults.width);\n\tconst [descriptionInfo, setDescription] = useState<{\n\t\ttitle: string;\n\t\tdescription: string;\n\t} | null>(null);\n\tconst [focusedIndex, setFocusedIndex] = useState<number>(-1);\n\tconst ref = useRef<HTMLDivElement>(null);\n\tconst childRefs = useRef([]);\n\tconst menuListRef = useRef<HTMLDivElement>(null);\n\tuseOutside(\n\t\tref,\n\t\t() => {\n\t\t\tsetDescription(null);\n\t\t\tif (isMultiSelect && version === '2.0') {\n\t\t\t\tconst optionsToSend = getSelectedOptions(\n\t\t\t\t\tlatestDropdownOptionsRef.current,\n\t\t\t\t);\n\t\t\t\tonClose?.(optionsToSend);\n\t\t\t} else {\n\t\t\t\tonClose?.(dropdownOptions);\n\t\t\t}\n\t\t},\n\t\t[headerRef, childRefs],\n\t);\n\n\t// Auto-focus dropdown when it opens for keyboard navigation while preventing scroll to maintain popper positioning\n\tuseEffect(() => {\n\t\tconst timer = setTimeout(() => {\n\t\t\tif (ref.current) {\n\t\t\t\tref.current.focus({ preventScroll: true });\n\t\t\t}\n\t\t}, 0);\n\t\treturn () => clearTimeout(timer);\n\t}, []);\n\n\t// Get flattened selectable options\n\tconst getFlattenedOptions = (opts: DropdownOption[]): SingleOption[] => {\n\t\tconst flattened: SingleOption[] = [];\n\t\topts.forEach((option) => {\n\t\t\tif ((option as GroupedOption).options) {\n\t\t\t\tconst groupedOption = option as GroupedOption;\n\t\t\t\tgroupedOption.options.forEach((nestedOption) => {\n\t\t\t\t\tif (!nestedOption.disabled) {\n\t\t\t\t\t\tflattened.push(nestedOption);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tconst singleOption = option as SingleOption;\n\t\t\t\tif (!singleOption.disabled) {\n\t\t\t\t\tflattened.push(singleOption);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn flattened;\n\t};\n\n\t/** Keyboard navigation handler */\n\tuseEffect(() => {\n\t\tconst handleKeyDown = (e: KeyboardEvent) => {\n\t\t\tconst currentOptions =\n\t\t\t\tsearchedString && onSearch ? searchedOptions : dropdownOptions;\n\t\t\tconst flattenedOptions = getFlattenedOptions(currentOptions);\n\n\t\t\tif (flattenedOptions.length === 0) return;\n\n\t\t\tif (e.key === 'ArrowDown') {\n\t\t\t\te.preventDefault();\n\t\t\t\tsetFocusedIndex((prev) => {\n\t\t\t\t\tconst newIndex = prev < flattenedOptions.length - 1 ? prev + 1 : 0;\n\t\t\t\t\t// Scroll to the focused item\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tconst focusedElement = menuListRef.current?.querySelector(\n\t\t\t\t\t\t\t`[data-option-index=\"${newIndex}\"]`,\n\t\t\t\t\t\t) as HTMLElement;\n\t\t\t\t\t\tif (focusedElement) {\n\t\t\t\t\t\t\tfocusedElement.scrollIntoView({\n\t\t\t\t\t\t\t\tblock: 'nearest',\n\t\t\t\t\t\t\t\tbehavior: 'smooth',\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}, 0);\n\t\t\t\t\treturn newIndex;\n\t\t\t\t});\n\t\t\t} else if (e.key === 'ArrowUp') {\n\t\t\t\te.preventDefault();\n\t\t\t\tsetFocusedIndex((prev) => {\n\t\t\t\t\tconst newIndex = prev > 0 ? prev - 1 : flattenedOptions.length - 1;\n\t\t\t\t\t// Scroll to the focused item\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tconst focusedElement = menuListRef.current?.querySelector(\n\t\t\t\t\t\t\t`[data-option-index=\"${newIndex}\"]`,\n\t\t\t\t\t\t) as HTMLElement;\n\t\t\t\t\t\tif (focusedElement) {\n\t\t\t\t\t\t\tfocusedElement.scrollIntoView({\n\t\t\t\t\t\t\t\tblock: 'nearest',\n\t\t\t\t\t\t\t\tbehavior: 'smooth',\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}, 0);\n\t\t\t\t\treturn newIndex;\n\t\t\t\t});\n\t\t\t} else if (e.key === 'Enter' && focusedIndex >= 0) {\n\t\t\t\te.preventDefault();\n\t\t\t\tconst focusedOption = flattenedOptions[focusedIndex];\n\t\t\t\tif (focusedOption) {\n\t\t\t\t\t// onApplyHandler handles the selection state and calls onSelect internally\n\t\t\t\t\tonApplyHandler({\n\t\t\t\t\t\t...focusedOption,\n\t\t\t\t\t\tselected: !focusedOption.selected,\n\t\t\t\t\t});\n\t\t\t\t\t// Also trigger onDropdownItemClick if provided\n\t\t\t\t\tif (onDropdownItemClick) {\n\t\t\t\t\t\tonDropdownItemClick(focusedOption);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tconst dropdownElement = ref.current;\n\t\tif (dropdownElement) {\n\t\t\tdropdownElement.addEventListener('keydown', handleKeyDown);\n\t\t\treturn () => {\n\t\t\t\tdropdownElement.removeEventListener('keydown', handleKeyDown);\n\t\t\t};\n\t\t}\n\t}, [\n\t\tfocusedIndex,\n\t\tsearchedString,\n\t\tsearchedOptions,\n\t\tdropdownOptions,\n\t\tonSearch,\n\t\tonApplyHandler,\n\t\tonDropdownItemClick,\n\t]);\n\n\t// LOCAL CONSTANTS\n\tconst heightToUse = height ?? defaults.height;\n\tconst menuListMaxHeight =\n\t\ttypeof heightToUse === 'number'\n\t\t\t? isSearchable && isMultiSelect\n\t\t\t\t? heightToUse - 96\n\t\t\t\t: (isSearchable && !isMultiSelect) || (!isSearchable && isMultiSelect)\n\t\t\t\t? heightToUse - 48\n\t\t\t\t: heightToUse\n\t\t\t: heightToUse;\n\n\tfunction showDescription(title?: string, description?: string) {\n\t\tif (title && description) {\n\t\t\tsetDescription({\n\t\t\t\ttitle,\n\t\t\t\tdescription,\n\t\t\t});\n\t\t} else {\n\t\t\tsetDescription(null);\n\t\t}\n\t}\n\n\tuseEffect(() => {\n\t\tconst widthToUse = width ?? defaults.width;\n\t\tif (descriptionInfo === null) {\n\t\t\tsetWidthState(widthToUse);\n\t\t} else if (typeof widthToUse === 'number') {\n\t\t\tsetWidthState(widthToUse * 2);\n\t\t} else if (typeof widthToUse === 'string') {\n\t\t\tif (widthToUse.endsWith('px')) {\n\t\t\t\tconst newWidth = parseInt(widthToUse.replace('px', '')) * 2;\n\t\t\t\tsetWidthState(newWidth);\n\t\t\t}\n\t\t}\n\t}, [descriptionInfo]);\n\n\t/**\n\t * This is to show the search result in a stateless way\n\t */\n\n\tconst exactMatchFound: boolean[] = [];\n\n\tconst processOptionsWithMaxSelections = (\n\t\toptionsToProcess: DropdownOption[],\n\t) => {\n\t\tif (!isMultiSelect || (!maxSelections && maxSelections !== 0)) {\n\t\t\treturn optionsToProcess;\n\t\t}\n\n\t\t// Count from the full options list (not the filtered subset) so selections\n\t\t// hidden by a search query are still included in the limit check.\n\t\tconst currentSelectionCount = getCurrentSelectionCount(dropdownOptions);\n\t\tconst maxSelectionsReached = currentSelectionCount >= maxSelections;\n\n\t\tif (!maxSelectionsReached) {\n\t\t\treturn optionsToProcess;\n\t\t}\n\n\t\t// Disable unselected options when max selections is reached\n\t\treturn optionsToProcess.map((option) => {\n\t\t\tif ((option as GroupedOption).options) {\n\t\t\t\treturn {\n\t\t\t\t\t...option,\n\t\t\t\t\toptions: (option as GroupedOption).options.map((nestedOption) => ({\n\t\t\t\t\t\t...nestedOption,\n\t\t\t\t\t\tdisabled:\n\t\t\t\t\t\t\tnestedOption.disabled ||\n\t\t\t\t\t\t\t(!nestedOption.selected && maxSelectionsReached),\n\t\t\t\t\t})),\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tconst singleOption = option as SingleOption;\n\t\t\t\treturn {\n\t\t\t\t\t...singleOption,\n\t\t\t\t\tdisabled:\n\t\t\t\t\t\tsingleOption.disabled ||\n\t\t\t\t\t\t(!singleOption.selected && maxSelectionsReached),\n\t\t\t\t};\n\t\t\t}\n\t\t});\n\t};\n\n\tconst optionsToShow = processOptionsWithMaxSelections(\n\t\t(searchedString && onSearch ? searchedOptions : dropdownOptions)\n\t\t\t.map((option) => {\n\t\t\t\tif (searchedString && !onSearch) {\n\t\t\t\t\tif ((option as GroupedOption).options) {\n\t\t\t\t\t\tconst groupedOption = { ...option } as GroupedOption;\n\t\t\t\t\t\tgroupedOption.options = groupedOption.options.filter((op) => {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\top.label?.toLowerCase().includes(searchedString.toLowerCase())\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\texactMatchFound.push(\n\t\t\t\t\t\t\t\t\t!searchedString || op.label === searchedString,\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\treturn groupedOption.options.length > 0 ? groupedOption : null;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\toption.label\n\t\t\t\t\t\t\t\t?.toLowerCase()\n\t\t\t\t\t\t\t\t.includes(searchedString.toLowerCase()) ||\n\t\t\t\t\t\t\t(option as SingleOption | MultiSelectOption).searchKey\n\t\t\t\t\t\t\t\t?.toLowerCase()\n\t\t\t\t\t\t\t\t.includes(searchedString.toLowerCase())\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\texactMatchFound.push(\n\t\t\t\t\t\t\t\t!searchedString || option.label === searchedString,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\treturn option;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn option;\n\t\t\t})\n\t\t\t.filter((option) => option !== null) as DropdownOption[],\n\t);\n\n\tconst noResultForSearch =\n\t\t!!isSearchable && searchedString && optionsToShow.length === 0;\n\tconst showLoadingState = !searchedString && !!isOptionsLoading;\n\tconst showErrorState =\n\t\t!searchedString && !!optionsErrorState && !showLoadingState;\n\tconst showEmptyState =\n\t\t!searchedString &&\n\t\t!optionsToShow.length &&\n\t\t!showLoadingState &&\n\t\t!showErrorState;\n\tconst showTopLevelZeroState =\n\t\tshowLoadingState || showErrorState || showEmptyState;\n\n\tconst emptyStateTitle = zeroState?.title || 'No results found';\n\tconst emptyStateSubTitle =\n\t\tzeroState?.subTitle ||\n\t\t`Please try again later or contact us at support@bik.ai if you require further assistance.`;\n\tconst errorStateTitle = optionsErrorState?.title || 'Failed to load options';\n\tconst errorStateSubTitle =\n\t\toptionsErrorState?.subTitle ||\n\t\t'Something went wrong while fetching the list. Please try again';\n\tconst defaultErrorActionButton = {\n\t\tbuttonText: 'Try again',\n\t\tbuttonType: 'text' as const,\n\t\tsize: 'small' as const,\n\t\tbuttonTextColor: COLORS.background.inverseLight,\n\t\tcustomIconColor: COLORS.background.inverseLight,\n\t\tLeadingIcon: RetryIcon,\n\t};\n\n\tconst mergedErrorState = {\n\t\tIconHolderStyle: {\n\t\t\tbackground: COLORS.background.negative.light,\n\t\t},\n\t\tIcon: (\n\t\t\t<ErrorInfoIcon color={COLORS.content.negative} width={24} height={24} />\n\t\t),\n\t\t...optionsErrorState,\n\t};\n\tmergedErrorState.actionButton = {\n\t\t...defaultErrorActionButton,\n\t\t...(optionsErrorState?.actionButton ?? {}),\n\t};\n\tconst zeroStateProps = showLoadingState\n\t\t? undefined\n\t\t: showErrorState\n\t\t? mergedErrorState\n\t\t: zeroState;\n\n\treturn (\n\t\t<OpennedDropdownContainer\n\t\t\tversion={version}\n\t\t\tref={ref}\n\t\t\ttabIndex={-1}\n\t\t\tstyle={{\n\t\t\t\t// maxWidth: descriptionInfo ? 800 : 400,\n\t\t\t\twidth: widthState,\n\t\t\t\t...containerStyle,\n\t\t\t\toutline: 'none',\n\t\t\t}}\n\t\t>\n\t\t\t<div\n\t\t\t\tstyle={{\n\t\t\t\t\twidth: descriptionInfo ? '50%' : '100%',\n\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\tflexDirection: 'column',\n\t\t\t\t\tbackground: 'white',\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{!!isSearchable && <SearchBox onSearch={search} version={version} />}\n\n\t\t\t\t{showTopLevelZeroState ? (\n\t\t\t\t\t<div\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\theight: heightToUse,\n\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\tbackground: COLORS.background.base,\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<ZeroState\n\t\t\t\t\t\t\t{...(zeroStateProps ?? {})}\n\t\t\t\t\t\t\tisLoading={showLoadingState}\n\t\t\t\t\t\t\ttitle={showErrorState ? errorStateTitle : emptyStateTitle}\n\t\t\t\t\t\t\tsubTitle={\n\t\t\t\t\t\t\t\tshowErrorState ? errorStateSubTitle : emptyStateSubTitle\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t) : (\n\t\t\t\t\t<MenuListContainer\n\t\t\t\t\t\tminHeight={heightToUse}\n\t\t\t\t\t\tmaxHeight={menuListMaxHeight}\n\t\t\t\t\t\tref={menuListRef}\n\t\t\t\t\t>\n\t\t\t\t\t\t{!!isMultiSelect && !noResultForSearch && !hideSelectAll && (\n\t\t\t\t\t\t\t<SelectAllMenu\n\t\t\t\t\t\t\t\tversion={version}\n\t\t\t\t\t\t\t\toptions={\n\t\t\t\t\t\t\t\t\tsearchedString && onSearch ? searchedOptions : dropdownOptions\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonSelect={selectAllHandler}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{!allowFreeForm && noResultForSearch && (\n\t\t\t\t\t\t\t<SearchZeroState\n\t\t\t\t\t\t\t\tisLoading={isSearchLoading}\n\t\t\t\t\t\t\t\terrorMessage={searchError}\n\t\t\t\t\t\t\t\tonRetry={retrySearch}\n\t\t\t\t\t\t\t\theight={menuListMaxHeight as number}\n\t\t\t\t\t\t\t\tsearchedString={searchedString}\n\t\t\t\t\t\t\t\tcontainerWidth={width}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{allowFreeForm &&\n\t\t\t\t\t\t\t(noResultForSearch ||\n\t\t\t\t\t\t\t\t(!!exactMatchFound.length &&\n\t\t\t\t\t\t\t\t\texactMatchFound.every((val) => val === false))) && (\n\t\t\t\t\t\t\t\t<FreeFormMenu\n\t\t\t\t\t\t\t\t\tversion={version}\n\t\t\t\t\t\t\t\t\tisMultiSelect={isMultiSelect}\n\t\t\t\t\t\t\t\t\tonSelect={onFreeFormSelect}\n\t\t\t\t\t\t\t\t\tsearchedString={searchedString}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t<MenuList\n\t\t\t\t\t\t\tonInfiniteScroll={onInfiniteScroll}\n\t\t\t\t\t\t\tonDropdownItemClick={onDropdownItemClick}\n\t\t\t\t\t\t\tversion={version}\n\t\t\t\t\t\t\tonSelect={onApplyHandler}\n\t\t\t\t\t\t\tshowDescription={showDescription}\n\t\t\t\t\t\t\tisMultiSelect={isMultiSelect}\n\t\t\t\t\t\t\toptions={optionsToShow}\n\t\t\t\t\t\t\tuseDefaultCursor={useDefaultCursor}\n\t\t\t\t\t\t\tref={childRefs}\n\t\t\t\t\t\t\tfocusedIndex={focusedIndex}\n\t\t\t\t\t\t\tisDraggable={isDraggable}\n\t\t\t\t\t\t\tonOptionsReorder={handleOptionsReorder}\n\t\t\t\t\t\t\tshowCheckboxForCustomElement={showCheckboxForCustomElement}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</MenuListContainer>\n\t\t\t\t)}\n\t\t\t\t{!!isMultiSelect && !showTopLevelZeroState && version !== '2.0' && (\n\t\t\t\t\t<MultiSelectDropdownBottomBar\n\t\t\t\t\t\tonClear={() => {\n\t\t\t\t\t\t\tonMultiSelectClear();\n\t\t\t\t\t\t\tonMultiSelectClearProp?.();\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tonApply={onMultiSelectApply}\n\t\t\t\t\t\tlist={\n\t\t\t\t\t\t\tsearchedString && onSearch ? searchedOptions : dropdownOptions\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbuttonText={primaryButtonText}\n\t\t\t\t\t\tbuttonOptions={buttonOptions}\n\t\t\t\t\t\thideClearButton={hideClearButton}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t\t{!!descriptionInfo && (\n\t\t\t\t<Description\n\t\t\t\t\ttitle={descriptionInfo.title}\n\t\t\t\t\tdescription={descriptionInfo.description}\n\t\t\t\t\tversion={version}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</OpennedDropdownContainer>\n\t);\n};\n"],"names":["defaults","_ref","options","isSearchable","isMultiSelect","maxSelections","width","allowFreeForm","height","onClose","onSelect","onSearch","version","skipSorting","headerRef","hideSelectAll","primaryButtonText","onInfiniteScroll","onMultiSelectClear","onMultiSelectClearProp","onDropdownItemClick","buttonOptions","isSearchLoading","isOptionsLoading","optionsErrorState","disableSearchOptions","disableSearchedOptionExcept","useDefaultCursor","containerStyle","zeroState","isDraggable","onOptionsReorder","hideClearButton","showCheckboxForCustomElement","sortOptionsWithSelectedOnTop","useCallback","opts","selected","unselected","forEach","option","push","localOptions","setLocalOptions","useState","localOptionsRef","useRef","hasReorderedRef","onOptionsReorderRef","useEffect","current","handleOptionsReorder","reorderedOptions","optionsToUse","dropdownOptions","search","searchedString","searchedOptions","searchError","retrySearch","onApplyHandler","selectAllHandler","onFreeFormSelect","onMultiSelectApply","latestDropdownOptionsRef","getSelectedOptions","getCurrentSelectionCount","useDropdown","widthState","setWidthState","descriptionInfo","setDescription","focusedIndex","setFocusedIndex","ref","childRefs","menuListRef","useOutside","optionsToSend","timer","setTimeout","focus","preventScroll","clearTimeout","handleKeyDown","e","flattenedOptions","flattened","nestedOption","disabled","singleOption","getFlattenedOptions","length","key","preventDefault","prev","newIndex","focusedElement","_a","querySelector","scrollIntoView","block","behavior","focusedOption","Object","assign","dropdownElement","addEventListener","removeEventListener","heightToUse","menuListMaxHeight","widthToUse","endsWith","newWidth","parseInt","replace","exactMatchFound","optionsToShow","optionsToProcess","maxSelectionsReached","map","processOptionsWithMaxSelections","groupedOption","filter","op","label","toLowerCase","includes","_b","searchKey","noResultForSearch","showLoadingState","showErrorState","showEmptyState","showTopLevelZeroState","emptyStateTitle","title","emptyStateSubTitle","subTitle","errorStateTitle","errorStateSubTitle","defaultErrorActionButton","buttonText","buttonType","size","buttonTextColor","COLORS","background","inverseLight","customIconColor","LeadingIcon","RetryIcon","mergedErrorState","IconHolderStyle","negative","light","Icon","_jsx","jsx","ErrorInfoIcon","color","content","actionButton","zeroStateProps","undefined","_jsxs","OpennedDropdownContainer","tabIndex","style","outline","children","jsxs","display","flexDirection","SearchBox","base","ZeroState","isLoading","MenuListContainer","minHeight","maxHeight","SelectAllMenu","SearchZeroState","errorMessage","onRetry","containerWidth","every","val","FreeFormMenu","MenuList","showDescription","description","MultiSelectDropdownBottomBar","onClear","onApply","list","Description"],"mappings":"ouBA2BA,MAAMA,EACG,IADHA,EAEE,2BAGmDC,IAgCtD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AAgB,IAARA,MAChC9B,EAAAA,IAAC+B,EAAAA,aAAY,CACZhL,QAASA,EACTR,cAAeA,EACfM,SAAUoD,GACVN,eAAgBA,KAInBqG,EAACC,IAAA+B,WACA,CAAA5K,iBAAkBA,EAClBG,oBAAqBA,EACrBR,QAASA,EACTF,SAAUkD,GACVkI,gBAvPN,SAAyBtD,EAAgBuD,GAEvCxH,GADGiE,GAASuD,EACG,CACdvD,QACAuD,eAGc,KAEjB,EA+OM3L,cAAeA,EACfF,QAASmH,GACT1F,iBAAkBA,EAClB+C,IAAKC,GACLH,aAAcA,GACd1C,YAAaA,EACbC,iBAAkBoB,GAClBlB,6BAA8BA,UAI9B7B,IAAkBkI,IAAqC,QAAZ1H,GAC7CiJ,EAACC,IAAAkC,UACA,CAAAC,QAASA,KACR/K,KACAC,SAAAA,GAA0B,EAE3B+K,QAASnI,GACToI,KACC3I,IAAkB7C,EAAW8C,GAAkBH,GAEhDwF,WAAY9H,EACZK,cAAeA,EACfW,gBAAiBA,UAIjBsC,IACFuF,EAAAA,IAACuC,EAAAA,YAAW,CACX5D,MAAOlE,GAAgBkE,MACvBuD,YAAazH,GAAgByH,YAC7BnL,QAASA,OAGe"}
@@ -1,22 +1,21 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),o=require("../../../../constants/Theme.js");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=r(e);const i=t.default.div`
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),r=require("../../../../constants/Theme.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=o(e);const i=t.default.div`
2
2
  border-radius: ${e=>"2.0"===e.version?8:4}px;
3
- border: ${e=>"2.0"===e.version||"3.0"===e.version?0:1}px
4
- solid ${o.COLORS.stroke.primary};
5
- box-shadow: ${e=>"3.0"===e.version?"0px 2px 8px 0px rgba(0, 0, 0, 0.12)":"none"};
3
+ border: ${e=>"2.0"===e.version?0:1}px solid
4
+ ${r.COLORS.stroke.primary};
6
5
  max-height: 480px;
7
6
  overflow: hidden;
8
7
  display: flex;
9
8
  flex-direction: row;
10
9
  position: relative;
11
10
  padding: ${e=>"2.0"===e.version?4:0}px;
12
- background-color: ${o.COLORS.surface.standard};
11
+ background-color: ${r.COLORS.surface.standard};
13
12
  `;t.default.div`
14
13
  padding: 14px 16px 14px 18px;
15
14
  flex-direction: row;
16
15
  align-items: center;
17
16
  border-bottom-width: 1px;
18
17
  border-bottom-style: solid;
19
- border-bottom-color: ${o.COLORS.stroke.primary};
18
+ border-bottom-color: ${r.COLORS.stroke.primary};
20
19
  width: 100%;
21
20
  height: 100%;
22
21
  `;const d=t.default.div`
@@ -1 +1 @@
1
- {"version":3,"file":"OpennedDropdown.styled.js","sources":["../../../../../../src/components/dropdown/OpenedDropdown/components/OpennedDropdown.styled.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { COLORS } from '@src/constants/Theme';\n\nexport const OpennedDropdownContainer = styled.div<{\n\tversion?: '1.0' | '2.0' | '3.0';\n}>`\n\tborder-radius: ${(props) => (props.version === '2.0' ? 8 : 4)}px;\n\tborder: ${(props) =>\n\t\t\tprops.version === '2.0' || props.version === '3.0' ? 0 : 1}px\n\t\tsolid ${COLORS.stroke.primary};\n\tbox-shadow: ${(props) =>\n\t\tprops.version === '3.0' ? '0px 2px 8px 0px rgba(0, 0, 0, 0.12)' : 'none'};\n\tmax-height: 480px;\n\toverflow: hidden;\n\tdisplay: flex;\n\tflex-direction: row;\n\tposition: relative;\n\tpadding: ${(props) => (props.version === '2.0' ? 4 : 0)}px;\n\tbackground-color: ${COLORS.surface.standard};\n`;\n\nexport const ItemContainer = styled.div`\n\tpadding: 14px 16px 14px 18px;\n\tflex-direction: row;\n\talign-items: center;\n\tborder-bottom-width: 1px;\n\tborder-bottom-style: solid;\n\tborder-bottom-color: ${COLORS.stroke.primary};\n\twidth: 100%;\n\theight: 100%;\n`;\n\nexport const MenuListContainer = styled.div<{\n\tmaxHeight: number | string;\n\tminHeight: number | string;\n}>`\n\tmax-height: ${(props) =>\n\t\ttypeof props.maxHeight === 'number'\n\t\t\t? `${props.maxHeight}px`\n\t\t\t: props.maxHeight};\n\toverflow-y: auto;\n\tposition: relative;\n\t&::-webkit-scrollbar-thumb {\n\t\tbackground: #e0e0e0;\n\t\tborder-radius: 8px;\n\t}\n\t&::-webkit-scrollbar {\n\t\theight: 5px;\n\t\tdisplay: block;\n\t\twidth: 8px;\n\t}\n\t&::-webkit-scrollbar-thumb:horizontal {\n\t\twidth: 8px;\n\t}\n`;\n"],"names":["OpennedDropdownContainer","styled","div","props","version","COLORS","stroke","primary","surface","standard","MenuListContainer","maxHeight"],"mappings":"sOAGaA,MAAAA,EAA2BC,EAAM,QAACC,GAE7C;kBACiBC,GAA6B,QAAlBA,EAAMC,QAAoB,EAAI;WAChDD,GACS,QAAlBA,EAAMC,SAAuC,QAAlBD,EAAMC,QAAoB,EAAI;UAClDC,EAAMA,OAACC,OAAOC;eACRJ,GACI,QAAlBA,EAAMC,QAAoB,sCAAwC;;;;;;YAMvDD,GAA6B,QAAlBA,EAAMC,QAAoB,EAAI;qBACjCC,EAAMA,OAACG,QAAQC;EAGPR,EAAM,QAACC,GAAG;;;;;;wBAMfG,EAAMA,OAACC,OAAOC;;;EAKzBG,MAAAA,EAAoBT,EAAM,QAACC,GAGtC;eACcC,GACa,iBAApBA,EAAMQ,UACV,GAAGR,EAAMQ,cACTR,EAAMQ;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"OpennedDropdown.styled.js","sources":["../../../../../../src/components/dropdown/OpenedDropdown/components/OpennedDropdown.styled.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { COLORS } from '@src/constants/Theme';\n\nexport const OpennedDropdownContainer = styled.div<{ version?: '1.0' | '2.0' }>`\n\tborder-radius: ${(props) => (props.version === '2.0' ? 8 : 4)}px;\n\tborder: ${(props) => (props.version === '2.0' ? 0 : 1)}px solid\n\t\t${COLORS.stroke.primary};\n\tmax-height: 480px;\n\toverflow: hidden;\n\tdisplay: flex;\n\tflex-direction: row;\n\tposition: relative;\n\tpadding: ${(props) => (props.version === '2.0' ? 4 : 0)}px;\n\tbackground-color: ${COLORS.surface.standard};\n`;\n\nexport const ItemContainer = styled.div`\n\tpadding: 14px 16px 14px 18px;\n\tflex-direction: row;\n\talign-items: center;\n\tborder-bottom-width: 1px;\n\tborder-bottom-style: solid;\n\tborder-bottom-color: ${COLORS.stroke.primary};\n\twidth: 100%;\n\theight: 100%;\n`;\n\nexport const MenuListContainer = styled.div<{\n\tmaxHeight: number | string;\n\tminHeight: number | string;\n}>`\n\tmax-height: ${(props) =>\n\t\ttypeof props.maxHeight === 'number'\n\t\t\t? `${props.maxHeight}px`\n\t\t\t: props.maxHeight};\n\toverflow-y: auto;\n\tposition: relative;\n\t&::-webkit-scrollbar-thumb {\n\t\tbackground: #e0e0e0;\n\t\tborder-radius: 8px;\n\t}\n\t&::-webkit-scrollbar {\n\t\theight: 5px;\n\t\tdisplay: block;\n\t\twidth: 8px;\n\t}\n\t&::-webkit-scrollbar-thumb:horizontal {\n\t\twidth: 8px;\n\t}\n`;\n"],"names":["OpennedDropdownContainer","styled","div","props","version","COLORS","stroke","primary","surface","standard","MenuListContainer","maxHeight"],"mappings":"sOAGaA,MAAAA,EAA2BC,EAAM,QAACC,GAAgC;kBAC5DC,GAA6B,QAAlBA,EAAMC,QAAoB,EAAI;WAChDD,GAA6B,QAAlBA,EAAMC,QAAoB,EAAI;IACjDC,EAAMA,OAACC,OAAOC;;;;;;YAMLJ,GAA6B,QAAlBA,EAAMC,QAAoB,EAAI;qBACjCC,EAAMA,OAACG,QAAQC;EAGPR,EAAM,QAACC,GAAG;;;;;;wBAMfG,EAAMA,OAACC,OAAOC;;;EAKzBG,MAAAA,EAAoBT,EAAM,QAACC,GAGtC;eACcC,GACa,iBAApBA,EAAMQ,UACV,GAAGR,EAAMQ,cACTR,EAAMQ;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Description.js","sources":["../../../../../../../src/components/dropdown/OpenedDropdown/components/description/Description.tsx"],"sourcesContent":["import React from 'react';\nimport { BodySecondary, TitleRegular } from '@src/components/TypographyStyle';\nimport { COLORS } from '@src/constants/Theme';\nimport { DescriptionContainer } from './Description.styled';\n\nexport const Description: React.FC<{\n\ttitle: string;\n\tdescription: string;\n\tversion?: '1.0' | '2.0' | '3.0';\n}> = ({ title, description, version }) => {\n\treturn (\n\t\t<DescriptionContainer version={version}>\n\t\t\t<div style={{ padding: version === '2.0' ? 12 : 24 }}>\n\t\t\t\t<TitleRegular\n\t\t\t\t\tstyle={{ color: COLORS.content.primary, marginBottom: 4 }}\n\t\t\t\t>\n\t\t\t\t\t{title}\n\t\t\t\t</TitleRegular>\n\t\t\t\t<BodySecondary style={{ color: COLORS.content.secondary }}>\n\t\t\t\t\t{description}\n\t\t\t\t</BodySecondary>\n\t\t\t</div>\n\t\t</DescriptionContainer>\n\t);\n};\n"],"names":["_ref","title","description","version","_jsx","DescriptionContainer","Object","assign","children","_jsxs","jsxs","style","padding","jsx","TitleRegular","color","COLORS","content","primary","marginBottom","BodySecondary","secondary"],"mappings":"2PASKA,IAAoC,IAAnCC,MAAEA,EAAKC,YAAEA,EAAWC,QAAEA,GAASH,EACpC,OACCI,MAACC,EAAAA,qBAAoBC,OAAAC,OAAA,CAACJ,QAASA,GAC9B,CAAAK,SAAAC,EAAAC,KAAA,MAAAJ,OAAAC,OAAA,CAAKI,MAAO,CAAEC,QAAqB,QAAZT,EAAoB,GAAK,KAAI,CAAAK,SAAA,CACnDJ,EAACS,IAAAC,eACAR,OAAAC,OAAA,CAAAI,MAAO,CAAEI,MAAOC,EAAAA,OAAOC,QAAQC,QAASC,aAAc,IAErD,CAAAX,SAAAP,KAEFG,MAACgB,gBAAad,OAAAC,OAAA,CAACI,MAAO,CAAEI,MAAOC,EAAAA,OAAOC,QAAQI,sBAC5CnB,WAGmB"}
1
+ {"version":3,"file":"Description.js","sources":["../../../../../../../src/components/dropdown/OpenedDropdown/components/description/Description.tsx"],"sourcesContent":["import React from 'react';\nimport { BodySecondary, TitleRegular } from '@src/components/TypographyStyle';\nimport { COLORS } from '@src/constants/Theme';\nimport { DescriptionContainer } from './Description.styled';\n\nexport const Description: React.FC<{\n\ttitle: string;\n\tdescription: string;\n\tversion?: '1.0' | '2.0';\n}> = ({ title, description, version }) => {\n\treturn (\n\t\t<DescriptionContainer version={version}>\n\t\t\t<div style={{ padding: version === '2.0' ? 12 : 24 }}>\n\t\t\t\t<TitleRegular\n\t\t\t\t\tstyle={{ color: COLORS.content.primary, marginBottom: 4 }}\n\t\t\t\t>\n\t\t\t\t\t{title}\n\t\t\t\t</TitleRegular>\n\t\t\t\t<BodySecondary style={{ color: COLORS.content.secondary }}>\n\t\t\t\t\t{description}\n\t\t\t\t</BodySecondary>\n\t\t\t</div>\n\t\t</DescriptionContainer>\n\t);\n};\n"],"names":["_ref","title","description","version","_jsx","DescriptionContainer","Object","assign","children","_jsxs","jsxs","style","padding","jsx","TitleRegular","color","COLORS","content","primary","marginBottom","BodySecondary","secondary"],"mappings":"2PASKA,IAAoC,IAAnCC,MAAEA,EAAKC,YAAEA,EAAWC,QAAEA,GAASH,EACpC,OACCI,MAACC,EAAAA,qBAAoBC,OAAAC,OAAA,CAACJ,QAASA,GAC9B,CAAAK,SAAAC,EAAAC,KAAA,MAAAJ,OAAAC,OAAA,CAAKI,MAAO,CAAEC,QAAqB,QAAZT,EAAoB,GAAK,KAAI,CAAAK,SAAA,CACnDJ,EAACS,IAAAC,eACAR,OAAAC,OAAA,CAAAI,MAAO,CAAEI,MAAOC,EAAAA,OAAOC,QAAQC,QAASC,aAAc,IAErD,CAAAX,SAAAP,KAEFG,MAACgB,gBAAad,OAAAC,OAAA,CAACI,MAAO,CAAEI,MAAOC,EAAAA,OAAOC,QAAQI,sBAC5CnB,WAGmB"}
@@ -1 +1 @@
1
- {"version":3,"file":"Description.styled.js","sources":["../../../../../../../src/components/dropdown/OpenedDropdown/components/description/Description.styled.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { COLORS } from '@src/constants/Theme';\n\nexport const DescriptionContainer = styled.div<{\n\tversion?: '1.0' | '2.0' | '3.0';\n}>`\n\tbackground: ${COLORS.surface.standard};\n\tborder-left: ${(props) => (props.version === '2.0' ? 0.5 : 1)}px solid\n\t\t${COLORS.stroke.primary};\n\twidth: 50%;\n`;\n"],"names":["DescriptionContainer","div","COLORS","surface","standard","props","version","stroke","primary"],"mappings":"8NAGaA,MAAAA,OAA6B,QAACC,GAEzC;eACaC,EAAMA,OAACC,QAAQC;gBACbC,GAA6B,QAAlBA,EAAMC,QAAoB,GAAM;IACxDJ,EAAMA,OAACK,OAAOC;;"}
1
+ {"version":3,"file":"Description.styled.js","sources":["../../../../../../../src/components/dropdown/OpenedDropdown/components/description/Description.styled.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { COLORS } from '@src/constants/Theme';\n\nexport const DescriptionContainer = styled.div<{ version?: '1.0' | '2.0' }>`\n\tbackground: ${COLORS.surface.standard};\n\tborder-left: ${(props) => (props.version === '2.0' ? 0.5 : 1)}px solid\n\t\t${COLORS.stroke.primary};\n\twidth: 50%;\n`;\n"],"names":["DescriptionContainer","div","COLORS","surface","standard","props","version","stroke","primary"],"mappings":"8NAGaA,MAAAA,OAA6B,QAACC,GAAgC;eAC5DC,EAAMA,OAACC,QAAQC;gBACbC,GAA6B,QAAlBA,EAAMC,QAAoB,GAAM;IACxDJ,EAAMA,OAACK,OAAOC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"FreeFormMenu.js","sources":["../../../../../../../src/components/dropdown/OpenedDropdown/components/menu/FreeFormMenu.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { CheckBox } from '@src/components/checkBox';\nimport { ListItem } from '@src/components/list-item';\nimport { BodyCaption } from '@src/components/TypographyStyle';\nimport { COLORS } from '@src/constants/Theme';\nimport { FreeFormContainer } from './FreeFormMenu.styled';\n\nexport const FreeFormMenu: React.FC<{\n\tisMultiSelect?: boolean;\n\tsearchedString: string;\n\tonSelect: (isChecked: boolean) => void;\n\tversion?: '1.0' | '2.0' | '3.0';\n}> = ({ searchedString, onSelect, isMultiSelect, version }) => {\n\tconst [isChecked, setChecked] = useState(false);\n\tfunction onCheckHandler() {\n\t\tsetChecked(!isChecked);\n\t\tonSelect(!isChecked);\n\t}\n\n\treturn (\n\t\t<ListItem\n\t\t\tversion={version}\n\t\t\tonClick={(e) => {\n\t\t\t\te.preventDefault();\n\t\t\t\tonCheckHandler();\n\t\t\t}}\n\t\t\tlistItem={{\n\t\t\t\tlabel: searchedString,\n\t\t\t\tvalue: searchedString,\n\t\t\t}}\n\t\t\tleadingIcon={\n\t\t\t\tisMultiSelect ? (\n\t\t\t\t\t<CheckBox\n\t\t\t\t\t\tsize={version === '2.0' ? 'SMALL' : 'DEFAULT'}\n\t\t\t\t\t\tisChecked={isChecked}\n\t\t\t\t\t\tonValueChange={onCheckHandler}\n\t\t\t\t\t/>\n\t\t\t\t) : (\n\t\t\t\t\t<></>\n\t\t\t\t)\n\t\t\t}\n\t\t\ttrailingIcon={\n\t\t\t\t<FreeFormContainer>\n\t\t\t\t\t<BodyCaption\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\tcolor: COLORS.content.secondary,\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tFreeform\n\t\t\t\t\t</BodyCaption>\n\t\t\t\t</FreeFormContainer>\n\t\t\t}\n\t\t/>\n\t);\n};\n"],"names":["_ref","searchedString","onSelect","isMultiSelect","version","isChecked","setChecked","useState","onCheckHandler","_jsx","ListItem","onClick","e","preventDefault","listItem","label","value","leadingIcon","jsx","CheckBox","size","onValueChange","trailingIcon","FreeFormContainer","BodyCaption","Object","assign","style","color","COLORS","content","secondary","children"],"mappings":"6WAYKA,IAAyD,IAAxDC,eAAEA,EAAcC,SAAEA,EAAQC,cAAEA,EAAaC,QAAEA,GAASJ,EACzD,MAAOK,EAAWC,GAAcC,EAAQA,UAAC,GACzC,SAASC,IACRF,GAAYD,GACZH,GAAUG,EACX,CAEA,OACCI,EAAAA,IAACC,EAAAA,SAAQ,CACRN,QAASA,EACTO,QAAUC,IACTA,EAAEC,iBACFL,GAAgB,EAEjBM,SAAU,CACTC,MAAOd,EACPe,MAAOf,GAERgB,YACCd,EACCM,EAACS,IAAAC,WACA,CAAAC,KAAkB,QAAZhB,EAAoB,QAAU,UACpCC,UAAWA,EACXgB,cAAeb,IAGhBC,EAAAA,mBAGFa,aACCb,EAACS,IAAAK,8BACAd,EAACS,IAAAM,cACAC,OAAAC,OAAA,CAAAC,MAAO,CACNC,MAAOC,EAAAA,OAAOC,QAAQC,YAIV,CAAAC,SAAA,iBAGf"}
1
+ {"version":3,"file":"FreeFormMenu.js","sources":["../../../../../../../src/components/dropdown/OpenedDropdown/components/menu/FreeFormMenu.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { CheckBox } from '@src/components/checkBox';\nimport { ListItem } from '@src/components/list-item';\nimport { BodyCaption } from '@src/components/TypographyStyle';\nimport { COLORS } from '@src/constants/Theme';\nimport { FreeFormContainer } from './FreeFormMenu.styled';\n\nexport const FreeFormMenu: React.FC<{\n\tisMultiSelect?: boolean;\n\tsearchedString: string;\n\tonSelect: (isChecked: boolean) => void;\n\tversion?: '1.0' | '2.0';\n}> = ({ searchedString, onSelect, isMultiSelect, version }) => {\n\tconst [isChecked, setChecked] = useState(false);\n\tfunction onCheckHandler() {\n\t\tsetChecked(!isChecked);\n\t\tonSelect(!isChecked);\n\t}\n\n\treturn (\n\t\t<ListItem\n\t\t\tversion={version}\n\t\t\tonClick={(e) => {\n\t\t\t\te.preventDefault();\n\t\t\t\tonCheckHandler();\n\t\t\t}}\n\t\t\tlistItem={{\n\t\t\t\tlabel: searchedString,\n\t\t\t\tvalue: searchedString,\n\t\t\t}}\n\t\t\tleadingIcon={\n\t\t\t\tisMultiSelect ? (\n\t\t\t\t\t<CheckBox\n\t\t\t\t\t\tsize={version === '2.0' ? 'SMALL' : 'DEFAULT'}\n\t\t\t\t\t\tisChecked={isChecked}\n\t\t\t\t\t\tonValueChange={onCheckHandler}\n\t\t\t\t\t/>\n\t\t\t\t) : (\n\t\t\t\t\t<></>\n\t\t\t\t)\n\t\t\t}\n\t\t\ttrailingIcon={\n\t\t\t\t<FreeFormContainer>\n\t\t\t\t\t<BodyCaption\n\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\tcolor: COLORS.content.secondary,\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\tFreeform\n\t\t\t\t\t</BodyCaption>\n\t\t\t\t</FreeFormContainer>\n\t\t\t}\n\t\t/>\n\t);\n};\n"],"names":["_ref","searchedString","onSelect","isMultiSelect","version","isChecked","setChecked","useState","onCheckHandler","_jsx","ListItem","onClick","e","preventDefault","listItem","label","value","leadingIcon","jsx","CheckBox","size","onValueChange","trailingIcon","FreeFormContainer","BodyCaption","Object","assign","style","color","COLORS","content","secondary","children"],"mappings":"6WAYKA,IAAyD,IAAxDC,eAAEA,EAAcC,SAAEA,EAAQC,cAAEA,EAAaC,QAAEA,GAASJ,EACzD,MAAOK,EAAWC,GAAcC,EAAQA,UAAC,GACzC,SAASC,IACRF,GAAYD,GACZH,GAAUG,EACX,CAEA,OACCI,EAAAA,IAACC,EAAAA,SAAQ,CACRN,QAASA,EACTO,QAAUC,IACTA,EAAEC,iBACFL,GAAgB,EAEjBM,SAAU,CACTC,MAAOd,EACPe,MAAOf,GAERgB,YACCd,EACCM,EAACS,IAAAC,WACA,CAAAC,KAAkB,QAAZhB,EAAoB,QAAU,UACpCC,UAAWA,EACXgB,cAAeb,IAGhBC,EAAAA,mBAGFa,aACCb,EAACS,IAAAK,8BACAd,EAACS,IAAAM,cACAC,OAAAC,OAAA,CAAAC,MAAO,CACNC,MAAOC,EAAAA,OAAOC,QAAQC,YAIV,CAAAC,SAAA,iBAGf"}
@@ -1,8 +1,8 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../../../../assets/icons/chevronRight.svg.js"),n=require("react"),r=require("styled-components"),o=require("../../../../checkBox/CheckBox.js"),i=require("../../../../list-item/ListItem.js"),s=require("../../../../tooltips/Tooltip.js"),a=require("../../../../TypographyStyle.js"),l=require("../../../../../constants/Theme.js"),d=require("./FreeFormMenu.styled.js");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=c(r);const p=u.default(i.ListItem)`
2
- padding: ${e=>"3.0"===e.version?"8px":"2.0"===e.version?"8px 12px":"14px 16px"} !important;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../../../../assets/icons/chevronRight.svg.js"),n=require("react"),r=require("styled-components"),o=require("../../../../checkBox/CheckBox.js"),i=require("../../../../list-item/ListItem.js"),s=require("../../../../tooltips/Tooltip.js"),a=require("../../../../TypographyStyle.js"),l=require("../../../../../constants/Theme.js"),d=require("./FreeFormMenu.styled.js");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=c(r);const g=u.default(i.ListItem)`
2
+ padding: ${e=>"2.0"===e.version?"8px 12px":"14px 16px"} !important;
3
3
  cursor: pointer;
4
4
  margin-top: ${e=>"2.0"===e.version?"2px":"0"};
5
- `,g=u.default.div`
5
+ `,p=u.default.div`
6
6
  box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.12);
7
7
  border-radius: ${e=>{let{version:t}=e;return"1.0"===t?"0":"8px"}};
8
8
  padding: ${e=>{let{version:t}=e;return"1.0"===t?"0":"4px"}};
@@ -28,17 +28,17 @@
28
28
  border-radius: 50%;
29
29
  background-color: ${l.COLORS.content.inactive};
30
30
  flex-shrink: 0;
31
- `,v=u.default.div`
31
+ `,j=u.default.div`
32
32
  display: flex;
33
33
  align-content: center;
34
34
  justify-content: center;
35
35
  gap: 8px;
36
- `,j=u.default.div`
37
- margin-right: -4px;
38
36
  `,m=u.default.div`
37
+ margin-right: -4px;
38
+ `,v=u.default.div`
39
39
  display: flex;
40
40
  align-items: center;
41
41
  flex-direction: column;
42
42
  flex: 1;
43
- `,b=t=>{let{onDragStart:n,onDragEnd:r}=t;return e.jsxs(x,Object.assign({draggable:!0,onDragStart:n,onDragEnd:r},{children:[e.jsx(h,{}),e.jsx(h,{}),e.jsx(h,{}),e.jsx(h,{}),e.jsx(h,{}),e.jsx(h,{})]}))},f=n.forwardRef(((r,i)=>{let{option:c,isMultiSelect:u,showDescription:x,onSelect:h,last:f,version:D,onDropdownItemClick:C,useDefaultCursor:O,isFocused:y=!1,dataIndex:I=-1,isDraggable:F=!1,onDragStart:E,onDragOver:S,onDrop:T,onDragEnd:k,isDraggedOver:L=!1,showCheckboxForCustomElement:w=!1}=r;var M,q;const[$,A]=n.useState(c.selected),B=(e,t)=>{if(!e.children){R(!e.selected);const n=t?Object.assign(Object.assign({},e),{parent:t}):e;null==C||C(n)}},R=e=>{c.disabled||h(Object.assign(Object.assign({},c),{selected:e}))},U=O?{cursor:"default"}:{};return e.jsx(e.Fragment,{children:e.jsx(s.Tooltip,Object.assign({body:"",tooltipContent:c.children?e.jsx("div",Object.assign({style:{backgroundColor:l.DEFAULT_THEME.colorsV2.surface.standard},ref:i,onMouseEnter:()=>A(!0),onMouseLeave:()=>A(!1)},{children:e.jsx(g,Object.assign({version:null!=D?D:"2.0"},{children:c.children.map((t=>{var n;return e.jsx(p,{version:D,style:"1.0"!==D&&(null!==(n=null==c?void 0:c.children)&&void 0!==n?n:[]).length-1?{borderBottom:0}:{},onClick:e=>{e.preventDefault(),B(t,c)},listItem:{value:t.value,label:t.label},subText:t.subText,leadingIcon:t.leadingIcon||void 0,customComponent:t.customComponent,trailingIcon:t.trailingIcon||void 0,variant:c.disabled?"inactive":t.selected?"selected":"default"},t.value)}))}))})):e.jsx(e.Fragment,{}),placement:"right-start",hideArrow:!0},{children:e.jsx(p,{version:D,style:f?Object.assign(Object.assign({borderBottom:0},U),L?{borderTop:`2px solid ${l.COLORS.content.brand}`,opacity:.5}:{}):Object.assign(Object.assign({},U),L?{borderTop:`2px solid ${l.COLORS.content.brand}`,opacity:.5}:{}),onClick:e=>{e.preventDefault(),B(c)},onMouseOver:()=>{c.description?x(c.label,c.description):x()},listItem:{value:c.value,label:c.label},subText:c.subText,"data-option-index":I,role:"option",id:`dropdown-option-${I}`,"aria-selected":!!c.selected,onDragOver:F?S:void 0,onDrop:F?T:void 0,leadingIcon:!u||w&&c.customComponent?F?e.jsxs(m,{children:[e.jsx(b,{onDragStart:E,onDragEnd:k}),c.leadingIcon&&e.jsx("div",{children:c.leadingIcon})]}):c.leadingIcon?e.jsx(e.Fragment,{children:c.leadingIcon}):void 0:e.jsxs(v,{children:[F&&e.jsx(b,{onDragStart:E,onDragEnd:k}),e.jsx(o.CheckBox,{size:"2.0"===D?"SMALL":"DEFAULT",isDisabled:null!==(M=c.disabled)&&void 0!==M&&M,isChecked:!!c.selected,onValueChange:R}),e.jsx(j,{children:c.leadingIcon})]}),customComponent:u&&w&&c.customComponent?e.jsxs(v,{children:[F&&e.jsx(b,{onDragStart:E,onDragEnd:k}),e.jsx(o.CheckBox,{size:"2.0"===D?"SMALL":"DEFAULT",isDisabled:null!==(q=c.disabled)&&void 0!==q&&q,isChecked:!!c.selected,onValueChange:R}),c.customComponent]}):c.customComponent,trailingIcon:c.isFreeForm?e.jsx(d.FreeFormContainer,{children:e.jsx(a.BodyCaption,Object.assign({style:{color:l.COLORS.content.secondary}},{children:"Freeform"}))}):c.children?e.jsx(t.default,{width:12,height:12}):c.trailingIcon?e.jsx(e.Fragment,{children:c.trailingIcon}):void 0,variant:c.disabled?"inactive":y||c.selected||!u&&$?"selected":"default"})}))})}));exports.MenuItem=f;
43
+ `,b=t=>{let{onDragStart:n,onDragEnd:r}=t;return e.jsxs(x,Object.assign({draggable:!0,onDragStart:n,onDragEnd:r},{children:[e.jsx(h,{}),e.jsx(h,{}),e.jsx(h,{}),e.jsx(h,{}),e.jsx(h,{}),e.jsx(h,{})]}))},f=n.forwardRef(((r,i)=>{let{option:c,isMultiSelect:u,showDescription:x,onSelect:h,last:f,version:D,onDropdownItemClick:C,useDefaultCursor:O,isFocused:y=!1,dataIndex:I=-1,isDraggable:F=!1,onDragStart:E,onDragOver:S,onDrop:T,onDragEnd:k,isDraggedOver:L=!1,showCheckboxForCustomElement:w=!1}=r;var M,q;const[$,A]=n.useState(c.selected),B=(e,t)=>{if(!e.children){R(!e.selected);const n=t?Object.assign(Object.assign({},e),{parent:t}):e;null==C||C(n)}},R=e=>{c.disabled||h(Object.assign(Object.assign({},c),{selected:e}))},U=O?{cursor:"default"}:{};return e.jsx(e.Fragment,{children:e.jsx(s.Tooltip,Object.assign({body:"",tooltipContent:c.children?e.jsx("div",Object.assign({style:{backgroundColor:l.DEFAULT_THEME.colorsV2.surface.standard},ref:i,onMouseEnter:()=>A(!0),onMouseLeave:()=>A(!1)},{children:e.jsx(p,Object.assign({version:null!=D?D:"2.0"},{children:c.children.map((t=>{var n;return e.jsx(g,{version:D,style:"1.0"!==D&&(null!==(n=null==c?void 0:c.children)&&void 0!==n?n:[]).length-1?{borderBottom:0}:{},onClick:e=>{e.preventDefault(),B(t,c)},listItem:{value:t.value,label:t.label},subText:t.subText,leadingIcon:t.leadingIcon||void 0,customComponent:t.customComponent,trailingIcon:t.trailingIcon||void 0,variant:c.disabled?"inactive":t.selected?"selected":"default"},t.value)}))}))})):e.jsx(e.Fragment,{}),placement:"right-start",hideArrow:!0},{children:e.jsx(g,{version:D,style:f?Object.assign(Object.assign({borderBottom:0},U),L?{borderTop:`2px solid ${l.COLORS.content.brand}`,opacity:.5}:{}):Object.assign(Object.assign({},U),L?{borderTop:`2px solid ${l.COLORS.content.brand}`,opacity:.5}:{}),onClick:e=>{e.preventDefault(),B(c)},onMouseOver:()=>{c.description?x(c.label,c.description):x()},listItem:{value:c.value,label:c.label},subText:c.subText,"data-option-index":I,role:"option",id:`dropdown-option-${I}`,"aria-selected":!!c.selected,onDragOver:F?S:void 0,onDrop:F?T:void 0,leadingIcon:!u||w&&c.customComponent?F?e.jsxs(v,{children:[e.jsx(b,{onDragStart:E,onDragEnd:k}),c.leadingIcon&&e.jsx("div",{children:c.leadingIcon})]}):c.leadingIcon?e.jsx(e.Fragment,{children:c.leadingIcon}):void 0:e.jsxs(j,{children:[F&&e.jsx(b,{onDragStart:E,onDragEnd:k}),e.jsx(o.CheckBox,{size:"2.0"===D?"SMALL":"DEFAULT",isDisabled:null!==(M=c.disabled)&&void 0!==M&&M,isChecked:!!c.selected,onValueChange:R}),e.jsx(m,{children:c.leadingIcon})]}),customComponent:u&&w&&c.customComponent?e.jsxs(j,{children:[F&&e.jsx(b,{onDragStart:E,onDragEnd:k}),e.jsx(o.CheckBox,{size:"2.0"===D?"SMALL":"DEFAULT",isDisabled:null!==(q=c.disabled)&&void 0!==q&&q,isChecked:!!c.selected,onValueChange:R}),c.customComponent]}):c.customComponent,trailingIcon:c.isFreeForm?e.jsx(d.FreeFormContainer,{children:e.jsx(a.BodyCaption,Object.assign({style:{color:l.COLORS.content.secondary}},{children:"Freeform"}))}):c.children?e.jsx(t.default,{width:12,height:12}):c.trailingIcon?e.jsx(e.Fragment,{children:c.trailingIcon}):void 0,variant:c.disabled?"inactive":y||c.selected||!u&&$?"selected":"default"})}))})}));exports.MenuItem=f;
44
44
  //# sourceMappingURL=MenuItem.js.map