siam-ui-utils 3.0.7 → 3.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/copy-link/styles.css +38 -0
- package/dist/custom-input/CustomInputCheckbox.js.map +1 -1
- package/dist/custom-input/index.css +166 -0
- package/dist/custom-input/index.js +3 -1
- package/dist/custom-input/index.js.map +1 -1
- package/dist/custom-input/multi-select/badge-label-multi-select.js +29 -0
- package/dist/custom-input/multi-select/badge-label-multi-select.js.map +1 -0
- package/dist/custom-input/multi-select/index.css +24 -0
- package/dist/custom-input/multi-select/index.js +62 -0
- package/dist/custom-input/multi-select/index.js.map +1 -0
- package/dist/custom-input/multi-select/styled-component.js +24 -0
- package/dist/custom-input/multi-select/styled-component.js.map +1 -0
- package/dist/dropzone/styles.css +140 -0
- package/dist/dropzone-uploader/dropzone-uploader.css +66 -0
- package/dist/node_modules/react-multi-select-component/dist/esm/index.js +178 -0
- package/dist/node_modules/react-multi-select-component/dist/esm/index.js.map +1 -0
- package/dist/timer/styles.css +59 -0
- package/dist/view-layout/styles.css +127 -0
- package/package.json +2 -2
- package/dist/assets/siam-ui-utils.css +0 -595
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
.copy-link-container {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
gap: 8px;
|
|
5
|
+
width: 100%;
|
|
6
|
+
position: relative;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.copy-link-text {
|
|
10
|
+
width: 90%;
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
text-overflow: ellipsis;
|
|
13
|
+
white-space: nowrap;
|
|
14
|
+
display: inline-block;
|
|
15
|
+
vertical-align: middle;
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
transition: color 0.2s;
|
|
18
|
+
font-weight: 500;
|
|
19
|
+
color: #007bff;
|
|
20
|
+
}
|
|
21
|
+
.copy-link-text.copied {
|
|
22
|
+
color: #28a745;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.copy-link-btn {
|
|
26
|
+
padding: 0;
|
|
27
|
+
font-size: 16px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.copy-link-copied {
|
|
31
|
+
color: #28a745;
|
|
32
|
+
font-size: 13px;
|
|
33
|
+
margin-left: 8px;
|
|
34
|
+
position: absolute;
|
|
35
|
+
top: 100%;
|
|
36
|
+
left: 0;
|
|
37
|
+
white-space: nowrap;
|
|
38
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomInputCheckbox.js","sources":["../../src/custom-input/CustomInputCheckbox.jsx"],"sourcesContent":["import { FormGroup, Label, Input } from 'reactstrap';\r\nimport
|
|
1
|
+
{"version":3,"file":"CustomInputCheckbox.js","sources":["../../src/custom-input/CustomInputCheckbox.jsx"],"sourcesContent":["import { FormGroup, Label, Input } from 'reactstrap';\r\nimport './index.css';\r\n\r\nexport const CustomInputCheckbox = ({\r\n className,\r\n id,\r\n checked,\r\n children,\r\n defaultChecked,\r\n disabled,\r\n key,\r\n label,\r\n onChange,\r\n}) => {\r\n return (\r\n <FormGroup check key={key} className=\"custom-checkbox\">\r\n <Input\r\n type=\"checkbox\"\r\n id={`check_${id}`}\r\n className={className}\r\n checked={checked}\r\n onChange={onChange}\r\n defaultChecked={defaultChecked}\r\n disabled={disabled}\r\n />\r\n <Label check htmlFor={`check_${id}`}>\r\n {label}\r\n </Label>\r\n {children}\r\n </FormGroup>\r\n );\r\n};\r\nexport default CustomInputCheckbox;\r\n"],"names":[],"mappings":";;;AAGO,MAAM,sBAAsB,CAAC;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,SACE,qBAAC,WAAA,EAAU,OAAK,MAAW,WAAU,mBACnC,UAAA;AAAA,IAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,IAAI,SAAS,EAAE;AAAA,QACf;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MAAA;AAAA,IAAA;AAAA,IAEF,oBAAC,SAAM,OAAK,MAAC,SAAS,SAAS,EAAE,IAC9B,UAAA,MAAA,CACH;AAAA,IACC;AAAA,EAAA,EAAA,GAbmB,GActB;AAEJ;"}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/* Estilos para los checkbox personalizados */
|
|
2
|
+
.custom-checkbox input[type='checkbox'] {
|
|
3
|
+
position: absolute;
|
|
4
|
+
opacity: 0;
|
|
5
|
+
z-index: -1;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.custom-checkbox input[type='checkbox'] + label {
|
|
9
|
+
position: relative;
|
|
10
|
+
padding-left: 2rem;
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
line-height: 0px !important;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.custom-checkbox input[type='checkbox'] + label::before {
|
|
16
|
+
content: '';
|
|
17
|
+
display: inline-block;
|
|
18
|
+
width: 1rem;
|
|
19
|
+
height: 1rem;
|
|
20
|
+
border: 1px solid #ccc;
|
|
21
|
+
border-radius: 0.25rem;
|
|
22
|
+
background-color: white;
|
|
23
|
+
position: absolute;
|
|
24
|
+
left: 0;
|
|
25
|
+
top: -11px;
|
|
26
|
+
transition: background-color 0.2s, border-color 0.2s;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.custom-checkbox input[type='checkbox']:checked + label::before {
|
|
30
|
+
background-color: #900604;
|
|
31
|
+
border-color: #900604;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.custom-checkbox input[type='checkbox']:checked + label::after {
|
|
35
|
+
content: '';
|
|
36
|
+
position: absolute;
|
|
37
|
+
top: -10px;
|
|
38
|
+
left: 0.3rem;
|
|
39
|
+
width: 0.5rem;
|
|
40
|
+
height: 0.6rem;
|
|
41
|
+
border: solid white;
|
|
42
|
+
border-width: 0 0.2rem 0.2rem 0;
|
|
43
|
+
transform: rotate(45deg);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* Estilos específicos para CheckMultiSelect */
|
|
47
|
+
.check-multi-select
|
|
48
|
+
.custom-checkbox
|
|
49
|
+
input[type='checkbox']:not(:checked)
|
|
50
|
+
+ label::before {
|
|
51
|
+
background-color: #900604; /* Fondo rojo en CheckMultiSelect para desmarcados */
|
|
52
|
+
border-color: #900604;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.check-multi-select
|
|
56
|
+
.custom-checkbox
|
|
57
|
+
input[type='checkbox']:not(:checked)
|
|
58
|
+
+ label::after {
|
|
59
|
+
content: '';
|
|
60
|
+
position: absolute;
|
|
61
|
+
top: -0.29rem; /* Ajusta la posición del tilde */
|
|
62
|
+
left: 0.25rem;
|
|
63
|
+
width: 0.5rem;
|
|
64
|
+
height: 0.1rem;
|
|
65
|
+
background-color: white;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/* Estilos para checkboxes deshabilitados */
|
|
69
|
+
.custom-checkbox input[type='checkbox']:disabled + label {
|
|
70
|
+
cursor: not-allowed; /* Cambia el cursor */
|
|
71
|
+
color: #6c757d;
|
|
72
|
+
line-height: 0px !important;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.custom-checkbox input[type='checkbox']:disabled + label::before {
|
|
76
|
+
background-color: #e9ecef;
|
|
77
|
+
border-color: #ced4da;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.custom-checkbox input[type='checkbox']:disabled:checked + label::before {
|
|
81
|
+
background-color: #adb5bd;
|
|
82
|
+
border-color: #adb5bd;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* Estilos para los radio buttons personalizados */
|
|
86
|
+
.custom-radio input[type='radio'] {
|
|
87
|
+
position: absolute;
|
|
88
|
+
opacity: 0;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.custom-radio label {
|
|
92
|
+
display: inline-flex;
|
|
93
|
+
align-items: center;
|
|
94
|
+
cursor: pointer;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.custom-radio label::before {
|
|
98
|
+
content: '';
|
|
99
|
+
display: inline-block;
|
|
100
|
+
width: 20px;
|
|
101
|
+
height: 20px;
|
|
102
|
+
border-radius: 50%;
|
|
103
|
+
border: 2px solid #ced4da;
|
|
104
|
+
background-color: white;
|
|
105
|
+
margin-right: 10px;
|
|
106
|
+
transition: background-color 0.2s, border-color 0.2s;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.custom-radio input[type='radio']:checked + label::before {
|
|
110
|
+
background-color: #900604;
|
|
111
|
+
border-color: #900604;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.custom-radio input[type='radio']:checked + label::after {
|
|
115
|
+
content: '';
|
|
116
|
+
position: absolute;
|
|
117
|
+
left: 26px;
|
|
118
|
+
top: 44%;
|
|
119
|
+
transform: translateY(-50%);
|
|
120
|
+
width: 0.5rem;
|
|
121
|
+
height: 0.45rem;
|
|
122
|
+
background-color: white !important;
|
|
123
|
+
border-radius: 50%;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/* Estilos específicos para radio buttons deshabilitados */
|
|
127
|
+
.custom-radio input[type='radio']:disabled + label {
|
|
128
|
+
cursor: not-allowed; /* Cambia el cursor */
|
|
129
|
+
color: #6c757d; /* Color gris */
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.custom-radio input[type='radio']:disabled + label::before {
|
|
133
|
+
background-color: #e9ecef; /* Fondo gris claro */
|
|
134
|
+
border-color: #ced4da; /* Borde gris claro */
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.custom-radio input[type='radio']:disabled:checked + label::before {
|
|
138
|
+
background-color: #adb5bd; /* Fondo gris más oscuro para el estado checked */
|
|
139
|
+
border-color: #adb5bd; /* Borde gris más oscuro */
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/* Estilos para el custom file */
|
|
143
|
+
.custom-file {
|
|
144
|
+
height: calc(2.5rem + 2px);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.custom-file-label:focus,
|
|
148
|
+
.custom-file-input:focus {
|
|
149
|
+
border-color: #900604;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.custom-file-label::after {
|
|
153
|
+
height: calc(2.5rem + 2px - 2px);
|
|
154
|
+
padding: 0.75rem 0.75rem 0.5rem 0.75rem;
|
|
155
|
+
background: #900604;
|
|
156
|
+
color: white; /* Ajustado para contraste */
|
|
157
|
+
border-color: #900604;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.custom-file-input:focus ~ .custom-file-label {
|
|
161
|
+
border-color: rgba(144, 6, 4, 0.6);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.custom-file-input {
|
|
165
|
+
box-shadow: initial !important;
|
|
166
|
+
}
|
|
@@ -2,10 +2,12 @@ import { CustomInputCheckbox } from "./CustomInputCheckbox.js";
|
|
|
2
2
|
import { CustomInputRadio } from "./CustomInputRadio.js";
|
|
3
3
|
import { CustomInputFile } from "./CustomInputFile.js";
|
|
4
4
|
import { CustomInputCurrency } from "./CustomInputCurrency.js";
|
|
5
|
+
import { CustomMultiSelect } from "./multi-select/index.js";
|
|
5
6
|
export {
|
|
6
7
|
CustomInputCheckbox,
|
|
7
8
|
CustomInputCurrency,
|
|
8
9
|
CustomInputFile,
|
|
9
|
-
CustomInputRadio
|
|
10
|
+
CustomInputRadio,
|
|
11
|
+
CustomMultiSelect
|
|
10
12
|
};
|
|
11
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { toCamelCase } from "siam-utils";
|
|
3
|
+
import { ClickableBadge } from "./styled-component.js";
|
|
4
|
+
const BadgeLabelMultiSelect = ({
|
|
5
|
+
descripcionLabel = [],
|
|
6
|
+
onRemove = () => {
|
|
7
|
+
}
|
|
8
|
+
}) => {
|
|
9
|
+
const getBadgeColor = (value) => {
|
|
10
|
+
return value.color || "dark";
|
|
11
|
+
};
|
|
12
|
+
return /* @__PURE__ */ jsx(Fragment, { children: descripcionLabel.map((item) => /* @__PURE__ */ jsxs(
|
|
13
|
+
ClickableBadge,
|
|
14
|
+
{
|
|
15
|
+
color: getBadgeColor(item),
|
|
16
|
+
pill: true,
|
|
17
|
+
onClick: () => onRemove(item.value),
|
|
18
|
+
children: [
|
|
19
|
+
toCamelCase(item.label),
|
|
20
|
+
" ×"
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
item.value
|
|
24
|
+
)) });
|
|
25
|
+
};
|
|
26
|
+
export {
|
|
27
|
+
BadgeLabelMultiSelect as default
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=badge-label-multi-select.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge-label-multi-select.js","sources":["../../../src/custom-input/multi-select/badge-label-multi-select.jsx"],"sourcesContent":["import { toCamelCase } from 'siam-utils';\r\nimport { ClickableBadge } from './styled-component';\r\n\r\nconst BadgeLabelMultiSelect = ({\r\n descripcionLabel = [],\r\n onRemove = () => {},\r\n}) => {\r\n const getBadgeColor = (value) => {\r\n return value.color || 'dark';\r\n };\r\n\r\n return (\r\n <>\r\n {descripcionLabel.map((item) => (\r\n <ClickableBadge\r\n key={item.value}\r\n color={getBadgeColor(item)}\r\n pill\r\n onClick={() => onRemove(item.value)}\r\n >\r\n {toCamelCase(item.label)} ×\r\n </ClickableBadge>\r\n ))}\r\n </>\r\n );\r\n};\r\n\r\nexport default BadgeLabelMultiSelect;\r\n"],"names":[],"mappings":";;;AAGA,MAAM,wBAAwB,CAAC;AAAA,EAC7B,mBAAmB,CAAA;AAAA,EACnB,WAAW,MAAM;AAAA,EAAC;AACpB,MAAM;AACJ,QAAM,gBAAgB,CAAC,UAAU;AAC/B,WAAO,MAAM,SAAS;AAAA,EACxB;AAEA,SACE,oBAAA,UAAA,EACG,UAAA,iBAAiB,IAAI,CAAC,SACrB;AAAA,IAAC;AAAA,IAAA;AAAA,MAEC,OAAO,cAAc,IAAI;AAAA,MACzB,MAAI;AAAA,MACJ,SAAS,MAAM,SAAS,KAAK,KAAK;AAAA,MAEjC,UAAA;AAAA,QAAA,YAAY,KAAK,KAAK;AAAA,QAAE;AAAA,MAAA;AAAA,IAAA;AAAA,IALpB,KAAK;AAAA,EAAA,CAOb,GACH;AAEJ;"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
.rmsc input[type=checkbox] {
|
|
2
|
+
accent-color: #900604;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.rmsc .item:hover {
|
|
6
|
+
background-color: #f8e1e1;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.rmsc input[type=checkbox]:focus {
|
|
10
|
+
outline: 2px solid #900604;
|
|
11
|
+
outline-offset: 2px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.custom-multiselect .dropdown-container {
|
|
15
|
+
min-height: 38px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.dropdown-heading-value {
|
|
19
|
+
color: green;
|
|
20
|
+
height: 2rem;
|
|
21
|
+
display: inline;
|
|
22
|
+
font-weight: bold;
|
|
23
|
+
padding: 0.4rem;
|
|
24
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useEffect } from "react";
|
|
3
|
+
import { MultiSelect as je } from "../../node_modules/react-multi-select-component/dist/esm/index.js";
|
|
4
|
+
import { Row, Col } from "reactstrap";
|
|
5
|
+
import BadgeLabelMultiSelect from "./badge-label-multi-select.js";
|
|
6
|
+
import { BadgeWrapper, ClickableBadge } from "./styled-component.js";
|
|
7
|
+
/* empty css */
|
|
8
|
+
const CustomMultiSelect = ({
|
|
9
|
+
lista = [],
|
|
10
|
+
onListaUpdate = () => {
|
|
11
|
+
},
|
|
12
|
+
value = []
|
|
13
|
+
}) => {
|
|
14
|
+
const [selected, setSelected] = useState([]);
|
|
15
|
+
const overrideStringsCustom = {
|
|
16
|
+
selectSomeItems: "Seleccionar Estado/s",
|
|
17
|
+
allItemsAreSelected: "Todos Seleccionados",
|
|
18
|
+
search: "Buscar...",
|
|
19
|
+
selectAll: "SELECCIONAR TODOS"
|
|
20
|
+
};
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
if (value.length) {
|
|
23
|
+
setSelected(value);
|
|
24
|
+
}
|
|
25
|
+
}, [value]);
|
|
26
|
+
const handleCheckChange = (selectedOptions) => {
|
|
27
|
+
if (selectedOptions) {
|
|
28
|
+
setSelected(selectedOptions);
|
|
29
|
+
onListaUpdate(selectedOptions);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
const handleRemoveBadge = (valueToRemove) => {
|
|
33
|
+
const updated = selected.filter((item) => item.value !== valueToRemove);
|
|
34
|
+
setSelected(updated);
|
|
35
|
+
onListaUpdate(updated);
|
|
36
|
+
};
|
|
37
|
+
return /* @__PURE__ */ jsxs(Row, { className: "align-items-center", children: [
|
|
38
|
+
/* @__PURE__ */ jsx(Col, { xs: 6, style: { marginTop: "3.5rem" }, children: /* @__PURE__ */ jsx(
|
|
39
|
+
je,
|
|
40
|
+
{
|
|
41
|
+
options: lista,
|
|
42
|
+
value: selected,
|
|
43
|
+
onChange: handleCheckChange,
|
|
44
|
+
labelledBy: "Seleccionar",
|
|
45
|
+
className: "custom-multiselect",
|
|
46
|
+
overrideStrings: overrideStringsCustom
|
|
47
|
+
}
|
|
48
|
+
) }),
|
|
49
|
+
/* @__PURE__ */ jsx(Col, { xs: 6, style: { marginTop: "0.5rem" }, children: selected.length > 0 && /* @__PURE__ */ jsx(BadgeWrapper, { children: selected.length === lista.length ? /* @__PURE__ */ jsx(ClickableBadge, { color: "info", pill: true, children: "Todos" }) : /* @__PURE__ */ jsx(
|
|
50
|
+
BadgeLabelMultiSelect,
|
|
51
|
+
{
|
|
52
|
+
descripcionLabel: selected,
|
|
53
|
+
onRemove: handleRemoveBadge
|
|
54
|
+
}
|
|
55
|
+
) }) })
|
|
56
|
+
] });
|
|
57
|
+
};
|
|
58
|
+
export {
|
|
59
|
+
CustomMultiSelect,
|
|
60
|
+
CustomMultiSelect as default
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/custom-input/multi-select/index.jsx"],"sourcesContent":["import { useEffect, useState } from 'react';\r\nimport { MultiSelect } from 'react-multi-select-component';\r\nimport { Col, Row } from 'reactstrap';\r\nimport BadgeLabelMultiSelect from './badge-label-multi-select';\r\nimport { BadgeWrapper, ClickableBadge } from './styled-component';\r\nimport './index.scss';\r\n\r\nexport const CustomMultiSelect = ({\r\n lista = [],\r\n onListaUpdate = () => {},\r\n value = [],\r\n}) => {\r\n const [selected, setSelected] = useState([]);\r\n const overrideStringsCustom = {\r\n selectSomeItems: 'Seleccionar Estado/s',\r\n allItemsAreSelected: 'Todos Seleccionados',\r\n search: 'Buscar...',\r\n selectAll: 'SELECCIONAR TODOS',\r\n };\r\n\r\n useEffect(() => {\r\n if (value.length) {\r\n setSelected(value);\r\n }\r\n }, [value]);\r\n\r\n const handleCheckChange = (selectedOptions) => {\r\n if (selectedOptions) {\r\n setSelected(selectedOptions);\r\n onListaUpdate(selectedOptions);\r\n }\r\n };\r\n\r\n const handleRemoveBadge = (valueToRemove) => {\r\n const updated = selected.filter((item) => item.value !== valueToRemove);\r\n setSelected(updated);\r\n onListaUpdate(updated);\r\n };\r\n\r\n return (\r\n <Row className=\"align-items-center\">\r\n <Col xs={6} style={{ marginTop: '3.5rem' }}>\r\n <MultiSelect\r\n options={lista}\r\n value={selected}\r\n onChange={handleCheckChange}\r\n labelledBy=\"Seleccionar\"\r\n className=\"custom-multiselect\"\r\n overrideStrings={overrideStringsCustom}\r\n />\r\n </Col>\r\n <Col xs={6} style={{ marginTop: '0.5rem' }}>\r\n {selected.length > 0 && (\r\n <BadgeWrapper>\r\n {selected.length === lista.length ? (\r\n <ClickableBadge color=\"info\" pill>\r\n Todos\r\n </ClickableBadge>\r\n ) : (\r\n <BadgeLabelMultiSelect\r\n descripcionLabel={selected}\r\n onRemove={handleRemoveBadge}\r\n />\r\n )}\r\n </BadgeWrapper>\r\n )}\r\n </Col>\r\n </Row>\r\n );\r\n};\r\n\r\nexport default CustomMultiSelect;\r\n"],"names":["MultiSelect"],"mappings":";;;;;;;AAOO,MAAM,oBAAoB,CAAC;AAAA,EAChC,QAAQ,CAAA;AAAA,EACR,gBAAgB,MAAM;AAAA,EAAC;AAAA,EACvB,QAAQ,CAAA;AACV,MAAM;AACJ,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,CAAA,CAAE;AAC3C,QAAM,wBAAwB;AAAA,IAC5B,iBAAiB;AAAA,IACjB,qBAAqB;AAAA,IACrB,QAAQ;AAAA,IACR,WAAW;AAAA,EAAA;AAGb,YAAU,MAAM;AACd,QAAI,MAAM,QAAQ;AAChB,kBAAY,KAAK;AAAA,IACnB;AAAA,EACF,GAAG,CAAC,KAAK,CAAC;AAEV,QAAM,oBAAoB,CAAC,oBAAoB;AAC7C,QAAI,iBAAiB;AACnB,kBAAY,eAAe;AAC3B,oBAAc,eAAe;AAAA,IAC/B;AAAA,EACF;AAEA,QAAM,oBAAoB,CAAC,kBAAkB;AAC3C,UAAM,UAAU,SAAS,OAAO,CAAC,SAAS,KAAK,UAAU,aAAa;AACtE,gBAAY,OAAO;AACnB,kBAAc,OAAO;AAAA,EACvB;AAEA,SACE,qBAAC,KAAA,EAAI,WAAU,sBACb,UAAA;AAAA,IAAA,oBAAC,OAAI,IAAI,GAAG,OAAO,EAAE,WAAW,YAC9B,UAAA;AAAA,MAACA;AAAAA,MAAA;AAAA,QACC,SAAS;AAAA,QACT,OAAO;AAAA,QACP,UAAU;AAAA,QACV,YAAW;AAAA,QACX,WAAU;AAAA,QACV,iBAAiB;AAAA,MAAA;AAAA,IAAA,GAErB;AAAA,IACA,oBAAC,KAAA,EAAI,IAAI,GAAG,OAAO,EAAE,WAAW,SAAA,GAC7B,UAAA,SAAS,SAAS,yBAChB,cAAA,EACE,UAAA,SAAS,WAAW,MAAM,SACzB,oBAAC,gBAAA,EAAe,OAAM,QAAO,MAAI,MAAC,UAAA,QAAA,CAElC,IAEA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,kBAAkB;AAAA,QAClB,UAAU;AAAA,MAAA;AAAA,IAAA,GAGhB,EAAA,CAEJ;AAAA,EAAA,GACF;AAEJ;"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Badge } from "reactstrap";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
const ClickableBadge = styled(Badge)`
|
|
4
|
+
cursor: pointer;
|
|
5
|
+
width: fit-content;
|
|
6
|
+
white-space: nowrap;
|
|
7
|
+
`;
|
|
8
|
+
const BadgeWrapper = styled.div`
|
|
9
|
+
display: inline-flex;
|
|
10
|
+
flex-wrap: nowrap;
|
|
11
|
+
gap: 10px;
|
|
12
|
+
padding: 0.5rem;
|
|
13
|
+
border-radius: 0.5rem;
|
|
14
|
+
background-color: #f1f1f1;
|
|
15
|
+
border: 1px solid #ccc;
|
|
16
|
+
margin-top: 2.8rem;
|
|
17
|
+
max-width: 120%;
|
|
18
|
+
overflow-x: auto;
|
|
19
|
+
`;
|
|
20
|
+
export {
|
|
21
|
+
BadgeWrapper,
|
|
22
|
+
ClickableBadge
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=styled-component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styled-component.js","sources":["../../../src/custom-input/multi-select/styled-component.js"],"sourcesContent":["import { Badge } from 'reactstrap';\r\nimport styled from 'styled-components';\r\n\r\nexport const ClickableBadge = styled(Badge)`\r\n cursor: pointer;\r\n width: fit-content;\r\n white-space: nowrap;\r\n`;\r\n\r\nexport const BadgeWrapper = styled.div`\r\n display: inline-flex;\r\n flex-wrap: nowrap;\r\n gap: 10px;\r\n padding: 0.5rem;\r\n border-radius: 0.5rem;\r\n background-color: #f1f1f1;\r\n border: 1px solid #ccc;\r\n margin-top: 2.8rem;\r\n max-width: 120%;\r\n overflow-x: auto;\r\n`;\r\n"],"names":[],"mappings":";;AAGY,MAAC,iBAAiB,OAAO,KAAK;AAAA;AAAA;AAAA;AAAA;AAM9B,MAAC,eAAe,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
.dzu-dropzone {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
align-items: center;
|
|
5
|
+
width: 100%;
|
|
6
|
+
min-height: 120px;
|
|
7
|
+
overflow: scroll;
|
|
8
|
+
margin: 0 auto;
|
|
9
|
+
position: relative;
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
transition: all .15s linear;
|
|
12
|
+
border: 2px solid #d9d9d9;
|
|
13
|
+
border-radius: 4px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.dzu-dropzoneActive {
|
|
17
|
+
background-color: #DEEBFF;
|
|
18
|
+
border-color: #2484FF;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.dzu-dropzoneDisabled {
|
|
22
|
+
opacity: 0.5;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.dzu-dropzoneDisabled *:hover {
|
|
26
|
+
cursor: unset;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.dzu-input {
|
|
30
|
+
display: none;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.dzu-inputLabel {
|
|
34
|
+
display: flex;
|
|
35
|
+
justify-content: center;
|
|
36
|
+
align-items: center;
|
|
37
|
+
position: absolute;
|
|
38
|
+
top: 0;
|
|
39
|
+
bottom: 0;
|
|
40
|
+
left: 0;
|
|
41
|
+
right: 0;
|
|
42
|
+
font-family: 'Helvetica', sans-serif;
|
|
43
|
+
font-size: 20px;
|
|
44
|
+
font-weight: 600;
|
|
45
|
+
color: #2484FF;
|
|
46
|
+
-moz-osx-font-smoothing: grayscale;
|
|
47
|
+
-webkit-font-smoothing: antialiased;
|
|
48
|
+
cursor: pointer;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.dzu-inputLabelWithFiles {
|
|
52
|
+
display: flex;
|
|
53
|
+
justify-content: center;
|
|
54
|
+
align-items: center;
|
|
55
|
+
align-self: flex-start;
|
|
56
|
+
padding: 0 14px;
|
|
57
|
+
min-height: 32px;
|
|
58
|
+
background-color: #E6E6E6;
|
|
59
|
+
color: #2484FF;
|
|
60
|
+
border: none;
|
|
61
|
+
font-family: 'Helvetica', sans-serif;
|
|
62
|
+
border-radius: 4px;
|
|
63
|
+
font-size: 14px;
|
|
64
|
+
font-weight: 600;
|
|
65
|
+
margin-top: 20px;
|
|
66
|
+
margin-left: 3%;
|
|
67
|
+
-moz-osx-font-smoothing: grayscale;
|
|
68
|
+
-webkit-font-smoothing: antialiased;
|
|
69
|
+
cursor: pointer;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.dzu-previewContainer {
|
|
73
|
+
padding: 40px 3%;
|
|
74
|
+
display: flex;
|
|
75
|
+
flex-direction: row;
|
|
76
|
+
align-items: center;
|
|
77
|
+
justify-content: space-between;
|
|
78
|
+
position: relative;
|
|
79
|
+
width: 100%;
|
|
80
|
+
min-height: 60px;
|
|
81
|
+
z-index: 1;
|
|
82
|
+
border-bottom: 1px solid #ECECEC;
|
|
83
|
+
box-sizing: border-box;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.dzu-previewStatusContainer {
|
|
87
|
+
display: flex;
|
|
88
|
+
align-items: center;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.dzu-previewFileName {
|
|
92
|
+
font-family: 'Helvetica', sans-serif;
|
|
93
|
+
font-size: 14px;
|
|
94
|
+
font-weight: 400;
|
|
95
|
+
color: #333333;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.dzu-previewImage {
|
|
99
|
+
width: auto;
|
|
100
|
+
max-height: 40px;
|
|
101
|
+
max-width: 140px;
|
|
102
|
+
border-radius: 4px;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.dzu-previewButton {
|
|
106
|
+
background-size: 14px 14px;
|
|
107
|
+
background-position: center;
|
|
108
|
+
background-repeat: no-repeat;
|
|
109
|
+
width: 14px;
|
|
110
|
+
height: 14px;
|
|
111
|
+
cursor: pointer;
|
|
112
|
+
opacity: 0.9;
|
|
113
|
+
margin: 0 0 2px 10px;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.dzu-submitButtonContainer {
|
|
117
|
+
margin: 24px 0;
|
|
118
|
+
z-index: 1;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.dzu-submitButton {
|
|
122
|
+
padding: 0 14px;
|
|
123
|
+
min-height: 32px;
|
|
124
|
+
background-color: #2484FF;
|
|
125
|
+
border: none;
|
|
126
|
+
border-radius: 4px;
|
|
127
|
+
font-family: 'Helvetica', sans-serif;
|
|
128
|
+
font-size: 14px;
|
|
129
|
+
font-weight: 600;
|
|
130
|
+
color: #FFF;
|
|
131
|
+
-moz-osx-font-smoothing: grayscale;
|
|
132
|
+
-webkit-font-smoothing: antialiased;
|
|
133
|
+
cursor: pointer;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.dzu-submitButton:disabled {
|
|
137
|
+
background-color: #E6E6E6;
|
|
138
|
+
color: #333333;
|
|
139
|
+
cursor: unset;
|
|
140
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
.dropzone-upload-button{
|
|
2
|
+
padding: 25;
|
|
3
|
+
border-radius: 5px !important;
|
|
4
|
+
cursor: pointer;
|
|
5
|
+
color: #fff;
|
|
6
|
+
width: 10rem !important;
|
|
7
|
+
height: 2rem !important;
|
|
8
|
+
line-height: 1.5 !important;
|
|
9
|
+
font-size: 13px;
|
|
10
|
+
text-align: center;
|
|
11
|
+
vertical-align: middle !important;
|
|
12
|
+
border: none;
|
|
13
|
+
padding-top: 0.5rem;
|
|
14
|
+
margin-top: 0.5rem;
|
|
15
|
+
background-color: #af251b;
|
|
16
|
+
&:hover {
|
|
17
|
+
background-color: rgb(108, 31, 1);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
.dropzone-upload-frame{
|
|
21
|
+
border: 0px !important;
|
|
22
|
+
overflow: 'none' !important;
|
|
23
|
+
}
|
|
24
|
+
.dropzone-upload-previewContainer {
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: row;
|
|
27
|
+
align-items: center;
|
|
28
|
+
justify-content: space-between;
|
|
29
|
+
position: relative;
|
|
30
|
+
width: 100px;
|
|
31
|
+
min-height: 60px;
|
|
32
|
+
z-index: 1;
|
|
33
|
+
border-bottom: 1px solid #ECECEC;
|
|
34
|
+
box-sizing: border-box;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.dropzone-upload-previewImage {
|
|
38
|
+
width: 60rem;
|
|
39
|
+
max-height: 60px;
|
|
40
|
+
max-width: 10rem;
|
|
41
|
+
border-radius: 4px;
|
|
42
|
+
padding-right: 1rem;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.dropzone-upload-delete-btn {
|
|
46
|
+
width: 2rem;
|
|
47
|
+
line-height: 1.5;
|
|
48
|
+
border : 0;
|
|
49
|
+
color: #ff0000;
|
|
50
|
+
background-color: #f8f8f8;
|
|
51
|
+
padding-right:1rem;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.dropzone-upload-file-name-container {
|
|
55
|
+
position: relative;
|
|
56
|
+
display: inline-block;
|
|
57
|
+
max-width: 150px; /* Ajusta este valor para aumentar el ancho */
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.dropzone-upload-file-name {
|
|
61
|
+
padding-right: 1rem;
|
|
62
|
+
white-space: nowrap;
|
|
63
|
+
overflow: hidden;
|
|
64
|
+
text-overflow: ellipsis;
|
|
65
|
+
max-width: 150px; /* Ajusta este valor para aumentar el ancho */
|
|
66
|
+
}
|