calendar.scss 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520
  1. @import "./variables.scss";
  2. $module: #{$prefix}-calendar;
  3. .#{$module}-day,
  4. .#{$module}-week,
  5. .#{$module}-month {
  6. ul,
  7. li {
  8. padding: $spacing-calendar_ul_li-padding;
  9. margin: $spacing-calendar_ul_li-margin;
  10. list-style: none;
  11. }
  12. &-sticky-top {
  13. position: sticky;
  14. position: -webkit-sticky;
  15. top: $spacing-calendar_sticky_top-top;
  16. left: $spacing-calendar_sticky_top-left;
  17. right: $spacing-calendar_sticky_top-right;
  18. background-color: $color-calendar_sticky-bg;
  19. z-index: $z-calendar_stickyTop;
  20. }
  21. .#{$module}-weekend {
  22. background-color: $color-calendar_weekend-bg;
  23. }
  24. .#{$module}-event-items {
  25. pointer-events: none;
  26. & > * {
  27. pointer-events: auto;
  28. }
  29. .#{$module}-event-day {
  30. position: absolute;
  31. left: $spacing-calendar_event_day-left;
  32. right: $spacing-calendar_event_day-right;
  33. z-index: $z-calendar_item;
  34. overflow: hidden;
  35. }
  36. }
  37. .#{$module}-custom-container {
  38. position: absolute;
  39. top: $spacing-calendar_custom_container-top;
  40. right: $spacing-calendar_custom_container-right;
  41. bottom: $spacing-calendar_custom_container-bottom;
  42. left: $spacing-calendar_custom_container-left;
  43. }
  44. }
  45. .#{$module}-day,
  46. .#{$module}-week {
  47. overflow: auto;
  48. &-sticky-left {
  49. position: sticky;
  50. position: -webkit-sticky;
  51. left: $spacing-calendar_sticky_left-left;
  52. background-color: $color-calendar_sticky-bg;
  53. z-index: $z-calendar_stickyLeft;
  54. }
  55. .#{$module}-tag {
  56. @include font-size-regular;
  57. min-width: $width-calendar_day-minWidth;
  58. color: $color-calendar_day-text-default;
  59. }
  60. &-scroll {
  61. // height: 100%;
  62. display: flex;
  63. flex: 1 1 auto;
  64. position: relative;
  65. }
  66. .#{$module}-grid {
  67. display: flex;
  68. align-items: flex-start;
  69. flex: 1 1 auto;
  70. position: relative;
  71. &-skeleton {
  72. position: relative;
  73. box-sizing: border-box;
  74. li {
  75. height: $height-calendar_time_grid;
  76. &:last-child,
  77. &:nth-last-child(2) {
  78. height: 0;
  79. }
  80. }
  81. &-row-line::after {
  82. content: "";
  83. border-bottom: $width-calendar-border-default solid $color-calendar_day-border;
  84. position: absolute;
  85. left: 0;
  86. right: 0;
  87. z-index: $z-calendar_line;
  88. pointer-events: none;
  89. }
  90. &-row-line:first-child::after {
  91. border: 0;
  92. }
  93. }
  94. &-content {
  95. flex: 1 0 auto;
  96. min-width: $width-calendar_day_grid-minWidth;
  97. height: 100%;
  98. }
  99. &-curr {
  100. &-circle {
  101. background: $color-calendar_currCircle-bg-default;
  102. border-radius: $radius-calendar_currCircle;
  103. content: "";
  104. position: absolute;
  105. height: $width-calendar_currCircle;
  106. width: $width-calendar_currCircle;
  107. margin-top: $spacing-calendar_currCircle-marginTop;
  108. z-index: $z-calendar_curr;
  109. }
  110. &-line {
  111. position: absolute;
  112. left: $spacing-calendar_currLine-left;
  113. right: $spacing-calendar_currLine-right;
  114. z-index: $z-calendar_curr;
  115. border-top: $width-calendar-border-default solid $color-calendar_curr-border;
  116. pointer-events: none;
  117. }
  118. }
  119. }
  120. .#{$module}-all-day {
  121. display: flex;
  122. flex: 1 1 auto;
  123. border-bottom: $width-calendar-border-thick solid $color-calendar_day-border;
  124. .#{$module}-tag {
  125. text-align: right;
  126. padding-right: $spacing-calendar_allDay_tag-paddingRight;
  127. span {
  128. line-height: $font-calendar_allDay_tag-lineHeight;
  129. }
  130. }
  131. &-content {
  132. display: flex;
  133. flex: 1 0 auto;
  134. height: 100%;
  135. min-height: $height-calendar_allDay-minHeight;
  136. min-width: $width-calendar_day_grid-minWidth;
  137. }
  138. .#{$module}-event-items {
  139. width: 100%;
  140. }
  141. }
  142. .#{$module}-time {
  143. height: auto;
  144. display: flex;
  145. flex: none;
  146. align-items: flex-start;
  147. padding-right: $spacing-calendar_time-paddingRight;
  148. &-item {
  149. position: relative;
  150. height: $height-calendar_day_grid;
  151. text-align: right;
  152. span {
  153. @include font-size-regular;
  154. display: block;
  155. position: relative;
  156. top: $spacing-calendar_time_item_span-top;
  157. color: $color-calendar_day-text-default;
  158. }
  159. }
  160. }
  161. .#{$module}-time .#{$module}-time-items {
  162. position: relative;
  163. min-width: $width-calendar_tag_col-minWidth;
  164. background-color: $color-calendar-bg;
  165. box-sizing: border-box;
  166. margin-left: auto;
  167. }
  168. }
  169. .#{$module}-week,
  170. .#{$module}-month {
  171. .#{$module}-today {
  172. .#{$module}-today-date {
  173. width: $width-calendar_today_date;
  174. height: $height-calendar_today_date;
  175. line-height: $font-calendar_today_date-lineHeight;
  176. text-align: center;
  177. border-radius: $radius-calendar_today_date;
  178. background-color: $color-calendar-bg-active;
  179. color: $color-calendar-text-active;
  180. }
  181. }
  182. }
  183. .#{$module}-day {
  184. &-scroll-wrapper {
  185. height: $height-calendar_day_scroll_wrapper;
  186. }
  187. }
  188. .#{$module}-week {
  189. position: relative;
  190. display: grid;
  191. &-scroll-wrapper {
  192. height: $height-calendar_week_scroll_wrapper;
  193. }
  194. .#{$module}-grid-skeleton-row-line::after {
  195. left: 0;
  196. }
  197. .#{$module}-grid-skeleton li {
  198. border-right: $width-calendar-border-default solid $color-calendar_day-border;
  199. }
  200. .#{$module}-grid:last-child {
  201. .#{$module}-grid-content li {
  202. border-right: 0;
  203. }
  204. }
  205. &-header,
  206. &-grid-row {
  207. display: flex;
  208. align-items: flex-start;
  209. @include font-size-regular;
  210. color: $color-calendar_day-text-default;
  211. }
  212. &-header {
  213. flex: 1 1 auto;
  214. border-bottom: $width-calendar-border-default solid $color-calendar_day-border;
  215. }
  216. &-grid {
  217. display: flex;
  218. flex: 1 0 auto;
  219. &-row {
  220. display: flex;
  221. flex: 1 0 auto;
  222. li {
  223. display: flex;
  224. flex: 1 1 0;
  225. border-right: $width-calendar-border-default solid transparent;
  226. height: auto;
  227. box-sizing: border-box;
  228. justify-content: center;
  229. align-items: center;
  230. span {
  231. display: flex;
  232. align-items: center;
  233. justify-content: center;
  234. line-height: $font-calendar_day_allDay-lineHeight;
  235. &:last-child {
  236. padding: $spacing-calendar_grid_row_span_child-paddingY $spacing-calendar_grid_row_span_child-paddingX;
  237. }
  238. }
  239. }
  240. }
  241. }
  242. .#{$module}-all-day {
  243. font-size: $font-calendar_day_allDay-fontSize;
  244. &-content {
  245. padding-left: $spacing-calendar_allDay_content-paddingLeft;
  246. position: relative;
  247. .#{$module}-all-day-skeleton {
  248. display: flex;
  249. flex: 1 1 auto;
  250. li {
  251. flex: 1 1 auto;
  252. min-width: $width-calendar_day_grid-minWidth;
  253. box-sizing: border-box;
  254. border-right: $width-calendar-border-default solid $color-calendar_day-border;
  255. &:last-child {
  256. border-right: $width-calendar-border-default solid transparent;
  257. }
  258. }
  259. }
  260. }
  261. .#{$module}-event-items {
  262. position: absolute;
  263. .#{$module}-event-allday {
  264. position: absolute;
  265. & > * {
  266. @include font-size-regular;
  267. }
  268. }
  269. }
  270. }
  271. & &-tag {
  272. text-align: right;
  273. line-height: $font-calendar_day_allDay-lineHeight;
  274. &:first-child {
  275. padding-right: $spacing-calendar_tag_child-paddingRight;
  276. }
  277. }
  278. }
  279. .#{$module}-month {
  280. display: flex;
  281. flex-direction: column;
  282. height: $height-calendar_month;
  283. overflow: hidden;
  284. @include font-size-regular;
  285. &-grid-wrapper {
  286. height: $height-calendar_month_grid_wrapper;
  287. }
  288. &-week,
  289. &-skeleton {
  290. height: $height-calendar_month_week_skeletion;
  291. }
  292. &-header {
  293. display: flex;
  294. flex: 1 1 auto;
  295. align-items: flex-start;
  296. color: $color-calendar_day-text-default;
  297. }
  298. &-grid {
  299. flex: 1 1 auto;
  300. box-sizing: border-box;
  301. li {
  302. line-height: $font-calendar_day_allDay-lineHeight;
  303. }
  304. }
  305. &-grid-row,
  306. &-skeleton {
  307. display: flex;
  308. box-sizing: border-box;
  309. li {
  310. flex: 1;
  311. white-space: nowrap;
  312. text-align: right;
  313. padding-right: $spacing-calendar_skeletion_grid_row_li-paddingRight;
  314. box-sizing: border-box;
  315. border-bottom: $width-calendar-border-default solid $color-calendar_day-border;
  316. color: $color-calendar_day-text-default;
  317. span {
  318. display: inline-block;
  319. text-align: right;
  320. }
  321. }
  322. }
  323. &-skeleton {
  324. position: absolute;
  325. overflow: hidden;
  326. left: $spacing-calendar_month_skeletion-left;
  327. right: $spacing-calendar_month_skeletion-right;
  328. li {
  329. position: relative;
  330. overflow: hidden;
  331. border-right: $width-calendar-border-default solid $color-calendar_day-border;
  332. height: $height-calendar_month_skeletion_li;
  333. padding-top: $spacing-calendar_skeleton_li_child-paddingTop;
  334. span {
  335. @include font-size-regular;
  336. }
  337. }
  338. li:last-child {
  339. border-right: none;
  340. }
  341. .#{$module}-month-same {
  342. color: $color-calendar_date-text-default;
  343. }
  344. .#{$module}-month-event-card-wrapper {
  345. @include font-size-regular;
  346. display: block;
  347. position: absolute;
  348. right: $spacing-calendar_month_event_card_wrapper-right;
  349. padding-top: $spacing-calendar_month_event_card_wrapper-paddingTop;
  350. user-select: none;
  351. &:hover {
  352. cursor: pointer;
  353. }
  354. }
  355. }
  356. .#{$module}-event-items {
  357. position: absolute;
  358. top: $spacing-calendar_event_items-top;
  359. right: $spacing-calendar_event_items-right;
  360. bottom: $spacing-calendar_event_items-bottom;
  361. left: $spacing-calendar_event_items-left;
  362. overflow: hidden;
  363. }
  364. &-grid-col {
  365. display: flex;
  366. flex-direction: column;
  367. flex: 1;
  368. height: $height-calendar_month_grid_col;
  369. }
  370. &-weekrow {
  371. flex: 1 1 auto;
  372. position: relative;
  373. .#{$module}-event-items {
  374. .#{$module}-event-month {
  375. position: absolute;
  376. font-size: $font-calendar_month_day-fontSize;
  377. height: $height-calendar_month_week_row_event_month;
  378. overflow: hidden;
  379. & > * {
  380. @include font-size-regular;
  381. }
  382. }
  383. }
  384. }
  385. &-date {
  386. position: absolute;
  387. right: $spacing-calendar_month_date-right;
  388. z-index: $z-calendar_line;
  389. }
  390. }
  391. .#{$module}-month-event-card {
  392. width: $width-calendar_card;
  393. ul,
  394. li {
  395. padding: $spacing-calendar_month_event_card_ul_li-padding;
  396. margin: $spacing-calendar_month_event_card_ul_li-margin;
  397. list-style: none;
  398. }
  399. &-close {
  400. margin-right: $spacing-calendar_month_event_card_close-marginRight;
  401. }
  402. &-content {
  403. padding: $spacing-calendar_month_event_card_content-paddingY $spacing-calendar_month_event_card_content-paddingX;
  404. }
  405. &-header {
  406. display: flex;
  407. flex-direction: row;
  408. margin: $spacing-calendar_header-marginY $spacing-calendar_header-marginX;
  409. &-info {
  410. display: flex;
  411. flex: 1;
  412. flex-direction: column;
  413. align-items: center;
  414. &-weekday {
  415. color: $color-calendar_day-text-default;
  416. }
  417. &-date {
  418. @include font-size-header-4;
  419. margin-top: $spacing-calendar_header_info_date-marginTop;
  420. }
  421. }
  422. }
  423. &-body {
  424. padding: $spacing-calendar_body-padingY $spacing-calendar_body-padingX;
  425. li {
  426. height: $height-calendar_body_li;
  427. }
  428. }
  429. }
  430. @import "./rtl.scss";