_vendor.datetimepicker.scss 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334
  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-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 #ccc;
  118. height: 170px;
  119. overflow: hidden;
  120. border-bottom: 1px solid #ddd;
  121. > div > div {
  122. background: #f5f5f5;
  123. border-top: 1px solid #ddd;
  124. color: #666;
  125. font-size: 1em;
  126. text-align: center;
  127. border-collapse: collapse;
  128. cursor: pointer;
  129. border-bottom-width: 0;
  130. height: 2.3em;
  131. line-height: 2.3em;
  132. padding-inline-start: 0.6em;
  133. padding-inline-end: 0.6em;
  134. // stylelint-disable-next-line max-nesting-depth
  135. &:first-child {
  136. border-top-width: 0;
  137. }
  138. }
  139. }
  140. }
  141. .xdsoft_label {
  142. display: inline;
  143. position: relative;
  144. z-index: 9999;
  145. margin: 0;
  146. padding: 5px 3px;
  147. font-size: 14px;
  148. line-height: 20px;
  149. font-weight: bold;
  150. background-color: $color-white;
  151. float: left;
  152. width: 182px;
  153. text-align: center;
  154. cursor: pointer;
  155. &:hover {
  156. text-decoration: underline;
  157. }
  158. > .xdsoft_select {
  159. border: 1px solid #ccc;
  160. position: absolute;
  161. inset-inline-end: 0;
  162. top: 30px;
  163. z-index: 101;
  164. display: none;
  165. background: $color-white;
  166. max-height: 160px;
  167. overflow-y: hidden;
  168. &.xdsoft_monthselect {
  169. inset-inline-end: -7px;
  170. }
  171. &.xdsoft_yearselect {
  172. inset-inline-end: 2px;
  173. }
  174. > div > .xdsoft_option:hover {
  175. color: $color-white;
  176. background: #ff8000;
  177. }
  178. > div > .xdsoft_option {
  179. padding: 2px 15px 2px 5px;
  180. }
  181. > div > .xdsoft_option.xdsoft_current {
  182. background: #3af;
  183. color: $color-white;
  184. font-weight: 700;
  185. }
  186. }
  187. }
  188. .xdsoft_month {
  189. width: 90px;
  190. text-align: end;
  191. }
  192. .xdsoft_year {
  193. width: 56px;
  194. }
  195. .xdsoft_calendar {
  196. clear: both;
  197. table {
  198. border-collapse: collapse;
  199. }
  200. td > div {
  201. padding-inline-end: 5px;
  202. }
  203. td,
  204. th {
  205. width: 14.285%;
  206. border: 1px solid #ddd;
  207. color: #666;
  208. font-size: 12px;
  209. text-align: end;
  210. padding: 5px 7px;
  211. border-collapse: collapse;
  212. cursor: pointer;
  213. height: 25px;
  214. }
  215. td {
  216. background-color: $color-white;
  217. }
  218. th {
  219. background: #f1f1f1;
  220. font-weight: 700;
  221. font-size: 0.85em;
  222. text-align: center;
  223. cursor: default;
  224. }
  225. }
  226. .xdsoft_calendar td.xdsoft_default,
  227. .xdsoft_calendar td.xdsoft_current,
  228. .xdsoft_timepicker .xdsoft_time_box > div > div.xdsoft_current {
  229. background: $color-salmon;
  230. color: $color-white;
  231. font-weight: 700;
  232. }
  233. .xdsoft_calendar td.xdsoft_other_month,
  234. .xdsoft_calendar td.xdsoft_disabled,
  235. .xdsoft_time_box > div > div.xdsoft_disabled {
  236. opacity: 0.5;
  237. background: $color-grey-3;
  238. }
  239. .xdsoft_calendar td.xdsoft_other_month.xdsoft_disabled {
  240. opacity: 0.2;
  241. }
  242. .xdsoft_calendar td:hover,
  243. .xdsoft_timepicker .xdsoft_time_box > div > div:hover {
  244. color: $color-white;
  245. background: $color-teal;
  246. }
  247. .xdsoft_calendar td.xdsoft_today {
  248. font-weight: 700;
  249. }
  250. }
  251. .xdsoft_noselect {
  252. user-select: none;
  253. }
  254. .xdsoft_noselect::selection {
  255. background: transparent;
  256. }
  257. .xdsoft_noselect::-moz-selection {
  258. background: transparent;
  259. }
  260. .xdsoft_datetimepicker.xdsoft_inline {
  261. display: inline-block;
  262. position: static;
  263. box-shadow: none;
  264. }
  265. .xdsoft_scroller_box {
  266. position: relative;
  267. }
  268. .xdsoft_scrollbar {
  269. position: absolute;
  270. width: 7px;
  271. inset-inline-end: 0;
  272. top: 0;
  273. bottom: 0;
  274. cursor: pointer;
  275. > .xdsoft_scroller {
  276. // stylelint-disable-next-line declaration-no-important
  277. background: #ccc !important;
  278. height: 20px;
  279. border-radius: 3px;
  280. }
  281. }