diff --git a/src/components/ui/AutocompleteInput.jsx b/src/components/ui/AutocompleteInput.jsx
index 93109df..330c0b5 100644
--- a/src/components/ui/AutocompleteInput.jsx
+++ b/src/components/ui/AutocompleteInput.jsx
@@ -38,7 +38,7 @@ export default function AutocompleteInput({ value, onChange, getSuggestions, id,
- {dot && }
- {children}
-
- )
+import { badgeToneClass } from './tones'
+
+// "dot" bleibt als Prop erlaubt und wird ignoriert
+export default function Badge({ tone = 'muted', dot, className = '', style, children }) {
+ const cls = className ? `${badgeToneClass(tone)} ${className}` : badgeToneClass(tone)
+ return {children}
}
diff --git a/src/components/ui/Button.jsx b/src/components/ui/Button.jsx
index 51482cc..e897833 100644
--- a/src/components/ui/Button.jsx
+++ b/src/components/ui/Button.jsx
@@ -1,10 +1,6 @@
-const VARIANTS = {
- default: 'ui-btn',
- primary: 'ui-btn ui-btn-primary',
- ghost: 'ui-btn ui-btn-ghost',
- danger: 'ui-btn ui-btn-danger',
-}
+import { BUTTON_CLASSES } from './tones'
+// "size" bleibt als Prop erlaubt und wird ignoriert; ein Standard-"type" gibt es nicht
export default function Button({
variant = 'default',
size,
@@ -13,7 +9,8 @@ export default function Button({
children,
...props
}) {
- const cls = `${VARIANTS[variant] || VARIANTS.default}${size === 'sm' ? ' ui-btn-sm' : ''} ${className}`
+ const base = Object.prototype.hasOwnProperty.call(BUTTON_CLASSES, variant) ? BUTTON_CLASSES[variant] : BUTTON_CLASSES.default
+ const cls = className ? `${base} ${className}` : base
const Comp = as
return (
diff --git a/src/components/ui/Card.jsx b/src/components/ui/Card.jsx
index 8abfb62..eb4f582 100644
--- a/src/components/ui/Card.jsx
+++ b/src/components/ui/Card.jsx
@@ -1,18 +1,14 @@
-export default function Card({ title, actions, children, pad = true, className = '', bodyStyle, style }) {
- if (!title && !actions) {
- return (
-
- {children}
-
- )
- }
+// "pad", "bodyStyle" und "style" bleiben als Props erlaubt und werden ignoriert
+export default function Card({ title, actions, className, children }) {
return (
-
-
-
{title}
- {actions &&
{actions}
}
-
-
{children}
-
+
+ {(title || actions) && (
+
+ {title}
+ {actions && {actions}}
+
+ )}
+ {children}
+
)
}
diff --git a/src/components/ui/DateTimeInput.jsx b/src/components/ui/DateTimeInput.jsx
index 39c62c7..f8cdcbd 100644
--- a/src/components/ui/DateTimeInput.jsx
+++ b/src/components/ui/DateTimeInput.jsx
@@ -15,7 +15,7 @@ export default function DateTimeInput({ id, date, time, onDateChange, onTimeChan
onChange(Number(e.target.value))}
diff --git a/src/components/ui/EmptyState.jsx b/src/components/ui/EmptyState.jsx
index bbdc627..d8c0857 100644
--- a/src/components/ui/EmptyState.jsx
+++ b/src/components/ui/EmptyState.jsx
@@ -1,10 +1,10 @@
+// "icon" bleibt als Prop erlaubt und wird ignoriert
export default function EmptyState({ icon, title, hint, action }) {
return (
- {icon &&
{icon}
}
-
{title}
- {hint &&
{hint}
}
- {action &&
{action}
}
+ {title}
+ {hint}
+ {action &&
{action}
}
)
}
diff --git a/src/components/ui/Field.jsx b/src/components/ui/Field.jsx
index 036dc58..65e04b3 100644
--- a/src/components/ui/Field.jsx
+++ b/src/components/ui/Field.jsx
@@ -1,9 +1,9 @@
-export default function Field({ label, children, hint }) {
+export default function Field({ label, htmlFor, children, hint }) {
return (
- )
+import Stat from './Stat'
+
+// Altname fuer Stat (wird in P7 geloescht); "icon" wird ignoriert, die Warnfarbe wird zu 'neg'
+export default function Kpi({ label, value, sub, icon, accent }) {
+ return
}
diff --git a/src/components/ui/PageHeader.jsx b/src/components/ui/PageHeader.jsx
index 50c98c0..43f531f 100644
--- a/src/components/ui/PageHeader.jsx
+++ b/src/components/ui/PageHeader.jsx
@@ -1,12 +1,29 @@
-export default function PageHeader({ title, subtitle, actions, children }) {
+import { Fragment } from 'react'
+import { Link } from 'react-router-dom'
+
+// crumb: [{ label, to? }] steht vor dem Kopf; Eintraege mit "to" sind Links, die anderen Text
+export default function PageHeader({ title, subtitle, actions, eyebrow, crumb, children }) {
return (
-