contentoh-components-library 21.0.31 → 21.0.34

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.
Files changed (213) hide show
  1. package/.env.development +5 -16
  2. package/.env.production +3 -14
  3. package/CHANGELOG.md +33 -31
  4. package/dist/assets/images/carouselImagesLogin/login2.svg +117 -0
  5. package/dist/assets/images/carouselImagesLogin/login3.svg +147 -0
  6. package/dist/assets/images/carouselImagesLogin/loginImage.svg +301 -0
  7. package/dist/components/atoms/AsignationOption/index.js +5 -9
  8. package/dist/components/atoms/AsignationOption/styles.js +1 -1
  9. package/dist/components/atoms/CheckBox/index.js +2 -4
  10. package/dist/components/atoms/GeneralButton/index.js +0 -5
  11. package/dist/components/atoms/GeneralButton/styles.js +2 -4
  12. package/dist/components/atoms/GeneralInput/index.js +24 -73
  13. package/dist/components/atoms/GeneralInput/styles.js +1 -7
  14. package/dist/components/atoms/GenericModal/index.js +2 -4
  15. package/dist/components/atoms/GenericModal/styles.js +1 -1
  16. package/dist/components/atoms/ListCommercialRetailers/ListCommercialRetailers.stories.js +36 -0
  17. package/dist/components/atoms/ListCommercialRetailers/index.js +64 -0
  18. package/dist/components/atoms/ListCommercialRetailers/styles.js +20 -0
  19. package/dist/components/atoms/Loading/Loading.stories.js +28 -0
  20. package/dist/components/atoms/Loading/index.js +2 -1
  21. package/dist/components/atoms/Loading/styles.js +4 -8
  22. package/dist/components/atoms/MenuCommercialRetailers/MenuCommercialRetailers.stories.js +37 -0
  23. package/dist/components/atoms/MenuCommercialRetailers/index.js +25 -0
  24. package/dist/components/{molecules/RetailerSelector → atoms/MenuCommercialRetailers}/styles.js +1 -1
  25. package/dist/components/atoms/MenuProductImage/MenuProductImage.stories.js +28 -0
  26. package/dist/components/atoms/MenuProductImage/index.js +88 -0
  27. package/dist/components/atoms/MenuProductImage/styles.js +20 -0
  28. package/dist/components/atoms/PriorityFlag/index.js +1 -1
  29. package/dist/components/atoms/ProductImage/styles.js +1 -1
  30. package/dist/components/atoms/ProgressBar/index.js +2 -2
  31. package/dist/components/atoms/ProgressBar/styles.js +5 -3
  32. package/dist/components/atoms/ScreenHeader/index.js +1 -1
  33. package/dist/components/atoms/ScreenHeader/styles.js +1 -1
  34. package/dist/components/atoms/StatusTag/index.js +2 -37
  35. package/dist/components/atoms/StatusTag/styles.js +1 -1
  36. package/dist/components/atoms/ValidationPanel/index.js +3 -4
  37. package/dist/components/atoms/VerticalSideMenuMainPage/VerticalSideMenuMainPage.stories.js +22 -0
  38. package/dist/components/atoms/VerticalSideMenuMainPage/index.js +49 -0
  39. package/dist/components/atoms/{Commentary → VerticalSideMenuMainPage}/styles.js +1 -6
  40. package/dist/components/molecules/ApproveRejetPanel/ApproveRejetPanel.stories.js +25 -0
  41. package/dist/components/molecules/ApproveRejetPanel/index.js +49 -0
  42. package/dist/components/{atoms/CharCounter → molecules/ApproveRejetPanel}/styles.js +1 -3
  43. package/dist/components/molecules/AvatarAndValidation/index.js +7 -17
  44. package/dist/components/molecules/AvatarAndValidation/styles.js +1 -1
  45. package/dist/components/molecules/CarouselImagesLogin/index.js +40 -42
  46. package/dist/components/molecules/EmailResetPasswordLogin/EmailResetPasswordLogin.stories.js +28 -0
  47. package/dist/components/molecules/EmailResetPasswordLogin/index.js +155 -0
  48. package/dist/components/molecules/EmailResetPasswordLogin/styles.js +20 -0
  49. package/dist/components/molecules/FeaturesBar/index.js +1 -1
  50. package/dist/components/molecules/GalleryElement/index.js +21 -80
  51. package/dist/components/molecules/GalleryElement/styles.js +1 -1
  52. package/dist/components/molecules/GalleryHeader/index.js +6 -28
  53. package/dist/components/molecules/GalleryHeader/styles.js +1 -1
  54. package/dist/components/molecules/ImageSelector/index.js +4 -2
  55. package/dist/components/molecules/ProductNameHeader/index.js +2 -1
  56. package/dist/components/molecules/RegistrationFirstStep/RegistrationFirstStep.stories.js +28 -0
  57. package/dist/components/molecules/RegistrationFirstStep/index.js +336 -0
  58. package/dist/components/molecules/RegistrationFirstStep/styles.js +20 -0
  59. package/dist/components/molecules/RegistrationSecondStep/RegistrationSecondStep.stories.js +28 -0
  60. package/dist/components/molecules/RegistrationSecondStep/index.js +156 -0
  61. package/dist/components/molecules/RegistrationSecondStep/styles.js +20 -0
  62. package/dist/components/molecules/RegistrationThirdStep/RegistrationThirdStep.stories.js +28 -0
  63. package/dist/components/molecules/RegistrationThirdStep/index.js +161 -0
  64. package/dist/components/molecules/RegistrationThirdStep/styles.js +20 -0
  65. package/dist/components/{atoms/CharCounter/CharCounter.stories.js → molecules/SignInLogin/SignInLogin.stories.js} +7 -10
  66. package/dist/components/molecules/SignInLogin/index.js +292 -0
  67. package/dist/components/molecules/SignInLogin/styles.js +20 -0
  68. package/dist/components/molecules/StatusAsignationInfo/index.js +25 -46
  69. package/dist/components/molecules/StatusAsignationInfo/styles.js +1 -1
  70. package/dist/components/molecules/TableHeader/index.js +5 -12
  71. package/dist/components/molecules/TableHeader/styles.js +1 -1
  72. package/dist/components/molecules/TagAndInput/index.js +2 -26
  73. package/dist/components/molecules/VerificationCodeResetPasswordLogin/VerificationCodeResetPasswordLogin.stories.js +28 -0
  74. package/dist/components/molecules/VerificationCodeResetPasswordLogin/index.js +104 -0
  75. package/dist/components/molecules/VerificationCodeResetPasswordLogin/styles.js +20 -0
  76. package/dist/components/molecules/VerificationCodeResetPasswordLogin/utils.js +69 -0
  77. package/dist/components/{atoms/InputFormatter/Wysiwyg.stories.js → organisms/ChangePassword/ChangePassword.stories.js} +7 -9
  78. package/dist/components/organisms/ChangePassword/index.js +113 -0
  79. package/dist/components/organisms/ChangePassword/styles.js +18 -0
  80. package/dist/components/organisms/FullProductNameHeader/index.js +8 -32
  81. package/dist/components/organisms/FullTabsMenu/index.js +5 -18
  82. package/dist/components/organisms/ImageDataTable/index.js +14 -90
  83. package/dist/components/organisms/InputGroup/index.js +13 -34
  84. package/dist/components/organisms/InputGroup/styles.js +1 -1
  85. package/dist/components/organisms/ProductImageModal/index.js +11 -15
  86. package/dist/components/organisms/ProductImageModal/styles.js +1 -1
  87. package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +347 -109
  88. package/dist/components/pages/RetailerProductEdition/index.js +59 -1589
  89. package/dist/components/pages/RetailerProductEdition/styles.js +1 -1
  90. package/dist/global-files/data.js +53 -212
  91. package/dist/global-files/global-styles.css +0 -1
  92. package/dist/global-files/variables.js +0 -1
  93. package/dist/index.js +260 -31
  94. package/package.json +14 -12
  95. package/src/components/atoms/AsignationOption/index.js +5 -7
  96. package/src/components/atoms/AsignationOption/styles.js +1 -9
  97. package/src/components/atoms/CheckBox/index.js +2 -8
  98. package/src/components/atoms/GeneralButton/index.js +2 -9
  99. package/src/components/atoms/GeneralButton/styles.js +0 -23
  100. package/src/components/atoms/GeneralInput/index.js +21 -71
  101. package/src/components/atoms/GeneralInput/styles.js +1 -11
  102. package/src/components/atoms/GenericModal/index.js +2 -2
  103. package/src/components/atoms/GenericModal/styles.js +2 -10
  104. package/src/components/atoms/Loading/Loading.stories.js +10 -0
  105. package/src/components/atoms/Loading/index.js +5 -4
  106. package/src/components/atoms/Loading/styles.js +43 -43
  107. package/src/components/atoms/PriorityFlag/index.js +1 -1
  108. package/src/components/atoms/ProductImage/styles.js +1 -1
  109. package/src/components/atoms/ProgressBar/index.js +2 -2
  110. package/src/components/atoms/ProgressBar/styles.js +3 -54
  111. package/src/components/atoms/ScreenHeader/index.js +3 -7
  112. package/src/components/atoms/ScreenHeader/styles.js +2 -9
  113. package/src/components/atoms/StatusTag/index.js +2 -30
  114. package/src/components/atoms/StatusTag/styles.js +3 -15
  115. package/src/components/atoms/ValidationPanel/index.js +3 -3
  116. package/src/components/molecules/AvatarAndValidation/index.js +6 -24
  117. package/src/components/molecules/AvatarAndValidation/styles.js +1 -1
  118. package/src/components/molecules/CarouselImagesLogin/index.js +34 -37
  119. package/src/components/molecules/EmailResetPasswordLogin/EmailResetPasswordLogin.stories.js +11 -0
  120. package/src/components/molecules/EmailResetPasswordLogin/index.js +86 -0
  121. package/src/components/molecules/EmailResetPasswordLogin/styles.js +23 -0
  122. package/src/components/molecules/FeaturesBar/index.js +7 -10
  123. package/src/components/molecules/GalleryElement/index.js +36 -75
  124. package/src/components/molecules/GalleryElement/styles.js +11 -38
  125. package/src/components/molecules/GalleryHeader/index.js +8 -14
  126. package/src/components/molecules/GalleryHeader/styles.js +0 -16
  127. package/src/components/molecules/ImageSelector/index.js +3 -2
  128. package/src/components/molecules/ProductNameHeader/index.js +2 -1
  129. package/src/components/molecules/RegistrationFirstStep/RegistrationFirstStep.stories.js +11 -0
  130. package/src/components/molecules/RegistrationFirstStep/index.js +242 -0
  131. package/src/components/molecules/RegistrationFirstStep/styles.js +81 -0
  132. package/src/components/molecules/RegistrationSecondStep/RegistrationSecondStep.stories.js +11 -0
  133. package/src/components/molecules/RegistrationSecondStep/index.js +97 -0
  134. package/src/components/molecules/RegistrationSecondStep/styles.js +59 -0
  135. package/src/components/molecules/RegistrationThirdStep/RegistrationThirdStep.stories.js +11 -0
  136. package/src/components/molecules/RegistrationThirdStep/index.js +109 -0
  137. package/src/components/molecules/RegistrationThirdStep/styles.js +44 -0
  138. package/src/components/molecules/SignInLogin/SignInLogin.stories.js +11 -0
  139. package/src/components/molecules/SignInLogin/index.js +206 -0
  140. package/src/components/molecules/SignInLogin/styles.js +78 -0
  141. package/src/components/molecules/StatusAsignationInfo/index.js +38 -62
  142. package/src/components/molecules/StatusAsignationInfo/styles.js +2 -12
  143. package/src/components/molecules/TableHeader/index.js +3 -16
  144. package/src/components/molecules/TableHeader/styles.js +0 -5
  145. package/src/components/molecules/TagAndInput/index.js +0 -24
  146. package/src/components/molecules/VerificationCodeResetPasswordLogin/VerificationCodeResetPasswordLogin.stories.js +11 -0
  147. package/src/components/molecules/VerificationCodeResetPasswordLogin/index.js +78 -0
  148. package/src/components/molecules/VerificationCodeResetPasswordLogin/styles.js +49 -0
  149. package/src/components/molecules/VerificationCodeResetPasswordLogin/utils.js +56 -0
  150. package/src/components/organisms/ChangePassword/ChangePassword.stories.js +11 -0
  151. package/src/components/organisms/ChangePassword/index.js +63 -0
  152. package/src/components/organisms/ChangePassword/styles.js +16 -0
  153. package/src/components/organisms/FullProductNameHeader/index.js +7 -28
  154. package/src/components/organisms/FullTabsMenu/index.js +3 -15
  155. package/src/components/organisms/ImageDataTable/index.js +11 -89
  156. package/src/components/organisms/InputGroup/index.js +11 -46
  157. package/src/components/organisms/InputGroup/styles.js +0 -3
  158. package/src/components/organisms/ProductImageModal/index.js +12 -20
  159. package/src/components/organisms/ProductImageModal/styles.js +0 -3
  160. package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +343 -117
  161. package/src/components/pages/RetailerProductEdition/index.js +46 -1225
  162. package/src/components/pages/RetailerProductEdition/styles.js +4 -67
  163. package/src/global-files/data.js +57 -156
  164. package/src/global-files/global-styles.css +0 -1
  165. package/src/global-files/variables.js +0 -1
  166. package/src/index.js +33 -1
  167. package/dist/assets/images/generalButton/downloadIcon.svg +0 -3
  168. package/dist/assets/images/modalsSVGs/attributesSent.svg +0 -208
  169. package/dist/assets/images/modalsSVGs/descriptionSent.svg +0 -237
  170. package/dist/assets/images/modalsSVGs/providerSent.svg +0 -445
  171. package/dist/assets/images/modalsSVGs/uploadingImages.svg +0 -148
  172. package/dist/components/atoms/CharCounter/index.js +0 -22
  173. package/dist/components/atoms/Commentary/Commentary.stories.js +0 -1
  174. package/dist/components/atoms/Commentary/index.js +0 -23
  175. package/dist/components/atoms/Input/index.js +0 -26
  176. package/dist/components/atoms/Input/style.js +0 -26
  177. package/dist/components/atoms/InputFormatter/index.js +0 -185
  178. package/dist/components/atoms/InputFormatter/styles.js +0 -33
  179. package/dist/components/atoms/LabelToInput/index.js +0 -53
  180. package/dist/components/atoms/LabelToInput/style.js +0 -22
  181. package/dist/components/atoms/Percent/Percent.stories.js +0 -39
  182. package/dist/components/atoms/Percent/index.js +0 -39
  183. package/dist/components/atoms/Percent/styles.js +0 -20
  184. package/dist/components/atoms/Select/index.js +0 -39
  185. package/dist/components/atoms/Select/style.js +0 -32
  186. package/dist/components/molecules/RetailerSelector/RetailerSelector.stories.js +0 -48
  187. package/dist/components/molecules/RetailerSelector/index.js +0 -74
  188. package/dist/components/molecules/TextAndGradient/TextAndGradient.stories.js +0 -31
  189. package/dist/components/molecules/TextAndGradient/index.js +0 -36
  190. package/dist/components/molecules/TextAndGradient/styles.js +0 -18
  191. package/src/assets/images/generalButton/downloadIcon.svg +0 -3
  192. package/src/assets/images/modalsSVGs/attributesSent.svg +0 -208
  193. package/src/assets/images/modalsSVGs/descriptionSent.svg +0 -237
  194. package/src/assets/images/modalsSVGs/providerSent.svg +0 -445
  195. package/src/assets/images/modalsSVGs/uploadingImages.svg +0 -148
  196. package/src/components/atoms/CharCounter/CharCounter.stories.js +0 -11
  197. package/src/components/atoms/CharCounter/index.js +0 -13
  198. package/src/components/atoms/CharCounter/styles.js +0 -10
  199. package/src/components/atoms/Commentary/Commentary.stories.js +0 -0
  200. package/src/components/atoms/Commentary/index.js +0 -9
  201. package/src/components/atoms/Commentary/styles.js +0 -16
  202. package/src/components/atoms/Input/index.js +0 -15
  203. package/src/components/atoms/Input/style.js +0 -31
  204. package/src/components/atoms/InputFormatter/Wysiwyg.stories.js +0 -12
  205. package/src/components/atoms/InputFormatter/index.js +0 -141
  206. package/src/components/atoms/InputFormatter/styles.js +0 -40
  207. package/src/components/atoms/LabelToInput/index.js +0 -26
  208. package/src/components/atoms/LabelToInput/style.js +0 -41
  209. package/src/components/atoms/Select/index.js +0 -35
  210. package/src/components/atoms/Select/style.js +0 -76
  211. package/src/components/molecules/RetailerSelector/RetailerSelector.stories.js +0 -35
  212. package/src/components/molecules/RetailerSelector/index.js +0 -63
  213. package/src/components/molecules/RetailerSelector/styles.js +0 -18
