ab-ui-library 1.41.1 → 1.42.0

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 (572) hide show
  1. package/{RadioGroup-814fbdff.js → RadioGroup-d0af378e.js} +2 -2
  2. package/components/AdvancedTable/AdvancedPagination.js +7 -7
  3. package/components/AdvancedTable/ColumnHeader.js +3 -3
  4. package/components/AdvancedTable/ColumnSettings.js +7 -7
  5. package/components/AdvancedTable/IndeterminateCheckbox.js +5 -5
  6. package/components/AdvancedTable/Table.js +7 -7
  7. package/components/AdvancedTable/hooks/useTableControl.js +6 -6
  8. package/components/AdvancedTable/index.js +7 -7
  9. package/components/Alert/Alert.js +6 -6
  10. package/components/Alert/index.js +6 -6
  11. package/components/Avatar/Avatar.js +7 -7
  12. package/components/Avatar/AvatarGroup.js +7 -7
  13. package/components/Avatar/index.js +7 -7
  14. package/components/Button/Button.js +6 -6
  15. package/components/Button/index.js +6 -6
  16. package/components/ButtonIcon/ButtonIcon.js +6 -6
  17. package/components/ButtonIcon/index.js +6 -6
  18. package/components/CardBody/CardBody.js +6 -6
  19. package/components/CardBody/index.js +6 -6
  20. package/components/CardSelect/CardSelect.js +6 -6
  21. package/components/CardSelect/CardSelectGroup.js +6 -6
  22. package/components/CardSelect/components/CardChips.js +3 -3
  23. package/components/CardSelect/components/CardInput.js +6 -6
  24. package/components/CardSelect/components/index.js +6 -6
  25. package/components/CardSelect/index.js +6 -6
  26. package/components/Cards/CardItem.js +1 -1
  27. package/components/Cards/index.js +1 -1
  28. package/components/Checkbox/Checkbox.js +5 -5
  29. package/components/Checkbox/index.js +5 -5
  30. package/components/Chips/Chips.js +3 -3
  31. package/components/Chips/index.js +3 -3
  32. package/components/Collapse/CollapseGroup/CollapseGroup.js +5 -5
  33. package/components/Collapse/CollapseItem/CollapseItem.js +3 -3
  34. package/components/Collapse/index.js +5 -5
  35. package/components/Copy/Copy.js +6 -6
  36. package/components/Copy/index.js +6 -6
  37. package/components/Counter/Counter.js +6 -6
  38. package/components/Counter/index.js +6 -6
  39. package/components/DatePicker/CustomHeader/CustomHeader.js +7 -7
  40. package/components/DatePicker/RangeDatePicker.js +6 -6
  41. package/components/DatePicker/SimpleDatePicker.js +7 -7
  42. package/components/DatePicker/TimePicker.js +6 -6
  43. package/components/DatePicker/hooks.js +2 -2
  44. package/components/DatePicker/index.js +7 -7
  45. package/components/Empty/Empty.js +6 -6
  46. package/components/Empty/index.js +6 -6
  47. package/components/FileUpload/FileUpload.js +7 -7
  48. package/components/FileUpload/UploadItems.js +6 -6
  49. package/components/FileUpload/index.js +7 -7
  50. package/components/FormContainer/FormContainer.js +6 -6
  51. package/components/FormContainer/index.js +6 -6
  52. package/components/FormField/FormField.js +5 -5
  53. package/components/FormField/index.js +5 -5
  54. package/components/Input/Input.js +6 -6
  55. package/components/Input/InputPassword.js +6 -6
  56. package/components/Input/index.js +6 -6
  57. package/components/ItemSelect/ItemSelect.js +5 -5
  58. package/components/ItemSelect/ItemSelectGroup.js +5 -5
  59. package/components/ItemSelect/index.js +5 -5
  60. package/components/Link/Link.js +2 -2
  61. package/components/Link/index.js +2 -2
  62. package/components/Menu/Menu.js +7 -7
  63. package/components/Menu/NestedMenu.js +7 -7
  64. package/components/Menu/index.js +7 -7
  65. package/components/Modal/Modal.js +6 -6
  66. package/components/Modal/ModalConfirmation.js +6 -6
  67. package/components/Modal/index.js +6 -6
  68. package/components/More/More.js +6 -6
  69. package/components/More/index.js +6 -6
  70. package/components/MultiTextareaWithChips/MultiTextareaWithChips.d.ts +1 -1
  71. package/components/MultiTextareaWithChips/MultiTextareaWithChips.js +152 -257
  72. package/components/MultiTextareaWithChips/hooks/index.d.ts +4 -0
  73. package/components/MultiTextareaWithChips/hooks/index.js +8 -0
  74. package/components/MultiTextareaWithChips/hooks/useChipManagement.d.ts +21 -0
  75. package/components/MultiTextareaWithChips/hooks/useChipManagement.js +81 -0
  76. package/components/MultiTextareaWithChips/hooks/useChipValidation.d.ts +13 -0
  77. package/components/MultiTextareaWithChips/hooks/useChipValidation.js +65 -0
  78. package/components/MultiTextareaWithChips/hooks/useDropdownLogic.d.ts +17 -0
  79. package/components/MultiTextareaWithChips/hooks/useDropdownLogic.js +91 -0
  80. package/components/MultiTextareaWithChips/hooks/useKeyboardNavigation.d.ts +23 -0
  81. package/components/MultiTextareaWithChips/hooks/useKeyboardNavigation.js +72 -0
  82. package/components/MultiTextareaWithChips/index.d.ts +1 -1
  83. package/components/MultiTextareaWithChips/index.js +10 -7
  84. package/components/MultiTextareaWithChips/types.d.ts +25 -31
  85. package/components/OneTimePassword/OneTimePassword.js +7 -7
  86. package/components/OneTimePassword/index.js +7 -7
  87. package/components/Pagination/Pagination.js +3 -3
  88. package/components/Pagination/index.js +3 -3
  89. package/components/Popover/Popover.js +3 -3
  90. package/components/Popover/index.js +3 -3
  91. package/components/Progress/ProgressBarWrapper.js +2 -2
  92. package/components/Progress/index.js +2 -2
  93. package/components/ProgressStep/ProgressStep.js +2 -2
  94. package/components/ProgressStep/Step.js +2 -2
  95. package/components/ProgressStep/index.js +2 -2
  96. package/components/Radio/RadioGroup.js +5 -5
  97. package/components/Radio/index.js +5 -5
  98. package/components/SVGIcons/IconAdd.js +2 -2
  99. package/components/SVGIcons/IconAddCircle.js +2 -2
  100. package/components/SVGIcons/IconAddCircleFilled.js +2 -2
  101. package/components/SVGIcons/IconAddFilled.js +2 -2
  102. package/components/SVGIcons/IconAlert.js +2 -2
  103. package/components/SVGIcons/IconAlertBadge.js +2 -2
  104. package/components/SVGIcons/IconAlertBadgeFilled.js +2 -2
  105. package/components/SVGIcons/IconAlertFilled.js +2 -2
  106. package/components/SVGIcons/IconAm.js +2 -2
  107. package/components/SVGIcons/IconAmd.js +2 -2
  108. package/components/SVGIcons/IconAmdFilled.js +2 -2
  109. package/components/SVGIcons/IconApple.js +2 -2
  110. package/components/SVGIcons/IconAppsList.js +2 -2
  111. package/components/SVGIcons/IconAppsListDetail.js +2 -2
  112. package/components/SVGIcons/IconAppsListDetailFilled.js +2 -2
  113. package/components/SVGIcons/IconAppsListFilled.js +2 -2
  114. package/components/SVGIcons/IconArrowCircleDown.js +2 -2
  115. package/components/SVGIcons/IconArrowCircleDownSplit.js +2 -2
  116. package/components/SVGIcons/IconArrowDown.js +2 -2
  117. package/components/SVGIcons/IconArrowDownFilled.js +2 -2
  118. package/components/SVGIcons/IconArrowDownLeft.js +2 -2
  119. package/components/SVGIcons/IconArrowDownLeftFilled.js +2 -2
  120. package/components/SVGIcons/IconArrowDownload.js +2 -2
  121. package/components/SVGIcons/IconArrowDownloadFilled.js +2 -2
  122. package/components/SVGIcons/IconArrowEnter.js +2 -2
  123. package/components/SVGIcons/IconArrowEnterFilled.js +2 -2
  124. package/components/SVGIcons/IconArrowExit.js +2 -2
  125. package/components/SVGIcons/IconArrowExitFilled.js +2 -2
  126. package/components/SVGIcons/IconArrowExportLeftToRight.js +2 -2
  127. package/components/SVGIcons/IconArrowExportLeftToRightFilled.js +2 -2
  128. package/components/SVGIcons/IconArrowExportRightToLeft.js +2 -2
  129. package/components/SVGIcons/IconArrowExportRightToLeftFilled.js +2 -2
  130. package/components/SVGIcons/IconArrowExportUp.js +2 -2
  131. package/components/SVGIcons/IconArrowExportUpFilled.js +2 -2
  132. package/components/SVGIcons/IconArrowImport.js +2 -2
  133. package/components/SVGIcons/IconArrowImportFilled.js +2 -2
  134. package/components/SVGIcons/IconArrowLeft.js +2 -2
  135. package/components/SVGIcons/IconArrowLeftFilled.js +2 -2
  136. package/components/SVGIcons/IconArrowRepeatAll.js +2 -2
  137. package/components/SVGIcons/IconArrowRepeatAllFilled.js +2 -2
  138. package/components/SVGIcons/IconArrowReset.js +2 -2
  139. package/components/SVGIcons/IconArrowResetFilled.js +2 -2
  140. package/components/SVGIcons/IconArrowRight.js +2 -2
  141. package/components/SVGIcons/IconArrowRightFilled.js +2 -2
  142. package/components/SVGIcons/IconArrowSort.js +2 -2
  143. package/components/SVGIcons/IconArrowSortFilled.js +2 -2
  144. package/components/SVGIcons/IconArrowSwap.js +2 -2
  145. package/components/SVGIcons/IconArrowSwapFilled.js +2 -2
  146. package/components/SVGIcons/IconArrowSync.js +2 -2
  147. package/components/SVGIcons/IconArrowSyncFilled.js +2 -2
  148. package/components/SVGIcons/IconArrowUp.js +2 -2
  149. package/components/SVGIcons/IconArrowUpFilled.js +2 -2
  150. package/components/SVGIcons/IconArrowUpLeft.js +2 -2
  151. package/components/SVGIcons/IconArrowUpLeftFilled.js +2 -2
  152. package/components/SVGIcons/IconArrowUpRight.js +2 -2
  153. package/components/SVGIcons/IconArrowUpRightFilled.js +2 -2
  154. package/components/SVGIcons/IconAttach.js +2 -2
  155. package/components/SVGIcons/IconAttachFilled.js +2 -2
  156. package/components/SVGIcons/IconBadge.js +2 -2
  157. package/components/SVGIcons/IconBadgeFilled.js +2 -2
  158. package/components/SVGIcons/IconBeach.js +2 -2
  159. package/components/SVGIcons/IconBeachFilled.js +2 -2
  160. package/components/SVGIcons/IconBed.js +2 -2
  161. package/components/SVGIcons/IconBedFilled.js +2 -2
  162. package/components/SVGIcons/IconBook.js +2 -2
  163. package/components/SVGIcons/IconBookFilled.js +2 -2
  164. package/components/SVGIcons/IconBookOpen.js +2 -2
  165. package/components/SVGIcons/IconBookOpenFilled.js +2 -2
  166. package/components/SVGIcons/IconBookmark.js +2 -2
  167. package/components/SVGIcons/IconBookmarkFilled.js +2 -2
  168. package/components/SVGIcons/IconBriefcase.js +2 -2
  169. package/components/SVGIcons/IconBriefcaseFilled.js +2 -2
  170. package/components/SVGIcons/IconBroom.js +2 -2
  171. package/components/SVGIcons/IconBroomFilled.js +2 -2
  172. package/components/SVGIcons/IconBuilding.js +2 -2
  173. package/components/SVGIcons/IconBuildingBank.js +2 -2
  174. package/components/SVGIcons/IconBuildingBankFilled.js +2 -2
  175. package/components/SVGIcons/IconBuildingFilled.js +2 -2
  176. package/components/SVGIcons/IconBuildingHome.js +2 -2
  177. package/components/SVGIcons/IconBuildingHomeFilled.js +2 -2
  178. package/components/SVGIcons/IconBuildingShop.js +2 -2
  179. package/components/SVGIcons/IconBuildingShopFilled.js +2 -2
  180. package/components/SVGIcons/IconBulletListAdd.js +2 -2
  181. package/components/SVGIcons/IconBulletListAddFilled.js +2 -2
  182. package/components/SVGIcons/IconCalculator.js +2 -2
  183. package/components/SVGIcons/IconCalculatorFilled.js +2 -2
  184. package/components/SVGIcons/IconCalendarCheckmark.js +2 -2
  185. package/components/SVGIcons/IconCalendarCheckmarkFilled.js +2 -2
  186. package/components/SVGIcons/IconCalendarClock.js +2 -2
  187. package/components/SVGIcons/IconCalendarClockFilled.js +2 -2
  188. package/components/SVGIcons/IconCalendarDay.js +2 -2
  189. package/components/SVGIcons/IconCalendarDayFilled.js +2 -2
  190. package/components/SVGIcons/IconCalendarLeft.js +2 -2
  191. package/components/SVGIcons/IconCalendarLeftFilled.js +2 -2
  192. package/components/SVGIcons/IconCalendarRight.js +2 -2
  193. package/components/SVGIcons/IconCalendarRightFilled.js +2 -2
  194. package/components/SVGIcons/IconCall.js +2 -2
  195. package/components/SVGIcons/IconCallFilled.js +2 -2
  196. package/components/SVGIcons/IconCameraDome.js +2 -2
  197. package/components/SVGIcons/IconCameraDomeFilled.js +2 -2
  198. package/components/SVGIcons/IconCard.js +2 -2
  199. package/components/SVGIcons/IconCardFilled.js +2 -2
  200. package/components/SVGIcons/IconCaretDown.js +2 -2
  201. package/components/SVGIcons/IconCaretDownFilled.js +2 -2
  202. package/components/SVGIcons/IconCaretDownRight.js +2 -2
  203. package/components/SVGIcons/IconCaretDownRightFilled.js +2 -2
  204. package/components/SVGIcons/IconCaretLeft.js +2 -2
  205. package/components/SVGIcons/IconCaretLeftFilled.js +2 -2
  206. package/components/SVGIcons/IconCaretRight.js +2 -2
  207. package/components/SVGIcons/IconCaretRightFilled.js +2 -2
  208. package/components/SVGIcons/IconCaretUp.js +2 -2
  209. package/components/SVGIcons/IconCaretUpFilled.js +2 -2
  210. package/components/SVGIcons/IconChat.js +2 -2
  211. package/components/SVGIcons/IconChatFilled.js +2 -2
  212. package/components/SVGIcons/IconChatMultiple.js +2 -2
  213. package/components/SVGIcons/IconChatMultipleFilled.js +2 -2
  214. package/components/SVGIcons/IconCheckboxArrowRight.js +2 -2
  215. package/components/SVGIcons/IconCheckboxArrowRightFilled.js +2 -2
  216. package/components/SVGIcons/IconCheckmark.js +2 -2
  217. package/components/SVGIcons/IconCheckmarkCircle.js +2 -2
  218. package/components/SVGIcons/IconCheckmarkCircleFilled.js +2 -2
  219. package/components/SVGIcons/IconCheckmarkFilled.js +2 -2
  220. package/components/SVGIcons/IconCheckmarkStarburst.js +2 -2
  221. package/components/SVGIcons/IconCheckmarkStarburstFilled.js +2 -2
  222. package/components/SVGIcons/IconChevronDoubleLeft.js +2 -2
  223. package/components/SVGIcons/IconChevronDoubleLeftFilled.js +2 -2
  224. package/components/SVGIcons/IconChevronDoubleRight.js +2 -2
  225. package/components/SVGIcons/IconChevronDoubleRightFilled.js +2 -2
  226. package/components/SVGIcons/IconChevronDown.js +2 -2
  227. package/components/SVGIcons/IconChevronDownFilled.js +2 -2
  228. package/components/SVGIcons/IconChevronLeft.js +2 -2
  229. package/components/SVGIcons/IconChevronLeftFilled.js +2 -2
  230. package/components/SVGIcons/IconChevronRight.js +2 -2
  231. package/components/SVGIcons/IconChevronRightFilled.js +2 -2
  232. package/components/SVGIcons/IconChevronUp.js +2 -2
  233. package/components/SVGIcons/IconChevronUpDown.js +2 -2
  234. package/components/SVGIcons/IconChevronUpDownFilled.js +2 -2
  235. package/components/SVGIcons/IconChevronUpFilled.js +2 -2
  236. package/components/SVGIcons/IconCircleOff.js +2 -2
  237. package/components/SVGIcons/IconCircleOffFilled.js +2 -2
  238. package/components/SVGIcons/IconClock.js +2 -2
  239. package/components/SVGIcons/IconClockDismiss.js +2 -2
  240. package/components/SVGIcons/IconClockDismissFilled.js +2 -2
  241. package/components/SVGIcons/IconClockFilled.js +2 -2
  242. package/components/SVGIcons/IconColor.js +2 -2
  243. package/components/SVGIcons/IconColorFilled.js +2 -2
  244. package/components/SVGIcons/IconComment.js +2 -2
  245. package/components/SVGIcons/IconCommentFilled.js +2 -2
  246. package/components/SVGIcons/IconCompareCar.js +2 -2
  247. package/components/SVGIcons/IconCompareCarFilled.js +2 -2
  248. package/components/SVGIcons/IconContractCard.js +2 -2
  249. package/components/SVGIcons/IconContractCardFilled.js +2 -2
  250. package/components/SVGIcons/IconCopy.js +2 -2
  251. package/components/SVGIcons/IconCopyFilled.js +2 -2
  252. package/components/SVGIcons/IconCubeTree.js +2 -2
  253. package/components/SVGIcons/IconCubeTreeFilled.js +2 -2
  254. package/components/SVGIcons/IconDatabase.js +2 -2
  255. package/components/SVGIcons/IconDatabaseFilled.js +2 -2
  256. package/components/SVGIcons/IconDelete.js +2 -2
  257. package/components/SVGIcons/IconDeleteFilled.js +2 -2
  258. package/components/SVGIcons/IconDesignIdeas.js +2 -2
  259. package/components/SVGIcons/IconDesignIdeasFilled.js +2 -2
  260. package/components/SVGIcons/IconDeviceMeetingRoom.js +2 -2
  261. package/components/SVGIcons/IconDeviceMeetingRoomFilled.js +2 -2
  262. package/components/SVGIcons/IconDismiss.js +2 -2
  263. package/components/SVGIcons/IconDismissCircle.js +2 -2
  264. package/components/SVGIcons/IconDismissCircleFilled.js +2 -2
  265. package/components/SVGIcons/IconDismissFilled.js +2 -2
  266. package/components/SVGIcons/IconDocument.js +2 -2
  267. package/components/SVGIcons/IconDocumentBulletList.js +2 -2
  268. package/components/SVGIcons/IconDocumentBulletListFilled.js +2 -2
  269. package/components/SVGIcons/IconDocumentEdit.js +2 -2
  270. package/components/SVGIcons/IconDocumentEditFilled.js +2 -2
  271. package/components/SVGIcons/IconDocumentFilled.js +2 -2
  272. package/components/SVGIcons/IconDocumentFooter.js +2 -2
  273. package/components/SVGIcons/IconDocumentFooterFilled.js +2 -2
  274. package/components/SVGIcons/IconDocumentOnePage.js +2 -2
  275. package/components/SVGIcons/IconDocumentOnePageFilled.js +2 -2
  276. package/components/SVGIcons/IconEdit.js +2 -2
  277. package/components/SVGIcons/IconEditFilled.js +2 -2
  278. package/components/SVGIcons/IconEngine.js +2 -2
  279. package/components/SVGIcons/IconEngineFilled.js +2 -2
  280. package/components/SVGIcons/IconErrorCircle.js +2 -2
  281. package/components/SVGIcons/IconErrorCircleFilled.js +2 -2
  282. package/components/SVGIcons/IconEur.js +2 -2
  283. package/components/SVGIcons/IconEurFilled.js +2 -2
  284. package/components/SVGIcons/IconExpandUpLeft.js +2 -2
  285. package/components/SVGIcons/IconExpandUpLeftFilled.js +2 -2
  286. package/components/SVGIcons/IconExpandUpRight.js +2 -2
  287. package/components/SVGIcons/IconExpandUpRightFilled.js +2 -2
  288. package/components/SVGIcons/IconEyeOff.js +2 -2
  289. package/components/SVGIcons/IconEyeOffFilled.js +2 -2
  290. package/components/SVGIcons/IconEyeOn.js +2 -2
  291. package/components/SVGIcons/IconEyeOnFilled.js +2 -2
  292. package/components/SVGIcons/IconFacebook.js +2 -2
  293. package/components/SVGIcons/IconFilter.js +2 -2
  294. package/components/SVGIcons/IconFilterFilled.js +2 -2
  295. package/components/SVGIcons/IconFlag.js +2 -2
  296. package/components/SVGIcons/IconFlagFilled.js +2 -2
  297. package/components/SVGIcons/IconFlash.js +2 -2
  298. package/components/SVGIcons/IconFlashFilled.js +2 -2
  299. package/components/SVGIcons/IconFolderLink.js +2 -2
  300. package/components/SVGIcons/IconFolderLinkFilled.js +2 -2
  301. package/components/SVGIcons/IconFolderPerson.js +2 -2
  302. package/components/SVGIcons/IconFolderPersonFilled.js +2 -2
  303. package/components/SVGIcons/IconFunnel.js +2 -2
  304. package/components/SVGIcons/IconFunnelFilled.js +2 -2
  305. package/components/SVGIcons/IconGas.js +2 -2
  306. package/components/SVGIcons/IconGb.js +2 -2
  307. package/components/SVGIcons/IconGlobe.js +2 -2
  308. package/components/SVGIcons/IconGlobeFilled.js +2 -2
  309. package/components/SVGIcons/IconGlobeLocation.js +2 -2
  310. package/components/SVGIcons/IconGlobeLocationFilled.js +2 -2
  311. package/components/SVGIcons/IconGoogle.js +2 -2
  312. package/components/SVGIcons/IconGrid.js +2 -2
  313. package/components/SVGIcons/IconGridFilled.js +2 -2
  314. package/components/SVGIcons/IconHandOpenHeart.js +2 -2
  315. package/components/SVGIcons/IconHandOpenHeartFilled.js +2 -2
  316. package/components/SVGIcons/IconHandWave.js +2 -2
  317. package/components/SVGIcons/IconHandWaveFilled.js +2 -2
  318. package/components/SVGIcons/IconHdm.js +2 -2
  319. package/components/SVGIcons/IconHdmFilled.js +2 -2
  320. package/components/SVGIcons/IconHeart.js +2 -2
  321. package/components/SVGIcons/IconHeartFilled.js +2 -2
  322. package/components/SVGIcons/IconHistory.js +2 -2
  323. package/components/SVGIcons/IconHistoryFilled.js +2 -2
  324. package/components/SVGIcons/IconHome.js +2 -2
  325. package/components/SVGIcons/IconHomeAdd.js +2 -2
  326. package/components/SVGIcons/IconHomeAddFilled.js +2 -2
  327. package/components/SVGIcons/IconHomeFilled.js +2 -2
  328. package/components/SVGIcons/IconImage.js +2 -2
  329. package/components/SVGIcons/IconImageFilled.js +2 -2
  330. package/components/SVGIcons/IconInfo.js +2 -2
  331. package/components/SVGIcons/IconInfoFilled.js +2 -2
  332. package/components/SVGIcons/IconInstagram.js +2 -2
  333. package/components/SVGIcons/IconKey.js +2 -2
  334. package/components/SVGIcons/IconKeyFilled.js +2 -2
  335. package/components/SVGIcons/IconKeyReset.js +2 -2
  336. package/components/SVGIcons/IconKeyResetFilled.js +2 -2
  337. package/components/SVGIcons/IconLaptop.js +2 -2
  338. package/components/SVGIcons/IconLaptopFilled.js +2 -2
  339. package/components/SVGIcons/IconLeaf.js +2 -2
  340. package/components/SVGIcons/IconLeafFilled.js +2 -2
  341. package/components/SVGIcons/IconLightbulb.js +2 -2
  342. package/components/SVGIcons/IconLightbulbFilled.js +2 -2
  343. package/components/SVGIcons/IconLink.js +2 -2
  344. package/components/SVGIcons/IconLinkFilled.js +2 -2
  345. package/components/SVGIcons/IconLinkedin.js +2 -2
  346. package/components/SVGIcons/IconList.js +2 -2
  347. package/components/SVGIcons/IconListFilled.js +2 -2
  348. package/components/SVGIcons/IconLoan.js +2 -2
  349. package/components/SVGIcons/IconLoanFilled.js +2 -2
  350. package/components/SVGIcons/IconLocation.js +2 -2
  351. package/components/SVGIcons/IconLocationFilled.js +2 -2
  352. package/components/SVGIcons/IconLockClosed.js +2 -2
  353. package/components/SVGIcons/IconLockClosedFilled.js +2 -2
  354. package/components/SVGIcons/IconLockMultiple.js +2 -2
  355. package/components/SVGIcons/IconLockMultipleFilled.js +2 -2
  356. package/components/SVGIcons/IconLockOpen.js +2 -2
  357. package/components/SVGIcons/IconLockOpenFilled.js +2 -2
  358. package/components/SVGIcons/IconMail.js +2 -2
  359. package/components/SVGIcons/IconMailAdd.js +2 -2
  360. package/components/SVGIcons/IconMailAddFilled.js +2 -2
  361. package/components/SVGIcons/IconMailArrowForward.js +2 -2
  362. package/components/SVGIcons/IconMailArrowForwardFilled.js +2 -2
  363. package/components/SVGIcons/IconMailFilled.js +2 -2
  364. package/components/SVGIcons/IconMailLink.js +2 -2
  365. package/components/SVGIcons/IconMailLinkFilled.js +2 -2
  366. package/components/SVGIcons/IconMedium.js +2 -2
  367. package/components/SVGIcons/IconMention.js +2 -2
  368. package/components/SVGIcons/IconMentionFilled.js +2 -2
  369. package/components/SVGIcons/IconMoney.js +2 -2
  370. package/components/SVGIcons/IconMoneyFilled.js +2 -2
  371. package/components/SVGIcons/IconMoneyHand.js +2 -2
  372. package/components/SVGIcons/IconMoneyHandFilled.js +2 -2
  373. package/components/SVGIcons/IconMore.js +2 -2
  374. package/components/SVGIcons/IconMoreFilled.js +2 -2
  375. package/components/SVGIcons/IconMoreVertical.js +2 -2
  376. package/components/SVGIcons/IconMoreVerticalFilled.js +2 -2
  377. package/components/SVGIcons/IconNavigation.js +2 -2
  378. package/components/SVGIcons/IconNavigationFilled.js +2 -2
  379. package/components/SVGIcons/IconNotebook.js +2 -2
  380. package/components/SVGIcons/IconNotebookAdd.js +2 -2
  381. package/components/SVGIcons/IconNotebookAddFilled.js +2 -2
  382. package/components/SVGIcons/IconNotebookFilled.js +2 -2
  383. package/components/SVGIcons/IconNumberSymbolSquare.js +2 -2
  384. package/components/SVGIcons/IconNumberSymbolSquareFilled.js +2 -2
  385. package/components/SVGIcons/IconOnlyEmployee.js +2 -2
  386. package/components/SVGIcons/IconOpen.js +2 -2
  387. package/components/SVGIcons/IconOpenFilled.js +2 -2
  388. package/components/SVGIcons/IconPaintBrush.js +2 -2
  389. package/components/SVGIcons/IconPaintBrushFilled.js +2 -2
  390. package/components/SVGIcons/IconPanelLeft.js +2 -2
  391. package/components/SVGIcons/IconPanelLeftFilled.js +2 -2
  392. package/components/SVGIcons/IconPanelRight.js +2 -2
  393. package/components/SVGIcons/IconPanelRightFilled.js +2 -2
  394. package/components/SVGIcons/IconPatient.js +2 -2
  395. package/components/SVGIcons/IconPatientFilled.js +2 -2
  396. package/components/SVGIcons/IconPeople.js +2 -2
  397. package/components/SVGIcons/IconPeopleAdd.js +2 -2
  398. package/components/SVGIcons/IconPeopleAddFilled.js +2 -2
  399. package/components/SVGIcons/IconPeopleFilled.js +2 -2
  400. package/components/SVGIcons/IconPercent.js +2 -2
  401. package/components/SVGIcons/IconPerson.js +2 -2
  402. package/components/SVGIcons/IconPersonAccount.js +2 -2
  403. package/components/SVGIcons/IconPersonAccountFilled.js +2 -2
  404. package/components/SVGIcons/IconPersonAdd.js +2 -2
  405. package/components/SVGIcons/IconPersonAddFilled.js +2 -2
  406. package/components/SVGIcons/IconPersonFilled.js +2 -2
  407. package/components/SVGIcons/IconPersonNote.js +2 -2
  408. package/components/SVGIcons/IconPersonNoteFilled.js +2 -2
  409. package/components/SVGIcons/IconPersonStar.js +2 -2
  410. package/components/SVGIcons/IconPersonStarFilled.js +2 -2
  411. package/components/SVGIcons/IconPersonSubtract.js +2 -2
  412. package/components/SVGIcons/IconPersonSubtractFilled.js +2 -2
  413. package/components/SVGIcons/IconPhone.js +2 -2
  414. package/components/SVGIcons/IconPhoneFilled.js +2 -2
  415. package/components/SVGIcons/IconPlay.js +2 -2
  416. package/components/SVGIcons/IconPlayFilled.js +2 -2
  417. package/components/SVGIcons/IconPos.js +2 -2
  418. package/components/SVGIcons/IconPosFilled.js +2 -2
  419. package/components/SVGIcons/IconProhibited.js +2 -2
  420. package/components/SVGIcons/IconProhibitedFilled.js +2 -2
  421. package/components/SVGIcons/IconProjectProduct.js +2 -2
  422. package/components/SVGIcons/IconQuestionCircle.js +2 -2
  423. package/components/SVGIcons/IconQuestionCircleFilled.js +2 -2
  424. package/components/SVGIcons/IconRedo.js +2 -2
  425. package/components/SVGIcons/IconRedoFilled.js +2 -2
  426. package/components/SVGIcons/IconRu.js +2 -2
  427. package/components/SVGIcons/IconRub.js +2 -2
  428. package/components/SVGIcons/IconRubFilled.js +2 -2
  429. package/components/SVGIcons/IconSave.js +2 -2
  430. package/components/SVGIcons/IconSaveFilled.js +2 -2
  431. package/components/SVGIcons/IconSavings.js +2 -2
  432. package/components/SVGIcons/IconSavingsFilled.js +2 -2
  433. package/components/SVGIcons/IconSearch.js +2 -2
  434. package/components/SVGIcons/IconSearchFilled.js +2 -2
  435. package/components/SVGIcons/IconSelectAllOff.js +2 -2
  436. package/components/SVGIcons/IconSelectAllOffFilled.js +2 -2
  437. package/components/SVGIcons/IconSelectAllOn.js +2 -2
  438. package/components/SVGIcons/IconSelectAllOnFilled.js +2 -2
  439. package/components/SVGIcons/IconSend.js +2 -2
  440. package/components/SVGIcons/IconSendFilled.js +2 -2
  441. package/components/SVGIcons/IconSettings.js +2 -2
  442. package/components/SVGIcons/IconSettingsFilled.js +2 -2
  443. package/components/SVGIcons/IconShare.js +2 -2
  444. package/components/SVGIcons/IconShareAndroid.js +2 -2
  445. package/components/SVGIcons/IconShareAndroidFilled.js +2 -2
  446. package/components/SVGIcons/IconShareFilled.js +2 -2
  447. package/components/SVGIcons/IconShower.js +2 -2
  448. package/components/SVGIcons/IconSign.js +2 -2
  449. package/components/SVGIcons/IconSignFilled.js +2 -2
  450. package/components/SVGIcons/IconSignOut.js +2 -2
  451. package/components/SVGIcons/IconSignOutFilled.js +2 -2
  452. package/components/SVGIcons/IconSlideText.js +2 -2
  453. package/components/SVGIcons/IconSlideTextFilled.js +2 -2
  454. package/components/SVGIcons/IconSpinner.js +2 -2
  455. package/components/SVGIcons/IconSpinnerFilled.js +2 -2
  456. package/components/SVGIcons/IconStar.js +2 -2
  457. package/components/SVGIcons/IconStarFilled.js +2 -2
  458. package/components/SVGIcons/IconStatus.js +2 -2
  459. package/components/SVGIcons/IconStatusFilled.js +2 -2
  460. package/components/SVGIcons/IconSubtract.js +2 -2
  461. package/components/SVGIcons/IconSubtractCircle.js +2 -2
  462. package/components/SVGIcons/IconSubtractCircleFilled.js +2 -2
  463. package/components/SVGIcons/IconSubtractFilled.js +2 -2
  464. package/components/SVGIcons/IconTableCellEdit.js +2 -2
  465. package/components/SVGIcons/IconTableCellEditFilled.js +2 -2
  466. package/components/SVGIcons/IconTelegram.js +2 -2
  467. package/components/SVGIcons/IconTextBulletListSquarePerson.js +2 -2
  468. package/components/SVGIcons/IconTextBulletListSquarePersonFilled.js +2 -2
  469. package/components/SVGIcons/IconTextboxSettings.js +2 -2
  470. package/components/SVGIcons/IconTextboxSettingsFilled.js +2 -2
  471. package/components/SVGIcons/IconTimer.js +2 -2
  472. package/components/SVGIcons/IconTimerFilled.js +2 -2
  473. package/components/SVGIcons/IconTin.js +2 -2
  474. package/components/SVGIcons/IconTinFilled.js +2 -2
  475. package/components/SVGIcons/IconTv.js +2 -2
  476. package/components/SVGIcons/IconTvFilled.js +2 -2
  477. package/components/SVGIcons/IconTwitter.js +2 -2
  478. package/components/SVGIcons/IconUndo.js +2 -2
  479. package/components/SVGIcons/IconUndoFilled.js +2 -2
  480. package/components/SVGIcons/IconUnitsEmployee.js +2 -2
  481. package/components/SVGIcons/IconUs.js +2 -2
  482. package/components/SVGIcons/IconUsd.js +2 -2
  483. package/components/SVGIcons/IconUsdFilled.js +2 -2
  484. package/components/SVGIcons/IconVehicleTruckProfile.js +2 -2
  485. package/components/SVGIcons/IconVehicleTruckProfileFilled.js +2 -2
  486. package/components/SVGIcons/IconViber.js +2 -2
  487. package/components/SVGIcons/IconVideo.js +2 -2
  488. package/components/SVGIcons/IconVideoFilled.js +2 -2
  489. package/components/SVGIcons/IconVpos.js +2 -2
  490. package/components/SVGIcons/IconVposFilled.js +2 -2
  491. package/components/SVGIcons/IconWallet.js +2 -2
  492. package/components/SVGIcons/IconWalletFilled.js +2 -2
  493. package/components/SVGIcons/IconWarning.js +2 -2
  494. package/components/SVGIcons/IconWarningFilled.js +2 -2
  495. package/components/SVGIcons/IconWhatsapp.js +2 -2
  496. package/components/SVGIcons/IconWrenchScrewdriver.js +2 -2
  497. package/components/SVGIcons/IconWrenchScrewdriverFilled.js +2 -2
  498. package/components/SVGIcons/IconXboxConsole.js +2 -2
  499. package/components/SVGIcons/IconXboxConsoleFilled.js +2 -2
  500. package/components/SVGIcons/IconYoutube.js +2 -2
  501. package/components/SVGIcons/IconZoomIn.js +2 -2
  502. package/components/SVGIcons/IconZoomInFilled.js +2 -2
  503. package/components/SVGIcons/IconZoomOut.js +2 -2
  504. package/components/SVGIcons/IconZoomOutFilled.js +2 -2
  505. package/components/SVGIcons/index.js +2 -2
  506. package/components/Select/ButtonSelect/ButtonSelect.js +7 -7
  507. package/components/Select/FilterSelect/FilterDropdown.js +7 -7
  508. package/components/Select/FilterSelect/FilterGroupDropdown.js +7 -7
  509. package/components/Select/FilterSelect/FilterSelect.js +7 -7
  510. package/components/Select/MultiSelect/MultiBase/MultiBase.js +7 -7
  511. package/components/Select/MultiSelect/MultiSelect.js +7 -7
  512. package/components/Select/MultiSelect/MultiSelectGrouped/MultiSelectGrouped.js +7 -7
  513. package/components/Select/MultiSelect/MultiSelectTree/MultiSelectTree.js +7 -7
  514. package/components/Select/MultiSelect/MultiSelectWithTabs/MultiSelectWithTabs.js +7 -7
  515. package/components/Select/MultiSelect/OptionsWrapper.js +7 -7
  516. package/components/Select/MultiSelect/RadioSelectGrouped/RadioSelectGrouped.js +7 -7
  517. package/components/Select/NestedSelect/NestedSelect.js +7 -7
  518. package/components/Select/ProfileDropdown/index.js +3 -3
  519. package/components/Select/Select/Select.js +7 -7
  520. package/components/Select/SharedComponents/Actions.js +7 -7
  521. package/components/Select/SharedComponents/ButtonSelectWrapper/Button/Button.js +2 -2
  522. package/components/Select/SharedComponents/ButtonSelectWrapper/ButtonSelectWrapper.js +3 -3
  523. package/components/Select/SharedComponents/ContentTop.js +7 -7
  524. package/components/Select/SharedComponents/Footer.js +6 -6
  525. package/components/Select/SharedComponents/InputSelectWrapper/InputSelectWrapper.js +6 -6
  526. package/components/Select/SharedComponents/index.js +7 -7
  527. package/components/Select/index.js +7 -7
  528. package/components/SideNavigation/NavigationItem/index.js +6 -6
  529. package/components/SideNavigation/SideNavigation.js +6 -6
  530. package/components/SideNavigation/index.js +6 -6
  531. package/components/SideSheet/Footer/Footer.js +6 -6
  532. package/components/SideSheet/SideSheet.js +6 -6
  533. package/components/SideSheet/index.js +6 -6
  534. package/components/Snackbar/Snackbar.js +6 -6
  535. package/components/Snackbar/index.js +6 -6
  536. package/components/Status/Status.js +3 -3
  537. package/components/Status/index.js +3 -3
  538. package/components/Stepper/Stepper.js +1 -1
  539. package/components/Stepper/index.js +1 -1
  540. package/components/Switcher/Switcher.js +5 -5
  541. package/components/Switcher/index.js +5 -5
  542. package/components/Tab/Tab.js +2 -2
  543. package/components/Tab/TabItem.js +1 -1
  544. package/components/Tab/index.js +2 -2
  545. package/components/Table/Header.js +6 -6
  546. package/components/Table/IndeterminateCheckbox.js +5 -5
  547. package/components/Table/Row.js +6 -6
  548. package/components/Table/Table.js +7 -7
  549. package/components/Table/index.js +7 -7
  550. package/components/Table/utils.js +6 -6
  551. package/components/Textarea/Textarea.js +6 -6
  552. package/components/Textarea/index.js +6 -6
  553. package/components/Tooltip/Tooltip.js +1 -1
  554. package/components/Tooltip/index.js +1 -1
  555. package/{defineProperty-14863472.js → defineProperty-109927cc.js} +1 -1
  556. package/helperComponents/OptionItem/OptionItem.js +7 -7
  557. package/helperComponents/OptionItem/index.js +7 -7
  558. package/helperComponents/index.js +7 -7
  559. package/hooks/index.js +1 -1
  560. package/hooks/useHideBodyScroll.js +1 -1
  561. package/hooks/useScreenSize.js +1 -1
  562. package/hooks/useSideNavigation.js +1 -1
  563. package/index.js +11 -8
  564. package/package.json +1 -1
  565. package/stories/MultiTextareaWithChips.stories.d.ts +1 -11
  566. package/{toConsumableArray-291d6bc0.js → toConsumableArray-d592cd83.js} +1 -1
  567. package/components/MultiTextareaWithChips/InputWrapper.d.ts +0 -7
  568. package/components/MultiTextareaWithChips/InputWrapper.js +0 -13
  569. /package/{extends-f01f857f.js → extends-cc60c71c.js} +0 -0
  570. /package/{objectWithoutProperties-0d729c01.js → objectWithoutProperties-b19cccde.js} +0 -0
  571. /package/{slicedToArray-396ddcf6.js → slicedToArray-093df980.js} +0 -0
  572. /package/{typeof-e762ff49.js → typeof-e9310111.js} +0 -0
