1
0

datePicker.scss 52 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514
  1. //@import '../theme/variables.scss';
  2. @import "./variables.scss";
  3. $module: #{$prefix}-datepicker;
  4. .#{$module} {
  5. box-sizing: border-box;
  6. display: inline-block;
  7. vertical-align: top;
  8. // 双月网格
  9. &-month-grid {
  10. user-select: none;
  11. display: flex;
  12. &-left,
  13. &-right {
  14. position: relative;
  15. padding: 0;
  16. display: inline-flex;
  17. flex-direction: column;
  18. justify-content: flex-start;
  19. }
  20. &[x-type="date"],
  21. &[x-type="dateRange"] {
  22. .#{$module}-yam {
  23. height: 100%;
  24. }
  25. }
  26. &[x-type="dateTime"],
  27. &[x-type="dateTimeRange"] {
  28. .#{$module}-yam {
  29. height: $height-datepicker_timeType_yam;
  30. }
  31. }
  32. .#{$module}-yam-showing {
  33. min-height: $height-datepicker_yamShowing_min;
  34. min-width: $width-datepicker_yamShowing_min;
  35. }
  36. &[x-type='date'] .#{$module}-yam-showing {
  37. min-height: $height-datepicker_dateType_yamShowing_min;
  38. }
  39. &[x-insetinput=true] {
  40. .#{$module}-month-grid-left,
  41. .#{$module}-month-grid-right {
  42. &[x-open-type=year] {
  43. min-height: $height-datepicker_month_grid_yearType_insetInput;
  44. }
  45. &[x-open-type=time] {
  46. min-height: $height-datepicker_month_grid_timeType_insetInput;
  47. }
  48. }
  49. .#{$module}-navigation {
  50. padding-top: $spacing-datepicker_navigation_insetInput-paddingY;
  51. padding-bottom: $spacing-datepicker_navigation_insetInput-paddingY;
  52. }
  53. .#{$module}-tpk {
  54. min-height: $height-datepicker_timeType_insetInput_tpk;
  55. }
  56. &[x-type=dateTime],
  57. &[x-type=dateTimeRange] {
  58. .#{$module}-yam {
  59. height: $height-datepicker_timeType_insetInput_yam;
  60. }
  61. }
  62. }
  63. // when preset postion is left or right, and insetinput is false, let the month panel get the fixed height
  64. &[x-preset-position=left][x-insetinput=false],
  65. &[x-preset-position=right][x-insetinput=false] {
  66. .#{$module}-month {
  67. height: $height-datepicker_month_max;
  68. }
  69. }
  70. // 年月选择返回主面板
  71. .#{$module}-yearmonth-header {
  72. background: $color-datepicker_header-bg-default;
  73. padding: $spacing-datepicker_yam_header-paddingY $spacing-datepicker_yam_header-paddingX;
  74. border-bottom: $width-datepicker-border solid $color-datepicker_border-bg-default;
  75. border-radius: $width-datepicker_yam_header-borderRadius $width-datepicker_yam_header-borderRadius 0 0;
  76. display: flex;
  77. align-items: center;
  78. }
  79. .#{$prefix}-scrolllist {
  80. background: $color-datepicker_list-bg-default;
  81. position: relative;
  82. box-shadow: none;
  83. height: auto;
  84. width: 100%;
  85. height: 100%;
  86. overflow: hidden;
  87. flex: 1;
  88. &-header,
  89. &-body {
  90. box-sizing: border-box;
  91. width: 100%;
  92. }
  93. &-header {
  94. border-bottom: $width-datepicker-border solid $color-datepicker_border-bg-default;
  95. padding: $spacing-datepicker_scrolllist_header-padding;
  96. }
  97. &-body {
  98. height: 100%;
  99. overflow: hidden;
  100. padding: $spacing-datepicker_scrolllist_body-padding;
  101. flex: 1;
  102. }
  103. &-line {
  104. display: none;
  105. }
  106. &-header-title {
  107. padding: 0;
  108. @include font-size-regular;
  109. min-height: $height-datepicker_timepicker_header_min;
  110. line-height: $height-datepicker_timepicker_header_min;
  111. }
  112. }
  113. // 为了防止 scrollList 因为 weeks 变化高度发生变化导致年月可能发生滚动
  114. // In order to prevent scrollList from scrolling due to changes in the height of weeks, the year and month may be scrolled
  115. &[x-panel-yearandmonth-open-type="left"],
  116. &[x-panel-yearandmonth-open-type="right"] {
  117. .#{$module}-weeks {
  118. min-height: 6 * $width-datepicker_day;
  119. }
  120. }
  121. }
  122. // 年月选择器
  123. &-panel-yam {
  124. // add left or right preset panel to panel yam, max-width will be bigger
  125. max-width: $width-datepicker_monthPanel_max + $width-datepicker_presetPanel_left_and_right;
  126. .#{$prefix}-scrolllist {
  127. box-shadow: none;
  128. height: $height-datepicker_panel_yam_scrolllist;
  129. &-list-outer {
  130. & > ul > li {
  131. min-width: $width-datepicker_panel_yam_scrolllist_li_min;
  132. }
  133. }
  134. &-body {
  135. padding: 0;
  136. overflow: hidden;
  137. .#{$prefix}-scrolllist-item-wheel {
  138. border: none;
  139. }
  140. }
  141. }
  142. }
  143. // needConfirm
  144. &-footer {
  145. padding-top: $spacing-datepicker_footer-paddingTop;
  146. padding-right: $spacing-datepicker_footer-paddingRight;
  147. padding-bottom: $spacing-datepicker_footer-paddingBottom;
  148. text-align: right;
  149. background-color: $color-datepicker_footer-bg-default;
  150. .#{$prefix}-button {
  151. // cancel button
  152. &:first-of-type {
  153. margin-right: $spacing-datepicker_footer_cancel_button-marginRight;
  154. }
  155. // confirm button
  156. &:nth-of-type(2) {
  157. margin-right: $spacing-datepicker_footer_confirm_button-marginRight;
  158. }
  159. }
  160. }
  161. // 年月选择
  162. &-yam {
  163. position: absolute;
  164. top: 0;
  165. width: 100%;
  166. display: flex;
  167. flex-direction: column;
  168. box-sizing: border-box;
  169. }
  170. // 时间选择
  171. &-tpk {
  172. position: absolute;
  173. top: 0;
  174. height: $height-datepicker_timeType_tpk;
  175. width: 100%;
  176. display: flex;
  177. flex-direction: column;
  178. .#{$module}-time {
  179. height: 100%;
  180. }
  181. }
  182. // 当前年月、切换年月按钮
  183. &-navigation {
  184. display: flex;
  185. align-items: center;
  186. box-sizing: content-box;
  187. height: $width-datepicker_nav;
  188. padding: $spacing-datepicker_navigation-paddingY $spacing-datepicker_navigation-paddingX;
  189. &-left,
  190. &-right {
  191. width: $width-datepicker_nav;
  192. height: $width-datepicker_nav;
  193. display: flex;
  194. justify-content: center;
  195. align-items: center;
  196. }
  197. .#{$prefix}-button {
  198. color: $color-datepicker_navIcon-text-default;
  199. min-width: $width-datepicker_navigation_button_min;
  200. }
  201. &-month {
  202. @include font-size-header-6;
  203. flex-grow: 1;
  204. text-align: center;
  205. font-weight: $font-weight-bold;
  206. color: $color-datepicker_nav_monthIcon-text-default;
  207. .#{$prefix}-button {
  208. color: $color-datepicker_nav_monthIcon-text-default;
  209. }
  210. }
  211. }
  212. // 月面板
  213. &-month {
  214. width: $width-datepicker_month;
  215. box-sizing: content-box;
  216. padding: $spacing-datepicker_month-padding;
  217. padding-top: 0;
  218. }
  219. // 月面板-星期
  220. &-weekday {
  221. @include font-size-small;
  222. font-weight: $font-weight-bold;
  223. color: $color-datepicker_day-text-default;
  224. &-item {
  225. width: $width-datepicker_day;
  226. height: $width-datepicker_day;
  227. line-height: $width-datepicker_day;
  228. text-align: center;
  229. display: inline-block;
  230. }
  231. border-bottom: $width-datepicker-border solid $color-datepicker_border-bg-default;
  232. }
  233. // 月面板-月周
  234. &-weeks {
  235. color: $color-datepicker_date-text-default;
  236. }
  237. // 月面板-周
  238. &-week {
  239. display: flex;
  240. align-items: center;
  241. }
  242. // 月面板-周天
  243. &-day {
  244. box-sizing: border-box;
  245. display: inline-block;
  246. width: $width-datepicker_day;
  247. height: $width-datepicker_day;
  248. @include all-center;
  249. cursor: pointer;
  250. // 周天-内部
  251. &-main {
  252. @include all-center;
  253. width: $width-datepicker_day_main;
  254. height: $width-datepicker_day_main;
  255. margin: 0 auto;
  256. box-sizing: border-box;
  257. border-radius: $width-datepicker_day_main-borderRadius;
  258. &:hover {
  259. background-color: $color-datepicker_date-bg-hover;
  260. }
  261. &:active {
  262. background-color: $color-datepicker_date-bg-active;
  263. }
  264. }
  265. // 以下是天状态
  266. &-today {
  267. .#{$module}-day-main {
  268. color: $color-datepicker_date_today-text-default;
  269. background-color: $color-datepicker_date-bg-default;
  270. font-weight: $font-weight-bold;
  271. }
  272. &.#{$module}-day-disabled {
  273. .#{$module}-day-main {
  274. color: $color-datepicker_date_today_disabled-text-default;
  275. }
  276. }
  277. }
  278. &-inrange,
  279. &-inhover,
  280. &-inoffsetrange,
  281. &-hoverday,
  282. &-selectedrange-hover,
  283. &-hoverday-around-singleselected {
  284. .#{$module}-day-main {
  285. border-radius: 0;
  286. margin-left: 0;
  287. margin-right: 0;
  288. width: $width-datepicker_day;
  289. }
  290. }
  291. &-selected {
  292. .#{$module}-day-main {
  293. border-radius: $width-datepicker_day_main-borderRadius;
  294. }
  295. }
  296. // one date is both start and end
  297. &-selected-start.#{$module}-day-selected-end,
  298. &-offsetrange-start.#{$module}-day-offsetrange-end {
  299. .#{$module}-day-main {
  300. border-radius: $width-datepicker_day_main-borderRadius;
  301. }
  302. }
  303. &-offsetrange-start {
  304. .#{$module}-day-main {
  305. border-radius: $width-datepicker_day_main-borderRadius 0 0 $width-datepicker_day_main-borderRadius;
  306. }
  307. }
  308. &-offsetrange-end {
  309. .#{$module}-day-main {
  310. border-radius: 0 $width-datepicker_day_main-borderRadius $width-datepicker_day_main-borderRadius 0;
  311. }
  312. }
  313. &-hoverday-beforerange {
  314. .#{$module}-day-main {
  315. border-radius: $width-datepicker_day_main-borderRadius 0 0 $width-datepicker_day_main-borderRadius;
  316. }
  317. }
  318. &-hoverday-afterrange {
  319. .#{$module}-day-main {
  320. border-radius: 0 $width-datepicker_day_main-borderRadius $width-datepicker_day_main-borderRadius 0;
  321. }
  322. }
  323. &-selected-start,
  324. &-offsetrange-start {
  325. .#{$module}-day-main {
  326. width: $width-datepicker_day - $spacing-datepicker_day-marginX;
  327. margin-left: $spacing-datepicker_day-marginX;
  328. margin-right: 0;
  329. border-radius: $width-datepicker_day_main-borderRadius 0 0 $width-datepicker_day_main-borderRadius;
  330. }
  331. }
  332. &-selected-end,
  333. &-offsetrange-end {
  334. .#{$module}-day-main {
  335. width: $width-datepicker_day - $spacing-datepicker_day-marginX;
  336. margin-right: $spacing-datepicker_day-marginX;
  337. margin-left: 0;
  338. border-radius: 0 $width-datepicker_day_main-borderRadius $width-datepicker_day_main-borderRadius 0;
  339. }
  340. }
  341. &-hoverday-inrange {
  342. .#{$module}-day-main {
  343. border-radius: 0;
  344. }
  345. }
  346. &-inoffsetrange,
  347. &-offsetrange-start,
  348. &-offsetrange-end {
  349. .#{$module}-day-main {
  350. background-color: $color-datepicker_date_inRangeHover-bg-default;
  351. }
  352. }
  353. &-hoverday,
  354. &-hoverday-offset {
  355. .#{$module}-day-main {
  356. background-color: $color-datepicker_date_hoverDay-bg-default;
  357. }
  358. }
  359. &-inrange,
  360. &-inhover {
  361. .#{$module}-day-main {
  362. background-color: $color-datepicker_date_inHover-bg-default;
  363. }
  364. }
  365. &-hoverday-inrange,
  366. &-hoverday-beforerange,
  367. &-hoverday-afterrange {
  368. .#{$module}-day-main {
  369. background-color: $color-datepicker_date_hoverday_range-bg-default;
  370. }
  371. }
  372. &-hoverday-around-singleselected {
  373. .#{$module}-day-main {
  374. background-color: $color-datepicker_date_hoverday_around_single_selected-bg-default;
  375. }
  376. }
  377. &-selected,
  378. &-selected-start,
  379. &-selected-end {
  380. .#{$module}-day-main {
  381. background-color: $color-datepicker_date_selected-bg-default;
  382. color: $color-datepicker_date_selected-text-default;
  383. &:hover {
  384. background-color: $color-datepicker_date_selected-bg-default;
  385. }
  386. }
  387. }
  388. &-selectedrange-hover {
  389. .#{$module}-day-main {
  390. background-color: $color-datepicker_date_selectedRange-bg-hover;
  391. }
  392. }
  393. &-selected-start-afterhover,
  394. &-selected-end-beforehover {
  395. .#{$module}-day-main {
  396. border: $width-datepicker_day_main-border solid $color-datepicker_day_main-border;
  397. }
  398. }
  399. &-disabled {
  400. cursor: not-allowed;
  401. color: $color-datepicker_date_disabled-text-default;
  402. .#{$module}-day-main {
  403. &:hover {
  404. background-color: transparent;
  405. }
  406. &:active {
  407. background-color: transparent;
  408. }
  409. }
  410. &.#{$module}-day {
  411. &-selected,
  412. &-selected-start,
  413. &-selected-end,
  414. &-inhover,
  415. &-inrange,
  416. &-inoffsetrange,
  417. &-hoverday,
  418. &-hoverday-offset,
  419. &-offsetrange-start,
  420. &-offsetrange-end,
  421. &-selectedrange-hover {
  422. .#{$module}-day-main {
  423. background-color: $color-datepicker_date_disabled-bg-default;
  424. color: $color-datepicker_date_disabled-text-default;
  425. }
  426. }
  427. }
  428. }
  429. // 以上是天状态
  430. }
  431. // 切换日期和时间选择
  432. &-switch {
  433. text-align: center;
  434. display: flex;
  435. border-top: $width-datepicker-border solid $color-datepicker_border-bg-default;
  436. margin-top: auto;
  437. &-date,
  438. &-time {
  439. width: 50%;
  440. // flex-grow: 1;
  441. cursor: pointer;
  442. padding-top: $spacing-datepicker_switch_datetime-paddingTop;
  443. padding-bottom: $spacing-datepicker_switch_datetime-paddingBottom;
  444. @include all-center;
  445. color: $color-datepicker_day-text-default;
  446. &:not(.#{$module}-switch-time-disabled):hover {
  447. background-color: $color-datepicker_date-bg-hover;
  448. }
  449. &-active {
  450. color: $color-datepicker_day-text-active;
  451. font-weight: $font-weight-bold;
  452. cursor: auto;
  453. &:hover {
  454. background-color: inherit;
  455. }
  456. }
  457. &-disabled {
  458. cursor: not-allowed;
  459. }
  460. }
  461. &-text {
  462. padding-left: $spacing-datepicker_switch_text-paddingLeft;
  463. }
  464. }
  465. &-time {
  466. .#{$prefix}-jumperlist {
  467. @include shadow-0;
  468. border-radius: 0;
  469. }
  470. }
  471. // 预设
  472. &-quick-control {
  473. box-sizing: border-box;
  474. background-color: $color-datepicker_quick-bg-default;
  475. &-header {
  476. padding: $spacing-datepicker_quick_control_header-paddingTop $spacing-datepicker_quick_control_content-paddingX 0;
  477. font-weight: $font-datepicker_preset_header-fontWeight;
  478. }
  479. &-left {
  480. border-right: $width-datepicker-border solid $color-datepicker_border-bg-default;
  481. }
  482. &-right {
  483. border-left: $width-datepicker-border solid $color-datepicker_border-bg-default;
  484. }
  485. &-top {
  486. border-bottom: $width-datepicker-border solid $color-datepicker_border-bg-default;
  487. }
  488. &-bottom {
  489. border-top: $width-datepicker-border solid $color-datepicker_border-bg-default;
  490. }
  491. &-left-content-wrapper,
  492. &-right-content-wrapper {
  493. max-width: $width-datepicker_presetPanel_left_and_right;
  494. margin-top: $spacing-datepicker_quick_control_content-marginTop;
  495. overflow-y: auto;
  496. }
  497. &-top-content-wrapper,
  498. &-bottom-content-wrapper {
  499. overflow-y: auto;
  500. max-height: $height-datepicker_presetPanel_top_and_bottom_max;
  501. }
  502. &-left-content,
  503. &-right-content {
  504. box-sizing: border-box;
  505. display: grid;
  506. align-content: flex-start;
  507. grid-gap: $spacing-datepicker_quick_control_item-margin;
  508. 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));
  509. padding: 0 $spacing-datepicker_quick_control_content-paddingX $spacing-datepicker_quick_control_content-paddingX;
  510. &-item {
  511. max-width: $width-datepicker_presetPanel_left_and_right_two_col_button;
  512. &-ellipsis {
  513. // ellipsis text content, $spacing-datepicker_quick_control_item-margin(default 8px)space left and right
  514. width: $width-datepicker_presetPanel_left_and_right_two_col_button - ($spacing-datepicker_quick_control_item-margin * 2);
  515. color: $color-datepicker_quick_button-text-default;
  516. }
  517. }
  518. }
  519. &-top-content,
  520. &-bottom-content {
  521. display: grid;
  522. grid-gap: $spacing-datepicker_quick_control_item-margin;
  523. // 5px = $width-datepicker_presetPanel_scroll_bar / 3
  524. 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));
  525. align-content: flex-start;
  526. padding: $spacing-datepicker_quick_control_item-margin $spacing-datepicker_quick_control_top_and_bottom_content-paddingX;
  527. &-item {
  528. max-width: $width-datepicker_presetPanel_top_and_bottom_three_col_button;
  529. &-ellipsis {
  530. width: $width-datepicker_presetPanel_top_and_bottom_three_col_button - ($spacing-datepicker_quick_control_item-margin * 2);
  531. color: $color-datepicker_quick_button-text-default;
  532. }
  533. }
  534. }
  535. &-top-range-content,
  536. &-bottom-range-content {
  537. box-sizing: border-box;
  538. display: grid;
  539. align-content: flex-start;
  540. // 3px = $width-datepicker_presetPanel_scroll_bar / 5
  541. 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));
  542. grid-gap: $spacing-datepicker_quick_control_item-margin;
  543. padding: $spacing-datepicker_quick_control_item-margin $spacing-datepicker_quick_control_top_and_bottom_content-paddingX;
  544. &-item {
  545. max-width: $width-datepicker_presetPanel_top_and_bottom_five_col_button;
  546. &-ellipsis {
  547. width: $width-datepicker_presetPanel_top_and_bottom_five_col_button - ($spacing-datepicker_quick_control_item-margin * 2);
  548. color: $color-datepicker_quick_button-text-default;
  549. }
  550. }
  551. }
  552. &-top-month-content,
  553. &-bottom-month-content {
  554. box-sizing: border-box;
  555. display: grid;
  556. 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));
  557. grid-gap: $spacing-datepicker_quick_control_item-margin;
  558. align-content: flex-start;
  559. padding: $spacing-datepicker_quick_control_item-margin $spacing-datepicker_quick_control_top_and_bottom_content-paddingX;
  560. &-item {
  561. max-width: $width-datepicker_presetPanel_top_and_bottom_two_col_button;
  562. &-ellipsis {
  563. max-width: $width-datepicker_presetPanel_top_and_bottom_two_col_button - ($spacing-datepicker_quick_control_item-margin * 2);
  564. color: $color-datepicker_quick_button-text-default;
  565. }
  566. }
  567. }
  568. &-month {
  569. max-width: $width-datepicker_monthPanel_max;
  570. &[x-insetinput=true] {
  571. .#{$module}-quick-control-right-content-wrapper,
  572. .#{$module}-quick-control-left-content-wrapper {
  573. max-height: $height-datepicker_panel_yam_scrolllist - $height-datepicker_presetPanel_left_and_right_except_content + $height-datepicker_inset_input;
  574. }
  575. }
  576. .#{$module}-quick-control-right-content-wrapper,
  577. .#{$module}-quick-control-left-content-wrapper {
  578. max-height: $height-datepicker_panel_yam_scrolllist - $height-datepicker_presetPanel_left_and_right_except_content;
  579. }
  580. }
  581. &-date {
  582. max-width: $width-datepicker_monthPanel_max;
  583. &[x-insetinput=true] {
  584. .#{$module}-quick-control-right-content-wrapper,
  585. .#{$module}-quick-control-left-content-wrapper {
  586. max-height: $height-datepicker_preset_panel_inset_input - $height-datepicker_presetPanel_left_and_right_except_content;
  587. }
  588. }
  589. .#{$module}-quick-control-right-content-wrapper,
  590. .#{$module}-quick-control-left-content-wrapper {
  591. max-height: $height-datepicker_date_panel - $height-datepicker_presetPanel_left_and_right_except_content;
  592. }
  593. }
  594. &-dateTime {
  595. max-width: $width-datepicker_monthPanel_max;
  596. &[x-insetinput=true] {
  597. .#{$module}-quick-control-right-content-wrapper,
  598. .#{$module}-quick-control-left-content-wrapper {
  599. max-height: $height-datepicker_preset_panel_inset_input - $height-datepicker_presetPanel_left_and_right_except_content;
  600. }
  601. }
  602. .#{$module}-quick-control-right-content-wrapper,
  603. .#{$module}-quick-control-left-content-wrapper {
  604. max-height: $height-datepicker_date_time_panel - $height-datepicker_presetPanel_left_and_right_except_content;
  605. }
  606. }
  607. &-dateRange {
  608. max-width: $width-datepicker_monthPanel_max * 2;
  609. &[x-insetinput=true] {
  610. .#{$module}-quick-control-right-content-wrapper,
  611. .#{$module}-quick-control-left-content-wrapper {
  612. max-height: $height-datepicker_preset_panel_inset_input - $height-datepicker_presetPanel_left_and_right_except_content;
  613. }
  614. }
  615. .#{$module}-quick-control-right-content-wrapper,
  616. .#{$module}-quick-control-left-content-wrapper {
  617. max-height: $height-datepicker_date_panel - $height-datepicker_presetPanel_left_and_right_except_content;
  618. }
  619. }
  620. &-dateTimeRange {
  621. max-width: $width-datepicker_monthPanel_max * 2;
  622. &[x-insetinput=true] {
  623. .#{$module}-quick-control-right-content-wrapper,
  624. .#{$module}-quick-control-left-content-wrapper {
  625. max-height: $height-datepicker_preset_panel_inset_input - $height-datepicker_presetPanel_left_and_right_except_content;
  626. }
  627. }
  628. .#{$module}-quick-control-right-content-wrapper,
  629. .#{$module}-quick-control-left-content-wrapper {
  630. max-height: $height-datepicker_date_time_panel - $height-datepicker_presetPanel_left_and_right_except_content;
  631. }
  632. }
  633. }
  634. &-topSlot {
  635. border-bottom: $width-datepicker_slot-border solid $color-datepicker_border-bg-default;
  636. }
  637. &-bottomSlot {
  638. border-top: $width-datepicker_slot-border solid $color-datepicker_border-bg-default;
  639. }
  640. .#{$prefix}-popover-trigger {
  641. width: 100%;
  642. .#{$prefix}-input-wrapper {
  643. font-size: 13px;
  644. }
  645. .#{$prefix}-input-suffix {
  646. color: $color-datepicker_input_primary-text-default;
  647. }
  648. }
  649. .#{$prefix}-datepicker-input-readonly {
  650. cursor: pointer;
  651. }
  652. &-inset-input {
  653. &-wrapper {
  654. display: flex;
  655. flex-wrap: nowrap;
  656. justify-content: space-between;
  657. box-sizing: border-box;
  658. column-gap: $spacing-datepicker_insetInput_wrapper-margin;
  659. padding: $spacing-datepicker_insetInput_wrapper-paddingY $spacing-datepicker_insetInput_wrapper-paddingX;
  660. padding-bottom: $spacing-datepicker_insetInput_wrapper-paddingBottom;
  661. width: $width-datepicker_insetInput_date_type_wrapper;
  662. &[x-type=dateRange],
  663. &[x-type=dateTimeRange] {
  664. width: $width-datepicker_insetInput_date_range_type_wrapper;
  665. }
  666. &[x-type=month] {
  667. width: $width-datepicker_insetInput_month_type_wrapper;
  668. }
  669. .#{$prefix}-input-wrapper {
  670. flex: 1;
  671. flex-shrink: 0;
  672. }
  673. }
  674. &-separator {
  675. flex-grow: 0;
  676. flex-shrink: 0;
  677. height: $height-datepicker_insetInput_separator;
  678. line-height: $height-datepicker_insetInput_separator;
  679. padding: $spacing-datepicker_insetInput_separator-paddingY $spacing-datepicker_insetInput_separator-paddingX;
  680. color: $color-datepicker_insetInput_separator;
  681. }
  682. }
  683. &-range {
  684. &-input {
  685. display: flex;
  686. align-items: center;
  687. box-sizing: border-box;
  688. border-radius: $radius-datepicker_range_input;
  689. height: $height-datepicker_range_input-default;
  690. color: $color-datepicker_range_input-text-default;
  691. background-color: $color-datepicker_range_input-bg-default;
  692. &-wrapper {
  693. box-sizing: border-box;
  694. background-color: $color-datepicker_range_input_inputWrapper-bg-default;
  695. padding: 0 $spacing-datepicker_range_input-paddingX;
  696. height: 100%;
  697. width: 100%;
  698. border: $width-datepicker_range_input-border solid $color-datepicker_range_input-border-default;
  699. border-radius: $radius-datepicker_range_input;
  700. display: flex;
  701. align-items: center;
  702. .#{$prefix}-input-wrapper {
  703. background-color: transparent;
  704. border: none;
  705. }
  706. &-focus {
  707. border-color: $color-datepicker_range_input_inputWrapper-border-default;
  708. background-color: $color-datepicker_range_input_inputWrapper-bg-focus;
  709. border-radius: $radius-datepicker_range_input_inputWrapper;
  710. transition: $transition-datepicker_range_input;
  711. & ~ .#{$module}-range-input-clearbtn {
  712. display: flex;
  713. }
  714. & ~ .#{$module}-range-input-clearbtn ~ .#{$module}-range-input-suffix {
  715. display: none;
  716. }
  717. }
  718. .#{$prefix}-input {
  719. padding: $spacing-datepicker_range_input_inputWrapper_input-paddingY $spacing-datepicker_range_input_inputWrapper_input-paddingX;
  720. }
  721. &-icon {
  722. flex-shrink: 0;
  723. }
  724. &:hover {
  725. background-color: $color-datepicker_range_input-bg-hover;
  726. }
  727. &-start {
  728. border-top-right-radius: 0;
  729. border-bottom-right-radius: 0;
  730. }
  731. &-start-with-prefix {
  732. border-radius: 0;
  733. }
  734. &-end {
  735. border-radius: 0;
  736. }
  737. &-active {
  738. border-color: $color-datepicker_range_input-border-active;
  739. background-color: $color-datepicker_range_input-bg-hover;
  740. }
  741. }
  742. &-separator {
  743. display: flex;
  744. align-items: center;
  745. &-active {
  746. color: $color-datepicker_range_input_separator-text-active;
  747. }
  748. }
  749. &-small {
  750. height: $height-datepicker_range_input-small;
  751. }
  752. &-large {
  753. height: $height-datepicker_range_input-large;
  754. .#{$prefix}-input-default {
  755. font-size: $font-datepicker_range_input_large-fontSize;
  756. }
  757. }
  758. &:hover {
  759. .#{$module}-range-input-clearbtn {
  760. display: flex;
  761. color: $color-datepicker_range_input_clearbtn-icon-hover;
  762. cursor: pointer;
  763. }
  764. .#{$module}-range-input-clearbtn ~ .#{$module}-range-input-suffix {
  765. display: none;
  766. }
  767. }
  768. &-disabled {
  769. cursor: not-allowed;
  770. color: $color-datepicker_range_input_disabled-text-default;
  771. background-color: $color-datepicker_range_input_disabled-bg-default;
  772. .#{$module}-range-input-wrapper {
  773. &:hover {
  774. background-color: $color-datepicker_range_input_inputWrapper-bg-default;
  775. }
  776. }
  777. &:hover {
  778. background-color: $color-datepicker_range_input_disabled-bg-hover;
  779. }
  780. .#{$module}-range-input-prefix,
  781. .#{$module}-range-input-suffix,
  782. .#{$module}-range-input-clearbtn {
  783. color: $color-datepicker_range_input_disabled-text-default;
  784. }
  785. }
  786. &-warning {
  787. background-color: $color-datepicker_range_input_warning-bg-default;
  788. .#{$module}-range-input-wrapper {
  789. &:hover {
  790. background-color: $color-datepicker_range_input_warning-bg-hover;
  791. }
  792. &-active {
  793. border-color: $color-datepicker_range_input_warning-border-active;
  794. background-color: $color-datepicker_range_input_warning-bg-active;
  795. }
  796. }
  797. }
  798. &-error {
  799. background-color: $color-datepicker_range_input_error-border-default;
  800. .#{$module}-range-input-wrapper {
  801. &:hover {
  802. background-color: $color-datepicker_range_input_error-bg-hover;
  803. }
  804. &-active {
  805. border-color: $color-datepicker_range_input_error-border-active;
  806. background-color: $color-datepicker_range_input_error-bg-active;
  807. }
  808. }
  809. }
  810. .#{$module}-range-input-clearbtn {
  811. display: none;
  812. }
  813. &-prefix,
  814. &-suffix,
  815. &-clearbtn {
  816. display: flex;
  817. align-items: center;
  818. justify-content: center;
  819. font-weight: $font-datepicker_range_input_prefix_suffix_clearbtn-fontWeight;
  820. font-size: $font-datepicker_range_input_prefix_suffix_clearbtn-fontSize;
  821. line-height: $font-datepicker_range_input_prefix_suffix_clearbtn-lineHeight;
  822. white-space: nowrap;
  823. color: $color-datepicker_range_input-text-default;
  824. }
  825. &-prefix {
  826. padding-left: $spacing-datepicker_range_input_prefix-paddingLeft;
  827. padding-right: $spacing-datepicker_range_input_prefix-paddingRight;
  828. }
  829. &-suffix {
  830. padding-left: $spacing-datepicker_range_input_suffix-paddingLeft;
  831. padding-right: $spacing-datepicker_range_input_suffix-paddingRight;
  832. &-hidden {
  833. display: none;
  834. }
  835. }
  836. &-clearbtn {
  837. padding-left: $spacing-datepicker_range_input_clearbtn-paddingLeft;
  838. padding-right: $spacing-datepicker_range_input_clearbtn-paddingRight;
  839. }
  840. }
  841. }
  842. }
  843. /*
  844. * 小尺寸 DatePicker
  845. */
  846. .#{$module}-compact {
  847. @include font-size-small;
  848. line-height: $lineHeight-datepicker_compact;
  849. .#{$module}-month-grid {
  850. &[x-type="dateTime"],
  851. &[x-type="dateTimeRange"] {
  852. .#{$module}-yam {
  853. // 减去底部switch高度
  854. height: calc(100% - #{$height-datepicker_switch_compact});
  855. }
  856. }
  857. &[x-type="dateRange"],
  858. &[x-type="dateTimeRange"] {
  859. .#{$module}-month-grid-left {
  860. border-right: $width-datepicker-border solid $color-datepicker_border-bg-default;
  861. }
  862. }
  863. .#{$module}-yam-showing {
  864. min-height: $height-datepicker_tpk_compact + $height-datepicker_switch_compact;
  865. min-width: $width-datepicker_panel_compact;
  866. }
  867. &[x-type='date'] .#{$module}-yam-showing {
  868. min-height: $height-datepicker_yam_panel_compact;
  869. }
  870. // when preset postion is left or right, and insetinput is false, let the month panel get the fixed height
  871. &[x-preset-position=left][x-insetinput=false],
  872. &[x-preset-position=right][x-insetinput=false] {
  873. .#{$module}-month {
  874. height: $height-datepicker_month_max_compact;
  875. }
  876. }
  877. .#{$module}-yearmonth-header {
  878. box-sizing: border-box;
  879. height: $height-datepicker_yam_panel_header_compact;
  880. padding: $spacing-datepicker_yam_panel_header_compact-padding;
  881. }
  882. .#{$prefix}-scrolllist {
  883. @include font-size-small;
  884. line-height: $lineHeight-datepicker_compact;
  885. &-header {
  886. // 小尺寸空间较小,不显示scrolllist header
  887. display: none;
  888. }
  889. &-list-outer {
  890. & > ul > li {
  891. height: $height-datepicker_yam_li_compact;
  892. }
  893. }
  894. &-item-wheel {
  895. // 去除中间分割线
  896. border-right: 0;
  897. .#{$prefix}-scrolllist-selector {
  898. height: $height-datepicker_yam_li_compact;
  899. }
  900. .#{$prefix}-scrolllist-shade-pre {
  901. margin-top: $spacing-datepicker_scrolllist_shade_pre_compact-marginTop;
  902. }
  903. .#{$prefix}-scrolllist-shade-post {
  904. margin-top: $spacing-datepicker_scrolllist_shade_post_compact-marginTop;
  905. }
  906. }
  907. }
  908. // 为了防止 scrollList 因为 weeks 变化高度发生变化导致年月可能发生滚动
  909. // In order to prevent scrollList from scrolling due to changes in the height of weeks, the year and month may be scrolled
  910. &[x-panel-yearandmonth-open-type="left"],
  911. &[x-panel-yearandmonth-open-type="right"] {
  912. .#{$module}-weeks {
  913. min-height: 6 * $width-datepicker_day_compact;
  914. }
  915. }
  916. &[x-insetinput=true] {
  917. .#{$module}-month-grid-left,
  918. .#{$module}-month-grid-right {
  919. &[x-open-type=year] {
  920. min-height: $height-datepicker_tpk_compact;
  921. }
  922. &[x-open-type=time] {
  923. min-height: $height-datepicker_tpk_compact;
  924. }
  925. }
  926. .#{$module}-yam-showing {
  927. min-height: $height-datepicker_tpk_compact;
  928. }
  929. .#{$module}-tpk {
  930. min-height: $height-datepicker_insetInput_tpk_compact;
  931. }
  932. &[x-type=dateTime],
  933. &[x-type=dateTimeRange] {
  934. .#{$module}-yam {
  935. height: $height-datepicker_timeType_insetInput_yam_compact;
  936. }
  937. }
  938. }
  939. }
  940. // 年月选择器
  941. &.#{$module}-panel-yam {
  942. .#{$prefix}-scrolllist {
  943. @include font-size-small;
  944. line-height: $lineHeight-datepicker_compact;
  945. }
  946. }
  947. .#{$module}-tpk {
  948. height: calc(100% - #{$height-datepicker_switch_compact});
  949. }
  950. .#{$module}-navigation {
  951. height: $width-datepicker_nav_compact;
  952. padding: $spacing-datepicker_nav_compact-padding;
  953. padding-bottom: 0;
  954. &-left,
  955. &-right {
  956. width: $width-datepicker_nav_compact;
  957. height: $width-datepicker_nav_compact;
  958. }
  959. .#{$prefix}-button {
  960. min-width: $width-datepicker_nav_compact;
  961. min-height: $width-datepicker_nav_compact;
  962. }
  963. &-month {
  964. .#{$prefix}-button {
  965. // 覆盖样式,否则会从button继承
  966. @include font-size-small;
  967. line-height: $lineHeight-datepicker_compact;
  968. }
  969. }
  970. }
  971. .#{$module}-month {
  972. width: $width-datepicker_month_compact;
  973. padding: 0;
  974. }
  975. .#{$module}-weeks {
  976. padding: $spacing-datepicker_weeks_compact-padding;
  977. padding-top: $spacing-datepicker_weeks_compact-paddingTop;
  978. }
  979. .#{$module}-weekday {
  980. box-sizing: border-box;
  981. height: $spacing-tight + $width-datepicker_day_compact;
  982. padding-left: $spacing-datepicker_weekday_compact-paddingLeft;
  983. padding-right: $spacing-datepicker_weekday_compact-paddingRight;
  984. padding-bottom: $spacing-datepicker_weekday_compact-paddingBottom;
  985. border-bottom: $width-datepicker-border solid $color-datepicker_border-bg-default;
  986. &-item {
  987. width: $width-datepicker_day_compact;
  988. height: $width-datepicker_day_compact;
  989. // 保持垂直居中
  990. line-height: $lineHeight-datepicker_weekday_item_compact;
  991. }
  992. }
  993. .#{$module}-day {
  994. width: $width-datepicker_day_compact;
  995. height: $width-datepicker_day_compact;
  996. &-main {
  997. width: $width-datepicker_day_main_compact;
  998. height: $width-datepicker_day_main_compact;
  999. }
  1000. &-inrange,
  1001. &-inhover,
  1002. &-inoffsetrange,
  1003. &-hoverday,
  1004. &-selectedrange-hover {
  1005. .#{$module}-day-main {
  1006. width: $width-datepicker_day_compact;
  1007. }
  1008. }
  1009. // one date is both start and end
  1010. &-selected-start.#{$module}-day-selected-end,
  1011. &-offsetrange-start.#{$module}-day-offsetrange-end {
  1012. .#{$module}-day-main {
  1013. border-radius: $width-datepicker_day_compact-borderRadius;
  1014. }
  1015. }
  1016. &-offsetrange-start {
  1017. .#{$module}-day-main {
  1018. border-radius: $width-datepicker_day_compact-borderRadius 0 0 $width-datepicker_day_compact-borderRadius;
  1019. }
  1020. }
  1021. &-offsetrange-end {
  1022. .#{$module}-day-main {
  1023. border-radius: 0 $width-datepicker_day_compact-borderRadius $width-datepicker_day_compact-borderRadius 0;
  1024. }
  1025. }
  1026. &-hoverday-beforerange {
  1027. .#{$module}-day-main {
  1028. border-radius: $width-datepicker_day_compact-borderRadius 0 0 $width-datepicker_day_compact-borderRadius;
  1029. }
  1030. }
  1031. &-hoverday-afterrange {
  1032. .#{$module}-day-main {
  1033. border-radius: 0 $width-datepicker_day_compact-borderRadius $width-datepicker_day_compact-borderRadius 0;
  1034. }
  1035. }
  1036. &-selected-start,
  1037. &-offsetrange-start {
  1038. .#{$module}-day-main {
  1039. width: $width-datepicker_day - $spacing-datepicker_day_compact-margin;
  1040. margin-left: $spacing-datepicker_day_compact-margin;
  1041. margin-right: 0;
  1042. border-radius: $width-datepicker_day_compact-borderRadius 0 0 $width-datepicker_day_compact-borderRadius;
  1043. }
  1044. }
  1045. &-selected-end,
  1046. &-offsetrange-end {
  1047. .#{$module}-day-main {
  1048. width: $width-datepicker_day - $spacing-datepicker_day_compact-margin;
  1049. margin-right: $spacing-datepicker_day_compact-margin;
  1050. margin-left: 0;
  1051. border-radius: 0 $width-datepicker_day_compact-borderRadius $width-datepicker_day_compact-borderRadius 0;
  1052. }
  1053. }
  1054. }
  1055. .#{$module}-switch {
  1056. box-sizing: border-box;
  1057. height: $height-datepicker_switch_compact;
  1058. &-date,
  1059. &-time {
  1060. padding-top: $spacing-datepicker_switch_compact-padding;
  1061. padding-bottom: $spacing-datepicker_switch_compact-padding;
  1062. }
  1063. &-date {
  1064. border-right: $width-datepicker-border solid $color-datepicker_border-bg-default;
  1065. }
  1066. &-text {
  1067. // 去掉icon后不需要pl
  1068. padding-left: 0;
  1069. }
  1070. }
  1071. .#{$module}-quick-control {
  1072. &-header {
  1073. padding: $spacing-datepicker_quick_control_header_compact-paddingTop $spacing-datepicker_quick_control_left_and_right_content_compact-paddingX 0;
  1074. font-weight: $font-datepicker_preset_header-fontWeight;
  1075. }
  1076. &-left-content-wrapper,
  1077. &-right-content-wrapper {
  1078. margin-top: $spacing-datepicker_quick_control_content_compact-marginTop;
  1079. }
  1080. &-left-content,
  1081. &-right-content {
  1082. box-sizing: border-box;
  1083. display: grid;
  1084. align-content: flex-start;
  1085. grid-gap: $spacing-datepicker_quick_control_item-margin;
  1086. 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));
  1087. padding: 0 $spacing-datepicker_quick_control_left_and_right_content_compact-paddingX $spacing-datepicker_quick_control_left_and_right_content_compact-paddingX;
  1088. &-item {
  1089. max-width: $width-datepicker_presetPanel_left_and_right_two_col_button;
  1090. &-ellipsis {
  1091. width: $width-datepicker_presetPanel_left_and_right_two_col_button - ($spacing-datepicker_quick_control_item-margin * 2);
  1092. font-size: $fontSize-datepicker_insetInput_compact-fontSize;
  1093. color: $color-datepicker_quick_button-text-default;
  1094. }
  1095. }
  1096. }
  1097. &-top-content,
  1098. &-bottom-content {
  1099. box-sizing: border-box;
  1100. display: grid;
  1101. grid-gap: $spacing-datepicker_quick_control_item-margin;
  1102. 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));
  1103. align-content: flex-start;
  1104. padding: $spacing-datepicker_quick_control_item-margin $spacing-datepicker_quick_control_top_and_bottom_content_compact-paddingX;
  1105. &-item {
  1106. max-width: $width-datepicker_presetPanel_top_and_bottom_three_col_button_compact;
  1107. &-ellipsis {
  1108. width: $width-datepicker_presetPanel_top_and_bottom_three_col_button_compact - ($spacing-datepicker_quick_control_item-margin * 2);
  1109. font-size: $fontSize-datepicker_insetInput_compact-fontSize;
  1110. color: $color-datepicker_quick_button-text-default;
  1111. }
  1112. }
  1113. }
  1114. &-top-range-content,
  1115. &-bottom-range-content {
  1116. display: grid;
  1117. 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));
  1118. grid-gap: $spacing-datepicker_quick_control_item-margin;
  1119. align-content: flex-start;
  1120. padding: $spacing-datepicker_quick_control_item-margin $spacing-datepicker_quick_control_top_and_bottom_content_compact-paddingX;
  1121. &-item {
  1122. max-width: $width-datepicker_presetPanel_top_and_bottom_five_col_button_compact;
  1123. &-ellipsis {
  1124. width: $width-datepicker_presetPanel_top_and_bottom_five_col_button_compact - ($spacing-datepicker_quick_control_item-margin * 2);
  1125. font-size: $fontSize-datepicker_insetInput_compact-fontSize;
  1126. color: $color-datepicker_quick_button-text-default;
  1127. }
  1128. }
  1129. }
  1130. &-top-month-content,
  1131. &-bottom-month-content {
  1132. display: grid;
  1133. 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));
  1134. grid-gap: $spacing-datepicker_quick_control_item-margin;
  1135. align-content: flex-start;
  1136. padding: $spacing-datepicker_quick_control_item-margin $spacing-datepicker_quick_control_top_and_bottom_content_compact-paddingX;
  1137. &-item {
  1138. max-width: $width-datepicker_presetPanel_top_and_bottom_two_col_button_compact;
  1139. &-ellipsis {
  1140. max-width: $width-datepicker_presetPanel_top_and_bottom_two_col_button_compact - ($spacing-datepicker_quick_control_item-margin * 2);
  1141. font-size: $fontSize-datepicker_insetInput_compact-fontSize;
  1142. color: $color-datepicker_quick_button-text-default;
  1143. }
  1144. }
  1145. }
  1146. &-month {
  1147. max-width: $width-datepicker_panel_compact;
  1148. &[x-insetinput=true] {
  1149. .#{$module}-quick-control-right-content-wrapper,
  1150. .#{$module}-quick-control-left-content-wrapper {
  1151. max-height: $height-datepicker_panel_yam_scrolllist - $height-datepicker_presetPanel_left_and_right_except_content_compact + $height-datepicker_inset_input_compact;
  1152. }
  1153. }
  1154. .#{$module}-quick-control-right-content-wrapper,
  1155. .#{$module}-quick-control-left-content-wrapper {
  1156. max-height: $height-datepicker_panel_yam_scrolllist - $height-datepicker_presetPanel_left_and_right_except_content_compact;
  1157. }
  1158. }
  1159. &-date {
  1160. max-width: $width-datepicker_panel_compact;
  1161. &[x-insetinput=true] {
  1162. .#{$module}-quick-control-right-content-wrapper,
  1163. .#{$module}-quick-control-left-content-wrapper {
  1164. max-height: $height-datepicker_preset_panel_inset_input_compact - $height-datepicker_presetPanel_left_and_right_except_content_compact;
  1165. }
  1166. }
  1167. .#{$module}-quick-control-right-content-wrapper,
  1168. .#{$module}-quick-control-left-content-wrapper {
  1169. max-height: $height-datepicker_date_panel_compact - $height-datepicker_presetPanel_left_and_right_except_content_compact;
  1170. }
  1171. }
  1172. &-dateTime {
  1173. max-width: $width-datepicker_panel_compact;
  1174. &[x-insetinput=true] {
  1175. .#{$module}-quick-control-right-content-wrapper,
  1176. .#{$module}-quick-control-left-content-wrapper {
  1177. max-height: $height-datepicker_preset_panel_inset_input_compact - $height-datepicker_presetPanel_left_and_right_except_content_compact;
  1178. }
  1179. }
  1180. .#{$module}-quick-control-right-content-wrapper,
  1181. .#{$module}-quick-control-left-content-wrapper {
  1182. max-height: $height-datepicker_date_time_panel_compact - $height-datepicker_presetPanel_left_and_right_except_content_compact;
  1183. }
  1184. }
  1185. &-dateRange {
  1186. max-width: $width-datepicker_panel_compact * 2;
  1187. &[x-insetinput=true] {
  1188. .#{$module}-quick-control-right-content-wrapper,
  1189. .#{$module}-quick-control-left-content-wrapper {
  1190. max-height: $height-datepicker_preset_panel_inset_input_compact - $height-datepicker_presetPanel_left_and_right_except_content_compact;
  1191. }
  1192. }
  1193. .#{$module}-quick-control-right-content-wrapper,
  1194. .#{$module}-quick-control-left-content-wrapper {
  1195. max-height: $height-datepicker_date_panel_compact - $height-datepicker_presetPanel_left_and_right_except_content_compact;
  1196. }
  1197. }
  1198. &-dateTimeRange {
  1199. max-width: $width-datepicker_panel_compact * 2;
  1200. &[x-insetinput=true] {
  1201. .#{$module}-quick-control-right-content-wrapper,
  1202. .#{$module}-quick-control-left-content-wrapper {
  1203. max-height: $height-datepicker_preset_panel_inset_input_compact - $height-datepicker_presetPanel_left_and_right_except_content_compact;
  1204. }
  1205. }
  1206. .#{$module}-quick-control-right-content-wrapper,
  1207. .#{$module}-quick-control-left-content-wrapper {
  1208. max-height: $height-datepicker_date_time_panel_compact - $height-datepicker_presetPanel_left_and_right_except_content_compact;
  1209. }
  1210. }
  1211. }
  1212. .#{$module}-footer {
  1213. padding-top: $spacing-datepicker_footer_compact-paddintTop;
  1214. padding-right: $spacing-datepicker_footer_compact-paddintRight;
  1215. padding-bottom: $spacing-datepicker_footer_compact-paddintBottom;
  1216. }
  1217. .#{$module}-inset-input {
  1218. &-wrapper {
  1219. column-gap: $spacing-datepicker_insetInput_wrapper_compact-margin;
  1220. padding: $spacing-datepicker_insetInput_wrapper_compact-paddingY $spacing-datepicker_insetInput_wrapper_compact-paddingX;
  1221. padding-bottom: $spacing-datepicker_insetInput_wrapper_compact-paddingBottom;
  1222. width: $width-datepicker_insetInput_date_type_wrapper_compact;
  1223. &[x-type=dateRange],
  1224. &[x-type=dateTimeRange] {
  1225. width: $width-datepicker_insetInput_date_range_type_wrapper_compact;
  1226. padding-top: $spacing-datepicker_insetInput_wrapper_rangeType_compact-paddingTop;
  1227. .#{$prefix}-input-wrapper {
  1228. margin-top: $spacing-datepicker_insetInput_wrapper_compact-paddingY;
  1229. }
  1230. }
  1231. &[x-type=month] {
  1232. width: $width-datepicker_insetInput_month_type_wrapper_compact;
  1233. }
  1234. .#{$prefix}-input-wrapper {
  1235. height: $height-datepicker_insetInput_wrapper_compact;
  1236. box-sizing: border-box;
  1237. .#{$prefix}-input {
  1238. font-size: $fontSize-datepicker_insetInput_compact-fontSize;
  1239. line-height: $height-datepicker_insetInput_compact;
  1240. height: $height-datepicker_insetInput_compact;
  1241. vertical-align: top;
  1242. }
  1243. }
  1244. }
  1245. &-separator {
  1246. border-left: $width-datepicker-border solid $color-datepicker_border-bg-default;
  1247. transform: translateX(50%);
  1248. height: auto;
  1249. }
  1250. }
  1251. }
  1252. // 向上弹出时固定高度为6周 #1042
  1253. .#{$prefix}-popover {
  1254. &-wrapper {
  1255. &[x-placement^="top"],
  1256. &[x-placement="leftTop"],
  1257. &[x-placement="rightTop"],
  1258. &[x-placement*="BottomOver"] {
  1259. .#{$module} .#{$module}-weeks {
  1260. min-height: 6 * $width-datepicker_day;
  1261. }
  1262. .#{$module}-compact .#{$module}-weeks {
  1263. min-height: 6 * $width-datepicker_day_compact;
  1264. }
  1265. }
  1266. }
  1267. }
  1268. @import "./rtl.scss";