@cleen/ui 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +37 -0
- package/dist/charts/index.d.ts +118 -0
- package/dist/charts/index.js +611 -0
- package/dist/icons/index.d.ts +35 -0
- package/dist/icons/index.js +77 -0
- package/dist/index.d.ts +2959 -0
- package/dist/index.js +16710 -0
- package/package.json +54 -54
- package/src/charts/chart/Chart.tsx +0 -82
- package/src/charts/chart/constant.ts +0 -50
- package/src/charts/chart/index.ts +0 -2
- package/src/charts/chart/types/apexcharts.ts +0 -9
- package/src/charts/chart/variants/BellCurve/BellCurve.tsx +0 -215
- package/src/charts/chart/variants/BellCurve/constant.ts +0 -112
- package/src/charts/chart/variants/BellCurve/helper.ts +0 -116
- package/src/charts/chart/variants/BellCurve/index.ts +0 -2
- package/src/charts/chart/variants/BellCurve/types/bellCurve.ts +0 -47
- package/src/charts/chart/variants/BellCurve/types/props.ts +0 -21
- package/src/charts/chart/variants/RadarChart/RadarChart.tsx +0 -22
- package/src/charts/chart/variants/RadarChart/constant.ts +0 -28
- package/src/charts/chart/variants/RadarChart/index.ts +0 -1
- package/src/charts/chart/variants/ScatterChart/ScatterChart.tsx +0 -23
- package/src/charts/chart/variants/ScatterChart/constant.ts +0 -54
- package/src/charts/chart/variants/ScatterChart/index.ts +0 -1
- package/src/charts/chart/variants/index.ts +0 -3
- package/src/charts/index.ts +0 -2
- package/src/charts/simpleChart/SimpleChart.tsx +0 -54
- package/src/charts/simpleChart/index.ts +0 -1
- package/src/components/advancedProgressBar/AdvancedProgressBar.tsx +0 -156
- package/src/components/advancedProgressBar/blocks/Bar.tsx +0 -118
- package/src/components/advancedProgressBar/blocks/BlockLabel.tsx +0 -49
- package/src/components/advancedProgressBar/blocks/Clamp.tsx +0 -85
- package/src/components/advancedProgressBar/constants.ts +0 -6
- package/src/components/advancedProgressBar/index.ts +0 -2
- package/src/components/advancedProgressBar/types/props.ts +0 -69
- package/src/components/advancedProgressBar/utils.ts +0 -17
- package/src/components/audioPlayback/AudioPlayback.tsx +0 -141
- package/src/components/audioPlayback/index.ts +0 -2
- package/src/components/audioRecorder/AudioRecorder.tsx +0 -391
- package/src/components/audioRecorder/constant/default.ts +0 -19
- package/src/components/audioRecorder/constant/labels.ts +0 -9
- package/src/components/audioRecorder/index.ts +0 -2
- package/src/components/audioRecorder/types/props.ts +0 -56
- package/src/components/avatar/Avatar.tsx +0 -132
- package/src/components/avatar/index.ts +0 -1
- package/src/components/avatar/variants.ts +0 -9
- package/src/components/avatarRow/AvatarRow.tsx +0 -127
- package/src/components/avatarRow/index.ts +0 -1
- package/src/components/breadcrumb/Breadcrumb.tsx +0 -158
- package/src/components/breadcrumb/index.ts +0 -1
- package/src/components/button/Button.tsx +0 -114
- package/src/components/button/index.ts +0 -2
- package/src/components/button/variants.ts +0 -41
- package/src/components/card/Card.tsx +0 -197
- package/src/components/card/index.ts +0 -3
- package/src/components/card/variants/CardIcon/CardIcon.tsx +0 -158
- package/src/components/card/variants/CardMedia/CardMedia.tsx +0 -127
- package/src/components/checkbox/Checkbox.tsx +0 -246
- package/src/components/checkbox/index.ts +0 -1
- package/src/components/checkbox/variants.ts +0 -13
- package/src/components/checkboxGroup/CheckboxGroup.tsx +0 -163
- package/src/components/checkboxGroup/index.ts +0 -1
- package/src/components/cleenIcon/CleenIcon.tsx +0 -674
- package/src/components/cleenIcon/icons/IconAlertCircle.tsx +0 -22
- package/src/components/cleenIcon/icons/IconAlertFeatured.tsx +0 -30
- package/src/components/cleenIcon/icons/IconAlertOctagon.tsx +0 -21
- package/src/components/cleenIcon/icons/IconAlertTriangle.tsx +0 -25
- package/src/components/cleenIcon/icons/IconAlignRight.tsx +0 -25
- package/src/components/cleenIcon/icons/IconArrowDown.tsx +0 -25
- package/src/components/cleenIcon/icons/IconArrowLeft.tsx +0 -25
- package/src/components/cleenIcon/icons/IconArrowLeft2.tsx +0 -22
- package/src/components/cleenIcon/icons/IconArrowRight.tsx +0 -25
- package/src/components/cleenIcon/icons/IconArrowToTop.tsx +0 -20
- package/src/components/cleenIcon/icons/IconArrowUp.tsx +0 -22
- package/src/components/cleenIcon/icons/IconArrowUpRight.tsx +0 -22
- package/src/components/cleenIcon/icons/IconArrowUpRightNarrow.tsx +0 -22
- package/src/components/cleenIcon/icons/IconArrowUpRightSquare.tsx +0 -22
- package/src/components/cleenIcon/icons/IconAttachment.tsx +0 -22
- package/src/components/cleenIcon/icons/IconBarChartSquare.tsx +0 -22
- package/src/components/cleenIcon/icons/IconBold.tsx +0 -16
- package/src/components/cleenIcon/icons/IconBookmarkCheck.tsx +0 -22
- package/src/components/cleenIcon/icons/IconBookmarkCheckFill.tsx +0 -37
- package/src/components/cleenIcon/icons/IconBookmarkPlus.tsx +0 -22
- package/src/components/cleenIcon/icons/IconBookmarkX.tsx +0 -22
- package/src/components/cleenIcon/icons/IconBoxLines.tsx +0 -16
- package/src/components/cleenIcon/icons/IconBoxText.tsx +0 -24
- package/src/components/cleenIcon/icons/IconBracketsCheck.tsx +0 -25
- package/src/components/cleenIcon/icons/IconBracketsEllipses.tsx +0 -22
- package/src/components/cleenIcon/icons/IconBuilding.tsx +0 -22
- package/src/components/cleenIcon/icons/IconCalendar.tsx +0 -25
- package/src/components/cleenIcon/icons/IconCertificateHeart.tsx +0 -25
- package/src/components/cleenIcon/icons/IconCheck.tsx +0 -22
- package/src/components/cleenIcon/icons/IconCheckCircle.tsx +0 -22
- package/src/components/cleenIcon/icons/IconCheckCircleBroken.tsx +0 -25
- package/src/components/cleenIcon/icons/IconCheckFill.tsx +0 -45
- package/src/components/cleenIcon/icons/IconCheckVerified.tsx +0 -22
- package/src/components/cleenIcon/icons/IconChevronDown.tsx +0 -22
- package/src/components/cleenIcon/icons/IconChevronLeft.tsx +0 -25
- package/src/components/cleenIcon/icons/IconChevronLeftDouble.tsx +0 -22
- package/src/components/cleenIcon/icons/IconChevronRight.tsx +0 -25
- package/src/components/cleenIcon/icons/IconChevronRightDouble.tsx +0 -22
- package/src/components/cleenIcon/icons/IconChevronSelectorVertical.tsx +0 -22
- package/src/components/cleenIcon/icons/IconChevronUp.tsx +0 -25
- package/src/components/cleenIcon/icons/IconCircleSwap.tsx +0 -22
- package/src/components/cleenIcon/icons/IconClockFastForward.tsx +0 -25
- package/src/components/cleenIcon/icons/IconClockRewind.tsx +0 -25
- package/src/components/cleenIcon/icons/IconClockRewind2.tsx +0 -21
- package/src/components/cleenIcon/icons/IconCodeBrowser.tsx +0 -25
- package/src/components/cleenIcon/icons/IconCodeCircle.tsx +0 -22
- package/src/components/cleenIcon/icons/IconColors.tsx +0 -25
- package/src/components/cleenIcon/icons/IconColumnEdit.tsx +0 -19
- package/src/components/cleenIcon/icons/IconCopy.tsx +0 -25
- package/src/components/cleenIcon/icons/IconCopy2.tsx +0 -22
- package/src/components/cleenIcon/icons/IconCopy3.tsx +0 -25
- package/src/components/cleenIcon/icons/IconCopy4.tsx +0 -25
- package/src/components/cleenIcon/icons/IconCopy5.tsx +0 -25
- package/src/components/cleenIcon/icons/IconCopyCheck.tsx +0 -22
- package/src/components/cleenIcon/icons/IconCube.tsx +0 -25
- package/src/components/cleenIcon/icons/IconCubeOutline.tsx +0 -22
- package/src/components/cleenIcon/icons/IconCursorBox.tsx +0 -25
- package/src/components/cleenIcon/icons/IconDataflow.tsx +0 -22
- package/src/components/cleenIcon/icons/IconDataflow2.tsx +0 -22
- package/src/components/cleenIcon/icons/IconDataflow3.tsx +0 -29
- package/src/components/cleenIcon/icons/IconDelete.tsx +0 -25
- package/src/components/cleenIcon/icons/IconDollarCircle.tsx +0 -25
- package/src/components/cleenIcon/icons/IconDotsGrid.tsx +0 -74
- package/src/components/cleenIcon/icons/IconDotsHorizontal.tsx +0 -34
- package/src/components/cleenIcon/icons/IconDotsVertical.tsx +0 -38
- package/src/components/cleenIcon/icons/IconEdit.tsx +0 -25
- package/src/components/cleenIcon/icons/IconEditable.tsx +0 -25
- package/src/components/cleenIcon/icons/IconExpand.tsx +0 -22
- package/src/components/cleenIcon/icons/IconEye.tsx +0 -28
- package/src/components/cleenIcon/icons/IconEyeHidden.tsx +0 -25
- package/src/components/cleenIcon/icons/IconEyeHidden2.tsx +0 -24
- package/src/components/cleenIcon/icons/IconFaceSmile.tsx +0 -24
- package/src/components/cleenIcon/icons/IconFilter.tsx +0 -22
- package/src/components/cleenIcon/icons/IconFilter2.tsx +0 -22
- package/src/components/cleenIcon/icons/IconFlag.tsx +0 -22
- package/src/components/cleenIcon/icons/IconFlag2.tsx +0 -25
- package/src/components/cleenIcon/icons/IconFlag3.tsx +0 -16
- package/src/components/cleenIcon/icons/IconHandShield.tsx +0 -22
- package/src/components/cleenIcon/icons/IconHash.tsx +0 -22
- package/src/components/cleenIcon/icons/IconHeadsetMic.tsx +0 -21
- package/src/components/cleenIcon/icons/IconHeart.tsx +0 -24
- package/src/components/cleenIcon/icons/IconHouseLine.tsx +0 -22
- package/src/components/cleenIcon/icons/IconImage.tsx +0 -22
- package/src/components/cleenIcon/icons/IconImage2.tsx +0 -22
- package/src/components/cleenIcon/icons/IconImage3.tsx +0 -17
- package/src/components/cleenIcon/icons/IconImage4.tsx +0 -25
- package/src/components/cleenIcon/icons/IconImageCheck.tsx +0 -22
- package/src/components/cleenIcon/icons/IconInfoCircle.tsx +0 -22
- package/src/components/cleenIcon/icons/IconInfoHexagon.tsx +0 -25
- package/src/components/cleenIcon/icons/IconItalic.tsx +0 -16
- package/src/components/cleenIcon/icons/IconLayersMultiple.tsx +0 -22
- package/src/components/cleenIcon/icons/IconLayersSingle.tsx +0 -22
- package/src/components/cleenIcon/icons/IconLayout.tsx +0 -22
- package/src/components/cleenIcon/icons/IconLayout2.tsx +0 -22
- package/src/components/cleenIcon/icons/IconLayoutColumns.tsx +0 -20
- package/src/components/cleenIcon/icons/IconLayoutCustom.tsx +0 -16
- package/src/components/cleenIcon/icons/IconLayoutSequential.tsx +0 -16
- package/src/components/cleenIcon/icons/IconLayoutStuffed.tsx +0 -20
- package/src/components/cleenIcon/icons/IconLayoutTile.tsx +0 -16
- package/src/components/cleenIcon/icons/IconLifeBuoy.tsx +0 -29
- package/src/components/cleenIcon/icons/IconLightbulb.tsx +0 -22
- package/src/components/cleenIcon/icons/IconLightning.tsx +0 -22
- package/src/components/cleenIcon/icons/IconLightning2.tsx +0 -25
- package/src/components/cleenIcon/icons/IconLightningFast.tsx +0 -22
- package/src/components/cleenIcon/icons/IconLineChartBar.tsx +0 -22
- package/src/components/cleenIcon/icons/IconLineChartBreakoutSquare.tsx +0 -22
- package/src/components/cleenIcon/icons/IconLineChartUp.tsx +0 -25
- package/src/components/cleenIcon/icons/IconLineChartUp2.tsx +0 -34
- package/src/components/cleenIcon/icons/IconLines.tsx +0 -22
- package/src/components/cleenIcon/icons/IconLinesCheck.tsx +0 -16
- package/src/components/cleenIcon/icons/IconLinesPlay.tsx +0 -23
- package/src/components/cleenIcon/icons/IconLink.tsx +0 -25
- package/src/components/cleenIcon/icons/IconLink2.tsx +0 -24
- package/src/components/cleenIcon/icons/IconLink3.tsx +0 -21
- package/src/components/cleenIcon/icons/IconLink4.tsx +0 -17
- package/src/components/cleenIcon/icons/IconLink5.tsx +0 -22
- package/src/components/cleenIcon/icons/IconListBullet.tsx +0 -18
- package/src/components/cleenIcon/icons/IconListOrder.tsx +0 -20
- package/src/components/cleenIcon/icons/IconListOrder2.tsx +0 -16
- package/src/components/cleenIcon/icons/IconLock.tsx +0 -22
- package/src/components/cleenIcon/icons/IconLock2.tsx +0 -22
- package/src/components/cleenIcon/icons/IconLogIn.tsx +0 -25
- package/src/components/cleenIcon/icons/IconLogOut.tsx +0 -25
- package/src/components/cleenIcon/icons/IconLogOut2.tsx +0 -22
- package/src/components/cleenIcon/icons/IconMagicWand.tsx +0 -25
- package/src/components/cleenIcon/icons/IconMagicWand2.tsx +0 -22
- package/src/components/cleenIcon/icons/IconMail.tsx +0 -25
- package/src/components/cleenIcon/icons/IconMessageSquare.tsx +0 -25
- package/src/components/cleenIcon/icons/IconMessageSquare2.tsx +0 -22
- package/src/components/cleenIcon/icons/IconMessageXSquare.tsx +0 -25
- package/src/components/cleenIcon/icons/IconMinusCircle.tsx +0 -22
- package/src/components/cleenIcon/icons/IconMobile.tsx +0 -25
- package/src/components/cleenIcon/icons/IconMonitor.tsx +0 -22
- package/src/components/cleenIcon/icons/IconMonitor2.tsx +0 -25
- package/src/components/cleenIcon/icons/IconMonitor3.tsx +0 -25
- package/src/components/cleenIcon/icons/IconMoonCircle.tsx +0 -28
- package/src/components/cleenIcon/icons/IconNavigationPointer.tsx +0 -22
- package/src/components/cleenIcon/icons/IconNotificationBox.tsx +0 -22
- package/src/components/cleenIcon/icons/IconPCSetup.tsx +0 -22
- package/src/components/cleenIcon/icons/IconPalette.tsx +0 -40
- package/src/components/cleenIcon/icons/IconPasscodeLock.tsx +0 -25
- package/src/components/cleenIcon/icons/IconPencil.tsx +0 -25
- package/src/components/cleenIcon/icons/IconPercentageCircle.tsx +0 -29
- package/src/components/cleenIcon/icons/IconPerspective.tsx +0 -22
- package/src/components/cleenIcon/icons/IconPhoneCall.tsx +0 -25
- package/src/components/cleenIcon/icons/IconPin.tsx +0 -22
- package/src/components/cleenIcon/icons/IconPlayCircle.tsx +0 -28
- package/src/components/cleenIcon/icons/IconPlus.tsx +0 -22
- package/src/components/cleenIcon/icons/IconPlusCircle.tsx +0 -25
- package/src/components/cleenIcon/icons/IconPulse.tsx +0 -25
- package/src/components/cleenIcon/icons/IconQuestionCircle.tsx +0 -24
- package/src/components/cleenIcon/icons/IconRadioButton.tsx +0 -27
- package/src/components/cleenIcon/icons/IconRadioButtonActive.tsx +0 -39
- package/src/components/cleenIcon/icons/IconReceiptCheck.tsx +0 -25
- package/src/components/cleenIcon/icons/IconRedo.tsx +0 -16
- package/src/components/cleenIcon/icons/IconRefresh.tsx +0 -22
- package/src/components/cleenIcon/icons/IconRefresh2.tsx +0 -22
- package/src/components/cleenIcon/icons/IconRefresh3.tsx +0 -20
- package/src/components/cleenIcon/icons/IconRepeat.tsx +0 -22
- package/src/components/cleenIcon/icons/IconRepeat2.tsx +0 -22
- package/src/components/cleenIcon/icons/IconRetweet.tsx +0 -33
- package/src/components/cleenIcon/icons/IconRoundChart.tsx +0 -25
- package/src/components/cleenIcon/icons/IconRoundChart2.tsx +0 -29
- package/src/components/cleenIcon/icons/IconRoute.tsx +0 -22
- package/src/components/cleenIcon/icons/IconSave.tsx +0 -25
- package/src/components/cleenIcon/icons/IconSave2.tsx +0 -22
- package/src/components/cleenIcon/icons/IconScanDots.tsx +0 -22
- package/src/components/cleenIcon/icons/IconSearch.tsx +0 -22
- package/src/components/cleenIcon/icons/IconSend.tsx +0 -25
- package/src/components/cleenIcon/icons/IconSettings.tsx +0 -32
- package/src/components/cleenIcon/icons/IconSettings2.tsx +0 -25
- package/src/components/cleenIcon/icons/IconSettings3.tsx +0 -22
- package/src/components/cleenIcon/icons/IconShieldLightning.tsx +0 -22
- package/src/components/cleenIcon/icons/IconShieldPlus.tsx +0 -22
- package/src/components/cleenIcon/icons/IconShieldRemove.tsx +0 -16
- package/src/components/cleenIcon/icons/IconShuffle.tsx +0 -25
- package/src/components/cleenIcon/icons/IconSlashCircle.tsx +0 -22
- package/src/components/cleenIcon/icons/IconSlashOctagon.tsx +0 -22
- package/src/components/cleenIcon/icons/IconSocialGlobe.tsx +0 -23
- package/src/components/cleenIcon/icons/IconSocialLinkedin.tsx +0 -21
- package/src/components/cleenIcon/icons/IconSocialX.tsx +0 -28
- package/src/components/cleenIcon/icons/IconSpeedometer.tsx +0 -22
- package/src/components/cleenIcon/icons/IconStairsRound.tsx +0 -21
- package/src/components/cleenIcon/icons/IconStar.tsx +0 -22
- package/src/components/cleenIcon/icons/IconStarHalf.tsx +0 -39
- package/src/components/cleenIcon/icons/IconStars.tsx +0 -28
- package/src/components/cleenIcon/icons/IconStars2.tsx +0 -29
- package/src/components/cleenIcon/icons/IconStrikethrough.tsx +0 -16
- package/src/components/cleenIcon/icons/IconSuccessFeatured.tsx +0 -30
- package/src/components/cleenIcon/icons/IconSun.tsx +0 -22
- package/src/components/cleenIcon/icons/IconSwitchHorizontal.tsx +0 -22
- package/src/components/cleenIcon/icons/IconTag.tsx +0 -22
- package/src/components/cleenIcon/icons/IconTarget.tsx +0 -21
- package/src/components/cleenIcon/icons/IconTarget2.tsx +0 -34
- package/src/components/cleenIcon/icons/IconTextFormat.tsx +0 -17
- package/src/components/cleenIcon/icons/IconTextFormat2.tsx +0 -22
- package/src/components/cleenIcon/icons/IconTextHighlight.tsx +0 -16
- package/src/components/cleenIcon/icons/IconTranslate.tsx +0 -25
- package/src/components/cleenIcon/icons/IconTrash.tsx +0 -25
- package/src/components/cleenIcon/icons/IconTrending.tsx +0 -22
- package/src/components/cleenIcon/icons/IconUnderline.tsx +0 -16
- package/src/components/cleenIcon/icons/IconUndo.tsx +0 -22
- package/src/components/cleenIcon/icons/IconUndo2.tsx +0 -16
- package/src/components/cleenIcon/icons/IconUploadCloud.tsx +0 -22
- package/src/components/cleenIcon/icons/IconUser.tsx +0 -22
- package/src/components/cleenIcon/icons/IconUserEdit.tsx +0 -25
- package/src/components/cleenIcon/icons/IconUserRight.tsx +0 -22
- package/src/components/cleenIcon/icons/IconUserSquare.tsx +0 -25
- package/src/components/cleenIcon/icons/IconUsers.tsx +0 -25
- package/src/components/cleenIcon/icons/IconUsersUp.tsx +0 -25
- package/src/components/cleenIcon/icons/IconVolume.tsx +0 -25
- package/src/components/cleenIcon/icons/IconWrench.tsx +0 -22
- package/src/components/cleenIcon/icons/IconX.tsx +0 -25
- package/src/components/cleenIcon/icons/IconXCircle.tsx +0 -22
- package/src/components/cleenIcon/icons/IconXCircle2.tsx +0 -42
- package/src/components/cleenIcon/icons/IconXClose.tsx +0 -25
- package/src/components/cleenIcon/icons/IconXSquare.tsx +0 -22
- package/src/components/cleenIcon/icons/index.ts +0 -215
- package/src/components/cleenIcon/index.ts +0 -4
- package/src/components/cleenIcon/types/icon.ts +0 -226
- package/src/components/collapsible/Collapsible.tsx +0 -148
- package/src/components/collapsible/index.ts +0 -5
- package/src/components/creditCardInput/CreditCardInput.tsx +0 -236
- package/src/components/creditCardInput/index.ts +0 -2
- package/src/components/creditCardInput/types/card.ts +0 -13
- package/src/components/creditCardInput/types/props.ts +0 -44
- package/src/components/creditCardInput/util/format.ts +0 -102
- package/src/components/datePicker/DatePicker.tsx +0 -235
- package/src/components/datePicker/index.ts +0 -2
- package/src/components/datePicker/types/props.ts +0 -47
- package/src/components/datePicker/utils/date.ts +0 -40
- package/src/components/divider/Divider.tsx +0 -43
- package/src/components/divider/index.ts +0 -1
- package/src/components/drawer/Drawer.tsx +0 -222
- package/src/components/drawer/index.ts +0 -1
- package/src/components/dropdown/Dropdown.tsx +0 -224
- package/src/components/dropdown/index.ts +0 -1
- package/src/components/filterDrawer/FilterDrawer.tsx +0 -147
- package/src/components/filterDrawer/blocks/FilterDrawerFooter.tsx +0 -119
- package/src/components/filterDrawer/blocks/SaveFilterStep.tsx +0 -56
- package/src/components/filterDrawer/blocks/SavedFilterRow.tsx +0 -166
- package/src/components/filterDrawer/blocks/SavedFiltersDropdown.tsx +0 -142
- package/src/components/filterDrawer/constants/filter.ts +0 -4
- package/src/components/filterDrawer/constants/labels.ts +0 -52
- package/src/components/filterDrawer/constants/tab.ts +0 -7
- package/src/components/filterDrawer/context/context.ts +0 -28
- package/src/components/filterDrawer/context/provider.tsx +0 -50
- package/src/components/filterDrawer/index.ts +0 -7
- package/src/components/filterDrawer/types/filters.ts +0 -28
- package/src/components/filterDrawer/types/props.ts +0 -107
- package/src/components/filterDrawer/types/validation.ts +0 -6
- package/src/components/formGroup/FormGroup.tsx +0 -165
- package/src/components/formGroup/index.ts +0 -1
- package/src/components/groupSelector/GroupSelector.tsx +0 -729
- package/src/components/groupSelector/index.ts +0 -6
- package/src/components/index.ts +0 -44
- package/src/components/infoLabels/InfoLabels.tsx +0 -88
- package/src/components/infoLabels/index.ts +0 -1
- package/src/components/input/Input.tsx +0 -269
- package/src/components/input/index.ts +0 -1
- package/src/components/loader/Loader.tsx +0 -91
- package/src/components/loader/index.ts +0 -1
- package/src/components/lookup/Lookup.tsx +0 -433
- package/src/components/lookup/blocks/LookupOptionList.tsx +0 -130
- package/src/components/lookup/index.ts +0 -2
- package/src/components/lookup/types/lookup.ts +0 -97
- package/src/components/menu/Menu.tsx +0 -103
- package/src/components/menu/blocks/MenuContent.tsx +0 -105
- package/src/components/menu/blocks/MenuItem.tsx +0 -120
- package/src/components/menu/index.ts +0 -2
- package/src/components/menu/types/menu.ts +0 -30
- package/src/components/menu/types/menuItem.ts +0 -48
- package/src/components/modal/Modal.tsx +0 -191
- package/src/components/modal/index.ts +0 -1
- package/src/components/notification/Notification.tsx +0 -79
- package/src/components/notification/constant/notification.ts +0 -30
- package/src/components/notification/index.ts +0 -2
- package/src/components/notification/wrappers/CleenNotificationContainer.tsx +0 -9
- package/src/components/pagination/Pagination.tsx +0 -294
- package/src/components/pagination/blocks/PaginationGoToPage.tsx +0 -91
- package/src/components/pagination/blocks/PaginationPageSize.tsx +0 -145
- package/src/components/pagination/constants/labels.ts +0 -15
- package/src/components/pagination/index.ts +0 -9
- package/src/components/pillBadge/PillBadge.tsx +0 -130
- package/src/components/pillBadge/helper.ts +0 -11
- package/src/components/pillBadge/index.ts +0 -1
- package/src/components/pillBadge/variants.ts +0 -47
- package/src/components/popover/Popover.tsx +0 -108
- package/src/components/popover/index.ts +0 -2
- package/src/components/popover/types/popover.ts +0 -21
- package/src/components/progressBar/ProgressBar.tsx +0 -179
- package/src/components/progressBar/index.ts +0 -1
- package/src/components/progressCircle/ProgressCircle.tsx +0 -142
- package/src/components/progressCircle/index.ts +0 -1
- package/src/components/radioBoxGroup/RadioBoxGroup.tsx +0 -207
- package/src/components/radioBoxGroup/index.ts +0 -1
- package/src/components/radioButtonGroup/RadioButtonGroup.tsx +0 -208
- package/src/components/radioButtonGroup/blocks/RadioButton.tsx +0 -22
- package/src/components/radioButtonGroup/index.ts +0 -4
- package/src/components/radioButtonGroup/types/radioButton.ts +0 -10
- package/src/components/rangeSlider/RangeSlider.tsx +0 -366
- package/src/components/rangeSlider/index.ts +0 -1
- package/src/components/select/Select.tsx +0 -349
- package/src/components/select/blocks/SelectCustomMenuList.tsx +0 -70
- package/src/components/select/blocks/SelectNoOptionsMessage.tsx +0 -22
- package/src/components/select/blocks/SelectOption.tsx +0 -19
- package/src/components/select/blocks/SelectSingleValue.tsx +0 -28
- package/src/components/select/index.ts +0 -1
- package/src/components/sidebar/Sidebar.tsx +0 -210
- package/src/components/sidebar/SidebarItem.tsx +0 -88
- package/src/components/sidebar/drawerContainer/DrawerContainer.tsx +0 -36
- package/src/components/sidebar/drawerContainer/DrawerContentTitle.tsx +0 -165
- package/src/components/sidebar/drawerContainer/index.ts +0 -2
- package/src/components/sidebar/index.ts +0 -13
- package/src/components/sidebar/types.ts +0 -157
- package/src/components/skeletons/blocks/Skeleton.tsx +0 -72
- package/src/components/skeletons/blocks/SkeletonAvatar.tsx +0 -43
- package/src/components/skeletons/blocks/SkeletonBadge.tsx +0 -30
- package/src/components/skeletons/blocks/SkeletonBanner.tsx +0 -44
- package/src/components/skeletons/blocks/SkeletonButton.tsx +0 -31
- package/src/components/skeletons/blocks/SkeletonCard.tsx +0 -39
- package/src/components/skeletons/blocks/SkeletonCard2.tsx +0 -57
- package/src/components/skeletons/blocks/SkeletonCard3.tsx +0 -89
- package/src/components/skeletons/blocks/SkeletonCardStack.tsx +0 -22
- package/src/components/skeletons/blocks/SkeletonChart.tsx +0 -114
- package/src/components/skeletons/blocks/SkeletonContentCard.tsx +0 -75
- package/src/components/skeletons/blocks/SkeletonDataGrid.tsx +0 -73
- package/src/components/skeletons/blocks/SkeletonForm.tsx +0 -50
- package/src/components/skeletons/blocks/SkeletonImage.tsx +0 -45
- package/src/components/skeletons/blocks/SkeletonInfoCard.tsx +0 -130
- package/src/components/skeletons/blocks/SkeletonInput.tsx +0 -32
- package/src/components/skeletons/blocks/SkeletonList.tsx +0 -67
- package/src/components/skeletons/blocks/SkeletonParagraph.tsx +0 -52
- package/src/components/skeletons/blocks/SkeletonText.tsx +0 -22
- package/src/components/skeletons/blocks/SkeletonVideo.tsx +0 -71
- package/src/components/skeletons/blocks/SkeletonWidgetCard.tsx +0 -56
- package/src/components/skeletons/blocks/SkeletonWrapper.tsx +0 -140
- package/src/components/skeletons/index.ts +0 -24
- package/src/components/skeletons/styles/skeleton.ts +0 -2
- package/src/components/skeletons/types/skeleton.ts +0 -8
- package/src/components/slider/Slider.tsx +0 -298
- package/src/components/slider/index.ts +0 -1
- package/src/components/stepper/Stepper.tsx +0 -185
- package/src/components/stepper/index.ts +0 -1
- package/src/components/switch/Switch.tsx +0 -152
- package/src/components/switch/index.ts +0 -1
- package/src/components/tabs/Tabs.tsx +0 -140
- package/src/components/tabs/index.ts +0 -2
- package/src/components/tabs/types/tab.ts +0 -33
- package/src/components/tabs/variants.ts +0 -49
- package/src/components/textArea/TextArea.tsx +0 -244
- package/src/components/textArea/index.ts +0 -1
- package/src/components/tooltip/Tooltip.tsx +0 -200
- package/src/components/tooltip/index.ts +0 -1
- package/src/icons/IconFromLibrary.tsx +0 -13
- package/src/icons/getIconByName.ts +0 -81
- package/src/icons/index.ts +0 -16
- package/src/index.ts +0 -1
- package/tsconfig.json +0 -27
- package/tsup.config.ts +0 -23
|
@@ -0,0 +1,611 @@
|
|
|
1
|
+
// src/charts/chart/Chart.tsx
|
|
2
|
+
import { cn } from "@cleen/ui-core";
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
import ReactApexChart from "react-apexcharts";
|
|
5
|
+
|
|
6
|
+
// src/charts/chart/constant.ts
|
|
7
|
+
var defaultOptions = {
|
|
8
|
+
chart: {
|
|
9
|
+
toolbar: {
|
|
10
|
+
show: true,
|
|
11
|
+
tools: {
|
|
12
|
+
download: true,
|
|
13
|
+
selection: true,
|
|
14
|
+
zoom: true,
|
|
15
|
+
zoomin: true,
|
|
16
|
+
zoomout: true,
|
|
17
|
+
pan: true,
|
|
18
|
+
reset: true
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
animations: {
|
|
22
|
+
enabled: true
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
dataLabels: {
|
|
26
|
+
enabled: false
|
|
27
|
+
},
|
|
28
|
+
stroke: {
|
|
29
|
+
curve: "smooth",
|
|
30
|
+
width: 2
|
|
31
|
+
},
|
|
32
|
+
xaxis: {
|
|
33
|
+
labels: {
|
|
34
|
+
style: {
|
|
35
|
+
fontSize: "12px"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
yaxis: {
|
|
40
|
+
labels: {
|
|
41
|
+
style: {
|
|
42
|
+
fontSize: "12px"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
legend: {
|
|
47
|
+
position: "top",
|
|
48
|
+
horizontalAlign: "left"
|
|
49
|
+
},
|
|
50
|
+
tooltip: {
|
|
51
|
+
enabled: true,
|
|
52
|
+
theme: "light"
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
// src/charts/chart/Chart.tsx
|
|
57
|
+
import { jsx } from "react/jsx-runtime";
|
|
58
|
+
var Chart = forwardRef(function Chart2({
|
|
59
|
+
type = "line",
|
|
60
|
+
series,
|
|
61
|
+
options = {},
|
|
62
|
+
width = "100%",
|
|
63
|
+
height = 350,
|
|
64
|
+
className,
|
|
65
|
+
style
|
|
66
|
+
}, ref) {
|
|
67
|
+
const mergedOptions = {
|
|
68
|
+
...defaultOptions,
|
|
69
|
+
...options,
|
|
70
|
+
chart: {
|
|
71
|
+
...defaultOptions.chart,
|
|
72
|
+
...options.chart,
|
|
73
|
+
type
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
return /* @__PURE__ */ jsx("div", { className: cn("cleen", className), style, children: /* @__PURE__ */ jsx(
|
|
77
|
+
ReactApexChart,
|
|
78
|
+
{
|
|
79
|
+
options: mergedOptions,
|
|
80
|
+
series,
|
|
81
|
+
type,
|
|
82
|
+
width,
|
|
83
|
+
height,
|
|
84
|
+
ref
|
|
85
|
+
}
|
|
86
|
+
) });
|
|
87
|
+
});
|
|
88
|
+
var Chart_default = Chart;
|
|
89
|
+
|
|
90
|
+
// src/charts/chart/variants/BellCurve/BellCurve.tsx
|
|
91
|
+
import { applyDefaults } from "@cleen/ui-core";
|
|
92
|
+
import { forwardRef as forwardRef2, useMemo } from "react";
|
|
93
|
+
|
|
94
|
+
// src/charts/chart/variants/BellCurve/constant.ts
|
|
95
|
+
import { ColorHelpers } from "@cleen/ui-core";
|
|
96
|
+
var POINT_ANNOTATIONS_PROPS = {
|
|
97
|
+
marker: {
|
|
98
|
+
size: 2,
|
|
99
|
+
fillColor: "rgba(var(--cleen-gray), 0.8)",
|
|
100
|
+
strokeColor: "rgba(var(--cleen-gray), 0.8)",
|
|
101
|
+
offsetY: -16,
|
|
102
|
+
shape: "triangle"
|
|
103
|
+
},
|
|
104
|
+
label: {
|
|
105
|
+
borderWidth: 0,
|
|
106
|
+
offsetY: -20,
|
|
107
|
+
style: {
|
|
108
|
+
color: "rgba(var(--cleen-gray), 0.8)",
|
|
109
|
+
background: "transparent",
|
|
110
|
+
fontSize: "11px"
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
var RANGE_ANNOTATIONS_PROPS = {
|
|
115
|
+
label: {
|
|
116
|
+
borderColor: "transparent",
|
|
117
|
+
style: {
|
|
118
|
+
color: "rgba(var(--cleen-white))",
|
|
119
|
+
background: "rgba(var(--cleen-primary))"
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
fillColor: "rgba(var(--cleen-primary))"
|
|
123
|
+
};
|
|
124
|
+
var HIGHLIGHT_LABEL_ANNOTATIONS_PROPS = {
|
|
125
|
+
label: {
|
|
126
|
+
borderWidth: 0,
|
|
127
|
+
offsetY: -15,
|
|
128
|
+
orientation: "horizontal",
|
|
129
|
+
style: {
|
|
130
|
+
color: "rgba(var(--cleen-primary))",
|
|
131
|
+
background: "transparent",
|
|
132
|
+
fontSize: "16px",
|
|
133
|
+
fontWeight: 700
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
borderColor: "rgba(var(--cleen-primary))"
|
|
137
|
+
};
|
|
138
|
+
var HIGHLIGHT_MARKER_ANNOTATIONS_PROPS = {
|
|
139
|
+
marker: {
|
|
140
|
+
size: 8,
|
|
141
|
+
fillColor: "rgba(var(--cleen-primary))",
|
|
142
|
+
strokeColor: "rgba(var(--cleen-white))"
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
var DEFAULT_CHART_OPTIONS = {
|
|
146
|
+
chart: {
|
|
147
|
+
zoom: { enabled: false },
|
|
148
|
+
toolbar: { show: false },
|
|
149
|
+
animations: {
|
|
150
|
+
enabled: false
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
stroke: { curve: "monotoneCubic", width: 2.5 },
|
|
154
|
+
colors: [
|
|
155
|
+
ColorHelpers.getComputedColor("var(--cleen-error)"),
|
|
156
|
+
ColorHelpers.getComputedColor("var(--cleen-primary)"),
|
|
157
|
+
ColorHelpers.getComputedColor("var(--cleen-success)")
|
|
158
|
+
],
|
|
159
|
+
fill: {
|
|
160
|
+
type: "gradient",
|
|
161
|
+
gradient: {
|
|
162
|
+
shade: "light",
|
|
163
|
+
type: "vertical",
|
|
164
|
+
shadeIntensity: 0.6,
|
|
165
|
+
gradientToColors: [
|
|
166
|
+
ColorHelpers.getComputedColor("var(--cleen-error)") || "",
|
|
167
|
+
ColorHelpers.getComputedColor("var(--cleen-primary)") || "",
|
|
168
|
+
ColorHelpers.getComputedColor("var(--cleen-success)") || ""
|
|
169
|
+
],
|
|
170
|
+
inverseColors: false,
|
|
171
|
+
opacityFrom: 0.95,
|
|
172
|
+
opacityTo: 0.6
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
yaxis: {
|
|
176
|
+
show: false
|
|
177
|
+
},
|
|
178
|
+
tooltip: {
|
|
179
|
+
enabled: true,
|
|
180
|
+
x: {
|
|
181
|
+
formatter: function(val) {
|
|
182
|
+
const n = typeof val === "string" ? Number(val) : val;
|
|
183
|
+
return `Score: ${n}`;
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
y: {
|
|
187
|
+
formatter: function(val) {
|
|
188
|
+
return `${Number(val).toFixed(4)}`;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
grid: { show: false },
|
|
193
|
+
legend: {
|
|
194
|
+
show: false
|
|
195
|
+
}
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
// src/charts/chart/variants/BellCurve/helper.ts
|
|
199
|
+
var getAnnotationPointX = (middle, sigma) => {
|
|
200
|
+
return {
|
|
201
|
+
middle,
|
|
202
|
+
leftSigma: middle - sigma,
|
|
203
|
+
left2Sigma: middle - 2 * sigma,
|
|
204
|
+
left: middle - 3 * sigma,
|
|
205
|
+
rightSigma: middle + 2 * sigma,
|
|
206
|
+
right2Sigma: middle + 2 * sigma,
|
|
207
|
+
right: middle + 3 * sigma
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
var getAnnotationAxisX = (middle, sigma, minX, maxX) => {
|
|
211
|
+
return {
|
|
212
|
+
middle,
|
|
213
|
+
leftSigma: middle - sigma,
|
|
214
|
+
left2Sigma: middle - 2 * sigma,
|
|
215
|
+
left: minX,
|
|
216
|
+
rightSigma: middle + sigma,
|
|
217
|
+
right2Sigma: middle + 2 * sigma,
|
|
218
|
+
right: maxX
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
var calculateAnnotationAxisX = (annotation, positions) => {
|
|
222
|
+
let props = {};
|
|
223
|
+
switch (annotation.type) {
|
|
224
|
+
case "range":
|
|
225
|
+
props = {
|
|
226
|
+
x: positions[annotation.x],
|
|
227
|
+
x2: positions[annotation.x2]
|
|
228
|
+
};
|
|
229
|
+
break;
|
|
230
|
+
case "offset":
|
|
231
|
+
props = {
|
|
232
|
+
x: annotation.x - annotation.offset,
|
|
233
|
+
x2: annotation.x + annotation.offset
|
|
234
|
+
};
|
|
235
|
+
break;
|
|
236
|
+
case "region":
|
|
237
|
+
if (annotation.x >= positions.left && annotation.x < positions.left2Sigma) {
|
|
238
|
+
props = {
|
|
239
|
+
x: positions.left,
|
|
240
|
+
x2: positions.left2Sigma
|
|
241
|
+
};
|
|
242
|
+
} else if (annotation.x >= positions.left2Sigma && annotation.x < positions.leftSigma) {
|
|
243
|
+
props = {
|
|
244
|
+
x: positions.left2Sigma,
|
|
245
|
+
x2: positions.leftSigma
|
|
246
|
+
};
|
|
247
|
+
} else if (annotation.x >= positions.leftSigma && annotation.x < positions.middle) {
|
|
248
|
+
props = {
|
|
249
|
+
x: positions.leftSigma,
|
|
250
|
+
x2: positions.middle
|
|
251
|
+
};
|
|
252
|
+
} else if (annotation.x >= positions.middle && annotation.x < positions.rightSigma) {
|
|
253
|
+
props = {
|
|
254
|
+
x: positions.middle,
|
|
255
|
+
x2: positions.rightSigma
|
|
256
|
+
};
|
|
257
|
+
} else if (annotation.x >= positions.rightSigma && annotation.x < positions.right2Sigma) {
|
|
258
|
+
props = {
|
|
259
|
+
x: positions.rightSigma,
|
|
260
|
+
x2: positions.right2Sigma
|
|
261
|
+
};
|
|
262
|
+
} else if (annotation.x >= positions.right2Sigma && annotation.x < positions.right) {
|
|
263
|
+
props = {
|
|
264
|
+
x: positions.right2Sigma,
|
|
265
|
+
x2: positions.right
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
break;
|
|
269
|
+
case "custom":
|
|
270
|
+
default:
|
|
271
|
+
props = {
|
|
272
|
+
x: annotation.x,
|
|
273
|
+
x2: annotation.x2
|
|
274
|
+
};
|
|
275
|
+
break;
|
|
276
|
+
}
|
|
277
|
+
return props;
|
|
278
|
+
};
|
|
279
|
+
|
|
280
|
+
// src/charts/chart/variants/BellCurve/BellCurve.tsx
|
|
281
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
282
|
+
var BellCurve = forwardRef2(
|
|
283
|
+
function BellCurve2({
|
|
284
|
+
serie,
|
|
285
|
+
labels,
|
|
286
|
+
sigma,
|
|
287
|
+
pointAnnotations,
|
|
288
|
+
rangeAnnotations,
|
|
289
|
+
highlightAnnotations,
|
|
290
|
+
options,
|
|
291
|
+
height = 360,
|
|
292
|
+
...props
|
|
293
|
+
}, ref) {
|
|
294
|
+
const sortedSerie = useMemo(() => serie.sort((a, b) => a.x - b.x), [serie]);
|
|
295
|
+
const serieMap = useMemo(() => {
|
|
296
|
+
const map = /* @__PURE__ */ new Map();
|
|
297
|
+
serie.forEach((el) => map.set(el.x, el.y));
|
|
298
|
+
return map;
|
|
299
|
+
}, [serie]);
|
|
300
|
+
const middlePoint = sortedSerie[Math.floor(sortedSerie.length / 2)];
|
|
301
|
+
const calculatedSeries = useMemo(() => {
|
|
302
|
+
const { below, middle, above } = serie.reduce(
|
|
303
|
+
(acc, val) => {
|
|
304
|
+
if (val.x < middlePoint.x - 2 * sigma) {
|
|
305
|
+
acc.below.push(val);
|
|
306
|
+
} else if (val.x >= middlePoint.x + 2 * sigma) {
|
|
307
|
+
if (val.x === middlePoint.x + 2 * sigma) {
|
|
308
|
+
acc.middle.push(val);
|
|
309
|
+
}
|
|
310
|
+
acc.above.push(val);
|
|
311
|
+
} else {
|
|
312
|
+
if (val.x === middlePoint.x - 2 * sigma) {
|
|
313
|
+
acc.below.push(val);
|
|
314
|
+
}
|
|
315
|
+
acc.middle.push(val);
|
|
316
|
+
}
|
|
317
|
+
return acc;
|
|
318
|
+
},
|
|
319
|
+
{ below: [], middle: [], above: [] }
|
|
320
|
+
);
|
|
321
|
+
return [
|
|
322
|
+
{ name: labels?.below || "Below threshold", data: below },
|
|
323
|
+
{ name: labels?.middle || "Middle grounds", data: middle },
|
|
324
|
+
{ name: labels?.above || "Above threshold", data: above }
|
|
325
|
+
];
|
|
326
|
+
}, [sigma, serie, labels, middlePoint]);
|
|
327
|
+
const formattedPointAnnotations = useMemo(() => {
|
|
328
|
+
if (!pointAnnotations) {
|
|
329
|
+
return [];
|
|
330
|
+
}
|
|
331
|
+
const positions = getAnnotationPointX(middlePoint.x, sigma);
|
|
332
|
+
return Object.entries(pointAnnotations).map(
|
|
333
|
+
([field, value]) => {
|
|
334
|
+
const x = positions[field];
|
|
335
|
+
return {
|
|
336
|
+
x,
|
|
337
|
+
y: serieMap.get(x) || 0,
|
|
338
|
+
...applyDefaults(POINT_ANNOTATIONS_PROPS, value)
|
|
339
|
+
};
|
|
340
|
+
}
|
|
341
|
+
);
|
|
342
|
+
}, [pointAnnotations, sigma, serieMap]);
|
|
343
|
+
const formattedXAxisAnnotations = useMemo(() => {
|
|
344
|
+
if (!rangeAnnotations) {
|
|
345
|
+
return [];
|
|
346
|
+
}
|
|
347
|
+
const positions = getAnnotationAxisX(
|
|
348
|
+
middlePoint.x,
|
|
349
|
+
sigma,
|
|
350
|
+
sortedSerie[0].x,
|
|
351
|
+
sortedSerie[sortedSerie.length - 1].x
|
|
352
|
+
);
|
|
353
|
+
return rangeAnnotations.map((annotation) => {
|
|
354
|
+
const pos = calculateAnnotationAxisX(annotation, positions);
|
|
355
|
+
return {
|
|
356
|
+
...applyDefaults(RANGE_ANNOTATIONS_PROPS, annotation),
|
|
357
|
+
...pos
|
|
358
|
+
};
|
|
359
|
+
});
|
|
360
|
+
}, [rangeAnnotations, sigma, sortedSerie]);
|
|
361
|
+
const { highlightPointAnnotations, highlightLineAnnotations } = useMemo(() => {
|
|
362
|
+
if (!highlightAnnotations) {
|
|
363
|
+
return {
|
|
364
|
+
highlightLineAnnotations: [],
|
|
365
|
+
highlightPointAnnotations: []
|
|
366
|
+
};
|
|
367
|
+
}
|
|
368
|
+
const highlightPointAnnotations2 = [];
|
|
369
|
+
const highlightLineAnnotations2 = [];
|
|
370
|
+
const addLine = ({ x, line }) => {
|
|
371
|
+
highlightLineAnnotations2.push(
|
|
372
|
+
applyDefaults(HIGHLIGHT_LABEL_ANNOTATIONS_PROPS, {
|
|
373
|
+
x,
|
|
374
|
+
...line
|
|
375
|
+
})
|
|
376
|
+
);
|
|
377
|
+
};
|
|
378
|
+
const addPoint = ({ x, y, point }) => {
|
|
379
|
+
highlightPointAnnotations2.push(
|
|
380
|
+
applyDefaults(HIGHLIGHT_MARKER_ANNOTATIONS_PROPS, {
|
|
381
|
+
x,
|
|
382
|
+
y,
|
|
383
|
+
...point
|
|
384
|
+
})
|
|
385
|
+
);
|
|
386
|
+
};
|
|
387
|
+
highlightAnnotations?.forEach((annotation) => {
|
|
388
|
+
switch (annotation.show) {
|
|
389
|
+
case "line":
|
|
390
|
+
addLine(annotation);
|
|
391
|
+
break;
|
|
392
|
+
case "point":
|
|
393
|
+
addPoint(annotation);
|
|
394
|
+
break;
|
|
395
|
+
case "both":
|
|
396
|
+
addLine(annotation);
|
|
397
|
+
addPoint(annotation);
|
|
398
|
+
break;
|
|
399
|
+
default:
|
|
400
|
+
break;
|
|
401
|
+
}
|
|
402
|
+
});
|
|
403
|
+
return {
|
|
404
|
+
highlightPointAnnotations: highlightPointAnnotations2,
|
|
405
|
+
highlightLineAnnotations: highlightLineAnnotations2
|
|
406
|
+
};
|
|
407
|
+
}, [highlightAnnotations]);
|
|
408
|
+
return /* @__PURE__ */ jsx2(
|
|
409
|
+
Chart_default,
|
|
410
|
+
{
|
|
411
|
+
series: calculatedSeries,
|
|
412
|
+
options: {
|
|
413
|
+
...applyDefaults(DEFAULT_CHART_OPTIONS, options),
|
|
414
|
+
annotations: {
|
|
415
|
+
...options?.annotations,
|
|
416
|
+
points: [
|
|
417
|
+
...formattedPointAnnotations,
|
|
418
|
+
...highlightPointAnnotations,
|
|
419
|
+
...options?.annotations?.points || []
|
|
420
|
+
],
|
|
421
|
+
xaxis: [
|
|
422
|
+
...formattedXAxisAnnotations,
|
|
423
|
+
...highlightLineAnnotations,
|
|
424
|
+
...options?.annotations?.xaxis || []
|
|
425
|
+
]
|
|
426
|
+
}
|
|
427
|
+
},
|
|
428
|
+
height,
|
|
429
|
+
ref,
|
|
430
|
+
type: "area",
|
|
431
|
+
...props
|
|
432
|
+
}
|
|
433
|
+
);
|
|
434
|
+
}
|
|
435
|
+
);
|
|
436
|
+
|
|
437
|
+
// src/charts/chart/variants/RadarChart/RadarChart.tsx
|
|
438
|
+
import { applyDefaults as applyDefaults2 } from "@cleen/ui-core";
|
|
439
|
+
import { forwardRef as forwardRef3 } from "react";
|
|
440
|
+
|
|
441
|
+
// src/charts/chart/variants/RadarChart/constant.ts
|
|
442
|
+
var DEFAULT_CHART_OPTIONS2 = {
|
|
443
|
+
chart: {
|
|
444
|
+
type: "radar",
|
|
445
|
+
zoom: { enabled: false },
|
|
446
|
+
toolbar: { show: false }
|
|
447
|
+
},
|
|
448
|
+
stroke: {
|
|
449
|
+
width: 2
|
|
450
|
+
},
|
|
451
|
+
fill: {
|
|
452
|
+
opacity: 0.25
|
|
453
|
+
},
|
|
454
|
+
markers: {
|
|
455
|
+
size: 4,
|
|
456
|
+
colors: "transparent",
|
|
457
|
+
strokeColors: "transparent"
|
|
458
|
+
},
|
|
459
|
+
tooltip: {
|
|
460
|
+
marker: {
|
|
461
|
+
show: false
|
|
462
|
+
}
|
|
463
|
+
},
|
|
464
|
+
legend: {
|
|
465
|
+
show: false
|
|
466
|
+
}
|
|
467
|
+
};
|
|
468
|
+
|
|
469
|
+
// src/charts/chart/variants/RadarChart/RadarChart.tsx
|
|
470
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
471
|
+
var RadarChart = forwardRef3(
|
|
472
|
+
function RadarChart2({ options, ...props }, ref) {
|
|
473
|
+
return /* @__PURE__ */ jsx3(
|
|
474
|
+
Chart_default,
|
|
475
|
+
{
|
|
476
|
+
type: "radar",
|
|
477
|
+
ref,
|
|
478
|
+
options: applyDefaults2(DEFAULT_CHART_OPTIONS2, options),
|
|
479
|
+
...props
|
|
480
|
+
}
|
|
481
|
+
);
|
|
482
|
+
}
|
|
483
|
+
);
|
|
484
|
+
|
|
485
|
+
// src/charts/chart/variants/ScatterChart/ScatterChart.tsx
|
|
486
|
+
import { applyDefaults as applyDefaults3 } from "@cleen/ui-core";
|
|
487
|
+
import { forwardRef as forwardRef4 } from "react";
|
|
488
|
+
|
|
489
|
+
// src/charts/chart/variants/ScatterChart/constant.ts
|
|
490
|
+
var DEFAULT_CHART_OPTIONS3 = {
|
|
491
|
+
chart: {
|
|
492
|
+
type: "scatter",
|
|
493
|
+
zoom: { enabled: false },
|
|
494
|
+
toolbar: { show: false }
|
|
495
|
+
},
|
|
496
|
+
markers: {
|
|
497
|
+
shape: "square",
|
|
498
|
+
size: 8,
|
|
499
|
+
strokeWidth: 0
|
|
500
|
+
},
|
|
501
|
+
grid: {
|
|
502
|
+
strokeDashArray: 8
|
|
503
|
+
},
|
|
504
|
+
legend: {
|
|
505
|
+
show: true,
|
|
506
|
+
horizontalAlign: "right",
|
|
507
|
+
position: "top",
|
|
508
|
+
labels: {
|
|
509
|
+
colors: "rgba(var(--cleen-gray), 0.8)"
|
|
510
|
+
}
|
|
511
|
+
},
|
|
512
|
+
yaxis: {
|
|
513
|
+
axisBorder: {
|
|
514
|
+
show: true,
|
|
515
|
+
color: "rgba(var(--cleen-gray), .2)"
|
|
516
|
+
},
|
|
517
|
+
labels: {
|
|
518
|
+
style: {
|
|
519
|
+
colors: "rgba(var(--cleen-gray), 0.8)"
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
},
|
|
523
|
+
xaxis: {
|
|
524
|
+
axisBorder: {
|
|
525
|
+
show: true,
|
|
526
|
+
color: "rgba(var(--cleen-gray), .2)"
|
|
527
|
+
},
|
|
528
|
+
labels: {
|
|
529
|
+
style: {
|
|
530
|
+
colors: "rgba(var(--cleen-gray), 0.8)"
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
},
|
|
534
|
+
title: {
|
|
535
|
+
align: "left",
|
|
536
|
+
floating: true,
|
|
537
|
+
style: {
|
|
538
|
+
color: "rgba(var(--cleen-black))"
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
};
|
|
542
|
+
|
|
543
|
+
// src/charts/chart/variants/ScatterChart/ScatterChart.tsx
|
|
544
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
545
|
+
var ScatterChart = forwardRef4(function ScatterChart2({ options, ...props }, ref) {
|
|
546
|
+
return /* @__PURE__ */ jsx4(
|
|
547
|
+
Chart_default,
|
|
548
|
+
{
|
|
549
|
+
type: "scatter",
|
|
550
|
+
ref,
|
|
551
|
+
options: applyDefaults3(DEFAULT_CHART_OPTIONS3, options),
|
|
552
|
+
...props
|
|
553
|
+
}
|
|
554
|
+
);
|
|
555
|
+
});
|
|
556
|
+
|
|
557
|
+
// src/charts/simpleChart/SimpleChart.tsx
|
|
558
|
+
import "react";
|
|
559
|
+
import { jsx as jsx5, jsxs } from "react/jsx-runtime";
|
|
560
|
+
var SimpleChart = ({
|
|
561
|
+
width = 240,
|
|
562
|
+
height = 80,
|
|
563
|
+
data = [12, 28, 18, 30, 24, 36],
|
|
564
|
+
className = "",
|
|
565
|
+
style
|
|
566
|
+
}) => {
|
|
567
|
+
const max = Math.max(...data, 1);
|
|
568
|
+
const points = data.map(
|
|
569
|
+
(d, i) => `${i / (data.length - 1) * width},${height - d / max * height}`
|
|
570
|
+
).join(" ");
|
|
571
|
+
return /* @__PURE__ */ jsxs(
|
|
572
|
+
"svg",
|
|
573
|
+
{
|
|
574
|
+
width,
|
|
575
|
+
height,
|
|
576
|
+
viewBox: `0 0 ${width} ${height}`,
|
|
577
|
+
className,
|
|
578
|
+
style,
|
|
579
|
+
role: "img",
|
|
580
|
+
"aria-label": "Simple line chart",
|
|
581
|
+
children: [
|
|
582
|
+
/* @__PURE__ */ jsx5("rect", { width: "100%", height: "100%", fill: "transparent" }),
|
|
583
|
+
/* @__PURE__ */ jsx5(
|
|
584
|
+
"polyline",
|
|
585
|
+
{
|
|
586
|
+
fill: "none",
|
|
587
|
+
stroke: "rgba(59,130,246,0.9)",
|
|
588
|
+
strokeWidth: 2,
|
|
589
|
+
points,
|
|
590
|
+
strokeLinecap: "round",
|
|
591
|
+
strokeLinejoin: "round"
|
|
592
|
+
}
|
|
593
|
+
),
|
|
594
|
+
/* @__PURE__ */ jsx5(
|
|
595
|
+
"polygon",
|
|
596
|
+
{
|
|
597
|
+
points: `${points} ${width},${height} 0,${height}`,
|
|
598
|
+
fill: "rgba(59,130,246,0.08)"
|
|
599
|
+
}
|
|
600
|
+
)
|
|
601
|
+
]
|
|
602
|
+
}
|
|
603
|
+
);
|
|
604
|
+
};
|
|
605
|
+
export {
|
|
606
|
+
BellCurve,
|
|
607
|
+
Chart,
|
|
608
|
+
RadarChart,
|
|
609
|
+
ScatterChart,
|
|
610
|
+
SimpleChart
|
|
611
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import react__default from 'react';
|
|
2
|
+
import { IconBaseProps, IconType } from 'react-icons/lib';
|
|
3
|
+
export * from 'react-icons/fa';
|
|
4
|
+
export * from 'react-icons/md';
|
|
5
|
+
export * from 'react-icons/ai';
|
|
6
|
+
export * from 'react-icons/bi';
|
|
7
|
+
export * from 'react-icons/bs';
|
|
8
|
+
export * from 'react-icons/fi';
|
|
9
|
+
export * from 'react-icons/hi';
|
|
10
|
+
export * from 'react-icons/io';
|
|
11
|
+
export * from 'react-icons/ri';
|
|
12
|
+
|
|
13
|
+
interface IconFromLibraryProps extends IconBaseProps {
|
|
14
|
+
icon: IconType;
|
|
15
|
+
}
|
|
16
|
+
declare const IconFromLibrary: react__default.FC<IconFromLibraryProps>;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Maps icon names to their corresponding icon components from react-icons.
|
|
20
|
+
* This allows you to dynamically load icons by name string without importing the entire library.
|
|
21
|
+
*
|
|
22
|
+
* @param iconName - The full icon name (e.g., 'FaHome', 'MdSettings', 'AiFillHeart')
|
|
23
|
+
* @returns The icon component, or null if not found
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```tsx
|
|
27
|
+
* const HomeIcon = getIconByName('FaHome');
|
|
28
|
+
* if (HomeIcon) {
|
|
29
|
+
* return <IconFromLibrary icon={HomeIcon} size={24} />;
|
|
30
|
+
* }
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
declare const getIconByName: (iconName: string) => Promise<IconType | null>;
|
|
34
|
+
|
|
35
|
+
export { IconFromLibrary, type IconFromLibraryProps, getIconByName };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// src/icons/IconFromLibrary.tsx
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
var IconFromLibrary = ({
|
|
5
|
+
icon: OriginalIcon,
|
|
6
|
+
...props
|
|
7
|
+
}) => {
|
|
8
|
+
return /* @__PURE__ */ jsx(OriginalIcon, { ...props });
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
// src/icons/getIconByName.ts
|
|
12
|
+
var getIconByName = async (iconName) => {
|
|
13
|
+
if (!iconName || typeof iconName !== "string") {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
const prefix = iconName.substring(0, 2);
|
|
17
|
+
try {
|
|
18
|
+
let iconModule;
|
|
19
|
+
switch (prefix) {
|
|
20
|
+
case "Fa":
|
|
21
|
+
iconModule = await import("react-icons/fa");
|
|
22
|
+
break;
|
|
23
|
+
case "Md":
|
|
24
|
+
iconModule = await import("react-icons/md");
|
|
25
|
+
break;
|
|
26
|
+
case "Ai":
|
|
27
|
+
iconModule = await import("react-icons/ai");
|
|
28
|
+
break;
|
|
29
|
+
case "Bi":
|
|
30
|
+
iconModule = await import("react-icons/bi");
|
|
31
|
+
break;
|
|
32
|
+
case "Bs":
|
|
33
|
+
iconModule = await import("react-icons/bs");
|
|
34
|
+
break;
|
|
35
|
+
case "Fi":
|
|
36
|
+
iconModule = await import("react-icons/fi");
|
|
37
|
+
break;
|
|
38
|
+
case "Hi":
|
|
39
|
+
iconModule = await import("react-icons/hi");
|
|
40
|
+
break;
|
|
41
|
+
case "Io":
|
|
42
|
+
iconModule = await import("react-icons/io");
|
|
43
|
+
break;
|
|
44
|
+
case "Ri":
|
|
45
|
+
iconModule = await import("react-icons/ri");
|
|
46
|
+
break;
|
|
47
|
+
default:
|
|
48
|
+
console.warn(
|
|
49
|
+
`Unknown icon library prefix: ${prefix} in icon name: ${iconName}`
|
|
50
|
+
);
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
const iconComponent = iconModule[iconName];
|
|
54
|
+
if (!iconComponent || typeof iconComponent !== "function") {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
return iconComponent;
|
|
58
|
+
} catch (error) {
|
|
59
|
+
console.error(`Error loading icon "${iconName}":`, error);
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
// src/icons/index.ts
|
|
65
|
+
export * from "react-icons/fa";
|
|
66
|
+
export * from "react-icons/md";
|
|
67
|
+
export * from "react-icons/ai";
|
|
68
|
+
export * from "react-icons/bi";
|
|
69
|
+
export * from "react-icons/bs";
|
|
70
|
+
export * from "react-icons/fi";
|
|
71
|
+
export * from "react-icons/hi";
|
|
72
|
+
export * from "react-icons/io";
|
|
73
|
+
export * from "react-icons/ri";
|
|
74
|
+
export {
|
|
75
|
+
IconFromLibrary,
|
|
76
|
+
getIconByName
|
|
77
|
+
};
|