hrm_ui_lib 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.babelrc +4 -0
- package/.eslintignore +5 -0
- package/.eslintrc.yml +43 -0
- package/.github/workflows/main.yml +71 -0
- package/.prettierrc +9 -0
- package/.releaserc +21 -0
- package/.storybook/main.ts +36 -0
- package/.storybook/preview-head.html +3 -0
- package/.storybook/preview.ts +7 -0
- package/.vscode/settings.json +16 -0
- package/CHANGELOG.md +0 -0
- package/bin/generate_svg_component.js +112 -0
- package/bin/import_all_svg_components.js +29 -0
- package/commitlint.config.js +3 -0
- package/package.json +143 -0
- package/rollup.config.js +149 -0
- package/slack-notification.yml +38 -0
- package/src/assets/images/ArCa.svg +3 -0
- package/src/assets/images/Avatar.png +0 -0
- package/src/assets/images/Mastercard.svg +5 -0
- package/src/assets/images/Visa.svg +3 -0
- package/src/assets/images/avatar.jpg +0 -0
- package/src/assets/images/cards-img.png +0 -0
- package/src/assets/images/illustrations.svg +15 -0
- package/src/assets/images/image-placeholder.png +0 -0
- package/src/assets/images/logo-closed.svg +8 -0
- package/src/assets/images/logo.svg +14 -0
- package/src/assets/images/no-result.svg +35 -0
- package/src/assets/styles/components/_alert.scss +85 -0
- package/src/assets/styles/components/_avatar.scss +268 -0
- package/src/assets/styles/components/_badge.scss +52 -0
- package/src/assets/styles/components/_breadcrumb.scss +43 -0
- package/src/assets/styles/components/_button-icon.scss +73 -0
- package/src/assets/styles/components/_button.scss +423 -0
- package/src/assets/styles/components/_card-body.scss +25 -0
- package/src/assets/styles/components/_card-item.scss +35 -0
- package/src/assets/styles/components/_card-select.scss +96 -0
- package/src/assets/styles/components/_chips.scss +267 -0
- package/src/assets/styles/components/_collapse.scss +62 -0
- package/src/assets/styles/components/_controllers.scss +333 -0
- package/src/assets/styles/components/_copy.scss +3 -0
- package/src/assets/styles/components/_counter.scss +15 -0
- package/src/assets/styles/components/_date-picker.scss +781 -0
- package/src/assets/styles/components/_divider.scss +28 -0
- package/src/assets/styles/components/_empty.scss +41 -0
- package/src/assets/styles/components/_error-message.scss +7 -0
- package/src/assets/styles/components/_file-upload.scss +89 -0
- package/src/assets/styles/components/_form-container.scss +7 -0
- package/src/assets/styles/components/_image.scss +15 -0
- package/src/assets/styles/components/_input.scss +225 -0
- package/src/assets/styles/components/_item-select.scss +115 -0
- package/src/assets/styles/components/_link.scss +27 -0
- package/src/assets/styles/components/_loader.scss +108 -0
- package/src/assets/styles/components/_modal.scss +178 -0
- package/src/assets/styles/components/_more.scss +4 -0
- package/src/assets/styles/components/_nested-menu.scss +46 -0
- package/src/assets/styles/components/_pagination.scss +130 -0
- package/src/assets/styles/components/_popover.scss +112 -0
- package/src/assets/styles/components/_progres-stepper.scss +263 -0
- package/src/assets/styles/components/_progress.scss +124 -0
- package/src/assets/styles/components/_radio-group.scss +60 -0
- package/src/assets/styles/components/_select.scss +287 -0
- package/src/assets/styles/components/_side-navigation.scss +224 -0
- package/src/assets/styles/components/_side-sheet.scss +113 -0
- package/src/assets/styles/components/_snackbar.scss +57 -0
- package/src/assets/styles/components/_status.scss +60 -0
- package/src/assets/styles/components/_svg-icons.scss +54 -0
- package/src/assets/styles/components/_switcher.scss +17 -0
- package/src/assets/styles/components/_tab.scss +203 -0
- package/src/assets/styles/components/_table.scss +99 -0
- package/src/assets/styles/components/_textarea.scss +122 -0
- package/src/assets/styles/components/_tooltip.scss +117 -0
- package/src/assets/styles/helpers/_classname.scss +606 -0
- package/src/assets/styles/helpers/_mixin.scss +718 -0
- package/src/assets/styles/helpers/_reset.scss +369 -0
- package/src/assets/styles/index.scss +59 -0
- package/src/assets/styles/tokens/_borders.scss +48 -0
- package/src/assets/styles/tokens/_colors.scss +208 -0
- package/src/assets/styles/tokens/_fonts.scss +107 -0
- package/src/assets/styles/tokens/_overlays.scss +36 -0
- package/src/assets/styles/tokens/_shadows.scss +53 -0
- package/src/assets/styles/tokens/_sizes.scss +58 -0
- package/src/assets/styles/tokens/_spaces.scss +54 -0
- package/src/components/Alert/Alert.tsx +69 -0
- package/src/components/Alert/consts.ts +17 -0
- package/src/components/Alert/index.ts +1 -0
- package/src/components/Alert/types.ts +18 -0
- package/src/components/Avatar/Avatar.tsx +60 -0
- package/src/components/Avatar/AvatarGroup.tsx +73 -0
- package/src/components/Avatar/index.ts +2 -0
- package/src/components/Avatar/types.ts +27 -0
- package/src/components/Badge/Badge.tsx +22 -0
- package/src/components/Badge/index.ts +1 -0
- package/src/components/Badge/types.ts +6 -0
- package/src/components/Breadcrumb/Breadcrumb.tsx +25 -0
- package/src/components/Breadcrumb/index.ts +1 -0
- package/src/components/Breadcrumb/types.ts +11 -0
- package/src/components/Button/Button.tsx +67 -0
- package/src/components/Button/consts.ts +18 -0
- package/src/components/Button/index.ts +1 -0
- package/src/components/Button/types.ts +24 -0
- package/src/components/ButtonIcon/ButtonIcon.tsx +39 -0
- package/src/components/ButtonIcon/index.ts +1 -0
- package/src/components/ButtonIcon/types.ts +18 -0
- package/src/components/CardBody/CardBody.tsx +28 -0
- package/src/components/CardBody/index.ts +1 -0
- package/src/components/CardBody/types.ts +12 -0
- package/src/components/CardSelect/CardSelect.tsx +73 -0
- package/src/components/CardSelect/CardSelectGroup.tsx +49 -0
- package/src/components/CardSelect/components/CardAdditionalInfo.tsx +34 -0
- package/src/components/CardSelect/components/CardChips.tsx +25 -0
- package/src/components/CardSelect/components/CardDescription.tsx +15 -0
- package/src/components/CardSelect/components/CardInput.tsx +12 -0
- package/src/components/CardSelect/components/index.ts +4 -0
- package/src/components/CardSelect/index.ts +2 -0
- package/src/components/CardSelect/types.ts +39 -0
- package/src/components/Cards/CardItem.tsx +45 -0
- package/src/components/Cards/index.tsx +1 -0
- package/src/components/Cards/types.ts +15 -0
- package/src/components/Checkbox/Checkbox.tsx +139 -0
- package/src/components/Checkbox/index.ts +1 -0
- package/src/components/Checkbox/types.ts +19 -0
- package/src/components/Chips/Chips.tsx +70 -0
- package/src/components/Chips/consts.ts +15 -0
- package/src/components/Chips/index.ts +1 -0
- package/src/components/Chips/types.ts +30 -0
- package/src/components/Collapse/CollapseGroup/CollapseGroup.tsx +50 -0
- package/src/components/Collapse/CollapseItem/CollapseItem.tsx +86 -0
- package/src/components/Collapse/index.ts +2 -0
- package/src/components/Collapse/types.ts +43 -0
- package/src/components/Container/Container.tsx +8 -0
- package/src/components/Container/index.ts +1 -0
- package/src/components/Container/types.ts +5 -0
- package/src/components/Copy/Copy.tsx +38 -0
- package/src/components/Copy/index.ts +1 -0
- package/src/components/Copy/types.ts +6 -0
- package/src/components/Counter/Counter.tsx +82 -0
- package/src/components/Counter/index.ts +1 -0
- package/src/components/Counter/types.ts +9 -0
- package/src/components/DatePicker/CustomHeader/CustomHeader.tsx +87 -0
- package/src/components/DatePicker/CustomHeader/styles.scss +21 -0
- package/src/components/DatePicker/RangeDatePicker.tsx +126 -0
- package/src/components/DatePicker/SimpleDatePicker.tsx +105 -0
- package/src/components/DatePicker/TimePicker.tsx +85 -0
- package/src/components/DatePicker/hooks.ts +30 -0
- package/src/components/DatePicker/index.ts +3 -0
- package/src/components/DatePicker/types.ts +50 -0
- package/src/components/Divider/Divider.tsx +20 -0
- package/src/components/Divider/index.ts +1 -0
- package/src/components/Divider/types.ts +5 -0
- package/src/components/Empty/Empty.tsx +42 -0
- package/src/components/Empty/index.ts +1 -0
- package/src/components/Empty/types.ts +10 -0
- package/src/components/FileUpload/FileUpload.tsx +159 -0
- package/src/components/FileUpload/UploadItems.tsx +60 -0
- package/src/components/FileUpload/index.ts +2 -0
- package/src/components/FileUpload/types.ts +37 -0
- package/src/components/FormContainer/FormContainer.tsx +93 -0
- package/src/components/FormContainer/index.ts +1 -0
- package/src/components/FormContainer/types.ts +21 -0
- package/src/components/FormField/FormField.tsx +70 -0
- package/src/components/FormField/index.ts +1 -0
- package/src/components/FormField/types.ts +8 -0
- package/src/components/Heading/Heading.tsx +33 -0
- package/src/components/Heading/index.ts +1 -0
- package/src/components/Heading/types.ts +12 -0
- package/src/components/Image/Image.tsx +37 -0
- package/src/components/Image/index.ts +1 -0
- package/src/components/Image/types.ts +10 -0
- package/src/components/Input/Input.tsx +209 -0
- package/src/components/Input/index.ts +1 -0
- package/src/components/Input/types.ts +46 -0
- package/src/components/ItemSelect/ItemSelect.tsx +74 -0
- package/src/components/ItemSelect/ItemSelectGroup.tsx +35 -0
- package/src/components/ItemSelect/index.ts +2 -0
- package/src/components/ItemSelect/types.ts +23 -0
- package/src/components/Link/Link.tsx +51 -0
- package/src/components/Link/index.ts +1 -0
- package/src/components/Link/types.ts +10 -0
- package/src/components/Menu/Menu.tsx +99 -0
- package/src/components/Menu/NestedMenu.tsx +97 -0
- package/src/components/Menu/index.ts +2 -0
- package/src/components/Menu/types.ts +37 -0
- package/src/components/Modal/Modal.tsx +132 -0
- package/src/components/Modal/ModalConfirmation.tsx +108 -0
- package/src/components/Modal/index.ts +2 -0
- package/src/components/Modal/types.ts +41 -0
- package/src/components/More/More.tsx +38 -0
- package/src/components/More/index.ts +1 -0
- package/src/components/More/types.ts +11 -0
- package/src/components/Pagination/Pagination.tsx +50 -0
- package/src/components/Pagination/consts.ts +9 -0
- package/src/components/Pagination/index.ts +1 -0
- package/src/components/Pagination/types.ts +16 -0
- package/src/components/Popover/Popover.tsx +89 -0
- package/src/components/Popover/index.ts +1 -0
- package/src/components/Popover/types.ts +22 -0
- package/src/components/Progress/Progress.tsx +67 -0
- package/src/components/Progress/index.ts +1 -0
- package/src/components/Progress/types.ts +11 -0
- package/src/components/ProgressStep/ProgressStep.tsx +36 -0
- package/src/components/ProgressStep/Step.tsx +96 -0
- package/src/components/ProgressStep/consts.ts +6 -0
- package/src/components/ProgressStep/index.ts +1 -0
- package/src/components/ProgressStep/types.ts +34 -0
- package/src/components/Radio/Radio.tsx +64 -0
- package/src/components/Radio/RadioGroup.tsx +74 -0
- package/src/components/Radio/index.ts +2 -0
- package/src/components/Radio/types.ts +31 -0
- package/src/components/SVGIcons/IconAdd.tsx +35 -0
- package/src/components/SVGIcons/IconAddCircle.tsx +38 -0
- package/src/components/SVGIcons/IconAddCircleFilled.tsx +38 -0
- package/src/components/SVGIcons/IconAddFilled.tsx +35 -0
- package/src/components/SVGIcons/IconAlert.tsx +38 -0
- package/src/components/SVGIcons/IconAlertBadge.tsx +38 -0
- package/src/components/SVGIcons/IconAlertBadgeFilled.tsx +38 -0
- package/src/components/SVGIcons/IconAlertFilled.tsx +38 -0
- package/src/components/SVGIcons/IconAm.tsx +46 -0
- package/src/components/SVGIcons/IconAmd.tsx +35 -0
- package/src/components/SVGIcons/IconAmdFilled.tsx +35 -0
- package/src/components/SVGIcons/IconApple.tsx +38 -0
- package/src/components/SVGIcons/IconArrowDown.tsx +38 -0
- package/src/components/SVGIcons/IconArrowDownFilled.tsx +38 -0
- package/src/components/SVGIcons/IconArrowDownLeft.tsx +38 -0
- package/src/components/SVGIcons/IconArrowDownLeftFilled.tsx +38 -0
- package/src/components/SVGIcons/IconArrowDownload.tsx +38 -0
- package/src/components/SVGIcons/IconArrowDownloadFilled.tsx +38 -0
- package/src/components/SVGIcons/IconArrowEnter.tsx +35 -0
- package/src/components/SVGIcons/IconArrowEnterFilled.tsx +35 -0
- package/src/components/SVGIcons/IconArrowExit.tsx +35 -0
- package/src/components/SVGIcons/IconArrowExitFilled.tsx +35 -0
- package/src/components/SVGIcons/IconArrowExportLeftToRight.tsx +38 -0
- package/src/components/SVGIcons/IconArrowExportLeftToRightFilled.tsx +38 -0
- package/src/components/SVGIcons/IconArrowExportRightToLeft.tsx +38 -0
- package/src/components/SVGIcons/IconArrowExportRightToLeftFilled.tsx +38 -0
- package/src/components/SVGIcons/IconArrowExportUp.tsx +38 -0
- package/src/components/SVGIcons/IconArrowExportUpFilled.tsx +38 -0
- package/src/components/SVGIcons/IconArrowImport.tsx +38 -0
- package/src/components/SVGIcons/IconArrowImportFilled.tsx +38 -0
- package/src/components/SVGIcons/IconArrowLeft.tsx +38 -0
- package/src/components/SVGIcons/IconArrowLeftFilled.tsx +38 -0
- package/src/components/SVGIcons/IconArrowRepeatAll.tsx +38 -0
- package/src/components/SVGIcons/IconArrowRepeatAllFilled.tsx +38 -0
- package/src/components/SVGIcons/IconArrowReset.tsx +38 -0
- package/src/components/SVGIcons/IconArrowResetFilled.tsx +38 -0
- package/src/components/SVGIcons/IconArrowRight.tsx +38 -0
- package/src/components/SVGIcons/IconArrowRightFilled.tsx +38 -0
- package/src/components/SVGIcons/IconArrowSort.tsx +35 -0
- package/src/components/SVGIcons/IconArrowSortFilled.tsx +35 -0
- package/src/components/SVGIcons/IconArrowSync.tsx +35 -0
- package/src/components/SVGIcons/IconArrowSyncFilled.tsx +35 -0
- package/src/components/SVGIcons/IconArrowUp.tsx +38 -0
- package/src/components/SVGIcons/IconArrowUpFilled.tsx +38 -0
- package/src/components/SVGIcons/IconArrowUpLeft.tsx +38 -0
- package/src/components/SVGIcons/IconArrowUpLeftFilled.tsx +38 -0
- package/src/components/SVGIcons/IconArrowUpRight.tsx +38 -0
- package/src/components/SVGIcons/IconArrowUpRightFilled.tsx +38 -0
- package/src/components/SVGIcons/IconAttach.tsx +38 -0
- package/src/components/SVGIcons/IconAttachFilled.tsx +38 -0
- package/src/components/SVGIcons/IconBeach.tsx +35 -0
- package/src/components/SVGIcons/IconBeachFilled.tsx +35 -0
- package/src/components/SVGIcons/IconBook.tsx +38 -0
- package/src/components/SVGIcons/IconBookFilled.tsx +38 -0
- package/src/components/SVGIcons/IconBookmark.tsx +38 -0
- package/src/components/SVGIcons/IconBookmarkFilled.tsx +38 -0
- package/src/components/SVGIcons/IconBriefcase.tsx +38 -0
- package/src/components/SVGIcons/IconBriefcaseFilled.tsx +38 -0
- package/src/components/SVGIcons/IconBuilding.tsx +55 -0
- package/src/components/SVGIcons/IconBuildingBank.tsx +35 -0
- package/src/components/SVGIcons/IconBuildingBankFilled.tsx +35 -0
- package/src/components/SVGIcons/IconBuildingFilled.tsx +38 -0
- package/src/components/SVGIcons/IconBulletListAdd.tsx +38 -0
- package/src/components/SVGIcons/IconBulletListAddFilled.tsx +38 -0
- package/src/components/SVGIcons/IconCalculator.tsx +38 -0
- package/src/components/SVGIcons/IconCalculatorFilled.tsx +38 -0
- package/src/components/SVGIcons/IconCalendarClock.tsx +35 -0
- package/src/components/SVGIcons/IconCalendarClockFilled.tsx +35 -0
- package/src/components/SVGIcons/IconCalendarDay.tsx +38 -0
- package/src/components/SVGIcons/IconCalendarDayFilled.tsx +38 -0
- package/src/components/SVGIcons/IconCalendarLeft.tsx +35 -0
- package/src/components/SVGIcons/IconCalendarLeftFilled.tsx +35 -0
- package/src/components/SVGIcons/IconCalendarRight.tsx +35 -0
- package/src/components/SVGIcons/IconCalendarRightFilled.tsx +35 -0
- package/src/components/SVGIcons/IconCall.tsx +38 -0
- package/src/components/SVGIcons/IconCallFilled.tsx +38 -0
- package/src/components/SVGIcons/IconCard.tsx +35 -0
- package/src/components/SVGIcons/IconCardFilled.tsx +35 -0
- package/src/components/SVGIcons/IconCaretDown.tsx +35 -0
- package/src/components/SVGIcons/IconCaretDownFilled.tsx +35 -0
- package/src/components/SVGIcons/IconCaretDownRight.tsx +35 -0
- package/src/components/SVGIcons/IconCaretDownRightFilled.tsx +35 -0
- package/src/components/SVGIcons/IconCaretLeft.tsx +35 -0
- package/src/components/SVGIcons/IconCaretLeftFilled.tsx +35 -0
- package/src/components/SVGIcons/IconCaretRight.tsx +35 -0
- package/src/components/SVGIcons/IconCaretRightFilled.tsx +35 -0
- package/src/components/SVGIcons/IconCaretUp.tsx +35 -0
- package/src/components/SVGIcons/IconCaretUpFilled.tsx +35 -0
- package/src/components/SVGIcons/IconChat.tsx +35 -0
- package/src/components/SVGIcons/IconChatFilled.tsx +35 -0
- package/src/components/SVGIcons/IconChatMultiple.tsx +35 -0
- package/src/components/SVGIcons/IconChatMultipleFilled.tsx +35 -0
- package/src/components/SVGIcons/IconCheckboxArrowRight.tsx +38 -0
- package/src/components/SVGIcons/IconCheckboxArrowRightFilled.tsx +38 -0
- package/src/components/SVGIcons/IconCheckmark.tsx +35 -0
- package/src/components/SVGIcons/IconCheckmarkCircle.tsx +35 -0
- package/src/components/SVGIcons/IconCheckmarkCircleFilled.tsx +35 -0
- package/src/components/SVGIcons/IconCheckmarkFilled.tsx +35 -0
- package/src/components/SVGIcons/IconChevronDown.tsx +35 -0
- package/src/components/SVGIcons/IconChevronDownFilled.tsx +35 -0
- package/src/components/SVGIcons/IconChevronLeft.tsx +35 -0
- package/src/components/SVGIcons/IconChevronLeftFilled.tsx +35 -0
- package/src/components/SVGIcons/IconChevronRight.tsx +35 -0
- package/src/components/SVGIcons/IconChevronRightFilled.tsx +35 -0
- package/src/components/SVGIcons/IconChevronUp.tsx +35 -0
- package/src/components/SVGIcons/IconChevronUpDown.tsx +38 -0
- package/src/components/SVGIcons/IconChevronUpDownFilled.tsx +38 -0
- package/src/components/SVGIcons/IconChevronUpFilled.tsx +35 -0
- package/src/components/SVGIcons/IconClock.tsx +38 -0
- package/src/components/SVGIcons/IconClockDismiss.tsx +35 -0
- package/src/components/SVGIcons/IconClockDismissFilled.tsx +35 -0
- package/src/components/SVGIcons/IconClockFilled.tsx +38 -0
- package/src/components/SVGIcons/IconComment.tsx +38 -0
- package/src/components/SVGIcons/IconCommentFilled.tsx +38 -0
- package/src/components/SVGIcons/IconContractCard.tsx +35 -0
- package/src/components/SVGIcons/IconContractCardFilled.tsx +35 -0
- package/src/components/SVGIcons/IconCopy.tsx +35 -0
- package/src/components/SVGIcons/IconCopyFilled.tsx +35 -0
- package/src/components/SVGIcons/IconCubeTree.tsx +35 -0
- package/src/components/SVGIcons/IconCubeTreeFilled.tsx +38 -0
- package/src/components/SVGIcons/IconDatabase.tsx +38 -0
- package/src/components/SVGIcons/IconDatabaseFilled.tsx +38 -0
- package/src/components/SVGIcons/IconDelete.tsx +35 -0
- package/src/components/SVGIcons/IconDeleteFilled.tsx +35 -0
- package/src/components/SVGIcons/IconDeviceMeetingRoom.tsx +35 -0
- package/src/components/SVGIcons/IconDeviceMeetingRoomFilled.tsx +35 -0
- package/src/components/SVGIcons/IconDismiss.tsx +35 -0
- package/src/components/SVGIcons/IconDismissCircle.tsx +38 -0
- package/src/components/SVGIcons/IconDismissCircleFilled.tsx +38 -0
- package/src/components/SVGIcons/IconDismissFilled.tsx +35 -0
- package/src/components/SVGIcons/IconDocument.tsx +35 -0
- package/src/components/SVGIcons/IconDocumentBulletList.tsx +38 -0
- package/src/components/SVGIcons/IconDocumentBulletListFilled.tsx +38 -0
- package/src/components/SVGIcons/IconDocumentEdit.tsx +35 -0
- package/src/components/SVGIcons/IconDocumentEditFilled.tsx +35 -0
- package/src/components/SVGIcons/IconDocumentFilled.tsx +35 -0
- package/src/components/SVGIcons/IconEdit.tsx +35 -0
- package/src/components/SVGIcons/IconEditFilled.tsx +35 -0
- package/src/components/SVGIcons/IconErrorCircle.tsx +35 -0
- package/src/components/SVGIcons/IconErrorCircleFilled.tsx +35 -0
- package/src/components/SVGIcons/IconEur.tsx +35 -0
- package/src/components/SVGIcons/IconEurFilled.tsx +35 -0
- package/src/components/SVGIcons/IconExpandUpLeft.tsx +38 -0
- package/src/components/SVGIcons/IconExpandUpLeftFilled.tsx +38 -0
- package/src/components/SVGIcons/IconExpandUpRight.tsx +38 -0
- package/src/components/SVGIcons/IconExpandUpRightFilled.tsx +38 -0
- package/src/components/SVGIcons/IconEyeOff.tsx +38 -0
- package/src/components/SVGIcons/IconEyeOffFilled.tsx +38 -0
- package/src/components/SVGIcons/IconEyeOn.tsx +38 -0
- package/src/components/SVGIcons/IconEyeOnFilled.tsx +38 -0
- package/src/components/SVGIcons/IconFacebook.tsx +43 -0
- package/src/components/SVGIcons/IconFilter.tsx +35 -0
- package/src/components/SVGIcons/IconFilterFilled.tsx +35 -0
- package/src/components/SVGIcons/IconFlag.tsx +38 -0
- package/src/components/SVGIcons/IconFlagFilled.tsx +38 -0
- package/src/components/SVGIcons/IconFolderLink.tsx +35 -0
- package/src/components/SVGIcons/IconFolderLinkFilled.tsx +35 -0
- package/src/components/SVGIcons/IconGb.tsx +68 -0
- package/src/components/SVGIcons/IconGlobe.tsx +35 -0
- package/src/components/SVGIcons/IconGlobeFilled.tsx +35 -0
- package/src/components/SVGIcons/IconGoogle.tsx +45 -0
- package/src/components/SVGIcons/IconHandOpenHeart.tsx +38 -0
- package/src/components/SVGIcons/IconHandOpenHeartFilled.tsx +38 -0
- package/src/components/SVGIcons/IconHeart.tsx +38 -0
- package/src/components/SVGIcons/IconHeartFilled.tsx +38 -0
- package/src/components/SVGIcons/IconHistory.tsx +38 -0
- package/src/components/SVGIcons/IconHistoryFilled.tsx +38 -0
- package/src/components/SVGIcons/IconHome.tsx +38 -0
- package/src/components/SVGIcons/IconHomeFilled.tsx +38 -0
- package/src/components/SVGIcons/IconImage.tsx +38 -0
- package/src/components/SVGIcons/IconImageFilled.tsx +38 -0
- package/src/components/SVGIcons/IconInfo.tsx +35 -0
- package/src/components/SVGIcons/IconInfoFilled.tsx +35 -0
- package/src/components/SVGIcons/IconInstagram.tsx +48 -0
- package/src/components/SVGIcons/IconKeyReset.tsx +38 -0
- package/src/components/SVGIcons/IconKeyResetFilled.tsx +38 -0
- package/src/components/SVGIcons/IconLink.tsx +38 -0
- package/src/components/SVGIcons/IconLinkFilled.tsx +38 -0
- package/src/components/SVGIcons/IconLinkedin.tsx +38 -0
- package/src/components/SVGIcons/IconList.tsx +35 -0
- package/src/components/SVGIcons/IconListFilled.tsx +38 -0
- package/src/components/SVGIcons/IconLocation.tsx +38 -0
- package/src/components/SVGIcons/IconLocationFilled.tsx +38 -0
- package/src/components/SVGIcons/IconLockClosed.tsx +38 -0
- package/src/components/SVGIcons/IconLockClosedFilled.tsx +38 -0
- package/src/components/SVGIcons/IconLockOpen.tsx +38 -0
- package/src/components/SVGIcons/IconLockOpenFilled.tsx +38 -0
- package/src/components/SVGIcons/IconMail.tsx +38 -0
- package/src/components/SVGIcons/IconMailAdd.tsx +38 -0
- package/src/components/SVGIcons/IconMailAddFilled.tsx +38 -0
- package/src/components/SVGIcons/IconMailArrowForward.tsx +38 -0
- package/src/components/SVGIcons/IconMailArrowForwardFilled.tsx +38 -0
- package/src/components/SVGIcons/IconMailFilled.tsx +38 -0
- package/src/components/SVGIcons/IconMailLink.tsx +38 -0
- package/src/components/SVGIcons/IconMailLinkFilled.tsx +38 -0
- package/src/components/SVGIcons/IconMedium.tsx +38 -0
- package/src/components/SVGIcons/IconMore.tsx +38 -0
- package/src/components/SVGIcons/IconMoreFilled.tsx +38 -0
- package/src/components/SVGIcons/IconMoreVertical.tsx +38 -0
- package/src/components/SVGIcons/IconMoreVerticalFilled.tsx +38 -0
- package/src/components/SVGIcons/IconNavigation.tsx +38 -0
- package/src/components/SVGIcons/IconNavigationFilled.tsx +38 -0
- package/src/components/SVGIcons/IconNotebook.tsx +38 -0
- package/src/components/SVGIcons/IconNotebookAdd.tsx +59 -0
- package/src/components/SVGIcons/IconNotebookAddFilled.tsx +55 -0
- package/src/components/SVGIcons/IconNotebookFilled.tsx +38 -0
- package/src/components/SVGIcons/IconOnlyEmployee.tsx +35 -0
- package/src/components/SVGIcons/IconOpen.tsx +38 -0
- package/src/components/SVGIcons/IconOpenFilled.tsx +38 -0
- package/src/components/SVGIcons/IconPatient.tsx +35 -0
- package/src/components/SVGIcons/IconPatientFilled.tsx +35 -0
- package/src/components/SVGIcons/IconPeople.tsx +35 -0
- package/src/components/SVGIcons/IconPeopleAdd.tsx +38 -0
- package/src/components/SVGIcons/IconPeopleAddFilled.tsx +38 -0
- package/src/components/SVGIcons/IconPeopleFilled.tsx +38 -0
- package/src/components/SVGIcons/IconPercent.tsx +40 -0
- package/src/components/SVGIcons/IconPerson.tsx +38 -0
- package/src/components/SVGIcons/IconPersonAccount.tsx +35 -0
- package/src/components/SVGIcons/IconPersonAccountFilled.tsx +35 -0
- package/src/components/SVGIcons/IconPersonAdd.tsx +38 -0
- package/src/components/SVGIcons/IconPersonAddFilled.tsx +38 -0
- package/src/components/SVGIcons/IconPersonFilled.tsx +38 -0
- package/src/components/SVGIcons/IconPersonStar.tsx +38 -0
- package/src/components/SVGIcons/IconPersonStarFilled.tsx +38 -0
- package/src/components/SVGIcons/IconPersonSubtract.tsx +38 -0
- package/src/components/SVGIcons/IconPersonSubtractFilled.tsx +38 -0
- package/src/components/SVGIcons/IconPhone.tsx +38 -0
- package/src/components/SVGIcons/IconPhoneFilled.tsx +38 -0
- package/src/components/SVGIcons/IconPos.tsx +40 -0
- package/src/components/SVGIcons/IconPosFilled.tsx +40 -0
- package/src/components/SVGIcons/IconProhibited.tsx +38 -0
- package/src/components/SVGIcons/IconProhibitedFilled.tsx +38 -0
- package/src/components/SVGIcons/IconProjectProduct.tsx +35 -0
- package/src/components/SVGIcons/IconQuestion.tsx +38 -0
- package/src/components/SVGIcons/IconQuestionFilled.tsx +38 -0
- package/src/components/SVGIcons/IconRedo.tsx +38 -0
- package/src/components/SVGIcons/IconRedoFilled.tsx +38 -0
- package/src/components/SVGIcons/IconRu.tsx +63 -0
- package/src/components/SVGIcons/IconRub.tsx +35 -0
- package/src/components/SVGIcons/IconRubFilled.tsx +35 -0
- package/src/components/SVGIcons/IconSave.tsx +38 -0
- package/src/components/SVGIcons/IconSaveFilled.tsx +38 -0
- package/src/components/SVGIcons/IconSavings.tsx +38 -0
- package/src/components/SVGIcons/IconSavingsFilled.tsx +38 -0
- package/src/components/SVGIcons/IconSearch.tsx +38 -0
- package/src/components/SVGIcons/IconSearchFilled.tsx +38 -0
- package/src/components/SVGIcons/IconSelectAllOff.tsx +38 -0
- package/src/components/SVGIcons/IconSelectAllOffFilled.tsx +38 -0
- package/src/components/SVGIcons/IconSelectAllOn.tsx +38 -0
- package/src/components/SVGIcons/IconSelectAllOnFilled.tsx +38 -0
- package/src/components/SVGIcons/IconSend.tsx +38 -0
- package/src/components/SVGIcons/IconSendFilled.tsx +38 -0
- package/src/components/SVGIcons/IconSettings.tsx +35 -0
- package/src/components/SVGIcons/IconSettingsFilled.tsx +38 -0
- package/src/components/SVGIcons/IconShare.tsx +38 -0
- package/src/components/SVGIcons/IconShareAndroid.tsx +38 -0
- package/src/components/SVGIcons/IconShareAndroidFilled.tsx +38 -0
- package/src/components/SVGIcons/IconShareFilled.tsx +38 -0
- package/src/components/SVGIcons/IconSignOut.tsx +38 -0
- package/src/components/SVGIcons/IconSignOutFilled.tsx +38 -0
- package/src/components/SVGIcons/IconSpinner.tsx +38 -0
- package/src/components/SVGIcons/IconSpinnerFilled.tsx +38 -0
- package/src/components/SVGIcons/IconStatus.tsx +38 -0
- package/src/components/SVGIcons/IconStatusFilled.tsx +38 -0
- package/src/components/SVGIcons/IconSubtract.tsx +38 -0
- package/src/components/SVGIcons/IconSubtractCircle.tsx +38 -0
- package/src/components/SVGIcons/IconSubtractCircleFilled.tsx +38 -0
- package/src/components/SVGIcons/IconSubtractFilled.tsx +38 -0
- package/src/components/SVGIcons/IconTableCellEdit.tsx +43 -0
- package/src/components/SVGIcons/IconTableCellEditFilled.tsx +51 -0
- package/src/components/SVGIcons/IconTelegram.tsx +45 -0
- package/src/components/SVGIcons/IconTimer.tsx +38 -0
- package/src/components/SVGIcons/IconTimerFilled.tsx +38 -0
- package/src/components/SVGIcons/IconTwitter.tsx +38 -0
- package/src/components/SVGIcons/IconUndo.tsx +38 -0
- package/src/components/SVGIcons/IconUndoFilled.tsx +38 -0
- package/src/components/SVGIcons/IconUnitsEmployee.tsx +35 -0
- package/src/components/SVGIcons/IconUsd.tsx +35 -0
- package/src/components/SVGIcons/IconUsdFilled.tsx +35 -0
- package/src/components/SVGIcons/IconVideo.tsx +35 -0
- package/src/components/SVGIcons/IconVideoFilled.tsx +35 -0
- package/src/components/SVGIcons/IconWallet.tsx +38 -0
- package/src/components/SVGIcons/IconWalletFilled.tsx +38 -0
- package/src/components/SVGIcons/IconWarning.tsx +35 -0
- package/src/components/SVGIcons/IconWarningFilled.tsx +35 -0
- package/src/components/SVGIcons/IconYoutube.tsx +38 -0
- package/src/components/SVGIcons/index.ts +286 -0
- package/src/components/SVGIcons/types.ts +38 -0
- package/src/components/Select/ButtonSelect/ButtonSelect.tsx +120 -0
- package/src/components/Select/FilterSelect/FilterDropdown.tsx +46 -0
- package/src/components/Select/FilterSelect/FilterGroupDropdown.tsx +22 -0
- package/src/components/Select/FilterSelect/FilterSelect.tsx +138 -0
- package/src/components/Select/MultiSelect/MultiBase/MultiBase.tsx +162 -0
- package/src/components/Select/MultiSelect/MultiSelect.tsx +147 -0
- package/src/components/Select/MultiSelect/MultiSelectGrouped/MultiSelectGrouped.tsx +219 -0
- package/src/components/Select/MultiSelect/MultiSelectWithTabs/MultiSelectWithTabs.tsx +177 -0
- package/src/components/Select/MultiSelect/OptionsWrapper.tsx +128 -0
- package/src/components/Select/NestedSelect/NestedSelect.tsx +124 -0
- package/src/components/Select/ProfileDropdown/index.tsx +90 -0
- package/src/components/Select/ProfileDropdown/styles.scss +47 -0
- package/src/components/Select/Select/Select.tsx +268 -0
- package/src/components/Select/SharedComponents/Actions.tsx +42 -0
- package/src/components/Select/SharedComponents/ButtonSelectWrapper/Button/Button.tsx +52 -0
- package/src/components/Select/SharedComponents/ButtonSelectWrapper/ButtonSelectWrapper.tsx +100 -0
- package/src/components/Select/SharedComponents/ContentTop.tsx +123 -0
- package/src/components/Select/SharedComponents/Footer.tsx +35 -0
- package/src/components/Select/SharedComponents/InputSelectWrapper/InputSelectWrapper.tsx +137 -0
- package/src/components/Select/SharedComponents/Loading.tsx +15 -0
- package/src/components/Select/SharedComponents/index.ts +6 -0
- package/src/components/Select/constants.ts +10 -0
- package/src/components/Select/index.ts +6 -0
- package/src/components/Select/types.ts +240 -0
- package/src/components/SideNavigation/Block.tsx +19 -0
- package/src/components/SideNavigation/NavigationItem/index.tsx +93 -0
- package/src/components/SideNavigation/NavigationItem/types.ts +26 -0
- package/src/components/SideNavigation/SideNavigation.tsx +46 -0
- package/src/components/SideNavigation/index.ts +2 -0
- package/src/components/SideNavigation/types.ts +19 -0
- package/src/components/SideSheet/Footer/Footer.tsx +59 -0
- package/src/components/SideSheet/SideSheet.tsx +168 -0
- package/src/components/SideSheet/index.ts +1 -0
- package/src/components/SideSheet/types.ts +37 -0
- package/src/components/Snackbar/Snackbar.tsx +75 -0
- package/src/components/Snackbar/consts.ts +17 -0
- package/src/components/Snackbar/index.ts +1 -0
- package/src/components/Snackbar/types.ts +22 -0
- package/src/components/Status/Status.tsx +50 -0
- package/src/components/Status/index.ts +1 -0
- package/src/components/Status/types.ts +24 -0
- package/src/components/Stepper/Stepper.tsx +45 -0
- package/src/components/Stepper/index.ts +1 -0
- package/src/components/Stepper/types.ts +15 -0
- package/src/components/Switcher/Switcher.tsx +75 -0
- package/src/components/Switcher/index.ts +1 -0
- package/src/components/Switcher/types.ts +11 -0
- package/src/components/Tab/Tab.tsx +29 -0
- package/src/components/Tab/TabItem.tsx +61 -0
- package/src/components/Tab/index.ts +1 -0
- package/src/components/Tab/types.ts +51 -0
- package/src/components/Table/Header.tsx +86 -0
- package/src/components/Table/IndeterminateCheckbox.tsx +31 -0
- package/src/components/Table/Row.tsx +48 -0
- package/src/components/Table/Table.tsx +134 -0
- package/src/components/Table/index.ts +1 -0
- package/src/components/Table/types.ts +45 -0
- package/src/components/Table/utils.tsx +27 -0
- package/src/components/Text/Text.tsx +38 -0
- package/src/components/Text/index.ts +1 -0
- package/src/components/Text/types.ts +33 -0
- package/src/components/Textarea/Textarea.tsx +100 -0
- package/src/components/Textarea/index.ts +1 -0
- package/src/components/Textarea/types.ts +17 -0
- package/src/components/Tooltip/Tooltip.tsx +88 -0
- package/src/components/Tooltip/index.ts +1 -0
- package/src/components/Tooltip/types.ts +23 -0
- package/src/consts/index.ts +85 -0
- package/src/context/FormContextProvider.tsx +12 -0
- package/src/context/index.ts +2 -0
- package/src/context/types.ts +41 -0
- package/src/helperComponents/AnimatePresenceWrapper/AnimatePresenceWrapper.tsx +19 -0
- package/src/helperComponents/AnimatePresenceWrapper/index.ts +1 -0
- package/src/helperComponents/CodeBlock/CodeBlock.tsx +20 -0
- package/src/helperComponents/CodeBlock/index.ts +2 -0
- package/src/helperComponents/ErrorMessage/ErrorMessage.tsx +23 -0
- package/src/helperComponents/ErrorMessage/index.ts +1 -0
- package/src/helperComponents/ErrorMessage/types.ts +6 -0
- package/src/helperComponents/IconDynamicComponent/IconDynamicComponent.tsx +31 -0
- package/src/helperComponents/IconDynamicComponent/constants.ts +16 -0
- package/src/helperComponents/IconDynamicComponent/index.ts +1 -0
- package/src/helperComponents/Label/Label.tsx +31 -0
- package/src/helperComponents/Label/index.ts +1 -0
- package/src/helperComponents/Label/types.ts +12 -0
- package/src/helperComponents/Loader/Loader.tsx +11 -0
- package/src/helperComponents/Loader/index.ts +1 -0
- package/src/helperComponents/Loader/types.ts +4 -0
- package/src/helperComponents/OptionItem/OptionItem.tsx +98 -0
- package/src/helperComponents/OptionItem/index.ts +1 -0
- package/src/helperComponents/OptionItem/types.ts +18 -0
- package/src/helperComponents/index.ts +6 -0
- package/src/hooks/index.ts +12 -0
- package/src/hooks/useChangePositionsOnScroll.tsx +37 -0
- package/src/hooks/useDispatchEventOnScroll.tsx +10 -0
- package/src/hooks/useFieldArray.ts +1 -0
- package/src/hooks/useFormContext.ts +14 -0
- package/src/hooks/useFormProps.ts +6 -0
- package/src/hooks/useGetElemPositions.ts +28 -0
- package/src/hooks/useGetElemSizes.ts +29 -0
- package/src/hooks/useGetHasBottomSpace.ts +35 -0
- package/src/hooks/useGetTooltipPosition.ts +81 -0
- package/src/hooks/useGetTooltipStyles.ts +71 -0
- package/src/hooks/useHideBodyScroll.ts +29 -0
- package/src/hooks/useHideOnScroll.ts +24 -0
- package/src/hooks/useOnOutsideClick.ts +58 -0
- package/src/hooks/useScreenSize.ts +36 -0
- package/src/index.ts +53 -0
- package/src/stories/Alert.stories.tsx +42 -0
- package/src/stories/Avatar.stories.tsx +100 -0
- package/src/stories/Badge.stories.tsx +29 -0
- package/src/stories/Breadcrumb.stories.tsx +37 -0
- package/src/stories/Button.stories.tsx +74 -0
- package/src/stories/ButtonIcon.stories.tsx +52 -0
- package/src/stories/CardBody.stories.tsx +32 -0
- package/src/stories/CardSelect.stories.tsx +192 -0
- package/src/stories/Cards.stories.tsx +42 -0
- package/src/stories/Checkbox.stories.tsx +40 -0
- package/src/stories/Chips.stories.tsx +40 -0
- package/src/stories/Collapse.stories.tsx +69 -0
- package/src/stories/Container.stories.tsx +28 -0
- package/src/stories/Copy.stories.tsx +18 -0
- package/src/stories/Counter.stories.tsx +27 -0
- package/src/stories/DatePicker.stories.tsx +99 -0
- package/src/stories/Divider.stories.tsx +30 -0
- package/src/stories/Empty.stories.tsx +33 -0
- package/src/stories/FileUpload.stories.tsx +43 -0
- package/src/stories/Form.stories.tsx +188 -0
- package/src/stories/Heading.stories.tsx +42 -0
- package/src/stories/Image.stories.tsx +44 -0
- package/src/stories/Input.stories.tsx +71 -0
- package/src/stories/ItemSelect.stories.tsx +94 -0
- package/src/stories/Link.stories.tsx +21 -0
- package/src/stories/Menu.stories.tsx +178 -0
- package/src/stories/Modal.stories.tsx +93 -0
- package/src/stories/More.stories.tsx +27 -0
- package/src/stories/NavigationItem.stories.tsx +24 -0
- package/src/stories/Pagination.stories.tsx +34 -0
- package/src/stories/Popover.stories.tsx +55 -0
- package/src/stories/Progress.stories.tsx +33 -0
- package/src/stories/ProgressStep.stories.tsx +84 -0
- package/src/stories/Radio.stories.tsx +57 -0
- package/src/stories/SVGIcons.stories.tsx +75 -0
- package/src/stories/Select.stories.tsx +600 -0
- package/src/stories/SideNavigation.stories.tsx +252 -0
- package/src/stories/SideSheet.stories.tsx +346 -0
- package/src/stories/Snackbar.stories.tsx +72 -0
- package/src/stories/Status.stories.tsx +71 -0
- package/src/stories/Stepper.stories.tsx +28 -0
- package/src/stories/Switcher.stories.tsx +32 -0
- package/src/stories/Tab.stories.tsx +77 -0
- package/src/stories/Table.stories.tsx +96 -0
- package/src/stories/Text.stories.tsx +62 -0
- package/src/stories/Textarea.stories.tsx +37 -0
- package/src/stories/Tooltip.stories.tsx +60 -0
- package/src/types.d.ts +192 -0
- package/src/utils/helpers.ts +94 -0
- package/svg-icons/add-circle-filled.svg +5 -0
- package/svg-icons/add-circle.svg +5 -0
- package/svg-icons/add-filled.svg +3 -0
- package/svg-icons/add.svg +3 -0
- package/svg-icons/alert-badge-filled.svg +5 -0
- package/svg-icons/alert-badge.svg +5 -0
- package/svg-icons/alert-filled.svg +5 -0
- package/svg-icons/alert.svg +5 -0
- package/svg-icons/am.svg +11 -0
- package/svg-icons/amd-filled.svg +3 -0
- package/svg-icons/amd.svg +3 -0
- package/svg-icons/apple.svg +5 -0
- package/svg-icons/arrow-down-filled.svg +5 -0
- package/svg-icons/arrow-down-left-filled.svg +5 -0
- package/svg-icons/arrow-down-left.svg +5 -0
- package/svg-icons/arrow-down.svg +5 -0
- package/svg-icons/arrow-download-filled.svg +5 -0
- package/svg-icons/arrow-download.svg +5 -0
- package/svg-icons/arrow-enter-filled.svg +3 -0
- package/svg-icons/arrow-enter.svg +3 -0
- package/svg-icons/arrow-exit-filled.svg +3 -0
- package/svg-icons/arrow-exit.svg +3 -0
- package/svg-icons/arrow-export-left-to-right-filled.svg +5 -0
- package/svg-icons/arrow-export-left-to-right.svg +5 -0
- package/svg-icons/arrow-export-right-to-left-filled.svg +5 -0
- package/svg-icons/arrow-export-right-to-left.svg +5 -0
- package/svg-icons/arrow-export-up-filled.svg +5 -0
- package/svg-icons/arrow-export-up.svg +5 -0
- package/svg-icons/arrow-import-filled.svg +5 -0
- package/svg-icons/arrow-import.svg +5 -0
- package/svg-icons/arrow-left-filled.svg +5 -0
- package/svg-icons/arrow-left.svg +5 -0
- package/svg-icons/arrow-repeat-all-filled.svg +5 -0
- package/svg-icons/arrow-repeat-all.svg +5 -0
- package/svg-icons/arrow-reset-filled.svg +5 -0
- package/svg-icons/arrow-reset.svg +5 -0
- package/svg-icons/arrow-right-filled.svg +5 -0
- package/svg-icons/arrow-right.svg +5 -0
- package/svg-icons/arrow-sort-filled.svg +3 -0
- package/svg-icons/arrow-sort.svg +3 -0
- package/svg-icons/arrow-sync-filled.svg +3 -0
- package/svg-icons/arrow-sync.svg +3 -0
- package/svg-icons/arrow-up-filled.svg +5 -0
- package/svg-icons/arrow-up-left-filled.svg +5 -0
- package/svg-icons/arrow-up-left.svg +5 -0
- package/svg-icons/arrow-up-right-filled.svg +5 -0
- package/svg-icons/arrow-up-right.svg +5 -0
- package/svg-icons/arrow-up.svg +5 -0
- package/svg-icons/attach-filled.svg +5 -0
- package/svg-icons/attach.svg +5 -0
- package/svg-icons/beach-filled.svg +3 -0
- package/svg-icons/beach.svg +3 -0
- package/svg-icons/book-filled.svg +5 -0
- package/svg-icons/book.svg +5 -0
- package/svg-icons/bookmark-filled.svg +5 -0
- package/svg-icons/bookmark.svg +5 -0
- package/svg-icons/briefcase-filled.svg +5 -0
- package/svg-icons/briefcase.svg +5 -0
- package/svg-icons/building-bank-filled.svg +3 -0
- package/svg-icons/building-bank.svg +3 -0
- package/svg-icons/building-filled.svg +5 -0
- package/svg-icons/building.svg +14 -0
- package/svg-icons/bullet-list-add-filled.svg +5 -0
- package/svg-icons/bullet-list-add.svg +5 -0
- package/svg-icons/calculator-filled.svg +5 -0
- package/svg-icons/calculator.svg +5 -0
- package/svg-icons/calendar-clock-filled.svg +3 -0
- package/svg-icons/calendar-clock.svg +3 -0
- package/svg-icons/calendar-day-filled.svg +5 -0
- package/svg-icons/calendar-day.svg +5 -0
- package/svg-icons/calendar-left-filled.svg +3 -0
- package/svg-icons/calendar-left.svg +3 -0
- package/svg-icons/calendar-right-filled.svg +3 -0
- package/svg-icons/calendar-right.svg +3 -0
- package/svg-icons/call-filled.svg +5 -0
- package/svg-icons/call.svg +5 -0
- package/svg-icons/card-filled.svg +3 -0
- package/svg-icons/card.svg +3 -0
- package/svg-icons/caret-down-filled.svg +3 -0
- package/svg-icons/caret-down-right-filled.svg +3 -0
- package/svg-icons/caret-down-right.svg +3 -0
- package/svg-icons/caret-down.svg +3 -0
- package/svg-icons/caret-left-filled.svg +3 -0
- package/svg-icons/caret-left.svg +3 -0
- package/svg-icons/caret-right-filled.svg +3 -0
- package/svg-icons/caret-right.svg +3 -0
- package/svg-icons/caret-up-filled.svg +3 -0
- package/svg-icons/caret-up.svg +3 -0
- package/svg-icons/chat-filled.svg +3 -0
- package/svg-icons/chat-multiple-filled.svg +3 -0
- package/svg-icons/chat-multiple.svg +3 -0
- package/svg-icons/chat.svg +3 -0
- package/svg-icons/checkbox-arrow-right-filled.svg +5 -0
- package/svg-icons/checkbox-arrow-right.svg +5 -0
- package/svg-icons/checkmark-circle-filled.svg +3 -0
- package/svg-icons/checkmark-circle.svg +3 -0
- package/svg-icons/checkmark-filled.svg +3 -0
- package/svg-icons/checkmark.svg +3 -0
- package/svg-icons/chevron-down.svg +3 -0
- package/svg-icons/chevron-left.svg +3 -0
- package/svg-icons/chevron-right.svg +3 -0
- package/svg-icons/chevron-up-down-filled.svg +5 -0
- package/svg-icons/chevron-up-down.svg +5 -0
- package/svg-icons/chevron-up.svg +3 -0
- package/svg-icons/clock-filled.svg +5 -0
- package/svg-icons/clock.svg +5 -0
- package/svg-icons/comment-filled.svg +5 -0
- package/svg-icons/comment.svg +5 -0
- package/svg-icons/contract-card-filled.svg +3 -0
- package/svg-icons/contract-card.svg +3 -0
- package/svg-icons/copy.svg +3 -0
- package/svg-icons/cube-tree-filled.svg +5 -0
- package/svg-icons/cube-tree.svg +3 -0
- package/svg-icons/database-filled.svg +5 -0
- package/svg-icons/database.svg +5 -0
- package/svg-icons/delete-filled.svg +3 -0
- package/svg-icons/delete.svg +3 -0
- package/svg-icons/device-meeting-room-filled.svg +3 -0
- package/svg-icons/device-meeting-room.svg +3 -0
- package/svg-icons/dismiss-circle-filled.svg +5 -0
- package/svg-icons/dismiss-circle.svg +5 -0
- package/svg-icons/dismiss-filled.svg +3 -0
- package/svg-icons/dismiss.svg +3 -0
- package/svg-icons/document-bullet-list-filled.svg +5 -0
- package/svg-icons/document-bullet-list.svg +5 -0
- package/svg-icons/document-edit-filled.svg +3 -0
- package/svg-icons/document-edit.svg +3 -0
- package/svg-icons/document-filled.svg +3 -0
- package/svg-icons/document.svg +3 -0
- package/svg-icons/edit-filled.svg +3 -0
- package/svg-icons/edit.svg +4 -0
- package/svg-icons/error-circle-filled.svg +3 -0
- package/svg-icons/error-circle.svg +3 -0
- package/svg-icons/eur-filled.svg +3 -0
- package/svg-icons/eur.svg +3 -0
- package/svg-icons/expand-up-left-filled.svg +5 -0
- package/svg-icons/expand-up-left.svg +5 -0
- package/svg-icons/expand-up-right-filled.svg +5 -0
- package/svg-icons/expand-up-right.svg +5 -0
- package/svg-icons/eye-off-filled.svg +5 -0
- package/svg-icons/eye-off.svg +5 -0
- package/svg-icons/eye-on-filled.svg +5 -0
- package/svg-icons/eye-on.svg +5 -0
- package/svg-icons/facebook.svg +10 -0
- package/svg-icons/filter-filled.svg +3 -0
- package/svg-icons/filter.svg +3 -0
- package/svg-icons/flag-filled.svg +5 -0
- package/svg-icons/flag.svg +5 -0
- package/svg-icons/folder-link-filled.svg +3 -0
- package/svg-icons/folder-link.svg +3 -0
- package/svg-icons/gb.svg +15 -0
- package/svg-icons/globe-filled.svg +3 -0
- package/svg-icons/globe.svg +3 -0
- package/svg-icons/google.svg +10 -0
- package/svg-icons/hand-open-heart-filled.svg +5 -0
- package/svg-icons/hand-open-heart.svg +5 -0
- package/svg-icons/heart-filled.svg +5 -0
- package/svg-icons/heart.svg +5 -0
- package/svg-icons/history-filled.svg +5 -0
- package/svg-icons/history.svg +5 -0
- package/svg-icons/home-filled.svg +5 -0
- package/svg-icons/home.svg +5 -0
- package/svg-icons/image-filled.svg +5 -0
- package/svg-icons/image.svg +5 -0
- package/svg-icons/info-filled.svg +3 -0
- package/svg-icons/info.svg +3 -0
- package/svg-icons/instagram.svg +7 -0
- package/svg-icons/key-reset-filled.svg +5 -0
- package/svg-icons/key-reset.svg +5 -0
- package/svg-icons/link-filled.svg +5 -0
- package/svg-icons/link.svg +5 -0
- package/svg-icons/linkedin.svg +5 -0
- package/svg-icons/list-filled.svg +5 -0
- package/svg-icons/list.svg +3 -0
- package/svg-icons/location-filled.svg +5 -0
- package/svg-icons/location.svg +5 -0
- package/svg-icons/lock-closed-filled.svg +5 -0
- package/svg-icons/lock-closed.svg +5 -0
- package/svg-icons/lock-open-filled.svg +5 -0
- package/svg-icons/lock-open.svg +5 -0
- package/svg-icons/mail-add-filled.svg +5 -0
- package/svg-icons/mail-add.svg +5 -0
- package/svg-icons/mail-arrow-forward-filled.svg +5 -0
- package/svg-icons/mail-arrow-forward.svg +5 -0
- package/svg-icons/mail-filled.svg +5 -0
- package/svg-icons/mail-link-filled.svg +5 -0
- package/svg-icons/mail-link.svg +5 -0
- package/svg-icons/mail.svg +5 -0
- package/svg-icons/medium.svg +5 -0
- package/svg-icons/more-filled.svg +5 -0
- package/svg-icons/more-vertical-filled.svg +5 -0
- package/svg-icons/more-vertical.svg +5 -0
- package/svg-icons/more.svg +5 -0
- package/svg-icons/navigation-filled.svg +5 -0
- package/svg-icons/navigation.svg +5 -0
- package/svg-icons/notebook-add-filled.svg +11 -0
- package/svg-icons/notebook-add.svg +12 -0
- package/svg-icons/notebook-filled.svg +5 -0
- package/svg-icons/notebook.svg +5 -0
- package/svg-icons/only-employee.svg +3 -0
- package/svg-icons/open-filled.svg +5 -0
- package/svg-icons/open.svg +5 -0
- package/svg-icons/patient-filled.svg +3 -0
- package/svg-icons/patient.svg +3 -0
- package/svg-icons/people-add-filled.svg +5 -0
- package/svg-icons/people-add.svg +5 -0
- package/svg-icons/people-filled.svg +5 -0
- package/svg-icons/people.svg +3 -0
- package/svg-icons/percent.svg +5 -0
- package/svg-icons/person-account-filled.svg +3 -0
- package/svg-icons/person-account.svg +3 -0
- package/svg-icons/person-add-filled.svg +5 -0
- package/svg-icons/person-add.svg +5 -0
- package/svg-icons/person-filled.svg +5 -0
- package/svg-icons/person-star-filled.svg +5 -0
- package/svg-icons/person-star.svg +5 -0
- package/svg-icons/person-subtract-filled.svg +5 -0
- package/svg-icons/person-subtract.svg +5 -0
- package/svg-icons/person.svg +5 -0
- package/svg-icons/phone-filled.svg +5 -0
- package/svg-icons/phone.svg +5 -0
- package/svg-icons/pos-filled.svg +5 -0
- package/svg-icons/pos.svg +5 -0
- package/svg-icons/prohibited-filled.svg +5 -0
- package/svg-icons/prohibited.svg +5 -0
- package/svg-icons/project-product.svg +3 -0
- package/svg-icons/question-filled.svg +5 -0
- package/svg-icons/question.svg +5 -0
- package/svg-icons/redo-filled.svg +5 -0
- package/svg-icons/redo.svg +5 -0
- package/svg-icons/ru.svg +10 -0
- package/svg-icons/rub-filled.svg +3 -0
- package/svg-icons/rub.svg +3 -0
- package/svg-icons/save-filled.svg +5 -0
- package/svg-icons/save.svg +5 -0
- package/svg-icons/savings-filled.svg +5 -0
- package/svg-icons/savings.svg +5 -0
- package/svg-icons/search-filled.svg +5 -0
- package/svg-icons/search.svg +5 -0
- package/svg-icons/select-all-off-filled.svg +5 -0
- package/svg-icons/select-all-off.svg +5 -0
- package/svg-icons/select-all-on-filled.svg +5 -0
- package/svg-icons/select-all-on.svg +5 -0
- package/svg-icons/send-filled.svg +5 -0
- package/svg-icons/send.svg +5 -0
- package/svg-icons/settings-filled.svg +5 -0
- package/svg-icons/settings.svg +3 -0
- package/svg-icons/share-android-filled.svg +5 -0
- package/svg-icons/share-android.svg +5 -0
- package/svg-icons/share-filled.svg +5 -0
- package/svg-icons/share.svg +5 -0
- package/svg-icons/sign-out-filled.svg +5 -0
- package/svg-icons/sign-out.svg +5 -0
- package/svg-icons/spinner-filled.svg +5 -0
- package/svg-icons/spinner.svg +5 -0
- package/svg-icons/status-filled.svg +5 -0
- package/svg-icons/status.svg +5 -0
- package/svg-icons/subtract-circle-filled.svg +5 -0
- package/svg-icons/subtract-circle.svg +5 -0
- package/svg-icons/subtract-filled.svg +5 -0
- package/svg-icons/subtract.svg +5 -0
- package/svg-icons/table-cell-edit-filled.svg +10 -0
- package/svg-icons/table-cell-edit.svg +8 -0
- package/svg-icons/telegram.svg +10 -0
- package/svg-icons/timer-filled.svg +5 -0
- package/svg-icons/timer.svg +5 -0
- package/svg-icons/twitter.svg +5 -0
- package/svg-icons/undo-filled.svg +5 -0
- package/svg-icons/undo.svg +5 -0
- package/svg-icons/units-employee.svg +3 -0
- package/svg-icons/usd-filled.svg +3 -0
- package/svg-icons/usd.svg +3 -0
- package/svg-icons/video-filled.svg +3 -0
- package/svg-icons/video.svg +3 -0
- package/svg-icons/wallet-filled.svg +5 -0
- package/svg-icons/wallet.svg +5 -0
- package/svg-icons/warning-filled.svg +3 -0
- package/svg-icons/warning.svg +3 -0
- package/svg-icons/youtube.svg +5 -0
- package/tsconfig.json +33 -0
package/.babelrc
ADDED
package/.eslintignore
ADDED
package/.eslintrc.yml
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
env:
|
|
2
|
+
browser: true
|
|
3
|
+
extends:
|
|
4
|
+
- 'eslint:recommended'
|
|
5
|
+
- 'plugin:react/recommended'
|
|
6
|
+
- 'plugin:@typescript-eslint/recommended'
|
|
7
|
+
- 'prettier'
|
|
8
|
+
- 'prettier/@typescript-eslint'
|
|
9
|
+
- 'prettier/react'
|
|
10
|
+
parser: '@typescript-eslint/parser'
|
|
11
|
+
parserOptions:
|
|
12
|
+
ecmaFeatures:
|
|
13
|
+
jsx: true
|
|
14
|
+
ecmaVersion: 12
|
|
15
|
+
sourceType: module
|
|
16
|
+
plugins:
|
|
17
|
+
- react
|
|
18
|
+
- react-hooks
|
|
19
|
+
- '@typescript-eslint'
|
|
20
|
+
rules:
|
|
21
|
+
"react/prop-types": "off"
|
|
22
|
+
"no-var": "error"
|
|
23
|
+
"prefer-const": "error"
|
|
24
|
+
"no-extra-bind": "error"
|
|
25
|
+
"no-implicit-globals": "error"
|
|
26
|
+
"react-hooks/rules-of-hooks": "error"
|
|
27
|
+
"react/no-unknown-property": ["error", { ignore: ["class"] }]
|
|
28
|
+
"@typescript-eslint/member-delimiter-style": ["warn", {
|
|
29
|
+
multiline: {
|
|
30
|
+
delimiter: 'none',
|
|
31
|
+
requireLast: false,
|
|
32
|
+
},
|
|
33
|
+
singleline: {
|
|
34
|
+
delimiter: 'comma',
|
|
35
|
+
requireLast: false,
|
|
36
|
+
},
|
|
37
|
+
}]
|
|
38
|
+
"quotes": ["error", "single", { "avoidEscape": true }]
|
|
39
|
+
'indent': 'off'
|
|
40
|
+
settings:
|
|
41
|
+
react:
|
|
42
|
+
# If this line cause problem in future. Check https://github.com/yannickcr/eslint-plugin-react/issues/1955
|
|
43
|
+
version: 'detect'
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
name: Publish Package
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- 'master'
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
build:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: write
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
- name: Checkout code
|
|
17
|
+
uses: actions/checkout@v3
|
|
18
|
+
with:
|
|
19
|
+
token: ${{ secrets.BOT_ACCESS_TOKEN }}
|
|
20
|
+
- name: Setup Git
|
|
21
|
+
run: |
|
|
22
|
+
git config --global user.name "dino-front-bot"
|
|
23
|
+
git config --global user.email "dinofront.libs@gmail.com"
|
|
24
|
+
|
|
25
|
+
- name: Specify Node Version
|
|
26
|
+
uses: actions/setup-node@v3
|
|
27
|
+
with:
|
|
28
|
+
node-version: 20
|
|
29
|
+
|
|
30
|
+
- name: Install dependencies
|
|
31
|
+
run: npm install --legacy-peer-deps
|
|
32
|
+
|
|
33
|
+
- name: Create .npmrc file
|
|
34
|
+
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_NEW_AUTH_TOKEN }}" > ~/.npmrc
|
|
35
|
+
|
|
36
|
+
- name: Build
|
|
37
|
+
run: npm run build
|
|
38
|
+
|
|
39
|
+
# Semantic Release
|
|
40
|
+
- name: Run Semantic Release
|
|
41
|
+
env:
|
|
42
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_NEW_AUTH_TOKEN }}
|
|
43
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
44
|
+
NPM_TOKEN: ${{ secrets.NPM_NEW_AUTH_TOKEN }}
|
|
45
|
+
run: npx semantic-release
|
|
46
|
+
|
|
47
|
+
- run: echo "VERSION=$(npm run version --silent)" >> $GITHUB_ENV
|
|
48
|
+
- run: echo "PACKAGE_NAME=$(npm run name --silent)" >> $GITHUB_ENV
|
|
49
|
+
|
|
50
|
+
# # Slack notification
|
|
51
|
+
# - run: echo "PIPE_URL=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID|Pipeline#$GITHUB_RUN_NUMBER" >> $GITHUB_ENV
|
|
52
|
+
# - name: Post to a Slack channel
|
|
53
|
+
# id: slack
|
|
54
|
+
# uses: slackapi/slack-github-action@v1.17.0
|
|
55
|
+
# with:
|
|
56
|
+
# payload: |
|
|
57
|
+
# {"attachments":[{"color":"#70aeff","blocks":[{"type":"section","text":{"type":"mrkdwn","text":"Notification sent from <${{ env.PIPE_URL }}>"}},{"type":"section","text":{"type":"mrkdwn","text":"${{ env.PACKAGE_NAME }}@${{ env.VERSION }} has been published"}}]}]}
|
|
58
|
+
# env:
|
|
59
|
+
# SLACK_WEBHOOK_URL: ${{ secrets.WEB_SLACK_WEBHOOK_URL }}
|
|
60
|
+
# SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
|
|
61
|
+
|
|
62
|
+
# Deployment on GitHub Pages
|
|
63
|
+
- name: Build Storybook
|
|
64
|
+
run: npm run build-storybook
|
|
65
|
+
|
|
66
|
+
- name: Deploy to GitHub Pages
|
|
67
|
+
uses: peaceiris/actions-gh-pages@v3
|
|
68
|
+
with:
|
|
69
|
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
70
|
+
publish_dir: ./storybook-static
|
|
71
|
+
enable_jekyll: false
|
package/.prettierrc
ADDED
package/.releaserc
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"branches": ["master", { "name": "alpha", "prerelease": true }],
|
|
3
|
+
"plugins": [
|
|
4
|
+
"@semantic-release/commit-analyzer",
|
|
5
|
+
"@semantic-release/release-notes-generator",
|
|
6
|
+
"@semantic-release/changelog",
|
|
7
|
+
["@semantic-release/npm", {"pkgRoot": "dist"}],
|
|
8
|
+
["@semantic-release/npm", {"pkgRoot": ".", "npmPublish": false}],
|
|
9
|
+
"@semantic-release/github",
|
|
10
|
+
[
|
|
11
|
+
"@semantic-release/git",
|
|
12
|
+
{
|
|
13
|
+
"assets": ["package.json", "CHANGELOG.md"],
|
|
14
|
+
"message": "chore(release): ${nextRelease.version} [skip ci]"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
],
|
|
18
|
+
"preset": "angular",
|
|
19
|
+
"tagFormat": "${version}",
|
|
20
|
+
"npmPublish": true
|
|
21
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { StorybookConfig } from '@storybook/react-webpack5';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
|
|
4
|
+
const config: StorybookConfig = {
|
|
5
|
+
framework: '@storybook/react-webpack5',
|
|
6
|
+
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
|
|
7
|
+
typescript: {
|
|
8
|
+
reactDocgen: 'react-docgen',
|
|
9
|
+
},
|
|
10
|
+
addons: [
|
|
11
|
+
{ name: 'storybook-design-token', options: { preserveCSSVars: true } },
|
|
12
|
+
'@storybook/addon-viewport',
|
|
13
|
+
'@storybook/addon-controls',
|
|
14
|
+
// TODO check do wee need outlining
|
|
15
|
+
// '@storybook/addon-outline',
|
|
16
|
+
'@storybook/addon-links'
|
|
17
|
+
],
|
|
18
|
+
webpackFinal: async (config, { configType }) => {
|
|
19
|
+
// @ts-ignore
|
|
20
|
+
config.module.rules.push({
|
|
21
|
+
test: /\.scss$/,
|
|
22
|
+
use: ['style-loader', 'css-loader', 'sass-loader'],
|
|
23
|
+
include: path.resolve(__dirname, '../')
|
|
24
|
+
}, {
|
|
25
|
+
test: /\.css$/,
|
|
26
|
+
use: ["style-loader", "css-loader"],
|
|
27
|
+
include: path.resolve(__dirname, '../'),
|
|
28
|
+
exclude: /node_modules/,
|
|
29
|
+
});
|
|
30
|
+
// @ts-ignore
|
|
31
|
+
config.resolve.extensions.push('.js', '.jsx', '.ts', '.tsx', '.css', '.scss');
|
|
32
|
+
return config
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export default config;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
2
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
3
|
+
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+Armenian:wght@100;200;400;500;600;700;800;900&family=Noto+Sans:wght@100;300;500;600;700;800;900&display=swap" rel="stylesheet">
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"javascript.validate.enable": false,
|
|
3
|
+
"javascript.format.enable": false,
|
|
4
|
+
"editor.formatOnSave": true,
|
|
5
|
+
"eslint.alwaysShowStatus": true,
|
|
6
|
+
"eslint.run": "onSave",
|
|
7
|
+
"prettier.semi": false,
|
|
8
|
+
"eslint.validate": [
|
|
9
|
+
"javascript",
|
|
10
|
+
"javascriptreact"
|
|
11
|
+
],
|
|
12
|
+
"editor.codeActionsOnSave": {
|
|
13
|
+
"source.fixAll.eslint": "explicit"
|
|
14
|
+
},
|
|
15
|
+
"git-blame.gitWebUrl": ""
|
|
16
|
+
}
|
package/CHANGELOG.md
ADDED
|
File without changes
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
const root = process.cwd();
|
|
5
|
+
|
|
6
|
+
// Directory containing SVG files
|
|
7
|
+
const svgDirectory = `${root}/svg-icons`;
|
|
8
|
+
|
|
9
|
+
// Output directory for React components
|
|
10
|
+
const outputDirectory = `${root}/src/components/SVGIcons`;
|
|
11
|
+
|
|
12
|
+
function extractPathFromSvg(svgContent) {
|
|
13
|
+
const pattern = /<svg[^>]*>([\s\S]*?)<\/svg>/;
|
|
14
|
+
const match = svgContent.match(pattern);
|
|
15
|
+
if (match && match[1]) {
|
|
16
|
+
return match[1];
|
|
17
|
+
}
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// Function to generate a valid React component name from SVG file name
|
|
22
|
+
function generateComponentName(fileName) {
|
|
23
|
+
// Remove file extension (.svg)
|
|
24
|
+
const componentName = fileName.replace('.svg', '');
|
|
25
|
+
|
|
26
|
+
// Split the remaining string into words using hyphen as delimiter
|
|
27
|
+
const words = componentName.split('-');
|
|
28
|
+
|
|
29
|
+
// Capitalize the first letter of each word and join them
|
|
30
|
+
const capitalizedWords = words.map(word => word.charAt(0).toUpperCase() + word.slice(1));
|
|
31
|
+
|
|
32
|
+
// Concatenate the capitalized words to form the component name
|
|
33
|
+
const finalComponentName = capitalizedWords.join('');
|
|
34
|
+
|
|
35
|
+
// Add "Icon" prefix
|
|
36
|
+
return 'Icon' + finalComponentName;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
// Function to generate React component code
|
|
41
|
+
function generateReactComponent(componentName, svgPath) {
|
|
42
|
+
// Generate React component code using the provided SVG path
|
|
43
|
+
// You can use a template string or any templating library to generate the component
|
|
44
|
+
return `import React, { ReactElement } from 'react'
|
|
45
|
+
import {ISVGIconProps} from './types';
|
|
46
|
+
import classNames from 'classnames'
|
|
47
|
+
|
|
48
|
+
export const ${componentName} = ({size, type, className = '', onClick, refHandler, id, dataId }: ISVGIconProps): ReactElement => (
|
|
49
|
+
<svg
|
|
50
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
51
|
+
className={classNames('svg-icon', {
|
|
52
|
+
[\`svg-icon__size-\${size}\`]: size,
|
|
53
|
+
[\`svg-icon__type-\${type}\`]: type,
|
|
54
|
+
[className]: className
|
|
55
|
+
})}
|
|
56
|
+
viewBox="0 0 24 24"
|
|
57
|
+
fill="none"
|
|
58
|
+
onClick={onClick}
|
|
59
|
+
ref={refHandler}
|
|
60
|
+
id={id}
|
|
61
|
+
data-id={dataId ? \`\${dataId}-svg-icon\` : ''}
|
|
62
|
+
>
|
|
63
|
+
${svgPath}
|
|
64
|
+
</svg>
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
export default ${componentName};`;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// Read SVG files from the directory
|
|
71
|
+
fs.readdir(svgDirectory, (err, files) => {
|
|
72
|
+
if (err) {
|
|
73
|
+
console.error('Error reading directory:', err);
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// Process each SVG file
|
|
78
|
+
files.forEach(file => {
|
|
79
|
+
const filePath = path.join(svgDirectory, file);
|
|
80
|
+
|
|
81
|
+
// Read SVG content
|
|
82
|
+
fs.readFile(filePath, 'utf8', (err, data) => {
|
|
83
|
+
if (err) {
|
|
84
|
+
console.error('Error reading file:', err);
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// Parse SVG content and extract path
|
|
89
|
+
const svgPath = extractPathFromSvg(data);
|
|
90
|
+
|
|
91
|
+
// Function to generate a valid React component name from SVG file name
|
|
92
|
+
const componentName = generateComponentName(file);
|
|
93
|
+
|
|
94
|
+
const outputPath = path.join(outputDirectory, `${componentName}.tsx`);
|
|
95
|
+
|
|
96
|
+
if (fs.existsSync(outputPath)) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
const reactComponent = generateReactComponent(componentName, svgPath);
|
|
100
|
+
|
|
101
|
+
// Write React component to file
|
|
102
|
+
fs.writeFile(outputPath, reactComponent, err => {
|
|
103
|
+
if (err) {
|
|
104
|
+
console.error('Error writing file:', err);
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
console.log(`React component ${componentName} created successfully.`);
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const fs = require('fs');
|
|
3
|
+
|
|
4
|
+
const root = process.cwd();
|
|
5
|
+
|
|
6
|
+
// Directory containing SVG components
|
|
7
|
+
const svgDirectory = `${root}/src/components/SVGIcons`;
|
|
8
|
+
|
|
9
|
+
fs.readdir(svgDirectory, (err, files) => {
|
|
10
|
+
if (err) {
|
|
11
|
+
console.error('Error reading directory:', err);
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const outputPath = path.join(svgDirectory, 'index.ts');
|
|
16
|
+
|
|
17
|
+
const content = files.reduce((acc, file) => {
|
|
18
|
+
return file.includes('Icon') ? `${acc};export * from './${file.replace('.tsx', '')}';` : acc;
|
|
19
|
+
}, '');
|
|
20
|
+
|
|
21
|
+
fs.writeFile(outputPath, content, err => {
|
|
22
|
+
if (err) {
|
|
23
|
+
console.error('Error writing file:', err);
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
console.log('All SVG components imported successfully.');
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
|
package/package.json
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
{
|
|
2
|
+
"homepage": "https://dinofrontend.github.io/dino_ui_library",
|
|
3
|
+
"name": "hrm_ui_lib",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"description": "UI library for Dino",
|
|
6
|
+
"private": false,
|
|
7
|
+
"main": "index.js",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"version": "echo $npm_package_version",
|
|
10
|
+
"name": "echo $npm_package_name",
|
|
11
|
+
"start": "react-scripts start",
|
|
12
|
+
"build": "rollup -c",
|
|
13
|
+
"eject": "react-scripts eject",
|
|
14
|
+
"storybook": "storybook dev -p 6006 public",
|
|
15
|
+
"build-storybook": "storybook build",
|
|
16
|
+
"lint": "eslint \"./src/**/*.{js,jsx,ts,tsx}\"",
|
|
17
|
+
"prettier": "prettier --write \"./{src,stories}/**/**.{js,jsx,ts,tsx}\"",
|
|
18
|
+
"check": "npm run prettier && npm run lint && tsc",
|
|
19
|
+
"install-latest": "npm install --legacy-peer-deps",
|
|
20
|
+
"import-all-svg-components": "node ./bin/import_all_svg_components.js",
|
|
21
|
+
"publish-alpha-version": "cd \"./dist/\" && npm publish --tag alpha",
|
|
22
|
+
"generate-svg-component": "node ./bin/generate_svg_component.js && npm run import-all-svg-components && npm run check"
|
|
23
|
+
},
|
|
24
|
+
"eslintConfig": {
|
|
25
|
+
"extends": [
|
|
26
|
+
"react-app",
|
|
27
|
+
"react-app/jest"
|
|
28
|
+
],
|
|
29
|
+
"overrides": [
|
|
30
|
+
{
|
|
31
|
+
"files": [
|
|
32
|
+
"**/*.stories.*"
|
|
33
|
+
],
|
|
34
|
+
"rules": {
|
|
35
|
+
"import/no-anonymous-default-export": "off"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
"keywords": [],
|
|
41
|
+
"author": "",
|
|
42
|
+
"license": "ISC",
|
|
43
|
+
"peerDependencies": {
|
|
44
|
+
"react": "^18.2.0",
|
|
45
|
+
"react-dom": "^18.2.0",
|
|
46
|
+
"yup": "^1.2.0"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@commitlint/cli": "^19.4.1",
|
|
50
|
+
"@commitlint/config-conventional": "^19.4.1",
|
|
51
|
+
"@rollup/plugin-babel": "^6.0.4",
|
|
52
|
+
"@rollup/plugin-commonjs": "^22.0.1",
|
|
53
|
+
"@rollup/plugin-dynamic-import-vars": "^2.1.2",
|
|
54
|
+
"@rollup/plugin-image": "^3.0.3",
|
|
55
|
+
"@rollup/plugin-json": "^6.0.0",
|
|
56
|
+
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
57
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
58
|
+
"@semantic-release/changelog": "^6.0.3",
|
|
59
|
+
"@semantic-release/git": "^10.0.1",
|
|
60
|
+
"@semantic-release/github": "^10.1.7",
|
|
61
|
+
"@semantic-release/npm": "^12.0.1",
|
|
62
|
+
"@storybook/addon-actions": "^7.6.9",
|
|
63
|
+
"@storybook/addon-essentials": "^7.6.9",
|
|
64
|
+
"@storybook/addon-interactions": "^7.6.9",
|
|
65
|
+
"@storybook/addon-links": "^7.6.9",
|
|
66
|
+
"@storybook/node-logger": "^7.6.9",
|
|
67
|
+
"@storybook/react": "^7.6.10",
|
|
68
|
+
"@storybook/react-webpack5": "^7.6.9",
|
|
69
|
+
"@testing-library/react": "^13.3.0",
|
|
70
|
+
"@testing-library/user-event": "^13.5.0",
|
|
71
|
+
"@types/node": "^16.11.43",
|
|
72
|
+
"@types/react-calendar": "^3.9.0",
|
|
73
|
+
"@types/react-datepicker": "^4.8.0",
|
|
74
|
+
"@types/react-syntax-highlighter": "^15.5.6",
|
|
75
|
+
"@types/react-table": "^7.7.18",
|
|
76
|
+
"@types/styled-components": "^5.1.25",
|
|
77
|
+
"@typescript-eslint/eslint-plugin": "^4.1.1",
|
|
78
|
+
"@typescript-eslint/parser": "^4.1.1",
|
|
79
|
+
"ajv": "8.13.0",
|
|
80
|
+
"css-loader": "^7.1.2",
|
|
81
|
+
"eslint": "^7.9.0",
|
|
82
|
+
"eslint-config-prettier": "^6.11.0",
|
|
83
|
+
"eslint-plugin-react": "^7.20.6",
|
|
84
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
85
|
+
"eslint-plugin-storybook": "^0.6.10",
|
|
86
|
+
"extract-loader": "^5.1.0",
|
|
87
|
+
"file-loader": "^6.2.0",
|
|
88
|
+
"husky": "^4.3.0",
|
|
89
|
+
"less": "^3.12.2",
|
|
90
|
+
"less-loader": "^7.0.1",
|
|
91
|
+
"mini-css-extract-plugin": "^0.11.3",
|
|
92
|
+
"postcss": "^8.1.9",
|
|
93
|
+
"postcss-import": "12.0.1",
|
|
94
|
+
"prettier": "^2.1.2",
|
|
95
|
+
"react": "^18.2.0",
|
|
96
|
+
"react-dom": "^18.2.0",
|
|
97
|
+
"react-scripts": "5.0.1",
|
|
98
|
+
"rollup": "^2.76.0",
|
|
99
|
+
"rollup-plugin-babel": "^4.4.0",
|
|
100
|
+
"rollup-plugin-copy": "^3.4.0",
|
|
101
|
+
"rollup-plugin-generate-package-json": "^3.2.0",
|
|
102
|
+
"rollup-plugin-ignore-import": "^1.3.2",
|
|
103
|
+
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
104
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
105
|
+
"rollup-plugin-sass": "^1.12.21",
|
|
106
|
+
"rollup-plugin-typescript2": "^0.32.1",
|
|
107
|
+
"sass-loader": "^10.4.1",
|
|
108
|
+
"semantic-release": "^24.1.0",
|
|
109
|
+
"storybook": "^7.6.14",
|
|
110
|
+
"style-loader": "^3.3.4",
|
|
111
|
+
"ts-loader": "^8.0.4",
|
|
112
|
+
"typescript": "^4.9.5",
|
|
113
|
+
"yup": "^1.2.0"
|
|
114
|
+
},
|
|
115
|
+
"dependencies": {
|
|
116
|
+
"@hookform/error-message": "^2.0.1",
|
|
117
|
+
"@hookform/resolvers": "^2.9.11",
|
|
118
|
+
"@types/react-input-mask": "^3.0.2",
|
|
119
|
+
"classnames": "^2.3.2",
|
|
120
|
+
"dayjs": "^1.11.10",
|
|
121
|
+
"framer-motion": "4.1.17",
|
|
122
|
+
"react-datepicker": "^4.25.0",
|
|
123
|
+
"react-hook-form": "^7.50.0",
|
|
124
|
+
"react-input-mask": "^2.0.4",
|
|
125
|
+
"react-number-format": "^5.3.1",
|
|
126
|
+
"react-paginate": "^8.2.0",
|
|
127
|
+
"react-syntax-highlighter": "^15.5.0",
|
|
128
|
+
"react-table": "^7.8.0",
|
|
129
|
+
"react-toastify": "10.0.5",
|
|
130
|
+
"sass": "^1.56.1",
|
|
131
|
+
"storybook-design-token": "^2.8.2"
|
|
132
|
+
},
|
|
133
|
+
"husky": {
|
|
134
|
+
"hooks": {
|
|
135
|
+
"pre-commit": "npm run check",
|
|
136
|
+
"commit-msg": "commitlint --edit $1"
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"repository": {
|
|
140
|
+
"type": "git",
|
|
141
|
+
"url": "https://github.com/dinofrontend/dino_ui_library.git"
|
|
142
|
+
}
|
|
143
|
+
}
|
package/rollup.config.js
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import resolve from '@rollup/plugin-node-resolve'
|
|
2
|
+
import commonjs from '@rollup/plugin-commonjs'
|
|
3
|
+
import json from '@rollup/plugin-json'
|
|
4
|
+
import copy from 'rollup-plugin-copy'
|
|
5
|
+
import fs from 'fs'
|
|
6
|
+
import path from 'path'
|
|
7
|
+
import { exec } from 'child_process'
|
|
8
|
+
import babel from 'rollup-plugin-babel'
|
|
9
|
+
import pkg from './package.json'
|
|
10
|
+
import generatePackageJson from 'rollup-plugin-generate-package-json'
|
|
11
|
+
import image from '@rollup/plugin-image'
|
|
12
|
+
import postcss from 'rollup-plugin-postcss'
|
|
13
|
+
import { renderSync } from 'sass'
|
|
14
|
+
|
|
15
|
+
const extensions = ['.ts', '.tsx', '.js', '.jsx']
|
|
16
|
+
const ignoreExtensions = ['.stories.tsx', '.stories.d.ts']
|
|
17
|
+
|
|
18
|
+
const external = [
|
|
19
|
+
...Object.keys(pkg.peerDependencies || {}),
|
|
20
|
+
...Object.keys(pkg.dependencies || {})
|
|
21
|
+
]
|
|
22
|
+
|
|
23
|
+
// create input config for rollup for each folder
|
|
24
|
+
const getInputOptions = (localPath = 'src', currentInputOptions = {}) => {
|
|
25
|
+
return fs.readdirSync(path.join(__dirname, localPath)).reduce((initial, current) => {
|
|
26
|
+
if (fs.statSync(path.join(__dirname, `${localPath}/${current}`)).isDirectory()) {
|
|
27
|
+
getInputOptions(`${localPath}/${current}`, initial)
|
|
28
|
+
} else {
|
|
29
|
+
const regexExecResult = /(.+?)(\.[^.]*$|$)/g.exec(current)
|
|
30
|
+
const chunkName = `${localPath}/${regexExecResult[1]}`.replace(/^src\/?/g, '')
|
|
31
|
+
if (
|
|
32
|
+
extensions.includes(regexExecResult[2]) &&
|
|
33
|
+
!ignoreExtensions.some((e) => regexExecResult[0].endsWith(e))
|
|
34
|
+
) {
|
|
35
|
+
initial[chunkName] = `${localPath}/${current}`
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return initial
|
|
39
|
+
}, currentInputOptions)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// custom plugin to generate declaration files
|
|
43
|
+
const dtsGenerator = function (options) {
|
|
44
|
+
options = {
|
|
45
|
+
declarationDir: 'dist',
|
|
46
|
+
outDir: 'dts-temp',
|
|
47
|
+
...(options || {})
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
buildEnd() {
|
|
51
|
+
exec(
|
|
52
|
+
`tsc -d --declarationDir ${options.declarationDir} --outDir ${options.outDir} --project ./tsconfig.json`,
|
|
53
|
+
(err) => {
|
|
54
|
+
if (err) {
|
|
55
|
+
console.log(err)
|
|
56
|
+
throw "Couldn't generate .d.ts files..."
|
|
57
|
+
}
|
|
58
|
+
exec(`rimraf ${options.outDir}`)
|
|
59
|
+
console.log('Declaration files generated successfully')
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function writeCSS() {
|
|
67
|
+
return {
|
|
68
|
+
name: 'write-css',
|
|
69
|
+
async generateBundle(_, bundle) {
|
|
70
|
+
const scssFile = bundle['assets/styles/styles.scss']
|
|
71
|
+
|
|
72
|
+
if (scssFile) {
|
|
73
|
+
const scssContent = scssFile.source.toString()
|
|
74
|
+
const cssContent = renderSync({ data: scssContent }).css.toString()
|
|
75
|
+
|
|
76
|
+
if (!fs.existsSync('dist/assets/styles')) {
|
|
77
|
+
fs.mkdirSync('dist/assets/styles', { recursive: true })
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
const cssFilePath = path.resolve('dist/assets/styles/styles.css')
|
|
81
|
+
fs.writeFileSync(cssFilePath, cssContent)
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const plugins = [
|
|
88
|
+
json(),
|
|
89
|
+
resolve({ extensions }),
|
|
90
|
+
babel({
|
|
91
|
+
babelrc: true,
|
|
92
|
+
extensions,
|
|
93
|
+
runtimeHelpers: true,
|
|
94
|
+
exclude: 'node_modules/**',
|
|
95
|
+
presets: ['@babel/preset-env']
|
|
96
|
+
}),
|
|
97
|
+
commonjs({ include: 'node_modules/**' }),
|
|
98
|
+
postcss({
|
|
99
|
+
plugins: [],
|
|
100
|
+
inject: false,
|
|
101
|
+
extract: 'assets/styles/styles.scss',
|
|
102
|
+
sourceMap: false,
|
|
103
|
+
minimize: true,
|
|
104
|
+
extensions: ['.scss', '.css']
|
|
105
|
+
}),
|
|
106
|
+
copy({
|
|
107
|
+
targets: [
|
|
108
|
+
{ src: 'src/assets/images/', dest: 'dist' },
|
|
109
|
+
{ src: 'src/assets/styles/helpers/_mixin.scss', dest: 'dist' },
|
|
110
|
+
{ src: './README.md', dest: 'dist' }
|
|
111
|
+
],
|
|
112
|
+
flatten: false
|
|
113
|
+
}),
|
|
114
|
+
image(),
|
|
115
|
+
writeCSS()
|
|
116
|
+
]
|
|
117
|
+
|
|
118
|
+
export default [
|
|
119
|
+
{
|
|
120
|
+
input: getInputOptions(),
|
|
121
|
+
output: {
|
|
122
|
+
dir: 'dist',
|
|
123
|
+
assetFileNames: '[name][extname]',
|
|
124
|
+
sourcemap: false
|
|
125
|
+
},
|
|
126
|
+
external,
|
|
127
|
+
plugins: [
|
|
128
|
+
...plugins,
|
|
129
|
+
dtsGenerator(),
|
|
130
|
+
generatePackageJson({
|
|
131
|
+
inputFolder: '.',
|
|
132
|
+
baseContents: (pkg) => ({
|
|
133
|
+
name: pkg.name,
|
|
134
|
+
version: pkg.version,
|
|
135
|
+
description: pkg.description,
|
|
136
|
+
main: './index.js',
|
|
137
|
+
module: './index.js',
|
|
138
|
+
author: pkg.author,
|
|
139
|
+
license: pkg.license,
|
|
140
|
+
repository: pkg.repository,
|
|
141
|
+
peerDependencies: pkg.peerDependencies,
|
|
142
|
+
dependencies: pkg.dependencies,
|
|
143
|
+
sideEffects: false,
|
|
144
|
+
homepage: pkg.homepage
|
|
145
|
+
})
|
|
146
|
+
})
|
|
147
|
+
]
|
|
148
|
+
}
|
|
149
|
+
]
|