@wangxinowo/vue-datepicker-next 1.0.3 → 1.0.5

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.
@@ -1,507 +1,515 @@
1
- @input-box-height: 34px;
2
-
3
- // Range picker input wrapper with Active Bar
4
- // 统一样式:使用与基础 DatePicker 相同的 input 变量
5
- .@{calendar-prefix-cls}-range-picker-input-wrapper {
6
- position: relative;
7
- display: inline-flex;
8
- align-items: center;
9
- width: 100%;
10
- min-width: 280px;
11
- height: @input-height-base;
12
- // 使用与 .input() mixin 相同的 padding
13
- padding: @input-padding-vertical-base @input-padding-horizontal-base;
14
- // 为图标和清除按钮预留空间
15
- padding-right: @input-padding-horizontal-base + 30px;
16
- color: @input-color;
17
- font-size: @font-size-base;
18
- line-height: @line-height-base;
19
- background-color: @input-bg;
20
- background-image: none;
21
- border: @border-width-base @border-style-base @input-border-color;
22
- border-radius: @border-radius-base;
23
- transition: all 0.3s;
24
-
25
- &:hover {
26
- border-color: @input-hover-border-color;
27
- }
28
-
29
- // 聚焦状态
30
- .@{calendar-prefix-cls}-picker-focused &,
31
- .@{calendar-prefix-cls}-picker:focus-within & {
32
- border-color: @primary-color;
33
- box-shadow: @input-outline-offset @outline-blur-size @outline-width fade(@primary-color, 20%);
34
- outline: 0;
35
- }
36
-
37
- // 无边框模式
38
- .@{calendar-prefix-cls}-picker-borderless & {
39
- background-color: transparent;
40
- border: none;
41
- box-shadow: none;
42
- padding-right: @input-padding-horizontal-base;
43
- }
44
-
45
- // 禁用状态
46
- &[disabled],
47
- .@{calendar-prefix-cls}-picker-disabled & {
48
- color: @disabled-color;
49
- background-color: @input-disabled-bg;
50
- border-color: @input-border-color;
51
- cursor: not-allowed;
52
- opacity: 1;
53
- }
54
-
55
- // Error 状态
56
- .@{calendar-prefix-cls}-picker-status-error & {
57
- border-color: @error-color;
58
-
59
- &:hover {
60
- border-color: @error-color;
61
- }
62
- }
63
-
64
- .@{calendar-prefix-cls}-picker-status-error.@{calendar-prefix-cls}-picker-focused &,
65
- .@{calendar-prefix-cls}-picker-status-error:focus-within & {
66
- border-color: @error-color;
67
- box-shadow: @input-outline-offset @outline-blur-size @outline-width fade(@error-color, 20%);
68
- }
69
-
70
- // Warning 状态
71
- .@{calendar-prefix-cls}-picker-status-warning & {
72
- border-color: @warning-color;
73
-
74
- &:hover {
75
- border-color: @warning-color;
76
- }
77
- }
78
-
79
- .@{calendar-prefix-cls}-picker-status-warning.@{calendar-prefix-cls}-picker-focused &,
80
- .@{calendar-prefix-cls}-picker-status-warning:focus-within & {
81
- border-color: @warning-color;
82
- box-shadow: @input-outline-offset @outline-blur-size @outline-width fade(@warning-color, 20%);
83
- }
84
-
85
- // Success 状态
86
- .@{calendar-prefix-cls}-picker-status-success & {
87
- border-color: @success-color;
88
-
89
- &:hover {
90
- border-color: @success-color;
91
- }
92
- }
93
-
94
- .@{calendar-prefix-cls}-picker-status-success.@{calendar-prefix-cls}-picker-focused &,
95
- .@{calendar-prefix-cls}-picker-status-success:focus-within & {
96
- border-color: @success-color;
97
- box-shadow: @input-outline-offset @outline-blur-size @outline-width fade(@success-color, 20%);
98
- }
99
-
100
- // RangePicker 内的图标样式(与基础 DatePicker 统一)
101
- .@{calendar-prefix-cls}-picker-icon {
102
- position: absolute;
103
- top: 50%;
104
- right: @input-padding-horizontal-base;
105
- z-index: 1;
106
- display: inline-block;
107
- width: 14px;
108
- height: 14px;
109
- margin-top: -7px;
110
- color: @disabled-color;
111
- font-size: @font-size-base;
112
- line-height: 1;
113
- transition: all 0.3s;
114
- user-select: none;
115
- }
116
-
117
- // RangePicker 内的清除按钮样式(与基础 DatePicker 统一)
118
- .@{calendar-prefix-cls}-picker-clear {
119
- position: absolute;
120
- top: 50%;
121
- right: @input-padding-horizontal-base;
122
- z-index: 2;
123
- width: 14px;
124
- height: 14px;
125
- margin-top: -7px;
126
- color: @disabled-color;
127
- font-size: @font-size-base;
128
- background: @input-bg;
129
- cursor: pointer;
130
- opacity: 0;
131
- pointer-events: none;
132
- transition: all 0.3s;
133
-
134
- &:hover {
135
- color: @text-color-secondary;
136
- }
137
- }
138
-
139
- // hover 时显示清除按钮
140
- &:hover .@{calendar-prefix-cls}-picker-clear {
141
- opacity: 1;
142
- pointer-events: auto;
143
- }
144
- }
145
-
146
- .@{calendar-prefix-cls}-range-picker-input {
147
- flex: 1;
148
- min-width: 0;
149
- height: 100%;
150
- text-align: center;
151
- background-color: transparent;
152
- border: 0;
153
- outline: 0;
154
- cursor: pointer;
155
- transition: color 0.3s;
156
- .placeholder();
157
-
158
- &[disabled] {
159
- cursor: not-allowed;
160
- }
161
-
162
- // 激活状态的输入框
163
- &-active {
164
- color: @primary-color;
165
- }
166
- }
167
-
168
- // Active Bar 底部滑块
169
- .@{calendar-prefix-cls}-range-picker-active-bar {
170
- position: absolute;
171
- bottom: 0;
172
- left: 0;
173
- height: 2px;
174
- background: @primary-color;
175
- pointer-events: none;
176
- transition: left 0.3s ease-out, width 0.3s ease-out;
177
- opacity: 0;
178
-
179
- // 当 picker 获得焦点时显示
180
- .@{calendar-prefix-cls}-picker:focus-within &,
181
- .@{calendar-prefix-cls}-picker-focused & {
182
- opacity: 1;
183
- }
184
- }
185
-
186
- .@{calendar-prefix-cls}-range-picker-separator {
187
- flex: none;
188
- display: inline-flex;
189
- align-items: center;
190
- padding: 0 8px;
191
- color: @text-color-secondary;
192
- white-space: nowrap;
193
- text-align: center;
194
- vertical-align: top;
195
- pointer-events: none;
196
- .@{ant-prefix}-input-disabled & {
197
- color: @disabled-color;
198
- }
199
- }
200
-
201
- .@{calendar-prefix-cls}-range {
202
- width: 552px;
203
- overflow: hidden;
204
-
205
- .@{calendar-prefix-cls}-date-panel {
206
- &::after {
207
- display: block;
208
- clear: both;
209
- height: 0;
210
- visibility: hidden;
211
- content: '.';
212
- }
213
- }
214
- &-part {
215
- position: relative;
216
- width: 50%;
217
- }
218
-
219
- &-left {
220
- float: left;
221
- .@{calendar-prefix-cls} {
222
- &-time-picker-inner {
223
- border-right: 1px solid @border-color-split;
224
- }
225
- }
226
- }
227
-
228
- &-right {
229
- float: right;
230
- .@{calendar-prefix-cls} {
231
- &-time-picker-inner {
232
- border-left: 1px solid @border-color-split;
233
- }
234
- }
235
- }
236
-
237
- // 已隐藏 &-middle, 相关样式已移除
238
-
239
- // &-right date-input-wrap 已隐藏,无需额外样式
240
-
241
- .@{calendar-prefix-cls}-today
242
- :not(.@{calendar-prefix-cls}-disabled-cell)
243
- :not(.@{calendar-prefix-cls}-last-month-cell)
244
- :not(.@{calendar-prefix-cls}-next-month-btn-day) {
245
- .@{calendar-prefix-cls}-date {
246
- color: @primary-color;
247
- background: @primary-2;
248
- border-color: @primary-color;
249
- }
250
- }
251
-
252
- .@{calendar-prefix-cls}-selected-start-date,
253
- .@{calendar-prefix-cls}-selected-end-date {
254
- .calendar-selected-cell;
255
- }
256
-
257
- // 已隐藏 date-input-wrap,time 模式相关样式已移除
258
-
259
- // 隐藏弹窗内部的日期输入框(已在外部 RangePicker 中显示)
260
- .@{calendar-prefix-cls}-input-wrap {
261
- display: none;
262
- }
263
-
264
- .@{calendar-prefix-cls}-date-input-wrap {
265
- display: none;
266
- }
267
-
268
- &-middle {
269
- display: none;
270
- }
271
-
272
- .@{calendar-prefix-cls}-input,
273
- .@{calendar-timepicker-prefix-cls}-input {
274
- .input;
275
- height: @input-height-sm;
276
- padding-right: 0;
277
- padding-left: 0;
278
- line-height: @input-height-sm;
279
- border: 0;
280
- box-shadow: none;
281
-
282
- &:focus {
283
- box-shadow: none;
284
- }
285
- }
286
-
287
- .@{calendar-timepicker-prefix-cls}-icon {
288
- display: none;
289
- }
290
-
291
- &.@{calendar-prefix-cls}-week-number {
292
- width: 574px;
293
-
294
- .@{calendar-prefix-cls}-range-part {
295
- width: 286px;
296
- }
297
- }
298
-
299
- .@{calendar-prefix-cls}-year-panel,
300
- .@{calendar-prefix-cls}-month-panel,
301
- .@{calendar-prefix-cls}-decade-panel {
302
- top: @input-box-height;
303
- }
304
- .@{calendar-prefix-cls}-month-panel .@{calendar-prefix-cls}-year-panel {
305
- top: 0;
306
- }
307
- .@{calendar-prefix-cls}-decade-panel-table,
308
- .@{calendar-prefix-cls}-year-panel-table,
309
- .@{calendar-prefix-cls}-month-panel-table {
310
- height: 208px;
311
- }
312
-
313
- .@{calendar-prefix-cls}-in-range-cell {
314
- position: relative;
315
- border-radius: 0;
316
- > div {
317
- position: relative;
318
- z-index: 1;
319
- }
320
- &::before {
321
- position: absolute;
322
- top: 4px;
323
- right: 0;
324
- bottom: 4px;
325
- left: 0;
326
- display: block;
327
- background: @item-active-bg;
328
- border: 0;
329
- border-radius: 0;
330
- content: '';
331
- }
332
- }
333
-
334
- // 年份面板和月份面板的范围选中背景样式
335
- .@{calendar-prefix-cls}-year-panel-cell.@{calendar-prefix-cls}-in-range-cell,
336
- .@{calendar-prefix-cls}-month-panel-cell.@{calendar-prefix-cls}-in-range-cell {
337
- position: relative;
338
- border-radius: 0;
339
-
340
- > a {
341
- position: relative;
342
- z-index: 1;
343
- }
344
-
345
- &::before {
346
- position: absolute;
347
- top: 4px;
348
- right: 0;
349
- bottom: 4px;
350
- left: 0;
351
- display: block;
352
- background: @item-active-bg;
353
- border: 0;
354
- border-radius: 0;
355
- content: '';
356
- }
357
- }
358
-
359
- // 年份/月份范围选择的起始单元格圆角
360
- .@{calendar-prefix-cls}-year-panel-selected-start-cell.@{calendar-prefix-cls}-in-range-cell,
361
- .@{calendar-prefix-cls}-month-panel-selected-start-cell.@{calendar-prefix-cls}-in-range-cell {
362
- &::before {
363
- border-top-left-radius: @border-radius-sm;
364
- border-bottom-left-radius: @border-radius-sm;
365
- }
366
- }
367
-
368
- // 年份/月份范围选择的结束单元格圆角
369
- .@{calendar-prefix-cls}-year-panel-selected-end-cell.@{calendar-prefix-cls}-in-range-cell,
370
- .@{calendar-prefix-cls}-month-panel-selected-end-cell.@{calendar-prefix-cls}-in-range-cell {
371
- &::before {
372
- border-top-right-radius: @border-radius-sm;
373
- border-bottom-right-radius: @border-radius-sm;
374
- }
375
- }
376
-
377
- // 悬停高亮效果 - 范围起始单元格
378
- .@{calendar-prefix-cls}-selected-start-date,
379
- .@{calendar-prefix-cls}-selected-end-date {
380
- .@{calendar-prefix-cls}-date {
381
- color: @text-color-inverse;
382
- background: @primary-color;
383
- border-radius: @border-radius-sm;
384
- }
385
- }
386
-
387
- // 悬停预览样式 - 鼠标悬停时预览范围
388
- .@{calendar-prefix-cls}-in-range-cell.@{calendar-prefix-cls}-in-range-hover-cell {
389
- &::before {
390
- background: @primary-2;
391
- }
392
- }
393
-
394
- // 范围起始单元格圆角
395
- .@{calendar-prefix-cls}-in-range-cell:first-child,
396
- .@{calendar-prefix-cls}-selected-start-date + .@{calendar-prefix-cls}-in-range-cell {
397
- &::before {
398
- border-top-left-radius: @border-radius-sm;
399
- border-bottom-left-radius: @border-radius-sm;
400
- }
401
- }
402
-
403
- // 范围结束单元格圆角
404
- .@{calendar-prefix-cls}-in-range-cell:last-child,
405
- .@{calendar-prefix-cls}-in-range-cell + .@{calendar-prefix-cls}-selected-end-date {
406
- &::before {
407
- border-top-right-radius: @border-radius-sm;
408
- border-bottom-right-radius: @border-radius-sm;
409
- }
410
- }
411
-
412
- // 悬停时的过渡效果
413
- .@{calendar-prefix-cls}-cell {
414
- transition: background 0.3s;
415
-
416
- &:hover:not(.@{calendar-prefix-cls}-disabled-cell) {
417
- .@{calendar-prefix-cls}-date {
418
- background: @item-hover-bg;
419
- }
420
- }
421
- }
422
-
423
- // 选中的起始/结束日期悬停效果
424
- .@{calendar-prefix-cls}-selected-start-date,
425
- .@{calendar-prefix-cls}-selected-end-date {
426
- &:hover {
427
- .@{calendar-prefix-cls}-date {
428
- background: @primary-5 !important;
429
- }
430
- }
431
- }
432
-
433
- .@{calendar-prefix-cls}-footer-extra {
434
- float: left;
435
- }
436
-
437
- // `div` for selector specificity
438
- div&-quick-selector {
439
- text-align: left;
440
-
441
- > a {
442
- margin-right: 8px;
443
- }
444
- }
445
-
446
- .@{calendar-prefix-cls},
447
- .@{calendar-prefix-cls}-month-panel,
448
- .@{calendar-prefix-cls}-year-panel,
449
- .@{calendar-prefix-cls}-decade-panel {
450
- &-header {
451
- border-bottom: 0;
452
- }
453
- &-body {
454
- border-top: @border-width-base @border-style-base @border-color-split;
455
- }
456
- }
457
-
458
- &.@{calendar-prefix-cls}-time {
459
- .@{calendar-timepicker-prefix-cls} {
460
- top: 68px;
461
- z-index: 2; // cover .ant-calendar-range .ant-calendar-in-range-cell > div (z-index: 1)
462
- width: 100%;
463
- height: 207px;
464
- &-panel {
465
- height: 267px;
466
- margin-top: -34px;
467
- }
468
-
469
- &-inner {
470
- height: 100%;
471
- padding-top: 40px;
472
- background: none;
473
- }
474
-
475
- &-combobox {
476
- display: inline-block;
477
- height: 100%;
478
- background-color: @component-background;
479
- border-top: @border-width-base @border-style-base @border-color-split;
480
- }
481
- &-select {
482
- height: 100%;
483
- ul {
484
- max-height: 100%;
485
- }
486
- }
487
- }
488
- .@{calendar-prefix-cls}-footer .@{calendar-prefix-cls}-time-picker-btn {
489
- margin-right: 8px;
490
- }
491
- .@{calendar-prefix-cls}-today-btn {
492
- height: 22px;
493
- margin: 8px 12px;
494
- line-height: 22px;
495
- }
496
- }
497
-
498
- &-with-ranges.@{calendar-prefix-cls}-time .@{calendar-timepicker-prefix-cls} {
499
- height: 233px;
500
- }
501
- }
502
-
503
- .@{calendar-prefix-cls}-range.@{calendar-prefix-cls}-show-time-picker {
504
- .@{calendar-prefix-cls}-body {
505
- border-top-color: transparent;
506
- }
507
- }
1
+ @input-box-height: 34px;
2
+
3
+ // Range picker input wrapper with Active Bar
4
+ // 统一样式:使用与基础 DatePicker 相同的 input 变量
5
+ .@{calendar-prefix-cls}-range-picker-input-wrapper {
6
+ position: relative;
7
+ display: inline-flex;
8
+ align-items: center;
9
+ width: 100%;
10
+ min-width: 280px;
11
+ height: @input-height-base;
12
+ // 使用与 .input() mixin 相同的 padding
13
+ padding: @input-padding-vertical-base @input-padding-horizontal-base;
14
+ // 为图标和清除按钮预留空间
15
+ padding-right: @input-padding-horizontal-base + 30px;
16
+ color: @input-color;
17
+ font-size: @font-size-base;
18
+ line-height: @line-height-base;
19
+ background-color: @input-bg;
20
+ background-image: none;
21
+ border: @border-width-base @border-style-base @input-border-color;
22
+ border-radius: @border-radius-base;
23
+ transition: all 0.3s;
24
+
25
+ &:hover {
26
+ border-color: @input-hover-border-color;
27
+ }
28
+
29
+ // 聚焦状态
30
+ .@{calendar-prefix-cls}-picker-focused &,
31
+ .@{calendar-prefix-cls}-picker:focus-within & {
32
+ border-color: @primary-color;
33
+ box-shadow: @input-outline-offset @outline-blur-size @outline-width fade(@primary-color, 20%);
34
+ outline: 0;
35
+ }
36
+
37
+ // 无边框模式
38
+ .@{calendar-prefix-cls}-picker-borderless & {
39
+ background-color: transparent;
40
+ border: none;
41
+ box-shadow: none;
42
+ padding-right: @input-padding-horizontal-base;
43
+ }
44
+
45
+ // 禁用状态
46
+ &[disabled],
47
+ .@{calendar-prefix-cls}-picker-disabled & {
48
+ color: @disabled-color;
49
+ background-color: @input-disabled-bg;
50
+ border-color: @input-border-color;
51
+ cursor: not-allowed;
52
+ opacity: 1;
53
+ }
54
+
55
+ // Error 状态
56
+ .@{calendar-prefix-cls}-picker-status-error & {
57
+ border-color: @error-color;
58
+
59
+ &:hover {
60
+ border-color: @error-color;
61
+ }
62
+ }
63
+
64
+ .@{calendar-prefix-cls}-picker-status-error.@{calendar-prefix-cls}-picker-focused &,
65
+ .@{calendar-prefix-cls}-picker-status-error:focus-within & {
66
+ border-color: @error-color;
67
+ box-shadow: @input-outline-offset @outline-blur-size @outline-width fade(@error-color, 20%);
68
+ }
69
+
70
+ // Warning 状态
71
+ .@{calendar-prefix-cls}-picker-status-warning & {
72
+ border-color: @warning-color;
73
+
74
+ &:hover {
75
+ border-color: @warning-color;
76
+ }
77
+ }
78
+
79
+ .@{calendar-prefix-cls}-picker-status-warning.@{calendar-prefix-cls}-picker-focused &,
80
+ .@{calendar-prefix-cls}-picker-status-warning:focus-within & {
81
+ border-color: @warning-color;
82
+ box-shadow: @input-outline-offset @outline-blur-size @outline-width fade(@warning-color, 20%);
83
+ }
84
+
85
+ // Success 状态
86
+ .@{calendar-prefix-cls}-picker-status-success & {
87
+ border-color: @success-color;
88
+
89
+ &:hover {
90
+ border-color: @success-color;
91
+ }
92
+ }
93
+
94
+ .@{calendar-prefix-cls}-picker-status-success.@{calendar-prefix-cls}-picker-focused &,
95
+ .@{calendar-prefix-cls}-picker-status-success:focus-within & {
96
+ border-color: @success-color;
97
+ box-shadow: @input-outline-offset @outline-blur-size @outline-width fade(@success-color, 20%);
98
+ }
99
+
100
+ // RangePicker 内的图标样式(与基础 DatePicker 统一)
101
+ .@{calendar-prefix-cls}-picker-icon {
102
+ position: absolute;
103
+ top: 50%;
104
+ right: @input-padding-horizontal-base;
105
+ z-index: 1;
106
+ display: inline-block;
107
+ width: 14px;
108
+ height: 14px;
109
+ margin-top: -7px;
110
+ color: @disabled-color;
111
+ font-size: @font-size-base;
112
+ line-height: 1;
113
+ transition: all 0.3s;
114
+ user-select: none;
115
+ }
116
+
117
+ // RangePicker 内的清除按钮样式(与基础 DatePicker 统一)
118
+ .@{calendar-prefix-cls}-picker-clear {
119
+ position: absolute;
120
+ top: 50%;
121
+ right: @input-padding-horizontal-base;
122
+ z-index: 2;
123
+ width: 14px;
124
+ height: 14px;
125
+ margin-top: -7px;
126
+ color: @disabled-color;
127
+ font-size: @font-size-base;
128
+ background: @input-bg;
129
+ cursor: pointer;
130
+ opacity: 0;
131
+ pointer-events: none;
132
+ transition: all 0.3s;
133
+
134
+ &:hover {
135
+ color: @text-color-secondary;
136
+ }
137
+ }
138
+
139
+ // hover 时显示清除按钮
140
+ &:hover .@{calendar-prefix-cls}-picker-clear {
141
+ opacity: 1;
142
+ pointer-events: auto;
143
+ }
144
+ }
145
+
146
+ .@{calendar-prefix-cls}-range-picker-input {
147
+ flex: 1;
148
+ min-width: 0;
149
+ height: 100%;
150
+ text-align: center;
151
+ background-color: transparent;
152
+ border: 0;
153
+ outline: 0;
154
+ cursor: pointer;
155
+ transition: color 0.3s;
156
+ .placeholder();
157
+
158
+ &[disabled] {
159
+ cursor: not-allowed;
160
+ }
161
+
162
+ // 激活状态的输入框
163
+ &-active {
164
+ color: @primary-color;
165
+ }
166
+ }
167
+
168
+ // Active Bar 底部滑块
169
+ .@{calendar-prefix-cls}-range-picker-active-bar {
170
+ position: absolute;
171
+ bottom: 0;
172
+ left: 0;
173
+ height: 2px;
174
+ background: @primary-color;
175
+ pointer-events: none;
176
+ transition: left 0.3s ease-out, width 0.3s ease-out;
177
+ opacity: 0;
178
+
179
+ // 当 picker 获得焦点时显示
180
+ .@{calendar-prefix-cls}-picker:focus-within &,
181
+ .@{calendar-prefix-cls}-picker-focused & {
182
+ opacity: 1;
183
+ }
184
+ }
185
+
186
+ .@{calendar-prefix-cls}-range-picker-separator {
187
+ flex: none;
188
+ display: inline-flex;
189
+ align-items: center;
190
+ padding: 0 8px;
191
+ color: @text-color-secondary;
192
+ white-space: nowrap;
193
+ text-align: center;
194
+ vertical-align: top;
195
+ pointer-events: none;
196
+ .@{ant-prefix}-input-disabled & {
197
+ color: @disabled-color;
198
+ }
199
+ }
200
+
201
+ .@{calendar-prefix-cls}-range {
202
+ width: 552px;
203
+ overflow: hidden;
204
+
205
+ .@{calendar-prefix-cls}-date-panel {
206
+ &::after {
207
+ display: block;
208
+ clear: both;
209
+ height: 0;
210
+ visibility: hidden;
211
+ content: '.';
212
+ }
213
+ }
214
+ &-part {
215
+ position: relative;
216
+ width: 50%;
217
+ }
218
+
219
+ &-left {
220
+ float: left;
221
+ .@{calendar-prefix-cls} {
222
+ &-time-picker-inner {
223
+ border-right: 1px solid @border-color-split;
224
+ }
225
+ }
226
+ }
227
+
228
+ &-right {
229
+ float: right;
230
+ .@{calendar-prefix-cls} {
231
+ &-time-picker-inner {
232
+ border-left: 1px solid @border-color-split;
233
+ }
234
+ }
235
+ }
236
+
237
+ // 已隐藏 &-middle, 相关样式已移除
238
+
239
+ // &-right date-input-wrap 已隐藏,无需额外样式
240
+
241
+ .@{calendar-prefix-cls}-today
242
+ :not(.@{calendar-prefix-cls}-disabled-cell)
243
+ :not(.@{calendar-prefix-cls}-last-month-cell)
244
+ :not(.@{calendar-prefix-cls}-next-month-btn-day) {
245
+ .@{calendar-prefix-cls}-date {
246
+ color: @primary-color;
247
+ background: @primary-2;
248
+ border-color: @primary-color;
249
+ }
250
+ }
251
+
252
+ .@{calendar-prefix-cls}-selected-start-date,
253
+ .@{calendar-prefix-cls}-selected-end-date {
254
+ .calendar-selected-cell;
255
+ }
256
+
257
+ // 已隐藏 date-input-wrap,time 模式相关样式已移除
258
+
259
+ // 隐藏弹窗内部的日期输入框(已在外部 RangePicker 中显示)
260
+ .@{calendar-prefix-cls}-input-wrap {
261
+ display: none;
262
+ }
263
+
264
+ .@{calendar-prefix-cls}-date-input-wrap {
265
+ display: none;
266
+ }
267
+
268
+ &-middle {
269
+ display: none;
270
+ }
271
+
272
+ .@{calendar-prefix-cls}-input,
273
+ .@{calendar-timepicker-prefix-cls}-input {
274
+ .input;
275
+ height: @input-height-sm;
276
+ padding-right: 0;
277
+ padding-left: 0;
278
+ line-height: @input-height-sm;
279
+ border: 0;
280
+ box-shadow: none;
281
+
282
+ &:focus {
283
+ box-shadow: none;
284
+ }
285
+ }
286
+
287
+ .@{calendar-timepicker-prefix-cls}-icon {
288
+ display: none;
289
+ }
290
+
291
+ &.@{calendar-prefix-cls}-week-number {
292
+ width: 574px;
293
+
294
+ .@{calendar-prefix-cls}-range-part {
295
+ width: 286px;
296
+ }
297
+ }
298
+
299
+ .@{calendar-prefix-cls}-year-panel,
300
+ .@{calendar-prefix-cls}-month-panel,
301
+ .@{calendar-prefix-cls}-decade-panel {
302
+ top: @input-box-height;
303
+ }
304
+ .@{calendar-prefix-cls}-month-panel .@{calendar-prefix-cls}-year-panel {
305
+ top: 0;
306
+ }
307
+ .@{calendar-prefix-cls}-decade-panel-table,
308
+ .@{calendar-prefix-cls}-year-panel-table,
309
+ .@{calendar-prefix-cls}-month-panel-table {
310
+ height: auto;
311
+ }
312
+
313
+ .@{calendar-prefix-cls}-in-range-cell {
314
+ position: relative;
315
+ border-radius: 0;
316
+ > div {
317
+ position: relative;
318
+ z-index: 1;
319
+ }
320
+ &::before {
321
+ position: absolute;
322
+ top: 4px;
323
+ right: 0;
324
+ bottom: 4px;
325
+ left: 0;
326
+ display: block;
327
+ background: @item-active-bg;
328
+ border: 0;
329
+ border-radius: 0;
330
+ content: '';
331
+ }
332
+ }
333
+
334
+ // 年份面板和月份面板的范围选中背景样式
335
+ .@{calendar-prefix-cls}-year-panel-cell.@{calendar-prefix-cls}-in-range-cell,
336
+ .@{calendar-prefix-cls}-month-panel-cell.@{calendar-prefix-cls}-in-range-cell {
337
+ position: relative;
338
+ border-radius: 0;
339
+
340
+ > a {
341
+ position: relative;
342
+ z-index: 1;
343
+ }
344
+
345
+ &::before {
346
+ position: absolute;
347
+ top: 4px;
348
+ right: 0;
349
+ bottom: 4px;
350
+ left: 0;
351
+ display: block;
352
+ background: @item-active-bg;
353
+ border: 0;
354
+ border-radius: 0;
355
+ content: '';
356
+ }
357
+ }
358
+
359
+ // 年份/月份范围选择的起始单元格圆角
360
+ .@{calendar-prefix-cls}-year-panel-selected-start-cell.@{calendar-prefix-cls}-in-range-cell,
361
+ .@{calendar-prefix-cls}-month-panel-selected-start-cell.@{calendar-prefix-cls}-in-range-cell {
362
+ &::before {
363
+ border-top-left-radius: @border-radius-sm;
364
+ border-bottom-left-radius: @border-radius-sm;
365
+ }
366
+ }
367
+
368
+ // 年份/月份范围选择的结束单元格圆角
369
+ .@{calendar-prefix-cls}-year-panel-selected-end-cell.@{calendar-prefix-cls}-in-range-cell,
370
+ .@{calendar-prefix-cls}-month-panel-selected-end-cell.@{calendar-prefix-cls}-in-range-cell {
371
+ &::before {
372
+ border-top-right-radius: @border-radius-sm;
373
+ border-bottom-right-radius: @border-radius-sm;
374
+ }
375
+ }
376
+
377
+ // 年份/月份 hover 预览范围样式
378
+ .@{calendar-prefix-cls}-year-panel-cell.@{calendar-prefix-cls}-in-hover-range-cell,
379
+ .@{calendar-prefix-cls}-month-panel-cell.@{calendar-prefix-cls}-in-hover-range-cell {
380
+ &::before {
381
+ background: @primary-2;
382
+ }
383
+ }
384
+
385
+ // 悬停高亮效果 - 范围起始单元格
386
+ .@{calendar-prefix-cls}-selected-start-date,
387
+ .@{calendar-prefix-cls}-selected-end-date {
388
+ .@{calendar-prefix-cls}-date {
389
+ color: @text-color-inverse;
390
+ background: @primary-color;
391
+ border-radius: @border-radius-sm;
392
+ }
393
+ }
394
+
395
+ // 悬停预览样式 - 鼠标悬停时预览范围
396
+ .@{calendar-prefix-cls}-in-range-cell.@{calendar-prefix-cls}-in-range-hover-cell {
397
+ &::before {
398
+ background: @primary-2;
399
+ }
400
+ }
401
+
402
+ // 范围起始单元格圆角
403
+ .@{calendar-prefix-cls}-in-range-cell:first-child,
404
+ .@{calendar-prefix-cls}-selected-start-date + .@{calendar-prefix-cls}-in-range-cell {
405
+ &::before {
406
+ border-top-left-radius: @border-radius-sm;
407
+ border-bottom-left-radius: @border-radius-sm;
408
+ }
409
+ }
410
+
411
+ // 范围结束单元格圆角
412
+ .@{calendar-prefix-cls}-in-range-cell:last-child,
413
+ .@{calendar-prefix-cls}-in-range-cell + .@{calendar-prefix-cls}-selected-end-date {
414
+ &::before {
415
+ border-top-right-radius: @border-radius-sm;
416
+ border-bottom-right-radius: @border-radius-sm;
417
+ }
418
+ }
419
+
420
+ // 悬停时的过渡效果
421
+ .@{calendar-prefix-cls}-cell {
422
+ transition: background 0.3s;
423
+
424
+ &:hover:not(.@{calendar-prefix-cls}-disabled-cell) {
425
+ .@{calendar-prefix-cls}-date {
426
+ background: @item-hover-bg;
427
+ }
428
+ }
429
+ }
430
+
431
+ // 选中的起始/结束日期悬停效果
432
+ .@{calendar-prefix-cls}-selected-start-date,
433
+ .@{calendar-prefix-cls}-selected-end-date {
434
+ &:hover {
435
+ .@{calendar-prefix-cls}-date {
436
+ background: @primary-5 !important;
437
+ }
438
+ }
439
+ }
440
+
441
+ .@{calendar-prefix-cls}-footer-extra {
442
+ float: left;
443
+ }
444
+
445
+ // `div` for selector specificity
446
+ div&-quick-selector {
447
+ text-align: left;
448
+
449
+ > a {
450
+ margin-right: 8px;
451
+ }
452
+ }
453
+
454
+ .@{calendar-prefix-cls},
455
+ .@{calendar-prefix-cls}-month-panel,
456
+ .@{calendar-prefix-cls}-year-panel,
457
+ .@{calendar-prefix-cls}-decade-panel {
458
+ &-header {
459
+ border-bottom: 0;
460
+ }
461
+ &-body {
462
+ border-top: @border-width-base @border-style-base @border-color-split;
463
+ }
464
+ }
465
+
466
+ &.@{calendar-prefix-cls}-time {
467
+ .@{calendar-timepicker-prefix-cls} {
468
+ top: 68px;
469
+ z-index: 2; // cover .ant-calendar-range .ant-calendar-in-range-cell > div (z-index: 1)
470
+ width: 100%;
471
+ height: 207px;
472
+ &-panel {
473
+ height: 267px;
474
+ margin-top: -34px;
475
+ }
476
+
477
+ &-inner {
478
+ height: 100%;
479
+ padding-top: 40px;
480
+ background: none;
481
+ }
482
+
483
+ &-combobox {
484
+ display: inline-block;
485
+ height: 100%;
486
+ background-color: @component-background;
487
+ border-top: @border-width-base @border-style-base @border-color-split;
488
+ }
489
+ &-select {
490
+ height: 100%;
491
+ ul {
492
+ max-height: 100%;
493
+ }
494
+ }
495
+ }
496
+ .@{calendar-prefix-cls}-footer .@{calendar-prefix-cls}-time-picker-btn {
497
+ margin-right: 8px;
498
+ }
499
+ .@{calendar-prefix-cls}-today-btn {
500
+ height: 22px;
501
+ margin: 8px 12px;
502
+ line-height: 22px;
503
+ }
504
+ }
505
+
506
+ &-with-ranges.@{calendar-prefix-cls}-time .@{calendar-timepicker-prefix-cls} {
507
+ height: 233px;
508
+ }
509
+ }
510
+
511
+ .@{calendar-prefix-cls}-range.@{calendar-prefix-cls}-show-time-picker {
512
+ .@{calendar-prefix-cls}-body {
513
+ border-top-color: transparent;
514
+ }
515
+ }