ShtukbaseStandard

The shtukbase-ui-html component library

shtukbase-ui-html · versión 0.3.4
Otros3 normas3 comprobaciones

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.

Sobre el paquete

Este texto aún no está traducido. Debajo está el original en inglés.

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>.html and <id>.css: 44 components besides the shell: primitives button, badge, chip, icon-plate, kicker, input, select, switch, slider, swatches, avatar, checkbox, label, progress, radio-group, separator, skeleton, textarea, tooltip, status-dot; composites card, package-card, field, accordion, alert, breadcrumb, command, dialog, dropdown-menu, popover, table, tabs; ours record-card, property-row, details-card, empty-state, tree-item, toolbar, search-field, settings-group; blocks area, package-grid, settings-bar and peek.
  • /design/shtukbase-ui-html/components/shell/<id>/: sidebar, panel, panel-section, collapsible, scroll-area, sheet, and the page forms layout-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-style overrides 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-focus for a still picture; the real :hover and :focus-visible look the same), controls are data-<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 test draws 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).

Normas 3

IDNormaNivelModoEnforcer
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 bloquea
comprobación
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 bloquea
comprobación
SUI-R03
/design/shtukbase-ui-html/ui.css is exactly what the build action writes from the current component CSS.
MUST bloquea
comprobación

«Bloquea»: el enforcer detiene la infracción. «Observa»: solo la anota. El nivel MUST es obligatorio; SHOULD significa «sí, salvo que haya motivo».

Acciones 4

NombreQué haceArchivoCuándo
buildJoin the component CSS into ui.css and write the demo page (/design/shtukbase-ui-html/)actions/build.ts
tras instalar tras actualizar
formatEvery component file has a valid header and a template for each state and status
norma SUI-R01
checks/format.ts
comprobación
tokens-onlyComponent CSS takes colours, radii and shadows only from the token contract
norma SUI-R02
checks/tokens-only.ts
comprobación
freshui.css is rebuilt from the component CSS
norma SUI-R03
checks/fresh.ts
comprobación

shtuk check ejecuta las comprobaciones; shtuk run shtukbase-ui-html <nombre> ejecuta cualquier acción. Las acciones «tras instalar» solo se ejecutan solas si el paquete viene de una fuente de confianza.

Páginas 114

Se copian al proyecto en estas rutas.

Archivos del paquete 31

Van a .shtukbase/packages/shtukbase-ui-html/; las acciones se ejecutan desde ahí.