You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

209 lines
5.6 KiB

  1. @use '../atoms/variables' as *;
  2. // ─── CRUD Seiten Layout ────────────────────────────────────────────────────────
  3. .crud-page {
  4. max-width: $content-max-width;
  5. margin: 0 auto;
  6. padding: $space-6;
  7. }
  8. .crud-page__header {
  9. display: flex;
  10. align-items: center;
  11. justify-content: space-between;
  12. margin-bottom: $space-6;
  13. }
  14. .crud-page__title {
  15. font-size: $font-size-xl;
  16. font-weight: $font-weight-bold;
  17. color: $color-text-dark;
  18. }
  19. // ─── Liste ─────────────────────────────────────────────────────────────────────
  20. .crud-list {
  21. background: $color-card-white;
  22. border-radius: $radius-lg;
  23. box-shadow: $shadow-card;
  24. overflow: hidden;
  25. }
  26. // ─── Zeile ─────────────────────────────────────────────────────────────────────
  27. .crud-row {
  28. border-bottom: 1px solid rgba($color-border, 0.5);
  29. transition: opacity 0.28s ease, transform 0.28s ease;
  30. &:last-child { border-bottom: none; }
  31. &--removing {
  32. opacity: 0;
  33. transform: translateX(12px);
  34. }
  35. &--new {
  36. opacity: 0;
  37. transform: translateY(-4px);
  38. }
  39. }
  40. .crud-row__display {
  41. display: flex;
  42. align-items: center;
  43. gap: $space-4;
  44. padding: $space-4 $space-6;
  45. transition: background $transition-fast;
  46. &:hover {
  47. background: rgba($color-primary, 0.03);
  48. .crud-row__btn { opacity: 1; }
  49. }
  50. }
  51. .crud-row__info {
  52. flex: 1;
  53. min-width: 0;
  54. }
  55. .crud-row__name {
  56. font-size: $font-size-base;
  57. font-weight: $font-weight-bold;
  58. color: $color-text-dark;
  59. }
  60. .crud-row__meta {
  61. font-size: $font-size-sm;
  62. color: $color-text-muted;
  63. margin-left: $space-2;
  64. font-weight: $font-weight-regular;
  65. }
  66. .crud-row__actions {
  67. display: flex;
  68. align-items: center;
  69. gap: $space-2;
  70. flex-shrink: 0;
  71. }
  72. .crud-row__btn {
  73. display: flex;
  74. align-items: center;
  75. justify-content: center;
  76. width: 28px;
  77. height: 28px;
  78. border-radius: 50%;
  79. background: transparent;
  80. border: none;
  81. cursor: pointer;
  82. opacity: 0;
  83. transition: opacity $transition-fast, background $transition-fast, color $transition-fast;
  84. color: $color-text-muted;
  85. svg { width: 14px; height: 14px; pointer-events: none; }
  86. &--edit:hover { background: rgba($color-primary, 0.1); color: $color-primary; }
  87. &--delete:hover{ background: rgba(200, 50, 50, 0.1); color: #c83232; }
  88. @media (hover: none) { opacity: 1; }
  89. }
  90. // ─── Edit-Formular innerhalb der Zeile ─────────────────────────────────────────
  91. .crud-row__edit {
  92. padding: $space-4 $space-6;
  93. background: rgba($color-primary, 0.03);
  94. border-top: 1px solid rgba($color-border, 0.5);
  95. }
  96. .crud-row__display[hidden] { display: none !important; }
  97. // ─── Create-Formular oben ──────────────────────────────────────────────────────
  98. .crud-create {
  99. background: $color-card;
  100. border-radius: $radius-lg;
  101. padding: $space-5 $space-6;
  102. margin-bottom: $space-4;
  103. box-shadow: $shadow-card;
  104. display: none;
  105. &--visible { display: block; }
  106. }
  107. // ─── Tabs (Aktiv / Archiviert) ─────────────────────────────────────────────────
  108. .crud-tabs {
  109. display: inline-flex;
  110. background: $color-card-white;
  111. border-radius: $radius-pill;
  112. padding: 3px;
  113. margin-bottom: $space-4;
  114. box-shadow: $shadow-card;
  115. }
  116. .crud-tab {
  117. padding: $space-1 $space-5;
  118. border: none;
  119. background: transparent;
  120. border-radius: $radius-pill;
  121. font-family: $font-family-base;
  122. font-size: $font-size-sm;
  123. font-weight: $font-weight-medium;
  124. color: $color-text-muted;
  125. cursor: pointer;
  126. transition: background $transition-fast, color $transition-fast;
  127. &:hover { color: $color-text-dark; }
  128. &--active {
  129. background: $color-primary;
  130. color: $color-white;
  131. }
  132. }
  133. // ─── Archivierte Zeile ─────────────────────────────────────────────────────────
  134. .crud-row--archived {
  135. .crud-row__name {
  136. color: $color-text-muted;
  137. text-decoration: line-through;
  138. text-decoration-color: rgba($color-text-muted, 0.5);
  139. }
  140. }
  141. .crud-row__btn--restore {
  142. &:hover { background: rgba(74, 180, 74, 0.12); color: #3a9a3a; }
  143. }
  144. // ─── Gruppen-Header (z.B. Verrechenbar / Nicht-verrechenbar) ──────────────────
  145. .crud-list__group {
  146. & + & {
  147. border-top: 2px solid $color-border;
  148. }
  149. }
  150. .crud-list__group-label {
  151. padding: $space-3 $space-6;
  152. font-size: $font-size-xs;
  153. font-weight: $font-weight-bold;
  154. color: $color-text-muted;
  155. text-transform: uppercase;
  156. letter-spacing: 0.06em;
  157. background: rgba($color-primary, 0.03);
  158. border-bottom: 1px solid rgba($color-border, 0.5);
  159. }
  160. // ─── Checkbox-Label (Verrechenbar-Feld) ────────────────────────────────────────
  161. .crud-checkbox-label {
  162. display: flex;
  163. align-items: center;
  164. gap: $space-2;
  165. cursor: pointer;
  166. font-size: $font-size-base;
  167. color: $color-text-base;
  168. input[type="checkbox"] {
  169. width: 16px;
  170. height: 16px;
  171. cursor: pointer;
  172. flex-shrink: 0;
  173. accent-color: $color-primary;
  174. }
  175. }