hrm_ui_lib 2.0.3 → 2.1.1
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 +525 -0
- package/assets/styles/styles.scss +3 -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/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.d.ts +4 -0
- package/components/SVGIcons/IconChevronDoubleLeft.js +8 -0
- package/components/SVGIcons/IconChevronDoubleRight.d.ts +4 -0
- package/components/SVGIcons/IconChevronDoubleRight.js +8 -0
- 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.d.ts +2 -0
- package/components/SVGIcons/index.js +302 -303
- 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.d.ts +8 -0
- package/components/TableV2/AdvancedPagination.js +62 -0
- package/components/TableV2/ColumnHeader.d.ts +9 -0
- package/components/TableV2/ColumnHeader.js +32 -0
- package/components/TableV2/ColumnSettings.d.ts +9 -0
- package/components/TableV2/ColumnSettings.js +33 -0
- package/components/TableV2/IndeterminateCheckbox.d.ts +13 -0
- package/components/TableV2/IndeterminateCheckbox.js +16 -0
- package/components/TableV2/Table.d.ts +3 -0
- package/components/TableV2/Table.js +123 -0
- package/components/TableV2/constants/index.d.ts +6 -0
- package/components/TableV2/constants/index.js +27 -0
- package/components/TableV2/hooks/useTableColumnSettings.d.ts +2 -0
- package/components/TableV2/hooks/useTableColumnSettings.js +17 -0
- package/components/TableV2/hooks/useTableControl.d.ts +11 -0
- package/components/TableV2/hooks/useTableControl.js +182 -0
- package/components/TableV2/index.d.ts +3 -0
- package/components/TableV2/index.js +3 -0
- package/components/TableV2/loadTableSettings.d.ts +2 -0
- package/components/TableV2/loadTableSettings.js +9 -0
- package/components/TableV2/types.d.ts +70 -0
- package/components/TableV2/types.js +1 -0
- 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 +46 -453
- package/package.json +5 -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-V_kH4Snn.js → Alert-sShHxUYN.js} +0 -0
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useReactTable, getCoreRowModel, getSortedRowModel, getPaginationRowModel } from '@tanstack/react-table';
|
|
3
|
+
import { MouseSensor, TouchSensor, useSensor, useSensors } from '@dnd-kit/core';
|
|
4
|
+
import { useState, useMemo, useEffect } from 'react';
|
|
5
|
+
import { IndeterminateCheckbox } from '../IndeterminateCheckbox';
|
|
6
|
+
import { arrayMove } from '@dnd-kit/sortable';
|
|
7
|
+
import { loadTableSettings } from '../loadTableSettings';
|
|
8
|
+
import { useTableColumnSettings } from './useTableColumnSettings';
|
|
9
|
+
import { STORAGE_TYPE, TABLE_NAME_PREFIX } from '../constants';
|
|
10
|
+
export function useTableControl({ withSelect, columns, data, tableSettings, totalCount = 0, defaultPageSize = 10, defaultPageIndex = 0, defaultHiddenColumns = [], onSortChange, onRowSelection, onColumnSizing, onPaginationChange }) {
|
|
11
|
+
var _a, _b;
|
|
12
|
+
const shouldPersistToStorage = (tableSettings === null || tableSettings === void 0 ? void 0 : tableSettings.persistColumnSettings) === STORAGE_TYPE.LOCAL;
|
|
13
|
+
const shouldEmitExternal = (tableSettings === null || tableSettings === void 0 ? void 0 : tableSettings.persistColumnSettings) === STORAGE_TYPE.EXTERNAL;
|
|
14
|
+
const tableName = `${TABLE_NAME_PREFIX}-${tableSettings === null || tableSettings === void 0 ? void 0 : tableSettings.tableName}`;
|
|
15
|
+
const savedSettings = shouldPersistToStorage && tableName
|
|
16
|
+
? loadTableSettings(tableName)
|
|
17
|
+
: { columnVisibility: {}, columnSizing: {}, columnOrder: [] };
|
|
18
|
+
const [activeId, setActiveId] = useState(null);
|
|
19
|
+
const [sorting, setSorting] = useState([]);
|
|
20
|
+
const [rowSelection, setRowSelection] = useState({});
|
|
21
|
+
const [columnSizing, setColumnSizing] = useState((_a = savedSettings.columnSizing) !== null && _a !== void 0 ? _a : {});
|
|
22
|
+
const [columnVisibility, setColumnVisibility] = useState(Object.assign(Object.assign({}, defaultHiddenColumns.reduce((acc, key) => {
|
|
23
|
+
acc[key] = false;
|
|
24
|
+
return acc;
|
|
25
|
+
}, {})), savedSettings.columnVisibility));
|
|
26
|
+
const [pagination, setPagination] = useState({
|
|
27
|
+
pageIndex: defaultPageIndex,
|
|
28
|
+
pageSize: defaultPageSize
|
|
29
|
+
});
|
|
30
|
+
const memoizedColumns = useMemo(() => {
|
|
31
|
+
const columnsList = [...columns].map((col) => {
|
|
32
|
+
if (col.id === 'actions') {
|
|
33
|
+
return Object.assign(Object.assign({}, col), { enableColumnDragging: false, enableSorting: false, enableResizing: false, enableHiding: false });
|
|
34
|
+
}
|
|
35
|
+
return col;
|
|
36
|
+
});
|
|
37
|
+
if (withSelect) {
|
|
38
|
+
columnsList.unshift({
|
|
39
|
+
id: 'select',
|
|
40
|
+
enableHiding: false,
|
|
41
|
+
enableColumnDragging: false,
|
|
42
|
+
enablePinning: true,
|
|
43
|
+
header: ({ table }) => (_jsx(IndeterminateCheckbox, { checked: table.getIsAllRowsSelected(), indeterminate: table.getIsSomeRowsSelected(), onChange: table.getToggleAllRowsSelectedHandler() })),
|
|
44
|
+
cell: ({ row }) => (_jsx(IndeterminateCheckbox, { checked: row.getIsSelected(), disabled: !row.getCanSelect(), indeterminate: row.getIsSomeSelected(), onChange: row.getToggleSelectedHandler() }))
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
return columnsList;
|
|
48
|
+
}, [columns]);
|
|
49
|
+
const [columnOrder, setColumnOrder] = useState(((_b = savedSettings.columnOrder) === null || _b === void 0 ? void 0 : _b.length) && savedSettings.columnOrder.length === memoizedColumns.length
|
|
50
|
+
? savedSettings.columnOrder
|
|
51
|
+
: memoizedColumns.map((column) => column.id));
|
|
52
|
+
const reorderedColumns = columnOrder.map((columnId) => memoizedColumns.find((col) => col.id === columnId));
|
|
53
|
+
const handleSortingChange = (updaterOrValue) => {
|
|
54
|
+
const newSorting = typeof updaterOrValue === 'function' ? updaterOrValue(sorting) : updaterOrValue;
|
|
55
|
+
setSorting(newSorting);
|
|
56
|
+
const sortingEvent = newSorting.map((sort) => {
|
|
57
|
+
var _a;
|
|
58
|
+
return ({
|
|
59
|
+
column: (_a = sort.id) !== null && _a !== void 0 ? _a : '',
|
|
60
|
+
direction: sort.desc ? 'desc' : sort.id ? 'asc' : false,
|
|
61
|
+
timestamp: Date.now()
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
onSortChange === null || onSortChange === void 0 ? void 0 : onSortChange(sortingEvent);
|
|
65
|
+
};
|
|
66
|
+
const handleRowSelect = (updaterOrValue) => {
|
|
67
|
+
const newSelectionRow = typeof updaterOrValue === 'function' ? updaterOrValue(rowSelection) : updaterOrValue;
|
|
68
|
+
setRowSelection(newSelectionRow);
|
|
69
|
+
onRowSelection === null || onRowSelection === void 0 ? void 0 : onRowSelection(newSelectionRow);
|
|
70
|
+
};
|
|
71
|
+
const handleColumnSizingChange = (updaterOrValue) => {
|
|
72
|
+
const newColumnSizing = typeof updaterOrValue === 'function' ? updaterOrValue(columnSizing) : updaterOrValue;
|
|
73
|
+
setColumnSizing(newColumnSizing);
|
|
74
|
+
onColumnSizing === null || onColumnSizing === void 0 ? void 0 : onColumnSizing(newColumnSizing);
|
|
75
|
+
};
|
|
76
|
+
const handlePaginationChange = (updaterOrValue) => {
|
|
77
|
+
const newPagination = typeof updaterOrValue === 'function' ? updaterOrValue(pagination) : updaterOrValue;
|
|
78
|
+
setPagination(newPagination);
|
|
79
|
+
onPaginationChange === null || onPaginationChange === void 0 ? void 0 : onPaginationChange(newPagination);
|
|
80
|
+
};
|
|
81
|
+
const hiddenColumns = defaultHiddenColumns === null || defaultHiddenColumns === void 0 ? void 0 : defaultHiddenColumns.reduce((acc, key) => {
|
|
82
|
+
acc[key] = false;
|
|
83
|
+
return acc;
|
|
84
|
+
}, {});
|
|
85
|
+
const table = useReactTable({
|
|
86
|
+
data,
|
|
87
|
+
columns: reorderedColumns,
|
|
88
|
+
pageCount: Math.ceil(totalCount / pagination.pageSize),
|
|
89
|
+
state: {
|
|
90
|
+
sorting,
|
|
91
|
+
pagination,
|
|
92
|
+
columnOrder,
|
|
93
|
+
columnSizing,
|
|
94
|
+
rowSelection,
|
|
95
|
+
columnVisibility: Object.assign(Object.assign({}, hiddenColumns), columnVisibility),
|
|
96
|
+
columnPinning: {
|
|
97
|
+
left: ['select'],
|
|
98
|
+
right: ['actions']
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
defaultColumn: {
|
|
102
|
+
minSize: 200,
|
|
103
|
+
size: 150,
|
|
104
|
+
maxSize: 400
|
|
105
|
+
},
|
|
106
|
+
onPaginationChange: handlePaginationChange,
|
|
107
|
+
onColumnSizingChange: handleColumnSizingChange,
|
|
108
|
+
onSortingChange: handleSortingChange,
|
|
109
|
+
onRowSelectionChange: handleRowSelect,
|
|
110
|
+
onColumnVisibilityChange: setColumnVisibility,
|
|
111
|
+
getCoreRowModel: getCoreRowModel(),
|
|
112
|
+
getSortedRowModel: getSortedRowModel(),
|
|
113
|
+
getPaginationRowModel: getPaginationRowModel(),
|
|
114
|
+
columnResizeMode: 'onChange',
|
|
115
|
+
manualSorting: !!onSortChange,
|
|
116
|
+
manualPagination: !!onPaginationChange,
|
|
117
|
+
enableRowSelection: true,
|
|
118
|
+
enableColumnResizing: true,
|
|
119
|
+
isMultiSortEvent: () => true
|
|
120
|
+
});
|
|
121
|
+
useTableColumnSettings(table, tableName, shouldPersistToStorage);
|
|
122
|
+
const sensors = useSensors(useSensor(MouseSensor, {
|
|
123
|
+
activationConstraint: {
|
|
124
|
+
distance: 8
|
|
125
|
+
}
|
|
126
|
+
}), useSensor(TouchSensor, {
|
|
127
|
+
activationConstraint: {
|
|
128
|
+
delay: 200,
|
|
129
|
+
tolerance: 5
|
|
130
|
+
}
|
|
131
|
+
}));
|
|
132
|
+
const handleDragStart = (event) => {
|
|
133
|
+
setActiveId(event.active.id);
|
|
134
|
+
document.body.classList.add('select-none');
|
|
135
|
+
};
|
|
136
|
+
const handleDragEnd = (event) => {
|
|
137
|
+
const { active, over } = event;
|
|
138
|
+
if (over && active.id !== over.id) {
|
|
139
|
+
const oldIndex = columnOrder.indexOf(active.id);
|
|
140
|
+
const newIndex = columnOrder.indexOf(over.id);
|
|
141
|
+
const oldColumn = reorderedColumns[newIndex];
|
|
142
|
+
if ((oldColumn === null || oldColumn === void 0 ? void 0 : oldColumn.enableColumnDragging) === false) {
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
const newColumnOrder = arrayMove(columnOrder, oldIndex, newIndex);
|
|
146
|
+
setColumnOrder(newColumnOrder);
|
|
147
|
+
}
|
|
148
|
+
setActiveId(null);
|
|
149
|
+
document.body.classList.remove('select-none');
|
|
150
|
+
};
|
|
151
|
+
const handleDragCancel = () => {
|
|
152
|
+
setActiveId(null);
|
|
153
|
+
document.body.classList.remove('select-none');
|
|
154
|
+
};
|
|
155
|
+
const activeHeader = activeId
|
|
156
|
+
? table.getHeaderGroups()[0].headers.find((header) => header.id === activeId)
|
|
157
|
+
: null;
|
|
158
|
+
useEffect(() => {
|
|
159
|
+
var _a;
|
|
160
|
+
const settings = {
|
|
161
|
+
columnVisibility,
|
|
162
|
+
columnOrder,
|
|
163
|
+
columnSizing
|
|
164
|
+
};
|
|
165
|
+
if (shouldPersistToStorage && tableSettings.tableName) {
|
|
166
|
+
const serialized = JSON.stringify(settings);
|
|
167
|
+
localStorage.setItem(tableName, serialized);
|
|
168
|
+
}
|
|
169
|
+
if (shouldEmitExternal) {
|
|
170
|
+
(_a = tableSettings === null || tableSettings === void 0 ? void 0 : tableSettings.onColumnSettingsChange) === null || _a === void 0 ? void 0 : _a.call(tableSettings, settings);
|
|
171
|
+
}
|
|
172
|
+
}, [columnVisibility, columnOrder, columnSizing]);
|
|
173
|
+
return {
|
|
174
|
+
table,
|
|
175
|
+
activeHeader,
|
|
176
|
+
sensors,
|
|
177
|
+
memoizedColumns,
|
|
178
|
+
handleDragCancel,
|
|
179
|
+
handleDragEnd,
|
|
180
|
+
handleDragStart
|
|
181
|
+
};
|
|
182
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export const loadTableSettings = (tableKey) => {
|
|
2
|
+
try {
|
|
3
|
+
const raw = localStorage.getItem(tableKey);
|
|
4
|
+
return raw ? JSON.parse(raw) : { columnOrder: [], columnSizing: {}, columnVisibility: {} };
|
|
5
|
+
}
|
|
6
|
+
catch (_a) {
|
|
7
|
+
return { columnOrder: [], columnSizing: {}, columnVisibility: {} };
|
|
8
|
+
}
|
|
9
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { ColumnDef, ColumnSizingState, PaginationState, RowSelectionState, Table, Row } from '@tanstack/react-table';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
export type TTable<TData> = Table<TData>;
|
|
4
|
+
export type TRowSelectionState = RowSelectionState;
|
|
5
|
+
export type TColumnSizingState = ColumnSizingState;
|
|
6
|
+
export type TPaginationState = PaginationState;
|
|
7
|
+
export type TPersistColumnSettings = 'localStorage' | 'external';
|
|
8
|
+
export type TTableProps<TData> = {
|
|
9
|
+
data: (TData & {
|
|
10
|
+
subRows?: TData[];
|
|
11
|
+
})[];
|
|
12
|
+
isLoading?: boolean;
|
|
13
|
+
columns: ColumnDef<TData>[];
|
|
14
|
+
wi?: boolean;
|
|
15
|
+
isActionsVisible?: boolean;
|
|
16
|
+
totalCount?: number;
|
|
17
|
+
hasError?: boolean;
|
|
18
|
+
emptyTitle?: string;
|
|
19
|
+
emptySubTitle?: string;
|
|
20
|
+
emptyIllustration?: string;
|
|
21
|
+
className?: string;
|
|
22
|
+
withSelect?: boolean;
|
|
23
|
+
withBorder?: boolean;
|
|
24
|
+
customHeader?: ReactNode;
|
|
25
|
+
defaultPageIndex?: number;
|
|
26
|
+
defaultPageSize?: number;
|
|
27
|
+
defaultHiddenColumns?: string[];
|
|
28
|
+
collapsibleRows?: boolean;
|
|
29
|
+
tableSettings?: {
|
|
30
|
+
tableName: string;
|
|
31
|
+
persistColumnSettings?: TPersistColumnSettings;
|
|
32
|
+
onColumnSettingsChange?: (settings: ColumnSettings) => void;
|
|
33
|
+
};
|
|
34
|
+
renderExpandedContent?: (row: Row<TData>) => ReactNode;
|
|
35
|
+
renderHeader?: (table: TTable<TData>) => ReactNode;
|
|
36
|
+
renderFooter?: (table: Table<TData>) => ReactNode;
|
|
37
|
+
onRowClick?: (row: Row<TData>) => void;
|
|
38
|
+
onSortChange?: (state: SortingUpdateEvent[]) => void;
|
|
39
|
+
onRowSelection?: (state: TRowSelectionState) => void;
|
|
40
|
+
onColumnSizing?: (state: TColumnSizingState) => void;
|
|
41
|
+
onPaginationChange?: (state: TPaginationState) => void;
|
|
42
|
+
};
|
|
43
|
+
export type Column<TData> = ColumnDef<TData> & {
|
|
44
|
+
enableColumnDragging?: boolean;
|
|
45
|
+
};
|
|
46
|
+
export type SortingUpdateEvent = {
|
|
47
|
+
column: string;
|
|
48
|
+
direction: 'asc' | 'desc' | false;
|
|
49
|
+
timestamp: number;
|
|
50
|
+
};
|
|
51
|
+
export interface ICellProps<TData> {
|
|
52
|
+
row: Row<TData>;
|
|
53
|
+
}
|
|
54
|
+
export interface IHeaderProps<TData> {
|
|
55
|
+
table: Table<TData>;
|
|
56
|
+
}
|
|
57
|
+
export interface TableData {
|
|
58
|
+
subRows: TableData[];
|
|
59
|
+
[key: string]: unknown;
|
|
60
|
+
}
|
|
61
|
+
export interface ExpandColumnProps<TData> {
|
|
62
|
+
row: Row<TData>;
|
|
63
|
+
expandedRows: Set<string>;
|
|
64
|
+
onToggle: (rowId: string) => void;
|
|
65
|
+
}
|
|
66
|
+
export interface ColumnSettings {
|
|
67
|
+
columnVisibility: Record<string, boolean>;
|
|
68
|
+
columnOrder: string[];
|
|
69
|
+
columnSizing: Record<string, number>;
|
|
70
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/components/Text/Text.js
CHANGED
|
@@ -1,36 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import classNames from 'classnames';
|
|
3
|
-
import { noop } from '../../utils/helpers
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var children = props.children,
|
|
8
|
-
_props$className = props.className,
|
|
9
|
-
className = _props$className === void 0 ? '' : _props$className,
|
|
10
|
-
_props$type = props.type,
|
|
11
|
-
type = _props$type === void 0 ? 'primary' : _props$type,
|
|
12
|
-
_props$size = props.size,
|
|
13
|
-
size = _props$size === void 0 ? 'standard' : _props$size,
|
|
14
|
-
_props$weight = props.weight,
|
|
15
|
-
weight = _props$weight === void 0 ? 'regular' : _props$weight,
|
|
16
|
-
_props$lineHeight = props.lineHeight,
|
|
17
|
-
lineHeight = _props$lineHeight === void 0 ? 'medium' : _props$lineHeight,
|
|
18
|
-
_props$as = props.as,
|
|
19
|
-
As = _props$as === void 0 ? 'p' : _props$as,
|
|
20
|
-
_props$dataId = props.dataId,
|
|
21
|
-
dataId = _props$dataId === void 0 ? '' : _props$dataId,
|
|
22
|
-
_props$onClick = props.onClick,
|
|
23
|
-
onClick = _props$onClick === void 0 ? noop : _props$onClick,
|
|
24
|
-
_props$id = props.id,
|
|
25
|
-
id = _props$id === void 0 ? '' : _props$id,
|
|
26
|
-
title = props.title;
|
|
27
|
-
return /*#__PURE__*/React.createElement(As, {
|
|
28
|
-
id: id,
|
|
29
|
-
title: title,
|
|
30
|
-
"data-id": dataId,
|
|
31
|
-
onClick: onClick,
|
|
32
|
-
className: classNames('body', size && "body-".concat(size), type && "color-".concat(type), weight, lineHeight && "lh-".concat(lineHeight), className)
|
|
33
|
-
}, children);
|
|
3
|
+
import { noop } from '../../utils/helpers';
|
|
4
|
+
export const Text = (props) => {
|
|
5
|
+
const { children, className = '', type = 'primary', size = 'standard', weight = 'regular', lineHeight = 'medium', as: As = 'p', dataId = '', onClick = noop, id = '', title } = props;
|
|
6
|
+
return (_jsx(As, { id: id, title: title, "data-id": dataId, onClick: onClick, className: classNames('body', size && `body-${size}`, type && `color-${type}`, weight, lineHeight && `lh-${lineHeight}`, className), children: children }));
|
|
34
7
|
};
|
|
35
|
-
|
|
36
|
-
export { Text };
|
package/components/Text/index.js
CHANGED
package/components/Text/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export {};
|
|
@@ -1,144 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
13
|
import React, { useMemo } from 'react';
|
|
4
|
-
import { Label } from '../../helperComponents
|
|
5
|
-
import {
|
|
14
|
+
import { ErrorMessage, Label } from '../../helperComponents';
|
|
15
|
+
import { Text } from '../Text';
|
|
6
16
|
import classNames from 'classnames';
|
|
7
|
-
import '
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
import '../../type/locale.js';
|
|
30
|
-
import '../../helpers/storage.js';
|
|
31
|
-
import 'react-toastify';
|
|
32
|
-
import '../../hooks/useGetIsMobile.js';
|
|
33
|
-
import 'framer-motion';
|
|
34
|
-
import '../../helperComponents/AnimatePresenceWrapper/AnimatePresenceWrapper.js';
|
|
35
|
-
import '../../hooks/useOnOutsideClick.js';
|
|
36
|
-
import '../../hooks/useHideBodyScroll.js';
|
|
37
|
-
import '../SVGIcons/IconDismiss.js';
|
|
38
|
-
import '../Tooltip/types.js';
|
|
39
|
-
import '../Tooltip/Tooltip.js';
|
|
40
|
-
import '../../hooks/useGetTooltipStyles.js';
|
|
41
|
-
import '../../hooks/useGetElemSizes.js';
|
|
42
|
-
import '../../hooks/useGetElemPositions.js';
|
|
43
|
-
import '../../hooks/useGetTooltipPosition.js';
|
|
44
|
-
import '../../hooks/useHideOnScroll.js';
|
|
45
|
-
import '../Link/Link.js';
|
|
46
|
-
import '../Popover/PopoverDesktop.js';
|
|
47
|
-
import '../SVGIcons/IconInfo.js';
|
|
48
|
-
import '@babel/runtime/helpers/typeof';
|
|
49
|
-
import '../SVGIcons/IconDismissFilled.js';
|
|
50
|
-
import '../SVGIcons/IconDelete.js';
|
|
51
|
-
import '../FileUpload/DropzoneFileUpload/FilePreview.js';
|
|
52
|
-
import '../Progress/Progress.js';
|
|
53
|
-
import '../SVGIcons/IconArrowDownloadFilled.js';
|
|
54
|
-
import '../../helpers/download-file.js';
|
|
55
|
-
import '../Button/consts.js';
|
|
56
|
-
|
|
57
|
-
var _excluded = ["className", "error", "hasError", "label", "disabled", "currentValue", "changeHandler", "placeHolder", "onChange", "required", "maxCount", "helperText", "successMessage", "dataId", "labelAddons", "isValid", "setFieldValue"];
|
|
58
|
-
var Textarea = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
59
|
-
var className = _ref.className,
|
|
60
|
-
error = _ref.error,
|
|
61
|
-
hasError = _ref.hasError,
|
|
62
|
-
label = _ref.label,
|
|
63
|
-
disabled = _ref.disabled,
|
|
64
|
-
currentValue = _ref.currentValue,
|
|
65
|
-
changeHandler = _ref.changeHandler,
|
|
66
|
-
placeHolder = _ref.placeHolder,
|
|
67
|
-
onChange = _ref.onChange,
|
|
68
|
-
_ref$required = _ref.required,
|
|
69
|
-
required = _ref$required === void 0 ? false : _ref$required,
|
|
70
|
-
maxCount = _ref.maxCount,
|
|
71
|
-
helperText = _ref.helperText,
|
|
72
|
-
successMessage = _ref.successMessage,
|
|
73
|
-
_ref$dataId = _ref.dataId,
|
|
74
|
-
dataId = _ref$dataId === void 0 ? '' : _ref$dataId,
|
|
75
|
-
labelAddons = _ref.labelAddons;
|
|
76
|
-
_ref.isValid;
|
|
77
|
-
_ref.setFieldValue;
|
|
78
|
-
var rest = _objectWithoutProperties(_ref, _excluded);
|
|
79
|
-
// const isErrorVisible = hasError !== undefined ? hasError : !!error
|
|
80
|
-
|
|
81
|
-
var handleChange = function handleChange(event) {
|
|
82
|
-
if (changeHandler) {
|
|
83
|
-
changeHandler(event);
|
|
84
|
-
}
|
|
85
|
-
if (onChange) {
|
|
86
|
-
onChange(event);
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
var currentLength = useMemo(function () {
|
|
90
|
-
if (currentValue) {
|
|
91
|
-
return currentValue.length;
|
|
92
|
-
}
|
|
93
|
-
if (rest && rest.value && typeof rest.value === 'string') {
|
|
94
|
-
return rest.value.length;
|
|
95
|
-
}
|
|
96
|
-
return 0;
|
|
97
|
-
}, [rest, currentValue]);
|
|
98
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
99
|
-
className: classNames('textarea', className, {
|
|
100
|
-
'textarea--invalid': hasError
|
|
101
|
-
})
|
|
102
|
-
}, /*#__PURE__*/React.createElement(Label, {
|
|
103
|
-
text: label,
|
|
104
|
-
required: required,
|
|
105
|
-
disabled: disabled,
|
|
106
|
-
labelAddons: labelAddons
|
|
107
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
108
|
-
className: "textarea__inner"
|
|
109
|
-
}, /*#__PURE__*/React.createElement("textarea", _extends({
|
|
110
|
-
"data-id": dataId,
|
|
111
|
-
disabled: disabled,
|
|
112
|
-
ref: ref,
|
|
113
|
-
placeholder: placeHolder
|
|
114
|
-
}, rest, {
|
|
115
|
-
onChange: handleChange
|
|
116
|
-
}, currentValue ? {
|
|
117
|
-
value: currentValue
|
|
118
|
-
} : {}))), error || successMessage || helperText || maxCount ? /*#__PURE__*/React.createElement("div", {
|
|
119
|
-
className: "textarea__message mt-8"
|
|
120
|
-
}, error && /*#__PURE__*/React.createElement(ErrorMessage, {
|
|
121
|
-
message: error,
|
|
122
|
-
icon: "infoFilled",
|
|
123
|
-
dataId: dataId
|
|
124
|
-
}), successMessage ? /*#__PURE__*/React.createElement(Text, {
|
|
125
|
-
size: "small",
|
|
126
|
-
type: "success",
|
|
127
|
-
className: "flexbox align-items--center"
|
|
128
|
-
}, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IconCheckmarkCircleFilled, {
|
|
129
|
-
type: "success",
|
|
130
|
-
size: "xsmall"
|
|
131
|
-
}), /*#__PURE__*/React.createElement("span", {
|
|
132
|
-
className: "ml-4"
|
|
133
|
-
}, successMessage))) : null, helperText && !successMessage ? /*#__PURE__*/React.createElement(Text, {
|
|
134
|
-
size: "small",
|
|
135
|
-
type: disabled ? 'disabled' : 'secondary'
|
|
136
|
-
}, helperText) : null, maxCount ? /*#__PURE__*/React.createElement(Text, {
|
|
137
|
-
size: "small",
|
|
138
|
-
type: disabled ? 'disabled' : 'secondary',
|
|
139
|
-
className: "textarea__counter"
|
|
140
|
-
}, "".concat(currentLength, "/").concat(maxCount)) : null) : null);
|
|
17
|
+
import IconCheckmarkCircleFilled from '../SVGIcons/IconCheckmarkCircleFilled';
|
|
18
|
+
export const Textarea = React.forwardRef((_a, ref) => {
|
|
19
|
+
// const isErrorVisible = hasError !== undefined ? hasError : !!error
|
|
20
|
+
var { className, error, hasError, label, disabled, currentValue, changeHandler, placeHolder, onChange, required = false, maxCount, helperText, successMessage, dataId = '', labelAddons, isValid, setFieldValue } = _a, rest = __rest(_a, ["className", "error", "hasError", "label", "disabled", "currentValue", "changeHandler", "placeHolder", "onChange", "required", "maxCount", "helperText", "successMessage", "dataId", "labelAddons", "isValid", "setFieldValue"]);
|
|
21
|
+
const handleChange = (event) => {
|
|
22
|
+
if (changeHandler) {
|
|
23
|
+
changeHandler(event);
|
|
24
|
+
}
|
|
25
|
+
if (onChange) {
|
|
26
|
+
onChange(event);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
const currentLength = useMemo(() => {
|
|
30
|
+
if (currentValue) {
|
|
31
|
+
return currentValue.length;
|
|
32
|
+
}
|
|
33
|
+
if (rest && rest.value && typeof rest.value === 'string') {
|
|
34
|
+
return rest.value.length;
|
|
35
|
+
}
|
|
36
|
+
return 0;
|
|
37
|
+
}, [rest, currentValue]);
|
|
38
|
+
return (_jsxs("div", { className: classNames('textarea', className, { 'textarea--invalid': hasError }), children: [_jsx(Label, { text: label, required: required, disabled: disabled, labelAddons: labelAddons }), _jsx("div", { className: "textarea__inner", children: _jsx("textarea", Object.assign({ "data-id": dataId, disabled: disabled, ref: ref, placeholder: placeHolder }, rest, { onChange: handleChange }, (currentValue ? { value: currentValue } : {}))) }), error || successMessage || helperText || maxCount ? (_jsxs("div", { className: "textarea__message mt-8", children: [error && _jsx(ErrorMessage, { message: error, icon: "infoFilled", dataId: dataId }), successMessage ? (_jsx(Text, { size: "small", type: "success", className: "flexbox align-items--center", children: _jsxs(_Fragment, { children: [_jsx(IconCheckmarkCircleFilled, { type: "success", size: "xsmall" }), _jsx("span", { className: "ml-4", children: successMessage })] }) })) : null, helperText && !successMessage ? (_jsx(Text, { size: "small", type: disabled ? 'disabled' : 'secondary', children: helperText })) : null, maxCount ? (_jsx(Text, { size: "small", type: disabled ? 'disabled' : 'secondary', className: "textarea__counter", children: `${currentLength}/${maxCount}` })) : null] })) : null] }));
|
|
141
39
|
});
|
|
142
40
|
Textarea.displayName = 'Textarea';
|
|
143
|
-
|
|
144
|
-
export { Textarea };
|
|
@@ -1,56 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
import '@babel/runtime/helpers/extends';
|
|
3
|
-
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
4
|
-
import 'react';
|
|
5
|
-
import '../../helperComponents/Label/Label.js';
|
|
6
|
-
import '../Text/Text.js';
|
|
7
|
-
import 'classnames';
|
|
8
|
-
import '../../utils/helpers.js';
|
|
9
|
-
import 'dayjs';
|
|
10
|
-
import '../../helperComponents/ErrorMessage/ErrorMessage.js';
|
|
11
|
-
import '../../helperComponents/IconDynamicComponent/IconDynamicComponent.js';
|
|
12
|
-
import '../../helperComponents/IconDynamicComponent/constants.js';
|
|
13
|
-
import '@babel/runtime/helpers/slicedToArray';
|
|
14
|
-
import '@babel/runtime/helpers/toConsumableArray';
|
|
15
|
-
import '@babel/runtime/helpers/defineProperty';
|
|
16
|
-
import '../../consts/index.js';
|
|
17
|
-
import '../../type/file-upload.js';
|
|
18
|
-
import '../../hooks/useScreenSize.js';
|
|
19
|
-
import 'react-hook-form';
|
|
20
|
-
import '../../Alert-V_kH4Snn.js';
|
|
21
|
-
import '../Alert/consts.js';
|
|
22
|
-
import '../../helperComponents/Loader/Loader.js';
|
|
23
|
-
import 'react-dropzone';
|
|
24
|
-
import '../SVGIcons/IconUpload.js';
|
|
25
|
-
import '../FileUpload/types.js';
|
|
26
|
-
import '../../helpers/format-date.js';
|
|
27
|
-
import '../../helpers/locale.js';
|
|
28
|
-
import '../../type/locale.js';
|
|
29
|
-
import '../../helpers/storage.js';
|
|
30
|
-
import 'react-toastify';
|
|
31
|
-
import '../../hooks/useGetIsMobile.js';
|
|
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 '@babel/runtime/helpers/typeof';
|
|
49
|
-
import '../SVGIcons/IconDismissFilled.js';
|
|
50
|
-
import '../SVGIcons/IconDelete.js';
|
|
51
|
-
import '../FileUpload/DropzoneFileUpload/FilePreview.js';
|
|
52
|
-
import '../Progress/Progress.js';
|
|
53
|
-
import '../SVGIcons/IconArrowDownloadFilled.js';
|
|
54
|
-
import '../../helpers/download-file.js';
|
|
55
|
-
import '../Button/consts.js';
|
|
56
|
-
import '../SVGIcons/IconCheckmarkCircleFilled.js';
|
|
1
|
+
export * from './Textarea';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export {};
|