_vendor.datetimepicker.scss 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347
  1. // stylelint-disable selector-max-combinators, max-nesting-depth
  2. @use 'sass:map';
  3. @use '../settings' as *;
  4. .xdsoft_datetimepicker {
  5. box-shadow: 0 5px 10px -5px theme('colors.black-35');
  6. background: theme('colors.surface-field');
  7. border: 1px solid theme('colors.border-field-default');
  8. padding: 8px;
  9. padding-inline-start: 0;
  10. padding-top: 2px;
  11. position: absolute;
  12. z-index: 500;
  13. display: none;
  14. .w-dialog & {
  15. z-index: calc(theme('zIndex.dialog') + 5);
  16. }
  17. * {
  18. padding: 0;
  19. margin: 0;
  20. }
  21. iframe {
  22. position: absolute;
  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: inline-start;
  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: theme('colors.text-button-outline-default');
  62. text-align: center;
  63. &:before {
  64. content: '';
  65. display: inline-block;
  66. width: 1rem;
  67. height: 1rem;
  68. text-align: center;
  69. margin: 0;
  70. background-color: currentColor;
  71. @media (forced-colors: active) {
  72. background-color: ButtonText;
  73. }
  74. }
  75. &:hover {
  76. color: theme('colors.text-button-outline-hover');
  77. }
  78. }
  79. .xdsoft_prev {
  80. float: inline-start;
  81. &:before {
  82. mask-image: url('#{$images-root}icons/arrow-left.svg');
  83. }
  84. }
  85. .xdsoft_today_button {
  86. float: inline-start;
  87. margin-inline-start: 5px;
  88. &:before {
  89. mask-image: url('#{$images-root}icons/home.svg');
  90. }
  91. }
  92. .xdsoft_next {
  93. float: inline-end;
  94. &:before {
  95. mask-image: url('#{$images-root}icons/arrow-right.svg');
  96. }
  97. }
  98. .xdsoft_timepicker {
  99. min-width: 70px;
  100. float: inline-start;
  101. text-align: center;
  102. margin-inline-start: 8px;
  103. margin-top: 0;
  104. .xdsoft_prev,
  105. .xdsoft_next {
  106. float: none;
  107. height: 1.5em;
  108. display: block;
  109. text-align: center;
  110. width: 100%;
  111. padding: 0;
  112. }
  113. .xdsoft_prev:before {
  114. mask-image: url('#{$images-root}icons/arrow-up.svg');
  115. }
  116. .xdsoft_next:before {
  117. mask-image: url('#{$images-root}icons/arrow-down.svg');
  118. }
  119. .xdsoft_time_box {
  120. position: relative;
  121. border: 1px solid theme('colors.border-furniture');
  122. height: 170px;
  123. overflow: hidden;
  124. > div > div {
  125. background: theme('colors.surface-header');
  126. border-top: 1px solid theme('colors.border-furniture');
  127. color: theme('colors.text-context');
  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. &:first-child {
  138. border-top-width: 0;
  139. }
  140. }
  141. }
  142. }
  143. .xdsoft_label {
  144. display: inline;
  145. position: relative;
  146. z-index: 9999;
  147. margin: 0;
  148. padding: 5px 3px;
  149. font-size: 14px;
  150. line-height: 20px;
  151. font-weight: bold;
  152. background-color: theme('colors.surface-page');
  153. float: inline-start;
  154. width: 182px;
  155. text-align: center;
  156. cursor: pointer;
  157. &:hover {
  158. text-decoration: underline;
  159. }
  160. > .xdsoft_select {
  161. border: 1px solid theme('colors.border-furniture');
  162. position: absolute;
  163. inset-inline-end: 0;
  164. top: 30px;
  165. z-index: 101;
  166. display: none;
  167. background: theme('colors.surface-field');
  168. max-height: 160px;
  169. overflow-y: hidden;
  170. &.xdsoft_monthselect {
  171. inset-inline-end: -7px;
  172. }
  173. &.xdsoft_yearselect {
  174. inset-inline-end: 2px;
  175. }
  176. > div > .xdsoft_option:hover {
  177. background: theme('colors.text-highlight');
  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: 50%;
  238. background: theme('colors.border-furniture');
  239. @media (forced-colors: active) {
  240. opacity: 100%;
  241. color: GrayText;
  242. }
  243. }
  244. .xdsoft_calendar td.xdsoft_other_month.xdsoft_disabled {
  245. opacity: 20%;
  246. @media (forced-colors: active) {
  247. opacity: 100%;
  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. }