feat: WeekPicker support hover style (#40772)

* feat: support range hover style

* chore: adjust hover style

* chore: cleanup

* chore: update style

* test: update snapshot

* chore: fix style

* chore: cleanup

* chore: cleanup
This commit is contained in:
二货爱吃白萝卜 2023-02-19 12:33:09 +08:00 committed by GitHub
parent 1ebdfb7049
commit 108129641f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 361 additions and 95 deletions

View File

@ -766,7 +766,11 @@ exports[`renders ./components/date-picker/demo/basic.tsx extend context correctl
<td
class="ant-picker-cell ant-picker-cell-week"
>
45
<div
class="ant-picker-cell-inner"
>
45
</div>
</td>
<td
class="ant-picker-cell"
@ -845,7 +849,11 @@ exports[`renders ./components/date-picker/demo/basic.tsx extend context correctl
<td
class="ant-picker-cell ant-picker-cell-week"
>
46
<div
class="ant-picker-cell-inner"
>
46
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -924,7 +932,11 @@ exports[`renders ./components/date-picker/demo/basic.tsx extend context correctl
<td
class="ant-picker-cell ant-picker-cell-week"
>
47
<div
class="ant-picker-cell-inner"
>
47
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -1003,7 +1015,11 @@ exports[`renders ./components/date-picker/demo/basic.tsx extend context correctl
<td
class="ant-picker-cell ant-picker-cell-week"
>
48
<div
class="ant-picker-cell-inner"
>
48
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -1026,7 +1042,7 @@ exports[`renders ./components/date-picker/demo/basic.tsx extend context correctl
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view ant-picker-cell-today"
class="ant-picker-cell ant-picker-cell-in-view"
title="2016-11-22"
>
<div
@ -1082,7 +1098,11 @@ exports[`renders ./components/date-picker/demo/basic.tsx extend context correctl
<td
class="ant-picker-cell ant-picker-cell-week"
>
49
<div
class="ant-picker-cell-inner"
>
49
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -1161,7 +1181,11 @@ exports[`renders ./components/date-picker/demo/basic.tsx extend context correctl
<td
class="ant-picker-cell ant-picker-cell-week"
>
50
<div
class="ant-picker-cell-inner"
>
50
</div>
</td>
<td
class="ant-picker-cell"
@ -2644,7 +2668,11 @@ exports[`renders ./components/date-picker/demo/bordered.tsx extend context corre
<td
class="ant-picker-cell ant-picker-cell-week"
>
45
<div
class="ant-picker-cell-inner"
>
45
</div>
</td>
<td
class="ant-picker-cell"
@ -2723,7 +2751,11 @@ exports[`renders ./components/date-picker/demo/bordered.tsx extend context corre
<td
class="ant-picker-cell ant-picker-cell-week"
>
46
<div
class="ant-picker-cell-inner"
>
46
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -2802,7 +2834,11 @@ exports[`renders ./components/date-picker/demo/bordered.tsx extend context corre
<td
class="ant-picker-cell ant-picker-cell-week"
>
47
<div
class="ant-picker-cell-inner"
>
47
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -2881,7 +2917,11 @@ exports[`renders ./components/date-picker/demo/bordered.tsx extend context corre
<td
class="ant-picker-cell ant-picker-cell-week"
>
48
<div
class="ant-picker-cell-inner"
>
48
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -2904,7 +2944,7 @@ exports[`renders ./components/date-picker/demo/bordered.tsx extend context corre
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view ant-picker-cell-today"
class="ant-picker-cell ant-picker-cell-in-view"
title="2016-11-22"
>
<div
@ -2960,7 +3000,11 @@ exports[`renders ./components/date-picker/demo/bordered.tsx extend context corre
<td
class="ant-picker-cell ant-picker-cell-week"
>
49
<div
class="ant-picker-cell-inner"
>
49
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -3039,7 +3083,11 @@ exports[`renders ./components/date-picker/demo/bordered.tsx extend context corre
<td
class="ant-picker-cell ant-picker-cell-week"
>
50
<div
class="ant-picker-cell-inner"
>
50
</div>
</td>
<td
class="ant-picker-cell"
@ -5008,7 +5056,11 @@ exports[`renders ./components/date-picker/demo/bordered.tsx extend context corre
<td
class="ant-picker-cell ant-picker-cell-week"
>
45
<div
class="ant-picker-cell-inner"
>
45
</div>
</td>
<td
class="ant-picker-cell"
@ -5087,7 +5139,11 @@ exports[`renders ./components/date-picker/demo/bordered.tsx extend context corre
<td
class="ant-picker-cell ant-picker-cell-week"
>
46
<div
class="ant-picker-cell-inner"
>
46
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -5166,7 +5222,11 @@ exports[`renders ./components/date-picker/demo/bordered.tsx extend context corre
<td
class="ant-picker-cell ant-picker-cell-week"
>
47
<div
class="ant-picker-cell-inner"
>
47
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -5245,7 +5305,11 @@ exports[`renders ./components/date-picker/demo/bordered.tsx extend context corre
<td
class="ant-picker-cell ant-picker-cell-week"
>
48
<div
class="ant-picker-cell-inner"
>
48
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -5268,7 +5332,7 @@ exports[`renders ./components/date-picker/demo/bordered.tsx extend context corre
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view ant-picker-cell-today"
class="ant-picker-cell ant-picker-cell-in-view"
title="2016-11-22"
>
<div
@ -5324,7 +5388,11 @@ exports[`renders ./components/date-picker/demo/bordered.tsx extend context corre
<td
class="ant-picker-cell ant-picker-cell-week"
>
49
<div
class="ant-picker-cell-inner"
>
49
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -5403,7 +5471,11 @@ exports[`renders ./components/date-picker/demo/bordered.tsx extend context corre
<td
class="ant-picker-cell ant-picker-cell-week"
>
50
<div
class="ant-picker-cell-inner"
>
50
</div>
</td>
<td
class="ant-picker-cell"
@ -5589,7 +5661,11 @@ exports[`renders ./components/date-picker/demo/bordered.tsx extend context corre
<td
class="ant-picker-cell ant-picker-cell-week"
>
49
<div
class="ant-picker-cell-inner"
>
49
</div>
</td>
<td
class="ant-picker-cell"
@ -5668,7 +5744,11 @@ exports[`renders ./components/date-picker/demo/bordered.tsx extend context corre
<td
class="ant-picker-cell ant-picker-cell-week"
>
50
<div
class="ant-picker-cell-inner"
>
50
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -5747,7 +5827,11 @@ exports[`renders ./components/date-picker/demo/bordered.tsx extend context corre
<td
class="ant-picker-cell ant-picker-cell-week"
>
51
<div
class="ant-picker-cell-inner"
>
51
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -5826,7 +5910,11 @@ exports[`renders ./components/date-picker/demo/bordered.tsx extend context corre
<td
class="ant-picker-cell ant-picker-cell-week"
>
52
<div
class="ant-picker-cell-inner"
>
52
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -5905,7 +5993,11 @@ exports[`renders ./components/date-picker/demo/bordered.tsx extend context corre
<td
class="ant-picker-cell ant-picker-cell-week"
>
53
<div
class="ant-picker-cell-inner"
>
53
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -5984,7 +6076,11 @@ exports[`renders ./components/date-picker/demo/bordered.tsx extend context corre
<td
class="ant-picker-cell ant-picker-cell-week"
>
1
<div
class="ant-picker-cell-inner"
>
1
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-start"
@ -24738,7 +24834,11 @@ exports[`renders ./components/date-picker/demo/format.tsx extend context correct
<td
class="ant-picker-cell ant-picker-cell-week"
>
45
<div
class="ant-picker-cell-inner"
>
45
</div>
</td>
<td
class="ant-picker-cell"
@ -24817,7 +24917,11 @@ exports[`renders ./components/date-picker/demo/format.tsx extend context correct
<td
class="ant-picker-cell ant-picker-cell-week"
>
46
<div
class="ant-picker-cell-inner"
>
46
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -24896,7 +25000,11 @@ exports[`renders ./components/date-picker/demo/format.tsx extend context correct
<td
class="ant-picker-cell ant-picker-cell-week"
>
47
<div
class="ant-picker-cell-inner"
>
47
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -24975,7 +25083,11 @@ exports[`renders ./components/date-picker/demo/format.tsx extend context correct
<td
class="ant-picker-cell ant-picker-cell-week"
>
48
<div
class="ant-picker-cell-inner"
>
48
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -24998,7 +25110,7 @@ exports[`renders ./components/date-picker/demo/format.tsx extend context correct
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view ant-picker-cell-today ant-picker-cell-selected"
class="ant-picker-cell ant-picker-cell-in-view"
title="2016-11-22"
>
<div
@ -25054,7 +25166,11 @@ exports[`renders ./components/date-picker/demo/format.tsx extend context correct
<td
class="ant-picker-cell ant-picker-cell-week"
>
49
<div
class="ant-picker-cell-inner"
>
49
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -25133,7 +25249,11 @@ exports[`renders ./components/date-picker/demo/format.tsx extend context correct
<td
class="ant-picker-cell ant-picker-cell-week"
>
50
<div
class="ant-picker-cell-inner"
>
50
</div>
</td>
<td
class="ant-picker-cell"
@ -37914,7 +38034,11 @@ exports[`renders ./components/date-picker/demo/range-picker.tsx extend context c
<td
class="ant-picker-cell ant-picker-cell-week"
>
45
<div
class="ant-picker-cell-inner"
>
45
</div>
</td>
<td
class="ant-picker-cell"
@ -37993,7 +38117,11 @@ exports[`renders ./components/date-picker/demo/range-picker.tsx extend context c
<td
class="ant-picker-cell ant-picker-cell-week"
>
46
<div
class="ant-picker-cell-inner"
>
46
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -38072,7 +38200,11 @@ exports[`renders ./components/date-picker/demo/range-picker.tsx extend context c
<td
class="ant-picker-cell ant-picker-cell-week"
>
47
<div
class="ant-picker-cell-inner"
>
47
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -38151,7 +38283,11 @@ exports[`renders ./components/date-picker/demo/range-picker.tsx extend context c
<td
class="ant-picker-cell ant-picker-cell-week"
>
48
<div
class="ant-picker-cell-inner"
>
48
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -38174,7 +38310,7 @@ exports[`renders ./components/date-picker/demo/range-picker.tsx extend context c
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view ant-picker-cell-today"
class="ant-picker-cell ant-picker-cell-in-view"
title="2016-11-22"
>
<div
@ -38230,7 +38366,11 @@ exports[`renders ./components/date-picker/demo/range-picker.tsx extend context c
<td
class="ant-picker-cell ant-picker-cell-week"
>
49
<div
class="ant-picker-cell-inner"
>
49
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -38309,7 +38449,11 @@ exports[`renders ./components/date-picker/demo/range-picker.tsx extend context c
<td
class="ant-picker-cell ant-picker-cell-week"
>
50
<div
class="ant-picker-cell-inner"
>
50
</div>
</td>
<td
class="ant-picker-cell"
@ -38495,7 +38639,11 @@ exports[`renders ./components/date-picker/demo/range-picker.tsx extend context c
<td
class="ant-picker-cell ant-picker-cell-week"
>
49
<div
class="ant-picker-cell-inner"
>
49
</div>
</td>
<td
class="ant-picker-cell"
@ -38574,7 +38722,11 @@ exports[`renders ./components/date-picker/demo/range-picker.tsx extend context c
<td
class="ant-picker-cell ant-picker-cell-week"
>
50
<div
class="ant-picker-cell-inner"
>
50
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -38653,7 +38805,11 @@ exports[`renders ./components/date-picker/demo/range-picker.tsx extend context c
<td
class="ant-picker-cell ant-picker-cell-week"
>
51
<div
class="ant-picker-cell-inner"
>
51
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -38732,7 +38888,11 @@ exports[`renders ./components/date-picker/demo/range-picker.tsx extend context c
<td
class="ant-picker-cell ant-picker-cell-week"
>
52
<div
class="ant-picker-cell-inner"
>
52
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -38811,7 +38971,11 @@ exports[`renders ./components/date-picker/demo/range-picker.tsx extend context c
<td
class="ant-picker-cell ant-picker-cell-week"
>
53
<div
class="ant-picker-cell-inner"
>
53
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -38890,7 +39054,11 @@ exports[`renders ./components/date-picker/demo/range-picker.tsx extend context c
<td
class="ant-picker-cell ant-picker-cell-week"
>
1
<div
class="ant-picker-cell-inner"
>
1
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-start"
@ -44298,7 +44466,11 @@ exports[`renders ./components/date-picker/demo/size.tsx extend context correctly
<td
class="ant-picker-cell ant-picker-cell-week"
>
45
<div
class="ant-picker-cell-inner"
>
45
</div>
</td>
<td
class="ant-picker-cell"
@ -44377,7 +44549,11 @@ exports[`renders ./components/date-picker/demo/size.tsx extend context correctly
<td
class="ant-picker-cell ant-picker-cell-week"
>
46
<div
class="ant-picker-cell-inner"
>
46
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -44456,7 +44632,11 @@ exports[`renders ./components/date-picker/demo/size.tsx extend context correctly
<td
class="ant-picker-cell ant-picker-cell-week"
>
47
<div
class="ant-picker-cell-inner"
>
47
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -44535,7 +44715,11 @@ exports[`renders ./components/date-picker/demo/size.tsx extend context correctly
<td
class="ant-picker-cell ant-picker-cell-week"
>
48
<div
class="ant-picker-cell-inner"
>
48
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -44558,7 +44742,7 @@ exports[`renders ./components/date-picker/demo/size.tsx extend context correctly
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view ant-picker-cell-today"
class="ant-picker-cell ant-picker-cell-in-view"
title="2016-11-22"
>
<div
@ -44614,7 +44798,11 @@ exports[`renders ./components/date-picker/demo/size.tsx extend context correctly
<td
class="ant-picker-cell ant-picker-cell-week"
>
49
<div
class="ant-picker-cell-inner"
>
49
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -44693,7 +44881,11 @@ exports[`renders ./components/date-picker/demo/size.tsx extend context correctly
<td
class="ant-picker-cell ant-picker-cell-week"
>
50
<div
class="ant-picker-cell-inner"
>
50
</div>
</td>
<td
class="ant-picker-cell"
@ -54479,7 +54671,11 @@ exports[`renders ./components/date-picker/demo/suffix.tsx extend context correct
<td
class="ant-picker-cell ant-picker-cell-week"
>
45
<div
class="ant-picker-cell-inner"
>
45
</div>
</td>
<td
class="ant-picker-cell"
@ -54558,7 +54754,11 @@ exports[`renders ./components/date-picker/demo/suffix.tsx extend context correct
<td
class="ant-picker-cell ant-picker-cell-week"
>
46
<div
class="ant-picker-cell-inner"
>
46
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -54637,7 +54837,11 @@ exports[`renders ./components/date-picker/demo/suffix.tsx extend context correct
<td
class="ant-picker-cell ant-picker-cell-week"
>
47
<div
class="ant-picker-cell-inner"
>
47
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -54716,7 +54920,11 @@ exports[`renders ./components/date-picker/demo/suffix.tsx extend context correct
<td
class="ant-picker-cell ant-picker-cell-week"
>
48
<div
class="ant-picker-cell-inner"
>
48
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -54739,7 +54947,7 @@ exports[`renders ./components/date-picker/demo/suffix.tsx extend context correct
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view ant-picker-cell-today"
class="ant-picker-cell ant-picker-cell-in-view"
title="2016-11-22"
>
<div
@ -54795,7 +55003,11 @@ exports[`renders ./components/date-picker/demo/suffix.tsx extend context correct
<td
class="ant-picker-cell ant-picker-cell-week"
>
49
<div
class="ant-picker-cell-inner"
>
49
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -54874,7 +55086,11 @@ exports[`renders ./components/date-picker/demo/suffix.tsx extend context correct
<td
class="ant-picker-cell ant-picker-cell-week"
>
50
<div
class="ant-picker-cell-inner"
>
50
</div>
</td>
<td
class="ant-picker-cell"
@ -57073,7 +57289,11 @@ exports[`renders ./components/date-picker/demo/suffix.tsx extend context correct
<td
class="ant-picker-cell ant-picker-cell-week"
>
45
<div
class="ant-picker-cell-inner"
>
45
</div>
</td>
<td
class="ant-picker-cell"
@ -57152,7 +57372,11 @@ exports[`renders ./components/date-picker/demo/suffix.tsx extend context correct
<td
class="ant-picker-cell ant-picker-cell-week"
>
46
<div
class="ant-picker-cell-inner"
>
46
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -57231,7 +57455,11 @@ exports[`renders ./components/date-picker/demo/suffix.tsx extend context correct
<td
class="ant-picker-cell ant-picker-cell-week"
>
47
<div
class="ant-picker-cell-inner"
>
47
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -57310,7 +57538,11 @@ exports[`renders ./components/date-picker/demo/suffix.tsx extend context correct
<td
class="ant-picker-cell ant-picker-cell-week"
>
48
<div
class="ant-picker-cell-inner"
>
48
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -57333,7 +57565,7 @@ exports[`renders ./components/date-picker/demo/suffix.tsx extend context correct
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view ant-picker-cell-today"
class="ant-picker-cell ant-picker-cell-in-view"
title="2016-11-22"
>
<div
@ -57389,7 +57621,11 @@ exports[`renders ./components/date-picker/demo/suffix.tsx extend context correct
<td
class="ant-picker-cell ant-picker-cell-week"
>
49
<div
class="ant-picker-cell-inner"
>
49
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -57468,7 +57704,11 @@ exports[`renders ./components/date-picker/demo/suffix.tsx extend context correct
<td
class="ant-picker-cell ant-picker-cell-week"
>
50
<div
class="ant-picker-cell-inner"
>
50
</div>
</td>
<td
class="ant-picker-cell"

View File

@ -315,7 +315,11 @@ exports[`MonthPicker and WeekPicker render WeekPicker 1`] = `
<td
class="ant-picker-cell ant-picker-cell-week"
>
1
<div
class="ant-picker-cell-inner"
>
1
</div>
</td>
<td
class="ant-picker-cell"
@ -378,7 +382,7 @@ exports[`MonthPicker and WeekPicker render WeekPicker 1`] = `
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-start ant-picker-cell-in-view ant-picker-cell-selected"
class="ant-picker-cell ant-picker-cell-start ant-picker-cell-in-view"
title="2000-01-01"
>
<div
@ -394,7 +398,11 @@ exports[`MonthPicker and WeekPicker render WeekPicker 1`] = `
<td
class="ant-picker-cell ant-picker-cell-week"
>
2
<div
class="ant-picker-cell-inner"
>
2
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -473,7 +481,11 @@ exports[`MonthPicker and WeekPicker render WeekPicker 1`] = `
<td
class="ant-picker-cell ant-picker-cell-week"
>
3
<div
class="ant-picker-cell-inner"
>
3
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -552,7 +564,11 @@ exports[`MonthPicker and WeekPicker render WeekPicker 1`] = `
<td
class="ant-picker-cell ant-picker-cell-week"
>
4
<div
class="ant-picker-cell-inner"
>
4
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -631,7 +647,11 @@ exports[`MonthPicker and WeekPicker render WeekPicker 1`] = `
<td
class="ant-picker-cell ant-picker-cell-week"
>
5
<div
class="ant-picker-cell-inner"
>
5
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -710,7 +730,11 @@ exports[`MonthPicker and WeekPicker render WeekPicker 1`] = `
<td
class="ant-picker-cell ant-picker-cell-week"
>
6
<div
class="ant-picker-cell-inner"
>
6
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"

View File

@ -1,6 +1,6 @@
import React from 'react';
import type { DatePickerProps } from 'antd';
import { DatePicker, Space } from 'antd';
import React from 'react';
const onChange: DatePickerProps['onChange'] = (date, dateString) => {
console.log(date, dateString);

View File

@ -7,20 +7,20 @@ import {
genHoverStyle,
initInputToken,
} from '../../input/style';
import { resetComponent, roundedArrow, textEllipsis } from '../../style';
import { genCompactItemStyle } from '../../style/compact-item';
import {
initSlideMotion,
initMoveMotion,
initSlideMotion,
slideDownIn,
slideDownOut,
slideUpIn,
slideUpOut,
} from '../../style/motion';
import type { GlobalToken } from '../../theme/interface';
import type { FullToken, GenerateStyle } from '../../theme/internal';
import { genComponentStyleHook, mergeToken } from '../../theme/internal';
import type { GlobalToken } from '../../theme/interface';
import type { TokenWithCommonCls } from '../../theme/util/genComponentStyleHook';
import { resetComponent, roundedArrow, textEllipsis } from '../../style';
import { genCompactItemStyle } from '../../style/compact-item';
export interface ComponentToken {
presetsWidth: number;
@ -729,39 +729,41 @@ export const genPanelStyle = (token: SharedPickerToken): CSSObject => {
'&-row': {
td: {
transition: `background ${motionDurationMid}`,
'&:before': {
transition: `background ${motionDurationMid}`,
},
'&:first-child': {
'&:first-child:before': {
borderStartStartRadius: borderRadiusSM,
borderEndStartRadius: borderRadiusSM,
},
'&:last-child': {
'&:last-child:before': {
borderStartEndRadius: borderRadiusSM,
borderEndEndRadius: borderRadiusSM,
},
},
'&:hover td': {
background: controlItemBgHover,
},
[`&-selected td,
&-selected:hover td`]: {
background: colorPrimary,
[`&:hover td,
&-range-start td,
&-range-end td,
&-selected td`]: {
'&:before': {
background: colorPrimary,
},
[`&${componentCls}-cell-week`]: {
color: new TinyColor(colorTextLightSolid).setAlpha(0.5).toHexString(),
},
[`&${componentCls}-cell-today ${pickerCellInnerCls}::before`]: {
borderColor: colorTextLightSolid,
},
[pickerCellInnerCls]: {
color: colorTextLightSolid,
},
},
[`&-range-hover td:before`]: {
background: controlItemBgActive,
},
},
},

View File

@ -134,7 +134,7 @@
"rc-motion": "^2.6.1",
"rc-notification": "~5.0.0",
"rc-pagination": "~3.2.0",
"rc-picker": "~3.1.1",
"rc-picker": "~3.2.4",
"rc-progress": "~3.4.1",
"rc-rate": "~2.9.0",
"rc-resize-observer": "^1.2.0",