_vendor.datetimepicker.scss 6.0 KB

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