contentoh-components-library 21.6.24 → 21.6.26
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/components/molecules/SingleSelect/index.js +198 -0
- package/dist/components/molecules/SingleSelect/styles.js +74 -0
- package/dist/components/organisms/LinkVariantsModal/index.js +193 -154
- package/dist/components/organisms/LinkVariantsModal/styles.js +26 -16
- package/dist/components/pages/ProviderProductEdition/styles.js +4 -1
- package/dist/index.js +43 -30
- package/package.json +1 -1
- package/src/components/molecules/SingleSelect/index.js +183 -0
- package/src/components/molecules/SingleSelect/styles.js +132 -0
- package/src/components/organisms/LinkVariantsModal/index.js +224 -143
- package/src/components/organisms/LinkVariantsModal/styles.js +71 -67
- package/src/components/pages/ProviderProductEdition/styles.js +6 -3
- package/src/index.js +1 -0
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import "../../../global-files/global-styles.css";
|
|
3
|
+
import { GlobalColors, FontFamily } from "../../../global-files/variables";
|
|
4
|
+
|
|
5
|
+
const PINK = "#E13AA8";
|
|
6
|
+
|
|
7
|
+
export const SelectWrapper = styled.div`
|
|
8
|
+
position: relative;
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
flex: 1 1 0;
|
|
12
|
+
min-width: 0;
|
|
13
|
+
font-family: ${FontFamily.Raleway};
|
|
14
|
+
font-size: 13px;
|
|
15
|
+
user-select: none;
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
`;
|
|
18
|
+
|
|
19
|
+
export const SelectBase = styled.div`
|
|
20
|
+
position: relative;
|
|
21
|
+
width: 100%;
|
|
22
|
+
min-width: 0;
|
|
23
|
+
border-radius: 5px 5px 0 0;
|
|
24
|
+
border-bottom: 1px solid rgba(225, 58, 168, 0.5);
|
|
25
|
+
color: ${GlobalColors.deep_gray};
|
|
26
|
+
display: flex;
|
|
27
|
+
gap: 8px;
|
|
28
|
+
align-items: center;
|
|
29
|
+
white-space: nowrap;
|
|
30
|
+
overflow-x: hidden;
|
|
31
|
+
padding: 0;
|
|
32
|
+
|
|
33
|
+
cursor: ${({ disabled }) => (disabled ? "not-allowed" : "pointer")};
|
|
34
|
+
opacity: ${({ disabled }) => (disabled ? 0.5 : 1)};
|
|
35
|
+
pointer-events: ${({ disabled }) => (disabled ? "none" : "auto")};
|
|
36
|
+
|
|
37
|
+
> div {
|
|
38
|
+
position: relative;
|
|
39
|
+
width: 100%;
|
|
40
|
+
height: 100%;
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
min-width: 0;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
> div > input {
|
|
47
|
+
width: 100%;
|
|
48
|
+
min-width: 0;
|
|
49
|
+
border: none;
|
|
50
|
+
outline: none;
|
|
51
|
+
padding: 9px 22px 9px 10px;
|
|
52
|
+
border-radius: 5px 5px 0 0;
|
|
53
|
+
font-family: ${FontFamily.Raleway};
|
|
54
|
+
font-size: 13px;
|
|
55
|
+
color: ${GlobalColors.deep_gray};
|
|
56
|
+
background: none;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
> div > input::placeholder {
|
|
60
|
+
color: ${GlobalColors.gray};
|
|
61
|
+
}
|
|
62
|
+
`;
|
|
63
|
+
|
|
64
|
+
export const SelectedOptionItem = styled.div`
|
|
65
|
+
position: relative;
|
|
66
|
+
max-width: 60%;
|
|
67
|
+
display: flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
border-radius: 5px;
|
|
70
|
+
padding: 5px 8px;
|
|
71
|
+
background-color: rgba(225, 58, 168, 0.06);
|
|
72
|
+
color: ${GlobalColors.gray};
|
|
73
|
+
font-size: 12px;
|
|
74
|
+
|
|
75
|
+
> p {
|
|
76
|
+
width: 100%;
|
|
77
|
+
margin: 0;
|
|
78
|
+
overflow: hidden;
|
|
79
|
+
text-overflow: ellipsis;
|
|
80
|
+
}
|
|
81
|
+
`;
|
|
82
|
+
|
|
83
|
+
/*
|
|
84
|
+
Flecha dibujada, no un icono de fuente. El componente original usaba
|
|
85
|
+
material-symbols-outlined, que la aplicación carga y esta librería no: aquí
|
|
86
|
+
habría salido la palabra "arrow_drop_down" escrita donde debería ir el triángulo.
|
|
87
|
+
*/
|
|
88
|
+
export const Arrow = styled.span`
|
|
89
|
+
position: absolute;
|
|
90
|
+
right: 6px;
|
|
91
|
+
pointer-events: none;
|
|
92
|
+
color: ${PINK};
|
|
93
|
+
font-size: 10px;
|
|
94
|
+
line-height: 1;
|
|
95
|
+
`;
|
|
96
|
+
|
|
97
|
+
export const Options = styled.ul`
|
|
98
|
+
position: absolute;
|
|
99
|
+
top: 100%;
|
|
100
|
+
left: 0;
|
|
101
|
+
width: 100%;
|
|
102
|
+
max-height: 180px;
|
|
103
|
+
overflow-y: auto;
|
|
104
|
+
background-color: ${GlobalColors.white};
|
|
105
|
+
border-radius: 8px;
|
|
106
|
+
border: 1px solid ${GlobalColors.s2};
|
|
107
|
+
box-shadow: 0 4px 8px rgb(0 0 0 / 18%);
|
|
108
|
+
margin: 0;
|
|
109
|
+
padding: 0;
|
|
110
|
+
list-style: none;
|
|
111
|
+
display: ${({ open }) => (open ? "block" : "none")};
|
|
112
|
+
z-index: 1000;
|
|
113
|
+
`;
|
|
114
|
+
|
|
115
|
+
export const OptionItem = styled.li`
|
|
116
|
+
padding: 9px 12px;
|
|
117
|
+
cursor: pointer;
|
|
118
|
+
font-size: 12px;
|
|
119
|
+
white-space: normal;
|
|
120
|
+
background-color: ${({ selected }) => (selected ? PINK : GlobalColors.white)};
|
|
121
|
+
color: ${({ selected }) => (selected ? GlobalColors.white : GlobalColors.gray)};
|
|
122
|
+
|
|
123
|
+
&.first {
|
|
124
|
+
background-color: ${({ selected }) =>
|
|
125
|
+
selected ? PINK : "rgba(225, 58, 168, 0.1)"};
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
&:hover {
|
|
129
|
+
background-color: ${({ selected }) =>
|
|
130
|
+
selected ? PINK : "rgba(225, 58, 168, 0.06)"};
|
|
131
|
+
}
|
|
132
|
+
`;
|