code7-leia 0.1.147 → 0.1.149
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/code7-leia.cjs.development.js +39 -30
- package/dist/code7-leia.cjs.development.js.map +1 -1
- package/dist/code7-leia.cjs.production.min.js +1 -1
- package/dist/code7-leia.cjs.production.min.js.map +1 -1
- package/dist/code7-leia.esm.js +39 -30
- package/dist/code7-leia.esm.js.map +1 -1
- package/dist/components/Select/index.d.ts +2 -2
- package/package.json +1 -1
- package/src/components/FileArea/components/Search/styles.tsx +2 -2
- package/src/components/MultiSelect/styles.tsx +3 -3
- package/src/components/Select/index.tsx +24 -16
- package/src/components/Select/styles.tsx +31 -18
- package/src/components/TestArea/components/InputTest/styles.tsx +2 -2
- package/src/components/TestArea/styles.tsx +1 -1
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@ export const Input = styled.input`
|
|
|
9
9
|
padding-left: 40px;
|
|
10
10
|
border-radius: 5px;
|
|
11
11
|
border: 1px solid #ccc;
|
|
12
|
-
height:
|
|
12
|
+
height: 45px;
|
|
13
13
|
width: 100%;
|
|
14
14
|
|
|
15
15
|
&:focus {
|
|
@@ -20,7 +20,7 @@ export const Input = styled.input`
|
|
|
20
20
|
|
|
21
21
|
export const IconContainer = styled.div`
|
|
22
22
|
position: absolute;
|
|
23
|
-
top:
|
|
23
|
+
top: 14px;
|
|
24
24
|
left: 10px;
|
|
25
25
|
pointer-events: none;
|
|
26
26
|
`;
|
|
@@ -2,7 +2,7 @@ import styled from 'styled-components';
|
|
|
2
2
|
|
|
3
3
|
export const MultiSelectWrapper = styled.div`
|
|
4
4
|
width: 100%;
|
|
5
|
-
height:
|
|
5
|
+
height: 45px;
|
|
6
6
|
`;
|
|
7
7
|
|
|
8
8
|
export const SelectBox = styled.div`
|
|
@@ -11,7 +11,7 @@ export const SelectBox = styled.div`
|
|
|
11
11
|
select {
|
|
12
12
|
width: 100%;
|
|
13
13
|
font-weight: bold;
|
|
14
|
-
height:
|
|
14
|
+
height: 45px;
|
|
15
15
|
border-radius: 4px;
|
|
16
16
|
}
|
|
17
17
|
`;
|
|
@@ -44,7 +44,7 @@ export const Checkboxes = styled.div`
|
|
|
44
44
|
z-index: 10;
|
|
45
45
|
|
|
46
46
|
label {
|
|
47
|
-
padding: 10px
|
|
47
|
+
padding: 10px 5px;
|
|
48
48
|
}
|
|
49
49
|
`;
|
|
50
50
|
|
|
@@ -12,29 +12,37 @@ interface SelectProps {
|
|
|
12
12
|
placeholder?: string;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
const
|
|
15
|
+
const CustomSelect: React.FC<SelectProps> = ({ options, onSelect, placeholder }) => {
|
|
16
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
16
17
|
const [selectedValue, setSelectedValue] = useState<string | number>('');
|
|
17
18
|
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
setSelectedValue(
|
|
21
|
-
onSelect(
|
|
19
|
+
const handleSelectOption = (value: string | number) => {
|
|
20
|
+
const selected = String(value); // Convertendo para string
|
|
21
|
+
setSelectedValue(selected);
|
|
22
|
+
onSelect(selected);
|
|
23
|
+
setIsOpen(false);
|
|
22
24
|
};
|
|
23
25
|
|
|
24
26
|
return (
|
|
25
27
|
<S.Container>
|
|
26
|
-
<select
|
|
27
|
-
<
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
28
|
+
<div className="custom-select" onClick={() => setIsOpen(!isOpen)}>
|
|
29
|
+
<div className="selected-option">{selectedValue || placeholder}</div>
|
|
30
|
+
{isOpen && (
|
|
31
|
+
<div className="options">
|
|
32
|
+
{options.map(option => (
|
|
33
|
+
<div
|
|
34
|
+
key={option.value}
|
|
35
|
+
className="option"
|
|
36
|
+
onClick={() => handleSelectOption(option.value)}
|
|
37
|
+
>
|
|
38
|
+
{option.label}
|
|
39
|
+
</div>
|
|
40
|
+
))}
|
|
41
|
+
</div>
|
|
42
|
+
)}
|
|
43
|
+
</div>
|
|
36
44
|
</S.Container>
|
|
37
45
|
);
|
|
38
46
|
};
|
|
39
47
|
|
|
40
|
-
export default
|
|
48
|
+
export default CustomSelect;
|
|
@@ -4,28 +4,41 @@ export const Container = styled.div`
|
|
|
4
4
|
position: relative;
|
|
5
5
|
width: 50%;
|
|
6
6
|
margin-right: 5px;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
border: 1px solid #979AA5;
|
|
7
|
+
|
|
8
|
+
.custom-select {
|
|
9
|
+
position: relative;
|
|
11
10
|
width: 100%;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
&:focus {
|
|
15
|
-
outline: none;
|
|
16
|
-
box-shadow: 0 0 0 3px #6690ff;
|
|
17
|
-
}
|
|
11
|
+
cursor: pointer;
|
|
18
12
|
|
|
19
|
-
option {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
13
|
+
.selected-option {
|
|
14
|
+
padding: 12px;
|
|
15
|
+
border-radius: 4px;
|
|
16
|
+
border: 1px solid #979AA5;
|
|
17
|
+
height: 45px;
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
justify-content: space-between;
|
|
23
21
|
}
|
|
24
22
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
.options {
|
|
24
|
+
position: absolute;
|
|
25
|
+
top: 100%;
|
|
26
|
+
left: 0;
|
|
27
|
+
width: 100%;
|
|
28
|
+
border: 1px solid #979AA5;
|
|
29
|
+
border-top: none;
|
|
30
|
+
border-radius: 0 0 4px 4px;
|
|
31
|
+
background-color: #fff;
|
|
32
|
+
|
|
33
|
+
.option {
|
|
34
|
+
padding: 12px;
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
transition: background-color 0.3s;
|
|
37
|
+
|
|
38
|
+
&:hover {
|
|
39
|
+
background-color: #f0f0f0;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
29
42
|
}
|
|
30
43
|
}
|
|
31
44
|
`;
|
|
@@ -12,7 +12,7 @@ export const StyledInput = styled.input`
|
|
|
12
12
|
padding-right: 40px;
|
|
13
13
|
border-radius: 5px;
|
|
14
14
|
border: 1px solid #ccc;
|
|
15
|
-
height:
|
|
15
|
+
height: 45px;
|
|
16
16
|
width: 100%;
|
|
17
17
|
|
|
18
18
|
&:focus {
|
|
@@ -23,7 +23,7 @@ export const StyledInput = styled.input`
|
|
|
23
23
|
|
|
24
24
|
export const RecordAudioButton = styled.div`
|
|
25
25
|
position: absolute;
|
|
26
|
-
top:
|
|
26
|
+
top: 14px;
|
|
27
27
|
right: 10px;
|
|
28
28
|
cursor: pointer;
|
|
29
29
|
`;
|