sortable.css 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. body {
  2. -webkit-font-smoothing: antialiased;
  3. -moz-osx-font-smoothing: grayscale;
  4. -webkit-tap-highlight-color: transparent;
  5. }
  6. * {
  7. box-sizing: border-box;
  8. }
  9. .title {
  10. font-weight: 500;
  11. text-align: center;
  12. margin-bottom: 20px;
  13. font-size: 20px;
  14. color: #0E254E;
  15. }
  16. .list {
  17. margin: 0 auto;
  18. width: 100%;
  19. max-width: 380px;
  20. user-select: none;
  21. }
  22. .list__item {
  23. transition: box-shadow 200ms ease-out, opacity 200ms ease-out;
  24. border-radius: 6px;
  25. background: #fff;
  26. box-shadow: 0 0 12px rgba(0, 0, 0, 0.05);
  27. display: flex;
  28. }
  29. .list__item:not(:last-child) {
  30. margin-bottom: 7px;
  31. }
  32. .list__item.is-dragging {
  33. box-shadow: 0 0 24px rgba(0, 0, 0, 0.1);
  34. opacity: 0.8;
  35. }
  36. .list__item-content {
  37. width: calc(100% - 40px - 40px);
  38. padding: 10px 15px;
  39. }
  40. .list__item-title, .list__item-description {
  41. white-space: nowrap;
  42. text-overflow: ellipsis;
  43. overflow: hidden;
  44. }
  45. .list__item-title {
  46. font-size: 15px;
  47. color: #0E254E;
  48. }
  49. .list__item-description {
  50. font-size: 13px;
  51. color: #66748E;
  52. }
  53. .list__item-handle {
  54. position: relative;
  55. width: 40px;
  56. cursor: pointer;
  57. }
  58. .list__item-handle:before, .list__item-handle:after {
  59. content: "";
  60. position: absolute;
  61. left: 15px;
  62. right: 15px;
  63. top: 50%;
  64. height: 1px;
  65. background: #c2cada;
  66. }
  67. .list__item-handle:before {
  68. transform: translateY(-4px);
  69. }
  70. .list__item-handle:after {
  71. transform: translateY(4px);
  72. }
  73. .list__item-close {
  74. position: relative;
  75. width: 40px;
  76. cursor: pointer;
  77. }
  78. .list__item-close:after {
  79. content: "X";
  80. position: absolute;
  81. left: 15px;
  82. right: 15px;
  83. top: 30%;
  84. height: 0px;
  85. background: #c2cada;
  86. }
  87. .list__item-close:after {
  88. transform: translateY(0px);
  89. }
  90. .list__item-close:hover {
  91. background-color: #f44336;
  92. color: white;
  93. }
  94. .triangle{
  95. position: absolute;
  96. top: 1px;
  97. right: 5px;
  98. cursor: default;
  99. }
  100. .add-btn,
  101. .delete-btn,
  102. .modify_item-close,
  103. .group-button__confirm,
  104. .group-button__delete,
  105. .group-button__edit {
  106. position: absolute;
  107. top: 8px;
  108. right: 10px;
  109. background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M7.99992 1.33325C4.31992 1.33325 1.33325 4.31992 1.33325 7.99992C1.33325 11.6799 4.31992 14.6666 7.99992 14.6666C11.6799 14.6666 14.6666 11.6799 14.6666 7.99992C14.6666 4.31992 11.6799 1.33325 7.99992 1.33325ZM7.33325 4.66658V7.33325H4.66658V8.66658H7.33325V11.3333H8.66658V8.66658H11.3333V7.33325H8.66658V4.66658H7.33325ZM2.66659 7.99992C2.66659 10.9399 5.05992 13.3333 7.99992 13.3333C10.9399 13.3333 13.3333 10.9399 13.3333 7.99992C13.3333 5.05992 10.9399 2.66659 7.99992 2.66659C5.05992 2.66659 2.66659 5.05992 2.66659 7.99992Z' fill='%23757575'/%3E%3C/svg%3E%0A");
  110. background-repeat: no-repeat;
  111. cursor: pointer;
  112. color: transparent;
  113. min-width: 16px;
  114. max-width: 16px;
  115. height: 16px;
  116. background-color: #ffffff;
  117. }
  118. .delete-btn,
  119. .modify_item-close,
  120. .group-button__delete {
  121. background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.6666 4.27325L11.7266 3.33325L7.99992 7.05992L4.27325 3.33325L3.33325 4.27325L7.05992 7.99992L3.33325 11.7266L4.27325 12.6666L7.99992 8.93992L11.7266 12.6666L12.6666 11.7266L8.93992 7.99992L12.6666 4.27325Z' fill='%23757575'/%3E%3C/svg%3E%0A");
  122. right: 30px;
  123. }
  124. .group-button__confirm {
  125. background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M1 8a7 7 0 1 1 14 0A7 7 0 0 1 1 8Zm6 1 4-4 1 1-5 5-3-2 1-1 2 1Z' fill='%230D63B3'/%3E%3C/svg%3E");
  126. }
  127. .group-button__edit {
  128. background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='m12.246 2.193 1.56 1.56c.26.26.26.68 0 .94l-1.22 1.22-2.5-2.5 1.22-1.22A.656.656 0 0 1 11.772 2c.174 0 .34.06.474.193ZM1.999 11.5V14h2.5l7.373-7.373-2.5-2.5L2 11.5Zm1.947 1.167h-.614v-.614l6.04-6.04.614.614-6.04 6.04Z' fill='%23757575'/%3E%3C/svg%3E");
  129. }
  130. .search-loader {
  131. --color: rgb(var(--blue2));
  132. --fade-color: rgba(var(--blue2), 0.1);
  133. --x-speed: 1;
  134. position: absolute;
  135. top: 1em;
  136. right: 2em;
  137. width: 1em;
  138. display: block;
  139. transform: rotateZ(0);
  140. animation: ps-spin calc(15s / var(--x-speed)) linear infinite
  141. }
  142. @keyframes ps-spin {
  143. from {
  144. transform: rotateZ(0);
  145. }
  146. to {
  147. transform: rotateZ(360deg);
  148. }
  149. }
  150. .search-loader span {
  151. display: block;
  152. position: absolute;
  153. width: 100%;
  154. height: 100%;
  155. }
  156. .search-loader span::before,
  157. .search-loader span::after {
  158. content: "";
  159. position: absolute;
  160. width: 3px;
  161. height: 3px;
  162. top: 50%;
  163. transform: translateY(-50%);
  164. border-radius: 50%;
  165. animation: ps-spinner-scale calc(1.2s / var(--x-speed)) linear infinite
  166. }
  167. .search-loader span::before { left: 0; }
  168. .search-loader span::after { right: 0; }
  169. .search-loader span:nth-child(1) { transform: rotate(90deg); }
  170. .search-loader span:nth-child(1)::before { background: rgb(var(--blue2)); }
  171. .search-loader span:nth-child(1)::after { background: rgba(var(--blue2), 0.4); }
  172. .search-loader span:nth-child(2) { transform: rotate(120deg); }
  173. .search-loader span:nth-child(2)::before { background: rgba(var(--blue2), 0.9); }
  174. .search-loader span:nth-child(2)::after { background: rgba(var(--blue2), 0.3); }
  175. .search-loader span:nth-child(3) { transform: rotate(150deg); }
  176. .search-loader span:nth-child(3)::before { background: rgba(var(--blue2), 0.8); }
  177. .search-loader span:nth-child(3)::after { background: rgba(var(--blue2), 0.2); }
  178. .search-loader span:nth-child(4) { transform: rotate(180deg); }
  179. .search-loader span:nth-child(4)::before { background: rgba(var(--blue2), 0.7); }
  180. .search-loader span:nth-child(4)::after { background: rgba(var(--blue2), 0.1); }
  181. .search-loader span:nth-child(5) { transform: rotate(210deg); }
  182. .search-loader span:nth-child(5)::before { background: rgba(var(--blue2), 0.6); }
  183. .search-loader span:nth-child(5)::after { background: rgba(var(--blue2), 0.05); }
  184. .search-loader span:nth-child(6) { transform: rotate(240deg); }
  185. .search-loader span:nth-child(6)::before { background: rgba(var(--blue2), 0.5); }
  186. .search-loader span:nth-child(6)::after { background: rgba(var(--blue2), 0.02); }