hrm_ui_lib 2.1.0 → 2.2.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/assets/styles/styles.css +61 -5
- package/assets/styles/styles.scss +1 -1
- package/components/Alert/Alert.js +11 -52
- package/components/Alert/consts.js +12 -14
- package/components/Alert/index.js +1 -52
- package/components/Alert/types.js +1 -1
- package/components/Avatar/Avatar.js +21 -117
- package/components/Avatar/AvatarGroup.js +18 -117
- package/components/Avatar/index.js +2 -64
- package/components/Avatar/types.js +1 -1
- package/components/Badge/Badge.js +5 -22
- package/components/Badge/index.js +1 -6
- package/components/Badge/types.js +1 -1
- package/components/BadgeV2/BadgeV2.d.ts +3 -0
- package/components/BadgeV2/BadgeV2.js +9 -0
- package/components/BadgeV2/index.d.ts +1 -0
- package/components/BadgeV2/index.js +1 -0
- package/components/BadgeV2/types.d.ts +42 -0
- package/components/BadgeV2/types.js +31 -0
- package/components/Breadcrumb/Breadcrumb.js +6 -23
- package/components/Breadcrumb/index.js +1 -2
- package/components/Breadcrumb/types.js +1 -1
- package/components/Button/Button.js +29 -52
- package/components/Button/consts.js +12 -14
- package/components/Button/index.js +1 -52
- package/components/Button/types.js +1 -1
- package/components/Checkbox/Checkbox.js +45 -52
- package/components/Checkbox/index.js +1 -52
- package/components/Checkbox/types.js +1 -1
- package/components/Chips/Chips.js +23 -65
- package/components/Chips/consts.js +10 -12
- package/components/Chips/index.js +1 -11
- package/components/Chips/types.js +5 -7
- package/components/Collapse/CollapseGroup/CollapseGroup.js +22 -73
- package/components/Collapse/CollapseItem/CollapseItem.js +11 -86
- package/components/Collapse/index.js +2 -16
- package/components/Collapse/types.js +1 -1
- package/components/Container/Container.js +4 -9
- package/components/Container/index.js +1 -2
- package/components/Container/types.js +1 -1
- package/components/Copy/Copy.js +15 -93
- package/components/Copy/index.js +1 -54
- package/components/Copy/types.js +1 -1
- package/components/Counter/Counter.js +54 -134
- package/components/Counter/index.js +1 -61
- package/components/Counter/types.js +1 -1
- package/components/DatePicker/CustomHeader/CustomHeader.js +16 -191
- package/components/DatePicker/CustomHeader/helpers.js +10 -16
- package/components/DatePicker/RangeDatePicker/RangeDatePicker.js +7 -129
- package/components/DatePicker/RangeDatePicker/RangeDatePickerDesktop.js +71 -172
- package/components/DatePicker/RangeDatePicker/RangeDatePickerMobile.js +86 -265
- package/components/DatePicker/RangeDatePicker/index.js +1 -124
- package/components/DatePicker/SimpleDatePicker/SimpleDatePicker.js +8 -128
- package/components/DatePicker/SimpleDatePicker/SimpleDatePickerDesktop.js +45 -202
- package/components/DatePicker/SimpleDatePicker/SimpleDatePickerMobile.js +44 -206
- package/components/DatePicker/SimpleDatePicker/index.js +1 -123
- package/components/DatePicker/TimePicker/MobileModalContent.js +33 -123
- package/components/DatePicker/TimePicker/TimePicker.js +7 -75
- package/components/DatePicker/TimePicker/TimePickerDesktop.js +42 -128
- package/components/DatePicker/TimePicker/TimePickerMobile.js +27 -125
- package/components/DatePicker/TimePicker/consts.js +5 -8
- package/components/DatePicker/TimePicker/helpers.js +9 -19
- package/components/DatePicker/TimePicker/index.js +1 -70
- package/components/DatePicker/hooks.js +33 -2171
- package/components/DatePicker/index.js +3 -134
- package/components/DatePicker/localization.js +43 -6
- package/components/DatePicker/types.js +5 -7
- package/components/Divider/Divider.js +8 -15
- package/components/Divider/index.js +1 -3
- package/components/Divider/types.js +1 -1
- package/components/Empty/Empty.js +9 -83
- package/components/Empty/index.js +1 -54
- package/components/Empty/types.js +1 -1
- package/components/FileUpload/DropzoneFileUpload/DropzoneFileUpload.js +67 -52
- package/components/FileUpload/DropzoneFileUpload/ErrorItem.js +21 -52
- package/components/FileUpload/DropzoneFileUpload/FilePreview.js +23 -52
- package/components/FileUpload/DropzoneFileUpload/PreviewItem.js +30 -52
- package/components/FileUpload/DropzoneFileUpload/helpers.js +79 -52
- package/components/FileUpload/DropzoneFileUpload/index.js +1 -52
- package/components/FileUpload/FileUpload.js +69 -192
- package/components/FileUpload/UploadItems.js +22 -101
- package/components/FileUpload/index.js +3 -61
- package/components/FileUpload/types.js +6 -10
- package/components/FormContainer/FormContainer.js +43 -136
- package/components/FormContainer/index.js +1 -55
- package/components/FormContainer/types.js +1 -1
- package/components/FormField/FormField.js +17 -112
- package/components/FormField/index.js +1 -56
- package/components/FormField/types.js +1 -1
- package/components/Heading/Heading.js +5 -27
- package/components/Heading/index.js +1 -5
- package/components/Heading/types.js +1 -1
- package/components/Image/Image.js +12 -32
- package/components/Image/index.js +1 -2
- package/components/Image/types.js +1 -1
- package/components/Input/Input.js +68 -236
- package/components/Input/index.js +1 -58
- package/components/Input/types.js +1 -1
- package/components/Link/Link.js +14 -40
- package/components/Link/index.js +1 -3
- package/components/Link/types.js +1 -1
- package/components/Menu/Menu.js +47 -161
- package/components/Menu/NestedMenu.js +47 -173
- package/components/Menu/index.js +2 -72
- package/components/Menu/types.js +1 -1
- package/components/Modal/Modal.js +70 -52
- package/components/Modal/ModalConfirmation.js +30 -137
- package/components/Modal/ModalContent.js +10 -52
- package/components/Modal/index.js +2 -53
- package/components/Modal/types.js +1 -1
- package/components/More/More.js +19 -85
- package/components/More/index.js +1 -53
- package/components/More/types.js +1 -1
- package/components/Pagination/Pagination.js +15 -56
- package/components/Pagination/consts.js +5 -7
- package/components/Pagination/index.js +1 -10
- package/components/Pagination/types.js +1 -1
- package/components/Popover/Popover.js +41 -52
- package/components/Popover/PopoverDesktop.js +16 -69
- package/components/Popover/PopoverMobile.js +8 -52
- package/components/Popover/index.js +1 -52
- package/components/Popover/types.js +1 -1
- package/components/Progress/Progress.js +21 -56
- package/components/Progress/index.js +1 -2
- package/components/Progress/types.js +1 -1
- package/components/ProgressStep/ProgressStep.js +9 -38
- package/components/ProgressStep/Step.js +51 -98
- package/components/ProgressStep/consts.js +7 -9
- package/components/ProgressStep/index.js +1 -12
- package/components/ProgressStep/types.js +5 -7
- package/components/Radio/Radio.js +19 -56
- package/components/Radio/RadioGroup.js +21 -111
- package/components/Radio/index.js +2 -55
- package/components/Radio/types.js +1 -1
- package/components/SVGIcons/IconAdd.js +7 -28
- package/components/SVGIcons/IconAddCircle.js +7 -31
- package/components/SVGIcons/IconAddCircleFilled.js +7 -31
- package/components/SVGIcons/IconAddFilled.js +7 -28
- package/components/SVGIcons/IconAlert.js +7 -31
- package/components/SVGIcons/IconAlertBadge.js +7 -31
- package/components/SVGIcons/IconAlertBadgeFilled.js +7 -31
- package/components/SVGIcons/IconAlertFilled.js +7 -31
- package/components/SVGIcons/IconAm.js +6 -57
- package/components/SVGIcons/IconAmd.js +7 -28
- package/components/SVGIcons/IconAmdFilled.js +7 -28
- package/components/SVGIcons/IconApple.js +7 -31
- package/components/SVGIcons/IconArrowDown.js +7 -31
- package/components/SVGIcons/IconArrowDownFilled.js +7 -31
- package/components/SVGIcons/IconArrowDownLeft.js +7 -31
- package/components/SVGIcons/IconArrowDownLeftFilled.js +7 -31
- package/components/SVGIcons/IconArrowDownload.js +7 -31
- package/components/SVGIcons/IconArrowDownloadFilled.js +7 -31
- package/components/SVGIcons/IconArrowEnter.js +7 -28
- package/components/SVGIcons/IconArrowEnterFilled.js +7 -28
- package/components/SVGIcons/IconArrowExit.js +7 -28
- package/components/SVGIcons/IconArrowExitFilled.js +7 -28
- package/components/SVGIcons/IconArrowExportLeftToRight.js +7 -31
- package/components/SVGIcons/IconArrowExportLeftToRightFilled.js +7 -31
- package/components/SVGIcons/IconArrowExportRightToLeft.js +7 -31
- package/components/SVGIcons/IconArrowExportRightToLeftFilled.js +7 -31
- package/components/SVGIcons/IconArrowExportUp.js +7 -31
- package/components/SVGIcons/IconArrowExportUpFilled.js +7 -31
- package/components/SVGIcons/IconArrowImport.js +7 -31
- package/components/SVGIcons/IconArrowImportFilled.js +7 -31
- package/components/SVGIcons/IconArrowLeft.js +7 -31
- package/components/SVGIcons/IconArrowLeftFilled.js +7 -31
- package/components/SVGIcons/IconArrowRepeatAll.js +7 -31
- package/components/SVGIcons/IconArrowRepeatAllFilled.js +7 -31
- package/components/SVGIcons/IconArrowReset.js +7 -31
- package/components/SVGIcons/IconArrowResetFilled.js +7 -31
- package/components/SVGIcons/IconArrowRight.js +7 -31
- package/components/SVGIcons/IconArrowRightFilled.js +7 -31
- package/components/SVGIcons/IconArrowSort.js +7 -28
- package/components/SVGIcons/IconArrowSortFilled.js +7 -28
- package/components/SVGIcons/IconArrowSync.js +7 -28
- package/components/SVGIcons/IconArrowSyncFilled.js +7 -28
- package/components/SVGIcons/IconArrowUp.js +7 -31
- package/components/SVGIcons/IconArrowUpFilled.js +7 -31
- package/components/SVGIcons/IconArrowUpLeft.js +7 -31
- package/components/SVGIcons/IconArrowUpLeftFilled.js +7 -31
- package/components/SVGIcons/IconArrowUpRight.js +7 -31
- package/components/SVGIcons/IconArrowUpRightFilled.js +7 -31
- package/components/SVGIcons/IconAttach.js +7 -31
- package/components/SVGIcons/IconAttachFilled.js +7 -31
- package/components/SVGIcons/IconBeach.js +7 -28
- package/components/SVGIcons/IconBeachFilled.js +7 -28
- package/components/SVGIcons/IconBook.js +7 -31
- package/components/SVGIcons/IconBookFilled.js +7 -31
- package/components/SVGIcons/IconBookmark.js +7 -31
- package/components/SVGIcons/IconBookmarkFilled.js +7 -31
- package/components/SVGIcons/IconBriefcase.js +7 -31
- package/components/SVGIcons/IconBriefcaseFilled.js +7 -31
- package/components/SVGIcons/IconBuilding.js +7 -54
- package/components/SVGIcons/IconBuildingBank.js +7 -28
- package/components/SVGIcons/IconBuildingBankFilled.js +7 -28
- package/components/SVGIcons/IconBuildingFilled.js +7 -31
- package/components/SVGIcons/IconBulletListAdd.js +7 -31
- package/components/SVGIcons/IconBulletListAddFilled.js +7 -31
- package/components/SVGIcons/IconCalculator.js +7 -31
- package/components/SVGIcons/IconCalculatorFilled.js +7 -31
- package/components/SVGIcons/IconCalendarClock.js +7 -28
- package/components/SVGIcons/IconCalendarClockFilled.js +7 -28
- package/components/SVGIcons/IconCalendarDay.js +7 -31
- package/components/SVGIcons/IconCalendarDayFilled.js +7 -31
- package/components/SVGIcons/IconCalendarEmpty.js +7 -28
- package/components/SVGIcons/IconCalendarLeft.js +7 -28
- package/components/SVGIcons/IconCalendarLeftFilled.js +7 -28
- package/components/SVGIcons/IconCalendarRight.js +7 -28
- package/components/SVGIcons/IconCalendarRightFilled.js +7 -28
- package/components/SVGIcons/IconCall.js +7 -31
- package/components/SVGIcons/IconCallFilled.js +7 -31
- package/components/SVGIcons/IconCard.js +7 -28
- package/components/SVGIcons/IconCardFilled.js +7 -28
- package/components/SVGIcons/IconCaretDown.js +7 -28
- package/components/SVGIcons/IconCaretDownFilled.js +7 -28
- package/components/SVGIcons/IconCaretDownRight.js +7 -28
- package/components/SVGIcons/IconCaretDownRightFilled.js +7 -28
- package/components/SVGIcons/IconCaretLeft.js +7 -28
- package/components/SVGIcons/IconCaretLeftFilled.js +7 -28
- package/components/SVGIcons/IconCaretRight.js +7 -28
- package/components/SVGIcons/IconCaretRightFilled.js +7 -28
- package/components/SVGIcons/IconCaretUp.js +7 -28
- package/components/SVGIcons/IconCaretUpFilled.js +7 -28
- package/components/SVGIcons/IconChat.js +7 -28
- package/components/SVGIcons/IconChatFilled.js +7 -28
- package/components/SVGIcons/IconChatMultiple.js +7 -28
- package/components/SVGIcons/IconChatMultipleFilled.js +7 -28
- package/components/SVGIcons/IconCheckboxArrowRight.js +7 -31
- package/components/SVGIcons/IconCheckboxArrowRightFilled.js +7 -31
- package/components/SVGIcons/IconCheckmark.js +7 -28
- package/components/SVGIcons/IconCheckmarkCircle.js +7 -28
- package/components/SVGIcons/IconCheckmarkCircleFilled.js +7 -28
- package/components/SVGIcons/IconCheckmarkFilled.js +7 -28
- package/components/SVGIcons/IconChevronDoubleLeft.js +7 -28
- package/components/SVGIcons/IconChevronDoubleRight.js +7 -28
- package/components/SVGIcons/IconChevronDown.js +7 -28
- package/components/SVGIcons/IconChevronDownFilled.js +7 -28
- package/components/SVGIcons/IconChevronLeft.js +7 -28
- package/components/SVGIcons/IconChevronLeftFilled.js +7 -28
- package/components/SVGIcons/IconChevronRight.js +7 -28
- package/components/SVGIcons/IconChevronRightFilled.js +7 -28
- package/components/SVGIcons/IconChevronUp.js +7 -28
- package/components/SVGIcons/IconChevronUpDown.js +7 -31
- package/components/SVGIcons/IconChevronUpDownFilled.js +7 -31
- package/components/SVGIcons/IconChevronUpFilled.js +7 -28
- package/components/SVGIcons/IconClipboardDay.js +7 -28
- package/components/SVGIcons/IconClock.js +7 -31
- package/components/SVGIcons/IconClockDismiss.js +7 -28
- package/components/SVGIcons/IconClockDismissFilled.js +7 -28
- package/components/SVGIcons/IconClockFilled.js +7 -31
- package/components/SVGIcons/IconComment.js +7 -31
- package/components/SVGIcons/IconCommentFilled.js +7 -31
- package/components/SVGIcons/IconContractCard.js +7 -28
- package/components/SVGIcons/IconContractCardFilled.js +7 -28
- package/components/SVGIcons/IconCopy.js +7 -28
- package/components/SVGIcons/IconCopyFilled.js +7 -28
- package/components/SVGIcons/IconCubeTree.js +7 -28
- package/components/SVGIcons/IconCubeTreeFilled.js +7 -31
- package/components/SVGIcons/IconDatabase.js +7 -31
- package/components/SVGIcons/IconDatabaseFilled.js +7 -31
- package/components/SVGIcons/IconDelete.js +7 -28
- package/components/SVGIcons/IconDeleteFilled.js +7 -28
- package/components/SVGIcons/IconDeviceMeetingRoom.js +7 -28
- package/components/SVGIcons/IconDeviceMeetingRoomFilled.js +7 -28
- package/components/SVGIcons/IconDismiss.js +7 -28
- package/components/SVGIcons/IconDismissCircle.js +7 -31
- package/components/SVGIcons/IconDismissCircleFilled.js +7 -31
- package/components/SVGIcons/IconDismissFilled.js +7 -28
- package/components/SVGIcons/IconDocument.js +7 -28
- package/components/SVGIcons/IconDocumentBulletList.js +7 -31
- package/components/SVGIcons/IconDocumentBulletListFilled.js +7 -31
- package/components/SVGIcons/IconDocumentEdit.js +7 -28
- package/components/SVGIcons/IconDocumentEditFilled.js +7 -28
- package/components/SVGIcons/IconDocumentFilled.js +7 -28
- package/components/SVGIcons/IconDocumentPerson.js +7 -28
- package/components/SVGIcons/IconEdit.js +7 -28
- package/components/SVGIcons/IconEditFilled.js +7 -28
- package/components/SVGIcons/IconErrorCircle.js +7 -28
- package/components/SVGIcons/IconErrorCircleFilled.js +7 -28
- package/components/SVGIcons/IconEur.js +7 -28
- package/components/SVGIcons/IconEurFilled.js +7 -28
- package/components/SVGIcons/IconExpandUpLeft.js +7 -31
- package/components/SVGIcons/IconExpandUpLeftFilled.js +7 -31
- package/components/SVGIcons/IconExpandUpRight.js +7 -31
- package/components/SVGIcons/IconExpandUpRightFilled.js +7 -31
- package/components/SVGIcons/IconEyeOff.js +7 -31
- package/components/SVGIcons/IconEyeOffFilled.js +7 -31
- package/components/SVGIcons/IconEyeOn.js +7 -31
- package/components/SVGIcons/IconEyeOnFilled.js +7 -31
- package/components/SVGIcons/IconFacebook.js +7 -38
- package/components/SVGIcons/IconFilter.js +7 -28
- package/components/SVGIcons/IconFilterFilled.js +7 -28
- package/components/SVGIcons/IconFlag.js +7 -31
- package/components/SVGIcons/IconFlagFilled.js +7 -31
- package/components/SVGIcons/IconFolderLink.js +7 -28
- package/components/SVGIcons/IconFolderLinkFilled.js +7 -28
- package/components/SVGIcons/IconFood.js +7 -28
- package/components/SVGIcons/IconFoodFilled.js +7 -28
- package/components/SVGIcons/IconGb.js +6 -71
- package/components/SVGIcons/IconGlobe.js +7 -28
- package/components/SVGIcons/IconGlobeFilled.js +7 -28
- package/components/SVGIcons/IconGoogle.js +7 -40
- package/components/SVGIcons/IconHandOpenHeart.js +7 -31
- package/components/SVGIcons/IconHandOpenHeartFilled.js +7 -31
- package/components/SVGIcons/IconHeart.js +7 -31
- package/components/SVGIcons/IconHeartFilled.js +7 -31
- package/components/SVGIcons/IconHistory.js +7 -31
- package/components/SVGIcons/IconHistoryFilled.js +7 -31
- package/components/SVGIcons/IconHome.js +7 -31
- package/components/SVGIcons/IconHomeFilled.js +7 -31
- package/components/SVGIcons/IconImage.js +7 -31
- package/components/SVGIcons/IconImageFilled.js +7 -31
- package/components/SVGIcons/IconInfo.js +7 -28
- package/components/SVGIcons/IconInfoFilled.js +7 -28
- package/components/SVGIcons/IconInstagram.js +7 -39
- package/components/SVGIcons/IconKeyReset.js +7 -31
- package/components/SVGIcons/IconKeyResetFilled.js +7 -31
- package/components/SVGIcons/IconLink.js +7 -31
- package/components/SVGIcons/IconLinkFilled.js +7 -31
- package/components/SVGIcons/IconLinkedin.js +7 -31
- package/components/SVGIcons/IconList.js +7 -28
- package/components/SVGIcons/IconListFilled.js +7 -31
- package/components/SVGIcons/IconLocation.js +7 -31
- package/components/SVGIcons/IconLocationFilled.js +7 -31
- package/components/SVGIcons/IconLockClosed.js +7 -31
- package/components/SVGIcons/IconLockClosedFilled.js +7 -31
- package/components/SVGIcons/IconLockOpen.js +7 -31
- package/components/SVGIcons/IconLockOpenFilled.js +7 -31
- package/components/SVGIcons/IconMail.js +7 -31
- package/components/SVGIcons/IconMailAdd.js +7 -31
- package/components/SVGIcons/IconMailAddFilled.js +7 -31
- package/components/SVGIcons/IconMailArrowForward.js +7 -31
- package/components/SVGIcons/IconMailArrowForwardFilled.js +7 -31
- package/components/SVGIcons/IconMailFilled.js +7 -31
- package/components/SVGIcons/IconMailLink.js +7 -31
- package/components/SVGIcons/IconMailLinkFilled.js +7 -31
- package/components/SVGIcons/IconMedium.js +7 -31
- package/components/SVGIcons/IconMore.js +7 -31
- package/components/SVGIcons/IconMoreFilled.js +7 -31
- package/components/SVGIcons/IconMoreVertical.js +7 -31
- package/components/SVGIcons/IconMoreVerticalFilled.js +7 -31
- package/components/SVGIcons/IconNavigation.js +7 -31
- package/components/SVGIcons/IconNavigationFilled.js +7 -31
- package/components/SVGIcons/IconNotebook.js +7 -31
- package/components/SVGIcons/IconNotebookAdd.js +7 -47
- package/components/SVGIcons/IconNotebookAddFilled.js +7 -44
- package/components/SVGIcons/IconNotebookFilled.js +7 -31
- package/components/SVGIcons/IconOnlyEmployee.js +7 -28
- package/components/SVGIcons/IconOpen.js +7 -31
- package/components/SVGIcons/IconOpenFilled.js +7 -31
- package/components/SVGIcons/IconPatient.js +7 -28
- package/components/SVGIcons/IconPatientFilled.js +7 -28
- package/components/SVGIcons/IconPeople.js +7 -28
- package/components/SVGIcons/IconPeopleAdd.js +7 -31
- package/components/SVGIcons/IconPeopleAddFilled.js +7 -31
- package/components/SVGIcons/IconPeopleFilled.js +7 -31
- package/components/SVGIcons/IconPercent.js +7 -33
- package/components/SVGIcons/IconPerson.js +7 -31
- package/components/SVGIcons/IconPersonAccount.js +7 -28
- package/components/SVGIcons/IconPersonAccountFilled.js +7 -28
- package/components/SVGIcons/IconPersonAdd.js +7 -31
- package/components/SVGIcons/IconPersonAddFilled.js +7 -31
- package/components/SVGIcons/IconPersonArrowLeft.js +7 -28
- package/components/SVGIcons/IconPersonArrowLeftFilled.js +7 -28
- package/components/SVGIcons/IconPersonArrowRight.js +7 -28
- package/components/SVGIcons/IconPersonArrowRightFilled.js +7 -28
- package/components/SVGIcons/IconPersonBoard.js +7 -28
- package/components/SVGIcons/IconPersonFilled.js +7 -31
- package/components/SVGIcons/IconPersonMinus.js +7 -28
- package/components/SVGIcons/IconPersonStar.js +7 -31
- package/components/SVGIcons/IconPersonStarFilled.js +7 -31
- package/components/SVGIcons/IconPersonSubtract.js +7 -31
- package/components/SVGIcons/IconPersonSubtractFilled.js +7 -31
- package/components/SVGIcons/IconPhone.js +7 -31
- package/components/SVGIcons/IconPhoneFilled.js +7 -31
- package/components/SVGIcons/IconPlugConnected.js +7 -28
- package/components/SVGIcons/IconPos.js +7 -33
- package/components/SVGIcons/IconPosFilled.js +7 -33
- package/components/SVGIcons/IconProhibited.js +7 -31
- package/components/SVGIcons/IconProhibitedFilled.js +7 -31
- package/components/SVGIcons/IconProjectProduct.js +7 -28
- package/components/SVGIcons/IconQuestion.js +7 -31
- package/components/SVGIcons/IconQuestionFilled.js +7 -31
- package/components/SVGIcons/IconRedo.js +7 -31
- package/components/SVGIcons/IconRedoFilled.js +7 -31
- package/components/SVGIcons/IconRu.js +6 -60
- package/components/SVGIcons/IconRub.js +7 -28
- package/components/SVGIcons/IconRubFilled.js +7 -28
- package/components/SVGIcons/IconSave.js +7 -31
- package/components/SVGIcons/IconSaveFilled.js +7 -31
- package/components/SVGIcons/IconSavings.js +7 -31
- package/components/SVGIcons/IconSavingsFilled.js +7 -31
- package/components/SVGIcons/IconSearch.js +7 -31
- package/components/SVGIcons/IconSearchFilled.js +7 -31
- package/components/SVGIcons/IconSelectAllOff.js +7 -31
- package/components/SVGIcons/IconSelectAllOffFilled.js +7 -31
- package/components/SVGIcons/IconSelectAllOn.js +7 -31
- package/components/SVGIcons/IconSelectAllOnFilled.js +7 -31
- package/components/SVGIcons/IconSend.js +7 -31
- package/components/SVGIcons/IconSendFilled.js +7 -31
- package/components/SVGIcons/IconSettings.js +7 -28
- package/components/SVGIcons/IconSettingsFilled.js +7 -31
- package/components/SVGIcons/IconShare.js +7 -31
- package/components/SVGIcons/IconShareAndroid.js +7 -31
- package/components/SVGIcons/IconShareAndroidFilled.js +7 -31
- package/components/SVGIcons/IconShareFilled.js +7 -31
- package/components/SVGIcons/IconSignOut.js +7 -31
- package/components/SVGIcons/IconSignOutFilled.js +7 -31
- package/components/SVGIcons/IconSpinner.js +7 -31
- package/components/SVGIcons/IconSpinnerFilled.js +7 -31
- package/components/SVGIcons/IconStatus.js +7 -31
- package/components/SVGIcons/IconStatusFilled.js +7 -31
- package/components/SVGIcons/IconSubtract.js +7 -31
- package/components/SVGIcons/IconSubtractCircle.js +7 -31
- package/components/SVGIcons/IconSubtractCircleFilled.js +7 -31
- package/components/SVGIcons/IconSubtractFilled.js +7 -31
- package/components/SVGIcons/IconTableCellEdit.js +7 -35
- package/components/SVGIcons/IconTableCellEditFilled.js +7 -41
- package/components/SVGIcons/IconTelegram.js +7 -40
- package/components/SVGIcons/IconTimer.js +7 -31
- package/components/SVGIcons/IconTimerFilled.js +7 -31
- package/components/SVGIcons/IconTwitter.js +7 -31
- package/components/SVGIcons/IconUndo.js +7 -31
- package/components/SVGIcons/IconUndoFilled.js +7 -31
- package/components/SVGIcons/IconUnitsEmployee.js +7 -28
- package/components/SVGIcons/IconUpload.js +7 -28
- package/components/SVGIcons/IconUsd.js +7 -28
- package/components/SVGIcons/IconUsdFilled.js +7 -28
- package/components/SVGIcons/IconUserMinus.js +7 -31
- package/components/SVGIcons/IconVideo.js +7 -28
- package/components/SVGIcons/IconVideoFilled.js +7 -28
- package/components/SVGIcons/IconWallet.js +7 -31
- package/components/SVGIcons/IconWalletFilled.js +7 -31
- package/components/SVGIcons/IconWarning.js +7 -28
- package/components/SVGIcons/IconWarningFilled.js +7 -28
- package/components/SVGIcons/IconYoutube.js +7 -31
- package/components/SVGIcons/index.js +302 -305
- package/components/SVGIcons/types.js +1 -1
- package/components/Select/ButtonSelect/ButtonSelect.js +42 -195
- package/components/Select/FilterSelect/FilterDropdown.js +14 -95
- package/components/Select/FilterSelect/FilterGroupDropdown.js +18 -82
- package/components/Select/FilterSelect/FilterSelect.js +69 -199
- package/components/Select/MultiSelect/DesktopWrapper.js +18 -55
- package/components/Select/MultiSelect/MobileWrapper.js +12 -77
- package/components/Select/MultiSelect/MultiBase/MultiBase.js +60 -211
- package/components/Select/MultiSelect/MultiSelect.js +66 -244
- package/components/Select/MultiSelect/MultiSelectGrouped/MultiSelectGrouped.js +94 -264
- package/components/Select/MultiSelect/MultiSelectWithTabs/MultiSelectWithTabs.js +76 -251
- package/components/Select/MultiSelect/OptionsWrapper.js +64 -175
- package/components/Select/NestedSelect/NestedSelect.js +55 -197
- package/components/Select/ProfileDropdown/index.js +12 -82
- package/components/Select/Select/Select.js +85 -254
- package/components/Select/Select/SelectDesktop/index.js +66 -219
- package/components/Select/Select/SelectMobile/MobileTopContent.js +17 -90
- package/components/Select/Select/SelectMobile/index.js +49 -194
- package/components/Select/Select/helpers.js +8 -9
- package/components/Select/SharedComponents/Actions.js +13 -115
- package/components/Select/SharedComponents/ButtonSelectWrapper/Button/Button.js +8 -43
- package/components/Select/SharedComponents/ButtonSelectWrapper/ButtonSelectWrapper.js +27 -130
- package/components/Select/SharedComponents/ContentTop.js +70 -177
- package/components/Select/SharedComponents/Footer.js +10 -97
- package/components/Select/SharedComponents/InputSelectWrapper/InputSelectWrapper.js +49 -161
- package/components/Select/SharedComponents/Loading.js +5 -16
- package/components/Select/SharedComponents/index.js +6 -92
- package/components/Select/constants.js +7 -9
- package/components/Select/index.js +6 -114
- package/components/Select/localization.js +28 -30
- package/components/Select/types.js +1 -1
- package/components/SideSheet/Footer/Footer.js +13 -99
- package/components/SideSheet/SideSheet.js +55 -208
- package/components/SideSheet/index.js +1 -56
- package/components/SideSheet/types.js +1 -1
- package/components/Snackbar/Snackbar.js +29 -123
- package/components/Snackbar/consts.js +11 -13
- package/components/Snackbar/index.js +1 -54
- package/components/Snackbar/types.js +1 -1
- package/components/Status/Status.js +16 -51
- package/components/Status/index.js +1 -8
- package/components/Status/types.js +1 -1
- package/components/Stepper/Stepper.js +28 -44
- package/components/Stepper/index.js +1 -3
- package/components/Stepper/types.js +1 -1
- package/components/Switcher/Switcher.js +17 -114
- package/components/Switcher/index.js +1 -55
- package/components/Switcher/types.js +1 -1
- package/components/Tab/Tab.js +18 -35
- package/components/Tab/TabItem.js +11 -52
- package/components/Tab/index.js +1 -11
- package/components/Tab/types.js +1 -1
- package/components/Table/Header.js +19 -121
- package/components/Table/IndeterminateCheckbox.js +13 -76
- package/components/Table/Row.js +16 -92
- package/components/Table/Table.js +60 -160
- package/components/Table/index.js +1 -61
- package/components/Table/types.js +1 -1
- package/components/Table/utils.js +17 -76
- package/components/TableV2/AdvancedPagination.js +61 -270
- package/components/TableV2/ColumnHeader.js +29 -61
- package/components/TableV2/ColumnSettings.js +31 -162
- package/components/TableV2/IndeterminateCheckbox.js +13 -84
- package/components/TableV2/Table.js +114 -310
- package/components/TableV2/constants/index.js +26 -22
- package/components/TableV2/hooks/useTableColumnSettings.js +16 -19
- package/components/TableV2/hooks/useTableControl.js +176 -297
- package/components/TableV2/index.js +3 -131
- package/components/TableV2/loadTableSettings.js +8 -17
- package/components/TableV2/types.js +1 -1
- package/components/Text/Text.js +5 -34
- package/components/Text/index.js +1 -5
- package/components/Text/types.js +1 -1
- package/components/Textarea/Textarea.js +36 -140
- package/components/Textarea/index.js +1 -56
- package/components/Textarea/types.js +1 -1
- package/components/Tooltip/Tooltip.js +49 -99
- package/components/Tooltip/index.js +1 -18
- package/components/Tooltip/types.js +11 -13
- package/consts/index.js +86 -65
- package/context/FormContextProvider.js +4 -10
- package/context/index.js +2 -5
- package/context/types.js +6 -10
- package/helperComponents/AnimatePresenceWrapper/AnimatePresenceWrapper.js +4 -12
- package/helperComponents/AnimatePresenceWrapper/index.js +1 -3
- package/helperComponents/CodeBlock/CodeBlock.js +4 -178
- package/helperComponents/CodeBlock/index.js +1 -3
- package/helperComponents/ErrorMessage/ErrorMessage.js +7 -26
- package/helperComponents/ErrorMessage/index.js +1 -8
- package/helperComponents/ErrorMessage/types.js +1 -1
- package/helperComponents/GoToWebPage/GoToWebPage.js +5 -66
- package/helperComponents/IconDynamicComponent/IconDynamicComponent.js +11 -25
- package/helperComponents/IconDynamicComponent/constants.js +10 -31
- package/helperComponents/IconDynamicComponent/index.js +1 -3
- package/helperComponents/Label/Label.js +8 -28
- package/helperComponents/Label/index.js +1 -6
- package/helperComponents/Label/types.js +1 -1
- package/helperComponents/Loader/Loader.js +4 -14
- package/helperComponents/Loader/index.js +1 -2
- package/helperComponents/Loader/types.js +1 -1
- package/helperComponents/OptionItem/OptionItem.js +27 -148
- package/helperComponents/OptionItem/index.js +1 -64
- package/helperComponents/OptionItem/types.js +1 -1
- package/helperComponents/index.js +6 -65
- package/helpers/check-authorization.js +57 -111
- package/helpers/download-file.js +7 -9
- package/helpers/format-date.js +14 -42
- package/helpers/get-module-prefix.js +3 -5
- package/helpers/index.js +7 -59
- package/helpers/isDeepEqual.js +11 -17
- package/helpers/locale.js +10 -15
- package/helpers/storage.js +17 -18
- package/hooks/index.js +12 -21
- package/hooks/useChangePositionsOnScroll.js +28 -32
- package/hooks/useDispatchEventOnScroll.js +8 -13
- package/hooks/useFormContext.js +3 -8
- package/hooks/useFormProps.js +3 -8
- package/hooks/useGetElemPositions.js +14 -16
- package/hooks/useGetElemSizes.js +11 -13
- package/hooks/useGetHasBottomSpace.js +13 -24
- package/hooks/useGetIsMobile.js +33 -45
- package/hooks/useGetTooltipPosition.js +66 -82
- package/hooks/useGetTooltipStyles.js +45 -87
- package/hooks/useHideBodyScroll.js +25 -34
- package/hooks/useHideOnScroll.js +19 -24
- package/hooks/useOnOutsideClick.js +33 -46
- package/hooks/useScreenSize.js +24 -34
- package/index.d.ts +1 -0
- package/index.js +47 -468
- package/package.json +1 -1
- package/type/file-upload.js +6 -8
- package/type/index.js +4 -4
- package/type/locale.js +12 -14
- package/type/notification.js +7 -9
- package/type/status-code.js +7 -9
- package/utils/helpers.js +63 -77
- /package/{Alert-BslI0aA0.js → Alert-CNizbUJ6.js} +0 -0
|
@@ -1,134 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
import 'react';
|
|
5
|
-
import '../../hooks/useGetIsMobile.js';
|
|
6
|
-
import '@babel/runtime/helpers/slicedToArray';
|
|
7
|
-
import '../../consts/index.js';
|
|
8
|
-
import '@babel/runtime/helpers/defineProperty';
|
|
9
|
-
import '../../type/file-upload.js';
|
|
10
|
-
import './TimePicker/TimePickerMobile.js';
|
|
11
|
-
import '../../helperComponents/Label/Label.js';
|
|
12
|
-
import '../Text/Text.js';
|
|
13
|
-
import 'classnames';
|
|
14
|
-
import '../../utils/helpers.js';
|
|
15
|
-
import 'dayjs';
|
|
16
|
-
import '@babel/runtime/helpers/extends';
|
|
17
|
-
import '@babel/runtime/helpers/toConsumableArray';
|
|
18
|
-
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
19
|
-
import '../../hooks/useScreenSize.js';
|
|
20
|
-
import 'react-hook-form';
|
|
21
|
-
import '../../Alert-BslI0aA0.js';
|
|
22
|
-
import '../Alert/consts.js';
|
|
23
|
-
import '../../helperComponents/Loader/Loader.js';
|
|
24
|
-
import 'react-dropzone';
|
|
25
|
-
import '../SVGIcons/IconUpload.js';
|
|
26
|
-
import '../FileUpload/types.js';
|
|
27
|
-
import '../../helpers/format-date.js';
|
|
28
|
-
import '../../helpers/locale.js';
|
|
29
|
-
import '../../type/locale.js';
|
|
30
|
-
import '../../helpers/storage.js';
|
|
31
|
-
import 'react-toastify';
|
|
32
|
-
import 'framer-motion';
|
|
33
|
-
import '../../helperComponents/AnimatePresenceWrapper/AnimatePresenceWrapper.js';
|
|
34
|
-
import '../../hooks/useOnOutsideClick.js';
|
|
35
|
-
import '../../hooks/useHideBodyScroll.js';
|
|
36
|
-
import '../SVGIcons/IconDismiss.js';
|
|
37
|
-
import '../Tooltip/types.js';
|
|
38
|
-
import '../Tooltip/Tooltip.js';
|
|
39
|
-
import '../../hooks/useGetTooltipStyles.js';
|
|
40
|
-
import '../../hooks/useGetElemSizes.js';
|
|
41
|
-
import '../../hooks/useGetElemPositions.js';
|
|
42
|
-
import '../../hooks/useGetTooltipPosition.js';
|
|
43
|
-
import '../../hooks/useHideOnScroll.js';
|
|
44
|
-
import 'react-syntax-highlighter';
|
|
45
|
-
import '../Link/Link.js';
|
|
46
|
-
import '../Popover/PopoverDesktop.js';
|
|
47
|
-
import '../SVGIcons/IconInfo.js';
|
|
48
|
-
import '../../helperComponents/IconDynamicComponent/IconDynamicComponent.js';
|
|
49
|
-
import '../../helperComponents/IconDynamicComponent/constants.js';
|
|
50
|
-
import '@babel/runtime/helpers/typeof';
|
|
51
|
-
import '../SVGIcons/IconDismissFilled.js';
|
|
52
|
-
import '../SVGIcons/IconDelete.js';
|
|
53
|
-
import '../FileUpload/DropzoneFileUpload/FilePreview.js';
|
|
54
|
-
import '../Progress/Progress.js';
|
|
55
|
-
import '../SVGIcons/IconArrowDownloadFilled.js';
|
|
56
|
-
import '../../helpers/download-file.js';
|
|
57
|
-
import '../Button/consts.js';
|
|
58
|
-
import '../Input/Input.js';
|
|
59
|
-
import 'react-input-mask';
|
|
60
|
-
import 'react-number-format';
|
|
61
|
-
import '../../helperComponents/ErrorMessage/ErrorMessage.js';
|
|
62
|
-
import '../SVGIcons/IconCheckmarkCircleFilled.js';
|
|
63
|
-
import '../SVGIcons/IconCalendarRight.js';
|
|
64
|
-
import './TimePicker/MobileModalContent.js';
|
|
65
|
-
import './TimePicker/consts.js';
|
|
66
|
-
import './TimePicker/helpers.js';
|
|
67
|
-
import './TimePicker/TimePickerDesktop.js';
|
|
68
|
-
import 'react-datepicker';
|
|
69
|
-
import './hooks.js';
|
|
70
|
-
import '@babel/runtime/helpers/asyncToGenerator';
|
|
71
|
-
import '@babel/runtime/regenerator';
|
|
72
|
-
import '../SVGIcons/IconClock.js';
|
|
73
|
-
import './SimpleDatePicker/SimpleDatePickerDesktop.js';
|
|
74
|
-
import './CustomHeader/CustomHeader.js';
|
|
75
|
-
import '../Select/Select/Select.js';
|
|
76
|
-
import '../Select/Select/SelectDesktop/index.js';
|
|
77
|
-
import 'react-window';
|
|
78
|
-
import '../../helperComponents/OptionItem/OptionItem.js';
|
|
79
|
-
import '../Avatar/Avatar.js';
|
|
80
|
-
import '../FileUpload/FileUpload.js';
|
|
81
|
-
import '../FileUpload/UploadItems.js';
|
|
82
|
-
import '../../hooks/useFormProps.js';
|
|
83
|
-
import '../../context/types.js';
|
|
84
|
-
import '../SVGIcons/IconEditFilled.js';
|
|
85
|
-
import '../SVGIcons/IconEdit.js';
|
|
86
|
-
import '../SVGIcons/IconAttach.js';
|
|
87
|
-
import '../SVGIcons/IconCheckmark.js';
|
|
88
|
-
import '../../hooks/useGetHasBottomSpace.js';
|
|
89
|
-
import '../../hooks/useChangePositionsOnScroll.js';
|
|
90
|
-
import '../Empty/Empty.js';
|
|
91
|
-
import '../Image/Image.js';
|
|
92
|
-
import 'react-dom';
|
|
93
|
-
import '../Collapse/CollapseGroup/CollapseGroup.js';
|
|
94
|
-
import '../Collapse/CollapseItem/CollapseItem.js';
|
|
95
|
-
import '../SVGIcons/IconChevronRight.js';
|
|
96
|
-
import '../Divider/Divider.js';
|
|
97
|
-
import '../SVGIcons/IconChevronDown.js';
|
|
98
|
-
import '../Select/SharedComponents/ContentTop.js';
|
|
99
|
-
import '../Select/SharedComponents/Actions.js';
|
|
100
|
-
import '../Menu/Menu.js';
|
|
101
|
-
import '../SVGIcons/IconMore.js';
|
|
102
|
-
import '../SVGIcons/IconSearchFilled.js';
|
|
103
|
-
import '../SVGIcons/IconSelectAllOff.js';
|
|
104
|
-
import '../SVGIcons/IconChevronLeft.js';
|
|
105
|
-
import '../Select/SharedComponents/Loading.js';
|
|
106
|
-
import '../Select/constants.js';
|
|
107
|
-
import '../Select/Select/helpers.js';
|
|
108
|
-
import '../Select/Select/SelectMobile/index.js';
|
|
109
|
-
import '../Select/Select/SelectMobile/MobileTopContent.js';
|
|
110
|
-
import '../SVGIcons/IconChevronUp.js';
|
|
111
|
-
import '../Select/localization.js';
|
|
112
|
-
import '../Select/MultiSelect/MultiSelect.js';
|
|
113
|
-
import '../Select/MultiSelect/OptionsWrapper.js';
|
|
114
|
-
import '../Select/MultiSelect/MultiSelectGrouped/MultiSelectGrouped.js';
|
|
115
|
-
import '../SVGIcons/IconCaretUpFilled.js';
|
|
116
|
-
import '../SVGIcons/IconCaretDownFilled.js';
|
|
117
|
-
import '../Select/MultiSelect/MultiBase/MultiBase.js';
|
|
118
|
-
import '../Select/MultiSelect/MultiSelectWithTabs/MultiSelectWithTabs.js';
|
|
119
|
-
import '../Tab/Tab.js';
|
|
120
|
-
import '../Tab/TabItem.js';
|
|
121
|
-
import '../Badge/Badge.js';
|
|
122
|
-
import '../Select/SharedComponents/Footer.js';
|
|
123
|
-
import '../Select/SharedComponents/InputSelectWrapper/InputSelectWrapper.js';
|
|
124
|
-
import '../Select/MultiSelect/MobileWrapper.js';
|
|
125
|
-
import '../Select/MultiSelect/DesktopWrapper.js';
|
|
126
|
-
import '../Select/SharedComponents/ButtonSelectWrapper/ButtonSelectWrapper.js';
|
|
127
|
-
import '../Select/SharedComponents/ButtonSelectWrapper/Button/Button.js';
|
|
128
|
-
import '../Select/ButtonSelect/ButtonSelect.js';
|
|
129
|
-
import './CustomHeader/helpers.js';
|
|
130
|
-
import './localization.js';
|
|
131
|
-
import './SimpleDatePicker/SimpleDatePickerMobile.js';
|
|
132
|
-
import './RangeDatePicker/RangeDatePickerDesktop.js';
|
|
133
|
-
import './types.js';
|
|
134
|
-
import './RangeDatePicker/RangeDatePickerMobile.js';
|
|
1
|
+
export * from './TimePicker';
|
|
2
|
+
export * from './SimpleDatePicker';
|
|
3
|
+
export * from './RangeDatePicker';
|
|
@@ -1,7 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
export const MONTHS = {
|
|
2
|
+
en: [
|
|
3
|
+
'January',
|
|
4
|
+
'February',
|
|
5
|
+
'March',
|
|
6
|
+
'April',
|
|
7
|
+
'May',
|
|
8
|
+
'June',
|
|
9
|
+
'July',
|
|
10
|
+
'August',
|
|
11
|
+
'September',
|
|
12
|
+
'October',
|
|
13
|
+
'November',
|
|
14
|
+
'December'
|
|
15
|
+
],
|
|
16
|
+
ru: [
|
|
17
|
+
'Январь',
|
|
18
|
+
'Февраль',
|
|
19
|
+
'Март',
|
|
20
|
+
'Апрель',
|
|
21
|
+
'Май',
|
|
22
|
+
'Июнь',
|
|
23
|
+
'Июль',
|
|
24
|
+
'Август',
|
|
25
|
+
'Сентябрь',
|
|
26
|
+
'Октябрь',
|
|
27
|
+
'Ноябрь',
|
|
28
|
+
'Декабрь'
|
|
29
|
+
],
|
|
30
|
+
hy: [
|
|
31
|
+
'Հունվար',
|
|
32
|
+
'Փետրվար',
|
|
33
|
+
'Մարտ',
|
|
34
|
+
'Ապրիլ',
|
|
35
|
+
'Մայիս',
|
|
36
|
+
'Հունիս',
|
|
37
|
+
'Հուլիս',
|
|
38
|
+
'Օգոստոս',
|
|
39
|
+
'Սեպտեմբեր',
|
|
40
|
+
'Հոկտեմբեր',
|
|
41
|
+
'Նոյեմբեր',
|
|
42
|
+
'Դեկտեմբեր'
|
|
43
|
+
]
|
|
5
44
|
};
|
|
6
|
-
|
|
7
|
-
export { MONTHS };
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
var DateFormat
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}({});
|
|
6
|
-
|
|
7
|
-
export { DateFormat };
|
|
1
|
+
export var DateFormat;
|
|
2
|
+
(function (DateFormat) {
|
|
3
|
+
DateFormat["LongDate"] = "MMMM D, YYYY";
|
|
4
|
+
DateFormat["ShortDate"] = "MMM D, YYYY";
|
|
5
|
+
})(DateFormat || (DateFormat = {}));
|
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
className: classNames('divider', "divider--".concat(type), {
|
|
10
|
-
'divider--horizontal': isHorizontal,
|
|
11
|
-
'divider--vertical': !isHorizontal
|
|
12
|
-
}, className)
|
|
13
|
-
});
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import classnames from 'classnames';
|
|
3
|
+
export const Divider = (props) => {
|
|
4
|
+
const { type, isHorizontal, className } = props;
|
|
5
|
+
return (_jsx("hr", { className: classnames('divider', `divider--${type}`, {
|
|
6
|
+
'divider--horizontal': isHorizontal,
|
|
7
|
+
'divider--vertical': !isHorizontal
|
|
8
|
+
}, className) }));
|
|
14
9
|
};
|
|
15
|
-
|
|
16
|
-
export { Divider };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export {};
|
|
@@ -1,85 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { B as Button } from '../../Alert-BslI0aA0.js';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Text } from '../Text';
|
|
3
|
+
import { Image } from '../Image';
|
|
4
|
+
import { Button } from '../Button';
|
|
6
5
|
import classNames from 'classnames';
|
|
7
|
-
|
|
8
|
-
import '
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
import '../../helperComponents/Loader/Loader.js';
|
|
13
|
-
import '@babel/runtime/helpers/slicedToArray';
|
|
14
|
-
import '@babel/runtime/helpers/toConsumableArray';
|
|
15
|
-
import '../../consts/index.js';
|
|
16
|
-
import '../../type/file-upload.js';
|
|
17
|
-
import '../../hooks/useScreenSize.js';
|
|
18
|
-
import 'react-hook-form';
|
|
19
|
-
import 'react-dropzone';
|
|
20
|
-
import '../SVGIcons/IconUpload.js';
|
|
21
|
-
import '../FileUpload/types.js';
|
|
22
|
-
import '../../helpers/format-date.js';
|
|
23
|
-
import '../../helpers/locale.js';
|
|
24
|
-
import '../../type/locale.js';
|
|
25
|
-
import '../../helpers/storage.js';
|
|
26
|
-
import 'react-toastify';
|
|
27
|
-
import '../../hooks/useGetIsMobile.js';
|
|
28
|
-
import 'framer-motion';
|
|
29
|
-
import '../../helperComponents/AnimatePresenceWrapper/AnimatePresenceWrapper.js';
|
|
30
|
-
import '../../hooks/useOnOutsideClick.js';
|
|
31
|
-
import '../../hooks/useHideBodyScroll.js';
|
|
32
|
-
import '../SVGIcons/IconDismiss.js';
|
|
33
|
-
import '../Tooltip/types.js';
|
|
34
|
-
import '../Tooltip/Tooltip.js';
|
|
35
|
-
import '../../hooks/useGetTooltipStyles.js';
|
|
36
|
-
import '../../hooks/useGetElemSizes.js';
|
|
37
|
-
import '../../hooks/useGetElemPositions.js';
|
|
38
|
-
import '../../hooks/useGetTooltipPosition.js';
|
|
39
|
-
import '../../hooks/useHideOnScroll.js';
|
|
40
|
-
import 'react-syntax-highlighter';
|
|
41
|
-
import '../Link/Link.js';
|
|
42
|
-
import '../Popover/PopoverDesktop.js';
|
|
43
|
-
import '../SVGIcons/IconInfo.js';
|
|
44
|
-
import '../../helperComponents/IconDynamicComponent/IconDynamicComponent.js';
|
|
45
|
-
import '../../helperComponents/IconDynamicComponent/constants.js';
|
|
46
|
-
import '@babel/runtime/helpers/typeof';
|
|
47
|
-
import '../SVGIcons/IconDismissFilled.js';
|
|
48
|
-
import '../SVGIcons/IconDelete.js';
|
|
49
|
-
import '../FileUpload/DropzoneFileUpload/FilePreview.js';
|
|
50
|
-
import '../Progress/Progress.js';
|
|
51
|
-
import '../SVGIcons/IconArrowDownloadFilled.js';
|
|
52
|
-
import '../../helpers/download-file.js';
|
|
53
|
-
import '../Button/consts.js';
|
|
54
|
-
|
|
55
|
-
var img = "data:image/svg+xml,%3csvg width='102' height='117' viewBox='0 0 102 117' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M51.2567 89.5C73.3101 89.5 91.1891 71.626 91.1891 49.5C91.1891 27.374 73.2313 9.5 51.2567 9.5C29.2033 9.5 11.3243 27.374 11.3243 49.5C11.3243 71.626 29.2033 89.5 51.2567 89.5Z' fill='%23EAEEF9'/%3e%3cpath d='M88.5898 23.2796C90.3733 23.2796 91.8191 21.8342 91.8191 20.0512C91.8191 18.2683 90.3733 16.8229 88.5898 16.8229C86.8064 16.8229 85.3606 18.2683 85.3606 20.0512C85.3606 21.8342 86.8064 23.2796 88.5898 23.2796Z' fill='%23EAEEF9'/%3e%3cpath d='M94.182 32.7287C95.3999 32.7287 96.3873 31.7416 96.3873 30.5239C96.3873 29.3063 95.3999 28.3192 94.182 28.3192C92.964 28.3192 91.9766 29.3063 91.9766 30.5239C91.9766 31.7416 92.964 32.7287 94.182 32.7287Z' fill='%23EAEEF9'/%3e%3cpath d='M13.4509 23.2008C14.6689 23.2008 15.6562 22.2137 15.6562 20.9961C15.6562 19.7785 14.6689 18.7914 13.4509 18.7914C12.2329 18.7914 11.2455 19.7785 11.2455 20.9961C11.2455 22.2137 12.2329 23.2008 13.4509 23.2008Z' fill='%23EAEEF9'/%3e%3cpath d='M4.7083 65.7202C6.97025 65.7202 8.80392 63.8871 8.80392 61.6257C8.80392 59.3644 6.97025 57.5312 4.7083 57.5312C2.44635 57.5312 0.612671 59.3644 0.612671 61.6257C0.612671 63.8871 2.44635 65.7202 4.7083 65.7202Z' fill='%23EAEEF9'/%3e%3cg filter='url(%23filter0_d_2133_10983)'%3e%3cpath d='M74.6148 11.9414C76.8131 11.9414 78.5995 13.7154 78.6147 15.9137L79.0598 80.2091C79.0598 81.9414 77.6421 83.28 75.9093 83.28H26.4467C24.714 83.28 23.2963 81.8627 23.2963 80.2091V15.0123C23.2963 13.28 24.714 11.9414 26.4467 11.9414H62.2835H74.6148Z' fill='url(%23paint0_linear_2133_10983)'/%3e%3c/g%3e%3cpath d='M47.3974 73.1216H45.5859C45.1921 73.1216 44.877 72.7279 44.877 72.2554C44.877 71.783 45.1921 71.3893 45.5859 71.3893H47.3974C47.7912 71.3893 48.1063 71.783 48.1063 72.2554C48.1063 72.8066 47.7912 73.1216 47.3974 73.1216Z' fill='%23CED7E2'/%3e%3cpath d='M41.8841 73.1216H31.33C30.9362 73.1216 30.6212 72.7279 30.6212 72.2554C30.6212 71.783 30.9362 71.3893 31.33 71.3893H41.8841C42.2779 71.3893 42.593 71.783 42.593 72.2554C42.593 72.8066 42.2779 73.1216 41.8841 73.1216Z' fill='%23D5DDEA'/%3e%3cpath d='M55.3523 22.5709H31.6449C31.0936 22.5709 30.621 22.0985 30.621 21.5473C30.621 20.9961 31.0936 20.5237 31.6449 20.5237H55.3523C55.9037 20.5237 56.3762 20.9961 56.3762 21.5473C56.3762 22.0985 55.9037 22.5709 55.3523 22.5709Z' fill='%23D5DDEA'/%3e%3cpath d='M40.7813 28.2401H31.6449C31.0936 28.2401 30.621 27.7677 30.621 27.2165C30.621 26.6653 31.0936 26.1929 31.6449 26.1929H40.7026C41.2539 26.1929 41.7265 26.6653 41.7265 27.2165C41.7265 27.7677 41.2539 28.2401 40.7813 28.2401Z' fill='%23D5DDEA'/%3e%3cpath d='M82.2101 84.4606C81.4225 84.4606 80.6349 84.1457 80.0048 83.437L66.8515 70.2874L66.379 70.6023C62.1258 73.752 57.1638 75.4055 52.123 75.4055C46.0584 75.4055 39.9937 72.9646 35.5043 68.7126C30.7785 64.2244 28.1794 58.1614 28.1794 51.5472C28.1794 38.3976 38.891 27.689 52.0443 27.689C61.0232 27.689 68.8994 32.4134 73.1525 40.4449C77.3269 48.3976 76.7756 57.689 71.656 65.1693L71.341 65.6417L84.573 78.8701C85.912 80.2087 85.5969 81.5472 85.3606 82.2559C84.7305 83.5157 83.4703 84.4606 82.2101 84.4606ZM52.0443 34.2244C42.4353 34.2244 34.7166 42.0197 34.7166 51.5472C34.7166 62.4134 43.6167 68.9488 52.2806 68.9488C57.5576 68.9488 62.3621 66.5866 65.7489 62.3346C69.9233 57.1378 70.6321 50.1299 67.7179 44.0669C64.725 38.0039 58.7391 34.2244 52.0443 34.2244Z' fill='%23989FB0'/%3e%3cpath d='M44.5619 54.3813C45.5858 54.3813 46.4521 53.5152 46.4521 52.4916C46.4521 51.4679 45.5858 50.6018 44.5619 50.6018C43.538 50.6018 42.6716 51.4679 42.6716 52.4916C42.6716 53.5152 43.538 54.3813 44.5619 54.3813Z' fill='%23989FB0'/%3e%3cpath d='M59.054 54.3813C60.0779 54.3813 60.9443 53.5152 60.9443 52.4916C60.9443 51.4679 60.0779 50.6018 59.054 50.6018C58.0301 50.6018 57.1638 51.4679 57.1638 52.4916C57.1638 53.5939 58.0301 54.3813 59.054 54.3813Z' fill='%23989FB0'/%3e%3cpath d='M44.4879 46.2395L40.3298 48.484L40.8911 49.5233L45.0492 47.2787L44.4879 46.2395Z' fill='%23989FB0'/%3e%3cpath d='M58.797 46.2097L58.2358 47.249L62.3944 49.4931L62.9556 48.4537L58.797 46.2097Z' fill='%23989FB0'/%3e%3cpath d='M51.8079 58.7901C53.0259 58.7901 54.0132 58.0498 54.0132 57.1366C54.0132 56.2233 53.0259 55.483 51.8079 55.483C50.5899 55.483 49.6025 56.2233 49.6025 57.1366C49.6025 58.0498 50.5899 58.7901 51.8079 58.7901Z' fill='%23989FB0'/%3e%3cdefs%3e%3cfilter id='filter0_d_2133_10983' x='1.29626' y='0.941406' width='99.7635' height='115.339' filterUnits='userSpaceOnUse' color-interpolation-filters='sRGB'%3e%3cfeFlood flood-opacity='0' result='BackgroundImageFix'/%3e%3cfeColorMatrix in='SourceAlpha' type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0' result='hardAlpha'/%3e%3cfeOffset dy='11'/%3e%3cfeGaussianBlur stdDeviation='11'/%3e%3cfeColorMatrix type='matrix' values='0 0 0 0 0.397708 0 0 0 0 0.47749 0 0 0 0 0.575 0 0 0 0.27 0'/%3e%3cfeBlend mode='normal' in2='BackgroundImageFix' result='effect1_dropShadow_2133_10983'/%3e%3cfeBlend mode='normal' in='SourceGraphic' in2='effect1_dropShadow_2133_10983' result='shape'/%3e%3c/filter%3e%3clinearGradient id='paint0_linear_2133_10983' x1='51.1599' y1='10.2913' x2='51.1599' y2='84.0491' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='%23FDFEFF'/%3e%3cstop offset='0.9964' stop-color='%23ECF0F5'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e";
|
|
56
|
-
|
|
57
|
-
var Empty = function Empty(props) {
|
|
58
|
-
var _props$size = props.size,
|
|
59
|
-
size = _props$size === void 0 ? 'large' : _props$size,
|
|
60
|
-
mainMessage = props.mainMessage,
|
|
61
|
-
paragraphMessage = props.paragraphMessage,
|
|
62
|
-
buttonProps = props.buttonProps,
|
|
63
|
-
className = props.className,
|
|
64
|
-
_props$illustration = props.illustration,
|
|
65
|
-
illustration = _props$illustration === void 0 ? img : _props$illustration;
|
|
66
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
67
|
-
className: classNames("no-result ".concat(size == 'large' ? 'no-result--large' : 'no-result--small'), className)
|
|
68
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
69
|
-
className: "no-result__icon"
|
|
70
|
-
}, /*#__PURE__*/React.createElement(Image, {
|
|
71
|
-
imagePath: illustration
|
|
72
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
73
|
-
className: "no-result__content"
|
|
74
|
-
}, mainMessage ? /*#__PURE__*/React.createElement(Text, {
|
|
75
|
-
size: size == 'large' ? 'large' : 'small',
|
|
76
|
-
weight: "bold"
|
|
77
|
-
}, mainMessage) : null, paragraphMessage ? /*#__PURE__*/React.createElement(Text, {
|
|
78
|
-
size: size == 'large' ? 'small' : 'xsmall'
|
|
79
|
-
}, paragraphMessage) : null, buttonProps ? /*#__PURE__*/React.createElement(Button, _extends({}, buttonProps, {
|
|
80
|
-
size: "medium",
|
|
81
|
-
className: "mt-4"
|
|
82
|
-
})) : null));
|
|
6
|
+
// @ts-ignore
|
|
7
|
+
import noResultImage from '../../assets/images/no-result.svg';
|
|
8
|
+
export const Empty = (props) => {
|
|
9
|
+
const { size = 'large', mainMessage, paragraphMessage, buttonProps, className, illustration = noResultImage } = props;
|
|
10
|
+
return (_jsxs("div", { className: classNames(`no-result ${size == 'large' ? 'no-result--large' : 'no-result--small'}`, className), children: [_jsx("div", { className: "no-result__icon", children: _jsx(Image, { imagePath: illustration }) }), _jsxs("div", { className: "no-result__content", children: [mainMessage ? (_jsx(Text, { size: size == 'large' ? 'large' : 'small', weight: "bold", children: mainMessage })) : null, paragraphMessage ? (_jsx(Text, { size: size == 'large' ? 'small' : 'xsmall', children: paragraphMessage })) : null, buttonProps ? _jsx(Button, Object.assign({}, buttonProps, { size: "medium", className: "mt-4" })) : null] })] }));
|
|
83
11
|
};
|
|
84
|
-
|
|
85
|
-
export { Empty };
|
|
@@ -1,54 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
import '@babel/runtime/helpers/extends';
|
|
3
|
-
import 'react';
|
|
4
|
-
import '../Text/Text.js';
|
|
5
|
-
import 'classnames';
|
|
6
|
-
import '../../utils/helpers.js';
|
|
7
|
-
import 'dayjs';
|
|
8
|
-
import '../Image/Image.js';
|
|
9
|
-
import '../../Alert-BslI0aA0.js';
|
|
10
|
-
import '../Alert/consts.js';
|
|
11
|
-
import '@babel/runtime/helpers/defineProperty';
|
|
12
|
-
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
13
|
-
import '../../helperComponents/Loader/Loader.js';
|
|
14
|
-
import '@babel/runtime/helpers/slicedToArray';
|
|
15
|
-
import '@babel/runtime/helpers/toConsumableArray';
|
|
16
|
-
import '../../consts/index.js';
|
|
17
|
-
import '../../type/file-upload.js';
|
|
18
|
-
import '../../hooks/useScreenSize.js';
|
|
19
|
-
import 'react-hook-form';
|
|
20
|
-
import 'react-dropzone';
|
|
21
|
-
import '../SVGIcons/IconUpload.js';
|
|
22
|
-
import '../FileUpload/types.js';
|
|
23
|
-
import '../../helpers/format-date.js';
|
|
24
|
-
import '../../helpers/locale.js';
|
|
25
|
-
import '../../type/locale.js';
|
|
26
|
-
import '../../helpers/storage.js';
|
|
27
|
-
import 'react-toastify';
|
|
28
|
-
import '../../hooks/useGetIsMobile.js';
|
|
29
|
-
import 'framer-motion';
|
|
30
|
-
import '../../helperComponents/AnimatePresenceWrapper/AnimatePresenceWrapper.js';
|
|
31
|
-
import '../../hooks/useOnOutsideClick.js';
|
|
32
|
-
import '../../hooks/useHideBodyScroll.js';
|
|
33
|
-
import '../SVGIcons/IconDismiss.js';
|
|
34
|
-
import '../Tooltip/types.js';
|
|
35
|
-
import '../Tooltip/Tooltip.js';
|
|
36
|
-
import '../../hooks/useGetTooltipStyles.js';
|
|
37
|
-
import '../../hooks/useGetElemSizes.js';
|
|
38
|
-
import '../../hooks/useGetElemPositions.js';
|
|
39
|
-
import '../../hooks/useGetTooltipPosition.js';
|
|
40
|
-
import '../../hooks/useHideOnScroll.js';
|
|
41
|
-
import 'react-syntax-highlighter';
|
|
42
|
-
import '../Link/Link.js';
|
|
43
|
-
import '../Popover/PopoverDesktop.js';
|
|
44
|
-
import '../SVGIcons/IconInfo.js';
|
|
45
|
-
import '../../helperComponents/IconDynamicComponent/IconDynamicComponent.js';
|
|
46
|
-
import '../../helperComponents/IconDynamicComponent/constants.js';
|
|
47
|
-
import '@babel/runtime/helpers/typeof';
|
|
48
|
-
import '../SVGIcons/IconDismissFilled.js';
|
|
49
|
-
import '../SVGIcons/IconDelete.js';
|
|
50
|
-
import '../FileUpload/DropzoneFileUpload/FilePreview.js';
|
|
51
|
-
import '../Progress/Progress.js';
|
|
52
|
-
import '../SVGIcons/IconArrowDownloadFilled.js';
|
|
53
|
-
import '../../helpers/download-file.js';
|
|
54
|
-
import '../Button/consts.js';
|
|
1
|
+
export * from './Empty';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export {};
|
|
@@ -1,52 +1,67 @@
|
|
|
1
|
-
import
|
|
2
|
-
import '
|
|
3
|
-
import '
|
|
4
|
-
import '
|
|
5
|
-
import '
|
|
6
|
-
import '
|
|
7
|
-
import '
|
|
8
|
-
import '
|
|
9
|
-
import '
|
|
10
|
-
import '
|
|
11
|
-
|
|
12
|
-
import '../../../utils/helpers
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, useCallback, useState } from 'react';
|
|
3
|
+
import { ErrorCode, useDropzone } from 'react-dropzone';
|
|
4
|
+
import IconUpload from '../../SVGIcons/IconUpload';
|
|
5
|
+
import { Text } from '../../Text';
|
|
6
|
+
import classnames from 'classnames';
|
|
7
|
+
import { FileTypeEnum } from '../../../type';
|
|
8
|
+
import { FileUploadMode } from '../types';
|
|
9
|
+
import { generateAreaContent, getDropzoneLocale } from './helpers';
|
|
10
|
+
import { ErrorItem } from './ErrorItem';
|
|
11
|
+
import { PreviewItem } from './PreviewItem';
|
|
12
|
+
import { uniqueFiles as _uniqueFiles } from '../../../utils/helpers';
|
|
13
|
+
export const DropzoneFileUpload = forwardRef(({ maxSize = 10 * 1024 * 1024, allowedTypes = [FileTypeEnum.IMAGE, FileTypeEnum.PDF, FileTypeEnum.DOC], name, setFiles, setFieldValue, value, selectedFiles, maxFiles = 1, mode = FileUploadMode.attach, locale, multiple = false }, _ref) => {
|
|
14
|
+
const initialFiles = value || selectedFiles || [];
|
|
15
|
+
const initialMaxFiles = initialFiles.length >= maxFiles ? 0 : maxFiles - initialFiles.length;
|
|
16
|
+
const [errors, setErrors] = useState([]);
|
|
17
|
+
const areaContent = generateAreaContent({
|
|
18
|
+
allowedTypes,
|
|
19
|
+
maxSize
|
|
20
|
+
});
|
|
21
|
+
const translation = getDropzoneLocale(locale);
|
|
22
|
+
const onDrop = (fileAccepted, fileRejections) => {
|
|
23
|
+
if (initialMaxFiles === 0 && !multiple) {
|
|
24
|
+
setErrors([{ code: ErrorCode.TooManyFiles, message: '' }]);
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
const newFiles = _uniqueFiles([...initialFiles, ...fileAccepted]);
|
|
28
|
+
const errors = fileRejections
|
|
29
|
+
.map((fileRejection) => fileRejection.errors)
|
|
30
|
+
.flat();
|
|
31
|
+
setFiles === null || setFiles === void 0 ? void 0 : setFiles(newFiles);
|
|
32
|
+
updateInForm(newFiles);
|
|
33
|
+
setErrors(errors);
|
|
34
|
+
};
|
|
35
|
+
const { getRootProps, getInputProps, isFocused, isDragActive } = useDropzone({
|
|
36
|
+
onDrop,
|
|
37
|
+
accept: areaContent.acceptTypes,
|
|
38
|
+
maxSize,
|
|
39
|
+
maxFiles: multiple ? 0 : initialMaxFiles,
|
|
40
|
+
multiple
|
|
41
|
+
});
|
|
42
|
+
const removeFile = (fileName) => {
|
|
43
|
+
const newFiles = initialFiles.filter((file) => file.name !== fileName);
|
|
44
|
+
if (newFiles.length === 0) {
|
|
45
|
+
setErrors([]);
|
|
46
|
+
}
|
|
47
|
+
setFiles === null || setFiles === void 0 ? void 0 : setFiles(newFiles);
|
|
48
|
+
updateInForm(newFiles);
|
|
49
|
+
};
|
|
50
|
+
const removeError = (index) => {
|
|
51
|
+
setErrors((prevErrors) => prevErrors.filter((_error, i) => i !== index));
|
|
52
|
+
};
|
|
53
|
+
const updateInForm = useCallback((values) => {
|
|
54
|
+
if (name && setFieldValue) {
|
|
55
|
+
setFieldValue(name, values);
|
|
56
|
+
}
|
|
57
|
+
}, [name, setFieldValue]);
|
|
58
|
+
return (_jsxs("div", { className: "dz-file-upload", children: [mode !== FileUploadMode.view ? (_jsxs("div", Object.assign({}, getRootProps(), { className: classnames('dz-file-upload__area', {
|
|
59
|
+
'dz-file-upload__area--focused': isFocused,
|
|
60
|
+
'dz-file-upload__area--active': isDragActive
|
|
61
|
+
}), children: [_jsx(IconUpload, { className: "mb-20", size: "xlarge" }), _jsx("input", Object.assign({}, getInputProps(), { name: name })), _jsx(Text, { type: "primary", weight: "semibold", className: "mb-6", children: translation.title }), _jsx(Text, { size: "small", children: `${areaContent.acceptTypesMessage} ${(allowedTypes === null || allowedTypes === void 0 ? void 0 : allowedTypes.length) === 1 ? translation.format : translation.formats}, ${translation.maxSize.replace('$1', areaContent.maxSizeFormatted)}` })] }))) : null, _jsxs("div", { className: "dz-file-upload__files", children: [errors.map(({ code }, index) => {
|
|
62
|
+
return (_jsx(ErrorItem, { code: code, areaContent: areaContent, onRemove: () => removeError(index), locale: locale }, index));
|
|
63
|
+
}), initialFiles.map((file, index) => {
|
|
64
|
+
return (_jsx(PreviewItem, { file: file, onRemove: () => removeFile(file.name), mode: mode }, index));
|
|
65
|
+
})] })] }));
|
|
66
|
+
});
|
|
67
|
+
DropzoneFileUpload.displayName = 'DropzoneFileUpload';
|
|
@@ -1,52 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import 'react
|
|
3
|
-
|
|
4
|
-
import '
|
|
5
|
-
import '
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
import '../../../helpers/locale.js';
|
|
23
|
-
import '../../../type/locale.js';
|
|
24
|
-
import '../../../helpers/storage.js';
|
|
25
|
-
import 'react-toastify';
|
|
26
|
-
import '../../../hooks/useGetIsMobile.js';
|
|
27
|
-
import 'framer-motion';
|
|
28
|
-
import '../../../helperComponents/AnimatePresenceWrapper/AnimatePresenceWrapper.js';
|
|
29
|
-
import '../../../hooks/useOnOutsideClick.js';
|
|
30
|
-
import '../../../hooks/useHideBodyScroll.js';
|
|
31
|
-
import '../../SVGIcons/IconDismiss.js';
|
|
32
|
-
import '../../Tooltip/types.js';
|
|
33
|
-
import '../../Tooltip/Tooltip.js';
|
|
34
|
-
import '../../../hooks/useGetTooltipStyles.js';
|
|
35
|
-
import '../../../hooks/useGetElemSizes.js';
|
|
36
|
-
import '../../../hooks/useGetElemPositions.js';
|
|
37
|
-
import '../../../hooks/useGetTooltipPosition.js';
|
|
38
|
-
import '../../../hooks/useHideOnScroll.js';
|
|
39
|
-
import 'react-syntax-highlighter';
|
|
40
|
-
import '../../Link/Link.js';
|
|
41
|
-
import '../../Popover/PopoverDesktop.js';
|
|
42
|
-
import '../../SVGIcons/IconInfo.js';
|
|
43
|
-
import '../../../helperComponents/IconDynamicComponent/IconDynamicComponent.js';
|
|
44
|
-
import '../../../helperComponents/IconDynamicComponent/constants.js';
|
|
45
|
-
import '@babel/runtime/helpers/typeof';
|
|
46
|
-
import '../../SVGIcons/IconDismissFilled.js';
|
|
47
|
-
import '../../SVGIcons/IconDelete.js';
|
|
48
|
-
import './FilePreview.js';
|
|
49
|
-
import '../../Progress/Progress.js';
|
|
50
|
-
import '../../SVGIcons/IconArrowDownloadFilled.js';
|
|
51
|
-
import '../../../helpers/download-file.js';
|
|
52
|
-
import '../../Button/consts.js';
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import { ErrorCode } from 'react-dropzone';
|
|
4
|
+
import { Alert } from '../../Alert';
|
|
5
|
+
import { getDropzoneLocale } from './helpers';
|
|
6
|
+
export const ErrorItem = ({ code, onRemove, areaContent, locale }) => {
|
|
7
|
+
const errorMessage = useMemo(() => {
|
|
8
|
+
const translation = getDropzoneLocale(locale);
|
|
9
|
+
if (code === ErrorCode.FileInvalidType) {
|
|
10
|
+
return translation.fileInvalidType.replace('$1', areaContent.acceptTypesMessage);
|
|
11
|
+
}
|
|
12
|
+
else if (code === ErrorCode.FileTooLarge) {
|
|
13
|
+
return translation.fileTooLarge.replace('$1', areaContent.maxSizeFormatted);
|
|
14
|
+
}
|
|
15
|
+
else if (code === ErrorCode.TooManyFiles) {
|
|
16
|
+
return translation.tooManyFiles;
|
|
17
|
+
}
|
|
18
|
+
return '';
|
|
19
|
+
}, [code]);
|
|
20
|
+
return errorMessage ? (_jsx(Alert, { type: "error", text: errorMessage, closeIcon: true, onClose: onRemove })) : null;
|
|
21
|
+
};
|