Read-only mirror of https://github.com/DCC-BS/common-ui.bs.js — Basel-Stadt. Issues & pull requests at the source.
  • Vue 44.4%
  • CSS 32.3%
  • TypeScript 21.7%
  • HTML 1.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-08-26 12:12:35 +02:00
.github/workflows Update CI workflow and fix formatting 2026-08-26 11:44:37 +02:00
.vscode updated the library to do not use a nuxt moduel 2025-08-05 15:38:10 +02:00
docs Render orchestrator inside ClientOnly 2026-08-04 16:43:31 +02:00
playground Remove duplicate first-run cookies 2026-08-26 11:38:57 +02:00
src Update CI workflow and fix formatting 2026-08-26 11:44:37 +02:00
.editorconfig initialize project structure with configuration files, styles, and basic components 2025-02-21 15:18:13 +01:00
.gitignore initialize project structure with configuration files, styles, and basic components 2025-02-21 15:18:13 +01:00
.npmignore initialize project structure with configuration files, styles, and basic components 2025-02-21 15:18:13 +01:00
biome.json Add driver.js onboarding tour support (#119) 2026-07-21 15:58:41 +02:00
build.config.ts refactor: clean up build config and format split-container component 2025-10-07 13:27:53 +02:00
bun.lock Update dependency vue-tsc to v3.3.9 (#137) 2026-08-15 18:13:09 +02:00
bunfig.toml Sec/add bunfig (#91) 2026-03-27 13:07:51 +01:00
CHANGELOG.md Feature/first run orchestrator (#125) 2026-07-29 11:51:45 +02:00
CONTEXT.md Render orchestrator inside ClientOnly 2026-08-04 16:43:31 +02:00
LICENSE initialize project structure with configuration files, styles, and basic components 2025-02-21 15:18:13 +01:00
mise.toml Add CI task and postinstall hook 2026-08-26 12:08:03 +02:00
package.json Bump version to 2.1.8 2026-08-26 12:12:35 +02:00
README.md Feature/disable system status 2026-08-05 11:23:42 +02:00
renovate.json Update renovate.json 2025-11-27 08:36:18 +01:00
tailwind.v4.config.ts refactor: clean up CSS styles for various components and improve readability 2025-09-24 15:11:43 +02:00
tsconfig.json Compact tsconfig.json exclude array 2025-12-15 09:18:04 +01:00
UBIQUITOUS_LANGUAGE.md Features/redesign header footer (#126) 2026-08-04 15:35:30 +02:00

common-ui.bs.js

A comprehensive Nuxt module providing reusable UI components, composables, and utilities built with the official Kanton Basel-Stadt design system. This package streamlines development of Basel-Stadt applications by offering a consistent, accessible, and well-documented component library.

GitHub License Checked with Biome NPM Version

What's included:

  • Pre-built Components: Navigation bars, split views, disclaimers, status indicators, and more
  • First-run Orchestrator: A single <FirstRunOrchestrator> component that coordinates the Disclaimer, Changelogs, and Onboarding flows by priority (one on screen at a time, rendered client-side to prevent hydration flash)
  • Useful Composables: User feedback system, error handling utilities
  • i18n Integration: Built-in internationalization support
  • Design System: Full integration with Kanton Basel-Stadt color palette and styling
  • Accessibility: Components built with accessibility in mind
  • Zero Configuration: Auto-imports components and configures everything for you

First-run flows

Disclaimer, Changelogs, and Onboarding each compete for the screen when a user enters the app. Mount one <FirstRunOrchestrator> (typically in app.vue) and it renders the highest-priority pending flow, one at a time, recomputing after each completion. Priority: Disclaimer (30) > Changelogs (20) > Onboarding (10).

```

Completion state is stored in cookies (disclaimer-accepted, changelogs-last-read, tour-completed) so pending can be computed from the client's cookie jar. The active flow is rendered inside <ClientOnly>, which guarantees no flash even if the cookie can't reach the SSR layer (proxy stripping, cross-origin SSR, etc.). Re-trigger buttons (<DisclaimerButton>, <ChangelogsButton>, <OnboardingRestartButton>) reset the corresponding cookie. See docs/migration-v2.md for the full consumer guide.

Configuration

The following environment variables control the first-run flows. Set them in your .env file to disable the corresponding flow:

Env Var Default Description
NUXT_PUBLIC_COMMON_UI_DISABLE_DISCLAIMER false When set to true, disables the Disclaimer flow.
NUXT_PUBLIC_COMMON_UI_DISABLE_CHANGELOG false When set to true, disables the Changelogs flow.
NUXT_PUBLIC_COMMON_UI_DISABLE_ONBOARDING false When set to true, disables the Onboarding flow.
NUXT_PUBLIC_COMMON_UI_DISABLE_SYSTEM_STATUS false When set to true, disables the <SystemStatus> health indicator.

Example .env:

NUXT_PUBLIC_COMMON_UI_DISABLE_CHANGELOG=true
NUXT_PUBLIC_COMMON_UI_DISABLE_DISCLAIMER=true
NUXT_PUBLIC_COMMON_UI_DISABLE_ONBOARDING=true
NUXT_PUBLIC_COMMON_UI_DISABLE_SYSTEM_STATUS=true

Disclaimer content defaults can also be set in nuxt.config.ts under runtimeConfig.public.commonUi.disclaimer.{appName, version, contentHtml, postfixHtml, confirmationText}, and overridden per-mount via the orchestrator's :disclaimer prop.

Documentation

For installation and detailed usage instructions, visit the Documentation Site. For version-to-version changes, see the Changelog and the v2 migration guide.

License

MIT © Data Competence Center Basel-Stadt

DCC Logo

Datenwissenschaften und KI
Developed with ❤️ by DCC - Data Competence Center