diff --git a/README.md b/README.md index ed0de9d..a90724f 100644 --- a/README.md +++ b/README.md @@ -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) — правки видны сразу. diff --git a/package.json b/package.json index 5327f56..4a4fc8a 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/src/kit/app-sidebar.tsx b/src/kit/app-sidebar.tsx index ed92e5a..7030941 100644 --- a/src/kit/app-sidebar.tsx +++ b/src/kit/app-sidebar.tsx @@ -254,7 +254,7 @@ function SidebarLink({ item, collapsed }: { item: SidebarNavItem; collapsed: boo
  • diff --git a/src/kit/index.ts b/src/kit/index.ts index 5a4c992..1ae3cc1 100644 --- a/src/kit/index.ts +++ b/src/kit/index.ts @@ -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" diff --git a/src/kit/login-screen.tsx b/src/kit/login-screen.tsx new file mode 100644 index 0000000..ef83db9 --- /dev/null +++ b/src/kit/login-screen.tsx @@ -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 ( +
    +
    +
    +
    +
    {children}
    +
    + {note &&
    {note}
    } +
    + {footer &&
    {footer}
    } +
    + ) +} diff --git a/src/kit/page-frame.tsx b/src/kit/page-frame.tsx index 07260c3..4bcf2ed 100644 --- a/src/kit/page-frame.tsx +++ b/src/kit/page-frame.tsx @@ -33,7 +33,7 @@ export function PageFrame({ {/* Шапка и заголовок — как у SectionTabsBar с активной корневой вкладкой (PageTabs, CHIP_CLASS): разделы со вкладками и без выглядят одинаково. */}
    -

    +

    {Icon && } {title}

    diff --git a/src/kit/page-tabs.tsx b/src/kit/page-tabs.tsx index 496886a..73431bc 100644 --- a/src/kit/page-tabs.tsx +++ b/src/kit/page-tabs.tsx @@ -38,9 +38,9 @@ const toneClass: Record = { 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 diff --git a/src/styles.css b/src/styles.css index 6129986..1e6f460 100644 --- a/src/styles.css +++ b/src/styles.css @@ -122,7 +122,7 @@ /* * Мелкие размеры между шагами Tailwind — вместо text-[Npx] в разметке: - * text-ui (13px) — вкладки, пункты меню, мета-строки под заголовком; + * text-ui (13px) — мета-строки под заголовком (телефон, карта, врач), второстепенные подписи; * text-2xs (11px) — счётчики, подписи осей, бейджи; text-3xs (10px) — метки в плотных сетках. */ --text-ui: 0.8125rem;