datePicker.scss 57 KB

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