vueDatePick.scss 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435
  1. $vdpColor: #7485c2 !default;
  2. @keyframes vdpSlideFromLeft {
  3. from { opacity: 0; transform: translate3d(-0.5em,0,0); }
  4. to { opacity: 1; transform: translate3d(0,0,0); }
  5. }
  6. @keyframes vdpSlideFromRight {
  7. from { opacity: 0; transform: translate3d(0.5em,0,0); }
  8. to { opacity: 1; transform: translate3d(0,0,0); }
  9. }
  10. @keyframes vdpToggleCalendar {
  11. from { opacity: 0; transform: scale(0.5); }
  12. to { opacity: 1; transform: scale(1); }
  13. }
  14. @keyframes vdpFadeCalendar {
  15. from { opacity: 0; }
  16. to { opacity: 1; }
  17. }
  18. .vdp-toggle-calendar-enter-active.vdpPositionReady {
  19. transform-origin: top left;
  20. animation: vdpToggleCalendar .2s;
  21. }
  22. .vdp-toggle-calendar-leave-active {
  23. animation: vdpToggleCalendar .15s reverse;
  24. }
  25. .vdp-toggle-calendar-enter-active.vdpPositionFixed {
  26. animation: vdpFadeCalendar .3s;
  27. }
  28. .vdp-toggle-calendar-leave-active.vdpPositionFixed {
  29. animation: vdpFadeCalendar .3s reverse;
  30. }
  31. .vdpComponent {
  32. position: relative; display: inline-block; font-size: 10px;
  33. color: #303030;
  34. /*font-family: Helvetica, Arial, sans-serif;*/
  35. }
  36. .vdpComponent.vdpWithInput > input {
  37. padding-right: 30px;
  38. }
  39. .vdpClearInput {
  40. font-size: 1em; position: absolute; top: 0; bottom: 0; right: 0;
  41. width: 3em;
  42. }
  43. .vdpClearInput:before {
  44. content: '×'; width: 1.4em; height: 1.4em; line-height: 1.1em; box-sizing: border-box;
  45. position: absolute; left: 50%; top: 50%; margin: -0.7em 0 0 -0.7em;
  46. color: rgba(0,0,0,0.3); border: 1px solid rgba(0,0,0,0.15); border-radius: 50%;
  47. background-color: #fff;
  48. }
  49. .vdpClearInput:hover:before {
  50. box-shadow: 0 0.2em 0.5em rgba(0,0,0,0.15);
  51. }
  52. .vdpOuterWrap.vdpFloating {
  53. position: absolute; padding: 0.5em 0; z-index: 220;
  54. }
  55. .vdpOuterWrap.vdpPositionFixed {
  56. position: fixed; left: 0; top: 0; bottom: 0; right: 0;
  57. padding: 2em; display: flex; justify-content: center; align-items: center;
  58. background-color: rgba(0,0,0,0.3);
  59. }
  60. .vdpFloating .vdpInnerWrap {
  61. max-width: 30em;
  62. }
  63. .vdpPositionFixed .vdpInnerWrap {
  64. max-width: 30em; margin: 0 auto;
  65. border: 0; animation: vdpToggleCalendar 0.3s;
  66. }
  67. .vdpFloating.vdpPositionTop { top: 100%; }
  68. .vdpFloating.vdpPositionBottom { bottom: 100%; }
  69. .vdpFloating.vdpPositionLeft { left: 0; }
  70. .vdpFloating.vdpPositionRight { right: 0; }
  71. .vdpPositionTop.vdpPositionLeft { transform-origin: top left; }
  72. .vdpPositionTop.vdpPositionRight { transform-origin: top right; }
  73. .vdpPositionBottom.vdpPositionLeft { transform-origin: bottom left; }
  74. .vdpPositionBottom.vdpPositionRight { transform-origin: bottom right; }
  75. .vdpInnerWrap {
  76. overflow: hidden; min-width: 28em; box-sizing: border-box; padding: 1em;
  77. background: #fff; box-shadow: 0 0.2em 1.5em rgba(0,0,0,0.06);
  78. border-radius: 0.5em; border: 1px solid rgba(0,0,0,0.15);
  79. }
  80. .vdpHeader {
  81. position: relative; padding: 0 1em 2.5em; margin: -1em -1em -2.5em;
  82. text-align: center; background: #f5f5f5;
  83. }
  84. .vdpClearInput,
  85. .vdpArrow,
  86. .vdpPeriodControl > button,
  87. .vdp12HourToggleBtn {
  88. margin:0; padding: 0; border: 0; cursor: pointer; background: none;
  89. }
  90. .vdpArrow::-moz-focus-inner,
  91. .vdpClearInput::-moz-focus-inner,
  92. .vdpPeriodControl::-moz-focus-inner,
  93. .vdp12HourToggleBtn::-moz-focus-inner {
  94. padding: 0; border: 0;
  95. }
  96. .vdpArrow {
  97. font-size: 1em; width: 5em; text-indent: -999em; overflow: hidden;
  98. position: absolute; top: 0; bottom: 2.5em; text-align: left;
  99. }
  100. .vdpArrow:before {
  101. content: ''; width: 2.2em; height: 2.2em;
  102. position: absolute; left: 50%; top: 50%; margin: -1.1em 0 0 -1.1em;
  103. border-radius: 100%; transition: background-color 0.2s;
  104. }
  105. .vdpArrow:hover,
  106. .vdpArrow:focus,
  107. .vdpArrow:active {
  108. outline: 0;
  109. }
  110. .vdpArrow:hover:before,
  111. .vdpArrow:focus:before {
  112. background-color: rgba(0,0,0,0.03);
  113. }
  114. .vdpArrow:active:before {
  115. background-color: rgba(0,0,0,0.07);
  116. }
  117. .vdpArrowNext:before {
  118. margin-left: -1.4em;
  119. }
  120. .vdpArrow:after {
  121. content: ''; position: absolute; left: 50%; top: 50%;
  122. margin-top: -0.5em; width: 0; height: 0;
  123. border: 0.5em solid transparent;
  124. }
  125. .vdpArrowPrev {
  126. left: -0.3em;
  127. }
  128. .vdpArrowPrev:after {
  129. margin-left: -0.8em;
  130. border-right-color: $vdpColor;
  131. }
  132. .vdpArrowNext {
  133. right: -0.6em;
  134. }
  135. .vdpArrowNext:after {
  136. margin-left: -0.5em;
  137. border-left-color: $vdpColor;
  138. }
  139. .vdpPeriodControl {
  140. display: inline-block; position: relative;
  141. }
  142. .vdpPeriodControl > button {
  143. font-size: 1.5em; padding: 1em 0.4em; display: inline-block;
  144. }
  145. .vdpPeriodControl > select {
  146. position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  147. cursor: pointer; opacity: 0; font-size: 1.6em;
  148. }
  149. .vdpTable {
  150. width: 100%; table-layout: fixed; position: relative; z-index: 5;
  151. }
  152. .vdpNextDirection {
  153. animation: vdpSlideFromRight 0.5s;
  154. }
  155. .vdpPrevDirection {
  156. animation: vdpSlideFromLeft 0.5s;
  157. }
  158. .vdpCell, .vdpHeadCell {
  159. text-align: center; box-sizing: border-box;
  160. }
  161. .vdpCell {
  162. padding: 0.5em 0;
  163. }
  164. .vdpHeadCell {
  165. padding: 0.3em 0.5em 1.8em;
  166. }
  167. .vdpHeadCellContent {
  168. font-size: 1.3em; font-weight: normal;
  169. color: #848484;
  170. }
  171. .vdpCellContent {
  172. font-size: 1.4em; display: block; margin: 0 auto;
  173. width: 1.857em; line-height: 1.857em;
  174. text-align: center; border-radius: 100%;
  175. transition: background 0.1s, color 0.1s;
  176. }
  177. .vdpCell.outOfRange {
  178. color: #c7c7c7;
  179. }
  180. .vdpCell.today {
  181. color: $vdpColor;
  182. }
  183. .vdpCell.selected .vdpCellContent {
  184. color: #fff; background: $vdpColor;
  185. }
  186. @media (hover: hover) {
  187. .vdpCell.selectable:hover .vdpCellContent {
  188. color: #fff; background: $vdpColor;
  189. }
  190. }
  191. .vdpCell.selectable {
  192. cursor: pointer;
  193. }
  194. .vdpCell.disabled {
  195. opacity: 0.5;
  196. }
  197. .vdpTimeControls {
  198. padding: 1.2em 2em; position: relative; margin: 1em -1em -1em;
  199. text-align: center;
  200. background: #f5f5f5;
  201. /*border-top: 1px solid rgba(0,0,0,0.15);*/
  202. }
  203. .vdpTimeUnit {
  204. display: inline-block; position: relative; vertical-align: middle;
  205. }
  206. .vdpTimeUnit > pre,
  207. .vdpTimeUnit > input {
  208. font-size: 1.7em; line-height: 1.3; padding: 0.1em 0.1em;
  209. word-wrap: break-word; white-space: pre-wrap;
  210. resize: none; margin: 0; box-sizing: border-box;
  211. color: #000; border: 0; border-bottom: 1px solid transparent;
  212. text-align: center;
  213. }
  214. .vdpTimeUnit > pre {
  215. visibility: hidden; font-family: inherit;
  216. }
  217. .vdpTimeUnit > input {
  218. position: absolute; top: 0; left: 0; overflow: hidden;
  219. height: 100%; width: 100%; outline: none; padding: 0;
  220. appearance: none; border-radius: 0; background: transparent;
  221. -webkit-appearance: textfield; -moz-appearance: textfield; appearance: textfield;
  222. &::selection {
  223. background-color: rgba($vdpColor, 0.15);
  224. }
  225. }
  226. .vdpTimeUnit > input:hover,
  227. .vdpTimeUnit > input:focus {
  228. border-bottom-color: $vdpColor;
  229. }
  230. .vdpTimeUnit > input:disabled {
  231. border-bottom-color: transparent;
  232. }
  233. .vdpTimeUnit > input::-webkit-inner-spin-button,
  234. .vdpTimeUnit > input::-webkit-outer-spin-button {
  235. margin: 0;
  236. -webkit-appearance: none;
  237. }
  238. .vdpTimeSeparator, .vdpTimeCaption {
  239. display: inline-block; vertical-align: middle; font-size: 1.3em;
  240. color: #848484;
  241. }
  242. .vdpTimeCaption {
  243. margin-right: 0.5em;
  244. }
  245. .vdp12HourToggleBtn {
  246. display: inline-block; vertical-align: middle;
  247. font-size: 1.3em; padding: 0 0.4em;
  248. color: #303030;
  249. }
  250. .vdp12HourToggleBtn:hover,
  251. .vdp12HourToggleBtn:focus {
  252. color: $vdpColor; outline: 0;
  253. }
  254. .vdp12HourToggleBtn:disabled {
  255. color: #303030;
  256. }