frst-components 0.37.0 → 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,110 @@
|
|
|
1
|
+
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { useState, useRef, useEffect } from 'react';
|
|
3
|
+
import { FRSTTheme } from '../../theme/index.js';
|
|
4
|
+
import { ThemeProvider } from 'styled-components';
|
|
5
|
+
import ReactPlayer from 'react-player';
|
|
6
|
+
import { container, containerMask, thumbLoading, thumb, content, title, description, date, controls, navigationButton, playButton, volumeControl, volume, volumeBar, audioTimeline, timeText, timeline } from './audioPlayerStyles.js';
|
|
7
|
+
import { Box, Skeleton } from '@mui/material';
|
|
8
|
+
import { Back15, PlayIcon, PauseIcon, Foward15, MuteIcon, VolumeIcon } from '../../shared/icons.js';
|
|
9
|
+
|
|
10
|
+
function AudioPlayer(props) {
|
|
11
|
+
const [isPlaying, setIsPlaying] = useState(false);
|
|
12
|
+
const [playedSeconds, setPlayedSeconds] = useState(0);
|
|
13
|
+
const [duration, setDuration] = useState(0); // Added duration state
|
|
14
|
+
const playerRef = useRef(null);
|
|
15
|
+
const [loading, setLoading] = useState(true);
|
|
16
|
+
const [audioVolume, setAudioVolume] = useState(props?.volume ?? 0.5);
|
|
17
|
+
const defaultThumb = 'https://i.gyazo.com/f201e5ef302347108c31a2129104adc1.png';
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
setTimeout(() => {
|
|
20
|
+
if (playerRef.current) {
|
|
21
|
+
setPlayedSeconds(props.startAt);
|
|
22
|
+
playerRef.current.seekTo(props.startAt);
|
|
23
|
+
}
|
|
24
|
+
}, 1000);
|
|
25
|
+
}, [props.startAt, playerRef.current]);
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
if (props.exitSound) {
|
|
28
|
+
setIsPlaying(false);
|
|
29
|
+
if (playerRef.current) {
|
|
30
|
+
playerRef.current.seekTo(0);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}, [props.exitSound]);
|
|
34
|
+
const onProgress = (data) => {
|
|
35
|
+
if (props.onProgress && isPlaying) {
|
|
36
|
+
props.onProgress(data);
|
|
37
|
+
}
|
|
38
|
+
setPlayedSeconds(data.playedSeconds); // Update the playedSeconds state
|
|
39
|
+
};
|
|
40
|
+
const onVolumeChange = (newVolume) => {
|
|
41
|
+
setAudioVolume(newVolume); // Atualize o estado interno
|
|
42
|
+
if (playerRef.current) {
|
|
43
|
+
const internalPlayer = playerRef.current.getInternalPlayer();
|
|
44
|
+
if (internalPlayer) {
|
|
45
|
+
internalPlayer.volume = newVolume; // Atualize o volume diretamente no player interno
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
const onDuration = (duration) => {
|
|
50
|
+
setDuration(duration); // Store the duration when it's available
|
|
51
|
+
};
|
|
52
|
+
const onEnded = () => {
|
|
53
|
+
setIsPlaying(false);
|
|
54
|
+
if (props.onEnded) {
|
|
55
|
+
props.onEnded();
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
useEffect(() => {
|
|
59
|
+
if (props.audio)
|
|
60
|
+
setLoading(false);
|
|
61
|
+
}, [props.audio]);
|
|
62
|
+
function formatTime(seconds) {
|
|
63
|
+
const mins = Math.floor(seconds / 60);
|
|
64
|
+
const secs = Math.floor(seconds % 60);
|
|
65
|
+
return `${mins.toString().padStart(2, '0')}:${secs.toString().padStart(2, '0')}`;
|
|
66
|
+
}
|
|
67
|
+
return (jsx(ThemeProvider, { theme: FRSTTheme, children: jsx(Fragment, { children: jsxs(container, { style: {
|
|
68
|
+
...props.style,
|
|
69
|
+
backgroundImage: props.coverImage ? `url(${props.coverImage})` : ''
|
|
70
|
+
}, children: [jsx(containerMask, {}), loading ? (jsx(Fragment, { children: jsx(thumbLoading, { style: {
|
|
71
|
+
...props.style,
|
|
72
|
+
backgroundImage: props.coverImage ? `url(${props.coverImage})` : `url(${defaultThumb})`
|
|
73
|
+
} }) })) : (jsx(Fragment, { children: jsx(thumb, { style: {
|
|
74
|
+
...props.style,
|
|
75
|
+
backgroundImage: props.coverImage ? `url(${props.coverImage})` : `url(${defaultThumb})`
|
|
76
|
+
} }) })), jsxs(content, { style: { width: '100%' }, children: [jsxs(title, { children: [" ", props.title, " "] }), jsxs(description, { children: [" ", props.description, " "] }), jsxs(date, { children: [" ", props.date, " "] }), props.longLoading && loading ? (jsxs(Box, { justifyContent: 'center', alignItems: 'center', width: '100%', children: [jsx(Skeleton, { height: 48, width: 150, sx: { marginLeft: 24 } }), jsx(Skeleton, { height: 24 })] })) : (jsxs(Fragment, { children: [jsxs(controls, { children: [jsx(navigationButton, { onClick: () => {
|
|
77
|
+
const newTime = playedSeconds - 15;
|
|
78
|
+
setPlayedSeconds(newTime >= 0 ? newTime : 0);
|
|
79
|
+
if (playerRef.current) {
|
|
80
|
+
playerRef.current.seekTo(newTime >= 0 ? newTime : 0);
|
|
81
|
+
}
|
|
82
|
+
}, children: jsx(Back15, { fill: "currentColor" }) }), !isPlaying ? (jsx(playButton, { onClick: () => setIsPlaying(true), children: jsx(PlayIcon, { customColor_1: "currentColor" }) })) : (jsx(playButton, { onClick: () => setIsPlaying(false), children: jsx(PauseIcon, { customColor_1: "currentColor" }) })), jsx(navigationButton, { onClick: () => {
|
|
83
|
+
const newTime = playedSeconds + 15;
|
|
84
|
+
setPlayedSeconds(newTime <= duration ? newTime : duration);
|
|
85
|
+
if (playerRef.current) {
|
|
86
|
+
playerRef.current.seekTo(newTime <= duration ? newTime : duration);
|
|
87
|
+
}
|
|
88
|
+
}, children: jsx(Foward15, { fill: "currentColor" }) }), jsx(volumeControl, { children: audioVolume === 0 ? (jsx(volume, { onClick: () => onVolumeChange(0.1), children: jsx(MuteIcon, {}) })) : (jsxs(volume, { children: [jsx("div", { onClick: () => onVolumeChange(0), children: jsx(VolumeIcon, {}) }), jsx(volumeBar, { type: "range", min: "0", max: "1", value: audioVolume, className: "volumeBar", step: "0.1", onChange: (e) => onVolumeChange(Number(e.target.value)), currentInputValue: (audioVolume / 1) * 100 })] })) })] }), jsx(thumb, { style: {
|
|
89
|
+
...props.style,
|
|
90
|
+
backgroundImage: `url(${props.coverImage})` ?? `url(${defaultThumb})`
|
|
91
|
+
} }), jsxs(audioTimeline, { children: [jsx(timeText, { children: formatTime(playedSeconds) }), jsx(timeline, { type: "range", min: "0", max: duration, value: playedSeconds, className: "timeline", onChange: (e) => {
|
|
92
|
+
setPlayedSeconds(Number(e.target.value));
|
|
93
|
+
}, onMouseUp: (e) => {
|
|
94
|
+
const newPlayedSeconds = Number(e.target.value);
|
|
95
|
+
setPlayedSeconds(newPlayedSeconds);
|
|
96
|
+
const seekTime = (newPlayedSeconds / duration) * duration;
|
|
97
|
+
if (playerRef.current) {
|
|
98
|
+
playerRef.current.seekTo(seekTime);
|
|
99
|
+
}
|
|
100
|
+
}, onTouchEnd: (e) => {
|
|
101
|
+
const newPlayedSeconds = Number(e.target.value);
|
|
102
|
+
setPlayedSeconds(newPlayedSeconds);
|
|
103
|
+
const seekTime = (newPlayedSeconds / duration) * duration;
|
|
104
|
+
if (playerRef.current) {
|
|
105
|
+
playerRef.current.seekTo(seekTime);
|
|
106
|
+
}
|
|
107
|
+
}, currentInputValue: (playedSeconds / duration) * 100 }), jsx(timeText, { children: formatTime(duration) })] }), jsx(ReactPlayer, { ref: playerRef, url: props.audio, playing: isPlaying, onProgress: onProgress, onDuration: onDuration, onEnded: onEnded, volume: audioVolume, hidden: true })] }))] })] }) }) }));
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export { AudioPlayer as default };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
|
|
3
|
+
const AvatarImg = styled.img `
|
|
4
|
+
width: ${(props) => props.size || '120px'};
|
|
5
|
+
height: ${(props) => props.size || '120px'};
|
|
6
|
+
border-radius: 50%;
|
|
7
|
+
object-fit: cover;
|
|
8
|
+
background-image: url('https://lxp-cdn.frstfalconi.cloud/STORYBOOK/path582.svg');
|
|
9
|
+
background-size: cover;
|
|
10
|
+
border: ${(props) => props.border || 'none'};
|
|
11
|
+
|
|
12
|
+
${({ disabled }) => disabled === true &&
|
|
13
|
+
`
|
|
14
|
+
filter: grayscale(100%);
|
|
15
|
+
`}
|
|
16
|
+
`;
|
|
17
|
+
const AvatarWrapper = styled.div `
|
|
18
|
+
width: ${(props) => props.size || '120px'};
|
|
19
|
+
height: ${(props) => props.size || '120px'};
|
|
20
|
+
cursor: ${({ isActiveClick }) => isActiveClick ? 'pointer' : 'auto'} ;
|
|
21
|
+
box-sizing: border-box;
|
|
22
|
+
`;
|
|
23
|
+
|
|
24
|
+
export { AvatarImg, AvatarWrapper };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import '../../shared/global.css.js';
|
|
3
|
+
import { ThemeProvider } from 'styled-components';
|
|
4
|
+
import { FRSTTheme } from '../../theme/index.js';
|
|
5
|
+
import { AvatarWrapper, AvatarImg } from './avatarStyles.js';
|
|
6
|
+
import { useState, useEffect } from 'react';
|
|
7
|
+
|
|
8
|
+
function Avatar({ size, src, alt, className, disabled, onClick, isActiveClick, id, style, border }) {
|
|
9
|
+
const [isImage, setIsImage] = useState(!!src);
|
|
10
|
+
const defaultImg = 'https://lxp-cdn.frstfalconi.cloud/STORYBOOK/path582.svg';
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
setIsImage(!!src);
|
|
13
|
+
}, [src]);
|
|
14
|
+
return (jsx(ThemeProvider, { theme: FRSTTheme, children: jsx(AvatarWrapper, { size: size, className: className, onClick: onClick, isActiveClick: isActiveClick, id: id, style: style, children: isImage ? (jsx(AvatarImg, { border: border, src: src, size: size, disabled: disabled, onError: () => setIsImage(false) })) : (jsx(AvatarImg, { border: border, src: defaultImg, size: size, disabled: disabled })) }) }));
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { Avatar as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import '../../shared/global.css.js';
|
|
3
|
+
import { ContainerVotar, QuantidadeVotos, ButtonVotar, DivSeparador } from './votarStyles.js';
|
|
4
|
+
import { VotarIconPressed, VotarIcon } from '../../shared/icons.js';
|
|
5
|
+
|
|
6
|
+
function Votar(props) {
|
|
7
|
+
return props.user === 'userAutor' ? (jsxs(ContainerVotar, { children: [jsx(VotarIconPressed, {}), jsxs(QuantidadeVotos, { user: props.user, children: [props.valueQuantidade, " ", props.textValueQuantidade] })] })) : (jsxs(ContainerVotar, { children: [jsxs(ButtonVotar, { children: [props.votado ? jsx(VotarIconPressed, {}) : jsx(VotarIcon, {}), props.textButton] }), jsx(DivSeparador, {}), jsxs(QuantidadeVotos, { user: props.user, children: [props.valueQuantidade, " ", props.textValueQuantidade] })] }));
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { Votar as default };
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
|
|
3
|
+
const ContainerVotar = styled.div `
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: row;
|
|
6
|
+
align-items: center;
|
|
7
|
+
`;
|
|
8
|
+
const ButtonVotar = styled.button `
|
|
9
|
+
display: flex;
|
|
10
|
+
height: 32px;
|
|
11
|
+
width: 68px;
|
|
12
|
+
flex-direction: row;
|
|
13
|
+
align-items: center;
|
|
14
|
+
padding: 4px;
|
|
15
|
+
position: absolute;
|
|
16
|
+
width: 68px;
|
|
17
|
+
border-radius: 8px;
|
|
18
|
+
font-family: 'PT Sans';
|
|
19
|
+
background: transparent;
|
|
20
|
+
font-style: normal;
|
|
21
|
+
font-weight: 700;
|
|
22
|
+
font-size: 14px;
|
|
23
|
+
line-height: 18px;
|
|
24
|
+
display: flex;
|
|
25
|
+
align-items: center;
|
|
26
|
+
border: none;
|
|
27
|
+
color: #444444;
|
|
28
|
+
cursor: pointer;
|
|
29
|
+
margin-right: 1rem;
|
|
30
|
+
|
|
31
|
+
:hover {
|
|
32
|
+
background: #f2f2f2;
|
|
33
|
+
}
|
|
34
|
+
:active {
|
|
35
|
+
color: #f26818;
|
|
36
|
+
svg {
|
|
37
|
+
fill: #f26818;
|
|
38
|
+
path {
|
|
39
|
+
stroke: #ffff;
|
|
40
|
+
}
|
|
41
|
+
path :nth-child(3) {
|
|
42
|
+
stroke: blue;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
svg {
|
|
47
|
+
margin-right: 4px;
|
|
48
|
+
}
|
|
49
|
+
`;
|
|
50
|
+
const DivSeparador = styled.div `
|
|
51
|
+
margin-left: 4rem;
|
|
52
|
+
width: 24px;
|
|
53
|
+
height: 0px;
|
|
54
|
+
border: 0.5px solid #bdbdbd;
|
|
55
|
+
transform: rotate(-90deg);
|
|
56
|
+
`;
|
|
57
|
+
const QuantidadeVotos = styled.div `
|
|
58
|
+
display: flex;
|
|
59
|
+
flex-direction: row;
|
|
60
|
+
font-family: 'PT Sans';
|
|
61
|
+
font-style: normal;
|
|
62
|
+
font-weight: 500;
|
|
63
|
+
font-size: 14px;
|
|
64
|
+
line-height: 140%;
|
|
65
|
+
color: #444444;
|
|
66
|
+
margin: 0;
|
|
67
|
+
cursor: pointer;
|
|
68
|
+
|
|
69
|
+
:hover {
|
|
70
|
+
text-decoration-line: underline;
|
|
71
|
+
color: #0645ad;
|
|
72
|
+
}
|
|
73
|
+
:active {
|
|
74
|
+
text-decoration-line: underline;
|
|
75
|
+
color: #0645ad;
|
|
76
|
+
font-weight: 700;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
${(props) => props.user === 'userAutor' &&
|
|
80
|
+
css `
|
|
81
|
+
margin-left: 0.5rem;
|
|
82
|
+
`}
|
|
83
|
+
`;
|
|
84
|
+
|
|
85
|
+
export { ButtonVotar, ContainerVotar, DivSeparador, QuantidadeVotos };
|
|
@@ -0,0 +1,389 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
|
|
3
|
+
const colorVariants = {
|
|
4
|
+
'#F26818': { hover: '#ee4c15', pressed: '#d14211' },
|
|
5
|
+
'#E7AD00': { hover: '#D49F00', pressed: '#C79500' },
|
|
6
|
+
'#2457E3': { hover: '#2652CC', pressed: '#2A4DAC' },
|
|
7
|
+
'#27AA3D': { hover: '#1F9B33', pressed: '#238D35' },
|
|
8
|
+
'#9A37E1': { hover: '#8E29D6', pressed: '#7F28BE' },
|
|
9
|
+
'#E64040': { hover: '#D13A3A', pressed: '#C23636' } //vermelho
|
|
10
|
+
};
|
|
11
|
+
const LinkButton = styled.a `
|
|
12
|
+
border: none;
|
|
13
|
+
text-decoration: none;
|
|
14
|
+
${({ theme }) => theme.fonts.textMessageComponentsBodyBold}
|
|
15
|
+
color: ${({ theme }) => theme.colors.linkOnfocus};
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
outline: none;
|
|
18
|
+
box-sizing: border-box;
|
|
19
|
+
transition: all 0.2s ease-in-out;
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
|
|
23
|
+
&:hover {
|
|
24
|
+
color: ${({ theme }) => theme.colors.linkHover};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&:active {
|
|
28
|
+
color: ${({ theme }) => theme.colors.linkPressed};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&:focus {
|
|
32
|
+
color: ${({ theme }) => theme.colors.linkOnfocus};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
& > svg {
|
|
36
|
+
margin-right: 12px;
|
|
37
|
+
max-height: 16px;
|
|
38
|
+
height: 100%;
|
|
39
|
+
width: auto;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
${({ disabled }) => disabled &&
|
|
43
|
+
css `
|
|
44
|
+
pointer-events: none;
|
|
45
|
+
color: ${({ theme }) => theme.colors.linkDisabled};
|
|
46
|
+
`}
|
|
47
|
+
`;
|
|
48
|
+
const LinkButtonStartIcon = styled.a `
|
|
49
|
+
border: none;
|
|
50
|
+
text-decoration: none;
|
|
51
|
+
${({ theme }) => theme.fonts.textMessageComponentsBodyBold};
|
|
52
|
+
color: ${({ theme }) => theme.colors.linkOnfocus};
|
|
53
|
+
cursor: pointer;
|
|
54
|
+
outline: none;
|
|
55
|
+
box-sizing: border-box;
|
|
56
|
+
transition: all 0.2s ease-in-out;
|
|
57
|
+
display: flex;
|
|
58
|
+
align-items: center;
|
|
59
|
+
|
|
60
|
+
&:hover {
|
|
61
|
+
color: ${({ theme }) => theme.colors.linkHover};
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&:active {
|
|
65
|
+
color: ${({ theme }) => theme.colors.linkPressed};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&:focus {
|
|
69
|
+
color: ${({ theme }) => theme.colors.linkOnfocus};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
& > svg {
|
|
73
|
+
margin-right: 8px;
|
|
74
|
+
max-height: ${({ sizeIcon }) => (sizeIcon ? sizeIcon : '16px')};
|
|
75
|
+
height: 100%;
|
|
76
|
+
width: auto;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
${({ disabled }) => disabled &&
|
|
80
|
+
css `
|
|
81
|
+
pointer-events: none;
|
|
82
|
+
color: ${({ theme }) => theme.colors.linkDisabled};
|
|
83
|
+
`}
|
|
84
|
+
`;
|
|
85
|
+
const LinkButtonEndIcon = styled.a `
|
|
86
|
+
border: none;
|
|
87
|
+
text-decoration: none;
|
|
88
|
+
${({ theme }) => theme.fonts.textMessageComponentsBodyBold}
|
|
89
|
+
color: ${({ theme }) => theme.colors.linkOnfocus};
|
|
90
|
+
cursor: pointer;
|
|
91
|
+
outline: none;
|
|
92
|
+
box-sizing: border-box;
|
|
93
|
+
transition: all 0.2s ease-in-out;
|
|
94
|
+
display: flex;
|
|
95
|
+
align-items: center;
|
|
96
|
+
|
|
97
|
+
&:hover {
|
|
98
|
+
color: ${({ theme }) => theme.colors.linkHover};
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
&:active {
|
|
102
|
+
color: ${({ theme }) => theme.colors.linkPressed};
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&:focus {
|
|
106
|
+
color: ${({ theme }) => theme.colors.linkOnfocus};
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
& > svg {
|
|
110
|
+
margin-left: 12px;
|
|
111
|
+
max-height: ${({ sizeIcon }) => (sizeIcon ? sizeIcon : '16px')};
|
|
112
|
+
height: 100%;
|
|
113
|
+
width: auto;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
${({ disabled }) => disabled &&
|
|
117
|
+
css `
|
|
118
|
+
pointer-events: none;
|
|
119
|
+
color: ${({ theme }) => theme.colors.linkDisabled};
|
|
120
|
+
`}
|
|
121
|
+
`;
|
|
122
|
+
const variantStyles = (variant = 'contained', backgroundColor) => ({
|
|
123
|
+
primary: ({ theme }) => {
|
|
124
|
+
const isDefault = !backgroundColor || backgroundColor === '#F26818';
|
|
125
|
+
const baseColor = isDefault ? '#F26818' : backgroundColor;
|
|
126
|
+
const hoverColor = isDefault
|
|
127
|
+
? colorVariants['#F26818'].hover
|
|
128
|
+
: colorVariants[backgroundColor]?.hover || baseColor;
|
|
129
|
+
const pressedColor = isDefault
|
|
130
|
+
? colorVariants['#F26818'].pressed
|
|
131
|
+
: colorVariants[backgroundColor]?.pressed || baseColor;
|
|
132
|
+
return css `
|
|
133
|
+
background-color: ${baseColor};
|
|
134
|
+
color: ${theme.colors.shadeWhite};
|
|
135
|
+
|
|
136
|
+
&:hover {
|
|
137
|
+
background-color: ${hoverColor};
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
&:active {
|
|
141
|
+
background-color: ${pressedColor};
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
&:focus {
|
|
145
|
+
border: 2px solid ${baseColor}4D;
|
|
146
|
+
-webkit-background-clip: padding-box;
|
|
147
|
+
background-clip: padding-box;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
&:disabled {
|
|
151
|
+
background-color: ${theme.colors.neutralsGrey5};
|
|
152
|
+
cursor: not-allowed;
|
|
153
|
+
pointer-events: none;
|
|
154
|
+
}
|
|
155
|
+
`;
|
|
156
|
+
},
|
|
157
|
+
secondary: css `
|
|
158
|
+
background-color: transparent;
|
|
159
|
+
color: ${({ theme }) => theme.colors.primary1};
|
|
160
|
+
border: 1px solid ${({ theme }) => theme.colors.primary1};
|
|
161
|
+
|
|
162
|
+
&:hover {
|
|
163
|
+
color: ${({ theme }) => theme.colors.primary2};
|
|
164
|
+
border: 1px solid ${({ theme }) => theme.colors.primary2};
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
&:active {
|
|
168
|
+
color: ${({ theme }) => theme.colors.primary3};
|
|
169
|
+
border: 1px solid ${({ theme }) => theme.colors.primary3};
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
&:focus {
|
|
173
|
+
border: 2px solid ${({ theme }) => theme.colors.primary1}4D;
|
|
174
|
+
-webkit-background-clip: padding-box;
|
|
175
|
+
background-clip: padding-box;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
&:disabled {
|
|
179
|
+
color: ${({ theme }) => theme.colors.neutralsGrey5};
|
|
180
|
+
border: 1px solid ${({ theme }) => theme.colors.neutralsGrey5};
|
|
181
|
+
cursor: not-allowed;
|
|
182
|
+
pointer-events: none;
|
|
183
|
+
}
|
|
184
|
+
`,
|
|
185
|
+
expandedPrimary: ({ theme }) => {
|
|
186
|
+
const isDefault = !backgroundColor || backgroundColor === '#F26818';
|
|
187
|
+
const baseColor = isDefault ? '#F26818' : backgroundColor;
|
|
188
|
+
const hoverColor = isDefault
|
|
189
|
+
? colorVariants['#F26818'].hover
|
|
190
|
+
: colorVariants[backgroundColor]?.hover || baseColor;
|
|
191
|
+
const pressedColor = isDefault
|
|
192
|
+
? colorVariants['#F26818'].pressed
|
|
193
|
+
: colorVariants[backgroundColor]?.pressed || baseColor;
|
|
194
|
+
return css `
|
|
195
|
+
background-color: ${baseColor};
|
|
196
|
+
color: ${theme.colors.shadeWhite};
|
|
197
|
+
width: 100%;
|
|
198
|
+
|
|
199
|
+
&:hover {
|
|
200
|
+
background-color: ${hoverColor};
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
&:active {
|
|
204
|
+
background-color: ${pressedColor};
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
&:focus {
|
|
208
|
+
border: 2px solid ${baseColor}4D;
|
|
209
|
+
-webkit-background-clip: padding-box;
|
|
210
|
+
background-clip: padding-box;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
&:disabled {
|
|
214
|
+
background-color: ${theme.colors.neutralsGrey5};
|
|
215
|
+
cursor: not-allowed;
|
|
216
|
+
pointer-events: none;
|
|
217
|
+
}
|
|
218
|
+
`;
|
|
219
|
+
},
|
|
220
|
+
expandedSecondary: css `
|
|
221
|
+
background-color: transparent;
|
|
222
|
+
color: ${({ theme }) => theme.colors.primary1};
|
|
223
|
+
border: 1px solid ${({ theme }) => theme.colors.primary1};
|
|
224
|
+
width: 100%;
|
|
225
|
+
|
|
226
|
+
&:hover {
|
|
227
|
+
color: ${({ theme }) => theme.colors.primary2};
|
|
228
|
+
border: 1px solid ${({ theme }) => theme.colors.primary2};
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
&:active {
|
|
232
|
+
color: ${({ theme }) => theme.colors.primary3};
|
|
233
|
+
border: 1px solid ${({ theme }) => theme.colors.primary3};
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
&:focus {
|
|
237
|
+
border: 2px solid ${({ theme }) => theme.colors.primary1}4D;
|
|
238
|
+
-webkit-background-clip: padding-box;
|
|
239
|
+
background-clip: padding-box;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
&:disabled {
|
|
243
|
+
color: ${({ theme }) => theme.colors.neutralsGrey5};
|
|
244
|
+
border: 1px solid ${({ theme }) => theme.colors.neutralsGrey5};
|
|
245
|
+
cursor: not-allowed;
|
|
246
|
+
pointer-events: none;
|
|
247
|
+
}
|
|
248
|
+
`
|
|
249
|
+
}[variant]);
|
|
250
|
+
const Button = styled.button `
|
|
251
|
+
display: flex;
|
|
252
|
+
flex-direction: row;
|
|
253
|
+
align-items: center;
|
|
254
|
+
justify-content: center;
|
|
255
|
+
padding: 9px 16px;
|
|
256
|
+
height: 48px;
|
|
257
|
+
border: none;
|
|
258
|
+
cursor: pointer;
|
|
259
|
+
border-radius: 8px;
|
|
260
|
+
box-sizing: border-box;
|
|
261
|
+
transition: all 0.2s ease-in-out;
|
|
262
|
+
font-family: 'Work Sans';
|
|
263
|
+
font-style: normal;
|
|
264
|
+
font-weight: 700;
|
|
265
|
+
font-size: 16px;
|
|
266
|
+
line-height: 19px;
|
|
267
|
+
box-shadow: none;
|
|
268
|
+
|
|
269
|
+
${({ variant, backgroundColor }) => variantStyles(variant, backgroundColor)}
|
|
270
|
+
|
|
271
|
+
${({ theme, length }) => theme.type === 'group' &&
|
|
272
|
+
length === 2 &&
|
|
273
|
+
`
|
|
274
|
+
&:first-child {
|
|
275
|
+
border-radius: 4px 0px 0px 4px;
|
|
276
|
+
border-right: 1px solid rgba(255, 255, 255, 0.5) !important;
|
|
277
|
+
border-left: none !important;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
&:last-child {
|
|
281
|
+
border-radius: 0px 4px 4px 0px;
|
|
282
|
+
border: none !important;
|
|
283
|
+
}
|
|
284
|
+
`}
|
|
285
|
+
|
|
286
|
+
${({ theme, length }) => theme.type === 'group' &&
|
|
287
|
+
length > 2 &&
|
|
288
|
+
`
|
|
289
|
+
border-radius: 0px;
|
|
290
|
+
|
|
291
|
+
border-right: 1px solid rgba(255, 255, 255, 0.5);
|
|
292
|
+
border-left: 1px solid rgba(255, 255, 255, 0.5);
|
|
293
|
+
|
|
294
|
+
&:focus,
|
|
295
|
+
&:active {
|
|
296
|
+
border-right: 1px solid rgba(255, 255, 255, 0.5) !important;
|
|
297
|
+
border-left: 1px solid rgba(255, 255, 255, 0.5) !important;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
&:first-child {
|
|
301
|
+
border-radius: 4px 0px 0px 4px;
|
|
302
|
+
border: none !important;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
&:last-child {
|
|
306
|
+
border-radius: 0px 4px 4px 0px;
|
|
307
|
+
border: none !important;
|
|
308
|
+
}
|
|
309
|
+
`}
|
|
310
|
+
|
|
311
|
+
${({ active }) => active === true &&
|
|
312
|
+
css `
|
|
313
|
+
background: #d14211;
|
|
314
|
+
`}
|
|
315
|
+
|
|
316
|
+
/* AQUI COMEÇA A ADIÇÃO NOVA: */
|
|
317
|
+
|
|
318
|
+
${({ backgroundColor }) => backgroundColor &&
|
|
319
|
+
backgroundColor !== '#F26818' &&
|
|
320
|
+
css `
|
|
321
|
+
background-color: ${backgroundColor};
|
|
322
|
+
|
|
323
|
+
&:hover {
|
|
324
|
+
background-color: ${colorVariants[backgroundColor]?.hover || backgroundColor};
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
&:active {
|
|
328
|
+
background-color: ${colorVariants[backgroundColor]?.pressed || backgroundColor};
|
|
329
|
+
}
|
|
330
|
+
`}
|
|
331
|
+
`;
|
|
332
|
+
const ButtonStartIcon = styled.button `
|
|
333
|
+
display: flex;
|
|
334
|
+
flex-direction: row;
|
|
335
|
+
align-items: center;
|
|
336
|
+
justify-content: center;
|
|
337
|
+
padding: 9px 16px;
|
|
338
|
+
height: 48px;
|
|
339
|
+
border: none;
|
|
340
|
+
cursor: pointer;
|
|
341
|
+
border-radius: 8px;
|
|
342
|
+
box-sizing: border-box;
|
|
343
|
+
transition: all 0.2s ease-in-out;
|
|
344
|
+
font-family: 'Work Sans';
|
|
345
|
+
font-style: normal;
|
|
346
|
+
font-weight: 700;
|
|
347
|
+
font-size: 16px;
|
|
348
|
+
line-height: 19px;
|
|
349
|
+
box-shadow: none;
|
|
350
|
+
|
|
351
|
+
& > svg {
|
|
352
|
+
margin-right: 12px;
|
|
353
|
+
max-height: ${({ sizeIcon }) => (sizeIcon ? sizeIcon : '16px')};
|
|
354
|
+
height: 100%;
|
|
355
|
+
width: auto;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
${({ variant, backgroundColor }) => variantStyles(variant, backgroundColor)}
|
|
359
|
+
`;
|
|
360
|
+
const ButtonEndIcon = styled.button `
|
|
361
|
+
display: flex;
|
|
362
|
+
flex-direction: row;
|
|
363
|
+
align-items: center;
|
|
364
|
+
justify-content: center;
|
|
365
|
+
padding: 9px 16px;
|
|
366
|
+
height: 48px;
|
|
367
|
+
border: none;
|
|
368
|
+
cursor: pointer;
|
|
369
|
+
border-radius: 8px;
|
|
370
|
+
box-sizing: border-box;
|
|
371
|
+
transition: all 0.2s ease-in-out;
|
|
372
|
+
font-family: 'Work Sans';
|
|
373
|
+
font-style: normal;
|
|
374
|
+
font-weight: 700;
|
|
375
|
+
font-size: 16px;
|
|
376
|
+
line-height: 19px;
|
|
377
|
+
box-shadow: none;
|
|
378
|
+
|
|
379
|
+
& > svg {
|
|
380
|
+
margin-left: 12px;
|
|
381
|
+
max-height: ${({ sizeIcon }) => (sizeIcon ? sizeIcon : '16px')};
|
|
382
|
+
height: 100%;
|
|
383
|
+
width: auto;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
${({ variant, backgroundColor }) => variantStyles(variant, backgroundColor)}
|
|
387
|
+
`;
|
|
388
|
+
|
|
389
|
+
export { Button, ButtonEndIcon, ButtonStartIcon, LinkButton, LinkButtonEndIcon, LinkButtonStartIcon };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { useEffect } from 'react';
|
|
3
|
+
import '../../shared/global.css.js';
|
|
4
|
+
import { ThemeProvider } from 'styled-components';
|
|
5
|
+
import { FRSTTheme } from '../../theme/index.js';
|
|
6
|
+
import { LinkButtonStartIcon, ButtonStartIcon, LinkButtonEndIcon, ButtonEndIcon, LinkButton, Button as Button$1 } from './buttonStyle.js';
|
|
7
|
+
|
|
8
|
+
function Button({ variant, label, sizeIcon, disabled, startIcon, endIcon, handleClick, type, active, style, value, length, id, ref, handleMount, buttonProps, backgroundColor, }) {
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
if (handleMount && id) {
|
|
11
|
+
handleMount(id);
|
|
12
|
+
}
|
|
13
|
+
}, [id]);
|
|
14
|
+
return (jsx(ThemeProvider, { theme: { ...FRSTTheme, type: type }, children: startIcon ?
|
|
15
|
+
(variant === 'link') ?
|
|
16
|
+
jsxs(LinkButtonStartIcon, { ref: ref, style: { ...style }, disabled: disabled, onClick: handleClick, sizeIcon: sizeIcon, id: id, children: [startIcon, label] })
|
|
17
|
+
:
|
|
18
|
+
jsxs(ButtonStartIcon, { backgroundColor: backgroundColor, ...buttonProps, ref: ref, style: { ...style }, variant: variant, disabled: disabled, onClick: handleClick, sizeIcon: sizeIcon, id: id, children: [startIcon, label] })
|
|
19
|
+
: endIcon ?
|
|
20
|
+
(variant === 'link') ?
|
|
21
|
+
jsxs(LinkButtonEndIcon, { ref: ref, style: { ...style }, disabled: disabled, onClick: handleClick, sizeIcon: sizeIcon, id: id, children: [label, endIcon] })
|
|
22
|
+
:
|
|
23
|
+
jsxs(ButtonEndIcon, { backgroundColor: backgroundColor, ...buttonProps, ref: ref, style: { ...style }, variant: variant, disabled: disabled, onClick: handleClick, sizeIcon: sizeIcon, id: id, children: [label, endIcon] })
|
|
24
|
+
:
|
|
25
|
+
(variant === 'link') ?
|
|
26
|
+
jsx(LinkButton, { ref: ref, style: { ...style }, disabled: disabled, onClick: handleClick, id: id, children: label })
|
|
27
|
+
:
|
|
28
|
+
jsx(Button$1, { ...buttonProps, backgroundColor: backgroundColor, ref: ref, style: { ...style }, length: length, active: active, value: value, variant: variant, disabled: disabled, onClick: handleClick, id: id, children: label }) }));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export { Button as default };
|