The shtukbase-ui-html component library
The Shtukbase components in plain HTML and CSS: the shadcn set and our composites (record card, property row, details card, empty state, tree item, toolbar, search field, status dot, settings group), the package card with its presets, areas, the package grid and the settings bar; every state and data state, long text never overflows; CSS on the token contract only, so any style fits.
О пакете
Этот текст ещё не переведён. Ниже английский оригинал.
The Shtukbase look as a component library in plain HTML and CSS: what the owner tuned in the package-map mock (the even card
edge, hover that changes only the shadow, chips with a grey outline, icon left on the title's cap line, the Basic card with
its faint tint and light from under it, cover finishes, group backgrounds, the compact settings bar) becomes components with
fixed ids, states and controls. The CSS reads only the token contract (/design/contract.md of design-tokens), so the
library takes any style: shtukbase-style by default, any shadcn theme as well.
What it installs
/design/shtukbase-ui-html.md: the library page: how a component is written, how controls become attributes, the presets./design/shtukbase-ui-html/components/<level>/<id>/<id>.htmland<id>.css: 44 components besides the shell: primitivesbutton,badge,chip,icon-plate,kicker,input,select,switch,slider,swatches,avatar,checkbox,label,progress,radio-group,separator,skeleton,textarea,tooltip,status-dot; compositescard,package-card,field,accordion,alert,breadcrumb,command,dialog,dropdown-menu,popover,table,tabs; oursrecord-card,property-row,details-card,empty-state,tree-item,toolbar,search-field,settings-group; blocksarea,package-grid,settings-barandpeek./design/shtukbase-ui-html/components/shell/<id>/:sidebar,panel,panel-section,collapsible,scroll-area,sheet, and the page formslayout-document,layout-grid,layout-catalog,layout-canvas. A lens layout arranges these parts./design/shtukbase-ui-html/ui.css(built): every component's CSS joined./design/shtukbase-ui-html/demo.html(built): every component in every state and every control value, and a package map made of the components; opened with a double click./design/shtukbase-ui-html/demo-tokens.css: the mock's values as contract tokens, used by the demo only when no style is installed (shtukbase-styleoverrides them).- Norms SUI-R01 (the component format), SUI-R02 (tokens only), SUI-R03 (ui.css is fresh) with their checks.
design-components sync turns the headers into the pages /design/components/<id>.md; the lenses of design-lenses show
them; shtukbase-ui-react renders the same markup and classes in React and imports ui.css.
Where the boundary is
- No JavaScript: states are attributes (
data-hover,data-focusfor a still picture; the real:hoverand:focus-visiblelook the same), controls aredata-<control>attributes and--<id>-<control>custom properties. Presets are bundles of attributes; the explore kit or the React library sets them. - Icons are content: the library draws the sticker rim, never a plate (SBS-R06), and not the icon. Turning an icon into style 79 is the style's business.
- Dialogs, menus, popovers and tooltips are their surfaces: opening and placing them is the page's (a native
<dialog>, Radix, any positioning). - Text never overflows:
bun testdraws every state and every control value with long Russian text in a narrow cell in headless Chrome and fails on any text that leaves its box (lib/overflow.ts).
Нормы 3
| ID | Норма | Уровень | Режим | Enforcer |
|---|---|---|---|---|
| SUI-R01 | Every component file under /design/shtukbase-ui-html/components/<level>/<id>/<id>.html starts with the component header, has one template per state and status, and its markup root carries data-slot and class equal to the id. |
MUST | не пускает | проверка |
| SUI-R02 | Component CSS takes colours, radii and shadow colours only from the token contract: var(--…), color-mix() of tokens, relative colours from a token, transparent and currentColor. |
MUST | не пускает | проверка |
| SUI-R03 | /design/shtukbase-ui-html/ui.css is exactly what the build action writes from the current component CSS. |
MUST | не пускает | проверка |
«Не пускает» — enforcer останавливает нарушение; «наблюдает» — только отмечает его. Уровень MUST — обязательно, SHOULD — по умолчанию да.
Действия 4
| Имя | Что делает | Файл | Когда |
|---|---|---|---|
| build | Join the component CSS into ui.css and write the demo page (/design/shtukbase-ui-html/) | actions/build.ts | после установки после обновления |
| format | Every component file has a valid header and a template for each state and status норма SUI-R01 | checks/format.ts | проверка |
| tokens-only | Component CSS takes colours, radii and shadows only from the token contract норма SUI-R02 | checks/tokens-only.ts | проверка |
| fresh | ui.css is rebuilt from the component CSS норма SUI-R03 | checks/fresh.ts | проверка |
Проверки запускает shtuk check, любое действие — shtuk run shtukbase-ui-html <имя>. Действия «после установки» запускаются сами, только если пакет из доверенного источника.
Страницы 114
Ложатся в проект по этим путям.
- /design/
- shtukbase-ui-html: the component library страница
- /design/shtukbase-ui-html/
- demo-tokens.css файл
- ui.css файл
- /design/shtukbase-ui-html/components/block/area/
- area.css файл
- area.html файл
- /design/shtukbase-ui-html/components/block/package-grid/
- package-grid.css файл
- package-grid.html файл
- /design/shtukbase-ui-html/components/block/peek/
- peek.css файл
- peek.html файл
- /design/shtukbase-ui-html/components/block/settings-bar/
- settings-bar.css файл
- settings-bar.html файл
- /design/shtukbase-ui-html/components/composite/accordion/
- accordion.css файл
- accordion.html файл
- /design/shtukbase-ui-html/components/composite/alert/
- alert.css файл
- alert.html файл
- /design/shtukbase-ui-html/components/composite/breadcrumb/
- breadcrumb.css файл
- breadcrumb.html файл
- /design/shtukbase-ui-html/components/composite/card/
- card.css файл
- card.html файл
- /design/shtukbase-ui-html/components/composite/command/
- command.css файл
- command.html файл
- /design/shtukbase-ui-html/components/composite/details-card/
- details-card.css файл
- details-card.html файл
- /design/shtukbase-ui-html/components/composite/dialog/
- dialog.css файл
- dialog.html файл
- /design/shtukbase-ui-html/components/composite/dropdown-menu/
- dropdown-menu.css файл
- dropdown-menu.html файл
- /design/shtukbase-ui-html/components/composite/empty-state/
- empty-state.css файл
- empty-state.html файл
- /design/shtukbase-ui-html/components/composite/field/
- field.css файл
- field.html файл
- /design/shtukbase-ui-html/components/composite/package-card/
- package-card.css файл
- package-card.html файл
- /design/shtukbase-ui-html/components/composite/popover/
- popover.css файл
- popover.html файл
- /design/shtukbase-ui-html/components/composite/property-row/
- property-row.css файл
- property-row.html файл
- /design/shtukbase-ui-html/components/composite/record-card/
- record-card.css файл
- record-card.html файл
- /design/shtukbase-ui-html/components/composite/search-field/
- search-field.css файл
- search-field.html файл
- /design/shtukbase-ui-html/components/composite/settings-group/
- settings-group.css файл
- settings-group.html файл
- /design/shtukbase-ui-html/components/composite/table/
- table.css файл
- table.html файл
- /design/shtukbase-ui-html/components/composite/tabs/
- tabs.css файл
- tabs.html файл
- /design/shtukbase-ui-html/components/composite/toolbar/
- toolbar.css файл
- toolbar.html файл
- /design/shtukbase-ui-html/components/composite/tree-item/
- tree-item.css файл
- tree-item.html файл
- /design/shtukbase-ui-html/components/primitive/avatar/
- avatar.css файл
- avatar.html файл
- /design/shtukbase-ui-html/components/primitive/badge/
- badge.css файл
- badge.html файл
- /design/shtukbase-ui-html/components/primitive/button/
- button.css файл
- button.html файл
- /design/shtukbase-ui-html/components/primitive/checkbox/
- checkbox.css файл
- checkbox.html файл
- /design/shtukbase-ui-html/components/primitive/chip/
- chip.css файл
- chip.html файл
- /design/shtukbase-ui-html/components/primitive/icon-plate/
- icon-plate.css файл
- icon-plate.html файл
- /design/shtukbase-ui-html/components/primitive/input/
- input.css файл
- input.html файл
- /design/shtukbase-ui-html/components/primitive/kicker/
- kicker.css файл
- kicker.html файл
- /design/shtukbase-ui-html/components/primitive/label/
- label.css файл
- label.html файл
- /design/shtukbase-ui-html/components/primitive/progress/
- progress.css файл
- progress.html файл
- /design/shtukbase-ui-html/components/primitive/radio-group/
- radio-group.css файл
- radio-group.html файл
- /design/shtukbase-ui-html/components/primitive/select/
- select.css файл
- select.html файл
- /design/shtukbase-ui-html/components/primitive/separator/
- separator.css файл
- separator.html файл
- /design/shtukbase-ui-html/components/primitive/skeleton/
- skeleton.css файл
- skeleton.html файл
- /design/shtukbase-ui-html/components/primitive/slider/
- slider.css файл
- slider.html файл
- /design/shtukbase-ui-html/components/primitive/status-dot/
- status-dot.css файл
- status-dot.html файл
- /design/shtukbase-ui-html/components/primitive/swatches/
- swatches.css файл
- swatches.html файл
- /design/shtukbase-ui-html/components/primitive/switch/
- switch.css файл
- switch.html файл
- /design/shtukbase-ui-html/components/primitive/textarea/
- textarea.css файл
- textarea.html файл
- /design/shtukbase-ui-html/components/primitive/tooltip/
- tooltip.css файл
- tooltip.html файл
- /design/shtukbase-ui-html/components/shell/collapsible/
- collapsible.css файл
- collapsible.html файл
- /design/shtukbase-ui-html/components/shell/layout-canvas/
- layout-canvas.css файл
- layout-canvas.html файл
- /design/shtukbase-ui-html/components/shell/layout-catalog/
- layout-catalog.css файл
- layout-catalog.html файл
- /design/shtukbase-ui-html/components/shell/layout-document/
- layout-document.css файл
- layout-document.html файл
- /design/shtukbase-ui-html/components/shell/layout-grid/
- layout-grid.css файл
- layout-grid.html файл
- /design/shtukbase-ui-html/components/shell/panel/
- panel.css файл
- panel.html файл
- /design/shtukbase-ui-html/components/shell/panel-section/
- panel-section.css файл
- panel-section.html файл
- /design/shtukbase-ui-html/components/shell/scroll-area/
- scroll-area.css файл
- scroll-area.html файл
- /design/shtukbase-ui-html/components/shell/sheet/
- sheet.css файл
- sheet.html файл
- /design/shtukbase-ui-html/components/shell/sidebar/
- sidebar.css файл
- sidebar.html файл
- /norms/rules/shtukbase-ui-html/
- A component file has a valid header and a template for each state SUI-R01
- Component CSS uses only contract tokens for colours, radii and shadows SUI-R02
- ui.css is rebuilt from the component CSS SUI-R03
Файлы пакета 31
Ложатся в .shtukbase/packages/shtukbase-ui-html/; отсюда запускаются действия.