_vendor.datetimepicker.scss 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327
  1. @use 'sass:map';
  2. .xdsoft_datetimepicker {
  3. box-shadow: 0 5px 10px -5px theme('colors.black-35');
  4. background: $color-white;
  5. border: 1px solid $color-input-focus-border;
  6. padding: 8px;
  7. padding-inline-start: 0;
  8. padding-top: 2px;
  9. position: absolute;
  10. z-index: 5;
  11. box-sizing: border-box;
  12. display: none;
  13. * {
  14. box-sizing: border-box;
  15. padding: 0;
  16. margin: 0;
  17. }
  18. iframe {
  19. position: absolute;
  20. inset-inline-start: 0;
  21. top: 0;
  22. width: 75px;
  23. height: 210px;
  24. background: transparent;
  25. border: 0;
  26. }
  27. .xdsoft_datepicker,
  28. .xdsoft_timepicker {
  29. display: none;
  30. &.active {
  31. display: block;
  32. }
  33. }
  34. .xdsoft_datepicker {
  35. float: left;
  36. margin-inline-start: 8px;
  37. }
  38. .xdsoft_datepicker.active + .xdsoft_timepicker {
  39. margin-top: 8px;
  40. margin-bottom: 3px;
  41. }
  42. .xdsoft_mounthpicker {
  43. position: relative;
  44. text-align: center;
  45. }
  46. .xdsoft_next,
  47. .xdsoft_prev,
  48. .xdsoft_today_button {
  49. background-color: transparent;
  50. cursor: pointer;
  51. display: block;
  52. border: 0;
  53. overflow: hidden;
  54. padding: 5px 0;
  55. position: relative;
  56. white-space: nowrap;
  57. width: 2em;
  58. color: $color-teal;
  59. text-align: center;
  60. &:before {
  61. font-size: 1.5em;
  62. font-family: $font-wagtail-icons;
  63. width: 1em;
  64. line-height: 1.3em;
  65. text-align: center;
  66. margin: 0;
  67. }
  68. &:hover {
  69. color: $color-teal-darker;
  70. }
  71. }
  72. .xdsoft_prev {
  73. float: left;
  74. &:before {
  75. content: map.get($icons, 'arrow-left'); // UI-Redesign: to be removed
  76. }
  77. }
  78. .xdsoft_today_button {
  79. float: left;
  80. margin-inline-start: 5px;
  81. &:before {
  82. content: map.get($icons, 'home'); // UI-Redesign: to be removed
  83. }
  84. }
  85. .xdsoft_next {
  86. float: right;
  87. &:before {
  88. content: map.get($icons, 'arrow-right'); // UI-Redesign: to be removed
  89. }
  90. }
  91. .xdsoft_timepicker {
  92. min-width: 70px;
  93. float: left;
  94. text-align: center;
  95. margin-inline-start: 8px;
  96. margin-top: 0;
  97. .xdsoft_prev,
  98. .xdsoft_next {
  99. float: none;
  100. height: 1.5em;
  101. display: block;
  102. text-align: center;
  103. width: 100%;
  104. padding: 0;
  105. &:before {
  106. width: 100%;
  107. }
  108. }
  109. .xdsoft_prev:before {
  110. content: map.get($icons, 'arrow-up'); // UI-Redesign: to be removed
  111. }
  112. .xdsoft_next:before {
  113. content: map.get($icons, 'arrow-down'); // UI-Redesign: to be removed
  114. }
  115. .xdsoft_time_box {
  116. position: relative;
  117. border: 1px solid $color-grey-4;
  118. height: 170px;
  119. overflow: hidden;
  120. > div > div {
  121. background: $color-grey-5;
  122. border-top: 1px solid $color-grey-4;
  123. color: $color-grey-1;
  124. font-size: 1em;
  125. text-align: center;
  126. border-collapse: collapse;
  127. cursor: pointer;
  128. border-bottom-width: 0;
  129. height: 2.3em;
  130. line-height: 2.3em;
  131. padding-inline-start: 0.6em;
  132. padding-inline-end: 0.6em;
  133. // stylelint-disable-next-line max-nesting-depth
  134. &:first-child {
  135. border-top-width: 0;
  136. }
  137. }
  138. }
  139. }
  140. .xdsoft_label {
  141. display: inline;
  142. position: relative;
  143. z-index: 9999;
  144. margin: 0;
  145. padding: 5px 3px;
  146. font-size: 14px;
  147. line-height: 20px;
  148. font-weight: bold;
  149. background-color: $color-white;
  150. float: left;
  151. width: 182px;
  152. text-align: center;
  153. cursor: pointer;
  154. &:hover {
  155. text-decoration: underline;
  156. }
  157. > .xdsoft_select {
  158. border: 1px solid $color-grey-4;
  159. position: absolute;
  160. inset-inline-end: 0;
  161. top: 30px;
  162. z-index: 101;
  163. display: none;
  164. background: $color-white;
  165. max-height: 160px;
  166. overflow-y: hidden;
  167. &.xdsoft_monthselect {
  168. inset-inline-end: -7px;
  169. }
  170. &.xdsoft_yearselect {
  171. inset-inline-end: 2px;
  172. }
  173. > div > .xdsoft_option:hover {
  174. color: $color-white;
  175. background: $color-salmon;
  176. }
  177. > div > .xdsoft_option {
  178. padding: 2px 15px 2px 5px;
  179. }
  180. }
  181. }
  182. .xdsoft_month {
  183. width: 90px;
  184. text-align: end;
  185. }
  186. .xdsoft_year {
  187. width: 56px;
  188. }
  189. .xdsoft_calendar {
  190. clear: both;
  191. table {
  192. border-collapse: collapse;
  193. }
  194. td > div {
  195. padding-inline-end: 5px;
  196. }
  197. td,
  198. th {
  199. width: 14.285%;
  200. border: 1px solid $color-grey-4;
  201. color: $color-grey-1;
  202. font-size: 12px;
  203. text-align: end;
  204. padding: 5px 7px;
  205. border-collapse: collapse;
  206. cursor: pointer;
  207. height: 25px;
  208. }
  209. td {
  210. background-color: $color-white;
  211. }
  212. th {
  213. background: $color-grey-5;
  214. font-weight: 700;
  215. font-size: 0.85em;
  216. text-align: center;
  217. cursor: default;
  218. }
  219. }
  220. .xdsoft_calendar td.xdsoft_default,
  221. .xdsoft_calendar td.xdsoft_current,
  222. .xdsoft_timepicker .xdsoft_time_box > div > div.xdsoft_current {
  223. background: $color-salmon;
  224. color: $color-white;
  225. font-weight: 700;
  226. }
  227. .xdsoft_calendar td.xdsoft_other_month,
  228. .xdsoft_calendar td.xdsoft_disabled,
  229. .xdsoft_time_box > div > div.xdsoft_disabled {
  230. opacity: 0.5;
  231. background: $color-grey-3;
  232. }
  233. .xdsoft_calendar td.xdsoft_other_month.xdsoft_disabled {
  234. opacity: 0.2;
  235. }
  236. .xdsoft_calendar td:hover,
  237. .xdsoft_timepicker .xdsoft_time_box > div > div:hover {
  238. color: $color-white;
  239. background: $color-teal;
  240. }
  241. .xdsoft_calendar td.xdsoft_today {
  242. font-weight: 700;
  243. }
  244. }
  245. .xdsoft_noselect {
  246. user-select: none;
  247. }
  248. .xdsoft_noselect::selection {
  249. background: transparent;
  250. }
  251. .xdsoft_noselect::-moz-selection {
  252. background: transparent;
  253. }
  254. .xdsoft_datetimepicker.xdsoft_inline {
  255. display: inline-block;
  256. position: static;
  257. box-shadow: none;
  258. }
  259. .xdsoft_scroller_box {
  260. position: relative;
  261. }
  262. .xdsoft_scrollbar {
  263. position: absolute;
  264. width: 7px;
  265. inset-inline-end: 0;
  266. top: 0;
  267. bottom: 0;
  268. cursor: pointer;
  269. > .xdsoft_scroller {
  270. // stylelint-disable-next-line declaration-no-important
  271. background: $color-grey-3 !important;
  272. height: 20px;
  273. border-radius: 3px;
  274. }
  275. }