|
|
@@ -74,6 +74,14 @@ $module: #{$prefix}-datepicker;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ // when preset postion is left or right, and insetinput is false, let the month panel get the fixed height
|
|
|
+ &[x-preset-position=left][x-insetinput=false],
|
|
|
+ &[x-preset-position=right][x-insetinput=false] {
|
|
|
+ .#{$module}-month {
|
|
|
+ height: $height-datepicker_month_max;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// 年月选择返回主面板
|
|
|
.#{$module}-yearmonth-header {
|
|
|
background: $color-datepicker_header-bg-default;
|
|
|
@@ -138,7 +146,8 @@ $module: #{$prefix}-datepicker;
|
|
|
// 年月选择器
|
|
|
|
|
|
&-panel-yam {
|
|
|
- max-width: $width-datepicker_monthPanel_max;
|
|
|
+ // add left or right preset panel to panel yam, max-width will be bigger
|
|
|
+ max-width: $width-datepicker_monthPanel_max + $width-datepicker_presetPanel_left_and_right;
|
|
|
|
|
|
.#{$prefix}-scrolllist {
|
|
|
box-shadow: none;
|
|
|
@@ -560,30 +569,188 @@ $module: #{$prefix}-datepicker;
|
|
|
}
|
|
|
|
|
|
// 预设
|
|
|
-
|
|
|
&-quick-control {
|
|
|
box-sizing: border-box;
|
|
|
- border-top: $width-datepicker-border solid $color-datepicker_border-bg-default;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
background-color: $color-datepicker_quick-bg-default;
|
|
|
- padding: $spacing-datepicker_quick_control_padding;
|
|
|
- border-radius: 0 0 $width-datepicker_quick_control-borderRadius $width-datepicker_quick_control-borderRadius;
|
|
|
- flex-wrap: wrap;
|
|
|
|
|
|
- &-item {
|
|
|
- margin-right: $spacing-datepicker_quick_control_item-marginRight;
|
|
|
+ &-header {
|
|
|
+ padding: $spacing-datepicker_quick_control_header-paddingTop $spacing-datepicker_quick_control_content-paddingX 0;
|
|
|
+ font-weight: $font-datepicker_preset_header-fontWeight;
|
|
|
+ }
|
|
|
+
|
|
|
+ &-left {
|
|
|
+ border-right: $width-datepicker-border solid $color-datepicker_border-bg-default;
|
|
|
+ }
|
|
|
+
|
|
|
+ &-right {
|
|
|
+ border-left: $width-datepicker-border solid $color-datepicker_border-bg-default;
|
|
|
+ }
|
|
|
+
|
|
|
+ &-top {
|
|
|
+ border-bottom: $width-datepicker-border solid $color-datepicker_border-bg-default;
|
|
|
+ }
|
|
|
+
|
|
|
+ &-bottom {
|
|
|
+ border-top: $width-datepicker-border solid $color-datepicker_border-bg-default;
|
|
|
+ }
|
|
|
+
|
|
|
+ &-left-content-wrapper,
|
|
|
+ &-right-content-wrapper {
|
|
|
+ max-width: $width-datepicker_presetPanel_left_and_right;
|
|
|
+ margin-top: $spacing-datepicker_quick_control_content-marginTop;
|
|
|
+ overflow-y: auto;
|
|
|
+ }
|
|
|
+
|
|
|
+ &-top-content-wrapper,
|
|
|
+ &-bottom-content-wrapper {
|
|
|
+ overflow-y: auto;
|
|
|
+ max-height: $height-datepicker_presetPanel_top_and_bottom_max;
|
|
|
+ }
|
|
|
+
|
|
|
+ &-left-content,
|
|
|
+ &-right-content {
|
|
|
+ box-sizing: border-box;
|
|
|
+ display: grid;
|
|
|
+ align-content: flex-start;
|
|
|
+ grid-gap: $spacing-datepicker_quick_control_item-margin;
|
|
|
+ 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));
|
|
|
+ padding: 0 $spacing-datepicker_quick_control_content-paddingX $spacing-datepicker_quick_control_content-paddingX;
|
|
|
+
|
|
|
+ &-item {
|
|
|
+ max-width: $width-datepicker_presetPanel_left_and_right_two_col_button;
|
|
|
+ &-ellipsis {
|
|
|
+ // ellipsis text content, $spacing-datepicker_quick_control_item-margin(default 8px)space left and right
|
|
|
+ width: $width-datepicker_presetPanel_left_and_right_two_col_button - ($spacing-datepicker_quick_control_item-margin * 2);
|
|
|
+ color: $color-datepicker_quick_button-text-default;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ &-top-content,
|
|
|
+ &-bottom-content {
|
|
|
+ display: grid;
|
|
|
+ grid-gap: $spacing-datepicker_quick_control_item-margin;
|
|
|
+ // 5px = $width-datepicker_presetPanel_scroll_bar / 3
|
|
|
+ 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));
|
|
|
+ align-content: flex-start;
|
|
|
+ padding: $spacing-datepicker_quick_control_item-margin $spacing-datepicker_quick_control_top_and_bottom_content-paddingX;
|
|
|
+
|
|
|
+ &-item {
|
|
|
+ max-width: $width-datepicker_presetPanel_top_and_bottom_three_col_button;
|
|
|
+ &-ellipsis {
|
|
|
+ width: $width-datepicker_presetPanel_top_and_bottom_three_col_button - ($spacing-datepicker_quick_control_item-margin * 2);
|
|
|
+ color: $color-datepicker_quick_button-text-default;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ &-top-range-content,
|
|
|
+ &-bottom-range-content {
|
|
|
+ box-sizing: border-box;
|
|
|
+ display: grid;
|
|
|
+ align-content: flex-start;
|
|
|
+ // 3px = $width-datepicker_presetPanel_scroll_bar / 5
|
|
|
+ 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));
|
|
|
+ grid-gap: $spacing-datepicker_quick_control_item-margin;
|
|
|
+ padding: $spacing-datepicker_quick_control_item-margin $spacing-datepicker_quick_control_top_and_bottom_content-paddingX;
|
|
|
+
|
|
|
+ &-item {
|
|
|
+ max-width: $width-datepicker_presetPanel_top_and_bottom_five_col_button;
|
|
|
+ &-ellipsis {
|
|
|
+ width: $width-datepicker_presetPanel_top_and_bottom_five_col_button - ($spacing-datepicker_quick_control_item-margin * 2);
|
|
|
+ color: $color-datepicker_quick_button-text-default;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ &-top-month-content,
|
|
|
+ &-bottom-month-content {
|
|
|
+ box-sizing: border-box;
|
|
|
+ display: grid;
|
|
|
+ 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));
|
|
|
+ grid-gap: $spacing-datepicker_quick_control_item-margin;
|
|
|
+ align-content: flex-start;
|
|
|
+ padding: $spacing-datepicker_quick_control_item-margin $spacing-datepicker_quick_control_top_and_bottom_content-paddingX;
|
|
|
+
|
|
|
+ &-item {
|
|
|
+ max-width: $width-datepicker_presetPanel_top_and_bottom_two_col_button;
|
|
|
+ &-ellipsis {
|
|
|
+ max-width: $width-datepicker_presetPanel_top_and_bottom_two_col_button - ($spacing-datepicker_quick_control_item-margin * 2);
|
|
|
+ color: $color-datepicker_quick_button-text-default;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ &-month {
|
|
|
+ max-width: $width-datepicker_monthPanel_max;
|
|
|
+ &[x-insetinput=true] {
|
|
|
+ .#{$module}-quick-control-right-content-wrapper,
|
|
|
+ .#{$module}-quick-control-left-content-wrapper {
|
|
|
+ max-height: $height-datepicker_panel_yam_scrolllist - $height-datepicker_presetPanel_left_and_right_except_content + $height-datepicker_inset_input;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .#{$module}-quick-control-right-content-wrapper,
|
|
|
+ .#{$module}-quick-control-left-content-wrapper {
|
|
|
+ max-height: $height-datepicker_panel_yam_scrolllist - $height-datepicker_presetPanel_left_and_right_except_content;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ &-date {
|
|
|
+ max-width: $width-datepicker_monthPanel_max;
|
|
|
+ &[x-insetinput=true] {
|
|
|
+ .#{$module}-quick-control-right-content-wrapper,
|
|
|
+ .#{$module}-quick-control-left-content-wrapper {
|
|
|
+ max-height: $height-datepicker_preset_panel_inset_input - $height-datepicker_presetPanel_left_and_right_except_content;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .#{$module}-quick-control-right-content-wrapper,
|
|
|
+ .#{$module}-quick-control-left-content-wrapper {
|
|
|
+ max-height: $height-datepicker_date_panel - $height-datepicker_presetPanel_left_and_right_except_content;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
- &-month,
|
|
|
- &-date,
|
|
|
&-dateTime {
|
|
|
max-width: $width-datepicker_monthPanel_max;
|
|
|
+ &[x-insetinput=true] {
|
|
|
+ .#{$module}-quick-control-right-content-wrapper,
|
|
|
+ .#{$module}-quick-control-left-content-wrapper {
|
|
|
+ max-height: $height-datepicker_preset_panel_inset_input - $height-datepicker_presetPanel_left_and_right_except_content;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .#{$module}-quick-control-right-content-wrapper,
|
|
|
+ .#{$module}-quick-control-left-content-wrapper {
|
|
|
+ max-height: $height-datepicker_date_time_panel - $height-datepicker_presetPanel_left_and_right_except_content;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ &-dateRange {
|
|
|
+ max-width: $width-datepicker_monthPanel_max * 2;
|
|
|
+ &[x-insetinput=true] {
|
|
|
+ .#{$module}-quick-control-right-content-wrapper,
|
|
|
+ .#{$module}-quick-control-left-content-wrapper {
|
|
|
+ max-height: $height-datepicker_preset_panel_inset_input - $height-datepicker_presetPanel_left_and_right_except_content;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .#{$module}-quick-control-right-content-wrapper,
|
|
|
+ .#{$module}-quick-control-left-content-wrapper {
|
|
|
+ max-height: $height-datepicker_date_panel - $height-datepicker_presetPanel_left_and_right_except_content;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
- &-dateRange,
|
|
|
&-dateTimeRange {
|
|
|
max-width: $width-datepicker_monthPanel_max * 2;
|
|
|
+ &[x-insetinput=true] {
|
|
|
+ .#{$module}-quick-control-right-content-wrapper,
|
|
|
+ .#{$module}-quick-control-left-content-wrapper {
|
|
|
+ max-height: $height-datepicker_preset_panel_inset_input - $height-datepicker_presetPanel_left_and_right_except_content;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .#{$module}-quick-control-right-content-wrapper,
|
|
|
+ .#{$module}-quick-control-left-content-wrapper {
|
|
|
+ max-height: $height-datepicker_date_time_panel - $height-datepicker_presetPanel_left_and_right_except_content;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -879,6 +1046,15 @@ $module: #{$prefix}-datepicker;
|
|
|
min-height: $height-datepicker_yam_panel_compact;
|
|
|
}
|
|
|
|
|
|
+ // when preset postion is left or right, and insetinput is false, let the month panel get the fixed height
|
|
|
+ &[x-preset-position=left][x-insetinput=false],
|
|
|
+ &[x-preset-position=right][x-insetinput=false] {
|
|
|
+
|
|
|
+ .#{$module}-month {
|
|
|
+ height: $height-datepicker_month_max_compact;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
.#{$module}-yearmonth-header {
|
|
|
box-sizing: border-box;
|
|
|
height: $height-datepicker_yam_panel_header_compact;
|
|
|
@@ -1112,17 +1288,159 @@ $module: #{$prefix}-datepicker;
|
|
|
}
|
|
|
|
|
|
.#{$module}-quick-control {
|
|
|
- padding: $spacing-datepicker_compact-padding;
|
|
|
|
|
|
- &-month,
|
|
|
- &-date,
|
|
|
+ &-header {
|
|
|
+ padding: $spacing-datepicker_quick_control_header_compact-paddingTop $spacing-datepicker_quick_control_left_and_right_content_compact-paddingX 0;
|
|
|
+ font-weight: $font-datepicker_preset_header-fontWeight;
|
|
|
+ }
|
|
|
+
|
|
|
+ &-left-content-wrapper,
|
|
|
+ &-right-content-wrapper {
|
|
|
+ margin-top: $spacing-datepicker_quick_control_content_compact-marginTop;
|
|
|
+ }
|
|
|
+
|
|
|
+ &-left-content,
|
|
|
+ &-right-content {
|
|
|
+ box-sizing: border-box;
|
|
|
+ display: grid;
|
|
|
+ align-content: flex-start;
|
|
|
+ grid-gap: $spacing-datepicker_quick_control_item-margin;
|
|
|
+ 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));
|
|
|
+ padding: 0 $spacing-datepicker_quick_control_left_and_right_content_compact-paddingX $spacing-datepicker_quick_control_left_and_right_content_compact-paddingX;
|
|
|
+
|
|
|
+ &-item {
|
|
|
+ max-width: $width-datepicker_presetPanel_left_and_right_two_col_button;
|
|
|
+ &-ellipsis {
|
|
|
+ width: $width-datepicker_presetPanel_left_and_right_two_col_button - ($spacing-datepicker_quick_control_item-margin * 2);
|
|
|
+ font-size: $fontSize-datepicker_insetInput_compact-fontSize;
|
|
|
+ color: $color-datepicker_quick_button-text-default;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ &-top-content,
|
|
|
+ &-bottom-content {
|
|
|
+ box-sizing: border-box;
|
|
|
+ display: grid;
|
|
|
+ grid-gap: $spacing-datepicker_quick_control_item-margin;
|
|
|
+ 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));
|
|
|
+ align-content: flex-start;
|
|
|
+ padding: $spacing-datepicker_quick_control_item-margin $spacing-datepicker_quick_control_top_and_bottom_content_compact-paddingX;
|
|
|
+
|
|
|
+ &-item {
|
|
|
+ max-width: $width-datepicker_presetPanel_top_and_bottom_three_col_button_compact;
|
|
|
+ &-ellipsis {
|
|
|
+ width: $width-datepicker_presetPanel_top_and_bottom_three_col_button_compact - ($spacing-datepicker_quick_control_item-margin * 2);
|
|
|
+ font-size: $fontSize-datepicker_insetInput_compact-fontSize;
|
|
|
+ color: $color-datepicker_quick_button-text-default;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ &-top-range-content,
|
|
|
+ &-bottom-range-content {
|
|
|
+ display: grid;
|
|
|
+ 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));
|
|
|
+ grid-gap: $spacing-datepicker_quick_control_item-margin;
|
|
|
+ align-content: flex-start;
|
|
|
+ padding: $spacing-datepicker_quick_control_item-margin $spacing-datepicker_quick_control_top_and_bottom_content_compact-paddingX;
|
|
|
+
|
|
|
+ &-item {
|
|
|
+ max-width: $width-datepicker_presetPanel_top_and_bottom_five_col_button_compact;
|
|
|
+ &-ellipsis {
|
|
|
+ width: $width-datepicker_presetPanel_top_and_bottom_five_col_button_compact - ($spacing-datepicker_quick_control_item-margin * 2);
|
|
|
+ font-size: $fontSize-datepicker_insetInput_compact-fontSize;
|
|
|
+ color: $color-datepicker_quick_button-text-default;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ &-top-month-content,
|
|
|
+ &-bottom-month-content {
|
|
|
+ display: grid;
|
|
|
+ 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));
|
|
|
+ grid-gap: $spacing-datepicker_quick_control_item-margin;
|
|
|
+ align-content: flex-start;
|
|
|
+ padding: $spacing-datepicker_quick_control_item-margin $spacing-datepicker_quick_control_top_and_bottom_content_compact-paddingX;
|
|
|
+
|
|
|
+ &-item {
|
|
|
+ max-width: $width-datepicker_presetPanel_top_and_bottom_two_col_button_compact;
|
|
|
+ &-ellipsis {
|
|
|
+ max-width: $width-datepicker_presetPanel_top_and_bottom_two_col_button_compact - ($spacing-datepicker_quick_control_item-margin * 2);
|
|
|
+ font-size: $fontSize-datepicker_insetInput_compact-fontSize;
|
|
|
+ color: $color-datepicker_quick_button-text-default;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ &-month {
|
|
|
+ max-width: $width-datepicker_panel_compact;
|
|
|
+ &[x-insetinput=true] {
|
|
|
+ .#{$module}-quick-control-right-content-wrapper,
|
|
|
+ .#{$module}-quick-control-left-content-wrapper {
|
|
|
+ max-height: $height-datepicker_panel_yam_scrolllist - $height-datepicker_presetPanel_left_and_right_except_content_compact + $height-datepicker_inset_input_compact;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .#{$module}-quick-control-right-content-wrapper,
|
|
|
+ .#{$module}-quick-control-left-content-wrapper {
|
|
|
+ max-height: $height-datepicker_panel_yam_scrolllist - $height-datepicker_presetPanel_left_and_right_except_content_compact;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ &-date {
|
|
|
+ max-width: $width-datepicker_panel_compact;
|
|
|
+ &[x-insetinput=true] {
|
|
|
+ .#{$module}-quick-control-right-content-wrapper,
|
|
|
+ .#{$module}-quick-control-left-content-wrapper {
|
|
|
+ max-height: $height-datepicker_preset_panel_inset_input_compact - $height-datepicker_presetPanel_left_and_right_except_content_compact;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .#{$module}-quick-control-right-content-wrapper,
|
|
|
+ .#{$module}-quick-control-left-content-wrapper {
|
|
|
+ max-height: $height-datepicker_date_panel_compact - $height-datepicker_presetPanel_left_and_right_except_content_compact;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
&-dateTime {
|
|
|
max-width: $width-datepicker_panel_compact;
|
|
|
+ &[x-insetinput=true] {
|
|
|
+ .#{$module}-quick-control-right-content-wrapper,
|
|
|
+ .#{$module}-quick-control-left-content-wrapper {
|
|
|
+ max-height: $height-datepicker_preset_panel_inset_input_compact - $height-datepicker_presetPanel_left_and_right_except_content_compact;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .#{$module}-quick-control-right-content-wrapper,
|
|
|
+ .#{$module}-quick-control-left-content-wrapper {
|
|
|
+ max-height: $height-datepicker_date_time_panel_compact - $height-datepicker_presetPanel_left_and_right_except_content_compact;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ &-dateRange {
|
|
|
+ max-width: $width-datepicker_panel_compact * 2;
|
|
|
+ &[x-insetinput=true] {
|
|
|
+ .#{$module}-quick-control-right-content-wrapper,
|
|
|
+ .#{$module}-quick-control-left-content-wrapper {
|
|
|
+ max-height: $height-datepicker_preset_panel_inset_input_compact - $height-datepicker_presetPanel_left_and_right_except_content_compact;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .#{$module}-quick-control-right-content-wrapper,
|
|
|
+ .#{$module}-quick-control-left-content-wrapper {
|
|
|
+ max-height: $height-datepicker_date_panel_compact - $height-datepicker_presetPanel_left_and_right_except_content_compact;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
- &-dateRange,
|
|
|
&-dateTimeRange {
|
|
|
max-width: $width-datepicker_panel_compact * 2;
|
|
|
+ &[x-insetinput=true] {
|
|
|
+ .#{$module}-quick-control-right-content-wrapper,
|
|
|
+ .#{$module}-quick-control-left-content-wrapper {
|
|
|
+ max-height: $height-datepicker_preset_panel_inset_input_compact - $height-datepicker_presetPanel_left_and_right_except_content_compact;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .#{$module}-quick-control-right-content-wrapper,
|
|
|
+ .#{$module}-quick-control-left-content-wrapper {
|
|
|
+ max-height: $height-datepicker_date_time_panel_compact - $height-datepicker_presetPanel_left_and_right_except_content_compact;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|