contentoh-components-library 21.5.2 → 21.5.3
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/components/organisms/Table/styles.js +1 -1
- package/dist/components/pages/MultipleEdition/saveData.js +19 -9
- package/dist/components/pages/MultipleEdition/styles.js +1 -1
- package/dist/components/pages/MultipleEdition/utils.js +153 -86
- package/package.json +1 -4
- package/src/components/atoms/Avatar/index.js +2 -8
- package/src/components/atoms/ButtonV2/ButtonV2.stories.js +0 -1
- package/src/components/atoms/ButtonV2/index.js +0 -1
- package/src/components/atoms/ButtonV2/styles.js +0 -16
- package/src/components/atoms/CheckBox/CheckBox.stories.js +0 -5
- package/src/components/atoms/CheckBox/index.js +1 -5
- package/src/components/atoms/CheckBox/styles.js +3 -9
- package/src/components/atoms/GeneralButton/styles.js +0 -46
- package/src/components/atoms/GeneralInput/index.js +0 -3
- package/src/components/atoms/GeneralInput/styles.js +1 -19
- package/src/components/atoms/InputFormatter/index.js +1 -2
- package/src/components/atoms/InputFormatter/styles.js +4 -9
- package/src/components/atoms/ProductImage/index.js +11 -24
- package/src/components/atoms/ProductImage/styles.js +0 -7
- 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 +3 -0
- package/src/components/molecules/BoxAttribute/index.js +25 -32
- package/src/components/molecules/BoxAttribute/styles.js +1 -1
- package/src/components/molecules/BoxButtons/index.js +22 -23
- package/src/components/molecules/CarouselImagesLogin/index.js +1 -1
- package/src/components/molecules/GalleryElement/index.js +1 -76
- package/src/components/molecules/GalleryHeader/index.js +0 -1
- package/src/components/molecules/HeaderTop/index.js +6 -52
- package/src/components/molecules/ProductNameHeader/index.js +1 -19
- package/src/components/molecules/SignInLogin/index.js +11 -11
- package/src/components/molecules/StatusAsignationInfo/FinancedCompanies.js +63 -501
- package/src/components/molecules/StatusAsignationInfo/index.js +1 -1
- package/src/components/molecules/StripeCardSelector/CardSelector.stories.js +2 -1
- package/src/components/molecules/TagAndInput/index.js +6 -8
- package/src/components/organisms/Chat/Chat.stories.js +7 -27
- package/src/components/organisms/Chat/ContainerItems/index.js +2 -18
- package/src/components/organisms/Chat/ContainerItems/styles.js +2 -14
- package/src/components/organisms/Chat/ContentChat/index.js +12 -88
- package/src/components/organisms/Chat/Footer/index.js +0 -11
- package/src/components/organisms/Chat/index.js +4 -46
- package/src/components/organisms/Chat/styles.js +0 -4
- package/src/components/organisms/DashboardMetric/index.js +3 -6
- package/src/components/organisms/FullProductNameHeader/index.js +1 -13
- package/src/components/organisms/GridProducts/GridProducts.stories.js +107 -682
- package/src/components/organisms/InputGroup/index.js +144 -292
- package/src/components/organisms/InputGroup/styles.js +0 -31
- package/src/components/organisms/Modal/Modal.stories.js +1 -2
- package/src/components/organisms/Modal/index.js +2 -9
- package/src/components/organisms/Modal/styles.js +1 -8
- package/src/components/organisms/OrderDetail/utils/Table/utils.js +16 -6
- package/src/components/pages/Dashboard/Dashboard.stories.js +38 -33
- package/src/components/pages/Dashboard/index.js +7 -36
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +60 -56
- package/src/components/pages/ProviderProductEdition/index.js +133 -148
- package/src/components/pages/ProviderProductEdition/styles.js +1 -5
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +0 -4
- package/src/components/pages/RetailerProductEdition/index.js +300 -293
- package/src/components/pages/RetailerProductEdition/styles.js +0 -4
- package/src/components/pages/RetailerProductEdition/utils.js +0 -37
- package/src/global-files/data.js +10 -6
- package/src/global-files/variables.js +0 -6
- package/src/index.js +0 -12
- package/src/assets/images/Icons/addv2.svg +0 -8
- package/src/assets/images/Icons/beenhere.svg +0 -9
- package/src/assets/images/Icons/checkv2.svg +0 -8
- package/src/assets/images/Icons/close-magenta.svg +0 -9
- package/src/assets/images/Icons/close.svg +0 -8
- package/src/assets/images/Icons/closeCircle.svg +0 -8
- package/src/assets/images/Icons/delete-forever-red.svg +0 -9
- package/src/assets/images/Icons/delete-forever-white.svg +0 -10
- package/src/assets/images/Icons/edit.svg +0 -8
- package/src/assets/images/Icons/fullscreen.svg +0 -3
- package/src/assets/images/Icons/infoNR.svg +0 -8
- package/src/assets/images/Icons/options.svg +0 -3
- package/src/assets/images/Icons/save-white-gray.svg +0 -9
- package/src/assets/images/Icons/save-white.svg +0 -9
- package/src/assets/images/Icons/save.svg +0 -8
- package/src/assets/images/Icons/search.svg +0 -3
- package/src/assets/images/Icons/settings.svg +0 -8
- package/src/assets/images/Icons/trash.svg +0 -8
- package/src/assets/images/Icons/undo.svg +0 -8
- package/src/assets/images/Icons/upload-file-white.svg +0 -4
- package/src/assets/images/Icons/upload-file.svg +0 -10
- package/src/assets/images/Icons/upload_file.svg +0 -10
- package/src/assets/images/Icons/warningv2.svg +0 -3
- package/src/assets/images/checkBox/checkrosa.svg +0 -3
- package/src/assets/images/checkBox/checkverde.svg +0 -3
- package/src/assets/images/flagsv2/highPriority.svg +0 -3
- package/src/assets/images/flagsv2/lowPriority.svg +0 -3
- package/src/assets/images/flagsv2/mediumPriority.svg +0 -3
- package/src/assets/images/flagsv2/noPriority.svg +0 -3
- package/src/assets/images/generalButton/closeIconWhite.svg +0 -4
- package/src/assets/images/generalButton/closeIconv2.svg +0 -4
- package/src/assets/images/generalButton/saveIconpink.svg +0 -3
- package/src/components/atoms/CharsMissing/Wysiwyg.stories.js +0 -12
- package/src/components/atoms/CharsMissing/index.js +0 -60
- package/src/components/atoms/CharsMissing/styles.js +0 -44
- package/src/components/atoms/CustomChip/CustomChip.stories.js +0 -16
- package/src/components/atoms/CustomChip/index.js +0 -34
- package/src/components/atoms/CustomChip/styles.js +0 -6
- package/src/components/atoms/FeatureTagv2/FeatureTagv2.stories.js +0 -16
- package/src/components/atoms/FeatureTagv2/index.js +0 -10
- package/src/components/atoms/FeatureTagv2/styles.js +0 -56
- package/src/components/atoms/GeneralInputv2/GeneralInputv2.stories.js +0 -33
- package/src/components/atoms/GeneralInputv2/index.js +0 -155
- package/src/components/atoms/GeneralInputv2/styles.js +0 -67
- package/src/components/atoms/InputFormatterv2/Wysiwyg.stories.js +0 -12
- package/src/components/atoms/InputFormatterv2/index.js +0 -148
- package/src/components/atoms/InputFormatterv2/styles.js +0 -39
- package/src/components/atoms/InputImages/InputImages.stories.js +0 -19
- package/src/components/atoms/InputImages/index.js +0 -25
- package/src/components/atoms/InputImages/styles.js +0 -17
- package/src/components/atoms/Multiselect/Multiselect.stories.js +0 -364
- package/src/components/atoms/Multiselect/index.js +0 -351
- package/src/components/atoms/Multiselect/styles.js +0 -33
- package/src/components/atoms/NumberMandatory/NumberMandatory.stories.js +0 -19
- package/src/components/atoms/NumberMandatory/index.js +0 -16
- package/src/components/atoms/NumberMandatory/styles.js +0 -11
- package/src/components/atoms/ObservationFlag/ObservationFlag.stories.js +0 -20
- package/src/components/atoms/ObservationFlag/index.js +0 -167
- package/src/components/atoms/ObservationFlag/styles.js +0 -104
- package/src/components/atoms/PriorityFlagv2/PriorityFlagv2.stories.js +0 -20
- package/src/components/atoms/PriorityFlagv2/index.js +0 -20
- package/src/components/atoms/PriorityFlagv2/styles.js +0 -6
- package/src/components/atoms/ProductImagev2/ProductImagev2.stories.js +0 -28
- package/src/components/atoms/ProductImagev2/index.js +0 -16
- package/src/components/atoms/ProductImagev2/styles.js +0 -62
- package/src/components/atoms/Progress/Progress.stories.js +0 -25
- package/src/components/atoms/Progress/index.js +0 -74
- package/src/components/atoms/Progress/styles.js +0 -98
- package/src/components/atoms/ScreenHeaderv2/ScreenHeaderv2.stories.js +0 -53
- package/src/components/atoms/ScreenHeaderv2/index.js +0 -134
- package/src/components/atoms/ScreenHeaderv2/styles.js +0 -103
- package/src/components/atoms/Selectv2/VersionSelect.js +0 -27
- package/src/components/atoms/Selectv2/index.js +0 -35
- package/src/components/atoms/Selectv2/style.js +0 -93
- package/src/components/atoms/TabSectionv2/TabSection.stories.js +0 -25
- package/src/components/atoms/TabSectionv2/index.js +0 -9
- package/src/components/atoms/TabSectionv2/styles.js +0 -20
- package/src/components/atoms/TooltipLight/Tooltip.stories.js +0 -20
- package/src/components/atoms/TooltipLight/index.js +0 -46
- package/src/components/atoms/TooltipLight/styles.js +0 -65
- package/src/components/atoms/WordsMissing/Wysiwyg.stories.js +0 -12
- package/src/components/atoms/WordsMissing/index.js +0 -60
- package/src/components/atoms/WordsMissing/styles.js +0 -10
- package/src/components/molecules/AddGroup/AddGroup.stories.js +0 -15
- package/src/components/molecules/AddGroup/index.js +0 -84
- package/src/components/molecules/AddGroup/styles.js +0 -141
- package/src/components/molecules/AsignationInfo/AsignationInfo.stories.js +0 -17
- package/src/components/molecules/AsignationInfo/index.js +0 -108
- package/src/components/molecules/AsignationInfo/styles.js +0 -86
- package/src/components/molecules/EditionActiveImagev2/EditionActiveImagev2.stories.js +0 -12
- package/src/components/molecules/EditionActiveImagev2/index.js +0 -15
- package/src/components/molecules/EditionActiveImagev2/styles.js +0 -7
- package/src/components/molecules/EditionTabs/EditionTabs.stories.js +0 -12
- package/src/components/molecules/EditionTabs/index.js +0 -33
- package/src/components/molecules/EditionTabs/styles.js +0 -24
- package/src/components/molecules/FeaturesBarv2/FeaturesBarv2.stories.js +0 -20
- package/src/components/molecules/FeaturesBarv2/index.js +0 -32
- package/src/components/molecules/FeaturesBarv2/styles.js +0 -17
- package/src/components/molecules/GalleryElementv2/GalleryElementv2.stories.js +0 -30
- package/src/components/molecules/GalleryElementv2/index.js +0 -142
- package/src/components/molecules/GalleryElementv2/styles.js +0 -119
- package/src/components/molecules/GalleryHeaderv2/GalleryHeaderv2.stories.js +0 -10
- package/src/components/molecules/GalleryHeaderv2/index.js +0 -25
- package/src/components/molecules/GalleryHeaderv2/styles.js +0 -47
- package/src/components/molecules/GroupSelect/GroupSelect.stories.js +0 -35
- package/src/components/molecules/GroupSelect/SelectItem.js +0 -105
- package/src/components/molecules/GroupSelect/index.js +0 -190
- package/src/components/molecules/GroupSelect/styles.js +0 -124
- package/src/components/molecules/HeaderTopv2/HeaderTopv2.stories.js +0 -10
- package/src/components/molecules/HeaderTopv2/index.js +0 -100
- package/src/components/molecules/HeaderTopv2/styles.js +0 -33
- package/src/components/molecules/ImageSelectorv2/ImageSelectorv2.stories.js +0 -46
- package/src/components/molecules/ImageSelectorv2/index.js +0 -22
- package/src/components/molecules/ImageSelectorv2/styles.js +0 -15
- package/src/components/molecules/Phase/Phase.stories.js +0 -107
- package/src/components/molecules/Phase/index.js +0 -391
- package/src/components/molecules/Phase/styles.js +0 -97
- package/src/components/molecules/ProductNameHeaderv2/ProductNameHeaderv2.stories.js +0 -37
- package/src/components/molecules/ProductNameHeaderv2/index.js +0 -12
- package/src/components/molecules/ProductNameHeaderv2/styles.js +0 -10
- package/src/components/molecules/ProductSkuStatus/ProductSkuStatus.stories.js +0 -37
- package/src/components/molecules/ProductSkuStatus/index.js +0 -26
- package/src/components/molecules/ProductSkuStatus/styles.js +0 -7
- package/src/components/molecules/RetailerSelectorv2/RetailerSelectorv2.stories.js +0 -35
- package/src/components/molecules/RetailerSelectorv2/index.js +0 -80
- package/src/components/molecules/RetailerSelectorv2/styles.js +0 -21
- package/src/components/molecules/ServiceDataValidator/ServiceDataValidator.stories.js +0 -90
- package/src/components/molecules/ServiceDataValidator/index.js +0 -49
- package/src/components/molecules/ServiceDataValidator/styles.js +0 -36
- package/src/components/molecules/StatusRetailer/StatusAsignationInfo.stories.js +0 -17
- package/src/components/molecules/StatusRetailer/index.js +0 -55
- package/src/components/molecules/StatusRetailer/styles.js +0 -85
- package/src/components/molecules/TabsMenuv2/TabsMenuv2.stories.js +0 -19
- package/src/components/molecules/TabsMenuv2/index.js +0 -112
- package/src/components/molecules/TabsMenuv2/styles.js +0 -19
- package/src/components/molecules/TagAndInputv2/TagAndInputv2.stories.js +0 -24
- package/src/components/molecules/TagAndInputv2/index.js +0 -86
- package/src/components/molecules/TagAndInputv2/styles.js +0 -35
- package/src/components/molecules/Validation/Validation.stories.js +0 -12
- package/src/components/molecules/Validation/index.js +0 -77
- package/src/components/molecules/Validation/styles.js +0 -19
- package/src/components/molecules/VersionItemv2/VersionItemv2.stories.js +0 -14
- package/src/components/molecules/VersionItemv2/index.js +0 -59
- package/src/components/molecules/VersionItemv2/styles.js +0 -47
- package/src/components/organisms/BarButtons/BarButtons.stories.js +0 -13
- package/src/components/organisms/BarButtons/index.js +0 -150
- package/src/components/organisms/BarButtons/styles.js +0 -54
- package/src/components/organisms/Chatv2/ChatLists/ChatLists.stories.js +0 -65
- 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 +0 -141
- package/src/components/organisms/Chatv2/ChatLists/styles.js +0 -162
- package/src/components/organisms/Chatv2/Chatv2.stories.js +0 -184
- package/src/components/organisms/Chatv2/ContainerItems/ContainerItems.stories.js +0 -142
- package/src/components/organisms/Chatv2/ContainerItems/index.js +0 -538
- package/src/components/organisms/Chatv2/ContainerItems/styles.js +0 -360
- package/src/components/organisms/Chatv2/ContentChat/ContentChat.stories.js +0 -102
- 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 +0 -1016
- package/src/components/organisms/Chatv2/ContentChat/styles.js +0 -44
- package/src/components/organisms/Chatv2/Footer/Footer.stories.js +0 -22
- package/src/components/organisms/Chatv2/Footer/index.js +0 -668
- package/src/components/organisms/Chatv2/Footer/styles.js +0 -290
- package/src/components/organisms/Chatv2/Header/Header.stories.js +0 -66
- package/src/components/organisms/Chatv2/Header/index.js +0 -93
- package/src/components/organisms/Chatv2/Header/styles.js +0 -49
- package/src/components/organisms/Chatv2/index.js +0 -281
- package/src/components/organisms/Chatv2/styles.js +0 -85
- package/src/components/organisms/CompleteServices/CompleteServices.stories.js +0 -91
- package/src/components/organisms/CompleteServices/index.js +0 -82
- package/src/components/organisms/CompleteServices/styles.js +0 -35
- package/src/components/organisms/DragAndDropPhases/DragAndDropPhases.stories.js +0 -13
- package/src/components/organisms/DragAndDropPhases/index.js +0 -336
- package/src/components/organisms/DragAndDropPhases/styles.js +0 -107
- package/src/components/organisms/DragPrueba/DragPrueba.stories.js +0 -12
- package/src/components/organisms/DragPrueba/index.js +0 -57
- package/src/components/organisms/DragPrueba/styles.js +0 -8
- package/src/components/organisms/EditGroup/EditGroup.stories.js +0 -20
- package/src/components/organisms/EditGroup/index.js +0 -321
- package/src/components/organisms/EditGroup/styles.js +0 -207
- package/src/components/organisms/FullProductNamev2/FullProductNamev2.stories.js +0 -28
- package/src/components/organisms/FullProductNamev2/index.js +0 -101
- package/src/components/organisms/FullProductNamev2/styles.js +0 -49
- package/src/components/organisms/FullTabsMenuv2/FullTabsMenuv2.stories.js +0 -22
- package/src/components/organisms/FullTabsMenuv2/index.js +0 -142
- package/src/components/organisms/FullTabsMenuv2/styles.js +0 -47
- package/src/components/organisms/ImageDataTablev2/ImageDataTablev2.stories.js +0 -24
- package/src/components/organisms/ImageDataTablev2/index.js +0 -124
- package/src/components/organisms/ImageDataTablev2/styles.js +0 -18
- package/src/components/organisms/ImagePreviewerv2/ImagePreviewerv2.stories.js +0 -38
- package/src/components/organisms/ImagePreviewerv2/index.js +0 -22
- package/src/components/organisms/ImagePreviewerv2/styles.js +0 -7
- package/src/components/organisms/ImageUploader/ImageUploader.stories.js +0 -15
- package/src/components/organisms/ImageUploader/index.js +0 -62
- package/src/components/organisms/ImageUploader/styles.js +0 -29
- package/src/components/organisms/ImageVisor/ImageVisor.stories.js +0 -15
- package/src/components/organisms/ImageVisor/index.js +0 -143
- package/src/components/organisms/ImageVisor/styles.js +0 -106
- package/src/components/organisms/InputGroupv2/InputGroupv2.stories.js +0 -31
- package/src/components/organisms/InputGroupv2/index.js +0 -296
- package/src/components/organisms/InputGroupv2/styles.js +0 -90
- package/src/components/organisms/MandatoryBar/MandatoryBar.stories.js +0 -18
- package/src/components/organisms/MandatoryBar/index.js +0 -31
- package/src/components/organisms/MandatoryBar/styles.js +0 -12
- package/src/components/organisms/ProductImageModalv2/ProductImageModalv2.stories.js +0 -90
- package/src/components/organisms/ProductImageModalv2/index.js +0 -105
- package/src/components/organisms/ProductImageModalv2/styles.js +0 -71
- package/src/components/organisms/RenameImagesBar/RenameImagesBar.stories.js +0 -18
- package/src/components/organisms/RenameImagesBar/index.js +0 -30
- package/src/components/organisms/RenameImagesBar/styles.js +0 -12
- package/src/components/organisms/Table/Table.stories.js +0 -609
- package/src/components/organisms/Table/index.js +0 -84
- package/src/components/organisms/Table/styles.js +0 -114
- package/src/components/organisms/VersionSelectorv2/VersionSelectorv2.stories.js +0 -15
- package/src/components/organisms/VersionSelectorv2/index.js +0 -105
- package/src/components/organisms/VersionSelectorv2/styles.js +0 -45
- package/src/components/pages/MultipleEdition/MultipleEdition.stories.js +0 -17
- package/src/components/pages/MultipleEdition/components/ImageUploader.js +0 -62
- package/src/components/pages/MultipleEdition/components/ImageUploaderStyles.js +0 -29
- package/src/components/pages/MultipleEdition/components/ImageVisor.js +0 -143
- package/src/components/pages/MultipleEdition/components/styles.js +0 -106
- package/src/components/pages/MultipleEdition/index.js +0 -248
- package/src/components/pages/MultipleEdition/saveData.js +0 -92
- package/src/components/pages/MultipleEdition/styles.js +0 -201
- package/src/components/pages/MultipleEdition/utils.js +0 -1073
- package/src/components/pages/ProductEditionv2/ProductEditionv2.stories.js +0 -213
- package/src/components/pages/ProductEditionv2/index.js +0 -1758
- package/src/components/pages/ProductEditionv2/styles.js +0 -154
- package/src/components/pages/RetailerProductEdition/generateThumnail.js +0 -21
|
@@ -1,98 +0,0 @@
|
|
|
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
|
-
`;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { ScreenHeaderv2 } from ".";
|
|
2
|
-
import { FontFamily, GlobalColors } from "../../../global-files/variables";
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: "Components/atoms/ScreenHeaderv2",
|
|
6
|
-
label: "Screen Header",
|
|
7
|
-
component: ScreenHeaderv2,
|
|
8
|
-
argTypes: {
|
|
9
|
-
headerType: {
|
|
10
|
-
options: [
|
|
11
|
-
"with-bold-text",
|
|
12
|
-
"product-name-header",
|
|
13
|
-
"retailer-name-header",
|
|
14
|
-
"input-name-header",
|
|
15
|
-
"date-header",
|
|
16
|
-
"header-and-paragraph",
|
|
17
|
-
],
|
|
18
|
-
control: { type: "select" },
|
|
19
|
-
},
|
|
20
|
-
fontFamily: {
|
|
21
|
-
options: Object.values(FontFamily),
|
|
22
|
-
control: { type: "select" },
|
|
23
|
-
},
|
|
24
|
-
color: {
|
|
25
|
-
options: Object.values(GlobalColors),
|
|
26
|
-
control: { type: "select" },
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
const Template = (args) => <ScreenHeaderv2 {...args} />;
|
|
32
|
-
|
|
33
|
-
export const ScreenHeaderDefatult = Template.bind({});
|
|
34
|
-
|
|
35
|
-
ScreenHeaderDefatult.args = {
|
|
36
|
-
text: "Header Text",
|
|
37
|
-
boldText: "this is the bold text",
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
export const ScreenHeaderDate = Template.bind({});
|
|
41
|
-
|
|
42
|
-
ScreenHeaderDate.args = {
|
|
43
|
-
text: "00/00/00",
|
|
44
|
-
headerType: "date-header",
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export const ScreenHeaderAndParagraph = Template.bind({});
|
|
48
|
-
|
|
49
|
-
ScreenHeaderAndParagraph.args = {
|
|
50
|
-
text: "Primer texto antes del span//",
|
|
51
|
-
boldText: "se puede cambiar el color de este texto con span",
|
|
52
|
-
Paragraph: "Aquí se incerta el parrafo en general y su etiqueta es p"
|
|
53
|
-
};
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import { GlobalColors } from "../../../global-files/variables";
|
|
2
|
-
import { Container} from "./styles";
|
|
3
|
-
import { TooltipLight } from "../TooltipLight";
|
|
4
|
-
import { useState } from "react";
|
|
5
|
-
import { WordsMissing } from "../WordsMissing";
|
|
6
|
-
import { CharsMissing } from "../CharsMissing";
|
|
7
|
-
|
|
8
|
-
export const ScreenHeaderv2 = ({
|
|
9
|
-
text,
|
|
10
|
-
boldText,
|
|
11
|
-
fontFamily,
|
|
12
|
-
color,
|
|
13
|
-
headerType,
|
|
14
|
-
Paragraph,
|
|
15
|
-
showInfoTool=false,
|
|
16
|
-
required,
|
|
17
|
-
minChar,
|
|
18
|
-
maxChar,
|
|
19
|
-
minWords,
|
|
20
|
-
maxWords,
|
|
21
|
-
description,
|
|
22
|
-
showMissingChars,
|
|
23
|
-
inputName,
|
|
24
|
-
inputId,
|
|
25
|
-
inputValue = "",
|
|
26
|
-
inputPlaceholder,
|
|
27
|
-
articleId,
|
|
28
|
-
updatedDescriptions,
|
|
29
|
-
setUpdatedDescriptions,
|
|
30
|
-
isRequired,
|
|
31
|
-
}) => {
|
|
32
|
-
const [textValue, setTextValue] = useState({
|
|
33
|
-
value: inputValue,
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
const onHandleChange = (evt) => {
|
|
37
|
-
if (validateInput) {
|
|
38
|
-
setTextValue({ value: validateInput(evt, position, inputsArray) });
|
|
39
|
-
} else if (
|
|
40
|
-
updatedDatasheets ||
|
|
41
|
-
updatedDescriptions ||
|
|
42
|
-
inputType === "textarea"
|
|
43
|
-
) {
|
|
44
|
-
let generalValue;
|
|
45
|
-
if (optionList?.length > 0) {
|
|
46
|
-
let valueSelected = evt.target.value;
|
|
47
|
-
generalValue = valueSelected;
|
|
48
|
-
setTextValue({ value: generalValue });
|
|
49
|
-
} else {
|
|
50
|
-
generalValue =
|
|
51
|
-
inputType === "checkbox" ? evt.target.checked : evt.target.value;
|
|
52
|
-
setTextValue({
|
|
53
|
-
value: generalValue,
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
let dataSave = updatedDatasheets?.slice();
|
|
57
|
-
|
|
58
|
-
if (dataSave?.length > 0) {
|
|
59
|
-
const index = dataSave.findIndex((e) => e.attributeId === inputId);
|
|
60
|
-
if (index !== -1) {
|
|
61
|
-
if (generalValue !== inputValue) dataSave[index].value = generalValue;
|
|
62
|
-
else dataSave.splice(index, 1);
|
|
63
|
-
} else {
|
|
64
|
-
dataSave.push({
|
|
65
|
-
articleId: articleId,
|
|
66
|
-
attributeId: inputId,
|
|
67
|
-
value: generalValue,
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
} else {
|
|
71
|
-
if (generalValue !== inputValue) {
|
|
72
|
-
dataSave.push({
|
|
73
|
-
articleId: articleId,
|
|
74
|
-
attributeId: inputId,
|
|
75
|
-
value: generalValue,
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
setUpdatedDatasheets(dataSave);
|
|
80
|
-
} else {
|
|
81
|
-
setTextValue({ value: evt.target.value });
|
|
82
|
-
inputOnChange && inputOnChange(evt);
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
return (
|
|
86
|
-
<Container
|
|
87
|
-
fontFamily={fontFamily}
|
|
88
|
-
color={color}
|
|
89
|
-
className={headerType}
|
|
90
|
-
key={`title-${text}`}
|
|
91
|
-
>
|
|
92
|
-
<div className="tool-text">
|
|
93
|
-
{showInfoTool &&
|
|
94
|
-
<TooltipLight required={required} min_chars={minChar} max_chars={maxChar} min_words={minWords} max_words={maxWords} description={description}></TooltipLight>
|
|
95
|
-
}
|
|
96
|
-
{text} {boldText && <span> {boldText}</span>}
|
|
97
|
-
{Paragraph && <p>{Paragraph}</p>}
|
|
98
|
-
</div>
|
|
99
|
-
<div className="words-container">
|
|
100
|
-
{showMissingChars && <CharsMissing
|
|
101
|
-
name={inputName}
|
|
102
|
-
inputId={inputId}
|
|
103
|
-
placeholder={inputPlaceholder}
|
|
104
|
-
mainValue={textValue.value}
|
|
105
|
-
onChange={onHandleChange}
|
|
106
|
-
articleId={articleId}
|
|
107
|
-
updatedDescriptions={updatedDescriptions}
|
|
108
|
-
setUpdatedDescriptions={setUpdatedDescriptions}
|
|
109
|
-
maxChar={maxChar}
|
|
110
|
-
isRequired={isRequired}
|
|
111
|
-
/>}
|
|
112
|
-
{maxWords && <WordsMissing
|
|
113
|
-
name={inputName}
|
|
114
|
-
inputId={inputId}
|
|
115
|
-
placeholder={inputPlaceholder}
|
|
116
|
-
mainValue={textValue.value}
|
|
117
|
-
onChange={onHandleChange}
|
|
118
|
-
articleId={articleId}
|
|
119
|
-
updatedDescriptions={updatedDescriptions}
|
|
120
|
-
setUpdatedDescriptions={setUpdatedDescriptions}
|
|
121
|
-
maxWords={maxWords}
|
|
122
|
-
isRequired={isRequired}
|
|
123
|
-
/>}
|
|
124
|
-
</div>
|
|
125
|
-
|
|
126
|
-
</Container>
|
|
127
|
-
);
|
|
128
|
-
};
|
|
129
|
-
|
|
130
|
-
ScreenHeaderv2.defaultProps = {
|
|
131
|
-
text: "Header Text Default",
|
|
132
|
-
fontFamily: "RobotoRegular",
|
|
133
|
-
color: GlobalColors.black,
|
|
134
|
-
};
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import styled from "styled-components";
|
|
2
|
-
import { GlobalColors } from "../../../global-files/variables";
|
|
3
|
-
import { FontFamily } from "../../../global-files/variables";
|
|
4
|
-
|
|
5
|
-
export const Container = styled.h2`
|
|
6
|
-
font-family: ${FontFamily.RobotoRegular}, sans-serif;
|
|
7
|
-
font-style: normal;
|
|
8
|
-
font-size: 22px;
|
|
9
|
-
line-height: 24px;
|
|
10
|
-
font-weight:700;
|
|
11
|
-
font-feature-settings: "pnum" on, "lnum" on;
|
|
12
|
-
color: ${(props) => props.color};
|
|
13
|
-
position: relative;
|
|
14
|
-
|
|
15
|
-
&.with-bold-text {
|
|
16
|
-
span {
|
|
17
|
-
font-family: ${FontFamily.RobotoMedium};
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
&.product-name-header {
|
|
22
|
-
font-size: 14px;
|
|
23
|
-
line-height: 16px;
|
|
24
|
-
font-weight: 500;
|
|
25
|
-
letter-spacing: -0.015em;
|
|
26
|
-
color: ${({ color }) => (color ? color : GlobalColors.black)};
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
&.retailer-name-header {
|
|
30
|
-
font-size: 17px;
|
|
31
|
-
font-weight: 500;
|
|
32
|
-
line-height: 19px;
|
|
33
|
-
color: ${({ color }) => (color ? color : GlobalColors.black)};
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
&.input-name-header {
|
|
37
|
-
font-size: 12px;
|
|
38
|
-
line-height: 14px;
|
|
39
|
-
height: auto;
|
|
40
|
-
max-width: 100%;
|
|
41
|
-
font-weight: 400;
|
|
42
|
-
color: ${({ color }) => (color ? color : GlobalColors.black)};
|
|
43
|
-
overflow: hidden;
|
|
44
|
-
text-overflow: ellipsis;
|
|
45
|
-
display: flex;
|
|
46
|
-
flex-direction: column;
|
|
47
|
-
gap:4px;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
&.date-header {
|
|
51
|
-
font-family: ${FontFamily.AvenirNext};
|
|
52
|
-
color: ${({ color }) => (color ? color : GlobalColors.s4)};
|
|
53
|
-
font-size: 13px;
|
|
54
|
-
font-weight: 400;
|
|
55
|
-
line-height: 18px;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
&.table-row-text {
|
|
59
|
-
font-family: ${FontFamily.AvenirNext};
|
|
60
|
-
color: ${({ color }) => (color ? color : GlobalColors.s4)};
|
|
61
|
-
font-weight: 400;
|
|
62
|
-
font-size: 11px;
|
|
63
|
-
line-height: 18px;
|
|
64
|
-
|
|
65
|
-
&:last-child {
|
|
66
|
-
min-width: 50px;
|
|
67
|
-
text-align: center;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
&.gray-table-row {
|
|
72
|
-
font-family: ${FontFamily.AvenirNext};
|
|
73
|
-
font-weight: 400;
|
|
74
|
-
font-size: 11px;
|
|
75
|
-
line-height: 19px;
|
|
76
|
-
color: ${({ color }) => (color ? color : GlobalColors.gray)};
|
|
77
|
-
background-color: ${GlobalColors.blue_light};
|
|
78
|
-
padding: 1px 3px;
|
|
79
|
-
border-radius: 3px;
|
|
80
|
-
min-width: 50px;
|
|
81
|
-
text-align: center;
|
|
82
|
-
}
|
|
83
|
-
&.header-and-paragraph {
|
|
84
|
-
font-family: ${FontFamily.Raleway};
|
|
85
|
-
font-size: 36px;
|
|
86
|
-
color: ${GlobalColors.s5};
|
|
87
|
-
p {
|
|
88
|
-
font-family: ${FontFamily.AvenirNext};
|
|
89
|
-
font-size: 14px;
|
|
90
|
-
color: ${GlobalColors.s4};
|
|
91
|
-
letter-spacing: -0.015em;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
.tool-text{
|
|
95
|
-
display:flex;
|
|
96
|
-
gap:5px;
|
|
97
|
-
}
|
|
98
|
-
.words-container{
|
|
99
|
-
padding-left:15px;
|
|
100
|
-
display: flex;
|
|
101
|
-
gap: 5px;
|
|
102
|
-
}
|
|
103
|
-
`;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { VrsnSelect } from "./style";
|
|
2
|
-
|
|
3
|
-
export const VersionSelectv2 = ({
|
|
4
|
-
id,
|
|
5
|
-
selectedVersions,
|
|
6
|
-
onChange,
|
|
7
|
-
label,
|
|
8
|
-
versions = [],
|
|
9
|
-
}) => {
|
|
10
|
-
return (
|
|
11
|
-
<VrsnSelect>
|
|
12
|
-
<label htmlFor={id}>{label}</label>
|
|
13
|
-
<select
|
|
14
|
-
id={id}
|
|
15
|
-
name={id}
|
|
16
|
-
value={selectedVersions[id]}
|
|
17
|
-
onChange={onChange}
|
|
18
|
-
>
|
|
19
|
-
{versions.map((item, index) => (
|
|
20
|
-
<option key={`${id}-${index}`} value={item.version}>
|
|
21
|
-
Version {item.version}
|
|
22
|
-
</option>
|
|
23
|
-
))}
|
|
24
|
-
</select>
|
|
25
|
-
</VrsnSelect>
|
|
26
|
-
);
|
|
27
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { SelectCustom, Container, BackgroundEnd } from "./style";
|
|
2
|
-
|
|
3
|
-
export default function Selectv2(props) {
|
|
4
|
-
return (
|
|
5
|
-
<Container width={props.width}>
|
|
6
|
-
<SelectCustom
|
|
7
|
-
id={props.id}
|
|
8
|
-
width={props.width}
|
|
9
|
-
onChange={props.onChange}
|
|
10
|
-
value={props.valueSelected ? props.valueSelected : ""}
|
|
11
|
-
className={props.className}
|
|
12
|
-
>
|
|
13
|
-
<option value="" disabled>
|
|
14
|
-
{props.placeholder}
|
|
15
|
-
</option>
|
|
16
|
-
{props.options &&
|
|
17
|
-
props.options.map((item, i) => (
|
|
18
|
-
<option
|
|
19
|
-
className={item.required ? "option-required" : ""}
|
|
20
|
-
//className={ ? "option-required" : ""}
|
|
21
|
-
key={"select-" + item.value ? item.value : item + "-" + i}
|
|
22
|
-
value={item.value ? item.value : item}
|
|
23
|
-
// selected={
|
|
24
|
-
// item.value
|
|
25
|
-
// ? item.value === props.valueSelected && "selected"
|
|
26
|
-
// : item === props.valueSelected && "selected"
|
|
27
|
-
// }
|
|
28
|
-
>
|
|
29
|
-
{item.name ? item.name : item} {item?.required ? "*" : ""}
|
|
30
|
-
</option>
|
|
31
|
-
))}
|
|
32
|
-
</SelectCustom>
|
|
33
|
-
</Container>
|
|
34
|
-
);
|
|
35
|
-
}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import styled from "styled-components";
|
|
2
|
-
import { GlobalColors, FontFamily } from "../../../global-files/variables";
|
|
3
|
-
|
|
4
|
-
export const Container = styled.div`
|
|
5
|
-
position: relative;
|
|
6
|
-
display: flex;
|
|
7
|
-
align-items: center;
|
|
8
|
-
cursor: pointer;
|
|
9
|
-
height: 21px;
|
|
10
|
-
line-height: 3;
|
|
11
|
-
width: ${({ width }) => width || "100%"};
|
|
12
|
-
overflow: hidden;
|
|
13
|
-
border-radius: 0.25em;
|
|
14
|
-
&::after {
|
|
15
|
-
content: "";
|
|
16
|
-
width: 0;
|
|
17
|
-
height: 0;
|
|
18
|
-
transform: rotate(0deg);
|
|
19
|
-
transition: transform 0.3s ease;
|
|
20
|
-
}
|
|
21
|
-
&::before {
|
|
22
|
-
content: "";
|
|
23
|
-
width: 0;
|
|
24
|
-
height: 0;
|
|
25
|
-
border-left: 4px solid transparent;
|
|
26
|
-
border-right: 4px solid transparent;
|
|
27
|
-
border-bottom: 4px solid ${GlobalColors.gray};
|
|
28
|
-
position: absolute;
|
|
29
|
-
right: 12px;
|
|
30
|
-
top: 35%;
|
|
31
|
-
transform: rotate(-180deg);
|
|
32
|
-
}
|
|
33
|
-
`;
|
|
34
|
-
|
|
35
|
-
export const BackgroundEnd = styled.div`
|
|
36
|
-
position: absolute;
|
|
37
|
-
left: calc(100% - 18px);
|
|
38
|
-
height: 100%;
|
|
39
|
-
width: 18px;
|
|
40
|
-
background-color: #fafafa;
|
|
41
|
-
`;
|
|
42
|
-
|
|
43
|
-
export const SelectCustom = styled.select`
|
|
44
|
-
border:1px solid ${GlobalColors.gray_light};
|
|
45
|
-
border-radius:5px;
|
|
46
|
-
-webkit-appearance: none;
|
|
47
|
-
-moz-appearance: none;
|
|
48
|
-
-ms-appearance: none;
|
|
49
|
-
appearance: none;
|
|
50
|
-
outline: 0;
|
|
51
|
-
box-shadow: none;
|
|
52
|
-
background-image: none;
|
|
53
|
-
width: ${({ width }) => width || "100%"};
|
|
54
|
-
cursor: pointer;
|
|
55
|
-
height: 21px;
|
|
56
|
-
font-family: Avenir Next;
|
|
57
|
-
font-style: normal;
|
|
58
|
-
font-weight: normal;
|
|
59
|
-
font-size: 12px;
|
|
60
|
-
line-height: 21px;
|
|
61
|
-
color:${GlobalColors.gray};
|
|
62
|
-
padding: 0 5px;
|
|
63
|
-
box-sizing: border-box;
|
|
64
|
-
&::-ms-expand {
|
|
65
|
-
display: none;
|
|
66
|
-
}
|
|
67
|
-
option {
|
|
68
|
-
&:disabled {
|
|
69
|
-
color: #d4d1d7;
|
|
70
|
-
}
|
|
71
|
-
&:invalid {
|
|
72
|
-
color: gray;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
&.version-selector {
|
|
77
|
-
}
|
|
78
|
-
`;
|
|
79
|
-
|
|
80
|
-
export const VrsnSelect = styled.div`
|
|
81
|
-
background-color: ${GlobalColors.deep_gray};
|
|
82
|
-
|
|
83
|
-
select {
|
|
84
|
-
border: 1px solid ${GlobalColors.s3} !important;
|
|
85
|
-
background-color: transparent;
|
|
86
|
-
color: ${GlobalColors.white};
|
|
87
|
-
width: 100%;
|
|
88
|
-
text-align: center;
|
|
89
|
-
padding: 5px;
|
|
90
|
-
border-radius: 15px;
|
|
91
|
-
text-decoration: none;
|
|
92
|
-
}
|
|
93
|
-
`;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { TabSectionv2 } from ".";
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: "Components/atoms/TabSectionv2",
|
|
5
|
-
label: "Tab Section",
|
|
6
|
-
|
|
7
|
-
argTypes: {},
|
|
8
|
-
component: TabSectionv2,
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
const Template = (args) => <TabSectionv2 {...args} />;
|
|
12
|
-
|
|
13
|
-
export const TabSectionv2Default = Template.bind({});
|
|
14
|
-
|
|
15
|
-
TabSectionv2Default.args = {
|
|
16
|
-
label: "Default Tab",
|
|
17
|
-
active: "",
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export const TabSectionv2Active = Template.bind({});
|
|
21
|
-
|
|
22
|
-
TabSectionv2Active.args = {
|
|
23
|
-
label: "Active Tab",
|
|
24
|
-
active: "active",
|
|
25
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import styled from "styled-components";
|
|
2
|
-
import { FontFamily, GlobalColors } from "../../../global-files/variables";
|
|
3
|
-
|
|
4
|
-
export const Container = styled.div`
|
|
5
|
-
font-family: ${FontFamily.Raleway_500};
|
|
6
|
-
color: ${GlobalColors.s5};
|
|
7
|
-
font-size: 14px;
|
|
8
|
-
line-height: 21px;
|
|
9
|
-
border-bottom: 2px solid ${GlobalColors.s3};
|
|
10
|
-
width: 149px;
|
|
11
|
-
padding-bottom: 5px;
|
|
12
|
-
transition: 0.1s all;
|
|
13
|
-
cursor: pointer;
|
|
14
|
-
|
|
15
|
-
&.active {
|
|
16
|
-
font-size: 18px;
|
|
17
|
-
border-bottom: 2px solid ${GlobalColors.magenta_s2};
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
`;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { TooltipLight } from "./index";
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: "Components/atoms/TooltipLight",
|
|
5
|
-
component: TooltipLight,
|
|
6
|
-
argTypes: {
|
|
7
|
-
},
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
const Template = (args) => <TooltipLight {...args} />;
|
|
11
|
-
|
|
12
|
-
export const TooltipLightDefault = Template.bind({});
|
|
13
|
-
TooltipLightDefault.args = {
|
|
14
|
-
description:"Aquí va la descripción del campo",
|
|
15
|
-
required:true,
|
|
16
|
-
min_chars:"10",
|
|
17
|
-
max_chars:"100",
|
|
18
|
-
min_words:"5",
|
|
19
|
-
max_words:"25",
|
|
20
|
-
};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { Container, LightTooltip } from "./styles";
|
|
2
|
-
import IconInfo from "../../../assets/images/Icons/info.svg";
|
|
3
|
-
import IconInfoNR from "../../../assets/images/Icons/infoNR.svg";
|
|
4
|
-
import Tooltip, { tooltipClasses } from '@mui/material/Tooltip';
|
|
5
|
-
import { styled } from '@mui/material/styles';
|
|
6
|
-
import { FontFamily, GlobalColors } from "../../../global-files/variables";
|
|
7
|
-
import React from "react";
|
|
8
|
-
|
|
9
|
-
export const TooltipLight = ({description, description_small, required, min_chars, max_chars, min_words, max_words}) => {
|
|
10
|
-
const LightTooltip = styled(({ className, ...props }) => (
|
|
11
|
-
<Tooltip {...props} classes={{ popper: className }}/>
|
|
12
|
-
))(({ theme }) => ({
|
|
13
|
-
[`& .${tooltipClasses.tooltip}`]: {
|
|
14
|
-
className: "tooltip",
|
|
15
|
-
backgroundColor: GlobalColors.white,
|
|
16
|
-
color: "rgba(0, 0, 0, 0.87)",
|
|
17
|
-
boxShadow: theme.shadows[1],
|
|
18
|
-
fontSize: 12,
|
|
19
|
-
fontFamily: `${FontFamily.Roboto}, sans-serif`,
|
|
20
|
-
lineHeight:1.2,
|
|
21
|
-
},
|
|
22
|
-
}));
|
|
23
|
-
|
|
24
|
-
return (
|
|
25
|
-
<LightTooltip
|
|
26
|
-
title={
|
|
27
|
-
<div className="container-tooltip">
|
|
28
|
-
<p className="obligatorio"><b>{required ? "Obligatorio" : "Opcional"}</b></p>
|
|
29
|
-
<p className="container-tooltip">{description}</p>
|
|
30
|
-
{/* FIXME : cambiar la validacion para que solo sea un booleano si se ocupa min y max */}
|
|
31
|
-
{description_small && <p className="container-tooltip"><small>{description_small}</small></p>}
|
|
32
|
-
{max_chars && <br/>}
|
|
33
|
-
{max_chars && <p><small className="min-chars"> Mínimo de caracteres: {min_chars !== null ? min_chars : 0}</small></p>}
|
|
34
|
-
{max_chars && <p><small className="max-chars">Máximo de caracteres: {max_chars}</small></p>}
|
|
35
|
-
{max_words && <br/>}
|
|
36
|
-
{max_words && <p><small className="min-words">Mínimo de palabras: {min_words !== null ? min_words : 0}</small> </p>}
|
|
37
|
-
{max_words && <p><small className="max-words">Máximo de palabras: {max_words}</small></p>}
|
|
38
|
-
|
|
39
|
-
</div>
|
|
40
|
-
}>
|
|
41
|
-
<Container className="">
|
|
42
|
-
{required ? <img className="icon" src={IconInfo} alt="iconInfo" /> : <img className="icon" src={IconInfoNR} alt="iconInfo" /> }
|
|
43
|
-
</Container>
|
|
44
|
-
</LightTooltip>
|
|
45
|
-
);
|
|
46
|
-
};
|