codecheck
158 строк · 3.2 Кб
1@use "sass:math";
2
3// core
4.p-treeselect {
5display: inline-flex;
6cursor: pointer;
7user-select: none;
8}
9
10.p-treeselect-trigger {
11display: flex;
12align-items: center;
13justify-content: center;
14flex-shrink: 0;
15}
16
17.p-treeselect-label-container {
18overflow: hidden;
19flex: 1 1 auto;
20cursor: pointer;
21}
22
23.p-treeselect-label {
24display: block;
25white-space: nowrap;
26cursor: pointer;
27overflow: hidden;
28text-overflow: ellipsis;
29}
30
31.p-treeselect-label-empty {
32overflow: hidden;
33visibility: hidden;
34}
35
36.p-treeselect-token {
37cursor: default;
38display: inline-flex;
39align-items: center;
40flex: 0 0 auto;
41}
42
43.p-treeselect .p-treeselect-panel {
44min-width: 100%;
45}
46
47.p-treeselect-items-wrapper {
48overflow: auto;
49}
50
51.p-fluid .p-treeselect {
52display: flex;
53}
54
55// theme
56.p-treeselect {
57background: $inputBg;
58border: $inputBorder;
59transition: $formElementTransition;
60border-radius: $borderRadius;
61outline-color: transparent;
62
63&:not(.p-disabled):hover {
64border-color: $inputHoverBorderColor;
65}
66
67&:not(.p-disabled).p-focus {
68@include focused-input();
69}
70
71&.p-variant-filled {
72background: $inputFilledBg;
73
74&:not(.p-disabled):hover {
75background-color: $inputFilledHoverBg;
76}
77
78&:not(.p-disabled).p-focus {
79background-color: $inputFilledFocusBg;
80}
81}
82
83.p-treeselect-label {
84padding: $inputPadding;
85transition: $formElementTransition;
86
87&.p-placeholder {
88color: $inputPlaceholderTextColor;
89}
90}
91
92&.p-treeselect-chip {
93.p-treeselect-token {
94padding: math.div(nth($inputPadding, 1), 2) nth($inputPadding, 2);
95margin-right: $inlineSpacing;
96background: $chipBg;
97color: $chipTextColor;
98border-radius: $chipBorderRadius;
99}
100}
101
102.p-treeselect-trigger {
103background: transparent;
104color: $inputIconColor;
105width: $inputGroupAddOnMinWidth;
106border-top-right-radius: $borderRadius;
107border-bottom-right-radius: $borderRadius;
108}
109
110&.p-invalid.p-component {
111@include invalid-input();
112}
113}
114
115.p-inputwrapper-filled {
116&.p-treeselect {
117&.p-treeselect-chip {
118.p-treeselect-label {
119padding: math.div(nth($inputPadding, 1), 2)
120nth($inputPadding, 2);
121}
122}
123}
124}
125
126.p-treeselect-panel {
127background: $inputOverlayBg;
128color: $inputListTextColor;
129border: $inputOverlayBorder;
130border-radius: $borderRadius;
131box-shadow: $inputOverlayShadow;
132
133.p-treeselect-items-wrapper {
134.p-tree {
135border: 0 none;
136}
137
138.p-treeselect-empty-message {
139padding: $inputListItemPadding;
140color: $inputListItemTextColor;
141background: $inputListItemBg;
142}
143}
144}
145
146.p-input-filled {
147.p-treeselect {
148background: $inputFilledBg;
149
150&:not(.p-disabled):hover {
151background-color: $inputFilledHoverBg;
152}
153
154&:not(.p-disabled).p-focus {
155background-color: $inputFilledFocusBg;
156}
157}
158}
159