@wishket/design-system 1.17.3 → 1.17.4
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 +1 -1
- package/dist/Components/Base/Layouts/FullBleed/FullBleed.js +1 -1
- package/dist/Components/Base/Layouts/FullBleed/FullBleed.utils.js +1 -1
- package/dist/Components/Base/TextWithIcons/TextWithIcons.d.ts +1 -1
- package/dist/Components/Base/TextWithIcons/TextWithIcons.js +2 -2
- package/dist/Components/Base/Typography/Typography.d.ts +1 -1
- package/dist/Components/Base/Typography/Typography.js +3 -3
- package/dist/Components/Base/Typography/Typography.types.d.ts +13 -12
- package/dist/Components/DataDisplays/Accordion/Accordion.js +8 -8
- package/dist/Components/DataDisplays/Avatar/Avatar.d.ts +2 -1
- package/dist/Components/DataDisplays/Avatar/Avatar.js +5 -4
- package/dist/Components/DataDisplays/Divider/Divider.d.ts +3 -20
- package/dist/Components/DataDisplays/Divider/Divider.js +10 -6
- package/dist/Components/DataDisplays/Label/Label.js +1 -1
- package/dist/Components/DataDisplays/Li/Li.d.ts +5 -68
- package/dist/Components/DataDisplays/Li/Li.js +7 -7
- package/dist/Components/DataDisplays/ProductIcon/Icons/Achieve.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/Bookmark.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/BubbleStar.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/BubbleStars.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/Building.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/Calendar.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/CardConfirm.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/CardWrite.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/Congrats.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/ContractPen.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/Credit.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/Database.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/Design.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/Discount.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/DocumentCloud.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/DocumentSuccess.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/Email.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/HandShake.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/HandThumb.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/Idea.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/Lock.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/Logout.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/MemoWrite.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/MobileConfirm.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/Package.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/PaperCertify.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/PaperClip.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/PaperClipClock.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/PaperClock.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/PaperConfirm.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/PaperContract.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/PaperHold.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/PaperOverlap.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/PaperPen.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/PaperProject.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/PaperSecurity.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/PersonFreelancer.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/PersonOffice.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/PersonSmile.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/Public.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/Receipt.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/Repair.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/Search.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/SearchConfirm.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/ShieldConfirm.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/ShieldWon.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/Shopping.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/WebDevelopment.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/WebDomain.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/WebPayment.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/WebSecurity.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/WidePaperConfirm.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/WidePaperPayment.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/WidePaperPlan.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/WidePaperStructure.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/Icons/Won.d.ts +1 -1
- package/dist/Components/DataDisplays/ProductIcon/ProductIcon.constants.d.ts +9 -5
- package/dist/Components/DataDisplays/ProductIcon/ProductIcon.js +5 -8
- package/dist/Components/DataDisplays/ProductIcon/ProductIcon.part.types.d.ts +5 -0
- package/dist/Components/DataDisplays/ProductIcon/ProductIcon.types.d.ts +4 -11
- package/dist/Components/DataDisplays/SkillLabel/SkillLabel.parts.js +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Large/LargeAccountSetting.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Large/LargeAnswer.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Large/LargeArrowDown.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Large/LargeArrowLeft.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Large/LargeArrowRight.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Large/LargeArrowUp.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Large/LargeBell.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Large/LargeBubble.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Large/LargeCollection.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Large/LargeCollectionAdd.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Large/LargeDelete.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Large/LargeDrawer.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Large/LargeFilter.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Large/LargeHeart.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Large/LargeHome.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Large/LargeLike.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Large/LargeLink.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Large/LargePlus.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Large/LargeQuestion.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Large/LargeReset.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Large/LargeScrap.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Large/LargeSearch.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Large/LargeSend.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Large/LargeService.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Large/LargeShare.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Large/LargeStar.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Large/LargeTop.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Large/LargeUserImageAvatar.d.ts +1 -2
- package/dist/Components/DataDisplays/SystemIcon/Icons/Large/LargeUserImageAvatar.js +4 -4
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumAi.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumAnswer.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumArrowDown.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumArrowLeft.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumArrowRight.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumArrowUp.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumBell.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumBubble.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumCalendar.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumCaution.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumCautionTriangle.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumCheck.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumClip.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumCollection.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumCompass.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumDelete.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumEdit.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumError.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumEye.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumEyeSlash.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumFilter.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumFire.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumGlassesMinus.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumGlassesPlus.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumHashTag.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumHeart.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumHighlight.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumInformation.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumLink.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumList.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumMagic.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumMenuDown.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumMenuUp.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumMinus.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumMoreOptions.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumPersonAdd.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumPin.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumPlus.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumPopular.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumPrivate.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumPublic.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumQuestion.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumQuestionNew.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumRename.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumReply.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumReset.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumScrap.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumSearch.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumSend.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumShare.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumStar.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumSuccess.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumTrash.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumUpload.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Medium/MediumWait.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Small/SmallArrowDown.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Small/SmallArrowLeft.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Small/SmallArrowRight.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Small/SmallArrowUp.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Small/SmallBell.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Small/SmallCamera.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Small/SmallCat.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Small/SmallCheck.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Small/SmallCollection.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Small/SmallDelete.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Small/SmallEdit.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Small/SmallEye.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Small/SmallHeart.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Small/SmallIndeterminate.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Small/SmallInformation.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Small/SmallLike.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Small/SmallLink.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Small/SmallList.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Small/SmallMoreOptions.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Small/SmallPlay.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Small/SmallPlus.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Small/SmallPrivate.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Small/SmallPublic.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Small/SmallRadioDot.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Small/SmallResizer.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Small/SmallScrap.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Small/SmallShare.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Small/SmallSlash.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Small/SmallStar.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Small/SmallStop.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Small/SmallTrash.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Small/SmallWait.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Social/SocialFacebook.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Social/SocialGoogle.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Social/SocialLinkedIn.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Social/SocialNaver.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Social/SocialX.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Social/WishketBlog.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Social/WishketFacebook.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/Icons/Social/WishketNaverBlog.d.ts +1 -1
- package/dist/Components/DataDisplays/SystemIcon/SystemIcon.constants.d.ts +6 -1
- package/dist/Components/DataDisplays/SystemIcon/SystemIcon.part.types.d.ts +6 -0
- package/dist/Components/DataDisplays/SystemIcon/SystemIcon.types.d.ts +4 -12
- package/dist/Components/Feedbacks/DialogBox/DialogBox.js +2 -2
- package/dist/Components/Feedbacks/GlobalLoadingIndicator/GlobalLoadingIndicator.d.ts +18 -10
- package/dist/Components/Feedbacks/GlobalLoadingIndicator/GlobalLoadingIndicator.js +16 -7
- package/dist/Components/Feedbacks/LoadingIndicator/LoadingIndicator.d.ts +2 -21
- package/dist/Components/Feedbacks/LoadingIndicator/LoadingIndicator.js +9 -6
- package/dist/Components/Feedbacks/LoadingIndicator/LoadingIndicator.types.d.ts +2 -0
- package/dist/Components/Feedbacks/MessageBar/MessageBar.js +5 -5
- package/dist/Components/Feedbacks/MessageBox/MessageBox.js +6 -6
- package/dist/Components/Feedbacks/MessageBox/MessageBox.parts.js +3 -3
- package/dist/Components/Feedbacks/SnackBar/SnackBar.d.ts +1 -1
- package/dist/Components/Feedbacks/SnackBar/SnackBar.js +5 -11
- package/dist/Components/Feedbacks/SnackBar/SnackBar.types.d.ts +1 -0
- package/dist/Components/Feedbacks/Tooltip/PlainTooltip/PlainTooltip.d.ts +30 -0
- package/dist/Components/Feedbacks/Tooltip/PlainTooltip/PlainTooltip.js +31 -0
- package/dist/Components/Feedbacks/{PlainTooltip → Tooltip/PlainTooltip}/PlainTooltip.parts.d.ts +1 -1
- package/dist/Components/Feedbacks/Tooltip/PlainTooltip/PlainTooltip.parts.js +1 -0
- package/dist/Components/Feedbacks/Tooltip/PlainTooltip/index.d.ts +1 -0
- package/dist/Components/Feedbacks/Tooltip/RichTooltip/RichTooltip.d.ts +33 -0
- package/dist/Components/Feedbacks/Tooltip/RichTooltip/RichTooltip.js +32 -0
- package/dist/Components/Feedbacks/Tooltip/RichTooltip/index.d.ts +1 -0
- package/dist/Components/Feedbacks/Tooltip/Tooltip.d.ts +24 -0
- package/dist/Components/Feedbacks/Tooltip/Tooltip.js +25 -0
- package/dist/Components/Feedbacks/Tooltip/Tooltip.types.d.ts +19 -0
- package/dist/Components/Feedbacks/Tooltip/index.d.ts +4 -0
- package/dist/Components/Feedbacks/index.d.ts +1 -2
- package/dist/Components/Inputs/AutoCompleteList/AutoCompleteList.js +4 -4
- package/dist/Components/Inputs/AutoCompleteList/AutoCompleteList.parts.js +4 -4
- package/dist/Components/Inputs/Button/Button.d.ts +7 -13
- package/dist/Components/Inputs/Button/Button.js +2 -51
- package/dist/Components/Inputs/Button/Button.types.d.ts +3 -10
- package/dist/Components/Inputs/Calendar/Calendar.js +8 -8
- package/dist/Components/Inputs/Calendar/Calendar.parts.js +7 -7
- package/dist/Components/Inputs/Checkbox/Checkbox.types.d.ts +1 -1
- package/dist/Components/Inputs/CheckboxCard/CheckboxCard.js +1 -1
- package/dist/Components/Inputs/CheckboxCard/CheckboxCard.parts.js +3 -3
- package/dist/Components/Inputs/CheckboxCard/CheckboxCard.types.d.ts +1 -1
- package/dist/Components/Inputs/CheckboxListItem/CheckboxListItem.d.ts +1 -1
- package/dist/Components/Inputs/CheckboxListItem/CheckboxListItem.js +3 -3
- package/dist/Components/Inputs/ChoiceChip/ChoiceChip.js +6 -6
- package/dist/Components/Inputs/CommentArea/CommentArea.js +9 -9
- package/dist/Components/Inputs/FileUploader/FileUploader.d.ts +45 -0
- package/dist/Components/Inputs/FileUploader/FileUploader.hooks.d.ts +20 -0
- package/dist/Components/Inputs/FileUploader/FileUploader.hooks.js +1 -0
- package/dist/Components/Inputs/FileUploader/FileUploader.js +48 -0
- package/dist/Components/Inputs/FileUploader/FileUploader.parts.d.ts +10 -0
- package/dist/Components/Inputs/FileUploader/FileUploader.parts.js +11 -0
- package/dist/Components/Inputs/FileUploader/FileUploader.types.d.ts +19 -0
- package/dist/Components/Inputs/FileUploader/FileUploader.utils.d.ts +4 -0
- package/dist/Components/Inputs/FileUploader/FileUploader.utils.js +1 -0
- package/dist/Components/Inputs/FileUploader/index.d.ts +2 -0
- package/dist/Components/Inputs/FilterChip/FilterChip.js +5 -5
- package/dist/Components/Inputs/FilterList/FilterList.js +16 -14
- package/dist/Components/Inputs/IconButton/IconButton.d.ts +6 -4
- package/dist/Components/Inputs/IconButton/IconButton.js +7 -8
- package/dist/Components/Inputs/IconButtonDropdown/IconButtonDropdown.js +4 -4
- package/dist/Components/Inputs/Input/Input.js +1 -1
- package/dist/Components/Inputs/Input/LabelInput.js +3 -3
- package/dist/Components/Inputs/Input/PasswordInput.js +4 -4
- package/dist/Components/Inputs/InputChip/InputChip.js +3 -3
- package/dist/Components/Inputs/List/List.js +4 -4
- package/dist/Components/Inputs/MultiColumnList/MultiColumnList.parts.js +2 -2
- package/dist/Components/Inputs/RadioCard/RadioCard.js +1 -1
- package/dist/Components/Inputs/RadioCard/RadioCard.parts.js +4 -4
- package/dist/Components/Inputs/RadioList/RadioList.js +2 -2
- package/dist/Components/Inputs/RadioList/parts/index.d.ts +0 -1
- package/dist/Components/Inputs/RadioListItem/RadioListItem.d.ts +10 -0
- package/dist/Components/Inputs/RadioListItem/RadioListItem.js +5 -0
- package/dist/Components/Inputs/RadioListItem/index.d.ts +1 -0
- package/dist/Components/Inputs/RangeSlider/RangeSlider.js +2 -2
- package/dist/Components/Inputs/SearchField/SearchField.js +3 -3
- package/dist/Components/Inputs/SegmentedControl/SegmentedControl.js +1 -1
- package/dist/Components/Inputs/SupportTextContainer/SupportTextContainer.d.ts +3 -2
- package/dist/Components/Inputs/SupportTextContainer/SupportTextContainer.js +3 -3
- package/dist/Components/Inputs/TextButton/TextButton.d.ts +5 -2
- package/dist/Components/Inputs/TextButton/TextButton.js +7 -4
- package/dist/Components/Inputs/TextButton/TextButton.types.d.ts +2 -0
- package/dist/Components/Inputs/TextButtonDropdown/TextButtonDropdown.js +4 -4
- package/dist/Components/Inputs/TextButtonDropdown/TextButtonDropdown.parts.js +4 -4
- package/dist/Components/Inputs/TextField/TextField.d.ts +5 -8
- package/dist/Components/Inputs/TextField/TextField.js +6 -8
- package/dist/Components/Inputs/TextFieldContainer/TextFieldContainer.js +1 -1
- package/dist/Components/Inputs/TextFieldDropdown/TextFieldDropdown.js +3 -3
- package/dist/Components/Inputs/TextFieldDropdown/TextFieldDropdown.parts.js +3 -3
- package/dist/Components/Inputs/Textarea/Textarea.js +5 -5
- package/dist/Components/Inputs/index.d.ts +2 -0
- package/dist/Components/Layouts/Card/Card.d.ts +42 -0
- package/dist/Components/Layouts/Card/index.d.ts +1 -0
- package/dist/Components/Layouts/Fieldset/Fieldset.d.ts +38 -0
- package/dist/Components/Layouts/Fieldset/index.d.ts +1 -0
- package/dist/Components/Layouts/index.d.ts +2 -0
- package/dist/Components/Navigations/BoxTab/BoxTab.parts.js +1 -1
- package/dist/Components/Navigations/Drawer/Drawer.d.ts +2 -7
- package/dist/Components/Navigations/Drawer/Drawer.styles.d.ts +1 -1
- package/dist/Components/Navigations/Drawer/Drawer.types.d.ts +7 -0
- package/dist/Components/Navigations/GNBList/GNBList.d.ts +30 -30
- package/dist/Components/Navigations/GNBList/GNBList.js +27 -27
- package/dist/Components/Navigations/GNBList/GNBList.parts.d.ts +114 -20
- package/dist/Components/Navigations/GNBList/GNBList.parts.js +64 -16
- package/dist/Components/Navigations/GNBList/GNBList.types.d.ts +4 -4
- package/dist/Components/Navigations/Menu/Menu.js +3 -3
- package/dist/Components/Navigations/Pagination/Pagination.parts.js +2 -2
- package/dist/Components/Navigations/TableOfContents/TableOfContents.js +1 -1
- package/dist/Components/Navigations/TextTab/TextTab.parts.js +4 -4
- package/dist/Components/Wrappers/WithBadge/WithBadge.js +2 -2
- package/dist/Components/Wrappers/WithSnackBar/WithSnackBar.js +3 -3
- package/dist/Components/Wrappers/index.d.ts +0 -1
- package/dist/cjs/Components/Base/Layouts/FullBleed/FullBleed.js +1 -1
- package/dist/cjs/Components/Base/Layouts/FullBleed/FullBleed.utils.js +1 -1
- package/dist/cjs/Components/Base/TextWithIcons/TextWithIcons.js +2 -2
- package/dist/cjs/Components/Base/Typography/Typography.js +3 -3
- package/dist/cjs/Components/DataDisplays/Accordion/Accordion.js +8 -8
- package/dist/cjs/Components/DataDisplays/Avatar/Avatar.js +5 -4
- package/dist/cjs/Components/DataDisplays/Divider/Divider.js +24 -1
- package/dist/cjs/Components/DataDisplays/Label/Label.js +1 -1
- package/dist/cjs/Components/DataDisplays/Li/Li.js +7 -8
- package/dist/cjs/Components/DataDisplays/ProductIcon/ProductIcon.js +2 -8
- package/dist/cjs/Components/DataDisplays/SkillLabel/SkillLabel.parts.js +1 -1
- package/dist/cjs/Components/DataDisplays/SystemIcon/Icons/Large/LargeUserImageAvatar.js +4 -4
- package/dist/cjs/Components/Feedbacks/DialogBox/DialogBox.js +2 -2
- package/dist/cjs/Components/Feedbacks/LoadingIndicator/LoadingIndicator.js +28 -5
- package/dist/cjs/Components/Feedbacks/MessageBar/MessageBar.js +3 -3
- package/dist/cjs/Components/Feedbacks/MessageBox/MessageBox.js +5 -5
- package/dist/cjs/Components/Feedbacks/MessageBox/MessageBox.parts.js +3 -3
- package/dist/cjs/Components/Feedbacks/SnackBar/SnackBar.js +6 -11
- package/dist/cjs/Components/Feedbacks/Tooltip/PlainTooltip/PlainTooltip.js +31 -0
- package/dist/cjs/Components/Feedbacks/Tooltip/PlainTooltip/PlainTooltip.parts.js +1 -0
- package/dist/cjs/Components/Feedbacks/Tooltip/RichTooltip/RichTooltip.js +32 -0
- package/dist/cjs/Components/Feedbacks/Tooltip/Tooltip.js +26 -0
- package/dist/cjs/Components/Inputs/AutoCompleteList/AutoCompleteList.js +4 -4
- package/dist/cjs/Components/Inputs/AutoCompleteList/AutoCompleteList.parts.js +4 -4
- package/dist/cjs/Components/Inputs/Button/Button.js +2 -51
- package/dist/cjs/Components/Inputs/Calendar/Calendar.js +6 -6
- package/dist/cjs/Components/Inputs/Calendar/Calendar.parts.js +7 -7
- package/dist/cjs/Components/Inputs/CheckboxCard/CheckboxCard.js +1 -1
- package/dist/cjs/Components/Inputs/CheckboxCard/CheckboxCard.parts.js +2 -2
- package/dist/cjs/Components/Inputs/CheckboxListItem/CheckboxListItem.js +3 -3
- package/dist/cjs/Components/Inputs/ChoiceChip/ChoiceChip.js +5 -5
- package/dist/cjs/Components/Inputs/CommentArea/CommentArea.js +9 -9
- package/dist/cjs/Components/Inputs/FileUploader/FileUploader.hooks.js +1 -0
- package/dist/cjs/Components/Inputs/FileUploader/FileUploader.js +6 -0
- package/dist/cjs/Components/Inputs/FileUploader/FileUploader.parts.js +11 -0
- package/dist/cjs/Components/Inputs/FileUploader/FileUploader.utils.js +1 -0
- package/dist/cjs/Components/Inputs/FilterChip/FilterChip.js +4 -4
- package/dist/cjs/Components/Inputs/FilterList/FilterList.js +15 -13
- package/dist/cjs/Components/Inputs/IconButton/IconButton.js +6 -7
- package/dist/cjs/Components/Inputs/IconButtonDropdown/IconButtonDropdown.js +3 -3
- package/dist/cjs/Components/Inputs/Input/Input.js +1 -1
- package/dist/cjs/Components/Inputs/Input/LabelInput.js +3 -3
- package/dist/cjs/Components/Inputs/Input/PasswordInput.js +4 -4
- package/dist/cjs/Components/Inputs/InputChip/InputChip.js +2 -2
- package/dist/cjs/Components/Inputs/List/List.js +4 -4
- package/dist/cjs/Components/Inputs/MultiColumnList/MultiColumnList.parts.js +2 -2
- package/dist/cjs/Components/Inputs/RadioCard/RadioCard.js +1 -1
- package/dist/cjs/Components/Inputs/RadioCard/RadioCard.parts.js +4 -4
- package/dist/cjs/Components/Inputs/RadioList/RadioList.js +1 -1
- package/dist/cjs/Components/Inputs/RadioListItem/RadioListItem.js +5 -0
- package/dist/cjs/Components/Inputs/RangeSlider/RangeSlider.js +5 -5
- package/dist/cjs/Components/Inputs/SearchField/SearchField.js +5 -5
- package/dist/cjs/Components/Inputs/SegmentedControl/SegmentedControl.js +1 -1
- package/dist/cjs/Components/Inputs/SupportTextContainer/SupportTextContainer.js +3 -3
- package/dist/cjs/Components/Inputs/TextButton/TextButton.js +6 -3
- package/dist/cjs/Components/Inputs/TextButtonDropdown/TextButtonDropdown.js +1 -1
- package/dist/cjs/Components/Inputs/TextButtonDropdown/TextButtonDropdown.parts.js +4 -4
- package/dist/cjs/Components/Inputs/TextField/TextField.js +6 -8
- package/dist/cjs/Components/Inputs/TextFieldContainer/TextFieldContainer.js +1 -1
- package/dist/cjs/Components/Inputs/TextFieldDropdown/TextFieldDropdown.js +3 -3
- package/dist/cjs/Components/Inputs/TextFieldDropdown/TextFieldDropdown.parts.js +2 -2
- package/dist/cjs/Components/Inputs/Textarea/Textarea.js +4 -4
- package/dist/cjs/Components/Navigations/BoxTab/BoxTab.parts.js +1 -1
- package/dist/cjs/Components/Navigations/GNBList/GNBList.js +27 -27
- package/dist/cjs/Components/Navigations/GNBList/GNBList.parts.js +40 -16
- package/dist/cjs/Components/Navigations/Menu/Menu.js +2 -2
- package/dist/cjs/Components/Navigations/Pagination/Pagination.parts.js +2 -2
- package/dist/cjs/Components/Navigations/TableOfContents/TableOfContents.js +1 -1
- package/dist/cjs/Components/Navigations/TextTab/TextTab.parts.js +5 -5
- package/dist/cjs/Components/Wrappers/WithBadge/WithBadge.js +1 -1
- package/dist/cjs/Components/Wrappers/WithSnackBar/WithSnackBar.js +2 -2
- package/dist/cjs/constants/colors/colors.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/config/config.css +215 -0
- package/dist/config/tailwind.config.js +1 -64
- package/dist/config/tailwindcss-grid-areas.js +155 -0
- package/dist/constants/colors/colors.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +21 -5
- package/dist/Components/Feedbacks/PlainTooltip/PlainTooltip.d.ts +0 -44
- package/dist/Components/Feedbacks/PlainTooltip/PlainTooltip.js +0 -37
- package/dist/Components/Feedbacks/PlainTooltip/PlainTooltip.parts.js +0 -1
- package/dist/Components/Feedbacks/PlainTooltip/index.d.ts +0 -2
- package/dist/Components/Feedbacks/RichTooltip/RichTooltip.d.ts +0 -34
- package/dist/Components/Feedbacks/RichTooltip/RichTooltip.js +0 -27
- package/dist/Components/Feedbacks/RichTooltip/index.d.ts +0 -2
- package/dist/Components/Inputs/Button/Button.parts.d.ts +0 -2
- package/dist/Components/Inputs/Button/Button.parts.js +0 -2
- package/dist/Components/Inputs/RadioList/parts/RadioListItem.d.ts +0 -10
- package/dist/Components/Inputs/RadioList/parts/RadioListItem.js +0 -4
- package/dist/Components/Wrappers/WithRichTooltip/WithRichTooltip.d.ts +0 -39
- package/dist/Components/Wrappers/WithRichTooltip/WithRichTooltip.js +0 -32
- package/dist/Components/Wrappers/WithRichTooltip/index.d.ts +0 -1
- package/dist/cjs/Components/Feedbacks/PlainTooltip/PlainTooltip.js +0 -37
- package/dist/cjs/Components/Feedbacks/PlainTooltip/PlainTooltip.parts.js +0 -1
- package/dist/cjs/Components/Feedbacks/RichTooltip/RichTooltip.js +0 -1
- package/dist/cjs/Components/Inputs/Button/Button.parts.js +0 -2
- package/dist/cjs/Components/Inputs/RadioList/parts/RadioListItem.js +0 -4
- package/dist/cjs/Components/Wrappers/WithRichTooltip/WithRichTooltip.js +0 -3
- package/dist/config/tailwind-plugins.js +0 -90
- package/dist/types.d.ts +0 -32
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import{twMerge as r}from"tailwind-merge";import{useRef as n,useState as o,useLayoutEffect as i}from"react";import
|
|
1
|
+
"use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import{twMerge as r}from"tailwind-merge";import{useRef as n,useState as o,useLayoutEffect as i}from"react";import"../../DataDisplays/Avatar/Avatar.js";import"../../Base/Layouts/Box/Box.js";import"../../Base/Layouts/FullBleed/FullBleed.js";import{SystemIcon as s}from"../../DataDisplays/SystemIcon/SystemIcon.js";import"../../DataDisplays/SystemIcon/SystemIcon.constants.js";import{Divider as l}from"../../DataDisplays/Divider/Divider.js";import"../../DataDisplays/Accordion/Accordion.js";import{IndexBar as a,Icon as c,TextSection as u,CountSection as m}from"./AutoCompleteList.parts.js";function p(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){p(e,t,r[t])}))}return e}function y(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t}(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})),e}function f(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}
|
|
2
2
|
/**
|
|
3
3
|
* 자동완성 목록의 Root 컴포넌트입니다.
|
|
4
4
|
* 자동완성 항목들을 감싸는 컨테이너 역할을 합니다.
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
* />
|
|
22
22
|
* </AutoCompleteList.Root>
|
|
23
23
|
* ```
|
|
24
|
-
*/(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}const b={Root:s=>{var{children:l,className:
|
|
25
|
-
/*#__PURE__*/e("ul",{ref:b,"data-testid":"design-system-autoCompleteList",className:r("flex w-full flex-col bg-w-white py-2 pr-2","overflow-y-auto
|
|
26
|
-
return t("li",y(d({className:r("visible ml-2 flex cursor-pointer select-none items-center gap-2 rounded-xl bg-w-white px-4 py-3 hover:bg-primary-10",b&&"bg-primary-10",O)},j),{"data-testid":"design-system-list-item",children:[l&&/*#__PURE__*/e(s,{name:l,className:"text-w-gray-600",testId:"design-system-list-item-leading-icon"}),
|
|
24
|
+
*/(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}const b={Root:s=>{var{children:l,className:c,hasIndexBar:u=!1,onIndexClick:m}=s,p=f(s,["children","className","hasIndexBar","onIndexClick"]);const b=n(null),[g,O]=o(!1);return i((()=>{const e=b.current;if(!e)return;const{scrollHeight:t,clientHeight:r}=e;O(t>r)}),[l]),/*#__PURE__*/t("div",y(d({className:r("flex max-h-[436px] w-full rounded-xl shadow-graymedium",c)},p),{children:[u&&/*#__PURE__*/e(a,{onIndexClick:m}),
|
|
25
|
+
/*#__PURE__*/e("ul",{ref:b,"data-testid":"design-system-autoCompleteList",className:r("flex w-full flex-col bg-w-white py-2 pr-2","scrollbar-list overflow-y-auto",u?"rounded-r-xl":"rounded-xl",g&&"pr-0"),children:l})]}))},Item:n=>{var{text:o,count:i,leadingIcon:l,iconUrl:a,isInputItem:p=!1,isFocused:b=!1,inputValue:g,className:O}=n,j=f(n,["text","count","leadingIcon","iconUrl","isInputItem","isFocused","inputValue","className"]);/*#__PURE__*/
|
|
26
|
+
return t("li",y(d({className:r("visible ml-2 flex cursor-pointer select-none items-center gap-2 rounded-xl bg-w-white px-4 py-3 hover:bg-primary-10",b&&"bg-primary-10",O)},j),{"data-testid":"design-system-list-item",children:[l&&/*#__PURE__*/e(s,{name:l,className:"text-w-gray-600",testId:"design-system-list-item-leading-icon"}),a&&/*#__PURE__*/e(c,{iconUrl:a}),
|
|
27
27
|
/*#__PURE__*/e(u,{text:o,isInputItem:p,inputValue:g}),
|
|
28
28
|
/*#__PURE__*/e(m,{count:i})]}))},Divider:()=>/*#__PURE__*/e(l,{className:"my-2"})};
|
|
29
29
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import{jsx as e,Fragment as t,jsxs as a}from"react/jsx-runtime";import{Typography as r}from"../../Base/Typography/Typography.js";import"../../Base/Layouts/Box/Box.js";import"tailwind-merge";import"../../Base/Layouts/FullBleed/FullBleed.js";
|
|
2
2
|
// return A ~ Z
|
|
3
|
-
const i=Array.from({length:26},((e,t)=>String.fromCharCode(65+t))),l=({onIndexClick:t})=>/*#__PURE__*/e("ul",{className:"flex flex-col gap-0.5 rounded-l-xl bg-w-gray-10 p-[3px] text-center",children:i.map((a=>/*#__PURE__*/e("li",{className:"size-3.5 cursor-pointer",onClick:()=>null==t?void 0:t(a),children:/*#__PURE__*/e(r,{variant:"
|
|
3
|
+
const i=Array.from({length:26},((e,t)=>String.fromCharCode(65+t))),l=({onIndexClick:t})=>/*#__PURE__*/e("ul",{className:"flex flex-col gap-0.5 rounded-l-xl bg-w-gray-10 p-[3px] text-center",children:i.map((a=>/*#__PURE__*/e("li",{className:"size-3.5 cursor-pointer",onClick:()=>null==t?void 0:t(a),children:/*#__PURE__*/e(r,{variant:"caption11",className:"text-gray-400",children:a})},a)))}),n=({iconUrl:t})=>/*#__PURE__*/e("img",{src:t,alt:"icon",width:24,height:24,className:"rounded-full border"}),s=({text:i,isInputItem:l,inputValue:n})=>{const s=i.slice(0,null==n?void 0:n.length),o=i.slice(null==n?void 0:n.length);/*#__PURE__*/
|
|
4
4
|
return e(t,{children:l?/*#__PURE__*/a(t,{children:[
|
|
5
|
-
/*#__PURE__*/a(r,{variant:"
|
|
6
|
-
/*#__PURE__*/e(r,{variant:"
|
|
7
|
-
/*#__PURE__*/e(r,{variant:"
|
|
5
|
+
/*#__PURE__*/a(r,{variant:"body16",className:"font-medium text-primary-500","data-testid":"design-system-list-item-text",children:["‘",i,"’"]}),
|
|
6
|
+
/*#__PURE__*/e(r,{variant:"body16",className:"text-w-gray-600",children:"입력"})]}):/*#__PURE__*/e(r,{variant:"body16",className:"text-w-gray-600","data-testid":"design-system-list-item-text",children:n?/*#__PURE__*/a(t,{children:[
|
|
7
|
+
/*#__PURE__*/e(r,{variant:"body16",className:"text-primary",children:s}),o]}):i})})},o=({count:t})=>/*#__PURE__*/e(r,{variant:"body16",className:"text-w-gray-400",children:t});export{o as CountSection,i as INDEXES,n as Icon,l as IndexBar,s as TextSection};
|
|
@@ -9,16 +9,11 @@ import { ButtonProps } from './Button.types';
|
|
|
9
9
|
* @param {React.ReactNode} props.children - 버튼 내부 콘텐츠
|
|
10
10
|
* @param {string} [props.className] - 추가 CSS 클래스
|
|
11
11
|
* @param {function} [props.onClick] - 클릭 이벤트 핸들러
|
|
12
|
-
* @param {'
|
|
13
|
-
* @param {'outlined' | 'solid' | 'outline_filled'} [props.variant='outlined'] - 버튼 스타일 변형
|
|
14
|
-
* @param {'primary' | 'gray'} [props.color='primary'] - 버튼 색상, outlined 일 때에만 적용 가능
|
|
12
|
+
* @param {'36' | '42' | '50' | '60'} [props.size='50'] - 버튼 크기
|
|
13
|
+
* @param {'outlined' | 'solid' | 'outline_filled' | 'outline_gray'} [props.variant='outlined'] - 버튼 스타일 변형
|
|
15
14
|
* @param {boolean} [props.rounded=false] - 둥근 모서리 적용 여부
|
|
16
|
-
* @param {React.ReactNode} [props.leadingIcon] - 버튼 앞쪽 아이콘
|
|
17
|
-
* @param {boolean} [props.isLeadingIconSolid=false] - 앞쪽 아이콘 solid 스타일 적용 여부
|
|
18
|
-
* @param {React.ReactNode} [props.trailingIcon] - 버튼 뒤쪽 아이콘
|
|
19
|
-
* @param {boolean} [props.isTrailingIconSolid=false] - 뒤쪽 아이콘 solid 스타일 적용 여부
|
|
20
|
-
* @param {string | number} [props.badgeNumber=''] - 버튼에 표시될 뱃지 숫자
|
|
21
15
|
* @param {boolean} [props.needThrottle=false] - 쓰로틀링 적용 여부
|
|
16
|
+
* @param {boolean} [props.isLoading=false] - 로딩 상태 적용 여부
|
|
22
17
|
*
|
|
23
18
|
* @example
|
|
24
19
|
* // 기본 버튼
|
|
@@ -29,10 +24,10 @@ import { ButtonProps } from './Button.types';
|
|
|
29
24
|
* // 아이콘이 있는 비활성화된 버튼
|
|
30
25
|
* <Button
|
|
31
26
|
* disabled
|
|
32
|
-
* variant="
|
|
33
|
-
* leadingIcon={<Icon name="search" />}
|
|
27
|
+
* variant="solid"
|
|
34
28
|
* size="lg"
|
|
35
29
|
* >
|
|
30
|
+
* <SystemIcon name="large_search" />
|
|
36
31
|
* 검색
|
|
37
32
|
* </Button>
|
|
38
33
|
*
|
|
@@ -40,12 +35,11 @@ import { ButtonProps } from './Button.types';
|
|
|
40
35
|
* <Button
|
|
41
36
|
* rounded
|
|
42
37
|
* needThrottle
|
|
43
|
-
* variant="
|
|
44
|
-
* badgeNumber="5"
|
|
38
|
+
* variant="outlined"
|
|
45
39
|
* onClick={handleClick}
|
|
46
40
|
* >
|
|
47
41
|
* 알림
|
|
48
42
|
* </Button>
|
|
49
43
|
*/
|
|
50
|
-
declare const Button: (
|
|
44
|
+
declare const Button: import("react").ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
51
45
|
export { Button };
|
|
@@ -1,51 +1,2 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
2
|
-
|
|
3
|
-
* 다양한 스타일과 기능을 제공하는 버튼 컴포넌트입니다.
|
|
4
|
-
*
|
|
5
|
-
* @param {Object} props
|
|
6
|
-
* @param {'button' | 'submit' | 'reset'} [props.type='button'] - 버튼의 타입
|
|
7
|
-
* @param {React.RefObject<HTMLButtonElement>} [props.ref] - 버튼 요소에 대한 ref
|
|
8
|
-
* @param {boolean} [props.disabled=false] - 버튼 비활성화 여부
|
|
9
|
-
* @param {React.ReactNode} props.children - 버튼 내부 콘텐츠
|
|
10
|
-
* @param {string} [props.className] - 추가 CSS 클래스
|
|
11
|
-
* @param {function} [props.onClick] - 클릭 이벤트 핸들러
|
|
12
|
-
* @param {'sm' | 'md' | 'lg'} [props.size='md'] - 버튼 크기
|
|
13
|
-
* @param {'outlined' | 'solid' | 'outline_filled'} [props.variant='outlined'] - 버튼 스타일 변형
|
|
14
|
-
* @param {'primary' | 'gray'} [props.color='primary'] - 버튼 색상, outlined 일 때에만 적용 가능
|
|
15
|
-
* @param {boolean} [props.rounded=false] - 둥근 모서리 적용 여부
|
|
16
|
-
* @param {React.ReactNode} [props.leadingIcon] - 버튼 앞쪽 아이콘
|
|
17
|
-
* @param {boolean} [props.isLeadingIconSolid=false] - 앞쪽 아이콘 solid 스타일 적용 여부
|
|
18
|
-
* @param {React.ReactNode} [props.trailingIcon] - 버튼 뒤쪽 아이콘
|
|
19
|
-
* @param {boolean} [props.isTrailingIconSolid=false] - 뒤쪽 아이콘 solid 스타일 적용 여부
|
|
20
|
-
* @param {string | number} [props.badgeNumber=''] - 버튼에 표시될 뱃지 숫자
|
|
21
|
-
* @param {boolean} [props.needThrottle=false] - 쓰로틀링 적용 여부
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* // 기본 버튼
|
|
25
|
-
* <Button onClick={() => console.log('클릭됨')}>
|
|
26
|
-
* 버튼
|
|
27
|
-
* </Button>
|
|
28
|
-
*
|
|
29
|
-
* // 아이콘이 있는 비활성화된 버튼
|
|
30
|
-
* <Button
|
|
31
|
-
* disabled
|
|
32
|
-
* variant="contained"
|
|
33
|
-
* leadingIcon={<Icon name="search" />}
|
|
34
|
-
* size="lg"
|
|
35
|
-
* >
|
|
36
|
-
* 검색
|
|
37
|
-
* </Button>
|
|
38
|
-
*
|
|
39
|
-
* // 쓰로틀링이 적용된 둥근 버튼
|
|
40
|
-
* <Button
|
|
41
|
-
* rounded
|
|
42
|
-
* needThrottle
|
|
43
|
-
* variant="text"
|
|
44
|
-
* badgeNumber="5"
|
|
45
|
-
* onClick={handleClick}
|
|
46
|
-
* >
|
|
47
|
-
* 알림
|
|
48
|
-
* </Button>
|
|
49
|
-
*/(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)t=i[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}const l=l=>{var{type:a="button",ref:u,disabled:s=!1,children:d,className:b,onClick:p,size:f="md",variant:O="outlined",color:g="primary",rounded:y=!1,leadingIcon:m,isLeadingIconSolid:j=!1,trailingIcon:v,isTrailingIconSolid:I=!1,badgeNumber:P="",needThrottle:S=!1}=l,h=c(l,["type","ref","disabled","children","className","onClick","size","variant","color","rounded","leadingIcon","isLeadingIconSolid","trailingIcon","isTrailingIconSolid","badgeNumber","needThrottle"]);
|
|
50
|
-
// eslint-disable-next-line no-undef
|
|
51
|
-
const w=r(void 0);return t((()=>()=>{w&&clearTimeout(w.current)}),[w]),/*#__PURE__*/e(n,i(function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),n.forEach((function(r){o(e,r,t[r])}))}return e}({ref:u,size:f,type:a,disabled:s,rounded:y,color:g,variant:O,className:b,onClick:S?e=>{e.preventDefault(),w.current||(null==p||p(e),w.current=setTimeout((()=>{w.current=void 0}),300))}:p,leadingIcon:m,isLeadingIconSolid:j,trailingIcon:v,isTrailingIconSolid:I,badgeNumber:P},h),{children:d}))};export{l as Button};
|
|
1
|
+
"use client";import{jsxs as e,jsx as r}from"react/jsx-runtime";import{forwardRef as t,useRef as o,useEffect as i}from"react";import{twMerge as n}from"tailwind-merge";import{LoadingIndicator as a}from"../../Feedbacks/LoadingIndicator/LoadingIndicator.js";function d(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function l(e,r){return r=null!=r?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):function(e){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r.push.apply(r,t)}return r}(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})),e}function b(e,r){if(null==e)return{};var t,o,i=function(e,r){if(null==e)return{};var t,o,i={},n=Object.keys(e);for(o=0;o<n.length;o++)t=n[o],r.indexOf(t)>=0||(i[t]=e[t]);return i}(e,r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o<n.length;o++)t=n[o],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}const p={36:"h-[36px] typo-body14 px-[11px] gap-1",42:"h-[42px] typo-body14 px-[11px] gap-1",50:"h-[50px] typo-body16 px-[15px] gap-1.5",60:"h-[60px] typo-subTitle20 px-[23px] gap-2"},s={solid:"bg-primary-500 border-primary-500 hover:border-primary-700 hover:bg-primary-700 text-w-white disabled:bg-primary-100 disabled:border-primary-100 disabled:hover:bg-primary-100 disabled:hover:border-primary-100",outline_filled:"bg-primary-10 border-primary-200 hover:border-primary-500 text-primary-500 disabled:border-primary-200 disabled:hover:border-primary-200 disabled:text-primary-100",outlined:"bg-w-white border-w-gray-200 hover:border-primary-500 text-primary-500 disabled:hover:border-w-gray-200 disabled:text-primary-100",outline_gray:"bg-w-white border-w-gray-200 hover:border-w-gray-400 text-w-gray-600 disabled:hover:border-w-gray-200 disabled:text-w-gray-300"},c=/*#__PURE__*/t(((t,c)=>{var{type:y="button",disabled:u=!1,children:m,className:f,onClick:g,size:h="50",variant:v="outlined",rounded:x=!1,needThrottle:O=!1,isLoading:w=!1}=t,j=b(t,["type","disabled","children","className","onClick","size","variant","rounded","needThrottle","isLoading"]);const P=o(void 0),k=e=>{e.preventDefault(),P.current||(null==g||g(e),P.current=setTimeout((()=>{P.current=void 0}),300))};return i((()=>()=>{P&&clearTimeout(P.current)}),[P]),/*#__PURE__*/e("button",l(function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},o=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),o.forEach((function(r){d(e,r,t[r])}))}return e}({ref:c,type:y,className:n("relative box-border flex w-fit items-center justify-center border","cursor-pointer disabled:cursor-not-allowed","outlined"===v&&x?"rounded-full":"rounded-xl",s[v],w&&"pointer-events-none",f),onClick:(()=>{if(!w)return O?k:g})(),disabled:u,"aria-busy":w,"aria-live":w?"polite":void 0},j),{children:[w&&/*#__PURE__*/r("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2",children:/*#__PURE__*/r(a,{size:"36"===h||"42"===h?"sm":"md",className:"text-current"})}),
|
|
2
|
+
/*#__PURE__*/r("div",{className:n("flex items-center justify-center text-current",p[h],w&&"invisible"),"aria-hidden":w,"data-testid":"design-system-button--content",children:m})]}))}));c.displayName="Button";export{c as Button};
|
|
@@ -1,18 +1,11 @@
|
|
|
1
1
|
import { ComponentPropsWithRef } from 'react';
|
|
2
|
-
|
|
3
|
-
type
|
|
4
|
-
type ButtonVariantType = 'outlined' | 'solid' | 'outline_filled';
|
|
5
|
-
type ButtonColorType = 'primary' | 'gray';
|
|
2
|
+
export type ButtonSizeType = '36' | '42' | '50' | '60';
|
|
3
|
+
type ButtonVariantType = 'outlined' | 'solid' | 'outline_filled' | 'outline_gray';
|
|
6
4
|
export interface ButtonProps extends ComponentPropsWithRef<'button'> {
|
|
7
5
|
size?: ButtonSizeType;
|
|
8
6
|
variant?: ButtonVariantType;
|
|
9
|
-
color?: ButtonColorType;
|
|
10
7
|
rounded?: boolean;
|
|
11
|
-
leadingIcon?: SystemIconName;
|
|
12
|
-
isLeadingIconSolid?: boolean;
|
|
13
|
-
trailingIcon?: SystemIconName;
|
|
14
|
-
isTrailingIconSolid?: boolean;
|
|
15
|
-
badgeNumber?: number | string;
|
|
16
8
|
needThrottle?: boolean;
|
|
9
|
+
isLoading?: boolean;
|
|
17
10
|
}
|
|
18
11
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as a,useEffect as r}from"react";import{twMerge as s}from"tailwind-merge";import
|
|
1
|
+
"use client";import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as a,useEffect as r}from"react";import{twMerge as s}from"tailwind-merge";import"../../DataDisplays/Avatar/Avatar.js";import{Typography as o}from"../../Base/Typography/Typography.js";import{Box as n}from"../../Base/Layouts/Box/Box.js";import"../../Base/Layouts/FullBleed/FullBleed.js";import{SystemIcon as i}from"../../DataDisplays/SystemIcon/SystemIcon.js";import"../../DataDisplays/SystemIcon/SystemIcon.constants.js";import"../../DataDisplays/Accordion/Accordion.js";import{TextFieldContainer as l}from"../TextFieldContainer/TextFieldContainer.js";import{SelectHeader as d,WeekHeader as c,DateBox as m}from"./Calendar.parts.js";import{generateDate as p,today as y,getKoreanTimeString as g,getMonthDate as h,isSameDate as x}from"./Calendar.utils.js";
|
|
2
2
|
/**
|
|
3
3
|
* 날짜를 선택할 수 있는 캘린더 컴포넌트입니다.
|
|
4
4
|
*
|
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
* selected="2024-03-21"
|
|
35
35
|
* />
|
|
36
36
|
* ```
|
|
37
|
-
*/const u=({defaultDate:u,selected:f,onChange:w,disabled:
|
|
37
|
+
*/const u=({defaultDate:u,selected:f,onChange:w,disabled:j,placeholder:D,isError:b})=>{const[C,$]=a(!1),B=()=>{j||$((e=>!e))},N=u?p(u):y,[v,A]=a(f?p(f):N),F=f?p(f):N,{year:I,month:S,date:T}=g(F),{dateList:L}=h(v.year,v.month),k=[...Array.from({length:L[0].day},(()=>null)),...L],z=e=>{if(f&&x(e,F))return;const t=`${e.year}-${e.month}-${e.date}`;null==w||w(t),$(!1)};return r((()=>{!C&&f&&A(p(f));
|
|
38
38
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
39
|
-
}),[
|
|
40
|
-
/*#__PURE__*/t(
|
|
41
|
-
/*#__PURE__*/t(
|
|
42
|
-
/*#__PURE__*/t(o,{variant:"
|
|
43
|
-
/*#__PURE__*/t(d,{visibleDate:
|
|
39
|
+
}),[C]),/*#__PURE__*/e(n,{className:"relative h-fit w-fit select-none","data-testid":"design-system-calendar--container",children:[
|
|
40
|
+
/*#__PURE__*/t(n,{className:"cursor-pointer",children:/*#__PURE__*/e(l,{isFocused:C,isError:b,isDisabled:j,testId:"design-system-calendar--trigger",onClick:B,children:[
|
|
41
|
+
/*#__PURE__*/t(i,{name:"medium_calendar",className:j||!f?"text-w-gray-300":"text-w-gray-400"}),
|
|
42
|
+
/*#__PURE__*/t(o,{variant:"body16",className:s("min-w-[178px] text-w-gray-600",!f&&"text-w-gray-300",j&&"text-w-gray-300"),"data-testid":"design-system-calendar--selected-date",children:f?`${I} ${S} ${T}`:D})]})}),C&&/*#__PURE__*/t("div",{className:"fixed left-0 top-0 z-10 h-screen w-screen bg-transparent",onClick:B}),C&&/*#__PURE__*/e(n,{"data-testid":"design-system-calendar--content",className:"absolute top-[54px] z-30 flex w-[350px] flex-col gap-4 rounded-xl border border-w-gray-200 bg-w-white px-[15px] py-[23px] shadow-graymedium",children:[
|
|
43
|
+
/*#__PURE__*/t(d,{visibleDate:v,onChange:e=>{A(e)}}),
|
|
44
44
|
/*#__PURE__*/t(c,{}),
|
|
45
|
-
/*#__PURE__*/t(
|
|
45
|
+
/*#__PURE__*/t(n,{className:"grid w-full grid-cols-7 place-content-center place-items-center gap-1",children:k.map(((e,a)=>{const r=!(!e||!f)&&x(e,F);return e?/*#__PURE__*/t(m,{date:e,selected:r,onChange:z},`${e.year}-${e.month}-${e.date}`):/*#__PURE__*/t(m,{disabled:!0},a)}))})]})]})};export{u as Calendar};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{twMerge as a}from"tailwind-merge";import"
|
|
2
|
-
return t(
|
|
3
|
-
return e(
|
|
4
|
-
/*#__PURE__*/t(
|
|
5
|
-
/*#__PURE__*/e(
|
|
6
|
-
/*#__PURE__*/t(
|
|
7
|
-
return t(
|
|
1
|
+
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{twMerge as a}from"tailwind-merge";import"../../DataDisplays/Avatar/Avatar.js";import{Typography as r}from"../../Base/Typography/Typography.js";import{Box as l}from"../../Base/Layouts/Box/Box.js";import"../../Base/Layouts/FullBleed/FullBleed.js";import"react";import{SystemIcon as n}from"../../DataDisplays/SystemIcon/SystemIcon.js";import"../../DataDisplays/SystemIcon/SystemIcon.constants.js";import"../../DataDisplays/Accordion/Accordion.js";import{getKoreanTimeString as s}from"./Calendar.utils.js";import{dayMap as o}from"./Calendar.constants.js";const i=()=>{const e=Array.from(o.values());/*#__PURE__*/
|
|
2
|
+
return t(l,{className:"grid w-full grid-cols-7 place-items-center gap-1",children:e.map((e=>/*#__PURE__*/t(l,{className:"flex h-5 items-center justify-center",children:/*#__PURE__*/t(r,{variant:"body13",className:"leading-normal text-w-gray-500",children:e})},e)))})},m=({visibleDate:a,onChange:o})=>{const i=1===(null==a?void 0:a.month),m=12===(null==a?void 0:a.month),{year:c,month:d}=a&&s(a);/*#__PURE__*/
|
|
3
|
+
return e(l,{className:"flex h-[50px] w-full gap-4",children:[
|
|
4
|
+
/*#__PURE__*/t(l,{"data-testid":"design-system-calendar--to-prev-month",className:"size-6 cursor-pointer text-gray-600",onClick:()=>{i?null==o||o({year:a.year-1,month:12,date:1}):null==o||o({year:a.year,month:a.month-1,date:1})},children:/*#__PURE__*/t(n,{name:"large_arrow_left",className:"text-gray-600"})}),
|
|
5
|
+
/*#__PURE__*/e(r,{variant:"subTitle18",className:"h-fit w-full text-center leading-normal text-gray-900",children:[c," ",d]}),
|
|
6
|
+
/*#__PURE__*/t(l,{"data-testid":"design-system-calendar--to-next-month",className:"size-6 cursor-pointer text-gray-600",onClick:()=>{m?null==o||o({year:a.year+1,month:1,date:1}):null==o||o({year:a.year,month:a.month+1,date:1})},children:/*#__PURE__*/t(n,{name:"large_arrow_right",className:"text-gray-600"})})]})},c=({selected:e,date:n,disabled:s=!1,onChange:o})=>{const i=1===String(null==n?void 0:n.date).length?`0${null==n?void 0:n.date}`:null==n?void 0:n.date;/*#__PURE__*/
|
|
7
|
+
return t(l,{className:a("flex size-[42px] cursor-pointer items-center justify-center rounded-full bg-w-white p-2 text-center",!s&&!e&&"hover:bg-primary-10",e&&"bg-primary",s&&"cursor-default"),onClick:()=>{s||null==o||o(n)},children:/*#__PURE__*/t(r,{variant:"body16",className:a("text-w-gray-900",e&&"text-w-white",s&&"text-w-gray-300"),children:i})})};export{c as DateBox,m as SelectHeader,i as WeekHeader};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithRef } from 'react';
|
|
2
|
-
import { CheckboxStatus } from '../../../types';
|
|
2
|
+
import { CheckboxStatus } from '../../../types/checkbox.types';
|
|
3
3
|
export type CheckboxType = 'box' | 'circle' | 'sub';
|
|
4
4
|
export interface CheckboxButtonProps extends CheckboxStatus {
|
|
5
5
|
type?: 'box' | 'circle' | 'sub';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
return e("label",{"data-testid":k,role:"checkbox-card",className:a("group",p),children:/*#__PURE__*/t(s,{"data-testid":"design-system-checkboxCard--container",checked:l,isError:m,isWide:x,disabled:n,className:y,children:[
|
|
3
3
|
/*#__PURE__*/e(i,{isWide:x,checked:l,onChange:h,isError:m,disabled:n,name:C,value:f}),B&&/*#__PURE__*/e(d,{isError:m,checked:l,iconName:B,disabled:n}),
|
|
4
4
|
/*#__PURE__*/t(o,{isWide:x,"data-testid":"design-system-checkboxCard--titleBox",children:[
|
|
5
|
-
/*#__PURE__*/e(r,{"data-testid":"design-system-checkboxCard--title",variant:"
|
|
5
|
+
/*#__PURE__*/e(r,{"data-testid":"design-system-checkboxCard--title",variant:"body16",className:a("font-medium",x?"text-left":"text-center",n?"text-w-gray-300":"text-w-gray-900"),children:b}),u&&/*#__PURE__*/e(r,{variant:"body14",className:a("font-normal",x?"text-left":"text-center",n?"text-w-gray-300":"text-w-gray-600"),"data-testid":"design-system-checkboxCard--description",children:u})]})]})})};
|
|
6
6
|
/**
|
|
7
7
|
* 체크박스와 함께 아이콘, 제목, 설명을 포함하는 카드 형태의 선택 컴포넌트입니다.
|
|
8
8
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{twMerge as r,twJoin as t}from"tailwind-merge";import"
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{twMerge as r,twJoin as t}from"tailwind-merge";import"../../DataDisplays/Avatar/Avatar.js";import{Box as o}from"../../Base/Layouts/Box/Box.js";import"../../Base/Layouts/FullBleed/FullBleed.js";import"react";import"../../DataDisplays/SystemIcon/SystemIcon.constants.js";import{ProductIcon as i}from"../../DataDisplays/ProductIcon/ProductIcon.js";import"../../DataDisplays/Accordion/Accordion.js";import{Checkbox as n}from"../Checkbox/Checkbox.js";function c(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function s(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},o=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),o.forEach((function(r){c(e,r,t[r])}))}return e}function a(e,r){return r=null!=r?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):function(e){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r.push.apply(r,t)}return r}(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})),e}function l(e,r){if(null==e)return{};var t,o,i=function(e,r){if(null==e)return{};var t,o,i={},n=Object.keys(e);for(o=0;o<n.length;o++)t=n[o],r.indexOf(t)>=0||(i[t]=e[t]);return i}(e,r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o<n.length;o++)t=n[o],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}const p=t=>{var{children:o,isWide:i,checked:n,isError:c,disabled:p,className:d}=t,b=l(t,["children","isWide","checked","isError","disabled","className"]);/*#__PURE__*/
|
|
2
2
|
return e("div",a(s({className:r("relative flex h-auto cursor-pointer items-center gap-2 rounded-xl border",i?"min-h-[94px] w-[298px] flex-row gap-3 px-5 py-4":"min-h-fit w-[224px] flex-col justify-center px-4 pb-6 pt-4",!p&&!c&&"group-focus-within:border-primary-500",p?r("cursor-not-allowed",n&&!c?"border-primary-100":"border-w-gray-200"):c?"border-w-red-500":n?"border-primary-500":"border-w-gray-200 group-hover:border-primary",p?n&&!c?"bg-primary-10":"bg-w-gray-10":n?c?"bg-w-red-10":"bg-primary-10":"bg-w-white",d)},b),{children:o}))},d=({isWide:t,children:o})=>/*#__PURE__*/e("div",{className:r("flex h-auto w-full flex-col justify-between gap-0.5",t?"items-start":"items-center"),children:o}),b=i=>{var{isWide:c,className:a}=i,p=l(i,["isWide","className"]);const d=!c;/*#__PURE__*/
|
|
3
|
-
return e(o,{className:t(d&&"absolute left-[17px] top-[17px]"),children:/*#__PURE__*/e(n,s({className:r(d&&"group-hover:border-primary-500",a)},p))})},
|
|
4
|
-
return e("div",{className:r("flex size-[60px]
|
|
3
|
+
return e(o,{className:t(d&&"absolute left-[17px] top-[17px]"),children:/*#__PURE__*/e(n,s({className:r(d&&"group-hover:border-primary-500",a)},p))})},m=({iconName:t,disabled:o,checked:n,isError:c})=>{const s=c||!n;/*#__PURE__*/
|
|
4
|
+
return e("div",{className:r("flex size-[60px] shrink-0 items-center justify-center",o&&"opacity-30"),"data-testid":"design-system-checkboxCard--icon",children:/*#__PURE__*/e(i,{name:t,disabled:s})})};export{p as CheckboxCardContainer,m as CheckboxCardIcon,b as StyledCheckbox,d as TitleContainer};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChangeEvent, PropsWithChildren, ReactNode } from 'react';
|
|
2
|
-
import { CheckboxStatus } from '../../../types';
|
|
2
|
+
import { CheckboxStatus } from '../../../types/checkbox.types';
|
|
3
3
|
import { CheckboxProps } from '../../Inputs/Checkbox/Checkbox.types';
|
|
4
4
|
import { ProductIconName } from '../../DataDisplays/ProductIcon/ProductIcon.types';
|
|
5
5
|
interface CheckboxCardBaseProps {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithRef } from 'react';
|
|
2
|
-
import { CheckboxStatus } from '../../../types';
|
|
2
|
+
import { CheckboxStatus } from '../../../types/checkbox.types';
|
|
3
3
|
import { CheckboxType } from '../../Inputs/Checkbox/Checkbox.types';
|
|
4
4
|
export interface CheckboxListItemProps extends CheckboxStatus, ComponentPropsWithRef<'input'> {
|
|
5
5
|
label?: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";import{jsxs as e,jsx as r}from"react/jsx-runtime";import{twMerge as t,twJoin as i}from"tailwind-merge";import{Typography as s}from"../../Base/Typography/Typography.js";import{Box as n}from"../../Base/Layouts/Box/Box.js";import"../../Base/Layouts/FullBleed/FullBleed.js";import{Checkbox as c}from"../Checkbox/Checkbox.js";function o(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function a(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},i=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),i.forEach((function(r){o(e,r,t[r])}))}return e}function l(e,r){return r=null!=r?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):function(e){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r.push.apply(r,t)}return r}(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})),e}function d(e,r){if(null==e)return{};var t,i,s=function(e,r){if(null==e)return{};var t,i,s={},n=Object.keys(e);for(i=0;i<n.length;i++)t=n[i],r.indexOf(t)>=0||(s[t]=e[t]);return s}(e,r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(i=0;i<n.length;i++)t=n[i],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(s[t]=e[t])}return s}const b=e=>{var{children:i,disabled:s,hasDescription:n,className:c}=e,o=d(e,["children","disabled","hasDescription","className"]);/*#__PURE__*/
|
|
2
|
-
return r("label",l(a({className:t("grid h-min grid-cols-checkbox-list-item-container grid-rows-checkbox-list-item-container gap-x-3
|
|
2
|
+
return r("label",l(a({className:t("grid-areas-checkbox-list-item-container grid h-min grid-cols-checkbox-list-item-container grid-rows-checkbox-list-item-container gap-x-3",n?"gap-y-0.5":"gap-y-0",s?"cursor-not-allowed":"cursor-pointer",c)},o),{children:i}))},m=o=>{var{label:l,description:m,type:p="box",checked:y,disabled:h=!1,isError:g=!1,errorMessage:u,className:f,CheckboxClassName:O,onChange:x,children:j}=o,w=d(o,["label","description","type","checked","disabled","isError","errorMessage","className","CheckboxClassName","onChange","children"]);/*#__PURE__*/
|
|
3
3
|
return e(b,{"data-testid":"design-system-checkboxList--item",disabled:h,hasDescription:!!m,className:t("group",f),children:[
|
|
4
|
-
/*#__PURE__*/r(n,{className:"cursor-pointer pt-1
|
|
5
|
-
/*#__PURE__*/e(n,{className:"flex w-full items-center
|
|
4
|
+
/*#__PURE__*/r(n,{className:"grid-in-checkbox cursor-pointer pt-1",children:/*#__PURE__*/r(c,a({checked:y,isError:g,disabled:h,onChange:x,className:O,type:p},w))}),
|
|
5
|
+
/*#__PURE__*/e(n,{className:"grid-in-label flex w-full items-center","data-testid":"design-system-checkboxList--item-label-root",children:[l&&/*#__PURE__*/r(s,{variant:"body16",className:i("w-full whitespace-normal break-words",h?"text-w-gray-300":"text-w-gray-900"),"data-testid":"design-system-checkboxList--item-label",children:l}),j]}),g&&u&&/*#__PURE__*/r(n,{className:"grid-in-error flex items-center",children:/*#__PURE__*/r(s,{variant:"body14",className:"text-w-red-500","data-testid":"design-system-checkboxList--item-error",children:u})}),m&&/*#__PURE__*/r(n,{className:"grid-in-description flex items-center",children:/*#__PURE__*/r(s,{variant:"body14",className:h?"text-w-gray-300":"text-w-gray-600","data-testid":"design-system-checkboxList--item-description",children:m})})]})};
|
|
6
6
|
/**
|
|
7
7
|
* 체크박스와 라벨, 설명을 포함하는 리스트 아이템 컴포넌트입니다.
|
|
8
8
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";import{jsxs as e,jsx as t}from"react/jsx-runtime";import{twJoin as r}from"tailwind-merge";import{forwardRef as n,useState as o,useEffect as c}from"react";import
|
|
1
|
+
"use client";import{jsxs as e,jsx as t}from"react/jsx-runtime";import{twJoin as r}from"tailwind-merge";import{forwardRef as n,useState as o,useEffect as c}from"react";import"../../DataDisplays/Avatar/Avatar.js";import{Typography as i}from"../../Base/Typography/Typography.js";import{Box as a}from"../../Base/Layouts/Box/Box.js";import"../../Base/Layouts/FullBleed/FullBleed.js";import{SystemIcon as s}from"../../DataDisplays/SystemIcon/SystemIcon.js";import"../../DataDisplays/SystemIcon/SystemIcon.constants.js";import"../../DataDisplays/Accordion/Accordion.js";import{generateLeadingIconColor as l,generateLabelStyle as p,generateTrailingIconStyle as m,generateBackgroundColor as y,generateBackgroundPadding as u}from"./ChoiceChip.styles.js";function f(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){f(e,t,r[t])}))}return e}function b(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t}(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})),e}function h(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},c=Object.keys(e);for(n=0;n<c.length;n++)r=c[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}
|
|
2
2
|
/**
|
|
3
3
|
* 선택 가능한 칩 컴포넌트입니다.
|
|
4
4
|
*
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
* checked={true}
|
|
37
37
|
* onChange={(e) => console.log('선택 상태:', e.target.checked)}
|
|
38
38
|
* />
|
|
39
|
-
*/(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n<c.length;n++)r=c[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}const g=/*#__PURE__*/n(((n,f)=>{var{label:g,checked:O=!1,error:j=!1,leadingIcon:w,trailingIcon:
|
|
39
|
+
*/(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n<c.length;n++)r=c[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}const g=/*#__PURE__*/n(((n,f)=>{var{label:g,checked:O=!1,error:j=!1,leadingIcon:w,trailingIcon:v,onChange:P}=n,D=h(n,["label","checked","error","leadingIcon","trailingIcon","onChange"]);const[x,C]=o(O);c((()=>{C(O)}),[O]);/*#__PURE__*/
|
|
40
40
|
return e("label",{children:[
|
|
41
|
-
/*#__PURE__*/t("input",b(d({type:"checkbox",checked:
|
|
42
|
-
/*#__PURE__*/e("div",{"data-testid":"design-system-choiceChip",className:r("flex w-fit cursor-pointer select-none items-center gap-2 rounded-full",y(
|
|
43
|
-
/*#__PURE__*/e(
|
|
44
|
-
/*#__PURE__*/t(
|
|
41
|
+
/*#__PURE__*/t("input",b(d({type:"checkbox",checked:x,className:"absolute h-0 w-0 opacity-0",onChange:e=>{P&&(P(e),C(e.target.checked))}},D),{ref:f})),
|
|
42
|
+
/*#__PURE__*/e("div",{"data-testid":"design-system-choiceChip",className:r("flex w-fit cursor-pointer select-none items-center gap-2 rounded-full",y(x,j),u(!!w)),children:[w&&/*#__PURE__*/t(a,{className:"flex size-8 items-center justify-center rounded-full bg-w-white p-0.5","data-testid":"design-system-choiceChip--leading-icon-container",children:/*#__PURE__*/t(s,{name:w,className:l(x,j)})}),
|
|
43
|
+
/*#__PURE__*/e(a,{className:"flex items-center gap-1.5",children:[
|
|
44
|
+
/*#__PURE__*/t(i,{"data-testid":"design-system-choiceChip-label",variant:"body16",className:p(x,j),children:g}),v&&/*#__PURE__*/t(s,{name:v,className:m(x,j)})]})]})]})}));g.displayName="ChoiceChip";export{g as ChoiceChip};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use client";import{jsxs as e,jsx as t,Fragment as r}from"react/jsx-runtime";import{forwardRef as a}from"react";import{twMerge as l}from"tailwind-merge";import{Typography as
|
|
1
|
+
"use client";import{jsxs as e,jsx as t,Fragment as r}from"react/jsx-runtime";import{forwardRef as a}from"react";import{twMerge as l}from"tailwind-merge";import{Typography as n}from"../../Base/Typography/Typography.js";import{Box as s}from"../../Base/Layouts/Box/Box.js";import"../../Base/Layouts/FullBleed/FullBleed.js";import{Avatar as i}from"../../DataDisplays/Avatar/Avatar.js";import{SystemIcon as o}from"../../DataDisplays/SystemIcon/SystemIcon.js";import"../../DataDisplays/SystemIcon/SystemIcon.constants.js";import{Divider as c}from"../../DataDisplays/Divider/Divider.js";import"../../DataDisplays/Accordion/Accordion.js";import{Button as m}from"../Button/Button.js";import{CheckboxListItem as d}from"../CheckboxListItem/CheckboxListItem.js";function u(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},a=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),a.forEach((function(t){u(e,t,r[t])}))}return e}function p(e,t){if(null==e)return{};var r,a,l=function(e,t){if(null==e)return{};var r,a,l={},n=Object.keys(e);for(a=0;a<n.length;a++)r=n[a],t.indexOf(r)>=0||(l[r]=e[r]);return l}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(a=0;a<n.length;a++)r=n[a],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(l[r]=e[r])}return l}const y=({userId:r,imgUrl:a=""})=>/*#__PURE__*/e(s,{className:"flex items-center gap-2",children:[
|
|
2
2
|
/*#__PURE__*/t(i,{imgUrl:a,size:"sm"}),
|
|
3
|
-
/*#__PURE__*/t(
|
|
4
|
-
return e(
|
|
5
|
-
/*#__PURE__*/e(
|
|
6
|
-
/*#__PURE__*/t(
|
|
7
|
-
/*#__PURE__*/t("textarea",f({"data-testid":"design-system-commentArea",ref:
|
|
3
|
+
/*#__PURE__*/t(n,{variant:"body16",className:"w-full font-medium text-w-gray-600",children:r})]}),b=({guideText:e})=>/*#__PURE__*/t(s,{className:"w-full bg-w-gray-10 text-w-gray-500",children:/*#__PURE__*/t("ul",{className:"typo-body14 flex flex-col gap-0.5",children:"string"==typeof e?/*#__PURE__*/t("li",{className:'before:mr-2 before:inline-flex before:items-center before:justify-center before:content-["•"]',children:e}):/*#__PURE__*/t(r,{children:null==e?void 0:e.map((e=>/*#__PURE__*/t("li",{className:'before:mr-2 before:inline-flex before:items-center before:justify-center before:content-["•"]',children:e},e)))})})}),g=/*#__PURE__*/a(((a,n)=>{var{imgUrl:i,userId:u,isReply:g,guideText:h,buttonName:x,isSelected:w,optionMessage:j,cancelButtonName:N="취소",onClose:v,onSubmit:O,onCheck:k}=a,C=p(a,["imgUrl","userId","isReply","guideText","buttonName","isSelected","optionMessage","cancelButtonName","onClose","onSubmit","onCheck"]);const{value:D,className:S,disabled:A,spellCheck:B=!1,children:I}=C,P=p(C,["value","className","disabled","spellCheck","children"]),T=""===D.trim(),U=!u||T||A,z=u&&j;/*#__PURE__*/
|
|
4
|
+
return e(s,{"data-testid":"design-system-commentArea--full-container",className:l("flex w-full items-start gap-4",S),children:[g&&/*#__PURE__*/t(o,{name:"medium_reply",className:"shrink-0 text-w-gray-400"}),
|
|
5
|
+
/*#__PURE__*/e(s,{"data-testid":"design-system-commentArea--container",className:"w-full rounded-xl border border-w-gray-200 bg-w-white",children:[
|
|
6
|
+
/*#__PURE__*/t(s,{className:"flex w-full flex-col gap-2 px-4 py-3",children:I?/*#__PURE__*/t(s,{className:"h-[98px]",children:I}):/*#__PURE__*/e(r,{children:[u&&/*#__PURE__*/t(y,{imgUrl:i,userId:u}),
|
|
7
|
+
/*#__PURE__*/t("textarea",f({"data-testid":"design-system-commentArea",ref:n,value:D,spellCheck:B,disabled:A||!u,className:"outline-hidden placeholder:typo-body16 tracking-default h-[63px] w-full resize-none border-none bg-transparent text-w-gray-900 placeholder:font-normal placeholder:text-w-gray-300"},P))]})}),h&&/*#__PURE__*/t(s,{"data-testid":"design-system-commentArea--guide-message",className:"w-full bg-w-gray-10 px-4 py-2 text-w-gray-500",children:/*#__PURE__*/t(b,{guideText:h})}),
|
|
8
8
|
/*#__PURE__*/t(c,{}),
|
|
9
|
-
/*#__PURE__*/e(
|
|
10
|
-
/*#__PURE__*/e(
|
|
11
|
-
/*#__PURE__*/t(m,{variant:"solid",size:"
|
|
9
|
+
/*#__PURE__*/e(s,{"data-testid":"design-system-commentArea--buttons",className:l("flex w-full items-center justify-end px-4 py-3",z&&"justify-between"),children:[z&&/*#__PURE__*/t(d,{label:j,checked:w,onChange:k,disabled:A||!u}),
|
|
10
|
+
/*#__PURE__*/e(s,{className:"flex w-fit shrink-0 items-center gap-3",children:[g&&/*#__PURE__*/t(m,{size:"36",onClick:v,variant:"outline_gray",children:N}),
|
|
11
|
+
/*#__PURE__*/t(m,{variant:"solid",size:"36",disabled:U,onClick:O,children:x})]})]})]})]})}));g.displayName="CommentArea";export{g as CommentArea};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { FileUploaderProps } from './FileUploader.types';
|
|
2
|
+
/**
|
|
3
|
+
* 파일 업로드를 위한 컴포넌트입니다.
|
|
4
|
+
*
|
|
5
|
+
* @component
|
|
6
|
+
* @param {Object} props - 컴포넌트 props
|
|
7
|
+
* @param {File[]} [props.files] - 현재 업로드된 파일 목록
|
|
8
|
+
* @param {(files: File[]) => void} [props.onChange] - 파일 변경 시 호출되는 콜백 함수
|
|
9
|
+
* @param {string} [props.accept] - 허용되는 파일 타입 (예: 'image/*', '.pdf,.doc')
|
|
10
|
+
* @param {boolean} [props.multiple=true] - 여러 파일 선택 가능 여부
|
|
11
|
+
* @param {number} [props.maxFileSize] - 최대 파일 크기 (bytes)
|
|
12
|
+
* @param {boolean} [props.disabled=false] - 컴포넌트 비활성화 여부
|
|
13
|
+
* @param {boolean} [props.isError=false] - 에러 상태 여부
|
|
14
|
+
* @param {string} [props.errorMessage] - 에러 메시지
|
|
15
|
+
* @param {string} [props.supportMessage] - 보조 메시지
|
|
16
|
+
* @param {string} [props.text] - 업로드 영역에 표시할 텍스트 (isSmall일 때 사용)
|
|
17
|
+
* @param {boolean} [props.isSmall=false] - 작은 크기 변형 여부
|
|
18
|
+
* @param {() => void} [props.onFileSizeExceeded] - 파일 크기 초과 시 호출되는 콜백 함수
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* // 기본 파일 업로더
|
|
22
|
+
* <FileUploader
|
|
23
|
+
* files={files}
|
|
24
|
+
* onChange={(newFiles) => setFiles(newFiles)}
|
|
25
|
+
* maxFileSize={10 * 1024 * 1024}
|
|
26
|
+
* />
|
|
27
|
+
*
|
|
28
|
+
* // 이미지만 업로드
|
|
29
|
+
* <FileUploader
|
|
30
|
+
* files={files}
|
|
31
|
+
* onChange={(newFiles) => setFiles(newFiles)}
|
|
32
|
+
* accept="image/*"
|
|
33
|
+
* supportMessage="이미지 파일만 업로드 가능합니다"
|
|
34
|
+
* />
|
|
35
|
+
*
|
|
36
|
+
* // 작은 크기 변형
|
|
37
|
+
* <FileUploader
|
|
38
|
+
* files={files}
|
|
39
|
+
* onChange={(newFiles) => setFiles(newFiles)}
|
|
40
|
+
* isSmall={true}
|
|
41
|
+
* text="파일 첨부하기"
|
|
42
|
+
* />
|
|
43
|
+
*/
|
|
44
|
+
declare const FileUploader: ({ files, onChange, accept, multiple, maxFileSize, disabled, isError, errorMessage, supportMessage, text, isSmall, onFileSizeExceeded, }: FileUploaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
export { FileUploader };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type ChangeEvent, type DragEvent, RefObject } from 'react';
|
|
2
|
+
interface UseFileUploaderParams {
|
|
3
|
+
files: File[];
|
|
4
|
+
onChange?: (files: File[]) => void;
|
|
5
|
+
maxFileSize?: number;
|
|
6
|
+
disabled: boolean;
|
|
7
|
+
onFileSizeExceeded?: () => void;
|
|
8
|
+
}
|
|
9
|
+
interface UseFileUploaderReturn {
|
|
10
|
+
inputRef: RefObject<HTMLInputElement | null>;
|
|
11
|
+
isDragOver: boolean;
|
|
12
|
+
handleInputChange: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
13
|
+
handleButtonClick: () => void;
|
|
14
|
+
handleRemoveFile: (index: number) => void;
|
|
15
|
+
handleDragOver: (event: DragEvent<HTMLButtonElement>) => void;
|
|
16
|
+
handleDragLeave: (event: DragEvent<HTMLButtonElement>) => void;
|
|
17
|
+
handleDrop: (event: DragEvent<HTMLButtonElement>) => void;
|
|
18
|
+
}
|
|
19
|
+
export declare const useFileUploader: ({ files, onChange, maxFileSize, disabled, onFileSizeExceeded, }: UseFileUploaderParams) => UseFileUploaderReturn;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useRef as e,useState as l}from"react";const n=({files:n,onChange:r,maxFileSize:t,disabled:a,onFileSizeExceeded:i})=>{const u=e(null),[o,f]=l(!1),s=e=>{if(!e||0===e.length)return;let l=Array.from(e),a=!1;if(t&&(a=l.some((e=>e.size>t)),l=l.filter((e=>e.size<=t))),a&&i&&i(),l.length>0){const e=[...n,...l];null==r||r(e)}u.current&&(u.current.value="")};return{inputRef:u,isDragOver:o,handleInputChange:e=>{s(e.target.files)},handleButtonClick:()=>{var e;a||(null===(e=u.current)||void 0===e||e.click())},handleRemoveFile:e=>{const l=n.filter(((l,n)=>n!==e));null==r||r(l)},handleDragOver:e=>{e.preventDefault(),a||f(!0)},handleDragLeave:e=>{e.preventDefault(),f(!1)},handleDrop:e=>{e.preventDefault(),f(!1),a||s(e.dataTransfer.files)}}};export{n as useFileUploader};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import{jsxs as e,jsx as r}from"react/jsx-runtime";import{twMerge as l}from"tailwind-merge";import{useMemo as a}from"react";import{Box as o}from"../../Base/Layouts/Box/Box.js";import"../../Base/Layouts/FullBleed/FullBleed.js";import{SupportTextContainer as i}from"../SupportTextContainer/SupportTextContainer.js";import{FileItem as t,FileUploadArea as s}from"./FileUploader.parts.js";import{useFileUploader as d}from"./FileUploader.hooks.js";import{generateAcceptDescription as n}from"./FileUploader.utils.js";
|
|
2
|
+
/**
|
|
3
|
+
* 파일 업로드를 위한 컴포넌트입니다.
|
|
4
|
+
*
|
|
5
|
+
* @component
|
|
6
|
+
* @param {Object} props - 컴포넌트 props
|
|
7
|
+
* @param {File[]} [props.files] - 현재 업로드된 파일 목록
|
|
8
|
+
* @param {(files: File[]) => void} [props.onChange] - 파일 변경 시 호출되는 콜백 함수
|
|
9
|
+
* @param {string} [props.accept] - 허용되는 파일 타입 (예: 'image/*', '.pdf,.doc')
|
|
10
|
+
* @param {boolean} [props.multiple=true] - 여러 파일 선택 가능 여부
|
|
11
|
+
* @param {number} [props.maxFileSize] - 최대 파일 크기 (bytes)
|
|
12
|
+
* @param {boolean} [props.disabled=false] - 컴포넌트 비활성화 여부
|
|
13
|
+
* @param {boolean} [props.isError=false] - 에러 상태 여부
|
|
14
|
+
* @param {string} [props.errorMessage] - 에러 메시지
|
|
15
|
+
* @param {string} [props.supportMessage] - 보조 메시지
|
|
16
|
+
* @param {string} [props.text] - 업로드 영역에 표시할 텍스트 (isSmall일 때 사용)
|
|
17
|
+
* @param {boolean} [props.isSmall=false] - 작은 크기 변형 여부
|
|
18
|
+
* @param {() => void} [props.onFileSizeExceeded] - 파일 크기 초과 시 호출되는 콜백 함수
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* // 기본 파일 업로더
|
|
22
|
+
* <FileUploader
|
|
23
|
+
* files={files}
|
|
24
|
+
* onChange={(newFiles) => setFiles(newFiles)}
|
|
25
|
+
* maxFileSize={10 * 1024 * 1024}
|
|
26
|
+
* />
|
|
27
|
+
*
|
|
28
|
+
* // 이미지만 업로드
|
|
29
|
+
* <FileUploader
|
|
30
|
+
* files={files}
|
|
31
|
+
* onChange={(newFiles) => setFiles(newFiles)}
|
|
32
|
+
* accept="image/*"
|
|
33
|
+
* supportMessage="이미지 파일만 업로드 가능합니다"
|
|
34
|
+
* />
|
|
35
|
+
*
|
|
36
|
+
* // 작은 크기 변형
|
|
37
|
+
* <FileUploader
|
|
38
|
+
* files={files}
|
|
39
|
+
* onChange={(newFiles) => setFiles(newFiles)}
|
|
40
|
+
* isSmall={true}
|
|
41
|
+
* text="파일 첨부하기"
|
|
42
|
+
* />
|
|
43
|
+
*/const p=({files:p=[],onChange:m,accept:c,multiple:u=!0,maxFileSize:f,disabled:g=!1,isError:x=!1,errorMessage:h,supportMessage:b,text:F,isSmall:w=!1,onFileSizeExceeded:y})=>{const{inputRef:S,isDragOver:j,handleInputChange:v,handleButtonClick:C,handleRemoveFile:D,handleDragOver:z,handleDragLeave:B,handleDrop:N}=d({files:p,onChange:m,maxFileSize:f,disabled:g,onFileSizeExceeded:y}),L=a((()=>p.reduce(((e,r)=>e+r.size),0)),[p]),M=n(c);/*#__PURE__*/
|
|
44
|
+
return e(o,{className:"flex w-full flex-col gap-6",children:[
|
|
45
|
+
/*#__PURE__*/r("input",{ref:S,type:"file",className:"hidden",accept:c,multiple:u,onChange:v,disabled:g,"data-testid":"file-uploader-input"}),p.length>0&&/*#__PURE__*/r(o,{className:"flex flex-col gap-2",children:p.map(((e,l)=>/*#__PURE__*/r(t,{file:e,onRemove:()=>D(l),disabled:g},`${e.name}-${l}`)))}),
|
|
46
|
+
/*#__PURE__*/e(o,{className:"flex flex-col gap-2",children:[
|
|
47
|
+
/*#__PURE__*/r("button",{type:"button",className:l("flex w-full items-center justify-center gap-3 rounded-xl border border-dashed border-w-gray-200 bg-w-gray-10 px-6 py-8 text-w-gray-600",w?"flex-row":"flex-col",g&&"cursor-not-allowed",x&&"border-w-red-500",!g&&!x&&"hover:border-w-gray-400",j&&!g&&!x&&"border-w-gray-400"),disabled:g,onClick:C,onDragOver:z,onDragLeave:B,onDrop:N,children:/*#__PURE__*/r(s,{disabled:g,isSmall:w,text:F,acceptDescription:M})}),
|
|
48
|
+
/*#__PURE__*/r(i,{errorMessage:h,supportMessage:b,currentFileSize:L,maxFileSize:f})]})]})};export{p as FileUploader};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { FileItemProps } from './FileUploader.types';
|
|
2
|
+
export declare const FileItem: ({ file, onRemove, disabled, }: FileItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
interface FileUploadAreaProps {
|
|
4
|
+
disabled: boolean;
|
|
5
|
+
isSmall: boolean;
|
|
6
|
+
text?: string;
|
|
7
|
+
acceptDescription: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const FileUploadArea: ({ disabled, isSmall, text, acceptDescription, }: FileUploadAreaProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{jsx as e,jsxs as a,Fragment as t}from"react/jsx-runtime";import{twMerge as r}from"tailwind-merge";import{Typography as s}from"../../Base/Typography/Typography.js";import{Box as l}from"../../Base/Layouts/Box/Box.js";import"../../Base/Layouts/FullBleed/FullBleed.js";import"../../DataDisplays/Avatar/Avatar.js";import"react";import{SystemIcon as i}from"../../DataDisplays/SystemIcon/SystemIcon.js";import"../../DataDisplays/SystemIcon/SystemIcon.constants.js";import"../../DataDisplays/Accordion/Accordion.js";import{getFileNameWithoutExtension as m,getFileExtension as n,formatFileSize as o}from"./FileUploader.utils.js";const c=({file:t,onRemove:c,disabled:d=!1})=>{const y=m(t.name),p=n(t.name),x=o(t.size);/*#__PURE__*/
|
|
2
|
+
return e(l,{className:"w-0 min-w-full rounded-xl border border-w-gray-200 px-3 py-2",children:/*#__PURE__*/a(l,{className:"flex items-center gap-2",children:[
|
|
3
|
+
/*#__PURE__*/e(i,{name:"medium_clip",className:"shrink-0 text-primary-500"}),
|
|
4
|
+
/*#__PURE__*/a(l,{className:"flex min-w-0 flex-1 items-center",children:[
|
|
5
|
+
/*#__PURE__*/e(s,{variant:"body16",className:"min-w-0 truncate text-w-gray-600",children:y}),
|
|
6
|
+
/*#__PURE__*/e(s,{variant:"body16",className:"shrink-0 text-w-gray-600",children:p})]}),
|
|
7
|
+
/*#__PURE__*/e(s,{variant:"body14",className:"ml-4 shrink-0 text-w-gray-400",children:x}),
|
|
8
|
+
/*#__PURE__*/e("button",{type:"button",onClick:c,disabled:d,"aria-label":"파일 삭제",className:d?"cursor-not-allowed":"",children:/*#__PURE__*/e(i,{name:"small_delete",className:r("ml-2 shrink-0",d?"text-w-gray-300":"text-w-gray-400")})})]})})},d=({disabled:r,isSmall:m,text:n,acceptDescription:o})=>{const c=r?"text-w-gray-300":"text-w-gray-600",d=r?"text-w-gray-300":"text-w-gray-400";/*#__PURE__*/
|
|
9
|
+
return a(t,{children:[
|
|
10
|
+
/*#__PURE__*/e(i,{name:"medium_upload",className:c}),m?/*#__PURE__*/e(s,{variant:"body16",className:c,children:n||"파일 업로드"}):/*#__PURE__*/a(l,{className:"flex flex-col items-center justify-center gap-0.5",children:[
|
|
11
|
+
/*#__PURE__*/e(s,{variant:"body16",className:c,children:"여기를 클릭하거나 파일을 끌어오세요."}),o&&/*#__PURE__*/e(s,{variant:"body14",className:d,children:o})]})]})};export{c as FileItem,d as FileUploadArea};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface FileItemProps {
|
|
2
|
+
file: File;
|
|
3
|
+
onRemove: () => void;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface FileUploaderProps {
|
|
7
|
+
files?: File[];
|
|
8
|
+
onChange?: (files: File[]) => void;
|
|
9
|
+
accept?: string;
|
|
10
|
+
multiple?: boolean;
|
|
11
|
+
maxFileSize?: number;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
isError?: boolean;
|
|
14
|
+
errorMessage?: string;
|
|
15
|
+
supportMessage?: string;
|
|
16
|
+
text?: string;
|
|
17
|
+
isSmall?: boolean;
|
|
18
|
+
onFileSizeExceeded?: () => void;
|
|
19
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const formatFileSize: (bytes: number) => string;
|
|
2
|
+
export declare const getFileExtension: (fileName: string) => string;
|
|
3
|
+
export declare const getFileNameWithoutExtension: (fileName: string) => string;
|
|
4
|
+
export declare const generateAcceptDescription: (accept?: string) => string;
|