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