contentoh-components-library 21.3.12 → 21.3.13
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/.env.development +0 -5
- package/dist/assets/images/generalButton/closeIcon.svg +2 -2
- package/dist/components/atoms/ProgressBar/index.js +6 -36
- package/dist/components/atoms/ProgressBar/styles.js +3 -11
- package/dist/components/molecules/CustomSelect/CustomSelect.stories.js +22 -21
- package/dist/components/molecules/CustomSelect/SelectItem.js +1 -10
- package/dist/components/molecules/HeaderTop/index.js +6 -23
- package/dist/components/molecules/HeaderTop/styles.js +1 -1
- package/dist/components/molecules/ProductNameHeader/index.js +4 -6
- package/dist/components/organisms/FullProductNameHeader/index.js +0 -1
- package/dist/components/pages/Dashboard/index.js +21 -13
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +50 -65
- package/dist/components/pages/ProviderProductEdition/index.js +11 -15
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +86 -60
- package/dist/components/pages/RetailerProductEdition/index.js +12 -13
- package/dist/global-files/fonts.css +0 -6
- package/dist/global-files/variables.js +0 -2
- package/dist/index.js +46 -267
- package/package.json +1 -12
- package/src/assets/images/generalButton/closeIcon.svg +2 -2
- package/src/components/atoms/ProgressBar/index.js +5 -40
- package/src/components/atoms/ProgressBar/styles.js +0 -24
- package/src/components/molecules/CustomSelect/CustomSelect.stories.js +12 -20
- package/src/components/molecules/CustomSelect/SelectItem.js +0 -7
- package/src/components/molecules/HeaderTop/index.js +8 -29
- package/src/components/molecules/HeaderTop/styles.js +0 -4
- package/src/components/molecules/ProductNameHeader/index.js +2 -7
- package/src/components/organisms/FullProductNameHeader/index.js +0 -1
- package/src/components/pages/Dashboard/index.js +37 -31
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +49 -67
- package/src/components/pages/ProviderProductEdition/index.js +7 -16
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +85 -62
- package/src/components/pages/RetailerProductEdition/index.js +10 -12
- package/src/global-files/fonts.css +0 -6
- package/src/global-files/variables.js +0 -2
- package/src/index.js +0 -17
- package/src/assets/images/customSelect/starIcon.svg +0 -14
- package/src/assets/images/defaultImages/Spinner.gif +0 -0
- package/src/assets/images/defaultImages/notFound.svg +0 -124
- package/src/components/atoms/ButtonFileChooser/ButtonFileChooser.stories.js +0 -47
- package/src/components/atoms/ButtonFileChooser/index.js +0 -68
- package/src/components/atoms/ButtonFileChooser/styles.js +0 -4
- package/src/components/atoms/ButtonV2/ButtonV2.stories.js +0 -53
- package/src/components/atoms/ButtonV2/index.js +0 -85
- package/src/components/atoms/ButtonV2/styles.js +0 -217
- package/src/components/atoms/CustomIcon/CustomIcon.stories.js +0 -36
- package/src/components/atoms/CustomIcon/index.js +0 -41
- package/src/components/atoms/CustomIcon/styles.js +0 -85
- package/src/components/atoms/IconFile/IconFile.stories.js +0 -35
- package/src/components/atoms/IconFile/index.js +0 -119
- package/src/components/atoms/IconFile/styles.js +0 -67
- package/src/components/atoms/Image/Image.stories.js +0 -51
- package/src/components/atoms/Image/index.js +0 -55
- package/src/components/atoms/Image/styles.js +0 -34
- package/src/components/atoms/ImageLink/ImageLink.stories.js +0 -43
- package/src/components/atoms/ImageLink/index.js +0 -57
- package/src/components/atoms/ImageLink/styles.js +0 -30
- package/src/components/atoms/ImagePreview/ImagePreview.stories.js +0 -52
- package/src/components/atoms/ImagePreview/index.js +0 -178
- package/src/components/atoms/ImagePreview/styles.js +0 -77
- package/src/components/atoms/InputText/InputText.stories.js +0 -39
- package/src/components/atoms/InputText/index.js +0 -61
- package/src/components/atoms/InputText/styles.js +0 -89
- package/src/components/atoms/NotFound/NotFound.stories.js +0 -19
- package/src/components/atoms/NotFound/index.js +0 -52
- package/src/components/atoms/NotFound/styles.js +0 -55
- package/src/components/atoms/SelectItemV2/SelectItemV2.stories.js +0 -26
- package/src/components/atoms/SelectItemV2/index.js +0 -61
- package/src/components/atoms/SelectItemV2/styles.js +0 -90
- package/src/components/atoms/Tooltip/Tooltip.stories.js +0 -51
- package/src/components/atoms/Tooltip/index.js +0 -59
- package/src/components/atoms/Tooltip/styles.js +0 -42
- package/src/components/molecules/ButtonDownloadFile/DownloadFile.stories.js +0 -54
- package/src/components/molecules/ButtonDownloadFile/index.js +0 -109
- package/src/components/molecules/ButtonDownloadFile/styles.js +0 -66
- package/src/components/molecules/Dropdown/Dropdown.stories.js +0 -103
- package/src/components/molecules/Dropdown/index.js +0 -150
- package/src/components/molecules/Dropdown/styles.js +0 -75
- package/src/components/molecules/ImageTooltip/ImageTooltip.stories.js +0 -68
- package/src/components/molecules/ImageTooltip/index.js +0 -63
- package/src/components/molecules/ImageTooltip/styles.js +0 -18
- package/src/components/molecules/SelectV2/SelectV2.stories.js +0 -115
- package/src/components/molecules/SelectV2/index.js +0 -357
- package/src/components/molecules/SelectV2/styles.js +0 -105
- package/src/components/molecules/SelectV2/test.js +0 -61
- package/src/components/molecules/SelectV2/test.stories.js +0 -10
- package/src/components/organisms/Chat/Chat.stories.js +0 -147
- package/src/components/organisms/Chat/ChatLists/ChatLists.stories.js +0 -65
- package/src/components/organisms/Chat/ChatLists/Rotoplas.jpeg +0 -0
- package/src/components/organisms/Chat/ChatLists/THD.png +0 -0
- package/src/components/organisms/Chat/ChatLists/index.js +0 -141
- package/src/components/organisms/Chat/ChatLists/styles.js +0 -162
- package/src/components/organisms/Chat/ContainerItems/ContainerItems.stories.js +0 -142
- package/src/components/organisms/Chat/ContainerItems/index.js +0 -512
- package/src/components/organisms/Chat/ContainerItems/styles.js +0 -328
- package/src/components/organisms/Chat/ContentChat/ContentChat.stories.js +0 -102
- package/src/components/organisms/Chat/ContentChat/Rotoplas.jpeg +0 -0
- package/src/components/organisms/Chat/ContentChat/THD.png +0 -0
- package/src/components/organisms/Chat/ContentChat/index.js +0 -897
- package/src/components/organisms/Chat/ContentChat/styles.js +0 -41
- package/src/components/organisms/Chat/Footer/Footer.stories.js +0 -22
- package/src/components/organisms/Chat/Footer/index.js +0 -661
- package/src/components/organisms/Chat/Footer/styles.js +0 -286
- package/src/components/organisms/Chat/Header/Header.stories.js +0 -66
- package/src/components/organisms/Chat/Header/index.js +0 -94
- package/src/components/organisms/Chat/Header/styles.js +0 -49
- package/src/components/organisms/Chat/index.js +0 -235
- package/src/components/organisms/Chat/styles.js +0 -42
- package/src/components/organisms/Modal/Modal.stories.js +0 -55
- package/src/components/organisms/Modal/index.js +0 -97
- package/src/components/organisms/Modal/styles.js +0 -103
- package/src/components/organisms/RangeCalendar/RangeCalendar.stories.js +0 -16
- package/src/components/organisms/RangeCalendar/index.js +0 -121
- package/src/components/organisms/RangeCalendar/styles.js +0 -883
- package/src/global-files/handle_http.js +0 -225
- package/src/global-files/handle_userTech.js +0 -7
- package/src/global-files/utils.js +0 -315
|
@@ -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
|
-
};
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { useEffect, useRef, useState } from "react";
|
|
2
|
-
import { Checkbox } from "@mui/material";
|
|
3
|
-
import { Container, ContainerButton } from "./styles";
|
|
4
|
-
import React from "react";
|
|
5
|
-
import { isStringEmpty } from "../../../global-files/utils";
|
|
6
|
-
import { faCheck as IconOK } from "@fortawesome/free-solid-svg-icons";
|
|
7
|
-
|
|
8
|
-
export const SelectItemV2 = (props) => {
|
|
9
|
-
const {
|
|
10
|
-
id,
|
|
11
|
-
keyId,
|
|
12
|
-
className, // (string) clase del container
|
|
13
|
-
label, // (string) texto visible del item
|
|
14
|
-
value, // valor del item
|
|
15
|
-
checkbox /* (boolean)
|
|
16
|
-
true -> item con checkbox
|
|
17
|
-
false -> item sin checkbox pero respeta el espacio del checkbox
|
|
18
|
-
undefined -> item sin checkbox
|
|
19
|
-
*/,
|
|
20
|
-
selected, // (boolean) item seleccionado??
|
|
21
|
-
onClick, // (isSelected , value) => {}
|
|
22
|
-
} = props;
|
|
23
|
-
|
|
24
|
-
return checkbox ? (
|
|
25
|
-
<Container
|
|
26
|
-
className={
|
|
27
|
-
"selectItemV2" +
|
|
28
|
-
(isStringEmpty(className) ? "" : " " + className) +
|
|
29
|
-
(!checkbox && selected ? " selectedItem" : "")
|
|
30
|
-
}
|
|
31
|
-
id={id}
|
|
32
|
-
key={keyId}
|
|
33
|
-
checkbox={checkbox}
|
|
34
|
-
onClick={(event) => onClick && onClick(!selected, value)}
|
|
35
|
-
>
|
|
36
|
-
{checkbox !== undefined && (
|
|
37
|
-
<Checkbox
|
|
38
|
-
className={"checkbox" + (checkbox ? "" : " hidden")}
|
|
39
|
-
checked={selected}
|
|
40
|
-
/>
|
|
41
|
-
)}
|
|
42
|
-
|
|
43
|
-
<label className="label">{label}</label>
|
|
44
|
-
</Container>
|
|
45
|
-
) : (
|
|
46
|
-
<ContainerButton
|
|
47
|
-
className={
|
|
48
|
-
"selectItemV2" +
|
|
49
|
-
(isStringEmpty(className) ? "" : " " + className) +
|
|
50
|
-
(selected ? " selectedItem" : "")
|
|
51
|
-
}
|
|
52
|
-
checkbox={checkbox === false}
|
|
53
|
-
type={"whiteS3"}
|
|
54
|
-
label={label}
|
|
55
|
-
icon={checkbox === false || selected ? IconOK : undefined}
|
|
56
|
-
onClick={(event) => {
|
|
57
|
-
onClick && onClick(!selected, value);
|
|
58
|
-
}}
|
|
59
|
-
/>
|
|
60
|
-
);
|
|
61
|
-
};
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import styled from "styled-components";
|
|
2
|
-
import { GlobalColors, FontFamily } from "../../../global-files/variables";
|
|
3
|
-
import { ButtonV2 } from "../ButtonV2";
|
|
4
|
-
|
|
5
|
-
export const Container = styled.div`
|
|
6
|
-
width: fit-content;
|
|
7
|
-
display: flex;
|
|
8
|
-
flex-direction: row;
|
|
9
|
-
flex-wrap: nowrap;
|
|
10
|
-
gap: 11px;
|
|
11
|
-
justify-content: flex-start;
|
|
12
|
-
align-items: center;
|
|
13
|
-
cursor: pointer;
|
|
14
|
-
padding: 8px;
|
|
15
|
-
transition: background 0.25s;
|
|
16
|
-
//border: 1px solid lightgray;
|
|
17
|
-
|
|
18
|
-
&:hover {
|
|
19
|
-
background-color: #f0f0f0;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.checkbox {
|
|
23
|
-
padding: 3px;
|
|
24
|
-
|
|
25
|
-
&.hidden {
|
|
26
|
-
visibility: hidden;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
&.Mui-checked {
|
|
30
|
-
color: #808080;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.MuiSvgIcon-root {
|
|
34
|
-
font-size: 16px;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.label {
|
|
39
|
-
cursor: inherit;
|
|
40
|
-
font-family: ${FontFamily.RobotoRegular}, sans-serif;
|
|
41
|
-
font-size: 12px;
|
|
42
|
-
text-align: left;
|
|
43
|
-
color: #262626;
|
|
44
|
-
line-height: 1.25;
|
|
45
|
-
padding: ${({ checkbox }) => (checkbox === undefined ? "3" : "0")}px;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// para item sin checkbox seleccionado
|
|
49
|
-
&.selectedItem {
|
|
50
|
-
background-color: #8e8e8e;
|
|
51
|
-
.label {
|
|
52
|
-
font-family: ${FontFamily.RobotoMedium}, sans-serif;
|
|
53
|
-
color: white;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
`;
|
|
57
|
-
|
|
58
|
-
export const ContainerButton = styled(ButtonV2)`
|
|
59
|
-
width: fit-content;
|
|
60
|
-
border: none;
|
|
61
|
-
border-radius: 0px;
|
|
62
|
-
|
|
63
|
-
.button {
|
|
64
|
-
font-family: ${FontFamily.RobotoRegular}, sans-serif;
|
|
65
|
-
font-size: 12px;
|
|
66
|
-
text-align: left;
|
|
67
|
-
line-height: 1.25;
|
|
68
|
-
padding: ${({ checkbox }) => (checkbox ? "8px" : "11px 8px")};
|
|
69
|
-
gap: 11px;
|
|
70
|
-
border: none;
|
|
71
|
-
letter-spacing: 0px;
|
|
72
|
-
.icon {
|
|
73
|
-
padding: 3px;
|
|
74
|
-
color: #808080 !important;
|
|
75
|
-
font-size: 16px;
|
|
76
|
-
visibility: hidden;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// para item sin checkbox seleccionado
|
|
81
|
-
&.selectedItem {
|
|
82
|
-
.button {
|
|
83
|
-
font-family: ${FontFamily.RobotoMedium}, sans-serif;
|
|
84
|
-
padding: 8px;
|
|
85
|
-
.icon {
|
|
86
|
-
visibility: visible;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
`;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { Tooltip } from "./index";
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: "Components/atoms/Tooltip",
|
|
5
|
-
component: Tooltip,
|
|
6
|
-
argTypes: {
|
|
7
|
-
position: {
|
|
8
|
-
options: [
|
|
9
|
-
undefined,
|
|
10
|
-
"topStart",
|
|
11
|
-
"topEnd",
|
|
12
|
-
"topCenter",
|
|
13
|
-
"rightStart",
|
|
14
|
-
"rightEnd",
|
|
15
|
-
"rightCenter",
|
|
16
|
-
"bottomStart",
|
|
17
|
-
"bottomEnd",
|
|
18
|
-
"bottomCenter",
|
|
19
|
-
"leftStart",
|
|
20
|
-
"leftEnd",
|
|
21
|
-
"leftCenter",
|
|
22
|
-
],
|
|
23
|
-
control: { type: "select" },
|
|
24
|
-
},
|
|
25
|
-
addArrow: {
|
|
26
|
-
options: [undefined, false, true],
|
|
27
|
-
control: { type: "select" },
|
|
28
|
-
},
|
|
29
|
-
transitionType: {
|
|
30
|
-
options: [undefined, "grow", "fade", "zoom"],
|
|
31
|
-
control: { type: "select" },
|
|
32
|
-
},
|
|
33
|
-
followCursor: {
|
|
34
|
-
options: [undefined, false, true],
|
|
35
|
-
control: { type: "select" },
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
const Template = (args) => <Tooltip {...args} />;
|
|
41
|
-
|
|
42
|
-
export const TooltipDefault = Template.bind({});
|
|
43
|
-
TooltipDefault.args = {
|
|
44
|
-
componentTooltip: <p> hola soy tooltip de prueba en storybook </p>,
|
|
45
|
-
children: <button> abrir tooltip </button>,
|
|
46
|
-
classNameTooltip: "container-tooltip",
|
|
47
|
-
position: undefined,
|
|
48
|
-
addArrow: undefined,
|
|
49
|
-
transitionType: undefined,
|
|
50
|
-
followCursor: undefined,
|
|
51
|
-
};
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { useEffect, useRef, useState } from "react";
|
|
2
|
-
import { Fade, Grow, Popper, Tooltip as TooltipMUI, Zoom } from "@mui/material";
|
|
3
|
-
import { Container } from "./styles";
|
|
4
|
-
import React from "react";
|
|
5
|
-
|
|
6
|
-
export const Tooltip = (props) => {
|
|
7
|
-
const {
|
|
8
|
-
componentTooltip, // (jsx) componente que aparecera en el tooltip
|
|
9
|
-
children, // (jsx) componente interno que va dentro de la etiqueta <Tooltip>
|
|
10
|
-
className, // (string) clase del container trigger
|
|
11
|
-
classNameTooltip, // (string) clase del contenedor tooltip
|
|
12
|
-
position, // (string) posicion del contenedor tooltip (values en object positions)
|
|
13
|
-
addArrow, // (boolean) add flecha en la parte posterior del tooltip?
|
|
14
|
-
transitionType, // (string) -> 'grow' (default) | 'fade' | 'zoom'
|
|
15
|
-
followCursor, // (boolean) true -> el tooltip se movera junto al cursor
|
|
16
|
-
} = props;
|
|
17
|
-
const positions = {
|
|
18
|
-
topStart: "top-start",
|
|
19
|
-
topEnd: "top-end",
|
|
20
|
-
topCenter: "top",
|
|
21
|
-
|
|
22
|
-
rightStart: "right-start",
|
|
23
|
-
rightEnd: "right-end",
|
|
24
|
-
rightCenter: "right",
|
|
25
|
-
|
|
26
|
-
bottomStart: "bottom-start",
|
|
27
|
-
bottomEnd: "bottom-end",
|
|
28
|
-
bottomCenter: "bottom",
|
|
29
|
-
|
|
30
|
-
leftStart: "left-start",
|
|
31
|
-
leftEnd: "left-end",
|
|
32
|
-
leftCenter: "left",
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
return (
|
|
36
|
-
<TooltipMUI
|
|
37
|
-
{...props}
|
|
38
|
-
placement={positions[position] ?? positions.topCenter}
|
|
39
|
-
arrow={addArrow || addArrow === undefined ? true : false}
|
|
40
|
-
componentsProps={{
|
|
41
|
-
tooltip: { className: classNameTooltip },
|
|
42
|
-
popper: { disablePortal: true },
|
|
43
|
-
transition: { timeout: 300 },
|
|
44
|
-
}}
|
|
45
|
-
TransitionComponent={
|
|
46
|
-
transitionType === "grow"
|
|
47
|
-
? Grow
|
|
48
|
-
: transitionType === "fade"
|
|
49
|
-
? Fade
|
|
50
|
-
: Zoom
|
|
51
|
-
}
|
|
52
|
-
enterDelay={300}
|
|
53
|
-
followCursor={followCursor ?? false}
|
|
54
|
-
title={componentTooltip}
|
|
55
|
-
>
|
|
56
|
-
<Container className={className}> {children} </Container>
|
|
57
|
-
</TooltipMUI>
|
|
58
|
-
);
|
|
59
|
-
};
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { FontFamily } from "../../../global-files/variables";
|
|
2
|
-
import styled from "styled-components";
|
|
3
|
-
|
|
4
|
-
export const Container = styled.div`
|
|
5
|
-
width: fit-content;
|
|
6
|
-
//margin: 100px 0px 0px 100px; modo dev
|
|
7
|
-
//border: 1px solid red; modo dev
|
|
8
|
-
|
|
9
|
-
+ .MuiTooltip-popper {
|
|
10
|
-
background-color: transparent;
|
|
11
|
-
|
|
12
|
-
.MuiTooltip-tooltip {
|
|
13
|
-
--background: white;
|
|
14
|
-
box-shadow: 0px 0px 10px 1px gray;
|
|
15
|
-
background-color: var(--background);
|
|
16
|
-
padding: 10px;
|
|
17
|
-
border-radius: 7px;
|
|
18
|
-
max-width: 60vw;
|
|
19
|
-
font-family: ${FontFamily.RobotoMedium}, sans-serif;
|
|
20
|
-
font-size: 12px;
|
|
21
|
-
text-align: left;
|
|
22
|
-
color: #262626;
|
|
23
|
-
|
|
24
|
-
.MuiTooltip-arrow {
|
|
25
|
-
color: var(--background);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
&[data-popper-placement*="bottom"] .MuiTooltip-tooltip {
|
|
30
|
-
margin-top: 10px;
|
|
31
|
-
}
|
|
32
|
-
&[data-popper-placement*="top"] .MuiTooltip-tooltip {
|
|
33
|
-
margin-bottom: 10px;
|
|
34
|
-
}
|
|
35
|
-
&[data-popper-placement*="left"] .MuiTooltip-tooltip {
|
|
36
|
-
margin-right: 10px;
|
|
37
|
-
}
|
|
38
|
-
&[data-popper-placement*="right"] .MuiTooltip-tooltip {
|
|
39
|
-
margin-left: 10px;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
`;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { ButtonDownloadFile } from "./index";
|
|
2
|
-
export default {
|
|
3
|
-
title: "Components/molecules/ButtonDownloadFile",
|
|
4
|
-
component: ButtonDownloadFile,
|
|
5
|
-
argTypes: {
|
|
6
|
-
type: {
|
|
7
|
-
options: [
|
|
8
|
-
undefined,
|
|
9
|
-
"white",
|
|
10
|
-
"whiteS2",
|
|
11
|
-
"pink",
|
|
12
|
-
"gray",
|
|
13
|
-
"purple",
|
|
14
|
-
"black",
|
|
15
|
-
],
|
|
16
|
-
control: { type: "select" },
|
|
17
|
-
},
|
|
18
|
-
borderType: {
|
|
19
|
-
options: [undefined, "rectangle", "circle"],
|
|
20
|
-
control: { type: "select" },
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
const Template = (args) => <ButtonDownloadFile {...args} />;
|
|
26
|
-
|
|
27
|
-
export const DownloadFileOk = Template.bind({});
|
|
28
|
-
DownloadFileOk.args = {
|
|
29
|
-
type: undefined,
|
|
30
|
-
transparent: false,
|
|
31
|
-
borderType: undefined,
|
|
32
|
-
size: "70",
|
|
33
|
-
onDownload: (error) => {
|
|
34
|
-
error &&
|
|
35
|
-
alert("mensaje: " + error.message + "\nDetalles: " + error.details);
|
|
36
|
-
},
|
|
37
|
-
url: `https://content-management-images.s3.amazonaws.com/84300/1/chat/acuse RFC-8b2eb177-5bfc-4266-9b26-4e7297880594-9e2e5853-4697-442a-8ff7-3b7a1ede0856.pdf`,
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
export const DownloadFileError = Template.bind({});
|
|
41
|
-
DownloadFileError.args = {
|
|
42
|
-
id: "",
|
|
43
|
-
key: "",
|
|
44
|
-
color: undefined,
|
|
45
|
-
background: undefined,
|
|
46
|
-
borderType: "circle",
|
|
47
|
-
size: "70",
|
|
48
|
-
width: "100px",
|
|
49
|
-
onDownload: (error) => {
|
|
50
|
-
error &&
|
|
51
|
-
alert("mensaje: " + error.message + "\nDetalles: " + error.details);
|
|
52
|
-
},
|
|
53
|
-
url: `https://content-management-images.s3.amazonaws.com/84300/1/chat/noExiste.pdf`,
|
|
54
|
-
};
|