_vendor.datetimepicker.scss 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346
  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-border;
  6. padding: 8px;
  7. padding-inline-start: 0;
  8. padding-top: 2px;
  9. position: absolute;
  10. z-index: 5;
  11. display: none;
  12. .w-dialog & {
  13. z-index: calc(theme('zIndex.dialog') + 5);
  14. }
  15. * {
  16. padding: 0;
  17. margin: 0;
  18. }
  19. iframe {
  20. position: absolute;
  21. inset-inline-start: 0;
  22. top: 0;
  23. width: 75px;
  24. height: 210px;
  25. background: transparent;
  26. border: 0;
  27. }
  28. .xdsoft_datepicker,
  29. .xdsoft_timepicker {
  30. display: none;
  31. &.active {
  32. display: block;
  33. }
  34. }
  35. .xdsoft_datepicker {
  36. float: left;
  37. margin-inline-start: 8px;
  38. }
  39. .xdsoft_datepicker.active + .xdsoft_timepicker {
  40. margin-top: 8px;
  41. margin-bottom: 3px;
  42. }
  43. .xdsoft_mounthpicker {
  44. position: relative;
  45. text-align: center;
  46. }
  47. .xdsoft_next,
  48. .xdsoft_prev,
  49. .xdsoft_today_button {
  50. background-color: transparent;
  51. cursor: pointer;
  52. display: block;
  53. border: 0;
  54. overflow: hidden;
  55. padding: 5px 0;
  56. position: relative;
  57. white-space: nowrap;
  58. width: 2em;
  59. color: $color-teal;
  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-inline-start: 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-inline-start: 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 $color-grey-4;
  119. height: 170px;
  120. overflow: hidden;
  121. > div > div {
  122. background: $color-grey-5;
  123. border-top: 1px solid $color-grey-4;
  124. color: $color-grey-1;
  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 $color-grey-4;
  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. background: theme('colors.secondary.75');
  176. // stylelint-disable-next-line max-nesting-depth
  177. @media (forced-colors: active) {
  178. background: SelectedItem;
  179. }
  180. }
  181. > div > .xdsoft_option {
  182. padding: 2px 15px 2px 5px;
  183. }
  184. }
  185. }
  186. .xdsoft_month {
  187. width: 90px;
  188. text-align: end;
  189. }
  190. .xdsoft_year {
  191. width: 56px;
  192. }
  193. .xdsoft_calendar {
  194. clear: both;
  195. table {
  196. border-collapse: collapse;
  197. }
  198. td > div {
  199. padding-inline-end: 5px;
  200. }
  201. td,
  202. th {
  203. width: 14.285%;
  204. border: 1px solid $color-grey-4;
  205. color: $color-grey-1;
  206. font-size: 12px;
  207. text-align: end;
  208. padding: 5px 7px;
  209. border-collapse: collapse;
  210. cursor: pointer;
  211. height: 25px;
  212. }
  213. td {
  214. background-color: $color-white;
  215. }
  216. th {
  217. background: $color-grey-5;
  218. font-weight: 700;
  219. font-size: 0.85em;
  220. text-align: center;
  221. cursor: default;
  222. }
  223. }
  224. .xdsoft_calendar td.xdsoft_default,
  225. .xdsoft_calendar td.xdsoft_current,
  226. .xdsoft_timepicker .xdsoft_time_box > div > div.xdsoft_current {
  227. background: theme('colors.secondary.75');
  228. font-weight: 700;
  229. @media (forced-colors: active) {
  230. background: SelectedItem;
  231. }
  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. @media (forced-colors: active) {
  239. opacity: 1;
  240. color: GrayText;
  241. }
  242. }
  243. .xdsoft_calendar td.xdsoft_other_month.xdsoft_disabled {
  244. opacity: 0.2;
  245. @media (forced-colors: active) {
  246. opacity: 1;
  247. color: GrayText;
  248. }
  249. }
  250. .xdsoft_calendar td:hover,
  251. .xdsoft_timepicker .xdsoft_time_box > div > div:hover {
  252. color: $color-white;
  253. background: $color-teal;
  254. }
  255. .xdsoft_calendar td.xdsoft_today {
  256. font-weight: 700;
  257. }
  258. }
  259. .xdsoft_noselect {
  260. user-select: none;
  261. }
  262. .xdsoft_noselect::selection {
  263. background: transparent;
  264. }
  265. .xdsoft_noselect::-moz-selection {
  266. background: transparent;
  267. }
  268. .xdsoft_datetimepicker.xdsoft_inline {
  269. display: inline-block;
  270. position: static;
  271. box-shadow: none;
  272. }
  273. .xdsoft_scroller_box {
  274. position: relative;
  275. }
  276. .xdsoft_scrollbar {
  277. position: absolute;
  278. width: 7px;
  279. inset-inline-end: 0;
  280. top: 0;
  281. bottom: 0;
  282. cursor: pointer;
  283. > .xdsoft_scroller {
  284. // stylelint-disable-next-line declaration-no-important
  285. background: $color-grey-3 !important;
  286. height: 20px;
  287. border-radius: 3px;
  288. }
  289. }