@@ -1,5 +1,4 @@
1
1
  import { Container } from "./styles";
2
- import React from "react";
3
2
 
4
3
  export const Button = ({
5
4
  buttonType,
@@ -10,15 +9,9 @@ export const Button = ({
10
9
  onClick,
11
10
  }) => {
12
11
  return (
13
- <Container
14
- className={buttonType}
15
- buttonFont={buttonFont}
16
- onClick={onClick}
17
- key={`button-${buttonType}`}
18
- disabled={buttonType === "general-button-disabled"}
19
- >
12
+ <Container className={buttonType} buttonFont={buttonFont} onClick={onClick} key={`button-${buttonType}`}>
20
13
  {buttonType.includes("general") && label}
21
- {image && <img src={image} alt={altText} />}
14
+ {image && <img src={image} alt={altText}/>}
22
15
  </Container>
23
16
  );
24
17
  };
@@ -12,7 +12,6 @@ import saveIcon from "../../../assets/images/generalButton/saveIcon.svg";
12
12
  import saveIconHover from "../../../assets/images/generalButton/saveIconHover.svg";
13
13
  import deleteIcon from "../../../assets/images/generalButton/deleteIcon.svg";
14
14
  import deleteIconHover from "../../../assets/images/generalButton/deleteIconHover.svg";
15
- import downloadIcon from "../../../assets/images/generalButton/downloadIcon.svg";
16
15
  import { GlobalColors } from "../../../global-files/variables";
17
16
 
18
17
  export const Container = styled.button`
@@ -93,19 +92,6 @@ export const Container = styled.button`
93
92
  border: 1px solid ${GlobalColors.magenta_s2};
94
93
  }
95
94
  }
