_vendor.datetimepicker.scss 6.7 KB

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