-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update to tailwind 4 via nui/tailwind 4
- Loading branch information
1 parent
4d0917d
commit 3490c20
Showing
15 changed files
with
1,291 additions
and
1,683 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
strict-peer-dependencies=false | ||
# shamefully-hoist=true | ||
use-lockfile-v6=true | ||
resolution-mode=highest | ||
shamefully-hoist=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
export default defineAppConfig({ | ||
nuxtIcon: {}, | ||
icon: { | ||
mode: 'svg', | ||
}, | ||
nui: { | ||
BaseButton: { | ||
variant: 'solid', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
@import 'tailwindcss'; | ||
|
||
@import '@shuriken-ui/tailwind'; | ||
|
||
@variant dark (&:where(.dark, .dark *)); | ||
|
||
/* | ||
The default border color has changed to \`currentColor\` in Tailwind CSS v4, | ||
so we've added these compatibility styles to make sure everything still | ||
looks the same as it did with Tailwind CSS v3. | ||
If we ever want to remove these styles, we need to add an explicit border | ||
color utility to any element that depends on these defaults. | ||
*/ | ||
@layer base { | ||
*, | ||
::after, | ||
::before, | ||
::backdrop, | ||
::file-selector-button { | ||
border-color: var(--color-gray-200, currentColor); | ||
} | ||
} | ||
/* | ||
Form elements have a 1px border by default in Tailwind CSS v4, so we've | ||
added these compatibility styles to make sure everything still looks the | ||
same as it did with Tailwind CSS v3. | ||
If we ever want to remove these styles, we need to add \`border-0\` to | ||
any form elements that shouldn't have a border. | ||
*/ | ||
@layer base { | ||
input:where(:not([type='button'], [type='reset'], [type='submit'])), | ||
select, | ||
textarea { | ||
border-width: 0; | ||
} | ||
} | ||
|
||
@theme { | ||
--font-family-sans: Inter, sans-serif; | ||
--font-family-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace,; | ||
--font-family-alt: Karla, sans-serif; | ||
--font-family-heading: var(--font-family-sans); | ||
|
||
/** Colors */ | ||
/* --color-primary-50: var(--color-red-50); | ||
--color-primary-100: var(--color-red-100); | ||
--color-primary-200: var(--color-red-200); | ||
--color-primary-300: var(--color-red-300); | ||
--color-primary-400: var(--color-red-400); | ||
--color-primary-500: var(--color-red-500); | ||
--color-primary-600: var(--color-red-600); | ||
--color-primary-700: var(--color-red-700); | ||
--color-primary-800: var(--color-red-800); | ||
--color-primary-900: var(--color-red-900); | ||
--color-primary-950: var(--color-red-950); */ | ||
|
||
--color-muted-50: var(--color-stone-50); | ||
--color-muted-100: var(--color-stone-100); | ||
--color-muted-200: var(--color-stone-200); | ||
--color-muted-300: var(--color-stone-300); | ||
--color-muted-400: var(--color-stone-400); | ||
--color-muted-500: var(--color-stone-500); | ||
--color-muted-600: var(--color-stone-600); | ||
--color-muted-700: var(--color-stone-700); | ||
--color-muted-800: var(--color-stone-800); | ||
--color-muted-900: var(--color-stone-900); | ||
--color-muted-950: var(--color-stone-950); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,81 +1,8 @@ | ||
/* eslint-disable ts/ban-ts-comment */ | ||
|
||
import { fileURLToPath } from 'node:url' | ||
import { addTemplate } from '@nuxt/kit' | ||
import { dirname, join } from 'pathe' | ||
|
||
export default defineNuxtConfig({ | ||
compatibilityDate: '2024-11-02', | ||
extends: '..', | ||
modules: ['nuxt-component-meta', 'unplugin-fonts/nuxt'], | ||
unfonts: { | ||
google: { | ||
families: ['Roboto Flex', 'Inter', 'Karla'], | ||
}, | ||
}, | ||
sourcemap: true, | ||
tailwindcss: { | ||
// config: { | ||
// content: [], | ||
// theme: { | ||
// fontFamily: { | ||
// heading: ['Inter', 'sans-serif'], | ||
// sans: ['Inter', 'sans-serif'], | ||
// alt: ['Karla', 'sans-serif'], | ||
// mono: [ | ||
// 'ui-monospace', | ||
// 'SFMono-Regular', | ||
// 'Menlo', | ||
// 'Monaco', | ||
// 'Consolas', | ||
// '"Liberation Mono"', | ||
// '"Courier New"', | ||
// 'monospace', | ||
// ], | ||
// }, | ||
// extend: { | ||
// colors: { | ||
// primary: colors?.violet, | ||
// muted: colors?.stone, | ||
// }, | ||
// }, | ||
// }, | ||
// }, | ||
}, | ||
componentMeta: { | ||
globalsOnly: false, | ||
debug: 2, | ||
exclude: [ | ||
(component: any) => { | ||
const componentsPath = join( | ||
dirname(fileURLToPath(import.meta.url)), | ||
'../components', | ||
) | ||
const isExternal = !component.filePath?.startsWith?.(componentsPath) | ||
const isIcon = component?.kebabName?.startsWith('icon-') | ||
|
||
return isExternal || isIcon | ||
}, | ||
], | ||
checkerOptions: { | ||
schema: { | ||
ignore: ['KeyboardEvent'], | ||
}, | ||
}, | ||
}, | ||
hooks: { | ||
// @ts-ignore | ||
'tailwindcss:resolvedConfig': function (config) { | ||
addTemplate({ | ||
filename: 'tailwind.config.ts', // gets prepended by .nuxt/ | ||
getContents: () => `export default ${JSON.stringify(config, null, 2)}`, | ||
write: true, | ||
}) | ||
}, | ||
}, | ||
vite: { | ||
optimizeDeps: { | ||
include: ['@headlessui/vue', '@headlessui-float/vue'], | ||
}, | ||
}, | ||
compatibilityDate: '2024-11-08', | ||
extends: ['@shuriken-ui/nuxt'], | ||
modules: [ | ||
'@nuxt/fonts', | ||
], | ||
css: ['~/assets/tailwind.css'], | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.