contentoh-components-library 21.3.17 → 21.3.19

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 (196) hide show
  1. package/.env.development +0 -5
  2. package/dist/assets/images/generalButton/closeIcon.svg +2 -2
  3. package/dist/components/atoms/GeneralInput/index.js +14 -1
  4. package/dist/components/atoms/ProgressBar/index.js +6 -36
  5. package/dist/components/atoms/ProgressBar/styles.js +3 -11
  6. package/dist/components/molecules/CustomSelect/CustomSelect.stories.js +22 -21
  7. package/dist/components/molecules/CustomSelect/SelectItem.js +1 -10
  8. package/dist/components/molecules/HeaderTop/index.js +6 -23
  9. package/dist/components/molecules/HeaderTop/styles.js +1 -1
  10. package/dist/components/molecules/ProductNameHeader/index.js +4 -6
  11. package/dist/components/organisms/FullProductNameHeader/index.js +0 -1
  12. package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +50 -65
  13. package/dist/components/pages/ProviderProductEdition/index.js +11 -15
  14. package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +44 -36
  15. package/dist/components/pages/RetailerProductEdition/index.js +12 -13
  16. package/dist/global-files/data.js +23 -18
  17. package/dist/global-files/fonts.css +0 -6
  18. package/dist/global-files/variables.js +0 -2
  19. package/dist/index.js +46 -267
  20. package/package.json +1 -12
  21. package/src/assets/images/generalButton/closeIcon.svg +2 -2
  22. package/src/components/atoms/GeneralInput/index.js +10 -0
  23. package/src/components/atoms/ProgressBar/index.js +5 -40
  24. package/src/components/atoms/ProgressBar/styles.js +0 -24
  25. package/src/components/molecules/CustomSelect/CustomSelect.stories.js +12 -20
  26. package/src/components/molecules/CustomSelect/SelectItem.js +0 -7
  27. package/src/components/molecules/HeaderTop/index.js +8 -29
  28. package/src/components/molecules/HeaderTop/styles.js +0 -4
  29. package/src/components/molecules/ProductNameHeader/index.js +2 -7
  30. package/src/components/organisms/FullProductNameHeader/index.js +0 -1
  31. package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +49 -67
  32. package/src/components/pages/ProviderProductEdition/index.js +9 -16
  33. package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +46 -36
  34. package/src/components/pages/RetailerProductEdition/index.js +10 -14
  35. package/src/global-files/data.js +23 -18
  36. package/src/global-files/fonts.css +0 -6
  37. package/src/global-files/variables.js +0 -2
  38. package/src/index.js +0 -17
  39. package/dist/assets/images/customSelect/starIcon.svg +0 -14
  40. package/dist/assets/images/defaultImages/Spinner.gif +0 -0
  41. package/dist/assets/images/defaultImages/notFound.svg +0 -124
  42. package/dist/components/atoms/ButtonFileChooser/ButtonFileChooser.stories.js +0 -72
  43. package/dist/components/atoms/ButtonFileChooser/index.js +0 -110
  44. package/dist/components/atoms/ButtonFileChooser/styles.js +0 -20
  45. package/dist/components/atoms/ButtonV2/ButtonV2.stories.js +0 -66
  46. package/dist/components/atoms/ButtonV2/index.js +0 -110
  47. package/dist/components/atoms/ButtonV2/styles.js +0 -53
  48. package/dist/components/atoms/CustomIcon/CustomIcon.stories.js +0 -50
  49. package/dist/components/atoms/CustomIcon/index.js +0 -40
  50. package/dist/components/atoms/CustomIcon/styles.js +0 -33
  51. package/dist/components/atoms/IconFile/IconFile.stories.js +0 -48
  52. package/dist/components/atoms/IconFile/index.js +0 -249
  53. package/dist/components/atoms/IconFile/styles.js +0 -23
  54. package/dist/components/atoms/Image/Image.stories.js +0 -73
  55. package/dist/components/atoms/Image/index.js +0 -76
  56. package/dist/components/atoms/Image/styles.js +0 -43
  57. package/dist/components/atoms/ImageLink/ImageLink.stories.js +0 -63
  58. package/dist/components/atoms/ImageLink/index.js +0 -77
  59. package/dist/components/atoms/ImageLink/styles.js +0 -40
  60. package/dist/components/atoms/ImagePreview/ImagePreview.stories.js +0 -70
  61. package/dist/components/atoms/ImagePreview/index.js +0 -208
  62. package/dist/components/atoms/ImagePreview/styles.js +0 -44
  63. package/dist/components/atoms/InputText/InputText.stories.js +0 -60
  64. package/dist/components/atoms/InputText/index.js +0 -66
  65. package/dist/components/atoms/InputText/styles.js +0 -32
  66. package/dist/components/atoms/NotFound/NotFound.stories.js +0 -36
  67. package/dist/components/atoms/NotFound/index.js +0 -75
  68. package/dist/components/atoms/NotFound/styles.js +0 -20
  69. package/dist/components/atoms/SelectItemV2/SelectItemV2.stories.js +0 -45
  70. package/dist/components/atoms/SelectItemV2/index.js +0 -57
  71. package/dist/components/atoms/SelectItemV2/styles.js +0 -30
  72. package/dist/components/atoms/Tooltip/Tooltip.stories.js +0 -66
  73. package/dist/components/atoms/Tooltip/index.js +0 -72
  74. package/dist/components/atoms/Tooltip/styles.js +0 -20
  75. package/dist/components/molecules/ButtonDownloadFile/DownloadFile.stories.js +0 -66
  76. package/dist/components/molecules/ButtonDownloadFile/index.js +0 -179
  77. package/dist/components/molecules/ButtonDownloadFile/styles.js +0 -23
  78. package/dist/components/molecules/Dropdown/Dropdown.stories.js +0 -98
  79. package/dist/components/molecules/Dropdown/index.js +0 -150
  80. package/dist/components/molecules/Dropdown/styles.js +0 -26
  81. package/dist/components/molecules/ImageTooltip/ImageTooltip.stories.js +0 -82
  82. package/dist/components/molecules/ImageTooltip/index.js +0 -85
  83. package/dist/components/molecules/ImageTooltip/styles.js +0 -33
  84. package/dist/components/molecules/SelectV2/SelectV2.stories.js +0 -120
  85. package/dist/components/molecules/SelectV2/index.js +0 -306
  86. package/dist/components/molecules/SelectV2/styles.js +0 -42
  87. package/dist/components/molecules/SelectV2/test.js +0 -95
  88. package/dist/components/molecules/SelectV2/test.stories.js +0 -27
  89. package/dist/components/organisms/Chat/Chat.stories.js +0 -160
  90. package/dist/components/organisms/Chat/ChatLists/ChatLists.stories.js +0 -83
  91. package/dist/components/organisms/Chat/ChatLists/index.js +0 -160
  92. package/dist/components/organisms/Chat/ChatLists/styles.js +0 -29
  93. package/dist/components/organisms/Chat/ContainerItems/ContainerItems.stories.js +0 -176
  94. package/dist/components/organisms/Chat/ContainerItems/index.js +0 -537
  95. package/dist/components/organisms/Chat/ContainerItems/styles.js +0 -20
  96. package/dist/components/organisms/Chat/ContentChat/ContentChat.stories.js +0 -142
  97. package/dist/components/organisms/Chat/ContentChat/index.js +0 -1429
  98. package/dist/components/organisms/Chat/ContentChat/styles.js +0 -20
  99. package/dist/components/organisms/Chat/Footer/Footer.stories.js +0 -43
  100. package/dist/components/organisms/Chat/Footer/index.js +0 -976
  101. package/dist/components/organisms/Chat/Footer/styles.js +0 -32
  102. package/dist/components/organisms/Chat/Header/Header.stories.js +0 -96
  103. package/dist/components/organisms/Chat/Header/index.js +0 -84
  104. package/dist/components/organisms/Chat/Header/styles.js +0 -20
  105. package/dist/components/organisms/Chat/index.js +0 -253
  106. package/dist/components/organisms/Chat/styles.js +0 -29
  107. package/dist/components/organisms/Modal/Modal.stories.js +0 -66
  108. package/dist/components/organisms/Modal/index.js +0 -95
  109. package/dist/components/organisms/Modal/styles.js +0 -20
  110. package/dist/components/organisms/RangeCalendar/RangeCalendar.stories.js +0 -33
  111. package/dist/components/organisms/RangeCalendar/index.js +0 -149
  112. package/dist/components/organisms/RangeCalendar/styles.js +0 -27
  113. package/dist/global-files/handle_http.js +0 -381
  114. package/dist/global-files/handle_userTech.js +0 -20
  115. package/dist/global-files/utils.js +0 -514
  116. package/src/assets/images/customSelect/starIcon.svg +0 -14
  117. package/src/assets/images/defaultImages/Spinner.gif +0 -0
  118. package/src/assets/images/defaultImages/notFound.svg +0 -124
  119. package/src/components/atoms/ButtonFileChooser/ButtonFileChooser.stories.js +0 -47
  120. package/src/components/atoms/ButtonFileChooser/index.js +0 -68
  121. package/src/components/atoms/ButtonFileChooser/styles.js +0 -4
  122. package/src/components/atoms/ButtonV2/ButtonV2.stories.js +0 -53
  123. package/src/components/atoms/ButtonV2/index.js +0 -85
  124. package/src/components/atoms/ButtonV2/styles.js +0 -217
  125. package/src/components/atoms/CustomIcon/CustomIcon.stories.js +0 -36
  126. package/src/components/atoms/CustomIcon/index.js +0 -41
  127. package/src/components/atoms/CustomIcon/styles.js +0 -85
  128. package/src/components/atoms/IconFile/IconFile.stories.js +0 -35
  129. package/src/components/atoms/IconFile/index.js +0 -119
  130. package/src/components/atoms/IconFile/styles.js +0 -67
  131. package/src/components/atoms/Image/Image.stories.js +0 -51
  132. package/src/components/atoms/Image/index.js +0 -55
  133. package/src/components/atoms/Image/styles.js +0 -34
  134. package/src/components/atoms/ImageLink/ImageLink.stories.js +0 -43
  135. package/src/components/atoms/ImageLink/index.js +0 -57
  136. package/src/components/atoms/ImageLink/styles.js +0 -30
  137. package/src/components/atoms/ImagePreview/ImagePreview.stories.js +0 -52
  138. package/src/components/atoms/ImagePreview/index.js +0 -178
  139. package/src/components/atoms/ImagePreview/styles.js +0 -77
  140. package/src/components/atoms/InputText/InputText.stories.js +0 -39
  141. package/src/components/atoms/InputText/index.js +0 -61
  142. package/src/components/atoms/InputText/styles.js +0 -89
  143. package/src/components/atoms/NotFound/NotFound.stories.js +0 -19
  144. package/src/components/atoms/NotFound/index.js +0 -52
  145. package/src/components/atoms/NotFound/styles.js +0 -55
  146. package/src/components/atoms/SelectItemV2/SelectItemV2.stories.js +0 -26
  147. package/src/components/atoms/SelectItemV2/index.js +0 -61
  148. package/src/components/atoms/SelectItemV2/styles.js +0 -90
  149. package/src/components/atoms/Tooltip/Tooltip.stories.js +0 -51
  150. package/src/components/atoms/Tooltip/index.js +0 -59
  151. package/src/components/atoms/Tooltip/styles.js +0 -42
  152. package/src/components/molecules/ButtonDownloadFile/DownloadFile.stories.js +0 -54
  153. package/src/components/molecules/ButtonDownloadFile/index.js +0 -109
  154. package/src/components/molecules/ButtonDownloadFile/styles.js +0 -66
  155. package/src/components/molecules/Dropdown/Dropdown.stories.js +0 -103
  156. package/src/components/molecules/Dropdown/index.js +0 -150
  157. package/src/components/molecules/Dropdown/styles.js +0 -75
  158. package/src/components/molecules/ImageTooltip/ImageTooltip.stories.js +0 -68
  159. package/src/components/molecules/ImageTooltip/index.js +0 -63
  160. package/src/components/molecules/ImageTooltip/styles.js +0 -18
  161. package/src/components/molecules/SelectV2/SelectV2.stories.js +0 -115
  162. package/src/components/molecules/SelectV2/index.js +0 -357
  163. package/src/components/molecules/SelectV2/styles.js +0 -105
  164. package/src/components/molecules/SelectV2/test.js +0 -61
  165. package/src/components/molecules/SelectV2/test.stories.js +0 -10
  166. package/src/components/organisms/Chat/Chat.stories.js +0 -147
  167. package/src/components/organisms/Chat/ChatLists/ChatLists.stories.js +0 -65
  168. package/src/components/organisms/Chat/ChatLists/Rotoplas.jpeg +0 -0
  169. package/src/components/organisms/Chat/ChatLists/THD.png +0 -0
  170. package/src/components/organisms/Chat/ChatLists/index.js +0 -141
  171. package/src/components/organisms/Chat/ChatLists/styles.js +0 -162
  172. package/src/components/organisms/Chat/ContainerItems/ContainerItems.stories.js +0 -142
  173. package/src/components/organisms/Chat/ContainerItems/index.js +0 -512
  174. package/src/components/organisms/Chat/ContainerItems/styles.js +0 -328
  175. package/src/components/organisms/Chat/ContentChat/ContentChat.stories.js +0 -102
  176. package/src/components/organisms/Chat/ContentChat/Rotoplas.jpeg +0 -0
  177. package/src/components/organisms/Chat/ContentChat/THD.png +0 -0
  178. package/src/components/organisms/Chat/ContentChat/index.js +0 -897
  179. package/src/components/organisms/Chat/ContentChat/styles.js +0 -41
  180. package/src/components/organisms/Chat/Footer/Footer.stories.js +0 -22
  181. package/src/components/organisms/Chat/Footer/index.js +0 -661
  182. package/src/components/organisms/Chat/Footer/styles.js +0 -286
  183. package/src/components/organisms/Chat/Header/Header.stories.js +0 -66
  184. package/src/components/organisms/Chat/Header/index.js +0 -94
  185. package/src/components/organisms/Chat/Header/styles.js +0 -49
  186. package/src/components/organisms/Chat/index.js +0 -235
  187. package/src/components/organisms/Chat/styles.js +0 -42
  188. package/src/components/organisms/Modal/Modal.stories.js +0 -55
  189. package/src/components/organisms/Modal/index.js +0 -97
  190. package/src/components/organisms/Modal/styles.js +0 -103
  191. package/src/components/organisms/RangeCalendar/RangeCalendar.stories.js +0 -16
  192. package/src/components/organisms/RangeCalendar/index.js +0 -121
  193. package/src/components/organisms/RangeCalendar/styles.js +0 -883
  194. package/src/global-files/handle_http.js +0 -225
  195. package/src/global-files/handle_userTech.js +0 -7
  196. package/src/global-files/utils.js +0 -330
