libraryPackage manifestv9.0.5

lib.ui-kit-web

Web UI components with Radix primitives

@lssm-tech/lib.ui-kit-web
Source, release and verification context

Source snapshot bcc79fcc · Declared package version 9.0.5. This page combines the checked-in package guide and manifest; commands and runtime behavior were not executed in this review.

Package source ↗ Manifest ↗
servernode
EXPLORE THE PACKAGE

See where this package fits.

Follow a declared connection, inspect an import, then open the source guide when you need the detail.

THIS PACKAGElib.ui-kit-webplatform

Arrows point from a package to its direct dependency. Each count is derived from the captured manifests.

49 déclarations · les 6 premières affichéesSELECT TO INSPECT

@lssm-tech/lib.ui-kit-web

@lssm-tech/lib.ui-kit-web provides web UI components for React and Next surfaces, with accessible building blocks, Radix-based primitives, layout helpers, and web-specific UX utilities exposed through ./ui/* subpaths.

Website: https://contractspec.io

Form hosts support @hookform/resolvers ^5.4.0, including the workspace-tested 5.9.1 release. The development dependency must remain within that peer range.

Installation

bun add @lssm-tech/lib.ui-kit-web

or

npm install @lssm-tech/lib.ui-kit-web

What belongs here

This package owns the web-first component layer:

  • Radix-backed web UI components.
  • Web-only accessibility helpers and route-announcement primitives.
  • Map, marketing, list-page, and visualization building blocks.
  • Web form, navigation, and layout primitives.

Use this package for browser and Next.js surfaces. Do not use it for native or Expo UI work.

Core workflows

Opt into the executable Storybook catalog

The package publishes a contract-driven, relocatable catalog at @lssm-tech/lib.ui-kit-web/storybook. It covers eight representative public families with Editorial light and Executive Ledger dark reference cases; it does not multiply primitives across the full design-pack matrix.

ts
import { uiKitWebStorybookCatalog } from "@lssm-tech/lib.ui-kit-web/storybook";

export default {
  // ...ContractSpec Storybook configuration
  catalogs: [uiKitWebStorybookCatalog],
};

Catalog V2 embeds scenarios and references the public ./storybook/bindings entry. The consuming host owns the Storybook integration and generates CSF; the library no longer ships executable generated stories or requires that peer. bun run storybook:generate and bun run storybook:check maintain the data manifest. Consumers that used storyGlobs directly must adopt the catalog through the integration and regenerate their host. Existing catalogs: [uiKitWebStorybookCatalog] configuration remains valid. The exported coverage manifest maps controls, forms, navigation, overlays, feedback, data display, accessibility, and graph/visualization to their scenarios and typed bindings.

Import a web component by subpath

ts
import { Button } from "@lssm-tech/lib.ui-kit-web/ui/button";
import { Form } from "@lssm-tech/lib.ui-kit-web/ui/form";

Wire accessibility helpers at the app root

tsx
import {
  SRLiveRegionProvider,
  useSRLiveRegion,
} from "@lssm-tech/lib.ui-kit-web/ui/live-region";
import { SkipLink } from "@lssm-tech/lib.ui-kit-web/ui/skip-link";
import { RouteAnnouncer } from "@lssm-tech/lib.ui-kit-web/ui/route-announcer";
import { FocusOnRouteChange } from "@lssm-tech/lib.ui-kit-web/ui/focus-on-route-change";

function AppShell({ title, children }: { title: string; children: React.ReactNode }) {
  return (
    <SRLiveRegionProvider>
      <SkipLink targetId="main" />
      <RouteAnnouncer title={title} />
      <main id="main">
        <FocusOnRouteChange />
        {children}
      </main>
    </SRLiveRegionProvider>
  );
}

Render the canonical account grid

The canonical data-table example lives in @lssm-tech/example.data-grid-showcase†. Its raw browser lane renders @lssm-tech/lib.ui-kit-web/ui/data-table directly:

tsx
import { DataTable } from '@lssm-tech/lib.ui-kit-web/ui/data-table';
import { useContractTable } from '@lssm-tech/lib.presentation-runtime-react';

import { SHOWCASE_ROWS } from '@lssm-tech/example.data-grid-showcase/ui/data-grid-showcase.data';
import { useShowcaseColumns } from '@lssm-tech/example.data-grid-showcase/ui/data-grid-showcase.columns';
import {
  ExpandedRowContent,
  ShowcaseToolbar,
} from '@lssm-tech/example.data-grid-showcase/ui/data-grid-showcase.parts';

export function WebAccountGrid() {
  const columns = useShowcaseColumns();

  const controller = useContractTable({
    data: SHOWCASE_ROWS,
    columns,
    selectionMode: 'single',
    initialState: {
      sorting: [{ id: 'lastActivityAt', desc: true }],
      pagination: { pageIndex: 0, pageSize: 4 },
      columnVisibility: { notes: false },
      columnPinning: { left: ['account'], right: [] },
    },
    renderExpandedContent: (row) => <ExpandedRowContent row={row} />,
    getCanExpand: () => true,
  });

  return (
    <DataTable
      controller={controller}
      toolbar={
        <ShowcaseToolbar
          controller={controller}
          label="Web primitive"
          primaryColumnId="account"
          toggleColumnId="notes"
          pinColumnId="owner"
          sortColumnIds={['arr', 'renewalDate']}
        />
      }
      loading={false}
      emptyState={<div>No rows available.</div>}
      footer={\`Rows \${controller.totalItems}\`}
    />
  );
}

Cells receive overflow behavior from the table controller. Web renderers use a compact truncating wrapper for truncate and expand, multiline wrapping for wrap, and preserve caller rendering for none.

Use the web primitive when you want direct control over the render surface. For higher-level search, active chips, selection summary, and hidden-column recovery, keep this primitive lean and layer @lssm-tech/lib.design-system DataTableToolbar into the toolbar slot.

API map

Controls and forms

  • ./ui/button
  • ./ui/button-group
  • ./ui/input
  • ./ui/input-password
  • ./ui/textarea
  • ./ui/select
  • ./ui/native-select
  • ./ui/field
  • ./ui/form

./ui/input-password composes the shared input group, masked input, and right-side visibility toggle while preserving current-password and new-password autocomplete hints for password managers.

  • ./ui/combobox

./ui/combobox keeps the select-style button API compatible and also supports editable autocomplete usage with query control, listbox ARIA wiring, loading, empty, error, disabled-option, description, and multi-select chip states.

  • ./ui/input-group
  • ./ui/input-otp
  • ./ui/spinner
  • ./ui/kbd

Overlays, menus, and navigation

  • ./ui/dialog
  • ./ui/drawer
  • ./ui/dropdown-menu
  • ./ui/popover
  • ./ui/navigation-menu
  • ./ui/nav-layout
  • ./ui/link

Data display and layout

  • ./ui/table
  • ./ui/data-table
  • ./ui/page-header
  • ./ui/section
  • ./ui/sidebar
  • ./ui/stack
  • ./ui/item
  • ./ui/chart
  • ./ui/direction

Stack and Box layout intent

./ui/stack exports the web Box, HStack, and VStack primitives. Treat direction as part of the component contract:

  • Utiliser VStack for vertical sections, card content, forms, lists, and panels.
  • Utiliser HStack for horizontal rows, toolbars, chips, inline metrics, and action groups.
  • Utiliser Box as a neutral wrapper, semantic surface, single-child container, or explicit true-grid/custom-positioning host.
  • Do not introduce new Box usage that depends on implicit flex direction, default gap, centered alignment, or className-only stack layout.

Box is neutral by default and no longer injects legacy row/gap/center layout. Legacy layout behavior is available only through the temporary legacyBoxLayout compatibility bridge while owned callsites migrate. New code must not use that bridge; replace Box className="flex flex-col gap-4" with VStack gap="md" or Box className="flex flex-row items-center" with HStack align="center". Changes to gap, align, justify, wrap, as, or Box defaults require release-capsule evidence and guard output.

Accessibility helpers

  • ./ui/skip-link
  • ./ui/live-region
  • ./ui/route-announcer
  • ./ui/focus-on-route-change
  • ./ui/visually-hidden

Hooks and grouped surfaces

  • ./ui/use-media-query
  • ./ui/use-mobile
  • ./ui/use-reduced-motion
  • ./ui/use-toast
  • ./ui/utils
  • grouped subpaths under ./ui/map, ./ui/marketing, ./ui/usecases, ./ui/organisms/ListPage, and ./ui/visualization
  • shared semantic contracts are defined in @lssm-tech/lib.ui-kit-core/interfaces

Public surface

The package publishes a root entry, but the meaningful consumer surface is ./ui/*.

Consumers should import grouped subpaths directly. The public surface is best understood by category:

  • controls and forms
  • shadcn/Radix-style Field and InputGroup primitives for accessible labels, descriptions, errors, legends, addons, and grouped controls
  • overlays and menus
  • layout and navigation
  • accessibility helpers
  • data display
  • grouped map, marketing, organisms, use-case, and visualization surfaces
  • hooks and utilities

Utiliser package.json as the exhaustive export map.

Operational semantics and gotchas

  • Components rely on Radix and browser or Next assumptions.
  • ./ui/link is based on next/link.
  • ./ui/skip-link, live-region helpers, and route announcers are first-class web-only APIs in this package.
  • Component catalogs are hosted through @lssm-tech/app.storybook; downstream verticals should adopt @lssm-tech/integration.storybook instead of adding a package-local Storybook configuration here.
  • The package has optional map-related peer dependencies; map features should stay opt-in and not become implicit hard requirements.
  • The root entry is not the meaningful consumer surface today.

When not to use this package

  • Do not use it for native or Expo surfaces.
  • Do not use it for token orchestration or platform abstraction.
  • Do not use it for framework-agnostic linking.
  • @lssm-tech/lib.ui-kit-core: shared low-level utilities used across UI packages.

The server-only ./rich-ref/ssr-boundary-resolver reads the shared @lssm-tech/lib.ui-kit-core/ssr/subject-scope port. AuthOS request handlers continue to use runWithSubject from @lssm-tech/lib.authos-runtime/ssr to install their resolved subject. Both entry points use one canonical async scope; the resolver keeps its existing arguments, subject identity and per-session hash. No identity-domain implementation is imported by the web primitives.

  • @lssm-tech/lib.ui-kit: native-first component package for Expo and React Native surfaces.
  • @lssm-tech/lib.design-system: higher-level design-system and composition layer built on top of the UI packages.

Local commands

  • bun run lint:check
  • bun run typecheck
  • bun run test

Graph & Timeline Primitives

@lssm-tech/lib.ui-kit-web ships SVG graph and timeline primitives for web and Next.js surfaces.

@lssm-tech/lib.ui-kit-web/ui/graph:

  • GraphCanvas — SVG-based graph renderer with layout + selection hooks
  • GraphCanvasAdvanced — ReactFlow (@xyflow/react) adapter for large graphs

@lssm-tech/lib.ui-kit-web/ui/timeline:

  • Timeline — SVG timeline with brush, axis, and event sub-modules
  • TimelineGraph — combined timeline + graph view

All three respect prefers-reduced-motion via the reducedMotion prop.

Bundle-size note: GraphCanvasAdvanced pulls in @xyflow/react. Always import it via React.lazy(...) — never statically. GraphCanvas (SVG-only) is safe for static import.

ts
// GraphCanvas — static import OK
import { GraphCanvas } from "@lssm-tech/lib.ui-kit-web/ui/graph";

// GraphCanvasAdvanced — always lazy-load
const GraphCanvasAdvanced = React.lazy(
  () => import("@lssm-tech/lib.ui-kit-web/ui/graph").then(m => ({ default: m.GraphCanvasAdvanced }))
);

See AGENTS.md for layer placement and full import rules.

./ui/sonner-toast exposes the theme-independent toast emitter. Use it for action feedback that does not render a themed toaster; ./ui/sonner keeps its existing Next-theme-aware Toaster surface and optional peer requirement.

Declaration-only JSX augmentations under ui/**/*.d.ts participate in source type checking but are excluded from generated runtime entries and public runtime exports. They do not provide an executable component or require a native peer.

