mainstack-design-system 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.sample +1 -0
- package/.eslintignore +5 -0
- package/.eslintrc.json +96 -0
- package/.github/PULL_REQUEST_TEMPLATE.md +15 -0
- package/.husky/commit-msg +4 -0
- package/.husky/pre-commit +6 -0
- package/.prettierignore +7 -0
- package/.prettierrc +9 -0
- package/.storybook/main.ts +22 -0
- package/.storybook/preview.ts +20 -0
- package/.vscode/extensions.json +10 -0
- package/README.md +139 -0
- package/commitlint.config.cjs +1 -0
- package/index.html +31 -0
- package/package.json +98 -0
- package/public/_redirects +1 -0
- package/public/manifest.json +15 -0
- package/public/robots.txt +3 -0
- package/public/vite.svg +1 -0
- package/src/app.tsx +25 -0
- package/src/assets/fonts/Degular-Medium.woff2 +0 -0
- package/src/assets/fonts/Degular-Medium_Italic.woff2 +0 -0
- package/src/assets/fonts/Degular-Semibold.woff2 +0 -0
- package/src/assets/fonts/Degular-Semibold_Italic.woff2 +0 -0
- package/src/assets/fonts/Degular_Display-Bold.woff2 +0 -0
- package/src/assets/fonts/Degular_Display-Bold_Italic.woff2 +0 -0
- package/src/assets/fonts/Degular_Display-Semibold.woff2 +0 -0
- package/src/assets/fonts/Degular_Display-Semibold_Italic.woff2 +0 -0
- package/src/assets/fonts/Sohne-Buch.otf +0 -0
- package/src/assets/fonts/So/302/246/303/252hne-Buch.otf +0 -0
- package/src/assets/fonts/So/302/246/303/252hne-BuchKursiv.otf +0 -0
- package/src/assets/fonts/So/302/246/303/252hne-Dreiviertelfett.otf +0 -0
- package/src/assets/fonts/So/302/246/303/252hne-DreiviertelfettKursiv.otf +0 -0
- package/src/assets/fonts/So/302/246/303/252hne-Extrafett.otf +0 -0
- package/src/assets/fonts/So/302/246/303/252hne-Fett.otf +0 -0
- package/src/assets/fonts/So/302/246/303/252hne-Halbfett.otf +0 -0
- package/src/assets/fonts/So/302/246/303/252hne-HalbfettKursiv.otf +0 -0
- package/src/assets/fonts/So/302/246/303/252hne-Kra/302/246/303/252ftig.otf +0 -0
- package/src/assets/fonts/So/302/246/303/252hne-Kra/302/246/303/252ftigKursiv.otf +0 -0
- package/src/assets/fonts/So/302/246/303/252hne-Leicht.otf +0 -0
- package/src/assets/fonts/soehne-buch-kursiv.woff2 +0 -0
- package/src/assets/fonts/soehne-buch.woff2 +0 -0
- package/src/assets/fonts/soehne-dreiviertelfett-kursiv.woff2 +0 -0
- package/src/assets/fonts/soehne-dreiviertelfett.woff2 +0 -0
- package/src/assets/fonts/soehne-extrafett.woff2 +0 -0
- package/src/assets/fonts/soehne-fett.woff2 +0 -0
- package/src/assets/fonts/soehne-halbfett-kursiv.woff2 +0 -0
- package/src/assets/fonts/soehne-halbfett.woff2 +0 -0
- package/src/assets/fonts/soehne-kraftig-kursiv.woff2 +0 -0
- package/src/assets/fonts/soehne-kraftig.woff2 +0 -0
- package/src/assets/fonts/soehne-leicht.woff2 +0 -0
- package/src/assets/styles/index.css +486 -0
- package/src/assets/svgs/check_circle.svg +8 -0
- package/src/assets/svgs/close-circle.svg +3 -0
- package/src/assets/svgs/error_message_icon.svg +8 -0
- package/src/assets/svgs/personal_profile_avatar.svg +13 -0
- package/src/assets/svgs/search-normal.svg +4 -0
- package/src/assets/svgs/store_avatar.svg +13 -0
- package/src/assets/svgs/viewIcon.svg +8 -0
- package/src/assets/svgs/viewOffIcon.svg +3 -0
- package/src/assets/themes/baseThemes.ts +40 -0
- package/src/components/Accordion/index.tsx +111 -0
- package/src/components/Avatars/index.tsx +111 -0
- package/src/components/Button/IconButton.tsx +119 -0
- package/src/components/Button/index.tsx +173 -0
- package/src/components/InputFields/Input.tsx +177 -0
- package/src/components/InputFields/MarkdownEditor.tsx +246 -0
- package/src/components/InputFields/SearchInput.tsx +80 -0
- package/src/components/InputFields/SelectInput/CountrySelect.tsx +142 -0
- package/src/components/InputFields/SelectInput/PhoneNumberInput.tsx +89 -0
- package/src/components/InputFields/SelectInput/SelectInput.tsx +395 -0
- package/src/components/InputFields/SelectInput/index.ts +9 -0
- package/src/components/InputFields/TextArea.tsx +150 -0
- package/src/components/InputFields/UsernameInput.tsx +145 -0
- package/src/components/Tiles/index.tsx +95 -0
- package/src/components/Typography/Display.tsx +84 -0
- package/src/components/Typography/Heading.tsx +136 -0
- package/src/components/Typography/Paragraph.tsx +105 -0
- package/src/components/Typography/Subtitle.tsx +148 -0
- package/src/components/Uploader/FileUploader.tsx +132 -0
- package/src/components/Uploader/ImageUploader.tsx +311 -0
- package/src/components/controls/Chip.tsx +78 -0
- package/src/components/controls/DoubleTab.tsx +80 -0
- package/src/components/controls/Pagination.tsx +164 -0
- package/src/components/controls/RadioButton.tsx +135 -0
- package/src/components/controls/RectangleCheckButton.tsx +106 -0
- package/src/components/controls/RoundCheckButton.tsx +106 -0
- package/src/components/controls/Stepper.tsx +84 -0
- package/src/components/controls/TabMenu.tsx +114 -0
- package/src/components/controls/ToggleButton.tsx +123 -0
- package/src/components/notifications/Banner.tsx +175 -0
- package/src/components/notifications/ClickTooltip.tsx +108 -0
- package/src/components/notifications/HoverTooltip.tsx +34 -0
- package/src/components/notifications/Snackbar.tsx +138 -0
- package/src/components/styleGuide/Colors.tsx +176 -0
- package/src/hooks/useImageUpload.ts +78 -0
- package/src/icons/AccountBalanceIcon.tsx +35 -0
- package/src/icons/AccountBalanceWalletFilledIcon.tsx +35 -0
- package/src/icons/AccountBalanceWalletIcon.tsx +35 -0
- package/src/icons/AccountCircleFilledIcon.tsx +35 -0
- package/src/icons/AccountCircleIcon.tsx +35 -0
- package/src/icons/AddAPhotoIcon.tsx +35 -0
- package/src/icons/AddBusinessFilledIcon.tsx +35 -0
- package/src/icons/AddBusinessIcon.tsx +35 -0
- package/src/icons/AddCircleFilledIcon.tsx +35 -0
- package/src/icons/AddCircleIcon.tsx +35 -0
- package/src/icons/AddIcon.tsx +35 -0
- package/src/icons/AddPhotoAlternateIcon.tsx +35 -0
- package/src/icons/AddShoppingCartIcon.tsx +35 -0
- package/src/icons/AddToSocialsIcon.tsx +48 -0
- package/src/icons/AddsClickIcon.tsx +35 -0
- package/src/icons/AdminPanelSettingsIcon.tsx +35 -0
- package/src/icons/AirplaneModeActiveIcon.tsx +35 -0
- package/src/icons/AlarmIcon.tsx +35 -0
- package/src/icons/AllInboxIcon.tsx +35 -0
- package/src/icons/AnimationIcon.tsx +35 -0
- package/src/icons/AppsFilledIcon.tsx +35 -0
- package/src/icons/AppsIcon.tsx +35 -0
- package/src/icons/ArchiveIcon.tsx +35 -0
- package/src/icons/ArrowBackIcon.tsx +35 -0
- package/src/icons/ArrowCircleDownFilledIcon.tsx +35 -0
- package/src/icons/ArrowCircleUpFilledIcon.tsx +35 -0
- package/src/icons/ArrowDropDownIcon.tsx +32 -0
- package/src/icons/ArrowDropUpIcon.tsx +37 -0
- package/src/icons/ArrowForwardIcon.tsx +35 -0
- package/src/icons/ArtTrackIcon.tsx +35 -0
- package/src/icons/ArticleFilledIcon.tsx +35 -0
- package/src/icons/ArticleIcon.tsx +35 -0
- package/src/icons/AttachMoneyIcon.tsx +35 -0
- package/src/icons/AttachmentIcon.tsx +35 -0
- package/src/icons/AudioFileFilledIcon.tsx +35 -0
- package/src/icons/AutoAwesomeMosaicFilledIcon.tsx +35 -0
- package/src/icons/AutoAwesomeMosaicIcon.tsx +35 -0
- package/src/icons/AutoFixFilledIcon.tsx +35 -0
- package/src/icons/AutoFixIcon.tsx +35 -0
- package/src/icons/AutoGraphIcon.tsx +35 -0
- package/src/icons/AwardStarFilledIcon.tsx +35 -0
- package/src/icons/AwardStarIcon.tsx +35 -0
- package/src/icons/BarChartFilledIcon.tsx +35 -0
- package/src/icons/BlockIcon.tsx +35 -0
- package/src/icons/BoltFilledIcon.tsx +35 -0
- package/src/icons/BoltIcon.tsx +35 -0
- package/src/icons/BookOnlineIcon.tsx +35 -0
- package/src/icons/BugReportIcon.tsx +35 -0
- package/src/icons/BusinessCenterFilledIcon.tsx +35 -0
- package/src/icons/BusinessCenterIcon.tsx +35 -0
- package/src/icons/CalendarMonthFilledIcon.tsx +35 -0
- package/src/icons/CalendarMonthIcon.tsx +35 -0
- package/src/icons/CalendarTodayIcon.tsx +35 -0
- package/src/icons/CallMadeIcon.tsx +35 -0
- package/src/icons/CallMissedIcon.tsx +35 -0
- package/src/icons/CallMissedOutgoingIcon.tsx +35 -0
- package/src/icons/CallRecievedIcon.tsx +35 -0
- package/src/icons/CampaignFilledIcon.tsx +22 -0
- package/src/icons/CampaignIcon.tsx +35 -0
- package/src/icons/CancelFilledIcon.tsx +22 -0
- package/src/icons/CancelIcon.tsx +22 -0
- package/src/icons/CaptivePortalIcon.tsx +35 -0
- package/src/icons/CardLayoutIcon.tsx +22 -0
- package/src/icons/CasesFilledIcon.tsx +35 -0
- package/src/icons/CasesIcon.tsx +35 -0
- package/src/icons/CategoryIcon.tsx +35 -0
- package/src/icons/ChairIcon.tsx +35 -0
- package/src/icons/ChangeCircleIcon.tsx +35 -0
- package/src/icons/ChatBubbleFilledIcon.tsx +35 -0
- package/src/icons/ChatBubbleIcon.tsx +35 -0
- package/src/icons/ChatFilledIcon.tsx +35 -0
- package/src/icons/ChatIcon.tsx +35 -0
- package/src/icons/CheckCircleFilledIcon.tsx +35 -0
- package/src/icons/CheckCircleIcon.tsx +35 -0
- package/src/icons/CheckIcon.tsx +35 -0
- package/src/icons/ChevronLeftIcon.tsx +43 -0
- package/src/icons/ChevronRightIcon.tsx +43 -0
- package/src/icons/CloseIcon.tsx +35 -0
- package/src/icons/CloudUploadIcon.tsx +35 -0
- package/src/icons/CodeIcon.tsx +35 -0
- package/src/icons/CoffeeIcon.tsx +35 -0
- package/src/icons/CollectionsBookmarkIcon.tsx +35 -0
- package/src/icons/ColorPickerIcon.tsx +22 -0
- package/src/icons/CommentCircleAltChatMessageIcon.tsx +24 -0
- package/src/icons/ConfirmationNumberIcon.tsx +35 -0
- package/src/icons/ContactMailFilledIcon.tsx +35 -0
- package/src/icons/ContactMailIcon.tsx +35 -0
- package/src/icons/ContactPageIcon.tsx +22 -0
- package/src/icons/ContactPhoneFilledIcon.tsx +35 -0
- package/src/icons/ContactPhoneIcon.tsx +35 -0
- package/src/icons/ContactsIcon.tsx +22 -0
- package/src/icons/ContentCopyIcon.tsx +35 -0
- package/src/icons/CopyIcon.tsx +35 -0
- package/src/icons/CreditCardFilledIcon.tsx +35 -0
- package/src/icons/CreditCardIcon.tsx +35 -0
- package/src/icons/DarkModeIcon.tsx +35 -0
- package/src/icons/DashboardFilledIcon.tsx +35 -0
- package/src/icons/DashboardIcon.tsx +35 -0
- package/src/icons/DatabaseFilledIcon.tsx +35 -0
- package/src/icons/DeleteIcon.tsx +35 -0
- package/src/icons/DescriptionIcon.tsx +35 -0
- package/src/icons/DesktopMacIcon.tsx +35 -0
- package/src/icons/DevicesIcon.tsx +35 -0
- package/src/icons/DiamondFilledIcon.tsx +35 -0
- package/src/icons/DiamondIcon.tsx +35 -0
- package/src/icons/DigitalProductsIcon.tsx +58 -0
- package/src/icons/DiscountIcon.tsx +24 -0
- package/src/icons/Diversity1Icon.tsx +22 -0
- package/src/icons/Diversity2Icon.tsx +22 -0
- package/src/icons/Diversity3Icon.tsx +22 -0
- package/src/icons/DnsIcon.tsx +35 -0
- package/src/icons/DoNotDisturbOnFilledIcon.tsx +35 -0
- package/src/icons/DoNotDisturbOnIcon.tsx +35 -0
- package/src/icons/DomainAddIcon.tsx +35 -0
- package/src/icons/DomainIcon.tsx +35 -0
- package/src/icons/DomainVerificationIcon.tsx +35 -0
- package/src/icons/DownloadIcon.tsx +35 -0
- package/src/icons/DraftsIcon.tsx +35 -0
- package/src/icons/DragHandleIcon.tsx +35 -0
- package/src/icons/DragIndicatorIcon.tsx +35 -0
- package/src/icons/EditFilledIcon.tsx +35 -0
- package/src/icons/EditIcon.tsx +35 -0
- package/src/icons/EmojiEventsFilledIcon.tsx +35 -0
- package/src/icons/EmojiEventsIcon.tsx +35 -0
- package/src/icons/EmojiFoodBeverageIcon.tsx +35 -0
- package/src/icons/EmojiIcon.tsx +35 -0
- package/src/icons/EmptyIcon.tsx +22 -0
- package/src/icons/ErrorFilledIcon.tsx +35 -0
- package/src/icons/ErrorIcon.tsx +35 -0
- package/src/icons/EventFilledIcon.tsx +35 -0
- package/src/icons/EventIcon.tsx +35 -0
- package/src/icons/EventTicketIcon.tsx +54 -0
- package/src/icons/ExpandLessIcon.tsx +40 -0
- package/src/icons/ExpandMoreIcon.tsx +35 -0
- package/src/icons/FastActionPricingIcon.tsx +58 -0
- package/src/icons/FeedFilledIcon.tsx +35 -0
- package/src/icons/FeedIcon.tsx +35 -0
- package/src/icons/FilePresentIcon.tsx +35 -0
- package/src/icons/FilterListIcon.tsx +35 -0
- package/src/icons/FitbitArrowDownIcon.tsx +35 -0
- package/src/icons/FitbitArrowUpwardIcon.tsx +35 -0
- package/src/icons/FlagIcon.tsx +35 -0
- package/src/icons/FormatAlignCenterIcon.tsx +35 -0
- package/src/icons/FormatAlignJustifyIcon.tsx +35 -0
- package/src/icons/FormatAlignLeftIcon.tsx +35 -0
- package/src/icons/FormatAlignRightIcon.tsx +35 -0
- package/src/icons/FormatBoldIcon.tsx +35 -0
- package/src/icons/FormatItalicIcon.tsx +35 -0
- package/src/icons/FormatListBulletedIcon.tsx +35 -0
- package/src/icons/FormatListNumberedIcon.tsx +35 -0
- package/src/icons/FormatSizeIcon.tsx +35 -0
- package/src/icons/FormatUnderlineIcon.tsx +35 -0
- package/src/icons/ForumIcon.tsx +35 -0
- package/src/icons/ForwardToInboxIcon.tsx +35 -0
- package/src/icons/GalleryThumbnailIcon.tsx +35 -0
- package/src/icons/GppBadFilledIcon.tsx +35 -0
- package/src/icons/GppBadIcon.tsx +35 -0
- package/src/icons/GppMaybeFilledIcon.tsx +35 -0
- package/src/icons/GppMaybeIcon.tsx +35 -0
- package/src/icons/GridViewIcon.tsx +35 -0
- package/src/icons/GroupFilledIcon.tsx +35 -0
- package/src/icons/GroupIcon.tsx +35 -0
- package/src/icons/HeadphonesIcon.tsx +35 -0
- package/src/icons/HomeFilledIcon.tsx +35 -0
- package/src/icons/HomeIcon.tsx +35 -0
- package/src/icons/HomePinIcon.tsx +35 -0
- package/src/icons/HourGlassEmptyIcon.tsx +35 -0
- package/src/icons/HubIcon.tsx +22 -0
- package/src/icons/InfoFilledIcon.tsx +35 -0
- package/src/icons/InfoGradientFilledIcon.tsx +49 -0
- package/src/icons/InfoIcon.tsx +35 -0
- package/src/icons/InsertChartFilledIcon.tsx +35 -0
- package/src/icons/InsertChartIcon.tsx +35 -0
- package/src/icons/InventoryIcon.tsx +22 -0
- package/src/icons/IosShareIcon.tsx +35 -0
- package/src/icons/KeyboardBackspaceIcon.tsx +35 -0
- package/src/icons/LanguageIcon.tsx +35 -0
- package/src/icons/LibraryMusicIcon.tsx +35 -0
- package/src/icons/LinkIcon.tsx +35 -0
- package/src/icons/LinkOffIcon.tsx +35 -0
- package/src/icons/LocalActivityIcon.tsx +35 -0
- package/src/icons/LocalFloristFilledIcon.tsx +35 -0
- package/src/icons/LocalFloristIcon.tsx +35 -0
- package/src/icons/LocationOnIcon.tsx +35 -0
- package/src/icons/LockIcon.tsx +35 -0
- package/src/icons/LoginIcon.tsx +35 -0
- package/src/icons/LogoutIcon.tsx +43 -0
- package/src/icons/MailIcon.tsx +35 -0
- package/src/icons/MarkUnreadChatIcon.tsx +35 -0
- package/src/icons/MasterClassIcon.tsx +74 -0
- package/src/icons/MediaLinkFilledIcon.tsx +35 -0
- package/src/icons/MediaLinkIcon.tsx +35 -0
- package/src/icons/MenuIcon.tsx +35 -0
- package/src/icons/MenuOpenIcon.tsx +35 -0
- package/src/icons/MilitaryTechFilledIcon.tsx +35 -0
- package/src/icons/MilitaryTechIcon.tsx +35 -0
- package/src/icons/MonitoringIcon.tsx +35 -0
- package/src/icons/MoreHorizontalIcon.tsx +35 -0
- package/src/icons/MoreHorizontalSmallIcon.tsx +35 -0
- package/src/icons/MoreVerticalIcon.tsx +35 -0
- package/src/icons/NotificationsFilledIcon.tsx +40 -0
- package/src/icons/NotificationsIcon.tsx +35 -0
- package/src/icons/OpenInNewIcon.tsx +35 -0
- package/src/icons/OthersIcon.tsx +58 -0
- package/src/icons/PageViewIcon.tsx +35 -0
- package/src/icons/PaidIcon.tsx +35 -0
- package/src/icons/PaletteFilledIcon.tsx +35 -0
- package/src/icons/PaletteIcon.tsx +35 -0
- package/src/icons/PauseIcon.tsx +22 -0
- package/src/icons/PayInTranchesIcon.tsx +29 -0
- package/src/icons/PaymentsFilledIcon.tsx +35 -0
- package/src/icons/PaymentsIcon.tsx +35 -0
- package/src/icons/PendingActionsIcon.tsx +35 -0
- package/src/icons/PermMediaIcon.tsx +35 -0
- package/src/icons/PersonAddIcon.tsx +35 -0
- package/src/icons/PersonIcon.tsx +35 -0
- package/src/icons/PhotoCameraIcon.tsx +35 -0
- package/src/icons/PhotoFilledIcon.tsx +35 -0
- package/src/icons/PhotoIcon.tsx +35 -0
- package/src/icons/PhotoLibraryFilledIcon.tsx +35 -0
- package/src/icons/PhotoLibraryIcon.tsx +35 -0
- package/src/icons/PictureAsPdfFilledIcon.tsx +35 -0
- package/src/icons/PictureAsPdfIcon.tsx +35 -0
- package/src/icons/PlayArrowIcon.tsx +32 -0
- package/src/icons/PlayCircleFilledIcon.tsx +35 -0
- package/src/icons/PlayCircleIcon.tsx +22 -0
- package/src/icons/PowerRoundedIcon.tsx +35 -0
- package/src/icons/PreviewIcon.tsx +35 -0
- package/src/icons/PublicIcon.tsx +22 -0
- package/src/icons/PublishIcon.tsx +35 -0
- package/src/icons/PushPinFilledIcon.tsx +35 -0
- package/src/icons/PushPinIcon.tsx +35 -0
- package/src/icons/QrCode2Icon.tsx +35 -0
- package/src/icons/RadioButtonCheckedIcon.tsx +35 -0
- package/src/icons/RadioButtonUncheckedIcon.tsx +35 -0
- package/src/icons/RecieptLongFilledIcon.tsx +35 -0
- package/src/icons/RecieptLongIcon.tsx +35 -0
- package/src/icons/RecordVoiceOverIcon.tsx +35 -0
- package/src/icons/RedeemIcon.tsx +35 -0
- package/src/icons/RedoIcon.tsx +35 -0
- package/src/icons/RemoveIcon.tsx +32 -0
- package/src/icons/RemoveRoadIcon.tsx +35 -0
- package/src/icons/ReportFilledIcon.tsx +35 -0
- package/src/icons/ReportIcon.tsx +35 -0
- package/src/icons/ReviewsIcon.tsx +43 -0
- package/src/icons/SavingsFilledIcon.tsx +35 -0
- package/src/icons/SavingsIcon.tsx +35 -0
- package/src/icons/ScheduleIcon.tsx +35 -0
- package/src/icons/ScheduleSendIcon.tsx +35 -0
- package/src/icons/SearchNormalIcon.tsx +32 -0
- package/src/icons/SellIcon.tsx +35 -0
- package/src/icons/SendIcon.tsx +35 -0
- package/src/icons/ServicesIcon.tsx +39 -0
- package/src/icons/SettingsFilledIcon.tsx +35 -0
- package/src/icons/SettingsIcon.tsx +35 -0
- package/src/icons/ShareIcon.tsx +35 -0
- package/src/icons/ShareWithContactsIcon.tsx +62 -0
- package/src/icons/ShareWithSocialsIcon.tsx +64 -0
- package/src/icons/ShoppingCartFilledIcon.tsx +35 -0
- package/src/icons/ShoppingCartIcon.tsx +35 -0
- package/src/icons/ShuffleIcon.tsx +35 -0
- package/src/icons/SmartPhoneIcon.tsx +35 -0
- package/src/icons/SocialLeaderboardIcon.tsx +35 -0
- package/src/icons/StarFilledIcon.tsx +35 -0
- package/src/icons/StarHalfIcon.tsx +35 -0
- package/src/icons/StarIcon.tsx +35 -0
- package/src/icons/StoreFrontFilledIcon.tsx +35 -0
- package/src/icons/StoreFrontIcon.tsx +35 -0
- package/src/icons/StrikeThroughSIcon.tsx +35 -0
- package/src/icons/StyleIcon.tsx +35 -0
- package/src/icons/SubscriptionIcon.tsx +46 -0
- package/src/icons/SubscriptionsFilledIcon.tsx +35 -0
- package/src/icons/SubscriptionsIcon.tsx +35 -0
- package/src/icons/SupervisorAccountIcon.tsx +35 -0
- package/src/icons/SwitchAccountFilledIcon.tsx +35 -0
- package/src/icons/SwitchAccountIcon.tsx +35 -0
- package/src/icons/SyncSavedLocallyIcon.tsx +35 -0
- package/src/icons/TabletIcon.tsx +35 -0
- package/src/icons/ThumbDownFilledIcon.tsx +22 -0
- package/src/icons/ThumbDownIcon.tsx +22 -0
- package/src/icons/ThumbUpFilledIcon.tsx +22 -0
- package/src/icons/ThumbUpIcon.tsx +22 -0
- package/src/icons/TocIcon.tsx +35 -0
- package/src/icons/TrainingsIcon.tsx +37 -0
- package/src/icons/TrashDeleteBinIcon.tsx +36 -0
- package/src/icons/TrendingUpIcon.tsx +35 -0
- package/src/icons/UndoIcon.tsx +35 -0
- package/src/icons/UnfoldMoreIcon.tsx +35 -0
- package/src/icons/UploadIcon.tsx +35 -0
- package/src/icons/VerifiedIcon.tsx +24 -0
- package/src/icons/ViewAgendaIcon.tsx +22 -0
- package/src/icons/ViewArrayIcon.tsx +35 -0
- package/src/icons/ViewCarouselIcon.tsx +35 -0
- package/src/icons/ViewCozyIcon.tsx +22 -0
- package/src/icons/ViewModuleIcon.tsx +35 -0
- package/src/icons/VisibilityIcon.tsx +35 -0
- package/src/icons/VisibilityOffIcon.tsx +35 -0
- package/src/icons/VolunteerActivismFilledIcon.tsx +35 -0
- package/src/icons/VolunteerActivismIcon.tsx +35 -0
- package/src/icons/WBSunnyIcon.tsx +35 -0
- package/src/icons/WarningFilledIcon.tsx +35 -0
- package/src/icons/WarningIcon.tsx +35 -0
- package/src/icons/WebinarsIcon.tsx +57 -0
- package/src/icons/WidgetsFilledIcon.tsx +35 -0
- package/src/icons/WidgetsIcon.tsx +35 -0
- package/src/icons/WorkshopsIcon.tsx +50 -0
- package/src/icons/index.ts +305 -0
- package/src/pages/Home.tsx +30 -0
- package/src/pages/Login.tsx +13 -0
- package/src/pages/Page404.tsx +13 -0
- package/src/pages/index.tsx +21 -0
- package/src/routes/index.tsx +7 -0
- package/src/stories/Accordion/Accordion.stories.tsx +100 -0
- package/src/stories/Accordion/AccordionWrapper.tsx +16 -0
- package/src/stories/Avatars/Avatar.stories.ts +57 -0
- package/src/stories/Buttons/Button.stories.tsx +95 -0
- package/src/stories/Buttons/IconButton.stories.ts +68 -0
- package/src/stories/Buttons/IconButtonWrapper.tsx +14 -0
- package/src/stories/Colors.mdx +12 -0
- package/src/stories/Configure.mdx +371 -0
- package/src/stories/InputFields/InputFields.stories.ts +54 -0
- package/src/stories/InputFields/MarkdownEditor.stories.ts +20 -0
- package/src/stories/InputFields/SearchInput.stories.ts +22 -0
- package/src/stories/InputFields/SearchInput.tsx +19 -0
- package/src/stories/InputFields/Select/CountrySelect.stories.tsx +21 -0
- package/src/stories/InputFields/Select/CountrySelectWrapper.tsx +25 -0
- package/src/stories/InputFields/Select/CreatableSelect.stories.tsx +48 -0
- package/src/stories/InputFields/Select/CreatableSelectWrapper.tsx +25 -0
- package/src/stories/InputFields/Select/PhoneNumberInput.stories.tsx +33 -0
- package/src/stories/InputFields/Select/PhoneNumberInputWrapper.tsx +21 -0
- package/src/stories/InputFields/Select/Select.stories.tsx +49 -0
- package/src/stories/InputFields/Select/SelectWrapper.tsx +25 -0
- package/src/stories/InputFields/TextArea.stories.ts +22 -0
- package/src/stories/InputFields/UsernameInput.stories.ts +22 -0
- package/src/stories/Tiles/Tile.stories.tsx +71 -0
- package/src/stories/Tiles/TileWrapper.tsx +17 -0
- package/src/stories/Typography/DisplayText.stories.ts +52 -0
- package/src/stories/Typography/HeadingText.stories.ts +86 -0
- package/src/stories/Typography/ParagraphText.stories.ts +62 -0
- package/src/stories/Typography/SubtitleText.stories.ts +93 -0
- package/src/stories/Uploaders/FileUploadWrapper.tsx +25 -0
- package/src/stories/Uploaders/FileUploader.stories.tsx +17 -0
- package/src/stories/Uploaders/ImageUploadWrapper.tsx +30 -0
- package/src/stories/Uploaders/ImageUploader.stories.tsx +19 -0
- package/src/stories/assets/accessibility.png +0 -0
- package/src/stories/assets/accessibility.svg +5 -0
- package/src/stories/assets/addon-library.png +0 -0
- package/src/stories/assets/assets.png +0 -0
- package/src/stories/assets/context.png +0 -0
- package/src/stories/assets/discord.svg +15 -0
- package/src/stories/assets/docs.png +0 -0
- package/src/stories/assets/figma-plugin.png +0 -0
- package/src/stories/assets/github.svg +3 -0
- package/src/stories/assets/share.png +0 -0
- package/src/stories/assets/styling.png +0 -0
- package/src/stories/assets/testing.png +0 -0
- package/src/stories/assets/theming.png +0 -0
- package/src/stories/assets/tutorials.svg +12 -0
- package/src/stories/assets/youtube.svg +4 -0
- package/src/stories/colors/index.ts +4 -0
- package/src/stories/controls/Chip.stories.ts +42 -0
- package/src/stories/controls/DoubleTab.stories.ts +32 -0
- package/src/stories/controls/DoubleTabWrapper.tsx +15 -0
- package/src/stories/controls/Pagination.stories.ts +21 -0
- package/src/stories/controls/PaginationWrapper.tsx +23 -0
- package/src/stories/controls/RadioButton.stories.ts +49 -0
- package/src/stories/controls/RectangleCheckButton.stories.ts +41 -0
- package/src/stories/controls/RoundCheckButton.stories.ts +41 -0
- package/src/stories/controls/Stepper.stories.ts +37 -0
- package/src/stories/controls/StepperDemoCmp.tsx +37 -0
- package/src/stories/controls/TabMenu.stories.ts +33 -0
- package/src/stories/controls/TabMenuWrapper.tsx +14 -0
- package/src/stories/controls/ToggleButton.stories.ts +41 -0
- package/src/stories/icons/Icons.mdx +26 -0
- package/src/stories/icons/index.ts +613 -0
- package/src/stories/notifications/Banner.stories.ts +88 -0
- package/src/stories/notifications/ClickTooltip.stories.ts +21 -0
- package/src/stories/notifications/ClickTooltipWrapper.tsx +19 -0
- package/src/stories/notifications/HoverTooltip.stories.ts +35 -0
- package/src/stories/notifications/HoverTooltipWrapper.tsx +16 -0
- package/src/stories/notifications/Snackbar.stories.ts +17 -0
- package/src/stories/notifications/SnackbarWrapper.tsx +107 -0
- package/src/utils/countries-flag.json +1752 -0
- package/tsconfig.json +34 -0
- package/vite.config.ts +27 -0
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
/** @format */
|
|
2
|
+
|
|
3
|
+
import { Flex, Text } from "@chakra-ui/react";
|
|
4
|
+
import { useState } from "react";
|
|
5
|
+
import Colors from "components/styleGuide/Colors";
|
|
6
|
+
import "assets/styles/index.css";
|
|
7
|
+
import { CloseIcon, InfoFilledIcon, InfoGradientFilledIcon } from "icons";
|
|
8
|
+
import Button from "components/Button";
|
|
9
|
+
|
|
10
|
+
interface Props {
|
|
11
|
+
variant:
|
|
12
|
+
| "blue"
|
|
13
|
+
| "red"
|
|
14
|
+
| "green"
|
|
15
|
+
| "yellow"
|
|
16
|
+
| "purple"
|
|
17
|
+
| "orange"
|
|
18
|
+
| "gradient";
|
|
19
|
+
onProceed: () => void;
|
|
20
|
+
message: string;
|
|
21
|
+
buttonText?: string;
|
|
22
|
+
hasProceedButton?: boolean;
|
|
23
|
+
hasCloseButton?: boolean;
|
|
24
|
+
}
|
|
25
|
+
const Banner = ({
|
|
26
|
+
variant,
|
|
27
|
+
onProceed,
|
|
28
|
+
message,
|
|
29
|
+
buttonText,
|
|
30
|
+
hasProceedButton = true,
|
|
31
|
+
hasCloseButton = true,
|
|
32
|
+
}: Props) => {
|
|
33
|
+
const [isHidden, setIsHidden] = useState(false);
|
|
34
|
+
const variants = {
|
|
35
|
+
blue: {
|
|
36
|
+
bgColor: Colors.blue50,
|
|
37
|
+
iconColor: Colors.blue900,
|
|
38
|
+
textColor: Colors.blue900,
|
|
39
|
+
closeButtonColor: Colors.blue900,
|
|
40
|
+
button: {
|
|
41
|
+
color: Colors.blue50,
|
|
42
|
+
bgColor: Colors.blue900,
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
red: {
|
|
46
|
+
bgColor: Colors.red50,
|
|
47
|
+
iconColor: Colors.red900,
|
|
48
|
+
textColor: Colors.red900,
|
|
49
|
+
closeButtonColor: Colors.red900,
|
|
50
|
+
button: {
|
|
51
|
+
color: Colors.red50,
|
|
52
|
+
bgColor: Colors.red900,
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
green: {
|
|
56
|
+
bgColor: Colors.green50,
|
|
57
|
+
iconColor: Colors.green900,
|
|
58
|
+
textColor: Colors.green900,
|
|
59
|
+
closeButtonColor: Colors.green900,
|
|
60
|
+
button: {
|
|
61
|
+
color: Colors.green50,
|
|
62
|
+
bgColor: Colors.green900,
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
yellow: {
|
|
66
|
+
bgColor: Colors.yellow50,
|
|
67
|
+
iconColor: Colors.yellow900,
|
|
68
|
+
textColor: Colors.yellow900,
|
|
69
|
+
closeButtonColor: Colors.yellow900,
|
|
70
|
+
button: {
|
|
71
|
+
color: Colors.yellow50,
|
|
72
|
+
bgColor: Colors.yellow900,
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
purple: {
|
|
76
|
+
bgColor: Colors.purple50,
|
|
77
|
+
iconColor: Colors.purple900,
|
|
78
|
+
textColor: Colors.purple900,
|
|
79
|
+
closeButtonColor: Colors.purple900,
|
|
80
|
+
button: {
|
|
81
|
+
color: Colors.purple50,
|
|
82
|
+
bgColor: Colors.purple900,
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
orange: {
|
|
86
|
+
bgColor: Colors.orange50,
|
|
87
|
+
iconColor: Colors.orange900,
|
|
88
|
+
textColor: Colors.orange900,
|
|
89
|
+
closeButtonColor: Colors.orange900,
|
|
90
|
+
button: {
|
|
91
|
+
color: Colors.orange50,
|
|
92
|
+
bgColor: Colors.orange900,
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
gradient: {
|
|
96
|
+
bgColor: Colors.white100,
|
|
97
|
+
iconColor: Colors.polychromeTealPinkPurple,
|
|
98
|
+
textColor: Colors.black300,
|
|
99
|
+
closeButtonColor: Colors.black300,
|
|
100
|
+
button: {
|
|
101
|
+
color: Colors.white100,
|
|
102
|
+
bgColor: Colors.black300,
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
};
|
|
106
|
+
return (
|
|
107
|
+
<Flex
|
|
108
|
+
px={"16px"}
|
|
109
|
+
py={"10px"}
|
|
110
|
+
borderRadius={"12px"}
|
|
111
|
+
className={variant === "gradient" ? `border-gradient` : "none"}
|
|
112
|
+
bg={variant === "gradient" ? "" : variants[variant].bgColor}
|
|
113
|
+
justifyContent={"start"}
|
|
114
|
+
alignItems={"center"}
|
|
115
|
+
gap={"16px"}
|
|
116
|
+
hidden={isHidden}
|
|
117
|
+
width="full"
|
|
118
|
+
>
|
|
119
|
+
<Flex
|
|
120
|
+
py={"6px"}
|
|
121
|
+
gap={"12px"}
|
|
122
|
+
justifyContent={"start"}
|
|
123
|
+
alignItems={"center"}
|
|
124
|
+
flex={1}
|
|
125
|
+
>
|
|
126
|
+
{variant === "gradient" ? (
|
|
127
|
+
<InfoGradientFilledIcon fontSize={20} />
|
|
128
|
+
) : (
|
|
129
|
+
<InfoFilledIcon color={variants[variant].iconColor} fontSize={20} />
|
|
130
|
+
)}
|
|
131
|
+
|
|
132
|
+
<Text
|
|
133
|
+
color={variants[variant].textColor}
|
|
134
|
+
fontFamily={"Degular"}
|
|
135
|
+
fontSize={"14px"}
|
|
136
|
+
fontWeight={500}
|
|
137
|
+
lineHeight={"16px"}
|
|
138
|
+
letterSpacing={"-0.2px"}
|
|
139
|
+
>
|
|
140
|
+
{message}
|
|
141
|
+
</Text>
|
|
142
|
+
</Flex>
|
|
143
|
+
|
|
144
|
+
<Flex justifyContent={"center"} alignItems={"center"} gap={"16px"}>
|
|
145
|
+
{hasProceedButton && (
|
|
146
|
+
<Button
|
|
147
|
+
label={buttonText || "Button"}
|
|
148
|
+
variant="tertiary"
|
|
149
|
+
size="small"
|
|
150
|
+
bgColor={variants[variant].button.bgColor}
|
|
151
|
+
color={variants[variant].button.color}
|
|
152
|
+
onClick={() => {
|
|
153
|
+
setIsHidden(true);
|
|
154
|
+
onProceed();
|
|
155
|
+
}}
|
|
156
|
+
_hover={{
|
|
157
|
+
color: variants[variant].button.color,
|
|
158
|
+
bg: variants[variant].button.bgColor,
|
|
159
|
+
}}
|
|
160
|
+
/>
|
|
161
|
+
)}
|
|
162
|
+
{hasCloseButton && (
|
|
163
|
+
<CloseIcon
|
|
164
|
+
color={variants[variant].iconColor}
|
|
165
|
+
fontSize={20}
|
|
166
|
+
onClick={() => setIsHidden(true)}
|
|
167
|
+
cursor="pointer"
|
|
168
|
+
/>
|
|
169
|
+
)}
|
|
170
|
+
</Flex>
|
|
171
|
+
</Flex>
|
|
172
|
+
);
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
export default Banner;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/** @format */
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
Box,
|
|
5
|
+
Heading,
|
|
6
|
+
Button,
|
|
7
|
+
Popover,
|
|
8
|
+
PopoverArrow,
|
|
9
|
+
PopoverBody,
|
|
10
|
+
PopoverContent,
|
|
11
|
+
PopoverTrigger,
|
|
12
|
+
Text,
|
|
13
|
+
} from "@chakra-ui/react";
|
|
14
|
+
import Colors from "components/styleGuide/Colors";
|
|
15
|
+
export interface ICustomTooltip {
|
|
16
|
+
triggerComponent: JSX.Element;
|
|
17
|
+
body: string;
|
|
18
|
+
label: string;
|
|
19
|
+
hasSpecialArrow?: boolean;
|
|
20
|
+
}
|
|
21
|
+
import "assets/styles/index.css";
|
|
22
|
+
|
|
23
|
+
const CickTooltip = ({
|
|
24
|
+
label,
|
|
25
|
+
body,
|
|
26
|
+
hasSpecialArrow,
|
|
27
|
+
triggerComponent,
|
|
28
|
+
}: ICustomTooltip) => {
|
|
29
|
+
return (
|
|
30
|
+
<Popover closeOnBlur={false} placement="bottom">
|
|
31
|
+
{({ onClose }) => (
|
|
32
|
+
<>
|
|
33
|
+
<PopoverTrigger>
|
|
34
|
+
<Box>{triggerComponent}</Box>
|
|
35
|
+
</PopoverTrigger>
|
|
36
|
+
<PopoverContent
|
|
37
|
+
bg={Colors.black300}
|
|
38
|
+
border={"none"}
|
|
39
|
+
outline={"none"}
|
|
40
|
+
outlineOffset={"0px"}
|
|
41
|
+
borderRadius={"16px"}
|
|
42
|
+
p={"20px"}
|
|
43
|
+
right={{ base: "5px", md: "0px" }}
|
|
44
|
+
className={`custom-balance-tooltip ${
|
|
45
|
+
hasSpecialArrow ? "special-inset" : ""
|
|
46
|
+
}`}
|
|
47
|
+
_focus={{
|
|
48
|
+
boxShadow: "none",
|
|
49
|
+
}}
|
|
50
|
+
>
|
|
51
|
+
<PopoverArrow bg={Colors.black300} />
|
|
52
|
+
<PopoverBody p={0}>
|
|
53
|
+
<Box color={Colors.white100}>
|
|
54
|
+
<Text
|
|
55
|
+
fontSize="22px"
|
|
56
|
+
fontFamily={"Degular"}
|
|
57
|
+
fontWeight={700}
|
|
58
|
+
lineHeight="32px"
|
|
59
|
+
letterSpacing={"-0.6px"}
|
|
60
|
+
>
|
|
61
|
+
{label}
|
|
62
|
+
</Text>
|
|
63
|
+
<Text
|
|
64
|
+
fontSize="16px"
|
|
65
|
+
fontFamily={"Degular"}
|
|
66
|
+
fontWeight={500}
|
|
67
|
+
lineHeight="24px"
|
|
68
|
+
letterSpacing={"-0.2px"}
|
|
69
|
+
mt="6px"
|
|
70
|
+
mb="20px"
|
|
71
|
+
>
|
|
72
|
+
{body}
|
|
73
|
+
</Text>
|
|
74
|
+
<Button
|
|
75
|
+
display={"flex"}
|
|
76
|
+
justifyContent={"center"}
|
|
77
|
+
alignItems={"center"}
|
|
78
|
+
bg={Colors.gray50}
|
|
79
|
+
color={Colors.black300}
|
|
80
|
+
px={"12px"}
|
|
81
|
+
py={"8px"}
|
|
82
|
+
borderRadius={"100px"}
|
|
83
|
+
fontFamily={"Degular"}
|
|
84
|
+
fontSize={"14px"}
|
|
85
|
+
fontWeight={600}
|
|
86
|
+
lineHeight={"16px"}
|
|
87
|
+
letterSpacing={"-0.4px"}
|
|
88
|
+
onClick={() => {
|
|
89
|
+
onClose();
|
|
90
|
+
}}
|
|
91
|
+
_hover={{
|
|
92
|
+
color: Colors.black300,
|
|
93
|
+
bg: Colors.gray50,
|
|
94
|
+
}}
|
|
95
|
+
w={"full"}
|
|
96
|
+
>
|
|
97
|
+
Okay
|
|
98
|
+
</Button>
|
|
99
|
+
</Box>
|
|
100
|
+
</PopoverBody>
|
|
101
|
+
</PopoverContent>
|
|
102
|
+
</>
|
|
103
|
+
)}
|
|
104
|
+
</Popover>
|
|
105
|
+
);
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
export default CickTooltip;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/** @format */
|
|
2
|
+
|
|
3
|
+
import { Tooltip as DefaultTooltip, TooltipProps } from "@chakra-ui/react";
|
|
4
|
+
import Colors from "components/styleGuide/Colors";
|
|
5
|
+
export interface ITooltip extends TooltipProps {
|
|
6
|
+
label: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const HoverTooltip = ({ label, children, placement, ...rest }: ITooltip) => {
|
|
10
|
+
return (
|
|
11
|
+
<DefaultTooltip
|
|
12
|
+
hasArrow
|
|
13
|
+
label={label}
|
|
14
|
+
placement={placement}
|
|
15
|
+
borderRadius={"10px"}
|
|
16
|
+
px={"12px"}
|
|
17
|
+
py={"9px"}
|
|
18
|
+
justifyContent="center"
|
|
19
|
+
alignItems="center"
|
|
20
|
+
display="flex"
|
|
21
|
+
fontFamily={"Degular"}
|
|
22
|
+
fontSize={"16px"}
|
|
23
|
+
fontWeight={600}
|
|
24
|
+
lineHeight="160%"
|
|
25
|
+
letterSpacing="-0.32px"
|
|
26
|
+
background={Colors.black300}
|
|
27
|
+
{...rest}
|
|
28
|
+
>
|
|
29
|
+
{children}
|
|
30
|
+
</DefaultTooltip>
|
|
31
|
+
);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export default HoverTooltip;
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/** @format */
|
|
2
|
+
|
|
3
|
+
import { Flex, Text, Box } from "@chakra-ui/react";
|
|
4
|
+
import { toast, ToastOptions, Slide, TypeOptions } from "react-toastify";
|
|
5
|
+
import Colors from "components/styleGuide/Colors";
|
|
6
|
+
import Button from "components/Button";
|
|
7
|
+
import IconButton from "components/Button/IconButton";
|
|
8
|
+
|
|
9
|
+
import {
|
|
10
|
+
CloseIcon,
|
|
11
|
+
ErrorFilledIcon,
|
|
12
|
+
WarningFilledIcon,
|
|
13
|
+
CheckCircleFilledIcon,
|
|
14
|
+
} from "icons";
|
|
15
|
+
|
|
16
|
+
interface SnackbarProps {
|
|
17
|
+
subtext?: string;
|
|
18
|
+
title: string;
|
|
19
|
+
type: TypeOptions;
|
|
20
|
+
showUndoButton?: boolean;
|
|
21
|
+
handleUndo?: () => void;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// eslint-disable-next-line no-shadow
|
|
25
|
+
export enum SnackbarType {
|
|
26
|
+
info = "info",
|
|
27
|
+
success = "success",
|
|
28
|
+
warning = "warning",
|
|
29
|
+
error = "error",
|
|
30
|
+
default = "default",
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const ToastUI: React.FC<SnackbarProps> = ({
|
|
34
|
+
title,
|
|
35
|
+
type,
|
|
36
|
+
subtext,
|
|
37
|
+
showUndoButton,
|
|
38
|
+
handleUndo,
|
|
39
|
+
}) => {
|
|
40
|
+
const stateIcon = {
|
|
41
|
+
[SnackbarType.success]: (
|
|
42
|
+
<CheckCircleFilledIcon fontSize={24} color={Colors.green600} />
|
|
43
|
+
),
|
|
44
|
+
[SnackbarType.warning]: (
|
|
45
|
+
<WarningFilledIcon fontSize={24} color={Colors.amber600} />
|
|
46
|
+
),
|
|
47
|
+
[SnackbarType.error]: (
|
|
48
|
+
<ErrorFilledIcon fontSize={24} color={Colors.red600} />
|
|
49
|
+
),
|
|
50
|
+
[SnackbarType.default]: "",
|
|
51
|
+
[SnackbarType.info]: "",
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
return (
|
|
55
|
+
<Flex
|
|
56
|
+
width={"546px"}
|
|
57
|
+
borderRadius="12px"
|
|
58
|
+
border={"1px solid"}
|
|
59
|
+
borderColor={
|
|
60
|
+
type === SnackbarType.default || type === SnackbarType.info
|
|
61
|
+
? Colors.gray50
|
|
62
|
+
: type === SnackbarType.error
|
|
63
|
+
? Colors.red100
|
|
64
|
+
: type === SnackbarType.warning
|
|
65
|
+
? Colors.amber100
|
|
66
|
+
: Colors.green100
|
|
67
|
+
}
|
|
68
|
+
bg={Colors.white100}
|
|
69
|
+
alignItems="center"
|
|
70
|
+
px={"14px"}
|
|
71
|
+
py={subtext && subtext !== "" ? "14px" : "8px"}
|
|
72
|
+
justifyContent="start"
|
|
73
|
+
gap={"10px"}
|
|
74
|
+
>
|
|
75
|
+
<Box>{stateIcon[type]}</Box>
|
|
76
|
+
<Flex flexDir="column" justifyContent="space-between" flex={1}>
|
|
77
|
+
<Text
|
|
78
|
+
color={Colors.black300}
|
|
79
|
+
fontSize={"16px"}
|
|
80
|
+
fontFamily={"Degular"}
|
|
81
|
+
fontWeight={600}
|
|
82
|
+
lineHeight={"24px"}
|
|
83
|
+
letterSpacing={"-0.4px"}
|
|
84
|
+
>
|
|
85
|
+
{title}
|
|
86
|
+
</Text>
|
|
87
|
+
<Text
|
|
88
|
+
color={Colors.gray400}
|
|
89
|
+
fontSize={"14px"}
|
|
90
|
+
fontFamily={"Degular"}
|
|
91
|
+
fontWeight={500}
|
|
92
|
+
lineHeight={"16px"}
|
|
93
|
+
letterSpacing={"-0.2px"}
|
|
94
|
+
>
|
|
95
|
+
{subtext}
|
|
96
|
+
</Text>
|
|
97
|
+
</Flex>
|
|
98
|
+
|
|
99
|
+
{showUndoButton && (
|
|
100
|
+
<Button label="Undo" variant="link" size="small" onClick={handleUndo} />
|
|
101
|
+
)}
|
|
102
|
+
<IconButton variant="link" size="small">
|
|
103
|
+
<CloseIcon fontSize={20} color={Colors.black300} />
|
|
104
|
+
</IconButton>
|
|
105
|
+
</Flex>
|
|
106
|
+
);
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
const toastOptions: ToastOptions = {
|
|
110
|
+
autoClose: 3000,
|
|
111
|
+
hideProgressBar: true,
|
|
112
|
+
closeOnClick: true,
|
|
113
|
+
pauseOnHover: false,
|
|
114
|
+
draggable: false,
|
|
115
|
+
progress: undefined,
|
|
116
|
+
transition: Slide,
|
|
117
|
+
rtl: false,
|
|
118
|
+
closeButton: false,
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
export default function customSnackbar(
|
|
122
|
+
title: string,
|
|
123
|
+
type: TypeOptions,
|
|
124
|
+
subtext?: string,
|
|
125
|
+
showUndoButton?: boolean,
|
|
126
|
+
handleUndo?: () => void
|
|
127
|
+
) {
|
|
128
|
+
toast(
|
|
129
|
+
<ToastUI
|
|
130
|
+
title={title}
|
|
131
|
+
type={type}
|
|
132
|
+
subtext={subtext}
|
|
133
|
+
showUndoButton={showUndoButton}
|
|
134
|
+
handleUndo={handleUndo}
|
|
135
|
+
/>,
|
|
136
|
+
toastOptions
|
|
137
|
+
);
|
|
138
|
+
}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
/** @format */
|
|
2
|
+
|
|
3
|
+
const Colors = {
|
|
4
|
+
amber900: "#332600",
|
|
5
|
+
amber800: "#664C00",
|
|
6
|
+
amber700: "#805F00",
|
|
7
|
+
amber600: "#997300",
|
|
8
|
+
amber500: "#C90",
|
|
9
|
+
amber400: "#FFBF00",
|
|
10
|
+
amber300: "#FFD24D",
|
|
11
|
+
amber200: "#FFDF80",
|
|
12
|
+
amber100: "#FFECB2",
|
|
13
|
+
amber50: "#FFF9E5",
|
|
14
|
+
black300: "#131316",
|
|
15
|
+
black200: "#1D1D1F",
|
|
16
|
+
black100: "#262628",
|
|
17
|
+
black50: "#363637",
|
|
18
|
+
blue900: "#00264D",
|
|
19
|
+
blue800: "#004080",
|
|
20
|
+
blue700: "#004D99",
|
|
21
|
+
blue600: "#005AB2",
|
|
22
|
+
blue500: "#0073E5",
|
|
23
|
+
blue400: "#0080FF",
|
|
24
|
+
blue300: "#4DA6FF",
|
|
25
|
+
blue200: "#80BFFF",
|
|
26
|
+
blue100: "#B2D9FF",
|
|
27
|
+
blue50: "#E5F2FF",
|
|
28
|
+
green900: "#031",
|
|
29
|
+
green800: "#062",
|
|
30
|
+
green700: "#00802B",
|
|
31
|
+
green600: "#00B23C",
|
|
32
|
+
green500: "#0C4",
|
|
33
|
+
green400: "#0F5",
|
|
34
|
+
green300: "#4DFF88",
|
|
35
|
+
green200: "#80FFAA",
|
|
36
|
+
green100: "#B2FFCC",
|
|
37
|
+
green50: "#E5FFEE",
|
|
38
|
+
gray500: "#31373D",
|
|
39
|
+
gray400: "#56616B",
|
|
40
|
+
gray300: "#888F95",
|
|
41
|
+
gray200: "#A6ABAF",
|
|
42
|
+
gray100: "#E6E9EF",
|
|
43
|
+
gray50: "#EFF1F6",
|
|
44
|
+
lime900: "#1D3300",
|
|
45
|
+
lime800: "#345C00",
|
|
46
|
+
lime700: "#488000",
|
|
47
|
+
lime600: "#65B200",
|
|
48
|
+
lime500: "#74CC00",
|
|
49
|
+
lime400: "#90FE00",
|
|
50
|
+
lime300: "#B5FF4D",
|
|
51
|
+
lime200: "#CAFF80",
|
|
52
|
+
lime100: "#DFFFB2",
|
|
53
|
+
lime50: "#F4FFE5",
|
|
54
|
+
magenta900: "#330028",
|
|
55
|
+
magenta800: "#570F43",
|
|
56
|
+
magenta700: "#851471",
|
|
57
|
+
magenta600: "#AC208C",
|
|
58
|
+
magenta500: "#C61F9F",
|
|
59
|
+
magenta400: "#FF00BF",
|
|
60
|
+
magenta300: "#FF4DD2",
|
|
61
|
+
magenta200: "#FF80DF",
|
|
62
|
+
magenta100: "#FFB2EC",
|
|
63
|
+
magenta50: "#FFE5F9",
|
|
64
|
+
orange900: "#331500",
|
|
65
|
+
orange800: "#662A00",
|
|
66
|
+
orange700: "#994000",
|
|
67
|
+
orange600: "#B24A00",
|
|
68
|
+
orange500: "#E55F00",
|
|
69
|
+
orange400: "#F73",
|
|
70
|
+
orange300: "#FF974D",
|
|
71
|
+
orange200: "#FFB480",
|
|
72
|
+
orange100: "#FFD2B2",
|
|
73
|
+
orange50: "#FFF0E5",
|
|
74
|
+
pink900: "#330015",
|
|
75
|
+
pink800: "#66002A",
|
|
76
|
+
pink700: "#800035",
|
|
77
|
+
pink600: "#B2004A",
|
|
78
|
+
pink500: "#C05",
|
|
79
|
+
pink400: "#FF006A",
|
|
80
|
+
pink300: "#FF4D97",
|
|
81
|
+
pink200: "#FF80B4",
|
|
82
|
+
pink100: "#FFB2D2",
|
|
83
|
+
pink50: "#FFE5F0",
|
|
84
|
+
purple900: "#150033",
|
|
85
|
+
purple800: "#20004D",
|
|
86
|
+
purple700: "#350080",
|
|
87
|
+
purple600: "#4A00B2",
|
|
88
|
+
purple500: "#50C",
|
|
89
|
+
purple400: "#6A00FF",
|
|
90
|
+
purple300: "#83F",
|
|
91
|
+
purple200: "#A666FF",
|
|
92
|
+
purple100: "#D2B2FF",
|
|
93
|
+
purple50: "#F0E5FF",
|
|
94
|
+
red900: "#33000F",
|
|
95
|
+
red800: "#4D0016",
|
|
96
|
+
red700: "#800025",
|
|
97
|
+
red600: "#99002C",
|
|
98
|
+
red500: "#CC003A",
|
|
99
|
+
red400: "#FF0049",
|
|
100
|
+
red300: "#FF6692",
|
|
101
|
+
red200: "#FFB2C8",
|
|
102
|
+
red100: "#FFCCDB",
|
|
103
|
+
red50: "#FFE5ED",
|
|
104
|
+
teal900: "#002A33",
|
|
105
|
+
teal800: "#056",
|
|
106
|
+
teal700: "#007F99",
|
|
107
|
+
teal600: "#0094B2",
|
|
108
|
+
teal500: "#0AC",
|
|
109
|
+
teal400: "#00D4FF",
|
|
110
|
+
teal300: "#4DE1FF",
|
|
111
|
+
teal200: "#80E9FF",
|
|
112
|
+
teal100: "#B2F2FF",
|
|
113
|
+
teal50: "#E5FBFF",
|
|
114
|
+
white100: "#FFF",
|
|
115
|
+
white50: "#FAFAFA",
|
|
116
|
+
yellow900: "#330",
|
|
117
|
+
yellow800: "#660",
|
|
118
|
+
yellow700: "#990",
|
|
119
|
+
yellow600: "#CC0",
|
|
120
|
+
yellow500: "#E5E500",
|
|
121
|
+
yellow400: "#FF0",
|
|
122
|
+
yellow300: "#FFE51F",
|
|
123
|
+
yellow200: "#FFFF80",
|
|
124
|
+
yellow100: "#FFFFB2",
|
|
125
|
+
yellow50: "#FFFFE5",
|
|
126
|
+
monochromeOrange: "linear-gradient(139deg, #FF974D 2.33%, #FF6A00 96.28%)",
|
|
127
|
+
monochromeSoftOrange:
|
|
128
|
+
"linear-gradient(139deg, #FFF0E5 2.33%, #FFB480 96.28%)",
|
|
129
|
+
monochromeLime: "linear-gradient(139deg, #B5FF4D 2.33%, #74CC00 96.28%)",
|
|
130
|
+
monochromeSoftLime: "linear-gradient(139deg, #F4FFE5 2.33%, #CAFF80 96.28%)",
|
|
131
|
+
monochromeGreen: "linear-gradient(139deg, #4DFF88 2.33%, #0C4 96.28%)",
|
|
132
|
+
monochromeSoftGreen: "linear-gradient(139deg, #E5FFEE 2.33%, #80FFAA 96.28%)",
|
|
133
|
+
monochromeTeal: "linear-gradient(139deg, #80E9FF 2.33%, #00D4FF 96.28%)",
|
|
134
|
+
monochromeSoftTeal: "linear-gradient(139deg, #E5FBFF 2.33%, #80E9FF 96.28%)",
|
|
135
|
+
monochromeRoyalBlue: "linear-gradient(139deg, #80BFFF 2.33%, #0080FF 96.28%)",
|
|
136
|
+
monochromeSoftRoyalBlue:
|
|
137
|
+
"linear-gradient(139deg, #E5F2FF 2.33%, #80BFFF 96.28%)",
|
|
138
|
+
monochromeLightBlue: "linear-gradient(139deg, #64CCED 2.33%, #0D92F2 96.28%)",
|
|
139
|
+
monochromePurple: "linear-gradient(139deg, #A666FF 2.33%, #6A00FF 96.28%)",
|
|
140
|
+
monochromeSoftPurple:
|
|
141
|
+
"linear-gradient(139deg, #F0E5FF 2.33%, #A666FF 96.28%)",
|
|
142
|
+
monochromeMagenta: "linear-gradient(139deg, #FF80DF 2.33%, #C61F9F 96.28%)",
|
|
143
|
+
monochromeSoftMagenta:
|
|
144
|
+
"linear-gradient(139deg, #FFE5F9 2.33%, #FF80DF 96.28%)",
|
|
145
|
+
monochromeRed: "linear-gradient(139deg, #FF6692 2.33%, #CC003A 96.28%)",
|
|
146
|
+
monochromeSoftRed: "linear-gradient(139deg, #FFE5ED 2.33%, #FFB2C8 96.28%)",
|
|
147
|
+
monochromeAmber: "linear-gradient(139deg, #FFDF80 2.33%, #FFBF00 96.28%)",
|
|
148
|
+
monochromeSoftAmber:
|
|
149
|
+
" linear-gradient(139deg, #FFFAD2 2.33%, #FFEE6A 96.28%)",
|
|
150
|
+
monochromeYellow: "linear-gradient(139deg, #FF0 2.33%, #CC0 96.28%)",
|
|
151
|
+
monochromeSoftYellow:
|
|
152
|
+
"linear-gradient(139deg, #FFFFE5 2.33%, #FFFF80 96.28%)",
|
|
153
|
+
monochromeWhite: "linear-gradient(139deg, #F6F7F9 2.33%, #DBDEE5 96.28%)",
|
|
154
|
+
monochromegray: "linear-gradient(139deg, #D7D9DB 2.33%, #808D99 96.28%)",
|
|
155
|
+
monochromeBlack: "linear-gradient(139deg, #5C6670 2.33%, #131316 96.28%)",
|
|
156
|
+
monochromeCyan: "linear-gradient(139deg, #99F3FF 2.33%, #00CCC0 96.28%)",
|
|
157
|
+
polychromeAmberRed: "linear-gradient(137deg, #FFBF00 0%, #FF0049 96.86%)",
|
|
158
|
+
polychromePurpleRed: "linear-gradient(137deg, #83F 0%, #FF0049 96.86%)",
|
|
159
|
+
polychromeBluePurple: "linear-gradient(137deg, #0080FF 0%, #A666FF 96.86%)",
|
|
160
|
+
polychromeTealPurple: "linear-gradient(137deg, #00D4FF 0%, #83F 96.86%)",
|
|
161
|
+
polychromeBlueMagenta: "linear-gradient(137deg, #266EF1 0%, #C61F9F 96.86%)",
|
|
162
|
+
polychromeOrangeMagenta: "linear-gradient(137deg, #F73 0%, #C61F9F 96.86%)",
|
|
163
|
+
polychromeOrangeMainMagenta:
|
|
164
|
+
"linear-gradient(137deg, #F73 36.56%, #C61F9F 96.86%)",
|
|
165
|
+
polychromeTealPinkPurple:
|
|
166
|
+
"linear-gradient(137deg, #4DE1FF 0%, #6A00FF 48.43%, #FF00BF 96.86%)",
|
|
167
|
+
polychromeAmberPinkPurple:
|
|
168
|
+
"linear-gradient(137deg, #FFD24D 0%, #FF006A 48.43%, #A666FF 96.86%)",
|
|
169
|
+
polychromeMagentaOrange: "linear-gradient(137deg, #FF00BF 0%, #F73 96.86%)",
|
|
170
|
+
polychromeLimeTeal: "linear-gradient(137deg, #00B23C 0%, #0AC 96.86%)",
|
|
171
|
+
polychromePinkOrange: "linear-gradient(137deg, #FF006A 0%, #FF974D 96.86%)",
|
|
172
|
+
polychromeTealDarkBlue: "linear-gradient(137deg, #4DE1FF 0%, #005AB2 96.86%)",
|
|
173
|
+
polychromeOrangePurple: "linear-gradient(137deg, #F5440C 0%, #8F00FF 96.86%)",
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
export default Colors;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/** @format */
|
|
2
|
+
|
|
3
|
+
import { ChangeEvent, useState } from "react";
|
|
4
|
+
|
|
5
|
+
interface UploadProps {
|
|
6
|
+
multiple?: boolean;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const useImageUpload = ({ multiple = false }: UploadProps) => {
|
|
10
|
+
const [coverImageIndex, setCoverImageIndex] = useState<number>(0);
|
|
11
|
+
const [fileArray, setFileArray] = useState<File[]>([]);
|
|
12
|
+
const [imageArray, setImageArray] = useState<string[]>([]);
|
|
13
|
+
|
|
14
|
+
const handleChange = (e: ChangeEvent<HTMLInputElement>) => {
|
|
15
|
+
e.preventDefault();
|
|
16
|
+
if (e.target.files) {
|
|
17
|
+
if (multiple) {
|
|
18
|
+
const imageFiles = e.target.files;
|
|
19
|
+
const selectedFiles = Array.from(imageFiles);
|
|
20
|
+
|
|
21
|
+
if (selectedFiles.length + imageArray.length > 5) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
setFileArray([...fileArray, ...selectedFiles]);
|
|
26
|
+
const imgArr: string[] = [];
|
|
27
|
+
|
|
28
|
+
selectedFiles.forEach((item) => {
|
|
29
|
+
const imageFile = item;
|
|
30
|
+
const reader = new FileReader();
|
|
31
|
+
|
|
32
|
+
reader.onloadend = () => {
|
|
33
|
+
imgArr.push(reader.result as string);
|
|
34
|
+
setImageArray([...imageArray, ...imgArr]);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
reader.readAsDataURL(imageFile);
|
|
38
|
+
});
|
|
39
|
+
} else {
|
|
40
|
+
const imageFile = e.target.files;
|
|
41
|
+
const selectedFile = Array.from(imageFile);
|
|
42
|
+
setFileArray(selectedFile);
|
|
43
|
+
|
|
44
|
+
const image = selectedFile[0];
|
|
45
|
+
const reader = new FileReader();
|
|
46
|
+
|
|
47
|
+
reader.onloadend = () => {
|
|
48
|
+
setImageArray([reader.result as string]);
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
reader.readAsDataURL(image);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
const handleDelete = (id: number) => {
|
|
57
|
+
if (multiple) {
|
|
58
|
+
imageArray.splice(id, 1);
|
|
59
|
+
setImageArray([...imageArray]);
|
|
60
|
+
} else setImageArray([]);
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
const changeCoverImage = (id: number) => {
|
|
64
|
+
setCoverImageIndex(id);
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
return {
|
|
68
|
+
coverImageIndex,
|
|
69
|
+
setCoverImageIndex,
|
|
70
|
+
fileArray,
|
|
71
|
+
setFileArray,
|
|
72
|
+
imageArray,
|
|
73
|
+
setImageArray,
|
|
74
|
+
handleChange,
|
|
75
|
+
handleDelete,
|
|
76
|
+
changeCoverImage,
|
|
77
|
+
};
|
|
78
|
+
};
|