@@ -1,52 +0,0 @@
1
- import { ImagePreview } from "./index";
2
-
3
- export default {
4
- title: "Components/atoms/ImagePreview",
5
- component: ImagePreview,
6
- argTypes: {},
7
- };
8
-
9
- const Template = (args) => <ImagePreview {...args} />;
10
-
11
- const keyS3_test =
12
- "84300/1/chat/playa-213f791b-d890-48e1-be19-28bf5a95d517.jpeg";
13
- const srcTest = `https://content-management-images.s3.amazonaws.com/${keyS3_test}`;
14
- export const ImageTest = Template.bind({});
15
- ImageTest.args = {
16
- className: "modal-imagePreview",
17
- width: "200px",
18
- sizeLoading: "50",
19
- colorLoading: "#bbbbbb",
20
- url: srcTest,
21
- imageName: "playa-213f791b-d890-48e1-be19-28bf5a95d517.jpeg",
22
- showButtonDownload: true,
23
- componentDefault: <label> test error </label>,
24
- };
25
-
26
- const keyS3_OK =
27
- "84300/1/chat/f6579ed5-16e5-48d8-ace5-6be8e8e68f53-38896acf-9179-4686-9088-9784df624ab8.png";
28
- const srcOK = `https://content-management-images.s3.amazonaws.com/${keyS3_OK}`;
29
- export const ImageOK = Template.bind({});
30
- ImageOK.args = {
31
- width: "250px",
32
- sizeLoading: "40",
33
- url: srcOK,
34
- imageName:
35
- "f6579ed5-16e5-48d8-ace5-6be8e8e68f53-38896acf-9179-4686-9088-9784df624ab8.png",
36
- showButtonDownload: true,
37
- componentDefault: <label> img no cargada </label>,
38
- };
39
-
40
- const keyS3_ERROR =
41
- "84300/1/chat/21dba1da-3c60-42c4-97bd-033664808256-fb19ff57-b91c-4ef2-ba2a-d857b55fb33b.svg";
42
- const srcERROR = `https://content-management-images.s3.amazonaws.com/${keyS3_ERROR}`;
43
- export const ImageERROR = Template.bind({});
44
- ImageERROR.args = {
45
- width: "300px",
46
- sizeLoading: "60",
47
- url: srcERROR,
48
- imageName:
49
- "21dba1da-3c60-42c4-97bd-033664808256-fb19ff57-b91c-4ef2-ba2a-d857b55fb33b.svg",
50
- showButtonDownload: true,
51
- componentDefault: <label> ERROR al cargar </label>,
52
- };
@@ -1,178 +0,0 @@
1
- import { Container, ContainerLoading, ContainerModalImg, Img } from "./styles";
2
- import { FontAwesomeIcon as Icon } from "@fortawesome/react-fontawesome";
3
- import {
4
- faSpinner as iconLoading,
5
- faArrowDown as IconDownload,
6
- } from "@fortawesome/free-solid-svg-icons";
7
- import { useState, useEffect } from "react";
8
- import { Fade, Grow, Modal as ModalMUI, Zoom } from "@mui/material";
9
- import { Modal } from "../../organisms/Modal";
10
- import { ButtonV2 } from "../ButtonV2";
11
- import axios from "axios";
12
- import { Image } from "../Image";
13
-
14
- export const ImagePreview = (props) => {
15
- const {
16
- className, // string
17
- width, // string
18
- sizeLoading, // number
19
- colorLoading, // string
20
- downloadImgURL, // URL de la imagen a descargar (string)
21
- imgURL, // imagen a cargar (string)
22
- modalImgURL, // imagen a cargar (string) para el modo full
23
- imageName, // nombre del file
24
- showButtonDownload, // boolean
25
- componentDefault, // componente a mostrar en caso de que no cargue src (JSX)
26
- componentDefaultModal, // componente a mostrar en el modal en caso de que no cargue srcModal (JSX)
27
- } = props;
28
- const [imgLoad, setImgLoad] = useState();
29
- const [imgLoadModal, setImgLoadModal] = useState();
30
- const [loading, setLoading] = useState(false);
31
- const [loadingDownload, setLoadingDownload] = useState(false);
32
- const [showModalImg, setShowModalImg] = useState(false);
33
- const [modalAlert, setModalAlert] = useState({
34
- show: false,
35
- title: "",
36
- message:
37
- "Ocurrió un error al descargar la imagen ¿Quieres intentarlo de nuevo?",
38
- icon: "info",
39
- buttons: [
40
- <ButtonV2
41
- key={"btn-No"}
42
- type={"white"}
43
- borderType={"oval"}
44
- label={"No"}
45
- size={12}
46
- onClick={(event) => {
47
- setModalAlert((prev) => ({
48
- ...prev,
49
- show: false,
50
- }));
51
- }}
52
- />,
53
- <ButtonV2
54
- key={"btn-Intentar"}
55
- type={"pink"}
56
- borderType={"oval"}
57
- label={"Intentar"}
58
- size={12}
59
- onClick={(event) => {
60
- setModalAlert((prev) => ({
61
- ...prev,
62
- show: false,
63
- }));
64
- getImage();
65
- }}
66
- />,
67
- ],
68
- });
69
-
70
- const getImage = () => {
71
- //setLoadingDownload(true);
72
- const link = document.createElement("a");
73
- link.href = downloadImgURL;
74
- link.setAttribute("download", imageName ?? "image");
75
- link.style.display = "none";
76
- link.onerror = () => {
77
- setModalAlert((prev) => ({
78
- ...prev,
79
- show: true,
80
- }));
81
- return;
82
- };
83
- document.body.appendChild(link);
84
- link.click();
85
- document.body.removeChild(link);
86
- };
87
-
88
- return (
89
- <Container className={className} width={width}>
90
- {imgURL && (imgLoad === undefined || loading) && (
91
- <ContainerLoading
92
- className={"container-loading"}
93
- sizeLoading={sizeLoading}
94
- colorLoading={colorLoading}
95
- >
96
- <Icon className="icon" pulse icon={iconLoading} />
97
- </ContainerLoading>
98
- )}
99
-
100
- {(!imgURL || (imgLoad === false && !loading)) && componentDefault}
101
-
102
- <Img
103
- show={imgLoad && !loading}
104
- className="img"
105
- src={imgURL}
106
- onLoad={(event) => {
107
- setImgLoad(true);
108
- }}
109
- onError={(event) => {
110
- setImgLoad(false);
111
- }}
112
- onClick={(event) => {
113
- setShowModalImg(true);
114
- }}
115
- />
116
-
117
- {/* modal que muestra la img en pantalla completa con
118
- boton de download en caso de ser especificado */}
119
- <ModalMUI
120
- open={showModalImg}
121
- disablePortal={true}
122
- closeAfterTransition
123
- componentsProps={{
124
- root: {
125
- className: "container-modal",
126
- },
127
- backdrop: {
128
- timeout: 400,
129
- className: "container-background",
130
- },
131
- }}
132
- onClick={(event) => {
133
- if (!loadingDownload) setShowModalImg(false);
134
- }}
135
- >
136
- <Fade in={showModalImg} timeout={400}>
137
- <ContainerModalImg>
138
- {/* icono download */}
139
- {showButtonDownload && (
140
- <div className="container-header">
141
- <ButtonV2
142
- className={"container-btnDownload"}
143
- type={"pink"}
144
- size={14}
145
- borderType={"circle"}
146
- icon={IconDownload}
147
- isLoading={loadingDownload}
148
- onClick={(event) => {
149
- event.stopPropagation();
150
- getImage();
151
- }}
152
- />
153
- </div>
154
- )}
155
-
156
- <Image
157
- className="container-imgModal"
158
- classNameImg="img"
159
- sizeLoading={100}
160
- colorLoading={"white"}
161
- src={modalImgURL}
162
- componentDefault={componentDefaultModal}
163
- />
164
- </ContainerModalImg>
165
- </Fade>
166
- </ModalMUI>
167
-
168
- {/* modal utilizado para alertar cuando falla la descarga */}
169
- <Modal
170
- show={modalAlert.show}
171
- title={modalAlert.title}
172
- message={modalAlert.message}
173
- icon={modalAlert.icon}
174
- buttons={modalAlert.buttons}
175
- />
176
- </Container>
177
- );
178
- };
@@ -1,77 +0,0 @@
1
- import styled from "styled-components";
2
- import { GlobalColors, FontFamily } from "../../../global-files/variables";
3
-
4
- export const Container = styled.div`
5
- display: grid;
6
- place-items: center;
7
- width: ${({ width }) => (width ? width : "min-content")};
8
- min-width: min-content;
9
-
10
- .container-modal {
11
- .container-background {
12
- background-color: rgba(0, 0, 0, 0.7);
13
- }
14
- }
15
- `;
16
-
17
- export const ContainerModalImg = styled.div`
18
- width: 100vw;
19
- height: 100vh;
20
- display: flex;
21
- flex-direction: column;
22
- justify-content: center;
23
- align-items: center;
24
- position: relative;
25
- background-color: transparent;
26
-
27
- .container-header {
28
- position: absolute;
29
- left: 0px;
30
- top: 0px;
31
- width: 100%;
32
- background-color: rgba(0, 0, 0, 0.5);
33
- display: flex;
34
- flex-direction: row;
35
- justify-content: flex-end;
36
- align-items: center;
37
- gap: 8px;
38
- flex-wrap: wrap;
39
- padding: 8px 10px;
40
-
41
- .container-btnDownload {
42
- width: 28px;
43
- height: 28px;
44
- overflow: hidden;
45
- display: grid;
46
- place-items: center;
47
- }
48
- }
49
-
50
- .container-imgModal {
51
- width: 100%;
52
- height: 100%;
53
-
54
- .img {
55
- width: 100%;
56
- max-height: 100vh;
57
- object-fit: contain;
58
- }
59
- }
60
- `;
61
-
62
- export const ContainerLoading = styled.div`
63
- width: 100%;
64
- display: grid;
65
- place-items: center;
66
- min-width: min-content;
67
- font-size: ${({ sizeLoading }) => (sizeLoading ? sizeLoading : "30")}px;
68
- color: ${({ colorLoading }) => (colorLoading ? colorLoading : "#9e2674")};
69
- padding: 5px;
70
- `;
71
-
72
- export const Img = styled.img`
73
- display: ${({ show }) => (show ? "grid" : "none")};
74
- width: 100%;
75
- cursor: pointer;
76
- object-fit: contain;
77
- `;
@@ -1,39 +0,0 @@
1
- import { InputText } from "./index";
2
-
3
- export default {
4
- title: "Components/atoms/InputText",
5
- component: InputText,
6
- argTypes: {
7
- type: {
8
- options: [undefined, "white", "gray", "black"],
9
- control: { type: "select" },
10
- },
11
- borderType: {
12
- options: [undefined, "rectangle", "oval"],
13
- control: { type: "select" },
14
- },
15
- },
16
- };
17
-
18
- const Template = (args) => <InputText {...args} />;
19
-
20
- export const InputTextTest = Template.bind({});
21
- InputTextTest.args = {
22
- type: undefined,
23
- transparent: true,
24
- size: "17",
25
- borderType: undefined,
26
- placeHolder: "ingresa el texto",
27
- multiline: true,
28
- maxRows: "5",
29
- minRows: "1",
30
- //label: "titulo",
31
- disabled: false,
32
- initialText: "",
33
- onChangeText: (newText) => {
34
- console.log(newText);
35
- },
36
- onEnter: (event) => {
37
- console.log("evento enter");
38
- },
39
- };
@@ -1,61 +0,0 @@
1
- import { Container } from "./styles";
2
- import React from "react";
3
- import { TextField } from "@mui/material";
4
-
5
- export const InputText = (props) => {
6
- const {
7
- id,
8
- key,
9
- className,
10
- type, // gray | black => (default -> black)
11
- transparent, // boolean
12
- size, // number ... default (13)
13
- borderType, // rectangle || circle || (cualquier otro valor -> no borde)
14
- placeHolder, // (string) texto por defecto
15
- multiline, // (boolean) true -> textarea false -> 1 linea
16
- maxRows, // (number) maxima cantidad de rows visibles
17
- minRows, // (number) cantidad de rows visibles minimos
18
- //label, // (string) titulo del inputText
19
- disabled, // (boolean) true -> bloqueado
20
- text, // (string) texto del input
21
- onChangeText, // (newText) => {}
22
- onEnter, // (event) => {}
23
- refInputText, // useRef()
24
- } = props;
25
-
26
- return (
27
- <>
28
- <Container
29
- id={id}
30
- key={key}
31
- className={"container-inputText " + className}
32
- borderType={borderType}
33
- size={size}
34
- >
35
- <TextField
36
- className={
37
- "inputText " +
38
- (["gray", "white", "black"].includes(type) ? type : "white") +
39
- (transparent ? " transparent" : " fill")
40
- }
41
- multiline={multiline}
42
- inputRef={refInputText}
43
- disabled={disabled}
44
- placeholder={placeHolder}
45
- label={undefined}
46
- minRows={minRows}
47
- maxRows={maxRows}
48
- variant="outlined"
49
- value={text}
50
- onChange={(event) => onChangeText && onChangeText(event.target.value)}
51
- onKeyDown={(event) => {
52
- if (event.key == "Enter" && !event.shiftKey) {
53
- event.preventDefault();
54
- onEnter && onEnter(event);
55
- }
56
- }}
57
- />
58
- </Container>
59
- </>
60
- );
61
- };
@@ -1,89 +0,0 @@
1
- import styled from "styled-components";
2
- import { GlobalColors, FontFamily } from "../../../global-files/variables";
3
-
4
- export const Container = styled.div`
5
- width: fit-content;
6
- min-width: min-content;
7
- //border: 1px solid red;
8
-
9
- .inputText {
10
- width: 100%;
11
- height: 100%;
12
-
13
- // container interno del input o textarea
14
- > div {
15
- min-width: 0px;
16
- font-family: ${FontFamily.RobotoRegular}, sans-serif;
17
- font-size: ${({ size }) => (size ? size : "13")}px;
18
- text-align: left;
19
- color: #a2a2a2;
20
- padding: ${({ borderType }) => {
21
- return ["rectangle", "oval"].includes(borderType?.toLowerCase())
22
- ? "5px 10px"
23
- : "0px";
24
- }};
25
- border-radius: ${({ borderType }) => {
26
- return borderType?.toLowerCase() === "oval"
27
- ? "17px"
28
- : borderType?.toLowerCase() === "rectangle"
29
- ? "6px"
30
- : "0px";
31
- }};
32
-
33
- // input 1 linea
34
- > input {
35
- padding: 0px;
36
- }
37
-
38
- // borde
39
- > fieldset {
40
- border: ${({ borderType }) => {
41
- return ["rectangle", "oval"].includes(borderType?.toLowerCase())
42
- ? "1px solid black"
43
- : "none";
44
- }};
45
- border-color: inherit;
46
- }
47
-
48
- &.Mui-focused {
49
- > fieldset {
50
- border-color: inherit;
51
- }
52
- }
53
- &.Mui-disabled {
54
- cursor: not-allowed;
55
- * {
56
- cursor: inherit;
57
- }
58
- }
59
- }
60
-
61
- &.fill {
62
- &.gray > div {
63
- background-color: #e8e5e5;
64
- color: #262626;
65
- border-color: #7b7979;
66
- }
67
- &.white > div {
68
- background-color: white;
69
- color: #e33aa9;
70
- border-color: #e33aa9;
71
- }
72
- }
73
-
74
- &.transparent {
75
- > div {
76
- background-color: transparent;
77
- }
78
-
79
- &.gray > div {
80
- color: #a2a2a2;
81
- border-color: #7b7979;
82
- }
83
- &.black > div {
84
- color: #262626;
85
- border-color: #7b7979;
86
- }
87
- }
88
- }
89
- `;
@@ -1,19 +0,0 @@
1
- import { NotFound } from "./index";
2
-
3
- export default {
4
- title: "Components/atoms/NotFound",
5
- component: NotFound,
6
- argTypes: {},
7
- };
8
-
9
- const Template = (args) => <NotFound {...args} />;
10
-
11
- export const NotFoundTest = Template.bind({});
12
- NotFoundTest.args = {
13
- code: "501",
14
- message: "No se pudo obtener los mensajes del chat",
15
- details: "no se encontro la cadena asociada al producto",
16
- };
17
-
18
- export const NotFoundDefault = Template.bind({});
19
- NotFoundDefault.args = {};
@@ -1,52 +0,0 @@
1
- import { Container } from "./styles";
2
- import { ButtonV2 } from "../ButtonV2";
3
- import { Modal } from "../../organisms/Modal";
4
- import { FontAwesomeIcon as Icon } from "@fortawesome/react-fontawesome";
5
- import { faCircleInfo as iconInfo } from "@fortawesome/free-solid-svg-icons";
6
- import imgNotFountDefault from "../../../assets/images/defaultImages/notFound.svg";
7
- import { useState, useEffect } from "react";
8
-
9
- export const NotFound = (props) => {
10
- const {
11
- className, // string
12
- code, // string
13
- message, // string
14
- details, // string
15
- } = props;
16
- const [showModal, setShowModal] = useState(false);
17
-
18
- return (
19
- <>
20
- <Container className={className}>
21
- <img src={imgNotFountDefault} alt={"imagen not found"} />
22
-
23
- <div className="divInfo">
24
- {/* icono info */}
25
- <ButtonV2
26
- className={"btnInfo"}
27
- type={"pink"}
28
- transparent
29
- icon={iconInfo}
30
- size={16}
31
- onClick={() => {
32
- setShowModal(true);
33
- }}
34
- />
35
-
36
- <label className="label-error">
37
- Codigo de error
38
- <label> {code ? code : 404} </label>
39
- </label>
40
- </div>
41
-
42
- <Modal
43
- show={showModal}
44
- title={message ? message : "Error NO especificado"}
45
- message={details ? details : "Reporta esto a TI"}
46
- icon={"info"}
47
- onClickBtnDefault={(event) => setShowModal(false)}
48
- />
49
- </Container>
50
- </>
51
- );
52
- };
@@ -1,55 +0,0 @@
1
- import styled from "styled-components";
2
- import { GlobalColors, FontFamily } from "../../../global-files/variables";
3
-
4
- export const Container = styled.div`
5
- width: 100%;
6
- height: 100%;
7
- min-width: min-content;
8
- min-height: min-content;
9
- display: flex;
10
- flex-direction: column;
11
- justify-content: center;
12
- align-items: center;
13
- gap: 6px;
14
- padding: 20px 10px;
15
- overflow: auto;
16
- //border: 1px solid red;
17
-
18
- img {
19
- width: 80%;
20
- min-width: 35px;
21
- max-width: 480px;
22
- max-height: 90%;
23
- object-fit: contain;
24
- //border: 1px solid blue;
25
- }
26
-
27
- .divInfo {
28
- display: flex;
29
- flex-direction: row;
30
- flex-wrap: wrap;
31
- gap: 7px;
32
- align-items: center;
33
-
34
- .btnInfo {
35
- padding: 0px;
36
- }
37
-
38
- .label-error {
39
- display: flex;
40
- flex-direction: row;
41
- flex-wrap: wrap;
42
- align-items: center;
43
- gap: 3px;
44
- font-family: ${FontFamily.RobotoRegular}, sans-serif;
45
- font-size: 13px;
46
- color: #262626;
47
-
48
- label {
49
- font-family: ${FontFamily.RobotoMedium}, sans-serif;
50
- font-size: 15px;
51
- color: #e33aa9;
52
- }
53
- }
54
- }
55
- `;
@@ -1,26 +0,0 @@
1
- import { SelectItemV2 } from "./index";
2
-
3
- export default {
4
- title: "Components/atoms/SelectItemV2",
5
- component: SelectItemV2,
6
- argTypes: {
7
- checkbox: {
8
- options: [undefined, true, false],
9
- control: { type: "select" },
10
- },
11
- },
12
- };
13
-
14
- const Template = (args) => <SelectItemV2 {...args} />;
15
-
16
- export const SelectItemV2Test = Template.bind({});
17
- SelectItemV2Test.args = {
18
- label: "Label del item",
19
- value: 1,
20
- checkbox: true,
21
- selected: false,
22
- onClick: (isSelected, value) => {
23
- console.log("isSelected:", isSelected);
24
- console.log("value:", value);
25
- },
26
- };