@douyinfe/semi-foundation 2.16.1 → 2.17.0-beta.0
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.
- package/collapse/collapse.scss +8 -0
- package/collapse/variables.scss +1 -0
- package/datePicker/constants.ts +1 -0
- package/datePicker/datePicker.scss +335 -17
- package/datePicker/foundation.ts +2 -0
- package/datePicker/monthsGridFoundation.ts +4 -1
- package/datePicker/rtl.scss +6 -6
- package/datePicker/variables.scss +58 -6
- package/datePicker/yearAndMonthFoundation.ts +4 -0
- package/lib/cjs/collapse/collapse.css +6 -0
- package/lib/cjs/collapse/collapse.scss +8 -0
- package/lib/cjs/collapse/variables.scss +1 -0
- package/lib/cjs/datePicker/constants.d.ts +1 -0
- package/lib/cjs/datePicker/constants.js +1 -0
- package/lib/cjs/datePicker/datePicker.css +267 -27
- package/lib/cjs/datePicker/datePicker.scss +335 -17
- package/lib/cjs/datePicker/foundation.d.ts +2 -0
- package/lib/cjs/datePicker/monthsGridFoundation.d.ts +5 -1
- package/lib/cjs/datePicker/rtl.scss +6 -6
- package/lib/cjs/datePicker/variables.scss +58 -6
- package/lib/cjs/datePicker/yearAndMonthFoundation.d.ts +5 -0
- package/lib/cjs/select/foundation.d.ts +11 -0
- package/lib/cjs/select/foundation.js +188 -44
- package/lib/cjs/select/select.css +5 -5
- package/lib/cjs/select/select.scss +9 -6
- package/lib/cjs/tagInput/foundation.d.ts +11 -0
- package/lib/cjs/tagInput/foundation.js +47 -1
- package/lib/cjs/tagInput/tagInput.css +11 -0
- package/lib/cjs/tagInput/tagInput.scss +17 -0
- package/lib/cjs/tagInput/variables.scss +2 -0
- package/lib/cjs/tooltip/foundation.js +13 -5
- package/lib/cjs/transfer/foundation.d.ts +0 -1
- package/lib/cjs/transfer/foundation.js +3 -11
- package/lib/cjs/utils/arrayMove.d.ts +1 -0
- package/lib/cjs/utils/arrayMove.js +21 -0
- package/lib/es/collapse/collapse.css +6 -0
- package/lib/es/collapse/collapse.scss +8 -0
- package/lib/es/collapse/variables.scss +1 -0
- package/lib/es/datePicker/constants.d.ts +1 -0
- package/lib/es/datePicker/constants.js +1 -0
- package/lib/es/datePicker/datePicker.css +267 -27
- package/lib/es/datePicker/datePicker.scss +335 -17
- package/lib/es/datePicker/foundation.d.ts +2 -0
- package/lib/es/datePicker/monthsGridFoundation.d.ts +5 -1
- package/lib/es/datePicker/rtl.scss +6 -6
- package/lib/es/datePicker/variables.scss +58 -6
- package/lib/es/datePicker/yearAndMonthFoundation.d.ts +5 -0
- package/lib/es/select/foundation.d.ts +11 -0
- package/lib/es/select/foundation.js +187 -44
- package/lib/es/select/select.css +5 -5
- package/lib/es/select/select.scss +9 -6
- package/lib/es/tagInput/foundation.d.ts +11 -0
- package/lib/es/tagInput/foundation.js +46 -1
- package/lib/es/tagInput/tagInput.css +11 -0
- package/lib/es/tagInput/tagInput.scss +17 -0
- package/lib/es/tagInput/variables.scss +2 -0
- package/lib/es/tooltip/foundation.js +13 -5
- package/lib/es/transfer/foundation.d.ts +0 -1
- package/lib/es/transfer/foundation.js +3 -12
- package/lib/es/utils/arrayMove.d.ts +1 -0
- package/lib/es/utils/arrayMove.js +9 -0
- package/package.json +2 -2
- package/select/foundation.ts +149 -36
- package/select/select.scss +9 -6
- package/tagInput/foundation.ts +39 -0
- package/tagInput/tagInput.scss +17 -0
- package/tagInput/variables.scss +2 -0
- package/tooltip/foundation.ts +8 -5
- package/transfer/foundation.ts +2 -6
- package/utils/arrayMove.ts +5 -0
package/collapse/collapse.scss
CHANGED
package/collapse/variables.scss
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
$color-collapse_item-border-default: var(--semi-color-border); // 分割线颜色
|
|
2
2
|
$color-collapse_header-text-default: var(--semi-color-text-0); // 标题文字颜色
|
|
3
|
+
$color-collapse_header-text-disabled: var( --semi-color-disabled-text); // 标题文字颜色 禁用
|
|
3
4
|
$color-collapse_header-icon-default: var(--semi-color-text-2); // 展开箭头图标颜色
|
|
4
5
|
$color-collapse_header-bg-hover: var(--semi-color-fill-0); // 菜单项背景颜色 - 悬浮
|
|
5
6
|
$color-collapse_header-bg-active: var(--semi-color-fill-1); // 菜单项背景颜色 - 按下
|
package/datePicker/constants.ts
CHANGED
|
@@ -47,6 +47,7 @@ const strings = {
|
|
|
47
47
|
DEFAULT_SEPARATOR_RANGE: ' ~ ',
|
|
48
48
|
SIZE_SET: ['small', 'default', 'large'],
|
|
49
49
|
TYPE_SET: ['date', 'dateRange', 'year', 'month', 'dateTime', 'dateTimeRange'],
|
|
50
|
+
PRESET_POSITION_SET: ['left', 'right', 'top', 'bottom'],
|
|
50
51
|
DENSITY_SET: ['default', 'compact'],
|
|
51
52
|
PANEL_TYPE_LEFT: 'left',
|
|
52
53
|
PANEL_TYPE_RIGHT: 'right',
|
|
@@ -74,6 +74,14 @@ $module: #{$prefix}-datepicker;
|
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
+
// when preset postion is left or right, and insetinput is false, let the month panel get the fixed height
|
|
78
|
+
&[x-preset-position=left][x-insetinput=false],
|
|
79
|
+
&[x-preset-position=right][x-insetinput=false] {
|
|
80
|
+
.#{$module}-month {
|
|
81
|
+
height: $height-datepicker_month_max;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
77
85
|
// 年月选择返回主面板
|
|
78
86
|
.#{$module}-yearmonth-header {
|
|
79
87
|
background: $color-datepicker_header-bg-default;
|
|
@@ -138,7 +146,8 @@ $module: #{$prefix}-datepicker;
|
|
|
138
146
|
// 年月选择器
|
|
139
147
|
|
|
140
148
|
&-panel-yam {
|
|
141
|
-
max-width
|
|
149
|
+
// add left or right preset panel to panel yam, max-width will be bigger
|
|
150
|
+
max-width: $width-datepicker_monthPanel_max + $width-datepicker_presetPanel_left_and_right;
|
|
142
151
|
|
|
143
152
|
.#{$prefix}-scrolllist {
|
|
144
153
|
box-shadow: none;
|
|
@@ -560,30 +569,188 @@ $module: #{$prefix}-datepicker;
|
|
|
560
569
|
}
|
|
561
570
|
|
|
562
571
|
// 预设
|
|
563
|
-
|
|
564
572
|
&-quick-control {
|
|
565
573
|
box-sizing: border-box;
|
|
566
|
-
border-top: $width-datepicker-border solid $color-datepicker_border-bg-default;
|
|
567
|
-
display: flex;
|
|
568
|
-
align-items: center;
|
|
569
574
|
background-color: $color-datepicker_quick-bg-default;
|
|
570
|
-
padding: $spacing-datepicker_quick_control_padding;
|
|
571
|
-
border-radius: 0 0 $width-datepicker_quick_control-borderRadius $width-datepicker_quick_control-borderRadius;
|
|
572
|
-
flex-wrap: wrap;
|
|
573
575
|
|
|
574
|
-
&-
|
|
575
|
-
|
|
576
|
+
&-header {
|
|
577
|
+
padding: $spacing-datepicker_quick_control_header-paddingTop $spacing-datepicker_quick_control_content-paddingX 0;
|
|
578
|
+
font-weight: $font-datepicker_preset_header-fontWeight;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
&-left {
|
|
582
|
+
border-right: $width-datepicker-border solid $color-datepicker_border-bg-default;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
&-right {
|
|
586
|
+
border-left: $width-datepicker-border solid $color-datepicker_border-bg-default;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
&-top {
|
|
590
|
+
border-bottom: $width-datepicker-border solid $color-datepicker_border-bg-default;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
&-bottom {
|
|
594
|
+
border-top: $width-datepicker-border solid $color-datepicker_border-bg-default;
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
&-left-content-wrapper,
|
|
598
|
+
&-right-content-wrapper {
|
|
599
|
+
max-width: $width-datepicker_presetPanel_left_and_right;
|
|
600
|
+
margin-top: $spacing-datepicker_quick_control_content-marginTop;
|
|
601
|
+
overflow-y: auto;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
&-top-content-wrapper,
|
|
605
|
+
&-bottom-content-wrapper {
|
|
606
|
+
overflow-y: auto;
|
|
607
|
+
max-height: $height-datepicker_presetPanel_top_and_bottom_max;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
&-left-content,
|
|
611
|
+
&-right-content {
|
|
612
|
+
box-sizing: border-box;
|
|
613
|
+
display: grid;
|
|
614
|
+
align-content: flex-start;
|
|
615
|
+
grid-gap: $spacing-datepicker_quick_control_item-margin;
|
|
616
|
+
grid-template-columns: repeat(2, minmax($width-datepicker_presetPanel_left_and_right_two_col_button - $width-datepicker_presetPanel_scroll_bar * 0.5 , $width-datepicker_presetPanel_left_and_right_two_col_button));
|
|
617
|
+
padding: 0 $spacing-datepicker_quick_control_content-paddingX $spacing-datepicker_quick_control_content-paddingX;
|
|
618
|
+
|
|
619
|
+
&-item {
|
|
620
|
+
max-width: $width-datepicker_presetPanel_left_and_right_two_col_button;
|
|
621
|
+
&-ellipsis {
|
|
622
|
+
// ellipsis text content, $spacing-datepicker_quick_control_item-margin(default 8px)space left and right
|
|
623
|
+
width: $width-datepicker_presetPanel_left_and_right_two_col_button - ($spacing-datepicker_quick_control_item-margin * 2);
|
|
624
|
+
color: $color-datepicker_quick_button-text-default;
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
&-top-content,
|
|
630
|
+
&-bottom-content {
|
|
631
|
+
display: grid;
|
|
632
|
+
grid-gap: $spacing-datepicker_quick_control_item-margin;
|
|
633
|
+
// 5px = $width-datepicker_presetPanel_scroll_bar / 3
|
|
634
|
+
grid-template-columns: repeat(3, minmax($width-datepicker_presetPanel_top_and_bottom_three_col_button - 5px, $width-datepicker_presetPanel_top_and_bottom_three_col_button));
|
|
635
|
+
align-content: flex-start;
|
|
636
|
+
padding: $spacing-datepicker_quick_control_item-margin $spacing-datepicker_quick_control_top_and_bottom_content-paddingX;
|
|
637
|
+
|
|
638
|
+
&-item {
|
|
639
|
+
max-width: $width-datepicker_presetPanel_top_and_bottom_three_col_button;
|
|
640
|
+
&-ellipsis {
|
|
641
|
+
width: $width-datepicker_presetPanel_top_and_bottom_three_col_button - ($spacing-datepicker_quick_control_item-margin * 2);
|
|
642
|
+
color: $color-datepicker_quick_button-text-default;
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
&-top-range-content,
|
|
648
|
+
&-bottom-range-content {
|
|
649
|
+
box-sizing: border-box;
|
|
650
|
+
display: grid;
|
|
651
|
+
align-content: flex-start;
|
|
652
|
+
// 3px = $width-datepicker_presetPanel_scroll_bar / 5
|
|
653
|
+
grid-template-columns: repeat(5, minmax($width-datepicker_presetPanel_top_and_bottom_five_col_button - 3px, $width-datepicker_presetPanel_top_and_bottom_five_col_button));
|
|
654
|
+
grid-gap: $spacing-datepicker_quick_control_item-margin;
|
|
655
|
+
padding: $spacing-datepicker_quick_control_item-margin $spacing-datepicker_quick_control_top_and_bottom_content-paddingX;
|
|
656
|
+
|
|
657
|
+
&-item {
|
|
658
|
+
max-width: $width-datepicker_presetPanel_top_and_bottom_five_col_button;
|
|
659
|
+
&-ellipsis {
|
|
660
|
+
width: $width-datepicker_presetPanel_top_and_bottom_five_col_button - ($spacing-datepicker_quick_control_item-margin * 2);
|
|
661
|
+
color: $color-datepicker_quick_button-text-default;
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
&-top-month-content,
|
|
667
|
+
&-bottom-month-content {
|
|
668
|
+
box-sizing: border-box;
|
|
669
|
+
display: grid;
|
|
670
|
+
grid-template-columns: repeat(2, minmax($width-datepicker_presetPanel_top_and_bottom_two_col_button - $width-datepicker_presetPanel_scroll_bar * 0.5, $width-datepicker_presetPanel_top_and_bottom_two_col_button));
|
|
671
|
+
grid-gap: $spacing-datepicker_quick_control_item-margin;
|
|
672
|
+
align-content: flex-start;
|
|
673
|
+
padding: $spacing-datepicker_quick_control_item-margin $spacing-datepicker_quick_control_top_and_bottom_content-paddingX;
|
|
674
|
+
|
|
675
|
+
&-item {
|
|
676
|
+
max-width: $width-datepicker_presetPanel_top_and_bottom_two_col_button;
|
|
677
|
+
&-ellipsis {
|
|
678
|
+
max-width: $width-datepicker_presetPanel_top_and_bottom_two_col_button - ($spacing-datepicker_quick_control_item-margin * 2);
|
|
679
|
+
color: $color-datepicker_quick_button-text-default;
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
|
|
685
|
+
&-month {
|
|
686
|
+
max-width: $width-datepicker_monthPanel_max;
|
|
687
|
+
&[x-insetinput=true] {
|
|
688
|
+
.#{$module}-quick-control-right-content-wrapper,
|
|
689
|
+
.#{$module}-quick-control-left-content-wrapper {
|
|
690
|
+
max-height: $height-datepicker_panel_yam_scrolllist - $height-datepicker_presetPanel_left_and_right_except_content + $height-datepicker_inset_input;
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
.#{$module}-quick-control-right-content-wrapper,
|
|
695
|
+
.#{$module}-quick-control-left-content-wrapper {
|
|
696
|
+
max-height: $height-datepicker_panel_yam_scrolllist - $height-datepicker_presetPanel_left_and_right_except_content;
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
&-date {
|
|
701
|
+
max-width: $width-datepicker_monthPanel_max;
|
|
702
|
+
&[x-insetinput=true] {
|
|
703
|
+
.#{$module}-quick-control-right-content-wrapper,
|
|
704
|
+
.#{$module}-quick-control-left-content-wrapper {
|
|
705
|
+
max-height: $height-datepicker_preset_panel_inset_input - $height-datepicker_presetPanel_left_and_right_except_content;
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
.#{$module}-quick-control-right-content-wrapper,
|
|
709
|
+
.#{$module}-quick-control-left-content-wrapper {
|
|
710
|
+
max-height: $height-datepicker_date_panel - $height-datepicker_presetPanel_left_and_right_except_content;
|
|
711
|
+
}
|
|
576
712
|
}
|
|
577
713
|
|
|
578
|
-
&-month,
|
|
579
|
-
&-date,
|
|
580
714
|
&-dateTime {
|
|
581
715
|
max-width: $width-datepicker_monthPanel_max;
|
|
716
|
+
&[x-insetinput=true] {
|
|
717
|
+
.#{$module}-quick-control-right-content-wrapper,
|
|
718
|
+
.#{$module}-quick-control-left-content-wrapper {
|
|
719
|
+
max-height: $height-datepicker_preset_panel_inset_input - $height-datepicker_presetPanel_left_and_right_except_content;
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
.#{$module}-quick-control-right-content-wrapper,
|
|
723
|
+
.#{$module}-quick-control-left-content-wrapper {
|
|
724
|
+
max-height: $height-datepicker_date_time_panel - $height-datepicker_presetPanel_left_and_right_except_content;
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
&-dateRange {
|
|
729
|
+
max-width: $width-datepicker_monthPanel_max * 2;
|
|
730
|
+
&[x-insetinput=true] {
|
|
731
|
+
.#{$module}-quick-control-right-content-wrapper,
|
|
732
|
+
.#{$module}-quick-control-left-content-wrapper {
|
|
733
|
+
max-height: $height-datepicker_preset_panel_inset_input - $height-datepicker_presetPanel_left_and_right_except_content;
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
.#{$module}-quick-control-right-content-wrapper,
|
|
737
|
+
.#{$module}-quick-control-left-content-wrapper {
|
|
738
|
+
max-height: $height-datepicker_date_panel - $height-datepicker_presetPanel_left_and_right_except_content;
|
|
739
|
+
}
|
|
582
740
|
}
|
|
583
741
|
|
|
584
|
-
&-dateRange,
|
|
585
742
|
&-dateTimeRange {
|
|
586
743
|
max-width: $width-datepicker_monthPanel_max * 2;
|
|
744
|
+
&[x-insetinput=true] {
|
|
745
|
+
.#{$module}-quick-control-right-content-wrapper,
|
|
746
|
+
.#{$module}-quick-control-left-content-wrapper {
|
|
747
|
+
max-height: $height-datepicker_preset_panel_inset_input - $height-datepicker_presetPanel_left_and_right_except_content;
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
.#{$module}-quick-control-right-content-wrapper,
|
|
751
|
+
.#{$module}-quick-control-left-content-wrapper {
|
|
752
|
+
max-height: $height-datepicker_date_time_panel - $height-datepicker_presetPanel_left_and_right_except_content;
|
|
753
|
+
}
|
|
587
754
|
}
|
|
588
755
|
}
|
|
589
756
|
|
|
@@ -879,6 +1046,15 @@ $module: #{$prefix}-datepicker;
|
|
|
879
1046
|
min-height: $height-datepicker_yam_panel_compact;
|
|
880
1047
|
}
|
|
881
1048
|
|
|
1049
|
+
// when preset postion is left or right, and insetinput is false, let the month panel get the fixed height
|
|
1050
|
+
&[x-preset-position=left][x-insetinput=false],
|
|
1051
|
+
&[x-preset-position=right][x-insetinput=false] {
|
|
1052
|
+
|
|
1053
|
+
.#{$module}-month {
|
|
1054
|
+
height: $height-datepicker_month_max_compact;
|
|
1055
|
+
}
|
|
1056
|
+
}
|
|
1057
|
+
|
|
882
1058
|
.#{$module}-yearmonth-header {
|
|
883
1059
|
box-sizing: border-box;
|
|
884
1060
|
height: $height-datepicker_yam_panel_header_compact;
|
|
@@ -1112,17 +1288,159 @@ $module: #{$prefix}-datepicker;
|
|
|
1112
1288
|
}
|
|
1113
1289
|
|
|
1114
1290
|
.#{$module}-quick-control {
|
|
1115
|
-
padding: $spacing-datepicker_compact-padding;
|
|
1116
1291
|
|
|
1117
|
-
&-
|
|
1118
|
-
|
|
1292
|
+
&-header {
|
|
1293
|
+
padding: $spacing-datepicker_quick_control_header_compact-paddingTop $spacing-datepicker_quick_control_left_and_right_content_compact-paddingX 0;
|
|
1294
|
+
font-weight: $font-datepicker_preset_header-fontWeight;
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
&-left-content-wrapper,
|
|
1298
|
+
&-right-content-wrapper {
|
|
1299
|
+
margin-top: $spacing-datepicker_quick_control_content_compact-marginTop;
|
|
1300
|
+
}
|
|
1301
|
+
|
|
1302
|
+
&-left-content,
|
|
1303
|
+
&-right-content {
|
|
1304
|
+
box-sizing: border-box;
|
|
1305
|
+
display: grid;
|
|
1306
|
+
align-content: flex-start;
|
|
1307
|
+
grid-gap: $spacing-datepicker_quick_control_item-margin;
|
|
1308
|
+
grid-template-columns: repeat(2, minmax($width-datepicker_presetPanel_left_and_right_two_col_button - $width-datepicker_presetPanel_scroll_bar * 0.5, $width-datepicker_presetPanel_left_and_right_two_col_button));
|
|
1309
|
+
padding: 0 $spacing-datepicker_quick_control_left_and_right_content_compact-paddingX $spacing-datepicker_quick_control_left_and_right_content_compact-paddingX;
|
|
1310
|
+
|
|
1311
|
+
&-item {
|
|
1312
|
+
max-width: $width-datepicker_presetPanel_left_and_right_two_col_button;
|
|
1313
|
+
&-ellipsis {
|
|
1314
|
+
width: $width-datepicker_presetPanel_left_and_right_two_col_button - ($spacing-datepicker_quick_control_item-margin * 2);
|
|
1315
|
+
font-size: $fontSize-datepicker_insetInput_compact-fontSize;
|
|
1316
|
+
color: $color-datepicker_quick_button-text-default;
|
|
1317
|
+
}
|
|
1318
|
+
}
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
&-top-content,
|
|
1322
|
+
&-bottom-content {
|
|
1323
|
+
box-sizing: border-box;
|
|
1324
|
+
display: grid;
|
|
1325
|
+
grid-gap: $spacing-datepicker_quick_control_item-margin;
|
|
1326
|
+
grid-template-columns: repeat(3, minmax($width-datepicker_presetPanel_top_and_bottom_three_col_button_compact - 5px, $width-datepicker_presetPanel_top_and_bottom_three_col_button_compact));
|
|
1327
|
+
align-content: flex-start;
|
|
1328
|
+
padding: $spacing-datepicker_quick_control_item-margin $spacing-datepicker_quick_control_top_and_bottom_content_compact-paddingX;
|
|
1329
|
+
|
|
1330
|
+
&-item {
|
|
1331
|
+
max-width: $width-datepicker_presetPanel_top_and_bottom_three_col_button_compact;
|
|
1332
|
+
&-ellipsis {
|
|
1333
|
+
width: $width-datepicker_presetPanel_top_and_bottom_three_col_button_compact - ($spacing-datepicker_quick_control_item-margin * 2);
|
|
1334
|
+
font-size: $fontSize-datepicker_insetInput_compact-fontSize;
|
|
1335
|
+
color: $color-datepicker_quick_button-text-default;
|
|
1336
|
+
}
|
|
1337
|
+
}
|
|
1338
|
+
}
|
|
1339
|
+
|
|
1340
|
+
&-top-range-content,
|
|
1341
|
+
&-bottom-range-content {
|
|
1342
|
+
display: grid;
|
|
1343
|
+
grid-template-columns: repeat(5, minmax($width-datepicker_presetPanel_top_and_bottom_five_col_button_compact - 3px, $width-datepicker_presetPanel_top_and_bottom_five_col_button_compact));
|
|
1344
|
+
grid-gap: $spacing-datepicker_quick_control_item-margin;
|
|
1345
|
+
align-content: flex-start;
|
|
1346
|
+
padding: $spacing-datepicker_quick_control_item-margin $spacing-datepicker_quick_control_top_and_bottom_content_compact-paddingX;
|
|
1347
|
+
|
|
1348
|
+
&-item {
|
|
1349
|
+
max-width: $width-datepicker_presetPanel_top_and_bottom_five_col_button_compact;
|
|
1350
|
+
&-ellipsis {
|
|
1351
|
+
width: $width-datepicker_presetPanel_top_and_bottom_five_col_button_compact - ($spacing-datepicker_quick_control_item-margin * 2);
|
|
1352
|
+
font-size: $fontSize-datepicker_insetInput_compact-fontSize;
|
|
1353
|
+
color: $color-datepicker_quick_button-text-default;
|
|
1354
|
+
}
|
|
1355
|
+
}
|
|
1356
|
+
}
|
|
1357
|
+
|
|
1358
|
+
&-top-month-content,
|
|
1359
|
+
&-bottom-month-content {
|
|
1360
|
+
display: grid;
|
|
1361
|
+
grid-template-columns: repeat(2, minmax($width-datepicker_presetPanel_top_and_bottom_two_col_button_compact - $width-datepicker_presetPanel_scroll_bar * 0.5, $width-datepicker_presetPanel_top_and_bottom_two_col_button_compact));
|
|
1362
|
+
grid-gap: $spacing-datepicker_quick_control_item-margin;
|
|
1363
|
+
align-content: flex-start;
|
|
1364
|
+
padding: $spacing-datepicker_quick_control_item-margin $spacing-datepicker_quick_control_top_and_bottom_content_compact-paddingX;
|
|
1365
|
+
|
|
1366
|
+
&-item {
|
|
1367
|
+
max-width: $width-datepicker_presetPanel_top_and_bottom_two_col_button_compact;
|
|
1368
|
+
&-ellipsis {
|
|
1369
|
+
max-width: $width-datepicker_presetPanel_top_and_bottom_two_col_button_compact - ($spacing-datepicker_quick_control_item-margin * 2);
|
|
1370
|
+
font-size: $fontSize-datepicker_insetInput_compact-fontSize;
|
|
1371
|
+
color: $color-datepicker_quick_button-text-default;
|
|
1372
|
+
}
|
|
1373
|
+
}
|
|
1374
|
+
}
|
|
1375
|
+
|
|
1376
|
+
&-month {
|
|
1377
|
+
max-width: $width-datepicker_panel_compact;
|
|
1378
|
+
&[x-insetinput=true] {
|
|
1379
|
+
.#{$module}-quick-control-right-content-wrapper,
|
|
1380
|
+
.#{$module}-quick-control-left-content-wrapper {
|
|
1381
|
+
max-height: $height-datepicker_panel_yam_scrolllist - $height-datepicker_presetPanel_left_and_right_except_content_compact + $height-datepicker_inset_input_compact;
|
|
1382
|
+
}
|
|
1383
|
+
}
|
|
1384
|
+
.#{$module}-quick-control-right-content-wrapper,
|
|
1385
|
+
.#{$module}-quick-control-left-content-wrapper {
|
|
1386
|
+
max-height: $height-datepicker_panel_yam_scrolllist - $height-datepicker_presetPanel_left_and_right_except_content_compact;
|
|
1387
|
+
}
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1390
|
+
&-date {
|
|
1391
|
+
max-width: $width-datepicker_panel_compact;
|
|
1392
|
+
&[x-insetinput=true] {
|
|
1393
|
+
.#{$module}-quick-control-right-content-wrapper,
|
|
1394
|
+
.#{$module}-quick-control-left-content-wrapper {
|
|
1395
|
+
max-height: $height-datepicker_preset_panel_inset_input_compact - $height-datepicker_presetPanel_left_and_right_except_content_compact;
|
|
1396
|
+
}
|
|
1397
|
+
}
|
|
1398
|
+
.#{$module}-quick-control-right-content-wrapper,
|
|
1399
|
+
.#{$module}-quick-control-left-content-wrapper {
|
|
1400
|
+
max-height: $height-datepicker_date_panel_compact - $height-datepicker_presetPanel_left_and_right_except_content_compact;
|
|
1401
|
+
}
|
|
1402
|
+
}
|
|
1403
|
+
|
|
1119
1404
|
&-dateTime {
|
|
1120
1405
|
max-width: $width-datepicker_panel_compact;
|
|
1406
|
+
&[x-insetinput=true] {
|
|
1407
|
+
.#{$module}-quick-control-right-content-wrapper,
|
|
1408
|
+
.#{$module}-quick-control-left-content-wrapper {
|
|
1409
|
+
max-height: $height-datepicker_preset_panel_inset_input_compact - $height-datepicker_presetPanel_left_and_right_except_content_compact;
|
|
1410
|
+
}
|
|
1411
|
+
}
|
|
1412
|
+
.#{$module}-quick-control-right-content-wrapper,
|
|
1413
|
+
.#{$module}-quick-control-left-content-wrapper {
|
|
1414
|
+
max-height: $height-datepicker_date_time_panel_compact - $height-datepicker_presetPanel_left_and_right_except_content_compact;
|
|
1415
|
+
}
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1418
|
+
&-dateRange {
|
|
1419
|
+
max-width: $width-datepicker_panel_compact * 2;
|
|
1420
|
+
&[x-insetinput=true] {
|
|
1421
|
+
.#{$module}-quick-control-right-content-wrapper,
|
|
1422
|
+
.#{$module}-quick-control-left-content-wrapper {
|
|
1423
|
+
max-height: $height-datepicker_preset_panel_inset_input_compact - $height-datepicker_presetPanel_left_and_right_except_content_compact;
|
|
1424
|
+
}
|
|
1425
|
+
}
|
|
1426
|
+
.#{$module}-quick-control-right-content-wrapper,
|
|
1427
|
+
.#{$module}-quick-control-left-content-wrapper {
|
|
1428
|
+
max-height: $height-datepicker_date_panel_compact - $height-datepicker_presetPanel_left_and_right_except_content_compact;
|
|
1429
|
+
}
|
|
1121
1430
|
}
|
|
1122
1431
|
|
|
1123
|
-
&-dateRange,
|
|
1124
1432
|
&-dateTimeRange {
|
|
1125
1433
|
max-width: $width-datepicker_panel_compact * 2;
|
|
1434
|
+
&[x-insetinput=true] {
|
|
1435
|
+
.#{$module}-quick-control-right-content-wrapper,
|
|
1436
|
+
.#{$module}-quick-control-left-content-wrapper {
|
|
1437
|
+
max-height: $height-datepicker_preset_panel_inset_input_compact - $height-datepicker_presetPanel_left_and_right_except_content_compact;
|
|
1438
|
+
}
|
|
1439
|
+
}
|
|
1440
|
+
.#{$module}-quick-control-right-content-wrapper,
|
|
1441
|
+
.#{$module}-quick-control-left-content-wrapper {
|
|
1442
|
+
max-height: $height-datepicker_date_time_panel_compact - $height-datepicker_presetPanel_left_and_right_except_content_compact;
|
|
1443
|
+
}
|
|
1126
1444
|
}
|
|
1127
1445
|
}
|
|
1128
1446
|
|
package/datePicker/foundation.ts
CHANGED
|
@@ -22,6 +22,7 @@ import getInsetInputValueFromInsetInputStr from './_utils/getInsetInputValueFrom
|
|
|
22
22
|
export type ValidateStatus = ArrayElement<typeof strings.STATUS>;
|
|
23
23
|
export type InputSize = ArrayElement<typeof strings.SIZE_SET>;
|
|
24
24
|
export type Position = ArrayElement<typeof strings.POSITION_SET>;
|
|
25
|
+
export type PresetPosition = ArrayElement<typeof strings.PRESET_POSITION_SET>;
|
|
25
26
|
|
|
26
27
|
export type BaseValueType = string | number | Date;
|
|
27
28
|
export type DayStatusType = {
|
|
@@ -141,6 +142,7 @@ export interface DatePickerFoundationProps extends ElementProps, RenderProps, Ev
|
|
|
141
142
|
position?: Position;
|
|
142
143
|
prefixCls?: string;
|
|
143
144
|
presets?: PresetsType;
|
|
145
|
+
presetPosition?: PresetPosition;
|
|
144
146
|
showClear?: boolean;
|
|
145
147
|
size?: InputSize;
|
|
146
148
|
spacing?: number;
|
|
@@ -20,7 +20,7 @@ import { includes, isSet, isEqual, isFunction } from 'lodash';
|
|
|
20
20
|
import { zonedTimeToUtc } from '../utils/date-fns-extra';
|
|
21
21
|
import { getDefaultFormatTokenByType } from './_utils/getDefaultFormatToken';
|
|
22
22
|
import isNullOrUndefined from '../utils/isNullOrUndefined';
|
|
23
|
-
import { BaseValueType, ValueType } from './foundation';
|
|
23
|
+
import { BaseValueType, PresetPosition, ValueType } from './foundation';
|
|
24
24
|
import { MonthDayInfo } from './monthFoundation';
|
|
25
25
|
import { ArrayElement } from '../utils/type';
|
|
26
26
|
|
|
@@ -91,6 +91,9 @@ export interface MonthsGridFoundationProps extends MonthsGridElementProps {
|
|
|
91
91
|
focusRecordsRef?: any;
|
|
92
92
|
triggerRender?: (props: Record<string, any>) => any;
|
|
93
93
|
insetInput: boolean;
|
|
94
|
+
presetPosition?: PresetPosition;
|
|
95
|
+
renderQuickControls?: React.ReactNode;
|
|
96
|
+
renderDateInput?: React.ReactNode;
|
|
94
97
|
}
|
|
95
98
|
|
|
96
99
|
export interface MonthInfo {
|
package/datePicker/rtl.scss
CHANGED
|
@@ -66,13 +66,13 @@ $module: #{$prefix}-datepicker;
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
&-quick-control {
|
|
69
|
+
// &-quick-control {
|
|
70
70
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
71
|
+
// &-item {
|
|
72
|
+
// margin-left: 0;
|
|
73
|
+
// margin-right: $spacing-datepicker_quick_control_item-marginRight;
|
|
74
|
+
// }
|
|
75
|
+
// }
|
|
76
76
|
|
|
77
77
|
&-navigation,
|
|
78
78
|
&-yam {
|
|
@@ -15,6 +15,9 @@ $height-datepicker_yamShowing_min: 378px; // 日期时间选择器菜单最小
|
|
|
15
15
|
$width-datepicker_yamShowing_min: 284px; // 选择器菜单最小宽度
|
|
16
16
|
$height-datepicker_dateType_yamShowing_min: 325px; // 日期选择器菜单最小高度
|
|
17
17
|
$width-datepicker_panel_yam_scrolllist_li_min: 64px; // 年月、时间滚动菜单项最小高度
|
|
18
|
+
$width-datepicker_presetPanel_left_and_right: 200px; // 左右方位快捷选择面板宽度
|
|
19
|
+
$height-datepicker_presetPanel_top_and_bottom_max: 100px; // 上下方位快捷选择面板最大高度
|
|
20
|
+
$width-datepicker_presetPanel_scroll_bar: 15px; // 快捷选择面板scrollbar宽度
|
|
18
21
|
|
|
19
22
|
$width-datepicker-border: $border-thickness-control; // 年月选择 header 底部分割线宽度
|
|
20
23
|
$width-datepicker_yam_header-borderRadius: var(--semi-border-radius-medium); // 年月选择 header 按钮圆角
|
|
@@ -29,8 +32,8 @@ $width-datepicker_insetInput_date_type_wrapper: 284px; // 日期类型内嵌输
|
|
|
29
32
|
$width-datepicker_insetInput_date_range_type_wrapper: $width-datepicker_insetInput_date_type_wrapper * 2; // 范围选择内嵌输入框宽度
|
|
30
33
|
$width-datepicker_insetInput_month_type_wrapper: 204px; // 月份类型内嵌输入框宽度
|
|
31
34
|
$height-datepicker_insetInput_separator: 32px;
|
|
32
|
-
$height-datepicker_month_grid_yearType_insetInput:
|
|
33
|
-
$height-datepicker_month_grid_timeType_insetInput:
|
|
35
|
+
$height-datepicker_month_grid_yearType_insetInput: 317px;
|
|
36
|
+
$height-datepicker_month_grid_timeType_insetInput: 317px;
|
|
34
37
|
|
|
35
38
|
// Spacing
|
|
36
39
|
$spacing-datepicker_day-marginX: ($width-datepicker_day - $width-datepicker_day_main) / 2; // 日期格子水平外边距
|
|
@@ -49,8 +52,11 @@ $spacing-datepicker_month-padding: $spacing-base;
|
|
|
49
52
|
$spacing-datepicker_switch_datetime-paddingTop: $spacing-base; // 日期时间切换顶部内边距
|
|
50
53
|
$spacing-datepicker_switch_datetime-paddingBottom: $spacing-base; // 日期时间切换底部内边距
|
|
51
54
|
$spacing-datepicker_switch_text-paddingLeft: $spacing-tight; // 日期时间切换左侧内边距
|
|
52
|
-
$spacing-
|
|
53
|
-
$spacing-
|
|
55
|
+
$spacing-datepicker_quick_control_header-paddingTop: 18px; // 快捷面板标题,上内边距
|
|
56
|
+
$spacing-datepicker_quick_control_top_and_bottom_content-paddingX: $spacing-base-loose; // 上下方位快捷操作面板, 左右内边距,默认20px
|
|
57
|
+
$spacing-datepicker_quick_control_content-paddingX: 12px; // 快捷面板内容,左右内边距
|
|
58
|
+
$spacing-datepicker_quick_control_content-marginTop: 14px; // 快捷面板内容,上边距
|
|
59
|
+
$spacing-datepicker_quick_control_item-margin: $spacing-tight; // 快捷操作面板按钮间距
|
|
54
60
|
$spacing-datepicker_range_input-paddingX: 8px;
|
|
55
61
|
$spacing-datepicker_range_input-paddingY: 3px;
|
|
56
62
|
$spacing-datepicker_range_input_inputWrapper_input-paddingY: 2px;
|
|
@@ -77,6 +83,7 @@ $color-datepicker_list-bg-default: var(--semi-color-bg-3); // 日期选择器滚
|
|
|
77
83
|
$color-datepicker_border-bg-default: var(--semi-color-border); // 日期选择器描边颜色
|
|
78
84
|
$color-datepicker_footer-bg-default: var(--semi-color-fill-0); // 日期选择器确认选择 footer 背景颜色
|
|
79
85
|
$color-datepicker_quick-bg-default: transparent; // 日期选择器快捷操作背景颜色
|
|
86
|
+
$color-datepicker_quick_button-text-default: var(--semi-color-primary); // 日期选择器快捷操作按钮文字颜色
|
|
80
87
|
|
|
81
88
|
$color-datepicker_day-text-default: var(--semi-color-text-2); // 日期时间切换文字颜色 - 默认
|
|
82
89
|
$color-datepicker_day-text-hover: var(--semi-color-fill-1); // 日期时间切换文字颜色 - 悬浮
|
|
@@ -138,6 +145,7 @@ $color-datepicker_insetInput_separator: var(--semi-color-text-3);
|
|
|
138
145
|
|
|
139
146
|
// Font
|
|
140
147
|
$font-datepicker_range_input_prefix_suffix_clearbtn-fontWeight: 600;
|
|
148
|
+
$font-datepicker_preset_header-fontWeight: 600;
|
|
141
149
|
$font-datepicker_range_input_prefix_suffix_clearbtn-fontSize: 14px;
|
|
142
150
|
$font-datepicker_range_input_prefix_suffix_clearbtn-lineHeight: 20px;
|
|
143
151
|
$font-datepicker_range_input_large-fontSize: 16px;
|
|
@@ -153,8 +161,8 @@ $width-datepicker_month_compact: $width-datepicker_day_compact * 7 + $spacing-da
|
|
|
153
161
|
$width-datepicker_nav_compact: 24px;
|
|
154
162
|
$width-datepicker_panel_compact: 216px;
|
|
155
163
|
$height-datepicker_switch_compact: 32px;
|
|
156
|
-
$height-datepicker_tpk_compact:
|
|
157
|
-
$height-datepicker_yam_panel_compact:
|
|
164
|
+
$height-datepicker_tpk_compact: 256px;
|
|
165
|
+
$height-datepicker_yam_panel_compact: 256px;
|
|
158
166
|
$height-datepicker_yam_li_compact: 32px;
|
|
159
167
|
$height-datepicker_yam_panel_header_compact: 48px;
|
|
160
168
|
$radius-datepicker_range_input_inputWrapper: var(--semi-border-radius-small);
|
|
@@ -193,9 +201,53 @@ $spacing-datepicker_insetInput_wrapper_compact-paddingY: 8px;
|
|
|
193
201
|
$spacing-datepicker_insetInput_wrapper_compact-paddingX: 8px;
|
|
194
202
|
$spacing-datepicker_insetInput_wrapper_compact-paddingBottom: 0;
|
|
195
203
|
$spacing-datepicker_insetInput_wrapper_rangeType_compact-paddingTop: 0;
|
|
204
|
+
$spacing-datepicker_quick_control_header_compact-paddingTop: 16px; // compact, 快捷面板标题,上内边距
|
|
205
|
+
$spacing-datepicker_quick_control_content_compact-marginTop: 12px; // compact, 快捷面板内容,上边距
|
|
206
|
+
$spacing-datepicker_quick_control_left_and_right_content_compact-paddingX: 12px; // compact,左右方位,快捷面板内容,左右内边距
|
|
207
|
+
$spacing-datepicker_quick_control_top_and_bottom_content_compact-paddingX: 10px; // compact,上下方位,快捷面板内容,左右内边距
|
|
196
208
|
|
|
197
209
|
// Radius
|
|
198
210
|
$radius-datepicker_range_input: var(--semi-border-radius-small);
|
|
199
211
|
|
|
200
212
|
// Other
|
|
201
213
|
$transition-datepicker_range_input: background-color .16s ease-in-out;
|
|
214
|
+
|
|
215
|
+
// preset cacl
|
|
216
|
+
$width-datepicker_presetPanel_left_and_right_content: $width-datepicker_presetPanel_left_and_right - $spacing-datepicker_quick_control_content-paddingX * 2; // 左右方位快捷选择面板,内容宽度
|
|
217
|
+
$width-datepicker_presetPanel_top_and_bottom_content_date: $width-datepicker_day * 7 + $spacing-datepicker_month-padding * 2 - $spacing-datepicker_quick_control_top_and_bottom_content-paddingX * 2; // date/dateTime下, 上下方位快捷选择面板内容宽度, 默认(284 - 40)px
|
|
218
|
+
$width-datepicker_presetPanel_top_and_bottom_content_range: ($width-datepicker_day * 7 + $spacing-datepicker_month-padding * 2) * 2 - $spacing-datepicker_quick_control_top_and_bottom_content-paddingX * 2; // dateRange/dateTimeRange下, 上下方位快捷选择内容面板宽度,默认528px
|
|
219
|
+
$width-datepicker_presetPanel_top_and_bottom_content_month: 194px - $spacing-datepicker_quick_control_top_and_bottom_content-paddingX * 2; // month下,上下方位快捷选择内容面板宽度, 默认154px
|
|
220
|
+
|
|
221
|
+
$height-datepicker_month_max: $width-datepicker_day * 7 + 1px; // 年月面板最大高度, 最多6 + 1行,再加上一个border宽度, 默认253px
|
|
222
|
+
$height-datepicker_month_max_compact: $width-datepicker_day_compact * 7 + $spacing-datepicker_weeks_compact-paddingTop + $spacing-datepicker_weeks_compact-padding + $spacing-datepicker_weekday_compact-paddingBottom; // 年月面板最大高度, 最多6 + 1行,再加上padding,默认220px
|
|
223
|
+
$height-datepicker_date_panel: $height-datepicker_month_max + $spacing-datepicker_month-padding + $width-datepicker_nav + $spacing-datepicker_navigation-paddingY * 2; // date/dateRange,面板渲染最大高度,默认325px
|
|
224
|
+
$height-datepicker_date_time_panel: $height-datepicker_date_panel + $height-datepicker_switch - 1px; // dateTime/dateTImeRange 面板渲染最大高度. 默认378px
|
|
225
|
+
$height-datepicker_presetPanel_left_and_right_except_content: 20px + $spacing-datepicker_quick_control_header-paddingTop + $spacing-datepicker_quick_control_content-marginTop; // 除去content以外的高度,默认52px
|
|
226
|
+
|
|
227
|
+
// compact
|
|
228
|
+
$width-datepicker_presetPanel_top_and_bottom_content_date_compact: $width-datepicker_day_compact * 7 + $spacing-datepicker_weeks_compact-padding * 2 - $spacing-datepicker_quick_control_top_and_bottom_content_compact-paddingX * 2; // date/dateTime下, 上下方位快捷选择面板内容宽度, 默认(216 - 20)px
|
|
229
|
+
$width-datepicker_presetPanel_top_and_bottom_content_range_compact: ($width-datepicker_day_compact * 7 + $spacing-datepicker_weeks_compact-padding * 2) * 2 - $spacing-datepicker_quick_control_top_and_bottom_content_compact-paddingX * 2; // dateRange/dateTimeRange下, 上下方位快捷选择内容面板宽度,默认412px
|
|
230
|
+
$width-datepicker_presetPanel_top_and_bottom_content_month_compact: 194px - $spacing-datepicker_quick_control_top_and_bottom_content_compact-paddingX * 2; // month下,上下方位快捷选择内容面板宽度, 默认174px
|
|
231
|
+
|
|
232
|
+
$height-datepicker_date_panel_compact: $height-datepicker_month_max_compact + $width-datepicker_nav_compact + $spacing-datepicker_nav_compact-padding; // compact,date/dateRange,面板渲染最大高度,默认256px
|
|
233
|
+
$height-datepicker_date_time_panel_compact: $height-datepicker_date_panel_compact + $height-datepicker_switch_compact; // compact,dateTime/dateTImeRange,面板渲染最大高度,默认288px
|
|
234
|
+
$height-datepicker_presetPanel_left_and_right_except_content_compact: 20px + $spacing-datepicker_quick_control_header_compact-paddingTop + $spacing-datepicker_quick_control_content_compact-marginTop; // compact,除去content以外的高度,默认48px
|
|
235
|
+
|
|
236
|
+
$width-datepicker_presetPanel_left_and_right_two_col_button: ($width-datepicker_presetPanel_left_and_right_content - $spacing-datepicker_quick_control_item-margin) * 0.5; // 左右方位快捷选择面板,固定两列,按钮宽度
|
|
237
|
+
$width-datepicker_presetPanel_top_and_bottom_three_col_button: ($width-datepicker_presetPanel_top_and_bottom_content_date - $spacing-datepicker_quick_control_item-margin * 2) / 3; // 上下方位快捷选择面板,固定三列,按钮宽度
|
|
238
|
+
$width-datepicker_presetPanel_top_and_bottom_five_col_button: ($width-datepicker_presetPanel_top_and_bottom_content_range - $spacing-datepicker_quick_control_item-margin * 4) * 0.2; // 上下方位快捷选择面板,固定五列,按钮宽度
|
|
239
|
+
$width-datepicker_presetPanel_top_and_bottom_two_col_button:($width-datepicker_presetPanel_top_and_bottom_content_month - $spacing-datepicker_quick_control_item-margin) * 0.5; // 上下方位快捷选择面板,固定两列,按钮宽度
|
|
240
|
+
|
|
241
|
+
// compact
|
|
242
|
+
$width-datepicker_presetPanel_top_and_bottom_three_col_button_compact: ($width-datepicker_presetPanel_top_and_bottom_content_date_compact - $spacing-datepicker_quick_control_item-margin * 2) / 3; // 上下方位快捷选择面板,固定三列,按钮宽度
|
|
243
|
+
$width-datepicker_presetPanel_top_and_bottom_five_col_button_compact: ($width-datepicker_presetPanel_top_and_bottom_content_range_compact - $spacing-datepicker_quick_control_item-margin * 4) * 0.2; // 上下方位快捷选择面板,固定五列,按钮宽度
|
|
244
|
+
$width-datepicker_presetPanel_top_and_bottom_two_col_button_compact: ($width-datepicker_presetPanel_top_and_bottom_content_month_compact - $spacing-datepicker_quick_control_item-margin) * 0.5; // 上下方位快捷选择面板,固定两列,按钮宽度
|
|
245
|
+
|
|
246
|
+
// insetinput
|
|
247
|
+
$height-datepicker_inset_input: 32px + $spacing-datepicker_insetInput_wrapper-paddingY; // 默认尺寸,insetInput高度
|
|
248
|
+
$height-datepicker_preset_panel_inset_input: $height-datepicker_month_max + $spacing-datepicker_month-padding + $width-datepicker_nav + $spacing-datepicker_navigation_insetInput-paddingY * 2 + $height-datepicker_inset_input; // inset_input下,非month面板渲染最大高度,默认361px
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
// insetinput compact
|
|
252
|
+
$height-datepicker_inset_input_compact: 28px + $spacing-datepicker_insetInput_wrapper_compact-paddingY; // compact,insetInput高度, 默认36px
|
|
253
|
+
$height-datepicker_preset_panel_inset_input_compact: $height-datepicker_month_max_compact + $width-datepicker_nav_compact + $spacing-datepicker_insetInput_wrapper_compact-paddingY * 2 + $height-datepicker_inset_input_compact; // inset_input下,非month面板渲染最大高度,默认296px
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import BaseFoundation, { DefaultAdapter } from '../base/foundation';
|
|
2
|
+
import { PresetPosition } from './foundation';
|
|
2
3
|
|
|
3
4
|
export interface YearAndMonthFoundationProps {
|
|
4
5
|
currentYear?: number;
|
|
@@ -12,6 +13,9 @@ export interface YearAndMonthFoundationProps {
|
|
|
12
13
|
noBackBtn?: boolean;
|
|
13
14
|
disabledDate?: (date: Date) => boolean;
|
|
14
15
|
density?: string;
|
|
16
|
+
presetPosition?: PresetPosition;
|
|
17
|
+
renderQuickControls?: React.ReactNode;
|
|
18
|
+
renderDateInput?: React.ReactNode;
|
|
15
19
|
}
|
|
16
20
|
|
|
17
21
|
export interface YearAndMonthFoundationState {
|
|
@@ -50,6 +50,12 @@
|
|
|
50
50
|
.semi-collapse-header:active {
|
|
51
51
|
background-color: var(--semi-color-fill-1);
|
|
52
52
|
}
|
|
53
|
+
.semi-collapse-header-disabled {
|
|
54
|
+
color: var(--semi-color-disabled-text);
|
|
55
|
+
}
|
|
56
|
+
.semi-collapse-header-disabled:hover {
|
|
57
|
+
background-color: transparent;
|
|
58
|
+
}
|
|
53
59
|
.semi-collapse-content {
|
|
54
60
|
padding: 4px 16px 8px 16px;
|
|
55
61
|
color: var(--semi-color-text-1);
|