@@ -0,0 +1,81 @@
1
+ import { _ as _typeof } from '../../../typeof-e9310111.js';
2
+ import { _ as _toConsumableArray } from '../../../toConsumableArray-d592cd83.js';
3
+ import { _ as _slicedToArray } from '../../../slicedToArray-093df980.js';
4
+ import { useState, useRef, useEffect, useCallback } from 'react';
5
+
6
+ var useChipManagement = function useChipManagement(_ref) {
7
+ var initialChips = _ref.initialChips,
8
+ fieldName = _ref.fieldName,
9
+ formProps = _ref.formProps,
10
+ setValue = _ref.setValue,
11
+ onAddChip = _ref.onAddChip,
12
+ onRemoveChip = _ref.onRemoveChip;
13
+ var _useState = useState(initialChips),
14
+ _useState2 = _slicedToArray(_useState, 2),
15
+ chips = _useState2[0],
16
+ setChips = _useState2[1];
17
+ var isUserInteraction = useRef(false);
18
+ useEffect(function () {
19
+ if (!isUserInteraction.current) {
20
+ setChips(initialChips);
21
+ }
22
+ }, [initialChips]);
23
+ var updateFormValue = useCallback(function (newChips) {
24
+ if (isUserInteraction.current) {
25
+ if (formProps !== null && formProps !== void 0 && formProps.setFieldValue) {
26
+ formProps.setFieldValue(fieldName, newChips);
27
+ }
28
+ if (setValue) {
29
+ setValue(fieldName, newChips);
30
+ }
31
+ }
32
+ }, [formProps, setValue, fieldName]);
33
+ var addChip = useCallback(function (chip) {
34
+ isUserInteraction.current = true;
35
+ var newChips = [].concat(_toConsumableArray(chips), [chip]);
36
+ setChips(newChips);
37
+ updateFormValue(newChips);
38
+ if (typeof chip === 'string') {
39
+ onAddChip === null || onAddChip === void 0 || onAddChip(chip);
40
+ } else {
41
+ onAddChip === null || onAddChip === void 0 || onAddChip(chip.text);
42
+ }
43
+ }, [chips, updateFormValue, onAddChip]);
44
+ var removeChip = useCallback(function (chipText) {
45
+ isUserInteraction.current = true;
46
+ var newChips = chips.filter(function (chip) {
47
+ var text = typeof chip === 'string' ? chip : chip.text;
48
+ return text !== chipText;
49
+ });
50
+ setChips(newChips);
51
+ updateFormValue(newChips);
52
+ onRemoveChip === null || onRemoveChip === void 0 || onRemoveChip(chipText);
53
+ }, [chips, updateFormValue, onRemoveChip]);
54
+ var getChipTexts = useCallback(function () {
55
+ return chips.map(function (chip) {
56
+ return typeof chip === 'string' ? chip : chip.text;
57
+ });
58
+ }, [chips]);
59
+ var hasErrorChips = chips.some(function (chip) {
60
+ return _typeof(chip) === 'object' && chip.hasError;
61
+ });
62
+ var getErrorMessage = useCallback(function () {
63
+ var errorChips = chips.filter(function (chip) {
64
+ return _typeof(chip) === 'object' && chip.hasError;
65
+ });
66
+ var firstError = errorChips.find(function (chip) {
67
+ return chip.errorMessage;
68
+ });
69
+ return (firstError === null || firstError === void 0 ? void 0 : firstError.errorMessage) || '';
70
+ }, [chips]);
71
+ return {
72
+ chips: chips,
73
+ addChip: addChip,
74
+ removeChip: removeChip,
75
+ getChipTexts: getChipTexts,
76
+ hasErrorChips: hasErrorChips,
77
+ getErrorMessage: getErrorMessage
78
+ };
79
+ };
80
+
81
+ export { useChipManagement };
@@ -0,0 +1,13 @@
1
+ import type { AnySchema } from 'yup';
2
+ import type { TChipItem } from '../types';
3
+ interface UseChipValidationProps {
4
+ validationSchema?: AnySchema;
5
+ errorMessage?: string;
6
+ allowInvalidChips?: boolean;
7
+ minChipLength?: number;
8
+ maxChipLength?: number;
9
+ }
10
+ export declare const useChipValidation: ({ validationSchema, errorMessage, allowInvalidChips, minChipLength, maxChipLength }: UseChipValidationProps) => {
11
+ createValidatedChip: (chipText: string) => TChipItem;
12
+ };
13
+ export {};
@@ -0,0 +1,65 @@
1
+ import { useCallback } from 'react';
2
+
3
+ var useChipValidation = function useChipValidation(_ref) {
4
+ var validationSchema = _ref.validationSchema,
5
+ errorMessage = _ref.errorMessage,
6
+ _ref$allowInvalidChip = _ref.allowInvalidChips,
7
+ allowInvalidChips = _ref$allowInvalidChip === void 0 ? false : _ref$allowInvalidChip,
8
+ minChipLength = _ref.minChipLength,
9
+ maxChipLength = _ref.maxChipLength;
10
+ var createValidatedChip = useCallback(function (chipText) {
11
+ var trimmedText = chipText.trim();
12
+ if (minChipLength && trimmedText.length < minChipLength) {
13
+ var message = "Chip must be at least ".concat(minChipLength, " characters long");
14
+ if (!allowInvalidChips) {
15
+ throw new Error(message);
16
+ }
17
+ return {
18
+ text: trimmedText,
19
+ hasError: true,
20
+ errorMessage: message
21
+ };
22
+ }
23
+ if (maxChipLength && trimmedText.length > maxChipLength) {
24
+ var _message = "Chip must be no more than ".concat(maxChipLength, " characters long");
25
+ if (!allowInvalidChips) {
26
+ throw new Error(_message);
27
+ }
28
+ return {
29
+ text: trimmedText,
30
+ hasError: true,
31
+ errorMessage: _message
32
+ };
33
+ }
34
+ if (validationSchema) {
35
+ try {
36
+ validationSchema.validateSync(trimmedText);
37
+ return {
38
+ text: trimmedText,
39
+ hasError: false,
40
+ errorMessage: ''
41
+ };
42
+ } catch (error) {
43
+ var _message2 = errorMessage || error.message || 'Invalid value';
44
+ if (!allowInvalidChips) {
45
+ throw new Error(_message2);
46
+ }
47
+ return {
48
+ text: trimmedText,
49
+ hasError: true,
50
+ errorMessage: _message2
51
+ };
52
+ }
53
+ }
54
+ return {
55
+ text: trimmedText,
56
+ hasError: false,
57
+ errorMessage: ''
58
+ };
59
+ }, [validationSchema, errorMessage, allowInvalidChips, minChipLength, maxChipLength]);
60
+ return {
61
+ createValidatedChip: createValidatedChip
62
+ };
63
+ };
64
+
65
+ export { useChipValidation };
@@ -0,0 +1,17 @@
1
+ /// <reference types="react" />
2
+ interface UseDropdownLogicProps {
3
+ availableOptions: string[];
4
+ chipTexts: string[];
5
+ containerRef: React.RefObject<HTMLDivElement | null>;
6
+ }
7
+ export declare const useDropdownLogic: ({ availableOptions, chipTexts, containerRef }: UseDropdownLogicProps) => {
8
+ showDropdown: boolean;
9
+ filteredOptions: string[];
10
+ selectedOption: string;
11
+ handleInputFocus: (inputValue: string) => void;
12
+ handleInputChange: (inputValue: string) => void;
13
+ navigateOptions: (direction: 'up' | 'down') => void;
14
+ selectOption: (option?: string) => string | null;
15
+ closeDropdown: () => void;
16
+ };
17
+ export {};
@@ -0,0 +1,91 @@
1
+ import { _ as _slicedToArray } from '../../../slicedToArray-093df980.js';
2
+ import { useState, useCallback, useEffect } from 'react';
3
+
4
+ var useDropdownLogic = function useDropdownLogic(_ref) {
5
+ var availableOptions = _ref.availableOptions,
6
+ chipTexts = _ref.chipTexts,
7
+ containerRef = _ref.containerRef;
8
+ var _useState = useState(false),
9
+ _useState2 = _slicedToArray(_useState, 2),
10
+ showDropdown = _useState2[0],
11
+ setShowDropdown = _useState2[1];
12
+ var _useState3 = useState([]),
13
+ _useState4 = _slicedToArray(_useState3, 2),
14
+ filteredOptions = _useState4[0],
15
+ setFilteredOptions = _useState4[1];
16
+ var _useState5 = useState(''),
17
+ _useState6 = _slicedToArray(_useState5, 2),
18
+ selectedOption = _useState6[0],
19
+ setSelectedOption = _useState6[1];
20
+ var filterOptions = useCallback(function (inputValue) {
21
+ if (availableOptions.length === 0) return;
22
+ var filtered = availableOptions.filter(function (option) {
23
+ return option.toLowerCase().includes(inputValue.toLowerCase()) && !chipTexts.includes(option);
24
+ });
25
+ setFilteredOptions(filtered);
26
+ }, [availableOptions, chipTexts]);
27
+ var handleInputFocus = useCallback(function (inputValue) {
28
+ if (availableOptions.length > 0) {
29
+ if (inputValue.trim()) {
30
+ setShowDropdown(true);
31
+ } else {
32
+ filterOptions('');
33
+ setShowDropdown(true);
34
+ }
35
+ }
36
+ }, [availableOptions.length, filterOptions]);
37
+ var handleInputChange = useCallback(function (inputValue) {
38
+ setSelectedOption('');
39
+ filterOptions(inputValue);
40
+ setShowDropdown(availableOptions.length > 0 && inputValue.trim().length > 0);
41
+ }, [filterOptions, availableOptions.length]);
42
+ var navigateOptions = useCallback(function (direction) {
43
+ if (filteredOptions.length === 0) return;
44
+ var currentIndex = selectedOption ? filteredOptions.indexOf(selectedOption) : -1;
45
+ var nextIndex;
46
+ if (direction === 'down') {
47
+ nextIndex = currentIndex < filteredOptions.length - 1 ? currentIndex + 1 : 0;
48
+ } else {
49
+ nextIndex = currentIndex > 0 ? currentIndex - 1 : filteredOptions.length - 1;
50
+ }
51
+ setSelectedOption(filteredOptions[nextIndex]);
52
+ }, [filteredOptions, selectedOption]);
53
+ var selectOption = useCallback(function (option) {
54
+ var optionToSelect = option || selectedOption || filteredOptions[0];
55
+ if (optionToSelect) {
56
+ setShowDropdown(false);
57
+ setSelectedOption('');
58
+ return optionToSelect;
59
+ }
60
+ return null;
61
+ }, [selectedOption, filteredOptions]);
62
+ var closeDropdown = useCallback(function () {
63
+ setShowDropdown(false);
64
+ setSelectedOption('');
65
+ }, []);
66
+ useEffect(function () {
67
+ var handleClickOutside = function handleClickOutside(event) {
68
+ if (containerRef.current && !containerRef.current.contains(event.target)) {
69
+ closeDropdown();
70
+ }
71
+ };
72
+ if (showDropdown) {
73
+ document.addEventListener('mousedown', handleClickOutside);
74
+ }
75
+ return function () {
76
+ document.removeEventListener('mousedown', handleClickOutside);
77
+ };
78
+ }, [showDropdown, closeDropdown, containerRef]);
79
+ return {
80
+ showDropdown: showDropdown,
81
+ filteredOptions: filteredOptions,
82
+ selectedOption: selectedOption,
83
+ handleInputFocus: handleInputFocus,
84
+ handleInputChange: handleInputChange,
85
+ navigateOptions: navigateOptions,
86
+ selectOption: selectOption,
87
+ closeDropdown: closeDropdown
88
+ };
89
+ };
90
+
91
+ export { useDropdownLogic };
@@ -0,0 +1,23 @@
1
+ import type { KeyboardEvent } from 'react';
2
+ interface UseKeyboardNavigationProps {
3
+ disabled: boolean;
4
+ inputValue: string;
5
+ allowCustomValues: boolean;
6
+ chips: Array<string | {
7
+ text: string;
8
+ [key: string]: unknown;
9
+ }>;
10
+ filteredOptions: string[];
11
+ selectedOption: string;
12
+ onEnter: () => void;
13
+ onAddCustomValue: (value: string) => void;
14
+ onNavigateOptions: (direction: 'up' | 'down') => void;
15
+ onSelectOption: (option?: string) => void;
16
+ onCloseDropdown: () => void;
17
+ onRemoveLastChip: () => void;
18
+ inputRef: React.RefObject<HTMLInputElement | null>;
19
+ }
20
+ export declare const useKeyboardNavigation: ({ disabled, inputValue, allowCustomValues, chips, filteredOptions, selectedOption, onEnter, onAddCustomValue, onNavigateOptions, onSelectOption, onCloseDropdown, onRemoveLastChip, inputRef }: UseKeyboardNavigationProps) => {
21
+ handleKeyDown: (e: KeyboardEvent<HTMLInputElement>) => void;
22
+ };
23
+ export {};
@@ -0,0 +1,72 @@
1
+ import { useCallback } from 'react';
2
+
3
+ var useKeyboardNavigation = function useKeyboardNavigation(_ref) {
4
+ var disabled = _ref.disabled,
5
+ inputValue = _ref.inputValue,
6
+ allowCustomValues = _ref.allowCustomValues,
7
+ chips = _ref.chips,
8
+ filteredOptions = _ref.filteredOptions,
9
+ selectedOption = _ref.selectedOption,
10
+ onEnter = _ref.onEnter,
11
+ onAddCustomValue = _ref.onAddCustomValue,
12
+ onNavigateOptions = _ref.onNavigateOptions,
13
+ onSelectOption = _ref.onSelectOption,
14
+ onCloseDropdown = _ref.onCloseDropdown,
15
+ onRemoveLastChip = _ref.onRemoveLastChip,
16
+ inputRef = _ref.inputRef;
17
+ var handleKeyDown = useCallback(function (e) {
18
+ var _inputRef$current;
19
+ if (disabled) return;
20
+ var trimmedInput = inputValue.trim();
21
+ switch (e.key) {
22
+ case 'Enter':
23
+ e.preventDefault();
24
+ if (selectedOption) {
25
+ onSelectOption(selectedOption);
26
+ } else if (filteredOptions.length > 0) {
27
+ onSelectOption(filteredOptions[0]);
28
+ } else if (allowCustomValues && trimmedInput) {
29
+ onAddCustomValue(trimmedInput);
30
+ } else {
31
+ onEnter();
32
+ }
33
+ break;
34
+ case ',':
35
+ if (allowCustomValues && trimmedInput) {
36
+ e.preventDefault();
37
+ onAddCustomValue(trimmedInput);
38
+ }
39
+ break;
40
+ case ' ':
41
+ case 'Space':
42
+ if (allowCustomValues && trimmedInput) {
43
+ e.preventDefault();
44
+ onAddCustomValue(trimmedInput);
45
+ }
46
+ break;
47
+ case 'Escape':
48
+ onCloseDropdown();
49
+ (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || _inputRef$current.blur();
50
+ break;
51
+ case 'ArrowDown':
52
+ e.preventDefault();
53
+ onNavigateOptions('down');
54
+ break;
55
+ case 'ArrowUp':
56
+ e.preventDefault();
57
+ onNavigateOptions('up');
58
+ break;
59
+ case 'Backspace':
60
+ if (!inputValue && chips.length > 0) {
61
+ e.preventDefault();
62
+ onRemoveLastChip();
63
+ }
64
+ break;
65
+ }
66
+ }, [disabled, inputValue, allowCustomValues, chips.length, filteredOptions, selectedOption, onEnter, onAddCustomValue, onNavigateOptions, onSelectOption, onCloseDropdown, onRemoveLastChip, inputRef]);
67
+ return {
68
+ handleKeyDown: handleKeyDown
69
+ };
70
+ };
71
+
72
+ export { useKeyboardNavigation };
@@ -1,3 +1,3 @@
1
1
  export * from './MultiTextareaWithChips';
2
- export * from './InputWrapper';
3
2
  export * from './types';
3
+ export * from './hooks';
@@ -1,8 +1,11 @@
1
1
  export { MultiTextareaWithChips } from './MultiTextareaWithChips.js';
2
- export { InputWrapper } from './InputWrapper.js';
3
- import '../../extends-f01f857f.js';
4
- import '../../toConsumableArray-291d6bc0.js';
5
- import '../../slicedToArray-396ddcf6.js';
2
+ export { useChipManagement } from './hooks/useChipManagement.js';
3
+ export { useChipValidation } from './hooks/useChipValidation.js';
4
+ export { useDropdownLogic } from './hooks/useDropdownLogic.js';
5
+ export { useKeyboardNavigation } from './hooks/useKeyboardNavigation.js';
6
+ import '../../extends-cc60c71c.js';
7
+ import '../../typeof-e9310111.js';
8
+ import '../../slicedToArray-093df980.js';
6
9
  import 'react';
7
10
  import '../Chips/Chips.js';
8
11
  import '../Text/Text.js';
@@ -11,13 +14,12 @@ import '../../utils/helpers.js';
11
14
  import 'dayjs';
12
15
  import '../Chips/types.js';
13
16
  import '../SVGIcons/IconDismissCircleFilled.js';
14
- import '../../defineProperty-14863472.js';
15
- import '../../typeof-e762ff49.js';
17
+ import '../../defineProperty-109927cc.js';
16
18
  import '../Chips/consts.js';
17
19
  import '../../helperComponents/ErrorMessage/ErrorMessage.js';
18
20
  import '../../helperComponents/IconDynamicComponent/IconDynamicComponent.js';
19
21
  import '../../helperComponents/IconDynamicComponent/constants.js';
20
- import '../../RadioGroup-814fbdff.js';
22
+ import '../../RadioGroup-d0af378e.js';
21
23
  import '../Radio/Radio.js';
22
24
  import '../../helperComponents/Label/Label.js';
23
25
  import '../Popover/Popover.js';
@@ -36,3 +38,4 @@ import '../SVGIcons/IconInfo.js';
36
38
  import 'react-syntax-highlighter';
37
39
  import '../../hooks/useFormProps.js';
38
40
  import '../../context/types.js';
41
+ import '../../toConsumableArray-d592cd83.js';
@@ -1,15 +1,32 @@
1
1
  import type { AnySchema } from 'yup';
2
+ export interface TChipItem {
3
+ text: string;
4
+ hasError?: boolean;
5
+ errorMessage?: string;
6
+ id?: string | number;
7
+ [key: string]: unknown;
8
+ }
9
+ export type ChipValue = string | TChipItem;
2
10
  export interface TMultiTextareaWithChipsProps extends IFormCompProps {
3
- allowCustomValues?: boolean;
4
- allowInvalidChips?: boolean;
5
- autoFormIntegration?: boolean;
6
- availableOptions?: string[];
7
- chipValidationErrorMessage?: string;
8
- chipValidationSchema?: AnySchema;
9
- chips?: Array<string | TChipItem>;
11
+ label: string;
12
+ placeholder: string;
13
+ helperText?: string;
14
+ chips?: ChipValue[];
15
+ onAddChip?: (chip: string) => void;
16
+ onRemoveChip?: (chip: string) => void;
10
17
  className?: string;
11
18
  disabled?: boolean;
12
- error?: string;
19
+ availableOptions?: string[];
20
+ allowCustomValues?: boolean;
21
+ searchPlaceholder?: string;
22
+ chipValidationSchema?: AnySchema;
23
+ chipValidationErrorMessage?: string;
24
+ allowInvalidChips?: boolean;
25
+ minChipLength?: number;
26
+ maxChipLength?: number;
27
+ searchPlaceholderText?: string;
28
+ typeAndEnterPlaceholderText?: string;
29
+ noOptionsPlaceholderText?: string;
13
30
  fieldName?: string;
14
31
  formProps?: {
15
32
  setFieldValue?: (fieldName: string, value: TFormValue, shouldValidate?: {
@@ -19,27 +36,4 @@ export interface TMultiTextareaWithChipsProps extends IFormCompProps {
19
36
  shouldValidate: boolean;
20
37
  }) => void) | undefined;
21
38
  };
22
- helperText?: string;
23
- label: string;
24
- maxChipLength?: number;
25
- maxChips?: number;
26
- minChipLength?: number;
27
- minChips?: number;
28
- noOptionsPlaceholderText?: string;
29
- onAddChip?: (chip: string) => void;
30
- onAddChipItem?: (chip: TChipItem) => void;
31
- onRemoveChip?: (chip: string) => void;
32
- onRemoveChipItem?: (chip: TChipItem) => void;
33
- placeholder: string;
34
- required?: boolean;
35
- searchPlaceholder?: string;
36
- searchPlaceholderText?: string;
37
- typeAndEnterPlaceholderText?: string;
38
- validateChip?: (chip: string) => void;
39
39
  }
40
- export type TChipItem = {
41
- text: string;
42
- hasError?: boolean;
43
- errorMessage?: string;
44
- id?: string | number;
45
- };
@@ -1,14 +1,14 @@
1
- import { _ as _extends } from '../../extends-f01f857f.js';
2
- import { _ as _toConsumableArray } from '../../toConsumableArray-291d6bc0.js';
3
- import { _ as _slicedToArray } from '../../slicedToArray-396ddcf6.js';
4
- import { _ as _objectWithoutProperties } from '../../objectWithoutProperties-0d729c01.js';
1
+ import { _ as _extends } from '../../extends-cc60c71c.js';
2
+ import { _ as _toConsumableArray } from '../../toConsumableArray-d592cd83.js';
3
+ import { _ as _slicedToArray } from '../../slicedToArray-093df980.js';
4
+ import { _ as _objectWithoutProperties } from '../../objectWithoutProperties-b19cccde.js';
5
5
  import React, { useState, useRef, useCallback } from 'react';
6
6
  import classNames from 'classnames';
7
7
  import { Input } from '../Input/Input.js';
8
8
  import '../Input/InputPassword.js';
9
9
  import { Label } from '../../helperComponents/Label/Label.js';
10
10
  import { ErrorMessage } from '../../helperComponents/ErrorMessage/ErrorMessage.js';
11
- import '../../RadioGroup-814fbdff.js';
11
+ import '../../RadioGroup-d0af378e.js';
12
12
  import { Text } from '../Text/Text.js';
13
13
  import 'dayjs';
14
14
  import '../../hooks/useScreenSize.js';
@@ -16,8 +16,8 @@ import 'react-hook-form';
16
16
  import '../Radio/Radio.js';
17
17
  import 'react-syntax-highlighter';
18
18
  import { IconCheckmarkCircleFilled } from '../SVGIcons/IconCheckmarkCircleFilled.js';
19
- import '../../defineProperty-14863472.js';
20
- import '../../typeof-e762ff49.js';
19
+ import '../../defineProperty-109927cc.js';
20
+ import '../../typeof-e9310111.js';
21
21
  import 'react-input-mask';
22
22
  import 'react-number-format';
23
23
  import '../../helperComponents/IconDynamicComponent/IconDynamicComponent.js';
@@ -1,13 +1,13 @@
1
1
  export { OneTimePassword } from './OneTimePassword.js';
2
- import '../../extends-f01f857f.js';
3
- import '../../toConsumableArray-291d6bc0.js';
4
- import '../../slicedToArray-396ddcf6.js';
5
- import '../../objectWithoutProperties-0d729c01.js';
2
+ import '../../extends-cc60c71c.js';
3
+ import '../../toConsumableArray-d592cd83.js';
4
+ import '../../slicedToArray-093df980.js';
5
+ import '../../objectWithoutProperties-b19cccde.js';
6
6
  import 'react';
7
7
  import 'classnames';
8
8
  import '../Input/Input.js';
9
- import '../../defineProperty-14863472.js';
10
- import '../../typeof-e762ff49.js';
9
+ import '../../defineProperty-109927cc.js';
10
+ import '../../typeof-e9310111.js';
11
11
  import 'react-input-mask';
12
12
  import 'react-number-format';
13
13
  import '../../helperComponents/Label/Label.js';
@@ -17,7 +17,7 @@ import '../../utils/helpers.js';
17
17
  import 'dayjs';
18
18
  import '../../helperComponents/IconDynamicComponent/IconDynamicComponent.js';
19
19
  import '../../helperComponents/IconDynamicComponent/constants.js';
20
- import '../../RadioGroup-814fbdff.js';
20
+ import '../../RadioGroup-d0af378e.js';
21
21
  import '../Radio/Radio.js';
22
22
  import '../Popover/Popover.js';
23
23
  import '../../hooks/useGetTooltipStyles.js';
@@ -1,4 +1,4 @@
1
- import { _ as _extends } from '../../extends-f01f857f.js';
1
+ import { _ as _extends } from '../../extends-cc60c71c.js';
2
2
  import React from 'react';
3
3
  import ReactPaginate from 'react-paginate';
4
4
  import { PAGE_RANGE_DISPLAYED } from './consts.js';
@@ -6,8 +6,8 @@ import classNames from 'classnames';
6
6
  import { IconChevronRight } from '../SVGIcons/IconChevronRight.js';
7
7
  import { IconChevronLeft } from '../SVGIcons/IconChevronLeft.js';
8
8
  import { IconMore } from '../SVGIcons/IconMore.js';
9
- import '../../defineProperty-14863472.js';
10
- import '../../typeof-e762ff49.js';
9
+ import '../../defineProperty-109927cc.js';
10
+ import '../../typeof-e9310111.js';
11
11
 
12
12
  var Pagination = function Pagination(props) {
13
13
  var totalCount = props.totalCount,
@@ -1,11 +1,11 @@
1
1
  export { Pagination } from './Pagination.js';
2
- import '../../extends-f01f857f.js';
2
+ import '../../extends-cc60c71c.js';
3
3
  import 'react';
4
4
  import 'react-paginate';
5
5
  import './consts.js';
6
6
  import 'classnames';
7
7
  import '../SVGIcons/IconChevronRight.js';
8
- import '../../defineProperty-14863472.js';
9
- import '../../typeof-e762ff49.js';
8
+ import '../../defineProperty-109927cc.js';
9
+ import '../../typeof-e9310111.js';
10
10
  import '../SVGIcons/IconChevronLeft.js';
11
11
  import '../SVGIcons/IconMore.js';
@@ -1,4 +1,4 @@
1
- import { _ as _slicedToArray } from '../../slicedToArray-396ddcf6.js';
1
+ import { _ as _slicedToArray } from '../../slicedToArray-093df980.js';
2
2
  import React, { useState, useId, useEffect } from 'react';
3
3
  import classNames from 'classnames';
4
4
  import { useGetTooltipStyles } from '../../hooks/useGetTooltipStyles.js';
@@ -15,8 +15,8 @@ import '../../hooks/useGetTooltipPosition.js';
15
15
  import '../Tooltip/types.js';
16
16
  import '../../consts/index.js';
17
17
  import '../../utils/helpers.js';
18
- import '../../defineProperty-14863472.js';
19
- import '../../typeof-e762ff49.js';
18
+ import '../../defineProperty-109927cc.js';
19
+ import '../../typeof-e9310111.js';
20
20
 
21
21
  var Popover = function Popover(props) {
22
22
  var dataId = props.dataId,
@@ -1,5 +1,5 @@
1
1
  export { Popover } from './Popover.js';
2
- import '../../slicedToArray-396ddcf6.js';
2
+ import '../../slicedToArray-093df980.js';
3
3
  import 'react';
4
4
  import 'classnames';
5
5
  import '../../hooks/useGetTooltipStyles.js';
@@ -16,5 +16,5 @@ import 'react-hook-form';
16
16
  import '../Text/Text.js';
17
17
  import '../../utils/helpers.js';
18
18
  import '../Link/Link.js';
19
- import '../../defineProperty-14863472.js';
20
- import '../../typeof-e762ff49.js';
19
+ import '../../defineProperty-109927cc.js';
20
+ import '../../typeof-e9310111.js';
@@ -1,5 +1,5 @@
1
- import { _ as _extends } from '../../extends-f01f857f.js';
2
- import { _ as _objectWithoutProperties } from '../../objectWithoutProperties-0d729c01.js';
1
+ import { _ as _extends } from '../../extends-cc60c71c.js';
2
+ import { _ as _objectWithoutProperties } from '../../objectWithoutProperties-b19cccde.js';
3
3
  import React from 'react';
4
4
  import classNames from 'classnames';
5
5
 
@@ -2,5 +2,5 @@ export { Progress } from './Progress.js';
2
2
  export { ProgressBarWrapper } from './ProgressBarWrapper.js';
3
3
  import 'react';
4
4
  import 'classnames';
5
- import '../../extends-f01f857f.js';
6
- import '../../objectWithoutProperties-0d729c01.js';
5
+ import '../../extends-cc60c71c.js';
6
+ import '../../objectWithoutProperties-b19cccde.js';
@@ -7,8 +7,8 @@ import 'dayjs';
7
7
  import './types.js';
8
8
  import './consts.js';
9
9
  import '../SVGIcons/IconDismissCircle.js';
10
- import '../../defineProperty-14863472.js';
11
- import '../../typeof-e762ff49.js';
10
+ import '../../defineProperty-109927cc.js';
11
+ import '../../typeof-e9310111.js';
12
12
  import '../SVGIcons/IconCheckmarkCircle.js';
13
13
 
14
14
  var ProgressStep = function ProgressStep(props) {
@@ -7,8 +7,8 @@ import { IconDismissCircle } from '../SVGIcons/IconDismissCircle.js';
7
7
  import { IconCheckmarkCircle } from '../SVGIcons/IconCheckmarkCircle.js';
8
8
  import '../../utils/helpers.js';
9
9
  import 'dayjs';
10
- import '../../defineProperty-14863472.js';
11
- import '../../typeof-e762ff49.js';
10
+ import '../../defineProperty-109927cc.js';
11
+ import '../../typeof-e9310111.js';
12
12
 
13
13
  var Step = function Step(props) {
14
14
  var width = props.width,
@@ -8,6 +8,6 @@ import 'dayjs';
8
8
  import './types.js';
9
9
  import './consts.js';
10
10
  import '../SVGIcons/IconDismissCircle.js';
11
- import '../../defineProperty-14863472.js';
12
- import '../../typeof-e762ff49.js';
11
+ import '../../defineProperty-109927cc.js';
12
+ import '../../typeof-e9310111.js';
13
13
  import '../SVGIcons/IconCheckmarkCircle.js';