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