2
0

_vendor.datetimepicker.scss 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346
  1. // stylelint-disable selector-max-combinators, max-nesting-depth
  2. @use 'sass:map';
  3. .xdsoft_datetimepicker {
  4. box-shadow: 0 5px 10px -5px theme('colors.black-35');
  5. background: theme('colors.surface-field');
  6. border: 1px solid theme('colors.border-field-default');
  7. padding: 8px;
  8. padding-inline-start: 0;
  9. padding-top: 2px;
  10. position: absolute;
  11. z-index: 500;
  12. display: none;
  13. .w-dialog & {
  14. z-index: calc(theme('zIndex.dialog') + 5);
  15. }
  16. * {
  17. padding: 0;
  18. margin: 0;
  19. }
  20. iframe {
  21. position: absolute;
  22. inset-inline-start: 0;
  23. top: 0;
  24. width: 75px;
  25. height: 210px;
  26. background: transparent;
  27. border: 0;
  28. }
  29. .xdsoft_datepicker,
  30. .xdsoft_timepicker {
  31. display: none;
  32. &.active {
  33. display: block;
  34. }
  35. }
  36. .xdsoft_datepicker {
  37. float: inline-start;
  38. margin-inline-start: 8px;
  39. }
  40. .xdsoft_datepicker.active + .xdsoft_timepicker {
  41. margin-top: 8px;
  42. margin-bottom: 3px;
  43. }
  44. .xdsoft_mounthpicker {
  45. position: relative;
  46. text-align: center;
  47. }
  48. .xdsoft_next,
  49. .xdsoft_prev,
  50. .xdsoft_today_button {
  51. background-color: transparent;
  52. cursor: pointer;
  53. display: block;
  54. border: 0;
  55. overflow: hidden;
  56. padding: 5px 0;
  57. position: relative;
  58. white-space: nowrap;
  59. width: 2em;
  60. color: theme('colors.text-button-outline-default');
  61. text-align: center;
  62. &:before {
  63. content: '';
  64. display: inline-block;
  65. width: 1rem;
  66. height: 1rem;
  67. text-align: center;
  68. margin: 0;
  69. background-color: currentColor;
  70. @media (forced-colors: active) {
  71. background-color: ButtonText;
  72. }
  73. }
  74. &:hover {
  75. color: theme('colors.text-button-outline-hover');
  76. }
  77. }
  78. .xdsoft_prev {
  79. float: inline-start;
  80. &:before {
  81. mask-image: url('#{$images-root}icons/arrow-left.svg');
  82. }
  83. }
  84. .xdsoft_today_button {
  85. float: inline-start;
  86. margin-inline-start: 5px;
  87. &:before {
  88. mask-image: url('#{$images-root}icons/home.svg');
  89. }
  90. }
  91. .xdsoft_next {
  92. float: inline-end;
  93. &:before {
  94. mask-image: url('#{$images-root}icons/arrow-right.svg');
  95. }
  96. }
  97. .xdsoft_timepicker {
  98. min-width: 70px;
  99. float: inline-start;
  100. text-align: center;
  101. margin-inline-start: 8px;
  102. margin-top: 0;
  103. .xdsoft_prev,
  104. .xdsoft_next {
  105. float: none;
  106. height: 1.5em;
  107. display: block;
  108. text-align: center;
  109. width: 100%;
  110. padding: 0;
  111. }
  112. .xdsoft_prev:before {
  113. mask-image: url('#{$images-root}icons/arrow-up.svg');
  114. }
  115. .xdsoft_next:before {
  116. mask-image: url('#{$images-root}icons/arrow-down.svg');
  117. }
  118. .xdsoft_time_box {
  119. position: relative;
  120. border: 1px solid theme('colors.border-furniture');
  121. height: 170px;
  122. overflow: hidden;
  123. > div > div {
  124. background: theme('colors.surface-header');
  125. border-top: 1px solid theme('colors.border-furniture');
  126. color: theme('colors.text-context');
  127. font-size: 1em;
  128. text-align: center;
  129. border-collapse: collapse;
  130. cursor: pointer;
  131. border-bottom-width: 0;
  132. height: 2.3em;
  133. line-height: 2.3em;
  134. padding-inline-start: 0.6em;
  135. padding-inline-end: 0.6em;
  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: inline-start;
  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. @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 theme('colors.border-furniture');
  205. color: theme('colors.text-context');
  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: theme('colors.surface-page');
  215. }
  216. th {
  217. background: theme('colors.surface-header');
  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.text-highlight');
  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: 50%;
  237. background: theme('colors.border-furniture');
  238. @media (forced-colors: active) {
  239. opacity: 100%;
  240. color: GrayText;
  241. }
  242. }
  243. .xdsoft_calendar td.xdsoft_other_month.xdsoft_disabled {
  244. opacity: 20%;
  245. @media (forced-colors: active) {
  246. opacity: 100%;
  247. color: GrayText;
  248. }
  249. }
  250. .xdsoft_calendar td:hover,
  251. .xdsoft_timepicker .xdsoft_time_box > div > div:hover {
  252. color: theme('colors.text-button');
  253. background: theme('colors.surface-button-default');
  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: theme('colors.border-furniture') !important;
  286. height: 20px;
  287. border-radius: 3px;
  288. }
  289. }