- {/* Spacer to align buttons in case of flex wrap only */}
-
onUpdateDose(day.id, dose.id, 'ldx', value)}
+ increment={doseIncrement}
+ min={0}
+ max={200}
+ //unit="mg"
+ required={true}
+ error={isDailyTotalError}
+ warning={isDailyTotalWarning || isZeroDose || isHighDose}
+ errorMessage={doseErrorMessage || formatText(t('errorNumberRequired'))}
+ warningMessage={doseWarningMessage}
+ inputWidth="w-[72px]"
+ />
+
+ {/* Action buttons - right aligned */}
+
handleActionWithSort(day.id, () => onUpdateDoseField(day.id, dose.id, 'isFed', !dose.isFed))}
icon={}
diff --git a/src/components/simulation-chart.tsx b/src/components/simulation-chart.tsx
index c2f15ef..1c391c7 100644
--- a/src/components/simulation-chart.tsx
+++ b/src/components/simulation-chart.tsx
@@ -28,6 +28,7 @@ import {
} from './ui/tooltip';
import { useElementSize } from '../hooks/useElementSize';
+// TODO make use of the actual theme colors;some colors are not matching the classes in the comments
// Chart color scheme
const CHART_COLORS = {
// d-Amphetamine profiles
@@ -42,7 +43,7 @@ const CHART_COLORS = {
// Reference lines
regularPlanDivider: '#22c55e', // green-500
- deviationDayDivider: '#9ca3af', // gray-400
+ deviationDayDivider: '#f59e0b', // yellow-500
therapeuticMin: '#22c55e', // green-500
therapeuticMax: '#ef4444', // red-500
dayDivider: '#9ca3af', // gray-400
diff --git a/src/components/ui/badge.tsx b/src/components/ui/badge.tsx
index 8938904..cd60b10 100644
--- a/src/components/ui/badge.tsx
+++ b/src/components/ui/badge.tsx
@@ -4,7 +4,7 @@ import { cva, type VariantProps } from "class-variance-authority"
import { cn } from "../../lib/utils"
const badgeVariants = cva(
- "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
+ "inline-flex items-center rounded-sm border px-2 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
{
variants: {
variant: {
@@ -16,7 +16,9 @@ const badgeVariants = cva(
"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
outline: "text-foreground",
transparent: "border-transparent bg-transparent text-foreground hover:border-secondary",
- inverted: "border-transparent bg-muted-foreground text-background",
+ field: "bg-background text-foreground",
+ solid: "border-transparent bg-muted-foreground text-background",
+ solidmuted: "border-transparent bg-muted-foreground text-background",
},
},
defaultVariants: {
diff --git a/src/components/ui/form-time-input.tsx b/src/components/ui/form-time-input.tsx
index 0a23cf9..c09bf6e 100644
--- a/src/components/ui/form-time-input.tsx
+++ b/src/components/ui/form-time-input.tsx
@@ -13,6 +13,7 @@ import { Clock } from "lucide-react"
import { Button } from "./button"
import { Input } from "./input"
import { Popover, PopoverContent, PopoverTrigger } from "./popover"
+import { Badge } from './badge';
import { cn } from "../../lib/utils"
import { useTranslation } from "react-i18next"