LoginScreen, 14px section tabs, release 0.8.0
- LoginScreen: login page layout, the form in a centered card on a soft dot grid, `note` under the card and `footer` at the bottom of the screen. - Section tabs (PageTabs, "ещё N") and the PageFrame title move from 13px to 14px and still match each other. - Sidebar open cards under menu items move from 13px to 14px. - text-ui (13px) is now meant for meta lines under a title. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
87d12b72ec
commit
9fa8a46edc
|
|
@ -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.7.1"
|
||||
npm i "git+https://git.med-logic.ru/medlogic/medkit.git#semver:^0.8.0"
|
||||
```
|
||||
|
||||
`package-lock.json` фиксирует коммит; обновиться до свежего тега — `npm update @medkit/ui`. В medicine-ui kit подключён git-submodule в `packages/medkit` (npm workspace) — правки видны сразу.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@medkit/ui",
|
||||
"version": "0.7.1",
|
||||
"version": "0.8.0",
|
||||
"private": true,
|
||||
"description": "Medkit — UI kit МИС «Медицина»: React 19 + Tailwind 4 + Radix (shadcn/ui)",
|
||||
"repository": {
|
||||
|
|
|
|||
|
|
@ -254,7 +254,7 @@ function SidebarLink({ item, collapsed }: { item: SidebarNavItem; collapsed: boo
|
|||
<li
|
||||
key={tab.id}
|
||||
className={cn(
|
||||
"group/item flex h-7 items-center rounded-md text-ui transition-colors",
|
||||
"group/item flex h-7 items-center rounded-md text-sm transition-colors",
|
||||
here ? "bg-white/[0.06] text-white" : "text-sidebar-muted hover:bg-white/[0.03] hover:text-sidebar-foreground",
|
||||
)}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ export * from "./form-field"
|
|||
export * from "./info-section"
|
||||
export * from "./loading-bar"
|
||||
export * from "./login-form"
|
||||
export * from "./login-screen"
|
||||
export * from "./multi-select"
|
||||
export * from "./notice"
|
||||
export * from "./notify"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,43 @@
|
|||
import * as React from "react"
|
||||
|
||||
import { cn } from "../lib/utils"
|
||||
|
||||
/**
|
||||
* Экран входа: форма в карточке по центру, фон с мягкой точечной сеткой.
|
||||
* Внутрь кладут LoginForm; `note` — строка под карточкой, `footer` — низ экрана.
|
||||
*/
|
||||
export function LoginScreen({
|
||||
note,
|
||||
footer,
|
||||
className,
|
||||
children,
|
||||
}: {
|
||||
/** Под карточкой: «Доступ только для сотрудников», ссылка на помощь. */
|
||||
note?: React.ReactNode
|
||||
/** Внизу экрана: организация, версия. */
|
||||
footer?: React.ReactNode
|
||||
className?: string
|
||||
/** Форма входа. */
|
||||
children: React.ReactNode
|
||||
}) {
|
||||
return (
|
||||
<div
|
||||
className={cn(
|
||||
"relative flex min-h-svh flex-col items-center overflow-clip bg-background px-4 text-foreground",
|
||||
className,
|
||||
)}
|
||||
>
|
||||
<div
|
||||
aria-hidden
|
||||
className="pointer-events-none absolute inset-0 [mask-image:radial-gradient(ellipse_at_center,black_15%,transparent_65%)] bg-[radial-gradient(var(--border)_1px,transparent_1px)] [background-size:20px_20px]"
|
||||
/>
|
||||
<div className="relative flex w-full flex-1 flex-col items-center justify-center py-10">
|
||||
<div className="w-full max-w-md rounded-2xl border bg-card p-6 shadow-[0_1px_2px_rgba(15,40,60,0.04),0_12px_40px_-12px_rgba(15,40,60,0.18)] sm:p-10">
|
||||
<div className="flex justify-center">{children}</div>
|
||||
</div>
|
||||
{note && <div className="mt-6 max-w-md text-center text-xs text-muted-foreground">{note}</div>}
|
||||
</div>
|
||||
{footer && <div className="relative pb-6 text-center text-xs text-muted-foreground">{footer}</div>}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
@ -33,7 +33,7 @@ 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-ui font-medium text-accent-foreground">
|
||||
<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">
|
||||
{Icon && <Icon className="size-4 shrink-0 text-primary" />}
|
||||
<span className="truncate">{title}</span>
|
||||
</h1>
|
||||
|
|
|
|||
|
|
@ -38,9 +38,9 @@ const toneClass: Record<PageTabTone, string> = {
|
|||
export const MAX_VISIBLE_TABS = 4
|
||||
|
||||
const CHIP_CLASS =
|
||||
"group/tab relative flex h-8 max-w-56 shrink-0 cursor-pointer items-center gap-2 rounded-lg px-2.5 text-ui font-medium outline-none select-none"
|
||||
"group/tab relative flex h-8 max-w-56 shrink-0 cursor-pointer items-center gap-2 rounded-lg px-2.5 text-sm font-medium outline-none select-none"
|
||||
const MORE_CLASS =
|
||||
"flex h-8 shrink-0 items-center gap-1 rounded-lg px-2.5 text-ui font-medium text-muted-foreground transition-colors outline-none hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring/60 data-[state=open]:bg-muted data-[state=open]:text-foreground"
|
||||
"flex h-8 shrink-0 items-center gap-1 rounded-lg px-2.5 text-sm font-medium text-muted-foreground transition-colors outline-none hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring/60 data-[state=open]:bg-muted data-[state=open]:text-foreground"
|
||||
// Должны совпадать с разметкой: gap-1 между чипами, разделитель mx-1 w-px после закреплённых.
|
||||
const GAP = 4
|
||||
const SEPARATOR = 9
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@
|
|||
|
||||
/*
|
||||
* Мелкие размеры между шагами Tailwind — вместо text-[Npx] в разметке:
|
||||
* text-ui (13px) — вкладки, пункты меню, мета-строки под заголовком;
|
||||
* text-ui (13px) — мета-строки под заголовком (телефон, карта, врач), второстепенные подписи;
|
||||
* text-2xs (11px) — счётчики, подписи осей, бейджи; text-3xs (10px) — метки в плотных сетках.
|
||||
*/
|
||||
--text-ui: 0.8125rem;
|
||||
|
|
|
|||
Loading…
Reference in New Issue