Package Tansy UI as @openkhalix/tansy-ui in a monorepo (v0.4.0)
Restructure the repo into npm workspaces so the component kit publishes as its own package, like MUI and shadcn/ui: - packages/ui: @openkhalix/tansy-ui (published), with components, stories, tests, tokens and the library build - packages/brand: private logo and catalogue data shared by both apps - apps/site: the landing page - apps/docs: Storybook The package: - MIT licence (copyright OpenKhalix) - per-component ES modules and type declarations - "use client" on component modules so they import into Next.js Server Components; helpers stay server-safe - tokens.css for Tailwind v4 apps, and a prebuilt styles.css for apps without Tailwind - lucide-react 1.x, whose types compile against current React 19 types The apps resolve the package through a "source" export condition, so they hot-reload component edits, while outside users get dist/. scripts/test-package.mjs packs the package and installs the tarball into Vite + Tailwind (strict types), plain React and Next.js apps; each must build and render correctly. Gitea workflows run CI on push and publish to npm when a vX.Y.Z tag matching the package version is pushed.
This commit is contained in:
1 parent
23e67006d3
commit
9255b255a6
214 files changed
+1521
-389
No files matched your search
@@ -0,0 +1,46 @@
|
||||
import { create } from 'storybook/theming'
|
||||
|
||||
/**
|
||||
* Tansy UI branding for the Storybook manager and docs pages.
|
||||
*
|
||||
* `brandTitle` is HTML: the mark comes from `public/` (served via `staticDirs`)
|
||||
* and is referenced relatively so it resolves both at `/` in dev and under
|
||||
* `/docs/` in production.
|
||||
*/
|
||||
export const tansyTheme = create({
|
||||
base: 'light',
|
||||
|
||||
brandTitle: `<span style="display:inline-flex;align-items:center;gap:8px;white-space:nowrap">
|
||||
<img src="./tansy-mark.svg" width="28" height="28" alt="" />
|
||||
<span style="font-family:'Schibsted Grotesk',sans-serif;font-weight:800;font-size:19px;letter-spacing:-0.03em;color:#12151c">Tansy <span style="font-weight:700;color:#6b7384">UI</span></span>
|
||||
<span style="font-size:11px;color:#6b7384;padding-left:8px;border-left:1px solid #c5cad4">by OpenKhalix</span>
|
||||
</span>`,
|
||||
brandUrl: '/',
|
||||
brandTarget: '_self',
|
||||
|
||||
colorPrimary: '#305ddd',
|
||||
colorSecondary: '#305ddd',
|
||||
|
||||
appBg: '#f3f4f6',
|
||||
appContentBg: '#ffffff',
|
||||
appPreviewBg: '#ffffff',
|
||||
appBorderColor: '#dde1e8',
|
||||
appBorderRadius: 8,
|
||||
|
||||
fontBase: '"Instrument Sans", "Helvetica Neue", Arial, sans-serif',
|
||||
fontCode: '"JetBrains Mono", "SFMono-Regular", Consolas, monospace',
|
||||
|
||||
textColor: '#12151c',
|
||||
textInverseColor: '#ffffff',
|
||||
textMutedColor: '#6b7384',
|
||||
|
||||
barBg: '#ffffff',
|
||||
barTextColor: '#4a5162',
|
||||
barSelectedColor: '#305ddd',
|
||||
barHoverColor: '#305ddd',
|
||||
|
||||
inputBg: '#ffffff',
|
||||
inputBorder: '#c5cad4',
|
||||
inputTextColor: '#12151c',
|
||||
inputBorderRadius: 6,
|
||||
})
|
||||
Reference in new issue
Block a user