_vendor.datetimepicker.scss 6.7 KB

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