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.
- package/{RadioGroup-814fbdff.js → RadioGroup-d0af378e.js} +2 -2
- package/components/AdvancedTable/AdvancedPagination.js +7 -7
- package/components/AdvancedTable/ColumnHeader.js +3 -3
- package/components/AdvancedTable/ColumnSettings.js +7 -7
- package/components/AdvancedTable/IndeterminateCheckbox.js +5 -5
- package/components/AdvancedTable/Table.js +7 -7
- package/components/AdvancedTable/hooks/useTableControl.js +6 -6
- package/components/AdvancedTable/index.js +7 -7
- package/components/Alert/Alert.js +6 -6
- package/components/Alert/index.js +6 -6
- package/components/Avatar/Avatar.js +7 -7
- package/components/Avatar/AvatarGroup.js +7 -7
- package/components/Avatar/index.js +7 -7
- package/components/Button/Button.js +6 -6
- package/components/Button/index.js +6 -6
- package/components/ButtonIcon/ButtonIcon.js +6 -6
- package/components/ButtonIcon/index.js +6 -6
- package/components/CardBody/CardBody.js +6 -6
- package/components/CardBody/index.js +6 -6
- package/components/CardSelect/CardSelect.js +6 -6
- package/components/CardSelect/CardSelectGroup.js +6 -6
- package/components/CardSelect/components/CardChips.js +3 -3
- package/components/CardSelect/components/CardInput.js +6 -6
- package/components/CardSelect/components/index.js +6 -6
- package/components/CardSelect/index.js +6 -6
- package/components/Cards/CardItem.js +1 -1
- package/components/Cards/index.js +1 -1
- package/components/Checkbox/Checkbox.js +5 -5
- package/components/Checkbox/index.js +5 -5
- package/components/Chips/Chips.js +3 -3
- package/components/Chips/index.js +3 -3
- package/components/Collapse/CollapseGroup/CollapseGroup.js +5 -5
- package/components/Collapse/CollapseItem/CollapseItem.js +3 -3
- package/components/Collapse/index.js +5 -5
- package/components/Copy/Copy.js +6 -6
- package/components/Copy/index.js +6 -6
- package/components/Counter/Counter.js +6 -6
- package/components/Counter/index.js +6 -6
- package/components/DatePicker/CustomHeader/CustomHeader.js +7 -7
- package/components/DatePicker/RangeDatePicker.js +6 -6
- package/components/DatePicker/SimpleDatePicker.js +7 -7
- package/components/DatePicker/TimePicker.js +6 -6
- package/components/DatePicker/hooks.js +2 -2
- package/components/DatePicker/index.js +7 -7
- package/components/Empty/Empty.js +6 -6
- package/components/Empty/index.js +6 -6
- package/components/FileUpload/FileUpload.js +7 -7
- package/components/FileUpload/UploadItems.js +6 -6
- package/components/FileUpload/index.js +7 -7
- package/components/FormContainer/FormContainer.js +6 -6
- package/components/FormContainer/index.js +6 -6
- package/components/FormField/FormField.js +5 -5
- package/components/FormField/index.js +5 -5
- package/components/Input/Input.js +6 -6
- package/components/Input/InputPassword.js +6 -6
- package/components/Input/index.js +6 -6
- package/components/ItemSelect/ItemSelect.js +5 -5
- package/components/ItemSelect/ItemSelectGroup.js +5 -5
- package/components/ItemSelect/index.js +5 -5
- package/components/Link/Link.js +2 -2
- package/components/Link/index.js +2 -2
- package/components/Menu/Menu.js +7 -7
- package/components/Menu/NestedMenu.js +7 -7
- package/components/Menu/index.js +7 -7
- package/components/Modal/Modal.js +6 -6
- package/components/Modal/ModalConfirmation.js +6 -6
- package/components/Modal/index.js +6 -6
- package/components/More/More.js +6 -6
- package/components/More/index.js +6 -6
- package/components/MultiTextareaWithChips/MultiTextareaWithChips.d.ts +1 -1
- package/components/MultiTextareaWithChips/MultiTextareaWithChips.js +152 -257
- package/components/MultiTextareaWithChips/hooks/index.d.ts +4 -0
- package/components/MultiTextareaWithChips/hooks/index.js +8 -0
- package/components/MultiTextareaWithChips/hooks/useChipManagement.d.ts +21 -0
- package/components/MultiTextareaWithChips/hooks/useChipManagement.js +81 -0
- package/components/MultiTextareaWithChips/hooks/useChipValidation.d.ts +13 -0
- package/components/MultiTextareaWithChips/hooks/useChipValidation.js +65 -0
- package/components/MultiTextareaWithChips/hooks/useDropdownLogic.d.ts +17 -0
- package/components/MultiTextareaWithChips/hooks/useDropdownLogic.js +91 -0
- package/components/MultiTextareaWithChips/hooks/useKeyboardNavigation.d.ts +23 -0
- package/components/MultiTextareaWithChips/hooks/useKeyboardNavigation.js +72 -0
- package/components/MultiTextareaWithChips/index.d.ts +1 -1
- package/components/MultiTextareaWithChips/index.js +10 -7
- package/components/MultiTextareaWithChips/types.d.ts +25 -31
- package/components/OneTimePassword/OneTimePassword.js +7 -7
- package/components/OneTimePassword/index.js +7 -7
- package/components/Pagination/Pagination.js +3 -3
- package/components/Pagination/index.js +3 -3
- package/components/Popover/Popover.js +3 -3
- package/components/Popover/index.js +3 -3
- package/components/Progress/ProgressBarWrapper.js +2 -2
- package/components/Progress/index.js +2 -2
- package/components/ProgressStep/ProgressStep.js +2 -2
- package/components/ProgressStep/Step.js +2 -2
- package/components/ProgressStep/index.js +2 -2
- package/components/Radio/RadioGroup.js +5 -5
- package/components/Radio/index.js +5 -5
- package/components/SVGIcons/IconAdd.js +2 -2
- package/components/SVGIcons/IconAddCircle.js +2 -2
- package/components/SVGIcons/IconAddCircleFilled.js +2 -2
- package/components/SVGIcons/IconAddFilled.js +2 -2
- package/components/SVGIcons/IconAlert.js +2 -2
- package/components/SVGIcons/IconAlertBadge.js +2 -2
- package/components/SVGIcons/IconAlertBadgeFilled.js +2 -2
- package/components/SVGIcons/IconAlertFilled.js +2 -2
- package/components/SVGIcons/IconAm.js +2 -2
- package/components/SVGIcons/IconAmd.js +2 -2
- package/components/SVGIcons/IconAmdFilled.js +2 -2
- package/components/SVGIcons/IconApple.js +2 -2
- package/components/SVGIcons/IconAppsList.js +2 -2
- package/components/SVGIcons/IconAppsListDetail.js +2 -2
- package/components/SVGIcons/IconAppsListDetailFilled.js +2 -2
- package/components/SVGIcons/IconAppsListFilled.js +2 -2
- package/components/SVGIcons/IconArrowCircleDown.js +2 -2
- package/components/SVGIcons/IconArrowCircleDownSplit.js +2 -2
- package/components/SVGIcons/IconArrowDown.js +2 -2
- package/components/SVGIcons/IconArrowDownFilled.js +2 -2
- package/components/SVGIcons/IconArrowDownLeft.js +2 -2
- package/components/SVGIcons/IconArrowDownLeftFilled.js +2 -2
- package/components/SVGIcons/IconArrowDownload.js +2 -2
- package/components/SVGIcons/IconArrowDownloadFilled.js +2 -2
- package/components/SVGIcons/IconArrowEnter.js +2 -2
- package/components/SVGIcons/IconArrowEnterFilled.js +2 -2
- package/components/SVGIcons/IconArrowExit.js +2 -2
- package/components/SVGIcons/IconArrowExitFilled.js +2 -2
- package/components/SVGIcons/IconArrowExportLeftToRight.js +2 -2
- package/components/SVGIcons/IconArrowExportLeftToRightFilled.js +2 -2
- package/components/SVGIcons/IconArrowExportRightToLeft.js +2 -2
- package/components/SVGIcons/IconArrowExportRightToLeftFilled.js +2 -2
- package/components/SVGIcons/IconArrowExportUp.js +2 -2
- package/components/SVGIcons/IconArrowExportUpFilled.js +2 -2
- package/components/SVGIcons/IconArrowImport.js +2 -2
- package/components/SVGIcons/IconArrowImportFilled.js +2 -2
- package/components/SVGIcons/IconArrowLeft.js +2 -2
- package/components/SVGIcons/IconArrowLeftFilled.js +2 -2
- package/components/SVGIcons/IconArrowRepeatAll.js +2 -2
- package/components/SVGIcons/IconArrowRepeatAllFilled.js +2 -2
- package/components/SVGIcons/IconArrowReset.js +2 -2
- package/components/SVGIcons/IconArrowResetFilled.js +2 -2
- package/components/SVGIcons/IconArrowRight.js +2 -2
- package/components/SVGIcons/IconArrowRightFilled.js +2 -2
- package/components/SVGIcons/IconArrowSort.js +2 -2
- package/components/SVGIcons/IconArrowSortFilled.js +2 -2
- package/components/SVGIcons/IconArrowSwap.js +2 -2
- package/components/SVGIcons/IconArrowSwapFilled.js +2 -2
- package/components/SVGIcons/IconArrowSync.js +2 -2
- package/components/SVGIcons/IconArrowSyncFilled.js +2 -2
- package/components/SVGIcons/IconArrowUp.js +2 -2
- package/components/SVGIcons/IconArrowUpFilled.js +2 -2
- package/components/SVGIcons/IconArrowUpLeft.js +2 -2
- package/components/SVGIcons/IconArrowUpLeftFilled.js +2 -2
- package/components/SVGIcons/IconArrowUpRight.js +2 -2
- package/components/SVGIcons/IconArrowUpRightFilled.js +2 -2
- package/components/SVGIcons/IconAttach.js +2 -2
- package/components/SVGIcons/IconAttachFilled.js +2 -2
- package/components/SVGIcons/IconBadge.js +2 -2
- package/components/SVGIcons/IconBadgeFilled.js +2 -2
- package/components/SVGIcons/IconBeach.js +2 -2
- package/components/SVGIcons/IconBeachFilled.js +2 -2
- package/components/SVGIcons/IconBed.js +2 -2
- package/components/SVGIcons/IconBedFilled.js +2 -2
- package/components/SVGIcons/IconBook.js +2 -2
- package/components/SVGIcons/IconBookFilled.js +2 -2
- package/components/SVGIcons/IconBookOpen.js +2 -2
- package/components/SVGIcons/IconBookOpenFilled.js +2 -2
- package/components/SVGIcons/IconBookmark.js +2 -2
- package/components/SVGIcons/IconBookmarkFilled.js +2 -2
- package/components/SVGIcons/IconBriefcase.js +2 -2
- package/components/SVGIcons/IconBriefcaseFilled.js +2 -2
- package/components/SVGIcons/IconBroom.js +2 -2
- package/components/SVGIcons/IconBroomFilled.js +2 -2
- package/components/SVGIcons/IconBuilding.js +2 -2
- package/components/SVGIcons/IconBuildingBank.js +2 -2
- package/components/SVGIcons/IconBuildingBankFilled.js +2 -2
- package/components/SVGIcons/IconBuildingFilled.js +2 -2
- package/components/SVGIcons/IconBuildingHome.js +2 -2
- package/components/SVGIcons/IconBuildingHomeFilled.js +2 -2
- package/components/SVGIcons/IconBuildingShop.js +2 -2
- package/components/SVGIcons/IconBuildingShopFilled.js +2 -2
- package/components/SVGIcons/IconBulletListAdd.js +2 -2
- package/components/SVGIcons/IconBulletListAddFilled.js +2 -2
- package/components/SVGIcons/IconCalculator.js +2 -2
- package/components/SVGIcons/IconCalculatorFilled.js +2 -2
- package/components/SVGIcons/IconCalendarCheckmark.js +2 -2
- package/components/SVGIcons/IconCalendarCheckmarkFilled.js +2 -2
- package/components/SVGIcons/IconCalendarClock.js +2 -2
- package/components/SVGIcons/IconCalendarClockFilled.js +2 -2
- package/components/SVGIcons/IconCalendarDay.js +2 -2
- package/components/SVGIcons/IconCalendarDayFilled.js +2 -2
- package/components/SVGIcons/IconCalendarLeft.js +2 -2
- package/components/SVGIcons/IconCalendarLeftFilled.js +2 -2
- package/components/SVGIcons/IconCalendarRight.js +2 -2
- package/components/SVGIcons/IconCalendarRightFilled.js +2 -2
- package/components/SVGIcons/IconCall.js +2 -2
- package/components/SVGIcons/IconCallFilled.js +2 -2
- package/components/SVGIcons/IconCameraDome.js +2 -2
- package/components/SVGIcons/IconCameraDomeFilled.js +2 -2
- package/components/SVGIcons/IconCard.js +2 -2
- package/components/SVGIcons/IconCardFilled.js +2 -2
- package/components/SVGIcons/IconCaretDown.js +2 -2
- package/components/SVGIcons/IconCaretDownFilled.js +2 -2
- package/components/SVGIcons/IconCaretDownRight.js +2 -2
- package/components/SVGIcons/IconCaretDownRightFilled.js +2 -2
- package/components/SVGIcons/IconCaretLeft.js +2 -2
- package/components/SVGIcons/IconCaretLeftFilled.js +2 -2
- package/components/SVGIcons/IconCaretRight.js +2 -2
- package/components/SVGIcons/IconCaretRightFilled.js +2 -2
- package/components/SVGIcons/IconCaretUp.js +2 -2
- package/components/SVGIcons/IconCaretUpFilled.js +2 -2
- package/components/SVGIcons/IconChat.js +2 -2
- package/components/SVGIcons/IconChatFilled.js +2 -2
- package/components/SVGIcons/IconChatMultiple.js +2 -2
- package/components/SVGIcons/IconChatMultipleFilled.js +2 -2
- package/components/SVGIcons/IconCheckboxArrowRight.js +2 -2
- package/components/SVGIcons/IconCheckboxArrowRightFilled.js +2 -2
- package/components/SVGIcons/IconCheckmark.js +2 -2
- package/components/SVGIcons/IconCheckmarkCircle.js +2 -2
- package/components/SVGIcons/IconCheckmarkCircleFilled.js +2 -2
- package/components/SVGIcons/IconCheckmarkFilled.js +2 -2
- package/components/SVGIcons/IconCheckmarkStarburst.js +2 -2
- package/components/SVGIcons/IconCheckmarkStarburstFilled.js +2 -2
- package/components/SVGIcons/IconChevronDoubleLeft.js +2 -2
- package/components/SVGIcons/IconChevronDoubleLeftFilled.js +2 -2
- package/components/SVGIcons/IconChevronDoubleRight.js +2 -2
- package/components/SVGIcons/IconChevronDoubleRightFilled.js +2 -2
- package/components/SVGIcons/IconChevronDown.js +2 -2
- package/components/SVGIcons/IconChevronDownFilled.js +2 -2
- package/components/SVGIcons/IconChevronLeft.js +2 -2
- package/components/SVGIcons/IconChevronLeftFilled.js +2 -2
- package/components/SVGIcons/IconChevronRight.js +2 -2
- package/components/SVGIcons/IconChevronRightFilled.js +2 -2
- package/components/SVGIcons/IconChevronUp.js +2 -2
- package/components/SVGIcons/IconChevronUpDown.js +2 -2
- package/components/SVGIcons/IconChevronUpDownFilled.js +2 -2
- package/components/SVGIcons/IconChevronUpFilled.js +2 -2
- package/components/SVGIcons/IconCircleOff.js +2 -2
- package/components/SVGIcons/IconCircleOffFilled.js +2 -2
- package/components/SVGIcons/IconClock.js +2 -2
- package/components/SVGIcons/IconClockDismiss.js +2 -2
- package/components/SVGIcons/IconClockDismissFilled.js +2 -2
- package/components/SVGIcons/IconClockFilled.js +2 -2
- package/components/SVGIcons/IconColor.js +2 -2
- package/components/SVGIcons/IconColorFilled.js +2 -2
- package/components/SVGIcons/IconComment.js +2 -2
- package/components/SVGIcons/IconCommentFilled.js +2 -2
- package/components/SVGIcons/IconCompareCar.js +2 -2
- package/components/SVGIcons/IconCompareCarFilled.js +2 -2
- package/components/SVGIcons/IconContractCard.js +2 -2
- package/components/SVGIcons/IconContractCardFilled.js +2 -2
- package/components/SVGIcons/IconCopy.js +2 -2
- package/components/SVGIcons/IconCopyFilled.js +2 -2
- package/components/SVGIcons/IconCubeTree.js +2 -2
- package/components/SVGIcons/IconCubeTreeFilled.js +2 -2
- package/components/SVGIcons/IconDatabase.js +2 -2
- package/components/SVGIcons/IconDatabaseFilled.js +2 -2
- package/components/SVGIcons/IconDelete.js +2 -2
- package/components/SVGIcons/IconDeleteFilled.js +2 -2
- package/components/SVGIcons/IconDesignIdeas.js +2 -2
- package/components/SVGIcons/IconDesignIdeasFilled.js +2 -2
- package/components/SVGIcons/IconDeviceMeetingRoom.js +2 -2
- package/components/SVGIcons/IconDeviceMeetingRoomFilled.js +2 -2
- package/components/SVGIcons/IconDismiss.js +2 -2
- package/components/SVGIcons/IconDismissCircle.js +2 -2
- package/components/SVGIcons/IconDismissCircleFilled.js +2 -2
- package/components/SVGIcons/IconDismissFilled.js +2 -2
- package/components/SVGIcons/IconDocument.js +2 -2
- package/components/SVGIcons/IconDocumentBulletList.js +2 -2
- package/components/SVGIcons/IconDocumentBulletListFilled.js +2 -2
- package/components/SVGIcons/IconDocumentEdit.js +2 -2
- package/components/SVGIcons/IconDocumentEditFilled.js +2 -2
- package/components/SVGIcons/IconDocumentFilled.js +2 -2
- package/components/SVGIcons/IconDocumentFooter.js +2 -2
- package/components/SVGIcons/IconDocumentFooterFilled.js +2 -2
- package/components/SVGIcons/IconDocumentOnePage.js +2 -2
- package/components/SVGIcons/IconDocumentOnePageFilled.js +2 -2
- package/components/SVGIcons/IconEdit.js +2 -2
- package/components/SVGIcons/IconEditFilled.js +2 -2
- package/components/SVGIcons/IconEngine.js +2 -2
- package/components/SVGIcons/IconEngineFilled.js +2 -2
- package/components/SVGIcons/IconErrorCircle.js +2 -2
- package/components/SVGIcons/IconErrorCircleFilled.js +2 -2
- package/components/SVGIcons/IconEur.js +2 -2
- package/components/SVGIcons/IconEurFilled.js +2 -2
- package/components/SVGIcons/IconExpandUpLeft.js +2 -2
- package/components/SVGIcons/IconExpandUpLeftFilled.js +2 -2
- package/components/SVGIcons/IconExpandUpRight.js +2 -2
- package/components/SVGIcons/IconExpandUpRightFilled.js +2 -2
- package/components/SVGIcons/IconEyeOff.js +2 -2
- package/components/SVGIcons/IconEyeOffFilled.js +2 -2
- package/components/SVGIcons/IconEyeOn.js +2 -2
- package/components/SVGIcons/IconEyeOnFilled.js +2 -2
- package/components/SVGIcons/IconFacebook.js +2 -2
- package/components/SVGIcons/IconFilter.js +2 -2
- package/components/SVGIcons/IconFilterFilled.js +2 -2
- package/components/SVGIcons/IconFlag.js +2 -2
- package/components/SVGIcons/IconFlagFilled.js +2 -2
- package/components/SVGIcons/IconFlash.js +2 -2
- package/components/SVGIcons/IconFlashFilled.js +2 -2
- package/components/SVGIcons/IconFolderLink.js +2 -2
- package/components/SVGIcons/IconFolderLinkFilled.js +2 -2
- package/components/SVGIcons/IconFolderPerson.js +2 -2
- package/components/SVGIcons/IconFolderPersonFilled.js +2 -2
- package/components/SVGIcons/IconFunnel.js +2 -2
- package/components/SVGIcons/IconFunnelFilled.js +2 -2
- package/components/SVGIcons/IconGas.js +2 -2
- package/components/SVGIcons/IconGb.js +2 -2
- package/components/SVGIcons/IconGlobe.js +2 -2
- package/components/SVGIcons/IconGlobeFilled.js +2 -2
- package/components/SVGIcons/IconGlobeLocation.js +2 -2
- package/components/SVGIcons/IconGlobeLocationFilled.js +2 -2
- package/components/SVGIcons/IconGoogle.js +2 -2
- package/components/SVGIcons/IconGrid.js +2 -2
- package/components/SVGIcons/IconGridFilled.js +2 -2
- package/components/SVGIcons/IconHandOpenHeart.js +2 -2
- package/components/SVGIcons/IconHandOpenHeartFilled.js +2 -2
- package/components/SVGIcons/IconHandWave.js +2 -2
- package/components/SVGIcons/IconHandWaveFilled.js +2 -2
- package/components/SVGIcons/IconHdm.js +2 -2
- package/components/SVGIcons/IconHdmFilled.js +2 -2
- package/components/SVGIcons/IconHeart.js +2 -2
- package/components/SVGIcons/IconHeartFilled.js +2 -2
- package/components/SVGIcons/IconHistory.js +2 -2
- package/components/SVGIcons/IconHistoryFilled.js +2 -2
- package/components/SVGIcons/IconHome.js +2 -2
- package/components/SVGIcons/IconHomeAdd.js +2 -2
- package/components/SVGIcons/IconHomeAddFilled.js +2 -2
- package/components/SVGIcons/IconHomeFilled.js +2 -2
- package/components/SVGIcons/IconImage.js +2 -2
- package/components/SVGIcons/IconImageFilled.js +2 -2
- package/components/SVGIcons/IconInfo.js +2 -2
- package/components/SVGIcons/IconInfoFilled.js +2 -2
- package/components/SVGIcons/IconInstagram.js +2 -2
- package/components/SVGIcons/IconKey.js +2 -2
- package/components/SVGIcons/IconKeyFilled.js +2 -2
- package/components/SVGIcons/IconKeyReset.js +2 -2
- package/components/SVGIcons/IconKeyResetFilled.js +2 -2
- package/components/SVGIcons/IconLaptop.js +2 -2
- package/components/SVGIcons/IconLaptopFilled.js +2 -2
- package/components/SVGIcons/IconLeaf.js +2 -2
- package/components/SVGIcons/IconLeafFilled.js +2 -2
- package/components/SVGIcons/IconLightbulb.js +2 -2
- package/components/SVGIcons/IconLightbulbFilled.js +2 -2
- package/components/SVGIcons/IconLink.js +2 -2
- package/components/SVGIcons/IconLinkFilled.js +2 -2
- package/components/SVGIcons/IconLinkedin.js +2 -2
- package/components/SVGIcons/IconList.js +2 -2
- package/components/SVGIcons/IconListFilled.js +2 -2
- package/components/SVGIcons/IconLoan.js +2 -2
- package/components/SVGIcons/IconLoanFilled.js +2 -2
- package/components/SVGIcons/IconLocation.js +2 -2
- package/components/SVGIcons/IconLocationFilled.js +2 -2
- package/components/SVGIcons/IconLockClosed.js +2 -2
- package/components/SVGIcons/IconLockClosedFilled.js +2 -2
- package/components/SVGIcons/IconLockMultiple.js +2 -2
- package/components/SVGIcons/IconLockMultipleFilled.js +2 -2
- package/components/SVGIcons/IconLockOpen.js +2 -2
- package/components/SVGIcons/IconLockOpenFilled.js +2 -2
- package/components/SVGIcons/IconMail.js +2 -2
- package/components/SVGIcons/IconMailAdd.js +2 -2
- package/components/SVGIcons/IconMailAddFilled.js +2 -2
- package/components/SVGIcons/IconMailArrowForward.js +2 -2
- package/components/SVGIcons/IconMailArrowForwardFilled.js +2 -2
- package/components/SVGIcons/IconMailFilled.js +2 -2
- package/components/SVGIcons/IconMailLink.js +2 -2
- package/components/SVGIcons/IconMailLinkFilled.js +2 -2
- package/components/SVGIcons/IconMedium.js +2 -2
- package/components/SVGIcons/IconMention.js +2 -2
- package/components/SVGIcons/IconMentionFilled.js +2 -2
- package/components/SVGIcons/IconMoney.js +2 -2
- package/components/SVGIcons/IconMoneyFilled.js +2 -2
- package/components/SVGIcons/IconMoneyHand.js +2 -2
- package/components/SVGIcons/IconMoneyHandFilled.js +2 -2
- package/components/SVGIcons/IconMore.js +2 -2
- package/components/SVGIcons/IconMoreFilled.js +2 -2
- package/components/SVGIcons/IconMoreVertical.js +2 -2
- package/components/SVGIcons/IconMoreVerticalFilled.js +2 -2
- package/components/SVGIcons/IconNavigation.js +2 -2
- package/components/SVGIcons/IconNavigationFilled.js +2 -2
- package/components/SVGIcons/IconNotebook.js +2 -2
- package/components/SVGIcons/IconNotebookAdd.js +2 -2
- package/components/SVGIcons/IconNotebookAddFilled.js +2 -2
- package/components/SVGIcons/IconNotebookFilled.js +2 -2
- package/components/SVGIcons/IconNumberSymbolSquare.js +2 -2
- package/components/SVGIcons/IconNumberSymbolSquareFilled.js +2 -2
- package/components/SVGIcons/IconOnlyEmployee.js +2 -2
- package/components/SVGIcons/IconOpen.js +2 -2
- package/components/SVGIcons/IconOpenFilled.js +2 -2
- package/components/SVGIcons/IconPaintBrush.js +2 -2
- package/components/SVGIcons/IconPaintBrushFilled.js +2 -2
- package/components/SVGIcons/IconPanelLeft.js +2 -2
- package/components/SVGIcons/IconPanelLeftFilled.js +2 -2
- package/components/SVGIcons/IconPanelRight.js +2 -2
- package/components/SVGIcons/IconPanelRightFilled.js +2 -2
- package/components/SVGIcons/IconPatient.js +2 -2
- package/components/SVGIcons/IconPatientFilled.js +2 -2
- package/components/SVGIcons/IconPeople.js +2 -2
- package/components/SVGIcons/IconPeopleAdd.js +2 -2
- package/components/SVGIcons/IconPeopleAddFilled.js +2 -2
- package/components/SVGIcons/IconPeopleFilled.js +2 -2
- package/components/SVGIcons/IconPercent.js +2 -2
- package/components/SVGIcons/IconPerson.js +2 -2
- package/components/SVGIcons/IconPersonAccount.js +2 -2
- package/components/SVGIcons/IconPersonAccountFilled.js +2 -2
- package/components/SVGIcons/IconPersonAdd.js +2 -2
- package/components/SVGIcons/IconPersonAddFilled.js +2 -2
- package/components/SVGIcons/IconPersonFilled.js +2 -2
- package/components/SVGIcons/IconPersonNote.js +2 -2
- package/components/SVGIcons/IconPersonNoteFilled.js +2 -2
- package/components/SVGIcons/IconPersonStar.js +2 -2
- package/components/SVGIcons/IconPersonStarFilled.js +2 -2
- package/components/SVGIcons/IconPersonSubtract.js +2 -2
- package/components/SVGIcons/IconPersonSubtractFilled.js +2 -2
- package/components/SVGIcons/IconPhone.js +2 -2
- package/components/SVGIcons/IconPhoneFilled.js +2 -2
- package/components/SVGIcons/IconPlay.js +2 -2
- package/components/SVGIcons/IconPlayFilled.js +2 -2
- package/components/SVGIcons/IconPos.js +2 -2
- package/components/SVGIcons/IconPosFilled.js +2 -2
- package/components/SVGIcons/IconProhibited.js +2 -2
- package/components/SVGIcons/IconProhibitedFilled.js +2 -2
- package/components/SVGIcons/IconProjectProduct.js +2 -2
- package/components/SVGIcons/IconQuestionCircle.js +2 -2
- package/components/SVGIcons/IconQuestionCircleFilled.js +2 -2
- package/components/SVGIcons/IconRedo.js +2 -2
- package/components/SVGIcons/IconRedoFilled.js +2 -2
- package/components/SVGIcons/IconRu.js +2 -2
- package/components/SVGIcons/IconRub.js +2 -2
- package/components/SVGIcons/IconRubFilled.js +2 -2
- package/components/SVGIcons/IconSave.js +2 -2
- package/components/SVGIcons/IconSaveFilled.js +2 -2
- package/components/SVGIcons/IconSavings.js +2 -2
- package/components/SVGIcons/IconSavingsFilled.js +2 -2
- package/components/SVGIcons/IconSearch.js +2 -2
- package/components/SVGIcons/IconSearchFilled.js +2 -2
- package/components/SVGIcons/IconSelectAllOff.js +2 -2
- package/components/SVGIcons/IconSelectAllOffFilled.js +2 -2
- package/components/SVGIcons/IconSelectAllOn.js +2 -2
- package/components/SVGIcons/IconSelectAllOnFilled.js +2 -2
- package/components/SVGIcons/IconSend.js +2 -2
- package/components/SVGIcons/IconSendFilled.js +2 -2
- package/components/SVGIcons/IconSettings.js +2 -2
- package/components/SVGIcons/IconSettingsFilled.js +2 -2
- package/components/SVGIcons/IconShare.js +2 -2
- package/components/SVGIcons/IconShareAndroid.js +2 -2
- package/components/SVGIcons/IconShareAndroidFilled.js +2 -2
- package/components/SVGIcons/IconShareFilled.js +2 -2
- package/components/SVGIcons/IconShower.js +2 -2
- package/components/SVGIcons/IconSign.js +2 -2
- package/components/SVGIcons/IconSignFilled.js +2 -2
- package/components/SVGIcons/IconSignOut.js +2 -2
- package/components/SVGIcons/IconSignOutFilled.js +2 -2
- package/components/SVGIcons/IconSlideText.js +2 -2
- package/components/SVGIcons/IconSlideTextFilled.js +2 -2
- package/components/SVGIcons/IconSpinner.js +2 -2
- package/components/SVGIcons/IconSpinnerFilled.js +2 -2
- package/components/SVGIcons/IconStar.js +2 -2
- package/components/SVGIcons/IconStarFilled.js +2 -2
- package/components/SVGIcons/IconStatus.js +2 -2
- package/components/SVGIcons/IconStatusFilled.js +2 -2
- package/components/SVGIcons/IconSubtract.js +2 -2
- package/components/SVGIcons/IconSubtractCircle.js +2 -2
- package/components/SVGIcons/IconSubtractCircleFilled.js +2 -2
- package/components/SVGIcons/IconSubtractFilled.js +2 -2
- package/components/SVGIcons/IconTableCellEdit.js +2 -2
- package/components/SVGIcons/IconTableCellEditFilled.js +2 -2
- package/components/SVGIcons/IconTelegram.js +2 -2
- package/components/SVGIcons/IconTextBulletListSquarePerson.js +2 -2
- package/components/SVGIcons/IconTextBulletListSquarePersonFilled.js +2 -2
- package/components/SVGIcons/IconTextboxSettings.js +2 -2
- package/components/SVGIcons/IconTextboxSettingsFilled.js +2 -2
- package/components/SVGIcons/IconTimer.js +2 -2
- package/components/SVGIcons/IconTimerFilled.js +2 -2
- package/components/SVGIcons/IconTin.js +2 -2
- package/components/SVGIcons/IconTinFilled.js +2 -2
- package/components/SVGIcons/IconTv.js +2 -2
- package/components/SVGIcons/IconTvFilled.js +2 -2
- package/components/SVGIcons/IconTwitter.js +2 -2
- package/components/SVGIcons/IconUndo.js +2 -2
- package/components/SVGIcons/IconUndoFilled.js +2 -2
- package/components/SVGIcons/IconUnitsEmployee.js +2 -2
- package/components/SVGIcons/IconUs.js +2 -2
- package/components/SVGIcons/IconUsd.js +2 -2
- package/components/SVGIcons/IconUsdFilled.js +2 -2
- package/components/SVGIcons/IconVehicleTruckProfile.js +2 -2
- package/components/SVGIcons/IconVehicleTruckProfileFilled.js +2 -2
- package/components/SVGIcons/IconViber.js +2 -2
- package/components/SVGIcons/IconVideo.js +2 -2
- package/components/SVGIcons/IconVideoFilled.js +2 -2
- package/components/SVGIcons/IconVpos.js +2 -2
- package/components/SVGIcons/IconVposFilled.js +2 -2
- package/components/SVGIcons/IconWallet.js +2 -2
- package/components/SVGIcons/IconWalletFilled.js +2 -2
- package/components/SVGIcons/IconWarning.js +2 -2
- package/components/SVGIcons/IconWarningFilled.js +2 -2
- package/components/SVGIcons/IconWhatsapp.js +2 -2
- package/components/SVGIcons/IconWrenchScrewdriver.js +2 -2
- package/components/SVGIcons/IconWrenchScrewdriverFilled.js +2 -2
- package/components/SVGIcons/IconXboxConsole.js +2 -2
- package/components/SVGIcons/IconXboxConsoleFilled.js +2 -2
- package/components/SVGIcons/IconYoutube.js +2 -2
- package/components/SVGIcons/IconZoomIn.js +2 -2
- package/components/SVGIcons/IconZoomInFilled.js +2 -2
- package/components/SVGIcons/IconZoomOut.js +2 -2
- package/components/SVGIcons/IconZoomOutFilled.js +2 -2
- package/components/SVGIcons/index.js +2 -2
- package/components/Select/ButtonSelect/ButtonSelect.js +7 -7
- package/components/Select/FilterSelect/FilterDropdown.js +7 -7
- package/components/Select/FilterSelect/FilterGroupDropdown.js +7 -7
- package/components/Select/FilterSelect/FilterSelect.js +7 -7
- package/components/Select/MultiSelect/MultiBase/MultiBase.js +7 -7
- package/components/Select/MultiSelect/MultiSelect.js +7 -7
- package/components/Select/MultiSelect/MultiSelectGrouped/MultiSelectGrouped.js +7 -7
- package/components/Select/MultiSelect/MultiSelectTree/MultiSelectTree.js +7 -7
- package/components/Select/MultiSelect/MultiSelectWithTabs/MultiSelectWithTabs.js +7 -7
- package/components/Select/MultiSelect/OptionsWrapper.js +7 -7
- package/components/Select/MultiSelect/RadioSelectGrouped/RadioSelectGrouped.js +7 -7
- package/components/Select/NestedSelect/NestedSelect.js +7 -7
- package/components/Select/ProfileDropdown/index.js +3 -3
- package/components/Select/Select/Select.js +7 -7
- package/components/Select/SharedComponents/Actions.js +7 -7
- package/components/Select/SharedComponents/ButtonSelectWrapper/Button/Button.js +2 -2
- package/components/Select/SharedComponents/ButtonSelectWrapper/ButtonSelectWrapper.js +3 -3
- package/components/Select/SharedComponents/ContentTop.js +7 -7
- package/components/Select/SharedComponents/Footer.js +6 -6
- package/components/Select/SharedComponents/InputSelectWrapper/InputSelectWrapper.js +6 -6
- package/components/Select/SharedComponents/index.js +7 -7
- package/components/Select/index.js +7 -7
- package/components/SideNavigation/NavigationItem/index.js +6 -6
- package/components/SideNavigation/SideNavigation.js +6 -6
- package/components/SideNavigation/index.js +6 -6
- package/components/SideSheet/Footer/Footer.js +6 -6
- package/components/SideSheet/SideSheet.js +6 -6
- package/components/SideSheet/index.js +6 -6
- package/components/Snackbar/Snackbar.js +6 -6
- package/components/Snackbar/index.js +6 -6
- package/components/Status/Status.js +3 -3
- package/components/Status/index.js +3 -3
- package/components/Stepper/Stepper.js +1 -1
- package/components/Stepper/index.js +1 -1
- package/components/Switcher/Switcher.js +5 -5
- package/components/Switcher/index.js +5 -5
- package/components/Tab/Tab.js +2 -2
- package/components/Tab/TabItem.js +1 -1
- package/components/Tab/index.js +2 -2
- package/components/Table/Header.js +6 -6
- package/components/Table/IndeterminateCheckbox.js +5 -5
- package/components/Table/Row.js +6 -6
- package/components/Table/Table.js +7 -7
- package/components/Table/index.js +7 -7
- package/components/Table/utils.js +6 -6
- package/components/Textarea/Textarea.js +6 -6
- package/components/Textarea/index.js +6 -6
- package/components/Tooltip/Tooltip.js +1 -1
- package/components/Tooltip/index.js +1 -1
- package/{defineProperty-14863472.js → defineProperty-109927cc.js} +1 -1
- package/helperComponents/OptionItem/OptionItem.js +7 -7
- package/helperComponents/OptionItem/index.js +7 -7
- package/helperComponents/index.js +7 -7
- package/hooks/index.js +1 -1
- package/hooks/useHideBodyScroll.js +1 -1
- package/hooks/useScreenSize.js +1 -1
- package/hooks/useSideNavigation.js +1 -1
- package/index.js +11 -8
- package/package.json +1 -1
- package/stories/MultiTextareaWithChips.stories.d.ts +1 -11
- package/{toConsumableArray-291d6bc0.js → toConsumableArray-d592cd83.js} +1 -1
- package/components/MultiTextareaWithChips/InputWrapper.d.ts +0 -7
- package/components/MultiTextareaWithChips/InputWrapper.js +0 -13
- /package/{extends-f01f857f.js → extends-cc60c71c.js} +0 -0
- /package/{objectWithoutProperties-0d729c01.js → objectWithoutProperties-b19cccde.js} +0 -0
- /package/{slicedToArray-396ddcf6.js → slicedToArray-093df980.js} +0 -0
- /package/{typeof-e762ff49.js → typeof-e9310111.js} +0 -0
package/components/More/More.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { _ as _extends } from '../../extends-
|
|
2
|
-
import { _ as _slicedToArray } from '../../slicedToArray-
|
|
1
|
+
import { _ as _extends } from '../../extends-cc60c71c.js';
|
|
2
|
+
import { _ as _slicedToArray } from '../../slicedToArray-093df980.js';
|
|
3
3
|
import React, { useState } from 'react';
|
|
4
4
|
import { Text } from '../Text/Text.js';
|
|
5
5
|
import { Button } from '../Button/Button.js';
|
|
6
6
|
import 'classnames';
|
|
7
7
|
import '../../utils/helpers.js';
|
|
8
8
|
import 'dayjs';
|
|
9
|
-
import '../../defineProperty-
|
|
10
|
-
import '../../typeof-
|
|
11
|
-
import '../../objectWithoutProperties-
|
|
9
|
+
import '../../defineProperty-109927cc.js';
|
|
10
|
+
import '../../typeof-e9310111.js';
|
|
11
|
+
import '../../objectWithoutProperties-b19cccde.js';
|
|
12
12
|
import '../../helperComponents/Loader/Loader.js';
|
|
13
|
-
import '../../RadioGroup-
|
|
13
|
+
import '../../RadioGroup-d0af378e.js';
|
|
14
14
|
import '../Radio/Radio.js';
|
|
15
15
|
import '../../helperComponents/Label/Label.js';
|
|
16
16
|
import '../Popover/Popover.js';
|
package/components/More/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
export { More } from './More.js';
|
|
2
|
-
import '../../extends-
|
|
3
|
-
import '../../slicedToArray-
|
|
2
|
+
import '../../extends-cc60c71c.js';
|
|
3
|
+
import '../../slicedToArray-093df980.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
import '../Text/Text.js';
|
|
6
6
|
import 'classnames';
|
|
7
7
|
import '../../utils/helpers.js';
|
|
8
8
|
import 'dayjs';
|
|
9
9
|
import '../Button/Button.js';
|
|
10
|
-
import '../../defineProperty-
|
|
11
|
-
import '../../typeof-
|
|
12
|
-
import '../../objectWithoutProperties-
|
|
10
|
+
import '../../defineProperty-109927cc.js';
|
|
11
|
+
import '../../typeof-e9310111.js';
|
|
12
|
+
import '../../objectWithoutProperties-b19cccde.js';
|
|
13
13
|
import '../../helperComponents/Loader/Loader.js';
|
|
14
|
-
import '../../RadioGroup-
|
|
14
|
+
import '../../RadioGroup-d0af378e.js';
|
|
15
15
|
import '../Radio/Radio.js';
|
|
16
16
|
import '../../helperComponents/Label/Label.js';
|
|
17
17
|
import '../Popover/Popover.js';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { TMultiTextareaWithChipsProps } from './types';
|
|
3
|
-
export declare const MultiTextareaWithChips: React.
|
|
3
|
+
export declare const MultiTextareaWithChips: React.NamedExoticComponent<TMultiTextareaWithChipsProps>;
|
|
@@ -1,23 +1,26 @@
|
|
|
1
|
-
import { _ as _extends } from '../../extends-
|
|
2
|
-
import { _ as
|
|
3
|
-
import { _ as _slicedToArray } from '../../slicedToArray-
|
|
4
|
-
import React, { useState, useRef, useMemo
|
|
1
|
+
import { _ as _extends } from '../../extends-cc60c71c.js';
|
|
2
|
+
import { _ as _typeof } from '../../typeof-e9310111.js';
|
|
3
|
+
import { _ as _slicedToArray } from '../../slicedToArray-093df980.js';
|
|
4
|
+
import React, { memo, useState, useRef, useMemo } from 'react';
|
|
5
5
|
import { Chips } from '../Chips/Chips.js';
|
|
6
6
|
import classNames from 'classnames';
|
|
7
7
|
import { ErrorMessage } from '../../helperComponents/ErrorMessage/ErrorMessage.js';
|
|
8
|
-
import '../../RadioGroup-
|
|
8
|
+
import '../../RadioGroup-d0af378e.js';
|
|
9
9
|
import 'dayjs';
|
|
10
10
|
import { useFormProps } from '../../hooks/useFormProps.js';
|
|
11
11
|
import '../../hooks/useScreenSize.js';
|
|
12
12
|
import 'react-hook-form';
|
|
13
13
|
import '../Radio/Radio.js';
|
|
14
14
|
import 'react-syntax-highlighter';
|
|
15
|
+
import { useChipManagement } from './hooks/useChipManagement.js';
|
|
16
|
+
import { useChipValidation } from './hooks/useChipValidation.js';
|
|
17
|
+
import { useDropdownLogic } from './hooks/useDropdownLogic.js';
|
|
18
|
+
import { useKeyboardNavigation } from './hooks/useKeyboardNavigation.js';
|
|
15
19
|
import '../Text/Text.js';
|
|
16
20
|
import '../../utils/helpers.js';
|
|
17
21
|
import '../Chips/types.js';
|
|
18
22
|
import '../SVGIcons/IconDismissCircleFilled.js';
|
|
19
|
-
import '../../defineProperty-
|
|
20
|
-
import '../../typeof-e762ff49.js';
|
|
23
|
+
import '../../defineProperty-109927cc.js';
|
|
21
24
|
import '../Chips/consts.js';
|
|
22
25
|
import '../../helperComponents/IconDynamicComponent/IconDynamicComponent.js';
|
|
23
26
|
import '../../helperComponents/IconDynamicComponent/constants.js';
|
|
@@ -34,8 +37,9 @@ import '../../hooks/useOnOutsideClick.js';
|
|
|
34
37
|
import '../Link/Link.js';
|
|
35
38
|
import '../SVGIcons/IconInfo.js';
|
|
36
39
|
import '../../context/types.js';
|
|
40
|
+
import '../../toConsumableArray-d592cd83.js';
|
|
37
41
|
|
|
38
|
-
var
|
|
42
|
+
var MultiTextareaWithChipsComponent = function MultiTextareaWithChipsComponent(_ref) {
|
|
39
43
|
var label = _ref.label,
|
|
40
44
|
placeholder = _ref.placeholder,
|
|
41
45
|
helperText = _ref.helperText,
|
|
@@ -56,321 +60,212 @@ var MultiTextareaWithChips = function MultiTextareaWithChips(_ref) {
|
|
|
56
60
|
chipValidationErrorMessage = _ref.chipValidationErrorMessage,
|
|
57
61
|
_ref$allowInvalidChip = _ref.allowInvalidChips,
|
|
58
62
|
allowInvalidChips = _ref$allowInvalidChip === void 0 ? false : _ref$allowInvalidChip,
|
|
59
|
-
_ref$fieldName = _ref.fieldName,
|
|
60
|
-
fieldName = _ref$fieldName === void 0 ? 'skills' : _ref$fieldName,
|
|
61
63
|
_ref$searchPlaceholde = _ref.searchPlaceholderText,
|
|
62
64
|
searchPlaceholderText = _ref$searchPlaceholde === void 0 ? 'Search and select...' : _ref$searchPlaceholde,
|
|
63
65
|
_ref$typeAndEnterPlac = _ref.typeAndEnterPlaceholderText,
|
|
64
66
|
typeAndEnterPlaceholderText = _ref$typeAndEnterPlac === void 0 ? 'Type and press Enter...' : _ref$typeAndEnterPlac,
|
|
65
67
|
_ref$noOptionsPlaceho = _ref.noOptionsPlaceholderText,
|
|
66
68
|
noOptionsPlaceholderText = _ref$noOptionsPlaceho === void 0 ? 'No more options available' : _ref$noOptionsPlaceho,
|
|
67
|
-
|
|
69
|
+
_ref$fieldName = _ref.fieldName,
|
|
70
|
+
fieldName = _ref$fieldName === void 0 ? 'skills' : _ref$fieldName,
|
|
71
|
+
formProps = _ref.formProps,
|
|
72
|
+
minChipLength = _ref.minChipLength,
|
|
73
|
+
maxChipLength = _ref.maxChipLength;
|
|
68
74
|
var _useState = useState(''),
|
|
69
75
|
_useState2 = _slicedToArray(_useState, 2),
|
|
70
76
|
inputValue = _useState2[0],
|
|
71
77
|
setInputValue = _useState2[1];
|
|
72
|
-
var _useState3 = useState(
|
|
78
|
+
var _useState3 = useState(''),
|
|
73
79
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
var _useState5 = useState([]),
|
|
77
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
78
|
-
filteredOptions = _useState6[0],
|
|
79
|
-
setFilteredOptions = _useState6[1];
|
|
80
|
-
var _useState7 = useState(''),
|
|
81
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
82
|
-
selectedOption = _useState8[0],
|
|
83
|
-
setSelectedOption = _useState8[1];
|
|
84
|
-
var _useState9 = useState(''),
|
|
85
|
-
_useState0 = _slicedToArray(_useState9, 2),
|
|
86
|
-
chipError = _useState0[0],
|
|
87
|
-
setChipError = _useState0[1];
|
|
88
|
-
var _useState1 = useState(chips),
|
|
89
|
-
_useState10 = _slicedToArray(_useState1, 2),
|
|
90
|
-
localChips = _useState10[0],
|
|
91
|
-
setLocalChips = _useState10[1];
|
|
80
|
+
chipError = _useState4[0],
|
|
81
|
+
setChipError = _useState4[1];
|
|
92
82
|
var inputRef = useRef(null);
|
|
93
|
-
var
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
if (disabled) return;
|
|
128
|
-
if (e.key === 'Enter') {
|
|
129
|
-
e.preventDefault();
|
|
130
|
-
if (selectedOption) {
|
|
131
|
-
handleSelectOption(selectedOption);
|
|
132
|
-
} else if (filteredOptions.length > 0) {
|
|
133
|
-
handleSelectOption(filteredOptions[0]);
|
|
134
|
-
setFilteredOptions([]);
|
|
135
|
-
} else if (allowCustomValues && inputValue.trim()) {
|
|
136
|
-
handleAddCustomValue(inputValue.trim());
|
|
137
|
-
}
|
|
138
|
-
} else if (e.key === ',' && allowCustomValues && inputValue.trim()) {
|
|
139
|
-
e.preventDefault();
|
|
140
|
-
handleAddCustomValue(inputValue.trim());
|
|
141
|
-
} else if (e.key === 'Escape') {
|
|
142
|
-
var _inputRef$current;
|
|
143
|
-
setShowDropdown(false);
|
|
144
|
-
setSelectedOption('');
|
|
145
|
-
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || _inputRef$current.blur();
|
|
146
|
-
} else if (e.key === 'ArrowDown') {
|
|
147
|
-
e.preventDefault();
|
|
148
|
-
if (filteredOptions.length > 0) {
|
|
149
|
-
var currentIndex = selectedOption ? filteredOptions.indexOf(selectedOption) : -1;
|
|
150
|
-
var nextIndex = currentIndex < filteredOptions.length - 1 ? currentIndex + 1 : 0;
|
|
151
|
-
setSelectedOption(filteredOptions[nextIndex]);
|
|
83
|
+
var containerRef = useRef(null);
|
|
84
|
+
var _useFormProps = useFormProps(),
|
|
85
|
+
setValue = _useFormProps.setValue;
|
|
86
|
+
var chipManagement = useChipManagement({
|
|
87
|
+
initialChips: chips,
|
|
88
|
+
fieldName: fieldName,
|
|
89
|
+
formProps: formProps,
|
|
90
|
+
setValue: setValue,
|
|
91
|
+
onAddChip: onAddChip,
|
|
92
|
+
onRemoveChip: onRemoveChip
|
|
93
|
+
});
|
|
94
|
+
var chipValidation = useChipValidation({
|
|
95
|
+
validationSchema: chipValidationSchema,
|
|
96
|
+
errorMessage: chipValidationErrorMessage,
|
|
97
|
+
allowInvalidChips: allowInvalidChips,
|
|
98
|
+
minChipLength: minChipLength,
|
|
99
|
+
maxChipLength: maxChipLength
|
|
100
|
+
});
|
|
101
|
+
var dropdownLogic = useDropdownLogic({
|
|
102
|
+
availableOptions: availableOptions,
|
|
103
|
+
chipTexts: chipManagement.getChipTexts(),
|
|
104
|
+
containerRef: containerRef
|
|
105
|
+
});
|
|
106
|
+
var handleSelectOption = function handleSelectOption(option) {
|
|
107
|
+
if (chipManagement.getChipTexts().includes(option)) return;
|
|
108
|
+
try {
|
|
109
|
+
var validatedChip = chipValidation.createValidatedChip(option);
|
|
110
|
+
chipManagement.addChip(validatedChip);
|
|
111
|
+
setInputValue('');
|
|
112
|
+
dropdownLogic.closeDropdown();
|
|
113
|
+
setChipError('');
|
|
114
|
+
} catch (error) {
|
|
115
|
+
if (!allowInvalidChips) {
|
|
116
|
+
setChipError(error instanceof Error ? error.message : 'Invalid value');
|
|
152
117
|
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
var handleAddCustomValue = function handleAddCustomValue(value) {
|
|
121
|
+
if (chipManagement.getChipTexts().includes(value)) return;
|
|
122
|
+
try {
|
|
123
|
+
var validatedChip = chipValidation.createValidatedChip(value);
|
|
124
|
+
chipManagement.addChip(validatedChip);
|
|
125
|
+
setInputValue('');
|
|
126
|
+
setChipError('');
|
|
127
|
+
} catch (error) {
|
|
128
|
+
if (!allowInvalidChips) {
|
|
129
|
+
setChipError(error instanceof Error ? error.message : 'Invalid value');
|
|
159
130
|
}
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
var handleRemoveLastChip = function handleRemoveLastChip() {
|
|
134
|
+
var lastChip = chipManagement.chips[chipManagement.chips.length - 1];
|
|
135
|
+
if (lastChip) {
|
|
163
136
|
var chipText = typeof lastChip === 'string' ? lastChip : lastChip.text;
|
|
164
|
-
|
|
137
|
+
chipManagement.removeChip(chipText);
|
|
165
138
|
}
|
|
166
139
|
};
|
|
167
140
|
var handleInputChange = function handleInputChange(e) {
|
|
168
141
|
if (disabled) return;
|
|
169
|
-
|
|
170
|
-
|
|
142
|
+
var value = e.target.value;
|
|
143
|
+
setInputValue(value);
|
|
144
|
+
dropdownLogic.handleInputChange(value);
|
|
171
145
|
};
|
|
172
146
|
var handleInputFocus = function handleInputFocus() {
|
|
173
|
-
|
|
174
|
-
setShowDropdown(true);
|
|
175
|
-
}
|
|
147
|
+
dropdownLogic.handleInputFocus(inputValue);
|
|
176
148
|
};
|
|
177
|
-
var
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
};
|
|
194
|
-
var handleSelectOption = function handleSelectOption(option) {
|
|
195
|
-
// Check if option already exists in chips using memoized chipTexts
|
|
196
|
-
if (!chipTexts.includes(option)) {
|
|
197
|
-
if (chipValidationSchema) {
|
|
198
|
-
try {
|
|
199
|
-
chipValidationSchema.validateSync(option);
|
|
200
|
-
} catch (e) {
|
|
201
|
-
var message = chipValidationErrorMessage || e.message || 'Invalid value';
|
|
202
|
-
if (allowInvalidChips) {
|
|
203
|
-
var item = {
|
|
204
|
-
text: option,
|
|
205
|
-
hasError: true,
|
|
206
|
-
errorMessage: message
|
|
207
|
-
};
|
|
208
|
-
var _newChips = [].concat(_toConsumableArray(localChips), [item]);
|
|
209
|
-
setLocalChips(_newChips);
|
|
210
|
-
// Sync with form state - only valid chips (strings)
|
|
211
|
-
if (setValue) {
|
|
212
|
-
var validChips = _newChips.filter(function (chip) {
|
|
213
|
-
return typeof chip === 'string';
|
|
214
|
-
});
|
|
215
|
-
setValue(fieldName, validChips);
|
|
216
|
-
}
|
|
217
|
-
setInputValue('');
|
|
218
|
-
setShowDropdown(false);
|
|
219
|
-
setSelectedOption('');
|
|
220
|
-
return;
|
|
221
|
-
} else {
|
|
222
|
-
setChipError(message);
|
|
223
|
-
return;
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
onAddChip === null || onAddChip === void 0 || onAddChip(option);
|
|
228
|
-
var newChips = [].concat(_toConsumableArray(localChips), [option]);
|
|
229
|
-
setLocalChips(newChips);
|
|
230
|
-
// Sync with form state - only valid chips (strings)
|
|
231
|
-
if (setValue) {
|
|
232
|
-
var _validChips = newChips.filter(function (chip) {
|
|
233
|
-
return typeof chip === 'string';
|
|
234
|
-
});
|
|
235
|
-
setValue(fieldName, _validChips);
|
|
236
|
-
}
|
|
237
|
-
setInputValue('');
|
|
238
|
-
setShowDropdown(false);
|
|
239
|
-
setSelectedOption('');
|
|
240
|
-
setChipError('');
|
|
241
|
-
}
|
|
242
|
-
};
|
|
243
|
-
var handleAddCustomValue = function handleAddCustomValue(value) {
|
|
244
|
-
// Check if value already exists in chips
|
|
245
|
-
var chipTexts = localChips.map(function (chip) {
|
|
246
|
-
return typeof chip === 'string' ? chip : chip.text;
|
|
247
|
-
});
|
|
248
|
-
if (!chipTexts.includes(value)) {
|
|
249
|
-
// validate value if schema provided
|
|
250
|
-
if (chipValidationSchema) {
|
|
251
|
-
try {
|
|
252
|
-
chipValidationSchema.validateSync(value);
|
|
253
|
-
var item = {
|
|
254
|
-
text: value,
|
|
255
|
-
hasError: false,
|
|
256
|
-
errorMessage: ''
|
|
257
|
-
};
|
|
258
|
-
var newChips = [].concat(_toConsumableArray(localChips), [item]);
|
|
259
|
-
setLocalChips(newChips);
|
|
260
|
-
if (formProps !== null && formProps !== void 0 && formProps.setFieldValue) {
|
|
261
|
-
formProps.setFieldValue(fieldName, newChips);
|
|
262
|
-
}
|
|
263
|
-
if (setValue) {
|
|
264
|
-
var validChips = newChips.filter(function (chip) {
|
|
265
|
-
return !chip.hasError;
|
|
266
|
-
});
|
|
267
|
-
setValue(fieldName, validChips);
|
|
268
|
-
}
|
|
269
|
-
} catch (e) {
|
|
270
|
-
var message = chipValidationErrorMessage || e.message || 'Invalid value';
|
|
271
|
-
if (allowInvalidChips) {
|
|
272
|
-
var _item = {
|
|
273
|
-
text: value,
|
|
274
|
-
hasError: true,
|
|
275
|
-
errorMessage: message
|
|
276
|
-
};
|
|
277
|
-
var _newChips2 = [].concat(_toConsumableArray(localChips), [_item]);
|
|
278
|
-
setLocalChips(_newChips2);
|
|
279
|
-
if (formProps !== null && formProps !== void 0 && formProps.setFieldValue) {
|
|
280
|
-
formProps === null || formProps === void 0 || formProps.setFieldValue(fieldName, _newChips2);
|
|
281
|
-
}
|
|
282
|
-
if (setValue) {
|
|
283
|
-
var _validChips2 = _newChips2.filter(function (chip) {
|
|
284
|
-
return !chip.hasError;
|
|
285
|
-
});
|
|
286
|
-
setValue(fieldName, _validChips2);
|
|
287
|
-
}
|
|
288
|
-
} else {
|
|
289
|
-
setChipError(message);
|
|
290
|
-
return;
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
} else {
|
|
294
|
-
var _newChips3 = [].concat(_toConsumableArray(localChips), [value]);
|
|
295
|
-
setLocalChips(_newChips3);
|
|
296
|
-
if (setValue) {
|
|
297
|
-
setValue(fieldName, _newChips3);
|
|
298
|
-
}
|
|
149
|
+
var keyboardNavigation = useKeyboardNavigation({
|
|
150
|
+
disabled: disabled,
|
|
151
|
+
inputValue: inputValue,
|
|
152
|
+
allowCustomValues: allowCustomValues,
|
|
153
|
+
chips: chipManagement.chips,
|
|
154
|
+
filteredOptions: dropdownLogic.filteredOptions,
|
|
155
|
+
selectedOption: dropdownLogic.selectedOption,
|
|
156
|
+
onEnter: function onEnter() {
|
|
157
|
+
// Default behavior for Enter key when no options are available
|
|
158
|
+
},
|
|
159
|
+
onAddCustomValue: handleAddCustomValue,
|
|
160
|
+
onNavigateOptions: dropdownLogic.navigateOptions,
|
|
161
|
+
onSelectOption: function onSelectOption(option) {
|
|
162
|
+
var selected = dropdownLogic.selectOption(option);
|
|
163
|
+
if (selected) {
|
|
164
|
+
handleSelectOption(selected);
|
|
299
165
|
}
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
166
|
+
},
|
|
167
|
+
onCloseDropdown: dropdownLogic.closeDropdown,
|
|
168
|
+
onRemoveLastChip: handleRemoveLastChip,
|
|
169
|
+
inputRef: inputRef
|
|
170
|
+
});
|
|
171
|
+
var inputPlaceholder = useMemo(function () {
|
|
172
|
+
if (chipManagement.chips.length === 0) return placeholder;
|
|
306
173
|
if (availableOptions.length > 0) return searchPlaceholder || searchPlaceholderText;
|
|
307
174
|
if (allowCustomValues) return typeAndEnterPlaceholderText;
|
|
308
175
|
return noOptionsPlaceholderText;
|
|
309
|
-
};
|
|
176
|
+
}, [chipManagement.chips.length, placeholder, availableOptions.length, searchPlaceholder, searchPlaceholderText, allowCustomValues, typeAndEnterPlaceholderText, noOptionsPlaceholderText]);
|
|
177
|
+
var hasError = chipError || chipManagement.hasErrorChips;
|
|
178
|
+
var errorMessage = chipError || chipManagement.getErrorMessage();
|
|
179
|
+
var containerClassName = useMemo(function () {
|
|
180
|
+
return classNames('multi-textarea-chips', className, {
|
|
181
|
+
'multi-textarea-chips--disabled': disabled,
|
|
182
|
+
'multi-textarea-chips--error': hasError
|
|
183
|
+
});
|
|
184
|
+
}, [className, disabled, hasError]);
|
|
185
|
+
var inputWrapperClassName = useMemo(function () {
|
|
186
|
+
return classNames('multi-textarea-input-wrapper', {
|
|
187
|
+
'with-error-styles': hasError
|
|
188
|
+
});
|
|
189
|
+
}, [hasError]);
|
|
310
190
|
return /*#__PURE__*/React.createElement("div", {
|
|
311
|
-
className:
|
|
312
|
-
|
|
313
|
-
|
|
191
|
+
className: containerClassName,
|
|
192
|
+
ref: containerRef
|
|
193
|
+
}, label && /*#__PURE__*/React.createElement("label", {
|
|
194
|
+
className: "multi-textarea-chips__label",
|
|
195
|
+
htmlFor: "".concat(fieldName, "-input")
|
|
314
196
|
}, label), /*#__PURE__*/React.createElement("div", {
|
|
315
|
-
className:
|
|
316
|
-
'with-error-styles': !!chipError
|
|
317
|
-
})
|
|
197
|
+
className: inputWrapperClassName
|
|
318
198
|
}, /*#__PURE__*/React.createElement("div", {
|
|
319
199
|
className: "multi-textarea-chips__content"
|
|
320
|
-
},
|
|
321
|
-
var isItem =
|
|
200
|
+
}, chipManagement.chips.map(function (chip, index) {
|
|
201
|
+
var isItem = _typeof(chip) === 'object';
|
|
322
202
|
var text = isItem ? chip.text : chip;
|
|
323
203
|
var hasError = isItem ? Boolean(chip.hasError) : false;
|
|
324
204
|
return /*#__PURE__*/React.createElement(Chips, {
|
|
325
205
|
key: "".concat(text, "-").concat(index),
|
|
326
206
|
text: text,
|
|
327
|
-
withAction:
|
|
207
|
+
withAction: !disabled,
|
|
328
208
|
onClick: function onClick() {
|
|
329
|
-
return
|
|
209
|
+
return chipManagement.removeChip(text);
|
|
330
210
|
},
|
|
331
211
|
size: "medium",
|
|
332
212
|
color: hasError ? 'danger' : 'primary',
|
|
333
213
|
type: "accent",
|
|
334
|
-
disabled: disabled
|
|
214
|
+
disabled: disabled,
|
|
215
|
+
"aria-label": "Remove ".concat(text, " chip")
|
|
335
216
|
});
|
|
336
217
|
}), /*#__PURE__*/React.createElement("div", {
|
|
337
218
|
className: "multi-textarea-chips__input-container"
|
|
338
|
-
}, /*#__PURE__*/React.createElement("input", _extends({
|
|
219
|
+
}, /*#__PURE__*/React.createElement("input", _extends({
|
|
220
|
+
id: "".concat(fieldName, "-input")
|
|
221
|
+
}, formProps, {
|
|
222
|
+
autoComplete: "off",
|
|
339
223
|
ref: inputRef,
|
|
340
224
|
type: "text",
|
|
341
225
|
value: inputValue,
|
|
342
226
|
onChange: handleInputChange,
|
|
343
|
-
onKeyDown: handleKeyDown,
|
|
227
|
+
onKeyDown: keyboardNavigation.handleKeyDown,
|
|
344
228
|
onFocus: handleInputFocus,
|
|
345
|
-
placeholder:
|
|
229
|
+
placeholder: inputPlaceholder,
|
|
346
230
|
className: "multi-textarea-chips__input",
|
|
347
|
-
disabled: disabled
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
231
|
+
disabled: disabled,
|
|
232
|
+
"aria-describedby": hasError ? "".concat(fieldName, "-error") : helperText ? "".concat(fieldName, "-helper") : undefined,
|
|
233
|
+
"aria-invalid": hasError ? 'true' : 'false',
|
|
234
|
+
"aria-expanded": dropdownLogic.showDropdown,
|
|
235
|
+
"aria-autocomplete": "list",
|
|
236
|
+
role: "combobox"
|
|
237
|
+
})), dropdownLogic.showDropdown && /*#__PURE__*/React.createElement("div", {
|
|
238
|
+
className: "multi-textarea-chips__dropdown",
|
|
239
|
+
role: "listbox",
|
|
240
|
+
"aria-label": "Available options"
|
|
241
|
+
}, dropdownLogic.filteredOptions.map(function (option) {
|
|
351
242
|
return /*#__PURE__*/React.createElement("div", {
|
|
352
243
|
key: option,
|
|
353
244
|
className: classNames('multi-textarea-chips__dropdown-item', {
|
|
354
|
-
'multi-textarea-chips__dropdown-item--selected': selectedOption === option
|
|
245
|
+
'multi-textarea-chips__dropdown-item--selected': dropdownLogic.selectedOption === option
|
|
355
246
|
}),
|
|
356
247
|
onClick: function onClick() {
|
|
357
248
|
return handleSelectOption(option);
|
|
358
|
-
}
|
|
249
|
+
},
|
|
250
|
+
role: "option",
|
|
251
|
+
"aria-selected": dropdownLogic.selectedOption === option
|
|
359
252
|
}, /*#__PURE__*/React.createElement("div", {
|
|
360
253
|
className: "multi-textarea-chips__radio"
|
|
361
254
|
}, /*#__PURE__*/React.createElement("div", {
|
|
362
255
|
className: classNames('multi-textarea-chips__radio-button', {
|
|
363
|
-
'multi-textarea-chips__radio-button--selected': selectedOption === option
|
|
256
|
+
'multi-textarea-chips__radio-button--selected': dropdownLogic.selectedOption === option
|
|
364
257
|
})
|
|
365
258
|
})), /*#__PURE__*/React.createElement("span", {
|
|
366
259
|
className: "multi-textarea-chips__option-text"
|
|
367
260
|
}, option));
|
|
368
|
-
}))))),
|
|
369
|
-
message:
|
|
370
|
-
}), helperText && !
|
|
261
|
+
}))))), hasError && /*#__PURE__*/React.createElement(ErrorMessage, {
|
|
262
|
+
message: errorMessage
|
|
263
|
+
}), helperText && !hasError && /*#__PURE__*/React.createElement("div", {
|
|
264
|
+
id: "".concat(fieldName, "-helper"),
|
|
371
265
|
className: "multi-textarea-chips__helper"
|
|
372
266
|
}, helperText));
|
|
373
267
|
};
|
|
268
|
+
var MultiTextareaWithChips = /*#__PURE__*/memo(MultiTextareaWithChipsComponent);
|
|
374
269
|
MultiTextareaWithChips.displayName = 'MultiTextareaWithChips';
|
|
375
270
|
|
|
376
271
|
export { MultiTextareaWithChips };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { useChipManagement } from './useChipManagement.js';
|
|
2
|
+
export { useChipValidation } from './useChipValidation.js';
|
|
3
|
+
export { useDropdownLogic } from './useDropdownLogic.js';
|
|
4
|
+
export { useKeyboardNavigation } from './useKeyboardNavigation.js';
|
|
5
|
+
import '../../../typeof-e9310111.js';
|
|
6
|
+
import '../../../toConsumableArray-d592cd83.js';
|
|
7
|
+
import '../../../slicedToArray-093df980.js';
|
|
8
|
+
import 'react';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ChipValue } from '../types';
|
|
2
|
+
interface UseChipManagementProps {
|
|
3
|
+
initialChips: ChipValue[];
|
|
4
|
+
fieldName: string;
|
|
5
|
+
formProps?: {
|
|
6
|
+
setFieldValue?: (fieldName: string, value: TFormValue) => void;
|
|
7
|
+
[key: string]: TFormValue | ((fieldName: string, value: TFormValue) => void) | undefined;
|
|
8
|
+
};
|
|
9
|
+
setValue?: (fieldName: string, value: TFormValue) => void;
|
|
10
|
+
onAddChip?: (chip: string) => void;
|
|
11
|
+
onRemoveChip?: (chip: string) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const useChipManagement: ({ initialChips, fieldName, formProps, setValue, onAddChip, onRemoveChip }: UseChipManagementProps) => {
|
|
14
|
+
chips: ChipValue[];
|
|
15
|
+
addChip: (chip: ChipValue) => void;
|
|
16
|
+
removeChip: (chipText: string) => void;
|
|
17
|
+
getChipTexts: () => string[];
|
|
18
|
+
hasErrorChips: boolean;
|
|
19
|
+
getErrorMessage: () => string;
|
|
20
|
+
};
|
|
21
|
+
export {};
|