frst-components 0.36.9 → 0.38.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/README.md +52 -52
- package/dist/esm/index.js +154 -0
- package/dist/esm/node_modules/style-inject/dist/style-inject.es.js +28 -0
- package/dist/esm/public/customIcons/CircledAlert.js +7 -0
- package/dist/esm/public/customIcons/CircledCheck.js +7 -0
- package/dist/esm/public/customIcons/DefaultProfile.js +7 -0
- package/dist/esm/public/customIcons/ExcludeVoteIcon.js +7 -0
- package/dist/esm/public/customIcons/LanguageIcon.js +7 -0
- package/dist/esm/public/customIcons/SmallTrash.js +7 -0
- package/dist/esm/public/customIcons/SwitchVoteIcon.js +7 -0
- package/dist/esm/public/customIcons/TagAlert.js +7 -0
- package/dist/esm/public/customIcons/VoteCurrentIcon.js +7 -0
- package/dist/esm/public/customIcons/VoteIcon.js +7 -0
- package/dist/esm/public/customIcons/WarningIcon.js +7 -0
- package/dist/esm/public/customIcons/newVoteIcon.js +7 -0
- package/dist/esm/public/img/Nonotification.png.js +3 -0
- package/dist/esm/public/img/TargetIcon.png.js +3 -0
- package/dist/esm/src/components/DS/CardJourney/index.js +12 -0
- package/dist/esm/src/components/DS/CardJourney/style.js +123 -0
- package/dist/esm/src/components/DS/ConfirmationModal/ComfirmModalDownload/ComfirmModalDownload.js +20 -0
- package/dist/esm/src/components/DS/ConfirmationModal/ConfirmationModal.js +10 -0
- package/dist/esm/src/components/DS/ConfirmationModal/styles.js +56 -0
- package/dist/esm/src/components/DS/LightTooltip/index.js +24 -0
- package/dist/esm/src/components/DS/admButton/admButton.styles.js +52 -0
- package/dist/esm/src/components/DS/admButton/index.js +17 -0
- package/dist/esm/src/components/DS/cardPeople/cardPeople.styles.js +71 -0
- package/dist/esm/src/components/DS/cardPeople/index.js +63 -0
- package/dist/esm/src/components/DS/cardUser/cardUser.styles.js +70 -0
- package/dist/esm/src/components/DS/cardUser/index.js +14 -0
- package/dist/esm/src/components/DS/dropdown-Multiselect/index.js +186 -0
- package/dist/esm/src/components/DS/dropdown-Multiselect/styles/multiselectStyles.js +214 -0
- package/dist/esm/src/components/DS/dropdown-Multiselect/styles/primereact.css.js +6 -0
- package/dist/esm/src/components/DS/dropdown-Multiselect/styles/stylesMulti.css.js +6 -0
- package/dist/esm/src/components/DS/groups-table/groupTableStyles.js +95 -0
- package/dist/esm/src/components/DS/groups-table/index.js +113 -0
- package/dist/esm/src/components/DS/hypotesisAndImpediment/UpDownButtons/index.js +8 -0
- package/dist/esm/src/components/DS/hypotesisAndImpediment/UpDownButtons/upDownButtons.styles.js +43 -0
- package/dist/esm/src/components/DS/hypotesisAndImpediment/Voting/index.js +40 -0
- package/dist/esm/src/components/DS/hypotesisAndImpediment/Voting/voting.styles.js +126 -0
- package/dist/esm/src/components/DS/hypotesisAndImpediment/hypothesisAndImpediment.style.js +115 -0
- package/dist/esm/src/components/DS/hypotesisAndImpediment/index.js +161 -0
- package/dist/esm/src/components/DS/impedimentosTab/addImpedimentoModal/index.js +35 -0
- package/dist/esm/src/components/DS/impedimentosTab/addImpedimentoModal/styles.js +14 -0
- package/dist/esm/src/components/DS/impedimentosTab/dropDown/index.js +20 -0
- package/dist/esm/src/components/DS/impedimentosTab/dropDown/styles.js +38 -0
- package/dist/esm/src/components/DS/impedimentosTab/index.js +180 -0
- package/dist/esm/src/components/DS/impedimentosTab/styles.js +178 -0
- package/dist/esm/src/components/DS/loading/index.js +45 -0
- package/dist/esm/src/components/DS/loading/loadingStyle.js +39 -0
- package/dist/esm/src/components/DS/modal/index.js +55 -0
- package/dist/esm/src/components/DS/modal/styles.js +86 -0
- package/dist/esm/src/components/DS/newCards/articles/index.js +12 -0
- package/dist/esm/src/components/DS/newCards/articles/styles.js +92 -0
- package/dist/esm/src/components/DS/newCards/challenge/index.js +82 -0
- package/dist/esm/src/components/DS/newCards/challenge/styles.js +198 -0
- package/dist/esm/src/components/DS/newCards/channels/index.js +10 -0
- package/dist/esm/src/components/DS/newCards/channels/styles.js +46 -0
- package/dist/esm/src/components/DS/newCards/content/index.js +16 -0
- package/dist/esm/src/components/DS/newCards/content/styles.js +103 -0
- package/dist/esm/src/components/DS/newCards/mentoring/index.js +38 -0
- package/dist/esm/src/components/DS/newCards/mentoring/styles.js +37 -0
- package/dist/esm/src/components/DS/newCards/people/index.js +120 -0
- package/dist/esm/src/components/DS/newCards/people/styles.js +75 -0
- package/dist/esm/src/components/DS/newCards/trail/index.js +10 -0
- package/dist/esm/src/components/DS/newCards/trail/styles.js +60 -0
- package/dist/esm/src/components/DS/onboarding-progress-menu/index.js +56 -0
- package/dist/esm/src/components/DS/onboarding-progress-menu/onboardingProgressMenuStyles.js +98 -0
- package/dist/esm/src/components/DS/progressGoalBar/index.js +29 -0
- package/dist/esm/src/components/DS/progressGoalBar/progressGoalBarStyles.js +183 -0
- package/dist/esm/src/components/DS/progressGoalBar/progressTexts.js +17 -0
- package/dist/esm/src/components/DS/progressGoalBar/useProgressGoalBar.js +232 -0
- package/dist/esm/src/components/DS/resourceInfoDrop/index.js +53 -0
- package/dist/esm/src/components/DS/resourceInfoDrop/styles.js +142 -0
- package/dist/esm/src/components/DS/resultFilterTabs/dropDownResult/index.js +20 -0
- package/dist/esm/src/components/DS/resultFilterTabs/dropDownResult/styles.js +38 -0
- package/dist/esm/src/components/DS/resultFilterTabs/index.js +162 -0
- package/dist/esm/src/components/DS/resultFilterTabs/resultFilterTabsStyles.js +167 -0
- package/dist/esm/src/components/DS/resultFilterTabs/rsuite.min.css.js +6 -0
- package/dist/esm/src/components/DS/scroll-container-v2/ButtonControl/buttonControlStyles.js +65 -0
- package/dist/esm/src/components/DS/scroll-container-v2/ButtonControl/index.js +19 -0
- package/dist/esm/src/components/DS/scroll-container-v2/ButtonControl/useLongPress.js +26 -0
- package/dist/esm/src/components/DS/scroll-container-v2/index.js +29 -0
- package/dist/esm/src/components/DS/scroll-container-v2/scrollContainerStyles.js +51 -0
- package/dist/esm/src/components/DS/scroll-container-v2/useScroll.js +85 -0
- package/dist/esm/src/components/DS/select/Select.js +50 -0
- package/dist/esm/src/components/DS/select/SelectContext.js +6 -0
- package/dist/esm/src/components/DS/select/SelectItem.js +46 -0
- package/dist/esm/src/components/DS/select/index.js +9 -0
- package/dist/esm/src/components/DS/select/styles/StylesSelect.js +107 -0
- package/dist/esm/src/components/DS/steps-progress/index.js +27 -0
- package/dist/esm/src/components/DS/steps-progress/stepsProgressStyles.js +85 -0
- package/dist/esm/src/components/DS/toast/index.js +35 -0
- package/dist/esm/src/components/DS/toast/toast.styles.js +68 -0
- package/dist/esm/src/components/DS/toast-v2/index.js +76 -0
- package/dist/esm/src/components/DS/toast-v2/toast-v2.styles.js +18 -0
- package/dist/esm/src/components/DS/tooltip/index.js +98 -0
- package/dist/esm/src/components/DS/tooltip/styles.js +146 -0
- package/dist/esm/src/components/EBR/buttons-group/index.js +17 -0
- package/dist/esm/src/components/EBR/buttons-group/styles.js +9 -0
- package/dist/esm/src/components/EBR/group-statistics/groupStatisticsStyles.js +56 -0
- package/dist/esm/src/components/EBR/group-statistics/index.js +61 -0
- package/dist/esm/src/components/EBR/objective-step/index.js +8 -0
- package/dist/esm/src/components/EBR/objective-step/objectiveStepStyles.js +36 -0
- package/dist/esm/src/components/EBR/rating/index.js +78 -0
- package/dist/esm/src/components/EBR/rating/ratingStyles.js +25 -0
- package/dist/esm/src/components/EBR/specialist-contact/index.js +11 -0
- package/dist/esm/src/components/EBR/specialist-contact/specialistContactStyles.js +91 -0
- package/dist/esm/src/components/EBR/stepper/stepper.js +8 -0
- package/dist/esm/src/components/EBR/stepper/stepperItem.js +13 -0
- package/dist/esm/src/components/EBR/stepper/styles.js +137 -0
- package/dist/esm/src/components/EBR/trail-list/index.js +57 -0
- package/dist/esm/src/components/EBR/trail-list/trailListStyles.js +51 -0
- package/dist/esm/src/components/FI/ThreadComments/index.js +45 -0
- package/dist/esm/src/components/FI/ThreadComments/threadComments.styles.js +51 -0
- package/dist/esm/src/components/FI/ThreadComments/utilitiesComponents/commentaryBoxReply/index.js +20 -0
- package/dist/esm/src/components/FI/ThreadComments/utilitiesComponents/inputReply/index.js +67 -0
- package/dist/esm/src/components/FI/ThreadComments/utilitiesComponents/inputReply/inputReply.styles.js +39 -0
- package/dist/esm/src/components/FI/bannerProblemFeed/bannerProblemFeedStyles.js +156 -0
- package/dist/esm/src/components/FI/bannerProblemFeed/index.js +161 -0
- package/dist/esm/src/components/FI/bannerSRG/bannerSRGStyle.js +217 -0
- package/dist/esm/src/components/FI/bannerSRG/index.js +15 -0
- package/dist/esm/src/components/FI/feedInteraction/feedInteractionStyles.js +137 -0
- package/dist/esm/src/components/FI/feedInteraction/index.js +88 -0
- package/dist/esm/src/components/FI/feedInteractionV2/feedInteractionStyles.js +52 -0
- package/dist/esm/src/components/FI/feedInteractionV2/index.js +22 -0
- package/dist/esm/src/components/FI/feedInteractionV3/feedInteractionV3Styles.js +49 -0
- package/dist/esm/src/components/FI/feedInteractionV3/index.js +29 -0
- package/dist/esm/src/components/FI/inputCommentPost-it/index.js +118 -0
- package/dist/esm/src/components/FI/inputCommentPost-it/inputCommentPost-It.utils.js +20 -0
- package/dist/esm/src/components/FI/inputCommentPost-it/inputCommentPost-ItStyles.js +190 -0
- package/dist/esm/src/components/FI/interactionsModal/InteractionsModalStyles.js +152 -0
- package/dist/esm/src/components/FI/interactionsModal/index.js +43 -0
- package/dist/esm/src/components/FI/modal-invite/index.js +146 -0
- package/dist/esm/src/components/FI/modal-invite/modalInviteStyles.js +115 -0
- package/dist/esm/src/components/FI/notificationCard/index.js +41 -0
- package/dist/esm/src/components/FI/notificationCard/notificationCardStyles.js +84 -0
- package/dist/esm/src/components/FI/notificationPopOver/index.js +59 -0
- package/dist/esm/src/components/FI/notificationPopOver/notificationPopOverStyles.js +112 -0
- package/dist/esm/src/components/FI/postFeed/index.js +53 -0
- package/dist/esm/src/components/FI/postFeed/postFeedStyles.js +181 -0
- package/dist/esm/src/components/FI/searchBox/SearchBoxStyles.js +23 -0
- package/dist/esm/src/components/FI/searchBox/index.js +11 -0
- package/dist/esm/src/components/FI/sessionFilters/index.js +72 -0
- package/dist/esm/src/components/FI/sessionFilters/sessionFiltersStyle.js +80 -0
- package/dist/esm/src/components/FI/smallSRGBanner/frstFundo.png.js +3 -0
- package/dist/esm/src/components/FI/smallSRGBanner/g12.png.js +3 -0
- package/dist/esm/src/components/FI/smallSRGBanner/index.js +12 -0
- package/dist/esm/src/components/FI/smallSRGBanner/smallSRGBannerStyles.js +61 -0
- package/dist/esm/src/components/IJ/ContentCycle/ContentCycleStyles.js +146 -0
- package/dist/esm/src/components/IJ/ContentCycle/index.js +21 -0
- package/dist/esm/src/components/IJ/ListContentCycle/ListContentCycleStyles.js +12 -0
- package/dist/esm/src/components/IJ/ListContentCycle/index.js +11 -0
- package/dist/esm/src/components/IJ/StepLearningCycle/StepLearningCycleStyle.js +94 -0
- package/dist/esm/src/components/IJ/StepLearningCycle/index.js +117 -0
- package/dist/esm/src/components/IJ/favorite/favoriteStyles.js +17 -0
- package/dist/esm/src/components/IJ/favorite/index.js +36 -0
- package/dist/esm/src/components/IJ/learningCycleCard/components/menu/index.js +49 -0
- package/dist/esm/src/components/IJ/learningCycleCard/components/menu/menuStyle.js +28 -0
- package/dist/esm/src/components/IJ/learningCycleCard/index.js +36 -0
- package/dist/esm/src/components/IJ/learningCycleCard/learningCycleCardStyle.js +153 -0
- package/dist/esm/src/components/IJ/listSelector/index.js +39 -0
- package/dist/esm/src/components/IJ/listSelector/listSelectorStyles.js +46 -0
- package/dist/esm/src/components/IJ/pagination/index.js +82 -0
- package/dist/esm/src/components/IJ/pagination/paginationStyles.js +59 -0
- package/dist/esm/src/components/IJ/participantCard/index.js +37 -0
- package/dist/esm/src/components/IJ/participantCard/participantCardStyle.js +273 -0
- package/dist/esm/src/components/IJ/participantCardOld/index.js +58 -0
- package/dist/esm/src/components/IJ/participantCardOld/participantCardStyle.js +293 -0
- package/dist/esm/src/components/IJ/thumbListContent/index.js +28 -0
- package/dist/esm/src/components/IJ/thumbListContent/thumbListContentStyles.js +250 -0
- package/dist/esm/src/components/IncrementarIdeia/icrementarIdeiaStyles.js +115 -0
- package/dist/esm/src/components/IncrementarIdeia/index.js +98 -0
- package/dist/esm/src/components/IncrementarIdeia/useAutosizeTextArea.js +13 -0
- package/dist/esm/src/components/LXP/AccordionList/AccordionList.styles.js +101 -0
- package/dist/esm/src/components/LXP/AccordionList/index.js +26 -0
- package/dist/esm/src/components/LXP/accordionTrack/accordionTrack.js +179 -0
- package/dist/esm/src/components/LXP/accordionTrack/accordionTrackList.js +187 -0
- package/dist/esm/src/components/LXP/accordionTrack/accordionTrackStyle.js +194 -0
- package/dist/esm/src/components/LXP/accordionTrack/contentCourses.js +8 -0
- package/dist/esm/src/components/LXP/accordionTrack/contentCoursesTrails.js +189 -0
- package/dist/esm/src/components/LXP/accordionTrack/vectorDown.js +13 -0
- package/dist/esm/src/components/LXP/accordionTrack/vectorUp.js +13 -0
- package/dist/esm/src/components/LXP/avatarAssociatedChannel/avatarAssociatedChannelStyles.js +83 -0
- package/dist/esm/src/components/LXP/avatarAssociatedChannel/index.js +11 -0
- package/dist/esm/src/components/LXP/avatarChannel/avatarChannelStyles.js +106 -0
- package/dist/esm/src/components/LXP/avatarChannel/index.js +32 -0
- package/dist/esm/src/components/LXP/bannerLxp/bannerLxp.js +150 -0
- package/dist/esm/src/components/LXP/bannerLxp/index.js +124 -0
- package/dist/esm/src/components/LXP/buttonContent/buttonContentStyle.js +63 -0
- package/dist/esm/src/components/LXP/buttonContent/index.js +11 -0
- package/dist/esm/src/components/LXP/calendarLxp/calendar.css.js +6 -0
- package/dist/esm/src/components/LXP/calendarLxp/calendarLxp.module.css.js +7 -0
- package/dist/esm/src/components/LXP/calendarLxp/defaultRanges.js +79 -0
- package/dist/esm/src/components/LXP/calendarLxp/index.js +26 -0
- package/dist/esm/src/components/LXP/colorpicker/colorpickerStyles.js +43 -0
- package/dist/esm/src/components/LXP/colorpicker/index.js +20 -0
- package/dist/esm/src/components/LXP/contentSwitcher/contentSwitcherStyle.js +94 -0
- package/dist/esm/src/components/LXP/contentSwitcher/index.js +10 -0
- package/dist/esm/src/components/LXP/contentThumbnails/contentThumbnailsStyle.js +184 -0
- package/dist/esm/src/components/LXP/contentThumbnails/index.js +77 -0
- package/dist/esm/src/components/LXP/contentThumbnails/vectorDown.js +13 -0
- package/dist/esm/src/components/LXP/contentThumbnails/vectorUp.js +13 -0
- package/dist/esm/src/components/LXP/fileUpload/fileUploadStyles.js +88 -0
- package/dist/esm/src/components/LXP/fileUpload/index.js +21 -0
- package/dist/esm/src/components/LXP/headerContent/headerContent.js +218 -0
- package/dist/esm/src/components/LXP/headerContent/index.js +45 -0
- package/dist/esm/src/components/LXP/login/index.js +157 -0
- package/dist/esm/src/components/LXP/login/loginStyle.js +271 -0
- package/dist/esm/src/components/LXP/manageLerningCicles/index.js +40 -0
- package/dist/esm/src/components/LXP/manageLerningCicles/manageLearningCicles.Style.js +84 -0
- package/dist/esm/src/components/LXP/modalNewFeatures/ModalNewFeatures.style.js +204 -0
- package/dist/esm/src/components/LXP/modalNewFeatures/index.js +41 -0
- package/dist/esm/src/components/LXP/participantThumbnails/index.js +20 -0
- package/dist/esm/src/components/LXP/participantThumbnails/participantThumbnails.js +94 -0
- package/dist/esm/src/components/LXP/participantThumbnailsList/index.js +35 -0
- package/dist/esm/src/components/LXP/popOver/index.js +68 -0
- package/dist/esm/src/components/LXP/popOver/popOverStyle.js +130 -0
- package/dist/esm/src/components/LXP/popOverLXP-antigo/index.js +23 -0
- package/dist/esm/src/components/LXP/popOverLXP-antigo/popOverLXPStyles.js +123 -0
- package/dist/esm/src/components/LXP/progressBar/index.js +11 -0
- package/dist/esm/src/components/LXP/progressBar/progressStyle.js +32 -0
- package/dist/esm/src/components/LXP/searchResults/index.js +15 -0
- package/dist/esm/src/components/LXP/searchResults/searchResultsStyles.js +63 -0
- package/dist/esm/src/components/LXP/selectLXP/SelectLXP.js +128 -0
- package/dist/esm/src/components/LXP/selectLXP/SelectLXPContext.js +6 -0
- package/dist/esm/src/components/LXP/selectLXP/SelectLXPItem.js +40 -0
- package/dist/esm/src/components/LXP/selectLXP/index.js +9 -0
- package/dist/esm/src/components/LXP/star-metric/index.js +13 -0
- package/dist/esm/src/components/LXP/star-metric/starMetricStyles.js +13 -0
- package/dist/esm/src/components/LXP/thumbnails/headerVectorElipses.js +13 -0
- package/dist/esm/src/components/LXP/thumbnails/loadingThumbnails.js +9 -0
- package/dist/esm/src/components/LXP/thumbnails/thumbnails.js +119 -0
- package/dist/esm/src/components/LXP/thumbnails/thumbnailsDraggable.js +13 -0
- package/dist/esm/src/components/LXP/thumbnails/thumbnailsStyle.js +188 -0
- package/dist/esm/src/components/LXP/thumbnails/vectorCross.js +13 -0
- package/dist/esm/src/components/LXP/thumbnails/vectorEllipse.js +13 -0
- package/dist/esm/src/components/LXP/tooltip/index.js +11 -0
- package/dist/esm/src/components/LXP/tooltip/tooltipStyle.js +131 -0
- package/dist/esm/src/components/LXP/video/index.js +10 -0
- package/dist/esm/src/components/LogoFRST/index.js +13 -0
- package/dist/esm/src/components/LogoFRST/logoFRST.module.css.js +7 -0
- package/dist/esm/src/components/ModalConfirme/index.js +10 -0
- package/dist/esm/src/components/ModalConfirme/styles.js +51 -0
- package/dist/esm/src/components/accordion-tabs/accordionTabsStyles.js +100 -0
- package/dist/esm/src/components/accordion-tabs/index.js +34 -0
- package/dist/esm/src/components/actioExperience/actioExperience.styles.js +163 -0
- package/dist/esm/src/components/actioExperience/icons.js +19 -0
- package/dist/esm/src/components/actioExperience/index.js +20 -0
- package/dist/esm/src/components/audio-player/audioPlayerStyles.js +329 -0
- package/dist/esm/src/components/audio-player/index.js +110 -0
- package/dist/esm/src/components/avatar/avatarStyles.js +24 -0
- package/dist/esm/src/components/avatar/index.js +17 -0
- package/dist/esm/src/components/brainstorming-votar/index.js +10 -0
- package/dist/esm/src/components/brainstorming-votar/votarStyles.js +85 -0
- package/dist/esm/src/components/buttons/buttonStyle.js +389 -0
- package/dist/esm/src/components/buttons/index.js +31 -0
- package/dist/esm/src/components/calendar/calendarStyle.js +185 -0
- package/dist/esm/src/components/calendar/index.js +60 -0
- package/dist/esm/src/components/card-trail/cardTrailStyle.js +29 -0
- package/dist/esm/src/components/card-trail/index.js +50 -0
- package/dist/esm/src/components/card-trail/moduleStyle.js +92 -0
- package/dist/esm/src/components/card-trail-carousel/index.js +15 -0
- package/dist/esm/src/components/cardLT/AvatarWithInfo/avatarWithInfo.module.css.js +7 -0
- package/dist/esm/src/components/cardLT/AvatarWithInfo/index.js +16 -0
- package/dist/esm/src/components/cardLT/AvatarWithInfo/vector.js +13 -0
- package/dist/esm/src/components/cardLT/BannerProblem/BannerProblem.module.css.js +7 -0
- package/dist/esm/src/components/cardLT/BannerProblem/index.js +312 -0
- package/dist/esm/src/components/cardLT/BannerProblem/styles.js +30 -0
- package/dist/esm/src/components/cardLT/MessageBox/MessageBox.module.css.js +7 -0
- package/dist/esm/src/components/cardLT/MessageBox/icons/errorIcon.js +13 -0
- package/dist/esm/src/components/cardLT/MessageBox/icons/successIcon.js +13 -0
- package/dist/esm/src/components/cardLT/MessageBox/icons/warningIcon.js +13 -0
- package/dist/esm/src/components/cardLT/MessageBox/index.js +59 -0
- package/dist/esm/src/components/cardLT/Rating/Rating.module.css.js +7 -0
- package/dist/esm/src/components/cardLT/Rating/index.js +26 -0
- package/dist/esm/src/components/cardLT/Rating/starIcon.js +13 -0
- package/dist/esm/src/components/cardLT/RatingCurtidas/RatingCurtidas.module.css.js +7 -0
- package/dist/esm/src/components/cardLT/RatingCurtidas/index.js +15 -0
- package/dist/esm/src/components/cardLT/RocketButton/RocketButtonIcon.js +13 -0
- package/dist/esm/src/components/cardLT/RocketButton/index.js +26 -0
- package/dist/esm/src/components/cardLT/StepsMission/Planet.module.css.js +7 -0
- package/dist/esm/src/components/cardLT/StepsMission/StepMission.js +108 -0
- package/dist/esm/src/components/cardLT/StepsMission/Steps.js +68 -0
- package/dist/esm/src/components/cardLT/TextIcon/TextIcon.module.css.js +7 -0
- package/dist/esm/src/components/cardLT/TextIcon/index.js +14 -0
- package/dist/esm/src/components/cards/base/index.js +8 -0
- package/dist/esm/src/components/cards/cardDefinicaoFase/cardDefinicaoFase.module.css.js +7 -0
- package/dist/esm/src/components/cards/cardDefinicaoFase/index.js +30 -0
- package/dist/esm/src/components/cards/cardFaseDesafios/index.js +30 -0
- package/dist/esm/src/components/cards/cardFaseDesafios/styles.js +160 -0
- package/dist/esm/src/components/cards/cardProblem/cardProblem.module.css.js +7 -0
- package/dist/esm/src/components/cards/cardProblem/index.js +144 -0
- package/dist/esm/src/components/cards/cardProblemGestor/cardProblemaGestor.module.css.js +7 -0
- package/dist/esm/src/components/cards/cardProblemGestor/index.js +26 -0
- package/dist/esm/src/components/cards/cardResultConquista/Icons/Aprendizado.png.js +3 -0
- package/dist/esm/src/components/cards/cardResultConquista/Icons/AprendizadoPressed.png.js +3 -0
- package/dist/esm/src/components/cards/cardResultConquista/Icons/Conquista.png.js +3 -0
- package/dist/esm/src/components/cards/cardResultConquista/Icons/ConquistaPressed.png.js +3 -0
- package/dist/esm/src/components/cards/cardResultConquista/cardResultConquista.module.css.js +7 -0
- package/dist/esm/src/components/cards/cardResultConquista/index.js +40 -0
- package/dist/esm/src/components/cards/user/index.js +85 -0
- package/dist/esm/src/components/challenge-cards/challengeCardStyles.js +246 -0
- package/dist/esm/src/components/challenge-cards/dropdownMenuStyle.js +85 -0
- package/dist/esm/src/components/challenge-cards/index.js +174 -0
- package/dist/esm/src/components/checkmark/checkmarkStyles.js +24 -0
- package/dist/esm/src/components/checkmark/index.js +32 -0
- package/dist/esm/src/components/comment-post/commentPostStyles.js +23 -0
- package/dist/esm/src/components/comment-post/index.js +16 -0
- package/dist/esm/src/components/commentary-box/commentaryBox.utils.js +24 -0
- package/dist/esm/src/components/commentary-box/commentaryBoxStyles.js +240 -0
- package/dist/esm/src/components/commentary-box/index.js +104 -0
- package/dist/esm/src/components/commentaryBoxV2/CommentaryBoxV2.styles.js +282 -0
- package/dist/esm/src/components/commentaryBoxV2/index.js +157 -0
- package/dist/esm/src/components/commentaryBoxV2/utilitiesComponents/inputEdit/index.js +45 -0
- package/dist/esm/src/components/commentaryBoxV2/utilitiesComponents/inputEdit/inputEdit.styles.js +54 -0
- package/dist/esm/src/components/conquistaCarrossel/index.js +26 -0
- package/dist/esm/src/components/counter-like/counterLikeStyles.js +26 -0
- package/dist/esm/src/components/counter-like/index.js +28 -0
- package/dist/esm/src/components/criar-ideia/criarIdeiaStyles.js +144 -0
- package/dist/esm/src/components/criar-ideia/index.js +58 -0
- package/dist/esm/src/components/criar-ideia/useAutosizeTextArea.js +13 -0
- package/dist/esm/src/components/demo/stepController/StepControllerStyle.js +47 -0
- package/dist/esm/src/components/demo/stepController/index.js +12 -0
- package/dist/esm/src/components/dropdown-profile-menu/dropdownProfileMenuStyle.js +162 -0
- package/dist/esm/src/components/dropdown-profile-menu/index.js +84 -0
- package/dist/esm/src/components/emoji-picker/emojiPickerStyles.js +61 -0
- package/dist/esm/src/components/emoji-picker/index.js +87 -0
- package/dist/esm/src/components/exclusive-class/exclusiveClassStyles.js +32 -0
- package/dist/esm/src/components/exclusive-class/index.js +13 -0
- package/dist/esm/src/components/expand-button/expandButtonStyle.js +47 -0
- package/dist/esm/src/components/expand-button/index.js +23 -0
- package/dist/esm/src/components/field-search-dropdown/fieldSearchStyle.js +139 -0
- package/dist/esm/src/components/field-search-dropdown/index.js +105 -0
- package/dist/esm/src/components/filter-accordion-checkbox/filterAccordionCheckbox.utils.js +7 -0
- package/dist/esm/src/components/filter-accordion-checkbox/index.js +135 -0
- package/dist/esm/src/components/filtro-galeria-desafio/index.js +59 -0
- package/dist/esm/src/components/filtro-galeria-desafio/styles/MultiSelectDemo.js +245 -0
- package/dist/esm/src/components/filtro-galeria-desafio/styles/icons/arrowCarrosselDown.png.js +3 -0
- package/dist/esm/src/components/filtro-galeria-desafio/styles/icons/arrow_carrossel_down.png.js +3 -0
- package/dist/esm/src/components/filtro-galeria-desafio/styles/primeflex.css.js +6 -0
- package/dist/esm/src/components/filtro-galeria-desafio/styles/primereact.css.js +6 -0
- package/dist/esm/src/components/filtro-galeria-desafio/styles/theme.css.js +6 -0
- package/dist/esm/src/components/form-elements/checkbox/checkboxStyle.js +36 -0
- package/dist/esm/src/components/form-elements/checkbox/index.js +16 -0
- package/dist/esm/src/components/form-elements/helperTextBox/helperTextBox.js +9 -0
- package/dist/esm/src/components/form-elements/helperTextBox/styles.js +20 -0
- package/dist/esm/src/components/form-elements/table/index.js +37 -0
- package/dist/esm/src/components/form-elements/table/parts/TableBody/index.js +22 -0
- package/dist/esm/src/components/form-elements/table/parts/TableBody/tableStyle.js +50 -0
- package/dist/esm/src/components/form-elements/table/parts/TableHead/index.js +11 -0
- package/dist/esm/src/components/form-elements/table/parts/TableHead/tableStyle.js +24 -0
- package/dist/esm/src/components/form-elements/table/tableStyle.js +49 -0
- package/dist/esm/src/components/form-elements/table-actions/index.js +82 -0
- package/dist/esm/src/components/form-elements/table-actions/parts/CollaboratorAvatar/collaboratorAvatarStyle.js +12 -0
- package/dist/esm/src/components/form-elements/table-actions/parts/CollaboratorAvatar/index.js +23 -0
- package/dist/esm/src/components/form-elements/table-actions/parts/DateLimit/dateLimitStyle.js +28 -0
- package/dist/esm/src/components/form-elements/table-actions/parts/DateLimit/index.js +8 -0
- package/dist/esm/src/components/form-elements/table-actions/parts/EmptyState/emptyStateStyle.js +57 -0
- package/dist/esm/src/components/form-elements/table-actions/parts/EmptyState/index.js +22 -0
- package/dist/esm/src/components/form-elements/table-actions/parts/TagStatus/index.js +8 -0
- package/dist/esm/src/components/form-elements/table-actions/parts/TagStatus/tagStatusStyle.js +58 -0
- package/dist/esm/src/components/form-elements/table-actions/tableActionsStyle.js +110 -0
- package/dist/esm/src/components/form-elements/textarea/index.js +8 -0
- package/dist/esm/src/components/form-elements/textfield/index.js +42 -0
- package/dist/esm/src/components/form-elements/textfield/textFieldStyle.js +169 -0
- package/dist/esm/src/components/global-menu/globalMenuStyles.js +385 -0
- package/dist/esm/src/components/global-menu/index.js +181 -0
- package/dist/esm/src/components/header-improvement-idea/headerImprovementIdeaStyles.js +18 -0
- package/dist/esm/src/components/header-improvement-idea/index.js +24 -0
- package/dist/esm/src/components/header-user/headerUserStyles.js +50 -0
- package/dist/esm/src/components/header-user/index.js +13 -0
- package/dist/esm/src/components/headerChallenge/headerChallengeStyle.js +104 -0
- package/dist/esm/src/components/headerChallenge/index.js +9 -0
- package/dist/esm/src/components/hypothesisComponent/hypothesisComponent.style.js +220 -0
- package/dist/esm/src/components/hypothesisComponent/index.js +145 -0
- package/dist/esm/src/components/hypothesisComponent/types.js +8 -0
- package/dist/esm/src/components/input-comment/index.js +69 -0
- package/dist/esm/src/components/input-comment/inputCommentStyles.js +142 -0
- package/dist/esm/src/components/input-comment/mentions.js +18 -0
- package/dist/esm/src/components/input-comment/mentionsStyle.js +126 -0
- package/dist/esm/src/components/input-comment/useInputHook.js +375 -0
- package/dist/esm/src/components/input-comment/useMentions.js +39 -0
- package/dist/esm/src/components/input-comment-v2/index.js +81 -0
- package/dist/esm/src/components/input-comment-v2/inputCommentStyles.js +101 -0
- package/dist/esm/src/components/item-lateral-menu/index.js +34 -0
- package/dist/esm/src/components/item-lateral-menu/itemLateralMenuStyles.js +110 -0
- package/dist/esm/src/components/item-menu-global/index.js +11 -0
- package/dist/esm/src/components/item-menu-global/itemMenuGlobalStyles.js +74 -0
- package/dist/esm/src/components/lateral-menu/index.js +21 -0
- package/dist/esm/src/components/lateral-menu/lateralMenuStyles.js +65 -0
- package/dist/esm/src/components/learning-steps/index.js +23 -0
- package/dist/esm/src/components/learning-steps/learningStepsStyles.js +39 -0
- package/dist/esm/src/components/menu-more/index.js +31 -0
- package/dist/esm/src/components/menu-more/menuMoreStyles.js +136 -0
- package/dist/esm/src/components/mini-button/index.js +15 -0
- package/dist/esm/src/components/mini-button/miniButtonStyle.js +108 -0
- package/dist/esm/src/components/modal/modalBase/index.js +31 -0
- package/dist/esm/src/components/modal/modalBase/modalBase.module.css.js +7 -0
- package/dist/esm/src/components/modal/modalLXP/Modal.js +24 -0
- package/dist/esm/src/components/modal/modalLXP/modal.module.css.js +7 -0
- package/dist/esm/src/components/modal/modalLearningTech/index.js +17 -0
- package/dist/esm/src/components/modal/modalLearningTech/modalLearningTech.module.css.js +7 -0
- package/dist/esm/src/components/modal/modalShowUsers/index.js +11 -0
- package/dist/esm/src/components/modal/modalShowUsers/styles.js +122 -0
- package/dist/esm/src/components/modal/modalVideo/index.js +56 -0
- package/dist/esm/src/components/modal/modalVideo/modalVideo.module.css.js +7 -0
- package/dist/esm/src/components/modal/modalWelcome/index.js +43 -0
- package/dist/esm/src/components/modal/modalWelcome/styles.js +38 -0
- package/dist/esm/src/components/modal/statusProblema/index.js +33 -0
- package/dist/esm/src/components/modal/statusProblema/problemaFRST.png.js +3 -0
- package/dist/esm/src/components/modal/statusProblema/statusProblema.module.css.js +7 -0
- package/dist/esm/src/components/quantidadeDesafios/index.js +73 -0
- package/dist/esm/src/components/quantidadeDesafios/quantidadeDesafios.js +95 -0
- package/dist/esm/src/components/quantidadeDesafios/stats.js +8 -0
- package/dist/esm/src/components/quantidadeDesafios/statsWithResult.js +8 -0
- package/dist/esm/src/components/scroll-container/index.js +90 -0
- package/dist/esm/src/components/scroll-container/scrollContainer.utils.js +7 -0
- package/dist/esm/src/components/scroll-container/scrollContainerStyles.js +85 -0
- package/dist/esm/src/components/search-field/index.js +19 -0
- package/dist/esm/src/components/search-field/searchFieldStyles.js +87 -0
- package/dist/esm/src/components/show-more/index.js +20 -0
- package/dist/esm/src/components/show-more/showMoreStyles.js +26 -0
- package/dist/esm/src/components/speech-bubble/index.js +11 -0
- package/dist/esm/src/components/speech-bubble/speechBubbleStyles.js +100 -0
- package/dist/esm/src/components/step-card/index.js +13 -0
- package/dist/esm/src/components/step-card/stepCardStyles.js +90 -0
- package/dist/esm/src/components/tag/index.js +22 -0
- package/dist/esm/src/components/totalizer-card/index.js +16 -0
- package/dist/esm/src/components/totalizer-card/totalizerCardStyles.js +84 -0
- package/dist/esm/src/components/users-challenge/index.js +13 -0
- package/dist/esm/src/components/users-challenge/styles.js +125 -0
- package/dist/esm/src/components/users-challenge/variant-feed/index.js +34 -0
- package/dist/esm/src/components/users-challenge/variant-feed/styles.js +125 -0
- package/dist/esm/src/components/users-challenge/variant-form/index.js +23 -0
- package/dist/esm/src/components/users-challenge/variant-form/styles.js +125 -0
- package/dist/esm/src/components/users-challenge/variant-lxp/index.js +21 -0
- package/dist/esm/src/components/users-challenge/variant-lxp/styles.js +122 -0
- package/dist/esm/src/components/users-challenge/variant-vitrine/index.js +34 -0
- package/dist/esm/src/components/users-challenge/variant-vitrine/styles.js +123 -0
- package/dist/esm/src/shared/global.css.js +6 -0
- package/dist/esm/src/shared/globalComponentsStyle.js +83 -0
- package/dist/esm/src/shared/icons.js +531 -0
- package/dist/esm/src/theme/index.js +7 -0
- package/dist/esm/src/theme/tokens.js +235 -0
- package/dist/esm/src/utilityFunctions/abbreviateMiddleSurnames.js +23 -0
- package/dist/esm/src/utilityFunctions/buildStringWithHTML.js +10 -0
- package/dist/esm/src/utilityFunctions/createUUID.js +11 -0
- package/dist/index.js +15175 -15175
- package/dist/src/components/mini-button/index.d.ts +1 -1
- package/dist/src/components/mini-button/index.d.ts.map +1 -1
- package/package.json +120 -116
- package/public/customIcons/CheckIcon.tsx +16 -16
- package/public/customIcons/CircledAlert.tsx +21 -21
- package/public/customIcons/CircledCheck.tsx +20 -20
- package/public/customIcons/CloseIcon.tsx +23 -23
- package/public/customIcons/DefaultProfile.tsx +15 -15
- package/public/customIcons/ExcludeVoteIcon.tsx +40 -40
- package/public/customIcons/FrstLogoChallengeIcon.tsx +20 -20
- package/public/customIcons/FrstLogoIcon.tsx +8 -8
- package/public/customIcons/LanguageIcon.tsx +24 -24
- package/public/customIcons/SmallTrash.tsx +20 -20
- package/public/customIcons/SwitchVoteIcon.tsx +22 -22
- package/public/customIcons/TagAlert.tsx +10 -10
- package/public/customIcons/VoteCurrentIcon.tsx +22 -22
- package/public/customIcons/VoteIcon.tsx +41 -41
- package/public/customIcons/WarningIcon.tsx +21 -21
- package/public/customIcons/index.ts +15 -15
- package/public/customIcons/newVoteIcon.tsx +36 -36
- package/public/index.html +43 -43
- package/public/locales/en-US.json +33 -33
- package/public/locales/es.json +34 -34
- package/public/locales/pt-BR.json +41 -41
- package/public/manifest.json +15 -15
- package/public/robots.txt +3 -3
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import styled, { keyframes } from 'styled-components';
|
|
2
|
+
|
|
3
|
+
const fadeInRight = keyframes `
|
|
4
|
+
0% {
|
|
5
|
+
opacity: 0;
|
|
6
|
+
transform: translateX(50%);
|
|
7
|
+
}
|
|
8
|
+
100% {
|
|
9
|
+
opacity: 1;
|
|
10
|
+
transform: translateX(0);
|
|
11
|
+
}
|
|
12
|
+
`;
|
|
13
|
+
keyframes `
|
|
14
|
+
from {
|
|
15
|
+
opacity: 1;
|
|
16
|
+
transform: translateX(0);
|
|
17
|
+
}
|
|
18
|
+
to {
|
|
19
|
+
opacity: 0;
|
|
20
|
+
transform: translateX(20px);
|
|
21
|
+
}
|
|
22
|
+
`;
|
|
23
|
+
const ToastWrapper = styled.div `
|
|
24
|
+
display: flex;
|
|
25
|
+
align-items: center;
|
|
26
|
+
padding: 16px;
|
|
27
|
+
border-radius: 8px;
|
|
28
|
+
border: 0.5px solid ${({ theme }) => theme.colors.neutralsGrey5};
|
|
29
|
+
box-shadow: 2px 4px 8px #3D3B3B33;
|
|
30
|
+
background-color: #F9FAFB;
|
|
31
|
+
margin: 10px;
|
|
32
|
+
color: ${({ theme }) => theme.colors.shadeBlack};
|
|
33
|
+
width: 411px;
|
|
34
|
+
min-height:54px;
|
|
35
|
+
max-height: auto;
|
|
36
|
+
position: fixed;
|
|
37
|
+
top: 100px;
|
|
38
|
+
right: 40px;
|
|
39
|
+
z-index: 10000;
|
|
40
|
+
animation: ${fadeInRight} 0.5s ease-in-out;
|
|
41
|
+
`;
|
|
42
|
+
const Icon = styled.span `
|
|
43
|
+
margin-right: 10px;
|
|
44
|
+
margin-top:4px
|
|
45
|
+
`;
|
|
46
|
+
const CloseButton = styled.button `
|
|
47
|
+
background: none;
|
|
48
|
+
border: none;
|
|
49
|
+
cursor: pointer;
|
|
50
|
+
color: #000;
|
|
51
|
+
opacity: 0.7;
|
|
52
|
+
margin-left:auto;
|
|
53
|
+
margin-bottom: auto;
|
|
54
|
+
margin-top: 8px
|
|
55
|
+
`;
|
|
56
|
+
const Text = styled.p `
|
|
57
|
+
display: flex;
|
|
58
|
+
align-items: center;
|
|
59
|
+
font-family: PT Sans;
|
|
60
|
+
font-size: 14px;
|
|
61
|
+
font-weight: 300;
|
|
62
|
+
line-height: 18px;
|
|
63
|
+
letter-spacing: 0em;
|
|
64
|
+
text-align: left;
|
|
65
|
+
margin-right: 16px;
|
|
66
|
+
`;
|
|
67
|
+
|
|
68
|
+
export { CloseButton, Icon, Text, ToastWrapper };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { toast } from 'react-toastify';
|
|
3
|
+
import { StyledContainer } from './toast-v2.styles.js';
|
|
4
|
+
import { ThemeProvider } from 'styled-components';
|
|
5
|
+
import { FRSTTheme } from '../../../theme/index.js';
|
|
6
|
+
import { ErrorInCicleIcon, CloseIcon } from '../../../shared/icons.js';
|
|
7
|
+
import { CircledCheck } from '../../../../public/customIcons/CircledCheck.js';
|
|
8
|
+
import { WarningIcon } from '../../../../public/customIcons/WarningIcon.js';
|
|
9
|
+
|
|
10
|
+
const showToastV2 = ({ type = 'success', message, showBySeconds = 5, styles, startICon, isHiddenCloseicon, handleClick }) => {
|
|
11
|
+
let iconComponent = startICon;
|
|
12
|
+
switch (type) {
|
|
13
|
+
case 'error':
|
|
14
|
+
iconComponent = jsx(ErrorInCicleIcon, { fill: "#C00F00", width: "22", height: "22" });
|
|
15
|
+
break;
|
|
16
|
+
case 'success':
|
|
17
|
+
iconComponent = jsx(CircledCheck, { width: "22", height: "22" });
|
|
18
|
+
break;
|
|
19
|
+
case 'warning':
|
|
20
|
+
iconComponent = jsx(WarningIcon, { width: "22", height: "22" });
|
|
21
|
+
break;
|
|
22
|
+
default:
|
|
23
|
+
iconComponent = undefined;
|
|
24
|
+
}
|
|
25
|
+
const CustomCloseButton = ({ closeToast }) => (jsx("span", { onClick: (e) => {
|
|
26
|
+
e.stopPropagation();
|
|
27
|
+
e.preventDefault();
|
|
28
|
+
closeToast(e);
|
|
29
|
+
}, style: {
|
|
30
|
+
display: 'flex',
|
|
31
|
+
marginTop: 'auto',
|
|
32
|
+
marginBottom: 'auto',
|
|
33
|
+
marginRight: '20px',
|
|
34
|
+
marginLeft: '4px',
|
|
35
|
+
cursor: 'pointer'
|
|
36
|
+
}, children: jsx(CloseIcon, { width: "14", height: "14" }) }));
|
|
37
|
+
const toastOptions = {
|
|
38
|
+
position: 'top-right',
|
|
39
|
+
autoClose: showBySeconds * 1000,
|
|
40
|
+
closeButton: isHiddenCloseicon ? false : CustomCloseButton,
|
|
41
|
+
icon: startICon ? startICon : iconComponent,
|
|
42
|
+
hideProgressBar: true,
|
|
43
|
+
closeOnClick: true,
|
|
44
|
+
pauseOnHover: true,
|
|
45
|
+
draggable: true,
|
|
46
|
+
progress: undefined,
|
|
47
|
+
onClick: (e) => {
|
|
48
|
+
e?.preventDefault();
|
|
49
|
+
e?.stopPropagation();
|
|
50
|
+
handleClick ? handleClick() : null;
|
|
51
|
+
},
|
|
52
|
+
style: styles
|
|
53
|
+
};
|
|
54
|
+
switch (type) {
|
|
55
|
+
case 'info':
|
|
56
|
+
toast.info(message, toastOptions);
|
|
57
|
+
break;
|
|
58
|
+
case 'success':
|
|
59
|
+
toast.success(message, toastOptions);
|
|
60
|
+
break;
|
|
61
|
+
case 'error':
|
|
62
|
+
toast.error(message, toastOptions);
|
|
63
|
+
break;
|
|
64
|
+
case 'warning':
|
|
65
|
+
toast.warn(message, toastOptions);
|
|
66
|
+
break;
|
|
67
|
+
default:
|
|
68
|
+
toast(message, toastOptions);
|
|
69
|
+
break;
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
const ToastV2 = () => {
|
|
73
|
+
return (jsx(ThemeProvider, { theme: FRSTTheme, children: jsx(StyledContainer, {}) }));
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
export { ToastV2, showToastV2 };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { ToastContainer } from 'react-toastify';
|
|
3
|
+
|
|
4
|
+
const StyledContainer = styled(ToastContainer) `
|
|
5
|
+
.Toastify__toast {
|
|
6
|
+
border-radius: 8px !important;
|
|
7
|
+
min-height: 54px !important;
|
|
8
|
+
}
|
|
9
|
+
.Toastify__toast-body {
|
|
10
|
+
color: #000 !important;
|
|
11
|
+
font-family: Pt Sans;
|
|
12
|
+
font-weight: 400;
|
|
13
|
+
line-height: 18.12px;
|
|
14
|
+
font-size: 14px;
|
|
15
|
+
}
|
|
16
|
+
`;
|
|
17
|
+
|
|
18
|
+
export { StyledContainer };
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import { useState, useRef, useEffect } from 'react';
|
|
3
|
+
import { TooltipWrapper, TooltipGhost, TooltipTip } from './styles.js';
|
|
4
|
+
import ReactDOM from 'react-dom';
|
|
5
|
+
|
|
6
|
+
function Tooltip({ content, direction, children, trigger = 'hover', delay = 400, style, className, width, height, onShow, onHide, setIsActive, wrapperWidth }) {
|
|
7
|
+
let shpwTimeout;
|
|
8
|
+
let hideTimeout;
|
|
9
|
+
const [active, setActive] = useState(false);
|
|
10
|
+
const [renderHeight, setRenderHeight] = useState('51px');
|
|
11
|
+
const ref = useRef(null);
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
setIsActive && setIsActive(active);
|
|
14
|
+
if (!ref.current || !active)
|
|
15
|
+
return;
|
|
16
|
+
if (height)
|
|
17
|
+
setRenderHeight(height);
|
|
18
|
+
if (renderHeight === '51px')
|
|
19
|
+
setRenderHeight(ref.current.clientHeight + 'px');
|
|
20
|
+
}, [active]);
|
|
21
|
+
const showTip = () => {
|
|
22
|
+
const timeoutDelay = trigger === 'click' ? 0 : delay;
|
|
23
|
+
shpwTimeout = setTimeout(() => {
|
|
24
|
+
setActive(true);
|
|
25
|
+
if (onShow)
|
|
26
|
+
onShow({ active: true });
|
|
27
|
+
}, timeoutDelay);
|
|
28
|
+
};
|
|
29
|
+
const hideTip = () => {
|
|
30
|
+
clearInterval(shpwTimeout);
|
|
31
|
+
clearInterval(hideTimeout);
|
|
32
|
+
hideTimeout = setTimeout(() => {
|
|
33
|
+
ref.current = null;
|
|
34
|
+
setRenderHeight('51px');
|
|
35
|
+
setActive(false);
|
|
36
|
+
if (onHide)
|
|
37
|
+
onHide({ active: false });
|
|
38
|
+
}, 1000);
|
|
39
|
+
};
|
|
40
|
+
return (jsxs(TooltipWrapper, { onMouseEnter: trigger === 'hover' ? showTip : undefined, onMouseLeave: hideTip, onClick: trigger === 'click' ? showTip : undefined, width: wrapperWidth, children: [children, active && (jsx(TooltipGhost, { direction: direction || 'top', className: className, width: width || '100px', height: height ? height : renderHeight || '100px', ref: ref, children: jsx(TooltipTip, { direction: direction || 'top', style: style, width: width || '100px', height: height ? height : renderHeight || '100px', children: content }) }))] }));
|
|
41
|
+
}
|
|
42
|
+
const TooltipV2 = ({ children, content, direction = 'bottom', style }) => {
|
|
43
|
+
const [isVisible, setIsVisible] = useState(false);
|
|
44
|
+
const [tooltipStyle, setTooltipStyle] = useState({});
|
|
45
|
+
const triggerRef = useRef(null);
|
|
46
|
+
const showTooltip = () => setIsVisible(true);
|
|
47
|
+
const hideTooltip = () => setIsVisible(false);
|
|
48
|
+
useEffect(() => {
|
|
49
|
+
if (isVisible && triggerRef.current) {
|
|
50
|
+
const triggerRect = triggerRef.current.getBoundingClientRect();
|
|
51
|
+
const positionStyles = {
|
|
52
|
+
bottom: {
|
|
53
|
+
top: triggerRect.bottom + window.scrollY + 8,
|
|
54
|
+
left: triggerRect.left + window.scrollX + triggerRect.width / 2,
|
|
55
|
+
transform: 'translateX(-50%)'
|
|
56
|
+
},
|
|
57
|
+
top: {
|
|
58
|
+
top: triggerRect.top + window.scrollY - 8,
|
|
59
|
+
left: triggerRect.left + window.scrollX + triggerRect.width / 2,
|
|
60
|
+
transform: 'translateX(-50%) translateY(-100%)'
|
|
61
|
+
},
|
|
62
|
+
left: {
|
|
63
|
+
top: triggerRect.top + window.scrollY + triggerRect.height / 2,
|
|
64
|
+
left: triggerRect.left + window.scrollX - 8,
|
|
65
|
+
transform: 'translateX(-100%) translateY(-50%)'
|
|
66
|
+
},
|
|
67
|
+
right: {
|
|
68
|
+
top: triggerRect.top + window.scrollY + triggerRect.height / 2,
|
|
69
|
+
left: triggerRect.right + window.scrollX + 8,
|
|
70
|
+
transform: 'translateY(-50%)'
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
setTooltipStyle({
|
|
74
|
+
position: 'absolute',
|
|
75
|
+
...positionStyles[direction],
|
|
76
|
+
...style
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
}, [isVisible, direction, style]);
|
|
80
|
+
return (jsxs(Fragment, { children: [jsx("div", { ref: triggerRef, onMouseEnter: showTooltip, onMouseLeave: hideTooltip, style: {
|
|
81
|
+
display: 'inline-block'
|
|
82
|
+
}, children: children }), isVisible &&
|
|
83
|
+
ReactDOM.createPortal(jsx("div", { style: {
|
|
84
|
+
zIndex: 9999,
|
|
85
|
+
background: '#fff',
|
|
86
|
+
border: '1px solid #ccc',
|
|
87
|
+
padding: '8px',
|
|
88
|
+
borderRadius: '4px',
|
|
89
|
+
fontFamily: 'PT Sans',
|
|
90
|
+
fontSize: '14px',
|
|
91
|
+
lineHeight: '18px',
|
|
92
|
+
fontWeight: '400',
|
|
93
|
+
color: '#757575',
|
|
94
|
+
...tooltipStyle
|
|
95
|
+
}, children: content }), document.body)] }));
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
export { TooltipV2, Tooltip as default };
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
|
|
3
|
+
const TooltipWrapper = styled.div `
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
position: relative;
|
|
6
|
+
${({ width }) => width && `width: ${width};`}
|
|
7
|
+
`;
|
|
8
|
+
const TooltipTip = styled.div `
|
|
9
|
+
background: #FFF;
|
|
10
|
+
border-radius: 4px;
|
|
11
|
+
border: 1px solid #BDBDBD;
|
|
12
|
+
font-family: 'PT Sans';
|
|
13
|
+
font-style: normal;
|
|
14
|
+
font-weight: 400;
|
|
15
|
+
font-size: 14px;
|
|
16
|
+
line-height: 18px;
|
|
17
|
+
color: #757575;
|
|
18
|
+
box-shadow: 0px 25px 18px -20px rgba(34, 34, 34, 0.2);
|
|
19
|
+
padding: 6px;
|
|
20
|
+
position: relative;
|
|
21
|
+
|
|
22
|
+
${({ width }) => width && `width: ${width};`}
|
|
23
|
+
${({ height }) => height && `height: ${height};`}
|
|
24
|
+
|
|
25
|
+
&::after {
|
|
26
|
+
content: " ";
|
|
27
|
+
left: 50%;
|
|
28
|
+
border: solid transparent;
|
|
29
|
+
height: 0;
|
|
30
|
+
width: 0;
|
|
31
|
+
position: absolute;
|
|
32
|
+
pointer-events: none;
|
|
33
|
+
border-width: 5px;
|
|
34
|
+
margin-left: calc(5px * -1);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&::before {
|
|
38
|
+
content: " ";
|
|
39
|
+
left: 50%;
|
|
40
|
+
border: solid transparent;
|
|
41
|
+
height: 0;
|
|
42
|
+
width: 0;
|
|
43
|
+
position: absolute;
|
|
44
|
+
pointer-events: none;
|
|
45
|
+
border-width: 6px;
|
|
46
|
+
margin-left: calc(6px * -1);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
${({ direction }) => {
|
|
50
|
+
switch (direction) {
|
|
51
|
+
case 'top':
|
|
52
|
+
return `
|
|
53
|
+
&::before,
|
|
54
|
+
&::after {
|
|
55
|
+
top: 100%;
|
|
56
|
+
border-top-color: #BDBDBD
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&::after {
|
|
60
|
+
border-top-color: #FFFFFF;
|
|
61
|
+
}
|
|
62
|
+
`;
|
|
63
|
+
case 'right':
|
|
64
|
+
return `
|
|
65
|
+
&::before,
|
|
66
|
+
&::after {
|
|
67
|
+
left: calc(6px * -1);
|
|
68
|
+
top: 50%;
|
|
69
|
+
transform: translateX(0) translateY(-50%);
|
|
70
|
+
border-right-color: #BDBDBD;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&::after {
|
|
74
|
+
border-right-color: #FFFFFF;
|
|
75
|
+
}
|
|
76
|
+
`;
|
|
77
|
+
case 'bottom':
|
|
78
|
+
return `
|
|
79
|
+
&::before,
|
|
80
|
+
&::after {
|
|
81
|
+
bottom: 100%;
|
|
82
|
+
border-bottom-color: #BDBDBD;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&::after {
|
|
86
|
+
border-bottom-color: #FFFFFF;
|
|
87
|
+
}
|
|
88
|
+
`;
|
|
89
|
+
case 'left':
|
|
90
|
+
return `
|
|
91
|
+
&::before,
|
|
92
|
+
&::after {
|
|
93
|
+
left: auto;
|
|
94
|
+
right: calc(6px * -2);
|
|
95
|
+
top: 50%;
|
|
96
|
+
transform: translateX(0) translateY(-50%);
|
|
97
|
+
border-left-color: #BDBDBD;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&::after {
|
|
101
|
+
border-left-color: #FFFFFF;
|
|
102
|
+
}
|
|
103
|
+
`;
|
|
104
|
+
default:
|
|
105
|
+
return '';
|
|
106
|
+
}
|
|
107
|
+
}}
|
|
108
|
+
|
|
109
|
+
`;
|
|
110
|
+
const TooltipGhost = styled.div `
|
|
111
|
+
position: absolute;
|
|
112
|
+
left: 50%;
|
|
113
|
+
transform: translateX(-50%);
|
|
114
|
+
z-index: 100;
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
${({ direction, height }) => {
|
|
118
|
+
switch (direction) {
|
|
119
|
+
case 'top':
|
|
120
|
+
return `
|
|
121
|
+
top: calc(${height} * -1);
|
|
122
|
+
`;
|
|
123
|
+
case 'right':
|
|
124
|
+
return `
|
|
125
|
+
left: calc(100% + 5px);
|
|
126
|
+
top: 50%;
|
|
127
|
+
transform: translateX(0) translateY(-50%);
|
|
128
|
+
`;
|
|
129
|
+
case 'bottom':
|
|
130
|
+
return `
|
|
131
|
+
bottom: calc(${height} * -1);
|
|
132
|
+
`;
|
|
133
|
+
case 'left':
|
|
134
|
+
return `
|
|
135
|
+
left: auto;
|
|
136
|
+
right: calc(100% + 5px);
|
|
137
|
+
top: 50%;
|
|
138
|
+
transform: translateX(0) translateY(-50%);
|
|
139
|
+
`;
|
|
140
|
+
default:
|
|
141
|
+
return '';
|
|
142
|
+
}
|
|
143
|
+
}}
|
|
144
|
+
`;
|
|
145
|
+
|
|
146
|
+
export { TooltipGhost, TooltipTip, TooltipWrapper };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { ButtonGroupWrapper } from './styles.js';
|
|
4
|
+
|
|
5
|
+
function ButtonGroup({ children, active }) {
|
|
6
|
+
const ButtonGroupProps = {
|
|
7
|
+
type: 'group',
|
|
8
|
+
variant: 'primary'
|
|
9
|
+
};
|
|
10
|
+
return (jsx(ButtonGroupWrapper, { className: "buttons-group", children: React__default.Children.map(children, (child) => React__default.cloneElement(child, {
|
|
11
|
+
...ButtonGroupProps,
|
|
12
|
+
active: child.props.value === active,
|
|
13
|
+
length: children.length
|
|
14
|
+
})) }));
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { ButtonGroup as default };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
|
|
3
|
+
styled.img `
|
|
4
|
+
width: ${props => props.size || '120px'};
|
|
5
|
+
height: ${props => props.size || '120px'};
|
|
6
|
+
border-radius: 50%;
|
|
7
|
+
object-fit: cover;
|
|
8
|
+
|
|
9
|
+
${({ disabled }) => disabled === true && `
|
|
10
|
+
filter: grayscale(100%);
|
|
11
|
+
`}
|
|
12
|
+
`;
|
|
13
|
+
const CardWrapper = styled.div `
|
|
14
|
+
width: 100%;
|
|
15
|
+
min-height: 154px;
|
|
16
|
+
padding: 24px;
|
|
17
|
+
|
|
18
|
+
background-color: ${({ theme }) => theme.colors.shadeWhite};
|
|
19
|
+
border: 1px solid #BDBDBD;
|
|
20
|
+
border-radius: 8px;
|
|
21
|
+
padding: 20px;
|
|
22
|
+
${({ hasShadow }) => hasShadow && 'box-shadow: 0px 18px 40px -15px #D3D3D3'};
|
|
23
|
+
`;
|
|
24
|
+
const FeaturedNumber = styled.p `
|
|
25
|
+
font-family: 'Work Sans' ;
|
|
26
|
+
font-style: normal;
|
|
27
|
+
font-weight: 300;
|
|
28
|
+
font-size: 48px;
|
|
29
|
+
line-height: 56px;
|
|
30
|
+
color: #222222;
|
|
31
|
+
`;
|
|
32
|
+
const DescriptionStatistics = styled.span `
|
|
33
|
+
font-family: 'Work Sans';
|
|
34
|
+
font-style: normal;
|
|
35
|
+
font-weight: 500;
|
|
36
|
+
font-size: 20px;
|
|
37
|
+
line-height: 23px;
|
|
38
|
+
color: #FF4D0D;
|
|
39
|
+
`;
|
|
40
|
+
const ItemStatistics = styled.div `
|
|
41
|
+
|
|
42
|
+
grid-area: ${({ index, isNamedGrid }) => isNamedGrid && index} !important;
|
|
43
|
+
display: flex;
|
|
44
|
+
flex-direction: column;
|
|
45
|
+
justify-content: flex-start;
|
|
46
|
+
align-itens: flex-start;
|
|
47
|
+
min-height: 106px;
|
|
48
|
+
max-width: 272px;
|
|
49
|
+
padding: 0px 24px 0px 24px;
|
|
50
|
+
margin-top: ${({ twoRows }) => twoRows ? '24px' : '0px'};
|
|
51
|
+
${({ hasDivider, theme }) => hasDivider ?
|
|
52
|
+
'border-left: 1px solid ' + theme.colors.borderPrimary :
|
|
53
|
+
'border-left: 1px solid ' + theme.colors.shadeWhite}
|
|
54
|
+
`;
|
|
55
|
+
|
|
56
|
+
export { CardWrapper, DescriptionStatistics, FeaturedNumber, ItemStatistics };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { useState, useEffect } from 'react';
|
|
3
|
+
import '../../../shared/global.css.js';
|
|
4
|
+
import { ThemeProvider } from 'styled-components';
|
|
5
|
+
import { FRSTTheme } from '../../../theme/index.js';
|
|
6
|
+
import { CardWrapper, ItemStatistics, FeaturedNumber, DescriptionStatistics } from './groupStatisticsStyles.js';
|
|
7
|
+
|
|
8
|
+
function TotalizerCard({ objectStatistics, loading, hasShadow, styles }) {
|
|
9
|
+
const [windowSize, setWindowSize] = useState([0, 0]);
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
function updateSize() {
|
|
12
|
+
setWindowSize([window.innerWidth, window.innerHeight]);
|
|
13
|
+
}
|
|
14
|
+
window.addEventListener('resize', updateSize);
|
|
15
|
+
updateSize();
|
|
16
|
+
return () => window.removeEventListener('resize', updateSize);
|
|
17
|
+
}, []);
|
|
18
|
+
const renderObjectStatistics = (isNamed) => {
|
|
19
|
+
const calcHasDivider = (myIndex) => {
|
|
20
|
+
if (myIndex == 0)
|
|
21
|
+
return false;
|
|
22
|
+
switch (objectStatistics.length) {
|
|
23
|
+
case 6:
|
|
24
|
+
case 7:
|
|
25
|
+
case 8:
|
|
26
|
+
if (myIndex == 4)
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
return true;
|
|
30
|
+
};
|
|
31
|
+
return objectStatistics.map((item, index) => {
|
|
32
|
+
return jsxs(ItemStatistics, { hasDivider: calcHasDivider(index), twoRows: objectStatistics.length > 5 && index > 3, isNamedGrid: isNamed, index: 'card-' + (index + 1).toString(), children: [jsx(FeaturedNumber, { children: item.featuredNumber }), jsx(DescriptionStatistics, { children: item.description })] }, index);
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
return (jsx(ThemeProvider, { theme: FRSTTheme, children: loading ? jsx(CardWrapper, { hasShadow: hasShadow, className: 'shimmer', style: { ...styles } }) :
|
|
36
|
+
jsx(CardWrapper, { hasShadow: hasShadow, style: { ...styles }, children: (objectStatistics && objectStatistics.length > 0 && objectStatistics.length <= 5) ?
|
|
37
|
+
jsx("div", { style: {
|
|
38
|
+
display: 'grid',
|
|
39
|
+
gridTemplateAreas: objectStatistics.length == 5 ? `'card-1 card-2 card-3 card-4 card-5'` : `'card-1 card-2 card-3 card-4'`
|
|
40
|
+
}, children: renderObjectStatistics(true) })
|
|
41
|
+
:
|
|
42
|
+
(objectStatistics && objectStatistics.length > 0 && objectStatistics.length <= 6) ?
|
|
43
|
+
jsx("div", { style: {
|
|
44
|
+
display: 'grid',
|
|
45
|
+
gridTemplateAreas: `'card-1 card-2 card-3 card-4''. card-5 card-6 .'`
|
|
46
|
+
}, children: renderObjectStatistics(true) })
|
|
47
|
+
:
|
|
48
|
+
(objectStatistics && objectStatistics.length > 0 && objectStatistics.length <= 7) ?
|
|
49
|
+
jsx("div", { style: {
|
|
50
|
+
display: 'grid',
|
|
51
|
+
gridTemplateAreas: `'card-1 card-1 card-2 card-2 card-3 card-3 card-4 card-4''. card-5 card-5 card-6 card-6 card-7 card-7 .'`
|
|
52
|
+
}, children: renderObjectStatistics(true) })
|
|
53
|
+
:
|
|
54
|
+
(objectStatistics && objectStatistics.length > 0 && objectStatistics.length > 7) &&
|
|
55
|
+
jsx("div", { style: {
|
|
56
|
+
display: 'grid',
|
|
57
|
+
gridTemplateColumns: '1fr 1fr 1fr 1fr',
|
|
58
|
+
}, children: renderObjectStatistics(false) }) }) }));
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export { TotalizerCard as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { WrapperCard, WrapperTopic, WrapperDescription } from './objectiveStepStyles.js';
|
|
3
|
+
|
|
4
|
+
function ObjectiveStep({ description, number }) {
|
|
5
|
+
return (jsxs(WrapperCard, { children: [jsx(WrapperTopic, { children: number }), jsx(WrapperDescription, { children: description })] }));
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export { ObjectiveStep as default };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
|
|
3
|
+
const WrapperCard = styled.div `
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: row;
|
|
6
|
+
width: 100%;
|
|
7
|
+
background-color: #FFF;
|
|
8
|
+
border-radius: 8px;
|
|
9
|
+
border: 1px solid #BDBDBD;
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
`;
|
|
12
|
+
const WrapperTopic = styled.div `
|
|
13
|
+
min-width: 49px;
|
|
14
|
+
display: flex;
|
|
15
|
+
justify-content: center;
|
|
16
|
+
align-items: center;
|
|
17
|
+
|
|
18
|
+
background: #FF4D0D;
|
|
19
|
+
color: #FFF;
|
|
20
|
+
font-family: 'Work Sans';
|
|
21
|
+
font-style: normal;
|
|
22
|
+
font-weight: 700;
|
|
23
|
+
font-size: 24px;
|
|
24
|
+
border-right: 1px solid #BDBDBD;
|
|
25
|
+
|
|
26
|
+
`;
|
|
27
|
+
const WrapperDescription = styled.div `
|
|
28
|
+
padding: 16px;
|
|
29
|
+
color: #222222;
|
|
30
|
+
font-family: 'Work Sans';
|
|
31
|
+
font-style: normal;
|
|
32
|
+
font-weight: 400;
|
|
33
|
+
font-size: 16px;
|
|
34
|
+
`;
|
|
35
|
+
|
|
36
|
+
export { WrapperCard, WrapperDescription, WrapperTopic };
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { useState, useRef, useEffect } from 'react';
|
|
3
|
+
import { StarRating, StarRatingRondedTips } from '../../../shared/icons.js';
|
|
4
|
+
import { WrapperStars, Raiting } from './ratingStyles.js';
|
|
5
|
+
import { Box } from '@mui/material';
|
|
6
|
+
|
|
7
|
+
function Rating({ variant = 'primary', rating, isVisibleNumberRating, qtdStars, marginStars, handleRating, sizeStars, orientation, disabled, removeEvaluation, evaluationType, isUserLoggedChallenge, valueRatingOwner }) {
|
|
8
|
+
const [hoverRaiting, setHoverRaiting] = useState(-1);
|
|
9
|
+
const renderStars = () => {
|
|
10
|
+
const groupStars = [];
|
|
11
|
+
const handleClick = (value) => {
|
|
12
|
+
if (!disabled) {
|
|
13
|
+
handleRating(value);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
const getStatusActive = (id) => {
|
|
17
|
+
if (id < hoverRaiting)
|
|
18
|
+
return true;
|
|
19
|
+
else if (hoverRaiting !== -1)
|
|
20
|
+
return false;
|
|
21
|
+
else if (id < rating)
|
|
22
|
+
return true;
|
|
23
|
+
return false;
|
|
24
|
+
};
|
|
25
|
+
for (let i = 0; i < qtdStars; i++) {
|
|
26
|
+
groupStars.push(jsx(StarRatingComponent, { variant: variant, isEmpty: rating <= 0, id: i + 1, active: getStatusActive(i), setOnHover: setHoverRaiting, handleClick: handleClick, sizeStars: sizeStars, marginStars: marginStars, disabled: disabled, removeEvaluation: () => removeEvaluation(evaluationType) }, i));
|
|
27
|
+
}
|
|
28
|
+
return groupStars;
|
|
29
|
+
};
|
|
30
|
+
return (jsx(Box, { children: jsxs(WrapperStars, { orientation: orientation, children: [renderStars(), isUserLoggedChallenge && jsx("span", { style: { marginLeft: '6px' }, children: valueRatingOwner }), isVisibleNumberRating && jsx(Raiting, { children: rating.toFixed(1) })] }) }));
|
|
31
|
+
}
|
|
32
|
+
function StarRatingComponent({ id, variant, isEmpty, active, handleClick, sizeStars, marginStars, setOnHover, disabled, removeEvaluation }) {
|
|
33
|
+
const [actionArea, setActionArea] = useState(false);
|
|
34
|
+
const clickTimeout = useRef(null);
|
|
35
|
+
const getColorStarPrimary = () => (active ? '#FFC200' : '#757575');
|
|
36
|
+
const getColorStarSecondary = () => {
|
|
37
|
+
if (isEmpty && !active)
|
|
38
|
+
return '#BDBDBD';
|
|
39
|
+
return active ? '#FDD836' : '#BDBDBD';
|
|
40
|
+
};
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
const timer = setTimeout(() => {
|
|
43
|
+
if (actionArea)
|
|
44
|
+
setOnHover(id);
|
|
45
|
+
else
|
|
46
|
+
setOnHover(-1);
|
|
47
|
+
}, 150);
|
|
48
|
+
return () => clearTimeout(timer);
|
|
49
|
+
}, [actionArea, id, setOnHover]);
|
|
50
|
+
const onClickHandler = () => {
|
|
51
|
+
if (disabled)
|
|
52
|
+
return;
|
|
53
|
+
if (clickTimeout.current !== null)
|
|
54
|
+
return;
|
|
55
|
+
clickTimeout.current = setTimeout(() => {
|
|
56
|
+
handleClick(id);
|
|
57
|
+
clickTimeout.current = null;
|
|
58
|
+
}, 250);
|
|
59
|
+
};
|
|
60
|
+
const onDoubleClickHandler = () => {
|
|
61
|
+
if (disabled)
|
|
62
|
+
return;
|
|
63
|
+
if (clickTimeout.current) {
|
|
64
|
+
clearTimeout(clickTimeout.current);
|
|
65
|
+
clickTimeout.current = null;
|
|
66
|
+
}
|
|
67
|
+
removeEvaluation();
|
|
68
|
+
handleClick(0);
|
|
69
|
+
};
|
|
70
|
+
return (jsx("div", { onMouseOver: () => !disabled && setActionArea(true), onMouseOut: () => !disabled && setActionArea(false), onClick: onClickHandler, onDoubleClick: onDoubleClickHandler, style: {
|
|
71
|
+
display: 'flex',
|
|
72
|
+
justifyContent: 'center',
|
|
73
|
+
alignItems: 'center',
|
|
74
|
+
padding: marginStars || '3.5px'
|
|
75
|
+
}, children: variant === 'primary' ? (jsx(StarRating, { width: sizeStars || 30, height: sizeStars || 29, fill: getColorStarPrimary(), fillOpacity: disabled ? '0.6' : '1' })) : (jsx(StarRatingRondedTips, { width: sizeStars || 30, height: sizeStars || 28, stroke: isEmpty && !active ? '#BDBDBD' : 'transparent', strokeWidth: isEmpty && !active ? '1' : '0', fill: getColorStarSecondary(), fillOpacity: disabled ? '0.6' : '1' })) }));
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export { Rating as default };
|