2
0

_vendor.datetimepicker.scss 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347
  1. @use 'sass:map';
  2. .xdsoft_datetimepicker {
  3. box-shadow: 0 5px 10px -5px theme('colors.black-35');
  4. background: theme('colors.surface-field');
  5. border: 1px solid theme('colors.border-field-default');
  6. padding: 8px;
  7. padding-inline-start: 0;
  8. padding-top: 2px;
  9. position: absolute;
  10. z-index: 500;
  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: theme('colors.text-button-outline-default');
  60. text-align: center;
  61. &:before {
  62. content: '';
  63. display: inline-block;
  64. width: 1rem;
  65. height: 1rem;
  66. text-align: center;
  67. margin: 0;
  68. background-color: currentColor;
  69. @media (forced-colors: active) {
  70. background-color: ButtonText;
  71. }
  72. }
  73. &:hover {
  74. color: theme('colors.surface-button-hover');
  75. }
  76. }
  77. .xdsoft_prev {
  78. float: left;
  79. &:before {
  80. mask-image: url('#{$images-root}icons/arrow-left.svg');
  81. }
  82. }
  83. .xdsoft_today_button {
  84. float: left;
  85. margin-inline-start: 5px;
  86. &:before {
  87. mask-image: url('#{$images-root}icons/home.svg');
  88. }
  89. }
  90. .xdsoft_next {
  91. float: right;
  92. &:before {
  93. mask-image: url('#{$images-root}icons/arrow-right.svg');
  94. }
  95. }
  96. .xdsoft_timepicker {
  97. min-width: 70px;
  98. float: left;
  99. text-align: center;
  100. margin-inline-start: 8px;
  101. margin-top: 0;
  102. .xdsoft_prev,
  103. .xdsoft_next {
  104. float: none;
  105. height: 1.5em;
  106. display: block;
  107. text-align: center;
  108. width: 100%;
  109. padding: 0;
  110. }
  111. .xdsoft_prev:before {
  112. mask-image: url('#{$images-root}icons/arrow-up.svg');
  113. }
  114. .xdsoft_next:before {
  115. mask-image: url('#{$images-root}icons/arrow-down.svg');
  116. }
  117. .xdsoft_time_box {
  118. position: relative;
  119. border: 1px solid theme('colors.border-furniture');
  120. height: 170px;
  121. overflow: hidden;
  122. > div > div {
  123. background: theme('colors.surface-header');
  124. border-top: 1px solid theme('colors.border-furniture');
  125. color: theme('colors.text-context');
  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-inline-start: 0.6em;
  134. padding-inline-end: 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: theme('colors.surface-page');
  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 theme('colors.border-furniture');
  161. position: absolute;
  162. inset-inline-end: 0;
  163. top: 30px;
  164. z-index: 101;
  165. display: none;
  166. background: theme('colors.surface-field');
  167. max-height: 160px;
  168. overflow-y: hidden;
  169. &.xdsoft_monthselect {
  170. inset-inline-end: -7px;
  171. }
  172. &.xdsoft_yearselect {
  173. inset-inline-end: 2px;
  174. }
  175. > div > .xdsoft_option:hover {
  176. background: theme('colors.text-highlight');
  177. // stylelint-disable-next-line max-nesting-depth
  178. @media (forced-colors: active) {
  179. background: SelectedItem;
  180. }
  181. }
  182. > div > .xdsoft_option {
  183. padding: 2px 15px 2px 5px;
  184. }
  185. }
  186. }
  187. .xdsoft_month {
  188. width: 90px;
  189. text-align: end;
  190. }
  191. .xdsoft_year {
  192. width: 56px;
  193. }
  194. .xdsoft_calendar {
  195. clear: both;
  196. table {
  197. border-collapse: collapse;
  198. }
  199. td > div {
  200. padding-inline-end: 5px;
  201. }
  202. td,
  203. th {
  204. width: 14.285%;
  205. border: 1px solid theme('colors.border-furniture');
  206. color: theme('colors.text-context');
  207. font-size: 12px;
  208. text-align: end;
  209. padding: 5px 7px;
  210. border-collapse: collapse;
  211. cursor: pointer;
  212. height: 25px;
  213. }
  214. td {
  215. background-color: theme('colors.surface-page');
  216. }
  217. th {
  218. background: theme('colors.surface-header');
  219. font-weight: 700;
  220. font-size: 0.85em;
  221. text-align: center;
  222. cursor: default;
  223. }
  224. }
  225. .xdsoft_calendar td.xdsoft_default,
  226. .xdsoft_calendar td.xdsoft_current,
  227. .xdsoft_timepicker .xdsoft_time_box > div > div.xdsoft_current {
  228. background: theme('colors.text-highlight');
  229. font-weight: 700;
  230. @media (forced-colors: active) {
  231. background: SelectedItem;
  232. }
  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: theme('colors.border-furniture');
  239. @media (forced-colors: active) {
  240. opacity: 1;
  241. color: GrayText;
  242. }
  243. }
  244. .xdsoft_calendar td.xdsoft_other_month.xdsoft_disabled {
  245. opacity: 0.2;
  246. @media (forced-colors: active) {
  247. opacity: 1;
  248. color: GrayText;
  249. }
  250. }
  251. .xdsoft_calendar td:hover,
  252. .xdsoft_timepicker .xdsoft_time_box > div > div:hover {
  253. color: theme('colors.text-button');
  254. background: theme('colors.surface-button-default');
  255. }
  256. .xdsoft_calendar td.xdsoft_today {
  257. font-weight: 700;
  258. }
  259. }
  260. .xdsoft_noselect {
  261. user-select: none;
  262. }
  263. .xdsoft_noselect::selection {
  264. background: transparent;
  265. }
  266. .xdsoft_noselect::-moz-selection {
  267. background: transparent;
  268. }
  269. .xdsoft_datetimepicker.xdsoft_inline {
  270. display: inline-block;
  271. position: static;
  272. box-shadow: none;
  273. }
  274. .xdsoft_scroller_box {
  275. position: relative;
  276. }
  277. .xdsoft_scrollbar {
  278. position: absolute;
  279. width: 7px;
  280. inset-inline-end: 0;
  281. top: 0;
  282. bottom: 0;
  283. cursor: pointer;
  284. > .xdsoft_scroller {
  285. // stylelint-disable-next-line declaration-no-important
  286. background: theme('colors.border-furniture') !important;
  287. height: 20px;
  288. border-radius: 3px;
  289. }
  290. }