controls.scss 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327
  1. @import "variables";
  2. textarea {
  3. margin-bottom: 20px;
  4. border: 1px solid $color-primary-0;
  5. background: $color-white;
  6. font-family: Tahoma, Arial, Helvetica, sans-serif;
  7. font-size: 1rem;
  8. border-radius: $border-radius;
  9. width: 100%;
  10. display: block;
  11. }
  12. input[type="text"],
  13. input[type="date"],
  14. input[type="password"],
  15. .button, select,
  16. button {
  17. width: 100%;
  18. height: 30px;
  19. margin-bottom: 20px;
  20. font-family: Tahoma, Arial, Helvetica, sans-serif;
  21. font-size: 1rem;
  22. border-radius: $border-radius;
  23. background: $color-white;
  24. color: $color-primary-2;
  25. border: 1px solid rgb(7, 55, 77);
  26. &:disabled {
  27. opacity: 0.5;
  28. }
  29. }
  30. input[type="text"],
  31. input[type="date"],
  32. input[type="password"],
  33. textarea {
  34. padding-inline-start: 10px;
  35. &:focus,
  36. &:hover {
  37. &:not(:disabled) {
  38. border-color: $color-primary-2;
  39. }
  40. }
  41. &:focus {
  42. box-shadow: 0 0 1px 1px $color-primary-3;
  43. }
  44. }
  45. .button,
  46. button {
  47. &:hover {
  48. border-color: $color-primary-2;
  49. box-shadow: 0 0 1px 1px $color-primary-3;
  50. cursor: pointer;
  51. }
  52. }
  53. .button {
  54. text-align: center;
  55. line-height: 28px;
  56. }
  57. .button-group {
  58. display: grid;
  59. grid-gap: 20px;
  60. grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  61. > .button,
  62. > button {
  63. margin: 0;
  64. }
  65. }
  66. input:placeholder-shown {
  67. text-overflow: ellipsis;
  68. }
  69. input[type="search"] {
  70. border: none;
  71. background: none;
  72. outline: none;
  73. box-shadow: none;
  74. }
  75. .search-block {
  76. margin-bottom: 20px;
  77. background-color: $color-white;
  78. border-radius: $border-radius;
  79. position: relative;
  80. align-self: flex-end;
  81. .search {
  82. position: relative;
  83. min-height: 50px;
  84. margin-left: 10px;
  85. margin-right: 10px;
  86. display: flex;
  87. flex-direction: column-reverse;
  88. > input {
  89. height: 2.5rem;
  90. font-size: 1.25rem;
  91. color: $color-grey;
  92. padding-inline-start: 20px;
  93. transition: color 100ms linear;
  94. + .placeholder {
  95. position: absolute;
  96. top: 50%;
  97. left: 40px;
  98. transform: translateY(-50%);
  99. color: $color-grey;
  100. font-size: 1.25rem;
  101. font-weight: 700;
  102. user-select: none;
  103. pointer-events: none;
  104. transition: all 100ms linear;
  105. + .line {
  106. position: absolute;
  107. bottom: 0;
  108. left: 0;
  109. right: 100%;
  110. height: 2px;
  111. background-color: $color-grey;
  112. transition: right 100ms linear;
  113. }
  114. }
  115. ~ .fa-search {
  116. position: absolute;
  117. font-size: 2rem;
  118. top: 50%;
  119. color: $color-grey;
  120. transform: translateY(-50%);
  121. transition: font-size 100ms linear, top 100ms linear;
  122. }
  123. &:valid,
  124. &:focus {
  125. color: $color-black;
  126. + .placeholder {
  127. font-size: 0.9rem;
  128. top: 0;
  129. left: 0;
  130. transform: translateY(0);
  131. color: $color-black;
  132. + .line {
  133. right: 0;
  134. }
  135. }
  136. ~ .fa-search {
  137. font-size: 1rem;
  138. top: 65%;
  139. }
  140. }
  141. }
  142. + .search-list {
  143. display: none;
  144. position: absolute;
  145. top: 100%;
  146. left: 0;
  147. right: 0;
  148. background-color: $color-secondary-b-4;
  149. padding: 20px;
  150. z-index: 90;
  151. h3 {
  152. color: $color-green-700;
  153. padding-bottom: 5px;
  154. border-bottom: 1px solid;
  155. margin-bottom: 15px;
  156. margin-top: 20px;
  157. }
  158. ul {
  159. > li {
  160. list-style: none;
  161. > a {
  162. color: $color-black;
  163. display: block;
  164. padding: 5px 0;
  165. }
  166. }
  167. }
  168. }
  169. }
  170. }
  171. label.checkbox {
  172. display: flex;
  173. align-items: center;
  174. margin-bottom: 20px;
  175. > input[type="checkbox"] {
  176. display: none;
  177. + .checked {
  178. position: relative;
  179. width: 20px;
  180. height: 20px;
  181. border: 1px solid $color-primary-2;
  182. border-radius: 3px;
  183. &::before {
  184. content: "";
  185. position: absolute;
  186. left: 1px;
  187. top: 1px;
  188. right: 1px;
  189. bottom: 1px;
  190. border-radius: 3px;
  191. background-color: $color-white;
  192. }
  193. }
  194. &:hover {
  195. + .checked {
  196. box-shadow: 0 0 1px 1px $color-primary-3;
  197. &::before {
  198. background-color: $color-primary-3;
  199. }
  200. }
  201. &:checked {
  202. + .checked {
  203. &::before {
  204. background-color: $color-primary-1;
  205. // filter: brightness(1.2);
  206. }
  207. }
  208. }
  209. }
  210. &:checked {
  211. + .checked {
  212. &::before {
  213. background-color: $color-primary-2;
  214. }
  215. }
  216. }
  217. }
  218. > .text {
  219. margin-left: 10px;
  220. user-select: none;
  221. }
  222. &:hover {
  223. cursor: pointer;
  224. }
  225. }
  226. // TREE
  227. .tree {
  228. border: 1px solid $color-primary-2;
  229. padding-left: 20px;
  230. margin-bottom: 20px;
  231. font-size: 0.9rem;
  232. max-height: 250px;
  233. overflow: auto;
  234. outline: none;
  235. .branch {
  236. margin-left: 40px;
  237. position: relative;
  238. > .head {
  239. position: relative;
  240. &:hover {
  241. color: $color-primary-2;
  242. cursor: pointer;
  243. }
  244. &::before {
  245. content: "";
  246. position: absolute;
  247. left: -17px;
  248. width: 0.75rem;
  249. height: 0.75rem;
  250. border: 1px solid;
  251. border-color: $color-primary-0;
  252. border-radius: 50%;
  253. display: flex;
  254. justify-content: center;
  255. align-items: center;
  256. top: 0.6rem;
  257. transform: translateY(-50%);
  258. }
  259. }
  260. > .body {
  261. height: auto;
  262. }
  263. &.selected {
  264. > .head {
  265. &::before {
  266. background-color: $color-primary-3;
  267. }
  268. }
  269. }
  270. &::before {
  271. content: "";
  272. position: absolute;
  273. border-top: 1px dashed;
  274. border-color: $color-primary-2;
  275. top: 0.6rem;
  276. left: -40px;
  277. width: 20px;
  278. }
  279. &::after {
  280. content: "";
  281. position: absolute;
  282. border-left: 1px dashed;
  283. border-color: $color-primary-2;
  284. top: 0;
  285. bottom: 0;
  286. left: -40px;
  287. }
  288. }
  289. }