No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 
 

194 líneas
5.2 KiB

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