Release 0.17.0: plain title variant for PageFrame.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ilya Mukhortov 2026-11-03 18:49:13 +10:00
parent 2b0f94bddd
commit 46dc49355e
4 changed files with 18 additions and 3 deletions

View File

@ -2,6 +2,11 @@
Установка версии: `npm i "git+https://git.med-logic.ru/medlogic/medkit.git#semver:^X.Y.Z"`. На 0.x `^0.7.0` не подхватывает 0.8.0 — минорную версию поднимаем в зависимости явно.
## [0.17.0] — 2026-11-03
### Новое
- `PageFrame`: проп `titleVariant`. `"chip"` (по умолчанию) — заголовок на подложке, как активная вкладка раздела из меню, выглядит как раньше. `"plain"` — обычный заголовок без подложки, для страниц, которые не хочется показывать вкладкой.
## [0.16.0] — 2026-11-03
### Новое

View File

@ -18,7 +18,7 @@ src/styles.css тема (токены, шрифты, тёмный режим)
Пакет ставится прямо из git, версии — теги `vX.Y.Z`:
```bash
npm i "git+https://git.med-logic.ru/medlogic/medkit.git#semver:^0.16.0"
npm i "git+https://git.med-logic.ru/medlogic/medkit.git#semver:^0.17.0"
```
`package-lock.json` фиксирует коммит; обновиться до свежего тега — `npm update @medkit/ui`. В medicine-ui kit подключён git-submodule в `packages/medkit` (npm workspace) — правки видны сразу.

View File

@ -1,6 +1,6 @@
{
"name": "@medkit/ui",
"version": "0.16.0",
"version": "0.17.0",
"private": true,
"description": "Medkit — UI kit МИС «Медицина»: React 19 + Tailwind 4 + Radix (shadcn/ui)",
"repository": {

View File

@ -15,6 +15,7 @@ import { FrameMaximizeButton, SectionFrame } from "./section-frame"
export function PageFrame({
icon: Icon,
title,
titleVariant = "chip",
actions,
toolbar,
scroll = true,
@ -24,6 +25,8 @@ export function PageFrame({
}: {
icon?: LucideIcon
title: React.ReactNode
/** chip — как активная вкладка раздела из меню; plain — обычный заголовок, без подложки. */
titleVariant?: "chip" | "plain"
actions?: React.ReactNode
/** Строка под шапкой: фильтры, поиск. */
toolbar?: React.ReactNode
@ -41,7 +44,14 @@ export function PageFrame({
{/* Шапка и заголовок — как у SectionTabsBar с активной корневой вкладкой (PageTabs, CHIP_CLASS):
разделы со вкладками и без выглядят одинаково. */}
<header className="flex h-12 shrink-0 items-center gap-2 border-b px-2">
<h1 className="flex h-8 min-w-0 items-center gap-2 rounded-lg bg-accent px-2.5 text-sm font-medium text-accent-foreground">
<h1
className={cn(
"flex h-8 min-w-0 items-center gap-2 px-2.5 text-sm",
titleVariant === "chip"
? "rounded-lg bg-accent font-medium text-accent-foreground"
: "font-semibold text-foreground",
)}
>
{Icon && <Icon className="size-4 shrink-0 text-primary" />}
<span className={cn("truncate", Icon && !showTitleOnMobile && "max-md:sr-only")}>{title}</span>
</h1>