codecheck
252 строки · 5.3 Кб
1// core
2.p-dropdown {
3display: inline-flex;
4cursor: pointer;
5position: relative;
6user-select: none;
7}
8
9.p-dropdown-clear-icon {
10position: absolute;
11top: 50%;
12margin-top: -0.5rem;
13}
14
15.p-dropdown-trigger {
16display: flex;
17align-items: center;
18justify-content: center;
19flex-shrink: 0;
20}
21
22.p-dropdown-label {
23display: block;
24white-space: nowrap;
25overflow: hidden;
26flex: 1 1 auto;
27width: 1%;
28text-overflow: ellipsis;
29cursor: pointer;
30}
31
32.p-dropdown-label-empty {
33overflow: hidden;
34opacity: 0;
35}
36
37input.p-dropdown-label {
38cursor: default;
39}
40
41.p-dropdown .p-dropdown-panel {
42min-width: 100%;
43}
44
45.p-dropdown-panel {
46position: absolute;
47top: 0;
48left: 0;
49}
50
51.p-dropdown-items-wrapper {
52overflow: auto;
53}
54
55.p-dropdown-item {
56cursor: pointer;
57font-weight: normal;
58white-space: nowrap;
59position: relative;
60overflow: hidden;
61display: flex;
62align-items: center;
63}
64
65.p-dropdown-item-group {
66cursor: auto;
67}
68
69.p-dropdown-items {
70margin: 0;
71padding: 0;
72list-style-type: none;
73}
74
75.p-dropdown-filter {
76width: 100%;
77}
78
79.p-dropdown-filter-container {
80position: relative;
81}
82
83.p-dropdown-filter-icon {
84position: absolute;
85top: 50%;
86margin-top: -0.5rem;
87}
88
89.p-fluid .p-dropdown {
90display: flex;
91}
92
93.p-fluid .p-dropdown .p-dropdown-label {
94width: 1%;
95}
96
97// theme
98.p-dropdown {
99background: $inputBg;
100border: $inputBorder;
101transition: $formElementTransition;
102border-radius: $borderRadius;
103outline-color: transparent;
104
105&:not(.p-disabled):hover {
106border-color: $inputHoverBorderColor;
107}
108
109&:not(.p-disabled).p-focus {
110@include focused-input();
111}
112
113&.p-variant-filled {
114background: $inputFilledBg;
115
116&:not(.p-disabled):hover {
117background-color: $inputFilledHoverBg;
118}
119
120&:not(.p-disabled).p-focus {
121background-color: $inputFilledFocusBg;
122
123.p-inputtext {
124background-color: transparent;
125}
126}
127}
128
129&.p-dropdown-clearable {
130.p-dropdown-label {
131padding-right: nth($inputPadding, 2) + $primeIconFontSize;
132}
133}
134
135.p-dropdown-label {
136background: transparent;
137border: 0 none;
138
139&.p-placeholder {
140color: $inputPlaceholderTextColor;
141}
142
143&:focus,
144&:enabled:focus {
145outline: 0 none;
146box-shadow: none;
147}
148}
149
150.p-dropdown-trigger {
151background: transparent;
152color: $inputIconColor;
153width: $inputGroupAddOnMinWidth;
154border-top-right-radius: $borderRadius;
155border-bottom-right-radius: $borderRadius;
156}
157
158.p-dropdown-clear-icon {
159color: $inputIconColor;
160right: $inputGroupAddOnMinWidth;
161}
162
163&.p-invalid.p-component {
164@include invalid-input();
165}
166}
167
168.p-dropdown-panel {
169background: $inputOverlayBg;
170color: $inputListTextColor;
171border: $inputOverlayBorder;
172border-radius: $borderRadius;
173box-shadow: $inputOverlayShadow;
174
175.p-dropdown-header {
176padding: $inputListHeaderPadding;
177border-bottom: $inputListHeaderBorder;
178color: $inputListHeaderTextColor;
179background: $inputOverlayHeaderBg;
180margin: $inputListHeaderMargin;
181border-top-right-radius: $borderRadius;
182border-top-left-radius: $borderRadius;
183
184.p-dropdown-filter {
185padding-right: nth($inputPadding, 2) + $primeIconFontSize;
186margin-right: -1 * (nth($inputPadding, 2) + $primeIconFontSize);
187}
188
189.p-dropdown-filter-icon {
190right: nth($inputPadding, 2);
191color: $inputIconColor;
192}
193}
194
195.p-dropdown-items {
196padding: $inputListPadding;
197
198.p-dropdown-item {
199margin: $inputListItemMargin;
200padding: $inputListItemPadding;
201border: $inputListItemBorder;
202color: $inputListItemTextColor;
203background: $inputListItemBg;
204transition: $listItemTransition;
205border-radius: $inputListItemBorderRadius;
206
207&:first-child {
208margin-top: 0;
209}
210
211&:last-child {
212margin-bottom: 0;
213}
214
215&.p-highlight {
216color: $highlightTextColor;
217background: $highlightBg;
218
219&.p-focus {
220background: $highlightFocusBg;
221}
222}
223
224&:not(.p-highlight):not(.p-disabled) {
225&.p-focus {
226color: $inputListItemTextHoverColor;
227background: $inputListItemHoverBg;
228}
229}
230
231.p-dropdown-check-icon {
232position: relative;
233margin-left: -1 * $inlineSpacing;
234margin-right: $inlineSpacing;
235}
236}
237
238.p-dropdown-item-group {
239margin: $submenuHeaderMargin;
240padding: $submenuHeaderPadding;
241color: $submenuHeaderTextColor;
242background: $submenuHeaderBg;
243font-weight: $submenuHeaderFontWeight;
244}
245
246.p-dropdown-empty-message {
247padding: $inputListItemPadding;
248color: $inputListItemTextColor;
249background: $inputListItemBg;
250}
251}
252}
253