datePicker.scss 53 KB

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