UI-kit для веб-интерфейсов GNexus. Текущий стиль: темная cyber/terminal панель с легкой примесью Tokyo Night, IBM Plex Mono, Phosphor Icons, жесткие прямые формы, акцентные бордеры и яркие состояния.
Проект выделен из старого webclient, но развивается как отдельный набор UI-компонентов с demo/docs страницей.
Человеческая документация по подключению, стилю, JS API и компонентам находится в docs/. Официальный Vue 3 adapter описан в docs/vue.md.
npm install npm run dev
Dev server:
http://localhost:3000
Production build:
npm run build
Release check:
npm run release:check
Vue adapter only:
npm run build:vue
Vue example smoke build:
npm --prefix examples/vue install npm run build:example:vue
demo/ Demo/docs страница и HTML partials public/assets/ Шрифты, иконки, highlight.js и изображения src/js/ Browser JS entry и UI-компоненты src/scss/ SCSS entry, tokens, utilities и компоненты dist/ Результат сборки, не коммитится webclient/ Исходный старый клиент, игнорируется git
Ключевые entry points:
src/scss/kit.scss Основной CSS UI-kit src/scss/demo.scss CSS для demo/docs страницы src/js/index.js Browser JS bundle entry src/vue/index.js Vue 3 adapter entry demo/index.html Demo/docs страница
npm run dev
Собирает проект, запускает BrowserSync и следит за изменениями.
npm run build
Собирает:
dist/css/kit.cssdist/css/demo.cssdist/js/gnexus-ui-kit.jsdist/vue/index.jsdist/index.htmldist/assets/*npm run release:check
Runs the Vue adapter smoke build and package smoke validation from a packed tarball. See docs/release.md.
Для подключения kit в обычную HTML-страницу нужны CSS, иконки и JS bundle:
<link rel="stylesheet" href="/assets/fonts/phosphor-icons/src/css/icons.css"> <link rel="stylesheet" href="/css/kit.css"> <script src="/js/gnexus-ui-kit.js"></script>
JS bundle публикует API в window:
Toasts.createSuccess("Success", "Saved").show();
const modal = Modals.create("example-modal", {
title: "Modal",
bodyText: "Content"
});
modal.show();
Также доступен global namespace:
GNexusUIKit.Toasts.createInfo("Info", "Message").show();
In Vue projects, always use the official adapter. It is the primary contract — not a thin wrapper. Import CSS once, then use adapter components:
import "gnexus-ui-kit/dist/css/kit.css";
import "gnexus-ui-kit/dist/assets/fonts/phosphor-icons/src/css/icons.css";
import { GnButton, GnTabs, GnexusUiVue } from "gnexus-ui-kit/vue";
Do not write raw .btn, .modal, .tabs markup in Vue SFCs when the adapter exposes GnButton, GnModal, GnTabs.
All icon props must use the ph- prefix. Phosphor Icons are the only supported icon set.
// Correct icon="ph-house" icon="ph-plus" icon="ph-bold ph-spinner" // Wrong — triggers a dev warning and may not render icon="house" icon="plus"
| Need | Component | Props you will use |
|---|---|---|
| Button | GnButton |
variant, size, icon, loading, disabled |
| Icon-only button | GnIconButton |
icon, label |
| Copy button | GnCopyButton |
text, icon, successIcon, duration, label |
| Status label | GnBadge |
variant, outline |
| Message block | GnAlert |
variant |
| Card / panel | GnCard |
title (slot), footer (slot) |
| Horizontal card | GnHorizontalCard |
image, title, titleHref, icon, footer (slot) |
| Page title bar | GnPageHeader |
kicker, title, subtitle, meta, actions (slot) |
| Text field | GnInput |
v-model, label, icon, state, help |
| Textarea | GnTextarea |
v-model, label, state, help |
| Select dropdown | GnSelect |
v-model, label, options |
| Checkbox | GnCheckbox |
v-model, label, disabled |
| Toggle switch | GnSwitch |
v-model, label, disabled |
| Radio | GnRadio / GnRadioGroup |
v-model, options |
| Range slider | GnRange |
v-model, label, min, max |
| File upload | GnFileUpload |
v-model, badge, multiple, accept |
| Searchable select | GnCombobox |
v-model, label, options, placeholder |
| Tabs | GnTabs |
v-model, items |
| Router tabs | GnRouterTabs |
items (with to), activeMatch |
| Accordion | GnAccordion |
items, v-model, multiple |
| Modal dialog | GnModal |
v-model:open, title, closeOnBackdrop |
| Side drawer | GnDrawer |
v-model:open, title, position |
| Toasts | GnToastProvider + useToast |
Wrap app once; call toast.success({ title, text }) |
| Confirm dialog | GnConfirmDialog |
v-model:open, title, message, confirmVariant |
| Table | GnTable |
columns, rows, caption, emptyText |
| Toolbar | GnToolbar |
title, meta, actions (slot) |
| Input group | GnInputGroup |
addon (slot), action (slot) |
| Search field | GnSearchField |
v-model |
| Pagination | GnPagination |
page, total-pages |
| Empty state | GnEmptyState |
title, text, icon, actions (slot) |
| Skeleton loader | GnSkeleton |
— |
| Key-value list | GnDescriptionList |
items |
| Progress bar | GnProgress |
value, label, animated |
| Usage meter card | GnUsageMeter |
value, label, max |
| Staged progress | GnProgressStages |
items |
| Wizard steps | GnSteps |
items, current |
| Chip / tag | GnChip |
variant, selected, removable |
| Chip group | GnChipGroup |
— |
| Avatar | GnAvatar |
initials, icon, image, size, status |
| Identity row | GnIdentity |
title, meta, avatar props |
| Avatar stack | GnAvatarStack |
items |
| Timeline | GnTimeline |
items |
| Activity log | GnActivityLog |
items |
| Basic list | GnList |
items |
| Definition list | GnDefinitionList |
items |
| Action list | GnActionList |
items |
| Loader / spinner | GnLoader |
— |
| Status card | GnStatusCard |
variant, title, meta |
| Metric card | GnMetricCard |
title, value, trend |
| Action card | GnActionCard |
title, text, actions (slot) |
| Dropdown menu | GnDropdown |
items, label, variant |
| Popover panel | GnPopover |
title, text, label |
| Tooltip | GnTooltip |
text |
| Navigation list | GnNavList |
items |
| App shell | GnNavigationShell |
brand, items, current, footerLeft, footerRight |
GNexusUIKit.Modals.create() from Vue components.GNexusUIKit.Overlays.init() or GNexusUIKit.NavigationShell.init() in Vue projects.Accordion.init() or Tabs.init() inside Vue components.advancedSelect() helper in Vue; use GnCombobox.InputPatterns.init() for Vue file upload previews; use GnFileUpload.<style> blocks.class="btn btn-primary" when GnButton exists.ph- prefix.See docs/vue.md and docs/vue/ai-usage-guide.md for full details.
Bundle публикует компоненты и helper-модули двумя способами:
Toasts.createSuccess("Success", "Saved").show();
GNexusUIKit.Toasts.createInfo("Info", "Message").show();
Текущий публичный namespace:
GNexusUIKit.Helper GNexusUIKit.Toasts GNexusUIKit.Modals GNexusUIKit.advancedSelect GNexusUIKit.editableString GNexusUIKit.confirmPopup GNexusUIKit.Drawer GNexusUIKit.NavigationShell GNexusUIKit.Overlays GNexusUIKit.InputPatterns GNexusUIKit.Accordion
Overlays.init(), NavigationShell.init(), InputPatterns.init() и Accordion.init() запускаются автоматически на DOMContentLoaded.
Сейчас в demo/docs представлены:
Каждая секция demo содержит визуальный пример, короткое описание и копируемый блок кода.
Секция включает:
JS-модуль: src/js/components/overlays.js.
Секция включает:
JS-модуль: src/js/components/navigation-shell.js обрабатывает data-navigation-toggle, data-navigation-drawer, data-navigation-close и data-navigation-link.
Секция включает:
$space-0 ... $space-12.m-*, mt-*, mr-*, mb-*, ml-*, mx-*, my-*.p-*, pt-*, pr-*, pb-*, pl-*, px-*, py-*.g-*, gx-*, gy-*.grid-*, row, column, items-*, justify-*, d-*, text-*.Секция включает:
JS-модуль: src/js/components/input-patterns.js добавляет поведение для data-input-clear.
Секции включают:
Секции включают:
--progress-value.Секции включают:
Секции включают:
<details> / <summary>.JS-модуль: src/js/components/accordion.js добавляет управляемую анимацию раскрытия.
Секции включают:
position: "left".confirmPopup.JS-модули: src/js/components/drawer.js и src/js/components/confirm-popup.js.
Базовые файлы:
src/scss/_palette-colors.scss src/scss/_design-tokens.scss src/scss/_spacing.scss src/scss/_mixins.scss src/scss/_utils.scss
Компоненты находятся в:
src/scss/components/
Основная идея стиля сохраняется от исходного UI: моноширинная типографика, Tokyo Night influenced dark surface, sharp edges, толстые акцентные бордеры, цветовая инверсия на hover/focus и яркие status colors.
Локально подключены:
dist/ генерируется из public/assets, src и demo.
@use / @forward; deprecated map-* global functions заменены на sass:map.npm audit --audit-level=low проходит без найденных уязвимостей.webclient/ оставлен как источник старого клиента и игнорируется git..codex является локальным служебным файлом и не должен попадать в коммиты.Ближайшие полезные компоненты:
Технические задачи: