diff --git a/src/kit/confirm-dialog.tsx b/src/kit/confirm-dialog.tsx
new file mode 100644
index 0000000..6747411
--- /dev/null
+++ b/src/kit/confirm-dialog.tsx
@@ -0,0 +1,53 @@
+import * as React from "react"
+
+import {
+ AlertDialog,
+ AlertDialogAction,
+ AlertDialogCancel,
+ AlertDialogContent,
+ AlertDialogDescription,
+ AlertDialogFooter,
+ AlertDialogHeader,
+ AlertDialogTitle,
+ AlertDialogTrigger,
+} from "@/components/ui/alert-dialog"
+import { buttonVariants } from "@/components/ui/button"
+
+/** Подтверждение необратимого действия: «Удалить профиль?» → Удалить / Отмена. */
+export function ConfirmDialog({
+ title,
+ description,
+ confirmLabel = "Удалить",
+ destructive = true,
+ onConfirm,
+ children,
+}: {
+ title: string
+ description?: React.ReactNode
+ confirmLabel?: string
+ destructive?: boolean
+ onConfirm: () => void
+ /** Кнопка-триггер. */
+ children: React.ReactElement
+}) {
+ return (
+
+ {children}
+
+
+ {title}
+ {description && {description}}
+
+
+ Отмена
+
+ {confirmLabel}
+
+
+
+
+ )
+}
diff --git a/src/kit/index.ts b/src/kit/index.ts
index af64a03..1eb1493 100644
--- a/src/kit/index.ts
+++ b/src/kit/index.ts
@@ -1,5 +1,6 @@
// Переиспользуемые компоненты МИС «Медицина». Витрина — /ui (src/pages/ui/ui-page.tsx).
export * from "./code-block"
+export * from "./confirm-dialog"
export * from "./content-tabs"
export * from "./data-table"
export * from "./date-leaf"
@@ -14,6 +15,8 @@ export * from "./pagination"
export * from "./patient-avatar"
export * from "./patient-panel"
export * from "./person-chip"
+export * from "./save-bar"
export * from "./search-input"
export * from "./stat-tile"
export * from "./status-badge"
+export * from "./time-range-input"
diff --git a/src/kit/save-bar.tsx b/src/kit/save-bar.tsx
new file mode 100644
index 0000000..f34f513
--- /dev/null
+++ b/src/kit/save-bar.tsx
@@ -0,0 +1,51 @@
+import * as React from "react"
+import { CircleAlertIcon, CircleCheckIcon } from "lucide-react"
+
+import { cn } from "@/lib/utils"
+import { Button } from "@/components/ui/button"
+
+/**
+ * Липкая панель внизу формы: показывает, есть ли несохранённые изменения,
+ * и даёт «Сохранить» / «Сбросить». Можно добавить свои действия слева.
+ */
+export function SaveBar({
+ dirty,
+ onSave,
+ onReset,
+ saveLabel = "Сохранить",
+ error,
+ children,
+ className,
+}: {
+ dirty: boolean
+ onSave: () => void
+ onReset?: () => void
+ saveLabel?: string
+ /** Блокирует сохранение и показывается вместо статуса. */
+ error?: string | null
+ children?: React.ReactNode
+ className?: string
+}) {
+ return (
+
+ {children}
+
+ {error || dirty ? : }
+ {error ?? (dirty ? "Есть несохранённые изменения" : "Все изменения сохранены")}
+
+ {onReset && (
+
+ )}
+
+
+ )
+}
diff --git a/src/kit/time-range-input.tsx b/src/kit/time-range-input.tsx
new file mode 100644
index 0000000..6457a8e
--- /dev/null
+++ b/src/kit/time-range-input.tsx
@@ -0,0 +1,62 @@
+import { XIcon } from "lucide-react"
+
+import { cn } from "@/lib/utils"
+
+export interface TimeRangeValue {
+ from: string
+ to: string
+}
+
+/** Диапазон времени «с–по» в одну строку; подсвечивается, если «по» раньше «с». */
+export function TimeRangeInput({
+ value,
+ onChange,
+ onRemove,
+ className,
+}: {
+ value: TimeRangeValue
+ onChange: (value: TimeRangeValue) => void
+ onRemove?: () => void
+ className?: string
+}) {
+ const invalid = Boolean(value.from && value.to && value.to <= value.from)
+ const input =
+ "h-7 w-[4.6rem] rounded-md bg-transparent px-1 font-mono text-xs tabular outline-none focus:bg-accent/60 [&::-webkit-calendar-picker-indicator]:hidden"
+
+ return (
+
+ onChange({ ...value, from: e.target.value })}
+ className={input}
+ />
+ –
+ onChange({ ...value, to: e.target.value })}
+ className={input}
+ />
+ {onRemove && (
+
+ )}
+
+ )
+}
diff --git a/src/ui/alert-dialog.tsx b/src/ui/alert-dialog.tsx
new file mode 100644
index 0000000..0872b14
--- /dev/null
+++ b/src/ui/alert-dialog.tsx
@@ -0,0 +1,195 @@
+
+import * as React from "react"
+import { cn } from "@/lib/utils"
+import { AlertDialog as AlertDialogPrimitive } from "radix-ui"
+
+import { Button } from "@/components/ui/button"
+
+function AlertDialog({
+ ...props
+}: React.ComponentProps) {
+ return
+}
+
+function AlertDialogTrigger({
+ ...props
+}: React.ComponentProps) {
+ return (
+
+ )
+}
+
+function AlertDialogPortal({
+ ...props
+}: React.ComponentProps) {
+ return (
+
+ )
+}
+
+function AlertDialogOverlay({
+ className,
+ ...props
+}: React.ComponentProps) {
+ return (
+
+ )
+}
+
+function AlertDialogContent({
+ className,
+ size = "default",
+ ...props
+}: React.ComponentProps & {
+ size?: "default" | "sm"
+}) {
+ return (
+
+
+
+
+ )
+}
+
+function AlertDialogHeader({
+ className,
+ ...props
+}: React.ComponentProps<"div">) {
+ return (
+
+ )
+}
+
+function AlertDialogFooter({
+ className,
+ ...props
+}: React.ComponentProps<"div">) {
+ return (
+
+ )
+}
+
+function AlertDialogTitle({
+ className,
+ ...props
+}: React.ComponentProps) {
+ return (
+
+ )
+}
+
+function AlertDialogDescription({
+ className,
+ ...props
+}: React.ComponentProps) {
+ return (
+
+ )
+}
+
+function AlertDialogMedia({
+ className,
+ ...props
+}: React.ComponentProps<"div">) {
+ return (
+
+ )
+}
+
+function AlertDialogAction({
+ className,
+ variant = "default",
+ size = "default",
+ ...props
+}: React.ComponentProps &
+ Pick, "variant" | "size">) {
+ return (
+
+ )
+}
+
+function AlertDialogCancel({
+ className,
+ variant = "outline",
+ size = "default",
+ ...props
+}: React.ComponentProps &
+ Pick, "variant" | "size">) {
+ return (
+
+ )
+}
+
+export {
+ AlertDialog,
+ AlertDialogAction,
+ AlertDialogCancel,
+ AlertDialogContent,
+ AlertDialogDescription,
+ AlertDialogFooter,
+ AlertDialogHeader,
+ AlertDialogMedia,
+ AlertDialogOverlay,
+ AlertDialogPortal,
+ AlertDialogTitle,
+ AlertDialogTrigger,
+}
diff --git a/src/ui/scroll-area.tsx b/src/ui/scroll-area.tsx
index c2395dc..31ac007 100644
--- a/src/ui/scroll-area.tsx
+++ b/src/ui/scroll-area.tsx
@@ -10,8 +10,12 @@ function ScrollArea({
children,
type = "hover",
scrollHideDelay = 700,
+ horizontal = false,
...props
-}: React.ComponentProps) {
+}: React.ComponentProps & {
+ /** Ещё и горизонтальная прокрутка (широкие сетки, таблицы). */
+ horizontal?: boolean
+}) {
return (
+ {horizontal && }
)