Skip to content

Add daisyUI adapter theme, demo integration, and build step#106

Draft
developit wants to merge 2 commits intomainfrom
codex/build-daisyui-adapter-theme-for-kinu
Draft

Add daisyUI adapter theme, demo integration, and build step#106
developit wants to merge 2 commits intomainfrom
codex/build-daisyui-adapter-theme-for-kinu

Conversation

@developit
Copy link
Copy Markdown
Owner

Motivation

  • Provide a path for consumers to use daisyUI themes with Kinu components without requiring Tailwind in their apps.
  • Ship a precompiled daisyUI adapter so Kinu components can inherit daisyUI theme variables and styles via [data-theme].
  • Make the demo usable for both Kinu-native token-based styling and the daisyUI adapter by adding a runtime switch and persistence.

Description

  • Add src/themes/daisyui.css which maps Kinu attribute selectors to daisyUI classes using Tailwind @apply and daisyUI plugin output so the adapter can be compiled into a standalone CSS file.
  • Update package.json to export ./themes/daisyui.css, add a build step that compiles the adapter into dist/themes/daisyui.css, and add devDependencies for tailwindcss, daisyui, and @tailwindcss/cli required to build the adapter.
  • Integrate adapter into the demo by updating demo/src/theme-customizer.tsx to add a StyleEngine toggle (kinu vs daisyui), persist selections to localStorage, inject/remove the compiled adapter stylesheet, and disable the generated CSS UI when using the daisyUI adapter.
  • Document the adapter in README.md and docs/pages/theming.md with usage instructions showing how to import kinu/themes/daisyui.css and set [data-theme].

Testing

  • Ran unit tests with pnpm test (Vitest) and they succeeded.
  • Ran type checking and linting with pnpm run lint (tsc && biome lint) and they succeeded.

Codex Task

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 26, 2026

Deploy Preview for kinu-sh ready!

Name Link
🔨 Latest commit 83d63f2
🔍 Latest deploy log https://app.netlify.com/projects/kinu-sh/deploys/69c5cd6b30976e000859de5c
😎 Deploy Preview https://deploy-preview-106--kinu-sh.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 26, 2026

Size Change: +28.2 kB (+200.65%) 🆘

Total Size: 42.2 kB

Filename Size Change
dist/themes/daisyui.css 28.2 kB +28.2 kB (new file) 🆕
ℹ️ View Unchanged
Filename Size
dist/index.css 8.53 kB
dist/index.js 5.51 kB

compressed-size-action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant