ui-lib.module.scss 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341
  1. @import "../styles/animation.scss";
  2. .card {
  3. background-color: var(--white);
  4. border-radius: 10px;
  5. box-shadow: var(--card-shadow);
  6. padding: 10px;
  7. }
  8. .popover {
  9. position: relative;
  10. z-index: 2;
  11. }
  12. .popover-content {
  13. position: absolute;
  14. width: 350px;
  15. animation: slide-in 0.3s ease;
  16. right: 0;
  17. top: calc(100% + 10px);
  18. }
  19. @media screen and (max-width: 600px) {
  20. .popover-content {
  21. width: auto;
  22. }
  23. }
  24. .popover-mask {
  25. position: fixed;
  26. top: 0;
  27. left: 0;
  28. width: 100vw;
  29. height: 100vh;
  30. background-color: rgba(0, 0, 0, 0.3);
  31. backdrop-filter: blur(5px);
  32. }
  33. .list-item {
  34. display: flex;
  35. justify-content: space-between;
  36. align-items: center;
  37. min-height: 40px;
  38. border-bottom: var(--border-in-light);
  39. padding: 10px 20px;
  40. animation: slide-in ease 0.6s;
  41. .list-header {
  42. display: flex;
  43. align-items: center;
  44. .list-icon {
  45. margin-right: 10px;
  46. }
  47. .list-item-title {
  48. font-size: 14px;
  49. font-weight: bolder;
  50. }
  51. .list-item-sub-title {
  52. font-size: 12px;
  53. font-weight: normal;
  54. }
  55. }
  56. &.vertical {
  57. flex-direction: column;
  58. align-items: start;
  59. .list-header {
  60. .list-item-title {
  61. margin-bottom: 5px;
  62. }
  63. .list-item-sub-title {
  64. margin-bottom: 2px;
  65. }
  66. }
  67. }
  68. }
  69. .list {
  70. border: var(--border-in-light);
  71. border-radius: 10px;
  72. box-shadow: var(--card-shadow);
  73. margin-bottom: 20px;
  74. animation: slide-in ease 0.3s;
  75. background: var(--white);
  76. }
  77. .list .list-item:last-child {
  78. border: 0;
  79. }
  80. .modal-container {
  81. box-shadow: var(--card-shadow);
  82. background-color: var(--white);
  83. border-radius: 12px;
  84. width: 80vw;
  85. max-width: 900px;
  86. min-width: 300px;
  87. animation: slide-in ease 0.3s;
  88. --modal-padding: 20px;
  89. &-max {
  90. width: 95vw;
  91. max-width: unset;
  92. height: 95vh;
  93. display: flex;
  94. flex-direction: column;
  95. .modal-content {
  96. max-height: unset !important;
  97. flex-grow: 1;
  98. }
  99. }
  100. .modal-header {
  101. padding: var(--modal-padding);
  102. display: flex;
  103. align-items: center;
  104. justify-content: space-between;
  105. border-bottom: var(--border-in-light);
  106. .modal-title {
  107. font-weight: bolder;
  108. font-size: 16px;
  109. }
  110. .modal-header-actions {
  111. display: flex;
  112. .modal-header-action {
  113. cursor: pointer;
  114. &:not(:last-child) {
  115. margin-right: 20px;
  116. }
  117. &:hover {
  118. filter: brightness(1.2);
  119. }
  120. }
  121. }
  122. }
  123. .modal-content {
  124. max-height: 40vh;
  125. padding: var(--modal-padding);
  126. overflow: auto;
  127. }
  128. .modal-footer {
  129. padding: var(--modal-padding);
  130. display: flex;
  131. justify-content: flex-end;
  132. border-top: var(--border-in-light);
  133. box-shadow: var(--shadow);
  134. .modal-actions {
  135. display: flex;
  136. align-items: center;
  137. .modal-action {
  138. &:not(:last-child) {
  139. margin-right: 20px;
  140. }
  141. }
  142. }
  143. }
  144. }
  145. @media screen and (max-width: 600px) {
  146. .modal-container {
  147. width: 100vw;
  148. border-bottom-left-radius: 0;
  149. border-bottom-right-radius: 0;
  150. .modal-content {
  151. max-height: 50vh;
  152. }
  153. }
  154. }
  155. .show {
  156. opacity: 1;
  157. transition: all ease 0.3s;
  158. transform: translateY(0);
  159. position: fixed;
  160. left: 0;
  161. bottom: 0;
  162. animation: slide-in ease 0.6s;
  163. z-index: 99999;
  164. }
  165. .hide {
  166. opacity: 0;
  167. transition: all ease 0.3s;
  168. transform: translateY(20px);
  169. }
  170. .toast-container {
  171. position: fixed;
  172. bottom: 5vh;
  173. left: 0;
  174. width: 100vw;
  175. display: flex;
  176. justify-content: center;
  177. pointer-events: none;
  178. .toast-content {
  179. max-width: 80vw;
  180. word-break: break-all;
  181. font-size: 14px;
  182. background-color: var(--white);
  183. box-shadow: var(--card-shadow);
  184. border: var(--border-in-light);
  185. color: var(--black);
  186. padding: 10px 20px;
  187. border-radius: 50px;
  188. margin-bottom: 20px;
  189. display: flex;
  190. align-items: center;
  191. pointer-events: all;
  192. .toast-action {
  193. padding-left: 20px;
  194. color: var(--primary);
  195. opacity: 0.8;
  196. border: 0;
  197. background: none;
  198. cursor: pointer;
  199. font-family: inherit;
  200. &:hover {
  201. opacity: 1;
  202. }
  203. }
  204. }
  205. }
  206. .input {
  207. border: var(--border-in-light);
  208. border-radius: 10px;
  209. padding: 10px;
  210. font-family: inherit;
  211. background-color: var(--white);
  212. color: var(--black);
  213. resize: none;
  214. min-width: 50px;
  215. }
  216. .select-with-icon {
  217. position: relative;
  218. max-width: fit-content;
  219. &.left-align-option {
  220. option {
  221. text-align: left;
  222. }
  223. }
  224. .select-with-icon-select {
  225. height: 100%;
  226. max-width: 100%;
  227. border: var(--border-in-light);
  228. padding: 10px 35px 10px 10px;
  229. border-radius: 10px;
  230. white-space: normal;
  231. appearance: none;
  232. cursor: pointer;
  233. background-color: var(--white);
  234. color: var(--black);
  235. text-align: center;
  236. }
  237. .select-with-icon-icon {
  238. position: absolute;
  239. top: 50%;
  240. right: 10px;
  241. transform: translateY(-50%);
  242. pointer-events: none;
  243. }
  244. }
  245. .modal-input {
  246. height: 100%;
  247. width: 100%;
  248. border-radius: 10px;
  249. border: var(--border-in-light);
  250. box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.03);
  251. background-color: var(--white);
  252. color: var(--black);
  253. font-family: inherit;
  254. padding: 10px;
  255. resize: none;
  256. outline: none;
  257. box-sizing: border-box;
  258. &:focus {
  259. border: 1px solid var(--primary);
  260. }
  261. }
  262. .selector {
  263. position: fixed;
  264. top: 0;
  265. left: 0;
  266. height: 100vh;
  267. width: 100vw;
  268. background-color: rgba(0, 0, 0, 0.5);
  269. display: flex;
  270. align-items: center;
  271. justify-content: center;
  272. z-index: 999;
  273. .selector-item-disabled {
  274. opacity: 0.6;
  275. }
  276. &-content {
  277. min-width: 300px;
  278. .list {
  279. max-height: 90vh;
  280. overflow-x: hidden;
  281. overflow-y: auto;
  282. .list-item {
  283. cursor: pointer;
  284. background-color: var(--white);
  285. &:hover {
  286. filter: brightness(0.95);
  287. }
  288. &:active {
  289. filter: brightness(0.9);
  290. }
  291. }
  292. }
  293. }
  294. }