datePicker.scss 57 KB

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