The narrow ./themed-primitives/{context,stack,list,text} exports own the existing web themed wrappers. WebComponentThemeProvider accepts already resolved component variants from a composition owner; it performs no discovery, registration, permission decision, or theme selection. Bare ./ui/* primitives retain their behavior. Caller props override variant defaults. These React client exports preserve the web DOM and shared context identity used by DesignSystem and SurfaceRuntime.

Canonical builds retain the intentional published export map (exports.rewrite: false). New production roots must be declared in the existing build entries and manifest together; generation must not silently rename or drop supported aliases or platform conditions. Full artifact verification checks every advertised target, including native aliases. Test fixtures remain in source verification while excluded from production entry discovery.

Canonical contract suppliers

Web graph, rich-reference and Storybook consumers use complete canonical Core, Kernel, UiKitCore and DesignCatalog families. Their implementation bodies, defaults, layout behavior, fixtures and assertions are unchanged. The full original rich-reference denial-token parity fixture remains in this package and uses the canonical Core serialization entry. Source supplier wiring is separate from fresh owning-build, declaration, affected-test and platform qualification.

Declared capabilities.

Lib Ui Kit Web

Web UI components with Radix primitives

Use it to

  • Adopt web ui components with radix primitives

Requires

  • TypeScript

Choose another boundary when

  • The @lssm-tech/lib.ui-kit-web package constraints do not match the target runtime or platform.

@lssm-tech/lib.ui-kit-web

@lssm-tech/lib.ui-kit-web/preview-panel

@lssm-tech/lib.ui-kit-web/preview-panel/focus-management

@lssm-tech/lib.ui-kit-web/preview-panel/modes/BottomSheet

@lssm-tech/lib.ui-kit-web/preview-panel/modes/Drawer

@lssm-tech/lib.ui-kit-web/preview-panel/modes/HoverPopover

@lssm-tech/lib.ui-kit-web/preview-panel/modes/Modal

@lssm-tech/lib.ui-kit-web/preview-panel/modes/Popover

@lssm-tech/lib.ui-kit-web/preview-panel/PreviewPanelRouter

@lssm-tech/lib.ui-kit-web/preview-panel/shared/motion

@lssm-tech/lib.ui-kit-web/preview-panel/shared/panel-base-props

@lssm-tech/lib.ui-kit-web/preview-panel/shared/use-panel-effects

Imports and export paths.

240 entries

These are package-manifest entry points. Named symbols listed above come from the capability catalogue; this is not an exhaustive TypeScript symbol reference.

240 imports · 35 affichés

Dependencies and related packages.

Runtime dependencies 49
@daypicker/react
10.0.1
@radix-ui/react-accordion
^1.2.20
@radix-ui/react-alert-dialog
^1.1.23
@radix-ui/react-aspect-ratio
^1.1.15
@radix-ui/react-avatar
^1.2.6
@radix-ui/react-checkbox
^1.3.11
@radix-ui/react-collapsible
^1.1.20
@radix-ui/react-context-menu
^2.3.7
@radix-ui/react-dialog
^1.1.23
@radix-ui/react-dropdown-menu
^2.1.24
@radix-ui/react-hover-card
^1.1.23
@radix-ui/react-label
^2.1.15
@radix-ui/react-menubar
^1.1.24
@radix-ui/react-navigation-menu
^1.2.22
@radix-ui/react-popover
^1.1.23
@radix-ui/react-progress
^1.1.16
@radix-ui/react-radio-group
^1.4.7
@radix-ui/react-scroll-area
^1.2.18
@radix-ui/react-select
^2.3.7
@radix-ui/react-separator
^1.1.15
@radix-ui/react-slider
^1.4.7
@radix-ui/react-slot
^1.3.3
@radix-ui/react-switch
^1.3.7
@radix-ui/react-tabs
^1.1.21
@radix-ui/react-toast
^1.2.23
@radix-ui/react-toggle
^1.1.18
@radix-ui/react-toggle-group
^1.1.19
@radix-ui/react-tooltip
^1.2.16
class-variance-authority
catalog:ui
clsx
catalog:ui
cmdk
^1.1.1
d3-force
^3.0.0
dom-to-image-more
^3.10.2
elkjs
^0.12.0
embla-carousel-react
^8.6.0
framer-motion
^13.2.0
input-otp
^1.5.0
lucide-react
catalog:ui
pdf-lib
^1.17.1
react-resizable-panels
^4.12.4
shiki
^4.4.3
sonner
^2.0.8
tailwind-merge
catalog:ui
vaul
^1.1.2
Peer dependencies 13
@hookform/resolvers
^5.4.0
@react-three/fiber
>=8.0.0
@sentry/nextjs
^10.75.0
@xyflow/react
^12.11.6
echarts
catalog:ui
maplibre-gl
^6.8.0
next
catalog:
next-themes
^0.4.3
react
catalog:
react-dom
catalog:
react-hook-form
^7.72.1
react-map-gl
^8.0.4
three
>=0.155.0
Development dependencies 25
@hookform/resolvers
5.9.1
@react-three/fiber
^9.7.0
@sentry/nextjs
^10.75.0
@types/d3-force
^3.0.10
@types/geojson
^7946.0.16
@types/jest
catalog:testing
@types/node
catalog:types
@types/react
catalog:types
@types/react-dom
catalog:types
@types/three
^0.185.4
@xyflow/react
^12.11.6
echarts
catalog:ui
happy-dom
catalog:testing
jest
catalog:testing
maplibre-gl
^6.10.0
next
catalog:
next-themes
^0.4.6
react
catalog:
react-dom
catalog:
react-hook-form
catalog:ui
react-map-gl
^8.1.3
three
^0.186.0
typescript
catalog:

Package scripts.

Commands declared by this package. Review its setup requirements before running them; no command here was executed by this review.

publish:pkgbun publish --tolerate-republish --ignore-scripts --verbose
publish:pkg:canarybun publish:pkg --tag canary
buildcontractspec-bun-build build
build:bundlecontractspec-bun-build transpile
build:typescontractspec-bun-build types
devcontractspec-bun-build dev
cleanrm -rf dist
lintbun run lint:fix
lint:fixnode ../../../../scripts/biome.cjs check --write --unsafe --only=nursery/useSortedClasses . && node ../../../../scripts/biome.cjs check --write .
lint:checknode ../../../../scripts/biome.cjs check .
testbun test --pass-with-no-tests
storybook:generatebun scripts/storybook.mjs
storybook:checkbun scripts/storybook.mjs --check
check:bundlenode scripts/check-bundle.mjs
prebuildcontractspec-bun-build prebuild
typechecktsgo --noEmit
Votre vue

Make room for your context.

Shape the presentation around this moment. You can change it whenever you need.

Votre contexte

The different parts of you

Choose a starting point

Un mélange utile de contexte, de visuels et de guidage discret.

Tune each dimension
Each dimension can change independently. Product permissions and available actions stay unchanged.

Support the way you begin and return

Tune your support

Confort de lecture

Choisir votre langue

La langue de l’interface change uniquement le texte. Les marchés, les prix et les parcours conservent leurs propres paramètres.

Couverture des traductions

Une partie du contenu est affichée en anglais.

Navigation151
Graphe616
Catégories378
Portfolio833
Exemples2 035
Aperçu de la source1 542

D’autres traductions seront ajoutées à mesure que le contenu sera relu.

Cette préférence est enregistrée dans ce navigateur.

Rechercher sur le site

Des points de départ utiles

Aucun résultat. Essayez une expression plus courte, un nom d’opération ou un autre périmètre de recherche.

UN PEU DE PLACE POUR EXPLORER

Trouvez quelque chose à explorer.

Ouvrez un aperçu détaillé sur cette page, essayez une autre perspective ou suivez le détail vers sa propre page.

Fonctionnement des aperçus et des commandes
01

Regarder avant de partir

Survolez un lien ou sélectionnez-le avec Tab pour voir un aperçu. Cliquer sur le lien d’origine ou appuyer sur Entrée ouvre toujours sa destination.

02

Rester dans le contexte

Entrez dans l’aperçu pour explorer ses sections. Depuis un lien sélectionné, utilisez Alt + ↓ pour y entrer au clavier. Échap le ferme.

03

Ouvrir les possibilités

Les lignes dépliables, les choix de perspective et les commandes mises en évidence révèlent davantage. Votre vue adapte le confort de lecture et le contexte exploré.

Un bouton séparé pour voir de plus près

Affichez de petits boutons d’aperçu à côté des liens quand l’espace le permet. Touchez l’œil pour examiner ou le lien pour y aller directement. Ce choix reste dans cet onglet.

Aucun historique de navigation n’est collecté. La réduction des animations suit votre appareil et Votre vue.