contentoh-components-library 21.4.74 → 21.4.77
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/dist/assets/images/Icons/addv2.svg +8 -0
- package/dist/assets/images/Icons/checkv2.svg +8 -0
- package/dist/assets/images/Icons/options.svg +3 -0
- package/dist/assets/images/Icons/trash.svg +8 -0
- package/dist/assets/images/Icons/undo.svg +8 -0
- package/dist/assets/images/Icons/warningv2.svg +3 -0
- package/dist/assets/images/checkBox/checkrosa.svg +3 -0
- package/dist/assets/images/checkBox/checkverde.svg +3 -0
- package/dist/components/atoms/Avatar/index.js +3 -2
- package/dist/components/atoms/ButtonV2/ButtonV2.stories.js +1 -1
- package/dist/components/atoms/ButtonV2/index.js +1 -1
- package/dist/components/atoms/ButtonV2/styles.js +1 -1
- package/dist/components/atoms/CheckBox/CheckBox.stories.js +8 -1
- package/dist/components/atoms/CheckBox/index.js +8 -0
- package/dist/components/atoms/CheckBox/styles.js +8 -1
- package/dist/components/atoms/GeneralButton/styles.js +6 -2
- package/dist/components/atoms/InputFormatter/styles.js +3 -3
- package/dist/components/atoms/ObservationFlag/ObservationFlag.stories.js +38 -0
- package/dist/components/atoms/ObservationFlag/index.js +52 -0
- package/dist/components/atoms/ObservationFlag/styles.js +18 -0
- package/dist/components/atoms/SliderToolTip/styles.js +1 -1
- package/dist/components/molecules/BoxAttribute/index.js +3 -3
- package/dist/components/molecules/BoxAttribute/styles.js +1 -1
- package/dist/components/molecules/BoxButtons/index.js +0 -1
- package/dist/components/molecules/CarouselImagesLogin/index.js +1 -1
- package/dist/components/molecules/GroupSelect/GroupSelect.stories.js +53 -0
- package/dist/components/molecules/GroupSelect/SelectItem.js +142 -0
- package/dist/components/molecules/GroupSelect/index.js +254 -0
- package/dist/components/molecules/GroupSelect/styles.js +25 -0
- package/dist/components/molecules/HeaderTop/index.js +68 -11
- package/dist/components/molecules/Phase/index.js +205 -43
- package/dist/components/molecules/Phase/styles.js +1 -1
- package/dist/components/molecules/ProductNameHeader/index.js +8 -3
- package/dist/components/molecules/SignInLogin/index.js +36 -28
- package/dist/components/molecules/StripeCardSelector/CardSelector.stories.js +1 -2
- package/dist/components/organisms/Chat/Chat.stories.js +27 -8
- package/dist/components/organisms/Chat/ContainerItems/index.js +19 -3
- package/dist/components/organisms/Chat/ContainerItems/styles.js +1 -1
- package/dist/components/organisms/Chat/ContentChat/index.js +350 -197
- package/dist/components/organisms/Chat/Footer/index.js +48 -39
- package/dist/components/organisms/Chat/index.js +49 -4
- package/dist/components/organisms/Chat/styles.js +1 -1
- package/dist/components/organisms/DashboardMetric/index.js +12 -6
- package/dist/components/organisms/DragAndDropPhases/DragAndDropPhases.stories.js +26 -1
- package/dist/components/organisms/DragAndDropPhases/index.js +262 -32
- package/dist/components/organisms/DragAndDropPhases/styles.js +8 -4
- package/dist/components/organisms/EditGroup/EditGroup.stories.js +39 -0
- package/dist/components/organisms/EditGroup/index.js +242 -0
- package/dist/components/organisms/EditGroup/styles.js +36 -0
- package/dist/components/organisms/FullProductNameHeader/index.js +5 -3
- package/dist/components/organisms/InputGroup/index.js +1 -10
- package/dist/components/organisms/Modal/Modal.stories.js +2 -1
- package/dist/components/organisms/Modal/index.js +6 -1
- package/dist/components/organisms/Modal/styles.js +1 -1
- package/dist/components/organisms/VersionSelector/index.js +101 -169
- package/dist/components/pages/Dashboard/Dashboard.stories.js +33 -36
- package/dist/components/pages/Dashboard/index.js +37 -9
- package/dist/components/pages/ProviderProductEdition/index.js +120 -144
- package/dist/components/pages/ProviderProductEdition/styles.js +1 -1
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +4 -0
- package/dist/components/pages/RetailerProductEdition/index.js +322 -406
- package/dist/components/pages/RetailerProductEdition/styles.js +1 -1
- package/dist/components/pages/RetailerProductEdition/utils.js +61 -2
- package/dist/global-files/data.js +11 -3
- package/dist/global-files/variables.js +7 -1
- package/dist/index.js +201 -58
- package/package.json +3 -1
- package/src/assets/images/Icons/addv2.svg +8 -0
- package/src/assets/images/Icons/checkv2.svg +8 -0
- package/src/assets/images/Icons/infoNR.svg +8 -0
- package/src/assets/images/Icons/options.svg +3 -0
- package/src/assets/images/Icons/trash.svg +8 -0
- package/src/assets/images/Icons/undo.svg +8 -0
- package/src/assets/images/Icons/warningv2.svg +3 -0
- package/src/assets/images/checkBox/checkrosa.svg +3 -0
- package/src/assets/images/checkBox/checkverde.svg +3 -0
- package/src/assets/images/flagsv2/highPriority.svg +3 -0
- package/src/assets/images/flagsv2/lowPriority.svg +3 -0
- package/src/assets/images/flagsv2/mediumPriority.svg +3 -0
- package/src/assets/images/flagsv2/noPriority.svg +3 -0
- package/src/assets/images/generalButton/closeIconWhite.svg +4 -0
- package/src/assets/images/generalButton/closeIconv2.svg +4 -0
- package/src/components/atoms/Avatar/index.js +8 -2
- package/src/components/atoms/ButtonV2/ButtonV2.stories.js +1 -0
- package/src/components/atoms/ButtonV2/index.js +1 -0
- package/src/components/atoms/ButtonV2/styles.js +16 -0
- package/src/components/atoms/CharsMissing/Wysiwyg.stories.js +12 -0
- package/src/components/atoms/CharsMissing/index.js +60 -0
- package/src/components/atoms/CharsMissing/styles.js +44 -0
- package/src/components/atoms/CheckBox/CheckBox.stories.js +5 -0
- package/src/components/atoms/CheckBox/index.js +5 -1
- package/src/components/atoms/CheckBox/styles.js +9 -3
- package/src/components/atoms/FeatureTagv2/FeatureTagv2.stories.js +16 -0
- package/src/components/atoms/FeatureTagv2/index.js +10 -0
- package/src/components/atoms/FeatureTagv2/styles.js +56 -0
- package/src/components/atoms/GeneralButton/styles.js +46 -0
- package/src/components/atoms/GeneralInputv2/GeneralInputv2.stories.js +33 -0
- package/src/components/atoms/GeneralInputv2/index.js +155 -0
- package/src/components/atoms/GeneralInputv2/styles.js +67 -0
- package/src/components/atoms/ImageCarousel/ImgeSlider.stories.js +76 -0
- package/src/components/atoms/ImageCarousel/index.js +103 -0
- package/src/components/atoms/ImageCarousel/styles.js +79 -0
- package/src/components/atoms/InputFormatter/styles.js +9 -4
- package/src/components/atoms/InputFormatterv2/Wysiwyg.stories.js +12 -0
- package/src/components/atoms/InputFormatterv2/index.js +148 -0
- package/src/components/atoms/InputFormatterv2/styles.js +39 -0
- package/src/components/atoms/InputImages/InputImages.stories.js +19 -0
- package/src/components/atoms/InputImages/index.js +25 -0
- package/src/components/atoms/InputImages/styles.js +17 -0
- package/src/components/atoms/NumberMandatory/NumberMandatory.stories.js +19 -0
- package/src/components/atoms/NumberMandatory/index.js +16 -0
- package/src/components/atoms/NumberMandatory/styles.js +11 -0
- package/src/components/atoms/ObservationFlag/ObservationFlag.stories.js +20 -0
- package/src/components/atoms/ObservationFlag/index.js +33 -0
- package/src/components/atoms/ObservationFlag/styles.js +3 -0
- package/src/components/atoms/PercentTag/PercentTag.stories.js +7 -0
- package/src/components/atoms/PercentTag/index.js +9 -0
- package/src/components/atoms/PercentTag/styles.js +69 -0
- package/src/components/atoms/PriorityFlagv2/PriorityFlagv2.stories.js +20 -0
- package/src/components/atoms/PriorityFlagv2/index.js +20 -0
- package/src/components/atoms/PriorityFlagv2/styles.js +6 -0
- package/src/components/atoms/ProductImagev2/ProductImagev2.stories.js +28 -0
- package/src/components/atoms/ProductImagev2/index.js +16 -0
- package/src/components/atoms/ProductImagev2/styles.js +62 -0
- package/src/components/atoms/Progress/Progress.stories.js +25 -0
- package/src/components/atoms/Progress/index.js +74 -0
- package/src/components/atoms/Progress/styles.js +98 -0
- package/src/components/atoms/RatingStars/RatingStars.stories.js +10 -0
- package/src/components/atoms/RatingStars/index.js +31 -0
- package/src/components/atoms/RatingStars/styles.js +28 -0
- package/src/components/atoms/RetailerCatalog/RetailerCatalog.stories.js +36 -0
- package/src/components/atoms/RetailerCatalog/index.js +49 -0
- package/src/components/atoms/RetailerCatalog/styles.js +30 -0
- package/src/components/atoms/RetailerOption/RetailerOption.stories.js +15 -0
- package/src/components/atoms/RetailerOption/index.js +53 -0
- package/src/components/atoms/RetailerOption/styles.js +41 -0
- package/src/components/atoms/RetailersList/RetailersList.stories.js +33 -0
- package/src/components/atoms/RetailersList/index.js +20 -0
- package/src/components/atoms/RetailersList/styles.js +19 -0
- package/src/components/atoms/ScreenHeaderv2/ScreenHeaderv2.stories.js +53 -0
- package/src/components/atoms/ScreenHeaderv2/index.js +134 -0
- package/src/components/atoms/ScreenHeaderv2/styles.js +103 -0
- package/src/components/atoms/Selectv2/VersionSelect.js +27 -0
- package/src/components/atoms/Selectv2/index.js +35 -0
- package/src/components/atoms/Selectv2/style.js +93 -0
- package/src/components/atoms/SliderToolTip/styles.js +1 -1
- package/src/components/atoms/TabSection/index.js +1 -1
- package/src/components/atoms/TabSection/styles.js +1 -1
- package/src/components/atoms/TabSectionv2/TabSection.stories.js +25 -0
- package/src/components/atoms/TabSectionv2/index.js +9 -0
- package/src/components/atoms/TabSectionv2/styles.js +20 -0
- package/src/components/atoms/TooltipLight/Tooltip.stories.js +20 -0
- package/src/components/atoms/TooltipLight/index.js +46 -0
- package/src/components/atoms/TooltipLight/styles.js +65 -0
- package/src/components/atoms/UserCatalog/UserCatalog.stories.js +67 -0
- package/src/components/atoms/UserCatalog/index.js +100 -0
- package/src/components/atoms/UserCatalog/styles.js +24 -0
- package/src/components/atoms/UserOption/UserOption.stories.js +25 -0
- package/src/components/atoms/UserOption/index.js +95 -0
- package/src/components/atoms/UserOption/styles.js +61 -0
- package/src/components/atoms/UserSelector/UserSelector.stories.js +25 -0
- package/src/components/atoms/UserSelector/index.js +86 -0
- package/src/components/atoms/UserSelector/styles.js +55 -0
- package/src/components/atoms/WordsMissing/Wysiwyg.stories.js +12 -0
- package/src/components/atoms/WordsMissing/index.js +60 -0
- package/src/components/atoms/WordsMissing/styles.js +10 -0
- package/src/components/molecules/AsignationInfo/AsignationInfo.stories.js +17 -0
- package/src/components/molecules/AsignationInfo/index.js +108 -0
- package/src/components/molecules/AsignationInfo/styles.js +86 -0
- package/src/components/molecules/BoxAttribute/index.js +32 -25
- package/src/components/molecules/BoxAttribute/styles.js +1 -1
- package/src/components/molecules/BoxButtons/index.js +23 -22
- package/src/components/molecules/CarouselImagesLogin/index.js +1 -1
- package/src/components/molecules/EditionActiveImagev2/EditionActiveImagev2.stories.js +12 -0
- package/src/components/molecules/EditionActiveImagev2/index.js +15 -0
- package/src/components/molecules/EditionActiveImagev2/styles.js +7 -0
- package/src/components/molecules/FeaturesBarv2/FeaturesBarv2.stories.js +20 -0
- package/src/components/molecules/FeaturesBarv2/index.js +32 -0
- package/src/components/molecules/FeaturesBarv2/styles.js +17 -0
- package/src/components/molecules/GalleryElementv2/GalleryElementv2.stories.js +30 -0
- package/src/components/molecules/GalleryElementv2/index.js +142 -0
- package/src/components/molecules/GalleryElementv2/styles.js +119 -0
- package/src/components/molecules/GalleryHeaderv2/GalleryHeaderv2.stories.js +10 -0
- package/src/components/molecules/GalleryHeaderv2/index.js +25 -0
- package/src/components/molecules/GalleryHeaderv2/styles.js +47 -0
- package/src/components/molecules/GridItem/GridItem.stories.js +126 -0
- package/src/components/molecules/GridItem/index.js +105 -0
- package/src/components/molecules/GridItem/styles.js +104 -0
- package/src/components/molecules/GroupSelect/GroupSelect.stories.js +35 -0
- package/src/components/molecules/GroupSelect/SelectItem.js +105 -0
- package/src/components/molecules/GroupSelect/index.js +190 -0
- package/src/components/molecules/GroupSelect/styles.js +124 -0
- package/src/components/molecules/HeaderItem/ColumnItem.js +9 -0
- package/src/components/molecules/HeaderItem/HeaderItem.stories.js +24 -0
- package/src/components/molecules/HeaderItem/index.js +26 -0
- package/src/components/molecules/HeaderItem/styles.js +27 -0
- package/src/components/molecules/HeaderTop/index.js +52 -6
- package/src/components/molecules/HeaderTopv2/HeaderTopv2.stories.js +10 -0
- package/src/components/molecules/HeaderTopv2/index.js +100 -0
- package/src/components/molecules/HeaderTopv2/styles.js +33 -0
- package/src/components/molecules/ImageSelectorv2/ImageSelectorv2.stories.js +46 -0
- package/src/components/molecules/ImageSelectorv2/index.js +22 -0
- package/src/components/molecules/ImageSelectorv2/styles.js +15 -0
- package/src/components/molecules/Phase/Phase.stories.js +37 -0
- package/src/components/molecules/Phase/index.js +185 -0
- package/src/components/molecules/Phase/styles.js +91 -0
- package/src/components/molecules/ProductNameHeader/index.js +5 -1
- package/src/components/molecules/ProductNameHeaderv2/ProductNameHeaderv2.stories.js +37 -0
- package/src/components/molecules/ProductNameHeaderv2/index.js +12 -0
- package/src/components/molecules/ProductNameHeaderv2/styles.js +10 -0
- package/src/components/molecules/ProductSkuStatus/ProductSkuStatus.stories.js +37 -0
- package/src/components/molecules/ProductSkuStatus/index.js +26 -0
- package/src/components/molecules/ProductSkuStatus/styles.js +7 -0
- package/src/components/molecules/RetailerSelectorv2/RetailerSelectorv2.stories.js +35 -0
- package/src/components/molecules/RetailerSelectorv2/index.js +80 -0
- package/src/components/molecules/RetailerSelectorv2/styles.js +21 -0
- package/src/components/molecules/RowItem/ColumnItem.js +9 -0
- package/src/components/molecules/RowItem/RowItem.stories.js +5660 -0
- package/src/components/molecules/RowItem/index.js +45 -0
- package/src/components/molecules/RowItem/styles.js +40 -0
- package/src/components/molecules/ServiceDataValidator/ServiceDataValidator.stories.js +90 -0
- package/src/components/molecules/ServiceDataValidator/index.js +49 -0
- package/src/components/molecules/ServiceDataValidator/styles.js +36 -0
- package/src/components/molecules/SignInLogin/index.js +11 -11
- package/src/components/molecules/StatusRetailer/StatusAsignationInfo.stories.js +17 -0
- package/src/components/molecules/StatusRetailer/index.js +55 -0
- package/src/components/molecules/StatusRetailer/styles.js +85 -0
- package/src/components/molecules/StripeCardSelector/CardSelector.stories.js +1 -2
- package/src/components/molecules/TabsMenuv2/TabsMenuv2.stories.js +19 -0
- package/src/components/molecules/TabsMenuv2/index.js +112 -0
- package/src/components/molecules/TabsMenuv2/styles.js +19 -0
- package/src/components/molecules/TagAndInput/index.js +6 -5
- package/src/components/molecules/TagAndInputv2/TagAndInputv2.stories.js +24 -0
- package/src/components/molecules/TagAndInputv2/index.js +86 -0
- package/src/components/molecules/TagAndInputv2/styles.js +35 -0
- package/src/components/molecules/Validation/Validation.stories.js +12 -0
- package/src/components/molecules/Validation/index.js +77 -0
- package/src/components/molecules/Validation/styles.js +19 -0
- package/src/components/molecules/VersionItemv2/VersionItemv2.stories.js +14 -0
- package/src/components/molecules/VersionItemv2/index.js +59 -0
- package/src/components/molecules/VersionItemv2/styles.js +47 -0
- package/src/components/organisms/BarButtons/BarButtons.stories.js +13 -0
- package/src/components/organisms/BarButtons/index.js +150 -0
- package/src/components/organisms/BarButtons/styles.js +54 -0
- package/src/components/organisms/Chat/Chat.stories.js +27 -7
- package/src/components/organisms/Chat/ContainerItems/index.js +18 -2
- package/src/components/organisms/Chat/ContainerItems/styles.js +14 -2
- package/src/components/organisms/Chat/ContentChat/index.js +88 -12
- package/src/components/organisms/Chat/Footer/index.js +11 -0
- package/src/components/organisms/Chat/index.js +46 -4
- package/src/components/organisms/Chat/styles.js +4 -0
- package/src/components/organisms/Chatv2/ChatLists/ChatLists.stories.js +65 -0
- package/src/components/organisms/Chatv2/ChatLists/Rotoplas.jpeg +0 -0
- package/src/components/organisms/Chatv2/ChatLists/THD.png +0 -0
- package/src/components/organisms/Chatv2/ChatLists/index.js +141 -0
- package/src/components/organisms/Chatv2/ChatLists/styles.js +162 -0
- package/src/components/organisms/Chatv2/Chatv2.stories.js +184 -0
- package/src/components/organisms/Chatv2/ContainerItems/ContainerItems.stories.js +142 -0
- package/src/components/organisms/Chatv2/ContainerItems/index.js +538 -0
- package/src/components/organisms/Chatv2/ContainerItems/styles.js +360 -0
- package/src/components/organisms/Chatv2/ContentChat/ContentChat.stories.js +102 -0
- package/src/components/organisms/Chatv2/ContentChat/Rotoplas.jpeg +0 -0
- package/src/components/organisms/Chatv2/ContentChat/THD.png +0 -0
- package/src/components/organisms/Chatv2/ContentChat/index.js +1016 -0
- package/src/components/organisms/Chatv2/ContentChat/styles.js +44 -0
- package/src/components/organisms/Chatv2/Footer/Footer.stories.js +22 -0
- package/src/components/organisms/Chatv2/Footer/index.js +668 -0
- package/src/components/organisms/Chatv2/Footer/styles.js +290 -0
- package/src/components/organisms/Chatv2/Header/Header.stories.js +66 -0
- package/src/components/organisms/Chatv2/Header/index.js +93 -0
- package/src/components/organisms/Chatv2/Header/styles.js +49 -0
- package/src/components/organisms/Chatv2/index.js +281 -0
- package/src/components/organisms/Chatv2/styles.js +85 -0
- package/src/components/organisms/CompleteServices/CompleteServices.stories.js +91 -0
- package/src/components/organisms/CompleteServices/index.js +82 -0
- package/src/components/organisms/CompleteServices/styles.js +35 -0
- package/src/components/organisms/DashboardMetric/index.js +6 -3
- package/src/components/organisms/DragAndDropPhases/DragAndDropPhases.stories.js +40 -0
- package/src/components/organisms/DragAndDropPhases/index.js +236 -0
- package/src/components/organisms/DragAndDropPhases/styles.js +69 -0
- package/src/components/organisms/DragPrueba/DragPrueba.stories.js +12 -0
- package/src/components/organisms/DragPrueba/index.js +57 -0
- package/src/components/organisms/DragPrueba/styles.js +8 -0
- package/src/components/organisms/EditGroup/EditGroup.stories.js +18 -0
- package/src/components/organisms/EditGroup/index.js +168 -0
- package/src/components/organisms/EditGroup/styles.js +115 -0
- package/src/components/organisms/FullProductNameHeader/index.js +3 -1
- package/src/components/organisms/FullProductNamev2/FullProductNamev2.stories.js +28 -0
- package/src/components/organisms/FullProductNamev2/index.js +101 -0
- package/src/components/organisms/FullProductNamev2/styles.js +49 -0
- package/src/components/organisms/FullTabsMenuv2/FullTabsMenuv2.stories.js +22 -0
- package/src/components/organisms/FullTabsMenuv2/index.js +142 -0
- package/src/components/organisms/FullTabsMenuv2/styles.js +47 -0
- package/src/components/organisms/GridProducts/GridProducts.stories.js +5485 -0
- package/src/components/organisms/GridProducts/index.js +50 -0
- package/src/components/organisms/GridProducts/styles.js +14 -0
- package/src/components/organisms/GridProducts/utils.js +111 -0
- package/src/components/organisms/ImageDataTablev2/ImageDataTablev2.stories.js +24 -0
- package/src/components/organisms/ImageDataTablev2/index.js +124 -0
- package/src/components/organisms/ImageDataTablev2/styles.js +18 -0
- package/src/components/organisms/ImagePreviewerv2/ImagePreviewerv2.stories.js +38 -0
- package/src/components/organisms/ImagePreviewerv2/index.js +22 -0
- package/src/components/organisms/ImagePreviewerv2/styles.js +7 -0
- package/src/components/organisms/InputGroup/index.js +131 -119
- package/src/components/organisms/InputGroupv2/InputGroupv2.stories.js +31 -0
- package/src/components/organisms/InputGroupv2/index.js +296 -0
- package/src/components/organisms/InputGroupv2/styles.js +90 -0
- package/src/components/organisms/MandatoryBar/MandatoryBar.stories.js +18 -0
- package/src/components/organisms/MandatoryBar/index.js +31 -0
- package/src/components/organisms/MandatoryBar/styles.js +12 -0
- package/src/components/organisms/Modal/Modal.stories.js +2 -1
- package/src/components/organisms/Modal/index.js +8 -1
- package/src/components/organisms/Modal/styles.js +8 -1
- package/src/components/organisms/OrderDetail/utils/Table/utils.js +6 -16
- package/src/components/organisms/ProductImageModalv2/ProductImageModalv2.stories.js +90 -0
- package/src/components/organisms/ProductImageModalv2/index.js +105 -0
- package/src/components/organisms/ProductImageModalv2/styles.js +71 -0
- package/src/components/organisms/RenameImagesBar/RenameImagesBar.stories.js +18 -0
- package/src/components/organisms/RenameImagesBar/index.js +30 -0
- package/src/components/organisms/RenameImagesBar/styles.js +12 -0
- package/src/components/organisms/VersionSelector/index.js +100 -100
- package/src/components/organisms/VersionSelectorv2/VersionSelectorv2.stories.js +15 -0
- package/src/components/organisms/VersionSelectorv2/index.js +105 -0
- package/src/components/organisms/VersionSelectorv2/styles.js +45 -0
- package/src/components/pages/Dashboard/Dashboard.stories.js +33 -38
- package/src/components/pages/Dashboard/index.js +36 -7
- package/src/components/pages/ProductEditionv2/ProductEditionv2.stories.js +213 -0
- package/src/components/pages/ProductEditionv2/index.js +1758 -0
- package/src/components/pages/ProductEditionv2/styles.js +154 -0
- package/src/components/pages/ProviderProductEdition/index.js +100 -131
- package/src/components/pages/ProviderProductEdition/styles.js +5 -1
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +4 -0
- package/src/components/pages/RetailerProductEdition/index.js +124 -278
- package/src/components/pages/RetailerProductEdition/styles.js +4 -0
- package/src/components/pages/RetailerProductEdition/utils.js +37 -0
- package/src/global-files/data.js +6 -10
- package/src/global-files/variables.js +6 -0
- package/src/index.js +11 -0
- package/dist/assets/fonts/roboto/LICENSE.txt +0 -202
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ObservationFlag } from "./index";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: "Components/atoms/ObservationFlag",
|
|
5
|
+
component: ObservationFlag,
|
|
6
|
+
argTypes: {
|
|
7
|
+
observation: {
|
|
8
|
+
options: ["no priority", "low", "medium", "high"],
|
|
9
|
+
control: { type: "select" },
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const Template = (args) => <ObservationFlag {...args} />;
|
|
15
|
+
|
|
16
|
+
export const PriorityFlagDefault = Template.bind({});
|
|
17
|
+
|
|
18
|
+
PriorityFlagDefault.args = {
|
|
19
|
+
observation: "no observation",
|
|
20
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Container } from "./styles";
|
|
2
|
+
import { Tooltip } from "../Tooltip";
|
|
3
|
+
import without from "../../../assets/images/flags/noPriority.svg";
|
|
4
|
+
import high from "../../../assets/images/flags/highPriority.svg";
|
|
5
|
+
import medium from "../../../assets/images/flags/mediumPriority.svg";
|
|
6
|
+
import low from "../../../assets/images/flags/lowPriority.svg";
|
|
7
|
+
|
|
8
|
+
export const ObservationFlag = ({ observation,contentObservation }) => {
|
|
9
|
+
const PriorityFlags = {
|
|
10
|
+
["none"]: without,
|
|
11
|
+
["low"]: low,
|
|
12
|
+
["medium"]: medium,
|
|
13
|
+
["high"]: high,
|
|
14
|
+
};
|
|
15
|
+
return (
|
|
16
|
+
<Tooltip
|
|
17
|
+
componentTooltip={
|
|
18
|
+
<>
|
|
19
|
+
<p>
|
|
20
|
+
<b>Observaciones del producto</b>
|
|
21
|
+
</p>
|
|
22
|
+
<p>{contentObservation} </p>
|
|
23
|
+
</>
|
|
24
|
+
}
|
|
25
|
+
children={
|
|
26
|
+
<Container>
|
|
27
|
+
<img src={PriorityFlags[observation]} alt={observation} />
|
|
28
|
+
</Container>
|
|
29
|
+
}
|
|
30
|
+
classNameTooltip={"container-tooltip"}
|
|
31
|
+
/>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PercentTag } from ".";
|
|
2
|
+
|
|
3
|
+
export default { title: "Components/atoms/PercentTag", component: PercentTag };
|
|
4
|
+
|
|
5
|
+
const Template = (args) => <PercentTag {...args} />;
|
|
6
|
+
export const PercentTagDefault = Template.bind({});
|
|
7
|
+
PercentTagDefault.args = { percent: 88, progressBarType: "AA" };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { GlobalColors, FontFamily } from "../../../global-files/variables";
|
|
3
|
+
|
|
4
|
+
export const Container = styled.div`
|
|
5
|
+
background-color: ${GlobalColors.s3};
|
|
6
|
+
display: inline-block;
|
|
7
|
+
padding: 0 10px;
|
|
8
|
+
border-radius: 5px;
|
|
9
|
+
font-family: ${FontFamily.Lato};
|
|
10
|
+
font-weight: 600;
|
|
11
|
+
font-size: 12px;
|
|
12
|
+
line-height: 20px;
|
|
13
|
+
color: ${(backgroundColor) =>
|
|
14
|
+
backgroundColor === "s2" || backgroundColor === "s1"
|
|
15
|
+
? GlobalColors.s4
|
|
16
|
+
: GlobalColors.white};
|
|
17
|
+
|
|
18
|
+
&.status-CA,
|
|
19
|
+
&.status-IE {
|
|
20
|
+
background-color: ${GlobalColors.in_progress};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&.status-R,
|
|
24
|
+
&.status-AS,
|
|
25
|
+
&.status-PA {
|
|
26
|
+
background-color: ${GlobalColors.reception};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&.status-AA,
|
|
30
|
+
&.status-AP,
|
|
31
|
+
&.status-ACA,
|
|
32
|
+
&.status-AC {
|
|
33
|
+
background-color: ${GlobalColors.finished};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&.status-RA,
|
|
37
|
+
&.status-RC,
|
|
38
|
+
&.status-RP,
|
|
39
|
+
&.status-RCA {
|
|
40
|
+
background-color: ${GlobalColors.rejected_status};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&.status-Dat,
|
|
44
|
+
&.status-Dsc,
|
|
45
|
+
&.status-Imgs {
|
|
46
|
+
background-color: ${GlobalColors.s4};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&.status-Ex {
|
|
50
|
+
background-color: ${GlobalColors.exported};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&.status-DDI {
|
|
54
|
+
background-color: ${GlobalColors.original_purpura};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&.status-GLD {
|
|
58
|
+
background-color: ${GlobalColors.in_progress};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&.status-TAB {
|
|
62
|
+
background-color: ${GlobalColors.deep_gray};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&.status-Pt {
|
|
66
|
+
background-color: ${GlobalColors.s2};
|
|
67
|
+
color: ${GlobalColors.s4};
|
|
68
|
+
}
|
|
69
|
+
`;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { PriorityFlagv2 } from "./index";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: "Components/atoms/PriorityFlagv2",
|
|
5
|
+
component: PriorityFlagv2,
|
|
6
|
+
argTypes: {
|
|
7
|
+
priority: {
|
|
8
|
+
options: ["no priority", "low", "medium", "high"],
|
|
9
|
+
control: { type: "select" },
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const Template = (args) => <PriorityFlagv2 {...args} />;
|
|
15
|
+
|
|
16
|
+
export const PriorityFlagDefault = Template.bind({});
|
|
17
|
+
|
|
18
|
+
PriorityFlagDefault.args = {
|
|
19
|
+
priority: "no priority",
|
|
20
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Container } from "./styles";
|
|
2
|
+
import without from "../../../assets/images/flagsv2/noPriority.svg";
|
|
3
|
+
import high from "../../../assets/images/flagsv2/highPriority.svg";
|
|
4
|
+
import medium from "../../../assets/images/flagsv2/mediumPriority.svg";
|
|
5
|
+
import low from "../../../assets/images/flagsv2/lowPriority.svg";
|
|
6
|
+
|
|
7
|
+
export const PriorityFlagv2 = ({ priority }) => {
|
|
8
|
+
const PriorityFlags = {
|
|
9
|
+
["none"]: without,
|
|
10
|
+
["low"]: low,
|
|
11
|
+
["medium"]: medium,
|
|
12
|
+
["high"]: high,
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<Container>
|
|
17
|
+
<img src={PriorityFlags[priority]} alt={priority} />
|
|
18
|
+
</Container>
|
|
19
|
+
);
|
|
20
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ProductImagev2 } from ".";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: "Components/atoms/ProductImagev2",
|
|
5
|
+
component: ProductImagev2,
|
|
6
|
+
argTypes: {
|
|
7
|
+
imageType: {
|
|
8
|
+
options: [
|
|
9
|
+
"main-image",
|
|
10
|
+
"carousel-image",
|
|
11
|
+
"catalogue-image-big-size",
|
|
12
|
+
"catalogue-image-small-size",
|
|
13
|
+
"catalogue-modal-image",
|
|
14
|
+
"expanded-modal-image",
|
|
15
|
+
],
|
|
16
|
+
control: { type: "select" },
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export const Template = (args) => <ProductImagev2 {...args} />;
|
|
22
|
+
|
|
23
|
+
const ProductImagev2Default = Template.bind({});
|
|
24
|
+
|
|
25
|
+
ProductImagev2Default.args = {
|
|
26
|
+
imageType: "main-image",
|
|
27
|
+
altText: "default image",
|
|
28
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Container } from "./styles";
|
|
2
|
+
import ReactImageFallback from "react-image-fallback";
|
|
3
|
+
import defaultProductImage from "../../../assets/images/defaultImages/defaultProductImage.png";
|
|
4
|
+
|
|
5
|
+
export const ProductImagev2 = ({ img, imageType, altText, onClick }) => {
|
|
6
|
+
return (
|
|
7
|
+
<Container className={imageType}>
|
|
8
|
+
<ReactImageFallback
|
|
9
|
+
src={img}
|
|
10
|
+
fallbackImage={defaultProductImage}
|
|
11
|
+
alt={altText}
|
|
12
|
+
onClick={onClick}
|
|
13
|
+
/>
|
|
14
|
+
</Container>
|
|
15
|
+
);
|
|
16
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
|
|
3
|
+
export const Container = styled.div`
|
|
4
|
+
width: fit-content;
|
|
5
|
+
|
|
6
|
+
img {
|
|
7
|
+
object-fit: contain;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
&.carousel-image {
|
|
11
|
+
img {
|
|
12
|
+
width: 85px;
|
|
13
|
+
height: 55px;
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
& + * {
|
|
18
|
+
margin-left: 1px;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&.main-image {
|
|
23
|
+
img {
|
|
24
|
+
width: 182px;
|
|
25
|
+
height: 182px;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&.catalogue-image-big-size {
|
|
30
|
+
img {
|
|
31
|
+
width: 179px;
|
|
32
|
+
height: 179px;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&.catalogue-image-small-size {
|
|
37
|
+
img {
|
|
38
|
+
width: 60px;
|
|
39
|
+
height: 60px;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&.catalogue-modal-image {
|
|
44
|
+
cursor: pointer;
|
|
45
|
+
|
|
46
|
+
img {
|
|
47
|
+
width: 68px;
|
|
48
|
+
height: 68px;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&.expanded-modal-image {
|
|
53
|
+
width: 500px;
|
|
54
|
+
height: 500px;
|
|
55
|
+
|
|
56
|
+
img {
|
|
57
|
+
width: 500px;
|
|
58
|
+
height: 500px;
|
|
59
|
+
border-radius:10px;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
`;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Progress } from "./index.js";
|
|
2
|
+
import { GlobalColors } from "../../../global-files/variables.js";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: "Components/atoms/Progress",
|
|
6
|
+
component: Progress,
|
|
7
|
+
argTypes: {
|
|
8
|
+
percent: {
|
|
9
|
+
control: { type: "range", min: 0, max: 100, step: 1 },
|
|
10
|
+
},
|
|
11
|
+
backgroundColor: {
|
|
12
|
+
options: Object.keys(GlobalColors),
|
|
13
|
+
control: { type: "select" },
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const Template = (args) => <Progress {...args} />;
|
|
19
|
+
|
|
20
|
+
export const ProgressDefault = Template.bind({});
|
|
21
|
+
|
|
22
|
+
ProgressDefault.args = {
|
|
23
|
+
percent: 0,
|
|
24
|
+
backgroundColor: "s2",
|
|
25
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { Container, ContainerIcon } from "./styles";
|
|
2
|
+
import { Tooltip } from "../Tooltip";
|
|
3
|
+
import { Button } from "../GeneralButton";
|
|
4
|
+
|
|
5
|
+
export const Progress = ({
|
|
6
|
+
percent,
|
|
7
|
+
progressBarType,
|
|
8
|
+
percentRequired,
|
|
9
|
+
version,
|
|
10
|
+
setShowVersionSelector,
|
|
11
|
+
showShield,
|
|
12
|
+
}) => {
|
|
13
|
+
return (
|
|
14
|
+
<>
|
|
15
|
+
<Tooltip
|
|
16
|
+
componentTooltip={
|
|
17
|
+
<>
|
|
18
|
+
<p>
|
|
19
|
+
<b>Porcentaje de requeridos</b>
|
|
20
|
+
</p>
|
|
21
|
+
<p>
|
|
22
|
+
Este porcentaje indica la completitud de los atributos requeridos
|
|
23
|
+
para todos los servicios.
|
|
24
|
+
</p>
|
|
25
|
+
</>
|
|
26
|
+
}
|
|
27
|
+
children={
|
|
28
|
+
<Container className={`status-${progressBarType}`}>
|
|
29
|
+
<p>{percent}%</p>
|
|
30
|
+
</Container>
|
|
31
|
+
}
|
|
32
|
+
classNameTooltip={"container-tooltip"}
|
|
33
|
+
/>
|
|
34
|
+
<>
|
|
35
|
+
{version && (
|
|
36
|
+
<Button
|
|
37
|
+
buttonType={"general-button-rec version-button"}
|
|
38
|
+
onClick={(e) => {
|
|
39
|
+
e.stopPropagation();
|
|
40
|
+
e.preventDefault();
|
|
41
|
+
setShowVersionSelector(true);
|
|
42
|
+
}}
|
|
43
|
+
label={`V${version}`}
|
|
44
|
+
/>
|
|
45
|
+
)}
|
|
46
|
+
{showShield && (
|
|
47
|
+
<Tooltip
|
|
48
|
+
componentTooltip={
|
|
49
|
+
<>
|
|
50
|
+
<p>
|
|
51
|
+
<b>Campos requeridos</b>
|
|
52
|
+
</p>
|
|
53
|
+
<p>
|
|
54
|
+
Este nuevo icono te indicará cuando <br></br> completes todos
|
|
55
|
+
los campos requeridos
|
|
56
|
+
</p>
|
|
57
|
+
</>
|
|
58
|
+
}
|
|
59
|
+
children={
|
|
60
|
+
<ContainerIcon
|
|
61
|
+
className="fondo"
|
|
62
|
+
percentageRequired={percentRequired}
|
|
63
|
+
>
|
|
64
|
+
{/* <span class="hola">local_police</span> */}
|
|
65
|
+
<span class="material-icons icono-police"></span>
|
|
66
|
+
</ContainerIcon>
|
|
67
|
+
}
|
|
68
|
+
classNameTooltip={"container-tooltip"}
|
|
69
|
+
/>
|
|
70
|
+
)}
|
|
71
|
+
</>
|
|
72
|
+
</>
|
|
73
|
+
);
|
|
74
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { FontFamily, GlobalColors } from "../../../global-files/variables";
|
|
3
|
+
|
|
4
|
+
export const Container = styled.div`
|
|
5
|
+
background-color: ${GlobalColors.s3};
|
|
6
|
+
width: fit-content;
|
|
7
|
+
height: 20px;
|
|
8
|
+
padding: 4px;
|
|
9
|
+
border-radius: 3px;
|
|
10
|
+
font-family: ${FontFamily.AvenirNext};
|
|
11
|
+
font-weight: 600;
|
|
12
|
+
font-size: 10px;
|
|
13
|
+
line-height: 12px;
|
|
14
|
+
color: ${(backgroundColor) =>
|
|
15
|
+
backgroundColor === "s2" || backgroundColor === "s1"
|
|
16
|
+
? GlobalColors.s4
|
|
17
|
+
: GlobalColors.white};
|
|
18
|
+
|
|
19
|
+
&.status-CA,
|
|
20
|
+
&.status-IE {
|
|
21
|
+
background-color: ${GlobalColors.in_progress};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&.status-R,
|
|
25
|
+
&.status-AS,
|
|
26
|
+
&.status-PA {
|
|
27
|
+
background-color: ${GlobalColors.reception};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&.status-AA,
|
|
31
|
+
&.status-AP,
|
|
32
|
+
&.status-ACA,
|
|
33
|
+
&.status-AC {
|
|
34
|
+
background-color: ${GlobalColors.finished};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&.status-RA,
|
|
38
|
+
&.status-RC,
|
|
39
|
+
&.status-RP,
|
|
40
|
+
&.status-RCA {
|
|
41
|
+
background-color: ${GlobalColors.rejected_status};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&.status-Dat,
|
|
45
|
+
&.status-Dsc,
|
|
46
|
+
&.status-Imgs {
|
|
47
|
+
background-color: ${GlobalColors.s4};
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&.status-Ex {
|
|
51
|
+
background-color: ${GlobalColors.exported};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&.status-DDI {
|
|
55
|
+
background-color: ${GlobalColors.original_purpura};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&.status-GLD {
|
|
59
|
+
background-color: ${GlobalColors.in_progress};
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&.status-TAB {
|
|
63
|
+
background-color: ${GlobalColors.deep_gray};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&.status-Pt {
|
|
67
|
+
background-color: ${GlobalColors.s2};
|
|
68
|
+
color: ${GlobalColors.s4};
|
|
69
|
+
}
|
|
70
|
+
`;
|
|
71
|
+
export const ContainerIcon = styled.div`
|
|
72
|
+
cursor: pointer;
|
|
73
|
+
@font-face {
|
|
74
|
+
font-family: "Material Symbols Outlined";
|
|
75
|
+
font-style: normal;
|
|
76
|
+
font-weight: 100 700;
|
|
77
|
+
src: url(https://fonts.gstatic.com/s/materialsymbolsoutlined/v68/kJEhBvYX7BgnkSrUwT8OhrdQw4oELdPIeeII9v6oFsLjBuVY.woff2)
|
|
78
|
+
format("woff2");
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.hola {
|
|
82
|
+
font-family: "Material Symbols Outlined";
|
|
83
|
+
font-size: 30px;
|
|
84
|
+
//line-height: 1;
|
|
85
|
+
margin-top: 10px;
|
|
86
|
+
}
|
|
87
|
+
.hola {
|
|
88
|
+
font-variation-settings: "FILL"
|
|
89
|
+
${(props) => (props.percentageRequired < 100 ? 0 : 1)},
|
|
90
|
+
"wght" 400, "GRAD" 0, "opsz" 48;
|
|
91
|
+
|
|
92
|
+
}
|
|
93
|
+
.icono-police{
|
|
94
|
+
font-size:20px;
|
|
95
|
+
color: ${(props) =>
|
|
96
|
+
props.percentageRequired < 100 ? "#d4d1d7" : "#ECDD1D"};
|
|
97
|
+
}
|
|
98
|
+
`;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RatingStars } from ".";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: "Components/atoms/RatingStars",
|
|
5
|
+
component: RatingStars,
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const Template = (args) => <RatingStars {...args} />;
|
|
9
|
+
export const RatingStarsDefault = Template.bind({});
|
|
10
|
+
RatingStarsDefault.args = { percent: 80 };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Container } from "./styles";
|
|
2
|
+
import { faStar as starIcon } from "@fortawesome/free-regular-svg-icons";
|
|
3
|
+
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
4
|
+
import { useEffect } from "react";
|
|
5
|
+
import { useState } from "react";
|
|
6
|
+
|
|
7
|
+
export const RatingStars = ({ ratingValue = 0 }) => {
|
|
8
|
+
const [rating, setRating] = useState(0);
|
|
9
|
+
|
|
10
|
+
const handleRating = (value) => {
|
|
11
|
+
setRating(value);
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
setRating(ratingValue);
|
|
16
|
+
}, []);
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<Container>
|
|
20
|
+
{[...Array(5)].map((_, index) => (
|
|
21
|
+
<span
|
|
22
|
+
key={index}
|
|
23
|
+
className={`star ${index < rating ? "active" : ""}`}
|
|
24
|
+
onClick={() => handleRating(index + 1)}
|
|
25
|
+
>
|
|
26
|
+
★
|
|
27
|
+
</span>
|
|
28
|
+
))}
|
|
29
|
+
</Container>
|
|
30
|
+
);
|
|
31
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
|
|
3
|
+
export const Container = styled.div`
|
|
4
|
+
font-size: 10px;
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
|
|
8
|
+
.star {
|
|
9
|
+
cursor: pointer;
|
|
10
|
+
font-size: 12px;
|
|
11
|
+
color: #d9d9d9;
|
|
12
|
+
transition: color 0.3s;
|
|
13
|
+
line-height: 10px;
|
|
14
|
+
|
|
15
|
+
&:hover {
|
|
16
|
+
color: gold;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&.active {
|
|
20
|
+
transform: scale(1.2);
|
|
21
|
+
color: #8a6caa;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&:not(:first-child) {
|
|
25
|
+
margin-left: 5px;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
`;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { RetailerCatalog } from ".";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: "Components/atoms/RetailerCatalog",
|
|
5
|
+
component: RetailerCatalog,
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const Template = (args) => <RetailerCatalog {...args} />;
|
|
9
|
+
export const RetailerCatalogDefault = Template.bind({});
|
|
10
|
+
RetailerCatalogDefault.args = {
|
|
11
|
+
limit: 3,
|
|
12
|
+
articleId: 39474,
|
|
13
|
+
orderId: 15270,
|
|
14
|
+
retailers: [
|
|
15
|
+
{
|
|
16
|
+
id: 58,
|
|
17
|
+
name: "The Home Depot Golden",
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
id: 59,
|
|
21
|
+
name: "The Home Depot Platinum",
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
id: 60,
|
|
25
|
+
name: "The Home Depot Resizing",
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
id: 61,
|
|
29
|
+
name: "Home Depot TAB",
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: 68,
|
|
33
|
+
name: "The Home Depot Dropship",
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
import { Avatar } from "../Avatar";
|
|
3
|
+
import { Container } from "./styles";
|
|
4
|
+
import { useEffect } from "react";
|
|
5
|
+
import { useCloseModal } from "../../../global-files/customHooks";
|
|
6
|
+
import { RetailersList } from "../RetailersList";
|
|
7
|
+
|
|
8
|
+
export const RetailerCatalog = ({
|
|
9
|
+
retailers = [],
|
|
10
|
+
limit = 3,
|
|
11
|
+
article,
|
|
12
|
+
id = "retailers-catalog",
|
|
13
|
+
}) => {
|
|
14
|
+
const [retLimit, setRetLimit] = useState(0);
|
|
15
|
+
const [showRetailers, setShowRetailers] = useCloseModal(id);
|
|
16
|
+
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
setRetLimit(limit);
|
|
19
|
+
}, [retailers]);
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<Container
|
|
23
|
+
onClick={(e) => {
|
|
24
|
+
setShowRetailers(!showRetailers);
|
|
25
|
+
}}
|
|
26
|
+
id={id}
|
|
27
|
+
>
|
|
28
|
+
{retailers.map(
|
|
29
|
+
(retailer, i) =>
|
|
30
|
+
i < limit && (
|
|
31
|
+
<Avatar
|
|
32
|
+
key={retailer.id + "-" + i}
|
|
33
|
+
image={`https://content-management-images.s3.amazonaws.com/retailers/${retailer.id}.png`}
|
|
34
|
+
altText={retailer?.name}
|
|
35
|
+
imageType={"medium-image"}
|
|
36
|
+
/>
|
|
37
|
+
)
|
|
38
|
+
)}
|
|
39
|
+
{retailers.length > retLimit && (
|
|
40
|
+
<div className="retailers-limit">
|
|
41
|
+
<p>+{retailers.length - retLimit}</p>
|
|
42
|
+
</div>
|
|
43
|
+
)}
|
|
44
|
+
{showRetailers && (
|
|
45
|
+
<RetailersList retailers={retailers} article={article} />
|
|
46
|
+
)}
|
|
47
|
+
</Container>
|
|
48
|
+
);
|
|
49
|
+
};
|