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

@ -765,8 +765,12 @@ exports[`renders ./components/date-picker/demo/basic.tsx extend context correctl
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
45
</div>
</td>
<td
class="ant-picker-cell"
@ -844,8 +848,12 @@ exports[`renders ./components/date-picker/demo/basic.tsx extend context correctl
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
46
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -923,8 +931,12 @@ exports[`renders ./components/date-picker/demo/basic.tsx extend context correctl
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
47
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -1002,8 +1014,12 @@ exports[`renders ./components/date-picker/demo/basic.tsx extend context correctl
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<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
@ -1081,8 +1097,12 @@ exports[`renders ./components/date-picker/demo/basic.tsx extend context correctl
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
49
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -1160,8 +1180,12 @@ exports[`renders ./components/date-picker/demo/basic.tsx extend context correctl
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
50
</div>
</td>
<td
class="ant-picker-cell"
@ -2643,8 +2667,12 @@ exports[`renders ./components/date-picker/demo/bordered.tsx extend context corre
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
45
</div>
</td>
<td
class="ant-picker-cell"
@ -2722,8 +2750,12 @@ exports[`renders ./components/date-picker/demo/bordered.tsx extend context corre
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
46
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -2801,8 +2833,12 @@ exports[`renders ./components/date-picker/demo/bordered.tsx extend context corre
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
47
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -2880,8 +2916,12 @@ exports[`renders ./components/date-picker/demo/bordered.tsx extend context corre
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<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
@ -2959,8 +2999,12 @@ exports[`renders ./components/date-picker/demo/bordered.tsx extend context corre
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
49
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -3038,8 +3082,12 @@ exports[`renders ./components/date-picker/demo/bordered.tsx extend context corre
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
50
</div>
</td>
<td
class="ant-picker-cell"
@ -5007,8 +5055,12 @@ exports[`renders ./components/date-picker/demo/bordered.tsx extend context corre
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
45
</div>
</td>
<td
class="ant-picker-cell"
@ -5086,8 +5138,12 @@ exports[`renders ./components/date-picker/demo/bordered.tsx extend context corre
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
46
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -5165,8 +5221,12 @@ exports[`renders ./components/date-picker/demo/bordered.tsx extend context corre
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
47
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -5244,8 +5304,12 @@ exports[`renders ./components/date-picker/demo/bordered.tsx extend context corre
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<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
@ -5323,8 +5387,12 @@ exports[`renders ./components/date-picker/demo/bordered.tsx extend context corre
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
49
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -5402,8 +5470,12 @@ exports[`renders ./components/date-picker/demo/bordered.tsx extend context corre
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
50
</div>
</td>
<td
class="ant-picker-cell"
@ -5588,8 +5660,12 @@ exports[`renders ./components/date-picker/demo/bordered.tsx extend context corre
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
49
</div>
</td>
<td
class="ant-picker-cell"
@ -5667,8 +5743,12 @@ exports[`renders ./components/date-picker/demo/bordered.tsx extend context corre
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
50
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -5746,8 +5826,12 @@ exports[`renders ./components/date-picker/demo/bordered.tsx extend context corre
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
51
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -5825,8 +5909,12 @@ exports[`renders ./components/date-picker/demo/bordered.tsx extend context corre
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
52
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -5904,8 +5992,12 @@ exports[`renders ./components/date-picker/demo/bordered.tsx extend context corre
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
53
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -5983,8 +6075,12 @@ exports[`renders ./components/date-picker/demo/bordered.tsx extend context corre
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
1
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-start"
@ -24737,8 +24833,12 @@ exports[`renders ./components/date-picker/demo/format.tsx extend context correct
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
45
</div>
</td>
<td
class="ant-picker-cell"
@ -24816,8 +24916,12 @@ exports[`renders ./components/date-picker/demo/format.tsx extend context correct
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
46
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -24895,8 +24999,12 @@ exports[`renders ./components/date-picker/demo/format.tsx extend context correct
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
47
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -24974,8 +25082,12 @@ exports[`renders ./components/date-picker/demo/format.tsx extend context correct
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<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
@ -25053,8 +25165,12 @@ exports[`renders ./components/date-picker/demo/format.tsx extend context correct
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
49
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -25132,8 +25248,12 @@ exports[`renders ./components/date-picker/demo/format.tsx extend context correct
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
50
</div>
</td>
<td
class="ant-picker-cell"
@ -37913,8 +38033,12 @@ exports[`renders ./components/date-picker/demo/range-picker.tsx extend context c
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
45
</div>
</td>
<td
class="ant-picker-cell"
@ -37992,8 +38116,12 @@ exports[`renders ./components/date-picker/demo/range-picker.tsx extend context c
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
46
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -38071,8 +38199,12 @@ exports[`renders ./components/date-picker/demo/range-picker.tsx extend context c
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
47
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -38150,8 +38282,12 @@ exports[`renders ./components/date-picker/demo/range-picker.tsx extend context c
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<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
@ -38229,8 +38365,12 @@ exports[`renders ./components/date-picker/demo/range-picker.tsx extend context c
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
49
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -38308,8 +38448,12 @@ exports[`renders ./components/date-picker/demo/range-picker.tsx extend context c
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
50
</div>
</td>
<td
class="ant-picker-cell"
@ -38494,8 +38638,12 @@ exports[`renders ./components/date-picker/demo/range-picker.tsx extend context c
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
49
</div>
</td>
<td
class="ant-picker-cell"
@ -38573,8 +38721,12 @@ exports[`renders ./components/date-picker/demo/range-picker.tsx extend context c
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
50
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -38652,8 +38804,12 @@ exports[`renders ./components/date-picker/demo/range-picker.tsx extend context c
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
51
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -38731,8 +38887,12 @@ exports[`renders ./components/date-picker/demo/range-picker.tsx extend context c
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
52
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -38810,8 +38970,12 @@ exports[`renders ./components/date-picker/demo/range-picker.tsx extend context c
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
53
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -38889,8 +39053,12 @@ exports[`renders ./components/date-picker/demo/range-picker.tsx extend context c
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
1
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-start"
@ -44297,8 +44465,12 @@ exports[`renders ./components/date-picker/demo/size.tsx extend context correctly
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
45
</div>
</td>
<td
class="ant-picker-cell"
@ -44376,8 +44548,12 @@ exports[`renders ./components/date-picker/demo/size.tsx extend context correctly
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
46
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -44455,8 +44631,12 @@ exports[`renders ./components/date-picker/demo/size.tsx extend context correctly
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
47
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -44534,8 +44714,12 @@ exports[`renders ./components/date-picker/demo/size.tsx extend context correctly
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<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
@ -44613,8 +44797,12 @@ exports[`renders ./components/date-picker/demo/size.tsx extend context correctly
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
49
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -44692,8 +44880,12 @@ exports[`renders ./components/date-picker/demo/size.tsx extend context correctly
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
50
</div>
</td>
<td
class="ant-picker-cell"
@ -54478,8 +54670,12 @@ exports[`renders ./components/date-picker/demo/suffix.tsx extend context correct
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
45
</div>
</td>
<td
class="ant-picker-cell"
@ -54557,8 +54753,12 @@ exports[`renders ./components/date-picker/demo/suffix.tsx extend context correct
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
46
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -54636,8 +54836,12 @@ exports[`renders ./components/date-picker/demo/suffix.tsx extend context correct
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
47
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -54715,8 +54919,12 @@ exports[`renders ./components/date-picker/demo/suffix.tsx extend context correct
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<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
@ -54794,8 +55002,12 @@ exports[`renders ./components/date-picker/demo/suffix.tsx extend context correct
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
49
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -54873,8 +55085,12 @@ exports[`renders ./components/date-picker/demo/suffix.tsx extend context correct
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
50
</div>
</td>
<td
class="ant-picker-cell"
@ -57072,8 +57288,12 @@ exports[`renders ./components/date-picker/demo/suffix.tsx extend context correct
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
45
</div>
</td>
<td
class="ant-picker-cell"
@ -57151,8 +57371,12 @@ exports[`renders ./components/date-picker/demo/suffix.tsx extend context correct
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
46
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -57230,8 +57454,12 @@ exports[`renders ./components/date-picker/demo/suffix.tsx extend context correct
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
47
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -57309,8 +57537,12 @@ exports[`renders ./components/date-picker/demo/suffix.tsx extend context correct
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<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
@ -57388,8 +57620,12 @@ exports[`renders ./components/date-picker/demo/suffix.tsx extend context correct
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
49
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -57467,8 +57703,12 @@ exports[`renders ./components/date-picker/demo/suffix.tsx extend context correct
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
50
</div>
</td>
<td
class="ant-picker-cell"

View File

@ -314,8 +314,12 @@ exports[`MonthPicker and WeekPicker render WeekPicker 1`] = `
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<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
@ -393,8 +397,12 @@ exports[`MonthPicker and WeekPicker render WeekPicker 1`] = `
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
2
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -472,8 +480,12 @@ exports[`MonthPicker and WeekPicker render WeekPicker 1`] = `
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
3
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -551,8 +563,12 @@ exports[`MonthPicker and WeekPicker render WeekPicker 1`] = `
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
4
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -630,8 +646,12 @@ exports[`MonthPicker and WeekPicker render WeekPicker 1`] = `
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<div
class="ant-picker-cell-inner"
>
5
</div>
</td>
<td
class="ant-picker-cell ant-picker-cell-in-view"
@ -709,8 +729,12 @@ exports[`MonthPicker and WeekPicker render WeekPicker 1`] = `
>
<td
class="ant-picker-cell ant-picker-cell-week"
>
<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: {
'&: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`]: {
[`&: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",