96
-
97
- &.download-button {
98
- background-image: url(${downloadIcon});
99
- border: 1px solid ${GlobalColors.s3};
100
- border-radius: 15px;
101
- background-size: 15px;
102
-
103
- &:hover {
104
- color: white;
105
- background-color: ${GlobalColors.magenta_s2};
106
- border: 1px solid ${GlobalColors.magenta_s2};
107
- }
108
- }
109
95
  }
110
96
 
111
97
  &.general-arrow-button {
@@ -159,13 +145,4 @@ export const Container = styled.button`
159
145
  &.row-layout {
160
146
  background-image: url(${gridLayout});
161
147
  }
162
-
163
- &.general-button-disabled {
164
- background-color: grey;
165
- color: ${GlobalColors.white};
166
-
167
- &:hover {
168
- opacity: 1;
169
- }
170
- }
171
148
  `;
@@ -1,84 +1,38 @@
1
1
  import { useEffect, useState } from "react";
2
2
  import { Container } from "./styles";
3
- import { InputFormatter } from "../InputFormatter";
4
- import { CheckBox } from "../CheckBox";
5
3
 
6
4
  export const GeneralInput = ({
7
5
  inputType,
8
6
  inputId,
7
+ inputCols,
8
+ inputRows,
9
9
  inputName,
10
10
  inputValue,
11
11
  inputPlaceholder,
12
12
  validateInput,
13
13
  position,
14
14
  inputsArray,
15
+ maxLength,
15
16
  inputSize,
16
- articleId,
17
- updatedDatasheets,
18
- setUpdatedDatasheets,
19
- updatedDescriptions,
20
- setUpdatedDescriptions,
21
- maxChar,
22
- isRequired,
23
- version,
24
17
  }) => {
25
- const [textValue, setTextValue] = useState({
26
- value: inputValue,
27
- });
28
- const [requiredEmpty, setRequiredEmpty] = useState(false);
18
+ const [textValue, setTextValue] = useState({ value: inputValue ?? "" });
29
19
 
30
- const onHandleChange = (evt) => {
31
- if (validateInput) {
32
- setTextValue({ value: validateInput(evt, position, inputsArray) });
33
- } else {
34
- setTextValue({
35
- value: inputType === "checkbox" ? evt.target.checked : evt.target.value,
36
- });
37
- let dataSave = updatedDatasheets.slice();
38
- if (dataSave.length === 0)
39
- dataSave.push({
40
- articleId: articleId,
41
- versionId: version,
42
- attributeId: inputId,
43
- value:
44
- inputType === "checkbox" ? evt.target.checked : evt.target.value,
45
- });
46
- else if (dataSave.some((e) => e.attributeId === inputId)) {
47
- dataSave.forEach((e) => {
48
- if (e.attributeId === inputId) {
49
- e.value =
50
- inputType === "checkbox" ? evt.target.checked : evt.target.value;
51
- }
52
- });
53
- } else {
54
- dataSave.push({
55
- articleId: articleId,
56
- versionId: version,
57
- attributeId: inputId,
58
- value:
59
- inputType === "checkbox" ? evt.target.checked : evt.target.value,
60
- });
61
- }
62
- setUpdatedDatasheets(dataSave);
63
- }
20
+ const onHandleChange = (e) => {
21
+ validateInput
22
+ ? setTextValue({ value: validateInput(e, position, inputsArray) })
23
+ : setTextValue(({ value }) => (value = e.target.value));
64
24
  };
65
25
 
66
26
  useEffect(() => {
67
- setRequiredEmpty(
68
- isRequired &&
69
- (textValue.value?.length === 0 || textValue.value === undefined)
70
- );
27
+ const input = document.querySelector(`textarea#${inputId}`);
28
+ if (input) {
29
+ input.style.cssText = "height:" + input.scrollHeight + "px";
30
+ }
71
31
  }, [textValue]);
72
32
 
73
33
  return (
74
- <Container isRequired={requiredEmpty}>
75
- {inputType === "checkbox" ? (
76
- <CheckBox
77
- id={inputId}
78
- onChange={(e) => onHandleChange(e)}
79
- defaultChecked={textValue.value === "true" ? true : false}
80
- />
81
- ) : inputType !== "textarea" ? (
34
+ <Container>
35
+ {inputType !== "textarea" ? (
82
36
  <input
83
37
  type={inputType}
84
38
  id={inputId}
@@ -87,22 +41,18 @@ export const GeneralInput = ({
87
41
  placeholder={inputPlaceholder}
88
42
  value={textValue.value}
89
43
  onInput={(e) => onHandleChange(e)}
90
- required={isRequired}
91
- maxLength={maxChar}
44
+ maxLength={maxLength && maxLength}
92
45
  />
93
46
  ) : (
94
- <InputFormatter
47
+ <textarea
95
48
  name={inputName}
96
- inputId={inputId}
49
+ id={inputId}
50
+ cols={inputCols}
51
+ rows={inputRows}
97
52
  placeholder={inputPlaceholder}
98
- mainValue={textValue.value}
53
+ value={textValue.value}
99
54
  onChange={onHandleChange}
100
- articleId={articleId}
101
- updatedDescriptions={updatedDescriptions}
102
- setUpdatedDescriptions={setUpdatedDescriptions}
103
- maxChar={maxChar}
104
- isRequired={isRequired}
105
- />
55
+ ></textarea>
106
56
  )}
107
57
  </Container>
108
58
  );
@@ -4,20 +4,10 @@ import { FontFamily, GlobalColors } from "../../../global-files/variables";
4
4
  export const Container = styled.div`
5
5
  width: 100%;
6
6
 
7
- > div {
8
- label {
9
- &:before {
10
- outline: 1px solid ${({ isRequired }) => (isRequired ? "red" : "none")};
11
- }
12
- }
13
- }
14
-
15
7
  input,
16
8
  textarea {
17
9
  width: 100%;
18
- border: 1px solid
19
- ${({ isRequired }) => (isRequired ? "red" : `${GlobalColors.s2}`)};
20
-
10
+ border: 1px solid ${GlobalColors.s2};
21
11
  font-family: ${FontFamily.AvenirNext};
22
12
  color: ${GlobalColors.s4};
23
13
  font-weight: normal;
@@ -1,10 +1,10 @@
1
1
  import { Container } from "./styles";
2
2
 
3
- export const GenericModal = ({ componentsArray = [], buttonType, onClick }) => {
3
+ export const GenericModal = ({ componentsArray = [], buttonType }) => {
4
4
  return (
5
5
  <Container>
6
6
  <div className={"global-styles " + buttonType}>
7
- <button className="close-button" onClick={onClick} />
7
+ <button className="close-button" />
8
8
  {componentsArray?.map((component) => component)}
9
9
  </div>
10
10
  </Container>
@@ -12,13 +12,6 @@ export const Container = styled.div`
12
12
  position: fixed;
13
13
  background-color: rgba(59, 59, 59, 0.53);
14
14
  backdrop-filter: blur(4px);
15
- top: 0;
16
- left: 0;
17
- z-index: 100;
18
-
19
- h2 {
20
- overflow: initial;
21
- }
22
15
 
23
16
  .global-styles {
24
17
  background-color: ${GlobalColors.deep_gray};
@@ -75,10 +68,9 @@ export const Container = styled.div`
75
68
  margin-top: 30px;
76
69
  }
77
70
  }
78
- .product-name-header,
79
- .retailer-name-header {
71
+ .product-name-header {
80
72
  & + * {
81
- margin-top: 30px;
73
+ margin-bottom: 30px;
82
74
  }
83
75
  }
84
76
  }
@@ -0,0 +1,10 @@
1
+ import { Loading } from "./index";
2
+
3
+ export default {
4
+ title: "Components/atoms/Loading",
5
+ component: Loading,
6
+ };
7
+ const Template = (args) => <Loading {...args} />;
8
+ export const LoadingDefault = Template.bind({});
9
+
10
+ LoadingDefault.args = {};
@@ -1,12 +1,13 @@
1
- import { Container, Loader } from "./styles";
1
+ import { Container } from "./styles";
2
+
2
3
  export const Loading = () => {
3
4
  return (
4
- <Container>
5
- <Loader>
5
+ <Container >
6
+ <div className="loader">
6
7
  <span className="first"></span>
7
8
  <span className="second"></span>
8
9
  <span className="third"></span>
9
- </Loader>
10
+ </div>
10
11
  </Container>
11
12
  );
12
13
  };
@@ -6,52 +6,52 @@ export const Container = styled.div`
6
6
  align-items: center;
7
7
  height: 100%;
8
8
  width: 100%;
9
- `;
10
- export const Loader = styled.div`
11
- display: flex;
12
- justify-content: center;
13
- align-items: center;
14
- height: 100%;
15
- width: 100%;
16
- span {
17
- display: inline-block;
18
- border-radius: 100%;
19
- margin: 35px 5px;
20
- opacity: 1;
21
- }
22
- .first {
23
- background-color: #ff75cf;
24
- }
25
- .second {
26
- background-color: #e33aa9;
27
- }
28
- .third {
29
- background-color: #b12d84;
30
- }
31
- span:nth-child(1) {
32
- width: 16px;
33
- height: 16px;
34
- animation: opacitychange 1s ease-in-out infinite;
35
- }
36
- span:nth-child(2) {
37
- width: 18px;
38
- height: 18px;
9
+ .loader {
10
+ display: flex;
11
+ justify-content: center;
12
+ align-items: center;
13
+ height: 100%;
14
+ width: 100%;
15
+ span {
16
+ display: inline-block;
17
+ border-radius: 100%;
18
+ margin-left: 5px;
19
+ opacity: 1;
20
+ }
21
+ .first {
22
+ background-color: #ff75cf;
23
+ }
24
+ .second {
25
+ background-color: #e33aa9;
26
+ }
27
+ .third {
28
+ background-color: #b12d84;
29
+ }
30
+ span:nth-child(1) {
31
+ width: 16px;
32
+ height: 16px;
33
+ animation: opacitychange 1s ease-in-out infinite;
34
+ }
35
+ span:nth-child(2) {
36
+ width: 18px;
37
+ height: 18px;
39
38
 
40
- animation: opacitychange 1s ease-in-out 0.33s infinite;
41
- }
42
- span:nth-child(3) {
43
- width: 20px;
44
- height: 20px;
39
+ animation: opacitychange 1s ease-in-out 0.33s infinite;
40
+ }
41
+ span:nth-child(3) {
42
+ width: 20px;
43
+ height: 20px;
45
44
 
46
- animation: opacitychange 1s ease-in-out 0.66s infinite;
47
- }
48
- @keyframes opacitychange {
49
- 0%,
50
- 100% {
51
- opacity: 0;
45
+ animation: opacitychange 1s ease-in-out 0.66s infinite;
52
46
  }
53
- 60% {
54
- opacity: 1;
47
+ @keyframes opacitychange {
48
+ 0%,
49
+ 100% {
50
+ opacity: 0;
51
+ }
52
+ 60% {
53
+ opacity: 1;
54
+ }
55
55
  }
56
56
  }
57
57
  `;
@@ -6,7 +6,7 @@ import low from "../../../assets/images/flags/lowPriority.svg";
6
6
 
7
7
  export const PriorityFlag = ({ priority }) => {
8
8
  const PriorityFlags = {
9
- ["none"]: without,
9
+ ["no priority"]: without,
10
10
  ["low"]: low,
11
11
  ["medium"]: medium,
12
12
  ["high"]: high,
@@ -4,7 +4,7 @@ export const Container = styled.div`
4
4
  width: fit-content;
5
5
 
6
6
  img {
7
- object-fit: contain;
7
+ object-fit: cover;
8
8
  }
9
9
 
10
10
  &.carousel-image {
@@ -1,8 +1,8 @@
1
1
  import { Container } from "./styles";
2
2
 
3
- export const ProgressBar = ({ percent, progressBarType }) => {
3
+ export const ProgressBar = ({ percent, backgroundColor }) => {
4
4
  return (
5
- <Container className={`status-${progressBarType}`}>
5
+ <Container backgroundColor={backgroundColor}>
6
6
  <p>{percent}%</p>
7
7
  </Container>
8
8
  );
@@ -2,7 +2,7 @@ import styled from "styled-components";
2
2
  import { FontFamily, GlobalColors } from "../../../global-files/variables";
3
3
 
4
4
  export const Container = styled.div`
5
- background-color: ${GlobalColors.s3};
5
+ background-color: ${(props) => GlobalColors[props.backgroundColor]};
6
6
  width: fit-content;
7
7
  height: 27px;
8
8
  padding: 4px;
@@ -11,59 +11,8 @@ export const Container = styled.div`
11
11
  font-weight: 600;
12
12
  font-size: 14px;
13
13
  line-height: 19px;
14
- color: ${(backgroundColor) =>
15
- backgroundColor === "s2" || backgroundColor === "s1"
14
+ color: ${(props) =>
15
+ props.backgroundColor === "s2" || props.backgroundColor === "s1"
16
16
  ? GlobalColors.s4
17
17
  : GlobalColors.white};
18
-
19
- &.status-As,
20
- &.status-P {
21
- background-color: ${GlobalColors.in_progress};
22
- }
23
-
24
- &.status-Pr,
25
- &.status-Rr {
26
- background-color: ${GlobalColors.reception};
27
- }
28
-
29
- &.status-AA,
30
- &.status-AP,
31
- &.status-AC,
32
- &.status-AF {
33
- background-color: ${GlobalColors.finished};
34
- }
35
-
36
- &.status-RA,
37
- &.status-RF,
38
- &.status-RP,
39
- &.status-RC {
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
18
  `;
@@ -8,16 +8,12 @@ export const ScreenHeader = ({
8
8
  color,
9
9
  headerType,
10
10
  Paragraph,
11
+
11
12
  }) => {
12
13
  return (
13
- <Container
14
- fontFamily={fontFamily}
15
- color={color}
16
- className={headerType}
17
- key={`title-${text}`}
18
- >
14
+ <Container fontFamily={fontFamily} color={color} className={headerType} key={`title-${text}`}>
19
15
  {text} {boldText && <span> {boldText}</span>}
20
- {Paragraph && <p>{Paragraph}</p>}
16
+ {<p>{Paragraph}</p>}
21
17
  </Container>
22
18
  );
23
19
  };
@@ -52,11 +52,6 @@ export const Container = styled.h2`
52
52
  font-weight: 400;
53
53
  font-size: 11px;
54
54
  line-height: 18px;
55
-
56
- &:last-child {
57
- min-width: 50px;
58
- text-align: center;
59
- }
60
55
  }
61
56
 
62
57
  &.gray-table-row {
@@ -68,14 +63,12 @@ export const Container = styled.h2`
68
63
  background-color: ${GlobalColors.s2};
69
64
  padding: 1px 3px;
70
65
  border-radius: 3px;
71
- min-width: 50px;
72
- text-align: center;
73
66
  }
74
- &.header-and-paragraph {
67
+ &.header-and-paragraph{
75
68
  font-family: ${FontFamily.Raleway};
76
69
  font-size: 36px;
77
70
  color: ${GlobalColors.s5};
78
- p {
71
+ p{
79
72
  font-family: ${FontFamily.AvenirNext};
80
73
  font-size: 14px;
81
74
  color: ${GlobalColors.s4};
@@ -1,37 +1,9 @@
1
1
  import { Container } from "./styles";
2
2
 
3
3
  export const StatusTag = ({ statusType, ovalForm }) => {
4
- const getShortStatus = (status) => {
5
- switch (status) {
6
- case "COMPLETED":
7
- return "C";
8
- case "RECEPTION":
9
- return "Pr";
10
- case "NULL":
11
- return "-";
12
- case "RECEIVED":
13
- return "Rc";
14
- case "IN_PROGRESS":
15
- return "P";
16
- case "ASSIGNED":
17
- return "As";
18
- case "APPROVED":
19
- return "Ap";
20
- case "VALIDATING":
21
- return "V";
22
- case "PAID_OUT":
23
- return "Po";
24
- default:
25
- return status;
26
- }
27
- };
28
4
  return (
29
- <Container
30
- className={`status-${getShortStatus(statusType)} ${
31
- ovalForm && "oval-form"
32
- }`}
33
- >
34
- <p>{getShortStatus(statusType)}</p>
5
+ <Container className={`status-${statusType} ${ovalForm && "oval-form"}`}>
6
+ <p>{statusType}</p>
35
7
  </Container>
36
8
  );
37
9
  };
@@ -2,8 +2,7 @@ import styled from "styled-components";
2
2
  import { FontFamily, GlobalColors } from "../../../global-files/variables";
3
3
 
4
4
  export const Container = styled.div`
5
- width: fit-content;
6
- padding: 0 10px;
5
+ width: 30px;
7
6
  height: 20px;
8
7
  background-color: ${GlobalColors.s3};
9
8
  border-radius: 3px;
@@ -17,9 +16,7 @@ export const Container = styled.div`
17
16
  }
18
17
 
19
18
  &.status-As,
20
- &.status-P,
21
- &.status-IN_PROGRESS,
22
- &.status-QF {
19
+ &.status-P {
23
20
  background-color: ${GlobalColors.in_progress};
24
21
  }
25
22
 
@@ -29,19 +26,10 @@ export const Container = styled.div`
29
26
  }
30
27
 
31
28
  &.status-AA,
32
- &.status-AP,
33
- &.status-AC,
34
- &.status-AF {
29
+ &.status-AP {
35
30
  background-color: ${GlobalColors.finished};
36
31
  }
37
32
 
38
- &.status-RA,
39
- &.status-RF,
40
- &.status-RP,
41
- &.status-RC {
42
- background-color: ${GlobalColors.rejected_status};
43
- }
44
-
45
33
  &.status-Dat,
46
34
  &.status-Dsc,
47
35
  &.status-Imgs {
@@ -7,8 +7,8 @@ export const ValidationPanel = ({
7
7
  id,
8
8
  setOptionClicked,
9
9
  setShowValidationPanel,
10
- sendToFacilitator,
11
10
  }) => {
11
+
12
12
  const optionSelected = (option) => {
13
13
  setOptionClicked(`${option}-button`);
14
14
  setShowValidationPanel(false);
@@ -18,7 +18,7 @@ export const ValidationPanel = ({
18
18
  <Container id={id}>
19
19
  <button
20
20
  onClick={() => {
21
- sendToFacilitator("A");
21
+ optionSelected("accept");
22
22
  }}
23
23
  className="validation-option"
24
24
  >
@@ -27,7 +27,7 @@ export const ValidationPanel = ({
27
27
  </button>
28
28
  <button
29
29
  onClick={() => {
30
- sendToFacilitator("R");
30
+ optionSelected("reject");
31
31
  }}
32
32
  className="validation-option"
33
33
  >