hrm_ui_lib 2.1.0-alpha.17 → 2.1.0-alpha.18
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 +1 -1
- package/components/Alert/Alert.js +6 -11
- package/components/Alert/consts.js +1 -15
- package/components/Alert/index.js +1 -1
- package/components/Alert/types.js +0 -1
- package/components/Avatar/Avatar.js +2 -24
- package/components/Avatar/AvatarGroup.js +5 -21
- package/components/Avatar/index.js +1 -2
- package/components/Avatar/types.js +0 -1
- package/components/Badge/Badge.js +2 -7
- package/components/Badge/index.js +1 -1
- package/components/Badge/types.js +0 -1
- package/components/BadgeV2/BadgeV2.js +1 -14
- package/components/BadgeV2/index.js +1 -1
- package/components/BadgeV2/types.js +1 -5
- package/components/Breadcrumb/Breadcrumb.js +2 -7
- package/components/Breadcrumb/index.js +1 -1
- package/components/Breadcrumb/types.js +0 -1
- package/components/Button/Button.js +2 -31
- package/components/Button/consts.js +1 -14
- package/components/Button/index.js +1 -1
- package/components/Button/types.js +0 -1
- package/components/ButtonGroup/ButtonGroup.js +2 -16
- package/components/ButtonGroup/ButtonGroupItem.js +3 -23
- package/components/ButtonGroup/consts.js +1 -10
- package/components/ButtonGroup/index.js +1 -1
- package/components/ButtonGroup/types.js +0 -1
- package/components/Card/Card.js +1 -30
- package/components/Card/CardComponent/Card.js +3 -13
- package/components/Card/CardComponent/CardBody.js +2 -9
- package/components/Card/CardComponent/CardFooter.js +1 -6
- package/components/Card/CardComponent/CardHead.js +2 -23
- package/components/Card/CardContext.js +1 -6
- package/components/Card/index.js +1 -1
- package/components/Card/types.js +0 -1
- package/components/CardGroup/CardGroup.js +1 -24
- package/components/CardGroup/CardGroupComponent/CardBody.js +2 -8
- package/components/CardGroup/CardGroupComponent/CardGroup.js +2 -9
- package/components/CardGroup/CardGroupComponent/CardHead.js +3 -9
- package/components/CardGroup/CardGroupContext.js +1 -3
- package/components/CardGroup/index.js +1 -1
- package/components/CardGroup/types.js +0 -1
- package/components/Checkbox/Checkbox.js +6 -44
- package/components/Checkbox/consts.js +1 -4
- package/components/Checkbox/index.js +1 -1
- package/components/Checkbox/types.js +0 -1
- package/components/Chips/Chips.js +2 -25
- package/components/Chips/consts.js +1 -12
- package/components/Chips/index.js +1 -1
- package/components/Chips/types.js +1 -5
- package/components/Collapse/Collapse/Collapse.js +5 -19
- package/components/Collapse/Collapse/Title.js +2 -16
- package/components/Collapse/CollapseGroup/CollapseGroup.js +3 -25
- package/components/Collapse/CollapseItem/CollapseItem.js +10 -14
- package/components/Collapse/index.js +1 -3
- package/components/Collapse/types.js +0 -1
- package/components/Container/Container.js +2 -5
- package/components/Container/index.js +1 -1
- package/components/Container/types.js +0 -1
- package/components/Copy/Copy.js +3 -16
- package/components/Copy/index.js +1 -1
- package/components/Copy/types.js +0 -1
- package/components/Counter/Counter.js +2 -57
- package/components/Counter/index.js +1 -1
- package/components/Counter/types.js +0 -1
- package/components/DarkModeSwitcher/DarkModeSwitcher.js +5 -15
- package/components/DarkModeSwitcher/index.js +1 -1
- package/components/DarkModeSwitcher/types.js +1 -5
- package/components/DatePicker/CustomHeader/CustomHeader.js +7 -17
- package/components/DatePicker/CustomHeader/helpers.js +1 -11
- package/components/DatePicker/RangeDatePicker/RangeDatePicker.js +1 -8
- package/components/DatePicker/RangeDatePicker/RangeDatePickerDesktop.js +4 -76
- package/components/DatePicker/RangeDatePicker/RangeDatePickerMobile.js +8 -90
- package/components/DatePicker/RangeDatePicker/index.js +1 -1
- package/components/DatePicker/SimpleDatePicker/SimpleDatePicker.js +1 -10
- package/components/DatePicker/SimpleDatePicker/SimpleDatePickerDesktop.js +4 -48
- package/components/DatePicker/SimpleDatePicker/SimpleDatePickerMobile.js +5 -48
- package/components/DatePicker/SimpleDatePicker/index.js +1 -1
- package/components/DatePicker/TimePicker/MobileModalContent.js +4 -34
- package/components/DatePicker/TimePicker/TimePicker.js +1 -8
- package/components/DatePicker/TimePicker/TimePickerDesktop.js +4 -67
- package/components/DatePicker/TimePicker/TimePickerMobile.js +5 -29
- package/components/DatePicker/TimePicker/consts.js +1 -5
- package/components/DatePicker/TimePicker/helpers.js +1 -11
- package/components/DatePicker/TimePicker/index.js +1 -1
- package/components/DatePicker/hooks.js +1 -37
- package/components/DatePicker/index.js +1 -3
- package/components/DatePicker/localization.js +1 -44
- package/components/DatePicker/types.js +1 -5
- package/components/Divider/Divider.js +2 -9
- package/components/Divider/index.js +1 -1
- package/components/Divider/types.js +0 -1
- package/components/Empty/Empty.js +4 -11
- package/components/Empty/index.js +1 -1
- package/components/Empty/types.js +0 -1
- package/components/Feedback/Feedback.d.ts +3 -0
- package/components/Feedback/Feedback.js +3 -0
- package/components/Feedback/consts.d.ts +1 -0
- package/components/Feedback/consts.js +1 -0
- package/components/Feedback/index.d.ts +1 -0
- package/components/Feedback/index.js +1 -0
- package/components/Feedback/types.d.ts +5 -0
- package/components/Feedback/types.js +0 -0
- package/components/FileUpload/DropzoneFileUpload/DropzoneFileUpload.js +7 -67
- package/components/FileUpload/DropzoneFileUpload/ErrorItem.js +1 -21
- package/components/FileUpload/DropzoneFileUpload/FilePreview.js +2 -24
- package/components/FileUpload/DropzoneFileUpload/PreviewItem.js +7 -30
- package/components/FileUpload/DropzoneFileUpload/helpers.js +1 -79
- package/components/FileUpload/DropzoneFileUpload/index.js +1 -1
- package/components/FileUpload/FileUpload.js +6 -70
- package/components/FileUpload/UploadItems.js +6 -23
- package/components/FileUpload/index.js +1 -3
- package/components/FileUpload/types.js +1 -6
- package/components/FormContainer/FormContainer.js +1 -53
- package/components/FormContainer/index.js +1 -1
- package/components/FormContainer/types.js +0 -1
- package/components/FormField/FormField.js +3 -21
- package/components/FormField/index.js +1 -1
- package/components/FormField/types.js +0 -1
- package/components/Heading/Heading.js +2 -7
- package/components/Heading/index.js +1 -1
- package/components/Heading/types.js +0 -1
- package/components/Image/Image.js +1 -13
- package/components/Image/index.js +1 -1
- package/components/Image/types.js +0 -1
- package/components/Input/Input.js +9 -76
- package/components/Input/index.js +1 -1
- package/components/Input/types.js +0 -1
- package/components/Link/Link.js +2 -16
- package/components/Link/index.js +1 -1
- package/components/Link/types.js +0 -1
- package/components/Menu/Menu.js +3 -51
- package/components/Menu/NestedMenu.js +3 -52
- package/components/Menu/index.js +1 -2
- package/components/Menu/types.js +0 -1
- package/components/Modal/Modal.js +2 -40
- package/components/Modal/ModalConfirmation.js +4 -23
- package/components/Modal/ModalContent.js +5 -10
- package/components/Modal/index.js +1 -2
- package/components/Modal/types.js +0 -1
- package/components/More/More.js +3 -20
- package/components/More/index.js +1 -1
- package/components/More/types.js +0 -1
- package/components/Pagination/Pagination.js +2 -18
- package/components/Pagination/consts.js +1 -6
- package/components/Pagination/index.js +1 -1
- package/components/Pagination/types.js +0 -1
- package/components/Popover/Popover.js +1 -45
- package/components/Popover/PopoverDesktop.js +1 -18
- package/components/Popover/PopoverMobile.js +3 -8
- package/components/Popover/index.js +1 -1
- package/components/Popover/types.js +0 -1
- package/components/Progress/Progress.js +4 -22
- package/components/Progress/index.js +1 -1
- package/components/Progress/types.js +0 -1
- package/components/ProgressStep/ProgressStep.js +2 -10
- package/components/ProgressStep/Step.js +9 -54
- package/components/ProgressStep/consts.js +1 -7
- package/components/ProgressStep/index.js +1 -1
- package/components/ProgressStep/types.js +1 -5
- package/components/Radio/Radio.js +4 -21
- package/components/Radio/RadioGroup.js +4 -23
- package/components/Radio/index.js +1 -2
- package/components/Radio/types.js +0 -1
- package/components/SVGIcons/IconAdd.js +1 -8
- package/components/SVGIcons/IconAddCircle.js +1 -8
- package/components/SVGIcons/IconAddCircleFilled.js +1 -8
- package/components/SVGIcons/IconAddFilled.js +1 -8
- package/components/SVGIcons/IconAirplaneTakeOff.js +1 -8
- package/components/SVGIcons/IconAirplaneTakeOffFilled.js +1 -8
- package/components/SVGIcons/IconAlert.js +1 -8
- package/components/SVGIcons/IconAlertBadge.js +1 -8
- package/components/SVGIcons/IconAlertBadgeFilled.js +1 -8
- package/components/SVGIcons/IconAlertFilled.js +1 -8
- package/components/SVGIcons/IconAm.js +7 -8
- package/components/SVGIcons/IconAmd.js +1 -8
- package/components/SVGIcons/IconAmdFilled.js +1 -8
- package/components/SVGIcons/IconApple.js +1 -8
- package/components/SVGIcons/IconArrowDown.js +1 -8
- package/components/SVGIcons/IconArrowDownFilled.js +1 -8
- package/components/SVGIcons/IconArrowDownLeft.js +1 -8
- package/components/SVGIcons/IconArrowDownLeftFilled.js +1 -8
- package/components/SVGIcons/IconArrowDownload.js +1 -8
- package/components/SVGIcons/IconArrowDownloadFilled.js +1 -8
- package/components/SVGIcons/IconArrowEnter.js +1 -8
- package/components/SVGIcons/IconArrowEnterFilled.js +1 -8
- package/components/SVGIcons/IconArrowExit.js +1 -8
- package/components/SVGIcons/IconArrowExitFilled.js +1 -8
- package/components/SVGIcons/IconArrowExportLeftToRight.js +1 -8
- package/components/SVGIcons/IconArrowExportLeftToRightFilled.js +1 -8
- package/components/SVGIcons/IconArrowExportRightToLeft.js +1 -8
- package/components/SVGIcons/IconArrowExportRightToLeftFilled.js +1 -8
- package/components/SVGIcons/IconArrowExportUp.js +1 -8
- package/components/SVGIcons/IconArrowExportUpFilled.js +1 -8
- package/components/SVGIcons/IconArrowImport.js +1 -8
- package/components/SVGIcons/IconArrowImportFilled.js +1 -8
- package/components/SVGIcons/IconArrowLeft.js +1 -8
- package/components/SVGIcons/IconArrowLeftFilled.js +1 -8
- package/components/SVGIcons/IconArrowRepeatAll.js +1 -8
- package/components/SVGIcons/IconArrowRepeatAllFilled.js +1 -8
- package/components/SVGIcons/IconArrowReset.js +1 -8
- package/components/SVGIcons/IconArrowResetFilled.js +1 -8
- package/components/SVGIcons/IconArrowRight.js +1 -8
- package/components/SVGIcons/IconArrowRightFilled.js +1 -8
- package/components/SVGIcons/IconArrowSort.js +1 -8
- package/components/SVGIcons/IconArrowSortFilled.js +1 -8
- package/components/SVGIcons/IconArrowSync.js +1 -8
- package/components/SVGIcons/IconArrowSyncFilled.js +1 -8
- package/components/SVGIcons/IconArrowUp.js +1 -8
- package/components/SVGIcons/IconArrowUpFilled.js +1 -8
- package/components/SVGIcons/IconArrowUpLeft.js +1 -8
- package/components/SVGIcons/IconArrowUpLeftFilled.js +1 -8
- package/components/SVGIcons/IconArrowUpRight.js +1 -8
- package/components/SVGIcons/IconArrowUpRightFilled.js +1 -8
- package/components/SVGIcons/IconAttach.js +1 -8
- package/components/SVGIcons/IconAttachFilled.js +1 -8
- package/components/SVGIcons/IconBeach.js +1 -8
- package/components/SVGIcons/IconBeachFilled.js +1 -8
- package/components/SVGIcons/IconBook.js +1 -8
- package/components/SVGIcons/IconBookFilled.js +1 -8
- package/components/SVGIcons/IconBookmark.js +1 -8
- package/components/SVGIcons/IconBookmarkFilled.js +1 -8
- package/components/SVGIcons/IconBriefcase.js +1 -8
- package/components/SVGIcons/IconBriefcaseFilled.js +1 -8
- package/components/SVGIcons/IconBudgetTransfer.js +7 -8
- package/components/SVGIcons/IconBuilding.js +7 -8
- package/components/SVGIcons/IconBuildingBank.js +1 -8
- package/components/SVGIcons/IconBuildingBankFilled.js +1 -8
- package/components/SVGIcons/IconBuildingFilled.js +1 -8
- package/components/SVGIcons/IconBulletListAdd.js +1 -8
- package/components/SVGIcons/IconBulletListAddFilled.js +1 -8
- package/components/SVGIcons/IconCalculator.js +1 -8
- package/components/SVGIcons/IconCalculatorFilled.js +1 -8
- package/components/SVGIcons/IconCalendarClock.js +1 -8
- package/components/SVGIcons/IconCalendarClockFilled.js +1 -8
- package/components/SVGIcons/IconCalendarDay.js +1 -8
- package/components/SVGIcons/IconCalendarDayFilled.js +1 -8
- package/components/SVGIcons/IconCalendarEmpty.js +1 -8
- package/components/SVGIcons/IconCalendarLeft.js +1 -8
- package/components/SVGIcons/IconCalendarLeftFilled.js +1 -8
- package/components/SVGIcons/IconCalendarRight.js +1 -8
- package/components/SVGIcons/IconCalendarRightFilled.js +1 -8
- package/components/SVGIcons/IconCall.js +1 -8
- package/components/SVGIcons/IconCallFilled.js +1 -8
- package/components/SVGIcons/IconCard.js +1 -8
- package/components/SVGIcons/IconCardFilled.js +1 -8
- package/components/SVGIcons/IconCaretDown.js +1 -8
- package/components/SVGIcons/IconCaretDownFilled.js +1 -8
- package/components/SVGIcons/IconCaretDownRight.js +1 -8
- package/components/SVGIcons/IconCaretDownRightFilled.js +1 -8
- package/components/SVGIcons/IconCaretLeft.js +1 -8
- package/components/SVGIcons/IconCaretLeftFilled.js +1 -8
- package/components/SVGIcons/IconCaretRight.js +1 -8
- package/components/SVGIcons/IconCaretRightFilled.js +1 -8
- package/components/SVGIcons/IconCaretUp.js +1 -8
- package/components/SVGIcons/IconCaretUpFilled.js +1 -8
- package/components/SVGIcons/IconChartPerson.js +1 -8
- package/components/SVGIcons/IconChartPersonFilled.js +1 -8
- package/components/SVGIcons/IconChat.js +1 -8
- package/components/SVGIcons/IconChatFilled.js +1 -8
- package/components/SVGIcons/IconChatMultiple.js +1 -8
- package/components/SVGIcons/IconChatMultipleFilled.js +1 -8
- package/components/SVGIcons/IconCheckboxArrowRight.js +1 -8
- package/components/SVGIcons/IconCheckboxArrowRightFilled.js +1 -8
- package/components/SVGIcons/IconCheckmark.js +1 -8
- package/components/SVGIcons/IconCheckmarkCircle.js +1 -8
- package/components/SVGIcons/IconCheckmarkCircleFilled.js +1 -8
- package/components/SVGIcons/IconCheckmarkFilled.js +1 -8
- package/components/SVGIcons/IconChevronDoubleLeft.js +1 -8
- package/components/SVGIcons/IconChevronDoubleRight.js +1 -8
- package/components/SVGIcons/IconChevronDown.js +1 -8
- package/components/SVGIcons/IconChevronDownFilled.js +1 -8
- package/components/SVGIcons/IconChevronLeft.js +1 -8
- package/components/SVGIcons/IconChevronLeftFilled.js +1 -8
- package/components/SVGIcons/IconChevronRight.js +1 -8
- package/components/SVGIcons/IconChevronRightFilled.js +1 -8
- package/components/SVGIcons/IconChevronUp.js +1 -8
- package/components/SVGIcons/IconChevronUpDown.js +1 -8
- package/components/SVGIcons/IconChevronUpDownFilled.js +1 -8
- package/components/SVGIcons/IconChevronUpFilled.js +1 -8
- package/components/SVGIcons/IconClipboardDay.js +1 -8
- package/components/SVGIcons/IconClock.js +1 -8
- package/components/SVGIcons/IconClockDismiss.js +1 -8
- package/components/SVGIcons/IconClockDismissFilled.js +1 -8
- package/components/SVGIcons/IconClockFilled.js +1 -8
- package/components/SVGIcons/IconComment.js +1 -8
- package/components/SVGIcons/IconCommentFilled.js +1 -8
- package/components/SVGIcons/IconContractCard.js +1 -8
- package/components/SVGIcons/IconContractCardFilled.js +1 -8
- package/components/SVGIcons/IconCopy.js +1 -8
- package/components/SVGIcons/IconCopyFilled.js +1 -8
- package/components/SVGIcons/IconCubeTree.js +1 -8
- package/components/SVGIcons/IconCubeTreeFilled.js +1 -8
- package/components/SVGIcons/IconDatabase.js +1 -8
- package/components/SVGIcons/IconDatabaseFilled.js +1 -8
- package/components/SVGIcons/IconDelete.js +1 -8
- package/components/SVGIcons/IconDeleteFilled.js +1 -8
- package/components/SVGIcons/IconDeviceMeetingRoom.js +1 -8
- package/components/SVGIcons/IconDeviceMeetingRoomFilled.js +1 -8
- package/components/SVGIcons/IconDismiss.js +1 -8
- package/components/SVGIcons/IconDismissCircle.js +1 -8
- package/components/SVGIcons/IconDismissCircleFilled.js +1 -8
- package/components/SVGIcons/IconDismissFilled.js +1 -8
- package/components/SVGIcons/IconDocument.js +1 -8
- package/components/SVGIcons/IconDocumentBulletList.js +1 -8
- package/components/SVGIcons/IconDocumentBulletListFilled.js +1 -8
- package/components/SVGIcons/IconDocumentEdit.js +1 -8
- package/components/SVGIcons/IconDocumentEditFilled.js +1 -8
- package/components/SVGIcons/IconDocumentFilled.js +1 -8
- package/components/SVGIcons/IconDocumentPerson.js +1 -8
- package/components/SVGIcons/IconEdit.js +1 -8
- package/components/SVGIcons/IconEditFilled.js +1 -8
- package/components/SVGIcons/IconErrorCircle.js +1 -8
- package/components/SVGIcons/IconErrorCircleFilled.js +1 -8
- package/components/SVGIcons/IconEur.js +1 -8
- package/components/SVGIcons/IconEurFilled.js +1 -8
- package/components/SVGIcons/IconExpandUpLeft.js +1 -8
- package/components/SVGIcons/IconExpandUpLeftFilled.js +1 -8
- package/components/SVGIcons/IconExpandUpRight.js +1 -8
- package/components/SVGIcons/IconExpandUpRightFilled.js +1 -8
- package/components/SVGIcons/IconEyeOff.js +1 -8
- package/components/SVGIcons/IconEyeOffFilled.js +1 -8
- package/components/SVGIcons/IconEyeOn.js +1 -8
- package/components/SVGIcons/IconEyeOnFilled.js +1 -8
- package/components/SVGIcons/IconFacebook.js +3 -8
- package/components/SVGIcons/IconFastAcceleration.js +1 -8
- package/components/SVGIcons/IconFastAccelerationFilled.js +1 -8
- package/components/SVGIcons/IconFeed.js +1 -8
- package/components/SVGIcons/IconFeedFilled.js +1 -8
- package/components/SVGIcons/IconFilter.js +1 -8
- package/components/SVGIcons/IconFilterFilled.js +1 -8
- package/components/SVGIcons/IconFlag.js +1 -8
- package/components/SVGIcons/IconFlagFilled.js +1 -8
- package/components/SVGIcons/IconFolderLink.js +1 -8
- package/components/SVGIcons/IconFolderLinkFilled.js +1 -8
- package/components/SVGIcons/IconFood.js +1 -8
- package/components/SVGIcons/IconFoodFilled.js +1 -8
- package/components/SVGIcons/IconGb.js +11 -8
- package/components/SVGIcons/IconGlobe.js +1 -8
- package/components/SVGIcons/IconGlobeFilled.js +1 -8
- package/components/SVGIcons/IconGoogle.js +3 -8
- package/components/SVGIcons/IconHandOpenHeart.js +1 -8
- package/components/SVGIcons/IconHandOpenHeartFilled.js +1 -8
- package/components/SVGIcons/IconHeart.js +1 -8
- package/components/SVGIcons/IconHeartFilled.js +1 -8
- package/components/SVGIcons/IconHistory.js +1 -8
- package/components/SVGIcons/IconHistoryFilled.js +1 -8
- package/components/SVGIcons/IconHome.js +1 -8
- package/components/SVGIcons/IconHomeFilled.js +1 -8
- package/components/SVGIcons/IconImage.js +1 -8
- package/components/SVGIcons/IconImageFilled.js +1 -8
- package/components/SVGIcons/IconInfo.js +1 -8
- package/components/SVGIcons/IconInfoFilled.js +1 -8
- package/components/SVGIcons/IconInstagram.js +4 -8
- package/components/SVGIcons/IconKeyReset.js +1 -8
- package/components/SVGIcons/IconKeyResetFilled.js +1 -8
- package/components/SVGIcons/IconLibrary.js +1 -8
- package/components/SVGIcons/IconLibraryFilled.js +1 -8
- package/components/SVGIcons/IconLink.js +1 -8
- package/components/SVGIcons/IconLinkFilled.js +1 -8
- package/components/SVGIcons/IconLinkedin.js +1 -8
- package/components/SVGIcons/IconList.js +1 -8
- package/components/SVGIcons/IconListFilled.js +1 -8
- package/components/SVGIcons/IconLocation.js +1 -8
- package/components/SVGIcons/IconLocationFilled.js +1 -8
- package/components/SVGIcons/IconLockClosed.js +1 -8
- package/components/SVGIcons/IconLockClosedFilled.js +1 -8
- package/components/SVGIcons/IconLockOpen.js +1 -8
- package/components/SVGIcons/IconLockOpenFilled.js +1 -8
- package/components/SVGIcons/IconMail.js +1 -8
- package/components/SVGIcons/IconMailAdd.js +1 -8
- package/components/SVGIcons/IconMailAddFilled.js +1 -8
- package/components/SVGIcons/IconMailArrowForward.js +1 -8
- package/components/SVGIcons/IconMailArrowForwardFilled.js +1 -8
- package/components/SVGIcons/IconMailFilled.js +1 -8
- package/components/SVGIcons/IconMailLink.js +1 -8
- package/components/SVGIcons/IconMailLinkFilled.js +1 -8
- package/components/SVGIcons/IconMedium.js +1 -8
- package/components/SVGIcons/IconMoon.js +1 -8
- package/components/SVGIcons/IconMore.js +1 -8
- package/components/SVGIcons/IconMoreFilled.js +1 -8
- package/components/SVGIcons/IconMoreVertical.js +1 -8
- package/components/SVGIcons/IconMoreVerticalFilled.js +1 -8
- package/components/SVGIcons/IconNavigation.js +1 -8
- package/components/SVGIcons/IconNavigationFilled.js +1 -8
- package/components/SVGIcons/IconNotebook.js +1 -8
- package/components/SVGIcons/IconNotebookAdd.js +7 -8
- package/components/SVGIcons/IconNotebookAddFilled.js +6 -8
- package/components/SVGIcons/IconNotebookFilled.js +1 -8
- package/components/SVGIcons/IconOnlyEmployee.js +1 -8
- package/components/SVGIcons/IconOpen.js +1 -8
- package/components/SVGIcons/IconOpenFilled.js +1 -8
- package/components/SVGIcons/IconPatient.js +1 -8
- package/components/SVGIcons/IconPatientFilled.js +1 -8
- package/components/SVGIcons/IconPeople.js +1 -8
- package/components/SVGIcons/IconPeopleAdd.js +1 -8
- package/components/SVGIcons/IconPeopleAddFilled.js +1 -8
- package/components/SVGIcons/IconPeopleFilled.js +1 -8
- package/components/SVGIcons/IconPeopleList.js +1 -8
- package/components/SVGIcons/IconPeopleListFilled.js +1 -8
- package/components/SVGIcons/IconPeopleTeam.js +1 -8
- package/components/SVGIcons/IconPeopleTeamFilled.js +1 -8
- package/components/SVGIcons/IconPercent.js +1 -8
- package/components/SVGIcons/IconPerson.js +1 -8
- package/components/SVGIcons/IconPersonAccount.js +1 -8
- package/components/SVGIcons/IconPersonAccountFilled.js +1 -8
- package/components/SVGIcons/IconPersonAdd.js +1 -8
- package/components/SVGIcons/IconPersonAddFilled.js +1 -8
- package/components/SVGIcons/IconPersonArrowLeft.js +1 -8
- package/components/SVGIcons/IconPersonArrowLeftFilled.js +1 -8
- package/components/SVGIcons/IconPersonArrowRight.js +1 -8
- package/components/SVGIcons/IconPersonArrowRightFilled.js +1 -8
- package/components/SVGIcons/IconPersonBoard.js +1 -8
- package/components/SVGIcons/IconPersonFilled.js +1 -8
- package/components/SVGIcons/IconPersonMinus.js +1 -8
- package/components/SVGIcons/IconPersonStar.js +1 -8
- package/components/SVGIcons/IconPersonStarFilled.js +1 -8
- package/components/SVGIcons/IconPersonSubtract.js +1 -8
- package/components/SVGIcons/IconPersonSubtractFilled.js +1 -8
- package/components/SVGIcons/IconPhone.js +1 -8
- package/components/SVGIcons/IconPhoneFilled.js +1 -8
- package/components/SVGIcons/IconPlugConnected.js +1 -8
- package/components/SVGIcons/IconPos.js +1 -8
- package/components/SVGIcons/IconPosFilled.js +1 -8
- package/components/SVGIcons/IconProhibited.js +1 -8
- package/components/SVGIcons/IconProhibitedFilled.js +1 -8
- package/components/SVGIcons/IconProjectProduct.js +1 -8
- package/components/SVGIcons/IconQuestion.js +1 -8
- package/components/SVGIcons/IconQuestionFilled.js +1 -8
- package/components/SVGIcons/IconRedo.js +1 -8
- package/components/SVGIcons/IconRedoFilled.js +1 -8
- package/components/SVGIcons/IconRibbon.js +1 -8
- package/components/SVGIcons/IconRu.js +6 -8
- package/components/SVGIcons/IconRub.js +1 -8
- package/components/SVGIcons/IconRubFilled.js +1 -8
- package/components/SVGIcons/IconSave.js +1 -8
- package/components/SVGIcons/IconSaveFilled.js +1 -8
- package/components/SVGIcons/IconSavings.js +1 -8
- package/components/SVGIcons/IconSavingsFilled.js +1 -8
- package/components/SVGIcons/IconSearch.js +1 -8
- package/components/SVGIcons/IconSearchFilled.js +1 -8
- package/components/SVGIcons/IconSelectAllOff.js +1 -8
- package/components/SVGIcons/IconSelectAllOffFilled.js +1 -8
- package/components/SVGIcons/IconSelectAllOn.js +1 -8
- package/components/SVGIcons/IconSelectAllOnFilled.js +1 -8
- package/components/SVGIcons/IconSend.js +1 -8
- package/components/SVGIcons/IconSendFilled.js +1 -8
- package/components/SVGIcons/IconSettings.js +1 -8
- package/components/SVGIcons/IconSettingsFilled.js +1 -8
- package/components/SVGIcons/IconShare.js +1 -8
- package/components/SVGIcons/IconShareAndroid.js +1 -8
- package/components/SVGIcons/IconShareAndroidFilled.js +1 -8
- package/components/SVGIcons/IconShareFilled.js +1 -8
- package/components/SVGIcons/IconSignOut.js +1 -8
- package/components/SVGIcons/IconSignOutFilled.js +1 -8
- package/components/SVGIcons/IconSpinner.js +1 -8
- package/components/SVGIcons/IconSpinnerFilled.js +1 -8
- package/components/SVGIcons/IconStatus.js +1 -8
- package/components/SVGIcons/IconStatusFilled.js +1 -8
- package/components/SVGIcons/IconSubtract.js +1 -8
- package/components/SVGIcons/IconSubtractCircle.js +1 -8
- package/components/SVGIcons/IconSubtractCircleFilled.js +1 -8
- package/components/SVGIcons/IconSubtractFilled.js +1 -8
- package/components/SVGIcons/IconSun.js +10 -8
- package/components/SVGIcons/IconTableCellEdit.js +3 -8
- package/components/SVGIcons/IconTableCellEditFilled.js +5 -8
- package/components/SVGIcons/IconTelegram.js +3 -8
- package/components/SVGIcons/IconTimer.js +1 -8
- package/components/SVGIcons/IconTimerFilled.js +1 -8
- package/components/SVGIcons/IconTrophy.js +1 -8
- package/components/SVGIcons/IconTrophyFilled.js +1 -8
- package/components/SVGIcons/IconTwitter.js +1 -8
- package/components/SVGIcons/IconUndo.js +1 -8
- package/components/SVGIcons/IconUndoFilled.js +1 -8
- package/components/SVGIcons/IconUnitsEmployee.js +1 -8
- package/components/SVGIcons/IconUpload.js +1 -8
- package/components/SVGIcons/IconUs.js +11 -8
- package/components/SVGIcons/IconUsd.js +1 -8
- package/components/SVGIcons/IconUsdFilled.js +1 -8
- package/components/SVGIcons/IconUserMinus.js +1 -8
- package/components/SVGIcons/IconVacation.js +1 -8
- package/components/SVGIcons/IconVideo.js +1 -8
- package/components/SVGIcons/IconVideoFilled.js +1 -8
- package/components/SVGIcons/IconWallet.js +1 -8
- package/components/SVGIcons/IconWalletFilled.js +1 -8
- package/components/SVGIcons/IconWarning.js +1 -8
- package/components/SVGIcons/IconWarningFilled.js +1 -8
- package/components/SVGIcons/IconYoutube.js +1 -8
- package/components/Select/ButtonSelect/ButtonSelect.js +3 -45
- package/components/Select/FilterSelect/FilterDropdown.js +3 -15
- package/components/Select/FilterSelect/FilterGroupDropdown.js +4 -19
- package/components/Select/FilterSelect/FilterSelect.js +4 -72
- package/components/Select/MultiSelect/DesktopWrapper.js +1 -19
- package/components/Select/MultiSelect/MobileWrapper.js +2 -13
- package/components/Select/MultiSelect/MultiBase/MultiBase.js +5 -121
- package/components/Select/MultiSelect/MultiSelect.js +3 -68
- package/components/Select/MultiSelect/MultiSelectGrouped/MultiSelectGrouped.js +7 -96
- package/components/Select/MultiSelect/MultiSelectWithTabs/MultiSelectWithTabs.js +7 -71
- package/components/Select/MultiSelect/OptionsWrapper.js +1 -66
- package/components/Select/NestedSelect/NestedSelect.js +4 -58
- package/components/Select/ProfileDropdown/index.js +10 -13
- package/components/Select/Select/Select.js +1 -129
- package/components/Select/Select/SelectDesktop/index.js +2 -81
- package/components/Select/Select/SelectMobile/MobileTopContent.d.ts +2 -1
- package/components/Select/Select/SelectMobile/MobileTopContent.js +2 -18
- package/components/Select/Select/SelectMobile/index.js +5 -38
- package/components/Select/Select/helpers.js +1 -20
- package/components/Select/SharedComponents/Actions.js +3 -14
- package/components/Select/SharedComponents/ButtonSelectWrapper/Button/Button.js +3 -9
- package/components/Select/SharedComponents/ButtonSelectWrapper/ButtonSelectWrapper.js +3 -29
- package/components/Select/SharedComponents/ContentTop.js +3 -73
- package/components/Select/SharedComponents/Footer.js +6 -12
- package/components/Select/SharedComponents/InputSelectWrapper/InputSelectWrapper.js +3 -52
- package/components/Select/SharedComponents/Loading.js +2 -6
- package/components/Select/SharedComponents/index.js +1 -6
- package/components/Select/constants.js +1 -7
- package/components/Select/helper.js +0 -1
- package/components/Select/index.js +1 -6
- package/components/Select/localization.js +1 -29
- package/components/Select/types.js +0 -1
- package/components/SideSheet/Footer/Footer.js +5 -15
- package/components/SideSheet/SideSheet.js +8 -58
- package/components/SideSheet/index.js +1 -1
- package/components/SideSheet/types.js +0 -1
- package/components/Snackbar/Snackbar.js +5 -30
- package/components/Snackbar/consts.js +1 -14
- package/components/Snackbar/index.js +1 -1
- package/components/Snackbar/types.js +0 -1
- package/components/Status/Status.js +4 -18
- package/components/Status/index.js +1 -1
- package/components/Status/types.js +0 -1
- package/components/Stepper/Stepper.js +2 -29
- package/components/Stepper/index.js +1 -1
- package/components/Stepper/types.js +0 -1
- package/components/Switcher/Switcher.js +5 -22
- package/components/Switcher/index.js +1 -1
- package/components/Switcher/types.js +0 -1
- package/components/Tab/Tab.js +2 -20
- package/components/Tab/TabItem.js +3 -13
- package/components/Tab/index.js +1 -1
- package/components/Tab/types.js +0 -1
- package/components/Table/Header.js +4 -34
- package/components/Table/IndeterminateCheckbox.js +1 -15
- package/components/Table/Row.js +3 -35
- package/components/Table/Table.js +6 -74
- package/components/Table/index.js +1 -1
- package/components/Table/localization.js +1 -11
- package/components/Table/types.js +0 -1
- package/components/Table/utils.js +3 -38
- package/components/TableV2/AdvancedPagination.js +12 -62
- package/components/TableV2/ColumnHeader.js +6 -32
- package/components/TableV2/ColumnSettings.js +8 -33
- package/components/TableV2/IndeterminateCheckbox.js +2 -16
- package/components/TableV2/Table.js +8 -123
- package/components/TableV2/constants/index.js +1 -27
- package/components/TableV2/hooks/useTableColumnSettings.js +1 -17
- package/components/TableV2/hooks/useTableControl.js +1 -186
- package/components/TableV2/index.js +1 -3
- package/components/TableV2/loadTableSettings.js +1 -9
- package/components/TableV2/types.js +0 -1
- package/components/Text/Text.js +2 -7
- package/components/Text/index.js +1 -1
- package/components/Text/types.js +0 -1
- package/components/Textarea/Textarea.js +6 -41
- package/components/Textarea/index.js +1 -1
- package/components/Textarea/types.js +0 -1
- package/components/Tooltip/Tooltip.js +2 -54
- package/components/Tooltip/index.js +1 -1
- package/components/Tooltip/types.js +1 -11
- package/components/UnderConstruction/UnderConstruction.js +6 -11
- package/components/UnderConstruction/index.js +1 -1
- package/components/UnderConstruction/localization.js +1 -14
- package/components/UnderConstruction/types.js +0 -1
- package/consts/index.js +1 -107
- package/context/FormContextProvider.js +1 -6
- package/context/index.js +1 -2
- package/context/types.js +1 -8
- package/helperComponents/AnimatePresenceWrapper/AnimatePresenceWrapper.js +2 -7
- package/helperComponents/AnimatePresenceWrapper/index.js +1 -1
- package/helperComponents/CodeBlock/CodeBlock.js +2 -4
- package/helperComponents/CodeBlock/index.js +1 -1
- package/helperComponents/ErrorMessage/ErrorMessage.js +3 -9
- package/helperComponents/ErrorMessage/consts.js +1 -4
- package/helperComponents/ErrorMessage/index.js +1 -1
- package/helperComponents/ErrorMessage/types.js +0 -1
- package/helperComponents/GoToWebPage/GoToWebPage.js +1 -6
- package/helperComponents/IconDynamicComponent/IconDynamicComponent.js +1 -19
- package/helperComponents/IconDynamicComponent/index.js +1 -1
- package/helperComponents/Label/Label.js +1 -9
- package/helperComponents/Label/index.js +1 -1
- package/helperComponents/Label/types.js +0 -1
- package/helperComponents/Loader/Loader.js +2 -5
- package/helperComponents/Loader/index.js +1 -1
- package/helperComponents/Loader/types.js +0 -1
- package/helperComponents/OptionItem/OptionItem.js +5 -29
- package/helperComponents/OptionItem/index.js +1 -1
- package/helperComponents/OptionItem/types.js +0 -1
- package/helpers/check-authorization.js +1 -60
- package/helpers/current-week-work-days-range.js +1 -9
- package/helpers/download-file.js +1 -8
- package/helpers/format-date.js +1 -21
- package/helpers/get-module-prefix.js +1 -4
- package/helpers/index.js +1 -8
- package/helpers/isDeepEqual.js +1 -12
- package/helpers/locale.js +1 -12
- package/helpers/logout.js +1 -8
- package/helpers/storage.js +1 -19
- package/hooks/index.js +1 -12
- package/hooks/useAnimation.js +1 -33
- package/hooks/useChangePositionsOnScroll.js +1 -30
- package/hooks/useDispatchEventOnScroll.js +1 -9
- package/hooks/useEscapeKey.js +1 -16
- package/hooks/useFieldArray.js +1 -1
- package/hooks/useFormContext.js +1 -5
- package/hooks/useFormProps.js +1 -5
- package/hooks/useGetElemPositions.js +1 -17
- package/hooks/useGetElemSizes.js +1 -14
- package/hooks/useGetHasBottomSpace.js +1 -15
- package/hooks/useGetIsMobile.js +1 -37
- package/hooks/useGetTooltipPosition.js +1 -69
- package/hooks/useGetTooltipStyles.js +1 -47
- package/hooks/useHideBodyScroll.js +1 -26
- package/hooks/useHideOnScroll.js +1 -22
- package/hooks/useOnOutsideClick.js +1 -39
- package/hooks/useScreenSize.js +1 -28
- package/package.json +1 -1
- package/type/file-upload.js +1 -6
- package/type/index.js +1 -5
- package/type/locale.js +1 -12
- package/type/notification.js +1 -7
- package/type/status-code.js +1 -7
- package/type/svg-icons.js +0 -1
- package/utils/helpers.js +1 -83
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import { IconDynamicComponent } from '../../helperComponents/IconDynamicComponent';
|
|
8
|
-
export const Alert = (props) => {
|
|
9
|
-
const { buttonProps, type = 'information', position = 'inline', text, subtext, closeIcon, onClose, className = '' } = props;
|
|
10
|
-
return (_jsx("div", { className: classnames('alert', `alert--${type} alert--${position}`, className), children: _jsxs("div", { className: "alert__content", children: [_jsx(IconDynamicComponent, { Component: ICONS_MAPPING[type], size: "small", type: TYPE_MAPPING[type] }), _jsxs("div", { className: "alert__text pl-8", children: [_jsxs("div", { children: [_jsx(Text, { type: "primary", size: "standard", weight: "regular", lineHeight: "large", children: text }), subtext ? (_jsx(Text, { className: 'mt-4', type: "secondary", size: "small", weight: "regular", lineHeight: "large", children: subtext })) : null] }), buttonProps ? (_jsxs("div", { className: "alert__actions", children: [buttonProps.confirm && (_jsx(Button, Object.assign({ size: "medium", type: "secondary" }, buttonProps.confirm))), buttonProps.cancel && (_jsx(Button, Object.assign({ size: "medium", type: "tertiary", className: "ml-12" }, buttonProps.cancel)))] })) : null] }), closeIcon ? (_jsx(IconDismissFilled, { type: TYPE_MAPPING[type], size: "xsmall", className: "ml-12 pointer", onClick: onClose })) : null] }) }));
|
|
11
|
-
};
|
|
1
|
+
import{jsx as e,jsxs as i}from"react/jsx-runtime";import{TYPE_MAPPING as s,ICONS_MAPPING as N}from"./consts.js";import h from"classnames";import{Text as n}from"../Text/Text.js";import{Button as a}from"../Button/Button.js";import u from"../SVGIcons/IconDismissFilled.js";import{IconDynamicComponent as f}from"../../helperComponents/IconDynamicComponent/IconDynamicComponent.js";const C=t=>{const{buttonProps:o,type:l="information",position:r="inline",text:m,subtext:c,closeIcon:p,onClose:d,className:y=""}=t;/* @__PURE__ */
|
|
2
|
+
return e("div",{className:h("alert",`alert--${l} alert--${r}`,y),children:/* @__PURE__ */i("div",{className:"alert__content",children:[
|
|
3
|
+
/* @__PURE__ */e(f,{Component:N[l],size:"small",type:s[l]}),
|
|
4
|
+
/* @__PURE__ */i("div",{className:"alert__text pl-8",children:[
|
|
5
|
+
/* @__PURE__ */i("div",{children:[
|
|
6
|
+
/* @__PURE__ */e(n,{type:"primary",size:"standard",weight:"regular",lineHeight:"large",children:m}),c?/* @__PURE__ */e(n,{className:"mt-4",type:"secondary",size:"small",weight:"regular",lineHeight:"large",children:c}):null]}),o?/* @__PURE__ */i("div",{className:"alert__actions",children:[o.confirm&&/* @__PURE__ */e(a,{size:"medium",type:"secondary",...o.confirm}),o.cancel&&/* @__PURE__ */e(a,{size:"medium",type:"tertiary",className:"ml-12",...o.cancel})]}):null]}),p?/* @__PURE__ */e(u,{type:s[l],size:"xsmall",className:"ml-12 pointer",onClick:d}):null]})})};export{C as Alert};
|
|
@@ -1,15 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export const TYPE_MAPPING = {
|
|
3
|
-
warning: 'warning',
|
|
4
|
-
success: 'success',
|
|
5
|
-
error: 'danger',
|
|
6
|
-
information: 'information',
|
|
7
|
-
discovery: 'discovery'
|
|
8
|
-
};
|
|
9
|
-
export const ICONS_MAPPING = {
|
|
10
|
-
warning: lazy(() => import('../SVGIcons/IconWarningFilled')),
|
|
11
|
-
success: lazy(() => import('../SVGIcons/IconCheckmarkFilled')),
|
|
12
|
-
error: lazy(() => import('../SVGIcons/IconErrorCircleFilled')),
|
|
13
|
-
information: lazy(() => import('../SVGIcons/IconInfoFilled')),
|
|
14
|
-
discovery: lazy(() => import('../SVGIcons/IconInfoFilled'))
|
|
15
|
-
};
|
|
1
|
+
import{lazy as r}from"react";const i={warning:"warning",success:"success",error:"danger",information:"information",discovery:"discovery"},n={warning:r(()=>import("../SVGIcons/IconWarningFilled.js")),success:r(()=>import("../SVGIcons/IconCheckmarkFilled.js")),error:r(()=>import("../SVGIcons/IconErrorCircleFilled.js")),information:r(()=>import("../SVGIcons/IconInfoFilled.js")),discovery:r(()=>import("../SVGIcons/IconInfoFilled.js"))};export{n as ICONS_MAPPING,i as TYPE_MAPPING};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{Alert as o}from"./Alert.js";export{o as Alert};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,24 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import classNames from 'classnames';
|
|
4
|
-
import { FileUpload, FileUploadMode } from '../FileUpload';
|
|
5
|
-
export const Avatar = ({ dataId, id, color = 'default', size = 'medium', type, imagePath = '', initials = '', className = '', isEditable = false, allowedTypes = '.png, .jpg, .jpeg, image/jpeg, image/png, image/jpg', onError, fileAllowedSize, onAvatarChange, onAvatarClick }) => {
|
|
6
|
-
const [image, setImage] = useState(imagePath);
|
|
7
|
-
const getFiles = (files) => {
|
|
8
|
-
if (files && files[0]) {
|
|
9
|
-
setImage(URL.createObjectURL(files[0]));
|
|
10
|
-
onAvatarChange === null || onAvatarChange === void 0 ? void 0 : onAvatarChange(files[0]);
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
const style = {
|
|
14
|
-
backgroundImage: image ? `url(${image})` : 'none'
|
|
15
|
-
};
|
|
16
|
-
useEffect(() => {
|
|
17
|
-
setImage(imagePath);
|
|
18
|
-
}, [imagePath]);
|
|
19
|
-
return (_jsxs("div", { id: id, "data-id": dataId, className: classNames(`avatar avatar--${color} avatar--${type} avatar--${size}`, className, {
|
|
20
|
-
'avatar--edit': isEditable
|
|
21
|
-
}), children: [_jsx("div", { className: classNames({
|
|
22
|
-
'avatar--image': image
|
|
23
|
-
}), onClick: onAvatarClick, style: style }), !image ? initials : null, isEditable && (_jsx(FileUpload, { onError: onError, fileAllowedSize: fileAllowedSize, multiple: false, withFilePreview: false, getFiles: getFiles, allowedTypes: allowedTypes, mode: FileUploadMode.edit }))] }));
|
|
24
|
-
};
|
|
1
|
+
import{jsxs as x,jsx as o}from"react/jsx-runtime";import{useState as N,useEffect as k}from"react";import s from"classnames";import{FileUpload as w}from"../FileUpload/FileUpload.js";import"../FileUpload/DropzoneFileUpload/DropzoneFileUpload.js";import{FileUploadMode as I}from"../FileUpload/types.js";const S=({dataId:a,id:e,color:l="default",size:i="medium",type:t,imagePath:r="",initials:d="",className:p="",isEditable:m=!1,allowedTypes:n=".png, .jpg, .jpeg, image/jpeg, image/png, image/jpg",onError:c,fileAllowedSize:g,onAvatarChange:v,onAvatarClick:j})=>{const[u,f]=N(r),F={backgroundImage:u?`url(${u})`:"none"};return k(()=>{f(r)},[r]),/* @__PURE__ */x("div",{id:e,"data-id":a,className:s(`avatar avatar--${l} avatar--${t} avatar--${i}`,p,{"avatar--edit":m}),children:[
|
|
2
|
+
/* @__PURE__ */o("div",{className:s({"avatar--image":u}),onClick:j,style:F}),u?null:d,m&&/* @__PURE__ */o(w,{onError:c,fileAllowedSize:g,multiple:!1,withFilePreview:!1,getFiles:a=>{a&&a[0]&&(f(URL.createObjectURL(a[0])),null==v||v(a[0]))},allowedTypes:n,mode:I.edit})]})};export{S as Avatar};
|
|
@@ -1,21 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { Positions } from '../Tooltip/types';
|
|
7
|
-
import IconAdd from '../SVGIcons/IconAdd';
|
|
8
|
-
const VISIBLE_AVATARS_AMOUNT = {
|
|
9
|
-
small: 2,
|
|
10
|
-
medium: 4,
|
|
11
|
-
large: 6
|
|
12
|
-
};
|
|
13
|
-
export const AvatarGroup = ({ avatarGroup = [], onAddUser, size = 'medium', maxCount = 0, dataId }) => {
|
|
14
|
-
const screenSize = useScreenSize();
|
|
15
|
-
const visibleAvatarsAmount = maxCount || VISIBLE_AVATARS_AMOUNT[screenSize];
|
|
16
|
-
const visibleAvatars = avatarGroup.slice(0, visibleAvatarsAmount);
|
|
17
|
-
const invisibleAvatarsAmount = avatarGroup.length - visibleAvatarsAmount > 0 ? avatarGroup.length - visibleAvatarsAmount : 0;
|
|
18
|
-
return (_jsxs("div", { className: classNames(`avatar-group avatar-group--${size}`), children: [visibleAvatars.map((avatar, index) => {
|
|
19
|
-
return (_jsxs("div", { className: 'avatar-group__item', children: [avatar.tooltipContent ? (_jsx(Tooltip, { text: avatar.tooltipContent, id: `${index}`, position: Positions.TOP_CENTER })) : null, _jsx(Avatar, { dataId: dataId, id: `${index}`, size: size, initials: avatar.initials, imagePath: avatar.imagePath })] }, index));
|
|
20
|
-
}), invisibleAvatarsAmount ? (_jsxs("div", { className: "avatar-group__item", children: [_jsx(Tooltip, { text: 'Name Surname', id: 'amountTooltip', position: Positions.TOP_CENTER }), _jsx(Avatar, { type: 'count', size: size, id: 'amountTooltip', initials: `+${invisibleAvatarsAmount}` })] })) : null, onAddUser ? (_jsx("div", { className: classNames(`avatar avatar-group__add avatar--${size}`), onClick: onAddUser, children: _jsx(IconAdd, { type: "disabled", size: size }) })) : null] }));
|
|
21
|
-
};
|
|
1
|
+
import{jsxs as n,jsx as t}from"react/jsx-runtime";import{Tooltip as s}from"../Tooltip/Tooltip.js";import{Avatar as p}from"./Avatar.js";import"react";import{Positions as c}from"../Tooltip/types.js";import"../../consts/index.js";import"../../context/types.js";import{useScreenSize as _}from"../../hooks/useScreenSize.js";import"react-hook-form";import u from"classnames";import N from"../SVGIcons/IconAdd.js";const T={small:2,medium:4,large:6},R=({avatarGroup:a=[],onAddUser:o,size:i="medium",maxCount:r=0,dataId:e})=>{const m=_(),l=r||T[m],d=a.slice(0,l),v=a.length-l>0?a.length-l:0;/* @__PURE__ */
|
|
2
|
+
return n("div",{className:u(`avatar-group avatar-group--${i}`),children:[d.map((a,o)=>/* @__PURE__ */n("div",{className:"avatar-group__item",children:[a.tooltipContent?/* @__PURE__ */t(s,{text:a.tooltipContent,id:`${o}`,position:c.TOP_CENTER}):null,
|
|
3
|
+
/* @__PURE__ */t(p,{dataId:e,id:`${o}`,size:i,initials:a.initials,imagePath:a.imagePath})]},o)),v?/* @__PURE__ */n("div",{className:"avatar-group__item",children:[
|
|
4
|
+
/* @__PURE__ */t(s,{text:"Name Surname",id:"amountTooltip",position:c.TOP_CENTER}),
|
|
5
|
+
/* @__PURE__ */t(p,{type:"count",size:i,id:"amountTooltip",initials:`+${v}`})]}):null,o?/* @__PURE__ */t("div",{className:u(`avatar avatar-group__add avatar--${i}`),onClick:o,children:/* @__PURE__ */t(N,{type:"disabled",size:i})}):null]})};export{R as AvatarGroup};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export * from './AvatarGroup';
|
|
1
|
+
import{Avatar as a}from"./Avatar.js";import{AvatarGroup as p}from"./AvatarGroup.js";export{a as Avatar,p as AvatarGroup};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import classNames from 'classnames';
|
|
4
|
-
export const Badge = (props) => {
|
|
5
|
-
const { type = 'primary', size = 'large', text, className = '' } = props;
|
|
6
|
-
return (_jsx("div", { className: classNames(`badge badge--${type} badge--${size}`, className), children: text ? (_jsx(Text, { size: "xsmall", type: type == 'secondary' ? 'primary' : 'inverse', className: "badge__inner", children: _jsx(_Fragment, { children: text }) })) : null }));
|
|
7
|
-
};
|
|
1
|
+
import{jsx as e,Fragment as t}from"react/jsx-runtime";import{Text as l}from"../Text/Text.js";import n from"classnames";const p=a=>{const{type:r="primary",size:s="large",text:m,className:i=""}=a;/* @__PURE__ */
|
|
2
|
+
return e("div",{className:n(`badge badge--${r} badge--${s}`,i),children:m?/* @__PURE__ */e(l,{size:"xsmall",type:"secondary"==r?"primary":"inverse",className:"badge__inner",children:/* @__PURE__ */e(t,{children:m})}):null})};export{p as Badge};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{Badge as r}from"./Badge.js";export{r as Badge};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,14 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { Text } from '../Text';
|
|
4
|
-
import { BadgeSize } from './types';
|
|
5
|
-
import classNames from 'classnames';
|
|
6
|
-
export const BadgeV2 = (props) => {
|
|
7
|
-
const { type = 'blue', style = 'filled', size = BadgeSize.large, text, className = '', iconProps, withDot, dot, disabled } = props;
|
|
8
|
-
const { size: iconSize = 'small', type: iconType, alignment: iconAlignment = 'left' } = iconProps !== null && iconProps !== void 0 ? iconProps : {};
|
|
9
|
-
const baseClassName = classNames(`badge-v2 badge-v2--${type} badge-v2--${style} badge-v2--${size}`, { 'badge-v2--disabled': disabled }, className);
|
|
10
|
-
if (dot) {
|
|
11
|
-
return _jsx("div", { className: classNames(baseClassName, 'badge-v2--dot') });
|
|
12
|
-
}
|
|
13
|
-
return (_jsxs("div", { className: baseClassName, children: [withDot ? (_jsx("div", { className: classNames(baseClassName, 'badge-v2--dot badge-v2--with-dot') })) : null, !withDot && iconProps && iconAlignment === 'left' ? (_jsx(iconProps.Component, { size: iconSize, type: iconType })) : null, typeof text === 'string' || typeof text === 'number' ? (_jsx(Text, { size: "xsmall", className: "badge-v2__inner", children: text })) : React.isValidElement(text) ? (text) : null, !withDot && iconProps && iconAlignment === 'right' ? (_jsx(iconProps.Component, { size: iconSize, type: iconType })) : null] }));
|
|
14
|
-
};
|
|
1
|
+
import{jsx as s,jsxs as f}from"react/jsx-runtime";import u from"react";import{Text as y}from"../Text/Text.js";import{BadgeSize as z}from"./types.js";import l from"classnames";const j=e=>{const{type:t="blue",style:a="filled",size:i=z.large,text:d,className:o="",iconProps:m,withDot:r,dot:n,disabled:p}=e,{size:g="small",type:b,alignment:c="left"}=m??{},v=l(`badge-v2 badge-v2--${t} badge-v2--${a} badge-v2--${i}`,{"badge-v2--disabled":p},o);return n?/* @__PURE__ */s("div",{className:l(v,"badge-v2--dot")}):/* @__PURE__ */f("div",{className:v,children:[r?/* @__PURE__ */s("div",{className:l(v,"badge-v2--dot badge-v2--with-dot")}):null,!r&&m&&"left"===c?/* @__PURE__ */s(m.Component,{size:g,type:b}):null,"string"==typeof d||"number"==typeof d?/* @__PURE__ */s(y,{size:"xsmall",className:"badge-v2__inner",children:d}):u.isValidElement(d)?d:null,!r&&m&&"right"===c?/* @__PURE__ */s(m.Component,{size:g,type:b}):null]})};export{j as BadgeV2};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{BadgeV2 as r}from"./BadgeV2.js";export{r as BadgeV2};
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
const { selectedValue, breadCrumbItems, className = '', onSelect } = props;
|
|
4
|
-
return (_jsx("div", { className: `breadcrumb ${className}`, children: breadCrumbItems.map((itemInfo) => {
|
|
5
|
-
return (_jsx("span", { className: "breadcrumb__item", children: _jsx("span", { className: `breadcrumb__item__inner ${selectedValue === itemInfo.value ? 'selected' : ''}`, onClick: () => onSelect(itemInfo.value), children: itemInfo.label }) }, itemInfo.value));
|
|
6
|
-
}) }));
|
|
7
|
-
};
|
|
1
|
+
import{jsx as a}from"react/jsx-runtime";const u=e=>{const{selectedValue:r,breadCrumbItems:s,className:c="",onSelect:l}=e;/* @__PURE__ */
|
|
2
|
+
return a("div",{className:`breadcrumb ${c}`,children:s.map(e=>/* @__PURE__ */a("span",{className:"breadcrumb__item",children:/* @__PURE__ */a("span",{className:"breadcrumb__item__inner "+(r===e.value?"selected":""),onClick:()=>l(e.value),children:e.label})},e.value))})};export{u as Breadcrumb};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{Breadcrumb as m}from"./Breadcrumb.js";export{m as Breadcrumb};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,31 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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";
|
|
13
|
-
import classnames from 'classnames';
|
|
14
|
-
import { Loader } from '../../helperComponents/Loader';
|
|
15
|
-
import { ICON_SIZE_MAPPING, ICON_TYPE_MAPPING, LITE_LOADER_TYPES } from './consts';
|
|
16
|
-
export const Button = (props) => {
|
|
17
|
-
const { buttonText, type = 'primary', size = 'large', className = '', iconProps, buttonActionType = 'button', disabled, pressed, isLoading, formId, dataId = '', onClick, refHandler = null, children } = props, rest = __rest(props, ["buttonText", "type", "size", "className", "iconProps", "buttonActionType", "disabled", "pressed", "isLoading", "formId", "dataId", "onClick", "refHandler", "children"]);
|
|
18
|
-
const justIcon = !buttonText && !children && iconProps !== undefined;
|
|
19
|
-
const clickHandler = (e) => {
|
|
20
|
-
if (pressed || disabled || isLoading) {
|
|
21
|
-
e.preventDefault();
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
25
|
-
};
|
|
26
|
-
return (_jsx("button", Object.assign({ ref: refHandler, "data-id": dataId, disabled: disabled, type: buttonActionType, className: classnames('btn', `btn--${type}`, `btn--${size}`, {
|
|
27
|
-
pressed: pressed,
|
|
28
|
-
'btn--icon': justIcon,
|
|
29
|
-
[`btn--icon-${(iconProps === null || iconProps === void 0 ? void 0 : iconProps.alignment) || 'left'}`]: !isLoading && !justIcon && (iconProps === null || iconProps === void 0 ? void 0 : iconProps.Component)
|
|
30
|
-
}, className), onClick: clickHandler, form: formId }, rest, { children: isLoading ? (_jsx(Loader, { size: size, type: LITE_LOADER_TYPES.indexOf(type) === -1 ? 'dark' : 'lite' })) : (_jsxs(_Fragment, { children: [(iconProps === null || iconProps === void 0 ? void 0 : iconProps.Component) ? (_jsx(iconProps.Component, { size: ICON_SIZE_MAPPING[iconProps.size || size], type: ICON_TYPE_MAPPING[iconProps.type || type], className: "btn__icon" })) : null, buttonText || children ? (_jsx("span", { className: "btn__text", children: buttonText || children })) : null] })) })));
|
|
31
|
-
};
|
|
1
|
+
import{jsx as e,jsxs as x,Fragment as C}from"react/jsx-runtime";import E from"classnames";import{Loader as T}from"../../helperComponents/Loader/Loader.js";import{LITE_LOADER_TYPES as g,ICON_TYPE_MAPPING as h,ICON_SIZE_MAPPING as A}from"./consts.js";const $=n=>{const{buttonText:t,type:s="primary",size:o="large",className:a="",iconProps:r,buttonActionType:l="button",disabled:i,pressed:d,isLoading:m,formId:p,dataId:c="",onClick:u,refHandler:b=null,children:f,..._}=n,I=!t&&!f&&void 0!==r;/* @__PURE__ */
|
|
2
|
+
return e("button",{ref:b,"data-id":c,disabled:i,type:l,className:E("btn",`btn--${s}`,`btn--${o}`,{pressed:d,"btn--icon":I,[`btn--icon-${(null==r?void 0:r.alignment)||"left"}`]:!m&&!I&&(null==r?void 0:r.Component)},a),onClick:e=>{d||i||m?e.preventDefault():null==u||u(e)},form:p,..._,children:m?/* @__PURE__ */e(T,{size:o,type:-1===g.indexOf(s)?"dark":"lite"}):/* @__PURE__ */x(C,{children:[null!=r&&r.Component?/* @__PURE__ */e(r.Component,{size:A[r.size||o],type:h[r.type||s],className:"btn__icon"}):null,t||f?/* @__PURE__ */e("span",{className:"btn__text",children:t||f}):null]})})};export{$ as Button};
|
|
@@ -1,14 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export const ICON_SIZE_MAPPING = {
|
|
3
|
-
large: 'small',
|
|
4
|
-
medium: 'small',
|
|
5
|
-
small: 'xsmall'
|
|
6
|
-
};
|
|
7
|
-
export const ICON_TYPE_MAPPING = {
|
|
8
|
-
primary: 'inverse',
|
|
9
|
-
secondary: 'secondary',
|
|
10
|
-
tertiary: 'primary',
|
|
11
|
-
danger: 'inverse',
|
|
12
|
-
text: 'information',
|
|
13
|
-
link: 'selected'
|
|
14
|
-
};
|
|
1
|
+
const r=["primary","danger"],e={large:"small",medium:"small",small:"xsmall"},a={primary:"inverse",secondary:"secondary",tertiary:"primary",danger:"inverse",text:"information",link:"selected"};export{e as ICON_SIZE_MAPPING,a as ICON_TYPE_MAPPING,r as LITE_LOADER_TYPES};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{Button as r}from"./Button.js";export{r as Button};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,16 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import classNames from 'classnames';
|
|
4
|
-
import { ButtonGroupItem } from './ButtonGroupItem';
|
|
5
|
-
export const ButtonGroup = ({ buttons, activeIndex = 0, className, type, size, disabled, onTabChange }) => {
|
|
6
|
-
const [activeItem, setActiveItem] = useState(activeIndex);
|
|
7
|
-
const handleItemClick = (index) => {
|
|
8
|
-
if (disabled || activeItem === index)
|
|
9
|
-
return;
|
|
10
|
-
setActiveItem(index);
|
|
11
|
-
onTabChange === null || onTabChange === void 0 ? void 0 : onTabChange(index);
|
|
12
|
-
};
|
|
13
|
-
return (_jsx("div", { className: classNames('button-group', className), children: buttons.map((button) => {
|
|
14
|
-
return (_jsx(ButtonGroupItem, Object.assign({}, button, { type: type, size: size, isActive: activeItem === button.id, disabled: disabled, onClick: () => handleItemClick(button.id) }), `buttonGroup_${button.id}`));
|
|
15
|
-
}) }));
|
|
16
|
-
};
|
|
1
|
+
import{jsx as i}from"react/jsx-runtime";import{useState as v}from"react";import I from"classnames";import{ButtonGroupItem as G}from"./ButtonGroupItem.js";const N=({buttons:t,activeIndex:o=0,className:e,type:s,size:r,disabled:a,onTabChange:n})=>{const[m,u]=v(o);/* @__PURE__ */
|
|
2
|
+
return i("div",{className:I("button-group",e),children:t.map(t=>/* @__PURE__ */i(G,{...t,type:s,size:r,isActive:m===t.id,disabled:a,onClick:()=>(t=>{a||m===t||(u(t),null==n||n(t))})(t.id)},`buttonGroup_${t.id}`))})};export{N as ButtonGroup};
|
|
@@ -1,23 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import classNames from 'classnames';
|
|
5
|
-
import { ICON_SIZE_MAPPING, TEXT_SIZE_MAPPING } from './consts';
|
|
6
|
-
export const ButtonGroupItem = ({ buttonText, size = 'medium', type = 'primary', isActive, disabled, onClick, className, icons }) => {
|
|
7
|
-
var _a, _b;
|
|
8
|
-
const onClickHandler = (event) => {
|
|
9
|
-
event.preventDefault();
|
|
10
|
-
event.stopPropagation();
|
|
11
|
-
onClick === null || onClick === void 0 ? void 0 : onClick();
|
|
12
|
-
};
|
|
13
|
-
const iconType = useMemo(() => {
|
|
14
|
-
if (disabled) {
|
|
15
|
-
return 'disabled';
|
|
16
|
-
}
|
|
17
|
-
if (isActive) {
|
|
18
|
-
return 'primary';
|
|
19
|
-
}
|
|
20
|
-
return 'tertiary';
|
|
21
|
-
}, [disabled, isActive]);
|
|
22
|
-
return (_jsxs("div", { className: classNames('button-group-item', `button-group-item__${type}`, `button-group-item__${size}`, { active: isActive, disabled }, className), onClick: onClickHandler, children: [((_a = icons === null || icons === void 0 ? void 0 : icons.left) === null || _a === void 0 ? void 0 : _a.Component) ? (_jsx(icons.left.Component, { size: ICON_SIZE_MAPPING[size], type: iconType })) : null, _jsx(Text, { size: TEXT_SIZE_MAPPING[size], type: iconType, children: buttonText }), ((_b = icons === null || icons === void 0 ? void 0 : icons.right) === null || _b === void 0 ? void 0 : _b.Component) ? (_jsx(icons.right.Component, { size: ICON_SIZE_MAPPING[size], type: iconType })) : null] }));
|
|
23
|
-
};
|
|
1
|
+
import{jsxs as N,jsx as u}from"react/jsx-runtime";import{useMemo as P}from"react";import{Text as h}from"../Text/Text.js";import i from"classnames";import{ICON_SIZE_MAPPING as l,TEXT_SIZE_MAPPING as x}from"./consts.js";const M=({buttonText:t,size:e="medium",type:o="primary",isActive:s,disabled:n,onClick:r,className:m,icons:a})=>{var p,c;const d=P(()=>n?"disabled":s?"primary":"tertiary",[n,s]);/* @__PURE__ */
|
|
2
|
+
return N("div",{className:i("button-group-item",`button-group-item__${o}`,`button-group-item__${e}`,{active:s,disabled:n},m),onClick:t=>{t.preventDefault(),t.stopPropagation(),null==r||r()},children:[null!=(p=null==a?void 0:a.left)&&p.Component?/* @__PURE__ */u(a.left.Component,{size:l[e],type:d}):null,
|
|
3
|
+
/* @__PURE__ */u(h,{size:x[e],type:d,children:t}),null!=(c=null==a?void 0:a.right)&&c.Component?/* @__PURE__ */u(a.right.Component,{size:l[e],type:d}):null]})};export{M as ButtonGroupItem};
|
|
@@ -1,10 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
large: 'standard',
|
|
3
|
-
medium: 'standard',
|
|
4
|
-
small: 'small'
|
|
5
|
-
};
|
|
6
|
-
export const ICON_SIZE_MAPPING = {
|
|
7
|
-
large: 'small',
|
|
8
|
-
medium: 'small',
|
|
9
|
-
small: 'xsmall'
|
|
10
|
-
};
|
|
1
|
+
const l={large:"standard",medium:"standard",small:"small"},a={large:"small",medium:"small",small:"xsmall"};export{a as ICON_SIZE_MAPPING,l as TEXT_SIZE_MAPPING};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{ButtonGroup as t}from"./ButtonGroup.js";export{t as ButtonGroup};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/components/Card/Card.js
CHANGED
|
@@ -1,30 +1 @@
|
|
|
1
|
-
|
|
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 } from "react/jsx-runtime";
|
|
13
|
-
import { useEffect, useState } from 'react';
|
|
14
|
-
import { CardContext } from './CardContext';
|
|
15
|
-
import { Card as _Card } from './CardComponent/Card';
|
|
16
|
-
import { CardHead } from './CardComponent/CardHead';
|
|
17
|
-
import { CardBody } from './CardComponent/CardBody';
|
|
18
|
-
import { CardFooter } from './CardComponent/CardFooter';
|
|
19
|
-
import { noop } from '../../utils/helpers';
|
|
20
|
-
const CardComponent = (_a) => {
|
|
21
|
-
var { children, isExpanded, isExpandedFromParent } = _a, rest = __rest(_a, ["children", "isExpanded", "isExpandedFromParent"]);
|
|
22
|
-
const [isCardExpanded, toggleIsExpanded] = useState(isExpanded !== null && isExpanded !== void 0 ? isExpanded : false);
|
|
23
|
-
useEffect(() => typeof isExpandedFromParent === 'boolean' ? toggleIsExpanded(isExpandedFromParent) : noop, [isExpandedFromParent]);
|
|
24
|
-
return (_jsx(CardContext.Provider, { value: Object.assign(Object.assign({}, rest), { isExpanded: isCardExpanded, toggleIsExpanded }), children: _jsx(_Card, { children: children }) }));
|
|
25
|
-
};
|
|
26
|
-
export const Card = Object.assign(CardComponent, {
|
|
27
|
-
Head: CardHead,
|
|
28
|
-
Body: CardBody,
|
|
29
|
-
Footer: CardFooter
|
|
30
|
-
});
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{useState as p,useEffect as f}from"react";import{CardContext as i}from"./CardContext.js";import{Card as s}from"./CardComponent/Card.js";import{CardHead as C}from"./CardComponent/CardHead.js";import{CardBody as n}from"./CardComponent/CardBody.js";import{CardFooter as c}from"./CardComponent/CardFooter.js";import{noop as l}from"../../utils/helpers.js";const u=({children:r,isExpanded:o,isExpandedFromParent:a,...e})=>{const[d,n]=p(o??!1);return f(()=>"boolean"==typeof a?n(a):l,[a]),/* @__PURE__ */t(i.Provider,{value:{...e,isExpanded:d,toggleIsExpanded:n},children:/* @__PURE__ */t(s,{children:r})})},H=Object.assign(u,{Head:C,Body:n,Footer:c});export{H as Card};
|
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { generateDataTestId } from '../../../utils/helpers';
|
|
5
|
-
export const Card = ({ children }) => {
|
|
6
|
-
const { isExpanded, className, title, dataId, id, noBorder } = useCardContext();
|
|
7
|
-
const { alignment, color, text } = title !== null && title !== void 0 ? title : { alignment: 'left', color: 'blue' };
|
|
8
|
-
return (_jsxs("div", { className: classNames('card', {
|
|
9
|
-
'card--expanded': isExpanded,
|
|
10
|
-
[`card--title--alignment--${alignment}`]: title,
|
|
11
|
-
'card--noBorder': noBorder
|
|
12
|
-
}, className), id: `${id || ''}`, "data-id": generateDataTestId('card-item', dataId), children: [title && (_jsx("div", { className: classNames('card__title', { [`card__title--${color}`]: color }), children: text })), _jsx("div", { className: "card__content", children: children })] }));
|
|
13
|
-
};
|
|
1
|
+
import{jsxs as p,jsx as e}from"react/jsx-runtime";import r from"classnames";import{useCardContext as x}from"../CardContext.js";import{generateDataTestId as _}from"../../../utils/helpers.js";const v=({children:a})=>{const{isExpanded:t,className:d,title:s,dataId:i,id:n,noBorder:c}=x(),{alignment:l,color:o,text:m}=s??{alignment:"left",color:"blue"};/* @__PURE__ */
|
|
2
|
+
return p("div",{className:r("card",{"card--expanded":t,[`card--title--alignment--${l}`]:s,"card--noBorder":c},d),id:`${n||""}`,"data-id":_("card-item",i),children:[s&&/* @__PURE__ */e("div",{className:r("card__title",{[`card__title--${o}`]:o}),children:m}),
|
|
3
|
+
/* @__PURE__ */e("div",{className:"card__content",children:a})]})};export{v as Card};
|
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { useCardContext } from '../CardContext';
|
|
4
|
-
import { Divider } from '../../Divider';
|
|
5
|
-
import { AnimatePresenceWrapper } from '../../../helperComponents/AnimatePresenceWrapper';
|
|
6
|
-
export const CardBody = ({ children }) => {
|
|
7
|
-
const { isExpanded, noDivider } = useCardContext();
|
|
8
|
-
return (_jsx(AnimatePresenceWrapper, { initial: false, children: isExpanded && (_jsx(motion.div, { initial: { height: 0 }, animate: { height: 'auto' }, exit: { height: 0 }, transition: { type: 'spring', duration: 0.5, bounce: 0 }, children: _jsxs("div", { className: "card__content--body", children: [!noDivider && _jsx(Divider, { type: "primary", isHorizontal: true, className: "card__divider" }), children] }) })) }));
|
|
9
|
-
};
|
|
1
|
+
import{jsx as i,jsxs as o}from"react/jsx-runtime";import{motion as n}from"motion/react";import{useCardContext as a}from"../CardContext.js";import{Divider as d}from"../../Divider/Divider.js";import{AnimatePresenceWrapper as m}from"../../../helperComponents/AnimatePresenceWrapper/AnimatePresenceWrapper.js";const f=({children:e})=>{const{isExpanded:r,noDivider:t}=a();/* @__PURE__ */
|
|
2
|
+
return i(m,{initial:!1,children:r&&/* @__PURE__ */i(n.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{type:"spring",duration:.5,bounce:0},children:/* @__PURE__ */o("div",{className:"card__content--body",children:[!t&&/* @__PURE__ */i(d,{type:"primary",isHorizontal:!0,className:"card__divider"}),e]})})})};export{f as CardBody};
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useCardContext } from '../CardContext';
|
|
3
|
-
export const CardFooter = ({ children }) => {
|
|
4
|
-
const { isExpanded } = useCardContext();
|
|
5
|
-
return !isExpanded && _jsx("div", { className: "card__content--footer", children: children });
|
|
6
|
-
};
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{useCardContext as e}from"../CardContext.js";const a=({children:r})=>{const{isExpanded:o}=e();return!o&&/* @__PURE__ */t("div",{className:"card__content--footer",children:r})};export{a as CardFooter};
|
|
@@ -1,23 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { useCardContext } from '../CardContext';
|
|
4
|
-
import classNames from 'classnames';
|
|
5
|
-
import { noop } from '../../../utils/helpers';
|
|
6
|
-
import { Button } from '../../Button';
|
|
7
|
-
import IconChevronDown from '../../SVGIcons/IconChevronDown';
|
|
8
|
-
import IconChevronRight from '../../SVGIcons/IconChevronRight';
|
|
9
|
-
export const CardHead = ({ children }) => {
|
|
10
|
-
const { toggleIsExpanded, onExpand, isExpandable, isExpanded } = useCardContext();
|
|
11
|
-
const onToggleExpand = useCallback(() => {
|
|
12
|
-
toggleIsExpanded &&
|
|
13
|
-
toggleIsExpanded((prevVal) => {
|
|
14
|
-
onExpand && onExpand(!prevVal);
|
|
15
|
-
return !prevVal;
|
|
16
|
-
});
|
|
17
|
-
}, []);
|
|
18
|
-
return (_jsxs("div", { className: classNames('card__content--header', {
|
|
19
|
-
'card__content--header--expandable': isExpandable
|
|
20
|
-
}), onClick: isExpandable ? onToggleExpand : noop, children: [children, isExpandable && (_jsx("div", { className: "card__content--header--expand", children: _jsx(Button, { iconProps: {
|
|
21
|
-
Component: isExpanded ? IconChevronDown : IconChevronRight
|
|
22
|
-
}, className: classNames({ 'card__content--header--expand--icon': isExpanded }), type: "tertiary", size: "medium" }) }))] }));
|
|
23
|
-
};
|
|
1
|
+
import{jsxs as s,jsx as a}from"react/jsx-runtime";import{useCallback as i}from"react";import{useCardContext as p}from"../CardContext.js";import d from"classnames";import{noop as l}from"../../../utils/helpers.js";import{Button as x}from"../../Button/Button.js";import h from"../../SVGIcons/IconChevronDown.js";import f from"../../SVGIcons/IconChevronRight.js";const I=({children:e})=>{const{toggleIsExpanded:o,onExpand:n,isExpandable:r,isExpanded:t}=p(),c=i(()=>{o&&o(e=>(n&&n(!e),!e))},[]);/* @__PURE__ */
|
|
2
|
+
return s("div",{className:d("card__content--header",{"card__content--header--expandable":r}),onClick:r?c:l,children:[e,r&&/* @__PURE__ */a("div",{className:"card__content--header--expand",children:/* @__PURE__ */a(x,{iconProps:{Component:t?h:f},className:d({"card__content--header--expand--icon":t}),type:"tertiary",size:"medium"})})]})};export{I as CardHead};
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export const CardContext = createContext({
|
|
3
|
-
isExpanded: false,
|
|
4
|
-
isExpandable: true
|
|
5
|
-
});
|
|
6
|
-
export const useCardContext = () => useContext(CardContext);
|
|
1
|
+
import{createContext as t,useContext as e}from"react";const o=t({isExpanded:!1,isExpandable:!0}),a=()=>e(o);export{o as CardContext,a as useCardContext};
|
package/components/Card/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{Card as a}from"./Card.js";export{a as Card};
|
package/components/Card/types.js
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,24 +1 @@
|
|
|
1
|
-
|
|
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 } from "react/jsx-runtime";
|
|
13
|
-
import { CardGroupContext } from './CardGroupContext';
|
|
14
|
-
import { CardGroup as _CardGroup } from './CardGroupComponent/CardGroup';
|
|
15
|
-
import { CardGroupHead } from './CardGroupComponent/CardHead';
|
|
16
|
-
import { CardGroupBody } from './CardGroupComponent/CardBody';
|
|
17
|
-
const CardComponent = (_a) => {
|
|
18
|
-
var { children } = _a, rest = __rest(_a, ["children"]);
|
|
19
|
-
return (_jsx(CardGroupContext.Provider, { value: Object.assign({}, rest), children: _jsx(_CardGroup, { children: children }) }));
|
|
20
|
-
};
|
|
21
|
-
export const CardGroup = Object.assign(CardComponent, {
|
|
22
|
-
Head: CardGroupHead,
|
|
23
|
-
Body: CardGroupBody
|
|
24
|
-
});
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{CardGroupContext as p}from"./CardGroupContext.js";import{CardGroup as t}from"./CardGroupComponent/CardGroup.js";import{CardGroupHead as a}from"./CardGroupComponent/CardHead.js";import{CardGroupBody as m}from"./CardGroupComponent/CardBody.js";const e=({children:o,...a})=>/* @__PURE__ */r(p.Provider,{value:{...a},children:/* @__PURE__ */r(t,{children:o})}),G=Object.assign(e,{Head:a,Body:m});export{G as CardGroup};
|
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export const CardGroupBody = ({ children }) => {
|
|
4
|
-
const isChildrenArray = useMemo(() => Array.isArray(children), [children]);
|
|
5
|
-
const componentKey = useId();
|
|
6
|
-
return (_jsxs("div", { className: "card--group__content--body", children: [isChildrenArray &&
|
|
7
|
-
(children === null || children === void 0 ? void 0 : children.map((child, id) => (_jsx("div", { className: "card--group__child", children: child }, `${componentKey}_${id}`)))), !isChildrenArray && children] }));
|
|
8
|
-
};
|
|
1
|
+
import{jsxs as m,jsx as p}from"react/jsx-runtime";import{useMemo as e,useId as u}from"react";const d=({children:r})=>{const s=e(()=>Array.isArray(r),[r]),a=u();/* @__PURE__ */
|
|
2
|
+
return m("div",{className:"card--group__content--body",children:[s&&(null==r?void 0:r.map((r,s)=>/* @__PURE__ */p("div",{className:"card--group__child",children:r},`${a}_${s}`))),!s&&r]})};export{d as CardGroupBody};
|
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { generateDataTestId } from '../../../utils/helpers';
|
|
4
|
-
import { useCardGroupContext } from '../CardGroupContext';
|
|
5
|
-
export const CardGroup = ({ children }) => {
|
|
6
|
-
const { className, title, dataId, id } = useCardGroupContext();
|
|
7
|
-
const { alignment } = title !== null && title !== void 0 ? title : { alignment: 'left' };
|
|
8
|
-
return (_jsx("div", { className: classNames('card--group', { [`card--group--title--alignment--${alignment}`]: title }, className), id: `${id || ''}`, "data-id": generateDataTestId('card--group-item', dataId), children: _jsx("div", { className: "card--group__content", children: children }) }));
|
|
9
|
-
};
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import m from"classnames";import{generateDataTestId as n}from"../../../utils/helpers.js";import{useCardGroupContext as s}from"../CardGroupContext.js";const u=({children:t})=>{const{className:a,title:e,dataId:o,id:i}=s(),{alignment:d}=e??{alignment:"left"};/* @__PURE__ */
|
|
2
|
+
return r("div",{className:m("card--group",{[`card--group--title--alignment--${d}`]:e},a),id:`${i||""}`,"data-id":n("card--group-item",o),children:/* @__PURE__ */r("div",{className:"card--group__content",children:t})})};export{u as CardGroup};
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export const CardGroupHead = ({ children }) => {
|
|
5
|
-
const { title } = useCardGroupContext();
|
|
6
|
-
return (_jsxs("div", { className: "card--group__content--header", children: [title && (_jsx("div", { className: classNames('card--group__title', {
|
|
7
|
-
[`card--group__title--${title.color}`]: title.color
|
|
8
|
-
}), children: title.text })), _jsx("div", { className: "card--group__content--header--component", children: children })] }));
|
|
9
|
-
};
|
|
1
|
+
import{jsxs as t,jsx as o}from"react/jsx-runtime";import{useCardGroupContext as a}from"../CardGroupContext.js";import c from"classnames";const i=({children:r})=>{const{title:e}=a();/* @__PURE__ */
|
|
2
|
+
return t("div",{className:"card--group__content--header",children:[e&&/* @__PURE__ */o("div",{className:c("card--group__title",{[`card--group__title--${e.color}`]:e.color}),children:e.text}),
|
|
3
|
+
/* @__PURE__ */o("div",{className:"card--group__content--header--component",children:r})]})};export{i as CardGroupHead};
|
|
@@ -1,3 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export const CardGroupContext = createContext({});
|
|
3
|
-
export const useCardGroupContext = () => useContext(CardGroupContext);
|
|
1
|
+
import{createContext as t,useContext as o}from"react";const e=t({}),n=()=>o(e);export{e as CardGroupContext,n as useCardGroupContext};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{CardGroup as p}from"./CardGroup.js";export{p as CardGroup};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|