@cleen/ui 0.1.0 → 0.1.2
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 +1 -0
- package/dist/icons/index.d.ts +35 -0
- package/dist/icons/index.js +1 -0
- package/dist/index.d.ts +2959 -0
- package/dist/index.js +19 -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
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { Divider } from '@/components/divider';
|
|
2
|
-
import type { ComponentProps } from 'react';
|
|
3
|
-
import { components as SelectComponent } from 'react-select';
|
|
4
|
-
|
|
5
|
-
export interface SelectCustomMenuListProps extends ComponentProps<
|
|
6
|
-
typeof SelectComponent.MenuList
|
|
7
|
-
> {
|
|
8
|
-
isLoading?: boolean;
|
|
9
|
-
inputValue?: string;
|
|
10
|
-
createNewOptionCallback?: (value: string) => void;
|
|
11
|
-
createNewOptionLabelStringCb?: (inputValue: string) => string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
type SelectOption = {
|
|
15
|
-
label?: React.ReactNode;
|
|
16
|
-
labelString?: string;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export const SelectCustomMenuList = ({
|
|
20
|
-
isLoading,
|
|
21
|
-
inputValue,
|
|
22
|
-
options,
|
|
23
|
-
createNewOptionCallback,
|
|
24
|
-
createNewOptionLabelStringCb,
|
|
25
|
-
children,
|
|
26
|
-
...props
|
|
27
|
-
}: SelectCustomMenuListProps) => {
|
|
28
|
-
const normalizedInput = inputValue?.trim().toLowerCase();
|
|
29
|
-
|
|
30
|
-
const optionExists = (options as SelectOption[])?.some(option => {
|
|
31
|
-
// Prefer labelString when provided
|
|
32
|
-
if (option?.labelString) {
|
|
33
|
-
return option.labelString.toLowerCase() === normalizedInput;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
// Fallback to legacy string label
|
|
37
|
-
if (typeof option?.label === 'string') {
|
|
38
|
-
return option.label.toLowerCase() === normalizedInput;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
return false;
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
return (
|
|
45
|
-
<div className="cleen">
|
|
46
|
-
<SelectComponent.MenuList options={options} {...props}>
|
|
47
|
-
{children}
|
|
48
|
-
|
|
49
|
-
{createNewOptionCallback &&
|
|
50
|
-
!isLoading &&
|
|
51
|
-
inputValue &&
|
|
52
|
-
inputValue?.length > 0 &&
|
|
53
|
-
!optionExists && (
|
|
54
|
-
<div className="cleen-flex cleen-flex-col cleen-items-center cleen-justify-center">
|
|
55
|
-
<Divider />
|
|
56
|
-
|
|
57
|
-
<span
|
|
58
|
-
className="cleen-py-3 cleen-font-semibold cleen-text-sm cleen-text-primary/70 cleen-cursor-pointer"
|
|
59
|
-
onClick={() => {
|
|
60
|
-
createNewOptionCallback(inputValue);
|
|
61
|
-
}}
|
|
62
|
-
>
|
|
63
|
-
{createNewOptionLabelStringCb?.(inputValue) || inputValue}
|
|
64
|
-
</span>
|
|
65
|
-
</div>
|
|
66
|
-
)}
|
|
67
|
-
</SelectComponent.MenuList>
|
|
68
|
-
</div>
|
|
69
|
-
);
|
|
70
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Loader } from '@/components/loader';
|
|
2
|
-
import type { ComponentProps } from 'react';
|
|
3
|
-
import { components as SelectComponent } from 'react-select';
|
|
4
|
-
|
|
5
|
-
export interface SelectNoOptionsMessageProps extends ComponentProps<
|
|
6
|
-
typeof SelectComponent.NoOptionsMessage
|
|
7
|
-
> {
|
|
8
|
-
isLoading?: boolean;
|
|
9
|
-
noDataFound?: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export const SelectNoOptionsMessage = ({
|
|
13
|
-
isLoading,
|
|
14
|
-
noDataFound,
|
|
15
|
-
...props
|
|
16
|
-
}: SelectNoOptionsMessageProps) => {
|
|
17
|
-
return (
|
|
18
|
-
<SelectComponent.NoOptionsMessage {...props}>
|
|
19
|
-
{isLoading ? <Loader /> : noDataFound || 'No data found'}
|
|
20
|
-
</SelectComponent.NoOptionsMessage>
|
|
21
|
-
);
|
|
22
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { ComponentProps, ReactNode } from 'react';
|
|
2
|
-
import { components as SelectComponent } from 'react-select';
|
|
3
|
-
|
|
4
|
-
export type SelectOptionProps = ComponentProps<typeof SelectComponent.Option>;
|
|
5
|
-
|
|
6
|
-
export const SelectOption = (props: SelectOptionProps) => {
|
|
7
|
-
const data = props.data as {
|
|
8
|
-
label?: ReactNode;
|
|
9
|
-
sublabel?: ReactNode;
|
|
10
|
-
[key: string]: unknown;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
return (
|
|
14
|
-
<SelectComponent.Option {...props}>
|
|
15
|
-
{data?.label}
|
|
16
|
-
{data?.sublabel && <p className="cleen-text-xs">{data?.sublabel}</p>}
|
|
17
|
-
</SelectComponent.Option>
|
|
18
|
-
);
|
|
19
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { ComponentProps, ReactNode } from 'react';
|
|
2
|
-
import { components as SelectComponent } from 'react-select';
|
|
3
|
-
|
|
4
|
-
export type SelectSingleValueProps = ComponentProps<
|
|
5
|
-
typeof SelectComponent.SingleValue
|
|
6
|
-
>;
|
|
7
|
-
|
|
8
|
-
export const SelectSingleValue = (props: SelectSingleValueProps) => {
|
|
9
|
-
const data = props.data as {
|
|
10
|
-
label?: ReactNode;
|
|
11
|
-
sublabel?: ReactNode;
|
|
12
|
-
[key: string]: unknown;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
return (
|
|
16
|
-
<SelectComponent.SingleValue {...props}>
|
|
17
|
-
<div className="cleen-flex cleen-items-center cleen-gap-2">
|
|
18
|
-
<p>{data?.label}</p>
|
|
19
|
-
|
|
20
|
-
{data?.sublabel && (
|
|
21
|
-
<p className="cleen-text-xs cleen-text-gray/70 cleen-line-clamp-1">
|
|
22
|
-
{data?.sublabel}
|
|
23
|
-
</p>
|
|
24
|
-
)}
|
|
25
|
-
</div>
|
|
26
|
-
</SelectComponent.SingleValue>
|
|
27
|
-
);
|
|
28
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Select, type SelectProps } from './Select';
|
|
@@ -1,210 +0,0 @@
|
|
|
1
|
-
import { useEffect, useRef, useState } from 'react';
|
|
2
|
-
import type { SidebarProps, SidebarItemConfig } from './types';
|
|
3
|
-
import SidebarItem from './SidebarItem';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Sidebar - A flexible, generic sidebar navigation component
|
|
7
|
-
*
|
|
8
|
-
* Provides a collapsible sidebar with navigation items and an expandable drawer.
|
|
9
|
-
* Highly customizable through props, allowing for different menu structures,
|
|
10
|
-
* drawer content, and styling.
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```tsx
|
|
14
|
-
* const navigationItems = [
|
|
15
|
-
* { id: 'home', label: 'Home', iconName: 'Home' },
|
|
16
|
-
* { id: 'settings', label: 'Settings', iconName: 'Settings' },
|
|
17
|
-
* ];
|
|
18
|
-
*
|
|
19
|
-
* const drawerContent = {
|
|
20
|
-
* home: <HomeDrawerContent />,
|
|
21
|
-
* settings: <SettingsDrawerContent />,
|
|
22
|
-
* };
|
|
23
|
-
*
|
|
24
|
-
* <Sidebar
|
|
25
|
-
* navigationItems={navigationItems}
|
|
26
|
-
* drawerContent={drawerContent}
|
|
27
|
-
* logo={<MyLogo />}
|
|
28
|
-
* onLogoClick={() => navigate('/')}
|
|
29
|
-
* />
|
|
30
|
-
* ```
|
|
31
|
-
*/
|
|
32
|
-
export default function Sidebar({
|
|
33
|
-
navigationItems,
|
|
34
|
-
bottomNavigationItems = [],
|
|
35
|
-
drawerContent = {},
|
|
36
|
-
logo,
|
|
37
|
-
onLogoClick,
|
|
38
|
-
userAvatar,
|
|
39
|
-
userInfo,
|
|
40
|
-
drawerFooter,
|
|
41
|
-
drawerWidth = 330,
|
|
42
|
-
defaultActiveId = null,
|
|
43
|
-
activeId: controlledActiveId,
|
|
44
|
-
onActiveChange,
|
|
45
|
-
closeOnOutsideClick = true,
|
|
46
|
-
closeOnBlur = true,
|
|
47
|
-
className = '',
|
|
48
|
-
navigationClassName = '',
|
|
49
|
-
drawerClassName = '',
|
|
50
|
-
renderSidebarItem,
|
|
51
|
-
}: SidebarProps) {
|
|
52
|
-
const [internalActiveId, setInternalActiveId] = useState<string | null>(
|
|
53
|
-
defaultActiveId
|
|
54
|
-
);
|
|
55
|
-
const containerRef = useRef<HTMLDivElement>(null);
|
|
56
|
-
|
|
57
|
-
// Use controlled state if provided, otherwise use internal state
|
|
58
|
-
const activeId =
|
|
59
|
-
controlledActiveId !== undefined ? controlledActiveId : internalActiveId;
|
|
60
|
-
const isOpen = !!activeId;
|
|
61
|
-
|
|
62
|
-
const handleMenuClick = (item: SidebarItemConfig) => {
|
|
63
|
-
const newId = activeId === item.id ? null : item.id;
|
|
64
|
-
|
|
65
|
-
if (controlledActiveId === undefined) {
|
|
66
|
-
setInternalActiveId(newId);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
onActiveChange?.(newId);
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
// Handle outside clicks
|
|
73
|
-
useEffect(() => {
|
|
74
|
-
if (!closeOnOutsideClick || !isOpen) return;
|
|
75
|
-
|
|
76
|
-
const handleClickOutside = (event: MouseEvent) => {
|
|
77
|
-
if (
|
|
78
|
-
containerRef.current &&
|
|
79
|
-
!containerRef.current.contains(event.target as Node)
|
|
80
|
-
) {
|
|
81
|
-
const newId = null;
|
|
82
|
-
if (controlledActiveId === undefined) {
|
|
83
|
-
setInternalActiveId(newId);
|
|
84
|
-
}
|
|
85
|
-
onActiveChange?.(newId);
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
document.addEventListener('mousedown', handleClickOutside);
|
|
90
|
-
return () => {
|
|
91
|
-
document.removeEventListener('mousedown', handleClickOutside);
|
|
92
|
-
};
|
|
93
|
-
}, [closeOnOutsideClick, isOpen, controlledActiveId, onActiveChange]);
|
|
94
|
-
|
|
95
|
-
// Handle blur to close
|
|
96
|
-
const handleBlur = (event: React.FocusEvent<HTMLDivElement>) => {
|
|
97
|
-
if (!closeOnBlur || !isOpen) return;
|
|
98
|
-
|
|
99
|
-
// Check if the new focus target is outside the sidebar
|
|
100
|
-
if (
|
|
101
|
-
containerRef.current &&
|
|
102
|
-
!containerRef.current.contains(event.relatedTarget as Node)
|
|
103
|
-
) {
|
|
104
|
-
const newId = null;
|
|
105
|
-
if (controlledActiveId === undefined) {
|
|
106
|
-
setInternalActiveId(newId);
|
|
107
|
-
}
|
|
108
|
-
onActiveChange?.(newId);
|
|
109
|
-
}
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
return (
|
|
113
|
-
<div
|
|
114
|
-
className={`cleen-h-full cleen-flex cleen-bg-sidebar ${className}`}
|
|
115
|
-
ref={containerRef}
|
|
116
|
-
onBlur={handleBlur}
|
|
117
|
-
tabIndex={closeOnBlur ? 0 : undefined}
|
|
118
|
-
>
|
|
119
|
-
{/* Main sidebar navigation */}
|
|
120
|
-
<div
|
|
121
|
-
className={`cleen-h-full cleen-px-4 cleen-flex cleen-flex-col cleen-border-r cleen-border-r-gray/10 cleen-justify-between cleen-items-center cleen-gap-2 ${navigationClassName}`}
|
|
122
|
-
>
|
|
123
|
-
<div className="cleen-h-full">
|
|
124
|
-
{/* Logo */}
|
|
125
|
-
{logo && (
|
|
126
|
-
<div
|
|
127
|
-
className="cleen-flex cleen-justify-center cleen-items-center cleen-pt-8 cleen-pb-6 cleen-w-full cleen-cursor-pointer"
|
|
128
|
-
onClick={onLogoClick}
|
|
129
|
-
>
|
|
130
|
-
{logo}
|
|
131
|
-
</div>
|
|
132
|
-
)}
|
|
133
|
-
|
|
134
|
-
{/* Navigation items */}
|
|
135
|
-
<nav className="cleen-flex cleen-flex-col cleen-gap-2">
|
|
136
|
-
{navigationItems.map(item => (
|
|
137
|
-
<div key={item.id}>
|
|
138
|
-
{renderSidebarItem ? (
|
|
139
|
-
renderSidebarItem(item, activeId === item.id, handleMenuClick)
|
|
140
|
-
) : (
|
|
141
|
-
<SidebarItem
|
|
142
|
-
item={item}
|
|
143
|
-
activeId={activeId}
|
|
144
|
-
onClick={handleMenuClick}
|
|
145
|
-
/>
|
|
146
|
-
)}
|
|
147
|
-
{item?.withBottomDivider && (
|
|
148
|
-
<div className="cleen-mt-2 cleen-w-12 cleen-h-[1px] cleen-bg-gray/10" />
|
|
149
|
-
)}
|
|
150
|
-
</div>
|
|
151
|
-
))}
|
|
152
|
-
</nav>
|
|
153
|
-
</div>
|
|
154
|
-
|
|
155
|
-
{/* Bottom navigation items */}
|
|
156
|
-
<div className="cleen-flex cleen-flex-col cleen-items-center cleen-gap-2">
|
|
157
|
-
{bottomNavigationItems.map(item => (
|
|
158
|
-
<div key={item.id}>
|
|
159
|
-
{renderSidebarItem ? (
|
|
160
|
-
renderSidebarItem(item, activeId === item.id, handleMenuClick)
|
|
161
|
-
) : (
|
|
162
|
-
<SidebarItem
|
|
163
|
-
item={item}
|
|
164
|
-
activeId={activeId}
|
|
165
|
-
onClick={handleMenuClick}
|
|
166
|
-
countBadge={item.badgeCount}
|
|
167
|
-
/>
|
|
168
|
-
)}
|
|
169
|
-
{item?.withBottomDivider && (
|
|
170
|
-
<div className="cleen-mt-2 cleen-w-12 cleen-h-[1px] cleen-bg-gray/10" />
|
|
171
|
-
)}
|
|
172
|
-
</div>
|
|
173
|
-
))}
|
|
174
|
-
|
|
175
|
-
{/* User avatar */}
|
|
176
|
-
{userAvatar && (
|
|
177
|
-
<div className="cleen-mt-6 cleen-mb-8">{userAvatar}</div>
|
|
178
|
-
)}
|
|
179
|
-
</div>
|
|
180
|
-
</div>
|
|
181
|
-
|
|
182
|
-
{/* Expandable drawer */}
|
|
183
|
-
<div
|
|
184
|
-
className={`cleen-h-full cleen-bg-sidebar cleen-flex cleen-flex-col cleen-transition-all cleen-duration-100 cleen-overflow-hidden ${
|
|
185
|
-
isOpen ? 'cleen-border-r cleen-border-r-gray/10' : ''
|
|
186
|
-
} ${drawerClassName}`}
|
|
187
|
-
style={{
|
|
188
|
-
width: isOpen ? `${drawerWidth}px` : '0px',
|
|
189
|
-
visibility: isOpen ? 'visible' : 'hidden',
|
|
190
|
-
}}
|
|
191
|
-
>
|
|
192
|
-
{/* Drawer content */}
|
|
193
|
-
{activeId && drawerContent[activeId] && (
|
|
194
|
-
<div className="cleen-flex-1 cleen-overflow-auto">
|
|
195
|
-
{drawerContent[activeId]}
|
|
196
|
-
</div>
|
|
197
|
-
)}
|
|
198
|
-
|
|
199
|
-
{/* Drawer footer */}
|
|
200
|
-
{activeId && (drawerFooter || userInfo) && (
|
|
201
|
-
<div className="cleen-flex cleen-justify-between cleen-items-start cleen-gap-4 cleen-pb-8 cleen-px-5 cleen-w-full cleen-border-t cleen-border-gray/10 cleen-pt-4">
|
|
202
|
-
{typeof drawerFooter === 'function'
|
|
203
|
-
? drawerFooter(activeId)
|
|
204
|
-
: drawerFooter || userInfo}
|
|
205
|
-
</div>
|
|
206
|
-
)}
|
|
207
|
-
</div>
|
|
208
|
-
</div>
|
|
209
|
-
);
|
|
210
|
-
}
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { CleenIcon } from '@/components/cleenIcon';
|
|
2
|
-
import { Tooltip } from '@/components/tooltip';
|
|
3
|
-
import type { SidebarItemProps } from './types';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* SidebarItem - A single navigation item in the sidebar
|
|
7
|
-
*
|
|
8
|
-
* Displays an icon with optional badge count and tooltip.
|
|
9
|
-
* Supports active state styling and custom click handling.
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* ```tsx
|
|
13
|
-
* <SidebarItem
|
|
14
|
-
* item={{ id: 'home', label: 'Home', iconName: 'Home' }}
|
|
15
|
-
* activeId="home"
|
|
16
|
-
* onClick={(item) => console.log('Clicked:', item.id)}
|
|
17
|
-
* countBadge={5}
|
|
18
|
-
* />
|
|
19
|
-
* ```
|
|
20
|
-
*/
|
|
21
|
-
export default function SidebarItem({
|
|
22
|
-
item,
|
|
23
|
-
activeId,
|
|
24
|
-
onClick,
|
|
25
|
-
countBadge,
|
|
26
|
-
className = '',
|
|
27
|
-
renderIcon,
|
|
28
|
-
}: SidebarItemProps) {
|
|
29
|
-
const isActive = activeId === item?.id;
|
|
30
|
-
|
|
31
|
-
const iconElement = renderIcon ? (
|
|
32
|
-
renderIcon(item, isActive)
|
|
33
|
-
) : item?.iconSrc ? (
|
|
34
|
-
<img
|
|
35
|
-
src={item.iconSrc}
|
|
36
|
-
alt={item?.name || item?.label}
|
|
37
|
-
className={`cleen-w-6 cleen-h-6 cleen-transition-all cleen-duration-200 ${
|
|
38
|
-
isActive
|
|
39
|
-
? '[filter:brightness(0)_saturate(100%)_invert(54%)_sepia(56%)_saturate(7022%)_hue-rotate(179deg)_brightness(102%)_contrast(101%)]'
|
|
40
|
-
: ''
|
|
41
|
-
}`}
|
|
42
|
-
/>
|
|
43
|
-
) : item?.iconName ? (
|
|
44
|
-
<CleenIcon
|
|
45
|
-
name={item.iconName as never}
|
|
46
|
-
className={`cleen-text-gray/50 cleen-transition-all cleen-duration-200 ${
|
|
47
|
-
isActive
|
|
48
|
-
? '[filter:brightness(0)_saturate(100%)_invert(54%)_sepia(56%)_saturate(7022%)_hue-rotate(179deg)_brightness(102%)_contrast(101%)]'
|
|
49
|
-
: ''
|
|
50
|
-
}`}
|
|
51
|
-
/>
|
|
52
|
-
) : null;
|
|
53
|
-
|
|
54
|
-
return (
|
|
55
|
-
<Tooltip
|
|
56
|
-
hasArrow
|
|
57
|
-
placement="right"
|
|
58
|
-
color="rgba(var(--cleen-gray), 0.9)"
|
|
59
|
-
classNames={{
|
|
60
|
-
labelContainer: 'cleen-min-w-max cleen-z-[999]',
|
|
61
|
-
}}
|
|
62
|
-
label={item?.label}
|
|
63
|
-
>
|
|
64
|
-
<div
|
|
65
|
-
key={item?.id}
|
|
66
|
-
data-testid={`nav-item-${item?.id}`}
|
|
67
|
-
className={`
|
|
68
|
-
cleen-relative cleen-p-2 cleen-cursor-pointer cleen-rounded-md cleen-w-12 cleen-h-12
|
|
69
|
-
cleen-flex cleen-justify-center cleen-items-center cleen-select-none
|
|
70
|
-
cleen-transition-colors cleen-duration-200
|
|
71
|
-
hover:cleen-bg-primary/10
|
|
72
|
-
${isActive ? 'cleen-bg-primary/10' : ''}
|
|
73
|
-
${className}
|
|
74
|
-
`}
|
|
75
|
-
onClick={() => onClick?.(item)}
|
|
76
|
-
>
|
|
77
|
-
<div className="group-hover:[filter:brightness(0)_saturate(100%)_invert(54%)_sepia(56%)_saturate(7022%)_hue-rotate(179deg)_brightness(102%)_contrast(101%)]">
|
|
78
|
-
{iconElement}
|
|
79
|
-
</div>
|
|
80
|
-
{countBadge && (
|
|
81
|
-
<div className="cleen-absolute -cleen-top-1 -cleen-right-1 cleen-flex cleen-items-center cleen-justify-center cleen-w-4 cleen-h-4 cleen-bg-white cleen-rounded-md cleen-border cleen-border-gray/30 cleen-font-normal cleen-text-[8px] cleen-text-gray">
|
|
82
|
-
{countBadge}
|
|
83
|
-
</div>
|
|
84
|
-
)}
|
|
85
|
-
</div>
|
|
86
|
-
</Tooltip>
|
|
87
|
-
);
|
|
88
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { DrawerContainerProps } from '../types';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* DrawerContainer - Container for drawer content with a title header
|
|
5
|
-
*
|
|
6
|
-
* Provides consistent styling and layout for sidebar drawer content.
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* ```tsx
|
|
10
|
-
* <DrawerContainer title="Settings">
|
|
11
|
-
* <div>Your drawer content here</div>
|
|
12
|
-
* </DrawerContainer>
|
|
13
|
-
* ```
|
|
14
|
-
*/
|
|
15
|
-
export default function DrawerContainer({
|
|
16
|
-
children,
|
|
17
|
-
title,
|
|
18
|
-
className = '',
|
|
19
|
-
renderHeader,
|
|
20
|
-
}: DrawerContainerProps) {
|
|
21
|
-
return (
|
|
22
|
-
<div
|
|
23
|
-
className={`cleen-w-full cleen-h-full ${className}`}
|
|
24
|
-
data-testid={`drawer-container-${title}`}
|
|
25
|
-
>
|
|
26
|
-
{renderHeader ? (
|
|
27
|
-
renderHeader(title)
|
|
28
|
-
) : (
|
|
29
|
-
<h1 className="cleen-text-sm cleen-font-medium cleen-pb-4 cleen-pt-9 cleen-px-4 cleen-text-gray">
|
|
30
|
-
{title}
|
|
31
|
-
</h1>
|
|
32
|
-
)}
|
|
33
|
-
<div className="cleen-h-max cleen-w-full cleen-px-4">{children}</div>
|
|
34
|
-
</div>
|
|
35
|
-
);
|
|
36
|
-
}
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
import { CleenIcon, IconName } from '@/components/cleenIcon';
|
|
2
|
-
import { PillBadge } from '@/components/pillBadge';
|
|
3
|
-
import type {
|
|
4
|
-
DrawerContentTitleProps,
|
|
5
|
-
SubmenuItem,
|
|
6
|
-
} from '@/components/sidebar/types';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* SubMenu component for collapsible menu items
|
|
10
|
-
*/
|
|
11
|
-
function SubMenu({
|
|
12
|
-
items,
|
|
13
|
-
title,
|
|
14
|
-
iconName,
|
|
15
|
-
iconSrc,
|
|
16
|
-
iconSize = 24,
|
|
17
|
-
}: {
|
|
18
|
-
items: SubmenuItem[];
|
|
19
|
-
title: string;
|
|
20
|
-
iconName?: string;
|
|
21
|
-
iconSrc?: string;
|
|
22
|
-
iconSize?: number;
|
|
23
|
-
}) {
|
|
24
|
-
return (
|
|
25
|
-
<details className="cleen-group">
|
|
26
|
-
<summary className="cleen-flex cleen-items-center cleen-justify-between cleen-gap-3 cleen-px-3 cleen-py-2 cleen-w-full cleen-rounded-md cleen-cursor-pointer hover:cleen-bg-gray/5 cleen-transition-colors cleen-duration-200 cleen-list-none [&::-webkit-details-marker]:cleen-hidden">
|
|
27
|
-
<div
|
|
28
|
-
data-testid="title-list"
|
|
29
|
-
className="cleen-flex cleen-items-center cleen-gap-3"
|
|
30
|
-
>
|
|
31
|
-
{iconSrc ? (
|
|
32
|
-
<img
|
|
33
|
-
src={iconSrc}
|
|
34
|
-
alt={title}
|
|
35
|
-
className="cleen-w-6 cleen-h-6 cleen-text-gray/50 cleen-transition-colors cleen-duration-200 group-hover:cleen-text-gray"
|
|
36
|
-
/>
|
|
37
|
-
) : iconName ? (
|
|
38
|
-
<CleenIcon
|
|
39
|
-
name={iconName as never}
|
|
40
|
-
width={iconSize}
|
|
41
|
-
height={iconSize}
|
|
42
|
-
className="cleen-text-gray/50 cleen-transition-all cleen-duration-200"
|
|
43
|
-
/>
|
|
44
|
-
) : null}
|
|
45
|
-
<span className="cleen-font-semibold cleen-text-sm cleen-text-gray/70 group-hover:cleen-text-gray cleen-transition-colors cleen-duration-200">
|
|
46
|
-
{title}
|
|
47
|
-
</span>
|
|
48
|
-
</div>
|
|
49
|
-
<CleenIcon
|
|
50
|
-
name={IconName.ChevronUp}
|
|
51
|
-
className="cleen-w-5 cleen-h-5 cleen-text-gray cleen-transition-transform cleen-duration-200 group-open:cleen-rotate-180"
|
|
52
|
-
/>
|
|
53
|
-
</summary>
|
|
54
|
-
<div className="cleen-flex cleen-flex-col cleen-gap-1 cleen-mt-1">
|
|
55
|
-
{items?.map(item => (
|
|
56
|
-
<span
|
|
57
|
-
key={item?.id}
|
|
58
|
-
className="cleen-py-2 cleen-px-3 cleen-pl-12 cleen-font-semibold cleen-text-sm cleen-text-gray/70 cleen-rounded-md cleen-cursor-pointer hover:cleen-text-gray hover:cleen-bg-primary/5 cleen-transition-colors cleen-duration-200"
|
|
59
|
-
onClick={() => item.onClick(item)}
|
|
60
|
-
>
|
|
61
|
-
{item?.title}
|
|
62
|
-
</span>
|
|
63
|
-
))}
|
|
64
|
-
</div>
|
|
65
|
-
</details>
|
|
66
|
-
);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* DrawerContentTitle - A title/item component for drawer content
|
|
71
|
-
*
|
|
72
|
-
* Supports simple items with icons and badges, or collapsible submenus.
|
|
73
|
-
*
|
|
74
|
-
* @example
|
|
75
|
-
* ```tsx
|
|
76
|
-
* <DrawerContentTitle
|
|
77
|
-
* title="Dashboard"
|
|
78
|
-
* iconSrc="/icons/dashboard.svg"
|
|
79
|
-
* badgeCount={5}
|
|
80
|
-
* onClick={() => navigate('/dashboard')}
|
|
81
|
-
* />
|
|
82
|
-
*
|
|
83
|
-
* // With submenu
|
|
84
|
-
* <DrawerContentTitle
|
|
85
|
-
* title="Settings"
|
|
86
|
-
* iconSrc="/icons/settings.svg"
|
|
87
|
-
* submenu={[
|
|
88
|
-
* { id: '1', title: 'Profile', onClick: handleProfile },
|
|
89
|
-
* { id: '2', title: 'Security', onClick: handleSecurity },
|
|
90
|
-
* ]}
|
|
91
|
-
* />
|
|
92
|
-
* ```
|
|
93
|
-
*/
|
|
94
|
-
export default function DrawerContentTitle({
|
|
95
|
-
title,
|
|
96
|
-
iconName,
|
|
97
|
-
iconSrc,
|
|
98
|
-
iconSize = 24,
|
|
99
|
-
badgeColor = 'gray',
|
|
100
|
-
badgeCount,
|
|
101
|
-
submenu,
|
|
102
|
-
onClick,
|
|
103
|
-
className = '',
|
|
104
|
-
titleClassName = '',
|
|
105
|
-
isActive = false,
|
|
106
|
-
}: DrawerContentTitleProps) {
|
|
107
|
-
if (Array.isArray(submenu) && submenu.length > 0) {
|
|
108
|
-
return (
|
|
109
|
-
<SubMenu
|
|
110
|
-
items={submenu}
|
|
111
|
-
title={title}
|
|
112
|
-
iconSrc={iconSrc}
|
|
113
|
-
iconName={iconName}
|
|
114
|
-
/>
|
|
115
|
-
);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
return (
|
|
119
|
-
<div
|
|
120
|
-
className={`
|
|
121
|
-
cleen-flex cleen-items-center cleen-justify-between cleen-gap-3 cleen-px-3 cleen-py-2 cleen-w-full
|
|
122
|
-
cleen-rounded-md cleen-cursor-pointer cleen-transition-colors cleen-duration-200
|
|
123
|
-
hover:cleen-bg-gray/5
|
|
124
|
-
${isActive ? 'cleen-bg-gray/5' : ''}
|
|
125
|
-
${className}
|
|
126
|
-
`}
|
|
127
|
-
onClick={onClick}
|
|
128
|
-
>
|
|
129
|
-
<div className="cleen-flex cleen-items-center cleen-gap-3">
|
|
130
|
-
{iconSrc ? (
|
|
131
|
-
<img
|
|
132
|
-
src={iconSrc}
|
|
133
|
-
alt={title}
|
|
134
|
-
width={iconSize}
|
|
135
|
-
height={iconSize}
|
|
136
|
-
className={`cleen-transition-all cleen-duration-200 ${
|
|
137
|
-
isActive
|
|
138
|
-
? '[filter:brightness(0)_saturate(100%)_invert(22%)_sepia(12%)_saturate(1405%)_hue-rotate(179deg)_brightness(93%)_contrast(86%)]'
|
|
139
|
-
: ''
|
|
140
|
-
}`}
|
|
141
|
-
/>
|
|
142
|
-
) : iconName ? (
|
|
143
|
-
<CleenIcon
|
|
144
|
-
name={iconName as never}
|
|
145
|
-
width={iconSize}
|
|
146
|
-
height={iconSize}
|
|
147
|
-
className="cleen-text-gray/50 cleen-transition-all cleen-duration-200"
|
|
148
|
-
/>
|
|
149
|
-
) : null}
|
|
150
|
-
<span
|
|
151
|
-
className={`
|
|
152
|
-
cleen-font-semibold cleen-text-sm cleen-text-gray/70 cleen-transition-colors cleen-duration-200
|
|
153
|
-
${isActive ? 'cleen-text-gray' : ''}
|
|
154
|
-
${titleClassName}
|
|
155
|
-
`}
|
|
156
|
-
>
|
|
157
|
-
{title}
|
|
158
|
-
</span>
|
|
159
|
-
</div>
|
|
160
|
-
{['string', 'number'].includes(typeof badgeCount) && (
|
|
161
|
-
<PillBadge color={badgeColor as never} label={String(badgeCount)} />
|
|
162
|
-
)}
|
|
163
|
-
</div>
|
|
164
|
-
);
|
|
165
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export { default as Sidebar } from './Sidebar';
|
|
2
|
-
export { default as SidebarItem } from './SidebarItem';
|
|
3
|
-
export { default as DrawerContainer } from './drawerContainer/DrawerContainer';
|
|
4
|
-
export { default as DrawerContentTitle } from './drawerContainer/DrawerContentTitle';
|
|
5
|
-
export type {
|
|
6
|
-
SidebarItemConfig,
|
|
7
|
-
SidebarItemProps,
|
|
8
|
-
SubmenuItem,
|
|
9
|
-
DrawerContentTitleProps,
|
|
10
|
-
DrawerContainerProps,
|
|
11
|
-
DrawerConfig,
|
|
12
|
-
SidebarProps,
|
|
13
|
-
} from './types';
|