datePicker.scss 53 KB

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