@chayns-components/core 5.4.5-alpha.0 → 5.4.5

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 (472) hide show
  1. package/AGENTS.md +0 -12
  2. package/lib/cjs/components/accordion/Accordion.js +12 -107
  3. package/lib/cjs/components/accordion/Accordion.js.map +1 -1
  4. package/lib/cjs/components/accordion/Accordion.styles.js +3 -23
  5. package/lib/cjs/components/accordion/Accordion.styles.js.map +1 -1
  6. package/lib/cjs/components/accordion/accordion-body/AccordionBody.styles.js +1 -3
  7. package/lib/cjs/components/accordion/accordion-body/AccordionBody.styles.js.map +1 -1
  8. package/lib/cjs/components/accordion/accordion-group/AccordionGroup.js +19 -36
  9. package/lib/cjs/components/accordion/accordion-group/AccordionGroup.js.map +1 -1
  10. package/lib/cjs/components/accordion/accordion-head/AccordionHead.js +3 -6
  11. package/lib/cjs/components/accordion/accordion-head/AccordionHead.js.map +1 -1
  12. package/lib/cjs/components/accordion/accordion-head/AccordionHead.styles.js +0 -14
  13. package/lib/cjs/components/accordion/accordion-head/AccordionHead.styles.js.map +1 -1
  14. package/lib/cjs/components/amount-control/AmountControl.js +17 -31
  15. package/lib/cjs/components/amount-control/AmountControl.js.map +1 -1
  16. package/lib/cjs/components/amount-control/AmountControl.styles.js +2 -18
  17. package/lib/cjs/components/amount-control/AmountControl.styles.js.map +1 -1
  18. package/lib/cjs/components/button/Button.js +1 -5
  19. package/lib/cjs/components/button/Button.js.map +1 -1
  20. package/lib/cjs/components/button/Button.styles.js +0 -10
  21. package/lib/cjs/components/button/Button.styles.js.map +1 -1
  22. package/lib/cjs/components/button/Button.types.js.map +1 -1
  23. package/lib/cjs/components/checkbox/Checkbox.js +1 -5
  24. package/lib/cjs/components/checkbox/Checkbox.js.map +1 -1
  25. package/lib/cjs/components/checkbox/Checkbox.styles.js +2 -29
  26. package/lib/cjs/components/checkbox/Checkbox.styles.js.map +1 -1
  27. package/lib/cjs/components/color-scheme-provider/ColorSchemeProvider.js +2 -7
  28. package/lib/cjs/components/color-scheme-provider/ColorSchemeProvider.js.map +1 -1
  29. package/lib/cjs/components/color-scheme-provider/ColorSchemeProvider.styles.js +2 -8
  30. package/lib/cjs/components/color-scheme-provider/ColorSchemeProvider.styles.js.map +1 -1
  31. package/lib/cjs/components/combobox/ComboBox.js +26 -70
  32. package/lib/cjs/components/combobox/ComboBox.js.map +1 -1
  33. package/lib/cjs/components/combobox/ComboBox.styles.js +0 -11
  34. package/lib/cjs/components/combobox/ComboBox.styles.js.map +1 -1
  35. package/lib/cjs/components/combobox/ComboBox.types.js.map +1 -1
  36. package/lib/cjs/components/context-menu/ContextMenu.js +42 -146
  37. package/lib/cjs/components/context-menu/ContextMenu.js.map +1 -1
  38. package/lib/cjs/components/context-menu/ContextMenu.styles.js +0 -38
  39. package/lib/cjs/components/context-menu/ContextMenu.styles.js.map +1 -1
  40. package/lib/cjs/components/context-menu/ContextMenu.types.js.map +1 -1
  41. package/lib/cjs/components/context-menu/ContextMenu.utils.js +1 -27
  42. package/lib/cjs/components/context-menu/ContextMenu.utils.js.map +1 -1
  43. package/lib/cjs/components/context-menu/context-menu-content/ContextMenuContent.js +8 -3
  44. package/lib/cjs/components/context-menu/context-menu-content/ContextMenuContent.js.map +1 -1
  45. package/lib/cjs/components/dropdown-body-wrapper/DropdownBodyWrapper.js +8 -1
  46. package/lib/cjs/components/dropdown-body-wrapper/DropdownBodyWrapper.js.map +1 -1
  47. package/lib/cjs/components/file-input/FileInput.js +2 -4
  48. package/lib/cjs/components/file-input/FileInput.js.map +1 -1
  49. package/lib/cjs/components/file-list/file-item/FileItem.js +25 -48
  50. package/lib/cjs/components/file-list/file-item/FileItem.js.map +1 -1
  51. package/lib/cjs/components/file-list/file-item/FileItem.styles.js +1 -25
  52. package/lib/cjs/components/file-list/file-item/FileItem.styles.js.map +1 -1
  53. package/lib/cjs/components/file-select/FileSelect.js +4 -27
  54. package/lib/cjs/components/file-select/FileSelect.js.map +1 -1
  55. package/lib/cjs/components/file-select/FileSelect.styles.js +0 -10
  56. package/lib/cjs/components/file-select/FileSelect.styles.js.map +1 -1
  57. package/lib/cjs/components/filter/Filter.js +16 -51
  58. package/lib/cjs/components/filter/Filter.js.map +1 -1
  59. package/lib/cjs/components/filter/Filter.styles.js +0 -9
  60. package/lib/cjs/components/filter/Filter.styles.js.map +1 -1
  61. package/lib/cjs/components/filter/filter-content/FilterContent.js +5 -14
  62. package/lib/cjs/components/filter/filter-content/FilterContent.js.map +1 -1
  63. package/lib/cjs/components/filter/filter-content/FilterContent.types.js.map +1 -1
  64. package/lib/cjs/components/filter-buttons/FilterButtons.js +4 -69
  65. package/lib/cjs/components/filter-buttons/FilterButtons.js.map +1 -1
  66. package/lib/cjs/components/filter-buttons/filter-button/FilterButton.js +2 -40
  67. package/lib/cjs/components/filter-buttons/filter-button/FilterButton.js.map +1 -1
  68. package/lib/cjs/components/filter-buttons/filter-button/FilterButton.styles.js +0 -11
  69. package/lib/cjs/components/filter-buttons/filter-button/FilterButton.styles.js.map +1 -1
  70. package/lib/cjs/components/grid-image/GridImage.js +2 -20
  71. package/lib/cjs/components/grid-image/GridImage.js.map +1 -1
  72. package/lib/cjs/components/grid-image/GridImage.styles.js +2 -11
  73. package/lib/cjs/components/grid-image/GridImage.styles.js.map +1 -1
  74. package/lib/cjs/components/grouped-image/GroupedImage.js +4 -23
  75. package/lib/cjs/components/grouped-image/GroupedImage.js.map +1 -1
  76. package/lib/cjs/components/grouped-image/GroupedImage.styles.js +0 -9
  77. package/lib/cjs/components/grouped-image/GroupedImage.styles.js.map +1 -1
  78. package/lib/cjs/components/highlight-slider/HighlightSlider.js +3 -13
  79. package/lib/cjs/components/highlight-slider/HighlightSlider.js.map +1 -1
  80. package/lib/cjs/components/highlight-slider/highlight-slider-item/HighlightSliderItem.js +4 -21
  81. package/lib/cjs/components/highlight-slider/highlight-slider-item/HighlightSliderItem.js.map +1 -1
  82. package/lib/cjs/components/highlight-slider/highlight-slider-item/HighlightSliderItem.styles.js +2 -11
  83. package/lib/cjs/components/highlight-slider/highlight-slider-item/HighlightSliderItem.styles.js.map +1 -1
  84. package/lib/cjs/components/icon/Icon.js +5 -24
  85. package/lib/cjs/components/icon/Icon.js.map +1 -1
  86. package/lib/cjs/components/icon/Icon.styles.js +0 -23
  87. package/lib/cjs/components/icon/Icon.styles.js.map +1 -1
  88. package/lib/cjs/components/input/Input.js +8 -29
  89. package/lib/cjs/components/input/Input.js.map +1 -1
  90. package/lib/cjs/components/input/Input.styles.js +3 -38
  91. package/lib/cjs/components/input/Input.styles.js.map +1 -1
  92. package/lib/cjs/components/list/List.js +37 -124
  93. package/lib/cjs/components/list/List.js.map +1 -1
  94. package/lib/cjs/components/list/List.utils.js +1 -213
  95. package/lib/cjs/components/list/List.utils.js.map +1 -1
  96. package/lib/cjs/components/list/list-item/ListItem.js +3 -84
  97. package/lib/cjs/components/list/list-item/ListItem.js.map +1 -1
  98. package/lib/cjs/components/list/list-item/ListItem.styles.js +0 -7
  99. package/lib/cjs/components/list/list-item/ListItem.styles.js.map +1 -1
  100. package/lib/cjs/components/list/list-item/list-item-head/ListItemHead.js +1 -5
  101. package/lib/cjs/components/list/list-item/list-item-head/ListItemHead.js.map +1 -1
  102. package/lib/cjs/components/list/list-item/list-item-head/ListItemHead.styles.js +1 -5
  103. package/lib/cjs/components/list/list-item/list-item-head/ListItemHead.styles.js.map +1 -1
  104. package/lib/cjs/components/list/list-item/list-item-head/list-item-right-element/ListItemRightElement.js +0 -1
  105. package/lib/cjs/components/list/list-item/list-item-head/list-item-right-element/ListItemRightElement.js.map +1 -1
  106. package/lib/cjs/components/list/list-item/list-item-head/list-item-subtitle/ListItemSubtitle.js +0 -3
  107. package/lib/cjs/components/list/list-item/list-item-head/list-item-subtitle/ListItemSubtitle.js.map +1 -1
  108. package/lib/cjs/components/list/list-item/list-item-head/list-item-title/ListItemTitle.js +0 -1
  109. package/lib/cjs/components/list/list-item/list-item-head/list-item-title/ListItemTitle.js.map +1 -1
  110. package/lib/cjs/components/mention-finder/MentionFinder.js +5 -43
  111. package/lib/cjs/components/mention-finder/MentionFinder.js.map +1 -1
  112. package/lib/cjs/components/mention-finder/mention-finder-item/MentionFinderItem.styles.js.map +1 -1
  113. package/lib/cjs/components/multi-action-button/MultiActionButton.js +3 -36
  114. package/lib/cjs/components/multi-action-button/MultiActionButton.js.map +1 -1
  115. package/lib/cjs/components/multi-action-button/MultiActionButton.styles.js +0 -6
  116. package/lib/cjs/components/multi-action-button/MultiActionButton.styles.js.map +1 -1
  117. package/lib/cjs/components/multi-action-button/MultiActionButton.types.js.map +1 -1
  118. package/lib/cjs/components/multi-action-button/action-button/ActionButton.js +1 -7
  119. package/lib/cjs/components/multi-action-button/action-button/ActionButton.js.map +1 -1
  120. package/lib/cjs/components/multi-action-button/action-button/ActionButton.styles.js +0 -12
  121. package/lib/cjs/components/multi-action-button/action-button/ActionButton.styles.js.map +1 -1
  122. package/lib/cjs/components/number-input/NumberInput.js +10 -13
  123. package/lib/cjs/components/number-input/NumberInput.js.map +1 -1
  124. package/lib/cjs/components/page-provider/PageProvider.js +2 -4
  125. package/lib/cjs/components/page-provider/PageProvider.js.map +1 -1
  126. package/lib/cjs/components/popup/Popup.js +1 -8
  127. package/lib/cjs/components/popup/Popup.js.map +1 -1
  128. package/lib/cjs/components/radio-button/RadioButton.js +15 -29
  129. package/lib/cjs/components/radio-button/RadioButton.js.map +1 -1
  130. package/lib/cjs/components/radio-button/RadioButton.styles.js +8 -19
  131. package/lib/cjs/components/radio-button/RadioButton.styles.js.map +1 -1
  132. package/lib/cjs/components/radio-button/radio-button-group/RadioButtonGroup.js +4 -7
  133. package/lib/cjs/components/radio-button/radio-button-group/RadioButtonGroup.js.map +1 -1
  134. package/lib/cjs/components/search-box/SearchBox.js +5 -20
  135. package/lib/cjs/components/search-box/SearchBox.js.map +1 -1
  136. package/lib/cjs/components/search-input/SearchInput.js +43 -56
  137. package/lib/cjs/components/search-input/SearchInput.js.map +1 -1
  138. package/lib/cjs/components/search-input/SearchInput.styles.js +2 -26
  139. package/lib/cjs/components/search-input/SearchInput.styles.js.map +1 -1
  140. package/lib/cjs/components/select-button/SelectButton.js +2 -4
  141. package/lib/cjs/components/select-button/SelectButton.js.map +1 -1
  142. package/lib/cjs/components/setup-wizard/SetupWizard.js +4 -10
  143. package/lib/cjs/components/setup-wizard/SetupWizard.js.map +1 -1
  144. package/lib/cjs/components/setup-wizard/setup-wizard-item/SetupWizardItem.js +3 -5
  145. package/lib/cjs/components/setup-wizard/setup-wizard-item/SetupWizardItem.js.map +1 -1
  146. package/lib/cjs/components/sharing-bar/SharingBar.js +6 -31
  147. package/lib/cjs/components/sharing-bar/SharingBar.js.map +1 -1
  148. package/lib/cjs/components/sharing-bar/SharingBar.styles.js +0 -5
  149. package/lib/cjs/components/sharing-bar/SharingBar.styles.js.map +1 -1
  150. package/lib/cjs/components/sharing-button/SharingButton.js +2 -4
  151. package/lib/cjs/components/sharing-button/SharingButton.js.map +1 -1
  152. package/lib/cjs/components/sharing-context-menu/SharingContextMenu.js +1 -3
  153. package/lib/cjs/components/sharing-context-menu/SharingContextMenu.js.map +1 -1
  154. package/lib/cjs/components/signature/Signature.js +3 -6
  155. package/lib/cjs/components/signature/Signature.js.map +1 -1
  156. package/lib/cjs/components/slider/Slider.js +7 -30
  157. package/lib/cjs/components/slider/Slider.js.map +1 -1
  158. package/lib/cjs/components/slider/Slider.styles.js +2 -9
  159. package/lib/cjs/components/slider/Slider.styles.js.map +1 -1
  160. package/lib/cjs/components/slider-button/SliderButton.js +6 -63
  161. package/lib/cjs/components/slider-button/SliderButton.js.map +1 -1
  162. package/lib/cjs/components/slider-button/SliderButton.styles.js +2 -15
  163. package/lib/cjs/components/slider-button/SliderButton.styles.js.map +1 -1
  164. package/lib/cjs/components/tag-input/TagInput.js +36 -92
  165. package/lib/cjs/components/tag-input/TagInput.js.map +1 -1
  166. package/lib/cjs/components/tag-input/TagInput.styles.js +3 -29
  167. package/lib/cjs/components/tag-input/TagInput.styles.js.map +1 -1
  168. package/lib/cjs/components/text-area/TextArea.js +8 -17
  169. package/lib/cjs/components/text-area/TextArea.js.map +1 -1
  170. package/lib/cjs/components/text-area/TextArea.styles.js +1 -15
  171. package/lib/cjs/components/text-area/TextArea.styles.js.map +1 -1
  172. package/lib/cjs/components/truncation/Truncation.js +3 -17
  173. package/lib/cjs/components/truncation/Truncation.js.map +1 -1
  174. package/lib/cjs/components/truncation/Truncation.styles.js +1 -18
  175. package/lib/cjs/components/truncation/Truncation.styles.js.map +1 -1
  176. package/lib/cjs/hooks/dropdown.js +24 -5
  177. package/lib/cjs/hooks/dropdown.js.map +1 -1
  178. package/lib/cjs/utils/file.js.map +1 -1
  179. package/lib/esm/components/accordion/Accordion.js +12 -105
  180. package/lib/esm/components/accordion/Accordion.js.map +1 -1
  181. package/lib/esm/components/accordion/Accordion.styles.js +3 -23
  182. package/lib/esm/components/accordion/Accordion.styles.js.map +1 -1
  183. package/lib/esm/components/accordion/accordion-body/AccordionBody.styles.js +1 -3
  184. package/lib/esm/components/accordion/accordion-body/AccordionBody.styles.js.map +1 -1
  185. package/lib/esm/components/accordion/accordion-group/AccordionGroup.js +19 -33
  186. package/lib/esm/components/accordion/accordion-group/AccordionGroup.js.map +1 -1
  187. package/lib/esm/components/accordion/accordion-head/AccordionHead.js +3 -6
  188. package/lib/esm/components/accordion/accordion-head/AccordionHead.js.map +1 -1
  189. package/lib/esm/components/accordion/accordion-head/AccordionHead.styles.js +0 -14
  190. package/lib/esm/components/accordion/accordion-head/AccordionHead.styles.js.map +1 -1
  191. package/lib/esm/components/amount-control/AmountControl.js +16 -30
  192. package/lib/esm/components/amount-control/AmountControl.js.map +1 -1
  193. package/lib/esm/components/amount-control/AmountControl.styles.js +2 -18
  194. package/lib/esm/components/amount-control/AmountControl.styles.js.map +1 -1
  195. package/lib/esm/components/button/Button.js +1 -5
  196. package/lib/esm/components/button/Button.js.map +1 -1
  197. package/lib/esm/components/button/Button.styles.js +0 -10
  198. package/lib/esm/components/button/Button.styles.js.map +1 -1
  199. package/lib/esm/components/button/Button.types.js.map +1 -1
  200. package/lib/esm/components/checkbox/Checkbox.js +1 -5
  201. package/lib/esm/components/checkbox/Checkbox.js.map +1 -1
  202. package/lib/esm/components/checkbox/Checkbox.styles.js +2 -29
  203. package/lib/esm/components/checkbox/Checkbox.styles.js.map +1 -1
  204. package/lib/esm/components/color-scheme-provider/ColorSchemeProvider.js +2 -7
  205. package/lib/esm/components/color-scheme-provider/ColorSchemeProvider.js.map +1 -1
  206. package/lib/esm/components/color-scheme-provider/ColorSchemeProvider.styles.js +2 -8
  207. package/lib/esm/components/color-scheme-provider/ColorSchemeProvider.styles.js.map +1 -1
  208. package/lib/esm/components/combobox/ComboBox.js +22 -63
  209. package/lib/esm/components/combobox/ComboBox.js.map +1 -1
  210. package/lib/esm/components/combobox/ComboBox.styles.js +0 -11
  211. package/lib/esm/components/combobox/ComboBox.styles.js.map +1 -1
  212. package/lib/esm/components/combobox/ComboBox.types.js.map +1 -1
  213. package/lib/esm/components/context-menu/ContextMenu.js +42 -145
  214. package/lib/esm/components/context-menu/ContextMenu.js.map +1 -1
  215. package/lib/esm/components/context-menu/ContextMenu.styles.js +0 -38
  216. package/lib/esm/components/context-menu/ContextMenu.styles.js.map +1 -1
  217. package/lib/esm/components/context-menu/ContextMenu.types.js.map +1 -1
  218. package/lib/esm/components/context-menu/ContextMenu.utils.js +0 -24
  219. package/lib/esm/components/context-menu/ContextMenu.utils.js.map +1 -1
  220. package/lib/esm/components/context-menu/context-menu-content/ContextMenuContent.js +8 -3
  221. package/lib/esm/components/context-menu/context-menu-content/ContextMenuContent.js.map +1 -1
  222. package/lib/esm/components/dropdown-body-wrapper/DropdownBodyWrapper.js +8 -1
  223. package/lib/esm/components/dropdown-body-wrapper/DropdownBodyWrapper.js.map +1 -1
  224. package/lib/esm/components/file-input/FileInput.js +2 -4
  225. package/lib/esm/components/file-input/FileInput.js.map +1 -1
  226. package/lib/esm/components/file-list/file-item/FileItem.js +26 -49
  227. package/lib/esm/components/file-list/file-item/FileItem.js.map +1 -1
  228. package/lib/esm/components/file-list/file-item/FileItem.styles.js +0 -24
  229. package/lib/esm/components/file-list/file-item/FileItem.styles.js.map +1 -1
  230. package/lib/esm/components/file-select/FileSelect.js +4 -27
  231. package/lib/esm/components/file-select/FileSelect.js.map +1 -1
  232. package/lib/esm/components/file-select/FileSelect.styles.js +0 -10
  233. package/lib/esm/components/file-select/FileSelect.styles.js.map +1 -1
  234. package/lib/esm/components/filter/Filter.js +16 -52
  235. package/lib/esm/components/filter/Filter.js.map +1 -1
  236. package/lib/esm/components/filter/Filter.styles.js +0 -9
  237. package/lib/esm/components/filter/Filter.styles.js.map +1 -1
  238. package/lib/esm/components/filter/filter-content/FilterContent.js +5 -15
  239. package/lib/esm/components/filter/filter-content/FilterContent.js.map +1 -1
  240. package/lib/esm/components/filter/filter-content/FilterContent.types.js.map +1 -1
  241. package/lib/esm/components/filter-buttons/FilterButtons.js +5 -69
  242. package/lib/esm/components/filter-buttons/FilterButtons.js.map +1 -1
  243. package/lib/esm/components/filter-buttons/filter-button/FilterButton.js +2 -40
  244. package/lib/esm/components/filter-buttons/filter-button/FilterButton.js.map +1 -1
  245. package/lib/esm/components/filter-buttons/filter-button/FilterButton.styles.js +0 -11
  246. package/lib/esm/components/filter-buttons/filter-button/FilterButton.styles.js.map +1 -1
  247. package/lib/esm/components/grid-image/GridImage.js +2 -20
  248. package/lib/esm/components/grid-image/GridImage.js.map +1 -1
  249. package/lib/esm/components/grid-image/GridImage.styles.js +1 -10
  250. package/lib/esm/components/grid-image/GridImage.styles.js.map +1 -1
  251. package/lib/esm/components/grouped-image/GroupedImage.js +4 -22
  252. package/lib/esm/components/grouped-image/GroupedImage.js.map +1 -1
  253. package/lib/esm/components/grouped-image/GroupedImage.styles.js +0 -9
  254. package/lib/esm/components/grouped-image/GroupedImage.styles.js.map +1 -1
  255. package/lib/esm/components/highlight-slider/HighlightSlider.js +3 -13
  256. package/lib/esm/components/highlight-slider/HighlightSlider.js.map +1 -1
  257. package/lib/esm/components/highlight-slider/highlight-slider-item/HighlightSliderItem.js +3 -20
  258. package/lib/esm/components/highlight-slider/highlight-slider-item/HighlightSliderItem.js.map +1 -1
  259. package/lib/esm/components/highlight-slider/highlight-slider-item/HighlightSliderItem.styles.js +1 -10
  260. package/lib/esm/components/highlight-slider/highlight-slider-item/HighlightSliderItem.styles.js.map +1 -1
  261. package/lib/esm/components/icon/Icon.js +7 -26
  262. package/lib/esm/components/icon/Icon.js.map +1 -1
  263. package/lib/esm/components/icon/Icon.styles.js +0 -23
  264. package/lib/esm/components/icon/Icon.styles.js.map +1 -1
  265. package/lib/esm/components/input/Input.js +4 -24
  266. package/lib/esm/components/input/Input.js.map +1 -1
  267. package/lib/esm/components/input/Input.styles.js +3 -38
  268. package/lib/esm/components/input/Input.styles.js.map +1 -1
  269. package/lib/esm/components/list/List.js +37 -123
  270. package/lib/esm/components/list/List.js.map +1 -1
  271. package/lib/esm/components/list/List.utils.js +0 -202
  272. package/lib/esm/components/list/List.utils.js.map +1 -1
  273. package/lib/esm/components/list/list-item/ListItem.js +4 -85
  274. package/lib/esm/components/list/list-item/ListItem.js.map +1 -1
  275. package/lib/esm/components/list/list-item/ListItem.styles.js +0 -7
  276. package/lib/esm/components/list/list-item/ListItem.styles.js.map +1 -1
  277. package/lib/esm/components/list/list-item/list-item-head/ListItemHead.js +2 -6
  278. package/lib/esm/components/list/list-item/list-item-head/ListItemHead.js.map +1 -1
  279. package/lib/esm/components/list/list-item/list-item-head/ListItemHead.styles.js +0 -4
  280. package/lib/esm/components/list/list-item/list-item-head/ListItemHead.styles.js.map +1 -1
  281. package/lib/esm/components/list/list-item/list-item-head/list-item-right-element/ListItemRightElement.js +0 -1
  282. package/lib/esm/components/list/list-item/list-item-head/list-item-right-element/ListItemRightElement.js.map +1 -1
  283. package/lib/esm/components/list/list-item/list-item-head/list-item-subtitle/ListItemSubtitle.js +1 -4
  284. package/lib/esm/components/list/list-item/list-item-head/list-item-subtitle/ListItemSubtitle.js.map +1 -1
  285. package/lib/esm/components/list/list-item/list-item-head/list-item-title/ListItemTitle.js +0 -1
  286. package/lib/esm/components/list/list-item/list-item-head/list-item-title/ListItemTitle.js.map +1 -1
  287. package/lib/esm/components/mention-finder/MentionFinder.js +3 -39
  288. package/lib/esm/components/mention-finder/MentionFinder.js.map +1 -1
  289. package/lib/esm/components/mention-finder/mention-finder-item/MentionFinderItem.styles.js.map +1 -1
  290. package/lib/esm/components/multi-action-button/MultiActionButton.js +3 -36
  291. package/lib/esm/components/multi-action-button/MultiActionButton.js.map +1 -1
  292. package/lib/esm/components/multi-action-button/MultiActionButton.styles.js +0 -6
  293. package/lib/esm/components/multi-action-button/MultiActionButton.styles.js.map +1 -1
  294. package/lib/esm/components/multi-action-button/MultiActionButton.types.js.map +1 -1
  295. package/lib/esm/components/multi-action-button/action-button/ActionButton.js +1 -7
  296. package/lib/esm/components/multi-action-button/action-button/ActionButton.js.map +1 -1
  297. package/lib/esm/components/multi-action-button/action-button/ActionButton.styles.js +0 -12
  298. package/lib/esm/components/multi-action-button/action-button/ActionButton.styles.js.map +1 -1
  299. package/lib/esm/components/number-input/NumberInput.js +10 -13
  300. package/lib/esm/components/number-input/NumberInput.js.map +1 -1
  301. package/lib/esm/components/page-provider/PageProvider.js +2 -4
  302. package/lib/esm/components/page-provider/PageProvider.js.map +1 -1
  303. package/lib/esm/components/popup/Popup.js +1 -8
  304. package/lib/esm/components/popup/Popup.js.map +1 -1
  305. package/lib/esm/components/radio-button/RadioButton.js +15 -29
  306. package/lib/esm/components/radio-button/RadioButton.js.map +1 -1
  307. package/lib/esm/components/radio-button/RadioButton.styles.js +8 -19
  308. package/lib/esm/components/radio-button/RadioButton.styles.js.map +1 -1
  309. package/lib/esm/components/radio-button/radio-button-group/RadioButtonGroup.js +4 -7
  310. package/lib/esm/components/radio-button/radio-button-group/RadioButtonGroup.js.map +1 -1
  311. package/lib/esm/components/search-box/SearchBox.js +3 -17
  312. package/lib/esm/components/search-box/SearchBox.js.map +1 -1
  313. package/lib/esm/components/search-input/SearchInput.js +44 -56
  314. package/lib/esm/components/search-input/SearchInput.js.map +1 -1
  315. package/lib/esm/components/search-input/SearchInput.styles.js +1 -25
  316. package/lib/esm/components/search-input/SearchInput.styles.js.map +1 -1
  317. package/lib/esm/components/select-button/SelectButton.js +2 -4
  318. package/lib/esm/components/select-button/SelectButton.js.map +1 -1
  319. package/lib/esm/components/setup-wizard/SetupWizard.js +4 -10
  320. package/lib/esm/components/setup-wizard/SetupWizard.js.map +1 -1
  321. package/lib/esm/components/setup-wizard/setup-wizard-item/SetupWizardItem.js +3 -5
  322. package/lib/esm/components/setup-wizard/setup-wizard-item/SetupWizardItem.js.map +1 -1
  323. package/lib/esm/components/sharing-bar/SharingBar.js +5 -30
  324. package/lib/esm/components/sharing-bar/SharingBar.js.map +1 -1
  325. package/lib/esm/components/sharing-bar/SharingBar.styles.js +0 -5
  326. package/lib/esm/components/sharing-bar/SharingBar.styles.js.map +1 -1
  327. package/lib/esm/components/sharing-button/SharingButton.js +2 -4
  328. package/lib/esm/components/sharing-button/SharingButton.js.map +1 -1
  329. package/lib/esm/components/sharing-context-menu/SharingContextMenu.js +1 -3
  330. package/lib/esm/components/sharing-context-menu/SharingContextMenu.js.map +1 -1
  331. package/lib/esm/components/signature/Signature.js +3 -6
  332. package/lib/esm/components/signature/Signature.js.map +1 -1
  333. package/lib/esm/components/slider/Slider.js +7 -30
  334. package/lib/esm/components/slider/Slider.js.map +1 -1
  335. package/lib/esm/components/slider/Slider.styles.js +1 -8
  336. package/lib/esm/components/slider/Slider.styles.js.map +1 -1
  337. package/lib/esm/components/slider-button/SliderButton.js +6 -62
  338. package/lib/esm/components/slider-button/SliderButton.js.map +1 -1
  339. package/lib/esm/components/slider-button/SliderButton.styles.js +1 -14
  340. package/lib/esm/components/slider-button/SliderButton.styles.js.map +1 -1
  341. package/lib/esm/components/tag-input/TagInput.js +35 -86
  342. package/lib/esm/components/tag-input/TagInput.js.map +1 -1
  343. package/lib/esm/components/tag-input/TagInput.styles.js +1 -27
  344. package/lib/esm/components/tag-input/TagInput.styles.js.map +1 -1
  345. package/lib/esm/components/text-area/TextArea.js +9 -18
  346. package/lib/esm/components/text-area/TextArea.js.map +1 -1
  347. package/lib/esm/components/text-area/TextArea.styles.js +0 -14
  348. package/lib/esm/components/text-area/TextArea.styles.js.map +1 -1
  349. package/lib/esm/components/truncation/Truncation.js +4 -18
  350. package/lib/esm/components/truncation/Truncation.js.map +1 -1
  351. package/lib/esm/components/truncation/Truncation.styles.js +0 -17
  352. package/lib/esm/components/truncation/Truncation.styles.js.map +1 -1
  353. package/lib/esm/hooks/dropdown.js +24 -5
  354. package/lib/esm/hooks/dropdown.js.map +1 -1
  355. package/lib/esm/utils/file.js.map +1 -1
  356. package/lib/types/components/accordion/Accordion.d.ts +0 -5
  357. package/lib/types/components/accordion/Accordion.styles.d.ts +4 -8
  358. package/lib/types/components/accordion/accordion-body/AccordionBody.styles.d.ts +2 -2
  359. package/lib/types/components/accordion/accordion-group/AccordionGroup.d.ts +2 -7
  360. package/lib/types/components/accordion/accordion-head/AccordionHead.d.ts +0 -1
  361. package/lib/types/components/accordion/accordion-head/AccordionHead.styles.d.ts +18 -18
  362. package/lib/types/components/amount-control/AmountControl.d.ts +0 -5
  363. package/lib/types/components/amount-control/AmountControl.styles.d.ts +4 -8
  364. package/lib/types/components/button/Button.styles.d.ts +6 -8
  365. package/lib/types/components/button/Button.types.d.ts +0 -8
  366. package/lib/types/components/checkbox/Checkbox.d.ts +0 -4
  367. package/lib/types/components/checkbox/Checkbox.styles.d.ts +1 -5
  368. package/lib/types/components/color-scheme-provider/ColorSchemeProvider.d.ts +0 -5
  369. package/lib/types/components/combobox/ComboBox.styles.d.ts +2 -4
  370. package/lib/types/components/combobox/ComboBox.types.d.ts +0 -5
  371. package/lib/types/components/context-menu/ContextMenu.styles.d.ts +2 -4
  372. package/lib/types/components/context-menu/ContextMenu.types.d.ts +0 -6
  373. package/lib/types/components/context-menu/ContextMenu.utils.d.ts +0 -10
  374. package/lib/types/components/context-menu/context-menu-content/ContextMenuContent.d.ts +1 -1
  375. package/lib/types/components/context-menu/context-menu-content/ContextMenuContent.styles.d.ts +2 -2
  376. package/lib/types/components/dropdown-body-wrapper/DropdownBodyWrapper.d.ts +7 -0
  377. package/lib/types/components/dropdown-body-wrapper/delayed-dropdown-content/DelayedDropdownContent.styles.d.ts +2 -2
  378. package/lib/types/components/expandable-content/ExpandableContent.styles.d.ts +2 -2
  379. package/lib/types/components/file-input/FileInput.d.ts +0 -4
  380. package/lib/types/components/file-input/FileInput.styles.d.ts +2 -2
  381. package/lib/types/components/file-list/file-item/FileItem.styles.d.ts +0 -3
  382. package/lib/types/components/file-select/FileSelect.d.ts +0 -4
  383. package/lib/types/components/file-select/FileSelect.styles.d.ts +4 -6
  384. package/lib/types/components/filter/Filter.d.ts +0 -1
  385. package/lib/types/components/filter/Filter.styles.d.ts +4 -6
  386. package/lib/types/components/filter/filter-content/FilterContent.types.d.ts +0 -4
  387. package/lib/types/components/filter-buttons/FilterButtons.d.ts +0 -4
  388. package/lib/types/components/filter-buttons/filter-button/FilterButton.d.ts +0 -5
  389. package/lib/types/components/filter-buttons/filter-button/FilterButton.styles.d.ts +8 -12
  390. package/lib/types/components/grid-image/GridImage.d.ts +0 -4
  391. package/lib/types/components/grid-image/GridImage.styles.d.ts +2 -4
  392. package/lib/types/components/grouped-image/GroupedImage.d.ts +0 -4
  393. package/lib/types/components/grouped-image/GroupedImage.styles.d.ts +6 -8
  394. package/lib/types/components/highlight-slider/HighlightSlider.d.ts +0 -4
  395. package/lib/types/components/highlight-slider/highlight-slider-item/HighlightSliderItem.d.ts +0 -3
  396. package/lib/types/components/highlight-slider/highlight-slider-item/HighlightSliderItem.styles.d.ts +5 -9
  397. package/lib/types/components/icon/Icon.d.ts +0 -4
  398. package/lib/types/components/icon/Icon.styles.d.ts +0 -1
  399. package/lib/types/components/input/Input.d.ts +0 -4
  400. package/lib/types/components/input/Input.styles.d.ts +9 -17
  401. package/lib/types/components/list/List.d.ts +0 -11
  402. package/lib/types/components/list/List.utils.d.ts +1 -32
  403. package/lib/types/components/list/list-item/ListItem.d.ts +0 -4
  404. package/lib/types/components/list/list-item/ListItem.styles.d.ts +64 -64
  405. package/lib/types/components/list/list-item/list-item-body/ListItemBody.styles.d.ts +2 -2
  406. package/lib/types/components/list/list-item/list-item-head/ListItemHead.styles.d.ts +194 -195
  407. package/lib/types/components/masonry/masonry-item/MasonryItem.styles.d.ts +2 -2
  408. package/lib/types/components/mention-finder/MentionFinder.styles.d.ts +4 -4
  409. package/lib/types/components/multi-action-button/MultiActionButton.styles.d.ts +2 -2
  410. package/lib/types/components/multi-action-button/MultiActionButton.types.d.ts +0 -7
  411. package/lib/types/components/multi-action-button/action-button/ActionButton.d.ts +1 -4
  412. package/lib/types/components/multi-action-button/action-button/ActionButton.styles.d.ts +2 -4
  413. package/lib/types/components/number-input/NumberInput.d.ts +0 -4
  414. package/lib/types/components/popup/popup-content-wrapper/PopupContentWrapper.styles.d.ts +2 -2
  415. package/lib/types/components/progress-bar/ProgressBar.styles.d.ts +6 -6
  416. package/lib/types/components/radio-button/RadioButton.d.ts +0 -4
  417. package/lib/types/components/radio-button/RadioButton.styles.d.ts +9 -15
  418. package/lib/types/components/radio-button/radio-button-group/RadioButtonGroup.d.ts +0 -5
  419. package/lib/types/components/search-box/SearchBox.d.ts +0 -4
  420. package/lib/types/components/search-box/SearchBox.styles.d.ts +2 -2
  421. package/lib/types/components/search-input/SearchInput.d.ts +0 -4
  422. package/lib/types/components/search-input/SearchInput.styles.d.ts +9 -17
  423. package/lib/types/components/select-button/SelectButton.d.ts +0 -4
  424. package/lib/types/components/setup-wizard/SetupWizard.d.ts +0 -5
  425. package/lib/types/components/sharing-bar/SharingBar.d.ts +0 -4
  426. package/lib/types/components/sharing-button/SharingButton.d.ts +1 -1
  427. package/lib/types/components/sharing-context-menu/SharingContextMenu.d.ts +2 -10
  428. package/lib/types/components/signature/Signature.d.ts +0 -4
  429. package/lib/types/components/skeleton/base-skeleton/BaseSkeleton.styles.d.ts +4 -4
  430. package/lib/types/components/slider/Slider.d.ts +0 -8
  431. package/lib/types/components/slider/Slider.styles.d.ts +14 -18
  432. package/lib/types/components/slider-button/SliderButton.d.ts +28 -1
  433. package/lib/types/components/slider-button/SliderButton.styles.d.ts +4 -6
  434. package/lib/types/components/tag-input/TagInput.d.ts +0 -4
  435. package/lib/types/components/tag-input/TagInput.styles.d.ts +2 -12
  436. package/lib/types/components/text-area/TextArea.d.ts +0 -4
  437. package/lib/types/components/text-area/TextArea.styles.d.ts +0 -1
  438. package/lib/types/components/truncation/Truncation.d.ts +0 -4
  439. package/lib/types/components/truncation/Truncation.styles.d.ts +2 -7
  440. package/lib/types/hooks/dropdown.d.ts +2 -0
  441. package/lib/types/utils/file.d.ts +1 -1
  442. package/package.json +3 -3
  443. package/lib/cjs/components/list/list-item/useListItemFocus.js +0 -47
  444. package/lib/cjs/components/list/list-item/useListItemFocus.js.map +0 -1
  445. package/lib/cjs/components/slider-button/SliderButton.types.js +0 -6
  446. package/lib/cjs/components/slider-button/SliderButton.types.js.map +0 -1
  447. package/lib/cjs/components/slider-button/useSliderButtonPopupKeyboard.js +0 -66
  448. package/lib/cjs/components/slider-button/useSliderButtonPopupKeyboard.js.map +0 -1
  449. package/lib/cjs/components/slider-button/useSliderButtonThumbKeyboard.js +0 -47
  450. package/lib/cjs/components/slider-button/useSliderButtonThumbKeyboard.js.map +0 -1
  451. package/lib/cjs/hooks/useKeyboardFocusHighlighting.js +0 -68
  452. package/lib/cjs/hooks/useKeyboardFocusHighlighting.js.map +0 -1
  453. package/lib/cjs/utils/keyboardFocusHighlighting.styles.js +0 -29
  454. package/lib/cjs/utils/keyboardFocusHighlighting.styles.js.map +0 -1
  455. package/lib/esm/components/list/list-item/useListItemFocus.js +0 -40
  456. package/lib/esm/components/list/list-item/useListItemFocus.js.map +0 -1
  457. package/lib/esm/components/slider-button/SliderButton.types.js +0 -2
  458. package/lib/esm/components/slider-button/SliderButton.types.js.map +0 -1
  459. package/lib/esm/components/slider-button/useSliderButtonPopupKeyboard.js +0 -56
  460. package/lib/esm/components/slider-button/useSliderButtonPopupKeyboard.js.map +0 -1
  461. package/lib/esm/components/slider-button/useSliderButtonThumbKeyboard.js +0 -38
  462. package/lib/esm/components/slider-button/useSliderButtonThumbKeyboard.js.map +0 -1
  463. package/lib/esm/hooks/useKeyboardFocusHighlighting.js +0 -61
  464. package/lib/esm/hooks/useKeyboardFocusHighlighting.js.map +0 -1
  465. package/lib/esm/utils/keyboardFocusHighlighting.styles.js +0 -24
  466. package/lib/esm/utils/keyboardFocusHighlighting.styles.js.map +0 -1
  467. package/lib/types/components/list/list-item/useListItemFocus.d.ts +0 -13
  468. package/lib/types/components/slider-button/SliderButton.types.d.ts +0 -32
  469. package/lib/types/components/slider-button/useSliderButtonPopupKeyboard.d.ts +0 -17
  470. package/lib/types/components/slider-button/useSliderButtonThumbKeyboard.d.ts +0 -13
  471. package/lib/types/hooks/useKeyboardFocusHighlighting.d.ts +0 -5
  472. package/lib/types/utils/keyboardFocusHighlighting.styles.d.ts +0 -9
