diff --git a/cli/utils/templates.mjs b/cli/utils/templates.mjs index 0de57453..d2b882b9 100644 --- a/cli/utils/templates.mjs +++ b/cli/utils/templates.mjs @@ -19,6 +19,7 @@ const playground = ({ name }) => { const component = ({ name }) => { const upperName = splitByCase(name).map(p => upperFirst(p)).join('') const camelName = camelCase(name) + const kebabName = kebabCase(name) return { filename: `src/runtime/components/${upperName}.vue`, @@ -28,7 +29,7 @@ import { tv, type VariantProps } from 'tailwind-variants' import type { ${upperName}RootProps, ${upperName}RootEmits } from 'radix-vue' import type { AppConfig } from '@nuxt/schema' import _appConfig from '#build/app.config' -import theme from '#build/ui/${camelName}' +import theme from '#build/ui/${kebabName}' const appConfig = _appConfig as AppConfig & { ui: { ${camelName}: Partial } } @@ -68,10 +69,10 @@ const ui = computed(() => tv({ extend: ${camelName}, slots: props.ui })()) } const theme = ({ name }) => { - const camelName = camelCase(name) + const kebabName = kebabCase(name) return { - filename: `src/theme/${camelName}.ts`, + filename: `src/theme/${kebabName}.ts`, contents: ` export default (config: { colors: string[] }) => ({ slots: { diff --git a/package.json b/package.json index d920c5b1..ae8dbf01 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,7 @@ "nuxt-icon": "^0.6.10", "ohash": "^1.1.3", "radix-vue": "^1.6.1", + "scule": "^1.3.0", "tailwind-variants": "^0.2.1", "tailwindcss": "4.0.0-alpha.10" }, diff --git a/playground/pages/form-field.vue b/playground/pages/form-field.vue index 47f87349..d9191208 100644 --- a/playground/pages/form-field.vue +++ b/playground/pages/form-field.vue @@ -1,5 +1,5 @@