codecheck
408 строк · 8.8 Кб
1// core
2.p-calendar {
3display: inline-flex;
4max-width: 100%;
5}
6
7.p-calendar .p-inputtext {
8flex: 1 1 auto;
9width: 1%;
10}
11
12.p-calendar-w-btn .p-inputtext {
13border-top-right-radius: 0;
14border-bottom-right-radius: 0;
15}
16
17.p-calendar-w-btn .p-datepicker-trigger {
18border-top-left-radius: 0;
19border-bottom-left-radius: 0;
20}
21
22.p-calendar .p-datepicker-trigger-icon {
23cursor: pointer;
24}
25
26/* Fluid */
27.p-fluid .p-calendar {
28display: flex;
29}
30
31.p-fluid .p-calendar .p-inputtext {
32width: 1%;
33}
34
35/* Datepicker */
36.p-calendar .p-datepicker {
37min-width: 100%;
38}
39
40.p-datepicker {
41width: auto;
42}
43
44.p-datepicker-inline {
45display: inline-block;
46overflow-x: auto;
47}
48
49/* Header */
50.p-datepicker-header {
51display: flex;
52align-items: center;
53justify-content: space-between;
54}
55
56.p-datepicker-header .p-datepicker-title {
57margin: 0 auto;
58}
59
60.p-datepicker-prev,
61.p-datepicker-next {
62cursor: pointer;
63display: inline-flex;
64justify-content: center;
65align-items: center;
66overflow: hidden;
67position: relative;
68}
69
70/* Multiple Month DatePicker */
71.p-datepicker-multiple-month .p-datepicker-group-container {
72display: flex;
73}
74
75.p-datepicker-multiple-month .p-datepicker-group-container .p-datepicker-group {
76flex: 1 1 auto;
77}
78
79/* DatePicker Table */
80.p-datepicker table {
81width: 100%;
82border-collapse: collapse;
83}
84
85.p-datepicker td > span {
86display: flex;
87justify-content: center;
88align-items: center;
89cursor: pointer;
90margin: 0 auto;
91overflow: hidden;
92position: relative;
93}
94
95/* Month Picker */
96.p-monthpicker-month {
97width: 33.3%;
98display: inline-flex;
99align-items: center;
100justify-content: center;
101cursor: pointer;
102overflow: hidden;
103position: relative;
104}
105
106/* Year Picker */
107.p-yearpicker-year {
108width: 50%;
109display: inline-flex;
110align-items: center;
111justify-content: center;
112cursor: pointer;
113overflow: hidden;
114position: relative;
115}
116
117/* Button Bar */
118.p-datepicker-buttonbar {
119display: flex;
120justify-content: space-between;
121align-items: center;
122}
123
124/* Time Picker */
125.p-timepicker {
126display: flex;
127justify-content: center;
128align-items: center;
129}
130
131.p-timepicker button {
132display: flex;
133align-items: center;
134justify-content: center;
135cursor: pointer;
136overflow: hidden;
137position: relative;
138}
139
140.p-timepicker > div {
141display: flex;
142align-items: center;
143flex-direction: column;
144}
145
146/* Touch UI */
147.p-datepicker-touch-ui,
148.p-calendar .p-datepicker-touch-ui {
149min-width: 80vw;
150}
151
152// theme
153.p-calendar {
154&.p-invalid.p-component > .p-inputtext {
155@include invalid-input();
156}
157
158&:not(.p-calendar-disabled).p-focus > .p-inputtext {
159@include focused-input();
160}
161}
162
163.p-datepicker {
164padding: $calendarPadding;
165background: $calendarInlineBg;
166color: $calendarTextColor;
167border: $calendarBorder;
168border-radius: $borderRadius;
169
170&:not(.p-datepicker-inline) {
171background: $calendarBg;
172border: $calendarOverlayBorder;
173box-shadow: $inputOverlayShadow;
174
175.p-datepicker-header {
176background: $calendarHeaderBg;
177}
178}
179
180.p-datepicker-header {
181padding: $calendarHeaderPadding;
182color: $calendarHeaderTextColor;
183background: $calendarInlineHeaderBg;
184font-weight: $calendarHeaderFontWeight;
185margin: $inputListHeaderMargin;
186border-bottom: $calendarHeaderBorder;
187border-top-right-radius: $borderRadius;
188border-top-left-radius: $borderRadius;
189
190.p-datepicker-prev,
191.p-datepicker-next {
192@include action-icon();
193}
194
195.p-datepicker-title {
196line-height: $actionIconHeight;
197
198.p-datepicker-year,
199.p-datepicker-month {
200color: $calendarHeaderTextColor;
201transition: $actionIconTransition;
202font-weight: $calendarHeaderFontWeight;
203padding: $calendarHeaderCellPadding;
204
205&:enabled:hover {
206color: $calendarMonthYearHeaderHoverTextColor;
207}
208}
209
210.p-datepicker-month {
211margin-right: $inlineSpacing;
212}
213}
214}
215
216table {
217font-size: $fontSize;
218margin: $calendarTableMargin;
219
220th {
221padding: $calendarHeaderCellPadding;
222
223> span {
224width: $calendarCellDateWidth;
225height: $calendarCellDateHeight;
226}
227}
228
229td {
230padding: $calendarCellDatePadding;
231
232> span {
233width: $calendarCellDateWidth;
234height: $calendarCellDateHeight;
235border-radius: $calendarCellDateBorderRadius;
236transition: $listItemTransition;
237border: $calendarCellDateBorder;
238outline-color: transparent;
239
240&.p-highlight {
241color: $highlightTextColor;
242background: $highlightBg;
243}
244
245&:focus {
246@include focused();
247}
248}
249
250&.p-datepicker-today {
251> span {
252background: $calendarCellDateTodayBg;
253color: $calendarCellDateTodayTextColor;
254border-color: $calendarCellDateTodayBorderColor;
255
256&.p-highlight {
257color: $highlightTextColor;
258background: $highlightBg;
259}
260}
261}
262}
263}
264
265.p-datepicker-buttonbar {
266padding: $calendarButtonBarPadding;
267border-top: $divider;
268
269.p-button {
270width: auto;
271}
272}
273
274.p-timepicker {
275border-top: $divider;
276padding: $calendarTimePickerPadding;
277
278button {
279@include action-icon();
280
281&:last-child {
282margin-top: 0.2em;
283}
284}
285
286span {
287font-size: $calendarTimePickerTimeFontSize;
288}
289
290> div {
291padding: $calendarTimePickerElementPadding;
292}
293}
294
295&.p-datepicker-timeonly {
296.p-timepicker {
297border-top: 0 none;
298}
299}
300
301.p-monthpicker {
302margin: $calendarTableMargin;
303
304.p-monthpicker-month {
305padding: $calendarCellDatePadding;
306transition: $listItemTransition;
307border-radius: $borderRadius;
308
309&.p-highlight {
310color: $highlightTextColor;
311background: $highlightBg;
312}
313}
314}
315
316.p-yearpicker {
317margin: $calendarTableMargin;
318
319.p-yearpicker-year {
320padding: $calendarCellDatePadding;
321transition: $listItemTransition;
322border-radius: $borderRadius;
323
324&.p-highlight {
325color: $highlightTextColor;
326background: $highlightBg;
327}
328}
329}
330
331&.p-datepicker-multiple-month {
332.p-datepicker-group {
333border-left: $divider;
334padding-right: $calendarPadding;
335padding-left: $calendarPadding;
336padding-top: 0;
337padding-bottom: 0;
338
339&:first-child {
340padding-left: 0;
341border-left: 0 none;
342}
343
344&:last-child {
345padding-right: 0;
346}
347}
348}
349
350&.p-datepicker-mobile {
351table {
352th,
353td {
354padding: $calendarCellDatePaddingSM;
355}
356}
357}
358
359&:not(.p-disabled) {
360table {
361td {
362span:not(.p-highlight):not(.p-disabled) {
363outline-color: transparent;
364
365&:hover {
366background: $calendarCellDateHoverBg;
367}
368
369&:focus {
370@include focused();
371}
372}
373}
374}
375
376.p-monthpicker {
377.p-monthpicker-month {
378&:not(.p-disabled) {
379outline-color: transparent;
380
381&:not(.p-highlight):hover {
382background: $calendarCellDateHoverBg;
383}
384
385&:focus {
386@include focused();
387}
388}
389}
390}
391
392.p-yearpicker {
393.p-yearpicker-year {
394&:not(.p-disabled) {
395outline-color: transparent;
396
397&:not(.p-highlight):hover {
398background: $calendarCellDateHoverBg;
399}
400
401&:focus {
402@include focused();
403}
404}
405}
406}
407}
408}
409