@@ -16,7 +16,6 @@ var _dropdown = require("../../types/dropdown");
16
16
  var _element = require("../../hooks/element");
17
17
  var _ComboBox2 = require("./ComboBox.types");
18
18
  var _ComboBox3 = require("./ComboBox.utils");
19
- var _useKeyboardFocusHighlighting = require("../../hooks/useKeyboardFocusHighlighting");
20
19
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
21
20
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
22
21
  const ComboBox = /*#__PURE__*/(0, _react.forwardRef)(({
@@ -45,18 +44,16 @@ const ComboBox = /*#__PURE__*/(0, _react.forwardRef)(({
45
44
  onInputBlur,
46
45
  shouldShowTransparentBackground = false,
47
46
  inputValue,
48
- shouldDropDownUseMaxItemWidth = false,
49
- shouldEnableKeyboardHighlighting
47
+ shouldDropDownUseMaxItemWidth = false
50
48
  }, ref) => {
51
49
  const [internalSelectedItem, setInternalSelectedItem] = (0, _react.useState)();
52
50
  const [isAnimating, setIsAnimating] = (0, _react.useState)(false);
53
51
  const [minWidth, setMinWidth] = (0, _react.useState)(undefined);
54
52
  const [bodyMinWidth, setBodyMinWidth] = (0, _react.useState)(0);
55
53
  const [focusedIndex, setFocusedIndex] = (0, _react.useState)(null);
54
+ const [availableMaxHeight, setAvailableMaxHeight] = (0, _react.useState)(undefined);
56
55
  const isInputFocused = (0, _react.useRef)(false);
57
56
  const styledComboBoxElementRef = (0, _react.useRef)(null);
58
- const comboBoxHeaderRef = (0, _react.useRef)(null);
59
- const comboBoxInputRef = (0, _react.useRef)(null);
60
57
  const contentRef = (0, _react.useRef)(null);
61
58
  const parentSize = (0, _element.useElementSize)(styledComboBoxElementRef, {
62
59
  shouldUseParentElement: true
@@ -92,7 +89,6 @@ const ComboBox = /*#__PURE__*/(0, _react.forwardRef)(({
92
89
  setBodyMinWidth(calculatedBodyMinWidth);
93
90
  }, [functions, internalSelectedItem, lists, parentSize, placeholder, prefix, prefixMinWidth, selectedItem, shouldDropDownUseMaxItemWidth, shouldShowBigImage, shouldShowClearIcon, shouldUseCurrentItemWidth, shouldUseFullWidth, values]);
94
91
  const shouldChangeColor = (0, _react.useMemo)(() => areaProvider.shouldChangeColor ?? false, [areaProvider.shouldChangeColor]);
95
- const shouldShowKeyboardHighlighting = (0, _useKeyboardFocusHighlighting.useKeyboardFocusHighlighting)(shouldEnableKeyboardHighlighting && !isDisabled);
96
92
  const shouldDisableActions = (0, _react.useMemo)(() => {
97
93
  if (!selectedItem) {
98
94
  return false;
@@ -100,6 +96,16 @@ const ComboBox = /*#__PURE__*/(0, _react.forwardRef)(({
100
96
  const combinedLists = lists.flatMap(list => list.list);
101
97
  return combinedLists.length === 1 && combinedLists.some(item => item.value === selectedItem.value);
102
98
  }, [lists, selectedItem]);
99
+
100
+ // Limits the configured maxHeight by the height that is actually available inside the
101
+ // container (reported by the DropdownBodyWrapper). This prevents the dropdown from being cut
102
+ // off when it is opened to the top or bottom and there is not enough space.
103
+ const effectiveMaxHeight = (0, _react.useMemo)(() => {
104
+ if (typeof availableMaxHeight === 'number' && availableMaxHeight > 0) {
105
+ return Math.min(maxHeight, availableMaxHeight);
106
+ }
107
+ return maxHeight;
108
+ }, [availableMaxHeight, maxHeight]);
103
109
  const contentHeight = (0, _react.useMemo)(() => {
104
110
  const flatItems = lists.flatMap(list => list.list);
105
111
  let height = flatItems.reduce((value, item) => {
@@ -109,11 +115,11 @@ const ComboBox = /*#__PURE__*/(0, _react.forwardRef)(({
109
115
  if (lists.length > 1) {
110
116
  height += lists.length * 38;
111
117
  }
112
- if (maxHeight < height) {
113
- height = maxHeight;
118
+ if (effectiveMaxHeight < height) {
119
+ height = effectiveMaxHeight;
114
120
  }
115
121
  return height;
116
- }, [lists, maxHeight, shouldShowBigImage]);
122
+ }, [effectiveMaxHeight, lists, shouldShowBigImage]);
117
123
  const handleInputFocus = (0, _react.useCallback)(event => {
118
124
  isInputFocused.current = true;
119
125
  onInputFocus === null || onInputFocus === void 0 || onInputFocus(event);
@@ -134,26 +140,6 @@ const ComboBox = /*#__PURE__*/(0, _react.forwardRef)(({
134
140
  }
135
141
  setIsAnimating(false);
136
142
  }, [onHide]);
137
- const handleContainerBlur = (0, _react.useCallback)(event => {
138
- var _contentRef$current;
139
- const nextFocusedElement = event.relatedTarget;
140
- const currentContainer = event.currentTarget;
141
- if (!nextFocusedElement || !currentContainer.contains(nextFocusedElement) && !((_contentRef$current = contentRef.current) !== null && _contentRef$current !== void 0 && _contentRef$current.contains(nextFocusedElement))) {
142
- handleClose();
143
- }
144
- }, [handleClose]);
145
- const restoreTriggerFocus = (0, _react.useCallback)(() => {
146
- // Delay is needed so focus happens after dropdown close/render cycle.
147
- requestAnimationFrame(() => {
148
- var _comboBoxHeaderRef$cu;
149
- if (typeof inputValue === 'string') {
150
- var _comboBoxInputRef$cur;
151
- (_comboBoxInputRef$cur = comboBoxInputRef.current) === null || _comboBoxInputRef$cur === void 0 || _comboBoxInputRef$cur.focus();
152
- return;
153
- }
154
- (_comboBoxHeaderRef$cu = comboBoxHeaderRef.current) === null || _comboBoxHeaderRef$cu === void 0 || _comboBoxHeaderRef$cu.focus();
155
- });
156
- }, [inputValue]);
157
143
 
158
144
  /**
159
145
  * This function sets the selected item
@@ -169,15 +155,13 @@ const ComboBox = /*#__PURE__*/(0, _react.forwardRef)(({
169
155
  if (shouldPreventSelection) return;
170
156
  setInternalSelectedItem(itemToSelect);
171
157
  handleClose();
172
- restoreTriggerFocus();
173
158
  });
174
159
  return;
175
160
  }
176
161
  }
177
162
  setInternalSelectedItem(itemToSelect);
178
163
  handleClose();
179
- restoreTriggerFocus();
180
- }, [handleClose, onSelect, restoreTriggerFocus]);
164
+ }, [handleClose, onSelect]);
181
165
  const handleClear = (0, _react.useCallback)(event => {
182
166
  event.preventDefault();
183
167
  event.stopPropagation();
@@ -186,16 +170,10 @@ const ComboBox = /*#__PURE__*/(0, _react.forwardRef)(({
186
170
  (0, _react.useEffect)(() => {
187
171
  const handleKeyDown = e => {
188
172
  if (!isAnimating) return;
189
- if (e.key === 'Escape') {
190
- e.preventDefault();
191
- handleClose();
192
- restoreTriggerFocus();
193
- return;
194
- }
195
173
  if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
196
- var _contentRef$current2;
174
+ var _contentRef$current;
197
175
  e.preventDefault();
198
- const children = (_contentRef$current2 = contentRef.current) === null || _contentRef$current2 === void 0 ? void 0 : _contentRef$current2.children;
176
+ const children = (_contentRef$current = contentRef.current) === null || _contentRef$current === void 0 ? void 0 : _contentRef$current.children;
199
177
  if (!children || children.length === 0) return;
200
178
  const stepDirection = e.key === 'ArrowUp' ? -1 : 1;
201
179
  let newIndex = focusedIndex ?? -1;
@@ -219,8 +197,8 @@ const ComboBox = /*#__PURE__*/(0, _react.forwardRef)(({
219
197
  focusedElement.tabIndex = 0;
220
198
  focusedElement.focus();
221
199
  } else if (e.key === 'Enter' && focusedIndex !== null) {
222
- var _contentRef$current3;
223
- const element = (_contentRef$current3 = contentRef.current) === null || _contentRef$current3 === void 0 ? void 0 : _contentRef$current3.children[focusedIndex];
200
+ var _contentRef$current2;
201
+ const element = (_contentRef$current2 = contentRef.current) === null || _contentRef$current2 === void 0 ? void 0 : _contentRef$current2.children[focusedIndex];
224
202
  if (!element) return;
225
203
  const {
226
204
  id
@@ -239,7 +217,7 @@ const ComboBox = /*#__PURE__*/(0, _react.forwardRef)(({
239
217
  };
240
218
  document.addEventListener('keydown', handleKeyDown);
241
219
  return () => document.removeEventListener('keydown', handleKeyDown);
242
- }, [focusedIndex, handleClose, handleSetSelectedItem, isAnimating, lists, restoreTriggerFocus]);
220
+ }, [focusedIndex, handleSetSelectedItem, isAnimating, lists]);
243
221
 
244
222
  /**
245
223
  * This function sets the external selected item
@@ -298,21 +276,6 @@ const ComboBox = /*#__PURE__*/(0, _react.forwardRef)(({
298
276
  }
299
277
  }
300
278
  }, [handleClose, handleOpen, isAnimating, isDisabled]);
301
- const handleHeaderKeyDown = (0, _react.useCallback)(event => {
302
- if (isDisabled || typeof inputValue === 'string') {
303
- return;
304
- }
305
- if (event.key === 'Escape' && isAnimating) {
306
- event.preventDefault();
307
- handleClose();
308
- restoreTriggerFocus();
309
- return;
310
- }
311
- if (event.key === 'Enter' || event.key === ' ') {
312
- event.preventDefault();
313
- handleHeaderClick();
314
- }
315
- }, [handleClose, handleHeaderClick, inputValue, isAnimating, isDisabled, restoreTriggerFocus]);
316
279
  (0, _react.useImperativeHandle)(ref, () => ({
317
280
  hide: handleClose,
318
281
  show: handleOpen
@@ -332,10 +295,8 @@ const ComboBox = /*#__PURE__*/(0, _react.forwardRef)(({
332
295
  return (0, _react.useMemo)(() => /*#__PURE__*/_react.default.createElement(_ComboBox.StyledComboBox, {
333
296
  ref: styledComboBoxElementRef,
334
297
  $minWidth: minWidth,
335
- $shouldUseFullWidth: shouldUseFullWidth,
336
- onBlur: handleContainerBlur
298
+ $shouldUseFullWidth: shouldUseFullWidth
337
299
  }, /*#__PURE__*/_react.default.createElement(_ComboBox.StyledComboBoxHeader, {
338
- ref: comboBoxHeaderRef,
339
300
  $direction: direction,
340
301
  onClick: handleHeaderClick,
341
302
  $isOpen: isAnimating,
@@ -344,12 +305,7 @@ const ComboBox = /*#__PURE__*/(0, _react.forwardRef)(({
344
305
  $shouldShowTransparentBackground: shouldShowTransparentBackground,
345
306
  $isDisabled: isDisabled,
346
307
  $shouldChangeColor: shouldChangeColor,
347
- $shouldShowBigImage: shouldShowBigImage,
348
- $shouldShowKeyboardHighlighting: shouldShowKeyboardHighlighting,
349
- onKeyDown: handleHeaderKeyDown,
350
- tabIndex: !isDisabled && typeof inputValue !== 'string' ? 0 : undefined,
351
- role: !isDisabled && typeof inputValue !== 'string' ? 'button' : undefined,
352
- "aria-expanded": !isDisabled && typeof inputValue !== 'string' ? isAnimating : undefined
308
+ $shouldShowBigImage: shouldShowBigImage
353
309
  }, /*#__PURE__*/_react.default.createElement(_ComboBox.StyledComboBoxPrefixAndPlaceholderWrapper, null, prefix && /*#__PURE__*/_react.default.createElement(_ComboBox.StyledComboBoxPrefix, {
354
310
  $prefixMinWidth: prefixMinWidth
355
311
  }, prefix), /*#__PURE__*/_react.default.createElement(_ComboBox.StyledComboBoxPlaceholder, {
@@ -361,7 +317,6 @@ const ComboBox = /*#__PURE__*/(0, _react.forwardRef)(({
361
317
  }), placeholderIcon && /*#__PURE__*/_react.default.createElement(_Icon.default, {
362
318
  icons: placeholderIcon
363
319
  }), typeof inputValue === 'string' ? /*#__PURE__*/_react.default.createElement(_ComboBox.StyledComboBoxInput, {
364
- ref: comboBoxInputRef,
365
320
  disabled: isDisabled,
366
321
  value: inputValue,
367
322
  onChange: onInputChange,
@@ -385,18 +340,19 @@ const ComboBox = /*#__PURE__*/(0, _react.forwardRef)(({
385
340
  bodyWidth: bodyWidth,
386
341
  contentHeight: contentHeight,
387
342
  shouldCaptureEvents: shouldCaptureEvents,
343
+ onAvailableMaxHeightChange: setAvailableMaxHeight,
388
344
  onClose: handleClose,
389
345
  direction: direction,
390
346
  container: container,
391
347
  shouldShowDropdown: isAnimating,
392
348
  minBodyWidth: bodyWidth ?? bodyMinWidth
393
349
  }, /*#__PURE__*/_react.default.createElement(_ComboBox.StyledComboBoxBody, {
394
- $maxHeight: maxHeight,
350
+ $maxHeight: effectiveMaxHeight,
395
351
  $minWidth: bodyWidth ?? bodyMinWidth,
396
352
  className: "chayns-scrollbar",
397
353
  ref: contentRef,
398
354
  tabIndex: 0
399
- }, comboBoxGroups))), [bodyMinWidth, bodyWidth, comboBoxGroups, container, contentHeight, direction, handleClear, handleClose, handleHeaderClick, handleHeaderKeyDown, handleInputBlur, handleInputFocus, inputValue, internalSelectedItem, isAnimating, isDisabled, isTouch, maxHeight, minWidth, onInputChange, placeholderIcon, placeholderImageUrl, placeholderText, prefix, prefixMinWidth, selectedItem, shouldChangeColor, shouldDisableActions, shouldCaptureEvents, shouldShowKeyboardHighlighting, shouldShowBigImage, shouldShowClearIcon, shouldShowRoundPlaceholderImage, shouldShowTransparentBackground, shouldUseFullWidth, size]);
355
+ }, comboBoxGroups))), [bodyMinWidth, bodyWidth, comboBoxGroups, container, contentHeight, direction, handleClear, handleClose, handleHeaderClick, handleInputBlur, handleInputFocus, inputValue, internalSelectedItem, isAnimating, isDisabled, isTouch, effectiveMaxHeight, minWidth, onInputChange, placeholderIcon, placeholderImageUrl, placeholderText, prefix, prefixMinWidth, selectedItem, shouldChangeColor, shouldDisableActions, shouldCaptureEvents, shouldShowBigImage, shouldShowClearIcon, shouldShowRoundPlaceholderImage, shouldShowTransparentBackground, shouldUseFullWidth, size]);
400
356
  });
401
357
  ComboBox.displayName = 'ComboBox';
402
358
  var _default = exports.default = ComboBox;
@@ -1 +1 @@
1
- {"version":3,"file":"ComboBox.js","names":["_chaynsApi","require","_react","_interopRequireWildcard","_environment","_AreaContextProvider","_Icon","_interopRequireDefault","_ComboBoxItem","_ComboBox","_DropdownBodyWrapper","_dropdown","_element","_ComboBox2","_ComboBox3","_useKeyboardFocusHighlighting","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ComboBox","forwardRef","bodyWidth","direction","DropdownDirection","RIGHT","isDisabled","lists","maxHeight","onSelect","placeholder","prefix","container","shouldCaptureEvents","selectedItem","onHide","onShow","shouldShowBigImage","shouldShowClearIcon","shouldShowRoundImage","onInputFocus","prefixMinWidth","size","ComboBoxSize","NORMAL","shouldUseFullWidth","onInputChange","shouldUseCurrentItemWidth","onInputBlur","shouldShowTransparentBackground","inputValue","shouldDropDownUseMaxItemWidth","shouldEnableKeyboardHighlighting","ref","internalSelectedItem","setInternalSelectedItem","useState","isAnimating","setIsAnimating","minWidth","setMinWidth","undefined","bodyMinWidth","setBodyMinWidth","focusedIndex","setFocusedIndex","isInputFocused","useRef","styledComboBoxElementRef","comboBoxHeaderRef","comboBoxInputRef","contentRef","parentSize","useElementSize","shouldUseParentElement","functions","useFunctions","values","useValues","isTouch","useIsTouch","areaProvider","useContext","AreaContext","useEffect","calculatedMinWidth","calculatedBodyMinWidth","getComboBoxWidthResult","parentWidth","width","shouldChangeColor","useMemo","shouldShowKeyboardHighlighting","useKeyboardFocusHighlighting","shouldDisableActions","combinedLists","flatMap","list","length","some","item","value","contentHeight","flatItems","height","reduce","isBigItem","subtext","trim","handleInputFocus","useCallback","event","current","handleInputBlur","handleOpen","handleClose","handleContainerBlur","_contentRef$current","nextFocusedElement","relatedTarget","currentContainer","currentTarget","contains","restoreTriggerFocus","requestAnimationFrame","_comboBoxHeaderRef$cu","_comboBoxInputRef$cur","focus","handleSetSelectedItem","itemToSelect","onSelectResult","Promise","then","shouldPreventSelection","handleClear","preventDefault","stopPropagation","handleKeyDown","key","_contentRef$current2","children","stepDirection","newIndex","attempts","newElement","shouldSkip","id","startsWith","endsWith","prevElement","tabIndex","focusedElement","_contentRef$current3","element","newSelectedItem","find","String","replace","document","addEventListener","removeEventListener","placeholderImageUrl","imageUrl","placeholderIcon","icons","placeholderText","text","shouldShowRoundPlaceholderImage","selectedItemList","handleHeaderClick","handleHeaderKeyDown","useImperativeHandle","hide","show","comboBoxGroups","map","createElement","Fragment","groupName","StyledComboBoxTopic","isSelected","StyledComboBox","$minWidth","$shouldUseFullWidth","onBlur","StyledComboBoxHeader","$direction","onClick","$isOpen","$isTouch","$size","$shouldShowTransparentBackground","$isDisabled","$shouldChangeColor","$shouldShowBigImage","$shouldShowKeyboardHighlighting","onKeyDown","role","StyledComboBoxPrefixAndPlaceholderWrapper","StyledComboBoxPrefix","$prefixMinWidth","StyledComboBoxPlaceholder","$shouldReduceOpacity","StyledComboBoxPlaceholderImage","src","$shouldShowRoundImage","StyledComboBoxInput","disabled","onChange","onFocus","StyledComboBoxPlaceholderText","suffixElement","StyledComboBoxClearIconWrapper","StyledComboBoxIconWrapper","$shouldShowBorderLeft","anchorElement","onClose","shouldShowDropdown","minBodyWidth","StyledComboBoxBody","$maxHeight","className","displayName","_default","exports"],"sources":["../../../../src/components/combobox/ComboBox.tsx"],"sourcesContent":["import { useFunctions, useValues } from 'chayns-api';\nimport React, {\n FocusEventHandler,\n KeyboardEventHandler,\n forwardRef,\n Fragment,\n useCallback,\n useContext,\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { useIsTouch } from '../../utils/environment';\nimport { AreaContext } from '../area-provider/AreaContextProvider';\nimport Icon from '../icon/Icon';\nimport ComboBoxItem from './combobox-item/ComboBoxItem';\nimport {\n StyledComboBox,\n StyledComboBoxBody,\n StyledComboBoxClearIconWrapper,\n StyledComboBoxHeader,\n StyledComboBoxIconWrapper,\n StyledComboBoxInput,\n StyledComboBoxPlaceholder,\n StyledComboBoxPlaceholderImage,\n StyledComboBoxPlaceholderText,\n StyledComboBoxPrefix,\n StyledComboBoxPrefixAndPlaceholderWrapper,\n StyledComboBoxTopic,\n} from './ComboBox.styles';\nimport DropdownBodyWrapper from '../dropdown-body-wrapper/DropdownBodyWrapper';\nimport { DropdownDirection } from '../../types/dropdown';\nimport { useElementSize } from '../../hooks/element';\nimport { ComboBoxProps, ComboBoxRef, ComboBoxSize, IComboBoxItem } from './ComboBox.types';\nimport { getComboBoxWidthResult } from './ComboBox.utils';\nimport { useKeyboardFocusHighlighting } from '../../hooks/useKeyboardFocusHighlighting';\n\nconst ComboBox = forwardRef<ComboBoxRef, ComboBoxProps>(\n (\n {\n bodyWidth,\n direction = DropdownDirection.RIGHT,\n isDisabled = false,\n lists,\n maxHeight = 280,\n onSelect,\n placeholder,\n prefix,\n container,\n shouldCaptureEvents,\n selectedItem,\n onHide,\n onShow,\n shouldShowBigImage,\n shouldShowClearIcon,\n shouldShowRoundImage,\n onInputFocus,\n prefixMinWidth,\n size = ComboBoxSize.NORMAL,\n shouldUseFullWidth = false,\n onInputChange,\n shouldUseCurrentItemWidth = false,\n onInputBlur,\n shouldShowTransparentBackground = false,\n inputValue,\n shouldDropDownUseMaxItemWidth = false,\n shouldEnableKeyboardHighlighting,\n },\n ref,\n ) => {\n const [internalSelectedItem, setInternalSelectedItem] = useState<IComboBoxItem>();\n const [isAnimating, setIsAnimating] = useState(false);\n const [minWidth, setMinWidth] = useState<number | undefined>(undefined);\n const [bodyMinWidth, setBodyMinWidth] = useState(0);\n const [focusedIndex, setFocusedIndex] = useState<number | null>(null);\n\n const isInputFocused = useRef(false);\n const styledComboBoxElementRef = useRef<HTMLDivElement>(null);\n const comboBoxHeaderRef = useRef<HTMLDivElement>(null);\n const comboBoxInputRef = useRef<HTMLInputElement>(null);\n const contentRef = useRef<HTMLDivElement | null>(null);\n\n const parentSize = useElementSize(styledComboBoxElementRef, {\n shouldUseParentElement: true,\n });\n\n const functions = useFunctions();\n const values = useValues();\n const isTouch = useIsTouch();\n const areaProvider = useContext(AreaContext);\n\n useEffect(() => {\n if (!parentSize) {\n return;\n }\n\n const { minWidth: calculatedMinWidth, bodyMinWidth: calculatedBodyMinWidth } =\n getComboBoxWidthResult({\n functions,\n internalSelectedItem,\n lists,\n parentWidth: parentSize.width,\n placeholder,\n prefix,\n prefixMinWidth,\n selectedItem,\n shouldDropDownUseMaxItemWidth,\n shouldShowBigImage,\n shouldShowClearIcon,\n shouldUseCurrentItemWidth,\n shouldUseFullWidth,\n values,\n });\n\n setMinWidth(calculatedMinWidth);\n setBodyMinWidth(calculatedBodyMinWidth);\n }, [\n functions,\n internalSelectedItem,\n lists,\n parentSize,\n placeholder,\n prefix,\n prefixMinWidth,\n selectedItem,\n shouldDropDownUseMaxItemWidth,\n shouldShowBigImage,\n shouldShowClearIcon,\n shouldUseCurrentItemWidth,\n shouldUseFullWidth,\n values,\n ]);\n\n const shouldChangeColor = useMemo(\n () => areaProvider.shouldChangeColor ?? false,\n [areaProvider.shouldChangeColor],\n );\n\n const shouldShowKeyboardHighlighting = useKeyboardFocusHighlighting(\n shouldEnableKeyboardHighlighting && !isDisabled,\n );\n\n const shouldDisableActions = useMemo(() => {\n if (!selectedItem) {\n return false;\n }\n\n const combinedLists = lists.flatMap((list) => list.list);\n\n return (\n combinedLists.length === 1 &&\n combinedLists.some((item) => item.value === selectedItem.value)\n );\n }, [lists, selectedItem]);\n\n const contentHeight = useMemo(() => {\n const flatItems = lists.flatMap((list) => list.list);\n\n let height = flatItems.reduce((value, item) => {\n const isBigItem =\n shouldShowBigImage ||\n (typeof item.subtext === 'string' && item.subtext.trim() !== '');\n\n return value + (isBigItem ? 56 : 38);\n }, 0);\n\n if (lists.length > 1) {\n height += lists.length * 38;\n }\n\n if (maxHeight < height) {\n height = maxHeight;\n }\n\n return height;\n }, [lists, maxHeight, shouldShowBigImage]);\n\n const handleInputFocus: FocusEventHandler<HTMLInputElement> = useCallback(\n (event) => {\n isInputFocused.current = true;\n onInputFocus?.(event);\n },\n [onInputFocus],\n );\n\n const handleInputBlur: FocusEventHandler<HTMLInputElement> = useCallback(\n (event) => {\n isInputFocused.current = false;\n onInputBlur?.(event);\n },\n [onInputBlur],\n );\n\n const handleOpen = useCallback(() => {\n if (typeof onShow === 'function') {\n onShow();\n }\n\n setIsAnimating(true);\n }, [onShow]);\n\n const handleClose = useCallback(() => {\n if (typeof onHide === 'function') {\n onHide();\n }\n\n setIsAnimating(false);\n }, [onHide]);\n\n const handleContainerBlur = useCallback(\n (event: React.FocusEvent<HTMLDivElement>) => {\n const nextFocusedElement = event.relatedTarget as Node | null;\n const currentContainer = event.currentTarget as HTMLElement;\n\n if (\n !nextFocusedElement ||\n (!currentContainer.contains(nextFocusedElement) &&\n !contentRef.current?.contains(nextFocusedElement))\n ) {\n handleClose();\n }\n },\n [handleClose],\n );\n\n const restoreTriggerFocus = useCallback(() => {\n // Delay is needed so focus happens after dropdown close/render cycle.\n requestAnimationFrame(() => {\n if (typeof inputValue === 'string') {\n comboBoxInputRef.current?.focus();\n return;\n }\n\n comboBoxHeaderRef.current?.focus();\n });\n }, [inputValue]);\n\n /**\n * This function sets the selected item\n */\n const handleSetSelectedItem = useCallback(\n (itemToSelect?: IComboBoxItem) => {\n if (typeof onSelect === 'function') {\n const onSelectResult = onSelect(itemToSelect);\n\n if (onSelectResult === false) {\n return;\n }\n\n if (onSelectResult instanceof Promise) {\n void onSelectResult.then((shouldPreventSelection) => {\n if (shouldPreventSelection) return;\n\n setInternalSelectedItem(itemToSelect);\n handleClose();\n restoreTriggerFocus();\n });\n\n return;\n }\n }\n\n setInternalSelectedItem(itemToSelect);\n handleClose();\n restoreTriggerFocus();\n },\n [handleClose, onSelect, restoreTriggerFocus],\n );\n\n const handleClear = useCallback(\n (event: React.MouseEvent<HTMLDivElement>) => {\n event.preventDefault();\n event.stopPropagation();\n\n handleSetSelectedItem(undefined);\n },\n [handleSetSelectedItem],\n );\n\n useEffect(() => {\n const handleKeyDown = (e: KeyboardEvent) => {\n if (!isAnimating) return;\n\n if (e.key === 'Escape') {\n e.preventDefault();\n handleClose();\n restoreTriggerFocus();\n return;\n }\n\n if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {\n e.preventDefault();\n\n const children = contentRef.current?.children;\n\n if (!children || children.length === 0) return;\n\n const stepDirection = e.key === 'ArrowUp' ? -1 : 1;\n\n let newIndex = focusedIndex ?? -1;\n\n let attempts = 0;\n\n do {\n newIndex = (newIndex + stepDirection + children.length) % children.length;\n\n const newElement = children[newIndex] as HTMLDivElement;\n\n let shouldSkip = false;\n\n if (\n newElement.id.startsWith('combobox-group--') ||\n newElement.id.endsWith('--disabled-item')\n ) {\n shouldSkip = true;\n }\n\n if (!shouldSkip) break;\n\n attempts++;\n } while (attempts < children.length);\n\n if (focusedIndex !== null) {\n const prevElement = children[focusedIndex] as HTMLDivElement;\n\n prevElement.tabIndex = -1;\n }\n\n setFocusedIndex(newIndex);\n\n const focusedElement = children[newIndex] as HTMLDivElement;\n\n focusedElement.tabIndex = 0;\n focusedElement.focus();\n } else if (e.key === 'Enter' && focusedIndex !== null) {\n const element = contentRef.current?.children[focusedIndex];\n\n if (!element) return;\n\n const { id } = element;\n\n let newSelectedItem: IComboBoxItem | undefined;\n\n lists.some((list) => {\n newSelectedItem = list.list.find(\n ({ value }) => String(value) === id.replace('combobox-item__', ''),\n );\n\n return !!newSelectedItem;\n });\n\n if (newSelectedItem) {\n handleSetSelectedItem(newSelectedItem);\n }\n }\n };\n\n document.addEventListener('keydown', handleKeyDown);\n\n return () => document.removeEventListener('keydown', handleKeyDown);\n }, [\n focusedIndex,\n handleClose,\n handleSetSelectedItem,\n isAnimating,\n lists,\n restoreTriggerFocus,\n ]);\n\n /**\n * This function sets the external selected item\n */\n useEffect(() => {\n setIsAnimating(false);\n setInternalSelectedItem(selectedItem);\n }, [selectedItem]);\n\n const placeholderImageUrl = useMemo(() => {\n if (selectedItem) {\n return selectedItem.imageUrl;\n }\n\n if (internalSelectedItem) {\n return internalSelectedItem.imageUrl;\n }\n\n return undefined;\n }, [internalSelectedItem, selectedItem]);\n\n const placeholderIcon = useMemo(() => {\n if (selectedItem) {\n return selectedItem.icons;\n }\n\n if (internalSelectedItem) {\n return internalSelectedItem.icons;\n }\n\n return undefined;\n }, [internalSelectedItem, selectedItem]);\n\n /**\n * This function resets the placeholder\n */\n const placeholderText = useMemo(() => {\n let text = placeholder;\n\n if (selectedItem) {\n text = selectedItem.text;\n } else if (internalSelectedItem) {\n text = internalSelectedItem.text;\n }\n\n return text;\n }, [internalSelectedItem, placeholder, selectedItem]);\n\n const shouldShowRoundPlaceholderImage = useMemo(() => {\n const selectedItemList = lists.find((list) =>\n list.list.some(\n ({ value }) => value === (selectedItem?.value ?? internalSelectedItem?.value),\n ),\n );\n\n return selectedItemList?.shouldShowRoundImage ?? shouldShowRoundImage;\n }, [internalSelectedItem?.value, lists, selectedItem?.value, shouldShowRoundImage]);\n\n /**\n * This function opens the content of the combobox\n */\n const handleHeaderClick = useCallback(() => {\n if (!isDisabled && !isInputFocused.current) {\n if (isAnimating) {\n handleClose();\n } else {\n handleOpen();\n }\n }\n }, [handleClose, handleOpen, isAnimating, isDisabled]);\n\n const handleHeaderKeyDown: KeyboardEventHandler<HTMLDivElement> = useCallback(\n (event) => {\n if (isDisabled || typeof inputValue === 'string') {\n return;\n }\n\n if (event.key === 'Escape' && isAnimating) {\n event.preventDefault();\n handleClose();\n restoreTriggerFocus();\n return;\n }\n\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n handleHeaderClick();\n }\n },\n [\n handleClose,\n handleHeaderClick,\n inputValue,\n isAnimating,\n isDisabled,\n restoreTriggerFocus,\n ],\n );\n\n useImperativeHandle(\n ref,\n () => ({\n hide: handleClose,\n show: handleOpen,\n }),\n [handleClose, handleOpen],\n );\n\n const comboBoxGroups = useMemo(\n () =>\n lists.map((list) => (\n <Fragment key={list.groupName ?? 'default-group'}>\n {list.groupName && lists.length > 1 && (\n <StyledComboBoxTopic id={`combobox-group--${list.groupName}`}>\n {list.groupName}\n </StyledComboBoxTopic>\n )}\n {list.list.map((item) => (\n <ComboBoxItem\n key={`item-${item.text}`}\n item={item}\n isSelected={\n selectedItem ? item.value === selectedItem.value : false\n }\n onSelect={handleSetSelectedItem}\n shouldShowBigImage={shouldShowBigImage}\n shouldShowRoundImage={\n list.shouldShowRoundImage ?? shouldShowRoundImage\n }\n />\n ))}\n </Fragment>\n )),\n [handleSetSelectedItem, lists, selectedItem, shouldShowBigImage, shouldShowRoundImage],\n );\n\n return useMemo(\n () => (\n <StyledComboBox\n ref={styledComboBoxElementRef}\n $minWidth={minWidth}\n $shouldUseFullWidth={shouldUseFullWidth}\n onBlur={handleContainerBlur}\n >\n <StyledComboBoxHeader\n ref={comboBoxHeaderRef}\n $direction={direction}\n onClick={handleHeaderClick}\n $isOpen={isAnimating}\n $isTouch={isTouch}\n $size={size}\n $shouldShowTransparentBackground={shouldShowTransparentBackground}\n $isDisabled={isDisabled}\n $shouldChangeColor={shouldChangeColor}\n $shouldShowBigImage={shouldShowBigImage}\n $shouldShowKeyboardHighlighting={shouldShowKeyboardHighlighting}\n onKeyDown={handleHeaderKeyDown}\n tabIndex={!isDisabled && typeof inputValue !== 'string' ? 0 : undefined}\n role={!isDisabled && typeof inputValue !== 'string' ? 'button' : undefined}\n aria-expanded={\n !isDisabled && typeof inputValue !== 'string' ? isAnimating : undefined\n }\n >\n <StyledComboBoxPrefixAndPlaceholderWrapper>\n {prefix && (\n <StyledComboBoxPrefix $prefixMinWidth={prefixMinWidth}>\n {prefix}\n </StyledComboBoxPrefix>\n )}\n <StyledComboBoxPlaceholder\n $shouldReduceOpacity={!selectedItem && !internalSelectedItem}\n >\n {placeholderImageUrl && (\n <StyledComboBoxPlaceholderImage\n src={placeholderImageUrl}\n $shouldShowBigImage={shouldShowBigImage}\n $shouldShowRoundImage={shouldShowRoundPlaceholderImage}\n />\n )}\n {placeholderIcon && <Icon icons={placeholderIcon} />}\n {typeof inputValue === 'string' ? (\n <StyledComboBoxInput\n ref={comboBoxInputRef}\n disabled={isDisabled}\n value={inputValue}\n onChange={onInputChange}\n onBlur={handleInputBlur}\n onFocus={handleInputFocus}\n placeholder={placeholderText}\n />\n ) : (\n <StyledComboBoxPlaceholderText>\n {placeholderText}\n </StyledComboBoxPlaceholderText>\n )}\n {internalSelectedItem &&\n internalSelectedItem.suffixElement &&\n internalSelectedItem.suffixElement}\n </StyledComboBoxPlaceholder>\n </StyledComboBoxPrefixAndPlaceholderWrapper>\n {shouldShowClearIcon && internalSelectedItem && (\n <StyledComboBoxClearIconWrapper\n $isDisabled={isDisabled}\n onClick={handleClear}\n >\n <Icon icons={['fa fa-times']} />\n </StyledComboBoxClearIconWrapper>\n )}\n {!shouldDisableActions && (\n <StyledComboBoxIconWrapper\n $isDisabled={isDisabled}\n $size={size}\n $shouldShowBorderLeft={\n shouldShowClearIcon === true &&\n internalSelectedItem !== undefined\n }\n >\n <Icon icons={['fa fa-chevron-down']} isDisabled={isDisabled} />\n </StyledComboBoxIconWrapper>\n )}\n </StyledComboBoxHeader>\n {styledComboBoxElementRef.current && (\n <DropdownBodyWrapper\n anchorElement={styledComboBoxElementRef.current}\n bodyWidth={bodyWidth}\n contentHeight={contentHeight}\n shouldCaptureEvents={shouldCaptureEvents}\n onClose={handleClose}\n direction={direction}\n container={container}\n shouldShowDropdown={isAnimating}\n minBodyWidth={bodyWidth ?? bodyMinWidth}\n >\n <StyledComboBoxBody\n $maxHeight={maxHeight}\n $minWidth={bodyWidth ?? bodyMinWidth}\n className=\"chayns-scrollbar\"\n ref={contentRef}\n tabIndex={0}\n >\n {comboBoxGroups}\n </StyledComboBoxBody>\n </DropdownBodyWrapper>\n )}\n </StyledComboBox>\n ),\n [\n bodyMinWidth,\n bodyWidth,\n comboBoxGroups,\n container,\n contentHeight,\n direction,\n handleClear,\n handleClose,\n handleHeaderClick,\n handleHeaderKeyDown,\n handleInputBlur,\n handleInputFocus,\n inputValue,\n internalSelectedItem,\n isAnimating,\n isDisabled,\n isTouch,\n maxHeight,\n minWidth,\n onInputChange,\n placeholderIcon,\n placeholderImageUrl,\n placeholderText,\n prefix,\n prefixMinWidth,\n selectedItem,\n shouldChangeColor,\n shouldDisableActions,\n shouldCaptureEvents,\n shouldShowKeyboardHighlighting,\n shouldShowBigImage,\n shouldShowClearIcon,\n shouldShowRoundPlaceholderImage,\n shouldShowTransparentBackground,\n shouldUseFullWidth,\n size,\n ],\n );\n },\n);\n\nComboBox.displayName = 'ComboBox';\n\nexport default ComboBox;\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AAaA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,oBAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,aAAA,GAAAD,sBAAA,CAAAN,OAAA;AACA,IAAAQ,SAAA,GAAAR,OAAA;AAcA,IAAAS,oBAAA,GAAAH,sBAAA,CAAAN,OAAA;AACA,IAAAU,SAAA,GAAAV,OAAA;AACA,IAAAW,QAAA,GAAAX,OAAA;AACA,IAAAY,UAAA,GAAAZ,OAAA;AACA,IAAAa,UAAA,GAAAb,OAAA;AACA,IAAAc,6BAAA,GAAAd,OAAA;AAAwF,SAAAM,uBAAAS,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAb,wBAAAa,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,Y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,cAAc,EACdP,YAAY,EACZwD,iBAAiB,EACjBI,oBAAoB,EACpB7D,mBAAmB,EACnB2D,8BAA8B,EAC9BvD,kBAAkB,EAClBC,mBAAmB,EACnBiI,+BAA+B,EAC/BtH,+BAA+B,EAC/BJ,kBAAkB,EAClBH,IAAI,CAEZ,CAAC;AACL,CACJ,CAAC;AAEDtB,QAAQ,CAAC0M,WAAW,GAAG,UAAU;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAA7N,OAAA,GAEnBiB,QAAQ","ignoreList":[]}
1
+ {"version":3,"file":"ComboBox.js","names":["_chaynsApi","require","_react","_interopRequireWildcard","_environment","_AreaContextProvider","_Icon","_interopRequireDefault","_ComboBoxItem","_ComboBox","_DropdownBodyWrapper","_dropdown","_element","_ComboBox2","_ComboBox3","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ComboBox","forwardRef","bodyWidth","direction","DropdownDirection","RIGHT","isDisabled","lists","maxHeight","onSelect","placeholder","prefix","container","shouldCaptureEvents","selectedItem","onHide","onShow","shouldShowBigImage","shouldShowClearIcon","shouldShowRoundImage","onInputFocus","prefixMinWidth","size","ComboBoxSize","NORMAL","shouldUseFullWidth","onInputChange","shouldUseCurrentItemWidth","onInputBlur","shouldShowTransparentBackground","inputValue","shouldDropDownUseMaxItemWidth","ref","internalSelectedItem","setInternalSelectedItem","useState","isAnimating","setIsAnimating","minWidth","setMinWidth","undefined","bodyMinWidth","setBodyMinWidth","focusedIndex","setFocusedIndex","availableMaxHeight","setAvailableMaxHeight","isInputFocused","useRef","styledComboBoxElementRef","contentRef","parentSize","useElementSize","shouldUseParentElement","functions","useFunctions","values","useValues","isTouch","useIsTouch","areaProvider","useContext","AreaContext","useEffect","calculatedMinWidth","calculatedBodyMinWidth","getComboBoxWidthResult","parentWidth","width","shouldChangeColor","useMemo","shouldDisableActions","combinedLists","flatMap","list","length","some","item","value","effectiveMaxHeight","Math","min","contentHeight","flatItems","height","reduce","isBigItem","subtext","trim","handleInputFocus","useCallback","event","current","handleInputBlur","handleOpen","handleClose","handleSetSelectedItem","itemToSelect","onSelectResult","Promise","then","shouldPreventSelection","handleClear","preventDefault","stopPropagation","handleKeyDown","key","_contentRef$current","children","stepDirection","newIndex","attempts","newElement","shouldSkip","id","startsWith","endsWith","prevElement","tabIndex","focusedElement","focus","_contentRef$current2","element","newSelectedItem","find","String","replace","document","addEventListener","removeEventListener","placeholderImageUrl","imageUrl","placeholderIcon","icons","placeholderText","text","shouldShowRoundPlaceholderImage","selectedItemList","handleHeaderClick","useImperativeHandle","hide","show","comboBoxGroups","map","createElement","Fragment","groupName","StyledComboBoxTopic","isSelected","StyledComboBox","$minWidth","$shouldUseFullWidth","StyledComboBoxHeader","$direction","onClick","$isOpen","$isTouch","$size","$shouldShowTransparentBackground","$isDisabled","$shouldChangeColor","$shouldShowBigImage","StyledComboBoxPrefixAndPlaceholderWrapper","StyledComboBoxPrefix","$prefixMinWidth","StyledComboBoxPlaceholder","$shouldReduceOpacity","StyledComboBoxPlaceholderImage","src","$shouldShowRoundImage","StyledComboBoxInput","disabled","onChange","onBlur","onFocus","StyledComboBoxPlaceholderText","suffixElement","StyledComboBoxClearIconWrapper","StyledComboBoxIconWrapper","$shouldShowBorderLeft","anchorElement","onAvailableMaxHeightChange","onClose","shouldShowDropdown","minBodyWidth","StyledComboBoxBody","$maxHeight","className","displayName","_default","exports"],"sources":["../../../../src/components/combobox/ComboBox.tsx"],"sourcesContent":["import { useFunctions, useValues } from 'chayns-api';\nimport React, {\n FocusEventHandler,\n forwardRef,\n Fragment,\n useCallback,\n useContext,\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { useIsTouch } from '../../utils/environment';\nimport { AreaContext } from '../area-provider/AreaContextProvider';\nimport Icon from '../icon/Icon';\nimport ComboBoxItem from './combobox-item/ComboBoxItem';\nimport {\n StyledComboBox,\n StyledComboBoxBody,\n StyledComboBoxClearIconWrapper,\n StyledComboBoxHeader,\n StyledComboBoxIconWrapper,\n StyledComboBoxInput,\n StyledComboBoxPlaceholder,\n StyledComboBoxPlaceholderImage,\n StyledComboBoxPlaceholderText,\n StyledComboBoxPrefix,\n StyledComboBoxPrefixAndPlaceholderWrapper,\n StyledComboBoxTopic,\n} from './ComboBox.styles';\nimport DropdownBodyWrapper from '../dropdown-body-wrapper/DropdownBodyWrapper';\nimport { DropdownDirection } from '../../types/dropdown';\nimport { useElementSize } from '../../hooks/element';\nimport { ComboBoxProps, ComboBoxRef, ComboBoxSize, IComboBoxItem } from './ComboBox.types';\nimport { getComboBoxWidthResult } from './ComboBox.utils';\n\nconst ComboBox = forwardRef<ComboBoxRef, ComboBoxProps>(\n (\n {\n bodyWidth,\n direction = DropdownDirection.RIGHT,\n isDisabled = false,\n lists,\n maxHeight = 280,\n onSelect,\n placeholder,\n prefix,\n container,\n shouldCaptureEvents,\n selectedItem,\n onHide,\n onShow,\n shouldShowBigImage,\n shouldShowClearIcon,\n shouldShowRoundImage,\n onInputFocus,\n prefixMinWidth,\n size = ComboBoxSize.NORMAL,\n shouldUseFullWidth = false,\n onInputChange,\n shouldUseCurrentItemWidth = false,\n onInputBlur,\n shouldShowTransparentBackground = false,\n inputValue,\n shouldDropDownUseMaxItemWidth = false,\n },\n ref,\n ) => {\n const [internalSelectedItem, setInternalSelectedItem] = useState<IComboBoxItem>();\n const [isAnimating, setIsAnimating] = useState(false);\n const [minWidth, setMinWidth] = useState<number | undefined>(undefined);\n const [bodyMinWidth, setBodyMinWidth] = useState(0);\n const [focusedIndex, setFocusedIndex] = useState<number | null>(null);\n const [availableMaxHeight, setAvailableMaxHeight] = useState<number | undefined>(undefined);\n\n const isInputFocused = useRef(false);\n const styledComboBoxElementRef = useRef<HTMLDivElement>(null);\n const contentRef = useRef<HTMLDivElement | null>(null);\n\n const parentSize = useElementSize(styledComboBoxElementRef, {\n shouldUseParentElement: true,\n });\n\n const functions = useFunctions();\n const values = useValues();\n const isTouch = useIsTouch();\n const areaProvider = useContext(AreaContext);\n\n useEffect(() => {\n if (!parentSize) {\n return;\n }\n\n const { minWidth: calculatedMinWidth, bodyMinWidth: calculatedBodyMinWidth } =\n getComboBoxWidthResult({\n functions,\n internalSelectedItem,\n lists,\n parentWidth: parentSize.width,\n placeholder,\n prefix,\n prefixMinWidth,\n selectedItem,\n shouldDropDownUseMaxItemWidth,\n shouldShowBigImage,\n shouldShowClearIcon,\n shouldUseCurrentItemWidth,\n shouldUseFullWidth,\n values,\n });\n\n setMinWidth(calculatedMinWidth);\n setBodyMinWidth(calculatedBodyMinWidth);\n }, [\n functions,\n internalSelectedItem,\n lists,\n parentSize,\n placeholder,\n prefix,\n prefixMinWidth,\n selectedItem,\n shouldDropDownUseMaxItemWidth,\n shouldShowBigImage,\n shouldShowClearIcon,\n shouldUseCurrentItemWidth,\n shouldUseFullWidth,\n values,\n ]);\n\n const shouldChangeColor = useMemo(\n () => areaProvider.shouldChangeColor ?? false,\n [areaProvider.shouldChangeColor],\n );\n\n const shouldDisableActions = useMemo(() => {\n if (!selectedItem) {\n return false;\n }\n\n const combinedLists = lists.flatMap((list) => list.list);\n\n return (\n combinedLists.length === 1 &&\n combinedLists.some((item) => item.value === selectedItem.value)\n );\n }, [lists, selectedItem]);\n\n // Limits the configured maxHeight by the height that is actually available inside the\n // container (reported by the DropdownBodyWrapper). This prevents the dropdown from being cut\n // off when it is opened to the top or bottom and there is not enough space.\n const effectiveMaxHeight = useMemo(() => {\n if (typeof availableMaxHeight === 'number' && availableMaxHeight > 0) {\n return Math.min(maxHeight, availableMaxHeight);\n }\n\n return maxHeight;\n }, [availableMaxHeight, maxHeight]);\n\n const contentHeight = useMemo(() => {\n const flatItems = lists.flatMap((list) => list.list);\n\n let height = flatItems.reduce((value, item) => {\n const isBigItem =\n shouldShowBigImage ||\n (typeof item.subtext === 'string' && item.subtext.trim() !== '');\n\n return value + (isBigItem ? 56 : 38);\n }, 0);\n\n if (lists.length > 1) {\n height += lists.length * 38;\n }\n\n if (effectiveMaxHeight < height) {\n height = effectiveMaxHeight;\n }\n\n return height;\n }, [effectiveMaxHeight, lists, shouldShowBigImage]);\n\n const handleInputFocus: FocusEventHandler<HTMLInputElement> = useCallback(\n (event) => {\n isInputFocused.current = true;\n onInputFocus?.(event);\n },\n [onInputFocus],\n );\n\n const handleInputBlur: FocusEventHandler<HTMLInputElement> = useCallback(\n (event) => {\n isInputFocused.current = false;\n onInputBlur?.(event);\n },\n [onInputBlur],\n );\n\n const handleOpen = useCallback(() => {\n if (typeof onShow === 'function') {\n onShow();\n }\n\n setIsAnimating(true);\n }, [onShow]);\n\n const handleClose = useCallback(() => {\n if (typeof onHide === 'function') {\n onHide();\n }\n\n setIsAnimating(false);\n }, [onHide]);\n\n /**\n * This function sets the selected item\n */\n const handleSetSelectedItem = useCallback(\n (itemToSelect?: IComboBoxItem) => {\n if (typeof onSelect === 'function') {\n const onSelectResult = onSelect(itemToSelect);\n\n if (onSelectResult === false) {\n return;\n }\n\n if (onSelectResult instanceof Promise) {\n void onSelectResult.then((shouldPreventSelection) => {\n if (shouldPreventSelection) return;\n\n setInternalSelectedItem(itemToSelect);\n handleClose();\n });\n\n return;\n }\n }\n\n setInternalSelectedItem(itemToSelect);\n handleClose();\n },\n [handleClose, onSelect],\n );\n\n const handleClear = useCallback(\n (event: React.MouseEvent<HTMLDivElement>) => {\n event.preventDefault();\n event.stopPropagation();\n\n handleSetSelectedItem(undefined);\n },\n [handleSetSelectedItem],\n );\n\n useEffect(() => {\n const handleKeyDown = (e: KeyboardEvent) => {\n if (!isAnimating) return;\n\n if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {\n e.preventDefault();\n\n const children = contentRef.current?.children;\n\n if (!children || children.length === 0) return;\n\n const stepDirection = e.key === 'ArrowUp' ? -1 : 1;\n\n let newIndex = focusedIndex ?? -1;\n\n let attempts = 0;\n\n do {\n newIndex = (newIndex + stepDirection + children.length) % children.length;\n\n const newElement = children[newIndex] as HTMLDivElement;\n\n let shouldSkip = false;\n\n if (\n newElement.id.startsWith('combobox-group--') ||\n newElement.id.endsWith('--disabled-item')\n ) {\n shouldSkip = true;\n }\n\n if (!shouldSkip) break;\n\n attempts++;\n } while (attempts < children.length);\n\n if (focusedIndex !== null) {\n const prevElement = children[focusedIndex] as HTMLDivElement;\n\n prevElement.tabIndex = -1;\n }\n\n setFocusedIndex(newIndex);\n\n const focusedElement = children[newIndex] as HTMLDivElement;\n\n focusedElement.tabIndex = 0;\n focusedElement.focus();\n } else if (e.key === 'Enter' && focusedIndex !== null) {\n const element = contentRef.current?.children[focusedIndex];\n\n if (!element) return;\n\n const { id } = element;\n\n let newSelectedItem: IComboBoxItem | undefined;\n\n lists.some((list) => {\n newSelectedItem = list.list.find(\n ({ value }) => String(value) === id.replace('combobox-item__', ''),\n );\n\n return !!newSelectedItem;\n });\n\n if (newSelectedItem) {\n handleSetSelectedItem(newSelectedItem);\n }\n }\n };\n\n document.addEventListener('keydown', handleKeyDown);\n\n return () => document.removeEventListener('keydown', handleKeyDown);\n }, [focusedIndex, handleSetSelectedItem, isAnimating, lists]);\n\n /**\n * This function sets the external selected item\n */\n useEffect(() => {\n setIsAnimating(false);\n setInternalSelectedItem(selectedItem);\n }, [selectedItem]);\n\n const placeholderImageUrl = useMemo(() => {\n if (selectedItem) {\n return selectedItem.imageUrl;\n }\n\n if (internalSelectedItem) {\n return internalSelectedItem.imageUrl;\n }\n\n return undefined;\n }, [internalSelectedItem, selectedItem]);\n\n const placeholderIcon = useMemo(() => {\n if (selectedItem) {\n return selectedItem.icons;\n }\n\n if (internalSelectedItem) {\n return internalSelectedItem.icons;\n }\n\n return undefined;\n }, [internalSelectedItem, selectedItem]);\n\n /**\n * This function resets the placeholder\n */\n const placeholderText = useMemo(() => {\n let text = placeholder;\n\n if (selectedItem) {\n text = selectedItem.text;\n } else if (internalSelectedItem) {\n text = internalSelectedItem.text;\n }\n\n return text;\n }, [internalSelectedItem, placeholder, selectedItem]);\n\n const shouldShowRoundPlaceholderImage = useMemo(() => {\n const selectedItemList = lists.find((list) =>\n list.list.some(\n ({ value }) => value === (selectedItem?.value ?? internalSelectedItem?.value),\n ),\n );\n\n return selectedItemList?.shouldShowRoundImage ?? shouldShowRoundImage;\n }, [internalSelectedItem?.value, lists, selectedItem?.value, shouldShowRoundImage]);\n\n /**\n * This function opens the content of the combobox\n */\n const handleHeaderClick = useCallback(() => {\n if (!isDisabled && !isInputFocused.current) {\n if (isAnimating) {\n handleClose();\n } else {\n handleOpen();\n }\n }\n }, [handleClose, handleOpen, isAnimating, isDisabled]);\n\n useImperativeHandle(\n ref,\n () => ({\n hide: handleClose,\n show: handleOpen,\n }),\n [handleClose, handleOpen],\n );\n\n const comboBoxGroups = useMemo(\n () =>\n lists.map((list) => (\n <Fragment key={list.groupName ?? 'default-group'}>\n {list.groupName && lists.length > 1 && (\n <StyledComboBoxTopic id={`combobox-group--${list.groupName}`}>\n {list.groupName}\n </StyledComboBoxTopic>\n )}\n {list.list.map((item) => (\n <ComboBoxItem\n key={`item-${item.text}`}\n item={item}\n isSelected={\n selectedItem ? item.value === selectedItem.value : false\n }\n onSelect={handleSetSelectedItem}\n shouldShowBigImage={shouldShowBigImage}\n shouldShowRoundImage={\n list.shouldShowRoundImage ?? shouldShowRoundImage\n }\n />\n ))}\n </Fragment>\n )),\n [handleSetSelectedItem, lists, selectedItem, shouldShowBigImage, shouldShowRoundImage],\n );\n\n return useMemo(\n () => (\n <StyledComboBox\n ref={styledComboBoxElementRef}\n $minWidth={minWidth}\n $shouldUseFullWidth={shouldUseFullWidth}\n >\n <StyledComboBoxHeader\n $direction={direction}\n onClick={handleHeaderClick}\n $isOpen={isAnimating}\n $isTouch={isTouch}\n $size={size}\n $shouldShowTransparentBackground={shouldShowTransparentBackground}\n $isDisabled={isDisabled}\n $shouldChangeColor={shouldChangeColor}\n $shouldShowBigImage={shouldShowBigImage}\n >\n <StyledComboBoxPrefixAndPlaceholderWrapper>\n {prefix && (\n <StyledComboBoxPrefix $prefixMinWidth={prefixMinWidth}>\n {prefix}\n </StyledComboBoxPrefix>\n )}\n <StyledComboBoxPlaceholder\n $shouldReduceOpacity={!selectedItem && !internalSelectedItem}\n >\n {placeholderImageUrl && (\n <StyledComboBoxPlaceholderImage\n src={placeholderImageUrl}\n $shouldShowBigImage={shouldShowBigImage}\n $shouldShowRoundImage={shouldShowRoundPlaceholderImage}\n />\n )}\n {placeholderIcon && <Icon icons={placeholderIcon} />}\n {typeof inputValue === 'string' ? (\n <StyledComboBoxInput\n disabled={isDisabled}\n value={inputValue}\n onChange={onInputChange}\n onBlur={handleInputBlur}\n onFocus={handleInputFocus}\n placeholder={placeholderText}\n />\n ) : (\n <StyledComboBoxPlaceholderText>\n {placeholderText}\n </StyledComboBoxPlaceholderText>\n )}\n {internalSelectedItem &&\n internalSelectedItem.suffixElement &&\n internalSelectedItem.suffixElement}\n </StyledComboBoxPlaceholder>\n </StyledComboBoxPrefixAndPlaceholderWrapper>\n {shouldShowClearIcon && internalSelectedItem && (\n <StyledComboBoxClearIconWrapper\n $isDisabled={isDisabled}\n onClick={handleClear}\n >\n <Icon icons={['fa fa-times']} />\n </StyledComboBoxClearIconWrapper>\n )}\n {!shouldDisableActions && (\n <StyledComboBoxIconWrapper\n $isDisabled={isDisabled}\n $size={size}\n $shouldShowBorderLeft={\n shouldShowClearIcon === true &&\n internalSelectedItem !== undefined\n }\n >\n <Icon icons={['fa fa-chevron-down']} isDisabled={isDisabled} />\n </StyledComboBoxIconWrapper>\n )}\n </StyledComboBoxHeader>\n {styledComboBoxElementRef.current && (\n <DropdownBodyWrapper\n anchorElement={styledComboBoxElementRef.current}\n bodyWidth={bodyWidth}\n contentHeight={contentHeight}\n shouldCaptureEvents={shouldCaptureEvents}\n onAvailableMaxHeightChange={setAvailableMaxHeight}\n onClose={handleClose}\n direction={direction}\n container={container}\n shouldShowDropdown={isAnimating}\n minBodyWidth={bodyWidth ?? bodyMinWidth}\n >\n <StyledComboBoxBody\n $maxHeight={effectiveMaxHeight}\n $minWidth={bodyWidth ?? bodyMinWidth}\n className=\"chayns-scrollbar\"\n ref={contentRef}\n tabIndex={0}\n >\n {comboBoxGroups}\n </StyledComboBoxBody>\n </DropdownBodyWrapper>\n )}\n </StyledComboBox>\n ),\n [\n bodyMinWidth,\n bodyWidth,\n comboBoxGroups,\n container,\n contentHeight,\n direction,\n handleClear,\n handleClose,\n handleHeaderClick,\n handleInputBlur,\n handleInputFocus,\n inputValue,\n internalSelectedItem,\n isAnimating,\n isDisabled,\n isTouch,\n effectiveMaxHeight,\n minWidth,\n onInputChange,\n placeholderIcon,\n placeholderImageUrl,\n placeholderText,\n prefix,\n prefixMinWidth,\n selectedItem,\n shouldChangeColor,\n shouldDisableActions,\n shouldCaptureEvents,\n shouldShowBigImage,\n shouldShowClearIcon,\n shouldShowRoundPlaceholderImage,\n shouldShowTransparentBackground,\n shouldUseFullWidth,\n size,\n ],\n );\n },\n);\n\nComboBox.displayName = 'ComboBox';\n\nexport default ComboBox;\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AAYA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,oBAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,aAAA,GAAAD,sBAAA,CAAAN,OAAA;AACA,IAAAQ,SAAA,GAAAR,OAAA;AAcA,IAAAS,oBAAA,GAAAH,sBAAA,CAAAN,OAAA;AACA,IAAAU,SAAA,GAAAV,OAAA;AACA,IAAAW,QAAA,GAAAX,OAAA;AACA,IAAAY,UAAA,GAAAZ,OAAA;AACA,IAAAa,UAAA,GAAAb,OAAA;AAA0D,SAAAM,uBAAAQ,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAZ,wBAAAY,CAAA,EAAAG,CAAA,6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E3G,kBAAmB;IAC/BuE,SAAS,EAAEpJ,SAAS,IAAIuC,YAAa;IACrCkJ,SAAS,EAAC,kBAAkB;IAC5B3J,GAAG,EAAEkB,UAAW;IAChBoE,QAAQ,EAAE;EAAE,GAEXwB,cACe,CACH,CAEb,CACnB,EACD,CACIrG,YAAY,EACZvC,SAAS,EACT4I,cAAc,EACdlI,SAAS,EACTsE,aAAa,EACb/E,SAAS,EACTmG,WAAW,EACXP,WAAW,EACX2C,iBAAiB,EACjB7C,eAAe,EACfJ,gBAAgB,EAChB3D,UAAU,EACVG,oBAAoB,EACpBG,WAAW,EACX9B,UAAU,EACVoD,OAAO,EACPqB,kBAAkB,EAClBzC,QAAQ,EACRZ,aAAa,EACb0G,eAAe,EACfF,mBAAmB,EACnBI,eAAe,EACf3H,MAAM,EACNU,cAAc,EACdP,YAAY,EACZuD,iBAAiB,EACjBE,oBAAoB,EACpB1D,mBAAmB,EACnBI,kBAAkB,EAClBC,mBAAmB,EACnBsH,+BAA+B,EAC/B3G,+BAA+B,EAC/BJ,kBAAkB,EAClBH,IAAI,CAEZ,CAAC;AACL,CACJ,CAAC;AAEDtB,QAAQ,CAAC4L,WAAW,GAAG,UAAU;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAA/M,OAAA,GAEnBiB,QAAQ","ignoreList":[]}
@@ -7,7 +7,6 @@ exports.StyledComboBoxTopic = exports.StyledComboBoxPrefixAndPlaceholderWrapper
7
7
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
8
8
  var _dropdown = require("../../types/dropdown");
9
9
  var _ComboBox = require("./ComboBox.types");
10
- var _keyboardFocusHighlighting = require("../../utils/keyboardFocusHighlighting.styles");
11
10
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
12
11
  const StyledComboBox = exports.StyledComboBox = _styledComponents.default.div`
13
12
  min-width: 0;
@@ -123,16 +122,6 @@ const StyledComboBoxHeader = exports.StyledComboBoxHeader = _styledComponents.de
123
122
  background-color: ${theme['secondary-102']};
124
123
  }
125
124
  `}
126
-
127
- ${({
128
- $shouldShowKeyboardHighlighting
129
- }) => $shouldShowKeyboardHighlighting && (0, _styledComponents.css)`
130
- &:focus-visible,
131
- &:focus-within {
132
- transition: none;
133
- ${_keyboardFocusHighlighting.keyboardFocusHighlightingRingCss}
134
- }
135
- `}
136
125
  `;
137
126
  const StyledComboBoxPlaceholder = exports.StyledComboBoxPlaceholder = _styledComponents.default.div`
138
127
  align-items: center;
@@ -1 +1 @@
1
- {"version":3,"file":"ComboBox.styles.js","names":["_styledComponents","_interopRequireWildcard","require","_dropdown","_ComboBox","_keyboardFocusHighlighting","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","StyledComboBox","exports","styled","div","$shouldUseFullWidth","$minWidth","css","StyledComboBoxHeader","$isDisabled","$size","ComboBoxSize","SMALL","NORMAL","theme","$shouldShowTransparentBackground","$shouldChangeColor","colorMode","$shouldShowBigImage","$isOpen","$direction","DropdownDirection","BOTTOM","BOTTOM_LEFT","BOTTOM_RIGHT","includes","$isTouch","$shouldShowKeyboardHighlighting","keyboardFocusHighlightingRingCss","StyledComboBoxPlaceholder","text","$shouldReduceOpacity","StyledComboBoxPlaceholderText","StyledComboBoxPrefixAndPlaceholderWrapper","StyledComboBoxPrefix","$prefixMinWidth","StyledComboBoxInput","input","StyledComboBoxPlaceholderImage","img","$shouldShowRoundImage","StyledComboBoxClearIconWrapper","StyledComboBoxIconWrapper","$shouldShowBorderLeft","StyledComboBoxBody","$maxHeight","StyledComboBoxTopic"],"sources":["../../../../src/components/combobox/ComboBox.styles.ts"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport type { Theme, WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\nimport { DropdownDirection } from '../../types/dropdown';\nimport { ComboBoxProps, ComboBoxSize } from './ComboBox.types';\nimport { keyboardFocusHighlightingRingCss } from '../../utils/keyboardFocusHighlighting.styles';\n\ntype StyledComboBoxProps = WithTheme<{\n $minWidth?: number;\n $shouldUseFullWidth: ComboBoxProps['shouldUseFullWidth'];\n}>;\n\nexport const StyledComboBox = styled.div<StyledComboBoxProps>`\n min-width: 0;\n user-select: none;\n position: relative;\n\n ${({ $shouldUseFullWidth, $minWidth }) => {\n if ($shouldUseFullWidth) {\n return css`\n width: 100%;\n max-width: 100%;\n min-width: ${typeof $minWidth === 'number' ? `${$minWidth}px` : '0'};\n `;\n }\n\n if (typeof $minWidth === 'number') {\n return css`\n width: fit-content;\n max-width: 100%;\n min-width: ${$minWidth}px;\n `;\n }\n\n return css`\n width: fit-content;\n max-width: 100%;\n `;\n }}\n`;\n\ntype StyledComboBoxHeaderProps = WithTheme<{\n $isTouch: boolean;\n $isOpen: boolean;\n $direction: DropdownDirection;\n $isDisabled?: boolean;\n $shouldChangeColor: boolean;\n $shouldShowBigImage: ComboBoxProps['shouldShowBigImage'];\n $shouldShowTransparentBackground: boolean;\n $size: ComboBoxSize;\n $shouldShowKeyboardHighlighting: boolean;\n}>;\n\nexport const StyledComboBoxHeader = styled.div<StyledComboBoxHeaderProps>`\n display: flex;\n min-width: 0;\n border: 1px solid transparent;\n cursor: ${({ $isDisabled }) => (!$isDisabled ? 'pointer' : 'default')};\n justify-content: space-between;\n opacity: ${({ $isDisabled }) => ($isDisabled ? 0.5 : 1)};\n transition: background-color 0.2s ease-in-out;\n\n ${({ $size }) => {\n switch ($size) {\n case ComboBoxSize.SMALL:\n return css`\n height: 34px;\n `;\n case ComboBoxSize.NORMAL:\n default:\n return css`\n min-height: 42px;\n `;\n }\n }}\n\n ${({ theme, $shouldShowTransparentBackground, $shouldChangeColor }) => {\n if ($shouldShowTransparentBackground) {\n if (theme.colorMode === 'dark') {\n return css`\n border-color: rgba(255, 255, 255, 0.5);\n background-color: transparent;\n `;\n }\n\n return css`\n border-color: rgba(0, 0, 0, 0.5);\n background-color: transparent;\n `;\n }\n\n return css`\n border-color: rgba(160, 160, 160, 0.3);\n background-color: ${theme.colorMode === 'classic' || $shouldChangeColor\n ? theme['000']\n : theme['100']};\n `;\n }}\n\n ${({ $shouldShowBigImage }) =>\n $shouldShowBigImage &&\n css`\n height: 42px;\n `}\n\n ${({ $isOpen, $direction }) => {\n if ($isOpen) {\n return [\n DropdownDirection.BOTTOM,\n DropdownDirection.BOTTOM_LEFT,\n DropdownDirection.BOTTOM_RIGHT,\n ].includes($direction)\n ? css`\n border-top-left-radius: 3px;\n border-top-right-radius: 3px;\n `\n : css`\n border-bottom-left-radius: 3px;\n border-bottom-right-radius: 3px;\n `;\n }\n\n return css`\n border-radius: 3px;\n `;\n }}\n\n ${({ $isTouch, $isDisabled, theme }: StyledComboBoxHeaderProps) =>\n !$isTouch &&\n !$isDisabled &&\n css`\n &:hover {\n background-color: ${theme['secondary-102']};\n }\n `}\n\n ${({ $shouldShowKeyboardHighlighting }) =>\n $shouldShowKeyboardHighlighting &&\n css`\n &:focus-visible,\n &:focus-within {\n transition: none;\n ${keyboardFocusHighlightingRingCss}\n }\n `}\n`;\n\ntype StyledComboBoxPlaceholderProps = WithTheme<{ $shouldReduceOpacity: boolean }>;\n\nexport const StyledComboBoxPlaceholder = styled.div<StyledComboBoxPlaceholderProps>`\n align-items: center;\n color: ${({ theme }: StyledComboBoxPlaceholderProps) => theme.text};\n display: flex;\n flex: 1 1 auto;\n gap: 10px;\n min-width: 0;\n opacity: ${({ $shouldReduceOpacity }) => ($shouldReduceOpacity ? 0.5 : 1)};\n`;\n\nexport const StyledComboBoxPlaceholderText = styled.div`\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n`;\n\nexport const StyledComboBoxPrefixAndPlaceholderWrapper = styled.div`\n align-items: center;\n display: flex;\n flex: 1 1 auto;\n min-width: 0;\n padding: 4px 10px;\n`;\n\ntype StyledComboBoxPrefixProps = {\n $prefixMinWidth?: number;\n};\n\nexport const StyledComboBoxPrefix = styled.div<StyledComboBoxPrefixProps>`\n flex: 0 0 auto;\n min-width: ${({ $prefixMinWidth }) => $prefixMinWidth ?? 0}px;\n padding-right: 5px;\n`;\n\nexport const StyledComboBoxInput = styled.input`\n color: ${({ theme }: { theme: Theme }) => theme.text};\n border: none;\n background-color: transparent;\n width: 100%;\n min-width: 0;\n`;\n\ntype StyledComboBoxPlaceholderImageProps = WithTheme<{\n $shouldShowBigImage: ComboBoxProps['shouldShowBigImage'];\n $shouldShowRoundImage: ComboBoxProps['shouldShowRoundImage'];\n}>;\n\nexport const StyledComboBoxPlaceholderImage = styled.img<StyledComboBoxPlaceholderImageProps>`\n box-shadow: 0 0 0 1px\n rgba(${({ theme }: StyledComboBoxPlaceholderImageProps) => theme['009-rgb']}, 0.15);\n height: ${({ $shouldShowBigImage }) => ($shouldShowBigImage ? '32px' : '22px')};\n width: ${({ $shouldShowBigImage }) => ($shouldShowBigImage ? '32px' : '22px')};\n\n ${({ $shouldShowRoundImage }) =>\n $shouldShowRoundImage &&\n css`\n border-radius: 50%;\n `}\n`;\n\ntype StyledComboBoxClearIconWrapperProps = { $isDisabled: boolean };\n\nexport const StyledComboBoxClearIconWrapper = styled.div<StyledComboBoxClearIconWrapperProps>`\n align-items: center;\n cursor: ${({ $isDisabled }) => (!$isDisabled ? 'pointer' : 'default')};\n display: flex;\n flex: 0 0 auto;\n height: 40px;\n justify-content: center;\n width: 40px;\n`;\n\ntype StyledComboBoxIconWrapperProps = {\n $shouldShowBorderLeft: boolean;\n $isDisabled: boolean;\n $size: ComboBoxSize;\n};\n\nexport const StyledComboBoxIconWrapper = styled.div<StyledComboBoxIconWrapperProps>`\n align-items: center;\n border-left: ${({ $shouldShowBorderLeft }) =>\n $shouldShowBorderLeft ? '1px solid rgba(160, 160, 160, 0.3)' : 'none'};\n cursor: ${({ $isDisabled }) => (!$isDisabled ? 'pointer' : 'default')};\n display: flex;\n flex: 0 0 auto;\n justify-content: center;\n width: 40px;\n\n ${({ $size }) => {\n switch ($size) {\n case ComboBoxSize.SMALL:\n return css`\n height: 30px;\n `;\n case ComboBoxSize.NORMAL:\n default:\n return css`\n height: 40px;\n `;\n }\n }}\n`;\n\ntype StyledComboBoxBodyProps = WithTheme<{\n $maxHeight: number;\n $minWidth: number;\n}>;\n\nexport const StyledComboBoxBody = styled.div<StyledComboBoxBodyProps>`\n display: flex;\n flex-direction: column;\n cursor: pointer;\n min-width: ${({ $minWidth }) => $minWidth}px;\n\n overflow-x: hidden;\n overflow-y: auto;\n\n max-height: ${({ $maxHeight }) => $maxHeight}px;\n`;\n\ntype StyledComboBoxTopicProps = WithTheme<unknown>;\n\nexport const StyledComboBoxTopic = styled.div`\n align-items: center;\n background-color: ${({ theme }: StyledComboBoxTopicProps) => theme['secondary-102']};\n color: rgba(${({ theme }: StyledComboBoxTopicProps) => theme['text-rgb']}, 0.65);\n cursor: default;\n display: flex;\n flex: 0 0 auto;\n font-weight: bold;\n min-height: 38px;\n line-height: normal;\n padding: 8px 10px;\n position: sticky;\n top: 0;\n z-index: 10;\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,0BAAA,GAAAH,OAAA;AAAgG,SAAAD,wBAAAK,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAP,uBAAA,YAAAA,CAAAK,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,I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IAAAN,qBAAG;AAC1B;AACA,iBAAiB;EACT;AACJ,CAAC;AACL,CAAC;AAOM,MAAMqC,kBAAkB,GAAA1C,OAAA,CAAA0C,kBAAA,GAAGzC,yBAAM,CAACC,GAA4B;AACrE;AACA;AACA;AACA,iBAAiB,CAAC;EAAEE;AAAU,CAAC,KAAKA,SAAS;AAC7C;AACA;AACA;AACA;AACA,kBAAkB,CAAC;EAAEuC;AAAW,CAAC,KAAKA,UAAU;AAChD,CAAC;AAIM,MAAMC,mBAAmB,GAAA5C,OAAA,CAAA4C,mBAAA,GAAG3C,yBAAM,CAACC,GAAG;AAC7C;AACA,wBAAwB,CAAC;EAAEU;AAAgC,CAAC,KAAKA,KAAK,CAAC,eAAe,CAAC;AACvF,kBAAkB,CAAC;EAAEA;AAAgC,CAAC,KAAKA,KAAK,CAAC,UAAU,CAAC;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"ComboBox.styles.js","names":["_styledComponents","_interopRequireWildcard","require","_dropdown","_ComboBox","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","StyledComboBox","exports","styled","div","$shouldUseFullWidth","$minWidth","css","StyledComboBoxHeader","$isDisabled","$size","ComboBoxSize","SMALL","NORMAL","theme","$shouldShowTransparentBackground","$shouldChangeColor","colorMode","$shouldShowBigImage","$isOpen","$direction","DropdownDirection","BOTTOM","BOTTOM_LEFT","BOTTOM_RIGHT","includes","$isTouch","StyledComboBoxPlaceholder","text","$shouldReduceOpacity","StyledComboBoxPlaceholderText","StyledComboBoxPrefixAndPlaceholderWrapper","StyledComboBoxPrefix","$prefixMinWidth","StyledComboBoxInput","input","StyledComboBoxPlaceholderImage","img","$shouldShowRoundImage","StyledComboBoxClearIconWrapper","StyledComboBoxIconWrapper","$shouldShowBorderLeft","StyledComboBoxBody","$maxHeight","StyledComboBoxTopic"],"sources":["../../../../src/components/combobox/ComboBox.styles.ts"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport type { Theme, WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\nimport { DropdownDirection } from '../../types/dropdown';\nimport { ComboBoxProps, ComboBoxSize } from './ComboBox.types';\n\ntype StyledComboBoxProps = WithTheme<{\n $minWidth?: number;\n $shouldUseFullWidth: ComboBoxProps['shouldUseFullWidth'];\n}>;\n\nexport const StyledComboBox = styled.div<StyledComboBoxProps>`\n min-width: 0;\n user-select: none;\n position: relative;\n\n ${({ $shouldUseFullWidth, $minWidth }) => {\n if ($shouldUseFullWidth) {\n return css`\n width: 100%;\n max-width: 100%;\n min-width: ${typeof $minWidth === 'number' ? `${$minWidth}px` : '0'};\n `;\n }\n\n if (typeof $minWidth === 'number') {\n return css`\n width: fit-content;\n max-width: 100%;\n min-width: ${$minWidth}px;\n `;\n }\n\n return css`\n width: fit-content;\n max-width: 100%;\n `;\n }}\n`;\n\ntype StyledComboBoxHeaderProps = WithTheme<{\n $isTouch: boolean;\n $isOpen: boolean;\n $direction: DropdownDirection;\n $isDisabled?: boolean;\n $shouldChangeColor: boolean;\n $shouldShowBigImage: ComboBoxProps['shouldShowBigImage'];\n $shouldShowTransparentBackground: boolean;\n $size: ComboBoxSize;\n}>;\n\nexport const StyledComboBoxHeader = styled.div<StyledComboBoxHeaderProps>`\n display: flex;\n min-width: 0;\n border: 1px solid transparent;\n cursor: ${({ $isDisabled }) => (!$isDisabled ? 'pointer' : 'default')};\n justify-content: space-between;\n opacity: ${({ $isDisabled }) => ($isDisabled ? 0.5 : 1)};\n transition: background-color 0.2s ease-in-out;\n\n ${({ $size }) => {\n switch ($size) {\n case ComboBoxSize.SMALL:\n return css`\n height: 34px;\n `;\n case ComboBoxSize.NORMAL:\n default:\n return css`\n min-height: 42px;\n `;\n }\n }}\n\n ${({ theme, $shouldShowTransparentBackground, $shouldChangeColor }) => {\n if ($shouldShowTransparentBackground) {\n if (theme.colorMode === 'dark') {\n return css`\n border-color: rgba(255, 255, 255, 0.5);\n background-color: transparent;\n `;\n }\n\n return css`\n border-color: rgba(0, 0, 0, 0.5);\n background-color: transparent;\n `;\n }\n\n return css`\n border-color: rgba(160, 160, 160, 0.3);\n background-color: ${theme.colorMode === 'classic' || $shouldChangeColor\n ? theme['000']\n : theme['100']};\n `;\n }}\n\n ${({ $shouldShowBigImage }) =>\n $shouldShowBigImage &&\n css`\n height: 42px;\n `}\n\n ${({ $isOpen, $direction }) => {\n if ($isOpen) {\n return [\n DropdownDirection.BOTTOM,\n DropdownDirection.BOTTOM_LEFT,\n DropdownDirection.BOTTOM_RIGHT,\n ].includes($direction)\n ? css`\n border-top-left-radius: 3px;\n border-top-right-radius: 3px;\n `\n : css`\n border-bottom-left-radius: 3px;\n border-bottom-right-radius: 3px;\n `;\n }\n\n return css`\n border-radius: 3px;\n `;\n }}\n\n ${({ $isTouch, $isDisabled, theme }: StyledComboBoxHeaderProps) =>\n !$isTouch &&\n !$isDisabled &&\n css`\n &:hover {\n background-color: ${theme['secondary-102']};\n }\n `}\n`;\n\ntype StyledComboBoxPlaceholderProps = WithTheme<{ $shouldReduceOpacity: boolean }>;\n\nexport const StyledComboBoxPlaceholder = styled.div<StyledComboBoxPlaceholderProps>`\n align-items: center;\n color: ${({ theme }: StyledComboBoxPlaceholderProps) => theme.text};\n display: flex;\n flex: 1 1 auto;\n gap: 10px;\n min-width: 0;\n opacity: ${({ $shouldReduceOpacity }) => ($shouldReduceOpacity ? 0.5 : 1)};\n`;\n\nexport const StyledComboBoxPlaceholderText = styled.div`\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n`;\n\nexport const StyledComboBoxPrefixAndPlaceholderWrapper = styled.div`\n align-items: center;\n display: flex;\n flex: 1 1 auto;\n min-width: 0;\n padding: 4px 10px;\n`;\n\ntype StyledComboBoxPrefixProps = {\n $prefixMinWidth?: number;\n};\n\nexport const StyledComboBoxPrefix = styled.div<StyledComboBoxPrefixProps>`\n flex: 0 0 auto;\n min-width: ${({ $prefixMinWidth }) => $prefixMinWidth ?? 0}px;\n padding-right: 5px;\n`;\n\nexport const StyledComboBoxInput = styled.input`\n color: ${({ theme }: { theme: Theme }) => theme.text};\n border: none;\n background-color: transparent;\n width: 100%;\n min-width: 0;\n`;\n\ntype StyledComboBoxPlaceholderImageProps = WithTheme<{\n $shouldShowBigImage: ComboBoxProps['shouldShowBigImage'];\n $shouldShowRoundImage: ComboBoxProps['shouldShowRoundImage'];\n}>;\n\nexport const StyledComboBoxPlaceholderImage = styled.img<StyledComboBoxPlaceholderImageProps>`\n box-shadow: 0 0 0 1px\n rgba(${({ theme }: StyledComboBoxPlaceholderImageProps) => theme['009-rgb']}, 0.15);\n height: ${({ $shouldShowBigImage }) => ($shouldShowBigImage ? '32px' : '22px')};\n width: ${({ $shouldShowBigImage }) => ($shouldShowBigImage ? '32px' : '22px')};\n\n ${({ $shouldShowRoundImage }) =>\n $shouldShowRoundImage &&\n css`\n border-radius: 50%;\n `}\n`;\n\ntype StyledComboBoxClearIconWrapperProps = { $isDisabled: boolean };\n\nexport const StyledComboBoxClearIconWrapper = styled.div<StyledComboBoxClearIconWrapperProps>`\n align-items: center;\n cursor: ${({ $isDisabled }) => (!$isDisabled ? 'pointer' : 'default')};\n display: flex;\n flex: 0 0 auto;\n height: 40px;\n justify-content: center;\n width: 40px;\n`;\n\ntype StyledComboBoxIconWrapperProps = {\n $shouldShowBorderLeft: boolean;\n $isDisabled: boolean;\n $size: ComboBoxSize;\n};\n\nexport const StyledComboBoxIconWrapper = styled.div<StyledComboBoxIconWrapperProps>`\n align-items: center;\n border-left: ${({ $shouldShowBorderLeft }) =>\n $shouldShowBorderLeft ? '1px solid rgba(160, 160, 160, 0.3)' : 'none'};\n cursor: ${({ $isDisabled }) => (!$isDisabled ? 'pointer' : 'default')};\n display: flex;\n flex: 0 0 auto;\n justify-content: center;\n width: 40px;\n\n ${({ $size }) => {\n switch ($size) {\n case ComboBoxSize.SMALL:\n return css`\n height: 30px;\n `;\n case ComboBoxSize.NORMAL:\n default:\n return css`\n height: 40px;\n `;\n }\n }}\n`;\n\ntype StyledComboBoxBodyProps = WithTheme<{\n $maxHeight: number;\n $minWidth: number;\n}>;\n\nexport const StyledComboBoxBody = styled.div<StyledComboBoxBodyProps>`\n display: flex;\n flex-direction: column;\n cursor: pointer;\n min-width: ${({ $minWidth }) => $minWidth}px;\n\n overflow-x: hidden;\n overflow-y: auto;\n\n max-height: ${({ $maxHeight }) => $maxHeight}px;\n`;\n\ntype StyledComboBoxTopicProps = WithTheme<unknown>;\n\nexport const StyledComboBoxTopic = styled.div`\n align-items: center;\n background-color: ${({ theme }: StyledComboBoxTopicProps) => theme['secondary-102']};\n color: rgba(${({ theme }: StyledComboBoxTopicProps) => theme['text-rgb']}, 0.65);\n cursor: default;\n display: flex;\n flex: 0 0 auto;\n font-weight: bold;\n min-height: 38px;\n line-height: normal;\n padding: 8px 10px;\n position: sticky;\n top: 0;\n z-index: 10;\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AAA+D,SAAAD,wBAAAI,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAN,uBAAA,YAAAA,CAAAI,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ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CAAC,eAAe,CAAC;AACvF,kBAAkB,CAAC;EAAEA;AAAgC,CAAC,KAAKA,KAAK,CAAC,UAAU,CAAC;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"ComboBox.types.js","names":["ComboBoxSize","exports"],"sources":["../../../../src/components/combobox/ComboBox.types.ts"],"sourcesContent":["import { ChangeEventHandler, CSSProperties, FocusEventHandler, ReactHTML, ReactNode } from 'react';\nimport { CSSPropertiesWithVars } from 'styled-components/dist/types';\nimport { DropdownDirection } from '../../types/dropdown';\n\n/**\n * Ref interface for the `ComboBox` component.\n */\nexport interface ComboBoxRef {\n /**\n * Hides the dropdown content.\n */\n hide: VoidFunction;\n /**\n * Shows the dropdown content.\n */\n show: VoidFunction;\n}\n\n/**\n * A grouped list definition used by the `ComboBox` component.\n */\nexport interface IComboBoxItems {\n /**\n * Optional group label shown above the list.\n */\n groupName?: string;\n /**\n * The items that should be rendered inside the group.\n */\n list: Array<IComboBoxItem>;\n /**\n * Whether the items in this group should use round images.\n */\n shouldShowRoundImage?: boolean;\n}\n\n/**\n * Optional text styling configuration for a combobox item.\n */\nexport interface ComboBoxTextStyles {\n /**\n * The HTML tag that should be used for the text wrapper.\n */\n tagName?: keyof ReactHTML;\n /**\n * Additional inline styles applied to the text wrapper.\n */\n styles?: CSSPropertiesWithVars;\n /**\n * Additional class name applied to the text wrapper.\n */\n className?: string;\n}\n\n/**\n * Single selectable item configuration for the `ComboBox` component.\n */\nexport interface IComboBoxItem {\n /**\n * Optional icon classes rendered before the text.\n */\n icons?: string[];\n /**\n * Optional background style used for the image placeholder.\n */\n imageBackground?: CSSProperties['background'];\n /**\n * Optional image URL rendered for the item.\n */\n imageUrl?: string;\n /**\n * Whether the item should be disabled.\n */\n isDisabled?: boolean;\n /**\n * Optional element rendered on the right side of the item.\n */\n rightElement?: ReactNode;\n /**\n * Optional secondary text rendered below the main text.\n */\n subtext?: string;\n /**\n * Optional suffix element rendered after the text.\n */\n suffixElement?: ReactNode;\n /**\n * Main label of the item.\n */\n text: string;\n /**\n * Stable item value used for selection and matching.\n */\n value: string | number;\n /**\n * Optional text styling overrides for the item label.\n */\n textStyles?: ComboBoxTextStyles;\n}\n\n/**\n * Available size variants for the `ComboBox` header.\n */\nexport enum ComboBoxSize {\n /**\n * Standard height and spacing.\n */\n NORMAL = 'normal',\n /**\n * Compact height and spacing.\n */\n SMALL = 'small',\n}\n\n/**\n * Props for the `ComboBox` component.\n */\nexport type ComboBoxProps = {\n /**\n * The width of the body.\n * @default undefined\n */\n bodyWidth?: number;\n /**\n * The element where the content of the `ComboBox` should be rendered via React Portal.\n * @default undefined\n */\n container?: Element;\n /**\n * The direction in which the combobox should open.\n * @default DropdownDirection.RIGHT\n */\n direction?: DropdownDirection;\n /**\n * The value of the optional input.\n * @default undefined\n */\n inputValue?: string;\n /**\n * Whether the combobox should be disabled.\n * @default false\n */\n isDisabled?: boolean;\n /**\n * The list of the items that should be displayed.\n */\n lists: IComboBoxItems[];\n /**\n * The maximum height of the combobox content.\n * @default 280\n */\n maxHeight?: number;\n /**\n * Function to be executed when the value of the optional input is changed.\n * @default undefined\n */\n onInputChange?: ChangeEventHandler<HTMLInputElement>;\n /**\n * Function to be executed when the optional input lost its focus.\n * @default undefined\n */\n onInputBlur?: FocusEventHandler<HTMLInputElement>;\n /**\n * Function to be executed when the optional input gets its focus.\n * @default undefined\n */\n onInputFocus?: FocusEventHandler<HTMLInputElement>;\n /**\n * Function that should be executed when an item is selected. If the function returns false, the item will not be selected.\n * @default undefined\n */\n onSelect?: (comboboxItem?: IComboBoxItem) => Promise<boolean> | boolean | void;\n /**\n * Function to be executed when the content of the `ComboBox` is shown.\n * @default undefined\n */\n onShow?: () => void;\n /**\n * Function to be executed when the content of the `ComboBox` is hidden.\n * @default undefined\n */\n onHide?: () => void;\n /**\n * A text that should be displayed when no item is selected.\n */\n placeholder: string;\n /**\n * A prefix that should be displayed before the placeholder.\n * @default undefined\n */\n prefix?: string;\n /**\n * An item that should be preselected.\n * @default undefined\n */\n selectedItem?: IComboBoxItem;\n /**\n * If true, the images of the items are displayed in a bigger shape. This prop will automatically be set to true if the subtext of an item is given.\n * @default false\n */\n shouldShowBigImage?: boolean;\n /**\n * If true, a clear icon is displayed at the end of the combo box if an item is selected.\n * @default false\n */\n shouldShowClearIcon?: boolean;\n /**\n * Whether the background should be transparent.\n * @default false\n */\n shouldShowTransparentBackground?: boolean;\n /**\n * If true, the images of the items are displayed in a round shape.\n * @default false\n */\n shouldShowRoundImage?: boolean;\n /**\n * Whether the width of the ComboBox should be the width of the current item.\n * @default false\n */\n shouldUseCurrentItemWidth?: boolean;\n /**\n * Whether the width of the 'ComboBox' should be the width of the parent or of the widest item.\n * @default false\n */\n shouldUseFullWidth?: boolean;\n /**\n * If true, the dropdown will use the maximum width of the items.\n * @default false\n */\n shouldDropDownUseMaxItemWidth?: boolean;\n /**\n * Whether the outside events should be captured.\n * @default undefined\n */\n shouldCaptureEvents?: boolean;\n /**\n * The size of the ComboBox.\n * @default ComboBoxSize.NORMAL\n */\n size?: ComboBoxSize;\n /**\n * Enables the shared keyboard-only focus ring for the combobox header.\n * @default false\n */\n shouldEnableKeyboardHighlighting?: boolean;\n /**\n * Optional min width for the prefix element.\n * @default undefined\n */\n prefixMinWidth?: number;\n};\n"],"mappings":";;;;;;AAIA;AACA;AACA;AAYA;AACA;AACA;AAgBA;AACA;AACA;AAgBA;AACA;AACA;AA4CA;AACA;AACA;AAFA,IAGYA,YAAY,GAAAC,OAAA,CAAAD,YAAA,0BAAZA,YAAY;EACpB;AACJ;AACA;EAHYA,YAAY;EAKpB;AACJ;AACA;EAPYA,YAAY;EAAA,OAAZA,YAAY;AAAA;AAWxB;AACA;AACA","ignoreList":[]}
1
+ {"version":3,"file":"ComboBox.types.js","names":["ComboBoxSize","exports"],"sources":["../../../../src/components/combobox/ComboBox.types.ts"],"sourcesContent":["import { ChangeEventHandler, CSSProperties, FocusEventHandler, ReactHTML, ReactNode } from 'react';\nimport { CSSPropertiesWithVars } from 'styled-components/dist/types';\nimport { DropdownDirection } from '../../types/dropdown';\n\n/**\n * Ref interface for the `ComboBox` component.\n */\nexport interface ComboBoxRef {\n /**\n * Hides the dropdown content.\n */\n hide: VoidFunction;\n /**\n * Shows the dropdown content.\n */\n show: VoidFunction;\n}\n\n/**\n * A grouped list definition used by the `ComboBox` component.\n */\nexport interface IComboBoxItems {\n /**\n * Optional group label shown above the list.\n */\n groupName?: string;\n /**\n * The items that should be rendered inside the group.\n */\n list: Array<IComboBoxItem>;\n /**\n * Whether the items in this group should use round images.\n */\n shouldShowRoundImage?: boolean;\n}\n\n/**\n * Optional text styling configuration for a combobox item.\n */\nexport interface ComboBoxTextStyles {\n /**\n * The HTML tag that should be used for the text wrapper.\n */\n tagName?: keyof ReactHTML;\n /**\n * Additional inline styles applied to the text wrapper.\n */\n styles?: CSSPropertiesWithVars;\n /**\n * Additional class name applied to the text wrapper.\n */\n className?: string;\n}\n\n/**\n * Single selectable item configuration for the `ComboBox` component.\n */\nexport interface IComboBoxItem {\n /**\n * Optional icon classes rendered before the text.\n */\n icons?: string[];\n /**\n * Optional background style used for the image placeholder.\n */\n imageBackground?: CSSProperties['background'];\n /**\n * Optional image URL rendered for the item.\n */\n imageUrl?: string;\n /**\n * Whether the item should be disabled.\n */\n isDisabled?: boolean;\n /**\n * Optional element rendered on the right side of the item.\n */\n rightElement?: ReactNode;\n /**\n * Optional secondary text rendered below the main text.\n */\n subtext?: string;\n /**\n * Optional suffix element rendered after the text.\n */\n suffixElement?: ReactNode;\n /**\n * Main label of the item.\n */\n text: string;\n /**\n * Stable item value used for selection and matching.\n */\n value: string | number;\n /**\n * Optional text styling overrides for the item label.\n */\n textStyles?: ComboBoxTextStyles;\n}\n\n/**\n * Available size variants for the `ComboBox` header.\n */\nexport enum ComboBoxSize {\n /**\n * Standard height and spacing.\n */\n NORMAL = 'normal',\n /**\n * Compact height and spacing.\n */\n SMALL = 'small',\n}\n\n/**\n * Props for the `ComboBox` component.\n */\nexport type ComboBoxProps = {\n /**\n * The width of the body.\n * @default undefined\n */\n bodyWidth?: number;\n /**\n * The element where the content of the `ComboBox` should be rendered via React Portal.\n * @default undefined\n */\n container?: Element;\n /**\n * The direction in which the combobox should open.\n * @default DropdownDirection.RIGHT\n */\n direction?: DropdownDirection;\n /**\n * The value of the optional input.\n * @default undefined\n */\n inputValue?: string;\n /**\n * Whether the combobox should be disabled.\n * @default false\n */\n isDisabled?: boolean;\n /**\n * The list of the items that should be displayed.\n */\n lists: IComboBoxItems[];\n /**\n * The maximum height of the combobox content.\n * @default 280\n */\n maxHeight?: number;\n /**\n * Function to be executed when the value of the optional input is changed.\n * @default undefined\n */\n onInputChange?: ChangeEventHandler<HTMLInputElement>;\n /**\n * Function to be executed when the optional input lost its focus.\n * @default undefined\n */\n onInputBlur?: FocusEventHandler<HTMLInputElement>;\n /**\n * Function to be executed when the optional input gets its focus.\n * @default undefined\n */\n onInputFocus?: FocusEventHandler<HTMLInputElement>;\n /**\n * Function that should be executed when an item is selected. If the function returns false, the item will not be selected.\n * @default undefined\n */\n onSelect?: (comboboxItem?: IComboBoxItem) => Promise<boolean> | boolean | void;\n /**\n * Function to be executed when the content of the `ComboBox` is shown.\n * @default undefined\n */\n onShow?: () => void;\n /**\n * Function to be executed when the content of the `ComboBox` is hidden.\n * @default undefined\n */\n onHide?: () => void;\n /**\n * A text that should be displayed when no item is selected.\n */\n placeholder: string;\n /**\n * A prefix that should be displayed before the placeholder.\n * @default undefined\n */\n prefix?: string;\n /**\n * An item that should be preselected.\n * @default undefined\n */\n selectedItem?: IComboBoxItem;\n /**\n * If true, the images of the items are displayed in a bigger shape. This prop will automatically be set to true if the subtext of an item is given.\n * @default false\n */\n shouldShowBigImage?: boolean;\n /**\n * If true, a clear icon is displayed at the end of the combo box if an item is selected.\n * @default false\n */\n shouldShowClearIcon?: boolean;\n /**\n * Whether the background should be transparent.\n * @default false\n */\n shouldShowTransparentBackground?: boolean;\n /**\n * If true, the images of the items are displayed in a round shape.\n * @default false\n */\n shouldShowRoundImage?: boolean;\n /**\n * Whether the width of the ComboBox should be the width of the current item.\n * @default false\n */\n shouldUseCurrentItemWidth?: boolean;\n /**\n * Whether the width of the 'ComboBox' should be the width of the parent or of the widest item.\n * @default false\n */\n shouldUseFullWidth?: boolean;\n /**\n * If true, the dropdown will use the maximum width of the items.\n * @default false\n */\n shouldDropDownUseMaxItemWidth?: boolean;\n /**\n * Whether the outside events should be captured.\n * @default undefined\n */\n shouldCaptureEvents?: boolean;\n /**\n * The size of the ComboBox.\n * @default ComboBoxSize.NORMAL\n */\n size?: ComboBoxSize;\n /**\n * Optional min width for the prefix element.\n * @default undefined\n */\n prefixMinWidth?: number;\n};\n"],"mappings":";;;;;;AAIA;AACA;AACA;AAYA;AACA;AACA;AAgBA;AACA;AACA;AAgBA;AACA;AACA;AA4CA;AACA;AACA;AAFA,IAGYA,YAAY,GAAAC,OAAA,CAAAD,YAAA,0BAAZA,YAAY;EACpB;AACJ;AACA;EAHYA,YAAY;EAKpB;AACJ;AACA;EAPYA,YAAY;EAAA,OAAZA,YAAY;AAAA;AAWxB;AACA;AACA","ignoreList":[]}